diff --git a/dist/nosql-ts.js b/dist/nosql-ts.js index db02385..a2b69f1 100644 --- a/dist/nosql-ts.js +++ b/dist/nosql-ts.js @@ -1,7 +1,7 @@ /** * File: nosql-ts.js * Version: 0.0.7 - * Generated: 2025-10-24 + * Generated: 2026-01-21 */ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, IdentifierNameMap: () => IdentifierNameMap, - IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -6036,6 +6035,7 @@ __export(typescript_exports, { InlayHintKind: () => InlayHintKind2, InlayHints: () => ts_InlayHints_exports, InternalEmitFlags: () => InternalEmitFlags, + InternalNodeBuilderFlags: () => InternalNodeBuilderFlags, InternalSymbolName: () => InternalSymbolName, IntersectionFlags: () => IntersectionFlags, InvalidatedProjectKind: () => InvalidatedProjectKind, @@ -6082,6 +6082,8 @@ __export(typescript_exports, { PollingInterval: () => PollingInterval, PollingWatchKind: () => PollingWatchKind, PragmaKindFlags: () => PragmaKindFlags, + PredicateSemantics: () => PredicateSemantics, + PreparePasteEdits: () => ts_preparePasteEdits_exports, PrivateIdentifierKind: () => PrivateIdentifierKind, ProcessLevel: () => ProcessLevel, ProgramUpdateLevel: () => ProgramUpdateLevel, @@ -6112,7 +6114,6 @@ __export(typescript_exports, { SymbolFlags: () => SymbolFlags, SymbolFormatFlags: () => SymbolFormatFlags, SyntaxKind: () => SyntaxKind, - SyntheticSymbolKind: () => SyntheticSymbolKind, Ternary: () => Ternary, ThrottledCancellationToken: () => ThrottledCancellationToken, TokenClass: () => TokenClass, @@ -6135,7 +6136,6 @@ __export(typescript_exports, { WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, - addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -6158,23 +6158,15 @@ __export(typescript_exports, { arrayFrom: () => arrayFrom, arrayIsEqualTo: () => arrayIsEqualTo, arrayIsHomogeneous: () => arrayIsHomogeneous, - arrayIsSorted: () => arrayIsSorted, arrayOf: () => arrayOf, arrayReverseIterator: () => arrayReverseIterator, arrayToMap: () => arrayToMap, arrayToMultiMap: () => arrayToMultiMap, arrayToNumericMap: () => arrayToNumericMap, - arraysEqual: () => arraysEqual, assertType: () => assertType, assign: () => assign, - assignHelper: () => assignHelper, - asyncDelegator: () => asyncDelegator, - asyncGeneratorHelper: () => asyncGeneratorHelper, asyncSuperHelper: () => asyncSuperHelper, - asyncValues: () => asyncValues, attachFileToDiagnostics: () => attachFileToDiagnostics, - awaitHelper: () => awaitHelper, - awaiterHelper: () => awaiterHelper, base64decode: () => base64decode, base64encode: () => base64encode, binarySearch: () => binarySearch, @@ -6197,14 +6189,16 @@ __export(typescript_exports, { canHaveJSDoc: () => canHaveJSDoc, canHaveLocals: () => canHaveLocals, canHaveModifiers: () => canHaveModifiers, + canHaveModuleSpecifier: () => canHaveModuleSpecifier, canHaveSymbol: () => canHaveSymbol, - canIncludeBindAndCheckDiagnsotics: () => canIncludeBindAndCheckDiagnsotics, + canIncludeBindAndCheckDiagnostics: () => canIncludeBindAndCheckDiagnostics, canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, canProduceDiagnostics: () => canProduceDiagnostics, canUsePropertyAccess: () => canUsePropertyAccess, canWatchAffectingLocation: () => canWatchAffectingLocation, canWatchAtTypes: () => canWatchAtTypes, canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, + canWatchDirectoryOrFilePath: () => canWatchDirectoryOrFilePath, cartesianProduct: () => cartesianProduct, cast: () => cast, chainBundle: () => chainBundle, @@ -6215,16 +6209,13 @@ __export(typescript_exports, { changeFullExtension: () => changeFullExtension, changesAffectModuleResolution: () => changesAffectModuleResolution, changesAffectingProgramStructure: () => changesAffectingProgramStructure, - characterToRegularExpressionFlag: () => characterToRegularExpressionFlag, + characterCodeToRegularExpressionFlag: () => characterCodeToRegularExpressionFlag, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, classHasClassThisAssignment: () => classHasClassThisAssignment, classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, - classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, - classPrivateFieldInHelper: () => classPrivateFieldInHelper, - classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, classicNameResolver: () => classicNameResolver, classifier: () => ts_classifier_exports, cleanExtendedConfigCache: () => cleanExtendedConfigCache, @@ -6232,7 +6223,6 @@ __export(typescript_exports, { clearMap: () => clearMap, clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, climbPastPropertyAccess: () => climbPastPropertyAccess, - climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, clone: () => clone, cloneCompilerOptions: () => cloneCompilerOptions, closeFileWatcher: () => closeFileWatcher, @@ -6245,12 +6235,10 @@ __export(typescript_exports, { commandLineOptionOfCustomType: () => commandLineOptionOfCustomType, commentPragmas: () => commentPragmas, commonOptionsWithBuild: () => commonOptionsWithBuild, - commonPackageFolders: () => commonPackageFolders, compact: () => compact, compareBooleans: () => compareBooleans, compareDataObjects: () => compareDataObjects, compareDiagnostics: () => compareDiagnostics, - compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, compareEmitHelpers: () => compareEmitHelpers, compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, comparePaths: () => comparePaths, @@ -6264,26 +6252,21 @@ __export(typescript_exports, { compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, compareTextSpans: () => compareTextSpans, compareValues: () => compareValues, - compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, - compose: () => compose, computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, computeLineOfPosition: () => computeLineOfPosition, computeLineStarts: () => computeLineStarts, computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, - computeSignature: () => computeSignature, computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, computedOptions: () => computedOptions, concatenate: () => concatenate, concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, - configDirTemplateSubstitutionOptions: () => configDirTemplateSubstitutionOptions, - configDirTemplateSubstitutionWatchOptions: () => configDirTemplateSubstitutionWatchOptions, consumesNodeCoreModules: () => consumesNodeCoreModules, contains: () => contains, containsIgnoredPath: () => containsIgnoredPath, @@ -6314,16 +6297,11 @@ __export(typescript_exports, { createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, createBaseNodeFactory: () => createBaseNodeFactory, createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, - createBindingHelper: () => createBindingHelper, - createBuildInfo: () => createBuildInfo, createBuilderProgram: () => createBuilderProgram, - createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, + createBuilderProgramUsingIncrementalBuildInfo: () => createBuilderProgramUsingIncrementalBuildInfo, createBuilderStatusReporter: () => createBuilderStatusReporter, - createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, - createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, - createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -6375,6 +6353,7 @@ __export(typescript_exports, { createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, createModeAwareCache: () => createModeAwareCache, createModeAwareCacheKey: () => createModeAwareCacheKey, + createModeMismatchDetails: () => createModeMismatchDetails, createModuleNotFoundChain: () => createModuleNotFoundChain, createModuleResolutionCache: () => createModuleResolutionCache, createModuleResolutionLoader: () => createModuleResolutionLoader, @@ -6396,6 +6375,7 @@ __export(typescript_exports, { createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, createProgram: () => createProgram, + createProgramDiagnostics: () => createProgramDiagnostics, createProgramHost: () => createProgramHost, createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, createQueue: () => createQueue, @@ -6445,9 +6425,8 @@ __export(typescript_exports, { declarationNameToString: () => declarationNameToString, decodeMappings: () => decodeMappings, decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, - decorateHelper: () => decorateHelper, deduplicate: () => deduplicate, - defaultIncludeSpec: () => defaultIncludeSpec, + defaultHoverMaximumTruncationLength: () => defaultHoverMaximumTruncationLength, defaultInitCompilerOptions: () => defaultInitCompilerOptions, defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, diagnosticCategoryName: () => diagnosticCategoryName, @@ -6458,27 +6437,22 @@ __export(typescript_exports, { displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, - disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, elideNodes: () => elideNodes, - emitComments: () => emitComments, emitDetachedComments: () => emitDetachedComments, emitFiles: () => emitFiles, emitFilesAndReportErrors: () => emitFilesAndReportErrors, emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, - emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, - emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, emitResolverSkipsTypeChecking: () => emitResolverSkipsTypeChecking, emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, emptyArray: () => emptyArray, emptyFileSystemEntries: () => emptyFileSystemEntries, emptyMap: () => emptyMap, emptyOptions: () => emptyOptions, - emptySet: () => emptySet, endsWith: () => endsWith, ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, ensureScriptKind: () => ensureScriptKind, @@ -6489,7 +6463,6 @@ __export(typescript_exports, { equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, equateStringsCaseSensitive: () => equateStringsCaseSensitive, equateValues: () => equateValues, - esDecorateHelper: () => esDecorateHelper, escapeJsxAttributeString: () => escapeJsxAttributeString, escapeLeadingUnderscores: () => escapeLeadingUnderscores, escapeNonAsciiString: () => escapeNonAsciiString, @@ -6498,15 +6471,14 @@ __export(typescript_exports, { escapeTemplateSubstitution: () => escapeTemplateSubstitution, evaluatorResult: () => evaluatorResult, every: () => every, + exclusivelyPrefixedNodeCoreModules: () => exclusivelyPrefixedNodeCoreModules, executeCommandLine: () => executeCommandLine, expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, explainFiles: () => explainFiles, explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, exportAssignmentIsAlias: () => exportAssignmentIsAlias, - exportStarHelper: () => exportStarHelper, expressionResultIsUnused: () => expressionResultIsUnused, extend: () => extend, - extendsHelper: () => extendsHelper, extensionFromPath: () => extensionFromPath, extensionIsTS: () => extensionIsTS, extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, @@ -6533,7 +6505,6 @@ __export(typescript_exports, { findLast: () => findLast, findLastIndex: () => findLastIndex, findListItemInfo: () => findListItemInfo, - findMap: () => findMap, findModifier: () => findModifier, findNextToken: () => findNextToken, findPackageJson: () => findPackageJson, @@ -6562,8 +6533,10 @@ __export(typescript_exports, { forEach: () => forEach, forEachAncestor: () => forEachAncestor, forEachAncestorDirectory: () => forEachAncestorDirectory, + forEachAncestorDirectoryStoppingAtGlobalCache: () => forEachAncestorDirectoryStoppingAtGlobalCache, forEachChild: () => forEachChild, forEachChildRecursively: () => forEachChildRecursively, + forEachDynamicImportOrRequireCall: () => forEachDynamicImportOrRequireCall, forEachEmittedFile: () => forEachEmittedFile, forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, forEachEntry: () => forEachEntry, @@ -6573,6 +6546,8 @@ __export(typescript_exports, { forEachLeadingCommentRange: () => forEachLeadingCommentRange, forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, forEachNameOfDefaultExport: () => forEachNameOfDefaultExport, + forEachOptionsSyntaxByName: () => forEachOptionsSyntaxByName, + forEachProjectReference: () => forEachProjectReference, forEachPropertyAssignment: () => forEachPropertyAssignment, forEachResolvedProjectReference: () => forEachResolvedProjectReference, forEachReturnStatement: () => forEachReturnStatement, @@ -6581,7 +6556,6 @@ __export(typescript_exports, { forEachTsConfigPropArray: () => forEachTsConfigPropArray, forEachUnique: () => forEachUnique, forEachYieldExpression: () => forEachYieldExpression, - forSomeAncestorDirectory: () => forSomeAncestorDirectory, formatColorAndReset: () => formatColorAndReset, formatDiagnostic: () => formatDiagnostic, formatDiagnostics: () => formatDiagnostics, @@ -6592,11 +6566,8 @@ __export(typescript_exports, { formatMessage: () => formatMessage, formatStringFromArgs: () => formatStringFromArgs, formatting: () => ts_formatting_exports, - fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, - fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, generateDjb2Hash: () => generateDjb2Hash, generateTSConfig: () => generateTSConfig, - generatorHelper: () => generatorHelper, getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, getAdjustedRenameLocation: () => getAdjustedRenameLocation, getAliasDeclarationFromName: () => getAliasDeclarationFromName, @@ -6608,6 +6579,7 @@ __export(typescript_exports, { getAllKeys: () => getAllKeys, getAllProjectOutputs: () => getAllProjectOutputs, getAllSuperTypeNodes: () => getAllSuperTypeNodes, + getAllowImportingTsExtensions: () => getAllowImportingTsExtensions, getAllowJSCompilerOption: () => getAllowJSCompilerOption, getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, getAncestor: () => getAncestor, @@ -6615,7 +6587,6 @@ __export(typescript_exports, { getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, - getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -6640,7 +6611,6 @@ __export(typescript_exports, { getCommonSourceDirectory: () => getCommonSourceDirectory, getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, getCompilerOptionValue: () => getCompilerOptionValue, - getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, @@ -6656,7 +6626,6 @@ __export(typescript_exports, { getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, getContextualTypeFromParent: () => getContextualTypeFromParent, getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, - getCurrentTime: () => getCurrentTime, getDeclarationDiagnostics: () => getDeclarationDiagnostics, getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, @@ -6674,6 +6643,7 @@ __export(typescript_exports, { getDefaultLibFilePath: () => getDefaultLibFilePath, getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, getDefaultLikeExportNameFromDeclaration: () => getDefaultLikeExportNameFromDeclaration, + getDefaultResolutionModeForFileWorker: () => getDefaultResolutionModeForFileWorker, getDiagnosticText: () => getDiagnosticText, getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, getDirectoryPath: () => getDirectoryPath, @@ -6704,6 +6674,7 @@ __export(typescript_exports, { getEmitFlags: () => getEmitFlags, getEmitHelpers: () => getEmitHelpers, getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, + getEmitModuleFormatOfFileWorker: () => getEmitModuleFormatOfFileWorker, getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, @@ -6754,11 +6725,11 @@ __export(typescript_exports, { getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, getIdentifierTypeArguments: () => getIdentifierTypeArguments, getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, + getImpliedNodeFormatForEmitWorker: () => getImpliedNodeFormatForEmitWorker, getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, - getIndentSize: () => getIndentSize, getIndentString: () => getIndentString, getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, getInitializedVariables: () => getInitializedVariables, @@ -6767,6 +6738,7 @@ __export(typescript_exports, { getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, getInternalEmitFlags: () => getInternalEmitFlags, getInvokedExpression: () => getInvokedExpression, + getIsFileExcluded: () => getIsFileExcluded, getIsolatedModules: () => getIsolatedModules, getJSDocAugmentsTag: () => getJSDocAugmentsTag, getJSDocClassTag: () => getJSDocClassTag, @@ -6795,7 +6767,6 @@ __export(typescript_exports, { getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, getJSDocTags: () => getJSDocTags, - getJSDocTagsNoCache: () => getJSDocTagsNoCache, getJSDocTemplateTag: () => getJSDocTemplateTag, getJSDocThisTag: () => getJSDocThisTag, getJSDocType: () => getJSDocType, @@ -6815,11 +6786,12 @@ __export(typescript_exports, { getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, getLeftmostAccessExpression: () => getLeftmostAccessExpression, getLeftmostExpression: () => getLeftmostExpression, + getLibFileNameFromLibReference: () => getLibFileNameFromLibReference, + getLibNameFromLibReference: () => getLibNameFromLibReference, getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName, getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, getLineInfo: () => getLineInfo, getLineOfLocalPosition: () => getLineOfLocalPosition, - getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, getLineStartPositionForPosition: () => getLineStartPositionForPosition, getLineStarts: () => getLineStarts, getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, @@ -6861,7 +6833,6 @@ __export(typescript_exports, { getNameOfScriptTarget: () => getNameOfScriptTarget, getNameOrArgument: () => getNameOrArgument, getNameTable: () => getNameTable, - getNamesForExportedSymbol: () => getNamesForExportedSymbol, getNamespaceDeclarationNode: () => getNamespaceDeclarationNode, getNewLineCharacter: () => getNewLineCharacter, getNewLineKind: () => getNewLineKind, @@ -6878,62 +6849,57 @@ __export(typescript_exports, { getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment, getNonAugmentationDeclaration: () => getNonAugmentationDeclaration, getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode, + getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots, + getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode, getNormalizedAbsolutePath: () => getNormalizedAbsolutePath, getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot, getNormalizedPathComponents: () => getNormalizedPathComponents, getObjectFlags: () => getObjectFlags, - getOperator: () => getOperator, getOperatorAssociativity: () => getOperatorAssociativity, getOperatorPrecedence: () => getOperatorPrecedence, getOptionFromName: () => getOptionFromName, getOptionsForLibraryResolution: () => getOptionsForLibraryResolution, getOptionsNameMap: () => getOptionsNameMap, + getOptionsSyntaxByArrayElementValue: () => getOptionsSyntaxByArrayElementValue, + getOptionsSyntaxByValue: () => getOptionsSyntaxByValue, getOrCreateEmitNode: () => getOrCreateEmitNode, - getOrCreateExternalHelpersModuleNameIfNeeded: () => getOrCreateExternalHelpersModuleNameIfNeeded, getOrUpdate: () => getOrUpdate, getOriginalNode: () => getOriginalNode, getOriginalNodeId: () => getOriginalNodeId, - getOriginalSourceFile: () => getOriginalSourceFile, getOutputDeclarationFileName: () => getOutputDeclarationFileName, getOutputDeclarationFileNameWorker: () => getOutputDeclarationFileNameWorker, getOutputExtension: () => getOutputExtension, getOutputFileNames: () => getOutputFileNames, getOutputJSFileNameWorker: () => getOutputJSFileNameWorker, getOutputPathsFor: () => getOutputPathsFor, - getOutputPathsForBundle: () => getOutputPathsForBundle, getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath, getOwnKeys: () => getOwnKeys, getOwnValues: () => getOwnValues, - getPackageJsonInfo: () => getPackageJsonInfo, getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths, - getPackageJsonsVisibleToFile: () => getPackageJsonsVisibleToFile, getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName, getPackageScopeForPath: () => getPackageScopeForPath, getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc, - getParameterTypeNode: () => getParameterTypeNode, getParentNodeInSpan: () => getParentNodeInSpan, getParseTreeNode: () => getParseTreeNode, getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile, getPathComponents: () => getPathComponents, - getPathComponentsRelativeTo: () => getPathComponentsRelativeTo, getPathFromPathComponents: () => getPathFromPathComponents, getPathUpdater: () => getPathUpdater, getPathsBasePath: () => getPathsBasePath, getPatternFromSpec: () => getPatternFromSpec, - getPendingEmitKind: () => getPendingEmitKind, + getPendingEmitKindWithSeen: () => getPendingEmitKindWithSeen, getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter, getPossibleGenericSignatures: () => getPossibleGenericSignatures, getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension, + getPossibleOriginalInputPathWithoutChangingExt: () => getPossibleOriginalInputPathWithoutChangingExt, getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo, getPreEmitDiagnostics: () => getPreEmitDiagnostics, getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition, getPrivateIdentifier: () => getPrivateIdentifier, getProperties: () => getProperties, getProperty: () => getProperty, - getPropertyArrayElementValue: () => getPropertyArrayElementValue, getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, - getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, @@ -6957,13 +6923,14 @@ __export(typescript_exports, { getResolvePackageJsonExports: () => getResolvePackageJsonExports, getResolvePackageJsonImports: () => getResolvePackageJsonImports, getResolvedExternalModuleName: () => getResolvedExternalModuleName, + getResolvedModuleFromResolution: () => getResolvedModuleFromResolution, + getResolvedTypeReferenceDirectiveFromResolution: () => getResolvedTypeReferenceDirectiveFromResolution, getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType: () => getRestParameterElementType, getRightMostAssignedExpression: () => getRightMostAssignedExpression, getRootDeclaration: () => getRootDeclaration, getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache, getRootLength: () => getRootLength, - getRootPathSplitLength: () => getRootPathSplitLength, getScriptKind: () => getScriptKind, getScriptKindFromFileName: () => getScriptKindFromFileName, getScriptTargetFeatures: () => getScriptTargetFeatures, @@ -6975,14 +6942,12 @@ __export(typescript_exports, { getSetAccessorValueParameter: () => getSetAccessorValueParameter, getSetExternalModuleIndicator: () => getSetExternalModuleIndicator, getShebang: () => getShebang, - getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => getSingleInitializerOfVariableStatementOrPropertyDeclaration, getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement, getSnapshotText: () => getSnapshotText, getSnippetElement: () => getSnippetElement, getSourceFileOfModule: () => getSourceFileOfModule, getSourceFileOfNode: () => getSourceFileOfNode, getSourceFilePathInNewDir: () => getSourceFilePathInNewDir, - getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker, getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText, getSourceFilesToEmit: () => getSourceFilesToEmit, getSourceMapRange: () => getSourceMapRange, @@ -7005,7 +6970,6 @@ __export(typescript_exports, { getSwitchedType: () => getSwitchedType, getSymbolId: () => getSymbolId, getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier, - getSymbolParentOrFail: () => getSymbolParentOrFail, getSymbolTarget: () => getSymbolTarget, getSyntacticClassifications: () => getSyntacticClassifications, getSyntacticModifierFlags: () => getSyntacticModifierFlags, @@ -7036,7 +7000,6 @@ __export(typescript_exports, { getTouchingToken: () => getTouchingToken, getTrailingCommentRanges: () => getTrailingCommentRanges, getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter, - getTransformFlagsSubtreeExclusions: () => getTransformFlagsSubtreeExclusions, getTransformers: () => getTransformers, getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath, getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression, @@ -7064,7 +7027,6 @@ __export(typescript_exports, { hasAccessorModifier: () => hasAccessorModifier, hasAmbientModifier: () => hasAmbientModifier, hasChangesInResolutions: () => hasChangesInResolutions, - hasChildOfKind: () => hasChildOfKind, hasContextSensitiveParameters: () => hasContextSensitiveParameters, hasDecorators: () => hasDecorators, hasDocComment: () => hasDocComment, @@ -7073,6 +7035,7 @@ __export(typescript_exports, { hasEffectiveModifiers: () => hasEffectiveModifiers, hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier, hasExtension: () => hasExtension, + hasImplementationTSFileExtension: () => hasImplementationTSFileExtension, hasIndexSignature: () => hasIndexSignature, hasInferredType: () => hasInferredType, hasInitializer: () => hasInitializer, @@ -7100,7 +7063,6 @@ __export(typescript_exports, { hasType: () => hasType, hasTypeArguments: () => hasTypeArguments, hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter, - helperString: () => helperString, hostGetCanonicalFileName: () => hostGetCanonicalFileName, hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames, idText: () => idText, @@ -7110,9 +7072,8 @@ __export(typescript_exports, { identitySourceMapConsumer: () => identitySourceMapConsumer, ignoreSourceNewlines: () => ignoreSourceNewlines, ignoredPaths: () => ignoredPaths, - importDefaultHelper: () => importDefaultHelper, importFromModuleSpecifier: () => importFromModuleSpecifier, - importStarHelper: () => importStarHelper, + importSyntaxAffectsModuleResolution: () => importSyntaxAffectsModuleResolution, indexOfAnyCharCode: () => indexOfAnyCharCode, indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, @@ -7120,7 +7081,6 @@ __export(typescript_exports, { injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, - insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue, insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue, @@ -7136,11 +7096,9 @@ __export(typescript_exports, { isAccessibilityModifier: () => isAccessibilityModifier, isAccessor: () => isAccessor, isAccessorModifier: () => isAccessorModifier, - isAliasSymbolDeclaration: () => isAliasSymbolDeclaration, isAliasableExpression: () => isAliasableExpression, isAmbientModule: () => isAmbientModule, isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration, - isAnonymousFunctionDefinition: () => isAnonymousFunctionDefinition, isAnyDirectorySeparator: () => isAnyDirectorySeparator, isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire, isAnyImportOrReExport: () => isAnyImportOrReExport, @@ -7176,6 +7134,7 @@ __export(typescript_exports, { isAwaitKeyword: () => isAwaitKeyword, isBigIntLiteral: () => isBigIntLiteral, isBinaryExpression: () => isBinaryExpression, + isBinaryLogicalOperator: () => isBinaryLogicalOperator, isBinaryOperatorToken: () => isBinaryOperatorToken, isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, isBindableStaticAccessExpression: () => isBindableStaticAccessExpression, @@ -7195,9 +7154,9 @@ __export(typescript_exports, { isBooleanLiteral: () => isBooleanLiteral, isBreakOrContinueStatement: () => isBreakOrContinueStatement, isBreakStatement: () => isBreakStatement, - isBuild: () => isBuild, + isBuildCommand: () => isBuildCommand, isBuildInfoFile: () => isBuildInfoFile, - isBuilderProgram: () => isBuilderProgram2, + isBuilderProgram: () => isBuilderProgram, isBundle: () => isBundle, isCallChain: () => isCallChain, isCallExpression: () => isCallExpression, @@ -7216,7 +7175,6 @@ __export(typescript_exports, { isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration, isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, - isChildOfNodeWithKind: () => isChildOfNodeWithKind, isCircularBuildOrder: () => isCircularBuildOrder, isClassDeclaration: () => isClassDeclaration, isClassElement: () => isClassElement, @@ -7228,7 +7186,6 @@ __export(typescript_exports, { isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, - isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, isCommaListExpression: () => isCommaListExpression, @@ -7271,16 +7228,13 @@ __export(typescript_exports, { isDeleteTarget: () => isDeleteTarget, isDeprecatedDeclaration: () => isDeprecatedDeclaration, isDestructuringAssignment: () => isDestructuringAssignment, - isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, - isESSymbolIdentifier: () => isESSymbolIdentifier, isEffectiveExternalModule: () => isEffectiveExternalModule, - isEffectiveModuleDeclaration: () => isEffectiveModuleDeclaration, isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, isElementAccessChain: () => isElementAccessChain, isElementAccessExpression: () => isElementAccessExpression, @@ -7350,13 +7304,11 @@ __export(typescript_exports, { isFunctionOrModuleBlock: () => isFunctionOrModuleBlock, isFunctionSymbol: () => isFunctionSymbol, isFunctionTypeNode: () => isFunctionTypeNode, - isFutureReservedKeyword: () => isFutureReservedKeyword, isGeneratedIdentifier: () => isGeneratedIdentifier, isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier, isGetAccessor: () => isGetAccessor, isGetAccessorDeclaration: () => isGetAccessorDeclaration, isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration, - isGlobalDeclaration: () => isGlobalDeclaration, isGlobalScopeAugmentation: () => isGlobalScopeAugmentation, isGlobalSourceFile: () => isGlobalSourceFile, isGrammarError: () => isGrammarError, @@ -7389,7 +7341,7 @@ __export(typescript_exports, { isImportSpecifier: () => isImportSpecifier, isImportTypeAssertionContainer: () => isImportTypeAssertionContainer, isImportTypeNode: () => isImportTypeNode, - isImportableFile: () => isImportableFile, + isImportable: () => isImportable, isInComment: () => isInComment, isInCompoundLikeAssignment: () => isInCompoundLikeAssignment, isInExpressionContext: () => isInExpressionContext, @@ -7404,6 +7356,8 @@ __export(typescript_exports, { isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, isInTypeQuery: () => isInTypeQuery, + isIncrementalBuildInfo: () => isIncrementalBuildInfo, + isIncrementalBundleEmitBuildInfo: () => isIncrementalBundleEmitBuildInfo, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -7486,6 +7440,7 @@ __export(typescript_exports, { isJsxAttributeLike: () => isJsxAttributeLike, isJsxAttributeName: () => isJsxAttributeName, isJsxAttributes: () => isJsxAttributes, + isJsxCallLike: () => isJsxCallLike, isJsxChild: () => isJsxChild, isJsxClosingElement: () => isJsxClosingElement, isJsxClosingFragment: () => isJsxClosingFragment, @@ -7510,7 +7465,6 @@ __export(typescript_exports, { isLabeledStatement: () => isLabeledStatement, isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement, isLeftHandSideExpression: () => isLeftHandSideExpression, - isLeftHandSideOfAssignment: () => isLeftHandSideOfAssignment, isLet: () => isLet, isLineBreak: () => isLineBreak, isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName, @@ -7518,10 +7472,7 @@ __export(typescript_exports, { isLiteralExpressionOfObject: () => isLiteralExpressionOfObject, isLiteralImportTypeNode: () => isLiteralImportTypeNode, isLiteralKind: () => isLiteralKind, - isLiteralLikeAccess: () => isLiteralLikeAccess, - isLiteralLikeElementAccess: () => isLiteralLikeElementAccess, isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess, - isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression, isLiteralTypeLiteral: () => isLiteralTypeLiteral, isLiteralTypeNode: () => isLiteralTypeNode, isLocalName: () => isLocalName, @@ -7546,6 +7497,7 @@ __export(typescript_exports, { isModuleBlock: () => isModuleBlock, isModuleBody: () => isModuleBody, isModuleDeclaration: () => isModuleDeclaration, + isModuleExportName: () => isModuleExportName, isModuleExportsAccessExpression: () => isModuleExportsAccessExpression, isModuleIdentifier: () => isModuleIdentifier, isModuleName: () => isModuleName, @@ -7555,7 +7507,6 @@ __export(typescript_exports, { isModuleWithStringLiteralName: () => isModuleWithStringLiteralName, isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration, isNameOfModuleDeclaration: () => isNameOfModuleDeclaration, - isNamedClassElement: () => isNamedClassElement, isNamedDeclaration: () => isNamedDeclaration, isNamedEvaluation: () => isNamedEvaluation, isNamedEvaluationSource: () => isNamedEvaluationSource, @@ -7572,8 +7523,8 @@ __export(typescript_exports, { isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, isNewExpression: () => isNewExpression, isNewExpressionTarget: () => isNewExpressionTarget, + isNewScopeNode: () => isNewScopeNode, isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, - isNode: () => isNode, isNodeArray: () => isNodeArray, isNodeArrayMultiLine: () => isNodeArrayMultiLine, isNodeDescendantOf: () => isNodeDescendantOf, @@ -7582,14 +7533,11 @@ __export(typescript_exports, { isNodeModulesDirectory: () => isNodeModulesDirectory, isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration, isNonContextualKeyword: () => isNonContextualKeyword, - isNonExportDefaultModifier: () => isNonExportDefaultModifier, isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, - isNonGlobalDeclaration: () => isNonGlobalDeclaration, isNonNullAccess: () => isNonNullAccess, isNonNullChain: () => isNonNullChain, isNonNullExpression: () => isNonNullExpression, isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, - isNotEmittedOrPartiallyEmittedNode: () => isNotEmittedOrPartiallyEmittedNode, isNotEmittedStatement: () => isNotEmittedStatement, isNullishCoalesce: () => isNullishCoalesce, isNumber: () => isNumber, @@ -7605,7 +7553,6 @@ __export(typescript_exports, { isObjectLiteralMethod: () => isObjectLiteralMethod, isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, isObjectTypeDeclaration: () => isObjectTypeDeclaration, - isOctalDigit: () => isOctalDigit, isOmittedExpression: () => isOmittedExpression, isOptionalChain: () => isOptionalChain, isOptionalChainRoot: () => isOptionalChainRoot, @@ -7625,6 +7572,7 @@ __export(typescript_exports, { isParseTreeNode: () => isParseTreeNode, isPartOfParameterDeclaration: () => isPartOfParameterDeclaration, isPartOfTypeNode: () => isPartOfTypeNode, + isPartOfTypeOnlyImportOrExportDeclaration: () => isPartOfTypeOnlyImportOrExportDeclaration, isPartOfTypeQuery: () => isPartOfTypeQuery, isPartiallyEmittedExpression: () => isPartiallyEmittedExpression, isPatternMatch: () => isPatternMatch, @@ -7639,7 +7587,6 @@ __export(typescript_exports, { isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression, isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol, - isProgramBundleEmitBuildInfo: () => isProgramBundleEmitBuildInfo, isProgramUptoDate: () => isProgramUptoDate, isPrologueDirective: () => isPrologueDirective, isPropertyAccessChain: () => isPropertyAccessChain, @@ -7652,7 +7599,6 @@ __export(typescript_exports, { isPropertyName: () => isPropertyName, isPropertyNameLiteral: () => isPropertyNameLiteral, isPropertySignature: () => isPropertySignature, - isProtoSetter: () => isProtoSetter, isPrototypeAccess: () => isPrototypeAccess, isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, isPunctuation: () => isPunctuation, @@ -7662,7 +7608,6 @@ __export(typescript_exports, { isQuestionOrExclamationToken: () => isQuestionOrExclamationToken, isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken, isQuestionToken: () => isQuestionToken, - isRawSourceMap: () => isRawSourceMap, isReadonlyKeyword: () => isReadonlyKeyword, isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken, isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment, @@ -7684,24 +7629,23 @@ __export(typescript_exports, { isRootedDiskPath: () => isRootedDiskPath, isSameEntityName: () => isSameEntityName, isSatisfiesExpression: () => isSatisfiesExpression, - isScopeMarker: () => isScopeMarker, isSemicolonClassElement: () => isSemicolonClassElement, isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, - isShebangTrivia: () => isShebangTrivia, isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, + isSideEffectImport: () => isSideEffectImport, isSignedNumericLiteral: () => isSignedNumericLiteral, isSimpleCopiableExpression: () => isSimpleCopiableExpression, isSimpleInlineableExpression: () => isSimpleInlineableExpression, - isSimpleParameter: () => isSimpleParameter, isSimpleParameterList: () => isSimpleParameterList, isSingleOrDoubleQuote: () => isSingleOrDoubleQuote, + isSolutionConfig: () => isSolutionConfig, + isSourceElement: () => isSourceElement, isSourceFile: () => isSourceFile, isSourceFileFromLibrary: () => isSourceFileFromLibrary, isSourceFileJS: () => isSourceFileJS, - isSourceFileNotJS: () => isSourceFileNotJS, isSourceFileNotJson: () => isSourceFileNotJson, isSourceMapping: () => isSourceMapping, isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, @@ -7714,7 +7658,6 @@ __export(typescript_exports, { isStatic: () => isStatic, isStaticModifier: () => isStaticModifier, isString: () => isString, - isStringAKeyword: () => isStringAKeyword, isStringANonContextualKeyword: () => isStringANonContextualKeyword, isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, isStringDoubleQuoted: () => isStringDoubleQuoted, @@ -7727,7 +7670,6 @@ __export(typescript_exports, { isStringTextContainingNode: () => isStringTextContainingNode, isSuperCall: () => isSuperCall, isSuperKeyword: () => isSuperKeyword, - isSuperOrSuperProperty: () => isSuperOrSuperProperty, isSuperProperty: () => isSuperProperty, isSupportedSourceFileName: () => isSupportedSourceFileName, isSwitchStatement: () => isSwitchStatement, @@ -7773,7 +7715,6 @@ __export(typescript_exports, { isTypeDeclaration: () => isTypeDeclaration, isTypeElement: () => isTypeElement, isTypeKeyword: () => isTypeKeyword, - isTypeKeywordToken: () => isTypeKeywordToken, isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, isTypeLiteralNode: () => isTypeLiteralNode, isTypeNode: () => isTypeNode, @@ -7809,7 +7750,6 @@ __export(typescript_exports, { isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, isVariableDeclarationList: () => isVariableDeclarationList, isVariableLike: () => isVariableLike, - isVariableLikeOrAccessor: () => isVariableLikeOrAccessor, isVariableStatement: () => isVariableStatement, isVoidExpression: () => isVoidExpression, isWatchSet: () => isWatchSet, @@ -7828,10 +7768,6 @@ __export(typescript_exports, { libMap: () => libMap, libs: () => libs, lineBreakPart: () => lineBreakPart, - linkNamePart: () => linkNamePart, - linkPart: () => linkPart, - linkTextPart: () => linkTextPart, - listFiles: () => listFiles, loadModuleFromGlobalCache: () => loadModuleFromGlobalCache, loadWithModeAwareCache: () => loadWithModeAwareCache, makeIdentifierFromModuleName: () => makeIdentifierFromModuleName, @@ -7841,7 +7777,6 @@ __export(typescript_exports, { map: () => map, mapAllOrFail: () => mapAllOrFail, mapDefined: () => mapDefined, - mapDefinedEntries: () => mapDefinedEntries, mapDefinedIterator: () => mapDefinedIterator, mapEntries: () => mapEntries, mapIterator: () => mapIterator, @@ -7851,18 +7786,20 @@ __export(typescript_exports, { matchPatternOrExact: () => matchPatternOrExact, matchedText: () => matchedText, matchesExclude: () => matchesExclude, + matchesExcludeWorker: () => matchesExcludeWorker, + maxBy: () => maxBy, maybeBind: () => maybeBind, maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages, memoize: () => memoize, - memoizeCached: () => memoizeCached, memoizeOne: () => memoizeOne, - memoizeWeak: () => memoizeWeak, - metadataHelper: () => metadataHelper, min: () => min, minAndMax: () => minAndMax, missingFileModifiedTime: () => missingFileModifiedTime, modifierToFlag: () => modifierToFlag, modifiersToFlags: () => modifiersToFlags, + moduleExportNameIsDefault: () => moduleExportNameIsDefault, + moduleExportNameTextEscaped: () => moduleExportNameTextEscaped, + moduleExportNameTextUnescaped: () => moduleExportNameTextUnescaped, moduleOptionDeclaration: () => moduleOptionDeclaration, moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter, @@ -7871,6 +7808,7 @@ __export(typescript_exports, { moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules, moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier, moduleSpecifiers: () => ts_moduleSpecifiers_exports, + moduleSupportsImportAttributes: () => moduleSupportsImportAttributes, moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier, moveEmitHelpers: () => moveEmitHelpers, moveRangeEnd: () => moveRangeEnd, @@ -7889,6 +7827,7 @@ __export(typescript_exports, { noTransformers: () => noTransformers, noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength, nodeCanBeDecorated: () => nodeCanBeDecorated, + nodeCoreModules: () => nodeCoreModules, nodeHasName: () => nodeHasName, nodeIsDecorated: () => nodeIsDecorated, nodeIsMissing: () => nodeIsMissing, @@ -7902,11 +7841,11 @@ __export(typescript_exports, { nodePosToString: () => nodePosToString, nodeSeenTracker: () => nodeSeenTracker, nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment, - nodeToDisplayParts: () => nodeToDisplayParts, noop: () => noop, noopFileWatcher: () => noopFileWatcher, normalizePath: () => normalizePath, normalizeSlashes: () => normalizeSlashes, + normalizeSpans: () => normalizeSpans, not: () => not, notImplemented: () => notImplemented, notImplementedResolver: () => notImplementedResolver, @@ -7921,13 +7860,11 @@ __export(typescript_exports, { optionsForBuild: () => optionsForBuild, optionsForWatch: () => optionsForWatch, optionsHaveChanges: () => optionsHaveChanges, - optionsHaveModuleResolutionChanges: () => optionsHaveModuleResolutionChanges, or: () => or, orderedRemoveItem: () => orderedRemoveItem, orderedRemoveItemAt: () => orderedRemoveItemAt, packageIdToPackageName: () => packageIdToPackageName, packageIdToString: () => packageIdToString, - paramHelper: () => paramHelper, parameterIsThisKeyword: () => parameterIsThisKeyword, parameterNamePart: () => parameterNamePart, parseBaseNodeFactory: () => parseBaseNodeFactory, @@ -7958,10 +7895,8 @@ __export(typescript_exports, { pathIsBareSpecifier: () => pathIsBareSpecifier, pathIsRelative: () => pathIsRelative, patternText: () => patternText, - perfLogger: () => perfLogger, performIncrementalCompilation: () => performIncrementalCompilation, performance: () => ts_performance_exports, - plainJSErrors: () => plainJSErrors, positionBelongsToNode: () => positionBelongsToNode, positionIsASICandidate: () => positionIsASICandidate, positionIsSynthesized: () => positionIsSynthesized, @@ -7974,7 +7909,6 @@ __export(typescript_exports, { programContainsEsModules: () => programContainsEsModules, programContainsModules: () => programContainsModules, projectReferenceIsEqualTo: () => projectReferenceIsEqualTo, - propKeyHelper: () => propKeyHelper, propertyNamePart: () => propertyNamePart, pseudoBigIntToString: () => pseudoBigIntToString, punctuationPart: () => punctuationPart, @@ -7997,7 +7931,6 @@ __export(typescript_exports, { rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine, readBuilderProgram: () => readBuilderProgram, readConfigFile: () => readConfigFile, - readHelper: () => readHelper, readJson: () => readJson, readJsonConfigFile: () => readJsonConfigFile, readJsonOrUndefined: () => readJsonOrUndefined, @@ -8008,7 +7941,7 @@ __export(typescript_exports, { reducePathComponents: () => reducePathComponents, refactor: () => ts_refactor_exports, regExpEscape: () => regExpEscape, - regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter, + regularExpressionFlagToCharacterCode: () => regularExpressionFlagToCharacterCode, relativeComplement: () => relativeComplement, removeAllComments: () => removeAllComments, removeEmitHelper: () => removeEmitHelper, @@ -8016,7 +7949,6 @@ __export(typescript_exports, { removeFileExtension: () => removeFileExtension, removeIgnoredPath: () => removeIgnoredPath, removeMinAndVersionNumbers: () => removeMinAndVersionNumbers, - removeOptionality: () => removeOptionality, removePrefix: () => removePrefix, removeSuffix: () => removeSuffix, removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator, @@ -8035,20 +7967,17 @@ __export(typescript_exports, { resolveTripleslashReference: () => resolveTripleslashReference, resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, resolvingEmptyArray: () => resolvingEmptyArray, - restHelper: () => restHelper, returnFalse: () => returnFalse, returnNoopFileWatcher: () => returnNoopFileWatcher, returnTrue: () => returnTrue, returnUndefined: () => returnUndefined, returnsPromise: () => returnsPromise, - runInitializersHelper: () => runInitializersHelper, + rewriteModuleSpecifier: () => rewriteModuleSpecifier, sameFlatMap: () => sameFlatMap, sameMap: () => sameMap, sameMapping: () => sameMapping, - scanShebangTrivia: () => scanShebangTrivia, scanTokenAtPosition: () => scanTokenAtPosition, scanner: () => scanner, - screenStartingMessageCodes: () => screenStartingMessageCodes, semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations, serializeCompilerOptions: () => serializeCompilerOptions, server: () => ts_server_exports4, @@ -8056,16 +7985,13 @@ __export(typescript_exports, { setCommentRange: () => setCommentRange, setConfigFileInOptions: () => setConfigFileInOptions, setConstantValue: () => setConstantValue, - setEachParent: () => setEachParent, setEmitFlags: () => setEmitFlags, - setFunctionNameHelper: () => setFunctionNameHelper, setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned, setIdentifierAutoGenerate: () => setIdentifierAutoGenerate, setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference, setIdentifierTypeArguments: () => setIdentifierTypeArguments, setInternalEmitFlags: () => setInternalEmitFlags, setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages, - setModuleDefaultHelper: () => setModuleDefaultHelper, setNodeChildren: () => setNodeChildren, setNodeFlags: () => setNodeFlags, setObjectAllocator: () => setObjectAllocator, @@ -8092,9 +8018,9 @@ __export(typescript_exports, { setValueDeclaration: () => setValueDeclaration, shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension, shouldPreserveConstEnums: () => shouldPreserveConstEnums, + shouldRewriteModuleSpecifier: () => shouldRewriteModuleSpecifier, shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules, showModuleSpecifier: () => showModuleSpecifier, - signatureHasLiteralTypes: () => signatureHasLiteralTypes, signatureHasRestParameter: () => signatureHasRestParameter, signatureToDisplayParts: () => signatureToDisplayParts, single: () => single, @@ -8103,18 +8029,17 @@ __export(typescript_exports, { singleOrMany: () => singleOrMany, singleOrUndefined: () => singleOrUndefined, skipAlias: () => skipAlias, - skipAssertions: () => skipAssertions, skipConstraint: () => skipConstraint, skipOuterExpressions: () => skipOuterExpressions, skipParentheses: () => skipParentheses, skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions, skipTrivia: () => skipTrivia, skipTypeChecking: () => skipTypeChecking, + skipTypeCheckingIgnoringNoCheck: () => skipTypeCheckingIgnoringNoCheck, skipTypeParentheses: () => skipTypeParentheses, skipWhile: () => skipWhile, sliceAfter: () => sliceAfter, some: () => some, - sort: () => sort, sortAndDeduplicate: () => sortAndDeduplicate, sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics, sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions, @@ -8123,8 +8048,6 @@ __export(typescript_exports, { sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart, spacePart: () => spacePart, spanMap: () => spanMap, - spreadArrayHelper: () => spreadArrayHelper, - stableSort: () => stableSort, startEndContainsRange: () => startEndContainsRange, startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd, startOnNewLine: () => startOnNewLine, @@ -8137,10 +8060,8 @@ __export(typescript_exports, { stringToToken: () => stringToToken, stripQuotes: () => stripQuotes, supportedDeclarationExtensions: () => supportedDeclarationExtensions, - supportedJSExtensions: () => supportedJSExtensions, supportedJSExtensionsFlat: () => supportedJSExtensionsFlat, supportedLocaleDirectories: () => supportedLocaleDirectories, - supportedTSExtensions: () => supportedTSExtensions, supportedTSExtensionsFlat: () => supportedTSExtensionsFlat, supportedTSImplementationExtensions: () => supportedTSImplementationExtensions, suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia, @@ -8149,16 +8070,13 @@ __export(typescript_exports, { symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault, symbolName: () => symbolName, symbolNameNoDefault: () => symbolNameNoDefault, - symbolPart: () => symbolPart, symbolToDisplayParts: () => symbolToDisplayParts, - syntaxMayBeASICandidate: () => syntaxMayBeASICandidate, - syntaxRequiresTrailingSemicolonOrASI: () => syntaxRequiresTrailingSemicolonOrASI, sys: () => sys, sysLog: () => sysLog, tagNamesAreEquivalent: () => tagNamesAreEquivalent, takeWhile: () => takeWhile, targetOptionDeclaration: () => targetOptionDeclaration, - templateObjectHelper: () => templateObjectHelper, + targetToLibMap: () => targetToLibMap, testFormatSettings: () => testFormatSettings, textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged, textChangeRangeNewSpan: () => textChangeRangeNewSpan, @@ -8166,7 +8084,10 @@ __export(typescript_exports, { textOrKeywordPart: () => textOrKeywordPart, textPart: () => textPart, textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive, + textRangeContainsTextSpan: () => textRangeContainsTextSpan, + textRangeIntersectsWithTextSpan: () => textRangeIntersectsWithTextSpan, textSpanContainsPosition: () => textSpanContainsPosition, + textSpanContainsTextRange: () => textSpanContainsTextRange, textSpanContainsTextSpan: () => textSpanContainsTextSpan, textSpanEnd: () => textSpanEnd, textSpanIntersection: () => textSpanIntersection, @@ -8184,15 +8105,16 @@ __export(typescript_exports, { toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit, toEditorSettings: () => toEditorSettings, toFileNameLowerCase: () => toFileNameLowerCase, - toLowerCase: () => toLowerCase, toPath: () => toPath, toProgramEmitPending: () => toProgramEmitPending, + toSorted: () => toSorted, tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword, tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan, tokenToString: () => tokenToString, trace: () => trace, tracing: () => tracing, tracingEnabled: () => tracingEnabled, + transferSourceFileChildren: () => transferSourceFileChildren, transform: () => transform, transformClassFields: () => transformClassFields, transformDeclarations: () => transformDeclarations, @@ -8207,11 +8129,11 @@ __export(typescript_exports, { transformESDecorators: () => transformESDecorators, transformESNext: () => transformESNext, transformGenerators: () => transformGenerators, + transformImpliedNodeFormatDependentModule: () => transformImpliedNodeFormatDependentModule, transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, transformNamedEvaluation: () => transformNamedEvaluation, - transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, transformTypeScript: () => transformTypeScript, @@ -8238,7 +8160,6 @@ __export(typescript_exports, { tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement, tryGetSourceMappingURL: () => tryGetSourceMappingURL, tryGetTextOfPropertyName: () => tryGetTextOfPropertyName, - tryIOAndConsumeErrors: () => tryIOAndConsumeErrors, tryParseJson: () => tryParseJson, tryParsePattern: () => tryParsePattern, tryParsePatterns: () => tryParsePatterns, @@ -8249,6 +8170,7 @@ __export(typescript_exports, { tryRemoveExtension: () => tryRemoveExtension, tryRemovePrefix: () => tryRemovePrefix, tryRemoveSuffix: () => tryRemoveSuffix, + tscBuildOption: () => tscBuildOption, typeAcquisitionDeclarations: () => typeAcquisitionDeclarations, typeAliasNamePart: () => typeAliasNamePart, typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo, @@ -8260,7 +8182,7 @@ __export(typescript_exports, { unescapeLeadingUnderscores: () => unescapeLeadingUnderscores, unmangleScopedPackageName: () => unmangleScopedPackageName, unorderedRemoveItem: () => unorderedRemoveItem, - unorderedRemoveItemAt: () => unorderedRemoveItemAt, + unprefixedNodeCoreModules: () => unprefixedNodeCoreModules, unreachableCodeIsError: () => unreachableCodeIsError, unsetNodeChildren: () => unsetNodeChildren, unusedLabelIsError: () => unusedLabelIsError, @@ -8273,11 +8195,9 @@ __export(typescript_exports, { updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher, updateSourceFile: () => updateSourceFile, updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories, - usesExtensionsOnImports: () => usesExtensionsOnImports, usingSingleLineStringWriter: () => usingSingleLineStringWriter, utf16EncodeAsString: () => utf16EncodeAsString, validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage, - valuesHelper: () => valuesHelper, version: () => version, versionMajorMinor: () => versionMajorMinor, visitArray: () => visitArray, @@ -8290,7 +8210,6 @@ __export(typescript_exports, { visitNodes: () => visitNodes2, visitParameterList: () => visitParameterList, walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns, - walkUpLexicalEnvironments: () => walkUpLexicalEnvironments, walkUpOuterExpressions: () => walkUpOuterExpressions, walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions, walkUpParenthesizedTypes: () => walkUpParenthesizedTypes, @@ -8304,8 +8223,8 @@ __export(typescript_exports, { module.exports = __toCommonJS(typescript_exports); // src/compiler/corePublic.ts -var versionMajorMinor = "5.5"; -var version = "5.5.3"; +var versionMajorMinor = "5.9"; +var version = "5.9.3"; var Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -8316,12 +8235,11 @@ var Comparison = /* @__PURE__ */ ((Comparison3) => { // src/compiler/core.ts var emptyArray = []; var emptyMap = /* @__PURE__ */ new Map(); -var emptySet = /* @__PURE__ */ new Set(); function length(array) { - return array ? array.length : 0; + return array !== void 0 ? array.length : 0; } function forEach(array, callback) { - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const result = callback(array[i], i); if (result) { @@ -8332,7 +8250,7 @@ function forEach(array, callback) { return void 0; } function forEachRight(array, callback) { - if (array) { + if (array !== void 0) { for (let i = array.length - 1; i >= 0; i--) { const result = callback(array[i], i); if (result) { @@ -8388,13 +8306,13 @@ function intersperse(input, element) { } const result = []; for (let i = 0, n = input.length; i < n; i++) { - if (i) result.push(element); + if (i !== 0) result.push(element); result.push(input[i]); } return result; } function every(array, callback) { - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { if (!callback(array[i], i)) { return false; @@ -8441,30 +8359,18 @@ function findLastIndex(array, predicate, startIndex) { } return -1; } -function findMap(array, callback) { - for (let i = 0; i < array.length; i++) { - const result = callback(array[i], i); - if (result) { - return result; - } - } - return Debug.fail(); -} function contains(array, value, equalityComparer = equateValues) { - if (array) { - for (const v of array) { - if (equalityComparer(v, value)) { + if (array !== void 0) { + for (let i = 0; i < array.length; i++) { + if (equalityComparer(array[i], value)) { return true; } } } return false; } -function arraysEqual(a, b, equalityComparer = equateValues) { - return a.length === b.length && a.every((x, i) => equalityComparer(x, b[i])); -} function indexOfAnyCharCode(text, charCodes, start) { - for (let i = start || 0; i < text.length; i++) { + for (let i = start ?? 0; i < text.length; i++) { if (contains(charCodes, text.charCodeAt(i))) { return i; } @@ -8473,7 +8379,7 @@ function indexOfAnyCharCode(text, charCodes, start) { } function countWhere(array, predicate) { let count = 0; - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const v = array[i]; if (predicate(v, i)) { @@ -8484,7 +8390,7 @@ function countWhere(array, predicate) { return count; } function filter(array, f) { - if (array) { + if (array !== void 0) { const len = array.length; let i = 0; while (i < len && f(array[i])) i++; @@ -8518,7 +8424,7 @@ function clear(array) { } function map(array, f) { let result; - if (array) { + if (array !== void 0) { result = []; for (let i = 0; i < array.length; i++) { result.push(f(array[i], i)); @@ -8532,7 +8438,7 @@ function* mapIterator(iter, mapFn) { } } function sameMap(array, f) { - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const item = array[i]; const mapped = f(item, i); @@ -8550,7 +8456,8 @@ function sameMap(array, f) { } function flatten(array) { const result = []; - for (const v of array) { + for (let i = 0; i < array.length; i++) { + const v = array[i]; if (v) { if (isArray(v)) { addRange(result, v); @@ -8563,7 +8470,7 @@ function flatten(array) { } function flatMap(array, mapfn) { let result; - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const v = mapfn(array[i], i); if (v) { @@ -8575,11 +8482,11 @@ function flatMap(array, mapfn) { } } } - return result || emptyArray; + return result ?? emptyArray; } function flatMapToMutable(array, mapfn) { const result = []; - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const v = mapfn(array[i], i); if (v) { @@ -8602,7 +8509,7 @@ function* flatMapIterator(iter, mapfn) { } function sameFlatMap(array, mapfn) { let result; - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const item = array[i]; const mapped = mapfn(item, i); @@ -8618,7 +8525,7 @@ function sameFlatMap(array, mapfn) { } } } - return result || array; + return result ?? array; } function mapAllOrFail(array, mapFn) { const result = []; @@ -8633,7 +8540,7 @@ function mapAllOrFail(array, mapFn) { } function mapDefined(array, mapFn) { const result = []; - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const mapped = mapFn(array[i], i); if (mapped !== void 0) { @@ -8651,22 +8558,6 @@ function* mapDefinedIterator(iter, mapFn) { } } } -function mapDefinedEntries(map2, f) { - if (!map2) { - return void 0; - } - const result = /* @__PURE__ */ new Map(); - map2.forEach((value, key) => { - const entry = f(key, value); - if (entry !== void 0) { - const [newKey, newValue] = entry; - if (newKey !== void 0 && newValue !== void 0) { - result.set(newKey, newValue); - } - } - }); - return result; -} function getOrUpdate(map2, key, callback) { if (map2.has(key)) { return map2.get(key); @@ -8687,7 +8578,7 @@ function* singleIterator(value) { } function spanMap(array, keyfn, mapfn) { let result; - if (array) { + if (array !== void 0) { result = []; const len = array.length; let previousKey; @@ -8719,7 +8610,7 @@ function spanMap(array, keyfn, mapfn) { return result; } function mapEntries(map2, f) { - if (!map2) { + if (map2 === void 0) { return void 0; } const result = /* @__PURE__ */ new Map(); @@ -8730,10 +8621,10 @@ function mapEntries(map2, f) { return result; } function some(array, predicate) { - if (array) { - if (predicate) { - for (const v of array) { - if (predicate(v)) { + if (array !== void 0) { + if (predicate !== void 0) { + for (let i = 0; i < array.length; i++) { + if (predicate(array[i])) { return true; } } @@ -8758,8 +8649,8 @@ function getRangesWhere(arr, pred, cb) { if (start !== void 0) cb(start, arr.length); } function concatenate(array1, array2) { - if (!some(array2)) return array1; - if (!some(array1)) return array2; + if (array2 === void 0 || array2.length === 0) return array1; + if (array1 === void 0 || array1.length === 0) return array2; return [...array1, ...array2]; } function selectIndex(_, i) { @@ -8786,8 +8677,8 @@ function deduplicateRelational(array, equalityComparer, comparer) { } function deduplicateEquality(array, equalityComparer) { const result = []; - for (const item of array) { - pushIfUnique(result, item, equalityComparer); + for (let i = 0; i < array.length; i++) { + pushIfUnique(result, array[i], equalityComparer); } return result; } @@ -8801,7 +8692,10 @@ function deduplicateSorted(array, comparer) { for (let i = 1; i < array.length; i++) { const next = array[i]; switch (comparer(next, last2)) { + // equality comparison case true: + // relational comparison + // falls through case 0 /* EqualTo */: continue; case -1 /* LessThan */: @@ -8841,19 +8735,10 @@ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates) return false; } function sortAndDeduplicate(array, comparer, equalityComparer) { - return deduplicateSorted(sort(array, comparer), equalityComparer || comparer || compareStringsCaseSensitive); -} -function arrayIsSorted(array, comparer) { - if (array.length < 2) return true; - for (let i = 1, len = array.length; i < len; i++) { - if (comparer(array[i - 1], array[i]) === 1 /* GreaterThan */) { - return false; - } - } - return true; + return deduplicateSorted(toSorted(array, comparer), equalityComparer ?? comparer ?? compareStringsCaseSensitive); } function arrayIsEqualTo(array1, array2, equalityComparer = equateValues) { - if (!array1 || !array2) { + if (array1 === void 0 || array2 === void 0) { return array1 === array2; } if (array1.length !== array2.length) { @@ -8868,20 +8753,18 @@ function arrayIsEqualTo(array1, array2, equalityComparer = equateValues) { } function compact(array) { let result; - if (array) { + if (array !== void 0) { for (let i = 0; i < array.length; i++) { const v = array[i]; - if (result || !v) { - if (!result) { - result = array.slice(0, i); - } + if (result ?? !v) { + result ?? (result = array.slice(0, i)); if (v) { result.push(v); } } } } - return result || array; + return result ?? array; } function relativeComplement(arrayA, arrayB, comparer) { if (!arrayB || !arrayA || arrayB.length === 0 || arrayA.length === 0) return arrayB; @@ -8946,7 +8829,7 @@ function pushIfUnique(array, toAdd, equalityComparer) { } } function appendIfUnique(array, toAdd, equalityComparer) { - if (array) { + if (array !== void 0) { pushIfUnique(array, toAdd, equalityComparer); return array; } else { @@ -8956,19 +8839,14 @@ function appendIfUnique(array, toAdd, equalityComparer) { function stableSortIndices(array, indices, comparer) { indices.sort((x, y) => comparer(array[x], array[y]) || compareValues(x, y)); } -function sort(array, comparer) { - return array.length === 0 ? array : array.slice().sort(comparer); +function toSorted(array, comparer) { + return array.length === 0 ? emptyArray : array.slice().sort(comparer); } function* arrayReverseIterator(array) { for (let i = array.length - 1; i >= 0; i--) { yield array[i]; } } -function stableSort(array, comparer) { - const indices = indicesOf(array); - stableSortIndices(array, indices, comparer); - return indices.map((i) => array[i]); -} function rangeEquals(array1, array2, pos, end) { while (pos < end) { if (array1[pos] !== array2[pos]) { @@ -8979,7 +8857,7 @@ function rangeEquals(array1, array2, pos, end) { return true; } var elementAt = !!Array.prototype.at ? (array, offset) => array == null ? void 0 : array.at(offset) : (array, offset) => { - if (array) { + if (array !== void 0) { offset = toOffset(array, offset); if (offset < array.length) { return array[offset]; @@ -8991,7 +8869,7 @@ function firstOrUndefined(array) { return array === void 0 || array.length === 0 ? void 0 : array[0]; } function firstOrUndefinedIterator(iter) { - if (iter) { + if (iter !== void 0) { for (const value of iter) { return value; } @@ -9016,13 +8894,13 @@ function last(array) { return array[array.length - 1]; } function singleOrUndefined(array) { - return array && array.length === 1 ? array[0] : void 0; + return array !== void 0 && array.length === 1 ? array[0] : void 0; } function single(array) { return Debug.checkDefined(singleOrUndefined(array)); } function singleOrMany(array) { - return array && array.length === 1 ? array[0] : array; + return array !== void 0 && array.length === 1 ? array[0] : array; } function replaceElement(array, index, value) { const result = array.slice(0); @@ -9036,7 +8914,7 @@ function binarySearchKey(array, key, keySelector, keyComparer, offset) { if (!some(array)) { return -1; } - let low = offset || 0; + let low = offset ?? 0; let high = array.length - 1; while (low <= high) { const middle = low + (high - low >> 1); @@ -9154,7 +9032,8 @@ function equalOwnProperties(left, right, equalityComparer = equateValues) { } function arrayToMap(array, makeKey, makeValue = identity) { const result = /* @__PURE__ */ new Map(); - for (const value of array) { + for (let i = 0; i < array.length; i++) { + const value = array[i]; const key = makeKey(value); if (key !== void 0) result.set(key, makeValue(value)); } @@ -9162,14 +9041,16 @@ function arrayToMap(array, makeKey, makeValue = identity) { } function arrayToNumericMap(array, makeKey, makeValue = identity) { const result = []; - for (const value of array) { + for (let i = 0; i < array.length; i++) { + const value = array[i]; result[makeKey(value)] = makeValue(value); } return result; } function arrayToMultiMap(values, makeKey, makeValue = identity) { const result = createMultiMap(); - for (const value of values) { + for (let i = 0; i < values.length; i++) { + const value = values[i]; result.add(makeKey(value), makeValue(value)); } return result; @@ -9179,8 +9060,9 @@ function group(values, getGroupId, resultSelector = identity) { } function groupBy(values, keySelector) { const result = {}; - if (values) { - for (const value of values) { + if (values !== void 0) { + for (let i = 0; i < values.length; i++) { + const value = values[i]; const key = `${keySelector(value)}`; const array = result[key] ?? (result[key] = []); array.push(value); @@ -9219,7 +9101,7 @@ function copyProperties(first2, second) { } } function maybeBind(obj, fn) { - return fn ? fn.bind(obj) : void 0; + return fn == null ? void 0 : fn.bind(obj); } function createMultiMap() { const map2 = /* @__PURE__ */ new Map(); @@ -9229,7 +9111,7 @@ function createMultiMap() { } function multiMapAdd(key, value) { let values = this.get(key); - if (values) { + if (values !== void 0) { values.push(value); } else { this.set(key, values = [value]); @@ -9238,7 +9120,7 @@ function multiMapAdd(key, value) { } function multiMapRemove(key, value) { const values = this.get(key); - if (values) { + if (values !== void 0) { unorderedRemoveItem(values, value); if (!values.length) { this.delete(key); @@ -9246,7 +9128,7 @@ function multiMapRemove(key, value) { } } function createQueue(items) { - const elements = (items == null ? void 0 : items.slice()) || []; + const elements = (items == null ? void 0 : items.slice()) ?? []; let headIndex = 0; function isEmpty() { return headIndex === elements.length; @@ -9297,13 +9179,8 @@ function createSet(getHashCode, equals) { const hash = getHashCode(element); if (!multiMap.has(hash)) return false; const candidates = multiMap.get(hash); - if (!isArray(candidates)) return equals(candidates, element); - for (const candidate of candidates) { - if (equals(candidate, element)) { - return true; - } - } - return false; + if (isArray(candidates)) return contains(candidates, element, equals); + return equals(candidates, element); }, add(element) { const hash = getHashCode(element); @@ -9457,46 +9334,6 @@ function memoizeOne(callback) { return value; }; } -function memoizeWeak(callback) { - const map2 = /* @__PURE__ */ new WeakMap(); - return (arg) => { - let value = map2.get(arg); - if (value === void 0 && !map2.has(arg)) { - value = callback(arg); - map2.set(arg, value); - } - return value; - }; -} -function memoizeCached(callback, cache) { - return (...args) => { - let value = cache.get(args); - if (value === void 0 && !cache.has(args)) { - value = callback(...args); - cache.set(args, value); - } - return value; - }; -} -function compose(a, b, c, d, e) { - if (!!e) { - const args = []; - for (let i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - return (t) => reduceLeft(args, (u, f) => f(u), t); - } else if (d) { - return (t) => d(c(b(a(t)))); - } else if (c) { - return (t) => c(b(a(t))); - } else if (b) { - return (t) => b(a(t)); - } else if (a) { - return (t) => a(t); - } else { - return (t) => t; - } -} var AssertionLevel = /* @__PURE__ */ ((AssertionLevel2) => { AssertionLevel2[AssertionLevel2["None"] = 0] = "None"; AssertionLevel2[AssertionLevel2["Normal"] = 1] = "Normal"; @@ -9522,6 +9359,12 @@ function compareValues(a, b) { function compareTextSpans(a, b) { return compareValues(a == null ? void 0 : a.start, b == null ? void 0 : b.start) || compareValues(a == null ? void 0 : a.length, b == null ? void 0 : b.length); } +function maxBy(arr, init, mapper) { + for (let i = 0; i < arr.length; i++) { + init = Math.max(init, mapper(arr[i])); + } + return init; +} function min(items, compare) { return reduceLeft(items, (x, y) => compare(x, y) === -1 /* LessThan */ ? x : y); } @@ -9573,8 +9416,8 @@ function setUILocale(value) { } } function compareStringsCaseSensitiveUI(a, b) { - const comparer = uiComparerCaseSensitive || (uiComparerCaseSensitive = createUIStringComparer(uiLocale)); - return comparer(a, b); + uiComparerCaseSensitive ?? (uiComparerCaseSensitive = createUIStringComparer(uiLocale)); + return uiComparerCaseSensitive(a, b); } function compareProperties(a, b, key, comparer) { return a === b ? 0 /* EqualTo */ : a === void 0 ? -1 /* LessThan */ : b === void 0 ? 1 /* GreaterThan */ : comparer(a[key], b[key]); @@ -9734,9 +9577,10 @@ function matchedText(pattern, candidate) { function findBestPatternMatch(values, getPattern, candidate) { let matchedValue; let longestMatchPrefixLength = -1; - for (const v of values) { + for (let i = 0; i < values.length; i++) { + const v = values[i]; const pattern = getPattern(v); - if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) { + if (pattern.prefix.length > longestMatchPrefixLength && isPatternMatch(pattern, candidate)) { longestMatchPrefixLength = pattern.prefix.length; matchedValue = v; } @@ -9779,7 +9623,7 @@ function singleElementArray(t) { return t === void 0 ? void 0 : [t]; } function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, deleted, unchanged) { - unchanged = unchanged || noop; + unchanged ?? (unchanged = noop); let newIndex = 0; let oldIndex = 0; const newLen = newItems.length; @@ -9841,7 +9685,7 @@ function cartesianProductWorker(arrays, result, outer, index) { } } function takeWhile(array, predicate) { - if (array) { + if (array !== void 0) { const len = array.length; let index = 0; while (index < len && predicate(array[index])) { @@ -9851,7 +9695,7 @@ function takeWhile(array, predicate) { } } function skipWhile(array, predicate) { - if (array) { + if (array !== void 0) { const len = array.length; let index = 0; while (index < len && predicate(array[index])) { @@ -10147,7 +9991,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, result.push([value, name]); } } - const sorted = stableSort(result, (x, y) => compareValues(x[0], y[0])); + const sorted = toSorted(result, (x, y) => compareValues(x[0], y[0])); enumMemberCache.set(enumObject, sorted); return sorted; } @@ -10356,7 +10200,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, Object.defineProperties(array, { __tsDebuggerDisplay: { value(defaultValue) { - defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]"); + defaultValue = String(defaultValue).replace(/(?:,[\s\w]+:[^,]+)+\]$/, "]"); return `NodeArray ${defaultValue}`; } } @@ -10776,7 +10620,7 @@ m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`; } function renderGraph() { const columnCount = columnWidths.length; - const laneCount = nodes.reduce((x, n) => Math.max(x, n.lane), 0) + 1; + const laneCount = maxBy(nodes, 0, (n) => n.lane) + 1; const lanes = fill(Array(laneCount), ""); const grid = columnWidths.map(() => Array(laneCount)); const connectors = columnWidths.map(() => fill(Array(laneCount), 0)); @@ -10899,7 +10743,7 @@ var prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z- var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; var buildPartRegExp = /^[a-z0-9-]+$/i; -var numericIdentifierRegExp = /^(0|[1-9]\d*)$/; +var numericIdentifierRegExp = /^(?:0|[1-9]\d*)$/; var _Version = class _Version { constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") { if (typeof major === "string") { @@ -11022,11 +10866,11 @@ var VersionRange = class _VersionRange { return formatDisjunction(this._alternatives); } }; -var logicalOrRegExp = /\|\|/g; -var whitespaceRegExp = /\s+/g; -var partialRegExp = /^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; +var logicalOrRegExp = /\|\|/; +var whitespaceRegExp = /\s+/; +var partialRegExp = /^([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i; -var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; +var rangeRegExp = /^([~^<>=]|<=|>=)?\s*([a-z0-9-+.*]+)$/i; function parseRange(text) { const alternatives = []; for (let range of text.trim().split(logicalOrRegExp)) { @@ -11178,10 +11022,12 @@ function tryGetPerformance() { if (isNodeLikeSystem()) { try { const { performance: performance2 } = require("perf_hooks"); - return { - shouldWriteNativeEvents: false, - performance: performance2 - }; + if (performance2) { + return { + shouldWriteNativeEvents: false, + performance: performance2 + }; + } } catch { } } @@ -11217,16 +11063,6 @@ function tryGetNativePerformanceHooks() { } var timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now; -// src/compiler/perfLogger.ts -var etwModule; -try { - const etwModulePath = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw"; - etwModule = require(etwModulePath); -} catch (e) { - etwModule = void 0; -} -var perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0; - // src/compiler/_namespaces/ts.performance.ts var ts_performance_exports = {}; __export(ts_performance_exports, { @@ -11789,201 +11625,203 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 163] = "BigIntKeyword"; SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 164] = "OverrideKeyword"; SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 220] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 221] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 222] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 223] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 226] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 227] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 228] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 229] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 230] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 231] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 232] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 234] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 235] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 236] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 237] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 238] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 239] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 240] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 241] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 242] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 243] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 244] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 245] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 246] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 247] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 248] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 249] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 250] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 251] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 252] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 253] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 254] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 255] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 256] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 257] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 258] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 259] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 260] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 261] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 262] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 263] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 266] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 267] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 268] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 269] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 272] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 273] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 274] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 275] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 276] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 277] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 278] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 279] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 280] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 281] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 282] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 283] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 284] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 286] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 287] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 288] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 290] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 291] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 292] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 294] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 295] = "JsxNamespacedName"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 296] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; - SyntaxKind5[SyntaxKind5["ImportAttributes"] = 300] = "ImportAttributes"; - SyntaxKind5[SyntaxKind5["ImportAttribute"] = 301] = "ImportAttribute"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 305] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 306] = "EnumMember"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 307] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 308] = "Bundle"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 309] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 310] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 311] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 312] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 313] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 314] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 315] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 316] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 317] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 318] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 319] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 320] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 320 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 321] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 322] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 323] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 324] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 325] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 326] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 327] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 328] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 329] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 330] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 331] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 332] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 333] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 334] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 335] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 336] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 337] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 338] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 339] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 340] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 341] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 342] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 343] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 344] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 345] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 346] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 347] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 348] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 349] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 350] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["JSDocImportTag"] = 351] = "JSDocImportTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 352] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 353] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 354] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 355] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 356] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 357] = "Count"; + SyntaxKind5[SyntaxKind5["DeferKeyword"] = 166] = "DeferKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 167] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 168] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 169] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 170] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 171] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 172] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 173] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 174] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 175] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 177] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 178] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 179] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 180] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 181] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 182] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 183] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 184] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 185] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 186] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 187] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 188] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 189] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 190] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 191] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 192] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 193] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 194] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 195] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 196] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 197] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 198] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 199] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 200] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 201] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 202] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 203] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 204] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 206] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 207] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 208] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 209] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 212] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 213] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 214] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 215] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 217] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 218] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 219] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 220] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 221] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 222] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 223] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 224] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 227] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 228] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 229] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 230] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 231] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 232] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 233] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 235] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 236] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 237] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 238] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 239] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 240] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 241] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 242] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 243] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 244] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 245] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 246] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 247] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 248] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 249] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 250] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 251] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 252] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 253] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 254] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 255] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 256] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 257] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 258] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 259] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 260] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 261] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 262] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 263] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 264] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 265] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 267] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 268] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 269] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 270] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 273] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 274] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 275] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 276] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 277] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 278] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 279] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 280] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 281] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 282] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 283] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 284] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 285] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 287] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 288] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 289] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 290] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 291] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 292] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 293] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 295] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 296] = "JsxNamespacedName"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 297] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 298] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 299] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 300] = "CatchClause"; + SyntaxKind5[SyntaxKind5["ImportAttributes"] = 301] = "ImportAttributes"; + SyntaxKind5[SyntaxKind5["ImportAttribute"] = 302] = "ImportAttribute"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 301 /* ImportAttributes */] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 302 /* ImportAttribute */] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 303] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 304] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 305] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 306] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 307] = "EnumMember"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 308] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 309] = "Bundle"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 310] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 311] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 312] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 313] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 314] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 315] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 316] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 317] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 318] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 319] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 320] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 321] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 321 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 322] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 323] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 324] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 325] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 326] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 327] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 328] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 329] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 330] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 331] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 332] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 333] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 334] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 335] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 336] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 337] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 338] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 339] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 340] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 341] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 342] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 343] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 344] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 345] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 346] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 347] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 348] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 349] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 350] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 351] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["JSDocImportTag"] = 352] = "JSDocImportTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 353] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 354] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["NotEmittedTypeElement"] = 355] = "NotEmittedTypeElement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 356] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 357] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 358] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 359] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -11991,15 +11829,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 166 /* DeferKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 183 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 206 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 166 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; @@ -12008,15 +11846,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 309 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 351 /* JSDocImportTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 327 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 351 /* JSDocImportTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 244 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 260 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 167 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 310 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 352 /* JSDocImportTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 328 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 352 /* JSDocImportTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 166 /* LastKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { @@ -12115,12 +11953,21 @@ var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => { RelationComparisonResult3[RelationComparisonResult3["None"] = 0] = "None"; RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded"; RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed"; - RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported"; RelationComparisonResult3[RelationComparisonResult3["ReportsUnmeasurable"] = 8] = "ReportsUnmeasurable"; RelationComparisonResult3[RelationComparisonResult3["ReportsUnreliable"] = 16] = "ReportsUnreliable"; RelationComparisonResult3[RelationComparisonResult3["ReportsMask"] = 24] = "ReportsMask"; + RelationComparisonResult3[RelationComparisonResult3["ComplexityOverflow"] = 32] = "ComplexityOverflow"; + RelationComparisonResult3[RelationComparisonResult3["StackDepthOverflow"] = 64] = "StackDepthOverflow"; + RelationComparisonResult3[RelationComparisonResult3["Overflow"] = 96] = "Overflow"; return RelationComparisonResult3; })(RelationComparisonResult || {}); +var PredicateSemantics = /* @__PURE__ */ ((PredicateSemantics2) => { + PredicateSemantics2[PredicateSemantics2["None"] = 0] = "None"; + PredicateSemantics2[PredicateSemantics2["Always"] = 1] = "Always"; + PredicateSemantics2[PredicateSemantics2["Never"] = 2] = "Never"; + PredicateSemantics2[PredicateSemantics2["Sometimes"] = 3] = "Sometimes"; + return PredicateSemantics2; +})(PredicateSemantics || {}); var GeneratedIdentifierFlags = /* @__PURE__ */ ((GeneratedIdentifierFlags2) => { GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["None"] = 0] = "None"; GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Auto"] = 1] = "Auto"; @@ -12165,6 +12012,7 @@ var TokenFlags = /* @__PURE__ */ ((TokenFlags2) => { TokenFlags2[TokenFlags2["HexEscape"] = 4096] = "HexEscape"; TokenFlags2[TokenFlags2["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero"; TokenFlags2[TokenFlags2["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator"; + TokenFlags2[TokenFlags2["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks"; TokenFlags2[TokenFlags2["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; TokenFlags2[TokenFlags2["WithSpecifier"] = 448] = "WithSpecifier"; TokenFlags2[TokenFlags2["StringLiteralFlags"] = 7176] = "StringLiteralFlags"; @@ -12219,6 +12067,7 @@ var FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagno var EmitOnly = /* @__PURE__ */ ((EmitOnly4) => { EmitOnly4[EmitOnly4["Js"] = 0] = "Js"; EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts"; + EmitOnly4[EmitOnly4["BuilderSignature"] = 2] = "BuilderSignature"; return EmitOnly4; })(EmitOnly || {}); var StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => { @@ -12288,17 +12137,21 @@ var NodeBuilderFlags = /* @__PURE__ */ ((NodeBuilderFlags2) => { NodeBuilderFlags2[NodeBuilderFlags2["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; NodeBuilderFlags2[NodeBuilderFlags2["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; NodeBuilderFlags2[NodeBuilderFlags2["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; - NodeBuilderFlags2[NodeBuilderFlags2["WriteComputedProps"] = 1073741824] = "WriteComputedProps"; - NodeBuilderFlags2[NodeBuilderFlags2["NoSyntacticPrinter"] = -2147483648] = "NoSyntacticPrinter"; NodeBuilderFlags2[NodeBuilderFlags2["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; - NodeBuilderFlags2[NodeBuilderFlags2["DoNotIncludeSymbolChain"] = 134217728] = "DoNotIncludeSymbolChain"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowUnresolvedNames"] = 1] = "AllowUnresolvedNames"; NodeBuilderFlags2[NodeBuilderFlags2["IgnoreErrors"] = 70221824] = "IgnoreErrors"; NodeBuilderFlags2[NodeBuilderFlags2["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; NodeBuilderFlags2[NodeBuilderFlags2["InTypeAlias"] = 8388608] = "InTypeAlias"; NodeBuilderFlags2[NodeBuilderFlags2["InInitialEntityName"] = 16777216] = "InInitialEntityName"; return NodeBuilderFlags2; })(NodeBuilderFlags || {}); +var InternalNodeBuilderFlags = /* @__PURE__ */ ((InternalNodeBuilderFlags2) => { + InternalNodeBuilderFlags2[InternalNodeBuilderFlags2["None"] = 0] = "None"; + InternalNodeBuilderFlags2[InternalNodeBuilderFlags2["WriteComputedProps"] = 1] = "WriteComputedProps"; + InternalNodeBuilderFlags2[InternalNodeBuilderFlags2["NoSyntacticPrinter"] = 2] = "NoSyntacticPrinter"; + InternalNodeBuilderFlags2[InternalNodeBuilderFlags2["DoNotIncludeSymbolChain"] = 4] = "DoNotIncludeSymbolChain"; + InternalNodeBuilderFlags2[InternalNodeBuilderFlags2["AllowUnresolvedNames"] = 8] = "AllowUnresolvedNames"; + return InternalNodeBuilderFlags2; +})(InternalNodeBuilderFlags || {}); var TypeFormatFlags = /* @__PURE__ */ ((TypeFormatFlags2) => { TypeFormatFlags2[TypeFormatFlags2["None"] = 0] = "None"; TypeFormatFlags2[TypeFormatFlags2["NoTruncation"] = 1] = "NoTruncation"; @@ -12343,11 +12196,6 @@ var SymbolAccessibility = /* @__PURE__ */ ((SymbolAccessibility2) => { SymbolAccessibility2[SymbolAccessibility2["NotResolved"] = 3] = "NotResolved"; return SymbolAccessibility2; })(SymbolAccessibility || {}); -var SyntheticSymbolKind = /* @__PURE__ */ ((SyntheticSymbolKind2) => { - SyntheticSymbolKind2[SyntheticSymbolKind2["UnionOrIntersection"] = 0] = "UnionOrIntersection"; - SyntheticSymbolKind2[SyntheticSymbolKind2["Spread"] = 1] = "Spread"; - return SyntheticSymbolKind2; -})(SyntheticSymbolKind || {}); var TypePredicateKind = /* @__PURE__ */ ((TypePredicateKind2) => { TypePredicateKind2[TypePredicateKind2["This"] = 0] = "This"; TypePredicateKind2[TypePredicateKind2["Identifier"] = 1] = "Identifier"; @@ -12513,6 +12361,7 @@ var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags3) => { NodeCheckFlags3[NodeCheckFlags3["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers"; NodeCheckFlags3[NodeCheckFlags3["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer"; NodeCheckFlags3[NodeCheckFlags3["InCheckIdentifier"] = 4194304] = "InCheckIdentifier"; + NodeCheckFlags3[NodeCheckFlags3["PartiallyTypeChecked"] = 8388608] = "PartiallyTypeChecked"; NodeCheckFlags3[NodeCheckFlags3["LazyFlags"] = 539358128] = "LazyFlags"; return NodeCheckFlags3; })(NodeCheckFlags || {}); @@ -12613,6 +12462,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => { ObjectFlags3[ObjectFlags3["NonInferrableType"] = 262144] = "NonInferrableType"; ObjectFlags3[ObjectFlags3["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed"; ObjectFlags3[ObjectFlags3["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables"; + ObjectFlags3[ObjectFlags3["SingleSignatureType"] = 134217728] = "SingleSignatureType"; ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface"; ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening"; ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags"; @@ -12621,7 +12471,6 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => { ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread"; ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType"; ObjectFlags3[ObjectFlags3["InstantiationExpressionType"] = 8388608] = "InstantiationExpressionType"; - ObjectFlags3[ObjectFlags3["SingleSignatureType"] = 134217728] = "SingleSignatureType"; ObjectFlags3[ObjectFlags3["IsClassInstanceClone"] = 16777216] = "IsClassInstanceClone"; ObjectFlags3[ObjectFlags3["IdenticalBaseTypeCalculated"] = 33554432] = "IdenticalBaseTypeCalculated"; ObjectFlags3[ObjectFlags3["IdenticalBaseTypeExists"] = 67108864] = "IdenticalBaseTypeExists"; @@ -12666,7 +12515,7 @@ var AccessFlags = /* @__PURE__ */ ((AccessFlags2) => { AccessFlags2[AccessFlags2["NoIndexSignatures"] = 2] = "NoIndexSignatures"; AccessFlags2[AccessFlags2["Writing"] = 4] = "Writing"; AccessFlags2[AccessFlags2["CacheSymbol"] = 8] = "CacheSymbol"; - AccessFlags2[AccessFlags2["NoTupleBoundsCheck"] = 16] = "NoTupleBoundsCheck"; + AccessFlags2[AccessFlags2["AllowMissing"] = 16] = "AllowMissing"; AccessFlags2[AccessFlags2["ExpressionPosition"] = 32] = "ExpressionPosition"; AccessFlags2[AccessFlags2["ReportDeprecated"] = 64] = "ReportDeprecated"; AccessFlags2[AccessFlags2["SuppressNoImplicitAnyError"] = 128] = "SuppressNoImplicitAnyError"; @@ -12825,6 +12674,8 @@ var ModuleKind = /* @__PURE__ */ ((ModuleKind3) => { ModuleKind3[ModuleKind3["ES2022"] = 7] = "ES2022"; ModuleKind3[ModuleKind3["ESNext"] = 99] = "ESNext"; ModuleKind3[ModuleKind3["Node16"] = 100] = "Node16"; + ModuleKind3[ModuleKind3["Node18"] = 101] = "Node18"; + ModuleKind3[ModuleKind3["Node20"] = 102] = "Node20"; ModuleKind3[ModuleKind3["NodeNext"] = 199] = "NodeNext"; ModuleKind3[ModuleKind3["Preserve"] = 200] = "Preserve"; return ModuleKind3; @@ -12860,22 +12711,23 @@ var ScriptKind = /* @__PURE__ */ ((ScriptKind7) => { ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred"; return ScriptKind7; })(ScriptKind || {}); -var ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => { - ScriptTarget11[ScriptTarget11["ES3"] = 0] = "ES3"; - ScriptTarget11[ScriptTarget11["ES5"] = 1] = "ES5"; - ScriptTarget11[ScriptTarget11["ES2015"] = 2] = "ES2015"; - ScriptTarget11[ScriptTarget11["ES2016"] = 3] = "ES2016"; - ScriptTarget11[ScriptTarget11["ES2017"] = 4] = "ES2017"; - ScriptTarget11[ScriptTarget11["ES2018"] = 5] = "ES2018"; - ScriptTarget11[ScriptTarget11["ES2019"] = 6] = "ES2019"; - ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020"; - ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021"; - ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022"; - ScriptTarget11[ScriptTarget11["ES2023"] = 10] = "ES2023"; - ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext"; - ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON"; - ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest"; - return ScriptTarget11; +var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => { + ScriptTarget12[ScriptTarget12["ES3"] = 0] = "ES3"; + ScriptTarget12[ScriptTarget12["ES5"] = 1] = "ES5"; + ScriptTarget12[ScriptTarget12["ES2015"] = 2] = "ES2015"; + ScriptTarget12[ScriptTarget12["ES2016"] = 3] = "ES2016"; + ScriptTarget12[ScriptTarget12["ES2017"] = 4] = "ES2017"; + ScriptTarget12[ScriptTarget12["ES2018"] = 5] = "ES2018"; + ScriptTarget12[ScriptTarget12["ES2019"] = 6] = "ES2019"; + ScriptTarget12[ScriptTarget12["ES2020"] = 7] = "ES2020"; + ScriptTarget12[ScriptTarget12["ES2021"] = 8] = "ES2021"; + ScriptTarget12[ScriptTarget12["ES2022"] = 9] = "ES2022"; + ScriptTarget12[ScriptTarget12["ES2023"] = 10] = "ES2023"; + ScriptTarget12[ScriptTarget12["ES2024"] = 11] = "ES2024"; + ScriptTarget12[ScriptTarget12["ESNext"] = 99] = "ESNext"; + ScriptTarget12[ScriptTarget12["JSON"] = 100] = "JSON"; + ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest"; + return ScriptTarget12; })(ScriptTarget || {}); var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => { LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard"; @@ -13148,43 +13000,42 @@ var InternalEmitFlags = /* @__PURE__ */ ((InternalEmitFlags3) => { InternalEmitFlags3[InternalEmitFlags3["TransformPrivateStaticElements"] = 32] = "TransformPrivateStaticElements"; return InternalEmitFlags3; })(InternalEmitFlags || {}); -var LanguageFeatureMinimumTarget = /* @__PURE__ */ ((LanguageFeatureMinimumTarget2) => { - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["Classes"] = 2 /* ES2015 */] = "Classes"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ForOf"] = 2 /* ES2015 */] = "ForOf"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["Generators"] = 2 /* ES2015 */] = "Generators"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["Iteration"] = 2 /* ES2015 */] = "Iteration"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["SpreadElements"] = 2 /* ES2015 */] = "SpreadElements"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["RestElements"] = 2 /* ES2015 */] = "RestElements"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["TaggedTemplates"] = 2 /* ES2015 */] = "TaggedTemplates"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["DestructuringAssignment"] = 2 /* ES2015 */] = "DestructuringAssignment"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["BindingPatterns"] = 2 /* ES2015 */] = "BindingPatterns"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ArrowFunctions"] = 2 /* ES2015 */] = "ArrowFunctions"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["BlockScopedVariables"] = 2 /* ES2015 */] = "BlockScopedVariables"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ObjectAssign"] = 2 /* ES2015 */] = "ObjectAssign"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["RegularExpressionFlagsUnicode"] = 2 /* ES2015 */] = "RegularExpressionFlagsUnicode"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["RegularExpressionFlagsSticky"] = 2 /* ES2015 */] = "RegularExpressionFlagsSticky"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["Exponentiation"] = 3 /* ES2016 */] = "Exponentiation"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["AsyncFunctions"] = 4 /* ES2017 */] = "AsyncFunctions"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ForAwaitOf"] = 5 /* ES2018 */] = "ForAwaitOf"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["AsyncGenerators"] = 5 /* ES2018 */] = "AsyncGenerators"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["AsyncIteration"] = 5 /* ES2018 */] = "AsyncIteration"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ObjectSpreadRest"] = 5 /* ES2018 */] = "ObjectSpreadRest"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["RegularExpressionFlagsDotAll"] = 5 /* ES2018 */] = "RegularExpressionFlagsDotAll"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["BindinglessCatch"] = 6 /* ES2019 */] = "BindinglessCatch"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["BigInt"] = 7 /* ES2020 */] = "BigInt"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["NullishCoalesce"] = 7 /* ES2020 */] = "NullishCoalesce"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["OptionalChaining"] = 7 /* ES2020 */] = "OptionalChaining"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["LogicalAssignment"] = 8 /* ES2021 */] = "LogicalAssignment"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["TopLevelAwait"] = 9 /* ES2022 */] = "TopLevelAwait"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ClassFields"] = 9 /* ES2022 */] = "ClassFields"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["PrivateNamesAndClassStaticBlocks"] = 9 /* ES2022 */] = "PrivateNamesAndClassStaticBlocks"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["RegularExpressionFlagsHasIndices"] = 9 /* ES2022 */] = "RegularExpressionFlagsHasIndices"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ShebangComments"] = 99 /* ESNext */] = "ShebangComments"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["UsingAndAwaitUsing"] = 99 /* ESNext */] = "UsingAndAwaitUsing"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["ClassAndClassElementDecorators"] = 99 /* ESNext */] = "ClassAndClassElementDecorators"; - LanguageFeatureMinimumTarget2[LanguageFeatureMinimumTarget2["RegularExpressionFlagsUnicodeSets"] = 99 /* ESNext */] = "RegularExpressionFlagsUnicodeSets"; - return LanguageFeatureMinimumTarget2; -})(LanguageFeatureMinimumTarget || {}); +var LanguageFeatureMinimumTarget = { + Classes: 2 /* ES2015 */, + ForOf: 2 /* ES2015 */, + Generators: 2 /* ES2015 */, + Iteration: 2 /* ES2015 */, + SpreadElements: 2 /* ES2015 */, + RestElements: 2 /* ES2015 */, + TaggedTemplates: 2 /* ES2015 */, + DestructuringAssignment: 2 /* ES2015 */, + BindingPatterns: 2 /* ES2015 */, + ArrowFunctions: 2 /* ES2015 */, + BlockScopedVariables: 2 /* ES2015 */, + ObjectAssign: 2 /* ES2015 */, + RegularExpressionFlagsUnicode: 2 /* ES2015 */, + RegularExpressionFlagsSticky: 2 /* ES2015 */, + Exponentiation: 3 /* ES2016 */, + AsyncFunctions: 4 /* ES2017 */, + ForAwaitOf: 5 /* ES2018 */, + AsyncGenerators: 5 /* ES2018 */, + AsyncIteration: 5 /* ES2018 */, + ObjectSpreadRest: 5 /* ES2018 */, + RegularExpressionFlagsDotAll: 5 /* ES2018 */, + BindinglessCatch: 6 /* ES2019 */, + BigInt: 7 /* ES2020 */, + NullishCoalesce: 7 /* ES2020 */, + OptionalChaining: 7 /* ES2020 */, + LogicalAssignment: 8 /* ES2021 */, + TopLevelAwait: 9 /* ES2022 */, + ClassFields: 9 /* ES2022 */, + PrivateNamesAndClassStaticBlocks: 9 /* ES2022 */, + RegularExpressionFlagsHasIndices: 9 /* ES2022 */, + ShebangComments: 10 /* ES2023 */, + RegularExpressionFlagsUnicodeSets: 11 /* ES2024 */, + UsingAndAwaitUsing: 99 /* ESNext */, + ClassAndClassElementDecorators: 99 /* ESNext */ +}; var ExternalEmitHelpers = /* @__PURE__ */ ((ExternalEmitHelpers2) => { ExternalEmitHelpers2[ExternalEmitHelpers2["Extends"] = 1] = "Extends"; ExternalEmitHelpers2[ExternalEmitHelpers2["Assign"] = 2] = "Assign"; @@ -13212,6 +13063,7 @@ var ExternalEmitHelpers = /* @__PURE__ */ ((ExternalEmitHelpers2) => { ExternalEmitHelpers2[ExternalEmitHelpers2["SetFunctionName"] = 4194304] = "SetFunctionName"; ExternalEmitHelpers2[ExternalEmitHelpers2["PropKey"] = 8388608] = "PropKey"; ExternalEmitHelpers2[ExternalEmitHelpers2["AddDisposableResourceAndDisposeResources"] = 16777216] = "AddDisposableResourceAndDisposeResources"; + ExternalEmitHelpers2[ExternalEmitHelpers2["RewriteRelativeImportExtension"] = 33554432] = "RewriteRelativeImportExtension"; ExternalEmitHelpers2[ExternalEmitHelpers2["FirstEmitHelper"] = 1 /* Extends */] = "FirstEmitHelper"; ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 16777216 /* AddDisposableResourceAndDisposeResources */] = "LastEmitHelper"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForOfIncludes"] = 256 /* Values */] = "ForOfIncludes"; @@ -13237,9 +13089,11 @@ var OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => { OuterExpressionKinds2[OuterExpressionKinds2["TypeAssertions"] = 2] = "TypeAssertions"; OuterExpressionKinds2[OuterExpressionKinds2["NonNullAssertions"] = 4] = "NonNullAssertions"; OuterExpressionKinds2[OuterExpressionKinds2["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions"; - OuterExpressionKinds2[OuterExpressionKinds2["Assertions"] = 6] = "Assertions"; - OuterExpressionKinds2[OuterExpressionKinds2["All"] = 15] = "All"; - OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] = 16] = "ExcludeJSDocTypeAssertion"; + OuterExpressionKinds2[OuterExpressionKinds2["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments"; + OuterExpressionKinds2[OuterExpressionKinds2["Satisfies"] = 32] = "Satisfies"; + OuterExpressionKinds2[OuterExpressionKinds2["Assertions"] = 38] = "Assertions"; + OuterExpressionKinds2[OuterExpressionKinds2["All"] = 63] = "All"; + OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] = -2147483648] = "ExcludeJSDocTypeAssertion"; return OuterExpressionKinds2; })(OuterExpressionKinds || {}); var LexicalEnvironmentFlags = /* @__PURE__ */ ((LexicalEnvironmentFlags2) => { @@ -14111,6 +13965,7 @@ function createSystemWatchFunctions({ return generateWatchFileOptions(4 /* UseFsEvents */, 2 /* DynamicPriority */, options); case "UseFsEventsOnParentDirectory": useNonPollingWatchers2 = true; + // fall through default: return useNonPollingWatchers2 ? ( // Use notifications from FS to watch with falling back to fs.watchFile @@ -14345,7 +14200,7 @@ function patchWriteFileEnsuringDirectory(sys2) { var sys = (() => { const byteOrderMarkIndicator = "\uFEFF"; function getNodeSystem() { - const nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/; + const nativePattern = /^native |^\([^)]+\)$|^(?:internal[\\/]|[\w\s]+(?:\.js)?$)/; const _fs = require("fs"); const _path = require("path"); const _os = require("os"); @@ -14359,6 +14214,7 @@ var sys = (() => { let profilePath = "./profile.cpuprofile"; const isMacOs = process.platform === "darwin"; const isLinuxOrMacOs = process.platform === "linux" || isMacOs; + const statSyncOptions = { throwIfNoEntry: false }; const platform = _os.platform(); const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; @@ -14403,6 +14259,7 @@ var sys = (() => { writeFile: writeFile2, watchFile: watchFile2, watchDirectory, + preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch, resolvePath: (path) => _path.resolve(path), fileExists, directoryExists, @@ -14439,12 +14296,9 @@ var sys = (() => { return process.memoryUsage().heapUsed; }, getFileSize(path) { - try { - const stat = statSync(path); - if (stat == null ? void 0 : stat.isFile()) { - return stat.size; - } - } catch { + const stat = statSync(path); + if (stat == null ? void 0 : stat.isFile()) { + return stat.size; } return 0; }, @@ -14455,7 +14309,7 @@ var sys = (() => { disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(arg)) || !!process.recordreplay, tryEnableSourceMapsForHost() { try { require("source-map-support").install(); @@ -14465,7 +14319,7 @@ var sys = (() => { setTimeout, clearTimeout, clearScreen: () => { - process.stdout.write("\x1Bc"); + process.stdout.write("\x1B[2J\x1B[3J\x1B[H"); }, setBlocking: () => { var _a; @@ -14487,7 +14341,11 @@ var sys = (() => { }; return nodeSystem; function statSync(path) { - return _fs.statSync(path, { throwIfNoEntry: false }); + try { + return _fs.statSync(path, statSyncOptions); + } catch { + return void 0; + } } function enableCPUProfiler(path, cb) { if (activeSession) { @@ -14541,11 +14399,8 @@ var sys = (() => { activeSession.post("Profiler.stop", (err, { profile }) => { var _a; if (!err) { - try { - if ((_a = statSync(profilePath)) == null ? void 0 : _a.isDirectory()) { - profilePath = _path.join(profilePath, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`); - } - } catch { + if ((_a = statSync(profilePath)) == null ? void 0 : _a.isDirectory()) { + profilePath = _path.join(profilePath, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`); } try { _fs.mkdirSync(_path.dirname(profilePath), { recursive: true }); @@ -14606,11 +14461,11 @@ var sys = (() => { callback ); } - function readFileWorker(fileName, _encoding) { + function readFile(fileName, _encoding) { let buffer; try { buffer = _fs.readFileSync(fileName); - } catch (e) { + } catch { return void 0; } let len = buffer.length; @@ -14631,16 +14486,7 @@ var sys = (() => { } return buffer.toString("utf8"); } - function readFile(fileName, _encoding) { - var _a, _b; - (_a = perfLogger) == null ? void 0 : _a.logStartReadFile(fileName); - const file = readFileWorker(fileName, _encoding); - (_b = perfLogger) == null ? void 0 : _b.logStopReadFile(); - return file; - } function writeFile2(fileName, data, writeByteOrderMark) { - var _a; - (_a = perfLogger) == null ? void 0 : _a.logEvent("WriteFile: " + fileName); if (writeByteOrderMark) { data = byteOrderMarkIndicator + data; } @@ -14661,8 +14507,6 @@ var sys = (() => { } } function getAccessibleFileSystemEntries(path) { - var _a; - (_a = perfLogger) == null ? void 0 : _a.logEvent("ReadDir: " + (path || ".")); try { const entries = _fs.readdirSync(path || ".", { withFileTypes: true }); const files = []; @@ -14675,12 +14519,8 @@ var sys = (() => { let stat; if (typeof dirent === "string" || dirent.isSymbolicLink()) { const name = combinePaths(path, entry); - try { - stat = statSync(name); - if (!stat) { - continue; - } - } catch (e) { + stat = statSync(name); + if (!stat) { continue; } } else { @@ -14695,7 +14535,7 @@ var sys = (() => { files.sort(); directories.sort(); return { files, directories }; - } catch (e) { + } catch { return emptyFileSystemEntries; } } @@ -14703,25 +14543,17 @@ var sys = (() => { return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path, entryKind) { - const originalStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - try { - const stat = statSync(path); - if (!stat) { - return false; - } - switch (entryKind) { - case 0 /* File */: - return stat.isFile(); - case 1 /* Directory */: - return stat.isDirectory(); - default: - return false; - } - } catch (e) { + const stat = statSync(path); + if (!stat) { return false; - } finally { - Error.stackTraceLimit = originalStackTraceLimit; + } + switch (entryKind) { + case 0 /* File */: + return stat.isFile(); + case 1 /* Directory */: + return stat.isDirectory(); + default: + return false; } } function fileExists(path) { @@ -14745,27 +14577,19 @@ var sys = (() => { } function getModifiedTime3(path) { var _a; - const originalStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - try { - return (_a = statSync(path)) == null ? void 0 : _a.mtime; - } catch (e) { - return void 0; - } finally { - Error.stackTraceLimit = originalStackTraceLimit; - } + return (_a = statSync(path)) == null ? void 0 : _a.mtime; } function setModifiedTime(path, time) { try { _fs.utimesSync(path, time, time); - } catch (e) { + } catch { return; } } function deleteFile(path) { try { return _fs.unlinkSync(path); - } catch (e) { + } catch { return; } } @@ -14819,7 +14643,7 @@ function pathIsAbsolute(path) { return getEncodedRootLength(path) !== 0; } function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); + return /^\.\.?(?:$|[\\/])/.test(path); } function pathIsBareSpecifier(path) { return !pathIsAbsolute(path) && !pathIsRelative(path); @@ -14997,23 +14821,105 @@ function resolvePath(path, ...paths) { function getNormalizedPathComponents(path, currentDirectory) { return reducePathComponents(getPathComponents(path, currentDirectory)); } -function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); +function getNormalizedAbsolutePath(path, currentDirectory) { + let rootLength = getRootLength(path); + if (rootLength === 0 && currentDirectory) { + path = combinePaths(currentDirectory, path); + rootLength = getRootLength(path); + } else { + path = normalizeSlashes(path); + } + const simpleNormalized = simpleNormalizePath(path); + if (simpleNormalized !== void 0) { + return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized; + } + const length2 = path.length; + const root = path.substring(0, rootLength); + let normalized; + let index = rootLength; + let segmentStart = index; + let normalizedUpTo = index; + let seenNonDotDotSegment = rootLength !== 0; + while (index < length2) { + segmentStart = index; + let ch = path.charCodeAt(index); + while (ch === 47 /* slash */ && index + 1 < length2) { + index++; + ch = path.charCodeAt(index); + } + if (index > segmentStart) { + normalized ?? (normalized = path.substring(0, segmentStart - 1)); + segmentStart = index; + } + let segmentEnd = path.indexOf(directorySeparator, index + 1); + if (segmentEnd === -1) { + segmentEnd = length2; + } + const segmentLength = segmentEnd - segmentStart; + if (segmentLength === 1 && path.charCodeAt(index) === 46 /* dot */) { + normalized ?? (normalized = path.substring(0, normalizedUpTo)); + } else if (segmentLength === 2 && path.charCodeAt(index) === 46 /* dot */ && path.charCodeAt(index + 1) === 46 /* dot */) { + if (!seenNonDotDotSegment) { + if (normalized !== void 0) { + normalized += normalized.length === rootLength ? ".." : "/.."; + } else { + normalizedUpTo = index + 2; + } + } else if (normalized === void 0) { + if (normalizedUpTo - 2 >= 0) { + normalized = path.substring(0, Math.max(rootLength, path.lastIndexOf(directorySeparator, normalizedUpTo - 2))); + } else { + normalized = path.substring(0, normalizedUpTo); + } + } else { + const lastSlash = normalized.lastIndexOf(directorySeparator); + if (lastSlash !== -1) { + normalized = normalized.substring(0, Math.max(rootLength, lastSlash)); + } else { + normalized = root; + } + if (normalized.length === rootLength) { + seenNonDotDotSegment = rootLength !== 0; + } + } + } else if (normalized !== void 0) { + if (normalized.length !== rootLength) { + normalized += directorySeparator; + } + seenNonDotDotSegment = true; + normalized += path.substring(segmentStart, segmentEnd); + } else { + seenNonDotDotSegment = true; + normalizedUpTo = segmentEnd; + } + index = segmentEnd + 1; + } + return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path) : path); } function normalizePath(path) { path = normalizeSlashes(path); + let normalized = simpleNormalizePath(path); + if (normalized !== void 0) { + return normalized; + } + normalized = getNormalizedAbsolutePath(path, ""); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; +} +function simpleNormalizePath(path) { if (!relativePathSegmentRegExp.test(path)) { return path; } - const simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, ""); + let simplified = path.replace(/\/\.\//g, "/"); + if (simplified.startsWith("./")) { + simplified = simplified.slice(2); + } if (simplified !== path) { path = simplified; if (!relativePathSegmentRegExp.test(path)) { return path; } } - const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); - return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; + return void 0; } function getPathWithoutRoot(pathComponents2) { if (pathComponents2.length === 0) return ""; @@ -15052,7 +14958,7 @@ function changeFullExtension(path, newExtension) { } return changeAnyExtension(path, newExtension); } -var relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; +var relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/; function comparePathsWorker(a, b, componentComparer) { if (a === b) return 0 /* EqualTo */; if (a === void 0) return -1 /* LessThan */; @@ -15433,13 +15339,16 @@ var Diagnostics = { An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1283, 1 /* Error */, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1284, 1 /* Error */, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1285, 1 /* Error */, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), - ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."), + ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax: diag(1286, 1 /* Error */, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'."), A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."), An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."), _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1291, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1292, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1 /* Error */, "ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."), + This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled: diag(1294, 1 /* Error */, "This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294", "This syntax is not allowed when 'erasableSyntaxOnly' is enabled."), + ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript: diag(1295, 1 /* Error */, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest 'package.json' to make this file an ECMAScript module, or adjust your 'verbatimModuleSyntax', 'module', and 'moduleResolution' settings in TypeScript."), with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), @@ -15454,8 +15363,8 @@ var Diagnostics = { Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, 1 /* Error */, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, 1 /* Error */, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, 1 /* Error */, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, 1 /* Error */, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), - Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, 1 /* Error */, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext: diag(1323, 1 /* Error */, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'."), + Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve: diag(1324, 1 /* Error */, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'."), Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, 1 /* Error */, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, 1 /* Error */, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), String_literal_with_double_quotes_expected: diag(1327, 1 /* Error */, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), @@ -15472,7 +15381,7 @@ var Diagnostics = { Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, 1 /* Error */, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* Error */, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), - The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, 1 /* Error */, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext: diag(1343, 1 /* Error */, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'."), A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1 /* Error */, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), @@ -15502,7 +15411,7 @@ var Diagnostics = { await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, 1 /* Error */, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, 1 /* Error */, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, 1 /* Error */, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, 1 /* Error */, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1 /* Error */, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), Unexpected_token_Did_you_mean_or_rbrace: diag(1381, 1 /* Error */, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), @@ -15553,7 +15462,7 @@ var Diagnostics = { File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), The_file_is_in_the_program_because_Colon: diag(1430, 3 /* Message */, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, 1 /* Error */, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1 /* Error */, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1 /* Error */, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: diag(1433, 1 /* Error */, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."), Unexpected_keyword_or_identifier: diag(1434, 1 /* Error */, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, 1 /* Error */, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), @@ -15648,6 +15557,26 @@ var Diagnostics = { This_character_cannot_be_escaped_in_a_regular_expression: diag(1535, 1 /* Error */, "This_character_cannot_be_escaped_in_a_regular_expression_1535", "This character cannot be escaped in a regular expression."), Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: diag(1536, 1 /* Error */, "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."), Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: diag(1537, 1 /* Error */, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."), + Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1538, 1 /* Error */, "Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538", "Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."), + A_bigint_literal_cannot_be_used_as_a_property_name: diag(1539, 1 /* Error */, "A_bigint_literal_cannot_be_used_as_a_property_name_1539", "A 'bigint' literal cannot be used as a property name."), + A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: diag( + 1540, + 2 /* Suggestion */, + "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540", + "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + void 0, + /*reportsDeprecated*/ + true + ), + Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1541, 1 /* Error */, "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541", "Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."), + Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: diag(1542, 1 /* Error */, "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542", "Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."), + Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0: diag(1543, 1 /* Error */, "Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543", `Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`), + Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0: diag(1544, 1 /* Error */, "Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544", "Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."), + using_declarations_are_not_allowed_in_ambient_contexts: diag(1545, 1 /* Error */, "using_declarations_are_not_allowed_in_ambient_contexts_1545", "'using' declarations are not allowed in ambient contexts."), + await_using_declarations_are_not_allowed_in_ambient_contexts: diag(1546, 1 /* Error */, "await_using_declarations_are_not_allowed_in_ambient_contexts_1546", "'await using' declarations are not allowed in ambient contexts."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), Call_signature_return_types_0_and_1_are_incompatible: diag( @@ -15741,6 +15670,7 @@ var Diagnostics = { This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), @@ -15902,7 +15832,6 @@ var Diagnostics = { The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method: diag(2522, 1 /* Error */, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522", "The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."), yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, 1 /* Error */, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, 1 /* Error */, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), - Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: diag(2525, 1 /* Error */, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, 1 /* Error */, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, 1 /* Error */, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), A_module_cannot_have_multiple_default_exports: diag(2528, 1 /* Error */, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), @@ -16083,7 +16012,7 @@ var Diagnostics = { Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, 1 /* Error */, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, 1 /* Error */, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, 1 /* Error */, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), - Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), + Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 and above with module {0}."), Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* Error */, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), _0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."), @@ -16172,15 +16101,15 @@ var Diagnostics = { Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, 1 /* Error */, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), Class_declaration_cannot_implement_overload_list_for_0: diag(2813, 1 /* Error */, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, 1 /* Error */, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), - arguments_cannot_be_referenced_in_property_initializers: diag(2815, 1 /* Error */, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), + arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks: diag(2815, 1 /* Error */, "arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks_2815", "'arguments' cannot be referenced in property initializers or class static initialization blocks."), Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, 1 /* Error */, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, 1 /* Error */, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1 /* Error */, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), Namespace_name_cannot_be_0: diag(2819, 1 /* Error */, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), - Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."), + Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."), Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), - Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."), Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), @@ -16200,7 +16129,7 @@ var Diagnostics = { The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), @@ -16215,6 +16144,19 @@ var Diagnostics = { Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: diag(2866, 1 /* Error */, "Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866", "Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."), Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun: diag(2867, 1 /* Error */, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."), Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig: diag(2868, 1 /* Error */, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."), + Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish: diag(2869, 1 /* Error */, "Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869", "Right operand of ?? is unreachable because the left operand is never nullish."), + This_binary_expression_is_never_nullish_Are_you_missing_parentheses: diag(2870, 1 /* Error */, "This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870", "This binary expression is never nullish. Are you missing parentheses?"), + This_expression_is_always_nullish: diag(2871, 1 /* Error */, "This_expression_is_always_nullish_2871", "This expression is always nullish."), + This_kind_of_expression_is_always_truthy: diag(2872, 1 /* Error */, "This_kind_of_expression_is_always_truthy_2872", "This kind of expression is always truthy."), + This_kind_of_expression_is_always_falsy: diag(2873, 1 /* Error */, "This_kind_of_expression_is_always_falsy_2873", "This kind of expression is always falsy."), + This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found: diag(2874, 1 /* Error */, "This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874", "This JSX tag requires '{0}' to be in scope, but it could not be found."), + This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed: diag(2875, 1 /* Error */, "This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875", "This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."), + This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0: diag(2876, 1 /* Error */, "This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876", 'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".'), + This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1 /* Error */, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."), + This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1 /* Error */, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."), + Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1 /* Error */, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."), + Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert: diag(2880, 1 /* Error */, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."), + This_expression_is_never_nullish: diag(2881, 1 /* Error */, "This_expression_is_never_nullish_2881", "This expression is never nullish."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -16291,7 +16233,7 @@ var Diagnostics = { Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: diag(4085, 1 /* Error */, "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", "Extends clause for inferred type '{0}' has or is using private name '{1}'."), Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, 1 /* Error */, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, 1 /* Error */, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), - Property_0_of_exported_class_expression_may_not_be_private_or_protected: diag(4094, 1 /* Error */, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), + Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected: diag(4094, 1 /* Error */, "Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094", "Property '{0}' of exported anonymous class type may not be private or protected."), Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, 1 /* Error */, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, 1 /* Error */, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, 1 /* Error */, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), @@ -16324,11 +16266,12 @@ var Diagnostics = { Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."), One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."), + This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: diag(4127, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: diag(4128, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."), The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), - Failed_to_parse_file_0_Colon_1: diag(5014, 1 /* Error */, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), Unknown_compiler_option_0_Did_you_mean_1: diag(5025, 1 /* Error */, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), @@ -16529,7 +16472,6 @@ var Diagnostics = { Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, 3 /* Message */, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", 'Parse in strict mode and emit "use strict" for each source file.'), Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, 1 /* Error */, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, 3 /* Message */, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), - Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: diag(6145, 3 /* Message */, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, 3 /* Message */, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, 3 /* Message */, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, 3 /* Message */, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), @@ -16682,6 +16624,15 @@ var Diagnostics = { package_json_has_a_peerDependencies_field: diag(6281, 3 /* Message */, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."), Found_peerDependency_0_with_1_version: diag(6282, 3 /* Message */, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."), Failed_to_find_peerDependency_0: diag(6283, 3 /* Message */, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."), + File_Layout: diag(6284, 3 /* Message */, "File_Layout_6284", "File Layout"), + Environment_Settings: diag(6285, 3 /* Message */, "Environment_Settings_6285", "Environment Settings"), + See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule: diag(6286, 3 /* Message */, "See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule_6286", "See also https://aka.ms/tsconfig/module"), + For_nodejs_Colon: diag(6287, 3 /* Message */, "For_nodejs_Colon_6287", "For nodejs:"), + and_npm_install_D_types_Slashnode: diag(6290, 3 /* Message */, "and_npm_install_D_types_Slashnode_6290", "and npm install -D @types/node"), + Other_Outputs: diag(6291, 3 /* Message */, "Other_Outputs_6291", "Other Outputs"), + Stricter_Typechecking_Options: diag(6292, 3 /* Message */, "Stricter_Typechecking_Options_6292", "Stricter Typechecking Options"), + Style_Options: diag(6293, 3 /* Message */, "Style_Options_6293", "Style Options"), + Recommended_Options: diag(6294, 3 /* Message */, "Recommended_Options_6294", "Recommended Options"), Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"), Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), @@ -16771,6 +16722,9 @@ var Diagnostics = { Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors: diag(6419, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419", "Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."), + Project_0_is_out_of_date_because_1: diag(6420, 3 /* Message */, "Project_0_is_out_of_date_because_1_6420", "Project '{0}' is out of date because {1}."), + Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files: diag(6421, 3 /* Message */, "Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421", "Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."), The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), The_expected_type_comes_from_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), @@ -16778,7 +16732,7 @@ var Diagnostics = { File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, 1 /* Error */, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, 3 /* Message */, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), Consider_adding_a_declare_modifier_to_this_class: diag(6506, 3 /* Message */, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), - Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, 3 /* Message */, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), + Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files: diag(6600, 3 /* Message */, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files."), Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, 3 /* Message */, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), Allow_accessing_UMD_globals_from_modules: diag(6602, 3 /* Message */, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), Disable_error_reporting_for_unreachable_code: diag(6603, 3 /* Message */, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), @@ -16817,6 +16771,7 @@ var Diagnostics = { Ensure_that_casing_is_correct_in_imports: diag(6637, 3 /* Message */, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, 3 /* Message */, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, 3 /* Message */, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), + Skip_building_downstream_projects_on_error_in_upstream_project: diag(6640, 3 /* Message */, "Skip_building_downstream_projects_on_error_in_upstream_project_6640", "Skip building downstream projects on error in upstream project."), Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, 3 /* Message */, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, 3 /* Message */, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, 3 /* Message */, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), @@ -16893,9 +16848,14 @@ var Diagnostics = { Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, 3 /* Message */, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3 /* Message */, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."), + Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any: diag(6720, 3 /* Message */, "Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720", "Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."), + Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript: diag(6721, 3 /* Message */, "Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript_6721", "Do not allow runtime constructs that are not part of ECMAScript."), Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."), Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3 /* Message */, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."), + Check_side_effect_imports: diag(6806, 3 /* Message */, "Check_side_effect_imports_6806", "Check side effect imports."), + This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: diag(6807, 1 /* Error */, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."), + Enable_lib_replacement: diag(6808, 3 /* Message */, "Enable_lib_replacement_6808", "Enable lib replacement."), one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"), one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"), type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"), @@ -16946,7 +16906,7 @@ var Diagnostics = { _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, 1 /* Error */, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, 1 /* Error */, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, 1 /* Error */, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), - Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: diag(7025, 1 /* Error */, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), + Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation: diag(7025, 1 /* Error */, "Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025", "Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."), JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, 1 /* Error */, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), Unreachable_code_detected: diag( 7027, @@ -17037,7 +16997,7 @@ var Diagnostics = { Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: diag(9007, 1 /* Error */, "Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007", "Function must have an explicit return type annotation with --isolatedDeclarations."), Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: diag(9008, 1 /* Error */, "Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008", "Method must have an explicit return type annotation with --isolatedDeclarations."), - At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: diag(9009, 1 /* Error */, "At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009", "At least one accessor must have an explicit return type annotation with --isolatedDeclarations."), + At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9009, 1 /* Error */, "At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009", "At least one accessor must have an explicit type annotation with --isolatedDeclarations."), Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9010, 1 /* Error */, "Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010", "Variable must have an explicit type annotation with --isolatedDeclarations."), Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9011, 1 /* Error */, "Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011", "Parameter must have an explicit type annotation with --isolatedDeclarations."), Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations: diag(9012, 1 /* Error */, "Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012", "Property must have an explicit type annotation with --isolatedDeclarations."), @@ -17052,7 +17012,7 @@ var Diagnostics = { Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations: diag(9021, 1 /* Error */, "Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021", "Extends clause can't contain an expression with --isolatedDeclarations."), Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations: diag(9022, 1 /* Error */, "Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022", "Inference from class expressions is not supported with --isolatedDeclarations."), Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function: diag(9023, 1 /* Error */, "Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023", "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."), - Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations: diag(9025, 1 /* Error */, "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025", "Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations."), + Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations: diag(9025, 1 /* Error */, "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025", "Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."), Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations: diag(9026, 1 /* Error */, "Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026", "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."), Add_a_type_annotation_to_the_variable_0: diag(9027, 1 /* Error */, "Add_a_type_annotation_to_the_variable_0_9027", "Add a type annotation to the variable {0}."), Add_a_type_annotation_to_the_parameter_0: diag(9028, 1 /* Error */, "Add_a_type_annotation_to_the_parameter_0_9028", "Add a type annotation to the parameter {0}."), @@ -17346,6 +17306,8 @@ var Diagnostics = { Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"), Wrap_in_parentheses: diag(95194, 3 /* Message */, "Wrap_in_parentheses_95194", "Wrap in parentheses"), Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"), + Add_resolution_mode_import_attribute: diag(95196, 3 /* Message */, "Add_resolution_mode_import_attribute_95196", "Add 'resolution-mode' import attribute"), + Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it: diag(95197, 3 /* Message */, "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197", "Add 'resolution-mode' import attribute to all type-only imports that need it"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), @@ -17389,7 +17351,12 @@ var Diagnostics = { Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block."), _0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled: diag(18055, 1 /* Error */, "_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055", "'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."), - Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled: diag(18056, 1 /* Error */, "Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056", "Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled.") + Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled: diag(18056, 1 /* Error */, "Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056", "Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."), + String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020: diag(18057, 1 /* Error */, "String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057", "String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'."), + Default_imports_are_not_allowed_in_a_deferred_import: diag(18058, 1 /* Error */, "Default_imports_are_not_allowed_in_a_deferred_import_18058", "Default imports are not allowed in a deferred import."), + Named_imports_are_not_allowed_in_a_deferred_import: diag(18059, 1 /* Error */, "Named_imports_are_not_allowed_in_a_deferred_import_18059", "Named imports are not allowed in a deferred import."), + Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve: diag(18060, 1 /* Error */, "Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve_18060", "Deferred imports are only supported when the '--module' flag is set to 'esnext' or 'preserve'."), + _0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer: diag(18061, 1 /* Error */, "_0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer_18061", "'{0}' is not a valid meta-property for keyword 'import'. Did you mean 'meta' or 'defer'?") }; // src/compiler/scanner.ts @@ -17418,6 +17385,7 @@ var textToKeywordObj = { debugger: 89 /* DebuggerKeyword */, declare: 138 /* DeclareKeyword */, default: 90 /* DefaultKeyword */, + defer: 166 /* DeferKeyword */, delete: 91 /* DeleteKeyword */, do: 92 /* DoKeyword */, else: 93 /* ElseKeyword */, @@ -17549,22 +17517,22 @@ var textToToken = new Map(Object.entries({ "#": 63 /* HashToken */, "`": 62 /* BacktickToken */ })); -var charToRegExpFlag = new Map(Object.entries({ - d: 1 /* HasIndices */, - g: 2 /* Global */, - i: 4 /* IgnoreCase */, - m: 8 /* Multiline */, - s: 16 /* DotAll */, - u: 32 /* Unicode */, - v: 64 /* UnicodeSets */, - y: 128 /* Sticky */ -})); +var charCodeToRegExpFlag = /* @__PURE__ */ new Map([ + [100 /* d */, 1 /* HasIndices */], + [103 /* g */, 2 /* Global */], + [105 /* i */, 4 /* IgnoreCase */], + [109 /* m */, 8 /* Multiline */], + [115 /* s */, 16 /* DotAll */], + [117 /* u */, 32 /* Unicode */], + [118 /* v */, 64 /* UnicodeSets */], + [121 /* y */, 128 /* Sticky */] +]); var regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([ - [1 /* HasIndices */, 9 /* RegularExpressionFlagsHasIndices */], - [16 /* DotAll */, 5 /* RegularExpressionFlagsDotAll */], - [32 /* Unicode */, 2 /* RegularExpressionFlagsUnicode */], - [64 /* UnicodeSets */, 99 /* RegularExpressionFlagsUnicodeSets */], - [128 /* Sticky */, 2 /* RegularExpressionFlagsSticky */] + [1 /* HasIndices */, LanguageFeatureMinimumTarget.RegularExpressionFlagsHasIndices], + [16 /* DotAll */, LanguageFeatureMinimumTarget.RegularExpressionFlagsDotAll], + [32 /* Unicode */, LanguageFeatureMinimumTarget.RegularExpressionFlagsUnicode], + [64 /* UnicodeSets */, LanguageFeatureMinimumTarget.RegularExpressionFlagsUnicodeSets], + [128 /* Sticky */, LanguageFeatureMinimumTarget.RegularExpressionFlagsSticky] ]); var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500]; var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500]; @@ -17614,12 +17582,12 @@ function tokenToString(t) { function stringToToken(s) { return textToToken.get(s); } -var regExpFlagChars = makeReverseMap(charToRegExpFlag); -function regularExpressionFlagToCharacter(f) { - return regExpFlagChars[f]; +var regExpFlagCharCodes = makeReverseMap(charCodeToRegExpFlag); +function regularExpressionFlagToCharacterCode(f) { + return regExpFlagCharCodes[f]; } -function characterToRegularExpressionFlag(c) { - return charToRegExpFlag.get(c); +function characterCodeToRegularExpressionFlag(ch) { + return charCodeToRegExpFlag.get(ch); } function computeLineStarts(text) { const result = []; @@ -17633,6 +17601,7 @@ function computeLineStarts(text) { if (text.charCodeAt(pos) === 10 /* lineFeed */) { pos++; } + // falls through case 10 /* lineFeed */: result.push(lineStart); lineStart = pos; @@ -17656,7 +17625,7 @@ function computePositionOfLineAndCharacter(lineStarts, line, character, debugTex if (allowEdits) { line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line; } else { - Debug.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== void 0 ? arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"}`); + Debug.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== void 0 ? arrayIsEqualTo(lineStarts, computeLineStarts(debugText)) : "unknown"}`); } } const res = lineStarts[line] + character; @@ -17735,6 +17704,8 @@ function couldStartTrivia(text, pos) { case 12 /* formFeed */: case 32 /* space */: case 47 /* slash */: + // starts of normal trivia + // falls through case 60 /* lessThan */: case 124 /* bar */: case 61 /* equals */: @@ -17758,6 +17729,7 @@ function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) { if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { pos++; } + // falls through case 10 /* lineFeed */: pos++; if (stopAfterLineBreak) { @@ -17904,6 +17876,7 @@ function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) { if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { pos++; } + // falls through case 10 /* lineFeed */: pos++; if (trailing) { @@ -18105,6 +18078,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, + hasPrecedingJSDocLeadingAsterisks: () => (tokenFlags & 32768 /* PrecedingJSDocLeadingAsterisks */) !== 0, isIdentifier: () => token === 80 /* Identifier */ || token > 118 /* LastReservedWord */, isReservedWord: () => token >= 83 /* FirstReservedWord */ && token <= 118 /* LastReservedWord */, isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, @@ -18468,12 +18442,16 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (pos >= end || !isDigit(charCodeUnchecked(pos))) { return "\0"; } + // '\01', '\011' + // falls through case 49 /* _1 */: case 50 /* _2 */: case 51 /* _3 */: if (pos < end && isOctalDigit(charCodeUnchecked(pos))) { pos++; } + // '\17', '\177' + // falls through case 52 /* _4 */: case 53 /* _5 */: case 54 /* _6 */: @@ -18521,9 +18499,16 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan case 34 /* doubleQuote */: return '"'; case 117 /* u */: - if (flags & 17 /* ScanExtendedUnicodeEscape */ && pos < end && charCodeUnchecked(pos) === 123 /* openBrace */) { + if (pos < end && charCodeUnchecked(pos) === 123 /* openBrace */) { pos -= 2; - return scanExtendedUnicodeEscape(!!(flags & 6 /* ReportInvalidEscapeErrors */)); + const result = scanExtendedUnicodeEscape(!!(flags & 6 /* ReportInvalidEscapeErrors */)); + if (!(flags & 17 /* AllowExtendedUnicodeEscape */)) { + tokenFlags |= 2048 /* ContainsInvalidEscape */; + if (flags & 6 /* ReportInvalidEscapeErrors */) { + error2(Diagnostics.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, start2, pos - start2); + } + } + return result; } for (; pos < start2 + 6; pos++) { if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) { @@ -18541,7 +18526,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const nextStart = pos; let nextPos = pos + 2; for (; nextPos < nextStart + 6; nextPos++) { - if (!isHexDigit(charCodeUnchecked(pos))) { + if (!isHexDigit(charCodeUnchecked(nextPos))) { return escapedValueString; } } @@ -18564,10 +18549,13 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } tokenFlags |= 4096 /* HexEscape */; return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16)); + // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), + // the line terminator is interpreted to be "the empty code unit sequence". case 13 /* carriageReturn */: if (pos < end && charCodeUnchecked(pos) === 10 /* lineFeed */) { pos++; } + // falls through case 10 /* lineFeed */: case 8232 /* lineSeparator */: case 8233 /* paragraphSeparator */: @@ -18745,7 +18733,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan function scan() { fullStartPos = pos; tokenFlags = 0 /* None */; - let asteriskSeen = false; while (true) { tokenStart = pos; if (pos >= end) { @@ -18861,8 +18848,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return pos += 2, token = 43 /* AsteriskAsteriskToken */; } pos++; - if (skipJsDocLeadingAsterisks && !asteriskSeen && tokenFlags & 1 /* PrecedingLineBreak */) { - asteriskSeen = true; + if (skipJsDocLeadingAsterisks && (tokenFlags & 32768 /* PrecedingJSDocLeadingAsterisks */) === 0 && tokenFlags & 1 /* PrecedingLineBreak */) { + tokenFlags |= 32768 /* PrecedingJSDocLeadingAsterisks */; continue; } return token = 42 /* AsteriskToken */; @@ -18999,6 +18986,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 256 /* OctalSpecifier */; return token = checkBigIntSuffix(); } + // falls through case 49 /* _1 */: case 50 /* _2 */: case 51 /* _3 */: @@ -19335,24 +19323,25 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan pos++; let regExpFlags = 0 /* None */; while (true) { - const ch = charCodeChecked(pos); + const ch = codePointChecked(pos); if (ch === -1 /* EOF */ || !isIdentifierPart(ch, languageVersion)) { break; } + const size = charSize(ch); if (reportErrors2) { - const flag = characterToRegularExpressionFlag(String.fromCharCode(ch)); + const flag = characterCodeToRegularExpressionFlag(ch); if (flag === void 0) { - error2(Diagnostics.Unknown_regular_expression_flag, pos, 1); + error2(Diagnostics.Unknown_regular_expression_flag, pos, size); } else if (regExpFlags & flag) { - error2(Diagnostics.Duplicate_regular_expression_flag, pos, 1); + error2(Diagnostics.Duplicate_regular_expression_flag, pos, size); } else if (((regExpFlags | flag) & 96 /* AnyUnicodeMode */) === 96 /* AnyUnicodeMode */) { - error2(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, pos, 1); + error2(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, pos, size); } else { regExpFlags |= flag; - checkRegularExpressionFlagAvailable(flag, pos); + checkRegularExpressionFlagAvailability(flag, size); } } - pos++; + pos += size; } if (reportErrors2) { scanRange(startOfRegExpBody, endOfRegExpBody - startOfRegExpBody, () => { @@ -19517,6 +19506,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan break; } } + // falls through case 42 /* asterisk */: case 43 /* plus */: case 63 /* question */: @@ -19547,6 +19537,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (isInGroup) { return; } + // falls through case 93 /* closeBracket */: case 125 /* closeBrace */: if (anyUnicodeModeOrNonAnnexB || ch === 41 /* closeParen */) { @@ -19567,22 +19558,23 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } function scanPatternModifiers(currFlags) { while (true) { - const ch = charCodeChecked(pos); + const ch = codePointChecked(pos); if (ch === -1 /* EOF */ || !isIdentifierPart(ch, languageVersion)) { break; } - const flag = characterToRegularExpressionFlag(String.fromCharCode(ch)); + const size = charSize(ch); + const flag = characterCodeToRegularExpressionFlag(ch); if (flag === void 0) { - error2(Diagnostics.Unknown_regular_expression_flag, pos, 1); + error2(Diagnostics.Unknown_regular_expression_flag, pos, size); } else if (currFlags & flag) { - error2(Diagnostics.Duplicate_regular_expression_flag, pos, 1); + error2(Diagnostics.Duplicate_regular_expression_flag, pos, size); } else if (!(flag & 28 /* Modifiers */)) { - error2(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, 1); + error2(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, size); } else { currFlags |= flag; - checkRegularExpressionFlagAvailable(flag, pos); + checkRegularExpressionFlagAvailability(flag, size); } - pos++; + pos += size; } return currFlags; } @@ -19608,6 +19600,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan error2(Diagnostics.q_is_only_available_inside_character_class, pos - 2, 2); break; } + // falls through default: Debug.assert(scanCharacterClassEscape() || scanDecimalEscape() || scanCharacterEscape( /*atomEscape*/ @@ -19745,6 +19738,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan let start2 = pos; let operand; switch (text.slice(pos, pos + 2)) { + // TODO: don't use slice case "--": case "&&": error2(Diagnostics.Expected_a_class_set_operand); @@ -19850,6 +19844,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } start2 = pos; switch (text.slice(pos, pos + 2)) { + // TODO: don't use slice case "--": case "&&": error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos, 2); @@ -19947,6 +19942,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } } pos--; + // falls through default: return scanClassSetCharacter(); } @@ -20093,6 +20089,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return true; case 80 /* P */: isCharacterComplement = true; + // falls through case 112 /* p */: pos++; if (charCodeChecked(pos) === 123 /* openBrace */) { @@ -20168,7 +20165,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return value; } function scanSourceCharacter() { - const size = anyUnicodeMode ? charSize(charCodeChecked(pos)) : 1; + const size = anyUnicodeMode ? charSize(codePointChecked(pos)) : 1; pos += size; return size > 0 ? text.substring(pos - size, pos) : ""; } @@ -20186,6 +20183,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan forEach(groupNameReferences, (reference) => { if (!(groupSpecifiers == null ? void 0 : groupSpecifiers.has(reference.name))) { error2(Diagnostics.There_is_no_capturing_group_named_0_in_this_regular_expression, reference.pos, reference.end - reference.pos, reference.name); + if (groupSpecifiers) { + const suggestion = getSpellingSuggestion(reference.name, groupSpecifiers, identity); + if (suggestion) { + error2(Diagnostics.Did_you_mean_0, reference.pos, reference.end - reference.pos, suggestion); + } + } } }); forEach(decimalEscapes, (escape) => { @@ -20198,10 +20201,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } }); } - function checkRegularExpressionFlagAvailable(flag, pos2) { + function checkRegularExpressionFlagAvailability(flag, size) { const availableFrom = regExpFlagToFirstAvailableLanguageVersion.get(flag); if (availableFrom && languageVersion < availableFrom) { - error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos2, 1, getNameOfScriptTarget(availableFrom)); + error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos, size, getNameOfScriptTarget(availableFrom)); } } function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) { @@ -20394,6 +20397,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (charCodeUnchecked(pos) === 10 /* lineFeed */) { pos++; } + // falls through case 10 /* lineFeed */: tokenFlags |= 1 /* PrecedingLineBreak */; return token = 4 /* NewLineTrivia */; @@ -20598,28 +20602,35 @@ function isExternalModuleNameRelative(moduleName) { function sortAndDeduplicateDiagnostics(diagnostics) { return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer); } +var targetToLibMap = /* @__PURE__ */ new Map([ + [99 /* ESNext */, "lib.esnext.full.d.ts"], + [11 /* ES2024 */, "lib.es2024.full.d.ts"], + [10 /* ES2023 */, "lib.es2023.full.d.ts"], + [9 /* ES2022 */, "lib.es2022.full.d.ts"], + [8 /* ES2021 */, "lib.es2021.full.d.ts"], + [7 /* ES2020 */, "lib.es2020.full.d.ts"], + [6 /* ES2019 */, "lib.es2019.full.d.ts"], + [5 /* ES2018 */, "lib.es2018.full.d.ts"], + [4 /* ES2017 */, "lib.es2017.full.d.ts"], + [3 /* ES2016 */, "lib.es2016.full.d.ts"], + [2 /* ES2015 */, "lib.es6.d.ts"] + // We don't use lib.es2015.full.d.ts due to breaking change. +]); function getDefaultLibFileName(options) { - switch (getEmitScriptTarget(options)) { + const target = getEmitScriptTarget(options); + switch (target) { case 99 /* ESNext */: - return "lib.esnext.full.d.ts"; + case 11 /* ES2024 */: case 10 /* ES2023 */: - return "lib.es2023.full.d.ts"; case 9 /* ES2022 */: - return "lib.es2022.full.d.ts"; case 8 /* ES2021 */: - return "lib.es2021.full.d.ts"; case 7 /* ES2020 */: - return "lib.es2020.full.d.ts"; case 6 /* ES2019 */: - return "lib.es2019.full.d.ts"; case 5 /* ES2018 */: - return "lib.es2018.full.d.ts"; case 4 /* ES2017 */: - return "lib.es2017.full.d.ts"; case 3 /* ES2016 */: - return "lib.es2016.full.d.ts"; case 2 /* ES2015 */: - return "lib.es6.d.ts"; + return targetToLibMap.get(target); default: return "lib.d.ts"; } @@ -20633,12 +20644,18 @@ function textSpanIsEmpty(span) { function textSpanContainsPosition(span, position) { return position >= span.start && position < textSpanEnd(span); } -function textRangeContainsPositionInclusive(span, position) { - return position >= span.pos && position <= span.end; +function textRangeContainsPositionInclusive(range, position) { + return position >= range.pos && position <= range.end; } function textSpanContainsTextSpan(span, other) { return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span); } +function textSpanContainsTextRange(span, range) { + return range.pos >= span.start && range.end <= textSpanEnd(span); +} +function textRangeContainsTextSpan(range, span) { + return span.start >= range.pos && textSpanEnd(span) <= range.end; +} function textSpanOverlapsWith(span, other) { return textSpanOverlap(span, other) !== void 0; } @@ -20660,11 +20677,34 @@ function decodedTextSpanIntersectsWith(start1, length1, start2, length2) { function textSpanIntersectsWithPosition(span, position) { return position <= textSpanEnd(span) && position >= span.start; } +function textRangeIntersectsWithTextSpan(range, span) { + return textSpanIntersectsWith(span, range.pos, range.end - range.pos); +} function textSpanIntersection(span1, span2) { const start = Math.max(span1.start, span2.start); const end = Math.min(textSpanEnd(span1), textSpanEnd(span2)); return start <= end ? createTextSpanFromBounds(start, end) : void 0; } +function normalizeSpans(spans) { + spans = spans.filter((span) => span.length > 0).sort((a, b) => { + return a.start !== b.start ? a.start - b.start : a.length - b.length; + }); + const result = []; + let i = 0; + while (i < spans.length) { + let span = spans[i]; + let j = i + 1; + while (j < spans.length && textSpanIntersectsWithTextSpan(span, spans[j])) { + const start = Math.min(span.start, spans[j].start); + const end = Math.max(textSpanEnd(span), textSpanEnd(spans[j])); + span = createTextSpanFromBounds(start, end); + j++; + } + i = j; + result.push(span); + } + return result; +} function createTextSpan(start, length2) { if (start < 0) { throw new Error("start < 0"); @@ -20720,16 +20760,16 @@ function collapseTextChangeRangesAcrossMultipleVersions(changes) { ); } function getTypeParameterOwner(d) { - if (d && d.kind === 168 /* TypeParameter */) { + if (d && d.kind === 169 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 264 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 265 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent2.kind === 177 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -20755,14 +20795,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 260 /* VariableDeclaration */) { + if (node.kind === 261 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 261 /* VariableDeclarationList */) { + if (node && node.kind === 262 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 243 /* VariableStatement */) { + if (node && node.kind === 244 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -20782,7 +20822,7 @@ function getNodeFlags(node) { var supportedLocaleDirectories = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]; function validateLocaleAndSetLanguage(locale, sys2, errors) { const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); + const matchResult = /^([a-z]+)(?:[_-]([a-z]+))?$/.exec(lowerCaseLocale); if (!matchResult) { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); @@ -20790,7 +20830,7 @@ function validateLocaleAndSetLanguage(locale, sys2, errors) { return; } const language = matchResult[1]; - const territory = matchResult[3]; + const territory = matchResult[2]; if (contains(supportedLocaleDirectories, lowerCaseLocale) && !trySetLanguageAndTerritory(language, territory, errors)) { trySetLanguageAndTerritory( language, @@ -20814,7 +20854,7 @@ function validateLocaleAndSetLanguage(locale, sys2, errors) { let fileContents = ""; try { fileContents = sys2.readFile(filePath); - } catch (e) { + } catch { if (errors2) { errors2.push(createCompilerDiagnostic(Diagnostics.Unable_to_open_file_0, filePath)); } @@ -20898,30 +20938,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { + if (expr.kind === 227 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return expr.name; - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 217 /* ParenthesizedExpression */: { + case 218 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 256 /* LabeledStatement */: { + case 257 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -20952,16 +20992,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 80 /* Identifier */: return declaration; - case 348 /* JSDocPropertyTag */: - case 341 /* JSDocParameterTag */: { + case 349 /* JSDocPropertyTag */: + case 342 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 166 /* QualifiedName */) { + if (name.kind === 167 /* QualifiedName */) { return name.right; } break; } - case 213 /* CallExpression */: - case 226 /* BinaryExpression */: { + case 214 /* CallExpression */: + case 227 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -20977,15 +21017,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 346 /* JSDocTypedefTag */: + case 347 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 340 /* JSDocEnumTag */: + case 341 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 277 /* ExportAssignment */: { + case 278 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -21213,13 +21253,6 @@ function getJSDocTags(node) { false ); } -function getJSDocTagsNoCache(node) { - return getJSDocTagsWorker( - node, - /*noCache*/ - true - ); -} function getFirstJSDocTag(node, predicate, noCache) { return find(getJSDocTagsWorker(node, noCache), predicate); } @@ -21230,10 +21263,10 @@ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 321 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 322 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 324 /* JSDocLink */ ? "link" : link.kind === 325 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 325 /* JSDocLink */ ? "link" : link.kind === 326 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && (link.text === "" || link.text.startsWith("://")) ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -21249,7 +21282,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 320 /* JSDoc */); + Debug.assert(node.parent.kind === 321 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -21277,7 +21310,7 @@ function isMemberName(node) { return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; + return node.kind === 179 /* SetAccessor */ || node.kind === 178 /* GetAccessor */; } function isPropertyAccessChain(node) { return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); @@ -21290,7 +21323,7 @@ function isCallChain(node) { } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); + return !!(node.flags & 64 /* OptionalChain */) && (kind === 212 /* PropertyAccessExpression */ || kind === 213 /* ElementAccessExpression */ || kind === 214 /* CallExpression */ || kind === 236 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -21302,7 +21335,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; + return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -21314,22 +21347,19 @@ function isNonNullChain(node) { return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 252 /* BreakStatement */ || node.kind === 251 /* ContinueStatement */; + return node.kind === 253 /* BreakStatement */ || node.kind === 252 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; + return node.kind === 281 /* NamespaceExport */ || node.kind === 280 /* NamedExports */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 348 /* JSDocPropertyTag */ || node.kind === 341 /* JSDocParameterTag */; -} -function isNode(node) { - return isNodeKind(node.kind); + return node.kind === 349 /* JSDocPropertyTag */ || node.kind === 342 /* JSDocParameterTag */; } function isNodeKind(kind) { - return kind >= 166 /* FirstNode */; + return kind >= 167 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 166 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -21345,11 +21375,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 210 /* ArrayLiteralExpression */: case 14 /* RegularExpressionLiteral */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 232 /* ClassExpression */: return true; } return false; @@ -21369,23 +21399,24 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 276 /* ImportSpecifier */: - return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 274 /* NamespaceImport */: - return node.parent.isTypeOnly; - case 273 /* ImportClause */: - case 271 /* ImportEqualsDeclaration */: + case 277 /* ImportSpecifier */: + return node.isTypeOnly || node.parent.parent.phaseModifier === 156 /* TypeKeyword */; + case 275 /* NamespaceImport */: + return node.parent.phaseModifier === 156 /* TypeKeyword */; + case 274 /* ImportClause */: + return node.phaseModifier === 156 /* TypeKeyword */; + case 272 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 280 /* NamespaceExport */: + case 281 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -21393,6 +21424,9 @@ function isTypeOnlyExportDeclaration(node) { function isTypeOnlyImportOrExportDeclaration(node) { return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node); } +function isPartOfTypeOnlyImportOrExportDeclaration(node) { + return findAncestor(node, isTypeOnlyImportOrExportDeclaration) !== void 0; +} function isStringTextContainingNode(node) { return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } @@ -21449,15 +21483,15 @@ function isModifier(node) { } function isEntityName(node) { const kind = node.kind; - return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 167 /* QualifiedName */ || kind === 80 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; + return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 168 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; + return kind === 80 /* Identifier */ || kind === 207 /* ObjectBindingPattern */ || kind === 208 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -21473,13 +21507,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return true; default: return false; @@ -21487,14 +21521,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 323 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 317 /* JSDocFunctionType */: - case 185 /* ConstructorType */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 324 /* JSDocSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: + case 185 /* FunctionType */: + case 318 /* JSDocFunctionType */: + case 186 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -21505,13 +21539,13 @@ function isFunctionOrModuleBlock(node) { } function isClassElement(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; + return kind === 177 /* Constructor */ || kind === 173 /* PropertyDeclaration */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */ || kind === 182 /* IndexSignature */ || kind === 176 /* ClassStaticBlockDeclaration */ || kind === 241 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */); + return node && (node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); + return node && (node.kind === 178 /* GetAccessor */ || node.kind === 179 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); @@ -21528,20 +21562,9 @@ function isClassInstanceProperty(node) { } function isMethodOrAccessor(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return true; - default: - return false; - } -} -function isNamedClassElement(node) { - switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return true; default: return false; @@ -21552,22 +21575,22 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 181 /* ConstructSignature */ || kind === 180 /* CallSignature */ || kind === 172 /* PropertySignature */ || kind === 174 /* MethodSignature */ || kind === 182 /* IndexSignature */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */ || kind === 355 /* NotEmittedTypeElement */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 304 /* PropertyAssignment */ || kind === 305 /* ShorthandPropertyAssignment */ || kind === 306 /* SpreadAssignment */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: return true; } return false; @@ -21575,23 +21598,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; + return kind === 208 /* ArrayBindingPattern */ || kind === 207 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; + return kind === 210 /* ArrayLiteralExpression */ || kind === 211 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; + return kind === 209 /* BindingElement */ || kind === 233 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: return true; } return false; @@ -21604,40 +21627,48 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 207 /* ObjectBindingPattern */: + case 211 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 208 /* BindingElement */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: + case 209 /* BindingElement */: + case 304 /* PropertyAssignment */: + // AssignmentProperty + case 305 /* ShorthandPropertyAssignment */: + // AssignmentProperty + case 306 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ArrayBindingPattern */: + case 210 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 208 /* BindingElement */: - case 232 /* OmittedExpression */: - case 230 /* SpreadElement */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: + case 209 /* BindingElement */: + case 233 /* OmittedExpression */: + // Elision + case 231 /* SpreadElement */: + // AssignmentRestElement + case 210 /* ArrayLiteralExpression */: + // ArrayAssignmentPattern + case 211 /* ObjectLiteralExpression */: + // ObjectAssignmentPattern case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + // DestructuringAssignmentTarget + case 212 /* PropertyAccessExpression */: + // DestructuringAssignmentTarget + case 213 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -21648,71 +21679,76 @@ function isArrayBindingOrAssignmentElement(node) { } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; + return kind === 212 /* PropertyAccessExpression */ || kind === 167 /* QualifiedName */ || kind === 206 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; + return kind === 212 /* PropertyAccessExpression */ || kind === 167 /* QualifiedName */; } function isCallLikeOrFunctionLikeExpression(node) { return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node); } function isCallLikeExpression(node) { switch (node.kind) { - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 170 /* Decorator */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 216 /* TaggedTemplateExpression */: + case 171 /* Decorator */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: + case 290 /* JsxOpeningFragment */: return true; + case 227 /* BinaryExpression */: + return node.operatorToken.kind === 104 /* InstanceOfKeyword */; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; + return node.kind === 214 /* CallExpression */ || node.kind === 215 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; + return kind === 229 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: + case 215 /* NewExpression */: + case 214 /* CallExpression */: + case 285 /* JsxElement */: + case 286 /* JsxSelfClosingElement */: + case 289 /* JsxFragment */: + case 216 /* TaggedTemplateExpression */: + case 210 /* ArrayLiteralExpression */: + case 218 /* ParenthesizedExpression */: + case 211 /* ObjectLiteralExpression */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: case 80 /* Identifier */: case 81 /* PrivateIdentifier */: + // technically this is only an Expression if it's in a `#field in expr` BinaryExpression case 14 /* RegularExpressionLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 110 /* ThisKeyword */: case 112 /* TrueKeyword */: case 108 /* SuperKeyword */: - case 235 /* NonNullExpression */: - case 233 /* ExpressionWithTypeArguments */: - case 236 /* MetaProperty */: + case 236 /* NonNullExpression */: + case 234 /* ExpressionWithTypeArguments */: + case 237 /* MetaProperty */: case 102 /* ImportKeyword */: - case 282 /* MissingDeclaration */: + // technically this is only an Expression if it's in a CallExpression + case 283 /* MissingDeclaration */: return true; default: return false; @@ -21723,13 +21759,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - case 220 /* DeleteExpression */: - case 221 /* TypeOfExpression */: - case 222 /* VoidExpression */: - case 223 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: + case 221 /* DeleteExpression */: + case 222 /* TypeOfExpression */: + case 223 /* VoidExpression */: + case 224 /* AwaitExpression */: + case 217 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -21737,9 +21773,9 @@ function isUnaryExpressionKind(kind) { } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return true; - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; default: return false; @@ -21750,7 +21786,7 @@ function isLiteralTypeLiteral(node) { case 106 /* NullKeyword */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -21761,16 +21797,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 227 /* ConditionalExpression */: - case 229 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 226 /* BinaryExpression */: - case 230 /* SpreadElement */: - case 234 /* AsExpression */: - case 232 /* OmittedExpression */: - case 355 /* CommaListExpression */: - case 354 /* PartiallyEmittedExpression */: - case 238 /* SatisfiesExpression */: + case 228 /* ConditionalExpression */: + case 230 /* YieldExpression */: + case 220 /* ArrowFunction */: + case 227 /* BinaryExpression */: + case 231 /* SpreadElement */: + case 235 /* AsExpression */: + case 233 /* OmittedExpression */: + case 357 /* CommaListExpression */: + case 356 /* PartiallyEmittedExpression */: + case 239 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -21778,20 +21814,17 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */; -} -function isNotEmittedOrPartiallyEmittedNode(node) { - return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); + return kind === 217 /* TypeAssertionExpression */ || kind === 235 /* AsExpression */; } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: return true; - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -21809,7 +21842,7 @@ function isExternalModuleIndicator(result) { return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; + return node.kind === 250 /* ForInStatement */ || node.kind === 251 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -21822,89 +21855,89 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; + return kind === 269 /* ModuleBlock */ || kind === 268 /* ModuleDeclaration */ || kind === 80 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */; + return kind === 269 /* ModuleBlock */ || kind === 268 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 267 /* ModuleDeclaration */; + return kind === 80 /* Identifier */ || kind === 268 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; + return kind === 276 /* NamedImports */ || kind === 275 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */; + return node.kind === 268 /* ModuleDeclaration */ || node.kind === 267 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 226 /* BinaryExpression */: - case 208 /* BindingElement */: - case 213 /* CallExpression */: - case 179 /* CallSignature */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 175 /* ClassStaticBlockDeclaration */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - case 212 /* ElementAccessExpression */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - case 281 /* ExportSpecifier */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 177 /* GetAccessor */: + case 220 /* ArrowFunction */: + case 227 /* BinaryExpression */: + case 209 /* BindingElement */: + case 214 /* CallExpression */: + case 180 /* CallSignature */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 176 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 186 /* ConstructorType */: + case 181 /* ConstructSignature */: + case 213 /* ElementAccessExpression */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: + case 278 /* ExportAssignment */: + case 279 /* ExportDeclaration */: + case 282 /* ExportSpecifier */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 185 /* FunctionType */: + case 178 /* GetAccessor */: case 80 /* Identifier */: - case 273 /* ImportClause */: - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 181 /* IndexSignature */: - case 264 /* InterfaceDeclaration */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: - case 317 /* JSDocFunctionType */: - case 341 /* JSDocParameterTag */: - case 348 /* JSDocPropertyTag */: - case 323 /* JSDocSignature */: - case 346 /* JSDocTypedefTag */: - case 322 /* JSDocTypeLiteral */: - case 291 /* JsxAttribute */: - case 292 /* JsxAttributes */: - case 293 /* JsxSpreadAttribute */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 267 /* ModuleDeclaration */: - case 202 /* NamedTupleMember */: - case 280 /* NamespaceExport */: - case 270 /* NamespaceExportDeclaration */: - case 274 /* NamespaceImport */: - case 214 /* NewExpression */: + case 274 /* ImportClause */: + case 272 /* ImportEqualsDeclaration */: + case 277 /* ImportSpecifier */: + case 182 /* IndexSignature */: + case 265 /* InterfaceDeclaration */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: + case 318 /* JSDocFunctionType */: + case 342 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: + case 324 /* JSDocSignature */: + case 347 /* JSDocTypedefTag */: + case 323 /* JSDocTypeLiteral */: + case 292 /* JsxAttribute */: + case 293 /* JsxAttributes */: + case 294 /* JsxSpreadAttribute */: + case 201 /* MappedType */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 268 /* ModuleDeclaration */: + case 203 /* NamedTupleMember */: + case 281 /* NamespaceExport */: + case 271 /* NamespaceExportDeclaration */: + case 275 /* NamespaceImport */: + case 215 /* NewExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - case 210 /* ObjectLiteralExpression */: - case 169 /* Parameter */: - case 211 /* PropertyAccessExpression */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 178 /* SetAccessor */: - case 304 /* ShorthandPropertyAssignment */: - case 307 /* SourceFile */: - case 305 /* SpreadAssignment */: + case 211 /* ObjectLiteralExpression */: + case 170 /* Parameter */: + case 212 /* PropertyAccessExpression */: + case 304 /* PropertyAssignment */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 179 /* SetAccessor */: + case 305 /* ShorthandPropertyAssignment */: + case 308 /* SourceFile */: + case 306 /* SpreadAssignment */: case 11 /* StringLiteral */: - case 265 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: - case 168 /* TypeParameter */: - case 260 /* VariableDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 188 /* TypeLiteral */: + case 169 /* TypeParameter */: + case 261 /* VariableDeclaration */: return true; default: return false; @@ -21912,53 +21945,53 @@ function canHaveSymbol(node) { } function canHaveLocals(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 241 /* Block */: - case 179 /* CallSignature */: - case 269 /* CaseBlock */: - case 299 /* CatchClause */: - case 175 /* ClassStaticBlockDeclaration */: - case 194 /* ConditionalType */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: - case 317 /* JSDocFunctionType */: - case 323 /* JSDocSignature */: - case 346 /* JSDocTypedefTag */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 267 /* ModuleDeclaration */: - case 178 /* SetAccessor */: - case 307 /* SourceFile */: - case 265 /* TypeAliasDeclaration */: + case 220 /* ArrowFunction */: + case 242 /* Block */: + case 180 /* CallSignature */: + case 270 /* CaseBlock */: + case 300 /* CatchClause */: + case 176 /* ClassStaticBlockDeclaration */: + case 195 /* ConditionalType */: + case 177 /* Constructor */: + case 186 /* ConstructorType */: + case 181 /* ConstructSignature */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 185 /* FunctionType */: + case 178 /* GetAccessor */: + case 182 /* IndexSignature */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: + case 318 /* JSDocFunctionType */: + case 324 /* JSDocSignature */: + case 347 /* JSDocTypedefTag */: + case 201 /* MappedType */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 268 /* ModuleDeclaration */: + case 179 /* SetAccessor */: + case 308 /* SourceFile */: + case 266 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 346 /* JSDocTypedefTag */ || kind === 338 /* JSDocCallbackTag */ || kind === 348 /* JSDocPropertyTag */ || kind === 202 /* NamedTupleMember */; + return kind === 220 /* ArrowFunction */ || kind === 209 /* BindingElement */ || kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 176 /* ClassStaticBlockDeclaration */ || kind === 177 /* Constructor */ || kind === 267 /* EnumDeclaration */ || kind === 307 /* EnumMember */ || kind === 282 /* ExportSpecifier */ || kind === 263 /* FunctionDeclaration */ || kind === 219 /* FunctionExpression */ || kind === 178 /* GetAccessor */ || kind === 274 /* ImportClause */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 277 /* ImportSpecifier */ || kind === 265 /* InterfaceDeclaration */ || kind === 292 /* JsxAttribute */ || kind === 175 /* MethodDeclaration */ || kind === 174 /* MethodSignature */ || kind === 268 /* ModuleDeclaration */ || kind === 271 /* NamespaceExportDeclaration */ || kind === 275 /* NamespaceImport */ || kind === 281 /* NamespaceExport */ || kind === 170 /* Parameter */ || kind === 304 /* PropertyAssignment */ || kind === 173 /* PropertyDeclaration */ || kind === 172 /* PropertySignature */ || kind === 179 /* SetAccessor */ || kind === 305 /* ShorthandPropertyAssignment */ || kind === 266 /* TypeAliasDeclaration */ || kind === 169 /* TypeParameter */ || kind === 261 /* VariableDeclaration */ || kind === 347 /* JSDocTypedefTag */ || kind === 339 /* JSDocCallbackTag */ || kind === 349 /* JSDocPropertyTag */ || kind === 203 /* NamedTupleMember */; } function isDeclarationStatementKind(kind) { - return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; + return kind === 263 /* FunctionDeclaration */ || kind === 283 /* MissingDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* InterfaceDeclaration */ || kind === 266 /* TypeAliasDeclaration */ || kind === 267 /* EnumDeclaration */ || kind === 268 /* ModuleDeclaration */ || kind === 273 /* ImportDeclaration */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 279 /* ExportDeclaration */ || kind === 278 /* ExportAssignment */ || kind === 271 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 353 /* NotEmittedStatement */; + return kind === 253 /* BreakStatement */ || kind === 252 /* ContinueStatement */ || kind === 260 /* DebuggerStatement */ || kind === 247 /* DoStatement */ || kind === 245 /* ExpressionStatement */ || kind === 243 /* EmptyStatement */ || kind === 250 /* ForInStatement */ || kind === 251 /* ForOfStatement */ || kind === 249 /* ForStatement */ || kind === 246 /* IfStatement */ || kind === 257 /* LabeledStatement */ || kind === 254 /* ReturnStatement */ || kind === 256 /* SwitchStatement */ || kind === 258 /* ThrowStatement */ || kind === 259 /* TryStatement */ || kind === 244 /* VariableStatement */ || kind === 248 /* WhileStatement */ || kind === 255 /* WithStatement */ || kind === 354 /* NotEmittedStatement */; } function isDeclaration(node) { - if (node.kind === 168 /* TypeParameter */) { - return node.parent && node.parent.kind !== 345 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 169 /* TypeParameter */) { + return node.parent && node.parent.kind !== 346 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -21973,9 +22006,9 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 241 /* Block */) return false; + if (node.kind !== 242 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { + if (node.parent.kind === 259 /* TryStatement */ || node.parent.kind === 300 /* CatchClause */) { return false; } } @@ -21983,50 +22016,54 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 242 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 284 /* ExternalModuleReference */ || kind === 167 /* QualifiedName */ || kind === 80 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; + return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 212 /* PropertyAccessExpression */ || kind === 296 /* JsxNamespacedName */; } function isJsxChild(node) { const kind = node.kind; - return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; + return kind === 285 /* JsxElement */ || kind === 295 /* JsxExpression */ || kind === 286 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 289 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; + return kind === 292 /* JsxAttribute */ || kind === 294 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; + return kind === 11 /* StringLiteral */ || kind === 295 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */; + return kind === 287 /* JsxOpeningElement */ || kind === 286 /* JsxSelfClosingElement */; +} +function isJsxCallLike(node) { + const kind = node.kind; + return kind === 287 /* JsxOpeningElement */ || kind === 286 /* JsxSelfClosingElement */ || kind === 290 /* JsxOpeningFragment */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; + return kind === 297 /* CaseClause */ || kind === 298 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 309 /* FirstJSDocNode */ && node.kind <= 351 /* LastJSDocNode */; + return node.kind >= 310 /* FirstJSDocNode */ && node.kind <= 352 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 320 /* JSDoc */ || node.kind === 319 /* JSDocNamepathType */ || node.kind === 321 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 321 /* JSDoc */ || node.kind === 320 /* JSDocNamepathType */ || node.kind === 322 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 327 /* FirstJSDocTagNode */ && node.kind <= 351 /* LastJSDocTagNode */; + return node.kind >= 328 /* FirstJSDocTagNode */ && node.kind <= 352 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 179 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 178 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) return false; @@ -22041,22 +22078,22 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 303 /* PropertyAssignment */: - case 306 /* EnumMember */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 173 /* PropertyDeclaration */: + case 304 /* PropertyAssignment */: + case 307 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 291 /* JsxAttribute */ || node.kind === 293 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 292 /* JsxAttribute */ || node.kind === 294 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */; + return node.kind === 184 /* TypeReference */ || node.kind === 234 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -22084,7 +22121,7 @@ function isStringLiteralLike(node) { return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 324 /* JSDocLink */ || node.kind === 325 /* JSDocLinkCode */ || node.kind === 326 /* JSDocLinkPlain */; + return node.kind === 325 /* JSDocLink */ || node.kind === 326 /* JSDocLinkCode */ || node.kind === 327 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -22092,7 +22129,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 318 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 319 /* JSDocVariadicType */; } function hasInternalAnnotation(range, sourceFile) { const comment = sourceFile.text.substring(range.pos, range.end); @@ -22101,7 +22138,7 @@ function hasInternalAnnotation(range, sourceFile) { function isInternalDeclaration(node, sourceFile) { sourceFile ?? (sourceFile = getSourceFileOfNode(node)); const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 170 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = sourceFile.text; @@ -22139,6 +22176,7 @@ var resolvingEmptyArray = []; var externalHelpersModuleNameText = "tslib"; var defaultMaximumTruncationLength = 160; var noTruncationMaximumTruncationLength = 1e6; +var defaultHoverMaximumTruncationLength = 500; function getDeclarationOfKind(symbol, kind) { const declarations = symbol.declarations; if (declarations) { @@ -22267,6 +22305,12 @@ function projectReferenceIsEqualTo(oldRef, newRef) { function moduleResolutionIsEqualTo(oldResolution, newResolution) { return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.alternateResult === newResolution.alternateResult; } +function getResolvedModuleFromResolution(resolution) { + return resolution.resolvedModule; +} +function getResolvedTypeReferenceDirectiveFromResolution(resolution) { + return resolution.resolvedTypeReferenceDirective; +} function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) { var _a; const alternateResult = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.alternateResult; @@ -22301,6 +22345,34 @@ function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, pack if (result) result.repopulateInfo = () => ({ moduleReference, mode, packageName: packageName === moduleReference ? void 0 : packageName }); return result; } +function createModeMismatchDetails(currentSourceFile) { + const ext = tryGetExtensionFromPath2(currentSourceFile.fileName); + const scope = currentSourceFile.packageJsonScope; + const targetExt = ext === ".ts" /* Ts */ ? ".mts" /* Mts */ : ext === ".js" /* Js */ ? ".mjs" /* Mjs */ : void 0; + const result = scope && !scope.contents.packageJsonContent.type ? targetExt ? chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1, + targetExt, + combinePaths(scope.packageDirectory, "package.json") + ) : chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0, + combinePaths(scope.packageDirectory, "package.json") + ) : targetExt ? chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module, + targetExt + ) : chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module + ); + result.repopulateInfo = () => true; + return result; +} function packageIdIsEqual(a, b) { return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version && a.peerDependencies === b.peerDependencies; } @@ -22340,7 +22412,7 @@ function aggregateChildData(node) { } } function getSourceFileOfNode(node) { - while (node && node.kind !== 307 /* SourceFile */) { + while (node && node.kind !== 308 /* SourceFile */) { node = node.parent; } return node; @@ -22353,11 +22425,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 241 /* Block */: - case 269 /* CaseBlock */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 242 /* Block */: + case 270 /* CaseBlock */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: return true; } return false; @@ -22491,7 +22563,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { } if (isJSDocNode(node) || node.kind === 12 /* JsxText */) { return skipTrivia( - (sourceFile || getSourceFileOfNode(node)).text, + (sourceFile ?? getSourceFileOfNode(node)).text, node.pos, /*stopAfterLineBreak*/ false, @@ -22502,14 +22574,15 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 352 /* SyntaxList */) { - const first2 = firstOrUndefined(getNodeChildren(node)); + if (node.kind === 353 /* SyntaxList */) { + sourceFile ?? (sourceFile = getSourceFileOfNode(node)); + const first2 = firstOrUndefined(getNodeChildren(node, sourceFile)); if (first2) { return getTokenPosOfNode(first2, sourceFile, includeJsDoc); } } return skipTrivia( - (sourceFile || getSourceFileOfNode(node)).text, + (sourceFile ?? getSourceFileOfNode(node)).text, node.pos, /*stopAfterLineBreak*/ false, @@ -22525,6 +22598,13 @@ function getNonDecoratorTokenPosOfNode(node, sourceFile) { } return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end); } +function getNonModifierTokenPosOfNode(node, sourceFile) { + const lastModifier = !nodeIsMissing(node) && canHaveModifiers(node) && node.modifiers ? last(node.modifiers) : void 0; + if (!lastModifier) { + return getTokenPosOfNode(node, sourceFile); + } + return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastModifier.end); +} function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) { return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia); } @@ -22532,7 +22612,16 @@ function isJSDocTypeExpressionOrChild(node) { return !!findAncestor(node, isJSDocTypeExpression); } function isExportNamespaceAsDefaultDeclaration(node) { - return !!(isExportDeclaration(node) && node.exportClause && isNamespaceExport(node.exportClause) && node.exportClause.name.escapedText === "default"); + return !!(isExportDeclaration(node) && node.exportClause && isNamespaceExport(node.exportClause) && moduleExportNameIsDefault(node.exportClause.name)); +} +function moduleExportNameTextUnescaped(node) { + return node.kind === 11 /* StringLiteral */ ? node.text : unescapeLeadingUnderscores(node.escapedText); +} +function moduleExportNameTextEscaped(node) { + return node.kind === 11 /* StringLiteral */ ? escapeLeadingUnderscores(node.text) : node.escapedText; +} +function moduleExportNameIsDefault(node) { + return (node.kind === 11 /* StringLiteral */ ? node.text : node.escapedText) === "default" /* Default */; } function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) { if (nodeIsMissing(node)) { @@ -22585,7 +22674,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Iterator: new Map(Object.entries({ @@ -22594,11 +22687,48 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( AsyncIterator: new Map(Object.entries({ es2015: emptyArray })), + ArrayBuffer: new Map(Object.entries({ + es2024: [ + "maxByteLength", + "resizable", + "resize", + "detached", + "transfer", + "transferToFixedLength" + ] + })), Atomics: new Map(Object.entries({ - es2017: emptyArray + es2017: [ + "add", + "and", + "compareExchange", + "exchange", + "isLockFree", + "load", + "or", + "store", + "sub", + "wait", + "notify", + "xor" + ], + es2024: [ + "waitAsync" + ], + esnext: [ + "pause" + ] })), SharedArrayBuffer: new Map(Object.entries({ - es2017: emptyArray + es2017: [ + "byteLength", + "slice" + ], + es2024: [ + "growable", + "maxByteLength", + "grow" + ] })), AsyncIterable: new Map(Object.entries({ es2018: emptyArray @@ -22620,6 +22750,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2018: [ "dotAll" + ], + es2024: [ + "unicodeSets" ] })), Reflect: new Map(Object.entries({ @@ -22666,6 +22799,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2022: [ "hasOwn" + ], + es2024: [ + "groupBy" ] })), NumberConstructor: new Map(Object.entries({ @@ -22697,6 +22833,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( "trunc", "fround", "cbrt" + ], + esnext: [ + "f16round" ] })), Map: new Map(Object.entries({ @@ -22706,11 +22845,25 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( "values" ] })), + MapConstructor: new Map(Object.entries({ + es2024: [ + "groupBy" + ] + })), Set: new Map(Object.entries({ es2015: [ "entries", "keys", "values" + ], + esnext: [ + "union", + "intersection", + "difference", + "symmetricDifference", + "isSubsetOf", + "isSupersetOf", + "isDisjointFrom" ] })), PromiseConstructor: new Map(Object.entries({ @@ -22725,6 +22878,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2021: [ "any" + ], + es2024: [ + "withResolvers" ] })), Symbol: new Map(Object.entries({ @@ -22791,7 +22947,7 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( es2022: [ "at" ], - esnext: [ + es2024: [ "isWellFormed", "toWellFormed" ] @@ -22836,6 +22992,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( SymbolConstructor: new Map(Object.entries({ es2020: [ "matchAll" + ], + esnext: [ + "metadata", + "dispose", + "asyncDispose" ] })), DataView: new Map(Object.entries({ @@ -22844,6 +23005,10 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( "setBigUint64", "getBigInt64", "getBigUint64" + ], + esnext: [ + "setFloat16", + "getFloat16" ] })), BigInt: new Map(Object.entries({ @@ -22862,7 +23027,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Uint8Array: new Map(Object.entries({ @@ -22871,7 +23040,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Uint8ClampedArray: new Map(Object.entries({ @@ -22880,7 +23053,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Int16Array: new Map(Object.entries({ @@ -22889,7 +23066,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Uint16Array: new Map(Object.entries({ @@ -22898,7 +23079,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Int32Array: new Map(Object.entries({ @@ -22907,7 +23092,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Uint32Array: new Map(Object.entries({ @@ -22916,16 +23105,27 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), + Float16Array: new Map(Object.entries({ + esnext: emptyArray + })), Float32Array: new Map(Object.entries({ es2022: [ "at" ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Float64Array: new Map(Object.entries({ @@ -22934,7 +23134,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), BigInt64Array: new Map(Object.entries({ @@ -22944,7 +23148,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), BigUint64Array: new Map(Object.entries({ @@ -22954,7 +23162,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize( ], es2023: [ "findLastIndex", - "findLast" + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" ] })), Error: new Map(Object.entries({ @@ -23039,7 +23251,7 @@ function isBlockOrCatchScoped(declaration) { } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; + return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 300 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -23057,10 +23269,10 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 268 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 307 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 308 /* SourceFile */ || node.kind === 268 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { return !!(module2.flags & 2048 /* GlobalAugmentation */); @@ -23070,9 +23282,9 @@ function isExternalModuleAugmentation(node) { } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: return isExternalModule(node.parent); - case 268 /* ModuleBlock */: + case 269 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -23082,7 +23294,7 @@ function getNonAugmentationDeclaration(symbol) { return (_a = symbol.declarations) == null ? void 0 : _a.find((d) => !isExternalModuleAugmentation(d) && !(isModuleDeclaration(d) && isGlobalScopeAugmentation(d))); } function isCommonJSContainingModuleKind(kind) { - return kind === 1 /* CommonJS */ || kind === 100 /* Node16 */ || kind === 199 /* NodeNext */; + return kind === 1 /* CommonJS */ || 100 /* Node16 */ <= kind && kind <= 199 /* NodeNext */; } function isEffectiveExternalModule(node, compilerOptions) { return isExternalModule(node) || isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator; @@ -23116,24 +23328,24 @@ function isAmbientPropertyDeclaration(node) { } function isBlockScope(node, parentNode) { switch (node.kind) { - case 307 /* SourceFile */: - case 269 /* CaseBlock */: - case 299 /* CatchClause */: - case 267 /* ModuleDeclaration */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 172 /* PropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 308 /* SourceFile */: + case 270 /* CaseBlock */: + case 300 /* CatchClause */: + case 268 /* ModuleDeclaration */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 173 /* PropertyDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return true; - case 241 /* Block */: + case 242 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -23141,9 +23353,9 @@ function isBlockScope(node, parentNode) { function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 338 /* JSDocCallbackTag */: - case 346 /* JSDocTypedefTag */: - case 323 /* JSDocSignature */: + case 339 /* JSDocCallbackTag */: + case 347 /* JSDocTypedefTag */: + case 324 /* JSDocSignature */: return true; default: assertType(node); @@ -23153,25 +23365,25 @@ function isDeclarationWithTypeParameters(node) { function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 317 /* JSDocFunctionType */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 345 /* JSDocTemplateTag */: - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 174 /* MethodSignature */: + case 182 /* IndexSignature */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 318 /* JSDocFunctionType */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 346 /* JSDocTemplateTag */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return true; default: assertType(node); @@ -23180,8 +23392,8 @@ function isDeclarationWithTypeParameterChildren(node) { } function isAnyImportSyntax(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: return true; default: return false; @@ -23195,15 +23407,15 @@ function isAnyImportOrRequireStatement(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 243 /* VariableStatement */: - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 244 /* VariableStatement */: + case 264 /* ClassDeclaration */: + case 263 /* FunctionDeclaration */: + case 268 /* ModuleDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: return true; default: return false; @@ -23235,7 +23447,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 168 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a; @@ -23245,12 +23457,13 @@ function tryGetTextOfPropertyName(name) { return ((_a = name.emitNode) == null ? void 0 : _a.autoGenerate) ? void 0 : name.escapedText; case 11 /* StringLiteral */: case 9 /* NumericLiteral */: + case 10 /* BigIntLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; - case 295 /* JsxNamespacedName */: + case 296 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -23266,17 +23479,17 @@ function entityNameToString(name) { case 81 /* PrivateIdentifier */: case 80 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 311 /* JSDocMemberName */: + case 312 /* JSDocMemberName */: return entityNameToString(name.left) + "#" + entityNameToString(name.right); - case 295 /* JsxNamespacedName */: + case 296 /* JsxNamespacedName */: return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); default: return Debug.assertNever(name); @@ -23387,7 +23600,7 @@ function scanTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 241 /* Block */) { + if (node.body && node.body.kind === 242 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -23399,7 +23612,7 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 307 /* SourceFile */: { + case 308 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -23411,47 +23624,49 @@ function getErrorSpanForNode(sourceFile, node) { } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 265 /* TypeAliasDeclaration */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 274 /* NamespaceImport */: + // This list is a work in progress. Add missing node kinds to improve their error + // spans. + case 261 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 268 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 266 /* TypeAliasDeclaration */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 275 /* NamespaceImport */: errorNode = node.name; break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: { + case 297 /* CaseClause */: + case 298 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 253 /* ReturnStatement */: - case 229 /* YieldExpression */: { + case 254 /* ReturnStatement */: + case 230 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 238 /* SatisfiesExpression */: { + case 239 /* SatisfiesExpression */: { const pos2 = skipTrivia(sourceFile.text, node.expression.end); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 350 /* JSDocSatisfiesTag */: { + case 351 /* JSDocSatisfiesTag */: { const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 176 /* Constructor */: { + case 177 /* Constructor */: { const constructorDeclaration = node; const start = skipTrivia(sourceFile.text, constructorDeclaration.pos); const scanner2 = createScanner( @@ -23488,7 +23703,7 @@ function getErrorSpanForNode(sourceFile, node) { return createTextSpanFromBounds(pos, errorNode.end); } function isGlobalSourceFile(node) { - return node.kind === 307 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function isExternalOrCommonJsModule(file) { return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== void 0; @@ -23519,10 +23734,12 @@ function isLet(node) { return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */; } function isSuperCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; + return n.kind === 214 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; + if (n.kind !== 214 /* CallExpression */) return false; + const e = n.expression; + return e.kind === 102 /* ImportKeyword */ || isMetaProperty(e) && e.keywordToken === 102 /* ImportKeyword */ && e.name.escapedText === "defer"; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -23531,7 +23748,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; + return node.kind === 245 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -23549,18 +23766,18 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } -var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; -var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; -var fullTripleSlashLibReferenceRegEx = /^(\/\/\/\s*/; -var fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; -var fullTripleSlashAMDModuleRegEx = /^\/\/\/\s*/; -var defaultLibReferenceRegEx = /^(\/\/\/\s*/; +var fullTripleSlashReferencePathRegEx = /^\/\/\/\s*/; +var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^\/\/\/\s*/; +var fullTripleSlashLibReferenceRegEx = /^\/\/\/\s*/; +var fullTripleSlashAMDReferencePathRegEx = /^\/\/\/\s*/; +var fullTripleSlashAMDModuleRegEx = /^\/\/\/\s*/; +var defaultLibReferenceRegEx = /^\/\/\/\s*/; function isPartOfTypeNode(node) { - if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { + if (183 /* FirstTypeNode */ <= node.kind && node.kind <= 206 /* LastTypeNode */) { return true; } switch (node.kind) { @@ -23577,61 +23794,64 @@ function isPartOfTypeNode(node) { case 146 /* NeverKeyword */: return true; case 116 /* VoidKeyword */: - return node.parent.kind !== 222 /* VoidExpression */; - case 233 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 223 /* VoidExpression */; + case 234 /* ExpressionWithTypeArguments */: return isPartOfTypeExpressionWithTypeArguments(node); - case 168 /* TypeParameter */: - return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; + case 169 /* TypeParameter */: + return node.parent.kind === 201 /* MappedType */ || node.parent.kind === 196 /* InferType */; + // Identifiers and qualified names may be type nodes, depending on their context. Climb + // above them to find the lowest container case 80 /* Identifier */: - if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 167 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 212 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } - Debug.assert(node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); - case 166 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + Debug.assert(node.kind === 80 /* Identifier */ || node.kind === 167 /* QualifiedName */ || node.kind === 212 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + // falls through + case 167 /* QualifiedName */: + case 212 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 186 /* TypeQuery */) { + if (parent2.kind === 187 /* TypeQuery */) { return false; } - if (parent2.kind === 205 /* ImportType */) { + if (parent2.kind === 206 /* ImportType */) { return !parent2.isTypeOf; } - if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { + if (183 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 206 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return isPartOfTypeExpressionWithTypeArguments(parent2); - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: return node === parent2.constraint; - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: return node === parent2.constraint; - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 169 /* Parameter */: - case 260 /* VariableDeclaration */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 170 /* Parameter */: + case 261 /* VariableDeclaration */: return node === parent2.type; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return node === parent2.type; - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: return node === parent2.type; - case 216 /* TypeAssertionExpression */: + case 217 /* TypeAssertionExpression */: return node === parent2.type; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 216 /* TaggedTemplateExpression */: return contains(parent2.typeArguments, node); } } @@ -23641,36 +23861,27 @@ function isPartOfTypeNode(node) { function isPartOfTypeExpressionWithTypeArguments(node) { return isJSDocImplementsTag(node.parent) || isJSDocAugmentsTag(node.parent) || isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); } -function isChildOfNodeWithKind(node, kind) { - while (node) { - if (node.kind === kind) { - return true; - } - node = node.parent; - } - return false; -} function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return visitor(node); - case 269 /* CaseBlock */: - case 241 /* Block */: - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 254 /* WithStatement */: - case 255 /* SwitchStatement */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 256 /* LabeledStatement */: - case 258 /* TryStatement */: - case 299 /* CatchClause */: + case 270 /* CaseBlock */: + case 242 /* Block */: + case 246 /* IfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 255 /* WithStatement */: + case 256 /* SwitchStatement */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: + case 257 /* LabeledStatement */: + case 259 /* TryStatement */: + case 300 /* CatchClause */: return forEachChild(node, traverse); } } @@ -23679,21 +23890,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 266 /* EnumDeclaration */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: + case 265 /* InterfaceDeclaration */: + case 268 /* ModuleDeclaration */: + case 266 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 168 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -23704,9 +23915,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 188 /* ArrayType */) { + if (node && node.kind === 189 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 183 /* TypeReference */) { + } else if (node && node.kind === 184 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -23714,36 +23925,33 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 264 /* InterfaceDeclaration */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 187 /* TypeLiteral */: + case 265 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 188 /* TypeLiteral */: return node.members; - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 208 /* BindingElement */: - case 306 /* EnumMember */: - case 169 /* Parameter */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 304 /* ShorthandPropertyAssignment */: - case 260 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 307 /* EnumMember */: + case 170 /* Parameter */: + case 304 /* PropertyAssignment */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 305 /* ShorthandPropertyAssignment */: + case 261 /* VariableDeclaration */: return true; } } return false; } -function isVariableLikeOrAccessor(node) { - return isVariableLike(node) || isAccessor(node); -} function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */; + return node.parent.kind === 262 /* VariableDeclarationList */ && node.parent.parent.kind === 244 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) return false; @@ -23758,13 +23966,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: return true; } return false; @@ -23774,20 +23982,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 256 /* LabeledStatement */) { + if (node.statement.kind !== 257 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 242 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; + return node && node.kind === 175 /* MethodDeclaration */ && node.parent.kind === 211 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */); + return (node.kind === 175 /* MethodDeclaration */ || node.kind === 178 /* GetAccessor */ || node.kind === 179 /* SetAccessor */) && (node.parent.kind === 211 /* ObjectLiteralExpression */ || node.parent.kind === 232 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -23802,9 +24010,6 @@ function forEachPropertyAssignment(objectLiteral, key, callback, key2) { return key === propName || key2 && key2 === propName ? callback(property) : void 0; }); } -function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { - return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0); -} function getTsConfigObjectLiteralExpression(tsConfigSourceFile) { if (tsConfigSourceFile && tsConfigSourceFile.statements.length) { const expression = tsConfigSourceFile.statements[0].expression; @@ -23842,63 +24047,66 @@ function getContainingClassExcludingClassDecorators(node) { return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 307 /* SourceFile */); + Debug.assert(node.kind !== 308 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 170 /* Decorator */: - if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { + case 171 /* Decorator */: + if (node.parent.kind === 170 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 267 /* ModuleDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 266 /* EnumDeclaration */: - case 307 /* SourceFile */: + // falls through + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 268 /* ModuleDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: + case 267 /* EnumDeclaration */: + case 308 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 172 /* PropertyDeclaration */: + // Arrow functions use the same scope, but may do so in a "delayed" manner + // For example, `const getThis = () => this` may be before a super() call in a derived constructor + case 220 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 173 /* PropertyDeclaration */: return true; - case 241 /* Block */: + case 242 /* Block */: switch (node.parent.kind) { - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return true; default: return false; @@ -23930,9 +24138,9 @@ function getNewTargetContainer(node) { ); if (container) { switch (container.kind) { - case 176 /* Constructor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 177 /* Constructor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: return container; } } @@ -23945,26 +24153,27 @@ function getSuperContainer(node, stopOnFunctions) { return void 0; } switch (node.kind) { - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: node = node.parent; break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + // falls through + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 176 /* ClassStaticBlockDeclaration */: return node; - case 170 /* Decorator */: - if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { + case 171 /* Decorator */: + if (node.parent.kind === 170 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -23974,28 +24183,25 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { + if (func.kind === 219 /* FunctionExpression */ || func.kind === 220 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */) { + while (parent2.kind === 218 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 214 /* CallExpression */ && parent2.expression === prev) { return parent2; } } } -function isSuperOrSuperProperty(node) { - return node.kind === 108 /* SuperKeyword */ || isSuperProperty(node); -} function isSuperProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; + return (kind === 212 /* PropertyAccessExpression */ || kind === 213 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; + return (kind === 212 /* PropertyAccessExpression */ || kind === 213 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a; @@ -24006,25 +24212,28 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: return node.typeName; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; + // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s. case 80 /* Identifier */: - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return node.tag; - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: return node.tagName; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return node.right; + case 290 /* JsxOpeningFragment */: + return node; default: return node.expression; } @@ -24034,19 +24243,19 @@ function nodeCanBeDecorated(useLegacyDecorators, node, parent2, grandparent) { return false; } switch (node.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return true; - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return !useLegacyDecorators; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 169 /* Parameter */: + case 170 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 177 /* Constructor */ || parent2.kind === 175 /* MethodDeclaration */ || parent2.kind === 179 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 264 /* ClassDeclaration */; } return false; } @@ -24058,13 +24267,13 @@ function nodeOrChildIsDecorated(useLegacyDecorators, node, parent2, grandparent) } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: + case 175 /* MethodDeclaration */: + case 179 /* SetAccessor */: + case 177 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -24112,7 +24321,7 @@ function isEmptyStringLiteral(node) { } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 286 /* JsxOpeningElement */ || parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxClosingElement */) { + if (parent2.kind === 287 /* JsxOpeningElement */ || parent2.kind === 286 /* JsxSelfClosingElement */ || parent2.kind === 288 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -24124,56 +24333,58 @@ function isExpressionNode(node) { case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 14 /* RegularExpressionLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 234 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - case 238 /* SatisfiesExpression */: - case 235 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 222 /* VoidExpression */: - case 220 /* DeleteExpression */: - case 221 /* TypeOfExpression */: - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - case 226 /* BinaryExpression */: - case 227 /* ConditionalExpression */: - case 230 /* SpreadElement */: - case 228 /* TemplateExpression */: - case 232 /* OmittedExpression */: - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: - case 229 /* YieldExpression */: - case 223 /* AwaitExpression */: - case 236 /* MetaProperty */: + case 210 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 216 /* TaggedTemplateExpression */: + case 235 /* AsExpression */: + case 217 /* TypeAssertionExpression */: + case 239 /* SatisfiesExpression */: + case 236 /* NonNullExpression */: + case 218 /* ParenthesizedExpression */: + case 219 /* FunctionExpression */: + case 232 /* ClassExpression */: + case 220 /* ArrowFunction */: + case 223 /* VoidExpression */: + case 221 /* DeleteExpression */: + case 222 /* TypeOfExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: + case 227 /* BinaryExpression */: + case 228 /* ConditionalExpression */: + case 231 /* SpreadElement */: + case 229 /* TemplateExpression */: + case 233 /* OmittedExpression */: + case 285 /* JsxElement */: + case 286 /* JsxSelfClosingElement */: + case 289 /* JsxFragment */: + case 230 /* YieldExpression */: + case 224 /* AwaitExpression */: return true; - case 233 /* ExpressionWithTypeArguments */: + case 237 /* MetaProperty */: + return !isImportCall(node.parent) || node.parent.expression !== node; + case 234 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 166 /* QualifiedName */: - while (node.parent.kind === 166 /* QualifiedName */) { + case 167 /* QualifiedName */: + while (node.parent.kind === 167 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 311 /* JSDocMemberName */: + return node.parent.kind === 187 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 312 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 187 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 81 /* PrivateIdentifier */: return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */; case 80 /* Identifier */: - if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 187 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } + // falls through case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: @@ -24187,64 +24398,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 306 /* EnumMember */: - case 303 /* PropertyAssignment */: - case 208 /* BindingElement */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 307 /* EnumMember */: + case 304 /* PropertyAssignment */: + case 209 /* BindingElement */: return parent2.initializer === node; - case 244 /* ExpressionStatement */: - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 253 /* ReturnStatement */: - case 254 /* WithStatement */: - case 255 /* SwitchStatement */: - case 296 /* CaseClause */: - case 257 /* ThrowStatement */: + case 245 /* ExpressionStatement */: + case 246 /* IfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 254 /* ReturnStatement */: + case 255 /* WithStatement */: + case 256 /* SwitchStatement */: + case 297 /* CaseClause */: + case 258 /* ThrowStatement */: return parent2.expression === node; - case 248 /* ForStatement */: + case 249 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: const forInOrOfStatement = parent2; - return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInOrOfStatement.expression === node; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 262 /* VariableDeclarationList */ || forInOrOfStatement.expression === node; + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: return node === parent2.expression; - case 239 /* TemplateSpan */: + case 240 /* TemplateSpan */: return node === parent2.expression; - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return node === parent2.expression; - case 170 /* Decorator */: - case 294 /* JsxExpression */: - case 293 /* JsxSpreadAttribute */: - case 305 /* SpreadAssignment */: + case 171 /* Decorator */: + case 295 /* JsxExpression */: + case 294 /* JsxSpreadAttribute */: + case 306 /* SpreadAssignment */: return true; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) { + while (node.kind === 167 /* QualifiedName */ || node.kind === 80 /* Identifier */) { node = node.parent; } - return node.kind === 186 /* TypeQuery */; + return node.kind === 187 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */; + return node.kind === 272 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 284 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -24254,17 +24465,14 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */; + return node.kind === 272 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 284 /* ExternalModuleReference */; } function isFullSourceFile(sourceFile) { - return (sourceFile == null ? void 0 : sourceFile.kind) === 307 /* SourceFile */; + return (sourceFile == null ? void 0 : sourceFile.kind) === 308 /* SourceFile */; } function isSourceFileJS(file) { return isInJSFile(file); } -function isSourceFileNotJS(file) { - return !isInJSFile(file); -} function isInJSFile(node) { return !!node && !!(node.flags & 524288 /* JavaScriptFile */); } @@ -24281,7 +24489,7 @@ function isJSDocIndexSignature(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 213 /* CallExpression */) { + if (callExpression.kind !== 214 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -24358,9 +24566,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 219 /* FunctionExpression */ || e.kind === 220 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { + if (initializer.kind === 219 /* FunctionExpression */ || initializer.kind === 232 /* ClassExpression */ || initializer.kind === 220 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -24551,7 +24759,7 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; @@ -24564,33 +24772,50 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 263 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); +} +function canHaveModuleSpecifier(node) { + switch (node == null ? void 0 : node.kind) { + case 261 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 274 /* ImportClause */: + case 281 /* NamespaceExport */: + case 275 /* NamespaceImport */: + case 282 /* ExportSpecifier */: + case 277 /* ImportSpecifier */: + case 206 /* ImportType */: + return true; + } + return false; } function tryGetModuleSpecifierFromDeclaration(node) { var _a, _b; switch (node.kind) { - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: + case 261 /* VariableDeclaration */: + case 209 /* BindingElement */: return (_a = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a.arguments[0]; - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 351 /* JSDocImportTag */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 352 /* JSDocImportTag */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 273 /* ImportClause */: - case 280 /* NamespaceExport */: + case 274 /* ImportClause */: + case 281 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 274 /* NamespaceImport */: - case 281 /* ExportSpecifier */: + case 275 /* NamespaceImport */: + case 282 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); - case 205 /* ImportType */: + case 206 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; default: Debug.assertNever(node); @@ -24601,38 +24826,43 @@ function importFromModuleSpecifier(node) { } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 351 /* JSDocImportTag */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 352 /* JSDocImportTag */: return node.parent; - case 283 /* ExternalModuleReference */: + case 284 /* ExternalModuleReference */: return node.parent.parent; - case 213 /* CallExpression */: + case 214 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false ) ? node.parent : void 0; - case 201 /* LiteralType */: - Debug.assert(isStringLiteral(node)); + case 202 /* LiteralType */: + if (!isStringLiteral(node)) { + break; + } return tryCast(node.parent.parent, isImportTypeNode); default: return void 0; } } +function shouldRewriteModuleSpecifier(specifier, compilerOptions) { + return !!compilerOptions.rewriteRelativeImportExtensions && pathIsRelative(specifier) && !isDeclarationFileName(specifier) && hasTSFileExtension(specifier); +} function getExternalModuleName(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 351 /* JSDocImportTag */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 352 /* JSDocImportTag */: return node.moduleSpecifier; - case 271 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 205 /* ImportType */: + case 272 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 284 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 206 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 213 /* CallExpression */: + case 214 /* CallExpression */: return node.arguments[0]; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -24640,18 +24870,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return node; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return (node.kind === 272 /* ImportDeclaration */ || node.kind === 351 /* JSDocImportTag */) && !!node.importClause && !!node.importClause.name; + return (node.kind === 273 /* ImportDeclaration */ || node.kind === 352 /* JSDocImportTag */) && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -24664,17 +24894,15 @@ function forEachImportClauseDeclaration(node, action) { } } function hasQuestionToken(node) { - if (node) { - switch (node.kind) { - case 169 /* Parameter */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 304 /* ShorthandPropertyAssignment */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return node.questionToken !== void 0; - } + switch (node.kind) { + case 170 /* Parameter */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 305 /* ShorthandPropertyAssignment */: + case 304 /* PropertyAssignment */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + return node.questionToken !== void 0; } return false; } @@ -24684,7 +24912,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 346 /* JSDocTypedefTag */ || node.kind === 338 /* JSDocCallbackTag */ || node.kind === 340 /* JSDocEnumTag */; + return node.kind === 347 /* JSDocTypedefTag */ || node.kind === 339 /* JSDocCallbackTag */ || node.kind === 341 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -24697,12 +24925,12 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return node.initializer; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return node.initializer; } } @@ -24710,26 +24938,26 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 268 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) { + if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */) { return true; } switch (node.kind) { case 80 /* Identifier */: case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 166 /* QualifiedName */: - case 236 /* MetaProperty */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 208 /* BindingElement */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 167 /* QualifiedName */: + case 237 /* MetaProperty */: + case 213 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 209 /* BindingElement */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return true; default: return false; @@ -24737,72 +24965,72 @@ function canHaveFlowNode(node) { } function canHaveJSDoc(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 226 /* BinaryExpression */: - case 241 /* Block */: - case 252 /* BreakStatement */: - case 179 /* CallSignature */: - case 296 /* CaseClause */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 175 /* ClassStaticBlockDeclaration */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - case 251 /* ContinueStatement */: - case 259 /* DebuggerStatement */: - case 246 /* DoStatement */: - case 212 /* ElementAccessExpression */: - case 242 /* EmptyStatement */: + case 220 /* ArrowFunction */: + case 227 /* BinaryExpression */: + case 242 /* Block */: + case 253 /* BreakStatement */: + case 180 /* CallSignature */: + case 297 /* CaseClause */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 176 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 186 /* ConstructorType */: + case 181 /* ConstructSignature */: + case 252 /* ContinueStatement */: + case 260 /* DebuggerStatement */: + case 247 /* DoStatement */: + case 213 /* ElementAccessExpression */: + case 243 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - case 281 /* ExportSpecifier */: - case 244 /* ExpressionStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 177 /* GetAccessor */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: + case 278 /* ExportAssignment */: + case 279 /* ExportDeclaration */: + case 282 /* ExportSpecifier */: + case 245 /* ExpressionStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 249 /* ForStatement */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 185 /* FunctionType */: + case 178 /* GetAccessor */: case 80 /* Identifier */: - case 245 /* IfStatement */: - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 264 /* InterfaceDeclaration */: - case 317 /* JSDocFunctionType */: - case 323 /* JSDocSignature */: - case 256 /* LabeledStatement */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 267 /* ModuleDeclaration */: - case 202 /* NamedTupleMember */: - case 270 /* NamespaceExportDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 169 /* Parameter */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 253 /* ReturnStatement */: - case 240 /* SemicolonClassElement */: - case 178 /* SetAccessor */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: - case 255 /* SwitchStatement */: - case 257 /* ThrowStatement */: - case 258 /* TryStatement */: - case 265 /* TypeAliasDeclaration */: - case 168 /* TypeParameter */: - case 260 /* VariableDeclaration */: - case 243 /* VariableStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: + case 246 /* IfStatement */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 182 /* IndexSignature */: + case 265 /* InterfaceDeclaration */: + case 318 /* JSDocFunctionType */: + case 324 /* JSDocSignature */: + case 257 /* LabeledStatement */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 268 /* ModuleDeclaration */: + case 203 /* NamedTupleMember */: + case 271 /* NamespaceExportDeclaration */: + case 211 /* ObjectLiteralExpression */: + case 170 /* Parameter */: + case 218 /* ParenthesizedExpression */: + case 212 /* PropertyAccessExpression */: + case 304 /* PropertyAssignment */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 254 /* ReturnStatement */: + case 241 /* SemicolonClassElement */: + case 179 /* SetAccessor */: + case 305 /* ShorthandPropertyAssignment */: + case 306 /* SpreadAssignment */: + case 256 /* SwitchStatement */: + case 258 /* ThrowStatement */: + case 259 /* TryStatement */: + case 266 /* TypeAliasDeclaration */: + case 169 /* TypeParameter */: + case 261 /* VariableDeclaration */: + case 244 /* VariableStatement */: + case 248 /* WhileStatement */: + case 255 /* WithStatement */: return true; default: return false; @@ -24818,11 +25046,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, node.jsDoc)); } - if (node.kind === 169 /* Parameter */) { + if (node.kind === 170 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 168 /* TypeParameter */) { + if (node.kind === 169 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -24846,7 +25074,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isAssignmentExpression(node)) { + if (parent2.kind === 304 /* PropertyAssignment */ || parent2.kind === 278 /* ExportAssignment */ || parent2.kind === 173 /* PropertyDeclaration */ || parent2.kind === 245 /* ExpressionStatement */ && node.kind === 212 /* PropertyAccessExpression */ || parent2.kind === 254 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isAssignmentExpression(node)) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isAssignmentExpression(parent2))) { return parent2.parent; @@ -24925,35 +25153,35 @@ function getAssignmentTarget(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: const binaryExpression = parent2; const binaryOperator = binaryExpression.operatorToken.kind; return isAssignmentOperator(binaryOperator) && binaryExpression.left === node ? binaryExpression : void 0; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: const unaryExpression = parent2; const unaryOperator = unaryExpression.operator; return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: const forInOrOfStatement = parent2; return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0; - case 217 /* ParenthesizedExpression */: - case 209 /* ArrayLiteralExpression */: - case 230 /* SpreadElement */: - case 235 /* NonNullExpression */: + case 218 /* ParenthesizedExpression */: + case 210 /* ArrayLiteralExpression */: + case 231 /* SpreadElement */: + case 236 /* NonNullExpression */: node = parent2; break; - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: node = parent2.parent; break; - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return void 0; } node = parent2.parent; break; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: if (parent2.name === node) { return void 0; } @@ -24971,14 +25199,14 @@ function getAssignmentTargetKind(node) { return 0 /* None */; } switch (target.kind) { - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: const binaryOperator = target.operatorToken.kind; return binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return 2 /* Compound */; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: return 1 /* Definite */; } } @@ -24987,7 +25215,7 @@ function isAssignmentTarget(node) { } function isCompoundLikeAssignment(assignment) { const right = skipParentheses(assignment.right); - return right.kind === 226 /* BinaryExpression */ && isShiftOperatorOrHigher(right.operatorToken.kind); + return right.kind === 227 /* BinaryExpression */ && isShiftOperatorOrHigher(right.operatorToken.kind); } function isInCompoundLikeAssignment(node) { const target = getAssignmentTarget(node); @@ -24999,22 +25227,22 @@ function isInCompoundLikeAssignment(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 241 /* Block */: - case 243 /* VariableStatement */: - case 254 /* WithStatement */: - case 245 /* IfStatement */: - case 255 /* SwitchStatement */: - case 269 /* CaseBlock */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 256 /* LabeledStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 258 /* TryStatement */: - case 299 /* CatchClause */: + case 242 /* Block */: + case 244 /* VariableStatement */: + case 255 /* WithStatement */: + case 246 /* IfStatement */: + case 256 /* SwitchStatement */: + case 270 /* CaseBlock */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: + case 257 /* LabeledStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 259 /* TryStatement */: + case 300 /* CatchClause */: return true; } return false; @@ -25029,14 +25257,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 196 /* ParenthesizedType */); + return walkUp(node, 197 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 217 /* ParenthesizedExpression */); + return walkUp(node, 218 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 196 /* ParenthesizedType */) { + while (node && node.kind === 197 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -25047,15 +25275,15 @@ function skipTypeParentheses(node) { return node; } function skipParentheses(node, excludeJSDocTypeAssertions) { - const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | 16 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */; + const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */; return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { + if (node.kind !== 212 /* PropertyAccessExpression */ && node.kind !== 213 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 220 /* DeleteExpression */; + return node && node.kind === 221 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -25074,6 +25302,7 @@ function getDeclarationFromName(name) { case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: if (isComputedPropertyName(parent2)) return parent2.parent; + // falls through case 80 /* Identifier */: if (isDeclaration(parent2)) { return parent2.name === name ? parent2 : void 0; @@ -25091,55 +25320,49 @@ function getDeclarationFromName(name) { } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 168 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 306 /* EnumMember */: - case 303 /* PropertyAssignment */: - case 211 /* PropertyAccessExpression */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 307 /* EnumMember */: + case 304 /* PropertyAssignment */: + case 212 /* PropertyAccessExpression */: return parent2.name === node; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return parent2.right === node; - case 208 /* BindingElement */: - case 276 /* ImportSpecifier */: + case 209 /* BindingElement */: + case 277 /* ImportSpecifier */: return parent2.propertyName === node; - case 281 /* ExportSpecifier */: - case 291 /* JsxAttribute */: - case 285 /* JsxSelfClosingElement */: - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: + case 282 /* ExportSpecifier */: + case 292 /* JsxAttribute */: + case 286 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 288 /* JsxClosingElement */: return true; } return false; } -function isAliasSymbolDeclaration(node) { - if (node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { - return true; - } - return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableExpression(node.parent.right)); -} function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 273 /* ImportClause */: - case 276 /* ImportSpecifier */: - case 274 /* NamespaceImport */: - case 281 /* ExportSpecifier */: - case 277 /* ExportAssignment */: - case 271 /* ImportEqualsDeclaration */: - case 280 /* NamespaceExport */: + case 274 /* ImportClause */: + case 277 /* ImportSpecifier */: + case 275 /* NamespaceImport */: + case 282 /* ExportSpecifier */: + case 278 /* ExportAssignment */: + case 272 /* ImportEqualsDeclaration */: + case 281 /* NamespaceExport */: return node.parent; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 166 /* QualifiedName */); + } while (node.parent.kind === 167 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -25154,7 +25377,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 305 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 304 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -25205,7 +25428,7 @@ function getAncestor(node, kind) { return void 0; } function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; + return 83 /* FirstKeyword */ <= token && token <= 166 /* LastKeyword */; } function isPunctuation(token) { return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; @@ -25214,22 +25437,15 @@ function isKeywordOrPunctuation(token) { return isKeyword(token) || isPunctuation(token); } function isContextualKeyword(token) { - return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; + return 128 /* FirstContextualKeyword */ <= token && token <= 166 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); } -function isFutureReservedKeyword(token) { - return 119 /* FirstFutureReservedWord */ <= token && token <= 127 /* LastFutureReservedWord */; -} function isStringANonContextualKeyword(name) { const token = stringToToken(name); return token !== void 0 && isNonContextualKeyword(token); } -function isStringAKeyword(name) { - const token = stringToToken(name); - return token !== void 0 && isKeyword(token); -} function isIdentifierANonContextualKeyword(node) { const originalKeywordKind = identifierToKeywordKind(node); return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind); @@ -25251,13 +25467,14 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 219 /* ArrowFunction */: + // falls through + case 220 /* ArrowFunction */: if (hasSyntacticModifier(node, 1024 /* Async */)) { flags |= 2 /* Async */; } @@ -25270,10 +25487,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 1024 /* Async */); } return false; @@ -25289,7 +25506,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { + if (!(name.kind === 168 /* ComputedPropertyName */ || name.kind === 213 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -25303,8 +25520,9 @@ function getPropertyNameForPropertyNameNode(name) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: + case 10 /* BigIntLiteral */: return escapeLeadingUnderscores(name.text); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -25315,7 +25533,7 @@ function getPropertyNameForPropertyNameNode(name) { return nameExpression.operand.text; } return void 0; - case 295 /* JsxNamespacedName */: + case 296 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -25338,9 +25556,6 @@ function getTextOfIdentifierOrLiteral(node) { function getEscapedTextOfIdentifierOrLiteral(node) { return isMemberName(node) ? node.escapedText : isJsxNamespacedName(node) ? getEscapedTextOfJsxNamespacedName(node) : escapeLeadingUnderscores(node.text); } -function getPropertyNameForUniqueESSymbol(symbol) { - return `__@${getSymbolId(symbol)}@${symbol.escapedName}`; -} function getSymbolNameForPrivateIdentifier(containingClassSymbol, description3) { return `__#${getSymbolId(containingClassSymbol)}@${description3}`; } @@ -25350,26 +25565,23 @@ function isKnownSymbol(symbol) { function isPrivateIdentifierSymbol(symbol) { return startsWith(symbol.escapedName, "__#"); } -function isESSymbolIdentifier(node) { - return node.kind === 80 /* Identifier */ && node.escapedText === "Symbol"; -} function isProtoSetter(node) { return isIdentifier(node) ? idText(node) === "__proto__" : isStringLiteral(node) && node.text === "__proto__"; } function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: if (classHasDeclaredOrExplicitlyAssignedName(node)) { return false; } break; - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: if (node.name) { return false; } break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: break; default: return false; @@ -25378,19 +25590,19 @@ function isAnonymousFunctionDefinition(node, cb) { } function isNamedEvaluationSource(node) { switch (node.kind) { - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 169 /* Parameter */: + case 170 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 208 /* BindingElement */: + case 209 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return !!node.initializer; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 77 /* AmpersandAmpersandEqualsToken */: @@ -25399,7 +25611,7 @@ function isNamedEvaluationSource(node) { return isIdentifier(node.left); } break; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return true; } return false; @@ -25407,18 +25619,18 @@ function isNamedEvaluationSource(node) { function isNamedEvaluation(node, cb) { if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 173 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -25427,24 +25639,21 @@ function isPushOrUnshiftIdentifier(node) { } function isPartOfParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 169 /* Parameter */; + return root.kind === 170 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 208 /* BindingElement */) { + while (node.kind === 209 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 307 /* SourceFile */; + return kind === 177 /* Constructor */ || kind === 219 /* FunctionExpression */ || kind === 263 /* FunctionDeclaration */ || kind === 220 /* ArrowFunction */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */ || kind === 268 /* ModuleDeclaration */ || kind === 308 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); } -function getOriginalSourceFile(sourceFile) { - return getParseTreeNode(sourceFile, isSourceFile) || sourceFile; -} var Associativity = /* @__PURE__ */ ((Associativity2) => { Associativity2[Associativity2["Left"] = 0] = "Left"; Associativity2[Associativity2["Right"] = 1] = "Right"; @@ -25452,22 +25661,22 @@ var Associativity = /* @__PURE__ */ ((Associativity2) => { })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 215 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 214 /* NewExpression */: + case 215 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 224 /* PrefixUnaryExpression */: - case 221 /* TypeOfExpression */: - case 222 /* VoidExpression */: - case 220 /* DeleteExpression */: - case 223 /* AwaitExpression */: - case 227 /* ConditionalExpression */: - case 229 /* YieldExpression */: + case 225 /* PrefixUnaryExpression */: + case 222 /* TypeOfExpression */: + case 223 /* VoidExpression */: + case 221 /* DeleteExpression */: + case 224 /* AwaitExpression */: + case 228 /* ConditionalExpression */: + case 230 /* YieldExpression */: return 1 /* Right */; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: switch (operator) { case 43 /* AsteriskAsteriskToken */: case 64 /* EqualsToken */: @@ -25493,13 +25702,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 215 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 226 /* BinaryExpression */) { + if (expression.kind === 227 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { + } else if (expression.kind === 225 /* PrefixUnaryExpression */ || expression.kind === 226 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -25511,8 +25720,8 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { OperatorPrecedence2[OperatorPrecedence2["Yield"] = 2] = "Yield"; OperatorPrecedence2[OperatorPrecedence2["Assignment"] = 3] = "Assignment"; OperatorPrecedence2[OperatorPrecedence2["Conditional"] = 4] = "Conditional"; - OperatorPrecedence2[OperatorPrecedence2["Coalesce"] = 4 /* Conditional */] = "Coalesce"; OperatorPrecedence2[OperatorPrecedence2["LogicalOR"] = 5] = "LogicalOR"; + OperatorPrecedence2[OperatorPrecedence2["Coalesce"] = 5 /* LogicalOR */] = "Coalesce"; OperatorPrecedence2[OperatorPrecedence2["LogicalAND"] = 6] = "LogicalAND"; OperatorPrecedence2[OperatorPrecedence2["BitwiseOR"] = 7] = "BitwiseOR"; OperatorPrecedence2[OperatorPrecedence2["BitwiseXOR"] = 8] = "BitwiseXOR"; @@ -25535,15 +25744,15 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return 0 /* Comma */; - case 230 /* SpreadElement */: + case 231 /* SpreadElement */: return 1 /* Spread */; - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return 2 /* Yield */; - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return 4 /* Conditional */; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: switch (operatorKind) { case 28 /* CommaToken */: return 0 /* Comma */; @@ -25567,27 +25776,28 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 216 /* TypeAssertionExpression */: - case 235 /* NonNullExpression */: - case 224 /* PrefixUnaryExpression */: - case 221 /* TypeOfExpression */: - case 222 /* VoidExpression */: - case 220 /* DeleteExpression */: - case 223 /* AwaitExpression */: + // TODO: Should prefix `++` and `--` be moved to the `Update` precedence? + case 217 /* TypeAssertionExpression */: + case 236 /* NonNullExpression */: + case 225 /* PrefixUnaryExpression */: + case 222 /* TypeOfExpression */: + case 223 /* VoidExpression */: + case 221 /* DeleteExpression */: + case 224 /* AwaitExpression */: return 16 /* Unary */; - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return 17 /* Update */; - case 213 /* CallExpression */: + case 214 /* CallExpression */: return 18 /* LeftHandSide */; - case 214 /* NewExpression */: + case 215 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 215 /* TaggedTemplateExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 236 /* MetaProperty */: + case 216 /* TaggedTemplateExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: + case 237 /* MetaProperty */: return 19 /* Member */; - case 234 /* AsExpression */: - case 238 /* SatisfiesExpression */: + case 235 /* AsExpression */: + case 239 /* SatisfiesExpression */: return 11 /* Relational */; case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: @@ -25599,19 +25809,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 231 /* ClassExpression */: + case 210 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 232 /* ClassExpression */: case 14 /* RegularExpressionLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - case 217 /* ParenthesizedExpression */: - case 232 /* OmittedExpression */: - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: + case 229 /* TemplateExpression */: + case 218 /* ParenthesizedExpression */: + case 233 /* OmittedExpression */: + case 285 /* JsxElement */: + case 286 /* JsxSelfClosingElement */: + case 289 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -25620,7 +25830,7 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { function getBinaryOperatorPrecedence(kind) { switch (kind) { case 61 /* QuestionQuestionToken */: - return 4 /* Coalesce */; + return 5 /* Coalesce */; case 57 /* BarBarToken */: return 5 /* LogicalOR */; case 56 /* AmpersandAmpersandToken */: @@ -25664,7 +25874,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return !!i.expression; case 12 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -25747,9 +25957,9 @@ function containsInvalidEscapeFlag(node) { function hasInvalidEscape(template) { return template && !!(isNoSubstitutionTemplateLiteral(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); } -var doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; -var singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; -var backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; +var doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\u2028\u2029\u0085]/g; +var singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\u2028\u2029\u0085]/g; +var backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u0009\u000b-\u001f\u2028\u2029\u0085]/g; var escapedCharsMap = new Map(Object.entries({ " ": "\\t", "\v": "\\v", @@ -26052,11 +26262,11 @@ function getOwnEmitOutputFilePath(fileName, host, extension) { return emitOutputFilePathWithoutExtension + extension; } function getDeclarationEmitOutputFilePath(fileName, host) { - return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)); + return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host); } -function getDeclarationEmitOutputFilePathWorker(fileName, options, currentDirectory, commonSourceDirectory, getCanonicalFileName) { +function getDeclarationEmitOutputFilePathWorker(fileName, options, host) { const outputDir = options.declarationDir || options.outDir; - const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) : fileName; + const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName; const declarationExtension = getDeclarationEmitExtensionForPath(path); return removeFileExtension(path) + declarationExtension; } @@ -26069,6 +26279,12 @@ function getDeclarationEmitExtensionForPath(path) { function getPossibleOriginalInputExtensionForExtension(path) { return fileExtensionIsOneOf(path, [".d.mts" /* Dmts */, ".mjs" /* Mjs */, ".mts" /* Mts */]) ? [".mts" /* Mts */, ".mjs" /* Mjs */] : fileExtensionIsOneOf(path, [".d.cts" /* Dcts */, ".cjs" /* Cjs */, ".cts" /* Cts */]) ? [".cts" /* Cts */, ".cjs" /* Cjs */] : fileExtensionIsOneOf(path, [`.d.json.ts`]) ? [".json" /* Json */] : [".tsx" /* Tsx */, ".ts" /* Ts */, ".jsx" /* Jsx */, ".js" /* Js */]; } +function getPossibleOriginalInputPathWithoutChangingExt(filePath, ignoreCase, outputDir, getCommonSourceDirectory2) { + return outputDir ? resolvePath( + getCommonSourceDirectory2(), + getRelativePathFromDirectory(outputDir, filePath, ignoreCase) + ) : filePath; +} function getPathsBasePath(options, host) { var _a; if (!options.paths) return void 0; @@ -26099,7 +26315,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) { if (forceDtsEmit) return true; if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) return false; if (!isJsonSourceFile(sourceFile)) return true; - if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) return false; + if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false; if (options.outFile) return true; if (!options.outDir) return false; if (options.rootDir || options.composite && options.configFilePath) { @@ -26182,7 +26398,7 @@ function isThisIdentifier(node) { function isInTypeQuery(node) { return !!findAncestor( node, - (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" + (n) => n.kind === 187 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 167 /* QualifiedName */ ? false : "quit" ); } function isThisInTypeQuery(node) { @@ -26192,7 +26408,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 186 /* TypeQuery */; + return node.parent.kind === 187 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -26204,9 +26420,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 177 /* GetAccessor */) { + if (accessor.kind === 178 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 178 /* SetAccessor */) { + } else if (accessor.kind === 179 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -26222,10 +26438,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 177 /* GetAccessor */ && !getAccessor) { + if (member.kind === 178 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 178 /* SetAccessor */ && !setAccessor) { + if (member.kind === 179 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -26256,7 +26472,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 320 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 321 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -26446,7 +26662,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 166 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -26557,7 +26773,7 @@ function modifierToFlag(token) { return 8192 /* In */; case 147 /* OutKeyword */: return 16384 /* Out */; - case 170 /* Decorator */: + case 171 /* Decorator */: return 32768 /* Decorator */; } return 0 /* None */; @@ -26604,9 +26820,6 @@ function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) { function isAssignmentExpression(node, excludeCompoundAssignment) { return isBinaryExpression(node) && (excludeCompoundAssignment ? node.operatorToken.kind === 64 /* EqualsToken */ : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } -function isLeftHandSideOfAssignment(node) { - return isAssignmentExpression(node.parent) && node.parent.left === node; -} function isDestructuringAssignment(node) { if (isAssignmentExpression( node, @@ -26614,7 +26827,7 @@ function isDestructuringAssignment(node) { true )) { const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; + return kind === 211 /* ObjectLiteralExpression */ || kind === 210 /* ArrayLiteralExpression */; } return false; } @@ -26628,12 +26841,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 80 /* Identifier */: return node; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 80 /* Identifier */); @@ -26641,7 +26854,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 237 /* MetaProperty */ || node.kind === 212 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 218 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -26668,7 +26881,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; + return node.parent.kind === 167 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 212 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 237 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node); @@ -26683,10 +26896,10 @@ function isRightSideOfInstanceofExpression(node) { return isInstanceOfExpression(node.parent) && node === node.parent.right; } function isEmptyObjectLiteral(expression) { - return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 211 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 210 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) return void 0; @@ -26812,8 +27025,14 @@ function base64decode(host, input) { function readJsonOrUndefined(path, hostOrText) { const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path); if (!jsonText) return void 0; - const result = parseConfigFileTextToJson(path, jsonText); - return !result.error ? result.config : void 0; + let result = tryParseJson(jsonText); + if (result === void 0) { + const looseResult = parseConfigFileTextToJson(path, jsonText); + if (!looseResult.error) { + result = looseResult.config; + } + } + return result; } function readJson(path, host) { return readJsonOrUndefined(path, host) || {}; @@ -26860,9 +27079,6 @@ function moveRangePastModifiers(node) { const lastModifier = canHaveModifiers(node) ? lastOrUndefined(node.modifiers) : void 0; return lastModifier && !positionIsSynthesized(lastModifier.end) ? moveRangePos(node, lastModifier.end) : moveRangePastDecorators(node); } -function isCollapsedRange(range) { - return range.pos === range.end; -} function createTokenRange(pos, token) { return createRange(pos, pos + tokenToString(token).length); } @@ -26948,6 +27164,12 @@ function getLinesBetweenPositionAndNextNonWhitespaceCharacter(pos, stopPos, sour ); return getLinesBetweenPositions(sourceFile, pos, Math.min(stopPos, nextPos)); } +function rangeContainsRange(r1, r2) { + return startEndContainsRange(r1.pos, r1.end, r2); +} +function startEndContainsRange(start, end, range) { + return start <= range.pos && end >= range.end; +} function getPreviousNonWhitespacePosition(pos, stopPos = 0, sourceFile) { while (pos-- > stopPos) { if (!isWhiteSpaceLike(sourceFile.text.charCodeAt(pos))) { @@ -26959,8 +27181,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 266 /* EnumDeclaration */: - case 267 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: + case 268 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -27013,25 +27235,28 @@ function isWriteAccess(node) { function accessKind(node) { const { parent: parent2 } = node; switch (parent2 == null ? void 0 : parent2.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return accessKind(parent2); - case 225 /* PostfixUnaryExpression */: - case 224 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 303 /* PropertyAssignment */: { + case 304 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return accessKind(parent2); + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + return node === parent2.initializer ? 1 /* Write */ : 0 /* Read */; default: return 0 /* Read */; } @@ -27104,9 +27329,6 @@ function getClassLikeDeclarationOfSymbol(symbol) { function getObjectFlags(type) { return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0; } -function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, (d) => callback(d) ? true : void 0); -} function isUMDExportSymbol(symbol) { return !!symbol && !!symbol.declarations && !!symbol.declarations[0] && isNamespaceExportDeclaration(symbol.declarations[0]); } @@ -27127,31 +27349,31 @@ function getLastChild(node) { }); return lastChild; } -function addToSeen(seen, key, value = true) { +function addToSeen(seen, key) { if (seen.has(key)) { return false; } - seen.set(key, value); + seen.add(key); return true; } function isObjectTypeDeclaration(node) { return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 312 /* JSDocAllType */ || kind === 313 /* JSDocUnknownType */ || kind === 314 /* JSDocNullableType */ || kind === 315 /* JSDocNonNullableType */ || kind === 316 /* JSDocOptionalType */ || kind === 317 /* JSDocFunctionType */ || kind === 318 /* JSDocVariadicType */; + return kind >= 183 /* FirstTypeNode */ && kind <= 206 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 234 /* ExpressionWithTypeArguments */ || kind === 313 /* JSDocAllType */ || kind === 314 /* JSDocUnknownType */ || kind === 315 /* JSDocNullableType */ || kind === 316 /* JSDocNonNullableType */ || kind === 317 /* JSDocOptionalType */ || kind === 318 /* JSDocFunctionType */ || kind === 319 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; + return node.kind === 212 /* PropertyAccessExpression */ || node.kind === 213 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 211 /* PropertyAccessExpression */) { + if (node.kind === 212 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 212 /* ElementAccessExpression */); + Debug.assert(node.kind === 213 /* ElementAccessExpression */); return node.argumentExpression; } function isNamedImportsOrExports(node) { - return node.kind === 275 /* NamedImports */ || node.kind === 279 /* NamedExports */; + return node.kind === 276 /* NamedImports */ || node.kind === 280 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -27164,12 +27386,12 @@ function forEachNameInAccessChainWalkingLeft(name, action) { return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 211 /* PropertyAccessExpression */) { + if (access.kind === 212 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 212 /* ElementAccessExpression */) { + } else if (access.kind === 213 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -27191,28 +27413,29 @@ function forEachNameInAccessChainWalkingLeft(name, action) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: node = node.operand; continue; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: node = node.left; continue; - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: node = node.condition; continue; - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: node = node.tag; continue; - case 213 /* CallExpression */: + case 214 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 234 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 235 /* NonNullExpression */: - case 354 /* PartiallyEmittedExpression */: - case 238 /* SatisfiesExpression */: + // falls through + case 235 /* AsExpression */: + case 213 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 236 /* NonNullExpression */: + case 356 /* PartiallyEmittedExpression */: + case 239 /* SatisfiesExpression */: node = node.expression; continue; } @@ -27306,7 +27529,7 @@ function setObjectAllocator(alloc) { forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator)); } function formatStringFromArgs(text, args) { - return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index])); + return text.replace(/\{(\d+)\}/g, (_match, index) => "" + Debug.checkDefined(args[+index])); } var localizedDiagnosticMessages; function setLocalizedDiagnosticMessages(messages) { @@ -27580,8 +27803,8 @@ function walkTreeForJSXTags(node) { function isFileModuleFromUsingJSXTag(file) { return !file.isDeclarationFile ? walkTreeForJSXTags(file) : void 0; } -function isFileForcedToBeModuleByFormat(file) { - return (file.impliedNodeFormat === 99 /* ESNext */ || fileExtensionIsOneOf(file.fileName, [".cjs" /* Cjs */, ".cts" /* Cts */, ".mjs" /* Mjs */, ".mts" /* Mts */])) && !file.isDeclarationFile ? true : void 0; +function isFileForcedToBeModuleByFormat(file, options) { + return (getImpliedNodeFormatForEmitWorker(file, options) === 99 /* ESNext */ || fileExtensionIsOneOf(file.fileName, [".cjs" /* Cjs */, ".cts" /* Cts */, ".mjs" /* Mjs */, ".mts" /* Mts */])) && !file.isDeclarationFile ? true : void 0; } function getSetExternalModuleIndicator(options) { switch (getEmitModuleDetectionKind(options)) { @@ -27600,25 +27823,35 @@ function getSetExternalModuleIndicator(options) { } checks.push(isFileForcedToBeModuleByFormat); const combined = or(...checks); - const callback = (file) => void (file.externalModuleIndicator = combined(file)); + const callback = (file) => void (file.externalModuleIndicator = combined(file, options)); return callback; } } +function importSyntaxAffectsModuleResolution(options) { + const moduleResolution = getEmitModuleResolutionKind(options); + return 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || getResolvePackageJsonExports(options) || getResolvePackageJsonImports(options); +} function createComputedCompilerOptions(options) { return options; } -var computedOptions = createComputedCompilerOptions({ +var _computedOptions = createComputedCompilerOptions({ + allowImportingTsExtensions: { + dependencies: ["rewriteRelativeImportExtensions"], + computeValue: (compilerOptions) => { + return !!(compilerOptions.allowImportingTsExtensions || compilerOptions.rewriteRelativeImportExtensions); + } + }, target: { dependencies: ["module"], computeValue: (compilerOptions) => { const target = compilerOptions.target === 0 /* ES3 */ ? void 0 : compilerOptions.target; - return target ?? (compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */); + return target ?? (compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 101 /* Node18 */ && 9 /* ES2022 */ || compilerOptions.module === 102 /* Node20 */ && 10 /* ES2023 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */); } }, module: { dependencies: ["target"], computeValue: (compilerOptions) => { - return typeof compilerOptions.module === "number" ? compilerOptions.module : computedOptions.target.computeValue(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */; + return typeof compilerOptions.module === "number" ? compilerOptions.module : _computedOptions.target.computeValue(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */; } }, moduleResolution: { @@ -27626,11 +27859,13 @@ var computedOptions = createComputedCompilerOptions({ computeValue: (compilerOptions) => { let moduleResolution = compilerOptions.moduleResolution; if (moduleResolution === void 0) { - switch (computedOptions.module.computeValue(compilerOptions)) { + switch (_computedOptions.module.computeValue(compilerOptions)) { case 1 /* CommonJS */: moduleResolution = 2 /* Node10 */; break; case 100 /* Node16 */: + case 101 /* Node18 */: + case 102 /* Node20 */: moduleResolution = 3 /* Node16 */; break; case 199 /* NodeNext */: @@ -27650,7 +27885,11 @@ var computedOptions = createComputedCompilerOptions({ moduleDetection: { dependencies: ["module", "target"], computeValue: (compilerOptions) => { - return compilerOptions.moduleDetection || (computedOptions.module.computeValue(compilerOptions) === 100 /* Node16 */ || computedOptions.module.computeValue(compilerOptions) === 199 /* NodeNext */ ? 3 /* Force */ : 2 /* Auto */); + if (compilerOptions.moduleDetection !== void 0) { + return compilerOptions.moduleDetection; + } + const moduleKind = _computedOptions.module.computeValue(compilerOptions); + return 100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ ? 3 /* Force */ : 2 /* Auto */; } }, isolatedModules: { @@ -27665,8 +27904,10 @@ var computedOptions = createComputedCompilerOptions({ if (compilerOptions.esModuleInterop !== void 0) { return compilerOptions.esModuleInterop; } - switch (computedOptions.module.computeValue(compilerOptions)) { + switch (_computedOptions.module.computeValue(compilerOptions)) { case 100 /* Node16 */: + case 101 /* Node18 */: + case 102 /* Node20 */: case 199 /* NodeNext */: case 200 /* Preserve */: return true; @@ -27680,13 +27921,13 @@ var computedOptions = createComputedCompilerOptions({ if (compilerOptions.allowSyntheticDefaultImports !== void 0) { return compilerOptions.allowSyntheticDefaultImports; } - return computedOptions.esModuleInterop.computeValue(compilerOptions) || computedOptions.module.computeValue(compilerOptions) === 4 /* System */ || computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */; + return _computedOptions.esModuleInterop.computeValue(compilerOptions) || _computedOptions.module.computeValue(compilerOptions) === 4 /* System */ || _computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */; } }, resolvePackageJsonExports: { dependencies: ["moduleResolution"], computeValue: (compilerOptions) => { - const moduleResolution = computedOptions.moduleResolution.computeValue(compilerOptions); + const moduleResolution = _computedOptions.moduleResolution.computeValue(compilerOptions); if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { return false; } @@ -27705,12 +27946,12 @@ var computedOptions = createComputedCompilerOptions({ resolvePackageJsonImports: { dependencies: ["moduleResolution", "resolvePackageJsonExports"], computeValue: (compilerOptions) => { - const moduleResolution = computedOptions.moduleResolution.computeValue(compilerOptions); + const moduleResolution = _computedOptions.moduleResolution.computeValue(compilerOptions); if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { return false; } - if (compilerOptions.resolvePackageJsonExports !== void 0) { - return compilerOptions.resolvePackageJsonExports; + if (compilerOptions.resolvePackageJsonImports !== void 0) { + return compilerOptions.resolvePackageJsonImports; } switch (moduleResolution) { case 3 /* Node16 */: @@ -27727,7 +27968,15 @@ var computedOptions = createComputedCompilerOptions({ if (compilerOptions.resolveJsonModule !== void 0) { return compilerOptions.resolveJsonModule; } - return computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */; + switch (_computedOptions.module.computeValue(compilerOptions)) { + // TODO in 6.0: uncomment + // case ModuleKind.Node16: + // case ModuleKind.Node18: + case 102 /* Node20 */: + case 199 /* NodeNext */: + return true; + } + return _computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */; } }, declaration: { @@ -27739,7 +27988,7 @@ var computedOptions = createComputedCompilerOptions({ preserveConstEnums: { dependencies: ["isolatedModules", "verbatimModuleSyntax"], computeValue: (compilerOptions) => { - return !!(compilerOptions.preserveConstEnums || computedOptions.isolatedModules.computeValue(compilerOptions)); + return !!(compilerOptions.preserveConstEnums || _computedOptions.isolatedModules.computeValue(compilerOptions)); } }, incremental: { @@ -27751,7 +28000,7 @@ var computedOptions = createComputedCompilerOptions({ declarationMap: { dependencies: ["declaration", "composite"], computeValue: (compilerOptions) => { - return !!(compilerOptions.declarationMap && computedOptions.declaration.computeValue(compilerOptions)); + return !!(compilerOptions.declarationMap && _computedOptions.declaration.computeValue(compilerOptions)); } }, allowJs: { @@ -27763,7 +28012,7 @@ var computedOptions = createComputedCompilerOptions({ useDefineForClassFields: { dependencies: ["target", "module"], computeValue: (compilerOptions) => { - return compilerOptions.useDefineForClassFields === void 0 ? computedOptions.target.computeValue(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; + return compilerOptions.useDefineForClassFields === void 0 ? _computedOptions.target.computeValue(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; } }, noImplicitAny: { @@ -27802,6 +28051,12 @@ var computedOptions = createComputedCompilerOptions({ return getStrictOptionValue(compilerOptions, "strictPropertyInitialization"); } }, + strictBuiltinIteratorReturn: { + dependencies: ["strict"], + computeValue: (compilerOptions) => { + return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn"); + } + }, alwaysStrict: { dependencies: ["strict"], computeValue: (compilerOptions) => { @@ -27815,22 +28070,24 @@ var computedOptions = createComputedCompilerOptions({ } } }); -var getEmitScriptTarget = computedOptions.target.computeValue; -var getEmitModuleKind = computedOptions.module.computeValue; -var getEmitModuleResolutionKind = computedOptions.moduleResolution.computeValue; -var getEmitModuleDetectionKind = computedOptions.moduleDetection.computeValue; -var getIsolatedModules = computedOptions.isolatedModules.computeValue; -var getESModuleInterop = computedOptions.esModuleInterop.computeValue; -var getAllowSyntheticDefaultImports = computedOptions.allowSyntheticDefaultImports.computeValue; -var getResolvePackageJsonExports = computedOptions.resolvePackageJsonExports.computeValue; -var getResolvePackageJsonImports = computedOptions.resolvePackageJsonImports.computeValue; -var getResolveJsonModule = computedOptions.resolveJsonModule.computeValue; -var getEmitDeclarations = computedOptions.declaration.computeValue; -var shouldPreserveConstEnums = computedOptions.preserveConstEnums.computeValue; -var isIncrementalCompilation = computedOptions.incremental.computeValue; -var getAreDeclarationMapsEnabled = computedOptions.declarationMap.computeValue; -var getAllowJSCompilerOption = computedOptions.allowJs.computeValue; -var getUseDefineForClassFields = computedOptions.useDefineForClassFields.computeValue; +var computedOptions = _computedOptions; +var getAllowImportingTsExtensions = _computedOptions.allowImportingTsExtensions.computeValue; +var getEmitScriptTarget = _computedOptions.target.computeValue; +var getEmitModuleKind = _computedOptions.module.computeValue; +var getEmitModuleResolutionKind = _computedOptions.moduleResolution.computeValue; +var getEmitModuleDetectionKind = _computedOptions.moduleDetection.computeValue; +var getIsolatedModules = _computedOptions.isolatedModules.computeValue; +var getESModuleInterop = _computedOptions.esModuleInterop.computeValue; +var getAllowSyntheticDefaultImports = _computedOptions.allowSyntheticDefaultImports.computeValue; +var getResolvePackageJsonExports = _computedOptions.resolvePackageJsonExports.computeValue; +var getResolvePackageJsonImports = _computedOptions.resolvePackageJsonImports.computeValue; +var getResolveJsonModule = _computedOptions.resolveJsonModule.computeValue; +var getEmitDeclarations = _computedOptions.declaration.computeValue; +var shouldPreserveConstEnums = _computedOptions.preserveConstEnums.computeValue; +var isIncrementalCompilation = _computedOptions.incremental.computeValue; +var getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue; +var getAllowJSCompilerOption = _computedOptions.allowJs.computeValue; +var getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue; function emitModuleKindIsNonNodeESM(moduleKind) { return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */; } @@ -27852,6 +28109,9 @@ function unusedLabelIsError(options) { function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) { return moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */; } +function moduleSupportsImportAttributes(moduleKind) { + return 101 /* Node18 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ || moduleKind === 200 /* Preserve */ || moduleKind === 99 /* ESNext */; +} function getStrictOptionValue(compilerOptions, flag) { return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag]; } @@ -27880,7 +28140,12 @@ function getJSXTransformEnabled(options) { function getJSXImplicitImportBase(compilerOptions, file) { const jsxImportSourcePragmas = file == null ? void 0 : file.pragmas.get("jsximportsource"); const jsxImportSourcePragma = isArray(jsxImportSourcePragmas) ? jsxImportSourcePragmas[jsxImportSourcePragmas.length - 1] : jsxImportSourcePragmas; - return compilerOptions.jsx === 4 /* ReactJSX */ || compilerOptions.jsx === 5 /* ReactJSXDev */ || compilerOptions.jsxImportSource || jsxImportSourcePragma ? (jsxImportSourcePragma == null ? void 0 : jsxImportSourcePragma.arguments.factory) || compilerOptions.jsxImportSource || "react" : void 0; + const jsxRuntimePragmas = file == null ? void 0 : file.pragmas.get("jsxruntime"); + const jsxRuntimePragma = isArray(jsxRuntimePragmas) ? jsxRuntimePragmas[jsxRuntimePragmas.length - 1] : jsxRuntimePragmas; + if ((jsxRuntimePragma == null ? void 0 : jsxRuntimePragma.arguments.factory) === "classic") { + return void 0; + } + return compilerOptions.jsx === 4 /* ReactJSX */ || compilerOptions.jsx === 5 /* ReactJSXDev */ || compilerOptions.jsxImportSource || jsxImportSourcePragma || (jsxRuntimePragma == null ? void 0 : jsxRuntimePragma.arguments.factory) === "automatic" ? (jsxImportSourcePragma == null ? void 0 : jsxImportSourcePragma.arguments.factory) || compilerOptions.jsxImportSource || "react" : void 0; } function getJSXRuntimeImport(base, options) { return base ? `${base}/${options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime"}` : void 0; @@ -27980,7 +28245,7 @@ function escapeRegExpCharacter(match) { } var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; -var implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; +var implicitExcludePathRegexPattern = `(?!(?:${commonPackageFolders.join("|")})(?:/|$))`; var filesMatcher = { /** * Matches any single directory segment unless it is the last segment and a .min.js file @@ -27988,12 +28253,12 @@ var filesMatcher = { * [^./] # matches everything up to the first . character (excluding directory separators) * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension */ - singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*", + singleAsteriskRegexFragment: "(?:[^./]|(?:\\.(?!min\\.js$))?)*", /** * Regex for the ** wildcard. Matches any number of subdirectories. When used for including * files or directories, does not match subdirectories that start with a . character */ - doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, + doubleAsteriskRegexFragment: `(?:/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment) }; var directoriesMatcher = { @@ -28002,12 +28267,12 @@ var directoriesMatcher = { * Regex for the ** wildcard. Matches any number of subdirectories. When used for including * files or directories, does not match subdirectories that start with a . character */ - doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, + doubleAsteriskRegexFragment: `(?:/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment) }; var excludeMatcher = { singleAsteriskRegexFragment: "[^/]*", - doubleAsteriskRegexFragment: "(/.+?)?", + doubleAsteriskRegexFragment: "(?:/.+?)?", replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment) }; var wildcardMatchers = { @@ -28020,9 +28285,9 @@ function getRegularExpressionForWildcard(specs, basePath, usage) { if (!patterns || !patterns.length) { return void 0; } - const pattern = patterns.map((pattern2) => `(${pattern2})`).join("|"); - const terminator = usage === "exclude" ? "($|/)" : "$"; - return `^(${pattern})${terminator}`; + const pattern = patterns.map((pattern2) => `(?:${pattern2})`).join("|"); + const terminator = usage === "exclude" ? "(?:$|/)" : "$"; + return `^(?:${pattern})${terminator}`; } function getRegularExpressionsForWildcards(specs, basePath, usage) { if (specs === void 0 || specs.length === 0) { @@ -28035,7 +28300,7 @@ function isImplicitGlob(lastPathComponent) { } function getPatternFromSpec(spec, basePath, usage) { const pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]); - return pattern && `^(${pattern})${usage === "exclude" ? "($|/)" : "$"}`; + return pattern && `^(?:${pattern})${usage === "exclude" ? "(?:$|/)" : "$"}`; } function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) { let subpattern = ""; @@ -28055,7 +28320,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm subpattern += doubleAsteriskRegexFragment; } else { if (usage === "directories") { - subpattern += "("; + subpattern += "(?:"; optionalCount++; } if (hasWrittenComponent) { @@ -28064,7 +28329,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm if (usage !== "exclude") { let componentPattern = ""; if (component.charCodeAt(0) === 42 /* asterisk */) { - componentPattern += "([^./]" + singleAsteriskRegexFragment + ")?"; + componentPattern += "(?:[^./]" + singleAsteriskRegexFragment + ")?"; component = component.substr(1); } else if (component.charCodeAt(0) === 63 /* question */) { componentPattern += "[^./]"; @@ -28124,7 +28389,7 @@ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNa if (visited.has(canonicalPath)) return; visited.set(canonicalPath, true); const { files, directories } = getFileSystemEntries(path2); - for (const current of sort(files, compareStringsCaseSensitive)) { + for (const current of toSorted(files, compareStringsCaseSensitive)) { const name = combinePaths(path2, current); const absoluteName = combinePaths(absolutePath, current); if (extensions && !fileExtensionIsOneOf(name, extensions)) continue; @@ -28144,7 +28409,7 @@ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNa return; } } - for (const current of sort(directories, compareStringsCaseSensitive)) { + for (const current of toSorted(directories, compareStringsCaseSensitive)) { const name = combinePaths(path2, current); const absoluteName = combinePaths(absolutePath, current); if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { @@ -28240,6 +28505,9 @@ function hasJSFileExtension(fileName) { function hasTSFileExtension(fileName) { return some(supportedTSExtensionsFlat, (extension) => fileExtensionIs(fileName, extension)); } +function hasImplementationTSFileExtension(fileName) { + return some(supportedTSImplementationExtensions, (extension) => fileExtensionIs(fileName, extension)) && !isDeclarationFileName(fileName); +} var ModuleSpecifierEnding = /* @__PURE__ */ ((ModuleSpecifierEnding2) => { ModuleSpecifierEnding2[ModuleSpecifierEnding2["Minimal"] = 0] = "Minimal"; ModuleSpecifierEnding2[ModuleSpecifierEnding2["Index"] = 1] = "Index"; @@ -28367,8 +28635,33 @@ function tryParsePattern(pattern) { suffix: pattern.substr(indexOfStar + 1) }; } +var parsedPatternsCache = /* @__PURE__ */ new WeakMap(); function tryParsePatterns(paths) { - return mapDefined(getOwnKeys(paths), (path) => tryParsePattern(path)); + let result = parsedPatternsCache.get(paths); + if (result !== void 0) { + return result; + } + let matchableStringSet; + let patterns; + const pathList = getOwnKeys(paths); + for (const path of pathList) { + const patternOrStr = tryParsePattern(path); + if (patternOrStr === void 0) { + continue; + } else if (typeof patternOrStr === "string") { + (matchableStringSet ?? (matchableStringSet = /* @__PURE__ */ new Set())).add(patternOrStr); + } else { + (patterns ?? (patterns = [])).push(patternOrStr); + } + } + parsedPatternsCache.set( + paths, + result = { + matchableStringSet, + patterns + } + ); + return result; } function positionIsSynthesized(pos) { return !(pos >= 0); @@ -28396,15 +28689,13 @@ var emptyFileSystemEntries = { files: emptyArray, directories: emptyArray }; -function matchPatternOrExact(patternOrStrings, candidate) { - const patterns = []; - for (const patternOrString of patternOrStrings) { - if (patternOrString === candidate) { - return candidate; - } - if (!isString(patternOrString)) { - patterns.push(patternOrString); - } +function matchPatternOrExact(parsedPatterns, candidate) { + const { matchableStringSet, patterns } = parsedPatterns; + if (matchableStringSet == null ? void 0 : matchableStringSet.has(candidate)) { + return candidate; + } + if (patterns === void 0 || patterns.length === 0) { + return void 0; } return findBestPatternMatch(patterns, (_) => _, candidate); } @@ -28447,9 +28738,27 @@ function rangeOfTypeParameters(sourceFile, typeParameters) { return { pos, end }; } function skipTypeChecking(sourceFile, options, host) { - return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnsotics(sourceFile, options); + return skipTypeCheckingWorker( + sourceFile, + options, + host, + /*ignoreNoCheck*/ + false + ); } -function canIncludeBindAndCheckDiagnsotics(sourceFile, options) { +function skipTypeCheckingIgnoringNoCheck(sourceFile, options, host) { + return skipTypeCheckingWorker( + sourceFile, + options, + host, + /*ignoreNoCheck*/ + true + ); +} +function skipTypeCheckingWorker(sourceFile, options, host, ignoreNoCheck) { + return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || !ignoreNoCheck && options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) || !canIncludeBindAndCheckDiagnostics(sourceFile, options); +} +function canIncludeBindAndCheckDiagnostics(sourceFile, options) { if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false; if (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */) return true; const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */; @@ -28463,6 +28772,7 @@ function isJsonEqual(a, b) { function parsePseudoBigInt(stringValue) { let log2Base; switch (stringValue.charCodeAt(1)) { + // "x" in "0x123" case 98 /* b */: case 66 /* B */: log2Base = 1; @@ -28552,38 +28862,38 @@ function isValidBigIntString(s, roundTripOnly) { return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { - return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); + return !!(useSite.flags & 33554432 /* Ambient */) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); } function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { + while (node.kind === 80 /* Identifier */ || node.kind === 212 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 167 /* ComputedPropertyName */) { + if (node.kind !== 168 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 64 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; + return containerKind === 265 /* InterfaceDeclaration */ || containerKind === 188 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 80 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 298 /* HeritageClause */: + case 299 /* HeritageClause */: return true; - case 211 /* PropertyAccessExpression */: - case 233 /* ExpressionWithTypeArguments */: + case 212 /* PropertyAccessExpression */: + case 234 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 265 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -28623,14 +28933,6 @@ function setParent(child, parent2) { } return child; } -function setEachParent(children, parent2) { - if (children) { - for (const child of children) { - setParent(child, parent2); - } - } - return children; -} function setParentRecursive(rootNode, incremental) { if (!rootNode) return rootNode; forEachChildRecursively(rootNode, isJSDocNode(rootNode) ? bindParentToChildIgnoringJSDoc : bindParentToChild); @@ -28689,20 +28991,20 @@ function containsIgnoredPath(path) { function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; - case 169 /* Parameter */: + return parent3.kind === 196 /* InferType */ ? void 0 : parent3.typeParameters; + case 170 /* Parameter */: return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: + case 205 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 239 /* TemplateSpan */: + case 240 /* TemplateSpan */: return node.parent.templateSpans; - case 170 /* Decorator */: { + case 171 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 298 /* HeritageClause */: + case 299 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -28710,43 +29012,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 187 /* TypeLiteral */: - case 264 /* InterfaceDeclaration */: + case 188 /* TypeLiteral */: + case 265 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: return parent2.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 355 /* CommaListExpression */: - case 275 /* NamedImports */: - case 279 /* NamedExports */: + case 190 /* TupleType */: + case 210 /* ArrayLiteralExpression */: + case 357 /* CommaListExpression */: + case 276 /* NamedImports */: + case 280 /* NamedExports */: return parent2.elements; - case 210 /* ObjectLiteralExpression */: - case 292 /* JsxAttributes */: + case 211 /* ObjectLiteralExpression */: + case 293 /* JsxAttributes */: return parent2.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 284 /* JsxElement */: - case 288 /* JsxFragment */: + case 285 /* JsxElement */: + case 289 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 241 /* Block */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 268 /* ModuleBlock */: + case 242 /* Block */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: + case 269 /* ModuleBlock */: return parent2.statements; - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return parent2.clauses; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 307 /* SourceFile */: + case 308 /* SourceFile */: return parent2.statements; } } @@ -28755,7 +29057,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 220 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -28768,13 +29070,13 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; + return node.kind === 261 /* VariableDeclaration */ && node.parent.kind === 300 /* CatchClause */; } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; + return node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */; } function escapeSnippetText(text) { - return text.replace(/\$/gm, () => "\\$"); + return text.replace(/\$/g, () => "\\$"); } function isNumericLiteralName(name) { return (+name).toString() === name; @@ -28833,25 +29135,22 @@ function getNodeModulePathParts(fullPath) { fileNameIndex = partStart; return state > 1 /* NodeModules */ ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : void 0; } -function getParameterTypeNode(parameter) { - var _a; - return parameter.kind === 341 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; -} function isTypeDeclaration(node) { switch (node.kind) { - case 168 /* TypeParameter */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: + case 169 /* TypeParameter */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: return true; - case 273 /* ImportClause */: - return node.isTypeOnly; - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: + case 274 /* ImportClause */: + return node.phaseModifier === 156 /* TypeKeyword */; + case 277 /* ImportSpecifier */: + return node.parent.parent.phaseModifier === 156 /* TypeKeyword */; + case 282 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -28865,7 +29164,7 @@ function isOptionalJSDocPropertyLikeTag(node) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 316 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 317 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -28880,17 +29179,17 @@ function hasTabstop(node) { } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 316 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(isOptionalJSDocPropertyLikeTag)); + (node.type && node.type.kind === 317 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(isOptionalJSDocPropertyLikeTag)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: return !!declaration.questionToken; - case 169 /* Parameter */: + case 170 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 348 /* JSDocPropertyTag */: - case 341 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: + case 342 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -28898,7 +29197,7 @@ function isOptionalDeclaration(declaration) { } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 212 /* PropertyAccessExpression */ || kind === 213 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -28918,7 +29217,7 @@ function getTextOfJsxAttributeName(node) { } function isJsxAttributeName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; + return kind === 80 /* Identifier */ || kind === 296 /* JsxNamespacedName */; } function getEscapedTextOfJsxNamespacedName(node) { return `${node.namespace.escapedText}:${idText(node.name)}`; @@ -28957,6 +29256,105 @@ function replaceFirstStar(s, replacement) { function getNameFromImportAttribute(node) { return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text); } +function isSourceElement(node) { + switch (node.kind) { + case 169 /* TypeParameter */: + case 170 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 186 /* ConstructorType */: + case 185 /* FunctionType */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 176 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 184 /* TypeReference */: + case 183 /* TypePredicate */: + case 187 /* TypeQuery */: + case 188 /* TypeLiteral */: + case 189 /* ArrayType */: + case 190 /* TupleType */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: + case 197 /* ParenthesizedType */: + case 191 /* OptionalType */: + case 192 /* RestType */: + case 198 /* ThisType */: + case 199 /* TypeOperator */: + case 195 /* ConditionalType */: + case 196 /* InferType */: + case 204 /* TemplateLiteralType */: + case 206 /* ImportType */: + case 203 /* NamedTupleMember */: + case 329 /* JSDocAugmentsTag */: + case 330 /* JSDocImplementsTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: + case 346 /* JSDocTemplateTag */: + case 345 /* JSDocTypeTag */: + case 325 /* JSDocLink */: + case 326 /* JSDocLinkCode */: + case 327 /* JSDocLinkPlain */: + case 342 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: + case 318 /* JSDocFunctionType */: + case 316 /* JSDocNonNullableType */: + case 315 /* JSDocNullableType */: + case 313 /* JSDocAllType */: + case 314 /* JSDocUnknownType */: + case 323 /* JSDocTypeLiteral */: + case 319 /* JSDocVariadicType */: + case 310 /* JSDocTypeExpression */: + case 334 /* JSDocPublicTag */: + case 336 /* JSDocProtectedTag */: + case 335 /* JSDocPrivateTag */: + case 351 /* JSDocSatisfiesTag */: + case 344 /* JSDocThisTag */: + case 200 /* IndexedAccessType */: + case 201 /* MappedType */: + case 263 /* FunctionDeclaration */: + case 242 /* Block */: + case 269 /* ModuleBlock */: + case 244 /* VariableStatement */: + case 245 /* ExpressionStatement */: + case 246 /* IfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 252 /* ContinueStatement */: + case 253 /* BreakStatement */: + case 254 /* ReturnStatement */: + case 255 /* WithStatement */: + case 256 /* SwitchStatement */: + case 257 /* LabeledStatement */: + case 258 /* ThrowStatement */: + case 259 /* TryStatement */: + case 261 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: + case 268 /* ModuleDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 279 /* ExportDeclaration */: + case 278 /* ExportAssignment */: + case 243 /* EmptyStatement */: + case 260 /* DebuggerStatement */: + case 283 /* MissingDeclaration */: + return true; + } + return false; +} function evaluatorResult(value, isSyntacticallyString = false, resolvedOtherFiles = false, hasExternalReferences = false) { return { value, isSyntacticallyString, resolvedOtherFiles, hasExternalReferences }; } @@ -28967,7 +29365,7 @@ function createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameEx let hasExternalReferences = false; expr = skipParentheses(expr); switch (expr.kind) { - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: const result = evaluate(expr.operand, location); resolvedOtherFiles = result.resolvedOtherFiles; hasExternalReferences = result.hasExternalReferences; @@ -28982,7 +29380,7 @@ function createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameEx } } break; - case 226 /* BinaryExpression */: { + case 227 /* BinaryExpression */: { const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); isSyntacticallyString = (left.isSyntacticallyString || right.isSyntacticallyString) && expr.operatorToken.kind === 40 /* PlusToken */; @@ -29032,18 +29430,18 @@ function createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameEx /*isSyntacticallyString*/ true ); - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 9 /* NumericLiteral */: return evaluatorResult(+expr.text); case 80 /* Identifier */: return evaluateEntityNameExpression(expr, location); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { return evaluateEntityNameExpression(expr, location); } break; - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return evaluateElementAccessExpression(expr, location); } return evaluatorResult( @@ -29089,7 +29487,7 @@ function isConstAssertion(location) { function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 177 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -29136,19 +29534,19 @@ function createNameResolver({ if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 320 /* JSDoc */) { + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 321 /* JSDoc */) { useResult = result.flags & 262144 /* TypeParameter */ ? !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so type parameters are accessible from them - lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 341 /* JSDocParameterTag */ || lastLocation.kind === 342 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; + lastLocation === location.type || lastLocation.kind === 170 /* Parameter */ || lastLocation.kind === 342 /* JSDocParameterTag */ || lastLocation.kind === 343 /* JSDocReturnTag */ || lastLocation.kind === 169 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 169 /* Parameter */ || !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so parameters are accessible from them + useResult = lastLocation.kind === 170 /* Parameter */ || !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so parameters are accessible from them lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 194 /* ConditionalType */) { + } else if (location.kind === 195 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -29160,11 +29558,12 @@ function createNameResolver({ } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; - case 267 /* ModuleDeclaration */: + // falls through + case 268 /* ModuleDeclaration */: const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols; - if (location.kind === 307 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 308 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -29173,7 +29572,7 @@ function createNameResolver({ result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 282 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 281 /* NamespaceExport */))) { break; } } @@ -29185,7 +29584,7 @@ function createNameResolver({ } } break; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { error2( @@ -29199,7 +29598,7 @@ function createNameResolver({ break loop; } break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -29210,9 +29609,9 @@ function createNameResolver({ } } break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -29234,7 +29633,7 @@ function createNameResolver({ } } break; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { @@ -29245,9 +29644,17 @@ function createNameResolver({ } } break; - case 167 /* ComputedPropertyName */: + // It is not legal to reference a class's own type parameters from a computed property name that + // belongs to the class. For example: + // + // function foo() { return '' } + // class C { // <-- Class's own type parameter T + // [foo()]() { } // <-- Reference to T from class's own computed property + // } + // + case 168 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 265 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error2(originalLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -29256,21 +29663,22 @@ function createNameResolver({ } } break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: + // falls through + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 263 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -29283,38 +29691,38 @@ function createNameResolver({ } } break; - case 170 /* Decorator */: - if (location.parent && location.parent.kind === 169 /* Parameter */) { + case 171 /* Decorator */: + if (location.parent && location.parent.kind === 170 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 264 /* ClassDeclaration */)) { location = location.parent; } break; - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: - case 351 /* JSDocImportTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: + case 352 /* JSDocImportTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 169 /* Parameter */: + case 170 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 208 /* BindingElement */: + case 209 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isPartOfParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 195 /* InferType */: + case 196 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -29323,7 +29731,7 @@ function createNameResolver({ } } break; - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) { location = location.parent.parent.parent; } @@ -29391,17 +29799,17 @@ function createNameResolver({ } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 177 /* Constructor */: return false; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 303 /* PropertyAssignment */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 304 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (hasStaticModifier(node)) { return !emitStandardClassFields; } @@ -29419,8 +29827,8 @@ function createNameResolver({ } } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 220 /* ArrowFunction */ && location.kind !== 219 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 173 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -29432,14 +29840,14 @@ function createNameResolver({ } function isSelfReferenceLocation(node, lastLocation) { switch (node.kind) { - case 169 /* Parameter */: + case 170 /* Parameter */: return !!lastLocation && lastLocation === node.name; - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 267 /* ModuleDeclaration */: + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 268 /* ModuleDeclaration */: return true; default: return false; @@ -29448,7 +29856,7 @@ function createNameResolver({ function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 168 /* TypeParameter */) { + if (decl.kind === 169 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -29470,7 +29878,7 @@ function isPrimitiveLiteralValue(node, includeBigInt = true) { return true; case 10 /* BigIntLiteral */: return includeBigInt; - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: if (node.operator === 41 /* MinusToken */) { return isNumericLiteral(node.operand) || includeBigInt && isBigIntLiteral(node.operand); } @@ -29484,7 +29892,7 @@ function isPrimitiveLiteralValue(node, includeBigInt = true) { } } function unwrapParenthesizedExpression(o) { - while (o.kind === 217 /* ParenthesizedExpression */) { + while (o.kind === 218 /* ParenthesizedExpression */) { o = o.expression; } return o; @@ -29492,22 +29900,275 @@ function unwrapParenthesizedExpression(o) { function hasInferredType(node) { Debug.type(node); switch (node.kind) { - case 169 /* Parameter */: - case 171 /* PropertySignature */: - case 172 /* PropertyDeclaration */: - case 208 /* BindingElement */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 226 /* BinaryExpression */: - case 260 /* VariableDeclaration */: - case 277 /* ExportAssignment */: - case 303 /* PropertyAssignment */: + case 170 /* Parameter */: + case 172 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + case 209 /* BindingElement */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: + case 227 /* BinaryExpression */: + case 261 /* VariableDeclaration */: + case 278 /* ExportAssignment */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 342 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: return true; default: assertType(node); return false; } } +function isSideEffectImport(node) { + const ancestor = findAncestor(node, isImportDeclaration); + return !!ancestor && !ancestor.importClause; +} +var unprefixedNodeCoreModulesList = [ + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "test/mock_loader", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" +]; +var unprefixedNodeCoreModules = new Set(unprefixedNodeCoreModulesList); +var exclusivelyPrefixedNodeCoreModules = /* @__PURE__ */ new Set([ + "node:sea", + "node:sqlite", + "node:test", + "node:test/reporters" +]); +var nodeCoreModules = /* @__PURE__ */ new Set([ + ...unprefixedNodeCoreModulesList, + ...unprefixedNodeCoreModulesList.map((name) => `node:${name}`), + ...exclusivelyPrefixedNodeCoreModules +]); +function forEachDynamicImportOrRequireCall(file, includeTypeSpaceImports, requireStringLiteralLikeArgument, cb) { + const isJavaScriptFile = isInJSFile(file); + const r = /import|require/g; + while (r.exec(file.text) !== null) { + const node = getNodeAtPosition( + file, + r.lastIndex, + /*includeJSDoc*/ + includeTypeSpaceImports + ); + if (isJavaScriptFile && isRequireCall(node, requireStringLiteralLikeArgument)) { + cb(node, node.arguments[0]); + } else if (isImportCall(node) && node.arguments.length >= 1 && (!requireStringLiteralLikeArgument || isStringLiteralLike(node.arguments[0]))) { + cb(node, node.arguments[0]); + } else if (includeTypeSpaceImports && isLiteralImportTypeNode(node)) { + cb(node, node.argument.literal); + } else if (includeTypeSpaceImports && isJSDocImportTag(node)) { + const moduleNameExpr = getExternalModuleName(node); + if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) { + cb(node, moduleNameExpr); + } + } + } +} +function getNodeAtPosition(sourceFile, position, includeJSDoc) { + const isJavaScriptFile = isInJSFile(sourceFile); + let current = sourceFile; + const getContainingChild = (child) => { + if (child.pos <= position && (position < child.end || position === child.end && child.kind === 1 /* EndOfFileToken */)) { + return child; + } + }; + while (true) { + const child = isJavaScriptFile && includeJSDoc && hasJSDocNodes(current) && forEach(current.jsDoc, getContainingChild) || forEachChild(current, getContainingChild); + if (!child || isMetaProperty(child)) { + return current; + } + current = child; + } +} +function isNewScopeNode(node) { + return isFunctionLike(node) || isJSDocSignature(node) || isMappedTypeNode(node); +} +function getLibNameFromLibReference(libReference) { + return toFileNameLowerCase(libReference.fileName); +} +function getLibFileNameFromLibReference(libReference) { + const libName = getLibNameFromLibReference(libReference); + return libMap.get(libName); +} +function forEachResolvedProjectReference(resolvedProjectReferences, cb) { + return forEachProjectReference( + /*projectReferences*/ + void 0, + resolvedProjectReferences, + (resolvedRef) => resolvedRef && cb(resolvedRef) + ); +} +function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) { + let seenResolvedRefs; + return worker( + projectReferences, + resolvedProjectReferences, + /*parent*/ + void 0 + ); + function worker(projectReferences2, resolvedProjectReferences2, parent2) { + if (cbRef) { + const result = cbRef(projectReferences2, parent2); + if (result) return result; + } + let skipChildren; + return forEach( + resolvedProjectReferences2, + (resolvedRef, index) => { + if (resolvedRef && (seenResolvedRefs == null ? void 0 : seenResolvedRefs.has(resolvedRef.sourceFile.path))) { + (skipChildren ?? (skipChildren = /* @__PURE__ */ new Set())).add(resolvedRef); + return void 0; + } + const result = cbResolvedRef(resolvedRef, parent2, index); + if (result || !resolvedRef) return result; + (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path); + } + ) || forEach( + resolvedProjectReferences2, + (resolvedRef) => resolvedRef && !(skipChildren == null ? void 0 : skipChildren.has(resolvedRef)) ? worker(resolvedRef.commandLine.projectReferences, resolvedRef.references, resolvedRef) : void 0 + ); + } +} +function getOptionsSyntaxByArrayElementValue(optionsObject, name, value) { + return optionsObject && getPropertyArrayElementValue(optionsObject, name, value); +} +function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { + return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0); +} +function getOptionsSyntaxByValue(optionsObject, name, value) { + return forEachOptionsSyntaxByName(optionsObject, name, (property) => isStringLiteral(property.initializer) && property.initializer.text === value ? property.initializer : void 0); +} +function forEachOptionsSyntaxByName(optionsObject, name, callback) { + return forEachPropertyAssignment(optionsObject, name, callback); +} +function getSynthesizedDeepClone(node, includeTrivia = true) { + const clone2 = node && getSynthesizedDeepCloneWorker(node); + if (clone2 && !includeTrivia) suppressLeadingAndTrailingTrivia(clone2); + return setParentRecursive( + clone2, + /*incremental*/ + false + ); +} +function getSynthesizedDeepCloneWithReplacements(node, includeTrivia, replaceNode) { + let clone2 = replaceNode(node); + if (clone2) { + setOriginalNode(clone2, node); + } else { + clone2 = getSynthesizedDeepCloneWorker(node, replaceNode); + } + if (clone2 && !includeTrivia) suppressLeadingAndTrailingTrivia(clone2); + return clone2; +} +function getSynthesizedDeepCloneWorker(node, replaceNode) { + const nodeClone = replaceNode ? (n) => getSynthesizedDeepCloneWithReplacements( + n, + /*includeTrivia*/ + true, + replaceNode + ) : getSynthesizedDeepClone; + const nodesClone = replaceNode ? (ns) => ns && getSynthesizedDeepClonesWithReplacements( + ns, + /*includeTrivia*/ + true, + replaceNode + ) : (ns) => ns && getSynthesizedDeepClones(ns); + const visited = visitEachChild( + node, + nodeClone, + /*context*/ + void 0, + nodesClone, + nodeClone + ); + if (visited === node) { + const clone2 = isStringLiteral(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) : isNumericLiteral(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) : factory.cloneNode(node); + return setTextRange(clone2, node); + } + visited.parent = void 0; + return visited; +} +function getSynthesizedDeepClones(nodes, includeTrivia = true) { + if (nodes) { + const cloned = factory.createNodeArray(nodes.map((n) => getSynthesizedDeepClone(n, includeTrivia)), nodes.hasTrailingComma); + setTextRange(cloned, nodes); + return cloned; + } + return nodes; +} +function getSynthesizedDeepClonesWithReplacements(nodes, includeTrivia, replaceNode) { + return factory.createNodeArray(nodes.map((n) => getSynthesizedDeepCloneWithReplacements(n, includeTrivia, replaceNode)), nodes.hasTrailingComma); +} +function suppressLeadingAndTrailingTrivia(node) { + suppressLeadingTrivia(node); + suppressTrailingTrivia(node); +} +function suppressLeadingTrivia(node) { + addEmitFlagsRecursively(node, 1024 /* NoLeadingComments */, getFirstChild); +} +function suppressTrailingTrivia(node) { + addEmitFlagsRecursively(node, 2048 /* NoTrailingComments */, getLastChild); +} +function addEmitFlagsRecursively(node, flag, getChild) { + addEmitFlags(node, flag); + const child = getChild(node); + if (child) addEmitFlagsRecursively(child, flag, getChild); +} +function getFirstChild(node) { + return forEachChild(node, (child) => child); +} // src/compiler/factory/baseNodeFactory.ts function createBaseNodeFactory() { @@ -29629,17 +30290,29 @@ function createParenthesizerRules(factory2) { } return parenthesizerRule; } + function mixingBinaryOperatorsRequiresParentheses(a, b) { + if (a === 61 /* QuestionQuestionToken */) { + return b === 56 /* AmpersandAmpersandToken */ || b === 57 /* BarBarToken */; + } + if (b === 61 /* QuestionQuestionToken */) { + return a === 56 /* AmpersandAmpersandToken */ || a === 57 /* BarBarToken */; + } + return false; + } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) { + return true; + } + const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator); + if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 230 /* YieldExpression */) { return false; } return true; @@ -29673,7 +30346,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { + if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -29686,7 +30359,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { + if (skipped.kind === 218 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -29712,7 +30385,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(228 /* ConditionalExpression */, 58 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -29733,8 +30406,8 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind) { - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: needsParens = true; } } @@ -29747,16 +30420,16 @@ function createParenthesizerRules(factory2) { true ); switch (leftmostExpr.kind) { - case 213 /* CallExpression */: + case 214 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: + case 215 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 215 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -29774,7 +30447,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, 28 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -29782,7 +30455,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { + if (kind === 219 /* FunctionExpression */ || kind === 220 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -29797,7 +30470,7 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { + if (leftmostExpressionKind === 211 /* ObjectLiteralExpression */ || leftmostExpressionKind === 219 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -29807,31 +30480,32 @@ function createParenthesizerRules(factory2) { body, /*stopAtCallExpressions*/ false - ).kind === 210 /* ObjectLiteralExpression */)) { + ).kind === 211 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 195 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* UnionType */: + // Not strictly necessary, but a union containing a union should have been flattened + case 194 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -29841,8 +30515,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -29852,23 +30526,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 193 /* IntersectionType */: + case 194 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 198 /* TypeOperator */: + case 199 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: + case 196 /* InferType */: + case 199 /* TypeOperator */: + case 187 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -30037,11 +30711,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 208 /* ArrayBindingPattern */: + case 210 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: + case 207 /* ObjectBindingPattern */: + case 211 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -30404,40 +31078,40 @@ function createNodeFactory(flags, baseFactory2) { updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(312 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(313 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(313 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(314 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(315 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(316 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(315 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(316 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(314 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(315 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(314 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(315 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(316 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(317 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(316 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(317 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(318 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(319 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(318 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(319 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(319 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(320 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(319 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(320 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -30479,82 +31153,82 @@ function createNodeFactory(flags, baseFactory2) { updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(344 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(345 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(344 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(345 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(342 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(343 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(342 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(343 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(343 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(344 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(343 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(344 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(330 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(331 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(330 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(331 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(332 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(333 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(332 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(333 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(333 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(334 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(333 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(334 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(334 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(335 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(334 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(335 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(335 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(336 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(335 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(336 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(331 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(332 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(331 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(332 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -30612,6 +31286,7 @@ function createNodeFactory(flags, baseFactory2) { createSyntheticExpression, createSyntaxList: createSyntaxList3, createNotEmittedStatement, + createNotEmittedTypeElement, createPartiallyEmittedExpression, updatePartiallyEmittedExpression, createCommaListExpression, @@ -31008,7 +31683,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 166 /* LastToken */, "Invalid token"); Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); @@ -31102,7 +31777,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(166 /* QualifiedName */); + const node = createBaseNode(167 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -31113,7 +31788,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(167 /* ComputedPropertyName */); + const node = createBaseNode(168 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -31122,7 +31797,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(168 /* TypeParameter */); + const node = createBaseDeclaration(169 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -31136,7 +31811,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(169 /* Parameter */); + const node = createBaseDeclaration(170 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -31155,7 +31830,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(170 /* Decorator */); + const node = createBaseNode(171 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -31168,7 +31843,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(171 /* PropertySignature */); + const node = createBaseDeclaration(172 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -31188,7 +31863,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(172 /* PropertyDeclaration */); + const node = createBaseDeclaration(173 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; @@ -31204,7 +31879,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(173 /* MethodSignature */); + const node = createBaseDeclaration(174 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -31222,7 +31897,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(174 /* MethodDeclaration */); + const node = createBaseDeclaration(175 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -31259,7 +31934,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(176 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -31280,11 +31955,15 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(176 /* Constructor */); + const node = createBaseDeclaration(177 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */; + if (!node.body) { + node.transformFlags = 1 /* ContainsTypeScript */; + } else { + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */; + } node.typeParameters = void 0; node.type = void 0; node.typeArguments = void 0; @@ -31306,7 +31985,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(177 /* GetAccessor */); + const node = createBaseDeclaration(178 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -31337,7 +32016,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(178 /* SetAccessor */); + const node = createBaseDeclaration(179 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -31369,7 +32048,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* CallSignature */); + const node = createBaseDeclaration(180 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -31384,7 +32063,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(180 /* ConstructSignature */); + const node = createBaseDeclaration(181 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -31399,7 +32078,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(181 /* IndexSignature */); + const node = createBaseDeclaration(182 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -31414,7 +32093,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(205 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -31427,7 +32106,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); + const node = createBaseNode(183 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -31438,7 +32117,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); + const node = createBaseNode(184 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -31448,7 +32127,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* FunctionType */); + const node = createBaseDeclaration(185 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -31473,7 +32152,7 @@ function createNodeFactory(flags, baseFactory2) { return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(185 /* ConstructorType */); + const node = createBaseDeclaration(186 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -31504,7 +32183,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); + const node = createBaseNode(187 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -31514,7 +32193,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(187 /* TypeLiteral */); + const node = createBaseDeclaration(188 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31523,7 +32202,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(188 /* ArrayType */); + const node = createBaseNode(189 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31532,7 +32211,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(189 /* TupleType */); + const node = createBaseNode(190 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31541,7 +32220,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(202 /* NamedTupleMember */); + const node = createBaseDeclaration(203 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -31554,7 +32233,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(190 /* OptionalType */); + const node = createBaseNode(191 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31563,7 +32242,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(191 /* RestType */); + const node = createBaseNode(192 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31581,19 +32260,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(193 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(194 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); + const node = createBaseNode(195 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -31607,7 +32286,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(195 /* InferType */); + const node = createBaseNode(196 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31616,7 +32295,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); + const node = createBaseNode(204 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -31626,7 +32305,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); + const node = createBaseNode(206 /* ImportType */); node.argument = argument; node.attributes = attributes; if (node.assertions && node.assertions.assertClause && node.attributes) { @@ -31642,7 +32321,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(196 /* ParenthesizedType */); + const node = createBaseNode(197 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31651,12 +32330,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(197 /* ThisType */); + const node = createBaseNode(198 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); + const node = createBaseNode(199 /* TypeOperator */); node.operator = operator; node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -31666,7 +32345,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); + const node = createBaseNode(200 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -31676,7 +32355,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(200 /* MappedType */); + const node = createBaseDeclaration(201 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -31692,7 +32371,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(201 /* LiteralType */); + const node = createBaseNode(202 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -31701,7 +32380,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); + const node = createBaseNode(207 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -31713,7 +32392,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); + const node = createBaseNode(208 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -31722,7 +32401,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(208 /* BindingElement */); + const node = createBaseDeclaration(209 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -31735,7 +32414,7 @@ function createNodeFactory(flags, baseFactory2) { return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(209 /* ArrayLiteralExpression */); + const node = createBaseNode(210 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -31747,7 +32426,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(211 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -31758,7 +32437,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(211 /* PropertyAccessExpression */); + const node = createBaseDeclaration(212 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -31808,7 +32487,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(212 /* ElementAccessExpression */); + const node = createBaseDeclaration(213 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -31858,7 +32537,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* CallExpression */); + const node = createBaseDeclaration(214 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -31915,7 +32594,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(214 /* NewExpression */); + const node = createBaseDeclaration(215 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -31929,7 +32608,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(215 /* TaggedTemplateExpression */); + const node = createBaseNode(216 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -31950,7 +32629,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(216 /* TypeAssertionExpression */); + const node = createBaseNode(217 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -31960,7 +32639,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(217 /* ParenthesizedExpression */); + const node = createBaseNode(218 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -31970,7 +32649,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(218 /* FunctionExpression */); + const node = createBaseDeclaration(219 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -31995,7 +32674,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(219 /* ArrowFunction */); + const node = createBaseDeclaration(220 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -32017,7 +32696,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(220 /* DeleteExpression */); + const node = createBaseNode(221 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -32026,7 +32705,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(221 /* TypeOfExpression */); + const node = createBaseNode(222 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -32035,7 +32714,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(222 /* VoidExpression */); + const node = createBaseNode(223 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -32044,7 +32723,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(223 /* AwaitExpression */); + const node = createBaseNode(224 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -32053,7 +32732,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(224 /* PrefixUnaryExpression */); + const node = createBaseNode(225 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -32066,7 +32745,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(225 /* PostfixUnaryExpression */); + const node = createBaseNode(226 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -32079,7 +32758,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(226 /* BinaryExpression */); + const node = createBaseDeclaration(227 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -32112,20 +32791,22 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(227 /* ConditionalExpression */); + const node = createBaseNode(228 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); node.colonToken = colonToken ?? createToken(59 /* ColonToken */); node.whenFalse = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenFalse); node.transformFlags |= propagateChildFlags(node.condition) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.whenTrue) | propagateChildFlags(node.colonToken) | propagateChildFlags(node.whenFalse); + node.flowNodeWhenFalse = void 0; + node.flowNodeWhenTrue = void 0; return node; } function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) { return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(228 /* TemplateExpression */); + const node = createBaseNode(229 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -32200,7 +32881,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(229 /* YieldExpression */); + const node = createBaseNode(230 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -32210,7 +32891,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(230 /* SpreadElement */); + const node = createBaseNode(231 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -32219,7 +32900,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(231 /* ClassExpression */); + const node = createBaseDeclaration(232 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -32233,10 +32914,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(232 /* OmittedExpression */); + return createBaseNode(233 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(233 /* ExpressionWithTypeArguments */); + const node = createBaseNode(234 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -32250,7 +32931,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(234 /* AsExpression */); + const node = createBaseNode(235 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -32260,7 +32941,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(235 /* NonNullExpression */); + const node = createBaseNode(236 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -32276,7 +32957,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(238 /* SatisfiesExpression */); + const node = createBaseNode(239 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -32286,7 +32967,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(235 /* NonNullExpression */); + const node = createBaseNode(236 /* NonNullExpression */); node.flags |= 64 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, @@ -32301,7 +32982,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(236 /* MetaProperty */); + const node = createBaseNode(237 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -32322,7 +33003,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(239 /* TemplateSpan */); + const node = createBaseNode(240 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -32332,12 +33013,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(240 /* SemicolonClassElement */); + const node = createBaseNode(241 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(241 /* Block */); + const node = createBaseNode(242 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -32350,7 +33031,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(243 /* VariableStatement */); + const node = createBaseNode(244 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -32365,12 +33046,12 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(242 /* EmptyStatement */); + const node = createBaseNode(243 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(244 /* ExpressionStatement */); + const node = createBaseNode(245 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -32381,7 +33062,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(245 /* IfStatement */); + const node = createBaseNode(246 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -32394,7 +33075,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(246 /* DoStatement */); + const node = createBaseNode(247 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -32406,7 +33087,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(247 /* WhileStatement */); + const node = createBaseNode(248 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -32418,7 +33099,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(248 /* ForStatement */); + const node = createBaseNode(249 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -32434,7 +33115,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(249 /* ForInStatement */); + const node = createBaseNode(250 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -32449,7 +33130,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(250 /* ForOfStatement */); + const node = createBaseNode(251 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -32466,7 +33147,7 @@ function createNodeFactory(flags, baseFactory2) { return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(251 /* ContinueStatement */); + const node = createBaseNode(252 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -32477,7 +33158,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(252 /* BreakStatement */); + const node = createBaseNode(253 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -32488,7 +33169,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(253 /* ReturnStatement */); + const node = createBaseNode(254 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -32499,7 +33180,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(254 /* WithStatement */); + const node = createBaseNode(255 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -32511,7 +33192,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(255 /* SwitchStatement */); + const node = createBaseNode(256 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -32524,7 +33205,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(256 /* LabeledStatement */); + const node = createBaseNode(257 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -32536,7 +33217,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(257 /* ThrowStatement */); + const node = createBaseNode(258 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -32547,7 +33228,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(258 /* TryStatement */); + const node = createBaseNode(259 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -32560,13 +33241,13 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(259 /* DebuggerStatement */); + const node = createBaseNode(260 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(260 /* VariableDeclaration */); + const node = createBaseDeclaration(261 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -32579,7 +33260,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(261 /* VariableDeclarationList */); + const node = createBaseNode(262 /* VariableDeclarationList */); node.flags |= flags2 & 7 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -32595,7 +33276,7 @@ function createNodeFactory(flags, baseFactory2) { return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(262 /* FunctionDeclaration */); + const node = createBaseDeclaration(263 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -32631,7 +33312,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* ClassDeclaration */); + const node = createBaseDeclaration(264 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -32652,7 +33333,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(264 /* InterfaceDeclaration */); + const node = createBaseDeclaration(265 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -32666,7 +33347,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(266 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -32681,7 +33362,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(266 /* EnumDeclaration */); + const node = createBaseDeclaration(267 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -32694,7 +33375,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(267 /* ModuleDeclaration */); + const node = createBaseDeclaration(268 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; @@ -32714,7 +33395,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(268 /* ModuleBlock */); + const node = createBaseNode(269 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -32724,7 +33405,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(269 /* CaseBlock */); + const node = createBaseNode(270 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -32735,7 +33416,7 @@ function createNodeFactory(flags, baseFactory2) { return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(271 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -32752,7 +33433,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(272 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -32769,7 +33450,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { - const node = createBaseNode(272 /* ImportDeclaration */); + const node = createBaseNode(273 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -32782,23 +33463,30 @@ function createNodeFactory(flags, baseFactory2) { function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node; } - function createImportClause2(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(273 /* ImportClause */); - node.isTypeOnly = isTypeOnly; + function createImportClause2(phaseModifier, name, namedBindings) { + const node = createBaseDeclaration(274 /* ImportClause */); + if (typeof phaseModifier === "boolean") { + phaseModifier = phaseModifier ? 156 /* TypeKeyword */ : void 0; + } + node.isTypeOnly = phaseModifier === 156 /* TypeKeyword */; + node.phaseModifier = phaseModifier; node.name = name; node.namedBindings = namedBindings; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.namedBindings); - if (isTypeOnly) { + if (phaseModifier === 156 /* TypeKeyword */) { node.transformFlags |= 1 /* ContainsTypeScript */; } node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; return node; } - function updateImportClause(node, isTypeOnly, name, namedBindings) { - return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause2(isTypeOnly, name, namedBindings), node) : node; + function updateImportClause(node, phaseModifier, name, namedBindings) { + if (typeof phaseModifier === "boolean") { + phaseModifier = phaseModifier ? 156 /* TypeKeyword */ : void 0; + } + return node.phaseModifier !== phaseModifier || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause2(phaseModifier, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(300 /* AssertClause */); + const node = createBaseNode(301 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.token = 132 /* AssertKeyword */; @@ -32809,7 +33497,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(301 /* AssertEntry */); + const node = createBaseNode(302 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -32819,7 +33507,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(302 /* ImportTypeAssertionContainer */); + const node = createBaseNode(303 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -32828,7 +33516,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createImportAttributes(elements, multiLine, token) { - const node = createBaseNode(300 /* ImportAttributes */); + const node = createBaseNode(301 /* ImportAttributes */); node.token = token ?? 118 /* WithKeyword */; node.elements = createNodeArray(elements); node.multiLine = multiLine; @@ -32839,7 +33527,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node; } function createImportAttribute(name, value) { - const node = createBaseNode(301 /* ImportAttribute */); + const node = createBaseNode(302 /* ImportAttribute */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -32849,7 +33537,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(274 /* NamespaceImport */); + const node = createBaseDeclaration(275 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -32859,7 +33547,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(280 /* NamespaceExport */); + const node = createBaseDeclaration(281 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -32869,7 +33557,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(275 /* NamedImports */); + const node = createBaseNode(276 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -32879,7 +33567,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(276 /* ImportSpecifier */); + const node = createBaseDeclaration(277 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -32891,7 +33579,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(277 /* ExportAssignment */); + const node = createBaseDeclaration(278 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -32909,7 +33597,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { - const node = createBaseDeclaration(278 /* ExportDeclaration */); + const node = createBaseDeclaration(279 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -32932,7 +33620,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(279 /* NamedExports */); + const node = createBaseNode(280 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -32942,7 +33630,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(281 /* ExportSpecifier */); + const node = createBaseNode(282 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -32955,12 +33643,12 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(282 /* MissingDeclaration */); + const node = createBaseDeclaration(283 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(283 /* ExternalModuleReference */); + const node = createBaseNode(284 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -32992,7 +33680,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(317 /* JSDocFunctionType */); + const node = createBaseDeclaration(318 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -33006,7 +33694,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(322 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(323 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -33015,7 +33703,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(309 /* JSDocTypeExpression */); + const node = createBaseNode(310 /* JSDocTypeExpression */); node.type = type; return node; } @@ -33023,7 +33711,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(323 /* JSDocSignature */); + const node = createBaseDeclaration(324 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -33052,7 +33740,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(345 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); + const node = createBaseJSDocTag(346 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -33061,7 +33749,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(346 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(347 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -33073,7 +33761,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(341 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(342 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -33084,7 +33772,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(348 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(349 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -33095,7 +33783,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(338 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(339 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -33107,7 +33795,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(339 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); + const node = createBaseJSDocTag(340 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -33115,7 +33803,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(328 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); + const node = createBaseJSDocTag(329 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); node.class = className; return node; } @@ -33123,12 +33811,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(329 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); + const node = createBaseJSDocTag(330 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(347 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); + const node = createBaseJSDocTag(348 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); node.name = name; return node; } @@ -33136,7 +33824,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(310 /* JSDocNameReference */); + const node = createBaseNode(311 /* JSDocNameReference */); node.name = name; return node; } @@ -33144,7 +33832,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(311 /* JSDocMemberName */); + const node = createBaseNode(312 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -33154,7 +33842,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(324 /* JSDocLink */); + const node = createBaseNode(325 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -33163,7 +33851,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(325 /* JSDocLinkCode */); + const node = createBaseNode(326 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -33172,7 +33860,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(326 /* JSDocLinkPlain */); + const node = createBaseNode(327 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -33199,14 +33887,14 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(327 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(328 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(340 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(340 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(341 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(341 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -33216,7 +33904,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) { - const node = createBaseJSDocTag(351 /* JSDocImportTag */, tagName ?? createIdentifier("import"), comment); + const node = createBaseJSDocTag(352 /* JSDocImportTag */, tagName ?? createIdentifier("import"), comment); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; node.attributes = attributes; @@ -33227,7 +33915,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.comment !== comment || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(321 /* JSDocText */); + const node = createBaseNode(322 /* JSDocText */); node.text = text; return node; } @@ -33235,7 +33923,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(320 /* JSDoc */); + const node = createBaseNode(321 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -33244,7 +33932,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(284 /* JsxElement */); + const node = createBaseNode(285 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -33255,7 +33943,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxSelfClosingElement */); + const node = createBaseNode(286 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -33269,7 +33957,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(286 /* JsxOpeningElement */); + const node = createBaseNode(287 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -33283,7 +33971,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(287 /* JsxClosingElement */); + const node = createBaseNode(288 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -33292,7 +33980,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(288 /* JsxFragment */); + const node = createBaseNode(289 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -33313,17 +34001,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(289 /* JsxOpeningFragment */); + const node = createBaseNode(290 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(290 /* JsxClosingFragment */); + const node = createBaseNode(291 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(291 /* JsxAttribute */); + const node = createBaseDeclaration(292 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -33333,7 +34021,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(292 /* JsxAttributes */); + const node = createBaseDeclaration(293 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -33342,7 +34030,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(293 /* JsxSpreadAttribute */); + const node = createBaseNode(294 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -33351,7 +34039,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(294 /* JsxExpression */); + const node = createBaseNode(295 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -33361,7 +34049,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(295 /* JsxNamespacedName */); + const node = createBaseNode(296 /* JsxNamespacedName */); node.namespace = namespace; node.name = name; node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; @@ -33371,7 +34059,7 @@ function createNodeFactory(flags, baseFactory2) { return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(296 /* CaseClause */); + const node = createBaseNode(297 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -33382,7 +34070,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(297 /* DefaultClause */); + const node = createBaseNode(298 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -33391,7 +34079,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(298 /* HeritageClause */); + const node = createBaseNode(299 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -33411,7 +34099,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(299 /* CatchClause */); + const node = createBaseNode(300 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -33423,7 +34111,7 @@ function createNodeFactory(flags, baseFactory2) { return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(303 /* PropertyAssignment */); + const node = createBaseDeclaration(304 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -33445,7 +34133,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(305 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -33469,7 +34157,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(305 /* SpreadAssignment */); + const node = createBaseDeclaration(306 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -33479,7 +34167,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(306 /* EnumMember */); + const node = createBaseDeclaration(307 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -33490,7 +34178,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(307 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -33570,7 +34258,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(307 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(308 /* SourceFile */); node.flags |= source.flags & ~16 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { @@ -33604,7 +34292,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles) { - const node = createBaseNode(308 /* Bundle */); + const node = createBaseNode(309 /* Bundle */); node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; node.syntheticTypeReferences = void 0; @@ -33616,25 +34304,25 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles ? update(createBundle(sourceFiles), node) : node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(237 /* SyntheticExpression */); + const node = createBaseNode(238 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(352 /* SyntaxList */); - setNodeChildren(node, children); + const node = createBaseNode(353 /* SyntaxList */); + node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(353 /* NotEmittedStatement */); + const node = createBaseNode(354 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(354 /* PartiallyEmittedExpression */); + const node = createBaseNode(356 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -33644,6 +34332,9 @@ function createNodeFactory(flags, baseFactory2) { function updatePartiallyEmittedExpression(node, expression) { return node.expression !== expression ? update(createPartiallyEmittedExpression(expression, node.original), node) : node; } + function createNotEmittedTypeElement() { + return createBaseNode(355 /* NotEmittedTypeElement */); + } function flattenCommaElements(node) { if (nodeIsSynthesized(node) && !isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { if (isCommaListExpression(node)) { @@ -33656,7 +34347,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(355 /* CommaListExpression */); + const node = createBaseNode(357 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -33665,7 +34356,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(356 /* SyntheticReferenceExpression */); + const node = createBaseNode(358 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -33900,24 +34591,26 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: + case 217 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 234 /* AsExpression */: + case 235 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 354 /* PartiallyEmittedExpression */: + case 234 /* ExpressionWithTypeArguments */: + return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments); + case 356 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } function isIgnorableParen(node) { return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node)); } - function restoreOuterExpressions(outerExpression, innerExpression, kinds = 15 /* All */) { + function restoreOuterExpressions(outerExpression, innerExpression, kinds = 63 /* All */) { if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) { return updateOuterExpression( outerExpression, @@ -33950,20 +34643,20 @@ function createNodeFactory(flags, baseFactory2) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: return false; - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; } } function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) { - const callee = skipOuterExpressions(expression, 15 /* All */); + const callee = skipOuterExpressions(expression, 63 /* All */); let thisArg; let target; if (isSuperProperty(callee)) { @@ -34218,19 +34911,19 @@ function createNodeFactory(flags, baseFactory2) { } function replacePropertyName(node, name) { switch (node.kind) { - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return updateGetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.type, node.body); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return updateSetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.body); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return updateMethodDeclaration(node, node.modifiers, node.asteriskToken, name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body); - case 173 /* MethodSignature */: + case 174 /* MethodSignature */: return updateMethodSignature(node, node.modifiers, name, node.questionToken, node.typeParameters, node.parameters, node.type); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return updatePropertyDeclaration2(node, node.modifiers, name, node.questionToken ?? node.exclamationToken, node.type, node.initializer); - case 171 /* PropertySignature */: + case 172 /* PropertySignature */: return updatePropertySignature(node, node.modifiers, name, node.questionToken, node.type); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return updatePropertyAssignment(node, name, node.initializer); } } @@ -34276,45 +34969,45 @@ function createNodeFactory(flags, baseFactory2) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 344 /* JSDocTypeTag */: + case 345 /* JSDocTypeTag */: return "type"; - case 342 /* JSDocReturnTag */: + case 343 /* JSDocReturnTag */: return "returns"; - case 343 /* JSDocThisTag */: + case 344 /* JSDocThisTag */: return "this"; - case 340 /* JSDocEnumTag */: + case 341 /* JSDocEnumTag */: return "enum"; - case 330 /* JSDocAuthorTag */: + case 331 /* JSDocAuthorTag */: return "author"; - case 332 /* JSDocClassTag */: + case 333 /* JSDocClassTag */: return "class"; - case 333 /* JSDocPublicTag */: + case 334 /* JSDocPublicTag */: return "public"; - case 334 /* JSDocPrivateTag */: + case 335 /* JSDocPrivateTag */: return "private"; - case 335 /* JSDocProtectedTag */: + case 336 /* JSDocProtectedTag */: return "protected"; - case 336 /* JSDocReadonlyTag */: + case 337 /* JSDocReadonlyTag */: return "readonly"; - case 337 /* JSDocOverrideTag */: + case 338 /* JSDocOverrideTag */: return "override"; - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: return "template"; - case 346 /* JSDocTypedefTag */: + case 347 /* JSDocTypedefTag */: return "typedef"; - case 341 /* JSDocParameterTag */: + case 342 /* JSDocParameterTag */: return "param"; - case 348 /* JSDocPropertyTag */: + case 349 /* JSDocPropertyTag */: return "prop"; - case 338 /* JSDocCallbackTag */: + case 339 /* JSDocCallbackTag */: return "callback"; - case 339 /* JSDocOverloadTag */: + case 340 /* JSDocOverloadTag */: return "overload"; - case 328 /* JSDocAugmentsTag */: + case 329 /* JSDocAugmentsTag */: return "augments"; - case 329 /* JSDocImplementsTag */: + case 330 /* JSDocImplementsTag */: return "implements"; - case 351 /* JSDocImportTag */: + case 352 /* JSDocImportTag */: return "import"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -34397,35 +35090,35 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { + if (kind >= 183 /* FirstTypeNode */ && kind <= 206 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 210 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 169 /* Parameter */: + case 170 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 261 /* VariableDeclarationList */: + case 262 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: + case 177 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: @@ -34436,31 +35129,31 @@ function getTransformFlagsSubtreeExclusions(kind) { case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 116 /* VoidKeyword */: - case 168 /* TypeParameter */: - case 171 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: + case 169 /* TypeParameter */: + case 172 /* PropertySignature */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 299 /* CatchClause */: + case 300 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 238 /* SatisfiesExpression */: - case 234 /* AsExpression */: - case 354 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: + case 217 /* TypeAssertionExpression */: + case 239 /* SatisfiesExpression */: + case 235 /* AsExpression */: + case 356 /* PartiallyEmittedExpression */: + case 218 /* ParenthesizedExpression */: case 108 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -34565,7 +35258,7 @@ function mergeTokenSourceMapRanges(sourceRanges, destRanges) { function getOrCreateEmitNode(node) { if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 307 /* SourceFile */) { + if (node.kind === 308 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); @@ -34828,7 +35521,9 @@ function createEmitHelperFactory(context) { createClassPrivateFieldInHelper, // 'using' helpers createAddDisposableResourceHelper, - createDisposeResourcesHelper + createDisposeResourcesHelper, + // --rewriteRelativeImportExtensions helpers + createRewriteRelativeImportExtensionsHelper }; function getUnscopedHelperName(name) { return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */); @@ -35317,6 +36012,15 @@ function createEmitHelperFactory(context) { [envBinding] ); } + function createRewriteRelativeImportExtensionsHelper(expression) { + context.requestEmitHelper(rewriteRelativeImportExtensionsHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__rewriteRelativeImportExtension"), + /*typeArguments*/ + void 0, + context.getCompilerOptions().jsx === 1 /* Preserve */ ? [expression, factory2.createTrue()] : [expression] + ); + } } function compareEmitHelpers(x, y) { if (x === y) return 0 /* EqualTo */; @@ -35451,7 +36155,7 @@ var asyncGeneratorHelper = { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -35633,8 +36337,8 @@ var generatorHelper = { priority: 6, text: ` var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -35697,13 +36401,23 @@ var importStarHelper = { dependencies: [createBindingHelper, setModuleDefaultHelper], priority: 2, text: ` - var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - };` + var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; + })();` }; var importDefaultHelper = { name: "typescript:commonjsimportdefault", @@ -35797,17 +36511,22 @@ var disposeResourcesHelper = { env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; env.hasError = true; } + var r, s = 0; function next() { - while (env.stack.length) { - var rec = env.stack.pop(); + while (r = env.stack.pop()) { try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; } catch (e) { fail(e); } } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); if (env.hasError) throw env.error; } return next(); @@ -35817,6 +36536,20 @@ var disposeResourcesHelper = { return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; });` }; +var rewriteRelativeImportExtensionsHelper = { + name: "typescript:rewriteRelativeImportExtensions", + importName: "__rewriteRelativeImportExtension", + scoped: false, + text: ` + var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) { + if (typeof path === "string" && /^\\.\\.?\\//.test(path)) { + return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; + };` +}; var asyncSuperHelper = { name: "typescript:async-super", scoped: true, @@ -35940,594 +36673,623 @@ function isCaseKeyword(node) { return node.kind === 84 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 166 /* QualifiedName */; + return node.kind === 167 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 167 /* ComputedPropertyName */; + return node.kind === 168 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 168 /* TypeParameter */; + return node.kind === 169 /* TypeParameter */; } function isParameter(node) { - return node.kind === 169 /* Parameter */; + return node.kind === 170 /* Parameter */; } function isDecorator(node) { - return node.kind === 170 /* Decorator */; + return node.kind === 171 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 171 /* PropertySignature */; + return node.kind === 172 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 172 /* PropertyDeclaration */; + return node.kind === 173 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; + return node.kind === 174 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 175 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; + return node.kind === 176 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; + return node.kind === 177 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; + return node.kind === 178 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; + return node.kind === 179 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; + return node.kind === 180 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; + return node.kind === 181 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; + return node.kind === 182 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; + return node.kind === 183 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; + return node.kind === 184 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; + return node.kind === 185 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; + return node.kind === 186 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; + return node.kind === 187 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; + return node.kind === 188 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; + return node.kind === 189 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; + return node.kind === 190 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; + return node.kind === 203 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; + return node.kind === 191 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; + return node.kind === 192 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; + return node.kind === 193 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; + return node.kind === 194 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; + return node.kind === 195 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; + return node.kind === 196 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; + return node.kind === 197 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; + return node.kind === 198 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; + return node.kind === 199 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; + return node.kind === 200 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; + return node.kind === 201 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; + return node.kind === 202 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; + return node.kind === 206 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; + return node.kind === 205 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 203 /* TemplateLiteralType */; + return node.kind === 204 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; + return node.kind === 207 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; + return node.kind === 208 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; + return node.kind === 209 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; + return node.kind === 210 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; + return node.kind === 211 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; + return node.kind === 212 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; + return node.kind === 213 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; + return node.kind === 214 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 214 /* NewExpression */; + return node.kind === 215 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; + return node.kind === 216 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 216 /* TypeAssertionExpression */; + return node.kind === 217 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; + return node.kind === 218 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; + return node.kind === 219 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; + return node.kind === 220 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 220 /* DeleteExpression */; + return node.kind === 221 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 221 /* TypeOfExpression */; + return node.kind === 222 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 222 /* VoidExpression */; + return node.kind === 223 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 223 /* AwaitExpression */; + return node.kind === 224 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 224 /* PrefixUnaryExpression */; + return node.kind === 225 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 225 /* PostfixUnaryExpression */; + return node.kind === 226 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 226 /* BinaryExpression */; + return node.kind === 227 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 227 /* ConditionalExpression */; + return node.kind === 228 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 228 /* TemplateExpression */; + return node.kind === 229 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 229 /* YieldExpression */; + return node.kind === 230 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 230 /* SpreadElement */; + return node.kind === 231 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 231 /* ClassExpression */; + return node.kind === 232 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 232 /* OmittedExpression */; + return node.kind === 233 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 233 /* ExpressionWithTypeArguments */; + return node.kind === 234 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 234 /* AsExpression */; + return node.kind === 235 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 238 /* SatisfiesExpression */; + return node.kind === 239 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 235 /* NonNullExpression */; + return node.kind === 236 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 236 /* MetaProperty */; + return node.kind === 237 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 237 /* SyntheticExpression */; + return node.kind === 238 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 354 /* PartiallyEmittedExpression */; + return node.kind === 356 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 355 /* CommaListExpression */; + return node.kind === 357 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 239 /* TemplateSpan */; + return node.kind === 240 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 240 /* SemicolonClassElement */; + return node.kind === 241 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 241 /* Block */; + return node.kind === 242 /* Block */; } function isVariableStatement(node) { - return node.kind === 243 /* VariableStatement */; + return node.kind === 244 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 242 /* EmptyStatement */; + return node.kind === 243 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 244 /* ExpressionStatement */; + return node.kind === 245 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 245 /* IfStatement */; + return node.kind === 246 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 246 /* DoStatement */; + return node.kind === 247 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 247 /* WhileStatement */; + return node.kind === 248 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 248 /* ForStatement */; + return node.kind === 249 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 249 /* ForInStatement */; + return node.kind === 250 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 250 /* ForOfStatement */; + return node.kind === 251 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 251 /* ContinueStatement */; + return node.kind === 252 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 252 /* BreakStatement */; + return node.kind === 253 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 253 /* ReturnStatement */; + return node.kind === 254 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 254 /* WithStatement */; + return node.kind === 255 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 255 /* SwitchStatement */; + return node.kind === 256 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 256 /* LabeledStatement */; + return node.kind === 257 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 257 /* ThrowStatement */; + return node.kind === 258 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 258 /* TryStatement */; + return node.kind === 259 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 259 /* DebuggerStatement */; + return node.kind === 260 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 260 /* VariableDeclaration */; + return node.kind === 261 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 261 /* VariableDeclarationList */; + return node.kind === 262 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 262 /* FunctionDeclaration */; + return node.kind === 263 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 263 /* ClassDeclaration */; + return node.kind === 264 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 264 /* InterfaceDeclaration */; + return node.kind === 265 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 265 /* TypeAliasDeclaration */; + return node.kind === 266 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 266 /* EnumDeclaration */; + return node.kind === 267 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 267 /* ModuleDeclaration */; + return node.kind === 268 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 268 /* ModuleBlock */; + return node.kind === 269 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 269 /* CaseBlock */; + return node.kind === 270 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 270 /* NamespaceExportDeclaration */; + return node.kind === 271 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 271 /* ImportEqualsDeclaration */; + return node.kind === 272 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 272 /* ImportDeclaration */; + return node.kind === 273 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 273 /* ImportClause */; + return node.kind === 274 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 302 /* ImportTypeAssertionContainer */; + return node.kind === 303 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 300 /* AssertClause */; + return node.kind === 301 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 301 /* AssertEntry */; + return node.kind === 302 /* AssertEntry */; } function isImportAttributes(node) { - return node.kind === 300 /* ImportAttributes */; + return node.kind === 301 /* ImportAttributes */; } function isImportAttribute(node) { - return node.kind === 301 /* ImportAttribute */; + return node.kind === 302 /* ImportAttribute */; } function isNamespaceImport(node) { - return node.kind === 274 /* NamespaceImport */; + return node.kind === 275 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 280 /* NamespaceExport */; + return node.kind === 281 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 275 /* NamedImports */; + return node.kind === 276 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 276 /* ImportSpecifier */; + return node.kind === 277 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 277 /* ExportAssignment */; + return node.kind === 278 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 278 /* ExportDeclaration */; + return node.kind === 279 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 279 /* NamedExports */; + return node.kind === 280 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 281 /* ExportSpecifier */; + return node.kind === 282 /* ExportSpecifier */; +} +function isModuleExportName(node) { + return node.kind === 80 /* Identifier */ || node.kind === 11 /* StringLiteral */; } function isMissingDeclaration(node) { - return node.kind === 282 /* MissingDeclaration */; + return node.kind === 283 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 353 /* NotEmittedStatement */; + return node.kind === 354 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 356 /* SyntheticReferenceExpression */; + return node.kind === 358 /* SyntheticReferenceExpression */; } function isExternalModuleReference(node) { - return node.kind === 283 /* ExternalModuleReference */; + return node.kind === 284 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 284 /* JsxElement */; + return node.kind === 285 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 285 /* JsxSelfClosingElement */; + return node.kind === 286 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 286 /* JsxOpeningElement */; + return node.kind === 287 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 287 /* JsxClosingElement */; + return node.kind === 288 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 288 /* JsxFragment */; + return node.kind === 289 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 289 /* JsxOpeningFragment */; + return node.kind === 290 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 290 /* JsxClosingFragment */; + return node.kind === 291 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 291 /* JsxAttribute */; + return node.kind === 292 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 292 /* JsxAttributes */; + return node.kind === 293 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 293 /* JsxSpreadAttribute */; + return node.kind === 294 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 294 /* JsxExpression */; + return node.kind === 295 /* JsxExpression */; } function isJsxNamespacedName(node) { - return node.kind === 295 /* JsxNamespacedName */; + return node.kind === 296 /* JsxNamespacedName */; } function isCaseClause(node) { - return node.kind === 296 /* CaseClause */; + return node.kind === 297 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 297 /* DefaultClause */; + return node.kind === 298 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 298 /* HeritageClause */; + return node.kind === 299 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 299 /* CatchClause */; + return node.kind === 300 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 303 /* PropertyAssignment */; + return node.kind === 304 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 304 /* ShorthandPropertyAssignment */; + return node.kind === 305 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 305 /* SpreadAssignment */; + return node.kind === 306 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 306 /* EnumMember */; + return node.kind === 307 /* EnumMember */; } function isSourceFile(node) { - return node.kind === 307 /* SourceFile */; + return node.kind === 308 /* SourceFile */; } function isBundle(node) { - return node.kind === 308 /* Bundle */; + return node.kind === 309 /* Bundle */; } function isJSDocTypeExpression(node) { - return node.kind === 309 /* JSDocTypeExpression */; + return node.kind === 310 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 310 /* JSDocNameReference */; + return node.kind === 311 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 311 /* JSDocMemberName */; + return node.kind === 312 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 324 /* JSDocLink */; + return node.kind === 325 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 325 /* JSDocLinkCode */; + return node.kind === 326 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 326 /* JSDocLinkPlain */; + return node.kind === 327 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 312 /* JSDocAllType */; + return node.kind === 313 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 313 /* JSDocUnknownType */; + return node.kind === 314 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 314 /* JSDocNullableType */; + return node.kind === 315 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 315 /* JSDocNonNullableType */; + return node.kind === 316 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 316 /* JSDocOptionalType */; + return node.kind === 317 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 317 /* JSDocFunctionType */; + return node.kind === 318 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 318 /* JSDocVariadicType */; + return node.kind === 319 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 319 /* JSDocNamepathType */; + return node.kind === 320 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 320 /* JSDoc */; + return node.kind === 321 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 322 /* JSDocTypeLiteral */; + return node.kind === 323 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 323 /* JSDocSignature */; + return node.kind === 324 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 328 /* JSDocAugmentsTag */; + return node.kind === 329 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 330 /* JSDocAuthorTag */; + return node.kind === 331 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 332 /* JSDocClassTag */; + return node.kind === 333 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 338 /* JSDocCallbackTag */; + return node.kind === 339 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 333 /* JSDocPublicTag */; + return node.kind === 334 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 334 /* JSDocPrivateTag */; + return node.kind === 335 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 335 /* JSDocProtectedTag */; + return node.kind === 336 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 336 /* JSDocReadonlyTag */; + return node.kind === 337 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 337 /* JSDocOverrideTag */; + return node.kind === 338 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 339 /* JSDocOverloadTag */; + return node.kind === 340 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 331 /* JSDocDeprecatedTag */; + return node.kind === 332 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 347 /* JSDocSeeTag */; + return node.kind === 348 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 340 /* JSDocEnumTag */; + return node.kind === 341 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 341 /* JSDocParameterTag */; + return node.kind === 342 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 342 /* JSDocReturnTag */; + return node.kind === 343 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 343 /* JSDocThisTag */; + return node.kind === 344 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 344 /* JSDocTypeTag */; + return node.kind === 345 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 345 /* JSDocTemplateTag */; + return node.kind === 346 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 346 /* JSDocTypedefTag */; + return node.kind === 347 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 327 /* JSDocTag */; + return node.kind === 328 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 348 /* JSDocPropertyTag */; + return node.kind === 349 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 329 /* JSDocImplementsTag */; + return node.kind === 330 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 350 /* JSDocSatisfiesTag */; + return node.kind === 351 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 349 /* JSDocThrowsTag */; + return node.kind === 350 /* JSDocThrowsTag */; } function isJSDocImportTag(node) { - return node.kind === 351 /* JSDocImportTag */; + return node.kind === 352 /* JSDocImportTag */; } function isSyntaxList(n) { - return n.kind === 352 /* SyntaxList */; + return n.kind === 353 /* SyntaxList */; } // src/compiler/factory/nodeChildren.ts -var nodeChildren = /* @__PURE__ */ new WeakMap(); -function getNodeChildren(node) { - if (!isNodeKind(node.kind)) return emptyArray; - return nodeChildren.get(node); +var sourceFileToNodeChildren = /* @__PURE__ */ new WeakMap(); +function getNodeChildren(node, sourceFile) { + var _a; + const kind = node.kind; + if (!isNodeKind(kind)) { + return emptyArray; + } + if (kind === 353 /* SyntaxList */) { + return node._children; + } + return (_a = sourceFileToNodeChildren.get(sourceFile)) == null ? void 0 : _a.get(node); } -function setNodeChildren(node, children) { - nodeChildren.set(node, children); +function setNodeChildren(node, sourceFile, children) { + if (node.kind === 353 /* SyntaxList */) { + Debug.fail("Should not need to re-set the children of a SyntaxList."); + } + let map2 = sourceFileToNodeChildren.get(sourceFile); + if (map2 === void 0) { + map2 = /* @__PURE__ */ new WeakMap(); + sourceFileToNodeChildren.set(sourceFile, map2); + } + map2.set(node, children); return children; } -function unsetNodeChildren(node) { - nodeChildren.delete(node); +function unsetNodeChildren(node, origSourceFile) { + var _a; + if (node.kind === 353 /* SyntaxList */) { + Debug.fail("Did not expect to unset the children of a SyntaxList."); + } + (_a = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a.delete(node); +} +function transferSourceFileChildren(sourceFile, targetSourceFile) { + const map2 = sourceFileToNodeChildren.get(sourceFile); + if (map2 !== void 0) { + sourceFileToNodeChildren.delete(sourceFile); + sourceFileToNodeChildren.set(targetSourceFile, map2); + } } // src/compiler/factory/utilities.ts @@ -36666,17 +37428,6 @@ function createForOfBindingStatement(factory2, node, boundValue) { ); } } -function insertLeadingStatement(factory2, dest, source) { - if (isBlock(dest)) { - return factory2.updateBlock(dest, setTextRange(factory2.createNodeArray([source, ...dest.statements]), dest.statements)); - } else { - return factory2.createBlock( - factory2.createNodeArray([dest, source]), - /*multiLine*/ - true - ); - } -} function createExpressionFromEntityName(factory2, node) { if (isQualifiedName(node)) { const left = createExpressionFromEntityName(factory2, node.left); @@ -36835,14 +37586,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -36895,7 +37646,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; + return node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -36908,32 +37659,34 @@ function getJSDocTypeAssertionType(node) { Debug.assertIsDefined(type); return type; } -function isOuterExpression(node, kinds = 15 /* All */) { +function isOuterExpression(node, kinds = 63 /* All */) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: - if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { + case 218 /* ParenthesizedExpression */: + if (kinds & -2147483648 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - case 233 /* ExpressionWithTypeArguments */: - case 238 /* SatisfiesExpression */: + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 235 /* NonNullExpression */: + case 239 /* SatisfiesExpression */: + return (kinds & (2 /* TypeAssertions */ | 32 /* Satisfies */)) !== 0; + case 234 /* ExpressionWithTypeArguments */: + return (kinds & 16 /* ExpressionsWithTypeArguments */) !== 0; + case 236 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 354 /* PartiallyEmittedExpression */: + case 356 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; } -function skipOuterExpressions(node, kinds = 15 /* All */) { +function skipOuterExpressions(node, kinds = 63 /* All */) { while (isOuterExpression(node, kinds)) { node = node.expression; } return node; } -function walkUpOuterExpressions(node, kinds = 15 /* All */) { +function walkUpOuterExpressions(node, kinds = 63 /* All */) { let parent2 = node.parent; while (isOuterExpression(parent2, kinds)) { parent2 = parent2.parent; @@ -36941,9 +37694,6 @@ function walkUpOuterExpressions(node, kinds = 15 /* All */) { } return parent2; } -function skipAssertions(node) { - return skipOuterExpressions(node, 6 /* Assertions */); -} function startOnNewLine(node) { return setStartsOnNewLine( node, @@ -36963,23 +37713,21 @@ function hasRecordedExternalHelpers(sourceFile) { } function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFactory, sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault) { if (compilerOptions.importHelpers && isEffectiveExternalModule(sourceFile, compilerOptions)) { - let namedBindings; const moduleKind = getEmitModuleKind(compilerOptions); - if (moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */ || sourceFile.impliedNodeFormat === 99 /* ESNext */) { - const helpers = getEmitHelpers(sourceFile); + const impliedModuleKind = getImpliedNodeFormatForEmitWorker(sourceFile, compilerOptions); + const helpers = getImportedHelpers(sourceFile); + if (impliedModuleKind !== 1 /* CommonJS */ && (moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */ || impliedModuleKind === 99 /* ESNext */ || impliedModuleKind === void 0 && moduleKind === 200 /* Preserve */)) { if (helpers) { const helperNames = []; for (const helper of helpers) { - if (!helper.scoped) { - const importName = helper.importName; - if (importName) { - pushIfUnique(helperNames, importName); - } + const importName = helper.importName; + if (importName) { + pushIfUnique(helperNames, importName); } } if (some(helperNames)) { helperNames.sort(compareStringsCaseSensitive); - namedBindings = nodeFactory.createNamedImports( + const namedBindings = nodeFactory.createNamedImports( map(helperNames, (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( /*isTypeOnly*/ false, @@ -36996,70 +37744,69 @@ function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFacto const parseNode = getOriginalNode(sourceFile, isSourceFile); const emitNode = getOrCreateEmitNode(parseNode); emitNode.externalHelpers = true; + const externalHelpersImportDeclaration = nodeFactory.createImportDeclaration( + /*modifiers*/ + void 0, + nodeFactory.createImportClause( + /*phaseModifier*/ + void 0, + /*name*/ + void 0, + namedBindings + ), + nodeFactory.createStringLiteral(externalHelpersModuleNameText), + /*attributes*/ + void 0 + ); + addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); + return externalHelpersImportDeclaration; } } } else { - const externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(nodeFactory, sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar || hasImportDefault); + const externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(nodeFactory, sourceFile, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStar || hasImportDefault); if (externalHelpersModuleName) { - namedBindings = nodeFactory.createNamespaceImport(externalHelpersModuleName); - } - } - if (namedBindings) { - const externalHelpersImportDeclaration = nodeFactory.createImportDeclaration( - /*modifiers*/ - void 0, - nodeFactory.createImportClause( + const externalHelpersImportDeclaration = nodeFactory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - /*name*/ - void 0, - namedBindings - ), - nodeFactory.createStringLiteral(externalHelpersModuleNameText), - /*attributes*/ - void 0 - ); - addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); - return externalHelpersImportDeclaration; + externalHelpersModuleName, + nodeFactory.createExternalModuleReference(nodeFactory.createStringLiteral(externalHelpersModuleNameText)) + ); + addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); + return externalHelpersImportDeclaration; + } } } } -function getOrCreateExternalHelpersModuleNameIfNeeded(factory2, node, compilerOptions, hasExportStarsToExportValues, hasImportStarOrImportDefault) { - if (compilerOptions.importHelpers && isEffectiveExternalModule(node, compilerOptions)) { - const externalHelpersModuleName = getExternalHelpersModuleName(node); - if (externalHelpersModuleName) { - return externalHelpersModuleName; - } - const moduleKind = getEmitModuleKind(compilerOptions); - let create = (hasExportStarsToExportValues || getESModuleInterop(compilerOptions) && hasImportStarOrImportDefault) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || node.impliedNodeFormat === 1 /* CommonJS */); - if (!create) { - const helpers = getEmitHelpers(node); - if (helpers) { - for (const helper of helpers) { - if (!helper.scoped) { - create = true; - break; - } - } - } - } - if (create) { - const parseNode = getOriginalNode(node, isSourceFile); - const emitNode = getOrCreateEmitNode(parseNode); - return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = factory2.createUniqueName(externalHelpersModuleNameText)); - } +function getImportedHelpers(sourceFile) { + return filter(getEmitHelpers(sourceFile), (helper) => !helper.scoped); +} +function getOrCreateExternalHelpersModuleNameIfNeeded(factory2, node, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStarOrImportDefault) { + const externalHelpersModuleName = getExternalHelpersModuleName(node); + if (externalHelpersModuleName) { + return externalHelpersModuleName; + } + const create = some(helpers) || (hasExportStarsToExportValues || getESModuleInterop(compilerOptions) && hasImportStarOrImportDefault) && getEmitModuleFormatOfFileWorker(node, compilerOptions) < 4 /* System */; + if (create) { + const parseNode = getOriginalNode(node, isSourceFile); + const emitNode = getOrCreateEmitNode(parseNode); + return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = factory2.createUniqueName(externalHelpersModuleNameText)); } } function getLocalNameForExternalImport(factory2, node, sourceFile) { const namespaceDeclaration = getNamespaceDeclarationNode(node); if (namespaceDeclaration && !isDefaultImport(node) && !isExportNamespaceAsDefaultDeclaration(node)) { const name = namespaceDeclaration.name; + if (name.kind === 11 /* StringLiteral */) { + return factory2.getGeneratedNameForNode(node); + } return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 272 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 273 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 279 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -37122,11 +37869,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -37145,11 +37892,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 169 /* Parameter */: - case 208 /* BindingElement */: + case 170 /* Parameter */: + case 209 /* BindingElement */: return bindingElement.dotDotDotToken; - case 230 /* SpreadElement */: - case 305 /* SpreadAssignment */: + case 231 /* SpreadElement */: + case 306 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -37161,7 +37908,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 208 /* BindingElement */: + case 209 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -37170,7 +37917,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -37179,7 +37926,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -37196,11 +37943,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: + case 210 /* ArrayLiteralExpression */: return name.elements; - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return name.properties; } } @@ -37217,19 +37964,19 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; + return kind === 177 /* Constructor */ || kind === 179 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 177 /* Constructor */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */; + return kind === 304 /* PropertyAssignment */ || kind === 305 /* ShorthandPropertyAssignment */ || kind === 263 /* FunctionDeclaration */ || kind === 177 /* Constructor */ || kind === 182 /* IndexSignature */ || kind === 176 /* ClassStaticBlockDeclaration */ || kind === 283 /* MissingDeclaration */ || kind === 244 /* VariableStatement */ || kind === 265 /* InterfaceDeclaration */ || kind === 266 /* TypeAliasDeclaration */ || kind === 267 /* EnumDeclaration */ || kind === 268 /* ModuleDeclaration */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 273 /* ImportDeclaration */ || kind === 271 /* NamespaceExportDeclaration */ || kind === 279 /* ExportDeclaration */ || kind === 278 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */; + return kind === 176 /* ClassStaticBlockDeclaration */ || kind === 304 /* PropertyAssignment */ || kind === 305 /* ShorthandPropertyAssignment */ || kind === 283 /* MissingDeclaration */ || kind === 271 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -37246,10 +37993,6 @@ function isQuestionOrPlusOrMinusToken(node) { function isModuleName(node) { return isIdentifier(node) || isStringLiteral(node); } -function isLiteralTypeLikeExpression(node) { - const kind = node.kind; - return kind === 106 /* NullKeyword */ || kind === 112 /* TrueKeyword */ || kind === 97 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); -} function isExponentiationOperator(kind) { return kind === 43 /* AsteriskAsteriskToken */; } @@ -37371,10 +38114,13 @@ var BinaryExpressionState; switch (currentState) { case enter: if (machine.onLeft) return left; + // falls through case left: if (machine.onOperator) return operator; + // falls through case operator: if (machine.onRight) return right; + // falls through case right: return exit; case exit: @@ -37435,10 +38181,6 @@ function isExportOrDefaultModifier(node) { const kind = node.kind; return isExportOrDefaultKeywordKind(kind); } -function isNonExportDefaultModifier(node) { - const kind = node.kind; - return isModifierKind(kind) && !isExportOrDefaultKeywordKind(kind); -} function elideNodes(factory2, nodes) { if (nodes === void 0) return void 0; if (nodes.length === 0) return nodes; @@ -37621,11 +38363,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; + return kind === 169 /* TypeParameter */ || kind === 170 /* Parameter */ || kind === 172 /* PropertySignature */ || kind === 173 /* PropertyDeclaration */ || kind === 174 /* MethodSignature */ || kind === 175 /* MethodDeclaration */ || kind === 177 /* Constructor */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */ || kind === 182 /* IndexSignature */ || kind === 186 /* ConstructorType */ || kind === 219 /* FunctionExpression */ || kind === 220 /* ArrowFunction */ || kind === 232 /* ClassExpression */ || kind === 244 /* VariableStatement */ || kind === 263 /* FunctionDeclaration */ || kind === 264 /* ClassDeclaration */ || kind === 265 /* InterfaceDeclaration */ || kind === 266 /* TypeAliasDeclaration */ || kind === 267 /* EnumDeclaration */ || kind === 268 /* ModuleDeclaration */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 273 /* ImportDeclaration */ || kind === 278 /* ExportAssignment */ || kind === 279 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */; + return kind === 170 /* Parameter */ || kind === 173 /* PropertyDeclaration */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */ || kind === 232 /* ClassExpression */ || kind === 264 /* ClassDeclaration */; } // src/compiler/parser.ts @@ -37680,429 +38422,429 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 102 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [167 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [169 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [305 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [306 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [170 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [173 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [172 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [304 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [261 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [209 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [182 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [186 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [185 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [180 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [181 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [175 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [174 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [177 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [178 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [179 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [263 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [219 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [220 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [176 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [184 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [183 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [187 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [188 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [189 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [190 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [193 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [194 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [195 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [196 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [206 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [303 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [197 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [199 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [200 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [201 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [202 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [203 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [207 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [208 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [210 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [211 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [212 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [213 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [214 /* CallExpression */]: forEachChildInCallOrNewExpression, + [215 /* NewExpression */]: forEachChildInCallOrNewExpression, + [216 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [217 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [218 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [221 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [222 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [223 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [225 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [230 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [224 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [226 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [227 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [235 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [236 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [239 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [237 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [228 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [231 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [241 /* Block */]: forEachChildInBlock, - [268 /* ModuleBlock */]: forEachChildInBlock, - [307 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [242 /* Block */]: forEachChildInBlock, + [269 /* ModuleBlock */]: forEachChildInBlock, + [308 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [244 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [262 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [245 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [246 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [247 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [248 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [249 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [250 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [251 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [252 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [253 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [254 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [255 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [256 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [270 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [297 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [298 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [257 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [258 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [259 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [300 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [171 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [264 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [232 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [265 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [266 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [267 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [307 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [268 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [272 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [273 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, - [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [274 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) { + [301 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) { + [302 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [271 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [275 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [281 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [276 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [280 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [279 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, - [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [277 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [282 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [278 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [229 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [240 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [204 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [205 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [168 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [299 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [234 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [284 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [283 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [355 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [357 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [285 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [289 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [286 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [287 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [293 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [292 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [294 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [295 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [288 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { + [296 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [309 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [315 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [314 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [316 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [318 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [317 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [191 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [192 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [310 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [316 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [315 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [317 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [319 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [318 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [320 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [321 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [347 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [348 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [310 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [311 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [311 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [312 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [341 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [348 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [330 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [342 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [349 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [331 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [329 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [330 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [328 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [329 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [345 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [346 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [346 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 309 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [347 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 310 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [338 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [339 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [342 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [344 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [343 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [340 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [349 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [339 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [323 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [343 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [345 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [344 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [341 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [351 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [350 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [340 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [324 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [324 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [325 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [326 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [322 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [325 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [326 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [327 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [323 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [327 /* JSDocTag */]: forEachChildInJSDocTag, - [332 /* JSDocClassTag */]: forEachChildInJSDocTag, - [333 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [334 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [335 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [336 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [331 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [337 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [351 /* JSDocImportTag */]: forEachChildInJSDocImportTag, - [354 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [328 /* JSDocTag */]: forEachChildInJSDocTag, + [333 /* JSDocClassTag */]: forEachChildInJSDocTag, + [334 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [335 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [336 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [337 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [332 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [338 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [352 /* JSDocImportTag */]: forEachChildInJSDocImportTag, + [356 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -38160,7 +38902,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 165 /* LastToken */) { + if (node === void 0 || node.kind <= 166 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -38193,7 +38935,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { if (res === "skip") continue; return res; } - if (current.kind >= 166 /* FirstNode */) { + if (current.kind >= 167 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -38214,7 +38956,7 @@ function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile); } function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) { - var _a, _b, _c, _d; + var _a, _b; (_a = tracing) == null ? void 0 : _a.push( tracing.Phase.Parse, "createSourceFile", @@ -38224,7 +38966,6 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar ); mark("beforeParse"); let result; - (_b = perfLogger) == null ? void 0 : _b.logStartParseSourceFile(fileName); const { languageVersion, setExternalModuleIndicator: overrideSetExternalModuleIndicator, @@ -38260,10 +39001,9 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar jsDocParsingMode ); } - (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile(); mark("afterParse"); measure("Parse", "beforeParse", "afterParse"); - (_d = tracing) == null ? void 0 : _d.pop(); + (_b = tracing) == null ? void 0 : _b.pop(); return result; } function parseIsolatedEntityName(text, languageVersion) { @@ -38474,6 +39214,7 @@ var Parser; expression2 = parseLiteralNode(); break; } + // falls through default: expression2 = parseObjectLiteralExpression(); break; @@ -39190,7 +39931,7 @@ var Parser; "", /*isSingleQuote*/ void 0 - ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 283 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -39203,7 +39944,7 @@ var Parser; function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) { if (isIdentifier3) { identifierCount++; - const pos = getNodePos(); + const pos = scanner2.hasPrecedingJSDocLeadingAsterisks() ? scanner2.getTokenStart() : getNodePos(); const originalKeywordKind = token(); const text = internIdentifier(scanner2.getTokenValue()); const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape(); @@ -39251,13 +39992,13 @@ var Parser; return createIdentifier(tokenIsIdentifierOrKeyword(token())); } function isLiteralPropertyName() { - return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */; + return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */; } function isImportAttributeName2() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; } function parsePropertyNameWorker(allowComputedPropertyNames) { - if (token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */) { + if (token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */) { const node = parseLiteralNode(); node.text = internIdentifier(node.text); return node; @@ -39315,10 +40056,12 @@ var Parser; case 90 /* DefaultKeyword */: return nextTokenCanFollowDefaultKeyword(); case 126 /* StaticKeyword */: + nextToken(); + return canFollowModifier(); case 139 /* GetKeyword */: case 153 /* SetKeyword */: nextToken(); - return canFollowModifier(); + return canFollowGetOrSetKeyword(); default: return nextTokenIsOnSameLineAndCanFollowModifier(); } @@ -39336,6 +40079,9 @@ var Parser; function canFollowModifier() { return token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */ || token() === 42 /* AsteriskToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); } + function canFollowGetOrSetKeyword() { + return token() === 23 /* OpenBracketToken */ || isLiteralPropertyName(); + } function nextTokenCanFollowDefaultKeyword() { nextToken(); return token() === 86 /* ClassKeyword */ || token() === 100 /* FunctionKeyword */ || token() === 120 /* InterfaceKeyword */ || token() === 60 /* AtToken */ || token() === 128 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 134 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); @@ -39395,6 +40141,7 @@ var Parser; case 25 /* DotToken */: return true; } + // falls through case 11 /* ArgumentExpressions */: return token() === 26 /* DotDotDotToken */ || isStartOfExpression(); case 16 /* Parameters */: @@ -39416,6 +40163,9 @@ var Parser; if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { return false; } + if (token() === 11 /* StringLiteral */) { + return true; + } return tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; @@ -39425,6 +40175,7 @@ var Parser; return true; case 26 /* Count */: return Debug.fail("ParsingContext.Count used as a context"); + // Not a real context, only a marker. default: Debug.assertNever(parsingContext2, "Non-exhaustive case in 'isListElement'."); } @@ -39630,14 +40381,14 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: - case 240 /* SemicolonClassElement */: + case 177 /* Constructor */: + case 182 /* IndexSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 173 /* PropertyDeclaration */: + case 241 /* SemicolonClassElement */: return true; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -39648,8 +40399,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: return true; } } @@ -39658,65 +40409,65 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 243 /* VariableStatement */: - case 241 /* Block */: - case 245 /* IfStatement */: - case 244 /* ExpressionStatement */: - case 257 /* ThrowStatement */: - case 253 /* ReturnStatement */: - case 255 /* SwitchStatement */: - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - case 242 /* EmptyStatement */: - case 258 /* TryStatement */: - case 256 /* LabeledStatement */: - case 246 /* DoStatement */: - case 259 /* DebuggerStatement */: - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: + case 263 /* FunctionDeclaration */: + case 244 /* VariableStatement */: + case 242 /* Block */: + case 246 /* IfStatement */: + case 245 /* ExpressionStatement */: + case 258 /* ThrowStatement */: + case 254 /* ReturnStatement */: + case 256 /* SwitchStatement */: + case 253 /* BreakStatement */: + case 252 /* ContinueStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 249 /* ForStatement */: + case 248 /* WhileStatement */: + case 255 /* WithStatement */: + case 243 /* EmptyStatement */: + case 259 /* TryStatement */: + case 257 /* LabeledStatement */: + case 247 /* DoStatement */: + case 260 /* DebuggerStatement */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 279 /* ExportDeclaration */: + case 278 /* ExportAssignment */: + case 268 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 306 /* EnumMember */; + return node.kind === 307 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 171 /* PropertySignature */: - case 179 /* CallSignature */: + case 181 /* ConstructSignature */: + case 174 /* MethodSignature */: + case 182 /* IndexSignature */: + case 172 /* PropertySignature */: + case 180 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 260 /* VariableDeclaration */) { + if (node.kind !== 261 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 169 /* Parameter */) { + if (node.kind !== 170 /* Parameter */) { return false; } const parameter = node; @@ -39741,6 +40492,7 @@ var Parser; case 3 /* SwitchClauseStatements */: return parseErrorAtCurrentToken(Diagnostics.Statement_expected); case 18 /* RestProperties */: + // fallthrough case 4 /* TypeMembers */: return parseErrorAtCurrentToken(Diagnostics.Property_or_signature_expected); case 5 /* ClassMembers */: @@ -39788,6 +40540,7 @@ var Parser; return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 26 /* Count */: return Debug.fail("ParsingContext.Count used as a context"); + // Not a real context, only a marker. default: Debug.assertNever(context); } @@ -40061,14 +40814,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { + case 185 /* FunctionType */: + case 186 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 196 /* ParenthesizedType */: + case 197 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -40359,7 +41112,7 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { + if (kind === 181 /* ConstructSignature */) { parseExpected(105 /* NewKeyword */); } const typeParameters = parseTypeParameters(); @@ -40370,7 +41123,7 @@ var Parser; true ); parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 180 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -40454,10 +41207,10 @@ var Parser; } function parseTypeMember() { if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); + return parseSignatureMember(180 /* CallSignature */); } if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); + return parseSignatureMember(181 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -40466,10 +41219,10 @@ var Parser; false ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 179 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -40678,6 +41431,7 @@ var Parser; /*skipKeyword*/ true ); + parseOptional(28 /* CommaToken */); if (!parseExpected(20 /* CloseBraceToken */)) { const lastError = lastOrUndefined(parseDiagnostics); if (lastError && lastError.code === Diagnostics._0_expected.code) { @@ -40712,10 +41466,12 @@ var Parser; return tryParse(parseKeywordAndNoDot) || parseTypeReference(); case 67 /* AsteriskEqualsToken */: scanner2.reScanAsteriskEqualsToken(); + // falls through case 42 /* AsteriskToken */: return parseJSDocAllType(); case 61 /* QuestionQuestionToken */: scanner2.reScanQuestionToken(); + // falls through case 58 /* QuestionToken */: return parseJSDocUnknownOrNullableType(); case 100 /* FunctionKeyword */: @@ -41408,7 +42164,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 197 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -41433,10 +42189,13 @@ var Parser; if (token() !== 27 /* SemicolonToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); } + const savedYieldContext = inYieldContext(); + setYieldContext(false); const savedTopLevel = topLevel; topLevel = false; const node = isAsync ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)) : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)); topLevel = savedTopLevel; + setYieldContext(savedYieldContext); return node; } function parseConditionalExpressionRest(leftOperand, pos, allowReturnTypeInArrowFunction) { @@ -41553,7 +42312,7 @@ var Parser; if (token() === 43 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 217 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { Debug.assert(isKeywordOrPunctuation(unaryOperator)); @@ -41593,6 +42352,7 @@ var Parser; if (isAwaitExpression2()) { return parseAwaitExpression(); } + // falls through default: return parseUpdateExpression(); } @@ -41612,6 +42372,8 @@ var Parser; if (languageVariant !== 1 /* JSX */) { return false; } + // We are in JSX context and the token is part of JSXElement. + // falls through default: return true; } @@ -41646,7 +42408,13 @@ var Parser; nextToken(); nextToken(); expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; + if (expression.name.escapedText === "defer") { + if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; + } + } else { + sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; + } } else { expression = parseMemberExpressionOrHigher(); } @@ -41695,11 +42463,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 286 /* JsxOpeningElement */) { + if (opening.kind === 287 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 285 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -41723,10 +42491,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 289 /* JsxOpeningFragment */) { + } else if (opening.kind === 290 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 286 /* JsxSelfClosingElement */); result = opening; } if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { @@ -41798,7 +42566,7 @@ var Parser; const child = parseJsxChild(openingTag, currentToken = scanner2.reScanJsxToken()); if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 285 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -42077,7 +42845,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -42140,7 +42908,7 @@ var Parser; } } if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 234 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -42185,10 +42953,16 @@ var Parser; } function canFollowTypeArgumentsInExpression() { switch (token()) { + // These tokens can follow a type argument list in a call expression. case 21 /* OpenParenToken */: + // foo( case 15 /* NoSubstitutionTemplateLiteral */: + // foo `...` case 16 /* TemplateHead */: return true; + // A type argument list followed by `<` never makes sense, and a type argument list followed + // by `>` is ambiguous with a (re-scanned) `>>` operator, so we disqualify both. Also, in + // this context, `+` and `-` are unary operators, not binary operators. case 30 /* LessThanToken */: case 32 /* GreaterThanToken */: case 40 /* PlusToken */: @@ -42206,6 +42980,7 @@ var Parser; false ); } + // falls through case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: @@ -42301,10 +43076,10 @@ var Parser; true ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 179 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -42398,7 +43173,7 @@ var Parser; false ); let typeArguments; - if (expression.kind === 233 /* ExpressionWithTypeArguments */) { + if (expression.kind === 234 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -42543,10 +43318,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); + parseExpected(kind === 253 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 253 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -42709,8 +43484,30 @@ var Parser; return isUsingDeclaration(); case 135 /* AwaitKeyword */: return isAwaitUsingDeclaration(); + // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; + // however, an identifier cannot be followed by another identifier on the same line. This is what we + // count on to parse out the respective declarations. For instance, we exploit this to say that + // + // namespace n + // + // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees + // + // namespace + // n + // + // as the identifier 'namespace' on one line followed by the identifier 'n' on another. + // We need to look one token ahead to see if it permissible to try parsing a declaration. + // + // *Note*: 'interface' is actually a strict mode reserved word. So while + // + // "use strict" + // interface + // I {} + // + // could be legal, it would add complexity for very little gain. case 120 /* InterfaceKeyword */: case 156 /* TypeKeyword */: + case 166 /* DeferKeyword */: return nextTokenIsIdentifierOnSameLine(); case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: @@ -42737,7 +43534,7 @@ var Parser; return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; case 102 /* ImportKeyword */: nextToken(); - return token() === 11 /* StringLiteral */ || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); + return token() === 166 /* DeferKeyword */ || token() === 11 /* StringLiteral */ || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); case 95 /* ExportKeyword */: let currentToken2 = nextToken(); if (currentToken2 === 156 /* TypeKeyword */) { @@ -42781,6 +43578,9 @@ var Parser; case 111 /* ThrowKeyword */: case 113 /* TryKeyword */: case 89 /* DebuggerKeyword */: + // 'catch' and 'finally' do not actually indicate that the code is part of a statement, + // however, we say they are here so that we may gracefully parse them and error later. + // falls through case 85 /* CatchKeyword */: case 98 /* FinallyKeyword */: return true; @@ -42796,6 +43596,7 @@ var Parser; case 145 /* NamespaceKeyword */: case 156 /* TypeKeyword */: case 162 /* GlobalKeyword */: + case 166 /* DeferKeyword */: return true; case 129 /* AccessorKeyword */: case 125 /* PublicKeyword */: @@ -42821,9 +43622,15 @@ var Parser; true ); } + function nextTokenIsEqualsOrSemicolonOrColonToken() { + nextToken(); + return token() === 64 /* EqualsToken */ || token() === 27 /* SemicolonToken */ || token() === 59 /* ColonToken */; + } function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { nextToken(); - if (disallowOf && token() === 165 /* OfKeyword */) return false; + if (disallowOf && token() === 165 /* OfKeyword */) { + return lookAhead(nextTokenIsEqualsOrSemicolonOrColonToken); + } return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner2.hasPrecedingLineBreak(); } function isUsingDeclaration() { @@ -42907,9 +43714,9 @@ var Parser; case 99 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(251 /* ContinueStatement */); + return parseBreakOrContinueStatement(252 /* ContinueStatement */); case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(252 /* BreakStatement */); + return parseBreakOrContinueStatement(253 /* BreakStatement */); case 107 /* ReturnKeyword */: return parseReturnStatement(); case 118 /* WithKeyword */: @@ -42919,6 +43726,8 @@ var Parser; case 111 /* ThrowKeyword */: return parseThrowStatement(); case 113 /* TryKeyword */: + // Include 'catch' and 'finally' for error recovery. + // falls through case 85 /* CatchKeyword */: case 98 /* FinallyKeyword */: return parseTryStatement(); @@ -43021,7 +43830,7 @@ var Parser; default: if (modifiersIn) { const missing = createMissingNode( - 282 /* MissingDeclaration */, + 283 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -43304,7 +44113,7 @@ var Parser; false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 178 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -43337,10 +44146,15 @@ var Parser; } switch (token()) { case 21 /* OpenParenToken */: + // Method declaration case 30 /* LessThanToken */: + // Generic Method declaration case 54 /* ExclamationToken */: + // Non-null assertion on property name case 59 /* ColonToken */: + // Type Annotation for declaration case 64 /* EqualsToken */: + // Initializer for declaration case 58 /* QuestionToken */: return true; default: @@ -43467,10 +44281,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 179 /* SetAccessor */, 0 /* None */); } if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); @@ -43481,7 +44295,7 @@ var Parser; if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); } - if (tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 42 /* AsteriskToken */ || token() === 23 /* OpenBracketToken */) { + if (tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */ || token() === 42 /* AsteriskToken */ || token() === 23 /* OpenBracketToken */) { const isAmbient = some(modifiers, isDeclareModifier); if (isAmbient) { for (const m of modifiers) { @@ -43518,10 +44332,10 @@ var Parser; true ); if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 232 /* ClassExpression */); } const missing = createMissingNode( - 282 /* MissingDeclaration */, + 283 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -43536,11 +44350,11 @@ var Parser; hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 231 /* ClassExpression */ + 232 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 264 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); @@ -43560,7 +44374,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 264 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { @@ -43586,7 +44400,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 233 /* ExpressionWithTypeArguments */) { + if (expression.kind === 234 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -43729,27 +44543,36 @@ var Parser; if (isIdentifier2()) { identifier = parseIdentifier(); } - let isTypeOnly = false; + let phaseModifier; if ((identifier == null ? void 0 : identifier.escapedText) === "type" && (token() !== 161 /* FromKeyword */ || isIdentifier2() && lookAhead(nextTokenIsFromKeywordOrEqualsToken)) && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { - isTypeOnly = true; + phaseModifier = 156 /* TypeKeyword */; + identifier = isIdentifier2() ? parseIdentifier() : void 0; + } else if ((identifier == null ? void 0 : identifier.escapedText) === "defer" && (token() === 161 /* FromKeyword */ ? !lookAhead(nextTokenIsStringLiteral) : token() !== 28 /* CommaToken */ && token() !== 64 /* EqualsToken */)) { + phaseModifier = 166 /* DeferKeyword */; identifier = isIdentifier2() ? parseIdentifier() : void 0; } - if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration()) { - return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly); + if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() && phaseModifier !== 166 /* DeferKeyword */) { + return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, phaseModifier === 156 /* TypeKeyword */); } - const importClause = tryParseImportClause(identifier, afterImportPos, isTypeOnly); + const importClause = tryParseImportClause( + identifier, + afterImportPos, + phaseModifier, + /*skipJsDocLeadingAsterisks*/ + void 0 + ); const moduleSpecifier = parseModuleSpecifier(); const attributes = tryParseImportAttributes(); parseSemicolon(); const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } - function tryParseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks = false) { + function tryParseImportClause(identifier, pos, phaseModifier, skipJsDocLeadingAsterisks = false) { let importClause; if (identifier || // import id token() === 42 /* AsteriskToken */ || // import * token() === 19 /* OpenBraceToken */) { - importClause = parseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks); + importClause = parseImportClause(identifier, pos, phaseModifier, skipJsDocLeadingAsterisks); parseExpected(161 /* FromKeyword */); } return importClause; @@ -43825,14 +44648,18 @@ var Parser; const finished = withJSDoc(finishNode(node, pos), hasJSDoc); return finished; } - function parseImportClause(identifier, pos, isTypeOnly, skipJsDocLeadingAsterisks) { + function parseImportClause(identifier, pos, phaseModifier, skipJsDocLeadingAsterisks) { let namedBindings; if (!identifier || parseOptional(28 /* CommaToken */)) { if (skipJsDocLeadingAsterisks) scanner2.setSkipJsDocLeadingAsterisks(true); - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); + if (token() === 42 /* AsteriskToken */) { + namedBindings = parseNamespaceImport(); + } else { + namedBindings = parseNamedImportsOrExports(276 /* NamedImports */); + } if (skipJsDocLeadingAsterisks) scanner2.setSkipJsDocLeadingAsterisks(false); } - return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); + return finishNode(factory2.createImportClause(phaseModifier, identifier, namedBindings), pos); } function parseModuleReference() { return isExternalModuleReference2() ? parseExternalModuleReference() : parseEntityName( @@ -43864,17 +44691,23 @@ var Parser; const name = parseIdentifier(); return finishNode(factory2.createNamespaceImport(name), pos); } + function canParseModuleExportName() { + return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; + } + function parseModuleExportName(parseName) { + return token() === 11 /* StringLiteral */ ? parseLiteralNode() : parseName(); + } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); + const node = kind === 276 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(282 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(276 /* ImportSpecifier */); + return parseImportOrExportSpecifier(277 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -43884,44 +44717,53 @@ var Parser; let isTypeOnly = false; let propertyName; let canParseAsKeyword = true; - let name = parseIdentifierName(); - if (name.escapedText === "type") { + let name = parseModuleExportName(parseIdentifierName); + if (name.kind === 80 /* Identifier */ && name.escapedText === "type") { if (token() === 130 /* AsKeyword */) { const firstAs = parseIdentifierName(); if (token() === 130 /* AsKeyword */) { const secondAs = parseIdentifierName(); - if (tokenIsIdentifierOrKeyword(token())) { + if (canParseModuleExportName()) { isTypeOnly = true; propertyName = firstAs; - name = parseNameWithKeywordCheck(); + name = parseModuleExportName(parseNameWithKeywordCheck); canParseAsKeyword = false; } else { propertyName = name; name = secondAs; canParseAsKeyword = false; } - } else if (tokenIsIdentifierOrKeyword(token())) { + } else if (canParseModuleExportName()) { propertyName = name; canParseAsKeyword = false; - name = parseNameWithKeywordCheck(); + name = parseModuleExportName(parseNameWithKeywordCheck); } else { isTypeOnly = true; name = firstAs; } - } else if (tokenIsIdentifierOrKeyword(token())) { + } else if (canParseModuleExportName()) { isTypeOnly = true; - name = parseNameWithKeywordCheck(); + name = parseModuleExportName(parseNameWithKeywordCheck); } } if (canParseAsKeyword && token() === 130 /* AsKeyword */) { propertyName = name; parseExpected(130 /* AsKeyword */); - name = parseNameWithKeywordCheck(); + name = parseModuleExportName(parseNameWithKeywordCheck); } - if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { - parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); + if (kind === 277 /* ImportSpecifier */) { + if (name.kind !== 80 /* Identifier */) { + parseErrorAt(skipTrivia(sourceText, name.pos), name.end, Diagnostics.Identifier_expected); + name = setTextRangePosEnd(createMissingNode( + 80 /* Identifier */, + /*reportAtCurrentPosition*/ + false + ), name.pos, name.pos); + } else if (checkIdentifierIsKeyword) { + parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); + } } - const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 277 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -43931,7 +44773,7 @@ var Parser; } } function parseNamespaceExport(pos) { - return finishNode(factory2.createNamespaceExport(parseIdentifierName()), pos); + return finishNode(factory2.createNamespaceExport(parseModuleExportName(parseIdentifierName)), pos); } function parseExportDeclaration(pos, hasJSDoc, modifiers) { const savedAwaitContext = inAwaitContext(); @@ -43951,7 +44793,7 @@ var Parser; parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(279 /* NamedExports */); + exportClause = parseNamedImportsOrExports(280 /* NamedExports */); if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); @@ -44232,6 +45074,7 @@ var Parser; linkEnd = scanner2.getTokenEnd(); break; } + // fallthrough if it's not a {@link sequence default: state = 2 /* SavingComments */; pushComment(scanner2.getTokenText()); @@ -44490,6 +45333,8 @@ var Parser; indent3 += 1; break; } + // record the * as a comment + // falls through default: if (state !== 3 /* SavingBackticks */) { state = 2 /* SavingComments */; @@ -44602,7 +45447,7 @@ var Parser; switch (node.kind) { case 151 /* ObjectKeyword */: return true; - case 188 /* ArrayType */: + case 189 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -44632,14 +45477,14 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 341 /* JSDocParameterTag */ || child.kind === 348 /* JSDocPropertyTag */) { + if (child.kind === 342 /* JSDocParameterTag */ || child.kind === 349 /* JSDocPropertyTag */) { children = append(children, child); - } else if (child.kind === 345 /* JSDocTemplateTag */) { + } else if (child.kind === 346 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 189 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -44728,8 +45573,7 @@ var Parser; const importClause = tryParseImportClause( identifier, afterImportTagPos, - /*isTypeOnly*/ - true, + 156 /* TypeKeyword */, /*skipJsDocLeadingAsterisks*/ true ); @@ -44748,6 +45592,7 @@ var Parser; const node = factory2.createExpressionWithTypeArguments(expression, typeArguments); const res = finishNode(node, pos); if (usedBrace) { + skipWhitespace(); parseExpected(20 /* CloseBraceToken */); } return res; @@ -44793,11 +45638,11 @@ var Parser; let jsDocPropertyTags; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { - if (child.kind === 345 /* JSDocTemplateTag */) { + if (child.kind === 346 /* JSDocTemplateTag */) { break; } hasChildren = true; - if (child.kind === 344 /* JSDocTypeTag */) { + if (child.kind === 345 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -44812,7 +45657,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 189 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -44855,7 +45700,7 @@ var Parser; let child; let parameters; while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) { - if (child.kind === 345 /* JSDocTemplateTag */) { + if (child.kind === 346 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; } @@ -44868,7 +45713,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 342 /* JSDocReturnTag */) { + if (tag && tag.kind === 343 /* JSDocReturnTag */) { return tag; } } @@ -44923,7 +45768,7 @@ var Parser; case 60 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 341 /* JSDocParameterTag */ || child.kind === 348 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 342 /* JSDocParameterTag */ || child.kind === 349 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -45139,6 +45984,7 @@ var IncrementalParser; aggressiveChecks ); result.impliedNodeFormat = sourceFile.impliedNodeFormat; + transferSourceFileChildren(sourceFile, result); return result; } IncrementalParser2.updateSourceFile = updateSourceFile2; @@ -45174,7 +46020,7 @@ var IncrementalParser; } } } - function moveElementEntirelyPastChangeRange(element, isArray2, delta, oldText, newText, aggressiveChecks) { + function moveElementEntirelyPastChangeRange(element, origSourceFile, isArray2, delta, oldText, newText, aggressiveChecks) { if (isArray2) { visitArray2(element); } else { @@ -45186,7 +46032,7 @@ var IncrementalParser; if (aggressiveChecks && shouldCheckNode(node)) { text = oldText.substring(node.pos, node.end); } - unsetNodeChildren(node); + unsetNodeChildren(node, origSourceFile); setTextRangePosEnd(node, node.pos + delta, node.end + delta); if (aggressiveChecks && shouldCheckNode(node)) { Debug.assert(text === newText.substring(node.pos, node.end)); @@ -45260,6 +46106,7 @@ var IncrementalParser; if (child.pos > changeRangeOldEnd) { moveElementEntirelyPastChangeRange( child, + sourceFile, /*isArray*/ false, delta, @@ -45272,7 +46119,7 @@ var IncrementalParser; const fullEnd = child.end; if (fullEnd >= changeStart) { markAsIntersectingIncrementalChange(child); - unsetNodeChildren(child); + unsetNodeChildren(child, sourceFile); adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); forEachChild(child, visitNode3, visitArray2); if (hasJSDocNodes(child)) { @@ -45290,6 +46137,7 @@ var IncrementalParser; if (array.pos > changeRangeOldEnd) { moveElementEntirelyPastChangeRange( array, + sourceFile, /*isArray*/ true, delta, @@ -45458,9 +46306,10 @@ function getDeclarationFileExtension(fileName) { return standardExtension; } if (fileExtensionIs(fileName, ".ts" /* Ts */)) { - const index = getBaseFileName(fileName).lastIndexOf(".d."); + const baseName = getBaseFileName(fileName); + const index = baseName.lastIndexOf(".d."); if (index >= 0) { - return fileName.substring(index); + return baseName.substring(index); } } return void 0; @@ -45567,6 +46416,7 @@ function processPragmasIntoFields(context, reportDiagnostic) { case "jsximportsource": case "jsxruntime": return; + // Accessed directly default: Debug.fail("Unhandled pragma kind"); } @@ -45581,8 +46431,8 @@ function getNamedArgRegEx(name) { namedArgRegExCache.set(name, result); return result; } -var tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; -var singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; +var tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/m; +var singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m; function extractPragmas(pragmas, range, text) { const tripleSlash = range.kind === 2 /* SingleLineCommentTrivia */ && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { @@ -45623,7 +46473,7 @@ function extractPragmas(pragmas, range, text) { return addPragmaForMatch(pragmas, range, 2 /* SingleLine */, singleLine); } if (range.kind === 3 /* MultiLineCommentTrivia */) { - const multiLinePragmaRegEx = /@(\S+)(\s+.*)?$/gim; + const multiLinePragmaRegEx = /@(\S+)(\s+(?:\S.*)?)?$/gm; let multiLineMatch; while (multiLineMatch = multiLinePragmaRegEx.exec(text)) { addPragmaForMatch(pragmas, range, 4 /* MultiLine */, multiLineMatch); @@ -45670,7 +46520,7 @@ function tagNamesAreEquivalent(lhs, rhs) { if (lhs.kind === 110 /* ThisKeyword */) { return true; } - if (lhs.kind === 295 /* JsxNamespacedName */) { + if (lhs.kind === 296 /* JsxNamespacedName */) { return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -45685,9 +46535,9 @@ var compileOnSaveCommandLineOption = { var jsxOptionMap = new Map(Object.entries({ "preserve": 1 /* Preserve */, "react-native": 3 /* ReactNative */, - "react": 2 /* React */, "react-jsx": 4 /* ReactJSX */, - "react-jsxdev": 5 /* ReactJSXDev */ + "react-jsxdev": 5 /* ReactJSXDev */, + "react": 2 /* React */ })); var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key, value]) => ["" + value, key])); var libEntries = [ @@ -45704,6 +46554,7 @@ var libEntries = [ ["es2021", "lib.es2021.d.ts"], ["es2022", "lib.es2022.d.ts"], ["es2023", "lib.es2023.d.ts"], + ["es2024", "lib.es2024.d.ts"], ["esnext", "lib.esnext.d.ts"], // Host only ["dom", "lib.dom.d.ts"], @@ -45726,6 +46577,7 @@ var libEntries = [ ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], ["es2016.intl", "lib.es2016.intl.d.ts"], + ["es2017.arraybuffer", "lib.es2017.arraybuffer.d.ts"], ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], @@ -45758,12 +46610,18 @@ var libEntries = [ ["es2022.error", "lib.es2022.error.d.ts"], ["es2022.intl", "lib.es2022.intl.d.ts"], ["es2022.object", "lib.es2022.object.d.ts"], - ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"], ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], ["es2023.collection", "lib.es2023.collection.d.ts"], ["es2023.intl", "lib.es2023.intl.d.ts"], + ["es2024.arraybuffer", "lib.es2024.arraybuffer.d.ts"], + ["es2024.collection", "lib.es2024.collection.d.ts"], + ["es2024.object", "lib.es2024.object.d.ts"], + ["es2024.promise", "lib.es2024.promise.d.ts"], + ["es2024.regexp", "lib.es2024.regexp.d.ts"], + ["es2024.sharedmemory", "lib.es2024.sharedmemory.d.ts"], + ["es2024.string", "lib.es2024.string.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], ["esnext.collection", "lib.esnext.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], @@ -45772,13 +46630,18 @@ var libEntries = [ ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], - ["esnext.promise", "lib.esnext.promise.d.ts"], + ["esnext.promise", "lib.es2024.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], ["esnext.decorators", "lib.esnext.decorators.d.ts"], - ["esnext.object", "lib.esnext.object.d.ts"], + ["esnext.object", "lib.es2024.object.d.ts"], ["esnext.array", "lib.esnext.array.d.ts"], - ["esnext.regexp", "lib.esnext.regexp.d.ts"], - ["esnext.string", "lib.esnext.string.d.ts"], + ["esnext.regexp", "lib.es2024.regexp.d.ts"], + ["esnext.string", "lib.es2024.string.d.ts"], + ["esnext.iterator", "lib.esnext.iterator.d.ts"], + ["esnext.promise", "lib.esnext.promise.d.ts"], + ["esnext.float16", "lib.esnext.float16.d.ts"], + ["esnext.error", "lib.esnext.error.d.ts"], + ["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"] ]; @@ -45957,7 +46820,6 @@ var commonOptionsWithBuild = [ name: "generateTrace", type: "string", isFilePath: true, - isCommandLineOnly: true, paramType: Diagnostics.DIRECTORY, category: Diagnostics.Compiler_Diagnostics, description: Diagnostics.Generates_an_event_trace_and_a_list_of_types @@ -45990,7 +46852,6 @@ var commonOptionsWithBuild = [ affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.Emit, - transpileOptionValue: void 0, defaultValueDescription: false, description: Diagnostics.Create_sourcemaps_for_d_ts_files }, @@ -46024,6 +46885,25 @@ var commonOptionsWithBuild = [ description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript, defaultValueDescription: false }, + { + name: "noCheck", + type: "boolean", + showInSimplifiedHelpView: false, + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported, + transpileOptionValue: true, + defaultValueDescription: false + // Not setting affectsSemanticDiagnostics or affectsBuildInfo because we dont want all diagnostics to go away, its handled in builder + }, + { + name: "noEmit", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + description: Diagnostics.Disable_emitting_files_from_a_compilation, + transpileOptionValue: void 0, + defaultValueDescription: false + }, { name: "assumeChangesOnlyAffectDirectDependencies", type: "boolean", @@ -46059,6 +46939,7 @@ var targetOptionDeclaration = { es2021: 8 /* ES2021 */, es2022: 9 /* ES2022 */, es2023: 10 /* ES2023 */, + es2024: 11 /* ES2024 */, esnext: 99 /* ESNext */ })), affectsSourceFile: true, @@ -46087,6 +46968,8 @@ var moduleOptionDeclaration = { es2022: 7 /* ES2022 */, esnext: 99 /* ESNext */, node16: 100 /* Node16 */, + node18: 101 /* Node18 */, + node20: 102 /* Node20 */, nodenext: 199 /* NodeNext */, preserve: 200 /* Preserve */ })), @@ -46137,15 +47020,6 @@ var commandOptionsWithoutBuild = [ paramType: Diagnostics.FILE_OR_DIRECTORY, description: Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json }, - { - name: "build", - type: "boolean", - shortName: "b", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, - defaultValueDescription: false - }, { name: "showConfig", type: "boolean", @@ -46187,7 +47061,7 @@ var commandOptionsWithoutBuild = [ affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, - description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, + description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files, defaultValueDescription: false }, { @@ -46288,34 +47162,12 @@ var commandOptionsWithoutBuild = [ defaultValueDescription: false, description: Diagnostics.Disable_emitting_comments }, - { - name: "noCheck", - type: "boolean", - showInSimplifiedHelpView: false, - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported, - transpileOptionValue: true, - defaultValueDescription: false, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - extraValidation() { - return [Diagnostics.Unknown_compiler_option_0, "noCheck"]; - } - }, - { - name: "noEmit", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_emitting_files_from_a_compilation, - transpileOptionValue: void 0, - defaultValueDescription: false - }, { name: "importHelpers", type: "boolean", affectsEmit: true, affectsBuildInfo: true, + affectsSourceFile: true, category: Diagnostics.Emit, description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file, defaultValueDescription: false @@ -46370,6 +47222,23 @@ var commandOptionsWithoutBuild = [ affectsBuildInfo: true, affectsSemanticDiagnostics: true }, + { + name: "erasableSyntaxOnly", + type: "boolean", + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript, + defaultValueDescription: false, + affectsBuildInfo: true, + affectsSemanticDiagnostics: true + }, + { + name: "libReplacement", + type: "boolean", + affectsProgramStructure: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Enable_lib_replacement, + defaultValueDescription: true + }, // Strict Type Checks { name: "strict", @@ -46434,6 +47303,16 @@ var commandOptionsWithoutBuild = [ description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, defaultValueDescription: Diagnostics.false_unless_strict_is_set }, + { + name: "strictBuiltinIteratorReturn", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, { name: "noImplicitThis", type: "boolean", @@ -46682,6 +47561,15 @@ var commandOptionsWithoutBuild = [ defaultValueDescription: false, transpileOptionValue: void 0 }, + { + name: "rewriteRelativeImportExtensions", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Modules, + description: Diagnostics.Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files, + defaultValueDescription: false + }, { name: "resolvePackageJsonExports", type: "boolean", @@ -46709,6 +47597,15 @@ var commandOptionsWithoutBuild = [ category: Diagnostics.Modules, description: Diagnostics.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports }, + { + name: "noUncheckedSideEffectImports", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Modules, + description: Diagnostics.Check_side_effect_imports, + defaultValueDescription: false + }, // Source Maps { name: "sourceRoot", @@ -46780,6 +47677,7 @@ var commandOptionsWithoutBuild = [ affectsEmit: true, affectsBuildInfo: true, affectsModuleResolution: true, + affectsSourceFile: true, category: Diagnostics.Language_and_Environment, description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, defaultValueDescription: "react" @@ -47132,7 +48030,17 @@ var commandLineOptionOfCustomType = optionDeclarations.filter(isCommandLineOptio function isCommandLineOptionOfCustomType(option) { return !isString(option.type); } +var tscBuildOption = { + name: "build", + type: "boolean", + shortName: "b", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, + defaultValueDescription: false +}; var optionsForBuild = [ + tscBuildOption, { name: "verbose", shortName: "v", @@ -47163,6 +48071,13 @@ var optionsForBuild = [ description: Diagnostics.Delete_the_outputs_of_all_projects, type: "boolean", defaultValueDescription: false + }, + { + name: "stopBuildOnErrors", + category: Diagnostics.Command_line_Options, + description: Diagnostics.Skip_building_downstream_projects_on_error_in_upstream_project, + type: "boolean", + defaultValueDescription: false } ]; var buildOpts = [ @@ -47264,8 +48179,14 @@ function getOptionName(option) { } function createUnknownOptionError(unknownOption, diagnostics, unknownOptionErrorText, node, sourceFile) { var _a; - if ((_a = diagnostics.alternateMode) == null ? void 0 : _a.getOptionsNameMap().optionsNameMap.has(unknownOption.toLowerCase())) { - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.alternateMode.diagnostic, unknownOption); + const otherOption = (_a = diagnostics.alternateMode) == null ? void 0 : _a.getOptionsNameMap().optionsNameMap.get(unknownOption.toLowerCase()); + if (otherOption) { + return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic( + sourceFile, + node, + otherOption !== tscBuildOption ? diagnostics.alternateMode.diagnostic : Diagnostics.Option_build_must_be_the_first_command_line_argument, + unknownOption + ); } const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName); return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); @@ -47400,6 +48321,7 @@ function parseOptionValue(args, i, diagnostics, opt, options, errors) { case "listOrElement": Debug.fail("listOrElement not supported here"); break; + // If not a primitive, the possible types are specified in what is effectively a map of options. default: options[opt.name] = parseCustomTypeOption(opt, args[i], errors); i++; @@ -47453,10 +48375,10 @@ var buildOptionsDidYouMeanDiagnostics = { unknownDidYouMeanDiagnostic: Diagnostics.Unknown_build_option_0_Did_you_mean_1, optionTypeMismatchDiagnostic: Diagnostics.Build_option_0_requires_a_value_of_type_1 }; -function parseBuildCommand(args) { +function parseBuildCommand(commandLine) { const { options, watchOptions, fileNames: projects, errors } = parseCommandLineWorker( buildOptionsDidYouMeanDiagnostics, - args + commandLine ); const buildOptions = options; if (projects.length === 0) { @@ -47650,7 +48572,7 @@ function getTsconfigRootOptionsMap() { function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { var _a; const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 211 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -47702,7 +48624,7 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv var _a; const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 303 /* PropertyAssignment */) { + if (element.kind !== 304 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -47740,6 +48662,7 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv return false; case 106 /* NullKeyword */: return null; + // eslint-disable-line no-restricted-syntax case 11 /* StringLiteral */: if (!isDoubleQuotedString(valueExpression)) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.String_literal_with_double_quotes_expected)); @@ -47747,15 +48670,15 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv return valueExpression.text; case 9 /* NumericLiteral */: return Number(valueExpression.text); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { break; } return -Number(valueExpression.operand.text); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: const objectLiteralExpression = valueExpression; return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return convertArrayLiteralExpressionToJson( valueExpression.elements, option && option.element @@ -47833,7 +48756,7 @@ function convertToTSConfig(configParseResult, configFileName, host) { const providedKeys = new Set(optionMap.keys()); const impliedCompilerOptions = {}; for (const option in computedOptions) { - if (!providedKeys.has(option) && some(computedOptions[option].dependencies, (dep) => providedKeys.has(dep))) { + if (!providedKeys.has(option) && optionDependsOn(option, providedKeys)) { const implied = computedOptions[option].computeValue(configParseResult.options); const defaultValue = computedOptions[option].computeValue({}); if (implied !== defaultValue) { @@ -47844,10 +48767,19 @@ function convertToTSConfig(configParseResult, configFileName, host) { assign(config.compilerOptions, optionMapToObject(serializeCompilerOptions(impliedCompilerOptions, pathOptions))); return config; } +function optionDependsOn(option, dependsOn) { + const seen = /* @__PURE__ */ new Set(); + return optionDependsOnRecursive(option); + function optionDependsOnRecursive(option2) { + var _a; + if (addToSeen(seen, option2)) { + return some((_a = computedOptions[option2]) == null ? void 0 : _a.dependencies, (dep) => dependsOn.has(dep) || optionDependsOnRecursive(dep)); + } + return false; + } +} function optionMapToObject(optionMap) { - return { - ...arrayFrom(optionMap.entries()).reduce((prev, cur) => ({ ...prev, [cur[0]]: cur[1] }), {}) - }; + return Object.fromEntries(optionMap); } function filterSameAsDefaultInclude(specs) { if (!length(specs)) return void 0; @@ -47931,106 +48863,178 @@ function serializeOptionBaseObject(options, { optionsNameMap }, pathOptions) { } return result; } -function getCompilerOptionsDiffValue(options, newLine) { - const compilerOptionsMap = getSerializedCompilerOption(options); - return getOverwrittenDefaultOptions(); - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); +function generateTSConfig(options, newLine) { + const tab = " "; + const result = []; + const allSetOptions = Object.keys(options).filter((k) => k !== "init" && k !== "help" && k !== "watch"); + result.push(`{`); + result.push(`${tab}// ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)}`); + result.push(`${tab}"compilerOptions": {`); + emitHeader(Diagnostics.File_Layout); + emitOption("rootDir", "./src", "optional"); + emitOption("outDir", "./dist", "optional"); + newline(); + emitHeader(Diagnostics.Environment_Settings); + emitHeader(Diagnostics.See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule); + emitOption("module", 199 /* NodeNext */); + emitOption("target", 99 /* ESNext */); + emitOption("types", []); + if (options.lib) { + emitOption("lib", options.lib); + } + emitHeader(Diagnostics.For_nodejs_Colon); + result.push(`${tab}${tab}// "lib": ["esnext"],`); + result.push(`${tab}${tab}// "types": ["node"],`); + emitHeader(Diagnostics.and_npm_install_D_types_Slashnode); + newline(); + emitHeader(Diagnostics.Other_Outputs); + emitOption( + "sourceMap", + /*defaultValue*/ + true + ); + emitOption( + "declaration", + /*defaultValue*/ + true + ); + emitOption( + "declarationMap", + /*defaultValue*/ + true + ); + newline(); + emitHeader(Diagnostics.Stricter_Typechecking_Options); + emitOption( + "noUncheckedIndexedAccess", + /*defaultValue*/ + true + ); + emitOption( + "exactOptionalPropertyTypes", + /*defaultValue*/ + true + ); + newline(); + emitHeader(Diagnostics.Style_Options); + emitOption( + "noImplicitReturns", + /*defaultValue*/ + true, + "optional" + ); + emitOption( + "noImplicitOverride", + /*defaultValue*/ + true, + "optional" + ); + emitOption( + "noUnusedLocals", + /*defaultValue*/ + true, + "optional" + ); + emitOption( + "noUnusedParameters", + /*defaultValue*/ + true, + "optional" + ); + emitOption( + "noFallthroughCasesInSwitch", + /*defaultValue*/ + true, + "optional" + ); + emitOption( + "noPropertyAccessFromIndexSignature", + /*defaultValue*/ + true, + "optional" + ); + newline(); + emitHeader(Diagnostics.Recommended_Options); + emitOption( + "strict", + /*defaultValue*/ + true + ); + emitOption("jsx", 4 /* ReactJSX */); + emitOption( + "verbatimModuleSyntax", + /*defaultValue*/ + true + ); + emitOption( + "isolatedModules", + /*defaultValue*/ + true + ); + emitOption( + "noUncheckedSideEffectImports", + /*defaultValue*/ + true + ); + emitOption("moduleDetection", 3 /* Force */); + emitOption( + "skipLibCheck", + /*defaultValue*/ + true + ); + if (allSetOptions.length > 0) { + newline(); + while (allSetOptions.length > 0) { + emitOption(allSetOptions[0], options[allSetOptions[0]]); + } } - function getOverwrittenDefaultOptions() { - const result = []; - const tab = makePadding(2); - commandOptionsWithoutBuild.forEach((cmd) => { - if (!compilerOptionsMap.has(cmd.name)) { - return; - } - const newValue = compilerOptionsMap.get(cmd.name); - const defaultValue = getDefaultValueForOption(cmd); - if (newValue !== defaultValue) { - result.push(`${tab}${cmd.name}: ${newValue}`); - } else if (hasProperty(defaultInitCompilerOptions, cmd.name)) { - result.push(`${tab}${cmd.name}: ${defaultValue}`); - } - }); - return result.join(newLine) + newLine; - } -} -function getSerializedCompilerOption(options) { - const compilerOptions = extend(options, defaultInitCompilerOptions); - return serializeCompilerOptions(compilerOptions); -} -function generateTSConfig(options, fileNames, newLine) { - const compilerOptionsMap = getSerializedCompilerOption(options); - return writeConfigurations(); - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - function isAllowedOptionForOutput({ category, name, isCommandLineOnly }) { - const categoriesToSkip = [Diagnostics.Command_line_Options, Diagnostics.Editor_Support, Diagnostics.Compiler_Diagnostics, Diagnostics.Backwards_Compatibility, Diagnostics.Watch_and_Build_Modes, Diagnostics.Output_Formatting]; - return !isCommandLineOnly && category !== void 0 && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name)); - } - function writeConfigurations() { - const categorizedOptions = /* @__PURE__ */ new Map(); - categorizedOptions.set(Diagnostics.Projects, []); - categorizedOptions.set(Diagnostics.Language_and_Environment, []); - categorizedOptions.set(Diagnostics.Modules, []); - categorizedOptions.set(Diagnostics.JavaScript_Support, []); - categorizedOptions.set(Diagnostics.Emit, []); - categorizedOptions.set(Diagnostics.Interop_Constraints, []); - categorizedOptions.set(Diagnostics.Type_Checking, []); - categorizedOptions.set(Diagnostics.Completeness, []); - for (const option of optionDeclarations) { - if (isAllowedOptionForOutput(option)) { - let listForCategory = categorizedOptions.get(option.category); - if (!listForCategory) categorizedOptions.set(option.category, listForCategory = []); - listForCategory.push(option); - } - } - let marginLength = 0; - let seenKnownKeys = 0; - const entries = []; - categorizedOptions.forEach((options2, category) => { - if (entries.length !== 0) { - entries.push({ value: "" }); - } - entries.push({ value: `/* ${getLocaleSpecificMessage(category)} */` }); - for (const option of options2) { - let optionName; - if (compilerOptionsMap.has(option.name)) { - optionName = `"${option.name}": ${JSON.stringify(compilerOptionsMap.get(option.name))}${(seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ","}`; - } else { - optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`; - } - entries.push({ - value: optionName, - description: `/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */` - }); - marginLength = Math.max(optionName.length, marginLength); - } - }); - const tab = makePadding(2); - const result = []; - result.push(`{`); - result.push(`${tab}"compilerOptions": {`); - result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`); + function newline() { result.push(""); - for (const entry of entries) { - const { value, description: description3 = "" } = entry; - result.push(value && `${tab}${tab}${value}${description3 && makePadding(marginLength - value.length + 2) + description3}`); + } + function emitHeader(header) { + result.push(`${tab}${tab}// ${getLocaleSpecificMessage(header)}`); + } + function emitOption(setting, defaultValue, commented = "never") { + const existingOptionIndex = allSetOptions.indexOf(setting); + if (existingOptionIndex >= 0) { + allSetOptions.splice(existingOptionIndex, 1); } - if (fileNames.length) { - result.push(`${tab}},`); - result.push(`${tab}"files": [`); - for (let i = 0; i < fileNames.length; i++) { - result.push(`${tab}${tab}${JSON.stringify(fileNames[i])}${i === fileNames.length - 1 ? "" : ","}`); - } - result.push(`${tab}]`); + let comment; + if (commented === "always") { + comment = true; + } else if (commented === "never") { + comment = false; } else { - result.push(`${tab}}`); + comment = !hasProperty(options, setting); + } + const value = options[setting] ?? defaultValue; + if (comment) { + result.push(`${tab}${tab}// "${setting}": ${formatValueOrArray(setting, value)},`); + } else { + result.push(`${tab}${tab}"${setting}": ${formatValueOrArray(setting, value)},`); + } + } + function formatValueOrArray(settingName, value) { + const option = optionDeclarations.filter((c) => c.name === settingName)[0]; + if (!option) Debug.fail(`No option named ${settingName}?`); + const map2 = option.type instanceof Map ? option.type : void 0; + if (isArray(value)) { + const map3 = "element" in option && option.element.type instanceof Map ? option.element.type : void 0; + return `[${value.map((v) => formatSingleValue(v, map3)).join(", ")}]`; + } else { + return formatSingleValue(value, map2); + } + } + function formatSingleValue(value, map2) { + if (map2) { + value = getNameOfCompilerOptionValue(value, map2) ?? Debug.fail(`No matching value of ${value}`); } - result.push(`}`); - return result.join(newLine) + newLine; + return JSON.stringify(value); } + result.push(`${tab}}`); + result.push(`}`); + result.push(``); + return result.join(newLine); } function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { const result = {}; @@ -48221,8 +49225,6 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis validatedFilesSpecBeforeSubstitution, validatedIncludeSpecsBeforeSubstitution, validatedExcludeSpecsBeforeSubstitution, - pathPatterns: void 0, - // Initialized on first use isDefaultIncludeSpec }; } @@ -48361,6 +49363,9 @@ function getErrorForNoInputFiles({ includeSpecs, excludeSpecs }, configFileName) function shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles, resolutionStack) { return fileNames.length === 0 && canJsonReportNoInutFiles && (!resolutionStack || resolutionStack.length === 0); } +function isSolutionConfig(config) { + return !config.fileNames.length && hasProperty(config.raw, "references"); +} function canJsonReportNoInputFiles(raw) { return !hasProperty(raw, "files") && !hasProperty(raw, "references"); } @@ -48402,7 +49407,7 @@ function parseConfig(json, sourceFile, host, basePath, configFileName, resolutio if (ownConfig.raw.compileOnSave === void 0 && result.compileOnSave) ownConfig.raw.compileOnSave = result.compileOnSave; if (sourceFile && result.extendedSourceFiles) sourceFile.extendedSourceFiles = arrayFrom(result.extendedSourceFiles.keys()); ownConfig.options = assign(result.options, ownConfig.options); - ownConfig.watchOptions = ownConfig.watchOptions && result.watchOptions ? assign(result.watchOptions, ownConfig.watchOptions) : ownConfig.watchOptions || result.watchOptions; + ownConfig.watchOptions = ownConfig.watchOptions && result.watchOptions ? assignWatchOptions(result, ownConfig.watchOptions) : ownConfig.watchOptions || result.watchOptions; } return ownConfig; function applyExtendedConfig(result, extendedConfigPath) { @@ -48426,9 +49431,14 @@ function parseConfig(json, sourceFile, host, basePath, configFileName, resolutio result.compileOnSave = extendsRaw.compileOnSave; } assign(result.options, extendedConfig.options); - result.watchOptions = result.watchOptions && extendedConfig.watchOptions ? assign({}, result.watchOptions, extendedConfig.watchOptions) : result.watchOptions || extendedConfig.watchOptions; + result.watchOptions = result.watchOptions && extendedConfig.watchOptions ? assignWatchOptions(result, extendedConfig.watchOptions) : result.watchOptions || extendedConfig.watchOptions; } } + function assignWatchOptions(result, watchOptions) { + if (result.watchOptionsCopied) return assign(result.watchOptions, watchOptions); + result.watchOptionsCopied = true; + return assign({}, result.watchOptions, watchOptions); + } } function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) { if (hasProperty(json, "excludes")) { @@ -48715,7 +49725,7 @@ function convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sour function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) { return filter(map(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v); } -var invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/; +var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/; var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/; function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, extraFileExtensions = emptyArray) { basePath = normalizePath(basePath); @@ -48950,6 +49960,7 @@ function getOptionValueWithEmptyStrings(value, option) { return typeof value === "boolean" ? value : ""; case "listOrElement": if (!isArray(value)) return getOptionValueWithEmptyStrings(value, option.element); + // fall through to list case "list": const elementType = option.element; return isArray(value) ? mapDefined(value, (v) => getOptionValueWithEmptyStrings(v, elementType)) : ""; @@ -48961,27 +49972,6 @@ function getOptionValueWithEmptyStrings(value, option) { }); } } -function getDefaultValueForOption(option) { - switch (option.type) { - case "number": - return 1; - case "boolean": - return true; - case "string": - const defaultValue = option.defaultValueDescription; - return option.isFilePath ? `./${defaultValue && typeof defaultValue === "string" ? defaultValue : ""}` : ""; - case "list": - return []; - case "listOrElement": - return getDefaultValueForOption(option.element); - case "object": - return {}; - default: - const value = firstOrUndefinedIterator(option.type.keys()); - if (value !== void 0) return value; - return Debug.fail("Expected 'option.type' to have entries."); - } -} // src/compiler/moduleNameResolver.ts function trace(host, message, ...args) { @@ -49470,7 +50460,7 @@ function getConditions(options, resolutionMode) { } function resolvePackageNameToPackageJson(packageName, containingDirectory, options, host, cache) { const moduleResolutionState = getTemporaryModuleResolutionState(cache == null ? void 0 : cache.getPackageJsonInfoCache(), host, options); - return forEachAncestorDirectory(containingDirectory, (ancestorDirectory) => { + return forEachAncestorDirectoryStoppingAtGlobalCache(host, containingDirectory, (ancestorDirectory) => { if (getBaseFileName(ancestorDirectory) !== "node_modules") { const nodeModulesFolder = combinePaths(ancestorDirectory, "node_modules"); const candidate = combinePaths(nodeModulesFolder, packageName); @@ -49849,7 +50839,6 @@ function resolveModuleNameFromCache(moduleName, containingFile, cache, mode) { ); } function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { - var _a, _b, _c; const traceEnabled = isTraceEnabled(compilerOptions, host); if (redirectedReference) { compilerOptions = redirectedReference.commandLine.options; @@ -49878,7 +50867,6 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]); } } - (_a = perfLogger) == null ? void 0 : _a.logStartResolveModule(moduleName); switch (moduleResolution) { case 3 /* Node16 */: result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); @@ -49898,8 +50886,6 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca default: return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); } - if (result && result.resolvedModule) (_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`); - (_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null"); if (cache && !cache.isReadonly) { cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); if (!isExternalModuleNameRelative(moduleName)) { @@ -49930,8 +50916,7 @@ function tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, co } } function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state) { - var _a; - const { baseUrl, paths, configFile } = state.compilerOptions; + const { baseUrl, paths } = state.compilerOptions; if (paths && !pathIsRelative(moduleName)) { if (state.traceEnabled) { if (baseUrl) { @@ -49940,7 +50925,7 @@ function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); } const baseDirectory = getPathsBasePath(state.compilerOptions, state.host); - const pathPatterns = (configFile == null ? void 0 : configFile.configFileSpecs) ? (_a = configFile.configFileSpecs).pathPatterns || (_a.pathPatterns = tryParsePatterns(paths)) : void 0; + const pathPatterns = tryParsePatterns(paths); return tryLoadModuleUsingPaths( extensions, moduleName, @@ -50252,25 +51237,28 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) }); } if (!isExternalModuleNameRelative(moduleName)) { - let resolved2; if (features & 2 /* Imports */ && startsWith(moduleName, "#")) { - resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); - } - if (!resolved2 && features & 4 /* SelfName */) { - resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); + const resolved3 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); + if (resolved3) { + return resolved3.value && { value: { resolved: resolved3.value, isExternalLibraryImport: false } }; + } } - if (!resolved2) { - if (moduleName.includes(":")) { - if (traceEnabled) { - trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); - } - return void 0; + if (features & 4 /* SelfName */) { + const resolved3 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); + if (resolved3) { + return resolved3.value && { value: { resolved: resolved3.value, isExternalLibraryImport: false } }; } + } + if (moduleName.includes(":")) { if (traceEnabled) { - trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); + trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); } - resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); + return void 0; + } + if (traceEnabled) { + trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); } + let resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); if (extensions2 & 4 /* Declaration */) { resolved2 ?? (resolved2 = resolveFromTypeRoot(moduleName, state2)); } @@ -50398,10 +51386,11 @@ function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecor } return tryAddingExtensions(extensionless, extensions, extension, onlyRecordFailures, state); } -function loadFileNameFromPackageJsonField(extensions, candidate, onlyRecordFailures, state) { +function loadFileNameFromPackageJsonField(extensions, candidate, packageJsonValue, onlyRecordFailures, state) { if (extensions & 1 /* TypeScript */ && fileExtensionIsOneOf(candidate, supportedTSImplementationExtensions) || extensions & 4 /* Declaration */ && fileExtensionIsOneOf(candidate, supportedDeclarationExtensions)) { const result = tryFile(candidate, onlyRecordFailures, state); - return result !== void 0 ? { path: candidate, ext: tryExtractTSExtension(candidate), resolvedUsingTsExtension: void 0 } : void 0; + const ext = tryExtractTSExtension(candidate); + return result !== void 0 ? { path: candidate, ext, resolvedUsingTsExtension: packageJsonValue ? !endsWith(packageJsonValue, ext) : void 0 } : void 0; } if (state.isConfigLookup && extensions === 8 /* Json */ && fileExtensionIs(candidate, ".json" /* Json */)) { const result = tryFile(candidate, onlyRecordFailures, state); @@ -50471,9 +51460,7 @@ function tryFileLookup(fileName, onlyRecordFailures, state) { } function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) { const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0; - const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent; - const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state); - return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths), state); + return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo), state); } function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) { if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0) { @@ -50491,8 +51478,7 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache /*onlyRecordFailures*/ false, loadPackageJsonMainState, - packageJsonInfo.contents.packageJsonContent, - getVersionPathsOfPackageJsonInfo(packageJsonInfo, loadPackageJsonMainState) + packageJsonInfo ); entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path); if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) { @@ -50563,6 +51549,7 @@ function loadEntrypointsFromExportMap(scope, exports2, state, extensions) { const result = loadFileNameFromPackageJsonField( extensions, finalPath, + target, /*onlyRecordFailures*/ false, state @@ -50606,22 +51593,17 @@ function getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) resolvedPackageDirectory: false }; } -function getPackageScopeForPath(fileName, state) { - const parts = getPathComponents(fileName); - parts.pop(); - while (parts.length > 0) { - const pkg = getPackageJsonInfo( - getPathFromPathComponents(parts), +function getPackageScopeForPath(directory, state) { + return forEachAncestorDirectoryStoppingAtGlobalCache( + state.host, + directory, + (dir) => getPackageJsonInfo( + dir, /*onlyRecordFailures*/ false, state - ); - if (pkg) { - return pkg; - } - parts.pop(); - } - return void 0; + ) + ); } function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) { if (packageJsonInfo.contents.versionPaths === void 0) { @@ -50699,17 +51681,25 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { (_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath); } } -function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) { +function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJson) { + const versionPaths = packageJson && getVersionPathsOfPackageJsonInfo(packageJson, state); let packageFile; - if (jsonContent) { + if (packageJson && arePathsEqual(packageJson == null ? void 0 : packageJson.packageDirectory, candidate, state.host)) { if (state.isConfigLookup) { - packageFile = readPackageJsonTSConfigField(jsonContent, candidate, state); + packageFile = readPackageJsonTSConfigField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state); } else { - packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(jsonContent, candidate, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(jsonContent, candidate, state) || void 0; + packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || void 0; } } const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => { - const fromFile = loadFileNameFromPackageJsonField(extensions2, candidate2, onlyRecordFailures2, state2); + const fromFile = loadFileNameFromPackageJsonField( + extensions2, + candidate2, + /*packageJsonValue*/ + void 0, + onlyRecordFailures2, + state2 + ); if (fromFile) { return noPackageId(fromFile); } @@ -50717,7 +51707,7 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail const features = state2.features; const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField; state2.candidateIsFromPackageJsonField = true; - if ((jsonContent == null ? void 0 : jsonContent.type) !== "module") { + if ((packageJson == null ? void 0 : packageJson.contents.packageJsonContent.type) !== "module") { state2.features &= ~32 /* EsmMode */; } const result = nodeLoadModuleByRelativeName( @@ -50745,17 +51735,8 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, moduleName); } - const result = tryLoadModuleUsingPaths( - extensions, - moduleName, - candidate, - versionPaths.paths, - /*pathPatterns*/ - void 0, - loader, - onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, - state - ); + const pathPatterns = tryParsePatterns(versionPaths.paths); + const result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, pathPatterns, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state); if (result) { return removeIgnoredPackageId(result.value); } @@ -50784,7 +51765,7 @@ function noKeyStartsWithDot(obj) { } function loadModuleFromSelfNameReference(extensions, moduleName, directory, state, cache, redirectedReference) { var _a, _b; - const directoryPath = getNormalizedAbsolutePath(combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); + const directoryPath = getNormalizedAbsolutePath(directory, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); const scope = getPackageScopeForPath(directoryPath, state); if (!scope || !scope.contents.packageJsonContent.exports) { return void 0; @@ -50818,7 +51799,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec mainExport = scope.contents.packageJsonContent.exports["."]; } if (mainExport) { - const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport( + const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport( extensions, state, cache, @@ -50828,7 +51809,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec /*isImports*/ false ); - return loadModuleFromTargetImportOrExport( + return loadModuleFromTargetExportOrImport( mainExport, "", /*pattern*/ @@ -50846,7 +51827,7 @@ function loadModuleFromExports(scope, extensions, subpath, state, cache, redirec void 0 ); } - const result = loadModuleFromImportsOrExports( + const result = loadModuleFromExportsOrImports( extensions, state, cache, @@ -50880,7 +51861,7 @@ function loadModuleFromImports(extensions, moduleName, directory, state, cache, void 0 ); } - const directoryPath = getNormalizedAbsolutePath(combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); + const directoryPath = getNormalizedAbsolutePath(directory, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); const scope = getPackageScopeForPath(directoryPath, state); if (!scope) { if (state.traceEnabled) { @@ -50900,7 +51881,7 @@ function loadModuleFromImports(extensions, moduleName, directory, state, cache, void 0 ); } - const result = loadModuleFromImportsOrExports( + const result = loadModuleFromExportsOrImports( extensions, state, cache, @@ -50927,19 +51908,19 @@ function comparePatternKeys(a, b) { const bPatternIndex = b.indexOf("*"); const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLenA > baseLenB) return -1; - if (baseLenB > baseLenA) return 1; - if (aPatternIndex === -1) return 1; - if (bPatternIndex === -1) return -1; - if (a.length > b.length) return -1; - if (b.length > a.length) return 1; - return 0; + if (baseLenA > baseLenB) return -1 /* LessThan */; + if (baseLenB > baseLenA) return 1 /* GreaterThan */; + if (aPatternIndex === -1) return 1 /* GreaterThan */; + if (bPatternIndex === -1) return -1 /* LessThan */; + if (a.length > b.length) return -1 /* LessThan */; + if (b.length > a.length) return 1 /* GreaterThan */; + return 0 /* EqualTo */; } -function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { - const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); +function loadModuleFromExportsOrImports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { + const loadModuleFromTargetExportOrImport = getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) { const target = lookupTable[moduleName]; - return loadModuleFromTargetImportOrExport( + return loadModuleFromTargetExportOrImport( target, /*subpath*/ "", @@ -50948,13 +51929,13 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe moduleName ); } - const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => hasOneAsterisk(k) || endsWith(k, "/")), comparePatternKeys); + const expandingKeys = toSorted(filter(getOwnKeys(lookupTable), (k) => hasOneAsterisk(k) || endsWith(k, "/")), comparePatternKeys); for (const potentialTarget of expandingKeys) { if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) { const target = lookupTable[potentialTarget]; const starPos = potentialTarget.indexOf("*"); const subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos)); - return loadModuleFromTargetImportOrExport( + return loadModuleFromTargetExportOrImport( target, subpath, /*pattern*/ @@ -50964,7 +51945,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe } else if (endsWith(potentialTarget, "*") && startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) { const target = lookupTable[potentialTarget]; const subpath = moduleName.substring(potentialTarget.length - 1); - return loadModuleFromTargetImportOrExport( + return loadModuleFromTargetExportOrImport( target, subpath, /*pattern*/ @@ -50974,7 +51955,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe } else if (startsWith(moduleName, potentialTarget)) { const target = lookupTable[potentialTarget]; const subpath = moduleName.substring(potentialTarget.length); - return loadModuleFromTargetImportOrExport( + return loadModuleFromTargetExportOrImport( target, subpath, /*pattern*/ @@ -50994,9 +51975,10 @@ function hasOneAsterisk(patternKey) { const firstStar = patternKey.indexOf("*"); return firstStar !== -1 && firstStar === patternKey.lastIndexOf("*"); } -function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) { - return loadModuleFromTargetImportOrExport; - function loadModuleFromTargetImportOrExport(target, subpath, pattern, key) { +function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) { + return loadModuleFromTargetExportOrImport; + function loadModuleFromTargetExportOrImport(target, subpath, pattern, key) { + var _a, _b; if (typeof target === "string") { if (!pattern && subpath.length > 0 && !endsWith(target, "/")) { if (state.traceEnabled) { @@ -51025,6 +52007,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec redirectedReference, state.conditions ); + (_a = state.failedLookupLocations) == null ? void 0 : _a.push(...result.failedLookupLocations ?? emptyArray); + (_b = state.affectingLocations) == null ? void 0 : _b.push(...result.affectingLocations ?? emptyArray); return toSearchResult( result.resolvedModule ? { path: result.resolvedModule.resolvedFileName, @@ -51074,6 +52058,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, finalPath, + target, /*onlyRecordFailures*/ false, state @@ -51085,7 +52070,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) { traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); const subTarget = target[condition]; - const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); + const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key); if (result) { traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition); traceIfEnabled(state, Diagnostics.Exiting_conditional_exports); @@ -51110,7 +52095,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec ); } for (const elem of target) { - const result = loadModuleFromTargetImportOrExport(elem, subpath, pattern, key); + const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key); if (result) { return result; } @@ -51133,20 +52118,20 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec void 0 ); function toAbsolutePath(path) { - var _a, _b; + var _a2, _b2; if (path === void 0) return path; - return getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); + return getNormalizedAbsolutePath(path, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)); } function combineDirectoryPath(root, dir) { return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { - var _a, _b, _c, _d; + var _a2, _b2, _c, _d; if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { - const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); + const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName)); commonSourceDirGuesses.push(commonDir); } else if (state.requestContainingDirectory) { const requestingFile = toAbsolutePath(combinePaths(state.requestContainingDirectory, "index.ts")); @@ -51186,6 +52171,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, possibleInputWithInputExtension, + /*packageJsonValue*/ + void 0, /*onlyRecordFailures*/ false, state @@ -51200,8 +52187,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } return void 0; function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) { - var _a2, _b2; - const currentDir = state.compilerOptions.configFile ? ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "" : commonSourceDirGuess; + var _a3, _b3; + const currentDir = state.compilerOptions.configFile ? ((_b3 = (_a3 = state.host).getCurrentDirectory) == null ? void 0 : _b3.call(_a3)) || "" : commonSourceDirGuess; const candidateDirectories = []; if (state.compilerOptions.declarationDir) { candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir))); @@ -51248,7 +52235,7 @@ function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directo ); } function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) { - const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */; + const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ || state.conditions.includes("import") ? 99 /* ESNext */ : 1 /* CommonJS */; const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); if (priorityExtensions) { @@ -51261,17 +52248,30 @@ function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, return lookup(secondaryExtensions); } function lookup(extensions2) { - return forEachAncestorDirectory(normalizeSlashes(directory), (ancestorDirectory) => { - if (getBaseFileName(ancestorDirectory) !== "node_modules") { - const resolutionFromCache = tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, ancestorDirectory, redirectedReference, state); - if (resolutionFromCache) { - return resolutionFromCache; + return forEachAncestorDirectoryStoppingAtGlobalCache( + state.host, + normalizeSlashes(directory), + (ancestorDirectory) => { + if (getBaseFileName(ancestorDirectory) !== "node_modules") { + const resolutionFromCache = tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, ancestorDirectory, redirectedReference, state); + if (resolutionFromCache) { + return resolutionFromCache; + } + return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions2, moduleName, ancestorDirectory, state, typesScopeOnly, cache, redirectedReference)); } - return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions2, moduleName, ancestorDirectory, state, typesScopeOnly, cache, redirectedReference)); } - }); + ); } } +function forEachAncestorDirectoryStoppingAtGlobalCache(host, directory, callback) { + var _a; + const globalCache = (_a = host == null ? void 0 : host.getGlobalTypingsCacheLocation) == null ? void 0 : _a.call(host); + return forEachAncestorDirectory(directory, (ancestorDirectory) => { + const result = callback(ancestorDirectory); + if (result !== void 0) return result; + if (ancestorDirectory === globalCache) return false; + }) || void 0; +} function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) { const nodeModulesFolder = combinePaths(directory, "node_modules"); const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); @@ -51313,8 +52313,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node candidate, !nodeModulesDirectoryExists, state, - packageInfo.contents.packageJsonContent, - getVersionPathsOfPackageJsonInfo(packageInfo, state) + packageInfo ); return withPackageId(packageInfo, fromDirectory, state); } @@ -51324,10 +52323,9 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node candidate2, onlyRecordFailures, state2, - packageInfo && packageInfo.contents.packageJsonContent, - packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2) + packageInfo ); - if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) { + if (!pathAndExtension && !rest && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) { pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2); } return withPackageId(packageInfo, pathAndExtension, state2); @@ -51347,17 +52345,8 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, rest); } const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host); - const fromPaths = tryLoadModuleUsingPaths( - extensions, - rest, - packageDirectory, - versionPaths.paths, - /*pathPatterns*/ - void 0, - loader, - !packageDirectoryExists, - state - ); + const pathPatterns = tryParsePatterns(versionPaths.paths); + const fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, versionPaths.paths, pathPatterns, loader, !packageDirectoryExists, state); if (fromPaths) { return fromPaths.value; } @@ -51365,7 +52354,6 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node return loader(extensions, candidate, !nodeModulesDirectoryExists, state); } function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, onlyRecordFailures, state) { - pathPatterns || (pathPatterns = tryParsePatterns(paths)); const matchedPattern = matchPatternOrExact(pathPatterns, moduleName); if (matchedPattern) { const matchedStar = isString(matchedPattern) ? void 0 : matchedText(matchedPattern, moduleName); @@ -51477,28 +52465,32 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host, return { value: resolvedUsingSettings }; } if (!isExternalModuleNameRelative(moduleName)) { - const resolved2 = forEachAncestorDirectory(containingDirectory, (directory) => { - const resolutionFromCache = tryFindNonRelativeModuleNameInCache( - cache, - moduleName, - /*mode*/ - void 0, - directory, - redirectedReference, - state - ); - if (resolutionFromCache) { - return resolutionFromCache; + const resolved2 = forEachAncestorDirectoryStoppingAtGlobalCache( + state.host, + containingDirectory, + (directory) => { + const resolutionFromCache = tryFindNonRelativeModuleNameInCache( + cache, + moduleName, + /*mode*/ + void 0, + directory, + redirectedReference, + state + ); + if (resolutionFromCache) { + return resolutionFromCache; + } + const searchName = normalizePath(combinePaths(directory, moduleName)); + return toSearchResult(loadModuleFromFileNoPackageId( + extensions, + searchName, + /*onlyRecordFailures*/ + false, + state + )); } - const searchName = normalizePath(combinePaths(directory, moduleName)); - return toSearchResult(loadModuleFromFileNoPackageId( - extensions, - searchName, - /*onlyRecordFailures*/ - false, - state - )); - }); + ); if (resolved2) return resolved2; if (extensions & (1 /* TypeScript */ | 4 /* Declaration */)) { let resolved3 = loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, containingDirectory, state); @@ -51541,7 +52533,7 @@ function resolveFromTypeRoot(moduleName, state) { } } function shouldAllowImportingTsExtension(compilerOptions, fromFileName) { - return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName); + return getAllowImportingTsExtensions(compilerOptions) || !!fromFileName && isDeclarationFileName(fromFileName); } function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) { const traceEnabled = isTraceEnabled(compilerOptions, host); @@ -51632,23 +52624,27 @@ function getModuleInstanceStateCached(node, visited = /* @__PURE__ */ new Map()) } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: + // 1. interface declarations, type alias declarations + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 266 /* EnumDeclaration */: + // 2. const enum declarations + case 267 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: + // 3. non-exported import declarations + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 32 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 278 /* ExportDeclaration */: + // 4. Export alias declarations pointing at only uninstantiated modules or things uninstantiated modules contain + case 279 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 280 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -51662,7 +52658,8 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 268 /* ModuleBlock */: { + // 5. other uninstantiated module declarations. + case 269 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -51681,7 +52678,7 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 80 /* Identifier */: if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { @@ -51692,6 +52689,9 @@ function getModuleInstanceStateWorker(node, visited) { } function getModuleInstanceStateForAliasTarget(specifier, visited) { const name = specifier.propertyName || specifier.name; + if (name.kind !== 80 /* Identifier */) { + return 1 /* Instantiated */; + } let p = specifier.parent; while (p) { if (isBlock(p) || isModuleBlock(p) || isSourceFile(p)) { @@ -51714,7 +52714,7 @@ function getModuleInstanceStateForAliasTarget(specifier, visited) { if (found === 1 /* Instantiated */) { return found; } - if (statement.kind === 271 /* ImportEqualsDeclaration */) { + if (statement.kind === 272 /* ImportEqualsDeclaration */) { found = 1 /* Instantiated */; } } @@ -51744,11 +52744,8 @@ function createFlowNode(flags, node, antecedent) { } var binder = /* @__PURE__ */ createBinder(); function bindSourceFile(file, options) { - var _a, _b; mark("beforeBind"); - (_a = perfLogger) == null ? void 0 : _a.logStartBindFile("" + file.fileName); binder(file, options); - (_b = perfLogger) == null ? void 0 : _b.logStopBindFile(); mark("afterBind"); measure("Bind", "beforeBind", "afterBind"); } @@ -51774,12 +52771,13 @@ function createBinder() { var preSwitchCaseFlow; var activeLabelList; var hasExplicitReturn; + var inReturnPosition; var hasFlowEffects; var emitFlags; var inStrictMode; var inAssignmentPattern = false; var symbolCount = 0; - var Symbol47; + var Symbol48; var classifiableNames; var unreachableFlow = createFlowNode( 1 /* Unreachable */, @@ -51808,7 +52806,7 @@ function createBinder() { inStrictMode = bindInStrictMode(file, opts); classifiableNames = /* @__PURE__ */ new Set(); symbolCount = 0; - Symbol47 = objectAllocator.getSymbolConstructor(); + Symbol48 = objectAllocator.getSymbolConstructor(); Debug.attachFlowNodeDebugInfo(unreachableFlow); Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); if (!file.locals) { @@ -51846,6 +52844,7 @@ function createBinder() { currentExceptionTarget = void 0; activeLabelList = void 0; hasExplicitReturn = false; + inReturnPosition = false; hasFlowEffects = false; inAssignmentPattern = false; emitFlags = 0 /* None */; @@ -51859,7 +52858,7 @@ function createBinder() { } function createSymbol(flags, name) { symbolCount++; - return new Symbol47(flags, name); + return new Symbol48(flags, name); } function addDeclarationToSymbol(symbol, node, symbolFlags) { symbol.flags |= symbolFlags; @@ -51879,7 +52878,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 277 /* ExportAssignment */) { + if (node.kind === 278 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -51888,7 +52887,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 167 /* ComputedPropertyName */) { + if (name.kind === 168 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -51913,31 +52912,31 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 323 /* JSDocSignature */: + case 185 /* FunctionType */: + case 180 /* CallSignature */: + case 324 /* JSDocSignature */: return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 186 /* ConstructorType */: + case 181 /* ConstructSignature */: return "__new" /* New */; - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: return "__index" /* Index */; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 307 /* SourceFile */: + case 308 /* SourceFile */: return "export=" /* ExportEquals */; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 317 /* JSDocFunctionType */: + case 318 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 169 /* Parameter */: - Debug.assert(node.parent.kind === 317 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 170 /* Parameter */: + Debug.assert(node.parent.kind === 318 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -51948,7 +52947,7 @@ function createBinder() { } function declareSymbol(symbolTable, parent3, node, includes, excludes, isReplaceableByMethod, isComputedName) { Debug.assert(isComputedName || !hasDynamicName(node)); - const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; + const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && moduleExportNameIsDefault(node.name); const name = isComputedName ? "__computed" /* Computed */ : isDefaultExport && parent3 ? "default" /* Default */ : getDeclarationName(node); let symbol; if (name === void 0) { @@ -51983,7 +52982,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 278 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -52022,7 +53021,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 32 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 282 /* ExportSpecifier */ || node.kind === 272 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -52082,8 +53081,10 @@ function createBinder() { const saveContainer = container; const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; + const savedInReturnPosition = inReturnPosition; + if (node.kind === 220 /* ArrowFunction */ && node.body.kind !== 242 /* Block */) inReturnPosition = true; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { + if (node.kind !== 220 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -52105,7 +53106,7 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 176 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = createFlowNode( 2 /* Start */, @@ -52118,7 +53119,7 @@ function createBinder() { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 177 /* Constructor */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 219 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; @@ -52131,14 +53132,14 @@ function createBinder() { if (hasExplicitReturn) node.flags |= 1024 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 307 /* SourceFile */) { + if (node.kind === 308 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (node.kind === 177 /* Constructor */ || node.kind === 176 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 219 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -52159,13 +53160,14 @@ function createBinder() { } else { bindChildren(node); } + inReturnPosition = savedInReturnPosition; container = saveContainer; thisParentContainer = saveThisParentContainer; blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 263 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 263 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -52180,64 +53182,67 @@ function createBinder() { const saveInAssignmentPattern = inAssignmentPattern; inAssignmentPattern = false; if (checkUnreachable(node)) { + if (canHaveFlowNode(node) && node.flowNode) { + node.flowNode = void 0; + } bindEachChild(node); bindJSDoc(node); inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && (!options.allowUnreachableCode || node.kind === 253 /* ReturnStatement */)) { + if (node.kind >= 244 /* FirstStatement */ && node.kind <= 260 /* LastStatement */ && (!options.allowUnreachableCode || node.kind === 254 /* ReturnStatement */)) { node.flowNode = currentFlow; } switch (node.kind) { - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: bindWhileStatement(node); break; - case 246 /* DoStatement */: + case 247 /* DoStatement */: bindDoStatement(node); break; - case 248 /* ForStatement */: + case 249 /* ForStatement */: bindForStatement(node); break; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 245 /* IfStatement */: + case 246 /* IfStatement */: bindIfStatement(node); break; - case 253 /* ReturnStatement */: - case 257 /* ThrowStatement */: + case 254 /* ReturnStatement */: + case 258 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: + case 253 /* BreakStatement */: + case 252 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 258 /* TryStatement */: + case 259 /* TryStatement */: bindTryStatement(node); break; - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: bindSwitchStatement(node); break; - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: bindCaseBlock(node); break; - case 296 /* CaseClause */: + case 297 /* CaseClause */: bindCaseClause(node); break; - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: bindLabeledStatement(node); break; - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -52245,53 +53250,55 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 220 /* DeleteExpression */: + case 221 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 213 /* CallExpression */: + case 214 /* CallExpression */: bindCallExpressionFlow(node); break; - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 351 /* JSDocImportTag */: + case 352 /* JSDocImportTag */: bindJSDocImportTag(node); break; - case 307 /* SourceFile */: { + // In source files and blocks, bind functions first to match hoisting that occurs at runtime + case 308 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 241 /* Block */: - case 268 /* ModuleBlock */: + case 242 /* Block */: + case 269 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 208 /* BindingElement */: + case 209 /* BindingElement */: bindBindingElementFlow(node); break; - case 169 /* Parameter */: + case 170 /* Parameter */: bindParameterFlow(node); break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 303 /* PropertyAssignment */: - case 230 /* SpreadElement */: + case 211 /* ObjectLiteralExpression */: + case 210 /* ArrayLiteralExpression */: + case 304 /* PropertyAssignment */: + case 231 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; + // falls through default: bindEachChild(node); break; @@ -52304,22 +53311,23 @@ function createBinder() { case 80 /* Identifier */: case 110 /* ThisKeyword */: return true; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: if (isJSDocTypeAssertion(expr)) { return false; } - case 235 /* NonNullExpression */: + // fallthrough + case 236 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 221 /* TypeOfExpression */: + case 222 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -52329,15 +53337,15 @@ function createBinder() { case 80 /* Identifier */: case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: - case 235 /* NonNullExpression */: + case 212 /* PropertyAccessExpression */: + case 218 /* ParenthesizedExpression */: + case 236 /* NonNullExpression */: return isNarrowableReference(expr.expression); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return (isStringOrNumericLiteralLike(expr.argumentExpression) || isEntityNameExpression(expr.argumentExpression)) && isNarrowableReference(expr.expression); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return expr.operatorToken.kind === 28 /* CommaToken */ && isNarrowableReference(expr.right) || isAssignmentOperator(expr.operatorToken.kind) && isLeftHandSideExpression(expr.left); } return false; @@ -52353,7 +53361,7 @@ function createBinder() { } } } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 212 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -52372,7 +53380,9 @@ function createBinder() { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right)); + const left = skipParentheses(expr.left); + const right = skipParentheses(expr.right); + return isNarrowableOperand(left) || isNarrowableOperand(right) || isNarrowingTypeofOperands(right, left) || isNarrowingTypeofOperands(left, right) || (isBooleanLiteral(right) && isNarrowingExpression(left) || isBooleanLiteral(left) && isNarrowingExpression(right)); case 104 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); case 103 /* InKeyword */: @@ -52384,9 +53394,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -52473,21 +53483,21 @@ function createBinder() { function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 245 /* IfStatement */: - case 247 /* WhileStatement */: - case 246 /* DoStatement */: + case 246 /* IfStatement */: + case 248 /* WhileStatement */: + case 247 /* DoStatement */: return parent3.expression === node; - case 248 /* ForStatement */: - case 227 /* ConditionalExpression */: + case 249 /* ForStatement */: + case 228 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { + if (node.kind === 218 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { + } else if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -52530,7 +53540,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 256 /* LabeledStatement */) { + while (label && node.parent.kind === 257 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -52564,13 +53574,16 @@ function createBinder() { function bindForStatement(node) { const preLoopLabel = setContinueTarget(node, createLoopLabel()); const preBodyLabel = createBranchLabel(); + const preIncrementorLabel = createBranchLabel(); const postLoopLabel = createBranchLabel(); bind(node.initializer); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; bindCondition(node.condition, preBodyLabel, postLoopLabel); currentFlow = finishFlowLabel(preBodyLabel); - bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); + bindIterativeStatement(node.statement, postLoopLabel, preIncrementorLabel); + addAntecedent(preIncrementorLabel, currentFlow); + currentFlow = finishFlowLabel(preIncrementorLabel); bind(node.incrementor); addAntecedent(preLoopLabel, currentFlow); currentFlow = finishFlowLabel(postLoopLabel); @@ -52581,12 +53594,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 250 /* ForOfStatement */) { + if (node.kind === 251 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 261 /* VariableDeclarationList */) { + if (node.initializer.kind !== 262 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -52607,8 +53620,11 @@ function createBinder() { currentFlow = finishFlowLabel(postIfLabel); } function bindReturnOrThrow(node) { + const savedInReturnPosition = inReturnPosition; + inReturnPosition = true; bind(node.expression); - if (node.kind === 253 /* ReturnStatement */) { + inReturnPosition = savedInReturnPosition; + if (node.kind === 254 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -52626,7 +53642,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 253 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -52697,7 +53713,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 298 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedent; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -52743,7 +53759,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 214 /* CallExpression */) { const call = node; if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -52769,7 +53785,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -52778,21 +53794,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { + } else if (node.kind === 210 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 230 /* SpreadElement */) { + if (e.kind === 231 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 211 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 303 /* PropertyAssignment */) { + if (p.kind === 304 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 304 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 305 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 305 /* SpreadAssignment */) { + } else if (p.kind === 306 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -52927,7 +53943,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { + if (operator === 64 /* EqualsToken */ && node.left.kind === 213 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -52955,7 +53971,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 212 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -52968,10 +53984,16 @@ function createBinder() { hasFlowEffects = false; bindCondition(node.condition, trueLabel, falseLabel); currentFlow = finishFlowLabel(trueLabel); + if (inReturnPosition) { + node.flowNodeWhenTrue = currentFlow; + } bind(node.questionToken); bind(node.whenTrue); addAntecedent(postExpressionLabel, currentFlow); currentFlow = finishFlowLabel(falseLabel); + if (inReturnPosition) { + node.flowNodeWhenFalse = currentFlow; + } bind(node.colonToken); bind(node.whenFalse); addAntecedent(postExpressionLabel, currentFlow); @@ -53024,7 +54046,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 340 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 341 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -53039,12 +54061,14 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { + if (host && host.kind !== 175 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } function bindJSDocImportTag(node) { bind(node.tagName); + bind(node.moduleSpecifier); + bind(node.attributes); if (typeof node.comment !== "string") { bindEach(node.comment); } @@ -53058,15 +54082,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 213 /* CallExpression */: + case 214 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -53116,7 +54140,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { + if (expr.kind === 219 /* FunctionExpression */ || expr.kind === 220 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -53127,7 +54151,7 @@ function createBinder() { } } } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { + if (node.expression.kind === 212 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -53142,39 +54166,43 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 267 /* ModuleDeclaration */: + // Modules, source files, and classes need specialized handling for how their + // members are declared (for example, a member of a class will go into a specific + // symbol table depending on if it is static or not). We defer to specialized + // handlers to take care of declaring these child members. + case 268 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 307 /* SourceFile */: + case 308 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 264 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 322 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 264 /* InterfaceDeclaration */: - case 292 /* JsxAttributes */: + case 188 /* TypeLiteral */: + case 323 /* JSDocTypeLiteral */: + case 211 /* ObjectLiteralExpression */: + case 265 /* InterfaceDeclaration */: + case 293 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 323 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 317 /* JSDocFunctionType */: - case 175 /* ClassStaticBlockDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 200 /* MappedType */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 324 /* JSDocSignature */: + case 182 /* IndexSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 318 /* JSDocFunctionType */: + case 176 /* ClassStaticBlockDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 201 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( container.locals, @@ -53275,14 +54303,15 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 307 /* SourceFile */: + case 308 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; } + // falls through default: Debug.assertNode(blockScopeContainer, canHaveLocals); if (!blockScopeContainer.locals) { @@ -53492,7 +54521,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 307 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 308 /* SourceFile */ && blockScopeContainer.kind !== 268 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); } @@ -53548,7 +54577,7 @@ function createBinder() { if (tracing) node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 165 /* LastToken */) { + if (node.kind > 166 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -53603,6 +54632,7 @@ function createBinder() { } function bindWorker(node) { switch (node.kind) { + /* Strict mode checks */ case 80 /* Identifier */: if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { let parentNode = node.parent; @@ -53612,24 +54642,25 @@ function createBinder() { bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); break; } + // falls through case 110 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 304 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 305 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: case 108 /* SuperKeyword */: node.flowNode = currentFlow; break; case 81 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -53648,7 +54679,7 @@ function createBinder() { ); } break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -53683,77 +54714,78 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return checkStrictModeCatchClause(node); - case 220 /* DeleteExpression */: + case 221 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return checkStrictModeWithStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: + case 198 /* ThisType */: seenThisKeyword = true; return; - case 182 /* TypePredicate */: + case 183 /* TypePredicate */: break; - case 168 /* TypeParameter */: + // Binding the children will handle everything + case 169 /* TypeParameter */: return bindTypeParameter(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return bindParameter(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: return bindPropertyWorker(node); - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 306 /* EnumMember */: + case 307 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 317 /* JSDocFunctionType */: - case 323 /* JSDocSignature */: - case 185 /* ConstructorType */: + case 185 /* FunctionType */: + case 318 /* JSDocFunctionType */: + case 324 /* JSDocSignature */: + case 186 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 322 /* JSDocTypeLiteral */: - case 200 /* MappedType */: + case 188 /* TypeLiteral */: + case 323 /* JSDocTypeLiteral */: + case 201 /* MappedType */: return bindAnonymousTypeWorker(node); - case 332 /* JSDocClassTag */: + case 333 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return bindFunctionExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -53764,6 +54796,7 @@ function createBinder() { return bindObjectDefinePrototypeProperty(node); case 0 /* None */: break; + // Nothing to do default: return Debug.fail("Unknown call expression assignment declaration kind"); } @@ -53771,62 +54804,67 @@ function createBinder() { bindCallExpression(node); } break; - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: + // Members of classes, interfaces, and modules + case 232 /* ClassExpression */: + case 264 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 292 /* JsxAttributes */: + // Jsx-attributes + case 293 /* JsxAttributes */: return bindJsxAttributes(node); - case 291 /* JsxAttribute */: + case 292 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 271 /* ImportEqualsDeclaration */: - case 274 /* NamespaceImport */: - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: + // Imports and exports + case 272 /* ImportEqualsDeclaration */: + case 275 /* NamespaceImport */: + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 270 /* NamespaceExportDeclaration */: + case 271 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 273 /* ImportClause */: + case 274 /* ImportClause */: return bindImportClause(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return bindExportDeclaration(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return bindExportAssignment(node); - case 307 /* SourceFile */: + case 308 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 241 /* Block */: + case 242 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 268 /* ModuleBlock */: + // falls through + case 269 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 341 /* JSDocParameterTag */: - if (node.parent.kind === 323 /* JSDocSignature */) { + case 342 /* JSDocParameterTag */: + if (node.parent.kind === 324 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 322 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 323 /* JSDocTypeLiteral */) { break; } - case 348 /* JSDocPropertyTag */: + // falls through + case 349 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 316 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 317 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 339 /* JSDocOverloadTag */: + case 340 /* JSDocOverloadTag */: return bind(node.typeExpression); - case 351 /* JSDocImportTag */: + case 352 /* JSDocImportTag */: return (jsDocImports || (jsDocImports = [])).push(node); } } @@ -53978,8 +55016,8 @@ function createBinder() { false ); switch (thisContainer.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -53997,12 +55035,12 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 176 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -54019,7 +55057,7 @@ function createBinder() { ); } break; - case 307 /* SourceFile */: + case 308 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -54028,7 +55066,8 @@ function createBinder() { declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } break; - case 267 /* ModuleDeclaration */: + // Namespaces are not allowed in javascript files, so do nothing here + case 268 /* ModuleDeclaration */: break; default: Debug.failBadSyntaxKind(thisContainer); @@ -54056,7 +55095,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 110 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 307 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 308 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -54105,7 +55144,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 307 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 308 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -54219,7 +55258,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 307 /* SourceFile */ : propertyAccess.parent.parent.kind === 307 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 /* SourceFile */ : propertyAccess.parent.parent.kind === 308 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, blockScopeContainer) || lookupSymbolForPropertyAccess(name, container); @@ -54281,7 +55320,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 263 /* ClassDeclaration */) { + if (node.kind === 264 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -54310,7 +55349,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 261 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 32 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -54323,7 +55362,7 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 341 /* JSDocParameterTag */ && container.kind !== 323 /* JSDocSignature */) { + if (node.kind === 342 /* JSDocParameterTag */ && container.kind !== 324 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) { @@ -54396,7 +55435,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 195 /* InferType */) { + } else if (node.parent.kind === 196 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -54427,22 +55466,26 @@ function createBinder() { if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations - node.kind === 263 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 243 /* EmptyStatement */ || // report error on class declarations + node.kind === 264 /* ClassDeclaration */ || // report errors on enums with preserved emit + isEnumDeclarationWithPreservedEmit(node, options) || // report error on instantiated modules + node.kind === 268 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); - eachUnreachableRange(node, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); + eachUnreachableRange(node, options, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); } } } return true; } } -function eachUnreachableRange(node, cb) { +function isEnumDeclarationWithPreservedEmit(node, options) { + return node.kind === 267 /* EnumDeclaration */ && (!isEnumConst(node) || shouldPreserveConstEnums(options)); +} +function eachUnreachableRange(node, options, cb) { if (isStatement(node) && isExecutableStatement(node) && isBlock(node.parent)) { const { statements } = node.parent; const slice = sliceAfter(statements, node); @@ -54450,22 +55493,22 @@ function eachUnreachableRange(node, cb) { } else { cb(node, node); } -} -function isExecutableStatement(s) { - return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); -} -function isPurelyTypeDeclaration(s) { - switch (s.kind) { - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return true; - case 267 /* ModuleDeclaration */: - return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 266 /* EnumDeclaration */: - return hasSyntacticModifier(s, 4096 /* Const */); - default: - return false; + function isExecutableStatement(s) { + return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && // `var x;` may declare a variable used above + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); + } + function isPurelyTypeDeclaration(s) { + switch (s.kind) { + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + return true; + case 268 /* ModuleDeclaration */: + return getModuleInstanceState(s) !== 1 /* Instantiated */; + case 267 /* EnumDeclaration */: + return !isEnumDeclarationWithPreservedEmit(s, options); + default: + return false; + } } } function isExportsOrModuleExportsOrAlias(sourceFile, node) { @@ -54497,54 +55540,57 @@ function isExportsOrModuleExportsOrAlias(sourceFile, node) { } function getContainerFlags(node) { switch (node.kind) { - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 322 /* JSDocTypeLiteral */: - case 292 /* JsxAttributes */: + case 232 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 267 /* EnumDeclaration */: + case 211 /* ObjectLiteralExpression */: + case 188 /* TypeLiteral */: + case 323 /* JSDocTypeLiteral */: + case 293 /* JsxAttributes */: return 1 /* IsContainer */; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: + case 268 /* ModuleDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 201 /* MappedType */: + case 182 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 307 /* SourceFile */: + case 308 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 176 /* Constructor */: - case 262 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 323 /* JSDocSignature */: - case 317 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: + // falls through + case 177 /* Constructor */: + case 263 /* FunctionDeclaration */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 324 /* JSDocSignature */: + case 318 /* JSDocFunctionType */: + case 185 /* FunctionType */: + case 181 /* ConstructSignature */: + case 186 /* ConstructorType */: + case 176 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 352 /* JSDocImportTag */: + return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 268 /* ModuleBlock */: + case 269 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 299 /* CatchClause */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 269 /* CaseBlock */: + case 300 /* CatchClause */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 270 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 241 /* Block */: + case 242 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -54704,7 +55750,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 186 /* TypeQuery */) { + if (d.type && d.type.kind === 187 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -54734,6 +55780,28 @@ __export(ts_moduleSpecifiers_exports, { }); // src/compiler/moduleSpecifiers.ts +var stringToRegex = memoizeOne((pattern) => { + try { + let slash = pattern.indexOf("/"); + if (slash !== 0) { + return new RegExp(pattern); + } + const lastSlash = pattern.lastIndexOf("/"); + if (slash === lastSlash) { + return new RegExp(pattern); + } + while ((slash = pattern.indexOf("/", slash + 1)) !== lastSlash) { + if (pattern[slash - 1] !== "\\") { + return new RegExp(pattern); + } + } + const flags = pattern.substring(lastSlash + 1).replace(/[^iu]/g, ""); + pattern = pattern.substring(1, lastSlash); + return new RegExp(pattern, flags); + } catch { + return void 0; + } +}); var RelativePreference = /* @__PURE__ */ ((RelativePreference2) => { RelativePreference2[RelativePreference2["Relative"] = 0] = "Relative"; RelativePreference2[RelativePreference2["NonRelative"] = 1] = "NonRelative"; @@ -54741,13 +55809,16 @@ var RelativePreference = /* @__PURE__ */ ((RelativePreference2) => { RelativePreference2[RelativePreference2["ExternalNonRelative"] = 3] = "ExternalNonRelative"; return RelativePreference2; })(RelativePreference || {}); -function getModuleSpecifierPreferences({ importModuleSpecifierPreference, importModuleSpecifierEnding }, compilerOptions, importingSourceFile, oldImportSpecifier) { +function getModuleSpecifierPreferences({ importModuleSpecifierPreference, importModuleSpecifierEnding, autoImportSpecifierExcludeRegexes }, host, compilerOptions, importingSourceFile, oldImportSpecifier) { const filePreferredEnding = getPreferredEnding(); return { + excludeRegexes: autoImportSpecifierExcludeRegexes, relativePreference: oldImportSpecifier !== void 0 ? isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */ : importModuleSpecifierPreference === "relative" ? 0 /* Relative */ : importModuleSpecifierPreference === "non-relative" ? 1 /* NonRelative */ : importModuleSpecifierPreference === "project-relative" ? 3 /* ExternalNonRelative */ : 2 /* Shortest */, getAllowedEndingsInPreferredOrder: (syntaxImpliedNodeFormat) => { - const preferredEnding = syntaxImpliedNodeFormat !== importingSourceFile.impliedNodeFormat ? getPreferredEnding(syntaxImpliedNodeFormat) : filePreferredEnding; - if ((syntaxImpliedNodeFormat ?? importingSourceFile.impliedNodeFormat) === 99 /* ESNext */) { + const impliedNodeFormat = getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions); + const preferredEnding = syntaxImpliedNodeFormat !== impliedNodeFormat ? getPreferredEnding(syntaxImpliedNodeFormat) : filePreferredEnding; + const moduleResolution = getEmitModuleResolutionKind(compilerOptions); + if ((syntaxImpliedNodeFormat ?? impliedNodeFormat) === 99 /* ESNext */ && 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) { if (shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName)) { return [3 /* TsExtension */, 2 /* JsExtension */]; } @@ -54778,19 +55849,19 @@ function getModuleSpecifierPreferences({ importModuleSpecifierPreference, import } return getModuleSpecifierEndingPreference( importModuleSpecifierEnding, - resolutionMode ?? importingSourceFile.impliedNodeFormat, + resolutionMode ?? getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions), compilerOptions, isFullSourceFile(importingSourceFile) ? importingSourceFile : void 0 ); } } function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, oldImportSpecifier, options = {}) { - const res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, compilerOptions, importingSourceFile, oldImportSpecifier), {}, options); + const res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, host, compilerOptions, importingSourceFile, oldImportSpecifier), {}, options); if (res === oldImportSpecifier) return void 0; return res; } function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, options = {}) { - return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, compilerOptions, importingSourceFile), {}, options); + return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, host, compilerOptions, importingSourceFile), {}, options); } function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options = {}) { const info = getInfo(importingSourceFile.fileName, host); @@ -54820,7 +55891,7 @@ function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importin /*packageNameOnly*/ void 0, options.overrideImportMode - )) || getLocalModuleSpecifier(toFileName2, info, compilerOptions, host, options.overrideImportMode || importingSourceFile.impliedNodeFormat, preferences); + )) || getLocalModuleSpecifier(toFileName2, info, compilerOptions, host, options.overrideImportMode || getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions), preferences); } function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options = {}) { const result = tryGetModuleSpecifiersFromCacheWorker( @@ -54858,7 +55929,13 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { let computedWithoutCache = false; const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker); - if (ambient) return { kind: "ambient", moduleSpecifiers: [ambient], computedWithoutCache }; + if (ambient) { + return { + kind: "ambient", + moduleSpecifiers: !(forAutoImport && isExcludedByRegex(ambient, userPreferences.autoImportSpecifierExcludeRegexes)) ? [ambient] : emptyArray, + computedWithoutCache + }; + } let [kind, specifiers, moduleSourceFile, modulePaths, cache] = tryGetModuleSpecifiersFromCacheWorker( moduleSymbol, importingSourceFile, @@ -54882,7 +55959,7 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, result.kind, modulePaths, result.moduleSpecifiers); return result; } -function getLocalModuleSpecifierBetweenFileNames(importingFile, targetFileName, compilerOptions, host, options = {}) { +function getLocalModuleSpecifierBetweenFileNames(importingFile, targetFileName, compilerOptions, host, preferences, options = {}) { const info = getInfo(importingFile.fileName, host); const importMode = options.overrideImportMode ?? importingFile.impliedNodeFormat; return getLocalModuleSpecifier( @@ -54891,17 +55968,21 @@ function getLocalModuleSpecifierBetweenFileNames(importingFile, targetFileName, compilerOptions, host, importMode, - getModuleSpecifierPreferences({}, compilerOptions, importingFile) + getModuleSpecifierPreferences(preferences, host, compilerOptions, importingFile) ); } function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { const info = getInfo(importingSourceFile.fileName, host); - const preferences = getModuleSpecifierPreferences(userPreferences, compilerOptions, importingSourceFile); + const preferences = getModuleSpecifierPreferences(userPreferences, host, compilerOptions, importingSourceFile); const existingSpecifier = isFullSourceFile(importingSourceFile) && forEach(modulePaths, (modulePath) => forEach( host.getFileIncludeReasons().get(toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), (reason) => { if (reason.kind !== 3 /* Import */ || reason.file !== importingSourceFile.path) return void 0; - if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== getModeForResolutionAtIndex(importingSourceFile, reason.index, compilerOptions)) return void 0; + const existingMode = host.getModeForResolutionAtIndex(importingSourceFile, reason.index); + const targetMode = options.overrideImportMode ?? host.getDefaultResolutionModeForFile(importingSourceFile); + if (existingMode !== targetMode && existingMode !== void 0 && targetMode !== void 0) { + return void 0; + } const specifier = getModuleNameStringLiteralAt(importingSourceFile, reason.index).text; return preferences.relativePreference !== 1 /* NonRelative */ || !pathIsRelative(specifier) ? specifier : void 0; } @@ -54926,38 +56007,44 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi void 0, options.overrideImportMode ) : void 0; - nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier); - if (specifier && modulePath.isRedirect) { - return { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true }; - } - if (!specifier) { - const local = getLocalModuleSpecifier( - modulePath.path, - info, - compilerOptions, - host, - options.overrideImportMode || importingSourceFile.impliedNodeFormat, - preferences, - /*pathsOnly*/ - modulePath.isRedirect - ); - if (!local) { - continue; - } + if (specifier && !(forAutoImport && isExcludedByRegex(specifier, preferences.excludeRegexes))) { + nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier); if (modulePath.isRedirect) { - redirectPathsSpecifiers = append(redirectPathsSpecifiers, local); - } else if (pathIsBareSpecifier(local)) { - if (pathContainsNodeModules(local)) { - relativeSpecifiers = append(relativeSpecifiers, local); - } else { - pathsSpecifiers = append(pathsSpecifiers, local); - } - } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) { + return { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true }; + } + } + const local = getLocalModuleSpecifier( + modulePath.path, + info, + compilerOptions, + host, + options.overrideImportMode || importingSourceFile.impliedNodeFormat, + preferences, + /*pathsOnly*/ + modulePath.isRedirect || !!specifier + ); + if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) { + continue; + } + if (modulePath.isRedirect) { + redirectPathsSpecifiers = append(redirectPathsSpecifiers, local); + } else if (pathIsBareSpecifier(local)) { + if (pathContainsNodeModules(local)) { relativeSpecifiers = append(relativeSpecifiers, local); + } else { + pathsSpecifiers = append(pathsSpecifiers, local); } + } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) { + relativeSpecifiers = append(relativeSpecifiers, local); } } - return (pathsSpecifiers == null ? void 0 : pathsSpecifiers.length) ? { kind: "paths", moduleSpecifiers: pathsSpecifiers, computedWithoutCache: true } : (redirectPathsSpecifiers == null ? void 0 : redirectPathsSpecifiers.length) ? { kind: "redirect", moduleSpecifiers: redirectPathsSpecifiers, computedWithoutCache: true } : (nodeModulesSpecifiers == null ? void 0 : nodeModulesSpecifiers.length) ? { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true } : { kind: "relative", moduleSpecifiers: Debug.checkDefined(relativeSpecifiers), computedWithoutCache: true }; + return (pathsSpecifiers == null ? void 0 : pathsSpecifiers.length) ? { kind: "paths", moduleSpecifiers: pathsSpecifiers, computedWithoutCache: true } : (redirectPathsSpecifiers == null ? void 0 : redirectPathsSpecifiers.length) ? { kind: "redirect", moduleSpecifiers: redirectPathsSpecifiers, computedWithoutCache: true } : (nodeModulesSpecifiers == null ? void 0 : nodeModulesSpecifiers.length) ? { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true } : { kind: "relative", moduleSpecifiers: relativeSpecifiers ?? emptyArray, computedWithoutCache: true }; +} +function isExcludedByRegex(moduleSpecifier, excludeRegexes) { + return some(excludeRegexes, (pattern) => { + var _a; + return !!((_a = stringToRegex(pattern)) == null ? void 0 : _a.test(moduleSpecifier)); + }); } function getInfo(importingSourceFileName, host) { importingSourceFileName = getNormalizedAbsolutePath(importingSourceFileName, host.getCurrentDirectory()); @@ -54970,7 +56057,7 @@ function getInfo(importingSourceFileName, host) { canonicalSourceDirectory: getCanonicalFileName(sourceDirectory) }; } -function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, importMode, { getAllowedEndingsInPreferredOrder: getAllowedEndingsInPrefererredOrder, relativePreference }, pathsOnly) { +function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, importMode, { getAllowedEndingsInPreferredOrder: getAllowedEndingsInPrefererredOrder, relativePreference, excludeRegexes }, pathsOnly) { const { baseUrl, paths, rootDirs } = compilerOptions; if (pathsOnly && !paths) { return void 0; @@ -54986,8 +56073,15 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im if (!relativeToBaseUrl) { return pathsOnly ? void 0 : relativePath; } - const fromPackageJsonImports = pathsOnly ? void 0 : tryGetModuleNameFromPackageJsonImports(moduleFileName, sourceDirectory, compilerOptions, host, importMode); - const fromPaths = pathsOnly || fromPackageJsonImports === void 0 ? paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) : void 0; + const fromPackageJsonImports = pathsOnly ? void 0 : tryGetModuleNameFromPackageJsonImports( + moduleFileName, + sourceDirectory, + compilerOptions, + host, + importMode, + prefersTsExtension(allowedEndings) + ); + const fromPaths = pathsOnly || fromPackageJsonImports === void 0 ? paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) : void 0; if (pathsOnly) { return fromPaths; } @@ -54995,6 +56089,14 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im if (!maybeNonRelative) { return relativePath; } + const relativeIsExcluded = isExcludedByRegex(relativePath, excludeRegexes); + const nonRelativeIsExcluded = isExcludedByRegex(maybeNonRelative, excludeRegexes); + if (!relativeIsExcluded && nonRelativeIsExcluded) { + return relativePath; + } + if (relativeIsExcluded && !nonRelativeIsExcluded) { + return maybeNonRelative; + } if (relativePreference === 1 /* NonRelative */ && !pathIsRelative(maybeNonRelative)) { return maybeNonRelative; } @@ -55035,15 +56137,17 @@ function getNearestAncestorDirectoryWithPackageJson(host, fileName) { if (host.getNearestAncestorDirectoryWithPackageJson) { return host.getNearestAncestorDirectoryWithPackageJson(fileName); } - return forEachAncestorDirectory(fileName, (directory) => { - return host.fileExists(combinePaths(directory, "package.json")) ? directory : void 0; - }); + return forEachAncestorDirectoryStoppingAtGlobalCache( + host, + fileName, + (directory) => host.fileExists(combinePaths(directory, "package.json")) ? directory : void 0 + ); } function forEachFileNameOfModule(importingFileName, importedFileName, host, preferSymlinks, cb) { - var _a; + var _a, _b; const getCanonicalFileName = hostGetCanonicalFileName(host); const cwd = host.getCurrentDirectory(); - const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : void 0; + const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? (_a = host.getRedirectFromSourceFile(importedFileName)) == null ? void 0 : _a.outputDts : void 0; const importedPath = toPath(importedFileName, cwd, getCanonicalFileName); const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray; const importedFileNames = [...referenceRedirect ? [referenceRedirect] : emptyArray, importedFileName, ...redirects]; @@ -55053,27 +56157,31 @@ function forEachFileNameOfModule(importingFileName, importedFileName, host, pref const result2 = forEach(targets, (p) => !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) && cb(p, referenceRedirect === p)); if (result2) return result2; } - const symlinkedDirectories = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath(); + const symlinkedDirectories = (_b = host.getSymlinkCache) == null ? void 0 : _b.call(host).getSymlinkedDirectoriesByRealpath(); const fullImportedFileName = getNormalizedAbsolutePath(importedFileName, cwd); - const result = symlinkedDirectories && forEachAncestorDirectory(getDirectoryPath(fullImportedFileName), (realPathDirectory) => { - const symlinkDirectories = symlinkedDirectories.get(ensureTrailingDirectorySeparator(toPath(realPathDirectory, cwd, getCanonicalFileName))); - if (!symlinkDirectories) return void 0; - if (startsWithDirectory(importingFileName, realPathDirectory, getCanonicalFileName)) { - return false; - } - return forEach(targets, (target) => { - if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) { - return; - } - const relative = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName); - for (const symlinkDirectory of symlinkDirectories) { - const option = resolvePath(symlinkDirectory, relative); - const result2 = cb(option, target === referenceRedirect); - shouldFilterIgnoredPaths = true; - if (result2) return result2; + const result = symlinkedDirectories && forEachAncestorDirectoryStoppingAtGlobalCache( + host, + getDirectoryPath(fullImportedFileName), + (realPathDirectory) => { + const symlinkDirectories = symlinkedDirectories.get(ensureTrailingDirectorySeparator(toPath(realPathDirectory, cwd, getCanonicalFileName))); + if (!symlinkDirectories) return void 0; + if (startsWithDirectory(importingFileName, realPathDirectory, getCanonicalFileName)) { + return false; } - }); - }); + return forEach(targets, (target) => { + if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) { + return; + } + const relative = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName); + for (const symlinkDirectory of symlinkDirectories) { + const option = resolvePath(symlinkDirectory, relative); + const result2 = cb(option, target === referenceRedirect); + shouldFilterIgnoredPaths = true; + if (result2) return result2; + } + }); + } + ); return result || (preferSymlinks ? forEach(targets, (p) => shouldFilterIgnoredPaths && containsIgnoredPath(p) ? void 0 : cb(p, p === referenceRedirect)) : void 0); } function getAllModulePaths(info, importedFileName, host, preferences, compilerOptions, options = {}) { @@ -55109,7 +56217,7 @@ function getAllModulePathsWorker(info, importedFileName, host, compilerOptions, if (cache && links && host.readFile && !pathContainsNodeModules(info.importingSourceFileName)) { Debug.type(host); const state = getTemporaryModuleResolutionState(cache.getPackageJsonInfoCache(), host, {}); - const packageJson = getPackageScopeForPath(info.importingSourceFileName, state); + const packageJson = getPackageScopeForPath(getDirectoryPath(info.importingSourceFileName), state); if (packageJson) { const toResolve = getAllRuntimeDependencies(packageJson.contents.packageJsonContent); for (const depName of toResolve || emptyArray) { @@ -55202,10 +56310,11 @@ function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) { return ambientModuleDeclare.name.text; } } -function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) { +function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) { for (const key in paths) { for (const patternText2 of paths[key]) { - const pattern = normalizePath(patternText2); + const normalized = normalizePath(patternText2); + const pattern = getRelativePathIfInSameVolume(normalized, baseDirectory, getCanonicalFileName) ?? normalized; const indexOfStar = pattern.indexOf("*"); const candidates = allowedEndings.map((ending) => ({ ending, @@ -55234,7 +56343,7 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos return ending !== 0 /* Minimal */ || value === processEnding(relativeToBaseUrl, [ending], compilerOptions, host); } } -function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, exports2, conditions, mode, isImports) { +function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, exports2, conditions, mode, isImports, preferTsExtension) { if (typeof exports2 === "string") { const ignoreCase = !hostUsesCaseSensitiveFileNames(host); const getCommonSourceDirectory2 = () => host.getCommonSourceDirectory(); @@ -55246,6 +56355,7 @@ function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, pac void 0 ); const extensionSwappedTarget = hasTSFileExtension(targetFilePath) ? removeFileExtension(targetFilePath) + tryGetJSExtensionForFile(targetFilePath, options) : void 0; + const canTryTsExtension = preferTsExtension && hasImplementationTSFileExtension(targetFilePath); switch (mode) { case 0 /* Exact */: if (extensionSwappedTarget && comparePaths(extensionSwappedTarget, pathOrPattern, ignoreCase) === 0 /* EqualTo */ || comparePaths(targetFilePath, pathOrPattern, ignoreCase) === 0 /* EqualTo */ || outputFile && comparePaths(outputFile, pathOrPattern, ignoreCase) === 0 /* EqualTo */ || declarationFile && comparePaths(declarationFile, pathOrPattern, ignoreCase) === 0 /* EqualTo */) { @@ -55253,6 +56363,19 @@ function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, pac } break; case 1 /* Directory */: + if (canTryTsExtension && containsPath(targetFilePath, pathOrPattern, ignoreCase)) { + const fragment = getRelativePathFromDirectory( + pathOrPattern, + targetFilePath, + /*ignoreCase*/ + false + ); + return { moduleFileToTry: getNormalizedAbsolutePath( + combinePaths(combinePaths(packageName, exports2), fragment), + /*currentDirectory*/ + void 0 + ) }; + } if (extensionSwappedTarget && containsPath(pathOrPattern, extensionSwappedTarget, ignoreCase)) { const fragment = getRelativePathFromDirectory( pathOrPattern, @@ -55266,7 +56389,7 @@ function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, pac void 0 ) }; } - if (containsPath(pathOrPattern, targetFilePath, ignoreCase)) { + if (!canTryTsExtension && containsPath(pathOrPattern, targetFilePath, ignoreCase)) { const fragment = getRelativePathFromDirectory( pathOrPattern, targetFilePath, @@ -55289,12 +56412,12 @@ function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, pac return { moduleFileToTry: combinePaths(packageName, fragment) }; } if (declarationFile && containsPath(pathOrPattern, declarationFile, ignoreCase)) { - const fragment = getRelativePathFromDirectory( + const fragment = changeFullExtension(getRelativePathFromDirectory( pathOrPattern, declarationFile, /*ignoreCase*/ false - ); + ), getJSExtensionForFile(declarationFile, options)); return { moduleFileToTry: combinePaths(packageName, fragment) }; } break; @@ -55302,11 +56425,15 @@ function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, pac const starPos = pathOrPattern.indexOf("*"); const leadingSlice = pathOrPattern.slice(0, starPos); const trailingSlice = pathOrPattern.slice(starPos + 1); + if (canTryTsExtension && startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) { + const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length); + return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; + } if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice, ignoreCase) && endsWith(extensionSwappedTarget, trailingSlice, ignoreCase)) { const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length); return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; } - if (startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) { + if (!canTryTsExtension && startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) { const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length); return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; } @@ -55316,17 +56443,19 @@ function tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, pac } if (declarationFile && startsWith(declarationFile, leadingSlice, ignoreCase) && endsWith(declarationFile, trailingSlice, ignoreCase)) { const starReplacement = declarationFile.slice(leadingSlice.length, declarationFile.length - trailingSlice.length); - return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; + const substituted = replaceFirstStar(packageName, starReplacement); + const jsExtension = tryGetJSExtensionForFile(declarationFile, options); + return jsExtension ? { moduleFileToTry: changeFullExtension(substituted, jsExtension) } : void 0; } break; } } else if (Array.isArray(exports2)) { - return forEach(exports2, (e) => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports)); + return forEach(exports2, (e) => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports, preferTsExtension)); } else if (typeof exports2 === "object" && exports2 !== null) { for (const key of getOwnKeys(exports2)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports2[key]; - const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports); + const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports, preferTsExtension); if (result) { return result; } @@ -55354,6 +56483,8 @@ function tryGetModuleNameFromExports(options, host, targetFilePath, packageDirec conditions, mode, /*isImports*/ + false, + /*preferTsExtension*/ false ); }); @@ -55368,10 +56499,12 @@ function tryGetModuleNameFromExports(options, host, targetFilePath, packageDirec conditions, 0 /* Exact */, /*isImports*/ + false, + /*preferTsExtension*/ false ); } -function tryGetModuleNameFromPackageJsonImports(moduleFileName, sourceDirectory, options, host, importMode) { +function tryGetModuleNameFromPackageJsonImports(moduleFileName, sourceDirectory, options, host, importMode, preferTsExtension) { var _a, _b, _c; if (!host.readFile || !getResolvePackageJsonImports(options)) { return void 0; @@ -55404,7 +56537,8 @@ function tryGetModuleNameFromPackageJsonImports(moduleFileName, sourceDirectory, conditions, mode, /*isImports*/ - true + true, + preferTsExtension ); })) == null ? void 0 : _c.moduleFileToTry; } @@ -55431,7 +56565,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa if (!parts) { return void 0; } - const preferences = getModuleSpecifierPreferences(userPreferences, options, importingSourceFile); + const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile); const allowedEndings = preferences.getAllowedEndingsInPreferredOrder(); let moduleSpecifier = path; let isPackageRootPath = false; @@ -55481,12 +56615,20 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath); if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) { const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || tryParseJson(host.readFile(packageJsonPath)); - const importMode = overrideMode || importingSourceFile.impliedNodeFormat; + const importMode = overrideMode || getDefaultResolutionModeForFile(importingSourceFile, host, options); if (getResolvePackageJsonExports(options)) { const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1); const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2); const conditions = getConditions(options, importMode); - const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports(options, host, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0; + const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports( + options, + host, + path, + packageRootPath, + packageName2, + packageJsonContent.exports, + conditions + ) : void 0; if (fromExports) { return { ...fromExports, verbatimFromExports: true }; } @@ -55501,6 +56643,8 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa subModuleName, versionPaths.paths, allowedEndings, + packageRootPath, + getCanonicalFileName, host, options ); @@ -55631,6 +56775,13 @@ function getRelativePathIfInSameVolume(path, directoryPath, getCanonicalFileName function isPathRelativeToParent(path) { return startsWith(path, ".."); } +function getDefaultResolutionModeForFile(file, host, compilerOptions) { + return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions); +} +function prefersTsExtension(allowedEndings) { + const tsPriority = allowedEndings.indexOf(3 /* TsExtension */); + return tsPriority > -1 && tsPriority < allowedEndings.indexOf(2 /* JsExtension */); +} // src/compiler/checker.ts var ambientModuleSymbolRegex = /^".+"$/; @@ -55787,9 +56938,9 @@ function createTypeChecker(host) { }; var cancellationToken; var scanner2; - var Symbol47 = objectAllocator.getSymbolConstructor(); + var Symbol48 = objectAllocator.getSymbolConstructor(); var Type29 = objectAllocator.getTypeConstructor(); - var Signature14 = objectAllocator.getSignatureConstructor(); + var Signature13 = objectAllocator.getSignatureConstructor(); var typeCount = 0; var symbolCount = 0; var totalInstantiationCount = 0; @@ -55812,23 +56963,16 @@ function createTypeChecker(host) { var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); var strictBindCallApply = getStrictOptionValue(compilerOptions, "strictBindCallApply"); var strictPropertyInitialization = getStrictOptionValue(compilerOptions, "strictPropertyInitialization"); + var strictBuiltinIteratorReturn = getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn"); var noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny"); var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis"); var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables"); var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes; + var noUncheckedSideEffectImports = !!compilerOptions.noUncheckedSideEffectImports; var checkBinaryExpression = createCheckBinaryExpression(); var emitResolver = createResolver(); var nodeBuilder = createNodeBuilder(); - var syntacticNodeBuilder = createSyntacticTypeNodeBuilder(compilerOptions, { - isEntityNameVisible, - isExpandoFunctionDeclaration, - getAllAccessorDeclarations: getAllAccessorDeclarationsForDeclaration, - requiresAddingImplicitUndefined, - isUndefinedIdentifierExpression(node) { - Debug.assert(isExpressionNode(node)); - return getSymbolAtLocation(node) === undefinedSymbol; - } - }); + var syntacticNodeBuilder = createSyntacticTypeNodeBuilder(compilerOptions, nodeBuilder.syntacticBuilderResolver); var evaluate = createEvaluator({ evaluateElementAccessExpression, evaluateEntityNameExpression @@ -55929,6 +57073,7 @@ function createTypeChecker(host) { getBaseTypeOfLiteralType, getWidenedType, getWidenedLiteralType, + fillMissingTypeArguments, getTypeFromTypeNode: (nodeIn) => { const node = getParseTreeNode(nodeIn, isTypeNode); return node ? getTypeFromTypeNode(node) : errorType; @@ -55944,6 +57089,7 @@ function createTypeChecker(host) { getNonOptionalType: removeOptionalTypeMarker, getTypeArguments, typeToTypeNode: nodeBuilder.typeToTypeNode, + typePredicateToTypePredicateNode: nodeBuilder.typePredicateToTypePredicateNode, indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration, signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration, symbolToEntityName: nodeBuilder.symbolToEntityName, @@ -56003,11 +57149,11 @@ function createTypeChecker(host) { typePredicateToString: (predicate, enclosingDeclaration, flags) => { return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags); }, - writeSignature: (signature, enclosingDeclaration, flags, kind, writer) => { - return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer); + writeSignature: (signature, enclosingDeclaration, flags, kind, writer, maximumLength, verbosityLevel, out) => { + return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer, maximumLength, verbosityLevel, out); }, - writeType: (type, enclosingDeclaration, flags, writer) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer); + writeType: (type, enclosingDeclaration, flags, writer, maximumLength, verbosityLevel, out) => { + return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer, maximumLength, verbosityLevel, out); }, writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => { return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); @@ -56109,13 +57255,6 @@ function createTypeChecker(host) { /*withAugmentations*/ true ), - tryFindAmbientModuleWithoutAugmentations: (moduleName) => { - return tryFindAmbientModule( - moduleName, - /*withAugmentations*/ - false - ); - }, getApparentType, getUnionType, isTypeAssignableTo, @@ -56129,6 +57268,8 @@ function createTypeChecker(host) { getNumberType: () => numberType, getNumberLiteralType, getBigIntType: () => bigintType, + getBigIntLiteralType, + getUnknownType: () => unknownType, createPromiseType, createArrayType, getElementTypeOfArrayType, @@ -56140,6 +57281,7 @@ function createTypeChecker(host) { getNullType: () => nullType, getESSymbolType: () => esSymbolType, getNeverType: () => neverType, + getNonPrimitiveType: () => nonPrimitiveType, getOptionalType: () => optionalType, getPromiseType: () => getGlobalPromiseType( /*reportErrors*/ @@ -56149,13 +57291,13 @@ function createTypeChecker(host) { /*reportErrors*/ false ), - getAsyncIterableType: () => { + getAnyAsyncIterableType: () => { const type = getGlobalAsyncIterableType( /*reportErrors*/ false ); if (type === emptyGenericType) return void 0; - return type; + return createTypeReference(type, [anyType, anyType, anyType]); }, isSymbolAccessible, isArrayType, @@ -56245,8 +57387,14 @@ function createTypeChecker(host) { getMemberOverrideModifierStatus, isTypeParameterPossiblyReferenced, typeHasCallOrConstructSignatures, - getSymbolFlags + getSymbolFlags, + getTypeArgumentsForResolvedSignature, + isLibType }; + function getTypeArgumentsForResolvedSignature(signature) { + if (signature.mapper === void 0) return void 0; + return instantiateTypes((signature.target || signature).typeParameters, signature.mapper); + } function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) { const candidatesSet = /* @__PURE__ */ new Set(); const candidates = []; @@ -56490,6 +57638,15 @@ function createTypeChecker(host) { emptyArray ); emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */; + var emptyFreshJsxObjectType = createAnonymousType( + /*symbol*/ + void 0, + emptySymbols, + emptyArray, + emptyArray, + emptyArray + ); + emptyFreshJsxObjectType.objectFlags |= 2048 /* JsxAttributes */ | 8192 /* FreshLiteral */ | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */); emptyTypeLiteralSymbol.members = createSymbolTable(); var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray); @@ -56614,6 +57771,12 @@ function createTypeChecker(host) { /*isReadonly*/ true ); + var anyBaseTypeIndexInfo = createIndexInfo( + stringType, + anyType, + /*isReadonly*/ + false + ); var iterationTypesCache = /* @__PURE__ */ new Map(); var noIterationTypes = { get yieldType() { @@ -56627,8 +57790,7 @@ function createTypeChecker(host) { } }; var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); - var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); - var defaultIterationTypes = createIterationTypes(neverType, anyType, undefinedType); + var silentNeverIterationTypes = createIterationTypes(silentNeverType, silentNeverType, silentNeverType); var asyncIterationTypesResolver = { iterableCacheKey: "iterationTypesOfAsyncIterable", iteratorCacheKey: "iterationTypesOfAsyncIterator", @@ -56636,7 +57798,9 @@ function createTypeChecker(host) { getGlobalIteratorType: getGlobalAsyncIteratorType, getGlobalIterableType: getGlobalAsyncIterableType, getGlobalIterableIteratorType: getGlobalAsyncIterableIteratorType, + getGlobalIteratorObjectType: getGlobalAsyncIteratorObjectType, getGlobalGeneratorType: getGlobalAsyncGeneratorType, + getGlobalBuiltinIteratorTypes: getGlobalBuiltinAsyncIteratorTypes, resolveIterationType: (type, errorNode) => getAwaitedType(type, errorNode, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member), mustHaveANextMethodDiagnostic: Diagnostics.An_async_iterator_must_have_a_next_method, mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method, @@ -56649,7 +57813,9 @@ function createTypeChecker(host) { getGlobalIteratorType, getGlobalIterableType, getGlobalIterableIteratorType, + getGlobalIteratorObjectType, getGlobalGeneratorType, + getGlobalBuiltinIteratorTypes, resolveIterationType: (type, _errorNode) => type, mustHaveANextMethodDiagnostic: Diagnostics.An_iterator_must_have_a_next_method, mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_iterator_must_be_a_method, @@ -56657,6 +57823,7 @@ function createTypeChecker(host) { }; var amalgamatedDuplicates; var reverseMappedCache = /* @__PURE__ */ new Map(); + var reverseHomomorphicMappedCache = /* @__PURE__ */ new Map(); var ambientModulesCache; var patternAmbientModules; var patternAmbientModuleAugmentations; @@ -56686,12 +57853,16 @@ function createTypeChecker(host) { var deferredGlobalIterableType; var deferredGlobalIteratorType; var deferredGlobalIterableIteratorType; + var deferredGlobalIteratorObjectType; var deferredGlobalGeneratorType; var deferredGlobalIteratorYieldResultType; var deferredGlobalIteratorReturnResultType; var deferredGlobalAsyncIterableType; var deferredGlobalAsyncIteratorType; var deferredGlobalAsyncIterableIteratorType; + var deferredGlobalBuiltinIteratorTypes; + var deferredGlobalBuiltinAsyncIteratorTypes; + var deferredGlobalAsyncIteratorObjectType; var deferredGlobalAsyncGeneratorType; var deferredGlobalTemplateStringsArrayType; var deferredGlobalImportMetaType; @@ -56727,9 +57898,13 @@ function createTypeChecker(host) { var contextualTypes = []; var contextualIsCache = []; var contextualTypeCount = 0; + var contextualBindingPatterns = []; var inferenceContextNodes = []; var inferenceContexts = []; var inferenceContextCount = 0; + var activeTypeMappers = []; + var activeTypeMappersCaches = []; + var activeTypeMappersCount = 0; var emptyStringType = getStringLiteralType(""); var zeroType = getNumberLiteralType(0); var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" }); @@ -56784,6 +57959,21 @@ function createTypeChecker(host) { ]; initializeTypeChecker(); return checker; + function isDefinitelyReferenceToGlobalSymbolObject(node) { + if (!isPropertyAccessExpression(node)) return false; + if (!isIdentifier(node.name)) return false; + if (!isPropertyAccessExpression(node.expression) && !isIdentifier(node.expression)) return false; + if (isIdentifier(node.expression)) { + return idText(node.expression) === "Symbol" && getResolvedSymbol(node.expression) === (getGlobalSymbol( + "Symbol", + 111551 /* Value */ | 1048576 /* ExportValue */, + /*diagnostic*/ + void 0 + ) || unknownSymbol); + } + if (!isIdentifier(node.expression.expression)) return false; + return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol; + } function getCachedType(key) { return key ? cachedTypes.get(key) : void 0; } @@ -56888,6 +58078,15 @@ function createTypeChecker(host) { diagnostics.add(diagnostic); return diagnostic; } + function getVerbatimModuleSyntaxErrorMessage(node) { + const sourceFile = getSourceFileOfNode(node); + const fileName = sourceFile.fileName; + if (fileExtensionIsOneOf(fileName, [".cts" /* Cts */, ".cjs" /* Cjs */])) { + return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax; + } else { + return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript; + } + } function addErrorOrSuggestion(isError, diagnostic) { if (isError) { diagnostics.add(diagnostic); @@ -56945,7 +58144,7 @@ function createTypeChecker(host) { } function createSymbol(flags, name, checkFlags) { symbolCount++; - const symbol = new Symbol47(flags | 33554432 /* Transient */, name); + const symbol = new Symbol48(flags | 33554432 /* Transient */, name); symbol.links = new SymbolLinks(); symbol.links.checkFlags = checkFlags || 0 /* None */; return symbol; @@ -57029,7 +58228,7 @@ function createTypeChecker(host) { } if (source.exports) { if (!target.exports) target.exports = createSymbolTable(); - mergeSymbolTable(target.exports, source.exports, unidirectional); + mergeSymbolTable(target.exports, source.exports, unidirectional, target); } if (!unidirectional) { recordMergedSymbol(target, source); @@ -57109,10 +58308,14 @@ function createTypeChecker(host) { mergeSymbolTable(combined, second); return combined; } - function mergeSymbolTable(target, source, unidirectional = false) { + function mergeSymbolTable(target, source, unidirectional = false, mergedParent) { source.forEach((sourceSymbol, id) => { const targetSymbol = target.get(id); - target.set(id, targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol)); + const merged = targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol); + if (mergedParent && targetSymbol) { + merged.parent = mergedParent; + } + target.set(id, merged); }); } function mergeModuleAugmentation(moduleName) { @@ -57130,6 +58333,8 @@ function createTypeChecker(host) { moduleName, moduleName, moduleNotFoundError, + /*ignoreErrors*/ + false, /*isForAugmentation*/ true ); @@ -57231,13 +58436,13 @@ function createTypeChecker(host) { return true; } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 208 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); + if (declaration.kind === 209 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 209 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage); - } else if (declaration.kind === 260 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 261 /* VariableDeclaration */), usage); + } else if (declaration.kind === 261 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassLike(declaration)) { const container = findAncestor(usage, (n) => n === declaration ? "quit" : isComputedPropertyName(n) ? n.parent.parent === declaration : !legacyDecorators && isDecorator(n) && (n.parent === declaration || isMethodDeclaration(n.parent) && n.parent.parent === declaration || isGetOrSetAccessorDeclaration(n.parent) && n.parent.parent === declaration || isPropertyDeclaration(n.parent) && n.parent.parent === declaration || isParameter(n.parent) && n.parent.parent.parent === declaration)); @@ -57260,10 +58465,10 @@ function createTypeChecker(host) { } return true; } - if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 282 /* ExportSpecifier */ || usage.parent.kind === 278 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 278 /* ExportAssignment */ && usage.isExportEquals) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { @@ -57281,9 +58486,9 @@ function createTypeChecker(host) { return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 243 /* VariableStatement */: - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: + case 244 /* VariableStatement */: + case 249 /* ForStatement */: + case 251 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -57293,12 +58498,15 @@ function createTypeChecker(host) { return isForInOrOfStatement(grandparent) && isSameScopeDescendentOf(usage2, grandparent.expression, declContainer); } function isUsedInFunctionOrInstanceProperty(usage2, declaration2) { + return isUsedInFunctionOrInstancePropertyWorker(usage2, declaration2); + } + function isUsedInFunctionOrInstancePropertyWorker(usage2, declaration2) { return !!findAncestor(usage2, (current) => { if (current === declContainer) { return "quit"; } if (isFunctionLike(current)) { - return true; + return !getImmediatelyInvokedFunctionExpression(current); } if (isClassStaticBlockDeclaration(current)) { return declaration2.pos < usage2.pos; @@ -57308,7 +58516,7 @@ function createTypeChecker(host) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 174 /* MethodDeclaration */) { + if (declaration2.kind === 175 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -57322,13 +58530,22 @@ function createTypeChecker(host) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 173 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } } } } + const decorator = tryCast(current.parent, isDecorator); + if (decorator && decorator.expression === current) { + if (isParameter(decorator.parent)) { + return isUsedInFunctionOrInstancePropertyWorker(decorator.parent.parent.parent, declaration2) ? true : "quit"; + } + if (isMethodDeclaration(decorator.parent)) { + return isUsedInFunctionOrInstancePropertyWorker(decorator.parent.parent, declaration2) ? true : "quit"; + } + } return false; }); } @@ -57341,15 +58558,15 @@ function createTypeChecker(host) { return "quit"; } switch (node.kind) { - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return true; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 241 /* Block */: + case 242 /* Block */: switch (node.parent.kind) { - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 175 /* MethodDeclaration */: + case 179 /* SetAccessor */: return true; default: return false; @@ -57385,7 +58602,7 @@ function createTypeChecker(host) { function onFailedToResolveSymbol(errorLocation, nameArg, meaning, nameNotFoundMessage) { const name = isString(nameArg) ? nameArg : nameArg.escapedText; addLazyDiagnostic(() => { - if (!errorLocation || errorLocation.parent.kind !== 324 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { + if (!errorLocation || errorLocation.parent.kind !== 325 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { let suggestion; let suggestedLib; if (nameArg) { @@ -57456,7 +58673,7 @@ function createTypeChecker(host) { if (errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; + const message = typeOnlyDeclaration.kind === 282 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 279 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 281 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; const unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( error2(errorLocation, message, unescapedName), @@ -57469,7 +58686,7 @@ function createTypeChecker(host) { const isGlobal = getSymbol2(globals, name, meaning) === result; const nonValueSymbol = isGlobal && isSourceFile(lastLocation) && lastLocation.locals && getSymbol2(lastLocation.locals, name, ~111551 /* Value */); if (nonValueSymbol) { - const importDecl = (_a = nonValueSymbol.declarations) == null ? void 0 : _a.find((d) => d.kind === 276 /* ImportSpecifier */ || d.kind === 273 /* ImportClause */ || d.kind === 274 /* NamespaceImport */ || d.kind === 271 /* ImportEqualsDeclaration */); + const importDecl = (_a = nonValueSymbol.declarations) == null ? void 0 : _a.find((d) => d.kind === 277 /* ImportSpecifier */ || d.kind === 274 /* ImportClause */ || d.kind === 275 /* NamespaceImport */ || d.kind === 272 /* ImportEqualsDeclaration */); if (importDecl && !isTypeOnlyImportDeclaration(importDecl)) { error2(importDecl, Diagnostics.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, unescapeLeadingUnderscores(name)); } @@ -57483,7 +58700,7 @@ function createTypeChecker(host) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 282 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 279 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 281 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); @@ -57542,12 +58759,13 @@ function createTypeChecker(host) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } + // falls through default: return void 0; } @@ -57608,7 +58826,7 @@ function createTypeChecker(host) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 282 /* ExportSpecifier */) { error2(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -57621,11 +58839,11 @@ function createTypeChecker(host) { if (grandparent && grandparent.parent && isHeritageClause(grandparent)) { const heritageKind = grandparent.token; const containerKind = grandparent.parent.kind; - if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + if (containerKind === 265 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name)); - } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + } else if (isClassLike(grandparent.parent) && heritageKind === 96 /* ExtendsKeyword */) { error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name)); - } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) { + } else if (isClassLike(grandparent.parent) && heritageKind === 119 /* ImplementsKeyword */) { error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name)); } } else { @@ -57725,7 +58943,7 @@ function createTypeChecker(host) { return; } const declaration = (_a = result.declarations) == null ? void 0 : _a.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 267 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { @@ -57753,23 +58971,23 @@ function createTypeChecker(host) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return node; - case 273 /* ImportClause */: + case 274 /* ImportClause */: return node.parent; - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: return node.parent.parent; - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; } } function getDeclarationOfAliasSymbol(symbol) { - return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); + return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration); } - function isAliasSymbolDeclaration2(node) { - return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + function isAliasSymbolDeclaration(node) { + return node.kind === 272 /* ImportEqualsDeclaration */ || node.kind === 271 /* NamespaceExportDeclaration */ || node.kind === 274 /* ImportClause */ && !!node.name || node.kind === 275 /* NamespaceImport */ || node.kind === 281 /* NamespaceExport */ || node.kind === 277 /* ImportSpecifier */ || node.kind === 282 /* ExportSpecifier */ || node.kind === 278 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 305 /* ShorthandPropertyAssignment */ || node.kind === 304 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 261 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 209 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -57780,12 +58998,18 @@ function createTypeChecker(host) { const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 284 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) ); const resolved2 = resolveExternalModuleSymbol(immediate); + if (resolved2 && 102 /* Node20 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) { + const moduleExports = getExportOfModule(resolved2, "module.exports", node, dontResolveAlias); + if (moduleExports) { + return moduleExports; + } + } markSymbolOfAliasDeclarationIfTypeOnly( node, immediate, @@ -57809,10 +59033,10 @@ function createTypeChecker(host) { false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 282 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 279 /* ExportDeclaration */; const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + const name = typeOnlyDeclaration.kind === 279 /* ExportDeclaration */ ? "*" : moduleExportNameTextUnescaped(typeOnlyDeclaration.name); addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } @@ -57837,22 +59061,37 @@ function createTypeChecker(host) { function isSyntacticDefault(node) { return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node); } - function getUsageModeForExpression(usage) { - return isStringLiteralLike(usage) ? host.getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0; + function getEmitSyntaxForModuleSpecifierExpression(usage) { + return isStringLiteralLike(usage) ? host.getEmitSyntaxForUsageLocation(getSourceFileOfNode(usage), usage) : void 0; } function isESMFormatImportImportingCommonjsFormatFile(usageMode, targetMode) { return usageMode === 99 /* ESNext */ && targetMode === 1 /* CommonJS */; } - function isOnlyImportedAsDefault(usage) { - const usageMode = getUsageModeForExpression(usage); - return usageMode === 99 /* ESNext */ && endsWith(usage.text, ".json" /* Json */); + function isOnlyImportableAsDefault(usage, resolvedModule) { + if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) { + const usageMode = getEmitSyntaxForModuleSpecifierExpression(usage); + if (usageMode === 99 /* ESNext */) { + resolvedModule ?? (resolvedModule = resolveExternalModuleName( + usage, + usage, + /*ignoreErrors*/ + true + )); + const targetFile = resolvedModule && getSourceFileOfModule(resolvedModule); + return targetFile && (isJsonSourceFile(targetFile) || getDeclarationFileExtension(targetFile.fileName) === ".d.json.ts"); + } + } + return false; } function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage) { - const usageMode = file && getUsageModeForExpression(usage); - if (file && usageMode !== void 0 && 100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) { - const result = isESMFormatImportImportingCommonjsFormatFile(usageMode, file.impliedNodeFormat); - if (usageMode === 99 /* ESNext */ || result) { - return result; + const usageMode = file && getEmitSyntaxForModuleSpecifierExpression(usage); + if (file && usageMode !== void 0) { + const targetMode = host.getImpliedNodeFormatForEmit(file); + if (usageMode === 99 /* ESNext */ && targetMode === 1 /* CommonJS */ && 100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) { + return true; + } + if (usageMode === 99 /* ESNext */ && targetMode === 99 /* ESNext */) { + return false; } } if (!allowSyntheticDefaultImports) { @@ -57900,18 +59139,33 @@ function createTypeChecker(host) { } function getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias) { var _a; + const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); + const specifier = getModuleSpecifierForImportOrExport(node); let exportDefaultSymbol; + let exportModuleDotExportsSymbol; if (isShorthandAmbientModuleSymbol(moduleSymbol)) { exportDefaultSymbol = moduleSymbol; + } else if (file && specifier && 102 /* Node20 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ && getEmitSyntaxForModuleSpecifierExpression(specifier) === 1 /* CommonJS */ && host.getImpliedNodeFormatForEmit(file) === 99 /* ESNext */ && (exportModuleDotExportsSymbol = resolveExportByName(moduleSymbol, "module.exports", node, dontResolveAlias))) { + if (!getESModuleInterop(compilerOptions)) { + error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), "esModuleInterop"); + return void 0; + } + markSymbolOfAliasDeclarationIfTypeOnly( + node, + exportModuleDotExportsSymbol, + /*finalTarget*/ + void 0, + /*overwriteEmpty*/ + false + ); + return exportModuleDotExportsSymbol; } else { exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); } - const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - const specifier = getModuleSpecifierForImportOrExport(node); if (!specifier) { return exportDefaultSymbol; } - const hasDefaultOnly = isOnlyImportedAsDefault(specifier); + const hasDefaultOnly = isOnlyImportableAsDefault(specifier, moduleSymbol); const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier); if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) { if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports) { @@ -57957,15 +59211,15 @@ function createTypeChecker(host) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 273 /* ImportClause */: + case 274 /* ImportClause */: return node.parent.moduleSpecifier; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -58050,12 +59304,12 @@ function createTypeChecker(host) { if (valueSymbol.exports) result.exports = new Map(valueSymbol.exports); return result; } - function getExportOfModule(symbol, name, specifier, dontResolveAlias) { + function getExportOfModule(symbol, nameText, specifier, dontResolveAlias) { var _a; if (symbol.flags & 1536 /* Module */) { - const exportSymbol = getExportsOfSymbol(symbol).get(name.escapedText); + const exportSymbol = getExportsOfSymbol(symbol).get(nameText); const resolved = resolveSymbol(exportSymbol, dontResolveAlias); - const exportStarDeclaration = (_a = getSymbolLinks(symbol).typeOnlyExportStarMap) == null ? void 0 : _a.get(name.escapedText); + const exportStarDeclaration = (_a = getSymbolLinks(symbol).typeOnlyExportStarMap) == null ? void 0 : _a.get(nameText); markSymbolOfAliasDeclarationIfTypeOnly( specifier, exportSymbol, @@ -58063,7 +59317,7 @@ function createTypeChecker(host) { /*overwriteEmpty*/ false, exportStarDeclaration, - name.escapedText + nameText ); return resolved; } @@ -58081,10 +59335,11 @@ function createTypeChecker(host) { const moduleSpecifier = getExternalModuleRequireArgument(node) || node.moduleSpecifier; const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier); const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name; - if (!isIdentifier(name)) { + if (!isIdentifier(name) && name.kind !== 11 /* StringLiteral */) { return void 0; } - const suppressInteropError = name.escapedText === "default" /* Default */ && allowSyntheticDefaultImports; + const nameText = moduleExportNameTextEscaped(name); + const suppressInteropError = nameText === "default" /* Default */ && allowSyntheticDefaultImports; const targetSymbol = resolveESModuleSymbol( moduleSymbol, moduleSpecifier, @@ -58093,7 +59348,7 @@ function createTypeChecker(host) { suppressInteropError ); if (targetSymbol) { - if (name.escapedText) { + if (nameText || name.kind === 11 /* StringLiteral */) { if (isShorthandAmbientModuleSymbol(moduleSymbol)) { return moduleSymbol; } @@ -58101,23 +59356,25 @@ function createTypeChecker(host) { if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=" /* ExportEquals */)) { symbolFromVariable = getPropertyOfType( getTypeOfSymbol(targetSymbol), - name.escapedText, + nameText, /*skipObjectFunctionPropertyAugment*/ true ); } else { - symbolFromVariable = getPropertyOfVariable(targetSymbol, name.escapedText); + symbolFromVariable = getPropertyOfVariable(targetSymbol, nameText); } symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - let symbolFromModule = getExportOfModule(targetSymbol, name, specifier, dontResolveAlias); - if (symbolFromModule === void 0 && name.escapedText === "default" /* Default */) { + let symbolFromModule = getExportOfModule(targetSymbol, nameText, specifier, dontResolveAlias); + if (symbolFromModule === void 0 && nameText === "default" /* Default */) { const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - if (isOnlyImportedAsDefault(moduleSpecifier) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) { + if (isOnlyImportableAsDefault(moduleSpecifier, moduleSymbol) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) { symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); } } const symbol = symbolFromModule && symbolFromVariable && symbolFromModule !== symbolFromVariable ? combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) : symbolFromModule || symbolFromVariable; - if (!symbol) { + if (isImportOrExportSpecifier(specifier) && isOnlyImportableAsDefault(moduleSpecifier, moduleSymbol) && nameText !== "default" /* Default */) { + error2(name, Diagnostics.Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0, ModuleKind[moduleKind]); + } else if (!symbol) { errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name); } return symbol; @@ -58128,7 +59385,7 @@ function createTypeChecker(host) { var _a; const moduleName = getFullyQualifiedName(moduleSymbol, node); const declarationName = declarationNameToString(name); - const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol); + const suggestion = isIdentifier(name) ? getSuggestedSymbolForNonexistentModule(name, targetSymbol) : void 0; if (suggestion !== void 0) { const suggestionName = symbolToString(suggestion); const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); @@ -58150,7 +59407,7 @@ function createTypeChecker(host) { } function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) { var _a, _b; - const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name.escapedText); + const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(moduleExportNameTextEscaped(name)); const exports2 = moduleSymbol.exports; if (localSymbol) { const exportedEqualsSymbol = exports2 == null ? void 0 : exports2.get("export=" /* ExportEquals */); @@ -58182,7 +59439,7 @@ function createTypeChecker(host) { } } function getTargetOfImportSpecifier(node, dontResolveAlias) { - if (isImportSpecifier(node) && idText(node.propertyName || node.name) === "default" /* Default */) { + if (isImportSpecifier(node) && moduleExportNameIsDefault(node.propertyName || node.name)) { const specifier = getModuleSpecifierForImportOrExport(node); const moduleSymbol = specifier && resolveExternalModuleName(node, specifier); if (moduleSymbol) { @@ -58226,19 +59483,23 @@ function createTypeChecker(host) { } } function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - if (idText(node.propertyName || node.name) === "default" /* Default */) { + const name = node.propertyName || node.name; + if (moduleExportNameIsDefault(name)) { const specifier = getModuleSpecifierForImportOrExport(node); const moduleSymbol = specifier && resolveExternalModuleName(node, specifier); if (moduleSymbol) { return getTargetofModuleDefault(moduleSymbol, node, !!dontResolveAlias); } } - const resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName( - node.propertyName || node.name, - meaning, - /*ignoreErrors*/ - false, - dontResolveAlias + const resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : name.kind === 11 /* StringLiteral */ ? void 0 : ( + // Skip for invalid syntax like this: export { "x" } + resolveEntityName( + name, + meaning, + /*ignoreErrors*/ + false, + dontResolveAlias + ) ); markSymbolOfAliasDeclarationIfTypeOnly( node, @@ -58291,26 +59552,26 @@ function createTypeChecker(host) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: - case 260 /* VariableDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 261 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 273 /* ImportClause */: + case 274 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 280 /* NamespaceExport */: + case 281 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 276 /* ImportSpecifier */: - case 208 /* BindingElement */: + case 277 /* ImportSpecifier */: + case 209 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 277 /* ExportAssignment */: - case 226 /* BinaryExpression */: + case 278 /* ExportAssignment */: + case 227 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 270 /* NamespaceExportDeclaration */: + case 271 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -58318,10 +59579,10 @@ function createTypeChecker(host) { true, dontRecursivelyResolve ); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -58443,7 +59704,7 @@ function createTypeChecker(host) { return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + const resolved = links.typeOnlyDeclaration.kind === 279 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; @@ -58452,7 +59713,7 @@ function createTypeChecker(host) { if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { + if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 167 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -58461,7 +59722,7 @@ function createTypeChecker(host) { dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 272 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -58532,9 +59793,9 @@ function createTypeChecker(host) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { - const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 167 /* QualifiedName */ || name.kind === 212 /* PropertyAccessExpression */) { + const left = name.kind === 167 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 167 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -58600,7 +59861,7 @@ function createTypeChecker(host) { } else { Debug.assertNever(name, "Unknown entity name kind."); } - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 278 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -58686,14 +59947,14 @@ function createTypeChecker(host) { function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */; const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations; - return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage); + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage, ignoreErrors); } - function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation = false) { - return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0; + function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, ignoreErrors = false, isForAugmentation = false) { + return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, !ignoreErrors ? moduleReferenceExpression : void 0, isForAugmentation) : void 0; } function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; - if (startsWith(moduleReference, "@types/")) { + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l; + if (errorNode && startsWith(moduleReference, "@types/")) { const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1; const withoutAtTypePrefix = removePrefix(moduleReference, "@types/"); error2(errorNode, diag2, withoutAtTypePrefix, moduleReference); @@ -58707,23 +59968,23 @@ function createTypeChecker(host) { return ambientModule; } const currentSourceFile = getSourceFileOfNode(location); - const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : void 0) || (isVariableDeclaration(location) && location.initializer && isRequireCall( + const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isVariableDeclaration(location) && location.initializer && isRequireCall( location.initializer, /*requireStringLiteralLikeArgument*/ true - ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, isImportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression) || ((_f = findAncestor(location, isExportDeclaration)) == null ? void 0 : _f.moduleSpecifier); - const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; + ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, or(isImportDeclaration, isJSDocImportTag, isExportDeclaration))) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression); + const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : host.getDefaultResolutionModeForFile(currentSourceFile); const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); - const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule; - const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); + const resolvedModule = (_f = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _f.resolvedModule; + const resolutionDiagnostic = errorNode && resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (resolutionDiagnostic) { error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { - const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); - if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { + const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (errorNode && importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { error2( errorNode, Diagnostics.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, @@ -58731,14 +59992,44 @@ function createTypeChecker(host) { ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); - if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (errorNode && !((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); } + } else if (compilerOptions.rewriteRelativeImportExtensions && !(location.flags & 33554432 /* Ambient */) && !isDeclarationFileName(moduleReference) && !isLiteralImportTypeNode(location) && !isPartOfTypeOnlyImportOrExportDeclaration(location)) { + const shouldRewrite = shouldRewriteModuleSpecifier(moduleReference, compilerOptions); + if (!resolvedModule.resolvedUsingTsExtension && shouldRewrite) { + error2( + errorNode, + Diagnostics.This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0, + getRelativePathFromFile(getNormalizedAbsolutePath(currentSourceFile.fileName, host.getCurrentDirectory()), resolvedModule.resolvedFileName, hostGetCanonicalFileName(host)) + ); + } else if (resolvedModule.resolvedUsingTsExtension && !shouldRewrite && sourceFileMayBeEmitted(sourceFile, host)) { + error2( + errorNode, + Diagnostics.This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path, + getAnyExtensionFromPath(moduleReference) + ); + } else if (resolvedModule.resolvedUsingTsExtension && shouldRewrite) { + const redirect = (_i = host.getRedirectFromSourceFile(sourceFile.path)) == null ? void 0 : _i.resolvedRef; + if (redirect) { + const ignoreCase = !host.useCaseSensitiveFileNames(); + const ownRootDir = host.getCommonSourceDirectory(); + const otherRootDir = getCommonSourceDirectoryOfConfig(redirect.commandLine, ignoreCase); + const rootDirPath = getRelativePathFromDirectory(ownRootDir, otherRootDir, ignoreCase); + const outDirPath = getRelativePathFromDirectory(compilerOptions.outDir || ownRootDir, redirect.commandLine.options.outDir || otherRootDir, ignoreCase); + if (rootDirPath !== outDirPath) { + error2( + errorNode, + Diagnostics.This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files + ); + } + } + } } if (sourceFile.symbol) { - if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { + if (errorNode && resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { errorOnImplicitAnyModule( /*isError*/ false, @@ -58749,7 +60040,7 @@ function createTypeChecker(host) { moduleReference ); } - if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { + if (errorNode && (moduleKind === 100 /* Node16 */ || moduleKind === 101 /* Node18 */)) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l)); if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) { @@ -58759,57 +60050,20 @@ function createTypeChecker(host) { let diagnosticDetails; const ext = tryGetExtensionFromPath2(currentSourceFile.fileName); if (ext === ".ts" /* Ts */ || ext === ".js" /* Js */ || ext === ".tsx" /* Tsx */ || ext === ".jsx" /* Jsx */) { - const scope = currentSourceFile.packageJsonScope; - const targetExt = ext === ".ts" /* Ts */ ? ".mts" /* Mts */ : ext === ".js" /* Js */ ? ".mjs" /* Mjs */ : void 0; - if (scope && !scope.contents.packageJsonContent.type) { - if (targetExt) { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1, - targetExt, - combinePaths(scope.packageDirectory, "package.json") - ); - } else { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0, - combinePaths(scope.packageDirectory, "package.json") - ); - } - } else { - if (targetExt) { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module, - targetExt - ); - } else { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module - ); - } - } + diagnosticDetails = createModeMismatchDetails(currentSourceFile); } + const message = (overrideHost == null ? void 0 : overrideHost.kind) === 273 /* ImportDeclaration */ && ((_j = overrideHost.importClause) == null ? void 0 : _j.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 206 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead; diagnostics.add(createDiagnosticForNodeFromMessageChain( getSourceFileOfNode(errorNode), errorNode, - chainDiagnosticMessages( - diagnosticDetails, - Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, - moduleReference - ) + chainDiagnosticMessages(diagnosticDetails, message, moduleReference) )); } } } return getMergedSymbol(sourceFile.symbol); } - if (moduleNotFoundError) { + if (errorNode && moduleNotFoundError && !isSideEffectImport(errorNode)) { error2(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return void 0; @@ -58824,6 +60078,9 @@ function createTypeChecker(host) { return getMergedSymbol(pattern.symbol); } } + if (!errorNode) { + return void 0; + } if (resolvedModule && !resolutionExtensionIsTSOrJson(resolvedModule.extension) && resolutionDiagnostic === void 0 || resolutionDiagnostic === Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { if (isForAugmentation) { const diag2 = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; @@ -58843,9 +60100,9 @@ function createTypeChecker(host) { } if (moduleNotFoundError) { if (resolvedModule) { - const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName); - if (redirect) { - error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); + const redirect = host.getRedirectFromSourceFile(resolvedModule.resolvedFileName); + if (redirect == null ? void 0 : redirect.outputDts) { + error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, resolvedModule.resolvedFileName); return void 0; } } @@ -58858,14 +60115,14 @@ function createTypeChecker(host) { error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); - const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; + const suggestedExt = (_k = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _k[1]; if (suggestedExt) { error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt); } else { error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { - if ((_k = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _k.alternateResult) { + if ((_l = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _l.alternateResult) { const errorInfo = createModuleNotFoundChain(currentSourceFile, host, moduleReference, mode, moduleReference); errorOrSuggestion( /*isError*/ @@ -58891,6 +60148,9 @@ function createTypeChecker(host) { } } function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) { + if (isSideEffectImport(errorNode)) { + return; + } let errorInfo; if (!isExternalModuleNameRelative(moduleReference) && packageId) { errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name); @@ -58942,13 +60202,14 @@ function createTypeChecker(host) { var _a; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 307 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 308 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; } const referenceParent = referencingLocation.parent; - if (isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent) || isImportCall(referenceParent)) { + const namespaceImport = isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent); + if (namespaceImport || isImportCall(referenceParent)) { const reference = isImportCall(referenceParent) ? referenceParent.arguments[0] : referenceParent.moduleSpecifier; const type = getTypeOfSymbol(symbol); const defaultOnlyType = getTypeWithSyntheticDefaultOnly(type, symbol, moduleSymbol, reference); @@ -58956,13 +60217,20 @@ function createTypeChecker(host) { return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent); } const targetFile = (_a = moduleSymbol == null ? void 0 : moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat); - if (getESModuleInterop(compilerOptions) || isEsmCjsRef) { - let sigs = getSignaturesOfStructuredType(type, 0 /* Call */); - if (!sigs || !sigs.length) { - sigs = getSignaturesOfStructuredType(type, 1 /* Construct */); + const usageMode = getEmitSyntaxForModuleSpecifierExpression(reference); + let exportModuleDotExportsSymbol; + if (namespaceImport && targetFile && 102 /* Node20 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ && usageMode === 1 /* CommonJS */ && host.getImpliedNodeFormatForEmit(targetFile) === 99 /* ESNext */ && (exportModuleDotExportsSymbol = resolveExportByName(symbol, "module.exports", namespaceImport, dontResolveAlias))) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) { + error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, "esModuleInterop"); + } + if (getESModuleInterop(compilerOptions) && hasSignatures(type)) { + return cloneTypeAsModuleType(exportModuleDotExportsSymbol, type, referenceParent); } - if (sigs && sigs.length || getPropertyOfType( + return exportModuleDotExportsSymbol; + } + const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(usageMode, host.getImpliedNodeFormatForEmit(targetFile)); + if (getESModuleInterop(compilerOptions) || isEsmCjsRef) { + if (hasSignatures(type) || getPropertyOfType( type, "default" /* Default */, /*skipObjectFunctionPropertyAugment*/ @@ -58976,6 +60244,9 @@ function createTypeChecker(host) { } return symbol; } + function hasSignatures(type) { + return some(getSignaturesOfStructuredType(type, 0 /* Call */)) || some(getSignaturesOfStructuredType(type, 1 /* Construct */)); + } function cloneTypeAsModuleType(symbol, moduleType, referenceParent) { const result = createSymbol(symbol.flags, symbol.escapedName); result.declarations = symbol.declarations ? symbol.declarations.slice() : []; @@ -59159,7 +60430,7 @@ function createTypeChecker(host) { } function getFunctionExpressionParentSymbolOrSymbol(symbol) { var _a, _b; - return ((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */ ? getSymbolOfNode(symbol.valueDeclaration.parent) || symbol : symbol; + return ((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 220 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 219 /* FunctionExpression */ ? getSymbolOfNode(symbol.valueDeclaration.parent) || symbol : symbol; } function getAlternativeContainingModules(symbol, enclosingDeclaration) { const containingFile = getSourceFileOfNode(enclosingDeclaration); @@ -59419,11 +60690,12 @@ function createTypeChecker(host) { } } switch (location.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 267 /* ModuleDeclaration */: + // falls through + case 268 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -59436,9 +60708,9 @@ function createTypeChecker(host) { return result; } break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -59476,7 +60748,7 @@ function createTypeChecker(host) { const links = getSymbolLinks(symbol); const cache = links.accessibleChainCache || (links.accessibleChainCache = /* @__PURE__ */ new Map()); const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node); - const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation && getNodeId(firstRelevantLocation)}|${meaning}`; + const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`; if (cache.has(key)) { return cache.get(key); } @@ -59516,7 +60788,7 @@ function createTypeChecker(host) { return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 282 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -59561,7 +60833,7 @@ function createTypeChecker(host) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 282 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { @@ -59576,10 +60848,10 @@ function createTypeChecker(host) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: continue; default: return false; @@ -59714,10 +60986,10 @@ function createTypeChecker(host) { return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -59741,7 +61013,14 @@ function createTypeChecker(host) { if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); } else if (symbol.flags & 2 /* BlockScopedVariable */) { - const variableStatement = findAncestor(declaration, isVariableStatement); + const rootDeclaration = walkUpBindingElementsAndPatterns(declaration); + if (rootDeclaration.kind === 170 /* Parameter */) { + return false; + } + const variableStatement = rootDeclaration.parent.parent; + if (variableStatement.kind !== 244 /* VariableStatement */) { + return false; + } if (hasSyntacticModifier(variableStatement, 32 /* Export */)) { return true; } @@ -59765,9 +61044,9 @@ function createTypeChecker(host) { } function getMeaningOfEntityNameReference(entityName) { let meaning; - if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */ || entityName.parent.kind === 182 /* TypePredicate */ && entityName.parent.parameterName === entityName) { + if (entityName.parent.kind === 187 /* TypeQuery */ || entityName.parent.kind === 234 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 168 /* ComputedPropertyName */ || entityName.parent.kind === 183 /* TypePredicate */ && entityName.parent.parameterName === entityName) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) { + } else if (entityName.kind === 167 /* QualifiedName */ || entityName.kind === 212 /* PropertyAccessExpression */ || entityName.parent.kind === 272 /* ImportEqualsDeclaration */ || entityName.parent.kind === 167 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 212 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 213 /* ElementAccessExpression */ && entityName.parent.expression === entityName) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -59819,6 +61098,7 @@ function createTypeChecker(host) { } function symbolToString(symbol, enclosingDeclaration, meaning, flags = 4 /* AllowAnyNodeKind */, writer) { let nodeFlags = 70221824 /* IgnoreErrors */; + let internalNodeFlags = 0 /* None */; if (flags & 2 /* UseOnlyExternalAliasing */) { nodeFlags |= 128 /* UseOnlyExternalAliasing */; } @@ -59829,16 +61109,16 @@ function createTypeChecker(host) { nodeFlags |= 16384 /* UseAliasDefinedOutsideCurrentScope */; } if (flags & 32 /* DoNotIncludeSymbolChain */) { - nodeFlags |= 134217728 /* DoNotIncludeSymbolChain */; + internalNodeFlags |= 4 /* DoNotIncludeSymbolChain */; } if (flags & 16 /* WriteComputedProps */) { - nodeFlags |= 1073741824 /* WriteComputedProps */; + internalNodeFlags |= 1 /* WriteComputedProps */; } const builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName; return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { - const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 307 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags, internalNodeFlags); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -59850,16 +61130,28 @@ function createTypeChecker(host) { return writer2; } } - function signatureToString(signature, enclosingDeclaration, flags = 0 /* None */, kind, writer) { + function signatureToString(signature, enclosingDeclaration, flags = 0 /* None */, kind, writer, maximumLength, verbosityLevel, out) { return writer ? signatureToStringWorker(writer).getText() : usingSingleLineStringWriter(signatureToStringWorker); function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 186 /* ConstructorType */ : 185 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 181 /* ConstructSignature */ : 180 /* CallSignature */; } - const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); + const sig = nodeBuilder.signatureToSignatureDeclaration( + signature, + sigOutput, + enclosingDeclaration, + toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */, + /*internalFlags*/ + void 0, + /*tracker*/ + void 0, + maximumLength, + verbosityLevel, + out + ); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( @@ -59872,9 +61164,20 @@ function createTypeChecker(host) { return writer2; } } - function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter("")) { - const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */; - const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0)); + function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter(""), maximumLength, verbosityLevel, out) { + const noTruncation = !maximumLength && compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */; + const typeNode = nodeBuilder.typeToTypeNode( + type, + enclosingDeclaration, + toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0), + /*internalFlags*/ + void 0, + /*tracker*/ + void 0, + maximumLength, + verbosityLevel, + out + ); if (typeNode === void 0) return Debug.fail("should always get typenode"); const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); @@ -59886,7 +61189,7 @@ function createTypeChecker(host) { writer ); const result = writer.getText(); - const maxLength2 = noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2; + const maxLength2 = maximumLength || (noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2); if (maxLength2 && result && result.length >= maxLength2) { return result.substr(0, maxLength2 - "...".length) + "..."; } @@ -59922,32 +61225,323 @@ function createTypeChecker(host) { return getTypeFromTypeNode(node); } function createNodeBuilder() { + const syntacticBuilderResolver = { + evaluateEntityNameExpression, + isExpandoFunctionDeclaration, + hasLateBindableName, + shouldRemoveDeclaration(context, node) { + return !(context.internalFlags & 8 /* AllowUnresolvedNames */ && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */); + }, + createRecoveryBoundary(context) { + return createRecoveryBoundary(context); + }, + isDefinitelyReferenceToGlobalSymbolObject, + getAllAccessorDeclarations: getAllAccessorDeclarationsForDeclaration, + requiresAddingImplicitUndefined(declaration, symbol, enclosingDeclaration) { + var _a; + switch (declaration.kind) { + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 349 /* JSDocPropertyTag */: + symbol ?? (symbol = getSymbolOfDeclaration(declaration)); + const type = getTypeOfSymbol(symbol); + return !!(symbol.flags & 4 /* Property */ && symbol.flags & 16777216 /* Optional */ && isOptionalDeclaration(declaration) && ((_a = symbol.links) == null ? void 0 : _a.mappedType) && containsNonMissingUndefinedType(type)); + case 170 /* Parameter */: + case 342 /* JSDocParameterTag */: + return requiresAddingImplicitUndefined(declaration, enclosingDeclaration); + default: + Debug.assertNever(declaration); + } + }, + isOptionalParameter, + isUndefinedIdentifierExpression(node) { + return getSymbolAtLocation(node) === undefinedSymbol; + }, + isEntityNameVisible(context, entityName, shouldComputeAliasToMakeVisible) { + return isEntityNameVisible(entityName, context.enclosingDeclaration, shouldComputeAliasToMakeVisible); + }, + serializeExistingTypeNode(context, typeNode, addUndefined) { + return serializeExistingTypeNode(context, typeNode, !!addUndefined); + }, + serializeReturnTypeForSignature(syntacticContext, signatureDeclaration, symbol) { + const context = syntacticContext; + const signature = getSignatureFromDeclaration(signatureDeclaration); + symbol ?? (symbol = getSymbolOfDeclaration(signatureDeclaration)); + const returnType = context.enclosingSymbolTypes.get(getSymbolId(symbol)) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper); + return serializeInferredReturnTypeForSignature(context, signature, returnType); + }, + serializeTypeOfExpression(syntacticContext, expr) { + const context = syntacticContext; + const type = instantiateType(getWidenedType(getRegularTypeOfExpression(expr)), context.mapper); + return typeToTypeNodeHelper(type, context); + }, + serializeTypeOfDeclaration(syntacticContext, declaration, symbol) { + var _a; + const context = syntacticContext; + symbol ?? (symbol = getSymbolOfDeclaration(declaration)); + let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol)); + if (type === void 0) { + type = symbol.flags & 98304 /* Accessor */ && declaration.kind === 179 /* SetAccessor */ ? instantiateType(getWriteTypeOfSymbol(symbol), context.mapper) : symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType; + } + const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration); + if (addUndefinedForParameter) { + type = getOptionalType(type); + } + return serializeInferredTypeForDeclaration(symbol, context, type); + }, + serializeNameOfParameter(context, parameter) { + return parameterToParameterDeclarationName(getSymbolOfDeclaration(parameter), parameter, context); + }, + serializeEntityName(syntacticContext, node) { + const context = syntacticContext; + const symbol = getSymbolAtLocation( + node, + /*ignoreErrors*/ + true + ); + if (!symbol) return void 0; + if (!isValueSymbolAccessible(symbol, context.enclosingDeclaration)) return void 0; + return symbolToExpression(symbol, context, 111551 /* Value */ | 1048576 /* ExportValue */); + }, + serializeTypeName(context, node, isTypeOf, typeArguments) { + return serializeTypeName(context, node, isTypeOf, typeArguments); + }, + getJsDocPropertyOverride(syntacticContext, jsDocTypeLiteral, jsDocProperty) { + const context = syntacticContext; + const name = isIdentifier(jsDocProperty.name) ? jsDocProperty.name : jsDocProperty.name.right; + const typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode2(context, jsDocTypeLiteral), name.escapedText); + const overrideTypeNode = typeViaParent && jsDocProperty.typeExpression && getTypeFromTypeNode2(context, jsDocProperty.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : void 0; + return overrideTypeNode; + }, + enterNewScope(context, node) { + if (isFunctionLike(node) || isJSDocSignature(node)) { + const signature = getSignatureFromDeclaration(node); + return enterNewScope(context, node, signature.parameters, signature.typeParameters); + } else { + const typeParameters = isConditionalTypeNode(node) ? getInferTypeParameters(node) : [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))]; + return enterNewScope( + context, + node, + /*expandedParams*/ + void 0, + typeParameters + ); + } + }, + markNodeReuse(context, range, location) { + return setTextRange2(context, range, location); + }, + trackExistingEntityName(context, node) { + return trackExistingEntityName(node, context); + }, + trackComputedName(context, accessExpression) { + trackComputedName(accessExpression, context.enclosingDeclaration, context); + }, + getModuleSpecifierOverride(syntacticContext, parent2, lit) { + const context = syntacticContext; + if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) { + let name = lit.text; + const originalName = name; + const nodeSymbol = getNodeLinks(parent2).resolvedSymbol; + const meaning = parent2.isTypeOf ? 111551 /* Value */ : 788968 /* Type */; + const parentSymbol = nodeSymbol && isSymbolAccessible( + nodeSymbol, + context.enclosingDeclaration, + meaning, + /*shouldComputeAliasesToMakeVisible*/ + false + ).accessibility === 0 /* Accessible */ && lookupSymbolChain( + nodeSymbol, + context, + meaning, + /*yieldModuleSymbol*/ + true + )[0]; + if (parentSymbol && isExternalModuleSymbol(parentSymbol)) { + name = getSpecifierForModuleSymbol(parentSymbol, context); + } else { + const targetFile = getExternalModuleFileFromDeclaration(parent2); + if (targetFile) { + name = getSpecifierForModuleSymbol(targetFile.symbol, context); + } + } + if (name.includes("/node_modules/")) { + context.encounteredError = true; + if (context.tracker.reportLikelyUnsafeImportRequiredError) { + context.tracker.reportLikelyUnsafeImportRequiredError(name); + } + } + if (name !== originalName) { + return name; + } + } + }, + canReuseTypeNode(context, typeNode) { + return canReuseTypeNode(context, typeNode); + }, + canReuseTypeNodeAnnotation(syntacticContext, node, existing, symbol, requiresAddingUndefined) { + var _a; + const context = syntacticContext; + if (context.enclosingDeclaration === void 0) return false; + symbol ?? (symbol = getSymbolOfDeclaration(node)); + let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol)); + if (type === void 0) { + if (symbol.flags & 98304 /* Accessor */) { + type = node.kind === 179 /* SetAccessor */ ? getWriteTypeOfSymbol(symbol) : getTypeOfAccessors(symbol); + } else if (isValueSignatureDeclaration(node)) { + type = getReturnTypeOfSignature(getSignatureFromDeclaration(node)); + } else { + type = getTypeOfSymbol(symbol); + } + } + let annotationType = getTypeFromTypeNodeWithoutContext(existing); + if (isErrorType(annotationType)) { + return true; + } + if (requiresAddingUndefined && annotationType) { + annotationType = addOptionality(annotationType, !isParameter(node)); + } + return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type); + } + }; return { - typeToTypeNode: (type, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => typeToTypeNodeHelper(type, context)), - typePredicateToTypePredicateNode: (typePredicate, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => typePredicateToTypePredicateNodeHelper(typePredicate, context)), - expressionOrTypeToTypeNode: (expr, type, addUndefined, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => expressionOrTypeToTypeNode(context, expr, type, addUndefined)), - serializeTypeForDeclaration: (declaration, type, symbol, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => serializeTypeForDeclaration(context, declaration, type, symbol)), - serializeReturnTypeForSignature: (signature, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => serializeReturnTypeForSignature(context, signature)), - indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => indexInfoToIndexSignatureDeclarationHelper( - indexInfo, - context, - /*typeNode*/ - void 0 - )), - signatureToSignatureDeclaration: (signature, kind, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => signatureToSignatureDeclarationHelper(signature, kind, context)), - symbolToEntityName: (symbol, meaning, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => symbolToName( - symbol, - context, - meaning, - /*expectsIdentifier*/ - false - )), - symbolToExpression: (symbol, meaning, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => symbolToExpression(symbol, context, meaning)), - symbolToTypeParameterDeclarations: (symbol, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => typeParametersToTypeParameterDeclarations(symbol, context)), - symbolToParameterDeclaration: (symbol, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => symbolToParameterDeclaration(symbol, context)), - typeParameterToDeclaration: (parameter, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => typeParameterToDeclaration(parameter, context)), - symbolTableToDeclarationStatements: (symbolTable, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => symbolTableToDeclarationStatements(symbolTable, context)), - symbolToNode: (symbol, meaning, enclosingDeclaration, flags, tracker) => withContext2(enclosingDeclaration, flags, tracker, (context) => symbolToNode(symbol, context, meaning)) + syntacticBuilderResolver, + typeToTypeNode: (type, enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, out) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, (context) => typeToTypeNodeHelper(type, context), out), + typePredicateToTypePredicateNode: (typePredicate, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => typePredicateToTypePredicateNodeHelper(typePredicate, context) + ), + serializeTypeForDeclaration: (declaration, symbol, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context) + ), + serializeReturnTypeForSignature: (signature, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context) + ), + serializeTypeForExpression: (expr, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => syntacticNodeBuilder.serializeTypeOfExpression(expr, context) + ), + indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => indexInfoToIndexSignatureDeclarationHelper( + indexInfo, + context, + /*typeNode*/ + void 0 + ) + ), + signatureToSignatureDeclaration: (signature, kind, enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, out) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, (context) => signatureToSignatureDeclarationHelper(signature, kind, context), out), + symbolToEntityName: (symbol, meaning, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => symbolToName( + symbol, + context, + meaning, + /*expectsIdentifier*/ + false + ) + ), + symbolToExpression: (symbol, meaning, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => symbolToExpression(symbol, context, meaning) + ), + symbolToTypeParameterDeclarations: (symbol, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => typeParametersToTypeParameterDeclarations(symbol, context) + ), + symbolToParameterDeclaration: (symbol, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => symbolToParameterDeclaration(symbol, context) + ), + typeParameterToDeclaration: (parameter, enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, out) => withContext2(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, (context) => typeParameterToDeclaration(parameter, context), out), + symbolTableToDeclarationStatements: (symbolTable, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => symbolTableToDeclarationStatements(symbolTable, context) + ), + symbolToNode: (symbol, meaning, enclosingDeclaration, flags, internalFlags, tracker) => withContext2( + enclosingDeclaration, + flags, + internalFlags, + tracker, + /*maximumLength*/ + void 0, + /*verbosityLevel*/ + void 0, + (context) => symbolToNode(symbol, context, meaning) + ), + symbolToDeclarations }; function getTypeFromTypeNode2(context, node, noMappedTypes) { const type = getTypeFromTypeNodeWithoutContext(node); @@ -59963,72 +61557,20 @@ function createTypeChecker(host) { if (!location) { return range; } - if (!context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(location))) { - return setOriginalNode(range, location); + let original = range.original; + while (original && original !== location) { + original = original.original; } - return setTextRange(setOriginalNode(range, location), location); - } - function expressionOrTypeToTypeNode(context, expr, type, addUndefined) { - const oldFlags = context.flags; - if (expr && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) { - syntacticNodeBuilder.serializeTypeOfExpression(expr, context, addUndefined); + if (!original) { + setOriginalNode(range, location); } - context.flags |= -2147483648 /* NoSyntacticPrinter */; - const result = expressionOrTypeToTypeNodeHelper(context, expr, type, addUndefined); - context.flags = oldFlags; - return result; - } - function expressionOrTypeToTypeNodeHelper(context, expr, type, addUndefined) { - if (expr) { - const typeNode = isAssertionExpression(expr) ? expr.type : isJSDocTypeAssertion(expr) ? getJSDocTypeAssertionType(expr) : void 0; - if (typeNode && !isConstTypeReference(typeNode)) { - const result = tryReuseExistingTypeNode(context, typeNode, type, expr.parent, addUndefined); - if (result) { - return result; - } - } - } - if (addUndefined) { - type = getOptionalType(type); + if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(getOriginalNode(location))) { + return setTextRange(range, location); } - return typeToTypeNodeHelper(type, context); - } - function tryReuseExistingTypeNode(context, typeNode, type, host2, addUndefined) { - const originalType = type; - if (addUndefined) { - type = getOptionalType(type); - } - const clone2 = tryReuseExistingNonParameterTypeNode(context, typeNode, type, host2); - if (clone2) { - if (addUndefined && !someType(getTypeFromTypeNode2(context, typeNode), (t) => !!(t.flags & 32768 /* Undefined */))) { - return factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); - } - return clone2; - } - if (addUndefined && originalType !== type) { - const cloneMissingUndefined = tryReuseExistingNonParameterTypeNode(context, typeNode, originalType, host2); - if (cloneMissingUndefined) { - return factory.createUnionTypeNode([cloneMissingUndefined, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); - } - } - return void 0; - } - function tryReuseExistingNonParameterTypeNode(context, existing, type, host2 = context.enclosingDeclaration, annotationType = getTypeFromTypeNode2( - context, - existing, - /*noMappedTypes*/ - true - )) { - if (annotationType && typeNodeIsEquivalentToType(host2, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) { - const result = tryReuseExistingTypeNodeHelper(context, existing); - if (result) { - return result; - } - } - return void 0; + return range; } function symbolToNode(symbol, context, meaning) { - if (context.flags & 1073741824 /* WriteComputedProps */) { + if (context.internalFlags & 1 /* WriteComputedProps */) { if (symbol.valueDeclaration) { const name = getNameOfDeclaration(symbol.valueDeclaration); if (name && isComputedPropertyName(name)) return name; @@ -60041,14 +61583,89 @@ function createTypeChecker(host) { } return symbolToExpression(symbol, context, meaning); } - function withContext2(enclosingDeclaration, flags, tracker, cb) { - const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; + function symbolToDeclarations(symbol, meaning, flags, maximumLength, verbosityLevel, out) { + const nodes = withContext2( + /*enclosingDeclaration*/ + void 0, + flags, + /*internalFlags*/ + void 0, + /*tracker*/ + void 0, + maximumLength, + verbosityLevel, + (context) => symbolToDeclarationsWorker(symbol, context), + out + ); + return mapDefined(nodes, (node) => { + switch (node.kind) { + case 264 /* ClassDeclaration */: + return simplifyClassDeclaration(node, symbol); + case 267 /* EnumDeclaration */: + return simplifyModifiers(node, isEnumDeclaration, symbol); + case 265 /* InterfaceDeclaration */: + return simplifyInterfaceDeclaration(node, symbol, meaning); + case 268 /* ModuleDeclaration */: + return simplifyModifiers(node, isModuleDeclaration, symbol); + default: + return void 0; + } + }); + } + function simplifyClassDeclaration(classDecl, symbol) { + const classDeclarations = filter(symbol.declarations, isClassLike); + const originalClassDecl = classDeclarations && classDeclarations.length > 0 ? classDeclarations[0] : classDecl; + const modifiers = getEffectiveModifierFlags(originalClassDecl) & ~(32 /* Export */ | 128 /* Ambient */); + const isAnonymous = isClassExpression(originalClassDecl); + if (isAnonymous) { + classDecl = factory.updateClassDeclaration( + classDecl, + classDecl.modifiers, + /*name*/ + void 0, + classDecl.typeParameters, + classDecl.heritageClauses, + classDecl.members + ); + } + return factory.replaceModifiers(classDecl, modifiers); + } + function simplifyModifiers(newDecl, isDeclKind, symbol) { + const decls = filter(symbol.declarations, isDeclKind); + const declWithModifiers = decls && decls.length > 0 ? decls[0] : newDecl; + const modifiers = getEffectiveModifierFlags(declWithModifiers) & ~(32 /* Export */ | 128 /* Ambient */); + return factory.replaceModifiers(newDecl, modifiers); + } + function simplifyInterfaceDeclaration(interfaceDecl, symbol, meaning) { + if (!(meaning & 64 /* Interface */)) { + return void 0; + } + return simplifyModifiers(interfaceDecl, isInterfaceDeclaration, symbol); + } + function symbolToDeclarationsWorker(symbol, context) { + const type = getDeclaredTypeOfSymbol(symbol); + context.typeStack.push(type.id); + context.typeStack.push(-1); + const table = createSymbolTable([symbol]); + const statements = symbolTableToDeclarationStatements(table, context); + context.typeStack.pop(); + context.typeStack.pop(); + return statements; + } + function withContext2(enclosingDeclaration, flags, internalFlags, tracker, maximumLength, verbosityLevel, cb, out) { + const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : (internalFlags || 0 /* None */) & 4 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; + flags = flags || 0 /* None */; + const maxTruncationLength = maximumLength || (flags & 1 /* NoTruncation */ ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); const context = { enclosingDeclaration, enclosingFile: enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration), - flags: flags || 0 /* None */, + flags, + internalFlags: internalFlags || 0 /* None */, tracker: void 0, + maxTruncationLength, + maxExpansionDepth: verbosityLevel ?? -1, encounteredError: false, + suppressReportInferenceFallback: false, reportedDiagnostic: false, visitedTypes: void 0, symbolDepth: void 0, @@ -60067,23 +61684,86 @@ function createTypeChecker(host) { typeParameterNames: void 0, typeParameterNamesByText: void 0, typeParameterNamesByTextNextNameCount: void 0, - mapper: void 0 + enclosingSymbolTypes: /* @__PURE__ */ new Map(), + mapper: void 0, + depth: 0, + typeStack: [], + out: { + canIncreaseExpansionDepth: false, + truncated: false + } }; context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); const resultingNode = cb(context); if (context.truncating && context.flags & 1 /* NoTruncation */) { context.tracker.reportTruncationError(); } + if (out) { + out.canIncreaseExpansionDepth = context.out.canIncreaseExpansionDepth; + out.truncated = context.out.truncated; + } return context.encounteredError ? void 0 : resultingNode; } + function addSymbolTypeToContext(context, symbol, type) { + const id = getSymbolId(symbol); + const oldType = context.enclosingSymbolTypes.get(id); + context.enclosingSymbolTypes.set(id, type); + return restore; + function restore() { + if (oldType) { + context.enclosingSymbolTypes.set(id, oldType); + } else { + context.enclosingSymbolTypes.delete(id); + } + } + } + function saveRestoreFlags(context) { + const flags = context.flags; + const internalFlags = context.internalFlags; + const depth = context.depth; + return restore; + function restore() { + context.flags = flags; + context.internalFlags = internalFlags; + context.depth = depth; + } + } + function checkTruncationLengthIfExpanding(context) { + return context.maxExpansionDepth >= 0 && checkTruncationLength(context); + } function checkTruncationLength(context) { if (context.truncating) return context.truncating; - return context.truncating = context.approximateLength > (context.flags & 1 /* NoTruncation */ ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); + return context.truncating = context.approximateLength > context.maxTruncationLength; + } + function canPossiblyExpandType(type, context) { + for (let i = 0; i < context.typeStack.length - 1; i++) { + if (context.typeStack[i] === type.id) { + return false; + } + } + return context.depth < context.maxExpansionDepth || context.depth === context.maxExpansionDepth && !context.out.canIncreaseExpansionDepth; + } + function shouldExpandType(type, context, isAlias = false) { + if (!isAlias && isLibType(type)) { + return false; + } + for (let i = 0; i < context.typeStack.length - 1; i++) { + if (context.typeStack[i] === type.id) { + return false; + } + } + const result = context.depth < context.maxExpansionDepth; + if (!result) { + context.out.canIncreaseExpansionDepth = true; + } + return result; } function typeToTypeNodeHelper(type, context) { - const savedFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); + if (type) context.typeStack.push(type.id); const typeNode = typeToTypeNodeWorker(type, context); - context.flags = savedFlags; + if (type) context.typeStack.pop(); + restoreFlags(); return typeNode; } function typeToTypeNodeWorker(type, context) { @@ -60093,6 +61773,7 @@ function createTypeChecker(host) { } const inTypeAlias = context.flags & 8388608 /* InTypeAlias */; context.flags &= ~8388608 /* InTypeAlias */; + let expandingEnum = false; if (!type) { if (!(context.flags & 262144 /* AllowEmptyUnionOrIntersection */)) { context.encounteredError = true; @@ -60160,7 +61841,11 @@ function createTypeChecker(host) { return Debug.fail("Unhandled type node kind returned from `symbolToTypeNode`."); } } - return symbolToTypeNode(type.symbol, context, 788968 /* Type */); + if (!shouldExpandType(type, context)) { + return symbolToTypeNode(type.symbol, context, 788968 /* Type */); + } else { + expandingEnum = true; + } } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += type.value.length + 2; @@ -60227,16 +61912,34 @@ function createTypeChecker(host) { return factory.createThisTypeNode(); } if (!inTypeAlias && type.aliasSymbol && (context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */ || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) { - const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); - if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & 32 /* Class */)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); - if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { - return factory.createArrayTypeNode(typeArgumentNodes[0]); + if (!shouldExpandType( + type, + context, + /*isAlias*/ + true + )) { + const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); + if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & 32 /* Class */)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); + if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { + return factory.createArrayTypeNode(typeArgumentNodes[0]); + } + return symbolToTypeNode(type.aliasSymbol, context, 788968 /* Type */, typeArgumentNodes); } - return symbolToTypeNode(type.aliasSymbol, context, 788968 /* Type */, typeArgumentNodes); + context.depth += 1; } const objectFlags = getObjectFlags(type); if (objectFlags & 4 /* Reference */) { Debug.assert(!!(type.flags & 524288 /* Object */)); + if (shouldExpandType(type, context)) { + context.depth += 1; + return createAnonymousTypeNode( + type, + /*forceClassExpansion*/ + true, + /*forceExpansion*/ + true + ); + } return type.node ? visitAndTransformType(type, typeReferenceToTypeNode) : typeReferenceToTypeNode(type); } if (type.flags & 262144 /* TypeParameter */ || objectFlags & 3 /* ClassOrInterface */) { @@ -60266,6 +61969,16 @@ function createTypeChecker(host) { void 0 ); } + if (objectFlags & 3 /* ClassOrInterface */ && shouldExpandType(type, context)) { + context.depth += 1; + return createAnonymousTypeNode( + type, + /*forceClassExpansion*/ + true, + /*forceExpansion*/ + true + ); + } if (type.symbol) { return symbolToTypeNode(type.symbol, context, 788968 /* Type */); } @@ -60280,7 +61993,7 @@ function createTypeChecker(host) { type = type.origin; } if (type.flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - const types = type.flags & 1048576 /* Union */ ? formatUnionTypes(type.types) : type.types; + const types = type.flags & 1048576 /* Union */ ? formatUnionTypes(type.types, expandingEnum) : type.types; if (length(types) === 1) { return typeToTypeNodeHelper(types[0], context); } @@ -60411,12 +62124,19 @@ function createTypeChecker(host) { const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0; let appropriateConstraintTypeNode; let newTypeVariable; + let templateType = getTemplateTypeFromMappedType(type2); + const typeParameter = getTypeParameterFromMappedType(type2); const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */); if (isMappedTypeWithKeyofConstraintDeclaration(type2)) { if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { - const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); - const name = typeParameterToName(newParam, context); + const newConstraintParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); + const name = typeParameterToName(newConstraintParam, context); + const target = type2.target; newTypeVariable = factory.createTypeReferenceNode(name); + templateType = instantiateType( + getTemplateTypeFromMappedType(target), + makeArrayTypeMapper([getTypeParameterFromMappedType(target), getModifiersTypeFromMappedType(target)], [typeParameter, newConstraintParam]) + ); } appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); } else if (needsModifierPreservingWrapper) { @@ -60427,9 +62147,17 @@ function createTypeChecker(host) { } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } - const typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type2), context, appropriateConstraintTypeNode); + const typeParameterNode = typeParameterToDeclarationWithConstraint(typeParameter, context, appropriateConstraintTypeNode); + const cleanup = enterNewScope( + context, + type2.declaration, + /*expandedParams*/ + void 0, + [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(type2.declaration.typeParameter))] + ); const nameTypeNode = type2.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type2), context) : void 0; - const templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type2), !!(getMappedTypeModifiers(type2) & 4 /* IncludeOptional */)), context); + const templateTypeNode = typeToTypeNodeHelper(removeMissingType(templateType, !!(getMappedTypeModifiers(type2) & 4 /* IncludeOptional */)), context); + cleanup(); const mappedTypeNode = factory.createMappedTypeNode( readonlyToken, typeParameterNode, @@ -60469,7 +62197,7 @@ function createTypeChecker(host) { } return result; } - function createAnonymousTypeNode(type2) { + function createAnonymousTypeNode(type2, forceClassExpansion = false, forceExpansion = false) { var _a2, _b2; const typeId = type2.id; const symbol = type2.symbol; @@ -60478,8 +62206,8 @@ function createTypeChecker(host) { if (isInstantiationExpressionType) { const instantiationExpressionType = type2; const existing = instantiationExpressionType.node; - if (isTypeQueryNode(existing)) { - const typeNode = tryReuseExistingNonParameterTypeNode(context, existing, type2); + if (isTypeQueryNode(existing) && getTypeFromTypeNode2(context, existing) === type2) { + const typeNode = syntacticNodeBuilder.tryReuseExistingTypeNode(context, existing); if (typeNode) { return typeNode; } @@ -60492,15 +62220,20 @@ function createTypeChecker(host) { const isInstanceType = isClassInstanceSide(type2) ? 788968 /* Type */ : 111551 /* Value */; if (isJSConstructor(symbol.valueDeclaration)) { return symbolToTypeNode(symbol, context, isInstanceType); - } else if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible( + } else if (!forceExpansion && (symbol.flags & 32 /* Class */ && !forceClassExpansion && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible( symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false - ).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) { - return symbolToTypeNode(symbol, context, isInstanceType); - } else if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) { + ).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol())) { + if (shouldExpandType(type2, context)) { + context.depth += 1; + } else { + return symbolToTypeNode(symbol, context, isInstanceType); + } + } + if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) { const typeAlias = getTypeAliasForTypeLiteral(type2); if (typeAlias) { return symbolToTypeNode(typeAlias, context, 788968 /* Type */); @@ -60516,9 +62249,9 @@ function createTypeChecker(host) { function shouldWriteTypeOfFunctionSymbol() { var _a3; const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method - some(symbol.declarations, (declaration) => isStatic(declaration)); + some(symbol.declarations, (declaration) => isStatic(declaration) && !isLateBindableIndexSignature(getNameOfDeclaration(declaration))); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 307 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 308 /* SourceFile */ || declaration.parent.kind === 269 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -60536,8 +62269,8 @@ function createTypeChecker(host) { if (id && !context.symbolDepth) { context.symbolDepth = /* @__PURE__ */ new Map(); } - const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); - const key = `${getTypeId(type2)}|${context.flags}`; + const links = context.maxExpansionDepth >= 0 ? void 0 : context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); + const key = `${getTypeId(type2)}|${context.flags}|${context.internalFlags}`; if (links) { links.serializedTypes || (links.serializedTypes = /* @__PURE__ */ new Map()); } @@ -60623,18 +62356,18 @@ function createTypeChecker(host) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 186 /* ConstructorType */, context); return signatureNode; } } const abstractSignatures = filter(resolved.constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */)); if (some(abstractSignatures)) { - const types = map(abstractSignatures, (s) => getOrCreateTypeFromSignature(s)); + const types = map(abstractSignatures, getOrCreateTypeFromSignature); const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + resolved.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per // the logic in `createTypeNodesFromResolvedType`. (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ ? countWhere(resolved.properties, (p) => !(p.flags & 4194304 /* Prototype */)) : length(resolved.properties)); @@ -60643,10 +62376,10 @@ function createTypeChecker(host) { } return typeToTypeNodeHelper(getIntersectionType(types), context); } - const savedFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= 4194304 /* InObjectTypeLiteral */; const members = createTypeNodesFromResolvedType(resolved); - context.flags = savedFlags; + restoreFlags(); const typeLiteralNode = factory.createTypeLiteralNode(members); context.approximateLength += 2; setEmitFlags(typeLiteralNode, context.flags & 1024 /* MultilineObjectLiterals */ ? 0 : 1 /* SingleLine */); @@ -60709,23 +62442,51 @@ function createTypeChecker(host) { } while (i < length2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent2); if (!rangeEquals(outerTypeParameters, typeArguments, start, i)) { const typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context); - const flags2 = context.flags; + const restoreFlags2 = saveRestoreFlags(context); context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */; const ref = symbolToTypeNode(parent2, context, 788968 /* Type */, typeArgumentSlice); - context.flags = flags2; + restoreFlags2(); resultType = !resultType ? ref : appendReferenceToType(resultType, ref); } } } let typeArgumentNodes; if (typeArguments.length > 0) { - const typeParameterCount = (type2.target.typeParameters || emptyArray).length; + let typeParameterCount = 0; + if (type2.target.typeParameters) { + typeParameterCount = Math.min(type2.target.typeParameters.length, typeArguments.length); + if (isReferenceToType2(type2, getGlobalIterableType( + /*reportErrors*/ + false + )) || isReferenceToType2(type2, getGlobalIterableIteratorType( + /*reportErrors*/ + false + )) || isReferenceToType2(type2, getGlobalAsyncIterableType( + /*reportErrors*/ + false + )) || isReferenceToType2(type2, getGlobalAsyncIterableIteratorType( + /*reportErrors*/ + false + ))) { + if (!type2.node || !isTypeReferenceNode(type2.node) || !type2.node.typeArguments || type2.node.typeArguments.length < typeParameterCount) { + while (typeParameterCount > 0) { + const typeArgument = typeArguments[typeParameterCount - 1]; + const typeParameter = type2.target.typeParameters[typeParameterCount - 1]; + const defaultType = getDefaultFromTypeParameter(typeParameter); + if (!defaultType || !isTypeIdenticalTo(typeArgument, defaultType)) { + break; + } + typeParameterCount--; + } + } + } + } typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context); } - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */; const finalRef = symbolToTypeNode(type2.symbol, context, 788968 /* Type */, typeArgumentNodes); - context.flags = flags; + restoreFlags(); return !resultType ? finalRef : appendReferenceToType(resultType, finalRef); } } @@ -60791,8 +62552,44 @@ function createTypeChecker(host) { ids.unshift(state); return ids; } + function indexInfoToObjectComputedNamesOrSignatureDeclaration(indexInfo, context2, typeNode) { + if (indexInfo.components) { + const allComponentComputedNamesSerializable = every(indexInfo.components, (e) => { + var _a2; + return !!(e.name && isComputedPropertyName(e.name) && isEntityNameExpression(e.name.expression) && context2.enclosingDeclaration && ((_a2 = isEntityNameVisible( + e.name.expression, + context2.enclosingDeclaration, + /*shouldComputeAliasToMakeVisible*/ + false + )) == null ? void 0 : _a2.accessibility) === 0 /* Accessible */); + }); + if (allComponentComputedNamesSerializable) { + const newComponents = filter(indexInfo.components, (e) => { + return !hasLateBindableName(e); + }); + return map(newComponents, (e) => { + trackComputedName(e.name.expression, context2.enclosingDeclaration, context2); + return setTextRange2( + context2, + factory.createPropertySignature( + indexInfo.isReadonly ? [factory.createModifier(148 /* ReadonlyKeyword */)] : void 0, + e.name, + (isPropertySignature(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken(58 /* QuestionToken */) : void 0, + typeNode || typeToTypeNodeHelper(getTypeOfSymbol(e.symbol), context2) + ), + e + ); + }); + } + } + return [indexInfoToIndexSignatureDeclarationHelper(indexInfo, context2, typeNode)]; + } function createTypeNodesFromResolvedType(resolvedType) { if (checkTruncationLength(context)) { + context.out.truncated = true; + if (context.flags & 1 /* NoTruncation */) { + return [addSyntheticTrailingComment(factory.createNotEmittedTypeElement(), 3 /* MultiLineCommentTrivia */, "elided")]; + } return [factory.createPropertySignature( /*modifiers*/ void 0, @@ -60803,23 +62600,28 @@ function createTypeChecker(host) { void 0 )]; } + context.typeStack.push(-1); const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 181 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { - typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); + typeElements.push(...indexInfoToObjectComputedNamesOrSignatureDeclaration(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); } const properties = resolvedType.properties; if (!properties) { + context.typeStack.pop(); return typeElements; } let i = 0; for (const propertySymbol of properties) { + if (isExpanding(context) && propertySymbol.flags & 4194304 /* Prototype */) { + continue; + } i++; if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */) { if (propertySymbol.flags & 4194304 /* Prototype */) { @@ -60830,20 +62632,27 @@ function createTypeChecker(host) { } } if (checkTruncationLength(context) && i + 2 < properties.length - 1) { - typeElements.push(factory.createPropertySignature( - /*modifiers*/ - void 0, - `... ${properties.length - i} more ...`, - /*questionToken*/ - void 0, - /*type*/ - void 0 - )); + context.out.truncated = true; + if (context.flags & 1 /* NoTruncation */) { + const typeElement = typeElements.pop(); + typeElements.push(addSyntheticTrailingComment(typeElement, 3 /* MultiLineCommentTrivia */, `... ${properties.length - i} more elided ...`)); + } else { + typeElements.push(factory.createPropertySignature( + /*modifiers*/ + void 0, + `... ${properties.length - i} more ...`, + /*questionToken*/ + void 0, + /*type*/ + void 0 + )); + } addPropertyToElementList(properties[properties.length - 1], context, typeElements); break; } addPropertyToElementList(propertySymbol, context, typeElements); } + context.typeStack.pop(); return typeElements.length ? typeElements : void 0; } } @@ -60856,11 +62665,25 @@ function createTypeChecker(host) { void 0 ); } - return factory.createKeywordTypeNode(133 /* AnyKeyword */); + return addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "elided"); } function shouldUsePlaceholderForProperty(propertySymbol, context) { var _a; - return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */)); + const depth = 3; + return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */) || isDeeplyNestedReverseMappedTypeProperty()); + function isDeeplyNestedReverseMappedTypeProperty() { + var _a2; + if ((((_a2 = context.reverseMappedStack) == null ? void 0 : _a2.length) ?? 0) < depth) { + return false; + } + for (let i = 0; i < depth; i++) { + const prop = context.reverseMappedStack[context.reverseMappedStack.length - 1 - i]; + if (prop.links.mappedType.symbol !== propertySymbol.links.mappedType.symbol) { + return false; + } + } + return true; + } } function addPropertyToElementList(propertySymbol, context, typeElements) { var _a; @@ -60891,34 +62714,85 @@ function createTypeChecker(host) { context.approximateLength += symbolName(propertySymbol).length + 1; if (propertySymbol.flags & 98304 /* Accessor */) { const writeType = getWriteTypeOfSymbol(propertySymbol); - if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) { - const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */); - const getterSignature = getSignatureFromDeclaration(getterDeclaration); - typeElements.push( - setCommentRange2( - context, - signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }), - getterDeclaration - ) - ); - const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */); - const setterSignature = getSignatureFromDeclaration(setterDeclaration); - typeElements.push( - setCommentRange2( - context, - signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }), - setterDeclaration - ) - ); - return; + if (!isErrorType(propertyType) && !isErrorType(writeType)) { + const symbolMapper = getSymbolLinks(propertySymbol).mapper; + const propDeclaration = getDeclarationOfKind(propertySymbol, 173 /* PropertyDeclaration */); + if (propertyType !== writeType || propertySymbol.parent.flags & 32 /* Class */ && !propDeclaration) { + const getterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* GetAccessor */); + if (getterDeclaration) { + const getterSignature = getSignatureFromDeclaration(getterDeclaration); + typeElements.push( + setCommentRange2( + context, + signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 178 /* GetAccessor */, context, { name: propertyName }), + getterDeclaration + ) + ); + } + const setterDeclaration = getDeclarationOfKind(propertySymbol, 179 /* SetAccessor */); + if (setterDeclaration) { + const setterSignature = getSignatureFromDeclaration(setterDeclaration); + typeElements.push( + setCommentRange2( + context, + signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 179 /* SetAccessor */, context, { name: propertyName }), + setterDeclaration + ) + ); + } + return; + } + if (propertySymbol.parent.flags & 32 /* Class */ && propDeclaration && find(propDeclaration.modifiers, isAccessorModifier)) { + const fakeGetterSignature = createSignature( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + emptyArray, + propertyType, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 /* None */ + ); + typeElements.push( + setCommentRange2( + context, + signatureToSignatureDeclarationHelper(fakeGetterSignature, 178 /* GetAccessor */, context, { name: propertyName }), + propDeclaration + ) + ); + const setterParam = createSymbol(1 /* FunctionScopedVariable */, "arg"); + setterParam.links.type = writeType; + const fakeSetterSignature = createSignature( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [setterParam], + voidType, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 /* None */ + ); + typeElements.push( + signatureToSignatureDeclarationHelper(fakeSetterSignature, 179 /* SetAccessor */, context, { name: propertyName }) + ); + return; + } } } const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); - typeElements.push(preserveCommentsOn(methodDeclaration)); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 174 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + typeElements.push(preserveCommentsOn(methodDeclaration, signature.declaration || propertySymbol.valueDeclaration)); } if (signatures.length || !optionalToken) { return; @@ -60953,17 +62827,17 @@ function createTypeChecker(host) { optionalToken, propertyTypeNode ); - typeElements.push(preserveCommentsOn(propertySignature)); - function preserveCommentsOn(node) { + typeElements.push(preserveCommentsOn(propertySignature, propertySymbol.valueDeclaration)); + function preserveCommentsOn(node, range) { var _a2; - const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 348 /* JSDocPropertyTag */); + const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 349 /* JSDocPropertyTag */); if (jsdocPropertyTag) { const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); } - } else if (propertySymbol.valueDeclaration) { - setCommentRange2(context, node, propertySymbol.valueDeclaration); + } else if (range) { + setCommentRange2(context, node, range); } return node; } @@ -60977,16 +62851,19 @@ function createTypeChecker(host) { function mapToTypeNodes(types, context, isBareList) { if (some(types)) { if (checkTruncationLength(context)) { + context.out.truncated = true; if (!isBareList) { - return [factory.createTypeReferenceNode( - "...", - /*typeArguments*/ - void 0 - )]; + return [ + context.flags & 1 /* NoTruncation */ ? addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "elided") : factory.createTypeReferenceNode( + "...", + /*typeArguments*/ + void 0 + ) + ]; } else if (types.length > 2) { return [ typeToTypeNodeHelper(types[0], context), - factory.createTypeReferenceNode( + context.flags & 1 /* NoTruncation */ ? addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, `... ${types.length - 2} more elided ...`) : factory.createTypeReferenceNode( `... ${types.length - 2} more ...`, /*typeArguments*/ void 0 @@ -61002,11 +62879,14 @@ function createTypeChecker(host) { for (const type of types) { i++; if (checkTruncationLength(context) && i + 2 < types.length - 1) { - result.push(factory.createTypeReferenceNode( - `... ${types.length - i} more ...`, - /*typeArguments*/ - void 0 - )); + context.out.truncated = true; + result.push( + context.flags & 1 /* NoTruncation */ ? addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, `... ${types.length - i} more elided ...`) : factory.createTypeReferenceNode( + `... ${types.length - i} more ...`, + /*typeArguments*/ + void 0 + ) + ); const typeNode2 = typeToTypeNodeHelper(types[types.length - 1], context); if (typeNode2) { result.push(typeNode2); @@ -61023,7 +62903,7 @@ function createTypeChecker(host) { } } if (seenNames) { - const saveContextFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= 64 /* UseFullyQualifiedType */; seenNames.forEach((types2) => { if (!arrayIsHomogeneous(types2, ([a], [b]) => typesAreSameReference(a, b))) { @@ -61032,7 +62912,7 @@ function createTypeChecker(host) { } } }); - context.flags = saveContextFlags; + restoreFlags(); } return result; } @@ -61084,21 +62964,21 @@ function createTypeChecker(host) { } else { typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context)); } - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags &= ~256 /* SuppressAnyReturnType */; - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 177 /* Constructor */)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); } - context.flags = flags; + restoreFlags(); const returnTypeNode = serializeReturnTypeForSignature(context, signature); let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { - const flags2 = modifiersToFlags(modifiers); - modifiers = factory.createModifiersFromModifierFlags(flags2 | 64 /* Abstract */); + if (kind === 186 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + const flags = modifiersToFlags(modifiers); + modifiers = factory.createModifiersFromModifierFlags(flags | 64 /* Abstract */); } - const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 180 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 181 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 175 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -61110,25 +62990,25 @@ function createTypeChecker(host) { returnTypeNode, /*body*/ void 0 - ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 177 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 178 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 179 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 317 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 182 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 318 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 185 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 186 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 263 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -61138,7 +63018,7 @@ function createTypeChecker(host) { returnTypeNode, /*body*/ void 0 - ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 219 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -61147,7 +63027,7 @@ function createTypeChecker(host) { parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 220 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -61159,7 +63039,7 @@ function createTypeChecker(host) { if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocSignature */ && signature.declaration.parent.kind === 339 /* JSDocOverloadTag */) { + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 324 /* JSDocSignature */ && signature.declaration.parent.kind === 340 /* JSDocOverloadTag */) { const comment = getTextOfNode( signature.declaration.parent.parent, /*includeTrivia*/ @@ -61176,14 +63056,85 @@ function createTypeChecker(host) { cleanup == null ? void 0 : cleanup(); return node; } - function isNewScopeNode(node) { - return isFunctionLike(node) || isJSDocSignature(node) || isMappedTypeNode(node); - } - function getTypeParametersInScope(node) { - return isFunctionLike(node) || isJSDocSignature(node) ? getSignatureFromDeclaration(node).typeParameters : isConditionalTypeNode(node) ? getInferTypeParameters(node) : [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))]; - } - function getParametersInScope(node) { - return isFunctionLike(node) || isJSDocSignature(node) ? getSignatureFromDeclaration(node).parameters : void 0; + function createRecoveryBoundary(context) { + if (cancellationToken && cancellationToken.throwIfCancellationRequested) { + cancellationToken.throwIfCancellationRequested(); + } + let trackedSymbols; + let unreportedErrors; + let hadError = false; + const oldTracker = context.tracker; + const oldTrackedSymbols = context.trackedSymbols; + context.trackedSymbols = void 0; + const oldEncounteredError = context.encounteredError; + context.tracker = new SymbolTrackerImpl(context, { + ...oldTracker.inner, + reportCyclicStructureError() { + markError(() => oldTracker.reportCyclicStructureError()); + }, + reportInaccessibleThisError() { + markError(() => oldTracker.reportInaccessibleThisError()); + }, + reportInaccessibleUniqueSymbolError() { + markError(() => oldTracker.reportInaccessibleUniqueSymbolError()); + }, + reportLikelyUnsafeImportRequiredError(specifier) { + markError(() => oldTracker.reportLikelyUnsafeImportRequiredError(specifier)); + }, + reportNonSerializableProperty(name) { + markError(() => oldTracker.reportNonSerializableProperty(name)); + }, + reportPrivateInBaseOfClassExpression(propertyName) { + markError(() => oldTracker.reportPrivateInBaseOfClassExpression(propertyName)); + }, + trackSymbol(sym, decl, meaning) { + (trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]); + return false; + }, + moduleResolverHost: context.tracker.moduleResolverHost + }, context.tracker.moduleResolverHost); + return { + startRecoveryScope, + finalizeBoundary, + markError, + hadError: () => hadError + }; + function markError(unreportedError) { + hadError = true; + if (unreportedError) { + (unreportedErrors ?? (unreportedErrors = [])).push(unreportedError); + } + } + function startRecoveryScope() { + const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0; + const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0; + return () => { + hadError = false; + if (trackedSymbols) { + trackedSymbols.length = trackedSymbolsTop; + } + if (unreportedErrors) { + unreportedErrors.length = unreportedErrorsTop; + } + }; + } + function finalizeBoundary() { + context.tracker = oldTracker; + context.trackedSymbols = oldTrackedSymbols; + context.encounteredError = oldEncounteredError; + unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn()); + if (hadError) { + return false; + } + trackedSymbols == null ? void 0 : trackedSymbols.forEach( + ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol( + symbol, + enclosingDeclaration, + meaning + ) + ); + return true; + } } function enterNewScope(context, declaration, expandedParams, typeParameters, originalParameters, mapper) { const cleanupContext = cloneNodeBuilderContext(context); @@ -61253,9 +63204,9 @@ function createTypeChecker(host) { function bindPattern(p) { forEach(p.elements, (e) => { switch (e.kind) { - case 232 /* OmittedExpression */: + case 233 /* OmittedExpression */: return; - case 208 /* BindingElement */: + case 209 /* BindingElement */: return bindElement(e); default: return Debug.assertNever(e); @@ -61316,17 +63267,17 @@ function createTypeChecker(host) { } } function typeParameterToDeclarationWithConstraint(type, context, constraintNode) { - const savedContextFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags &= ~512 /* WriteTypeParametersInQualifiedName */; const modifiers = factory.createModifiersFromModifierFlags(getTypeParameterModifiers(type)); const name = typeParameterToName(type, context); const defaultParameter = getDefaultFromTypeParameter(type); const defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context); - context.flags = savedContextFlags; + restoreFlags(); return factory.createTypeParameterDeclaration(modifiers, name, constraintNode, defaultParameterNode); } function typeToTypeNodeHelperWithPossibleReusableTypeNode(type, typeNode, context) { - return typeNode && tryReuseExistingNonParameterTypeNode(context, typeNode, type) || typeToTypeNodeHelper(type, context); + return !canPossiblyExpandType(type, context) && typeNode && getTypeFromTypeNode2(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode) || typeToTypeNodeHelper(type, context); } function typeParameterToDeclaration(type, context, constraint = getConstraintOfTypeParameter(type)) { const constraintNode = constraint && typeToTypeNodeHelperWithPossibleReusableTypeNode(constraint, getConstraintDeclaration(type), context); @@ -61339,12 +63290,12 @@ function createTypeChecker(host) { return factory.createTypePredicateNode(assertsModifier, parameterName, typeNode); } function getEffectiveParameterDeclaration(parameterSymbol) { - const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); + const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 170 /* Parameter */); if (parameterDeclaration) { return parameterDeclaration; } if (!isTransientSymbol(parameterSymbol)) { - return getDeclarationOfKind(parameterSymbol, 341 /* JSDocParameterTag */); + return getDeclarationOfKind(parameterSymbol, 342 /* JSDocParameterTag */); } } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { @@ -61370,7 +63321,7 @@ function createTypeChecker(host) { return parameterNode; } function parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context) { - return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 167 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); function cloneBindingName(node) { return elideInitializerAndSetEmitFlags(node); function elideInitializerAndSetEmitFlags(node2) { @@ -61407,7 +63358,7 @@ function createTypeChecker(host) { if (!context.tracker.canTrackSymbol) return; const firstIdentifier = getFirstIdentifier(accessExpression); const name = resolveName( - firstIdentifier, + enclosingDeclaration, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nameNotFoundMessage*/ @@ -61417,6 +63368,19 @@ function createTypeChecker(host) { ); if (name) { context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); + } else { + const fallback = resolveName( + firstIdentifier, + firstIdentifier.escapedText, + 111551 /* Value */ | 1048576 /* ExportValue */, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + true + ); + if (fallback) { + context.tracker.trackSymbol(fallback, enclosingDeclaration, 111551 /* Value */); + } } } function lookupSymbolChain(symbol, context, meaning, yieldModuleSymbol) { @@ -61426,7 +63390,7 @@ function createTypeChecker(host) { function lookupSymbolChainWorker(symbol, context, meaning, yieldModuleSymbol) { let chain; const isTypeParameter = symbol.flags & 262144 /* TypeParameter */; - if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { + if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.internalFlags & 4 /* DoNotIncludeSymbolChain */)) { chain = Debug.checkDefined(getSymbolChain( symbol, meaning, @@ -61541,11 +63505,11 @@ function createTypeChecker(host) { return top; } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { - let file = getDeclarationOfKind(symbol, 307 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 308 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 307 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 308 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -61562,8 +63526,10 @@ function createTypeChecker(host) { } return getSourceFileOfNode(getNonAugmentationDeclaration(symbol)).fileName; } + const enclosingDeclaration = getOriginalNode(context.enclosingDeclaration); + const originalModuleSpecifier = canHaveModuleSpecifier(enclosingDeclaration) ? tryGetModuleSpecifierFromDeclaration(enclosingDeclaration) : void 0; const contextFile = context.enclosingFile; - const resolutionMode = overrideImportMode || (contextFile == null ? void 0 : contextFile.impliedNodeFormat); + const resolutionMode = overrideImportMode || originalModuleSpecifier && host.getModeForUsageLocation(contextFile, originalModuleSpecifier) || contextFile && host.getDefaultResolutionModeForFile(contextFile); const cacheKey = createModeAwareCacheKey(contextFile.path, resolutionMode); const links = getSymbolLinks(symbol); let specifier = links.specifierCache && links.specifierCache.get(cacheKey); @@ -61830,12 +63796,15 @@ function createTypeChecker(host) { } let firstChar = symbolName2.charCodeAt(0); if (isSingleOrDoubleQuote(firstChar) && some(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context)); + const specifier = getSpecifierForModuleSymbol(symbol2, context); + context.approximateLength += 2 + specifier.length; + return factory.createStringLiteral(specifier); } if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) { const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */); if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); identifier.symbol = symbol2; + context.approximateLength += 1 + symbolName2.length; return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier; } else { if (firstChar === 91 /* openBracket */) { @@ -61844,16 +63813,21 @@ function createTypeChecker(host) { } let expression; if (isSingleOrDoubleQuote(firstChar) && !(symbol2.flags & 8 /* EnumMember */)) { - expression = factory.createStringLiteral(stripQuotes(symbolName2).replace(/\\./g, (s) => s.substring(1)), firstChar === 39 /* singleQuote */); + const literalText = stripQuotes(symbolName2).replace(/\\./g, (s) => s.substring(1)); + context.approximateLength += literalText.length + 2; + expression = factory.createStringLiteral(literalText, firstChar === 39 /* singleQuote */); } else if ("" + +symbolName2 === symbolName2) { + context.approximateLength += symbolName2.length; expression = factory.createNumericLiteral(+symbolName2); } if (!expression) { const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */); if (typeParameterNodes) setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); identifier.symbol = symbol2; + context.approximateLength += symbolName2.length; expression = identifier; } + context.approximateLength += 2; return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression); } } @@ -61882,6 +63856,25 @@ function createTypeChecker(host) { ), "'"))); } function getPropertyNameNodeForSymbol(symbol, context) { + const hashPrivateName = getClonedHashPrivateName(symbol); + if (hashPrivateName) { + const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */; + if (!shouldEmitErroneousFieldName) { + return hashPrivateName; + } else { + let rawName2 = unescapeLeadingUnderscores(symbol.escapedName); + rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#"); + return createPropertyNameNodeForIdentifierOrLiteral( + rawName2, + getEmitScriptTarget(compilerOptions), + /*singleQuote*/ + false, + /*stringNamed*/ + true, + !!(symbol.flags & 8192 /* Method */) + ); + } + } const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); const isMethod = !!(symbol.flags & 8192 /* Method */); @@ -61946,81 +63939,82 @@ function createTypeChecker(host) { } return enclosingDeclaration; } + function serializeInferredTypeForDeclaration(symbol, context, type) { + if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === context.enclosingFile))) { + context.flags |= 1048576 /* AllowUniqueESSymbolType */; + } + const result = typeToTypeNodeHelper(type, context); + return result; + } function serializeTypeForDeclaration(context, declaration, type, symbol) { var _a; - const addUndefined = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration); - const enclosingDeclaration = context.enclosingDeclaration; - const oldFlags = context.flags; - if (declaration && hasInferredType(declaration) && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) { - syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, context); - } - context.flags |= -2147483648 /* NoSyntacticPrinter */; - if (enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */)) { - const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol); - if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) { - const existing = getNonlocalEffectiveTypeAnnotationNode(declWithExistingAnnotation); - const result2 = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type, declWithExistingAnnotation, addUndefined); - if (result2) { - context.flags = oldFlags; - return result2; - } + let result; + const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration); + const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]); + if (!canPossiblyExpandType(type, context) && decl) { + const restore = addSymbolTypeToContext(context, symbol, type); + if (isAccessor(decl)) { + result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context); + } else if (hasInferredType(decl) && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & 196608 /* RequiresWidening */)) { + result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context); } + restore(); } - if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) { - context.flags |= 1048576 /* AllowUniqueESSymbolType */; + if (!result) { + if (addUndefinedForParameter) { + type = getOptionalType(type); + } + result = serializeInferredTypeForDeclaration(symbol, context, type); } - const decl = declaration ?? symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]); - const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : void 0; - const result = expressionOrTypeToTypeNode(context, expr, type, addUndefined); - context.flags = oldFlags; - return result; + return result ?? factory.createKeywordTypeNode(133 /* AnyKeyword */); } function typeNodeIsEquivalentToType(annotatedDeclaration, type, typeFromTypeNode) { if (typeFromTypeNode === type) { return true; } - if (annotatedDeclaration && (isParameter(annotatedDeclaration) || isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) { + if (!annotatedDeclaration) { + return false; + } + if ((isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) { + return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode; + } + if (isParameter(annotatedDeclaration) && hasEffectiveQuestionToken(annotatedDeclaration)) { return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode; } return false; } function serializeReturnTypeForSignature(context, signature) { const suppressAny = context.flags & 256 /* SuppressAnyReturnType */; - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); if (suppressAny) context.flags &= ~256 /* SuppressAnyReturnType */; let returnTypeNode; const returnType = getReturnTypeOfSignature(signature); - if (returnType && !(suppressAny && isTypeAny(returnType))) { - if (signature.declaration && !(context.flags & -2147483648 /* NoSyntacticPrinter */)) { - syntacticNodeBuilder.serializeReturnTypeForSignature(signature.declaration, context); + if (!(suppressAny && isTypeAny(returnType))) { + if (signature.declaration && !nodeIsSynthesized(signature.declaration) && !canPossiblyExpandType(returnType, context)) { + const declarationSymbol = getSymbolOfDeclaration(signature.declaration); + const restore = addSymbolTypeToContext(context, declarationSymbol, returnType); + returnTypeNode = syntacticNodeBuilder.serializeReturnTypeForSignature(signature.declaration, declarationSymbol, context); + restore(); } - context.flags |= -2147483648 /* NoSyntacticPrinter */; - returnTypeNode = serializeReturnTypeForSignatureWorker(context, signature); - } else if (!suppressAny) { + if (!returnTypeNode) { + returnTypeNode = serializeInferredReturnTypeForSignature(context, signature, returnType); + } + } + if (!returnTypeNode && !suppressAny) { returnTypeNode = factory.createKeywordTypeNode(133 /* AnyKeyword */); } - context.flags = flags; + restoreFlags(); return returnTypeNode; } - function serializeReturnTypeForSignatureWorker(context, signature) { + function serializeInferredReturnTypeForSignature(context, signature, returnType) { + const oldSuppressReportInferenceFallback = context.suppressReportInferenceFallback; + context.suppressReportInferenceFallback = true; const typePredicate = getTypePredicateOfSignature(signature); - const type = getReturnTypeOfSignature(signature); - if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) { - const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration); - if (annotation && getTypeFromTypeNode2(context, annotation) === type) { - const result = tryReuseExistingTypeNodeHelper(context, annotation); - if (result) { - return result; - } - } - } - if (typePredicate) { - return typePredicateToTypePredicateNodeHelper(typePredicate, context); - } - const expr = signature.declaration && getPossibleTypeNodeReuseExpression(signature.declaration); - return expressionOrTypeToTypeNode(context, expr, type); + const returnTypeNode = typePredicate ? typePredicateToTypePredicateNodeHelper(context.mapper ? instantiateTypePredicate(typePredicate, context.mapper) : typePredicate, context) : typeToTypeNodeHelper(returnType, context); + context.suppressReportInferenceFallback = oldSuppressReportInferenceFallback; + return returnTypeNode; } - function trackExistingEntityName(node, context) { + function trackExistingEntityName(node, context, enclosingDeclaration = context.enclosingDeclaration) { let introducesError = false; const leftmost = getFirstIdentifier(node); if (isInJSFile(node) && (isExportsIdentifier(leftmost) || isModuleExportsAccessExpression(leftmost.parent) || isQualifiedName(leftmost.parent) && isModuleIdentifier(leftmost.parent.left) && isExportsIdentifier(leftmost.parent.right))) { @@ -62071,7 +64065,7 @@ function createTypeChecker(host) { if ( // Check for unusable parameters symbols symAtLocation === unknownSymbol || // If the symbol is not found, but was not found in the original scope either we probably have an error, don't reuse the node - symAtLocation === void 0 && sym !== void 0 || // If the symbol is found both in declaration scope and in current scope then it shoudl point to the same reference + symAtLocation === void 0 && sym !== void 0 || // If the symbol is found both in declaration scope and in current scope then it should point to the same reference symAtLocation && sym && !getSymbolIfSameReference(getExportSymbolOfValueSymbolIfExported(symAtLocation), sym) ) { if (symAtLocation !== unknownSymbol) { @@ -62079,6 +64073,8 @@ function createTypeChecker(host) { } introducesError = true; return { introducesError, node, sym }; + } else { + sym = symAtLocation; } } if (sym) { @@ -62090,7 +64086,7 @@ function createTypeChecker(host) { if (!(sym.flags & 262144 /* TypeParameter */) && // Type parameters are visible in the current context if they are are resolvable !isDeclarationName(node) && isSymbolAccessible( sym, - context.enclosingDeclaration, + enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ false @@ -62098,7 +64094,7 @@ function createTypeChecker(host) { context.tracker.reportInferenceFallback(node); introducesError = true; } else { - context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning); + context.tracker.trackSymbol(sym, enclosingDeclaration, meaning); } return { introducesError, node: attachSymbolToLeftmostIdentifier(node) }; } @@ -62116,10 +64112,7 @@ function createTypeChecker(host) { /*context*/ void 0 ); - if (updated !== node2) { - setTextRange2(context, updated, node2); - } - return updated; + return setTextRange2(context, updated, node2); } } function serializeTypeName(context, node, isTypeOf, typeArguments) { @@ -62142,6 +64135,15 @@ function createTypeChecker(host) { return symbolToTypeNode(resolvedSymbol, context, meaning, typeArguments); } function canReuseTypeNode(context, existing) { + const type = getTypeFromTypeNode2( + context, + existing, + /*noMappedTypes*/ + true + ); + if (!type) { + return false; + } if (isInJSFile(existing)) { if (isLiteralImportTypeNode(existing)) { void getTypeFromImportTypeNode(existing); @@ -62151,29 +64153,16 @@ function createTypeChecker(host) { !(length(existing.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol)))); } } - if (isThisTypeNode(existing)) { - if (context.mapper === void 0) return true; - const type = getTypeFromTypeNode2( - context, - existing, - /*noMappedTypes*/ - true - ); - return !!type; - } if (isTypeReferenceNode(existing)) { if (isConstTypeReference(existing)) return false; - const type = getTypeFromTypeReference(existing); const symbol = getNodeLinks(existing).resolvedSymbol; if (!symbol) return false; if (symbol.flags & 262144 /* TypeParameter */) { - const type2 = getDeclaredTypeOfSymbol(symbol); - if (context.mapper && getMappedType(type2, context.mapper) !== type2) { - return false; - } + const declaredType = getDeclaredTypeOfSymbol(symbol); + return !(context.mapper && getMappedType(declaredType, context.mapper) !== declaredType); } if (isInJSDoc(existing)) { - return existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) && !getIntendedTypeFromJSDocTypeReference(existing) && symbol.flags & 788968 /* Type */; + return existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) && !getIntendedTypeFromJSDocTypeReference(existing) && !!(symbol.flags & 788968 /* Type */); } } if (isTypeOperatorNode(existing) && existing.operator === 158 /* UniqueKeyword */ && existing.type.kind === 155 /* SymbolKeyword */) { @@ -62182,520 +64171,27 @@ function createTypeChecker(host) { } return true; } - function serializeExistingTypeNode(context, typeNode) { + function serializeExistingTypeNode(context, typeNode, addUndefined) { const type = getTypeFromTypeNode2(context, typeNode); - return typeToTypeNodeHelper(type, context); - } - function tryReuseExistingTypeNodeHelper(context, existing) { - if (cancellationToken && cancellationToken.throwIfCancellationRequested) { - cancellationToken.throwIfCancellationRequested(); - } - let hadError = false; - const { finalizeBoundary, startRecoveryScope } = createRecoveryBoundary(); - const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode); - if (!finalizeBoundary()) { - return void 0; - } - context.approximateLength += existing.end - existing.pos; - return transformed; - function visitExistingNodeTreeSymbols(node) { - if (hadError) return node; - const recover = startRecoveryScope(); - const onExitNewScope = isNewScopeNode(node) ? onEnterNewScope(node) : void 0; - const result = visitExistingNodeTreeSymbolsWorker(node); - onExitNewScope == null ? void 0 : onExitNewScope(); - if (hadError) { - if (isTypeNode(node) && !isTypePredicateNode(node)) { - recover(); - return serializeExistingTypeNode(context, node); - } - return node; - } - return result ? setTextRange2(context, result, node) : void 0; - } - function createRecoveryBoundary() { - let trackedSymbols; - let unreportedErrors; - const oldTracker = context.tracker; - const oldTrackedSymbols = context.trackedSymbols; - context.trackedSymbols = void 0; - const oldEncounteredError = context.encounteredError; - context.tracker = new SymbolTrackerImpl(context, { - ...oldTracker.inner, - reportCyclicStructureError() { - markError(() => oldTracker.reportCyclicStructureError()); - }, - reportInaccessibleThisError() { - markError(() => oldTracker.reportInaccessibleThisError()); - }, - reportInaccessibleUniqueSymbolError() { - markError(() => oldTracker.reportInaccessibleUniqueSymbolError()); - }, - reportLikelyUnsafeImportRequiredError(specifier) { - markError(() => oldTracker.reportLikelyUnsafeImportRequiredError(specifier)); - }, - reportNonSerializableProperty(name) { - markError(() => oldTracker.reportNonSerializableProperty(name)); - }, - trackSymbol(sym, decl, meaning) { - (trackedSymbols ?? (trackedSymbols = [])).push([sym, decl, meaning]); - return false; - }, - moduleResolverHost: context.tracker.moduleResolverHost - }, context.tracker.moduleResolverHost); - return { - startRecoveryScope: startRecoveryScope2, - finalizeBoundary: finalizeBoundary2 - }; - function markError(unreportedError) { - hadError = true; - (unreportedErrors ?? (unreportedErrors = [])).push(unreportedError); - } - function startRecoveryScope2() { - const trackedSymbolsTop = (trackedSymbols == null ? void 0 : trackedSymbols.length) ?? 0; - const unreportedErrorsTop = (unreportedErrors == null ? void 0 : unreportedErrors.length) ?? 0; - return () => { - hadError = false; - if (trackedSymbols) { - trackedSymbols.length = trackedSymbolsTop; - } - if (unreportedErrors) { - unreportedErrors.length = unreportedErrorsTop; - } - }; - } - function finalizeBoundary2() { - context.tracker = oldTracker; - context.trackedSymbols = oldTrackedSymbols; - context.encounteredError = oldEncounteredError; - unreportedErrors == null ? void 0 : unreportedErrors.forEach((fn) => fn()); - if (hadError) { - return false; - } - trackedSymbols == null ? void 0 : trackedSymbols.forEach( - ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol( - symbol, - enclosingDeclaration, - meaning - ) - ); - return true; - } - } - function onEnterNewScope(node) { - return enterNewScope(context, node, getParametersInScope(node), getTypeParametersInScope(node)); - } - function tryVisitSimpleTypeNode(node) { - const innerNode = skipTypeParentheses(node); - switch (innerNode.kind) { - case 183 /* TypeReference */: - return tryVisitTypeReference(innerNode); - case 186 /* TypeQuery */: - return tryVisitTypeQuery(innerNode); - case 199 /* IndexedAccessType */: - return tryVisitIndexedAccess(innerNode); - case 198 /* TypeOperator */: - const typeOperatorNode = innerNode; - if (typeOperatorNode.operator === 143 /* KeyOfKeyword */) { - return tryVisitKeyOf(typeOperatorNode); - } - } - return visitNode(node, visitExistingNodeTreeSymbols, isTypeNode); - } - function tryVisitIndexedAccess(node) { - const resultObjectType = tryVisitSimpleTypeNode(node.objectType); - if (resultObjectType === void 0) { - return void 0; - } - return factory.updateIndexedAccessTypeNode(node, resultObjectType, visitNode(node.indexType, visitExistingNodeTreeSymbols, isTypeNode)); - } - function tryVisitKeyOf(node) { - Debug.assertEqual(node.operator, 143 /* KeyOfKeyword */); - const type = tryVisitSimpleTypeNode(node.type); - if (type === void 0) { - return void 0; - } - return factory.updateTypeOperatorNode(node, type); - } - function tryVisitTypeQuery(node) { - const { introducesError, node: exprName } = trackExistingEntityName(node.exprName, context); - if (!introducesError) { - return factory.updateTypeQueryNode( - node, - exprName, - visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode) - ); - } - const serializedName = serializeTypeName( - context, - node.exprName, - /*isTypeOf*/ - true - ); - if (serializedName) { - return setTextRange2(context, serializedName, node.exprName); - } - } - function tryVisitTypeReference(node) { - if (canReuseTypeNode(context, node)) { - const { introducesError, node: newName } = trackExistingEntityName(node.typeName, context); - const typeArguments = visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode); - if (!introducesError) { - const updated = factory.updateTypeReferenceNode( - node, - newName, - typeArguments - ); - return setTextRange2(context, updated, node); - } else { - const serializedName = serializeTypeName( - context, - node.typeName, - /*isTypeOf*/ - false, - typeArguments - ); - if (serializedName) { - return setTextRange2(context, serializedName, node.typeName); - } - } - } - } - function visitExistingNodeTreeSymbolsWorker(node) { - if (isJSDocTypeExpression(node)) { - return visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode); - } - if (isJSDocAllType(node) || node.kind === 319 /* JSDocNamepathType */) { - return factory.createKeywordTypeNode(133 /* AnyKeyword */); - } - if (isJSDocUnknownType(node)) { - return factory.createKeywordTypeNode(159 /* UnknownKeyword */); - } - if (isJSDocNullableType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); - } - if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); - } - if (isJSDocNonNullableType(node)) { - return visitNode(node.type, visitExistingNodeTreeSymbols); - } - if (isJSDocVariadicType(node)) { - return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); - } - if (isJSDocTypeLiteral(node)) { - return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => { - const name = visitNode(isIdentifier(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier); - const typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode2(context, node), name.escapedText); - const overrideTypeNode = typeViaParent && t.typeExpression && getTypeFromTypeNode2(context, t.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : void 0; - return factory.createPropertySignature( - /*modifiers*/ - void 0, - name, - t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(58 /* QuestionToken */) : void 0, - overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - })); - } - if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { - return setOriginalNode(factory.createKeywordTypeNode(133 /* AnyKeyword */), node); - } - if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { - return factory.createTypeLiteralNode([factory.createIndexSignature( - /*modifiers*/ - void 0, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "x", - /*questionToken*/ - void 0, - visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode) - )], - visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode) - )]); - } - if (isJSDocFunctionType(node)) { - if (isJSDocConstructSignature(node)) { - let newTypeNode; - return factory.createConstructorTypeNode( - /*modifiers*/ - void 0, - visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), - mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration( - /*modifiers*/ - void 0, - getEffectiveDotDotDotForParameter(p), - setTextRange2(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i)), p), - factory.cloneNode(p.questionToken), - visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode), - /*initializer*/ - void 0 - )), - visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - } else { - return factory.createFunctionTypeNode( - visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), - map(node.parameters, (p, i) => factory.createParameterDeclaration( - /*modifiers*/ - void 0, - getEffectiveDotDotDotForParameter(p), - setTextRange2(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i)), p), - factory.cloneNode(p.questionToken), - visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode), - /*initializer*/ - void 0 - )), - visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - } - } - if (isThisTypeNode(node)) { - if (canReuseTypeNode(context, node)) { - return node; - } - hadError = true; - return node; - } - if (isTypeParameterDeclaration(node)) { - return factory.updateTypeParameterDeclaration( - node, - visitNodes2(node.modifiers, visitExistingNodeTreeSymbols, isModifier), - setTextRange2(context, typeParameterToName(getDeclaredTypeOfSymbol(getSymbolOfDeclaration(node)), context), node), - visitNode(node.constraint, visitExistingNodeTreeSymbols, isTypeNode), - visitNode(node.default, visitExistingNodeTreeSymbols, isTypeNode) - ); - } - if (isIndexedAccessTypeNode(node)) { - const result = tryVisitIndexedAccess(node); - if (!result) { - hadError = true; - return node; - } - return result; - } - if (isTypeReferenceNode(node)) { - const result = tryVisitTypeReference(node); - if (result) { - return result; - } - hadError = true; - return node; - } - if (isLiteralImportTypeNode(node)) { - const nodeSymbol = getNodeLinks(node).resolvedSymbol; - if (isInJSDoc(node) && nodeSymbol && // The import type resolved using jsdoc fallback logic - (!node.isTypeOf && !(nodeSymbol.flags & 788968 /* Type */) || // The import type had type arguments autofilled by js fallback logic - !(length(node.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol))))) { - return setTextRange2(context, typeToTypeNodeHelper(getTypeFromTypeNode2(context, node), context), node); - } - return factory.updateImportTypeNode( - node, - factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), - visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes), - visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName), - visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), - node.isTypeOf - ); - } - if (isNamedDeclaration(node) && node.name.kind === 167 /* ComputedPropertyName */ && !isLateBindableName(node.name)) { - if (!(context.flags & 1 /* AllowUnresolvedNames */ && hasDynamicName(node) && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & 1 /* Any */)) { - return void 0; - } - } - if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) { - let visited = visitEachChild2(node, visitExistingNodeTreeSymbols); - if (visited === node) { - visited = setTextRange2(context, factory.cloneNode(node), node); - } - visited.type = factory.createKeywordTypeNode(133 /* AnyKeyword */); - if (isParameter(node)) { - visited.modifiers = void 0; - } - return visited; - } - if (isTypeQueryNode(node)) { - const result = tryVisitTypeQuery(node); - if (!result) { - hadError = true; - return node; - } - return result; - } - if (isComputedPropertyName(node) && isEntityNameExpression(node.expression)) { - const { node: result, introducesError } = trackExistingEntityName(node.expression, context); - if (!introducesError) { - return factory.updateComputedPropertyName(node, result); - } else { - const type = getWidenedType(getRegularTypeOfExpression(node.expression)); - const computedPropertyNameType = typeToTypeNodeHelper(type, context); - let literal; - if (isLiteralTypeNode(computedPropertyNameType)) { - literal = computedPropertyNameType.literal; - } else { - const evaluated = evaluateEntityNameExpression(node.expression); - const literalNode = typeof evaluated.value === "string" ? factory.createStringLiteral( - evaluated.value, - /*isSingleQuote*/ - void 0 - ) : typeof evaluated.value === "number" ? factory.createNumericLiteral( - evaluated.value, - /*numericLiteralFlags*/ - 0 - ) : void 0; - if (!literalNode) { - if (isImportTypeNode(computedPropertyNameType)) { - trackComputedName(node.expression, context.enclosingDeclaration, context); - } - return node; - } - literal = literalNode; - } - if (literal.kind === 11 /* StringLiteral */ && isIdentifierText(literal.text, getEmitScriptTarget(compilerOptions))) { - return factory.createIdentifier(literal.text); - } - if (literal.kind === 9 /* NumericLiteral */ && !literal.text.startsWith("-")) { - return literal; - } - return factory.updateComputedPropertyName(node, literal); - } - } - if (isTypePredicateNode(node)) { - let parameterName; - if (isIdentifier(node.parameterName)) { - const { node: result, introducesError } = trackExistingEntityName(node.parameterName, context); - hadError = hadError || introducesError; - parameterName = result; - } else { - parameterName = factory.cloneNode(node.parameterName); - } - return factory.updateTypePredicateNode(node, factory.cloneNode(node.assertsModifier), parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); - } - if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) { - const visited = visitEachChild2(node, visitExistingNodeTreeSymbols); - const clone2 = setTextRange2(context, visited === node ? factory.cloneNode(node) : visited, node); - const flags = getEmitFlags(clone2); - setEmitFlags(clone2, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */)); - return clone2; - } - if (isStringLiteral(node) && !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */) && !node.singleQuote) { - const clone2 = factory.cloneNode(node); - clone2.singleQuote = true; - return clone2; - } - if (isConditionalTypeNode(node)) { - const checkType = visitNode(node.checkType, visitExistingNodeTreeSymbols, isTypeNode); - const disposeScope = onEnterNewScope(node); - const extendType = visitNode(node.extendsType, visitExistingNodeTreeSymbols, isTypeNode); - const trueType2 = visitNode(node.trueType, visitExistingNodeTreeSymbols, isTypeNode); - disposeScope(); - const falseType2 = visitNode(node.falseType, visitExistingNodeTreeSymbols, isTypeNode); - return factory.updateConditionalTypeNode( - node, - checkType, - extendType, - trueType2, - falseType2 - ); - } - if (isTypeOperatorNode(node)) { - if (node.operator === 158 /* UniqueKeyword */ && node.type.kind === 155 /* SymbolKeyword */) { - if (!canReuseTypeNode(context, node)) { - hadError = true; - return node; - } - } else if (node.operator === 143 /* KeyOfKeyword */) { - const result = tryVisitKeyOf(node); - if (!result) { - hadError = true; - return node; - } - return result; - } - } - return visitEachChild2(node, visitExistingNodeTreeSymbols); - function visitEachChild2(node2, visitor) { - const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2); - return visitEachChild( - node2, - visitor, - /*context*/ - void 0, - nonlocalNode ? visitNodesWithoutCopyingPositions : void 0 - ); - } - function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) { - let result = visitNodes2(nodes, visitor, test, start, count); - if (result) { - if (result.pos !== -1 || result.end !== -1) { - if (result === nodes) { - result = factory.createNodeArray(nodes, nodes.hasTrailingComma); - } - setTextRangePosEnd(result, -1, -1); - } - } - return result; - } - function getEffectiveDotDotDotForParameter(p) { - return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0); - } - function getNameForJSDocFunctionParameter(p, index) { - return p.name && isIdentifier(p.name) && p.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index}`; - } - function rewriteModuleSpecifier(parent2, lit) { - if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) { - let name = lit.text; - const nodeSymbol = getNodeLinks(node).resolvedSymbol; - const meaning = parent2.isTypeOf ? 111551 /* Value */ : 788968 /* Type */; - const parentSymbol = nodeSymbol && isSymbolAccessible( - nodeSymbol, - context.enclosingDeclaration, - meaning, - /*shouldComputeAliasesToMakeVisible*/ - false - ).accessibility === 0 /* Accessible */ && lookupSymbolChain( - nodeSymbol, - context, - meaning, - /*yieldModuleSymbol*/ - true - )[0]; - if (parentSymbol && isExternalModuleSymbol(parentSymbol)) { - name = getSpecifierForModuleSymbol(parentSymbol, context); - } else { - const targetFile = getExternalModuleFileFromDeclaration(parent2); - if (targetFile) { - name = getSpecifierForModuleSymbol(targetFile.symbol, context); - } - } - if (name.includes("/node_modules/")) { - context.encounteredError = true; - if (context.tracker.reportLikelyUnsafeImportRequiredError) { - context.tracker.reportLikelyUnsafeImportRequiredError(name); - } - } - if (name !== lit.text) { - return setOriginalNode(factory.createStringLiteral(name), lit); - } - } - return visitNode(lit, visitExistingNodeTreeSymbols, isStringLiteral); + if (addUndefined && !someType(type, (t) => !!(t.flags & 32768 /* Undefined */)) && canReuseTypeNode(context, typeNode)) { + const clone2 = syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode); + if (clone2) { + return factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); } } + return typeToTypeNodeHelper(type, context); } function symbolTableToDeclarationStatements(symbolTable, context) { var _a; const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 174 /* MethodDeclaration */, + 175 /* MethodDeclaration */, /*useAccessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 173 /* MethodSignature */, + 174 /* MethodSignature */, /*useAccessors*/ false ); @@ -62853,9 +64349,10 @@ function createTypeChecker(host) { if (index >= 0) { const exportDecl = statements[index]; const replacements = mapDefined(exportDecl.exportClause.elements, (e) => { - if (!e.propertyName) { + if (!e.propertyName && e.name.kind !== 11 /* StringLiteral */) { + const name = e.name; const indices = indicesOf(statements); - const associatedIndices = filter(indices, (i) => nodeHasName(statements[i], e.name)); + const associatedIndices = filter(indices, (i) => nodeHasName(statements[i], name)); if (length(associatedIndices) && every(associatedIndices, (i) => canHaveExportModifier(statements[i]))) { for (const index2 of associatedIndices) { statements[index2] = addExportModifier(statements[index2]); @@ -62904,14 +64401,28 @@ function createTypeChecker(host) { if (!suppressNewPrivateContext) { deferredPrivatesStack.push(/* @__PURE__ */ new Map()); } - symbolTable2.forEach((symbol) => { + let i = 0; + const symbols = Array.from(symbolTable2.values()); + for (const symbol of symbols) { + i++; + if (checkTruncationLengthIfExpanding(context) && i + 2 < symbolTable2.size - 1) { + context.out.truncated = true; + results.push(createTruncationStatement(`... (${symbolTable2.size - i} more ...)`)); + serializeSymbol( + symbols[symbols.length - 1], + /*isPrivate*/ + false, + !!propertyAsAlias + ); + break; + } serializeSymbol( symbol, /*isPrivate*/ false, !!propertyAsAlias ); - }); + } if (!suppressNewPrivateContext) { deferredPrivatesStack[deferredPrivatesStack.length - 1].forEach((symbol) => { serializeSymbol( @@ -62934,12 +64445,14 @@ function createTypeChecker(host) { const skipMembershipCheck = !isPrivate; if (skipMembershipCheck || !!length(symbol.declarations) && some(symbol.declarations, (d) => !!findAncestor(d, (n) => n === enclosingDeclaration))) { const scopeCleanup = cloneNodeBuilderContext(context); + context.tracker.pushErrorFallbackNode(find(symbol.declarations, (d) => getSourceFileOfNode(d) === context.enclosingFile)); serializeSymbolWorker(symbol, isPrivate, propertyAsAlias); + context.tracker.popErrorFallbackNode(); scopeCleanup(); } } function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) { - var _a2, _b, _c, _d, _e, _f; + var _a2, _b, _c, _d, _e, _f, _g; const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName); const isDefault = escapedSymbolName === "default" /* Default */; if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) { @@ -62989,6 +64502,7 @@ function createTypeChecker(host) { const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression); if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right; + context.approximateLength += 12 + (((_g = alias == null ? void 0 : alias.escapedText) == null ? void 0 : _g.length) ?? 0); addResult( factory.createExportDeclaration( /*modifiers*/ @@ -63028,8 +64542,10 @@ function createTypeChecker(host) { ), textRange ); + context.approximateLength += 7 + name.length; addResult(statement, name !== localName ? modifierFlags & ~32 /* Export */ : modifierFlags); if (name !== localName && !isPrivate) { + context.approximateLength += 16 + name.length + localName.length; addResult( factory.createExportDeclaration( /*modifiers*/ @@ -63079,27 +64595,33 @@ function createTypeChecker(host) { for (const node of symbol.declarations) { const resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier); if (!resolvedModule) continue; + const isTypeOnly = node.isTypeOnly; + const specifier = getSpecifierForModuleSymbol(resolvedModule, context); + context.approximateLength += 17 + specifier.length; addResult(factory.createExportDeclaration( /*modifiers*/ void 0, - /*isTypeOnly*/ - node.isTypeOnly, + isTypeOnly, /*exportClause*/ void 0, - factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context)) + factory.createStringLiteral(specifier) ), 0 /* None */); } } } if (needsPostExportDefault) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName2); + context.approximateLength += 16 + internalSymbolName.length; addResult(factory.createExportAssignment( /*modifiers*/ void 0, /*isExportEquals*/ false, - factory.createIdentifier(getInternalSymbolName(symbol, symbolName2)) + factory.createIdentifier(internalSymbolName) ), 0 /* None */); } else if (needsExportDeclaration) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName2); + context.approximateLength += 22 + symbolName2.length + internalSymbolName.length; addResult( factory.createExportDeclaration( /*modifiers*/ @@ -63109,7 +64631,7 @@ function createTypeChecker(host) { factory.createNamedExports([factory.createExportSpecifier( /*isTypeOnly*/ false, - getInternalSymbolName(symbol, symbolName2), + internalSymbolName, symbolName2 )]) ), @@ -63129,6 +64651,7 @@ function createTypeChecker(host) { } function addResult(node, additionalModifierFlags) { if (canHaveModifiers(node)) { + const oldModifierFlags = getEffectiveModifierFlags(node); let newModifierFlags = 0 /* None */; const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration); if (additionalModifierFlags & 32 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { @@ -63141,8 +64664,9 @@ function createTypeChecker(host) { newModifierFlags |= 2048 /* Default */; } if (newModifierFlags) { - node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); + node = factory.replaceModifiers(node, newModifierFlags | oldModifierFlags); } + context.approximateLength += modifiersLength(newModifierFlags | oldModifierFlags); } results.push(node); } @@ -63153,23 +64677,19 @@ function createTypeChecker(host) { const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context)); const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias); const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); - const oldFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= 8388608 /* InTypeAlias */; const oldEnclosingDecl = context.enclosingDeclaration; context.enclosingDeclaration = jsdocAliasDecl; - const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && tryReuseExistingNonParameterTypeNode( - context, - jsdocAliasDecl.typeExpression.type, - aliasType, - /*host*/ - void 0 - ) || typeToTypeNodeHelper(aliasType, context); + const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && syntacticNodeBuilder.tryReuseExistingTypeNode(context, jsdocAliasDecl.typeExpression.type) || typeToTypeNodeHelper(aliasType, context); + const internalSymbolName = getInternalSymbolName(symbol, symbolName2); + context.approximateLength += 8 + ((commentText == null ? void 0 : commentText.length) ?? 0) + internalSymbolName.length; addResult( setSyntheticLeadingComments( factory.createTypeAliasDeclaration( /*modifiers*/ void 0, - getInternalSymbolName(symbol, symbolName2), + internalSymbolName, typeParamDecls, typeNode ), @@ -63177,25 +64697,32 @@ function createTypeChecker(host) { ), modifierFlags ); - context.flags = oldFlags; + restoreFlags(); context.enclosingDeclaration = oldEnclosingDecl; } function serializeInterface(symbol, symbolName2, modifierFlags) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName2); + context.approximateLength += 14 + internalSymbolName.length; const interfaceType = getDeclaredTypeOfClassOrInterface(symbol); const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); const typeParamDecls = map(localParams, (p) => typeParameterToDeclaration(p, context)); const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; - const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); + const members = serializePropertySymbolsForClassOrInterface( + getPropertiesOfType(interfaceType), + /*isClass*/ + false, + baseType + ); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 180 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 181 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult( factory.createInterfaceDeclaration( /*modifiers*/ void 0, - getInternalSymbolName(symbol, symbolName2), + internalSymbolName, typeParamDecls, heritageClauses, [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] @@ -63203,6 +64730,57 @@ function createTypeChecker(host) { modifierFlags ); } + function serializePropertySymbolsForClassOrInterface(props, isClass, baseType, isStatic2) { + const elements = []; + let i = 0; + for (const prop of props) { + i++; + if (checkTruncationLengthIfExpanding(context) && i + 2 < props.length - 1) { + context.out.truncated = true; + const placeholder = createTruncationProperty(`... ${props.length - i} more ... `, isClass); + elements.push(placeholder); + const result2 = isClass ? serializePropertySymbolForClass(props[props.length - 1], isStatic2, baseType) : serializePropertySymbolForInterface(props[props.length - 1], baseType); + if (isArray(result2)) { + elements.push(...result2); + } else { + elements.push(result2); + } + break; + } + context.approximateLength += 1; + const result = isClass ? serializePropertySymbolForClass(prop, isStatic2, baseType) : serializePropertySymbolForInterface(prop, baseType); + if (isArray(result)) { + elements.push(...result); + } else { + elements.push(result); + } + } + return elements; + } + function createTruncationProperty(dotDotDotText, isClass) { + if (context.flags & 1 /* NoTruncation */) { + return addSyntheticLeadingComment(factory.createNotEmittedTypeElement(), 3 /* MultiLineCommentTrivia */, dotDotDotText); + } + return isClass ? factory.createPropertyDeclaration( + /*modifiers*/ + void 0, + dotDotDotText, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : factory.createPropertySignature( + /*modifiers*/ + void 0, + dotDotDotText, + /*questionToken*/ + void 0, + /*type*/ + void 0 + ); + } function getNamespaceMembersForSerialization(symbol) { let exports2 = arrayFrom(getExportsOfSymbol(symbol).values()); const merged = getMergedSymbol(symbol); @@ -63222,11 +64800,27 @@ function createTypeChecker(host) { } function serializeModule(symbol, symbolName2, modifierFlags) { const members = getNamespaceMembersForSerialization(symbol); - const locationMap = arrayToMultiMap(members, (m) => m.parent && m.parent === symbol ? "real" : "merged"); + const expanding = isExpanding(context); + const locationMap = arrayToMultiMap(members, (m) => m.parent && m.parent === symbol || expanding ? "real" : "merged"); const realMembers = locationMap.get("real") || emptyArray; const mergedMembers = locationMap.get("merged") || emptyArray; - if (length(realMembers)) { - const localName = getInternalSymbolName(symbol, symbolName2); + if (length(realMembers) || expanding) { + let localName; + if (expanding) { + const oldFlags = context.flags; + context.flags |= 512 /* WriteTypeParametersInQualifiedName */ | 2 /* UseOnlyExternalAliasing */; + localName = symbolToNode( + symbol, + context, + /*meaning*/ + -1 /* All */ + ); + context.flags = oldFlags; + } else { + const localText = getInternalSymbolName(symbol, symbolName2); + localName = factory.createIdentifier(localText); + context.approximateLength += localText.length; + } serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); } if (length(mergedMembers)) { @@ -63274,17 +64868,51 @@ function createTypeChecker(host) { } } function serializeEnum(symbol, symbolName2, modifierFlags) { + const internalSymbolName = getInternalSymbolName(symbol, symbolName2); + context.approximateLength += 9 + internalSymbolName.length; + const members = []; + const memberProps = filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)); + let i = 0; + for (const p of memberProps) { + i++; + if (checkTruncationLengthIfExpanding(context) && i + 2 < memberProps.length - 1) { + context.out.truncated = true; + members.push(factory.createEnumMember(` ... ${memberProps.length - i} more ... `)); + const last2 = memberProps[memberProps.length - 1]; + const initializedValue = last2.declarations && last2.declarations[0] && isEnumMember(last2.declarations[0]) ? getConstantValue2(last2.declarations[0]) : void 0; + const initializer2 = initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue); + const memberName2 = unescapeLeadingUnderscores(last2.escapedName); + const member2 = factory.createEnumMember( + memberName2, + initializer2 + ); + members.push(member2); + break; + } + const memberDecl = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? p.declarations[0] : void 0; + let initializer; + let initializerLength; + if (isExpanding(context) && memberDecl && memberDecl.initializer) { + initializer = getSynthesizedDeepClone(memberDecl.initializer); + initializerLength = memberDecl.initializer.end - memberDecl.initializer.pos; + } else { + const initializedValue = memberDecl && getConstantValue2(memberDecl); + initializer = initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue); + initializerLength = (initializer == null ? void 0 : initializer.text.length) ?? 0; + } + const memberName = unescapeLeadingUnderscores(p.escapedName); + context.approximateLength += 4 + memberName.length + initializerLength; + const member = factory.createEnumMember( + memberName, + initializer + ); + members.push(member); + } addResult( factory.createEnumDeclaration( factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 4096 /* Const */ : 0), - getInternalSymbolName(symbol, symbolName2), - map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { - const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; - return factory.createEnumMember( - unescapeLeadingUnderscores(p.escapedName), - initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue) - ); - }) + internalSymbolName, + members ), modifierFlags ); @@ -63292,20 +64920,28 @@ function createTypeChecker(host) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName) }); + context.approximateLength += 1; + const decl = signatureToSignatureDeclarationHelper(sig, 263 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName) }); addResult(setTextRange2(context, decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { const props = filter(getPropertiesOfType(type), isNamespaceMember); + context.approximateLength += localName.length; serializeAsNamespaceDeclaration( props, - localName, + factory.createIdentifier(localName), modifierFlags, /*suppressNewPrivateContext*/ true ); } } + function createTruncationStatement(dotDotDotText) { + if (context.flags & 1 /* NoTruncation */) { + return addSyntheticLeadingComment(factory.createEmptyStatement(), 3 /* MultiLineCommentTrivia */, dotDotDotText); + } + return factory.createExpressionStatement(factory.createIdentifier(dotDotDotText)); + } function getSignatureTextRangeLocation(signature) { if (signature.declaration && signature.declaration.parent) { if (isBinaryExpression(signature.declaration.parent) && getAssignmentDeclarationKind(signature.declaration.parent) === 5 /* Property */) { @@ -63318,15 +64954,18 @@ function createTypeChecker(host) { return signature.declaration; } function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) { + const nodeFlags = isIdentifier(localName) ? 32 /* Namespace */ : 0 /* None */; + const expanding = isExpanding(context); if (length(props)) { - const localVsRemoteMap = arrayToMultiMap(props, (p) => !length(p.declarations) || some(p.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)) ? "local" : "remote"); + context.approximateLength += 14; + const localVsRemoteMap = arrayToMultiMap(props, (p) => !length(p.declarations) || some(p.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)) || expanding ? "local" : "remote"); const localProps = localVsRemoteMap.get("local") || emptyArray; let fakespace = parseNodeFactory.createModuleDeclaration( /*modifiers*/ void 0, - factory.createIdentifier(localName), + localName, factory.createModuleBlock([]), - 32 /* Namespace */ + nodeFlags ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -63368,6 +65007,18 @@ function createTypeChecker(host) { factory.createModuleBlock(exportModifierStripped) ); addResult(fakespace, modifierFlags); + } else if (expanding) { + context.approximateLength += 14; + addResult( + factory.createModuleDeclaration( + /*modifiers*/ + void 0, + localName, + factory.createModuleBlock([]), + nodeFlags + ), + modifierFlags + ); } } function isNamespaceMember(p) { @@ -63396,7 +65047,7 @@ function createTypeChecker(host) { } return cleanup(factory.createExpressionWithTypeArguments( expr, - map(e.typeArguments, (a) => tryReuseExistingNonParameterTypeNode(context, a, getTypeFromTypeNode2(context, a)) || typeToTypeNodeHelper(getTypeFromTypeNode2(context, a), context)) + map(e.typeArguments, (a) => syntacticNodeBuilder.tryReuseExistingTypeNode(context, a) || typeToTypeNodeHelper(getTypeFromTypeNode2(context, a), context)) )); function cleanup(result2) { context.enclosingDeclaration = oldEnclosing; @@ -63410,11 +65061,13 @@ function createTypeChecker(host) { } function serializeAsClass(symbol, localName, modifierFlags) { var _a2, _b; + context.approximateLength += 9 + localName.length; const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike); const oldEnclosing = context.enclosingDeclaration; context.enclosingDeclaration = originalDecl || oldEnclosing; const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); const typeParamDecls = map(localParams, (p) => typeParameterToDeclaration(p, context)); + forEach(localParams, (p) => context.approximateLength += symbolName(p.symbol).length); const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol)); const baseTypes = getBaseTypes(classType); const originalImplements = originalDecl && getEffectiveImplementsTypeNodes(originalDecl); @@ -63422,20 +65075,22 @@ function createTypeChecker(host) { const staticType = getTypeOfSymbol(symbol); const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration); const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType; + context.approximateLength += (length(baseTypes) ? 8 : 0) + (length(implementsExpressions) ? 11 : 0); const heritageClauses = [ ...!length(baseTypes) ? [] : [factory.createHeritageClause(96 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119 /* ImplementsKeyword */, implementsExpressions)] ]; const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); - const publicSymbolProps = filter(symbolProps, (s) => { - const valueDecl = s.valueDeclaration; - return !!valueDecl && !(isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name)); - }); - const hasPrivateIdentifier = some(symbolProps, (s) => { - const valueDecl = s.valueDeclaration; - return !!valueDecl && isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name); - }); - const privateProperties = hasPrivateIdentifier ? [factory.createPropertyDeclaration( + const publicSymbolProps = filter(symbolProps, (s) => !isHashPrivate(s)); + const hasPrivateIdentifier = some(symbolProps, isHashPrivate); + const privateProperties = hasPrivateIdentifier ? isExpanding(context) ? serializePropertySymbolsForClassOrInterface( + filter(symbolProps, isHashPrivate), + /*isClass*/ + true, + baseTypes[0], + /*isStatic*/ + false + ) : [factory.createPropertyDeclaration( /*modifiers*/ void 0, factory.createPrivateIdentifier("#private"), @@ -63446,28 +65101,33 @@ function createTypeChecker(host) { /*initializer*/ void 0 )] : emptyArray; - const publicProperties = flatMap(publicSymbolProps, (p) => serializePropertySymbolForClass( - p, + if (hasPrivateIdentifier && !isExpanding(context)) { + context.approximateLength += 9; + } + const publicProperties = serializePropertySymbolsForClassOrInterface( + publicSymbolProps, + /*isClass*/ + true, + baseTypes[0], /*isStatic*/ - false, - baseTypes[0] - )); - const staticMembers = flatMap( + false + ); + const staticMembers = serializePropertySymbolsForClassOrInterface( filter(getPropertiesOfType(staticType), (p) => !(p.flags & 4194304 /* Prototype */) && p.escapedName !== "prototype" && !isNamespaceMember(p)), - (p) => serializePropertySymbolForClass( - p, - /*isStatic*/ - true, - staticBaseType - ) + /*isClass*/ + true, + staticBaseType, + /*isStatic*/ + true ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); + if (isNonConstructableClassLikeInJsFile) context.approximateLength += 21; const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration( factory.createModifiersFromModifierFlags(2 /* Private */), [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 177 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult( @@ -63489,7 +65149,7 @@ function createTypeChecker(host) { function getSomeTargetNameFromDeclarations(declarations) { return firstDefined(declarations, (d) => { if (isImportSpecifier(d) || isExportSpecifier(d)) { - return idText(d.propertyName || d.name); + return moduleExportNameTextUnescaped(d.propertyName || d.name); } if (isBinaryExpression(d) || isExportAssignment(d)) { const expression = isExportAssignment(d) ? d.expression : d.right; @@ -63497,7 +65157,7 @@ function createTypeChecker(host) { return idText(expression.name); } } - if (isAliasSymbolDeclaration2(d)) { + if (isAliasSymbolDeclaration(d)) { const name = getNameOfDeclaration(d); if (name && isIdentifier(name)) { return idText(name); @@ -63507,7 +65167,7 @@ function createTypeChecker(host) { }); } function serializeAsAlias(symbol, localName, modifierFlags) { - var _a2, _b, _c, _d, _e, _f; + var _a2, _b, _c, _d, _e; const node = getDeclarationOfAliasSymbol(symbol); if (!node) return Debug.fail(); const target = getMergedSymbol(getTargetOfAliasDeclaration( @@ -63525,23 +65185,25 @@ function createTypeChecker(host) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 208 /* BindingElement */: - if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { + case 209 /* BindingElement */: + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 261 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; + const propertyNameText = propertyName && isIdentifier(propertyName) ? idText(propertyName) : void 0; + context.approximateLength += 24 + localName.length + specifier2.length + ((propertyNameText == null ? void 0 : propertyNameText.length) ?? 0); addResult( factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, /*name*/ void 0, factory.createNamedImports([factory.createImportSpecifier( /*isTypeOnly*/ false, - propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, + propertyNameText ? factory.createIdentifier(propertyNameText) : void 0, factory.createIdentifier(localName) )]) ), @@ -63555,19 +65217,20 @@ function createTypeChecker(host) { } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 304 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) { + case 305 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 227 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); + context.approximateLength += 22 + specifier2.length + idText(uniqueName).length; addResult( factory.createImportEqualsDeclaration( /*modifiers*/ @@ -63579,6 +65242,7 @@ function createTypeChecker(host) { ), 0 /* None */ ); + context.approximateLength += 12 + localName.length + idText(uniqueName).length + idText(initializer.name).length; addResult( factory.createImportEqualsDeclaration( /*modifiers*/ @@ -63592,12 +65256,14 @@ function createTypeChecker(host) { ); break; } - case 271 /* ImportEqualsDeclaration */: + // else fall through and treat commonjs require just like import= + case 272 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; } const isLocalImport = !(target.flags & 512 /* ValueModule */) && !isVariableDeclaration(node); + context.approximateLength += 11 + localName.length + unescapeLeadingUnderscores(target.escapedName).length; addResult( factory.createImportEqualsDeclaration( /*modifiers*/ @@ -63616,20 +65282,22 @@ function createTypeChecker(host) { isLocalImport ? modifierFlags : 0 /* None */ ); break; - case 270 /* NamespaceExportDeclaration */: + case 271 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 273 /* ImportClause */: { + case 274 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; const attributes = isImportDeclaration(node.parent) ? node.parent.attributes : void 0; const isTypeOnly = isJSDocImportTag(node.parent); + context.approximateLength += 14 + localName.length + 3 + (isTypeOnly ? 4 : 0); addResult( factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - isTypeOnly, + /* phaseModifier */ + isTypeOnly ? 156 /* TypeKeyword */ : void 0, factory.createIdentifier(localName), /*namedBindings*/ void 0 @@ -63641,16 +65309,18 @@ function createTypeChecker(host) { ); break; } - case 274 /* NamespaceImport */: { + case 275 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; const isTypeOnly = isJSDocImportTag(node.parent.parent); + context.approximateLength += 19 + localName.length + 3 + (isTypeOnly ? 4 : 0); addResult( factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - isTypeOnly, + /* phaseModifier */ + isTypeOnly ? 156 /* TypeKeyword */ : void 0, /*name*/ void 0, factory.createNamespaceImport(factory.createIdentifier(localName)) @@ -63662,7 +65332,8 @@ function createTypeChecker(host) { ); break; } - case 280 /* NamespaceExport */: + case 281 /* NamespaceExport */: + context.approximateLength += 19 + localName.length + 3; addResult( factory.createExportDeclaration( /*modifiers*/ @@ -63675,16 +65346,18 @@ function createTypeChecker(host) { 0 /* None */ ); break; - case 276 /* ImportSpecifier */: { + case 277 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; const isTypeOnly = isJSDocImportTag(node.parent.parent.parent); + context.approximateLength += 19 + localName.length + 3 + (isTypeOnly ? 4 : 0); addResult( factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - isTypeOnly, + /* phaseModifier */ + isTypeOnly ? 156 /* TypeKeyword */ : void 0, /*name*/ void 0, factory.createNamedImports([ @@ -63703,10 +65376,13 @@ function createTypeChecker(host) { ); break; } - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; - if (specifier && ((_f = node.propertyName) == null ? void 0 : _f.escapedText) === "default" /* Default */) { - verbatimTargetName = "default" /* Default */; + if (specifier) { + const propertyName = node.propertyName; + if (propertyName && moduleExportNameIsDefault(propertyName)) { + verbatimTargetName = "default" /* Default */; + } } serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -63714,12 +65390,12 @@ function createTypeChecker(host) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 226 /* BinaryExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 227 /* BinaryExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -63731,6 +65407,7 @@ function createTypeChecker(host) { } } function serializeExportSpecifier(localName, targetName, specifier) { + context.approximateLength += 16 + localName.length + (localName !== targetName ? targetName.length : 0); addResult( factory.createExportDeclaration( /*modifiers*/ @@ -63781,6 +65458,7 @@ function createTypeChecker(host) { const prevDisableTrackSymbol = context.tracker.disableTrackSymbol; context.tracker.disableTrackSymbol = true; if (isExportAssignmentCompatibleSymbolName) { + context.approximateLength += 10; results.push(factory.createExportAssignment( /*modifiers*/ void 0, @@ -63794,6 +65472,7 @@ function createTypeChecker(host) { serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target))); } else { const varName = getUnusedName(name, symbol); + context.approximateLength += varName.length + 10; addResult( factory.createImportEqualsDeclaration( /*modifiers*/ @@ -63822,7 +65501,8 @@ function createTypeChecker(host) { if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) { serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */); } else { - const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */; + const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 268 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */; + context.approximateLength += varName.length + 5; const statement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -63847,6 +65527,7 @@ function createTypeChecker(host) { ); } if (isExportAssignmentCompatibleSymbolName) { + context.approximateLength += varName.length + 10; results.push(factory.createExportAssignment( /*modifiers*/ void 0, @@ -63879,9 +65560,9 @@ function createTypeChecker(host) { } function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) { return function serializePropertySymbol(p, isStatic2, baseType) { - var _a2, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e, _f; const modifierFlags = getDeclarationModifierFlagsFromSymbol(p); - const isPrivate = !!(modifierFlags & 2 /* Private */); + const omitType = !!(modifierFlags & 2 /* Private */) && !isExpanding(context); if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) { return []; } @@ -63895,7 +65576,7 @@ function createTypeChecker(host) { const result = []; if (p.flags & 65536 /* SetAccessor */) { const setter = p.declarations && forEach(p.declarations, (d) => { - if (d.kind === 178 /* SetAccessor */) { + if (d.kind === 179 /* SetAccessor */) { return d; } if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) { @@ -63909,6 +65590,8 @@ function createTypeChecker(host) { }); Debug.assert(!!setter); const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : void 0; + const setterDeclaration = (_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor); + context.approximateLength += modifiersLength(flag) + 7 + (paramSymbol ? symbolName(paramSymbol).length : 5) + (omitType ? 0 : 2); result.push(setTextRange2( context, factory.createSetAccessorDeclaration( @@ -63922,72 +65605,59 @@ function createTypeChecker(host) { paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : "value", /*questionToken*/ void 0, - isPrivate ? void 0 : serializeTypeForDeclaration( - context, - /*declaration*/ - void 0, - getWriteTypeOfSymbol(p), - p - ) + omitType ? void 0 : serializeTypeForDeclaration(context, setterDeclaration, getWriteTypeOfSymbol(p), p) )], /*body*/ void 0 ), - ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl + setterDeclaration ?? firstPropertyLikeDecl )); } if (p.flags & 32768 /* GetAccessor */) { - const isPrivate2 = modifierFlags & 2 /* Private */; + const getterDeclaration = (_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor); + context.approximateLength += modifiersLength(flag) + 8 + (omitType ? 0 : 2); result.push(setTextRange2( context, factory.createGetAccessorDeclaration( factory.createModifiersFromModifierFlags(flag), name, [], - isPrivate2 ? void 0 : serializeTypeForDeclaration( - context, - /*declaration*/ - void 0, - getTypeOfSymbol(p), - p - ), + omitType ? void 0 : serializeTypeForDeclaration(context, getterDeclaration, getTypeOfSymbol(p), p), /*body*/ void 0 ), - ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl + getterDeclaration ?? firstPropertyLikeDecl )); } return result; } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) { + const modifierFlags2 = (isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag; + context.approximateLength += 2 + (omitType ? 0 : 2) + modifiersLength(modifierFlags2); return setTextRange2( context, createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), + factory.createModifiersFromModifierFlags(modifierFlags2), name, p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - isPrivate ? void 0 : serializeTypeForDeclaration( - context, - /*declaration*/ - void 0, - getWriteTypeOfSymbol(p), - p - ), + omitType ? void 0 : serializeTypeForDeclaration(context, (_d = p.declarations) == null ? void 0 : _d.find(isSetAccessorDeclaration), getWriteTypeOfSymbol(p), p), // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 // interface members can't have initializers, however class members _can_ /*initializer*/ void 0 ), - ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl + ((_e = p.declarations) == null ? void 0 : _e.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl ); } if (p.flags & (8192 /* Method */ | 16 /* Function */)) { const type = getTypeOfSymbol(p); const signatures = getSignaturesOfType(type, 0 /* Call */); - if (flag & 2 /* Private */) { + if (omitType) { + const modifierFlags2 = (isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag; + context.approximateLength += 1 + modifiersLength(modifierFlags2); return setTextRange2( context, createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), + factory.createModifiersFromModifierFlags(modifierFlags2), name, p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, /*type*/ @@ -63995,11 +65665,12 @@ function createTypeChecker(host) { /*initializer*/ void 0 ), - ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0] + ((_f = p.declarations) == null ? void 0 : _f.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0] ); } const results2 = []; for (const sig of signatures) { + context.approximateLength += 1; const decl = signatureToSignatureDeclarationHelper( sig, methodKind, @@ -64018,6 +65689,25 @@ function createTypeChecker(host) { return Debug.fail(`Unhandled class member kind! ${p.__debugFlags || p.flags}`); }; } + function modifiersLength(flags) { + let result = 0; + if (flags & 32 /* Export */) result += 7; + if (flags & 128 /* Ambient */) result += 8; + if (flags & 2048 /* Default */) result += 8; + if (flags & 4096 /* Const */) result += 6; + if (flags & 1 /* Public */) result += 7; + if (flags & 2 /* Private */) result += 8; + if (flags & 4 /* Protected */) result += 10; + if (flags & 64 /* Abstract */) result += 9; + if (flags & 256 /* Static */) result += 7; + if (flags & 16 /* Override */) result += 9; + if (flags & 8 /* Readonly */) result += 9; + if (flags & 512 /* Accessor */) result += 9; + if (flags & 1024 /* Async */) result += 6; + if (flags & 8192 /* In */) result += 3; + if (flags & 16384 /* Out */) result += 4; + return result; + } function serializePropertySymbolForInterface(p, baseType) { return serializePropertySymbolForInterfaceWorker( p, @@ -64038,7 +65728,7 @@ function createTypeChecker(host) { return []; } if (baseSigs.length === signatures.length) { - let failed = false; + let failed2 = false; for (let i = 0; i < baseSigs.length; i++) { if (!compareSignaturesIdentical( signatures[i], @@ -64051,11 +65741,11 @@ function createTypeChecker(host) { true, compareTypesIdentical )) { - failed = true; + failed2 = true; break; } } - if (!failed) { + if (!failed2) { return []; } } @@ -64082,6 +65772,7 @@ function createTypeChecker(host) { } const results2 = []; for (const sig of signatures) { + context.approximateLength += 1; const decl = signatureToSignatureDeclarationHelper(sig, outputKind, context); results2.push(setTextRange2(context, decl, sig.declaration)); } @@ -64183,10 +65874,10 @@ function createTypeChecker(host) { } function getNameCandidateWorker(symbol, localName) { if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= 16777216 /* InInitialEntityName */; const nameCandidate = getNameOfSymbolAsWritten(symbol, context); - context.flags = flags; + restoreFlags(); localName = nameCandidate.length > 0 && isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? stripQuotes(nameCandidate) : nameCandidate; } if (localName === "default" /* Default */) { @@ -64194,7 +65885,7 @@ function createTypeChecker(host) { } else if (localName === "export=" /* ExportEquals */) { localName = "_exports"; } - localName = isIdentifierText(localName, languageVersion) && !isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + localName = isIdentifierText(localName, languageVersion) && !isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-z0-9]/gi, "_"); return localName; } function getInternalSymbolName(symbol, localName) { @@ -64207,6 +65898,23 @@ function createTypeChecker(host) { return localName; } } + function isExpanding(context) { + return context.maxExpansionDepth !== -1; + } + function isHashPrivate(s) { + return !!s.valueDeclaration && isNamedDeclaration(s.valueDeclaration) && isPrivateIdentifier(s.valueDeclaration.name); + } + function getClonedHashPrivateName(s) { + if (s.valueDeclaration && isNamedDeclaration(s.valueDeclaration) && isPrivateIdentifier(s.valueDeclaration.name)) { + return factory.cloneNode(s.valueDeclaration.name); + } + return void 0; + } + } + function isLibType(type) { + var _a; + const symbol = (getObjectFlags(type) & 4 /* Reference */) !== 0 ? type.target.symbol : type.symbol; + return isTupleType(type) || !!((_a = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a.some((decl) => host.isSourceFileDefaultLibrary(getSourceFileOfNode(decl)))); } function typePredicateToString(typePredicate, enclosingDeclaration, flags = 16384 /* UseAliasDefinedOutsideCurrentScope */, writer) { return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker); @@ -64225,14 +65933,14 @@ function createTypeChecker(host) { return writer2; } } - function formatUnionTypes(types) { + function formatUnionTypes(types, expandingEnum) { const result = []; let flags = 0; for (let i = 0; i < types.length; i++) { const t = types[i]; flags |= t.flags; if (!(t.flags & 98304 /* Nullable */)) { - if (t.flags & (512 /* BooleanLiteral */ | 1056 /* EnumLike */)) { + if (t.flags & 512 /* BooleanLiteral */ || !expandingEnum && t.flags | 1056 /* EnumLike */) { const baseType = t.flags & 512 /* BooleanLiteral */ ? booleanType : getBaseTypeOfEnumLikeType(t); if (baseType.flags & 1048576 /* Union */) { const count = baseType.types.length; @@ -64269,10 +65977,10 @@ function createTypeChecker(host) { return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 269 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 307 /* SourceFile */ || isAmbientModule(location); + return location.kind === 308 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -64324,17 +66032,17 @@ function createTypeChecker(host) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 261 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 231 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 232 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -64351,66 +66059,75 @@ function createTypeChecker(host) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 338 /* JSDocCallbackTag */: - case 346 /* JSDocTypedefTag */: - case 340 /* JSDocEnumTag */: + case 339 /* JSDocCallbackTag */: + case 347 /* JSDocTypedefTag */: + case 341 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 262 /* FunctionDeclaration */: - case 266 /* EnumDeclaration */: - case 271 /* ImportEqualsDeclaration */: + // falls through + case 268 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 263 /* FunctionDeclaration */: + case 267 /* EnumDeclaration */: + case 272 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 307 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 272 /* ImportEqualsDeclaration */ && parent2.kind !== 308 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: if (hasEffectiveModifier(node, 2 /* Private */ | 4 /* Protected */)) { return false; } - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 169 /* Parameter */: - case 268 /* ModuleBlock */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 183 /* TypeReference */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + // Public properties/methods are visible if its parents are visible, so: + // falls through + case 177 /* Constructor */: + case 181 /* ConstructSignature */: + case 180 /* CallSignature */: + case 182 /* IndexSignature */: + case 170 /* Parameter */: + case 269 /* ModuleBlock */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 188 /* TypeLiteral */: + case 184 /* TypeReference */: + case 189 /* ArrayType */: + case 190 /* TupleType */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: + case 197 /* ParenthesizedType */: + case 203 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - case 276 /* ImportSpecifier */: + // Default binding, import specifier and namespace import is visible + // only on demand so by default it is not visible + case 274 /* ImportClause */: + case 275 /* NamespaceImport */: + case 277 /* ImportSpecifier */: return false; - case 168 /* TypeParameter */: - case 307 /* SourceFile */: - case 270 /* NamespaceExportDeclaration */: + // Type parameters are always visible + case 169 /* TypeParameter */: + // Source file and namespace export are always visible + // falls through + case 308 /* SourceFile */: + case 271 /* NamespaceExportDeclaration */: return true; - case 277 /* ExportAssignment */: + // Export assignments do not create name bindings outside the module + case 278 /* ExportAssignment */: return false; default: return false; @@ -64419,7 +66136,7 @@ function createTypeChecker(host) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 277 /* ExportAssignment */) { + if (node.kind !== 11 /* StringLiteral */ && node.parent && node.parent.kind === 278 /* ExportAssignment */) { exportSymbol = resolveName( node, node, @@ -64429,7 +66146,7 @@ function createTypeChecker(host) { /*isUse*/ false ); - } else if (node.parent.kind === 281 /* ExportSpecifier */) { + } else if (node.parent.kind === 282 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -64529,12 +66246,12 @@ function createTypeChecker(host) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 260 /* VariableDeclaration */: - case 261 /* VariableDeclarationList */: - case 276 /* ImportSpecifier */: - case 275 /* NamedImports */: - case 274 /* NamespaceImport */: - case 273 /* ImportClause */: + case 261 /* VariableDeclaration */: + case 262 /* VariableDeclarationList */: + case 277 /* ImportSpecifier */: + case 276 /* NamedImports */: + case 275 /* NamespaceImport */: + case 274 /* ImportClause */: return false; default: return true; @@ -64659,23 +66376,23 @@ function createTypeChecker(host) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 208 /* BindingElement */: - case 303 /* PropertyAssignment */: + case 209 /* BindingElement */: + case 304 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return ancestor.initializer; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { + if (node.kind === 209 /* BindingElement */ && parent2.kind === 207 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) { + if (node.kind === 304 /* PropertyAssignment */ || node.kind === 305 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -64704,8 +66421,9 @@ function createTypeChecker(host) { } else if (strictNullChecks && pattern.parent.initializer && !hasTypeFacts(getTypeOfInitializer(pattern.parent.initializer), 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } + const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* AllowMissing */ : 0); let type; - if (pattern.kind === 206 /* ObjectBindingPattern */) { + if (pattern.kind === 207 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -64722,7 +66440,7 @@ function createTypeChecker(host) { } else { const name = declaration.propertyName || declaration.name; const indexType = getLiteralTypeFromPropertyName(name); - const declaredType = getIndexedAccessType(parentType, indexType, 32 /* ExpressionPosition */, name); + const declaredType = getIndexedAccessType(parentType, indexType, accessFlags, name); type = getFlowTypeOfDestructuring(declaration, declaredType); } } else { @@ -64733,7 +66451,6 @@ function createTypeChecker(host) { type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType); } else if (isArrayLikeType(parentType)) { const indexType = getNumberLiteralType(index); - const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType; type = getFlowTypeOfDestructuring(declaration, declaredType); } else { @@ -64769,13 +66486,13 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 210 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -64783,7 +66500,7 @@ function createTypeChecker(host) { ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -64815,8 +66532,8 @@ function createTypeChecker(host) { return; } const func = declaration.parent; - if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */); + if (func.kind === 179 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 178 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -64889,7 +66606,7 @@ function createTypeChecker(host) { const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 213 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -64917,7 +66634,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 177 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -65200,7 +66917,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 177 /* Constructor */ || thisContainer.kind === 263 /* FunctionDeclaration */ || thisContainer.kind === 219 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -65219,7 +66936,7 @@ function createTypeChecker(host) { /*reportErrors*/ false ) : unknownType; - return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, reportErrors2 ? 0 /* Normal */ : 1 /* Contextual */, contextualType))); + return addOptionality(getWidenedLiteralTypeForInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType))); } if (isBindingPattern(element.name)) { return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2); @@ -65253,7 +66970,6 @@ function createTypeChecker(host) { const flags = 4 /* Property */ | (e.initializer ? 16777216 /* Optional */ : 0); const symbol = createSymbol(flags, text); symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2); - symbol.links.bindingElement = e; members.set(symbol.escapedName, symbol); }); const result = createAnonymousType( @@ -65274,7 +66990,7 @@ function createTypeChecker(host) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 209 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -65290,7 +67006,10 @@ function createTypeChecker(host) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + if (includePatternInType) contextualBindingPatterns.push(pattern); + const result = pattern.kind === 207 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + if (includePatternInType) contextualBindingPatterns.pop(); + return result; } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -65334,7 +67053,7 @@ function createTypeChecker(host) { if (reportErrors2) { reportErrorsFromWidening(declaration, type); } - if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) { + if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !tryGetTypeFromEffectiveTypeNode(declaration)) && type.symbol !== getSymbolOfDeclaration(declaration)) { type = esSymbolType; } return getWidenedType(type); @@ -65349,7 +67068,7 @@ function createTypeChecker(host) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 170 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -65371,18 +67090,18 @@ function createTypeChecker(host) { } return false; } - function getTypeOfVariableOrParameterOrProperty(symbol, checkMode) { + function getTypeOfVariableOrParameterOrProperty(symbol) { const links = getSymbolLinks(symbol); if (!links.type) { - const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode); - if (!links.type && !isParameterOfContextSensitiveSignature(symbol) && !checkMode) { + const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol); + if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) { links.type = type; } return type; } return links.type; } - function getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode) { + function getTypeOfVariableOrParameterOrPropertyWorker(symbol) { if (symbol.flags & 4194304 /* Prototype */) { return getTypeOfPrototypeProperty(symbol); } @@ -65417,13 +67136,10 @@ function createTypeChecker(host) { if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } - if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) { - return errorType; - } return reportCircularityError(symbol); } let type; - if (declaration.kind === 277 /* ExportAssignment */) { + if (declaration.kind === 278 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -65457,9 +67173,6 @@ function createTypeChecker(host) { if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { return getTypeOfFuncClassEnumModule(symbol); } - if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) { - return type; - } return reportCircularityError(symbol); } return type; @@ -65467,13 +67180,13 @@ function createTypeChecker(host) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -65498,10 +67211,10 @@ function createTypeChecker(host) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); - let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( + const getter = getDeclarationOfKind(symbol, 178 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 179 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 173 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && getWidenedTypeForVariableLikeDeclaration( accessor, /*reportErrors*/ true @@ -65538,7 +67251,7 @@ function createTypeChecker(host) { if (!pushTypeResolution(symbol, 7 /* WriteType */)) { return errorType; } - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = getDeclarationOfKind(symbol, 179 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 173 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -65578,7 +67291,7 @@ function createTypeChecker(host) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 227 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 227 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -65646,7 +67359,7 @@ function createTypeChecker(host) { error2(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); return errorType; } - if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 170 /* Parameter */ || declaration.initializer)) { error2(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol)); } } else if (symbol.flags & 2097152 /* Alias */) { @@ -65677,18 +67390,21 @@ function createTypeChecker(host) { } function getWriteTypeOfSymbol(symbol) { const checkFlags = getCheckFlags(symbol); - if (symbol.flags & 4 /* Property */) { - return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : ( + if (checkFlags & 2 /* SyntheticProperty */) { + return checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : ( // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty symbol.links.writeType || symbol.links.type - ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); + ); + } + if (symbol.flags & 4 /* Property */) { + return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); } if (symbol.flags & 98304 /* Accessor */) { return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol); } return getTypeOfSymbol(symbol); } - function getTypeOfSymbol(symbol, checkMode) { + function getTypeOfSymbol(symbol) { const checkFlags = getCheckFlags(symbol); if (checkFlags & 65536 /* DeferredType */) { return getTypeOfSymbolWithDeferredType(symbol); @@ -65703,7 +67419,7 @@ function createTypeChecker(host) { return getTypeOfReverseMappedSymbol(symbol); } if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) { - return getTypeOfVariableOrParameterOrProperty(symbol, checkMode); + return getTypeOfVariableOrParameterOrProperty(symbol); } if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { return getTypeOfFuncClassEnumModule(symbol); @@ -65722,6 +67438,17 @@ function createTypeChecker(host) { function getNonMissingTypeOfSymbol(symbol) { return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); } + function isReferenceToSomeType(type, targets) { + if (type === void 0 || (getObjectFlags(type) & 4 /* Reference */) === 0) { + return false; + } + for (const target of targets) { + if (type.target === target) { + return true; + } + } + return false; + } function isReferenceToType2(type, target) { return type !== void 0 && target !== void 0 && (getObjectFlags(type) & 4 /* Reference */) !== 0 && type.target === target; } @@ -65761,44 +67488,51 @@ function createTypeChecker(host) { if (!node) { return void 0; } - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 317 /* JSDocFunctionType */: - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 265 /* TypeAliasDeclaration */: - case 345 /* JSDocTemplateTag */: - case 346 /* JSDocTypedefTag */: - case 340 /* JSDocEnumTag */: - case 338 /* JSDocCallbackTag */: - case 200 /* MappedType */: - case 194 /* ConditionalType */: { + const kind = node.kind; + switch (kind) { + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 174 /* MethodSignature */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 318 /* JSDocFunctionType */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 266 /* TypeAliasDeclaration */: + case 346 /* JSDocTemplateTag */: + case 347 /* JSDocTypedefTag */: + case 341 /* JSDocEnumTag */: + case 339 /* JSDocCallbackTag */: + case 201 /* MappedType */: + case 195 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 200 /* MappedType */) { + if ((kind === 219 /* FunctionExpression */ || kind === 220 /* ArrowFunction */ || isObjectLiteralMethod(node)) && isContextSensitive(node)) { + const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node)), 0 /* Call */)); + if (signature && signature.typeParameters) { + return [...outerTypeParameters || emptyArray, ...signature.typeParameters]; + } + } + if (kind === 201 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 194 /* ConditionalType */) { + } else if (kind === 195 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || node.kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (kind === 264 /* ClassDeclaration */ || kind === 232 /* ClassExpression */ || kind === 265 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 341 /* JSDocParameterTag */: + case 342 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 320 /* JSDoc */: { + case 321 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -65808,14 +67542,14 @@ function createTypeChecker(host) { function getOuterTypeParametersOfClassOrInterface(symbol) { var _a; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => { - if (decl.kind === 264 /* InterfaceDeclaration */) { + if (decl.kind === 265 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 260 /* VariableDeclaration */) { + if (decl.kind !== 261 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */); + return !!initializer && (initializer.kind === 219 /* FunctionExpression */ || initializer.kind === 220 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -65826,7 +67560,7 @@ function createTypeChecker(host) { } let result; for (const node of symbol.declarations) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 265 /* InterfaceDeclaration */ || node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -65960,7 +67694,7 @@ function createTypeChecker(host) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) { + if (declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 265 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -66045,7 +67779,7 @@ function createTypeChecker(host) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 265 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -66073,7 +67807,7 @@ function createTypeChecker(host) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 264 /* InterfaceDeclaration */) { + if (declaration.kind === 265 /* InterfaceDeclaration */) { if (declaration.flags & 256 /* ContainsThis */) { return false; } @@ -66143,9 +67877,12 @@ function createTypeChecker(host) { links.instantiations = /* @__PURE__ */ new Map(); links.instantiations.set(getTypeListId(typeParameters), type); } + if (type === intrinsicMarkerType && symbol.escapedName === "BuiltinIteratorReturn") { + type = getBuiltinIteratorReturnType(); + } } else { type = errorType; - if (declaration.kind === 340 /* JSDocEnumTag */) { + if (declaration.kind === 341 /* JSDocEnumTag */) { error2(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); @@ -66164,7 +67901,7 @@ function createTypeChecker(host) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 266 /* EnumDeclaration */) { + if (declaration.kind === 267 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -66258,11 +67995,11 @@ function createTypeChecker(host) { case 116 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: - case 201 /* LiteralType */: + case 202 /* LiteralType */: return true; - case 188 /* ArrayType */: + case 189 /* ArrayType */: return isThislessType(node.elementType); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -66278,21 +68015,21 @@ function createTypeChecker(host) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 177 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -66336,11 +68073,20 @@ function createTypeChecker(host) { return type; } function isLateBindableName(node) { + return isLateBindableAST(node) && isTypeUsableAsPropertyName(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(node.argumentExpression)); + } + function isLateBindableIndexSignature(node) { + return isLateBindableAST(node) && isTypeUsableAsIndexSignature(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(node.argumentExpression)); + } + function isLateBindableAST(node) { if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) { return false; } const expr = isComputedPropertyName(node) ? node.expression : node.argumentExpression; - return isEntityNameExpression(expr) && isTypeUsableAsPropertyName(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(expr)); + return isEntityNameExpression(expr); + } + function isTypeUsableAsIndexSignature(type) { + return isTypeAssignableTo(type, stringNumberSymbolType); } function isLateBoundName(name) { return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) === 64 /* at */; @@ -66349,6 +68095,10 @@ function createTypeChecker(host) { const name = getNameOfDeclaration(node); return !!name && isLateBindableName(name); } + function hasLateBindableIndexSignature(node) { + const name = getNameOfDeclaration(node); + return !!name && isLateBindableIndexSignature(name); + } function hasBindableName(node) { return !hasDynamicName(node) || hasLateBindableName(node); } @@ -66365,9 +68115,7 @@ function createTypeChecker(host) { symbol.declarations.push(member); } if (symbolFlags & 111551 /* Value */) { - if (!symbol.valueDeclaration || symbol.valueDeclaration.kind !== member.kind) { - symbol.valueDeclaration = member; - } + setValueDeclaration(symbol, member); } } function lateBindMember(parent2, earlySymbols, lateSymbols, decl) { @@ -66402,6 +68150,24 @@ function createTypeChecker(host) { } return links.resolvedSymbol; } + function lateBindIndexSignature(parent2, earlySymbols, lateSymbols, decl) { + let indexSymbol = lateSymbols.get("__index" /* Index */); + if (!indexSymbol) { + const early = earlySymbols == null ? void 0 : earlySymbols.get("__index" /* Index */); + if (!early) { + indexSymbol = createSymbol(0 /* None */, "__index" /* Index */, 4096 /* Late */); + } else { + indexSymbol = cloneSymbol(early); + indexSymbol.links.checkFlags |= 4096 /* Late */; + } + lateSymbols.set("__index" /* Index */, indexSymbol); + } + if (!indexSymbol.declarations) { + indexSymbol.declarations = [decl]; + } else if (!decl.symbol.isReplaceableByMethod) { + indexSymbol.declarations.push(decl); + } + } function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) { const links = getSymbolLinks(symbol); if (!links[resolutionKind]) { @@ -66416,6 +68182,8 @@ function createTypeChecker(host) { if (isStatic2 === hasStaticModifier(member)) { if (hasLateBindableName(member)) { lateBindMember(symbol, earlySymbols, lateSymbols, member); + } else if (hasLateBindableIndexSignature(member)) { + lateBindIndexSignature(symbol, earlySymbols, lateSymbols, member); } } } @@ -66524,12 +68292,7 @@ function createTypeChecker(host) { addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType)); callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - )]; + const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo]; indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType))); } } @@ -66546,7 +68309,7 @@ function createTypeChecker(host) { resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { - const sig = new Signature14(checker, flags); + const sig = new Signature13(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -66607,18 +68370,18 @@ function createTypeChecker(host) { function getExpandedParameters(sig, skipUnionExpanding) { if (signatureHasRestParameter(sig)) { const restIndex = sig.parameters.length - 1; - const restName = sig.parameters[restIndex].escapedName; - const restType = getTypeOfSymbol(sig.parameters[restIndex]); + const restSymbol = sig.parameters[restIndex]; + const restType = getTypeOfSymbol(restSymbol); if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; + return [expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol)]; } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) { - return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restName)); + return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restSymbol)); } } return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType, restIndex, restName) { + function expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol) { const elementTypes = getTypeArguments(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); + const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restSymbol); const restParams = map(elementTypes, (t, i) => { const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType); const flags = restType.target.elementFlags[i]; @@ -66629,19 +68392,29 @@ function createTypeChecker(host) { }); return concatenate(sig.parameters.slice(0, restIndex), restParams); } - function getUniqAssociatedNamesFromTupleType(type, restName) { - const associatedNamesMap = /* @__PURE__ */ new Map(); - return map(type.target.labeledElementDeclarations, (labeledElement, i) => { - const name = getTupleElementLabel(labeledElement, i, restName); - const prevCounter = associatedNamesMap.get(name); - if (prevCounter === void 0) { - associatedNamesMap.set(name, 1); - return name; - } else { - associatedNamesMap.set(name, prevCounter + 1); - return `${name}_${prevCounter}`; + function getUniqAssociatedNamesFromTupleType(type, restSymbol) { + const names = map(type.target.labeledElementDeclarations, (labeledElement, i) => getTupleElementLabel(labeledElement, i, type.target.elementFlags[i], restSymbol)); + if (names) { + const duplicates = []; + const uniqueNames = /* @__PURE__ */ new Set(); + for (let i = 0; i < names.length; i++) { + const name = names[i]; + if (!tryAddToSet(uniqueNames, name)) { + duplicates.push(i); + } } - }); + const counters = /* @__PURE__ */ new Map(); + for (const i of duplicates) { + let counter = counters.get(names[i]) ?? 1; + let name; + while (!tryAddToSet(uniqueNames, name = `${names[i]}_${counter}`)) { + counter++; + } + names[i] = name; + counters.set(names[i], counter + 1); + } + } + return names; } } function getDefaultConstructSignatures(classType) { @@ -66863,8 +68636,13 @@ function createTypeChecker(host) { if (left.typeParameters && right.typeParameters) { paramMapper = createTypeMapper(right.typeParameters, left.typeParameters); } + let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */); const declaration = left.declaration; const params = combineUnionParameters(left, right, paramMapper); + const lastParam = lastOrUndefined(params); + if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) { + flags |= 1 /* HasRestParameter */; + } const thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper); const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); const result = createSignature( @@ -66877,7 +68655,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 167 /* PropagatingFlags */ + flags ); result.compositeKind = 1048576 /* Union */; result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -67040,17 +68818,12 @@ function createTypeChecker(host) { members = createSymbolTable(getNamedOrIndexSignatureMembers(members)); addInheritedMembers(members, getPropertiesOfType(baseConstructorType)); } else if (baseConstructorType === anyType) { - baseConstructorIndexInfo = createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - ); + baseConstructorIndexInfo = anyBaseTypeIndexInfo; } } const indexSymbol = getIndexSymbolFromSymbolTable(members); if (indexSymbol) { - indexInfos = getIndexInfosOfIndexSymbol(indexSymbol); + indexInfos = getIndexInfosOfIndexSymbol(indexSymbol, arrayFrom(members.values())); } else { if (baseConstructorIndexInfo) { indexInfos = append(indexInfos, baseConstructorIndexInfo); @@ -67306,7 +69079,7 @@ function createTypeChecker(host) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; + return constraintDeclaration.kind === 199 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -67780,6 +69553,7 @@ function createTypeChecker(host) { } function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) { var _a, _b, _c; + let propFlags = 0 /* None */; let singleProp; let propSet; let indexTypes; @@ -67804,6 +69578,7 @@ function createTypeChecker(host) { } if (!singleProp) { singleProp = prop; + propFlags = prop.flags & 98304 /* Accessor */ || 4 /* Property */; } else if (prop !== singleProp) { const isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp); if (isInstantiation && compareProperties2(singleProp, prop, (a, b) => a === b ? -1 /* True */ : 0 /* False */) === -1 /* True */) { @@ -67818,6 +69593,9 @@ function createTypeChecker(host) { propSet.set(id, prop); } } + if (propFlags & 98304 /* Accessor */ && (prop.flags & 98304 /* Accessor */) !== (propFlags & 98304 /* Accessor */)) { + propFlags = propFlags & ~98304 /* Accessor */ | 4 /* Property */; + } } if (isUnion && isReadonlySymbol(prop)) { checkFlags |= 8 /* Readonly */; @@ -67831,6 +69609,7 @@ function createTypeChecker(host) { } else if (isUnion) { const indexInfo = !isLateBoundName(name) && getApplicableIndexInfoForName(type, name); if (indexInfo) { + propFlags = propFlags & ~98304 /* Accessor */ | 4 /* Property */; checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0); indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type); } else if (isObjectLiteralType2(type) && !(getObjectFlags(type) & 2097152 /* ContainsSpread */)) { @@ -67894,7 +69673,7 @@ function createTypeChecker(host) { propTypes.push(type); } addRange(propTypes, indexTypes); - const result = createSymbol(4 /* Property */ | (optionalFlag ?? 0), name, syntheticFlag | checkFlags); + const result = createSymbol(propFlags | (optionalFlag ?? 0), name, syntheticFlag | checkFlags); result.links.containingType = containingType; if (!hasNonUniformValueDeclaration && firstValueDeclaration) { result.valueDeclaration = firstValueDeclaration; @@ -68251,7 +70030,7 @@ function createTypeChecker(host) { let hasThisParameter2 = false; const iife = getImmediatelyInvokedFunctionExpression(declaration); const isJSConstructSignature = isJSDocConstructSignature(declaration); - const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration); + const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !some(declaration.parameters, (p) => !!getJSDocType(p)) && !getJSDocType(declaration) && !getContextualSignatureForFunctionLikeDeclaration(declaration); if (isUntypedSignatureInJSFile) { flags |= 32 /* IsUntypedSignatureInJSFile */; } @@ -68281,7 +70060,7 @@ function createTypeChecker(host) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 201 /* LiteralType */) { + if (type && type.kind === 202 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = hasEffectiveQuestionToken(param) || isParameter(param) && param.initializer || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type; @@ -68289,8 +70068,8 @@ function createTypeChecker(host) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + if ((declaration.kind === 178 /* GetAccessor */ || declaration.kind === 179 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 178 /* GetAccessor */ ? 179 /* SetAccessor */ : 178 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -68375,15 +70154,15 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + return node.name.kind === 168 /* ComputedPropertyName */ && traverse(node.name); + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return traverse(node.expression); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -68469,7 +70248,7 @@ function createTypeChecker(host) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 197 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 198 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -68514,7 +70293,7 @@ function createTypeChecker(host) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 176 /* Constructor */) { + if (declaration.kind === 177 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } const typeNode = getEffectiveReturnTypeNode(declaration); @@ -68530,12 +70309,12 @@ function createTypeChecker(host) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 178 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 179 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -68564,8 +70343,10 @@ function createTypeChecker(host) { if (returnSignature) { const newReturnSignature = cloneSignature(returnSignature); newReturnSignature.typeParameters = inferredTypeParameters; + const newReturnType = getOrCreateTypeFromSignature(newReturnSignature); + newReturnType.mapper = instantiatedSignature.mapper; const newInstantiatedSignature = cloneSignature(instantiatedSignature); - newInstantiatedSignature.resolvedReturnType = getOrCreateTypeFromSignature(newReturnSignature); + newInstantiatedSignature.resolvedReturnType = newReturnType; return newInstantiatedSignature; } } @@ -68588,8 +70369,11 @@ function createTypeChecker(host) { true ); } + function getTypeParametersForMapper(signature) { + return sameMap(signature.typeParameters, (tp) => tp.mapper ? instantiateType(tp, tp.mapper) : tp); + } function createSignatureTypeMapper(signature, typeArguments) { - return createTypeMapper(signature.typeParameters, typeArguments); + return createTypeMapper(getTypeParametersForMapper(signature), typeArguments); } function getErasedSignature(signature) { return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature; @@ -68612,12 +70396,6 @@ function createTypeChecker(host) { isInJSFile(signature.declaration) ); } - function getImplementationSignature(signature) { - return signature.typeParameters ? signature.implementationSignatureCache || (signature.implementationSignatureCache = createImplementationSignature(signature)) : signature; - } - function createImplementationSignature(signature) { - return signature.typeParameters ? instantiateSignature(signature, createTypeMapper([], [])) : signature; - } function getBaseSignature(signature) { const typeParameters = signature.typeParameters; if (typeParameters) { @@ -68640,22 +70418,12 @@ function createTypeChecker(host) { } return signature; } - function getOrCreateTypeFromSignature(signature, outerTypeParameters) { - var _a; + function getOrCreateTypeFromSignature(signature) { + var _a, _b; if (!signature.isolatedSignatureType) { const kind = (_a = signature.declaration) == null ? void 0 : _a.kind; - const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; - const type = createObjectType(16 /* Anonymous */ | 134217728 /* SingleSignatureType */, createSymbol(16 /* Function */, "__function" /* Function */)); - if (signature.declaration && !nodeIsSynthesized(signature.declaration)) { - type.symbol.declarations = [signature.declaration]; - type.symbol.valueDeclaration = signature.declaration; - } - outerTypeParameters || (outerTypeParameters = signature.declaration && getOuterTypeParameters( - signature.declaration, - /*includeThisTypes*/ - true - )); - type.outerTypeParameters = outerTypeParameters; + const isConstructor = kind === void 0 || kind === 177 /* Constructor */ || kind === 181 /* ConstructSignature */ || kind === 186 /* ConstructorType */; + const type = createObjectType(16 /* Anonymous */ | 134217728 /* SingleSignatureType */, (_b = signature.declaration) == null ? void 0 : _b.symbol); type.members = emptySymbols; type.properties = emptyArray; type.callSignatures = !isConstructor ? [signature] : emptyArray; @@ -68666,33 +70434,71 @@ function createTypeChecker(host) { return signature.isolatedSignatureType; } function getIndexSymbol(symbol) { - return symbol.members ? getIndexSymbolFromSymbolTable(symbol.members) : void 0; + return symbol.members ? getIndexSymbolFromSymbolTable(getMembersOfSymbol(symbol)) : void 0; } function getIndexSymbolFromSymbolTable(symbolTable) { return symbolTable.get("__index" /* Index */); } - function createIndexInfo(keyType, type, isReadonly, declaration) { - return { keyType, type, isReadonly, declaration }; + function createIndexInfo(keyType, type, isReadonly, declaration, components) { + return { keyType, type, isReadonly, declaration, components }; } function getIndexInfosOfSymbol(symbol) { const indexSymbol = getIndexSymbol(symbol); - return indexSymbol ? getIndexInfosOfIndexSymbol(indexSymbol) : emptyArray; + return indexSymbol ? getIndexInfosOfIndexSymbol(indexSymbol, arrayFrom(getMembersOfSymbol(symbol).values())) : emptyArray; } - function getIndexInfosOfIndexSymbol(indexSymbol) { + function getIndexInfosOfIndexSymbol(indexSymbol, siblingSymbols = indexSymbol.parent ? arrayFrom(getMembersOfSymbol(indexSymbol.parent).values()) : void 0) { if (indexSymbol.declarations) { const indexInfos = []; + let hasComputedNumberProperty = false; + let readonlyComputedNumberProperty = true; + let hasComputedSymbolProperty = false; + let readonlyComputedSymbolProperty = true; + let hasComputedStringProperty = false; + let readonlyComputedStringProperty = true; + const computedPropertySymbols = []; for (const declaration of indexSymbol.declarations) { - if (declaration.parameters.length === 1) { - const parameter = declaration.parameters[0]; - if (parameter.type) { - forEachType(getTypeFromTypeNode(parameter.type), (keyType) => { - if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) { - indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration)); + if (isIndexSignatureDeclaration(declaration)) { + if (declaration.parameters.length === 1) { + const parameter = declaration.parameters[0]; + if (parameter.type) { + forEachType(getTypeFromTypeNode(parameter.type), (keyType) => { + if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) { + indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration)); + } + }); + } + } + } else if (hasLateBindableIndexSignature(declaration)) { + const declName = isBinaryExpression(declaration) ? declaration.left : declaration.name; + const keyType = isElementAccessExpression(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName); + if (findIndexInfo(indexInfos, keyType)) { + continue; + } + if (isTypeAssignableTo(keyType, stringNumberSymbolType)) { + if (isTypeAssignableTo(keyType, numberType)) { + hasComputedNumberProperty = true; + if (!hasEffectiveReadonlyModifier(declaration)) { + readonlyComputedNumberProperty = false; } - }); + } else if (isTypeAssignableTo(keyType, esSymbolType)) { + hasComputedSymbolProperty = true; + if (!hasEffectiveReadonlyModifier(declaration)) { + readonlyComputedSymbolProperty = false; + } + } else { + hasComputedStringProperty = true; + if (!hasEffectiveReadonlyModifier(declaration)) { + readonlyComputedStringProperty = false; + } + } + computedPropertySymbols.push(declaration.symbol); } } } + const allPropertySymbols = concatenate(computedPropertySymbols, filter(siblingSymbols, (s) => s !== indexSymbol)); + if (hasComputedStringProperty && !findIndexInfo(indexInfos, stringType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedStringProperty, 0, allPropertySymbols, stringType)); + if (hasComputedNumberProperty && !findIndexInfo(indexInfos, numberType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedNumberProperty, 0, allPropertySymbols, numberType)); + if (hasComputedSymbolProperty && !findIndexInfo(indexInfos, esSymbolType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedSymbolProperty, 0, allPropertySymbols, esSymbolType)); return indexInfos; } return emptyArray; @@ -68708,9 +70514,9 @@ function createTypeChecker(host) { let inferences; if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 195 /* InferType */) { + if (declaration.parent.kind === 196 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 184 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -68731,13 +70537,13 @@ function createTypeChecker(host) { } } } - } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 170 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 192 /* RestType */ || grandParent.kind === 203 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 205 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { + } else if (grandParent.kind === 169 /* TypeParameter */ && grandParent.parent.kind === 201 /* MappedType */) { inferences = append(inferences, stringNumberSymbolType); - } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 201 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 195 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 201 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : stringNumberSymbolType))); @@ -68759,7 +70565,7 @@ function createTypeChecker(host) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? stringNumberSymbolType : unknownType; + type = constraintDeclaration.parent.parent.kind === 201 /* MappedType */ ? stringNumberSymbolType : unknownType; } typeParameter.constraint = type; } @@ -68768,7 +70574,7 @@ function createTypeChecker(host) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 169 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -68850,14 +70656,14 @@ function createTypeChecker(host) { var _a, _b; if (!type.resolvedTypeArguments) { if (!pushTypeResolution(type, 5 /* ResolvedTypeArguments */)) { - return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; + return concatenate(type.target.outerTypeParameters, (_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 184 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 189 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments); } else { - type.resolvedTypeArguments ?? (type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray); + type.resolvedTypeArguments ?? (type.resolvedTypeArguments = concatenate(type.target.outerTypeParameters, ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray)); error2( type.node || currentNode, type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves, @@ -68892,7 +70698,7 @@ function createTypeChecker(host) { return errorType; } } - if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 184 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -68987,9 +70793,9 @@ function createTypeChecker(host) { } function getTypeReferenceName(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: return node.typeName; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -69001,10 +70807,10 @@ function createTypeChecker(host) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 167 /* QualifiedName */ ? name.right : name.kind === 212 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 167 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 212 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -69056,7 +70862,7 @@ function createTypeChecker(host) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 206 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -69093,7 +70899,7 @@ function createTypeChecker(host) { return isNoInferType(substitutionType) ? substitutionType.baseType : getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 189 /* TupleType */ && node.elements.length === 1; + return node.kind === 190 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -69101,17 +70907,17 @@ function createTypeChecker(host) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 320 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 321 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 169 /* Parameter */) { + if (parent2.kind === 170 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 195 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && !parent2.nameType && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 201 /* MappedType */ && !parent2.nameType && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -69128,7 +70934,7 @@ function createTypeChecker(host) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); + return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 184 /* TypeReference */ || node.kind === 206 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -69147,6 +70953,9 @@ function createTypeChecker(host) { case "Number": checkNoTypeArguments(node); return numberType; + case "BigInt": + checkNoTypeArguments(node); + return bigintType; case "Boolean": checkNoTypeArguments(node); return booleanType; @@ -69251,9 +71060,9 @@ function createTypeChecker(host) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: return declaration; } } @@ -69308,6 +71117,18 @@ function createTypeChecker(host) { const symbol = getGlobalTypeSymbol(name, reportErrors2); return symbol || reportErrors2 ? getTypeOfGlobalSymbol(symbol, arity) : void 0; } + function getGlobalBuiltinTypes(typeNames, arity) { + let types; + for (const typeName of typeNames) { + types = append(types, getGlobalType( + typeName, + arity, + /*reportErrors*/ + false + )); + } + return types ?? emptyArray; + } function getGlobalTypedPropertyDescriptorType() { return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType( "TypedPropertyDescriptor", @@ -69410,7 +71231,7 @@ function createTypeChecker(host) { return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType( "AsyncIterable", /*arity*/ - 1, + 3, reportErrors2 )) || emptyGenericType; } @@ -69426,7 +71247,18 @@ function createTypeChecker(host) { return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType( "AsyncIterableIterator", /*arity*/ - 1, + 3, + reportErrors2 + )) || emptyGenericType; + } + function getGlobalBuiltinAsyncIteratorTypes() { + return deferredGlobalBuiltinAsyncIteratorTypes ?? (deferredGlobalBuiltinAsyncIteratorTypes = getGlobalBuiltinTypes(["ReadableStreamAsyncIterator"], 1)); + } + function getGlobalAsyncIteratorObjectType(reportErrors2) { + return deferredGlobalAsyncIteratorObjectType || (deferredGlobalAsyncIteratorObjectType = getGlobalType( + "AsyncIteratorObject", + /*arity*/ + 3, reportErrors2 )) || emptyGenericType; } @@ -69442,7 +71274,7 @@ function createTypeChecker(host) { return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType( "Iterable", /*arity*/ - 1, + 3, reportErrors2 )) || emptyGenericType; } @@ -69458,7 +71290,21 @@ function createTypeChecker(host) { return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType( "IterableIterator", /*arity*/ - 1, + 3, + reportErrors2 + )) || emptyGenericType; + } + function getBuiltinIteratorReturnType() { + return strictBuiltinIteratorReturn ? undefinedType : anyType; + } + function getGlobalBuiltinIteratorTypes() { + return deferredGlobalBuiltinIteratorTypes ?? (deferredGlobalBuiltinIteratorTypes = getGlobalBuiltinTypes(["ArrayIterator", "MapIterator", "SetIterator", "StringIterator"], 1)); + } + function getGlobalIteratorObjectType(reportErrors2) { + return deferredGlobalIteratorObjectType || (deferredGlobalIteratorObjectType = getGlobalType( + "IteratorObject", + /*arity*/ + 3, reportErrors2 )) || emptyGenericType; } @@ -69640,18 +71486,18 @@ function createTypeChecker(host) { return createTypeFromGenericGlobalType(getGlobalIterableType( /*reportErrors*/ true - ), [iteratedType]); + ), [iteratedType, voidType, undefinedType]); } function createArrayType(elementType, readonly) { return createTypeFromGenericGlobalType(readonly ? globalReadonlyArrayType : globalArrayType, [elementType]); } function getTupleElementFlags(node) { switch (node.kind) { - case 190 /* OptionalType */: + case 191 /* OptionalType */: return 2 /* Optional */; - case 191 /* RestType */: + case 192 /* RestType */: return getRestTypeElementFlags(node); - case 202 /* NamedTupleMember */: + case 203 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -69673,51 +71519,51 @@ function createTypeChecker(host) { return isNamedTupleMember(member) || isParameter(member) ? member : void 0; } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 189 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 190 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 199 /* IndexedAccessType */: - case 194 /* ConditionalType */: - case 198 /* TypeOperator */: - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 197 /* ParenthesizedType */: + case 203 /* NamedTupleMember */: + case 184 /* TypeReference */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: + case 200 /* IndexedAccessType */: + case 195 /* ConditionalType */: + case 199 /* TypeOperator */: + case 189 /* ArrayType */: + case 190 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 186 /* TypeQuery */: + case 187 /* TypeQuery */: return true; - case 198 /* TypeOperator */: + case 199 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 202 /* NamedTupleMember */: - case 316 /* JSDocOptionalType */: - case 314 /* JSDocNullableType */: - case 315 /* JSDocNonNullableType */: - case 309 /* JSDocTypeExpression */: + case 197 /* ParenthesizedType */: + case 191 /* OptionalType */: + case 203 /* NamedTupleMember */: + case 317 /* JSDocOptionalType */: + case 315 /* JSDocNullableType */: + case 316 /* JSDocNonNullableType */: + case 310 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 191 /* RestType */: - return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 192 /* RestType */: + return node.type.kind !== 189 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 193 /* UnionType */: + case 194 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 199 /* IndexedAccessType */: + case 200 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -69728,15 +71574,15 @@ function createTypeChecker(host) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 190 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 190 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 189 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -70304,6 +72150,12 @@ function createTypeChecker(host) { function eachUnionContains(unionTypes2, type) { for (const u of unionTypes2) { if (!containsType(u.types, type)) { + if (type === missingType) { + return containsType(u.types, undefinedType); + } + if (type === undefinedType) { + return containsType(u.types, missingType); + } const primitive = type.flags & 128 /* StringLiteral */ ? stringType : type.flags & (32 /* Enum */ | 256 /* NumberLiteral */) ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 8192 /* UniqueESSymbol */ ? esSymbolType : void 0; if (!primitive || !containsType(u.types, primitive)) { return false; @@ -70360,6 +72212,13 @@ function createTypeChecker(host) { for (const t of u.types) { if (insertType(checked, t)) { if (eachUnionContains(unionTypes2, t)) { + if (t === undefinedType && result.length && result[0] === missingType) { + continue; + } + if (t === missingType && result.length && result[0] === undefinedType) { + result[0] = missingType; + continue; + } insertType(result, t); } } @@ -70444,7 +72303,7 @@ function createTypeChecker(host) { } else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) { removeFromEach(typeSet, 65536 /* Null */); result = getUnionType([getIntersectionType(typeSet, flags), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments); - } else if (typeSet.length >= 4) { + } else if (typeSet.length >= 3 && types.length > 2) { const middle = Math.floor(typeSet.length / 2); result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle), flags), getIntersectionType(typeSet.slice(middle), flags)], flags, aliasSymbol, aliasTypeArguments); } else { @@ -70810,7 +72669,7 @@ function createTypeChecker(host) { return true; } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { - const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 213 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -70840,7 +72699,7 @@ function createTypeChecker(host) { } if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) { const index = +propName; - if (accessNode && everyType(objectType, (t) => !t.target.hasRestElement) && !(accessFlags & 16 /* NoTupleBoundsCheck */)) { + if (accessNode && everyType(objectType, (t) => !(t.target.combinedFlags & 12 /* Variable */)) && !(accessFlags & 16 /* AllowMissing */)) { const indexNode = getIndexNodeForAccessExpression(accessNode); if (isTupleType(objectType)) { if (index < 0) { @@ -70979,17 +72838,21 @@ function createTypeChecker(host) { return void 0; } } + if (accessFlags & 16 /* AllowMissing */ && isObjectLiteralType2(objectType)) { + return undefinedType; + } if (isJSLiteralType(objectType)) { return anyType; } if (accessNode) { const indexNode = getIndexNodeForAccessExpression(accessNode); - if (indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { + if (indexNode.kind !== 10 /* BigIntLiteral */ && indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); } else if (indexType.flags & (4 /* String */ | 8 /* Number */)) { error2(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); } else { - error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + const typeString = indexNode.kind === 10 /* BigIntLiteral */ ? "bigint" : typeToString(indexType); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeString); } } if (isTypeAny(indexType)) { @@ -71003,7 +72866,7 @@ function createTypeChecker(host) { } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 213 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 200 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 168 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { @@ -71164,7 +73027,7 @@ function createTypeChecker(host) { indexType = stringType; } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 200 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -71482,7 +73345,7 @@ function createTypeChecker(host) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); - if (getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) { + if (!node.symbol || getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) { links.resolvedType = emptyTypeLiteralType; } else { let type = createObjectType(16 /* Anonymous */, node.symbol); @@ -71646,7 +73509,7 @@ function createTypeChecker(host) { return result; } function getIndexInfoWithReadonly(info, readonly) { - return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration) : info; + return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration, info.components) : info; } function createLiteralType(flags, value, symbol, regularType) { const type = createTypeWithSymbol(flags, symbol); @@ -71730,7 +73593,7 @@ function createTypeChecker(host) { false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 264 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 265 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -71760,17 +73623,17 @@ function createTypeChecker(host) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 197 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 189 /* TupleType */: + case 190 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 192 /* RestType */ || node.kind === 203 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 188 /* ArrayType */: + case 189 /* ArrayType */: return node.elementType; } return void 0; @@ -71790,8 +73653,8 @@ function createTypeChecker(host) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 133 /* AnyKeyword */: - case 312 /* JSDocAllType */: - case 313 /* JSDocUnknownType */: + case 313 /* JSDocAllType */: + case 314 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -71817,66 +73680,69 @@ function createTypeChecker(host) { return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 141 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 197 /* ThisType */: + case 198 /* ThisType */: case 110 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 201 /* LiteralType */: + case 202 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return getTypeFromTypeReference(node); - case 182 /* TypePredicate */: + case 183 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 186 /* TypeQuery */: + case 187 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 189 /* ArrayType */: + case 190 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 190 /* OptionalType */: + case 191 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 192 /* UnionType */: + case 193 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 193 /* IntersectionType */: + case 194 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 314 /* JSDocNullableType */: + case 315 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 316 /* JSDocOptionalType */: + case 317 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 202 /* NamedTupleMember */: + case 203 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 196 /* ParenthesizedType */: - case 315 /* JSDocNonNullableType */: - case 309 /* JSDocTypeExpression */: + case 197 /* ParenthesizedType */: + case 316 /* JSDocNonNullableType */: + case 310 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 191 /* RestType */: + case 192 /* RestType */: return getTypeFromRestTypeNode(node); - case 318 /* JSDocVariadicType */: + case 319 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 322 /* JSDocTypeLiteral */: - case 317 /* JSDocFunctionType */: - case 323 /* JSDocSignature */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 188 /* TypeLiteral */: + case 323 /* JSDocTypeLiteral */: + case 318 /* JSDocFunctionType */: + case 324 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 198 /* TypeOperator */: + case 199 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 199 /* IndexedAccessType */: + case 200 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 200 /* MappedType */: + case 201 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 195 /* InferType */: + case 196 /* InferType */: return getTypeFromInferTypeNode(node); - case 203 /* TemplateLiteralType */: + case 204 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 205 /* ImportType */: + case 206 /* ImportType */: return getTypeFromImportTypeNode(node); + // This function assumes that an identifier, qualified name, or property access expression is a type expression + // Callers should first ensure this by calling `isPartOfTypeNode` + // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s. case 80 /* Identifier */: - case 166 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: + case 167 /* QualifiedName */: + case 212 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -71970,6 +73836,9 @@ function createTypeChecker(host) { const forwardInferences = context.inferences.slice(index); return createTypeMapper(map(forwardInferences, (i) => i.typeParameter), map(forwardInferences, () => unknownType)); } + function createOuterReturnMapper(context) { + return context.outerReturnMapper ?? (context.outerReturnMapper = mergeTypeMappers(context.returnMapper, cloneInferenceContext(context).mapper)); + } function combineTypeMappers(mapper1, mapper2) { return mapper1 ? makeCompositeTypeMapper(4 /* Composite */, mapper1, mapper2) : mapper2; } @@ -72049,7 +73918,7 @@ function createTypeChecker(host) { const declaration = type.objectFlags & 4 /* Reference */ ? type.node : type.objectFlags & 8388608 /* InstantiationExpressionType */ ? type.node : type.symbol.declarations[0]; const links = getNodeLinks(declaration); const target = type.objectFlags & 4 /* Reference */ ? links.resolvedType : type.objectFlags & 64 /* Instantiated */ ? type.target : type; - let typeParameters = type.objectFlags & 134217728 /* SingleSignatureType */ ? type.outerTypeParameters : links.outerTypeParameters; + let typeParameters = links.outerTypeParameters; if (!typeParameters) { let outerTypeParameters = getOuterTypeParameters( declaration, @@ -72070,19 +73939,17 @@ function createTypeChecker(host) { const typeArguments = map(typeParameters, (t) => getMappedType(t, combinedMapper)); const newAliasSymbol = aliasSymbol || type.aliasSymbol; const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); - const id = (type.objectFlags & 134217728 /* SingleSignatureType */ ? "S" : "") + getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments); + const id = getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments); if (!target.instantiations) { target.instantiations = /* @__PURE__ */ new Map(); target.instantiations.set(getTypeListId(typeParameters) + getAliasId(target.aliasSymbol, target.aliasTypeArguments), target); } let result = target.instantiations.get(id); if (!result) { - if (type.objectFlags & 134217728 /* SingleSignatureType */) { - result = instantiateAnonymousType(type, mapper); - target.instantiations.set(id, result); - return result; + let newMapper = createTypeMapper(typeParameters, typeArguments); + if (target.objectFlags & 134217728 /* SingleSignatureType */ && mapper) { + newMapper = combineTypeMappers(newMapper, mapper); } - const newMapper = createTypeMapper(typeParameters, typeArguments); result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); target.instantiations.set(id, result); const resultObjectFlags = getObjectFlags(result); @@ -72102,13 +73969,13 @@ function createTypeChecker(host) { return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 184 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 206 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 242 /* Block */ || n.kind === 195 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -72117,17 +73984,18 @@ function createTypeChecker(host) { return true; function containsReference(node2) { switch (node2.kind) { - case 197 /* ThisType */: + case 198 /* ThisType */: return !!tp.isThisType; case 80 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 186 /* TypeQuery */: + // use worker because we're looking for === equality + case 187 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); if (!isThisIdentifier(firstIdentifier)) { const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; - const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : ( + const tpScope = tpDeclaration.kind === 169 /* TypeParameter */ ? tpDeclaration.parent : ( // Type parameter is a regular type parameter, e.g. foo tp.isThisType ? tpDeclaration : ( // Type parameter is the this type, and its declaration is the class declaration. @@ -72139,8 +74007,8 @@ function createTypeChecker(host) { } } return true; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -72234,9 +74102,6 @@ function createTypeChecker(host) { if (type.objectFlags & 8388608 /* InstantiationExpressionType */) { result.node = type.node; } - if (type.objectFlags & 134217728 /* SingleSignatureType */) { - result.outerTypeParameters = type.outerTypeParameters; - } result.target = type; result.mapper = mapper; result.aliasSymbol = aliasSymbol || type.aliasSymbol; @@ -72281,10 +74146,25 @@ function createTypeChecker(host) { error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + const index = findActiveMapper(mapper); + if (index === -1) { + pushActiveMapper(mapper); + } + const key = type.id + getAliasId(aliasSymbol, aliasTypeArguments); + const mapperCache = activeTypeMappersCaches[index !== -1 ? index : activeTypeMappersCount - 1]; + const cached = mapperCache.get(key); + if (cached) { + return cached; + } totalInstantiationCount++; instantiationCount++; instantiationDepth++; const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments); + if (index === -1) { + popActiveMapper(); + } else { + mapperCache.set(key, result); + } instantiationDepth--; return result; } @@ -72401,35 +74281,35 @@ function createTypeChecker(host) { return type.restrictiveInstantiation; } function instantiateIndexInfo(info, mapper) { - return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); + return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration, info.components); } function isContextSensitive(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 175 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 292 /* JsxAttributes */: + case 293 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 291 /* JsxAttribute */: { + case 292 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 294 /* JsxExpression */: { + case 295 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -72443,7 +74323,7 @@ function createTypeChecker(host) { if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) { return false; } - if (node.body.kind !== 241 /* Block */) { + if (node.body.kind !== 242 /* Block */) { return isContextSensitive(node.body); } return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression)); @@ -72536,27 +74416,28 @@ function createTypeChecker(host) { return true; } switch (node.kind) { - case 234 /* AsExpression */: + case 235 /* AsExpression */: if (!isConstAssertion(node)) { break; } - case 294 /* JsxExpression */: - case 217 /* ParenthesizedExpression */: + // fallthrough + case 295 /* JsxExpression */: + case 218 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 28 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 292 /* JsxAttributes */: + case 293 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -72861,16 +74742,16 @@ function createTypeChecker(host) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 12 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: + case 285 /* JsxElement */: + case 286 /* JsxSelfClosingElement */: + case 289 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -73008,13 +74889,13 @@ function createTypeChecker(host) { continue; } switch (prop.kind) { - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 304 /* ShorthandPropertyAssignment */: + case 179 /* SetAccessor */: + case 178 /* GetAccessor */: + case 175 /* MethodDeclaration */: + case 305 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -73088,7 +74969,7 @@ function createTypeChecker(host) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 175 /* MethodDeclaration */ && kind !== 174 /* MethodSignature */ && kind !== 177 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -73232,6 +75113,10 @@ function createTypeChecker(host) { function containsUndefinedType(type) { return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */); } + function containsNonMissingUndefinedType(type) { + const candidate = type.flags & 1048576 /* Union */ ? type.types[0] : type; + return !!(candidate.flags & 32768 /* Undefined */) && candidate !== missingType; + } function isStringIndexSignatureOnlyType(type) { return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false; } @@ -73246,7 +75131,7 @@ function createTypeChecker(host) { } const id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol); const entry = enumRelation.get(id); - if (entry !== void 0 && !(!(entry & 4 /* Reported */) && entry & 2 /* Failed */ && errorReporter)) { + if (entry !== void 0 && !(entry & 2 /* Failed */ && errorReporter)) { return !!(entry & 1 /* Succeeded */); } const targetEnumType = getTypeOfSymbol(targetSymbol); @@ -73261,38 +75146,32 @@ function createTypeChecker(host) { void 0, 64 /* UseFullyQualifiedType */ )); - enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); - } else { - enumRelation.set(id, 2 /* Failed */); } + enumRelation.set(id, 2 /* Failed */); return false; } - const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */)).value; - const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */)).value; + const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 307 /* EnumMember */)).value; + const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 307 /* EnumMember */)).value; if (sourceValue !== targetValue) { const sourceIsString = typeof sourceValue === "string"; const targetIsString = typeof targetValue === "string"; if (sourceValue !== void 0 && targetValue !== void 0) { - if (!errorReporter) { - enumRelation.set(id, 2 /* Failed */); - } else { + if (errorReporter) { const escapedSource = sourceIsString ? `"${escapeString(sourceValue)}"` : sourceValue; const escapedTarget = targetIsString ? `"${escapeString(targetValue)}"` : targetValue; errorReporter(Diagnostics.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, symbolName(targetSymbol), symbolName(targetProperty), escapedTarget, escapedSource); - enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); } + enumRelation.set(id, 2 /* Failed */); return false; } if (sourceIsString || targetIsString) { - if (!errorReporter) { - enumRelation.set(id, 2 /* Failed */); - } else { + if (errorReporter) { const knownStringValue = sourceValue ?? targetValue; Debug.assert(typeof knownStringValue === "string"); const escapedValue = `"${escapeString(knownStringValue)}"`; errorReporter(Diagnostics.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, symbolName(targetSymbol), symbolName(targetProperty), escapedValue); - enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); } + enumRelation.set(id, 2 /* Failed */); return false; } } @@ -73450,7 +75329,7 @@ function createTypeChecker(host) { /*ignoreConstraints*/ false ); - relation.set(id, 4 /* Reported */ | 2 /* Failed */); + relation.set(id, 2 /* Failed */ | (relationCount <= 0 ? 32 /* ComplexityOverflow */ : 64 /* StackDepthOverflow */)); (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1; const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target)); @@ -73637,7 +75516,7 @@ function createTypeChecker(host) { const [sourceType, targetType] = getTypeNamesForErrorDisplay(source2, target2); let generalizedSource = source2; let generalizedSourceType = sourceType; - if (isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) { + if (!(target2.flags & 131072 /* Never */) && isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) { generalizedSource = getBaseTypeOfLiteralType(source2); Debug.assert(!isTypeAssignableTo(generalizedSource, target2), "generalized source shouldn't be assignable"); generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource); @@ -74303,7 +76182,7 @@ function createTypeChecker(host) { ); const entry = relation.get(id); if (entry !== void 0) { - if (reportErrors2 && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { + if (reportErrors2 && entry & 2 /* Failed */ && !(entry & 96 /* Overflow */)) { } else { if (outofbandVarianceMarkerHandler) { const saved = entry & 24 /* ReportsMask */; @@ -74314,6 +76193,11 @@ function createTypeChecker(host) { instantiateType(source2, reportUnreliableMapper); } } + if (reportErrors2 && entry & 96 /* Overflow */) { + const message = entry & 32 /* ComplexityOverflow */ ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1; + reportError(message, typeToString(source2), typeToString(target2)); + overrideNextErrorInfo++; + } return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; } } @@ -74411,7 +76295,7 @@ function createTypeChecker(host) { } } } else { - relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); + relation.set(id, 2 /* Failed */ | propagatingVarianceFlags); relationCount--; resetMaybeStack( /*markAllAsSucceeded*/ @@ -74598,6 +76482,36 @@ function createTypeChecker(host) { } } } + if (sourceFlags & 134217728 /* TemplateLiteral */) { + if (arrayIsEqualTo(source2.texts, target2.texts)) { + const sourceTypes = source2.types; + const targetTypes = target2.types; + result2 = -1 /* True */; + for (let i = 0; i < sourceTypes.length; i++) { + if (!(result2 &= isRelatedTo( + sourceTypes[i], + targetTypes[i], + 3 /* Both */, + /*reportErrors*/ + false + ))) { + break; + } + } + return result2; + } + } + if (sourceFlags & 268435456 /* StringMapping */) { + if (source2.symbol === target2.symbol) { + return isRelatedTo( + source2.type, + target2.type, + 3 /* Both */, + /*reportErrors*/ + false + ); + } + } if (!(sourceFlags & 524288 /* Object */)) { return 0 /* False */; } @@ -75177,6 +77091,9 @@ function createTypeChecker(host) { false, targetIsOptional ); + if (effectiveTarget.flags & (relation === strictSubtypeRelation ? 1 /* Any */ : 3 /* AnyOrUnknown */)) { + return -1 /* True */; + } const effectiveSource = getTypeOfSourceProperty(sourceProp); return isRelatedTo( effectiveSource, @@ -75304,7 +77221,7 @@ function createTypeChecker(host) { const sourceArity = getTypeReferenceArity(source2); const targetArity = getTypeReferenceArity(target2); const sourceRestFlag = isTupleType(source2) ? source2.target.combinedFlags & 4 /* Rest */ : 4 /* Rest */; - const targetRestFlag = target2.target.combinedFlags & 4 /* Rest */; + const targetHasRestElement = !!(target2.target.combinedFlags & 12 /* Variable */); const sourceMinLength = isTupleType(source2) ? source2.target.minLength : 0; const targetMinLength = target2.target.minLength; if (!sourceRestFlag && sourceArity < targetMinLength) { @@ -75313,13 +77230,13 @@ function createTypeChecker(host) { } return 0 /* False */; } - if (!targetRestFlag && targetArity < sourceMinLength) { + if (!targetHasRestElement && targetArity < sourceMinLength) { if (reportErrors2) { reportError(Diagnostics.Source_has_0_element_s_but_target_allows_only_1, sourceMinLength, targetArity); } return 0 /* False */; } - if (!targetRestFlag && (sourceRestFlag || targetArity < sourceArity)) { + if (!targetHasRestElement && (sourceRestFlag || targetArity < sourceArity)) { if (reportErrors2) { if (sourceMinLength < targetMinLength) { reportError(Diagnostics.Target_requires_0_element_s_but_source_may_have_fewer, targetMinLength); @@ -75333,7 +77250,6 @@ function createTypeChecker(host) { const targetTypeArguments = getTypeArguments(target2); const targetStartCount = getStartElementCount(target2.target, 11 /* NonRest */); const targetEndCount = getEndElementCount(target2.target, 11 /* NonRest */); - const targetHasRestElement = target2.target.hasRestElement; let canExcludeDiscriminants = !!excludedProperties; for (let sourcePosition = 0; sourcePosition < sourceArity; sourcePosition++) { const sourceFlags = isTupleType(source2) ? source2.target.elementFlags[sourcePosition] : 4 /* Rest */; @@ -75520,7 +77436,7 @@ function createTypeChecker(host) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 177 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 177 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -75793,10 +77709,12 @@ function createTypeChecker(host) { for (let i = 0; i < types.length; i++) { if (include[i]) { const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); - if (targetType && related(getDiscriminatingType(), targetType)) { - matched = true; - } else { - include[i] = 3 /* Maybe */; + if (targetType) { + if (someType(getDiscriminatingType(), (t) => !!related(t, targetType))) { + matched = true; + } else { + include[i] = 3 /* Maybe */; + } } } } @@ -76179,9 +78097,13 @@ function createTypeChecker(host) { return types[0]; } const primaryTypes = strictNullChecks ? sameMap(types, (t) => filterType(t, (u) => !(u.flags & 98304 /* Nullable */))) : types; - const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : reduceLeft(primaryTypes, (s, t) => isTypeSubtypeOf(s, t) ? t : s); + const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : getSingleCommonSupertype(primaryTypes); return primaryTypes === types ? superTypeOrUnion : getNullableType(superTypeOrUnion, getCombinedTypeFlags(types) & 98304 /* Nullable */); } + function getSingleCommonSupertype(types) { + const candidate = reduceLeft(types, (s, t) => isTypeStrictSubtypeOf(s, t) ? t : s); + return every(types, (t) => t === candidate || isTypeStrictSubtypeOf(t, candidate)) ? candidate : reduceLeft(types, (s, t) => isTypeSubtypeOf(s, t) ? t : s); + } function getCommonSubtype(types) { return reduceLeft(types, (s, t) => isTypeSubtypeOf(t, s) ? t : s); } @@ -76217,7 +78139,7 @@ function createTypeChecker(host) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 212 /* PropertyAccessExpression */) { return void 0; } } @@ -76529,7 +78451,7 @@ function createTypeChecker(host) { } } } - const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly))); + const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly, info.declaration, info.components))); result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */); return result; } @@ -76573,6 +78495,7 @@ function createTypeChecker(host) { return type; } function reportWideningErrorsInType(type) { + var _a; let errorReported = false; if (getObjectFlags(type) & 65536 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { @@ -76580,27 +78503,28 @@ function createTypeChecker(host) { errorReported = true; } else { for (const t of type.types) { - if (reportWideningErrorsInType(t)) { - errorReported = true; - } + errorReported || (errorReported = reportWideningErrorsInType(t)); } } - } - if (isArrayOrTupleType(type)) { + } else if (isArrayOrTupleType(type)) { for (const t of getTypeArguments(type)) { - if (reportWideningErrorsInType(t)) { - errorReported = true; - } + errorReported || (errorReported = reportWideningErrorsInType(t)); } - } - if (isObjectLiteralType2(type)) { + } else if (isObjectLiteralType2(type)) { for (const p of getPropertiesOfObjectType(type)) { const t = getTypeOfSymbol(p); if (getObjectFlags(t) & 65536 /* ContainsWideningType */) { - if (!reportWideningErrorsInType(t)) { - error2(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); + errorReported = reportWideningErrorsInType(t); + if (!errorReported) { + const valueDeclaration = (_a = p.declarations) == null ? void 0 : _a.find((d) => { + var _a2; + return ((_a2 = d.symbol.valueDeclaration) == null ? void 0 : _a2.parent) === type.symbol.valueDeclaration; + }); + if (valueDeclaration) { + error2(valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); + errorReported = true; + } } - errorReported = true; } } } @@ -76614,12 +78538,12 @@ function createTypeChecker(host) { } let diagnostic; switch (declaration.kind) { - case 226 /* BinaryExpression */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + case 227 /* BinaryExpression */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 169 /* Parameter */: + case 170 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -76640,30 +78564,30 @@ function createTypeChecker(host) { } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 208 /* BindingElement */: + case 209 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 317 /* JSDocFunctionType */: + case 318 /* JSDocFunctionType */: error2(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 323 /* JSDocSignature */: + case 324 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { error2(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { - error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); + error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation, typeAsString); } else { error2(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); } @@ -76671,7 +78595,7 @@ function createTypeChecker(host) { } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 200 /* MappedType */: + case 201 /* MappedType */: if (noImplicitAny) { error2(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -76681,11 +78605,37 @@ function createTypeChecker(host) { } errorOrSuggestion(noImplicitAny, declaration, diagnostic, declarationNameToString(getNameOfDeclaration(declaration)), typeAsString); } + function shouldReportErrorsFromWideningWithContextualSignature(declaration, wideningKind) { + const signature = getContextualSignatureForFunctionLikeDeclaration(declaration); + if (!signature) { + return true; + } + let returnType = getReturnTypeOfSignature(signature); + const flags = getFunctionFlags(declaration); + switch (wideningKind) { + case 1 /* FunctionReturn */: + if (flags & 1 /* Generator */) { + returnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, !!(flags & 2 /* Async */)) ?? returnType; + } else if (flags & 2 /* Async */) { + returnType = getAwaitedTypeNoAlias(returnType) ?? returnType; + } + return isGenericType(returnType); + case 3 /* GeneratorYield */: + const yieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, !!(flags & 2 /* Async */)); + return !!yieldType && isGenericType(yieldType); + case 2 /* GeneratorNext */: + const nextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, !!(flags & 2 /* Async */)); + return !!nextType && isGenericType(nextType); + } + return false; + } function reportErrorsFromWidening(declaration, type, wideningKind) { addLazyDiagnostic(() => { - if (noImplicitAny && getObjectFlags(type) & 65536 /* ContainsWideningType */ && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) { - if (!reportWideningErrorsInType(type)) { - reportImplicitAny(declaration, type, wideningKind); + if (noImplicitAny && getObjectFlags(type) & 65536 /* ContainsWideningType */) { + if (!wideningKind || isFunctionLikeDeclaration(declaration) && shouldReportErrorsFromWideningWithContextualSignature(declaration, wideningKind)) { + if (!reportWideningErrorsInType(type)) { + reportImplicitAny(declaration, type, wideningKind); + } } } }); @@ -76784,7 +78734,7 @@ function createTypeChecker(host) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 175 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -76828,7 +78778,7 @@ function createTypeChecker(host) { if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) { return !!(objectFlags & 1048576 /* CouldContainTypeVariables */); } - const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 134217728 /* SingleSignatureType */ && !!length(type.outerTypeParameters) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); + const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); if (type.flags & 3899393 /* ObjectFlagsType */) { type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0); } @@ -76836,8 +78786,8 @@ function createTypeChecker(host) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 307 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 266 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 308 /* SourceFile */ ? true : n.kind === 268 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -76880,11 +78830,11 @@ function createTypeChecker(host) { } function inferTypeForHomomorphicMappedType(source, target, constraint) { const cacheKey = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(cacheKey)) { - return reverseMappedCache.get(cacheKey); + if (reverseHomomorphicMappedCache.has(cacheKey)) { + return reverseHomomorphicMappedCache.get(cacheKey); } const type = createReverseMappedType(source, target, constraint); - reverseMappedCache.set(cacheKey, type); + reverseHomomorphicMappedCache.set(cacheKey, type); return type; } function isPartiallyInferableType(type) { @@ -76979,7 +78929,7 @@ function createTypeChecker(host) { return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties)); } function tupleTypesDefinitelyUnrelated(source, target) { - return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength); + return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !(target.target.combinedFlags & 12 /* Variable */) && (!!(source.target.combinedFlags & 12 /* Variable */) || target.target.fixedLength < source.target.fixedLength); } function typesDefinitelyUnrelated(source, target) { return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) : !!getUnmatchedProperty( @@ -77059,7 +79009,7 @@ function createTypeChecker(host) { value, /*roundTripOnly*/ false - ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target)); + ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(source, target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target)); } if (source.flags & 134217728 /* TemplateLiteral */) { const texts = source.texts; @@ -77068,7 +79018,7 @@ function createTypeChecker(host) { return false; } function inferTypesFromTemplateLiteralType(source, target) { - return source.flags & 128 /* StringLiteral */ ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 /* TemplateLiteral */ ? arraysEqual(source.texts, target.texts) ? map(source.types, (s, i) => { + return source.flags & 128 /* StringLiteral */ ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 /* TemplateLiteral */ ? arrayIsEqualTo(source.texts, target.texts) ? map(source.types, (s, i) => { return isTypeAssignableTo(getBaseConstraintOrType(s), getBaseConstraintOrType(target.types[i])) ? s : getStringLikeTypeForType(s); }) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0; } @@ -77129,9 +79079,6 @@ function createTypeChecker(host) { pos = p; } } - function isTupleOfSelf(typeParameter, type) { - return isTupleType(type) && getTupleElementType(type, 0) === getIndexedAccessType(typeParameter, getNumberLiteralType(0)) && !getTypeOfPropertyOfType(type, "1"); - } function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) { let bivariant = false; let propagationType; @@ -77217,9 +79164,6 @@ function createTypeChecker(host) { inference.priority = priority; } if (priority === inference.priority) { - if (isTupleOfSelf(inference.typeParameter, candidate)) { - return; - } if (contravariant && !bivariant) { if (!contains(inference.contraCandidates, candidate)) { inference.contraCandidates = append(inference.contraCandidates, candidate); @@ -77597,7 +79541,7 @@ function createTypeChecker(host) { return; } const startLength = isTupleType(source) ? Math.min(source.target.fixedLength, target.target.fixedLength) : 0; - const endLength = Math.min(isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0); + const endLength = Math.min(isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, target.target.combinedFlags & 12 /* Variable */ ? getEndElementCount(target.target, 3 /* Fixed */) : 0); for (let i = 0; i < startLength; i++) { inferFromTypes(getTypeArguments(source)[i], elementTypes[i]); } @@ -77618,7 +79562,7 @@ function createTypeChecker(host) { } else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) { const param = (_a = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a.typeParameter; const constraint = param && getBaseConstraintOfType(param); - if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) { + if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) { const impliedArity = constraint.target.fixedLength; inferFromTypes(sliceTupleType(source, startLength, sourceArity - (startLength + impliedArity)), elementTypes[startLength]); inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength + impliedArity, endLength), elementTypes[startLength + 1]); @@ -77626,7 +79570,7 @@ function createTypeChecker(host) { } else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */) { const param = (_b = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _b.typeParameter; const constraint = param && getBaseConstraintOfType(param); - if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) { + if (constraint && isTupleType(constraint) && !(constraint.target.combinedFlags & 12 /* Variable */)) { const impliedArity = constraint.target.fixedLength; const endIndex = sourceArity - getEndElementCount(target.target, 3 /* Fixed */); const startIndex = endIndex - impliedArity; @@ -77696,7 +79640,7 @@ function createTypeChecker(host) { if (!(source.flags & 64 /* IsNonInferrable */)) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; + bivariant = bivariant || kind === 175 /* MethodDeclaration */ || kind === 174 /* MethodSignature */ || kind === 177 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; } @@ -77778,7 +79722,7 @@ function createTypeChecker(host) { const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0; const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0; if (inferredCovariantType || inferredContravariantType) { - const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)))); + const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & (131072 /* Never */ | 1 /* Any */)) && some(inference.contraCandidates, (t) => isTypeAssignableTo(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeAssignableTo(t, inferredCovariantType)))); inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType; fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType; } else if (context.flags & 1 /* NoDefault */) { @@ -77800,6 +79744,7 @@ function createTypeChecker(host) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } + clearActiveMapperCaches(); } return inference.inferredType; } @@ -77855,8 +79800,9 @@ function createTypeChecker(host) { if (isCallExpression(node.parent)) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } + // falls through default: - if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 305 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -77888,16 +79834,17 @@ function createTypeChecker(host) { const symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0; } + // falls through case 110 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 235 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 236 /* NonNullExpression */: + case 218 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && `${left}.${node.right.escapedText}`; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); @@ -77911,27 +79858,27 @@ function createTypeChecker(host) { } } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 217 /* ParenthesizedExpression */: - case 235 /* NonNullExpression */: + case 218 /* ParenthesizedExpression */: + case 236 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 236 /* MetaProperty */: - return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 237 /* MetaProperty */: + return target.kind === 237 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 80 /* Identifier */: case 81 /* PrivateIdentifier */: return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); @@ -77939,11 +79886,12 @@ function createTypeChecker(host) { return target.kind === 110 /* ThisKeyword */; case 108 /* SuperKeyword */: return target.kind === 108 /* SuperKeyword */; - case 235 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: + case 236 /* NonNullExpression */: + case 218 /* ParenthesizedExpression */: + case 239 /* SatisfiesExpression */: return isMatchingReference(source.expression, target); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); if (sourcePropertyName !== void 0) { const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; @@ -77958,9 +79906,9 @@ function createTypeChecker(host) { } } break; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -78111,7 +80059,7 @@ function createTypeChecker(host) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 304 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -78126,7 +80074,7 @@ function createTypeChecker(host) { } } } - if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 212 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -78165,6 +80113,9 @@ function createTypeChecker(host) { return isTypeAssignableTo(assignedType, reducedType) ? reducedType : declaredType; } function isFunctionObjectType(type) { + if (getObjectFlags(type) & 256 /* EvolvingArray */) { + return false; + } const resolved = resolveStructuredTypeMembers(type); return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType)); } @@ -78314,11 +80265,11 @@ function createTypeChecker(host) { ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 210 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 304 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 250 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 251 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -78335,21 +80286,21 @@ function createTypeChecker(host) { function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return stringType; - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 220 /* DeleteExpression */: + case 221 /* DeleteExpression */: return undefinedType; - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 230 /* SpreadElement */: + case 231 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -78357,7 +80308,7 @@ function createTypeChecker(host) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 207 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -78368,25 +80319,25 @@ function createTypeChecker(host) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 249 /* ForInStatement */) { + if (node.parent.parent.kind === 250 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 250 /* ForOfStatement */) { + if (node.parent.parent.kind === 251 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 261 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 261 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 209 /* BindingElement */ && node.parent.kind === 227 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 76 /* BarBarEqualsToken */: @@ -78401,10 +80352,10 @@ function createTypeChecker(host) { } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 218 /* ParenthesizedExpression */ || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 296 /* CaseClause */) { + if (clause.kind === 297 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -78420,12 +80371,12 @@ function createTypeChecker(host) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 297 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -78585,8 +80536,8 @@ function createTypeChecker(host) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 214 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 213 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 227 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -78609,7 +80560,7 @@ function createTypeChecker(host) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 251 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -78643,7 +80594,7 @@ function createTypeChecker(host) { return getExplicitThisType(node); case 108 /* SuperKeyword */: return checkSuperExpression(node); - case 211 /* PropertyAccessExpression */: { + case 212 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -78660,7 +80611,7 @@ function createTypeChecker(host) { } return void 0; } - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -78673,7 +80624,7 @@ function createTypeChecker(host) { if (isBinaryExpression(node)) { const rightType = checkNonNullExpression(node.right); funcType = getSymbolHasInstanceMethodOfObjectType(rightType); - } else if (node.parent.kind === 244 /* ExpressionStatement */) { + } else if (node.parent.kind === 245 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -78727,7 +80678,7 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 97 /* FalseKeyword */ || node.kind === 227 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -78855,11 +80806,11 @@ function createTypeChecker(host) { return isConstantVariable(symbol) || isParameterOrMutableLocalVariable(symbol) && !isSymbolAssigned(symbol) || !!symbol.valueDeclaration && isFunctionExpression(symbol.valueDeclaration); } break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: const rootDeclaration = getRootDeclaration(node.parent); return isParameter(rootDeclaration) || isCatchClauseVariableDeclaration(rootDeclaration) ? !isSomeSymbolAssigned(rootDeclaration) : isVariableDeclaration(rootDeclaration) && isVarConstLike2(rootDeclaration); } @@ -78880,7 +80831,7 @@ function createTypeChecker(host) { const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 236 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType; @@ -78949,7 +80900,7 @@ function createTypeChecker(host) { target.antecedent = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) { + if (container && container !== flowContainer && reference.kind !== 212 /* PropertyAccessExpression */ && reference.kind !== 213 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 220 /* ArrowFunction */)) { flow = container.flowNode; continue; } @@ -78969,7 +80920,7 @@ function createTypeChecker(host) { function getInitialOrAssignedType(flow) { const node = flow.node; return getNarrowableTypeForReference( - node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), + node.kind === 261 /* VariableDeclaration */ || node.kind === 209 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference ); } @@ -79002,13 +80953,13 @@ function createTypeChecker(host) { } if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike2(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { + if (init && (init.kind === 219 /* FunctionExpression */ || init.kind === 220 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 250 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -79022,7 +80973,7 @@ function createTypeChecker(host) { if (node.kind === 97 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 226 /* BinaryExpression */) { + if (node.kind === 227 /* BinaryExpression */) { if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -79062,13 +81013,13 @@ function createTypeChecker(host) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 214 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 214 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -79105,7 +81056,7 @@ function createTypeChecker(host) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.node); - } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 222 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.node); } else if (expr.kind === 112 /* TrueKeyword */) { type = narrowTypeBySwitchOnTrue(type, flow.node); @@ -79113,7 +81064,7 @@ function createTypeChecker(host) { if (strictNullChecks) { if (optionalChainContainsReference(expr, reference)) { type = narrowTypeBySwitchOptionalChainContainment(type, flow.node, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */))); - } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 222 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment(type, flow.node, (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined")); } } @@ -79232,7 +81183,7 @@ function createTypeChecker(host) { return getEvolvingArrayType(getUnionType(map(types, getElementTypeOfEvolvingArrayType))); } const result = recombineUnknownType(getUnionType(sameMap(types, finalizeEvolvingArrayType), subtypeReduction)); - if (result !== declaredType && result.flags & declaredType.flags & 1048576 /* Union */ && arraysEqual(result.types, declaredType.types)) { + if (result !== declaredType && result.flags & declaredType.flags & 1048576 /* Union */ && arrayIsEqualTo(result.types, declaredType.types)) { return declaredType; } return result; @@ -79241,7 +81192,7 @@ function createTypeChecker(host) { if (isBindingPattern(reference) || isFunctionExpressionOrArrowFunction(reference) || isObjectLiteralMethod(reference)) { if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - const declaration = symbol.valueDeclaration; + const declaration = getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; if (declaration && (isBindingElement(declaration) || isParameter(declaration)) && reference === declaration.parent && !declaration.initializer && !declaration.dotDotDotToken) { return declaration; } @@ -79376,10 +81327,10 @@ function createTypeChecker(host) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 222 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -79438,6 +81389,9 @@ function createTypeChecker(host) { break; case 28 /* CommaToken */: return narrowType(type, expr.right, assumeTrue); + // Ordinarily we won't see && and || expressions in control flow analysis because the Binder breaks those + // expressions down to individual conditional control flows. However, we may encounter them when analyzing + // aliased conditional expressions. case 56 /* AmpersandAmpersandToken */: return assumeTrue ? narrowType( narrowType( @@ -79647,7 +81601,7 @@ function createTypeChecker(host) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 298 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -79657,11 +81611,11 @@ function createTypeChecker(host) { return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType)); } function narrowTypeBySwitchOnTrue(type, { switchStatement, clauseStart, clauseEnd }) { - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 298 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; for (let i = 0; i < clauseStart; i++) { const clause = switchStatement.caseBlock.clauses[i]; - if (clause.kind === 296 /* CaseClause */) { + if (clause.kind === 297 /* CaseClause */) { type = narrowType( type, clause.expression, @@ -79673,7 +81627,7 @@ function createTypeChecker(host) { if (hasDefaultClause) { for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) { const clause = switchStatement.caseBlock.clauses[i]; - if (clause.kind === 296 /* CaseClause */) { + if (clause.kind === 297 /* CaseClause */) { type = narrowType( type, clause.expression, @@ -79685,7 +81639,7 @@ function createTypeChecker(host) { return type; } const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd); - return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType( + return getUnionType(map(clauses, (clause) => clause.kind === 297 /* CaseClause */ ? narrowType( type, clause.expression, /*assumeTrue*/ @@ -79785,6 +81739,7 @@ function createTypeChecker(host) { if (checkDerived) { return filterType(type, (t) => !isTypeDerivedFrom(t, candidate)); } + type = type.flags & 2 /* Unknown */ ? unknownUnionType : type; const trueType2 = getNarrowedType( type, candidate, @@ -79793,7 +81748,7 @@ function createTypeChecker(host) { /*checkDerived*/ false ); - return filterType(type, (t) => !isTypeSubsetOf(t, trueType2)); + return recombineUnknownType(filterType(type, (t) => !isTypeSubsetOf(t, trueType2))); } if (type.flags & 3 /* AnyOrUnknown */) { return candidate; @@ -79881,19 +81836,21 @@ function createTypeChecker(host) { } } } + // falls through case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 217 /* ParenthesizedExpression */: - case 235 /* NonNullExpression */: + case 218 /* ParenthesizedExpression */: + case 236 /* NonNullExpression */: + case 239 /* SatisfiesExpression */: return narrowType(type, expr.expression, assumeTrue); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: if (expr.operator === 54 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -79920,7 +81877,7 @@ function createTypeChecker(host) { } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { const type = removeOptionalTypeMarker( - isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression( + isWriteAccess(location) && location.kind === 212 /* PropertyAccessExpression */ ? checkPropertyAccessExpression( location, /*checkMode*/ void 0, @@ -79939,7 +81896,13 @@ function createTypeChecker(host) { return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 307 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 269 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 173 /* PropertyDeclaration */); + } + function isSymbolAssignedDefinitely(symbol) { + if (symbol.lastAssignmentPos !== void 0) { + return symbol.lastAssignmentPos < 0; + } + return isSymbolAssigned(symbol) && symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0; } function isSymbolAssigned(symbol) { return !isPastLastAssignment( @@ -79960,7 +81923,7 @@ function createTypeChecker(host) { markNodeAssignments(parent2); } } - return !symbol.lastAssignmentPos || location && symbol.lastAssignmentPos < location.pos; + return !symbol.lastAssignmentPos || location && Math.abs(symbol.lastAssignmentPos) < location.pos; } function isSomeSymbolAssigned(rootDeclaration) { Debug.assert(isVariableDeclaration(rootDeclaration) || isParameter(rootDeclaration)); @@ -79970,7 +81933,7 @@ function createTypeChecker(host) { if (node.kind === 80 /* Identifier */) { return isSymbolAssigned(getSymbolOfDeclaration(node.parent)); } - return some(node.elements, (e) => e.kind !== 232 /* OmittedExpression */ && isSomeSymbolAssignedWorker(e.name)); + return some(node.elements, (e) => e.kind !== 233 /* OmittedExpression */ && isSomeSymbolAssignedWorker(e.name)); } function hasParentWithAssignmentsMarked(node) { return !!findAncestor(node.parent, (node2) => isFunctionOrSourceFile(node2) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */)); @@ -79981,20 +81944,28 @@ function createTypeChecker(host) { function markNodeAssignments(node) { switch (node.kind) { case 80 /* Identifier */: - if (isAssignmentTarget(node)) { + const assigmentTarget = getAssignmentTargetKind(node); + if (assigmentTarget !== 0 /* None */) { const symbol = getResolvedSymbol(node); - if (isParameterOrMutableLocalVariable(symbol) && symbol.lastAssignmentPos !== Number.MAX_VALUE) { - const referencingFunction = findAncestor(node, isFunctionOrSourceFile); - const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile); - symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE; + const hasDefiniteAssignment = assigmentTarget === 1 /* Definite */ || symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0; + if (isParameterOrMutableLocalVariable(symbol)) { + if (symbol.lastAssignmentPos === void 0 || Math.abs(symbol.lastAssignmentPos) !== Number.MAX_VALUE) { + const referencingFunction = findAncestor(node, isFunctionOrSourceFile); + const declaringFunction = findAncestor(symbol.valueDeclaration, isFunctionOrSourceFile); + symbol.lastAssignmentPos = referencingFunction === declaringFunction ? extendAssignmentPosition(node, symbol.valueDeclaration) : Number.MAX_VALUE; + } + if (hasDefiniteAssignment && symbol.lastAssignmentPos > 0) { + symbol.lastAssignmentPos *= -1; + } } } return; - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: const exportDeclaration = node.parent.parent; - if (!node.isTypeOnly && !exportDeclaration.isTypeOnly && !exportDeclaration.moduleSpecifier) { + const name = node.propertyName || node.name; + if (!node.isTypeOnly && !exportDeclaration.isTypeOnly && !exportDeclaration.moduleSpecifier && name.kind !== 11 /* StringLiteral */) { const symbol = resolveEntityName( - node.propertyName || node.name, + name, 111551 /* Value */, /*ignoreErrors*/ true, @@ -80002,13 +81973,14 @@ function createTypeChecker(host) { true ); if (symbol && isParameterOrMutableLocalVariable(symbol)) { - symbol.lastAssignmentPos = Number.MAX_VALUE; + const sign = symbol.lastAssignmentPos !== void 0 && symbol.lastAssignmentPos < 0 ? -1 : 1; + symbol.lastAssignmentPos = sign * Number.MAX_VALUE; } } return; - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: return; } if (isTypeNode(node)) { @@ -80020,18 +81992,18 @@ function createTypeChecker(host) { let pos = node.pos; while (node && node.pos > declaration.pos) { switch (node.kind) { - case 243 /* VariableStatement */: - case 244 /* ExpressionStatement */: - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 254 /* WithStatement */: - case 255 /* SwitchStatement */: - case 258 /* TryStatement */: - case 263 /* ClassDeclaration */: + case 244 /* VariableStatement */: + case 245 /* ExpressionStatement */: + case 246 /* IfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 255 /* WithStatement */: + case 256 /* SwitchStatement */: + case 259 /* TryStatement */: + case 264 /* ClassDeclaration */: pos = node.end; } node = node.parent; @@ -80046,7 +82018,7 @@ function createTypeChecker(host) { return !!declaration && (isParameter(declaration) || isVariableDeclaration(declaration) && (isCatchClause(declaration.parent) || isMutableLocalVariableDeclaration(declaration))); } function isMutableLocalVariableDeclaration(declaration) { - return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 243 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent)); + return !!(declaration.parent.flags & 1 /* Let */) && !(getCombinedModifierFlags(declaration) & 32 /* Export */ || declaration.parent.parent.kind === 244 /* VariableStatement */ && isGlobalSourceFile(declaration.parent.parent.parent)); } function parameterInitializerContainsUndefined(declaration) { const links = getNodeLinks(declaration); @@ -80065,12 +82037,12 @@ function createTypeChecker(host) { return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 170 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 214 /* NewExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 212 /* PropertyAccessExpression */ || parent2.kind === 167 /* QualifiedName */ || parent2.kind === 214 /* CallExpression */ && parent2.expression === node || parent2.kind === 215 /* NewExpression */ && parent2.expression === node || parent2.kind === 213 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -80112,7 +82084,7 @@ function createTypeChecker(host) { if (!canCollectSymbolAliasAccessabilityData) { return; } - if (location.flags & 33554432 /* Ambient */) { + if (location.flags & 33554432 /* Ambient */ && !isPropertySignature(location) && !isPropertyDeclaration(location)) { return; } switch (hint) { @@ -80211,7 +82183,7 @@ function createTypeChecker(host) { const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(location) ? getWidenedType(leftType) : leftType); prop = isPrivateIdentifier(right) ? lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(apparentType, lexicallyScopedSymbol) || void 0 : getPropertyOfType(apparentType, right.escapedText); } - if (!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && location.parent.kind === 306 /* EnumMember */))) { + if (!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && location.parent.kind === 307 /* EnumMember */))) { markAliasReferenced(parentSymbol, location); } return; @@ -80235,15 +82207,16 @@ function createTypeChecker(host) { } function markJsxAliasReferenced(node) { if (!getJsxNamespaceContainerForImplicitImport(node)) { - const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.Cannot_find_name_0 : void 0; + const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0; const jsxFactoryNamespace = getJsxNamespace(node); const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node; + const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */; let jsxFactorySym; if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) { jsxFactorySym = resolveName( jsxFactoryLocation, jsxFactoryNamespace, - 111551 /* Value */, + shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, jsxFactoryRefErr, /*isUse*/ true @@ -80257,12 +82230,13 @@ function createTypeChecker(host) { } if (isJsxOpeningFragment(node)) { const file = getSourceFileOfNode(node); - const localJsxNamespace = getLocalJsxNamespace(file); - if (localJsxNamespace) { + const entity = getJsxFactoryEntity(file); + if (entity) { + const localJsxNamespace = getFirstIdentifier(entity).escapedText; resolveName( jsxFactoryLocation, localJsxNamespace, - 111551 /* Value */, + shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, jsxFactoryRefErr, /*isUse*/ true @@ -80288,6 +82262,9 @@ function createTypeChecker(host) { function markExportSpecifierAliasReferenced(location) { if (!location.parent.parent.moduleSpecifier && !location.isTypeOnly && !location.parent.parent.isTypeOnly) { const exportedName = location.propertyName || location.name; + if (exportedName.kind === 11 /* StringLiteral */) { + return; + } const symbol = resolveName( exportedName, exportedName.escapedText, @@ -80302,7 +82279,7 @@ function createTypeChecker(host) { const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); if (!target || getSymbolFlags(target) & 111551 /* Value */) { markExportAsReferenced(location); - markIdentifierAliasReferenced(location.propertyName || location.name); + markIdentifierAliasReferenced(exportedName); } } return; @@ -80316,7 +82293,7 @@ function createTypeChecker(host) { } checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -80324,22 +82301,22 @@ function createTypeChecker(host) { } } break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + const otherKind = node.kind === 178 /* GetAccessor */ ? 179 /* SetAccessor */ : 178 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 169 /* Parameter */: + case 170 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { @@ -80418,7 +82395,7 @@ function createTypeChecker(host) { markAliasSymbolAsReferenced(rootSymbol); } else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */ && !symbolIsValue(rootSymbol) && !some(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) { const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); - const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2); + const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration); if (aliasDeclaration) { addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName))); } @@ -80442,22 +82419,22 @@ function createTypeChecker(host) { ); } } - function getNarrowedTypeOfSymbol(symbol, location, checkMode) { + function getNarrowedTypeOfSymbol(symbol, location) { var _a; - const type = getTypeOfSymbol(symbol, checkMode); + const type = getTypeOfSymbol(symbol); const declaration = symbol.valueDeclaration; if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; const rootDeclaration = getRootDeclaration(parent2); - if (rootDeclaration.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 169 /* Parameter */) { + if (rootDeclaration.kind === 261 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 170 /* Parameter */) { const links = getNodeLinks(parent2); if (!(links.flags & 4194304 /* InCheckIdentifier */)) { links.flags |= 4194304 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); links.flags &= ~4194304 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 169 /* Parameter */ && isSomeSymbolAssigned(rootDeclaration))) { + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 170 /* Parameter */ && isSomeSymbolAssigned(rootDeclaration))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -80507,14 +82484,18 @@ function createTypeChecker(host) { function checkIdentifierCalculateNodeCheckFlags(node, symbol) { if (isThisInTypeQuery(node)) return; if (symbol === argumentsSymbol) { - if (isInPropertyInitializerOrClassStaticBlock(node)) { - error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); + if (isInPropertyInitializerOrClassStaticBlock( + node, + /*ignoreArrowFunctions*/ + true + )) { + error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks); return; } let container = getContainingFunction(node); if (container) { if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 220 /* ArrowFunction */) { error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 1024 /* Async */)) { error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method); @@ -80545,7 +82526,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 307 /* SourceFile */ && container.parent !== declaration) { + while (container.kind !== 308 /* SourceFile */ && container.parent !== declaration) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -80554,7 +82535,7 @@ function createTypeChecker(host) { false ); } - if (container.kind !== 307 /* SourceFile */) { + if (container.kind !== 308 /* SourceFile */) { getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */; getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */; getNodeLinks(node).flags |= 536870912 /* ConstructorReference */; @@ -80583,7 +82564,11 @@ function createTypeChecker(host) { } const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); let declaration = localOrExportSymbol.valueDeclaration; - let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode); + const immediateDeclaration = declaration; + if (declaration && declaration.kind === 209 /* BindingElement */ && contains(contextualBindingPatterns, declaration.parent) && findAncestor(node, (parent2) => parent2 === declaration.parent)) { + return nonInferrableAnyType; + } + let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node); const assignmentKind = getAssignmentTargetKind(node); if (assignmentKind) { if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) { @@ -80614,18 +82599,19 @@ function createTypeChecker(host) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 170 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; const typeIsAutomatic = type === autoType || type === autoArrayType; - const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) { + const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 236 /* NonNullExpression */; + while (flowContainer !== declarationContainer && (flowContainer.kind === 219 /* FunctionExpression */ || flowContainer.kind === 220 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameterOrMutableLocalVariable(localOrExportSymbol) && isPastLastAssignment(localOrExportSymbol, node))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; + const isNeverInitialized = immediateDeclaration && isVariableDeclaration(immediateDeclaration) && !immediateDeclaration.initializer && !immediateDeclaration.exclamationToken && isMutableLocalVariableDeclaration(immediateDeclaration) && !isSymbolAssignedDefinitely(symbol); + const assumeInitialized = isParameter2 || isAlias || isOuterVariable && !isNeverInitialized || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 282 /* ExportSpecifier */) || node.parent.kind === 236 /* NonNullExpression */ || declaration.kind === 261 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type); const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { @@ -80679,7 +82665,7 @@ function createTypeChecker(host) { )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 300 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -80689,7 +82675,7 @@ function createTypeChecker(host) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -80708,7 +82694,7 @@ function createTypeChecker(host) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 262 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */; } @@ -80725,13 +82711,13 @@ function createTypeChecker(host) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 217 /* ParenthesizedExpression */) { + while (current.parent.kind === 218 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 225 /* PrefixUnaryExpression */ || current.parent.kind === 226 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; } @@ -80742,7 +82728,7 @@ function createTypeChecker(host) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { + if (container.kind === 173 /* PropertyDeclaration */ || container.kind === 177 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -80787,11 +82773,11 @@ function createTypeChecker(host) { ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 176 /* Constructor */) { + if (container.kind === 177 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 219 /* ArrowFunction */) { + if (container.kind === 220 /* ArrowFunction */) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -80800,7 +82786,7 @@ function createTypeChecker(host) { ); capturedByArrowFunction = true; } - if (container.kind === 167 /* ComputedPropertyName */) { + if (container.kind === 168 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -80817,10 +82803,10 @@ function createTypeChecker(host) { error2(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: error2(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: error2(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; } @@ -80912,13 +82898,13 @@ function createTypeChecker(host) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 219 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 175 /* MethodDeclaration */ && container.parent.kind === 211 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 219 /* FunctionExpression */ && container.parent.kind === 304 /* PropertyAssignment */ && container.parent.parent.kind === 211 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 219 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; @@ -80935,10 +82921,10 @@ function createTypeChecker(host) { } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 170 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 214 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -80948,7 +82934,7 @@ function createTypeChecker(host) { let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 219 /* ArrowFunction */) { + while (container && container.kind === 220 /* ArrowFunction */) { if (hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; container = getSuperContainer( container, @@ -80961,19 +82947,19 @@ function createTypeChecker(host) { } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); - if (current && current.kind === 167 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 168 /* ComputedPropertyName */); + if (current && current.kind === 168 /* ComputedPropertyName */) { error2(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { error2(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 211 /* ObjectLiteralExpression */)) { error2(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { error2(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 177 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -80989,7 +82975,7 @@ function createTypeChecker(host) { nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 175 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -80999,7 +82985,7 @@ function createTypeChecker(host) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 210 /* ObjectLiteralExpression */) { + if (container.parent.kind === 211 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error2(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; @@ -81020,20 +83006,20 @@ function createTypeChecker(host) { if (!baseClassType) { return errorType; } - if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 177 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error2(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 176 /* Constructor */; + return container2.kind === 177 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 211 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; + return container2.kind === 175 /* MethodDeclaration */ || container2.kind === 174 /* MethodSignature */ || container2.kind === 178 /* GetAccessor */ || container2.kind === 179 /* SetAccessor */ || container2.kind === 173 /* PropertyDeclaration */ || container2.kind === 176 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */; + return container2.kind === 175 /* MethodDeclaration */ || container2.kind === 174 /* MethodSignature */ || container2.kind === 178 /* GetAccessor */ || container2.kind === 179 /* SetAccessor */ || container2.kind === 173 /* PropertyDeclaration */ || container2.kind === 172 /* PropertySignature */ || container2.kind === 177 /* Constructor */; } } } @@ -81041,7 +83027,7 @@ function createTypeChecker(host) { } } function getContainingObjectLiteral(func) { - return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 175 /* MethodDeclaration */ || func.kind === 178 /* GetAccessor */ || func.kind === 179 /* SetAccessor */) && func.parent.kind === 211 /* ObjectLiteralExpression */ ? func.parent : func.kind === 219 /* FunctionExpression */ && func.parent.kind === 304 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -81059,7 +83045,7 @@ function createTypeChecker(host) { if (thisType) { return thisType; } - if (literal.parent.kind !== 303 /* PropertyAssignment */) { + if (literal.parent.kind !== 304 /* PropertyAssignment */) { break; } literal = literal.parent.parent; @@ -81071,7 +83057,7 @@ function createTypeChecker(host) { } } function getContextualThisParameterType(func) { - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 220 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -81154,11 +83140,11 @@ function createTypeChecker(host) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 169 /* Parameter */: + case 170 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -81167,9 +83153,9 @@ function createTypeChecker(host) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 209 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 207 /* ArrayBindingPattern */) { + if (parent2.name.kind === 208 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; return getContextualTypeForElementExpression(parentType, index); @@ -81358,7 +83344,7 @@ function createTypeChecker(host) { return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 215 /* TaggedTemplateExpression */) { + if (template.parent.kind === 216 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -81530,46 +83516,108 @@ function createTypeChecker(host) { function isCircularMappedProperty(symbol) { return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0); } + function isExcludedMappedPropertyName(constraint, propertyNameType) { + if (constraint.flags & 16777216 /* Conditional */) { + const type = constraint; + return !!(getReducedType(getTrueTypeFromConditionalType(type)).flags & 131072 /* Never */) && getActualTypeVariable(getFalseTypeFromConditionalType(type)) === getActualTypeVariable(type.checkType) && isTypeAssignableTo(propertyNameType, type.extendsType); + } + if (constraint.flags & 2097152 /* Intersection */) { + return some(constraint.types, (t) => isExcludedMappedPropertyName(t, propertyNameType)); + } + return false; + } function getTypeOfPropertyOfContextualType(type, name, nameType) { return mapType( type, (t) => { - var _a; - if (isGenericMappedType(t) && !t.declaration.nameType) { - const constraint = getConstraintTypeFromMappedType(t); - const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint; - const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name)); - if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) { - return substituteIndexedMappedType(t, propertyNameType); - } - } else if (t.flags & 3670016 /* StructuredType */) { - const prop = getPropertyOfType(t, name); - if (prop) { - return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */)); + if (t.flags & 2097152 /* Intersection */) { + let types; + let indexInfoCandidates; + let ignoreIndexInfos = false; + for (const constituentType of t.types) { + if (!(constituentType.flags & 524288 /* Object */)) { + continue; + } + if (isGenericMappedType(constituentType) && getMappedTypeNameTypeKind(constituentType) !== 2 /* Remapping */) { + const substitutedType = getIndexedMappedTypeSubstitutedTypeOfContextualType(constituentType, name, nameType); + types = appendContextualPropertyTypeConstituent(types, substitutedType); + continue; + } + const propertyType = getTypeOfConcretePropertyOfContextualType(constituentType, name); + if (!propertyType) { + if (!ignoreIndexInfos) { + indexInfoCandidates = append(indexInfoCandidates, constituentType); + } + continue; + } + ignoreIndexInfos = true; + indexInfoCandidates = void 0; + types = appendContextualPropertyTypeConstituent(types, propertyType); } - if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) { - const restType = getElementTypeOfSliceOfTupleType( - t, - t.target.fixedLength, - /*endSkipCount*/ - 0, - /*writing*/ - false, - /*noReductions*/ - true - ); - if (restType) { - return restType; + if (indexInfoCandidates) { + for (const candidate of indexInfoCandidates) { + const indexInfoType = getTypeFromIndexInfosOfContextualType(candidate, name, nameType); + types = appendContextualPropertyTypeConstituent(types, indexInfoType); } } - return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type; + if (!types) { + return; + } + if (types.length === 1) { + return types[0]; + } + return getIntersectionType(types); } - return void 0; + if (!(t.flags & 524288 /* Object */)) { + return; + } + return isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== 2 /* Remapping */ ? getIndexedMappedTypeSubstitutedTypeOfContextualType(t, name, nameType) : getTypeOfConcretePropertyOfContextualType(t, name) ?? getTypeFromIndexInfosOfContextualType(t, name, nameType); }, /*noReductions*/ true ); } + function appendContextualPropertyTypeConstituent(types, type) { + return type ? append(types, type.flags & 1 /* Any */ ? unknownType : type) : types; + } + function getIndexedMappedTypeSubstitutedTypeOfContextualType(type, name, nameType) { + const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name)); + const constraint = getConstraintTypeFromMappedType(type); + if (type.nameType && isExcludedMappedPropertyName(type.nameType, propertyNameType) || isExcludedMappedPropertyName(constraint, propertyNameType)) { + return; + } + const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint; + if (!isTypeAssignableTo(propertyNameType, constraintOfConstraint)) { + return; + } + return substituteIndexedMappedType(type, propertyNameType); + } + function getTypeOfConcretePropertyOfContextualType(type, name) { + const prop = getPropertyOfType(type, name); + if (!prop || isCircularMappedProperty(prop)) { + return; + } + return removeMissingType(getTypeOfSymbol(prop), !!(prop.flags & 16777216 /* Optional */)); + } + function getTypeFromIndexInfosOfContextualType(type, name, nameType) { + var _a; + if (isTupleType(type) && isNumericLiteralName(name) && +name >= 0) { + const restType = getElementTypeOfSliceOfTupleType( + type, + type.target.fixedLength, + /*endSkipCount*/ + 0, + /*writing*/ + false, + /*noReductions*/ + true + ); + if (restType) { + return restType; + } + } + return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(type), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type; + } function getContextualTypeForObjectLiteralMethod(node, contextFlags) { Debug.assert(isObjectLiteralMethod(node)); if (node.flags & 67108864 /* InWithStatement */) { @@ -81633,7 +83681,7 @@ function createTypeChecker(host) { return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */)); } const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0; - const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0; + const fixedEndLength = offset > 0 && t.target.combinedFlags & 12 /* Variable */ ? getEndElementCount(t.target, 3 /* Fixed */) : 0; if (offset > 0 && offset <= fixedEndLength) { return getTypeArguments(t)[getTypeReferenceArity(t) - offset]; } @@ -81708,17 +83756,17 @@ function createTypeChecker(host) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 80 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: + case 212 /* PropertyAccessExpression */: + case 218 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -81735,15 +83783,15 @@ function createTypeChecker(host) { if (!p.symbol) { return false; } - if (p.kind === 303 /* PropertyAssignment */) { + if (p.kind === 304 /* PropertyAssignment */) { return isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); } - if (p.kind === 304 /* ShorthandPropertyAssignment */) { + if (p.kind === 305 /* ShorthandPropertyAssignment */) { return isDiscriminantProperty(contextualType, p.symbol.escapedName); } return false; }), - (prop) => [() => getContextFreeTypeOfExpression(prop.kind === 303 /* PropertyAssignment */ ? prop.initializer : prop.name), prop.symbol.escapedName] + (prop) => [() => getContextFreeTypeOfExpression(prop.kind === 304 /* PropertyAssignment */ ? prop.initializer : prop.name), prop.symbol.escapedName] ), map( filter(getPropertiesOfType(contextualType), (s) => { @@ -81768,7 +83816,7 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 292 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -81847,47 +83895,47 @@ function createTypeChecker(host) { } const { parent: parent2 } = node; switch (parent2.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 208 /* BindingElement */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 209 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 219 /* ArrowFunction */: - case 253 /* ReturnStatement */: + case 220 /* ArrowFunction */: + case 254 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 223 /* AwaitExpression */: + case 224 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 170 /* Decorator */: + case 171 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 209 /* ArrayLiteralExpression */: { + case 210 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const elementIndex = indexOfNode(arrayLiteral.elements, node); const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements)); return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last); } - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 239 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 228 /* TemplateExpression */); + case 240 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 229 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 217 /* ParenthesizedExpression */: { + case 218 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -81899,21 +83947,21 @@ function createTypeChecker(host) { } return getContextualType2(parent2, contextFlags); } - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 291 /* JsxAttribute */: - case 293 /* JsxSpreadAttribute */: + case 292 /* JsxAttribute */: + case 294 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); - case 301 /* ImportAttribute */: + case 302 /* ImportAttribute */: return getContextualImportAttributeType(parent2); } return void 0; @@ -81938,6 +83986,9 @@ function createTypeChecker(host) { } function popContextualType() { contextualTypeCount--; + contextualTypeNodes[contextualTypeCount] = void 0; + contextualTypes[contextualTypeCount] = void 0; + contextualIsCache[contextualTypeCount] = void 0; } function findContextualNode(node, includeCaches) { for (let i = contextualTypeCount - 1; i >= 0; i--) { @@ -81954,6 +84005,8 @@ function createTypeChecker(host) { } function popInferenceContext() { inferenceContextCount--; + inferenceContextNodes[inferenceContextCount] = void 0; + inferenceContexts[inferenceContextCount] = void 0; } function getInferenceContext(node) { for (let i = inferenceContextCount - 1; i >= 0; i--) { @@ -81962,6 +84015,29 @@ function createTypeChecker(host) { } } } + function pushActiveMapper(mapper) { + activeTypeMappers[activeTypeMappersCount] = mapper; + activeTypeMappersCaches[activeTypeMappersCount] ?? (activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map()); + activeTypeMappersCount++; + } + function popActiveMapper() { + activeTypeMappersCount--; + activeTypeMappers[activeTypeMappersCount] = void 0; + activeTypeMappersCaches[activeTypeMappersCount].clear(); + } + function findActiveMapper(mapper) { + for (let i = activeTypeMappersCount - 1; i >= 0; i--) { + if (mapper === activeTypeMappers[i]) { + return i; + } + } + return -1; + } + function clearActiveMapperCaches() { + for (let i = activeTypeMappersCount - 1; i >= 0; i--) { + activeTypeMappersCaches[i].clear(); + } + } function getContextualImportAttributeType(node) { return getTypeOfPropertyOfContextualType(getGlobalImportAttributesType( /*reportErrors*/ @@ -81982,7 +84058,7 @@ function createTypeChecker(host) { return getContextualTypeForArgumentAtIndex(node, 0); } function getEffectiveFirstArgumentForJsxSignature(signature, node) { - return getJsxReferenceKind(node) !== 0 /* Component */ ? getJsxPropsTypeFromCallSignature(signature, node) : getJsxPropsTypeFromClassType(signature, node); + return isJsxOpeningFragment(node) || getJsxReferenceKind(node) !== 0 /* Component */ ? getJsxPropsTypeFromCallSignature(signature, node) : getJsxPropsTypeFromClassType(signature, node); } function getJsxPropsTypeFromCallSignature(sig, context) { let propsType = getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType); @@ -82013,6 +84089,7 @@ function createTypeChecker(host) { return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation); } function getStaticTypeOfReferencedJsxConstructor(context) { + if (isJsxOpeningFragment(context)) return getJSXFragmentType(context); if (isJsxIntrinsicTagName(context.tagName)) { const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context); const fakeSignature = createSignatureForJSXIntrinsic(context, result); @@ -82112,13 +84189,14 @@ function createTypeChecker(host) { const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0; const paramSymbol = createSymbol( 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), - paramName || `arg${i}` + paramName || `arg${i}`, + isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0 ); paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; params[i] = paramSymbol; } if (needsExtraRestElement) { - const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args"); + const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */); restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount)); if (shorter === right) { restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); @@ -82133,8 +84211,13 @@ function createTypeChecker(host) { if (left.typeParameters && right.typeParameters) { paramMapper = createTypeMapper(right.typeParameters, left.typeParameters); } + let flags = (left.flags | right.flags) & (167 /* PropagatingFlags */ & ~1 /* HasRestParameter */); const declaration = left.declaration; const params = combineIntersectionParameters(left, right, paramMapper); + const lastParam = lastOrUndefined(params); + if (lastParam && getCheckFlags(lastParam) & 32768 /* RestParameter */) { + flags |= 1 /* HasRestParameter */; + } const thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper); const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); const result = createSignature( @@ -82147,7 +84230,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 167 /* PropagatingFlags */ + flags ); result.compositeKind = 2097152 /* Intersection */; result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -82178,7 +84261,7 @@ function createTypeChecker(host) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 175 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -82266,7 +84349,7 @@ function createTypeChecker(host) { return globalRegExpType; } function checkSpreadExpression(node, checkMode) { - if (languageVersion < 2 /* SpreadElements */) { + if (languageVersion < LanguageFeatureMinimumTarget.SpreadElements) { checkExternalEmitHelpers(node, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } const arrayOrIterableType = checkExpression(node.expression, checkMode); @@ -82276,7 +84359,7 @@ function createTypeChecker(host) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + return node.kind === 209 /* BindingElement */ && !!node.initializer || node.kind === 304 /* PropertyAssignment */ && hasDefaultValue(node.initializer) || node.kind === 305 /* ShorthandPropertyAssignment */ && !!node.objectAssignmentInitializer || node.kind === 227 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; } function isSpreadIntoCallOrNew(node) { const parent2 = walkUpParenthesizedExpressions(node.parent); @@ -82299,8 +84382,8 @@ function createTypeChecker(host) { let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 230 /* SpreadElement */) { - if (languageVersion < 2 /* SpreadElements */) { + if (e.kind === 231 /* SpreadElement */) { + if (languageVersion < LanguageFeatureMinimumTarget.SpreadElements) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } const spreadType = checkExpression(e.expression, checkMode, forceTuple); @@ -82323,7 +84406,7 @@ function createTypeChecker(host) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 233 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -82373,7 +84456,7 @@ function createTypeChecker(host) { } function isNumericName(name) { switch (name.kind) { - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return isNumericComputedName(name); case 80 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -82390,7 +84473,7 @@ function createTypeChecker(host) { function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 178 /* GetAccessor */ && node.parent.kind !== 179 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -82419,16 +84502,33 @@ function createTypeChecker(host) { const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0]; return isKnownSymbol(symbol) || firstDecl && isNamedDeclaration(firstDecl) && isComputedPropertyName(firstDecl.name) && isTypeAssignableToKind(checkComputedPropertyName(firstDecl.name), 4096 /* ESSymbol */); } - function getObjectLiteralIndexInfo(node, offset, properties, keyType) { + function isSymbolWithComputedName(symbol) { + var _a; + const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0]; + return firstDecl && isNamedDeclaration(firstDecl) && isComputedPropertyName(firstDecl.name); + } + function getObjectLiteralIndexInfo(isReadonly, offset, properties, keyType) { + var _a; const propTypes = []; + let components; for (let i = offset; i < properties.length; i++) { const prop = properties[i]; if (keyType === stringType && !isSymbolWithSymbolName(prop) || keyType === numberType && isSymbolWithNumericName(prop) || keyType === esSymbolType && isSymbolWithSymbolName(prop)) { propTypes.push(getTypeOfSymbol(properties[i])); + if (isSymbolWithComputedName(properties[i])) { + components = append(components, (_a = properties[i].declarations) == null ? void 0 : _a[0]); + } } } const unionType = propTypes.length ? getUnionType(propTypes, 2 /* Subtype */) : undefinedType; - return createIndexInfo(keyType, unionType, isConstContext(node)); + return createIndexInfo( + keyType, + unionType, + isReadonly, + /*declaration*/ + void 0, + components + ); } function getImmediateAliasedSymbol(symbol) { Debug.assert((symbol.flags & 2097152 /* Alias */) !== 0, "Should only get Alias here."); @@ -82445,7 +84545,6 @@ function createTypeChecker(host) { return links.immediateTarget; } function checkObjectLiteral(node, checkMode = 0 /* Normal */) { - var _a; const inDestructuringPattern = isAssignmentTarget(node); checkGrammarObjectLiteralExpression(node, inDestructuringPattern); const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0; @@ -82458,7 +84557,7 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 207 /* ObjectBindingPattern */ || contextualType.pattern.kind === 211 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -82477,13 +84576,13 @@ function createTypeChecker(host) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 168 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 304 /* PropertyAssignment */ || memberDecl.kind === 305 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 304 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 305 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -82500,11 +84599,8 @@ function createTypeChecker(host) { if (nameType) { prop.links.nameType = nameType; } - if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 303 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; - if (isOptional) { - prop.flags |= 16777216 /* Optional */; - } + if (inDestructuringPattern && hasDefaultValue(memberDecl)) { + prop.flags |= 16777216 /* Optional */; } else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512 /* ObjectLiteralPatternWithComputedProperties */)) { const impliedProp = getPropertyOfType(contextualType, member.escapedName); if (impliedProp) { @@ -82522,14 +84618,14 @@ function createTypeChecker(host) { prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 304 /* PropertyAssignment */ || memberDecl.kind === 175 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 304 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 305 /* SpreadAssignment */) { - if (languageVersion < 2 /* ObjectAssign */) { + } else if (memberDecl.kind === 306 /* SpreadAssignment */) { + if (languageVersion < LanguageFeatureMinimumTarget.ObjectAssign) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } if (propertiesArray.length > 0) { @@ -82557,7 +84653,7 @@ function createTypeChecker(host) { } continue; } else { - Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); + Debug.assert(memberDecl.kind === 178 /* GetAccessor */ || memberDecl.kind === 179 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -82579,21 +84675,6 @@ function createTypeChecker(host) { propertiesArray.push(member); } popContextualType(); - if (contextualTypeHasPattern) { - const rootPatternParent = findAncestor(contextualType.pattern.parent, (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */); - const spreadOrOutsideRootObject = findAncestor(node, (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */); - if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { - for (const prop of getPropertiesOfType(contextualType)) { - if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { - if (!(prop.flags & 16777216 /* Optional */)) { - error2(prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); - } - propertiesTable.set(prop.escapedName, prop); - propertiesArray.push(prop); - } - } - } - } if (isErrorType(spread)) { return errorType; } @@ -82610,9 +84691,10 @@ function createTypeChecker(host) { return createObjectLiteralType(); function createObjectLiteralType() { const indexInfos = []; - if (hasComputedStringProperty) indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, stringType)); - if (hasComputedNumberProperty) indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, numberType)); - if (hasComputedSymbolProperty) indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, esSymbolType)); + const isReadonly = isConstContext(node); + if (hasComputedStringProperty) indexInfos.push(getObjectLiteralIndexInfo(isReadonly, offset, propertiesArray, stringType)); + if (hasComputedNumberProperty) indexInfos.push(getObjectLiteralIndexInfo(isReadonly, offset, propertiesArray, numberType)); + if (hasComputedSymbolProperty) indexInfos.push(getObjectLiteralIndexInfo(isReadonly, offset, propertiesArray, esSymbolType)); const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, indexInfos); result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { @@ -82661,7 +84743,8 @@ function createTypeChecker(host) { ); } checkJsxChildren(node); - return getJsxElementTypeAt(node) || anyType; + const jsxElementType = getJsxElementTypeAt(node); + return isErrorType(jsxElementType) ? anyType : jsxElementType; } function isHyphenatedJsxName(name) { return name.includes("-"); @@ -82673,8 +84756,6 @@ function createTypeChecker(host) { return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType; } function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, checkMode = 0 /* Normal */) { - const attributes = openingLikeElement.attributes; - const contextualType = getContextualType2(attributes, 0 /* None */); const allAttributesTable = strictNullChecks ? createSymbolTable() : void 0; let attributesTable = createSymbolTable(); let spread = emptyJsxObjectType; @@ -82683,96 +84764,105 @@ function createTypeChecker(host) { let explicitlySpecifyChildrenAttribute = false; let objectFlags = 2048 /* JsxAttributes */; const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(openingLikeElement)); - for (const attributeDecl of attributes.properties) { - const member = attributeDecl.symbol; - if (isJsxAttribute(attributeDecl)) { - const exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= getObjectFlags(exprType) & 458752 /* PropagatingFlags */; - const attributeSymbol = createSymbol(4 /* Property */ | member.flags, member.escapedName); - attributeSymbol.declarations = member.declarations; - attributeSymbol.parent = member.parent; - if (member.valueDeclaration) { - attributeSymbol.valueDeclaration = member.valueDeclaration; - } - attributeSymbol.links.type = exprType; - attributeSymbol.links.target = member; - attributesTable.set(attributeSymbol.escapedName, attributeSymbol); - allAttributesTable == null ? void 0 : allAttributesTable.set(attributeSymbol.escapedName, attributeSymbol); - if (getEscapedTextOfJsxAttributeName(attributeDecl.name) === jsxChildrenPropertyName) { - explicitlySpecifyChildrenAttribute = true; - } - if (contextualType) { - const prop = getPropertyOfType(contextualType, member.escapedName); - if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier(attributeDecl.name)) { - addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText); + const isJsxOpenFragment = isJsxOpeningFragment(openingLikeElement); + let attributesSymbol; + let attributeParent = openingLikeElement; + if (!isJsxOpenFragment) { + const attributes = openingLikeElement.attributes; + attributesSymbol = attributes.symbol; + attributeParent = attributes; + const contextualType = getContextualType2(attributes, 0 /* None */); + for (const attributeDecl of attributes.properties) { + const member = attributeDecl.symbol; + if (isJsxAttribute(attributeDecl)) { + const exprType = checkJsxAttribute(attributeDecl, checkMode); + objectFlags |= getObjectFlags(exprType) & 458752 /* PropagatingFlags */; + const attributeSymbol = createSymbol(4 /* Property */ | member.flags, member.escapedName); + attributeSymbol.declarations = member.declarations; + attributeSymbol.parent = member.parent; + if (member.valueDeclaration) { + attributeSymbol.valueDeclaration = member.valueDeclaration; + } + attributeSymbol.links.type = exprType; + attributeSymbol.links.target = member; + attributesTable.set(attributeSymbol.escapedName, attributeSymbol); + allAttributesTable == null ? void 0 : allAttributesTable.set(attributeSymbol.escapedName, attributeSymbol); + if (getEscapedTextOfJsxAttributeName(attributeDecl.name) === jsxChildrenPropertyName) { + explicitlySpecifyChildrenAttribute = true; + } + if (contextualType) { + const prop = getPropertyOfType(contextualType, member.escapedName); + if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier(attributeDecl.name)) { + addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText); + } + } + if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(attributeDecl)) { + const inferenceContext = getInferenceContext(attributes); + Debug.assert(inferenceContext); + const inferenceNode = attributeDecl.initializer.expression; + addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); + } + } else { + Debug.assert(attributeDecl.kind === 294 /* JsxSpreadAttribute */); + if (attributesTable.size > 0) { + spread = getSpreadType( + spread, + createJsxAttributesTypeHelper(), + attributes.symbol, + objectFlags, + /*readonly*/ + false + ); + attributesTable = createSymbolTable(); + } + const exprType = getReducedType(checkExpression(attributeDecl.expression, checkMode & 2 /* Inferential */)); + if (isTypeAny(exprType)) { + hasSpreadAnyType = true; + } + if (isValidSpreadType(exprType)) { + spread = getSpreadType( + spread, + exprType, + attributes.symbol, + objectFlags, + /*readonly*/ + false + ); + if (allAttributesTable) { + checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl); + } + } else { + error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); + typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; } } - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(attributeDecl)) { - const inferenceContext = getInferenceContext(attributes); - Debug.assert(inferenceContext); - const inferenceNode = attributeDecl.initializer.expression; - addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); - } - } else { - Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */); + } + if (!hasSpreadAnyType) { if (attributesTable.size > 0) { spread = getSpreadType( spread, - createJsxAttributesType(), + createJsxAttributesTypeHelper(), attributes.symbol, objectFlags, /*readonly*/ false ); - attributesTable = createSymbolTable(); } - const exprType = getReducedType(checkExpression(attributeDecl.expression, checkMode & 2 /* Inferential */)); - if (isTypeAny(exprType)) { - hasSpreadAnyType = true; - } - if (isValidSpreadType(exprType)) { - spread = getSpreadType( - spread, - exprType, - attributes.symbol, - objectFlags, - /*readonly*/ - false - ); - if (allAttributesTable) { - checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl); - } - } else { - error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); - typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; - } - } - } - if (!hasSpreadAnyType) { - if (attributesTable.size > 0) { - spread = getSpreadType( - spread, - createJsxAttributesType(), - attributes.symbol, - objectFlags, - /*readonly*/ - false - ); } } - const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; - if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) { + const parent2 = openingLikeElement.parent; + if ((isJsxElement(parent2) && parent2.openingElement === openingLikeElement || isJsxFragment(parent2) && parent2.openingFragment === openingLikeElement) && getSemanticJsxChildren(parent2.children).length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { - error2(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); + error2(attributeParent, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); } - const contextualType2 = getApparentTypeOfContextualType( + const contextualType = isJsxOpeningElement(openingLikeElement) ? getApparentTypeOfContextualType( openingLikeElement.attributes, /*contextFlags*/ void 0 - ); - const childrenContextualType = contextualType2 && getTypeOfPropertyOfContextualType(contextualType2, jsxChildrenPropertyName); + ) : void 0; + const childrenContextualType = contextualType && getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName); const childrenPropSymbol = createSymbol(4 /* Property */, jsxChildrenPropertyName); childrenPropSymbol.links.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes)); childrenPropSymbol.valueDeclaration = factory.createPropertySignature( @@ -82784,14 +84874,14 @@ function createTypeChecker(host) { /*type*/ void 0 ); - setParent(childrenPropSymbol.valueDeclaration, attributes); + setParent(childrenPropSymbol.valueDeclaration, attributeParent); childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol; const childPropMap = createSymbolTable(); childPropMap.set(jsxChildrenPropertyName, childrenPropSymbol); spread = getSpreadType( spread, - createAnonymousType(attributes.symbol, childPropMap, emptyArray, emptyArray, emptyArray), - attributes.symbol, + createAnonymousType(attributesSymbol, childPropMap, emptyArray, emptyArray, emptyArray), + attributesSymbol, objectFlags, /*readonly*/ false @@ -82804,14 +84894,17 @@ function createTypeChecker(host) { if (typeToIntersect && spread !== emptyJsxObjectType) { return getIntersectionType([typeToIntersect, spread]); } - return typeToIntersect || (spread === emptyJsxObjectType ? createJsxAttributesType() : spread); - function createJsxAttributesType() { + return typeToIntersect || (spread === emptyJsxObjectType ? createJsxAttributesTypeHelper() : spread); + function createJsxAttributesTypeHelper() { objectFlags |= 8192 /* FreshLiteral */; - const result = createAnonymousType(attributes.symbol, attributesTable, emptyArray, emptyArray, emptyArray); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; - return result; + return createJsxAttributesType(objectFlags, attributesSymbol, attributesTable); } } + function createJsxAttributesType(objectFlags, attributesSymbol, attributesTable) { + const result = createAnonymousType(attributesSymbol, attributesTable, emptyArray, emptyArray, emptyArray); + result.objectFlags |= objectFlags | 8192 /* FreshLiteral */ | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; + return result; + } function checkJsxChildren(node, checkMode) { const childrenTypes = []; for (const child of node.children) { @@ -82819,7 +84912,7 @@ function createTypeChecker(host) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 294 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 295 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -82893,7 +84986,7 @@ function createTypeChecker(host) { return void 0; } const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */; - const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations; + const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed; const specifier = getJSXRuntimeImportSpecifier(file, runtimeImportSpecifier); const mod = resolveExternalModule(specifier || location, runtimeImportSpecifier, errorMessage, location); const result = mod && mod !== unknownSymbol ? getMergedSymbol(resolveSymbol(mod)) : void 0; @@ -82970,6 +85063,9 @@ function createTypeChecker(host) { return getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer, jsxNamespace); } function getJsxElementChildrenPropertyName(jsxNamespace) { + if (compilerOptions.jsx === 4 /* ReactJSX */ || compilerOptions.jsx === 5 /* ReactJSXDev */) { + return "children"; + } return getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer, jsxNamespace); } function getUninstantiatedJsxSignaturesOfType(elementType, caller) { @@ -83116,11 +85212,11 @@ function createTypeChecker(host) { checkGrammarJsxElement(node); } checkJsxPreconditions(node); - markLinkedReferences(node, 4 /* Jsx */); + markJsxAliasReferenced(node); + const sig = getResolvedSignature(node); + checkDeprecatedSignature(sig, node); if (isNodeOpeningLikeElement) { const jsxOpeningLikeNode = node; - const sig = getResolvedSignature(jsxOpeningLikeNode); - checkDeprecatedSignature(sig, node); const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode); if (elementTypeConstraint !== void 0) { const tagName = jsxOpeningLikeNode.tagName; @@ -83185,7 +85281,7 @@ function createTypeChecker(host) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 167 /* QualifiedName */ ? node.right : node.kind === 206 /* ImportType */ ? node : node.kind === 209 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -83269,8 +85365,21 @@ function createTypeChecker(host) { function getEnclosingClassFromThisParameter(node) { const thisParameter = getThisParameterFromNodeContext(node); let thisType = (thisParameter == null ? void 0 : thisParameter.type) && getTypeFromTypeNode(thisParameter.type); - if (thisType && thisType.flags & 262144 /* TypeParameter */) { - thisType = getConstraintOfTypeParameter(thisType); + if (thisType) { + if (thisType.flags & 262144 /* TypeParameter */) { + thisType = getConstraintOfTypeParameter(thisType); + } + } else { + const thisContainer = getThisContainer( + node, + /*includeArrowFunctions*/ + false, + /*includeClassComputedPropertyName*/ + false + ); + if (isFunctionLike(thisContainer)) { + thisType = getContextualThisParameterType(thisContainer); + } } if (thisType && getObjectFlags(thisType) & (3 /* ClassOrInterface */ | 4 /* Reference */)) { return getTargetType(thisType); @@ -83382,7 +85491,7 @@ function createTypeChecker(host) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 217 /* ParenthesizedExpression */) { + while (node.parent.kind === 218 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; @@ -83508,7 +85617,7 @@ function createTypeChecker(host) { const isAnyLike = isTypeAny(apparentType) || apparentType === silentNeverType; let prop; if (isPrivateIdentifier(right)) { - if (languageVersion < 9 /* PrivateNamesAndClassStaticBlocks */ || languageVersion < 99 /* ClassAndClassElementDecorators */ || !useDefineForClassFields) { + if (languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators || !useDefineForClassFields) { if (assignmentKind !== 0 /* None */) { checkExternalEmitHelpers(node, 1048576 /* ClassPrivateFieldSet */); } @@ -83563,7 +85672,7 @@ function createTypeChecker(host) { /*skipObjectFunctionPropertyAugment*/ isConstEnumObjectType(apparentType), /*includeTypeOnlyMembers*/ - node.kind === 166 /* QualifiedName */ + node.kind === 167 /* QualifiedName */ ); } markLinkedReferences(node, 2 /* Property */, prop, leftType); @@ -83657,7 +85766,7 @@ function createTypeChecker(host) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { + if (flowContainer.kind === 177 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { assumeUninitialized = true; } } @@ -83681,38 +85790,28 @@ function createTypeChecker(host) { const declarationName = idText(right); if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 256 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 264 /* ClassDeclaration */ && node.parent.kind !== 184 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)); } } - function isInPropertyInitializerOrClassStaticBlock(node) { + function isInPropertyInitializerOrClassStaticBlock(node, ignoreArrowFunctions) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return true; - case 303 /* PropertyAssignment */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 305 /* SpreadAssignment */: - case 167 /* ComputedPropertyName */: - case 239 /* TemplateSpan */: - case 294 /* JsxExpression */: - case 291 /* JsxAttribute */: - case 292 /* JsxAttributes */: - case 293 /* JsxSpreadAttribute */: - case 286 /* JsxOpeningElement */: - case 233 /* ExpressionWithTypeArguments */: - case 298 /* HeritageClause */: - return false; - case 219 /* ArrowFunction */: - case 244 /* ExpressionStatement */: - return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; + case 187 /* TypeQuery */: + case 288 /* JsxClosingElement */: + return "quit"; + case 220 /* ArrowFunction */: + return ignoreArrowFunctions ? false : "quit"; + case 242 /* Block */: + return isFunctionLikeDeclaration(node2.parent) && node2.parent.kind !== 220 /* ArrowFunction */ ? "quit" : false; default: - return isExpressionNode(node2) ? false : "quit"; + return false; } }); } @@ -83740,6 +85839,13 @@ function createTypeChecker(host) { return getIntersectionType(x); } function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { + const links = getNodeLinks(propNode); + const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set()); + const key = `${getTypeId(containingType)}|${isUncheckedJS}`; + if (cache.has(key)) { + return; + } + cache.add(key); let errorInfo; let relatedInfo; if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { @@ -83786,7 +85892,7 @@ function createTypeChecker(host) { addErrorOrSuggestion(!isUncheckedJS || errorInfo.code !== Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, resultDiagnostic); } function containerSeemsToBeEmptyDomElement(containingType) { - return compilerOptions.lib && !compilerOptions.lib.includes("dom") && everyContainedType(containingType, (type) => type.symbol && /^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType); + return compilerOptions.lib && !compilerOptions.lib.includes("lib.dom.d.ts") && everyContainedType(containingType, (type) => type.symbol && /^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType); } function typeHasStaticProperty(propName, containingType) { const prop = containingType.symbol && getPropertyOfType(getTypeOfSymbol(containingType.symbol), propName); @@ -83941,9 +86047,9 @@ function createTypeChecker(host) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -83951,7 +86057,7 @@ function createTypeChecker(host) { propertyName, getWidenedType(checkExpression(node.left)) ); - case 205 /* ImportType */: + case 206 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -83964,7 +86070,7 @@ function createTypeChecker(host) { function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, + node.kind === 212 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, /*isWrite*/ false, type, @@ -83997,7 +86103,7 @@ function createTypeChecker(host) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 261 /* VariableDeclarationList */) { + if (initializer.kind === 262 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -84018,7 +86124,7 @@ function createTypeChecker(host) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 250 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -84068,7 +86174,7 @@ function createTypeChecker(host) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 216 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); @@ -84119,7 +86225,7 @@ function createTypeChecker(host) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 231 /* SpreadElement */ || arg.kind === 238 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -84131,13 +86237,14 @@ function createTypeChecker(host) { return !!(t.flags & (16384 /* Void */ | 32768 /* Undefined */ | 2 /* Unknown */ | 1 /* Any */)); } function hasCorrectArity(node, args, signature, signatureHelpTrailingComma = false) { + if (isJsxOpeningFragment(node)) return true; let argCount; let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (node.kind === 216 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 228 /* TemplateExpression */) { + if (node.template.kind === 229 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -84145,9 +86252,9 @@ function createTypeChecker(host) { Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 170 /* Decorator */) { + } else if (node.kind === 171 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); - } else if (node.kind === 226 /* BinaryExpression */) { + } else if (node.kind === 227 /* BinaryExpression */) { argCount = 1; } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -84158,7 +86265,7 @@ function createTypeChecker(host) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 214 /* NewExpression */); + Debug.assert(node.kind === 215 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -84227,7 +86334,7 @@ function createTypeChecker(host) { return void 0; } function instantiateSignatureInContextOf(signature, contextualSignature, inferenceContext, compareTypes) { - const context = createInferenceContext(signature.typeParameters, signature, 0 /* None */, compareTypes); + const context = createInferenceContext(getTypeParametersForMapper(signature), signature, 0 /* None */, compareTypes); const restType = getEffectiveRestType(contextualSignature); const mapper = inferenceContext && (restType && restType.flags & 262144 /* TypeParameter */ ? inferenceContext.nonFixingMapper : inferenceContext.mapper); const sourceSignature = mapper ? instantiateSignature(contextualSignature, mapper) : contextualSignature; @@ -84258,7 +86365,7 @@ function createTypeChecker(host) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 170 /* Decorator */ && node.kind !== 226 /* BinaryExpression */) { + if (node.kind !== 171 /* Decorator */ && node.kind !== 227 /* BinaryExpression */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -84274,7 +86381,7 @@ function createTypeChecker(host) { inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128 /* ReturnType */); } const returnContext = createInferenceContext(signature.typeParameters, signature, context.flags); - const returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper); + const returnSourceType = instantiateType(contextualType, outerContext && createOuterReturnMapper(outerContext)); inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType); context.returnMapper = some(returnContext.inferences, hasInferenceCandidates) ? getMapperFromContext(cloneInferredPartOfContext(returnContext)) : void 0; } @@ -84295,7 +86402,7 @@ function createTypeChecker(host) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 232 /* OmittedExpression */) { + if (arg.kind !== 233 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -84323,11 +86430,11 @@ function createTypeChecker(host) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 231 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -84336,12 +86443,12 @@ function createTypeChecker(host) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 238 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 231 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -84351,7 +86458,7 @@ function createTypeChecker(host) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 238 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } else { names.push(void 0); @@ -84404,9 +86511,9 @@ function createTypeChecker(host) { } return 2 /* Mixed */; } - function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer) { + function checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer) { const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); - const attributesType = checkExpressionWithContextualType( + const attributesType = isJsxOpeningFragment(node) ? createJsxAttributesTypeFromAttributesProperty(node) : checkExpressionWithContextualType( node.attributes, paramType, /*inferenceContext*/ @@ -84418,8 +86525,8 @@ function createTypeChecker(host) { checkAttributesType, paramType, relation, - reportErrors2 ? node.tagName : void 0, - node.attributes, + reportErrors2 ? isJsxOpeningFragment(node) ? node : node.tagName : void 0, + isJsxOpeningFragment(node) ? void 0 : node.attributes, /*headMessage*/ void 0, containingMessageChain, @@ -84490,10 +86597,11 @@ function createTypeChecker(host) { return true; } if (reportErrors2) { - const diag2 = createDiagnosticForNode(node.tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount); - const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration; + const tagName = node.tagName; + const diag2 = createDiagnosticForNode(tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount); + const tagNameDeclaration = (_a = getSymbolAtLocation(tagName)) == null ? void 0 : _a.valueDeclaration; if (tagNameDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName))); + addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(tagName))); } if (errorOutputContainer && errorOutputContainer.skipLogging) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); @@ -84506,13 +86614,13 @@ function createTypeChecker(host) { } } function getEffectiveCheckNode(argument) { - argument = skipParentheses(argument); - return isSatisfiesExpression(argument) ? skipParentheses(argument.expression) : argument; + const flags = isInJSFile(argument) ? 1 /* Parentheses */ | 32 /* Satisfies */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */ | 32 /* Satisfies */; + return skipOuterExpressions(argument, flags); } - function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors2, containingMessageChain, inferenceContext) { + function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors2, containingMessageChain) { const errorOutputContainer = { errors: void 0, skipLogging: true }; - if (isJsxOpeningLikeElement(node)) { - if (!checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer)) { + if (isJsxCallLike(node)) { + if (!checkApplicableSignatureForJsxCallLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer)) { Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, "jsx should have errors when reporting errors"); return errorOutputContainer.errors || emptyArray; } @@ -84534,7 +86642,7 @@ function createTypeChecker(host) { const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 232 /* OmittedExpression */) { + if (arg.kind !== 233 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -84543,8 +86651,7 @@ function createTypeChecker(host) { void 0, checkMode ); - const regularArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; - const checkArgType = inferenceContext ? instantiateType(regularArgType, inferenceContext.nonFixingMapper) : regularArgType; + const checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; const effectiveCheckArgumentNode = getEffectiveCheckNode(arg); if (!checkTypeRelatedToAndOptionallyElaborate(checkArgType, paramType, relation, reportErrors2 ? effectiveCheckArgumentNode : void 0, effectiveCheckArgumentNode, headMessage, containingMessageChain, errorOutputContainer)) { Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, "parameter should have errors when reporting errors"); @@ -84594,10 +86701,10 @@ function createTypeChecker(host) { } } function getThisArgumentOfCall(node) { - if (node.kind === 226 /* BinaryExpression */) { + if (node.kind === 227 /* BinaryExpression */) { return node.right; } - const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; + const expression = node.kind === 214 /* CallExpression */ ? node.expression : node.kind === 216 /* TaggedTemplateExpression */ ? node.tag : node.kind === 171 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -84612,20 +86719,23 @@ function createTypeChecker(host) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 215 /* TaggedTemplateExpression */) { + if (isJsxOpeningFragment(node)) { + return [createSyntheticExpression(node, emptyFreshJsxObjectType)]; + } + if (node.kind === 216 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 228 /* TemplateExpression */) { + if (template.kind === 229 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 170 /* Decorator */) { + if (node.kind === 171 /* Decorator */) { return getEffectiveDecoratorArguments(node); } - if (node.kind === 226 /* BinaryExpression */) { + if (node.kind === 227 /* BinaryExpression */) { return [node.left]; } if (isJsxOpeningLikeElement(node)) { @@ -84637,7 +86747,7 @@ function createTypeChecker(host) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 231 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; @@ -84674,16 +86784,16 @@ function createTypeChecker(host) { } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return 1; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return signature.parameters.length <= 2 ? 2 : 3; - case 169 /* Parameter */: + case 170 /* Parameter */: return 3; default: return Debug.fail(); @@ -84893,40 +87003,57 @@ function createTypeChecker(host) { return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 170 /* Decorator */; + const isTaggedTemplate = node.kind === 216 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 171 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const isInstanceof = node.kind === 226 /* BinaryExpression */; + const isJsxOpenFragment = isJsxOpeningFragment(node); + const isInstanceof = node.kind === 227 /* BinaryExpression */; const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; + let candidatesForArgumentError; + let candidateForArgumentArityError; + let candidateForTypeArgumentError; + let result; + let argCheckMode = 0 /* Normal */; + let candidates = []; let typeArguments; - if (!isDecorator2 && !isInstanceof && !isSuperCall(node)) { + if (!isDecorator2 && !isInstanceof && !isSuperCall(node) && !isJsxOpenFragment) { typeArguments = node.typeArguments; if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); } } - const candidates = candidatesOutArray || []; + candidates = candidatesOutArray || []; reorderCandidates(signatures, candidates, callChainFlags); - Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); + if (!isJsxOpenFragment) { + if (!candidates.length) { + if (reportErrors2) { + diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures)); + } + return resolveErrorCall(node); + } + } const args = getEffectiveCallArguments(node); const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; - let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */; - let candidatesForArgumentError; - let candidateForArgumentArityError; - let candidateForTypeArgumentError; - let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; + if (!isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive)) { + argCheckMode = 4 /* SkipContextSensitive */; + } + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 214 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } if (!result) { result = chooseOverload(candidates, assignableRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } + const links = getNodeLinks(node); + if (links.resolvedSignature !== resolvingSignature && !candidatesOutArray) { + Debug.assert(links.resolvedSignature); + return links.resolvedSignature; + } if (result) { return result; } result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode); - getNodeLinks(node).resolvedSignature = result; + links.resolvedSignature = result; if (reportErrors2) { if (!headMessage && isInstanceof) { headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method; @@ -84950,9 +87077,7 @@ function createTypeChecker(host) { 0 /* Normal */, /*reportErrors*/ true, - () => chain, - /*inferenceContext*/ - void 0 + () => chain ); if (diags) { for (const d of diags) { @@ -84988,9 +87113,7 @@ function createTypeChecker(host) { 0 /* Normal */, /*reportErrors*/ true, - chain2, - /*inferenceContext*/ - void 0 + chain2 ); if (diags2) { if (diags2.length <= min2) { @@ -85034,7 +87157,7 @@ function createTypeChecker(host) { true, headMessage ); - } else { + } else if (!isJsxOpenFragment) { const signaturesWithCorrectTypeArgumentArity = filter(signatures, (s) => hasCorrectTypeArgumentArity(s, typeArguments)); if (signaturesWithCorrectTypeArgumentArity.length === 0) { diagnostics.add(getTypeArgumentArityError(node, signatures, typeArguments, headMessage)); @@ -85044,12 +87167,12 @@ function createTypeChecker(host) { } } return result; - function addImplementationSuccessElaboration(failed, diagnostic) { + function addImplementationSuccessElaboration(failed2, diagnostic) { var _a, _b; const oldCandidatesForArgumentError = candidatesForArgumentError; const oldCandidateForArgumentArityError = candidateForArgumentArityError; const oldCandidateForTypeArgumentError = candidateForTypeArgumentError; - const failedSignatureDeclarations = ((_b = (_a = failed.declaration) == null ? void 0 : _a.symbol) == null ? void 0 : _b.declarations) || emptyArray; + const failedSignatureDeclarations = ((_b = (_a = failed2.declaration) == null ? void 0 : _a.symbol) == null ? void 0 : _b.declarations) || emptyArray; const isOverload2 = failedSignatureDeclarations.length > 1; const implDecl = isOverload2 ? find(failedSignatureDeclarations, (d) => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : void 0; if (implDecl) { @@ -85064,7 +87187,6 @@ function createTypeChecker(host) { candidateForTypeArgumentError = oldCandidateForTypeArgumentError; } function chooseOverload(candidates2, relation, isSingleNonGenericCandidate2, signatureHelpTrailingComma2 = false) { - var _a, _b; candidatesForArgumentError = void 0; candidateForArgumentArityError = void 0; candidateForTypeArgumentError = void 0; @@ -85082,8 +87204,6 @@ function createTypeChecker(host) { /*reportErrors*/ false, /*containingMessageChain*/ - void 0, - /*inferenceContext*/ void 0 )) { candidatesForArgumentError = [candidate]; @@ -85092,18 +87212,13 @@ function createTypeChecker(host) { return candidate; } for (let candidateIndex = 0; candidateIndex < candidates2.length; candidateIndex++) { - let candidate = candidates2[candidateIndex]; + const candidate = candidates2[candidateIndex]; if (!hasCorrectTypeArgumentArity(candidate, typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma2)) { continue; } let checkCandidate; let inferenceContext; if (candidate.typeParameters) { - const paramLocation = (_b = (_a = candidate.typeParameters[0].symbol.declarations) == null ? void 0 : _a[0]) == null ? void 0 : _b.parent; - const candidateParameterContext = paramLocation || (candidate.declaration && isConstructorDeclaration(candidate.declaration) ? candidate.declaration.parent : candidate.declaration); - if (candidateParameterContext && findAncestor(node, (a) => a === candidateParameterContext)) { - candidate = getImplementationSignature(candidate); - } let typeArgumentTypes; if (some(typeArguments)) { typeArgumentTypes = checkTypeArguments( @@ -85123,7 +87238,7 @@ function createTypeChecker(host) { /*flags*/ isInJSFile(node) ? 2 /* AnyDefault */ : 0 /* None */ ); - typeArgumentTypes = instantiateTypes(inferTypeArguments(node, candidate, args, argCheckMode | 8 /* SkipGenericFunctions */, inferenceContext), inferenceContext.nonFixingMapper); + typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode | 8 /* SkipGenericFunctions */, inferenceContext); argCheckMode |= inferenceContext.flags & 4 /* SkippedGenericFunction */ ? 8 /* SkipGenericFunctions */ : 0 /* Normal */; } checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext && inferenceContext.inferredTypeParameters); @@ -85143,8 +87258,7 @@ function createTypeChecker(host) { /*reportErrors*/ false, /*containingMessageChain*/ - void 0, - inferenceContext + void 0 )) { (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); continue; @@ -85152,7 +87266,7 @@ function createTypeChecker(host) { if (argCheckMode) { argCheckMode = 0 /* Normal */; if (inferenceContext) { - const typeArgumentTypes = instantiateTypes(inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext), inferenceContext.mapper); + const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); if (getNonArrayRestType(candidate) && !hasCorrectArity(node, args, checkCandidate, signatureHelpTrailingComma2)) { candidateForArgumentArityError = checkCandidate; @@ -85168,8 +87282,7 @@ function createTypeChecker(host) { /*reportErrors*/ false, /*containingMessageChain*/ - void 0, - inferenceContext + void 0 )) { (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); continue; @@ -85454,7 +87567,7 @@ function createTypeChecker(host) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 6 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 176 /* Constructor */) { + if (!modifiers || declaration.kind !== 177 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -85484,11 +87597,11 @@ function createTypeChecker(host) { const maybeMissingAwait = awaitedType && getSignaturesOfType(awaitedType, kind).length > 0; if (apparentType.flags & 1048576 /* Union */) { const types = apparentType.types; - let hasSignatures = false; + let hasSignatures2 = false; for (const constituent of types) { const signatures = getSignaturesOfType(constituent, kind); if (signatures.length !== 0) { - hasSignatures = true; + hasSignatures2 = true; if (errorInfo) { break; } @@ -85505,12 +87618,12 @@ function createTypeChecker(host) { typeToString(apparentType) ); } - if (hasSignatures) { + if (hasSignatures2) { break; } } } - if (!hasSignatures) { + if (!hasSignatures2) { errorInfo = chainDiagnosticMessages( /*details*/ void 0, @@ -85593,16 +87706,16 @@ function createTypeChecker(host) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 169 /* Parameter */: + case 170 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -85682,24 +87795,55 @@ function createTypeChecker(host) { 0 /* None */ ); } + function getJSXFragmentType(node) { + const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node)); + if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType; + const jsxFragmentFactoryName = getJsxNamespace(node); + const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null"; + if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType; + const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */; + const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0; + const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName( + node, + jsxFragmentFactoryName, + shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, + /*nameNotFoundMessage*/ + jsxFactoryRefErr, + /*isUse*/ + true + ); + if (jsxFactorySymbol === void 0) return sourceFileLinks.jsxFragmentType = errorType; + if (jsxFactorySymbol.escapedName === ReactNames.Fragment) return sourceFileLinks.jsxFragmentType = getTypeOfSymbol(jsxFactorySymbol); + const resolvedAlias = (jsxFactorySymbol.flags & 2097152 /* Alias */) === 0 ? jsxFactorySymbol : resolveAlias(jsxFactorySymbol); + const reactExports = jsxFactorySymbol && getExportsOfSymbol(resolvedAlias); + const typeSymbol = reactExports && getSymbol2(reactExports, ReactNames.Fragment, 2 /* BlockScopedVariable */); + const type = typeSymbol && getTypeOfSymbol(typeSymbol); + return sourceFileLinks.jsxFragmentType = type === void 0 ? errorType : type; + } function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { - if (isJsxIntrinsicTagName(node.tagName)) { - const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node); - const fakeSignature = createSignatureForJSXIntrinsic(node, result); - checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType( - node.attributes, - getEffectiveFirstArgumentForJsxSignature(fakeSignature, node), - /*inferenceContext*/ - void 0, - 0 /* Normal */ - ), result, node.tagName, node.attributes); - if (length(node.typeArguments)) { - forEach(node.typeArguments, checkSourceElement); - diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), node.typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, 0, length(node.typeArguments))); + const isJsxOpenFragment = isJsxOpeningFragment(node); + let exprTypes; + if (!isJsxOpenFragment) { + if (isJsxIntrinsicTagName(node.tagName)) { + const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node); + const fakeSignature = createSignatureForJSXIntrinsic(node, result); + checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType( + node.attributes, + getEffectiveFirstArgumentForJsxSignature(fakeSignature, node), + /*inferenceContext*/ + void 0, + 0 /* Normal */ + ), result, node.tagName, node.attributes); + if (length(node.typeArguments)) { + forEach(node.typeArguments, checkSourceElement); + diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), node.typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, 0, length(node.typeArguments))); + } + return fakeSignature; } - return fakeSignature; + exprTypes = checkExpression(node.tagName); + } else { + exprTypes = getJSXFragmentType(node); } - const exprTypes = checkExpression(node.tagName); const apparentType = getApparentType(exprTypes); if (isErrorType(apparentType)) { return resolveErrorCall(node); @@ -85715,7 +87859,11 @@ function createTypeChecker(host) { return resolveUntypedCall(node); } if (signatures.length === 0) { - error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); + if (isJsxOpenFragment) { + error2(node, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node)); + } else { + error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); + } return resolveErrorCall(node); } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); @@ -85749,18 +87897,19 @@ function createTypeChecker(host) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 213 /* CallExpression */: + case 214 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 214 /* NewExpression */: + case 215 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 170 /* Decorator */: + case 171 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: + case 290 /* JsxOpeningFragment */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return resolveInstanceofExpression(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -85776,12 +87925,9 @@ function createTypeChecker(host) { resolutionStart = resolutionTargets.length; } links.resolvedSignature = resolvingSignature; - let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */); + const result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */); resolutionStart = saveResolutionStart; if (result !== resolvingSignature) { - if (links.resolvedSignature !== resolvingSignature) { - result = links.resolvedSignature; - } links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached; } return result; @@ -85876,7 +88022,7 @@ function createTypeChecker(host) { return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 212 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64 /* EqualsToken */) { @@ -85900,9 +88046,9 @@ function createTypeChecker(host) { if (node.expression.kind === 108 /* SuperKeyword */) { return voidType; } - if (node.kind === 214 /* NewExpression */) { + if (node.kind === 215 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 177 /* Constructor */ && declaration.kind !== 181 /* ConstructSignature */ && declaration.kind !== 186 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 177 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -85916,7 +88062,7 @@ function createTypeChecker(host) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 214 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 245 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { error2(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { @@ -85949,20 +88095,20 @@ function createTypeChecker(host) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 213 /* CallExpression */: - case 170 /* Decorator */: - case 214 /* NewExpression */: + case 214 /* CallExpression */: + case 171 /* Decorator */: + case 215 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return node.argumentExpression; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return node.name; - case 183 /* TypeReference */: + case 184 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -86047,7 +88193,7 @@ function createTypeChecker(host) { return createAnonymousType(anonymousSymbol, memberTable, emptyArray, emptyArray, emptyArray); } function getTypeWithSyntheticDefaultOnly(type, symbol, originalSymbol, moduleSpecifier) { - const hasDefaultOnly = isOnlyImportedAsDefault(moduleSpecifier); + const hasDefaultOnly = isOnlyImportableAsDefault(moduleSpecifier); if (hasDefaultOnly && type && !isErrorType(type)) { const synthType = type; if (!synthType.defaultOnlyType) { @@ -86116,7 +88262,7 @@ function createTypeChecker(host) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 263 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 261 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); return !!decl && !!(decl.flags & 33554432 /* Ambient */); @@ -86125,7 +88271,7 @@ function createTypeChecker(host) { } function checkTaggedTemplateExpression(node) { if (!checkGrammarTaggedTemplateChain(node)) checkGrammarTypeArguments(node, node.typeArguments); - if (languageVersion < 2 /* TaggedTemplates */) { + if (languageVersion < LanguageFeatureMinimumTarget.TaggedTemplates) { checkExternalEmitHelpers(node, 262144 /* MakeTemplateObject */); } const signature = getResolvedSignature(node); @@ -86133,11 +88279,16 @@ function createTypeChecker(host) { return getReturnTypeOfSignature(signature); } function checkAssertion(node, checkMode) { - if (node.kind === 216 /* TypeAssertionExpression */) { + if (node.kind === 217 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); } + if (compilerOptions.erasableSyntaxOnly) { + const start = skipTrivia(file.text, node.pos); + const end = node.expression.pos; + diagnostics.add(createFileDiagnostic(file, start, end - start, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled)); + } } return checkAssertionWorker(node, checkMode); } @@ -86149,18 +88300,18 @@ function createTypeChecker(host) { case 10 /* BigIntLiteral */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 228 /* TemplateExpression */: + case 210 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 229 /* TemplateExpression */: return true; - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -86191,12 +88342,12 @@ function createTypeChecker(host) { let type; let expression; switch (node.kind) { - case 234 /* AsExpression */: - case 216 /* TypeAssertionExpression */: + case 235 /* AsExpression */: + case 217 /* TypeAssertionExpression */: type = node.type; expression = node.expression; break; - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: type = getJSDocTypeAssertionType(node); expression = node.expression; break; @@ -86230,13 +88381,13 @@ function createTypeChecker(host) { function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - if (node.kind === 233 /* ExpressionWithTypeArguments */) { + if (node.kind === 234 /* ExpressionWithTypeArguments */) { const parent2 = walkUpParenthesizedExpressions(node.parent); - if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { + if (parent2.kind === 227 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { error2(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); } } - const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 234 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -86244,20 +88395,28 @@ function createTypeChecker(host) { if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) { return exprType; } + const links = getNodeLinks(node); + if (!links.instantiationExpressionTypes) { + links.instantiationExpressionTypes = /* @__PURE__ */ new Map(); + } + if (links.instantiationExpressionTypes.has(exprType.id)) { + return links.instantiationExpressionTypes.get(exprType.id); + } let hasSomeApplicableSignature = false; let nonApplicableType; const result = getInstantiatedType(exprType); + links.instantiationExpressionTypes.set(exprType.id, result); const errorType2 = hasSomeApplicableSignature ? nonApplicableType : exprType; if (errorType2) { diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, typeToString(errorType2))); } return result; function getInstantiatedType(type) { - let hasSignatures = false; + let hasSignatures2 = false; let hasApplicableSignature = false; const result2 = getInstantiatedTypePart(type); hasSomeApplicableSignature || (hasSomeApplicableSignature = hasApplicableSignature); - if (hasSignatures && !hasApplicableSignature) { + if (hasSignatures2 && !hasApplicableSignature) { nonApplicableType ?? (nonApplicableType = type); } return result2; @@ -86266,7 +88425,7 @@ function createTypeChecker(host) { const resolved = resolveStructuredTypeMembers(type2); const callSignatures = getInstantiatedSignatures(resolved.callSignatures); const constructSignatures = getInstantiatedSignatures(resolved.constructSignatures); - hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0); + hasSignatures2 || (hasSignatures2 = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0); hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0); if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) { const result3 = createAnonymousType(createSymbol(0 /* None */, "__instantiationExpression" /* InstantiationExpression */), resolved.members, callSignatures, constructSignatures, resolved.indexInfos); @@ -86313,7 +88472,7 @@ function createTypeChecker(host) { if (isErrorType(targetType)) { return targetType; } - const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 350 /* JSDocSatisfiesTag */); + const errorNode = findAncestor(target.parent, (n) => n.kind === 239 /* SatisfiesExpression */ || n.kind === 351 /* JSDocSatisfiesTag */); checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); return exprType; } @@ -86323,6 +88482,10 @@ function createTypeChecker(host) { return checkNewTargetMetaProperty(node); } if (node.keywordToken === 102 /* ImportKeyword */) { + if (node.name.escapedText === "defer") { + Debug.assert(!isCallExpression(node.parent) || node.parent.expression !== node, "Trying to get the type of `import.defer` in `import.defer(...)`"); + return errorType; + } return checkImportMetaProperty(node); } return Debug.assertNever(node.keywordToken); @@ -86343,7 +88506,7 @@ function createTypeChecker(host) { if (!container) { error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 176 /* Constructor */) { + } else if (container.kind === 177 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -86352,12 +88515,12 @@ function createTypeChecker(host) { } } function checkImportMetaProperty(node) { - if (moduleKind === 100 /* Node16 */ || moduleKind === 199 /* NodeNext */) { + if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) { if (getSourceFileOfNode(node).impliedNodeFormat !== 99 /* ESNext */) { error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); } } else if (moduleKind < 6 /* ES2020 */ && moduleKind !== 4 /* System */) { - error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); + error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext); } const file = getSourceFileOfNode(node); Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); @@ -86373,14 +88536,45 @@ function createTypeChecker(host) { !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration)) ); } - function getTupleElementLabel(d, index, restParameterName = "arg") { + function getTupleElementLabelFromBindingElement(node, index, elementFlags) { + switch (node.name.kind) { + case 80 /* Identifier */: { + const name = node.name.escapedText; + if (node.dotDotDotToken) { + return elementFlags & 12 /* Variable */ ? name : `${name}_${index}`; + } else { + return elementFlags & 3 /* Fixed */ ? name : `${name}_n`; + } + } + case 208 /* ArrayBindingPattern */: { + if (node.dotDotDotToken) { + const elements = node.name.elements; + const lastElement = tryCast(lastOrUndefined(elements), isBindingElement); + const elementCount = elements.length - ((lastElement == null ? void 0 : lastElement.dotDotDotToken) ? 1 : 0); + if (index < elementCount) { + const element = elements[index]; + if (isBindingElement(element)) { + return getTupleElementLabelFromBindingElement(element, index, elementFlags); + } + } else if (lastElement == null ? void 0 : lastElement.dotDotDotToken) { + return getTupleElementLabelFromBindingElement(lastElement, index - elementCount, elementFlags); + } + } + break; + } + } + return `arg_${index}`; + } + function getTupleElementLabel(d, index = 0, elementFlags = 3 /* Fixed */, restSymbol) { if (!d) { - return `${restParameterName}_${index}`; + const restParameter = tryCast(restSymbol == null ? void 0 : restSymbol.valueDeclaration, isParameter); + return restParameter ? getTupleElementLabelFromBindingElement(restParameter, index, elementFlags) : `${(restSymbol == null ? void 0 : restSymbol.escapedName) ?? "arg"}_${index}`; } Debug.assert(isIdentifier(d.name)); return d.name.escapedText; } function getParameterNameAtPosition(signature, pos, overrideRestType) { + var _a; const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { return signature.parameters[pos].escapedName; @@ -86388,15 +88582,17 @@ function createTypeChecker(host) { const restParameter = signature.parameters[paramCount] || unknownSymbol; const restType = overrideRestType || getTypeOfSymbol(restParameter); if (isTupleType(restType)) { - const associatedNames = restType.target.labeledElementDeclarations; + const tupleType = restType.target; const index = pos - paramCount; - return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName); + const associatedName = (_a = tupleType.labeledElementDeclarations) == null ? void 0 : _a[index]; + const elementFlags = tupleType.elementFlags[index]; + return getTupleElementLabel(associatedName, index, elementFlags, restParameter); } return restParameter.escapedName; } function getParameterIdentifierInfoAtPosition(signature, pos) { var _a; - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 317 /* JSDocFunctionType */) { + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 318 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -86435,7 +88631,7 @@ function createTypeChecker(host) { return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d) { - return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 203 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -86463,7 +88659,7 @@ function createTypeChecker(host) { if (signatureHasRestParameter(signature)) { const restType = getTypeOfSymbol(signature.parameters[paramCount]); const index = pos - paramCount; - if (!isTupleType(restType) || restType.target.hasRestElement || index < restType.target.fixedLength) { + if (!isTupleType(restType) || restType.target.combinedFlags & 12 /* Variable */ || index < restType.target.fixedLength) { return getIndexedAccessType(restType, getNumberLiteralType(index)); } } @@ -86501,7 +88697,7 @@ function createTypeChecker(host) { if (signatureHasRestParameter(signature)) { const restType = getTypeOfSymbol(signature.parameters[length2 - 1]); if (isTupleType(restType)) { - return length2 + restType.target.fixedLength - (restType.target.hasRestElement ? 0 : 1); + return length2 + restType.target.fixedLength - (restType.target.combinedFlags & 12 /* Variable */ ? 0 : 1); } } return length2; @@ -86544,7 +88740,7 @@ function createTypeChecker(host) { function hasEffectiveRestParameter(signature) { if (signatureHasRestParameter(signature)) { const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); - return !isTupleType(restType) || restType.target.hasRestElement; + return !isTupleType(restType) || !!(restType.target.combinedFlags & 12 /* Variable */); } return false; } @@ -86554,7 +88750,7 @@ function createTypeChecker(host) { if (!isTupleType(restType)) { return isTypeAny(restType) ? anyArrayType : restType; } - if (restType.target.hasRestElement) { + if (restType.target.combinedFlags & 12 /* Variable */) { return sliceTupleType(restType, restType.target.fixedLength); } } @@ -86570,14 +88766,14 @@ function createTypeChecker(host) { function getTypeOfFirstParameterOfSignatureWithFallback(signature, fallbackType) { return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; } - function inferFromAnnotatedParameters(signature, context, inferenceContext) { + function inferFromAnnotatedParametersAndReturn(signature, context, inferenceContext) { const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (let i = 0; i < len; i++) { const declaration = signature.parameters[i].valueDeclaration; - const typeNode = getEffectiveTypeAnnotationNode(declaration); - if (typeNode) { + const typeNode2 = getEffectiveTypeAnnotationNode(declaration); + if (typeNode2) { const source = addOptionality( - getTypeFromTypeNode(typeNode), + getTypeFromTypeNode(typeNode2), /*isProperty*/ false, isOptionalDeclaration(declaration) @@ -86586,6 +88782,12 @@ function createTypeChecker(host) { inferTypes(inferenceContext.inferences, source, target); } } + const typeNode = signature.declaration && getEffectiveReturnTypeNode(signature.declaration); + if (typeNode) { + const source = getTypeFromTypeNode(typeNode); + const target = getReturnTypeOfSignature(context); + inferTypes(inferenceContext.inferences, source, target); + } } function assignContextualParameterTypes(signature, context) { if (context.typeParameters) { @@ -86790,17 +88992,17 @@ function createTypeChecker(host) { if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: { + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; const valueType = isMethodDeclaration(node) ? getOrCreateTypeFromSignature(getSignatureFromDeclaration(node)) : getTypeOfNode(node); @@ -86811,7 +89013,7 @@ function createTypeChecker(host) { links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 172 /* PropertyDeclaration */: { + case 173 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; const valueType = getTypeOfNode(node); @@ -86832,8 +89034,8 @@ function createTypeChecker(host) { if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: { + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter2("target", targetType); @@ -86847,7 +89049,7 @@ function createTypeChecker(host) { ); break; } - case 169 /* Parameter */: { + case 170 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -86873,10 +89075,10 @@ function createTypeChecker(host) { ); break; } - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: { + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 173 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; const targetType = getParentTypeOfClassElement(node); @@ -86976,7 +89178,7 @@ function createTypeChecker(host) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 241 /* Block */) { + if (func.body.kind !== 242 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -87068,30 +89270,15 @@ function createTypeChecker(host) { /*errorNode*/ void 0 ) || unknownType; - nextType = resolver.resolveIterationType( - nextType, - /*errorNode*/ - void 0 - ) || unknownType; if (globalGeneratorType === emptyGenericType) { - const globalType = resolver.getGlobalIterableIteratorType( + const globalIterableIteratorType = resolver.getGlobalIterableIteratorType( /*reportErrors*/ false ); - const iterationTypes = globalType !== emptyGenericType ? getIterationTypesOfGlobalIterableType(globalType, resolver) : void 0; - const iterableIteratorReturnType = iterationTypes ? iterationTypes.returnType : anyType; - const iterableIteratorNextType = iterationTypes ? iterationTypes.nextType : undefinedType; - if (isTypeAssignableTo(returnType, iterableIteratorReturnType) && isTypeAssignableTo(iterableIteratorNextType, nextType)) { - if (globalType !== emptyGenericType) { - return createTypeFromGenericGlobalType(globalType, [yieldType]); - } - resolver.getGlobalIterableIteratorType( - /*reportErrors*/ - true - ); - return emptyObjectType; + if (globalIterableIteratorType !== emptyGenericType) { + return createTypeFromGenericGlobalType(globalIterableIteratorType, [yieldType, returnType, nextType]); } - resolver.getGlobalGeneratorType( + resolver.getGlobalIterableIteratorType( /*reportErrors*/ true ); @@ -87126,6 +89313,9 @@ function createTypeChecker(host) { return { yieldTypes, nextTypes }; } function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) { + if (expressionType === silentNeverType) { + return silentNeverType; + } const errorNode = node.expression || node; const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType; return !isAsync ? yieldedType : getAwaitedType( @@ -87156,7 +89346,7 @@ function createTypeChecker(host) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 221 /* TypeOfExpression */) { + if (node.expression.kind === 222 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -87168,7 +89358,7 @@ function createTypeChecker(host) { } return !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } - const type = checkExpressionCached(node.expression); + const type = getBaseConstraintOrType(checkExpressionCached(node.expression)); if (!isLiteralType(type)) { return false; } @@ -87194,14 +89384,14 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) { + if (functionFlags & 2 /* Async */ && expr.kind === 224 /* AwaitExpression */) { expr = skipParentheses( expr.expression, /*excludeJSDocTypeAssertions*/ true ); } - if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === getMergedSymbol(func.symbol) && (!isFunctionExpressionOrArrowFunction(func.symbol.valueDeclaration) || isConstantReference(expr.expression))) { + if (expr.kind === 214 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === getMergedSymbol(func.symbol) && (!isFunctionExpressionOrArrowFunction(func.symbol.valueDeclaration) || isConstantReference(expr.expression))) { hasReturnOfTypeNever = true; return; } @@ -87233,26 +89423,26 @@ function createTypeChecker(host) { } function mayReturnNever(func) { switch (func.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return true; - case 174 /* MethodDeclaration */: - return func.parent.kind === 210 /* ObjectLiteralExpression */; + case 175 /* MethodDeclaration */: + return func.parent.kind === 211 /* ObjectLiteralExpression */; default: return false; } } function getTypePredicateFromBody(func) { switch (func.kind) { - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return void 0; } const functionFlags = getFunctionFlags(func); if (functionFlags !== 0 /* Normal */) return void 0; let singleReturn; - if (func.body && func.body.kind !== 241 /* Block */) { + if (func.body && func.body.kind !== 242 /* Block */) { singleReturn = func.body; } else { const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => { @@ -87283,7 +89473,7 @@ function createTypeChecker(host) { }); } function checkIfExpressionRefinesParameter(func, expr, param, initType) { - const antecedent = expr.flowNode || expr.parent.kind === 253 /* ReturnStatement */ && expr.parent.flowNode || createFlowNode( + const antecedent = canHaveFlowNode(expr) && expr.flowNode || expr.parent.kind === 254 /* ReturnStatement */ && expr.parent.flowNode || createFlowNode( 2 /* Start */, /*node*/ void 0, @@ -87294,7 +89484,7 @@ function createTypeChecker(host) { const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition); if (trueType2 === initType) return void 0; const falseCondition = createFlowNode(64 /* FalseCondition */, expr, antecedent); - const falseSubtype = getFlowTypeOfReference(param.name, initType, trueType2, func, falseCondition); + const falseSubtype = getReducedType(getFlowTypeOfReference(param.name, initType, trueType2, func, falseCondition)); return falseSubtype.flags & 131072 /* Never */ ? trueType2 : void 0; } function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) { @@ -87306,7 +89496,7 @@ function createTypeChecker(host) { if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) { return; } - if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 174 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 242 /* Block */ || !functionHasImplicitReturn(func)) { return; } const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */; @@ -87332,7 +89522,7 @@ function createTypeChecker(host) { } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 175 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -87368,7 +89558,7 @@ function createTypeChecker(host) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 219 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -87389,7 +89579,7 @@ function createTypeChecker(host) { const inferenceContext = getInferenceContext(node); let instantiatedContextualSignature; if (checkMode && checkMode & 2 /* Inferential */) { - inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); + inferFromAnnotatedParametersAndReturn(signature, contextualSignature, inferenceContext); const restType = getEffectiveRestType(contextualSignature); if (restType && restType.flags & 262144 /* TypeParameter */) { instantiatedContextualSignature = instantiateSignature(contextualSignature, inferenceContext.nonFixingMapper); @@ -87403,7 +89593,7 @@ function createTypeChecker(host) { } else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) { const inferenceContext = getInferenceContext(node); if (checkMode && checkMode & 2 /* Inferential */) { - inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); + inferFromAnnotatedParametersAndReturn(signature, contextualSignature, inferenceContext); } } if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { @@ -87417,7 +89607,7 @@ function createTypeChecker(host) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 175 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -87425,25 +89615,13 @@ function createTypeChecker(host) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 241 /* Block */) { + if (node.body.kind === 242 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); const returnOrPromisedType = returnType && unwrapReturnType(returnType, functionFlags); if (returnOrPromisedType) { - const effectiveCheckNode = getEffectiveCheckNode(node.body); - if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */) { - const awaitedType = checkAwaitedType( - exprType, - /*withAlias*/ - false, - effectiveCheckNode, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - ); - checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode); - } else { - checkTypeAssignableToAndOptionallyElaborate(exprType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode); - } + checkReturnExpression(node, returnOrPromisedType, node.body, node.body, exprType); } } } @@ -87497,8 +89675,8 @@ function createTypeChecker(host) { } if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) { - const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { + const ctor = getControlFlowContainer(expr); + if (!(ctor && (ctor.kind === 177 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -87519,14 +89697,14 @@ function createTypeChecker(host) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 274 /* NamespaceImport */; + return !!declaration && declaration.kind === 275 /* NamespaceImport */; } } } return false; } function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) { - const node = skipOuterExpressions(expr, 6 /* Assertions */ | 1 /* Parentheses */); + const node = skipOuterExpressions(expr, 38 /* Assertions */ | 1 /* Parentheses */); if (node.kind !== 80 /* Identifier */ && !isAccessExpression(node)) { error2(expr, invalidReferenceMessage); return false; @@ -87593,6 +89771,8 @@ function createTypeChecker(host) { } switch (moduleKind) { case 100 /* Node16 */: + case 101 /* Node18 */: + case 102 /* Node20 */: case 199 /* NodeNext */: if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) { span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); @@ -87602,6 +89782,7 @@ function createTypeChecker(host) { hasError = true; break; } + // fallthrough case 7 /* ES2022 */: case 99 /* ESNext */: case 200 /* Preserve */: @@ -87609,9 +89790,10 @@ function createTypeChecker(host) { if (languageVersion >= 4 /* ES2017 */) { break; } + // fallthrough default: span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher; + const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher; diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); hasError = true; break; @@ -87623,7 +89805,7 @@ function createTypeChecker(host) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); - if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + if (container && container.kind !== 177 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } @@ -87817,7 +89999,7 @@ function createTypeChecker(host) { return silentNeverType; } if (isPrivateIdentifier(left)) { - if (languageVersion < 9 /* PrivateNamesAndClassStaticBlocks */ || languageVersion < 99 /* ClassAndClassElementDecorators */ || !useDefineForClassFields) { + if (languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators || !useDefineForClassFields) { checkExternalEmitHelpers(left, 2097152 /* ClassPrivateFieldIn */); } if (!getNodeLinks(left).resolvedSymbol && getContainingClass(left)) { @@ -87852,7 +90034,7 @@ function createTypeChecker(host) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) { + if (property.kind === 304 /* PropertyAssignment */ || property.kind === 305 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -87871,14 +90053,14 @@ function createTypeChecker(host) { ); } } - const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); + const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */ | (hasDefaultValue(property) ? 16 /* AllowMissing */ : 0), name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 305 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 305 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 306 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error2(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { - if (languageVersion < 5 /* ObjectSpreadRest */) { + if (languageVersion < LanguageFeatureMinimumTarget.ObjectSpreadRest) { checkExternalEmitHelpers(property, 4 /* Rest */); } const nonRestNames = []; @@ -87899,14 +90081,14 @@ function createTypeChecker(host) { } function checkArrayLiteralAssignment(node, sourceType, checkMode) { const elements = node.elements; - if (languageVersion < 2 /* DestructuringAssignment */ && compilerOptions.downlevelIteration) { + if (languageVersion < LanguageFeatureMinimumTarget.DestructuringAssignment && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } const possiblyOutOfBoundsType = checkIteratedTypeOrElementType(65 /* Destructuring */ | 128 /* PossiblyOutOfBounds */, sourceType, undefinedType, node) || errorType; let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 230 /* SpreadElement */) { + if (node.elements[i].kind === 231 /* SpreadElement */) { type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType); } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -87916,11 +90098,11 @@ function createTypeChecker(host) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 232 /* OmittedExpression */) { - if (element.kind !== 230 /* SpreadElement */) { + if (element.kind !== 233 /* OmittedExpression */) { + if (element.kind !== 231 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { - const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); + const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* AllowMissing */ : 0); const elementType2 = getIndexedAccessTypeOrUndefined(sourceType, indexType, accessFlags, createSyntheticExpression(element, indexType)) || errorType; const assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType2, 524288 /* NEUndefined */) : elementType2; const type = getFlowTypeOfDestructuring(element, assignedType); @@ -87932,7 +90114,7 @@ function createTypeChecker(host) { error2(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { + if (restExpression.kind === 227 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { error2(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); @@ -87945,7 +90127,7 @@ function createTypeChecker(host) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 305 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !hasTypeFacts(checkExpression(prop.objectAssignmentInitializer), 16777216 /* IsUndefined */)) { @@ -87957,25 +90139,25 @@ function createTypeChecker(host) { } else { target = exprOrAssignment; } - if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { + if (target.kind === 227 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 210 /* ObjectLiteralExpression */) { + if (target.kind === 211 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 209 /* ArrayLiteralExpression */) { + if (target.kind === 210 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error3 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + const error3 = target.parent.kind === 306 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 306 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; if (checkReferenceExpression(target, error3, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } @@ -87990,8 +90172,8 @@ function createTypeChecker(host) { case 80 /* Identifier */: case 11 /* StringLiteral */: case 14 /* RegularExpressionLiteral */: - case 215 /* TaggedTemplateExpression */: - case 228 /* TemplateExpression */: + case 216 /* TaggedTemplateExpression */: + case 229 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: @@ -87999,25 +90181,25 @@ function createTypeChecker(host) { case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 221 /* TypeOfExpression */: - case 235 /* NonNullExpression */: - case 285 /* JsxSelfClosingElement */: - case 284 /* JsxElement */: + case 219 /* FunctionExpression */: + case 232 /* ClassExpression */: + case 220 /* ArrowFunction */: + case 210 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 222 /* TypeOfExpression */: + case 236 /* NonNullExpression */: + case 286 /* JsxSelfClosingElement */: + case 285 /* JsxElement */: return true; - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: switch (node.operator) { case 54 /* ExclamationToken */: case 40 /* PlusToken */: @@ -88026,9 +90208,13 @@ function createTypeChecker(host) { return true; } return false; - case 222 /* VoidExpression */: - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + // Some forms listed here for clarity + case 223 /* VoidExpression */: + // Explicit opt-out + case 217 /* TypeAssertionExpression */: + // Not SEF, but can produce useful type warnings + case 235 /* AsExpression */: + // Not SEF, but can produce useful type warnings default: return false; } @@ -88070,9 +90256,9 @@ function createTypeChecker(host) { setLastResult(state, checkExpression(node.right, checkMode)); return state; } - checkGrammarNullishCoalesceWithLogicalExpression(node); + checkNullishCoalesceOperands(node); const operator = node.operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (node.left.kind === 211 /* ObjectLiteralExpression */ || node.left.kind === 210 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */)); return state; @@ -88097,13 +90283,15 @@ function createTypeChecker(host) { const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 218 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0); } - checkTruthinessOfType(leftType, node.left); + if (isBinaryLogicalOperator(operator)) { + checkTruthinessOfType(leftType, node.left); + } } } } @@ -88160,24 +90348,101 @@ function createTypeChecker(host) { state.typeStack[state.stackIndex + 1] = type; } } - function checkGrammarNullishCoalesceWithLogicalExpression(node) { - const { left, operatorToken, right } = node; - if (operatorToken.kind === 61 /* QuestionQuestionToken */) { - if (isBinaryExpression(left) && (left.operatorToken.kind === 57 /* BarBarToken */ || left.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) { - grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(left.operatorToken.kind), tokenToString(operatorToken.kind)); + function checkNullishCoalesceOperands(node) { + if (node.operatorToken.kind !== 61 /* QuestionQuestionToken */) { + return; + } + if (isBinaryExpression(node.parent)) { + const { left, operatorToken } = node.parent; + if (isBinaryExpression(left) && operatorToken.kind === 57 /* BarBarToken */) { + grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(61 /* QuestionQuestionToken */), tokenToString(operatorToken.kind)); + } + } else if (isBinaryExpression(node.left)) { + const { operatorToken } = node.left; + if (operatorToken.kind === 57 /* BarBarToken */ || operatorToken.kind === 56 /* AmpersandAmpersandToken */) { + grammarErrorOnNode(node.left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(operatorToken.kind), tokenToString(61 /* QuestionQuestionToken */)); + } + } else if (isBinaryExpression(node.right)) { + const { operatorToken } = node.right; + if (operatorToken.kind === 56 /* AmpersandAmpersandToken */) { + grammarErrorOnNode(node.right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(61 /* QuestionQuestionToken */), tokenToString(operatorToken.kind)); } - if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) { - grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind)); + } + checkNullishCoalesceOperandLeft(node); + checkNullishCoalesceOperandRight(node); + } + function checkNullishCoalesceOperandLeft(node) { + const leftTarget = skipOuterExpressions(node.left, 63 /* All */); + const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget); + if (nullishSemantics !== 3 /* Sometimes */) { + if (nullishSemantics === 1 /* Always */) { + error2(leftTarget, Diagnostics.This_expression_is_always_nullish); + } else { + error2(leftTarget, Diagnostics.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish); } } } + function checkNullishCoalesceOperandRight(node) { + const rightTarget = skipOuterExpressions(node.right, 63 /* All */); + const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget); + if (isNotWithinNullishCoalesceExpression(node)) { + return; + } + if (nullishSemantics === 1 /* Always */) { + error2(rightTarget, Diagnostics.This_expression_is_always_nullish); + } else if (nullishSemantics === 2 /* Never */) { + error2(rightTarget, Diagnostics.This_expression_is_never_nullish); + } + } + function isNotWithinNullishCoalesceExpression(node) { + return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== 61 /* QuestionQuestionToken */; + } + function getSyntacticNullishnessSemantics(node) { + node = skipOuterExpressions(node); + switch (node.kind) { + case 224 /* AwaitExpression */: + case 214 /* CallExpression */: + case 216 /* TaggedTemplateExpression */: + case 213 /* ElementAccessExpression */: + case 237 /* MetaProperty */: + case 215 /* NewExpression */: + case 212 /* PropertyAccessExpression */: + case 230 /* YieldExpression */: + case 110 /* ThisKeyword */: + return 3 /* Sometimes */; + case 227 /* BinaryExpression */: + switch (node.operatorToken.kind) { + case 64 /* EqualsToken */: + case 61 /* QuestionQuestionToken */: + case 78 /* QuestionQuestionEqualsToken */: + case 57 /* BarBarToken */: + case 76 /* BarBarEqualsToken */: + case 56 /* AmpersandAmpersandToken */: + case 77 /* AmpersandAmpersandEqualsToken */: + return 3 /* Sometimes */; + case 28 /* CommaToken */: + return getSyntacticNullishnessSemantics(node.right); + } + return 2 /* Never */; + case 228 /* ConditionalExpression */: + return getSyntacticNullishnessSemantics(node.whenTrue) | getSyntacticNullishnessSemantics(node.whenFalse); + case 106 /* NullKeyword */: + return 1 /* Always */; + case 80 /* Identifier */: + if (getResolvedSymbol(node) === undefinedSymbol) { + return 1 /* Always */; + } + return 3 /* Sometimes */; + } + return 2 /* Never */; + } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (left.kind === 211 /* ObjectLiteralExpression */ || left.kind === 210 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */); } let leftType; - if (isLogicalOrCoalescingBinaryOperator(operator)) { + if (isBinaryLogicalOperator(operator)) { leftType = checkTruthinessExpression(left, checkMode); } else { leftType = checkExpression(left, checkMode); @@ -88257,6 +90522,29 @@ function createTypeChecker(host) { } if (leftOk && rightOk) { checkAssignmentOperator(resultType2); + switch (operator) { + case 48 /* LessThanLessThanToken */: + case 71 /* LessThanLessThanEqualsToken */: + case 49 /* GreaterThanGreaterThanToken */: + case 72 /* GreaterThanGreaterThanEqualsToken */: + case 50 /* GreaterThanGreaterThanGreaterThanToken */: + case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + const rhsEval = evaluate(right); + if (typeof rhsEval.value === "number" && Math.abs(rhsEval.value) >= 32) { + errorOrSuggestion( + isEnumMember(walkUpParenthesizedExpressions(right.parent.parent)), + // elevate from suggestion to error within an enum member + errorNode || operatorToken, + Diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, + getTextOfNode(left), + tokenToString(operator), + rhsEval.value % 32 + ); + } + break; + default: + break; + } } return resultType2; } @@ -88436,7 +90724,7 @@ function createTypeChecker(host) { } } function isIndirectCall(node) { - return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 218 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 216 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { @@ -88468,7 +90756,7 @@ function createTypeChecker(host) { } function checkAssignmentOperatorWorker() { let assigneeType = leftType; - if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) { + if (isCompoundAssignment(operatorToken.kind) && left.kind === 212 /* PropertyAccessExpression */) { assigneeType = checkPropertyAccessExpression( left, /*checkMode*/ @@ -88596,10 +90884,10 @@ function createTypeChecker(host) { } const isAsync = (functionFlags & 2 /* Async */) !== 0; if (node.asteriskToken) { - if (isAsync && languageVersion < 5 /* AsyncGenerators */) { + if (isAsync && languageVersion < LanguageFeatureMinimumTarget.AsyncGenerators) { checkExternalEmitHelpers(node, 26624 /* AsyncDelegatorIncludes */); } - if (!isAsync && languageVersion < 2 /* Generators */ && compilerOptions.downlevelIteration) { + if (!isAsync && languageVersion < LanguageFeatureMinimumTarget.Generators && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 256 /* Values */); } } @@ -88615,9 +90903,8 @@ function createTypeChecker(host) { const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; const signatureNextType = iterationTypes && iterationTypes.nextType || anyType; - const resolvedSignatureNextType = isAsync ? getAwaitedType(signatureNextType) || anyType : signatureNextType; const yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType; - const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, resolvedSignatureNextType, isAsync); + const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, signatureNextType, isAsync); if (returnType && yieldedType) { checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression); } @@ -88675,7 +90962,7 @@ function createTypeChecker(host) { texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluate(node).value; + const evaluated = node.parent.kind !== 216 /* TaggedTemplateExpression */ && evaluate(node).value; if (evaluated) { return getFreshTypeOfLiteralType(getStringLiteralType(evaluated)); } @@ -88742,7 +91029,7 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 217 /* TypeAssertionExpression */ || node.kind === 235 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -88759,15 +91046,62 @@ function createTypeChecker(host) { void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + if (isParameter(isBindingElement(declaration) ? walkUpBindingElementsAndPatterns(declaration) : declaration)) { + if (declaration.name.kind === 207 /* ObjectBindingPattern */ && isObjectLiteralType2(type)) { + return padObjectLiteralType(type, declaration.name); + } + if (declaration.name.kind === 208 /* ArrayBindingPattern */ && isTupleType(type)) { + return padTupleType(type, declaration.name); + } + } + return type; + } + function padObjectLiteralType(type, pattern) { + let missingElements; + for (const e of pattern.elements) { + if (e.initializer) { + const name = getPropertyNameFromBindingElement(e); + if (name && !getPropertyOfType(type, name)) { + missingElements = append(missingElements, e); + } + } + } + if (!missingElements) { + return type; + } + const members = createSymbolTable(); + for (const prop of getPropertiesOfObjectType(type)) { + members.set(prop.escapedName, prop); + } + for (const e of missingElements) { + const symbol = createSymbol(4 /* Property */ | 16777216 /* Optional */, getPropertyNameFromBindingElement(e)); + symbol.links.type = getTypeFromBindingElement( + e, + /*includePatternInType*/ + false, + /*reportErrors*/ + false + ); + members.set(symbol.escapedName, symbol); + } + const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type)); + result.objectFlags = type.objectFlags; + return result; + } + function getPropertyNameFromBindingElement(e) { + const exprType = getLiteralTypeFromPropertyName(e.propertyName || e.name); + return isTypeUsableAsPropertyName(exprType) ? getPropertyNameFromType(exprType) : void 0; } function padTupleType(type, pattern) { + if (type.target.combinedFlags & 12 /* Variable */ || getTypeReferenceArity(type) >= pattern.elements.length) { + return type; + } const patternElements = pattern.elements; const elementTypes = getElementTypes(type).slice(); const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 209 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -88784,7 +91118,7 @@ function createTypeChecker(host) { return createTupleType(elementTypes, elementFlags, type.target.readonly); } function widenTypeInferredFromInitializer(declaration, type) { - const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + const widened = getWidenedLiteralTypeForInitializer(declaration, type); if (isInJSFile(declaration)) { if (isEmptyLiteralType(widened)) { reportImplicitAny(declaration, anyType); @@ -88796,6 +91130,9 @@ function createTypeChecker(host) { } return widened; } + function getWidenedLiteralTypeForInitializer(declaration, type) { + return getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + } function isLiteralOfContextualType(candidateType, contextualType) { if (contextualType) { if (contextualType.flags & 3145728 /* UnionOrIntersection */) { @@ -88828,14 +91165,14 @@ function createTypeChecker(host) { )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 167 /* ComputedPropertyName */) { + if (node.name.kind === 168 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 167 /* ComputedPropertyName */) { + if (node.name.kind === 168 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -88899,7 +91236,7 @@ function createTypeChecker(host) { } } } - return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context), flatMap(inferenceContexts, (c) => c && map(c.inferences, (i) => i.typeParameter)).slice()); + return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context)); } } } @@ -89026,7 +91363,7 @@ function createTypeChecker(host) { expr, /*requireStringLiteralLikeArgument*/ true - ) && !isSymbolOrSymbolForCall(expr)) { + ) && !isSymbolOrSymbolForCall(expr) && !isImportCall(expr)) { return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) { return getTypeFromTypeNode(expr.type); @@ -89066,14 +91403,25 @@ function createTypeChecker(host) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */; + var _a; + const ok = node.parent.kind === 212 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 213 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 167 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 187 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 282 /* ExportSpecifier */; if (!ok) { error2(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } - if (getIsolatedModules(compilerOptions)) { + if (compilerOptions.isolatedModules || compilerOptions.verbatimModuleSyntax && ok && !resolveName( + node, + getFirstIdentifier(node), + 2097152 /* Alias */, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + false, + /*excludeGlobals*/ + true + )) { Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */)); const constEnumDeclaration = type.symbol.valueDeclaration; - const redirect = host.getRedirectReferenceForResolutionFromSourceOfProject(getSourceFileOfNode(constEnumDeclaration).resolvedPath); + const redirect = (_a = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)) == null ? void 0 : _a.resolvedRef; if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node) && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) { error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } @@ -89094,9 +91442,9 @@ function createTypeChecker(host) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -89127,81 +91475,82 @@ function createTypeChecker(host) { return trueType; case 97 /* FalseKeyword */: return falseType; - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: return checkTemplateExpression(node); case 14 /* RegularExpressionLiteral */: return checkRegularExpressionLiteral(node); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 213 /* CallExpression */: - if (node.expression.kind === 102 /* ImportKeyword */) { + case 214 /* CallExpression */: + if (isImportCall(node)) { return checkImportCallExpression(node); } - case 214 /* NewExpression */: + // falls through + case 215 /* NewExpression */: return checkCallExpression(node, checkMode); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return checkClassExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 221 /* TypeOfExpression */: + case 222 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: return checkAssertion(node, checkMode); - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: return checkNonNullAssertion(node); - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return checkMetaProperty(node); - case 220 /* DeleteExpression */: + case 221 /* DeleteExpression */: return checkDeleteExpression(node); - case 222 /* VoidExpression */: + case 223 /* VoidExpression */: return checkVoidExpression(node); - case 223 /* AwaitExpression */: + case 224 /* AwaitExpression */: return checkAwaitExpression(node); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 230 /* SpreadElement */: + case 231 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 232 /* OmittedExpression */: + case 233 /* OmittedExpression */: return undefinedWideningType; - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return checkYieldExpression(node); - case 237 /* SyntheticExpression */: + case 238 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 284 /* JsxElement */: + case 285 /* JsxElement */: return checkJsxElement(node, checkMode); - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 288 /* JsxFragment */: + case 289 /* JsxFragment */: return checkJsxFragment(node); - case 292 /* JsxAttributes */: + case 293 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 286 /* JsxOpeningElement */: + case 287 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -89233,7 +91582,7 @@ function createTypeChecker(host) { const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */); if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); - if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */))) { + if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); @@ -89253,10 +91602,13 @@ function createTypeChecker(host) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { - if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + if (compilerOptions.erasableSyntaxOnly) { + error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } + if (!(func.kind === 177 /* Constructor */ && nodeIsPresent(func.body))) { error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 177 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -89267,13 +91619,13 @@ function createTypeChecker(host) { if (func.parameters.indexOf(node) !== 0) { error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + if (func.kind === 177 /* Constructor */ || func.kind === 181 /* ConstructSignature */ || func.kind === 186 /* ConstructorType */) { error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 219 /* ArrowFunction */) { + if (func.kind === 220 /* ArrowFunction */) { error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + if (func.kind === 178 /* GetAccessor */ || func.kind === 179 /* SetAccessor */) { error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -89294,9 +91646,7 @@ function createTypeChecker(host) { } checkSourceElement(node.type); const { parameterName } = node; - if (typePredicate.kind === 0 /* This */ || typePredicate.kind === 2 /* AssertsThis */) { - getTypeFromThisTypeNode(parameterName); - } else { + if (typePredicate.kind !== 0 /* This */ && typePredicate.kind !== 2 /* AssertsThis */) { if (typePredicate.parameterIndex >= 0) { if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error2(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); @@ -89333,13 +91683,13 @@ function createTypeChecker(host) { } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 220 /* ArrowFunction */: + case 180 /* CallSignature */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 185 /* FunctionType */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -89355,7 +91705,7 @@ function createTypeChecker(host) { if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { error2(predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; - } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { + } else if (name.kind === 208 /* ArrayBindingPattern */ || name.kind === 207 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -89367,20 +91717,20 @@ function createTypeChecker(host) { } } function checkSignatureDeclaration(node) { - if (node.kind === 181 /* IndexSignature */) { + if (node.kind === 182 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { + } else if (node.kind === 185 /* FunctionType */ || node.kind === 263 /* FunctionDeclaration */ || node.kind === 186 /* ConstructorType */ || node.kind === 180 /* CallSignature */ || node.kind === 177 /* Constructor */ || node.kind === 181 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); if (!(functionFlags & 4 /* Invalid */)) { - if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < 5 /* AsyncGenerators */) { + if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < LanguageFeatureMinimumTarget.AsyncGenerators) { checkExternalEmitHelpers(node, 6144 /* AsyncGeneratorIncludes */); } - if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* AsyncFunctions */) { + if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < LanguageFeatureMinimumTarget.AsyncFunctions) { checkExternalEmitHelpers(node, 64 /* Awaiter */); } - if ((functionFlags & 3 /* AsyncGenerator */) !== 0 /* Normal */ && languageVersion < 2 /* Generators */) { + if ((functionFlags & 3 /* AsyncGenerator */) !== 0 /* Normal */ && languageVersion < LanguageFeatureMinimumTarget.Generators) { checkExternalEmitHelpers(node, 128 /* Generator */); } } @@ -89407,10 +91757,10 @@ function createTypeChecker(host) { } if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 180 /* ConstructSignature */: + case 181 /* ConstructSignature */: error2(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 179 /* CallSignature */: + case 180 /* CallSignature */: error2(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -89428,7 +91778,7 @@ function createTypeChecker(host) { checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); } } - if (node.kind !== 181 /* IndexSignature */ && node.kind !== 317 /* JSDocFunctionType */) { + if (node.kind !== 182 /* IndexSignature */ && node.kind !== 318 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -89445,7 +91795,7 @@ function createTypeChecker(host) { const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 176 /* Constructor */) { + if (member.kind === 177 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -89463,16 +91813,16 @@ function createTypeChecker(host) { const memberName = name && getEffectivePropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -89516,6 +91866,7 @@ function createTypeChecker(host) { if (useDefineForClassFields) { break; } + // fall through case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); @@ -89528,7 +91879,7 @@ function createTypeChecker(host) { function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 171 /* PropertySignature */) { + if (member.kind === 172 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -89552,7 +91903,7 @@ function createTypeChecker(host) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 264 /* InterfaceDeclaration */) { + if (node.kind === 265 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -89562,15 +91913,17 @@ function createTypeChecker(host) { if (indexSymbol == null ? void 0 : indexSymbol.declarations) { const indexSignatureMap = /* @__PURE__ */ new Map(); for (const declaration of indexSymbol.declarations) { - if (declaration.parameters.length === 1 && declaration.parameters[0].type) { - forEachType(getTypeFromTypeNode(declaration.parameters[0].type), (type) => { - const entry = indexSignatureMap.get(getTypeId(type)); - if (entry) { - entry.declarations.push(declaration); - } else { - indexSignatureMap.set(getTypeId(type), { type, declarations: [declaration] }); - } - }); + if (isIndexSignatureDeclaration(declaration)) { + if (declaration.parameters.length === 1 && declaration.parameters[0].type) { + forEachType(getTypeFromTypeNode(declaration.parameters[0].type), (type) => { + const entry = indexSignatureMap.get(getTypeId(type)); + if (entry) { + entry.declarations.push(declaration); + } else { + indexSignatureMap.set(getTypeId(type), { type, declarations: [declaration] }); + } + }); + } } } indexSignatureMap.forEach((entry) => { @@ -89586,7 +91939,7 @@ function createTypeChecker(host) { if (!checkGrammarModifiers(node) && !checkGrammarProperty(node)) checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 173 /* PropertyDeclaration */ && node.initializer) { error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -89602,7 +91955,7 @@ function createTypeChecker(host) { error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 175 /* MethodDeclaration */ && node.body) { error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -89612,7 +91965,7 @@ function createTypeChecker(host) { } function setNodeLinksForPrivateIdentifierScope(node) { if (isPrivateIdentifier(node.name)) { - if (languageVersion < 9 /* PrivateNamesAndClassStaticBlocks */ || languageVersion < 99 /* ClassAndClassElementDecorators */ || !useDefineForClassFields) { + if (languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators || !useDefineForClassFields) { for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) { getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */; } @@ -89648,7 +92001,7 @@ function createTypeChecker(host) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 173 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -89710,20 +92063,20 @@ function createTypeChecker(host) { if (!checkGrammarFunctionLikeDeclaration(node) && !checkGrammarAccessor(node)) checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 178 /* GetAccessor */) { if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) { if (!(node.flags & 1024 /* HasExplicitReturn */)) { error2(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 167 /* ComputedPropertyName */) { + if (node.name.kind === 168 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 178 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 179 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -89739,7 +92092,7 @@ function createTypeChecker(host) { } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 178 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -89795,7 +92148,7 @@ function createTypeChecker(host) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 184 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -89899,7 +92252,7 @@ function createTypeChecker(host) { const objectIndexType = isGenericMappedType(objectType) && getMappedTypeNameTypeKind(objectType) === 2 /* Remapping */ ? getIndexTypeForMappedType(objectType, 0 /* None */) : getIndexType(objectType, 0 /* None */); const hasNumberIndexInfo = !!getIndexInfoOfType(objectType, numberType); if (everyType(indexType, (t) => isTypeAssignableTo(t, objectIndexType) || hasNumberIndexInfo && isApplicableIndexType(t, numberType))) { - if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 213 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; @@ -89956,7 +92309,7 @@ function createTypeChecker(host) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 195 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -89966,7 +92319,7 @@ function createTypeChecker(host) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 169 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -89996,10 +92349,10 @@ function createTypeChecker(host) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 190 /* OptionalType */) { + if (node.type.kind === 191 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 191 /* RestType */) { + if (node.type.kind === 192 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); @@ -90010,7 +92363,7 @@ function createTypeChecker(host) { } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlagsCached(n); - if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { + if (n.parent.kind !== 265 /* InterfaceDeclaration */ && n.parent.kind !== 264 /* ClassDeclaration */ && n.parent.kind !== 232 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { const container = getEnclosingContainer(n); if (container && container.flags & 128 /* ExportContext */ && !(flags & 128 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 32 /* Export */; @@ -90031,16 +92384,20 @@ function createTypeChecker(host) { const someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags; if (someButNotAllOverloadFlags !== 0) { const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2); - forEach(overloads, (o) => { - const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; - if (deviation & 32 /* Export */) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); - } else if (deviation & 128 /* Ambient */) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } else if (deviation & (2 /* Private */ | 4 /* Protected */)) { - error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } else if (deviation & 64 /* Abstract */) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); + group(overloads, (o) => getSourceFileOfNode(o).fileName).forEach((overloadsInFile) => { + const canonicalFlagsForFile = getEffectiveDeclarationFlags(getCanonicalOverload(overloadsInFile, implementation), flagsToCheck2); + for (const o of overloadsInFile) { + const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; + const deviationInFile = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlagsForFile; + if (deviationInFile & 32 /* Export */) { + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); + } else if (deviationInFile & 128 /* Ambient */) { + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); + } else if (deviation & (2 /* Private */ | 4 /* Protected */)) { + error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); + } else if (deviation & 64 /* Abstract */) { + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); + } } }); } @@ -90087,7 +92444,7 @@ function createTypeChecker(host) { (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 175 /* MethodDeclaration */ || node.kind === 174 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error2(errorNode2, diagnostic); @@ -90119,14 +92476,14 @@ function createTypeChecker(host) { for (const current of declarations) { const node = current; const inAmbientContext = node.flags & 33554432 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 265 /* InterfaceDeclaration */ || node.parent.kind === 188 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 264 /* ClassDeclaration */ || node.kind === 232 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { + if (node.kind === 263 /* FunctionDeclaration */ || node.kind === 175 /* MethodDeclaration */ || node.kind === 174 /* MethodSignature */ || node.kind === 177 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -90171,9 +92528,9 @@ function createTypeChecker(host) { }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 264 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 264 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 263 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( error2(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), @@ -90253,45 +92610,50 @@ function createTypeChecker(host) { function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + // A jsdoc typedef and callback are, by definition, type aliases. + // falls through + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: return 2 /* ExportType */; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: + case 264 /* ClassDeclaration */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 307 /* SourceFile */: + case 308 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 277 /* ExportAssignment */: - case 226 /* BinaryExpression */: + case 278 /* ExportAssignment */: + case 227 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 271 /* ImportEqualsDeclaration */: - case 274 /* NamespaceImport */: - case 273 /* ImportClause */: + // The below options all declare an Alias, which is allowed to merge with other values within the importing module. + // falls through + case 272 /* ImportEqualsDeclaration */: + case 275 /* NamespaceImport */: + case 274 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 262 /* FunctionDeclaration */: - case 276 /* ImportSpecifier */: + case 261 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 263 /* FunctionDeclaration */: + case 277 /* ImportSpecifier */: + // https://github.com/Microsoft/TypeScript/pull/7591 case 80 /* Identifier */: return 1 /* ExportValue */; - case 173 /* MethodSignature */: - case 171 /* PropertySignature */: + case 174 /* MethodSignature */: + case 172 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -90627,21 +92989,22 @@ function createTypeChecker(host) { let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 169 /* Parameter */: + // falls through + case 170 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -90686,15 +93049,15 @@ function createTypeChecker(host) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 193 /* IntersectionType */: - case 192 /* UnionType */: + case 194 /* IntersectionType */: + case 193 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: + case 197 /* ParenthesizedType */: + case 203 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return node.typeName; } } @@ -90702,13 +93065,13 @@ function createTypeChecker(host) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { + while (typeNode.kind === 197 /* ParenthesizedType */ || typeNode.kind === 203 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 146 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 202 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -90739,10 +93102,10 @@ function createTypeChecker(host) { } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 169 /* Parameter */) { + if (node.kind === 170 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } - } else if (languageVersion < 99 /* ClassAndClassElementDecorators */) { + } else if (languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* ESDecorateAndRunInitializers */); if (isClassDeclaration(node)) { if (!node.name) { @@ -90878,7 +93241,7 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -90889,7 +93252,7 @@ function createTypeChecker(host) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 168 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -90906,7 +93269,7 @@ function createTypeChecker(host) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 174 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -90942,42 +93305,42 @@ function createTypeChecker(host) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 307 /* SourceFile */: - case 267 /* ModuleDeclaration */: - case 241 /* Block */: - case 269 /* CaseBlock */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 308 /* SourceFile */: + case 268 /* ModuleDeclaration */: + case 242 /* Block */: + case 270 /* CaseBlock */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 177 /* Constructor */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 266 /* TypeAliasDeclaration */: + case 265 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 195 /* InferType */: + case 196 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -90996,11 +93359,11 @@ function createTypeChecker(host) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 175 /* MethodDeclaration */: + case 173 /* PropertyDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + if (member.kind === 179 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); @@ -91008,16 +93371,16 @@ function createTypeChecker(host) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 176 /* Constructor */: + case 177 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 2 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 181 /* IndexSignature */: - case 240 /* SemicolonClassElement */: - case 175 /* ClassStaticBlockDeclaration */: + case 182 /* IndexSignature */: + case 241 /* SemicolonClassElement */: + case 176 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -91039,7 +93402,7 @@ function createTypeChecker(host) { if (!isTypeParameterUnused(typeParameter)) continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 196 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -91122,7 +93485,7 @@ function createTypeChecker(host) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 275 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic( importDecl, @@ -91136,7 +93499,7 @@ function createTypeChecker(host) { unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 261 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 262 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic( @@ -91156,7 +93519,7 @@ function createTypeChecker(host) { addDiagnostic( declarationList, 0 /* Local */, - declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused) + declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 244 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused) ); } else { for (const decl of declarations) { @@ -91175,7 +93538,7 @@ function createTypeChecker(host) { if (!wrappingDeclaration.type) { addRelatedInfo( diagnostic, - createFileDiagnostic(getSourceFileOfNode(wrappingDeclaration), wrappingDeclaration.end, 1, Diagnostics.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, declarationNameToString(node.propertyName)) + createFileDiagnostic(getSourceFileOfNode(wrappingDeclaration), wrappingDeclaration.end, 0, Diagnostics.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, declarationNameToString(node.propertyName)) ); } diagnostics.add(diagnostic); @@ -91186,21 +93549,21 @@ function createTypeChecker(host) { switch (name.kind) { case 80 /* Identifier */: return idText(name); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */; + return node.kind === 274 /* ImportClause */ || node.kind === 277 /* ImportSpecifier */ || node.kind === 275 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 274 /* ImportClause */ ? decl : decl.kind === 275 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 241 /* Block */) { + if (node.kind === 242 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -91228,7 +93591,7 @@ function createTypeChecker(host) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) { + if (node.kind === 173 /* PropertyDeclaration */ || node.kind === 172 /* PropertySignature */ || node.kind === 175 /* MethodDeclaration */ || node.kind === 174 /* MethodSignature */ || node.kind === 178 /* GetAccessor */ || node.kind === 179 /* SetAccessor */ || node.kind === 304 /* PropertyAssignment */) { return false; } if (node.flags & 33554432 /* Ambient */) { @@ -91274,7 +93637,7 @@ function createTypeChecker(host) { }); } function checkCollisionWithRequireExportsInGeneratedCode(node, name) { - if (moduleKind >= 5 /* ES2015 */ && !(moduleKind >= 100 /* Node16 */ && getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) >= 5 /* ES2015 */) { return; } if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { @@ -91284,7 +93647,7 @@ function createTypeChecker(host) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, declarationNameToString(name), declarationNameToString(name)); } } @@ -91296,7 +93659,7 @@ function createTypeChecker(host) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 307 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { + if (parent2.kind === 308 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, declarationNameToString(name), declarationNameToString(name)); } } @@ -91374,9 +93737,9 @@ function createTypeChecker(host) { ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 307 /* SourceFile */); + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 262 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 244 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 242 /* Block */ && isFunctionLike(container.parent) || container.kind === 269 /* ModuleBlock */ || container.kind === 268 /* ModuleDeclaration */ || container.kind === 308 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); error2(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -91397,7 +93760,7 @@ function createTypeChecker(host) { if (!node.name) { return; } - if (node.name.kind === 167 /* ComputedPropertyName */) { + if (node.name.kind === 168 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -91408,10 +93771,10 @@ function createTypeChecker(host) { potentialUnusedRenamedBindingElementsInTypes.push(node); return; } - if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ObjectSpreadRest */) { + if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < LanguageFeatureMinimumTarget.ObjectSpreadRest) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 168 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -91444,7 +93807,7 @@ function createTypeChecker(host) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* BindingPatterns */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 208 /* ArrayBindingPattern */ && languageVersion < LanguageFeatureMinimumTarget.BindingPatterns && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -91457,7 +93820,7 @@ function createTypeChecker(host) { if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 250 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -91484,12 +93847,15 @@ function createTypeChecker(host) { checkAliasSymbol(node); return; } + if (node.name.kind === 10 /* BigIntLiteral */) { + error2(node.name, Diagnostics.A_bigint_literal_cannot_be_used_as_a_property_name); + } const type = convertAutoToAny(getTypeOfSymbol(symbol)); if (node === symbol.valueDeclaration) { const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 250 /* ForInStatement */) { const initializerType = checkExpressionCached(initializer); checkTypeAssignableToAndOptionallyElaborate( initializerType, @@ -91511,7 +93877,7 @@ function createTypeChecker(host) { ); if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); - checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + checkTypeAssignableTo(widenTypeForVariableLikeDeclaration(initializerType, node), optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); } } else if (blockScopeKind === 4 /* Using */) { const globalDisposableType = getGlobalDisposableType( @@ -91520,7 +93886,7 @@ function createTypeChecker(host) { ); if (globalDisposableType !== emptyObjectType) { const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); - checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + checkTypeAssignableTo(widenTypeForVariableLikeDeclaration(initializerType, node), optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); } } } @@ -91549,9 +93915,9 @@ function createTypeChecker(host) { error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) { + if (node.kind !== 173 /* PropertyDeclaration */ && node.kind !== 172 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 261 /* VariableDeclaration */ || node.kind === 209 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -91559,7 +93925,7 @@ function createTypeChecker(host) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 173 /* PropertyDeclaration */ || nextDeclaration.kind === 172 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); const err = error2( nextDeclarationName, @@ -91573,7 +93939,7 @@ function createTypeChecker(host) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { + if (left.kind === 170 /* Parameter */ && right.kind === 261 /* VariableDeclaration */ || left.kind === 261 /* VariableDeclaration */ && right.kind === 170 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -91595,7 +93961,7 @@ function createTypeChecker(host) { } function checkVariableDeclarationList(node) { const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */; - if ((blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) && languageVersion < 99 /* UsingAndAwaitUsing */) { + if ((blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) && languageVersion < LanguageFeatureMinimumTarget.UsingAndAwaitUsing) { checkExternalEmitHelpers(node, 16777216 /* AddDisposableResourceAndDisposeResources */); } forEach(node.declarations, checkSourceElement); @@ -91613,7 +93979,7 @@ function createTypeChecker(host) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableOrEnumMemberType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 242 /* EmptyStatement */) { + if (node.thenStatement.kind === 243 /* EmptyStatement */) { error2(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -91638,7 +94004,7 @@ function createTypeChecker(host) { bothHelper(location, body2); return; } - const type = location === condExpr2 ? condType : checkTruthinessExpression(location); + const type = location === condExpr2 ? condType : checkExpression(location); if (type.flags & 1024 /* EnumLiteral */ && isPropertyAccessExpression(location) && (getNodeLinks(location.expression).resolvedSymbol ?? unknownSymbol).flags & 384 /* Enum */) { error2(location, Diagnostics.This_condition_will_always_return_0, !!type.value ? "true" : "false"); return; @@ -91733,20 +94099,62 @@ function createTypeChecker(host) { function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { error2(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); + } else { + const semantics = getSyntacticTruthySemantics(node); + if (semantics !== 3 /* Sometimes */) { + error2( + node, + semantics === 1 /* Always */ ? Diagnostics.This_kind_of_expression_is_always_truthy : Diagnostics.This_kind_of_expression_is_always_falsy + ); + } } return type; } + function getSyntacticTruthySemantics(node) { + node = skipOuterExpressions(node); + switch (node.kind) { + case 9 /* NumericLiteral */: + if (node.text === "0" || node.text === "1") { + return 3 /* Sometimes */; + } + return 1 /* Always */; + case 210 /* ArrayLiteralExpression */: + case 220 /* ArrowFunction */: + case 10 /* BigIntLiteral */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 285 /* JsxElement */: + case 286 /* JsxSelfClosingElement */: + case 211 /* ObjectLiteralExpression */: + case 14 /* RegularExpressionLiteral */: + return 1 /* Always */; + case 223 /* VoidExpression */: + case 106 /* NullKeyword */: + return 2 /* Never */; + case 15 /* NoSubstitutionTemplateLiteral */: + case 11 /* StringLiteral */: + return !!node.text ? 1 /* Always */ : 2 /* Never */; + case 228 /* ConditionalExpression */: + return getSyntacticTruthySemantics(node.whenTrue) | getSyntacticTruthySemantics(node.whenFalse); + case 80 /* Identifier */: + if (getResolvedSymbol(node) === undefinedSymbol) { + return 2 /* Never */; + } + return 3 /* Sometimes */; + } + return 3 /* Sometimes */; + } function checkTruthinessExpression(node, checkMode) { return checkTruthinessOfType(checkExpression(node, checkMode), node); } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 262 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 261 /* VariableDeclarationList */) { + if (node.initializer.kind === 262 /* VariableDeclarationList */) { checkVariableDeclarationList(node.initializer); } else { checkExpression(node.initializer); @@ -91767,19 +94175,19 @@ function createTypeChecker(host) { grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); } else { const functionFlags = getFunctionFlags(container); - if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 5 /* ForAwaitOf */) { + if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < LanguageFeatureMinimumTarget.ForAwaitOf) { checkExternalEmitHelpers(node, 16384 /* ForAwaitOfIncludes */); } } - } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ForOf */) { + } else if (compilerOptions.downlevelIteration && languageVersion < LanguageFeatureMinimumTarget.ForOf) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 261 /* VariableDeclarationList */) { + if (node.initializer.kind === 262 /* VariableDeclarationList */) { checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 210 /* ArrayLiteralExpression */ || varExpr.kind === 211 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -91801,7 +94209,7 @@ function createTypeChecker(host) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 261 /* VariableDeclarationList */) { + if (node.initializer.kind === 262 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { error2(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -91810,7 +94218,7 @@ function createTypeChecker(host) { } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + if (varExpr.kind === 210 /* ArrayLiteralExpression */ || varExpr.kind === 211 /* ObjectLiteralExpression */) { error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); @@ -92000,11 +94408,14 @@ function createTypeChecker(host) { } function getIterationTypesOfIterable(type, use, errorNode) { var _a, _b; + if (type === silentNeverType) { + return silentNeverIterationTypes; + } if (isTypeAny(type)) { return anyIterationTypes; } if (!(type.flags & 1048576 /* Union */)) { - const errorOutputContainer = errorNode ? { errors: void 0 } : void 0; + const errorOutputContainer = errorNode ? { errors: void 0, skipLogging: true } : void 0; const iterationTypes2 = getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer); if (iterationTypes2 === noIterationTypes) { if (errorNode) { @@ -92118,30 +94529,21 @@ function createTypeChecker(host) { function getIterationTypesOfIterableCached(type, resolver) { return getCachedIterationTypes(type, resolver.iterableCacheKey); } - function getIterationTypesOfGlobalIterableType(globalType, resolver) { - const globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || getIterationTypesOfIterableSlow( - globalType, - resolver, - /*errorNode*/ - void 0, - /*errorOutputContainer*/ - void 0, - /*noCache*/ - false - ); - return globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes; - } function getIterationTypesOfIterableFast(type, resolver) { - let globalType; - if (isReferenceToType2(type, globalType = resolver.getGlobalIterableType( + if (isReferenceToType2(type, resolver.getGlobalIterableType( + /*reportErrors*/ + false + )) || isReferenceToType2(type, resolver.getGlobalIteratorObjectType( + /*reportErrors*/ + false + )) || isReferenceToType2(type, resolver.getGlobalIterableIteratorType( /*reportErrors*/ false - )) || isReferenceToType2(type, globalType = resolver.getGlobalIterableIteratorType( + )) || isReferenceToType2(type, resolver.getGlobalGeneratorType( /*reportErrors*/ false ))) { - const [yieldType] = getTypeArguments(type); - const { returnType, nextType } = getIterationTypesOfGlobalIterableType(globalType, resolver); + const [yieldType, returnType, nextType] = getTypeArguments(type); return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType( yieldType, /*errorNode*/ @@ -92152,11 +94554,10 @@ function createTypeChecker(host) { void 0 ) || returnType, nextType)); } - if (isReferenceToType2(type, resolver.getGlobalGeneratorType( - /*reportErrors*/ - false - ))) { - const [yieldType, returnType, nextType] = getTypeArguments(type); + if (isReferenceToSomeType(type, resolver.getGlobalBuiltinIteratorTypes())) { + const [yieldType] = getTypeArguments(type); + const returnType = getBuiltinIteratorReturnType(); + const nextType = unknownType; return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType( yieldType, /*errorNode*/ @@ -92182,11 +94583,27 @@ function createTypeChecker(host) { if (isTypeAny(methodType)) { return noCache ? anyIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); } - const signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : void 0; - if (!some(signatures)) { + const allSignatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : void 0; + const validSignatures = filter(allSignatures, (sig) => getMinArgumentCount(sig) === 0); + if (!some(validSignatures)) { + if (errorNode && some(allSignatures)) { + checkTypeAssignableTo( + type, + resolver.getGlobalIterableType( + /*reportErrors*/ + true + ), + errorNode, + /*headMessage*/ + void 0, + /*containingMessageChain*/ + void 0, + errorOutputContainer + ); + } return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } - const iteratorType = getIntersectionType(map(signatures, getReturnTypeOfSignature)); + const iteratorType = getIntersectionType(map(validSignatures, getReturnTypeOfSignature)); const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes; return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } @@ -92197,10 +94614,10 @@ function createTypeChecker(host) { !!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType( /*reportErrors*/ false - ) !== emptyGenericType && isTypeAssignableTo(type, getGlobalAsyncIterableType( + ) !== emptyGenericType && isTypeAssignableTo(type, createTypeFromGenericGlobalType(getGlobalAsyncIterableType( /*reportErrors*/ false - )) + ), [anyType, anyType, anyType])) ); return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type)); } @@ -92230,26 +94647,13 @@ function createTypeChecker(host) { return getCachedIterationTypes(type, resolver.iteratorCacheKey); } function getIterationTypesOfIteratorFast(type, resolver) { - const globalType = resolver.getGlobalIterableIteratorType( + if (isReferenceToType2(type, resolver.getGlobalIterableIteratorType( /*reportErrors*/ false - ); - if (isReferenceToType2(type, globalType)) { - const [yieldType] = getTypeArguments(type); - const globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow( - globalType, - resolver, - /*errorNode*/ - void 0, - /*errorOutputContainer*/ - void 0, - /*noCache*/ - false - ); - const { returnType, nextType } = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes; - return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); - } - if (isReferenceToType2(type, resolver.getGlobalIteratorType( + )) || isReferenceToType2(type, resolver.getGlobalIteratorType( + /*reportErrors*/ + false + )) || isReferenceToType2(type, resolver.getGlobalIteratorObjectType( /*reportErrors*/ false )) || isReferenceToType2(type, resolver.getGlobalGeneratorType( @@ -92259,6 +94663,12 @@ function createTypeChecker(host) { const [yieldType, returnType, nextType] = getTypeArguments(type); return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } + if (isReferenceToSomeType(type, resolver.getGlobalBuiltinIteratorTypes())) { + const [yieldType] = getTypeArguments(type); + const returnType = getBuiltinIteratorReturnType(); + const nextType = unknownType; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); + } } function isIteratorResult(type, kind) { const doneType = getTypeOfPropertyOfType(type, "done") || falseType; @@ -92326,7 +94736,7 @@ function createTypeChecker(host) { } const methodType = method && !(methodName === "next" && method.flags & 16777216 /* Optional */) ? methodName === "next" ? getTypeOfSymbol(method) : getTypeWithFacts(getTypeOfSymbol(method), 2097152 /* NEUndefinedOrNull */) : void 0; if (isTypeAny(methodType)) { - return methodName === "next" ? anyIterationTypes : anyIterationTypesExceptNext; + return anyIterationTypes; } const methodSignatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : emptyArray; if (methodSignatures.length === 0) { @@ -92471,34 +94881,64 @@ function createTypeChecker(host) { } const signature = getSignatureFromDeclaration(container); const returnType = getReturnTypeOfSignature(signature); - const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 178 /* SetAccessor */) { + if (container.kind === 179 /* SetAccessor */) { if (node.expression) { error2(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 176 /* Constructor */) { - if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { + } else if (container.kind === 177 /* Constructor */) { + const exprType2 = node.expression ? checkExpressionCached(node.expression) : undefinedType; + if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType2, returnType, node, node.expression)) { error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } else if (getReturnTypeFromAnnotation(container)) { - const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType; - const unwrappedExprType = functionFlags & 2 /* Async */ ? checkAwaitedType( - exprType, - /*withAlias*/ - false, - node, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - ) : exprType; - if (unwrappedReturnType) { - checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); - } + const unwrappedReturnType = unwrapReturnType(returnType, getFunctionFlags(container)) ?? returnType; + checkReturnExpression(container, unwrappedReturnType, node, node.expression, exprType); } - } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { + } else if (container.kind !== 177 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { error2(node, Diagnostics.Not_all_code_paths_return_a_value); } } + function checkReturnExpression(container, unwrappedReturnType, node, expr, exprType, inConditionalExpression = false) { + const excludeJSDocTypeAssertions = isInJSFile(node); + const functionFlags = getFunctionFlags(container); + if (expr) { + const unwrappedExpr = skipParentheses(expr, excludeJSDocTypeAssertions); + if (isConditionalExpression(unwrappedExpr)) { + checkReturnExpression( + container, + unwrappedReturnType, + node, + unwrappedExpr.whenTrue, + checkExpression(unwrappedExpr.whenTrue), + /*inConditionalExpression*/ + true + ); + checkReturnExpression( + container, + unwrappedReturnType, + node, + unwrappedExpr.whenFalse, + checkExpression(unwrappedExpr.whenFalse), + /*inConditionalExpression*/ + true + ); + return; + } + } + const inReturnStatement = node.kind === 254 /* ReturnStatement */; + const unwrappedExprType = functionFlags & 2 /* Async */ ? checkAwaitedType( + exprType, + /*withAlias*/ + false, + node, + Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ) : exprType; + const effectiveExpr = expr && getEffectiveCheckNode(expr); + const errorNode = inReturnStatement && !inConditionalExpression ? node : effectiveExpr; + checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, errorNode, effectiveExpr); + } function checkWithStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { if (node.flags & 65536 /* AwaitContext */) { @@ -92519,7 +94959,7 @@ function createTypeChecker(host) { let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 298 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -92527,7 +94967,7 @@ function createTypeChecker(host) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 296 /* CaseClause */) { + if (clause.kind === 297 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -92559,7 +94999,7 @@ function createTypeChecker(host) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 257 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -92630,7 +95070,7 @@ function createTypeChecker(host) { const typeDeclaration = symbol.valueDeclaration; if (typeDeclaration && isClassLike(typeDeclaration)) { for (const member of typeDeclaration.members) { - if (!isStatic(member) && !hasBindableName(member)) { + if ((!isStaticIndex && !isStatic(member) || isStaticIndex && isStatic(member)) && !hasBindableName(member)) { const symbol2 = getSymbolOfDeclaration(member); checkIndexConstraintForProperty(type, symbol2, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol2)); } @@ -92649,8 +95089,8 @@ function createTypeChecker(host) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 265 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 227 /* BinaryExpression */ || name && name.kind === 168 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -92667,7 +95107,7 @@ function createTypeChecker(host) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 265 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) continue; @@ -92695,8 +95135,8 @@ function createTypeChecker(host) { } } function checkClassNameCollisionWithObject(name) { - if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(name).impliedNodeFormat === 1 /* CommonJS */)) { - error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); + if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < 5 /* ES2015 */) { + error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0, ModuleKind[moduleKind]); } } function checkUnmatchedJSDocParameters(node) { @@ -92765,7 +95205,7 @@ function createTypeChecker(host) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 183 /* TypeReference */) { + if (node.kind === 184 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -92829,12 +95269,12 @@ function createTypeChecker(host) { return true; } function getFirstTransformableStaticClassElement(node) { - const willTransformStaticElementsOfDecoratedClass = !legacyDecorators && languageVersion < 99 /* ClassAndClassElementDecorators */ && classOrConstructorParameterIsDecorated( + const willTransformStaticElementsOfDecoratedClass = !legacyDecorators && languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators && classOrConstructorParameterIsDecorated( /*useLegacyDecorators*/ false, node ); - const willTransformPrivateElementsOrClassStaticBlocks = languageVersion < 9 /* PrivateNamesAndClassStaticBlocks */ || languageVersion < 99 /* ClassAndClassElementDecorators */; + const willTransformPrivateElementsOrClassStaticBlocks = languageVersion < LanguageFeatureMinimumTarget.PrivateNamesAndClassStaticBlocks || languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators; const willTransformInitializers = !emitStandardClassFields; if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) { for (const member of node.members) { @@ -92861,7 +95301,7 @@ function createTypeChecker(host) { if (node.name) return; const parent2 = walkUpOuterExpressions(node); if (!isNamedEvaluationSource(parent2)) return; - const willTransformESDecorators = !legacyDecorators && languageVersion < 99 /* ClassAndClassElementDecorators */; + const willTransformESDecorators = !legacyDecorators && languageVersion < LanguageFeatureMinimumTarget.ClassAndClassElementDecorators; let location; if (willTransformESDecorators && classOrConstructorParameterIsDecorated( /*useLegacyDecorators*/ @@ -92921,7 +95361,7 @@ function createTypeChecker(host) { const baseTypeNode = getEffectiveBaseTypeNode(node); if (baseTypeNode) { forEach(baseTypeNode.typeArguments, checkSourceElement); - if (languageVersion < 2 /* Classes */) { + if (languageVersion < LanguageFeatureMinimumTarget.Classes) { checkExternalEmitHelpers(baseTypeNode.parent, 1 /* Extends */); } const extendsNode = getClassExtendsHeritageElement(node); @@ -93074,23 +95514,29 @@ function createTypeChecker(host) { hasAbstractModifier(member), isStatic(member), memberIsParameterProperty, - symbolName(declaredProp), + declaredProp, reportErrors2 ? member : void 0 ); } - function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) { + function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) { const isJs = isInJSFile(node); const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); + if (memberHasOverrideModifier && (member == null ? void 0 : member.valueDeclaration) && isClassElement(member.valueDeclaration) && member.valueDeclaration.name && isNonBindableDynamicName(member.valueDeclaration.name)) { + error2( + errorNode, + isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic + ); + return 2 /* HasInvalidOverride */; + } if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) { - const memberEscapedName = escapeLeadingUnderscores(memberName); const thisType = memberIsStatic ? staticType : typeWithThis; const baseType = memberIsStatic ? baseStaticType : baseWithThis; - const prop = getPropertyOfType(thisType, memberEscapedName); - const baseProp = getPropertyOfType(baseType, memberEscapedName); + const prop = getPropertyOfType(thisType, member.escapedName); + const baseProp = getPropertyOfType(baseType, member.escapedName); const baseClassName = typeToString(baseWithThis); if (prop && !baseProp && memberHasOverrideModifier) { if (errorNode) { - const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType); + const suggestion = getSuggestedSymbolForNonexistentClassMember(symbolName(member), baseType); suggestion ? error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, @@ -93207,14 +95653,14 @@ function createTypeChecker(host) { isStatic(member), /*memberIsParameterProperty*/ false, - symbolName(memberSymbol) + memberSymbol ); } function getTargetSymbol(s) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 264 /* ClassDeclaration */ || d.kind === 265 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a, _b, _c, _d, _e; @@ -93267,7 +95713,7 @@ function createTypeChecker(host) { const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); + const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 173 /* PropertyDeclaration */ && !d.initializer); if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_e = derived.declarations) == null ? void 0 : _e.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; @@ -93401,7 +95847,7 @@ function createTypeChecker(host) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 173 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -93428,13 +95874,16 @@ function createTypeChecker(host) { } function checkInterfaceDeclaration(node) { if (!checkGrammarModifiers(node)) checkGrammarInterfaceDeclaration(node); + if (!allowBlockDeclarations(node.parent)) { + grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, "interface"); + } checkTypeParameters(node.typeParameters); addLazyDiagnostic(() => { checkTypeNameIsReserved(node.name, Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 265 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -93462,10 +95911,15 @@ function createTypeChecker(host) { function checkTypeAliasDeclaration(node) { checkGrammarModifiers(node); checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); + if (!allowBlockDeclarations(node.parent)) { + grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, "type"); + } checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); if (node.type.kind === 141 /* IntrinsicKeyword */) { - if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { + const typeParameterCount = length(node.typeParameters); + const valid = typeParameterCount === 0 ? node.name.escapedText === "BuiltinIteratorReturn" : typeParameterCount === 1 && intrinsicTypeKinds.has(node.name.escapedText); + if (!valid) { error2(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } } else { @@ -93490,6 +95944,8 @@ function createTypeChecker(host) { function computeEnumMemberValue(member, autoValue, previous) { if (isComputedNonLiteralName(member.name)) { error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); + } else if (isBigIntLiteral(member.name)) { + error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); } else { const text = getTextOfPropertyName(member.name); if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) { @@ -93665,7 +96121,10 @@ function createTypeChecker(host) { checkGrammarModifiers(node); checkCollisionsForDeclarationName(node, node.name); checkExportsOnMergedDeclarations(node); - node.members.forEach(checkEnumMember); + node.members.forEach(checkSourceElement); + if (compilerOptions.erasableSyntaxOnly && !(node.flags & 33554432 /* Ambient */)) { + error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } computeEnumMemberValues(node); const enumSymbol = getSymbolOfDeclaration(node); const firstDeclaration = getDeclarationOfKind(enumSymbol, node.kind); @@ -93680,7 +96139,7 @@ function createTypeChecker(host) { } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 266 /* EnumDeclaration */) { + if (declaration.kind !== 267 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -93710,7 +96169,7 @@ function createTypeChecker(host) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { + if ((declaration.kind === 264 /* ClassDeclaration */ || declaration.kind === 263 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { return declaration; } } @@ -93755,10 +96214,21 @@ function createTypeChecker(host) { } if (isIdentifier(node.name)) { checkCollisionsForDeclarationName(node, node.name); + if (!(node.flags & (32 /* Namespace */ | 2048 /* GlobalAugmentation */))) { + const sourceFile = getSourceFileOfNode(node); + const pos = getNonModifierTokenPosOfNode(node); + const span = getSpanOfTokenAtPosition(sourceFile, pos); + suggestionDiagnostics.add( + createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead) + ); + } } checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); if (symbol.flags & 512 /* ValueModule */ && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) { + if (compilerOptions.erasableSyntaxOnly) { + error2(node.name, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) { error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); } @@ -93771,12 +96241,12 @@ function createTypeChecker(host) { error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 264 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 307 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 308 /* SourceFile */ && host.getEmitModuleFormatOfFile(node.parent) === 1 /* CommonJS */) { const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */); if (exportModifier) { error2(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); @@ -93809,21 +96279,23 @@ function createTypeChecker(host) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: + case 278 /* ExportAssignment */: + case 279 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + if (isInternalModuleImportEqualsDeclaration(node)) break; + // falls through + case 273 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 208 /* BindingElement */: - case 260 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 261 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -93831,12 +96303,13 @@ function createTypeChecker(host) { } break; } - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 262 /* FunctionDeclaration */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: + // falls through + case 264 /* ClassDeclaration */: + case 267 /* EnumDeclaration */: + case 263 /* FunctionDeclaration */: + case 265 /* InterfaceDeclaration */: + case 268 /* ModuleDeclaration */: + case 266 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -93847,12 +96320,12 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -93871,11 +96344,11 @@ function createTypeChecker(host) { error2(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 307 /* SourceFile */ && !inAmbientExternalModule) { + const inAmbientExternalModule = node.parent.kind === 269 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule) { error2( moduleName, - node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module + node.kind === 279 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module ); return false; } @@ -93898,18 +96371,28 @@ function createTypeChecker(host) { } return true; } + function checkModuleExportName(name, allowStringLiteral = true) { + if (name === void 0 || name.kind !== 11 /* StringLiteral */) { + return; + } + if (!allowStringLiteral) { + grammarErrorOnNode(name, Diagnostics.Identifier_expected); + } else if (moduleKind === 5 /* ES2015 */ || moduleKind === 6 /* ES2020 */) { + grammarErrorOnNode(name, Diagnostics.String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020); + } + } function checkAliasSymbol(node) { - var _a, _b, _c, _d; + var _a, _b, _c, _d, _e; let symbol = getSymbolOfDeclaration(node); const target = resolveAlias(symbol); if (target !== unknownSymbol) { symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 280 /* NamespaceExport */); - if (node.kind === 281 /* ExportSpecifier */) { + Debug.assert(node.kind !== 281 /* NamespaceExport */); + if (node.kind === 282 /* ExportSpecifier */) { const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); - const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); + const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get(moduleExportNameTextEscaped(node.propertyName || node.name)); if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); if (exportingDeclaration) { @@ -93924,7 +96407,7 @@ function createTypeChecker(host) { } } } else { - Debug.assert(node.kind !== 260 /* VariableDeclaration */); + Debug.assert(node.kind !== 261 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); @@ -93940,9 +96423,9 @@ function createTypeChecker(host) { const targetFlags = getSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 282 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error2(node, message, symbolToString(symbol)); - } else if (node.kind !== 281 /* ExportSpecifier */) { + } else if (node.kind !== 282 /* ExportSpecifier */) { const appearsValueyToTranspiler = compilerOptions.isolatedModules && !findAncestor(node, isTypeOnlyImportOrExportDeclaration); if (appearsValueyToTranspiler && symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */)) { error2( @@ -93958,27 +96441,27 @@ function createTypeChecker(host) { const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 273 /* ImportClause */: - case 276 /* ImportSpecifier */: - case 271 /* ImportEqualsDeclaration */: { + case 274 /* ImportClause */: + case 277 /* ImportSpecifier */: + case 272 /* ImportEqualsDeclaration */: { if (compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled; - const name = idText(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = moduleExportNameTextUnescaped(node.kind === 277 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error2(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) { + if (isType && node.kind === 272 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) { error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 281 /* ExportSpecifier */: { + case 282 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { - const name = idText(node.propertyName || node.name); + const name = moduleExportNameTextUnescaped(node.propertyName || node.name); const diagnostic = isType ? error2(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error2(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); addTypeOnlyDeclarationRelatedInfo(diagnostic, isType ? void 0 : typeOnlyAlias, name); break; @@ -93986,8 +96469,17 @@ function createTypeChecker(host) { } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (compilerOptions.verbatimModuleSyntax && node.kind !== 272 /* ImportEqualsDeclaration */ && !isInJSFile(node) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) { + error2(node, getVerbatimModuleSyntaxErrorMessage(node)); + } else if (moduleKind === 200 /* Preserve */ && node.kind !== 272 /* ImportEqualsDeclaration */ && node.kind !== 261 /* VariableDeclaration */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) { + error2(node, Diagnostics.ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve); + } + if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) { + const constEnumDeclaration = target.valueDeclaration; + const redirect = (_e = host.getRedirectFromOutput(getSourceFileOfNode(constEnumDeclaration).resolvedPath)) == null ? void 0 : _e.resolvedRef; + if (constEnumDeclaration.flags & 33554432 /* Ambient */ && (!redirect || !shouldPreserveConstEnums(redirect.commandLine.options))) { + error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); + } } } if (isImportSpecifier(node)) { @@ -94026,8 +96518,11 @@ function createTypeChecker(host) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 276 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - checkExternalEmitHelpers(node, 131072 /* ImportDefault */); + if (node.kind === 277 /* ImportSpecifier */) { + checkModuleExportName(node.propertyName); + if (moduleExportNameIsDefault(node.propertyName || node.name) && getESModuleInterop(compilerOptions) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */) { + checkExternalEmitHelpers(node, 131072 /* ImportDefault */); + } } } function checkImportAttributes(declaration) { @@ -94047,10 +96542,20 @@ function createTypeChecker(host) { if (validForTypeAttributes && override) { return; } - const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier); - if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) { - const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve; - return grammarErrorOnNode(node, message); + if (!moduleSupportsImportAttributes(moduleKind)) { + return grammarErrorOnNode( + node, + isImportAttributes2 ? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve + ); + } + if (102 /* Node20 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ && !isImportAttributes2) { + return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert); + } + if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1 /* CommonJS */) { + return grammarErrorOnNode( + node, + isImportAttributes2 ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls + ); } const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly); if (isTypeOnly) { @@ -94072,37 +96577,52 @@ function createTypeChecker(host) { grammarErrorOnFirstToken(node, Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { + let resolvedModule; const importClause = node.importClause; if (importClause && !checkGrammarImportClause(importClause)) { if (importClause.name) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 275 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); - if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { + if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */ && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); } } else { - const moduleExisted = resolveExternalModuleName(node, node.moduleSpecifier); - if (moduleExisted) { + resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier); + if (resolvedModule) { forEach(importClause.namedBindings.elements, checkImportBinding); } } } + if (!importClause.isTypeOnly && 101 /* Node18 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) { + error2(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]); + } + } else if (noUncheckedSideEffectImports && !importClause) { + void resolveExternalModuleName(node, node.moduleSpecifier); } } checkImportAttributes(node); } + function hasTypeJsonImportAttribute(node) { + return !!node.attributes && node.attributes.elements.some((attr) => { + var _a; + return getTextOfIdentifierOrLiteral(attr.name) === "type" && ((_a = tryCast(attr.value, isStringLiteralLike)) == null ? void 0 : _a.text) === "json"; + }); + } function checkImportEqualsDeclaration(node) { if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { return; } checkGrammarModifiers(node); + if (compilerOptions.erasableSyntaxOnly && !(node.flags & 33554432 /* Ambient */)) { + error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); markLinkedReferences(node, 6 /* ExportImportEquals */); - if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 284 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { const targetFlags = getSymbolFlags(target); @@ -94120,7 +96640,7 @@ function createTypeChecker(host) { grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type); } } else { - if (moduleKind >= 5 /* ES2015 */ && moduleKind !== 200 /* Preserve */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { + if (5 /* ES2015 */ <= moduleKind && moduleKind <= 99 /* ESNext */ && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } @@ -94137,9 +96657,9 @@ function createTypeChecker(host) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; - if (node.parent.kind !== 307 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 269 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 269 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; + if (node.parent.kind !== 308 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error2(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -94148,8 +96668,9 @@ function createTypeChecker(host) { error2(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } else if (node.exportClause) { checkAliasSymbol(node.exportClause); + checkModuleExportName(node.exportClause.name); } - if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */) { if (node.exportClause) { if (getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -94164,13 +96685,13 @@ function createTypeChecker(host) { } function checkGrammarExportDeclaration(node) { var _a; - if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) { + if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 280 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 307 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 308 /* SourceFile */ || node.parent.kind === 269 /* ModuleBlock */ || node.parent.kind === 268 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -94178,6 +96699,9 @@ function createTypeChecker(host) { } function checkExportSpecifier(node) { checkAliasSymbol(node); + const hasModuleSpecifier = node.parent.parent.moduleSpecifier !== void 0; + checkModuleExportName(node.propertyName, hasModuleSpecifier); + checkModuleExportName(node.name); if (getEmitDeclarations(compilerOptions)) { collectLinkedAliases( node.propertyName || node.name, @@ -94185,8 +96709,11 @@ function createTypeChecker(host) { true ); } - if (!node.parent.parent.moduleSpecifier) { + if (!hasModuleSpecifier) { const exportedName = node.propertyName || node.name; + if (exportedName.kind === 11 /* StringLiteral */) { + return; + } const symbol = resolveName( exportedName, exportedName.escapedText, @@ -94202,7 +96729,7 @@ function createTypeChecker(host) { markLinkedReferences(node, 7 /* ExportSpecifier */); } } else { - if (getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && idText(node.propertyName || node.name) === "default") { + if (getESModuleInterop(compilerOptions) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */ && moduleExportNameIsDefault(node.propertyName || node.name)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -94212,8 +96739,11 @@ function createTypeChecker(host) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 307 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { + if (compilerOptions.erasableSyntaxOnly && node.isExportEquals && !(node.flags & 33554432 /* Ambient */)) { + error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled); + } + const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 268 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -94228,7 +96758,7 @@ function createTypeChecker(host) { if (typeAnnotationNode) { checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression); } - const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); + const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */; if (node.expression.kind === 80 /* Identifier */) { const id = node.expression; const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( @@ -94301,14 +96831,14 @@ function createTypeChecker(host) { checkExpressionCached(node.expression); } if (isIllegalExportDefaultInCJS) { - error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(node, getVerbatimModuleSyntaxErrorMessage(node)); } checkExternalModuleExports(container); if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) { grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context); } if (node.isExportEquals) { - if (moduleKind >= 5 /* ES2015 */ && moduleKind !== 200 /* Preserve */ && (node.flags & 33554432 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { + if (moduleKind >= 5 /* ES2015 */ && moduleKind !== 200 /* Preserve */ && (node.flags & 33554432 /* Ambient */ && host.getImpliedNodeFormatForEmit(getSourceFileOfNode(node)) === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && host.getImpliedNodeFormatForEmit(getSourceFileOfNode(node)) !== 1 /* CommonJS */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); @@ -94369,6 +96899,9 @@ function createTypeChecker(host) { } } function checkSourceElementWorker(node) { + if (getNodeCheckFlags(node) & 8388608 /* PartiallyTypeChecked */) { + return; + } if (canHaveJSDoc(node)) { forEach(node.jsDoc, ({ comment, tags }) => { checkJSDocCommentWorker(comment); @@ -94383,186 +96916,189 @@ function createTypeChecker(host) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: + case 268 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 244 /* FirstStatement */ && kind <= 260 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: return checkTypeParameter(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return checkParameter(node); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 171 /* PropertySignature */: + case 172 /* PropertySignature */: return checkPropertySignature(node); - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: + case 186 /* ConstructorType */: + case 185 /* FunctionType */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 182 /* IndexSignature */: return checkSignatureDeclaration(node); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: return checkMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return checkConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return checkAccessorDeclaration(node); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return checkTypeReferenceNode(node); - case 182 /* TypePredicate */: + case 183 /* TypePredicate */: return checkTypePredicate(node); - case 186 /* TypeQuery */: + case 187 /* TypeQuery */: return checkTypeQuery(node); - case 187 /* TypeLiteral */: + case 188 /* TypeLiteral */: return checkTypeLiteral(node); - case 188 /* ArrayType */: + case 189 /* ArrayType */: return checkArrayType(node); - case 189 /* TupleType */: + case 190 /* TupleType */: return checkTupleType(node); - case 192 /* UnionType */: - case 193 /* IntersectionType */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 191 /* RestType */: + case 197 /* ParenthesizedType */: + case 191 /* OptionalType */: + case 192 /* RestType */: return checkSourceElement(node.type); - case 197 /* ThisType */: + case 198 /* ThisType */: return checkThisType(node); - case 198 /* TypeOperator */: + case 199 /* TypeOperator */: return checkTypeOperator(node); - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return checkConditionalType(node); - case 195 /* InferType */: + case 196 /* InferType */: return checkInferType(node); - case 203 /* TemplateLiteralType */: + case 204 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 205 /* ImportType */: + case 206 /* ImportType */: return checkImportType(node); - case 202 /* NamedTupleMember */: + case 203 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 328 /* JSDocAugmentsTag */: + case 329 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 329 /* JSDocImplementsTag */: + case 330 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 340 /* JSDocEnumTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 341 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 344 /* JSDocTypeTag */: + case 345 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 324 /* JSDocLink */: - case 325 /* JSDocLinkCode */: - case 326 /* JSDocLinkPlain */: + case 325 /* JSDocLink */: + case 326 /* JSDocLinkCode */: + case 327 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 341 /* JSDocParameterTag */: + case 342 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 348 /* JSDocPropertyTag */: + case 349 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 317 /* JSDocFunctionType */: + case 318 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 315 /* JSDocNonNullableType */: - case 314 /* JSDocNullableType */: - case 312 /* JSDocAllType */: - case 313 /* JSDocUnknownType */: - case 322 /* JSDocTypeLiteral */: + // falls through + case 316 /* JSDocNonNullableType */: + case 315 /* JSDocNullableType */: + case 313 /* JSDocAllType */: + case 314 /* JSDocUnknownType */: + case 323 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 318 /* JSDocVariadicType */: + case 319 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 309 /* JSDocTypeExpression */: + case 310 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 333 /* JSDocPublicTag */: - case 335 /* JSDocProtectedTag */: - case 334 /* JSDocPrivateTag */: + case 334 /* JSDocPublicTag */: + case 336 /* JSDocProtectedTag */: + case 335 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 350 /* JSDocSatisfiesTag */: + case 351 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 343 /* JSDocThisTag */: + case 344 /* JSDocThisTag */: return checkJSDocThisTag(node); - case 351 /* JSDocImportTag */: + case 352 /* JSDocImportTag */: return checkJSDocImportTag(node); - case 199 /* IndexedAccessType */: + case 200 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 200 /* MappedType */: + case 201 /* MappedType */: return checkMappedType(node); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 241 /* Block */: - case 268 /* ModuleBlock */: + case 242 /* Block */: + case 269 /* ModuleBlock */: return checkBlock(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return checkVariableStatement(node); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return checkExpressionStatement(node); - case 245 /* IfStatement */: + case 246 /* IfStatement */: return checkIfStatement(node); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return checkDoStatement(node); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return checkWhileStatement(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return checkForStatement(node); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return checkForInStatement(node); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return checkForOfStatement(node); - case 251 /* ContinueStatement */: - case 252 /* BreakStatement */: + case 252 /* ContinueStatement */: + case 253 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return checkReturnStatement(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return checkWithStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return checkSwitchStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return checkLabeledStatement(node); - case 257 /* ThrowStatement */: + case 258 /* ThrowStatement */: return checkThrowStatement(node); - case 258 /* TryStatement */: + case 259 /* TryStatement */: return checkTryStatement(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return checkBindingElement(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return checkClassDeclaration(node); - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 267 /* ModuleDeclaration */: + case 307 /* EnumMember */: + return checkEnumMember(node); + case 268 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return checkImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return checkExportDeclaration(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return checkExportAssignment(node); - case 242 /* EmptyStatement */: - case 259 /* DebuggerStatement */: + case 243 /* EmptyStatement */: + case 260 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 282 /* MissingDeclaration */: + case 283 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -94666,44 +97202,44 @@ function createTypeChecker(host) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 170 /* Decorator */: - case 286 /* JsxOpeningElement */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 216 /* TaggedTemplateExpression */: + case 171 /* Decorator */: + case 287 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 284 /* JsxElement */: + case 285 /* JsxElement */: checkJsxElementDeferred(node); break; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - case 217 /* ParenthesizedExpression */: + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: + case 218 /* ParenthesizedExpression */: checkAssertionDeferred(node); break; - case 222 /* VoidExpression */: + case 223 /* VoidExpression */: checkExpression(node.expression); break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (isInstanceOfExpression(node)) { resolveUntypedCall(node); } @@ -94712,19 +97248,21 @@ function createTypeChecker(host) { currentNode = saveCurrentNode; (_b = tracing) == null ? void 0 : _b.pop(); } - function checkSourceFile(node) { + function checkSourceFile(node, nodesToCheck) { var _a, _b; (_a = tracing) == null ? void 0 : _a.push( tracing.Phase.Check, - "checkSourceFile", + nodesToCheck ? "checkSourceFileNodes" : "checkSourceFile", { path: node.path }, /*separateBeginAndEnd*/ true ); - mark("beforeCheck"); - checkSourceFileWorker(node); - mark("afterCheck"); - measure("Check", "beforeCheck", "afterCheck"); + const beforeMark = nodesToCheck ? "beforeCheckNodes" : "beforeCheck"; + const afterMark = nodesToCheck ? "afterCheckNodes" : "afterCheck"; + mark(beforeMark); + nodesToCheck ? checkSourceFileNodesWorker(node, nodesToCheck) : checkSourceFileWorker(node); + mark(afterMark); + measure("Check", beforeMark, afterMark); (_b = tracing) == null ? void 0 : _b.pop(); } function unusedIsError(kind, isAmbient) { @@ -94755,6 +97293,13 @@ function createTypeChecker(host) { clear(potentialWeakMapSetCollisions); clear(potentialReflectCollisions); clear(potentialUnusedRenamedBindingElementsInTypes); + if (links.flags & 8388608 /* PartiallyTypeChecked */) { + potentialThisCollisions = links.potentialThisCollisions; + potentialNewTargetCollisions = links.potentialNewTargetCollisions; + potentialWeakMapSetCollisions = links.potentialWeakMapSetCollisions; + potentialReflectCollisions = links.potentialReflectCollisions; + potentialUnusedRenamedBindingElementsInTypes = links.potentialUnusedRenamedBindingElementsInTypes; + } forEach(node.statements, checkSourceElement); checkSourceElement(node.endOfFileToken); checkDeferredNodes(node); @@ -94795,10 +97340,38 @@ function createTypeChecker(host) { links.flags |= 1 /* TypeChecked */; } } - function getDiagnostics2(sourceFile, ct) { + function checkSourceFileNodesWorker(file, nodes) { + const links = getNodeLinks(file); + if (!(links.flags & 1 /* TypeChecked */)) { + if (skipTypeChecking(file, compilerOptions, host)) { + return; + } + checkGrammarSourceFile(file); + clear(potentialThisCollisions); + clear(potentialNewTargetCollisions); + clear(potentialWeakMapSetCollisions); + clear(potentialReflectCollisions); + clear(potentialUnusedRenamedBindingElementsInTypes); + forEach(nodes, checkSourceElement); + checkDeferredNodes(file); + (links.potentialThisCollisions || (links.potentialThisCollisions = [])).push(...potentialThisCollisions); + (links.potentialNewTargetCollisions || (links.potentialNewTargetCollisions = [])).push(...potentialNewTargetCollisions); + (links.potentialWeakMapSetCollisions || (links.potentialWeakMapSetCollisions = [])).push(...potentialWeakMapSetCollisions); + (links.potentialReflectCollisions || (links.potentialReflectCollisions = [])).push(...potentialReflectCollisions); + (links.potentialUnusedRenamedBindingElementsInTypes || (links.potentialUnusedRenamedBindingElementsInTypes = [])).push( + ...potentialUnusedRenamedBindingElementsInTypes + ); + links.flags |= 8388608 /* PartiallyTypeChecked */; + for (const node of nodes) { + const nodeLinks2 = getNodeLinks(node); + nodeLinks2.flags |= 8388608 /* PartiallyTypeChecked */; + } + } + } + function getDiagnostics2(sourceFile, ct, nodesToCheck) { try { cancellationToken = ct; - return getDiagnosticsWorker(sourceFile); + return getDiagnosticsWorker(sourceFile, nodesToCheck); } finally { cancellationToken = void 0; } @@ -94809,20 +97382,23 @@ function createTypeChecker(host) { } deferredDiagnosticsCallbacks = []; } - function checkSourceFileWithEagerDiagnostics(sourceFile) { + function checkSourceFileWithEagerDiagnostics(sourceFile, nodesToCheck) { ensurePendingDiagnosticWorkComplete(); const oldAddLazyDiagnostics = addLazyDiagnostic; addLazyDiagnostic = (cb) => cb(); - checkSourceFile(sourceFile); + checkSourceFile(sourceFile, nodesToCheck); addLazyDiagnostic = oldAddLazyDiagnostics; } - function getDiagnosticsWorker(sourceFile) { + function getDiagnosticsWorker(sourceFile, nodesToCheck) { if (sourceFile) { ensurePendingDiagnosticWorkComplete(); const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics(); const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length; - checkSourceFileWithEagerDiagnostics(sourceFile); + checkSourceFileWithEagerDiagnostics(sourceFile, nodesToCheck); const semanticDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); + if (nodesToCheck) { + return semanticDiagnostics; + } const currentGlobalDiagnostics = diagnostics.getGlobalDiagnostics(); if (currentGlobalDiagnostics !== previousGlobalDiagnostics) { const deferredGlobalDiagnostics = relativeComplement(previousGlobalDiagnostics, currentGlobalDiagnostics, compareDiagnostics); @@ -94832,7 +97408,7 @@ function createTypeChecker(host) { } return semanticDiagnostics; } - forEach(host.getSourceFiles(), checkSourceFileWithEagerDiagnostics); + forEach(host.getSourceFiles(), (file) => checkSourceFileWithEagerDiagnostics(file)); return diagnostics.getDiagnostics(); } function getGlobalDiagnostics() { @@ -94854,26 +97430,30 @@ function createTypeChecker(host) { copySymbols(location.locals, meaning); } switch (location.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: if (!isExternalModule(location)) break; - case 267 /* ModuleDeclaration */: + // falls through + case 268 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: + // this fall-through is necessary because we would like to handle + // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration. + // falls through + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -94906,7 +97486,7 @@ function createTypeChecker(host) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { + if (!getDeclarationOfKind(symbol, 282 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 281 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { copySymbol(symbol, meaning2); } }); @@ -94917,16 +97497,16 @@ function createTypeChecker(host) { return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 166 /* QualifiedName */) { + while (node.parent.kind === 167 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 183 /* TypeReference */; + return node.parent.kind === 184 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 211 /* PropertyAccessExpression */) { + while (node.parent.kind === 212 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 233 /* ExpressionWithTypeArguments */; + return node.parent.kind === 234 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -94951,13 +97531,13 @@ function createTypeChecker(host) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 167 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 272 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 278 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -94975,6 +97555,7 @@ function createTypeChecker(host) { if (isPropertyAccessExpression(entityName.parent) && getLeftmostAccessExpression(entityName.parent) === entityName) { return void 0; } + // falls through case 4 /* ThisProperty */: case 2 /* ModuleExports */: return getSymbolOfDeclaration(entityName.parent.parent); @@ -94986,7 +97567,7 @@ function createTypeChecker(host) { node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 206 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -95018,7 +97599,7 @@ function createTypeChecker(host) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 212 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -95026,7 +97607,7 @@ function createTypeChecker(host) { } } } - if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 278 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -95038,7 +97619,7 @@ function createTypeChecker(host) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 272 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -95059,7 +97640,7 @@ function createTypeChecker(host) { } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 234 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -95078,10 +97659,10 @@ function createTypeChecker(host) { return entityNameSymbol; } } - if (name.parent.kind === 341 /* JSDocParameterTag */) { + if (name.parent.kind === 342 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 345 /* JSDocTemplateTag */) { + if (name.parent.kind === 169 /* TypeParameter */ && name.parent.parent.kind === 346 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -95134,12 +97715,12 @@ function createTypeChecker(host) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { + } else if (name.kind === 212 /* PropertyAccessExpression */ || name.kind === 167 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 211 /* PropertyAccessExpression */) { + if (name.kind === 212 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { links.resolvedSymbol = getApplicableIndexSymbol(checkExpressionCached(name.expression), getLiteralTypeFromPropertyName(name.name)); @@ -95154,23 +97735,25 @@ function createTypeChecker(host) { } else if (isJSDocMemberName(name)) { return resolveJSDocMemberName(name); } - } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + } else if (isEntityName(name) && isTypeReferenceIdentifier(name)) { + const meaning = name.parent.kind === 184 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, /*ignoreErrors*/ - false, + true, /*dontResolveAlias*/ true ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 182 /* TypePredicate */) { + if (name.parent.kind === 183 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ - 1 /* FunctionScopedVariable */ + 1 /* FunctionScopedVariable */, + /*ignoreErrors*/ + true ); } return void 0; @@ -95244,7 +97827,7 @@ function createTypeChecker(host) { if (node.kind === 80 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 209 /* BindingElement */ && grandParent.kind === 207 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -95263,11 +97846,12 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: - case 211 /* PropertyAccessExpression */: - case 166 /* QualifiedName */: + case 212 /* PropertyAccessExpression */: + case 167 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } + // falls through case 110 /* ThisKeyword */: const container = getThisContainer( node, @@ -95285,19 +97869,20 @@ function createTypeChecker(host) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 197 /* ThisType */: + // falls through + case 198 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 108 /* SuperKeyword */: return checkExpression(node).symbol; case 137 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 177 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || isInJSFile(node) && isJSDocImportTag(node.parent) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 273 /* ImportDeclaration */ || node.parent.kind === 279 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || isInJSFile(node) && isJSDocImportTag(node.parent) && node.parent.moduleSpecifier === node || (isInJSFile(node) && isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false @@ -95307,6 +97892,7 @@ function createTypeChecker(host) { if (isCallExpression(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { return getSymbolOfDeclaration(parent2); } + // falls through case 9 /* NumericLiteral */: const objectType = isElementAccessExpression(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); @@ -95315,11 +97901,15 @@ function createTypeChecker(host) { case 39 /* EqualsGreaterThanToken */: case 86 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 205 /* ImportType */: + case 206 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 95 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 102 /* ImportKeyword */: + if (isMetaProperty(node.parent) && node.parent.name.escapedText === "defer") { + return void 0; + } + // falls through case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; case 104 /* InstanceOfKeyword */: @@ -95329,13 +97919,14 @@ function createTypeChecker(host) { return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol; } return void 0; - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return checkExpression(node).symbol; - case 295 /* JsxNamespacedName */: + case 296 /* JsxNamespacedName */: if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) { const symbol = getIntrinsicTagSymbol(node.parent); return symbol === unknownSymbol ? void 0 : symbol; } + // falls through default: return void 0; } @@ -95350,16 +97941,35 @@ function createTypeChecker(host) { return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 304 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); + if (location && location.kind === 305 /* ShorthandPropertyAssignment */) { + return resolveEntityName( + location.name, + 111551 /* Value */ | 2097152 /* Alias */, + /*ignoreErrors*/ + true + ); } return void 0; } function getExportSpecifierLocalTargetSymbol(node) { if (isExportSpecifier(node)) { - return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node.propertyName || node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); + const name = node.propertyName || node.name; + return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : name.kind === 11 /* StringLiteral */ ? void 0 : ( + // Skip for invalid syntax like this: export { "x" } + resolveEntityName( + name, + 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, + /*ignoreErrors*/ + true + ) + ); } else { - return resolveEntityName(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); + return resolveEntityName( + node, + 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, + /*ignoreErrors*/ + true + ); } } function getTypeOfNode(node) { @@ -95436,16 +98046,16 @@ function createTypeChecker(host) { return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); - if (expr.parent.kind === 250 /* ForOfStatement */) { + Debug.assert(expr.kind === 211 /* ObjectLiteralExpression */ || expr.kind === 210 /* ArrayLiteralExpression */); + if (expr.parent.kind === 251 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 226 /* BinaryExpression */) { + if (expr.parent.kind === 227 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 303 /* PropertyAssignment */) { + if (expr.parent.kind === 304 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -95478,7 +98088,7 @@ function createTypeChecker(host) { case 9 /* NumericLiteral */: case 11 /* StringLiteral */: return getStringLiteralType(name.text); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -95553,7 +98163,7 @@ function createTypeChecker(host) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 307 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 308 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -95583,7 +98193,7 @@ function createTypeChecker(host) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 300 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -95608,7 +98218,7 @@ function createTypeChecker(host) { /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 242 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -95648,22 +98258,22 @@ function createTypeChecker(host) { function isValueAliasDeclaration(node) { Debug.assert(canCollectSymbolAliasAccessabilityData); switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: + case 274 /* ImportClause */: + case 275 /* NamespaceImport */: + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); return !!symbol && isAliasResolvedToValue( symbol, /*excludeTypeOnlyValues*/ true ); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue( getSymbolOfDeclaration(node), /*excludeTypeOnlyValues*/ @@ -95674,7 +98284,7 @@ function createTypeChecker(host) { } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 307 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 308 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); @@ -95703,7 +98313,7 @@ function createTypeChecker(host) { } function isReferencedAliasDeclaration(node, checkChildren) { Debug.assert(canCollectSymbolAliasAccessabilityData); - if (isAliasSymbolDeclaration2(node)) { + if (isAliasSymbolDeclaration(node)) { const symbol = getSymbolOfDeclaration(node); const links = symbol && getSymbolLinks(symbol); if (links == null ? void 0 : links.referenced) { @@ -95737,13 +98347,19 @@ function createTypeChecker(host) { const typeNode = getNonlocalEffectiveTypeAnnotationNode(parameter); if (!typeNode) return false; const type = getTypeFromTypeNode(typeNode); - return containsUndefinedType(type); + return isErrorType(type) || containsUndefinedType(type); } - function requiresAddingImplicitUndefined(parameter) { - return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter); + function requiresAddingImplicitUndefined(parameter, enclosingDeclaration) { + return (isRequiredInitializedParameter(parameter, enclosingDeclaration) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter); } - function isRequiredInitializedParameter(parameter) { - return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); + function isRequiredInitializedParameter(parameter, enclosingDeclaration) { + if (!strictNullChecks || isOptionalParameter(parameter) || isJSDocParameterTag(parameter) || !parameter.initializer) { + return false; + } + if (hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */)) { + return !!enclosingDeclaration && isFunctionLikeDeclaration(enclosingDeclaration); + } + return true; } function isOptionalUninitializedParameterProperty(parameter) { return strictNullChecks && isOptionalParameter(parameter) && (isJSDocParameterTag(parameter) || !parameter.initializer) && hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); @@ -95790,7 +98406,7 @@ function createTypeChecker(host) { return !!(getNodeCheckFlags(node) & flag); } function calculateNodeCheckFlagWorker(node, flag) { - if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnsotics(getSourceFileOfNode(node), compilerOptions)) { + if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnostics(getSourceFileOfNode(node), compilerOptions)) { return; } const links = getNodeLinks(node); @@ -95852,17 +98468,19 @@ function createTypeChecker(host) { function checkChildIdentifiers(node2) { forEachNodeRecursively(node2, checkIdentifiers); } + function isExpressionNodeOrShorthandPropertyAssignmentName(node2) { + return isExpressionNode(node2) || isShorthandPropertyAssignment(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2; + } function checkSingleIdentifier(node2) { const nodeLinks2 = getNodeLinks(node2); - nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */ | 16384 /* CapturedBlockScopedBinding */ | 32768 /* BlockScopedBindingInLoop */; - if (isIdentifier(node2) && isExpressionNode(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) { - const s = getSymbolAtLocation( - node2, - /*ignoreErrors*/ - true - ); - if (s && s !== unknownSymbol) { - checkIdentifierCalculateNodeCheckFlags(node2, s); + nodeLinks2.calculatedFlags |= 536870912 /* ConstructorReference */; + if (isIdentifier(node2)) { + nodeLinks2.calculatedFlags |= 32768 /* BlockScopedBindingInLoop */ | 16384 /* CapturedBlockScopedBinding */; + if (isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression(node2.parent) && node2.parent.name === node2)) { + const s = getResolvedSymbol(node2); + if (s && s !== unknownSymbol) { + checkIdentifierCalculateNodeCheckFlags(node2, s); + } } } } @@ -95896,15 +98514,15 @@ function createTypeChecker(host) { } function canHaveConstantValue(node) { switch (node.kind) { - case 306 /* EnumMember */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 307 /* EnumMember */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 306 /* EnumMember */) { + if (node.kind === 307 /* EnumMember */) { return getEnumMemberValue(node).value; } if (!getNodeLinks(node).resolvedSymbol) { @@ -96015,26 +98633,22 @@ function createTypeChecker(host) { return 11 /* ObjectType */; } } - function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker) { - const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); + function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, internalFlags, tracker) { + const declaration = getParseTreeNode(declarationIn, hasInferredType); if (!declaration) { return factory.createToken(133 /* AnyKeyword */); } const symbol = getSymbolOfDeclaration(declaration); - const type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; - return nodeBuilder.serializeTypeForDeclaration(declaration, type, symbol, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); - } - function isDeclarationWithPossibleInnerTypeNodeReuse(declaration) { - return isFunctionLike(declaration) || isExportAssignment(declaration) || isVariableLike(declaration); + return nodeBuilder.serializeTypeForDeclaration(declaration, symbol, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, internalFlags, tracker); } function getAllAccessorDeclarationsForDeclaration(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; + const otherKind = accessor.kind === 179 /* SetAccessor */ ? 178 /* GetAccessor */ : 179 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 179 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 178 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -96042,51 +98656,19 @@ function createTypeChecker(host) { getAccessor }; } - function getPossibleTypeNodeReuseExpression(declaration) { - return isFunctionLike(declaration) && !isSetAccessor(declaration) ? getSingleReturnExpression(declaration) : isExportAssignment(declaration) ? declaration.expression : !!declaration.initializer ? declaration.initializer : isParameter(declaration) && isSetAccessor(declaration.parent) ? getSingleReturnExpression(getAllAccessorDeclarationsForDeclaration(declaration.parent).getAccessor) : void 0; - } - function getSingleReturnExpression(declaration) { - let candidateExpr; - if (declaration && !nodeIsMissing(declaration.body)) { - if (getFunctionFlags(declaration) & 3 /* AsyncGenerator */) return void 0; - const body = declaration.body; - if (body && isBlock(body)) { - forEachReturnStatement(body, (s) => { - if (!candidateExpr) { - candidateExpr = s.expression; - } else { - candidateExpr = void 0; - return true; - } - }); - } else { - candidateExpr = body; - } - } - return candidateExpr; - } - function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) { + function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, internalFlags, tracker) { const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); if (!signatureDeclaration) { return factory.createToken(133 /* AnyKeyword */); } - return nodeBuilder.serializeReturnTypeForSignature(getSignatureFromDeclaration(signatureDeclaration), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); + return nodeBuilder.serializeReturnTypeForSignature(signatureDeclaration, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, internalFlags, tracker); } - function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) { + function createTypeOfExpression(exprIn, enclosingDeclaration, flags, internalFlags, tracker) { const expr = getParseTreeNode(exprIn, isExpression); if (!expr) { return factory.createToken(133 /* AnyKeyword */); } - const type = getWidenedType(getRegularTypeOfExpression(expr)); - return nodeBuilder.expressionOrTypeToTypeNode( - expr, - type, - /*addUndefined*/ - void 0, - enclosingDeclaration, - flags | 1024 /* MultilineObjectLiterals */, - tracker - ); + return nodeBuilder.serializeTypeForExpression(expr, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, internalFlags, tracker); } function hasGlobalName(name) { return globals.has(escapeLeadingUnderscores(name)); @@ -96150,24 +98732,24 @@ function createTypeChecker(host) { if (symbol) { return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => { switch (declaration.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 306 /* EnumMember */: - case 210 /* ObjectLiteralExpression */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 266 /* EnumDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 267 /* ModuleDeclaration */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 173 /* PropertyDeclaration */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 307 /* EnumMember */: + case 211 /* ObjectLiteralExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 267 /* EnumDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 268 /* ModuleDeclaration */: return true; } return false; @@ -96190,6 +98772,8 @@ function createTypeChecker(host) { enclosing, /*flags*/ void 0, + /*internalFlags*/ + void 0, tracker ) : type === trueType ? factory.createTrue() : type === falseType && factory.createFalse(); if (enumResult) return enumResult; @@ -96227,7 +98811,7 @@ function createTypeChecker(host) { if (direct) { return direct; } - if (node.kind === 169 /* Parameter */ && node.parent.kind === 178 /* SetAccessor */) { + if (node.kind === 170 /* Parameter */ && node.parent.kind === 179 /* SetAccessor */) { const other = getAllAccessorDeclarationsForDeclaration(node.parent).getAccessor; if (other) { return getEffectiveReturnTypeNode(other); @@ -96235,22 +98819,6 @@ function createTypeChecker(host) { } return void 0; } - function getNonlocalEffectiveReturnTypeAnnotationNode(node) { - const direct = getEffectiveReturnTypeNode(node); - if (direct) { - return direct; - } - if (node.kind === 177 /* GetAccessor */) { - const other = getAllAccessorDeclarationsForDeclaration(node).setAccessor; - if (other) { - const param = getSetAccessorValueParameter(other); - if (param) { - return getEffectiveTypeAnnotationNode(param); - } - } - } - return void 0; - } function createResolver() { return { getReferencedExportContainer, @@ -96318,17 +98886,89 @@ function createTypeChecker(host) { const parseDecl = getParseTreeNode(decl); return !!parseNode && !!parseDecl && (isVariableDeclaration(parseDecl) || isBindingElement(parseDecl)) && isBindingCapturedByNode(parseNode, parseDecl); }, - getDeclarationStatementsForSourceFile: (node, flags, tracker) => { + getDeclarationStatementsForSourceFile: (node, flags, internalFlags, tracker) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 307 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 308 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { - return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker); + return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, internalFlags, tracker); } resolveExternalModuleSymbol(sym); - return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker); + return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, internalFlags, tracker); + }, + isImportRequiredByAugmentation, + isDefinitelyReferenceToGlobalSymbolObject, + createLateBoundIndexSignatures: (cls, enclosing, flags, internalFlags, tracker) => { + const sym = cls.symbol; + const staticInfos = getIndexInfosOfType(getTypeOfSymbol(sym)); + const instanceIndexSymbol = getIndexSymbol(sym); + const instanceInfos = instanceIndexSymbol && getIndexInfosOfIndexSymbol(instanceIndexSymbol, arrayFrom(getMembersOfSymbol(sym).values())); + let result; + for (const infoList of [staticInfos, instanceInfos]) { + if (!length(infoList)) continue; + result || (result = []); + for (const info of infoList) { + if (info.declaration) continue; + if (info === anyBaseTypeIndexInfo) continue; + if (info.components) { + const allComponentComputedNamesSerializable = every(info.components, (e) => { + var _a; + return !!(e.name && isComputedPropertyName(e.name) && isEntityNameExpression(e.name.expression) && enclosing && ((_a = isEntityNameVisible( + e.name.expression, + enclosing, + /*shouldComputeAliasToMakeVisible*/ + false + )) == null ? void 0 : _a.accessibility) === 0 /* Accessible */); + }); + if (allComponentComputedNamesSerializable) { + const newComponents = filter(info.components, (e) => { + return !hasLateBindableName(e); + }); + result.push(...map(newComponents, (e) => { + trackComputedName(e.name.expression); + const mods = infoList === staticInfos ? [factory.createModifier(126 /* StaticKeyword */)] : void 0; + return factory.createPropertyDeclaration( + append(mods, info.isReadonly ? factory.createModifier(148 /* ReadonlyKeyword */) : void 0), + e.name, + (isPropertySignature(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken(58 /* QuestionToken */) : void 0, + nodeBuilder.typeToTypeNode(getTypeOfSymbol(e.symbol), enclosing, flags, internalFlags, tracker), + /*initializer*/ + void 0 + ); + })); + continue; + } + } + const node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker); + if (node && infoList === staticInfos) { + (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(126 /* StaticKeyword */)); + } + if (node) { + result.push(node); + } + } + } + return result; + function trackComputedName(accessExpression) { + if (!tracker.trackSymbol) return; + const firstIdentifier = getFirstIdentifier(accessExpression); + const name = resolveName( + firstIdentifier, + firstIdentifier.escapedText, + 111551 /* Value */ | 1048576 /* ExportValue */, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + true + ); + if (name) { + tracker.trackSymbol(name, enclosing, 111551 /* Value */); + } + } }, - isImportRequiredByAugmentation + symbolToDeclarations: (symbol, meaning, flags, maximumLength, verbosityLevel, out) => { + return nodeBuilder.symbolToDeclarations(symbol, meaning, flags, maximumLength, verbosityLevel, out); + } }; function isImportRequiredByAugmentation(node) { const file = getSourceFileOfNode(node); @@ -96354,7 +98994,7 @@ function createTypeChecker(host) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 268 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -96364,7 +99004,7 @@ function createTypeChecker(host) { if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 307 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 308 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -96631,6 +99271,8 @@ function createTypeChecker(host) { return ["__propKey"]; case 16777216 /* AddDisposableResourceAndDisposeResources */: return ["__addDisposableResource", "__disposeResources"]; + case 33554432 /* RewriteRelativeImportExtension */: + return ["__rewriteRelativeImportExtension"]; default: return Debug.fail("Unrecognized helper"); } @@ -96659,12 +99301,12 @@ function createTypeChecker(host) { for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 175 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 178 /* GetAccessor */ || node.kind === 179 /* SetAccessor */)) { const accessors = getAllAccessorDeclarationsForDeclaration(node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -96694,25 +99336,25 @@ function createTypeChecker(host) { firstDecorator ?? (firstDecorator = modifier); } else { if (modifier.kind !== 148 /* ReadonlyKeyword */) { - if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { + if (node.kind === 172 /* PropertySignature */ || node.kind === 174 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 182 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) { - if (node.kind === 168 /* TypeParameter */) { + if (node.kind === 169 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 87 /* ConstKeyword */: { - if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) { + if (node.kind !== 267 /* EnumDeclaration */ && node.kind !== 169 /* TypeParameter */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */)); } const parent2 = isJSDocTemplateTag(node.parent) && getEffectiveJSDocHost(node.parent) || node.parent; - if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 169 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; @@ -96748,7 +99390,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) { + } else if (node.parent.kind === 269 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 64 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { @@ -96770,9 +99412,9 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) { + } else if (node.parent.kind === 269 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 169 /* Parameter */) { + } else if (node.kind === 170 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -96789,7 +99431,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 172 /* PropertyDeclaration */) { + } else if (node.kind !== 173 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 512 /* Accessor */; @@ -96797,7 +99439,7 @@ function createTypeChecker(host) { case 148 /* ReadonlyKeyword */: if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { + } else if (node.kind !== 173 /* PropertyDeclaration */ && node.kind !== 172 /* PropertySignature */ && node.kind !== 182 /* IndexSignature */ && node.kind !== 170 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); @@ -96805,8 +99447,8 @@ function createTypeChecker(host) { flags |= 8 /* Readonly */; break; case 95 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 307 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 266 /* TypeAliasDeclaration */ && node.kind !== 265 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 268 /* ModuleDeclaration */ && node.parent.kind === 308 /* SourceFile */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 32 /* Export */) { @@ -96819,7 +99461,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 169 /* Parameter */) { + } else if (node.kind === 170 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } else if (blockScopeKind === 4 /* Using */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); @@ -96829,8 +99471,8 @@ function createTypeChecker(host) { flags |= 32 /* Export */; break; case 90 /* DefaultKeyword */: - const container = node.parent.kind === 307 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 308 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 268 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } else if (blockScopeKind === 4 /* Using */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); @@ -96852,13 +99494,13 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 169 /* Parameter */) { + } else if (node.kind === 170 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } else if (blockScopeKind === 4 /* Using */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); - } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) { + } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 269 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -96872,12 +99514,12 @@ function createTypeChecker(host) { if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { - if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { + if (node.kind !== 264 /* ClassDeclaration */ && node.kind !== 186 /* ConstructorType */) { + if (node.kind !== 175 /* MethodDeclaration */ && node.kind !== 173 /* PropertyDeclaration */ && node.kind !== 178 /* GetAccessor */ && node.kind !== 179 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) { - const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; + if (!(node.parent.kind === 264 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) { + const message = node.kind === 173 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } if (flags & 256 /* Static */) { @@ -96906,7 +99548,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); } else if (flags & 128 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 169 /* Parameter */) { + } else if (node.kind === 170 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 64 /* Abstract */) { @@ -96920,7 +99562,7 @@ function createTypeChecker(host) { const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; const parent2 = isJSDocTemplateTag(node.parent) && (getEffectiveJSDocHost(node.parent) || find((_a = getJSDocRoot(node.parent)) == null ? void 0 : _a.tags, isJSDocTypedefTag)) || node.parent; - if (node.kind !== 168 /* TypeParameter */ || parent2 && !(isInterfaceDeclaration(parent2) || isClassLike(parent2) || isTypeAliasDeclaration(parent2) || isJSDocTypedefTag(parent2))) { + if (node.kind !== 169 /* TypeParameter */ || parent2 && !(isInterfaceDeclaration(parent2) || isClassLike(parent2) || isTypeAliasDeclaration(parent2) || isJSDocTypedefTag(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -96935,7 +99577,7 @@ function createTypeChecker(host) { } } } - if (node.kind === 176 /* Constructor */) { + if (node.kind === 177 /* Constructor */) { if (flags & 256 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -96946,11 +99588,11 @@ function createTypeChecker(host) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) { + } else if ((node.kind === 273 /* ImportDeclaration */ || node.kind === 272 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 170 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 170 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 1024 /* Async */) { @@ -96969,47 +99611,47 @@ function createTypeChecker(host) { } function findFirstIllegalModifier(node) { switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 267 /* ModuleDeclaration */: - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 169 /* Parameter */: - case 168 /* TypeParameter */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 177 /* Constructor */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 182 /* IndexSignature */: + case 268 /* ModuleDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 279 /* ExportDeclaration */: + case 278 /* ExportAssignment */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 170 /* Parameter */: + case 169 /* TypeParameter */: return void 0; - case 175 /* ClassStaticBlockDeclaration */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 270 /* NamespaceExportDeclaration */: - case 282 /* MissingDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 271 /* NamespaceExportDeclaration */: + case 283 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) { + if (node.parent.kind === 269 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { return void 0; } switch (node.kind) { - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return findFirstModifierExcept(node, 134 /* AsyncKeyword */); - case 263 /* ClassDeclaration */: - case 185 /* ConstructorType */: + case 264 /* ClassDeclaration */: + case 186 /* ConstructorType */: return findFirstModifierExcept(node, 128 /* AbstractKeyword */); - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return findFirstModifierExcept(node, 87 /* ConstKeyword */); default: Debug.assertNever(node); @@ -97025,10 +99667,10 @@ function createTypeChecker(host) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -97241,11 +99883,11 @@ function createTypeChecker(host) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 167 /* ComputedPropertyName */) { + if (node.kind !== 168 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { + if (computedPropertyName.expression.kind === 227 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -97253,7 +99895,7 @@ function createTypeChecker(host) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ + node.kind === 263 /* FunctionDeclaration */ || node.kind === 219 /* FunctionExpression */ || node.kind === 175 /* MethodDeclaration */ ); if (node.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); @@ -97272,7 +99914,7 @@ function createTypeChecker(host) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 305 /* SpreadAssignment */) { + if (prop.kind === 306 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -97282,10 +99924,10 @@ function createTypeChecker(host) { continue; } const name = prop.name; - if (name.kind === 167 /* ComputedPropertyName */) { + if (name.kind === 168 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 305 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 81 /* PrivateIdentifier */) { @@ -97293,7 +99935,7 @@ function createTypeChecker(host) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 175 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -97306,22 +99948,29 @@ function createTypeChecker(host) { } let currentKind; switch (prop.kind) { - case 304 /* ShorthandPropertyAssignment */: - case 303 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 304 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 9 /* NumericLiteral */) { checkGrammarNumericLiteral(name); } + if (name.kind === 10 /* BigIntLiteral */) { + addErrorOrSuggestion( + /*isError*/ + true, + createDiagnosticForNode(name, Diagnostics.A_bigint_literal_cannot_be_used_as_a_property_name) + ); + } currentKind = 4 /* PropertyAssignment */; break; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -97358,7 +100007,7 @@ function createTypeChecker(host) { checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 293 /* JsxSpreadAttribute */) { + if (attr.kind === 294 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -97368,7 +100017,7 @@ function createTypeChecker(host) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 295 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -97390,7 +100039,7 @@ function createTypeChecker(host) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (forInOrOfStatement.kind === 251 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { @@ -97400,6 +100049,8 @@ function createTypeChecker(host) { } switch (moduleKind) { case 100 /* Node16 */: + case 101 /* Node18 */: + case 102 /* Node20 */: case 199 /* NodeNext */: if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) { diagnostics.add( @@ -97407,15 +100058,18 @@ function createTypeChecker(host) { ); break; } + // fallthrough case 7 /* ES2022 */: case 99 /* ESNext */: + case 200 /* Preserve */: case 4 /* System */: if (languageVersion >= 4 /* ES2017 */) { break; } + // fallthrough default: diagnostics.add( - createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher) + createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher) ); break; } @@ -97424,7 +100078,7 @@ function createTypeChecker(host) { if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 176 /* Constructor */) { + if (func && func.kind !== 177 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -97439,7 +100093,7 @@ function createTypeChecker(host) { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 262 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -97447,16 +100101,16 @@ function createTypeChecker(host) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 250 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 250 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 250 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -97464,7 +100118,7 @@ function createTypeChecker(host) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) { + if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 188 /* TypeLiteral */ && accessor.parent.kind !== 265 /* InterfaceDeclaration */) { if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) { return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } @@ -97476,7 +100130,7 @@ function createTypeChecker(host) { if (hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 188 /* TypeLiteral */ || accessor.parent.kind === 265 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -97486,10 +100140,10 @@ function createTypeChecker(host) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 178 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 178 /* SetAccessor */) { + if (accessor.kind === 179 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -97507,10 +100161,10 @@ function createTypeChecker(host) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 178 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 178 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -97527,7 +100181,7 @@ function createTypeChecker(host) { } } switch (parent2.kind) { - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 80 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -97539,12 +100193,12 @@ function createTypeChecker(host) { return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 171 /* PropertySignature */: + case 172 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 8 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -97553,13 +100207,13 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 148 /* ReadonlyKeyword */) { - if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { + if (node.type.kind !== 189 /* ArrayType */ && node.type.kind !== 190 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */)); } } } function checkGrammarForInvalidDynamicName(node, message) { - if (isNonBindableDynamicName(node)) { + if (isNonBindableDynamicName(node) && !isEntityNameExpression(isElementAccessExpression(node) ? skipParentheses(node.argumentExpression) : node.expression)) { return grammarErrorOnNode(node, message); } } @@ -97567,8 +100221,8 @@ function createTypeChecker(host) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 174 /* MethodDeclaration */) { - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + if (node.kind === 175 /* MethodDeclaration */) { + if (node.parent.kind === 211 /* ObjectLiteralExpression */) { if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { @@ -97589,12 +100243,12 @@ function createTypeChecker(host) { } if (node.flags & 33554432 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 175 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 265 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 187 /* TypeLiteral */) { + } else if (node.parent.kind === 188 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -97605,9 +100259,9 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 252 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatements*/ true @@ -97618,8 +100272,8 @@ function createTypeChecker(host) { return false; } break; - case 255 /* SwitchStatement */: - if (node.kind === 252 /* BreakStatement */ && !node.label) { + case 256 /* SwitchStatement */: + if (node.kind === 253 /* BreakStatement */ && !node.label) { return false; } break; @@ -97636,10 +100290,10 @@ function createTypeChecker(host) { current = current.parent; } if (node.label) { - const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 253 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 253 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -97659,10 +100313,10 @@ function createTypeChecker(host) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; + return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 225 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -97694,7 +100348,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); } } - if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) { + if (node.parent.parent.kind !== 250 /* ForInStatement */ && node.parent.parent.kind !== 251 /* ForOfStatement */) { if (nodeFlags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { @@ -97711,11 +100365,11 @@ function createTypeChecker(host) { } } } - if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 244 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) { + if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) { checkESModuleMarker(node.name); } return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); @@ -97759,38 +100413,46 @@ function createTypeChecker(host) { return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); } const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */; - if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) { - return grammarErrorOnNode( - declarationList, - blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration - ); - } - if (blockScopeFlags === 6 /* AwaitUsing */) { - return checkAwaitGrammar(declarationList); + if (blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) { + if (isForInStatement(declarationList.parent)) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ); + } + if (declarationList.flags & 33554432 /* Ambient */) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === 4 /* Using */ ? Diagnostics.using_declarations_are_not_allowed_in_ambient_contexts : Diagnostics.await_using_declarations_are_not_allowed_in_ambient_contexts + ); + } + if (blockScopeFlags === 6 /* AwaitUsing */) { + return checkAwaitGrammar(declarationList); + } } return false; } - function allowLetAndConstDeclarations(parent2) { + function allowBlockDeclarations(parent2) { switch (parent2.kind) { - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 246 /* IfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 255 /* WithStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: return false; - case 256 /* LabeledStatement */: - return allowLetAndConstDeclarations(parent2.parent); + case 257 /* LabeledStatement */: + return allowBlockDeclarations(parent2.parent); } return true; } function checkGrammarForDisallowedBlockScopedVariableStatement(node) { - if (!allowLetAndConstDeclarations(node.parent)) { + if (!allowBlockDeclarations(node.parent)) { const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */; if (blockScopeKind) { const keyword = blockScopeKind === 1 /* Let */ ? "let" : blockScopeKind === 2 /* Const */ ? "const" : blockScopeKind === 4 /* Using */ ? "using" : blockScopeKind === 6 /* AwaitUsing */ ? "await using" : Debug.fail("Unknown BlockScope flag"); - return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); + error2(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -97804,7 +100466,17 @@ function createTypeChecker(host) { break; case 102 /* ImportKeyword */: if (escapedText !== "meta") { - return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), "meta"); + const isCallee = isCallExpression(node.parent) && node.parent.expression === node; + if (escapedText === "defer") { + if (!isCallee) { + return grammarErrorAtPos(node, node.end, 0, Diagnostics._0_expected, "("); + } + } else { + if (isCallee) { + return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer, unescapeLeadingUnderscores(node.name.escapedText)); + } + return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), "meta"); + } } break; } @@ -97840,7 +100512,7 @@ function createTypeChecker(host) { function grammarErrorOnNode(node, message, ...args) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(createDiagnosticForNode(node, message, ...args)); + error2(node, message, ...args); return true; } return false; @@ -97873,13 +100545,13 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node)) { + if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) { return grammarErrorOnNode(node.name, Diagnostics.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher); } if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 265 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -97905,14 +100577,14 @@ function createTypeChecker(host) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) { + if (node.kind === 265 /* InterfaceDeclaration */ || node.kind === 266 /* TypeAliasDeclaration */ || node.kind === 273 /* ImportDeclaration */ || node.kind === 272 /* ImportEqualsDeclaration */ || node.kind === 279 /* ExportDeclaration */ || node.kind === 278 /* ExportAssignment */ || node.kind === 271 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 244 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -97929,7 +100601,7 @@ function createTypeChecker(host) { if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 307 /* SourceFile */) { + if (node.parent.kind === 242 /* Block */ || node.parent.kind === 269 /* ModuleBlock */ || node.parent.kind === 308 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -97958,7 +100630,7 @@ function createTypeChecker(host) { function checkGrammarBigIntLiteral(node) { const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression(node.parent) && isLiteralTypeNode(node.parent.parent); if (!literalType) { - if (languageVersion < 7 /* ES2020 */) { + if (!(node.flags & 33554432 /* Ambient */) && languageVersion < 7 /* ES2020 */) { if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) { return true; } @@ -97994,12 +100666,24 @@ function createTypeChecker(host) { return ambientModulesCache; } function checkGrammarImportClause(node) { - var _a; - if (node.isTypeOnly && node.name && node.namedBindings) { - return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); - } - if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) { - return checkGrammarNamedImportsOrExports(node.namedBindings); + var _a, _b; + if (node.phaseModifier === 156 /* TypeKeyword */) { + if (node.name && node.namedBindings) { + return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); + } + if (((_a = node.namedBindings) == null ? void 0 : _a.kind) === 276 /* NamedImports */) { + return checkGrammarNamedImportsOrExports(node.namedBindings); + } + } else if (node.phaseModifier === 166 /* DeferKeyword */) { + if (node.name) { + return grammarErrorOnNode(node, Diagnostics.Default_imports_are_not_allowed_in_a_deferred_import); + } + if (((_b = node.namedBindings) == null ? void 0 : _b.kind) === 276 /* NamedImports */) { + return grammarErrorOnNode(node, Diagnostics.Named_imports_are_not_allowed_in_a_deferred_import); + } + if (moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) { + return grammarErrorOnNode(node, Diagnostics.Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve); + } } return false; } @@ -98008,27 +100692,31 @@ function createTypeChecker(host) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 277 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); } function checkGrammarImportCallExpression(node) { if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) { - return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + return grammarErrorOnNode(node, getVerbatimModuleSyntaxErrorMessage(node)); } - if (moduleKind === 5 /* ES2015 */) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext); + if (node.expression.kind === 237 /* MetaProperty */) { + if (moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) { + return grammarErrorOnNode(node, Diagnostics.Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve); + } + } else if (moduleKind === 5 /* ES2015 */) { + return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext); } if (node.typeArguments) { return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); } const nodeArguments = node.arguments; - if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) { + if (!(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) { checkGrammarForDisallowedTrailingComma(nodeArguments); if (nodeArguments.length > 1) { const importAttributesArgument = nodeArguments[1]; - return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); + return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve); } } if (nodeArguments.length === 0 || nodeArguments.length > 2) { @@ -98064,8 +100752,8 @@ function createTypeChecker(host) { } function findBestTypeForInvokable(source, unionTarget) { let signatureKind = 0 /* Call */; - const hasSignatures = getSignaturesOfType(source, signatureKind).length > 0 || (signatureKind = 1 /* Construct */, getSignaturesOfType(source, signatureKind).length > 0); - if (hasSignatures) { + const hasSignatures2 = getSignaturesOfType(source, signatureKind).length > 0 || (signatureKind = 1 /* Construct */, getSignaturesOfType(source, signatureKind).length > 0); + if (hasSignatures2) { return find(unionTarget.types, (t) => getSignaturesOfType(t, signatureKind).length > 0); } } @@ -98161,13 +100849,13 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 263 /* FunctionDeclaration */ && declaration.kind !== 175 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - return isIdentifier(name); + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: + return isIdentifier(name) || name.kind === 11 /* StringLiteral */; default: return isDeclarationName(name); } @@ -98185,6 +100873,10 @@ var JsxNames; JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes"; JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes"; })(JsxNames || (JsxNames = {})); +var ReactNames; +((ReactNames2) => { + ReactNames2.Fragment = "Fragment"; +})(ReactNames || (ReactNames = {})); function getIterationTypesKeyFromIterationTypeKind(typeKind) { switch (typeKind) { case 0 /* Yield */: @@ -98210,13 +100902,16 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) { var _a; return (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host); }, - useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), redirectTargetsMap: host.redirectTargetsMap, - getProjectReferenceRedirect: (fileName) => host.getProjectReferenceRedirect(fileName), + getRedirectFromSourceFile: (fileName) => host.getRedirectFromSourceFile(fileName), isSourceOfProjectReferenceRedirect: (fileName) => host.isSourceOfProjectReferenceRedirect(fileName), fileExists: (fileName) => host.fileExists(fileName), getFileIncludeReasons: () => host.getFileIncludeReasons(), - readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0 + readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0, + getDefaultResolutionModeForFile: (file) => host.getDefaultResolutionModeForFile(file), + getModeForResolutionAtIndex: (file, index) => host.getModeForResolutionAtIndex(file, index), + getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation) }; } var SymbolTrackerImpl = class _SymbolTrackerImpl { @@ -98305,10 +101000,19 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl { } reportInferenceFallback(node) { var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportInferenceFallback) { + if (((_a = this.inner) == null ? void 0 : _a.reportInferenceFallback) && !this.context.suppressReportInferenceFallback) { + this.onDiagnosticReported(); this.inner.reportInferenceFallback(node); } } + pushErrorFallbackNode(node) { + var _a, _b; + return (_b = (_a = this.inner) == null ? void 0 : _a.pushErrorFallbackNode) == null ? void 0 : _b.call(_a, node); + } + popErrorFallbackNode() { + var _a, _b; + return (_b = (_a = this.inner) == null ? void 0 : _a.popErrorFallbackNode) == null ? void 0 : _b.call(_a); + } }; // src/compiler/visitorPublic.ts @@ -98567,21 +101271,21 @@ function visitEachChild(node, visitor, context = nullTransformationContext, node return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); } var visitEachChildTable = { - [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [169 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -98590,7 +101294,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [170 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98601,14 +101305,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [171 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -98617,7 +101321,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [173 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98628,7 +101332,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -98639,7 +101343,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [175 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98652,7 +101356,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98660,7 +101364,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98670,7 +101374,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98679,7 +101383,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -98687,7 +101391,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -98695,7 +101399,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -98703,7 +101407,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -98712,7 +101416,7 @@ var visitEachChildTable = { ); }, // Types - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -98720,14 +101424,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -98735,7 +101439,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -98744,56 +101448,56 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [187 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [188 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [189 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [190 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [191 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [192 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [193 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [194 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [195 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -98802,13 +101506,13 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [206 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -98818,14 +101522,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [203 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -98834,26 +101538,26 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [197 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [200 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [201 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -98864,20 +101568,20 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [202 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [204 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -98885,19 +101589,19 @@ var visitEachChildTable = { ); }, // Binding patterns - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [208 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [209 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -98907,19 +101611,19 @@ var visitEachChildTable = { ); }, // Expression - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [210 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [211 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [212 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -98931,7 +101635,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -98943,7 +101647,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [214 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -98957,7 +101661,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -98965,7 +101669,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -98973,20 +101677,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [218 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [219 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -98998,7 +101702,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [220 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -99009,43 +101713,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [226 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -99053,7 +101757,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [228 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -99063,27 +101767,27 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [229 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [230 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [232 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99093,28 +101797,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [235 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -99123,14 +101827,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [237 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [240 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -99138,26 +101842,26 @@ var visitEachChildTable = { ); }, // Element - [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [242 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -99165,21 +101869,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -99188,7 +101892,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [250 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -99196,7 +101900,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [251 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -99205,52 +101909,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [259 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -99258,7 +101962,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [261 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -99267,13 +101971,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [262 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [263 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -99285,7 +101989,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99295,7 +101999,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99305,7 +102009,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99314,7 +102018,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99322,7 +102026,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [268 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99330,25 +102034,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [269 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [270 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99357,7 +102061,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99366,62 +102070,62 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, - [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [301 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateImportAttributes( node, nodesVisitor(node.elements, visitor, isImportAttribute), node.multiLine ); }, - [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, - node.isTypeOnly, + node.phaseModifier, nodeVisitor(node.name, visitor, isIdentifier), nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [275 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [276 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, - nodeVisitor(node.propertyName, visitor, isIdentifier), + nodeVisitor(node.propertyName, visitor, isModuleExportName), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [279 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -99431,29 +102135,29 @@ var visitEachChildTable = { nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, - [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [280 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [282 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, - nodeVisitor(node.propertyName, visitor, isIdentifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) + nodeVisitor(node.propertyName, visitor, isModuleExportName), + Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleExportName)) ); }, // Module references - [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -99461,7 +102165,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -99469,7 +102173,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -99477,20 +102181,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [288 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [289 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -99498,52 +102202,52 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [292 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [293 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [295 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [297 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [299 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [300 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -99551,28 +102255,28 @@ var visitEachChildTable = { ); }, // Property assignments - [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [305 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [307 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -99580,20 +102284,20 @@ var visitEachChildTable = { ); }, // Top-level nodes - [307 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [354 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [356 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [355 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [357 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -100158,12 +102862,12 @@ function containsDefaultReference(node) { return some(node.elements, isNamedDefaultReference); } function isNamedDefaultReference(e) { - return e.propertyName !== void 0 ? e.propertyName.escapedText === "default" /* Default */ : e.name.escapedText === "default" /* Default */; + return moduleExportNameIsDefault(e.propertyName || e.name); } function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 307 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile)); @@ -100208,7 +102912,7 @@ function collectExternalModuleInfo(context, sourceFile) { let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -100217,12 +102921,12 @@ function collectExternalModuleInfo(context, sourceFile) { hasImportDefault = true; } break; - case 271 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 283 /* ExternalModuleReference */) { + case 272 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 284 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -100234,9 +102938,10 @@ function collectExternalModuleInfo(context, sourceFile) { hasImportDefault || (hasImportDefault = containsDefaultReference(node.exportClause)); } else { const name = node.exportClause.name; - if (!uniqueExports.get(idText(name))) { + const nameText = moduleExportNameTextUnescaped(name); + if (!uniqueExports.get(nameText)) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name); - uniqueExports.set(idText(name), true); + uniqueExports.set(nameText, true); exportedNames = append(exportedNames, name); } hasImportStar = true; @@ -100246,19 +102951,19 @@ function collectExternalModuleInfo(context, sourceFile) { addExportedNamesForExportDeclaration(node); } break; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: if (hasSyntacticModifier(node, 32 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 32 /* Export */)) { addExportedFunctionDeclaration( node, @@ -100268,7 +102973,7 @@ function collectExternalModuleInfo(context, sourceFile) { ); } break; - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: if (hasSyntacticModifier(node, 32 /* Export */)) { if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { @@ -100294,26 +102999,29 @@ function collectExternalModuleInfo(context, sourceFile) { return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames, exportedFunctions, externalHelpersImportDeclaration }; function addExportedNamesForExportDeclaration(node) { for (const specifier of cast(node.exportClause, isNamedExports).elements) { - if (!uniqueExports.get(idText(specifier.name))) { + const specifierNameText = moduleExportNameTextUnescaped(specifier.name); + if (!uniqueExports.get(specifierNameText)) { const name = specifier.propertyName || specifier.name; - if (!node.moduleSpecifier) { - exportSpecifiers.add(name, specifier); - } - const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); - if (decl) { - if (decl.kind === 262 /* FunctionDeclaration */) { - addExportedFunctionDeclaration(decl, specifier.name, specifier.name.escapedText === "default" /* Default */); - continue; + if (name.kind !== 11 /* StringLiteral */) { + if (!node.moduleSpecifier) { + exportSpecifiers.add(name, specifier); + } + const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); + if (decl) { + if (decl.kind === 263 /* FunctionDeclaration */) { + addExportedFunctionDeclaration(decl, specifier.name, moduleExportNameIsDefault(specifier.name)); + continue; + } + multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(decl), specifier.name); } - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(decl), specifier.name); } - uniqueExports.set(idText(specifier.name), true); + uniqueExports.set(specifierNameText, true); exportedNames = append(exportedNames, specifier.name); } } } function addExportedFunctionDeclaration(node, name, isDefault) { - exportedFunctions.add(node); + exportedFunctions.add(getOriginalNode(node, isFunctionDeclaration)); if (isDefault) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name ?? context.factory.getDeclarationName(node)); @@ -100321,9 +103029,10 @@ function collectExternalModuleInfo(context, sourceFile) { } } else { name ?? (name = node.name); - if (!uniqueExports.get(idText(name))) { + const nameText = moduleExportNameTextUnescaped(name); + if (!uniqueExports.get(nameText)) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name); - uniqueExports.set(idText(name), true); + uniqueExports.set(nameText, true); } } } @@ -100519,7 +103228,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 173 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -100543,9 +103252,9 @@ function getDecoratorsOfParameters(node) { } return decorators; } -function getAllDecoratorsOfClass(node) { +function getAllDecoratorsOfClass(node, useLegacyDecorators) { const decorators = getDecorators(node); - const parameters = getDecoratorsOfParameters(getFirstConstructorWithBody(node)); + const parameters = useLegacyDecorators ? getDecoratorsOfParameters(getFirstConstructorWithBody(node)) : void 0; if (!some(decorators) && !some(parameters)) { return void 0; } @@ -100556,21 +103265,30 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: if (!useLegacyDecorators) { - return getAllDecoratorsOfMethod(member); + return getAllDecoratorsOfMethod( + member, + /*useLegacyDecorators*/ + false + ); } - return getAllDecoratorsOfAccessors(member, parent2); - case 174 /* MethodDeclaration */: - return getAllDecoratorsOfMethod(member); - case 172 /* PropertyDeclaration */: + return getAllDecoratorsOfAccessors( + member, + parent2, + /*useLegacyDecorators*/ + true + ); + case 175 /* MethodDeclaration */: + return getAllDecoratorsOfMethod(member, useLegacyDecorators); + case 173 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; } } -function getAllDecoratorsOfAccessors(accessor, parent2) { +function getAllDecoratorsOfAccessors(accessor, parent2, useLegacyDecorators) { if (!accessor.body) { return void 0; } @@ -100580,7 +103298,7 @@ function getAllDecoratorsOfAccessors(accessor, parent2) { return void 0; } const decorators = getDecorators(firstAccessorWithDecorators); - const parameters = getDecoratorsOfParameters(setAccessor); + const parameters = useLegacyDecorators ? getDecoratorsOfParameters(setAccessor) : void 0; if (!some(decorators) && !some(parameters)) { return void 0; } @@ -100591,12 +103309,12 @@ function getAllDecoratorsOfAccessors(accessor, parent2) { setDecorators: setAccessor && getDecorators(setAccessor) }; } -function getAllDecoratorsOfMethod(method) { +function getAllDecoratorsOfMethod(method, useLegacyDecorators) { if (!method.body) { return void 0; } const decorators = getDecorators(method); - const parameters = getDecoratorsOfParameters(method); + const parameters = useLegacyDecorators ? getDecoratorsOfParameters(method) : void 0; if (!some(decorators) && !some(parameters)) { return void 0; } @@ -100641,6 +103359,13 @@ function isSimpleParameter(node) { function isSimpleParameterList(nodes) { return every(nodes, isSimpleParameter); } +function rewriteModuleSpecifier(node, compilerOptions) { + if (!node || !isStringLiteral(node) || !shouldRewriteModuleSpecifier(node.text, compilerOptions)) { + return node; + } + const updatedText = changeExtension(node.text, getOutputExtension(node.text, compilerOptions)); + return updatedText !== node.text ? setOriginalNode(setTextRange(factory.createStringLiteral(updatedText, node.singleQuote), node), node) : node; +} // src/compiler/transformers/destructuring.ts var FlattenLevel = /* @__PURE__ */ ((FlattenLevel2) => { @@ -101039,7 +103764,7 @@ function createDestructuringPropertyAccess(flattenContext, value, propertyName) propertyName ); return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression); - } else if (isStringOrNumericLiteralLike(propertyName)) { + } else if (isStringOrNumericLiteralLike(propertyName) || isBigIntLiteral(propertyName)) { const argumentExpression = factory2.cloneNode(propertyName); return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression); } else { @@ -101349,21 +104074,21 @@ function transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptySt } function transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) { switch (node.kind) { - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); - case 169 /* Parameter */: + case 170 /* Parameter */: return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); } } @@ -101457,19 +104182,18 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableSubstitution(212 /* PropertyAccessExpression */); + context.enableSubstitution(213 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; let currentLexicalScope; let currentScopeFirstDeclarationsOfName; - let currentClassHasParameterProperties; - let enabledSubstitutions; + let enabledSubstitutions = 0 /* None */; let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 308 /* Bundle */) { + if (node.kind === 309 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); @@ -101492,34 +104216,32 @@ function transformTypeScript(context) { function saveStateAndInvoke(node, f) { const savedCurrentScope = currentLexicalScope; const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName; - const savedCurrentClassHasParameterProperties = currentClassHasParameterProperties; onBeforeVisitNode(node); const visited = f(node); if (currentLexicalScope !== savedCurrentScope) { currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName; } currentLexicalScope = savedCurrentScope; - currentClassHasParameterProperties = savedCurrentClassHasParameterProperties; return visited; } function onBeforeVisitNode(node) { switch (node.kind) { - case 307 /* SourceFile */: - case 269 /* CaseBlock */: - case 268 /* ModuleBlock */: - case 241 /* Block */: + case 308 /* SourceFile */: + case 270 /* CaseBlock */: + case 269 /* ModuleBlock */: + case 242 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 263 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 128 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */)); + Debug.assert(node.kind === 264 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */)); } break; } @@ -101538,10 +104260,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 278 /* ExportAssignment */: + case 279 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -101556,7 +104278,7 @@ function transformTypeScript(context) { return true; } switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: Debug.assertNode(parsed, isImportDeclaration); if (node.importClause !== parsed.importClause) { return true; @@ -101565,7 +104287,7 @@ function transformTypeScript(context) { return true; } break; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: Debug.assertNode(parsed, isImportEqualsDeclaration); if (node.name !== parsed.name) { return true; @@ -101577,7 +104299,7 @@ function transformTypeScript(context) { return true; } break; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: Debug.assertNode(parsed, isExportDeclaration); if (node.exportClause !== parsed.exportClause) { return true; @@ -101597,13 +104319,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return visitImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return visitExportAssignment(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -101613,7 +104335,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { + if (node.kind === 279 /* ExportDeclaration */ || node.kind === 273 /* ImportDeclaration */ || node.kind === 274 /* ImportClause */ || node.kind === 272 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 284 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 32 /* Export */)) { return visitTypeScript(node); @@ -101625,21 +104347,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: return visitConstructor(node); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 240 /* SemicolonClassElement */: + case 241 /* SemicolonClassElement */: return node; - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -101650,15 +104372,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 306 /* SpreadAssignment */: return visitor(node); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -101697,13 +104419,15 @@ function transformTypeScript(context) { case 148 /* ReadonlyKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - case 187 /* TypeLiteral */: - case 182 /* TypePredicate */: - case 168 /* TypeParameter */: + // TypeScript accessibility and readonly modifiers are elided + // falls through + case 189 /* ArrayType */: + case 190 /* TupleType */: + case 191 /* OptionalType */: + case 192 /* RestType */: + case 188 /* TypeLiteral */: + case 183 /* TypePredicate */: + case 169 /* TypeParameter */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 136 /* BooleanKeyword */: @@ -101712,80 +104436,82 @@ function transformTypeScript(context) { case 146 /* NeverKeyword */: case 116 /* VoidKeyword */: case 155 /* SymbolKeyword */: - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 186 /* TypeQuery */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 194 /* ConditionalType */: - case 196 /* ParenthesizedType */: - case 197 /* ThisType */: - case 198 /* TypeOperator */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 201 /* LiteralType */: - case 181 /* IndexSignature */: + case 186 /* ConstructorType */: + case 185 /* FunctionType */: + case 187 /* TypeQuery */: + case 184 /* TypeReference */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: + case 195 /* ConditionalType */: + case 197 /* ParenthesizedType */: + case 198 /* ThisType */: + case 199 /* TypeOperator */: + case 200 /* IndexedAccessType */: + case 201 /* MappedType */: + case 202 /* LiteralType */: + // TypeScript type nodes are elided. + // falls through + case 182 /* IndexSignature */: return void 0; - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 270 /* NamespaceExportDeclaration */: + case 271 /* NamespaceExportDeclaration */: return void 0; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return visitClassExpression(node); - case 298 /* HeritageClause */: + case 299 /* HeritageClause */: return visitHeritageClause(node); - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 176 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return visitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return visitArrowFunction(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return visitParameter(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: return visitAssertionExpression(node); - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 215 /* NewExpression */: return visitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: return visitNonNullExpression(node); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 286 /* JsxOpeningElement */: + case 287 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -102101,19 +104827,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; + return kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */ || kind === 173 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 174 /* MethodDeclaration */; + return node.kind === 175 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return true; } return false; @@ -102132,7 +104858,7 @@ function transformTypeScript(context) { } function visitPropertyNameOfClassElement(member) { const name = member.name; - if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member) && legacyDecorators)) { + if (legacyDecorators && isComputedPropertyName(name) && hasDecorators(member)) { const expression = visitNode(name.expression, visitor, isExpression); Debug.assert(expression); const innerExpression = skipPartiallyEmittedExpressions(expression); @@ -102507,7 +105233,7 @@ function transformTypeScript(context) { return updated; } function visitParenthesizedExpression(node) { - const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */); + const innerExpression = skipOuterExpressions(node.expression, ~(38 /* Assertions */ | 16 /* ExpressionsWithTypeArguments */)); if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) { const expression = visitNode(node.expression, visitor, isExpression); Debug.assert(expression); @@ -102758,7 +105484,7 @@ function transformTypeScript(context) { /*allowSourceMaps*/ true )); - const varFlags = currentLexicalScope.kind === 307 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; + const varFlags = currentLexicalScope.kind === 308 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; const statement = factory2.createVariableStatement( visitNodes2(node.modifiers, modifierVisitor, isModifier), factory2.createVariableDeclarationList([varDecl], varFlags) @@ -102769,7 +105495,7 @@ function transformTypeScript(context) { setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 266 /* EnumDeclaration */) { + if (node.kind === 267 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -102877,7 +105603,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 268 /* ModuleBlock */) { + if (node.body.kind === 269 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -102908,13 +105634,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 268 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 269 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 268 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -102937,19 +105663,13 @@ function transformTypeScript(context) { ) : void 0; } function visitImportClause(node) { - Debug.assert(!node.isTypeOnly); + Debug.assert(node.phaseModifier !== 156 /* TypeKeyword */); const name = shouldEmitAliasDeclaration(node) ? node.name : void 0; const namedBindings = visitNode(node.namedBindings, visitNamedImportBindings, isNamedImportBindings); - return name || namedBindings ? factory2.updateImportClause( - node, - /*isTypeOnly*/ - false, - name, - namedBindings - ) : void 0; + return name || namedBindings ? factory2.updateImportClause(node, node.phaseModifier, name, namedBindings) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 274 /* NamespaceImport */) { + if (node.kind === 275 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax; @@ -102968,7 +105688,14 @@ function transformTypeScript(context) { return void 0; } if (!node.exportClause || isNamespaceExport(node.exportClause)) { - return node; + return factory2.updateExportDeclaration( + node, + node.modifiers, + node.isTypeOnly, + node.exportClause, + node.moduleSpecifier, + node.attributes + ); } const allowEmpty = !!compilerOptions.verbatimModuleSyntax; const exportClause = visitNode( @@ -103007,8 +105734,10 @@ function transformTypeScript(context) { return void 0; } if (isExternalModuleImportEqualsDeclaration(node)) { - const isReferenced = shouldEmitAliasDeclaration(node); - return isReferenced ? visitEachChild(node, visitor, context) : void 0; + if (!shouldEmitAliasDeclaration(node)) { + return void 0; + } + return visitEachChild(node, visitor, context); } if (!shouldEmitImportEqualsDeclaration(node)) { return void 0; @@ -103130,15 +105859,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(304 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(267 /* ModuleDeclaration */); + context.enableSubstitution(305 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(268 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 267 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 268 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 266 /* EnumDeclaration */; + return getOriginalNode(node).kind === 267 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -103183,9 +105912,9 @@ function transformTypeScript(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -103200,8 +105929,8 @@ function transformTypeScript(context) { /*prefixLocals*/ false ); - if (container && container.kind !== 307 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */; + if (container && container.kind !== 308 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 268 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 267 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -103275,7 +106004,7 @@ function transformClassFields(context) { const previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; let shouldTransformPrivateStaticElementsInFile = false; - let enabledSubstitutions; + let enabledSubstitutions = 0 /* None */; let classAliases; let pendingExpressions; let pendingStatements; @@ -103313,74 +106042,72 @@ function transformClassFields(context) { return node; } switch (node.kind) { - case 129 /* AccessorKeyword */: - return Debug.fail("Use `modifierVisitor` instead."); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return visitClassExpression(node); - case 175 /* ClassStaticBlockDeclaration */: - case 172 /* PropertyDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: + case 173 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return visitParameterDeclaration(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return visitBindingElement(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return visitExportAssignment(node); case 81 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false ); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return visitCallExpression(node); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return visitExpressionStatement(node); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement(node); case 110 /* ThisKeyword */: return visitThisExpression(node); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: return setCurrentClassElementAnd( /*classElement*/ void 0, fallbackVisitor, node ); - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: { return setCurrentClassElementAnd( node, fallbackVisitor, @@ -103396,26 +106123,26 @@ function transformClassFields(context) { } function discardedValueVisitor(node) { switch (node.kind) { - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -103427,9 +106154,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 298 /* HeritageClause */: + case 299 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -103437,8 +106164,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -103446,35 +106173,35 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: return setCurrentClassElementAnd( node, visitConstructorDeclaration, node ); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: return setCurrentClassElementAnd( node, visitMethodOrAccessorDeclaration, node ); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return setCurrentClassElementAnd( node, visitPropertyDeclaration, node ); - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return setCurrentClassElementAnd( node, visitClassStaticBlockDeclaration, node ); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 240 /* SemicolonClassElement */: + case 241 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -103482,7 +106209,7 @@ function transformClassFields(context) { } function propertyNameVisitor(node) { switch (node.kind) { - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -103490,10 +106217,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -104727,6 +107454,7 @@ function transformClassFields(context) { addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset)); } function transformConstructorBody(node, constructor, isDerivedClass) { + var _a; const instanceProperties = getProperties( node, /*requireInitializer*/ @@ -104820,12 +107548,12 @@ function transformClassFields(context) { setTextRange( factory2.createNodeArray(statements), /*location*/ - constructor ? constructor.body.statements : node.members + ((_a = constructor == null ? void 0 : constructor.body) == null ? void 0 : _a.statements) ?? node.members ), multiLine ), /*location*/ - constructor ? constructor.body : void 0 + constructor == null ? void 0 : constructor.body ); } function addPropertyOrClassStaticBlockStatements(statements, properties, receiver) { @@ -104983,14 +107711,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(262 /* FunctionDeclaration */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(172 /* PropertyDeclaration */); - context.enableEmitNotification(167 /* ComputedPropertyName */); + context.enableEmitNotification(263 /* FunctionDeclaration */); + context.enableEmitNotification(219 /* FunctionExpression */); + context.enableEmitNotification(177 /* Constructor */); + context.enableEmitNotification(178 /* GetAccessor */); + context.enableEmitNotification(179 /* SetAccessor */); + context.enableEmitNotification(175 /* MethodDeclaration */); + context.enableEmitNotification(173 /* PropertyDeclaration */); + context.enableEmitNotification(168 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -105344,16 +108072,17 @@ function transformClassFields(context) { return; } switch (node.kind) { - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: { + // falls through + case 263 /* FunctionDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 173 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -105365,7 +108094,7 @@ function transformClassFields(context) { lexicalEnvironment = savedLexicalEnvironment; return; } - case 167 /* ComputedPropertyName */: { + case 168 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -105505,15 +108234,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node, container) { switch (node.kind) { - case 172 /* PropertyDeclaration */: - case 169 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 170 /* Parameter */: return serializeTypeNode(node.type); - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 179 /* SetAccessor */: + case 178 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node, container)); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 174 /* MethodDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 175 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -105540,7 +108269,7 @@ function createRuntimeTypeSerializer(context) { return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 177 /* GetAccessor */) { + if (container && node.kind === 178 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -105566,22 +108295,22 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: return factory2.createVoidZero(); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 188 /* ArrayType */: - case 189 /* TupleType */: + case 189 /* ArrayType */: + case 190 /* TupleType */: return factory2.createIdentifier("Array"); - case 182 /* TypePredicate */: + case 183 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); case 136 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 203 /* TemplateLiteralType */: + case 204 /* TemplateLiteralType */: case 154 /* StringKeyword */: return factory2.createIdentifier("String"); case 151 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 201 /* LiteralType */: + case 202 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 150 /* NumberKeyword */: return factory2.createIdentifier("Number"); @@ -105589,49 +108318,50 @@ function createRuntimeTypeSerializer(context) { return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 155 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return serializeTypeReferenceNode(node); - case 193 /* IntersectionType */: + case 194 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 192 /* UnionType */: + case 193 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 198 /* TypeOperator */: + case 199 /* TypeOperator */: if (node.operator === 148 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 186 /* TypeQuery */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 187 /* TypeLiteral */: + case 187 /* TypeQuery */: + case 200 /* IndexedAccessType */: + case 201 /* MappedType */: + case 188 /* TypeLiteral */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 197 /* ThisType */: - case 205 /* ImportType */: + case 198 /* ThisType */: + case 206 /* ImportType */: break; - case 312 /* JSDocAllType */: - case 313 /* JSDocUnknownType */: - case 317 /* JSDocFunctionType */: - case 318 /* JSDocVariadicType */: - case 319 /* JSDocNamepathType */: + // handle JSDoc types from an invalid parse + case 313 /* JSDocAllType */: + case 314 /* JSDocUnknownType */: + case 318 /* JSDocFunctionType */: + case 319 /* JSDocVariadicType */: + case 320 /* JSDocNamepathType */: break; - case 314 /* JSDocNullableType */: - case 315 /* JSDocNonNullableType */: - case 316 /* JSDocOptionalType */: + case 315 /* JSDocNullableType */: + case 316 /* JSDocNonNullableType */: + case 317 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -105643,7 +108373,7 @@ function createRuntimeTypeSerializer(context) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 224 /* PrefixUnaryExpression */: { + case 225 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 9 /* NumericLiteral */: @@ -105800,7 +108530,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -105850,23 +108580,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 170 /* Decorator */: + case 171 /* Decorator */: return void 0; - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return visitClassExpression(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -106222,7 +108952,11 @@ function transformLegacyDecorators(context) { } } function generateConstructorDecorationExpression(node) { - const allDecorators = getAllDecoratorsOfClass(node); + const allDecorators = getAllDecoratorsOfClass( + node, + /*useLegacyDecorators*/ + true + ); const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators); if (!decoratorExpressions) { return void 0; @@ -106456,78 +109190,80 @@ function transformESDecorators(context) { return node; } switch (node.kind) { - case 170 /* Decorator */: + case 171 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return visitClassExpression(node); - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 173 /* PropertyDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 169 /* Parameter */: + case 170 /* Parameter */: return visitParameterDeclaration(node); - case 226 /* BinaryExpression */: + // Support NamedEvaluation to ensure the correct class name for class expressions. + case 227 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return visitBindingElement(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return visitExportAssignment(node); case 110 /* ThisKeyword */: return visitThisExpression(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement(node); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return visitExpressionStatement(node); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ false ); - case 354 /* PartiallyEmittedExpression */: + case 356 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ false ); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return visitCallExpression(node); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: { + case 175 /* MethodDeclaration */: + // object literal methods and accessors + case 179 /* SetAccessor */: + case 178 /* GetAccessor */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -106539,7 +109275,7 @@ function transformESDecorators(context) { } function fallbackVisitor(node) { switch (node.kind) { - case 170 /* Decorator */: + case 171 /* Decorator */: return void 0; default: return visitor(node); @@ -106547,7 +109283,7 @@ function transformESDecorators(context) { } function modifierVisitor(node) { switch (node.kind) { - case 170 /* Decorator */: + case 171 /* Decorator */: return void 0; default: return node; @@ -106555,17 +109291,17 @@ function transformESDecorators(context) { } function classElementVisitor(node) { switch (node.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); @@ -106573,26 +109309,26 @@ function transformESDecorators(context) { } function discardedValueVisitor(node) { switch (node.kind) { - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ @@ -106732,7 +109468,11 @@ function transformESDecorators(context) { let syntheticConstructor; let heritageClauses; let shouldTransformPrivateStaticElementsInClass = false; - const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node)); + const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass( + node, + /*useLegacyDecorators*/ + false + )); if (classDecorators) { classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */); classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); @@ -108205,7 +110945,7 @@ function transformES2017(context) { const resolver = context.getEmitResolver(); const compilerOptions = context.getCompilerOptions(); const languageVersion = getEmitScriptTarget(compilerOptions); - let enabledSubstitutions; + let enabledSubstitutions = 0 /* None */; let enclosingSuperContainerFlags = 0; let enclosingFunctionParameterNames; let capturedSuperProperties; @@ -108263,16 +111003,16 @@ function transformES2017(context) { } function argumentsVisitor(node) { switch (node.kind) { - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 177 /* Constructor */: return node; - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 260 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 261 /* VariableDeclaration */: break; case 80 /* Identifier */: if (lexicalArgumentsBinding && resolver.isArgumentsLocalBinding(node)) { @@ -108289,34 +111029,34 @@ function transformES2017(context) { switch (node.kind) { case 134 /* AsyncKeyword */: return void 0; - case 223 /* AwaitExpression */: + case 224 /* AwaitExpression */: return visitAwaitExpression(node); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 176 /* Constructor */: + case 177 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -108325,27 +111065,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 241 /* Block */: - case 255 /* SwitchStatement */: - case 269 /* CaseBlock */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 258 /* TryStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 245 /* IfStatement */: - case 254 /* WithStatement */: - case 256 /* LabeledStatement */: + case 242 /* Block */: + case 256 /* SwitchStatement */: + case 270 /* CaseBlock */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: + case 259 /* TryStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 246 /* IfStatement */: + case 255 /* WithStatement */: + case 257 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -108675,7 +111415,7 @@ function transformES2017(context) { const newParameters = []; for (const parameter of node.parameters) { if (parameter.initializer || parameter.dotDotDotToken) { - if (node.kind === 219 /* ArrowFunction */) { + if (node.kind === 220 /* ArrowFunction */) { const restParameter = factory2.createParameterDeclaration( /*modifiers*/ void 0, @@ -108705,7 +111445,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 220 /* ArrowFunction */; const savedLexicalArgumentsBinding = lexicalArgumentsBinding; const hasLexicalArguments = resolver.hasNodeCheckFlag(node, 512 /* CaptureArguments */); const captureLexicalArguments = hasLexicalArguments && !lexicalArgumentsBinding; @@ -108829,15 +111569,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(263 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(243 /* VariableStatement */); + context.enableSubstitution(214 /* CallExpression */); + context.enableSubstitution(212 /* PropertyAccessExpression */); + context.enableSubstitution(213 /* ElementAccessExpression */); + context.enableEmitNotification(264 /* ClassDeclaration */); + context.enableEmitNotification(175 /* MethodDeclaration */); + context.enableEmitNotification(178 /* GetAccessor */); + context.enableEmitNotification(179 /* SetAccessor */); + context.enableEmitNotification(177 /* Constructor */); + context.enableEmitNotification(244 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -108868,11 +111608,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -108916,7 +111656,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 264 /* ClassDeclaration */ || kind === 177 /* Constructor */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -109080,7 +111820,7 @@ function transformES2018(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; let exportedVariableStatement = false; - let enabledSubstitutions; + let enabledSubstitutions = 0 /* None */; let enclosingFunctionFlags; let parametersWithPrecedingObjectRestOrSpread; let enclosingSuperContainerFlags = 0; @@ -109156,119 +111896,119 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 223 /* AwaitExpression */: + case 224 /* AwaitExpression */: return visitAwaitExpression(node); - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return visitYieldExpression(node); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return visitReturnStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return visitLabeledStatement(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return visitCatchClause(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 249 /* ForInStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 250 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 222 /* VoidExpression */: + case 223 /* VoidExpression */: return visitVoidExpression(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 169 /* Parameter */: + case 170 /* Parameter */: return visitParameter(node); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -109356,7 +112096,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 251 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -109367,7 +112107,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 305 /* SpreadAssignment */) { + if (e.kind === 306 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -109377,7 +112117,7 @@ function transformES2018(context) { } else { chunkObject = append( chunkObject, - e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike) + e.kind === 304 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike) ); } } @@ -109389,7 +112129,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 211 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -110173,15 +112913,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(263 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(243 /* VariableStatement */); + context.enableSubstitution(214 /* CallExpression */); + context.enableSubstitution(212 /* PropertyAccessExpression */); + context.enableSubstitution(213 /* ElementAccessExpression */); + context.enableEmitNotification(264 /* ClassDeclaration */); + context.enableEmitNotification(175 /* MethodDeclaration */); + context.enableEmitNotification(178 /* GetAccessor */); + context.enableEmitNotification(179 /* SetAccessor */); + context.enableEmitNotification(177 /* Constructor */); + context.enableEmitNotification(244 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -110212,11 +112952,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -110260,7 +113000,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 264 /* ClassDeclaration */ || kind === 177 /* Constructor */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -110305,7 +113045,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 299 /* CatchClause */: + case 300 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -110344,7 +113084,7 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 213 /* CallExpression */: { + case 214 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -110353,8 +113093,8 @@ function transformES2020(context) { Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -110367,12 +113107,12 @@ function transformES2020(context) { return updated; } return visitEachChild(node, visitor, context); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 220 /* DeleteExpression */: + case 221 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -110410,7 +113150,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 212 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -110446,12 +113186,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -110477,8 +113217,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -110487,9 +113227,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 212 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 213 /* CallExpression */: + case 214 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -110691,15 +113431,15 @@ function transformESNext(context) { return node; } switch (node.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: return visitSourceFile(node); - case 241 /* Block */: + case 242 /* Block */: return visitBlock(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement(node); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return visitSwitchStatement(node); default: return visitEachChild(node, visitor, context); @@ -110977,16 +113717,16 @@ function transformESNext(context) { function hoist(node) { if (!topLevelStatements) return node; switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 278 /* ExportDeclaration */: - case 262 /* FunctionDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 279 /* ExportDeclaration */: + case 263 /* FunctionDeclaration */: return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return hoistExportAssignment(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return hoistClassDeclaration(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return hoistVariableStatement(node); } return node; @@ -111378,8 +114118,8 @@ function transformJsx(context) { /*modifiers*/ void 0, factory2.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, /*name*/ void 0, factory2.createNamedImports(arrayFrom(importSpecifiersMap.values())) @@ -111444,25 +114184,25 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 284 /* JsxElement */: + case 285 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 288 /* JsxFragment */: + case 289 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -111472,21 +114212,21 @@ function transformJsx(context) { switch (node.kind) { case 12 /* JsxText */: return visitJsxText(node); - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return visitJsxExpression(node); - case 284 /* JsxElement */: + case 285 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 288 /* JsxFragment */: + case 289 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -111738,7 +114478,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 294 /* JsxExpression */) { + if (node.kind === 295 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -111812,7 +114552,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 284 /* JsxElement */) { + if (node.kind === 285 /* JsxElement */) { return getTagName(node.openingElement); } else { const tagName = node.tagName; @@ -111829,7 +114569,7 @@ function transformJsx(context) { const name = node.name; if (isIdentifier(name)) { const text = idText(name); - return /^[A-Za-z_]\w*$/.test(text) ? name : factory2.createStringLiteral(text); + return /^[A-Z_]\w*$/i.test(text) ? name : factory2.createStringLiteral(text); } return factory2.createStringLiteral(idText(name.namespace) + ":" + idText(name.name)); } @@ -112112,7 +114852,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -112215,7 +114955,7 @@ function transformES2015(context) { ); } let convertedLoopState; - let enabledSubstitutions; + let enabledSubstitutions = 0 /* None */; return chainBundle(context, transformSourceFile); function transformSourceFile(node) { if (node.isDeclarationFile) { @@ -112240,7 +114980,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithSuperCall */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithSuperCall */) !== 0 && node.kind === 254 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -112308,85 +115048,86 @@ function transformES2015(context) { switch (node.kind) { case 126 /* StaticKeyword */: return void 0; - case 263 /* ClassDeclaration */: + // elide static keyword + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return visitClassExpression(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return visitParameter(node); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return visitArrowFunction(node); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return visitFunctionExpression(node); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return visitVariableDeclaration(node); case 80 /* Identifier */: return visitIdentifier(node); - case 261 /* VariableDeclarationList */: + case 262 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return visitSwitchStatement(node); - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return visitCaseBlock(node); - case 241 /* Block */: + case 242 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: + case 253 /* BreakStatement */: + case 252 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return visitLabeledStatement(node); - case 246 /* DoStatement */: - case 247 /* WhileStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return visitExpressionStatement(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return visitCatchClause(node); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 215 /* NewExpression */: return visitNewExpression(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 15 /* NoSubstitutionTemplateLiteral */: case 16 /* TemplateHead */: @@ -112397,13 +115138,13 @@ function transformES2015(context) { return visitStringLiteral(node); case 9 /* NumericLiteral */: return visitNumericLiteral(node); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: return visitTemplateExpression(node); - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return visitYieldExpression(node); - case 230 /* SpreadElement */: + case 231 /* SpreadElement */: return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( @@ -112413,18 +115154,18 @@ function transformES2015(context) { ); case 110 /* ThisKeyword */: return visitThisKeyword(node); - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return visitMetaProperty(node); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return visitAccessorDeclaration(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return visitReturnStatement(node); - case 222 /* VoidExpression */: + case 223 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -112539,13 +115280,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 253 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 252 /* BreakStatement */) { + if (node.kind === 253 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -112553,7 +115294,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 252 /* BreakStatement */) { + if (node.kind === 253 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -112770,16 +115511,18 @@ function transformES2015(context) { return false; } switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + // stop at function boundaries + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 177 /* Constructor */: + case 176 /* ClassStaticBlockDeclaration */: return false; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: { + // only step into computed property names for class and object literal elements + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 173 /* PropertyDeclaration */: { const named = node; if (isComputedPropertyName(named.name)) { return !!forEachChild(named.name, containsSuperCall); @@ -112984,16 +115727,18 @@ function transformES2015(context) { return factory2.createPartiallyEmittedExpression(node.right, node); } switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + // stop at function boundaries + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 177 /* Constructor */: + case 176 /* ClassStaticBlockDeclaration */: return node; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: { + // only step into computed property names for class and object literal elements + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 173 /* PropertyDeclaration */: { const named = node; if (isComputedPropertyName(named.name)) { return factory2.replacePropertyName(named, visitEachChild( @@ -113035,16 +115780,18 @@ function transformES2015(context) { ); } switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + // stop at function boundaries + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 177 /* Constructor */: + case 176 /* ClassStaticBlockDeclaration */: return node; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: { + // only step into computed property names for class and object literal elements + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 173 /* PropertyDeclaration */: { const named = node; if (isComputedPropertyName(named.name)) { return factory2.replacePropertyName(named, visitEachChild( @@ -113080,14 +115827,14 @@ function transformES2015(context) { return body; } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 253 /* ReturnStatement */) { + if (statement.kind === 254 /* ReturnStatement */) { return true; - } else if (statement.kind === 245 /* IfStatement */) { + } else if (statement.kind === 246 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 241 /* Block */) { + } else if (statement.kind === 242 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -113361,7 +116108,7 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 131072 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 131072 /* CapturedLexicalThis */ && node.kind !== 220 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } @@ -113391,21 +116138,21 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return statements; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 176 /* Constructor */: + case 177 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), @@ -113451,21 +116198,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 240 /* SemicolonClassElement */: + case 241 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 176 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -113672,7 +116419,7 @@ function transformES2015(context) { const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 263 /* FunctionDeclaration */ || node.kind === 219 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -113733,7 +116480,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 219 /* ArrowFunction */); + Debug.assert(node.kind === 220 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -113953,18 +116700,18 @@ function transformES2015(context) { statement, /*outermostLabeledStatement*/ node - ) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel); + ) : factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock) ?? setTextRange(factory2.createEmptyStatement(), statement), node, convertedLoopState && resetLabel); } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 246 /* DoStatement */: - case 247 /* WhileStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -114314,7 +117061,7 @@ function transformES2015(context) { let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 168 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -114434,15 +117181,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 248 /* ForStatement */: + case 249 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -114494,11 +117241,11 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 261 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 262 /* VariableDeclarationList */) { loopInitializer = initializer; } break; @@ -114932,20 +117679,20 @@ function transformES2015(context) { for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -115071,7 +117818,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 177 /* GetAccessor */) { + if (node.kind === 178 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -115434,13 +118181,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(219 /* ArrowFunction */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(262 /* FunctionDeclaration */); + context.enableEmitNotification(177 /* Constructor */); + context.enableEmitNotification(175 /* MethodDeclaration */); + context.enableEmitNotification(178 /* GetAccessor */); + context.enableEmitNotification(179 /* SetAccessor */); + context.enableEmitNotification(220 /* ArrowFunction */); + context.enableEmitNotification(219 /* FunctionExpression */); + context.enableEmitNotification(263 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -115464,10 +118211,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 260 /* VariableDeclaration */: + case 209 /* BindingElement */: + case 264 /* ClassDeclaration */: + case 267 /* EnumDeclaration */: + case 261 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -115524,11 +118271,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 245 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 214 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -115536,7 +118283,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 231 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -115625,13 +118372,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 246 /* DoStatement */: + case 247 /* DoStatement */: return visitDoStatement(node); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return visitSwitchStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -115639,24 +118386,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return visitFunctionExpression(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return visitAccessorDeclaration(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement(node); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return visitForInStatement(node); - case 252 /* BreakStatement */: + case 253 /* BreakStatement */: return visitBreakStatement(node); - case 251 /* ContinueStatement */: + case 252 /* ContinueStatement */: return visitContinueStatement(node); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -115670,23 +118417,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return visitBinaryExpression(node); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return visitCommaListExpression(node); - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return visitConditionalExpression(node); - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return visitYieldExpression(node); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return visitCallExpression(node); - case 214 /* NewExpression */: + case 215 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -115694,9 +118441,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -115881,14 +118628,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression(left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))); break; default: @@ -116208,35 +118955,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 241 /* Block */: + case 242 /* Block */: return transformAndEmitBlock(node); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 245 /* IfStatement */: + case 246 /* IfStatement */: return transformAndEmitIfStatement(node); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return transformAndEmitDoStatement(node); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return transformAndEmitForStatement(node); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 251 /* ContinueStatement */: + case 252 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 252 /* BreakStatement */: + case 253 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return transformAndEmitWithStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 257 /* ThrowStatement */: + case 258 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 258 /* TryStatement */: + case 259 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -116583,7 +119330,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 298 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -116593,7 +119340,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 296 /* CaseClause */) { + if (clause.kind === 297 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -117559,15 +120306,16 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(215 /* TaggedTemplateExpression */); + context.enableSubstitution(214 /* CallExpression */); + context.enableSubstitution(216 /* TaggedTemplateExpression */); context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(226 /* BinaryExpression */); - context.enableSubstitution(304 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(307 /* SourceFile */); + context.enableSubstitution(227 /* BinaryExpression */); + context.enableSubstitution(305 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(308 /* SourceFile */); const moduleInfoMap = []; let currentSourceFile; let currentModuleInfo; + let importsAndRequiresToRewriteOrShim; const noSubstitution = []; let needUMDDynamicImportHelper; return chainBundle(context, transformSourceFile); @@ -117578,6 +120326,20 @@ function transformModule(context) { currentSourceFile = node; currentModuleInfo = collectExternalModuleInfo(context, node); moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; + if (compilerOptions.rewriteRelativeImportExtensions) { + forEachDynamicImportOrRequireCall( + node, + /*includeTypeSpaceImports*/ + false, + /*requireStringLiteralLikeArgument*/ + false, + (node2) => { + if (!isStringLiteralLike(node2.arguments[0]) || shouldRewriteModuleSpecifier(node2.arguments[0].text, compilerOptions)) { + importsAndRequiresToRewriteOrShim = append(importsAndRequiresToRewriteOrShim, node2); + } + } + ); + } const transformModule2 = getTransformModuleDelegate(moduleKind); const updated = transformModule2(node); currentSourceFile = void 0; @@ -117610,7 +120372,7 @@ function transformModule(context) { factory2.createExpressionStatement( reduceLeft( currentModuleInfo.exportedNames.slice(i, i + chunkSize), - (prev, nextId) => factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier("exports"), factory2.createIdentifier(idText(nextId))), prev), + (prev, nextId) => nextId.kind === 11 /* StringLiteral */ ? factory2.createAssignment(factory2.createElementAccessExpression(factory2.createIdentifier("exports"), factory2.createStringLiteral(nextId.text)), prev) : factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier("exports"), factory2.createIdentifier(idText(nextId))), prev), factory2.createVoidZero() ) ) @@ -117933,7 +120695,10 @@ function transformModule(context) { append(statements, createUnderscoreUnderscoreESModule()); } if (some(currentModuleInfo.exportedNames)) { - append(statements, factory2.createExpressionStatement(reduceLeft(currentModuleInfo.exportedNames, (prev, nextId) => factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier("exports"), factory2.createIdentifier(idText(nextId))), prev), factory2.createVoidZero()))); + append( + statements, + factory2.createExpressionStatement(reduceLeft(currentModuleInfo.exportedNames, (prev, nextId) => nextId.kind === 11 /* StringLiteral */ ? factory2.createAssignment(factory2.createElementAccessExpression(factory2.createIdentifier("exports"), factory2.createStringLiteral(nextId.text)), prev) : factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier("exports"), factory2.createIdentifier(idText(nextId))), prev), factory2.createVoidZero())) + ); } for (const f of currentModuleInfo.exportedFunctions) { appendExportsOfHoistedDeclaration(statements, f); @@ -117987,13 +120752,13 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return visitTopLevelImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return visitTopLevelImportEqualsDeclaration(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return visitTopLevelExportDeclaration(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return visitTopLevelExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -118001,79 +120766,85 @@ function transformModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return visitForInStatement(node); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatement(node); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return visitDoStatement(node); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return visitWhileStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return visitLabeledStatement(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return visitWithStatement(node); - case 245 /* IfStatement */: + case 246 /* IfStatement */: return visitIfStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return visitSwitchStatement(node); - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return visitCaseBlock(node); - case 296 /* CaseClause */: + case 297 /* CaseClause */: return visitCaseClause(node); - case 297 /* DefaultClause */: + case 298 /* DefaultClause */: return visitDefaultClause(node); - case 258 /* TryStatement */: + case 259 /* TryStatement */: return visitTryStatement(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return visitCatchClause(node); - case 241 /* Block */: + case 242 /* Block */: return visitBlock(node); default: return visitor(node); } } function visitorWorker(node, valueIsDiscarded) { - if (!(node.transformFlags & (8388608 /* ContainsDynamicImport */ | 4096 /* ContainsDestructuringAssignment */ | 268435456 /* ContainsUpdateExpressionForIdentifier */))) { + if (!(node.transformFlags & (8388608 /* ContainsDynamicImport */ | 4096 /* ContainsDestructuringAssignment */ | 268435456 /* ContainsUpdateExpressionForIdentifier */)) && !(importsAndRequiresToRewriteOrShim == null ? void 0 : importsAndRequiresToRewriteOrShim.length)) { return node; } switch (node.kind) { - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 354 /* PartiallyEmittedExpression */: + case 356 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 213 /* CallExpression */: - if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { - return visitImportCallExpression(node); + case 214 /* CallExpression */: + const needsRewrite = node === firstOrUndefined(importsAndRequiresToRewriteOrShim); + if (needsRewrite) { + importsAndRequiresToRewriteOrShim.shift(); + } + if (isImportCall(node) && host.shouldTransformImportCall(currentSourceFile)) { + return visitImportCallExpression(node, needsRewrite); + } else if (needsRewrite) { + return shimOrRewriteImportOrRequireCall(node); } break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -118096,24 +120867,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -118256,7 +121027,7 @@ function transformModule(context) { return factory2.updateLabeledStatement( node, node.label, - Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)) + visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? setTextRange(factory2.createEmptyStatement(), node.statement) ); } function visitWithStatement(node) { @@ -118270,7 +121041,7 @@ function transformModule(context) { return factory2.updateIfStatement( node, visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)), + visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? factory2.createBlock([]), visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ); } @@ -118356,13 +121127,27 @@ function transformModule(context) { } return visitEachChild(node, visitor, context); } - function visitImportCallExpression(node) { + function shimOrRewriteImportOrRequireCall(node) { + return factory2.updateCallExpression( + node, + node.expression, + /*typeArguments*/ + void 0, + visitNodes2(node.arguments, (arg) => { + if (arg === node.arguments[0]) { + return isStringLiteralLike(arg) ? rewriteModuleSpecifier(arg, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(arg); + } + return visitor(arg); + }, isExpression) + ); + } + function visitImportCallExpression(node, rewriteOrShim) { if (moduleKind === 0 /* None */ && languageVersion >= 7 /* ES2020 */) { return visitEachChild(node, visitor, context); } const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions); const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression); - const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument; + const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument && rewriteOrShim ? isStringLiteral(firstArgument) ? rewriteModuleSpecifier(firstArgument, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(firstArgument) : firstArgument; const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */); switch (compilerOptions.module) { case 2 /* AMD */: @@ -118693,7 +121478,7 @@ function transformModule(context) { const moduleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver, compilerOptions); const args = []; if (moduleName) { - args.push(moduleName); + args.push(rewriteModuleSpecifier(moduleName, compilerOptions)); } return factory2.createCallExpression( factory2.createIdentifier("require"), @@ -118804,17 +121589,16 @@ function transformModule(context) { ); } for (const specifier of node.exportClause.elements) { - const exportNeedsImportDefault = !!getESModuleInterop(compilerOptions) && !(getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) && idText(specifier.propertyName || specifier.name) === "default"; - const exportedValue = factory2.createPropertyAccessExpression( - exportNeedsImportDefault ? emitHelpers().createImportDefaultHelper(generatedName) : generatedName, - specifier.propertyName || specifier.name - ); + const specifierName = specifier.propertyName || specifier.name; + const exportNeedsImportDefault = !!getESModuleInterop(compilerOptions) && !(getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) && moduleExportNameIsDefault(specifierName); + const target = exportNeedsImportDefault ? emitHelpers().createImportDefaultHelper(generatedName) : generatedName; + const exportedValue = specifierName.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, specifierName) : factory2.createPropertyAccessExpression(target, specifierName); statements.push( setOriginalNode( setTextRange( factory2.createExpressionStatement( createExportExpression( - factory2.getExportName(specifier), + specifier.name.kind === 11 /* StringLiteral */ ? factory2.cloneNode(specifier.name) : factory2.getExportName(specifier), exportedValue, /*location*/ void 0, @@ -118839,7 +121623,7 @@ function transformModule(context) { factory2.cloneNode(node.exportClause.name), getHelperExpressionForExport( node, - moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name)) + moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : node.exportClause.name.kind === 11 /* StringLiteral */ ? generatedName : factory2.createIdentifier(idText(node.exportClause.name)) ) ) ), @@ -119071,10 +121855,10 @@ function transformModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, seen, namedBindings); break; - case 275 /* NamedImports */: + case 276 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, @@ -119169,10 +121953,13 @@ function transformModule(context) { return statements; } function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) { - if (!seen.has(exportName)) { + if (exportName.kind !== 11 /* StringLiteral */) { + if (seen.has(exportName)) { + return statements; + } seen.set(exportName, true); - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); } + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); return statements; } function createUnderscoreUnderscoreESModule() { @@ -119242,7 +122029,10 @@ function transformModule(context) { ]) ] ) : factory2.createAssignment( - factory2.createPropertyAccessExpression( + name.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression( + factory2.createIdentifier("exports"), + factory2.cloneNode(name) + ) : factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), factory2.cloneNode(name) ), @@ -119260,7 +122050,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 307 /* SourceFile */) { + if (node.kind === 308 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -119298,11 +122088,11 @@ function transformModule(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return substituteCallExpression(node); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -119355,7 +122145,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 307 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -119378,11 +122168,9 @@ function transformModule(context) { ); } else if (isImportSpecifier(importDeclaration)) { const name = importDeclaration.propertyName || importDeclaration.name; + const target = factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration); return setTextRange( - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration), - factory2.cloneNode(name) - ), + name.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, factory2.cloneNode(name)) : factory2.createPropertyAccessExpression(target, factory2.cloneNode(name)), /*location*/ node ); @@ -119466,10 +122254,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(304 /* ShorthandPropertyAssignment */); - context.enableSubstitution(226 /* BinaryExpression */); - context.enableSubstitution(236 /* MetaProperty */); - context.enableEmitNotification(307 /* SourceFile */); + context.enableSubstitution(305 /* ShorthandPropertyAssignment */); + context.enableSubstitution(227 /* BinaryExpression */); + context.enableSubstitution(237 /* MetaProperty */); + context.enableEmitNotification(308 /* SourceFile */); const moduleInfoMap = []; const exportFunctionsMap = []; const noSubstitutionMap = []; @@ -119653,7 +122441,7 @@ function transformSystemModule(context) { if (!some(moduleInfo.exportedNames) && moduleInfo.exportedFunctions.size === 0 && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 279 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -119670,7 +122458,7 @@ function transformSystemModule(context) { const exportedNames = []; if (moduleInfo.exportedNames) { for (const exportedLocalName of moduleInfo.exportedNames) { - if (exportedLocalName.escapedText === "default") { + if (moduleExportNameIsDefault(exportedLocalName)) { continue; } exportedNames.push( @@ -119813,11 +122601,12 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 271 /* ImportEqualsDeclaration */: + // falls through + case 272 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -119840,7 +122629,7 @@ function transformSystemModule(context) { ); } break; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -119848,10 +122637,10 @@ function transformSystemModule(context) { for (const e of entry.exportClause.elements) { properties.push( factory2.createPropertyAssignment( - factory2.createStringLiteral(idText(e.name)), + factory2.createStringLiteral(moduleExportNameTextUnescaped(e.name)), factory2.createElementAccessExpression( parameterName, - factory2.createStringLiteral(idText(e.propertyName || e.name)) + factory2.createStringLiteral(moduleExportNameTextUnescaped(e.propertyName || e.name)) ) ) ); @@ -119878,7 +122667,7 @@ function transformSystemModule(context) { /*typeArguments*/ void 0, [ - factory2.createStringLiteral(idText(entry.exportClause.name)), + factory2.createStringLiteral(moduleExportNameTextUnescaped(entry.exportClause.name)), parameterName ] ) @@ -119935,13 +122724,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return visitImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return visitExportDeclaration(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -120096,7 +122885,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 307 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 308 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -120146,10 +122935,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 275 /* NamedImports */: + case 276 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -120218,7 +123007,7 @@ function transformSystemModule(context) { const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { - if (exportSpecifier.name.escapedText !== excludeName) { + if (moduleExportNameTextUnescaped(exportSpecifier.name) !== excludeName) { statements = appendExportStatement(statements, exportSpecifier.name, name); } } @@ -120249,45 +123038,45 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return visitVariableStatement(node); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return visitClassDeclaration(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return visitForInStatement(node); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return visitForOfStatement(node); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return visitDoStatement(node); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return visitWhileStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return visitLabeledStatement(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return visitWithStatement(node); - case 245 /* IfStatement */: + case 246 /* IfStatement */: return visitIfStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return visitSwitchStatement(node); - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return visitCaseBlock(node); - case 296 /* CaseClause */: + case 297 /* CaseClause */: return visitCaseClause(node); - case 297 /* DefaultClause */: + case 298 /* DefaultClause */: return visitDefaultClause(node); - case 258 /* TryStatement */: + case 259 /* TryStatement */: return visitTryStatement(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return visitCatchClause(node); - case 241 /* Block */: + case 242 /* Block */: return visitBlock(node); default: return visitor(node); @@ -120370,7 +123159,7 @@ function transformSystemModule(context) { return factory2.updateLabeledStatement( node, node.label, - Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)) + visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? factory2.createExpressionStatement(factory2.createIdentifier("")) ); } function visitWithStatement(node) { @@ -120384,7 +123173,7 @@ function transformSystemModule(context) { return factory2.updateIfStatement( node, visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)), + visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ?? factory2.createBlock([]), visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) ); } @@ -120441,30 +123230,30 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 248 /* ForStatement */: + case 249 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 354 /* PartiallyEmittedExpression */: + case 356 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 213 /* CallExpression */: + case 214 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -120537,7 +123326,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 307 /* SourceFile */; + return container !== void 0 && container.kind === 308 /* SourceFile */; } else { return false; } @@ -120581,7 +123370,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 307 /* SourceFile */) { + if (node.kind === 308 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -120615,7 +123404,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -120639,13 +123428,12 @@ function transformSystemModule(context) { node ); } else if (isImportSpecifier(importDeclaration)) { + const importedName = importDeclaration.propertyName || importDeclaration.name; + const target = factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration); return setTextRange( factory2.createPropertyAssignment( factory2.cloneNode(name), - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration), - factory2.cloneNode(importDeclaration.propertyName || importDeclaration.name) - ) + importedName.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, factory2.cloneNode(importedName)) : factory2.createPropertyAccessExpression(target, factory2.cloneNode(importedName)) ), /*location*/ node @@ -120659,9 +123447,9 @@ function transformSystemModule(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return substituteBinaryExpression(node); - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -120688,11 +123476,10 @@ function transformSystemModule(context) { node ); } else if (isImportSpecifier(importDeclaration)) { + const importedName = importDeclaration.propertyName || importDeclaration.name; + const target = factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration); return setTextRange( - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration), - factory2.cloneNode(importDeclaration.propertyName || importDeclaration.name) - ), + importedName.kind === 11 /* StringLiteral */ ? factory2.createElementAccessExpression(target, factory2.cloneNode(importedName)) : factory2.createPropertyAccessExpression(target, factory2.cloneNode(importedName)), /*location*/ node ); @@ -120729,7 +123516,7 @@ function transformSystemModule(context) { /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 307 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 308 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); @@ -120784,8 +123571,10 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(307 /* SourceFile */); + context.enableEmitNotification(308 /* SourceFile */); context.enableSubstitution(80 /* Identifier */); + const noSubstitution = /* @__PURE__ */ new Set(); + let importsAndRequiresToRewriteOrShim; let helperNameSubstitutions; let currentSourceFile; let importRequireStatements; @@ -120797,7 +123586,22 @@ function transformECMAScriptModule(context) { if (isExternalModule(node) || getIsolatedModules(compilerOptions)) { currentSourceFile = node; importRequireStatements = void 0; + if (compilerOptions.rewriteRelativeImportExtensions && (currentSourceFile.flags & 4194304 /* PossiblyContainsDynamicImport */ || isInJSFile(node))) { + forEachDynamicImportOrRequireCall( + node, + /*includeTypeSpaceImports*/ + false, + /*requireStringLiteralLikeArgument*/ + false, + (node2) => { + if (!isStringLiteralLike(node2.arguments[0]) || shouldRewriteModuleSpecifier(node2.arguments[0].text, compilerOptions)) { + importsAndRequiresToRewriteOrShim = append(importsAndRequiresToRewriteOrShim, node2); + } + } + ); + } let result = updateExternalModule(node); + addEmitHelpers(result, context.readEmitHelpers()); currentSourceFile = void 0; if (importRequireStatements) { result = factory2.updateSourceFile( @@ -120820,7 +123624,7 @@ function transformECMAScriptModule(context) { if (externalHelpersImportDeclaration) { const statements = []; const statementOffset = factory2.copyPrologue(node.statements, statements); - append(statements, externalHelpersImportDeclaration); + addRange(statements, visitArray([externalHelpersImportDeclaration], visitor, isStatement)); addRange(statements, visitNodes2(node.statements, visitor, isStatement, statementOffset)); return factory2.updateSourceFile( node, @@ -120832,21 +123636,59 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return visitExportAssignment(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); + case 273 /* ImportDeclaration */: + return visitImportDeclaration(node); + case 214 /* CallExpression */: + if (node === (importsAndRequiresToRewriteOrShim == null ? void 0 : importsAndRequiresToRewriteOrShim[0])) { + return visitImportOrRequireCall(importsAndRequiresToRewriteOrShim.shift()); + } + // fallthrough + default: + if ((importsAndRequiresToRewriteOrShim == null ? void 0 : importsAndRequiresToRewriteOrShim.length) && rangeContainsRange(node, importsAndRequiresToRewriteOrShim[0])) { + return visitEachChild(node, visitor, context); + } } return node; } + function visitImportDeclaration(node) { + if (!compilerOptions.rewriteRelativeImportExtensions) { + return node; + } + const updatedModuleSpecifier = rewriteModuleSpecifier(node.moduleSpecifier, compilerOptions); + if (updatedModuleSpecifier === node.moduleSpecifier) { + return node; + } + return factory2.updateImportDeclaration( + node, + node.modifiers, + node.importClause, + updatedModuleSpecifier, + node.attributes + ); + } + function visitImportOrRequireCall(node) { + return factory2.updateCallExpression( + node, + node.expression, + node.typeArguments, + [ + isStringLiteralLike(node.arguments[0]) ? rewriteModuleSpecifier(node.arguments[0], compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(node.arguments[0]), + ...node.arguments.slice(1) + ] + ); + } function createRequireCall2(importNode) { const moduleName = getExternalModuleNameLiteral(factory2, importNode, Debug.checkDefined(currentSourceFile), host, resolver, compilerOptions); const args = []; if (moduleName) { - args.push(moduleName); + args.push(rewriteModuleSpecifier(moduleName, compilerOptions)); } if (getEmitModuleKind(compilerOptions) === 200 /* Preserve */) { return factory2.createCallExpression( @@ -120862,8 +123704,8 @@ function transformECMAScriptModule(context) { /*modifiers*/ void 0, factory2.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, /*name*/ void 0, factory2.createNamedImports([ @@ -120991,11 +123833,16 @@ function transformECMAScriptModule(context) { return node; } function visitExportDeclaration(node) { - if (compilerOptions.module !== void 0 && compilerOptions.module > 5 /* ES2015 */) { - return node; - } - if (!node.exportClause || !isNamespaceExport(node.exportClause) || !node.moduleSpecifier) { - return node; + const updatedModuleSpecifier = rewriteModuleSpecifier(node.moduleSpecifier, compilerOptions); + if (compilerOptions.module !== void 0 && compilerOptions.module > 5 /* ES2015 */ || !node.exportClause || !isNamespaceExport(node.exportClause) || !node.moduleSpecifier) { + return !node.moduleSpecifier || updatedModuleSpecifier === node.moduleSpecifier ? node : factory2.updateExportDeclaration( + node, + node.modifiers, + node.isTypeOnly, + node.exportClause, + updatedModuleSpecifier, + node.attributes + ); } const oldIdentifier = node.exportClause.name; const synthName = factory2.getGeneratedNameForNode(oldIdentifier); @@ -121003,15 +123850,15 @@ function transformECMAScriptModule(context) { /*modifiers*/ void 0, factory2.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, /*name*/ void 0, factory2.createNamespaceImport( synthName ) ), - node.moduleSpecifier, + updatedModuleSpecifier, node.attributes ); setOriginalNode(importDecl, node.exportClause); @@ -121035,7 +123882,9 @@ function transformECMAScriptModule(context) { if ((isExternalModule(node) || getIsolatedModules(compilerOptions)) && compilerOptions.importHelpers) { helperNameSubstitutions = /* @__PURE__ */ new Map(); } + currentSourceFile = node; previousOnEmitNode(hint, node, emitCallback); + currentSourceFile = void 0; helperNameSubstitutions = void 0; } else { previousOnEmitNode(hint, node, emitCallback); @@ -121043,23 +123892,34 @@ function transformECMAScriptModule(context) { } function onSubstituteNode(hint, node) { node = previousOnSubstituteNode(hint, node); - if (helperNameSubstitutions && isIdentifier(node) && getEmitFlags(node) & 8192 /* HelperName */) { + if (node.id && noSubstitution.has(node.id)) { + return node; + } + if (isIdentifier(node) && getEmitFlags(node) & 8192 /* HelperName */) { return substituteHelperName(node); } return node; } function substituteHelperName(node) { - const name = idText(node); - let substitution = helperNameSubstitutions.get(name); - if (!substitution) { - helperNameSubstitutions.set(name, substitution = factory2.createUniqueName(name, 16 /* Optimistic */ | 32 /* FileLevel */)); + const externalHelpersModuleName = currentSourceFile && getExternalHelpersModuleName(currentSourceFile); + if (externalHelpersModuleName) { + noSubstitution.add(getNodeId(node)); + return factory2.createPropertyAccessExpression(externalHelpersModuleName, node); + } + if (helperNameSubstitutions) { + const name = idText(node); + let substitution = helperNameSubstitutions.get(name); + if (!substitution) { + helperNameSubstitutions.set(name, substitution = factory2.createUniqueName(name, 16 /* Optimistic */ | 32 /* FileLevel */)); + } + return substitution; } - return substitution; + return node; } } -// src/compiler/transformers/module/node.ts -function transformNodeModule(context) { +// src/compiler/transformers/module/impliedNodeFormatDependent.ts +function transformImpliedNodeFormatDependentModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; const previousOnEmitNode = context.onEmitNode; const esmTransform = transformECMAScriptModule(context); @@ -121070,10 +123930,11 @@ function transformNodeModule(context) { const cjsTransform = transformModule(context); const cjsOnSubstituteNode = context.onSubstituteNode; const cjsOnEmitNode = context.onEmitNode; + const getEmitModuleFormatOfFile2 = (file) => context.getEmitHost().getEmitModuleFormatOfFile(file); context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(307 /* SourceFile */); - context.enableEmitNotification(307 /* SourceFile */); + context.enableSubstitution(308 /* SourceFile */); + context.enableEmitNotification(308 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -121084,7 +123945,7 @@ function transformNodeModule(context) { if (!currentSourceFile) { return previousOnSubstituteNode(hint, node); } - if (currentSourceFile.impliedNodeFormat === 99 /* ESNext */) { + if (getEmitModuleFormatOfFile2(currentSourceFile) >= 5 /* ES2015 */) { return esmOnSubstituteNode(hint, node); } return cjsOnSubstituteNode(hint, node); @@ -121097,13 +123958,13 @@ function transformNodeModule(context) { if (!currentSourceFile) { return previousOnEmitNode(hint, node, emitCallback); } - if (currentSourceFile.impliedNodeFormat === 99 /* ESNext */) { + if (getEmitModuleFormatOfFile2(currentSourceFile) >= 5 /* ES2015 */) { return esmOnEmitNode(hint, node, emitCallback); } return cjsOnEmitNode(hint, node, emitCallback); } function getModuleTransformForFile(file) { - return file.impliedNodeFormat === 99 /* ESNext */ ? esmTransform : cjsTransform; + return getEmitModuleFormatOfFile2(file) >= 5 /* ES2015 */ ? esmTransform : cjsTransform; } function transformSourceFile(node) { if (node.isDeclarationFile) { @@ -121116,7 +123977,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 307 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 308 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile)); @@ -121146,7 +124007,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 263 /* ClassDeclaration */) { + } else if (node.parent.kind === 264 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -121163,7 +124024,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 263 /* ClassDeclaration */) { + } else if (node.parent.kind === 264 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -121194,12 +124055,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { + if (node.kind === 261 /* VariableDeclaration */ || node.kind === 209 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) { + } else if (node.kind === 173 /* PropertyDeclaration */ || node.kind === 212 /* PropertyAccessExpression */ || node.kind === 213 /* ElementAccessExpression */ || node.kind === 227 /* BinaryExpression */ || node.kind === 172 /* PropertySignature */ || node.kind === 170 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { + } else if (node.parent.kind === 264 /* ClassDeclaration */ || node.kind === 170 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -121216,7 +124077,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 178 /* SetAccessor */) { + if (node.kind === 179 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -121238,26 +124099,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 180 /* ConstructSignature */: + case 181 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 179 /* CallSignature */: + case 180 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 263 /* ClassDeclaration */) { + } else if (node.parent.kind === 264 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -121278,29 +124139,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: + case 181 /* ConstructSignature */: + case 186 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 179 /* CallSignature */: + case 180 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 264 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 262 /* FunctionDeclaration */: - case 184 /* FunctionType */: + case 263 /* FunctionDeclaration */: + case 185 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: + case 179 /* SetAccessor */: + case 178 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -121309,40 +124170,40 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 200 /* MappedType */: + case 201 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 186 /* ConstructorType */: + case 181 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 179 /* CallSignature */: + case 180 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 264 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 184 /* FunctionType */: - case 262 /* FunctionDeclaration */: + case 185 /* FunctionType */: + case 263 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 195 /* InferType */: + case 196 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -121384,37 +124245,37 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function createGetIsolatedDeclarationErrors(resolver) { const relatedSuggestionByDeclarationKind = { - [219 /* ArrowFunction */]: Diagnostics.Add_a_return_type_to_the_function_expression, - [218 /* FunctionExpression */]: Diagnostics.Add_a_return_type_to_the_function_expression, - [174 /* MethodDeclaration */]: Diagnostics.Add_a_return_type_to_the_method, - [177 /* GetAccessor */]: Diagnostics.Add_a_return_type_to_the_get_accessor_declaration, - [178 /* SetAccessor */]: Diagnostics.Add_a_type_to_parameter_of_the_set_accessor_declaration, - [262 /* FunctionDeclaration */]: Diagnostics.Add_a_return_type_to_the_function_declaration, - [180 /* ConstructSignature */]: Diagnostics.Add_a_return_type_to_the_function_declaration, - [169 /* Parameter */]: Diagnostics.Add_a_type_annotation_to_the_parameter_0, - [260 /* VariableDeclaration */]: Diagnostics.Add_a_type_annotation_to_the_variable_0, - [172 /* PropertyDeclaration */]: Diagnostics.Add_a_type_annotation_to_the_property_0, - [171 /* PropertySignature */]: Diagnostics.Add_a_type_annotation_to_the_property_0, - [277 /* ExportAssignment */]: Diagnostics.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it + [220 /* ArrowFunction */]: Diagnostics.Add_a_return_type_to_the_function_expression, + [219 /* FunctionExpression */]: Diagnostics.Add_a_return_type_to_the_function_expression, + [175 /* MethodDeclaration */]: Diagnostics.Add_a_return_type_to_the_method, + [178 /* GetAccessor */]: Diagnostics.Add_a_return_type_to_the_get_accessor_declaration, + [179 /* SetAccessor */]: Diagnostics.Add_a_type_to_parameter_of_the_set_accessor_declaration, + [263 /* FunctionDeclaration */]: Diagnostics.Add_a_return_type_to_the_function_declaration, + [181 /* ConstructSignature */]: Diagnostics.Add_a_return_type_to_the_function_declaration, + [170 /* Parameter */]: Diagnostics.Add_a_type_annotation_to_the_parameter_0, + [261 /* VariableDeclaration */]: Diagnostics.Add_a_type_annotation_to_the_variable_0, + [173 /* PropertyDeclaration */]: Diagnostics.Add_a_type_annotation_to_the_property_0, + [172 /* PropertySignature */]: Diagnostics.Add_a_type_annotation_to_the_property_0, + [278 /* ExportAssignment */]: Diagnostics.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it }; const errorByDeclarationKind = { - [218 /* FunctionExpression */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [262 /* FunctionDeclaration */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [219 /* ArrowFunction */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [174 /* MethodDeclaration */]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [180 /* ConstructSignature */]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [177 /* GetAccessor */]: Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [178 /* SetAccessor */]: Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, - [169 /* Parameter */]: Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, - [260 /* VariableDeclaration */]: Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, - [172 /* PropertyDeclaration */]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, - [171 /* PropertySignature */]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, - [167 /* ComputedPropertyName */]: Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations, - [305 /* SpreadAssignment */]: Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, - [304 /* ShorthandPropertyAssignment */]: Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, - [209 /* ArrayLiteralExpression */]: Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, - [277 /* ExportAssignment */]: Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations, - [230 /* SpreadElement */]: Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations + [219 /* FunctionExpression */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [263 /* FunctionDeclaration */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [220 /* ArrowFunction */]: Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [175 /* MethodDeclaration */]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [181 /* ConstructSignature */]: Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + [178 /* GetAccessor */]: Diagnostics.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [179 /* SetAccessor */]: Diagnostics.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [170 /* Parameter */]: Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [261 /* VariableDeclaration */]: Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [173 /* PropertyDeclaration */]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [172 /* PropertySignature */]: Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + [168 /* ComputedPropertyName */]: Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations, + [306 /* SpreadAssignment */]: Diagnostics.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + [305 /* ShorthandPropertyAssignment */]: Diagnostics.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + [210 /* ArrayLiteralExpression */]: Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + [278 /* ExportAssignment */]: Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + [231 /* SpreadElement */]: Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations }; return getDiagnostic2; function getDiagnostic2(node) { @@ -121427,32 +124288,32 @@ function createGetIsolatedDeclarationErrors(resolver) { } Debug.type(node); switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return createAccessorTypeError(node); - case 167 /* ComputedPropertyName */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: + case 168 /* ComputedPropertyName */: + case 305 /* ShorthandPropertyAssignment */: + case 306 /* SpreadAssignment */: return createObjectLiteralError(node); - case 209 /* ArrayLiteralExpression */: - case 230 /* SpreadElement */: + case 210 /* ArrayLiteralExpression */: + case 231 /* SpreadElement */: return createArrayLiteralError(node); - case 174 /* MethodDeclaration */: - case 180 /* ConstructSignature */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 181 /* ConstructSignature */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: return createReturnTypeError(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return createBindingElementError(node); - case 172 /* PropertyDeclaration */: - case 260 /* VariableDeclaration */: + case 173 /* PropertyDeclaration */: + case 261 /* VariableDeclaration */: return createVariableOrPropertyError(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return createParameterError(node); - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return createExpressionError(node.initializer); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return createClassExpressionError(node); default: assertType(node); @@ -121525,11 +124386,11 @@ function createGetIsolatedDeclarationErrors(resolver) { if (isSetAccessor(node.parent)) { return createAccessorTypeError(node.parent); } - const addUndefined = resolver.requiresAddingImplicitUndefined(node); + const addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent); if (!addUndefined && node.initializer) { return createExpressionError(node.initializer); } - const message = addUndefined ? Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations : errorByDeclarationKind[node.kind]; + const message = addUndefined ? Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations : errorByDeclarationKind[node.kind]; const diag2 = createDiagnosticForNode(node, message); const targetStr = getTextOfNode( node.name, @@ -121580,19 +124441,19 @@ function createGetIsolatedDeclarationErrors(resolver) { function getDeclarationDiagnostics(host, resolver, file) { const compilerOptions = host.getCompilerOptions(); const files = filter(getSourceFilesToEmit(host, file), isSourceFileNotJson); - const result = transformNodes( + return contains(files, file) ? transformNodes( resolver, host, factory, compilerOptions, - file ? contains(files, file) ? [file] : emptyArray : files, + [file], [transformDeclarations], /*allowDtsFiles*/ false - ); - return result.diagnostics; + ).diagnostics : void 0; } -var declarationEmitNodeBuilderFlags = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 1 /* AllowUnresolvedNames */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */; +var declarationEmitNodeBuilderFlags = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */; +var declarationEmitInternalNodeBuilderFlags = 8 /* AllowUnresolvedNames */; function transformDeclarations(context) { const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); let getSymbolAccessibilityDiagnostic = throwDiagnostic; @@ -121607,6 +124468,7 @@ function transformDeclarations(context) { let suppressNewDiagnosticContexts; const { factory: factory2 } = context; const host = context.getEmitHost(); + let restoreFallbackNode = () => void 0; const symbolTracker = { trackSymbol, reportInaccessibleThisError, @@ -121618,7 +124480,19 @@ function transformDeclarations(context) { moduleResolverHost: host, reportNonlocalAugmentation, reportNonSerializableProperty, - reportInferenceFallback + reportInferenceFallback, + pushErrorFallbackNode(node) { + const currentFallback = errorFallbackNode; + const currentRestore = restoreFallbackNode; + restoreFallbackNode = () => { + restoreFallbackNode = currentRestore; + errorFallbackNode = currentFallback; + }; + errorFallbackNode = node; + }, + popErrorFallbackNode() { + restoreFallbackNode(); + } }; let errorNameNode; let errorFallbackNode; @@ -121644,6 +124518,7 @@ function transformDeclarations(context) { } function reportInferenceFallback(node) { if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return; + if (getSourceFileOfNode(node) !== currentSourceFile) return; if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) { reportExpandoFunctionErrors(node); } else { @@ -121688,7 +124563,10 @@ function transformDeclarations(context) { function reportPrivateInBaseOfClassExpression(propertyName) { if (errorNameNode || errorFallbackNode) { context.addDiagnostic( - createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName) + addRelatedInfo( + createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected, propertyName), + ...isVariableDeclaration((errorNameNode || errorFallbackNode).parent) ? [createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.Add_a_type_annotation_to_the_variable_0, errorDeclarationNameWithFallback())] : [] + ) ); } } @@ -121744,15 +124622,15 @@ function transformDeclarations(context) { diagnosticMessage: s.errorModuleName ? Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, errorNode: s.errorNode || sourceFile }; - const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, symbolTracker); + const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; return result; } function transformRoot(node) { - if (node.kind === 307 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 308 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 308 /* Bundle */) { + if (node.kind === 309 /* Bundle */) { isBundledEmit = true; rawReferencedFiles = []; rawTypeReferenceDirectives = []; @@ -121928,14 +124806,14 @@ function transformDeclarations(context) { if (name.kind === 80 /* Identifier */) { return name; } else { - if (name.kind === 207 /* ArrayBindingPattern */) { + if (name.kind === 208 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 232 /* OmittedExpression */) { + if (elem.kind === 233 /* OmittedExpression */) { return elem; } if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) { @@ -121951,7 +124829,7 @@ function transformDeclarations(context) { ); } } - function ensureParameter(p, modifierMask, type) { + function ensureParameter(p, modifierMask) { let oldDiag; if (!suppressNewDiagnosticContexts) { oldDiag = getSymbolAccessibilityDiagnostic; @@ -121965,7 +124843,6 @@ function transformDeclarations(context) { resolver.isOptionalParameter(p) ? p.questionToken || factory2.createToken(58 /* QuestionToken */) : void 0, ensureType( p, - type || p.type, /*ignorePrivate*/ true ), @@ -121990,44 +124867,34 @@ function transformDeclarations(context) { } return void 0; } - function ensureType(node, type, ignorePrivate) { + function ensureType(node, ignorePrivate) { if (!ignorePrivate && hasEffectiveModifier(node, 2 /* Private */)) { return; } if (shouldPrintWithInitializer(node)) { return; } - const shouldAddImplicitUndefined = node.kind === 169 /* Parameter */ && resolver.requiresAddingImplicitUndefined(node); - if (type && !shouldAddImplicitUndefined) { - return visitNode(type, visitDeclarationSubtree, isTypeNode); + if (!isExportAssignment(node) && !isBindingElement(node) && node.type && (!isParameter(node) || !resolver.requiresAddingImplicitUndefined(node, enclosingDeclaration))) { + return visitNode(node.type, visitDeclarationSubtree, isTypeNode); } + const oldErrorNameNode = errorNameNode; errorNameNode = node.name; let oldDiag; if (!suppressNewDiagnosticContexts) { oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); + if (canProduceDiagnostics(node)) { + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); + } } let typeNode; - switch (node.kind) { - case 169 /* Parameter */: - case 171 /* PropertySignature */: - case 172 /* PropertyDeclaration */: - case 208 /* BindingElement */: - case 260 /* VariableDeclaration */: - typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker); - break; - case 262 /* FunctionDeclaration */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 179 /* CallSignature */: - typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker); - break; - default: - Debug.assertNever(node); + if (hasInferredType(node)) { + typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); + } else if (isFunctionLike(node)) { + typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); + } else { + Debug.assertNever(node); } - errorNameNode = void 0; + errorNameNode = oldErrorNameNode; if (!suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; } @@ -122036,21 +124903,22 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 267 /* ModuleDeclaration */: - case 264 /* InterfaceDeclaration */: - case 263 /* ClassDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: + case 263 /* FunctionDeclaration */: + case 268 /* ModuleDeclaration */: + case 265 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 260 /* VariableDeclaration */: + // The following should be doing their own visibility checks based on filtering their members + case 261 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: + case 272 /* ImportEqualsDeclaration */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 278 /* ExportAssignment */: return false; - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -122096,13 +124964,7 @@ function transformDeclarations(context) { if (!isPrivate) { const valueParameter = getSetAccessorValueParameter(input); if (valueParameter) { - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, getAllAccessorDeclarations(isObjectLiteralExpression(input.parent) ? input.parent.properties : input.parent.members, input)); - newValueParameter = ensureParameter( - valueParameter, - /*modifierMask*/ - void 0, - accessorType - ); + newValueParameter = ensureParameter(valueParameter); } } if (!newValueParameter) { @@ -122134,9 +124996,9 @@ function transformDeclarations(context) { } return setCommentRange(updated, getCommentRange(original)); } - function rewriteModuleSpecifier(parent2, input) { + function rewriteModuleSpecifier2(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 267 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 268 /* ModuleDeclaration */ && parent2.kind !== 206 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -122149,14 +125011,14 @@ function transformDeclarations(context) { } function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 284 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, decl.modifiers, decl.isTypeOnly, decl.name, - factory2.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)) + factory2.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier2(decl, specifier)) ); } else { const oldDiag = getSymbolAccessibilityDiagnostic; @@ -122172,10 +125034,11 @@ function transformDeclarations(context) { decl, decl.modifiers, decl.importClause, - rewriteModuleSpecifier(decl, decl.moduleSpecifier), + rewriteModuleSpecifier2(decl, decl.moduleSpecifier), tryGetResolutionModeOverride(decl.attributes) ); } + const phaseModifier = decl.importClause.phaseModifier === 166 /* DeferKeyword */ ? void 0 : decl.importClause.phaseModifier; const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0; if (!decl.importClause.namedBindings) { return visibleDefaultBinding && factory2.updateImportDeclaration( @@ -122183,16 +125046,16 @@ function transformDeclarations(context) { decl.modifiers, factory2.updateImportClause( decl.importClause, - decl.importClause.isTypeOnly, + phaseModifier, visibleDefaultBinding, /*namedBindings*/ void 0 ), - rewriteModuleSpecifier(decl, decl.moduleSpecifier), + rewriteModuleSpecifier2(decl, decl.moduleSpecifier), tryGetResolutionModeOverride(decl.attributes) ); } - if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 275 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -122202,11 +125065,11 @@ function transformDeclarations(context) { decl.modifiers, factory2.updateImportClause( decl.importClause, - decl.importClause.isTypeOnly, + phaseModifier, visibleDefaultBinding, namedBindings ), - rewriteModuleSpecifier(decl, decl.moduleSpecifier), + rewriteModuleSpecifier2(decl, decl.moduleSpecifier), tryGetResolutionModeOverride(decl.attributes) ) : void 0; } @@ -122217,11 +125080,11 @@ function transformDeclarations(context) { decl.modifiers, factory2.updateImportClause( decl.importClause, - decl.importClause.isTypeOnly, + phaseModifier, visibleDefaultBinding, bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0 ), - rewriteModuleSpecifier(decl, decl.moduleSpecifier), + rewriteModuleSpecifier2(decl, decl.moduleSpecifier), tryGetResolutionModeOverride(decl.attributes) ); } @@ -122234,7 +125097,7 @@ function transformDeclarations(context) { decl.modifiers, /*importClause*/ void 0, - rewriteModuleSpecifier(decl, decl.moduleSpecifier), + rewriteModuleSpecifier2(decl, decl.moduleSpecifier), tryGetResolutionModeOverride(decl.attributes) ); } @@ -122282,15 +125145,17 @@ function transformDeclarations(context) { if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input)) { if (isolatedDeclarations) { - if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) { - context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations)); - return; - } else if ( - // Type declarations just need to double-check that the input computed name is an entity name expression - (isInterfaceDeclaration(input.parent) || isTypeLiteralNode(input.parent)) && !isEntityNameExpression(input.name.expression) - ) { - context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); - return; + if (!resolver.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) { + if (isClassDeclaration(input.parent) || isObjectLiteralExpression(input.parent)) { + context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations)); + return; + } else if ( + // Type declarations just need to double-check that the input computed name is an entity name expression + (isInterfaceDeclaration(input.parent) || isTypeLiteralNode(input.parent)) && !isEntityNameExpression(input.name.expression) + ) { + context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); + return; + } } } else if (!resolver.isLateBound(getParseTreeNode(input)) || !isEntityNameExpression(input.name.expression)) { return; @@ -122307,7 +125172,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 188 /* TypeLiteral */ || input.kind === 201 /* MappedType */) && input.parent.kind !== 266 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 2 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; @@ -122334,26 +125199,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 233 /* ExpressionWithTypeArguments */: { + case 234 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 183 /* TypeReference */: { + case 184 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 180 /* ConstructSignature */: + case 181 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), - ensureType(input, input.type) + ensureType(input) )); - case 176 /* Constructor */: { + case 177 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -122363,7 +125228,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 174 /* MethodDeclaration */: { + case 175 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -122378,31 +125243,30 @@ function transformDeclarations(context) { input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), - ensureType(input, input.type), + ensureType(input), /*body*/ void 0 ); return cleanup(sig); } - case 177 /* GetAccessor */: { + case 178 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ void 0 ); } - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, getAllAccessorDeclarations(isObjectLiteralExpression(input.parent) ? input.parent.properties : input.parent.members, input)); return cleanup(factory2.updateGetAccessorDeclaration( input, ensureModifiers(input), input.name, updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), - ensureType(input, accessorType), + ensureType(input), /*body*/ void 0 )); } - case 178 /* SetAccessor */: { + case 179 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -122418,7 +125282,7 @@ function transformDeclarations(context) { void 0 )); } - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -122430,10 +125294,10 @@ function transformDeclarations(context) { ensureModifiers(input), input.name, input.questionToken, - ensureType(input, input.type), + ensureType(input), ensureNoInitializer(input) )); - case 171 /* PropertySignature */: + case 172 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -122445,9 +125309,9 @@ function transformDeclarations(context) { ensureModifiers(input), input.name, input.questionToken, - ensureType(input, input.type) + ensureType(input) )); - case 173 /* MethodSignature */: { + case 174 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -122461,20 +125325,20 @@ function transformDeclarations(context) { input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), - ensureType(input, input.type) + ensureType(input) )); } - case 179 /* CallSignature */: { + case 180 /* CallSignature */: { return cleanup( factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), - ensureType(input, input.type) + ensureType(input) ) ); } - case 181 /* IndexSignature */: { + case 182 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -122482,7 +125346,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */) )); } - case 260 /* VariableDeclaration */: { + case 261 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -122493,11 +125357,11 @@ function transformDeclarations(context) { input.name, /*exclamationToken*/ void 0, - ensureType(input, input.type), + ensureType(input), ensureNoInitializer(input) )); } - case 168 /* TypeParameter */: { + case 169 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -122511,7 +125375,7 @@ function transformDeclarations(context) { } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 194 /* ConditionalType */: { + case 195 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -122525,7 +125389,7 @@ function transformDeclarations(context) { Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 184 /* FunctionType */: { + case 185 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode( input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), @@ -122533,7 +125397,7 @@ function transformDeclarations(context) { Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)) )); } - case 185 /* ConstructorType */: { + case 186 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode( input, ensureModifiers(input), @@ -122542,11 +125406,11 @@ function transformDeclarations(context) { Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)) )); } - case 205 /* ImportType */: { + case 206 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( input, - factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), + factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier2(input, input.argument.literal)), input.attributes, input.qualifier, visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode), @@ -122581,7 +125445,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */); + return node.parent.kind === 175 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -122589,7 +125453,7 @@ function transformDeclarations(context) { } if (shouldStripInternal(input)) return; switch (input.kind) { - case 278 /* ExportDeclaration */: { + case 279 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -122599,11 +125463,11 @@ function transformDeclarations(context) { input.modifiers, input.isTypeOnly, input.exportClause, - rewriteModuleSpecifier(input, input.moduleSpecifier), + rewriteModuleSpecifier2(input, input.moduleSpecifier), tryGetResolutionModeOverride(input.attributes) ); } - case 277 /* ExportAssignment */: { + case 278 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -122617,11 +125481,12 @@ function transformDeclarations(context) { errorNode: input }); errorFallbackNode = input; + const type = ensureType(input); const varDecl = factory2.createVariableDeclaration( newId, /*exclamationToken*/ void 0, - resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), + type, /*initializer*/ void 0 ); @@ -122665,10 +125530,10 @@ function transformDeclarations(context) { } if (shouldStripInternal(input)) return; switch (input.kind) { - case 271 /* ImportEqualsDeclaration */: { + case 272 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 272 /* ImportDeclaration */: { + case 273 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -122687,7 +125552,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 265 /* TypeAliasDeclaration */: { + case 266 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -122699,7 +125564,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 264 /* InterfaceDeclaration */: { + case 265 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -122709,7 +125574,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 262 /* FunctionDeclaration */: { + case 263 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -122718,7 +125583,7 @@ function transformDeclarations(context) { input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), - ensureType(input, input.type), + ensureType(input), /*body*/ void 0 )); @@ -122747,7 +125612,7 @@ function transformDeclarations(context) { return void 0; } getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); - const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags | -2147483648 /* NoSyntacticPrinter */, symbolTracker); + const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags | 2 /* NoSyntacticPrinter */, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr); @@ -122821,10 +125686,10 @@ function transformDeclarations(context) { return clean2; } } - case 267 /* ModuleDeclaration */: { + case 268 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 268 /* ModuleBlock */) { + if (inner && inner.kind === 269 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; @@ -122849,7 +125714,7 @@ function transformDeclarations(context) { return cleanup(updateModuleDeclarationAndKeyword( input, mods, - isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, + isExternalModuleAugmentation(input) ? rewriteModuleSpecifier2(input, input.name) : input.name, body )); } else { @@ -122868,7 +125733,7 @@ function transformDeclarations(context) { )); } } - case 263 /* ClassDeclaration */: { + case 264 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -122886,7 +125751,7 @@ function transformDeclarations(context) { ensureModifiers(param), param.name, param.questionToken, - ensureType(param, param.type), + ensureType(param), ensureNoInitializer(param) ), param @@ -122907,11 +125772,7 @@ function transformDeclarations(context) { elem.name, /*questionOrExclamationToken*/ void 0, - ensureType( - elem, - /*type*/ - void 0 - ), + ensureType(elem), /*initializer*/ void 0 )); @@ -122935,7 +125796,8 @@ function transformDeclarations(context) { void 0 ) ] : void 0; - const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); + const lateIndexes = resolver.createLateBoundIndexSignatures(input, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); + const memberNodes = concatenate(concatenate(concatenate(privateIdentifier, lateIndexes), parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); const members = factory2.createNodeArray(memberNodes); const extendsClause = getEffectiveBaseTypeNode(input); if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 106 /* NullKeyword */) { @@ -122950,7 +125812,7 @@ function transformDeclarations(context) { newId, /*exclamationToken*/ void 0, - resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), + resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker), /*initializer*/ void 0 ); @@ -122988,10 +125850,10 @@ function transformDeclarations(context) { )); } } - case 243 /* VariableStatement */: { + case 244 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 266 /* EnumDeclaration */: { + case 267 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration( input, factory2.createNodeArray(ensureModifiers(input)), @@ -123018,7 +125880,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 267 /* ModuleDeclaration */) { + if (input.kind === 268 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -123049,7 +125911,7 @@ function transformDeclarations(context) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 232 /* OmittedExpression */) { + if (e.kind === 233 /* OmittedExpression */) { return; } if (e.name) { @@ -123061,11 +125923,7 @@ function transformDeclarations(context) { e.name, /*exclamationToken*/ void 0, - ensureType( - e, - /*type*/ - void 0 - ), + ensureType(e), /*initializer*/ void 0 ); @@ -123108,25 +125966,13 @@ function transformDeclarations(context) { function ensureModifierFlags(node) { let mask2 = 131071 /* All */ ^ (1 /* Public */ | 1024 /* Async */ | 16 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 128 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 307 /* SourceFile */; + const parentIsFile = node.parent.kind === 308 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 128 /* Ambient */; additions = 0 /* None */; } return maskModifierFlags(node, mask2, additions); } - function getTypeAnnotationFromAllAccessorDeclarations(node, accessors) { - let accessorType = getTypeAnnotationFromAccessor(node); - if (!accessorType && node !== accessors.firstAccessor) { - accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor); - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.firstAccessor); - } - if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) { - accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor); - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.secondAccessor); - } - return accessorType; - } function transformHeritageClauses(nodes) { return factory2.createNodeArray(filter( map(nodes, (clause) => factory2.updateHeritageClause( @@ -123144,7 +125990,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 264 /* InterfaceDeclaration */) { + if (node.kind === 265 /* InterfaceDeclaration */) { return true; } return false; @@ -123162,59 +126008,54 @@ function maskModifierFlags(node, modifierMask = 131071 /* All */ ^ 1 /* Public * } return flags; } -function getTypeAnnotationFromAccessor(accessor) { - if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; - } -} function canHaveLiteralInitializer(node) { switch (node.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: return !hasEffectiveModifier(node, 2 /* Private */); - case 169 /* Parameter */: - case 260 /* VariableDeclaration */: + case 170 /* Parameter */: + case 261 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 267 /* ModuleDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 264 /* InterfaceDeclaration */: - case 263 /* ClassDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - case 243 /* VariableStatement */: - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: + case 263 /* FunctionDeclaration */: + case 268 /* ModuleDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 265 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: + case 244 /* VariableStatement */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 278 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 180 /* ConstructSignature */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 260 /* VariableDeclaration */: - case 168 /* TypeParameter */: - case 233 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: - case 194 /* ConditionalType */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 205 /* ImportType */: + case 181 /* ConstructSignature */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 182 /* IndexSignature */: + case 261 /* VariableDeclaration */: + case 169 /* TypeParameter */: + case 234 /* ExpressionWithTypeArguments */: + case 184 /* TypeReference */: + case 195 /* ConditionalType */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 206 /* ImportType */: return true; } return false; @@ -123223,17 +126064,20 @@ function isProcessedComponent(node) { // src/compiler/transformer.ts function getModuleTransformer(moduleKind) { switch (moduleKind) { + case 200 /* Preserve */: + return transformECMAScriptModule; case 99 /* ESNext */: case 7 /* ES2022 */: case 6 /* ES2020 */: case 5 /* ES2015 */: - case 200 /* Preserve */: - return transformECMAScriptModule; - case 4 /* System */: - return transformSystemModule; case 100 /* Node16 */: + case 101 /* Node18 */: + case 102 /* Node20 */: case 199 /* NodeNext */: - return transformNodeModule; + case 1 /* CommonJS */: + return transformImpliedNodeFormatDependentModule; + case 4 /* System */: + return transformSystemModule; default: return transformModule; } @@ -123321,7 +126165,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a, _b; - const enabledSyntaxKindFeatures = new Array(357 /* Count */); + const enabledSyntaxKindFeatures = new Array(359 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -123400,7 +126244,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 307 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 308 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -123657,16 +126501,16 @@ function isBuildInfoFile(file) { function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, forceDtsEmit = false, onlyBuildInfo, includeBuildInfo) { const sourceFiles = isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile, forceDtsEmit); const options = host.getCompilerOptions(); - if (options.outFile) { - if (sourceFiles.length) { - const bundle = factory.createBundle(sourceFiles); - const result = action(getOutputPathsFor(bundle, host, forceDtsEmit), bundle); - if (result) { - return result; + if (!onlyBuildInfo) { + if (options.outFile) { + if (sourceFiles.length) { + const bundle = factory.createBundle(sourceFiles); + const result = action(getOutputPathsFor(bundle, host, forceDtsEmit), bundle); + if (result) { + return result; + } } - } - } else { - if (!onlyBuildInfo) { + } else { for (const sourceFile of sourceFiles) { const result = action(getOutputPathsFor(sourceFile, host, forceDtsEmit), sourceFile); if (result) { @@ -123674,19 +126518,19 @@ function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, forceDt } } } - if (includeBuildInfo) { - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - if (buildInfoPath) return action( - { buildInfoPath }, - /*sourceFileOrBundle*/ - void 0 - ); - } + } + if (includeBuildInfo) { + const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); + if (buildInfoPath) return action( + { buildInfoPath }, + /*sourceFileOrBundle*/ + void 0 + ); } } function getTsBuildInfoEmitOutputFilePath(options) { const configFile = options.configFilePath; - if (!isIncrementalCompilation(options)) return void 0; + if (!canEmitTsBuildInfo(options)) return void 0; if (options.tsBuildInfoFile) return options.tsBuildInfoFile; const outPath = options.outFile; let buildInfoExtensionLess; @@ -123704,18 +126548,20 @@ function getTsBuildInfoEmitOutputFilePath(options) { } return buildInfoExtensionLess + ".tsbuildinfo" /* TsBuildInfo */; } +function canEmitTsBuildInfo(options) { + return isIncrementalCompilation(options) || !!options.tscBuild; +} function getOutputPathsForBundle(options, forceDtsPaths) { const outPath = options.outFile; const jsFilePath = options.emitDeclarationOnly ? void 0 : outPath; const sourceMapFilePath = jsFilePath && getSourceMapFilePath(jsFilePath, options); const declarationFilePath = forceDtsPaths || getEmitDeclarations(options) ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : void 0; const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : void 0; - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath }; + return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath }; } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 308 /* Bundle */) { + if (sourceFile.kind === 309 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -123725,7 +126571,7 @@ function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const sourceMapFilePath = !jsFilePath || isJsonSourceFile(sourceFile) ? void 0 : getSourceMapFilePath(jsFilePath, options); const declarationFilePath = forceDtsPaths || getEmitDeclarations(options) && !isJsonFile ? getDeclarationEmitOutputFilePath(sourceFile.fileName, host) : void 0; const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : void 0; - return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath: void 0 }; + return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath }; } } function getSourceMapFilePath(jsFilePath, options) { @@ -123774,7 +126620,7 @@ function createAddOutput() { } } function getSingleOutputFileNames(configFile, addOutput) { - const { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath } = getOutputPathsForBundle( + const { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath } = getOutputPathsForBundle( configFile.options, /*forceDtsPaths*/ false @@ -123783,7 +126629,6 @@ function getSingleOutputFileNames(configFile, addOutput) { addOutput(sourceMapFilePath); addOutput(declarationFilePath); addOutput(declarationMapPath); - addOutput(buildInfoPath); } function getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory2) { if (isDeclarationFileName(inputFileName)) return; @@ -123834,8 +126679,8 @@ function getAllProjectOutputs(configFile, ignoreCase) { for (const inputFileName of configFile.fileNames) { getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory2); } - addOutput(getTsBuildInfoEmitOutputFilePath(configFile.options)); } + addOutput(getTsBuildInfoEmitOutputFilePath(configFile.options)); return getOutputs(); } function getOutputFileNames(commandLine, inputFileName, ignoreCase) { @@ -123875,7 +126720,7 @@ function getFirstProjectOutput(configFile, ignoreCase) { function emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) { return !!forceDtsEmit && !!emitOnly; } -function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit) { +function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit, skipBuildInfo) { var compilerOptions = host.getCompilerOptions(); var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions) ? [] : void 0; var emittedFilesList = compilerOptions.listEmittedFiles ? [] : void 0; @@ -123891,7 +126736,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit), forceDtsEmit, onlyBuildInfo, - !targetSourceFile + !targetSourceFile && !skipBuildInfo ); exit(); return { @@ -123913,15 +126758,12 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla (_f = tracing) == null ? void 0 : _f.pop(); } function emitBuildInfo(buildInfoPath) { - if (!buildInfoPath || targetSourceFile || emitSkipped) return; + if (!buildInfoPath || targetSourceFile) return; if (host.isEmitBlocked(buildInfoPath)) { emitSkipped = true; return; } - const buildInfo = host.getBuildInfo() || createBuildInfo( - /*program*/ - void 0 - ); + const buildInfo = host.getBuildInfo() || { version }; writeFile( host, emitterDiagnostics, @@ -123945,7 +126787,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } (isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach( (sourceFile) => { - if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile); + if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile); } ); const transform2 = transformNodes( @@ -123963,6 +126805,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla newLine: compilerOptions.newLine, noEmitHelpers: compilerOptions.noEmitHelpers, module: getEmitModuleKind(compilerOptions), + moduleResolution: getEmitModuleResolutionKind(compilerOptions), target: getEmitScriptTarget(compilerOptions), sourceMap: compilerOptions.sourceMap, inlineSourceMap: compilerOptions.inlineSourceMap, @@ -123997,7 +126840,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson); const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit; filesForEmit.forEach((sourceFile) => { - if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)) { + if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) { collectLinkedAliases(sourceFile); } }); @@ -124025,8 +126868,9 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla newLine: compilerOptions.newLine, noEmitHelpers: true, module: compilerOptions.module, + moduleResolution: compilerOptions.moduleResolution, target: compilerOptions.target, - sourceMap: !forceDtsEmit && compilerOptions.declarationMap, + sourceMap: emitOnly !== 2 /* BuilderSignature */ && compilerOptions.declarationMap, inlineSourceMap: compilerOptions.inlineSourceMap, extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, @@ -124040,7 +126884,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode }); - printSourceFileOrBundle( + const dtsWritten = printSourceFileOrBundle( declarationFilePath, declarationMapPath, declarationTransform, @@ -124054,7 +126898,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } ); if (emittedFilesList) { - emittedFilesList.push(declarationFilePath); + if (dtsWritten) emittedFilesList.push(declarationFilePath); if (declarationMapPath) { emittedFilesList.push(declarationMapPath); } @@ -124083,6 +126927,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla forEachChild(node, collectLinkedAliases); } function markLinkedReferences(file) { + if (isSourceFileJS(file)) return; forEachChildRecursively(file, (n) => { if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32 /* Export */)) return "skip"; if (isImportDeclaration(n)) return "skip"; @@ -124091,8 +126936,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 308 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 307 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 309 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 308 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -124145,11 +126990,13 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.writeLine(); } const text = writer.getText(); - writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos, diagnostics: transform2.diagnostics }); + const data = { sourceMapUrlPos, diagnostics: transform2.diagnostics }; + writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data); writer.clear(); + return !data.skippedDtsWrite; } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 307 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 308 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -124202,9 +127049,6 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla return encodeURI(sourceMapFile); } } -function createBuildInfo(program) { - return { program, version }; -} function getBuildInfoText(buildInfo) { return JSON.stringify(buildInfo); } @@ -124249,7 +127093,10 @@ var notImplementedResolver = { getJsxFragmentFactoryEntity: notImplemented, isBindingCapturedByNode: notImplemented, getDeclarationStatementsForSourceFile: notImplemented, - isImportRequiredByAugmentation: notImplemented + isImportRequiredByAugmentation: notImplemented, + isDefinitelyReferenceToGlobalSymbolObject: notImplemented, + createLateBoundIndexSignatures: notImplemented, + symbolToDeclarations: notImplemented }; var createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({})); var createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true })); @@ -124341,9 +127188,9 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: return printFile(node); - case 308 /* Bundle */: + case 309 /* Bundle */: return printBundle(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -124534,6 +127381,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (onEmitNode !== noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { return pipelineEmitWithNotification; } + // falls through case 1 /* Substitution */: if (substituteNode !== noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node) || node) !== node) { if (currentParenthesizerRule) { @@ -124541,14 +127389,17 @@ function createPrinter(printerOptions = {}, handlers = {}) { } return pipelineEmitWithSubstitution; } + // falls through case 2 /* Comments */: if (shouldEmitComments(node)) { return pipelineEmitWithComments; } + // falls through case 3 /* SourceMaps */: if (shouldEmitSourceMaps(node)) { return pipelineEmitWithSourceMaps; } + // falls through case 4 /* Emit */: return pipelineEmitWithHint; default: @@ -124600,6 +127451,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } if (hint === 4 /* Unspecified */) { switch (node.kind) { + // Pseudo-literals case 16 /* TemplateHead */: case 17 /* TemplateMiddle */: case 18 /* TemplateTail */: @@ -124608,295 +127460,319 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*jsxAttributeEscape*/ false ); + // Identifiers case 80 /* Identifier */: return emitIdentifier(node); + // PrivateIdentifiers case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 166 /* QualifiedName */: + // Parse tree nodes + // Names + case 167 /* QualifiedName */: return emitQualifiedName(node); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 168 /* TypeParameter */: + // Signature elements + case 169 /* TypeParameter */: return emitTypeParameter(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return emitParameter(node); - case 170 /* Decorator */: + case 171 /* Decorator */: return emitDecorator(node); - case 171 /* PropertySignature */: + // Type members + case 172 /* PropertySignature */: return emitPropertySignature(node); - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 173 /* MethodSignature */: + case 174 /* MethodSignature */: return emitMethodSignature(node); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return emitAccessorDeclaration(node); - case 179 /* CallSignature */: + case 180 /* CallSignature */: return emitCallSignature(node); - case 180 /* ConstructSignature */: + case 181 /* ConstructSignature */: return emitConstructSignature(node); - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: return emitIndexSignature(node); - case 182 /* TypePredicate */: + // Types + case 183 /* TypePredicate */: return emitTypePredicate(node); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return emitTypeReference(node); - case 184 /* FunctionType */: + case 185 /* FunctionType */: return emitFunctionType(node); - case 185 /* ConstructorType */: + case 186 /* ConstructorType */: return emitConstructorType(node); - case 186 /* TypeQuery */: + case 187 /* TypeQuery */: return emitTypeQuery(node); - case 187 /* TypeLiteral */: + case 188 /* TypeLiteral */: return emitTypeLiteral(node); - case 188 /* ArrayType */: + case 189 /* ArrayType */: return emitArrayType(node); - case 189 /* TupleType */: + case 190 /* TupleType */: return emitTupleType(node); - case 190 /* OptionalType */: + case 191 /* OptionalType */: return emitOptionalType(node); - case 192 /* UnionType */: + // SyntaxKind.RestType is handled below + case 193 /* UnionType */: return emitUnionType(node); - case 193 /* IntersectionType */: + case 194 /* IntersectionType */: return emitIntersectionType(node); - case 194 /* ConditionalType */: + case 195 /* ConditionalType */: return emitConditionalType(node); - case 195 /* InferType */: + case 196 /* InferType */: return emitInferType(node); - case 196 /* ParenthesizedType */: + case 197 /* ParenthesizedType */: return emitParenthesizedType(node); - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: + case 198 /* ThisType */: return emitThisType(); - case 198 /* TypeOperator */: + case 199 /* TypeOperator */: return emitTypeOperator(node); - case 199 /* IndexedAccessType */: + case 200 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 200 /* MappedType */: + case 201 /* MappedType */: return emitMappedType(node); - case 201 /* LiteralType */: + case 202 /* LiteralType */: return emitLiteralType(node); - case 202 /* NamedTupleMember */: + case 203 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: + case 204 /* TemplateLiteralType */: return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: + case 205 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 205 /* ImportType */: + case 206 /* ImportType */: return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: + // Binding patterns + case 207 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: + case 208 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return emitBindingElement(node); - case 239 /* TemplateSpan */: + // Misc + case 240 /* TemplateSpan */: return emitTemplateSpan(node); - case 240 /* SemicolonClassElement */: + case 241 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 241 /* Block */: + // Statements + case 242 /* Block */: return emitBlock(node); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return emitVariableStatement(node); - case 242 /* EmptyStatement */: + case 243 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return emitExpressionStatement(node); - case 245 /* IfStatement */: + case 246 /* IfStatement */: return emitIfStatement(node); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return emitDoStatement(node); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return emitWhileStatement(node); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return emitForStatement(node); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return emitForInStatement(node); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return emitForOfStatement(node); - case 251 /* ContinueStatement */: + case 252 /* ContinueStatement */: return emitContinueStatement(node); - case 252 /* BreakStatement */: + case 253 /* BreakStatement */: return emitBreakStatement(node); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return emitReturnStatement(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return emitWithStatement(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return emitSwitchStatement(node); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return emitLabeledStatement(node); - case 257 /* ThrowStatement */: + case 258 /* ThrowStatement */: return emitThrowStatement(node); - case 258 /* TryStatement */: + case 259 /* TryStatement */: return emitTryStatement(node); - case 259 /* DebuggerStatement */: + case 260 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 260 /* VariableDeclaration */: + // Declarations + case 261 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 261 /* VariableDeclarationList */: + case 262 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return emitClassDeclaration(node); - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 268 /* ModuleBlock */: + case 269 /* ModuleBlock */: return emitModuleBlock(node); - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return emitCaseBlock(node); - case 270 /* NamespaceExportDeclaration */: + case 271 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return emitImportDeclaration(node); - case 273 /* ImportClause */: + case 274 /* ImportClause */: return emitImportClause(node); - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: return emitNamespaceImport(node); - case 280 /* NamespaceExport */: + case 281 /* NamespaceExport */: return emitNamespaceExport(node); - case 275 /* NamedImports */: + case 276 /* NamedImports */: return emitNamedImports(node); - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return emitImportSpecifier(node); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return emitExportAssignment(node); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return emitExportDeclaration(node); - case 279 /* NamedExports */: + case 280 /* NamedExports */: return emitNamedExports(node); - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: return emitExportSpecifier(node); - case 300 /* ImportAttributes */: + case 301 /* ImportAttributes */: return emitImportAttributes(node); - case 301 /* ImportAttribute */: + case 302 /* ImportAttribute */: return emitImportAttribute(node); - case 282 /* MissingDeclaration */: + case 283 /* MissingDeclaration */: return; - case 283 /* ExternalModuleReference */: + // Module references + case 284 /* ExternalModuleReference */: return emitExternalModuleReference(node); + // JSX (non-expression) case 12 /* JsxText */: return emitJsxText(node); - case 286 /* JsxOpeningElement */: - case 289 /* JsxOpeningFragment */: + case 287 /* JsxOpeningElement */: + case 290 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 287 /* JsxClosingElement */: - case 290 /* JsxClosingFragment */: + case 288 /* JsxClosingElement */: + case 291 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 291 /* JsxAttribute */: + case 292 /* JsxAttribute */: return emitJsxAttribute(node); - case 292 /* JsxAttributes */: + case 293 /* JsxAttributes */: return emitJsxAttributes(node); - case 293 /* JsxSpreadAttribute */: + case 294 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 294 /* JsxExpression */: + case 295 /* JsxExpression */: return emitJsxExpression(node); - case 295 /* JsxNamespacedName */: + case 296 /* JsxNamespacedName */: return emitJsxNamespacedName(node); - case 296 /* CaseClause */: + // Clauses + case 297 /* CaseClause */: return emitCaseClause(node); - case 297 /* DefaultClause */: + case 298 /* DefaultClause */: return emitDefaultClause(node); - case 298 /* HeritageClause */: + case 299 /* HeritageClause */: return emitHeritageClause(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return emitCatchClause(node); - case 303 /* PropertyAssignment */: + // Property assignments + case 304 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 306 /* EnumMember */: + // Enum + case 307 /* EnumMember */: return emitEnumMember(node); - case 307 /* SourceFile */: + // Top-level nodes + case 308 /* SourceFile */: return emitSourceFile(node); - case 308 /* Bundle */: + case 309 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 309 /* JSDocTypeExpression */: + // JSDoc nodes (only used in codefixes currently) + case 310 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 310 /* JSDocNameReference */: + case 311 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 312 /* JSDocAllType */: + case 313 /* JSDocAllType */: return writePunctuation("*"); - case 313 /* JSDocUnknownType */: + case 314 /* JSDocUnknownType */: return writePunctuation("?"); - case 314 /* JSDocNullableType */: + case 315 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 315 /* JSDocNonNullableType */: + case 316 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 316 /* JSDocOptionalType */: + case 317 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 317 /* JSDocFunctionType */: + case 318 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 318 /* JSDocVariadicType */: + case 192 /* RestType */: + case 319 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 319 /* JSDocNamepathType */: + case 320 /* JSDocNamepathType */: return; - case 320 /* JSDoc */: + case 321 /* JSDoc */: return emitJSDoc(node); - case 322 /* JSDocTypeLiteral */: + case 323 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 323 /* JSDocSignature */: + case 324 /* JSDocSignature */: return emitJSDocSignature(node); - case 327 /* JSDocTag */: - case 332 /* JSDocClassTag */: - case 337 /* JSDocOverrideTag */: + case 328 /* JSDocTag */: + case 333 /* JSDocClassTag */: + case 338 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 328 /* JSDocAugmentsTag */: - case 329 /* JSDocImplementsTag */: + case 329 /* JSDocAugmentsTag */: + case 330 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 330 /* JSDocAuthorTag */: - case 331 /* JSDocDeprecatedTag */: + case 331 /* JSDocAuthorTag */: + case 332 /* JSDocDeprecatedTag */: return; - case 333 /* JSDocPublicTag */: - case 334 /* JSDocPrivateTag */: - case 335 /* JSDocProtectedTag */: - case 336 /* JSDocReadonlyTag */: + // SyntaxKind.JSDocClassTag (see JSDocTag, above) + case 334 /* JSDocPublicTag */: + case 335 /* JSDocPrivateTag */: + case 336 /* JSDocProtectedTag */: + case 337 /* JSDocReadonlyTag */: return; - case 338 /* JSDocCallbackTag */: + case 339 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 339 /* JSDocOverloadTag */: + case 340 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 341 /* JSDocParameterTag */: - case 348 /* JSDocPropertyTag */: + // SyntaxKind.JSDocEnumTag (see below) + case 342 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 340 /* JSDocEnumTag */: - case 342 /* JSDocReturnTag */: - case 343 /* JSDocThisTag */: - case 344 /* JSDocTypeTag */: - case 349 /* JSDocThrowsTag */: - case 350 /* JSDocSatisfiesTag */: + case 341 /* JSDocEnumTag */: + case 343 /* JSDocReturnTag */: + case 344 /* JSDocThisTag */: + case 345 /* JSDocTypeTag */: + case 350 /* JSDocThrowsTag */: + case 351 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 346 /* JSDocTypedefTag */: + case 347 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 347 /* JSDocSeeTag */: + case 348 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 351 /* JSDocImportTag */: + case 352 /* JSDocImportTag */: return emitJSDocImportTag(node); - case 353 /* NotEmittedStatement */: + // SyntaxKind.JSDocPropertyTag (see JSDocParameterTag, above) + // Transformation nodes + case 354 /* NotEmittedStatement */: + case 355 /* NotEmittedTypeElement */: return; } if (isExpression(node)) { @@ -124914,6 +127790,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } if (hint === 1 /* Expression */) { switch (node.kind) { + // Literals case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: return emitNumericOrBigIntLiteral(node); @@ -124925,87 +127802,92 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*jsxAttributeEscape*/ false ); + // Identifiers case 80 /* Identifier */: return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: + // Expressions + case 210 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return emitCallExpression(node); - case 214 /* NewExpression */: + case 215 /* NewExpression */: return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: + case 217 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: return emitFunctionExpression(node); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return emitArrowFunction(node); - case 220 /* DeleteExpression */: + case 221 /* DeleteExpression */: return emitDeleteExpression(node); - case 221 /* TypeOfExpression */: + case 222 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 222 /* VoidExpression */: + case 223 /* VoidExpression */: return emitVoidExpression(node); - case 223 /* AwaitExpression */: + case 224 /* AwaitExpression */: return emitAwaitExpression(node); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return emitBinaryExpression(node); - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return emitConditionalExpression(node); - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: return emitTemplateExpression(node); - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: return emitYieldExpression(node); - case 230 /* SpreadElement */: + case 231 /* SpreadElement */: return emitSpreadElement(node); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return emitClassExpression(node); - case 232 /* OmittedExpression */: + case 233 /* OmittedExpression */: return; - case 234 /* AsExpression */: + case 235 /* AsExpression */: return emitAsExpression(node); - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: return emitNonNullExpression(node); - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return emitMetaProperty(node); - case 237 /* SyntheticExpression */: + case 238 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 282 /* MissingDeclaration */: + case 283 /* MissingDeclaration */: return; - case 284 /* JsxElement */: + // JSX + case 285 /* JsxElement */: return emitJsxElement(node); - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 288 /* JsxFragment */: + case 289 /* JsxFragment */: return emitJsxFragment(node); - case 352 /* SyntaxList */: + // Synthesized list + case 353 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 353 /* NotEmittedStatement */: + // Transformation nodes + case 354 /* NotEmittedStatement */: return; - case 354 /* PartiallyEmittedExpression */: + case 356 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 355 /* CommaListExpression */: + case 357 /* CommaListExpression */: return emitCommaList(node); - case 356 /* SyntheticReferenceExpression */: + case 358 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -125029,7 +127911,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 308 /* Bundle */ ? node : void 0; + const bundle = node.kind === 309 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -125066,7 +127948,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function getSortedEmitHelpers(node) { const helpers = getEmitHelpers(node); - return helpers && stableSort(helpers, compareEmitHelpers); + return helpers && toSorted(helpers, compareEmitHelpers); } function emitNumericOrBigIntLiteral(node) { emitLiteral( @@ -125076,7 +127958,13 @@ function createPrinter(printerOptions = {}, handlers = {}) { ); } function emitLiteral(node, jsxAttributeEscape) { - const text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); + const text = getLiteralTextOfNode( + node, + /*sourceFile*/ + void 0, + printerOptions.neverAsciiEscape, + jsxAttributeEscape + ); if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) { writeLiteral(text); } else { @@ -125104,7 +127992,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { nonEscapingWrite(`}`); } function emitTabStop(hint, node, snippet) { - Debug.assert(node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.`); + Debug.assert(node.kind === 243 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.`); Debug.assert(hint !== 5 /* EmbeddedStatement */, `A tab stop cannot be attached to an embedded statement.`); nonEscapingWrite(`$${snippet.order}`); } @@ -125167,7 +128055,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 317 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 318 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -125240,7 +128128,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*allowDecorators*/ true ); - const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; + const token = node.kind === 178 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -125557,6 +128445,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (isNumericLiteral(expression)) { const text = getLiteralTextOfNode( expression, + /*sourceFile*/ + void 0, /*neverAsciiEscape*/ true, /*jsxAttributeEscape*/ @@ -125684,7 +128574,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); + return operand.kind === 225 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -125939,7 +128829,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 245 /* IfStatement */) { + if (node.elseStatement.kind === 246 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -126014,7 +128904,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 261 /* VariableDeclarationList */) { + if (node.kind === 262 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -126054,7 +128944,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { pos = writeTokenText(token, writer2, pos); } if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 295 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -126088,15 +128978,88 @@ function createPrinter(printerOptions = {}, handlers = {}) { return false; } function parenthesizeExpressionForNoAsi(node) { - if (!commentsDisabled && isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) { - const parseNode = getParseTreeNode(node); - if (parseNode && isParenthesizedExpression(parseNode)) { - const parens = factory.createParenthesizedExpression(node.expression); - setOriginalNode(parens, node); - setTextRange(parens, parseNode); - return parens; + if (!commentsDisabled) { + switch (node.kind) { + case 356 /* PartiallyEmittedExpression */: + if (willEmitLeadingNewLine(node)) { + const parseNode = getParseTreeNode(node); + if (parseNode && isParenthesizedExpression(parseNode)) { + const parens = factory.createParenthesizedExpression(node.expression); + setOriginalNode(parens, node); + setTextRange(parens, parseNode); + return parens; + } + return factory.createParenthesizedExpression(node); + } + return factory.updatePartiallyEmittedExpression( + node, + parenthesizeExpressionForNoAsi(node.expression) + ); + case 212 /* PropertyAccessExpression */: + return factory.updatePropertyAccessExpression( + node, + parenthesizeExpressionForNoAsi(node.expression), + node.name + ); + case 213 /* ElementAccessExpression */: + return factory.updateElementAccessExpression( + node, + parenthesizeExpressionForNoAsi(node.expression), + node.argumentExpression + ); + case 214 /* CallExpression */: + return factory.updateCallExpression( + node, + parenthesizeExpressionForNoAsi(node.expression), + node.typeArguments, + node.arguments + ); + case 216 /* TaggedTemplateExpression */: + return factory.updateTaggedTemplateExpression( + node, + parenthesizeExpressionForNoAsi(node.tag), + node.typeArguments, + node.template + ); + case 226 /* PostfixUnaryExpression */: + return factory.updatePostfixUnaryExpression( + node, + parenthesizeExpressionForNoAsi(node.operand) + ); + case 227 /* BinaryExpression */: + return factory.updateBinaryExpression( + node, + parenthesizeExpressionForNoAsi(node.left), + node.operatorToken, + node.right + ); + case 228 /* ConditionalExpression */: + return factory.updateConditionalExpression( + node, + parenthesizeExpressionForNoAsi(node.condition), + node.questionToken, + node.whenTrue, + node.colonToken, + node.whenFalse + ); + case 235 /* AsExpression */: + return factory.updateAsExpression( + node, + parenthesizeExpressionForNoAsi(node.expression), + node.type + ); + case 239 /* SatisfiesExpression */: + return factory.updateSatisfiesExpression( + node, + parenthesizeExpressionForNoAsi(node.expression), + node.type + ); + case 236 /* NonNullExpression */: + return factory.updateNonNullExpression( + node, + parenthesizeExpressionForNoAsi(node.expression) + ); } - return factory.createParenthesizedExpression(node); } return node; } @@ -126463,8 +129426,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeTrailingSemicolon(); } function emitImportClause(node) { - if (node.isTypeOnly) { - emitTokenWithComment(156 /* TypeKeyword */, node.pos, writeKeyword, node); + if (node.phaseModifier !== void 0) { + emitTokenWithComment(node.phaseModifier, node.pos, writeKeyword, node); writeSpace(); } emit(node.name); @@ -126778,7 +129741,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.comment) { const text = getTextOfJSDocComment(node.comment); if (text) { - const lines = text.split(/\r\n?|\n/g); + const lines = text.split(/\r\n?|\n/); for (const line of lines) { writeLine(); writeSpace(); @@ -126789,7 +129752,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 344 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 345 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -126848,7 +129811,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 309 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 310 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -126866,7 +129829,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 322 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 323 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -127205,7 +130168,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (isFunctionLike(parentNode) && parentNode.typeArguments) { return emitTypeArguments(parentNode, parentNode.typeArguments); } - emitList(parentNode, typeParameters, 53776 /* TypeParameters */); + emitList(parentNode, typeParameters, 53776 /* TypeParameters */ | (isArrowFunction(parentNode) ? 64 /* AllowTrailingComma */ : 0 /* None */)); } function emitParameters(parentNode, parameters) { emitList(parentNode, parameters, 2576 /* Parameters */); @@ -127473,7 +130436,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } function writeLines(text) { - const lines = text.split(/\r\n?|\n/g); + const lines = text.split(/\r\n?|\n/); const indentation = guessIndentation(lines); for (const lineText of lines) { const line = indentation ? lineText.slice(indentation) : lineText; @@ -127668,7 +130631,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 218 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -127698,18 +130661,18 @@ function createPrinter(printerOptions = {}, handlers = {}) { } return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia); } - function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { + function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) { const textSourceNode = node.textSourceNode; if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) { const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode); return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`; } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); + return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape); } } const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target >= 8 /* ES2021 */ ? 8 /* AllowNumericSeparator */ : 0); - return getLiteralText(node, currentSourceFile, flags); + return getLiteralText(node, sourceFile, flags); } function pushNameGenerationScope(node) { privateNameTempFlagsStack.push(privateNameTempFlags); @@ -127749,84 +130712,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { function generateNames(node) { if (!node) return; switch (node.kind) { - case 241 /* Block */: + case 242 /* Block */: forEach(node.statements, generateNames); break; - case 256 /* LabeledStatement */: - case 254 /* WithStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: + case 257 /* LabeledStatement */: + case 255 /* WithStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: generateNames(node.statement); break; - case 245 /* IfStatement */: + case 246 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: + case 249 /* ForStatement */: + case 251 /* ForOfStatement */: + case 250 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 258 /* TryStatement */: + case 259 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 299 /* CatchClause */: + case 300 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: generateNames(node.declarationList); break; - case 261 /* VariableDeclarationList */: + case 262 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 264 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: generateNames(node.importClause); break; - case 273 /* ImportClause */: + case 274 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 280 /* NamespaceExport */: + case 281 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 275 /* NamedImports */: + case 276 /* NamedImports */: forEach(node.elements, generateNames); break; - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -127834,14 +130797,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { function generateMemberNames(node) { if (!node) return; switch (node.kind) { - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -128120,16 +131083,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: + case 268 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: { + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -128144,17 +131107,17 @@ function createPrinter(printerOptions = {}, handlers = {}) { } return generateNameForExportDefault(); } - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reservedInNestedScopes*/ @@ -128248,7 +131211,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 353 /* NotEmittedStatement */ + node.kind !== 354 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -128256,7 +131219,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 261 /* VariableDeclarationList */) { + if (node.kind === 262 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -128272,7 +131235,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 353 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 354 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -128518,7 +131481,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { const emitFlags = getEmitFlags(node); const sourceMapRange = getSourceMapRange(node); const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -128531,7 +131494,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 353 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 354 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -128710,7 +131673,7 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi } try { return createCachedFileSystemEntries(rootDir, rootDirPath); - } catch (_e) { + } catch { Debug.assert(!cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(rootDirPath))); return void 0; } @@ -128799,6 +131762,12 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi function realpath(s) { return host.realpath ? host.realpath(s) : s; } + function clearFirstAncestorEntry(fileOrDirectoryPath) { + forEachAncestorDirectory( + getDirectoryPath(fileOrDirectoryPath), + (ancestor) => cachedReadDirectoryResult.delete(ensureTrailingDirectorySeparator(ancestor)) ? true : void 0 + ); + } function addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath) { const existingResult = getCachedFileSystemEntries(fileOrDirectoryPath); if (existingResult !== void 0) { @@ -128807,6 +131776,7 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi } const parentResult = getCachedFileSystemEntriesForBaseDir(fileOrDirectoryPath); if (!parentResult) { + clearFirstAncestorEntry(fileOrDirectoryPath); return void 0; } if (!host.directoryExists) { @@ -128832,6 +131802,8 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi const parentResult = getCachedFileSystemEntriesForBaseDir(filePath); if (parentResult) { updateFilesOfFileSystemEntry(parentResult, getBaseNameOfFileName(fileName), eventKind === 0 /* Created */); + } else { + clearFirstAncestorEntry(filePath); } } function updateFilesOfFileSystemEntry(parentResult, baseName, fileExists2) { @@ -128990,7 +131962,7 @@ function isIgnoredFileFromWildCardWatching({ } return false; function hasSourceFile(file) { - return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file); + return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.state.fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file); } function isSupportedScriptKind() { if (!getScriptKind2) return false; @@ -129011,9 +131983,6 @@ function isIgnoredFileFromWildCardWatching({ } } } -function isBuilderProgram(program) { - return !!program.getState; -} function isEmittedFileOfProgram(program, file) { if (!program) { return false; @@ -129148,7 +132117,7 @@ function resolveTripleslashReference(moduleName, containingFile) { } function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, getCanonicalFileName) { let commonPathComponents; - const failed = forEach(fileNames, (sourceFile) => { + const failed2 = forEach(fileNames, (sourceFile) => { const sourcePathComponents = getNormalizedPathComponents(sourceFile, currentDirectory); sourcePathComponents.pop(); if (!commonPathComponents) { @@ -129169,7 +132138,7 @@ function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, ge commonPathComponents.length = sourcePathComponents.length; } }); - if (failed) { + if (failed2) { return ""; } if (!commonPathComponents) { @@ -129538,7 +132507,6 @@ function getModeForUsageLocation(file, usage, compilerOptions) { return getModeForUsageLocationWorker(file, usage, compilerOptions); } function getModeForUsageLocationWorker(file, usage, compilerOptions) { - var _a; if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent) || isJSDocImportTag(usage.parent)) { const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); if (isTypeOnly) { @@ -129554,19 +132522,28 @@ function getModeForUsageLocationWorker(file, usage, compilerOptions) { return override; } } - if (compilerOptions && getEmitModuleKind(compilerOptions) === 200 /* Preserve */) { - return usage.parent.parent && isImportEqualsDeclaration(usage.parent.parent) || isRequireCall( - usage.parent, - /*requireStringLiteralLikeArgument*/ - false - ) ? 1 /* CommonJS */ : 99 /* ESNext */; + if (compilerOptions && importSyntaxAffectsModuleResolution(compilerOptions)) { + return getEmitSyntaxForUsageLocationWorker(file, usage, compilerOptions); } - if (file.impliedNodeFormat === void 0) return void 0; - if (file.impliedNodeFormat !== 99 /* ESNext */) { - return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */; +} +function getEmitSyntaxForUsageLocationWorker(file, usage, compilerOptions) { + var _a; + if (!compilerOptions) { + return void 0; } const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent; - return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */; + if (exprParentParent && isImportEqualsDeclaration(exprParentParent) || isRequireCall( + usage.parent, + /*requireStringLiteralLikeArgument*/ + false + )) { + return 1 /* CommonJS */; + } + if (isImportCall(walkUpParenthesizedExpressions(usage.parent))) { + return shouldTransformImportCallWorker(file, compilerOptions) ? 1 /* CommonJS */ : 99 /* ESNext */; + } + const fileEmitMode = getEmitModuleFormatOfFileWorker(file, compilerOptions); + return fileEmitMode === 1 /* CommonJS */ ? 1 /* CommonJS */ : emitModuleKindIsNonNodeESM(fileEmitMode) || fileEmitMode === 200 /* Preserve */ ? 99 /* ESNext */ : void 0; } function getResolutionModeOverride(node, grammarErrorOnNode) { if (!node) return void 0; @@ -129623,7 +132600,7 @@ function getTypeReferenceResolutionName(entry) { } var typeReferenceResolutionNameAndModeGetter = { getName: getTypeReferenceResolutionName, - getMode: (entry, file) => getModeForFileReference(entry, file == null ? void 0 : file.impliedNodeFormat) + getMode: (entry, file, compilerOptions) => getModeForFileReference(entry, file && getDefaultResolutionModeForFileWorker(file, compilerOptions)) }; function createTypeReferenceResolutionLoader(containingFile, redirectedReference, options, host, cache) { return { @@ -129656,38 +132633,6 @@ function loadWithModeAwareCache(entries, containingFile, redirectedReference, op } return resolutions; } -function forEachResolvedProjectReference(resolvedProjectReferences, cb) { - return forEachProjectReference( - /*projectReferences*/ - void 0, - resolvedProjectReferences, - (resolvedRef, parent2) => resolvedRef && cb(resolvedRef, parent2) - ); -} -function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) { - let seenResolvedRefs; - return worker( - projectReferences, - resolvedProjectReferences, - /*parent*/ - void 0 - ); - function worker(projectReferences2, resolvedProjectReferences2, parent2) { - if (cbRef) { - const result = cbRef(projectReferences2, parent2); - if (result) return result; - } - return forEach(resolvedProjectReferences2, (resolvedRef, index) => { - if (resolvedRef && (seenResolvedRefs == null ? void 0 : seenResolvedRefs.has(resolvedRef.sourceFile.path))) { - return void 0; - } - const result = cbResolvedRef(resolvedRef, parent2, index); - if (result || !resolvedRef) return result; - (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path); - return worker(resolvedRef.commandLine.projectReferences, resolvedRef.references, resolvedRef); - }); - } -} var inferredTypesContainingFile = "__inferred type names__.ts"; function getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName) { const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory; @@ -129703,13 +132648,6 @@ function getLibraryNameFromLibFileName(libFileName) { } return "@typescript/lib-" + path; } -function getLibNameFromLibReference(libReference) { - return toFileNameLowerCase(libReference.fileName); -} -function getLibFileNameFromLibReference(libReference) { - const libName = getLibNameFromLibReference(libReference); - return libMap.get(libName); -} function isReferencedFile(reason) { switch (reason == null ? void 0 : reason.kind) { case 3 /* Import */: @@ -129783,7 +132721,13 @@ function isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, if (oldResolvedRef.commandLine.options.configFile !== newParsedCommandLine.options.configFile) return false; if (!arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newParsedCommandLine.fileNames)) return false; (seenResolvedRefs || (seenResolvedRefs = [])).push(oldResolvedRef); - return !forEach(oldResolvedRef.references, (childResolvedRef, index) => !resolvedProjectReferenceUptoDate(childResolvedRef, oldResolvedRef.commandLine.projectReferences[index])); + return !forEach( + oldResolvedRef.references, + (childResolvedRef, index) => !resolvedProjectReferenceUptoDate( + childResolvedRef, + oldResolvedRef.commandLine.projectReferences[index] + ) + ); } const refPath = resolveProjectReferencePath(oldRef); return !getParsedCommandLine(refPath); @@ -129797,19 +132741,15 @@ function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, optio return typeof result === "object" ? result.impliedNodeFormat : result; } function getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options) { - switch (getEmitModuleResolutionKind(options)) { - case 3 /* Node16 */: - case 99 /* NodeNext */: - return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0; - default: - return void 0; - } + const moduleResolution = getEmitModuleResolutionKind(options); + const shouldLookupFromPackageJson = 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */ || pathContainsNodeModules(fileName); + return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : shouldLookupFromPackageJson && fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0; function lookupFromPackageJson() { const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options); const packageJsonLocations = []; state.failedLookupLocations = packageJsonLocations; state.affectingLocations = packageJsonLocations; - const packageJsonScope = getPackageScopeForPath(fileName, state); + const packageJsonScope = getPackageScopeForPath(getDirectoryPath(fileName), state); const impliedNodeFormat = (packageJsonScope == null ? void 0 : packageJsonScope.contents.packageJsonContent.type) === "module" ? 99 /* ESNext */ : 1 /* CommonJS */; return { impliedNodeFormat, packageJsonLocations, packageJsonScope }; } @@ -129925,11 +132865,13 @@ function createCreateProgramOptions(rootNames, options, host, oldProgram, config typeScriptVersion: typeScriptVersion3 }; } -function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) { +function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p; - const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; - const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions; - let { oldProgram } = createProgramOptions; + let _createProgramOptions = isArray(_rootNamesOrOptions) ? createCreateProgramOptions(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : _rootNamesOrOptions; + const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3, host: createProgramOptionsHost } = _createProgramOptions; + let { oldProgram } = _createProgramOptions; + _createProgramOptions = void 0; + _rootNamesOrOptions = void 0; for (const option of commandLineOptionOfCustomType) { if (hasProperty(options, option.name)) { if (typeof options[option.name] === "string") { @@ -129942,17 +132884,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config let processingOtherFiles; let files; let symlinks; - let commonSourceDirectory; let typeChecker; let classifiableNames; - const ambientModuleNameToUnmodifiedFileName = /* @__PURE__ */ new Map(); - let fileReasons = createMultiMap(); let filesWithReferencesProcessed; - let fileReasonsToChain; - let reasonToRelatedInfo; - const cachedBindAndCheckDiagnosticsForFile = {}; - const cachedDeclarationDiagnosticsForFile = {}; - let fileProcessingDiagnostics; + let cachedBindAndCheckDiagnosticsForFile; + let cachedDeclarationDiagnosticsForFile; + const programDiagnostics = createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax); let automaticTypeDirectiveNames; let automaticTypeDirectiveResolutions; let resolvedLibReferences; @@ -129974,13 +132911,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config true ); mark("beforeProgram"); - const host = createProgramOptions.host || createCompilerHost(options); + const host = createProgramOptionsHost || createCompilerHost(options); const configParsingHost = parseConfigHostFromCompilerHostLike(host); let skipDefaultLib = options.noLib; const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options)); const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName()); - const programDiagnostics = createDiagnosticCollection(); - let lazyProgramDiagnosticExplainingFile = []; + let skipVerifyCompilerOptions = false; const currentDirectory = host.getCurrentDirectory(); const supportedExtensions = getSupportedExtensions(options); const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions); @@ -130063,14 +132999,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const packageIdToSourceFile = /* @__PURE__ */ new Map(); let sourceFileToPackageName = /* @__PURE__ */ new Map(); let redirectTargetsMap = createMultiMap(); - let usesUriStyleNodeCoreModules = false; + let usesUriStyleNodeCoreModules; const filesByName = /* @__PURE__ */ new Map(); let missingFileNames = /* @__PURE__ */ new Map(); const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0; let resolvedProjectReferences; let projectReferenceRedirects; - let mapFromFileToProjectReferenceRedirects; - let mapFromToProjectReferenceRedirectSource; + let mapSourceFileToResolvedRef; + let mapOutputFileToResolvedRef; const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect; const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({ compilerHost: host, @@ -130078,7 +133014,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config useSourceOfProjectReferenceRedirect, toPath: toPath3, getResolvedProjectReferences, - getSourceOfProjectReferenceRedirect, + getRedirectFromOutput, forEachResolvedProjectReference: forEachResolvedProjectReference2 }); const readFile = host.readFile.bind(host); @@ -130183,7 +133119,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config }); } } - files = stableSort(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles); + files = toSorted(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles); processingDefaultLibFiles = void 0; processingOtherFiles = void 0; filesWithReferencesProcessed = void 0; @@ -130194,7 +133130,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || newFile.impliedNodeFormat !== oldSourceFile.impliedNodeFormat || // old file wasn't redirect but new file is oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path) { - host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); + host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path), newFile); } } if (!host.getParsedCommandLine) { @@ -130204,7 +133140,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config resolvedProjectReference.sourceFile, oldProgram.getCompilerOptions(), /*hasSourceFileByPath*/ - false + false, + /*newSourceFileByResolvedPath*/ + void 0 ); } }); @@ -130256,12 +133194,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config getTypeCount: () => getTypeChecker().getTypeCount(), getInstantiationCount: () => getTypeChecker().getInstantiationCount(), getRelationCacheSizes: () => getTypeChecker().getRelationCacheSizes(), - getFileProcessingDiagnostics: () => fileProcessingDiagnostics, + getFileProcessingDiagnostics: () => programDiagnostics.getFileProcessingDiagnostics(), getAutomaticTypeDirectiveNames: () => automaticTypeDirectiveNames, getAutomaticTypeDirectiveResolutions: () => automaticTypeDirectiveResolutions, isSourceFileFromExternalLibrary, isSourceFileDefaultLibrary, getModeForUsageLocation: getModeForUsageLocation2, + getEmitSyntaxForUsageLocation, getModeForResolutionAtIndex: getModeForResolutionAtIndex2, getSourceFileFromReference, getLibFileFromReference, @@ -130271,6 +133210,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config resolvedModules, resolvedTypeReferenceDirectiveNames, resolvedLibReferences, + getProgramDiagnosticsContainer: () => programDiagnostics, getResolvedModule, getResolvedModuleFromModuleSpecifier, getResolvedTypeReferenceDirective, @@ -130284,12 +133224,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics2, getProjectReferences, getResolvedProjectReferences, - getProjectReferenceRedirect, - getResolvedProjectReferenceToRedirect, + getRedirectFromSourceFile, getResolvedProjectReferenceByPath, forEachResolvedProjectReference: forEachResolvedProjectReference2, isSourceOfProjectReferenceRedirect, - getRedirectReferenceForResolutionFromSourceOfProject, + getRedirectFromOutput, + getCompilerOptionsForFile, + getDefaultResolutionModeForFile: getDefaultResolutionModeForFile2, + getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2, + getImpliedNodeFormatForEmit: getImpliedNodeFormatForEmit2, + shouldTransformImportCall, emitBuildInfo, fileExists, readFile, @@ -130298,69 +133242,19 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host), useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), getCanonicalFileName, - getFileIncludeReasons: () => fileReasons, + getFileIncludeReasons: () => programDiagnostics.getFileReasons(), structureIsReused, - writeFile: writeFile2 + writeFile: writeFile2, + getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation) }; onProgramCreateComplete(); - verifyCompilerOptions(); + if (!skipVerifyCompilerOptions) { + verifyCompilerOptions(); + } mark("afterProgram"); measure("Program", "beforeProgram", "afterProgram"); (_p = tracing) == null ? void 0 : _p.pop(); return program; - function updateAndGetProgramDiagnostics() { - if (lazyProgramDiagnosticExplainingFile) { - fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => { - switch (diagnostic.kind) { - case 1 /* FilePreprocessingFileExplainingDiagnostic */: - return programDiagnostics.add( - createDiagnosticExplainingFile( - diagnostic.file && getSourceFileByPath(diagnostic.file), - diagnostic.fileProcessingReason, - diagnostic.diagnostic, - diagnostic.args || emptyArray - ) - ); - case 0 /* FilePreprocessingLibReferenceDiagnostic */: - return programDiagnostics.add(filePreprocessingLibreferenceDiagnostic(diagnostic)); - case 2 /* ResolutionDiagnostics */: - return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d)); - default: - Debug.assertNever(diagnostic); - } - }); - lazyProgramDiagnosticExplainingFile.forEach( - ({ file, diagnostic, args }) => programDiagnostics.add( - createDiagnosticExplainingFile( - file, - /*fileProcessingReason*/ - void 0, - diagnostic, - args - ) - ) - ); - lazyProgramDiagnosticExplainingFile = void 0; - fileReasonsToChain = void 0; - reasonToRelatedInfo = void 0; - } - return programDiagnostics; - } - function filePreprocessingLibreferenceDiagnostic({ reason }) { - const { file, pos, end } = getReferencedFileLocation(program, reason); - const libReference = file.libReferenceDirectives[reason.index]; - const libName = getLibNameFromLibReference(libReference); - const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts"); - const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity); - return createFileDiagnostic( - file, - Debug.checkDefined(pos), - Debug.checkDefined(end) - pos, - suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0, - libName, - suggestion - ); - } function getResolvedModule(file, moduleName, mode) { var _a2; return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode); @@ -130375,7 +133269,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode); } function getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(typeRef, sourceFile) { - return getResolvedTypeReferenceDirective(sourceFile, typeRef.fileName, typeRef.resolutionMode || sourceFile.impliedNodeFormat); + return getResolvedTypeReferenceDirective( + sourceFile, + typeRef.fileName, + getModeForTypeReferenceDirectiveInFile(typeRef, sourceFile) + ); } function forEachResolvedModule(callback, file) { forEachResolution(resolvedModules, callback, file); @@ -130405,7 +133303,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config function addResolutionDiagnostics(resolution) { var _a2; if (!((_a2 = resolution.resolutionDiagnostics) == null ? void 0 : _a2.length)) return; - (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({ + programDiagnostics.addFileProcessingDiagnostic({ kind: 2 /* ResolutionDiagnostics */, diagnostics: resolution.resolutionDiagnostics }); @@ -130421,12 +133319,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) { var _a2, _b2; - if (!moduleNames.length) return emptyArray; const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory); const redirectedReference = getRedirectReferenceForResolution(containingFile); (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "resolveModuleNamesWorker", { containingFileName }); mark("beforeResolveModule"); - const result = actualResolveModuleNamesWorker(moduleNames, containingFileName, redirectedReference, options, containingFile, reusedNames); + const result = actualResolveModuleNamesWorker( + moduleNames, + containingFileName, + redirectedReference, + options, + containingFile, + reusedNames + ); mark("afterResolveModule"); measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); (_b2 = tracing) == null ? void 0 : _b2.pop(); @@ -130434,36 +133338,33 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, reusedNames) { var _a2, _b2; - if (!typeDirectiveNames.length) return []; const containingSourceFile = !isString(containingFile) ? containingFile : void 0; const containingFileName = !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile; const redirectedReference = containingSourceFile && getRedirectReferenceForResolution(containingSourceFile); (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName }); mark("beforeResolveTypeReference"); - const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, options, containingSourceFile, reusedNames); + const result = actualResolveTypeReferenceDirectiveNamesWorker( + typeDirectiveNames, + containingFileName, + redirectedReference, + options, + containingSourceFile, + reusedNames + ); mark("afterResolveTypeReference"); measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); (_b2 = tracing) == null ? void 0 : _b2.pop(); return result; } function getRedirectReferenceForResolution(file) { - const redirect = getResolvedProjectReferenceToRedirect(file.originalFileName); - if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect; - const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path); + var _a2, _b2; + const redirect = getRedirectFromSourceFile(file.originalFileName); + if (redirect || !isDeclarationFileName(file.originalFileName)) return redirect == null ? void 0 : redirect.resolvedRef; + const resultFromDts = (_a2 = getRedirectFromOutput(file.path)) == null ? void 0 : _a2.resolvedRef; if (resultFromDts) return resultFromDts; if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0; const realDeclarationPath = toPath3(host.realpath(file.originalFileName)); - return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath); - } - function getRedirectReferenceForResolutionFromSourceOfProject(filePath) { - const source = getSourceOfProjectReferenceRedirect(filePath); - if (isString(source)) return getResolvedProjectReferenceToRedirect(source); - if (!source) return void 0; - return forEachResolvedProjectReference2((resolvedRef) => { - const out = resolvedRef.commandLine.options.outFile; - if (!out) return void 0; - return toPath3(out) === filePath ? resolvedRef : void 0; - }); + return realDeclarationPath === file.path ? void 0 : (_b2 = getRedirectFromOutput(realDeclarationPath)) == null ? void 0 : _b2.resolvedRef; } function compareDefaultLibFiles(a, b) { return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); @@ -130487,16 +133388,19 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return toPath(fileName, currentDirectory, getCanonicalFileName); } function getCommonSourceDirectory2() { - if (commonSourceDirectory === void 0) { - const emittedFiles = filter(files, (file) => sourceFileMayBeEmitted(file, program)); - commonSourceDirectory = getCommonSourceDirectory( - options, - () => mapDefined(emittedFiles, (file) => file.isDeclarationFile ? void 0 : file.fileName), - currentDirectory, - getCanonicalFileName, - (commonSourceDirectory2) => checkSourceFilesBelongToPath(emittedFiles, commonSourceDirectory2) - ); + let commonSourceDirectory = programDiagnostics.getCommonSourceDirectory(); + if (commonSourceDirectory !== void 0) { + return commonSourceDirectory; } + const emittedFiles = filter(files, (file) => sourceFileMayBeEmitted(file, program)); + commonSourceDirectory = getCommonSourceDirectory( + options, + () => mapDefined(emittedFiles, (file) => file.isDeclarationFile ? void 0 : file.fileName), + currentDirectory, + getCanonicalFileName, + (commonSourceDirectory2) => checkSourceFilesBelongToPath(emittedFiles, commonSourceDirectory2) + ); + programDiagnostics.setCommonSourceDirectory(commonSourceDirectory); return commonSourceDirectory; } function getClassifiableNames() { @@ -130510,144 +133414,108 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } return classifiableNames; } - function resolveModuleNamesReusingOldState(moduleNames, file) { - if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) { - return resolveModuleNamesWorker( - moduleNames, - file, + function resolveModuleNamesReusingOldState(moduleNames, containingFile) { + return resolveNamesReusingOldState({ + entries: moduleNames, + containingFile, + containingSourceFile: containingFile, + redirectedReference: getRedirectReferenceForResolution(containingFile), + nameAndModeGetter: moduleResolutionNameAndModeGetter, + resolutionWorker: resolveModuleNamesWorker, + getResolutionFromOldProgram: (name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedModule(containingFile, name, mode), + getResolved: getResolvedModuleFromResolution, + canReuseResolutionsInFile: () => containingFile === (oldProgram == null ? void 0 : oldProgram.getSourceFile(containingFile.fileName)) && !hasInvalidatedResolutions(containingFile.path), + resolveToOwnAmbientModule: true + }); + } + function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) { + const containingSourceFile = !isString(containingFile) ? containingFile : void 0; + return resolveNamesReusingOldState({ + entries: typeDirectiveNames, + containingFile, + containingSourceFile, + redirectedReference: containingSourceFile && getRedirectReferenceForResolution(containingSourceFile), + nameAndModeGetter: typeReferenceResolutionNameAndModeGetter, + resolutionWorker: resolveTypeReferenceDirectiveNamesWorker, + getResolutionFromOldProgram: (name, mode) => { + var _a2; + return containingSourceFile ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingSourceFile, name, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(name, mode); + }, + getResolved: getResolvedTypeReferenceDirectiveFromResolution, + canReuseResolutionsInFile: () => containingSourceFile ? containingSourceFile === (oldProgram == null ? void 0 : oldProgram.getSourceFile(containingSourceFile.fileName)) && !hasInvalidatedResolutions(containingSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)) + }); + } + function resolveNamesReusingOldState({ + entries, + containingFile, + containingSourceFile, + redirectedReference, + nameAndModeGetter, + resolutionWorker, + getResolutionFromOldProgram, + getResolved, + canReuseResolutionsInFile, + resolveToOwnAmbientModule + }) { + if (!entries.length) return emptyArray; + if (structureIsReused === 0 /* Not */ && (!resolveToOwnAmbientModule || !containingSourceFile.ambientModuleNames.length)) { + return resolutionWorker( + entries, + containingFile, /*reusedNames*/ void 0 ); } - let unknownModuleNames; + let unknownEntries; + let unknownEntryIndices; let result; let reusedNames; - const predictedToResolveToAmbientModuleMarker = emptyResolution; - const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); - for (let i = 0; i < moduleNames.length; i++) { - const moduleName = moduleNames[i]; - if (file === oldSourceFile && !hasInvalidatedResolutions(file.path)) { - const oldResolution = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation2(file, moduleName)); - if (oldResolution == null ? void 0 : oldResolution.resolvedModule) { + const reuseResolutions = canReuseResolutionsInFile(); + for (let i = 0; i < entries.length; i++) { + const entry = entries[i]; + if (reuseResolutions) { + const name = nameAndModeGetter.getName(entry); + const mode = nameAndModeGetter.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) ?? options); + const oldResolution = getResolutionFromOldProgram(name, mode); + const oldResolved = oldResolution && getResolved(oldResolution); + if (oldResolved) { if (isTraceEnabled(options, host)) { trace( host, - oldResolution.resolvedModule.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2, - moduleName.text, - getNormalizedAbsolutePath(file.originalFileName, currentDirectory), - oldResolution.resolvedModule.resolvedFileName, - oldResolution.resolvedModule.packageId && packageIdToString(oldResolution.resolvedModule.packageId) + resolutionWorker === resolveModuleNamesWorker ? oldResolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : oldResolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2, + name, + containingSourceFile ? getNormalizedAbsolutePath(containingSourceFile.originalFileName, currentDirectory) : containingFile, + oldResolved.resolvedFileName, + oldResolved.packageId && packageIdToString(oldResolved.packageId) ); } - (result ?? (result = new Array(moduleNames.length)))[i] = oldResolution; - (reusedNames ?? (reusedNames = [])).push(moduleName); + (result ?? (result = new Array(entries.length)))[i] = oldResolution; + (reusedNames ?? (reusedNames = [])).push(entry); continue; } } - let resolvesToAmbientModuleInNonModifiedFile = false; - if (contains(file.ambientModuleNames, moduleName.text)) { - resolvesToAmbientModuleInNonModifiedFile = true; - if (isTraceEnabled(options, host)) { - trace(host, Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName.text, getNormalizedAbsolutePath(file.originalFileName, currentDirectory)); - } - } else { - resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName); - } - if (resolvesToAmbientModuleInNonModifiedFile) { - (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker; - } else { - (unknownModuleNames ?? (unknownModuleNames = [])).push(moduleName); - } - } - const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, reusedNames) : emptyArray; - if (!result) { - Debug.assert(resolutions.length === moduleNames.length); - return resolutions; - } - let j = 0; - for (let i = 0; i < result.length; i++) { - if (!result[i]) { - result[i] = resolutions[j]; - j++; - } - } - Debug.assert(j === resolutions.length); - return result; - function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) { - var _a2; - const resolutionToFile = (_a2 = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation2(file, moduleName))) == null ? void 0 : _a2.resolvedModule; - const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName); - if (resolutionToFile && resolvedFile) { - return false; - } - const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName.text); - if (!unmodifiedFile) { - return false; - } - if (isTraceEnabled(options, host)) { - trace(host, Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, moduleName.text, unmodifiedFile); - } - return true; - } - } - function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) { - var _a2; - if (structureIsReused === 0 /* Not */) { - return resolveTypeReferenceDirectiveNamesWorker( - typeDirectiveNames, - containingFile, - /*reusedNames*/ - void 0 - ); - } - let unknownTypeReferenceDirectiveNames; - let result; - let reusedNames; - const containingSourceFile = !isString(containingFile) ? containingFile : void 0; - const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; - const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(containingFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); - for (let i = 0; i < typeDirectiveNames.length; i++) { - const entry = typeDirectiveNames[i]; - if (canReuseResolutions) { - const typeDirectiveName = getTypeReferenceResolutionName(entry); - const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat); - const oldResolution = !isString(containingFile) ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingFile, typeDirectiveName, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); - if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) { + if (resolveToOwnAmbientModule) { + const name = nameAndModeGetter.getName(entry); + if (contains(containingSourceFile.ambientModuleNames, name)) { if (isTraceEnabled(options, host)) { trace( host, - oldResolution.resolvedTypeReferenceDirective.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2, - typeDirectiveName, - !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile, - oldResolution.resolvedTypeReferenceDirective.resolvedFileName, - oldResolution.resolvedTypeReferenceDirective.packageId && packageIdToString(oldResolution.resolvedTypeReferenceDirective.packageId) + Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, + name, + getNormalizedAbsolutePath(containingSourceFile.originalFileName, currentDirectory) ); } - (result ?? (result = new Array(typeDirectiveNames.length)))[i] = oldResolution; - (reusedNames ?? (reusedNames = [])).push(entry); + (result ?? (result = new Array(entries.length)))[i] = emptyResolution; continue; } } - (unknownTypeReferenceDirectiveNames ?? (unknownTypeReferenceDirectiveNames = [])).push(entry); - } - if (!unknownTypeReferenceDirectiveNames) return result || emptyArray; - const resolutions = resolveTypeReferenceDirectiveNamesWorker( - unknownTypeReferenceDirectiveNames, - containingFile, - reusedNames - ); - if (!result) { - Debug.assert(resolutions.length === typeDirectiveNames.length); - return resolutions; - } - let j = 0; - for (let i = 0; i < result.length; i++) { - if (!result[i]) { - result[i] = resolutions[j]; - j++; - } + (unknownEntries ?? (unknownEntries = [])).push(entry); + (unknownEntryIndices ?? (unknownEntryIndices = [])).push(i); } - Debug.assert(j === resolutions.length); + if (!unknownEntries) return result; + const resolutions = resolutionWorker(unknownEntries, containingFile, reusedNames); + if (!result) return resolutions; + resolutions.forEach((resolution, index) => result[unknownEntryIndices[index]] = resolution); return result; } function canReuseProjectReferences() { @@ -130776,10 +133644,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } else if (hasInvalidatedResolutions(oldSourceFile.path)) { structureIsReused = 1 /* SafeModules */; modifiedSourceFiles.push(newSourceFile); - } else { - for (const moduleName of oldSourceFile.ambientModuleNames) { - ambientModuleNameToUnmodifiedFileName.set(moduleName, oldSourceFile.fileName); - } } newSourceFiles.push(newSourceFile); } @@ -130790,10 +133654,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const moduleNames = getModuleNames(newSourceFile); const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile); (resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions); + const optionsForFile = getCompilerOptionsForFile(newSourceFile); const resolutionsChanged = hasChangesInResolutions( moduleNames, resolutions, - (name) => oldProgram.getResolvedModule(newSourceFile, name.text, getModeForUsageLocation2(newSourceFile, name)), + (name) => oldProgram.getResolvedModule(newSourceFile, name.text, getModeForUsageLocationWorker(newSourceFile, name, optionsForFile)), moduleResolutionIsEqualTo ); if (resolutionsChanged) structureIsReused = 1 /* SafeModules */; @@ -130803,7 +133668,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const typeReferenceResolutionsChanged = hasChangesInResolutions( typesReferenceDirectives, typeReferenceResolutions, - (name) => oldProgram.getResolvedTypeReferenceDirective(newSourceFile, getTypeReferenceResolutionName(name), getModeForFileReference(name, newSourceFile.impliedNodeFormat)), + (name) => oldProgram.getResolvedTypeReferenceDirective( + newSourceFile, + getTypeReferenceResolutionName(name), + getModeForTypeReferenceDirectiveInFile(name, newSourceFile) + ), typeDirectiveIsEqualTo ); if (typeReferenceResolutionsChanged) structureIsReused = 1 /* SafeModules */; @@ -130842,9 +133711,10 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } filesByName.set(path, filesByName.get(oldFile.path)); }); + const isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations); + programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical); + skipVerifyCompilerOptions = isConfigIdentical; files = newSourceFiles; - fileReasons = oldProgram.getFileIncludeReasons(); - fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics(); automaticTypeDirectiveNames = oldProgram.getAutomaticTypeDirectiveNames(); automaticTypeDirectiveResolutions = oldProgram.getAutomaticTypeDirectiveResolutions(); sourceFileToPackageName = oldProgram.sourceFileToPackageName; @@ -130866,12 +133736,15 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config getSourceFileByPath: program.getSourceFileByPath, getSourceFiles: program.getSourceFiles, isSourceFileFromExternalLibrary, - getResolvedProjectReferenceToRedirect, - getProjectReferenceRedirect, + getRedirectFromSourceFile, isSourceOfProjectReferenceRedirect, getSymlinkCache, writeFile: writeFileCallback || writeFile2, isEmitBlocked, + shouldTransformImportCall, + getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2, + getDefaultResolutionModeForFile: getDefaultResolutionModeForFile2, + getModeForResolutionAtIndex: getModeForResolutionAtIndex2, readFile: (f) => host.readFile(f), fileExists: (f) => { const path = toPath3(f); @@ -130890,7 +133763,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config getFileIncludeReasons: program.getFileIncludeReasons, createHash: maybeBind(host, host.createHash), getModuleResolutionCache: () => program.getModuleResolutionCache(), - trace: maybeBind(host, host.trace) + trace: maybeBind(host, host.trace), + getGlobalTypingsCacheLocation: program.getGlobalTypingsCacheLocation }; } function writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data) { @@ -130898,7 +133772,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function emitBuildInfo(writeFileCallback) { var _a2, _b2; - Debug.assert(!options.outFile); (_a2 = tracing) == null ? void 0 : _a2.push( tracing.Phase.Emit, "emitBuildInfo", @@ -130940,20 +133813,23 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (file.hasNoDefaultLib) { return true; } - if (!options.noLib) { + if (options.noLib) { return false; } const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive; if (!options.lib) { return equalityComparer(file.fileName, getDefaultLibraryFileName()); } else { - return some(options.lib, (libFileName) => equalityComparer(file.fileName, resolvedLibReferences.get(libFileName).actual)); + return some(options.lib, (libFileName) => { + const resolvedLib = resolvedLibReferences.get(libFileName); + return !!resolvedLib && equalityComparer(file.fileName, resolvedLib.actual); + }); } } function getTypeChecker() { return typeChecker || (typeChecker = createTypeChecker(program)); } - function emit(sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit) { + function emit(sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit, skipBuildInfo) { var _a2, _b2; (_a2 = tracing) == null ? void 0 : _a2.push( tracing.Phase.Emit, @@ -130962,14 +133838,25 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config /*separateBeginAndEnd*/ true ); - const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit)); + const result = runWithCancellationToken( + () => emitWorker( + program, + sourceFile, + writeFileCallback, + cancellationToken, + emitOnly, + transformers, + forceDtsEmit, + skipBuildInfo + ) + ); (_b2 = tracing) == null ? void 0 : _b2.pop(); return result; } function isEmitBlocked(emitFileName) { return hasEmitBlockingDiagnostics.has(toPath3(emitFileName)); } - function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnly, customTransformers, forceDtsEmit) { + function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnly, customTransformers, forceDtsEmit, skipBuildInfo) { if (!forceDtsEmit) { const result = handleNoEmitOptions(program2, sourceFile, writeFileCallback, cancellationToken); if (result) return result; @@ -130991,7 +133878,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config emitOnly, /*onlyBuildInfo*/ false, - forceDtsEmit + forceDtsEmit, + skipBuildInfo ) ); mark("afterEmit"); @@ -131018,34 +133906,37 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config function getSyntacticDiagnostics(sourceFile, cancellationToken) { return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken); } - function getSemanticDiagnostics(sourceFile, cancellationToken) { - return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken); + function getSemanticDiagnostics(sourceFile, cancellationToken, nodesToCheck) { + return getDiagnosticsHelper( + sourceFile, + (sourceFile2, cancellationToken2) => getSemanticDiagnosticsForFile(sourceFile2, cancellationToken2, nodesToCheck), + cancellationToken + ); } function getCachedSemanticDiagnostics(sourceFile) { - var _a2; - return sourceFile ? (_a2 = cachedBindAndCheckDiagnosticsForFile.perFile) == null ? void 0 : _a2.get(sourceFile.path) : cachedBindAndCheckDiagnosticsForFile.allDiagnostics; + return cachedBindAndCheckDiagnosticsForFile == null ? void 0 : cachedBindAndCheckDiagnosticsForFile.get(sourceFile.path); } function getBindAndCheckDiagnostics(sourceFile, cancellationToken) { - return getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken); + return getBindAndCheckDiagnosticsForFile( + sourceFile, + cancellationToken, + /*nodesToCheck*/ + void 0 + ); } function getProgramDiagnostics(sourceFile) { var _a2; if (skipTypeChecking(sourceFile, options, program)) { return emptyArray; } - const programDiagnosticsInFile = updateAndGetProgramDiagnostics().getDiagnostics(sourceFile.fileName); + const programDiagnosticsInFile = programDiagnostics.getCombinedDiagnostics(program).getDiagnostics(sourceFile.fileName); if (!((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) { return programDiagnosticsInFile; } return getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, programDiagnosticsInFile).diagnostics; } function getDeclarationDiagnostics2(sourceFile, cancellationToken) { - const options2 = program.getCompilerOptions(); - if (!sourceFile || options2.outFile) { - return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken); - } else { - return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken); - } + return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken); } function getSyntacticDiagnosticsForFile(sourceFile) { if (isSourceFileJS(sourceFile)) { @@ -131066,16 +133957,26 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config throw e; } } - function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) { + function getSemanticDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck) { return concatenate( - filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken), options), + filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck), options), getProgramDiagnostics(sourceFile) ); } - function getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken) { - return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache); + function getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken, nodesToCheck) { + if (nodesToCheck) { + return getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck); + } + let result = cachedBindAndCheckDiagnosticsForFile == null ? void 0 : cachedBindAndCheckDiagnosticsForFile.get(sourceFile.path); + if (!result) { + (cachedBindAndCheckDiagnosticsForFile ?? (cachedBindAndCheckDiagnosticsForFile = /* @__PURE__ */ new Map())).set( + sourceFile.path, + result = getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken) + ); + } + return result; } - function getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken) { + function getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken, nodesToCheck) { return runWithCancellationToken(() => { if (skipTypeChecking(sourceFile, options, program)) { return emptyArray; @@ -131083,24 +133984,34 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const typeChecker2 = getTypeChecker(); Debug.assert(!!sourceFile.bindDiagnostics); const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */; - const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options); const isPlainJs = isPlainJsFile(sourceFile, options.checkJs); + const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options); let bindDiagnostics = sourceFile.bindDiagnostics; - let checkDiagnostics = typeChecker2.getDiagnostics(sourceFile, cancellationToken); + let checkDiagnostics = typeChecker2.getDiagnostics(sourceFile, cancellationToken, nodesToCheck); if (isPlainJs) { bindDiagnostics = filter(bindDiagnostics, (d) => plainJSErrors.has(d.code)); checkDiagnostics = filter(checkDiagnostics, (d) => plainJSErrors.has(d.code)); } - return getMergedBindAndCheckDiagnostics(sourceFile, !isPlainJs, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : void 0); + return getMergedBindAndCheckDiagnostics( + sourceFile, + !isPlainJs, + !!nodesToCheck, + bindDiagnostics, + checkDiagnostics, + isCheckJs ? sourceFile.jsDocDiagnostics : void 0 + ); }); } - function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, ...allDiagnostics) { + function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, partialCheck, ...allDiagnostics) { var _a2; const flatDiagnostics = flatten(allDiagnostics); if (!includeBindAndCheckDiagnostics || !((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) { return flatDiagnostics; } const { diagnostics, directives } = getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, flatDiagnostics); + if (partialCheck) { + return diagnostics; + } for (const errorExpectation of directives.getUnusedExpectations()) { diagnostics.push(createDiagnosticForRange(sourceFile, errorExpectation.range, Diagnostics.Unused_ts_expect_error_directive)); } @@ -131128,7 +134039,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return line; } const lineText = file.text.slice(lineStarts[line], lineStarts[line + 1]).trim(); - if (lineText !== "" && !/^(\s*)\/\/(.*)$/.test(lineText)) { + if (lineText !== "" && !/^\s*\/\/.*$/.test(lineText)) { return -1; } line--; @@ -131143,97 +134054,98 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: + case 170 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 260 /* VariableDeclaration */: + // falls through + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 220 /* ArrowFunction */: + case 261 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 273 /* ImportClause */: + case 274 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 298 /* HeritageClause */: + case 299 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 119 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: if (!node.body) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } return; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 235 /* NonNullExpression */: + case 236 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 234 /* AsExpression */: + case 235 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 216 /* TypeAssertionExpression */: + case 217 /* TypeAssertionExpression */: Debug.fail(); } } @@ -131268,26 +134180,27 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 220 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 243 /* VariableStatement */: + // falls through + case 244 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 243 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 244 /* VariableStatement */); return "skip"; } break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) { @@ -131297,18 +134210,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 169 /* Parameter */: + case 170 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 233 /* ExpressionWithTypeArguments */: - case 285 /* JsxSelfClosingElement */: - case 286 /* JsxOpeningElement */: - case 215 /* TaggedTemplateExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 234 /* ExpressionWithTypeArguments */: + case 286 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 216 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -131323,6 +134236,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (isConstValid) { continue; } + // to report error, + // falls through case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: @@ -131334,6 +134249,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 147 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); break; + // These are all legal modifiers. case 126 /* StaticKeyword */: case 95 /* ExportKeyword */: case 90 /* DefaultKeyword */: @@ -131351,7 +134267,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config }); } function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) { - return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache); + let result = cachedDeclarationDiagnosticsForFile == null ? void 0 : cachedDeclarationDiagnosticsForFile.get(sourceFile.path); + if (!result) { + (cachedDeclarationDiagnosticsForFile ?? (cachedDeclarationDiagnosticsForFile = /* @__PURE__ */ new Map())).set( + sourceFile.path, + result = getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) + ); + } + return result; } function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) { return runWithCancellationToken(() => { @@ -131359,34 +134282,20 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return getDeclarationDiagnostics(getEmitHost(noop), resolver, sourceFile) || emptyArray; }); } - function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics2) { - var _a2; - const cachedResult = sourceFile ? (_a2 = cache.perFile) == null ? void 0 : _a2.get(sourceFile.path) : cache.allDiagnostics; - if (cachedResult) { - return cachedResult; - } - const result = getDiagnostics2(sourceFile, cancellationToken); - if (sourceFile) { - (cache.perFile || (cache.perFile = /* @__PURE__ */ new Map())).set(sourceFile.path, result); - } else { - cache.allDiagnostics = result; - } - return result; - } function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) { - return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken); + return sourceFile.isDeclarationFile ? emptyArray : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken); } function getOptionsDiagnostics() { return sortAndDeduplicateDiagnostics(concatenate( - updateAndGetProgramDiagnostics().getGlobalDiagnostics(), + programDiagnostics.getCombinedDiagnostics(program).getGlobalDiagnostics(), getOptionsDiagnosticsOfConfigFile() )); } function getOptionsDiagnosticsOfConfigFile() { if (!options.configFile) return emptyArray; - let diagnostics = updateAndGetProgramDiagnostics().getDiagnostics(options.configFile.fileName); + let diagnostics = programDiagnostics.getCombinedDiagnostics(program).getDiagnostics(options.configFile.fileName); forEachResolvedProjectReference2((resolvedRef) => { - diagnostics = concatenate(diagnostics, updateAndGetProgramDiagnostics().getDiagnostics(resolvedRef.sourceFile.fileName)); + diagnostics = concatenate(diagnostics, programDiagnostics.getCombinedDiagnostics(program).getDiagnostics(resolvedRef.sourceFile.fileName)); }); return diagnostics; } @@ -131454,7 +134363,21 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || isJavaScriptFile) { - collectDynamicImportOrRequireOrJsDocImportCalls(file); + forEachDynamicImportOrRequireCall( + file, + /*includeTypeSpaceImports*/ + true, + /*requireStringLiteralLikeArgument*/ + true, + (node, moduleSpecifier) => { + setParentRecursive( + node, + /*incremental*/ + false + ); + imports = append(imports, moduleSpecifier); + } + ); } file.imports = imports || emptyArray; file.moduleAugmentations = moduleAugmentations || emptyArray; @@ -131471,7 +134394,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); imports = append(imports, moduleNameExpr); if (!usesUriStyleNodeCoreModules && currentNodeModulesDepth === 0 && !file.isDeclarationFile) { - usesUriStyleNodeCoreModules = startsWith(moduleNameExpr.text, "node:"); + if (startsWith(moduleNameExpr.text, "node:") && !exclusivelyPrefixedNodeCoreModules.has(moduleNameExpr.text)) { + usesUriStyleNodeCoreModules = true; + } else if (usesUriStyleNodeCoreModules === void 0 && unprefixedNodeCoreModules.has(moduleNameExpr.text)) { + usesUriStyleNodeCoreModules = false; + } } } } else if (isModuleDeclaration(node)) { @@ -131498,63 +134425,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } } - function collectDynamicImportOrRequireOrJsDocImportCalls(file2) { - const r = /import|require/g; - while (r.exec(file2.text) !== null) { - const node = getNodeAtPosition(file2, r.lastIndex); - if (isJavaScriptFile && isRequireCall( - node, - /*requireStringLiteralLikeArgument*/ - true - )) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, node.arguments[0]); - } else if (isImportCall(node) && node.arguments.length >= 1 && isStringLiteralLike(node.arguments[0])) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, node.arguments[0]); - } else if (isLiteralImportTypeNode(node)) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, node.argument.literal); - } else if (isJavaScriptFile && isJSDocImportTag(node)) { - const moduleNameExpr = getExternalModuleName(node); - if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, moduleNameExpr); - } - } - } - } - function getNodeAtPosition(sourceFile, position) { - let current = sourceFile; - const getContainingChild = (child) => { - if (child.pos <= position && (position < child.end || position === child.end && child.kind === 1 /* EndOfFileToken */)) { - return child; - } - }; - while (true) { - const child = isJavaScriptFile && hasJSDocNodes(current) && forEach(current.jsDoc, getContainingChild) || forEachChild(current, getContainingChild); - if (!child) { - return current; - } - current = child; - } - } } function getLibFileFromReference(ref) { var _a2; @@ -131581,9 +134451,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const sourceFile = getSourceFile2(fileName); if (fail) { if (!sourceFile) { - const redirect = getProjectReferenceRedirect(fileName); - if (redirect) { - fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName); + const redirect = getRedirectFromSourceFile(fileName); + if (redirect == null ? void 0 : redirect.outputDts) { + fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect.outputDts, fileName); } else { fail(Diagnostics.File_0_not_found, fileName); } @@ -131632,7 +134502,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } function reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason) { - const hasExistingReasonToReportErrorOn = !isReferencedFile(reason) && some(fileReasons.get(existingFile.path), isReferencedFile); + const hasExistingReasonToReportErrorOn = !isReferencedFile(reason) && some(programDiagnostics.getFileReasons().get(existingFile.path), isReferencedFile); if (hasExistingReasonToReportErrorOn) { addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [existingFile.fileName, fileName]); } else { @@ -131669,16 +134539,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2; + var _a2, _b2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { - let source = getSourceOfProjectReferenceRedirect(path); + let source = getRedirectFromOutput(path); if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) { const realPath2 = toPath3(host.realpath(fileName)); - if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2); + if (realPath2 !== path) source = getRedirectFromOutput(realPath2); } - if (source) { - const file2 = isString(source) ? findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) : void 0; + if (source == null ? void 0 : source.source) { + const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId); if (file2) addFileToFilesByName( file2, path, @@ -131702,7 +134572,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const checkedName = file2.fileName; const isRedirect = toPath3(checkedName) !== toPath3(fileName); if (isRedirect) { - fileName = getProjectReferenceRedirect(fileName) || fileName; + fileName = ((_a2 = getRedirectFromSourceFile(fileName)) == null ? void 0 : _a2.outputDts) || fileName; } const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory); const inputAbsolutePath = getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory); @@ -131731,14 +134601,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } let redirectedPath; if (!useSourceOfProjectReferenceRedirect) { - const redirectProject = getProjectReferenceRedirectProject(fileName); - if (redirectProject) { - if (redirectProject.commandLine.options.outFile) { + const redirectProject = getRedirectFromSourceFile(fileName); + if (redirectProject == null ? void 0 : redirectProject.outputDts) { + if (redirectProject.resolvedRef.commandLine.options.outFile) { return void 0; } - const redirect = getProjectReferenceOutputName(redirectProject, fileName); - fileName = redirect; - redirectedPath = toPath3(redirect); + fileName = redirectProject.outputDts; + redirectedPath = toPath3(redirectProject.outputDts); } } const sourceFileOptions = getCreateSourceFileOptions(fileName, moduleResolutionCache, host, options); @@ -131782,7 +134651,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config file.path = path; file.resolvedPath = toPath3(fileName); file.originalFileName = originalFileName; - file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; + file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0; file.packageJsonScope = sourceFileOptions.packageJsonScope; addFileIncludeReason( file, @@ -131819,7 +134688,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function addFileIncludeReason(file, reason, checkExisting) { if (file && (!checkExisting || !isReferencedFile(reason) || !(filesWithReferencesProcessed == null ? void 0 : filesWithReferencesProcessed.has(reason.file)))) { - fileReasons.add(file.path, reason); + programDiagnostics.getFileReasons().add(file.path, reason); return true; } return false; @@ -131837,59 +134706,17 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (file !== void 0) missingFileNames.delete(path); else missingFileNames.set(path, fileName); } - function getProjectReferenceRedirect(fileName) { - const referencedProject = getProjectReferenceRedirectProject(fileName); - return referencedProject && getProjectReferenceOutputName(referencedProject, fileName); - } - function getProjectReferenceRedirectProject(fileName) { - if (!resolvedProjectReferences || !resolvedProjectReferences.length || isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".json" /* Json */)) { - return void 0; - } - return getResolvedProjectReferenceToRedirect(fileName); - } - function getProjectReferenceOutputName(referencedProject, fileName) { - const out = referencedProject.commandLine.options.outFile; - return out ? changeExtension(out, ".d.ts" /* Dts */) : getOutputDeclarationFileName(fileName, referencedProject.commandLine, !host.useCaseSensitiveFileNames()); - } - function getResolvedProjectReferenceToRedirect(fileName) { - if (mapFromFileToProjectReferenceRedirects === void 0) { - mapFromFileToProjectReferenceRedirects = /* @__PURE__ */ new Map(); - forEachResolvedProjectReference2((referencedProject) => { - if (toPath3(options.configFilePath) !== referencedProject.sourceFile.path) { - referencedProject.commandLine.fileNames.forEach((f) => mapFromFileToProjectReferenceRedirects.set(toPath3(f), referencedProject.sourceFile.path)); - } - }); - } - const referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath3(fileName)); - return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath); + function getRedirectFromSourceFile(fileName) { + return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName)); } function forEachResolvedProjectReference2(cb) { return forEachResolvedProjectReference(resolvedProjectReferences, cb); } - function getSourceOfProjectReferenceRedirect(path) { - if (!isDeclarationFileName(path)) return void 0; - if (mapFromToProjectReferenceRedirectSource === void 0) { - mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map(); - forEachResolvedProjectReference2((resolvedRef) => { - const out = resolvedRef.commandLine.options.outFile; - if (out) { - const outputDts = changeExtension(out, ".d.ts" /* Dts */); - mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), true); - } else { - const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); - forEach(resolvedRef.commandLine.fileNames, (fileName) => { - if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) { - const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3); - mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), fileName); - } - }); - } - }); - } - return mapFromToProjectReferenceRedirectSource.get(path); + function getRedirectFromOutput(path) { + return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path); } function isSourceOfProjectReferenceRedirect(fileName) { - return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName); + return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName); } function getResolvedProjectReferenceByPath(projectReferencePath) { if (!projectReferenceRedirects) { @@ -131920,11 +134747,15 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const ref = file.typeReferenceDirectives[index]; const resolvedTypeReferenceDirective = resolutions[index]; const fileName = ref.fileName; - resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective); - const mode = ref.resolutionMode || file.impliedNodeFormat; + const mode = getModeForTypeReferenceDirectiveInFile(ref, file); + resolutionsInFile.set(fileName, mode, resolvedTypeReferenceDirective); processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index }); } } + function getCompilerOptionsForFile(file) { + var _a2; + return ((_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options) || options; + } function processTypeReferenceDirective(typeReferenceDirective, mode, resolution, reason) { var _a2, _b2; (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolution.resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : void 0 }); @@ -131967,6 +134798,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config var _a2, _b2, _c2, _d2, _e2; const existing = resolvedLibProcessing == null ? void 0 : resolvedLibProcessing.get(libFileName); if (existing) return existing; + if (options.libReplacement === false) { + const result2 = { + resolution: { + resolvedModule: void 0 + }, + actual: combinePaths(defaultLibraryPath, libFileName) + }; + (resolvedLibProcessing ?? (resolvedLibProcessing = /* @__PURE__ */ new Map())).set(libFileName, result2); + return result2; + } if (structureIsReused !== 0 /* Not */ && oldProgram && !hasInvalidatedLibResolutions(libFileName)) { const oldResolution = (_a2 = oldProgram.resolvedLibReferences) == null ? void 0 : _a2.get(libFileName); if (oldResolution) { @@ -132014,7 +134855,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config { kind: 7 /* LibReferenceDirective */, file: file.path, index } ); } else { - (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({ + programDiagnostics.addFileProcessingDiagnostic({ kind: 0 /* FilePreprocessingLibReferenceDiagnostic */, reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index } }); @@ -132025,13 +134866,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return host.getCanonicalFileName(fileName); } function processImportedModules(file) { - var _a2; collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { const moduleNames = getModuleNames(file); const resolutions = (resolvedModulesProcessing == null ? void 0 : resolvedModulesProcessing.get(file.path)) || resolveModuleNamesReusingOldState(moduleNames, file); Debug.assert(resolutions.length === moduleNames.length); - const optionsForFile = ((_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options) || options; + const optionsForFile = getCompilerOptionsForFile(file); const resolutionsInFile = createModeAwareCache(); (resolvedModules ?? (resolvedModules = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < moduleNames.length; index++) { @@ -132044,7 +134884,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config continue; } const isFromNodeModulesSearch = resolution.isExternalLibraryImport; - const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName); + const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getRedirectFromSourceFile(resolution.resolvedFileName); const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName)); const resolvedFileName = resolution.resolvedFileName; if (isFromNodeModulesSearch) { @@ -132078,10 +134918,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (!sourceFile.isDeclarationFile) { const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)); if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) { - addLazyProgramDiagnosticExplainingFile( + programDiagnostics.addLazyConfigDiagnostic( sourceFile, Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, - [sourceFile.fileName, rootDirectory] + sourceFile.fileName, + rootDirectory ); allFilesBelongToPath = false; } @@ -132153,6 +134994,29 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFile.originalFileName = refPath; const resolvedRef = { commandLine, sourceFile }; projectReferenceRedirects.set(sourceFilePath, resolvedRef); + if (options.configFile !== sourceFile) { + mapSourceFileToResolvedRef ?? (mapSourceFileToResolvedRef = /* @__PURE__ */ new Map()); + mapOutputFileToResolvedRef ?? (mapOutputFileToResolvedRef = /* @__PURE__ */ new Map()); + let outDts; + if (commandLine.options.outFile) { + outDts = changeExtension(commandLine.options.outFile, ".d.ts" /* Dts */); + mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.set(toPath3(outDts), { resolvedRef }); + } + const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); + commandLine.fileNames.forEach((fileName) => { + const path = toPath3(fileName); + let outputDts; + if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) { + if (!commandLine.options.outFile) { + outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3); + mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName }); + } else { + outputDts = outDts; + } + } + mapSourceFileToResolvedRef.set(path, { resolvedRef, outputDts }); + }); + } if (commandLine.projectReferences) { resolvedRef.references = commandLine.projectReferences.map(parseProjectReferenceConfigFile); } @@ -132195,12 +135059,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } const outputFile = options.outFile; - if (options.tsBuildInfoFile) { - if (!isIncrementalCompilation(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "tsBuildInfoFile", "incremental", "composite"); - } - } else if (options.incremental && !outputFile && !options.configFilePath) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); + if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) { + programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } verifyDeprecatedCompilerOptions(); verifyProjectReferences(); @@ -132208,10 +135068,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const rootPaths = new Set(rootNames.map(toPath3)); for (const file of files) { if (sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) { - addLazyProgramDiagnosticExplainingFile( + programDiagnostics.addLazyConfigDiagnostic( file, Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, - [file.fileName, options.configFilePath || ""] + file.fileName, + options.configFilePath || "" ); } } @@ -132302,14 +135163,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) { const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator); - programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none)); + programDiagnostics.addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none)); } if (outputFile && !options.emitDeclarationOnly) { if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) { createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module"); } else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) { const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator); - programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile")); + programDiagnostics.addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile")); } } if (getResolveJsonModule(options)) { @@ -132322,7 +135183,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (options.outDir || // there is --outDir specified options.rootDir || // there is --rootDir specified options.sourceRoot || // there is --sourceRoot specified - options.mapRoot) { + options.mapRoot || // there is --mapRoot specified + getEmitDeclarations(options) && options.declarationDir) { const dir = getCommonSourceDirectory2(); if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) { createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir"); @@ -132335,14 +135197,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (!getEmitDeclarations(options)) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite"); } - if (options.noEmit) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit"); - } - } - if (options.noCheck) { - if (options.noEmit) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit"); - } } if (options.emitDecoratorMetadata && !options.experimentalDecorators) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"); @@ -132387,7 +135241,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax"); } } - if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) { + if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly || options.rewriteRelativeImportExtensions)) { createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set); } const moduleResolution = getEmitModuleResolutionKind(options); @@ -132405,7 +135259,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { const moduleKindName = ModuleKind[moduleKind]; - createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); + const moduleResolutionName = ModuleResolutionKind[moduleKindName] ? moduleKindName : "Node16"; + createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleResolutionName, moduleKindName); } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) { const moduleResolutionName = ModuleResolutionKind[moduleResolution]; createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); @@ -132454,7 +135309,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } return Version.zero; } - function checkDeprecations(deprecatedIn, stopsWorkingIn, removedIn, createDiagnostic, fn) { + function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) { const deprecatedInVersion = new Version(deprecatedIn); const removedInVersion = new Version(removedIn); const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor); @@ -132471,9 +135326,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } else { if (value === void 0) { - createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, stopsWorkingIn, deprecatedIn); + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn); } else { - createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, stopsWorkingIn, deprecatedIn); + createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn); } } }); @@ -132509,7 +135364,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } } - checkDeprecations("5.0", "5.5", "6.0", createDiagnostic, (createDeprecatedDiagnostic) => { + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { if (options.target === 0 /* ES3 */) { createDeprecatedDiagnostic("target", "ES3"); } @@ -132561,96 +135416,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config function createDiagnostic(_name, _value, _useInstead, message, ...args) { createDiagnosticForReference(parentFile, index, message, ...args); } - checkDeprecations("5.0", "5.5", "6.0", createDiagnostic, (createDeprecatedDiagnostic) => { + checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { if (ref.prepend) { createDeprecatedDiagnostic("prepend"); } }); } - function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { - let seenReasons; - const reasons = file && fileReasons.get(file.path); - let fileIncludeReasons; - let relatedInfo; - let locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0; - let fileIncludeReasonDetails; - let redirectInfo; - let cachedChain = file && (fileReasonsToChain == null ? void 0 : fileReasonsToChain.get(file.path)); - let chain; - if (cachedChain) { - if (cachedChain.fileIncludeReasonDetails) { - seenReasons = new Set(reasons); - reasons == null ? void 0 : reasons.forEach(populateRelatedInfo); - } else { - reasons == null ? void 0 : reasons.forEach(processReason); - } - redirectInfo = cachedChain.redirectInfo; - } else { - reasons == null ? void 0 : reasons.forEach(processReason); - redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file); - } - if (fileProcessingReason) processReason(fileProcessingReason); - const processedExtraReason = (seenReasons == null ? void 0 : seenReasons.size) !== (reasons == null ? void 0 : reasons.length); - if (locationReason && (seenReasons == null ? void 0 : seenReasons.size) === 1) seenReasons = void 0; - if (seenReasons && cachedChain) { - if (cachedChain.details && !processedExtraReason) { - chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args || emptyArray); - } else if (cachedChain.fileIncludeReasonDetails) { - if (!processedExtraReason) { - if (!cachedFileIncludeDetailsHasProcessedExtraReason()) { - fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails; - } else { - fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length); - } - } else { - if (!cachedFileIncludeDetailsHasProcessedExtraReason()) { - fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]]; - } else { - fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]); - } - } - } - } - if (!chain) { - if (!fileIncludeReasonDetails) fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon); - chain = chainDiagnosticMessages( - redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, - diagnostic, - ...args || emptyArray - ); - } - if (file) { - if (cachedChain) { - if (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) { - cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails; - } - } else { - (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo }); - } - if (!cachedChain.details && !processedExtraReason) cachedChain.details = chain.next; - } - const location = locationReason && getReferencedFileLocation(program, locationReason); - return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo); - function processReason(reason) { - if (seenReasons == null ? void 0 : seenReasons.has(reason)) return; - (seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason); - (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason)); - populateRelatedInfo(reason); - } - function populateRelatedInfo(reason) { - if (!locationReason && isReferencedFile(reason)) { - locationReason = reason; - } else if (locationReason !== reason) { - relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(reason)); - } - } - function cachedFileIncludeDetailsHasProcessedExtraReason() { - var _a2; - return ((_a2 = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a2.length) !== (reasons == null ? void 0 : reasons.length); - } - } function addFilePreprocessingFileExplainingDiagnostic(file, fileProcessingReason, diagnostic, args) { - (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({ + programDiagnostics.addFileProcessingDiagnostic({ kind: 1 /* FilePreprocessingFileExplainingDiagnostic */, file: file && file.path, fileProcessingReason, @@ -132658,118 +135431,33 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config args }); } - function addLazyProgramDiagnosticExplainingFile(file, diagnostic, args) { - lazyProgramDiagnosticExplainingFile.push({ file, diagnostic, args }); - } - function getFileIncludeReasonToRelatedInformation(reason) { - let relatedInfo = reasonToRelatedInfo == null ? void 0 : reasonToRelatedInfo.get(reason); - if (relatedInfo === void 0) (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(reason) ?? false); - return relatedInfo || void 0; - } - function fileIncludeReasonToRelatedInformation(reason) { - if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation(program, reason); - let message2; - switch (reason.kind) { - case 3 /* Import */: - message2 = Diagnostics.File_is_included_via_import_here; - break; - case 4 /* ReferenceFile */: - message2 = Diagnostics.File_is_included_via_reference_here; - break; - case 5 /* TypeReferenceDirective */: - message2 = Diagnostics.File_is_included_via_type_library_reference_here; - break; - case 7 /* LibReferenceDirective */: - message2 = Diagnostics.File_is_included_via_library_reference_here; - break; - default: - Debug.assertNever(reason); - } - return isReferenceFileLocation(referenceLocation) ? createFileDiagnostic( - referenceLocation.file, - referenceLocation.pos, - referenceLocation.end - referenceLocation.pos, - message2 - ) : void 0; - } - if (!options.configFile) return void 0; - let configFileNode; - let message; - switch (reason.kind) { - case 0 /* RootFile */: - if (!options.configFile.configFileSpecs) return void 0; - const fileName = getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory); - const matchedByFiles = getMatchedFileSpec(program, fileName); - if (matchedByFiles) { - configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles); - message = Diagnostics.File_is_matched_by_files_list_specified_here; - break; - } - const matchedByInclude = getMatchedIncludeSpec(program, fileName); - if (!matchedByInclude || !isString(matchedByInclude)) return void 0; - configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude); - message = Diagnostics.File_is_matched_by_include_pattern_specified_here; - break; - case 1 /* SourceFromProjectReference */: - case 2 /* OutputFromProjectReference */: - const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]); - const referenceInfo = forEachProjectReference(projectReferences, resolvedProjectReferences, (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0); - if (!referenceInfo) return void 0; - const { sourceFile, index } = referenceInfo; - const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); - return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( - sourceFile, - referencesSyntax.elements[index], - reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here - ) : void 0; - case 8 /* AutomaticTypeDirectiveFile */: - if (!options.types) return void 0; - configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference); - message = Diagnostics.File_is_entry_point_of_type_library_specified_here; - break; - case 6 /* LibFile */: - if (reason.index !== void 0) { - configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]); - message = Diagnostics.File_is_library_specified_here; - break; - } - const target = getNameOfScriptTarget(getEmitScriptTarget(options)); - configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0; - message = Diagnostics.File_is_default_library_for_target_specified_here; - break; - default: - Debug.assertNever(reason); - } - return configFileNode && createDiagnosticForNodeInSourceFile( - options.configFile, - configFileNode, - message - ); - } function verifyProjectReferences() { const buildInfoPath = !options.suppressOutputPathCheck ? getTsBuildInfoEmitOutputFilePath(options) : void 0; - forEachProjectReference(projectReferences, resolvedProjectReferences, (resolvedRef, parent2, index) => { - const ref = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index]; - const parentFile = parent2 && parent2.sourceFile; - verifyDeprecatedProjectReference(ref, parentFile, index); - if (!resolvedRef) { - createDiagnosticForReference(parentFile, index, Diagnostics.File_0_not_found, ref.path); - return; - } - const options2 = resolvedRef.commandLine.options; - if (!options2.composite || options2.noEmit) { - const inputs = parent2 ? parent2.commandLine.fileNames : rootNames; - if (inputs.length) { - if (!options2.composite) createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true, ref.path); - if (options2.noEmit) createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_may_not_disable_emit, ref.path); + forEachProjectReference( + projectReferences, + resolvedProjectReferences, + (resolvedRef, parent2, index) => { + const ref = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index]; + const parentFile = parent2 && parent2.sourceFile; + verifyDeprecatedProjectReference(ref, parentFile, index); + if (!resolvedRef) { + createDiagnosticForReference(parentFile, index, Diagnostics.File_0_not_found, ref.path); + return; + } + const options2 = resolvedRef.commandLine.options; + if (!options2.composite || options2.noEmit) { + const inputs = parent2 ? parent2.commandLine.fileNames : rootNames; + if (inputs.length) { + if (!options2.composite) createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true, ref.path); + if (options2.noEmit) createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_may_not_disable_emit, ref.path); + } + } + if (!parent2 && buildInfoPath && buildInfoPath === getTsBuildInfoEmitOutputFilePath(options2)) { + createDiagnosticForReference(parentFile, index, Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, buildInfoPath, ref.path); + hasEmitBlockingDiagnostics.set(toPath3(buildInfoPath), true); } } - if (!parent2 && buildInfoPath && buildInfoPath === getTsBuildInfoEmitOutputFilePath(options2)) { - createDiagnosticForReference(parentFile, index, Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, buildInfoPath, ref.path); - hasEmitBlockingDiagnostics.set(toPath3(buildInfoPath), true); - } - }); + ); } function createDiagnosticForOptionPathKeyValue(key, valueIndex, message, ...args) { let needCompilerDiagnostic = true; @@ -132778,7 +135466,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => { const initializer = keyProps.initializer; if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args)); + programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args)); needCompilerDiagnostic = false; } }); @@ -132807,18 +135495,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config createCompilerOptionsDiagnostic(message, ...args); } } - function forEachOptionsSyntaxByName(name, callback) { - return forEachPropertyAssignment(getCompilerOptionsObjectLiteralSyntax(), name, callback); - } function forEachOptionPathsSyntax(callback) { - return forEachOptionsSyntaxByName("paths", callback); - } - function getOptionsSyntaxByValue(name, value) { - return forEachOptionsSyntaxByName(name, (property) => isStringLiteral(property.initializer) && property.initializer.text === value ? property.initializer : void 0); - } - function getOptionsSyntaxByArrayElementValue(name, value) { - const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - return compilerOptionsObjectLiteralSyntax && getPropertyArrayElementValue(compilerOptionsObjectLiteralSyntax, name, value); + return forEachOptionsSyntaxByName(getCompilerOptionsObjectLiteralSyntax(), "paths", callback); } function createDiagnosticForOptionName(message, option1, option2, option3) { createDiagnosticForOption( @@ -132846,9 +135524,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config function createDiagnosticForReference(sourceFile, index, message, ...args) { const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); if (referencesSyntax && referencesSyntax.elements.length > index) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); + programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, ...args)); + programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(message, ...args)); } } function createDiagnosticForOption(onKey, option1, option2, message, ...args) { @@ -132862,14 +135540,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const compilerOptionsProperty = getCompilerOptionsPropertySyntax(); if (compilerOptionsProperty) { if ("messageText" in message) { - programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message)); + programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message)); } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args)); + programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args)); } } else if ("messageText" in message) { - programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message)); + programDiagnostics.addConfigDiagnostic(createCompilerDiagnosticFromMessageChain(message)); } else { - programDiagnostics.add(createCompilerDiagnostic(message, ...args)); + programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(message, ...args)); } } function getCompilerOptionsObjectLiteralSyntax() { @@ -132893,9 +135571,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config let needsCompilerDiagnostic = false; forEachPropertyAssignment(objectLiteral, key1, (prop) => { if ("messageText" in message) { - programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); + programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args)); + programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args)); } needsCompilerDiagnostic = true; }, key2); @@ -132903,7 +135581,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function blockEmittingOfFile(emitFileName, diag2) { hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true); - programDiagnostics.add(diag2); + programDiagnostics.addConfigDiagnostic(diag2); } function isEmittedFile(file) { if (options.noEmit) { @@ -132945,13 +135623,56 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return symlinks; } function getModeForUsageLocation2(file, usage) { - var _a2; - const optionsForFile = ((_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options) || options; - return getModeForUsageLocationWorker(file, usage, optionsForFile); + return getModeForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file)); + } + function getEmitSyntaxForUsageLocation(file, usage) { + return getEmitSyntaxForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file)); } function getModeForResolutionAtIndex2(file, index) { return getModeForUsageLocation2(file, getModuleNameStringLiteralAt(file, index)); } + function getDefaultResolutionModeForFile2(sourceFile) { + return getDefaultResolutionModeForFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); + } + function getImpliedNodeFormatForEmit2(sourceFile) { + return getImpliedNodeFormatForEmitWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); + } + function getEmitModuleFormatOfFile2(sourceFile) { + return getEmitModuleFormatOfFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); + } + function shouldTransformImportCall(sourceFile) { + return shouldTransformImportCallWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); + } + function getModeForTypeReferenceDirectiveInFile(ref, sourceFile) { + return ref.resolutionMode || getDefaultResolutionModeForFile2(sourceFile); + } +} +function shouldTransformImportCallWorker(sourceFile, options) { + const moduleKind = getEmitModuleKind(options); + if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ || moduleKind === 200 /* Preserve */) { + return false; + } + return getEmitModuleFormatOfFileWorker(sourceFile, options) < 5 /* ES2015 */; +} +function getEmitModuleFormatOfFileWorker(sourceFile, options) { + return getImpliedNodeFormatForEmitWorker(sourceFile, options) ?? getEmitModuleKind(options); +} +function getImpliedNodeFormatForEmitWorker(sourceFile, options) { + var _a, _b; + const moduleKind = getEmitModuleKind(options); + if (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) { + return sourceFile.impliedNodeFormat; + } + if (sourceFile.impliedNodeFormat === 1 /* CommonJS */ && (((_a = sourceFile.packageJsonScope) == null ? void 0 : _a.contents.packageJsonContent.type) === "commonjs" || fileExtensionIsOneOf(sourceFile.fileName, [".cjs" /* Cjs */, ".cts" /* Cts */]))) { + return 1 /* CommonJS */; + } + if (sourceFile.impliedNodeFormat === 99 /* ESNext */ && (((_b = sourceFile.packageJsonScope) == null ? void 0 : _b.contents.packageJsonContent.type) === "module" || fileExtensionIsOneOf(sourceFile.fileName, [".mjs" /* Mjs */, ".mts" /* Mts */]))) { + return 99 /* ESNext */; + } + return void 0; +} +function getDefaultResolutionModeForFileWorker(sourceFile, options) { + return importSyntaxAffectsModuleResolution(options) ? getImpliedNodeFormatForEmitWorker(sourceFile, options) : void 0; } function updateHostForUseSourceOfProjectReferenceRedirect(host) { let setOfDeclarationDirectories; @@ -133016,8 +135737,8 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) { ); } function fileExistsIfProjectReferenceDts(file) { - const source = host.getSourceOfProjectReferenceRedirect(host.toPath(file)); - return source !== void 0 ? isString(source) ? originalFileExists.call(host.compilerHost, source) : true : void 0; + const source = host.getRedirectFromOutput(host.toPath(file)); + return source !== void 0 ? isString(source.source) ? originalFileExists.call(host.compilerHost, source.source) : true : void 0; } function directoryExistsIfProjectReferenceDeclDir(dir) { const dirPath = host.toPath(dir); @@ -133049,7 +135770,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) { } function fileOrDirectoryExistsUsingSource(fileOrDirectory, isFile) { var _a; - const fileOrDirectoryExistsUsingSource2 = isFile ? (file) => fileExistsIfProjectReferenceDts(file) : (dir) => directoryExistsIfProjectReferenceDeclDir(dir); + const fileOrDirectoryExistsUsingSource2 = isFile ? fileExistsIfProjectReferenceDts : directoryExistsIfProjectReferenceDeclDir; const result = fileOrDirectoryExistsUsingSource2(fileOrDirectory); if (result !== void 0) return result; const symlinkCache = host.getSymlinkCache(); @@ -133079,8 +135800,7 @@ var emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: void 0 function handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) { const options = program.getCompilerOptions(); if (options.noEmit) { - program.getSemanticDiagnostics(sourceFile, cancellationToken); - return sourceFile || options.outFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken); + return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken); } if (!options.noEmitOnError) return void 0; let diagnostics = [ @@ -133098,7 +135818,7 @@ function handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) } if (!diagnostics.length) return void 0; let emittedFiles; - if (!sourceFile && !options.outFile) { + if (!sourceFile) { const emitResult = program.emitBuildInfo(writeFile2, cancellationToken); if (emitResult.diagnostics) diagnostics = [...diagnostics, ...emitResult.diagnostics]; emittedFiles = emitResult.emittedFiles; @@ -133184,6 +135904,293 @@ function getModuleNameStringLiteralAt({ imports, moduleAugmentations }, index) { Debug.fail("should never ask for module name at index higher than possible module name"); } +// src/compiler/programDiagnostics.ts +function createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax) { + let computedDiagnostics; + let fileReasons = createMultiMap(); + let fileProcessingDiagnostics; + let commonSourceDirectory; + let configDiagnostics; + let lazyConfigDiagnostics; + let fileReasonsToChain; + let reasonToRelatedInfo; + return { + addConfigDiagnostic(diag2) { + Debug.assert(computedDiagnostics === void 0, "Cannot modify program diagnostic state after requesting combined diagnostics"); + (configDiagnostics ?? (configDiagnostics = createDiagnosticCollection())).add(diag2); + }, + addLazyConfigDiagnostic(file, message, ...args) { + Debug.assert(computedDiagnostics === void 0, "Cannot modify program diagnostic state after requesting combined diagnostics"); + (lazyConfigDiagnostics ?? (lazyConfigDiagnostics = [])).push({ file, diagnostic: message, args }); + }, + addFileProcessingDiagnostic(diag2) { + Debug.assert(computedDiagnostics === void 0, "Cannot modify program diagnostic state after requesting combined diagnostics"); + (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push(diag2); + }, + setCommonSourceDirectory(directory) { + commonSourceDirectory = directory; + }, + reuseStateFromOldProgram(oldProgramDiagnostics, isConfigIdentical) { + fileReasons = oldProgramDiagnostics.getFileReasons(); + fileProcessingDiagnostics = oldProgramDiagnostics.getFileProcessingDiagnostics(); + if (isConfigIdentical) { + commonSourceDirectory = oldProgramDiagnostics.getCommonSourceDirectory(); + configDiagnostics = oldProgramDiagnostics.getConfigDiagnostics(); + lazyConfigDiagnostics = oldProgramDiagnostics.getLazyConfigDiagnostics(); + } + }, + getFileProcessingDiagnostics() { + return fileProcessingDiagnostics; + }, + getFileReasons() { + return fileReasons; + }, + getCommonSourceDirectory() { + return commonSourceDirectory; + }, + getConfigDiagnostics() { + return configDiagnostics; + }, + getLazyConfigDiagnostics() { + return lazyConfigDiagnostics; + }, + getCombinedDiagnostics(program) { + if (computedDiagnostics) { + return computedDiagnostics; + } + computedDiagnostics = createDiagnosticCollection(); + configDiagnostics == null ? void 0 : configDiagnostics.getDiagnostics().forEach((d) => computedDiagnostics.add(d)); + fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => { + switch (diagnostic.kind) { + case 1 /* FilePreprocessingFileExplainingDiagnostic */: + return computedDiagnostics.add( + createDiagnosticExplainingFile( + program, + diagnostic.file && program.getSourceFileByPath(diagnostic.file), + diagnostic.fileProcessingReason, + diagnostic.diagnostic, + diagnostic.args || emptyArray + ) + ); + case 0 /* FilePreprocessingLibReferenceDiagnostic */: + return computedDiagnostics.add(filePreprocessingLibreferenceDiagnostic(program, diagnostic)); + case 2 /* ResolutionDiagnostics */: + return diagnostic.diagnostics.forEach((d) => computedDiagnostics.add(d)); + default: + Debug.assertNever(diagnostic); + } + }); + lazyConfigDiagnostics == null ? void 0 : lazyConfigDiagnostics.forEach( + ({ file, diagnostic, args }) => computedDiagnostics.add( + createDiagnosticExplainingFile( + program, + file, + /*fileProcessingReason*/ + void 0, + diagnostic, + args + ) + ) + ); + fileReasonsToChain = void 0; + reasonToRelatedInfo = void 0; + return computedDiagnostics; + } + }; + function filePreprocessingLibreferenceDiagnostic(program, { reason }) { + const { file, pos, end } = getReferencedFileLocation(program, reason); + const libReference = file.libReferenceDirectives[reason.index]; + const libName = getLibNameFromLibReference(libReference); + const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts"); + const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity); + return createFileDiagnostic( + file, + Debug.checkDefined(pos), + Debug.checkDefined(end) - pos, + suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0, + libName, + suggestion + ); + } + function createDiagnosticExplainingFile(program, file, fileProcessingReason, diagnostic, args) { + let seenReasons; + let fileIncludeReasons; + let relatedInfo; + let fileIncludeReasonDetails; + let redirectInfo; + let chain; + const reasons = file && fileReasons.get(file.path); + let locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0; + let cachedChain = file && (fileReasonsToChain == null ? void 0 : fileReasonsToChain.get(file.path)); + if (cachedChain) { + if (cachedChain.fileIncludeReasonDetails) { + seenReasons = new Set(reasons); + reasons == null ? void 0 : reasons.forEach(populateRelatedInfo); + } else { + reasons == null ? void 0 : reasons.forEach(processReason); + } + redirectInfo = cachedChain.redirectInfo; + } else { + reasons == null ? void 0 : reasons.forEach(processReason); + redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, program.getCompilerOptionsForFile(file)); + } + if (fileProcessingReason) processReason(fileProcessingReason); + const processedExtraReason = (seenReasons == null ? void 0 : seenReasons.size) !== (reasons == null ? void 0 : reasons.length); + if (locationReason && (seenReasons == null ? void 0 : seenReasons.size) === 1) seenReasons = void 0; + if (seenReasons && cachedChain) { + if (cachedChain.details && !processedExtraReason) { + chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args ?? emptyArray); + } else if (cachedChain.fileIncludeReasonDetails) { + if (!processedExtraReason) { + if (!cachedFileIncludeDetailsHasProcessedExtraReason()) { + fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails; + } else { + fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length); + } + } else { + if (!cachedFileIncludeDetailsHasProcessedExtraReason()) { + fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]]; + } else { + fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]); + } + } + } + } + if (!chain) { + if (!fileIncludeReasonDetails) fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon); + chain = chainDiagnosticMessages( + redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, + diagnostic, + ...args || emptyArray + ); + } + if (file) { + if (cachedChain) { + if (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) { + cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails; + } + } else { + (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo }); + } + if (!cachedChain.details && !processedExtraReason) cachedChain.details = chain.next; + } + const location = locationReason && getReferencedFileLocation(program, locationReason); + return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo); + function processReason(reason) { + if (seenReasons == null ? void 0 : seenReasons.has(reason)) return; + (seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason); + (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason)); + populateRelatedInfo(reason); + } + function populateRelatedInfo(reason) { + if (!locationReason && isReferencedFile(reason)) { + locationReason = reason; + } else if (locationReason !== reason) { + relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(program, reason)); + } + } + function cachedFileIncludeDetailsHasProcessedExtraReason() { + var _a; + return ((_a = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a.length) !== (reasons == null ? void 0 : reasons.length); + } + } + function getFileIncludeReasonToRelatedInformation(program, reason) { + let relatedInfo = reasonToRelatedInfo == null ? void 0 : reasonToRelatedInfo.get(reason); + if (relatedInfo === void 0) (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(program, reason) ?? false); + return relatedInfo || void 0; + } + function fileIncludeReasonToRelatedInformation(program, reason) { + if (isReferencedFile(reason)) { + const referenceLocation = getReferencedFileLocation(program, reason); + let message2; + switch (reason.kind) { + case 3 /* Import */: + message2 = Diagnostics.File_is_included_via_import_here; + break; + case 4 /* ReferenceFile */: + message2 = Diagnostics.File_is_included_via_reference_here; + break; + case 5 /* TypeReferenceDirective */: + message2 = Diagnostics.File_is_included_via_type_library_reference_here; + break; + case 7 /* LibReferenceDirective */: + message2 = Diagnostics.File_is_included_via_library_reference_here; + break; + default: + Debug.assertNever(reason); + } + return isReferenceFileLocation(referenceLocation) ? createFileDiagnostic( + referenceLocation.file, + referenceLocation.pos, + referenceLocation.end - referenceLocation.pos, + message2 + ) : void 0; + } + const currentDirectory = program.getCurrentDirectory(); + const rootNames = program.getRootFileNames(); + const options = program.getCompilerOptions(); + if (!options.configFile) return void 0; + let configFileNode; + let message; + switch (reason.kind) { + case 0 /* RootFile */: + if (!options.configFile.configFileSpecs) return void 0; + const fileName = getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory); + const matchedByFiles = getMatchedFileSpec(program, fileName); + if (matchedByFiles) { + configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles); + message = Diagnostics.File_is_matched_by_files_list_specified_here; + break; + } + const matchedByInclude = getMatchedIncludeSpec(program, fileName); + if (!matchedByInclude || !isString(matchedByInclude)) return void 0; + configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude); + message = Diagnostics.File_is_matched_by_include_pattern_specified_here; + break; + case 1 /* SourceFromProjectReference */: + case 2 /* OutputFromProjectReference */: + const resolvedProjectReferences = program.getResolvedProjectReferences(); + const projectReferences = program.getProjectReferences(); + const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]); + const referenceInfo = forEachProjectReference( + projectReferences, + resolvedProjectReferences, + (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0 + ); + if (!referenceInfo) return void 0; + const { sourceFile, index } = referenceInfo; + const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); + return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( + sourceFile, + referencesSyntax.elements[index], + reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here + ) : void 0; + case 8 /* AutomaticTypeDirectiveFile */: + if (!options.types) return void 0; + configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", reason.typeReference); + message = Diagnostics.File_is_entry_point_of_type_library_specified_here; + break; + case 6 /* LibFile */: + if (reason.index !== void 0) { + configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "lib", options.lib[reason.index]); + message = Diagnostics.File_is_library_specified_here; + break; + } + const target = getNameOfScriptTarget(getEmitScriptTarget(options)); + configFileNode = target ? getOptionsSyntaxByValue(getCompilerOptionsObjectLiteralSyntax(), "target", target) : void 0; + message = Diagnostics.File_is_default_library_for_target_specified_here; + break; + default: + Debug.assertNever(reason); + } + return configFileNode && createDiagnosticForNodeInSourceFile( + options.configFile, + configFileNode, + message + ); + } +} + // src/compiler/builderState.ts function getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit) { const outputFiles = []; @@ -133274,7 +136281,8 @@ var BuilderState; return symbol && getReferencedFilesFromImportedModuleSymbol(symbol); } function getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName) { - return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName); + var _a; + return toPath(((_a = program.getRedirectFromSourceFile(fileName)) == null ? void 0 : _a.outputDts) || fileName, sourceFileDirectory, getCanonicalFileName); } function getReferencedFiles(program, sourceFile, getCanonicalFileName) { let referencedFiles; @@ -133421,8 +136429,7 @@ var BuilderState; ); }, cancellationToken, - /*emitOnly*/ - true, + 2 /* BuilderSignature */, /*customTransformers*/ void 0, /*forceDtsEmit*/ @@ -133564,20 +136571,30 @@ var BuilderFileEmit = /* @__PURE__ */ ((BuilderFileEmit2) => { BuilderFileEmit2[BuilderFileEmit2["Js"] = 1] = "Js"; BuilderFileEmit2[BuilderFileEmit2["JsMap"] = 2] = "JsMap"; BuilderFileEmit2[BuilderFileEmit2["JsInlineMap"] = 4] = "JsInlineMap"; - BuilderFileEmit2[BuilderFileEmit2["Dts"] = 8] = "Dts"; - BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 16] = "DtsMap"; + BuilderFileEmit2[BuilderFileEmit2["DtsErrors"] = 8] = "DtsErrors"; + BuilderFileEmit2[BuilderFileEmit2["DtsEmit"] = 16] = "DtsEmit"; + BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 32] = "DtsMap"; + BuilderFileEmit2[BuilderFileEmit2["Dts"] = 24] = "Dts"; BuilderFileEmit2[BuilderFileEmit2["AllJs"] = 7] = "AllJs"; - BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 24] = "AllDts"; - BuilderFileEmit2[BuilderFileEmit2["All"] = 31] = "All"; + BuilderFileEmit2[BuilderFileEmit2["AllDtsEmit"] = 48] = "AllDtsEmit"; + BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 56] = "AllDts"; + BuilderFileEmit2[BuilderFileEmit2["All"] = 63] = "All"; return BuilderFileEmit2; })(BuilderFileEmit || {}); +function isBuilderProgramStateWithDefinedProgram(state) { + return state.program !== void 0; +} +function toBuilderProgramStateWithDefinedProgram(state) { + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); + return state; +} function getBuilderFileEmit(options) { let result = 1 /* Js */; if (options.sourceMap) result = result | 2 /* JsMap */; if (options.inlineSourceMap) result = result | 4 /* JsInlineMap */; - if (getEmitDeclarations(options)) result = result | 8 /* Dts */; - if (options.declarationMap) result = result | 16 /* DtsMap */; - if (options.emitDeclarationOnly) result = result & 24 /* AllDts */; + if (getEmitDeclarations(options)) result = result | 24 /* Dts */; + if (options.declarationMap) result = result | 32 /* DtsMap */; + if (options.emitDeclarationOnly) result = result & 56 /* AllDts */; return result; } function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) { @@ -133588,7 +136605,8 @@ function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) { const diff = oldEmitKind ^ emitKind; let result = 0 /* None */; if (diff & 7 /* AllJs */) result = emitKind & 7 /* AllJs */; - if (diff & 24 /* AllDts */) result = result | emitKind & 24 /* AllDts */; + if (diff & 8 /* DtsErrors */) result = result | emitKind & 8 /* DtsErrors */; + if (diff & 48 /* AllDtsEmit */) result = result | emitKind & 48 /* AllDtsEmit */; return result; } function hasSameKeys(map1, map2) { @@ -133606,17 +136624,18 @@ function createBuilderProgramState(newProgram, oldState) { const compilerOptions = newProgram.getCompilerOptions(); state.compilerOptions = compilerOptions; const outFilePath = compilerOptions.outFile; - if (!outFilePath) { - state.semanticDiagnosticsPerFile = /* @__PURE__ */ new Map(); - } else if (compilerOptions.composite && (oldState == null ? void 0 : oldState.outSignature) && outFilePath === oldState.compilerOptions.outFile) { + state.semanticDiagnosticsPerFile = /* @__PURE__ */ new Map(); + if (outFilePath && compilerOptions.composite && (oldState == null ? void 0 : oldState.outSignature) && outFilePath === oldState.compilerOptions.outFile) { state.outSignature = oldState.outSignature && getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldState.outSignature); } state.changedFilesSet = /* @__PURE__ */ new Set(); state.latestChangedDtsFile = compilerOptions.composite ? oldState == null ? void 0 : oldState.latestChangedDtsFile : void 0; + state.checkPending = state.compilerOptions.noCheck ? true : void 0; const useOldState = BuilderState.canReuseOldState(state.referencedMap, oldState); const oldCompilerOptions = useOldState ? oldState.compilerOptions : void 0; - const canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile && !compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions); + let canCopySemanticDiagnostics = useOldState && !compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions); const canCopyEmitSignatures = compilerOptions.composite && (oldState == null ? void 0 : oldState.emitSignatures) && !outFilePath && !compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions); + let canCopyEmitDiagnostics = true; if (useOldState) { (_a = oldState.changedFilesSet) == null ? void 0 : _a.forEach((value) => state.changedFilesSet.add(value)); if (!outFilePath && ((_b = oldState.affectedFilesPendingEmit) == null ? void 0 : _b.size)) { @@ -133624,8 +136643,13 @@ function createBuilderProgramState(newProgram, oldState) { state.seenAffectedFiles = /* @__PURE__ */ new Set(); } state.programEmitPending = oldState.programEmitPending; + if (outFilePath && state.changedFilesSet.size) { + canCopySemanticDiagnostics = false; + canCopyEmitDiagnostics = false; + } + state.hasErrorsFromOldState = oldState.hasErrors; } else { - state.buildInfoEmitPending = true; + state.buildInfoEmitPending = isIncrementalCompilation(compilerOptions); } const referencedMap = state.referencedMap; const oldReferencedMap = useOldState ? oldState.referencedMap : void 0; @@ -133641,10 +136665,10 @@ function createBuilderProgramState(newProgram, oldState) { oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program newReferences && forEachKey(newReferences, (path) => !state.fileInfos.has(path) && oldState.fileInfos.has(path))) { - addFileToChangeSet(state, sourceFilePath); + addFileToChangeSet(sourceFilePath); } else { const sourceFile = newProgram.getSourceFileByPath(sourceFilePath); - const emitDiagnostics = (_a2 = oldState.emitDiagnosticsPerFile) == null ? void 0 : _a2.get(sourceFilePath); + const emitDiagnostics = canCopyEmitDiagnostics ? (_a2 = oldState.emitDiagnosticsPerFile) == null ? void 0 : _a2.get(sourceFilePath) : void 0; if (emitDiagnostics) { (state.emitDiagnosticsPerFile ?? (state.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set( sourceFilePath, @@ -133673,16 +136697,16 @@ function createBuilderProgramState(newProgram, oldState) { }); if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => { if (state.fileInfos.has(sourceFilePath)) return false; - if (outFilePath || info.affectsGlobalScope) return true; + if (info.affectsGlobalScope) return true; state.buildInfoEmitPending = true; - return false; + return !!outFilePath; })) { BuilderState.getAllFilesExcludingDefaultLibraryFile( state, newProgram, /*firstSourceFile*/ void 0 - ).forEach((file) => addFileToChangeSet(state, file.resolvedPath)); + ).forEach((file) => addFileToChangeSet(file.resolvedPath)); } else if (oldCompilerOptions) { const pendingEmitKind = compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions) ? getBuilderFileEmit(compilerOptions) : getPendingEmitKind(compilerOptions, oldCompilerOptions); if (pendingEmitKind !== 0 /* None */) { @@ -133698,18 +136722,26 @@ function createBuilderProgramState(newProgram, oldState) { }); Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size); state.seenAffectedFiles = state.seenAffectedFiles || /* @__PURE__ */ new Set(); - state.buildInfoEmitPending = true; - } else { + } else if (!state.changedFilesSet.size) { state.programEmitPending = state.programEmitPending ? state.programEmitPending | pendingEmitKind : pendingEmitKind; } + state.buildInfoEmitPending = true; } } + if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending) state.buildInfoEmitPending = true; return state; -} -function addFileToChangeSet(state, path) { - state.changedFilesSet.add(path); - state.buildInfoEmitPending = true; - state.programEmitPending = void 0; + function addFileToChangeSet(path) { + state.changedFilesSet.add(path); + if (outFilePath) { + canCopySemanticDiagnostics = false; + canCopyEmitDiagnostics = false; + state.semanticDiagnosticsFromOldState = void 0; + state.semanticDiagnosticsPerFile.clear(); + state.emitDiagnosticsPerFile = void 0; + } + state.buildInfoEmitPending = true; + state.programEmitPending = void 0; + } } function getEmitSignatureFromOldSignature(options, oldOptions, oldEmitSignature) { return !!options.declarationMap === !!oldOptions.declarationMap ? ( @@ -133733,7 +136765,12 @@ function repopulateDiagnostics(diagnostics, newProgram) { } function convertOrRepopulateDiagnosticMessageChain(chain, sourceFile, newProgram, repopulateInfo) { const info = repopulateInfo(chain); - if (info) { + if (info === true) { + return { + ...createModeMismatchDetails(sourceFile), + next: convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo) + }; + } else if (info) { return { ...createModuleNotFoundChain(sourceFile, newProgram, info.moduleReference, info.mode, info.packageName || info.moduleReference), next: convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo) @@ -133776,34 +136813,6 @@ function releaseCache(state) { BuilderState.releaseCache(state); state.program = void 0; } -function backupBuilderProgramEmitState(state) { - const outFilePath = state.compilerOptions.outFile; - Debug.assert(!state.changedFilesSet.size || outFilePath); - return { - affectedFilesPendingEmit: state.affectedFilesPendingEmit && new Map(state.affectedFilesPendingEmit), - seenEmittedFiles: state.seenEmittedFiles && new Map(state.seenEmittedFiles), - programEmitPending: state.programEmitPending, - emitSignatures: state.emitSignatures && new Map(state.emitSignatures), - outSignature: state.outSignature, - latestChangedDtsFile: state.latestChangedDtsFile, - hasChangedEmitSignature: state.hasChangedEmitSignature, - changedFilesSet: outFilePath ? new Set(state.changedFilesSet) : void 0, - buildInfoEmitPending: state.buildInfoEmitPending, - emitDiagnosticsPerFile: state.emitDiagnosticsPerFile && new Map(state.emitDiagnosticsPerFile) - }; -} -function restoreBuilderProgramEmitState(state, savedEmitState) { - state.affectedFilesPendingEmit = savedEmitState.affectedFilesPendingEmit; - state.seenEmittedFiles = savedEmitState.seenEmittedFiles; - state.programEmitPending = savedEmitState.programEmitPending; - state.emitSignatures = savedEmitState.emitSignatures; - state.outSignature = savedEmitState.outSignature; - state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile; - state.hasChangedEmitSignature = savedEmitState.hasChangedEmitSignature; - state.buildInfoEmitPending = savedEmitState.buildInfoEmitPending; - state.emitDiagnosticsPerFile = savedEmitState.emitDiagnosticsPerFile; - if (savedEmitState.changedFilesSet) state.changedFilesSet = savedEmitState.changedFilesSet; -} function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) { Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath)); } @@ -133818,7 +136827,11 @@ function getNextAffectedFile(state, cancellationToken, host) { const affectedFile = affectedFiles[affectedFilesIndex]; if (!seenAffectedFiles.has(affectedFile.resolvedPath)) { state.affectedFilesIndex = affectedFilesIndex; - addToAffectedFilesPendingEmit(state, affectedFile.resolvedPath, getBuilderFileEmit(state.compilerOptions)); + addToAffectedFilesPendingEmit( + state, + affectedFile.resolvedPath, + getBuilderFileEmit(state.compilerOptions) + ); handleDtsMayChangeOfAffectedFile( state, affectedFile, @@ -133838,15 +136851,11 @@ function getNextAffectedFile(state, cancellationToken, host) { if (nextKey.done) { return void 0; } - const program = Debug.checkDefined(state.program); - const compilerOptions = program.getCompilerOptions(); - if (compilerOptions.outFile) { - Debug.assert(!state.semanticDiagnosticsPerFile); - return program; - } + const compilerOptions = state.program.getCompilerOptions(); + if (compilerOptions.outFile) return state.program; state.affectedFiles = BuilderState.getFilesAffectedByWithOldState( state, - program, + state.program, nextKey.value, cancellationToken, host @@ -133856,17 +136865,34 @@ function getNextAffectedFile(state, cancellationToken, host) { if (!state.seenAffectedFiles) state.seenAffectedFiles = /* @__PURE__ */ new Set(); } } -function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles) { - var _a; - if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return; - if (!emitOnlyDtsFiles) return state.affectedFilesPendingEmit = void 0; - state.affectedFilesPendingEmit.forEach((emitKind, path) => { - const pending = emitKind & 7 /* AllJs */; +function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) { + var _a, _b; + if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size) && !state.programEmitPending) return; + if (!emitOnlyDtsFiles && !isForDtsErrors) { + state.affectedFilesPendingEmit = void 0; + state.programEmitPending = void 0; + } + (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path) => { + const pending = !isForDtsErrors ? emitKind & 7 /* AllJs */ : emitKind & (7 /* AllJs */ | 48 /* AllDtsEmit */); if (!pending) state.affectedFilesPendingEmit.delete(path); else state.affectedFilesPendingEmit.set(path, pending); }); + if (state.programEmitPending) { + const pending = !isForDtsErrors ? state.programEmitPending & 7 /* AllJs */ : state.programEmitPending & (7 /* AllJs */ | 48 /* AllDtsEmit */); + if (!pending) state.programEmitPending = void 0; + else state.programEmitPending = pending; + } +} +function getPendingEmitKindWithSeen(optionsOrEmitKind, seenOldOptionsOrEmitKind, emitOnlyDtsFiles, isForDtsErrors) { + let pendingKind = getPendingEmitKind(optionsOrEmitKind, seenOldOptionsOrEmitKind); + if (emitOnlyDtsFiles) pendingKind = pendingKind & 56 /* AllDts */; + if (isForDtsErrors) pendingKind = pendingKind & 8 /* DtsErrors */; + return pendingKind; } -function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) { +function getBuilderFileEmitAllDts(isForDtsErrors) { + return !isForDtsErrors ? 56 /* AllDts */ : 8 /* DtsErrors */; +} +function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) { var _a; if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0; return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path) => { @@ -133877,12 +136903,16 @@ function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) { return void 0; } const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath); - let pendingKind = getPendingEmitKind(emitKind, seenKind); - if (emitOnlyDtsFiles) pendingKind = pendingKind & 24 /* AllDts */; + const pendingKind = getPendingEmitKindWithSeen( + emitKind, + seenKind, + emitOnlyDtsFiles, + isForDtsErrors + ); if (pendingKind) return { affectedFile, emitKind: pendingKind }; }); } -function getNextPendingEmitDiagnosticsFile(state) { +function getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) { var _a; if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0; return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path) => { @@ -133893,15 +136923,14 @@ function getNextPendingEmitDiagnosticsFile(state) { return void 0; } const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0 /* None */; - if (!(seenKind & 24 /* AllDts */)) return { affectedFile, diagnostics, seenKind }; + if (!(seenKind & getBuilderFileEmitAllDts(isForDtsErrors))) return { affectedFile, diagnostics, seenKind }; }); } function removeDiagnosticsOfLibraryFiles(state) { if (!state.cleanedDiagnosticsOfLibFiles) { state.cleanedDiagnosticsOfLibFiles = true; - const program = Debug.checkDefined(state.program); - const options = program.getCompilerOptions(); - forEach(program.getSourceFiles(), (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath)); + const options = state.program.getCompilerOptions(); + forEach(state.program.getSourceFiles(), (f) => state.program.isSourceFileDefaultLibrary(f) && !skipTypeCheckingIgnoringNoCheck(f, options, state.program) && removeSemanticDiagnosticsOf(state, f.resolvedPath)); } } function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) { @@ -133910,7 +136939,7 @@ function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken removeDiagnosticsOfLibraryFiles(state); BuilderState.updateShapeSignature( state, - Debug.checkDefined(state.program), + state.program, affectedFile, cancellationToken, host @@ -133928,12 +136957,11 @@ function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken function handleDtsMayChangeOf(state, path, invalidateJsFiles, cancellationToken, host) { removeSemanticDiagnosticsOf(state, path); if (!state.changedFilesSet.has(path)) { - const program = Debug.checkDefined(state.program); - const sourceFile = program.getSourceFileByPath(path); + const sourceFile = state.program.getSourceFileByPath(path); if (sourceFile) { BuilderState.updateShapeSignature( state, - program, + state.program, sourceFile, cancellationToken, host, @@ -133941,9 +136969,17 @@ function handleDtsMayChangeOf(state, path, invalidateJsFiles, cancellationToken, true ); if (invalidateJsFiles) { - addToAffectedFilesPendingEmit(state, path, getBuilderFileEmit(state.compilerOptions)); + addToAffectedFilesPendingEmit( + state, + path, + getBuilderFileEmit(state.compilerOptions) + ); } else if (getEmitDeclarations(state.compilerOptions)) { - addToAffectedFilesPendingEmit(state, path, state.compilerOptions.declarationMap ? 24 /* AllDts */ : 8 /* Dts */); + addToAffectedFilesPendingEmit( + state, + path, + state.compilerOptions.declarationMap ? 56 /* AllDts */ : 24 /* Dts */ + ); } } } @@ -134010,7 +137046,7 @@ function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile host ); if (isChangedSignature(state, currentPath)) { - const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath); + const currentSourceFile = state.program.getSourceFileByPath(currentPath); queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } } @@ -134056,38 +137092,79 @@ function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, invalidateJsF ); return void 0; } -function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { +function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) { + if (state.compilerOptions.noCheck) return emptyArray; return concatenate( - getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), - Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile) + getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile), + state.program.getProgramDiagnostics(sourceFile) ); } -function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken) { +function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) { + semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile); const path = sourceFile.resolvedPath; - if (state.semanticDiagnosticsPerFile) { - const cachedDiagnostics = state.semanticDiagnosticsPerFile.get(path); - if (cachedDiagnostics) { - return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions); - } - } - const diagnostics = Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); - if (state.semanticDiagnosticsPerFile) { - state.semanticDiagnosticsPerFile.set(path, diagnostics); + const cachedDiagnostics = semanticDiagnosticsPerFile.get(path); + if (cachedDiagnostics) { + return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions); } + const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken); + semanticDiagnosticsPerFile.set(path, diagnostics); + state.buildInfoEmitPending = true; return filterSemanticDiagnostics(diagnostics, state.compilerOptions); } -function isProgramBundleEmitBuildInfo(info) { +function isIncrementalBundleEmitBuildInfo(info) { var _a; return !!((_a = info.options) == null ? void 0 : _a.outFile); } +function isIncrementalBuildInfo(info) { + return !!info.fileNames; +} +function isNonIncrementalBuildInfo(info) { + return !isIncrementalBuildInfo(info) && !!info.root; +} +function ensureHasErrorsForState(state) { + if (state.hasErrors !== void 0) return; + if (isIncrementalCompilation(state.compilerOptions)) { + state.hasErrors = !some(state.program.getSourceFiles(), (f) => { + var _a, _b; + const bindAndCheckDiagnostics = state.semanticDiagnosticsPerFile.get(f.resolvedPath); + return bindAndCheckDiagnostics === void 0 || // Missing semantic diagnostics in cache will be encoded in buildInfo + !!bindAndCheckDiagnostics.length || // cached semantic diagnostics will be encoded in buildInfo + !!((_b = (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(f.resolvedPath)) == null ? void 0 : _b.length); + }) && (hasSyntaxOrGlobalErrors(state) || some(state.program.getSourceFiles(), (f) => !!state.program.getProgramDiagnostics(f).length)); + } else { + state.hasErrors = some(state.program.getSourceFiles(), (f) => { + var _a, _b; + const bindAndCheckDiagnostics = state.semanticDiagnosticsPerFile.get(f.resolvedPath); + return !!(bindAndCheckDiagnostics == null ? void 0 : bindAndCheckDiagnostics.length) || // If has semantic diagnostics + !!((_b = (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(f.resolvedPath)) == null ? void 0 : _b.length); + }) || hasSyntaxOrGlobalErrors(state); + } +} +function hasSyntaxOrGlobalErrors(state) { + return !!state.program.getConfigFileParsingDiagnostics().length || !!state.program.getSyntacticDiagnostics().length || !!state.program.getOptionsDiagnostics().length || !!state.program.getGlobalDiagnostics().length; +} +function getBuildInfoEmitPending(state) { + ensureHasErrorsForState(state); + return state.buildInfoEmitPending ?? (state.buildInfoEmitPending = !!state.hasErrorsFromOldState !== !!state.hasErrors); +} function getBuildInfo2(state) { var _a, _b; - const currentDirectory = Debug.checkDefined(state.program).getCurrentDirectory(); + const currentDirectory = state.program.getCurrentDirectory(); const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0; const fileNames = []; const fileNameToFileId = /* @__PURE__ */ new Map(); const rootFileNames = new Set(state.program.getRootFileNames().map((f) => toPath(f, currentDirectory, state.program.getCanonicalFileName))); + ensureHasErrorsForState(state); + if (!isIncrementalCompilation(state.compilerOptions)) { + const buildInfo2 = { + root: arrayFrom(rootFileNames, (r) => relativeToBuildInfo(r)), + errors: state.hasErrors ? true : void 0, + checkPending: state.checkPending, + version + }; + return buildInfo2; + } const root = []; if (state.compilerOptions.outFile) { const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => { @@ -134095,12 +137172,15 @@ function getBuildInfo2(state) { tryAddRoot(key, fileId); return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version; }); - const program2 = { + const buildInfo2 = { fileNames, fileInfos: fileInfos2, root, resolvedRoot: toResolvedRoot(), - options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions), + options: toIncrementalBuildInfoCompilerOptions(state.compilerOptions), + semanticDiagnosticsPerFile: !state.changedFilesSet.size ? toIncrementalBuildInfoDiagnostics() : void 0, + emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(), + changeFileSet: toChangeFileSet(), outSignature: state.outSignature, latestChangedDtsFile, pendingEmit: !state.programEmitPending ? void 0 : ( @@ -134109,10 +137189,13 @@ function getBuildInfo2(state) { // Pending emit is same as deteremined by compilerOptions state.programEmitPending ) - ) + ), // Actual value + errors: state.hasErrors ? true : void 0, + checkPending: state.checkPending, + version }; - return createBuildInfo(program2); + return buildInfo2; } let fileIdsList; let fileNamesToFileIdListId; @@ -134167,7 +137250,7 @@ function getBuildInfo2(state) { toFileIdListId(state.referencedMap.getValues(key)) ]); } - const semanticDiagnosticsPerFile = convertToProgramBuildInfoDiagnostics(); + const semanticDiagnosticsPerFile = toIncrementalBuildInfoDiagnostics(); let affectedFilesPendingEmit; if ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.size) { const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions); @@ -134181,7 +137264,7 @@ function getBuildInfo2(state) { affectedFilesPendingEmit, pendingEmit === fullEmitForOptions ? fileId : ( // Pending full emit per options - pendingEmit === 8 /* Dts */ ? [fileId] : ( + pendingEmit === 24 /* Dts */ ? [fileId] : ( // Pending on Dts only [fileId, pendingEmit] ) @@ -134191,29 +137274,25 @@ function getBuildInfo2(state) { } } } - let changeFileSet; - if (state.changedFilesSet.size) { - for (const path of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) { - changeFileSet = append(changeFileSet, toFileId(path)); - } - } - const emitDiagnosticsPerFile = convertToProgramBuildInfoEmitDiagnostics(); - const program = { + const buildInfo = { fileNames, + fileIdsList, fileInfos, root, resolvedRoot: toResolvedRoot(), - options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions), - fileIdsList, + options: toIncrementalBuildInfoCompilerOptions(state.compilerOptions), referencedMap, semanticDiagnosticsPerFile, - emitDiagnosticsPerFile, + emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(), + changeFileSet: toChangeFileSet(), affectedFilesPendingEmit, - changeFileSet, emitSignatures, - latestChangedDtsFile + latestChangedDtsFile, + errors: state.hasErrors ? true : void 0, + checkPending: state.checkPending, + version }; - return createBuildInfo(program); + return buildInfo; function relativeToBuildInfoEnsuringAbsolutePath(path) { return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory)); } @@ -134261,13 +137340,13 @@ function getBuildInfo2(state) { }); return result; } - function convertToProgramBuildInfoCompilerOptions(options) { + function toIncrementalBuildInfoCompilerOptions(options) { let result; const { optionsNameMap } = getOptionsNameMap(); for (const name of getOwnKeys(options).sort(compareStringsCaseSensitive)) { const optionInfo = optionsNameMap.get(name.toLowerCase()); if (optionInfo == null ? void 0 : optionInfo.affectsBuildInfo) { - (result || (result = {}))[name] = convertToReusableCompilerOptionValue( + (result || (result = {}))[name] = toReusableCompilerOptionValue( optionInfo, options[name] ); @@ -134275,7 +137354,7 @@ function getBuildInfo2(state) { } return result; } - function convertToReusableCompilerOptionValue(option, value) { + function toReusableCompilerOptionValue(option, value) { if (option) { Debug.assert(option.type !== "listOrElement"); if (option.type === "list") { @@ -134289,23 +137368,22 @@ function getBuildInfo2(state) { } return value; } - function convertToProgramBuildInfoDiagnostics() { + function toIncrementalBuildInfoDiagnostics() { let result; state.fileInfos.forEach((_value, key) => { - var _a2; - const value = (_a2 = state.semanticDiagnosticsPerFile) == null ? void 0 : _a2.get(key); + const value = state.semanticDiagnosticsPerFile.get(key); if (!value) { if (!state.changedFilesSet.has(key)) result = append(result, toFileId(key)); } else if (value.length) { result = append(result, [ toFileId(key), - convertToReusableDiagnostics(value, key) + toReusableDiagnostic(value, key) ]); } }); return result; } - function convertToProgramBuildInfoEmitDiagnostics() { + function toIncrementalBuildInfoEmitDiagnostics() { var _a2; let result; if (!((_a2 = state.emitDiagnosticsPerFile) == null ? void 0 : _a2.size)) return result; @@ -134313,55 +137391,64 @@ function getBuildInfo2(state) { const value = state.emitDiagnosticsPerFile.get(key); result = append(result, [ toFileId(key), - convertToReusableDiagnostics(value, key) + toReusableDiagnostic(value, key) ]); } return result; } - function convertToReusableDiagnostics(diagnostics, diagnosticFilePath) { + function toReusableDiagnostic(diagnostics, diagnosticFilePath) { Debug.assert(!!diagnostics.length); return diagnostics.map((diagnostic) => { - const result = convertToReusableDiagnosticRelatedInformation(diagnostic, diagnosticFilePath); + const result = toReusableDiagnosticRelatedInformation(diagnostic, diagnosticFilePath); result.reportsUnnecessary = diagnostic.reportsUnnecessary; result.reportDeprecated = diagnostic.reportsDeprecated; result.source = diagnostic.source; result.skippedOn = diagnostic.skippedOn; const { relatedInformation } = diagnostic; - result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToReusableDiagnosticRelatedInformation(r, diagnosticFilePath)) : [] : void 0; + result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => toReusableDiagnosticRelatedInformation(r, diagnosticFilePath)) : [] : void 0; return result; }); } - function convertToReusableDiagnosticRelatedInformation(diagnostic, diagnosticFilePath) { + function toReusableDiagnosticRelatedInformation(diagnostic, diagnosticFilePath) { const { file } = diagnostic; return { ...diagnostic, file: file ? file.resolvedPath === diagnosticFilePath ? void 0 : relativeToBuildInfo(file.resolvedPath) : false, - messageText: isString(diagnostic.messageText) ? diagnostic.messageText : convertToReusableDiagnosticMessageChain(diagnostic.messageText) + messageText: isString(diagnostic.messageText) ? diagnostic.messageText : toReusableDiagnosticMessageChain(diagnostic.messageText) }; } - function convertToReusableDiagnosticMessageChain(chain) { + function toReusableDiagnosticMessageChain(chain) { if (chain.repopulateInfo) { return { info: chain.repopulateInfo(), - next: convertToReusableDiagnosticMessageChainArray(chain.next) + next: toReusableDiagnosticMessageChainArray(chain.next) }; } - const next = convertToReusableDiagnosticMessageChainArray(chain.next); + const next = toReusableDiagnosticMessageChainArray(chain.next); return next === chain.next ? chain : { ...chain, next }; } - function convertToReusableDiagnosticMessageChainArray(array) { + function toReusableDiagnosticMessageChainArray(array) { if (!array) return array; return forEach(array, (chain, index) => { - const reusable = convertToReusableDiagnosticMessageChain(chain); + const reusable = toReusableDiagnosticMessageChain(chain); if (chain === reusable) return void 0; const result = index > 0 ? array.slice(0, index - 1) : []; result.push(reusable); for (let i = index + 1; i < array.length; i++) { - result.push(convertToReusableDiagnosticMessageChain(array[i])); + result.push(toReusableDiagnosticMessageChain(array[i])); } return result; }) || array; } + function toChangeFileSet() { + let changeFileSet; + if (state.changedFilesSet.size) { + for (const path of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) { + changeFileSet = append(changeFileSet, toFileId(path)); + } + } + return changeFileSet; + } } var BuilderProgramKind = /* @__PURE__ */ ((BuilderProgramKind2) => { BuilderProgramKind2[BuilderProgramKind2["SemanticDiagnosticsBuilderProgram"] = 0] = "SemanticDiagnosticsBuilderProgram"; @@ -134425,25 +137512,27 @@ function computeSignature(text, host, data) { return (host.createHash ?? generateDjb2Hash)(getTextHandlingSourceMapForSignature(text, data)); } function createBuilderProgram(kind, { newProgram, host, oldProgram, configFileParsingDiagnostics }) { - let oldState = oldProgram && oldProgram.getState(); + let oldState = oldProgram && oldProgram.state; if (oldState && newProgram === oldState.program && configFileParsingDiagnostics === newProgram.getConfigFileParsingDiagnostics()) { newProgram = void 0; oldState = void 0; return oldProgram; } const state = createBuilderProgramState(newProgram, oldState); - newProgram.getBuildInfo = () => getBuildInfo2(state); + newProgram.getBuildInfo = () => getBuildInfo2(toBuilderProgramStateWithDefinedProgram(state)); newProgram = void 0; oldProgram = void 0; oldState = void 0; - const getState = () => state; - const builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics); - builderProgram.getState = getState; - builderProgram.saveEmitState = () => backupBuilderProgramEmitState(state); - builderProgram.restoreEmitState = (saved) => restoreBuilderProgramEmitState(state, saved); + const builderProgram = createRedirectedBuilderProgram(state, configFileParsingDiagnostics); + builderProgram.state = state; builderProgram.hasChangedEmitSignature = () => !!state.hasChangedEmitSignature; - builderProgram.getAllDependencies = (sourceFile) => BuilderState.getAllDependencies(state, Debug.checkDefined(state.program), sourceFile); + builderProgram.getAllDependencies = (sourceFile) => BuilderState.getAllDependencies( + state, + Debug.checkDefined(state.program), + sourceFile + ); builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; + builderProgram.getDeclarationDiagnostics = getDeclarationDiagnostics2; builderProgram.emit = emit; builderProgram.releaseProgram = () => releaseCache(state); if (kind === 0 /* SemanticDiagnosticsBuilderProgram */) { @@ -134457,76 +137546,145 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa } return builderProgram; function emitBuildInfo(writeFile2, cancellationToken) { - if (state.buildInfoEmitPending) { - const result = Debug.checkDefined(state.program).emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken); + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); + if (getBuildInfoEmitPending(state)) { + const result = state.program.emitBuildInfo( + writeFile2 || maybeBind(host, host.writeFile), + cancellationToken + ); state.buildInfoEmitPending = false; return result; } return emitSkippedWithNoDiagnostics; } - function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { - var _a, _b, _c; + function emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) { + var _a, _b, _c, _d; + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); let affected = getNextAffectedFile(state, cancellationToken, host); const programEmitKind = getBuilderFileEmit(state.compilerOptions); - let emitKind = emitOnlyDtsFiles ? programEmitKind & 24 /* AllDts */ : programEmitKind; + let emitKind = !isForDtsErrors ? emitOnlyDtsFiles ? programEmitKind & 56 /* AllDts */ : programEmitKind : 8 /* DtsErrors */; if (!affected) { if (!state.compilerOptions.outFile) { - const pendingAffectedFile = getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles); - if (!pendingAffectedFile) { - const pendingForDiagnostics = getNextPendingEmitDiagnosticsFile(state); + const pendingAffectedFile = getNextAffectedFilePendingEmit( + state, + emitOnlyDtsFiles, + isForDtsErrors + ); + if (pendingAffectedFile) { + ({ affectedFile: affected, emitKind } = pendingAffectedFile); + } else { + const pendingForDiagnostics = getNextPendingEmitDiagnosticsFile( + state, + isForDtsErrors + ); if (pendingForDiagnostics) { - (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(pendingForDiagnostics.affectedFile.resolvedPath, pendingForDiagnostics.seenKind | 24 /* AllDts */); + (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set( + pendingForDiagnostics.affectedFile.resolvedPath, + pendingForDiagnostics.seenKind | getBuilderFileEmitAllDts(isForDtsErrors) + ); return { result: { emitSkipped: true, diagnostics: pendingForDiagnostics.diagnostics }, affected: pendingForDiagnostics.affectedFile }; } - if (!state.buildInfoEmitPending) return void 0; - const affected2 = state.program; - const result2 = affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken); - state.buildInfoEmitPending = false; - return { result: result2, affected: affected2 }; } - ({ affectedFile: affected, emitKind } = pendingAffectedFile); } else { - if (!state.programEmitPending) return void 0; - emitKind = state.programEmitPending; - if (emitOnlyDtsFiles) emitKind = emitKind & 24 /* AllDts */; - if (!emitKind) return void 0; - affected = state.program; + if (state.programEmitPending) { + emitKind = getPendingEmitKindWithSeen( + state.programEmitPending, + state.seenProgramEmit, + emitOnlyDtsFiles, + isForDtsErrors + ); + if (emitKind) affected = state.program; + } + if (!affected && ((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) { + const seenKind = state.seenProgramEmit || 0 /* None */; + if (!(seenKind & getBuilderFileEmitAllDts(isForDtsErrors))) { + state.seenProgramEmit = getBuilderFileEmitAllDts(isForDtsErrors) | seenKind; + const diagnostics = []; + state.emitDiagnosticsPerFile.forEach((d) => addRange(diagnostics, d)); + return { + result: { emitSkipped: true, diagnostics }, + affected: state.program + }; + } + } + } + if (!affected) { + if (isForDtsErrors || !getBuildInfoEmitPending(state)) return void 0; + const affected2 = state.program; + const result2 = affected2.emitBuildInfo( + writeFile2 || maybeBind(host, host.writeFile), + cancellationToken + ); + state.buildInfoEmitPending = false; + return { result: result2, affected: affected2 }; } } let emitOnly; if (emitKind & 7 /* AllJs */) emitOnly = 0 /* Js */; - if (emitKind & 24 /* AllDts */) emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0; - if (affected === state.program) { - state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0; - } - const result = state.program.emit( + if (emitKind & 56 /* AllDts */) emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0; + const result = !isForDtsErrors ? state.program.emit( affected === state.program ? void 0 : affected, getWriteFileCallback(writeFile2, customTransformers), cancellationToken, emitOnly, - customTransformers - ); + customTransformers, + /*forceDtsEmit*/ + void 0, + /*skipBuildInfo*/ + true + ) : { + emitSkipped: true, + diagnostics: state.program.getDeclarationDiagnostics( + affected === state.program ? void 0 : affected, + cancellationToken + ) + }; if (affected !== state.program) { const affectedSourceFile = affected; state.seenAffectedFiles.add(affectedSourceFile.resolvedPath); if (state.affectedFilesIndex !== void 0) state.affectedFilesIndex++; state.buildInfoEmitPending = true; - const existing = ((_a = state.seenEmittedFiles) == null ? void 0 : _a.get(affectedSourceFile.resolvedPath)) || 0 /* None */; + const existing = ((_b = state.seenEmittedFiles) == null ? void 0 : _b.get(affectedSourceFile.resolvedPath)) || 0 /* None */; (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, emitKind | existing); - const existingPending = ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.get(affectedSourceFile.resolvedPath)) || programEmitKind; + const existingPending = ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.get(affectedSourceFile.resolvedPath)) || programEmitKind; const pendingKind = getPendingEmitKind(existingPending, emitKind | existing); if (pendingKind) (state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, pendingKind); - else (_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.delete(affectedSourceFile.resolvedPath); + else (_d = state.affectedFilesPendingEmit) == null ? void 0 : _d.delete(affectedSourceFile.resolvedPath); if (result.diagnostics.length) (state.emitDiagnosticsPerFile ?? (state.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, result.diagnostics); } else { state.changedFilesSet.clear(); + state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0; + state.seenProgramEmit = emitKind | (state.seenProgramEmit || 0 /* None */); + setEmitDiagnosticsPerFile(result.diagnostics); + state.buildInfoEmitPending = true; } return { result, affected }; } + function setEmitDiagnosticsPerFile(diagnostics) { + let emitDiagnosticsPerFile; + diagnostics.forEach((d) => { + if (!d.file) return; + let diagnostics2 = emitDiagnosticsPerFile == null ? void 0 : emitDiagnosticsPerFile.get(d.file.resolvedPath); + if (!diagnostics2) (emitDiagnosticsPerFile ?? (emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(d.file.resolvedPath, diagnostics2 = []); + diagnostics2.push(d); + }); + if (emitDiagnosticsPerFile) state.emitDiagnosticsPerFile = emitDiagnosticsPerFile; + } + function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { + return emitNextAffectedFileOrDtsErrors( + writeFile2, + cancellationToken, + emitOnlyDtsFiles, + customTransformers, + /*isForDtsErrors*/ + false + ); + } function getWriteFileCallback(writeFile2, customTransformers) { + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); if (!getEmitDeclarations(state.compilerOptions)) return writeFile2 || maybeBind(host, host.writeFile); return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => { var _a, _b, _c; @@ -134561,7 +137719,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa if (state.compilerOptions.composite) { const filePath = sourceFiles[0].resolvedPath; emitSignature = handleNewSignature((_c = state.emitSignatures) == null ? void 0 : _c.get(filePath), emitSignature); - if (!emitSignature) return; + if (!emitSignature) return data.skippedDtsWrite = true; (state.emitSignatures ?? (state.emitSignatures = /* @__PURE__ */ new Map())).set(filePath, emitSignature); } } else if (state.compilerOptions.composite) { @@ -134570,7 +137728,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa /*newSignature*/ void 0 ); - if (!newSignature) return; + if (!newSignature) return data.skippedDtsWrite = true; state.outSignature = newSignature; } } @@ -134593,6 +137751,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa }; } function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) { assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile); } @@ -134605,7 +137764,12 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa let diagnostics; let emittedFiles = []; let affectedEmitResult; - while (affectedEmitResult = emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers)) { + while (affectedEmitResult = emitNextAffectedFile( + writeFile2, + cancellationToken, + emitOnlyDtsFiles, + customTransformers + )) { emitSkipped = emitSkipped || affectedEmitResult.result.emitSkipped; diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics); emittedFiles = addRange(emittedFiles, affectedEmitResult.result.emittedFiles); @@ -134618,23 +137782,82 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa sourceMaps }; } else { - clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles); + clearAffectedFilesPendingEmit( + state, + emitOnlyDtsFiles, + /*isForDtsErrors*/ + false + ); } } - return Debug.checkDefined(state.program).emit( + const emitResult = state.program.emit( targetSourceFile, getWriteFileCallback(writeFile2, customTransformers), cancellationToken, emitOnlyDtsFiles, customTransformers ); + handleNonEmitBuilderWithEmitOrDtsErrors( + targetSourceFile, + emitOnlyDtsFiles, + /*isForDtsErrors*/ + false, + emitResult.diagnostics + ); + return emitResult; + } + function handleNonEmitBuilderWithEmitOrDtsErrors(targetSourceFile, emitOnlyDtsFiles, isForDtsErrors, diagnostics) { + if (!targetSourceFile && kind !== 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) { + clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, isForDtsErrors); + setEmitDiagnosticsPerFile(diagnostics); + } + } + function getDeclarationDiagnostics2(sourceFile, cancellationToken) { + var _a; + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); + if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) { + assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); + let affectedEmitResult; + let diagnostics; + while (affectedEmitResult = emitNextAffectedFileOrDtsErrors( + /*writeFile*/ + void 0, + cancellationToken, + /*emitOnlyDtsFiles*/ + void 0, + /*customTransformers*/ + void 0, + /*isForDtsErrors*/ + true + )) { + if (!sourceFile) diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics); + } + return (!sourceFile ? diagnostics : (_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.get(sourceFile.resolvedPath)) || emptyArray; + } else { + const result = state.program.getDeclarationDiagnostics(sourceFile, cancellationToken); + handleNonEmitBuilderWithEmitOrDtsErrors( + sourceFile, + /*emitOnlyDtsFiles*/ + void 0, + /*isForDtsErrors*/ + true, + result + ); + return result; + } } function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) { + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); while (true) { const affected = getNextAffectedFile(state, cancellationToken, host); let result; - if (!affected) return void 0; - else if (affected !== state.program) { + if (!affected) { + if (state.checkPending && !state.compilerOptions.noCheck) { + state.checkPending = void 0; + state.buildInfoEmitPending = true; + } + return void 0; + } else if (affected !== state.program) { const affectedSourceFile = affected; if (!ignoreSourceFile || !ignoreSourceFile(affectedSourceFile)) { result = getSemanticDiagnosticsOfFile(state, affectedSourceFile, cancellationToken); @@ -134644,33 +137867,48 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa state.buildInfoEmitPending = true; if (!result) continue; } else { - result = state.program.getSemanticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken + let diagnostics; + const semanticDiagnosticsPerFile = /* @__PURE__ */ new Map(); + state.program.getSourceFiles().forEach( + (sourceFile) => diagnostics = addRange( + diagnostics, + getSemanticDiagnosticsOfFile( + state, + sourceFile, + cancellationToken, + semanticDiagnosticsPerFile + ) + ) ); + state.semanticDiagnosticsPerFile = semanticDiagnosticsPerFile; + result = diagnostics || emptyArray; state.changedFilesSet.clear(); state.programEmitPending = getBuilderFileEmit(state.compilerOptions); + if (!state.compilerOptions.noCheck) state.checkPending = void 0; + state.buildInfoEmitPending = true; } return { result, affected }; } } function getSemanticDiagnostics(sourceFile, cancellationToken) { + Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - const compilerOptions = Debug.checkDefined(state.program).getCompilerOptions(); - if (compilerOptions.outFile) { - Debug.assert(!state.semanticDiagnosticsPerFile); - return Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); - } if (sourceFile) { return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); } - while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { + while (true) { + const affectedResult = getSemanticDiagnosticsOfNextAffectedFile(cancellationToken); + if (!affectedResult) break; + if (affectedResult.affected === state.program) return affectedResult.result; } let diagnostics; - for (const sourceFile2 of Debug.checkDefined(state.program).getSourceFiles()) { + for (const sourceFile2 of state.program.getSourceFiles()) { diagnostics = addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile2, cancellationToken)); } + if (state.checkPending && !state.compilerOptions.noCheck) { + state.checkPending = void 0; + state.buildInfoEmitPending = true; + } return diagnostics || emptyArray; } } @@ -134684,44 +137922,49 @@ function toBuilderStateFileInfoForMultiEmit(fileInfo) { return isString(fileInfo) ? { version: fileInfo, signature: fileInfo, affectsGlobalScope: void 0, impliedFormat: void 0 } : isString(fileInfo.signature) ? fileInfo : { version: fileInfo.version, signature: fileInfo.signature === false ? void 0 : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat }; } function toBuilderFileEmit(value, fullEmitForOptions) { - return isNumber(value) ? fullEmitForOptions : value[1] || 8 /* Dts */; + return isNumber(value) ? fullEmitForOptions : value[1] || 24 /* Dts */; } function toProgramEmitPending(value, options) { return !value ? getBuilderFileEmit(options || {}) : value; } -function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host) { +function createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath, host) { var _a, _b, _c, _d; - const program = buildInfo.program; const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); let state; - const filePaths = (_a = program.fileNames) == null ? void 0 : _a.map(toPathInBuildInfoDirectory); + const filePaths = (_a = buildInfo.fileNames) == null ? void 0 : _a.map(toPathInBuildInfoDirectory); let filePathsSetList; - const latestChangedDtsFile = program.latestChangedDtsFile ? toAbsolutePath(program.latestChangedDtsFile) : void 0; - if (isProgramBundleEmitBuildInfo(program)) { - const fileInfos = /* @__PURE__ */ new Map(); - program.fileInfos.forEach((fileInfo, index) => { + const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : void 0; + const fileInfos = /* @__PURE__ */ new Map(); + const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath)); + if (isIncrementalBundleEmitBuildInfo(buildInfo)) { + buildInfo.fileInfos.forEach((fileInfo, index) => { const path = toFilePath(index + 1); fileInfos.set(path, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo); }); state = { fileInfos, - compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {}, + compilerOptions: buildInfo.options ? convertToOptionsWithAbsolutePaths(buildInfo.options, toAbsolutePath) : {}, + semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile), + emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile), + hasReusableDiagnostic: true, + changedFilesSet, latestChangedDtsFile, - outSignature: program.outSignature, - programEmitPending: program.pendingEmit === void 0 ? void 0 : toProgramEmitPending(program.pendingEmit, program.options) + outSignature: buildInfo.outSignature, + programEmitPending: buildInfo.pendingEmit === void 0 ? void 0 : toProgramEmitPending(buildInfo.pendingEmit, buildInfo.options), + hasErrors: buildInfo.errors, + checkPending: buildInfo.checkPending }; } else { - filePathsSetList = (_b = program.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath))); - const fileInfos = /* @__PURE__ */ new Map(); - const emitSignatures = ((_c = program.options) == null ? void 0 : _c.composite) && !program.options.outFile ? /* @__PURE__ */ new Map() : void 0; - program.fileInfos.forEach((fileInfo, index) => { + filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath))); + const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0; + buildInfo.fileInfos.forEach((fileInfo, index) => { const path = toFilePath(index + 1); const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo); fileInfos.set(path, stateFileInfo); if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path, stateFileInfo.signature); }); - (_d = program.emitSignatures) == null ? void 0 : _d.forEach((value) => { + (_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => { if (isNumber(value)) emitSignatures.delete(toFilePath(value)); else { const key = toFilePath(value[0]); @@ -134734,25 +137977,24 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos ); } }); - const changedFilesSet = new Set(map(program.changeFileSet, toFilePath)); - const fullEmitForOptions = program.affectedFilesPendingEmit ? getBuilderFileEmit(program.options || {}) : void 0; + const fullEmitForOptions = buildInfo.affectedFilesPendingEmit ? getBuilderFileEmit(buildInfo.options || {}) : void 0; state = { fileInfos, - compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {}, - referencedMap: toManyToManyPathMap(program.referencedMap, program.options ?? {}), - semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(program.semanticDiagnosticsPerFile, fileInfos, changedFilesSet), - emitDiagnosticsPerFile: toPerFileEmitDiagnostics(program.emitDiagnosticsPerFile), + compilerOptions: buildInfo.options ? convertToOptionsWithAbsolutePaths(buildInfo.options, toAbsolutePath) : {}, + referencedMap: toManyToManyPathMap(buildInfo.referencedMap, buildInfo.options ?? {}), + semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile), + emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile), hasReusableDiagnostic: true, - affectedFilesPendingEmit: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)), changedFilesSet, + affectedFilesPendingEmit: buildInfo.affectedFilesPendingEmit && arrayToMap(buildInfo.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)), latestChangedDtsFile, - emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0 + emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0, + hasErrors: buildInfo.errors, + checkPending: buildInfo.checkPending }; } return { - getState: () => state, - saveEmitState: noop, - restoreEmitState: noop, + state, getProgram: notImplemented, getProgramOrUndefined: returnUndefined, releaseProgram: noop, @@ -134792,7 +138034,7 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos referenceMap.forEach(([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId))); return map2; } - function toPerFileSemanticDiagnostics(diagnostics, fileInfos, changedFilesSet) { + function toPerFileSemanticDiagnostics(diagnostics) { const semanticDiagnostics = new Map( mapDefinedIterator( fileInfos.keys(), @@ -134803,7 +138045,7 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos if (isNumber(value)) semanticDiagnostics.delete(toFilePath(value)); else semanticDiagnostics.set(toFilePath(value[0]), value[1]); }); - return semanticDiagnostics.size ? semanticDiagnostics : void 0; + return semanticDiagnostics; } function toPerFileEmitDiagnostics(diagnostics) { return diagnostics && arrayToMap(diagnostics, (value) => toFilePath(value[0]), (value) => value[1]); @@ -134844,15 +138086,19 @@ function getBuildInfoFileVersionMap(program, buildInfoPath, host) { } } } -function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) { +function getNonIncrementalBuildInfoRoots(buildInfo, buildInfoPath, host) { + if (!isNonIncrementalBuildInfo(buildInfo)) return void 0; + const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); + const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); + return buildInfo.root.map((r) => toPath(r, buildInfoDirectory, getCanonicalFileName)); +} +function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { - getState: notImplemented, - saveEmitState: noop, - restoreEmitState: noop, + state: void 0, getProgram, - getProgramOrUndefined: () => getState().program, - releaseProgram: () => getState().program = void 0, - getCompilerOptions: () => getState().compilerOptions, + getProgramOrUndefined: () => state.program, + releaseProgram: () => state.program = void 0, + getCompilerOptions: () => state.compilerOptions, getSourceFile: (fileName) => getProgram().getSourceFile(fileName), getSourceFiles: () => getProgram().getSourceFiles(), getOptionsDiagnostics: (cancellationToken) => getProgram().getOptionsDiagnostics(cancellationToken), @@ -134868,20 +138114,50 @@ function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) close: noop }; function getProgram() { - return Debug.checkDefined(getState().program); + return Debug.checkDefined(state.program); } } // src/compiler/builderPublic.ts function createSemanticDiagnosticsBuilderProgram(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - return createBuilderProgram(0 /* SemanticDiagnosticsBuilderProgram */, getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences)); + return createBuilderProgram( + 0 /* SemanticDiagnosticsBuilderProgram */, + getBuilderCreationParameters( + newProgramOrRootNames, + hostOrOptions, + oldProgramOrHost, + configFileParsingDiagnosticsOrOldProgram, + configFileParsingDiagnostics, + projectReferences + ) + ); } function createEmitAndSemanticDiagnosticsBuilderProgram(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - return createBuilderProgram(1 /* EmitAndSemanticDiagnosticsBuilderProgram */, getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences)); + return createBuilderProgram( + 1 /* EmitAndSemanticDiagnosticsBuilderProgram */, + getBuilderCreationParameters( + newProgramOrRootNames, + hostOrOptions, + oldProgramOrHost, + configFileParsingDiagnosticsOrOldProgram, + configFileParsingDiagnostics, + projectReferences + ) + ); } function createAbstractBuilder(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - const { newProgram, configFileParsingDiagnostics: newConfigFileParsingDiagnostics } = getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences); - return createRedirectedBuilderProgram(() => ({ program: newProgram, compilerOptions: newProgram.getCompilerOptions() }), newConfigFileParsingDiagnostics); + const { newProgram, configFileParsingDiagnostics: newConfigFileParsingDiagnostics } = getBuilderCreationParameters( + newProgramOrRootNames, + hostOrOptions, + oldProgramOrHost, + configFileParsingDiagnosticsOrOldProgram, + configFileParsingDiagnostics, + projectReferences + ); + return createRedirectedBuilderProgram( + { program: newProgram, compilerOptions: newProgram.getCompilerOptions() }, + newConfigFileParsingDiagnostics + ); } // src/compiler/resolutionCache.ts @@ -134894,9 +138170,9 @@ function removeIgnoredPath(path) { function perceivedOsRootLengthForWatching(pathComponents2, length2) { if (length2 <= 1) return 1; let indexAfterOsRoot = 1; - let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0; + let isDosStyle = pathComponents2[0].search(/[a-z]:/i) === 0; if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths - pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) { + pathComponents2[1].search(/[a-z]\$$/i) === 0) { if (length2 === 2) return 2; indexAfterOsRoot = 2; isDosStyle = true; @@ -134915,23 +138191,26 @@ function canWatchDirectoryOrFile(pathComponents2, length2) { const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2); return length2 > perceivedOsRootLength + 1; } +function canWatchDirectoryOrFilePath(path) { + return canWatchDirectoryOrFile(getPathComponents(path)); +} function canWatchAtTypes(atTypes) { return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes)); } function isInDirectoryPath(dirComponents, fileOrDirComponents) { - if (fileOrDirComponents.length < fileOrDirComponents.length) return false; + if (fileOrDirComponents.length < dirComponents.length) return false; for (let i = 0; i < dirComponents.length; i++) { if (fileOrDirComponents[i] !== dirComponents[i]) return false; } return true; } function canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(fileOrDirPath) { - return canWatchDirectoryOrFile(getPathComponents(fileOrDirPath)); + return canWatchDirectoryOrFilePath(fileOrDirPath); } function canWatchAffectingLocation(filePath) { return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(filePath); } -function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootPathComponents, getCurrentDirectory) { +function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootPathComponents, isRootWatchable, getCurrentDirectory, preferNonRecursiveWatch) { const failedLookupPathComponents = getPathComponents(failedLookupLocationPath); failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); const failedLookupComponents = getPathComponents(failedLookupLocation); @@ -134940,7 +138219,7 @@ function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLoo const nodeModulesIndex = failedLookupPathComponents.indexOf("node_modules"); if (nodeModulesIndex !== -1 && nodeModulesIndex + 1 <= perceivedOsRootLength + 1) return void 0; const lastNodeModulesIndex = failedLookupPathComponents.lastIndexOf("node_modules"); - if (isInDirectoryPath(rootPathComponents, failedLookupPathComponents)) { + if (isRootWatchable && isInDirectoryPath(rootPathComponents, failedLookupPathComponents)) { if (failedLookupPathComponents.length > rootPathComponents.length + 1) { return getDirectoryOfFailedLookupWatch( failedLookupComponents, @@ -134963,10 +138242,11 @@ function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLoo perceivedOsRootLength, nodeModulesIndex, rootPathComponents, - lastNodeModulesIndex + lastNodeModulesIndex, + preferNonRecursiveWatch ); } -function getDirectoryToWatchFromFailedLookupLocationDirectory(dirComponents, dirPathComponents, dirPathComponentsLength, perceivedOsRootLength, nodeModulesIndex, rootPathComponents, lastNodeModulesIndex) { +function getDirectoryToWatchFromFailedLookupLocationDirectory(dirComponents, dirPathComponents, dirPathComponentsLength, perceivedOsRootLength, nodeModulesIndex, rootPathComponents, lastNodeModulesIndex, preferNonRecursiveWatch) { if (nodeModulesIndex !== -1) { return getDirectoryOfFailedLookupWatch( dirComponents, @@ -134977,11 +138257,13 @@ function getDirectoryToWatchFromFailedLookupLocationDirectory(dirComponents, dir } let nonRecursive = true; let length2 = dirPathComponentsLength; - for (let i = 0; i < dirPathComponentsLength; i++) { - if (dirPathComponents[i] !== rootPathComponents[i]) { - nonRecursive = false; - length2 = Math.max(i + 1, perceivedOsRootLength + 1); - break; + if (!preferNonRecursiveWatch) { + for (let i = 0; i < dirPathComponentsLength; i++) { + if (dirPathComponents[i] !== rootPathComponents[i]) { + nonRecursive = false; + length2 = Math.max(i + 1, perceivedOsRootLength + 1); + break; + } } } return getDirectoryOfFailedLookupWatch( @@ -135009,9 +138291,9 @@ function getDirectoryOfFailedLookupWatch(dirComponents, dirPathComponents, lengt packageDirPath: packageDirLength !== void 0 ? getPathFromPathComponents(dirPathComponents, packageDirLength) : void 0 }; } -function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, rootPathComponents, getCurrentDirectory, filterCustomPath) { +function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, rootPathComponents, isRootWatchable, getCurrentDirectory, preferNonRecursiveWatch, filterCustomPath) { const typeRootPathComponents = getPathComponents(typeRootPath); - if (isInDirectoryPath(rootPathComponents, typeRootPathComponents)) { + if (isRootWatchable && isInDirectoryPath(rootPathComponents, typeRootPathComponents)) { return rootPath; } typeRoot = isRootedDiskPath(typeRoot) ? normalizePath(typeRoot) : getNormalizedAbsolutePath(typeRoot, getCurrentDirectory()); @@ -135022,7 +138304,8 @@ function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootP perceivedOsRootLengthForWatching(typeRootPathComponents, typeRootPathComponents.length), typeRootPathComponents.indexOf("node_modules"), rootPathComponents, - typeRootPathComponents.lastIndexOf("node_modules") + typeRootPathComponents.lastIndexOf("node_modules"), + preferNonRecursiveWatch ); return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : void 0; } @@ -135030,9 +138313,6 @@ function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirec const normalized = getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()); return !isDiskPathRoot(normalized) ? removeTrailingDirectorySeparator(normalized) : normalized; } -function getRootPathSplitLength(rootPath) { - return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0); -} function getModuleResolutionHost(resolutionHost) { var _a; return ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; @@ -135054,10 +138334,10 @@ function createModuleResolutionLoaderUsingGlobalCache(containingFile, redirected function resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) { const host = getModuleResolutionHost(resolutionHost); const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); - if (!resolutionHost.getGlobalCache) { + if (!resolutionHost.getGlobalTypingsCacheLocation) { return primaryResult; } - const globalCache = resolutionHost.getGlobalCache(); + const globalCache = resolutionHost.getGlobalTypingsCacheLocation(); if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), @@ -135081,7 +138361,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW let filesWithChangedSetOfUnresolvedImports; let filesWithInvalidatedResolutions; let filesWithInvalidatedNonRelativeUnresolvedImports; - const nonRelativeExternalModuleResolutions = createMultiMap(); + const nonRelativeExternalModuleResolutions = /* @__PURE__ */ new Set(); const resolutionsWithFailedLookups = /* @__PURE__ */ new Set(); const resolutionsWithOnlyAffectingLocations = /* @__PURE__ */ new Set(); const resolvedFileToResolution = /* @__PURE__ */ new Map(); @@ -135121,6 +138401,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory); const rootPath = resolutionHost.toPath(rootDir); const rootPathComponents = getPathComponents(rootPath); + const isRootWatchable = canWatchDirectoryOrFile(rootPathComponents); const isSymlinkCache = /* @__PURE__ */ new Map(); const packageDirWatchers = /* @__PURE__ */ new Map(); const dirPathToSymlinkPackageRefCount = /* @__PURE__ */ new Map(); @@ -135162,12 +138443,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW clear: clear2, onChangesAffectModuleResolution }; - function getResolvedModule(resolution) { - return resolution.resolvedModule; - } - function getResolvedTypeReferenceDirective(resolution) { - return resolution.resolvedTypeReferenceDirective; - } function clear2() { clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf); clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf); @@ -135238,8 +138513,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); - nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions); - nonRelativeExternalModuleResolutions.clear(); + watchFailedLookupLocationOfNonRelativeModuleResolutions(); isSymlinkCache.clear(); } function cleanupLibResolutionWatching(newProgram) { @@ -135249,7 +138523,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW stopWatchFailedLookupLocationOfResolution( resolution, resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)), - getResolvedModule + getResolvedModuleFromResolution ); resolvedLibraries.delete(libFileName); } @@ -135258,13 +138532,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW function finishCachingPerDirectoryResolution(newProgram, oldProgram) { filesWithInvalidatedNonRelativeUnresolvedImports = void 0; allModuleAndTypeResolutionsAreInvalidated = false; - nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions); - nonRelativeExternalModuleResolutions.clear(); + watchFailedLookupLocationOfNonRelativeModuleResolutions(); if (newProgram !== oldProgram) { cleanupLibResolutionWatching(newProgram); newProgram == null ? void 0 : newProgram.getSourceFiles().forEach((newFile) => { var _a; - const expected = isExternalOrCommonJsModule(newFile) ? ((_a = newFile.packageJsonLocations) == null ? void 0 : _a.length) ?? 0 : 0; + const expected = ((_a = newFile.packageJsonLocations) == null ? void 0 : _a.length) ?? 0; const existing = impliedFormatPackageJsons.get(newFile.resolvedPath) ?? emptyArray; for (let i = existing.length; i < expected; i++) { createFileWatcherOfAffectingLocation( @@ -135331,12 +138604,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW shouldRetryResolution, logChanges }) { + var _a; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path); const resolvedModules = []; const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); const program = resolutionHost.getCurrentProgram(); - const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); + const oldRedirect = program && ((_a = program.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef); const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference; const seenNamesInFile = createModeAwareCache(); for (const entry of entries) { @@ -135429,7 +138703,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW getModuleResolutionHost(resolutionHost), typeReferenceDirectiveResolutionCache ), - getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective, + getResolutionWithResolvedFileName: getResolvedTypeReferenceDirectiveFromResolution, shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0, deferWatchingNonRelativeResolution: false }); @@ -135450,7 +138724,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW resolutionHost, moduleResolutionCache ), - getResolutionWithResolvedFileName: getResolvedModule, + getResolutionWithResolvedFileName: getResolvedModuleFromResolution, shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), logChanges: logChangesWhenResolvingModule, deferWatchingNonRelativeResolution: true @@ -135468,17 +138742,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW libraryName, resolution, path, - getResolvedModule, + getResolvedModuleFromResolution, /*deferWatchingNonRelativeResolution*/ false ); resolvedLibraries.set(libFileName, resolution); if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule); + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModuleFromResolution); } } else { if (isTraceEnabled(options, host)) { - const resolved = getResolvedModule(resolution); + const resolved = getResolvedModuleFromResolution(resolution); trace( host, (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, @@ -135517,27 +138791,20 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return endsWith(dirPath, "/node_modules/@types"); } function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution) { - var _a; - if (resolution.refCount) { - resolution.refCount++; - Debug.assertIsDefined(resolution.files); - } else { - resolution.refCount = 1; - Debug.assert(!((_a = resolution.files) == null ? void 0 : _a.size)); - if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) { - watchFailedLookupLocationOfResolution(resolution); - } else { - nonRelativeExternalModuleResolutions.add(name, resolution); - } - const resolved = getResolutionWithResolvedFileName(resolution); - if (resolved && resolved.resolvedFileName) { - const key = resolutionHost.toPath(resolved.resolvedFileName); - let resolutions = resolvedFileToResolution.get(key); - if (!resolutions) resolvedFileToResolution.set(key, resolutions = /* @__PURE__ */ new Set()); - resolutions.add(resolution); - } - } (resolution.files ?? (resolution.files = /* @__PURE__ */ new Set())).add(filePath); + if (resolution.files.size !== 1) return; + if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) { + watchFailedLookupLocationOfResolution(resolution); + } else { + nonRelativeExternalModuleResolutions.add(resolution); + } + const resolved = getResolutionWithResolvedFileName(resolution); + if (resolved && resolved.resolvedFileName) { + const key = resolutionHost.toPath(resolved.resolvedFileName); + let resolutions = resolvedFileToResolution.get(key); + if (!resolutions) resolvedFileToResolution.set(key, resolutions = /* @__PURE__ */ new Set()); + resolutions.add(resolution); + } } function watchFailedLookupLocation(failedLookupLocation, setAtRoot) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); @@ -135547,7 +138814,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW rootDir, rootPath, rootPathComponents, - getCurrentDirectory + isRootWatchable, + getCurrentDirectory, + resolutionHost.preferNonRecursiveWatch ); if (toWatch) { const { dir, dirPath, nonRecursive, packageDir, packageDirPath } = toWatch; @@ -135562,7 +138831,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return setAtRoot; } function watchFailedLookupLocationOfResolution(resolution) { - Debug.assert(!!resolution.refCount); + var _a; + Debug.assert(!!((_a = resolution.files) == null ? void 0 : _a.size)); const { failedLookupLocations, affectingLocations, alternateResult } = resolution; if (!(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !(affectingLocations == null ? void 0 : affectingLocations.length) && !alternateResult) return; if ((failedLookupLocations == null ? void 0 : failedLookupLocations.length) || alternateResult) resolutionsWithFailedLookups.add(resolution); @@ -135588,7 +138858,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW watchAffectingLocationsOfResolution(resolution, !(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !alternateResult); } function watchAffectingLocationsOfResolution(resolution, addToResolutionsWithOnlyAffectingLocations) { - Debug.assert(!!resolution.refCount); + var _a; + Debug.assert(!!((_a = resolution.files) == null ? void 0 : _a.size)); const { affectingLocations } = resolution; if (!(affectingLocations == null ? void 0 : affectingLocations.length)) return; if (addToResolutionsWithOnlyAffectingLocations) resolutionsWithOnlyAffectingLocations.add(resolution); @@ -135662,17 +138933,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap)); packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); } - function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) { - const program = resolutionHost.getCurrentProgram(); - if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) { - resolutions.forEach(watchFailedLookupLocationOfResolution); - } else { - resolutions.forEach((resolution) => watchAffectingLocationsOfResolution( - resolution, - /*addToResolutionsWithOnlyAffectingLocations*/ - true - )); - } + function watchFailedLookupLocationOfNonRelativeModuleResolutions() { + nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution); + nonRelativeExternalModuleResolutions.clear(); } function createDirectoryWatcherForPackageDir(dir, dirPath, packageDir, packageDirPath, nonRecursive) { Debug.assert(!nonRecursive); @@ -135692,11 +138955,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW ); } else if (packageDirWatcher.isSymlink !== isSymlink) { packageDirWatcher.dirPathToWatcher.forEach((watcher) => { - removeDirectoryWatcher( - packageDirWatcher.isSymlink ? packageDirPath : dirPath, - /*syncDirWatcherRemove*/ - false - ); + removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath); watcher.watcher = createDirPathToWatcher(); }); packageDirWatcher.isSymlink = isSymlink; @@ -135736,7 +138995,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW } return dirWatcher; } - function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove) { + function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); const toWatch = getDirectoryToWatchFailedLookupLocation( failedLookupLocation, @@ -135744,7 +139003,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW rootDir, rootPath, rootPathComponents, - getCurrentDirectory + isRootWatchable, + getCurrentDirectory, + resolutionHost.preferNonRecursiveWatch ); if (toWatch) { const { dirPath, packageDirPath } = toWatch; @@ -135755,7 +139016,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW const forDirPath = packageDirWatcher.dirPathToWatcher.get(dirPath); forDirPath.refCount--; if (forDirPath.refCount === 0) { - removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath, syncDirWatcherRemove); + removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath); packageDirWatcher.dirPathToWatcher.delete(dirPath); if (packageDirWatcher.isSymlink) { const refCount = dirPathToSymlinkPackageRefCount.get(dirPath) - 1; @@ -135765,20 +139026,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW dirPathToSymlinkPackageRefCount.set(dirPath, refCount); } } - if (syncDirWatcherRemove) closePackageDirWatcher(packageDirWatcher, packageDirPath); } } else { - removeDirectoryWatcher(dirPath, syncDirWatcherRemove); + removeDirectoryWatcher(dirPath); } } return removeAtRoot; } - function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { + function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) { Debug.checkDefined(resolution.files).delete(filePath); - resolution.refCount--; - if (resolution.refCount) { - return; - } + if (resolution.files.size) return; + resolution.files = void 0; const resolved = getResolutionWithResolvedFileName(resolution); if (resolved && resolved.resolvedFileName) { const key = resolutionHost.toPath(resolved.resolvedFileName); @@ -135790,11 +139048,11 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW let removeAtRoot = false; if (failedLookupLocations) { for (const failedLookupLocation of failedLookupLocations) { - removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove); + removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); } } - if (alternateResult) removeAtRoot = stopWatchFailedLookupLocation(alternateResult, removeAtRoot, syncDirWatcherRemove); - if (removeAtRoot) removeDirectoryWatcher(rootPath, syncDirWatcherRemove); + if (alternateResult) removeAtRoot = stopWatchFailedLookupLocation(alternateResult, removeAtRoot); + if (removeAtRoot) removeDirectoryWatcher(rootPath); } else if (affectingLocations == null ? void 0 : affectingLocations.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); } @@ -135802,14 +139060,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW for (const affectingLocation of affectingLocations) { const watcher = fileWatchesOfAffectingLocations.get(affectingLocation); watcher.resolutions--; - if (syncDirWatcherRemove) closeFileWatcherOfAffectingLocation(watcher, affectingLocation); } } } - function removeDirectoryWatcher(dirPath, syncDirWatcherRemove) { + function removeDirectoryWatcher(dirPath) { const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath); dirWatcher.refCount--; - if (syncDirWatcherRemove) closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath); } function createDirectoryWatcher(directory, dirPath, nonRecursive) { return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => { @@ -135820,15 +139076,14 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath); }, nonRecursive ? 0 /* None */ : 1 /* Recursive */); } - function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { + function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) { const resolutions = cache.get(filePath); if (resolutions) { resolutions.forEach( (resolution) => stopWatchFailedLookupLocationOfResolution( resolution, filePath, - getResolutionWithResolvedFileName, - syncDirWatcherRemove + getResolutionWithResolvedFileName ) ); cache.delete(filePath); @@ -135842,9 +139097,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW if (!resolvedProjectReference) return; resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f))); } - function removeResolutionsOfFile(filePath, syncDirWatcherRemove) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove); + function removeResolutionsOfFile(filePath) { + removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModuleFromResolution); + removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirectiveFromResolution); } function invalidateResolutions(resolutions, canInvalidate) { if (!resolutions) return false; @@ -135892,6 +139147,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return false; } (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath); + (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath); const packagePath = parseNodeModuleFromPath( fileOrDirectoryPath, /*isFolder*/ @@ -135973,7 +139229,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW resolutionHost.toPath(typeRoot), rootPath, rootPathComponents, + isRootWatchable, getCurrentDirectory, + resolutionHost.preferNonRecursiveWatch, (dirPath2) => directoryWatchesOfFailedLookups.has(dirPath2) || dirPathToSymlinkPackageRefCount.has(dirPath2) ); if (dirPath) { @@ -136139,7 +139397,7 @@ function createTabularErrorsDisplay(filesInError, host) { if (distinctFiles.length === 0) return ""; const numberLength = (num) => Math.log(num) * Math.LOG10E + 1; const fileToErrorCount = distinctFiles.map((file) => [file, countWhere(filesInError, (fileInError) => fileInError.fileName === file.fileName)]); - const maxErrors = fileToErrorCount.reduce((acc, value) => Math.max(acc, value[1] || 0), 0); + const maxErrors = maxBy(fileToErrorCount, 0, (value) => value[1]); const headerRow = Diagnostics.Errors_Files.message; const leftColumnHeadingLength = headerRow.split(" ")[0].length; const leftPaddingGoal = Math.max(leftColumnHeadingLength, numberLength(maxErrors)); @@ -136156,13 +139414,13 @@ function createTabularErrorsDisplay(filesInError, host) { }); return tabularData; } -function isBuilderProgram2(program) { - return !!program.getState; +function isBuilderProgram(program) { + return !!program.state; } function listFiles(program, write) { const options = program.getCompilerOptions(); if (options.explainFiles) { - explainFiles(isBuilderProgram2(program) ? program.getProgram() : program, write); + explainFiles(isBuilderProgram(program) ? program.getProgram() : program, write); } else if (options.listFiles || options.listFilesOnly) { forEach(program.getSourceFiles(), (file) => { write(file.fileName); @@ -136176,10 +139434,10 @@ function explainFiles(program, write) { for (const file of program.getSourceFiles()) { write(`${toFileName(file, relativeFileName)}`); (_a = reasons.get(file.path)) == null ? void 0 : _a.forEach((reason) => write(` ${fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText}`)); - (_b = explainIfFileIsRedirectAndImpliedFormat(file, relativeFileName)) == null ? void 0 : _b.forEach((d) => write(` ${d.messageText}`)); + (_b = explainIfFileIsRedirectAndImpliedFormat(file, program.getCompilerOptionsForFile(file), relativeFileName)) == null ? void 0 : _b.forEach((d) => write(` ${d.messageText}`)); } } -function explainIfFileIsRedirectAndImpliedFormat(file, fileNameConvertor) { +function explainIfFileIsRedirectAndImpliedFormat(file, options, fileNameConvertor) { var _a; let result; if (file.path !== file.resolvedPath) { @@ -136199,7 +139457,7 @@ function explainIfFileIsRedirectAndImpliedFormat(file, fileNameConvertor) { )); } if (isExternalOrCommonJsModule(file)) { - switch (file.impliedNodeFormat) { + switch (getImpliedNodeFormatForEmitWorker(file, options)) { case 99 /* ESNext */: if (file.packageJsonScope) { (result ?? (result = [])).push(chainDiagnosticMessages( @@ -136250,7 +139508,7 @@ function getMatchedIncludeSpec(program, fileName) { const index = findIndex((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => { if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false; const pattern = getPatternFromSpec(includeSpec, basePath, "files"); - return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName); + return !!pattern && getRegexFromPattern(`(?:${pattern})$`, useCaseSensitiveFileNames2).test(fileName); }); return index !== -1 ? configFile.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[index] : void 0; } @@ -136367,7 +139625,7 @@ function toFileName(file, fileNameConvertor) { return fileNameConvertor ? fileNameConvertor(fileName) : fileName; } function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { - const isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; + const options = program.getCompilerOptions(); const allDiagnostics = program.getConfigFileParsingDiagnostics().slice(); const configFileParsingDiagnosticsLength = allDiagnostics.length; addRange(allDiagnostics, program.getSyntacticDiagnostics( @@ -136377,7 +139635,7 @@ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummar )); if (allDiagnostics.length === configFileParsingDiagnosticsLength) { addRange(allDiagnostics, program.getOptionsDiagnostics(cancellationToken)); - if (!isListFilesOnly) { + if (!options.listFilesOnly) { addRange(allDiagnostics, program.getGlobalDiagnostics(cancellationToken)); if (allDiagnostics.length === configFileParsingDiagnosticsLength) { addRange(allDiagnostics, program.getSemanticDiagnostics( @@ -136386,9 +139644,16 @@ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummar cancellationToken )); } + if (options.noEmit && getEmitDeclarations(options) && allDiagnostics.length === configFileParsingDiagnosticsLength) { + addRange(allDiagnostics, program.getDeclarationDiagnostics( + /*sourceFile*/ + void 0, + cancellationToken + )); + } } } - const emitResult = isListFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit( + const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit( /*targetSourceFile*/ void 0, writeFile2, @@ -136396,13 +139661,12 @@ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummar emitOnlyDtsFiles, customTransformers ); - const { emittedFiles, diagnostics: emitDiagnostics } = emitResult; - addRange(allDiagnostics, emitDiagnostics); + addRange(allDiagnostics, emitResult.diagnostics); const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics); diagnostics.forEach(reportDiagnostic); if (write) { const currentDir = program.getCurrentDirectory(); - forEach(emittedFiles, (file) => { + forEach(emitResult.emittedFiles, (file) => { const filepath = getNormalizedAbsolutePath(file, currentDir); write(`TSFILE: ${filepath}`); }); @@ -136443,7 +139707,8 @@ function createWatchHost(system = sys, reportWatchStatus2) { watchFile: maybeBind(system, system.watchFile) || returnNoopFileWatcher, watchDirectory: maybeBind(system, system.watchDirectory) || returnNoopFileWatcher, setTimeout: maybeBind(system, system.setTimeout) || noop, - clearTimeout: maybeBind(system, system.clearTimeout) || noop + clearTimeout: maybeBind(system, system.clearTimeout) || noop, + preferNonRecursiveWatch: system.preferNonRecursiveWatch }; } var WatchType = { @@ -136520,6 +139785,7 @@ function getSourceFileVersionAsHashFromText(host, text) { if (pos && text.charCodeAt(pos - 1) === 13 /* carriageReturn */) { pos--; } + // falls through case 13 /* carriageReturn */: break; default: @@ -136662,8 +139928,8 @@ function readBuilderProgram(compilerOptions, host) { if (!content) return void 0; buildInfo = getBuildInfo(buildInfoPath, content); } - if (!buildInfo || buildInfo.version !== version || !buildInfo.program) return void 0; - return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host); + if (!buildInfo || buildInfo.version !== version || !isIncrementalBuildInfo(buildInfo)) return void 0; + return createBuilderProgramUsingIncrementalBuildInfo(buildInfo, buildInfoPath, host); } function createIncrementalCompilerHost(options, system = sys) { const host = createCompilerHostWorker( @@ -136721,6 +139987,7 @@ function createWatchProgram(host) { let updateLevel; let missingFilesMap; let watchedWildcardDirectories; + let staleWatches = /* @__PURE__ */ new Map([[void 0, void 0]]); let timerToUpdateProgram; let timerToInvalidateFailedLookupResolutions; let parsedConfigs; @@ -136774,6 +140041,7 @@ function createWatchProgram(host) { compilerHost.toPath = toPath3; compilerHost.getCompilationSettings = () => compilerOptions; compilerHost.useSourceOfProjectReferenceRedirect = maybeBind(host, host.useSourceOfProjectReferenceRedirect); + compilerHost.preferNonRecursiveWatch = host.preferNonRecursiveWatch; compilerHost.watchDirectoryOfFailedLookupLocation = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.FailedLookupLocations); compilerHost.watchAffectingFileLocation = (file, cb) => watchFile2(file, cb, 2e3 /* High */, watchOptions, WatchType.AffectingFileLocation); compilerHost.watchTypeRootsDirectory = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.TypeRoots); @@ -136808,8 +140076,6 @@ function createWatchProgram(host) { const customHasInvalidLibResolutions = host.resolveLibrary ? maybeBind(host, host.hasInvalidatedLibResolutions) || returnTrue : returnFalse; builderProgram = readBuilderProgram(compilerOptions, compilerHost); synchronizeProgram(); - watchConfigFileWildCardDirectories(); - if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache }; function close() { clearInvalidateResolutionsOfFailedLookupLocations(); @@ -136912,6 +140178,16 @@ function createWatchProgram(host) { compilerHost.directoryExists = originalDirectoryExists; compilerHost.createDirectory = originalCreateDirectory; compilerHost.writeFile = originalWriteFile; + staleWatches == null ? void 0 : staleWatches.forEach((configFile, configPath) => { + if (!configPath) { + watchConfigFileWildCardDirectories(); + if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); + } else { + const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); + if (config) watchReferencedProject(configFile, configPath, config); + } + }); + staleWatches = void 0; return builderProgram; } function createNewProgram(hasInvalidatedResolutions, hasInvalidatedLibResolutions) { @@ -137085,22 +140361,17 @@ function createWatchProgram(host) { updateProgram(); } function updateProgram() { - var _a, _b, _c, _d; switch (updateLevel) { case 1 /* RootNamesAndUpdate */: - (_a = perfLogger) == null ? void 0 : _a.logStartUpdateProgram("PartialConfigReload"); reloadFileNamesFromConfigFile(); break; case 2 /* Full */: - (_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; default: - (_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); break; } - (_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done"); return getCurrentBuilderProgram(); } function reloadFileNamesFromConfigFile() { @@ -137109,7 +140380,13 @@ function createWatchProgram(host) { Debug.assert(configFileName); updateLevel = 0 /* Update */; rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions); - if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) { + if (updateErrorForNoInputFiles( + rootFileNames, + getNormalizedAbsolutePath(configFileName, currentDirectory), + compilerOptions.configFile.configFileSpecs, + configFileParsingDiagnostics, + canConfigFileJsonReportNoInputFiles + )) { hasChangedConfigFileParsingErrors = true; } synchronizeProgram(); @@ -137123,9 +140400,8 @@ function createWatchProgram(host) { } parseConfigFile2(); hasChangedCompilerOptions = true; + (staleWatches ?? (staleWatches = /* @__PURE__ */ new Map())).set(void 0, void 0); synchronizeProgram(); - watchConfigFileWildCardDirectories(); - updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); } function parseConfigFile2() { Debug.assert(configFileName); @@ -137177,7 +140453,7 @@ function createWatchProgram(host) { } else { (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine }); } - watchReferencedProject(configFileName2, configPath, config); + (staleWatches ?? (staleWatches = /* @__PURE__ */ new Map())).set(configPath, configFileName2); return parsedCommandLine; } function getParsedCommandLineFromConfigFileHost(configFileName2) { @@ -137382,16 +140658,17 @@ var UpToDateStatusType = /* @__PURE__ */ ((UpToDateStatusType2) => { UpToDateStatusType2[UpToDateStatusType2["ErrorReadingFile"] = 4] = "ErrorReadingFile"; UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithSelf"] = 5] = "OutOfDateWithSelf"; UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithUpstream"] = 6] = "OutOfDateWithUpstream"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateBuildInfo"] = 7] = "OutOfDateBuildInfo"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateOptions"] = 8] = "OutOfDateOptions"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateRoots"] = 9] = "OutOfDateRoots"; - UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 10] = "UpstreamOutOfDate"; - UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 11] = "UpstreamBlocked"; - UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 12] = "ComputingUpstream"; - UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 13] = "TsVersionOutputOfDate"; - UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 14] = "UpToDateWithInputFileText"; - UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 15] = "ContainerOnly"; - UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 16] = "ForceBuild"; + UpToDateStatusType2[UpToDateStatusType2["OutOfDateBuildInfoWithPendingEmit"] = 7] = "OutOfDateBuildInfoWithPendingEmit"; + UpToDateStatusType2[UpToDateStatusType2["OutOfDateBuildInfoWithErrors"] = 8] = "OutOfDateBuildInfoWithErrors"; + UpToDateStatusType2[UpToDateStatusType2["OutOfDateOptions"] = 9] = "OutOfDateOptions"; + UpToDateStatusType2[UpToDateStatusType2["OutOfDateRoots"] = 10] = "OutOfDateRoots"; + UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 11] = "UpstreamOutOfDate"; + UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 12] = "UpstreamBlocked"; + UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 13] = "ComputingUpstream"; + UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 14] = "TsVersionOutputOfDate"; + UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 15] = "UpToDateWithInputFileText"; + UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 16] = "ContainerOnly"; + UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 17] = "ForceBuild"; return UpToDateStatusType2; })(UpToDateStatusType || {}); function resolveConfigFileProjectName(project) { @@ -137403,7 +140680,6 @@ function resolveConfigFileProjectName(project) { // src/compiler/tsbuildPublic.ts var minimumDate = /* @__PURE__ */ new Date(-864e13); -var maximumDate = /* @__PURE__ */ new Date(864e13); function getOrCreateValueFromConfigFileMap(configFileMap, resolved, createT) { const existingValue = configFileMap.get(resolved); let newValue; @@ -137458,6 +140734,7 @@ function getCompilerOptionsOfBuildOptions(buildOptions) { commonOptionsWithBuild.forEach((option) => { if (hasProperty(buildOptions, option.name)) result[option.name] = buildOptions[option.name]; }); + result.tscBuild = true; return result; } function createSolutionBuilder(host, rootNames, defaultOptions) { @@ -137861,7 +141138,7 @@ function createUpdateOutputFileStampsProject(state, project, projectPath, config } }; } -function createBuildOrUpdateInvalidedProject(state, project, projectPath, projectIndex, config, buildOrder) { +function createBuildOrUpdateInvalidedProject(state, project, projectPath, projectIndex, config, status, buildOrder) { let step = 0 /* CreateProgram */; let program; let buildResult; @@ -137912,17 +141189,13 @@ function createBuildOrUpdateInvalidedProject(state, project, projectPath, projec } ); } - executeSteps(2 /* SemanticDiagnostics */, cancellationToken); - if (step === 4 /* EmitBuildInfo */) { - return emitBuildInfo(writeFile2, cancellationToken); - } - if (step !== 3 /* Emit */) return void 0; + executeSteps(0 /* CreateProgram */, cancellationToken); return emit(writeFile2, cancellationToken, customTransformers); }, done }; function done(cancellationToken, writeFile2, customTransformers) { - executeSteps(6 /* Done */, cancellationToken, writeFile2, customTransformers); + executeSteps(3 /* Done */, cancellationToken, writeFile2, customTransformers); mark("SolutionBuilder::Projects built"); return doneInvalidatedProject(state, projectPath); } @@ -137939,14 +141212,14 @@ function createBuildOrUpdateInvalidedProject(state, project, projectPath, projec if (state.options.dry) { reportStatus(state, Diagnostics.A_non_dry_build_would_build_project_0, project); buildResult = 1 /* Success */; - step = 5 /* QueueReferencingProjects */; + step = 2 /* QueueReferencingProjects */; return; } if (state.options.verbose) reportStatus(state, Diagnostics.Building_project_0, project); if (config.fileNames.length === 0) { reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); buildResult = 0 /* None */; - step = 5 /* QueueReferencingProjects */; + step = 2 /* QueueReferencingProjects */; return; } const { host, compilerHost } = state; @@ -137974,185 +141247,98 @@ function createBuildOrUpdateInvalidedProject(state, project, projectPath, projec } step++; } - function handleDiagnostics(diagnostics, errorFlags, errorType) { - if (diagnostics.length) { - ({ buildResult, step } = buildErrors( - state, - projectPath, - program, - config, - diagnostics, - errorFlags, - errorType - )); - } else { - step++; - } - } - function getSyntaxDiagnostics(cancellationToken) { - Debug.assertIsDefined(program); - handleDiagnostics( - [ - ...program.getConfigFileParsingDiagnostics(), - ...program.getOptionsDiagnostics(cancellationToken), - ...program.getGlobalDiagnostics(cancellationToken), - ...program.getSyntacticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - ) - ], - 8 /* SyntaxErrors */, - "Syntactic" - ); - } - function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics( - Debug.checkDefined(program).getSemanticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - ), - 16 /* TypeErrors */, - "Semantic" - ); - } function emit(writeFileCallback, cancellationToken, customTransformers) { var _a, _b, _c; Debug.assertIsDefined(program); - Debug.assert(step === 3 /* Emit */); - const saved = program.saveEmitState(); - let declDiagnostics; - const reportDeclarationDiagnostics = (d) => (declDiagnostics || (declDiagnostics = [])).push(d); - const outputFiles = []; - const { emitResult } = emitFilesAndReportErrors( + Debug.assert(step === 1 /* Emit */); + const { host, compilerHost } = state; + const emittedOutputs = /* @__PURE__ */ new Map(); + const options = program.getCompilerOptions(); + const isIncremental = isIncrementalCompilation(options); + let outputTimeStampMap; + let now; + const { emitResult, diagnostics } = emitFilesAndReportErrors( program, - reportDeclarationDiagnostics, - /*write*/ - void 0, + (d) => host.reportDiagnostic(d), + state.write, /*reportSummary*/ void 0, - (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }), + (name, text, writeByteOrderMark, onError, sourceFiles, data) => { + var _a2; + const path = toPath2(state, name); + emittedOutputs.set(toPath2(state, name), name); + if (data == null ? void 0 : data.buildInfo) { + now || (now = getCurrentTime(state.host)); + const isChangedSignature2 = (_a2 = program.hasChangedEmitSignature) == null ? void 0 : _a2.call(program); + const existing = getBuildInfoCacheEntry(state, name, projectPath); + if (existing) { + existing.buildInfo = data.buildInfo; + existing.modifiedTime = now; + if (isChangedSignature2) existing.latestChangedDtsTime = now; + } else { + state.buildInfoCache.set(projectPath, { + path: toPath2(state, name), + buildInfo: data.buildInfo, + modifiedTime: now, + latestChangedDtsTime: isChangedSignature2 ? now : void 0 + }); + } + } + const modifiedTime = (data == null ? void 0 : data.differsOnlyInMap) ? getModifiedTime(state.host, name) : void 0; + (writeFileCallback || compilerHost.writeFile)( + name, + text, + writeByteOrderMark, + onError, + sourceFiles, + data + ); + if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime); + else if (!isIncremental && state.watch) { + (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host))); + } + }, cancellationToken, /*emitOnlyDtsFiles*/ - false, + void 0, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a, project)) ); - if (declDiagnostics) { - program.restoreEmitState(saved); - ({ buildResult, step } = buildErrors( - state, - projectPath, - program, - config, - declDiagnostics, - 32 /* DeclarationEmitErrors */, - "Declaration file" - )); - return { - emitSkipped: true, - diagnostics: emitResult.diagnostics - }; + if ((!options.noEmitOnError || !diagnostics.length) && (emittedOutputs.size || status.type !== 8 /* OutOfDateBuildInfoWithErrors */)) { + updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); } - const { host, compilerHost } = state; - const resultFlags = ((_c = program.hasChangedEmitSignature) == null ? void 0 : _c.call(program)) ? 0 /* None */ : 2 /* DeclarationOutputUnchanged */; - const emitterDiagnostics = createDiagnosticCollection(); - const emittedOutputs = /* @__PURE__ */ new Map(); - const options = program.getCompilerOptions(); - const isIncremental = isIncrementalCompilation(options); - let outputTimeStampMap; - let now; - outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => { - const path = toPath2(state, name); - emittedOutputs.set(toPath2(state, name), name); - if (data == null ? void 0 : data.buildInfo) setBuildInfo(state, data.buildInfo, projectPath, options, resultFlags); - const modifiedTime = (data == null ? void 0 : data.differsOnlyInMap) ? getModifiedTime(state.host, name) : void 0; - writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); - if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime); - else if (!isIncremental && state.watch) { - (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host))); - } - }); - finishEmit( - emitterDiagnostics, - emittedOutputs, - outputFiles.length ? outputFiles[0].name : getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), - resultFlags - ); - return emitResult; - } - function emitBuildInfo(writeFileCallback, cancellationToken) { - Debug.assertIsDefined(program); - Debug.assert(step === 4 /* EmitBuildInfo */); - const emitResult = program.emitBuildInfo((name, text, writeByteOrderMark, onError, sourceFiles, data) => { - if (data == null ? void 0 : data.buildInfo) setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions(), 2 /* DeclarationOutputUnchanged */); - if (writeFileCallback) writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data); - else state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data); - }, cancellationToken); - if (emitResult.diagnostics.length) { - reportErrors(state, emitResult.diagnostics); - state.diagnostics.set(projectPath, [...state.diagnostics.get(projectPath), ...emitResult.diagnostics]); - buildResult = 64 /* EmitErrors */ & buildResult; - } - if (emitResult.emittedFiles && state.write) { - emitResult.emittedFiles.forEach((name) => listEmittedFile(state, config, name)); + state.projectErrorsReported.set(projectPath, true); + buildResult = ((_c = program.hasChangedEmitSignature) == null ? void 0 : _c.call(program)) ? 0 /* None */ : 2 /* DeclarationOutputUnchanged */; + if (!diagnostics.length) { + state.diagnostics.delete(projectPath); + state.projectStatus.set(projectPath, { + type: 1 /* UpToDate */, + oldestOutputFileName: firstOrUndefinedIterator(emittedOutputs.values()) ?? getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()) + }); + } else { + state.diagnostics.set(projectPath, diagnostics); + state.projectStatus.set(projectPath, { type: 0 /* Unbuildable */, reason: `it had errors` }); + buildResult |= 4 /* AnyErrors */; } afterProgramDone(state, program); - step = 5 /* QueueReferencingProjects */; + step = 2 /* QueueReferencingProjects */; return emitResult; } - function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) { - const emitDiagnostics = emitterDiagnostics.getDiagnostics(); - if (emitDiagnostics.length) { - ({ buildResult, step } = buildErrors( - state, - projectPath, - program, - config, - emitDiagnostics, - 64 /* EmitErrors */, - "Emit" - )); - return emitDiagnostics; - } - if (state.write) { - emittedOutputs.forEach((name) => listEmittedFile(state, config, name)); - } - updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); - state.diagnostics.delete(projectPath); - state.projectStatus.set(projectPath, { - type: 1 /* UpToDate */, - oldestOutputFileName - }); - afterProgramDone(state, program); - step = 5 /* QueueReferencingProjects */; - buildResult = resultFlags; - return emitDiagnostics; - } function executeSteps(till, cancellationToken, writeFile2, customTransformers) { - while (step <= till && step < 6 /* Done */) { + while (step <= till && step < 3 /* Done */) { const currentStep = step; switch (step) { case 0 /* CreateProgram */: createProgram2(); break; - case 1 /* SyntaxDiagnostics */: - getSyntaxDiagnostics(cancellationToken); - break; - case 2 /* SemanticDiagnostics */: - getSemanticDiagnostics(cancellationToken); - break; - case 3 /* Emit */: + case 1 /* Emit */: emit(writeFile2, cancellationToken, customTransformers); break; - case 4 /* EmitBuildInfo */: - emitBuildInfo(writeFile2, cancellationToken); - break; - case 5 /* QueueReferencingProjects */: + case 2 /* QueueReferencingProjects */: queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult)); step++; break; - case 6 /* Done */: + // Should never be done + case 3 /* Done */: default: assertType(step); } @@ -138187,7 +141373,13 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { watchPackageJsonFiles(state, project, projectPath, config); } else if (updateLevel === 1 /* RootNamesAndUpdate */) { config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost); - updateErrorForNoInputFiles(config.fileNames, project, config.options.configFile.configFileSpecs, config.errors, canJsonReportNoInputFiles(config.raw)); + updateErrorForNoInputFiles( + config.fileNames, + project, + config.options.configFile.configFileSpecs, + config.errors, + canJsonReportNoInputFiles(config.raw) + ); watchInputFiles(state, project, projectPath, config); watchPackageJsonFiles(state, project, projectPath, config); } @@ -138202,7 +141394,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { } continue; } - if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 14 /* UpToDateWithInputFileText */) { + if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) { reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); return { kind: 1 /* UpdateOutputFileStamps */, @@ -138214,7 +141406,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { }; } } - if (status.type === 11 /* UpstreamBlocked */) { + if (status.type === 12 /* UpstreamBlocked */) { verboseReportProjectStatus(state, project, status); reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); @@ -138228,7 +141420,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { } continue; } - if (status.type === 15 /* ContainerOnly */) { + if (status.type === 16 /* ContainerOnly */) { verboseReportProjectStatus(state, project, status); reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); projectPendingBuild.delete(projectPath); @@ -138253,6 +141445,7 @@ function createInvalidatedProjectWithInfo(state, info, buildOrder) { info.projectPath, info.projectIndex, info.config, + info.status, buildOrder ) : createUpdateOutputFileStampsProject( state, @@ -138267,11 +141460,6 @@ function getNextInvalidatedProject(state, buildOrder, reportQueue) { if (!info) return info; return createInvalidatedProjectWithInfo(state, info, buildOrder); } -function listEmittedFile({ write }, proj, file) { - if (write && proj.options.listEmittedFiles) { - write(`TSFILE: ${file}`); - } -} function getOldProgram({ options, builderPrograms, compilerHost }, proj, parsed) { if (options.force) return void 0; const value = builderPrograms.get(proj); @@ -138280,7 +141468,6 @@ function getOldProgram({ options, builderPrograms, compilerHost }, proj, parsed) } function afterProgramDone(state, program) { if (program) { - if (state.write) listFiles(program, state.write); if (state.host.afterProgramEmitAndDiagnostics) { state.host.afterProgramEmitAndDiagnostics(program); } @@ -138288,14 +141475,6 @@ function afterProgramDone(state, program) { } state.projectCompilerOptions = state.baseCompilerOptions; } -function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) { - const canEmitBuildInfo = program && !program.getCompilerOptions().outFile; - reportAndStoreErrors(state, resolvedPath, diagnostics); - state.projectStatus.set(resolvedPath, { type: 0 /* Unbuildable */, reason: `${errorType} errors` }); - if (canEmitBuildInfo) return { buildResult, step: 4 /* EmitBuildInfo */ }; - afterProgramDone(state, program); - return { buildResult, step: 5 /* QueueReferencingProjects */ }; -} function isFileWatcherWithModifiedTime(value) { return !!value.watcher; } @@ -138353,23 +141532,6 @@ function getOutputTimeStampMap(state, resolvedConfigFilePath) { if (!result) state.outputTimeStamps.set(resolvedConfigFilePath, result = /* @__PURE__ */ new Map()); return result; } -function setBuildInfo(state, buildInfo, resolvedConfigPath, options, resultFlags) { - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - const existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath); - const modifiedTime = getCurrentTime(state.host); - if (existing) { - existing.buildInfo = buildInfo; - existing.modifiedTime = modifiedTime; - if (!(resultFlags & 2 /* DeclarationOutputUnchanged */)) existing.latestChangedDtsTime = modifiedTime; - } else { - state.buildInfoCache.set(resolvedConfigPath, { - path: toPath2(state, buildInfoPath), - buildInfo, - modifiedTime, - latestChangedDtsTime: resultFlags & 2 /* DeclarationOutputUnchanged */ ? void 0 : modifiedTime - }); - } -} function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) { const path = toPath2(state, buildInfoPath); const existing = state.buildInfoCache.get(resolvedConfigPath); @@ -138397,99 +141559,103 @@ function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, } } function getUpToDateStatusWorker(state, project, resolvedPath) { - var _a, _b, _c, _d; - if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) { - return { - type: 15 /* ContainerOnly */ - }; - } + var _a, _b, _c, _d, _e; + if (isSolutionConfig(project)) return { type: 16 /* ContainerOnly */ }; let referenceStatuses; const force = !!state.options.force; if (project.projectReferences) { - state.projectStatus.set(resolvedPath, { type: 12 /* ComputingUpstream */ }); + state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ }); for (const ref of project.projectReferences) { const resolvedRef = resolveProjectReferencePath(ref); const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef); const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath); const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath); - if (refStatus.type === 12 /* ComputingUpstream */ || refStatus.type === 15 /* ContainerOnly */) { + if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) { continue; } - if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 11 /* UpstreamBlocked */) { + if (state.options.stopBuildOnErrors && (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */)) { return { - type: 11 /* UpstreamBlocked */, + type: 12 /* UpstreamBlocked */, upstreamProjectName: ref.path, - upstreamProjectBlocked: refStatus.type === 11 /* UpstreamBlocked */ - }; - } - if (refStatus.type !== 1 /* UpToDate */) { - return { - type: 10 /* UpstreamOutOfDate */, - upstreamProjectName: ref.path + upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */ }; } if (!force) (referenceStatuses || (referenceStatuses = [])).push({ ref, refStatus, resolvedRefPath, resolvedConfig }); } } - if (force) return { type: 16 /* ForceBuild */ }; + if (force) return { type: 17 /* ForceBuild */ }; const { host } = state; const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options); - let oldestOutputFileName; - let oldestOutputFileTime = maximumDate; - let buildInfoTime; - let buildInfoProgram; - let buildInfoVersionMap; - if (buildInfoPath) { - const buildInfoCacheEntry2 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath); - buildInfoTime = (buildInfoCacheEntry2 == null ? void 0 : buildInfoCacheEntry2.modifiedTime) || getModifiedTime(host, buildInfoPath); - if (buildInfoTime === missingFileModifiedTime) { - if (!buildInfoCacheEntry2) { - state.buildInfoCache.set(resolvedPath, { - path: toPath2(state, buildInfoPath), - buildInfo: false, - modifiedTime: buildInfoTime - }); - } + const isIncremental = isIncrementalCompilation(project.options); + let buildInfoCacheEntry = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath); + const buildInfoTime = (buildInfoCacheEntry == null ? void 0 : buildInfoCacheEntry.modifiedTime) || getModifiedTime(host, buildInfoPath); + if (buildInfoTime === missingFileModifiedTime) { + if (!buildInfoCacheEntry) { + state.buildInfoCache.set(resolvedPath, { + path: toPath2(state, buildInfoPath), + buildInfo: false, + modifiedTime: buildInfoTime + }); + } + return { + type: 3 /* OutputMissing */, + missingOutputFileName: buildInfoPath + }; + } + const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime); + if (!buildInfo) { + return { + type: 4 /* ErrorReadingFile */, + fileName: buildInfoPath + }; + } + const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0; + if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version) { + return { + type: 14 /* TsVersionOutputOfDate */, + version: buildInfo.version + }; + } + if (!project.options.noCheck && (buildInfo.errors || // TODO: syntax errors???? + buildInfo.checkPending)) { + return { + type: 8 /* OutOfDateBuildInfoWithErrors */, + buildInfoFile: buildInfoPath + }; + } + if (incrementalBuildInfo) { + if (!project.options.noCheck && (((_a = incrementalBuildInfo.changeFileSet) == null ? void 0 : _a.length) || ((_b = incrementalBuildInfo.semanticDiagnosticsPerFile) == null ? void 0 : _b.length) || getEmitDeclarations(project.options) && ((_c = incrementalBuildInfo.emitDiagnosticsPerFile) == null ? void 0 : _c.length))) { return { - type: 3 /* OutputMissing */, - missingOutputFileName: buildInfoPath + type: 8 /* OutOfDateBuildInfoWithErrors */, + buildInfoFile: buildInfoPath }; } - const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime); - if (!buildInfo) { + if (!project.options.noEmit && (((_d = incrementalBuildInfo.changeFileSet) == null ? void 0 : _d.length) || ((_e = incrementalBuildInfo.affectedFilesPendingEmit) == null ? void 0 : _e.length) || incrementalBuildInfo.pendingEmit !== void 0)) { return { - type: 4 /* ErrorReadingFile */, - fileName: buildInfoPath + type: 7 /* OutOfDateBuildInfoWithPendingEmit */, + buildInfoFile: buildInfoPath }; } - if (buildInfo.program && buildInfo.version !== version) { + if ((!project.options.noEmit || project.options.noEmit && getEmitDeclarations(project.options)) && getPendingEmitKindWithSeen( + project.options, + incrementalBuildInfo.options || {}, + /*emitOnlyDtsFiles*/ + void 0, + !!project.options.noEmit + )) { return { - type: 13 /* TsVersionOutputOfDate */, - version: buildInfo.version + type: 9 /* OutOfDateOptions */, + buildInfoFile: buildInfoPath }; } - if (buildInfo.program) { - if (((_a = buildInfo.program.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? ((_b = buildInfo.program.affectedFilesPendingEmit) == null ? void 0 : _b.length) || ((_c = buildInfo.program.emitDiagnosticsPerFile) == null ? void 0 : _c.length) : (_d = buildInfo.program.semanticDiagnosticsPerFile) == null ? void 0 : _d.length)) { - return { - type: 7 /* OutOfDateBuildInfo */, - buildInfoFile: buildInfoPath - }; - } - if (!project.options.noEmit && getPendingEmitKind(project.options, buildInfo.program.options || {})) { - return { - type: 8 /* OutOfDateOptions */, - buildInfoFile: buildInfoPath - }; - } - buildInfoProgram = buildInfo.program; - } - oldestOutputFileTime = buildInfoTime; - oldestOutputFileName = buildInfoPath; } + let oldestOutputFileTime = buildInfoTime; + let oldestOutputFileName = buildInfoPath; let newestInputFileName = void 0; let newestInputFileTime = minimumDate; let pseudoInputUpToDate = false; const seenRoots = /* @__PURE__ */ new Set(); + let buildInfoVersionMap; for (const inputFile of project.fileNames) { const inputTime = getModifiedTime2(state, inputFile); if (inputTime === missingFileModifiedTime) { @@ -138498,12 +141664,12 @@ function getUpToDateStatusWorker(state, project, resolvedPath) { reason: `${inputFile} does not exist` }; } - const inputPath = buildInfoProgram ? toPath2(state, inputFile) : void 0; - if (buildInfoTime && buildInfoTime < inputTime) { + const inputPath = toPath2(state, inputFile); + if (buildInfoTime < inputTime) { let version2; let currentVersion; - if (buildInfoProgram) { - if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host); + if (incrementalBuildInfo) { + if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host); const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath); version2 = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath); const text = version2 ? state.readFileWithCache(resolvedInputPath ?? inputFile) : void 0; @@ -138522,27 +141688,34 @@ function getUpToDateStatusWorker(state, project, resolvedPath) { newestInputFileName = inputFile; newestInputFileTime = inputTime; } - if (buildInfoProgram) seenRoots.add(inputPath); + seenRoots.add(inputPath); } - if (buildInfoProgram) { - if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host); - const existingRoot = forEachEntry( + let existingRoot; + if (incrementalBuildInfo) { + if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host); + existingRoot = forEachEntry( buildInfoVersionMap.roots, // File was root file when project was built but its not any more (_resolved, existingRoot2) => !seenRoots.has(existingRoot2) ? existingRoot2 : void 0 ); - if (existingRoot) { - return { - type: 9 /* OutOfDateRoots */, - buildInfoFile: buildInfoPath, - inputFile: existingRoot - }; - } + } else { + existingRoot = forEach( + getNonIncrementalBuildInfoRoots(buildInfo, buildInfoPath, host), + (root) => !seenRoots.has(root) ? root : void 0 + ); + } + if (existingRoot) { + return { + type: 10 /* OutOfDateRoots */, + buildInfoFile: buildInfoPath, + inputFile: existingRoot + }; } - if (!buildInfoPath) { + if (!isIncremental) { const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames()); const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath); for (const output of outputs) { + if (output === buildInfoPath) continue; const path = toPath2(state, output); let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path); if (!outputTime) { @@ -138568,14 +141741,13 @@ function getUpToDateStatusWorker(state, project, resolvedPath) { } } } - const buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath); let pseudoUpToDate = false; if (referenceStatuses) { for (const { ref, refStatus, resolvedConfig, resolvedRefPath } of referenceStatuses) { if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) { continue; } - if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath)) { + if (hasSameBuildInfo(state, buildInfoCacheEntry ?? (buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath)), resolvedRefPath)) { return { type: 6 /* OutOfDateWithUpstream */, outOfDateOutputFileName: buildInfoPath, @@ -138606,7 +141778,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) { ); if (dependentPackageFileStatus) return dependentPackageFileStatus; return { - type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 14 /* UpToDateWithInputFileText */ : 1 /* UpToDate */, + type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */, newestInputFileTime, newestInputFileName, oldestOutputFileName @@ -138618,7 +141790,7 @@ function hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath) { } function getUpToDateStatus(state, project, resolvedPath) { if (project === void 0) { - return { type: 0 /* Unbuildable */, reason: "File deleted mid-build" }; + return { type: 0 /* Unbuildable */, reason: "config file deleted mid-build" }; } const prior = state.projectStatus.get(resolvedPath); if (prior !== void 0) { @@ -138635,7 +141807,8 @@ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, if (proj.options.noEmit) return; let now; const buildInfoPath = getTsBuildInfoEmitOutputFilePath(proj.options); - if (buildInfoPath) { + const isIncremental = isIncrementalCompilation(proj.options); + if (buildInfoPath && isIncremental) { if (!(skipOutputs == null ? void 0 : skipOutputs.has(toPath2(state, buildInfoPath)))) { if (!!state.options.verbose) reportStatus(state, verboseMessage, proj.options.configFilePath); state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host)); @@ -138658,7 +141831,8 @@ function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, reportStatus(state, verboseMessage, proj.options.configFilePath); } host.setModifiedTime(file, now || (now = getCurrentTime(state.host))); - if (outputTimeStampMap) { + if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now; + else if (outputTimeStampMap) { outputTimeStampMap.set(path, now); modifiedOutputs.add(path); } @@ -138672,7 +141846,7 @@ function getLatestChangedDtsTime(state, options, resolvedConfigPath) { if (!options.composite) return void 0; const entry = Debug.checkDefined(state.buildInfoCache.get(resolvedConfigPath)); if (entry.latestChangedDtsTime !== void 0) return entry.latestChangedDtsTime || void 0; - const latestChangedDtsTime = entry.buildInfo && entry.buildInfo.program && entry.buildInfo.program.latestChangedDtsFile ? state.host.getModifiedTime(getNormalizedAbsolutePath(entry.buildInfo.program.latestChangedDtsFile, getDirectoryPath(entry.path))) : void 0; + const latestChangedDtsTime = entry.buildInfo && isIncrementalBuildInfo(entry.buildInfo) && entry.buildInfo.latestChangedDtsFile ? state.host.getModifiedTime(getNormalizedAbsolutePath(entry.buildInfo.latestChangedDtsFile, getDirectoryPath(entry.path))) : void 0; entry.latestChangedDtsTime = latestChangedDtsTime || false; return latestChangedDtsTime; } @@ -138687,7 +141861,7 @@ function updateOutputTimestamps(state, proj, resolvedPath) { }); } function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) { - if (buildResult & 124 /* AnyErrors */) return; + if (state.options.stopBuildOnErrors && buildResult & 4 /* AnyErrors */) return; if (!config.options.composite) return; for (let index = projectIndex + 1; index < buildOrder.length; index++) { const nextProject = buildOrder[index]; @@ -138706,7 +141880,8 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con status.type = 2 /* UpToDateWithUpstreamTypes */; break; } - case 14 /* UpToDateWithInputFileText */: + // falls through + case 15 /* UpToDateWithInputFileText */: case 2 /* UpToDateWithUpstreamTypes */: if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) { state.projectStatus.set(nextProjectPath, { @@ -138716,7 +141891,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con }); } break; - case 11 /* UpstreamBlocked */: + case 12 /* UpstreamBlocked */: if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) { clearProjectStatus(state, nextProjectPath); } @@ -139135,21 +142310,28 @@ function reportUpToDateStatus(state, configFileName, status) { relName(state, configFileName), relName(state, status.fileName) ); - case 7 /* OutOfDateBuildInfo */: + case 7 /* OutOfDateBuildInfoWithPendingEmit */: return reportStatus( state, Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, relName(state, configFileName), relName(state, status.buildInfoFile) ); - case 8 /* OutOfDateOptions */: + case 8 /* OutOfDateBuildInfoWithErrors */: + return reportStatus( + state, + Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors, + relName(state, configFileName), + relName(state, status.buildInfoFile) + ); + case 9 /* OutOfDateOptions */: return reportStatus( state, Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions, relName(state, configFileName), relName(state, status.buildInfoFile) ); - case 9 /* OutOfDateRoots */: + case 10 /* OutOfDateRoots */: return reportStatus( state, Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more, @@ -139174,20 +142356,20 @@ function reportUpToDateStatus(state, configFileName, status) { Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName) ); - case 14 /* UpToDateWithInputFileText */: + case 15 /* UpToDateWithInputFileText */: return reportStatus( state, Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files, relName(state, configFileName) ); - case 10 /* UpstreamOutOfDate */: + case 11 /* UpstreamOutOfDate */: return reportStatus( state, Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName) ); - case 11 /* UpstreamBlocked */: + case 12 /* UpstreamBlocked */: return reportStatus( state, status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, @@ -139197,11 +142379,11 @@ function reportUpToDateStatus(state, configFileName, status) { case 0 /* Unbuildable */: return reportStatus( state, - Diagnostics.Failed_to_parse_file_0_Colon_1, + Diagnostics.Project_0_is_out_of_date_because_1, relName(state, configFileName), status.reason ); - case 13 /* TsVersionOutputOfDate */: + case 14 /* TsVersionOutputOfDate */: return reportStatus( state, Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, @@ -139209,14 +142391,16 @@ function reportUpToDateStatus(state, configFileName, status) { status.version, version ); - case 16 /* ForceBuild */: + case 17 /* ForceBuild */: return reportStatus( state, Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName) ); - case 15 /* ContainerOnly */: - case 12 /* ComputingUpstream */: + case 16 /* ContainerOnly */: + // Don't report status on "solution" projects + // falls through + case 13 /* ComputingUpstream */: break; default: assertType(status); @@ -139288,7 +142472,7 @@ function shouldBePretty(sys2, options) { return options.pretty; } function getOptionsForHelp(commandLine) { - return !!commandLine.options.all ? sort(optionDeclarations, (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(optionDeclarations.slice(), (v) => !!v.showInSimplifiedHelpView); + return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter(optionDeclarations.concat(tscBuildOption), (v) => !!v.showInSimplifiedHelpView); } function printVersion(sys2) { sys2.write(getDiagnosticText(Diagnostics.Version_0, version) + sys2.newLine); @@ -139612,7 +142796,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) { output = [...output, ...generateSectionOptionsOutput( sys2, getDiagnosticText(Diagnostics.BUILD_OPTIONS), - buildOptions, + filter(buildOptions, (option) => option !== tscBuildOption), /*subCategory*/ false, formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") @@ -139626,7 +142810,7 @@ function printBuildHelp(sys2, buildOptions) { output = [...output, ...generateSectionOptionsOutput( sys2, getDiagnosticText(Diagnostics.BUILD_OPTIONS), - buildOptions, + filter(buildOptions, (option) => option !== tscBuildOption), /*subCategory*/ false, formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") @@ -139663,10 +142847,6 @@ function printHelp(sys2, commandLine) { } function executeCommandLineWorker(sys2, cb, commandLine) { let reportDiagnostic = createDiagnosticReporter(sys2); - if (commandLine.options.build) { - reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_build_must_be_the_first_command_line_argument)); - return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */); - } let configFileName; if (commandLine.options.locale) { validateLocaleAndSetLanguage(commandLine.options.locale, sys2, commandLine.errors); @@ -139676,7 +142856,7 @@ function executeCommandLineWorker(sys2, cb, commandLine) { return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */); } if (commandLine.options.init) { - writeConfigFile(sys2, reportDiagnostic, commandLine.options, commandLine.fileNames); + writeConfigFile(sys2, reportDiagnostic, commandLine.options); return sys2.exit(0 /* Success */); } if (commandLine.options.version) { @@ -139812,16 +142992,16 @@ function executeCommandLineWorker(sys2, cb, commandLine) { } } } -function isBuild(commandLineArgs) { +function isBuildCommand(commandLineArgs) { if (commandLineArgs.length > 0 && commandLineArgs[0].charCodeAt(0) === 45 /* minus */) { const firstOption = commandLineArgs[0].slice(commandLineArgs[0].charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase(); - return firstOption === "build" || firstOption === "b"; + return firstOption === tscBuildOption.name || firstOption === tscBuildOption.shortName; } return false; } function executeCommandLine(system, cb, commandLineArgs) { - if (isBuild(commandLineArgs)) { - const { buildOptions, watchOptions, projects, errors } = parseBuildCommand(commandLineArgs.slice(1)); + if (isBuildCommand(commandLineArgs)) { + const { buildOptions, watchOptions, projects, errors } = parseBuildCommand(commandLineArgs); if (buildOptions.generateCpuProfile && system.enableCPUProfiler) { system.enableCPUProfiler(buildOptions.generateCpuProfile, () => performBuild( system, @@ -140315,15 +143495,14 @@ function statisticValue(s) { Debug.assertNever(s.type); } } -function writeConfigFile(sys2, reportDiagnostic, options, fileNames) { +function writeConfigFile(sys2, reportDiagnostic, options) { const currentDirectory = sys2.getCurrentDirectory(); const file = normalizePath(combinePaths(currentDirectory, "tsconfig.json")); if (sys2.fileExists(file)) { reportDiagnostic(createCompilerDiagnostic(Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file)); } else { - sys2.writeFile(file, generateTSConfig(options, fileNames, sys2.newLine)); - const output = [sys2.newLine, ...getHeader(sys2, "Created a new tsconfig.json with:")]; - output.push(getCompilerOptionsDiffValue(options, sys2.newLine) + sys2.newLine + sys2.newLine); + sys2.writeFile(file, generateTSConfig(options, sys2.newLine)); + const output = [sys2.newLine, ...getHeader(sys2, "Created a new tsconfig.json")]; output.push(`You can learn more at https://aka.ms/tsconfig` + sys2.newLine); for (const line of output) { sys2.write(line); @@ -140333,40 +143512,518 @@ function writeConfigFile(sys2, reportDiagnostic, options, fileNames) { } // src/compiler/expressionToTypeNode.ts +function syntacticResult(type, reportFallback = true) { + return { type, reportFallback }; +} +var notImplemented2 = syntacticResult( + /*type*/ + void 0, + /*reportFallback*/ + false +); +var alreadyReported = syntacticResult( + /*type*/ + void 0, + /*reportFallback*/ + false +); +var failed = syntacticResult( + /*type*/ + void 0, + /*reportFallback*/ + true +); function createSyntacticTypeNodeBuilder(options, resolver) { const strictNullChecks = getStrictOptionValue(options, "strictNullChecks"); return { - typeFromExpression, serializeTypeOfDeclaration, serializeReturnTypeForSignature, - serializeTypeOfExpression + serializeTypeOfExpression, + serializeTypeOfAccessor, + tryReuseExistingTypeNode(context, existing) { + if (!resolver.canReuseTypeNode(context, existing)) { + return void 0; + } + return tryReuseExistingTypeNode(context, existing); + } }; - function serializeExistingTypeAnnotation(type, addUndefined) { - return type !== void 0 && (!addUndefined || type && canAddUndefined(type)) ? true : void 0; + function reuseNode(context, node, range = node) { + return node === void 0 ? void 0 : resolver.markNodeReuse(context, node.flags & 16 /* Synthesized */ ? node : factory.cloneNode(node), range ?? node); + } + function tryReuseExistingTypeNode(context, existing) { + const { finalizeBoundary, startRecoveryScope, hadError, markError } = resolver.createRecoveryBoundary(context); + const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode); + if (!finalizeBoundary()) { + return void 0; + } + context.approximateLength += existing.end - existing.pos; + return transformed; + function visitExistingNodeTreeSymbols(node) { + if (hadError()) return node; + const recover = startRecoveryScope(); + const onExitNewScope = isNewScopeNode(node) ? resolver.enterNewScope(context, node) : void 0; + const result = visitExistingNodeTreeSymbolsWorker(node); + onExitNewScope == null ? void 0 : onExitNewScope(); + if (hadError()) { + if (isTypeNode(node) && !isTypePredicateNode(node)) { + recover(); + return resolver.serializeExistingTypeNode(context, node); + } + return node; + } + return result ? resolver.markNodeReuse(context, result, node) : void 0; + } + function tryVisitSimpleTypeNode(node) { + const innerNode = skipTypeParentheses(node); + switch (innerNode.kind) { + case 184 /* TypeReference */: + return tryVisitTypeReference(innerNode); + case 187 /* TypeQuery */: + return tryVisitTypeQuery(innerNode); + case 200 /* IndexedAccessType */: + return tryVisitIndexedAccess(innerNode); + case 199 /* TypeOperator */: + const typeOperatorNode = innerNode; + if (typeOperatorNode.operator === 143 /* KeyOfKeyword */) { + return tryVisitKeyOf(typeOperatorNode); + } + } + return visitNode(node, visitExistingNodeTreeSymbols, isTypeNode); + } + function tryVisitIndexedAccess(node) { + const resultObjectType = tryVisitSimpleTypeNode(node.objectType); + if (resultObjectType === void 0) { + return void 0; + } + return factory.updateIndexedAccessTypeNode(node, resultObjectType, visitNode(node.indexType, visitExistingNodeTreeSymbols, isTypeNode)); + } + function tryVisitKeyOf(node) { + Debug.assertEqual(node.operator, 143 /* KeyOfKeyword */); + const type = tryVisitSimpleTypeNode(node.type); + if (type === void 0) { + return void 0; + } + return factory.updateTypeOperatorNode(node, type); + } + function tryVisitTypeQuery(node) { + const { introducesError, node: exprName } = resolver.trackExistingEntityName(context, node.exprName); + if (!introducesError) { + return factory.updateTypeQueryNode( + node, + exprName, + visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode) + ); + } + const serializedName = resolver.serializeTypeName( + context, + node.exprName, + /*isTypeOf*/ + true + ); + if (serializedName) { + return resolver.markNodeReuse(context, serializedName, node.exprName); + } + } + function tryVisitTypeReference(node) { + if (resolver.canReuseTypeNode(context, node)) { + const { introducesError, node: newName } = resolver.trackExistingEntityName(context, node.typeName); + const typeArguments = visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode); + if (!introducesError) { + const updated = factory.updateTypeReferenceNode( + node, + newName, + typeArguments + ); + return resolver.markNodeReuse(context, updated, node); + } else { + const serializedName = resolver.serializeTypeName( + context, + node.typeName, + /*isTypeOf*/ + false, + typeArguments + ); + if (serializedName) { + return resolver.markNodeReuse(context, serializedName, node.typeName); + } + } + } + } + function visitExistingNodeTreeSymbolsWorker(node) { + var _a; + if (isJSDocTypeExpression(node)) { + return visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode); + } + if (isJSDocAllType(node) || node.kind === 320 /* JSDocNamepathType */) { + return factory.createKeywordTypeNode(133 /* AnyKeyword */); + } + if (isJSDocUnknownType(node)) { + return factory.createKeywordTypeNode(159 /* UnknownKeyword */); + } + if (isJSDocNullableType(node)) { + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); + } + if (isJSDocOptionalType(node)) { + return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); + } + if (isJSDocNonNullableType(node)) { + return visitNode(node.type, visitExistingNodeTreeSymbols); + } + if (isJSDocVariadicType(node)) { + return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); + } + if (isJSDocTypeLiteral(node)) { + return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => { + const name = visitNode(isIdentifier(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier); + const overrideTypeNode = resolver.getJsDocPropertyOverride(context, node, t); + return factory.createPropertySignature( + /*modifiers*/ + void 0, + name, + t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(58 /* QuestionToken */) : void 0, + overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) + ); + })); + } + if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { + return setOriginalNode(factory.createKeywordTypeNode(133 /* AnyKeyword */), node); + } + if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { + return factory.createTypeLiteralNode([factory.createIndexSignature( + /*modifiers*/ + void 0, + [factory.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "x", + /*questionToken*/ + void 0, + visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode) + )], + visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode) + )]); + } + if (isJSDocFunctionType(node)) { + if (isJSDocConstructSignature(node)) { + let newTypeNode; + return factory.createConstructorTypeNode( + /*modifiers*/ + void 0, + visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), + mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration( + /*modifiers*/ + void 0, + getEffectiveDotDotDotForParameter(p), + resolver.markNodeReuse(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i)), p), + factory.cloneNode(p.questionToken), + visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode), + /*initializer*/ + void 0 + )), + visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) + ); + } else { + return factory.createFunctionTypeNode( + visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), + map(node.parameters, (p, i) => factory.createParameterDeclaration( + /*modifiers*/ + void 0, + getEffectiveDotDotDotForParameter(p), + resolver.markNodeReuse(context, factory.createIdentifier(getNameForJSDocFunctionParameter(p, i)), p), + factory.cloneNode(p.questionToken), + visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode), + /*initializer*/ + void 0 + )), + visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) + ); + } + } + if (isThisTypeNode(node)) { + if (resolver.canReuseTypeNode(context, node)) { + return node; + } + markError(); + return node; + } + if (isTypeParameterDeclaration(node)) { + const { node: newName } = resolver.trackExistingEntityName(context, node.name); + return factory.updateTypeParameterDeclaration( + node, + visitNodes2(node.modifiers, visitExistingNodeTreeSymbols, isModifier), + // resolver.markNodeReuse(context, typeParameterToName(getDeclaredTypeOfSymbol(getSymbolOfDeclaration(node)), context), node), + newName, + visitNode(node.constraint, visitExistingNodeTreeSymbols, isTypeNode), + visitNode(node.default, visitExistingNodeTreeSymbols, isTypeNode) + ); + } + if (isIndexedAccessTypeNode(node)) { + const result = tryVisitIndexedAccess(node); + if (!result) { + markError(); + return node; + } + return result; + } + if (isTypeReferenceNode(node)) { + const result = tryVisitTypeReference(node); + if (result) { + return result; + } + markError(); + return node; + } + if (isLiteralImportTypeNode(node)) { + if (((_a = node.attributes) == null ? void 0 : _a.token) === 132 /* AssertKeyword */) { + markError(); + return node; + } + if (!resolver.canReuseTypeNode(context, node)) { + return resolver.serializeExistingTypeNode(context, node); + } + const specifier = rewriteModuleSpecifier2(node, node.argument.literal); + const literal = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier; + return factory.updateImportTypeNode( + node, + literal === node.argument.literal ? reuseNode(context, node.argument) : factory.createLiteralTypeNode(literal), + visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes), + visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName), + visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), + node.isTypeOf + ); + } + if (isNamedDeclaration(node) && node.name.kind === 168 /* ComputedPropertyName */ && !resolver.hasLateBindableName(node)) { + if (!hasDynamicName(node)) { + return visitEachChild2(node, visitExistingNodeTreeSymbols); + } + if (resolver.shouldRemoveDeclaration(context, node)) { + return void 0; + } + } + if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) { + let visited = visitEachChild2(node, visitExistingNodeTreeSymbols); + if (visited === node) { + visited = resolver.markNodeReuse(context, factory.cloneNode(node), node); + } + visited.type = factory.createKeywordTypeNode(133 /* AnyKeyword */); + if (isParameter(node)) { + visited.modifiers = void 0; + } + return visited; + } + if (isTypeQueryNode(node)) { + const result = tryVisitTypeQuery(node); + if (!result) { + markError(); + return node; + } + return result; + } + if (isComputedPropertyName(node) && isEntityNameExpression(node.expression)) { + const { node: result, introducesError } = resolver.trackExistingEntityName(context, node.expression); + if (!introducesError) { + return factory.updateComputedPropertyName(node, result); + } else { + const computedPropertyNameType = resolver.serializeTypeOfExpression(context, node.expression); + let literal; + if (isLiteralTypeNode(computedPropertyNameType)) { + literal = computedPropertyNameType.literal; + } else { + const evaluated = resolver.evaluateEntityNameExpression(node.expression); + const literalNode = typeof evaluated.value === "string" ? factory.createStringLiteral( + evaluated.value, + /*isSingleQuote*/ + void 0 + ) : typeof evaluated.value === "number" ? factory.createNumericLiteral( + evaluated.value, + /*numericLiteralFlags*/ + 0 + ) : void 0; + if (!literalNode) { + if (isImportTypeNode(computedPropertyNameType)) { + resolver.trackComputedName(context, node.expression); + } + return node; + } + literal = literalNode; + } + if (literal.kind === 11 /* StringLiteral */ && isIdentifierText(literal.text, getEmitScriptTarget(options))) { + return factory.createIdentifier(literal.text); + } + if (literal.kind === 9 /* NumericLiteral */ && !literal.text.startsWith("-")) { + return literal; + } + return factory.updateComputedPropertyName(node, literal); + } + } + if (isTypePredicateNode(node)) { + let parameterName; + if (isIdentifier(node.parameterName)) { + const { node: result, introducesError } = resolver.trackExistingEntityName(context, node.parameterName); + if (introducesError) markError(); + parameterName = result; + } else { + parameterName = factory.cloneNode(node.parameterName); + } + return factory.updateTypePredicateNode(node, factory.cloneNode(node.assertsModifier), parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); + } + if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) { + const visited = visitEachChild2(node, visitExistingNodeTreeSymbols); + const clone2 = resolver.markNodeReuse(context, visited === node ? factory.cloneNode(node) : visited, node); + const flags = getEmitFlags(clone2); + setEmitFlags(clone2, flags | (context.flags & 1024 /* MultilineObjectLiterals */ && isTypeLiteralNode(node) ? 0 : 1 /* SingleLine */)); + return clone2; + } + if (isStringLiteral(node) && !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */) && !node.singleQuote) { + const clone2 = factory.cloneNode(node); + clone2.singleQuote = true; + return clone2; + } + if (isConditionalTypeNode(node)) { + const checkType = visitNode(node.checkType, visitExistingNodeTreeSymbols, isTypeNode); + const disposeScope = resolver.enterNewScope(context, node); + const extendType = visitNode(node.extendsType, visitExistingNodeTreeSymbols, isTypeNode); + const trueType = visitNode(node.trueType, visitExistingNodeTreeSymbols, isTypeNode); + disposeScope(); + const falseType = visitNode(node.falseType, visitExistingNodeTreeSymbols, isTypeNode); + return factory.updateConditionalTypeNode( + node, + checkType, + extendType, + trueType, + falseType + ); + } + if (isTypeOperatorNode(node)) { + if (node.operator === 158 /* UniqueKeyword */ && node.type.kind === 155 /* SymbolKeyword */) { + if (!resolver.canReuseTypeNode(context, node)) { + markError(); + return node; + } + } else if (node.operator === 143 /* KeyOfKeyword */) { + const result = tryVisitKeyOf(node); + if (!result) { + markError(); + return node; + } + return result; + } + } + return visitEachChild2(node, visitExistingNodeTreeSymbols); + function visitEachChild2(node2, visitor) { + const nonlocalNode = !context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(node2); + return visitEachChild( + node2, + visitor, + /*context*/ + void 0, + nonlocalNode ? visitNodesWithoutCopyingPositions : void 0 + ); + } + function visitNodesWithoutCopyingPositions(nodes, visitor, test, start, count) { + let result = visitNodes2(nodes, visitor, test, start, count); + if (result) { + if (result.pos !== -1 || result.end !== -1) { + if (result === nodes) { + result = factory.createNodeArray(nodes.slice(), nodes.hasTrailingComma); + } + setTextRangePosEnd(result, -1, -1); + } + } + return result; + } + function getEffectiveDotDotDotForParameter(p) { + return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0); + } + function getNameForJSDocFunctionParameter(p, index) { + return p.name && isIdentifier(p.name) && p.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index}`; + } + function rewriteModuleSpecifier2(parent2, lit) { + const newName = resolver.getModuleSpecifierOverride(context, parent2, lit); + return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit; + } + } + } + function serializeExistingTypeNode(typeNode, context, addUndefined) { + if (!typeNode) return void 0; + let result; + if ((!addUndefined || canAddUndefined(typeNode)) && resolver.canReuseTypeNode(context, typeNode)) { + result = tryReuseExistingTypeNode(context, typeNode); + if (result !== void 0) { + result = addUndefinedIfNeeded( + result, + addUndefined, + /*owner*/ + void 0, + context + ); + } + } + return result; + } + function serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, requiresAddingUndefined, useFallback = requiresAddingUndefined !== void 0) { + if (!declaredType) return void 0; + if (!resolver.canReuseTypeNodeAnnotation(context, node, declaredType, symbol, requiresAddingUndefined)) { + if (!requiresAddingUndefined || !resolver.canReuseTypeNodeAnnotation( + context, + node, + declaredType, + symbol, + /*requiresAddingUndefined*/ + false + )) { + return void 0; + } + } + let result; + if (!requiresAddingUndefined || canAddUndefined(declaredType)) { + result = serializeExistingTypeNode(declaredType, context, requiresAddingUndefined); + } + if (result !== void 0 || !useFallback) { + return result; + } + context.tracker.reportInferenceFallback(node); + return resolver.serializeExistingTypeNode(context, declaredType, requiresAddingUndefined) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */); + } + function serializeExistingTypeNodeWithFallback(typeNode, context, addUndefined, targetNode) { + if (!typeNode) return void 0; + const result = serializeExistingTypeNode(typeNode, context, addUndefined); + if (result !== void 0) { + return result; + } + context.tracker.reportInferenceFallback(targetNode ?? typeNode); + return resolver.serializeExistingTypeNode(context, typeNode, addUndefined) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */); + } + function serializeTypeOfAccessor(accessor, symbol, context) { + return typeFromAccessor(accessor, symbol, context) ?? inferAccessorType(accessor, resolver.getAllAccessorDeclarations(accessor), context, symbol); } function serializeTypeOfExpression(expr, context, addUndefined, preserveLiterals) { - return typeFromExpression( + const result = typeFromExpression( expr, context, /*isConstContext*/ false, addUndefined, preserveLiterals - ) ?? inferExpressionType(expr, context); + ); + return result.type !== void 0 ? result.type : inferExpressionType(expr, context, result.reportFallback); } - function serializeTypeOfDeclaration(node, context) { + function serializeTypeOfDeclaration(node, symbol, context) { switch (node.kind) { - case 171 /* PropertySignature */: - return serializeExistingTypeAnnotation(getEffectiveTypeAnnotationNode(node)); - case 169 /* Parameter */: - return typeFromParameter(node, context); - case 260 /* VariableDeclaration */: - return typeFromVariable(node, context); - case 172 /* PropertyDeclaration */: - return typeFromProperty(node, context); - case 208 /* BindingElement */: - return inferTypeOfDeclaration(node, context); - case 277 /* ExportAssignment */: + case 170 /* Parameter */: + case 342 /* JSDocParameterTag */: + return typeFromParameter(node, symbol, context); + case 261 /* VariableDeclaration */: + return typeFromVariable(node, symbol, context); + case 172 /* PropertySignature */: + case 349 /* JSDocPropertyTag */: + case 173 /* PropertyDeclaration */: + return typeFromProperty(node, symbol, context); + case 209 /* BindingElement */: + return inferTypeOfDeclaration(node, symbol, context); + case 278 /* ExportAssignment */: return serializeTypeOfExpression( node.expression, context, @@ -140375,73 +144032,95 @@ function createSyntacticTypeNodeBuilder(options, resolver) { /*preserveLiterals*/ true ); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 226 /* BinaryExpression */: - return serializeExistingTypeAnnotation(getEffectiveTypeAnnotationNode(node)) || inferTypeOfDeclaration(node, context); - case 303 /* PropertyAssignment */: - return typeFromExpression(node.initializer, context) || inferTypeOfDeclaration(node, context); + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: + case 227 /* BinaryExpression */: + return typeFromExpandoProperty(node, symbol, context); + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + return typeFromPropertyAssignment(node, symbol, context); default: Debug.assertNever(node, `Node needs to be an inferrable node, found ${Debug.formatSyntaxKind(node.kind)}`); } } - function serializeReturnTypeForSignature(node, context) { + function typeFromPropertyAssignment(node, symbol, context) { + const typeAnnotation = getEffectiveTypeAnnotationNode(node); + let result; + if (typeAnnotation && resolver.canReuseTypeNodeAnnotation(context, node, typeAnnotation, symbol)) { + result = serializeExistingTypeNode(typeAnnotation, context); + } + if (!result && node.kind === 304 /* PropertyAssignment */) { + const initializer = node.initializer; + const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 235 /* AsExpression */ || initializer.kind === 217 /* TypeAssertionExpression */ ? initializer.type : void 0; + if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) { + result = serializeExistingTypeNode(assertionNode, context); + } + } + return result ?? inferTypeOfDeclaration( + node, + symbol, + context, + /*reportFallback*/ + false + ); + } + function serializeReturnTypeForSignature(node, symbol, context) { switch (node.kind) { - case 177 /* GetAccessor */: - return typeFromAccessor(node, context); - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 178 /* SetAccessor */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 317 /* JSDocFunctionType */: - case 323 /* JSDocSignature */: - return createReturnFromSignature(node, context); + case 178 /* GetAccessor */: + return serializeTypeOfAccessor(node, symbol, context); + case 175 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: + case 181 /* ConstructSignature */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 177 /* Constructor */: + case 179 /* SetAccessor */: + case 182 /* IndexSignature */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 318 /* JSDocFunctionType */: + case 324 /* JSDocSignature */: + return createReturnFromSignature(node, symbol, context); default: Debug.assertNever(node, `Node needs to be an inferrable node, found ${Debug.formatSyntaxKind(node.kind)}`); } } - function getTypeAnnotationFromAccessor2(accessor) { + function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? getEffectiveReturnTypeNode(accessor) : accessor.parameters.length > 0 ? getEffectiveTypeAnnotationNode(accessor.parameters[0]) : void 0; + return accessor.kind === 178 /* GetAccessor */ ? isInJSFile(accessor) && getJSDocType(accessor) || getEffectiveReturnTypeNode(accessor) : getEffectiveSetAccessorTypeAnnotationNode(accessor); } } function getTypeAnnotationFromAllAccessorDeclarations(node, accessors) { - let accessorType = getTypeAnnotationFromAccessor2(node); + let accessorType = getTypeAnnotationFromAccessor(node); if (!accessorType && node !== accessors.firstAccessor) { - accessorType = getTypeAnnotationFromAccessor2(accessors.firstAccessor); + accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor); } if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) { - accessorType = getTypeAnnotationFromAccessor2(accessors.secondAccessor); + accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor); } return accessorType; } - function typeFromAccessor(node, context) { + function typeFromAccessor(node, symbol, context) { const accessorDeclarations = resolver.getAllAccessorDeclarations(node); const accessorType = getTypeAnnotationFromAllAccessorDeclarations(node, accessorDeclarations); - if (accessorType) { - return serializeExistingTypeAnnotation(accessorType); + if (accessorType && !isTypePredicateNode(accessorType)) { + return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context)); } if (accessorDeclarations.getAccessor) { - return createReturnFromSignature(accessorDeclarations.getAccessor, context); + return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(accessorDeclarations.getAccessor, symbol, context)); } - return false; + return void 0; } - function typeFromVariable(node, context) { + function typeFromVariable(node, symbol, context) { + var _a; const declaredType = getEffectiveTypeAnnotationNode(node); + let resultType = failed; if (declaredType) { - return serializeExistingTypeAnnotation(declaredType); - } - let resultType; - if (node.initializer) { - if (!resolver.isExpandoFunctionDeclaration(node)) { + resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol)); + } else if (node.initializer && (((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 || countWhere(symbol.declarations, isVariableDeclaration) === 1)) { + if (!resolver.isExpandoFunctionDeclaration(node) && !isContextuallyTyped(node)) { resultType = typeFromExpression( node.initializer, context, @@ -140453,71 +144132,119 @@ function createSyntacticTypeNodeBuilder(options, resolver) { ); } } - return resultType ?? inferTypeOfDeclaration(node, context); + return resultType.type !== void 0 ? resultType.type : inferTypeOfDeclaration(node, symbol, context, resultType.reportFallback); } - function typeFromParameter(node, context) { + function typeFromParameter(node, symbol, context) { const parent2 = node.parent; - if (parent2.kind === 178 /* SetAccessor */) { - return typeFromAccessor(parent2, context); + if (parent2.kind === 179 /* SetAccessor */) { + return serializeTypeOfAccessor( + parent2, + /*symbol*/ + void 0, + context + ); + } + const declaredType = getEffectiveTypeAnnotationNode(node); + const addUndefined = resolver.requiresAddingImplicitUndefined(node, symbol, context.enclosingDeclaration); + let resultType = failed; + if (declaredType) { + resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, addUndefined)); + } else if (isParameter(node) && node.initializer && isIdentifier(node.name) && !isContextuallyTyped(node)) { + resultType = typeFromExpression( + node.initializer, + context, + /*isConstContext*/ + void 0, + addUndefined + ); + } + return resultType.type !== void 0 ? resultType.type : inferTypeOfDeclaration(node, symbol, context, resultType.reportFallback); + } + function typeFromExpandoProperty(node, symbol, context) { + const declaredType = getEffectiveTypeAnnotationNode(node); + let result; + if (declaredType) { + result = serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol); } + const oldSuppressReportInferenceFallback = context.suppressReportInferenceFallback; + context.suppressReportInferenceFallback = true; + const resultType = result ?? inferTypeOfDeclaration( + node, + symbol, + context, + /*reportFallback*/ + false + ); + context.suppressReportInferenceFallback = oldSuppressReportInferenceFallback; + return resultType; + } + function typeFromProperty(node, symbol, context) { const declaredType = getEffectiveTypeAnnotationNode(node); - const addUndefined = resolver.requiresAddingImplicitUndefined(node); - let resultType; + const requiresAddingUndefined = resolver.requiresAddingImplicitUndefined(node, symbol, context.enclosingDeclaration); + let resultType = failed; if (declaredType) { - resultType = serializeExistingTypeAnnotation(declaredType, addUndefined); + resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol, requiresAddingUndefined)); } else { - if (node.initializer && isIdentifier(node.name)) { + const initializer = isPropertyDeclaration(node) ? node.initializer : void 0; + if (initializer && !isContextuallyTyped(node)) { + const isReadonly = isDeclarationReadonly(node); resultType = typeFromExpression( - node.initializer, + initializer, context, /*isConstContext*/ void 0, - addUndefined + requiresAddingUndefined, + isReadonly ); } } - return resultType ?? inferTypeOfDeclaration(node, context); + return resultType.type !== void 0 ? resultType.type : inferTypeOfDeclaration(node, symbol, context, resultType.reportFallback); } - function typeFromProperty(node, context) { - const declaredType = getEffectiveTypeAnnotationNode(node); - if (declaredType) { - return serializeExistingTypeAnnotation(declaredType); + function inferTypeOfDeclaration(node, symbol, context, reportFallback = true) { + if (reportFallback) { + context.tracker.reportInferenceFallback(node); } - let resultType; - if (node.initializer) { - const isReadonly = isDeclarationReadonly(node); - resultType = typeFromExpression( - node.initializer, - context, - /*isConstContext*/ - void 0, - /*requiresAddingUndefined*/ - void 0, - isReadonly - ); + if (context.noInferenceFallback === true) { + return factory.createKeywordTypeNode(133 /* AnyKeyword */); } - return resultType ?? inferTypeOfDeclaration(node, context); - } - function inferTypeOfDeclaration(node, context) { - context.tracker.reportInferenceFallback(node); - return false; + return resolver.serializeTypeOfDeclaration(context, node, symbol); } - function inferExpressionType(node, context) { - context.tracker.reportInferenceFallback(node); - return false; + function inferExpressionType(node, context, reportFallback = true, requiresAddingUndefined) { + Debug.assert(!requiresAddingUndefined); + if (reportFallback) { + context.tracker.reportInferenceFallback(node); + } + if (context.noInferenceFallback === true) { + return factory.createKeywordTypeNode(133 /* AnyKeyword */); + } + return resolver.serializeTypeOfExpression(context, node) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */); } - function inferReturnTypeOfSignatureSignature(node, context) { - context.tracker.reportInferenceFallback(node); - return false; + function inferReturnTypeOfSignatureSignature(node, context, symbol, reportFallback) { + if (reportFallback) { + context.tracker.reportInferenceFallback(node); + } + if (context.noInferenceFallback === true) { + return factory.createKeywordTypeNode(133 /* AnyKeyword */); + } + return resolver.serializeReturnTypeForSignature(context, node, symbol) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */); } - function inferAccessorType(node, allAccessors, context) { - if (node.kind === 177 /* GetAccessor */) { - return createReturnFromSignature(node, context); + function inferAccessorType(node, allAccessors, context, symbol, reportFallback = true) { + if (node.kind === 178 /* GetAccessor */) { + return createReturnFromSignature(node, symbol, context, reportFallback); } else { - context.tracker.reportInferenceFallback(node); - return false; + if (reportFallback) { + context.tracker.reportInferenceFallback(node); + } + const result = allAccessors.getAccessor && createReturnFromSignature(allAccessors.getAccessor, symbol, context, reportFallback); + return result ?? resolver.serializeTypeOfDeclaration(context, node, symbol) ?? factory.createKeywordTypeNode(133 /* AnyKeyword */); } } + function withNewScope(context, node, fn) { + const cleanup = resolver.enterNewScope(context, node); + const result = fn(); + cleanup(); + return result; + } function typeFromTypeAssertion(expression, type, context, requiresAddingUndefined) { if (isConstTypeReference(type)) { return typeFromExpression( @@ -140528,72 +144255,107 @@ function createSyntacticTypeNodeBuilder(options, resolver) { requiresAddingUndefined ); } - if (requiresAddingUndefined && !canAddUndefined(type)) { - context.tracker.reportInferenceFallback(type); - } - return serializeExistingTypeAnnotation(type); + return syntacticResult(serializeExistingTypeNodeWithFallback(type, context, requiresAddingUndefined)); } function typeFromExpression(node, context, isConstContext = false, requiresAddingUndefined = false, preserveLiterals = false) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: if (isJSDocTypeAssertion(node)) { return typeFromTypeAssertion(node.expression, getJSDocTypeAssertionType(node), context, requiresAddingUndefined); } return typeFromExpression(node.expression, context, isConstContext, requiresAddingUndefined); case 80 /* Identifier */: if (resolver.isUndefinedIdentifierExpression(node)) { - return true; + return syntacticResult(createUndefinedTypeNode()); } break; case 106 /* NullKeyword */: - return true; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - return typeFromFunctionLikeExpression(node, context); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + if (strictNullChecks) { + return syntacticResult(addUndefinedIfNeeded(factory.createLiteralTypeNode(factory.createNull()), requiresAddingUndefined, node, context)); + } else { + return syntacticResult(factory.createKeywordTypeNode(133 /* AnyKeyword */)); + } + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + Debug.type(node); + return withNewScope(context, node, () => typeFromFunctionLikeExpression(node, context)); + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: const asExpression = node; return typeFromTypeAssertion(asExpression.expression, asExpression.type, context, requiresAddingUndefined); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: const unaryExpression = node; if (isPrimitiveLiteralValue(unaryExpression)) { - if (unaryExpression.operand.kind === 10 /* BigIntLiteral */) { - return typeFromPrimitiveLiteral(); - } - if (unaryExpression.operand.kind === 9 /* NumericLiteral */) { - return typeFromPrimitiveLiteral(); - } + return typeFromPrimitiveLiteral( + unaryExpression.operator === 40 /* PlusToken */ ? unaryExpression.operand : unaryExpression, + unaryExpression.operand.kind === 10 /* BigIntLiteral */ ? 163 /* BigIntKeyword */ : 150 /* NumberKeyword */, + context, + isConstContext || preserveLiterals, + requiresAddingUndefined + ); } break; - case 9 /* NumericLiteral */: - return typeFromPrimitiveLiteral(); - case 228 /* TemplateExpression */: + case 210 /* ArrayLiteralExpression */: + return typeFromArrayLiteral(node, context, isConstContext, requiresAddingUndefined); + case 211 /* ObjectLiteralExpression */: + return typeFromObjectLiteral(node, context, isConstContext, requiresAddingUndefined); + case 232 /* ClassExpression */: + return syntacticResult(inferExpressionType( + node, + context, + /*reportFallback*/ + true, + requiresAddingUndefined + )); + case 229 /* TemplateExpression */: if (!isConstContext && !preserveLiterals) { - return true; + return syntacticResult(factory.createKeywordTypeNode(154 /* StringKeyword */)); } break; - case 15 /* NoSubstitutionTemplateLiteral */: - case 11 /* StringLiteral */: - return typeFromPrimitiveLiteral(); - case 10 /* BigIntLiteral */: - return typeFromPrimitiveLiteral(); - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - return typeFromPrimitiveLiteral(); - case 209 /* ArrayLiteralExpression */: - return typeFromArrayLiteral(node, context, isConstContext); - case 210 /* ObjectLiteralExpression */: - return typeFromObjectLiteral(node, context, isConstContext); - case 231 /* ClassExpression */: - return inferExpressionType(node, context); + default: + let typeKind; + let primitiveNode = node; + switch (node.kind) { + case 9 /* NumericLiteral */: + typeKind = 150 /* NumberKeyword */; + break; + case 15 /* NoSubstitutionTemplateLiteral */: + primitiveNode = factory.createStringLiteral(node.text); + typeKind = 154 /* StringKeyword */; + break; + case 11 /* StringLiteral */: + typeKind = 154 /* StringKeyword */; + break; + case 10 /* BigIntLiteral */: + typeKind = 163 /* BigIntKeyword */; + break; + case 112 /* TrueKeyword */: + case 97 /* FalseKeyword */: + typeKind = 136 /* BooleanKeyword */; + break; + } + if (typeKind) { + return typeFromPrimitiveLiteral(primitiveNode, typeKind, context, isConstContext || preserveLiterals, requiresAddingUndefined); + } } - return void 0; + return failed; } function typeFromFunctionLikeExpression(fnNode, context) { - const returnType = serializeExistingTypeAnnotation(fnNode.type) ?? createReturnFromSignature(fnNode, context); - const typeParameters = reuseTypeParameters(fnNode.typeParameters); - const parameters = fnNode.parameters.every((p) => ensureParameter(p, context)); - return returnType && typeParameters && parameters; + const returnType = createReturnFromSignature( + fnNode, + /*symbol*/ + void 0, + context + ); + const typeParameters = reuseTypeParameters(fnNode.typeParameters, context); + const parameters = fnNode.parameters.map((p) => ensureParameter(p, context)); + return syntacticResult( + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType + ) + ); } function canGetTypeFromArrayLiteral(arrayLiteral, context, isConstContext) { if (!isConstContext) { @@ -140601,25 +144363,45 @@ function createSyntacticTypeNodeBuilder(options, resolver) { return false; } for (const element of arrayLiteral.elements) { - if (element.kind === 230 /* SpreadElement */) { + if (element.kind === 231 /* SpreadElement */) { context.tracker.reportInferenceFallback(element); return false; } } return true; } - function typeFromArrayLiteral(arrayLiteral, context, isConstContext) { + function typeFromArrayLiteral(arrayLiteral, context, isConstContext, requiresAddingUndefined) { if (!canGetTypeFromArrayLiteral(arrayLiteral, context, isConstContext)) { - return false; + if (requiresAddingUndefined || isDeclaration(walkUpParenthesizedExpressions(arrayLiteral).parent)) { + return alreadyReported; + } + return syntacticResult(inferExpressionType( + arrayLiteral, + context, + /*reportFallback*/ + false, + requiresAddingUndefined + )); } - let canInferArray = true; + const oldNoInferenceFallback = context.noInferenceFallback; + context.noInferenceFallback = true; + const elementTypesInfo = []; for (const element of arrayLiteral.elements) { - Debug.assert(element.kind !== 230 /* SpreadElement */); - if (element.kind !== 232 /* OmittedExpression */) { - canInferArray = (typeFromExpression(element, context, isConstContext) ?? inferExpressionType(element, context)) && canInferArray; + Debug.assert(element.kind !== 231 /* SpreadElement */); + if (element.kind === 233 /* OmittedExpression */) { + elementTypesInfo.push( + createUndefinedTypeNode() + ); + } else { + const expressionType = typeFromExpression(element, context, isConstContext); + const elementType = expressionType.type !== void 0 ? expressionType.type : inferExpressionType(element, context, expressionType.reportFallback); + elementTypesInfo.push(elementType); } } - return true; + const tupleType = factory.createTupleTypeNode(elementTypesInfo); + tupleType.emitNode = { flags: 1, autoGenerate: void 0, internalFlags: 0 }; + context.noInferenceFallback = oldNoInferenceFallback; + return notImplemented2; } function canGetTypeFromObjectLiteral(objectLiteral, context) { let result = true; @@ -140628,7 +144410,7 @@ function createSyntacticTypeNodeBuilder(options, resolver) { result = false; break; } - if (prop.kind === 304 /* ShorthandPropertyAssignment */ || prop.kind === 305 /* SpreadAssignment */) { + if (prop.kind === 305 /* ShorthandPropertyAssignment */ || prop.kind === 306 /* SpreadAssignment */) { context.tracker.reportInferenceFallback(prop); result = false; } else if (prop.name.flags & 262144 /* ThisNodeHasError */) { @@ -140636,13 +144418,13 @@ function createSyntacticTypeNodeBuilder(options, resolver) { break; } else if (prop.name.kind === 81 /* PrivateIdentifier */) { result = false; - } else if (prop.name.kind === 167 /* ComputedPropertyName */) { + } else if (prop.name.kind === 168 /* ComputedPropertyName */) { const expression = prop.name.expression; if (!isPrimitiveLiteralValue( expression, /*includeBigInt*/ false - )) { + ) && !resolver.isDefinitelyReferenceToGlobalSymbolObject(expression)) { context.tracker.reportInferenceFallback(prop.name); result = false; } @@ -140650,96 +144432,250 @@ function createSyntacticTypeNodeBuilder(options, resolver) { } return result; } - function typeFromObjectLiteral(objectLiteral, context, isConstContext) { - if (!canGetTypeFromObjectLiteral(objectLiteral, context)) return false; - let canInferObjectLiteral = true; + function typeFromObjectLiteral(objectLiteral, context, isConstContext, requiresAddingUndefined) { + if (!canGetTypeFromObjectLiteral(objectLiteral, context)) { + if (requiresAddingUndefined || isDeclaration(walkUpParenthesizedExpressions(objectLiteral).parent)) { + return alreadyReported; + } + return syntacticResult(inferExpressionType( + objectLiteral, + context, + /*reportFallback*/ + false, + requiresAddingUndefined + )); + } + const oldNoInferenceFallback = context.noInferenceFallback; + context.noInferenceFallback = true; + const properties = []; + const oldFlags = context.flags; + context.flags |= 4194304 /* InObjectTypeLiteral */; for (const prop of objectLiteral.properties) { Debug.assert(!isShorthandPropertyAssignment(prop) && !isSpreadAssignment(prop)); const name = prop.name; + let newProp; switch (prop.kind) { - case 174 /* MethodDeclaration */: - canInferObjectLiteral = !!typeFromObjectLiteralMethod(prop, name, context) && canInferObjectLiteral; + case 175 /* MethodDeclaration */: + newProp = withNewScope(context, prop, () => typeFromObjectLiteralMethod(prop, name, context, isConstContext)); break; - case 303 /* PropertyAssignment */: - canInferObjectLiteral = !!typeFromObjectLiteralPropertyAssignment(prop, name, context, isConstContext) && canInferObjectLiteral; + case 304 /* PropertyAssignment */: + newProp = typeFromObjectLiteralPropertyAssignment(prop, name, context, isConstContext); break; - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - canInferObjectLiteral = !!typeFromObjectLiteralAccessor(prop, name, context) && canInferObjectLiteral; + case 179 /* SetAccessor */: + case 178 /* GetAccessor */: + newProp = typeFromObjectLiteralAccessor(prop, name, context); break; } + if (newProp) { + setCommentRange(newProp, prop); + properties.push(newProp); + } + } + context.flags = oldFlags; + const typeNode = factory.createTypeLiteralNode(properties); + if (!(context.flags & 1024 /* MultilineObjectLiterals */)) { + setEmitFlags(typeNode, 1 /* SingleLine */); } - return canInferObjectLiteral; + context.noInferenceFallback = oldNoInferenceFallback; + return notImplemented2; } function typeFromObjectLiteralPropertyAssignment(prop, name, context, isConstContext) { - return typeFromExpression(prop.initializer, context, isConstContext) ?? inferTypeOfDeclaration(prop, context); + const modifiers = isConstContext ? [factory.createModifier(148 /* ReadonlyKeyword */)] : []; + const expressionResult = typeFromExpression(prop.initializer, context, isConstContext); + const typeNode = expressionResult.type !== void 0 ? expressionResult.type : inferTypeOfDeclaration( + prop, + /*symbol*/ + void 0, + context, + expressionResult.reportFallback + ); + return factory.createPropertySignature( + modifiers, + reuseNode(context, name), + /*questionToken*/ + void 0, + typeNode + ); } function ensureParameter(p, context) { - return typeFromParameter(p, context); + return factory.updateParameterDeclaration( + p, + /*modifiers*/ + void 0, + reuseNode(context, p.dotDotDotToken), + resolver.serializeNameOfParameter(context, p), + resolver.isOptionalParameter(p) ? factory.createToken(58 /* QuestionToken */) : void 0, + typeFromParameter( + p, + /*symbol*/ + void 0, + context + ), + // Ignore private param props, since this type is going straight back into a param + /*initializer*/ + void 0 + ); } - function reuseTypeParameters(typeParameters) { - return (typeParameters == null ? void 0 : typeParameters.every( - (tp) => serializeExistingTypeAnnotation(tp.constraint) && serializeExistingTypeAnnotation(tp.default) - )) ?? true; + function reuseTypeParameters(typeParameters, context) { + return typeParameters == null ? void 0 : typeParameters.map((tp) => { + var _a; + const { node: tpName } = resolver.trackExistingEntityName(context, tp.name); + return factory.updateTypeParameterDeclaration( + tp, + (_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)), + tpName, + serializeExistingTypeNodeWithFallback(tp.constraint, context), + serializeExistingTypeNodeWithFallback(tp.default, context) + ); + }); } - function typeFromObjectLiteralMethod(method, name, context) { - const returnType = createReturnFromSignature(method, context); - const typeParameters = reuseTypeParameters(method.typeParameters); - const parameters = method.parameters.every((p) => ensureParameter(p, context)); - return returnType && typeParameters && parameters; + function typeFromObjectLiteralMethod(method, name, context, isConstContext) { + const returnType = createReturnFromSignature( + method, + /*symbol*/ + void 0, + context + ); + const typeParameters = reuseTypeParameters(method.typeParameters, context); + const parameters = method.parameters.map((p) => ensureParameter(p, context)); + if (isConstContext) { + return factory.createPropertySignature( + [factory.createModifier(148 /* ReadonlyKeyword */)], + reuseNode(context, name), + reuseNode(context, method.questionToken), + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType + ) + ); + } else { + if (isIdentifier(name) && name.escapedText === "new") { + name = factory.createStringLiteral("new"); + } + return factory.createMethodSignature( + [], + reuseNode(context, name), + reuseNode(context, method.questionToken), + typeParameters, + parameters, + returnType + ); + } } function typeFromObjectLiteralAccessor(accessor, name, context) { const allAccessors = resolver.getAllAccessorDeclarations(accessor); - const getAccessorType = allAccessors.getAccessor && getTypeAnnotationFromAccessor2(allAccessors.getAccessor); - const setAccessorType = allAccessors.setAccessor && getTypeAnnotationFromAccessor2(allAccessors.setAccessor); + const getAccessorType = allAccessors.getAccessor && getTypeAnnotationFromAccessor(allAccessors.getAccessor); + const setAccessorType = allAccessors.setAccessor && getTypeAnnotationFromAccessor(allAccessors.setAccessor); if (getAccessorType !== void 0 && setAccessorType !== void 0) { - const parameters = accessor.parameters.every((p) => ensureParameter(p, context)); - if (isGetAccessor(accessor)) { - return parameters && serializeExistingTypeAnnotation(getAccessorType); - } else { - return parameters; - } + return withNewScope(context, accessor, () => { + const parameters = accessor.parameters.map((p) => ensureParameter(p, context)); + if (isGetAccessor(accessor)) { + return factory.updateGetAccessorDeclaration( + accessor, + [], + reuseNode(context, name), + parameters, + serializeExistingTypeNodeWithFallback(getAccessorType, context), + /*body*/ + void 0 + ); + } else { + return factory.updateSetAccessorDeclaration( + accessor, + [], + reuseNode(context, name), + parameters, + /*body*/ + void 0 + ); + } + }); } else if (allAccessors.firstAccessor === accessor) { - const foundType = getAccessorType ?? setAccessorType; - const propertyType = foundType ? serializeExistingTypeAnnotation(foundType) : inferAccessorType(accessor, allAccessors, context); - return propertyType; + const foundType = getAccessorType ? withNewScope(context, allAccessors.getAccessor, () => serializeExistingTypeNodeWithFallback(getAccessorType, context)) : setAccessorType ? withNewScope(context, allAccessors.setAccessor, () => serializeExistingTypeNodeWithFallback(setAccessorType, context)) : void 0; + const propertyType = foundType ?? inferAccessorType( + accessor, + allAccessors, + context, + /*symbol*/ + void 0 + ); + const propertySignature = factory.createPropertySignature( + allAccessors.setAccessor === void 0 ? [factory.createModifier(148 /* ReadonlyKeyword */)] : [], + reuseNode(context, name), + /*questionToken*/ + void 0, + propertyType + ); + return propertySignature; } - return false; } - function typeFromPrimitiveLiteral() { - return true; + function createUndefinedTypeNode() { + if (strictNullChecks) { + return factory.createKeywordTypeNode(157 /* UndefinedKeyword */); + } else { + return factory.createKeywordTypeNode(133 /* AnyKeyword */); + } + } + function typeFromPrimitiveLiteral(node, baseType, context, preserveLiterals, requiresAddingUndefined) { + let result; + if (preserveLiterals) { + if (node.kind === 225 /* PrefixUnaryExpression */ && node.operator === 40 /* PlusToken */) { + result = factory.createLiteralTypeNode(reuseNode(context, node.operand)); + } + result = factory.createLiteralTypeNode(reuseNode(context, node)); + } else { + result = factory.createKeywordTypeNode(baseType); + } + return syntacticResult(addUndefinedIfNeeded(result, requiresAddingUndefined, node, context)); + } + function addUndefinedIfNeeded(node, addUndefined, owner, context) { + const parentDeclaration = owner && walkUpParenthesizedExpressions(owner).parent; + const optionalDeclaration = parentDeclaration && isDeclaration(parentDeclaration) && isOptionalDeclaration(parentDeclaration); + if (!strictNullChecks || !(addUndefined || optionalDeclaration)) return node; + if (!canAddUndefined(node)) { + context.tracker.reportInferenceFallback(node); + } + if (isUnionTypeNode(node)) { + return factory.createUnionTypeNode([...node.types, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); + } + return factory.createUnionTypeNode([node, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); } function canAddUndefined(node) { if (!strictNullChecks) return true; - if (isKeyword(node.kind) || node.kind === 201 /* LiteralType */ || node.kind === 184 /* FunctionType */ || node.kind === 185 /* ConstructorType */ || node.kind === 188 /* ArrayType */ || node.kind === 189 /* TupleType */ || node.kind === 187 /* TypeLiteral */ || node.kind === 203 /* TemplateLiteralType */ || node.kind === 197 /* ThisType */) { + if (isKeyword(node.kind) || node.kind === 202 /* LiteralType */ || node.kind === 185 /* FunctionType */ || node.kind === 186 /* ConstructorType */ || node.kind === 189 /* ArrayType */ || node.kind === 190 /* TupleType */ || node.kind === 188 /* TypeLiteral */ || node.kind === 204 /* TemplateLiteralType */ || node.kind === 198 /* ThisType */) { return true; } - if (node.kind === 196 /* ParenthesizedType */) { + if (node.kind === 197 /* ParenthesizedType */) { return canAddUndefined(node.type); } - if (node.kind === 192 /* UnionType */ || node.kind === 193 /* IntersectionType */) { + if (node.kind === 193 /* UnionType */ || node.kind === 194 /* IntersectionType */) { return node.types.every(canAddUndefined); } return false; } - function createReturnFromSignature(fn, context) { - let returnType; - const returnTypeNode = getEffectiveReturnTypeNode(fn); + function createReturnFromSignature(fn, symbol, context, reportFallback = true) { + let returnType = failed; + const returnTypeNode = isJSDocConstructSignature(fn) ? getEffectiveTypeAnnotationNode(fn.parameters[0]) : getEffectiveReturnTypeNode(fn); if (returnTypeNode) { - returnType = serializeExistingTypeAnnotation(returnTypeNode); - } - if (!returnType && isValueSignatureDeclaration(fn)) { + returnType = syntacticResult(serializeTypeAnnotationOfDeclaration(returnTypeNode, context, fn, symbol)); + } else if (isValueSignatureDeclaration(fn)) { returnType = typeFromSingleReturnExpression(fn, context); } - return returnType ?? inferReturnTypeOfSignatureSignature(fn, context); + return returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, symbol, reportFallback && returnType.reportFallback && !returnTypeNode); } function typeFromSingleReturnExpression(declaration, context) { let candidateExpr; if (declaration && !nodeIsMissing(declaration.body)) { - if (getFunctionFlags(declaration) & 3 /* AsyncGenerator */) return void 0; + const flags = getFunctionFlags(declaration); + if (flags & 3 /* AsyncGenerator */) return failed; const body = declaration.body; if (body && isBlock(body)) { forEachReturnStatement(body, (s) => { + if (s.parent !== body) { + candidateExpr = void 0; + return true; + } if (!candidateExpr) { candidateExpr = s.expression; } else { @@ -140752,9 +144688,21 @@ function createSyntacticTypeNodeBuilder(options, resolver) { } } if (candidateExpr) { - return typeFromExpression(candidateExpr, context); + if (isContextuallyTyped(candidateExpr)) { + const type = isJSDocTypeAssertion(candidateExpr) ? getJSDocTypeAssertionType(candidateExpr) : isAsExpression(candidateExpr) || isTypeAssertionExpression(candidateExpr) ? candidateExpr.type : void 0; + if (type && !isConstTypeReference(type)) { + return syntacticResult(serializeExistingTypeNode(type, context)); + } + } else { + return typeFromExpression(candidateExpr, context); + } } - return void 0; + return failed; + } + function isContextuallyTyped(node) { + return findAncestor(node.parent, (n) => { + return isCallExpression(n) || !isFunctionLikeDeclaration(n) && !!getEffectiveTypeAnnotationNode(n) || isJsxElement(n) || isJsxExpression(n); + }); } } @@ -140766,10 +144714,7 @@ __export(ts_JsTyping_exports, { isTypingUpToDate: () => isTypingUpToDate, loadSafeList: () => loadSafeList, loadTypesMap: () => loadTypesMap, - nodeCoreModuleList: () => nodeCoreModuleList, - nodeCoreModules: () => nodeCoreModules, nonRelativeModuleNameForTypingCache: () => nonRelativeModuleNameForTypingCache, - prefixedNodeCoreModuleList: () => prefixedNodeCoreModuleList, renderPackageNameValidationFailure: () => renderPackageNameValidationFailure, validatePackageName: () => validatePackageName }); @@ -140817,58 +144762,6 @@ function isTypingUpToDate(cachedTyping, availableTypingVersions) { const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, "latest")); return availableVersion.compareTo(cachedTyping.version) <= 0; } -var unprefixedNodeCoreModuleList = [ - "assert", - "assert/strict", - "async_hooks", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "dgram", - "diagnostics_channel", - "dns", - "dns/promises", - "domain", - "events", - "fs", - "fs/promises", - "http", - "https", - "http2", - "inspector", - "module", - "net", - "os", - "path", - "perf_hooks", - "process", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "stream/promises", - "string_decoder", - "timers", - "timers/promises", - "tls", - "trace_events", - "tty", - "url", - "util", - "util/types", - "v8", - "vm", - "wasi", - "worker_threads", - "zlib" -]; -var prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map((name) => `node:${name}`); -var nodeCoreModuleList = [...unprefixedNodeCoreModuleList, ...prefixedNodeCoreModuleList]; -var nodeCoreModules = new Set(nodeCoreModuleList); function nonRelativeModuleNameForTypingCache(moduleName) { return nodeCoreModules.has(moduleName) ? "node" : moduleName; } @@ -141103,6 +144996,7 @@ function renderPackageNameValidationFailureWorker(typing, result, name, isScopeN return `'${typing}':: ${kind} name '${name}' contains non URI safe characters`; case 0 /* Ok */: return Debug.fail(); + // Shouldn't have called this. default: Debug.assertNever(result); } @@ -141434,36 +145328,36 @@ var SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning2) => { })(SemanticMeaning || {}); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 299 /* CatchClause */: - case 291 /* JsxAttribute */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 300 /* CatchClause */: + case 292 /* JsxAttribute */: return 1 /* Value */; - case 168 /* TypeParameter */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: + case 169 /* TypeParameter */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 188 /* TypeLiteral */: return 2 /* Type */; - case 346 /* JSDocTypedefTag */: + case 347 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 306 /* EnumMember */: - case 263 /* ClassDeclaration */: + case 307 /* EnumMember */: + case 264 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -141471,15 +145365,16 @@ function getMeaningFromDeclaration(node) { } else { return 4 /* Namespace */; } - case 266 /* EnumDeclaration */: - case 275 /* NamedImports */: - case 276 /* ImportSpecifier */: - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: + case 267 /* EnumDeclaration */: + case 276 /* NamedImports */: + case 277 /* ImportSpecifier */: + case 272 /* ImportEqualsDeclaration */: + case 273 /* ImportDeclaration */: + case 278 /* ExportAssignment */: + case 279 /* ExportDeclaration */: return 7 /* All */; - case 307 /* SourceFile */: + // An external module can be a Value + case 308 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -141487,7 +145382,7 @@ function getMeaningFromDeclaration(node) { function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 307 /* SourceFile */) { + if (node.kind === 308 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -141511,11 +145406,14 @@ function getMeaningFromLocation(node) { } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 271 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 167 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 272 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 166 /* QualifiedName */) { + if (!node.parent) { + return false; + } + while (node.parent.kind === 167 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -141526,26 +145424,26 @@ function isNamespaceReference(node) { function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 166 /* QualifiedName */) { - while (root.parent && root.parent.kind === 166 /* QualifiedName */) { + if (root.parent.kind === 167 /* QualifiedName */) { + while (root.parent && root.parent.kind === 167 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 183 /* TypeReference */ && !isLastClause; + return root.parent.kind === 184 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 211 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { + if (root.parent.kind === 212 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 212 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 233 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 298 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 234 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 299 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 263 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 264 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; + return decl.kind === 264 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 265 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; } return false; } @@ -141556,15 +145454,15 @@ function isTypeReference(node) { switch (node.kind) { case 110 /* ThisKeyword */: return !isExpressionNode(node); - case 197 /* ThisType */: + case 198 /* ThisType */: return true; } switch (node.parent.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: return true; - case 205 /* ImportType */: + case 206 /* ImportType */: return !node.parent.isTypeOf; - case 233 /* ExpressionWithTypeArguments */: + case 234 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -141611,7 +145509,7 @@ function climbPastPropertyOrElementAccess(node) { } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 256 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 257 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -141661,22 +145559,22 @@ function isNameOfFunctionDeclaration(node) { } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 303 /* PropertyAssignment */: - case 306 /* EnumMember */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 267 /* ModuleDeclaration */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 304 /* PropertyAssignment */: + case 307 /* EnumMember */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 268 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 167 /* ComputedPropertyName */: + case 168 /* ComputedPropertyName */: return true; - case 201 /* LiteralType */: - return node.parent.parent.kind === 199 /* IndexedAccessType */; + case 202 /* LiteralType */: + return node.parent.parent.kind === 200 /* IndexedAccessType */; default: return false; } @@ -141694,83 +145592,83 @@ function getContainerNode(node) { return void 0; } switch (node.kind) { - case 307 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 267 /* ModuleDeclaration */: + case 308 /* SourceFile */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 268 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return "class" /* classElement */; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 265 /* TypeAliasDeclaration */: - case 338 /* JSDocCallbackTag */: - case 346 /* JSDocTypedefTag */: + case 266 /* TypeAliasDeclaration */: + case 339 /* JSDocCallbackTag */: + case 347 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return "enum" /* enumElement */; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: return "function" /* functionElement */; - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 305 /* ShorthandPropertyAssignment */: + case 306 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 180 /* ConstructSignature */: + case 181 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 179 /* CallSignature */: + case 180 /* CallSignature */: return "call" /* callSignatureElement */; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: + case 177 /* Constructor */: + case 176 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 306 /* EnumMember */: + case 307 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 169 /* Parameter */: + case 170 /* Parameter */: return hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - case 274 /* NamespaceImport */: - case 280 /* NamespaceExport */: + case 272 /* ImportEqualsDeclaration */: + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: + case 275 /* NamespaceImport */: + case 281 /* NamespaceExport */: return "alias" /* alias */; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -141787,6 +145685,7 @@ function getNodeKind(node) { return isFunctionExpression(right) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; case 4 /* ThisProperty */: return "property" /* memberVariableElement */; + // property case 5 /* Property */: return isFunctionExpression(right) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; case 6 /* Prototype */: @@ -141798,7 +145697,7 @@ function getNodeKind(node) { } case 80 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -141813,7 +145712,7 @@ function isThis(node) { case 110 /* ThisKeyword */: return true; case 80 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 170 /* Parameter */; default: return false; } @@ -141824,9 +145723,6 @@ function getLineStartPositionForPosition(position, sourceFile) { const line = sourceFile.getLineAndCharacterOfPosition(position).line; return lineStarts[line]; } -function rangeContainsRange(r1, r2) { - return startEndContainsRange(r1.pos, r1.end, r2); -} function rangeContainsRangeExclusive(r1, r2) { return rangeContainsPositionExclusive(r1, r2.pos) && rangeContainsPositionExclusive(r1, r2.end); } @@ -141836,9 +145732,6 @@ function rangeContainsPosition(r, pos) { function rangeContainsPositionExclusive(r, pos) { return r.pos < pos && pos < r.end; } -function startEndContainsRange(start, end, range) { - return start <= range.pos && end >= range.end; -} function rangeContainsStartEnd(range, start, end) { return range.pos <= start && range.end >= end; } @@ -141862,41 +145755,42 @@ function isCompletedNode(n, sourceFile) { return false; } switch (n.kind) { - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 206 /* ObjectBindingPattern */: - case 187 /* TypeLiteral */: - case 241 /* Block */: - case 268 /* ModuleBlock */: - case 269 /* CaseBlock */: - case 275 /* NamedImports */: - case 279 /* NamedExports */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 211 /* ObjectLiteralExpression */: + case 207 /* ObjectBindingPattern */: + case 188 /* TypeLiteral */: + case 242 /* Block */: + case 269 /* ModuleBlock */: + case 270 /* CaseBlock */: + case 276 /* NamedImports */: + case 280 /* NamedExports */: return nodeEndsWith(n, 20 /* CloseBraceToken */, sourceFile); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 214 /* NewExpression */: + case 215 /* NewExpression */: if (!n.arguments) { return true; } - case 213 /* CallExpression */: - case 217 /* ParenthesizedExpression */: - case 196 /* ParenthesizedType */: + // falls through + case 214 /* CallExpression */: + case 218 /* ParenthesizedExpression */: + case 197 /* ParenthesizedType */: return nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 219 /* ArrowFunction */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 181 /* ConstructSignature */: + case 180 /* CallSignature */: + case 220 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -141904,60 +145798,60 @@ function isCompletedNode(n, sourceFile) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 22 /* CloseParenToken */, sourceFile); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 245 /* IfStatement */: + case 246 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 27 /* SemicolonToken */, sourceFile); - case 209 /* ArrayLiteralExpression */: - case 207 /* ArrayBindingPattern */: - case 212 /* ElementAccessExpression */: - case 167 /* ComputedPropertyName */: - case 189 /* TupleType */: + case 210 /* ArrayLiteralExpression */: + case 208 /* ArrayBindingPattern */: + case 213 /* ElementAccessExpression */: + case 168 /* ComputedPropertyName */: + case 190 /* TupleType */: return nodeEndsWith(n, 24 /* CloseBracketToken */, sourceFile); - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 24 /* CloseBracketToken */, sourceFile); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: return false; - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 247 /* WhileStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 248 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return hasChildOfKind(n, 117 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 186 /* TypeQuery */: + case 187 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 221 /* TypeOfExpression */: - case 220 /* DeleteExpression */: - case 222 /* VoidExpression */: - case 229 /* YieldExpression */: - case 230 /* SpreadElement */: + case 222 /* TypeOfExpression */: + case 221 /* DeleteExpression */: + case 223 /* VoidExpression */: + case 230 /* YieldExpression */: + case 231 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 239 /* TemplateSpan */: + case 240 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 278 /* ExportDeclaration */: - case 272 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 273 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 227 /* ConditionalExpression */: + case 228 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -142053,13 +145947,13 @@ function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return node; } } @@ -142401,7 +146295,7 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) { } } } - Debug.assert(startNode2 !== void 0 || n.kind === 307 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 308 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -142436,7 +146330,7 @@ function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sour for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 285 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 286 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -142468,13 +146362,13 @@ function isInsideJsxElementOrAttribute(sourceFile, position) { if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 12 /* JsxText */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 294 /* JsxExpression */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 295 /* JsxExpression */) { return true; } - if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 294 /* JsxExpression */) { + if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 295 /* JsxExpression */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 287 /* JsxClosingElement */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 288 /* JsxClosingElement */) { return true; } return false; @@ -142502,9 +146396,9 @@ function isInJSXText(sourceFile, position) { function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 285 /* JsxSelfClosingElement */ && node.kind <= 294 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { + if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { node = node.parent; - } else if (node.kind === 284 /* JsxElement */) { + } else if (node.kind === 285 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; } else { @@ -142608,16 +146502,19 @@ function getPossibleTypeArgumentsInfo(tokenIn, sourceFile) { token = findPrecedingMatchingToken(token, 23 /* OpenBracketToken */, sourceFile); if (!token) return void 0; break; + // Valid tokens in a type name. Skip. case 28 /* CommaToken */: nTypeArguments++; break; case 39 /* EqualsGreaterThanToken */: + // falls through case 80 /* Identifier */: case 11 /* StringLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: + // falls through case 114 /* TypeOfKeyword */: case 96 /* ExtendsKeyword */: case 143 /* KeyOfKeyword */: @@ -142663,14 +146560,14 @@ function getNodeModifiers(node, excludeFlags = 0 /* None */) { if (flags & 32 /* Export */) result.push("export" /* exportedModifier */); if (flags & 65536 /* Deprecated */) result.push("deprecated" /* deprecatedModifier */); if (node.flags & 33554432 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 277 /* ExportAssignment */) result.push("export" /* exportedModifier */); + if (node.kind === 278 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { + if (node.kind === 184 /* TypeReference */ || node.kind === 214 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 263 /* ClassDeclaration */ || node.kind === 264 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 264 /* ClassDeclaration */ || node.kind === 265 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -142712,14 +146609,14 @@ function cloneCompilerOptions(options) { return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { - if (node.parent.kind === 226 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 210 /* ArrayLiteralExpression */ || node.kind === 211 /* ObjectLiteralExpression */) { + if (node.parent.kind === 227 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { return true; } - if (node.parent.kind === 250 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 251 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 303 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 304 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -142838,7 +146735,7 @@ function skipConstraint(type) { return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 167 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 168 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -142854,7 +146751,7 @@ function createModuleSpecifierResolutionHost(program, host) { fileExists: (fileName) => program.fileExists(fileName), getCurrentDirectory: () => host.getCurrentDirectory(), readFile: maybeBind(host, host.readFile), - useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), + useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames) || program.useCaseSensitiveFileNames, getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache, getModuleSpecifierCache: maybeBind(host, host.getModuleSpecifierCache), getPackageJsonInfoCache: () => { @@ -142863,11 +146760,13 @@ function createModuleSpecifierResolutionHost(program, host) { }, getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation), redirectTargetsMap: program.redirectTargetsMap, - getProjectReferenceRedirect: (fileName) => program.getProjectReferenceRedirect(fileName), + getRedirectFromSourceFile: (fileName) => program.getRedirectFromSourceFile(fileName), isSourceOfProjectReferenceRedirect: (fileName) => program.isSourceOfProjectReferenceRedirect(fileName), getNearestAncestorDirectoryWithPackageJson: maybeBind(host, host.getNearestAncestorDirectoryWithPackageJson), getFileIncludeReasons: () => program.getFileIncludeReasons(), - getCommonSourceDirectory: () => program.getCommonSourceDirectory() + getCommonSourceDirectory: () => program.getCommonSourceDirectory(), + getDefaultResolutionModeForFile: (file) => program.getDefaultResolutionModeForFile(file), + getModeForResolutionAtIndex: (file, index) => program.getModeForResolutionAtIndex(file, index) }; } function getModuleSpecifierResolverHost(program, host) { @@ -142883,7 +146782,7 @@ function makeImport(defaultImport, namedImports, moduleSpecifier, quotePreferenc return factory.createImportDeclaration( /*modifiers*/ void 0, - defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0, + defaultImport || namedImports ? factory.createImportClause(isTypeOnly ? 156 /* TypeKeyword */ : void 0, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0, typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier, /*attributes*/ void 0 @@ -142963,10 +146862,10 @@ function findModifier(node, kind) { function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { var _a; const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 243 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 244 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); const { comparer, isSorted } = ts_OrganizeImports_exports.getOrganizeImportsStringComparerWithDetection(existingImportStatements, preferences); - const sortedNewImports = isArray(imports) ? stableSort(imports, (a, b) => ts_OrganizeImports_exports.compareImportsOrRequireStatements(a, b, comparer)) : [imports]; + const sortedNewImports = isArray(imports) ? toSorted(imports, (a, b) => ts_OrganizeImports_exports.compareImportsOrRequireStatements(a, b, comparer)) : [imports]; if (!(existingImportStatements == null ? void 0 : existingImportStatements.length)) { if (isFullSourceFile(sourceFile)) { changes.insertNodesAtTopOfFile(sourceFile, sortedNewImports, blankLineBetween); @@ -143078,9 +146977,16 @@ function isFirstDeclarationOfSymbolParameter(symbol) { const declaration = symbol.declarations ? firstOrUndefined(symbol.declarations) : void 0; return !!findAncestor(declaration, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit"); } -var displayPartWriter = getDisplayPartWriter(); -function getDisplayPartWriter() { - const absoluteMaximumLength = defaultMaximumTruncationLength * 10; +var displayPartWriterCache = /* @__PURE__ */ new Map(); +function getDisplayPartWriter(maximumLength) { + maximumLength = maximumLength || defaultMaximumTruncationLength; + if (!displayPartWriterCache.has(maximumLength)) { + displayPartWriterCache.set(maximumLength, getDisplayPartWriterWorker(maximumLength)); + } + return displayPartWriterCache.get(maximumLength); +} +function getDisplayPartWriterWorker(maximumLength) { + const absoluteMaximumLength = maximumLength * 10; let displayParts; let lineStart; let indent3; @@ -143298,7 +147204,8 @@ function getNewLineOrDefaultFromHost(host, formatSettings) { function lineBreakPart() { return displayPart("\n", 6 /* lineBreak */); } -function mapToDisplayParts(writeDisplayParts) { +function mapToDisplayParts(writeDisplayParts, maximumLength) { + const displayPartWriter = getDisplayPartWriter(maximumLength); try { writeDisplayParts(displayPartWriter); return displayPartWriter.displayParts(); @@ -143306,17 +147213,17 @@ function mapToDisplayParts(writeDisplayParts) { displayPartWriter.clear(); } } -function typeToDisplayParts(typechecker, type, enclosingDeclaration, flags = 0 /* None */) { +function typeToDisplayParts(typechecker, type, enclosingDeclaration, flags = 0 /* None */, maximumLength, verbosityLevel, out) { return mapToDisplayParts((writer) => { - typechecker.writeType(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer); - }); + typechecker.writeType(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer, maximumLength, verbosityLevel, out); + }, maximumLength); } function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags = 0 /* None */) { return mapToDisplayParts((writer) => { typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutsideCurrentScope */, writer); }); } -function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, flags = 0 /* None */) { +function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, flags = 0 /* None */, maximumLength, verbosityLevel, out) { flags |= 16384 /* UseAliasDefinedOutsideCurrentScope */ | 1024 /* MultilineObjectLiterals */ | 32 /* WriteTypeArgumentsOfSignature */ | 8192 /* OmitParameterModifiers */; return mapToDisplayParts((writer) => { typechecker.writeSignature( @@ -143325,16 +147232,12 @@ function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, f flags, /*kind*/ void 0, - writer + writer, + maximumLength, + verbosityLevel, + out ); - }); -} -function nodeToDisplayParts(node, enclosingDeclaration) { - const file = enclosingDeclaration.getSourceFile(); - return mapToDisplayParts((writer) => { - const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); - printer.writeNode(4 /* Unspecified */, node, file, writer); - }); + }, maximumLength); } function isImportOrExportSpecifierName(location) { return !!location.parent && isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location; @@ -143371,74 +147274,6 @@ function getPrecedingNonSpaceCharacterPosition(text, position) { } return position + 1; } -function getSynthesizedDeepClone(node, includeTrivia = true) { - const clone2 = node && getSynthesizedDeepCloneWorker(node); - if (clone2 && !includeTrivia) suppressLeadingAndTrailingTrivia(clone2); - return setParentRecursive( - clone2, - /*incremental*/ - false - ); -} -function getSynthesizedDeepCloneWithReplacements(node, includeTrivia, replaceNode) { - let clone2 = replaceNode(node); - if (clone2) { - setOriginalNode(clone2, node); - } else { - clone2 = getSynthesizedDeepCloneWorker(node, replaceNode); - } - if (clone2 && !includeTrivia) suppressLeadingAndTrailingTrivia(clone2); - return clone2; -} -function getSynthesizedDeepCloneWorker(node, replaceNode) { - const nodeClone = replaceNode ? (n) => getSynthesizedDeepCloneWithReplacements( - n, - /*includeTrivia*/ - true, - replaceNode - ) : getSynthesizedDeepClone; - const nodesClone = replaceNode ? (ns) => ns && getSynthesizedDeepClonesWithReplacements( - ns, - /*includeTrivia*/ - true, - replaceNode - ) : (ns) => ns && getSynthesizedDeepClones(ns); - const visited = visitEachChild( - node, - nodeClone, - /*context*/ - void 0, - nodesClone, - nodeClone - ); - if (visited === node) { - const clone2 = isStringLiteral(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) : isNumericLiteral(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) : factory.cloneNode(node); - return setTextRange(clone2, node); - } - visited.parent = void 0; - return visited; -} -function getSynthesizedDeepClones(nodes, includeTrivia = true) { - if (nodes) { - const cloned = factory.createNodeArray(nodes.map((n) => getSynthesizedDeepClone(n, includeTrivia)), nodes.hasTrailingComma); - setTextRange(cloned, nodes); - return cloned; - } - return nodes; -} -function getSynthesizedDeepClonesWithReplacements(nodes, includeTrivia, replaceNode) { - return factory.createNodeArray(nodes.map((n) => getSynthesizedDeepCloneWithReplacements(n, includeTrivia, replaceNode)), nodes.hasTrailingComma); -} -function suppressLeadingAndTrailingTrivia(node) { - suppressLeadingTrivia(node); - suppressTrailingTrivia(node); -} -function suppressLeadingTrivia(node) { - addEmitFlagsRecursively(node, 1024 /* NoLeadingComments */, getFirstChild); -} -function suppressTrailingTrivia(node) { - addEmitFlagsRecursively(node, 2048 /* NoTrailingComments */, getLastChild); -} function copyComments(sourceNode, targetNode) { const sourceFile = sourceNode.getSourceFile(); const text = sourceFile.text; @@ -143457,14 +147292,6 @@ function hasLeadingLineBreak(node, text) { } return false; } -function addEmitFlagsRecursively(node, flag, getChild) { - addEmitFlags(node, flag); - const child = getChild(node); - if (child) addEmitFlagsRecursively(child, flag, getChild); -} -function getFirstChild(node) { - return node.forEachChild((child) => child); -} function getUniqueName(baseName, sourceFile) { let nameText = baseName; for (let i = 1; !isFileLevelUniqueName(sourceFile, nameText); i++) { @@ -143526,13 +147353,13 @@ function needsParentheses(expression) { function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 214 /* NewExpression */: + case 215 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 226 /* BinaryExpression */: { + case 227 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 296 /* CaseClause */: + case 297 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -143558,8 +147385,8 @@ function isStringLiteralOrTemplate(node) { switch (node.kind) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - case 215 /* TaggedTemplateExpression */: + case 229 /* TemplateExpression */: + case 216 /* TaggedTemplateExpression */: return true; default: return false; @@ -143576,7 +147403,7 @@ function getTypeNodeIfAccessible(type, enclosingScope, program, host) { const checker = program.getTypeChecker(); let typeIsAccessible = true; const notAccessible = () => typeIsAccessible = false; - const res = checker.typeToTypeNode(type, enclosingScope, 1 /* NoTruncation */, { + const res = checker.typeToTypeNode(type, enclosingScope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */, { trackSymbol: (symbol, declaration, meaning) => { typeIsAccessible = typeIsAccessible && checker.isSymbolAccessible( symbol, @@ -143595,16 +147422,16 @@ function getTypeNodeIfAccessible(type, enclosingScope, program, host) { return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */; + return kind === 180 /* CallSignature */ || kind === 181 /* ConstructSignature */ || kind === 182 /* IndexSignature */ || kind === 172 /* PropertySignature */ || kind === 174 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; + return kind === 263 /* FunctionDeclaration */ || kind === 177 /* Constructor */ || kind === 175 /* MethodDeclaration */ || kind === 178 /* GetAccessor */ || kind === 179 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 267 /* ModuleDeclaration */; + return kind === 268 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 243 /* VariableStatement */ || kind === 244 /* ExpressionStatement */ || kind === 246 /* DoStatement */ || kind === 251 /* ContinueStatement */ || kind === 252 /* BreakStatement */ || kind === 253 /* ReturnStatement */ || kind === 257 /* ThrowStatement */ || kind === 259 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 277 /* ExportAssignment */; + return kind === 244 /* VariableStatement */ || kind === 245 /* ExpressionStatement */ || kind === 247 /* DoStatement */ || kind === 252 /* ContinueStatement */ || kind === 253 /* BreakStatement */ || kind === 254 /* ReturnStatement */ || kind === 258 /* ThrowStatement */ || kind === 260 /* DebuggerStatement */ || kind === 173 /* PropertyDeclaration */ || kind === 266 /* TypeAliasDeclaration */ || kind === 273 /* ImportDeclaration */ || kind === 272 /* ImportEqualsDeclaration */ || kind === 279 /* ExportDeclaration */ || kind === 271 /* NamespaceExportDeclaration */ || kind === 278 /* ExportAssignment */; } var syntaxMayBeASICandidate = or( syntaxRequiresTrailingCommaOrSemicolonOrASI, @@ -143634,7 +147461,7 @@ function nodeIsASICandidate(node, sourceFile) { } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 246 /* DoStatement */) { + if (node.kind === 247 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -143711,28 +147538,33 @@ function tryAndIgnoreErrors(cb) { function tryIOAndConsumeErrors(host, toApply, ...args) { return tryAndIgnoreErrors(() => toApply && toApply.apply(host, args)); } -function findPackageJsons(startDirectory, host, stopDirectory) { +function findPackageJsons(startDirectory, host) { const paths = []; - forEachAncestorDirectory(startDirectory, (ancestor) => { - if (ancestor === stopDirectory) { - return true; - } - const currentConfigPath = combinePaths(ancestor, "package.json"); - if (tryFileExists(host, currentConfigPath)) { - paths.push(currentConfigPath); + forEachAncestorDirectoryStoppingAtGlobalCache( + host, + startDirectory, + (ancestor) => { + const currentConfigPath = combinePaths(ancestor, "package.json"); + if (tryFileExists(host, currentConfigPath)) { + paths.push(currentConfigPath); + } } - }); + ); return paths; } function findPackageJson(directory, host) { let packageJson; - forEachAncestorDirectory(directory, (ancestor) => { - if (ancestor === "node_modules") return true; - packageJson = findConfigFile(ancestor, (f) => tryFileExists(host, f), "package.json"); - if (packageJson) { - return true; + forEachAncestorDirectoryStoppingAtGlobalCache( + host, + directory, + (ancestor) => { + if (ancestor === "node_modules") return true; + packageJson = findConfigFile(ancestor, (f) => tryFileExists(host, f), "package.json"); + if (packageJson) { + return true; + } } - }); + ); return packageJson; } function getPackageJsonsVisibleToFile(fileName, host) { @@ -143740,15 +147572,19 @@ function getPackageJsonsVisibleToFile(fileName, host) { return []; } const packageJsons = []; - forEachAncestorDirectory(getDirectoryPath(fileName), (ancestor) => { - const packageJsonFileName = combinePaths(ancestor, "package.json"); - if (host.fileExists(packageJsonFileName)) { - const info = createPackageJsonInfo(packageJsonFileName, host); - if (info) { - packageJsons.push(info); + forEachAncestorDirectoryStoppingAtGlobalCache( + host, + getDirectoryPath(fileName), + (ancestor) => { + const packageJsonFileName = combinePaths(ancestor, "package.json"); + if (host.fileExists(packageJsonFileName)) { + const info = createPackageJsonInfo(packageJsonFileName, host); + if (info) { + packageJsons.push(info); + } } } - }); + ); return packageJsons; } function createPackageJsonInfo(fileName, host) { @@ -143805,7 +147641,7 @@ function createPackageJsonImportFilter(fromFile, preferences, host) { let sourceFileCache; return { allowsImportingAmbientModule, - allowsImportingSourceFile, + getSourceFileInfo, allowsImportingSpecifier }; function moduleSpecifierIsCoveredByPackageJson(specifier) { @@ -143844,9 +147680,9 @@ function createPackageJsonImportFilter(fromFile, preferences, host) { ambientModuleCache.set(moduleSymbol, result); return result; } - function allowsImportingSourceFile(sourceFile, moduleSpecifierResolutionHost) { + function getSourceFileInfo(sourceFile, moduleSpecifierResolutionHost) { if (!packageJsons.length) { - return true; + return { importable: true, packageName: void 0 }; } if (!sourceFileCache) { sourceFileCache = /* @__PURE__ */ new Map(); @@ -143856,12 +147692,14 @@ function createPackageJsonImportFilter(fromFile, preferences, host) { return cached; } } - const moduleSpecifier = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost); - if (!moduleSpecifier) { - sourceFileCache.set(sourceFile, true); - return true; + const packageName = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost); + if (!packageName) { + const result2 = { importable: true, packageName }; + sourceFileCache.set(sourceFile, result2); + return result2; } - const result = moduleSpecifierIsCoveredByPackageJson(moduleSpecifier); + const importable = moduleSpecifierIsCoveredByPackageJson(packageName); + const result = { importable, packageName }; sourceFileCache.set(sourceFile, result); return result; } @@ -143875,7 +147713,7 @@ function createPackageJsonImportFilter(fromFile, preferences, host) { return moduleSpecifierIsCoveredByPackageJson(moduleSpecifier); } function isAllowedCoreNodeModulesImport(moduleSpecifier) { - if (isFullSourceFile(fromFile) && isSourceFileJS(fromFile) && ts_JsTyping_exports.nodeCoreModules.has(moduleSpecifier)) { + if (isFullSourceFile(fromFile) && isSourceFileJS(fromFile) && nodeCoreModules.has(moduleSpecifier)) { if (usesNodeCoreModules === void 0) { usesNodeCoreModules = consumesNodeCoreModules(fromFile); } @@ -143912,7 +147750,7 @@ function createPackageJsonImportFilter(fromFile, preferences, host) { } } function consumesNodeCoreModules(sourceFile) { - return some(sourceFile.imports, ({ text }) => ts_JsTyping_exports.nodeCoreModules.has(text)); + return some(sourceFile.imports, ({ text }) => nodeCoreModules.has(text)); } function isInsideNodeModules(fileOrDirectory) { return contains(getPathComponents(fileOrDirectory), "node_modules"); @@ -143971,36 +147809,12 @@ function mapOneOrMany(valueOrArray, f, resultSelector = identity) { function firstOrOnly(valueOrArray) { return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray; } -function getNamesForExportedSymbol(symbol, scriptTarget) { - if (needsNameFromDeclaration(symbol)) { - const fromDeclaration = getDefaultLikeExportNameFromDeclaration(symbol); - if (fromDeclaration) return fromDeclaration; - const fileNameCase = moduleSymbolToValidIdentifier( - getSymbolParentOrFail(symbol), - scriptTarget, - /*forceCapitalize*/ - false - ); - const capitalized = moduleSymbolToValidIdentifier( - getSymbolParentOrFail(symbol), - scriptTarget, - /*forceCapitalize*/ - true - ); - if (fileNameCase === capitalized) return fileNameCase; - return [fileNameCase, capitalized]; - } - return symbol.name; -} function getNameForExportedSymbol(symbol, scriptTarget, preferCapitalized) { - if (needsNameFromDeclaration(symbol)) { + if (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */) { return getDefaultLikeExportNameFromDeclaration(symbol) || moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, !!preferCapitalized); } return symbol.name; } -function needsNameFromDeclaration(symbol) { - return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */); -} function getDefaultLikeExportNameFromDeclaration(symbol) { return firstDefined(symbol.declarations, (d) => { var _a, _b, _c; @@ -144010,7 +147824,13 @@ function getDefaultLikeExportNameFromDeclaration(symbol) { if (isExportSpecifier(d) && d.symbol.flags === 2097152 /* Alias */) { return (_b = tryCast(d.propertyName, isIdentifier)) == null ? void 0 : _b.text; } - return (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text; + const name = (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text; + if (name) { + return name; + } + if (symbol.parent && !isExternalModuleSymbol(symbol.parent)) { + return symbol.parent.getName(); + } }); } function getSymbolParentOrFail(symbol) { @@ -144029,7 +147849,7 @@ function moduleSymbolToValidIdentifier(moduleSymbol, target, forceCapitalize) { return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target, forceCapitalize); } function moduleSpecifierToValidIdentifier(moduleSpecifier, target, forceCapitalize) { - const baseName = getBaseFileName(removeSuffix(moduleSpecifier, "/index")); + const baseName = getBaseFileName(removeSuffix(removeFileExtension(moduleSpecifier), "/index")); let res = ""; let lastCharWasValid = true; const firstCharCode = baseName.charCodeAt(0); @@ -144068,25 +147888,20 @@ function stringContainsAt(haystack, needle, startIndex) { function startsWithUnderscore(name) { return name.charCodeAt(0) === 95 /* _ */; } -function isGlobalDeclaration(declaration) { - return !isNonGlobalDeclaration(declaration); -} -function isNonGlobalDeclaration(declaration) { - const sourceFile = declaration.getSourceFile(); - if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) { - return false; - } - return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); -} function isDeprecatedDeclaration(decl) { return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 65536 /* Deprecated */); } function shouldUseUriStyleNodeCoreModules(file, program) { - const decisionFromFile = firstDefined(file.imports, (node) => { - if (ts_JsTyping_exports.nodeCoreModules.has(node.text)) { - return startsWith(node.text, "node:"); + let decisionFromFile; + for (const node of file.imports) { + if (nodeCoreModules.has(node.text) && !exclusivelyPrefixedNodeCoreModules.has(node.text)) { + if (startsWith(node.text, "node:")) { + return true; + } else { + decisionFromFile = false; + } } - }); + } return decisionFromFile ?? program.usesUriStyleNodeCoreModules; } function getNewLineKind(newLineCharacter) { @@ -144173,9 +147988,13 @@ function fileShouldUseJavaScriptRequire(file, program, host, preferRequire) { if (!hasJSFileExtension(fileName)) { return false; } - const compilerOptions = program.getCompilerOptions(); + const compilerOptions = typeof file === "string" ? program.getCompilerOptions() : program.getCompilerOptionsForFile(file); const moduleKind = getEmitModuleKind(compilerOptions); - const impliedNodeFormat = typeof file === "string" ? getImpliedNodeFormatForFile(toPath(file, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), (_a = program.getPackageJsonInfoCache) == null ? void 0 : _a.call(program), host, compilerOptions) : file.impliedNodeFormat; + const sourceFileLike = typeof file === "string" ? { + fileName: file, + impliedNodeFormat: getImpliedNodeFormatForFile(toPath(file, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), (_a = program.getPackageJsonInfoCache) == null ? void 0 : _a.call(program), host, compilerOptions) + } : file; + const impliedNodeFormat = getImpliedNodeFormatForEmitWorker(sourceFileLike, compilerOptions); if (impliedNodeFormat === 99 /* ESNext */) { return false; } @@ -144200,10 +148019,10 @@ function fileShouldUseJavaScriptRequire(file, program, host, preferRequire) { } function isBlockLike(node) { switch (node.kind) { - case 241 /* Block */: - case 307 /* SourceFile */: - case 268 /* ModuleBlock */: - case 296 /* CaseClause */: + case 242 /* Block */: + case 308 /* SourceFile */: + case 269 /* ModuleBlock */: + case 297 /* CaseClause */: return true; default: return false; @@ -144242,6 +148061,7 @@ var ExportKind = /* @__PURE__ */ ((ExportKind3) => { ExportKind3[ExportKind3["Default"] = 1] = "Default"; ExportKind3[ExportKind3["ExportEquals"] = 2] = "ExportEquals"; ExportKind3[ExportKind3["UMD"] = 3] = "UMD"; + ExportKind3[ExportKind3["Module"] = 4] = "Module"; return ExportKind3; })(ExportKind || {}); function createCacheableExportInfoMap(host) { @@ -144287,6 +148107,7 @@ function createCacheableExportInfoMap(host) { const namedSymbol = isDefault && getLocalSymbolForExportDefault(symbol) || symbol; const names = exportKind === 0 /* Named */ || isExternalModuleSymbol(namedSymbol) ? unescapeLeadingUnderscores(symbolTableKey) : getNamesForExportedSymbol( namedSymbol, + checker, /*scriptTarget*/ void 0 ); @@ -144431,45 +148252,64 @@ function createCacheableExportInfoMap(host) { return !packageDeepestNodeModulesPath || startsWith(info.moduleFileName, packageDeepestNodeModulesPath); } } -function isImportableFile(program, from, to, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) { +function isImportable(program, fromFile, toFile, toModule, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) { var _a; - if (from === to) return false; - const cachedResult = moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.get(from.path, to.path, preferences, {}); + if (!toFile) { + let useNodePrefix; + const moduleName = stripQuotes(toModule.name); + if (nodeCoreModules.has(moduleName) && (useNodePrefix = shouldUseUriStyleNodeCoreModules(fromFile, program)) !== void 0) { + return useNodePrefix === startsWith(moduleName, "node:"); + } + return !packageJsonFilter || packageJsonFilter.allowsImportingAmbientModule(toModule, moduleSpecifierResolutionHost) || fileContainsPackageImport(fromFile, moduleName); + } + Debug.assertIsDefined(toFile); + if (fromFile === toFile) return false; + const cachedResult = moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.get(fromFile.path, toFile.path, preferences, {}); if ((cachedResult == null ? void 0 : cachedResult.isBlockedByPackageJsonDependencies) !== void 0) { - return !cachedResult.isBlockedByPackageJsonDependencies; + return !cachedResult.isBlockedByPackageJsonDependencies || !!cachedResult.packageName && fileContainsPackageImport(fromFile, cachedResult.packageName); } const getCanonicalFileName = hostGetCanonicalFileName(moduleSpecifierResolutionHost); const globalTypingsCache = (_a = moduleSpecifierResolutionHost.getGlobalTypingsCacheLocation) == null ? void 0 : _a.call(moduleSpecifierResolutionHost); const hasImportablePath = !!ts_moduleSpecifiers_exports.forEachFileNameOfModule( - from.fileName, - to.fileName, + fromFile.fileName, + toFile.fileName, moduleSpecifierResolutionHost, /*preferSymlinks*/ false, (toPath3) => { - const toFile = program.getSourceFile(toPath3); - return (toFile === to || !toFile) && isImportablePath(from.fileName, toPath3, getCanonicalFileName, globalTypingsCache); + const file = program.getSourceFile(toPath3); + return (file === toFile || !file) && isImportablePath( + fromFile.fileName, + toPath3, + getCanonicalFileName, + globalTypingsCache, + moduleSpecifierResolutionHost + ); } ); if (packageJsonFilter) { - const isAutoImportable = hasImportablePath && packageJsonFilter.allowsImportingSourceFile(to, moduleSpecifierResolutionHost); - moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, !isAutoImportable); - return isAutoImportable; + const importInfo = hasImportablePath ? packageJsonFilter.getSourceFileInfo(toFile, moduleSpecifierResolutionHost) : void 0; + moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(fromFile.path, toFile.path, preferences, {}, importInfo == null ? void 0 : importInfo.packageName, !(importInfo == null ? void 0 : importInfo.importable)); + return !!(importInfo == null ? void 0 : importInfo.importable) || hasImportablePath && !!(importInfo == null ? void 0 : importInfo.packageName) && fileContainsPackageImport(fromFile, importInfo.packageName); } return hasImportablePath; } -function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePath) { - const toNodeModules = forEachAncestorDirectory(toPath3, (ancestor) => getBaseFileName(ancestor) === "node_modules" ? ancestor : void 0); +function fileContainsPackageImport(sourceFile, packageName) { + return sourceFile.imports && sourceFile.imports.some((i) => i.text === packageName || i.text.startsWith(packageName + "/")); +} +function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePath, host) { + const toNodeModules = forEachAncestorDirectoryStoppingAtGlobalCache( + host, + toPath3, + (ancestor) => getBaseFileName(ancestor) === "node_modules" ? ancestor : void 0 + ); const toNodeModulesParent = toNodeModules && getDirectoryPath(getCanonicalFileName(toNodeModules)); return toNodeModulesParent === void 0 || startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || !!globalCachePath && startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent); } function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) { var _a, _b; const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); - const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => { - const pattern = getSubPatternFromSpec(spec, "", "exclude"); - return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0; - }); + const excludePatterns = preferences.autoImportFileExcludePatterns && getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2); forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, host, (module2, file) => cb( module2, file, @@ -144502,25 +148342,17 @@ function forEachExternalModuleToImportFrom(program, host, preferences, useAutoIm (_b = host.log) == null ? void 0 : _b.call(host, `forEachExternalModuleToImportFrom autoImportProvider: ${timestamp() - start}`); } } -function forEachExternalModule(checker, allSourceFiles, excludePatterns, host, cb) { - var _a, _b; - const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath(); - const isExcluded = excludePatterns && (({ fileName, path }) => { - if (excludePatterns.some((p) => p.test(fileName))) return true; - if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) { - let dir = getDirectoryPath(fileName); - return forEachAncestorDirectory(getDirectoryPath(path), (dirPath) => { - const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath)); - if (symlinks) { - return symlinks.some((s) => excludePatterns.some((p) => p.test(fileName.replace(dir, s)))); - } - dir = getDirectoryPath(dir); - }) ?? false; - } - return false; +function getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2) { + return mapDefined(preferences.autoImportFileExcludePatterns, (spec) => { + const pattern = getSubPatternFromSpec(spec, "", "exclude"); + return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0; }); +} +function forEachExternalModule(checker, allSourceFiles, excludePatterns, host, cb) { + var _a; + const isExcluded = excludePatterns && getIsExcluded(excludePatterns, host); for (const ambient of checker.getAmbientModules()) { - if (!ambient.name.includes("*") && !(excludePatterns && ((_b = ambient.declarations) == null ? void 0 : _b.every((d) => isExcluded(d.getSourceFile()))))) { + if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile()))))) { cb( ambient, /*sourceFile*/ @@ -144534,6 +148366,32 @@ function forEachExternalModule(checker, allSourceFiles, excludePatterns, host, c } } } +function getIsExcluded(excludePatterns, host) { + var _a; + const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath(); + return ({ fileName, path }) => { + if (excludePatterns.some((p) => p.test(fileName))) return true; + if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) { + let dir = getDirectoryPath(fileName); + return forEachAncestorDirectoryStoppingAtGlobalCache( + host, + getDirectoryPath(path), + (dirPath) => { + const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath)); + if (symlinks) { + return symlinks.some((s) => excludePatterns.some((p) => p.test(fileName.replace(dir, s)))); + } + dir = getDirectoryPath(dir); + } + ) ?? false; + } + return false; + }; +} +function getIsFileExcluded(host, preferences) { + if (!preferences.autoImportFileExcludePatterns) return () => false; + return getIsExcluded(getIsExcludedPatterns(preferences, hostUsesCaseSensitiveFileNames(host)), host); +} function getExportInfoMap(importingFile, host, program, preferences, cancellationToken) { var _a, _b, _c, _d, _e; const start = timestamp(); @@ -144564,7 +148422,7 @@ function getExportInfoMap(importingFile, host, program, preferences, cancellatio true, (moduleSymbol, moduleFile, program2, isFromPackageJson) => { if (++moduleCount % 100 === 0) cancellationToken == null ? void 0 : cancellationToken.throwIfCancellationRequested(); - const seenExports = /* @__PURE__ */ new Map(); + const seenExports = /* @__PURE__ */ new Set(); const checker = program2.getTypeChecker(); const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker); if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) { @@ -144604,16 +148462,29 @@ function getExportInfoMap(importingFile, host, program, preferences, cancellatio } function getDefaultLikeExportInfo(moduleSymbol, checker) { const exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - if (exportEquals !== moduleSymbol) return { symbol: exportEquals, exportKind: 2 /* ExportEquals */ }; + if (exportEquals !== moduleSymbol) { + const defaultExport2 = checker.tryGetMemberInModuleExports("default" /* Default */, exportEquals); + if (defaultExport2) return { symbol: defaultExport2, exportKind: 1 /* Default */ }; + return { symbol: exportEquals, exportKind: 2 /* ExportEquals */ }; + } const defaultExport = checker.tryGetMemberInModuleExports("default" /* Default */, moduleSymbol); if (defaultExport) return { symbol: defaultExport, exportKind: 1 /* Default */ }; } function isImportableSymbol(symbol, checker) { return !checker.isUndefinedSymbol(symbol) && !checker.isUnknownSymbol(symbol) && !isKnownSymbol(symbol) && !isPrivateIdentifierSymbol(symbol); } -function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, preferCapitalizedNames, cb) { +function getNamesForExportedSymbol(defaultExport, checker, scriptTarget) { + let names; + forEachNameOfDefaultExport(defaultExport, checker, scriptTarget, (name, capitalizedName) => { + names = capitalizedName ? [name, capitalizedName] : name; + return true; + }); + return Debug.checkDefined(names); +} +function forEachNameOfDefaultExport(defaultExport, checker, scriptTarget, cb) { let chain; let current = defaultExport; + const seen = /* @__PURE__ */ new Set(); while (current) { const fromDeclaration = getDefaultLikeExportNameFromDeclaration(current); if (fromDeclaration) { @@ -144625,11 +148496,25 @@ function forEachNameOfDefaultExport(defaultExport, checker, compilerOptions, pre if (final) return final; } chain = append(chain, current); + if (!addToSeen(seen, current)) break; current = current.flags & 2097152 /* Alias */ ? checker.getImmediateAliasedSymbol(current) : void 0; } for (const symbol of chain ?? emptyArray) { if (symbol.parent && isExternalModuleSymbol(symbol.parent)) { - const final = cb(moduleSymbolToValidIdentifier(symbol.parent, getEmitScriptTarget(compilerOptions), preferCapitalizedNames)); + const final = cb( + moduleSymbolToValidIdentifier( + symbol.parent, + scriptTarget, + /*forceCapitalize*/ + false + ), + moduleSymbolToValidIdentifier( + symbol.parent, + scriptTarget, + /*forceCapitalize*/ + true + ) + ); if (final) return final; } } @@ -144872,6 +148757,7 @@ function canFollow(keyword1, keyword2) { case 126 /* StaticKeyword */: case 129 /* AccessorKeyword */: return true; + // Allow things like "public get", "public constructor" and "public static". default: return false; } @@ -144995,13 +148881,13 @@ function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 268 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -145217,49 +149103,49 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 341 /* JSDocParameterTag */: + case 342 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a = param.typeExpression) == null ? void 0 : _a.end) || param.name.end; break; - case 348 /* JSDocPropertyTag */: + case 349 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 346 /* JSDocTypedefTag */: + case 347 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 309 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 310 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 338 /* JSDocCallbackTag */: + case 339 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 344 /* JSDocTypeTag */: + case 345 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 343 /* JSDocThisTag */: - case 340 /* JSDocEnumTag */: + case 344 /* JSDocThisTag */: + case 341 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 342 /* JSDocReturnTag */: + case 343 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 347 /* JSDocSeeTag */: + case 348 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 328 /* JSDocAugmentsTag */: - case 329 /* JSDocImplementsTag */: + case 329 /* JSDocAugmentsTag */: + case 330 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 349 /* JSDocThrowsTag */: + case 350 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -145295,8 +149181,8 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } } function tryClassifyTripleSlashComment(start, width) { - const tripleSlashXMLCommentRegEx = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/im; - const attributeRegex = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/img; + const tripleSlashXMLCommentRegEx = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/m; + const attributeRegex = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/g; const text = sourceFile.text.substr(start, width); const match = tripleSlashXMLCommentRegEx.exec(text); if (!match) { @@ -145404,22 +149290,22 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 286 /* JsxOpeningElement */: + case 287 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 287 /* JsxClosingElement */: + case 288 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 285 /* JsxSelfClosingElement */: + case 286 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 291 /* JsxAttribute */: + case 292 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -145440,11 +149326,11 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) if (token) { const parent2 = token.parent; if (tokenKind === 64 /* EqualsToken */) { - if (parent2.kind === 260 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 291 /* JsxAttribute */) { + if (parent2.kind === 261 /* VariableDeclaration */ || parent2.kind === 173 /* PropertyDeclaration */ || parent2.kind === 170 /* Parameter */ || parent2.kind === 292 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 226 /* BinaryExpression */ || parent2.kind === 224 /* PrefixUnaryExpression */ || parent2.kind === 225 /* PostfixUnaryExpression */ || parent2.kind === 227 /* ConditionalExpression */) { + if (parent2.kind === 227 /* BinaryExpression */ || parent2.kind === 225 /* PrefixUnaryExpression */ || parent2.kind === 226 /* PostfixUnaryExpression */ || parent2.kind === 228 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -145454,7 +149340,7 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 10 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 11 /* StringLiteral */) { - return token && token.parent.kind === 291 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 292 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 14 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -145464,32 +149350,32 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 80 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 169 /* Parameter */: + case 170 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -145648,7 +149534,7 @@ var DocumentHighlights; let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 307 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 308 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -145678,15 +149564,16 @@ var DocumentHighlights; function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 255 /* SwitchStatement */: - if (statement.kind === 251 /* ContinueStatement */) { + case 256 /* SwitchStatement */: + if (statement.kind === 252 /* ContinueStatement */) { return false; } - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 247 /* WhileStatement */: - case 246 /* DoStatement */: + // falls through + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 248 /* WhileStatement */: + case 247 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -145699,24 +149586,24 @@ var DocumentHighlights; function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 268 /* ModuleBlock */: - case 307 /* SourceFile */: - case 241 /* Block */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 269 /* ModuleBlock */: + case 308 /* SourceFile */: + case 242 /* Block */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: if (modifierFlag & 64 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 187 /* TypeLiteral */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 188 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (7 /* AccessibilityModifier */ | 8 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -145727,10 +149614,9 @@ var DocumentHighlights; return [...nodes, container]; } return nodes; - case 210 /* ObjectLiteralExpression */: - return void 0; + // Syntactically invalid positions that the parser might produce anyway default: - Debug.assertNever(container, "Invalid container kind."); + return void 0; } } function pushKeywordIf(keywordList, token, ...expected) { @@ -145743,7 +149629,7 @@ var DocumentHighlights; function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 99 /* ForKeyword */, 117 /* WhileKeyword */, 92 /* DoKeyword */)) { - if (loopNode.kind === 246 /* DoStatement */) { + if (loopNode.kind === 247 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 117 /* WhileKeyword */)) { @@ -145763,13 +149649,13 @@ var DocumentHighlights; const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -147011,7 +150897,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo } // src/services/sourcemaps.ts -var base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; +var base64UrlRegExp = /^data:(?:application\/json;charset=[uU][tT][fF]-8;base64,([A-Za-z0-9+/=]+)$)?/; function getSourceMapper(host) { const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); const currentDirectory = host.getCurrentDirectory(); @@ -147063,7 +150949,7 @@ function getSourceMapper(host) { } const options = program.getCompilerOptions(); const outPath = options.outFile; - const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), currentDirectory, program.getCommonSourceDirectory(), getCanonicalFileName); + const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), program); if (declarationPath === void 0) return void 0; const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info); return newLoc === info ? void 0 : newLoc; @@ -147155,7 +151041,7 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { program.getSemanticDiagnostics(sourceFile, cancellationToken); const diags = []; const checker = program.getTypeChecker(); - const isCommonJSFile = sourceFile.impliedNodeFormat === 1 /* CommonJS */ || fileExtensionIsOneOf(sourceFile.fileName, [".cts" /* Cts */, ".cjs" /* Cjs */]); + const isCommonJSFile = program.getImpliedNodeFormatForEmit(sourceFile) === 1 /* CommonJS */ || fileExtensionIsOneOf(sourceFile.fileName, [".cts" /* Cts */, ".cjs" /* Cjs */]); if (!isCommonJSFile && sourceFile.commonJsModuleIndicator && (programContainsEsModules(program) || compilerOptionsIndicateEsModules(program.getCompilerOptions())) && containsTopLevelCommonjs(sourceFile)) { diags.push(createDiagnosticForNode(getErrorNodeFromCommonJsIndicator(sourceFile.commonJsModuleIndicator), Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module)); } @@ -147165,6 +151051,7 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) { for (const moduleSpecifier of sourceFile.imports) { const importNode = importFromModuleSpecifier(moduleSpecifier); + if (isImportEqualsDeclaration(importNode) && hasSyntacticModifier(importNode, 32 /* Export */)) continue; const name = importNameForConvertToDefaultImport(importNode); if (!name) continue; const module2 = (_a = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile)) == null ? void 0 : _a.resolvedModule; @@ -147176,7 +151063,8 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { } addRange(diags, sourceFile.bindSuggestionDiagnostics); addRange(diags, program.getSuggestionDiagnostics(sourceFile, cancellationToken)); - return diags.sort((d1, d2) => d1.start - d2.start); + diags.sort((d1, d2) => d1.start - d2.start); + return diags; function check(node) { if (isJsFile) { if (canBeConvertedToClass(node, checker)) { @@ -147210,13 +151098,13 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*requireStringLiteralLikeArgument*/ true )); - case 244 /* ExpressionStatement */: { + case 245 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( expression, @@ -147236,10 +151124,10 @@ function propertyAccessLeftHandSide(node) { } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 274 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 271 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 275 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 272 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -147301,18 +151189,20 @@ function hasSupportedNumberOfArguments(node) { } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 219 /* ArrowFunction */: + // falls through + case 220 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); + // falls through case 106 /* NullKeyword */: return true; case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: { + case 212 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -147346,10 +151236,10 @@ function canBeConvertedToClass(node, checker) { } function canBeConvertedToAsync(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return true; default: return false; @@ -147422,6 +151312,7 @@ function transpileWorker(input, transpileOptions, declaration) { options.isolatedDeclarations = true; } else { options.declaration = false; + options.declarationMap = false; } const newLine = getNewLineCharacter(options); const compilerHost = { @@ -147583,9 +151474,9 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) { var _a; switch (declaration.kind) { - case 273 /* ImportClause */: - case 276 /* ImportSpecifier */: - case 271 /* ImportEqualsDeclaration */: + case 274 /* ImportClause */: + case 277 /* ImportSpecifier */: + case 272 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile))); @@ -147595,7 +151486,7 @@ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 167 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 168 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -147606,7 +151497,7 @@ function pushLiteral(node, containers) { function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 168 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -147617,7 +151508,8 @@ function getContainers(declaration) { } container = getContainerNode(container); } - return containers.reverse(); + containers.reverse(); + return containers; } function compareNavigateToItems(i1, i2) { return compareValues(i1.matchKind, i2.matchKind) || compareStringsCaseSensitiveUI(i1.name, i2.name); @@ -147789,7 +151681,7 @@ function addChildrenRecursively(node) { return; } switch (node.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -147798,32 +151690,32 @@ function addChildrenRecursively(node) { } } break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 174 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 171 /* PropertySignature */: + case 172 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 273 /* ImportClause */: + case 274 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 274 /* NamespaceImport */) { + if (namedBindings.kind === 275 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -147832,16 +151724,16 @@ function addChildrenRecursively(node) { } } break; - case 304 /* ShorthandPropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 305 /* SpreadAssignment */: + case 306 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 208 /* BindingElement */: - case 303 /* PropertyAssignment */: - case 260 /* VariableDeclaration */: { + case 209 /* BindingElement */: + case 304 /* PropertyAssignment */: + case 261 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -147850,18 +151742,18 @@ function addChildrenRecursively(node) { } break; } - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -147870,19 +151762,19 @@ function addChildrenRecursively(node) { } endNode(); break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 277 /* ExportAssignment */: { + case 278 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -147894,16 +151786,16 @@ function addChildrenRecursively(node) { } break; } - case 281 /* ExportSpecifier */: - case 271 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 265 /* TypeAliasDeclaration */: + case 282 /* ExportSpecifier */: + case 272 /* ImportEqualsDeclaration */: + case 182 /* IndexSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 266 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 213 /* CallExpression */: - case 226 /* BinaryExpression */: { + case 214 /* CallExpression */: + case 227 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -147979,6 +151871,7 @@ function addChildrenRecursively(node) { Debug.assertNever(special); } } + // falls through default: if (hasJSDocNodes(node)) { forEach(node.jsDoc, (jsDoc) => { @@ -148126,12 +152019,12 @@ function shouldReallyMerge(a, b, parent2) { return false; } switch (a.kind) { - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; @@ -148141,6 +152034,7 @@ function isSynthesized(node) { return !!(node.flags & 16 /* Synthesized */); } function isOwnChild(n, parent2) { + if (n.parent === void 0) return false; const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent; return par === parent2.node || contains(parent2.additionalNodes, par); } @@ -148148,7 +152042,7 @@ function areSameModule(a, b) { if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 267 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 268 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -148169,7 +152063,7 @@ function compareChildren(child1, child2) { return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 267 /* ModuleDeclaration */) { + if (node.kind === 268 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -148178,16 +152072,16 @@ function tryGetName(node) { return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 231 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 232 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 267 /* ModuleDeclaration */) { + if (node.kind === 268 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -148197,27 +152091,27 @@ function getItemName(node, name) { } } switch (node.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 220 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 2048 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 176 /* Constructor */: + case 177 /* Constructor */: return "constructor"; - case 180 /* ConstructSignature */: + case 181 /* ConstructSignature */: return "new()"; - case 179 /* CallSignature */: + case 180 /* CallSignature */: return "()"; - case 181 /* IndexSignature */: + case 182 /* IndexSignature */: return "[]"; default: return ""; @@ -148242,19 +152136,19 @@ function primaryNavBarMenuItems(root) { return true; } switch (navigationBarNodeKind(item)) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 266 /* EnumDeclaration */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 307 /* SourceFile */: - case 265 /* TypeAliasDeclaration */: - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 267 /* EnumDeclaration */: + case 265 /* InterfaceDeclaration */: + case 268 /* ModuleDeclaration */: + case 308 /* SourceFile */: + case 266 /* TypeAliasDeclaration */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: return true; - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -148264,10 +152158,10 @@ function primaryNavBarMenuItems(root) { return false; } switch (navigationBarNodeKind(item2.parent)) { - case 268 /* ModuleBlock */: - case 307 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 269 /* ModuleBlock */: + case 308 /* SourceFile */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: return true; default: return false; @@ -148326,7 +152220,7 @@ function getModuleName(moduleDeclaration) { } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 268 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -148336,13 +152230,13 @@ function getInteriorModule(decl) { return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 167 /* ComputedPropertyName */; + return !member.name || member.name.kind === 168 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 307 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 308 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 260 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 261 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -148387,9 +152281,9 @@ function getCalledExpressionName(expr) { } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 232 /* ClassExpression */: return true; default: return false; @@ -148397,13 +152291,12 @@ function isFunctionOrClassExpression(node) { } function cleanText(text) { text = text.length > maxLength ? text.substring(0, maxLength) + "..." : text; - return text.replace(/\\?(\r?\n|\r|\u2028|\u2029)/g, ""); + return text.replace(/\\?(?:\r?\n|[\r\u2028\u2029])/g, ""); } // src/services/_namespaces/ts.refactor.ts var ts_refactor_exports = {}; __export(ts_refactor_exports, { - addExportToChanges: () => addExportToChanges, addExportsInOldFile: () => addExportsInOldFile, addImportsForMovedSymbols: () => addImportsForMovedSymbols, addNewFileToTsconfig: () => addNewFileToTsconfig, @@ -148415,13 +152308,8 @@ __export(ts_refactor_exports, { convertStringOrTemplateLiteral: () => ts_refactor_convertStringOrTemplateLiteral_exports, convertToOptionalChainExpression: () => ts_refactor_convertToOptionalChainExpression_exports, createNewFileName: () => createNewFileName, - deleteMovedStatements: () => deleteMovedStatements, - deleteUnusedImports: () => deleteUnusedImports, - deleteUnusedOldImports: () => deleteUnusedOldImports, doChangeNamedToNamespaceOrDefault: () => doChangeNamedToNamespaceOrDefault, extractSymbol: () => ts_refactor_extractSymbol_exports, - filterImport: () => filterImport, - forEachImportInStatement: () => forEachImportInStatement, generateGetAccessorAndSetAccessor: () => ts_refactor_generateGetAccessorAndSetAccessor_exports, getApplicableRefactors: () => getApplicableRefactors, getEditsForRefactor: () => getEditsForRefactor, @@ -148429,16 +152317,12 @@ __export(ts_refactor_exports, { getIdentifierForNode: () => getIdentifierForNode, getNewStatementsAndRemoveFromOldFile: () => getNewStatementsAndRemoveFromOldFile, getStatementsToMove: () => getStatementsToMove, - getTopLevelDeclarationStatement: () => getTopLevelDeclarationStatement, getUsageInfo: () => getUsageInfo, inferFunctionReturnType: () => ts_refactor_inferFunctionReturnType_exports, + isInImport: () => isInImport, isRefactorErrorInfo: () => isRefactorErrorInfo, - isTopLevelDeclaration: () => isTopLevelDeclaration, - moduleSpecifierFromImport: () => moduleSpecifierFromImport, - nameOfTopLevelDeclaration: () => nameOfTopLevelDeclaration, refactorKindBeginsWith: () => refactorKindBeginsWith, - registerRefactor: () => registerRefactor, - updateImportsInOtherFiles: () => updateImportsInOtherFiles + registerRefactor: () => registerRefactor }); // src/services/refactorProvider.ts @@ -148520,17 +152404,17 @@ function getInfo2(context, considerPartialSpans = true) { } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 267 /* ModuleDeclaration */: { + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 268 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 243 /* VariableStatement */: { + case 244 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -148540,7 +152424,7 @@ function getInfo2(context, considerPartialSpans = true) { Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 277 /* ExportAssignment */: { + case 278 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; return noSymbolError(node.expression) || { exportNode: node, exportName: node.expression, wasDefault, exportingModuleSymbol }; @@ -148571,20 +152455,21 @@ function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 95 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(90 /* DefaultKeyword */)); break; - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 267 /* ModuleDeclaration */: + // falls through + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 268 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -148609,23 +152494,23 @@ function changeImports(program, { wasDefault, exportName, exportingModuleSymbol function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: { + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text)); break; } - case 273 /* ImportClause */: { + case 274 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 274 /* NamespaceImport */) { + } else if (namedBindings.kind === 275 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -148642,7 +152527,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam } break; } - case 205 /* ImportType */: + case 206 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -148653,10 +152538,10 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 276 /* ImportSpecifier */: { + case 277 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -148666,7 +152551,7 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { } break; } - case 281 /* ExportSpecifier */: { + case 282 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -148762,7 +152647,7 @@ function getImportConversionInfo(context, considerPartialSpans = true) { if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 275 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -148872,9 +152757,9 @@ function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConve const namespaceImportName = namespaceNameConflicts ? getUniqueName(preferredName, sourceFile) : preferredName; const neededNamedImports = /* @__PURE__ */ new Set(); for (const element of toConvert.elements) { - const propertyName = (element.propertyName || element.name).text; + const propertyName = element.propertyName || element.name; ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, (id) => { - const access = factory.createPropertyAccessExpression(factory.createIdentifier(namespaceImportName), propertyName); + const access = propertyName.kind === 11 /* StringLiteral */ ? factory.createElementAccessExpression(factory.createIdentifier(namespaceImportName), factory.cloneNode(propertyName)) : factory.createPropertyAccessExpression(factory.createIdentifier(namespaceImportName), factory.cloneNode(propertyName)); if (isShorthandPropertyAssignment(id.parent)) { changes.replaceNode(sourceFile, id.parent, factory.createPropertyAssignment(id.text, access)); } else if (isExportSpecifier(id.parent)) { @@ -148890,7 +152775,7 @@ function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConve shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)) ); if (neededNamedImports.size && isImportDeclaration(importDecl)) { - const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text))); + const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.cloneNode(element.propertyName), factory.cloneNode(element.name))); changes.insertNodeAfter(sourceFile, toConvert.parent.parent, createImport( importDecl, /*defaultImportName*/ @@ -148917,8 +152802,8 @@ function createImport(node, defaultImportName, elements) { } function createImportClause(defaultImportName, elements) { return factory.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, defaultImportName, elements && elements.length ? factory.createNamedImports(elements) : void 0 ); @@ -149066,7 +152951,7 @@ function flattenTypeLiteralNodeReference(checker, selection) { } if (isIntersectionTypeNode(selection)) { const result = []; - const seen = /* @__PURE__ */ new Map(); + const seen = /* @__PURE__ */ new Set(); for (const type of selection.types) { const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type); if (!flattenedTypeMembers || !flattenedTypeMembers.every((type2) => type2.name && addToSeen(seen, getNameFromPropertyName(type2.name)))) { @@ -149441,7 +153326,7 @@ function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols deleteUnusedImports(sourceFile, importNode, changes, shouldMove); const pathToTargetFileWithExtension = resolvePath(getDirectoryPath(getNormalizedAbsolutePath(oldFile.fileName, program.getCurrentDirectory())), targetFileName); if (getStringComparer(!program.useCaseSensitiveFileNames())(pathToTargetFileWithExtension, sourceFile.fileName) === 0 /* EqualTo */) return; - const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host)); + const newModuleSpecifier = ts_moduleSpecifiers_exports.getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host)); const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration); const ns = getNamespaceLikeImport(importNode); @@ -149452,11 +153337,11 @@ function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols } function getNamespaceLikeImport(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 274 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 271 /* ImportEqualsDeclaration */: + case 273 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 275 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 272 /* ImportEqualsDeclaration */: return node.name; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -149491,13 +153376,13 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, /*name*/ void 0, factory.createNamespaceImport(newNamespaceId) @@ -149506,7 +153391,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie /*attributes*/ void 0 ); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -149515,7 +153400,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -149537,7 +153422,7 @@ function createRequireCall(moduleSpecifier) { ); } function moduleSpecifierFromImport(i) { - return i.kind === 272 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 271 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 273 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 272 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -149560,24 +153445,24 @@ function forEachImportInStatement(statement, cb) { } function forEachAliasDeclarationInImportOrRequire(importOrRequire, cb) { var _a, _b, _c, _d, _e; - if (importOrRequire.kind === 272 /* ImportDeclaration */) { + if (importOrRequire.kind === 273 /* ImportDeclaration */) { if ((_a = importOrRequire.importClause) == null ? void 0 : _a.name) { cb(importOrRequire.importClause); } - if (((_c = (_b = importOrRequire.importClause) == null ? void 0 : _b.namedBindings) == null ? void 0 : _c.kind) === 274 /* NamespaceImport */) { + if (((_c = (_b = importOrRequire.importClause) == null ? void 0 : _b.namedBindings) == null ? void 0 : _c.kind) === 275 /* NamespaceImport */) { cb(importOrRequire.importClause.namedBindings); } - if (((_e = (_d = importOrRequire.importClause) == null ? void 0 : _d.namedBindings) == null ? void 0 : _e.kind) === 275 /* NamedImports */) { + if (((_e = (_d = importOrRequire.importClause) == null ? void 0 : _d.namedBindings) == null ? void 0 : _e.kind) === 276 /* NamedImports */) { for (const element of importOrRequire.importClause.namedBindings.elements) { cb(element); } } - } else if (importOrRequire.kind === 271 /* ImportEqualsDeclaration */) { + } else if (importOrRequire.kind === 272 /* ImportEqualsDeclaration */) { cb(importOrRequire); - } else if (importOrRequire.kind === 260 /* VariableDeclaration */) { + } else if (importOrRequire.kind === 261 /* VariableDeclaration */) { if (importOrRequire.name.kind === 80 /* Identifier */) { cb(importOrRequire); - } else if (importOrRequire.name.kind === 206 /* ObjectBindingPattern */) { + } else if (importOrRequire.name.kind === 207 /* ObjectBindingPattern */) { for (const element of importOrRequire.name.elements) { if (isIdentifier(element.name)) { cb(element); @@ -149626,9 +153511,9 @@ function isExported(sourceFile, decl, useEs6Exports, name) { return !!sourceFile.symbol && !!sourceFile.symbol.exports && getNamesToExportInCommonJS(decl).some((name2) => sourceFile.symbol.exports.has(escapeLeadingUnderscores(name2))); } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { - if (importDecl.kind === 272 /* ImportDeclaration */ && importDecl.importClause) { + if (importDecl.kind === 273 /* ImportDeclaration */ && importDecl.importClause) { const { name, namedBindings } = importDecl.importClause; - if ((!name || isUnused(name)) && (!namedBindings || namedBindings.kind === 275 /* NamedImports */ && namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name)))) { + if ((!name || isUnused(name)) && (!namedBindings || namedBindings.kind === 276 /* NamedImports */ && namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name)))) { return changes.delete(sourceFile, importDecl); } } @@ -149648,24 +153533,24 @@ function addExport(decl, useEs6Exports) { function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(95 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 265 /* TypeAliasDeclaration */: + case 266 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -149685,18 +153570,19 @@ function createExportAssignment(name) { } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: return [decl.name.text]; - case 243 /* VariableStatement */: + // TODO: GH#18217 + case 244 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 271 /* ImportEqualsDeclaration */: + case 268 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 265 /* InterfaceDeclaration */: + case 272 /* ImportEqualsDeclaration */: return emptyArray; - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -149704,7 +153590,7 @@ function getNamesToExportInCommonJS(decl) { } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 272 /* ImportDeclaration */: { + case 273 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; const defaultImport = clause.name && keep(clause.name) ? clause.name : void 0; @@ -149712,15 +153598,15 @@ function filterImport(i, moduleSpecifier, keep) { return defaultImport || namedBindings ? factory.createImportDeclaration( /*modifiers*/ void 0, - factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings), + factory.createImportClause(clause.phaseModifier, defaultImport, namedBindings), getSynthesizedDeepClone(moduleSpecifier), /*attributes*/ void 0 ) : void 0; } - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 260 /* VariableDeclaration */: { + case 261 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -149729,7 +153615,7 @@ function filterImport(i, moduleSpecifier, keep) { } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 274 /* NamespaceImport */) { + if (namedBindings.kind === 275 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -149740,9 +153626,9 @@ function filterBindingName(name, keep) { switch (name.kind) { case 80 /* Identifier */: return keep(name) ? name : void 0; - case 207 /* ArrayBindingPattern */: + case 208 /* ArrayBindingPattern */: return name; - case 206 /* ObjectBindingPattern */: { + case 207 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -149753,9 +153639,9 @@ function nameOfTopLevelDeclaration(d) { } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return d.parent.parent; - case 208 /* BindingElement */: + case 209 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -149838,11 +153724,11 @@ function isAllowedStatementToMove(statement) { } function isPureImport(node) { switch (node.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return true; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 32 /* Export */); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*requireStringLiteralLikeArgument*/ @@ -149852,7 +153738,7 @@ function isPureImport(node) { return false; } } -function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PURE__ */ new Set()) { +function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PURE__ */ new Set(), enclosingRange) { var _a; const movedSymbols = /* @__PURE__ */ new Set(); const oldImportsNeededByTargetFile = /* @__PURE__ */ new Map(); @@ -149868,24 +153754,23 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR } const unusedImportsFromOldFile = /* @__PURE__ */ new Set(); for (const statement of toMove) { - forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => { - if (!symbol.declarations || isGlobalType(checker, symbol)) { + forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => { + if (!some(symbol.declarations)) { return; } if (existingTargetLocals.has(skipAlias(symbol, checker))) { unusedImportsFromOldFile.add(symbol); return; } - for (const decl of symbol.declarations) { - if (isInImport(decl)) { - const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol); - oldImportsNeededByTargetFile.set(symbol, [ - prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite, - tryCast(decl, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d)) - ]); - } else if (isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) { - targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite); - } + const importedDeclaration = find(symbol.declarations, isInImport); + if (importedDeclaration) { + const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol); + oldImportsNeededByTargetFile.set(symbol, [ + prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite, + tryCast(importedDeclaration, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration(d)) + ]); + } else if (!movedSymbols.has(symbol) && every(symbol.declarations, (decl) => isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile)) { + targetFileImportsFromOldFile.set(symbol, isValidTypeOnlyUseSite); } }); } @@ -149898,7 +153783,7 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR if (jsxNamespaceSymbol && !!(statement.transformFlags & 2 /* ContainsJsx */)) { unusedImportsFromOldFile.delete(jsxNamespaceSymbol); } - forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => { + forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => { if (movedSymbols.has(symbol)) oldFileImportsFromTargetFile.set(symbol, isValidTypeOnlyUseSite); unusedImportsFromOldFile.delete(symbol); }); @@ -149919,16 +153804,6 @@ function getUsageInfo(oldFile, toMove, checker, existingTargetLocals = /* @__PUR return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0; } } -function isGlobalType(checker, symbol) { - return !!checker.resolveName( - symbol.name, - /*location*/ - void 0, - 788968 /* Type */, - /*excludeGlobals*/ - false - ); -} function makeUniqueFilename(proposedFilename, extension, inDirectory, host) { let newFilename = proposedFilename; for (let i = 1; ; i++) { @@ -149940,9 +153815,12 @@ function makeUniqueFilename(proposedFilename, extension, inDirectory, host) { function inferNewFileName(importsFromNewFile, movedSymbols) { return forEachKey(importsFromNewFile, symbolNameNoDefault) || forEachKey(movedSymbols, symbolNameNoDefault) || "newFile"; } -function forEachReference(node, checker, onReference) { +function forEachReference(node, checker, enclosingRange, onReference) { node.forEachChild(function cb(node2) { if (isIdentifier(node2) && !isDeclarationName(node2)) { + if (enclosingRange && !rangeContainsRange(enclosingRange, node2)) { + return; + } const sym = checker.getSymbolAtLocation(node2); if (sym) onReference(sym, isValidTypeOnlyAliasUseSite(node2)); } else { @@ -149952,17 +153830,17 @@ function forEachReference(node, checker, onReference) { } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 271 /* ImportEqualsDeclaration */: + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 268 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 265 /* InterfaceDeclaration */: + case 272 /* ImportEqualsDeclaration */: return cb(statement); - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 244 /* ExpressionStatement */: { + case 245 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -149970,14 +153848,14 @@ function forEachTopLevelDeclaration(statement, cb) { } function isInImport(decl) { switch (decl.kind) { - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: + case 272 /* ImportEqualsDeclaration */: + case 277 /* ImportSpecifier */: + case 274 /* ImportClause */: + case 275 /* NamespaceImport */: return true; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 208 /* BindingElement */: + case 209 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -150000,8 +153878,8 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { switch (name.kind) { case 80 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -150009,13 +153887,13 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 271 /* ImportEqualsDeclaration */: + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 268 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 265 /* InterfaceDeclaration */: + case 272 /* ImportEqualsDeclaration */: return true; default: return false; @@ -150105,12 +153983,18 @@ function getExistingLocals(sourceFile, statements, checker) { } } for (const statement of statements) { - forEachReference(statement, checker, (s) => { - const symbol = skipAlias(s, checker); - if (symbol.valueDeclaration && getSourceFileOfNode(symbol.valueDeclaration).path === sourceFile.path) { - existingLocals.add(symbol); + forEachReference( + statement, + checker, + /*enclosingRange*/ + void 0, + (s) => { + const symbol = skipAlias(s, checker); + if (symbol.valueDeclaration && getSourceFileOfNode(symbol.valueDeclaration).path === sourceFile.path) { + existingLocals.add(symbol); + } } - }); + ); } return existingLocals; } @@ -150138,6 +154022,9 @@ function addTargetFileImports(oldFile, importsToCopy, targetFileImportsFromOldFi const targetSymbol = skipAlias(symbol, checker); if (checker.isUnknownSymbol(targetSymbol)) { importAdder.addVerbatimImport(Debug.checkDefined(declaration ?? findAncestor((_a = symbol.declarations) == null ? void 0 : _a[0], isAnyImportOrRequireStatement))); + } else if (targetSymbol.parent === void 0) { + Debug.assert(declaration !== void 0, "expected module symbol to have a declaration"); + importAdder.addImportForModuleSymbol(symbol, isValidTypeOnlyUseSite, declaration); } else { importAdder.addImportFromExportedSymbol(targetSymbol, isValidTypeOnlyUseSite, declaration); } @@ -150202,7 +154089,12 @@ registerRefactor(refactorName4, { const { references, declaration, replacement } = info; const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { for (const node of references) { - tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + const closestStringIdentifierParent = isStringLiteral(replacement) && isIdentifier(node) && walkUpParenthesizedExpressions(node.parent); + if (closestStringIdentifierParent && isTemplateSpan(closestStringIdentifierParent) && !isTaggedTemplateExpression(closestStringIdentifierParent.parent.parent)) { + replaceTemplateStringVariableWithLiteral(tracker, file, closestStringIdentifierParent, replacement); + } else { + tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + } } tracker.delete(file, declaration); }); @@ -150291,6 +154183,19 @@ function getReplacementExpression(reference, replacement) { } return replacement; } +function replaceTemplateStringVariableWithLiteral(tracker, sourceFile, reference, replacement) { + const templateExpression = reference.parent; + const index = templateExpression.templateSpans.indexOf(reference); + const prevNode = index === 0 ? templateExpression.head : templateExpression.templateSpans[index - 1]; + tracker.replaceRangeWithText( + sourceFile, + { + pos: prevNode.getEnd() - 2, + end: reference.literal.getStart() + 1 + }, + replacement.text.replace(/\\/g, "\\\\").replace(/`/g, "\\`") + ); +} // src/services/refactors/moveToNewFile.ts var refactorName5 = "Move to a new file"; @@ -150377,7 +154282,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 173 /* MethodSignature */: { + case 174 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -150389,7 +154294,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 174 /* MethodDeclaration */: { + case 175 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -150403,7 +154308,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 179 /* CallSignature */: { + case 180 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -150412,7 +154317,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 176 /* Constructor */: { + case 177 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -150421,7 +154326,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 180 /* ConstructSignature */: { + case 181 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -150430,7 +154335,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 262 /* FunctionDeclaration */: { + case 263 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -150506,12 +154411,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 262 /* FunctionDeclaration */: + case 174 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 180 /* CallSignature */: + case 177 /* Constructor */: + case 181 /* ConstructSignature */: + case 263 /* FunctionDeclaration */: return true; } return false; @@ -151123,14 +155028,16 @@ function entryToFunctionCall(entry) { const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: + // foo(...) or super(...) or new Foo(...) + case 214 /* CallExpression */: + case 215 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 211 /* PropertyAccessExpression */: + // x.foo(...) + case 212 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -151139,7 +155046,8 @@ function entryToFunctionCall(entry) { } } break; - case 212 /* ElementAccessExpression */: + // x["foo"](...) + case 213 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -151157,13 +155065,15 @@ function entryToAccessExpression(entry) { const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + // `C.foo` + case 212 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 212 /* ElementAccessExpression */: + // `C["foo"]` + case 213 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -151202,22 +155112,22 @@ function isValidFunctionDeclaration(functionDeclaration, checker) { var _a; if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 176 /* Constructor */: + case 177 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -151392,7 +155302,7 @@ function getParameterName(paramDeclaration) { } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -151400,7 +155310,7 @@ function getClassNames(constructorDeclaration) { "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -151410,28 +155320,28 @@ function getClassNames(constructorDeclaration) { } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( findModifier(functionDeclaration, 90 /* DefaultKeyword */), "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return [functionDeclaration.name]; - case 176 /* Constructor */: + case 177 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 137 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 231 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 232 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 218 /* FunctionExpression */: + case 219 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; default: @@ -151514,11 +155424,11 @@ function isNotEqualsOperator(node) { function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: return false; - case 228 /* TemplateExpression */: - case 226 /* BinaryExpression */: + case 229 /* TemplateExpression */: + case 227 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -152158,18 +156068,18 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 172 /* PropertyDeclaration */) { + if (current.kind === 173 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 169 /* Parameter */) { + } else if (current.kind === 170 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 176 /* Constructor */) { + if (ctorOrMethod.kind === 177 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 174 /* MethodDeclaration */) { + } else if (current.kind === 175 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -152209,7 +156119,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { /*includeClassComputedPropertyName*/ false ); - if (container.kind === 262 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { + if (container.kind === 263 /* FunctionDeclaration */ || container.kind === 175 /* MethodDeclaration */ && container.parent.kind === 211 /* ObjectLiteralExpression */ || container.kind === 219 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -152219,21 +156129,21 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 261 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 32 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 108 /* SuperKeyword */: - if (node2.parent.kind === 213 /* CallExpression */) { + if (node2.parent.kind === 214 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -152244,7 +156154,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { thisNode = node2; } break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -152255,34 +156165,36 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { forEachChild(n, check); } }); - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: + // falls through + case 264 /* ClassDeclaration */: + case 263 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + // falls through + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 245 /* IfStatement */: + case 246 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 258 /* TryStatement */: + case 259 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 241 /* Block */: - if (node2.parent && node2.parent.kind === 258 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 242 /* Block */: + if (node2.parent && node2.parent.kind === 259 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 297 /* DefaultClause */: - case 296 /* CaseClause */: + case 298 /* DefaultClause */: + case 297 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -152296,39 +156208,39 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { break; } switch (node2.kind) { - case 197 /* ThisType */: + case 198 /* ThisType */: case 110 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 256 /* LabeledStatement */: { + case 257 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: { + case 253 /* BreakStatement */: + case 252 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 252 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 253 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 223 /* AwaitExpression */: + case 224 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 229 /* YieldExpression */: + case 230 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -152378,12 +156290,12 @@ function collectEnclosingScopes(range) { const scopes = []; while (true) { current = current.parent; - if (current.kind === 169 /* Parameter */) { + if (current.kind === 170 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 307 /* SourceFile */) { + if (current.kind === 308 /* SourceFile */) { return scopes; } } @@ -152459,28 +156371,28 @@ function getDescriptionForConstantInScope(scope) { } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: return "constructor"; - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return "arrow function"; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 263 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 264 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 268 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 269 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -152499,7 +156411,7 @@ function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParame if (!isJS) { let type = checker.getTypeOfSymbolAtLocation(usage.symbol, usage.node); type = checker.getBaseTypeOfLiteralType(type); - typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, 1 /* NoTruncation */); + typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */); } const paramDecl = factory.createParameterDeclaration( /*modifiers*/ @@ -152519,8 +156431,8 @@ function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParame callArguments.push(factory.createIdentifier(name)); }); const typeParametersAndDeclarations = arrayFrom(typeParameterUsages.values(), (type) => ({ type, declaration: getFirstDeclarationBeforePosition(type, context.startPosition) })); - const sortedTypeParametersAndDeclarations = typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder); - const typeParameters = sortedTypeParametersAndDeclarations.length === 0 ? void 0 : mapDefined(sortedTypeParametersAndDeclarations, ({ declaration }) => declaration); + typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder); + const typeParameters = typeParametersAndDeclarations.length === 0 ? void 0 : mapDefined(typeParametersAndDeclarations, ({ declaration }) => declaration); const callTypeArguments = typeParameters !== void 0 ? typeParameters.map((decl) => factory.createTypeReferenceNode( decl.name, /*typeArguments*/ @@ -152528,7 +156440,7 @@ function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParame )) : void 0; if (isExpression(node) && !isJS) { const contextualType = checker.getContextualType(node); - returnType = checker.typeToTypeNode(contextualType, scope, 1 /* NoTruncation */); + returnType = checker.typeToTypeNode(contextualType, scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */); } const { body, returnValueProperty } = transformFunctionBody(node, exposedVariableDeclarations, writes, substitutions, !!(range.facts & 1 /* HasReturn */)); suppressLeadingAndTrailingTrivia(body); @@ -152568,7 +156480,8 @@ function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParame checker.typeToTypeNode( checker.getTypeAtLocation(range.thisNode), scope, - 1 /* NoTruncation */ + 1 /* NoTruncation */, + 8 /* AllowUnresolvedNames */ ), /*initializer*/ void 0 @@ -152665,7 +156578,8 @@ function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParame const variableType = checker.typeToTypeNode( checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(variableDeclaration)), scope, - 1 /* NoTruncation */ + 1 /* NoTruncation */, + 8 /* AllowUnresolvedNames */ ); typeElements.push(factory.createPropertySignature( /*modifiers*/ @@ -152796,7 +156710,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont const file = scope.getSourceFile(); const localNameText = getIdentifierForNode(node, scope, checker, file); const isJS = isInJSFile(scope); - let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */); + let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */); let initializer = transformConstantInitializer(skipParentheses(node), substitutions); ({ variableType, initializer } = transformFunctionInitializerAndType(variableType, initializer)); suppressLeadingAndTrailingTrivia(initializer); @@ -152851,7 +156765,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 244 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 245 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -152881,7 +156795,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont false ); } - if (node.parent.kind === 244 /* ExpressionStatement */) { + if (node.parent.kind === 245 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -152921,13 +156835,13 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont } else { const paramType = checker.getTypeAtLocation(p); if (paramType === checker.getAnyType()) hasAny = true; - parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */), p.initializer)); + parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */), p.initializer)); } } if (hasAny) return { variableType: variableType2, initializer: initializer2 }; variableType2 = void 0; if (isArrowFunction(initializer2)) { - initializer2 = factory.updateArrowFunction(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), initializer2.equalsGreaterThanToken, initializer2.body); + initializer2 = factory.updateArrowFunction(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */), initializer2.equalsGreaterThanToken, initializer2.body); } else { if (functionSignature && !!functionSignature.thisParameter) { const firstParameter = firstOrUndefined(parameters); @@ -152944,7 +156858,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont "this", /*questionToken*/ void 0, - checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */) + checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */) ) ); } @@ -153415,18 +157329,18 @@ function getExtractableParent(node) { function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 306 /* EnumMember */: + case 307 /* EnumMember */: return false; } switch (node.kind) { case 11 /* StringLiteral */: - return parent2.kind !== 272 /* ImportDeclaration */ && parent2.kind !== 276 /* ImportSpecifier */; - case 230 /* SpreadElement */: - case 206 /* ObjectBindingPattern */: - case 208 /* BindingElement */: + return parent2.kind !== 273 /* ImportDeclaration */ && parent2.kind !== 277 /* ImportSpecifier */; + case 231 /* SpreadElement */: + case 207 /* ObjectBindingPattern */: + case 209 /* BindingElement */: return false; case 80 /* Identifier */: - return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 276 /* ImportSpecifier */ && parent2.kind !== 281 /* ExportSpecifier */; + return parent2.kind !== 209 /* BindingElement */ && parent2.kind !== 277 /* ImportSpecifier */ && parent2.kind !== 282 /* ExportSpecifier */; } return true; } @@ -153553,38 +157467,46 @@ function getInfo4(context) { return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) }; } const typeChecker = context.program.getTypeChecker(); - const returnType = tryGetReturnType(typeChecker, declaration); + let returnType; + if (typeChecker.isImplementationOfOverload(declaration)) { + const signatures = typeChecker.getTypeAtLocation(declaration).getCallSignatures(); + if (signatures.length > 1) { + returnType = typeChecker.getUnionType(mapDefined(signatures, (s) => s.getReturnType())); + } + } + if (!returnType) { + const signature = typeChecker.getSignatureFromDeclaration(declaration); + if (signature) { + const typePredicate = typeChecker.getTypePredicateOfSignature(signature); + if (typePredicate && typePredicate.type) { + const typePredicateTypeNode = typeChecker.typePredicateToTypePredicateNode(typePredicate, declaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */); + if (typePredicateTypeNode) { + return { declaration, returnTypeNode: typePredicateTypeNode }; + } + } else { + returnType = typeChecker.getReturnTypeOfSignature(signature); + } + } + } if (!returnType) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_determine_function_return_type) }; } - const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, 1 /* NoTruncation */); + const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */); if (returnTypeNode) { return { declaration, returnTypeNode }; } } function isConvertibleDeclaration(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: return true; default: return false; } } -function tryGetReturnType(typeChecker, node) { - if (typeChecker.isImplementationOfOverload(node)) { - const signatures = typeChecker.getTypeAtLocation(node).getCallSignatures(); - if (signatures.length > 1) { - return typeChecker.getUnionType(mapDefined(signatures, (s) => s.getReturnType())); - } - } - const signature = typeChecker.getSignatureFromDeclaration(node); - if (signature) { - return typeChecker.getReturnTypeOfSignature(signature); - } -} // src/services/classifier2020.ts var TokenEncodingConsts = /* @__PURE__ */ ((TokenEncodingConsts2) => { @@ -153650,13 +157572,13 @@ function collectTokens(program, sourceFile, span, collector, cancellationToken) let inJSXElement = false; function visit(node) { switch (node.kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 268 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -153793,25 +157715,25 @@ function isRightSideOfQualifiedNameOrPropertyAccess2(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [260 /* VariableDeclaration */, 7 /* variable */], - [169 /* Parameter */, 6 /* parameter */], - [172 /* PropertyDeclaration */, 9 /* property */], - [267 /* ModuleDeclaration */, 3 /* namespace */], - [266 /* EnumDeclaration */, 1 /* enum */], - [306 /* EnumMember */, 8 /* enumMember */], - [263 /* ClassDeclaration */, 0 /* class */], - [174 /* MethodDeclaration */, 11 /* member */], - [262 /* FunctionDeclaration */, 10 /* function */], - [218 /* FunctionExpression */, 10 /* function */], - [173 /* MethodSignature */, 11 /* member */], - [177 /* GetAccessor */, 9 /* property */], - [178 /* SetAccessor */, 9 /* property */], - [171 /* PropertySignature */, 9 /* property */], - [264 /* InterfaceDeclaration */, 2 /* interface */], - [265 /* TypeAliasDeclaration */, 5 /* type */], - [168 /* TypeParameter */, 4 /* typeParameter */], - [303 /* PropertyAssignment */, 9 /* property */], - [304 /* ShorthandPropertyAssignment */, 9 /* property */] + [261 /* VariableDeclaration */, 7 /* variable */], + [170 /* Parameter */, 6 /* parameter */], + [173 /* PropertyDeclaration */, 9 /* property */], + [268 /* ModuleDeclaration */, 3 /* namespace */], + [267 /* EnumDeclaration */, 1 /* enum */], + [307 /* EnumMember */, 8 /* enumMember */], + [264 /* ClassDeclaration */, 0 /* class */], + [175 /* MethodDeclaration */, 11 /* member */], + [263 /* FunctionDeclaration */, 10 /* function */], + [219 /* FunctionExpression */, 10 /* function */], + [174 /* MethodSignature */, 11 /* member */], + [178 /* GetAccessor */, 9 /* property */], + [179 /* SetAccessor */, 9 /* property */], + [172 /* PropertySignature */, 9 /* property */], + [265 /* InterfaceDeclaration */, 2 /* interface */], + [266 /* TypeAliasDeclaration */, 5 /* type */], + [169 /* TypeParameter */, 4 /* typeParameter */], + [304 /* PropertyAssignment */, 9 /* property */], + [305 /* ShorthandPropertyAssignment */, 9 /* property */] ]); // src/services/services.ts @@ -153882,9 +157804,9 @@ var NodeObject = class { getChildAt(index, sourceFile) { return this.getChildren(sourceFile)[index]; } - getChildren(sourceFile) { + getChildren(sourceFile = getSourceFileOfNode(this)) { this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"); - return getNodeChildren(this) ?? setNodeChildren(this, createChildren(this, sourceFile)); + return getNodeChildren(this, sourceFile) ?? setNodeChildren(this, sourceFile, createChildren(this, sourceFile)); } getFirstToken(sourceFile) { this.assertHasRealPosition(); @@ -153892,8 +157814,8 @@ var NodeObject = class { if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 309 /* FirstJSDocNode */ || kid.kind > 351 /* LastJSDocNode */); - return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 310 /* FirstJSDocNode */ || kid.kind > 352 /* LastJSDocNode */); + return child.kind < 167 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -153902,7 +157824,7 @@ var NodeObject = class { if (!child) { return void 0; } - return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 167 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -153956,7 +157878,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) { } } function createSyntaxList(nodes, parent2) { - const list = createNode(352 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(353 /* SyntaxList */, nodes.pos, nodes.end, parent2); const children = []; let pos = nodes.pos; for (const node of nodes) { @@ -153965,7 +157887,7 @@ function createSyntaxList(nodes, parent2) { pos = node.end; } addSyntheticNodes(children, pos, nodes.end, parent2); - setNodeChildren(list, children); + list._children = children; return list; } var TokenOrIdentifierObject = class { @@ -154076,6 +157998,7 @@ var SymbolObject = class { if (context) { if (isGetAccessor(context)) { if (!this.contextualGetAccessorDocumentationComment) { + this.contextualGetAccessorDocumentationComment = emptyArray; this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isGetAccessor), checker); } if (length(this.contextualGetAccessorDocumentationComment)) { @@ -154084,6 +158007,7 @@ var SymbolObject = class { } if (isSetAccessor(context)) { if (!this.contextualSetAccessorDocumentationComment) { + this.contextualSetAccessorDocumentationComment = emptyArray; this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isSetAccessor), checker); } if (length(this.contextualSetAccessorDocumentationComment)) { @@ -154104,6 +158028,7 @@ var SymbolObject = class { if (context) { if (isGetAccessor(context)) { if (!this.contextualGetAccessorTags) { + this.contextualGetAccessorTags = emptyArray; this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isGetAccessor), checker); } if (length(this.contextualGetAccessorTags)) { @@ -154112,6 +158037,7 @@ var SymbolObject = class { } if (isSetAccessor(context)) { if (!this.contextualSetAccessorTags) { + this.contextualSetAccessorTags = emptyArray; this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isSetAccessor), checker); } if (length(this.contextualSetAccessorTags)) { @@ -154281,7 +158207,7 @@ function getJsDocTagsOfDeclarations(declarations, checker) { var _a; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 178 /* GetAccessor */ || declaration.kind === 179 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 ? symbol.getJsDocTags(checker) : void 0; @@ -154303,7 +158229,7 @@ function getDocumentationComment(declarations, checker) { const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { + if (declaration.kind === 178 /* GetAccessor */ || declaration.kind === 179 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -154316,7 +158242,7 @@ function getDocumentationComment(declarations, checker) { } function findBaseOfDeclaration(checker, declaration, cb) { var _a; - const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 177 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); return firstDefined(getAllSuperTypeNodes(classOrInterfaceDeclaration), (superTypeNode) => { @@ -154384,10 +158310,10 @@ var SourceFileObject = class extends NodeObject { } function visit(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -154403,29 +158329,30 @@ var SourceFileObject = class extends NodeObject { } forEachChild(node, visit); break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - case 267 /* ModuleDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 281 /* ExportSpecifier */: - case 276 /* ImportSpecifier */: - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 187 /* TypeLiteral */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 267 /* EnumDeclaration */: + case 268 /* ModuleDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 282 /* ExportSpecifier */: + case 277 /* ImportSpecifier */: + case 274 /* ImportClause */: + case 275 /* NamespaceImport */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 188 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 169 /* Parameter */: + case 170 /* Parameter */: if (!hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { break; } - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: { + // falls through + case 261 /* VariableDeclaration */: + case 209 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -154435,12 +158362,13 @@ var SourceFileObject = class extends NodeObject { visit(decl.initializer); } } - case 306 /* EnumMember */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + // falls through + case 307 /* EnumMember */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: addDeclaration(node); break; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -154450,14 +158378,14 @@ var SourceFileObject = class extends NodeObject { } } break; - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 275 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -154465,10 +158393,11 @@ var SourceFileObject = class extends NodeObject { } } break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } + // falls through default: forEachChild(node, visit); } @@ -154716,7 +158645,8 @@ var invalidOperationsInSyntacticMode = [ "getNavigateToItems", "getRenameInfo", "findRenameLocations", - "getApplicableRefactors" + "getApplicableRefactors", + "preparePasteEditsForFile" ]; function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory(), host.jsDocParsingMode), syntaxOnlyOrLanguageServiceMode) { var _a; @@ -154832,7 +158762,8 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h resolveLibrary: maybeBind(host, host.resolveLibrary), useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect), getParsedCommandLine, - jsDocParsingMode: host.jsDocParsingMode + jsDocParsingMode: host.jsDocParsingMode, + getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation) }; const originalGetSourceFile = compilerHost.getSourceFile; const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache( @@ -154904,13 +158835,18 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (host.getParsedCommandLine) { (_a3 = host.onReleaseParsedCommandLine) == null ? void 0 : _a3.call(host, configFileName, oldResolvedRef, oldOptions); } else if (oldResolvedRef) { - onReleaseOldSourceFile(oldResolvedRef.sourceFile, oldOptions); + releaseOldSourceFile(oldResolvedRef.sourceFile, oldOptions); } } - function onReleaseOldSourceFile(oldSourceFile, oldOptions) { + function releaseOldSourceFile(oldSourceFile, oldOptions) { const oldSettingsKey = documentRegistry.getKeyForCompilationSettings(oldOptions); documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, oldSettingsKey, oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat); } + function onReleaseOldSourceFile(oldSourceFile, oldOptions, hasSourceFileByPath, newSourceFileByResolvedPath) { + var _a3; + releaseOldSourceFile(oldSourceFile, oldOptions); + (_a3 = host.onReleaseOldSourceFile) == null ? void 0 : _a3.call(host, oldSourceFile, oldOptions, hasSourceFileByPath, newSourceFileByResolvedPath); + } function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) { return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile); } @@ -155021,6 +158957,108 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h const declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile, cancellationToken); return [...semanticDiagnostics, ...declarationDiagnostics]; } + function getRegionSemanticDiagnostics(fileName, ranges) { + synchronizeHostData(); + const sourceFile = getValidSourceFile(fileName); + const options = program.getCompilerOptions(); + if (skipTypeChecking(sourceFile, options, program) || !canIncludeBindAndCheckDiagnostics(sourceFile, options) || program.getCachedSemanticDiagnostics(sourceFile)) { + return void 0; + } + const nodes = getNodesForRanges(sourceFile, ranges); + if (!nodes) { + return void 0; + } + const checkedSpans = normalizeSpans(nodes.map((node) => createTextSpanFromBounds(node.getFullStart(), node.getEnd()))); + const semanticDiagnostics = program.getSemanticDiagnostics(sourceFile, cancellationToken, nodes); + return { + diagnostics: semanticDiagnostics.slice(), + spans: checkedSpans + }; + } + function getNodesForRanges(file, ranges) { + const nodes = []; + const spans = normalizeSpans(ranges.map((range) => createTextSpanFromRange(range))); + for (const span of spans) { + const nodesForSpan = getNodesForSpan(file, span); + if (!nodesForSpan) { + return void 0; + } + nodes.push(...nodesForSpan); + } + if (!nodes.length) { + return void 0; + } + return nodes; + } + function getNodesForSpan(file, span) { + if (textSpanContainsTextRange(span, file)) { + return void 0; + } + const endToken = findTokenOnLeftOfPosition(file, textSpanEnd(span)) || file; + const enclosingNode = findAncestor(endToken, (node) => textRangeContainsTextSpan(node, span)); + const nodes = []; + chooseOverlappingNodes(span, enclosingNode, nodes); + if (file.end === span.start + span.length) { + nodes.push(file.endOfFileToken); + } + if (some(nodes, isSourceFile)) { + return void 0; + } + return nodes; + } + function chooseOverlappingNodes(span, node, result) { + if (!nodeOverlapsWithSpan(node, span)) { + return false; + } + if (textSpanContainsTextRange(span, node)) { + addSourceElement(node, result); + return true; + } + if (isBlockLike(node)) { + return chooseOverlappingBlockLike(span, node, result); + } + if (isClassLike(node)) { + return chooseOverlappingClassLike(span, node, result); + } + addSourceElement(node, result); + return true; + } + function nodeOverlapsWithSpan(node, span) { + const spanEnd = span.start + span.length; + return node.pos < spanEnd && node.end > span.start; + } + function addSourceElement(node, result) { + while (node.parent && !isSourceElement(node)) { + node = node.parent; + } + result.push(node); + } + function chooseOverlappingBlockLike(span, node, result) { + const childResult = []; + const stmts = node.statements.filter((stmt) => chooseOverlappingNodes(span, stmt, childResult)); + if (stmts.length === node.statements.length) { + addSourceElement(node, result); + return true; + } + result.push(...childResult); + return false; + } + function chooseOverlappingClassLike(span, node, result) { + var _a2, _b, _c; + const overlaps = (n) => textRangeIntersectsWithTextSpan(n, span); + if (((_a2 = node.modifiers) == null ? void 0 : _a2.some(overlaps)) || node.name && overlaps(node.name) || ((_b = node.typeParameters) == null ? void 0 : _b.some(overlaps)) || ((_c = node.heritageClauses) == null ? void 0 : _c.some(overlaps))) { + addSourceElement(node, result); + return true; + } + const childResult = []; + const members = node.members.filter((member) => chooseOverlappingNodes(span, member, childResult)); + if (members.length === node.members.length) { + addSourceElement(node, result); + return true; + } + result.push(...childResult); + return false; + } function getSuggestionDiagnostics(fileName) { synchronizeHostData(); return computeSuggestionDiagnostics(getValidSourceFile(fileName), program, cancellationToken); @@ -155070,7 +159108,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h synchronizeHostData(); return ts_Completions_exports.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host, preferences); } - function getQuickInfoAtPosition(fileName, position) { + function getQuickInfoAtPosition(fileName, position, maximumLength, verbosityLevel) { synchronizeHostData(); const sourceFile = getValidSourceFile(fileName); const node = getTouchingPropertyName(sourceFile, position); @@ -155086,21 +159124,52 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h kind: "" /* unknown */, kindModifiers: "" /* none */, textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile), - displayParts: typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => typeToDisplayParts(typeChecker2, type, getContainerNode(nodeForQuickInfo))), + displayParts: typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => typeToDisplayParts( + typeChecker2, + type, + getContainerNode(nodeForQuickInfo), + /*flags*/ + void 0, + verbosityLevel + )), documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : void 0, tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : void 0 }; } - const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo)); + const { symbolKind, displayParts, documentation, tags, canIncreaseVerbosityLevel } = typeChecker.runWithCancellationToken( + cancellationToken, + (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind( + typeChecker2, + symbol, + sourceFile, + getContainerNode(nodeForQuickInfo), + nodeForQuickInfo, + /*semanticMeaning*/ + void 0, + /*alias*/ + void 0, + maximumLength ?? defaultHoverMaximumTruncationLength, + verbosityLevel + ) + ); return { kind: symbolKind, kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile), displayParts, documentation, - tags + tags, + canIncreaseVerbosityLevel }; } + function preparePasteEditsForFile(fileName, copiedTextRange) { + synchronizeHostData(); + return ts_preparePasteEdits_exports.preparePasteEdits( + getValidSourceFile(fileName), + copiedTextRange, + program.getTypeChecker() + ); + } function getPasteEdits(args, formatOptions) { synchronizeHostData(); return ts_PasteEdits_exports.pasteEditsProvider( @@ -155132,19 +159201,19 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h function shouldGetType(sourceFile, node, position) { switch (node.kind) { case 80 /* Identifier */: - if (node.flags & 16777216 /* JSDoc */ && !isInJSFile(node) && (node.parent.kind === 171 /* PropertySignature */ && node.parent.name === node || findAncestor(node, (n) => n.kind === 169 /* Parameter */))) { + if (node.flags & 16777216 /* JSDoc */ && !isInJSFile(node) && (node.parent.kind === 172 /* PropertySignature */ && node.parent.name === node || findAncestor(node, (n) => n.kind === 170 /* Parameter */))) { return false; } return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 211 /* PropertyAccessExpression */: - case 166 /* QualifiedName */: + case 212 /* PropertyAccessExpression */: + case 167 /* QualifiedName */: return !isInComment(sourceFile, position); case 110 /* ThisKeyword */: - case 197 /* ThisType */: + case 198 /* ThisType */: case 108 /* SuperKeyword */: - case 202 /* NamedTupleMember */: + case 203 /* NamedTupleMember */: return true; - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -155238,17 +159307,18 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return void 0; } switch (node.kind) { - case 211 /* PropertyAccessExpression */: - case 166 /* QualifiedName */: + case 212 /* PropertyAccessExpression */: + case 167 /* QualifiedName */: case 11 /* StringLiteral */: case 97 /* FalseKeyword */: case 112 /* TrueKeyword */: case 106 /* NullKeyword */: case 108 /* SuperKeyword */: case 110 /* ThisKeyword */: - case 197 /* ThisType */: + case 198 /* ThisType */: case 80 /* Identifier */: break; + // Cant create the text span default: return void 0; } @@ -155257,7 +159327,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 267 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 268 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -155354,27 +159424,28 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h } return []; } - function getCodeFixesAtPosition(fileName, start, end, errorCodes67, formatOptions, preferences = emptyOptions) { + function getCodeFixesAtPosition(fileName, start, end, errorCodes68, formatOptions, preferences = emptyOptions) { synchronizeHostData(); const sourceFile = getValidSourceFile(fileName); const span = createTextSpanFromBounds(start, end); const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host); - return flatMap(deduplicate(errorCodes67, equateValues, compareValues), (errorCode) => { + return flatMap(deduplicate(errorCodes68, equateValues, compareValues), (errorCode) => { cancellationToken.throwIfCancellationRequested(); return ts_codefix_exports.getFixes({ errorCode, sourceFile, span, program, host, cancellationToken, formatContext, preferences }); }); } - function getCombinedCodeFix(scope, fixId55, formatOptions, preferences = emptyOptions) { + function getCombinedCodeFix(scope, fixId56, formatOptions, preferences = emptyOptions) { synchronizeHostData(); Debug.assert(scope.type === "file"); const sourceFile = getValidSourceFile(scope.fileName); const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host); - return ts_codefix_exports.getAllFixes({ fixId: fixId55, sourceFile, program, host, cancellationToken, formatContext, preferences }); + return ts_codefix_exports.getAllFixes({ fixId: fixId56, sourceFile, program, host, cancellationToken, formatContext, preferences }); } function organizeImports2(args, formatOptions, preferences = emptyOptions) { synchronizeHostData(); Debug.assert(args.type === "file"); const sourceFile = getValidSourceFile(args.fileName); + if (containsParseError(sourceFile)) return emptyArray; const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host); const mode = args.mode ?? (args.skipDestructiveCodeActions ? "SortAndCombine" /* SortAndCombine */ : "All" /* All */); return ts_OrganizeImports_exports.organizeImports(sourceFile, formatContext, host, program, preferences, mode); @@ -155433,7 +159504,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h function getLinkedEditingRangeAtPosition(fileName, position) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); const token = findPrecedingToken(position, sourceFile); - if (!token || token.parent.kind === 307 /* SourceFile */) return void 0; + if (!token || token.parent.kind === 308 /* SourceFile */) return void 0; const jsxTagWordPattern = "[a-zA-Z0-9:\\-\\._$]*"; if (isJsxFragment(token.parent.parent)) { const openFragment = token.parent.parent.openingFragment; @@ -155717,7 +159788,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); } function getTodoCommentsRegExp() { - const singleLineCommentStart = /(?:\/\/+\s*)/.source; + const singleLineCommentStart = /(?:\/{2,}\s*)/.source; const multiLineCommentStart = /(?:\/\*+\s*)/.source; const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; @@ -155835,6 +159906,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h cleanupSemanticCache, getSyntacticDiagnostics, getSemanticDiagnostics, + getRegionSemanticDiagnostics, getSuggestionDiagnostics, getCompilerOptionsDiagnostics, getSyntacticClassifications: getSyntacticClassifications2, @@ -155900,6 +159972,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h uncommentSelection, provideInlayHints: provideInlayHints2, getSupportedCodeFixes, + preparePasteEditsForFile, getPasteEdits, mapCode: mapCode2 }; @@ -155950,7 +160023,7 @@ function initializeNameTable(sourceFile) { }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 283 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 284 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -155961,11 +160034,13 @@ function getContainingObjectLiteralElementWorker(node) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - if (node.parent.kind === 167 /* ComputedPropertyName */) { + if (node.parent.kind === 168 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } + // falls through case 80 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 292 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + case 296 /* JsxNamespacedName */: + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 211 /* ObjectLiteralExpression */ || node.parent.parent.kind === 293 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -156005,7 +160080,7 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni return deduplicate(discriminatedPropertySymbols, equateValues); } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 213 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -156097,90 +160172,94 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 260 /* VariableDeclaration */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + case 261 /* VariableDeclaration */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: return spanInVariableDeclaration(node); - case 169 /* Parameter */: + case 170 /* Parameter */: return spanInParameterDeclaration(node); - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 177 /* Constructor */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 241 /* Block */: + case 242 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 268 /* ModuleBlock */: + // falls through + case 269 /* ModuleBlock */: return spanInBlock(node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return spanInBlock(node.block); - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: return textSpan(node.expression); - case 253 /* ReturnStatement */: + case 254 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 247 /* WhileStatement */: + case 248 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 246 /* DoStatement */: + case 247 /* DoStatement */: return spanInNode(node.statement); - case 259 /* DebuggerStatement */: + case 260 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 245 /* IfStatement */: + case 246 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 256 /* LabeledStatement */: + case 257 /* LabeledStatement */: return spanInNode(node.statement); - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: + case 253 /* BreakStatement */: + case 252 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 248 /* ForStatement */: + case 249 /* ForStatement */: return spanInForStatement(node); - case 249 /* ForInStatement */: + case 250 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 250 /* ForOfStatement */: + case 251 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: return spanInNode(node.statements[0]); - case 258 /* TryStatement */: + case 259 /* TryStatement */: return spanInBlock(node.tryBlock); - case 257 /* ThrowStatement */: + case 258 /* ThrowStatement */: return textSpan(node, node.expression); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return textSpan(node, node.expression); - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 208 /* BindingElement */: + // falls through + case 264 /* ClassDeclaration */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: + case 209 /* BindingElement */: return textSpan(node); - case 254 /* WithStatement */: + case 255 /* WithStatement */: return spanInNode(node.statement); - case 170 /* Decorator */: + case 171 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: + // No breakpoint in interface, type alias + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: return void 0; + // Tokens: case 27 /* SemicolonToken */: case 1 /* EndOfFileToken */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(node.pos, sourceFile)); @@ -156201,6 +160280,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { case 32 /* GreaterThanToken */: case 30 /* LessThanToken */: return spanInGreaterThanOrLessThanToken(node); + // Keywords: case 117 /* WhileKeyword */: return spanInWhileKeyword(node); case 93 /* ElseKeyword */: @@ -156213,10 +160293,10 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 80 /* Identifier */ || node.kind === 230 /* SpreadElement */ || node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 80 /* Identifier */ || node.kind === 231 /* SpreadElement */ || node.kind === 304 /* PropertyAssignment */ || node.kind === 305 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 226 /* BinaryExpression */) { + if (node.kind === 227 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -156232,19 +160312,19 @@ function spanInSourceFileAtLocation(sourceFile, position) { } if (isExpressionNode(node)) { switch (parent2.kind) { - case 246 /* DoStatement */: + case 247 /* DoStatement */: return spanInPreviousNode(node); - case 170 /* Decorator */: + case 171 /* Decorator */: return spanInNode(node.parent); - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: + case 249 /* ForStatement */: + case 251 /* ForOfStatement */: return textSpan(node); - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (node.parent.operatorToken.kind === 28 /* CommaToken */) { return textSpan(node); } break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -156252,25 +160332,25 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } switch (node.parent.kind) { - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 216 /* TypeAssertionExpression */: + case 217 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: { + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 226 /* BinaryExpression */: { + case 227 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -156293,14 +160373,14 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 249 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 250 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 251 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -156327,7 +160407,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 32 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 32 /* Export */) || functionDeclaration.parent.kind === 264 /* ClassDeclaration */ && functionDeclaration.kind !== 177 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -156347,22 +160427,25 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInBlock(block) { switch (block.parent.kind) { - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 247 /* WhileStatement */: - case 245 /* IfStatement */: - case 249 /* ForInStatement */: + // Set on parent if on same line otherwise on first statement + // falls through + case 248 /* WhileStatement */: + case 246 /* IfStatement */: + case 250 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: + // Set span on previous token if it starts on same line otherwise on the first statement of the block + case 249 /* ForStatement */: + case 251 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 261 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 262 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -156383,62 +160466,65 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInBindingPattern(bindingPattern) { - const firstBindingElement = forEach(bindingPattern.elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0); + const firstBindingElement = forEach(bindingPattern.elements, (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 208 /* BindingElement */) { + if (bindingPattern.parent.kind === 209 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); - const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; - const firstBindingElement = forEach(elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0); + Debug.assert(node2.kind !== 208 /* ArrayBindingPattern */ && node2.kind !== 207 /* ObjectBindingPattern */); + const elements = node2.kind === 210 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + const firstBindingElement = forEach(elements, (element) => element.kind !== 233 /* OmittedExpression */ ? element : void 0); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 226 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 227 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 266 /* EnumDeclaration */: + case 267 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 268 /* ModuleBlock */: + case 269 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 266 /* EnumDeclaration */: - case 263 /* ClassDeclaration */: + // falls through + case 267 /* EnumDeclaration */: + case 264 /* ClassDeclaration */: return textSpan(node2); - case 241 /* Block */: + case 242 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 299 /* CatchClause */: + // falls through + case 300 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 206 /* ObjectBindingPattern */: + case 207 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); + // Default to parent node default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node2.parent)) { const objectLiteral = node2.parent; @@ -156449,7 +160535,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 207 /* ArrayBindingPattern */: + case 208 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -156461,57 +160547,58 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 246 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { + if (node2.parent.kind === 247 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 214 /* CallExpression */ || node2.parent.kind === 215 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 217 /* ParenthesizedExpression */) { + if (node2.parent.kind === 218 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 247 /* WhileStatement */: - case 246 /* DoStatement */: - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 217 /* ParenthesizedExpression */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 177 /* Constructor */: + case 248 /* WhileStatement */: + case 247 /* DoStatement */: + case 249 /* ForStatement */: + case 251 /* ForOfStatement */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 218 /* ParenthesizedExpression */: return spanInPreviousNode(node2); + // Default to parent node default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 303 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 304 /* PropertyAssignment */ || node2.parent.kind === 170 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 216 /* TypeAssertionExpression */) { + if (node2.parent.kind === 217 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 246 /* DoStatement */) { + if (node2.parent.kind === 247 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 250 /* ForOfStatement */) { + if (node2.parent.kind === 251 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -156603,16 +160690,16 @@ function getCallHierarchItemContainerName(node) { return; } switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: + if (node.parent.kind === 211 /* ObjectLiteralExpression */) { return (_c = getAssignedName(node.parent)) == null ? void 0 : _c.getText(); } return (_d = getNameOfDeclaration(node.parent)) == null ? void 0 : _d.getText(); - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: + case 263 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 268 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -156828,55 +160915,55 @@ function createCallSiteCollector(program, callSites) { } switch (node.kind) { case 80 /* Identifier */: - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: + case 272 /* ImportEqualsDeclaration */: + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: return; - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: + case 217 /* TypeAssertionExpression */: + case 235 /* AsExpression */: collect(node.expression); return; - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 213 /* CallExpression */: + case 214 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* NewExpression */: + case 215 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 215 /* TaggedTemplateExpression */: + case 216 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 170 /* Decorator */: + case 171 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: + case 212 /* PropertyAccessExpression */: + case 213 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 238 /* SatisfiesExpression */: + case 239 /* SatisfiesExpression */: collect(node.expression); return; } @@ -156929,25 +161016,25 @@ function collectCallSites(program, node) { const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 175 /* ClassStaticBlockDeclaration */: + case 176 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -156997,19 +161084,15 @@ __export(ts_codefix_exports, { createFileTextChanges: () => createFileTextChanges, createImportAdder: () => createImportAdder, createImportSpecifierResolver: () => createImportSpecifierResolver, - createJsonPropertyAssignment: () => createJsonPropertyAssignment, createMissingMemberNodes: () => createMissingMemberNodes, createSignatureDeclarationFromCallExpression: () => createSignatureDeclarationFromCallExpression, createSignatureDeclarationFromSignature: () => createSignatureDeclarationFromSignature, createStubbedBody: () => createStubbedBody, eachDiagnostic: () => eachDiagnostic, findAncestorMatchingSpan: () => findAncestorMatchingSpan, - findJsonProperty: () => findJsonProperty, generateAccessorFromProperty: () => generateAccessorFromProperty, getAccessorConvertiblePropertyAtPosition: () => getAccessorConvertiblePropertyAtPosition, getAllFixes: () => getAllFixes, - getAllSupers: () => getAllSupers, - getArgumentTypesAndTypeParameters: () => getArgumentTypesAndTypeParameters, getFixes: () => getFixes, getImportCompletionAction: () => getImportCompletionAction, getImportKind: () => getImportKind, @@ -157024,7 +161107,10 @@ __export(ts_codefix_exports, { setJsonCompilerOptionValue: () => setJsonCompilerOptionValue, setJsonCompilerOptionValues: () => setJsonCompilerOptionValues, tryGetAutoImportableReferenceFromTypeNode: () => tryGetAutoImportableReferenceFromTypeNode, - typeToAutoImportableTypeNode: () => typeToAutoImportableTypeNode + typeNodeToAutoImportableTypeNode: () => typeNodeToAutoImportableTypeNode, + typePredicateToAutoImportableTypeNode: () => typePredicateToAutoImportableTypeNode, + typeToAutoImportableTypeNode: () => typeToAutoImportableTypeNode, + typeToMinimizedReferenceType: () => typeToMinimizedReferenceType }); // src/services/codeFixProvider.ts @@ -157041,14 +161127,14 @@ function createCodeFixActionWithoutFixAll(fixName8, changes, description3) { void 0 ); } -function createCodeFixAction(fixName8, changes, description3, fixId55, fixAllDescription, command) { - return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId55, diagnosticToString(fixAllDescription), command); +function createCodeFixAction(fixName8, changes, description3, fixId56, fixAllDescription, command) { + return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId56, diagnosticToString(fixAllDescription), command); } -function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId55, fixAllDescription, command) { - return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId55, fixAllDescription && diagnosticToString(fixAllDescription), command); +function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId56, fixAllDescription, command) { + return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId56, fixAllDescription && diagnosticToString(fixAllDescription), command); } -function createCodeFixActionWorker(fixName8, description3, changes, fixId55, fixAllDescription, command) { - return { fixName: fixName8, description: description3, changes, fixId: fixId55, fixAllDescription, commands: command ? [command] : void 0 }; +function createCodeFixActionWorker(fixName8, description3, changes, fixId56, fixAllDescription, command) { + return { fixName: fixName8, description: description3, changes, fixId: fixId56, fixAllDescription, commands: command ? [command] : void 0 }; } function registerCodeFix(reg) { for (const error2 of reg.errorCodes) { @@ -157056,9 +161142,9 @@ function registerCodeFix(reg) { errorCodeToFixes.add(String(error2), reg); } if (reg.fixIds) { - for (const fixId55 of reg.fixIds) { - Debug.assert(!fixIdToRegistration.has(fixId55)); - fixIdToRegistration.set(fixId55, reg); + for (const fixId56 of reg.fixIds) { + Debug.assert(!fixIdToRegistration.has(fixId56)); + fixIdToRegistration.set(fixId56, reg); } } } @@ -157067,15 +161153,15 @@ function getSupportedErrorCodes() { return errorCodeToFixesArray ?? (errorCodeToFixesArray = arrayFrom(errorCodeToFixes.keys())); } function removeFixIdIfFixAllUnavailable(registration, diagnostics) { - const { errorCodes: errorCodes67 } = registration; + const { errorCodes: errorCodes68 } = registration; let maybeFixableDiagnostics = 0; for (const diag2 of diagnostics) { - if (contains(errorCodes67, diag2.code)) maybeFixableDiagnostics++; + if (contains(errorCodes68, diag2.code)) maybeFixableDiagnostics++; if (maybeFixableDiagnostics > 1) break; } const fixAllUnavailable = maybeFixableDiagnostics < 2; - return ({ fixId: fixId55, fixAllDescription, ...action }) => { - return fixAllUnavailable ? action : { ...action, fixId: fixId55, fixAllDescription }; + return ({ fixId: fixId56, fixAllDescription, ...action }) => { + return fixAllUnavailable ? action : { ...action, fixId: fixId56, fixAllDescription }; }; } function getFixes(context) { @@ -157092,14 +161178,14 @@ function createCombinedCodeActions(changes, commands) { function createFileTextChanges(fileName, textChanges2) { return { fileName, textChanges: textChanges2 }; } -function codeFixAll(context, errorCodes67, use) { +function codeFixAll(context, errorCodes68, use) { const commands = []; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes67, (diag2) => use(t, diag2, commands))); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes68, (diag2) => use(t, diag2, commands))); return createCombinedCodeActions(changes, commands.length === 0 ? void 0 : commands); } -function eachDiagnostic(context, errorCodes67, cb) { +function eachDiagnostic(context, errorCodes68, cb) { for (const diag2 of getDiagnostics(context)) { - if (contains(errorCodes67, diag2.code)) { + if (contains(errorCodes68, diag2.code)) { cb(diag2); } } @@ -157346,7 +161432,7 @@ function findAwaitableInitializers(expression, sourceFile, cancellationToken, pr } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 244 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 32 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -157405,12 +161491,12 @@ function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, c checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.flags & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); + return node.flags & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 263 /* FunctionDeclaration */ || ancestor.parent.kind === 219 /* FunctionExpression */ || ancestor.parent.kind === 220 /* ArrowFunction */ || ancestor.parent.kind === 175 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { const exprType = checker.getTypeAtLocation(insertionSite); - const asyncIter = checker.getAsyncIterableType(); + const asyncIter = checker.getAnyAsyncIterableType(); if (asyncIter && checker.isTypeAssignableTo(exprType, asyncIter)) { const forOf = insertionSite.parent; changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(135 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); @@ -157520,10 +161606,10 @@ function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 80 /* Identifier */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: + case 210 /* ArrayLiteralExpression */: + case 211 /* ObjectLiteralExpression */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -157540,7 +161626,7 @@ function arrayElementCouldBeVariableDeclaration(expression, checker) { function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 80 /* Identifier */: - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: case 28 /* CommaToken */: return true; default: @@ -157582,7 +161668,7 @@ function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { return; } const declaration = token.parent; - if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 173 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 138 /* DeclareKeyword */, declaration); } } @@ -157613,19 +161699,99 @@ function makeChange6(changeTracker, sourceFile, pos) { changeTracker.replaceNode(sourceFile, decorator.expression, replacement); } -// src/services/codefixes/addNameToNamelessParameter.ts -var fixId7 = "addNameToNamelessParameter"; -var errorCodes7 = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code]; +// src/services/codefixes/addMissingResolutionModeImportAttribute.ts +var fixId7 = "addMissingResolutionModeImportAttribute"; +var errorCodes7 = [ + Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code, + Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code +]; registerCodeFix({ errorCodes: errorCodes7, - getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange7(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(fixId7, changes, Diagnostics.Add_parameter_name, fixId7, Diagnostics.Add_names_to_all_parameters_without_names)]; + getCodeActions: function getCodeActionsToAddMissingResolutionModeImportAttribute(context) { + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange7(t, context.sourceFile, context.span.start, context.program, context.host, context.preferences)); + return [createCodeFixAction(fixId7, changes, Diagnostics.Add_resolution_mode_import_attribute, fixId7, Diagnostics.Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it)]; }, fixIds: [fixId7], - getAllCodeActions: (context) => codeFixAll(context, errorCodes7, (changes, diag2) => makeChange7(changes, diag2.file, diag2.start)) + getAllCodeActions: (context) => codeFixAll(context, errorCodes7, (changes, diag2) => makeChange7(changes, diag2.file, diag2.start, context.program, context.host, context.preferences)) +}); +function makeChange7(changeTracker, sourceFile, pos, program, host, preferences) { + var _a, _b, _c; + const token = getTokenAtPosition(sourceFile, pos); + const importNode = findAncestor(token, or(isImportDeclaration, isImportTypeNode)); + Debug.assert(!!importNode, "Expected position to be owned by an ImportDeclaration or ImportType."); + const useSingleQuotes = getQuotePreference(sourceFile, preferences) === 0 /* Single */; + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importNode); + const canUseImportMode = !moduleSpecifier || ((_a = resolveModuleName( + moduleSpecifier.text, + sourceFile.fileName, + program.getCompilerOptions(), + host, + program.getModuleResolutionCache(), + /*redirectedReference*/ + void 0, + 99 /* ESNext */ + ).resolvedModule) == null ? void 0 : _a.resolvedFileName) === ((_c = (_b = program.getResolvedModuleFromModuleSpecifier( + moduleSpecifier, + sourceFile + )) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.resolvedFileName); + const attributes = importNode.attributes ? factory.updateImportAttributes( + importNode.attributes, + factory.createNodeArray([ + ...importNode.attributes.elements, + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode", useSingleQuotes), + factory.createStringLiteral(canUseImportMode ? "import" : "require", useSingleQuotes) + ) + ], importNode.attributes.elements.hasTrailingComma), + importNode.attributes.multiLine + ) : factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode", useSingleQuotes), + factory.createStringLiteral(canUseImportMode ? "import" : "require", useSingleQuotes) + ) + ]) + ); + if (importNode.kind === 273 /* ImportDeclaration */) { + changeTracker.replaceNode( + sourceFile, + importNode, + factory.updateImportDeclaration( + importNode, + importNode.modifiers, + importNode.importClause, + importNode.moduleSpecifier, + attributes + ) + ); + } else { + changeTracker.replaceNode( + sourceFile, + importNode, + factory.updateImportTypeNode( + importNode, + importNode.argument, + attributes, + importNode.qualifier, + importNode.typeArguments + ) + ); + } +} + +// src/services/codefixes/addNameToNamelessParameter.ts +var fixId8 = "addNameToNamelessParameter"; +var errorCodes8 = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code]; +registerCodeFix({ + errorCodes: errorCodes8, + getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) { + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange8(t, context.sourceFile, context.span.start)); + return [createCodeFixAction(fixId8, changes, Diagnostics.Add_parameter_name, fixId8, Diagnostics.Add_names_to_all_parameters_without_names)]; + }, + fixIds: [fixId8], + getAllCodeActions: (context) => codeFixAll(context, errorCodes8, (changes, diag2) => makeChange8(changes, diag2.file, diag2.start)) }); -function makeChange7(changeTracker, sourceFile, start) { +function makeChange8(changeTracker, sourceFile, start) { const token = getTokenAtPosition(sourceFile, start); const param = token.parent; if (!isParameter(param)) { @@ -157666,13 +161832,13 @@ function tryGetNextParam(sourceFile, param) { // src/services/codefixes/addOptionalPropertyUndefined.ts var addOptionalPropertyUndefined = "addOptionalPropertyUndefined"; -var errorCodes8 = [ +var errorCodes9 = [ Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code, Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code ]; registerCodeFix({ - errorCodes: errorCodes8, + errorCodes: errorCodes9, getCodeActions(context) { const typeChecker = context.program.getTypeChecker(); const toAdd = getPropertiesToAdd(context.sourceFile, context.span, typeChecker); @@ -157734,7 +161900,7 @@ function addUndefinedToOptionalProperty(changes, toAdd) { const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 193 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -157743,18 +161909,18 @@ function addUndefinedToOptionalProperty(changes, toAdd) { } // src/services/codefixes/annotateWithTypeFromJSDoc.ts -var fixId8 = "annotateWithTypeFromJSDoc"; -var errorCodes9 = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code]; +var fixId9 = "annotateWithTypeFromJSDoc"; +var errorCodes10 = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code]; registerCodeFix({ - errorCodes: errorCodes9, + errorCodes: errorCodes10, getCodeActions(context) { const decl = getDeclaration(context.sourceFile, context.span.start); if (!decl) return; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange8(t, context.sourceFile, decl)); - return [createCodeFixAction(fixId8, changes, Diagnostics.Annotate_with_type_from_JSDoc, fixId8, Diagnostics.Annotate_everything_with_types_from_JSDoc)]; + return [createCodeFixAction(fixId9, changes, Diagnostics.Annotate_with_type_from_JSDoc, fixId9, Diagnostics.Annotate_everything_with_types_from_JSDoc)]; }, - fixIds: [fixId8], - getAllCodeActions: (context) => codeFixAll(context, errorCodes9, (changes, diag2) => { + fixIds: [fixId9], + getAllCodeActions: (context) => codeFixAll(context, errorCodes10, (changes, diag2) => { const decl = getDeclaration(diag2.file, diag2.start); if (decl) doChange8(changes, diag2.file, decl); }) @@ -157795,26 +161961,26 @@ function doChange8(changes, sourceFile, decl) { } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 260 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 261 /* VariableDeclaration */ || node.kind === 172 /* PropertySignature */ || node.kind === 173 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 312 /* JSDocAllType */: - case 313 /* JSDocUnknownType */: + case 313 /* JSDocAllType */: + case 314 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 316 /* JSDocOptionalType */: + case 317 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 315 /* JSDocNonNullableType */: + case 316 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 314 /* JSDocNullableType */: + case 315 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 318 /* JSDocVariadicType */: + case 319 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 317 /* JSDocFunctionType */: + case 318 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 183 /* TypeReference */: + case 184 /* TypeReference */: return transformJSDocTypeReference(node); - case 322 /* JSDocTypeLiteral */: + case 323 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild( @@ -157852,7 +162018,7 @@ function transformJSDocFunctionType(node) { } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 318 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 319 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(26 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -157911,16 +162077,16 @@ function transformJSDocIndexSignature(node) { } // src/services/codefixes/convertFunctionToEs6Class.ts -var fixId9 = "convertFunctionToEs6Class"; -var errorCodes10 = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code]; +var fixId10 = "convertFunctionToEs6Class"; +var errorCodes11 = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code]; registerCodeFix({ - errorCodes: errorCodes10, + errorCodes: errorCodes11, getCodeActions(context) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange9(t, context.sourceFile, context.span.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions())); - return [createCodeFixAction(fixId9, changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId9, Diagnostics.Convert_all_constructor_functions_to_classes)]; + return [createCodeFixAction(fixId10, changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId10, Diagnostics.Convert_all_constructor_functions_to_classes)]; }, - fixIds: [fixId9], - getAllCodeActions: (context) => codeFixAll(context, errorCodes10, (changes, err) => doChange9(changes, err.file, err.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions())) + fixIds: [fixId10], + getAllCodeActions: (context) => codeFixAll(context, errorCodes11, (changes, err) => doChange9(changes, err.file, err.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions())) }); function doChange9(changes, sourceFile, position, checker, preferences, compilerOptions) { const ctorSymbol = checker.getSymbolAtLocation(getTokenAtPosition(sourceFile, position)); @@ -158015,7 +162181,7 @@ function doChange9(changes, sourceFile, position, checker, preferences, compiler })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 244 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 245 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -158095,7 +162261,7 @@ function doChange9(changes, sourceFile, position, checker, preferences, compiler function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 241 /* Block */) { + if (arrowFunctionBody.kind === 242 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -158192,18 +162358,18 @@ function tryGetPropertyName(node, compilerOptions, quotePreference) { } // src/services/codefixes/convertToAsyncFunction.ts -var fixId10 = "convertToAsyncFunction"; -var errorCodes11 = [Diagnostics.This_may_be_converted_to_an_async_function.code]; +var fixId11 = "convertToAsyncFunction"; +var errorCodes12 = [Diagnostics.This_may_be_converted_to_an_async_function.code]; var codeActionSucceeded = true; registerCodeFix({ - errorCodes: errorCodes11, + errorCodes: errorCodes12, getCodeActions(context) { codeActionSucceeded = true; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => convertToAsyncFunction(t, context.sourceFile, context.span.start, context.program.getTypeChecker())); - return codeActionSucceeded ? [createCodeFixAction(fixId10, changes, Diagnostics.Convert_to_async_function, fixId10, Diagnostics.Convert_all_to_async_functions)] : []; + return codeActionSucceeded ? [createCodeFixAction(fixId11, changes, Diagnostics.Convert_to_async_function, fixId11, Diagnostics.Convert_all_to_async_functions)] : []; }, - fixIds: [fixId10], - getAllCodeActions: (context) => codeFixAll(context, errorCodes11, (changes, err) => convertToAsyncFunction(changes, err.file, err.start, context.program.getTypeChecker())) + fixIds: [fixId11], + getAllCodeActions: (context) => codeFixAll(context, errorCodes12, (changes, err) => convertToAsyncFunction(changes, err.file, err.start, context.program.getTypeChecker())) }); function convertToAsyncFunction(changes, sourceFile, position, checker) { const tokenAtPosition = getTokenAtPosition(sourceFile, position); @@ -158634,7 +162800,7 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i switch (func.kind) { case 106 /* NullKeyword */: break; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: case 80 /* Identifier */: if (!inputArgName) { break; @@ -158659,8 +162825,8 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: { + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a.getReturnType(); if (isBlock(funcBody)) { @@ -158895,7 +163061,7 @@ function fixImportOfModuleExports(importingFile, exportingFile, program, changes } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -158904,7 +163070,7 @@ function fixImportOfModuleExports(importingFile, exportingFile, program, changes quotePreference )); break; - case 213 /* CallExpression */: + case 214 /* CallExpression */: if (isRequireCall( importNode, /*requireStringLiteralLikeArgument*/ @@ -158973,13 +163139,13 @@ function forEachExportReference(sourceFile, cb) { } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports2, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 244 /* ExpressionStatement */: { + case 245 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 213 /* CallExpression */: { + case 214 /* CallExpression */: { if (isRequireCall( expression, /*requireStringLiteralLikeArgument*/ @@ -158996,12 +163162,13 @@ function convertStatement(sourceFile, statement, checker, changes, identifiers, } return false; } - case 226 /* BinaryExpression */: { + case 227 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports2, useSitesToUnqualify); } } } + // falls through default: return false; } @@ -159050,8 +163217,8 @@ function convertVariableStatement(sourceFile, statement, changes, checker, ident } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: { + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -159099,14 +163266,16 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports2, u function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + // TODO: Maybe we should handle this? See fourslash test `refactorConvertToEs6Module_export_object_shorthand.ts`. + // falls through + case 305 /* ShorthandPropertyAssignment */: + case 306 /* SpreadAssignment */: return void 0; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(95 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); @@ -159176,15 +163345,16 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sour function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(95 /* ExportKeyword */)]; switch (exported.kind) { - case 218 /* FunctionExpression */: { + case 219 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 219 /* ArrowFunction */: + // falls through + case 220 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -159209,7 +163379,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { replaceNode ); function replaceNode(original) { - if (original.kind === 211 /* PropertyAccessExpression */) { + if (original.kind === 212 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -159218,7 +163388,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 206 /* ObjectBindingPattern */: { + case 207 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -159230,7 +163400,8 @@ function convertSingleImport(name, moduleSpecifier, checker, identifiers, target )]); } } - case 207 /* ArrayBindingPattern */: { + // falls through -- object destructuring has an interesting pattern and must be a variable declaration + case 208 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -159316,11 +163487,11 @@ function forEachFreeIdentifier(node, cb) { function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return parent2.name !== node; - case 208 /* BindingElement */: + case 209 /* BindingElement */: return parent2.propertyName !== node; - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -159403,19 +163574,19 @@ function convertedImports(newImports, useSitesToUnqualify) { } // src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts -var fixId11 = "correctQualifiedNameToIndexedAccessType"; -var errorCodes12 = [Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code]; +var fixId12 = "correctQualifiedNameToIndexedAccessType"; +var errorCodes13 = [Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code]; registerCodeFix({ - errorCodes: errorCodes12, + errorCodes: errorCodes13, getCodeActions(context) { const qualifiedName = getQualifiedName(context.sourceFile, context.span.start); if (!qualifiedName) return void 0; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange10(t, context.sourceFile, qualifiedName)); const newText = `${qualifiedName.left.text}["${qualifiedName.right.text}"]`; - return [createCodeFixAction(fixId11, changes, [Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId11, Diagnostics.Rewrite_all_as_indexed_access_types)]; + return [createCodeFixAction(fixId12, changes, [Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId12, Diagnostics.Rewrite_all_as_indexed_access_types)]; }, - fixIds: [fixId11], - getAllCodeActions: (context) => codeFixAll(context, errorCodes12, (changes, diag2) => { + fixIds: [fixId12], + getAllCodeActions: (context) => codeFixAll(context, errorCodes13, (changes, diag2) => { const q = getQualifiedName(diag2.file, diag2.start); if (q) { doChange10(changes, diag2.file, q); @@ -159441,20 +163612,20 @@ function doChange10(changeTracker, sourceFile, qualifiedName) { } // src/services/codefixes/convertToTypeOnlyExport.ts -var errorCodes13 = [Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code]; -var fixId12 = "convertToTypeOnlyExport"; +var errorCodes14 = [Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code]; +var fixId13 = "convertToTypeOnlyExport"; registerCodeFix({ - errorCodes: errorCodes13, + errorCodes: errorCodes14, getCodeActions: function getCodeActionsToConvertToTypeOnlyExport(context) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => fixSingleExportDeclaration(t, getExportSpecifierForDiagnosticSpan(context.span, context.sourceFile), context)); if (changes.length) { - return [createCodeFixAction(fixId12, changes, Diagnostics.Convert_to_type_only_export, fixId12, Diagnostics.Convert_all_re_exported_types_to_type_only_exports)]; + return [createCodeFixAction(fixId13, changes, Diagnostics.Convert_to_type_only_export, fixId13, Diagnostics.Convert_all_re_exported_types_to_type_only_exports)]; } }, - fixIds: [fixId12], + fixIds: [fixId13], getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) { - const fixedExportDeclarations = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes13, (changes, diag2) => { + const fixedExportDeclarations = /* @__PURE__ */ new Set(); + return codeFixAll(context, errorCodes14, (changes, diag2) => { const exportSpecifier = getExportSpecifierForDiagnosticSpan(diag2, context.sourceFile); if (exportSpecifier && addToSeen(fixedExportDeclarations, getNodeId(exportSpecifier.parent.parent))) { fixSingleExportDeclaration(changes, exportSpecifier, context); @@ -159513,34 +163684,34 @@ function getTypeExportSpecifiers(originExportSpecifier, context) { ); return filter(exportClause.elements, (element) => { var _a; - return element === originExportSpecifier || ((_a = findDiagnosticForNode(element, diagnostics)) == null ? void 0 : _a.code) === errorCodes13[0]; + return element === originExportSpecifier || ((_a = findDiagnosticForNode(element, diagnostics)) == null ? void 0 : _a.code) === errorCodes14[0]; }); } // src/services/codefixes/convertToTypeOnlyImport.ts -var errorCodes14 = [ +var errorCodes15 = [ Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code ]; -var fixId13 = "convertToTypeOnlyImport"; +var fixId14 = "convertToTypeOnlyImport"; registerCodeFix({ - errorCodes: errorCodes14, + errorCodes: errorCodes15, getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) { var _a; const declaration = getDeclaration2(context.sourceFile, context.span.start); if (declaration) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration)); - const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && isImportDeclaration(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; + const importDeclarationChanges = declaration.kind === 277 /* ImportSpecifier */ && isImportDeclaration(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; const mainAction = createCodeFixAction( - fixId13, + fixId14, changes, - declaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type, - fixId13, + declaration.kind === 277 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type, + fixId14, Diagnostics.Fix_all_with_type_only_imports ); if (some(importDeclarationChanges)) { return [ - createCodeFixActionWithoutFixAll(fixId13, importDeclarationChanges, Diagnostics.Use_import_type), + createCodeFixActionWithoutFixAll(fixId14, importDeclarationChanges, Diagnostics.Use_import_type), mainAction ]; } @@ -159548,18 +163719,18 @@ registerCodeFix({ } return void 0; }, - fixIds: [fixId13], + fixIds: [fixId14], getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) { const fixedImportDeclarations = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes14, (changes, diag2) => { + return codeFixAll(context, errorCodes15, (changes, diag2) => { const errorDeclaration = getDeclaration2(diag2.file, diag2.start); - if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) { + if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 273 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) { doChange11(changes, diag2.file, errorDeclaration); fixedImportDeclarations.add(errorDeclaration); - } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && isImportDeclaration(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 277 /* ImportSpecifier */ && isImportDeclaration(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent); fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); - } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) { + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 277 /* ImportSpecifier */) { doChange11(changes, diag2.file, errorDeclaration); } }); @@ -159610,8 +163781,7 @@ function doChange11(changes, sourceFile, declaration) { true ), factory.createImportClause( - /*isTypeOnly*/ - true, + 156 /* TypeKeyword */, getSynthesizedDeepClone( importClause.name, /*includeTrivia*/ @@ -159638,8 +163808,7 @@ function doChange11(changes, sourceFile, declaration) { true ), factory.createImportClause( - /*isTypeOnly*/ - true, + 156 /* TypeKeyword */, /*name*/ void 0, getSynthesizedDeepClone( @@ -159661,7 +163830,7 @@ function doChange11(changes, sourceFile, declaration) { ) ]); } else { - const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */ ? factory.updateNamedImports( + const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 276 /* NamedImports */ ? factory.updateNamedImports( importClause.namedBindings, sameMap(importClause.namedBindings.elements, (e) => factory.updateImportSpecifier( e, @@ -159671,24 +163840,18 @@ function doChange11(changes, sourceFile, declaration) { e.name )) ) : importClause.namedBindings; - const importDeclaration = factory.updateImportDeclaration(declaration, declaration.modifiers, factory.updateImportClause( - importClause, - /*isTypeOnly*/ - true, - importClause.name, - newNamedBindings - ), declaration.moduleSpecifier, declaration.attributes); + const importDeclaration = factory.updateImportDeclaration(declaration, declaration.modifiers, factory.updateImportClause(importClause, 156 /* TypeKeyword */, importClause.name, newNamedBindings), declaration.moduleSpecifier, declaration.attributes); changes.replaceNode(sourceFile, declaration, importDeclaration); } } } // src/services/codefixes/convertTypedefToType.ts -var fixId14 = "convertTypedefToType"; -var errorCodes15 = [Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type.code]; +var fixId15 = "convertTypedefToType"; +var errorCodes16 = [Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type.code]; registerCodeFix({ - fixIds: [fixId14], - errorCodes: errorCodes15, + fixIds: [fixId15], + errorCodes: errorCodes16, getCodeActions(context) { const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); const node = getTokenAtPosition( @@ -159700,10 +163863,10 @@ registerCodeFix({ if (changes.length > 0) { return [ createCodeFixAction( - fixId14, + fixId15, changes, Diagnostics.Convert_typedef_to_TypeScript_type, - fixId14, + fixId15, Diagnostics.Convert_all_typedef_to_TypeScript_types ) ]; @@ -159711,7 +163874,7 @@ registerCodeFix({ }, getAllCodeActions: (context) => codeFixAll( context, - errorCodes15, + errorCodes16, (changes, diag2) => { const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); const node = getTokenAtPosition(diag2.file, diag2.start); @@ -159767,7 +163930,7 @@ function getLeftAndRightSiblings(typedefNode) { function findEndOfTextBetween(jsDocComment, from, to) { const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); for (let i = comment.length; i > 0; i--) { - if (!/[*/\s]/g.test(comment.substring(i - 1, i))) { + if (!/[*/\s]/.test(comment.substring(i - 1, i))) { return from + i; } } @@ -159779,10 +163942,10 @@ function createDeclaration(tag) { if (!typeExpression) return; const typeName = (_a = tag.name) == null ? void 0 : _a.getText(); if (!typeName) return; - if (typeExpression.kind === 322 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 323 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 309 /* JSDocTypeExpression */) { + if (typeExpression.kind === 310 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -159854,10 +164017,10 @@ function getJSDocTypedefNodes(node) { } // src/services/codefixes/convertLiteralTypeToMappedType.ts -var fixId15 = "convertLiteralTypeToMappedType"; -var errorCodes16 = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code]; +var fixId16 = "convertLiteralTypeToMappedType"; +var errorCodes17 = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code]; registerCodeFix({ - errorCodes: errorCodes16, + errorCodes: errorCodes17, getCodeActions: function getCodeActionsToConvertLiteralTypeToMappedType(context) { const { sourceFile, span } = context; const info = getInfo5(sourceFile, span.start); @@ -159866,10 +164029,10 @@ registerCodeFix({ } const { name, constraint } = info; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange13(t, sourceFile, info)); - return [createCodeFixAction(fixId15, changes, [Diagnostics.Convert_0_to_1_in_0, constraint, name], fixId15, Diagnostics.Convert_all_type_literals_to_mapped_type)]; + return [createCodeFixAction(fixId16, changes, [Diagnostics.Convert_0_to_1_in_0, constraint, name], fixId16, Diagnostics.Convert_all_type_literals_to_mapped_type)]; }, - fixIds: [fixId15], - getAllCodeActions: (context) => codeFixAll(context, errorCodes16, (changes, diag2) => { + fixIds: [fixId16], + getAllCodeActions: (context) => codeFixAll(context, errorCodes17, (changes, diag2) => { const info = getInfo5(diag2.file, diag2.start); if (info) { doChange13(changes, diag2.file, info); @@ -159915,25 +164078,25 @@ function doChange13(changes, sourceFile, { container, typeNode, constraint, name } // src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts -var errorCodes17 = [ +var errorCodes18 = [ Diagnostics.Class_0_incorrectly_implements_interface_1.code, Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code ]; -var fixId16 = "fixClassIncorrectlyImplementsInterface"; +var fixId17 = "fixClassIncorrectlyImplementsInterface"; registerCodeFix({ - errorCodes: errorCodes17, + errorCodes: errorCodes18, getCodeActions(context) { const { sourceFile, span } = context; const classDeclaration = getClass(sourceFile, span.start); return mapDefined(getEffectiveImplementsTypeNodes(classDeclaration), (implementedTypeNode) => { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences)); - return changes.length === 0 ? void 0 : createCodeFixAction(fixId16, changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId16, Diagnostics.Implement_all_unimplemented_interfaces); + return changes.length === 0 ? void 0 : createCodeFixAction(fixId17, changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId17, Diagnostics.Implement_all_unimplemented_interfaces); }); }, - fixIds: [fixId16], + fixIds: [fixId17], getAllCodeActions(context) { - const seenClassDeclarations = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes17, (changes, diag2) => { + const seenClassDeclarations = /* @__PURE__ */ new Set(); + return codeFixAll(context, errorCodes18, (changes, diag2) => { const classDeclaration = getClass(diag2.file, diag2.start); if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) { for (const implementedTypeNode of getEffectiveImplementsTypeNodes(classDeclaration)) { @@ -159974,6 +164137,8 @@ function addMissingDeclarations(context, implementedTypeNode, sourceFile, classD classDeclaration, /*flags*/ void 0, + /*internalFlags*/ + void 0, getNoopSymbolTrackerWithResolver(context) )); } @@ -159997,7 +164162,7 @@ function getHeritageClauseSymbolTable(classDeclaration, checker) { // src/services/codefixes/importFixes.ts var importFixName = "import"; var importFixId = "fixMissingImport"; -var errorCodes18 = [ +var errorCodes19 = [ Diagnostics.Cannot_find_name_0.code, Diagnostics.Cannot_find_name_0_Did_you_mean_1.code, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, @@ -160016,10 +164181,12 @@ var errorCodes18 = [ Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code, Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code, Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code, - Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code + Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code, + Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code, + Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found.code ]; registerCodeFix({ - errorCodes: errorCodes18, + errorCodes: errorCodes19, getCodeActions(context) { const { errorCode, preferences, sourceFile, span, program } = context; const info = getFixInfos( @@ -160055,7 +164222,7 @@ registerCodeFix({ host, cancellationToken ); - eachDiagnostic(context, errorCodes18, (diag2) => importAdder.addImportFromDiagnostic(diag2, context)); + eachDiagnostic(context, errorCodes19, (diag2) => importAdder.addImportFromDiagnostic(diag2, context)); return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, importAdder.writeFixes)); } }); @@ -160078,7 +164245,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre const removeExisting = /* @__PURE__ */ new Set(); const verbatimImports = /* @__PURE__ */ new Set(); const newImports = /* @__PURE__ */ new Map(); - return { addImportFromDiagnostic, addImportFromExportedSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport }; + return { addImportFromDiagnostic, addImportFromExportedSymbol, addImportForModuleSymbol, writeFixes, hasFixes, addImportForUnresolvedIdentifier, addImportForNonExistentExport, removeExistingImport, addVerbatimImport }; function addVerbatimImport(declaration) { verbatimImports.add(declaration); } @@ -160093,8 +164260,8 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre addImport(first(info)); } function addImportFromExportedSymbol(exportedSymbol, isValidTypeOnlyUseSite, referenceImport) { - var _a; - const moduleSymbol = Debug.checkDefined(exportedSymbol.parent); + var _a, _b; + const moduleSymbol = Debug.checkDefined(exportedSymbol.parent, "Expected exported symbol to have module symbol as parent"); const symbolName2 = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions)); const checker = program.getTypeChecker(); const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker)); @@ -160110,10 +164277,14 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre preferences, cancellationToken ); + if (!exportInfo) { + Debug.assert((_a = preferences.autoImportFileExcludePatterns) == null ? void 0 : _a.length); + return; + } const useRequire = shouldUseRequire(sourceFile, program); let fix = getImportFixForSymbol( sourceFile, - Debug.checkDefined(exportInfo), + exportInfo, program, /*position*/ void 0, @@ -160123,13 +164294,92 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre preferences ); if (fix) { - const localName = ((_a = tryCast(referenceImport == null ? void 0 : referenceImport.name, isIdentifier)) == null ? void 0 : _a.text) ?? symbolName2; + const localName = ((_b = tryCast(referenceImport == null ? void 0 : referenceImport.name, isIdentifier)) == null ? void 0 : _b.text) ?? symbolName2; + let addAsTypeOnly; + let propertyName; if (referenceImport && isTypeOnlyImportDeclaration(referenceImport) && (fix.kind === 3 /* AddNew */ || fix.kind === 2 /* AddToExisting */) && fix.addAsTypeOnly === 1 /* Allowed */) { - fix = { ...fix, addAsTypeOnly: 2 /* Required */ }; + addAsTypeOnly = 2 /* Required */; } + if (exportedSymbol.name !== localName) { + propertyName = exportedSymbol.name; + } + fix = { + ...fix, + ...addAsTypeOnly === void 0 ? {} : { addAsTypeOnly }, + ...propertyName === void 0 ? {} : { propertyName } + }; addImport({ fix, symbolName: localName ?? symbolName2, errorIdentifierText: void 0 }); } } + function addImportForModuleSymbol(symbolAlias, isValidTypeOnlyUseSite, referenceImport) { + var _a, _b, _c; + const checker = program.getTypeChecker(); + const moduleSymbol = checker.getAliasedSymbol(symbolAlias); + Debug.assert(moduleSymbol.flags & 1536 /* Module */, "Expected symbol to be a module"); + const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host); + const moduleSpecifierResult = ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo( + moduleSymbol, + checker, + compilerOptions, + sourceFile, + moduleSpecifierResolutionHost, + preferences, + /*options*/ + void 0, + /*forAutoImport*/ + true + ); + const useRequire = shouldUseRequire(sourceFile, program); + let addAsTypeOnly = getAddAsTypeOnly( + isValidTypeOnlyUseSite, + /*isForNewImportDeclaration*/ + true, + /*symbol*/ + void 0, + symbolAlias.flags, + program.getTypeChecker(), + compilerOptions + ); + addAsTypeOnly = addAsTypeOnly === 1 /* Allowed */ && isTypeOnlyImportDeclaration(referenceImport) ? 2 /* Required */ : 1 /* Allowed */; + const importKind = isImportDeclaration(referenceImport) ? isDefaultImport(referenceImport) ? 1 /* Default */ : 2 /* Namespace */ : isImportSpecifier(referenceImport) ? 0 /* Named */ : isImportClause(referenceImport) && !!referenceImport.name ? 1 /* Default */ : 2 /* Namespace */; + const exportInfo = [{ + symbol: symbolAlias, + moduleSymbol, + moduleFileName: (_c = (_b = (_a = moduleSymbol.declarations) == null ? void 0 : _a[0]) == null ? void 0 : _b.getSourceFile()) == null ? void 0 : _c.fileName, + exportKind: 4 /* Module */, + targetFlags: symbolAlias.flags, + isFromPackageJson: false + }]; + const existingFix = getImportFixForSymbol( + sourceFile, + exportInfo, + program, + /*position*/ + void 0, + !!isValidTypeOnlyUseSite, + useRequire, + host, + preferences + ); + let fix; + if (existingFix && importKind !== 2 /* Namespace */ && existingFix.kind !== 0 /* UseNamespace */ && existingFix.kind !== 1 /* JsdocTypeImport */) { + fix = { + ...existingFix, + addAsTypeOnly, + importKind + }; + } else { + fix = { + kind: 3 /* AddNew */, + moduleSpecifierKind: existingFix !== void 0 ? existingFix.moduleSpecifierKind : moduleSpecifierResult.kind, + moduleSpecifier: existingFix !== void 0 ? existingFix.moduleSpecifier : first(moduleSpecifierResult.moduleSpecifiers), + importKind, + addAsTypeOnly, + useRequire + }; + } + addImport({ fix, symbolName: symbolAlias.name, errorIdentifierText: void 0 }); + } function addImportForNonExistentExport(exportName, exportingFileName, exportKind, exportedMeanings, isImportUsageValidAsTypeOnly) { const exportingSourceFile = program.getSourceFile(exportingFileName); const useRequire = shouldUseRequire(sourceFile, program); @@ -160160,9 +164410,10 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre sourceFile, exportingFileName, compilerOptions, - createModuleSpecifierResolutionHost(program, host) + createModuleSpecifierResolutionHost(program, host), + preferences ); - const importKind = getImportKind(futureExportingSourceFile, exportKind, compilerOptions); + const importKind = getImportKind(futureExportingSourceFile, exportKind, program); const addAsTypeOnly = getAddAsTypeOnly( isImportUsageValidAsTypeOnly, /*isForNewImportDeclaration*/ @@ -160185,13 +164436,13 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre } } function removeExistingImport(declaration) { - if (declaration.kind === 273 /* ImportClause */) { + if (declaration.kind === 274 /* ImportClause */) { Debug.assertIsDefined(declaration.name, "ImportClause should have a name if it's being removed"); } removeExisting.add(declaration); } function addImport(info) { - var _a, _b; + var _a, _b, _c; const { fix, symbolName: symbolName2 } = info; switch (fix.kind) { case 0 /* UseNamespace */: @@ -160201,40 +164452,40 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre importType.push(fix); break; case 2 /* AddToExisting */: { - const { importClauseOrBindingPattern, importKind, addAsTypeOnly } = fix; + const { importClauseOrBindingPattern, importKind, addAsTypeOnly, propertyName } = fix; let entry = addToExisting.get(importClauseOrBindingPattern); if (!entry) { addToExisting.set(importClauseOrBindingPattern, entry = { importClauseOrBindingPattern, defaultImport: void 0, namedImports: /* @__PURE__ */ new Map() }); } if (importKind === 0 /* Named */) { - const prevValue = entry == null ? void 0 : entry.namedImports.get(symbolName2); - entry.namedImports.set(symbolName2, reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly)); + const prevTypeOnly = (_a = entry == null ? void 0 : entry.namedImports.get(symbolName2)) == null ? void 0 : _a.addAsTypeOnly; + entry.namedImports.set(symbolName2, { addAsTypeOnly: reduceAddAsTypeOnlyValues(prevTypeOnly, addAsTypeOnly), propertyName }); } else { Debug.assert(entry.defaultImport === void 0 || entry.defaultImport.name === symbolName2, "(Add to Existing) Default import should be missing or match symbolName"); entry.defaultImport = { name: symbolName2, - addAsTypeOnly: reduceAddAsTypeOnlyValues((_a = entry.defaultImport) == null ? void 0 : _a.addAsTypeOnly, addAsTypeOnly) + addAsTypeOnly: reduceAddAsTypeOnlyValues((_b = entry.defaultImport) == null ? void 0 : _b.addAsTypeOnly, addAsTypeOnly) }; } break; } case 3 /* AddNew */: { - const { moduleSpecifier, importKind, useRequire, addAsTypeOnly } = fix; + const { moduleSpecifier, importKind, useRequire, addAsTypeOnly, propertyName } = fix; const entry = getNewImportEntry(moduleSpecifier, importKind, useRequire, addAsTypeOnly); Debug.assert(entry.useRequire === useRequire, "(Add new) Tried to add an `import` and a `require` for the same module"); switch (importKind) { case 1 /* Default */: Debug.assert(entry.defaultImport === void 0 || entry.defaultImport.name === symbolName2, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = { name: symbolName2, addAsTypeOnly: reduceAddAsTypeOnlyValues((_b = entry.defaultImport) == null ? void 0 : _b.addAsTypeOnly, addAsTypeOnly) }; + entry.defaultImport = { name: symbolName2, addAsTypeOnly: reduceAddAsTypeOnlyValues((_c = entry.defaultImport) == null ? void 0 : _c.addAsTypeOnly, addAsTypeOnly) }; break; case 0 /* Named */: const prevValue = (entry.namedImports || (entry.namedImports = /* @__PURE__ */ new Map())).get(symbolName2); - entry.namedImports.set(symbolName2, reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly)); + entry.namedImports.set(symbolName2, [reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly), propertyName]); break; case 3 /* CommonJS */: if (compilerOptions.verbatimModuleSyntax) { const prevValue2 = (entry.namedImports || (entry.namedImports = /* @__PURE__ */ new Map())).get(symbolName2); - entry.namedImports.set(symbolName2, reduceAddAsTypeOnlyValues(prevValue2, addAsTypeOnly)); + entry.namedImports.set(symbolName2, [reduceAddAsTypeOnlyValues(prevValue2, addAsTypeOnly), propertyName]); } else { Debug.assert(entry.namespaceLikeImport === void 0 || entry.namespaceLikeImport.name === symbolName2, "Namespacelike import shoudl be missing or match symbolName"); entry.namespaceLikeImport = { importKind, name: symbolName2, addAsTypeOnly }; @@ -160295,7 +164546,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre function writeFixes(changeTracker, oldFileQuotePreference) { var _a, _b; let quotePreference; - if (isFullSourceFile(sourceFile) && sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) { + if (sourceFile.imports !== void 0 && sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) { quotePreference = oldFileQuotePreference; } else { quotePreference = getQuotePreference(sourceFile, preferences); @@ -160326,8 +164577,8 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre const emptyVariableDeclarations = [...variableDeclarationsWithRemovals].filter( (d) => ( // no binding elements being added to the variable declaration - (d.name.kind !== 206 /* ObjectBindingPattern */ || !addToExisting.has(d.name)) && // no binding elements, or all binding elements are being removed - (d.name.kind !== 206 /* ObjectBindingPattern */ || every(d.name.elements, (e) => removeExisting.has(e))) + (d.name.kind !== 207 /* ObjectBindingPattern */ || !addToExisting.has(d.name)) && // no binding elements, or all binding elements are being removed + (d.name.kind !== 207 /* ObjectBindingPattern */ || every(d.name.elements, (e) => removeExisting.has(e))) ) ); const namedBindingsToDelete = [...importDeclarationsWithRemovals].filter( @@ -160338,7 +164589,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre ((_a2 = d.importClause) == null ? void 0 : _a2.namedBindings) && // is not being fully removed emptyImportDeclarations.indexOf(d) === -1 && // is not gaining named imports !((_b2 = addToExisting.get(d.importClause)) == null ? void 0 : _b2.namedImports) && // all named imports are being removed - (d.importClause.namedBindings.kind === 274 /* NamespaceImport */ || every(d.importClause.namedBindings.elements, (e) => removeExisting.has(e))) + (d.importClause.namedBindings.kind === 275 /* NamespaceImport */ || every(d.importClause.namedBindings.elements, (e) => removeExisting.has(e))) ); } ); @@ -160351,7 +164602,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre declaration.importClause, factory.updateImportClause( declaration.importClause, - declaration.importClause.isTypeOnly, + declaration.importClause.phaseModifier, declaration.importClause.name, /*namedBindings*/ void 0 @@ -160361,23 +164612,23 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre for (const declaration of removeExisting) { const importDeclaration = findAncestor(declaration, isImportDeclaration); if (importDeclaration && emptyImportDeclarations.indexOf(importDeclaration) === -1 && namedBindingsToDelete.indexOf(importDeclaration) === -1) { - if (declaration.kind === 273 /* ImportClause */) { + if (declaration.kind === 274 /* ImportClause */) { changeTracker.delete(sourceFile, declaration.name); } else { - Debug.assert(declaration.kind === 276 /* ImportSpecifier */, "NamespaceImport should have been handled earlier"); + Debug.assert(declaration.kind === 277 /* ImportSpecifier */, "NamespaceImport should have been handled earlier"); if ((_a = addToExisting.get(importDeclaration.importClause)) == null ? void 0 : _a.namedImports) { (importSpecifiersToRemoveWhileAdding ?? (importSpecifiersToRemoveWhileAdding = /* @__PURE__ */ new Set())).add(declaration); } else { changeTracker.delete(sourceFile, declaration); } } - } else if (declaration.kind === 208 /* BindingElement */) { + } else if (declaration.kind === 209 /* BindingElement */) { if ((_b = addToExisting.get(declaration.parent)) == null ? void 0 : _b.namedImports) { (importSpecifiersToRemoveWhileAdding ?? (importSpecifiersToRemoveWhileAdding = /* @__PURE__ */ new Set())).add(declaration); } else { changeTracker.delete(sourceFile, declaration); } - } else if (declaration.kind === 271 /* ImportEqualsDeclaration */) { + } else if (declaration.kind === 272 /* ImportEqualsDeclaration */) { changeTracker.delete(sourceFile, declaration); } } @@ -160388,7 +164639,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre sourceFile, importClauseOrBindingPattern, defaultImport, - arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })), + arrayFrom(namedImports.entries(), ([name, { addAsTypeOnly, propertyName }]) => ({ addAsTypeOnly, propertyName, name })), importSpecifiersToRemoveWhileAdding, preferences ); @@ -160401,7 +164652,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre moduleSpecifier, quotePreference, defaultImport, - namedImports && arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })), + namedImports && arrayFrom(namedImports.entries(), ([name, [addAsTypeOnly, propertyName]]) => ({ addAsTypeOnly, propertyName, name })), namespaceLikeImport, compilerOptions, preferences @@ -160425,7 +164676,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre const importDeclarations = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isImportDeclaration))); const requireStatements = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isRequireVariableStatement))); return [ - ...mapDefined([...verbatimImports], (d) => d.kind === 271 /* ImportEqualsDeclaration */ ? getSynthesizedDeepClone( + ...mapDefined([...verbatimImports], (d) => d.kind === 272 /* ImportEqualsDeclaration */ ? getSynthesizedDeepClone( d, /*includeTrivia*/ true @@ -160445,7 +164696,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre d.modifiers, d.importClause && factory.updateImportClause( d.importClause, - d.importClause.isTypeOnly, + d.importClause.phaseModifier, verbatimImports.has(d.importClause) ? d.importClause.name : void 0, verbatimImports.has(d.importClause.namedBindings) ? d.importClause.namedBindings : ((_a = tryCast(d.importClause.namedBindings, isNamedImports)) == null ? void 0 : _a.elements.some((e) => verbatimImports.has(e))) ? factory.updateNamedImports( d.importClause.namedBindings, @@ -160479,7 +164730,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre } return factory.updateVariableDeclaration( d, - d.name.kind === 206 /* ObjectBindingPattern */ ? factory.updateObjectBindingPattern( + d.name.kind === 207 /* ObjectBindingPattern */ ? factory.updateObjectBindingPattern( d.name, d.name.elements.filter((e) => verbatimImports.has(e)) ) : d.name, @@ -160502,7 +164753,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre } function createImportSpecifierResolver(importingFile, program, host, preferences) { const packageJsonImportFilter = createPackageJsonImportFilter(importingFile, preferences, host); - const importMap = createExistingImportMap(program.getTypeChecker(), importingFile, program.getCompilerOptions()); + const importMap = createExistingImportMap(importingFile, program); return { getModuleSpecifierForBestExportInfo }; function getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite, fromCacheOnly) { const { fixes, computedWithoutCacheCount } = getImportFixes( @@ -160572,8 +164823,13 @@ function codeFixActionToCodeAction({ description: description3, changes, command } function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, moduleSymbol, preferCapitalized, program, host, preferences, cancellationToken) { const getChecker = createGetChecker(program, host); + const isFileExcluded = preferences.autoImportFileExcludePatterns && getIsFileExcluded(host, preferences); + const mergedModuleSymbol = program.getTypeChecker().getMergedSymbol(moduleSymbol); + const moduleSourceFile = isFileExcluded && mergedModuleSymbol.declarations && getDeclarationOfKind(mergedModuleSymbol, 308 /* SourceFile */); + const moduleSymbolExcluded = moduleSourceFile && isFileExcluded(moduleSourceFile); return getExportInfoMap(importingFile, host, program, preferences, cancellationToken).search(importingFile.path, preferCapitalized, (name) => name === symbolName2, (info) => { - if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol && info.some((i) => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol)) { + const checker = getChecker(info[0].isFromPackageJson); + if (checker.getMergedSymbol(skipAlias(info[0].symbol, checker)) === symbol && (moduleSymbolExcluded || info.some((i) => checker.getMergedSymbol(i.moduleSymbol) === moduleSymbol || i.symbol.parent === moduleSymbol))) { return info; } }); @@ -160605,7 +164861,7 @@ function getSingleExportInfoForSymbol(symbol, symbolName2, moduleSymbol, program } } } -function getImportFixes(exportInfos, usagePosition, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences, importMap = isFullSourceFile(sourceFile) ? createExistingImportMap(program.getTypeChecker(), sourceFile, program.getCompilerOptions()) : void 0, fromCacheOnly) { +function getImportFixes(exportInfos, usagePosition, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences, importMap = isFullSourceFile(sourceFile) ? createExistingImportMap(sourceFile, program) : void 0, fromCacheOnly) { const checker = program.getTypeChecker(); const existingImports = importMap ? flatMap(exportInfos, importMap.getImportsForExportInfo) : emptyArray; const useNamespace = usagePosition !== void 0 && tryUseExistingNamespaceImport(existingImports, usagePosition); @@ -160647,12 +164903,12 @@ function tryUseExistingNamespaceImport(existingImports, position) { function getNamespaceLikeImportText(declaration) { var _a, _b, _c; switch (declaration.kind) { - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return (_a = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a.text; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return declaration.name.text; - case 351 /* JSDocImportTag */: - case 272 /* ImportDeclaration */: + case 352 /* JSDocImportTag */: + case 273 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -160680,11 +164936,11 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker } return best; function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 271 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 272 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 260 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifierKind: void 0, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 261 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 207 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifierKind: void 0, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) { @@ -160707,7 +164963,7 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker addAsTypeOnly === 2 /* Required */ && namedBindings)) { return void 0; } - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 274 /* NamespaceImport */) { + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 275 /* NamespaceImport */) { return void 0; } return { @@ -160720,7 +164976,8 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker }; } } -function createExistingImportMap(checker, importingFile, compilerOptions) { +function createExistingImportMap(importingFile, program) { + const checker = program.getTypeChecker(); let importMap; for (const moduleSpecifier of importingFile.imports) { const i = importFromModuleSpecifier(moduleSpecifier); @@ -160729,7 +164986,7 @@ function createExistingImportMap(checker, importingFile, compilerOptions) { if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 272 /* ImportDeclaration */ || i.kind === 271 /* ImportEqualsDeclaration */ || i.kind === 351 /* JSDocImportTag */) { + } else if (i.kind === 273 /* ImportDeclaration */ || i.kind === 272 /* ImportEqualsDeclaration */ || i.kind === 352 /* JSDocImportTag */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -160741,7 +164998,7 @@ function createExistingImportMap(checker, importingFile, compilerOptions) { const matchingDeclarations = importMap == null ? void 0 : importMap.get(getSymbolId(moduleSymbol)); if (!matchingDeclarations) return emptyArray; if (isSourceFileJS(importingFile) && !(targetFlags & 111551 /* Value */) && !every(matchingDeclarations, isJSDocImportTag)) return emptyArray; - const importKind = getImportKind(importingFile, exportKind, compilerOptions); + const importKind = getImportKind(importingFile, exportKind, program); return matchingDeclarations.map((declaration) => ({ declaration, importKind, symbol, targetFlags })); } }; @@ -160756,8 +165013,8 @@ function shouldUseRequire(sourceFile, program) { if (compilerOptions.configFile) { return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */; } - if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) return true; - if (sourceFile.impliedNodeFormat === 99 /* ESNext */) return false; + if (getImpliedNodeFormatForEmit(sourceFile, program) === 1 /* CommonJS */) return true; + if (getImpliedNodeFormatForEmit(sourceFile, program) === 99 /* ESNext */) return false; for (const otherFile of program.getSourceFiles()) { if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) continue; if (otherFile.commonJsModuleIndicator && !otherFile.externalModuleIndicator) return true; @@ -160809,20 +165066,13 @@ function getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUs if (!importedSymbolHasValueMeaning && isJs && usagePosition !== void 0) { return { kind: 1 /* JsdocTypeImport */, moduleSpecifierKind, moduleSpecifier, usagePosition, exportInfo: exportInfo2, isReExport: i > 0 }; } - const importKind = getImportKind(sourceFile, exportInfo2.exportKind, compilerOptions); + const importKind = getImportKind(sourceFile, exportInfo2.exportKind, program); let qualification; if (usagePosition !== void 0 && importKind === 3 /* CommonJS */ && exportInfo2.exportKind === 0 /* Named */) { const exportEquals = checker.resolveExternalModuleSymbol(exportInfo2.moduleSymbol); let namespacePrefix; if (exportEquals !== exportInfo2.moduleSymbol) { - namespacePrefix = forEachNameOfDefaultExport( - exportEquals, - checker, - compilerOptions, - /*preferCapitalizedNames*/ - false, - identity - ); + namespacePrefix = forEachNameOfDefaultExport(exportEquals, checker, getEmitScriptTarget(compilerOptions), identity); } namespacePrefix || (namespacePrefix = moduleSymbolToValidIdentifier( exportInfo2.moduleSymbol, @@ -160886,7 +165136,7 @@ function getFixInfos(context, errorCode, pos, useAutoImportProvider) { } function sortFixInfo(fixes, sourceFile, program, packageJsonImportFilter, host, preferences) { const _toPath = (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)); - return sort(fixes, (a, b) => compareBooleans(!!a.isJsxNamespaceFix, !!b.isJsxNamespaceFix) || compareValues(a.fix.kind, b.fix.kind) || compareModuleSpecifiers(a.fix, b.fix, sourceFile, program, preferences, packageJsonImportFilter.allowsImportingSpecifier, _toPath)); + return toSorted(fixes, (a, b) => compareBooleans(!!a.isJsxNamespaceFix, !!b.isJsxNamespaceFix) || compareValues(a.fix.kind, b.fix.kind) || compareModuleSpecifiers(a.fix, b.fix, sourceFile, program, preferences, packageJsonImportFilter.allowsImportingSpecifier, _toPath)); } function getFixInfosWithoutDiagnostic(context, symbolToken, useAutoImportProvider) { const info = getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider); @@ -160995,8 +165245,8 @@ function getUmdSymbol(token, checker) { } return void 0; } -function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) { - if (compilerOptions.verbatimModuleSyntax && (getEmitModuleKind(compilerOptions) === 1 /* CommonJS */ || importingFile.impliedNodeFormat === 1 /* CommonJS */)) { +function getImportKind(importingFile, exportKind, program, forceImportKeyword) { + if (program.getCompilerOptions().verbatimModuleSyntax && getEmitModuleFormatOfFile(importingFile, program) === 1 /* CommonJS */) { return 3 /* CommonJS */; } switch (exportKind) { @@ -161005,18 +165255,20 @@ function getImportKind(importingFile, exportKind, compilerOptions, forceImportKe case 1 /* Default */: return 1 /* Default */; case 2 /* ExportEquals */: - return getExportEqualsImportKind(importingFile, compilerOptions, !!forceImportKeyword); + return getExportEqualsImportKind(importingFile, program.getCompilerOptions(), !!forceImportKeyword); case 3 /* UMD */: - return getUmdImportKind(importingFile, compilerOptions, !!forceImportKeyword); + return getUmdImportKind(importingFile, program, !!forceImportKeyword); + case 4 /* Module */: + return 2 /* Namespace */; default: return Debug.assertNever(exportKind); } } -function getUmdImportKind(importingFile, compilerOptions, forceImportKeyword) { - if (getAllowSyntheticDefaultImports(compilerOptions)) { +function getUmdImportKind(importingFile, program, forceImportKeyword) { + if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) { return 1 /* Default */; } - const moduleKind = getEmitModuleKind(compilerOptions); + const moduleKind = getEmitModuleKind(program.getCompilerOptions()); switch (moduleKind) { case 2 /* AMD */: case 1 /* CommonJS */: @@ -161034,8 +165286,10 @@ function getUmdImportKind(importingFile, compilerOptions, forceImportKeyword) { case 200 /* Preserve */: return 2 /* Namespace */; case 100 /* Node16 */: + case 101 /* Node18 */: + case 102 /* Node20 */: case 199 /* NodeNext */: - return importingFile.impliedNodeFormat === 99 /* ESNext */ ? 2 /* Namespace */ : 3 /* CommonJS */; + return getImpliedNodeFormatForEmit(importingFile, program) === 99 /* ESNext */ ? 2 /* Namespace */ : 3 /* CommonJS */; default: return Debug.assertNever(moduleKind, `Unexpected moduleKind ${moduleKind}`); } @@ -161108,7 +165362,7 @@ function getExportInfos(symbolName2, isJsxTagName, currentTokenMeaning, cancella }); function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) { const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson); - if (toFile && isImportableFile(program2, fromFile, toFile, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) || !toFile && packageJsonFilter.allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost)) { + if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache)) { const checker = program2.getTypeChecker(); originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), { symbol: exportedSymbol, moduleSymbol, moduleFileName: toFile == null ? void 0 : toFile.fileName, exportKind, targetFlags: skipAlias(exportedSymbol, checker).flags, isFromPackageJson }); } @@ -161118,7 +165372,7 @@ function getExportInfos(symbolName2, isJsxTagName, currentTokenMeaning, cancella cancellationToken.throwIfCancellationRequested(); const compilerOptions = program2.getCompilerOptions(); const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker); - if (defaultInfo && symbolFlagsHaveMeaning(checker.getSymbolFlags(defaultInfo.symbol), currentTokenMeaning) && forEachNameOfDefaultExport(defaultInfo.symbol, checker, compilerOptions, isJsxTagName, (name) => name === symbolName2)) { + if (defaultInfo && symbolFlagsHaveMeaning(checker.getSymbolFlags(defaultInfo.symbol), currentTokenMeaning) && forEachNameOfDefaultExport(defaultInfo.symbol, checker, getEmitScriptTarget(compilerOptions), (name, capitalizedName) => (isJsxTagName ? capitalizedName ?? name : name) === symbolName2)) { addSymbol(moduleSymbol, sourceFile, defaultInfo.symbol, defaultInfo.exportKind, program2, isFromPackageJson); } const exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol); @@ -161205,7 +165459,7 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, program, sourceFile, preferences); - return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 277 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -161213,13 +165467,13 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy } function getModuleSpecifierText(promotedDeclaration) { var _a, _b; - return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 272 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, preferences) { const compilerOptions = program.getCompilerOptions(); const convertExistingToTypeOnly = compilerOptions.verbatimModuleSyntax; switch (aliasDeclaration.kind) { - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { if (aliasDeclaration.parent.elements.length > 1) { const newSpecifier = factory.updateImportSpecifier( @@ -161244,13 +165498,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, pre promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 273 /* ImportClause */: + case 274 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -161271,7 +165525,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, pre const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { const sortState = ts_OrganizeImports_exports.getNamedImportSpecifierComparerWithDetection(importClause.parent, preferences, sourceFile); - if (sortState.isSorted !== false && aliasDeclaration.kind === 276 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (sortState.isSorted !== false && aliasDeclaration.kind === 277 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -161286,7 +165540,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, pre } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, removeExistingImportSpecifiers, preferences) { var _a; - if (clause.kind === 206 /* ObjectBindingPattern */) { + if (clause.kind === 207 /* ObjectBindingPattern */) { if (removeExistingImportSpecifiers && clause.elements.some((e) => removeExistingImportSpecifiers.has(e))) { changes.replaceNode( sourceFile, @@ -161303,8 +165557,7 @@ function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImpor ...namedImports.map((i) => factory.createBindingElement( /*dotDotDotToken*/ void 0, - /*propertyName*/ - void 0, + i.propertyName, i.name )) ]) @@ -161315,12 +165568,7 @@ function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImpor addElementToBindingPattern(clause, defaultImport.name, "default"); } for (const specifier of namedImports) { - addElementToBindingPattern( - clause, - specifier.name, - /*propertyName*/ - void 0 - ); + addElementToBindingPattern(clause, specifier.name, specifier.propertyName); } return; } @@ -161332,12 +165580,11 @@ function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImpor } if (namedImports.length) { const { specifierComparer, isSorted } = ts_OrganizeImports_exports.getNamedImportSpecifierComparerWithDetection(clause.parent, preferences, sourceFile); - const newSpecifiers = stableSort( + const newSpecifiers = toSorted( namedImports.map( (namedImport) => factory.createImportSpecifier( (!clause.isTypeOnly || promoteFromTypeOnly2) && shouldUseTypeOnly(namedImport, preferences), - /*propertyName*/ - void 0, + namedImport.propertyName === void 0 ? void 0 : factory.createIdentifier(namedImport.propertyName), factory.createIdentifier(namedImport.name) ) ), @@ -161349,7 +165596,7 @@ function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImpor clause.namedBindings, factory.updateNamedImports( clause.namedBindings, - stableSort([...existingSpecifiers.filter((s) => !removeExistingImportSpecifiers.has(s)), ...newSpecifiers], specifierComparer) + toSorted([...existingSpecifiers.filter((s) => !removeExistingImportSpecifiers.has(s)), ...newSpecifiers], specifierComparer) ) ); } else if ((existingSpecifiers == null ? void 0 : existingSpecifiers.length) && isSorted !== false) { @@ -161432,8 +165679,7 @@ function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImp namedImports == null ? void 0 : namedImports.map( (namedImport) => factory.createImportSpecifier( !topLevelTypeOnly && shouldUseTypeOnly(namedImport, preferences), - /*propertyName*/ - void 0, + namedImport.propertyName === void 0 ? void 0 : factory.createIdentifier(namedImport.propertyName), factory.createIdentifier(namedImport.name) ) ), @@ -161454,7 +165700,7 @@ function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImp /*modifiers*/ void 0, factory.createImportClause( - shouldUseTypeOnly(namespaceLikeImport, preferences), + shouldUseTypeOnly(namespaceLikeImport, preferences) ? 156 /* TypeKeyword */ : void 0, /*name*/ void 0, factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name)) @@ -161471,11 +165717,10 @@ function getNewRequires(moduleSpecifier, quotePreference, defaultImport, namedIm const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference); let statements; if (defaultImport || (namedImports == null ? void 0 : namedImports.length)) { - const bindingElements = (namedImports == null ? void 0 : namedImports.map(({ name }) => factory.createBindingElement( + const bindingElements = (namedImports == null ? void 0 : namedImports.map(({ name, propertyName }) => factory.createBindingElement( /*dotDotDotToken*/ void 0, - /*propertyName*/ - void 0, + propertyName, name ))) || []; if (defaultImport) { @@ -161519,10 +165764,16 @@ function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { function symbolFlagsHaveMeaning(flags, meaning) { return meaning === 7 /* All */ ? true : meaning & 1 /* Value */ ? !!(flags & 111551 /* Value */) : meaning & 2 /* Type */ ? !!(flags & 788968 /* Type */) : meaning & 4 /* Namespace */ ? !!(flags & 1920 /* Namespace */) : false; } +function getImpliedNodeFormatForEmit(file, program) { + return isFullSourceFile(file) ? program.getImpliedNodeFormatForEmit(file) : getImpliedNodeFormatForEmitWorker(file, program.getCompilerOptions()); +} +function getEmitModuleFormatOfFile(file, program) { + return isFullSourceFile(file) ? program.getEmitModuleFormatOfFile(file) : getEmitModuleFormatOfFileWorker(file, program.getCompilerOptions()); +} // src/services/codefixes/fixAddMissingConstraint.ts -var fixId17 = "addMissingConstraint"; -var errorCodes19 = [ +var fixId18 = "addMissingConstraint"; +var errorCodes20 = [ // We want errors this could be attached to: // Diagnostics.This_type_parameter_probably_needs_an_extends_0_constraint Diagnostics.Type_0_is_not_comparable_to_type_1.code, @@ -161535,20 +165786,20 @@ var errorCodes19 = [ Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code ]; registerCodeFix({ - errorCodes: errorCodes19, + errorCodes: errorCodes20, getCodeActions(context) { const { sourceFile, span, program, preferences, host } = context; const info = getInfo6(program, sourceFile, span); if (info === void 0) return; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingConstraint(t, program, preferences, host, sourceFile, info)); - return [createCodeFixAction(fixId17, changes, Diagnostics.Add_extends_constraint, fixId17, Diagnostics.Add_extends_constraint_to_all_type_parameters)]; + return [createCodeFixAction(fixId18, changes, Diagnostics.Add_extends_constraint, fixId18, Diagnostics.Add_extends_constraint_to_all_type_parameters)]; }, - fixIds: [fixId17], + fixIds: [fixId18], getAllCodeActions: (context) => { const { program, preferences, host } = context; - const seen = /* @__PURE__ */ new Map(); + const seen = /* @__PURE__ */ new Set(); return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes19, (diag2) => { + eachDiagnostic(context, errorCodes20, (diag2) => { const info = getInfo6(program, diag2.file, createTextSpan(diag2.start, diag2.length)); if (info) { if (addToSeen(seen, getNodeId(info.declaration))) { @@ -161597,6 +165848,8 @@ function addMissingConstraint(changes, program, preferences, host, sourceFile, i scriptTarget, /*flags*/ void 0, + /*internalFlags*/ + void 0, tracker ); if (typeNode) { @@ -161628,7 +165881,7 @@ function tryGetConstraintType(checker, node) { var fixName = "fixOverrideModifier"; var fixAddOverrideId = "fixAddOverrideModifier"; var fixRemoveOverrideId = "fixRemoveOverrideModifier"; -var errorCodes20 = [ +var errorCodes21 = [ Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code, Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code, @@ -161692,19 +165945,19 @@ var errorCodeFixIdMap = { } }; registerCodeFix({ - errorCodes: errorCodes20, + errorCodes: errorCodes21, getCodeActions: function getCodeActionsToFixOverrideModifierIssues(context) { const { errorCode, span } = context; const info = errorCodeFixIdMap[errorCode]; if (!info) return emptyArray; - const { descriptions, fixId: fixId55, fixAllDescriptions } = info; + const { descriptions, fixId: fixId56, fixAllDescriptions } = info; const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => dispatchChanges(changes2, context, errorCode, span.start)); return [ - createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId55, fixAllDescriptions) + createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId56, fixAllDescriptions) ]; }, fixIds: [fixName, fixAddOverrideId, fixRemoveOverrideId], - getAllCodeActions: (context) => codeFixAll(context, errorCodes20, (changes, diag2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes21, (changes, diag2) => { const { code, start } = diag2; const info = errorCodeFixIdMap[code]; if (!info || info.fixId !== context.fixId) { @@ -161757,13 +166010,13 @@ function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 177 /* Constructor */: + case 173 /* PropertyDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return true; - case 169 /* Parameter */: + case 170 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -161780,20 +166033,20 @@ function findContainerClassElementLike(sourceFile, pos) { } // src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts -var fixId18 = "fixNoPropertyAccessFromIndexSignature"; -var errorCodes21 = [ +var fixId19 = "fixNoPropertyAccessFromIndexSignature"; +var errorCodes22 = [ Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code ]; registerCodeFix({ - errorCodes: errorCodes21, - fixIds: [fixId18], + errorCodes: errorCodes22, + fixIds: [fixId19], getCodeActions(context) { const { sourceFile, span, preferences } = context; const property = getPropertyAccessExpression(sourceFile, span.start); const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange14(t, context.sourceFile, property, preferences)); - return [createCodeFixAction(fixId18, changes, [Diagnostics.Use_element_access_for_0, property.name.text], fixId18, Diagnostics.Use_element_access_for_all_undeclared_properties)]; + return [createCodeFixAction(fixId19, changes, [Diagnostics.Use_element_access_for_0, property.name.text], fixId19, Diagnostics.Use_element_access_for_all_undeclared_properties)]; }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes21, (changes, diag2) => doChange14(changes, diag2.file, getPropertyAccessExpression(diag2.file, diag2.start), context.preferences)) + getAllCodeActions: (context) => codeFixAll(context, errorCodes22, (changes, diag2) => doChange14(changes, diag2.file, getPropertyAccessExpression(diag2.file, diag2.start), context.preferences)) }); function doChange14(changes, sourceFile, node, preferences) { const quotePreference = getQuotePreference(sourceFile, preferences); @@ -161809,20 +166062,20 @@ function getPropertyAccessExpression(sourceFile, pos) { } // src/services/codefixes/fixImplicitThis.ts -var fixId19 = "fixImplicitThis"; -var errorCodes22 = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code]; +var fixId20 = "fixImplicitThis"; +var errorCodes23 = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code]; registerCodeFix({ - errorCodes: errorCodes22, + errorCodes: errorCodes23, getCodeActions: function getCodeActionsToFixImplicitThis(context) { const { sourceFile, program, span } = context; let diagnostic; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => { diagnostic = doChange15(t, sourceFile, span.start, program.getTypeChecker()); }); - return diagnostic ? [createCodeFixAction(fixId19, changes, diagnostic, fixId19, Diagnostics.Fix_all_implicit_this_errors)] : emptyArray; + return diagnostic ? [createCodeFixAction(fixId20, changes, diagnostic, fixId20, Diagnostics.Fix_all_implicit_this_errors)] : emptyArray; }, - fixIds: [fixId19], - getAllCodeActions: (context) => codeFixAll(context, errorCodes22, (changes, diag2) => { + fixIds: [fixId20], + getAllCodeActions: (context) => codeFixAll(context, errorCodes23, (changes, diag2) => { doChange15(changes, diag2.file, diag2.start, context.program.getTypeChecker()); }) }); @@ -161867,25 +166120,25 @@ function doChange15(changes, sourceFile, pos, checker) { } // src/services/codefixes/fixImportNonExportedMember.ts -var fixId20 = "fixImportNonExportedMember"; -var errorCodes23 = [ +var fixId21 = "fixImportNonExportedMember"; +var errorCodes24 = [ Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported.code ]; registerCodeFix({ - errorCodes: errorCodes23, - fixIds: [fixId20], + errorCodes: errorCodes24, + fixIds: [fixId21], getCodeActions(context) { const { sourceFile, span, program } = context; const info = getInfo7(sourceFile, span.start, program); if (info === void 0) return void 0; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange16(t, program, info)); - return [createCodeFixAction(fixId20, changes, [Diagnostics.Export_0_from_module_1, info.exportName.node.text, info.moduleSpecifier], fixId20, Diagnostics.Export_all_referenced_locals)]; + return [createCodeFixAction(fixId21, changes, [Diagnostics.Export_0_from_module_1, info.exportName.node.text, info.moduleSpecifier], fixId21, Diagnostics.Export_all_referenced_locals)]; }, getAllCodeActions(context) { const { program } = context; return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { const exports2 = /* @__PURE__ */ new Map(); - eachDiagnostic(context, errorCodes23, (diag2) => { + eachDiagnostic(context, errorCodes24, (diag2) => { const info = getInfo7(diag2.file, diag2.start, program); if (info === void 0) return void 0; const { exportName, node, moduleSourceFile } = info; @@ -162025,24 +166278,24 @@ function getNodeOfSymbol(symbol) { } // src/services/codefixes/fixIncorrectNamedTupleSyntax.ts -var fixId21 = "fixIncorrectNamedTupleSyntax"; -var errorCodes24 = [ +var fixId22 = "fixIncorrectNamedTupleSyntax"; +var errorCodes25 = [ Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code ]; registerCodeFix({ - errorCodes: errorCodes24, + errorCodes: errorCodes25, getCodeActions: function getCodeActionsToFixIncorrectNamedTupleSyntax(context) { const { sourceFile, span } = context; const namedTupleMember = getNamedTupleMember(sourceFile, span.start); const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange17(t, sourceFile, namedTupleMember)); - return [createCodeFixAction(fixId21, changes, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels, fixId21, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels)]; + return [createCodeFixAction(fixId22, changes, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels, fixId22, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels)]; }, - fixIds: [fixId21] + fixIds: [fixId22] }); function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 203 /* NamedTupleMember */); } function doChange17(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -162051,10 +166304,10 @@ function doChange17(changes, sourceFile, namedTupleMember) { let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { - if (unwrappedType.kind === 190 /* OptionalType */) { + while (unwrappedType.kind === 191 /* OptionalType */ || unwrappedType.kind === 192 /* RestType */ || unwrappedType.kind === 197 /* ParenthesizedType */) { + if (unwrappedType.kind === 191 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 191 /* RestType */) { + } else if (unwrappedType.kind === 192 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -162073,8 +166326,8 @@ function doChange17(changes, sourceFile, namedTupleMember) { } // src/services/codefixes/fixSpelling.ts -var fixId22 = "fixSpelling"; -var errorCodes25 = [ +var fixId23 = "fixSpelling"; +var errorCodes26 = [ Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, Diagnostics.Cannot_find_name_0_Did_you_mean_1.code, @@ -162091,7 +166344,7 @@ var errorCodes25 = [ Diagnostics.Type_0_is_not_assignable_to_type_1.code ]; registerCodeFix({ - errorCodes: errorCodes25, + errorCodes: errorCodes26, getCodeActions(context) { const { sourceFile, errorCode } = context; const info = getInfo8(sourceFile, context.span.start, context, errorCode); @@ -162099,10 +166352,10 @@ registerCodeFix({ const { node, suggestedSymbol } = info; const target = getEmitScriptTarget(context.host.getCompilationSettings()); const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange18(t, sourceFile, node, suggestedSymbol, target)); - return [createCodeFixAction("spelling", changes, [Diagnostics.Change_spelling_to_0, symbolName(suggestedSymbol)], fixId22, Diagnostics.Fix_all_detected_spelling_errors)]; + return [createCodeFixAction("spelling", changes, [Diagnostics.Change_spelling_to_0, symbolName(suggestedSymbol)], fixId23, Diagnostics.Fix_all_detected_spelling_errors)]; }, - fixIds: [fixId22], - getAllCodeActions: (context) => codeFixAll(context, errorCodes25, (changes, diag2) => { + fixIds: [fixId23], + getAllCodeActions: (context) => codeFixAll(context, errorCodes26, (changes, diag2) => { const info = getInfo8(diag2.file, diag2.start, context, diag2.code); const target = getEmitScriptTarget(context.host.getCompilationSettings()); if (info) doChange18(changes, context.sourceFile, info.node, info.suggestedSymbol, target); @@ -162191,17 +166444,17 @@ function getResolvedSourceFileFromImportDeclaration(context, importDeclaration, } // src/services/codefixes/returnValueCorrect.ts -var fixId23 = "returnValueCorrect"; +var fixId24 = "returnValueCorrect"; var fixIdAddReturnStatement = "fixAddReturnStatement"; var fixRemoveBracesFromArrowFunctionBody = "fixRemoveBracesFromArrowFunctionBody"; var fixIdWrapTheBlockWithParen = "fixWrapTheBlockWithParen"; -var errorCodes26 = [ +var errorCodes27 = [ Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code, Diagnostics.Type_0_is_not_assignable_to_type_1.code, Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code ]; registerCodeFix({ - errorCodes: errorCodes26, + errorCodes: errorCodes27, fixIds: [fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen], getCodeActions: function getCodeActionsToCorrectReturnValue(context) { const { program, sourceFile, span: { start }, errorCode } = context; @@ -162216,7 +166469,7 @@ registerCodeFix({ return [getActionForfixWrapTheBlockWithParen(context, info.declaration, info.expression)]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes26, (changes, diag2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes27, (changes, diag2) => { const info = getInfo9(context.program.getTypeChecker(), diag2.file, diag2.start, diag2.code); if (!info) return void 0; switch (context.fixId) { @@ -162379,19 +166632,19 @@ function getInfo9(checker, sourceFile, position, errorCode) { } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 303 /* PropertyAssignment */: + case 261 /* VariableDeclaration */: + case 170 /* Parameter */: + case 209 /* BindingElement */: + case 173 /* PropertyDeclaration */: + case 304 /* PropertyAssignment */: return declaration.initializer; - case 291 /* JsxAttribute */: + case 292 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 304 /* ShorthandPropertyAssignment */: - case 171 /* PropertySignature */: - case 306 /* EnumMember */: - case 348 /* JSDocPropertyTag */: - case 341 /* JSDocParameterTag */: + case 305 /* ShorthandPropertyAssignment */: + case 172 /* PropertySignature */: + case 307 /* EnumMember */: + case 349 /* JSDocPropertyTag */: + case 342 /* JSDocParameterTag */: return void 0; } } @@ -162415,7 +166668,7 @@ function wrapBlockWithParen(changes, sourceFile, declaration, expression) { } function getActionForfixAddReturnStatement(context, expression, statement) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addReturnStatement(t, context.sourceFile, expression, statement)); - return createCodeFixAction(fixId23, changes, Diagnostics.Add_a_return_statement, fixIdAddReturnStatement, Diagnostics.Add_all_missing_return_statement); + return createCodeFixAction(fixId24, changes, Diagnostics.Add_a_return_statement, fixIdAddReturnStatement, Diagnostics.Add_all_missing_return_statement); } function getActionForFixRemoveBracesFromArrowFunctionBody(context, declaration, expression, commentSource) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => removeBlockBodyBrace( @@ -162427,11 +166680,11 @@ function getActionForFixRemoveBracesFromArrowFunctionBody(context, declaration, /*withParen*/ false )); - return createCodeFixAction(fixId23, changes, Diagnostics.Remove_braces_from_arrow_function_body, fixRemoveBracesFromArrowFunctionBody, Diagnostics.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues); + return createCodeFixAction(fixId24, changes, Diagnostics.Remove_braces_from_arrow_function_body, fixRemoveBracesFromArrowFunctionBody, Diagnostics.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues); } function getActionForfixWrapTheBlockWithParen(context, declaration, expression) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => wrapBlockWithParen(t, context.sourceFile, declaration, expression)); - return createCodeFixAction(fixId23, changes, Diagnostics.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal, fixIdWrapTheBlockWithParen, Diagnostics.Wrap_all_object_literal_with_parentheses); + return createCodeFixAction(fixId24, changes, Diagnostics.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal, fixIdWrapTheBlockWithParen, Diagnostics.Wrap_all_object_literal_with_parentheses); } // src/services/codefixes/fixAddMissingMember.ts @@ -162439,17 +166692,18 @@ var fixMissingMember = "fixMissingMember"; var fixMissingProperties = "fixMissingProperties"; var fixMissingAttributes = "fixMissingAttributes"; var fixMissingFunctionDeclaration = "fixMissingFunctionDeclaration"; -var errorCodes27 = [ +var errorCodes28 = [ Diagnostics.Property_0_does_not_exist_on_type_1.code, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2.code, Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code, Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code, Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, - Diagnostics.Cannot_find_name_0.code + Diagnostics.Cannot_find_name_0.code, + Diagnostics.Type_0_does_not_satisfy_the_expected_type_1.code ]; registerCodeFix({ - errorCodes: errorCodes27, + errorCodes: errorCodes28, getCodeActions(context) { const typeChecker = context.program.getTypeChecker(); const info = getInfo10(context.sourceFile, context.span.start, context.errorCode, typeChecker, context.program); @@ -162476,21 +166730,21 @@ registerCodeFix({ }, fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes], getAllCodeActions: (context) => { - const { program, fixId: fixId55 } = context; + const { program, fixId: fixId56 } = context; const checker = program.getTypeChecker(); - const seen = /* @__PURE__ */ new Map(); + const seen = /* @__PURE__ */ new Set(); const typeDeclToMembers = /* @__PURE__ */ new Map(); return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes27, (diag2) => { + eachDiagnostic(context, errorCodes28, (diag2) => { const info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program); - if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 /* ObjectLiteral */ ? info.identifier : info.token.text))) { - return; - } - if (fixId55 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) { + if (info === void 0) return; + const nodeId = getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 /* ObjectLiteral */ ? info.identifier || getNodeId(info.token) : info.token.text); + if (!addToSeen(seen, nodeId)) return; + if (fixId56 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) { addFunctionDeclaration(changes, context, info); - } else if (fixId55 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) { + } else if (fixId56 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) { addObjectLiteralProperties(changes, context, info); - } else if (fixId55 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) { + } else if (fixId56 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) { addJsxAttributes(changes, context, info); } else { if (info.kind === 1 /* Enum */) { @@ -162529,7 +166783,7 @@ registerCodeFix({ } }); function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { - var _a; + var _a, _b; const token = getTokenAtPosition(sourceFile, tokenPos); const parent2 = token.parent; if (errorCode === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) { @@ -162542,7 +166796,7 @@ function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { if (!(param && isParameter(param) && isIdentifier(param.name))) return void 0; const properties = arrayFrom(checker.getUnmatchedProperties( checker.getTypeAtLocation(parent2), - checker.getParameterType(signature, argIndex), + checker.getParameterType(signature, argIndex).getNonNullableType(), /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ @@ -162551,23 +166805,25 @@ function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { if (!length(properties)) return void 0; return { kind: 3 /* ObjectLiteral */, token: param.name, identifier: param.name.text, properties, parentDeclaration: parent2 }; } - if (token.kind === 19 /* OpenBraceToken */ && isObjectLiteralExpression(parent2)) { - const targetType = checker.getContextualType(parent2) || checker.getTypeAtLocation(parent2); - const properties = arrayFrom(checker.getUnmatchedProperties( - checker.getTypeAtLocation(parent2), - targetType, - /*requireOptionalProperties*/ - false, - /*matchDiscriminantProperties*/ - false - )); - if (!length(properties)) return void 0; - const identifier = ""; - return { kind: 3 /* ObjectLiteral */, token: parent2, identifier, properties, parentDeclaration: parent2 }; + if (token.kind === 19 /* OpenBraceToken */ || isSatisfiesExpression(parent2) || isReturnStatement(parent2)) { + const expression = (isSatisfiesExpression(parent2) || isReturnStatement(parent2)) && parent2.expression ? parent2.expression : parent2; + if (isObjectLiteralExpression(expression)) { + const targetType = isSatisfiesExpression(parent2) ? checker.getTypeFromTypeNode(parent2.type) : checker.getContextualType(expression) || checker.getTypeAtLocation(expression); + const properties = arrayFrom(checker.getUnmatchedProperties( + checker.getTypeAtLocation(parent2), + targetType.getNonNullableType(), + /*requireOptionalProperties*/ + false, + /*matchDiscriminantProperties*/ + false + )); + if (!length(properties)) return void 0; + return { kind: 3 /* ObjectLiteral */, token: parent2, identifier: void 0, properties, parentDeclaration: expression, indentation: isReturnStatement(expression.parent) || isYieldExpression(expression.parent) ? 0 : void 0 }; + } } if (!isMemberName(token)) return void 0; if (isIdentifier(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression(parent2.initializer)) { - const targetType = checker.getContextualType(token) || checker.getTypeAtLocation(token); + const targetType = (_a = checker.getContextualType(token) || checker.getTypeAtLocation(token)) == null ? void 0 : _a.getNonNullableType(); const properties = arrayFrom(checker.getUnmatchedProperties( checker.getTypeAtLocation(parent2.initializer), targetType, @@ -162586,7 +166842,7 @@ function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { return { kind: 4 /* JsxAttributes */, token, attributes, parentDeclaration: token.parent }; } if (isIdentifier(token)) { - const type = (_a = checker.getContextualType(token)) == null ? void 0 : _a.getNonNullableType(); + const type = (_b = checker.getContextualType(token)) == null ? void 0 : _b.getNonNullableType(); if (type && getObjectFlags(type) & 16 /* Anonymous */) { const signature = firstOrUndefined(checker.getSignaturesOfType(type, 0 /* Call */)); if (signature === void 0) return void 0; @@ -162604,7 +166860,7 @@ function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { const moduleDeclaration = find(symbol.declarations, isModuleDeclaration); const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile(); if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleDeclaration }; + return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleDeclarationSourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleDeclaration }; } const moduleSourceFile = find(symbol.declarations, isSourceFile); if (sourceFile.commonJsModuleIndicator) return void 0; @@ -162647,7 +166903,7 @@ function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclar function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 231 /* ClassExpression */) { + if (classDeclaration.kind === 232 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -162700,18 +166956,19 @@ function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDecla } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 226 /* BinaryExpression */) { + if (token.parent.parent.kind === 227 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); - typeNode = checker.typeToTypeNode(widenedType, node, 1 /* NoTruncation */); + typeNode = checker.typeToTypeNode(widenedType, node, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */); } else { const contextualType = checker.getContextualType(token.parent); typeNode = contextualType ? checker.typeToTypeNode( contextualType, /*enclosingDeclaration*/ void 0, - 1 /* NoTruncation */ + 1 /* NoTruncation */, + 8 /* AllowUnresolvedNames */ ) : void 0; } return typeNode || factory.createKeywordTypeNode(133 /* AnyKeyword */); @@ -162787,7 +167044,7 @@ function getActionsForMissingMethodDeclaration(context, info) { } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 175 /* MethodDeclaration */ : 174 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -162814,8 +167071,8 @@ function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration } function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(262 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 262 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(263 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 263 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -162906,8 +167163,9 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ } if (type.flags & 1056 /* EnumLike */) { const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol; + const symbol = type.symbol.parent && type.symbol.parent.flags & 256 /* RegularEnum */ ? type.symbol.parent : type.symbol; const name = checker.symbolToExpression( - type.symbol.parent ? type.symbol.parent : type.symbol, + symbol, 111551 /* Value */, /*enclosingDeclaration*/ void 0, @@ -162962,7 +167220,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ const signature = checker.getSignaturesOfType(type, 0 /* Call */); if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 218 /* FunctionExpression */, + 219 /* FunctionExpression */, context, quotePreference, signature[0], @@ -163033,7 +167291,9 @@ function createPropertyNameFromSymbol(symbol, target, quotePreference, checker) 111551 /* Value */, /*enclosingDeclaration*/ void 0, - 1073741824 /* WriteComputedProps */ + /*flags*/ + void 0, + 1 /* WriteComputedProps */ ); if (prop && isComputedPropertyName(prop)) return prop; } @@ -163054,19 +167314,33 @@ function findScope(node) { } return getSourceFileOfNode(node); } +function getAllSupers(decl, checker) { + const res = []; + while (decl) { + const superElement = getClassExtendsHeritageElement(decl); + const superSymbol = superElement && checker.getSymbolAtLocation(superElement.expression); + if (!superSymbol) break; + const symbol = superSymbol.flags & 2097152 /* Alias */ ? checker.getAliasedSymbol(superSymbol) : superSymbol; + const superDecl = symbol.declarations && find(symbol.declarations, isClassLike); + if (!superDecl) break; + res.push(superDecl); + decl = superDecl; + } + return res; +} // src/services/codefixes/fixAddMissingNewOperator.ts -var fixId24 = "addMissingNewOperator"; -var errorCodes28 = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code]; +var fixId25 = "addMissingNewOperator"; +var errorCodes29 = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code]; registerCodeFix({ - errorCodes: errorCodes28, + errorCodes: errorCodes29, getCodeActions(context) { const { sourceFile, span } = context; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingNewOperator(t, sourceFile, span)); - return [createCodeFixAction(fixId24, changes, Diagnostics.Add_missing_new_operator_to_call, fixId24, Diagnostics.Add_missing_new_operator_to_all_calls)]; + return [createCodeFixAction(fixId25, changes, Diagnostics.Add_missing_new_operator_to_call, fixId25, Diagnostics.Add_missing_new_operator_to_all_calls)]; }, - fixIds: [fixId24], - getAllCodeActions: (context) => codeFixAll(context, errorCodes28, (changes, diag2) => addMissingNewOperator(changes, context.sourceFile, diag2)) + fixIds: [fixId25], + getAllCodeActions: (context) => codeFixAll(context, errorCodes29, (changes, diag2) => addMissingNewOperator(changes, context.sourceFile, diag2)) }); function addMissingNewOperator(changes, sourceFile, span) { const call = cast(findAncestorMatchingSpan2(sourceFile, span), isCallExpression); @@ -163085,9 +167359,9 @@ function findAncestorMatchingSpan2(sourceFile, span) { // src/services/codefixes/fixAddMissingParam.ts var addMissingParamFixId = "addMissingParam"; var addOptionalParamFixId = "addOptionalParam"; -var errorCodes29 = [Diagnostics.Expected_0_arguments_but_got_1.code]; +var errorCodes30 = [Diagnostics.Expected_0_arguments_but_got_1.code]; registerCodeFix({ - errorCodes: errorCodes29, + errorCodes: errorCodes30, fixIds: [addMissingParamFixId, addOptionalParamFixId], getCodeActions(context) { const info = getInfo11(context.sourceFile, context.program, context.span.start); @@ -163120,7 +167394,7 @@ registerCodeFix({ } return actions2; }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes29, (changes, diag2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes30, (changes, diag2) => { const info = getInfo11(context.sourceFile, context.program, diag2.start); if (info) { const { declarations, newParameters, newOptionalParameters } = info; @@ -163206,7 +167480,7 @@ function tryGetName2(node) { } } function typeToTypeNode(checker, type, enclosingDeclaration) { - return checker.typeToTypeNode(checker.getWidenedType(type), enclosingDeclaration, 1 /* NoTruncation */) ?? factory.createKeywordTypeNode(159 /* UnknownKeyword */); + return checker.typeToTypeNode(checker.getWidenedType(type), enclosingDeclaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */) ?? factory.createKeywordTypeNode(159 /* UnknownKeyword */); } function doChange19(changes, program, preferences, host, declarations, newParameters) { const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); @@ -163240,10 +167514,10 @@ function doChange19(changes, program, preferences, host, declarations, newParame } function isConvertibleSignatureDeclaration(node) { switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 220 /* ArrowFunction */: return true; default: return false; @@ -163323,17 +167597,19 @@ function getParameterType(importAdder, typeNode, scriptTarget) { var fixName2 = "fixCannotFindModule"; var fixIdInstallTypesPackage = "installTypesPackage"; var errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code; -var errorCodes30 = [ +var errorCannotFindImplicitJsxImport = Diagnostics.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed.code; +var errorCodes31 = [ errorCodeCannotFindModule, - Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code + Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code, + errorCannotFindImplicitJsxImport ]; registerCodeFix({ - errorCodes: errorCodes30, + errorCodes: errorCodes31, getCodeActions: function getCodeActionsToFixNotFoundModule(context) { - const { host, sourceFile, span: { start } } = context; - const packageName = tryGetImportedPackageName(sourceFile, start); + const { host, sourceFile, span: { start }, errorCode } = context; + const packageName = errorCode === errorCannotFindImplicitJsxImport ? getJSXImplicitImportBase(context.program.getCompilerOptions(), sourceFile) : tryGetImportedPackageName(sourceFile, start); if (packageName === void 0) return void 0; - const typesPackageName = getTypesPackageNameToInstall(packageName, host, context.errorCode); + const typesPackageName = getTypesPackageNameToInstall(packageName, host, errorCode); return typesPackageName === void 0 ? [] : [createCodeFixAction( fixName2, /*changes*/ @@ -163346,7 +167622,7 @@ registerCodeFix({ }, fixIds: [fixIdInstallTypesPackage], getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes30, (_changes, diag2, commands) => { + return codeFixAll(context, errorCodes31, (_changes, diag2, commands) => { const packageName = tryGetImportedPackageName(diag2.file, diag2.start); if (packageName === void 0) return void 0; switch (context.fixId) { @@ -163375,11 +167651,11 @@ function tryGetImportedPackageName(sourceFile, pos) { } function getTypesPackageNameToInstall(packageName, host, diagCode) { var _a; - return diagCode === errorCodeCannotFindModule ? ts_JsTyping_exports.nodeCoreModules.has(packageName) ? "@types/node" : void 0 : ((_a = host.isKnownTypesPackageName) == null ? void 0 : _a.call(host, packageName)) ? getTypesPackageName(packageName) : void 0; + return diagCode === errorCodeCannotFindModule ? nodeCoreModules.has(packageName) ? "@types/node" : void 0 : ((_a = host.isKnownTypesPackageName) == null ? void 0 : _a.call(host, packageName)) ? getTypesPackageName(packageName) : void 0; } // src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts -var errorCodes31 = [ +var errorCodes32 = [ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code, @@ -163387,18 +167663,18 @@ var errorCodes31 = [ Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code ]; -var fixId25 = "fixClassDoesntImplementInheritedAbstractMember"; +var fixId26 = "fixClassDoesntImplementInheritedAbstractMember"; registerCodeFix({ - errorCodes: errorCodes31, + errorCodes: errorCodes32, getCodeActions: function getCodeActionsToFixClassNotImplementingInheritedMembers(context) { const { sourceFile, span } = context; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMembers(getClass2(sourceFile, span.start), sourceFile, context, t, context.preferences)); - return changes.length === 0 ? void 0 : [createCodeFixAction(fixId25, changes, Diagnostics.Implement_inherited_abstract_class, fixId25, Diagnostics.Implement_all_inherited_abstract_classes)]; + return changes.length === 0 ? void 0 : [createCodeFixAction(fixId26, changes, Diagnostics.Implement_inherited_abstract_class, fixId26, Diagnostics.Implement_all_inherited_abstract_classes)]; }, - fixIds: [fixId25], + fixIds: [fixId26], getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) { - const seenClassDeclarations = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes31, (changes, diag2) => { + const seenClassDeclarations = /* @__PURE__ */ new Set(); + return codeFixAll(context, errorCodes32, (changes, diag2) => { const classDeclaration = getClass2(diag2.file, diag2.start); if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) { addMissingMembers(classDeclaration, context.sourceFile, context, changes, context.preferences); @@ -163425,23 +167701,23 @@ function symbolPointsToNonPrivateAndAbstractMember(symbol) { } // src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts -var fixId26 = "classSuperMustPrecedeThisAccess"; -var errorCodes32 = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code]; +var fixId27 = "classSuperMustPrecedeThisAccess"; +var errorCodes33 = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code]; registerCodeFix({ - errorCodes: errorCodes32, + errorCodes: errorCodes33, getCodeActions(context) { const { sourceFile, span } = context; const nodes = getNodes(sourceFile, span.start); if (!nodes) return void 0; const { constructor, superCall } = nodes; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange20(t, sourceFile, constructor, superCall)); - return [createCodeFixAction(fixId26, changes, Diagnostics.Make_super_call_the_first_statement_in_the_constructor, fixId26, Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]; + return [createCodeFixAction(fixId27, changes, Diagnostics.Make_super_call_the_first_statement_in_the_constructor, fixId27, Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]; }, - fixIds: [fixId26], + fixIds: [fixId27], getAllCodeActions(context) { const { sourceFile } = context; - const seenClasses = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes32, (changes, diag2) => { + const seenClasses = /* @__PURE__ */ new Set(); + return codeFixAll(context, errorCodes33, (changes, diag2) => { const nodes = getNodes(diag2.file, diag2.start); if (!nodes) return; const { constructor, superCall } = nodes; @@ -163467,18 +167743,18 @@ function findSuperCall(n) { } // src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts -var fixId27 = "constructorForDerivedNeedSuperCall"; -var errorCodes33 = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code]; +var fixId28 = "constructorForDerivedNeedSuperCall"; +var errorCodes34 = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code]; registerCodeFix({ - errorCodes: errorCodes33, + errorCodes: errorCodes34, getCodeActions(context) { const { sourceFile, span } = context; const ctr = getNode(sourceFile, span.start); const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange21(t, sourceFile, ctr)); - return [createCodeFixAction(fixId27, changes, Diagnostics.Add_missing_super_call, fixId27, Diagnostics.Add_all_missing_super_calls)]; + return [createCodeFixAction(fixId28, changes, Diagnostics.Add_missing_super_call, fixId28, Diagnostics.Add_all_missing_super_calls)]; }, - fixIds: [fixId27], - getAllCodeActions: (context) => codeFixAll(context, errorCodes33, (changes, diag2) => doChange21(changes, context.sourceFile, getNode(diag2.file, diag2.start))) + fixIds: [fixId28], + getAllCodeActions: (context) => codeFixAll(context, errorCodes34, (changes, diag2) => doChange21(changes, context.sourceFile, getNode(diag2.file, diag2.start))) }); function getNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); @@ -163498,9 +167774,9 @@ function doChange21(changes, sourceFile, ctr) { // src/services/codefixes/fixEnableJsxFlag.ts var fixID = "fixEnableJsxFlag"; -var errorCodes34 = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code]; +var errorCodes35 = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code]; registerCodeFix({ - errorCodes: errorCodes34, + errorCodes: errorCodes35, getCodeActions: function getCodeActionsToFixEnableJsxFlag(context) { const { configFile } = context.program.getCompilerOptions(); if (configFile === void 0) { @@ -163512,7 +167788,7 @@ registerCodeFix({ ]; }, fixIds: [fixID], - getAllCodeActions: (context) => codeFixAll(context, errorCodes34, (changes) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes35, (changes) => { const { configFile } = context.program.getCompilerOptions(); if (configFile === void 0) { return void 0; @@ -163525,23 +167801,23 @@ function doChange22(changeTracker, configFile) { } // src/services/codefixes/fixNaNEquality.ts -var fixId28 = "fixNaNEquality"; -var errorCodes35 = [ +var fixId29 = "fixNaNEquality"; +var errorCodes36 = [ Diagnostics.This_condition_will_always_return_0.code ]; registerCodeFix({ - errorCodes: errorCodes35, + errorCodes: errorCodes36, getCodeActions(context) { const { sourceFile, span, program } = context; const info = getInfo12(program, sourceFile, span); if (info === void 0) return; const { suggestion, expression, arg } = info; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange23(t, sourceFile, arg, expression)); - return [createCodeFixAction(fixId28, changes, [Diagnostics.Use_0, suggestion], fixId28, Diagnostics.Use_Number_isNaN_in_all_conditions)]; + return [createCodeFixAction(fixId29, changes, [Diagnostics.Use_0, suggestion], fixId29, Diagnostics.Use_Number_isNaN_in_all_conditions)]; }, - fixIds: [fixId28], + fixIds: [fixId29], getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes35, (changes, diag2) => { + return codeFixAll(context, errorCodes36, (changes, diag2) => { const info = getInfo12(context.program, diag2.file, createTextSpan(diag2.start, diag2.length)); if (info) { doChange23(changes, diag2.file, info.arg, info.expression); @@ -163583,9 +167859,9 @@ function getSuggestion(messageText) { // src/services/codefixes/fixModuleAndTargetOptions.ts registerCodeFix({ errorCodes: [ - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, - Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code + Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code ], getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { const compilerOptions = context.program.getCompilerOptions(); @@ -163621,20 +167897,20 @@ registerCodeFix({ }); // src/services/codefixes/fixPropertyAssignment.ts -var fixId29 = "fixPropertyAssignment"; -var errorCodes36 = [ +var fixId30 = "fixPropertyAssignment"; +var errorCodes37 = [ Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code ]; registerCodeFix({ - errorCodes: errorCodes36, - fixIds: [fixId29], + errorCodes: errorCodes37, + fixIds: [fixId30], getCodeActions(context) { const { sourceFile, span } = context; const property = getProperty2(sourceFile, span.start); const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange24(t, context.sourceFile, property)); - return [createCodeFixAction(fixId29, changes, [Diagnostics.Change_0_to_1, "=", ":"], fixId29, [Diagnostics.Switch_each_misused_0_to_1, "=", ":"])]; + return [createCodeFixAction(fixId30, changes, [Diagnostics.Change_0_to_1, "=", ":"], fixId30, [Diagnostics.Switch_each_misused_0_to_1, "=", ":"])]; }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes36, (changes, diag2) => doChange24(changes, diag2.file, getProperty2(diag2.file, diag2.start))) + getAllCodeActions: (context) => codeFixAll(context, errorCodes37, (changes, diag2) => doChange24(changes, diag2.file, getProperty2(diag2.file, diag2.start))) }); function doChange24(changes, sourceFile, node) { changes.replaceNode(sourceFile, node, factory.createPropertyAssignment(node.name, node.objectAssignmentInitializer)); @@ -163644,20 +167920,20 @@ function getProperty2(sourceFile, pos) { } // src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts -var fixId30 = "extendsInterfaceBecomesImplements"; -var errorCodes37 = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code]; +var fixId31 = "extendsInterfaceBecomesImplements"; +var errorCodes38 = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code]; registerCodeFix({ - errorCodes: errorCodes37, + errorCodes: errorCodes38, getCodeActions(context) { const { sourceFile } = context; const nodes = getNodes2(sourceFile, context.span.start); if (!nodes) return void 0; const { extendsToken, heritageClauses } = nodes; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChanges2(t, sourceFile, extendsToken, heritageClauses)); - return [createCodeFixAction(fixId30, changes, Diagnostics.Change_extends_to_implements, fixId30, Diagnostics.Change_all_extended_interfaces_to_implements)]; + return [createCodeFixAction(fixId31, changes, Diagnostics.Change_extends_to_implements, fixId31, Diagnostics.Change_all_extended_interfaces_to_implements)]; }, - fixIds: [fixId30], - getAllCodeActions: (context) => codeFixAll(context, errorCodes37, (changes, diag2) => { + fixIds: [fixId31], + getAllCodeActions: (context) => codeFixAll(context, errorCodes38, (changes, diag2) => { const nodes = getNodes2(diag2.file, diag2.start); if (nodes) doChanges2(changes, diag2.file, nodes.extendsToken, nodes.heritageClauses); }) @@ -163684,15 +167960,15 @@ function doChanges2(changes, sourceFile, extendsToken, heritageClauses) { } // src/services/codefixes/fixForgottenThisPropertyAccess.ts -var fixId31 = "forgottenThisPropertyAccess"; +var fixId32 = "forgottenThisPropertyAccess"; var didYouMeanStaticMemberCode = Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code; -var errorCodes38 = [ +var errorCodes39 = [ Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, didYouMeanStaticMemberCode ]; registerCodeFix({ - errorCodes: errorCodes38, + errorCodes: errorCodes39, getCodeActions(context) { const { sourceFile } = context; const info = getInfo13(sourceFile, context.span.start, context.errorCode); @@ -163700,10 +167976,10 @@ registerCodeFix({ return void 0; } const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange25(t, sourceFile, info)); - return [createCodeFixAction(fixId31, changes, [Diagnostics.Add_0_to_unresolved_variable, info.className || "this"], fixId31, Diagnostics.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]; + return [createCodeFixAction(fixId32, changes, [Diagnostics.Add_0_to_unresolved_variable, info.className || "this"], fixId32, Diagnostics.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]; }, - fixIds: [fixId31], - getAllCodeActions: (context) => codeFixAll(context, errorCodes38, (changes, diag2) => { + fixIds: [fixId32], + getAllCodeActions: (context) => codeFixAll(context, errorCodes39, (changes, diag2) => { const info = getInfo13(diag2.file, diag2.start, diag2.code); if (info) doChange25(changes, context.sourceFile, info); }) @@ -163722,12 +167998,12 @@ function doChange25(changes, sourceFile, { node, className }) { // src/services/codefixes/fixInvalidJsxCharacters.ts var fixIdExpression = "fixInvalidJsxCharacters_expression"; var fixIdHtmlEntity = "fixInvalidJsxCharacters_htmlEntity"; -var errorCodes39 = [ +var errorCodes40 = [ Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code ]; registerCodeFix({ - errorCodes: errorCodes39, + errorCodes: errorCodes40, fixIds: [fixIdExpression, fixIdHtmlEntity], getCodeActions(context) { const { sourceFile, preferences, span } = context; @@ -163753,7 +168029,7 @@ registerCodeFix({ ]; }, getAllCodeActions(context) { - return codeFixAll(context, errorCodes39, (changes, diagnostic) => doChange26(changes, context.preferences, diagnostic.file, diagnostic.start, context.fixId === fixIdHtmlEntity)); + return codeFixAll(context, errorCodes40, (changes, diagnostic) => doChange26(changes, context.preferences, diagnostic.file, diagnostic.start, context.fixId === fixIdHtmlEntity)); } }); var htmlEntity = { @@ -163775,12 +168051,12 @@ function doChange26(changes, preferences, sourceFile, start, useHtmlEntity) { // src/services/codefixes/fixUnmatchedParameter.ts var deleteUnmatchedParameter = "deleteUnmatchedParameter"; var renameUnmatchedParameter = "renameUnmatchedParameter"; -var errorCodes40 = [ +var errorCodes41 = [ Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code ]; registerCodeFix({ fixIds: [deleteUnmatchedParameter, renameUnmatchedParameter], - errorCodes: errorCodes40, + errorCodes: errorCodes41, getCodeActions: function getCodeActionsToFixUnmatchedParameter(context) { const { sourceFile, span } = context; const actions2 = []; @@ -163795,7 +168071,7 @@ registerCodeFix({ getAllCodeActions: function getAllCodeActionsToFixUnmatchedParameter(context) { const tagsToSignature = /* @__PURE__ */ new Map(); return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes40, ({ file, start }) => { + eachDiagnostic(context, errorCodes41, ({ file, start }) => { const info = getInfo14(file, start); if (info) { tagsToSignature.set(info.signature, append(tagsToSignature.get(info.signature), info.jsDocParameterTag)); @@ -163858,39 +168134,39 @@ function getInfo14(sourceFile, pos) { } // src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts -var fixId32 = "fixUnreferenceableDecoratorMetadata"; -var errorCodes41 = [Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code]; +var fixId33 = "fixUnreferenceableDecoratorMetadata"; +var errorCodes42 = [Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code]; registerCodeFix({ - errorCodes: errorCodes41, + errorCodes: errorCodes42, getCodeActions: (context) => { const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 276 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 277 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); + actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId33, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); } if (typeOnlyChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Use_import_type)); + actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId33, typeOnlyChanges, Diagnostics.Use_import_type)); } return actions2; }, - fixIds: [fixId32] + fixIds: [fixId33] }); function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) return; + if (!identifier || identifier.parent.kind !== 184 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 271 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 272 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 273 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 274 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -163913,7 +168189,7 @@ var fixIdPrefix = "unusedIdentifier_prefix"; var fixIdDelete = "unusedIdentifier_delete"; var fixIdDeleteImports = "unusedIdentifier_deleteImports"; var fixIdInfer = "unusedIdentifier_infer"; -var errorCodes42 = [ +var errorCodes43 = [ Diagnostics._0_is_declared_but_its_value_is_never_read.code, Diagnostics._0_is_declared_but_never_used.code, Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code, @@ -163923,7 +168199,7 @@ var errorCodes42 = [ Diagnostics.All_type_parameters_are_unused.code ]; registerCodeFix({ - errorCodes: errorCodes42, + errorCodes: errorCodes43, getCodeActions(context) { const { errorCode, sourceFile, program, cancellationToken } = context; const checker = program.getTypeChecker(); @@ -164012,7 +168288,7 @@ registerCodeFix({ const { sourceFile, program, cancellationToken } = context; const checker = program.getTypeChecker(); const sourceFiles = program.getSourceFiles(); - return codeFixAll(context, errorCodes42, (changes, diag2) => { + return codeFixAll(context, errorCodes43, (changes, diag2) => { const token = getTokenAtPosition(sourceFile, diag2.start); switch (context.fixId) { case fixIdPrefix: @@ -164054,6 +168330,8 @@ registerCodeFix({ break; } else if (canDeleteEntireVariableStatement(sourceFile, token)) { deleteEntireVariableStatement(changes, sourceFile, token.parent); + } else if (isIdentifier(token) && isFunctionDeclaration(token.parent)) { + deleteFunctionLikeDeclaration(changes, sourceFile, token.parent); } else { tryDeleteDeclaration( sourceFile, @@ -164090,7 +168368,7 @@ function deleteTypeParameters(changes, sourceFile, token) { changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 276 /* ImportSpecifier */ || token.parent.kind === 273 /* ImportClause */); + return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 277 /* ImportSpecifier */ || token.parent.kind === 274 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 102 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -164099,7 +168377,7 @@ function canDeleteEntireVariableStatement(sourceFile, token) { return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 243 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 244 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -164140,14 +168418,14 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { } function canPrefix(token) { switch (token.parent.kind) { - case 169 /* Parameter */: - case 168 /* TypeParameter */: + case 170 /* Parameter */: + case 169 /* TypeParameter */: return true; - case 260 /* VariableDeclaration */: { + case 261 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 250 /* ForInStatement */: return true; } } @@ -164195,8 +168473,8 @@ function isNotProvidedArguments(parameter, checker, sourceFiles) { function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -164213,18 +168491,18 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program } } return true; - case 262 /* FunctionDeclaration */: { + case 263 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return false; - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -164252,18 +168530,18 @@ function deleteFunctionLikeDeclaration(changes, sourceFile, node) { } // src/services/codefixes/fixUnreachableCode.ts -var fixId33 = "fixUnreachableCode"; -var errorCodes43 = [Diagnostics.Unreachable_code_detected.code]; +var fixId34 = "fixUnreachableCode"; +var errorCodes44 = [Diagnostics.Unreachable_code_detected.code]; registerCodeFix({ - errorCodes: errorCodes43, + errorCodes: errorCodes44, getCodeActions(context) { const syntacticDiagnostics = context.program.getSyntacticDiagnostics(context.sourceFile, context.cancellationToken); if (syntacticDiagnostics.length) return; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange27(t, context.sourceFile, context.span.start, context.span.length, context.errorCode)); - return [createCodeFixAction(fixId33, changes, Diagnostics.Remove_unreachable_code, fixId33, Diagnostics.Remove_all_unreachable_code)]; + return [createCodeFixAction(fixId34, changes, Diagnostics.Remove_unreachable_code, fixId34, Diagnostics.Remove_all_unreachable_code)]; }, - fixIds: [fixId33], - getAllCodeActions: (context) => codeFixAll(context, errorCodes43, (changes, diag2) => doChange27(changes, diag2.file, diag2.start, diag2.length, diag2.code)) + fixIds: [fixId34], + getAllCodeActions: (context) => codeFixAll(context, errorCodes44, (changes, diag2) => doChange27(changes, diag2.file, diag2.start, diag2.length, diag2.code)) }); function doChange27(changes, sourceFile, start, length2, errorCode) { const token = getTokenAtPosition(sourceFile, start); @@ -164281,7 +168559,7 @@ function doChange27(changes, sourceFile, start, length2, errorCode) { const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 245 /* IfStatement */: + case 246 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -164290,8 +168568,9 @@ function doChange27(changes, sourceFile, start, length2, errorCode) { } return; } - case 247 /* WhileStatement */: - case 248 /* ForStatement */: + // falls through + case 248 /* WhileStatement */: + case 249 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -164314,16 +168593,16 @@ function lastWhere(a, pred) { } // src/services/codefixes/fixUnusedLabel.ts -var fixId34 = "fixUnusedLabel"; -var errorCodes44 = [Diagnostics.Unused_label.code]; +var fixId35 = "fixUnusedLabel"; +var errorCodes45 = [Diagnostics.Unused_label.code]; registerCodeFix({ - errorCodes: errorCodes44, + errorCodes: errorCodes45, getCodeActions(context) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange28(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(fixId34, changes, Diagnostics.Remove_unused_label, fixId34, Diagnostics.Remove_all_unused_labels)]; + return [createCodeFixAction(fixId35, changes, Diagnostics.Remove_unused_label, fixId35, Diagnostics.Remove_all_unused_labels)]; }, - fixIds: [fixId34], - getAllCodeActions: (context) => codeFixAll(context, errorCodes44, (changes, diag2) => doChange28(changes, diag2.file, diag2.start)) + fixIds: [fixId35], + getAllCodeActions: (context) => codeFixAll(context, errorCodes45, (changes, diag2) => doChange28(changes, diag2.file, diag2.start)) }); function doChange28(changes, sourceFile, start) { const token = getTokenAtPosition(sourceFile, start); @@ -164342,13 +168621,13 @@ function doChange28(changes, sourceFile, start) { // src/services/codefixes/fixJSDocTypes.ts var fixIdPlain = "fixJSDocTypes_plain"; var fixIdNullable = "fixJSDocTypes_nullable"; -var errorCodes45 = [ +var errorCodes46 = [ Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments.code, Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code, Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code ]; registerCodeFix({ - errorCodes: errorCodes45, + errorCodes: errorCodes46, getCodeActions(context) { const { sourceFile } = context; const checker = context.program.getTypeChecker(); @@ -164357,24 +168636,24 @@ registerCodeFix({ const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 314 /* JSDocNullableType */) { + if (typeNode.kind === 315 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; - function fix(type2, fixId55, fixAllDescription) { + function fix(type2, fixId56, fixAllDescription) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange29(t, sourceFile, typeNode, type2, checker)); - return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId55, fixAllDescription); + return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId56, fixAllDescription); } }, fixIds: [fixIdPlain, fixIdNullable], getAllCodeActions(context) { - const { fixId: fixId55, program, sourceFile } = context; + const { fixId: fixId56, program, sourceFile } = context; const checker = program.getTypeChecker(); - return codeFixAll(context, errorCodes45, (changes, err) => { + return codeFixAll(context, errorCodes46, (changes, err) => { const info = getInfo15(err.file, err.start, checker); if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId55 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 315 /* JSDocNullableType */ && fixId56 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange29(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -164395,22 +168674,22 @@ function getInfo15(sourceFile, pos, checker) { } function isTypeContainer(node) { switch (node.kind) { - case 234 /* AsExpression */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 262 /* FunctionDeclaration */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 178 /* SetAccessor */: - case 265 /* TypeAliasDeclaration */: - case 216 /* TypeAssertionExpression */: - case 260 /* VariableDeclaration */: + case 235 /* AsExpression */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 263 /* FunctionDeclaration */: + case 178 /* GetAccessor */: + case 182 /* IndexSignature */: + case 201 /* MappedType */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 170 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 179 /* SetAccessor */: + case 266 /* TypeAliasDeclaration */: + case 217 /* TypeAssertionExpression */: + case 261 /* VariableDeclaration */: return true; default: return false; @@ -164430,21 +168709,21 @@ function getType(checker, node) { } // src/services/codefixes/fixMissingCallParentheses.ts -var fixId35 = "fixMissingCallParentheses"; -var errorCodes46 = [ +var fixId36 = "fixMissingCallParentheses"; +var errorCodes47 = [ Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code ]; registerCodeFix({ - errorCodes: errorCodes46, - fixIds: [fixId35], + errorCodes: errorCodes47, + fixIds: [fixId36], getCodeActions(context) { const { sourceFile, span } = context; const callName = getCallName(sourceFile, span.start); if (!callName) return; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange30(t, context.sourceFile, callName)); - return [createCodeFixAction(fixId35, changes, Diagnostics.Add_missing_call_parentheses, fixId35, Diagnostics.Add_all_missing_call_parentheses)]; + return [createCodeFixAction(fixId36, changes, Diagnostics.Add_missing_call_parentheses, fixId36, Diagnostics.Add_all_missing_call_parentheses)]; }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes46, (changes, diag2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes47, (changes, diag2) => { const callName = getCallName(diag2.file, diag2.start); if (callName) doChange30(changes, diag2.file, callName); }) @@ -164468,14 +168747,14 @@ function getCallName(sourceFile, start) { } // src/services/codefixes/fixMissingTypeAnnotationOnExports.ts -var fixId36 = "fixMissingTypeAnnotationOnExports"; +var fixId37 = "fixMissingTypeAnnotationOnExports"; var addAnnotationFix = "add-annotation"; var addInlineTypeAssertion = "add-type-assertion"; var extractExpression = "extract-expression"; -var errorCodes47 = [ +var errorCodes48 = [ Diagnostics.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, Diagnostics.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, - Diagnostics.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, + Diagnostics.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, Diagnostics.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, Diagnostics.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, Diagnostics.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, @@ -164491,28 +168770,29 @@ var errorCodes47 = [ Diagnostics.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code, Diagnostics.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, - Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code, + Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations.code, Diagnostics.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code, Diagnostics.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code ]; var canHaveTypeAnnotation = /* @__PURE__ */ new Set([ - 177 /* GetAccessor */, - 174 /* MethodDeclaration */, - 172 /* PropertyDeclaration */, - 262 /* FunctionDeclaration */, - 218 /* FunctionExpression */, - 219 /* ArrowFunction */, - 260 /* VariableDeclaration */, - 169 /* Parameter */, - 277 /* ExportAssignment */, - 263 /* ClassDeclaration */, - 206 /* ObjectBindingPattern */, - 207 /* ArrayBindingPattern */ + 178 /* GetAccessor */, + 175 /* MethodDeclaration */, + 173 /* PropertyDeclaration */, + 263 /* FunctionDeclaration */, + 219 /* FunctionExpression */, + 220 /* ArrowFunction */, + 261 /* VariableDeclaration */, + 170 /* Parameter */, + 278 /* ExportAssignment */, + 264 /* ClassDeclaration */, + 207 /* ObjectBindingPattern */, + 208 /* ArrayBindingPattern */ ]); -var declarationEmitNodeBuilderFlags2 = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */ | 1073741824 /* WriteComputedProps */; +var declarationEmitNodeBuilderFlags2 = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */; +var declarationEmitInternalNodeBuilderFlags2 = 1 /* WriteComputedProps */; registerCodeFix({ - errorCodes: errorCodes47, - fixIds: [fixId36], + errorCodes: errorCodes48, + fixIds: [fixId37], getCodeActions(context) { const fixes = []; addCodeAction(addAnnotationFix, fixes, context, 0 /* Full */, (f) => f.addTypeAnnotation(context.span)); @@ -164526,7 +168806,7 @@ registerCodeFix({ }, getAllCodeActions: (context) => { const changes = withContext(context, 0 /* Full */, (f) => { - eachDiagnostic(context, errorCodes47, (diag2) => { + eachDiagnostic(context, errorCodes48, (diag2) => { f.addTypeAnnotation(diag2); }); }); @@ -164540,7 +168820,7 @@ function addCodeAction(fixName8, fixes, context, typePrintMode, cb) { fixName8, changes.textChanges, changes.result, - fixId36, + fixId37, Diagnostics.Add_all_missing_type_annotations )); } @@ -164788,22 +169068,22 @@ function withContext(context, typePrintMode, cb) { if (fixedNodes == null ? void 0 : fixedNodes.has(node)) return void 0; fixedNodes == null ? void 0 : fixedNodes.add(node); switch (node.kind) { - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 260 /* VariableDeclaration */: + case 170 /* Parameter */: + case 173 /* PropertyDeclaration */: + case 261 /* VariableDeclaration */: return addTypeToVariableLike(node); - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: return addTypeToSignatureDeclaration(node, sourceFile); - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: return transformExportAssignment(node); - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return transformExtendsClauseWithExpression(node); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: return transformDestructuringPatterns(node); default: throw new Error(`Cannot find a fix for the given node ${node.kind}`); @@ -165102,7 +169382,25 @@ function withContext(context, typePrintMode, cb) { if (typePrintMode === 1 /* Relative */) { return relativeType(node); } - let type = isValueSignatureDeclaration(node) ? tryGetReturnType2(node) : typeChecker.getTypeAtLocation(node); + let type; + if (isValueSignatureDeclaration(node)) { + const signature = typeChecker.getSignatureFromDeclaration(node); + if (signature) { + const typePredicate = typeChecker.getTypePredicateOfSignature(signature); + if (typePredicate) { + if (!typePredicate.type) { + return emptyInferenceResult; + } + return { + typeNode: typePredicateToTypeNode(typePredicate, findAncestor(node, isDeclaration) ?? sourceFile, getFlags(typePredicate.type)), + mutatedTarget: false + }; + } + type = typeChecker.getReturnTypeOfSignature(signature); + } + } else { + type = typeChecker.getTypeAtLocation(node); + } if (!type) { return emptyInferenceResult; } @@ -165116,14 +169414,17 @@ function withContext(context, typePrintMode, cb) { } type = widenedType; } - if (isParameter(node) && typeChecker.requiresAddingImplicitUndefined(node)) { + const enclosingDeclaration = findAncestor(node, isDeclaration) ?? sourceFile; + if (isParameter(node) && typeChecker.requiresAddingImplicitUndefined(node, enclosingDeclaration)) { type = typeChecker.getUnionType([typeChecker.getUndefinedType(), type], 0 /* None */); } - const flags = (isVariableDeclaration(node) || isPropertyDeclaration(node) && hasSyntacticModifier(node, 256 /* Static */ | 8 /* Readonly */)) && type.flags & 8192 /* UniqueESSymbol */ ? 1048576 /* AllowUniqueESSymbolType */ : 0 /* None */; return { - typeNode: typeToTypeNode2(type, findAncestor(node, isDeclaration) ?? sourceFile, flags), + typeNode: typeToTypeNode2(type, enclosingDeclaration, getFlags(type)), mutatedTarget: false }; + function getFlags(type2) { + return (isVariableDeclaration(node) || isPropertyDeclaration(node) && hasSyntacticModifier(node, 256 /* Static */ | 8 /* Readonly */)) && type2.flags & 8192 /* UniqueESSymbol */ ? 1048576 /* AllowUniqueESSymbolType */ : 0 /* None */; + } } function createTypeOfFromEntityNameExpression(node) { return factory.createTypeQueryNode(getSynthesizedDeepClone(node)); @@ -165275,7 +169576,7 @@ function withContext(context, typePrintMode, cb) { } function typeToTypeNode2(type, enclosingDeclaration, flags = 0 /* None */) { let isTruncated = false; - const result2 = typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags2 | flags, { + const minimizedTypeNode = typeToMinimizedReferenceType(typeChecker, type, enclosingDeclaration, declarationEmitNodeBuilderFlags2 | flags, declarationEmitInternalNodeBuilderFlags2, { moduleResolverHost: program, trackSymbol() { return true; @@ -165284,13 +169585,24 @@ function withContext(context, typePrintMode, cb) { isTruncated = true; } }); + if (!minimizedTypeNode) { + return void 0; + } + const result2 = typeNodeToAutoImportableTypeNode(minimizedTypeNode, importAdder, scriptTarget); return isTruncated ? factory.createKeywordTypeNode(133 /* AnyKeyword */) : result2; } - function tryGetReturnType2(node) { - const signature = typeChecker.getSignatureFromDeclaration(node); - if (signature) { - return typeChecker.getReturnTypeOfSignature(signature); - } + function typePredicateToTypeNode(typePredicate, enclosingDeclaration, flags = 0 /* None */) { + let isTruncated = false; + const result2 = typePredicateToAutoImportableTypeNode(typeChecker, importAdder, typePredicate, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags2 | flags, declarationEmitInternalNodeBuilderFlags2, { + moduleResolverHost: program, + trackSymbol() { + return true; + }, + reportTruncationError() { + isTruncated = true; + } + }); + return isTruncated ? factory.createKeywordTypeNode(133 /* AnyKeyword */) : result2; } function addTypeToVariableLike(decl) { const { typeNode } = inferType(decl); @@ -165332,26 +169644,26 @@ function withContext(context, typePrintMode, cb) { } // src/services/codefixes/fixAwaitInSyncFunction.ts -var fixId37 = "fixAwaitInSyncFunction"; -var errorCodes48 = [ +var fixId38 = "fixAwaitInSyncFunction"; +var errorCodes49 = [ Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code ]; registerCodeFix({ - errorCodes: errorCodes48, + errorCodes: errorCodes49, getCodeActions(context) { const { sourceFile, span } = context; const nodes = getNodes3(sourceFile, span.start); if (!nodes) return void 0; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange31(t, sourceFile, nodes)); - return [createCodeFixAction(fixId37, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId37, Diagnostics.Add_all_missing_async_modifiers)]; + return [createCodeFixAction(fixId38, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId38, Diagnostics.Add_all_missing_async_modifiers)]; }, - fixIds: [fixId37], + fixIds: [fixId38], getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) { - const seen = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes48, (changes, diag2) => { + const seen = /* @__PURE__ */ new Set(); + return codeFixAll(context, errorCodes49, (changes, diag2) => { const nodes = getNodes3(diag2.file, diag2.start); if (!nodes || !addToSeen(seen, getNodeId(nodes.insertBefore))) return; doChange31(changes, context.sourceFile, nodes); @@ -165374,14 +169686,14 @@ function getNodes3(sourceFile, start) { } let insertBefore; switch (containingFunction.kind) { - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 100 /* FunctionKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 30 /* LessThanToken */ : 21 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -165404,21 +169716,21 @@ function doChange31(changes, sourceFile, { insertBefore, returnType }) { } // src/services/codefixes/fixPropertyOverrideAccessor.ts -var errorCodes49 = [ +var errorCodes50 = [ Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code, Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code ]; -var fixId38 = "fixPropertyOverrideAccessor"; +var fixId39 = "fixPropertyOverrideAccessor"; registerCodeFix({ - errorCodes: errorCodes49, + errorCodes: errorCodes50, getCodeActions(context) { const edits = doChange32(context.sourceFile, context.span.start, context.span.length, context.errorCode, context); if (edits) { - return [createCodeFixAction(fixId38, edits, Diagnostics.Generate_get_and_set_accessors, fixId38, Diagnostics.Generate_get_and_set_accessors_for_all_overriding_properties)]; + return [createCodeFixAction(fixId39, edits, Diagnostics.Generate_get_and_set_accessors, fixId39, Diagnostics.Generate_get_and_set_accessors_for_all_overriding_properties)]; } }, - fixIds: [fixId38], - getAllCodeActions: (context) => codeFixAll(context, errorCodes49, (changes, diag2) => { + fixIds: [fixId39], + getAllCodeActions: (context) => codeFixAll(context, errorCodes50, (changes, diag2) => { const edits = doChange32(diag2.file, diag2.start, diag2.length, diag2.code, context); if (edits) { for (const edit of edits) { @@ -165436,14 +169748,20 @@ function doChange32(file, start, length2, code, context) { } else if (code === Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code) { const checker = context.program.getTypeChecker(); const node = getTokenAtPosition(file, start).parent; + if (isComputedPropertyName(node)) { + return; + } Debug.assert(isAccessor(node), "error span of fixPropertyOverrideAccessor should only be on an accessor"); const containingClass = node.parent; Debug.assert(isClassLike(containingClass), "erroneous accessors should only be inside classes"); - const base = singleOrUndefined(getAllSupers(containingClass, checker)); - if (!base) return []; - const name = unescapeLeadingUnderscores(getTextOfPropertyName(node.name)); - const baseProp = checker.getPropertyOfType(checker.getTypeAtLocation(base), name); - if (!baseProp || !baseProp.valueDeclaration) return []; + const baseTypeNode = getEffectiveBaseTypeNode(containingClass); + if (!baseTypeNode) return; + const expression = skipParentheses(baseTypeNode.expression); + const base = isClassExpression(expression) ? expression.symbol : checker.getSymbolAtLocation(expression); + if (!base) return; + const baseType = checker.getDeclaredTypeOfSymbol(base); + const baseProp = checker.getPropertyOfType(baseType, unescapeLeadingUnderscores(getTextOfPropertyName(node.name))); + if (!baseProp || !baseProp.valueDeclaration) return; startPosition = baseProp.valueDeclaration.pos; endPosition = baseProp.valueDeclaration.end; file = getSourceFileOfNode(baseProp.valueDeclaration); @@ -165454,8 +169772,8 @@ function doChange32(file, start, length2, code, context) { } // src/services/codefixes/inferFromUsage.ts -var fixId39 = "inferFromUsage"; -var errorCodes50 = [ +var fixId40 = "inferFromUsage"; +var errorCodes51 = [ // Variable declarations Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code, // Variable uses @@ -165489,7 +169807,7 @@ var errorCodes50 = [ Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code ]; registerCodeFix({ - errorCodes: errorCodes50, + errorCodes: errorCodes51, getCodeActions(context) { const { sourceFile, program, span: { start }, errorCode, cancellationToken, host, preferences } = context; const token = getTokenAtPosition(sourceFile, start); @@ -165509,13 +169827,13 @@ registerCodeFix({ ); }); const name = declaration && getNameOfDeclaration(declaration); - return !name || changes.length === 0 ? void 0 : [createCodeFixAction(fixId39, changes, [getDiagnostic(errorCode, token), getTextOfNode(name)], fixId39, Diagnostics.Infer_all_types_from_usage)]; + return !name || changes.length === 0 ? void 0 : [createCodeFixAction(fixId40, changes, [getDiagnostic(errorCode, token), getTextOfNode(name)], fixId40, Diagnostics.Infer_all_types_from_usage)]; }, - fixIds: [fixId39], + fixIds: [fixId40], getAllCodeActions(context) { const { sourceFile, program, cancellationToken, host, preferences } = context; const markSeen = nodeSeenTracker(); - return codeFixAll(context, errorCodes50, (changes, err) => { + return codeFixAll(context, errorCodes51, (changes, err) => { doChange33(changes, sourceFile, getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); }); } @@ -165525,6 +169843,7 @@ function getDiagnostic(errorCode, token) { case Diagnostics.Parameter_0_implicitly_has_an_1_type.code: case Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: return isSetAccessorDeclaration(getContainingFunction(token)) ? Diagnostics.Infer_type_of_0_from_usage : Diagnostics.Infer_parameter_types_from_usage; + // TODO: GH#18217 case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: return Diagnostics.Infer_parameter_types_from_usage; @@ -165563,6 +169882,7 @@ function doChange33(changes, sourceFile, token, errorCode, program, cancellation const importAdder = createImportAdder(sourceFile, program, preferences, host); errorCode = mapSuggestionDiagnostic(errorCode); switch (errorCode) { + // Variable and Property declarations case Diagnostics.Member_0_implicitly_has_an_1_type.code: case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: if (isVariableDeclaration(parent2) && markSeen(parent2) || isPropertyDeclaration(parent2) || isPropertySignature(parent2)) { @@ -165603,12 +169923,14 @@ function doChange33(changes, sourceFile, token, errorCode, program, cancellation } let declaration; switch (errorCode) { + // Parameter declarations case Diagnostics.Parameter_0_implicitly_has_an_1_type.code: if (isSetAccessorDeclaration(containingFunction)) { annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); declaration = containingFunction; break; } + // falls through case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: if (markSeen(containingFunction)) { const param = cast(parent2, isParameter); @@ -165616,6 +169938,7 @@ function doChange33(changes, sourceFile, token, errorCode, program, cancellation declaration = param; } break; + // Get Accessor declarations case Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: if (isGetAccessorDeclaration(containingFunction) && isIdentifier(containingFunction.name)) { @@ -165623,12 +169946,14 @@ function doChange33(changes, sourceFile, token, errorCode, program, cancellation declaration = containingFunction; } break; + // Set Accessor declarations case Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: if (isSetAccessorDeclaration(containingFunction)) { annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); declaration = containingFunction; } break; + // Function 'this' case Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: if (ts_textChanges_exports.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); @@ -165707,7 +170032,7 @@ function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclar function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 172 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -165818,17 +170143,17 @@ function inferTypeForParametersFromUsage(func, sourceFile, program, cancellation function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: searchToken = findChildOfKind(containingFunction, 137 /* ConstructorKeyword */, sourceFile); break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -165964,44 +170289,44 @@ function inferTypeFromReferences(program, references, cancellationToken) { node = node.parent; } switch (node.parent.kind) { - case 244 /* ExpressionStatement */: + case 245 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 225 /* PostfixUnaryExpression */: + case 226 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 224 /* PrefixUnaryExpression */: + case 225 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 212 /* ElementAccessExpression */: + case 213 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 260 /* VariableDeclaration */: { + case 261 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -166010,6 +170335,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { break; } } + // falls through default: return inferTypeFromContextualType(node, usage); } @@ -166037,16 +170363,25 @@ function inferTypeFromReferences(program, references, cancellationToken) { } function inferTypeFromBinaryExpression(node, parent2, usage) { switch (parent2.operatorToken.kind) { + // ExponentiationOperator case 43 /* AsteriskAsteriskToken */: + // MultiplicativeOperator + // falls through case 42 /* AsteriskToken */: case 44 /* SlashToken */: case 45 /* PercentToken */: + // ShiftOperator + // falls through case 48 /* LessThanLessThanToken */: case 49 /* GreaterThanGreaterThanToken */: case 50 /* GreaterThanGreaterThanGreaterThanToken */: + // BitwiseOperator + // falls through case 51 /* AmpersandToken */: case 52 /* BarToken */: case 53 /* CaretToken */: + // CompoundAssignmentOperator + // falls through case 66 /* MinusEqualsToken */: case 68 /* AsteriskAsteriskEqualsToken */: case 67 /* AsteriskEqualsToken */: @@ -166058,7 +170393,11 @@ function inferTypeFromReferences(program, references, cancellationToken) { case 71 /* LessThanLessThanEqualsToken */: case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: case 72 /* GreaterThanGreaterThanEqualsToken */: + // AdditiveOperator + // falls through case 41 /* MinusToken */: + // RelationalOperator + // falls through case 30 /* LessThanToken */: case 33 /* LessThanEqualsToken */: case 32 /* GreaterThanToken */: @@ -166084,6 +170423,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { usage.isNumberOrString = true; } break; + // AssignmentOperators case 64 /* EqualsToken */: case 35 /* EqualsEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: @@ -166099,9 +170439,10 @@ function inferTypeFromReferences(program, references, cancellationToken) { usage.isString = true; } break; + // LogicalOperator Or NullishCoalescing case 57 /* BarBarToken */: case 61 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 260 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 261 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -166129,7 +170470,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 213 /* CallExpression */) { + if (parent2.kind === 214 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -166446,13 +170787,13 @@ function inferTypeFromReferences(program, references, cancellationToken) { } // src/services/codefixes/fixReturnTypeInAsyncFunction.ts -var fixId40 = "fixReturnTypeInAsyncFunction"; -var errorCodes51 = [ +var fixId41 = "fixReturnTypeInAsyncFunction"; +var errorCodes52 = [ Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code ]; registerCodeFix({ - errorCodes: errorCodes51, - fixIds: [fixId40], + errorCodes: errorCodes52, + fixIds: [fixId41], getCodeActions: function getCodeActionsToFixReturnTypeInAsyncFunction(context) { const { sourceFile, program, span } = context; const checker = program.getTypeChecker(); @@ -166463,14 +170804,14 @@ registerCodeFix({ const { returnTypeNode, returnType, promisedTypeNode, promisedType } = info; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange34(t, sourceFile, returnTypeNode, promisedTypeNode)); return [createCodeFixAction( - fixId40, + fixId41, changes, [Diagnostics.Replace_0_with_Promise_1, checker.typeToString(returnType), checker.typeToString(promisedType)], - fixId40, + fixId41, Diagnostics.Fix_all_incorrect_return_type_of_an_async_functions )]; }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes51, (changes, diag2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes52, (changes, diag2) => { const info = getInfo16(diag2.file, context.program.getTypeChecker(), diag2.start); if (info) { doChange34(changes, diag2.file, info.returnTypeNode, info.promisedTypeNode); @@ -166506,13 +170847,13 @@ function doChange34(changes, sourceFile, returnTypeNode, promisedTypeNode) { // src/services/codefixes/disableJsDiagnostics.ts var fixName4 = "disableJsDiagnostics"; -var fixId41 = "disableJsDiagnostics"; -var errorCodes52 = mapDefined(Object.keys(Diagnostics), (key) => { +var fixId42 = "disableJsDiagnostics"; +var errorCodes53 = mapDefined(Object.keys(Diagnostics), (key) => { const diag2 = Diagnostics[key]; return diag2.category === 1 /* Error */ ? diag2.code : void 0; }); registerCodeFix({ - errorCodes: errorCodes52, + errorCodes: errorCodes53, getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) { const { sourceFile, program, span, host, formatContext } = context; if (!isInJSFile(sourceFile) || !isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) { @@ -166533,21 +170874,21 @@ registerCodeFix({ ) ]; if (ts_textChanges_exports.isValidLocationToAddComment(sourceFile, span.start)) { - fixes.unshift(createCodeFixAction(fixName4, ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange8(t, sourceFile, span.start)), Diagnostics.Ignore_this_error_message, fixId41, Diagnostics.Add_ts_ignore_to_all_error_messages)); + fixes.unshift(createCodeFixAction(fixName4, ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange9(t, sourceFile, span.start)), Diagnostics.Ignore_this_error_message, fixId42, Diagnostics.Add_ts_ignore_to_all_error_messages)); } return fixes; }, - fixIds: [fixId41], + fixIds: [fixId42], getAllCodeActions: (context) => { const seenLines = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes52, (changes, diag2) => { + return codeFixAll(context, errorCodes53, (changes, diag2) => { if (ts_textChanges_exports.isValidLocationToAddComment(diag2.file, diag2.start)) { - makeChange8(changes, diag2.file, diag2.start, seenLines); + makeChange9(changes, diag2.file, diag2.start, seenLines); } }); } }); -function makeChange8(changes, sourceFile, position, seenLines) { +function makeChange9(changes, sourceFile, position, seenLines) { const { line: lineNumber } = getLineAndCharacterOfPosition(sourceFile, position); if (!seenLines || tryAddToSet(seenLines, lineNumber)) { changes.insertCommentBeforeLine(sourceFile, lineNumber, position, " @ts-ignore"); @@ -166590,7 +170931,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con const declaration = firstOrUndefined(declarations); const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; + const kind = (declaration == null ? void 0 : declaration.kind) ?? 172 /* PropertySignature */; const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; let modifierFlags = effectiveModifierFlags & 256 /* Static */; @@ -166603,12 +170944,11 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con const optional = !!(symbol.flags & 16777216 /* Optional */); const ambient = !!(enclosingDeclaration.flags & 33554432 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); + const flags = 1 /* NoTruncation */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (kind) { - case 171 /* PropertySignature */: - case 172 /* PropertyDeclaration */: - let flags = 1 /* NoTruncation */; - flags |= quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0; - let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + case 172 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, 8 /* AllowUnresolvedNames */, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); if (importableReference) { @@ -166625,13 +170965,14 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con void 0 )); break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, enclosingDeclaration, - /*flags*/ + flags, + /*internalFlags*/ void 0, getNoopSymbolTrackerWithResolver(context) ); @@ -166674,8 +171015,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con } break; } - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 175 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -166688,6 +171029,9 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con break; } for (const signature of signatures) { + if (signature.declaration && signature.declaration.flags & 33554432 /* Ambient */) { + continue; + } outputMethod(quotePreference, signature, modifiers, createName(declarationName)); } if (!ambient) { @@ -166702,7 +171046,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(175 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } function createModifiers() { @@ -166762,7 +171106,7 @@ function createSignatureDeclarationFromSignature(kind, context, quotePreference, const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); const isJs = isInJSFile(enclosingDeclaration); const flags = 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */ | 524288 /* AllowEmptyTuple */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); - const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, 8 /* AllowUnresolvedNames */, getNoopSymbolTrackerWithResolver(context)); if (!signatureDeclaration) { return void 0; } @@ -166863,6 +171207,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder contextNode, scriptTarget, 1 /* NoTruncation */, + 8 /* AllowUnresolvedNames */, tracker ); const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -166881,10 +171226,12 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder contextNode, /*flags*/ void 0, + /*internalFlags*/ + void 0, tracker ); switch (kind) { - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -166896,7 +171243,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder type, createStubbedMethodBody(quotePreference) ); - case 173 /* MethodSignature */: + case 174 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -166906,7 +171253,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: Debug.assert(typeof name === "string" || isIdentifier(name), "Unexpected name"); return factory.createFunctionDeclaration( modifiers, @@ -166950,16 +171297,71 @@ function createTypeParametersForArguments(checker, argumentTypeParameters, typeA function createTypeParameterName(index) { return 84 /* T */ + index <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + index) : `T${index}`; } -function typeToAutoImportableTypeNode(checker, importAdder, type, contextNode, scriptTarget, flags, tracker) { - let typeNode = checker.typeToTypeNode(type, contextNode, flags, tracker); - if (typeNode && isImportTypeNode(typeNode)) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); +function typeToAutoImportableTypeNode(checker, importAdder, type, contextNode, scriptTarget, flags, internalFlags, tracker) { + const typeNode = checker.typeToTypeNode(type, contextNode, flags, internalFlags, tracker); + if (!typeNode) { + return void 0; + } + return typeNodeToAutoImportableTypeNode(typeNode, importAdder, scriptTarget); +} +function typeNodeToAutoImportableTypeNode(typeNode, importAdder, scriptTarget) { + const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); + if (importableReference) { + importSymbols(importAdder, importableReference.symbols); + typeNode = importableReference.typeNode; + } + return getSynthesizedDeepClone(typeNode); +} +function endOfRequiredTypeParameters(checker, type) { + var _a; + Debug.assert(type.typeArguments); + const fullTypeArguments = type.typeArguments; + const target = type.target; + for (let cutoff = 0; cutoff < fullTypeArguments.length; cutoff++) { + if (((_a = target.localTypeParameters) == null ? void 0 : _a[cutoff].constraint) === void 0) { + continue; + } + const typeArguments = fullTypeArguments.slice(0, cutoff); + const filledIn = checker.fillMissingTypeArguments( + typeArguments, + target.typeParameters, + cutoff, + /*isJavaScriptImplicitAny*/ + false + ); + if (filledIn.every((fill, i) => fill === fullTypeArguments[i])) { + return cutoff; + } + } + return fullTypeArguments.length; +} +function typeToMinimizedReferenceType(checker, type, contextNode, flags, internalFlags, tracker) { + let typeNode = checker.typeToTypeNode(type, contextNode, flags, internalFlags, tracker); + if (!typeNode) { + return void 0; + } + if (isTypeReferenceNode(typeNode)) { + const genericType = type; + if (genericType.typeArguments && typeNode.typeArguments) { + const cutoff = endOfRequiredTypeParameters(checker, genericType); + if (cutoff < typeNode.typeArguments.length) { + const newTypeArguments = factory.createNodeArray(typeNode.typeArguments.slice(0, cutoff)); + typeNode = factory.updateTypeReferenceNode(typeNode, typeNode.typeName, newTypeArguments); + } + } + } + return typeNode; +} +function typePredicateToAutoImportableTypeNode(checker, importAdder, typePredicate, contextNode, scriptTarget, flags, internalFlags, tracker) { + let typePredicateNode = checker.typePredicateToTypePredicateNode(typePredicate, contextNode, flags, internalFlags, tracker); + if ((typePredicateNode == null ? void 0 : typePredicateNode.type) && isImportTypeNode(typePredicateNode.type)) { + const importableReference = tryGetAutoImportableReferenceFromTypeNode(typePredicateNode.type, scriptTarget); if (importableReference) { importSymbols(importAdder, importableReference.symbols); - typeNode = importableReference.typeNode; + typePredicateNode = factory.updateTypePredicateNode(typePredicateNode, typePredicateNode.assertsModifier, typePredicateNode.parameterName, importableReference.typeNode); } } - return getSynthesizedDeepClone(typeNode); + return getSynthesizedDeepClone(typePredicateNode); } function typeContainsTypeParameter(type) { if (type.isUnionOrIntersection()) { @@ -166967,7 +171369,7 @@ function typeContainsTypeParameter(type) { } return type.flags & 262144 /* TypeParameter */; } -function getArgumentTypesAndTypeParameters(checker, importAdder, instanceTypes, contextNode, scriptTarget, flags, tracker) { +function getArgumentTypesAndTypeParameters(checker, importAdder, instanceTypes, contextNode, scriptTarget, flags, internalFlags, tracker) { const argumentTypeNodes = []; const argumentTypeParameters = /* @__PURE__ */ new Map(); for (let i = 0; i < instanceTypes.length; i += 1) { @@ -166979,13 +171381,13 @@ function getArgumentTypesAndTypeParameters(checker, importAdder, instanceTypes, continue; } const widenedInstanceType = checker.getBaseTypeOfLiteralType(instanceType); - const argumentTypeNode = typeToAutoImportableTypeNode(checker, importAdder, widenedInstanceType, contextNode, scriptTarget, flags, tracker); + const argumentTypeNode = typeToAutoImportableTypeNode(checker, importAdder, widenedInstanceType, contextNode, scriptTarget, flags, internalFlags, tracker); if (!argumentTypeNode) { continue; } argumentTypeNodes.push(argumentTypeNode); const argumentTypeParameter = getFirstTypeParameterName(instanceType); - const instanceTypeConstraint = instanceType.isTypeParameter() && instanceType.constraint && !isAnonymousObjectConstraintType(instanceType.constraint) ? typeToAutoImportableTypeNode(checker, importAdder, instanceType.constraint, contextNode, scriptTarget, flags, tracker) : void 0; + const instanceTypeConstraint = instanceType.isTypeParameter() && instanceType.constraint && !isAnonymousObjectConstraintType(instanceType.constraint) ? typeToAutoImportableTypeNode(checker, importAdder, instanceType.constraint, contextNode, scriptTarget, flags, internalFlags, tracker) : void 0; if (argumentTypeParameter) { argumentTypeParameters.set(argumentTypeParameter, { argumentType: instanceType, constraint: instanceTypeConstraint }); } @@ -167085,7 +171487,7 @@ function createMethodImplementingSignatures(checker, context, enclosingDeclarati function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) { if (length(signatures)) { const type = checker.getUnionType(map(signatures, checker.getReturnTypeOfSignature)); - return checker.typeToTypeNode(type, enclosingDeclaration, 1 /* NoTruncation */, getNoopSymbolTrackerWithResolver(context)); + return checker.typeToTypeNode(type, enclosingDeclaration, 1 /* NoTruncation */, 8 /* AllowUnresolvedNames */, getNoopSymbolTrackerWithResolver(context)); } } function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType, quotePreference, body) { @@ -167173,6 +171575,14 @@ function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) function visit(node) { if (isLiteralImportTypeNode(node) && node.qualifier) { const firstIdentifier = getFirstIdentifier(node.qualifier); + if (!firstIdentifier.symbol) { + return visitEachChild( + node, + visit, + /*context*/ + void 0 + ); + } const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier; symbols = append(symbols, firstIdentifier.symbol); @@ -167306,7 +171716,7 @@ function getAccessorConvertiblePropertyAtPosition(file, program, start, end, con isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 170 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -167418,20 +171828,6 @@ function getDeclarationType(declaration, program) { } return typeNode; } -function getAllSupers(decl, checker) { - const res = []; - while (decl) { - const superElement = getClassExtendsHeritageElement(decl); - const superSymbol = superElement && checker.getSymbolAtLocation(superElement.expression); - if (!superSymbol) break; - const symbol = superSymbol.flags & 2097152 /* Alias */ ? checker.getAliasedSymbol(superSymbol) : superSymbol; - const superDecl = symbol.declarations && find(symbol.declarations, isClassLike); - if (!superDecl) break; - res.push(superDecl); - decl = superDecl; - } - return res; -} // src/services/codefixes/fixInvalidImportSyntax.ts var fixName5 = "invalidImportSyntax"; @@ -167477,7 +171873,7 @@ registerCodeFix({ }); function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 214 /* CallExpression */ : 215 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -167533,9 +171929,9 @@ var fixName6 = "strictClassInitialization"; var fixIdAddDefiniteAssignmentAssertions = "addMissingPropertyDefiniteAssignmentAssertions"; var fixIdAddUndefinedType = "addMissingPropertyUndefinedType"; var fixIdAddInitializer = "addMissingPropertyInitializer"; -var errorCodes53 = [Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code]; +var errorCodes54 = [Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code]; registerCodeFix({ - errorCodes: errorCodes53, + errorCodes: errorCodes54, getCodeActions: function getCodeActionsForStrictClassInitializationErrors(context) { const info = getInfo17(context.sourceFile, context.span.start); if (!info) return; @@ -167547,7 +171943,7 @@ registerCodeFix({ }, fixIds: [fixIdAddDefiniteAssignmentAssertions, fixIdAddUndefinedType, fixIdAddInitializer], getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes53, (changes, diag2) => { + return codeFixAll(context, errorCodes54, (changes, diag2) => { const info = getInfo17(diag2.file, diag2.start); if (!info) return; switch (context.fixId) { @@ -167670,28 +172066,28 @@ function getDefaultValueFromType(checker, type) { } // src/services/codefixes/requireInTs.ts -var fixId42 = "requireInTs"; -var errorCodes54 = [Diagnostics.require_call_may_be_converted_to_an_import.code]; +var fixId43 = "requireInTs"; +var errorCodes55 = [Diagnostics.require_call_may_be_converted_to_an_import.code]; registerCodeFix({ - errorCodes: errorCodes54, + errorCodes: errorCodes55, getCodeActions(context) { - const info = getInfo18(context.sourceFile, context.program, context.span.start); + const info = getInfo18(context.sourceFile, context.program, context.span.start, context.preferences); if (!info) { return void 0; } const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange35(t, context.sourceFile, info)); - return [createCodeFixAction(fixId42, changes, Diagnostics.Convert_require_to_import, fixId42, Diagnostics.Convert_all_require_to_import)]; + return [createCodeFixAction(fixId43, changes, Diagnostics.Convert_require_to_import, fixId43, Diagnostics.Convert_all_require_to_import)]; }, - fixIds: [fixId42], - getAllCodeActions: (context) => codeFixAll(context, errorCodes54, (changes, diag2) => { - const info = getInfo18(diag2.file, context.program, diag2.start); + fixIds: [fixId43], + getAllCodeActions: (context) => codeFixAll(context, errorCodes55, (changes, diag2) => { + const info = getInfo18(diag2.file, context.program, diag2.start, context.preferences); if (info) { doChange35(changes, context.sourceFile, info); } }) }); function doChange35(changes, sourceFile, info) { - const { allowSyntheticDefaults, defaultImportName, namedImports, statement, required } = info; + const { allowSyntheticDefaults, defaultImportName, namedImports, statement, moduleSpecifier } = info; changes.replaceNode( sourceFile, statement, @@ -167701,23 +172097,23 @@ function doChange35(changes, sourceFile, info) { /*isTypeOnly*/ false, defaultImportName, - factory.createExternalModuleReference(required) + factory.createExternalModuleReference(moduleSpecifier) ) : factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - /*isTypeOnly*/ - false, + /*phaseModifier*/ + void 0, defaultImportName, namedImports ), - required, + moduleSpecifier, /*attributes*/ void 0 ) ); } -function getInfo18(sourceFile, program, pos) { +function getInfo18(sourceFile, program, pos, preferences) { const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); if (!isRequireCall( parent2, @@ -167727,15 +172123,17 @@ function getInfo18(sourceFile, program, pos) { Debug.failBadSyntaxKind(parent2); } const decl = cast(parent2.parent, isVariableDeclaration); + const quotePreference = getQuotePreference(sourceFile, preferences); const defaultImportName = tryCast(decl.name, isIdentifier); const namedImports = isObjectBindingPattern(decl.name) ? tryCreateNamedImportsFromObjectBindingPattern(decl.name) : void 0; if (defaultImportName || namedImports) { + const moduleSpecifier = first(parent2.arguments); return { allowSyntheticDefaults: getAllowSyntheticDefaultImports(program.getCompilerOptions()), defaultImportName, namedImports, statement: cast(decl.parent.parent, isVariableStatement), - required: first(parent2.arguments) + moduleSpecifier: isNoSubstitutionTemplateLiteral(moduleSpecifier) ? factory.createStringLiteral(moduleSpecifier.text, quotePreference === 0 /* Single */) : moduleSpecifier }; } } @@ -167758,19 +172156,19 @@ function tryCreateNamedImportsFromObjectBindingPattern(node) { } // src/services/codefixes/useDefaultImport.ts -var fixId43 = "useDefaultImport"; -var errorCodes55 = [Diagnostics.Import_may_be_converted_to_a_default_import.code]; +var fixId44 = "useDefaultImport"; +var errorCodes56 = [Diagnostics.Import_may_be_converted_to_a_default_import.code]; registerCodeFix({ - errorCodes: errorCodes55, + errorCodes: errorCodes56, getCodeActions(context) { const { sourceFile, span: { start } } = context; const info = getInfo19(sourceFile, start); if (!info) return void 0; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange36(t, sourceFile, info, context.preferences)); - return [createCodeFixAction(fixId43, changes, Diagnostics.Convert_to_default_import, fixId43, Diagnostics.Convert_all_to_default_imports)]; + return [createCodeFixAction(fixId44, changes, Diagnostics.Convert_to_default_import, fixId44, Diagnostics.Convert_all_to_default_imports)]; }, - fixIds: [fixId43], - getAllCodeActions: (context) => codeFixAll(context, errorCodes55, (changes, diag2) => { + fixIds: [fixId44], + getAllCodeActions: (context) => codeFixAll(context, errorCodes56, (changes, diag2) => { const info = getInfo19(diag2.file, diag2.start); if (info) doChange36(changes, diag2.file, info, context.preferences); }) @@ -167797,24 +172195,24 @@ function doChange36(changes, sourceFile, info, preferences) { } // src/services/codefixes/useBigintLiteral.ts -var fixId44 = "useBigintLiteral"; -var errorCodes56 = [ +var fixId45 = "useBigintLiteral"; +var errorCodes57 = [ Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code ]; registerCodeFix({ - errorCodes: errorCodes56, + errorCodes: errorCodes57, getCodeActions: function getCodeActionsToUseBigintLiteral(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange9(t, context.sourceFile, context.span)); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span)); if (changes.length > 0) { - return [createCodeFixAction(fixId44, changes, Diagnostics.Convert_to_a_bigint_numeric_literal, fixId44, Diagnostics.Convert_all_to_bigint_numeric_literals)]; + return [createCodeFixAction(fixId45, changes, Diagnostics.Convert_to_a_bigint_numeric_literal, fixId45, Diagnostics.Convert_all_to_bigint_numeric_literals)]; } }, - fixIds: [fixId44], + fixIds: [fixId45], getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes56, (changes, diag2) => makeChange9(changes, diag2.file, diag2)); + return codeFixAll(context, errorCodes57, (changes, diag2) => makeChange10(changes, diag2.file, diag2)); } }); -function makeChange9(changeTracker, sourceFile, span) { +function makeChange10(changeTracker, sourceFile, span) { const numericLiteral = tryCast(getTokenAtPosition(sourceFile, span.start), isNumericLiteral); if (!numericLiteral) { return; @@ -167825,23 +172223,23 @@ function makeChange9(changeTracker, sourceFile, span) { // src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts var fixIdAddMissingTypeof = "fixAddModuleReferTypeMissingTypeof"; -var fixId45 = fixIdAddMissingTypeof; -var errorCodes57 = [Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code]; +var fixId46 = fixIdAddMissingTypeof; +var errorCodes58 = [Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code]; registerCodeFix({ - errorCodes: errorCodes57, + errorCodes: errorCodes58, getCodeActions: function getCodeActionsToAddMissingTypeof(context) { const { sourceFile, span } = context; const importType = getImportTypeNode(sourceFile, span.start); const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange37(t, sourceFile, importType)); - return [createCodeFixAction(fixId45, changes, Diagnostics.Add_missing_typeof, fixId45, Diagnostics.Add_missing_typeof)]; + return [createCodeFixAction(fixId46, changes, Diagnostics.Add_missing_typeof, fixId46, Diagnostics.Add_missing_typeof)]; }, - fixIds: [fixId45], - getAllCodeActions: (context) => codeFixAll(context, errorCodes57, (changes, diag2) => doChange37(changes, context.sourceFile, getImportTypeNode(diag2.file, diag2.start))) + fixIds: [fixId46], + getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => doChange37(changes, context.sourceFile, getImportTypeNode(diag2.file, diag2.start))) }); function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 102 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 206 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange37(changes, sourceFile, importType) { @@ -167859,9 +172257,9 @@ function doChange37(changes, sourceFile, importType) { // src/services/codefixes/wrapJsxInFragment.ts var fixID2 = "wrapJsxInFragment"; -var errorCodes58 = [Diagnostics.JSX_expressions_must_have_one_parent_element.code]; +var errorCodes59 = [Diagnostics.JSX_expressions_must_have_one_parent_element.code]; registerCodeFix({ - errorCodes: errorCodes58, + errorCodes: errorCodes59, getCodeActions: function getCodeActionsToWrapJsxInFragment(context) { const { sourceFile, span } = context; const node = findNodeToFix(sourceFile, span.start); @@ -167870,7 +172268,7 @@ registerCodeFix({ return [createCodeFixAction(fixID2, changes, Diagnostics.Wrap_in_JSX_fragment, fixID2, Diagnostics.Wrap_all_unparented_JSX_in_JSX_fragment)]; }, fixIds: [fixID2], - getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes59, (changes, diag2) => { const node = findNodeToFix(context.sourceFile, diag2.start); if (!node) return void 0; doChange38(changes, context.sourceFile, node); @@ -167909,18 +172307,18 @@ function flattenInvalidBinaryExpr(node) { } // src/services/codefixes/wrapDecoratorInParentheses.ts -var fixId46 = "wrapDecoratorInParentheses"; -var errorCodes59 = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code]; +var fixId47 = "wrapDecoratorInParentheses"; +var errorCodes60 = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code]; registerCodeFix({ - errorCodes: errorCodes59, + errorCodes: errorCodes60, getCodeActions: function getCodeActionsToWrapDecoratorExpressionInParentheses(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(fixId46, changes, Diagnostics.Wrap_in_parentheses, fixId46, Diagnostics.Wrap_all_invalid_decorator_expressions_in_parentheses)]; + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span.start)); + return [createCodeFixAction(fixId47, changes, Diagnostics.Wrap_in_parentheses, fixId47, Diagnostics.Wrap_all_invalid_decorator_expressions_in_parentheses)]; }, - fixIds: [fixId46], - getAllCodeActions: (context) => codeFixAll(context, errorCodes59, (changes, diag2) => makeChange10(changes, diag2.file, diag2.start)) + fixIds: [fixId47], + getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, diag2) => makeChange11(changes, diag2.file, diag2.start)) }); -function makeChange10(changeTracker, sourceFile, pos) { +function makeChange11(changeTracker, sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); const decorator = findAncestor(token, isDecorator); Debug.assert(!!decorator, "Expected position to be owned by a decorator."); @@ -167929,20 +172327,20 @@ function makeChange10(changeTracker, sourceFile, pos) { } // src/services/codefixes/convertToMappedObjectType.ts -var fixId47 = "fixConvertToMappedObjectType"; -var errorCodes60 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code]; +var fixId48 = "fixConvertToMappedObjectType"; +var errorCodes61 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code]; registerCodeFix({ - errorCodes: errorCodes60, + errorCodes: errorCodes61, getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) { const { sourceFile, span } = context; const info = getInfo20(sourceFile, span.start); if (!info) return void 0; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange39(t, sourceFile, info)); const name = idText(info.container.name); - return [createCodeFixAction(fixId47, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId47, [Diagnostics.Convert_0_to_mapped_object_type, name])]; + return [createCodeFixAction(fixId48, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId48, [Diagnostics.Convert_0_to_mapped_object_type, name])]; }, - fixIds: [fixId47], - getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, diag2) => { + fixIds: [fixId48], + getAllCodeActions: (context) => codeFixAll(context, errorCodes61, (changes, diag2) => { const info = getInfo20(diag2.file, diag2.start); if (info) doChange39(changes, diag2.file, info); }) @@ -167987,12 +172385,12 @@ function doChange39(changes, sourceFile, { indexSignature, container }) { } // src/services/codefixes/removeAccidentalCallParentheses.ts -var fixId48 = "removeAccidentalCallParentheses"; -var errorCodes61 = [ +var fixId49 = "removeAccidentalCallParentheses"; +var errorCodes62 = [ Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code ]; registerCodeFix({ - errorCodes: errorCodes61, + errorCodes: errorCodes62, getCodeActions(context) { const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression); if (!callExpression) { @@ -168001,30 +172399,30 @@ registerCodeFix({ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => { t.deleteRange(context.sourceFile, { pos: callExpression.expression.end, end: callExpression.end }); }); - return [createCodeFixActionWithoutFixAll(fixId48, changes, Diagnostics.Remove_parentheses)]; + return [createCodeFixActionWithoutFixAll(fixId49, changes, Diagnostics.Remove_parentheses)]; }, - fixIds: [fixId48] + fixIds: [fixId49] }); // src/services/codefixes/removeUnnecessaryAwait.ts -var fixId49 = "removeUnnecessaryAwait"; -var errorCodes62 = [ +var fixId50 = "removeUnnecessaryAwait"; +var errorCodes63 = [ Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code ]; registerCodeFix({ - errorCodes: errorCodes62, + errorCodes: errorCodes63, getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span)); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange12(t, context.sourceFile, context.span)); if (changes.length > 0) { - return [createCodeFixAction(fixId49, changes, Diagnostics.Remove_unnecessary_await, fixId49, Diagnostics.Remove_all_unnecessary_uses_of_await)]; + return [createCodeFixAction(fixId50, changes, Diagnostics.Remove_unnecessary_await, fixId50, Diagnostics.Remove_all_unnecessary_uses_of_await)]; } }, - fixIds: [fixId49], + fixIds: [fixId50], getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes62, (changes, diag2) => makeChange11(changes, diag2.file, diag2)); + return codeFixAll(context, errorCodes63, (changes, diag2) => makeChange12(changes, diag2.file, diag2)); } }); -function makeChange11(changeTracker, sourceFile, span) { +function makeChange12(changeTracker, sourceFile, span) { const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 135 /* AwaitKeyword */); const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression); if (!awaitExpression) { @@ -168049,20 +172447,20 @@ function makeChange11(changeTracker, sourceFile, span) { } // src/services/codefixes/splitTypeOnlyImport.ts -var errorCodes63 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code]; -var fixId50 = "splitTypeOnlyImport"; +var errorCodes64 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code]; +var fixId51 = "splitTypeOnlyImport"; registerCodeFix({ - errorCodes: errorCodes63, - fixIds: [fixId50], + errorCodes: errorCodes64, + fixIds: [fixId51], getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => { return splitTypeOnlyImport(t, getImportDeclaration2(context.sourceFile, context.span), context); }); if (changes.length) { - return [createCodeFixAction(fixId50, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId50, Diagnostics.Split_all_invalid_type_only_imports)]; + return [createCodeFixAction(fixId51, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId51, Diagnostics.Split_all_invalid_type_only_imports)]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes63, (changes, error2) => { + getAllCodeActions: (context) => codeFixAll(context, errorCodes64, (changes, error2) => { splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context); }) }); @@ -168082,7 +172480,7 @@ function splitTypeOnlyImport(changes, importDeclaration, context) { importDeclaration.modifiers, factory.updateImportClause( importClause, - importClause.isTypeOnly, + importClause.phaseModifier, importClause.name, /*namedBindings*/ void 0 @@ -168099,7 +172497,7 @@ function splitTypeOnlyImport(changes, importDeclaration, context) { void 0, factory.updateImportClause( importClause, - importClause.isTypeOnly, + importClause.phaseModifier, /*name*/ void 0, importClause.namedBindings @@ -168111,22 +172509,22 @@ function splitTypeOnlyImport(changes, importDeclaration, context) { } // src/services/codefixes/convertConstToLet.ts -var fixId51 = "fixConvertConstToLet"; -var errorCodes64 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code]; +var fixId52 = "fixConvertConstToLet"; +var errorCodes65 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code]; registerCodeFix({ - errorCodes: errorCodes64, + errorCodes: errorCodes65, getCodeActions: function getCodeActionsToConvertConstToLet(context) { const { sourceFile, span, program } = context; const info = getInfo21(sourceFile, span.start, program); if (info === void 0) return; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange40(t, sourceFile, info.token)); - return [createCodeFixActionMaybeFixAll(fixId51, changes, Diagnostics.Convert_const_to_let, fixId51, Diagnostics.Convert_all_const_to_let)]; + return [createCodeFixActionMaybeFixAll(fixId52, changes, Diagnostics.Convert_const_to_let, fixId52, Diagnostics.Convert_all_const_to_let)]; }, getAllCodeActions: (context) => { const { program } = context; - const seen = /* @__PURE__ */ new Map(); + const seen = /* @__PURE__ */ new Set(); return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes64, (diag2) => { + eachDiagnostic(context, errorCodes65, (diag2) => { const info = getInfo21(diag2.file, diag2.start, program); if (info) { if (addToSeen(seen, getSymbolId(info.symbol))) { @@ -168137,7 +172535,7 @@ registerCodeFix({ }); })); }, - fixIds: [fixId51] + fixIds: [fixId52] }); function getInfo21(sourceFile, pos, program) { var _a; @@ -168155,26 +172553,26 @@ function doChange40(changes, sourceFile, token) { } // src/services/codefixes/fixExpectedComma.ts -var fixId52 = "fixExpectedComma"; +var fixId53 = "fixExpectedComma"; var expectedErrorCode = Diagnostics._0_expected.code; -var errorCodes65 = [expectedErrorCode]; +var errorCodes66 = [expectedErrorCode]; registerCodeFix({ - errorCodes: errorCodes65, + errorCodes: errorCodes66, getCodeActions(context) { const { sourceFile } = context; const info = getInfo22(sourceFile, context.span.start, context.errorCode); if (!info) return void 0; const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange41(t, sourceFile, info)); return [createCodeFixAction( - fixId52, + fixId53, changes, [Diagnostics.Change_0_to_1, ";", ","], - fixId52, + fixId53, [Diagnostics.Change_0_to_1, ";", ","] )]; }, - fixIds: [fixId52], - getAllCodeActions: (context) => codeFixAll(context, errorCodes65, (changes, diag2) => { + fixIds: [fixId53], + getAllCodeActions: (context) => codeFixAll(context, errorCodes66, (changes, diag2) => { const info = getInfo22(diag2.file, diag2.start, diag2.code); if (info) doChange41(changes, context.sourceFile, info); }) @@ -168190,25 +172588,25 @@ function doChange41(changes, sourceFile, { node }) { // src/services/codefixes/fixAddVoidToPromise.ts var fixName7 = "addVoidToPromise"; -var fixId53 = "addVoidToPromise"; -var errorCodes66 = [ +var fixId54 = "addVoidToPromise"; +var errorCodes67 = [ Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code, Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code ]; registerCodeFix({ - errorCodes: errorCodes66, - fixIds: [fixId53], + errorCodes: errorCodes67, + fixIds: [fixId54], getCodeActions(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange12(t, context.sourceFile, context.span, context.program)); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange13(t, context.sourceFile, context.span, context.program)); if (changes.length > 0) { - return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId53, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)]; + return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId54, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)]; } }, getAllCodeActions(context) { - return codeFixAll(context, errorCodes66, (changes, diag2) => makeChange12(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set())); + return codeFixAll(context, errorCodes67, (changes, diag2) => makeChange13(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set())); } }); -function makeChange12(changes, sourceFile, span, program, seen) { +function makeChange13(changes, sourceFile, span, program, seen) { const node = getTokenAtPosition(sourceFile, span.start); if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0) return; const checker = program.getTypeChecker(); @@ -168269,6 +172667,7 @@ __export(ts_Completions_exports, { getCompletionEntryDetails: () => getCompletionEntryDetails, getCompletionEntrySymbol: () => getCompletionEntrySymbol, getCompletionsAtPosition: () => getCompletionsAtPosition, + getDefaultCommitCharacters: () => getDefaultCommitCharacters, getPropertiesForObjectExpression: () => getPropertiesForObjectExpression, moduleSpecifierResolutionCacheAttemptLimit: () => moduleSpecifierResolutionCacheAttemptLimit, moduleSpecifierResolutionLimit: () => moduleSpecifierResolutionLimit @@ -168299,6 +172698,8 @@ var SortText = { return sortText + "1"; } }; +var allCommitCharacters = [".", ",", ";"]; +var noCommaCommitCharacters = [".", ";"]; var CompletionSource = /* @__PURE__ */ ((CompletionSource2) => { CompletionSource2["ThisProperty"] = "ThisProperty/"; CompletionSource2["ClassMemberSnippet"] = "ClassMemberSnippet/"; @@ -168360,9 +172761,9 @@ function originIsComputedPropertyName(origin) { return !!(origin && origin.kind & 512 /* ComputedPropertyName */); } function resolvingModuleSpecifiers(logPrefix, host, resolver, program, position, preferences, isForImportStatementCompletion, isValidTypeOnlyUseSite, cb) { - var _a, _b, _c; + var _a, _b, _c, _d; const start = timestamp(); - const needsFullResolution = isForImportStatementCompletion || moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(program.getCompilerOptions())); + const needsFullResolution = isForImportStatementCompletion || getResolvePackageJsonExports(program.getCompilerOptions()) || ((_a = preferences.autoImportSpecifierExcludeRegexes) == null ? void 0 : _a.length); let skippedAny = false; let ambientCount = 0; let resolvedCount = 0; @@ -168375,9 +172776,9 @@ function resolvingModuleSpecifiers(logPrefix, host, resolver, program, position, resolvedBeyondLimit: () => resolvedCount > moduleSpecifierResolutionLimit }); const hitRateMessage = cacheAttemptCount ? ` (${(resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1)}% hit rate)` : ""; - (_a = host.log) == null ? void 0 : _a.call(host, `${logPrefix}: resolved ${resolvedCount} module specifiers, plus ${ambientCount} ambient and ${resolvedFromCacheCount} from cache${hitRateMessage}`); - (_b = host.log) == null ? void 0 : _b.call(host, `${logPrefix}: response is ${skippedAny ? "incomplete" : "complete"}`); - (_c = host.log) == null ? void 0 : _c.call(host, `${logPrefix}: ${timestamp() - start}`); + (_b = host.log) == null ? void 0 : _b.call(host, `${logPrefix}: resolved ${resolvedCount} module specifiers, plus ${ambientCount} ambient and ${resolvedFromCacheCount} from cache${hitRateMessage}`); + (_c = host.log) == null ? void 0 : _c.call(host, `${logPrefix}: response is ${skippedAny ? "incomplete" : "complete"}`); + (_d = host.log) == null ? void 0 : _d.call(host, `${logPrefix}: ${timestamp() - start}`); return result; function tryResolve(exportInfo, isFromAmbientModule) { if (isFromAmbientModule) { @@ -168401,6 +172802,12 @@ function resolvingModuleSpecifiers(logPrefix, host, resolver, program, position, return result2 || (needsFullResolution ? "failed" : "skipped"); } } +function getDefaultCommitCharacters(isNewIdentifierLocation) { + if (isNewIdentifierLocation) { + return []; + } + return allCommitCharacters; +} function getCompletionsAtPosition(host, program, log, sourceFile, position, preferences, triggerCharacter, completionKind, cancellationToken, formatContext, includeSymbol = false) { var _a; const { previousToken } = getRelevantTokens(position, sourceFile); @@ -168409,7 +172816,17 @@ function getCompletionsAtPosition(host, program, log, sourceFile, position, pref } if (triggerCharacter === " ") { if (preferences.includeCompletionsForImportStatements && preferences.includeCompletionsWithInsertText) { - return { isGlobalCompletion: true, isMemberCompletion: false, isNewIdentifierLocation: true, isIncomplete: true, entries: [] }; + return { + isGlobalCompletion: true, + isMemberCompletion: false, + isNewIdentifierLocation: true, + isIncomplete: true, + entries: [], + defaultCommitCharacters: getDefaultCommitCharacters( + /*isNewIdentifierLocation*/ + true + ) + }; } return void 0; } @@ -168563,7 +172980,16 @@ function continuePreviousIncompleteResponse(cache, file, location, program, host return previousResponse; } function jsdocCompletionInfo(entries) { - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries }; + return { + isGlobalCompletion: false, + isMemberCompletion: false, + isNewIdentifierLocation: false, + entries, + defaultCommitCharacters: getDefaultCommitCharacters( + /*isNewIdentifierLocation*/ + false + ) + }; } function getJSDocParameterCompletions(sourceFile, position, checker, options, preferences, tagNameOnly) { const currentToken = getTokenAtPosition(sourceFile, position); @@ -168791,10 +173217,12 @@ function getJSDocParamAnnotation(paramName, initializer, dotDotDotToken, isJs, i const printer = isSnippet ? createSnippetPrinter({ removeComments: true, module: options.module, + moduleResolution: options.moduleResolution, target: options.target }) : createPrinter({ removeComments: true, module: options.module, + moduleResolution: options.moduleResolution, target: options.target }); setEmitFlags(typeNode, 1 /* SingleLine */); @@ -168834,7 +173262,8 @@ function specificKeywordCompletionInfo(entries, isNewIdentifierLocation) { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation, - entries: entries.slice() + entries: entries.slice(), + defaultCommitCharacters: getDefaultCommitCharacters(isNewIdentifierLocation) }; } function keywordCompletionData(keywordFilters, filterOutTsOnlyKeywords, isNewIdentifierLocation) { @@ -168875,7 +173304,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log, importStatementCompletion, insideJsDocTagTypeExpression, symbolToSortTextMap, - hasUnresolvedAutoImports + hasUnresolvedAutoImports, + defaultCommitCharacters } = completionData; let literals = completionData.literals; const checker = program.getTypeChecker(); @@ -168992,7 +173422,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation, optionalReplacementSpan: getOptionalReplacementSpan(location), - entries + entries, + defaultCommitCharacters: defaultCommitCharacters ?? getDefaultCommitCharacters(isNewIdentifierLocation) }; } function isCheckedFile(sourceFile, compilerOptions) { @@ -169050,6 +173481,7 @@ function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options, const printer = createSnippetPrinter({ removeComments: true, module: options.module, + moduleResolution: options.moduleResolution, target: options.target, newLine: getNewLineKind(newLineChar) }); @@ -169078,14 +173510,14 @@ function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options, } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 199 /* IndexedAccessType */: + case 200 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 201 /* LiteralType */: + case 202 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 11 /* StringLiteral */: @@ -169094,12 +173526,12 @@ function typeNodeToExpression(typeNode, languageVersion, quotePreference) { return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 196 /* ParenthesizedType */: + case 197 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 186 /* TypeQuery */: + case 187 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 205 /* ImportType */: + case 206 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -169134,12 +173566,12 @@ function isMemberCompletionKind(kind) { function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 287 /* JsxClosingElement */: + case 288 /* JsxClosingElement */: return true; case 44 /* SlashToken */: case 32 /* GreaterThanToken */: case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -169157,7 +173589,17 @@ function getJsxClosingTagCompletion(location, sourceFile) { kindModifiers: void 0, sortText: SortText.LocationPriority }; - return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, optionalReplacementSpan: replacementSpan, entries: [entry] }; + return { + isGlobalCompletion: false, + isMemberCompletion: true, + isNewIdentifierLocation: false, + optionalReplacementSpan: replacementSpan, + entries: [entry], + defaultCommitCharacters: getDefaultCommitCharacters( + /*isNewIdentifierLocation*/ + false + ) + }; } return; } @@ -169174,7 +173616,8 @@ function getJSCompletionEntries(sourceFile, position, uniqueNames, target, entri kind: "warning" /* warning */, kindModifiers: "", sortText: SortText.JavascriptIdentifiers, - isFromUncheckedFile: true + isFromUncheckedFile: true, + commitCharacters: [] }, compareCompletionEntries); } }); @@ -169183,7 +173626,13 @@ function completionNameForLiteral(sourceFile, preferences, literal) { return typeof literal === "object" ? pseudoBigIntToString(literal) + "n" : isString(literal) ? quote(sourceFile, preferences, literal) : JSON.stringify(literal); } function createCompletionEntryForLiteral(sourceFile, preferences, literal) { - return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; + return { + name: completionNameForLiteral(sourceFile, preferences, literal), + kind: "string" /* string */, + kindModifiers: "" /* none */, + sortText: SortText.LocationPriority, + commitCharacters: [] + }; } function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) { var _a, _b; @@ -169236,7 +173685,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, if (originIsResolvedExport(origin)) { sourceDisplay = [textPart(origin.moduleSpecifier)]; if (importStatementCompletion) { - ({ insertText, replacementSpan } = getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, options, preferences)); + ({ insertText, replacementSpan } = getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, program, preferences)); isSnippet = preferences.includeCompletionsWithSnippetText ? true : void 0; } } @@ -169306,15 +173755,29 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, hasAction = !importStatementCompletion; } const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports); - if ((parentNamedImportOrExport == null ? void 0 : parentNamedImportOrExport.kind) === 275 /* NamedImports */) { - const possibleToken = stringToToken(name); - if (parentNamedImportOrExport && possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) { - insertText = `${name} as ${name}_`; + if (parentNamedImportOrExport) { + const languageVersion = getEmitScriptTarget(host.getCompilationSettings()); + if (!isIdentifierText(name, languageVersion)) { + insertText = quotePropertyName(sourceFile, preferences, name); + if (parentNamedImportOrExport.kind === 276 /* NamedImports */) { + scanner.setText(sourceFile.text); + scanner.resetTokenState(position); + if (!(scanner.scan() === 130 /* AsKeyword */ && scanner.scan() === 80 /* Identifier */)) { + insertText += " as " + generateIdentifierForArbitraryString(name, languageVersion); + } + } + } else if (parentNamedImportOrExport.kind === 276 /* NamedImports */) { + const possibleToken = stringToToken(name); + if (possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) { + insertText = `${name} as ${name}_`; + } } } + const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location); + const commitCharacters = kind === "warning" /* warning */ || kind === "string" /* string */ ? [] : void 0; return { name, - kind: ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location), + kind, kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), sortText, source, @@ -169329,9 +173792,27 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, isPackageJsonImport: originIsPackageJsonImport(origin) || void 0, isImportStatementCompletion: !!importStatementCompletion || void 0, data, + commitCharacters, ...includeSymbol ? { symbol } : void 0 }; } +function generateIdentifierForArbitraryString(text, languageVersion) { + let needsUnderscore = false; + let identifier = ""; + let ch; + for (let i = 0; i < text.length; i += ch !== void 0 && ch >= 65536 ? 2 : 1) { + ch = text.codePointAt(i); + if (ch !== void 0 && (i === 0 ? isIdentifierStart(ch, languageVersion) : isIdentifierPart(ch, languageVersion))) { + if (needsUnderscore) identifier += "_"; + identifier += String.fromCodePoint(ch); + needsUnderscore = false; + } else { + needsUnderscore = true; + } + } + if (needsUnderscore) identifier += "_"; + return identifier || "_"; +} function isClassLikeMemberCompletion(symbol, location, sourceFile) { if (isInJSFile(location)) { return false; @@ -169352,6 +173833,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, const printer = createSnippetPrinter({ removeComments: true, module: options.module, + moduleResolution: options.moduleResolution, target: options.target, omitTrailingSemicolon: false, newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options)) @@ -169502,6 +173984,7 @@ function getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclara const printer = createSnippetPrinter({ removeComments: true, module: options.module, + moduleResolution: options.moduleResolution, target: options.target, omitTrailingSemicolon: false, newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options)) @@ -169522,6 +174005,7 @@ function getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclara const signaturePrinter = createPrinter({ removeComments: true, module: options.module, + moduleResolution: options.moduleResolution, target: options.target, omitTrailingSemicolon: true }); @@ -169554,10 +174038,10 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 171 /* PropertySignature */: - case 172 /* PropertyDeclaration */: - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: { + case 172 /* PropertySignature */: + case 173 /* PropertyDeclaration */: + case 174 /* MethodSignature */: + case 175 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -169571,7 +174055,14 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro if (signatures.length !== 1) { return void 0; } - const typeNode = checker.typeToTypeNode(effectiveType, enclosingDeclaration, builderFlags, ts_codefix_exports.getNoopSymbolTrackerWithResolver({ program, host })); + const typeNode = checker.typeToTypeNode( + effectiveType, + enclosingDeclaration, + builderFlags, + /*internalFlags*/ + void 0, + ts_codefix_exports.getNoopSymbolTrackerWithResolver({ program, host }) + ); if (!typeNode || !isFunctionTypeNode(typeNode)) { return void 0; } @@ -169691,7 +174182,7 @@ function createSnippetPrinter(printerOptions) { { ...formatContext, options: formatOptions } ); }); - const allChanges = escapes ? stableSort(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes; + const allChanges = escapes ? toSorted(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes; return ts_textChanges_exports.applyChanges(syntheticFile.text, allChanges); } function printNode(hint, node, sourceFile) { @@ -169727,7 +174218,7 @@ function createSnippetPrinter(printerOptions) { 0, { ...formatContext, options: formatOptions } ); - const allChanges = escapes ? stableSort(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes; + const allChanges = escapes ? toSorted(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes; return ts_textChanges_exports.applyChanges(syntheticFile.text, allChanges); } } @@ -169783,7 +174274,7 @@ function completionEntryDataToSymbolOriginInfo(data, completionName, moduleSymbo }; return unresolvedOrigin; } -function getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, options, preferences) { +function getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, program, preferences) { const replacementSpan = importStatementCompletion.replacementSpan; const quotedModuleSpecifier = escapeSnippetText(quote(sourceFile, preferences, origin.moduleSpecifier)); const exportKind = origin.isDefaultExport ? 1 /* Default */ : origin.exportName === "export=" /* ExportEquals */ ? 2 /* ExportEquals */ : 0 /* Named */; @@ -169791,7 +174282,7 @@ function getInsertTextAndReplacementSpanForImportCompletion(name, importStatemen const importKind = ts_codefix_exports.getImportKind( sourceFile, exportKind, - options, + program, /*forceImportKeyword*/ true ); @@ -169835,7 +174326,7 @@ function getSourceFromOrigin(origin) { } function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) { const start = timestamp(); - const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location); + const closestSymbolDeclaration = getClosestSymbolDeclaration(contextToken, location); const useSemicolons = probablyUsesSemicolons(sourceFile); const typeChecker = program.getTypeChecker(); const uniques = /* @__PURE__ */ new Map(); @@ -169901,32 +174392,46 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con function shouldIncludeSymbol(symbol, symbolToSortTextMap2) { var _a; let allFlags = symbol.flags; - if (!isSourceFile(location)) { - if (isExportAssignment(location.parent)) { - return true; + if (location.parent && isExportAssignment(location.parent)) { + return true; + } + if (closestSymbolDeclaration && tryCast(closestSymbolDeclaration, isVariableDeclaration)) { + if (symbol.valueDeclaration === closestSymbolDeclaration) { + return false; } - if (tryCast(variableOrParameterDeclaration, isVariableDeclaration) && symbol.valueDeclaration === variableOrParameterDeclaration) { + if (isBindingPattern(closestSymbolDeclaration.name) && closestSymbolDeclaration.name.elements.some((e) => e === symbol.valueDeclaration)) { return false; } - const symbolDeclaration = symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]); - if (variableOrParameterDeclaration && symbolDeclaration && (isTypeParameterDeclaration(variableOrParameterDeclaration) && isTypeParameterDeclaration(symbolDeclaration) || isParameter(variableOrParameterDeclaration) && isParameter(symbolDeclaration))) { - const symbolDeclarationPos = symbolDeclaration.pos; - const parameters = isParameter(variableOrParameterDeclaration) ? variableOrParameterDeclaration.parent.parameters : isInferTypeNode(variableOrParameterDeclaration.parent) ? void 0 : variableOrParameterDeclaration.parent.typeParameters; - if (symbolDeclarationPos >= variableOrParameterDeclaration.pos && parameters && symbolDeclarationPos < parameters.end) { + } + const symbolDeclaration = symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]); + if (closestSymbolDeclaration && symbolDeclaration) { + if (isParameter(closestSymbolDeclaration) && isParameter(symbolDeclaration)) { + const parameters = closestSymbolDeclaration.parent.parameters; + if (symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < parameters.end) { return false; } + } else if (isTypeParameterDeclaration(closestSymbolDeclaration) && isTypeParameterDeclaration(symbolDeclaration)) { + if (closestSymbolDeclaration === symbolDeclaration && (contextToken == null ? void 0 : contextToken.kind) === 96 /* ExtendsKeyword */) { + return false; + } + if (isInTypeParameterDefault(contextToken) && !isInferTypeNode(closestSymbolDeclaration.parent)) { + const typeParameters = closestSymbolDeclaration.parent.typeParameters; + if (typeParameters && symbolDeclaration.pos >= closestSymbolDeclaration.pos && symbolDeclaration.pos < typeParameters.end) { + return false; + } + } } - const symbolOrigin = skipAlias(symbol, typeChecker); - if (!!sourceFile.externalModuleIndicator && !compilerOptions.allowUmdGlobalAccess && symbolToSortTextMap2[getSymbolId(symbol)] === SortText.GlobalsOrKeywords && (symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.AutoImportSuggestions || symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.LocationPriority)) { - return false; - } - allFlags |= getCombinedLocalAndExportSymbolFlags(symbolOrigin); - if (isInRightSideOfInternalImportEqualsDeclaration(location)) { - return !!(allFlags & 1920 /* Namespace */); - } - if (isTypeOnlyLocation) { - return symbolCanBeReferencedAtTypeLocation(symbol, typeChecker); - } + } + const symbolOrigin = skipAlias(symbol, typeChecker); + if (!!sourceFile.externalModuleIndicator && !compilerOptions.allowUmdGlobalAccess && symbolToSortTextMap2[getSymbolId(symbol)] === SortText.GlobalsOrKeywords && (symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.AutoImportSuggestions || symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.LocationPriority)) { + return false; + } + allFlags |= getCombinedLocalAndExportSymbolFlags(symbolOrigin); + if (isInRightSideOfInternalImportEqualsDeclaration(location)) { + return !!(allFlags & 1920 /* Namespace */); + } + if (isTypeOnlyLocation) { + return symbolCanBeReferencedAtTypeLocation(symbol, typeChecker); } return !!(allFlags & 111551 /* Value */); } @@ -169939,7 +174444,16 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con function getLabelCompletionAtPosition(node) { const entries = getLabelStatementCompletions(node); if (entries.length) { - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries }; + return { + isGlobalCompletion: false, + isMemberCompletion: false, + isNewIdentifierLocation: false, + entries, + defaultCommitCharacters: getDefaultCommitCharacters( + /*isNewIdentifierLocation*/ + false + ) + }; } } function getLabelStatementCompletions(node) { @@ -170219,11 +174733,12 @@ function getContextualType(previousToken, position, sourceFile, checker) { return getContextualTypeFromParent(previousToken, checker); case 64 /* EqualsToken */: switch (parent2.kind) { - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 226 /* BinaryExpression */: + // TODO: GH#18217 + case 227 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 291 /* JsxAttribute */: + case 292 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -170257,7 +174772,7 @@ function getFirstSymbolInChain(symbol, enclosingDeclaration, checker) { } function isModuleSymbol(symbol) { var _a; - return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 307 /* SourceFile */)); + return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 308 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -170293,7 +174808,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 348 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 349 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -170326,6 +174841,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, let keywordFilters = 0 /* None */; let isNewIdentifierLocation = false; let flags = 0 /* None */; + let defaultCommitCharacters; if (contextToken) { const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile); if (importStatementCompletionInfo.keywordCompletion) { @@ -170345,14 +174861,14 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } if (!importStatementCompletionInfo.replacementSpan && isCompletionListBlocker(contextToken)) { log("Returning an empty list because completion was requested in an invalid position."); - return keywordFilters ? keywordCompletionData(keywordFilters, isJsOnlyLocation, isNewIdentifierDefinitionLocation()) : void 0; + return keywordFilters ? keywordCompletionData(keywordFilters, isJsOnlyLocation, computeCommitCharactersAndIsNewIdentifier().isNewIdentifierLocation) : void 0; } let parent2 = contextToken.parent; if (contextToken.kind === 25 /* DotToken */ || contextToken.kind === 29 /* QuestionDotToken */) { isRightOfDot = contextToken.kind === 25 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 29 /* QuestionDotToken */; switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: + case 212 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -170360,16 +174876,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } break; - case 166 /* QualifiedName */: + case 167 /* QualifiedName */: node = parent2.left; break; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: node = parent2.name; break; - case 205 /* ImportType */: + case 206 /* ImportType */: node = parent2; break; - case 236 /* MetaProperty */: + case 237 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 102 /* ImportKeyword */ || node.kind === 105 /* NewKeyword */); break; @@ -170377,51 +174893,52 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 212 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 32 /* GreaterThanToken */: - if (currentToken.parent.kind === 284 /* JsxElement */ || currentToken.parent.kind === 286 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 285 /* JsxElement */ || currentToken.parent.kind === 287 /* JsxOpeningElement */) { location = currentToken; } break; case 44 /* SlashToken */: - if (currentToken.parent.kind === 285 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 286 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 287 /* JsxClosingElement */: + case 288 /* JsxClosingElement */: if (contextToken.kind === 44 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 285 /* JsxSelfClosingElement */: - case 284 /* JsxElement */: - case 286 /* JsxOpeningElement */: + // falls through + case 286 /* JsxSelfClosingElement */: + case 285 /* JsxElement */: + case 287 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 30 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 294 /* JsxExpression */: - case 293 /* JsxSpreadAttribute */: - if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 291 /* JsxAttribute */) { + case 295 /* JsxExpression */: + case 294 /* JsxSpreadAttribute */: + if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 292 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 291 /* JsxAttribute */: + case 292 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -170447,7 +174964,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, let importSpecifierResolver; const symbolToOriginInfoMap = []; const symbolToSortTextMap = []; - const seenPropertySymbols = /* @__PURE__ */ new Map(); + const seenPropertySymbols = /* @__PURE__ */ new Set(); const isTypeOnlyLocation = isTypeOnlyCompletion(); const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson) => { return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host); @@ -170504,19 +175021,20 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, isRightOfDotOrQuestionDot: isRightOfDot || isRightOfQuestionDot, importStatementCompletion, hasUnresolvedAutoImports, - flags + flags, + defaultCommitCharacters }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 341 /* JSDocParameterTag */: - case 348 /* JSDocPropertyTag */: - case 342 /* JSDocReturnTag */: - case 344 /* JSDocTypeTag */: - case 346 /* JSDocTypedefTag */: - case 349 /* JSDocThrowsTag */: - case 350 /* JSDocSatisfiesTag */: + case 342 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: + case 343 /* JSDocReturnTag */: + case 345 /* JSDocTypeTag */: + case 347 /* JSDocTypedefTag */: + case 350 /* JSDocThrowsTag */: + case 351 /* JSDocSatisfiesTag */: return true; - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -170525,7 +175043,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 309 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 310 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -170539,7 +175057,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) { const isNamespaceName = isModuleDeclaration(node.parent); - if (isNamespaceName) isNewIdentifierLocation = true; + if (isNamespaceName) { + isNewIdentifierLocation = true; + defaultCommitCharacters = []; + } let symbol = typeChecker.getSymbolAtLocation(node); if (symbol) { symbol = skipAlias(symbol, typeChecker); @@ -170560,7 +175081,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, symbols.push(exportedSymbol); } } - if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 307 /* SourceFile */ && d.kind !== 267 /* ModuleDeclaration */ && d.kind !== 266 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 308 /* SourceFile */ && d.kind !== 268 /* ModuleDeclaration */ && d.kind !== 267 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -170609,11 +175130,15 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } function addTypeProperties(type, insertAwait, insertQuestionDot) { - isNewIdentifierLocation = !!type.getStringIndexType(); + if (type.getStringIndexType()) { + isNewIdentifierLocation = true; + defaultCommitCharacters = []; + } if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; + defaultCommitCharacters ?? (defaultCommitCharacters = allCommitCharacters); } - const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 206 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -170655,6 +175180,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) { const index = symbols.length; symbols.push(firstAccessibleSymbol); + symbolToSortTextMap[getSymbolId(firstAccessibleSymbol)] = SortText.GlobalsOrKeywords; const moduleSymbol = firstAccessibleSymbol.parent; if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) { symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) }; @@ -170750,7 +175276,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function getGlobalCompletions() { keywordFilters = tryGetFunctionLikeBodyCompletionContainer(contextToken) ? 5 /* FunctionLikeBodyKeywords */ : 1 /* All */; completionKind = 1 /* Global */; - isNewIdentifierLocation = isNewIdentifierDefinitionLocation(); + ({ isNewIdentifierLocation, defaultCommitCharacters } = computeCommitCharactersAndIsNewIdentifier()); if (previousToken !== contextToken) { Debug.assert(!!previousToken, "Expected 'contextToken' to be defined when different from 'previousToken'."); } @@ -170774,7 +175300,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 307 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 308 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -170804,10 +175330,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 307 /* SourceFile */: - case 228 /* TemplateExpression */: - case 294 /* JsxExpression */: - case 241 /* Block */: + case 308 /* SourceFile */: + case 229 /* TemplateExpression */: + case 295 /* JsxExpression */: + case 242 /* Block */: return true; default: return isStatement(scopeNode); @@ -170817,24 +175343,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return insideJsDocTagTypeExpression || insideJsDocImportTag || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 187 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 183 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 59 /* ColonToken */: - return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 173 /* PropertyDeclaration */ || parentKind === 172 /* PropertySignature */ || parentKind === 170 /* Parameter */ || parentKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 64 /* EqualsToken */: - return parentKind === 265 /* TypeAliasDeclaration */ || parentKind === 168 /* TypeParameter */; + return parentKind === 266 /* TypeAliasDeclaration */ || parentKind === 169 /* TypeParameter */; case 130 /* AsKeyword */: - return parentKind === 234 /* AsExpression */; + return parentKind === 235 /* AsExpression */; case 30 /* LessThanToken */: - return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; + return parentKind === 184 /* TypeReference */ || parentKind === 217 /* TypeAssertionExpression */; case 96 /* ExtendsKeyword */: - return parentKind === 168 /* TypeParameter */; + return parentKind === 169 /* TypeParameter */; case 152 /* SatisfiesKeyword */: - return parentKind === 238 /* SatisfiesExpression */; + return parentKind === 239 /* SatisfiesExpression */; } } return false; @@ -170912,18 +175438,11 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } ); function isImportableExportInfo(info) { - const moduleFile = tryCast(info.moduleSymbol.valueDeclaration, isSourceFile); - if (!moduleFile) { - const moduleName = stripQuotes(info.moduleSymbol.name); - if (ts_JsTyping_exports.nodeCoreModules.has(moduleName) && startsWith(moduleName, "node:") !== shouldUseUriStyleNodeCoreModules(sourceFile, program)) { - return false; - } - return packageJsonFilter ? packageJsonFilter.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson)) : true; - } - return isImportableFile( + return isImportable( info.isFromPackageJson ? packageJsonAutoImportProvider : program, sourceFile, - moduleFile, + tryCast(info.moduleSymbol.valueDeclaration, isSourceFile), + info.moduleSymbol, preferences, packageJsonFilter, getModuleSpecifierResolutionHost(info.isFromPackageJson), @@ -171004,53 +175523,133 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return true; } if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 287 /* JsxOpeningElement */ || location.kind === 286 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) { - return location.parent.kind !== 286 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 287 /* JsxOpeningElement */) { + return location.parent.kind !== 287 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */; + if (contextToken2.parent.kind === 288 /* JsxClosingElement */ || contextToken2.parent.kind === 286 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 285 /* JsxElement */; } } return false; } - function isNewIdentifierDefinitionLocation() { + function computeCommitCharactersAndIsNewIdentifier() { if (contextToken) { const containingNodeKind = contextToken.parent.kind; const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 28 /* CommaToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 226 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + switch (containingNodeKind) { + case 214 /* CallExpression */: + // func( a, | + case 215 /* NewExpression */: { + const expression = contextToken.parent.expression; + if (getLineAndCharacterOfPosition(sourceFile, expression.end).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true }; + } + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true }; + } + case 227 /* BinaryExpression */: + return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true }; + case 177 /* Constructor */: + // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + case 185 /* FunctionType */: + // var x: (s: string, list| + case 211 /* ObjectLiteralExpression */: + return { defaultCommitCharacters: [], isNewIdentifierLocation: true }; + case 210 /* ArrayLiteralExpression */: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true }; + default: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; + } case 21 /* OpenParenToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; + switch (containingNodeKind) { + case 214 /* CallExpression */: + // func( | + case 215 /* NewExpression */: { + const expression = contextToken.parent.expression; + if (getLineAndCharacterOfPosition(sourceFile, expression.end).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true }; + } + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true }; + } + case 218 /* ParenthesizedExpression */: + return { defaultCommitCharacters: noCommaCommitCharacters, isNewIdentifierLocation: true }; + case 177 /* Constructor */: + // constructor( | + case 197 /* ParenthesizedType */: + return { defaultCommitCharacters: [], isNewIdentifierLocation: true }; + default: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; + } case 23 /* OpenBracketToken */: - return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; + switch (containingNodeKind) { + case 210 /* ArrayLiteralExpression */: + // [ | + case 182 /* IndexSignature */: + // [ | : string ] + case 190 /* TupleType */: + // [ | : string ] + case 168 /* ComputedPropertyName */: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true }; + default: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; + } case 144 /* ModuleKeyword */: + // module | case 145 /* NamespaceKeyword */: + // namespace | case 102 /* ImportKeyword */: - return true; + return { defaultCommitCharacters: [], isNewIdentifierLocation: true }; case 25 /* DotToken */: - return containingNodeKind === 267 /* ModuleDeclaration */; + switch (containingNodeKind) { + case 268 /* ModuleDeclaration */: + return { defaultCommitCharacters: [], isNewIdentifierLocation: true }; + default: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; + } case 19 /* OpenBraceToken */: - return containingNodeKind === 263 /* ClassDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; + switch (containingNodeKind) { + case 264 /* ClassDeclaration */: + // class A { | + case 211 /* ObjectLiteralExpression */: + return { defaultCommitCharacters: [], isNewIdentifierLocation: true }; + default: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; + } case 64 /* EqualsToken */: - return containingNodeKind === 260 /* VariableDeclaration */ || containingNodeKind === 226 /* BinaryExpression */; + switch (containingNodeKind) { + case 261 /* VariableDeclaration */: + // const x = a| + case 227 /* BinaryExpression */: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: true }; + default: + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; + } case 16 /* TemplateHead */: - return containingNodeKind === 228 /* TemplateExpression */; + return { + defaultCommitCharacters: allCommitCharacters, + isNewIdentifierLocation: containingNodeKind === 229 /* TemplateExpression */ + // `aa ${| + }; case 17 /* TemplateMiddle */: - return containingNodeKind === 239 /* TemplateSpan */; + return { + defaultCommitCharacters: allCommitCharacters, + isNewIdentifierLocation: containingNodeKind === 240 /* TemplateSpan */ + // `aa ${10} dd ${| + }; case 134 /* AsyncKeyword */: - return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */; + return containingNodeKind === 175 /* MethodDeclaration */ || containingNodeKind === 305 /* ShorthandPropertyAssignment */ ? { defaultCommitCharacters: [], isNewIdentifierLocation: true } : { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; case 42 /* AsteriskToken */: - return containingNodeKind === 174 /* MethodDeclaration */; + return containingNodeKind === 175 /* MethodDeclaration */ ? { defaultCommitCharacters: [], isNewIdentifierLocation: true } : { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; } if (isClassMemberCompletionKeyword(tokenKind)) { - return true; + return { defaultCommitCharacters: [], isNewIdentifierLocation: true }; } } - return false; + return { defaultCommitCharacters: allCommitCharacters, isNewIdentifierLocation: false }; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) { return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2))); @@ -171080,7 +175679,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 211 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { if (objectLikeContainer.flags & 67108864 /* InWithStatement */) { @@ -171100,15 +175699,15 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } else { - Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 207 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 251 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 170 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 175 /* MethodDeclaration */ || rootDeclaration.parent.kind === 179 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -171133,7 +175732,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 211 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -171147,10 +175746,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 276 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 276 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -171160,7 +175759,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, completionKind = 3 /* MemberLike */; isNewIdentifierLocation = false; const exports2 = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol); - const existing = new Set(namedImportsOrExports.elements.filter((n) => !isCurrentlyEditingNode(n)).map((n) => (n.propertyName || n.name).escapedText)); + const existing = new Set(namedImportsOrExports.elements.filter((n) => !isCurrentlyEditingNode(n)).map((n) => moduleExportNameTextEscaped(n.propertyName || n.name))); const uniques = exports2.filter((e) => e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName)); symbols = concatenate(symbols, uniques); if (!uniques.length) { @@ -171278,14 +175877,15 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const parent2 = contextToken2.parent; switch (contextToken2.kind) { case 32 /* GreaterThanToken */: + // End of a type argument list case 31 /* LessThanSlashToken */: case 44 /* SlashToken */: case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 292 /* JsxAttributes */: - case 291 /* JsxAttribute */: - case 293 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxOpeningElement */)) { + case 212 /* PropertyAccessExpression */: + case 293 /* JsxAttributes */: + case 292 /* JsxAttribute */: + case 294 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 286 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxOpeningElement */)) { if (contextToken2.kind === 32 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -171296,20 +175896,23 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (!parent2.typeArguments || precedingToken && precedingToken.kind === 44 /* SlashToken */) break; } return parent2; - } else if (parent2.kind === 291 /* JsxAttribute */) { + } else if (parent2.kind === 292 /* JsxAttribute */) { return parent2.parent.parent; } break; + // The context token is the closing } or " of an attribute, which means + // its parent is a JsxExpression, whose parent is a JsxAttribute, + // whose parent is a JsxOpeningLikeElement case 11 /* StringLiteral */: - if (parent2 && (parent2.kind === 291 /* JsxAttribute */ || parent2.kind === 293 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 292 /* JsxAttribute */ || parent2.kind === 294 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 20 /* CloseBraceToken */: - if (parent2 && parent2.kind === 294 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 291 /* JsxAttribute */) { + if (parent2 && parent2.kind === 295 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 292 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 293 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 294 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -171325,44 +175928,49 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 28 /* CommaToken */: - return containingNodeKind === 260 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 243 /* VariableStatement */ || containingNodeKind === 266 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 25 /* DotToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 208 /* ArrayBindingPattern */; + // var [.| case 59 /* ColonToken */: - return containingNodeKind === 208 /* BindingElement */; + return containingNodeKind === 209 /* BindingElement */; + // var {x :html| case 23 /* OpenBracketToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 208 /* ArrayBindingPattern */; + // var [x| case 21 /* OpenParenToken */: - return containingNodeKind === 299 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 300 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 19 /* OpenBraceToken */: - return containingNodeKind === 266 /* EnumDeclaration */; + return containingNodeKind === 267 /* EnumDeclaration */; + // enum a { | case 30 /* LessThanToken */: - return containingNodeKind === 263 /* ClassDeclaration */ || // class A< | - containingNodeKind === 231 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 265 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 264 /* ClassDeclaration */ || // class A< | + containingNodeKind === 232 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 265 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 266 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); case 126 /* StaticKeyword */: - return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 173 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 26 /* DotDotDotToken */: - return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; + return containingNodeKind === 170 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 208 /* ArrayBindingPattern */; + // var [...z| case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: - return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 170 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 130 /* AsKeyword */: - return containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */ || containingNodeKind === 274 /* NamespaceImport */; + return containingNodeKind === 277 /* ImportSpecifier */ || containingNodeKind === 282 /* ExportSpecifier */ || containingNodeKind === 275 /* NamespaceImport */; case 139 /* GetKeyword */: case 153 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 80 /* Identifier */: { - if (containingNodeKind === 276 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if ((containingNodeKind === 277 /* ImportSpecifier */ || containingNodeKind === 282 /* ExportSpecifier */) && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } const ancestorVariableDeclaration = findAncestor( @@ -171385,7 +175993,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 140 /* InferKeyword */: return true; case 156 /* TypeKeyword */: - return containingNodeKind !== 276 /* ImportSpecifier */; + return containingNodeKind !== 277 /* ImportSpecifier */; case 42 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -171419,7 +176027,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 173 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -171433,7 +176041,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return contextToken2.kind !== 64 /* EqualsToken */ && (contextToken2.kind === 27 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 177 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 9 /* NumericLiteral */) { @@ -171443,7 +176051,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 261 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 262 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -171452,7 +176060,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 303 /* PropertyAssignment */ && m.kind !== 304 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 305 /* SpreadAssignment */) { + if (m.kind !== 304 /* PropertyAssignment */ && m.kind !== 305 /* ShorthandPropertyAssignment */ && m.kind !== 209 /* BindingElement */ && m.kind !== 175 /* MethodDeclaration */ && m.kind !== 178 /* GetAccessor */ && m.kind !== 179 /* SetAccessor */ && m.kind !== 306 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -171530,7 +176138,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { + if (m.kind !== 173 /* PropertyDeclaration */ && m.kind !== 175 /* MethodDeclaration */ && m.kind !== 178 /* GetAccessor */ && m.kind !== 179 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -171558,7 +176166,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 291 /* JsxAttribute */) { + if (attr.kind === 292 /* JsxAttribute */) { seenNames.add(getEscapedTextOfJsxAttributeName(attr.name)); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -171578,6 +176186,7 @@ function tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile) const { parent: parent2 } = contextToken; switch (contextToken.kind) { case 19 /* OpenBraceToken */: + // const x = { | case 28 /* CommaToken */: if (isObjectLiteralExpression(parent2) || isObjectBindingPattern(parent2)) { return parent2; @@ -171651,6 +176260,9 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js if (isIdentifierText(name, target, jsxIdentifierExpected ? 1 /* JSX */ : 0 /* Standard */) || symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) { return validNameResult; } + if (symbol.flags & 2097152 /* Alias */) { + return { name, needsConvertPropertyAccess: true }; + } switch (kind) { case 3 /* MemberLike */: return originIsComputedPropertyName(origin) ? { name: origin.symbolName, needsConvertPropertyAccess: false } : void 0; @@ -171669,7 +176281,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js var _keywordCompletions = []; var allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 83 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { + for (let i = 83 /* FirstKeyword */; i <= 166 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -171792,7 +176404,13 @@ function getJsDocTagAtPosition(node, position) { } function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) { const hasCompletionsType = completionsType && completionsType !== contextualType; - const type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) ? checker.getUnionType([contextualType, completionsType]) : contextualType; + const promiseFilteredContextualType = checker.getUnionType( + filter( + contextualType.flags & 1048576 /* Union */ ? contextualType.types : [contextualType], + (t) => !checker.getPromisedTypeOfPromise(t) + ) + ); + const type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) ? checker.getUnionType([promiseFilteredContextualType, completionsType]) : promiseFilteredContextualType; const properties = getApparentProperties(type, obj, checker); return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ? filter(properties, hasDeclarationOtherThanSelf) : properties; function hasDeclarationOtherThanSelf(member) { @@ -171812,7 +176430,7 @@ function getPropertiesForCompletion(type, checker) { } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { switch (location.kind) { - case 352 /* SyntaxList */: + case 353 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -171846,9 +176464,11 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken case 64 /* EqualsToken */: return void 0; case 27 /* SemicolonToken */: + // class c {getValue(): number; | } case 20 /* CloseBraceToken */: return isFromObjectTypeDeclaration(location) && location.parent.name === location ? location.parent.parent : tryCast(location, isObjectTypeDeclaration); case 19 /* OpenBraceToken */: + // class c { | case 28 /* CommaToken */: return tryCast(contextToken.parent, isObjectTypeDeclaration); default: @@ -171874,7 +176494,7 @@ function tryGetTypeLiteralNode(node) { case 27 /* SemicolonToken */: case 28 /* CommaToken */: case 80 /* Identifier */: - if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 172 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -171889,11 +176509,11 @@ function getConstraintOfTypeArgumentProperty(node, checker) { const t = getConstraintOfTypeArgumentProperty(node.parent, checker); if (!t) return void 0; switch (node.kind) { - case 171 /* PropertySignature */: + case 172 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 193 /* IntersectionType */: - case 187 /* TypeLiteral */: - case 192 /* UnionType */: + case 194 /* IntersectionType */: + case 188 /* TypeLiteral */: + case 193 /* UnionType */: return t; } } @@ -171916,7 +176536,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) { case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 307 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -172043,8 +176663,8 @@ function getSingleLineReplacementSpanForImportCompletionNode(node) { if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ || top.kind === 351 /* JSDocImportTag */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 277 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 273 /* ImportDeclaration */ || top.kind === 352 /* JSDocImportTag */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -172082,20 +176702,37 @@ function isModuleSpecifierMissingOrEmpty(specifier) { if (nodeIsMissing(specifier)) return true; return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text); } -function getVariableOrParameterDeclaration(contextToken, location) { +function getClosestSymbolDeclaration(contextToken, location) { if (!contextToken) return; - const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent)); - const possiblyVariableDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node)); - return possiblyParameterDeclaration || possiblyVariableDeclaration; + let closestDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent)); + if (!closestDeclaration) { + closestDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node)); + } + return closestDeclaration; +} +function isInTypeParameterDefault(contextToken) { + if (!contextToken) { + return false; + } + let node = contextToken; + let parent2 = contextToken.parent; + while (parent2) { + if (isTypeParameterDeclaration(parent2)) { + return parent2.default === node || node.kind === 64 /* EqualsToken */; + } + node = parent2; + parent2 = parent2.parent; + } + return false; } function isArrowFunctionBody(node) { return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/; node.kind === 39 /* EqualsGreaterThanToken */); } -function symbolCanBeReferencedAtTypeLocation(symbol, checker, seenModules = /* @__PURE__ */ new Map()) { +function symbolCanBeReferencedAtTypeLocation(symbol, checker, seenModules = /* @__PURE__ */ new Set()) { return nonAliasCanBeReferencedAtTypeLocation(symbol) || nonAliasCanBeReferencedAtTypeLocation(skipAlias(symbol.exportSymbol || symbol, checker)); function nonAliasCanBeReferencedAtTypeLocation(symbol2) { - return !!(symbol2.flags & 788968 /* Type */) || checker.isUnknownSymbol(symbol2) || !!(symbol2.flags & 1536 /* Module */) && addToSeen(seenModules, getSymbolId(symbol2)) && checker.getExportsOfModule(symbol2).some((e) => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules)); + return !!(symbol2.flags & 788968 /* Type */) || checker.isUnknownSymbol(symbol2) || !!(symbol2.flags & 1536 /* Module */) && addToSeen(seenModules, symbol2) && checker.getExportsOfModule(symbol2).some((e) => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules)); } } function isDeprecated(symbol, checker) { @@ -172167,7 +176804,7 @@ function createNameAndKindSet() { } function getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program, log, preferences, includeSymbol) { if (isInReferenceComment(sourceFile, position)) { - const entries = getTripleSlashReferenceCompletion(sourceFile, position, options, host); + const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host, createModuleSpecifierResolutionHost(program, host)); return entries && convertPathCompletions(entries); } if (isInString(sourceFile, position, contextToken)) { @@ -172225,7 +176862,14 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h void 0, includeSymbol ); - return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries }; + return { + isGlobalCompletion: false, + isMemberCompletion: true, + isNewIdentifierLocation: completion.hasIndexSignature, + optionalReplacementSpan, + entries, + defaultCommitCharacters: getDefaultCommitCharacters(completion.hasIndexSignature) + }; } case 2 /* Types */: { const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), "'") ? 39 /* singleQuote */ : 34 /* doubleQuote */; @@ -172234,9 +176878,17 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h kindModifiers: "" /* none */, kind: "string" /* string */, sortText: SortText.LocationPriority, - replacementSpan: getReplacementSpanForContextToken(contextToken, position) + replacementSpan: getReplacementSpanForContextToken(contextToken, position), + commitCharacters: [] })); - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: completion.isNewIdentifier, optionalReplacementSpan, entries }; + return { + isGlobalCompletion: false, + isMemberCompletion: false, + isNewIdentifierLocation: completion.isNewIdentifier, + optionalReplacementSpan, + entries, + defaultCommitCharacters: getDefaultCommitCharacters(completion.isNewIdentifier) + }; } default: return Debug.assertNever(completion); @@ -172267,7 +176919,13 @@ function convertPathCompletions(pathCompletions) { const isGlobalCompletion = false; const isNewIdentifierLocation = true; const entries = pathCompletions.map(({ name, kind, span, extension }) => ({ name, kind, kindModifiers: kindModifiersFromExtension(extension), sortText: SortText.LocationPriority, replacementSpan: span })); - return { isGlobalCompletion, isMemberCompletion: false, isNewIdentifierLocation, entries }; + return { + isGlobalCompletion, + isMemberCompletion: false, + isNewIdentifierLocation, + entries, + defaultCommitCharacters: getDefaultCommitCharacters(isNewIdentifierLocation) + }; } function kindModifiersFromExtension(extension) { switch (extension) { @@ -172307,38 +176965,39 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program, const typeChecker = program.getTypeChecker(); const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 201 /* LiteralType */: { + case 202 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); - if (grandParent.kind === 205 /* ImportType */) { + if (grandParent.kind === 206 /* ImportType */) { return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) }; } return fromUnionableLiteralType(grandParent); } - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 212 /* ElementAccessExpression */: { + case 213 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 291 /* JsxAttribute */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 292 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile, typeChecker); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 292 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile, typeChecker); return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */); } - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 283 /* ExternalModuleReference */: - case 351 /* JSDocImportTag */: + // falls through (is `require("")` or `require(""` or `import("")`) + case 273 /* ImportDeclaration */: + case 279 /* ExportDeclaration */: + case 284 /* ExternalModuleReference */: + case 352 /* JSDocImportTag */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, program, host, preferences) }; - case 296 /* CaseClause */: + case 297 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -172346,26 +177005,52 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program, } const literals = contextualTypes.types.filter((literal) => !tracker.hasValue(literal.value)); return { kind: 2 /* Types */, types: literals, isNewIdentifier: false }; + case 277 /* ImportSpecifier */: + case 282 /* ExportSpecifier */: + const specifier = parent2; + if (specifier.propertyName && node !== specifier.propertyName) { + return; + } + const namedImportsOrExports = specifier.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 276 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + if (!moduleSpecifier) return; + const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); + if (!moduleSpecifierSymbol) return; + const exports2 = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol); + const existing = new Set(namedImportsOrExports.elements.map((n) => moduleExportNameTextEscaped(n.propertyName || n.name))); + const uniques = exports2.filter((e) => e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName)); + return { kind: 1 /* Properties */, symbols: uniques, hasIndexSignature: false }; + case 227 /* BinaryExpression */: + if (parent2.operatorToken.kind === 103 /* InKeyword */) { + const type = typeChecker.getTypeAtLocation(parent2.right); + const properties = type.isUnion() ? typeChecker.getAllPossiblePropertiesOfTypes(type.types) : type.getApparentProperties(); + return { + kind: 1 /* Properties */, + symbols: properties.filter((prop) => !prop.valueDeclaration || !isPrivateIdentifierClassElementDeclaration(prop.valueDeclaration)), + hasIndexSignature: false + }; + } + return fromContextualType(0 /* None */); default: return fromContextualType() || fromContextualType(0 /* None */); } function fromUnionableLiteralType(grandParent) { switch (grandParent.kind) { - case 233 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: { + case 234 /* ExpressionWithTypeArguments */: + case 184 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 199 /* IndexedAccessType */: + case 200 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 192 /* UnionType */: { + case 193 /* UnionType */: { const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent)); if (!result) { return void 0; @@ -172390,9 +177075,9 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program, } function walkUpParentheses(node) { switch (node.kind) { - case 196 /* ParenthesizedType */: + case 197 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -172403,7 +177088,7 @@ function getAlreadyUsedTypesInStringLiteralUnion(union, current) { } function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { let isNewIdentifier = false; - const uniques = /* @__PURE__ */ new Map(); + const uniques = /* @__PURE__ */ new Set(); const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument); const types = flatMap(candidates, (candidate) => { @@ -172443,7 +177128,7 @@ function stringLiteralCompletionsForObjectLiteral(checker, objectLiteralExpressi hasIndexSignature: hasIndexSignature(contextualType) }; } -function getStringLiteralTypes(type, uniques = /* @__PURE__ */ new Map()) { +function getStringLiteralTypes(type, uniques = /* @__PURE__ */ new Set()) { if (!type) return emptyArray; type = skipConstraint(type); return type.isUnion() ? flatMap(type.types, (t) => getStringLiteralTypes(t, uniques)) : type.isStringLiteral() && !(type.flags & 1024 /* EnumLiteral */) && addToSeen(uniques, type.value) ? [type] : emptyArray; @@ -172474,8 +177159,9 @@ function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, prog const scriptDirectory = getDirectoryPath(scriptPath); const compilerOptions = program.getCompilerOptions(); const typeChecker = program.getTypeChecker(); + const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host); const extensionOptions = getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile, typeChecker, preferences, mode); - return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, compilerOptions, host, extensionOptions, typeChecker); + return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions) : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, moduleSpecifierResolutionHost, extensionOptions); } function getExtensionOptions(compilerOptions, referenceKind, importingSourceFile, typeChecker, preferences, resolutionMode) { return { @@ -172486,15 +177172,17 @@ function getExtensionOptions(compilerOptions, referenceKind, importingSourceFile resolutionMode }; } -function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) { +function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, moduleSpecifierResolutionHost, scriptPath, extensionOptions) { + const compilerOptions = program.getCompilerOptions(); if (compilerOptions.rootDirs) { return getCompletionEntriesForDirectoryFragmentWithRootDirs( compilerOptions.rootDirs, literalValue, scriptDirectory, extensionOptions, - compilerOptions, + program, host, + moduleSpecifierResolutionHost, scriptPath ); } else { @@ -172502,7 +177190,9 @@ function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, c literalValue, scriptDirectory, extensionOptions, + program, host, + moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, scriptPath @@ -172528,7 +177218,8 @@ function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ign compareStringsCaseSensitive ); } -function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptDirectory, extensionOptions, compilerOptions, host, exclude) { +function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, exclude) { + const compilerOptions = program.getCompilerOptions(); const basePath = compilerOptions.project || host.getCurrentDirectory(); const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase); @@ -172537,7 +177228,9 @@ function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment fragment, baseDirectory, extensionOptions, + program, host, + moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, exclude @@ -172545,7 +177238,7 @@ function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment (itemA, itemB) => itemA.name === itemB.name && itemA.kind === itemB.kind && itemA.extension === itemB.extension ); } -function getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, extensionOptions, host, moduleSpecifierIsRelative, exclude, result = createNameAndKindSet()) { +function getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, moduleSpecifierIsRelative, exclude, result = createNameAndKindSet()) { var _a; if (fragment === void 0) { fragment = ""; @@ -172570,7 +177263,7 @@ function getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, ext if (versionPaths) { const packageDirectory = getDirectoryPath(packageJsonPath); const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length); - if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, host, versionPaths)) { + if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, versionPaths)) { return result; } } @@ -172596,9 +177289,9 @@ function getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, ext } const { name, extension } = getFilenameWithExtensionOption( getBaseFileName(filePath), - host.getCompilationSettings(), + program, extensionOptions, - /*isExportsWildcard*/ + /*isExportsOrImportsWildcard*/ false ); result.add(nameAndKind(name, "script" /* scriptElement */, extension)); @@ -172615,7 +177308,7 @@ function getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, ext } return result; } -function getFilenameWithExtensionOption(name, compilerOptions, extensionOptions, isExportsWildcard) { +function getFilenameWithExtensionOption(name, program, extensionOptions, isExportsOrImportsWildcard) { const nonJsResult = ts_moduleSpecifiers_exports.tryGetRealFileNameForNonJsDeclarationFileName(name); if (nonJsResult) { return { name: nonJsResult, extension: tryGetExtensionFromPath2(nonJsResult) }; @@ -172623,28 +177316,29 @@ function getFilenameWithExtensionOption(name, compilerOptions, extensionOptions, if (extensionOptions.referenceKind === 0 /* Filename */) { return { name, extension: tryGetExtensionFromPath2(name) }; } - let allowedEndings = getModuleSpecifierPreferences( + let allowedEndings = ts_moduleSpecifiers_exports.getModuleSpecifierPreferences( { importModuleSpecifierEnding: extensionOptions.endingPreference }, - compilerOptions, + program, + program.getCompilerOptions(), extensionOptions.importingSourceFile ).getAllowedEndingsInPreferredOrder(extensionOptions.resolutionMode); - if (isExportsWildcard) { + if (isExportsOrImportsWildcard) { allowedEndings = allowedEndings.filter((e) => e !== 0 /* Minimal */ && e !== 1 /* Index */); } if (allowedEndings[0] === 3 /* TsExtension */) { if (fileExtensionIsOneOf(name, supportedTSImplementationExtensions)) { return { name, extension: tryGetExtensionFromPath2(name) }; } - const outputExtension2 = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, compilerOptions); + const outputExtension2 = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, program.getCompilerOptions()); return outputExtension2 ? { name: changeExtension(name, outputExtension2), extension: outputExtension2 } : { name, extension: tryGetExtensionFromPath2(name) }; } - if (!isExportsWildcard && (allowedEndings[0] === 0 /* Minimal */ || allowedEndings[0] === 1 /* Index */) && fileExtensionIsOneOf(name, [".js" /* Js */, ".jsx" /* Jsx */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */])) { + if (!isExportsOrImportsWildcard && (allowedEndings[0] === 0 /* Minimal */ || allowedEndings[0] === 1 /* Index */) && fileExtensionIsOneOf(name, [".js" /* Js */, ".jsx" /* Jsx */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */])) { return { name: removeFileExtension(name), extension: tryGetExtensionFromPath2(name) }; } - const outputExtension = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, compilerOptions); + const outputExtension = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, program.getCompilerOptions()); return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath2(name) }; } -function addCompletionEntriesFromPaths(result, fragment, baseDirectory, extensionOptions, host, paths) { +function addCompletionEntriesFromPaths(result, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, paths) { const getPatternsForKey = (key) => paths[key]; const comparePaths2 = (a, b) => { const patternA = tryParsePattern(a); @@ -172653,39 +177347,43 @@ function addCompletionEntriesFromPaths(result, fragment, baseDirectory, extensio const lengthB = typeof patternB === "object" ? patternB.prefix.length : b.length; return compareValues(lengthB, lengthA); }; - return addCompletionEntriesFromPathsOrExports( + return addCompletionEntriesFromPathsOrExportsOrImports( result, /*isExports*/ false, + /*isImports*/ + false, fragment, baseDirectory, extensionOptions, + program, host, + moduleSpecifierResolutionHost, getOwnKeys(paths), getPatternsForKey, comparePaths2 ); } -function addCompletionEntriesFromPathsOrExports(result, isExports, fragment, baseDirectory, extensionOptions, host, keys, getPatternsForKey, comparePaths2) { +function addCompletionEntriesFromPathsOrExportsOrImports(result, isExports, isImports, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, keys, getPatternsForKey, comparePaths2) { let pathResults = []; let matchedPath; for (const key of keys) { if (key === ".") continue; - const keyWithoutLeadingDotSlash = key.replace(/^\.\//, ""); + const keyWithoutLeadingDotSlash = key.replace(/^\.\//, "") + ((isExports || isImports) && endsWith(key, "/") ? "*" : ""); const patterns = getPatternsForKey(key); if (patterns) { const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash); if (!pathPattern) continue; const isMatch = typeof pathPattern === "object" && isPatternMatch(pathPattern, fragment); - const isLongestMatch = isMatch && (matchedPath === void 0 || comparePaths2(key, matchedPath) === -1 /* LessThan */); + const isLongestMatch = isMatch && (matchedPath === void 0 || comparePaths2(keyWithoutLeadingDotSlash, matchedPath) === -1 /* LessThan */); if (isLongestMatch) { - matchedPath = key; + matchedPath = keyWithoutLeadingDotSlash; pathResults = pathResults.filter((r) => !r.matchedPattern); } - if (typeof pathPattern === "string" || matchedPath === void 0 || comparePaths2(key, matchedPath) !== 1 /* GreaterThan */) { + if (typeof pathPattern === "string" || matchedPath === void 0 || comparePaths2(keyWithoutLeadingDotSlash, matchedPath) !== 1 /* GreaterThan */) { pathResults.push({ matchedPattern: isMatch, - results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports && isMatch, host).map(({ name, kind, extension }) => nameAndKind(name, kind, extension)) + results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost).map(({ name, kind, extension }) => nameAndKind(name, kind, extension)) }); } } @@ -172693,7 +177391,9 @@ function addCompletionEntriesFromPathsOrExports(result, isExports, fragment, bas pathResults.forEach((pathResult) => pathResult.results.forEach((r) => result.add(r))); return matchedPath !== void 0; } -function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, compilerOptions, host, extensionOptions, typeChecker) { +function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, program, host, moduleSpecifierResolutionHost, extensionOptions) { + const typeChecker = program.getTypeChecker(); + const compilerOptions = program.getCompilerOptions(); const { baseUrl, paths } = compilerOptions; const result = createNameAndKindSet(); const moduleResolution = getEmitModuleResolutionKind(compilerOptions); @@ -172703,7 +177403,9 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c fragment, absolute, extensionOptions, + program, host, + moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ @@ -172713,7 +177415,7 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c } if (paths) { const absolute = getPathsBasePath(compilerOptions, host); - addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, host, paths); + addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, paths); } const fragmentDirectory = getFragmentDirectory(fragment); for (const ambientName of getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker)) { @@ -172724,7 +177426,7 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c void 0 )); } - getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); + getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result); if (moduleResolutionUsesNodeModules(moduleResolution)) { let foundGlobal = false; if (fragmentDirectory === void 0) { @@ -172742,6 +177444,26 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c } } if (!foundGlobal) { + const resolvePackageJsonExports = getResolvePackageJsonExports(compilerOptions); + const resolvePackageJsonImports = getResolvePackageJsonImports(compilerOptions); + let seenPackageScope = false; + const importsLookup = (directory) => { + if (resolvePackageJsonImports && !seenPackageScope) { + const packageFile = combinePaths(directory, "package.json"); + if (seenPackageScope = tryFileExists(host, packageFile)) { + const packageJson = readJson(packageFile, host); + exportsOrImportsLookup( + packageJson.imports, + fragment, + directory, + /*isExports*/ + false, + /*isImports*/ + true + ); + } + } + }; let ancestorLookup = (ancestor) => { const nodeModules = combinePaths(ancestor, "node_modules"); if (tryDirectoryExists(host, nodeModules)) { @@ -172749,7 +177471,9 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c fragment, nodeModules, extensionOptions, + program, host, + moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ @@ -172757,57 +177481,77 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c result ); } + importsLookup(ancestor); }; - if (fragmentDirectory && getResolvePackageJsonExports(compilerOptions)) { - const nodeModulesDirectoryLookup = ancestorLookup; + if (fragmentDirectory && resolvePackageJsonExports) { + const nodeModulesDirectoryOrImportsLookup = ancestorLookup; ancestorLookup = (ancestor) => { const components = getPathComponents(fragment); components.shift(); let packagePath = components.shift(); if (!packagePath) { - return nodeModulesDirectoryLookup(ancestor); + return nodeModulesDirectoryOrImportsLookup(ancestor); } if (startsWith(packagePath, "@")) { const subName = components.shift(); if (!subName) { - return nodeModulesDirectoryLookup(ancestor); + return nodeModulesDirectoryOrImportsLookup(ancestor); } packagePath = combinePaths(packagePath, subName); } + if (resolvePackageJsonImports && startsWith(packagePath, "#")) { + return importsLookup(ancestor); + } const packageDirectory = combinePaths(ancestor, "node_modules", packagePath); const packageFile = combinePaths(packageDirectory, "package.json"); if (tryFileExists(host, packageFile)) { const packageJson = readJson(packageFile, host); - const exports2 = packageJson.exports; - if (exports2) { - if (typeof exports2 !== "object" || exports2 === null) { - return; - } - const keys = getOwnKeys(exports2); - const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = getConditions(compilerOptions, mode); - addCompletionEntriesFromPathsOrExports( - result, - /*isExports*/ - true, - fragmentSubpath, - packageDirectory, - extensionOptions, - host, - keys, - (key) => singleElementArray(getPatternFromFirstMatchingCondition(exports2[key], conditions)), - comparePatternKeys - ); - return; - } + const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); + exportsOrImportsLookup( + packageJson.exports, + fragmentSubpath, + packageDirectory, + /*isExports*/ + true, + /*isImports*/ + false + ); + return; } - return nodeModulesDirectoryLookup(ancestor); + return nodeModulesDirectoryOrImportsLookup(ancestor); }; } - forEachAncestorDirectory(scriptPath, ancestorLookup); + forEachAncestorDirectoryStoppingAtGlobalCache(host, scriptPath, ancestorLookup); } } return arrayFrom(result.values()); + function exportsOrImportsLookup(lookupTable, fragment2, baseDirectory, isExports, isImports) { + if (typeof lookupTable !== "object" || lookupTable === null) { + return; + } + const keys = getOwnKeys(lookupTable); + const conditions = getConditions(compilerOptions, mode); + addCompletionEntriesFromPathsOrExportsOrImports( + result, + isExports, + isImports, + fragment2, + baseDirectory, + extensionOptions, + program, + host, + moduleSpecifierResolutionHost, + keys, + (key) => { + const pattern = getPatternFromFirstMatchingCondition(lookupTable[key], conditions); + if (pattern === void 0) { + return void 0; + } + return singleElementArray(endsWith(key, "/") && endsWith(pattern, "/") ? pattern + "*" : pattern); + }, + comparePatternKeys + ); + } } function getPatternFromFirstMatchingCondition(target, conditions) { if (typeof target === "string") { @@ -172825,25 +177569,28 @@ function getPatternFromFirstMatchingCondition(target, conditions) { function getFragmentDirectory(fragment) { return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; } -function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, isExportsWildcard, host) { - if (!endsWith(path, "*")) { - return !path.includes("*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray; +function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) { + const parsedPath = tryParsePattern(path); + if (!parsedPath) { + return emptyArray; + } + if (typeof parsedPath === "string") { + return justPathMappingName(path, "script" /* scriptElement */); } - const pathPrefix = path.slice(0, path.length - 1); - const remainingFragment = tryRemovePrefix(fragment, pathPrefix); + const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix); if (remainingFragment === void 0) { - const starIsFullPathComponent = path[path.length - 2] === "/"; - return starIsFullPathComponent ? justPathMappingName(pathPrefix, "directory" /* directory */) : flatMap(patterns, (pattern) => { + const starIsFullPathComponent = endsWith(path, "/*"); + return starIsFullPathComponent ? justPathMappingName(parsedPath.prefix, "directory" /* directory */) : flatMap(patterns, (pattern) => { var _a; - return (_a = getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExportsWildcard, host)) == null ? void 0 : _a.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest })); + return (_a = getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)) == null ? void 0 : _a.map(({ name, ...rest }) => ({ name: parsedPath.prefix + name + parsedPath.suffix, ...rest })); }); } - return flatMap(patterns, (pattern) => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, host)); + return flatMap(patterns, (pattern) => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)); function justPathMappingName(name, kind) { return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: void 0 }] : emptyArray; } } -function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, host) { +function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) { if (!host.readDirectory) { return void 0; } @@ -172856,35 +177603,67 @@ function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensio const normalizedPrefixBase = hasTrailingDirectorySeparator(parsed.prefix) ? "" : getBaseFileName(normalizedPrefix); const fragmentHasPath = containsSlash(fragment); const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; + const getCommonSourceDirectory2 = () => moduleSpecifierResolutionHost.getCommonSourceDirectory(); + const ignoreCase = !hostUsesCaseSensitiveFileNames(moduleSpecifierResolutionHost); + const outDir = program.getCompilerOptions().outDir; + const declarationDir = program.getCompilerOptions().declarationDir; const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; + const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); + const possibleInputBaseDirectoryForOutDir = isImports && outDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, outDir, getCommonSourceDirectory2); + const possibleInputBaseDirectoryForDeclarationDir = isImports && declarationDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, declarationDir, getCommonSourceDirectory2); const normalizedSuffix = normalizePath(parsed.suffix); const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); - const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; - const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); - const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; + const inputExtension = normalizedSuffix ? getPossibleOriginalInputExtensionForExtension("_" + normalizedSuffix) : void 0; + const matchingSuffixes = [ + declarationExtension && changeExtension(normalizedSuffix, declarationExtension), + ...inputExtension ? inputExtension.map((ext) => changeExtension(normalizedSuffix, ext)) : [], + normalizedSuffix + ].filter(isString); const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"]; - const matches = mapDefined(tryReadDirectory( - host, - baseDirectory, - extensionOptions.extensionsToSearch, - /*exclude*/ - void 0, - includeGlobs - ), (match) => { - const trimmedWithPattern = trimPrefixAndSuffix(match); - if (trimmedWithPattern) { - if (containsSlash(trimmedWithPattern)) { - return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]); - } - const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, host.getCompilationSettings(), extensionOptions, isExportsWildcard); - return nameAndKind(name, "script" /* scriptElement */, extension); + const isExportsOrImportsWildcard = (isExports || isImports) && endsWith(pattern, "/*"); + let matches = getMatchesWithPrefix(baseDirectory); + if (possibleInputBaseDirectoryForOutDir) { + matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForOutDir)); + } + if (possibleInputBaseDirectoryForDeclarationDir) { + matches = concatenate(matches, getMatchesWithPrefix(possibleInputBaseDirectoryForDeclarationDir)); + } + if (!normalizedSuffix) { + matches = concatenate(matches, getDirectoryMatches(baseDirectory)); + if (possibleInputBaseDirectoryForOutDir) { + matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForOutDir)); } - }); - const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir)); - return [...matches, ...directories]; - function trimPrefixAndSuffix(path) { + if (possibleInputBaseDirectoryForDeclarationDir) { + matches = concatenate(matches, getDirectoryMatches(possibleInputBaseDirectoryForDeclarationDir)); + } + } + return matches; + function getMatchesWithPrefix(directory) { + const completePrefix = fragmentHasPath ? directory : ensureTrailingDirectorySeparator(directory) + normalizedPrefixBase; + return mapDefined(tryReadDirectory( + host, + directory, + extensionOptions.extensionsToSearch, + /*exclude*/ + void 0, + includeGlobs + ), (match) => { + const trimmedWithPattern = trimPrefixAndSuffix(match, completePrefix); + if (trimmedWithPattern) { + if (containsSlash(trimmedWithPattern)) { + return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]); + } + const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsOrImportsWildcard); + return nameAndKind(name, "script" /* scriptElement */, extension); + } + }); + } + function getDirectoryMatches(directoryName) { + return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir)); + } + function trimPrefixAndSuffix(path, prefix) { return firstDefined(matchingSuffixes, (suffix) => { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); + const inner = withoutStartAndEnd(normalizePath(path), prefix, suffix); return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); }); } @@ -172904,7 +177683,8 @@ function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) { } return nonRelativeModuleNames; } -function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) { +function getTripleSlashReferenceCompletion(sourceFile, position, program, host, moduleSpecifierResolutionHost) { + const compilerOptions = program.getCompilerOptions(); const token = getTokenAtPosition(sourceFile, position); const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); const range = commentRanges && find(commentRanges, (commentRange) => position >= commentRange.pos && position <= commentRange.end); @@ -172922,14 +177702,17 @@ function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions toComplete, scriptPath, getExtensionOptions(compilerOptions, 0 /* Filename */, sourceFile), + program, host, + moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ true, sourceFile.path - ) : kind === "types" ? getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile)) : Debug.fail(); + ) : kind === "types" ? getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile)) : Debug.fail(); return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values())); } -function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result = createNameAndKindSet()) { +function getCompletionEntriesFromTypings(program, host, moduleSpecifierResolutionHost, scriptPath, fragmentDirectory, extensionOptions, result = createNameAndKindSet()) { + const options = program.getCompilerOptions(); const seen = /* @__PURE__ */ new Map(); const typeRoots = tryAndIgnoreErrors(() => getEffectiveTypeRoots(options, host)) || emptyArray; for (const root of typeRoots) { @@ -172963,7 +177746,9 @@ function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDire remainingFragment, baseDirectory, extensionOptions, + program, host, + moduleSpecifierResolutionHost, /*moduleSpecifierIsRelative*/ false, /*exclude*/ @@ -173033,11 +177818,9 @@ __export(ts_FindAllReferences_exports, { getImplementationsAtPosition: () => getImplementationsAtPosition, getImportOrExportSymbol: () => getImportOrExportSymbol, getReferenceEntriesForNode: () => getReferenceEntriesForNode, - getTextSpanOfEntry: () => getTextSpanOfEntry, isContextWithStartAndEndNode: () => isContextWithStartAndEndNode, isDeclarationOfSymbol: () => isDeclarationOfSymbol, isWriteAccessForReference: () => isWriteAccessForReference, - nodeEntry: () => nodeEntry, toContextSpan: () => toContextSpan, toHighlightSpan: () => toHighlightSpan, toReferenceEntry: () => toReferenceEntry, @@ -173093,14 +177876,14 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { } if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 213 /* CallExpression */: + case 214 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 260 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 261 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 80 /* Identifier */) { directImports.push(name); @@ -173111,7 +177894,8 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { break; case 80 /* Identifier */: break; - case 271 /* ImportEqualsDeclaration */: + // TODO: GH#23879 + case 272 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -173120,11 +177904,11 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { false ); break; - case 272 /* ImportDeclaration */: - case 351 /* JSDocImportTag */: + case 273 /* ImportDeclaration */: + case 352 /* JSDocImportTag */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 275 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -173137,10 +177921,10 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 278 /* ExportDeclaration */: + case 279 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 280 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 281 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /*addTransitiveDependencies*/ @@ -173150,7 +177934,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { directImports.push(direct); } break; - case 205 /* ImportType */: + case 206 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -173189,7 +177973,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { if (!alreadyAddedDirect) directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 307 /* SourceFile */ || sourceFileLike.kind === 267 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 308 /* SourceFile */ || sourceFileLike.kind === 268 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -173240,7 +178024,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 271 /* ImportEqualsDeclaration */) { + if (decl.kind === 272 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -173250,7 +178034,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c handleNamespaceImportLike(decl); return; } - if (decl.kind === 205 /* ImportType */) { + if (decl.kind === 206 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -173264,7 +178048,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c if (decl.moduleSpecifier.kind !== 11 /* StringLiteral */) { return; } - if (decl.kind === 278 /* ExportDeclaration */) { + if (decl.kind === 279 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -173273,10 +178057,10 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 275 /* NamedImports */: + case 276 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -173301,16 +178085,16 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c } for (const element of namedBindings.elements) { const { name, propertyName } = element; - if (!isNameMatch((propertyName || name).escapedText)) { + if (!isNameMatch(moduleExportNameTextEscaped(propertyName || name))) { continue; } if (propertyName) { singleReferences.push(propertyName); - if (!isForRename || name.escapedText === exportSymbol.escapedName) { + if (!isForRename || moduleExportNameTextEscaped(name) === exportSymbol.escapedName) { addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 281 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 282 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -173333,7 +178117,7 @@ function findModuleReferences(program, sourceFiles, searchModuleSymbol) { const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 307 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 308 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -173374,7 +178158,7 @@ function getDirectImportsMap(sourceFiles, checker, cancellationToken) { return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 307 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 308 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -173387,15 +178171,15 @@ function forEachImport(sourceFile, action) { } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 278 /* ExportDeclaration */: - case 272 /* ImportDeclaration */: { + case 279 /* ExportDeclaration */: + case 273 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 271 /* ImportEqualsDeclaration */: { + case 272 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -173413,7 +178197,7 @@ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 211 /* PropertyAccessExpression */) { + if (parent2.kind === 212 /* PropertyAccessExpression */) { return ((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -173526,15 +178310,15 @@ function getExportNode(parent2, node) { function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return !parent2.propertyName; - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: + case 274 /* ImportClause */: + case 275 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 208 /* BindingElement */: + case 209 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -173564,21 +178348,21 @@ function getContainingModuleSymbol(importer, checker) { return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 213 /* CallExpression */) { + if (node.kind === 214 /* CallExpression */ || node.kind === 352 /* JSDocImportTag */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 307 /* SourceFile */) { + if (parent2.kind === 308 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 268 /* ModuleBlock */); + Debug.assert(parent2.kind === 269 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 267 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; + return node.kind === 268 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 283 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; + return eq.moduleReference.kind === 284 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; } // src/services/findAllReferences.ts @@ -173646,32 +178430,32 @@ function getContextNodeForNodeEntry(node) { function getContextNode(node) { if (!node) return void 0; switch (node.kind) { - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 208 /* BindingElement */: + case 209 /* BindingElement */: return getContextNode(node.parent.parent); - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: return node.parent.parent.parent; - case 281 /* ExportSpecifier */: - case 274 /* NamespaceImport */: + case 282 /* ExportSpecifier */: + case 275 /* NamespaceImport */: return node.parent.parent; - case 273 /* ImportClause */: - case 280 /* NamespaceExport */: + case 274 /* ImportClause */: + case 281 /* NamespaceExport */: return node.parent; - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 250 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor(node.parent, (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2)) ) : node; - case 255 /* SwitchStatement */: + case 256 /* SwitchStatement */: return { start: find(node.getChildren(node.getSourceFile()), (node2) => node2.kind === 109 /* SwitchKeyword */), end: node.caseBlock @@ -173713,11 +178497,11 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { + if (node.parent.kind === 212 /* PropertyAccessExpression */ || node.parent.kind === 209 /* BindingElement */ || node.parent.kind === 213 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); - const seenNodes = /* @__PURE__ */ new Map(); + const seenNodes = /* @__PURE__ */ new Set(); while (!queue.isEmpty()) { const entry = queue.dequeue(); if (!addToSeen(seenNodes, getNodeId(entry.node))) { @@ -173734,11 +178518,11 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 307 /* SourceFile */) { + if (node.kind === 308 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 305 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -173932,12 +178716,12 @@ function implementationKindDisplayParts(node, checker) { const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 210 /* ObjectLiteralExpression */) { + } else if (node.kind === 211 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("object literal"), punctuationPart(22 /* CloseParenToken */)] }; - } else if (node.kind === 231 /* ClassExpression */) { + } else if (node.kind === 232 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(22 /* CloseParenToken */)] @@ -173974,7 +178758,7 @@ function getTextSpan(node, sourceFile, endNode2) { start += 1; end -= 1; } - if ((endNode2 == null ? void 0 : endNode2.kind) === 269 /* CaseBlock */) { + if ((endNode2 == null ? void 0 : endNode2.kind) === 270 /* CaseBlock */) { end = endNode2.getFullStart(); } return createTextSpanFromBounds(start, end); @@ -173996,46 +178780,47 @@ function isDeclarationOfSymbol(node, target) { function declarationIsWriteAccess(decl) { if (!!(decl.flags & 33554432 /* Ambient */)) return true; switch (decl.kind) { - case 226 /* BinaryExpression */: - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: + case 227 /* BinaryExpression */: + case 209 /* BindingElement */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: case 90 /* DefaultKeyword */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 281 /* ExportSpecifier */: - case 273 /* ImportClause */: - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 264 /* InterfaceDeclaration */: - case 338 /* JSDocCallbackTag */: - case 346 /* JSDocTypedefTag */: - case 291 /* JsxAttribute */: - case 267 /* ModuleDeclaration */: - case 270 /* NamespaceExportDeclaration */: - case 274 /* NamespaceImport */: - case 280 /* NamespaceExport */: - case 169 /* Parameter */: - case 304 /* ShorthandPropertyAssignment */: - case 265 /* TypeAliasDeclaration */: - case 168 /* TypeParameter */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: + case 282 /* ExportSpecifier */: + case 274 /* ImportClause */: + // default import + case 272 /* ImportEqualsDeclaration */: + case 277 /* ImportSpecifier */: + case 265 /* InterfaceDeclaration */: + case 339 /* JSDocCallbackTag */: + case 347 /* JSDocTypedefTag */: + case 292 /* JsxAttribute */: + case 268 /* ModuleDeclaration */: + case 271 /* NamespaceExportDeclaration */: + case 275 /* NamespaceImport */: + case 281 /* NamespaceExport */: + case 170 /* Parameter */: + case 305 /* ShorthandPropertyAssignment */: + case 266 /* TypeAliasDeclaration */: + case 169 /* TypeParameter */: return true; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 177 /* Constructor */: + case 175 /* MethodDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: return !!decl.body; - case 260 /* VariableDeclaration */: - case 172 /* PropertyDeclaration */: + case 261 /* VariableDeclaration */: + case 173 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 173 /* MethodSignature */: - case 171 /* PropertySignature */: - case 348 /* JSDocPropertyTag */: - case 341 /* JSDocParameterTag */: + case 174 /* MethodSignature */: + case 172 /* PropertySignature */: + case 349 /* JSDocPropertyTag */: + case 342 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -174257,9 +179042,9 @@ var Core; if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 307 /* SourceFile */: + case 308 /* SourceFile */: break; - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -174327,7 +179112,7 @@ var Core; /*useLocalSymbolForExportSpecifier*/ !isForRenameWithPrefixAndSuffixText(options) ) || originalSymbol; - const searchMeaning = node ? getIntersectingMeaningFromDeclarations(node, symbol) : 7 /* All */; + const searchMeaning = node && options.use !== 2 /* Rename */ ? getIntersectingMeaningFromDeclarations(node, symbol) : 7 /* All */; const result = []; const state = new State(sourceFiles, sourceFilesSet, node ? getSpecialSearchKind(node) : 0 /* None */, checker, cancellationToken, searchMeaning, options, result); const exportSpecifier = !isForRenameWithPrefixAndSuffixText(options) || !symbol.declarations ? void 0 : find(symbol.declarations, isExportSpecifier); @@ -174383,7 +179168,7 @@ var Core; } function getSpecialSearchKind(node) { switch (node.kind) { - case 176 /* Constructor */: + case 177 /* Constructor */: case 137 /* ConstructorKeyword */: return 1 /* Constructor */; case 80 /* Identifier */: @@ -174391,6 +179176,7 @@ var Core; Debug.assert(node.parent.name === node); return 2 /* Class */; } + // falls through default: return 0 /* None */; } @@ -174564,8 +179350,8 @@ var Core; function shouldAddSingleReference(singleRef, state) { if (!hasMatchingMeaning(singleRef, state)) return false; if (state.options.use !== 2 /* Rename */) return true; - if (!isIdentifier(singleRef)) return false; - return !(isImportOrExportSpecifier(singleRef.parent) && singleRef.escapedText === "default" /* Default */); + if (!isIdentifier(singleRef) && !isImportOrExportSpecifier(singleRef.parent)) return false; + return !(isImportOrExportSpecifier(singleRef.parent) && moduleExportNameIsDefault(singleRef)); } function searchForImportedSymbol(symbol, state) { if (!symbol.declarations) return; @@ -174584,7 +179370,7 @@ var Core; } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 231 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 219 /* FunctionExpression */ || valueDeclaration.kind === 232 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -174593,7 +179379,7 @@ var Core; if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 264 /* ClassDeclaration */); } return void 0; } @@ -174610,7 +179396,7 @@ var Core; if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 307 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 308 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -174722,12 +179508,13 @@ var Core; if (isJSDocMemberName(node.parent)) { return true; } + // falls through I guess case 80 /* Identifier */: return node.text.length === searchSymbolName.length; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: { const str = node; - return (isLiteralNameOfPropertyDeclarationOrIndexAccess(str) || isNameOfModuleDeclaration(node) || isExpressionOfExternalModuleImportEqualsDeclaration(node) || isCallExpression(node.parent) && isBindableObjectDefinePropertyCall(node.parent) && node.parent.arguments[1] === node) && str.text.length === searchSymbolName.length; + return str.text.length === searchSymbolName.length && (isLiteralNameOfPropertyDeclarationOrIndexAccess(str) || isNameOfModuleDeclaration(node) || isExpressionOfExternalModuleImportEqualsDeclaration(node) || isCallExpression(node.parent) && isBindableObjectDefinePropertyCall(node.parent) && node.parent.arguments[1] === node || isImportOrExportSpecifier(node.parent)); } case 9 /* NumericLiteral */: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length; @@ -174793,7 +179580,7 @@ var Core; return; } if (isExportSpecifier(parent2)) { - Debug.assert(referenceLocation.kind === 80 /* Identifier */); + Debug.assert(referenceLocation.kind === 80 /* Identifier */ || referenceLocation.kind === 11 /* StringLiteral */); getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere); return; } @@ -174843,7 +179630,7 @@ var Core; return; } if (!propertyName) { - if (!(state.options.use === 2 /* Rename */ && name.escapedText === "default" /* Default */)) { + if (!(state.options.use === 2 /* Rename */ && moduleExportNameIsDefault(name))) { addRef(); } } else if (referenceLocation === propertyName) { @@ -174859,7 +179646,7 @@ var Core; } } if (!isForRenameWithPrefixAndSuffixText(state.options) || alwaysGetReferences) { - const isDefaultExport = referenceLocation.escapedText === "default" || exportSpecifier.name.escapedText === "default"; + const isDefaultExport = moduleExportNameIsDefault(referenceLocation) || moduleExportNameIsDefault(exportSpecifier.name); const exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; const exportSymbol = Debug.checkDefined(exportSpecifier.symbol); const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker); @@ -174960,14 +179747,14 @@ var Core; if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 137 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 177 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 174 /* MethodDeclaration */) { + if (decl && decl.kind === 175 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 110 /* ThisKeyword */, (thisKeyword) => { @@ -174989,7 +179776,7 @@ var Core; return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 176 /* Constructor */); + Debug.assert(decl.kind === 177 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 108 /* SuperKeyword */, (node) => { @@ -175023,7 +179810,7 @@ var Core; if (refNode.kind !== 80 /* Identifier */) { return; } - if (refNode.parent.kind === 304 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 305 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } const containingNode = getContainingNodeIfInHeritageClause(refNode); @@ -175038,14 +179825,14 @@ var Core; addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 241 /* Block */) { + if (body.kind === 242 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); }); } else { addIfImplementation(body); } - } else if (isAssertionExpression(typeHavingNode)) { + } else if (isAssertionExpression(typeHavingNode) || isSatisfiesExpression(typeHavingNode)) { addIfImplementation(typeHavingNode.expression); } } @@ -175058,13 +179845,13 @@ var Core; } function isImplementationExpression(node) { switch (node.kind) { - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 210 /* ObjectLiteralExpression */: - case 231 /* ClassExpression */: - case 209 /* ArrayLiteralExpression */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 211 /* ObjectLiteralExpression */: + case 232 /* ClassExpression */: + case 210 /* ArrayLiteralExpression */: return true; default: return false; @@ -175100,13 +179887,13 @@ var Core; } let staticFlag = 256 /* Static */; switch (searchSpaceNode.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -175128,7 +179915,7 @@ var Core; return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 80 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; + return node.kind === 80 /* Identifier */ && node.parent.kind === 170 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -175140,32 +179927,36 @@ var Core; ); let staticFlag = 256 /* Static */; switch (searchSpaceNode.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + // falls through + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 307 /* SourceFile */: + case 308 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: + // falls through + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: break; + // Computed properties in classes are not handled here because references to this are illegal, + // so there is no point finding references to them. default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 307 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 308 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -175180,18 +179971,18 @@ var Core; ); if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 263 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: - case 210 /* ObjectLiteralExpression */: + case 232 /* ClassExpression */: + case 264 /* ClassDeclaration */: + case 211 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 307 /* SourceFile */: - return container.kind === 307 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 308 /* SourceFile */: + return container.kind === 308 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -175315,7 +180106,7 @@ var Core; Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 281 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 282 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -175355,21 +180146,21 @@ var Core; ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 208 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 209 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } } } function getPropertySymbolsFromBaseTypes(symbol, propertyName, checker, cb) { - const seen = /* @__PURE__ */ new Map(); + const seen = /* @__PURE__ */ new Set(); return recur(symbol); function recur(symbol2) { - if (!(symbol2.flags & (32 /* Class */ | 64 /* Interface */)) || !addToSeen(seen, getSymbolId(symbol2))) return; + if (!(symbol2.flags & (32 /* Class */ | 64 /* Interface */)) || !addToSeen(seen, symbol2)) return; return firstDefined(symbol2.declarations, (declaration) => firstDefined(getAllSuperTypeNodes(declaration), (typeReference) => { const type = checker.getTypeAtLocation(typeReference); - const propertySymbol = type && type.symbol && checker.getPropertyOfType(type, propertyName); - return type && propertySymbol && (firstDefined(checker.getRootSymbols(propertySymbol), cb) || recur(type.symbol)); + const propertySymbol = type.symbol && checker.getPropertyOfType(type, propertyName); + return propertySymbol && firstDefined(checker.getRootSymbols(propertySymbol), cb) || type.symbol && recur(type.symbol); })); } } @@ -175459,7 +180250,6 @@ var Core; var ts_GoToDefinition_exports = {}; __export(ts_GoToDefinition_exports, { createDefinitionInfo: () => createDefinitionInfo, - findReferenceInPosition: () => findReferenceInPosition, getDefinitionAndBoundSpan: () => getDefinitionAndBoundSpan, getDefinitionAtPosition: () => getDefinitionAtPosition, getReferenceAtPosition: () => getReferenceAtPosition, @@ -175481,7 +180271,10 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { - return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; + const def = getDefinitionFromOverriddenMember(typeChecker, node); + if (def !== void 0 || node.kind !== 164 /* OverrideKeyword */) { + return def || emptyArray; + } } if (isJumpStatementTarget(node)) { const label = getTargetLabel(node.parent, node.text); @@ -175495,13 +180288,11 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles )] : void 0; } switch (node.kind) { - case 107 /* ReturnKeyword */: - const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)); - return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; case 90 /* DefaultKeyword */: if (!isDefaultClause(node.parent)) { break; } + // falls through case 84 /* CaseKeyword */: const switchStatement = findAncestor(node.parent, isSwitchStatement); if (switchStatement) { @@ -175509,15 +180300,14 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles } break; } - if (node.kind === 135 /* AwaitKeyword */) { - const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 134 /* AsyncKeyword */); - return isAsyncFunction2 ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; - } - if (node.kind === 127 /* YieldKeyword */) { - const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isGeneratorFunction = functionDeclaration && functionDeclaration.asteriskToken; - return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; + let findFunctionDecl; + switch (node.kind) { + case 107 /* ReturnKeyword */: + case 135 /* AwaitKeyword */: + case 127 /* YieldKeyword */: + findFunctionDecl = isFunctionLikeDeclaration; + const functionDeclaration = findAncestor(node, findFunctionDecl); + return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; } if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) { const classDecl = node.parent.parent; @@ -175567,6 +180357,9 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles }]; } } + if (isModifier(node) && (isClassElement(parent2) || isNamedDeclaration(parent2))) { + symbol = parent2.symbol; + } if (!symbol) { return concatenate(fileReferenceDefinition, getDefinitionInfoForIndexSignatures(node, typeChecker)); } @@ -175574,14 +180367,15 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles const calledDeclaration = tryGetSignatureDeclaration(typeChecker, node); if (calledDeclaration && !(isJsxOpeningLikeElement(node.parent) && isJsxConstructorLike(calledDeclaration))) { const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration, failedAliasResolution); + let declarationFilter = (d) => d !== calledDeclaration; if (typeChecker.getRootSymbols(symbol).some((s) => symbolMatchesSignature(s, calledDeclaration))) { - return [sigInfo]; - } else { - const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray; - return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; + if (!isConstructorDeclaration(calledDeclaration)) return [sigInfo]; + declarationFilter = (d) => d !== calledDeclaration && (isClassDeclaration(d) || isClassExpression(d)); } + const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) || emptyArray; + return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } - if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 305 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -175635,10 +180429,23 @@ function getDefinitionFromOverriddenMember(typeChecker, node) { const expression = skipParentheses(baseTypeNode.expression); const base = isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression); if (!base) return; - const name = unescapeLeadingUnderscores(getTextOfPropertyName(classElement.name)); - const symbol = hasStaticModifier(classElement) ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name) : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name); - if (!symbol) return; - return getDefinitionFromSymbol(typeChecker, symbol, node); + const baseType = hasStaticModifier(classElement) ? typeChecker.getTypeOfSymbol(base) : typeChecker.getDeclaredTypeOfSymbol(base); + let baseProp; + if (isComputedPropertyName(classElement.name)) { + const prop = typeChecker.getSymbolAtLocation(classElement.name); + if (!prop) { + return; + } + if (isKnownSymbol(prop)) { + baseProp = find(typeChecker.getPropertiesOfType(baseType), (s) => s.escapedName === prop.escapedName); + } else { + baseProp = typeChecker.getPropertyOfType(baseType, unescapeLeadingUnderscores(prop.escapedName)); + } + } else { + baseProp = typeChecker.getPropertyOfType(baseType, unescapeLeadingUnderscores(getTextOfPropertyName(classElement.name))); + } + if (!baseProp) return; + return getDefinitionFromSymbol(typeChecker, baseProp, node); } function getReferenceAtPosition(sourceFile, position, program) { var _a, _b; @@ -175762,12 +180569,16 @@ function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) { false ); } - const { symbol, failedAliasResolution } = getSymbol( + let { symbol, failedAliasResolution } = getSymbol( node, typeChecker, /*stopAtAlias*/ false ); + if (isModifier(node) && (isClassElement(node.parent) || isNamedDeclaration(node.parent))) { + symbol = node.parent.symbol; + failedAliasResolution = false; + } if (!symbol) return void 0; const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker); @@ -175816,13 +180627,13 @@ function getSymbol(node, checker, stopAtAlias) { return { symbol, failedAliasResolution }; } function shouldSkipAlias(node, declaration) { - if (node.kind !== 80 /* Identifier */) { + if (node.kind !== 80 /* Identifier */ && (node.kind !== 11 /* StringLiteral */ || !isImportOrExportSpecifier(node.parent))) { return false; } if (node.parent === declaration) { return true; } - if (declaration.kind === 274 /* NamespaceImport */) { + if (declaration.kind === 275 /* NamespaceImport */) { return false; } return true; @@ -175836,9 +180647,9 @@ function isExpandoDeclaration(node) { }); return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */; } -function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, excludeDeclaration) { - const filteredDeclarations = filter(symbol.declarations, (d) => d !== excludeDeclaration); - const signatureDefinition = getConstructSignatureDefinition() || getCallSignatureDefinition(); +function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) { + const filteredDeclarations = declarationFilter !== void 0 ? filter(symbol.declarations, declarationFilter) : symbol.declarations; + const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition()); if (signatureDefinition) { return signatureDefinition; } @@ -175940,18 +180751,20 @@ function isDefinitionVisible(checker, declaration) { if (!declaration.parent) return false; if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: + case 173 /* PropertyDeclaration */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + case 175 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 2 /* Private */)) return false; - case 176 /* Constructor */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 210 /* ObjectLiteralExpression */: - case 231 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: + // Public properties/methods are visible if its parents are visible, so: + // falls through + case 177 /* Constructor */: + case 304 /* PropertyAssignment */: + case 305 /* ShorthandPropertyAssignment */: + case 211 /* ObjectLiteralExpression */: + case 232 /* ClassExpression */: + case 220 /* ArrowFunction */: + case 219 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -175995,10 +180808,10 @@ function tryGetSignatureDeclaration(typeChecker, node) { } function isJsxConstructorLike(node) { switch (node.kind) { - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: + case 177 /* Constructor */: + case 186 /* ConstructorType */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: return true; default: return false; @@ -176038,14 +180851,14 @@ function provideInlayHints(context) { return; } switch (node.kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 219 /* ArrowFunction */: + case 268 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: + case 232 /* ClassExpression */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 220 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -176148,11 +180961,8 @@ function provideInlayHints(context) { if (!args || !args.length) { return; } - const candidates = []; - const signature = checker.getResolvedSignatureForSignatureHelp(expr, candidates); - if (!signature || !candidates.length) { - return; - } + const signature = checker.getResolvedSignature(expr); + if (signature === void 0) return; let signatureParamPos = 0; for (const originalArg of args) { const arg = skipParentheses(originalArg); @@ -176213,7 +181023,7 @@ function provideInlayHints(context) { } function isHintableLiteral(node) { switch (node.kind) { - case 224 /* PrefixUnaryExpression */: { + case 225 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -176221,7 +181031,7 @@ function provideInlayHints(context) { case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: return true; case 80 /* Identifier */: { const name = node.escapedText; @@ -176244,6 +181054,14 @@ function provideInlayHints(context) { if (!signature) { return; } + const typePredicate = checker.getTypePredicateOfSignature(signature); + if (typePredicate == null ? void 0 : typePredicate.type) { + const hintParts2 = typePredicateToInlayHintParts(typePredicate); + if (hintParts2) { + addTypeHints(hintParts2, getTypeAnnotationPosition(decl)); + return; + } + } const returnType = checker.getReturnTypeOfSignature(signature); if (isModuleReferenceType(returnType)) { return; @@ -176265,22 +181083,24 @@ function provideInlayHints(context) { if (!signature) { return; } - for (let i = 0; i < node.parameters.length && i < signature.parameters.length; ++i) { - const param = node.parameters[i]; - if (!isHintableDeclaration(param)) { - continue; - } - const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(param); - if (effectiveTypeAnnotation) { - continue; + let pos = 0; + for (const param of node.parameters) { + if (isHintableDeclaration(param)) { + addParameterTypeHint(param, parameterIsThisKeyword(param) ? signature.thisParameter : signature.parameters[pos]); } - const typeHints = getParameterDeclarationTypeHints(signature.parameters[i]); - if (!typeHints) { + if (parameterIsThisKeyword(param)) { continue; } - addTypeHints(typeHints, param.questionToken ? param.questionToken.end : param.name.end); + pos++; } } + function addParameterTypeHint(node, symbol) { + const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(node); + if (effectiveTypeAnnotation || symbol === void 0) return; + const typeHints = getParameterDeclarationTypeHints(symbol); + if (typeHints === void 0) return; + addTypeHints(typeHints, node.questionToken ? node.questionToken.end : node.name.end); + } function getParameterDeclarationTypeHints(symbol) { const valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || !isParameter(valueDeclaration)) { @@ -176312,6 +181132,26 @@ function provideInlayHints(context) { ); }); } + function printTypePredicateInSingleLine(typePredicate) { + const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; + const printer = createPrinterWithRemoveComments(); + return usingSingleLineStringWriter((writer) => { + const typePredicateNode = checker.typePredicateToTypePredicateNode( + typePredicate, + /*enclosingDeclaration*/ + void 0, + flags + ); + Debug.assertIsDefined(typePredicateNode, "should always get typePredicateNode"); + printer.writeNode( + 4 /* Unspecified */, + typePredicateNode, + /*sourceFile*/ + file, + writer + ); + }); + } function typeToInlayHintParts(type) { if (!shouldUseInteractiveInlayHints(preferences)) { return printTypeInSingleLine(type); @@ -176323,361 +181163,393 @@ function provideInlayHints(context) { void 0, flags ); + Debug.assertIsDefined(typeNode, "should always get typeNode"); + return getInlayHintDisplayParts(typeNode); + } + function typePredicateToInlayHintParts(typePredicate) { + if (!shouldUseInteractiveInlayHints(preferences)) { + return printTypePredicateInSingleLine(typePredicate); + } + const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; + const typeNode = checker.typePredicateToTypePredicateNode( + typePredicate, + /*enclosingDeclaration*/ + void 0, + flags + ); Debug.assertIsDefined(typeNode, "should always get typenode"); + return getInlayHintDisplayParts(typeNode); + } + function getInlayHintDisplayParts(node) { const parts = []; - visitForDisplayParts(typeNode); + visitForDisplayParts(node); return parts; - function visitForDisplayParts(node) { + function visitForDisplayParts(node2) { var _a, _b; - if (!node) { + if (!node2) { return; } - const tokenString = tokenToString(node.kind); + const tokenString = tokenToString(node2.kind); if (tokenString) { parts.push({ text: tokenString }); return; } - if (isLiteralExpression(node)) { - parts.push({ text: getLiteralText2(node) }); + if (isLiteralExpression(node2)) { + parts.push({ text: getLiteralText2(node2) }); return; } - switch (node.kind) { + switch (node2.kind) { case 80 /* Identifier */: - Debug.assertNode(node, isIdentifier); - const identifierText = idText(node); - const name = node.symbol && node.symbol.declarations && node.symbol.declarations.length && getNameOfDeclaration(node.symbol.declarations[0]); + Debug.assertNode(node2, isIdentifier); + const identifierText = idText(node2); + const name = node2.symbol && node2.symbol.declarations && node2.symbol.declarations.length && getNameOfDeclaration(node2.symbol.declarations[0]); if (name) { parts.push(getNodeDisplayPart(identifierText, name)); } else { parts.push({ text: identifierText }); } break; - case 166 /* QualifiedName */: - Debug.assertNode(node, isQualifiedName); - visitForDisplayParts(node.left); + case 167 /* QualifiedName */: + Debug.assertNode(node2, isQualifiedName); + visitForDisplayParts(node2.left); parts.push({ text: "." }); - visitForDisplayParts(node.right); + visitForDisplayParts(node2.right); break; - case 182 /* TypePredicate */: - Debug.assertNode(node, isTypePredicateNode); - if (node.assertsModifier) { + case 183 /* TypePredicate */: + Debug.assertNode(node2, isTypePredicateNode); + if (node2.assertsModifier) { parts.push({ text: "asserts " }); } - visitForDisplayParts(node.parameterName); - if (node.type) { + visitForDisplayParts(node2.parameterName); + if (node2.type) { parts.push({ text: " is " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); } break; - case 183 /* TypeReference */: - Debug.assertNode(node, isTypeReferenceNode); - visitForDisplayParts(node.typeName); - if (node.typeArguments) { + case 184 /* TypeReference */: + Debug.assertNode(node2, isTypeReferenceNode); + visitForDisplayParts(node2.typeName); + if (node2.typeArguments) { parts.push({ text: "<" }); - visitDisplayPartList(node.typeArguments, ", "); + visitDisplayPartList(node2.typeArguments, ", "); parts.push({ text: ">" }); } break; - case 168 /* TypeParameter */: - Debug.assertNode(node, isTypeParameterDeclaration); - if (node.modifiers) { - visitDisplayPartList(node.modifiers, " "); + case 169 /* TypeParameter */: + Debug.assertNode(node2, isTypeParameterDeclaration); + if (node2.modifiers) { + visitDisplayPartList(node2.modifiers, " "); } - visitForDisplayParts(node.name); - if (node.constraint) { + visitForDisplayParts(node2.name); + if (node2.constraint) { parts.push({ text: " extends " }); - visitForDisplayParts(node.constraint); + visitForDisplayParts(node2.constraint); } - if (node.default) { + if (node2.default) { parts.push({ text: " = " }); - visitForDisplayParts(node.default); + visitForDisplayParts(node2.default); } break; - case 169 /* Parameter */: - Debug.assertNode(node, isParameter); - if (node.modifiers) { - visitDisplayPartList(node.modifiers, " "); + case 170 /* Parameter */: + Debug.assertNode(node2, isParameter); + if (node2.modifiers) { + visitDisplayPartList(node2.modifiers, " "); } - if (node.dotDotDotToken) { + if (node2.dotDotDotToken) { parts.push({ text: "..." }); } - visitForDisplayParts(node.name); - if (node.questionToken) { + visitForDisplayParts(node2.name); + if (node2.questionToken) { parts.push({ text: "?" }); } - if (node.type) { + if (node2.type) { parts.push({ text: ": " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); } break; - case 185 /* ConstructorType */: - Debug.assertNode(node, isConstructorTypeNode); + case 186 /* ConstructorType */: + Debug.assertNode(node2, isConstructorTypeNode); parts.push({ text: "new " }); - visitParametersAndTypeParameters(node); + visitParametersAndTypeParameters(node2); parts.push({ text: " => " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); break; - case 186 /* TypeQuery */: - Debug.assertNode(node, isTypeQueryNode); + case 187 /* TypeQuery */: + Debug.assertNode(node2, isTypeQueryNode); parts.push({ text: "typeof " }); - visitForDisplayParts(node.exprName); - if (node.typeArguments) { + visitForDisplayParts(node2.exprName); + if (node2.typeArguments) { parts.push({ text: "<" }); - visitDisplayPartList(node.typeArguments, ", "); + visitDisplayPartList(node2.typeArguments, ", "); parts.push({ text: ">" }); } break; - case 187 /* TypeLiteral */: - Debug.assertNode(node, isTypeLiteralNode); + case 188 /* TypeLiteral */: + Debug.assertNode(node2, isTypeLiteralNode); parts.push({ text: "{" }); - if (node.members.length) { + if (node2.members.length) { parts.push({ text: " " }); - visitDisplayPartList(node.members, "; "); + visitDisplayPartList(node2.members, "; "); parts.push({ text: " " }); } parts.push({ text: "}" }); break; - case 188 /* ArrayType */: - Debug.assertNode(node, isArrayTypeNode); - visitForDisplayParts(node.elementType); + case 189 /* ArrayType */: + Debug.assertNode(node2, isArrayTypeNode); + visitForDisplayParts(node2.elementType); parts.push({ text: "[]" }); break; - case 189 /* TupleType */: - Debug.assertNode(node, isTupleTypeNode); + case 190 /* TupleType */: + Debug.assertNode(node2, isTupleTypeNode); parts.push({ text: "[" }); - visitDisplayPartList(node.elements, ", "); + visitDisplayPartList(node2.elements, ", "); parts.push({ text: "]" }); break; - case 202 /* NamedTupleMember */: - Debug.assertNode(node, isNamedTupleMember); - if (node.dotDotDotToken) { + case 203 /* NamedTupleMember */: + Debug.assertNode(node2, isNamedTupleMember); + if (node2.dotDotDotToken) { parts.push({ text: "..." }); } - visitForDisplayParts(node.name); - if (node.questionToken) { + visitForDisplayParts(node2.name); + if (node2.questionToken) { parts.push({ text: "?" }); } parts.push({ text: ": " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); break; - case 190 /* OptionalType */: - Debug.assertNode(node, isOptionalTypeNode); - visitForDisplayParts(node.type); + case 191 /* OptionalType */: + Debug.assertNode(node2, isOptionalTypeNode); + visitForDisplayParts(node2.type); parts.push({ text: "?" }); break; - case 191 /* RestType */: - Debug.assertNode(node, isRestTypeNode); + case 192 /* RestType */: + Debug.assertNode(node2, isRestTypeNode); parts.push({ text: "..." }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); break; - case 192 /* UnionType */: - Debug.assertNode(node, isUnionTypeNode); - visitDisplayPartList(node.types, " | "); + case 193 /* UnionType */: + Debug.assertNode(node2, isUnionTypeNode); + visitDisplayPartList(node2.types, " | "); break; - case 193 /* IntersectionType */: - Debug.assertNode(node, isIntersectionTypeNode); - visitDisplayPartList(node.types, " & "); + case 194 /* IntersectionType */: + Debug.assertNode(node2, isIntersectionTypeNode); + visitDisplayPartList(node2.types, " & "); break; - case 194 /* ConditionalType */: - Debug.assertNode(node, isConditionalTypeNode); - visitForDisplayParts(node.checkType); + case 195 /* ConditionalType */: + Debug.assertNode(node2, isConditionalTypeNode); + visitForDisplayParts(node2.checkType); parts.push({ text: " extends " }); - visitForDisplayParts(node.extendsType); + visitForDisplayParts(node2.extendsType); parts.push({ text: " ? " }); - visitForDisplayParts(node.trueType); + visitForDisplayParts(node2.trueType); parts.push({ text: " : " }); - visitForDisplayParts(node.falseType); + visitForDisplayParts(node2.falseType); break; - case 195 /* InferType */: - Debug.assertNode(node, isInferTypeNode); + case 196 /* InferType */: + Debug.assertNode(node2, isInferTypeNode); parts.push({ text: "infer " }); - visitForDisplayParts(node.typeParameter); + visitForDisplayParts(node2.typeParameter); break; - case 196 /* ParenthesizedType */: - Debug.assertNode(node, isParenthesizedTypeNode); + case 197 /* ParenthesizedType */: + Debug.assertNode(node2, isParenthesizedTypeNode); parts.push({ text: "(" }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); parts.push({ text: ")" }); break; - case 198 /* TypeOperator */: - Debug.assertNode(node, isTypeOperatorNode); - parts.push({ text: `${tokenToString(node.operator)} ` }); - visitForDisplayParts(node.type); + case 199 /* TypeOperator */: + Debug.assertNode(node2, isTypeOperatorNode); + parts.push({ text: `${tokenToString(node2.operator)} ` }); + visitForDisplayParts(node2.type); break; - case 199 /* IndexedAccessType */: - Debug.assertNode(node, isIndexedAccessTypeNode); - visitForDisplayParts(node.objectType); + case 200 /* IndexedAccessType */: + Debug.assertNode(node2, isIndexedAccessTypeNode); + visitForDisplayParts(node2.objectType); parts.push({ text: "[" }); - visitForDisplayParts(node.indexType); + visitForDisplayParts(node2.indexType); parts.push({ text: "]" }); break; - case 200 /* MappedType */: - Debug.assertNode(node, isMappedTypeNode); + case 201 /* MappedType */: + Debug.assertNode(node2, isMappedTypeNode); parts.push({ text: "{ " }); - if (node.readonlyToken) { - if (node.readonlyToken.kind === 40 /* PlusToken */) { + if (node2.readonlyToken) { + if (node2.readonlyToken.kind === 40 /* PlusToken */) { parts.push({ text: "+" }); - } else if (node.readonlyToken.kind === 41 /* MinusToken */) { + } else if (node2.readonlyToken.kind === 41 /* MinusToken */) { parts.push({ text: "-" }); } parts.push({ text: "readonly " }); } parts.push({ text: "[" }); - visitForDisplayParts(node.typeParameter); - if (node.nameType) { + visitForDisplayParts(node2.typeParameter); + if (node2.nameType) { parts.push({ text: " as " }); - visitForDisplayParts(node.nameType); + visitForDisplayParts(node2.nameType); } parts.push({ text: "]" }); - if (node.questionToken) { - if (node.questionToken.kind === 40 /* PlusToken */) { + if (node2.questionToken) { + if (node2.questionToken.kind === 40 /* PlusToken */) { parts.push({ text: "+" }); - } else if (node.questionToken.kind === 41 /* MinusToken */) { + } else if (node2.questionToken.kind === 41 /* MinusToken */) { parts.push({ text: "-" }); } parts.push({ text: "?" }); } parts.push({ text: ": " }); - if (node.type) { - visitForDisplayParts(node.type); + if (node2.type) { + visitForDisplayParts(node2.type); } parts.push({ text: "; }" }); break; - case 201 /* LiteralType */: - Debug.assertNode(node, isLiteralTypeNode); - visitForDisplayParts(node.literal); + case 202 /* LiteralType */: + Debug.assertNode(node2, isLiteralTypeNode); + visitForDisplayParts(node2.literal); break; - case 184 /* FunctionType */: - Debug.assertNode(node, isFunctionTypeNode); - visitParametersAndTypeParameters(node); + case 185 /* FunctionType */: + Debug.assertNode(node2, isFunctionTypeNode); + visitParametersAndTypeParameters(node2); parts.push({ text: " => " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); break; - case 205 /* ImportType */: - Debug.assertNode(node, isImportTypeNode); - if (node.isTypeOf) { + case 206 /* ImportType */: + Debug.assertNode(node2, isImportTypeNode); + if (node2.isTypeOf) { parts.push({ text: "typeof " }); } parts.push({ text: "import(" }); - visitForDisplayParts(node.argument); - if (node.assertions) { + visitForDisplayParts(node2.argument); + if (node2.assertions) { parts.push({ text: ", { assert: " }); - visitDisplayPartList(node.assertions.assertClause.elements, ", "); + visitDisplayPartList(node2.assertions.assertClause.elements, ", "); parts.push({ text: " }" }); } parts.push({ text: ")" }); - if (node.qualifier) { + if (node2.qualifier) { parts.push({ text: "." }); - visitForDisplayParts(node.qualifier); + visitForDisplayParts(node2.qualifier); } - if (node.typeArguments) { + if (node2.typeArguments) { parts.push({ text: "<" }); - visitDisplayPartList(node.typeArguments, ", "); + visitDisplayPartList(node2.typeArguments, ", "); parts.push({ text: ">" }); } break; - case 171 /* PropertySignature */: - Debug.assertNode(node, isPropertySignature); - if ((_a = node.modifiers) == null ? void 0 : _a.length) { - visitDisplayPartList(node.modifiers, " "); + case 172 /* PropertySignature */: + Debug.assertNode(node2, isPropertySignature); + if ((_a = node2.modifiers) == null ? void 0 : _a.length) { + visitDisplayPartList(node2.modifiers, " "); parts.push({ text: " " }); } - visitForDisplayParts(node.name); - if (node.questionToken) { + visitForDisplayParts(node2.name); + if (node2.questionToken) { parts.push({ text: "?" }); } - if (node.type) { + if (node2.type) { parts.push({ text: ": " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); } break; - case 181 /* IndexSignature */: - Debug.assertNode(node, isIndexSignatureDeclaration); + case 182 /* IndexSignature */: + Debug.assertNode(node2, isIndexSignatureDeclaration); parts.push({ text: "[" }); - visitDisplayPartList(node.parameters, ", "); + visitDisplayPartList(node2.parameters, ", "); parts.push({ text: "]" }); - if (node.type) { + if (node2.type) { parts.push({ text: ": " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); } break; - case 173 /* MethodSignature */: - Debug.assertNode(node, isMethodSignature); - if ((_b = node.modifiers) == null ? void 0 : _b.length) { - visitDisplayPartList(node.modifiers, " "); + case 174 /* MethodSignature */: + Debug.assertNode(node2, isMethodSignature); + if ((_b = node2.modifiers) == null ? void 0 : _b.length) { + visitDisplayPartList(node2.modifiers, " "); parts.push({ text: " " }); } - visitForDisplayParts(node.name); - if (node.questionToken) { + visitForDisplayParts(node2.name); + if (node2.questionToken) { parts.push({ text: "?" }); } - visitParametersAndTypeParameters(node); - if (node.type) { + visitParametersAndTypeParameters(node2); + if (node2.type) { + parts.push({ text: ": " }); + visitForDisplayParts(node2.type); + } + break; + case 180 /* CallSignature */: + Debug.assertNode(node2, isCallSignatureDeclaration); + visitParametersAndTypeParameters(node2); + if (node2.type) { parts.push({ text: ": " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); } break; - case 179 /* CallSignature */: - Debug.assertNode(node, isCallSignatureDeclaration); - visitParametersAndTypeParameters(node); - if (node.type) { + case 181 /* ConstructSignature */: + Debug.assertNode(node2, isConstructSignatureDeclaration); + parts.push({ text: "new " }); + visitParametersAndTypeParameters(node2); + if (node2.type) { parts.push({ text: ": " }); - visitForDisplayParts(node.type); + visitForDisplayParts(node2.type); } break; - case 207 /* ArrayBindingPattern */: - Debug.assertNode(node, isArrayBindingPattern); + case 208 /* ArrayBindingPattern */: + Debug.assertNode(node2, isArrayBindingPattern); parts.push({ text: "[" }); - visitDisplayPartList(node.elements, ", "); + visitDisplayPartList(node2.elements, ", "); parts.push({ text: "]" }); break; - case 206 /* ObjectBindingPattern */: - Debug.assertNode(node, isObjectBindingPattern); + case 207 /* ObjectBindingPattern */: + Debug.assertNode(node2, isObjectBindingPattern); parts.push({ text: "{" }); - if (node.elements.length) { + if (node2.elements.length) { parts.push({ text: " " }); - visitDisplayPartList(node.elements, ", "); + visitDisplayPartList(node2.elements, ", "); parts.push({ text: " " }); } parts.push({ text: "}" }); break; - case 208 /* BindingElement */: - Debug.assertNode(node, isBindingElement); - visitForDisplayParts(node.name); + case 209 /* BindingElement */: + Debug.assertNode(node2, isBindingElement); + visitForDisplayParts(node2.name); break; - case 224 /* PrefixUnaryExpression */: - Debug.assertNode(node, isPrefixUnaryExpression); - parts.push({ text: tokenToString(node.operator) }); - visitForDisplayParts(node.operand); + case 225 /* PrefixUnaryExpression */: + Debug.assertNode(node2, isPrefixUnaryExpression); + parts.push({ text: tokenToString(node2.operator) }); + visitForDisplayParts(node2.operand); break; - case 203 /* TemplateLiteralType */: - Debug.assertNode(node, isTemplateLiteralTypeNode); - visitForDisplayParts(node.head); - node.templateSpans.forEach(visitForDisplayParts); + case 204 /* TemplateLiteralType */: + Debug.assertNode(node2, isTemplateLiteralTypeNode); + visitForDisplayParts(node2.head); + node2.templateSpans.forEach(visitForDisplayParts); break; case 16 /* TemplateHead */: - Debug.assertNode(node, isTemplateHead); - parts.push({ text: getLiteralText2(node) }); + Debug.assertNode(node2, isTemplateHead); + parts.push({ text: getLiteralText2(node2) }); break; - case 204 /* TemplateLiteralTypeSpan */: - Debug.assertNode(node, isTemplateLiteralTypeSpan); - visitForDisplayParts(node.type); - visitForDisplayParts(node.literal); + case 205 /* TemplateLiteralTypeSpan */: + Debug.assertNode(node2, isTemplateLiteralTypeSpan); + visitForDisplayParts(node2.type); + visitForDisplayParts(node2.literal); break; case 17 /* TemplateMiddle */: - Debug.assertNode(node, isTemplateMiddle); - parts.push({ text: getLiteralText2(node) }); + Debug.assertNode(node2, isTemplateMiddle); + parts.push({ text: getLiteralText2(node2) }); break; case 18 /* TemplateTail */: - Debug.assertNode(node, isTemplateTail); - parts.push({ text: getLiteralText2(node) }); + Debug.assertNode(node2, isTemplateTail); + parts.push({ text: getLiteralText2(node2) }); break; - case 197 /* ThisType */: - Debug.assertNode(node, isThisTypeNode); + case 198 /* ThisType */: + Debug.assertNode(node2, isThisTypeNode); parts.push({ text: "this" }); break; + case 168 /* ComputedPropertyName */: + Debug.assertNode(node2, isComputedPropertyName); + parts.push({ text: "[" }); + visitForDisplayParts(node2.expression); + parts.push({ text: "]" }); + break; default: - Debug.failBadSyntaxKind(node); + Debug.failBadSyntaxKind(node2); } } function visitParametersAndTypeParameters(signatureDeclaration) { @@ -176691,22 +181563,22 @@ function provideInlayHints(context) { parts.push({ text: ")" }); } function visitDisplayPartList(nodes, separator) { - nodes.forEach((node, index) => { + nodes.forEach((node2, index) => { if (index > 0) { parts.push({ text: separator }); } - visitForDisplayParts(node); + visitForDisplayParts(node2); }); } - function getLiteralText2(node) { - switch (node.kind) { + function getLiteralText2(node2) { + switch (node2.kind) { case 11 /* StringLiteral */: - return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`; + return quotePreference === 0 /* Single */ ? `'${escapeString(node2.text, 39 /* singleQuote */)}'` : `"${escapeString(node2.text, 34 /* doubleQuote */)}"`; case 16 /* TemplateHead */: case 17 /* TemplateMiddle */: case 18 /* TemplateTail */: { - const rawText = node.rawText ?? escapeTemplateSubstitution(escapeString(node.text, 96 /* backtick */)); - switch (node.kind) { + const rawText = node2.rawText ?? escapeTemplateSubstitution(escapeString(node2.text, 96 /* backtick */)); + switch (node2.kind) { case 16 /* TemplateHead */: return "`" + rawText + "${"; case 17 /* TemplateMiddle */: @@ -176716,7 +181588,7 @@ function provideInlayHints(context) { } } } - return node.text; + return node2.text; } } function isUndefined(name) { @@ -176846,8 +181718,8 @@ function getJsDocCommentsFromDeclarations(declarations, checker) { const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 327 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 346 /* JSDocTypedefTag */ && declaration.kind !== 338 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 346 /* JSDocTypedefTag */ || t.kind === 338 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 341 /* JSDocParameterTag */ || t.kind === 342 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 328 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 347 /* JSDocTypedefTag */ && declaration.kind !== 339 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 347 /* JSDocTypedefTag */ || t.kind === 339 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 342 /* JSDocParameterTag */ || t.kind === 343 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -176862,20 +181734,21 @@ function getJsDocCommentsFromDeclarations(declarations, checker) { return flatten(intersperse(parts, [lineBreakPart()])); } function isIdenticalListOfDisplayParts(parts1, parts2) { - return arraysEqual(parts1, parts2, (p1, p2) => p1.kind === p2.kind && p1.text === p2.text); + return arrayIsEqualTo(parts1, parts2, (p1, p2) => p1.kind === p2.kind && p1.text === p2.text); } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 341 /* JSDocParameterTag */: - case 348 /* JSDocPropertyTag */: + case 342 /* JSDocParameterTag */: + case 349 /* JSDocPropertyTag */: return [declaration]; - case 338 /* JSDocCallbackTag */: - case 346 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 347 /* JSDocTypedefTag */: return [declaration, declaration.parent]; - case 323 /* JSDocSignature */: + case 324 /* JSDocSignature */: if (isJSDocOverloadTag(declaration.parent)) { return [declaration.parent.parent]; } + // falls through default: return getJSDocCommentsAndTags(declaration); } @@ -176884,7 +181757,7 @@ function getJsDocTagsFromDeclarations(declarations, checker) { const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 346 /* JSDocTypedefTag */ || t.kind === 338 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 341 /* JSDocParameterTag */ || t.kind === 342 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 347 /* JSDocTypedefTag */ || t.kind === 339 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 342 /* JSDocParameterTag */ || t.kind === 343 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -176906,21 +181779,21 @@ function getDisplayPartsFromComment(comment, checker) { } return flatMap( comment, - (node) => node.kind === 321 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 322 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 349 /* JSDocThrowsTag */: + case 350 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 329 /* JSDocImplementsTag */: + case 330 /* JSDocImplementsTag */: return withNode(tag.class); - case 328 /* JSDocAugmentsTag */: + case 329 /* JSDocAugmentsTag */: return withNode(tag.class); - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -176942,14 +181815,14 @@ function getCommentDisplayParts(tag, checker) { displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 344 /* JSDocTypeTag */: - case 350 /* JSDocSatisfiesTag */: + case 345 /* JSDocTypeTag */: + case 351 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: - case 348 /* JSDocPropertyTag */: - case 341 /* JSDocParameterTag */: - case 347 /* JSDocSeeTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: + case 349 /* JSDocPropertyTag */: + case 342 /* JSDocParameterTag */: + case 348 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -176972,14 +181845,14 @@ function getCommentDisplayParts(tag, checker) { } function getTagNameDisplayPart(kind) { switch (kind) { - case 341 /* JSDocParameterTag */: + case 342 /* JSDocParameterTag */: return parameterNamePart; - case 348 /* JSDocPropertyTag */: + case 349 /* JSDocPropertyTag */: return propertyNamePart; - case 345 /* JSDocTemplateTag */: + case 346 /* JSDocTemplateTag */: return typeParameterNamePart; - case 346 /* JSDocTypedefTag */: - case 338 /* JSDocCallbackTag */: + case 347 /* JSDocTypedefTag */: + case 339 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -177102,46 +181975,46 @@ function getCommentOwnerInfo(tokenAtPos, options) { } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 174 /* MethodSignature */: + case 220 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 265 /* TypeAliasDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 307 /* EnumMember */: + case 266 /* TypeAliasDeclaration */: return { commentOwner }; - case 171 /* PropertySignature */: { + case 172 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 243 /* VariableStatement */: { + case 244 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 307 /* SourceFile */: + case 308 /* SourceFile */: return "quit"; - case 267 /* ModuleDeclaration */: - return commentOwner.parent.kind === 267 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 244 /* ExpressionStatement */: + case 268 /* ModuleDeclaration */: + return commentOwner.parent.kind === 268 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 245 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 226 /* BinaryExpression */: { + case 227 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -177152,14 +182025,14 @@ function hasReturn(node, options) { return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 217 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 218 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: return rightHandSide; - case 231 /* ClassExpression */: + case 232 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -177225,9 +182098,10 @@ ${content} parsedNodes.push({ sourceFile: sourceFile2, body: bod }); } } - const { body } = parsedNodes.sort( + parsedNodes.sort( (a, b) => a.sourceFile.parseDiagnostics.length - b.sourceFile.parseDiagnostics.length - )[0]; + ); + const { body } = parsedNodes[0]; return body; } function placeNodeGroup(originalFile, changeTracker, changes, focusLocations) { @@ -177335,7 +182209,7 @@ function matchNode(a, b) { if (a.kind !== b.kind) { return false; } - if (a.kind === 176 /* Constructor */) { + if (a.kind === 177 /* Constructor */) { return a.kind === b.kind; } if (isNamedDeclaration(a) && isNamedDeclaration(b)) { @@ -177376,7 +182250,6 @@ var ts_OrganizeImports_exports = {}; __export(ts_OrganizeImports_exports, { compareImportsOrRequireStatements: () => compareImportsOrRequireStatements, compareModuleSpecifiers: () => compareModuleSpecifiers2, - getDetectionLists: () => getDetectionLists, getImportDeclarationInsertionIndex: () => getImportDeclarationInsertionIndex, getImportSpecifierInsertionIndex: () => getImportSpecifierInsertionIndex, getNamedImportSpecifierComparerWithDetection: () => getNamedImportSpecifierComparerWithDetection, @@ -177432,7 +182305,7 @@ function organizeImports(sourceFile, formatContext, host, program, preferences, } setEmitFlags(oldImportDecls[0], 1024 /* NoLeadingComments */); const oldImportGroups = shouldCombine ? group(oldImportDecls, (importDecl) => getExternalModuleName2(importDecl.moduleSpecifier)) : [oldImportDecls]; - const sortedImportGroups = shouldSort ? stableSort(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer.moduleSpecifierComparer ?? defaultComparer)) : oldImportGroups; + const sortedImportGroups = shouldSort ? toSorted(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer.moduleSpecifierComparer ?? defaultComparer)) : oldImportGroups; const newImportDecls = flatMap(sortedImportGroups, (importGroup) => getExternalModuleName2(importGroup[0].moduleSpecifier) || importGroup[0].moduleSpecifier === void 0 ? coalesce(importGroup) : importGroup); if (newImportDecls.length === 0) { changeTracker.deleteNodes( @@ -177467,7 +182340,7 @@ function organizeImports(sourceFile, formatContext, host, program, preferences, const processImportsOfSameModuleSpecifier = (importGroup) => { if (shouldRemove) importGroup = removeUnusedImports(importGroup, sourceFile, program); if (shouldCombine) importGroup = coalesceImportsWorker(importGroup, detectedModuleCaseComparer, specifierComparer, sourceFile); - if (shouldSort) importGroup = stableSort(importGroup, (s1, s2) => compareImportsOrRequireStatements(s1, s2, detectedModuleCaseComparer)); + if (shouldSort) importGroup = toSorted(importGroup, (s1, s2) => compareImportsOrRequireStatements(s1, s2, detectedModuleCaseComparer)); return importGroup; }; organizeDeclsWorker(oldImportDecls, processImportsOfSameModuleSpecifier); @@ -177643,7 +182516,7 @@ function coalesceImportsWorker(importGroup, comparer, specifierComparer, sourceF const importGroupsByAttributes = groupBy(importGroup, (decl) => { if (decl.attributes) { let attrs = decl.attributes.token + " "; - for (const x of sort(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) { + for (const x of toSorted(decl.attributes.elements, (x2, y) => compareStringsCaseSensitive(x2.name.text, y.name.text))) { attrs += x.name.text + ":"; attrs += isStringLiteralLike(x.value) ? `"${x.value.text}"` : x.value.getText() + " "; } @@ -177668,7 +182541,7 @@ function coalesceImportsWorker(importGroup, comparer, specifierComparer, sourceF ); continue; } - const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text)); + const sortedNamespaceImports = toSorted(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text)); for (const namespaceImport of sortedNamespaceImports) { coalescedImports.push( updateImportDeclarationAndClause( @@ -177703,7 +182576,7 @@ function coalesceImportsWorker(importGroup, comparer, specifierComparer, sourceF } newImportSpecifiers.push(...getNewImportSpecifiers(namedImports)); const sortedImportSpecifiers = factory.createNodeArray( - stableSort(newImportSpecifiers, specifierComparer), + toSorted(newImportSpecifiers, specifierComparer), firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma ); const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers); @@ -177751,7 +182624,7 @@ function coalesceExportsWorker(exportGroup, specifierComparer) { } const newExportSpecifiers = []; newExportSpecifiers.push(...flatMap(exportGroup2, (i) => i.exportClause && isNamedExports(i.exportClause) ? i.exportClause.elements : emptyArray)); - const sortedExportSpecifiers = stableSort(newExportSpecifiers, specifierComparer); + const sortedExportSpecifiers = toSorted(newExportSpecifiers, specifierComparer); const exportDecl = exportGroup2[0]; coalescedExports.push( factory.updateExportDeclaration( @@ -177789,7 +182662,7 @@ function updateImportDeclarationAndClause(importDeclaration, name, namedBindings return factory.updateImportDeclaration( importDeclaration, importDeclaration.modifiers, - factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings), + factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.phaseModifier, name, namedBindings), // TODO: GH#18217 importDeclaration.moduleSpecifier, importDeclaration.attributes @@ -177816,11 +182689,11 @@ function getModuleNamesFromDecls(decls) { function getModuleSpecifierExpression(declaration) { var _a; switch (declaration.kind) { - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return (_a = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression; - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -177829,7 +182702,7 @@ function hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier) { return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral(moduleName) && moduleName.text === moduleSpecifierText); } function getNewImportSpecifiers(namedImports) { - return flatMap(namedImports, (namedImport) => map(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText ? factory.updateImportSpecifier( + return flatMap(namedImports, (namedImport) => map(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && moduleExportNameTextEscaped(importSpecifier.name) === moduleExportNameTextEscaped(importSpecifier.propertyName) ? factory.updateImportSpecifier( importSpecifier, importSpecifier.isTypeOnly, /*propertyName*/ @@ -177934,15 +182807,15 @@ function compareImportKind(s1, s2) { function getImportKindOrder(s1) { var _a; switch (s1.kind) { - case 272 /* ImportDeclaration */: + case 273 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamespaceImport */) return 2; + if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportEqualsDeclaration */: return 5; - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: return 6; } } @@ -178039,12 +182912,13 @@ function collectElements(sourceFile, cancellationToken) { const res = []; addNodeOutliningSpans(sourceFile, cancellationToken, res); addRegionOutliningSpans(sourceFile, res); - return res.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start); + res.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start); + return res; } function addNodeOutliningSpans(sourceFile, cancellationToken, out) { let depthRemaining = 40; let current = 0; - const statements = [...sourceFile.statements, sourceFile.endOfFileToken]; + const statements = sourceFile.statements; const n = statements.length; while (current < n) { while (current < n && !isAnyImportSyntax(statements[current])) { @@ -178062,6 +182936,7 @@ function addNodeOutliningSpans(sourceFile, cancellationToken, out) { out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 102 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); } } + visitNode3(sourceFile.endOfFileToken); function visitNode3(n2) { var _a; if (depthRemaining === 0) return; @@ -178105,11 +182980,11 @@ function addRegionOutliningSpans(sourceFile, out) { for (const currentLineStart of lineStarts) { const lineEnd = sourceFile.getLineEndOfPosition(currentLineStart); const lineText = sourceFile.text.substring(currentLineStart, lineEnd); - const result = isRegionDelimiter(lineText); + const result = parseRegionDelimiter(lineText); if (!result || isInComment(sourceFile, currentLineStart)) { continue; } - if (!result[1]) { + if (result.isStart) { const span = createTextSpanFromBounds(sourceFile.text.indexOf("//", currentLineStart), lineEnd); regions.push(createOutliningSpan( span, @@ -178117,7 +182992,7 @@ function addRegionOutliningSpans(sourceFile, out) { span, /*autoCollapse*/ false, - result[2] || "#region" + result.name || "#region" )); } else { const region = regions.pop(); @@ -178129,14 +183004,18 @@ function addRegionOutliningSpans(sourceFile, out) { } } } -var regionDelimiterRegExp = /^#(end)?region(?:\s+(.*))?(?:\r)?$/; -function isRegionDelimiter(lineText) { +var regionDelimiterRegExp = /^#(end)?region(.*)\r?$/; +function parseRegionDelimiter(lineText) { lineText = lineText.trimStart(); if (!startsWith(lineText, "//")) { return null; } lineText = lineText.slice(2).trim(); - return regionDelimiterRegExp.exec(lineText); + const result = regionDelimiterRegExp.exec(lineText); + if (result) { + return { isStart: !result[1], name: result[2].trim() }; + } + return void 0; } function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) { const comments = getLeadingCommentRanges(sourceFile.text, pos); @@ -178150,7 +183029,7 @@ function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken switch (kind) { case 2 /* SingleLineCommentTrivia */: const commentText = sourceText.slice(pos2, end); - if (isRegionDelimiter(commentText)) { + if (parseRegionDelimiter(commentText)) { combineAndAddMultipleSingleLineComments(); singleLineCommentCount = 0; break; @@ -178186,21 +183065,21 @@ function createOutliningSpanFromBounds(pos, end, kind) { } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 241 /* Block */: + case 242 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 246 /* DoStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 245 /* IfStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - case 299 /* CatchClause */: + case 247 /* DoStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 249 /* ForStatement */: + case 246 /* IfStatement */: + case 248 /* WhileStatement */: + case 255 /* WithStatement */: + case 300 /* CatchClause */: return spanForNode(n.parent); - case 258 /* TryStatement */: + case 259 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -178208,20 +183087,21 @@ function getOutliningSpanForNode(n, sourceFile) { const node = findChildOfKind(tryStatement, 98 /* FinallyKeyword */, sourceFile); if (node) return spanForNode(node); } + // falls through default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 268 /* ModuleBlock */: + case 269 /* ModuleBlock */: return spanForNode(n.parent); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 269 /* CaseBlock */: - case 187 /* TypeLiteral */: - case 206 /* ObjectBindingPattern */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 270 /* CaseBlock */: + case 188 /* TypeLiteral */: + case 207 /* ObjectBindingPattern */: return spanForNode(n); - case 189 /* TupleType */: + case 190 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -178230,24 +183110,24 @@ function getOutliningSpanForNode(n, sourceFile) { !isTupleTypeNode(n.parent), 23 /* OpenBracketToken */ ); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: return spanForNodeArray(n.statements); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 23 /* OpenBracketToken */); - case 284 /* JsxElement */: + case 285 /* JsxElement */: return spanForJSXElement(n); - case 288 /* JsxFragment */: + case 289 /* JsxFragment */: return spanForJSXFragment(n); - case 285 /* JsxSelfClosingElement */: - case 286 /* JsxOpeningElement */: + case 286 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 228 /* TemplateExpression */: + case 229 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 207 /* ArrayBindingPattern */: + case 208 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -178256,15 +183136,15 @@ function getOutliningSpanForNode(n, sourceFile) { !isBindingElement(n.parent), 23 /* OpenBracketToken */ ); - case 219 /* ArrowFunction */: + case 220 /* ArrowFunction */: return spanForArrowFunction(n); - case 213 /* CallExpression */: + case 214 /* CallExpression */: return spanForCallExpression(n); - case 217 /* ParenthesizedExpression */: + case 218 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 275 /* NamedImports */: - case 279 /* NamedExports */: - case 300 /* ImportAttributes */: + case 276 /* NamedImports */: + case 280 /* NamedExports */: + case 301 /* ImportAttributes */: return spanForImportExportElements(n); } function spanForImportExportElements(node) { @@ -178384,7 +183264,7 @@ function functionSpan(node, body, sourceFile) { node, sourceFile, /*autoCollapse*/ - node.kind !== 219 /* ArrowFunction */ + node.kind !== 220 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -178452,7 +183332,7 @@ function getRenameInfoForNode(node, typeChecker, sourceFile, program, preference return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 168 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -178682,9 +183562,6 @@ function getArgumentOrParameterListInfo(node, position, sourceFile, checker) { if (!info) return void 0; const { list, argumentIndex } = info; const argumentCount = getArgumentCount(checker, list); - if (argumentIndex !== 0) { - Debug.assertLessThan(argumentIndex, argumentCount); - } const argumentsSpan = getApplicableSpanForArguments(list, sourceFile); return { list, argumentIndex, argumentCount, argumentsSpan }; } @@ -178715,10 +183592,10 @@ function getImmediatelyContainingArgumentInfo(node, position, sourceFile, checke ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 216 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 228 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 229 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -178791,16 +183668,16 @@ function getAdjustedNode(node) { function getContextualSignatureLocationInfo(node, sourceFile, position, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: + case 218 /* ParenthesizedExpression */: + case 175 /* MethodDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(node, position, sourceFile, checker); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 226 /* BinaryExpression */: { + case 227 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = node.kind === 21 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -178909,7 +183786,7 @@ function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 228 /* TemplateExpression */) { + if (template.kind === 229 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -178957,9 +183834,6 @@ function createSignatureHelpItems(candidates, resolvedSignature, { isTypeParamet void 0 ) : emptyArray; const items = map(candidates, (candidateSignature) => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile)); - if (argumentIndex !== 0) { - Debug.assertLessThan(argumentIndex, argumentCount); - } let selectedItemIndex = 0; let itemsSeen = 0; for (let i = 0; i < items.length; i++) { @@ -179205,7 +184079,7 @@ function getSelectionChildren(node) { Debug.assertEqual(openBraceToken.kind, 19 /* OpenBraceToken */); Debug.assertEqual(closeBraceToken.kind, 20 /* CloseBraceToken */); const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); - const groupedWithBrackets = groupChildren(groupedWithPlusMinusTokens, ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */); + const groupedWithBrackets = groupChildren(groupedWithPlusMinusTokens, ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 169 /* TypeParameter */ || kind === 24 /* CloseBracketToken */); return [ openBraceToken, // Pivot on `:` @@ -179215,7 +184089,7 @@ function getSelectionChildren(node) { } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 320 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 321 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 59 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -179276,19 +184150,19 @@ function createSyntaxList2(children) { } function isListOpener(token) { const kind = token && token.kind; - return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 286 /* JsxOpeningElement */; + return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 287 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 287 /* JsxClosingElement */; + return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 288 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 341 /* JSDocParameterTag */: - case 338 /* JSDocCallbackTag */: - case 348 /* JSDocPropertyTag */: - case 346 /* JSDocTypedefTag */: - case 343 /* JSDocThisTag */: + case 342 /* JSDocParameterTag */: + case 339 /* JSDocCallbackTag */: + case 349 /* JSDocPropertyTag */: + case 347 /* JSDocTypedefTag */: + case 344 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -179312,7 +184186,7 @@ function getSymbolKind(typeChecker, symbol, location) { } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 231 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 232 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; if (flags & 524288 /* TypeAlias */) return "type" /* typeElement */; @@ -179408,7 +184282,7 @@ function getSymbolModifiers(typeChecker, symbol) { } return modifiers.size > 0 ? arrayFrom(modifiers.values()).join(",") : "" /* none */; } -function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias) { +function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias, maximumLength, verbosityLevel) { var _a; const displayParts = []; let documentation = []; @@ -179420,21 +184294,26 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; + const typeWriterOut = { canIncreaseExpansionDepth: false, truncated: false }; + let symbolWasExpanded = false; if (location.kind === 110 /* ThisKeyword */ && !isThisExpression) { return { displayParts: [keywordPart(110 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; } if (symbolKind !== "" /* unknown */ || symbolFlags & 32 /* Class */ || symbolFlags & 2097152 /* Alias */) { if (symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */) { - const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); + const declaration = find( + symbol.declarations, + (declaration2) => declaration2.name === location && declaration2.kind !== 212 /* PropertyAccessExpression */ + ); if (declaration) { switch (declaration.kind) { - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 172 /* PropertyDeclaration */: + case 173 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -179446,7 +184325,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb } let signature; type ?? (type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location)); - if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 212 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -179462,7 +184341,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 215 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -179525,22 +184404,22 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { + location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 177 /* Constructor */) { const functionDeclaration = location.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 137 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 177 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 176 /* Constructor */) { + if (functionDeclaration.kind === 177 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { addPrefixForAnyFunctionOrVar( - functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, + functionDeclaration.kind === 180 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind ); } @@ -179554,21 +184433,28 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 231 /* ClassExpression */)) { + const classExpression = getDeclarationOfKind(symbol, 232 /* ClassExpression */); + if (classExpression) { pushSymbolKind("local class" /* localClassElement */); - } else { - displayParts.push(keywordPart(86 /* ClassKeyword */)); + displayParts.push(spacePart()); + } + if (!tryExpandSymbol(symbol, semanticMeaning)) { + if (!classExpression) { + displayParts.push(keywordPart(86 /* ClassKeyword */)); + displayParts.push(spacePart()); + } + addFullSymbolName(symbol); + writeTypeParametersOfSymbol(symbol, sourceFile); } - displayParts.push(spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); } if (symbolFlags & 64 /* Interface */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); - displayParts.push(keywordPart(120 /* InterfaceKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); + if (!tryExpandSymbol(symbol, semanticMeaning)) { + displayParts.push(keywordPart(120 /* InterfaceKeyword */)); + displayParts.push(spacePart()); + addFullSymbolName(symbol); + writeTypeParametersOfSymbol(symbol, sourceFile); + } } if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); @@ -179579,25 +184465,44 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb displayParts.push(spacePart()); displayParts.push(operatorPart(64 /* EqualsToken */)); displayParts.push(spacePart()); - addRange(displayParts, typeToDisplayParts(typeChecker, location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 8388608 /* InTypeAlias */)); + addRange( + displayParts, + typeToDisplayParts( + typeChecker, + location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), + enclosingDeclaration, + 8388608 /* InTypeAlias */, + maximumLength, + verbosityLevel, + typeWriterOut + ) + ); } if (symbolFlags & 384 /* Enum */) { prefixNextMeaning(); - if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) { - displayParts.push(keywordPart(87 /* ConstKeyword */)); + if (!tryExpandSymbol(symbol, semanticMeaning)) { + if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) { + displayParts.push(keywordPart(87 /* ConstKeyword */)); + displayParts.push(spacePart()); + } + displayParts.push(keywordPart(94 /* EnumKeyword */)); displayParts.push(spacePart()); + addFullSymbolName( + symbol, + /*enclosingDeclaration*/ + void 0 + ); } - displayParts.push(keywordPart(94 /* EnumKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 267 /* ModuleDeclaration */); - const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */; - displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); + if (!tryExpandSymbol(symbol, semanticMeaning)) { + const declaration = getDeclarationOfKind(symbol, 268 /* ModuleDeclaration */); + const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */; + displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */)); + displayParts.push(spacePart()); + addFullSymbolName(symbol); + } } if (symbolFlags & 262144 /* TypeParameter */ && semanticMeaning & 2 /* Type */) { prefixNextMeaning(); @@ -179611,17 +184516,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 169 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; if (declaration) { if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 180 /* ConstructSignature */) { + if (declaration.kind === 181 /* ConstructSignature */) { displayParts.push(keywordPart(105 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 180 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -179639,7 +184544,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a = symbol.declarations) == null ? void 0 : _a[0]; - if ((declaration == null ? void 0 : declaration.kind) === 306 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 307 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -179667,12 +184572,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb declarationName, type, semanticMeaning, - shouldUseAliasName ? symbol : resolvedSymbol + shouldUseAliasName ? symbol : resolvedSymbol, + maximumLength, + verbosityLevel ); displayParts.push(...resolvedInfo.displayParts); displayParts.push(lineBreakPart()); documentationFromAlias = resolvedInfo.documentation; tagsFromAlias = resolvedInfo.tags; + if (typeWriterOut && resolvedInfo.canIncreaseVerbosityLevel) { + typeWriterOut.canIncreaseExpansionDepth = true; + } } else { documentationFromAlias = resolvedSymbol.getContextualDocumentationComment(resolvedNode, typeChecker); tagsFromAlias = resolvedSymbol.getJsDocTags(typeChecker); @@ -179681,17 +184591,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 270 /* NamespaceExportDeclaration */: + case 271 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(145 /* NamespaceKeyword */)); break; - case 277 /* ExportAssignment */: + case 278 /* ExportAssignment */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 64 /* EqualsToken */ : 90 /* DefaultKeyword */)); break; - case 281 /* ExportSpecifier */: + case 282 /* ExportSpecifier */: displayParts.push(keywordPart(95 /* ExportKeyword */)); break; default: @@ -179701,7 +184611,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 271 /* ImportEqualsDeclaration */) { + if (declaration.kind === 272 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -179738,12 +184648,35 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb displayParts.push(spacePart()); if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) { const typeParameterParts = mapToDisplayParts((writer) => { - const param = typeChecker.typeParameterToDeclaration(type, enclosingDeclaration, symbolDisplayNodeBuilderFlags); + const param = typeChecker.typeParameterToDeclaration( + type, + enclosingDeclaration, + symbolDisplayNodeBuilderFlags, + /*internalFlags*/ + void 0, + /*tracker*/ + void 0, + maximumLength, + verbosityLevel, + typeWriterOut + ); getPrinter().writeNode(4 /* Unspecified */, param, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration)), writer); - }); + }, maximumLength); addRange(displayParts, typeParameterParts); } else { - addRange(displayParts, typeToDisplayParts(typeChecker, type, enclosingDeclaration)); + addRange( + displayParts, + typeToDisplayParts( + typeChecker, + type, + enclosingDeclaration, + /*flags*/ + void 0, + maximumLength, + verbosityLevel, + typeWriterOut + ) + ); } if (isTransientSymbol(symbol) && symbol.links.target && isTransientSymbol(symbol.links.target) && symbol.links.target.links.tupleLabelDeclaration) { const labelDecl = symbol.links.target.links.tupleLabelDeclaration; @@ -179769,9 +184702,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 307 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 308 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 226 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 227 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -179799,7 +184732,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb }) || emptyArray; } } - if (tags.length === 0 && !hasMultipleSignatures) { + if (tags.length === 0 && !hasMultipleSignatures && !isInJSDoc(location)) { tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && documentationFromAlias) { @@ -179808,7 +184741,14 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb if (tags.length === 0 && tagsFromAlias) { tags = tagsFromAlias; } - return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags }; + const canIncreaseVerbosityLevel = !typeWriterOut.truncated && typeWriterOut.canIncreaseExpansionDepth; + return { + displayParts, + documentation, + symbolKind, + tags: tags.length === 0 ? void 0 : tags, + canIncreaseVerbosityLevel: verbosityLevel !== void 0 ? canIncreaseVerbosityLevel : void 0 + }; function getPrinter() { return createPrinterWithRemoveComments(); } @@ -179829,6 +184769,63 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb displayParts.push(keywordPart(103 /* InKeyword */)); displayParts.push(spacePart()); } + function canExpandSymbol(symbol2, out) { + if (verbosityLevel === void 0) { + return false; + } + const type2 = symbol2.flags & (32 /* Class */ | 64 /* Interface */) ? typeChecker.getDeclaredTypeOfSymbol(symbol2) : typeChecker.getTypeOfSymbolAtLocation(symbol2, location); + if (!type2 || typeChecker.isLibType(type2)) { + return false; + } + if (0 < verbosityLevel) { + return true; + } + if (out) { + out.canIncreaseExpansionDepth = true; + } + return false; + } + function semanticToSymbolMeaning(meaning) { + let symbolMeaning = 0 /* None */; + if (meaning & 1 /* Value */) { + symbolMeaning |= 111551 /* Value */; + } + if (meaning & 2 /* Type */) { + symbolMeaning |= 788968 /* Type */; + } + if (meaning & 4 /* Namespace */) { + symbolMeaning |= 1920 /* Namespace */; + } + return symbolMeaning; + } + function tryExpandSymbol(symbol2, meaning) { + if (symbolWasExpanded) { + return true; + } + if (canExpandSymbol(symbol2, typeWriterOut)) { + const symbolMeaning = semanticToSymbolMeaning(meaning); + const expandedDisplayParts = mapToDisplayParts((writer) => { + const nodes = typeChecker.getEmitResolver().symbolToDeclarations( + symbol2, + symbolMeaning, + 1024 /* MultilineObjectLiterals */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, + maximumLength, + verbosityLevel !== void 0 ? verbosityLevel - 1 : void 0, + typeWriterOut + ); + const printer = getPrinter(); + const sourceFile2 = symbol2.valueDeclaration && getSourceFileOfNode(symbol2.valueDeclaration); + nodes.forEach((node, i) => { + if (i > 0) writer.writeLine(); + printer.writeNode(4 /* Unspecified */, node, sourceFile2, writer); + }); + }, maximumLength); + addRange(displayParts, expandedDisplayParts); + symbolWasExpanded = true; + return true; + } + return false; + } function addFullSymbolName(symbolToDisplay, enclosingDeclaration2) { let indexInfos; if (alias && symbolToDisplay === symbol) { @@ -179896,7 +184893,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb } } function addSignatureDisplayParts(signature, allSignatures, flags = 0 /* None */) { - addRange(displayParts, signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); + addRange(displayParts, signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */, maximumLength, verbosityLevel, typeWriterOut)); if (allSignatures.length > 1) { displayParts.push(spacePart()); displayParts.push(punctuationPart(21 /* OpenParenToken */)); @@ -179921,7 +184918,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb addRange(displayParts, typeParameterParts); } } -function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { +function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias, maximumLength, verbosityLevel) { return getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, symbol, @@ -179931,7 +184928,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so /*type*/ void 0, semanticMeaning, - alias + alias, + maximumLength, + verbosityLevel ); } function isLocalVariableOrFunction(symbol) { @@ -179939,14 +184938,14 @@ function isLocalVariableOrFunction(symbol) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 218 /* FunctionExpression */) { + if (declaration.kind === 219 /* FunctionExpression */) { return true; } - if (declaration.kind !== 260 /* VariableDeclaration */ && declaration.kind !== 262 /* FunctionDeclaration */) { + if (declaration.kind !== 261 /* VariableDeclaration */ && declaration.kind !== 263 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 307 /* SourceFile */ || parent2.kind === 268 /* ModuleBlock */) { + if (parent2.kind === 308 /* SourceFile */ || parent2.kind === 269 /* ModuleBlock */) { return false; } } @@ -179964,6 +184963,7 @@ __export(ts_textChanges_exports, { assignPositionsToNode: () => assignPositionsToNode, createWriter: () => createWriter, deleteNode: () => deleteNode, + getAdjustedEndPosition: () => getAdjustedEndPosition, isThisTypeAnnotatable: () => isThisTypeAnnotatable, isValidLocationToAddComment: () => isValidLocationToAddComment }); @@ -180129,7 +185129,7 @@ function getAdjustedEndPosition(sourceFile, node, options) { return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 210 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 211 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); @@ -180358,7 +185358,7 @@ var ChangeTracker = class _ChangeTracker { endNode2 = first(node.parameters); } } else { - endNode2 = (node.kind === 260 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; + endNode2 = (node.kind === 261 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -180463,7 +185463,10 @@ var ChangeTracker = class _ChangeTracker { getInsertNodeAtStartInsertOptions(sourceFile, node, indentation) { const members = getMembersOrProperties(node); const isEmpty = members.length === 0; - const isFirstInsertion = addToSeen(this.classesWithNodesInsertedAtStart, getNodeId(node), { node, sourceFile }); + const isFirstInsertion = !this.classesWithNodesInsertedAtStart.has(getNodeId(node)); + if (isFirstInsertion) { + this.classesWithNodesInsertedAtStart.set(getNodeId(node), { node, sourceFile }); + } const insertTrailingComma = isObjectLiteralExpression(node) && (!isJsonSourceFile(sourceFile) || !isEmpty); const insertLeadingComma = isObjectLiteralExpression(node) && isJsonSourceFile(sourceFile) && isEmpty && !isFirstInsertion; return { @@ -180506,18 +185509,18 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: + case 264 /* ClassDeclaration */: + case 268 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: case 11 /* StringLiteral */: case 80 /* Identifier */: return { prefix: ", " }; - case 303 /* PropertyAssignment */: + case 304 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 95 /* ExportKeyword */: return { prefix: " " }; - case 169 /* Parameter */: + case 170 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -180526,7 +185529,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 219 /* ArrowFunction */) { + if (node.kind === 220 /* ArrowFunction */) { const arrow = findChildOfKind(node, 39 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); if (lparen) { @@ -180536,12 +185539,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(22 /* CloseParenToken */)); } - if (node.body.kind !== 241 /* Block */) { + if (node.body.kind !== 242 /* Block */) { this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(19 /* OpenBraceToken */), factory.createToken(107 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(27 /* SemicolonToken */), factory.createToken(20 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 218 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 219 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -180681,10 +185684,10 @@ ${options.prefix}` : "\n" : options.prefix } }; function updateJSDocHost(parent2) { - if (parent2.kind !== 219 /* ArrowFunction */) { + if (parent2.kind !== 220 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 173 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -180693,7 +185696,7 @@ function tryMergeJsdocTags(oldTag, newTag) { return void 0; } switch (oldTag.kind) { - case 341 /* JSDocParameterTag */: { + case 342 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -180707,14 +185710,14 @@ function tryMergeJsdocTags(oldTag, newTag) { oldParam.comment ) : void 0; } - case 342 /* JSDocReturnTag */: + case 343 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 344 /* JSDocTypeTag */: + case 345 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -180773,7 +185776,7 @@ var changesToText; function getTextChangesFromChanges(changes, newLineCharacter, formatContext, validate) { return mapDefined(group(changes, (c) => c.sourceFile.path), (changesInFile) => { const sourceFile = changesInFile[0].sourceFile; - const normalized = stableSort(changesInFile, (a, b) => a.range.pos - b.range.pos || a.range.end - b.range.end); + const normalized = toSorted(changesInFile, (a, b) => a.range.pos - b.range.pos || a.range.end - b.range.end); for (let i = 0; i < normalized.length - 1; i++) { Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", () => `${JSON.stringify(normalized[i].range)} and ${JSON.stringify(normalized[i + 1].range)}`); } @@ -181162,13 +186165,13 @@ function isValidLocationToAddComment(sourceFile, position) { return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 168 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 169 /* Parameter */: { + case 170 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -181177,29 +186180,29 @@ var deleteDeclaration; } break; } - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: + case 273 /* ImportDeclaration */: + case 272 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 208 /* BindingElement */: + case 209 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 208 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 260 /* VariableDeclaration */: + case 261 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 168 /* TypeParameter */: + case 169 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 276 /* ImportSpecifier */: + case 277 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -181207,7 +186210,7 @@ var deleteDeclaration; deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 274 /* NamespaceImport */: + case 275 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 27 /* SemicolonToken */: @@ -181216,8 +186219,8 @@ var deleteDeclaration; case 100 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: + case 264 /* ClassDeclaration */: + case 263 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -181259,13 +186262,13 @@ var deleteDeclaration; const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 272 /* ImportDeclaration */); + const importDecl = getAncestor(node, 273 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 299 /* CatchClause */) { + if (parent2.kind === 300 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 21 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 22 /* CloseParenToken */, sourceFile)); return; } @@ -181275,14 +186278,14 @@ var deleteDeclaration; } const gp = parent2.parent; switch (gp.kind) { - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 250 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 248 /* ForStatement */: + case 249 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 243 /* VariableStatement */: + case 244 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -181492,10 +186495,10 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 291 /* JsxAttribute */: - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: - case 285 /* JsxSelfClosingElement */: + case 292 /* JsxAttribute */: + case 287 /* JsxOpeningElement */: + case 288 /* JsxClosingElement */: + case 286 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 80 /* Identifier */; } } @@ -181669,7 +186672,7 @@ var RuleFlags = /* @__PURE__ */ ((RuleFlags2) => { // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 166 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -181680,7 +186683,7 @@ function getAllRules() { const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 165 /* LastKeyword */); + const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 166 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(30 /* FirstBinaryOperator */, 79 /* LastBinaryOperator */); const binaryKeywordOperators = [ 103 /* InKeyword */, @@ -182020,39 +187023,54 @@ function isOptionEnabledOrUndefined(optionName) { return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 248 /* ForStatement */; + return context.contextNode.kind === 249 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 226 /* BinaryExpression */: + case 227 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 28 /* CommaToken */; - case 227 /* ConditionalExpression */: - case 194 /* ConditionalType */: - case 234 /* AsExpression */: - case 281 /* ExportSpecifier */: - case 276 /* ImportSpecifier */: - case 182 /* TypePredicate */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 238 /* SatisfiesExpression */: + case 228 /* ConditionalExpression */: + case 195 /* ConditionalType */: + case 235 /* AsExpression */: + case 282 /* ExportSpecifier */: + case 277 /* ImportSpecifier */: + case 183 /* TypePredicate */: + case 193 /* UnionType */: + case 194 /* IntersectionType */: + case 239 /* SatisfiesExpression */: return true; - case 208 /* BindingElement */: - case 265 /* TypeAliasDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 277 /* ExportAssignment */: - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 306 /* EnumMember */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: + // equals in binding elements: function foo([[x, y] = [1, 2]]) + case 209 /* BindingElement */: + // equals in type X = ... + // falls through + case 266 /* TypeAliasDeclaration */: + // equal in import a = module('a'); + // falls through + case 272 /* ImportEqualsDeclaration */: + // equal in export = 1 + // falls through + case 278 /* ExportAssignment */: + // equal in let a = 0 + // falls through + case 261 /* VariableDeclaration */: + // equal in p = 0 + // falls through + case 170 /* Parameter */: + case 307 /* EnumMember */: + case 173 /* PropertyDeclaration */: + case 172 /* PropertySignature */: return context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 249 /* ForInStatement */: - case 168 /* TypeParameter */: + // "in" keyword in for (let x in []) { } + case 250 /* ForInStatement */: + // "in" keyword in [P in keyof T]: T[P] + // falls through + case 169 /* TypeParameter */: return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 250 /* ForOfStatement */: + // Technically, "of" is not a binary operator, but format it the same way as "in" + case 251 /* ForOfStatement */: return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; @@ -182065,7 +187083,7 @@ function isNotTypeAnnotationContext(context) { } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 173 /* PropertyDeclaration */ || contextKind === 172 /* PropertySignature */ || contextKind === 170 /* Parameter */ || contextKind === 261 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isOptionalPropertyContext(context) { return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken; @@ -182074,13 +187092,13 @@ function isNonOptionalPropertyContext(context) { return !isOptionalPropertyContext(context); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; + return context.contextNode.kind === 228 /* ConditionalExpression */ || context.contextNode.kind === 195 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 207 /* ObjectBindingPattern */ || context.contextNode.kind === 201 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -182102,26 +187120,34 @@ function nodeIsBlockContext(node) { return true; } switch (node.kind) { - case 241 /* Block */: - case 269 /* CaseBlock */: - case 210 /* ObjectLiteralExpression */: - case 268 /* ModuleBlock */: + case 242 /* Block */: + case 270 /* CaseBlock */: + case 211 /* ObjectLiteralExpression */: + case 269 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 219 /* ArrowFunction */: - case 264 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + // case SyntaxKind.MemberFunctionDeclaration: + // falls through + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + // case SyntaxKind.MethodSignature: + // falls through + case 180 /* CallSignature */: + case 219 /* FunctionExpression */: + case 177 /* Constructor */: + case 220 /* ArrowFunction */: + // case SyntaxKind.ConstructorDeclaration: + // case SyntaxKind.SimpleArrowFunctionExpression: + // case SyntaxKind.ParenthesizedArrowFunctionExpression: + // falls through + case 265 /* InterfaceDeclaration */: return true; } return false; @@ -182130,39 +187156,39 @@ function isNotFunctionDeclContext(context) { return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 262 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; + return context.contextNode.kind === 263 /* FunctionDeclaration */ || context.contextNode.kind === 219 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 187 /* TypeLiteral */: - case 267 /* ModuleDeclaration */: - case 278 /* ExportDeclaration */: - case 279 /* NamedExports */: - case 272 /* ImportDeclaration */: - case 275 /* NamedImports */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 188 /* TypeLiteral */: + case 268 /* ModuleDeclaration */: + case 279 /* ExportDeclaration */: + case 280 /* NamedExports */: + case 273 /* ImportDeclaration */: + case 276 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 299 /* CatchClause */: - case 268 /* ModuleBlock */: - case 255 /* SwitchStatement */: + case 264 /* ClassDeclaration */: + case 268 /* ModuleDeclaration */: + case 267 /* EnumDeclaration */: + case 300 /* CatchClause */: + case 269 /* ModuleBlock */: + case 256 /* SwitchStatement */: return true; - case 241 /* Block */: { + case 242 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 220 /* ArrowFunction */ && blockParent.kind !== 219 /* FunctionExpression */) { return true; } } @@ -182171,29 +187197,32 @@ function isAfterCodeBlockContext(context) { } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 245 /* IfStatement */: - case 255 /* SwitchStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 247 /* WhileStatement */: - case 258 /* TryStatement */: - case 246 /* DoStatement */: - case 254 /* WithStatement */: - case 299 /* CatchClause */: + case 246 /* IfStatement */: + case 256 /* SwitchStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 248 /* WhileStatement */: + case 259 /* TryStatement */: + case 247 /* DoStatement */: + case 255 /* WithStatement */: + // TODO + // case SyntaxKind.ElseClause: + // falls through + case 300 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 210 /* ObjectLiteralExpression */; + return context.contextNode.kind === 211 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 213 /* CallExpression */; + return context.contextNode.kind === 214 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 214 /* NewExpression */; + return context.contextNode.kind === 215 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -182208,10 +187237,10 @@ function isNextTokenNotCloseParen(context) { return context.nextTokenSpan.kind !== 22 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 219 /* ArrowFunction */; + return context.contextNode.kind === 220 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 205 /* ImportType */; + return context.contextNode.kind === 206 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 12 /* JsxText */; @@ -182220,25 +187249,25 @@ function isNonJsxTextContext(context) { return context.contextNode.kind !== 12 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 284 /* JsxElement */ && context.contextNode.kind !== 288 /* JsxFragment */; + return context.contextNode.kind !== 285 /* JsxElement */ && context.contextNode.kind !== 289 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; + return context.contextNode.kind === 295 /* JsxExpression */ || context.contextNode.kind === 294 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */; + return context.nextTokenParent.kind === 292 /* JsxAttribute */ || context.nextTokenParent.kind === 296 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 292 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 291 /* JsxAttribute */; + return context.contextNode.kind === 292 /* JsxAttribute */; } function isNextTokenParentNotJsxNamespacedName(context) { - return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */; + return context.nextTokenParent.kind !== 296 /* JsxNamespacedName */; } function isNextTokenParentJsxNamespacedName(context) { - return context.nextTokenParent.kind === 295 /* JsxNamespacedName */; + return context.nextTokenParent.kind === 296 /* JsxNamespacedName */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 285 /* JsxSelfClosingElement */; + return context.contextNode.kind === 286 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -182250,44 +187279,44 @@ function nodeIsInDecoratorContext(node) { while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 170 /* Decorator */; + return node && node.kind === 171 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 261 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 262 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 267 /* ModuleDeclaration */; + return context.contextNode.kind === 268 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 187 /* TypeLiteral */; + return context.contextNode.kind === 188 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 180 /* ConstructSignature */; + return context.contextNode.kind === 181 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 30 /* LessThanToken */ && token.kind !== 32 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 183 /* TypeReference */: - case 216 /* TypeAssertionExpression */: - case 265 /* TypeAliasDeclaration */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 233 /* ExpressionWithTypeArguments */: + case 184 /* TypeReference */: + case 217 /* TypeAssertionExpression */: + case 266 /* TypeAliasDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 234 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -182297,31 +187326,31 @@ function isTypeArgumentOrParameterOrAssertionContext(context) { return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 216 /* TypeAssertionExpression */; + return context.contextNode.kind === 217 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 222 /* VoidExpression */; + return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 223 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 229 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 230 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 235 /* NonNullExpression */; + return context.contextNode.kind === 236 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 245 /* IfStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: + case 246 /* IfStatement */: + case 249 /* ForStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 247 /* DoStatement */: + case 248 /* WhileStatement */: return true; default: return false; @@ -182347,16 +187376,19 @@ function isSemicolonDeletionContext(context) { if (startLine === endLine) { return nextTokenKind === 20 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 240 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { + if (nextTokenKind === 27 /* SemicolonToken */ && context.currentTokenSpan.kind === 27 /* SemicolonToken */) { + return true; + } + if (nextTokenKind === 241 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 264 /* InterfaceDeclaration */ || context.contextNode.kind === 265 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 265 /* InterfaceDeclaration */ || context.contextNode.kind === 266 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 248 /* ForStatement */ && context.currentTokenParent.kind !== 242 /* EmptyStatement */ && context.currentTokenParent.kind !== 240 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 228 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; + return context.currentTokenParent.kind !== 249 /* ForStatement */ && context.currentTokenParent.kind !== 243 /* EmptyStatement */ && context.currentTokenParent.kind !== 241 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 229 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -182431,12 +187463,12 @@ function buildMap(rules) { return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 166 /* LastKeyword */ && column <= 166 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } var maskBitSize = 5; var mask = 31; -var mapRowLength = 165 /* LastToken */ + 1; +var mapRowLength = 166 /* LastToken */ + 1; var RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -182545,17 +187577,17 @@ function findOutermostNodeWithinListLevel(node) { } function isListElement(parent2, node) { switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: + case 264 /* ClassDeclaration */: + case 265 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 267 /* ModuleDeclaration */: + case 268 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 268 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 307 /* SourceFile */: - case 241 /* Block */: - case 268 /* ModuleBlock */: + return !!body && body.kind === 269 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 308 /* SourceFile */: + case 242 /* Block */: + case 269 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 299 /* CatchClause */: + case 300 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -182792,24 +187824,25 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt if (modifier) return modifier.kind; } switch (node.kind) { - case 263 /* ClassDeclaration */: + case 264 /* ClassDeclaration */: return 86 /* ClassKeyword */; - case 264 /* InterfaceDeclaration */: + case 265 /* InterfaceDeclaration */: return 120 /* InterfaceKeyword */; - case 262 /* FunctionDeclaration */: + case 263 /* FunctionDeclaration */: return 100 /* FunctionKeyword */; - case 266 /* EnumDeclaration */: - return 266 /* EnumDeclaration */; - case 177 /* GetAccessor */: + case 267 /* EnumDeclaration */: + return 267 /* EnumDeclaration */; + case 178 /* GetAccessor */: return 139 /* GetKeyword */; - case 178 /* SetAccessor */: + case 179 /* SetAccessor */: return 153 /* SetKeyword */; - case 174 /* MethodDeclaration */: + case 175 /* MethodDeclaration */: if (node.asteriskToken) { return 42 /* AsteriskToken */; } - case 172 /* PropertyDeclaration */: - case 169 /* Parameter */: + // falls through + case 173 /* PropertyDeclaration */: + case 170 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -182820,6 +187853,10 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return { getIndentationForComment: (kind, tokenIndentation, container) => { switch (kind) { + // preceding comment to the token that closes the indentation scope inherits the indentation from the scope + // .. { + // // comment + // } case 20 /* CloseBraceToken */: case 24 /* CloseBracketToken */: case 22 /* CloseParenToken */: @@ -182849,6 +187886,7 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt }; function shouldAddDelta(line, kind, container) { switch (kind) { + // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent case 19 /* OpenBraceToken */: case 20 /* CloseBraceToken */: case 22 /* CloseParenToken */: @@ -182859,15 +187897,15 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt case 44 /* SlashToken */: case 32 /* GreaterThanToken */: switch (container.kind) { - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: - case 285 /* JsxSelfClosingElement */: + case 287 /* JsxOpeningElement */: + case 288 /* JsxClosingElement */: + case 286 /* JsxSelfClosingElement */: return false; } break; case 23 /* OpenBracketToken */: case 24 /* CloseBracketToken */: - if (container.kind !== 200 /* MappedType */) { + if (container.kind !== 201 /* MappedType */) { return false; } break; @@ -182968,11 +188006,11 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 170 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 171 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 210 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -183386,50 +188424,50 @@ function getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenA } function getOpenTokenForList(node, list) { switch (node.kind) { - case 176 /* Constructor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: + case 177 /* Constructor */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 220 /* ArrowFunction */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } else if (node.parameters === list) { return 21 /* OpenParenToken */; } break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } else if (node.arguments === list) { return 21 /* OpenParenToken */; } break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } break; - case 183 /* TypeReference */: - case 215 /* TaggedTemplateExpression */: - case 186 /* TypeQuery */: - case 233 /* ExpressionWithTypeArguments */: - case 205 /* ImportType */: + case 184 /* TypeReference */: + case 216 /* TaggedTemplateExpression */: + case 187 /* TypeQuery */: + case 234 /* ExpressionWithTypeArguments */: + case 206 /* ImportType */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } break; - case 187 /* TypeLiteral */: + case 188 /* TypeLiteral */: return 19 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -183519,11 +188557,11 @@ var SmartIndenter; } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 211 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 226 /* BinaryExpression */) { + if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 227 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -183531,7 +188569,7 @@ var SmartIndenter; } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind); + const useTheSameBaseIndentation = [219 /* FunctionExpression */, 220 /* ArrowFunction */].includes(currentToken.parent.kind); const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -183673,7 +188711,7 @@ var SmartIndenter; } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 307 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 308 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -183711,7 +188749,7 @@ var SmartIndenter; } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 245 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 246 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 93 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -183759,42 +188797,42 @@ var SmartIndenter; } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 183 /* TypeReference */: + case 184 /* TypeReference */: return getList(node.typeArguments); - case 210 /* ObjectLiteralExpression */: + case 211 /* ObjectLiteralExpression */: return getList(node.properties); - case 209 /* ArrayLiteralExpression */: + case 210 /* ArrayLiteralExpression */: return getList(node.elements); - case 187 /* TypeLiteral */: + case 188 /* TypeLiteral */: return getList(node.members); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 220 /* ArrowFunction */: + case 175 /* MethodDeclaration */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 177 /* Constructor */: + case 186 /* ConstructorType */: + case 181 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 177 /* GetAccessor */: + case 178 /* GetAccessor */: return getList(node.parameters); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 345 /* JSDocTemplateTag */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 346 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 214 /* NewExpression */: - case 213 /* CallExpression */: + case 215 /* NewExpression */: + case 214 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 261 /* VariableDeclarationList */: + case 262 /* VariableDeclarationList */: return getList(node.declarations); - case 275 /* NamedImports */: - case 279 /* NamedExports */: + case 276 /* NamedImports */: + case 280 /* NamedExports */: return getList(node.elements); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 208 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -183817,7 +188855,7 @@ var SmartIndenter; return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 261 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 262 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -183878,97 +188916,102 @@ var SmartIndenter; function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 244 /* ExpressionStatement */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 209 /* ArrayLiteralExpression */: - case 241 /* Block */: - case 268 /* ModuleBlock */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 200 /* MappedType */: - case 189 /* TupleType */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 243 /* VariableStatement */: - case 277 /* ExportAssignment */: - case 253 /* ReturnStatement */: - case 227 /* ConditionalExpression */: - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - case 286 /* JsxOpeningElement */: - case 289 /* JsxOpeningFragment */: - case 285 /* JsxSelfClosingElement */: - case 294 /* JsxExpression */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 169 /* Parameter */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 196 /* ParenthesizedType */: - case 215 /* TaggedTemplateExpression */: - case 223 /* AwaitExpression */: - case 279 /* NamedExports */: - case 275 /* NamedImports */: - case 281 /* ExportSpecifier */: - case 276 /* ImportSpecifier */: - case 172 /* PropertyDeclaration */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: + case 245 /* ExpressionStatement */: + case 264 /* ClassDeclaration */: + case 232 /* ClassExpression */: + case 265 /* InterfaceDeclaration */: + case 267 /* EnumDeclaration */: + case 266 /* TypeAliasDeclaration */: + case 210 /* ArrayLiteralExpression */: + case 242 /* Block */: + case 269 /* ModuleBlock */: + case 211 /* ObjectLiteralExpression */: + case 188 /* TypeLiteral */: + case 201 /* MappedType */: + case 190 /* TupleType */: + case 218 /* ParenthesizedExpression */: + case 212 /* PropertyAccessExpression */: + case 214 /* CallExpression */: + case 215 /* NewExpression */: + case 244 /* VariableStatement */: + case 278 /* ExportAssignment */: + case 254 /* ReturnStatement */: + case 228 /* ConditionalExpression */: + case 208 /* ArrayBindingPattern */: + case 207 /* ObjectBindingPattern */: + case 287 /* JsxOpeningElement */: + case 290 /* JsxOpeningFragment */: + case 286 /* JsxSelfClosingElement */: + case 295 /* JsxExpression */: + case 174 /* MethodSignature */: + case 180 /* CallSignature */: + case 181 /* ConstructSignature */: + case 170 /* Parameter */: + case 185 /* FunctionType */: + case 186 /* ConstructorType */: + case 197 /* ParenthesizedType */: + case 216 /* TaggedTemplateExpression */: + case 224 /* AwaitExpression */: + case 280 /* NamedExports */: + case 276 /* NamedImports */: + case 282 /* ExportSpecifier */: + case 277 /* ImportSpecifier */: + case 173 /* PropertyDeclaration */: + case 297 /* CaseClause */: + case 298 /* DefaultClause */: return true; - case 269 /* CaseBlock */: + case 270 /* CaseBlock */: return settings.indentSwitchCase ?? true; - case 260 /* VariableDeclaration */: - case 303 /* PropertyAssignment */: - case 226 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { + case 261 /* VariableDeclaration */: + case 304 /* PropertyAssignment */: + case 227 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 211 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 226 /* BinaryExpression */ && sourceFile && child && childKind === 284 /* JsxElement */) { + if (parent2.kind === 227 /* BinaryExpression */ && sourceFile && child && childKind === 285 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 226 /* BinaryExpression */) { + if (parent2.kind !== 227 /* BinaryExpression */) { return true; } break; - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 245 /* IfStatement */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return childKind !== 241 /* Block */; - case 219 /* ArrowFunction */: - if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { + case 247 /* DoStatement */: + case 248 /* WhileStatement */: + case 250 /* ForInStatement */: + case 251 /* ForOfStatement */: + case 249 /* ForStatement */: + case 246 /* IfStatement */: + case 263 /* FunctionDeclaration */: + case 219 /* FunctionExpression */: + case 175 /* MethodDeclaration */: + case 177 /* Constructor */: + case 178 /* GetAccessor */: + case 179 /* SetAccessor */: + return childKind !== 242 /* Block */; + case 220 /* ArrowFunction */: + if (sourceFile && childKind === 218 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 241 /* Block */; - case 278 /* ExportDeclaration */: - return childKind !== 279 /* NamedExports */; - case 272 /* ImportDeclaration */: - return childKind !== 273 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 275 /* NamedImports */; - case 284 /* JsxElement */: - return childKind !== 287 /* JsxClosingElement */; - case 288 /* JsxFragment */: - return childKind !== 290 /* JsxClosingFragment */; - case 193 /* IntersectionType */: - case 192 /* UnionType */: - case 238 /* SatisfiesExpression */: - if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */ || childKind === 200 /* MappedType */) { + return childKind !== 242 /* Block */; + case 279 /* ExportDeclaration */: + return childKind !== 280 /* NamedExports */; + case 273 /* ImportDeclaration */: + return childKind !== 274 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 276 /* NamedImports */; + case 285 /* JsxElement */: + return childKind !== 288 /* JsxClosingElement */; + case 289 /* JsxFragment */: + return childKind !== 291 /* JsxClosingFragment */; + case 194 /* IntersectionType */: + case 193 /* UnionType */: + case 239 /* SatisfiesExpression */: + if (childKind === 188 /* TypeLiteral */ || childKind === 190 /* TupleType */ || childKind === 201 /* MappedType */) { + return false; + } + break; + case 259 /* TryStatement */: + if (childKind === 242 /* Block */) { return false; } break; @@ -183978,11 +189021,11 @@ var SmartIndenter; SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 253 /* ReturnStatement */: - case 257 /* ThrowStatement */: - case 251 /* ContinueStatement */: - case 252 /* BreakStatement */: - return parent2.kind !== 241 /* Block */; + case 254 /* ReturnStatement */: + case 258 /* ThrowStatement */: + case 252 /* ContinueStatement */: + case 253 /* BreakStatement */: + return parent2.kind !== 242 /* Block */; default: return false; } @@ -184006,6 +189049,48 @@ var SmartIndenter; } })(SmartIndenter || (SmartIndenter = {})); +// src/services/_namespaces/ts.preparePasteEdits.ts +var ts_preparePasteEdits_exports = {}; +__export(ts_preparePasteEdits_exports, { + preparePasteEdits: () => preparePasteEdits +}); + +// src/services/preparePasteEdits.ts +function preparePasteEdits(sourceFile, copiedFromRange, checker) { + let shouldProvidePasteEdits = false; + copiedFromRange.forEach((range) => { + const enclosingNode = findAncestor( + getTokenAtPosition(sourceFile, range.pos), + (ancestorNode) => rangeContainsRange(ancestorNode, range) + ); + if (!enclosingNode) return; + forEachChild(enclosingNode, function checkNameResolution(node) { + var _a; + if (shouldProvidePasteEdits) return; + if (isIdentifier(node) && rangeContainsPosition(range, node.getStart(sourceFile))) { + const resolvedSymbol = checker.resolveName( + node.text, + node, + -1 /* All */, + /*excludeGlobals*/ + false + ); + if (resolvedSymbol && resolvedSymbol.declarations) { + for (const decl of resolvedSymbol.declarations) { + if (isInImport(decl) || !!(node.text && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(node.escapedText)))) { + shouldProvidePasteEdits = true; + return; + } + } + } + } + node.forEachChild(checkNameResolution); + }); + if (shouldProvidePasteEdits) return; + }); + return shouldProvidePasteEdits; +} + // src/services/_namespaces/ts.PasteEdits.ts var ts_PasteEdits_exports = {}; __export(ts_PasteEdits_exports, { @@ -184013,24 +189098,25 @@ __export(ts_PasteEdits_exports, { }); // src/services/pasteEdits.ts -var fixId54 = "providePostPasteEdits"; +var fixId55 = "providePostPasteEdits"; function pasteEditsProvider(targetFile, pastedText, pasteLocations, copiedFrom, host, preferences, formatContext, cancellationToken) { const changes = ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => pasteEdits(targetFile, pastedText, pasteLocations, copiedFrom, host, preferences, formatContext, cancellationToken, changeTracker)); - return { edits: changes, fixId: fixId54 }; + return { edits: changes, fixId: fixId55 }; } function pasteEdits(targetFile, pastedText, pasteLocations, copiedFrom, host, preferences, formatContext, cancellationToken, changes) { let actualPastedText; if (pastedText.length !== pasteLocations.length) { - actualPastedText = pastedText.length === 1 ? pastedText : [pastedText.join("\n")]; + actualPastedText = pastedText.length === 1 ? pastedText[0] : pastedText.join(getNewLineOrDefaultFromHost(formatContext.host, formatContext.options)); } const statements = []; let newText = targetFile.text; for (let i = pasteLocations.length - 1; i >= 0; i--) { const { pos, end } = pasteLocations[i]; - newText = actualPastedText ? newText.slice(0, pos) + actualPastedText[0] + newText.slice(end) : newText.slice(0, pos) + pastedText[i] + newText.slice(end); + newText = actualPastedText ? newText.slice(0, pos) + actualPastedText + newText.slice(end) : newText.slice(0, pos) + pastedText[i] + newText.slice(end); } + let importAdder; Debug.checkDefined(host.runWithTemporaryFileUpdate).call(host, targetFile.fileName, newText, (updatedProgram, originalProgram, updatedFile) => { - const importAdder = ts_codefix_exports.createImportAdder(updatedFile, updatedProgram, preferences, host); + importAdder = ts_codefix_exports.createImportAdder(updatedFile, updatedProgram, preferences, host); if (copiedFrom == null ? void 0 : copiedFrom.range) { Debug.assert(copiedFrom.range.length === pastedText.length); copiedFrom.range.forEach((copy) => { @@ -184043,11 +189129,13 @@ function pasteEdits(targetFile, pastedText, pasteLocations, copiedFrom, host, pr } statements.push(...statementsInSourceFile.slice(startNodeIndex, endNodeIndex === -1 ? statementsInSourceFile.length : endNodeIndex + 1)); }); - const usage = getUsageInfo(copiedFrom.file, statements, originalProgram.getTypeChecker(), getExistingLocals(updatedFile, statements, originalProgram.getTypeChecker())); - Debug.assertIsDefined(originalProgram); + Debug.assertIsDefined(originalProgram, "no original program found"); + const originalProgramTypeChecker = originalProgram.getTypeChecker(); + const usageInfoRange = getUsageInfoRangeForPasteEdits(copiedFrom); + const usage = getUsageInfo(copiedFrom.file, statements, originalProgramTypeChecker, getExistingLocals(updatedFile, statements, originalProgramTypeChecker), usageInfoRange); const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFile.fileName, originalProgram, host, !!copiedFrom.file.commonJsModuleIndicator); addExportsInOldFile(copiedFrom.file, usage.targetFileImportsFromOldFile, changes, useEsModuleSyntax); - addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgram.getTypeChecker(), updatedProgram, importAdder); + addTargetFileImports(copiedFrom.file, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, originalProgramTypeChecker, updatedProgram, importAdder); } else { const context = { sourceFile: updatedFile, @@ -184057,34 +189145,62 @@ function pasteEdits(targetFile, pastedText, pasteLocations, copiedFrom, host, pr preferences, formatContext }; - forEachChild(updatedFile, function cb(node) { - if (isIdentifier(node) && !(originalProgram == null ? void 0 : originalProgram.getTypeChecker().resolveName( - node.text, - node, - -1 /* All */, - /*excludeGlobals*/ - false - ))) { - importAdder.addImportForUnresolvedIdentifier( - context, + let offset = 0; + pasteLocations.forEach((location, i) => { + const oldTextLength = location.end - location.pos; + const textToBePasted = actualPastedText ?? pastedText[i]; + const startPos = location.pos + offset; + const endPos = startPos + textToBePasted.length; + const range = { pos: startPos, end: endPos }; + offset += textToBePasted.length - oldTextLength; + const enclosingNode = findAncestor( + getTokenAtPosition(context.sourceFile, range.pos), + (ancestorNode) => rangeContainsRange(ancestorNode, range) + ); + if (!enclosingNode) return; + forEachChild(enclosingNode, function importUnresolvedIdentifiers(node) { + const isImportCandidate = isIdentifier(node) && rangeContainsPosition(range, node.getStart(updatedFile)) && !(updatedProgram == null ? void 0 : updatedProgram.getTypeChecker().resolveName( + node.text, node, - /*useAutoImportProvider*/ - true - ); - } - node.forEachChild(cb); + -1 /* All */, + /*excludeGlobals*/ + false + )); + if (isImportCandidate) { + return importAdder.addImportForUnresolvedIdentifier( + context, + node, + /*useAutoImportProvider*/ + true + ); + } + node.forEachChild(importUnresolvedIdentifiers); + }); }); } importAdder.writeFixes(changes, getQuotePreference(copiedFrom ? copiedFrom.file : targetFile, preferences)); }); + if (!importAdder.hasFixes()) { + return; + } pasteLocations.forEach((paste, i) => { changes.replaceRangeWithText( targetFile, { pos: paste.pos, end: paste.end }, - actualPastedText ? actualPastedText[0] : pastedText[i] + actualPastedText ?? pastedText[i] ); }); } +function getUsageInfoRangeForPasteEdits({ file: sourceFile, range }) { + const pos = range[0].pos; + const end = range[range.length - 1].end; + const startToken = getTokenAtPosition(sourceFile, pos); + const endToken = findTokenOnLeftOfPosition(sourceFile, pos) ?? getTokenAtPosition(sourceFile, end); + return { + pos: isIdentifier(startToken) && pos <= startToken.getStart(sourceFile) ? startToken.getFullStart() : pos, + end: isIdentifier(endToken) && end === endToken.getEnd() ? ts_textChanges_exports.getAdjustedEndPosition(sourceFile, endToken, {}) : end + }; +} // src/server/_namespaces/ts.ts var ts_exports2 = {}; @@ -184139,7 +189255,6 @@ __export(ts_exports2, { GoToDefinition: () => ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, IdentifierNameMap: () => IdentifierNameMap, - IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -184150,6 +189265,7 @@ __export(ts_exports2, { InlayHintKind: () => InlayHintKind2, InlayHints: () => ts_InlayHints_exports, InternalEmitFlags: () => InternalEmitFlags, + InternalNodeBuilderFlags: () => InternalNodeBuilderFlags, InternalSymbolName: () => InternalSymbolName, IntersectionFlags: () => IntersectionFlags, InvalidatedProjectKind: () => InvalidatedProjectKind, @@ -184196,6 +189312,8 @@ __export(ts_exports2, { PollingInterval: () => PollingInterval, PollingWatchKind: () => PollingWatchKind, PragmaKindFlags: () => PragmaKindFlags, + PredicateSemantics: () => PredicateSemantics, + PreparePasteEdits: () => ts_preparePasteEdits_exports, PrivateIdentifierKind: () => PrivateIdentifierKind, ProcessLevel: () => ProcessLevel, ProgramUpdateLevel: () => ProgramUpdateLevel, @@ -184226,7 +189344,6 @@ __export(ts_exports2, { SymbolFlags: () => SymbolFlags, SymbolFormatFlags: () => SymbolFormatFlags, SyntaxKind: () => SyntaxKind, - SyntheticSymbolKind: () => SyntheticSymbolKind, Ternary: () => Ternary, ThrottledCancellationToken: () => ThrottledCancellationToken, TokenClass: () => TokenClass, @@ -184249,7 +189366,6 @@ __export(ts_exports2, { WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, - addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -184272,23 +189388,15 @@ __export(ts_exports2, { arrayFrom: () => arrayFrom, arrayIsEqualTo: () => arrayIsEqualTo, arrayIsHomogeneous: () => arrayIsHomogeneous, - arrayIsSorted: () => arrayIsSorted, arrayOf: () => arrayOf, arrayReverseIterator: () => arrayReverseIterator, arrayToMap: () => arrayToMap, arrayToMultiMap: () => arrayToMultiMap, arrayToNumericMap: () => arrayToNumericMap, - arraysEqual: () => arraysEqual, assertType: () => assertType, assign: () => assign, - assignHelper: () => assignHelper, - asyncDelegator: () => asyncDelegator, - asyncGeneratorHelper: () => asyncGeneratorHelper, asyncSuperHelper: () => asyncSuperHelper, - asyncValues: () => asyncValues, attachFileToDiagnostics: () => attachFileToDiagnostics, - awaitHelper: () => awaitHelper, - awaiterHelper: () => awaiterHelper, base64decode: () => base64decode, base64encode: () => base64encode, binarySearch: () => binarySearch, @@ -184311,14 +189419,16 @@ __export(ts_exports2, { canHaveJSDoc: () => canHaveJSDoc, canHaveLocals: () => canHaveLocals, canHaveModifiers: () => canHaveModifiers, + canHaveModuleSpecifier: () => canHaveModuleSpecifier, canHaveSymbol: () => canHaveSymbol, - canIncludeBindAndCheckDiagnsotics: () => canIncludeBindAndCheckDiagnsotics, + canIncludeBindAndCheckDiagnostics: () => canIncludeBindAndCheckDiagnostics, canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, canProduceDiagnostics: () => canProduceDiagnostics, canUsePropertyAccess: () => canUsePropertyAccess, canWatchAffectingLocation: () => canWatchAffectingLocation, canWatchAtTypes: () => canWatchAtTypes, canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, + canWatchDirectoryOrFilePath: () => canWatchDirectoryOrFilePath, cartesianProduct: () => cartesianProduct, cast: () => cast, chainBundle: () => chainBundle, @@ -184329,16 +189439,13 @@ __export(ts_exports2, { changeFullExtension: () => changeFullExtension, changesAffectModuleResolution: () => changesAffectModuleResolution, changesAffectingProgramStructure: () => changesAffectingProgramStructure, - characterToRegularExpressionFlag: () => characterToRegularExpressionFlag, + characterCodeToRegularExpressionFlag: () => characterCodeToRegularExpressionFlag, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, classHasClassThisAssignment: () => classHasClassThisAssignment, classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, - classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, - classPrivateFieldInHelper: () => classPrivateFieldInHelper, - classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, classicNameResolver: () => classicNameResolver, classifier: () => ts_classifier_exports, cleanExtendedConfigCache: () => cleanExtendedConfigCache, @@ -184346,7 +189453,6 @@ __export(ts_exports2, { clearMap: () => clearMap, clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, climbPastPropertyAccess: () => climbPastPropertyAccess, - climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, clone: () => clone, cloneCompilerOptions: () => cloneCompilerOptions, closeFileWatcher: () => closeFileWatcher, @@ -184359,12 +189465,10 @@ __export(ts_exports2, { commandLineOptionOfCustomType: () => commandLineOptionOfCustomType, commentPragmas: () => commentPragmas, commonOptionsWithBuild: () => commonOptionsWithBuild, - commonPackageFolders: () => commonPackageFolders, compact: () => compact, compareBooleans: () => compareBooleans, compareDataObjects: () => compareDataObjects, compareDiagnostics: () => compareDiagnostics, - compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, compareEmitHelpers: () => compareEmitHelpers, compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, comparePaths: () => comparePaths, @@ -184378,26 +189482,21 @@ __export(ts_exports2, { compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, compareTextSpans: () => compareTextSpans, compareValues: () => compareValues, - compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, - compose: () => compose, computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, computeLineOfPosition: () => computeLineOfPosition, computeLineStarts: () => computeLineStarts, computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, - computeSignature: () => computeSignature, computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, computedOptions: () => computedOptions, concatenate: () => concatenate, concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, - configDirTemplateSubstitutionOptions: () => configDirTemplateSubstitutionOptions, - configDirTemplateSubstitutionWatchOptions: () => configDirTemplateSubstitutionWatchOptions, consumesNodeCoreModules: () => consumesNodeCoreModules, contains: () => contains, containsIgnoredPath: () => containsIgnoredPath, @@ -184428,16 +189527,11 @@ __export(ts_exports2, { createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, createBaseNodeFactory: () => createBaseNodeFactory, createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, - createBindingHelper: () => createBindingHelper, - createBuildInfo: () => createBuildInfo, createBuilderProgram: () => createBuilderProgram, - createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, + createBuilderProgramUsingIncrementalBuildInfo: () => createBuilderProgramUsingIncrementalBuildInfo, createBuilderStatusReporter: () => createBuilderStatusReporter, - createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, - createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, - createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -184489,6 +189583,7 @@ __export(ts_exports2, { createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, createModeAwareCache: () => createModeAwareCache, createModeAwareCacheKey: () => createModeAwareCacheKey, + createModeMismatchDetails: () => createModeMismatchDetails, createModuleNotFoundChain: () => createModuleNotFoundChain, createModuleResolutionCache: () => createModuleResolutionCache, createModuleResolutionLoader: () => createModuleResolutionLoader, @@ -184510,6 +189605,7 @@ __export(ts_exports2, { createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, createProgram: () => createProgram, + createProgramDiagnostics: () => createProgramDiagnostics, createProgramHost: () => createProgramHost, createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, createQueue: () => createQueue, @@ -184559,9 +189655,8 @@ __export(ts_exports2, { declarationNameToString: () => declarationNameToString, decodeMappings: () => decodeMappings, decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, - decorateHelper: () => decorateHelper, deduplicate: () => deduplicate, - defaultIncludeSpec: () => defaultIncludeSpec, + defaultHoverMaximumTruncationLength: () => defaultHoverMaximumTruncationLength, defaultInitCompilerOptions: () => defaultInitCompilerOptions, defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, diagnosticCategoryName: () => diagnosticCategoryName, @@ -184572,27 +189667,22 @@ __export(ts_exports2, { displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, - disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, elideNodes: () => elideNodes, - emitComments: () => emitComments, emitDetachedComments: () => emitDetachedComments, emitFiles: () => emitFiles, emitFilesAndReportErrors: () => emitFilesAndReportErrors, emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, - emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, - emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, emitResolverSkipsTypeChecking: () => emitResolverSkipsTypeChecking, emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, emptyArray: () => emptyArray, emptyFileSystemEntries: () => emptyFileSystemEntries, emptyMap: () => emptyMap, emptyOptions: () => emptyOptions, - emptySet: () => emptySet, endsWith: () => endsWith, ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, ensureScriptKind: () => ensureScriptKind, @@ -184603,7 +189693,6 @@ __export(ts_exports2, { equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, equateStringsCaseSensitive: () => equateStringsCaseSensitive, equateValues: () => equateValues, - esDecorateHelper: () => esDecorateHelper, escapeJsxAttributeString: () => escapeJsxAttributeString, escapeLeadingUnderscores: () => escapeLeadingUnderscores, escapeNonAsciiString: () => escapeNonAsciiString, @@ -184612,15 +189701,14 @@ __export(ts_exports2, { escapeTemplateSubstitution: () => escapeTemplateSubstitution, evaluatorResult: () => evaluatorResult, every: () => every, + exclusivelyPrefixedNodeCoreModules: () => exclusivelyPrefixedNodeCoreModules, executeCommandLine: () => executeCommandLine, expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, explainFiles: () => explainFiles, explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, exportAssignmentIsAlias: () => exportAssignmentIsAlias, - exportStarHelper: () => exportStarHelper, expressionResultIsUnused: () => expressionResultIsUnused, extend: () => extend, - extendsHelper: () => extendsHelper, extensionFromPath: () => extensionFromPath, extensionIsTS: () => extensionIsTS, extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, @@ -184647,7 +189735,6 @@ __export(ts_exports2, { findLast: () => findLast, findLastIndex: () => findLastIndex, findListItemInfo: () => findListItemInfo, - findMap: () => findMap, findModifier: () => findModifier, findNextToken: () => findNextToken, findPackageJson: () => findPackageJson, @@ -184676,8 +189763,10 @@ __export(ts_exports2, { forEach: () => forEach, forEachAncestor: () => forEachAncestor, forEachAncestorDirectory: () => forEachAncestorDirectory, + forEachAncestorDirectoryStoppingAtGlobalCache: () => forEachAncestorDirectoryStoppingAtGlobalCache, forEachChild: () => forEachChild, forEachChildRecursively: () => forEachChildRecursively, + forEachDynamicImportOrRequireCall: () => forEachDynamicImportOrRequireCall, forEachEmittedFile: () => forEachEmittedFile, forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, forEachEntry: () => forEachEntry, @@ -184687,6 +189776,8 @@ __export(ts_exports2, { forEachLeadingCommentRange: () => forEachLeadingCommentRange, forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, forEachNameOfDefaultExport: () => forEachNameOfDefaultExport, + forEachOptionsSyntaxByName: () => forEachOptionsSyntaxByName, + forEachProjectReference: () => forEachProjectReference, forEachPropertyAssignment: () => forEachPropertyAssignment, forEachResolvedProjectReference: () => forEachResolvedProjectReference, forEachReturnStatement: () => forEachReturnStatement, @@ -184695,7 +189786,6 @@ __export(ts_exports2, { forEachTsConfigPropArray: () => forEachTsConfigPropArray, forEachUnique: () => forEachUnique, forEachYieldExpression: () => forEachYieldExpression, - forSomeAncestorDirectory: () => forSomeAncestorDirectory, formatColorAndReset: () => formatColorAndReset, formatDiagnostic: () => formatDiagnostic, formatDiagnostics: () => formatDiagnostics, @@ -184706,11 +189796,8 @@ __export(ts_exports2, { formatMessage: () => formatMessage, formatStringFromArgs: () => formatStringFromArgs, formatting: () => ts_formatting_exports, - fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, - fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, generateDjb2Hash: () => generateDjb2Hash, generateTSConfig: () => generateTSConfig, - generatorHelper: () => generatorHelper, getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, getAdjustedRenameLocation: () => getAdjustedRenameLocation, getAliasDeclarationFromName: () => getAliasDeclarationFromName, @@ -184722,6 +189809,7 @@ __export(ts_exports2, { getAllKeys: () => getAllKeys, getAllProjectOutputs: () => getAllProjectOutputs, getAllSuperTypeNodes: () => getAllSuperTypeNodes, + getAllowImportingTsExtensions: () => getAllowImportingTsExtensions, getAllowJSCompilerOption: () => getAllowJSCompilerOption, getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, getAncestor: () => getAncestor, @@ -184729,7 +189817,6 @@ __export(ts_exports2, { getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, - getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -184754,7 +189841,6 @@ __export(ts_exports2, { getCommonSourceDirectory: () => getCommonSourceDirectory, getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, getCompilerOptionValue: () => getCompilerOptionValue, - getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, @@ -184770,7 +189856,6 @@ __export(ts_exports2, { getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, getContextualTypeFromParent: () => getContextualTypeFromParent, getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, - getCurrentTime: () => getCurrentTime, getDeclarationDiagnostics: () => getDeclarationDiagnostics, getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, @@ -184788,6 +189873,7 @@ __export(ts_exports2, { getDefaultLibFilePath: () => getDefaultLibFilePath, getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, getDefaultLikeExportNameFromDeclaration: () => getDefaultLikeExportNameFromDeclaration, + getDefaultResolutionModeForFileWorker: () => getDefaultResolutionModeForFileWorker, getDiagnosticText: () => getDiagnosticText, getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, getDirectoryPath: () => getDirectoryPath, @@ -184818,6 +189904,7 @@ __export(ts_exports2, { getEmitFlags: () => getEmitFlags, getEmitHelpers: () => getEmitHelpers, getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, + getEmitModuleFormatOfFileWorker: () => getEmitModuleFormatOfFileWorker, getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, @@ -184868,11 +189955,11 @@ __export(ts_exports2, { getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, getIdentifierTypeArguments: () => getIdentifierTypeArguments, getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, + getImpliedNodeFormatForEmitWorker: () => getImpliedNodeFormatForEmitWorker, getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, - getIndentSize: () => getIndentSize, getIndentString: () => getIndentString, getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, getInitializedVariables: () => getInitializedVariables, @@ -184881,6 +189968,7 @@ __export(ts_exports2, { getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, getInternalEmitFlags: () => getInternalEmitFlags, getInvokedExpression: () => getInvokedExpression, + getIsFileExcluded: () => getIsFileExcluded, getIsolatedModules: () => getIsolatedModules, getJSDocAugmentsTag: () => getJSDocAugmentsTag, getJSDocClassTag: () => getJSDocClassTag, @@ -184909,7 +189997,6 @@ __export(ts_exports2, { getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, getJSDocTags: () => getJSDocTags, - getJSDocTagsNoCache: () => getJSDocTagsNoCache, getJSDocTemplateTag: () => getJSDocTemplateTag, getJSDocThisTag: () => getJSDocThisTag, getJSDocType: () => getJSDocType, @@ -184929,11 +190016,12 @@ __export(ts_exports2, { getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, getLeftmostAccessExpression: () => getLeftmostAccessExpression, getLeftmostExpression: () => getLeftmostExpression, + getLibFileNameFromLibReference: () => getLibFileNameFromLibReference, + getLibNameFromLibReference: () => getLibNameFromLibReference, getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName, getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, getLineInfo: () => getLineInfo, getLineOfLocalPosition: () => getLineOfLocalPosition, - getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, getLineStartPositionForPosition: () => getLineStartPositionForPosition, getLineStarts: () => getLineStarts, getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, @@ -184975,7 +190063,6 @@ __export(ts_exports2, { getNameOfScriptTarget: () => getNameOfScriptTarget, getNameOrArgument: () => getNameOrArgument, getNameTable: () => getNameTable, - getNamesForExportedSymbol: () => getNamesForExportedSymbol, getNamespaceDeclarationNode: () => getNamespaceDeclarationNode, getNewLineCharacter: () => getNewLineCharacter, getNewLineKind: () => getNewLineKind, @@ -184992,62 +190079,57 @@ __export(ts_exports2, { getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment, getNonAugmentationDeclaration: () => getNonAugmentationDeclaration, getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode, + getNonIncrementalBuildInfoRoots: () => getNonIncrementalBuildInfoRoots, + getNonModifierTokenPosOfNode: () => getNonModifierTokenPosOfNode, getNormalizedAbsolutePath: () => getNormalizedAbsolutePath, getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot, getNormalizedPathComponents: () => getNormalizedPathComponents, getObjectFlags: () => getObjectFlags, - getOperator: () => getOperator, getOperatorAssociativity: () => getOperatorAssociativity, getOperatorPrecedence: () => getOperatorPrecedence, getOptionFromName: () => getOptionFromName, getOptionsForLibraryResolution: () => getOptionsForLibraryResolution, getOptionsNameMap: () => getOptionsNameMap, + getOptionsSyntaxByArrayElementValue: () => getOptionsSyntaxByArrayElementValue, + getOptionsSyntaxByValue: () => getOptionsSyntaxByValue, getOrCreateEmitNode: () => getOrCreateEmitNode, - getOrCreateExternalHelpersModuleNameIfNeeded: () => getOrCreateExternalHelpersModuleNameIfNeeded, getOrUpdate: () => getOrUpdate, getOriginalNode: () => getOriginalNode, getOriginalNodeId: () => getOriginalNodeId, - getOriginalSourceFile: () => getOriginalSourceFile, getOutputDeclarationFileName: () => getOutputDeclarationFileName, getOutputDeclarationFileNameWorker: () => getOutputDeclarationFileNameWorker, getOutputExtension: () => getOutputExtension, getOutputFileNames: () => getOutputFileNames, getOutputJSFileNameWorker: () => getOutputJSFileNameWorker, getOutputPathsFor: () => getOutputPathsFor, - getOutputPathsForBundle: () => getOutputPathsForBundle, getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath, getOwnKeys: () => getOwnKeys, getOwnValues: () => getOwnValues, - getPackageJsonInfo: () => getPackageJsonInfo, getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths, - getPackageJsonsVisibleToFile: () => getPackageJsonsVisibleToFile, getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName, getPackageScopeForPath: () => getPackageScopeForPath, getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc, - getParameterTypeNode: () => getParameterTypeNode, getParentNodeInSpan: () => getParentNodeInSpan, getParseTreeNode: () => getParseTreeNode, getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile, getPathComponents: () => getPathComponents, - getPathComponentsRelativeTo: () => getPathComponentsRelativeTo, getPathFromPathComponents: () => getPathFromPathComponents, getPathUpdater: () => getPathUpdater, getPathsBasePath: () => getPathsBasePath, getPatternFromSpec: () => getPatternFromSpec, - getPendingEmitKind: () => getPendingEmitKind, + getPendingEmitKindWithSeen: () => getPendingEmitKindWithSeen, getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter, getPossibleGenericSignatures: () => getPossibleGenericSignatures, getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension, + getPossibleOriginalInputPathWithoutChangingExt: () => getPossibleOriginalInputPathWithoutChangingExt, getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo, getPreEmitDiagnostics: () => getPreEmitDiagnostics, getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition, getPrivateIdentifier: () => getPrivateIdentifier, getProperties: () => getProperties, getProperty: () => getProperty, - getPropertyArrayElementValue: () => getPropertyArrayElementValue, getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, - getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, @@ -185071,13 +190153,14 @@ __export(ts_exports2, { getResolvePackageJsonExports: () => getResolvePackageJsonExports, getResolvePackageJsonImports: () => getResolvePackageJsonImports, getResolvedExternalModuleName: () => getResolvedExternalModuleName, + getResolvedModuleFromResolution: () => getResolvedModuleFromResolution, + getResolvedTypeReferenceDirectiveFromResolution: () => getResolvedTypeReferenceDirectiveFromResolution, getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType: () => getRestParameterElementType, getRightMostAssignedExpression: () => getRightMostAssignedExpression, getRootDeclaration: () => getRootDeclaration, getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache, getRootLength: () => getRootLength, - getRootPathSplitLength: () => getRootPathSplitLength, getScriptKind: () => getScriptKind, getScriptKindFromFileName: () => getScriptKindFromFileName, getScriptTargetFeatures: () => getScriptTargetFeatures, @@ -185089,14 +190172,12 @@ __export(ts_exports2, { getSetAccessorValueParameter: () => getSetAccessorValueParameter, getSetExternalModuleIndicator: () => getSetExternalModuleIndicator, getShebang: () => getShebang, - getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => getSingleInitializerOfVariableStatementOrPropertyDeclaration, getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement, getSnapshotText: () => getSnapshotText, getSnippetElement: () => getSnippetElement, getSourceFileOfModule: () => getSourceFileOfModule, getSourceFileOfNode: () => getSourceFileOfNode, getSourceFilePathInNewDir: () => getSourceFilePathInNewDir, - getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker, getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText, getSourceFilesToEmit: () => getSourceFilesToEmit, getSourceMapRange: () => getSourceMapRange, @@ -185119,7 +190200,6 @@ __export(ts_exports2, { getSwitchedType: () => getSwitchedType, getSymbolId: () => getSymbolId, getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier, - getSymbolParentOrFail: () => getSymbolParentOrFail, getSymbolTarget: () => getSymbolTarget, getSyntacticClassifications: () => getSyntacticClassifications, getSyntacticModifierFlags: () => getSyntacticModifierFlags, @@ -185150,7 +190230,6 @@ __export(ts_exports2, { getTouchingToken: () => getTouchingToken, getTrailingCommentRanges: () => getTrailingCommentRanges, getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter, - getTransformFlagsSubtreeExclusions: () => getTransformFlagsSubtreeExclusions, getTransformers: () => getTransformers, getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath, getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression, @@ -185178,7 +190257,6 @@ __export(ts_exports2, { hasAccessorModifier: () => hasAccessorModifier, hasAmbientModifier: () => hasAmbientModifier, hasChangesInResolutions: () => hasChangesInResolutions, - hasChildOfKind: () => hasChildOfKind, hasContextSensitiveParameters: () => hasContextSensitiveParameters, hasDecorators: () => hasDecorators, hasDocComment: () => hasDocComment, @@ -185187,6 +190265,7 @@ __export(ts_exports2, { hasEffectiveModifiers: () => hasEffectiveModifiers, hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier, hasExtension: () => hasExtension, + hasImplementationTSFileExtension: () => hasImplementationTSFileExtension, hasIndexSignature: () => hasIndexSignature, hasInferredType: () => hasInferredType, hasInitializer: () => hasInitializer, @@ -185214,7 +190293,6 @@ __export(ts_exports2, { hasType: () => hasType, hasTypeArguments: () => hasTypeArguments, hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter, - helperString: () => helperString, hostGetCanonicalFileName: () => hostGetCanonicalFileName, hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames, idText: () => idText, @@ -185224,9 +190302,8 @@ __export(ts_exports2, { identitySourceMapConsumer: () => identitySourceMapConsumer, ignoreSourceNewlines: () => ignoreSourceNewlines, ignoredPaths: () => ignoredPaths, - importDefaultHelper: () => importDefaultHelper, importFromModuleSpecifier: () => importFromModuleSpecifier, - importStarHelper: () => importStarHelper, + importSyntaxAffectsModuleResolution: () => importSyntaxAffectsModuleResolution, indexOfAnyCharCode: () => indexOfAnyCharCode, indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, @@ -185234,7 +190311,6 @@ __export(ts_exports2, { injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, - insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue, insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue, @@ -185250,11 +190326,9 @@ __export(ts_exports2, { isAccessibilityModifier: () => isAccessibilityModifier, isAccessor: () => isAccessor, isAccessorModifier: () => isAccessorModifier, - isAliasSymbolDeclaration: () => isAliasSymbolDeclaration, isAliasableExpression: () => isAliasableExpression, isAmbientModule: () => isAmbientModule, isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration, - isAnonymousFunctionDefinition: () => isAnonymousFunctionDefinition, isAnyDirectorySeparator: () => isAnyDirectorySeparator, isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire, isAnyImportOrReExport: () => isAnyImportOrReExport, @@ -185290,6 +190364,7 @@ __export(ts_exports2, { isAwaitKeyword: () => isAwaitKeyword, isBigIntLiteral: () => isBigIntLiteral, isBinaryExpression: () => isBinaryExpression, + isBinaryLogicalOperator: () => isBinaryLogicalOperator, isBinaryOperatorToken: () => isBinaryOperatorToken, isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, isBindableStaticAccessExpression: () => isBindableStaticAccessExpression, @@ -185309,9 +190384,9 @@ __export(ts_exports2, { isBooleanLiteral: () => isBooleanLiteral, isBreakOrContinueStatement: () => isBreakOrContinueStatement, isBreakStatement: () => isBreakStatement, - isBuild: () => isBuild, + isBuildCommand: () => isBuildCommand, isBuildInfoFile: () => isBuildInfoFile, - isBuilderProgram: () => isBuilderProgram2, + isBuilderProgram: () => isBuilderProgram, isBundle: () => isBundle, isCallChain: () => isCallChain, isCallExpression: () => isCallExpression, @@ -185330,7 +190405,6 @@ __export(ts_exports2, { isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration, isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, - isChildOfNodeWithKind: () => isChildOfNodeWithKind, isCircularBuildOrder: () => isCircularBuildOrder, isClassDeclaration: () => isClassDeclaration, isClassElement: () => isClassElement, @@ -185342,7 +190416,6 @@ __export(ts_exports2, { isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, - isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, isCommaListExpression: () => isCommaListExpression, @@ -185385,16 +190458,13 @@ __export(ts_exports2, { isDeleteTarget: () => isDeleteTarget, isDeprecatedDeclaration: () => isDeprecatedDeclaration, isDestructuringAssignment: () => isDestructuringAssignment, - isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, - isESSymbolIdentifier: () => isESSymbolIdentifier, isEffectiveExternalModule: () => isEffectiveExternalModule, - isEffectiveModuleDeclaration: () => isEffectiveModuleDeclaration, isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, isElementAccessChain: () => isElementAccessChain, isElementAccessExpression: () => isElementAccessExpression, @@ -185464,13 +190534,11 @@ __export(ts_exports2, { isFunctionOrModuleBlock: () => isFunctionOrModuleBlock, isFunctionSymbol: () => isFunctionSymbol, isFunctionTypeNode: () => isFunctionTypeNode, - isFutureReservedKeyword: () => isFutureReservedKeyword, isGeneratedIdentifier: () => isGeneratedIdentifier, isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier, isGetAccessor: () => isGetAccessor, isGetAccessorDeclaration: () => isGetAccessorDeclaration, isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration, - isGlobalDeclaration: () => isGlobalDeclaration, isGlobalScopeAugmentation: () => isGlobalScopeAugmentation, isGlobalSourceFile: () => isGlobalSourceFile, isGrammarError: () => isGrammarError, @@ -185503,7 +190571,7 @@ __export(ts_exports2, { isImportSpecifier: () => isImportSpecifier, isImportTypeAssertionContainer: () => isImportTypeAssertionContainer, isImportTypeNode: () => isImportTypeNode, - isImportableFile: () => isImportableFile, + isImportable: () => isImportable, isInComment: () => isInComment, isInCompoundLikeAssignment: () => isInCompoundLikeAssignment, isInExpressionContext: () => isInExpressionContext, @@ -185518,6 +190586,8 @@ __export(ts_exports2, { isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, isInTypeQuery: () => isInTypeQuery, + isIncrementalBuildInfo: () => isIncrementalBuildInfo, + isIncrementalBundleEmitBuildInfo: () => isIncrementalBundleEmitBuildInfo, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -185600,6 +190670,7 @@ __export(ts_exports2, { isJsxAttributeLike: () => isJsxAttributeLike, isJsxAttributeName: () => isJsxAttributeName, isJsxAttributes: () => isJsxAttributes, + isJsxCallLike: () => isJsxCallLike, isJsxChild: () => isJsxChild, isJsxClosingElement: () => isJsxClosingElement, isJsxClosingFragment: () => isJsxClosingFragment, @@ -185624,7 +190695,6 @@ __export(ts_exports2, { isLabeledStatement: () => isLabeledStatement, isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement, isLeftHandSideExpression: () => isLeftHandSideExpression, - isLeftHandSideOfAssignment: () => isLeftHandSideOfAssignment, isLet: () => isLet, isLineBreak: () => isLineBreak, isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName, @@ -185632,10 +190702,7 @@ __export(ts_exports2, { isLiteralExpressionOfObject: () => isLiteralExpressionOfObject, isLiteralImportTypeNode: () => isLiteralImportTypeNode, isLiteralKind: () => isLiteralKind, - isLiteralLikeAccess: () => isLiteralLikeAccess, - isLiteralLikeElementAccess: () => isLiteralLikeElementAccess, isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess, - isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression, isLiteralTypeLiteral: () => isLiteralTypeLiteral, isLiteralTypeNode: () => isLiteralTypeNode, isLocalName: () => isLocalName, @@ -185660,6 +190727,7 @@ __export(ts_exports2, { isModuleBlock: () => isModuleBlock, isModuleBody: () => isModuleBody, isModuleDeclaration: () => isModuleDeclaration, + isModuleExportName: () => isModuleExportName, isModuleExportsAccessExpression: () => isModuleExportsAccessExpression, isModuleIdentifier: () => isModuleIdentifier, isModuleName: () => isModuleName, @@ -185669,7 +190737,6 @@ __export(ts_exports2, { isModuleWithStringLiteralName: () => isModuleWithStringLiteralName, isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration, isNameOfModuleDeclaration: () => isNameOfModuleDeclaration, - isNamedClassElement: () => isNamedClassElement, isNamedDeclaration: () => isNamedDeclaration, isNamedEvaluation: () => isNamedEvaluation, isNamedEvaluationSource: () => isNamedEvaluationSource, @@ -185686,8 +190753,8 @@ __export(ts_exports2, { isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, isNewExpression: () => isNewExpression, isNewExpressionTarget: () => isNewExpressionTarget, + isNewScopeNode: () => isNewScopeNode, isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, - isNode: () => isNode, isNodeArray: () => isNodeArray, isNodeArrayMultiLine: () => isNodeArrayMultiLine, isNodeDescendantOf: () => isNodeDescendantOf, @@ -185696,14 +190763,11 @@ __export(ts_exports2, { isNodeModulesDirectory: () => isNodeModulesDirectory, isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration, isNonContextualKeyword: () => isNonContextualKeyword, - isNonExportDefaultModifier: () => isNonExportDefaultModifier, isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, - isNonGlobalDeclaration: () => isNonGlobalDeclaration, isNonNullAccess: () => isNonNullAccess, isNonNullChain: () => isNonNullChain, isNonNullExpression: () => isNonNullExpression, isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, - isNotEmittedOrPartiallyEmittedNode: () => isNotEmittedOrPartiallyEmittedNode, isNotEmittedStatement: () => isNotEmittedStatement, isNullishCoalesce: () => isNullishCoalesce, isNumber: () => isNumber, @@ -185719,7 +190783,6 @@ __export(ts_exports2, { isObjectLiteralMethod: () => isObjectLiteralMethod, isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, isObjectTypeDeclaration: () => isObjectTypeDeclaration, - isOctalDigit: () => isOctalDigit, isOmittedExpression: () => isOmittedExpression, isOptionalChain: () => isOptionalChain, isOptionalChainRoot: () => isOptionalChainRoot, @@ -185739,6 +190802,7 @@ __export(ts_exports2, { isParseTreeNode: () => isParseTreeNode, isPartOfParameterDeclaration: () => isPartOfParameterDeclaration, isPartOfTypeNode: () => isPartOfTypeNode, + isPartOfTypeOnlyImportOrExportDeclaration: () => isPartOfTypeOnlyImportOrExportDeclaration, isPartOfTypeQuery: () => isPartOfTypeQuery, isPartiallyEmittedExpression: () => isPartiallyEmittedExpression, isPatternMatch: () => isPatternMatch, @@ -185753,7 +190817,6 @@ __export(ts_exports2, { isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression, isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol, - isProgramBundleEmitBuildInfo: () => isProgramBundleEmitBuildInfo, isProgramUptoDate: () => isProgramUptoDate, isPrologueDirective: () => isPrologueDirective, isPropertyAccessChain: () => isPropertyAccessChain, @@ -185766,7 +190829,6 @@ __export(ts_exports2, { isPropertyName: () => isPropertyName, isPropertyNameLiteral: () => isPropertyNameLiteral, isPropertySignature: () => isPropertySignature, - isProtoSetter: () => isProtoSetter, isPrototypeAccess: () => isPrototypeAccess, isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, isPunctuation: () => isPunctuation, @@ -185776,7 +190838,6 @@ __export(ts_exports2, { isQuestionOrExclamationToken: () => isQuestionOrExclamationToken, isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken, isQuestionToken: () => isQuestionToken, - isRawSourceMap: () => isRawSourceMap, isReadonlyKeyword: () => isReadonlyKeyword, isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken, isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment, @@ -185798,24 +190859,23 @@ __export(ts_exports2, { isRootedDiskPath: () => isRootedDiskPath, isSameEntityName: () => isSameEntityName, isSatisfiesExpression: () => isSatisfiesExpression, - isScopeMarker: () => isScopeMarker, isSemicolonClassElement: () => isSemicolonClassElement, isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, - isShebangTrivia: () => isShebangTrivia, isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, + isSideEffectImport: () => isSideEffectImport, isSignedNumericLiteral: () => isSignedNumericLiteral, isSimpleCopiableExpression: () => isSimpleCopiableExpression, isSimpleInlineableExpression: () => isSimpleInlineableExpression, - isSimpleParameter: () => isSimpleParameter, isSimpleParameterList: () => isSimpleParameterList, isSingleOrDoubleQuote: () => isSingleOrDoubleQuote, + isSolutionConfig: () => isSolutionConfig, + isSourceElement: () => isSourceElement, isSourceFile: () => isSourceFile, isSourceFileFromLibrary: () => isSourceFileFromLibrary, isSourceFileJS: () => isSourceFileJS, - isSourceFileNotJS: () => isSourceFileNotJS, isSourceFileNotJson: () => isSourceFileNotJson, isSourceMapping: () => isSourceMapping, isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, @@ -185828,7 +190888,6 @@ __export(ts_exports2, { isStatic: () => isStatic, isStaticModifier: () => isStaticModifier, isString: () => isString, - isStringAKeyword: () => isStringAKeyword, isStringANonContextualKeyword: () => isStringANonContextualKeyword, isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, isStringDoubleQuoted: () => isStringDoubleQuoted, @@ -185841,7 +190900,6 @@ __export(ts_exports2, { isStringTextContainingNode: () => isStringTextContainingNode, isSuperCall: () => isSuperCall, isSuperKeyword: () => isSuperKeyword, - isSuperOrSuperProperty: () => isSuperOrSuperProperty, isSuperProperty: () => isSuperProperty, isSupportedSourceFileName: () => isSupportedSourceFileName, isSwitchStatement: () => isSwitchStatement, @@ -185887,7 +190945,6 @@ __export(ts_exports2, { isTypeDeclaration: () => isTypeDeclaration, isTypeElement: () => isTypeElement, isTypeKeyword: () => isTypeKeyword, - isTypeKeywordToken: () => isTypeKeywordToken, isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, isTypeLiteralNode: () => isTypeLiteralNode, isTypeNode: () => isTypeNode, @@ -185923,7 +190980,6 @@ __export(ts_exports2, { isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, isVariableDeclarationList: () => isVariableDeclarationList, isVariableLike: () => isVariableLike, - isVariableLikeOrAccessor: () => isVariableLikeOrAccessor, isVariableStatement: () => isVariableStatement, isVoidExpression: () => isVoidExpression, isWatchSet: () => isWatchSet, @@ -185942,10 +190998,6 @@ __export(ts_exports2, { libMap: () => libMap, libs: () => libs, lineBreakPart: () => lineBreakPart, - linkNamePart: () => linkNamePart, - linkPart: () => linkPart, - linkTextPart: () => linkTextPart, - listFiles: () => listFiles, loadModuleFromGlobalCache: () => loadModuleFromGlobalCache, loadWithModeAwareCache: () => loadWithModeAwareCache, makeIdentifierFromModuleName: () => makeIdentifierFromModuleName, @@ -185955,7 +191007,6 @@ __export(ts_exports2, { map: () => map, mapAllOrFail: () => mapAllOrFail, mapDefined: () => mapDefined, - mapDefinedEntries: () => mapDefinedEntries, mapDefinedIterator: () => mapDefinedIterator, mapEntries: () => mapEntries, mapIterator: () => mapIterator, @@ -185965,18 +191016,20 @@ __export(ts_exports2, { matchPatternOrExact: () => matchPatternOrExact, matchedText: () => matchedText, matchesExclude: () => matchesExclude, + matchesExcludeWorker: () => matchesExcludeWorker, + maxBy: () => maxBy, maybeBind: () => maybeBind, maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages, memoize: () => memoize, - memoizeCached: () => memoizeCached, memoizeOne: () => memoizeOne, - memoizeWeak: () => memoizeWeak, - metadataHelper: () => metadataHelper, min: () => min, minAndMax: () => minAndMax, missingFileModifiedTime: () => missingFileModifiedTime, modifierToFlag: () => modifierToFlag, modifiersToFlags: () => modifiersToFlags, + moduleExportNameIsDefault: () => moduleExportNameIsDefault, + moduleExportNameTextEscaped: () => moduleExportNameTextEscaped, + moduleExportNameTextUnescaped: () => moduleExportNameTextUnescaped, moduleOptionDeclaration: () => moduleOptionDeclaration, moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter, @@ -185985,6 +191038,7 @@ __export(ts_exports2, { moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules, moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier, moduleSpecifiers: () => ts_moduleSpecifiers_exports, + moduleSupportsImportAttributes: () => moduleSupportsImportAttributes, moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier, moveEmitHelpers: () => moveEmitHelpers, moveRangeEnd: () => moveRangeEnd, @@ -186003,6 +191057,7 @@ __export(ts_exports2, { noTransformers: () => noTransformers, noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength, nodeCanBeDecorated: () => nodeCanBeDecorated, + nodeCoreModules: () => nodeCoreModules, nodeHasName: () => nodeHasName, nodeIsDecorated: () => nodeIsDecorated, nodeIsMissing: () => nodeIsMissing, @@ -186016,11 +191071,11 @@ __export(ts_exports2, { nodePosToString: () => nodePosToString, nodeSeenTracker: () => nodeSeenTracker, nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment, - nodeToDisplayParts: () => nodeToDisplayParts, noop: () => noop, noopFileWatcher: () => noopFileWatcher, normalizePath: () => normalizePath, normalizeSlashes: () => normalizeSlashes, + normalizeSpans: () => normalizeSpans, not: () => not, notImplemented: () => notImplemented, notImplementedResolver: () => notImplementedResolver, @@ -186035,13 +191090,11 @@ __export(ts_exports2, { optionsForBuild: () => optionsForBuild, optionsForWatch: () => optionsForWatch, optionsHaveChanges: () => optionsHaveChanges, - optionsHaveModuleResolutionChanges: () => optionsHaveModuleResolutionChanges, or: () => or, orderedRemoveItem: () => orderedRemoveItem, orderedRemoveItemAt: () => orderedRemoveItemAt, packageIdToPackageName: () => packageIdToPackageName, packageIdToString: () => packageIdToString, - paramHelper: () => paramHelper, parameterIsThisKeyword: () => parameterIsThisKeyword, parameterNamePart: () => parameterNamePart, parseBaseNodeFactory: () => parseBaseNodeFactory, @@ -186072,10 +191125,8 @@ __export(ts_exports2, { pathIsBareSpecifier: () => pathIsBareSpecifier, pathIsRelative: () => pathIsRelative, patternText: () => patternText, - perfLogger: () => perfLogger, performIncrementalCompilation: () => performIncrementalCompilation, performance: () => ts_performance_exports, - plainJSErrors: () => plainJSErrors, positionBelongsToNode: () => positionBelongsToNode, positionIsASICandidate: () => positionIsASICandidate, positionIsSynthesized: () => positionIsSynthesized, @@ -186088,7 +191139,6 @@ __export(ts_exports2, { programContainsEsModules: () => programContainsEsModules, programContainsModules: () => programContainsModules, projectReferenceIsEqualTo: () => projectReferenceIsEqualTo, - propKeyHelper: () => propKeyHelper, propertyNamePart: () => propertyNamePart, pseudoBigIntToString: () => pseudoBigIntToString, punctuationPart: () => punctuationPart, @@ -186111,7 +191161,6 @@ __export(ts_exports2, { rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine, readBuilderProgram: () => readBuilderProgram, readConfigFile: () => readConfigFile, - readHelper: () => readHelper, readJson: () => readJson, readJsonConfigFile: () => readJsonConfigFile, readJsonOrUndefined: () => readJsonOrUndefined, @@ -186122,7 +191171,7 @@ __export(ts_exports2, { reducePathComponents: () => reducePathComponents, refactor: () => ts_refactor_exports, regExpEscape: () => regExpEscape, - regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter, + regularExpressionFlagToCharacterCode: () => regularExpressionFlagToCharacterCode, relativeComplement: () => relativeComplement, removeAllComments: () => removeAllComments, removeEmitHelper: () => removeEmitHelper, @@ -186130,7 +191179,6 @@ __export(ts_exports2, { removeFileExtension: () => removeFileExtension, removeIgnoredPath: () => removeIgnoredPath, removeMinAndVersionNumbers: () => removeMinAndVersionNumbers, - removeOptionality: () => removeOptionality, removePrefix: () => removePrefix, removeSuffix: () => removeSuffix, removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator, @@ -186149,20 +191197,17 @@ __export(ts_exports2, { resolveTripleslashReference: () => resolveTripleslashReference, resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, resolvingEmptyArray: () => resolvingEmptyArray, - restHelper: () => restHelper, returnFalse: () => returnFalse, returnNoopFileWatcher: () => returnNoopFileWatcher, returnTrue: () => returnTrue, returnUndefined: () => returnUndefined, returnsPromise: () => returnsPromise, - runInitializersHelper: () => runInitializersHelper, + rewriteModuleSpecifier: () => rewriteModuleSpecifier, sameFlatMap: () => sameFlatMap, sameMap: () => sameMap, sameMapping: () => sameMapping, - scanShebangTrivia: () => scanShebangTrivia, scanTokenAtPosition: () => scanTokenAtPosition, scanner: () => scanner, - screenStartingMessageCodes: () => screenStartingMessageCodes, semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations, serializeCompilerOptions: () => serializeCompilerOptions, server: () => ts_server_exports3, @@ -186170,16 +191215,13 @@ __export(ts_exports2, { setCommentRange: () => setCommentRange, setConfigFileInOptions: () => setConfigFileInOptions, setConstantValue: () => setConstantValue, - setEachParent: () => setEachParent, setEmitFlags: () => setEmitFlags, - setFunctionNameHelper: () => setFunctionNameHelper, setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned, setIdentifierAutoGenerate: () => setIdentifierAutoGenerate, setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference, setIdentifierTypeArguments: () => setIdentifierTypeArguments, setInternalEmitFlags: () => setInternalEmitFlags, setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages, - setModuleDefaultHelper: () => setModuleDefaultHelper, setNodeChildren: () => setNodeChildren, setNodeFlags: () => setNodeFlags, setObjectAllocator: () => setObjectAllocator, @@ -186206,9 +191248,9 @@ __export(ts_exports2, { setValueDeclaration: () => setValueDeclaration, shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension, shouldPreserveConstEnums: () => shouldPreserveConstEnums, + shouldRewriteModuleSpecifier: () => shouldRewriteModuleSpecifier, shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules, showModuleSpecifier: () => showModuleSpecifier, - signatureHasLiteralTypes: () => signatureHasLiteralTypes, signatureHasRestParameter: () => signatureHasRestParameter, signatureToDisplayParts: () => signatureToDisplayParts, single: () => single, @@ -186217,18 +191259,17 @@ __export(ts_exports2, { singleOrMany: () => singleOrMany, singleOrUndefined: () => singleOrUndefined, skipAlias: () => skipAlias, - skipAssertions: () => skipAssertions, skipConstraint: () => skipConstraint, skipOuterExpressions: () => skipOuterExpressions, skipParentheses: () => skipParentheses, skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions, skipTrivia: () => skipTrivia, skipTypeChecking: () => skipTypeChecking, + skipTypeCheckingIgnoringNoCheck: () => skipTypeCheckingIgnoringNoCheck, skipTypeParentheses: () => skipTypeParentheses, skipWhile: () => skipWhile, sliceAfter: () => sliceAfter, some: () => some, - sort: () => sort, sortAndDeduplicate: () => sortAndDeduplicate, sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics, sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions, @@ -186237,8 +191278,6 @@ __export(ts_exports2, { sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart, spacePart: () => spacePart, spanMap: () => spanMap, - spreadArrayHelper: () => spreadArrayHelper, - stableSort: () => stableSort, startEndContainsRange: () => startEndContainsRange, startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd, startOnNewLine: () => startOnNewLine, @@ -186251,10 +191290,8 @@ __export(ts_exports2, { stringToToken: () => stringToToken, stripQuotes: () => stripQuotes, supportedDeclarationExtensions: () => supportedDeclarationExtensions, - supportedJSExtensions: () => supportedJSExtensions, supportedJSExtensionsFlat: () => supportedJSExtensionsFlat, supportedLocaleDirectories: () => supportedLocaleDirectories, - supportedTSExtensions: () => supportedTSExtensions, supportedTSExtensionsFlat: () => supportedTSExtensionsFlat, supportedTSImplementationExtensions: () => supportedTSImplementationExtensions, suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia, @@ -186263,16 +191300,13 @@ __export(ts_exports2, { symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault, symbolName: () => symbolName, symbolNameNoDefault: () => symbolNameNoDefault, - symbolPart: () => symbolPart, symbolToDisplayParts: () => symbolToDisplayParts, - syntaxMayBeASICandidate: () => syntaxMayBeASICandidate, - syntaxRequiresTrailingSemicolonOrASI: () => syntaxRequiresTrailingSemicolonOrASI, sys: () => sys, sysLog: () => sysLog, tagNamesAreEquivalent: () => tagNamesAreEquivalent, takeWhile: () => takeWhile, targetOptionDeclaration: () => targetOptionDeclaration, - templateObjectHelper: () => templateObjectHelper, + targetToLibMap: () => targetToLibMap, testFormatSettings: () => testFormatSettings, textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged, textChangeRangeNewSpan: () => textChangeRangeNewSpan, @@ -186280,7 +191314,10 @@ __export(ts_exports2, { textOrKeywordPart: () => textOrKeywordPart, textPart: () => textPart, textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive, + textRangeContainsTextSpan: () => textRangeContainsTextSpan, + textRangeIntersectsWithTextSpan: () => textRangeIntersectsWithTextSpan, textSpanContainsPosition: () => textSpanContainsPosition, + textSpanContainsTextRange: () => textSpanContainsTextRange, textSpanContainsTextSpan: () => textSpanContainsTextSpan, textSpanEnd: () => textSpanEnd, textSpanIntersection: () => textSpanIntersection, @@ -186298,15 +191335,16 @@ __export(ts_exports2, { toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit, toEditorSettings: () => toEditorSettings, toFileNameLowerCase: () => toFileNameLowerCase, - toLowerCase: () => toLowerCase, toPath: () => toPath, toProgramEmitPending: () => toProgramEmitPending, + toSorted: () => toSorted, tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword, tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan, tokenToString: () => tokenToString, trace: () => trace, tracing: () => tracing, tracingEnabled: () => tracingEnabled, + transferSourceFileChildren: () => transferSourceFileChildren, transform: () => transform, transformClassFields: () => transformClassFields, transformDeclarations: () => transformDeclarations, @@ -186321,11 +191359,11 @@ __export(ts_exports2, { transformESDecorators: () => transformESDecorators, transformESNext: () => transformESNext, transformGenerators: () => transformGenerators, + transformImpliedNodeFormatDependentModule: () => transformImpliedNodeFormatDependentModule, transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, transformNamedEvaluation: () => transformNamedEvaluation, - transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, transformTypeScript: () => transformTypeScript, @@ -186352,7 +191390,6 @@ __export(ts_exports2, { tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement, tryGetSourceMappingURL: () => tryGetSourceMappingURL, tryGetTextOfPropertyName: () => tryGetTextOfPropertyName, - tryIOAndConsumeErrors: () => tryIOAndConsumeErrors, tryParseJson: () => tryParseJson, tryParsePattern: () => tryParsePattern, tryParsePatterns: () => tryParsePatterns, @@ -186363,6 +191400,7 @@ __export(ts_exports2, { tryRemoveExtension: () => tryRemoveExtension, tryRemovePrefix: () => tryRemovePrefix, tryRemoveSuffix: () => tryRemoveSuffix, + tscBuildOption: () => tscBuildOption, typeAcquisitionDeclarations: () => typeAcquisitionDeclarations, typeAliasNamePart: () => typeAliasNamePart, typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo, @@ -186374,7 +191412,7 @@ __export(ts_exports2, { unescapeLeadingUnderscores: () => unescapeLeadingUnderscores, unmangleScopedPackageName: () => unmangleScopedPackageName, unorderedRemoveItem: () => unorderedRemoveItem, - unorderedRemoveItemAt: () => unorderedRemoveItemAt, + unprefixedNodeCoreModules: () => unprefixedNodeCoreModules, unreachableCodeIsError: () => unreachableCodeIsError, unsetNodeChildren: () => unsetNodeChildren, unusedLabelIsError: () => unusedLabelIsError, @@ -186387,11 +191425,9 @@ __export(ts_exports2, { updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher, updateSourceFile: () => updateSourceFile, updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories, - usesExtensionsOnImports: () => usesExtensionsOnImports, usingSingleLineStringWriter: () => usingSingleLineStringWriter, utf16EncodeAsString: () => utf16EncodeAsString, validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage, - valuesHelper: () => valuesHelper, version: () => version, versionMajorMinor: () => versionMajorMinor, visitArray: () => visitArray, @@ -186404,7 +191440,6 @@ __export(ts_exports2, { visitNodes: () => visitNodes2, visitParameterList: () => visitParameterList, walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns, - walkUpLexicalEnvironments: () => walkUpLexicalEnvironments, walkUpOuterExpressions: () => walkUpOuterExpressions, walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions, walkUpParenthesizedTypes: () => walkUpParenthesizedTypes, @@ -186557,20 +191592,19 @@ __export(ts_server_exports3, { LogLevel: () => LogLevel2, Msg: () => Msg, OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent, - Project: () => Project3, + Project: () => Project2, ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent, ProjectKind: () => ProjectKind, ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent, ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent, ProjectLoadingStartEvent: () => ProjectLoadingStartEvent, - ProjectService: () => ProjectService3, + ProjectService: () => ProjectService2, ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent, ScriptInfo: () => ScriptInfo, ScriptVersionCache: () => ScriptVersionCache, Session: () => Session3, TextStorage: () => TextStorage, ThrottledOperations: () => ThrottledOperations, - TypingsCache: () => TypingsCache, TypingsInstallerAdapter: () => TypingsInstallerAdapter, allFilesAreJsOrDts: () => allFilesAreJsOrDts, allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts, @@ -186589,10 +191623,10 @@ __export(ts_server_exports3, { createSortedArray: () => createSortedArray2, emptyArray: () => emptyArray2, findArgument: () => findArgument, - forEachResolvedProjectReferenceProject: () => forEachResolvedProjectReferenceProject, formatDiagnosticToProtocol: () => formatDiagnosticToProtocol, formatMessage: () => formatMessage2, getBaseConfigFileName: () => getBaseConfigFileName, + getDetailWatchInfo: () => getDetailWatchInfo, getLocationInNewDocument: () => getLocationInNewDocument, hasArgument: () => hasArgument, hasNoTypeScriptSource: () => hasNoTypeScriptSource, @@ -186615,7 +191649,8 @@ __export(ts_server_exports3, { nullCancellationToken: () => nullCancellationToken, nullTypingsInstaller: () => nullTypingsInstaller, protocol: () => ts_server_protocol_exports, - removeSorted: () => removeSorted, + scriptInfoIsContainedByBackgroundProject: () => scriptInfoIsContainedByBackgroundProject, + scriptInfoIsContainedByDeferredClosedProject: () => scriptInfoIsContainedByDeferredClosedProject, stringifyIndented: () => stringifyIndented, toEvent: () => toEvent, toNormalizedPath: () => toNormalizedPath, @@ -186682,7 +191717,6 @@ var TypingsInstaller = class { this.missingTypingsSet = /* @__PURE__ */ new Set(); this.knownCachesSet = /* @__PURE__ */ new Set(); this.projectWatchers = /* @__PURE__ */ new Map(); - /** @internal */ this.pendingRunRequests = []; this.installRunCount = 1; this.inFlightRequestCount = 0; @@ -186840,9 +191874,9 @@ var TypingsInstaller = class { this.log.writeLine(`Loaded content of '${packageJson}':${stringifyIndented(npmConfig)}`); this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`); } - if (npmConfig.devDependencies && npmLock.dependencies) { + if (npmConfig.devDependencies && (npmLock.packages || npmLock.dependencies)) { for (const key in npmConfig.devDependencies) { - if (!hasProperty(npmLock.dependencies, key)) { + if (npmLock.packages && !hasProperty(npmLock.packages, `node_modules/${key}`) || npmLock.dependencies && !hasProperty(npmLock.dependencies, key)) { continue; } const packageName = getBaseFileName(key); @@ -186866,7 +191900,7 @@ var TypingsInstaller = class { if (this.log.isEnabled()) { this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`); } - const info = getProperty(npmLock.dependencies, key); + const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${key}`) || getProperty(npmLock.dependencies, key); const version2 = info && info.version; if (!version2) { continue; @@ -187157,14 +192191,11 @@ var ThrottledOperations = class _ThrottledOperations { return this.pendingTimeouts.delete(operationId); } static run(operationId, self, cb) { - var _a, _b; - (_a = perfLogger) == null ? void 0 : _a.logStartScheduledOperation(operationId); self.pendingTimeouts.delete(operationId); if (self.logger) { self.logger.info(`Running: ${operationId}`); } cb(); - (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); } }; var GcTimer = class _GcTimer { @@ -187180,9 +192211,7 @@ var GcTimer = class _GcTimer { this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this); } static run(self) { - var _a, _b; self.timerId = void 0; - (_a = perfLogger) == null ? void 0 : _a.logStartScheduledOperation("GC collect"); const log = self.logger.hasLevel(2 /* requestTime */); const before = log && self.host.getMemoryUsage(); self.host.gc(); @@ -187190,26 +192219,12 @@ var GcTimer = class _GcTimer { const after = self.host.getMemoryUsage(); self.logger.perftrc(`GC::before ${before}, after ${after}`); } - (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); } }; function getBaseConfigFileName(configFilePath) { const base = getBaseFileName(configFilePath); return base === "tsconfig.json" || base === "jsconfig.json" ? base : void 0; } -function removeSorted(array, remove, compare) { - if (!array || array.length === 0) { - return; - } - if (array[0] === remove) { - array.splice(0, 1); - return; - } - const removeIndex = binarySearch(array, remove, identity, compare); - if (removeIndex >= 0) { - array.splice(removeIndex, 1); - } -} // src/server/_namespaces/ts.server.protocol.ts var ts_server_protocol_exports = {}; @@ -187224,7 +192239,7 @@ __export(ts_server_protocol_exports, { NewLineKind: () => NewLineKind2, OrganizeImportsMode: () => OrganizeImportsMode, PollingWatchKind: () => PollingWatchKind2, - ScriptTarget: () => ScriptTarget10, + ScriptTarget: () => ScriptTarget11, SemicolonPreference: () => SemicolonPreference, WatchDirectoryKind: () => WatchDirectoryKind2, WatchFileKind: () => WatchFileKind2 @@ -187321,6 +192336,7 @@ var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => { CommandTypes2["GetApplicableRefactors"] = "getApplicableRefactors"; CommandTypes2["GetEditsForRefactor"] = "getEditsForRefactor"; CommandTypes2["GetMoveToRefactoringFileSuggestions"] = "getMoveToRefactoringFileSuggestions"; + CommandTypes2["PreparePasteEdits"] = "preparePasteEdits"; CommandTypes2["GetPasteEdits"] = "getPasteEdits"; CommandTypes2["GetEditsForRefactorFull"] = "getEditsForRefactor-full"; CommandTypes2["OrganizeImports"] = "organizeImports"; @@ -187344,6 +192360,7 @@ var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => { CommandTypes2["ProvideInlayHints"] = "provideInlayHints"; CommandTypes2["WatchChange"] = "watchChange"; CommandTypes2["MapCode"] = "mapCode"; + CommandTypes2["CopilotRelated"] = "copilotRelated"; return CommandTypes2; })(CommandTypes || {}); var WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => { @@ -187396,6 +192413,8 @@ var ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => { ModuleKind3["ES2022"] = "es2022"; ModuleKind3["ESNext"] = "esnext"; ModuleKind3["Node16"] = "node16"; + ModuleKind3["Node18"] = "node18"; + ModuleKind3["Node20"] = "node20"; ModuleKind3["NodeNext"] = "nodenext"; ModuleKind3["Preserve"] = "preserve"; return ModuleKind3; @@ -187415,24 +192434,25 @@ var NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => { NewLineKind3["Lf"] = "Lf"; return NewLineKind3; })(NewLineKind2 || {}); -var ScriptTarget10 = /* @__PURE__ */ ((ScriptTarget11) => { - ScriptTarget11["ES3"] = "es3"; - ScriptTarget11["ES5"] = "es5"; - ScriptTarget11["ES6"] = "es6"; - ScriptTarget11["ES2015"] = "es2015"; - ScriptTarget11["ES2016"] = "es2016"; - ScriptTarget11["ES2017"] = "es2017"; - ScriptTarget11["ES2018"] = "es2018"; - ScriptTarget11["ES2019"] = "es2019"; - ScriptTarget11["ES2020"] = "es2020"; - ScriptTarget11["ES2021"] = "es2021"; - ScriptTarget11["ES2022"] = "es2022"; - ScriptTarget11["ES2023"] = "es2023"; - ScriptTarget11["ESNext"] = "esnext"; - ScriptTarget11["JSON"] = "json"; - ScriptTarget11["Latest"] = "esnext" /* ESNext */; - return ScriptTarget11; -})(ScriptTarget10 || {}); +var ScriptTarget11 = /* @__PURE__ */ ((ScriptTarget12) => { + ScriptTarget12["ES3"] = "es3"; + ScriptTarget12["ES5"] = "es5"; + ScriptTarget12["ES6"] = "es6"; + ScriptTarget12["ES2015"] = "es2015"; + ScriptTarget12["ES2016"] = "es2016"; + ScriptTarget12["ES2017"] = "es2017"; + ScriptTarget12["ES2018"] = "es2018"; + ScriptTarget12["ES2019"] = "es2019"; + ScriptTarget12["ES2020"] = "es2020"; + ScriptTarget12["ES2021"] = "es2021"; + ScriptTarget12["ES2022"] = "es2022"; + ScriptTarget12["ES2023"] = "es2023"; + ScriptTarget12["ES2024"] = "es2024"; + ScriptTarget12["ESNext"] = "esnext"; + ScriptTarget12["JSON"] = "json"; + ScriptTarget12["Latest"] = "esnext" /* ESNext */; + return ScriptTarget12; +})(ScriptTarget11 || {}); { } @@ -187872,13 +192892,6 @@ var ScriptInfo = class { isOrphan() { return this.deferredDelete || !forEach(this.containingProjects, (p) => !p.isOrphan()); } - /** @internal */ - isContainedByBackgroundProject() { - return some( - this.containingProjects, - isBackgroundProject - ); - } /** * @param line 1 based index */ @@ -187916,102 +192929,18 @@ function failIfInvalidLocation(location) { Debug.assert(location.line > 0, `Expected line to be non-${location.line === 0 ? "zero" : "negative"}`); Debug.assert(location.offset > 0, `Expected offset to be non-${location.offset === 0 ? "zero" : "negative"}`); } - -// src/server/typingsCache.ts -var nullTypingsInstaller = { - isKnownTypesPackageName: returnFalse, - // Should never be called because we never provide a types registry. - installPackage: notImplemented, - enqueueInstallTypingsRequest: noop, - attach: noop, - onProjectClosed: noop, - globalTypingsCacheLocation: void 0 - // TODO: GH#18217 -}; -function setIsEqualTo(arr1, arr2) { - if (arr1 === arr2) { - return true; - } - if ((arr1 || emptyArray2).length === 0 && (arr2 || emptyArray2).length === 0) { - return true; - } - const set = /* @__PURE__ */ new Map(); - let unique = 0; - for (const v of arr1) { - if (set.get(v) !== true) { - set.set(v, true); - unique++; - } - } - for (const v of arr2) { - const isSet = set.get(v); - if (isSet === void 0) { - return false; - } - if (isSet === true) { - set.set(v, false); - unique--; - } - } - return unique === 0; -} -function typeAcquisitionChanged(opt1, opt2) { - return opt1.enable !== opt2.enable || !setIsEqualTo(opt1.include, opt2.include) || !setIsEqualTo(opt1.exclude, opt2.exclude); -} -function compilerOptionsChanged(opt1, opt2) { - return getAllowJSCompilerOption(opt1) !== getAllowJSCompilerOption(opt2); +function scriptInfoIsContainedByBackgroundProject(info) { + return some( + info.containingProjects, + isBackgroundProject + ); } -function unresolvedImportsChanged(imports1, imports2) { - if (imports1 === imports2) { - return false; - } - return !arrayIsEqualTo(imports1, imports2); +function scriptInfoIsContainedByDeferredClosedProject(info) { + return some( + info.containingProjects, + isProjectDeferredClose + ); } -var TypingsCache = class { - constructor(installer) { - this.installer = installer; - this.perProjectCache = /* @__PURE__ */ new Map(); - } - isKnownTypesPackageName(name) { - return this.installer.isKnownTypesPackageName(name); - } - installPackage(options) { - return this.installer.installPackage(options); - } - enqueueInstallTypingsForProject(project, unresolvedImports, forceRefresh) { - const typeAcquisition = project.getTypeAcquisition(); - if (!typeAcquisition || !typeAcquisition.enable) { - return; - } - const entry = this.perProjectCache.get(project.getProjectName()); - if (forceRefresh || !entry || typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) || compilerOptionsChanged(project.getCompilationSettings(), entry.compilerOptions) || unresolvedImportsChanged(unresolvedImports, entry.unresolvedImports)) { - this.perProjectCache.set(project.getProjectName(), { - compilerOptions: project.getCompilationSettings(), - typeAcquisition, - typings: entry ? entry.typings : emptyArray2, - unresolvedImports, - poisoned: true - }); - this.installer.enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports); - } - } - updateTypingsForProject(projectName, compilerOptions, typeAcquisition, unresolvedImports, newTypings) { - const typings = sort(newTypings); - this.perProjectCache.set(projectName, { - compilerOptions, - typeAcquisition, - typings, - unresolvedImports, - poisoned: false - }); - return !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : typings; - } - onProjectClosed(project) { - if (this.perProjectCache.delete(project.getProjectName())) { - this.installer.onProjectClosed(project); - } - } -}; // src/server/project.ts var ProjectKind = /* @__PURE__ */ ((ProjectKind2) => { @@ -188087,12 +193016,50 @@ function hasNoTypeScriptSource(fileNames) { function isGeneratedFileWatcher(watch) { return watch.generatedFilePath !== void 0; } -var Project3 = class _Project { +function setIsEqualTo(arr1, arr2) { + if (arr1 === arr2) { + return true; + } + if ((arr1 || emptyArray2).length === 0 && (arr2 || emptyArray2).length === 0) { + return true; + } + const set = /* @__PURE__ */ new Map(); + let unique = 0; + for (const v of arr1) { + if (set.get(v) !== true) { + set.set(v, true); + unique++; + } + } + for (const v of arr2) { + const isSet = set.get(v); + if (isSet === void 0) { + return false; + } + if (isSet === true) { + set.set(v, false); + unique--; + } + } + return unique === 0; +} +function typeAcquisitionChanged(opt1, opt2) { + return opt1.enable !== opt2.enable || !setIsEqualTo(opt1.include, opt2.include) || !setIsEqualTo(opt1.exclude, opt2.exclude); +} +function compilerOptionsChanged(opt1, opt2) { + return getAllowJSCompilerOption(opt1) !== getAllowJSCompilerOption(opt2); +} +function unresolvedImportsChanged(imports1, imports2) { + if (imports1 === imports2) { + return false; + } + return !arrayIsEqualTo(imports1, imports2); +} +var Project2 = class _Project { /** @internal */ - constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) { + constructor(projectName, projectKind, projectService, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) { this.projectKind = projectKind; this.projectService = projectService; - this.documentRegistry = documentRegistry; this.compilerOptions = compilerOptions; this.compileOnSaveEnabled = compileOnSaveEnabled; this.watchOptions = watchOptions; @@ -188107,9 +193074,7 @@ var Project3 = class _Project { * @internal */ this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map(); - /** @internal */ this.hasAddedorRemovedFiles = false; - /** @internal */ this.hasAddedOrRemovedSymlinks = false; /** * Last version that was reported. @@ -188129,12 +193094,12 @@ var Project3 = class _Project { * @internal */ this.projectStateVersion = 0; - this.isInitialLoadPending = returnFalse; + /** @internal */ + this.initialLoadPending = false; /** @internal */ this.dirty = false; /** @internal */ this.typingFiles = emptyArray2; - /** @internal */ this.moduleSpecifierCache = createModuleSpecifierCache(this); /** @internal */ this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash); @@ -188142,6 +193107,7 @@ var Project3 = class _Project { this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache; /** @internal */ this.updateFromProjectInProgress = false; + projectService.logger.info(`Creating ${ProjectKind[projectKind]}Project: ${projectName}, currentDirectory: ${currentDirectory}`); this.projectName = projectName; this.directoryStructureHost = directoryStructureHost; this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory); @@ -188180,13 +193146,18 @@ var Project3 = class _Project { this.trace = (s) => host.trace(s); } this.realpath = maybeBind(host, host.realpath); + this.preferNonRecursiveWatch = this.projectService.canUseWatchEvents || host.preferNonRecursiveWatch; this.resolutionCache = createResolutionCache( this, this.currentDirectory, /*logChangesWhenResolvingModule*/ true ); - this.languageService = createLanguageService(this, this.documentRegistry, this.projectService.serverMode); + this.languageService = createLanguageService( + this, + this.projectService.documentRegistry, + this.projectService.serverMode + ); if (lastFileExceededProgramSize) { this.disableLanguageService(lastFileExceededProgramSize); } @@ -188197,7 +193168,7 @@ var Project3 = class _Project { this.projectService.onProjectCreation(this); } /** @internal */ - getResolvedProjectReferenceToRedirect(_fileName) { + getRedirectFromSourceFile(_fileName) { return void 0; } isNonTsProject() { @@ -188253,17 +193224,14 @@ var Project3 = class _Project { return { pluginConfigEntry, resolvedModule, errorLogs }; } isKnownTypesPackageName(name) { - return this.typingsCache.isKnownTypesPackageName(name); + return this.projectService.typingsInstaller.isKnownTypesPackageName(name); } installPackage(options) { - return this.typingsCache.installPackage({ ...options, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) }); + return this.projectService.typingsInstaller.installPackage({ ...options, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) }); } /** @internal */ getGlobalTypingsCacheLocation() { - return this.getGlobalCache(); - } - get typingsCache() { - return this.projectService.typingsCache; + return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0; } /** @internal */ getSymlinkCache() { @@ -188369,7 +193337,7 @@ var Project3 = class _Project { } fileExists(file) { const path = this.toPath(file); - return !this.isWatchedMissingFile(path) && this.directoryStructureHost.fileExists(file); + return !!this.projectService.getScriptInfoForPath(path) || !this.isWatchedMissingFile(path) && this.directoryStructureHost.fileExists(file); } /** @internal */ resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { @@ -188478,10 +193446,6 @@ var Project3 = class _Project { this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); } /** @internal */ - getGlobalCache() { - return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0; - } - /** @internal */ fileIsOpen(filePath) { return this.projectService.openFiles.has(filePath); } @@ -188636,13 +193600,13 @@ var Project3 = class _Project { return this.projectName; } removeLocalTypingsFromTypeAcquisition(newTypeAcquisition) { - if (!newTypeAcquisition || !newTypeAcquisition.include) { + if (!newTypeAcquisition.enable || !newTypeAcquisition.include) { return newTypeAcquisition; } return { ...newTypeAcquisition, include: this.removeExistingTypings(newTypeAcquisition.include) }; } getExternalFiles(updateLevel) { - return sort(flatMap(this.plugins, (plugin) => { + return toSorted(flatMap(this.plugins, (plugin) => { if (typeof plugin.module.getExternalFiles !== "function") return; try { return plugin.module.getExternalFiles(this, updateLevel || 0 /* Update */); @@ -188667,7 +193631,8 @@ var Project3 = class _Project { } close() { var _a; - this.projectService.typingsCache.onProjectClosed(this); + if (this.typingsCache) this.projectService.typingsInstaller.onProjectClosed(this); + this.typingsCache = void 0; this.closeWatchingTypingLocations(); this.cleanupProgram(); forEach(this.externalFiles, (externalFile) => this.detachScriptInfoIfNotRoot(externalFile)); @@ -188883,19 +193848,12 @@ var Project3 = class _Project { } /** @internal */ onAutoImportProviderSettingsChanged() { - var _a; - if (this.autoImportProviderHost === false) { - this.autoImportProviderHost = void 0; - } else { - (_a = this.autoImportProviderHost) == null ? void 0 : _a.markAsDirty(); - } + this.markAutoImportProviderAsDirty(); } /** @internal */ onPackageJsonChange() { this.moduleSpecifierCache.clear(); - if (this.autoImportProviderHost) { - this.autoImportProviderHost.markAsDirty(); - } + this.markAutoImportProviderAsDirty(); } /** @internal */ onFileAddedOrRemoved(isSymlink) { @@ -188909,6 +193867,12 @@ var Project3 = class _Project { this.hasAddedOrRemovedSymlinks = true; } /** @internal */ + onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath, newSourceFileByResolvedPath) { + if (!newSourceFileByResolvedPath || oldSourceFile.resolvedPath === oldSourceFile.path && newSourceFileByResolvedPath.resolvedPath !== oldSourceFile.path) { + this.detachScriptInfoFromProject(oldSourceFile.fileName, hasSourceFileByPath); + } + } + /** @internal */ updateFromProject() { updateProjectIfDirty(this); } @@ -188917,9 +193881,8 @@ var Project3 = class _Project { * @returns: true if set of files in the project stays the same and false - otherwise. */ updateGraph() { - var _a, _b, _c, _d; + var _a, _b; (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] }); - (_b = perfLogger) == null ? void 0 : _b.logStartUpdateGraph(); this.resolutionCache.startRecordingFilesWithChangedResolutions(); const hasNewProgram = this.updateGraphWorker(); const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles; @@ -188933,7 +193896,7 @@ var Project3 = class _Project { if (hasNewProgram || changedFiles.length) { this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile); } - this.projectService.typingsCache.enqueueInstallTypingsForProject(this, this.lastCachedUnresolvedImportsList, hasAddedorRemovedFiles); + this.enqueueInstallTypingsForProject(hasAddedorRemovedFiles); } else { this.lastCachedUnresolvedImportsList = void 0; } @@ -188947,12 +193910,33 @@ var Project3 = class _Project { if (isFirstProgramLoad) { this.getPackageJsonAutoImportProvider(); } - (_c = perfLogger) == null ? void 0 : _c.logStopUpdateGraph(); - (_d = tracing) == null ? void 0 : _d.pop(); + (_b = tracing) == null ? void 0 : _b.pop(); return !hasNewProgram; } /** @internal */ - updateTypingFiles(typingFiles) { + enqueueInstallTypingsForProject(forceRefresh) { + const typeAcquisition = this.getTypeAcquisition(); + if (!typeAcquisition || !typeAcquisition.enable || this.projectService.typingsInstaller === nullTypingsInstaller) { + return; + } + const entry = this.typingsCache; + if (forceRefresh || !entry || typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) || compilerOptionsChanged(this.getCompilationSettings(), entry.compilerOptions) || unresolvedImportsChanged(this.lastCachedUnresolvedImportsList, entry.unresolvedImports)) { + this.typingsCache = { + compilerOptions: this.getCompilationSettings(), + typeAcquisition, + unresolvedImports: this.lastCachedUnresolvedImportsList + }; + this.projectService.typingsInstaller.enqueueInstallTypingsRequest(this, typeAcquisition, this.lastCachedUnresolvedImportsList); + } + } + /** @internal */ + updateTypingFiles(compilerOptions, typeAcquisition, unresolvedImports, newTypings) { + this.typingsCache = { + compilerOptions, + typeAcquisition, + unresolvedImports + }; + const typingFiles = !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : toSorted(newTypings); if (enumerateInsertsAndDeletes( typingFiles, this.typingFiles, @@ -188966,12 +193950,10 @@ var Project3 = class _Project { this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); } } - /** @internal */ closeWatchingTypingLocations() { if (this.typingWatchers) clearMap(this.typingWatchers, closeFileWatcher); this.typingWatchers = void 0; } - /** @internal */ onTypingInstallerWatchInvoke() { this.typingWatchers.isInvoked = true; this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: ActionInvalidate }); @@ -188993,14 +193975,15 @@ var Project3 = class _Project { const canonicalPath = this.toPath(path); toRemove.delete(canonicalPath); if (!this.typingWatchers.has(canonicalPath)) { + const watchType = typingsWatcherType === "FileWatcher" /* FileWatcher */ ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory; this.typingWatchers.set( canonicalPath, - typingsWatcherType === "FileWatcher" /* FileWatcher */ ? this.projectService.watchFactory.watchFile( + canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" /* FileWatcher */ ? this.projectService.watchFactory.watchFile( path, () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`), 2e3 /* High */, this.projectService.getWatchOptions(this), - WatchType.TypingInstallerLocationFile, + watchType, this ) : this.projectService.watchFactory.watchDirectory( path, @@ -189012,9 +193995,9 @@ var Project3 = class _Project { }, 1 /* Recursive */, this.projectService.getWatchOptions(this), - WatchType.TypingInstallerLocationDirectory, + watchType, this - ) + ) : (this.writeLog(`Skipping watcher creation at ${path}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher) ); } }; @@ -189049,8 +194032,9 @@ var Project3 = class _Project { return this.program; } removeExistingTypings(include) { - const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost); - return include.filter((i) => !existing.includes(i)); + if (!include.length) return include; + const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this); + return filter(include, (i) => !existing.includes(i)); } updateGraphWorker() { var _a, _b; @@ -189074,30 +194058,6 @@ var Project3 = class _Project { let hasNewProgram = false; if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2 /* Completely */)) { hasNewProgram = true; - if (oldProgram) { - for (const f of oldProgram.getSourceFiles()) { - const newFile = this.program.getSourceFileByPath(f.resolvedPath); - if (!newFile || f.resolvedPath === f.path && newFile.resolvedPath !== f.path) { - this.detachScriptInfoFromProject( - f.fileName, - !!this.program.getSourceFileByPath(f.path), - /*syncDirWatcherRemove*/ - true - ); - } - } - oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => { - if (!this.program.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) { - this.detachScriptInfoFromProject( - resolvedProjectReference.sourceFile.fileName, - /*noRemoveResolution*/ - void 0, - /*syncDirWatcherRemove*/ - true - ); - } - }); - } this.rootFilesMap.forEach((value, path) => { var _a2; const file = this.program.getSourceFileByPath(path); @@ -189129,7 +194089,7 @@ var Project3 = class _Project { this.generatedFilesMap.forEach((watcher, source) => { const sourceFile = this.program.getSourceFileByPath(source); if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher( - getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program.getCommonSourceDirectory(), this.getCanonicalFileName), + getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.program), watcher )) { closeFileWatcherOf(watcher); @@ -189222,12 +194182,12 @@ var Project3 = class _Project { sendPerformanceEvent(kind, durationMs) { this.projectService.sendPerformanceEvent(kind, durationMs); } - detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution, syncDirWatcherRemove) { + detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution) { const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName); if (scriptInfoToDetach) { scriptInfoToDetach.detachFromProject(this); if (!noRemoveResolution) { - this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove); + this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path); } } } @@ -189327,9 +194287,8 @@ var Project3 = class _Project { false ); } - /** @internal */ filesToStringWorker(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) { - if (this.isInitialLoadPending()) return " Files (0) InitialLoadPending\n"; + if (this.initialLoadPending) return " Files (0) InitialLoadPending\n"; if (!this.program) return " Files (0) NoProgram\n"; const sourceFiles = this.program.getSourceFiles(); let strBuilder = ` Files (${sourceFiles.length}) @@ -189416,7 +194375,7 @@ var Project3 = class _Project { fileName, isSourceOfProjectReferenceRedirect })) : (files) => arrayFrom(files.keys()); - if (!this.isInitialLoadPending()) { + if (!this.initialLoadPending) { updateProjectIfDirty(this); } const info = { @@ -189580,7 +194539,7 @@ var Project3 = class _Project { } /** @internal */ getNearestAncestorDirectoryWithPackageJson(fileName) { - return this.projectService.getNearestAncestorDirectoryWithPackageJson(fileName); + return this.projectService.getNearestAncestorDirectoryWithPackageJson(fileName, this); } /** @internal */ getPackageJsonsForAutoImport(rootDir) { @@ -189651,7 +194610,11 @@ var Project3 = class _Project { if (dependencySelection) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider"); const start = timestamp(); - this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry); + this.autoImportProviderHost = AutoImportProviderProject.create( + dependencySelection, + this, + this.getHostForAutoImportProvider() + ) ?? false; if (this.autoImportProviderHost) { updateProjectIfDirty(this.autoImportProviderHost); this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start); @@ -189661,7 +194624,6 @@ var Project3 = class _Project { (_c = tracing) == null ? void 0 : _c.pop(); } } - /** @internal */ isDefaultProjectForOpenFiles() { return !!forEachEntry( this.projectService.openFiles, @@ -189679,11 +194641,12 @@ var Project3 = class _Project { /** @internal */ getNoDtsResolutionProject(rootFile) { Debug.assert(this.projectService.serverMode === 0 /* Semantic */); - if (!this.noDtsResolutionProject) { - this.noDtsResolutionProject = new AuxiliaryProject(this.projectService, this.documentRegistry, this.getCompilerOptionsForNoDtsResolutionProject(), this.currentDirectory); - } + this.noDtsResolutionProject ?? (this.noDtsResolutionProject = new AuxiliaryProject(this)); if (this.noDtsResolutionProject.rootFile !== rootFile) { - this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject, [rootFile]); + this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject( + this.noDtsResolutionProject, + [rootFile] + ); this.noDtsResolutionProject.rootFile = rootFile; } return this.noDtsResolutionProject; @@ -189693,13 +194656,13 @@ var Project3 = class _Project { var _a, _b, _c, _d; const originalProgram = this.program; const rootSourceFile = Debug.checkDefined((_a = this.program) == null ? void 0 : _a.getSourceFile(rootFile), "Expected file to be part of program"); - const originalText = Debug.checkDefined(rootSourceFile.getText()); + const originalText = Debug.checkDefined(rootSourceFile.getFullText()); (_b = this.getScriptInfo(rootFile)) == null ? void 0 : _b.editContent(0, originalText.length, updatedText); this.updateGraph(); try { cb(this.program, originalProgram, (_c = this.program) == null ? void 0 : _c.getSourceFile(rootFile)); } finally { - (_d = this.getScriptInfo(rootFile)) == null ? void 0 : _d.editContent(0, this.program.getSourceFile(rootFile).getText().length, originalText); + (_d = this.getScriptInfo(rootFile)) == null ? void 0 : _d.editContent(0, updatedText.length, originalText); } } /** @internal */ @@ -189743,17 +194706,15 @@ function extractUnresolvedImportsFromSourceFile(program, file, ambientModules, c return unresolvedImports || emptyArray2; }); } -var InferredProject2 = class extends Project3 { +var InferredProject2 = class extends Project2 { /** @internal */ - constructor(projectService, documentRegistry, compilerOptions, watchOptions, projectRootPath, currentDirectory, typeAcquisition) { + constructor(projectService, compilerOptions, watchOptions, projectRootPath, currentDirectory, typeAcquisition) { super( projectService.newInferredProjectName(), 0 /* Inferred */, projectService, - documentRegistry, - // TODO: GH#18217 - /*files*/ - void 0, + /*hasExplicitListOfFiles*/ + false, /*lastFileExceededProgramSize*/ void 0, compilerOptions, @@ -189837,24 +194798,23 @@ var InferredProject2 = class extends Project3 { }; } }; -var AuxiliaryProject = class extends Project3 { - constructor(projectService, documentRegistry, compilerOptions, currentDirectory) { +var AuxiliaryProject = class extends Project2 { + constructor(hostProject) { super( - projectService.newAuxiliaryProjectName(), + hostProject.projectService.newAuxiliaryProjectName(), 4 /* Auxiliary */, - projectService, - documentRegistry, + hostProject.projectService, /*hasExplicitListOfFiles*/ false, /*lastFileExceededProgramSize*/ void 0, - compilerOptions, + hostProject.getCompilerOptionsForNoDtsResolutionProject(), /*compileOnSaveEnabled*/ false, /*watchOptions*/ void 0, - projectService.host, - currentDirectory + hostProject.projectService.host, + hostProject.currentDirectory ); } isOrphan() { @@ -189864,14 +194824,13 @@ var AuxiliaryProject = class extends Project3 { return; } }; -var _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 { +var _AutoImportProviderProject = class _AutoImportProviderProject extends Project2 { /** @internal */ - constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) { + constructor(hostProject, initialRootNames, compilerOptions) { super( hostProject.projectService.newAutoImportProviderProjectName(), 3 /* AutoImportProvider */, hostProject.projectService, - documentRegistry, /*hasExplicitListOfFiles*/ false, /*lastFileExceededProgramSize*/ @@ -189911,7 +194870,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec if (dependencyNames) { const symlinkCache = hostProject.getSymlinkCache(); for (const name of arrayFrom(dependencyNames.keys())) { - if (dependencySelection === 2 /* Auto */ && dependenciesAdded > this.maxDependencies) { + if (dependencySelection === 2 /* Auto */ && dependenciesAdded >= this.maxDependencies) { hostProject.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`); return emptyArray; } @@ -190032,7 +194991,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec } } /** @internal */ - static create(dependencySelection, hostProject, host, documentRegistry) { + static create(dependencySelection, hostProject, host) { if (dependencySelection === 0 /* Off */) { return void 0; } @@ -190044,7 +195003,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec if (!rootNames.length) { return void 0; } - return new _AutoImportProviderProject(hostProject, rootNames, documentRegistry, compilerOptions); + return new _AutoImportProviderProject(hostProject, rootNames, compilerOptions); } /** @internal */ isEmpty() { @@ -190064,7 +195023,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec this.getCompilationSettings() ); } - this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this, rootFileNames); + this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject(this, rootFileNames); this.rootFileNames = rootFileNames; const oldProgram = this.getCurrentProgram(); const hasSameSetOfFiles = super.updateGraph(); @@ -190120,7 +195079,6 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache(); } }; -/** @internal */ _AutoImportProviderProject.maxDependencies = 10; /** @internal */ _AutoImportProviderProject.compilerOptionsOverrides = { @@ -190132,14 +195090,13 @@ _AutoImportProviderProject.compilerOptionsOverrides = { noLib: true }; var AutoImportProviderProject = _AutoImportProviderProject; -var ConfiguredProject2 = class extends Project3 { +var ConfiguredProject2 = class extends Project2 { /** @internal */ - constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost, pendingUpdateReason) { + constructor(configFileName, canonicalConfigFilePath, projectService, cachedDirectoryStructureHost, pendingUpdateReason) { super( configFileName, 1 /* Configured */, projectService, - documentRegistry, /*hasExplicitListOfFiles*/ false, /*lastFileExceededProgramSize*/ @@ -190157,9 +195114,7 @@ var ConfiguredProject2 = class extends Project3 { /** @internal */ this.openFileWatchTriggered = /* @__PURE__ */ new Map(); /** @internal */ - this.canConfigFileJsonReportNoInputFiles = false; - /** @internal */ - this.isInitialLoadPending = returnTrue; + this.initialLoadPending = true; /** @internal */ this.sendLoadingProjectFinish = false; this.pendingUpdateLevel = 2 /* Full */; @@ -190179,7 +195134,7 @@ var ConfiguredProject2 = class extends Project3 { } /** @internal */ getParsedCommandLine(fileName) { - const configFileName = asNormalizedPath(normalizePath(fileName)); + const configFileName = toNormalizedPath(fileName); const canonicalConfigFilePath = asNormalizedPath(this.projectService.toCanonicalFileName(configFileName)); let configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(canonicalConfigFilePath); if (!configFileExistenceInfo) { @@ -190193,9 +195148,8 @@ var ConfiguredProject2 = class extends Project3 { } /** @internal */ onReleaseParsedCommandLine(fileName) { - this.releaseParsedConfig(asNormalizedPath(this.projectService.toCanonicalFileName(asNormalizedPath(normalizePath(fileName))))); + this.releaseParsedConfig(asNormalizedPath(this.projectService.toCanonicalFileName(toNormalizedPath(fileName)))); } - /** @internal */ releaseParsedConfig(canonicalConfigFilePath) { this.projectService.stopWatchingWildCards(canonicalConfigFilePath, this); this.projectService.releaseParsedConfig(canonicalConfigFilePath, this); @@ -190207,7 +195161,7 @@ var ConfiguredProject2 = class extends Project3 { updateGraph() { if (this.deferredClose) return false; const isDirty = this.dirty; - this.isInitialLoadPending = returnFalse; + this.initialLoadPending = false; const updateLevel = this.pendingUpdateLevel; this.pendingUpdateLevel = 0 /* Update */; let result; @@ -190259,13 +195213,13 @@ var ConfiguredProject2 = class extends Project3 { } /** @internal */ setPotentialProjectReference(canonicalConfigPath) { - Debug.assert(this.isInitialLoadPending()); + Debug.assert(this.initialLoadPending); (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(canonicalConfigPath); } /** @internal */ - getResolvedProjectReferenceToRedirect(fileName) { + getRedirectFromSourceFile(fileName) { const program = this.getCurrentProgram(); - return program && program.getResolvedProjectReferenceToRedirect(fileName); + return program && program.getRedirectFromSourceFile(fileName); } /** @internal */ forEachResolvedProjectReference(cb) { @@ -190323,10 +195277,6 @@ var ConfiguredProject2 = class extends Project3 { super.markAsDirty(); } /** @internal */ - isSolution() { - return this.getRootFilesMap().size === 0 && !this.canConfigFileJsonReportNoInputFiles; - } - /** @internal */ isOrphan() { return !!this.deferredClose; } @@ -190334,18 +195284,24 @@ var ConfiguredProject2 = class extends Project3 { return getEffectiveTypeRoots(this.getCompilationSettings(), this) || []; } /** @internal */ - updateErrorOnNoInputFiles(fileNames) { - updateErrorForNoInputFiles(fileNames, this.getConfigFilePath(), this.getCompilerOptions().configFile.configFileSpecs, this.projectErrors, this.canConfigFileJsonReportNoInputFiles); + updateErrorOnNoInputFiles(parsedCommandLine) { + this.parsedCommandLine = parsedCommandLine; + updateErrorForNoInputFiles( + parsedCommandLine.fileNames, + this.getConfigFilePath(), + this.getCompilerOptions().configFile.configFileSpecs, + this.projectErrors, + canJsonReportNoInputFiles(parsedCommandLine.raw) + ); } }; -var ExternalProject = class extends Project3 { +var ExternalProject = class extends Project2 { /** @internal */ - constructor(externalProjectName, projectService, documentRegistry, compilerOptions, lastFileExceededProgramSize, compileOnSaveEnabled, projectFilePath, watchOptions) { + constructor(externalProjectName, projectService, compilerOptions, lastFileExceededProgramSize, compileOnSaveEnabled, projectFilePath, watchOptions) { super( externalProjectName, 2 /* External */, projectService, - documentRegistry, /*hasExplicitListOfFiles*/ true, lastFileExceededProgramSize, @@ -190545,10 +195501,35 @@ function findProjectByName(projectName, projects) { } } } +var nullTypingsInstaller = { + isKnownTypesPackageName: returnFalse, + // Should never be called because we never provide a types registry. + installPackage: notImplemented, + enqueueInstallTypingsRequest: noop, + attach: noop, + onProjectClosed: noop, + globalTypingsCacheLocation: void 0 + // TODO: GH#18217 +}; var noopConfigFileWatcher = { close: noop }; function getConfigFileNameFromCache(info, cache) { - if (!cache || isAncestorConfigFileInfo(info)) return void 0; - return cache.get(info.path); + if (!cache) return void 0; + const configFileForOpenFile = cache.get(info.path); + if (configFileForOpenFile === void 0) return void 0; + if (!isAncestorConfigFileInfo(info)) { + return isString(configFileForOpenFile) || !configFileForOpenFile ? configFileForOpenFile : ( + // direct result + configFileForOpenFile.get( + /*key*/ + false + ) + ); + } else { + return configFileForOpenFile && !isString(configFileForOpenFile) ? ( + // Map with fileName as key + configFileForOpenFile.get(info.fileName) + ) : void 0; + } } function isOpenScriptInfo(infoOrFileNameOrConfig) { return !!infoOrFileNameOrConfig.containingProjects; @@ -190557,125 +195538,159 @@ function isAncestorConfigFileInfo(infoOrFileNameOrConfig) { return !!infoOrFileNameOrConfig.configFileInfo; } var ConfiguredProjectLoadKind = /* @__PURE__ */ ((ConfiguredProjectLoadKind2) => { - ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Find"] = 0] = "Find"; - ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Create"] = 1] = "Create"; - ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Reload"] = 2] = "Reload"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["FindOptimized"] = 0] = "FindOptimized"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Find"] = 1] = "Find"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["CreateReplayOptimized"] = 2] = "CreateReplayOptimized"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["CreateReplay"] = 3] = "CreateReplay"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["CreateOptimized"] = 4] = "CreateOptimized"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Create"] = 5] = "Create"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["ReloadOptimized"] = 6] = "ReloadOptimized"; + ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Reload"] = 7] = "Reload"; return ConfiguredProjectLoadKind2; })(ConfiguredProjectLoadKind || {}); -function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, delayReloadedConfiguredProjects) { +function toConfiguredProjectLoadOptimized(kind) { + return kind - 1; +} +function forEachAncestorProjectLoad(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, searchOnlyPotentialSolution, delayReloadedConfiguredProjects) { + var _a; while (true) { - if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project.getCompilerOptions().disableSolutionSearching)) return; - const configFileName = project.projectService.getConfigFileNameForFile({ - fileName: project.getConfigFilePath(), - path: info.path, - configFileInfo: true - }, kind === 0 /* Find */); + if (project.parsedCommandLine && (searchOnlyPotentialSolution && !project.parsedCommandLine.options.composite || // Currently disableSolutionSearching is shared for finding solution/project when + // - loading solution for find all references + // - trying to find default project + project.parsedCommandLine.options.disableSolutionSearching)) return; + const configFileName = project.projectService.getConfigFileNameForFile( + { + fileName: project.getConfigFilePath(), + path: info.path, + configFileInfo: true, + isForDefaultProject: !searchOnlyPotentialSolution + }, + kind <= 3 /* CreateReplay */ + ); if (!configFileName) return; const ancestor = project.projectService.findCreateOrReloadConfiguredProject( configFileName, kind, reason, allowDeferredClosed, - /*triggerFile*/ - void 0, + !searchOnlyPotentialSolution ? info.fileName : void 0, + // Config Diag event for project if its for default project reloadedProjects, - /*delayLoad*/ - true, + searchOnlyPotentialSolution, + // Delay load if we are searching for solution delayReloadedConfiguredProjects ); if (!ancestor) return; - if (ancestor.project.isInitialLoadPending() && project.getCompilerOptions().composite) { + if (!ancestor.project.parsedCommandLine && ((_a = project.parsedCommandLine) == null ? void 0 : _a.options.composite)) { ancestor.project.setPotentialProjectReference(project.canonicalConfigFilePath); } - const result = cb(ancestor.project); + const result = cb(ancestor); if (result) return result; project = ancestor.project; } } -function forEachResolvedProjectReferenceProject(project, fileName, cb, kind, reason, allowDeferredClosed, triggerFile, reloadedProjects) { - var _a; - const resolvedRefs = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(); - if (!resolvedRefs) return void 0; - const possibleDefaultRef = fileName ? project.getResolvedProjectReferenceToRedirect(fileName) : void 0; - if (possibleDefaultRef) { - const configFileName = toNormalizedPath(possibleDefaultRef.sourceFile.fileName); - const child = project.projectService.findConfiguredProjectByProjectName( - configFileName, - allowDeferredClosed - ); - if (child) { - const result = callbackWithProjectFoundUsingFind(child); - if (result) return result; - } else if (kind !== 0 /* Find */) { - const result = forEachResolvedProjectReferenceProjectWorker( - resolvedRefs, - project.getCompilerOptions(), - (ref, loadKind) => possibleDefaultRef === ref ? callback(ref, loadKind) : void 0, - kind, - project.projectService - ); - if (result) return result; +function forEachResolvedProjectReferenceProjectLoad(project, parentConfig, cb, kind, reason, allowDeferredClosed, reloadedProjects, seenResolvedRefs) { + const loadKind = parentConfig.options.disableReferencedProjectLoad ? 0 /* FindOptimized */ : kind; + let children; + return forEach( + parentConfig.projectReferences, + (ref) => { + var _a; + const childConfigName = toNormalizedPath(resolveProjectReferencePath(ref)); + const childCanonicalConfigPath = asNormalizedPath(project.projectService.toCanonicalFileName(childConfigName)); + const seenValue = seenResolvedRefs == null ? void 0 : seenResolvedRefs.get(childCanonicalConfigPath); + if (seenValue !== void 0 && seenValue >= loadKind) return void 0; + const configFileExistenceInfo = project.projectService.configFileExistenceInfoCache.get(childCanonicalConfigPath); + let childConfig = loadKind === 0 /* FindOptimized */ ? (configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.exists) || ((_a = project.resolvedChildConfigs) == null ? void 0 : _a.has(childCanonicalConfigPath)) ? configFileExistenceInfo.config.parsedCommandLine : void 0 : project.getParsedCommandLine(childConfigName); + if (childConfig && loadKind !== kind && loadKind > 2 /* CreateReplayOptimized */) { + childConfig = project.getParsedCommandLine(childConfigName); + } + if (!childConfig) return void 0; + const childProject = project.projectService.findConfiguredProjectByProjectName(childConfigName, allowDeferredClosed); + if (loadKind === 2 /* CreateReplayOptimized */ && !configFileExistenceInfo && !childProject) return void 0; + switch (loadKind) { + case 6 /* ReloadOptimized */: + if (childProject) childProject.projectService.reloadConfiguredProjectOptimized(childProject, reason, reloadedProjects); + // falls through + case 4 /* CreateOptimized */: + (project.resolvedChildConfigs ?? (project.resolvedChildConfigs = /* @__PURE__ */ new Set())).add(childCanonicalConfigPath); + // falls through + case 2 /* CreateReplayOptimized */: + case 0 /* FindOptimized */: + if (childProject || loadKind !== 0 /* FindOptimized */) { + const result = cb( + configFileExistenceInfo ?? project.projectService.configFileExistenceInfoCache.get(childCanonicalConfigPath), + childProject, + childConfigName, + reason, + project, + childCanonicalConfigPath + ); + if (result) return result; + } + break; + default: + Debug.assertNever(loadKind); + } + (seenResolvedRefs ?? (seenResolvedRefs = /* @__PURE__ */ new Map())).set(childCanonicalConfigPath, loadKind); + (children ?? (children = [])).push(childConfig); } - } - return forEachResolvedProjectReferenceProjectWorker( - resolvedRefs, - project.getCompilerOptions(), - (ref, loadKind) => possibleDefaultRef !== ref ? callback(ref, loadKind) : void 0, - kind, - project.projectService - ); - function callback(ref, loadKind) { - const result = project.projectService.findCreateOrReloadConfiguredProject( - toNormalizedPath(ref.sourceFile.fileName), + ) || forEach( + children, + (childConfig) => childConfig.projectReferences && forEachResolvedProjectReferenceProjectLoad( + project, + childConfig, + cb, loadKind, reason, allowDeferredClosed, - triggerFile, - reloadedProjects - ); - return result && (loadKind === kind ? cb(result.project, result.sentConfigFileDiag) : callbackWithProjectFoundUsingFind(result.project)); - } - function callbackWithProjectFoundUsingFind(child) { - let sentConfigFileDiag = false; - switch (kind) { - case 1 /* Create */: - sentConfigFileDiag = updateConfiguredProject(child, triggerFile); - break; - case 2 /* Reload */: - sentConfigFileDiag = child.projectService.reloadConfiguredProjectClearingSemanticCache(child, reason, reloadedProjects); - break; - case 0 /* Find */: - break; - default: - Debug.assertNever(kind); - } - const result = cb(child, sentConfigFileDiag); - if (result) return result; - } + reloadedProjects, + seenResolvedRefs + ) + ); } -function forEachResolvedProjectReferenceProjectWorker(resolvedProjectReferences, parentOptions, cb, kind, projectService, seenResolvedRefs) { - const loadKind = parentOptions.disableReferencedProjectLoad ? 0 /* Find */ : kind; - return forEach(resolvedProjectReferences, (ref) => { - if (!ref) return void 0; - const configFileName = toNormalizedPath(ref.sourceFile.fileName); - const canonicalPath = projectService.toCanonicalFileName(configFileName); - const seenValue = seenResolvedRefs == null ? void 0 : seenResolvedRefs.get(canonicalPath); - if (seenValue !== void 0 && seenValue >= loadKind) { - return void 0; - } - const result = cb(ref, loadKind); - if (result) { - return result; - } - (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Map())).set(canonicalPath, loadKind); - return ref.references && forEachResolvedProjectReferenceProjectWorker(ref.references, ref.commandLine.options, cb, loadKind, projectService, seenResolvedRefs); - }); +function updateProjectFoundUsingFind(project, kind, triggerFile, reason, reloadedProjects) { + let sentConfigFileDiag = false; + let configFileExistenceInfo; + switch (kind) { + case 2 /* CreateReplayOptimized */: + case 3 /* CreateReplay */: + if (useConfigFileExistenceInfoForOptimizedLoading(project)) { + configFileExistenceInfo = project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath); + } + break; + case 4 /* CreateOptimized */: + configFileExistenceInfo = configFileExistenceInfoForOptimizedLoading(project); + if (configFileExistenceInfo) break; + // falls through + case 5 /* Create */: + sentConfigFileDiag = updateConfiguredProject(project, triggerFile); + break; + case 6 /* ReloadOptimized */: + project.projectService.reloadConfiguredProjectOptimized(project, reason, reloadedProjects); + configFileExistenceInfo = configFileExistenceInfoForOptimizedLoading(project); + if (configFileExistenceInfo) break; + // falls through + case 7 /* Reload */: + sentConfigFileDiag = project.projectService.reloadConfiguredProjectClearingSemanticCache( + project, + reason, + reloadedProjects + ); + break; + case 0 /* FindOptimized */: + case 1 /* Find */: + break; + default: + Debug.assertNever(kind); + } + return { project, sentConfigFileDiag, configFileExistenceInfo, reason }; } function forEachPotentialProjectReference(project, cb) { - return project.potentialProjectReferences && forEachKey(project.potentialProjectReferences, cb); + return project.initialLoadPending ? (project.potentialProjectReferences && forEachKey(project.potentialProjectReferences, cb)) ?? (project.resolvedChildConfigs && forEachKey(project.resolvedChildConfigs, cb)) : void 0; } function forEachAnyProjectReferenceKind(project, cb, cbProjectRef, cbPotentialProjectRef) { - return project.getCurrentProgram() ? project.forEachResolvedProjectReference(cb) : project.isInitialLoadPending() ? forEachPotentialProjectReference(project, cbPotentialProjectRef) : forEach(project.getProjectReferences(), cbProjectRef); + return project.getCurrentProgram() ? project.forEachResolvedProjectReference(cb) : project.initialLoadPending ? forEachPotentialProjectReference(project, cbPotentialProjectRef) : forEach(project.getProjectReferences(), cbProjectRef); } function callbackRefProject(project, cb, refPath) { const refProject = refPath && project.projectService.configuredProjects.get(refPath); @@ -190725,6 +195740,27 @@ function updateConfiguredProject(project, triggerFile) { } return false; } +function configFileExistenceInfoForOptimizedLoading(project) { + const configFileName = toNormalizedPath(project.getConfigFilePath()); + const configFileExistenceInfo = project.projectService.ensureParsedConfigUptoDate( + configFileName, + project.canonicalConfigFilePath, + project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath), + project + ); + const parsedCommandLine = configFileExistenceInfo.config.parsedCommandLine; + project.parsedCommandLine = parsedCommandLine; + project.resolvedChildConfigs = void 0; + project.updateReferences(parsedCommandLine.projectReferences); + if (useConfigFileExistenceInfoForOptimizedLoading(project)) return configFileExistenceInfo; +} +function useConfigFileExistenceInfoForOptimizedLoading(project) { + return !!project.parsedCommandLine && (!!project.parsedCommandLine.options.composite || // If solution, no need to load it to determine if file belongs to it + !!isSolutionConfig(project.parsedCommandLine)); +} +function configFileExistenceInfoForOptimizedReplay(project) { + return useConfigFileExistenceInfoForOptimizedLoading(project) ? project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath) : void 0; +} function fileOpenReason(info) { return `Creating possible configured project for ${info.fileName} to open`; } @@ -190743,8 +195779,11 @@ function createProjectNameFactoryWithCounter(nameFactory) { function getHostWatcherMap() { return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() }; } +function getCanUseWatchEvents(service, canUseWatchEvents) { + return !!canUseWatchEvents && !!service.eventHandler && !!service.session; +} function createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) { - if (!canUseWatchEvents || !service.eventHandler || !service.session) return void 0; + if (!getCanUseWatchEvents(service, canUseWatchEvents)) return void 0; const watchedFiles = getHostWatcherMap(); const watchedDirectories = getHostWatcherMap(); const watchedDirectoriesRecursive = getHostWatcherMap(); @@ -190843,7 +195882,7 @@ var _ProjectService = class _ProjectService { */ this.filenameToScriptInfoVersion = /* @__PURE__ */ new Map(); // Set of all '.js' files ever opened. - this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Map(); + this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Set(); /** * maps external project file name to list of config files that were the part of this project */ @@ -190902,9 +195941,7 @@ var _ProjectService = class _ProjectService { this.pendingEnsureProjectForOpenFiles = false; /** Tracks projects that we have already sent telemetry for. */ this.seenProjects = /* @__PURE__ */ new Map(); - /** @internal */ this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(); - /** @internal */ this.extendedConfigCache = /* @__PURE__ */ new Map(); /** @internal */ this.baseline = noop; @@ -190942,20 +195979,27 @@ var _ProjectService = class _ProjectService { this.toCanonicalFileName = createGetCanonicalFileName(this.host.useCaseSensitiveFileNames); this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation ? ensureTrailingDirectorySeparator(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)) : void 0; this.throttledOperations = new ThrottledOperations(this.host, this.logger); + this.logger.info(`currentDirectory:: ${this.host.getCurrentDirectory()} useCaseSensitiveFileNames:: ${this.host.useCaseSensitiveFileNames}`); + this.logger.info(`libs Location:: ${getDirectoryPath(this.host.getExecutingFilePath())}`); + this.logger.info(`globalTypingsCacheLocation:: ${this.typingsInstaller.globalTypingsCacheLocation}`); if (this.typesMapLocation) { this.loadTypesMap(); } else { this.logger.info("No types map provided; using the default"); } this.typingsInstaller.attach(this); - this.typingsCache = new TypingsCache(this.typingsInstaller); this.hostConfiguration = { formatCodeOptions: getDefaultFormatCodeSettings(this.host.newLine), preferences: emptyOptions, hostInfo: "Unknown host", extraFileExtensions: [] }; - this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this); + this.documentRegistry = createDocumentRegistryInternal( + this.host.useCaseSensitiveFileNames, + this.currentDirectory, + this.jsDocParsingMode, + this + ); const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */; const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop; this.packageJsonCache = createPackageJsonCache(this); @@ -190968,6 +196012,7 @@ var _ProjectService = class _ProjectService { log, getDetailWatchInfo ); + this.canUseWatchEvents = getCanUseWatchEvents(this, opts.canUseWatchEvents); (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this); } toPath(fileName) { @@ -191041,12 +196086,15 @@ var _ProjectService = class _ProjectService { } switch (response.kind) { case ActionSet: - project.updateTypingFiles(this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typeAcquisition, response.unresolvedImports, response.typings)); + project.updateTypingFiles( + response.compilerOptions, + response.typeAcquisition, + response.unresolvedImports, + response.typings + ); return; case ActionInvalidate: - this.typingsCache.enqueueInstallTypingsForProject( - project, - project.lastCachedUnresolvedImportsList, + project.enqueueInstallTypingsForProject( /*forceRefresh*/ true ); @@ -191238,7 +196286,7 @@ var _ProjectService = class _ProjectService { if ((_a = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a.delete(scriptInfo.path)) { this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( scriptInfo, - 1 /* Create */ + 5 /* Create */ ); if (scriptInfo.isOrphan()) { this.assignOrphanScriptInfoToInferredProject(scriptInfo, this.openFiles.get(scriptInfo.path)); @@ -191359,65 +196407,17 @@ var _ProjectService = class _ProjectService { } /** * This is to watch whenever files are added or removed to the wildcard directories - * - * @internal */ watchWildcardDirectory(directory, flags, configFileName, config) { let watcher = this.watchFactory.watchDirectory( directory, - (fileOrDirectory) => { - const fileOrDirectoryPath = this.toPath(fileOrDirectory); - const fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); - if (getBaseFileName(fileOrDirectoryPath) === "package.json" && !isInsideNodeModules(fileOrDirectoryPath) && (fsResult && fsResult.fileExists || !fsResult && this.host.fileExists(fileOrDirectory))) { - const file = this.getNormalizedAbsolutePath(fileOrDirectory); - this.logger.info(`Config: ${configFileName} Detected new package.json: ${file}`); - this.packageJsonCache.addOrUpdate(file, fileOrDirectoryPath); - this.watchPackageJsonFile(file, fileOrDirectoryPath, result); - } - const configuredProjectForConfig = this.findConfiguredProjectByProjectName(configFileName); - if (isIgnoredFileFromWildCardWatching({ - watchedDirPath: this.toPath(directory), - fileOrDirectory, - fileOrDirectoryPath, - configFileName, - extraFileExtensions: this.hostConfiguration.extraFileExtensions, - currentDirectory: this.currentDirectory, - options: config.parsedCommandLine.options, - program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames, - useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, - writeLog: (s) => this.logger.info(s), - toPath: (s) => this.toPath(s), - getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0 - })) return; - if (config.updateLevel !== 2 /* Full */) config.updateLevel = 1 /* RootNamesAndUpdate */; - config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => { - var _a; - if (!watchWildcardDirectories) return; - const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); - if (!project) return; - if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) { - const path = this.toPath(configFileName); - if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path)) { - project.markAutoImportProviderAsDirty(); - } - } - const updateLevel = configuredProjectForConfig === project ? 1 /* RootNamesAndUpdate */ : 0 /* Update */; - if (project.pendingUpdateLevel > updateLevel) return; - if (this.openFiles.has(fileOrDirectoryPath)) { - const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); - if (info.isAttached(project)) { - const loadLevelToSet = Math.max(updateLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* Update */); - project.openFileWatchTriggered.set(fileOrDirectoryPath, loadLevelToSet); - } else { - project.pendingUpdateLevel = updateLevel; - this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); - } - } else { - project.pendingUpdateLevel = updateLevel; - this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); - } - }); - }, + (fileOrDirectory) => this.onWildCardDirectoryWatcherInvoke( + directory, + configFileName, + config, + result, + fileOrDirectory + ), flags, this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine.watchOptions, getDirectoryPath(configFileName)), WatchType.WildcardDirectory, @@ -191440,35 +196440,102 @@ var _ProjectService = class _ProjectService { }; return result; } - /** @internal */ + onWildCardDirectoryWatcherInvoke(directory, configFileName, config, wildCardWatcher, fileOrDirectory) { + const fileOrDirectoryPath = this.toPath(fileOrDirectory); + const fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); + if (getBaseFileName(fileOrDirectoryPath) === "package.json" && !isInsideNodeModules(fileOrDirectoryPath) && (fsResult && fsResult.fileExists || !fsResult && this.host.fileExists(fileOrDirectory))) { + const file = this.getNormalizedAbsolutePath(fileOrDirectory); + this.logger.info(`Config: ${configFileName} Detected new package.json: ${file}`); + this.packageJsonCache.addOrUpdate(file, fileOrDirectoryPath); + this.watchPackageJsonFile(file, fileOrDirectoryPath, wildCardWatcher); + } + if (!(fsResult == null ? void 0 : fsResult.fileExists)) { + this.sendSourceFileChange(fileOrDirectoryPath); + } + const configuredProjectForConfig = this.findConfiguredProjectByProjectName(configFileName); + if (isIgnoredFileFromWildCardWatching({ + watchedDirPath: this.toPath(directory), + fileOrDirectory, + fileOrDirectoryPath, + configFileName, + extraFileExtensions: this.hostConfiguration.extraFileExtensions, + currentDirectory: this.currentDirectory, + options: config.parsedCommandLine.options, + program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames, + useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, + writeLog: (s) => this.logger.info(s), + toPath: (s) => this.toPath(s), + getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0 + })) return; + if (config.updateLevel !== 2 /* Full */) config.updateLevel = 1 /* RootNamesAndUpdate */; + config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => { + var _a; + if (!watchWildcardDirectories) return; + const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); + if (!project) return; + if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) { + const path = this.toPath(configFileName); + if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path)) { + project.markAutoImportProviderAsDirty(); + } + } + const updateLevel = configuredProjectForConfig === project ? 1 /* RootNamesAndUpdate */ : 0 /* Update */; + if (project.pendingUpdateLevel > updateLevel) return; + if (this.openFiles.has(fileOrDirectoryPath)) { + const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); + if (info.isAttached(project)) { + const loadLevelToSet = Math.max(updateLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* Update */); + project.openFileWatchTriggered.set(fileOrDirectoryPath, loadLevelToSet); + } else { + project.pendingUpdateLevel = updateLevel; + this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); + } + } else { + project.pendingUpdateLevel = updateLevel; + this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); + } + }); + } delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, loadReason) { const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); if (!(configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config)) return false; let scheduledAnyProjectUpdate = false; configFileExistenceInfo.config.updateLevel = 2 /* Full */; + configFileExistenceInfo.config.cachedDirectoryStructureHost.clearCache(); configFileExistenceInfo.config.projects.forEach((_watchWildcardDirectories, projectCanonicalPath) => { - var _a; + var _a, _b, _c; const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); if (!project) return; scheduledAnyProjectUpdate = true; if (projectCanonicalPath === canonicalConfigFilePath) { - if (project.isInitialLoadPending()) return; + if (project.initialLoadPending) return; project.pendingUpdateLevel = 2 /* Full */; project.pendingUpdateReason = loadReason; this.delayUpdateProjectGraph(project); project.markAutoImportProviderAsDirty(); } else { + if (project.initialLoadPending) { + (_b = (_a = this.configFileExistenceInfoCache.get(projectCanonicalPath)) == null ? void 0 : _a.openFilesImpactedByConfigFile) == null ? void 0 : _b.forEach((path2) => { + var _a2; + if (!((_a2 = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a2.has(path2))) { + (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set( + path2, + this.configFileForOpenFiles.get(path2) + ); + } + }); + return; + } const path = this.toPath(canonicalConfigFilePath); project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path); this.delayUpdateProjectGraph(project); - if (this.getHostPreferences().includeCompletionsForModuleExports && find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path)) { + if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path)) { project.markAutoImportProviderAsDirty(); } } }); return scheduledAnyProjectUpdate; } - /** @internal */ onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind) { const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); const project = this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath); @@ -191487,7 +196554,6 @@ var _ProjectService = class _ProjectService { canonicalConfigFilePath, "Change in config file detected" ); - const updatedProjects = new Set(project ? [project] : void 0); this.openFiles.forEach((_projectRootPath, path) => { var _a, _b; const configFileForOpenFile = this.configFileForOpenFiles.get(path); @@ -191500,16 +196566,9 @@ var _ProjectService = class _ProjectService { false ); if (!newConfigFileNameForInfo) return; - const projectForInfo = this.findConfiguredProjectByProjectName(newConfigFileNameForInfo) ?? this.createConfiguredProject( - newConfigFileNameForInfo, - `Change in config file ${configFileName} detected, ${fileOpenReason(info)}` - ); if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path))) { (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path, configFileForOpenFile); } - if (tryAddToSet(updatedProjects, projectForInfo) && projectForInfo.isInitialLoadPending()) { - this.delayUpdateProjectGraph(projectForInfo); - } }); this.delayEnsureProjectForOpenFiles(); } @@ -191681,7 +196740,7 @@ var _ProjectService = class _ProjectService { configFileExists(configFileName, canonicalConfigFilePath, info) { const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); let openFilesImpactedByConfigFile; - if (this.openFiles.has(info.path) && !isAncestorConfigFileInfo(info)) { + if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) { if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path); else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path); } @@ -191690,7 +196749,6 @@ var _ProjectService = class _ProjectService { this.configFileExistenceInfoCache.set(canonicalConfigFilePath, { exists, openFilesImpactedByConfigFile }); return exists; } - /** @internal */ createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, forProject) { var _a, _b; const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); @@ -191704,6 +196762,9 @@ var _ProjectService = class _ProjectService { forProject ); } + this.ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject); + } + ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject) { const projects = configFileExistenceInfo.config.projects; projects.set(forProject.canonicalConfigFilePath, projects.get(forProject.canonicalConfigFilePath) || false); } @@ -191718,7 +196779,7 @@ var _ProjectService = class _ProjectService { Debug.checkDefined(configFileExistenceInfo.watcher); if ((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) { if (configFileExistenceInfo.inferredProjectRoots) { - if (!canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath)))) { + if (!canWatchDirectoryOrFilePath(getDirectoryPath(canonicalConfigFilePath))) { configFileExistenceInfo.watcher.close(); configFileExistenceInfo.watcher = noopConfigFileWatcher; } @@ -191781,7 +196842,7 @@ var _ProjectService = class _ProjectService { configFileExistenceInfo.inferredProjectRoots = (configFileExistenceInfo.inferredProjectRoots ?? 0) + 1; } (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path); - configFileExistenceInfo.watcher || (configFileExistenceInfo.watcher = canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath))) ? this.watchFactory.watchFile( + configFileExistenceInfo.watcher || (configFileExistenceInfo.watcher = canWatchDirectoryOrFilePath(getDirectoryPath(canonicalConfigFilePath)) ? this.watchFactory.watchFile( configFileName, (_filename, eventKind) => this.onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind), 2e3 /* High */, @@ -191809,34 +196870,48 @@ var _ProjectService = class _ProjectService { let searchPath = asNormalizedPath(getDirectoryPath(info.fileName)); const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames); const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot(); - let searchInDirectory = !isAncestorConfigFileInfo(info); + let searchTsconfig = true; + let searchJsconfig = true; + if (isAncestorConfigFileInfo(info)) { + if (endsWith(info.fileName, "tsconfig.json")) searchTsconfig = false; + else searchTsconfig = searchJsconfig = false; + } do { - if (searchInDirectory) { - const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); + const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); + if (searchTsconfig) { const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json")); - let result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName); + const result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName); if (result) return tsconfigFileName; + } + if (searchJsconfig) { const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json")); - result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName); + const result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName); if (result) return jsconfigFileName; - if (isNodeModulesDirectory(canonicalSearchPath)) { - break; - } + } + if (isNodeModulesDirectory(canonicalSearchPath)) { + break; } const parentPath = asNormalizedPath(getDirectoryPath(searchPath)); if (parentPath === searchPath) break; searchPath = parentPath; - searchInDirectory = true; + searchTsconfig = searchJsconfig = true; } while (anySearchPathOk || isSearchPathInProjectRoot()); return void 0; } /** @internal */ findDefaultConfiguredProject(info) { var _a; - return info.isScriptOpen() ? (_a = this.tryFindDefaultConfiguredProjectForOpenScriptInfo( + return (_a = this.findDefaultConfiguredProjectWorker( info, - 0 /* Find */ - )) == null ? void 0 : _a.defaultProject : void 0; + 1 /* Find */ + )) == null ? void 0 : _a.defaultProject; + } + /** @internal */ + findDefaultConfiguredProjectWorker(info, kind) { + return info.isScriptOpen() ? this.tryFindDefaultConfiguredProjectForOpenScriptInfo( + info, + kind + ) : void 0; } /** Get cached configFileName for scriptInfo or ancestor of open script info */ getConfigFileNameForFileFromCache(info, lookInPendingFilesForValue) { @@ -191849,8 +196924,19 @@ var _ProjectService = class _ProjectService { /** Caches the configFilename for script info or ancestor of open script info */ setConfigFileNameForFileInCache(info, configFileName) { if (!this.openFiles.has(info.path)) return; - if (isAncestorConfigFileInfo(info)) return; - this.configFileForOpenFiles.set(info.path, configFileName || false); + const config = configFileName || false; + if (!isAncestorConfigFileInfo(info)) { + this.configFileForOpenFiles.set(info.path, config); + } else { + let configFileForOpenFile = this.configFileForOpenFiles.get(info.path); + if (!configFileForOpenFile || isString(configFileForOpenFile)) { + this.configFileForOpenFiles.set( + info.path, + configFileForOpenFile = (/* @__PURE__ */ new Map()).set(false, configFileForOpenFile) + ); + } + configFileForOpenFile.set(info.fileName, config); + } } /** * This function tries to search for a tsconfig.json for the given file. @@ -191930,7 +197016,6 @@ var _ProjectService = class _ProjectService { const project = new ExternalProject( projectFileName, this, - this.documentRegistry, compilerOptions, /*lastFileExceededProgramSize*/ this.getFilenameForExceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader), @@ -192001,7 +197086,6 @@ var _ProjectService = class _ProjectService { createConfiguredProject(configFileName, reason) { var _a; (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "createConfiguredProject", { configFilePath: configFileName }); - this.logger.info(`Creating configuration project ${configFileName}`); const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName)); let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); if (!configFileExistenceInfo) { @@ -192020,7 +197104,6 @@ var _ProjectService = class _ProjectService { configFileName, canonicalConfigFilePath, this, - this.documentRegistry, configFileExistenceInfo.config.cachedDirectoryStructureHost, reason ); @@ -192031,14 +197114,12 @@ var _ProjectService = class _ProjectService { } /** * Read the config file of the project, and update the project root file names. - * - * @internal */ loadConfiguredProject(project, reason) { var _a, _b; (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "loadConfiguredProject", { configFilePath: project.canonicalConfigFilePath }); this.sendProjectLoadingStartEvent(project, reason); - const configFilename = asNormalizedPath(normalizePath(project.getConfigFilePath())); + const configFilename = toNormalizedPath(project.getConfigFilePath()); const configFileExistenceInfo = this.ensureParsedConfigUptoDate( configFilename, project.canonicalConfigFilePath, @@ -192056,7 +197137,7 @@ var _ProjectService = class _ProjectService { configHasExcludeProperty: parsedCommandLine.raw.exclude !== void 0 }; } - project.canConfigFileJsonReportNoInputFiles = canJsonReportNoInputFiles(parsedCommandLine.raw); + project.parsedCommandLine = parsedCommandLine; project.setProjectErrors(parsedCommandLine.options.configFile.parseDiagnostics); project.updateReferences(parsedCommandLine.projectReferences); const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(project.canonicalConfigFilePath, compilerOptions, parsedCommandLine.fileNames, fileNamePropertyReader); @@ -192078,12 +197159,19 @@ var _ProjectService = class _ProjectService { ensureParsedConfigUptoDate(configFilename, canonicalConfigFilePath, configFileExistenceInfo, forProject) { var _a, _b, _c; if (configFileExistenceInfo.config) { - if (!configFileExistenceInfo.config.updateLevel) return configFileExistenceInfo; if (configFileExistenceInfo.config.updateLevel === 1 /* RootNamesAndUpdate */) { this.reloadFileNamesOfParsedConfig(configFilename, configFileExistenceInfo.config); + } + if (!configFileExistenceInfo.config.updateLevel) { + this.ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject); return configFileExistenceInfo; } } + if (!configFileExistenceInfo.exists && configFileExistenceInfo.config) { + configFileExistenceInfo.config.updateLevel = void 0; + this.ensureConfigFileWatcherForProject(configFileExistenceInfo, forProject); + return configFileExistenceInfo; + } const cachedDirectoryStructureHost = ((_a = configFileExistenceInfo.config) == null ? void 0 : _a.cachedDirectoryStructureHost) || createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames); const configFileContent = tryReadFile(configFilename, (fileName) => this.host.readFile(fileName)); const configFile = parseJsonText(configFilename, isString(configFileContent) ? configFileContent : ""); @@ -192278,15 +197366,18 @@ var _ProjectService = class _ProjectService { * @internal */ reloadFileNamesOfConfiguredProject(project) { - const fileNames = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config); - project.updateErrorOnNoInputFiles(fileNames); - this.updateNonInferredProjectFiles(project, fileNames.concat(project.getExternalFiles(1 /* RootNamesAndUpdate */)), fileNamePropertyReader); + const config = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config); + project.updateErrorOnNoInputFiles(config); + this.updateNonInferredProjectFiles( + project, + config.fileNames.concat(project.getExternalFiles(1 /* RootNamesAndUpdate */)), + fileNamePropertyReader + ); project.markAsDirty(); return project.updateGraph(); } - /** @internal */ reloadFileNamesOfParsedConfig(configFileName, config) { - if (config.updateLevel === void 0) return config.parsedCommandLine.fileNames; + if (config.updateLevel === void 0) return config.parsedCommandLine; Debug.assert(config.updateLevel === 1 /* RootNamesAndUpdate */); const configFileSpecs = config.parsedCommandLine.options.configFile.configFileSpecs; const fileNames = getFileNamesFromConfigSpecs( @@ -192297,30 +197388,42 @@ var _ProjectService = class _ProjectService { this.hostConfiguration.extraFileExtensions ); config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; - return fileNames; + config.updateLevel = void 0; + return config.parsedCommandLine; } /** @internal */ - setFileNamesOfAutpImportProviderOrAuxillaryProject(project, fileNames) { + setFileNamesOfAutoImportProviderOrAuxillaryProject(project, fileNames) { this.updateNonInferredProjectFiles(project, fileNames, fileNamePropertyReader); } /** @internal */ + reloadConfiguredProjectOptimized(project, reason, reloadedProjects) { + if (reloadedProjects.has(project)) return; + reloadedProjects.set(project, 6 /* ReloadOptimized */); + if (!project.initialLoadPending) { + this.setProjectForReload(project, 2 /* Full */, reason); + } + } + /** @internal */ reloadConfiguredProjectClearingSemanticCache(project, reason, reloadedProjects) { - if (!tryAddToSet(reloadedProjects, project)) return false; + if (reloadedProjects.get(project) === 7 /* Reload */) return false; + reloadedProjects.set(project, 7 /* Reload */); this.clearSemanticCache(project); this.reloadConfiguredProject(project, reloadReason(reason)); return true; } + setProjectForReload(project, updateLevel, reason) { + if (updateLevel === 2 /* Full */) this.clearSemanticCache(project); + project.pendingUpdateReason = reason && reloadReason(reason); + project.pendingUpdateLevel = updateLevel; + } /** * Read the config file of the project again by clearing the cache and update the project graph * * @internal */ reloadConfiguredProject(project, reason) { - project.isInitialLoadPending = returnFalse; - project.pendingUpdateReason = void 0; - project.pendingUpdateLevel = 0 /* Update */; - const host = project.getCachedDirectoryStructureHost(); - host.clearCache(); + project.initialLoadPending = false; + this.setProjectForReload(project, 0 /* Update */); this.loadConfiguredProject(project, reason); updateWithTriggerFile( project, @@ -192329,7 +197432,6 @@ var _ProjectService = class _ProjectService { true ); } - /** @internal */ clearSemanticCache(project) { project.originalConfiguredProjects = void 0; project.resolutionCache.clear(); @@ -192391,9 +197493,11 @@ var _ProjectService = class _ProjectService { return this.inferredProjects[0]; } return this.createInferredProject( - "", + this.currentDirectory, /*isSingleInferredProject*/ - true + true, + /*projectRootPath*/ + void 0 ); } getOrCreateSingleInferredWithoutProjectRoot(currentDirectory) { @@ -192404,7 +197508,13 @@ var _ProjectService = class _ProjectService { return inferredProject; } } - return this.createInferredProject(currentDirectory); + return this.createInferredProject( + currentDirectory, + /*isSingleInferredProject*/ + false, + /*projectRootPath*/ + void 0 + ); } createInferredProject(currentDirectory, isSingleInferredProject, projectRootPath) { const compilerOptions = projectRootPath && this.compilerOptionsForInferredProjectsPerProjectRoot.get(projectRootPath) || this.compilerOptionsForInferredProjects; @@ -192421,7 +197531,14 @@ var _ProjectService = class _ProjectService { typeAcquisition = this.typeAcquisitionForInferredProjects; } watchOptionsAndErrors = watchOptionsAndErrors || void 0; - const project = new InferredProject2(this, this.documentRegistry, compilerOptions, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions, projectRootPath, currentDirectory, typeAcquisition); + const project = new InferredProject2( + this, + compilerOptions, + watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions, + projectRootPath, + currentDirectory, + typeAcquisition + ); project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); if (isSingleInferredProject) { this.inferredProjects.unshift(project); @@ -192906,7 +198023,6 @@ Dynamic files must always be opened with service's current directory or service getWatchOptions(project) { return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions(), project.getCurrentDirectory()); } - /** @internal */ getWatchOptionsFromProjectWatchOptions(projectOptions, basePath) { const hostWatchOptions = !this.hostConfiguration.beforeSubstitution ? this.hostConfiguration.watchOptions : handleWatchOptionsConfigDirTemplateSubstitution( this.hostConfiguration.beforeSubstitution, @@ -192917,20 +198033,34 @@ Dynamic files must always be opened with service's current directory or service closeLog() { this.logger.close(); } - /** - * This function rebuilds the project for every file opened by the client - * This does not reload contents of open files from disk. But we could do that if needed - */ - reloadProjects() { - this.logger.info("reload projects."); + sendSourceFileChange(inPath) { this.filenameToScriptInfo.forEach((info) => { if (this.openFiles.has(info.path)) return; if (!info.fileWatcher) return; + const eventKind = memoize( + () => this.host.fileExists(info.fileName) ? info.deferredDelete ? 0 /* Created */ : 1 /* Changed */ : 2 /* Deleted */ + ); + if (inPath) { + if (isScriptInfoWatchedFromNodeModules(info) || !info.path.startsWith(inPath)) return; + if (eventKind() === 2 /* Deleted */ && info.deferredDelete) return; + this.logger.info(`Invoking sourceFileChange on ${info.fileName}:: ${eventKind()}`); + } this.onSourceFileChanged( info, - this.host.fileExists(info.fileName) ? info.deferredDelete ? 0 /* Created */ : 1 /* Changed */ : 2 /* Deleted */ + eventKind() ); }); + } + /** + * This function rebuilds the project for every file opened by the client + * This does not reload contents of open files from disk. But we could do that if needed + */ + reloadProjects() { + this.logger.info("reload projects."); + this.sendSourceFileChange( + /*inPath*/ + void 0 + ); this.pendingProjectUpdates.forEach((_project, projectName) => { this.throttledOperations.cancel(projectName); this.pendingProjectUpdates.delete(projectName); @@ -192939,25 +198069,23 @@ Dynamic files must always be opened with service's current directory or service this.pendingOpenFileProjectUpdates = void 0; this.pendingEnsureProjectForOpenFiles = false; this.configFileExistenceInfoCache.forEach((info) => { - if (info.config) info.config.updateLevel = 2 /* Full */; + if (info.config) { + info.config.updateLevel = 2 /* Full */; + info.config.cachedDirectoryStructureHost.clearCache(); + } }); this.configFileForOpenFiles.clear(); this.externalProjects.forEach((project) => { this.clearSemanticCache(project); project.updateGraph(); }); - const reloadedConfiguredProjects = /* @__PURE__ */ new Set(); + const reloadedConfiguredProjects = /* @__PURE__ */ new Map(); const delayReloadedConfiguredProjects = /* @__PURE__ */ new Set(); this.externalProjectToConfiguredProjectMap.forEach((projects, externalProjectName) => { const reason = `Reloading configured project in external project: ${externalProjectName}`; projects.forEach((project) => { if (this.getHostPreferences().lazyConfiguredProjectsFromExternalProject) { - if (!project.isInitialLoadPending()) { - this.clearSemanticCache(project); - project.pendingUpdateLevel = 2 /* Full */; - project.pendingUpdateReason = reloadReason(reason); - } - delayReloadedConfiguredProjects.add(project); + this.reloadConfiguredProjectOptimized(project, reason, reloadedConfiguredProjects); } else { this.reloadConfiguredProjectClearingSemanticCache( project, @@ -192972,12 +198100,12 @@ Dynamic files must always be opened with service's current directory or service if (find(info.containingProjects, isExternalProject)) return; this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( info, - 2 /* Reload */, + 7 /* Reload */, reloadedConfiguredProjects, delayReloadedConfiguredProjects ); }); - delayReloadedConfiguredProjects.forEach((p) => reloadedConfiguredProjects.add(p)); + delayReloadedConfiguredProjects.forEach((p) => reloadedConfiguredProjects.set(p, 7 /* Reload */)); this.inferredProjects.forEach((project) => this.clearSemanticCache(project)); this.ensureProjectForOpenFiles(); this.cleanupProjectsAndScriptInfos( @@ -193019,7 +198147,7 @@ Dynamic files must always be opened with service's current directory or service pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach( (_config, path) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( this.getScriptInfoForPath(path), - 1 /* Create */ + 5 /* Create */ ) ); this.openFiles.forEach((projectRootPath, path) => { @@ -193075,23 +198203,18 @@ Dynamic files must always be opened with service's current directory or service } configuredProject = this.createConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`); } - updateProjectIfDirty(configuredProject); - const projectContainsOriginalInfo = (project2) => { - const info = this.getScriptInfo(fileName); - return info && project2.containsScriptInfo(info) && !project2.isSourceOfProjectReferenceRedirect(info.path); - }; - if (configuredProject.isSolution() || !projectContainsOriginalInfo(configuredProject)) { - configuredProject = forEachResolvedProjectReferenceProject( + const result = this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo( + originalFileInfo, + 5 /* Create */, + updateProjectFoundUsingFind( configuredProject, - fileName, - (child) => projectContainsOriginalInfo(child) ? child : void 0, - 1 /* Create */, - `Creating project referenced in solution ${configuredProject.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}` - ); - if (!configuredProject) return void 0; - if (configuredProject === project) return originalLocation; - } - addOriginalConfiguredProject(configuredProject); + 4 /* CreateOptimized */ + ), + (project2) => `Creating project referenced in solution ${project2.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}` + ); + if (!result.defaultProject) return void 0; + if (result.defaultProject === project) return originalLocation; + addOriginalConfiguredProject(result.defaultProject); const originalScriptInfo = this.getScriptInfo(fileName); if (!originalScriptInfo || !originalScriptInfo.containingProjects.length) return void 0; originalScriptInfo.containingProjects.forEach((project2) => { @@ -193140,7 +198263,7 @@ Dynamic files must always be opened with service's current directory or service if (!project && this.serverMode === 0 /* Semantic */) { const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( info, - 1 /* Create */ + 5 /* Create */ ); if (result) { retainProjects = result.seenProjects; @@ -193153,8 +198276,8 @@ Dynamic files must always be opened with service's current directory or service } info.containingProjects.forEach(updateProjectIfDirty); if (info.isOrphan()) { - retainProjects == null ? void 0 : retainProjects.forEach((project2) => { - if (!sentConfigDiag.has(project2)) this.sendConfigFileDiagEvent( + retainProjects == null ? void 0 : retainProjects.forEach((kind, project2) => { + if (kind !== 4 /* CreateOptimized */ && !sentConfigDiag.has(project2)) this.sendConfigFileDiagEvent( project2, info.fileName, /*force*/ @@ -193174,30 +198297,49 @@ Dynamic files must always be opened with service's current directory or service * - Reload - if the project doesnt exist, it creates one. If not delayLoad, the project is reloaded clearing semantic cache * @internal */ - findCreateOrReloadConfiguredProject(configFileName, kind, reason, allowDeferredClosed, triggerFile, reloadedProjects, delayLoad, delayReloadedConfiguredProjects) { - let project = this.findConfiguredProjectByProjectName(configFileName, allowDeferredClosed); + findCreateOrReloadConfiguredProject(configFileName, kind, reason, allowDeferredClosed, triggerFile, reloadedProjects, delayLoad, delayReloadedConfiguredProjects, projectForConfigFile) { + let project = projectForConfigFile ?? this.findConfiguredProjectByProjectName(configFileName, allowDeferredClosed); let sentConfigFileDiag = false; + let configFileExistenceInfo; switch (kind) { - case 0 /* Find */: + case 0 /* FindOptimized */: + case 1 /* Find */: + case 3 /* CreateReplay */: if (!project) return; break; - case 1 /* Create */: + case 2 /* CreateReplayOptimized */: + if (!project) return; + configFileExistenceInfo = configFileExistenceInfoForOptimizedReplay(project); + break; + case 4 /* CreateOptimized */: + case 5 /* Create */: project ?? (project = this.createConfiguredProject(configFileName, reason)); - sentConfigFileDiag = !delayLoad && updateConfiguredProject(project, triggerFile); + if (!delayLoad) { + ({ sentConfigFileDiag, configFileExistenceInfo } = updateProjectFoundUsingFind( + project, + kind, + triggerFile + )); + } break; - case 2 /* Reload */: + case 6 /* ReloadOptimized */: + project ?? (project = this.createConfiguredProject(configFileName, reloadReason(reason))); + project.projectService.reloadConfiguredProjectOptimized(project, reason, reloadedProjects); + configFileExistenceInfo = configFileExistenceInfoForOptimizedLoading(project); + if (configFileExistenceInfo) break; + // falls through + case 7 /* Reload */: project ?? (project = this.createConfiguredProject(configFileName, reloadReason(reason))); sentConfigFileDiag = !delayReloadedConfiguredProjects && this.reloadConfiguredProjectClearingSemanticCache(project, reason, reloadedProjects); if (delayReloadedConfiguredProjects && !delayReloadedConfiguredProjects.has(project) && !reloadedProjects.has(project)) { - project.pendingUpdateLevel = 2 /* Full */; - project.pendingUpdateReason = reloadReason(reason); + this.setProjectForReload(project, 2 /* Full */, reason); delayReloadedConfiguredProjects.add(project); } break; default: Debug.assertNever(kind); } - return { project, sentConfigFileDiag }; + return { project, sentConfigFileDiag, configFileExistenceInfo, reason }; } /** * Finds the default configured project for given info @@ -193205,54 +198347,167 @@ Dynamic files must always be opened with service's current directory or service * The search happens for all tsconfigs till projectRootPath */ tryFindDefaultConfiguredProjectForOpenScriptInfo(info, kind, allowDeferredClosed, reloadedProjects) { - const configFileName = this.getConfigFileNameForFile(info, kind === 0 /* Find */); + const configFileName = this.getConfigFileNameForFile(info, kind <= 3 /* CreateReplay */); if (!configFileName) return; + const optimizedKind = toConfiguredProjectLoadOptimized(kind); const result = this.findCreateOrReloadConfiguredProject( configFileName, - kind, + optimizedKind, fileOpenReason(info), allowDeferredClosed, info.fileName, reloadedProjects ); - if (!result) return; - const seenProjects = /* @__PURE__ */ new Set(); - const sentConfigDiag = new Set(result.sentConfigFileDiag ? [result.project] : void 0); + return result && this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo( + info, + kind, + result, + (project) => `Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open`, + allowDeferredClosed, + reloadedProjects + ); + } + isMatchedByConfig(configFileName, config, info) { + if (config.fileNames.some((rootName) => this.toPath(rootName) === info.path)) return true; + if (isSupportedSourceFileName( + info.fileName, + config.options, + this.hostConfiguration.extraFileExtensions + )) return false; + const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = config.options.configFile.configFileSpecs; + const basePath = toNormalizedPath(getNormalizedAbsolutePath(getDirectoryPath(configFileName), this.currentDirectory)); + if (validatedFilesSpec == null ? void 0 : validatedFilesSpec.some((fileSpec) => this.toPath(getNormalizedAbsolutePath(fileSpec, basePath)) === info.path)) return true; + if (!(validatedIncludeSpecs == null ? void 0 : validatedIncludeSpecs.length)) return false; + if (matchesExcludeWorker( + info.fileName, + validatedExcludeSpecs, + this.host.useCaseSensitiveFileNames, + this.currentDirectory, + basePath + )) return false; + return validatedIncludeSpecs == null ? void 0 : validatedIncludeSpecs.some((includeSpec) => { + const pattern = getPatternFromSpec(includeSpec, basePath, "files"); + return !!pattern && getRegexFromPattern(`(${pattern})$`, this.host.useCaseSensitiveFileNames).test(info.fileName); + }); + } + tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(info, kind, initialConfigResult, referencedProjectReason, allowDeferredClosed, reloadedProjects) { + const infoIsOpenScriptInfo = isOpenScriptInfo(info); + const optimizedKind = toConfiguredProjectLoadOptimized(kind); + const seenProjects = /* @__PURE__ */ new Map(); + let seenConfigs; + const sentConfigDiag = /* @__PURE__ */ new Set(); let defaultProject; let possiblyDefault; - tryFindDefaultConfiguredProject(result.project); + let tsconfigOfDefault; + let tsconfigOfPossiblyDefault; + tryFindDefaultConfiguredProject(initialConfigResult); return { defaultProject: defaultProject ?? possiblyDefault, + tsconfigProject: tsconfigOfDefault ?? tsconfigOfPossiblyDefault, sentConfigDiag, - seenProjects + seenProjects, + seenConfigs }; - function tryFindDefaultConfiguredProject(project) { - return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project); + function tryFindDefaultConfiguredProject(result) { + return isDefaultProjectOptimized(result, result.project) ?? tryFindDefaultConfiguredProjectFromReferences(result.project) ?? tryFindDefaultConfiguredProjectFromAncestor(result.project); } - function isDefaultProject(project) { - if (!tryAddToSet(seenProjects, project)) return; - const projectWithInfo = project.containsScriptInfo(info); - if (projectWithInfo && !project.isSourceOfProjectReferenceRedirect(info.path)) return defaultProject = project; - possiblyDefault ?? (possiblyDefault = projectWithInfo ? project : void 0); - } - function tryFindDefaultConfiguredProjectFromReferences(project) { - return forEachResolvedProjectReferenceProject( + function isDefaultConfigFileExistenceInfo(configFileExistenceInfo, project, childConfigName, reason, tsconfigProject, canonicalConfigFilePath) { + if (project) { + if (seenProjects.has(project)) return; + seenProjects.set(project, optimizedKind); + } else { + if (seenConfigs == null ? void 0 : seenConfigs.has(canonicalConfigFilePath)) return; + (seenConfigs ?? (seenConfigs = /* @__PURE__ */ new Set())).add(canonicalConfigFilePath); + } + if (!tsconfigProject.projectService.isMatchedByConfig( + childConfigName, + configFileExistenceInfo.config.parsedCommandLine, + info + )) { + if (tsconfigProject.languageServiceEnabled) { + tsconfigProject.projectService.watchWildcards( + childConfigName, + configFileExistenceInfo, + tsconfigProject + ); + } + return; + } + const result = project ? updateProjectFoundUsingFind( project, - info.path, - (child, sentConfigFileDiag) => { - if (sentConfigFileDiag) sentConfigDiag.add(child); - return isDefaultProject(child); - }, kind, - `Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open`, + info.fileName, + reason, + reloadedProjects + ) : tsconfigProject.projectService.findCreateOrReloadConfiguredProject( + childConfigName, + kind, + reason, allowDeferredClosed, info.fileName, reloadedProjects ); + if (!result) { + Debug.assert(kind === 3 /* CreateReplay */); + return void 0; + } + seenProjects.set(result.project, optimizedKind); + if (result.sentConfigFileDiag) sentConfigDiag.add(result.project); + return isDefaultProject(result.project, tsconfigProject); + } + function isDefaultProject(project, tsconfigProject) { + if (seenProjects.get(project) === kind) return; + seenProjects.set(project, kind); + const scriptInfo = infoIsOpenScriptInfo ? info : project.projectService.getScriptInfo(info.fileName); + const projectWithInfo = scriptInfo && project.containsScriptInfo(scriptInfo); + if (projectWithInfo && !project.isSourceOfProjectReferenceRedirect(scriptInfo.path)) { + tsconfigOfDefault = tsconfigProject; + return defaultProject = project; + } + if (!possiblyDefault && infoIsOpenScriptInfo && projectWithInfo) { + tsconfigOfPossiblyDefault = tsconfigProject; + possiblyDefault = project; + } + } + function isDefaultProjectOptimized(result, tsconfigProject) { + if (result.sentConfigFileDiag) sentConfigDiag.add(result.project); + return result.configFileExistenceInfo ? isDefaultConfigFileExistenceInfo( + result.configFileExistenceInfo, + result.project, + toNormalizedPath(result.project.getConfigFilePath()), + result.reason, + result.project, + result.project.canonicalConfigFilePath + ) : isDefaultProject(result.project, tsconfigProject); + } + function tryFindDefaultConfiguredProjectFromReferences(project) { + return project.parsedCommandLine && forEachResolvedProjectReferenceProjectLoad( + project, + project.parsedCommandLine, + isDefaultConfigFileExistenceInfo, + optimizedKind, + referencedProjectReason(project), + allowDeferredClosed, + reloadedProjects + ); + } + function tryFindDefaultConfiguredProjectFromAncestor(project) { + return infoIsOpenScriptInfo ? forEachAncestorProjectLoad( + // If not in referenced projects, try ancestors and its references + info, + project, + tryFindDefaultConfiguredProject, + optimizedKind, + `Creating possible configured project for ${info.fileName} to open`, + allowDeferredClosed, + reloadedProjects, + /*searchOnlyPotentialSolution*/ + false + ) : void 0; } } tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, kind, reloadedProjects, delayReloadedConfiguredProjects) { - const allowDeferredClosed = kind === 0 /* Find */; + const allowDeferredClosed = kind === 1 /* Find */; const result = this.tryFindDefaultConfiguredProjectForOpenScriptInfo( info, kind, @@ -193260,18 +198515,20 @@ Dynamic files must always be opened with service's current directory or service reloadedProjects ); if (!result) return; - const { defaultProject, seenProjects } = result; + const { defaultProject, tsconfigProject, seenProjects } = result; if (defaultProject) { - forEachAncestorProject( + forEachAncestorProjectLoad( info, - defaultProject, + tsconfigProject, (ancestor) => { - seenProjects.add(ancestor); + seenProjects.set(ancestor.project, kind); }, kind, `Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`, allowDeferredClosed, reloadedProjects, + /*searchOnlyPotentialSolution*/ + true, delayReloadedConfiguredProjects ); } @@ -193279,12 +198536,12 @@ Dynamic files must always be opened with service's current directory or service } /** @internal */ loadAncestorProjectTree(forProjects) { - forProjects = forProjects || mapDefinedEntries( - this.configuredProjects, - (key, project) => !project.isInitialLoadPending() ? [key, true] : void 0 - ); + forProjects ?? (forProjects = new Set( + mapDefinedIterator(this.configuredProjects.entries(), ([key, project]) => !project.initialLoadPending ? key : void 0) + )); const seenProjects = /* @__PURE__ */ new Set(); - for (const project of arrayFrom(this.configuredProjects.values())) { + const currentConfiguredProjects = arrayFrom(this.configuredProjects.values()); + for (const project of currentConfiguredProjects) { if (forEachPotentialProjectReference(project, (potentialRefPath) => forProjects.has(potentialRefPath))) { updateProjectIfDirty(project); } @@ -193330,8 +198587,38 @@ Dynamic files must always be opened with service's current directory or service } this.removeOrphanScriptInfos(); } + tryInvokeWildCardDirectories(info) { + this.configFileExistenceInfoCache.forEach((configFileExistenceInfo, config) => { + var _a, _b; + if (!((_a = configFileExistenceInfo.config) == null ? void 0 : _a.parsedCommandLine) || contains( + configFileExistenceInfo.config.parsedCommandLine.fileNames, + info.fileName, + !this.host.useCaseSensitiveFileNames ? equateStringsCaseInsensitive : equateStringsCaseSensitive + )) { + return; + } + (_b = configFileExistenceInfo.config.watchedDirectories) == null ? void 0 : _b.forEach((watcher, directory) => { + if (containsPath(directory, info.fileName, !this.host.useCaseSensitiveFileNames)) { + this.logger.info(`Invoking ${config}:: wildcard for open scriptInfo:: ${info.fileName}`); + this.onWildCardDirectoryWatcherInvoke( + directory, + config, + configFileExistenceInfo.config, + watcher.watcher, + info.fileName + ); + } + }); + }); + } openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) { + const existing = this.getScriptInfoForPath(normalizedPathToPath( + fileName, + projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory, + this.toCanonicalFileName + )); const info = this.getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath); + if (!existing && info && !info.isDynamic) this.tryInvokeWildCardDirectories(info); const { retainProjects, ...result } = this.assignProjectToOpenedScriptInfo(info); this.cleanupProjectsAndScriptInfos( retainProjects, @@ -193356,7 +198643,8 @@ Dynamic files must always be opened with service's current directory or service ); } }; - toRetainConfiguredProjects == null ? void 0 : toRetainConfiguredProjects.forEach(retainConfiguredProject); + toRetainConfiguredProjects == null ? void 0 : toRetainConfiguredProjects.forEach((_, project) => retainConfiguredProject(project)); + if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects; this.inferredProjects.forEach(markOriginalProjectsAsUsed); this.externalProjects.forEach(markOriginalProjectsAsUsed); this.externalProjectToConfiguredProjectMap.forEach((projects, externalProjectName) => { @@ -193364,22 +198652,26 @@ Dynamic files must always be opened with service's current directory or service projects.forEach(retainConfiguredProject); } }); - this.openFiles.forEach((_projectRootPath, path) => { + if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects; + forEachEntry(this.openFiles, (_projectRootPath, path) => { if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path)) return; const info = this.getScriptInfoForPath(path); if (find(info.containingProjects, isExternalProject)) return; const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( info, - 0 /* Find */ + 1 /* Find */ ); if (result == null ? void 0 : result.defaultProject) { - result == null ? void 0 : result.seenProjects.forEach(retainConfiguredProject); + result == null ? void 0 : result.seenProjects.forEach((_, project) => retainConfiguredProject(project)); + if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects; } }); - this.configuredProjects.forEach((project) => { + if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects; + forEachEntry(this.configuredProjects, (project) => { if (toRemoveConfiguredProjects.has(project)) { if (isPendingUpdate(project) || forEachReferencedProject(project, isRetained)) { retainConfiguredProject(project); + if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects; } } }); @@ -193401,7 +198693,7 @@ Dynamic files must always be opened with service's current directory or service const toRemoveScriptInfos = new Map(this.filenameToScriptInfo); this.filenameToScriptInfo.forEach((info) => { if (info.deferredDelete) return; - if (!info.isScriptOpen() && info.isOrphan() && !info.isContainedByBackgroundProject()) { + if (!info.isScriptOpen() && info.isOrphan() && !scriptInfoIsContainedByDeferredClosedProject(info) && !scriptInfoIsContainedByBackgroundProject(info)) { if (!info.sourceMapFilePath) return; let sourceInfos; if (isString(info.sourceMapFilePath)) { @@ -193478,10 +198770,16 @@ Dynamic files must always be opened with service's current directory or service } /** @internal */ applyChangesInOpenFiles(openFiles, changedFiles, closedFiles) { + let existingOpenScriptInfos; let openScriptInfos; let assignOrphanScriptInfosToInferredProject = false; if (openFiles) { for (const file of openFiles) { + (existingOpenScriptInfos ?? (existingOpenScriptInfos = [])).push(this.getScriptInfoForPath(normalizedPathToPath( + toNormalizedPath(file.fileName), + file.projectRootPath ? this.getNormalizedAbsolutePath(file.projectRootPath) : this.currentDirectory, + this.toCanonicalFileName + ))); const info = this.getOrCreateOpenScriptInfo( toNormalizedPath(file.fileName), file.content, @@ -193509,10 +198807,18 @@ Dynamic files must always be opened with service's current directory or service } } let retainProjects; - openScriptInfos == null ? void 0 : openScriptInfos.forEach((info) => { - var _a; - return (_a = this.assignProjectToOpenedScriptInfo(info).retainProjects) == null ? void 0 : _a.forEach((p) => (retainProjects ?? (retainProjects = /* @__PURE__ */ new Set())).add(p)); - }); + forEach( + existingOpenScriptInfos, + (existing, index) => !existing && openScriptInfos[index] && !openScriptInfos[index].isDynamic ? this.tryInvokeWildCardDirectories(openScriptInfos[index]) : void 0 + ); + openScriptInfos == null ? void 0 : openScriptInfos.forEach( + (info) => { + var _a; + return (_a = this.assignProjectToOpenedScriptInfo(info).retainProjects) == null ? void 0 : _a.forEach( + (kind, p) => (retainProjects ?? (retainProjects = /* @__PURE__ */ new Map())).set(p, kind) + ); + } + ); if (assignOrphanScriptInfosToInferredProject) { this.assignOrphanScriptInfosToInferredProject(); } @@ -193728,7 +199034,7 @@ Dynamic files must always be opened with service's current directory or service if (cleanupAfter) { this.cleanupConfiguredProjects( configuredProjects, - new Set(proj.projectFileName) + /* @__PURE__ */ new Set([proj.projectFileName]) ); this.printProjects(); } @@ -193751,12 +199057,12 @@ Dynamic files must always be opened with service's current directory or service return; } this.logger.info(`Enabling plugin ${pluginConfigEntry.name} from candidate paths: ${searchPaths.join(",")}`); - if (!pluginConfigEntry.name || isExternalModuleNameRelative(pluginConfigEntry.name) || /[\\/]\.\.?($|[\\/])/.test(pluginConfigEntry.name)) { + if (!pluginConfigEntry.name || isExternalModuleNameRelative(pluginConfigEntry.name) || /[\\/]\.\.?(?:$|[\\/])/.test(pluginConfigEntry.name)) { this.logger.info(`Skipped loading plugin ${pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)} because only package name is allowed plugin name`); return; } if (this.host.importPlugin) { - const importPromise = Project3.importServicePluginAsync( + const importPromise = Project2.importServicePluginAsync( pluginConfigEntry, searchPaths, this.host, @@ -193770,7 +199076,7 @@ Dynamic files must always be opened with service's current directory or service } this.endEnablePlugin( project, - Project3.importServicePluginSync( + Project2.importServicePluginSync( pluginConfigEntry, searchPaths, this.host, @@ -193780,7 +199086,6 @@ Dynamic files must always be opened with service's current directory or service } /** * Performs the remaining steps of enabling a plugin after its module has been instantiated. - * @internal */ endEnablePlugin(project, { pluginConfigEntry, resolvedModule, errorLogs }) { var _a; @@ -193867,9 +199172,11 @@ Dynamic files must always be opened with service's current directory or service const result = []; const processDirectory = (directory) => { switch (packageJsonCache.directoryHasPackageJson(directory)) { + // Sync and check same directory again case 3 /* Maybe */: - packageJsonCache.searchDirectoryAndAncestors(directory); + packageJsonCache.searchDirectoryAndAncestors(directory, project); return processDirectory(directory); + // Check package.json case -1 /* True */: const packageJsonFileName = combinePaths(directory, "package.json"); this.watchPackageJsonFile(packageJsonFileName, this.toPath(packageJsonFileName), project); @@ -193880,23 +199187,30 @@ Dynamic files must always be opened with service's current directory or service return true; } }; - forEachAncestorDirectory(getDirectoryPath(fileName), processDirectory); + forEachAncestorDirectoryStoppingAtGlobalCache( + project, + getDirectoryPath(fileName), + processDirectory + ); return result; } /** @internal */ - getNearestAncestorDirectoryWithPackageJson(fileName) { - return forEachAncestorDirectory(fileName, (directory) => { - switch (this.packageJsonCache.directoryHasPackageJson(directory)) { - case -1 /* True */: - return directory; - case 0 /* False */: - return void 0; - case 3 /* Maybe */: - return this.host.fileExists(combinePaths(directory, "package.json")) ? directory : void 0; + getNearestAncestorDirectoryWithPackageJson(fileName, project) { + return forEachAncestorDirectoryStoppingAtGlobalCache( + project, + fileName, + (directory) => { + switch (this.packageJsonCache.directoryHasPackageJson(directory)) { + case -1 /* True */: + return directory; + case 0 /* False */: + return void 0; + case 3 /* Maybe */: + return this.host.fileExists(combinePaths(directory, "package.json")) ? directory : void 0; + } } - }); + ); } - /** @internal */ watchPackageJsonFile(file, path, project) { Debug.assert(project !== void 0); let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path); @@ -193937,7 +199251,6 @@ Dynamic files must always be opened with service's current directory or service result.projects.add(project); (project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result); } - /** @internal */ onPackageJsonChange(result) { result.projects.forEach((project) => { var _a; @@ -193962,7 +199275,7 @@ Dynamic files must always be opened with service's current directory or service }; /** Makes a filename safe to insert in a RegExp */ _ProjectService.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; -var ProjectService3 = _ProjectService; +var ProjectService2 = _ProjectService; function createIncompleteCompletionsCache() { let info; return { @@ -194006,6 +199319,8 @@ function createModuleSpecifierCache(host) { kind, modulePaths, moduleSpecifiers, + /*packageName*/ + void 0, /*isBlockedByPackageJsonDependencies*/ false )); @@ -194036,16 +199351,19 @@ function createModuleSpecifierCache(host) { modulePaths, /*moduleSpecifiers*/ void 0, + /*packageName*/ + void 0, /*isBlockedByPackageJsonDependencies*/ void 0 )); } }, - setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, isBlockedByPackageJsonDependencies) { + setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, packageName, isBlockedByPackageJsonDependencies) { const cache2 = ensureCache(fromFileName, preferences, options); const info = cache2.get(toFileName2); if (info) { info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies; + info.packageName = packageName; } else { cache2.set(toFileName2, createInfo( /*kind*/ @@ -194054,6 +199372,7 @@ function createModuleSpecifierCache(host) { void 0, /*moduleSpecifiers*/ void 0, + packageName, isBlockedByPackageJsonDependencies )); } @@ -194083,8 +199402,8 @@ function createModuleSpecifierCache(host) { function key(fromFileName, preferences, options) { return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`; } - function createInfo(kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies) { - return { kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies }; + function createInfo(kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies) { + return { kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies }; } } @@ -194103,19 +199422,23 @@ function createPackageJsonCache(host) { return packageJsons.get(host.toPath(combinePaths(directory, "package.json"))) || void 0; }, directoryHasPackageJson: (directory) => directoryHasPackageJson(host.toPath(directory)), - searchDirectoryAndAncestors: (directory) => { - forEachAncestorDirectory(directory, (ancestor) => { - const ancestorPath = host.toPath(ancestor); - if (directoryHasPackageJson(ancestorPath) !== 3 /* Maybe */) { - return true; - } - const packageJsonFileName = combinePaths(ancestor, "package.json"); - if (tryFileExists(host, packageJsonFileName)) { - addOrUpdate(packageJsonFileName, combinePaths(ancestorPath, "package.json")); - } else { - directoriesWithoutPackageJson.set(ancestorPath, true); + searchDirectoryAndAncestors: (directory, project) => { + forEachAncestorDirectoryStoppingAtGlobalCache( + project, + directory, + (ancestor) => { + const ancestorPath = host.toPath(ancestor); + if (directoryHasPackageJson(ancestorPath) !== 3 /* Maybe */) { + return true; + } + const packageJsonFileName = combinePaths(ancestor, "package.json"); + if (tryFileExists(host, packageJsonFileName)) { + addOrUpdate(packageJsonFileName, combinePaths(ancestorPath, "package.json")); + } else { + directoriesWithoutPackageJson.set(ancestorPath, true); + } } - }); + ); } }; function addOrUpdate(fileName, path) { @@ -194236,11 +199559,12 @@ var MultistepOperation = class { } complete() { if (this.requestId !== void 0) { - this.operationHost.sendRequestCompletedEvent(this.requestId); + this.operationHost.sendRequestCompletedEvent(this.requestId, this.performanceData); this.requestId = void 0; } this.setTimerHandle(void 0); this.setImmediateId(void 0); + this.performanceData = void 0; } immediate(actionType, action) { const requestId = this.requestId; @@ -194248,7 +199572,7 @@ var MultistepOperation = class { this.setImmediateId( this.operationHost.getServerHost().setImmediate(() => { this.immediateId = void 0; - this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); + this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action), this.performanceData); }, actionType) ); } @@ -194259,7 +199583,7 @@ var MultistepOperation = class { this.operationHost.getServerHost().setTimeout( () => { this.timerHandle = void 0; - this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); + this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action), this.performanceData); }, ms, actionType @@ -194288,6 +199612,7 @@ var MultistepOperation = class { this.operationHost.logError(e, `delayed processing of request ${this.requestId}`); } } + this.performanceData = this.operationHost.getPerformanceData(); if (stop || !this.hasPendingWork()) { this.complete(); } @@ -194334,8 +199659,13 @@ function getRenameLocationsWorker(projects, defaultProject, initialLocation, fin projects, defaultProject, initialLocation, - /*isForRename*/ - true, + getDefinitionLocation( + defaultProject, + initialLocation, + /*isForRename*/ + true + ), + mapDefinitionInProject, (project, position) => project.getLanguageService().findRenameLocations(position.fileName, position.pos, findInStrings, findInComments, preferences), (renameLocation, cb) => cb(documentSpanLocation(renameLocation)) ); @@ -194372,8 +199702,13 @@ function getReferencesWorker(projects, defaultProject, initialLocation, useCaseS projects, defaultProject, initialLocation, - /*isForRename*/ - false, + getDefinitionLocation( + defaultProject, + initialLocation, + /*isForRename*/ + false + ), + mapDefinitionInProject, (project, position) => { logger.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`); return project.getLanguageService().findReferences(position.fileName, position.pos); @@ -194468,7 +199803,7 @@ function forEachProjectInProjects(projects, path, cb) { }); } } -function getPerProjectReferences(projects, defaultProject, initialLocation, isForRename, getResultsForPosition, forPositionInResult) { +function getPerProjectReferences(projects, defaultProject, initialLocation, defaultDefinition, mapDefinitionInProject2, getResultsForPosition, forPositionInResult) { const resultsMap = /* @__PURE__ */ new Map(); const queue = createQueue(); queue.enqueue({ project: defaultProject, location: initialLocation }); @@ -194478,7 +199813,6 @@ function getPerProjectReferences(projects, defaultProject, initialLocation, isFo }); const projectService = defaultProject.projectService; const cancellationToken = defaultProject.getCancellationToken(); - const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename); const getGeneratedDefinition = memoize( () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition) ); @@ -194506,7 +199840,7 @@ function getPerProjectReferences(projects, defaultProject, initialLocation, isFo projectService.forEachEnabledProject((project) => { if (cancellationToken.isCancellationRequested()) return; if (resultsMap.has(project)) return; - const location = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition); + const location = mapDefinitionInProject2(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition); if (location) { queue.enqueue({ project, location }); } @@ -194519,7 +199853,7 @@ function getPerProjectReferences(projects, defaultProject, initialLocation, isFo return resultsMap; function searchPosition(project, location) { const projectResults = getResultsForPosition(project, location); - if (!projectResults) return void 0; + if (!projectResults || !forPositionInResult) return projectResults; for (const result of projectResults) { forPositionInResult(result, (position) => { const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(project, position); @@ -194545,10 +199879,14 @@ function getPerProjectReferences(projects, defaultProject, initialLocation, isFo return projectResults; } } -function mapDefinitionInProject(definition, project, getGeneratedDefinition, getSourceDefinition) { +function mapDefinitionInProjectIfFileInProject(definition, project) { if (project.containsFile(toNormalizedPath(definition.fileName)) && !isLocationProjectReferenceRedirect(project, definition)) { return definition; } +} +function mapDefinitionInProject(definition, project, getGeneratedDefinition, getSourceDefinition) { + const result = mapDefinitionInProjectIfFileInProject(definition, project); + if (result) return result; const generatedDefinition = getGeneratedDefinition(); if (generatedDefinition && project.containsFile(toNormalizedPath(generatedDefinition.fileName))) return generatedDefinition; const sourceDefinition = getSourceDefinition(); @@ -194608,7 +199946,8 @@ var invalidPartialSemanticModeCommands = [ "prepareCallHierarchy" /* PrepareCallHierarchy */, "provideCallHierarchyIncomingCalls" /* ProvideCallHierarchyIncomingCalls */, "provideCallHierarchyOutgoingCalls" /* ProvideCallHierarchyOutgoingCalls */, - "getPasteEdits" /* GetPasteEdits */ + "getPasteEdits" /* GetPasteEdits */, + "copilotRelated" /* CopilotRelated */ ]; var invalidSyntacticModeCommands = [ ...invalidPartialSemanticModeCommands, @@ -194636,11 +199975,15 @@ var invalidSyntacticModeCommands = [ "navto" /* Navto */, "navto-full" /* NavtoFull */, "documentHighlights" /* DocumentHighlights */, - "documentHighlights-full" /* DocumentHighlightsFull */ + "documentHighlights-full" /* DocumentHighlightsFull */, + "preparePasteEdits" /* PreparePasteEdits */ ]; var Session3 = class _Session { constructor(opts) { this.changeSeq = 0; + // Minimum number of lines for attempting to use region diagnostics for a file. + /** @internal */ + this.regionDiagLineCountThreshold = 500; this.handlers = new Map(Object.entries({ // TODO(jakebailey): correctly type the handlers ["status" /* Status */]: () => { @@ -194741,7 +200084,10 @@ var Session3 = class _Session { }, ["exit" /* Exit */]: () => { this.exit(); - return this.notRequired(); + return this.notRequired( + /*request*/ + void 0 + ); }, ["definition" /* Definition */]: (request) => { return this.requiredResponse(this.getDefinition( @@ -194833,7 +200179,7 @@ var Session3 = class _Session { // TODO: GH#18217 request.arguments.projectRootPath ? toNormalizedPath(request.arguments.projectRootPath) : void 0 ); - return this.notRequired(); + return this.notRequired(request); }, ["quickinfo" /* Quickinfo */]: (request) => { return this.requiredResponse(this.getQuickInfoWorker( @@ -194983,41 +200329,39 @@ var Session3 = class _Session { }, ["geterr" /* Geterr */]: (request) => { this.errorCheck.startNew((next) => this.getDiagnostics(next, request.arguments.delay, request.arguments.files)); - return this.notRequired(); + return this.notRequired( + /*request*/ + void 0 + ); }, ["geterrForProject" /* GeterrForProject */]: (request) => { this.errorCheck.startNew((next) => this.getDiagnosticsForProject(next, request.arguments.delay, request.arguments.file)); - return this.notRequired(); + return this.notRequired( + /*request*/ + void 0 + ); }, ["change" /* Change */]: (request) => { this.change(request.arguments); - return this.notRequired(); + return this.notRequired(request); }, ["configure" /* Configure */]: (request) => { this.projectService.setHostConfiguration(request.arguments); - this.doOutput( - /*info*/ - void 0, - "configure" /* Configure */, - request.seq, - /*success*/ - true - ); - return this.notRequired(); + return this.notRequired(request); }, ["reload" /* Reload */]: (request) => { - this.reload(request.arguments, request.seq); + this.reload(request.arguments); return this.requiredResponse({ reloadFinished: true }); }, ["saveto" /* Saveto */]: (request) => { const savetoArgs = request.arguments; this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile); - return this.notRequired(); + return this.notRequired(request); }, ["close" /* Close */]: (request) => { const closeArgs = request.arguments; this.closeClientFile(closeArgs.file); - return this.notRequired(); + return this.notRequired(request); }, ["navto" /* Navto */]: (request) => { return this.requiredResponse(this.getNavigateToItems( @@ -195099,9 +200443,9 @@ var Session3 = class _Session { ["projectInfo" /* ProjectInfo */]: (request) => { return this.requiredResponse(this.getProjectInfo(request.arguments)); }, - ["reloadProjects" /* ReloadProjects */]: () => { + ["reloadProjects" /* ReloadProjects */]: (request) => { this.projectService.reloadProjects(); - return this.notRequired(); + return this.notRequired(request); }, ["jsxClosingTag" /* JsxClosingTag */]: (request) => { return this.requiredResponse(this.getJsxClosingTag(request.arguments)); @@ -195156,6 +200500,9 @@ var Session3 = class _Session { ["getMoveToRefactoringFileSuggestions" /* GetMoveToRefactoringFileSuggestions */]: (request) => { return this.requiredResponse(this.getMoveToRefactoringFileSuggestions(request.arguments)); }, + ["preparePasteEdits" /* PreparePasteEdits */]: (request) => { + return this.requiredResponse(this.preparePasteEdits(request.arguments)); + }, ["getPasteEdits" /* GetPasteEdits */]: (request) => { return this.requiredResponse(this.getPasteEdits(request.arguments)); }, @@ -195196,15 +200543,7 @@ var Session3 = class _Session { }, ["configurePlugin" /* ConfigurePlugin */]: (request) => { this.configurePlugin(request.arguments); - this.doOutput( - /*info*/ - void 0, - "configurePlugin" /* ConfigurePlugin */, - request.seq, - /*success*/ - true - ); - return this.notRequired(); + return this.notRequired(request); }, ["selectionRange" /* SelectionRange */]: (request) => { return this.requiredResponse(this.getSmartSelectionRange( @@ -195290,6 +200629,9 @@ var Session3 = class _Session { }, ["mapCode" /* MapCode */]: (request) => { return this.requiredResponse(this.mapCode(request.arguments)); + }, + ["copilotRelated" /* CopilotRelated */]: () => { + return this.requiredResponse(this.getCopilotRelatedInfo()); } })); this.host = opts.host; @@ -195304,11 +200646,12 @@ var Session3 = class _Session { const { throttleWaitMilliseconds } = opts; this.eventHandler = this.canUseEvents ? opts.eventHandler || ((event) => this.defaultEventHandler(event)) : void 0; const multistepOperationHost = { - executeWithRequestId: (requestId, action) => this.executeWithRequestId(requestId, action), + executeWithRequestId: (requestId, action, performanceData) => this.executeWithRequestId(requestId, action, performanceData), getCurrentRequestId: () => this.currentRequestId, + getPerformanceData: () => this.performanceData, getServerHost: () => this.host, logError: (err, cmd) => this.logError(err, cmd), - sendRequestCompletedEvent: (requestId) => this.sendRequestCompletedEvent(requestId), + sendRequestCompletedEvent: (requestId, performanceData) => this.sendRequestCompletedEvent(requestId, performanceData), isCancellationRequested: () => this.cancellationToken.isCancellationRequested() }; this.errorCheck = new MultistepOperation(multistepOperationHost); @@ -195331,7 +200674,7 @@ var Session3 = class _Session { canUseWatchEvents: opts.canUseWatchEvents, incrementalVerifier: opts.incrementalVerifier }; - this.projectService = new ProjectService3(settings); + this.projectService = new ProjectService2(settings); this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); this.gcTimer = new GcTimer( this.host, @@ -195360,8 +200703,14 @@ var Session3 = class _Session { Debug.assertNever(this.projectService.serverMode); } } - sendRequestCompletedEvent(requestId) { - this.event({ request_seq: requestId }, "requestCompleted"); + sendRequestCompletedEvent(requestId, performanceData) { + this.event( + { + request_seq: requestId, + performanceData: performanceData && toProtocolPerformanceData(performanceData) + }, + "requestCompleted" + ); } addPerformanceData(key, value) { if (!this.performanceData) { @@ -195369,6 +200718,15 @@ var Session3 = class _Session { } this.performanceData[key] = (this.performanceData[key] ?? 0) + value; } + addDiagnosticsPerformanceData(file, kind, duration) { + var _a, _b; + if (!this.performanceData) { + this.performanceData = {}; + } + let fileDiagnosticDuration = (_a = this.performanceData.diagnosticsDuration) == null ? void 0 : _a.get(file); + if (!fileDiagnosticDuration) ((_b = this.performanceData).diagnosticsDuration ?? (_b.diagnosticsDuration = /* @__PURE__ */ new Map())).set(file, fileDiagnosticDuration = {}); + fileDiagnosticDuration[kind] = duration; + } performanceEventHandler(event) { switch (event.kind) { case "UpdateGraph": @@ -195511,23 +200869,21 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter this.writeMessage(msg); } writeMessage(msg) { - var _a; const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine); - (_a = perfLogger) == null ? void 0 : _a.logEvent(`Response message size: ${msgText.length}`); this.host.write(msgText); } event(body, eventName) { this.send(toEvent(eventName, body)); } /** @internal */ - doOutput(info, cmdName, reqSeq, success, message) { + doOutput(info, cmdName, reqSeq, success, performanceData, message) { const res = { seq: 0, type: "response", command: cmdName, request_seq: reqSeq, success, - performanceData: this.performanceData + performanceData: performanceData && toProtocolPerformanceData(performanceData) }; if (success) { let metadata; @@ -195557,32 +200913,70 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } semanticCheck(file, project) { var _a, _b; + const diagnosticsStartTime = timestamp(); (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "semanticCheck", { file, configFilePath: project.canonicalConfigFilePath }); const diags = isDeclarationFileInJSOnlyNonConfiguredProject(project, file) ? emptyArray2 : project.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file); - this.sendDiagnosticsEvent(file, project, diags, "semanticDiag"); + this.sendDiagnosticsEvent(file, project, diags, "semanticDiag", diagnosticsStartTime); (_b = tracing) == null ? void 0 : _b.pop(); } syntacticCheck(file, project) { var _a, _b; + const diagnosticsStartTime = timestamp(); (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "syntacticCheck", { file, configFilePath: project.canonicalConfigFilePath }); - this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSyntacticDiagnostics(file), "syntaxDiag"); + this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSyntacticDiagnostics(file), "syntaxDiag", diagnosticsStartTime); (_b = tracing) == null ? void 0 : _b.pop(); } suggestionCheck(file, project) { var _a, _b; + const diagnosticsStartTime = timestamp(); (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "suggestionCheck", { file, configFilePath: project.canonicalConfigFilePath }); - this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSuggestionDiagnostics(file), "suggestionDiag"); + this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSuggestionDiagnostics(file), "suggestionDiag", diagnosticsStartTime); (_b = tracing) == null ? void 0 : _b.pop(); } - sendDiagnosticsEvent(file, project, diagnostics, kind) { + regionSemanticCheck(file, project, ranges) { + var _a, _b, _c; + const diagnosticsStartTime = timestamp(); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "regionSemanticCheck", { file, configFilePath: project.canonicalConfigFilePath }); + let diagnosticsResult; + if (!this.shouldDoRegionCheck(file) || !(diagnosticsResult = project.getLanguageService().getRegionSemanticDiagnostics(file, ranges))) { + (_b = tracing) == null ? void 0 : _b.pop(); + return; + } + this.sendDiagnosticsEvent(file, project, diagnosticsResult.diagnostics, "regionSemanticDiag", diagnosticsStartTime, diagnosticsResult.spans); + (_c = tracing) == null ? void 0 : _c.pop(); + return; + } + // We should only do the region-based semantic check if we think it would be + // considerably faster than a whole-file semantic check. + /** @internal */ + shouldDoRegionCheck(file) { + var _a; + const lineCount = (_a = this.projectService.getScriptInfoForNormalizedPath(file)) == null ? void 0 : _a.textStorage.getLineInfo().getLineCount(); + return !!(lineCount && lineCount >= this.regionDiagLineCountThreshold); + } + sendDiagnosticsEvent(file, project, diagnostics, kind, diagnosticsStartTime, spans) { try { - this.event({ file, diagnostics: diagnostics.map((diag2) => formatDiag(file, project, diag2)) }, kind); + const scriptInfo = Debug.checkDefined(project.getScriptInfo(file)); + const duration = timestamp() - diagnosticsStartTime; + const body = { + file, + diagnostics: diagnostics.map((diag2) => formatDiag(file, project, diag2)), + spans: spans == null ? void 0 : spans.map((span) => toProtocolTextSpan(span, scriptInfo)) + }; + this.event( + body, + kind + ); + this.addDiagnosticsPerformanceData(file, kind, duration); } catch (err) { this.logError(err, kind); } } /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ updateErrorCheck(next, checkList, ms, requireOpen = true) { + if (checkList.length === 0) { + return; + } Debug.assert(!this.suppressDiagnosticEvents); const seq = this.changeSeq; const followMs = Math.min(ms, 200); @@ -195590,20 +200984,36 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const goNext = () => { index++; if (checkList.length > index) { - next.delay("checkOne", followMs, checkOne); + return next.delay("checkOne", followMs, checkOne); } }; + const doSemanticCheck = (fileName, project) => { + this.semanticCheck(fileName, project); + if (this.changeSeq !== seq) { + return; + } + if (this.getPreferences(fileName).disableSuggestions) { + return goNext(); + } + next.immediate("suggestionCheck", () => { + this.suggestionCheck(fileName, project); + goNext(); + }); + }; const checkOne = () => { if (this.changeSeq !== seq) { return; } + let ranges; let item = checkList[index]; if (isString(item)) { item = this.toPendingErrorCheck(item); - if (!item) { - goNext(); - return; - } + } else if ("ranges" in item) { + ranges = item.ranges; + item = this.toPendingErrorCheck(item.file); + } + if (!item) { + return goNext(); } const { fileName, project } = item; updateProjectIfDirty(project); @@ -195615,23 +201025,21 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter return; } if (project.projectService.serverMode !== 0 /* Semantic */) { - goNext(); - return; + return goNext(); } - next.immediate("semanticCheck", () => { - this.semanticCheck(fileName, project); - if (this.changeSeq !== seq) { - return; - } - if (this.getPreferences(fileName).disableSuggestions) { - goNext(); - return; - } - next.immediate("suggestionCheck", () => { - this.suggestionCheck(fileName, project); - goNext(); + if (ranges) { + return next.immediate("regionSemanticCheck", () => { + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(fileName); + if (scriptInfo) { + this.regionSemanticCheck(fileName, project, ranges.map((range) => this.getRange({ file: fileName, ...range }, scriptInfo))); + } + if (this.changeSeq !== seq) { + return; + } + next.immediate("semanticCheck", () => doSemanticCheck(fileName, project)); }); - }); + } + next.immediate("semanticCheck", () => doSemanticCheck(fileName, project)); }; if (checkList.length > index && this.changeSeq === seq) { next.delay("checkOne", ms, checkOne); @@ -195868,7 +201276,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const packageDirectory = fileName.substring(0, nodeModulesPathParts.packageRootIndex); const packageJsonCache = (_a2 = project.getModuleResolutionCache()) == null ? void 0 : _a2.getPackageJsonInfoCache(); const compilerOptions = project.getCompilationSettings(); - const packageJson = getPackageScopeForPath(getNormalizedAbsolutePath(packageDirectory + "/package.json", project.getCurrentDirectory()), getTemporaryModuleResolutionState(packageJsonCache, project, compilerOptions)); + const packageJson = getPackageScopeForPath(getNormalizedAbsolutePath(packageDirectory, project.getCurrentDirectory()), getTemporaryModuleResolutionState(packageJsonCache, project, compilerOptions)); if (!packageJson) return void 0; const entrypoints = getEntrypointsFromPackageJsonInfo( packageJson, @@ -195926,7 +201334,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 276 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 277 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a2 = importSpecifier.propertyName) == null ? void 0 : _a2.text) || importSpecifier.name.text; return searchForDeclaration(nameToSearch, fileToSearch, noDtsProgram); @@ -196171,6 +201579,11 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const changes = languageService.mapCode(file, args.mapping.contents, focusLocations, formatOptions, preferences); return this.mapTextChangesToCodeEdits(changes); } + getCopilotRelatedInfo() { + return { + relatedFiles: [] + }; + } setCompilerOptionsForInferredProjects(args) { this.projectService.setCompilerOptionsForInferredProjects(args.options, args.projectRootPath); } @@ -196179,11 +201592,12 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter args.file, args.projectFileName, args.needFileNameList, + args.needDefaultConfiguredProjectInfo, /*excludeConfigFiles*/ false ); } - getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList, excludeConfigFiles) { + getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList, needDefaultConfiguredProjectInfo, excludeConfigFiles) { const { project } = this.getFileAndProjectWorker(uncheckedFileName, projectFileName); updateProjectIfDirty(project); const projectInfo = { @@ -196193,10 +201607,38 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter /*excludeFilesFromExternalLibraries*/ false, excludeConfigFiles - ) : void 0 + ) : void 0, + configuredProjectInfo: needDefaultConfiguredProjectInfo ? this.getDefaultConfiguredProjectInfo(uncheckedFileName) : void 0 }; return projectInfo; } + getDefaultConfiguredProjectInfo(uncheckedFileName) { + var _a; + const info = this.projectService.getScriptInfo(uncheckedFileName); + if (!info) return; + const result = this.projectService.findDefaultConfiguredProjectWorker( + info, + 3 /* CreateReplay */ + ); + if (!result) return void 0; + let notMatchedByConfig; + let notInProject; + result.seenProjects.forEach((kind, project) => { + if (project !== result.defaultProject) { + if (kind !== 3 /* CreateReplay */) { + (notMatchedByConfig ?? (notMatchedByConfig = [])).push(toNormalizedPath(project.getConfigFilePath())); + } else { + (notInProject ?? (notInProject = [])).push(toNormalizedPath(project.getConfigFilePath())); + } + } + }); + (_a = result.seenConfigs) == null ? void 0 : _a.forEach((config) => (notMatchedByConfig ?? (notMatchedByConfig = [])).push(config)); + return { + notMatchedByConfig, + notInProject, + defaultProject: result.defaultProject && toNormalizedPath(result.defaultProject.getConfigFilePath()) + }; + } getRenameInfo(args) { const { file, project } = this.getFileAndProject(args); const position = this.getPositionInFile(args, file); @@ -196313,27 +201755,35 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } getFileReferences(args, simplifiedResult) { const projects = this.getProjects(args); - const fileName = args.file; - const preferences = this.getPreferences(toNormalizedPath(fileName)); - const references = []; - const seen = createDocumentSpanSet(this.host.useCaseSensitiveFileNames); - forEachProjectInProjects( + const fileName = toNormalizedPath(args.file); + const preferences = this.getPreferences(fileName); + const initialLocation = { fileName, pos: 0 }; + const perProjectResults = getPerProjectReferences( projects, - /*path*/ - void 0, + this.getDefaultProject(args), + initialLocation, + initialLocation, + mapDefinitionInProjectIfFileInProject, (project) => { - if (project.getCancellationToken().isCancellationRequested()) return; - const projectOutputs = project.getLanguageService().getFileReferences(fileName); - if (projectOutputs) { - for (const referenceEntry of projectOutputs) { - if (!seen.has(referenceEntry)) { - references.push(referenceEntry); - seen.add(referenceEntry); - } - } - } + this.logger.info(`Finding references to file ${fileName} in project ${project.getProjectName()}`); + return project.getLanguageService().getFileReferences(fileName); } ); + let references; + if (isArray(perProjectResults)) { + references = perProjectResults; + } else { + references = []; + const seen = createDocumentSpanSet(this.host.useCaseSensitiveFileNames); + perProjectResults.forEach((projectOutputs) => { + for (const referenceEntry of projectOutputs) { + if (!seen.has(referenceEntry)) { + references.push(referenceEntry); + seen.add(referenceEntry); + } + } + }); + } if (!simplifiedResult) return references; const refs = references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences)); return { @@ -196436,11 +201886,17 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter getQuickInfoWorker(args, simplifiedResult) { const { file, project } = this.getFileAndProject(args); const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo)); + const userPreferences = this.getPreferences(file); + const quickInfo = project.getLanguageService().getQuickInfoAtPosition( + file, + this.getPosition(args, scriptInfo), + userPreferences.maximumHoverLength, + args.verbosityLevel + ); if (!quickInfo) { return void 0; } - const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; + const useDisplayParts = !!userPreferences.displayPartsForJSDoc; if (simplifiedResult) { const displayString = displayPartsToString(quickInfo.displayParts); return { @@ -196450,7 +201906,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter end: scriptInfo.positionToLineOffset(textSpanEnd(quickInfo.textSpan)), displayString, documentation: useDisplayParts ? this.mapDisplayParts(quickInfo.documentation, project) : displayPartsToString(quickInfo.documentation), - tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts) + tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts), + canIncreaseVerbosityLevel: quickInfo.canIncreaseVerbosityLevel }; } else { return useDisplayParts ? quickInfo : { @@ -196552,42 +202009,12 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const prefix = args.prefix || ""; const entries = mapDefined(completions.entries, (entry) => { if (completions.isMemberCompletion || startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) { - const { - name, - kind: kind2, - kindModifiers, - sortText, - insertText, - filterText, - replacementSpan, - hasAction, - source, - sourceDisplay, - labelDetails, - isSnippet, - isRecommended, - isPackageJsonImport, - isImportStatementCompletion, - data - } = entry; - const convertedSpan = replacementSpan ? toProtocolTextSpan(replacementSpan, scriptInfo) : void 0; + const convertedSpan = entry.replacementSpan ? toProtocolTextSpan(entry.replacementSpan, scriptInfo) : void 0; return { - name, - kind: kind2, - kindModifiers, - sortText, - insertText, - filterText, + ...entry, replacementSpan: convertedSpan, - isSnippet, - hasAction: hasAction || void 0, - source, - sourceDisplay, - labelDetails, - isRecommended, - isPackageJsonImport, - isImportStatementCompletion, - data + hasAction: entry.hasAction || void 0, + symbol: void 0 }; } }); @@ -196710,12 +202137,12 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const project = this.projectService.tryGetDefaultProjectForFile(fileName); return project && { fileName, project }; } - getDiagnostics(next, delay, fileNames) { + getDiagnostics(next, delay, fileArgs) { if (this.suppressDiagnosticEvents) { return; } - if (fileNames.length > 0) { - this.updateErrorCheck(next, fileNames, delay); + if (fileArgs.length > 0) { + this.updateErrorCheck(next, fileArgs, delay); } } change(args) { @@ -196736,22 +202163,13 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter ); } } - reload(args, reqSeq) { + reload(args) { const file = toNormalizedPath(args.file); const tempFileName = args.tmpfile === void 0 ? void 0 : toNormalizedPath(args.tmpfile); const info = this.projectService.getScriptInfoForNormalizedPath(file); if (info) { this.changeSeq++; - if (info.reloadFromFile(tempFileName)) { - this.doOutput( - /*info*/ - void 0, - "reload" /* Reload */, - reqSeq, - /*success*/ - true - ); - } + info.reloadFromFile(tempFileName); } } saveToTmp(fileName, tempFileName) { @@ -196964,8 +202382,13 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const scriptInfo = project.getScriptInfoForNormalizedPath(file); return project.getLanguageService().getMoveToRefactoringFileSuggestions(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file)); } + preparePasteEdits(args) { + const { file, project } = this.getFileAndProject(args); + return project.getLanguageService().preparePasteEditsForFile(file, args.copiedTextSpan.map((copies) => this.getRange({ file, startLine: copies.start.line, startOffset: copies.start.offset, endLine: copies.end.line, endOffset: copies.end.offset }, this.projectService.getScriptInfoForNormalizedPath(file)))); + } getPasteEdits(args) { const { file, project } = this.getFileAndProject(args); + if (isDynamicFileName(file)) return void 0; const copiedFrom = args.copiedFrom ? { file: args.copiedFrom.file, range: args.copiedFrom.spans.map((copies) => this.getRange({ file: args.copiedFrom.file, startLine: copies.start.line, startOffset: copies.start.offset, endLine: copies.end.line, endOffset: copies.end.offset }, project.getScriptInfoForNormalizedPath(toNormalizedPath(args.copiedFrom.file)))) } : void 0; const result = project.getLanguageService().getPasteEdits( { @@ -197028,27 +202451,26 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter try { codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file)); } catch (e) { + const error2 = e instanceof Error ? e : new Error(e); const ls = project.getLanguageService(); const existingDiagCodes = [ ...ls.getSyntacticDiagnostics(file), ...ls.getSemanticDiagnostics(file), ...ls.getSuggestionDiagnostics(file) - ].map( - (d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code - ); + ].filter((d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length)).map((d) => d.code); const badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c)); if (badCode !== void 0) { - e.message = `BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")}); could have caused this error: -${e.message}`; + error2.message += ` +Additional information: BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")})`; } - throw e; + throw error2; } return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions; } - getCombinedCodeFix({ scope, fixId: fixId55 }, simplifiedResult) { + getCombinedCodeFix({ scope, fixId: fixId56 }, simplifiedResult) { Debug.assert(scope.type === "file"); const { file, project } = this.getFileAndProject(scope.args); - const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId55, this.getFormatOptions(file), this.getPreferences(file)); + const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId56, this.getFormatOptions(file), this.getPreferences(file)); if (simplifiedResult) { return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands }; } else { @@ -197087,11 +202509,11 @@ ${e.message}`; mapCodeAction({ description: description3, changes, commands }) { return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands }; } - mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId55, fixAllDescription }) { - return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId55, fixAllDescription }; + mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId56, fixAllDescription }) { + return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId56, fixAllDescription }; } - mapPasteEditsAction({ edits, fixId: fixId55 }) { - return { edits: this.mapTextChangesToCodeEdits(edits), fixId: fixId55 }; + mapPasteEditsAction({ edits, fixId: fixId56 }) { + return { edits: this.mapTextChangesToCodeEdits(edits), fixId: fixId56 }; } mapTextChangesToCodeEdits(textChanges2) { return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change)); @@ -197130,16 +202552,14 @@ ${e.message}`; void 0, /*needFileNameList*/ true, + /*needDefaultConfiguredProjectInfo*/ + void 0, /*excludeConfigFiles*/ true ); - if (languageServiceDisabled) { - return; - } + if (languageServiceDisabled) return; const fileNamesInProject = fileNames.filter((value) => !value.includes("lib.d.ts")); - if (fileNamesInProject.length === 0) { - return; - } + if (fileNamesInProject.length === 0) return; const highPriorityFiles = []; const mediumPriorityFiles = []; const lowPriorityFiles = []; @@ -197300,11 +202720,20 @@ ${e.message}`; } exit() { } - notRequired() { - return { responseRequired: false }; + notRequired(request) { + if (request) this.doOutput( + /*info*/ + void 0, + request.command, + request.seq, + /*success*/ + true, + this.performanceData + ); + return { responseRequired: false, performanceData: this.performanceData }; } requiredResponse(response) { - return { response, responseRequired: true }; + return { response, responseRequired: true, performanceData: this.performanceData }; } addProtocolHandler(command, handler) { if (this.handlers.has(command)) { @@ -197322,18 +202751,27 @@ ${e.message}`; this.currentRequestId = void 0; this.cancellationToken.resetRequest(requestId); } - executeWithRequestId(requestId, f) { + // eslint-disable-line @typescript-eslint/unified-signatures + executeWithRequestId(requestId, f, perfomanceData) { + const currentPerformanceData = this.performanceData; try { + this.performanceData = perfomanceData; this.setCurrentRequest(requestId); return f(); } finally { this.resetCurrentRequest(requestId); + this.performanceData = currentPerformanceData; } } executeCommand(request) { const handler = this.handlers.get(request.command); if (handler) { - const response = this.executeWithRequestId(request.seq, () => handler(request)); + const response = this.executeWithRequestId( + request.seq, + () => handler(request), + /*perfomanceData*/ + void 0 + ); this.projectService.enableRequestedPlugins(); return response; } else { @@ -197345,16 +202783,18 @@ ${e.message}`; request.seq, /*success*/ false, + /*performanceData*/ + void 0, `Unrecognized JSON command: ${request.command}` ); return { responseRequired: false }; } } onMessage(message) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; + var _a, _b, _c, _d, _e, _f, _g; this.gcTimer.scheduleCollect(); - this.performanceData = void 0; let start; + const currentPerformanceData = this.performanceData; if (this.logger.hasLevel(2 /* requestTime */)) { start = this.hrtime(); if (this.logger.hasLevel(3 /* verbose */)) { @@ -197367,16 +202807,15 @@ ${e.message}`; request = this.parseMessage(message); relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0; (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "request", { seq: request.seq, command: request.command }); - (_b = perfLogger) == null ? void 0 : _b.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100)); - (_c = tracing) == null ? void 0 : _c.push( + (_b = tracing) == null ? void 0 : _b.push( tracing.Phase.Session, "executeCommand", { seq: request.seq, command: request.command }, /*separateBeginAndEnd*/ true ); - const { response, responseRequired } = this.executeCommand(request); - (_d = tracing) == null ? void 0 : _d.pop(); + const { response, responseRequired, performanceData } = this.executeCommand(request); + (_c = tracing) == null ? void 0 : _c.pop(); if (this.logger.hasLevel(2 /* requestTime */)) { const elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4); if (responseRequired) { @@ -197385,15 +202824,15 @@ ${e.message}`; this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`); } } - (_e = perfLogger) == null ? void 0 : _e.logStopCommand("" + request.command, "Success"); - (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq: request.seq, command: request.command, success: !!response }); + (_d = tracing) == null ? void 0 : _d.instant(tracing.Phase.Session, "response", { seq: request.seq, command: request.command, success: !!response }); if (response) { this.doOutput( response, request.command, request.seq, /*success*/ - true + true, + performanceData ); } else if (responseRequired) { this.doOutput( @@ -197403,26 +202842,26 @@ ${e.message}`; request.seq, /*success*/ false, + performanceData, "No content available." ); } } catch (err) { - (_g = tracing) == null ? void 0 : _g.popAll(); + (_e = tracing) == null ? void 0 : _e.popAll(); if (err instanceof OperationCanceledException) { - (_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (request && request.command), "Canceled: " + err); - (_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command }); + (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "commandCanceled", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command }); this.doOutput( { canceled: true }, request.command, request.seq, /*success*/ - true + true, + this.performanceData ); return; } this.logErrorWorker(err, this.toStringMessage(message), relevantFile); - (_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (request && request.command), "Error: " + err); - (_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message }); + (_g = tracing) == null ? void 0 : _g.instant(tracing.Phase.Session, "commandError", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message }); this.doOutput( /*info*/ void 0, @@ -197430,8 +202869,11 @@ ${e.message}`; request ? request.seq : 0, /*success*/ false, + this.performanceData, "Error processing request. " + err.message + "\n" + err.stack ); + } finally { + this.performanceData = currentPerformanceData; } } parseMessage(message) { @@ -197453,6 +202895,10 @@ ${e.message}`; return this.projectService.getHostPreferences(); } }; +function toProtocolPerformanceData(performanceData) { + const diagnosticsDuration = performanceData.diagnosticsDuration && arrayFrom(performanceData.diagnosticsDuration, ([file, data]) => ({ ...data, file })); + return { ...performanceData, diagnosticsDuration }; +} function toProtocolTextSpan(textSpan, scriptInfo) { return { start: scriptInfo.positionToLineOffset(textSpan.start), @@ -198024,6 +203470,7 @@ var LineNode = class _LineNode { } } walk(rangeStart, rangeLength, walkFns) { + if (this.children.length === 0) return; let childIndex = 0; let childCharCount = this.children[childIndex].charCount(); let adjustedStart = rangeStart; @@ -198433,20 +203880,19 @@ __export(ts_server_exports4, { LogLevel: () => LogLevel2, Msg: () => Msg, OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent, - Project: () => Project3, + Project: () => Project2, ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent, ProjectKind: () => ProjectKind, ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent, ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent, ProjectLoadingStartEvent: () => ProjectLoadingStartEvent, - ProjectService: () => ProjectService3, + ProjectService: () => ProjectService2, ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent, ScriptInfo: () => ScriptInfo, ScriptVersionCache: () => ScriptVersionCache, Session: () => Session3, TextStorage: () => TextStorage, ThrottledOperations: () => ThrottledOperations, - TypingsCache: () => TypingsCache, TypingsInstallerAdapter: () => TypingsInstallerAdapter, allFilesAreJsOrDts: () => allFilesAreJsOrDts, allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts, @@ -198465,10 +203911,10 @@ __export(ts_server_exports4, { createSortedArray: () => createSortedArray2, emptyArray: () => emptyArray2, findArgument: () => findArgument, - forEachResolvedProjectReferenceProject: () => forEachResolvedProjectReferenceProject, formatDiagnosticToProtocol: () => formatDiagnosticToProtocol, formatMessage: () => formatMessage2, getBaseConfigFileName: () => getBaseConfigFileName, + getDetailWatchInfo: () => getDetailWatchInfo, getLocationInNewDocument: () => getLocationInNewDocument, hasArgument: () => hasArgument, hasNoTypeScriptSource: () => hasNoTypeScriptSource, @@ -198491,7 +203937,8 @@ __export(ts_server_exports4, { nullCancellationToken: () => nullCancellationToken, nullTypingsInstaller: () => nullTypingsInstaller, protocol: () => ts_server_protocol_exports, - removeSorted: () => removeSorted, + scriptInfoIsContainedByBackgroundProject: () => scriptInfoIsContainedByBackgroundProject, + scriptInfoIsContainedByDeferredClosedProject: () => scriptInfoIsContainedByDeferredClosedProject, stringifyIndented: () => stringifyIndented, toEvent: () => toEvent, toNormalizedPath: () => toNormalizedPath, @@ -198569,7 +204016,6 @@ if (typeof console !== "undefined") { GoToDefinition, HighlightSpanKind, IdentifierNameMap, - IdentifierNameMultiMap, ImportKind, ImportsNotUsedAsValues, IndentStyle, @@ -198580,6 +204026,7 @@ if (typeof console !== "undefined") { InlayHintKind, InlayHints, InternalEmitFlags, + InternalNodeBuilderFlags, InternalSymbolName, IntersectionFlags, InvalidatedProjectKind, @@ -198626,6 +204073,8 @@ if (typeof console !== "undefined") { PollingInterval, PollingWatchKind, PragmaKindFlags, + PredicateSemantics, + PreparePasteEdits, PrivateIdentifierKind, ProcessLevel, ProgramUpdateLevel, @@ -198656,7 +204105,6 @@ if (typeof console !== "undefined") { SymbolFlags, SymbolFormatFlags, SyntaxKind, - SyntheticSymbolKind, Ternary, ThrottledCancellationToken, TokenClass, @@ -198679,7 +204127,6 @@ if (typeof console !== "undefined") { WatchLogLevel, WatchType, accessPrivateIdentifier, - addDisposableResourceHelper, addEmitFlags, addEmitHelper, addEmitHelpers, @@ -198702,23 +204149,15 @@ if (typeof console !== "undefined") { arrayFrom, arrayIsEqualTo, arrayIsHomogeneous, - arrayIsSorted, arrayOf, arrayReverseIterator, arrayToMap, arrayToMultiMap, arrayToNumericMap, - arraysEqual, assertType, assign, - assignHelper, - asyncDelegator, - asyncGeneratorHelper, asyncSuperHelper, - asyncValues, attachFileToDiagnostics, - awaitHelper, - awaiterHelper, base64decode, base64encode, binarySearch, @@ -198741,14 +204180,16 @@ if (typeof console !== "undefined") { canHaveJSDoc, canHaveLocals, canHaveModifiers, + canHaveModuleSpecifier, canHaveSymbol, - canIncludeBindAndCheckDiagnsotics, + canIncludeBindAndCheckDiagnostics, canJsonReportNoInputFiles, canProduceDiagnostics, canUsePropertyAccess, canWatchAffectingLocation, canWatchAtTypes, canWatchDirectoryOrFile, + canWatchDirectoryOrFilePath, cartesianProduct, cast, chainBundle, @@ -198759,16 +204200,13 @@ if (typeof console !== "undefined") { changeFullExtension, changesAffectModuleResolution, changesAffectingProgramStructure, - characterToRegularExpressionFlag, + characterCodeToRegularExpressionFlag, childIsDecorated, classElementOrClassElementParameterIsDecorated, classHasClassThisAssignment, classHasDeclaredOrExplicitlyAssignedName, classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated, - classPrivateFieldGetHelper, - classPrivateFieldInHelper, - classPrivateFieldSetHelper, classicNameResolver, classifier, cleanExtendedConfigCache, @@ -198776,7 +204214,6 @@ if (typeof console !== "undefined") { clearMap, clearSharedExtendedConfigFileWatcher, climbPastPropertyAccess, - climbPastPropertyOrElementAccess, clone, cloneCompilerOptions, closeFileWatcher, @@ -198789,12 +204226,10 @@ if (typeof console !== "undefined") { commandLineOptionOfCustomType, commentPragmas, commonOptionsWithBuild, - commonPackageFolders, compact, compareBooleans, compareDataObjects, compareDiagnostics, - compareDiagnosticsSkipRelatedInformation, compareEmitHelpers, compareNumberOfDirectorySeparators, comparePaths, @@ -198808,26 +204243,21 @@ if (typeof console !== "undefined") { compareStringsCaseSensitiveUI, compareTextSpans, compareValues, - compileOnSaveCommandLineOption, compilerOptionsAffectDeclarationPath, compilerOptionsAffectEmit, compilerOptionsAffectSemanticDiagnostics, compilerOptionsDidYouMeanDiagnostics, compilerOptionsIndicateEsModules, - compose, computeCommonSourceDirectoryOfFilenames, computeLineAndCharacterOfPosition, computeLineOfPosition, computeLineStarts, computePositionOfLineAndCharacter, - computeSignature, computeSignatureWithDiagnostics, computeSuggestionDiagnostics, computedOptions, concatenate, concatenateDiagnosticMessageChains, - configDirTemplateSubstitutionOptions, - configDirTemplateSubstitutionWatchOptions, consumesNodeCoreModules, contains, containsIgnoredPath, @@ -198858,16 +204288,11 @@ if (typeof console !== "undefined") { createAccessorPropertySetRedirector, createBaseNodeFactory, createBinaryExpressionTrampoline, - createBindingHelper, - createBuildInfo, createBuilderProgram, - createBuilderProgramUsingProgramBuildInfo, + createBuilderProgramUsingIncrementalBuildInfo, createBuilderStatusReporter, - createCacheWithRedirects, createCacheableExportInfoMap, createCachedDirectoryStructureHost, - createClassNamedEvaluationHelperBlock, - createClassThisAssignmentBlock, createClassifier, createCommentDirectivesMap, createCompilerDiagnostic, @@ -198919,6 +204344,7 @@ if (typeof console !== "undefined") { createMemberAccessForPropertyName, createModeAwareCache, createModeAwareCacheKey, + createModeMismatchDetails, createModuleNotFoundChain, createModuleResolutionCache, createModuleResolutionLoader, @@ -198940,6 +204366,7 @@ if (typeof console !== "undefined") { createPrinterWithRemoveCommentsNeverAsciiEscape, createPrinterWithRemoveCommentsOmitTrailingSemicolon, createProgram, + createProgramDiagnostics, createProgramHost, createPropertyNameNodeForIdentifierOrLiteral, createQueue, @@ -198989,9 +204416,8 @@ if (typeof console !== "undefined") { declarationNameToString, decodeMappings, decodedTextSpanIntersectsWith, - decorateHelper, deduplicate, - defaultIncludeSpec, + defaultHoverMaximumTruncationLength, defaultInitCompilerOptions, defaultMaximumTruncationLength, diagnosticCategoryName, @@ -199002,27 +204428,22 @@ if (typeof console !== "undefined") { displayPart, displayPartsToString, disposeEmitNodes, - disposeResourcesHelper, documentSpansEqual, dumpTracingLegend, elementAt, elideNodes, - emitComments, emitDetachedComments, emitFiles, emitFilesAndReportErrors, emitFilesAndReportErrorsAndGetExitStatus, emitModuleKindIsNonNodeESM, emitNewLineBeforeLeadingCommentOfPosition, - emitNewLineBeforeLeadingComments, - emitNewLineBeforeLeadingCommentsOfPosition, emitResolverSkipsTypeChecking, emitSkippedWithNoDiagnostics, emptyArray, emptyFileSystemEntries, emptyMap, emptyOptions, - emptySet, endsWith, ensurePathIsNonModuleName, ensureScriptKind, @@ -199033,7 +204454,6 @@ if (typeof console !== "undefined") { equateStringsCaseInsensitive, equateStringsCaseSensitive, equateValues, - esDecorateHelper, escapeJsxAttributeString, escapeLeadingUnderscores, escapeNonAsciiString, @@ -199042,15 +204462,14 @@ if (typeof console !== "undefined") { escapeTemplateSubstitution, evaluatorResult, every, + exclusivelyPrefixedNodeCoreModules, executeCommandLine, expandPreOrPostfixIncrementOrDecrementExpression, explainFiles, explainIfFileIsRedirectAndImpliedFormat, exportAssignmentIsAlias, - exportStarHelper, expressionResultIsUnused, extend, - extendsHelper, extensionFromPath, extensionIsTS, extensionsNotSupportingExtensionlessResolution, @@ -199077,7 +204496,6 @@ if (typeof console !== "undefined") { findLast, findLastIndex, findListItemInfo, - findMap, findModifier, findNextToken, findPackageJson, @@ -199106,8 +204524,10 @@ if (typeof console !== "undefined") { forEach, forEachAncestor, forEachAncestorDirectory, + forEachAncestorDirectoryStoppingAtGlobalCache, forEachChild, forEachChildRecursively, + forEachDynamicImportOrRequireCall, forEachEmittedFile, forEachEnclosingBlockScopeContainer, forEachEntry, @@ -199117,6 +204537,8 @@ if (typeof console !== "undefined") { forEachLeadingCommentRange, forEachNameInAccessChainWalkingLeft, forEachNameOfDefaultExport, + forEachOptionsSyntaxByName, + forEachProjectReference, forEachPropertyAssignment, forEachResolvedProjectReference, forEachReturnStatement, @@ -199125,7 +204547,6 @@ if (typeof console !== "undefined") { forEachTsConfigPropArray, forEachUnique, forEachYieldExpression, - forSomeAncestorDirectory, formatColorAndReset, formatDiagnostic, formatDiagnostics, @@ -199136,11 +204557,8 @@ if (typeof console !== "undefined") { formatMessage, formatStringFromArgs, formatting, - fullTripleSlashAMDReferencePathRegEx, - fullTripleSlashReferencePathRegEx, generateDjb2Hash, generateTSConfig, - generatorHelper, getAdjustedReferenceLocation, getAdjustedRenameLocation, getAliasDeclarationFromName, @@ -199152,6 +204570,7 @@ if (typeof console !== "undefined") { getAllKeys, getAllProjectOutputs, getAllSuperTypeNodes, + getAllowImportingTsExtensions, getAllowJSCompilerOption, getAllowSyntheticDefaultImports, getAncestor, @@ -199159,7 +204578,6 @@ if (typeof console !== "undefined") { getAreDeclarationMapsEnabled, getAssignedExpandoInitializer, getAssignedName, - getAssignedNameOfIdentifier, getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind, @@ -199184,7 +204602,6 @@ if (typeof console !== "undefined") { getCommonSourceDirectory, getCommonSourceDirectoryOfConfig, getCompilerOptionValue, - getCompilerOptionsDiffValue, getConditions, getConfigFileParsingDiagnostics, getConstantValue, @@ -199200,7 +204617,6 @@ if (typeof console !== "undefined") { getContainingObjectLiteralElement, getContextualTypeFromParent, getContextualTypeFromParentOrAncestorTypeNode, - getCurrentTime, getDeclarationDiagnostics, getDeclarationEmitExtensionForPath, getDeclarationEmitOutputFilePath, @@ -199218,6 +204634,7 @@ if (typeof console !== "undefined") { getDefaultLibFilePath, getDefaultLikeExportInfo, getDefaultLikeExportNameFromDeclaration, + getDefaultResolutionModeForFileWorker, getDiagnosticText, getDiagnosticsWithinSpan, getDirectoryPath, @@ -199248,6 +204665,7 @@ if (typeof console !== "undefined") { getEmitFlags, getEmitHelpers, getEmitModuleDetectionKind, + getEmitModuleFormatOfFileWorker, getEmitModuleKind, getEmitModuleResolutionKind, getEmitScriptTarget, @@ -199298,11 +204716,11 @@ if (typeof console !== "undefined") { getIdentifierGeneratedImportReference, getIdentifierTypeArguments, getImmediatelyInvokedFunctionExpression, + getImpliedNodeFormatForEmitWorker, getImpliedNodeFormatForFile, getImpliedNodeFormatForFileWorker, getImportNeedsImportDefaultHelper, getImportNeedsImportStarHelper, - getIndentSize, getIndentString, getInferredLibraryNameResolveFrom, getInitializedVariables, @@ -199311,6 +204729,7 @@ if (typeof console !== "undefined") { getInterfaceBaseTypeNodes, getInternalEmitFlags, getInvokedExpression, + getIsFileExcluded, getIsolatedModules, getJSDocAugmentsTag, getJSDocClassTag, @@ -199339,7 +204758,6 @@ if (typeof console !== "undefined") { getJSDocSatisfiesExpressionType, getJSDocSatisfiesTag, getJSDocTags, - getJSDocTagsNoCache, getJSDocTemplateTag, getJSDocThisTag, getJSDocType, @@ -199359,11 +204777,12 @@ if (typeof console !== "undefined") { getLeadingCommentRangesOfNode, getLeftmostAccessExpression, getLeftmostExpression, + getLibFileNameFromLibReference, + getLibNameFromLibReference, getLibraryNameFromLibFileName, getLineAndCharacterOfPosition, getLineInfo, getLineOfLocalPosition, - getLineOfLocalPositionFromLineMap, getLineStartPositionForPosition, getLineStarts, getLinesBetweenPositionAndNextNonWhitespaceCharacter, @@ -199405,7 +204824,6 @@ if (typeof console !== "undefined") { getNameOfScriptTarget, getNameOrArgument, getNameTable, - getNamesForExportedSymbol, getNamespaceDeclarationNode, getNewLineCharacter, getNewLineKind, @@ -199422,62 +204840,57 @@ if (typeof console !== "undefined") { getNonAssignmentOperatorForCompoundAssignment, getNonAugmentationDeclaration, getNonDecoratorTokenPosOfNode, + getNonIncrementalBuildInfoRoots, + getNonModifierTokenPosOfNode, getNormalizedAbsolutePath, getNormalizedAbsolutePathWithoutRoot, getNormalizedPathComponents, getObjectFlags, - getOperator, getOperatorAssociativity, getOperatorPrecedence, getOptionFromName, getOptionsForLibraryResolution, getOptionsNameMap, + getOptionsSyntaxByArrayElementValue, + getOptionsSyntaxByValue, getOrCreateEmitNode, - getOrCreateExternalHelpersModuleNameIfNeeded, getOrUpdate, getOriginalNode, getOriginalNodeId, - getOriginalSourceFile, getOutputDeclarationFileName, getOutputDeclarationFileNameWorker, getOutputExtension, getOutputFileNames, getOutputJSFileNameWorker, getOutputPathsFor, - getOutputPathsForBundle, getOwnEmitOutputFilePath, getOwnKeys, getOwnValues, - getPackageJsonInfo, getPackageJsonTypesVersionsPaths, - getPackageJsonsVisibleToFile, getPackageNameFromTypesPackageName, getPackageScopeForPath, getParameterSymbolFromJSDoc, - getParameterTypeNode, getParentNodeInSpan, getParseTreeNode, getParsedCommandLineOfConfigFile, getPathComponents, - getPathComponentsRelativeTo, getPathFromPathComponents, getPathUpdater, getPathsBasePath, getPatternFromSpec, - getPendingEmitKind, + getPendingEmitKindWithSeen, getPositionOfLineAndCharacter, getPossibleGenericSignatures, getPossibleOriginalInputExtensionForExtension, + getPossibleOriginalInputPathWithoutChangingExt, getPossibleTypeArgumentsInfo, getPreEmitDiagnostics, getPrecedingNonSpaceCharacterPosition, getPrivateIdentifier, getProperties, getProperty, - getPropertyArrayElementValue, getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode, - getPropertyNameForUniqueESSymbol, getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement, @@ -199501,13 +204914,14 @@ if (typeof console !== "undefined") { getResolvePackageJsonExports, getResolvePackageJsonImports, getResolvedExternalModuleName, + getResolvedModuleFromResolution, + getResolvedTypeReferenceDirectiveFromResolution, getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType, getRightMostAssignedExpression, getRootDeclaration, getRootDirectoryOfResolutionCache, getRootLength, - getRootPathSplitLength, getScriptKind, getScriptKindFromFileName, getScriptTargetFeatures, @@ -199519,14 +204933,12 @@ if (typeof console !== "undefined") { getSetAccessorValueParameter, getSetExternalModuleIndicator, getShebang, - getSingleInitializerOfVariableStatementOrPropertyDeclaration, getSingleVariableOfVariableStatement, getSnapshotText, getSnippetElement, getSourceFileOfModule, getSourceFileOfNode, getSourceFilePathInNewDir, - getSourceFilePathInNewDirWorker, getSourceFileVersionAsHashFromText, getSourceFilesToEmit, getSourceMapRange, @@ -199549,7 +204961,6 @@ if (typeof console !== "undefined") { getSwitchedType, getSymbolId, getSymbolNameForPrivateIdentifier, - getSymbolParentOrFail, getSymbolTarget, getSyntacticClassifications, getSyntacticModifierFlags, @@ -199580,7 +204991,6 @@ if (typeof console !== "undefined") { getTouchingToken, getTrailingCommentRanges, getTrailingSemicolonDeferringWriter, - getTransformFlagsSubtreeExclusions, getTransformers, getTsBuildInfoEmitOutputFilePath, getTsConfigObjectLiteralExpression, @@ -199608,7 +205018,6 @@ if (typeof console !== "undefined") { hasAccessorModifier, hasAmbientModifier, hasChangesInResolutions, - hasChildOfKind, hasContextSensitiveParameters, hasDecorators, hasDocComment, @@ -199617,6 +205026,7 @@ if (typeof console !== "undefined") { hasEffectiveModifiers, hasEffectiveReadonlyModifier, hasExtension, + hasImplementationTSFileExtension, hasIndexSignature, hasInferredType, hasInitializer, @@ -199644,7 +205054,6 @@ if (typeof console !== "undefined") { hasType, hasTypeArguments, hasZeroOrOneAsteriskCharacter, - helperString, hostGetCanonicalFileName, hostUsesCaseSensitiveFileNames, idText, @@ -199654,9 +205063,8 @@ if (typeof console !== "undefined") { identitySourceMapConsumer, ignoreSourceNewlines, ignoredPaths, - importDefaultHelper, importFromModuleSpecifier, - importStarHelper, + importSyntaxAffectsModuleResolution, indexOfAnyCharCode, indexOfNode, indicesOf, @@ -199664,7 +205072,6 @@ if (typeof console !== "undefined") { injectClassNamedEvaluationHelperBlockIfMissing, injectClassThisAssignmentIfMissing, insertImports, - insertLeadingStatement, insertSorted, insertStatementAfterCustomPrologue, insertStatementAfterStandardPrologue, @@ -199680,11 +205087,9 @@ if (typeof console !== "undefined") { isAccessibilityModifier, isAccessor, isAccessorModifier, - isAliasSymbolDeclaration, isAliasableExpression, isAmbientModule, isAmbientPropertyDeclaration, - isAnonymousFunctionDefinition, isAnyDirectorySeparator, isAnyImportOrBareOrAccessedRequire, isAnyImportOrReExport, @@ -199720,6 +205125,7 @@ if (typeof console !== "undefined") { isAwaitKeyword, isBigIntLiteral, isBinaryExpression, + isBinaryLogicalOperator, isBinaryOperatorToken, isBindableObjectDefinePropertyCall, isBindableStaticAccessExpression, @@ -199739,7 +205145,7 @@ if (typeof console !== "undefined") { isBooleanLiteral, isBreakOrContinueStatement, isBreakStatement, - isBuild, + isBuildCommand, isBuildInfoFile, isBuilderProgram, isBundle, @@ -199760,7 +205166,6 @@ if (typeof console !== "undefined") { isCatchClauseVariableDeclaration, isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile, - isChildOfNodeWithKind, isCircularBuildOrder, isClassDeclaration, isClassElement, @@ -199772,7 +205177,6 @@ if (typeof console !== "undefined") { isClassOrTypeElement, isClassStaticBlockDeclaration, isClassThisAssignmentBlock, - isCollapsedRange, isColonToken, isCommaExpression, isCommaListExpression, @@ -199815,16 +205219,13 @@ if (typeof console !== "undefined") { isDeleteTarget, isDeprecatedDeclaration, isDestructuringAssignment, - isDiagnosticWithLocation, isDiskPathRoot, isDoStatement, isDocumentRegistryEntry, isDotDotDotToken, isDottedName, isDynamicName, - isESSymbolIdentifier, isEffectiveExternalModule, - isEffectiveModuleDeclaration, isEffectiveStrictModeSourceFile, isElementAccessChain, isElementAccessExpression, @@ -199894,13 +205295,11 @@ if (typeof console !== "undefined") { isFunctionOrModuleBlock, isFunctionSymbol, isFunctionTypeNode, - isFutureReservedKeyword, isGeneratedIdentifier, isGeneratedPrivateIdentifier, isGetAccessor, isGetAccessorDeclaration, isGetOrSetAccessorDeclaration, - isGlobalDeclaration, isGlobalScopeAugmentation, isGlobalSourceFile, isGrammarError, @@ -199933,7 +205332,7 @@ if (typeof console !== "undefined") { isImportSpecifier, isImportTypeAssertionContainer, isImportTypeNode, - isImportableFile, + isImportable, isInComment, isInCompoundLikeAssignment, isInExpressionContext, @@ -199948,6 +205347,8 @@ if (typeof console !== "undefined") { isInTemplateString, isInTopLevelContext, isInTypeQuery, + isIncrementalBuildInfo, + isIncrementalBundleEmitBuildInfo, isIncrementalCompilation, isIndexSignatureDeclaration, isIndexedAccessTypeNode, @@ -200030,6 +205431,7 @@ if (typeof console !== "undefined") { isJsxAttributeLike, isJsxAttributeName, isJsxAttributes, + isJsxCallLike, isJsxChild, isJsxClosingElement, isJsxClosingFragment, @@ -200054,7 +205456,6 @@ if (typeof console !== "undefined") { isLabeledStatement, isLateVisibilityPaintedStatement, isLeftHandSideExpression, - isLeftHandSideOfAssignment, isLet, isLineBreak, isLiteralComputedPropertyDeclarationName, @@ -200062,10 +205463,7 @@ if (typeof console !== "undefined") { isLiteralExpressionOfObject, isLiteralImportTypeNode, isLiteralKind, - isLiteralLikeAccess, - isLiteralLikeElementAccess, isLiteralNameOfPropertyDeclarationOrIndexAccess, - isLiteralTypeLikeExpression, isLiteralTypeLiteral, isLiteralTypeNode, isLocalName, @@ -200090,6 +205488,7 @@ if (typeof console !== "undefined") { isModuleBlock, isModuleBody, isModuleDeclaration, + isModuleExportName, isModuleExportsAccessExpression, isModuleIdentifier, isModuleName, @@ -200099,7 +205498,6 @@ if (typeof console !== "undefined") { isModuleWithStringLiteralName, isNameOfFunctionDeclaration, isNameOfModuleDeclaration, - isNamedClassElement, isNamedDeclaration, isNamedEvaluation, isNamedEvaluationSource, @@ -200116,8 +205514,8 @@ if (typeof console !== "undefined") { isNamespaceReexportDeclaration, isNewExpression, isNewExpressionTarget, + isNewScopeNode, isNoSubstitutionTemplateLiteral, - isNode, isNodeArray, isNodeArrayMultiLine, isNodeDescendantOf, @@ -200126,14 +205524,11 @@ if (typeof console !== "undefined") { isNodeModulesDirectory, isNodeWithPossibleHoistedDeclaration, isNonContextualKeyword, - isNonExportDefaultModifier, isNonGlobalAmbientModule, - isNonGlobalDeclaration, isNonNullAccess, isNonNullChain, isNonNullExpression, isNonStaticMethodOrAccessorWithPrivateName, - isNotEmittedOrPartiallyEmittedNode, isNotEmittedStatement, isNullishCoalesce, isNumber, @@ -200149,7 +205544,6 @@ if (typeof console !== "undefined") { isObjectLiteralMethod, isObjectLiteralOrClassExpressionMethodOrAccessor, isObjectTypeDeclaration, - isOctalDigit, isOmittedExpression, isOptionalChain, isOptionalChainRoot, @@ -200169,6 +205563,7 @@ if (typeof console !== "undefined") { isParseTreeNode, isPartOfParameterDeclaration, isPartOfTypeNode, + isPartOfTypeOnlyImportOrExportDeclaration, isPartOfTypeQuery, isPartiallyEmittedExpression, isPatternMatch, @@ -200183,7 +205578,6 @@ if (typeof console !== "undefined") { isPrivateIdentifierClassElementDeclaration, isPrivateIdentifierPropertyAccessExpression, isPrivateIdentifierSymbol, - isProgramBundleEmitBuildInfo, isProgramUptoDate, isPrologueDirective, isPropertyAccessChain, @@ -200196,7 +205590,6 @@ if (typeof console !== "undefined") { isPropertyName, isPropertyNameLiteral, isPropertySignature, - isProtoSetter, isPrototypeAccess, isPrototypePropertyAssignment, isPunctuation, @@ -200206,7 +205599,6 @@ if (typeof console !== "undefined") { isQuestionOrExclamationToken, isQuestionOrPlusOrMinusToken, isQuestionToken, - isRawSourceMap, isReadonlyKeyword, isReadonlyKeywordOrPlusOrMinusToken, isRecognizedTripleSlashComment, @@ -200228,24 +205620,23 @@ if (typeof console !== "undefined") { isRootedDiskPath, isSameEntityName, isSatisfiesExpression, - isScopeMarker, isSemicolonClassElement, isSetAccessor, isSetAccessorDeclaration, - isShebangTrivia, isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment, + isSideEffectImport, isSignedNumericLiteral, isSimpleCopiableExpression, isSimpleInlineableExpression, - isSimpleParameter, isSimpleParameterList, isSingleOrDoubleQuote, + isSolutionConfig, + isSourceElement, isSourceFile, isSourceFileFromLibrary, isSourceFileJS, - isSourceFileNotJS, isSourceFileNotJson, isSourceMapping, isSpecialPropertyDeclaration, @@ -200258,7 +205649,6 @@ if (typeof console !== "undefined") { isStatic, isStaticModifier, isString, - isStringAKeyword, isStringANonContextualKeyword, isStringAndEmptyAnonymousObjectIntersection, isStringDoubleQuoted, @@ -200271,7 +205661,6 @@ if (typeof console !== "undefined") { isStringTextContainingNode, isSuperCall, isSuperKeyword, - isSuperOrSuperProperty, isSuperProperty, isSupportedSourceFileName, isSwitchStatement, @@ -200317,7 +205706,6 @@ if (typeof console !== "undefined") { isTypeDeclaration, isTypeElement, isTypeKeyword, - isTypeKeywordToken, isTypeKeywordTokenOrIdentifier, isTypeLiteralNode, isTypeNode, @@ -200353,7 +205741,6 @@ if (typeof console !== "undefined") { isVariableDeclarationInitializedToRequire, isVariableDeclarationList, isVariableLike, - isVariableLikeOrAccessor, isVariableStatement, isVoidExpression, isWatchSet, @@ -200372,10 +205759,6 @@ if (typeof console !== "undefined") { libMap, libs, lineBreakPart, - linkNamePart, - linkPart, - linkTextPart, - listFiles, loadModuleFromGlobalCache, loadWithModeAwareCache, makeIdentifierFromModuleName, @@ -200385,7 +205768,6 @@ if (typeof console !== "undefined") { map, mapAllOrFail, mapDefined, - mapDefinedEntries, mapDefinedIterator, mapEntries, mapIterator, @@ -200395,18 +205777,20 @@ if (typeof console !== "undefined") { matchPatternOrExact, matchedText, matchesExclude, + matchesExcludeWorker, + maxBy, maybeBind, maybeSetLocalizedDiagnosticMessages, memoize, - memoizeCached, memoizeOne, - memoizeWeak, - metadataHelper, min, minAndMax, missingFileModifiedTime, modifierToFlag, modifiersToFlags, + moduleExportNameIsDefault, + moduleExportNameTextEscaped, + moduleExportNameTextUnescaped, moduleOptionDeclaration, moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter, @@ -200415,6 +205799,7 @@ if (typeof console !== "undefined") { moduleResolutionUsesNodeModules, moduleSpecifierToValidIdentifier, moduleSpecifiers, + moduleSupportsImportAttributes, moduleSymbolToValidIdentifier, moveEmitHelpers, moveRangeEnd, @@ -200433,6 +205818,7 @@ if (typeof console !== "undefined") { noTransformers, noTruncationMaximumTruncationLength, nodeCanBeDecorated, + nodeCoreModules, nodeHasName, nodeIsDecorated, nodeIsMissing, @@ -200446,11 +205832,11 @@ if (typeof console !== "undefined") { nodePosToString, nodeSeenTracker, nodeStartsNewLexicalEnvironment, - nodeToDisplayParts, noop, noopFileWatcher, normalizePath, normalizeSlashes, + normalizeSpans, not, notImplemented, notImplementedResolver, @@ -200465,13 +205851,11 @@ if (typeof console !== "undefined") { optionsForBuild, optionsForWatch, optionsHaveChanges, - optionsHaveModuleResolutionChanges, or, orderedRemoveItem, orderedRemoveItemAt, packageIdToPackageName, packageIdToString, - paramHelper, parameterIsThisKeyword, parameterNamePart, parseBaseNodeFactory, @@ -200502,10 +205886,8 @@ if (typeof console !== "undefined") { pathIsBareSpecifier, pathIsRelative, patternText, - perfLogger, performIncrementalCompilation, performance, - plainJSErrors, positionBelongsToNode, positionIsASICandidate, positionIsSynthesized, @@ -200518,7 +205900,6 @@ if (typeof console !== "undefined") { programContainsEsModules, programContainsModules, projectReferenceIsEqualTo, - propKeyHelper, propertyNamePart, pseudoBigIntToString, punctuationPart, @@ -200541,7 +205922,6 @@ if (typeof console !== "undefined") { rangeStartPositionsAreOnSameLine, readBuilderProgram, readConfigFile, - readHelper, readJson, readJsonConfigFile, readJsonOrUndefined, @@ -200552,7 +205932,7 @@ if (typeof console !== "undefined") { reducePathComponents, refactor, regExpEscape, - regularExpressionFlagToCharacter, + regularExpressionFlagToCharacterCode, relativeComplement, removeAllComments, removeEmitHelper, @@ -200560,7 +205940,6 @@ if (typeof console !== "undefined") { removeFileExtension, removeIgnoredPath, removeMinAndVersionNumbers, - removeOptionality, removePrefix, removeSuffix, removeTrailingDirectorySeparator, @@ -200579,20 +205958,17 @@ if (typeof console !== "undefined") { resolveTripleslashReference, resolveTypeReferenceDirective, resolvingEmptyArray, - restHelper, returnFalse, returnNoopFileWatcher, returnTrue, returnUndefined, returnsPromise, - runInitializersHelper, + rewriteModuleSpecifier, sameFlatMap, sameMap, sameMapping, - scanShebangTrivia, scanTokenAtPosition, scanner, - screenStartingMessageCodes, semanticDiagnosticsOptionDeclarations, serializeCompilerOptions, server, @@ -200600,16 +205976,13 @@ if (typeof console !== "undefined") { setCommentRange, setConfigFileInOptions, setConstantValue, - setEachParent, setEmitFlags, - setFunctionNameHelper, setGetSourceFileAsHashVersioned, setIdentifierAutoGenerate, setIdentifierGeneratedImportReference, setIdentifierTypeArguments, setInternalEmitFlags, setLocalizedDiagnosticMessages, - setModuleDefaultHelper, setNodeChildren, setNodeFlags, setObjectAllocator, @@ -200636,9 +206009,9 @@ if (typeof console !== "undefined") { setValueDeclaration, shouldAllowImportingTsExtension, shouldPreserveConstEnums, + shouldRewriteModuleSpecifier, shouldUseUriStyleNodeCoreModules, showModuleSpecifier, - signatureHasLiteralTypes, signatureHasRestParameter, signatureToDisplayParts, single, @@ -200647,18 +206020,17 @@ if (typeof console !== "undefined") { singleOrMany, singleOrUndefined, skipAlias, - skipAssertions, skipConstraint, skipOuterExpressions, skipParentheses, skipPartiallyEmittedExpressions, skipTrivia, skipTypeChecking, + skipTypeCheckingIgnoringNoCheck, skipTypeParentheses, skipWhile, sliceAfter, some, - sort, sortAndDeduplicate, sortAndDeduplicateDiagnostics, sourceFileAffectingCompilerOptions, @@ -200667,8 +206039,6 @@ if (typeof console !== "undefined") { sourceMapCommentRegExpDontCareLineStart, spacePart, spanMap, - spreadArrayHelper, - stableSort, startEndContainsRange, startEndOverlapsWithStartEnd, startOnNewLine, @@ -200681,10 +206051,8 @@ if (typeof console !== "undefined") { stringToToken, stripQuotes, supportedDeclarationExtensions, - supportedJSExtensions, supportedJSExtensionsFlat, supportedLocaleDirectories, - supportedTSExtensions, supportedTSExtensionsFlat, supportedTSImplementationExtensions, suppressLeadingAndTrailingTrivia, @@ -200693,16 +206061,13 @@ if (typeof console !== "undefined") { symbolEscapedNameNoDefault, symbolName, symbolNameNoDefault, - symbolPart, symbolToDisplayParts, - syntaxMayBeASICandidate, - syntaxRequiresTrailingSemicolonOrASI, sys, sysLog, tagNamesAreEquivalent, takeWhile, targetOptionDeclaration, - templateObjectHelper, + targetToLibMap, testFormatSettings, textChangeRangeIsUnchanged, textChangeRangeNewSpan, @@ -200710,7 +206075,10 @@ if (typeof console !== "undefined") { textOrKeywordPart, textPart, textRangeContainsPositionInclusive, + textRangeContainsTextSpan, + textRangeIntersectsWithTextSpan, textSpanContainsPosition, + textSpanContainsTextRange, textSpanContainsTextSpan, textSpanEnd, textSpanIntersection, @@ -200728,15 +206096,16 @@ if (typeof console !== "undefined") { toBuilderStateFileInfoForMultiEmit, toEditorSettings, toFileNameLowerCase, - toLowerCase, toPath, toProgramEmitPending, + toSorted, tokenIsIdentifierOrKeyword, tokenIsIdentifierOrKeywordOrGreaterThan, tokenToString, trace, tracing, tracingEnabled, + transferSourceFileChildren, transform, transformClassFields, transformDeclarations, @@ -200751,11 +206120,11 @@ if (typeof console !== "undefined") { transformESDecorators, transformESNext, transformGenerators, + transformImpliedNodeFormatDependentModule, transformJsx, transformLegacyDecorators, transformModule, transformNamedEvaluation, - transformNodeModule, transformNodes, transformSystemModule, transformTypeScript, @@ -200782,7 +206151,6 @@ if (typeof console !== "undefined") { tryGetPropertyNameOfBindingOrAssignmentElement, tryGetSourceMappingURL, tryGetTextOfPropertyName, - tryIOAndConsumeErrors, tryParseJson, tryParsePattern, tryParsePatterns, @@ -200793,6 +206161,7 @@ if (typeof console !== "undefined") { tryRemoveExtension, tryRemovePrefix, tryRemoveSuffix, + tscBuildOption, typeAcquisitionDeclarations, typeAliasNamePart, typeDirectiveIsEqualTo, @@ -200804,7 +206173,7 @@ if (typeof console !== "undefined") { unescapeLeadingUnderscores, unmangleScopedPackageName, unorderedRemoveItem, - unorderedRemoveItemAt, + unprefixedNodeCoreModules, unreachableCodeIsError, unsetNodeChildren, unusedLabelIsError, @@ -200817,11 +206186,9 @@ if (typeof console !== "undefined") { updateSharedExtendedConfigFileWatcher, updateSourceFile, updateWatchingWildcardDirectories, - usesExtensionsOnImports, usingSingleLineStringWriter, utf16EncodeAsString, validateLocaleAndSetLanguage, - valuesHelper, version, versionMajorMinor, visitArray, @@ -200834,7 +206201,6 @@ if (typeof console !== "undefined") { visitNodes, visitParameterList, walkUpBindingElementsAndPatterns, - walkUpLexicalEnvironments, walkUpOuterExpressions, walkUpParenthesizedExpressions, walkUpParenthesizedTypes, @@ -201689,7 +207055,7 @@ function RemoveNameQuantifiers(name) { * @returns */ function getDbLabel(label, columnQuantifiers) { - let result = removeHtml(label); + let result = removeHtml(label) + " "; // fix duplicate spaces and different space chars result = result.toString().replace(/\s+/g, " "); const firstSpaceIndex = result[0] == columnQuantifiers.Start && @@ -201698,11 +207064,14 @@ function getDbLabel(label, columnQuantifiers) { : result.indexOf(" "); let attributeType = result.substring(firstSpaceIndex + 1).trim(); const attributeName = RemoveNameQuantifiers(result.substring(0, firstSpaceIndex + 1)); - const attributesTypes = attributeType.split(" "); + let attributesTypes = attributeType.split(" "); let attributeComment = null; + attributeType = attributesTypes[0]; + if (attributeType === "") { + attributeType = "NONE"; + } if (attributesTypes.length > 1) { attributeComment = attributesTypes.slice(1).join(' '); - attributeType = attributesTypes[0]; } const attribute = { attributeName, @@ -201762,12 +207131,17 @@ function getMermaidDiagramDb(ui, type) { // TODO: support for ts and openapi enum // build models // fix fk for comments + // + // Loop through cells in the model for (const key in model.cells) { if (Object.hasOwnProperty.call(model.cells, key)) { const mxcell = model.cells[key]; if (mxcell.mxObjectId.indexOf("mxCell") !== -1) { - if (mxcell.style && mxcell.style.trim().startsWith("swimlane;")) { - let entityName = mxcell.value.toString(); + // See if this is a swimlane (list/entity) or a table. + // If so, treat it as a table in the DB + if (mxcell.style && (mxcell.style.trim().startsWith("swimlane;") + || mxcell.style.trim().startsWith("shape=table;"))) { + let entityName = removeHtml(mxcell.value.toString()); let description = ""; let formatValue = ""; if ((entityName === null || entityName === void 0 ? void 0 : entityName.includes(constants_1.commentColumnQuantifiers.Start)) && @@ -201798,36 +207172,59 @@ function getMermaidDiagramDb(ui, type) { if (comment) { entity.name += ` ${comment}`; } + console.log("Table: ", entity.name); + // Iterate over the children of this cell; treat them as possible columns in the DB table + // + // Get row attributes + const columnQuantifiers = GetColumnQuantifiers(type); // const comment = for (let c = 0; c < mxcell.children.length; c++) { const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if (col.style && - col.style.trim().startsWith("shape=partialRectangle")) { - const columnQuantifiers = GetColumnQuantifiers(type); + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow") || + col.style.trim().startsWith("text")) // List entry + ) { //Get delimiter of column name //Get full name - const attribute = getDbLabel(col.value, columnQuantifiers); - const attributeKeyType = col.children.find((x) => ["FK", "PK"].findIndex((k) => k == x.value.toUpperCase()) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1); - if (attributeKeyType) { - attribute.attributeKeyType = attributeKeyType.value; - if (attribute.attributeKeyType != "PK" && - attribute.attributeKeyType.indexOf("PK") != -1) { - attribute.attributeKeyType = "PK"; + let attribute; + if (col.style.trim().startsWith("shape=tableRow")) { + attribute = getDbLabel(col.children[1].value, columnQuantifiers); + } + else { + attribute = getDbLabel(col.value, columnQuantifiers); + } + console.log("Column: ", attribute.attributeName); + // check for Primary Key attribute + if (col.children && col.children.length) { + try { + // Check for Primary Key or Foreign Key attribute + const attributeKeyType = col.children.find((x) => ["FK", "PK"].findIndex((k) => k == x.value.toUpperCase()) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1); + if (attributeKeyType) { + attribute.attributeKeyType = attributeKeyType.value; + if (attribute.attributeKeyType != "PK" && + attribute.attributeKeyType.indexOf("PK") != -1) { + attribute.attributeKeyType = "PK"; + } + } + } + catch (e) { + console.error("PK check caught exception " + e); } } entity.attributes.push(attribute); if (col.edges && col.edges.length) { + console.log(col.edges.length, "edges"); // check for edges foreign keys for (let e = 0; e < col.edges.length; e++) { const edge = col.edges[e]; + console.log("source=", edge.source, " target=", edge.target); if (edge.mxObjectId.indexOf("mxCell") !== -1) { if (edge.style && edge.style.indexOf("endArrow=") != -1 && edge.source && - edge.source.value && - edge.target && - edge.target.value) { + edge.target) { // need to check if end is open or certain value to determin relationship type // extract endArrow txt // check if both match and contain many or open @@ -201859,7 +207256,11 @@ function getMermaidDiagramDb(ui, type) { // has to be one to many and not one to one if ((targetIsPrimary || sourceIsPrimary) && !(targetIsPrimary && sourceIsPrimary)) { + console.log("Source: ", edge.source.id, edge.source.value); let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel(sourceId, columnQuantifiers); sourceId = sourceAttr.attributeName; let sourceEntity = edge.source.parent.value; @@ -201878,7 +207279,11 @@ function getMermaidDiagramDb(ui, type) { else { sourceEntity = RemoveNameQuantifiers(sourceEntity); } + console.log("Target: ", edge.target.id, edge.target.value); let targetId = edge.target.value; + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } const targetAttr = getDbLabel(targetId, columnQuantifiers); targetId = targetAttr.attributeName; let targetEntity = edge.target.parent.value; @@ -201929,15 +207334,23 @@ function getMermaidDiagramDb(ui, type) { else if (targetIsPrimary && sourceIsPrimary) { // add a new many to many table let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel(sourceId, columnQuantifiers); sourceAttr.attributeKeyType = "PK"; sourceId = sourceAttr.attributeName; - const sourceEntity = RemoveNameQuantifiers(edge.source.parent.value); + let sourceParent = edge.source.parent; + const sourceEntity = RemoveNameQuantifiers(sourceParent.value); let targetId = edge.target.value; + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } const targetAttr = getDbLabel(targetId, columnQuantifiers); targetAttr.attributeKeyType = "PK"; targetId = targetAttr.attributeName; - const targetEntity = RemoveNameQuantifiers(edge.target.parent.value); + let targetParent = edge.target.parent; + const targetEntity = RemoveNameQuantifiers(targetParent.value); const compositeEntity = { name: RemoveNameQuantifiers(sourceEntity) + "_" + @@ -202148,8 +207561,13 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if (col.style && - col.style.trim().startsWith("shape=partialRectangle")) { - const attribute = getDbLabel(col.value, columnQuantifiers); + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow"))) { + let colValue = col.value; + if (col.style.trim().startsWith("shape=tableRow")) { + colValue = col.children[1].value; + } + const attribute = getDbLabel(colValue, columnQuantifiers); if (isPrimaryTable && RemoveNameQuantifiers(attribute.attributeName) == RemoveNameQuantifiers(fk.PrimaryKeyName)) { targetCell = col; diff --git a/dist/nosql-ts.min.js b/dist/nosql-ts.min.js index 8300c7a..1ae351e 100644 --- a/dist/nosql-ts.min.js +++ b/dist/nosql-ts.min.js @@ -1,9 +1,9 @@ /** * File: nosql-ts.min.js * Version: 0.0.7 - * Generated: 2025-10-24 + * Generated: 2026-01-21 */ -!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var _=n[a]={exports:{}};t[a][0].call(_.exports,function(e){return i(t[a][1][e]||e)},_,_.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a(0,r.ensureArray)(t).map(e=>`@see ${e}`).join("\n");if(e&&(null==t?void 0:t.length))return e+"\n\n"+n();return e||n()}(e.description,e.see):void 0;return{...t,...e.title?{title:e.title}:{},...n?{description:n}:{},...e.default?{default:e.default}:{},...e.examples?{examples:e.examples}:{},...e.comment?{$comment:e.comment}:{}}},n.annotateCoreTypes=function(e,t){var n;const{description:i,see:o}=function(e){const t=(null!=e?e:"").split("\n"),n=[];for(;t.length>0&&t[t.length-1].startsWith("@see ");)n.push(t.pop().slice(5));for(;t.length>0&&!t[t.length-1].trim();)t.pop();return{description:t.join("\n"),see:n}}(null!==(n=t.description)&&void 0!==n?n:"");return{...{...t.title?{title:t.title}:{},...t.default?{default:(0,r.stringify)(t.default)}:{},...t.examples?{examples:(0,r.stringify)(t.examples)}:{},...t.$comment?{comment:t.$comment}:{},...i?{description:i}:{},...o&&o.length>0?{see:o}:{}},...e}}},{"core-types":7}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertCoreTypesToJsonSchema=n.decorateSchema=void 0;const r=e("openapi-json-schema"),i=e("core-types"),o=e("./annotations");function a(e,{filename:t,sourceFilename:n,userPackage:r,userPackageUrl:i},o="core-types-json-schema",a="https://github.com/grantila/core-types-json-schema"){var s,c;void 0!==t&&(null!==(s=e.$id)&&void 0!==s||(e.$id=t));const l=r||i?r&&i?`${r} (${i})`:r||i:"",_=n?` from ${n}`:"";null!==(c=e.$comment)&&void 0!==c||(e.$comment=`Generated${_} by ${o} (${a})`+(l?` on behalf of ${l}`:""))}function s(e){const t=e.or.map(e=>c(e)),n=(0,o.annotateJsonSchema)(e,{anyOf:t});return t.length>1&&!t.some(e=>!function(e){const t=Object.keys(e).sort();return 1===t.length&&"type"===t[0]||2===t.length&&"title"===t[0]&&"type"===t[1]}(e))&&(delete n.anyOf,n.type=t.map(({type:e})=>e)),n}function c(e){if("any"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{}));if("null"===e.type)return(0,o.annotateJsonSchema)(e,{type:"null"});if("boolean"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"boolean"}));if("string"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"string"}));if("number"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"number"}));if("integer"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"integer"}));if("and"===e.type)return(0,o.annotateJsonSchema)(e,{allOf:e.and.map(e=>c(e))});if("or"===e.type)return s(e);if("object"===e.type){const t=Object.keys(e.properties),n=t.filter(t=>e.properties[t].required),r=Object.fromEntries(t.map(t=>[t,c(e.properties[t].node)]));return(0,o.annotateJsonSchema)(e,l(e,{type:"object",...t.length>0?{properties:r}:{},...n.length>0?{required:n}:{},...!0===e.additionalProperties?{}:e.additionalProperties?{additionalProperties:c(e.additionalProperties)}:{additionalProperties:!1}}))}if("array"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"array",items:c(e.elementType)}));if("tuple"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"array",items:e.elementTypes.map(e=>c(e)),...!0===e.additionalItems?{}:e.additionalItems?{additionalItems:c(e.additionalItems)}:{additionalItems:!1},minItems:e.minItems}));if("ref"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{$ref:(0,r.encodeRefNameJsonSchema)(e.ref)}));throw new i.UnsupportedError(`core-types node of type ${e.type} not supported`,e)}function l(e,t){return void 0!==e.const?{...t,const:e.const}:e.enum?{...t,enum:e.enum}:t}n.decorateSchema=a,n.convertCoreTypesToJsonSchema=function(e,t){const{version:n,types:r}=e;if(1!==n)throw new i.UnsupportedError(`core-types version ${n} not supported`);const o={definitions:Object.fromEntries(r.map(e=>[e.name,c(e)]))};return a(o,null!=t?t:{}),{data:o,convertedTypes:r.map(({name:e})=>e),notConvertedTypes:[]}}},{"./annotations":3,"core-types":7,"openapi-json-schema":19}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.complexProps=n.convertJsonSchemaToCoreTypes=void 0;const r=e("jsonpos"),i=e("openapi-json-schema"),o=e("core-types"),a=e("./annotations"),s=(e,t)=>({...e,path:[...e.path,t]});function c(e,t){if("boolean"==typeof e)t.throwUnsupportedError("Boolean JSON Schema definition not supported",{blob:{schema:e}});else if(function(e){return"object"==typeof e&&Object.keys(e).some(e=>n.complexProps.has(e))}(e))return function(e,t){const{then:n,else:r,allOf:i,anyOf:o,oneOf:a}=e,l=[...n?[[s(t,"then"),n]]:[],...r?[[s(t,"else"),r]]:[]],_=[...o?o.map((e,n)=>[s(s(t,"anyOf"),n),e]):[],...a?a.map((e,n)=>[s(s(t,"oneOf"),n),e]):[]],u=[...i?i.map((e,n)=>[s(s(t,"allOf"),n),e]):[]];return{type:"and",and:[{type:"or",or:l.map(([e,t])=>c(t,e))},{type:"or",or:_.map(([e,t])=>c(t,e))},{type:"and",and:u.map(([e,t])=>c(t,e))}]}}(function(e,t){const{$ref:n,type:r,enum:i,const:a,items:s,additionalItems:c,required:l,properties:_,additionalProperties:u,then:d,else:p,allOf:f,anyOf:m,oneOf:g}=e,h=f&&"object"==typeof f?f.filter(e=>e&&"object"==typeof e):null,y=m&&"object"==typeof m?m.filter(e=>e&&"object"==typeof e):null,v=g&&"object"==typeof g?g.filter(e=>e&&"object"==typeof e):null,b=(d,p)=>{var f,m,g,h,y;const v=(e,t)=>!(e&&t&&!(0,o.isEqual)(e,t));if(v(n,p.$ref)||t.throwUnsupportedError(`Cannot have $ref in a node *and* in its '${d}'`,{blob:e}),v(r,p.type)||t.throwUnsupportedError(`Cannot have 'type' in a node *and* in its '${d}'`,{blob:e}),i)if(p.enum){const e=(0,o.intersection)(i,p.enum);if(0===e.length)throw new o.MalformedTypeError("Cannot merge types with non-intersecting enums",{path:t.path,blob:{child:[...t.path,d]}});p.enum=e}else p.enum=i;if(void 0!==a)if(void 0!==p.const){if((0,o.isEqual)(a,p.const))throw new o.MalformedTypeError("Cannot merge types with mismatching const",{path:t.path,blob:{child:[...t.path,d]}})}else p.const=a;if(p.items=null!==(f=p.items)&&void 0!==f?f:s,p.additionalItems=null!==(m=p.additionalItems)&&void 0!==m?m:c,void 0===l&&void 0===p.required||(p.required=(0,o.union)(null!==(g=p.required)&&void 0!==g?g:[],null!=l?l:[])),void 0===_!=(void 0===p.properties))null!==(h=p.properties)&&void 0!==h||(p.properties=_);else if(void 0!==_){const e=_,t=p.properties,n=Object.keys(e),r=Object.keys(t),i=(0,o.union)(n,r),a={};i.forEach(n=>{void 0!==e[n]?a[n]=t[n]:void 0!==t[n]?a[n]=e[n]:a[n]={allOf:[e[n],t[n]]}})}void 0===u!=(void 0===p.additionalProperties)?null!==(y=p.additionalProperties)&&void 0!==y||(p.additionalProperties=u):void 0!==u&&(p.additionalProperties={allOf:[p.additionalProperties,u]})};return d&&"object"==typeof d&&b("then",d),p&&"object"==typeof p&&b("else",p),h&&"object"==typeof h&&h.forEach(e=>b("allOf",e)),y&&"object"==typeof y&&y.forEach(e=>b("anyOf",e)),v&&"object"==typeof v&&v.forEach(e=>b("oneOf",e)),{...d&&"object"==typeof d?{then:d}:{},...p&&"object"==typeof p?{else:p}:{},...h&&"object"==typeof h?{allOf:h}:{},...y&&"object"==typeof y?{anyOf:y}:{},...v&&"object"==typeof v?{oneOf:v}:{}}}(e,t),t);void 0===e&&t.throwUnsupportedError("Internal error",{blob:{schema:e}});const r=e=>({type:"ref",ref:(0,i.decodeRefNameJsonSchema)(e)}),_=t=>void 0===e.$ref?t:{type:"and",and:[t,r(e.$ref)]},{const:u,enum:d}=e,p={...void 0!==u?{const:u}:{},...void 0!==d?{enum:d}:{}};if(void 0===e.type)return e.$ref?{...r(e.$ref),...p}:{type:"any",...p};const f=(0,o.ensureArray)(e.type).map(n=>function(e,t,n,r){var i,o,_,u;if(l(t))return"null"===t?(0,a.annotateCoreTypes)({type:"null"},e):(0,a.annotateCoreTypes)({type:t,...n},e);if("array"===t)return Array.isArray(e.items)?(0,a.annotateCoreTypes)({type:"tuple",elementTypes:e.items.map(e=>c(e,s(r,"items"))),additionalItems:void 0===e.additionalItems||("boolean"==typeof e.additionalItems?e.additionalItems:c(e.additionalItems,s(r,"additionalItems"))),minItems:null!==(i=e.minItems)&&void 0!==i?i:0,...n},e):!1===e.items?(0,a.annotateCoreTypes)({type:"tuple",elementTypes:[],additionalItems:!1,minItems:0,...n},e):(0,a.annotateCoreTypes)({type:"array",elementType:void 0===e.items||!0===e.items?{type:"any"}:c(e.items,s(r,"items")),...n},e);if("object"===t){const t=new Set(null!==(o=e.required)&&void 0!==o?o:[]),i=null!==(_=e.additionalProperties)&&void 0!==_?_:r.defaultAdditionalProperties;return(0,a.annotateCoreTypes)({type:"object",properties:Object.fromEntries(Object.entries(null!==(u=e.properties)&&void 0!==u?u:{}).map(([e,n])=>[e,{node:c(n,s(s(r,"properties"),e)),required:t.has(e)}])),additionalProperties:"boolean"==typeof i?i:c(i,s(r,"additionalProperties")),...n},e)}r.throwUnsupportedError(`Unsupported JSON Schema type "${t}"`,{blob:{schema:e}})}(e,n,p,t));return 1===f.length?_(f[0]):_({type:"or",or:f})}n.convertJsonSchemaToCoreTypes=function(e,t={}){const n="string"==typeof e?(0,r.getAstByString)(e):(0,r.getAstByObject)(e),{json:i}=n,{definitions:a}=i,s={version:1,types:Object.keys(null!=a?a:{}).map(e=>{var i;return{...c((null!=a?a:{})[e],{locByPath(){return{path:this.path,loc:(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})}},path:["definitions",e],throwUnsupportedError(e,t){throw(t={...t}).path||(t.path=this.path),t.loc||(t.loc=(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})),new o.UnsupportedError(e,t)},defaultAdditionalProperties:null===(i=t.defaultAdditionalProperties)||void 0===i||i}),name:e}})};return{data:s,convertedTypes:s.types.map(({name:e})=>e),notConvertedTypes:[]}},n.complexProps=new Set(["anyOf","allOf","oneOf","then","else"]);const l=e=>["string","number","integer","boolean","null"].includes(e)},{"./annotations":3,"core-types":7,jsonpos:43,"openapi-json-schema":19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertOpenApiToCoreTypes=n.convertCoreTypesToOpenApi=void 0;const r=e("openapi-json-schema"),i=e("./core-types-to-json-schema"),o=e("./json-schema-to-core-types");n.convertCoreTypesToOpenApi=function(e,t){const{data:n,...o}=(0,i.convertCoreTypesToJsonSchema)(e,t);return{...o,data:(0,r.jsonSchemaDocumentToOpenApi)(n,t)}},n.convertOpenApiToCoreTypes=function(e){e="string"==typeof e?JSON.parse(e):e;const t=(0,r.openApiToJsonSchema)(e);return(0,o.convertJsonSchemaToCoreTypes)(t)}},{"./core-types-to-json-schema":4,"./json-schema-to-core-types":5,"openapi-json-schema":19}],7:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.some=n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.formatSee=n.formatDefault=n.formatExamples=n.stringify=n.stripAnnotations=n.stringifyAnnotations=n.extractAnnotations=n.mergeAnnotations=n.isNonNullable=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.isPrimitiveType=n.ensureArray=n.validate=n.simplify=void 0,i(e("./lib/types"),n);var o=e("./lib/simplify");Object.defineProperty(n,"simplify",{enumerable:!0,get:function(){return o.simplify}});var a=e("./lib/validate");Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return a.validate}});var s=e("./lib/util");Object.defineProperty(n,"ensureArray",{enumerable:!0,get:function(){return s.ensureArray}}),Object.defineProperty(n,"isPrimitiveType",{enumerable:!0,get:function(){return s.isPrimitiveType}}),Object.defineProperty(n,"hasConstEnum",{enumerable:!0,get:function(){return s.hasConstEnum}}),Object.defineProperty(n,"isEqual",{enumerable:!0,get:function(){return s.isEqual}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return s.intersection}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"isNonNullable",{enumerable:!0,get:function(){return s.isNonNullable}});var c=e("./lib/annotation");Object.defineProperty(n,"mergeAnnotations",{enumerable:!0,get:function(){return c.mergeAnnotations}}),Object.defineProperty(n,"extractAnnotations",{enumerable:!0,get:function(){return c.extractAnnotations}}),Object.defineProperty(n,"stringifyAnnotations",{enumerable:!0,get:function(){return c.stringifyAnnotations}}),Object.defineProperty(n,"stripAnnotations",{enumerable:!0,get:function(){return c.stripAnnotations}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(n,"formatExamples",{enumerable:!0,get:function(){return c.formatExamples}}),Object.defineProperty(n,"formatDefault",{enumerable:!0,get:function(){return c.formatDefault}}),Object.defineProperty(n,"formatSee",{enumerable:!0,get:function(){return c.formatSee}});var l=e("./lib/error");Object.defineProperty(n,"MalformedTypeError",{enumerable:!0,get:function(){return l.MalformedTypeError}}),Object.defineProperty(n,"MissingReferenceError",{enumerable:!0,get:function(){return l.MissingReferenceError}}),Object.defineProperty(n,"UnsupportedError",{enumerable:!0,get:function(){return l.UnsupportedError}}),Object.defineProperty(n,"RelatedError",{enumerable:!0,get:function(){return l.RelatedError}}),Object.defineProperty(n,"throwUnsupportedError",{enumerable:!0,get:function(){return l.throwUnsupportedError}}),Object.defineProperty(n,"throwRelatedError",{enumerable:!0,get:function(){return l.throwRelatedError}}),Object.defineProperty(n,"isCoreTypesError",{enumerable:!0,get:function(){return l.isCoreTypesError}}),Object.defineProperty(n,"decorateErrorMeta",{enumerable:!0,get:function(){return l.decorateErrorMeta}}),Object.defineProperty(n,"decorateError",{enumerable:!0,get:function(){return l.decorateError}});var _=e("./lib/location");Object.defineProperty(n,"positionToLineColumn",{enumerable:!0,get:function(){return _.positionToLineColumn}}),Object.defineProperty(n,"locationToLineColumn",{enumerable:!0,get:function(){return _.locationToLineColumn}}),Object.defineProperty(n,"getPositionOffset",{enumerable:!0,get:function(){return _.getPositionOffset}}),Object.defineProperty(n,"mergeLocations",{enumerable:!0,get:function(){return _.mergeLocations}});var u=e("./lib/traverse");Object.defineProperty(n,"some",{enumerable:!0,get:function(){return u.some}}),Object.defineProperty(n,"traverse",{enumerable:!0,get:function(){return u.traverse}})},{"./lib/annotation":8,"./lib/error":9,"./lib/location":10,"./lib/simplify":14,"./lib/traverse":15,"./lib/types":16,"./lib/util":17,"./lib/validate":18}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=n.formatSee=n.formatDefault=n.formatExamples=n.arrayOrSingle=n.stripAnnotations=n.stringifyAnnotations=n.wrapWhitespace=n.extractAnnotations=n.mergeAnnotations=void 0;const r=e("./location"),i=e("./util");function o(e){return e.includes("\n")?["*",e.split("\n").map(e=>` * ${e}`).join("\n")," "].join("\n"):e.startsWith(" ")?e:` ${e}`}function a(e){return 1===e.length?e[0]:e}function s(e){return e.map(e=>"@example\n"+u(_(e).split("\n"),4)).join("\n").trim()}function c(e){return["@default",u(_(e).split("\n"),4)].join("\n").trim()}function l(e){return e.map(e=>"@see "+_(e)).join("\n").trim()}function _(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}function u(e,t,n=!1){return e.map((e,r)=>(0===r&&n?" ".repeat(t-2)+"* ":" ".repeat(t))+e).join("\n")}n.mergeAnnotations=function(e){var t;const n=e=>!!e,o=(e,t="\n")=>(0,i.uniq)(e.filter(n)).join(t).trim(),s=null===(t=e.find(e=>e.name))||void 0===t?void 0:t.name,c=o(e.map(e=>e.title),", "),l=o(e.map(e=>e.description)),_=(0,i.uniq)([].concat(...e.map(e=>(0,i.ensureArray)(e.examples))).filter(n)),u=o(e.map(e=>e.default)),d=(0,i.uniq)([].concat(...e.map(e=>(0,i.ensureArray)(e.see))).filter(n)),p=o(e.map(e=>e.comment)),f=(0,r.mergeLocations)(e.map(e=>e.loc));return{...s?{name:s}:{},...c?{title:c}:{},...l?{description:l}:{},..._.length>0?{examples:a(_)}:{},...u?{default:u}:{},...d.length>0?{see:a(d)}:{},...p?{comment:p}:{},...f?{loc:f}:{}}},n.extractAnnotations=function(e){const{title:t,description:n,examples:r,default:i,comment:o,see:a}=e;return{...t?{title:t}:{},...n?{description:n}:{},...r?{examples:r}:{},...i?{default:i}:{},...o?{comment:o}:{},...a?{see:a}:{}}},n.wrapWhitespace=o,n.stringifyAnnotations=function(e,{includeComment:t=!1,formatWhitespace:n=!1}={}){const{description:r,examples:a,default:_,comment:u,see:d}=e,p=[r,...null==a?[]:[s((0,i.ensureArray)(a))],...void 0===_?[]:[c(_)],...null==d?[]:[l((0,i.ensureArray)(d))],...t?[u]:[]].filter(e=>e).join("\n\n").trim().replace(/\*\//g,"*\\/");return n&&p?o(p):p},n.stripAnnotations=function e(t,n=!0){const{comment:r,description:i,default:o,examples:a,see:s,title:c,...l}=t,_=l;if(n){if("and"===_.type)return{..._,and:_.and.map(t=>e(t,!0))};if("or"===_.type)return{..._,or:_.or.map(t=>e(t,!0))};if("array"===_.type)return{..._,elementType:e(_.elementType,!0)};if("tuple"===_.type)return{..._,elementTypes:_.elementTypes.map(t=>e(t,!0)),additionalItems:"object"==typeof _.additionalItems?e(_.additionalItems,!0):_.additionalItems};if("object"===_.type)return{..._,properties:Object.fromEntries(Object.keys(_.properties).map(t=>[t,{..._.properties[t],node:e(_.properties[t].node,!0)}])),additionalProperties:"object"==typeof _.additionalProperties?e(_.additionalProperties,!0):_.additionalProperties}}return _},n.arrayOrSingle=a,n.formatExamples=s,n.formatDefault=c,n.formatSee=l,n.stringify=_},{"./location":10,"./util":17}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.CoreTypesError=void 0;class r extends Error{constructor(e,t={}){super(e),Object.setPrototypeOf(this,r.prototype),this.blob=t.blob,this.path=t.path,this.loc=t.loc,this.source=t.source,this.filename=t.filename,this.relatedError=t.relatedError}}n.CoreTypesError=r;class i extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,i.prototype)}}n.MalformedTypeError=i;class o extends r{constructor(e,t={}){super(`Reference to missing type "${e}"`,t),Object.setPrototypeOf(this,o.prototype)}}n.MissingReferenceError=o;class a extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,a.prototype)}}n.UnsupportedError=a;class s extends r{constructor(e,t={}){super(e.message,{...t,relatedError:e}),Object.setPrototypeOf(this,s.prototype)}}function c(e){return e instanceof r}function l(e,t){var n,r,i,o,a;return t.blob&&(null!==(n=e.blob)&&void 0!==n||(e.blob=t.blob)),t.path&&(null!==(r=e.path)&&void 0!==r||(e.path=t.path)),t.loc&&(null!==(i=e.loc)&&void 0!==i||(e.loc=t.loc)),t.source&&(null!==(o=e.source)&&void 0!==o||(e.source=t.source)),t.filename&&(null!==(a=e.filename)&&void 0!==a||(e.filename=t.filename)),e}n.RelatedError=s,n.throwUnsupportedError=function(e,t,n){throw new a(e,{blob:t,...t.loc?{loc:t.loc}:{},...n?{path:n}:{}})},n.throwRelatedError=function(e,t){throw new s(e,t)},n.isCoreTypesError=c,n.decorateErrorMeta=l,n.decorateError=function(e,t){return c(e)&&l(e,t),e}},{}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=void 0;const r=e("./util");function i(e,t){const n=e.slice(0,t).split("\n").length,r=e.lastIndexOf("\n",t);return-1===r?{offset:t,line:n,column:t}:{offset:t,line:n,column:t-r}}n.positionToLineColumn=i,n.locationToLineColumn=function(e,t){return"object"==typeof t.start?t:{start:void 0===t.start?void 0:i(e,t.start),...null==t.end?{}:{end:i(e,t.end)}}},n.getPositionOffset=function(e){return void 0===e||"number"==typeof e?e:e.offset},n.mergeLocations=function(e){var t,n,i;let o,a;const s=e=>"number"==typeof e?e:null==e?void 0:e.offset;e.filter(r.isNonNullable).forEach(({start:e,end:t})=>{const n=s(e),r=s(t);void 0!==n&&(!o||"number"==typeof o.location&&o.location===n||o.offset>n)&&(o={location:e,offset:n}),void 0!==r&&(!a||"number"==typeof a.location&&a.location===n||a.offseti(e));return t.some(e=>0===e.length)?[]:(0,r.uniq)([].concat(...t))},n.combineConstAndEnum=i},{"../util":17}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.intersectConstEnum=void 0;const r=e("../annotation"),i=e("../util");n.intersectConstEnum=function(e){if(0===e.length)throw new Error("Cannot intersect const and enum from an empty array of nodes");if(1===e.length)return e[0];const t=e.map(e=>void 0!==e.const?[e.const]:void 0!==e.enum?e.enum:void 0).filter(e=>!!e),n=t.slice(1).reduce((e,t)=>(0,i.intersection)(e,t),t[0]);return{type:e[0].type,...1===n.length?{const:n[0]}:{},...1!==n.length?{enum:n}:{},...(0,r.mergeAnnotations)(e)}}},{"../annotation":8,"../util":17}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplifySingle=void 0;const r=e("./const-enum");n.simplifySingle=function(e){return"boolean"===e.type||"integer"===e.type||"number"===e.type||"string"===e.type?(0,r.simplifyEnumAndConst)(e):e}},{"./const-enum":11}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplify=void 0;const r=e("./simplifications/single"),i=e("./simplifications/const-enum"),o=e("./simplifications/intersect-const-enum"),a=e("./error"),s=e("./annotation"),c=e("./util"),l=["any","string","number","integer","boolean"];n.simplify=function e(t){if(Array.isArray(t))return t.map(t=>e(t));if((0,c.isNodeDocument)(t))return{...t,types:e(t.types)};const n=e=>(0,c.copyName)(t,e);if("tuple"===t.type)return{...t,elementTypes:t.elementTypes.map(t=>e(t)),...t.additionalItems&&"object"==typeof t.additionalItems?{additionalItems:e(t.additionalItems)}:{}};if("array"===t.type)return{...t,elementType:e(t.elementType)};if("object"===t.type)return{...t,properties:Object.fromEntries(Object.entries(t.properties).map(([t,{node:n,required:r}])=>[t,{node:e(n),required:r}])),...t.additionalProperties&&"object"==typeof t.additionalProperties?{additionalProperties:e(t.additionalProperties)}:{}};if("and"!==t.type&&"or"!==t.type)return n((0,r.simplifySingle)(t));if("and"===t.type){const r=function(e){const t=(0,c.splitTypes)(e);if(t.any.length>0){if(0===t.and.length&&0===t.or.length&&0===t.ref.length&&0===t.null.length&&0===t.string.length&&0===t.number.length&&0===t.integer.length&&0===t.boolean.length&&0===t.object.length&&0===t.array.length&&0===t.tuple.length)return[{type:"any",...(0,s.mergeAnnotations)(t.any.map(({node:e})=>e))}];t.any=[]}const n=e=>e.map(({node:e})=>e);t.boolean.length>1&&(t.boolean=[{node:(0,o.intersectConstEnum)([...t.boolean.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.boolean)}]);t.string.length>1&&(t.string=[{node:(0,o.intersectConstEnum)([...t.string.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.string)}]);t.number.length>0&&t.integer.length>0?(t.number=[{node:(0,o.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.integer),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.number)}],t.integer=[]):t.number.length>1?t.number=[{node:(0,o.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.number)}]:t.integer.length>1&&(t.integer=[{node:(0,o.intersectConstEnum)([...t.integer.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.integer)}]);t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,c.flattenSplitTypeValues)(t)}([].concat(...t.and.map(t=>{const n=e(t);return n.and?n.and:[n]})));return 1===r.length?n({...r[0],...(0,s.mergeAnnotations)([(0,s.extractAnnotations)(t),r[0]])}):n({type:"and",and:r,...(0,s.extractAnnotations)(t)})}if("or"===t.type){const o=function(e){const t=(0,c.splitTypes)(e);if(t.any.length>0){const e=(0,i.mergeConstEnumUnion)(t.any.map(({node:e})=>e));if(0===e.length)return[{type:"any",...(0,s.mergeAnnotations)(t.any.map(({node:e})=>e))}]}for(const[e,n]of Object.entries(t)){const o=e;if(!l.includes(o)||!n.length)continue;const a=n,_=a.map(({node:e})=>e),u=(0,i.mergeConstEnumUnion)(_);0===u.length?t[o]=[{node:{type:o,...(0,s.mergeAnnotations)(_)},order:(0,c.firstSplitTypeIndex)(a)}]:t[o]=[{node:(0,r.simplifySingle)({type:o,enum:u,...(0,s.mergeAnnotations)(_)}),order:(0,c.firstSplitTypeIndex)(a)}]}t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,c.flattenSplitTypeValues)(t)}([].concat(...t.or.map(t=>{const n=e(t);return n.or?n.or:[n]})));return 1===o.length?n({...o[0],...(0,s.mergeAnnotations)([(0,s.extractAnnotations)(t),o[0]])}):n({type:"or",or:o,...(0,s.extractAnnotations)(t)})}throw new a.MalformedTypeError("Invalid node",t)}},{"./annotation":8,"./error":9,"./simplifications/const-enum":11,"./simplifications/intersect-const-enum":12,"./simplifications/single":13,"./util":17}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.some=n.traverse=void 0;class r extends Error{}function i(e,t){function n(e,t,n,r,i,o){const a={node:void 0!==o?o:void 0===r?t[n]:t[n][r],path:[...e.path,n,...void 0===r?[]:[r]],parentNode:t,parentProperty:n,index:r,required:i};return Object.assign({},e,a)}!function e(t,r){r(t);const{node:i}=t;if("array"===i.type)e(n(t,i,"elementType"),r);else if("tuple"===i.type)i.elementTypes.forEach((o,a)=>e(n(t,i,"elementTypes",a),r)),"object"==typeof i.additionalItems&&e(n(t,i,"additionalItems"),r);else if("object"===i.type){for(const o of Object.keys(i.properties))e(n(t,i,"properties",o,i.properties[o].required,i.properties[o].node),r);"object"==typeof i.additionalProperties&&e(n(t,i,"additionalProperties"),r)}else"and"===i.type?i.and.forEach((o,a)=>e(n(t,i,"and",a),r)):"or"===i.type&&i.or.forEach((o,a)=>e(n(t,i,"or",a),r))}({node:e,rootNode:e,path:[]},t)}n.traverse=i,n.some=function(e,t){try{i(e,e=>{if(t(e))throw new r})}catch(e){if(e instanceof r)return!0;throw e}return!1}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeDocument=n.isNonNullable=n.copyName=n.firstSplitTypeIndex=n.flattenSplitTypeValues=n.splitTypes=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.constEnumTypes=n.isPrimitiveType=n.ensureArray=n.uniq=void 0,n.uniq=function(e){return e.filter((t,n)=>{for(let i=0;i["null","string","number","integer","boolean"].includes(e.type),n.constEnumTypes=new Set(["any","string","number","integer","boolean","object","array","tuple","ref"]);function r(e,t){if(typeof e!=typeof t)return!1;if(null===e!=(null===t))return!1;if(null===e)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((e,n)=>!r(e,t[n]));if(Array.isArray(e)!==Array.isArray(t))return!1;if("object"==typeof e){const n=Object.keys(e).sort();return!!r(n,Object.keys(t).sort())&&!n.some(n=>!r(e[n],t[n]))}return e===t}n.hasConstEnum=e=>n.constEnumTypes.has(e.type),n.isEqual=r,n.intersection=function(e,t){const n=[];return e.forEach(e=>{t.forEach(t=>{r(e,t)&&n.push(e)})}),n},n.union=function(e,t){const n=[...e];return t.forEach(t=>{!e.some(e=>r(t,e))&&n.push(t)}),n},n.splitTypes=function(e){const t={and:[],or:[],ref:[],any:[],null:[],string:[],number:[],integer:[],boolean:[],object:[],array:[],tuple:[]};return e.forEach((e,n)=>{if("and"!==e.type&&"or"!==e.type||"and"===e.type&&e.and.length>0||"or"===e.type&&e.or.length>0){const r={node:e,order:n};t[e.type].push(r)}}),t},n.flattenSplitTypeValues=function(e){return[].concat(Object.values(e).flat().sort((e,t)=>e.order-t.order).map(({node:e})=>e))},n.firstSplitTypeIndex=function(e){return Math.min(...e.map(({order:e})=>e))},n.copyName=function(e,t){return void 0===e.name?t:{...t,name:e.name}},n.isNonNullable=function(e){return null!=e},n.isNodeDocument=function(e){return Array.isArray(e.types)}},{}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=void 0;const r=e("./error"),i=e("./util");n.validate=function e(t){(0,i.hasConstEnum)(t)&&function(e){if(e.enum&&0===e.enum.length)throw new r.MalformedTypeError("Empty enum is not allowed",e);if(e.enum&&void 0!==e.const&&!e.enum.some(t=>(0,i.isEqual)(t,e.const)))throw new r.MalformedTypeError("Enum and const are both set, but enum doesn't contain const",e)}(t),"and"===t.type&&t.and.forEach(t=>e(t)),"or"===t.type&&t.or.forEach(t=>e(t))}},{"./error":9,"./util":17}],19:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./lib"),n),i(e("./lib/types"),n),i(e("./lib/utils"),n)},{"./lib":20,"./lib/types":23,"./lib/utils":24}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchema=n.jsonSchemaDocumentToOpenApi=n.decorateOpenApi=void 0;const r=e("./json-schema-to-openapi"),i=e("./openapi-to-json-schema");function o(e,{title:t,version:n,schemaVersion:r="3.0.0"}){const i={title:t,version:n};return e.$id&&(i["x-id"]=e.$id,delete e.$id),e.$comment&&(i["x-comment"]=e.$comment,delete e.$comment),delete e.$schema,{openapi:r,info:i,paths:{},...e}}n.decorateOpenApi=o,n.jsonSchemaDocumentToOpenApi=function(e,t){const{definitions:n={},...i}=e;return o({...i,components:{schemas:Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(0,r.jsonSchemaTypeToOpenApi)(t)]))}},t)},n.openApiToJsonSchema=function(e){const t=e.components.schemas;return{definitions:Object.fromEntries(Object.keys(t).map(e=>[e,(0,i.openApiToJsonSchemaType)(t[e])]))}}},{"./json-schema-to-openapi":21,"./openapi-to-json-schema":22}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsonSchemaTypeToOpenApi=void 0;const r=e("./utils");n.jsonSchemaTypeToOpenApi=function e(t){return"boolean"==typeof t?t:(t=function(e){if(void 0===e.type)return e;const{type:t,...n}=e,r=Array.isArray(t)?t.includes("null"):"null"===t,i=Array.isArray(t)?t.filter(e=>"null"!==e):"null"===t?void 0:t,o=(e,t)=>"any"!==t&&t?{...e,type:t}:e;void 0!==e.const&&(n.enum=[e.const],delete n.const);const a=e=>r?{...e,nullable:r}:e;return Array.isArray(i)?0===i.length?a(n):1===i.length?o(a(n),i[0]):{...a(n),anyOf:i.map(e=>o({},e))}:o(a(n),i)}(t),t=(n=t).$ref?{...n,$ref:(0,r.encodeRefNameOpenApi)((0,r.decodeRefNameJsonSchema)(n.$ref))}:n,(0,r.recurseSchema)(t,e));var n}},{"./utils":24}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchemaType=void 0;const r=e("./utils");n.openApiToJsonSchemaType=function e(t){if("boolean"==typeof t)return t;const{type:n,nullable:i,...o}=t,a=function(e,t){if(void 0!==e&&"any"!==e){if(Array.isArray(e)){if(e.includes("any"))return;return!e.includes("null")&&t&&e.push("null"),1===e.length?e[0]:e}return"null"!==e&&t?[e,"null"]:e}}(n,i);let s={...o,...a?{type:a}:{}};var c;return s=(c=s).$ref?{...c,$ref:(0,r.encodeRefNameJsonSchema)((0,r.decodeRefNameOpenApi)(c.$ref))}:c,(0,r.recurseSchema)(s,e)}},{"./utils":24}],23:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],24:[function(e,t,n){"use strict";function r(e){return encodeURIComponent(e)}function i(e){return decodeURIComponent(e)}function o(e){return e&&Object.keys(e).length>0}Object.defineProperty(n,"__esModule",{value:!0}),n.recurseSchema=n.decodeRefNameOpenApi=n.encodeRefNameOpenApi=n.decodeRefNameJsonSchema=n.encodeRefNameJsonSchema=n.decodePathPart=n.encodePathPart=void 0,n.encodePathPart=r,n.decodePathPart=i,n.encodeRefNameJsonSchema=function(e){return`#/definitions/${r(e)}`},n.decodeRefNameJsonSchema=function(e){return e.startsWith("#/definitions/")?i(e.slice(14)):i(e)},n.encodeRefNameOpenApi=function(e){return`#/components/schemas/${r(e)}`},n.decodeRefNameOpenApi=function(e){return e.startsWith("#/components/schemas/")?i(e.slice(21)):i(e)},n.recurseSchema=function(e,t){if("object"!=typeof e)return e;const n=e;return{...n,..."object"!=typeof n.items?{}:Array.isArray(n.items)?{items:n.items.map(e=>t(e))}:{items:t(n.items)},..."object"!=typeof n.additionalItems?{}:{additionalItems:t(n.additionalItems)},..."object"!=typeof n.contains?{}:{contains:t(n.contains)},...o(n.properties)?{properties:Object.fromEntries(Object.keys(n.properties).map(e=>{var r;return[e,t(null===(r=n.properties)||void 0===r?void 0:r[e])]}))}:{},...o(n.patternProperties)?{patternProperties:Object.fromEntries(Object.keys(n.patternProperties).map(e=>{var r;return[e,t(null===(r=n.patternProperties)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.additionalProperties?{}:{additionalProperties:t(n.additionalProperties)},...o(n.dependencies)?{dependencies:Object.fromEntries(Object.keys(n.dependencies).map(e=>{var r;return[e,t(null===(r=n.dependencies)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.propertyNames?{}:{propertyNames:t(n.propertyNames)},..."object"!=typeof n.if?{}:{if:t(n.if)},..."object"!=typeof n.then?{}:{then:t(n.then)},..."object"!=typeof n.else?{}:{else:t(n.else)},..."object"==typeof n.allOf&&n.allOf.length?{allOf:n.allOf.map(e=>t(e))}:{},..."object"==typeof n.anyOf&&n.anyOf.length?{anyOf:n.anyOf.map(e=>t(e))}:{},..."object"==typeof n.oneOf&&n.oneOf.length?{oneOf:n.oneOf.map(e=>t(e))}:{},..."object"!=typeof n.not?{}:{not:t(n.not)},...o(n.definitions)?{definitions:Object.fromEntries(Object.keys(n.definitions).map(e=>{var r;return[e,t(null===(r=n.definitions)||void 0===r?void 0:r[e])]}))}:{}}}},{}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.helpers=n.convertTypeScriptToCoreTypes=n.convertSingleCoreTypeToTypeScriptAst=n.convertCoreTypesToTypeScript=void 0;var r=e("./lib/core-types-to-ts");Object.defineProperty(n,"convertCoreTypesToTypeScript",{enumerable:!0,get:function(){return r.convertCoreTypesToTypeScript}}),Object.defineProperty(n,"convertSingleCoreTypeToTypeScriptAst",{enumerable:!0,get:function(){return r.convertSingleCoreTypeToTypeScriptAst}});var i=e("./lib/ts-to-core-types");Object.defineProperty(n,"convertTypeScriptToCoreTypes",{enumerable:!0,get:function(){return i.convertTypeScriptToCoreTypes}}),n.helpers=e("./lib/ts-helpers")},{"./lib/core-types-to-ts":26,"./lib/ts-helpers":28,"./lib/ts-to-core-types":29}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertSingleCoreTypeToTypeScriptAst=n.convertCoreTypesToTypeScript=void 0;const r=e("core-types"),i=e("typescript"),o=e("./ts-helpers"),{factory:a}=i;function s(e,t,n){throw new r.UnsupportedError(e,{loc:t.loc,...n})}function c(e,t={}){const{useUnknown:n=!1,declaration:r=!1,namespaces:i="ignore"}=t,s={useUnknown:n},{name:c,namespaces:_}=function(e,t){if(!t||"ignore"===t)return{name:e,namespaces:[]};const n=e.split("dot"===t?".":"underscore"===t?"_":/[._]/);return{name:n.pop(),namespaces:n}}(e.name,i),u=p(s,e),d="flow-type"===u.type?function(e,t,n){return a.createTypeAliasDeclaration(l(e),a.createIdentifier(t),void 0,n)}(r,c,u.node):function(e,t,n){return a.createInterfaceDeclaration(l(e),a.createIdentifier(t),void 0,void 0,n)}(r,c,u.properties);return{declaration:(f=d,(0,o.wrapAnnotations)(f,e)),namespaceList:_};var f}function l(e){return a.createModifiersFromModifierFlags(e?i.ModifierFlags.Export|i.ModifierFlags.Ambient:i.ModifierFlags.Export)}function _(e,t){return"and"===t.type||"or"===t.type?u(e,t):p(e,t).node}function u(e,t){return"and"===t.type?function(e,t){return a.createIntersectionTypeNode(t.and.map(t=>(0,o.wrapAnnotations)(_(e,t),t)))}(e,t):function(e,t){return a.createUnionTypeNode(t.or.map(t=>(0,o.wrapAnnotations)(_(e,t),t)))}(e,t)}function d(e){return e.useUnknown?(0,o.tsUnknownTypeAnnotation)():a.createKeywordTypeNode(i.SyntaxKind.AnyKeyword)}function p(e,t){if("and"===t.type||"or"===t.type)return{type:"flow-type",node:u(e,t)};if("null"===t.type)return{type:"flow-type",node:g(t)};const{const:n,enum:i}=t;return n?{type:"flow-type",node:h(e,t,n)}:i?{type:"flow-type",node:a.createUnionTypeNode(i.map(n=>h(e,t,n)))}:(0,r.isPrimitiveType)(t)?{type:"flow-type",node:g(t)}:"any"===t.type?{type:"flow-type",node:d(e)}:"ref"===t.type?{type:"flow-type",node:S(t)}:"object"===t.type?{type:"object",...v(e,t)}:"array"===t.type||"tuple"===t.type?{type:"flow-type",node:x(e,t)}:void s(`Type ${t.type} not supported`,t)}function f(){return a.createLiteralTypeNode(a.createToken(i.SyntaxKind.NullKeyword))}n.convertCoreTypesToTypeScript=function(e,t={}){const{version:n,types:i}=e;if(1!==n)throw new r.UnsupportedError(`core-types version ${n} not supported`);const a=[],s=i.map(e=>{const{name:n}=e,r=c(e,t);return a.push(n),r}).map(({declaration:e,namespaceList:t})=>((e,t)=>0===t.length?e:t.map(e=>`namespace ${e} {`).join(" ")+`\n${e}\n`+t.map(()=>"}").join(" "))((0,o.generateCode)(e),t)).join("\n\n");return{data:(0,o.createCodeHeader)({...t,createdByPackage:"core-types-ts",createdByUrl:"https://github.com/grantila/core-types-ts"})+s+(s.endsWith("\n")?"":"\n"),convertedTypes:a,notConvertedTypes:[]}},n.convertSingleCoreTypeToTypeScriptAst=c;const m={string:i.SyntaxKind.StringKeyword,number:i.SyntaxKind.NumberKeyword,integer:i.SyntaxKind.NumberKeyword,boolean:i.SyntaxKind.BooleanKeyword};function g(e){const{type:t}=e;return"null"===t?f():m[t]?a.createKeywordTypeNode(m[t]):void s(`Invalid primitive type: ${t}`,e)}function h(e,t,n){return"null"===n?f():"string"==typeof n?a.createStringLiteral(n):"number"==typeof n?a.createNumericLiteral(n):"boolean"==typeof n?n?a.createTrue():a.createFalse():"object"==typeof n?Array.isArray(n)?function(e,t,n){return a.createTupleTypeNode(n.map(n=>h(e,t,n)))}(e,t,n):v(e,n).node:void s(`Invalid const value: "${n}"`,t,{blob:n})}function y(e,t){return!0===t?y(e,{type:"any"}):a.createIndexSignature(void 0,[a.createParameterDeclaration(void 0,void 0,"key",void 0,p(e,{type:"string"}).node)],p(e,t).node)}function v(e,t){const{properties:n,additionalProperties:r=!1}=t,s=!1===r?[]:[y(e,r)],c=[...Object.keys(n).map(e=>({name:e,...n[e]})).map(({name:t,node:r,required:s})=>(0,o.wrapAnnotations)(a.createPropertySignature(void 0,(0,o.safeName)(t),(e=>e?void 0:a.createToken(i.SyntaxKind.QuestionToken))(s),p(e,r).node),n[t].node)),...s];return{properties:c,node:a.createTypeLiteralNode(c)}}function b(e,t){return a.createArrayTypeNode(a.createRestTypeNode(p(e,t).node))}function x(e,t){return"tuple"===t.type?a.createTupleTypeNode([...t.elementTypes.map(t=>p(e,t).node),...t.additionalItems?!0===t.additionalItems?[b(e,{type:"any"})]:[b(e,t.additionalItems)]:[]]):a.createArrayTypeNode(p(e,t.elementType).node)}function S(e){return a.createTypeReferenceNode(e.ref)}},{"./ts-helpers":28,"core-types":30,typescript:47}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateNode=void 0;const r=e("typescript"),i=e("core-types");function o(e){const t=(e,n)=>{if(!e)return[];if(r.isArrayTypeNode(e)&&e.parent&&r.isRestTypeNode(e.parent))return t(e.parent,e);if(r.isRestTypeNode(e))return t(e.parent,e);if(r.isOptionalTypeNode(e))return t(e.parent,e);if(r.isUnionTypeNode(e))return t(e.parent,e);if(r.isParenthesizedTypeNode(e))return t(e.parent,e);if(r.isTypeLiteralNode(e))return t(e.parent,e);if(r.isArrayTypeNode(e))return["[]",...t(e.parent,e)];if(r.isTupleTypeNode(e)){const r=e.elements.indexOf(n);return[...-1===r?[]:[`${r}`],...t(e.parent,e)]}const i=r.isTypeAliasDeclaration(e)||r.isInterfaceDeclaration(e)||r.isPropertySignature(e)?e.name.getText():"";return i?[i,...t(e.parent,e)]:(e=>e.parent&&(r.isArrayTypeNode(e.parent)||r.isTupleTypeNode(e.parent)||r.isOptionalTypeNode(e.parent)||r.isRestTypeNode(e.parent)||r.isUnionTypeNode(e.parent)))(e)?t(e.parent,e):[]},n=t(e,void 0);return n.length?{title:n.reverse().join(".")}:{}}function a(e){return void 0===e||"string"==typeof e?e:e.map(({text:e})=>e).join(" ")}function s(e){const t=[],n=[],r=[],i=[];return e.forEach(e=>{var o,s,c,l,_,u;if(e.comment)if("example"===e.tagName.text)n.push(null!==(s=null===(o=a(e.comment))||void 0===o?void 0:o.trim())&&void 0!==s?s:"");else if("default"===e.tagName.text)r.push(null!==(l=null===(c=a(e.comment))||void 0===c?void 0:c.trim())&&void 0!==l?l:"");else if("see"===e.tagName.text)i.push((e=>{var t,n,r;return null!==(r=(e.name?(null===(t=e.name)||void 0===t?void 0:t.getText())+" ":"")+(null===(n=a(e.comment))||void 0===n?void 0:n.trim()))&&void 0!==r?r:""})(e));else{const n=null!==(u=null===(_=a(e.comment))||void 0===_?void 0:_.trim())&&void 0!==u?u:"";t.push(`@${e.tagName.text} ${n}`)}}),{...0===t.length?{}:{description:t.join("\n")},...0===n.length?{}:{examples:n},...0===r.length?{}:{default:r.join("\n")},...0===i.length?{}:{see:i}}}n.decorateNode=function(e,t){var n;const{includeJsDoc:r=!0}=null!=t?t:{},{jsDoc:c}=e,l=o(e);if(r&&c&&c.length){const e=c[0];return(0,i.mergeAnnotations)([(_=a(e.comment),_?{description:_}:{}),l,s(null!==(n=e.tags)&&void 0!==n?n:[])])}var _;return l}},{"core-types":30,typescript:47}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createCodeHeader=n.isExportedDeclaration=n.toLocation=n.tsStripOptionalType=n.generateCode=n.makeGenericComment=n.wrapAnnotations=n.safeName=n.tsUnknownTypeAnnotation=void 0;const r=e("typescript"),i=e("core-types"),{factory:o}=r;function a(e,t=!1){const n=Array.isArray(e)?e:e.trim().split("\n");return 1===n.length&&""===n[0]?void 0:(r=`*\n${function(e){return e.map(e=>` * ${e}`).join("\n")}(n)}\n `,t?r:`/*${r}*/`);var r}n.tsUnknownTypeAnnotation=function(){return o.createToken(r.SyntaxKind.UnknownKeyword)},n.safeName=function(e){return e.match(/^[a-zA-Z$][a-zA-Z0-9_$]*$/)?o.createIdentifier(e):o.createStringLiteral(e)},n.wrapAnnotations=function(e,t,n=!0){const o=(0,i.stringifyAnnotations)(t,{formatWhitespace:n}).trim();return o?n?r.addSyntheticLeadingComment(e,r.SyntaxKind.MultiLineCommentTrivia,o.includes("\n")?`${o}\n `:`* ${o} `,!0):o.split("\n").reduce((e,t)=>r.addSyntheticLeadingComment(e,r.SyntaxKind.SingleLineCommentTrivia,` ${t}`,!0),e):e},n.makeGenericComment=a,n.generateCode=function(e){const t=r.createPrinter({newLine:r.NewLineKind.LineFeed}),n=r.createSourceFile("output.ts","",r.ScriptTarget.ES2017,!1,r.ScriptKind.TS);return t.printNode(r.EmitHint.Unspecified,e,n)},n.tsStripOptionalType=function(e){return r.isOptionalTypeNode(e)?e.type:e},n.toLocation=function(e){return{start:e.pos,...null==e?{}:{end:e.end}}},n.isExportedDeclaration=function(e){var t;return!!(null===(t=e.modifiers)||void 0===t?void 0:t.some(e=>e.kind===r.SyntaxKind.ExportKeyword))},n.createCodeHeader=function({filename:e,sourceFilename:t,userPackage:n,userPackageUrl:r,noDisableLintHeader:i=!1,noDescriptiveHeader:o=!1,createdByPackage:s,createdByUrl:c}){return i&&o?"":[i?"":"/* tslint:disable */\n/* eslint-disable */",o?"":(()=>{const i=r?` - {@link ${r}}`:"";return a([`${e?`The file ${e}`:"This file"} is generated${t?` from ${t}`:""} by ${s}${n?` on behalf of ${n}`:""}, DO NOT EDIT.`,"For more information, see:",` - {@link ${c}}`,...i?[i]:[]])})()].join("\n")+"\n\n"}},{"core-types":30,typescript:47}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertTypeScriptToCoreTypes=void 0;const r=e("typescript"),i=e("core-types"),o=e("./ts-helpers"),a=e("./ts-annotations"),s={type:"any"},c=e=>(t,n)=>{var r,o,a;const s=(null===(r=null==n?void 0:n.loc)||void 0===r?void 0:r.start)?[n.loc,e.slice((0,i.getPositionOffset)(null===(o=n.loc)||void 0===o?void 0:o.start),(0,i.getPositionOffset)(null===(a=n.loc)||void 0===a?void 0:a.end))]:[];console.warn(t,...s)};function l(e){var t,n;return!(!(null===(t=e.typeArguments)||void 0===t?void 0:t.length)&&!(null===(n=e.typeParameters)||void 0===n?void 0:n.length))}function _(e,t){return t.handleError(t.getUnsupportedError("Generic types are not supported",e))}function u(e,t){var n;if(l(e))return _(e,t);if(r.isTypeAliasDeclaration(e))return{name:e.name.getText(),...(0,a.decorateNode)(e),...null!==(n=f(e.type,t))&&void 0!==n?n:s};if(r.isInterfaceDeclaration(e))return{name:e.name.getText(),type:"object",...p(e,t),...(0,a.decorateNode)(e)};throw new Error("Internal error")}function d(e){var t;return(null===(t=e.questionToken)||void 0===t?void 0:t.kind)===r.SyntaxKind.QuestionToken}function p(e,t){const n={properties:{},additionalProperties:!1};return e.members.forEach(e=>{var i,c,l;if(r.isPropertySignature(e)&&e.type){const r=e.name.getText();n.properties[r]={required:!d(e),node:{...null!==(i=f(e.type,t))&&void 0!==i?i:s,...(0,a.decorateNode)(e)}}}else if(r.isIndexSignatureDeclaration(e)){const i=e.parameters[0];if((null===(c=i.type)||void 0===c?void 0:c.kind)!==r.SyntaxKind.StringKeyword)return void t.options.warn("Will not convert non-string index signature",{blob:i,loc:(0,o.toLocation)(i)});n.additionalProperties=null!==(l=f(e.type,t))&&void 0!==l?l:s}}),n}function f(e,t,n){var c,d,g,h;const{peekOnly:y=!1}=null!=n?n:{};if(r.isUnionTypeNode(e))return{type:"or",or:e.types.map(e=>f(e,t)).filter(i.isNonNullable),...(0,a.decorateNode)(e)};if(r.isIntersectionTypeNode(e))return{type:"and",and:e.types.map(e=>f(e,t)).filter(i.isNonNullable),...(0,a.decorateNode)(e)};if(r.isParenthesizedTypeNode(e)){const n=[...e.getChildren()];return(null===(c=n[0])||void 0===c?void 0:c.kind)===r.SyntaxKind.OpenParenToken&&n.shift(),(null===(d=n[n.length-1])||void 0===d?void 0:d.kind)===r.SyntaxKind.CloseParenToken&&n.pop(),1===n.length&&r.isTypeNode(n[0])?f(n[0],t):t.handleError(t.getUnsupportedError("Parenthesis type not understood",e))}if(e.kind===r.SyntaxKind.AnyKeyword)return{type:"any",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.UnknownKeyword)return{type:"any",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.StringKeyword)return{type:"string",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.NumberKeyword)return{type:"number",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.BooleanKeyword)return{type:"boolean",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.ObjectKeyword)return{type:"object",properties:{},additionalProperties:!0,...(0,a.decorateNode)(e)};if(r.isArrayTypeNode(e))return{type:"array",elementType:null!==(g=f(e.elementType,t))&&void 0!==g?g:s,...(0,a.decorateNode)(e)};if(r.isTypeReferenceNode(e)){if(e.typeName.kind===r.SyntaxKind.QualifiedName)return t.handleError(t.getUnsupportedError("Qualified reference names not supported",e));if("Array"===e.typeName.text){const n=e.typeArguments;return{type:"array",elementType:n&&null!==(h=f(n[0],t))&&void 0!==h?h:s,...(0,a.decorateNode)(e)}}const n=e.typeName.text,c=n=>{if(t.cyclicState.has(n))throw new i.MalformedTypeError(`Cyclic type found when trying to inline type ${n}`,{blob:e,loc:(0,o.toLocation)(e)});t.cyclicState.add(n)},d=e=>{if(r.isLiteralTypeNode(e)&&r.isStringLiteral(e.literal))return[e.literal.text];if(!r.isUnionTypeNode(e))return t.handleError(t.getUnsupportedError("Expected string union kind",e));const n=e.types.map(e=>r.isLiteralTypeNode(e)&&r.isStringLiteral(e.literal)?e.literal.text:void 0);return n.some(e=>void 0===e)?t.handleError(t.getUnsupportedError("Expected string union kind",e)):n},m=()=>{var i;const o=null!==(i=e.typeArguments)&&void 0!==i?i:[],a=o[0],s=o[1],l=void 0===s?void 0:d(s);if(void 0===a)return t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e));const _=f(a,t,{peekOnly:!0});if(void 0===_)return t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e));if("ref"===_.type){const i=a.getText(),o=t.typeMap.get(i);if(!o||!r.isTypeLiteralNode(o.declaration)&&!r.isInterfaceDeclaration(o.declaration))return t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e));c(i);return{members:p(o.declaration,t),secondNames:l}}return"object"===_.type?{members:_,secondNames:l}:t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e))};if("Omit"===n){const t=m();if(!t)return;const{members:n,secondNames:r}=t;if(void 0===r)return;return{type:"object",...{...n,properties:Object.fromEntries(Object.entries(n.properties).filter(([e])=>!r.includes(e)))},...(0,a.decorateNode)(e,{includeJsDoc:!1})}}if("Pick"===n){const t=m();if(!t)return;const{members:n,secondNames:r}=t;if(void 0===r)return;return{type:"object",...{...n,properties:Object.fromEntries(Object.entries(n.properties).filter(([e])=>r.includes(e)))},...(0,a.decorateNode)(e,{includeJsDoc:!1})}}if("Partial"===n){const t=m();if(!t)return;const{members:n}=t;return{type:"object",...{...n,properties:Object.fromEntries(Object.entries(n.properties).map(([e,t])=>[e,{...t,required:!1}]))},...(0,a.decorateNode)(e,{includeJsDoc:!1})}}if(l(e))return _(e,t);const g=t.typeMap.get(n);if(g&&!g.exported&&!y)if("include-if-referenced"===t.options.nonExported)t.includeExtra.add(n);else if("inline"===t.options.nonExported)return c(n),u(g.declaration,t);return{type:"ref",ref:n,...(0,a.decorateNode)(e)}}return r.isTupleTypeNode(e)?{type:"tuple",...m(e,t),...(0,a.decorateNode)(e)}:r.isLiteralTypeNode(e)?r.isNumericLiteral(e.literal)?{type:"number",const:Number(e.literal.text),...(0,a.decorateNode)(e)}:r.isStringLiteral(e.literal)?{type:"string",const:e.literal.text,...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.TrueKeyword?{type:"boolean",const:!0,...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.FalseKeyword?{type:"boolean",const:!1,...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.NullKeyword?{type:"null",...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.PrefixUnaryExpression?"operand"in e.literal&&e.literal.operator===r.SyntaxKind.MinusToken?{type:"number",const:-Number(e.literal.operand.getText()),...(0,a.decorateNode)(e)}:t.handleError(t.getUnsupportedError("Prefix unary expressions is only supported for MinusToken",e.literal)):t.handleError(t.getUnsupportedError("Literal type not understood",e.literal)):r.isTypeLiteralNode(e)?{type:"object",...p(e,t),...(0,a.decorateNode)(e)}:t.handleError(t.getUnsupportedError(`Unimplemented type (kind=${e.kind})`,e))}function m(e,t){var n;if(0===e.elements.length)return{elementTypes:[],additionalItems:!1,minItems:0};const i=r.isRestTypeNode(e.elements[e.elements.length-1]),[a,c]=i?[e.elements.slice(0,e.elements.length-1),e.elements[e.elements.length-1]]:[[...e.elements],void 0],l=a.map(e=>{var n;return null!==(n=f((0,o.tsStripOptionalType)(e),t))&&void 0!==n?n:s}),_=!!c&&(null!==(n=f(c.type.elementType,t))&&void 0!==n?n:s),u=a.findIndex(e=>r.isOptionalTypeNode(e)),d=-1===u?a.length:u;return{elementTypes:l,..._&&"any"===_.type?{additionalItems:!0}:{additionalItems:_},minItems:d}}n.convertTypeScriptToCoreTypes=function(e,t){const{warn:n=c(e),namespaces:a="ignore",nonExported:s="include-if-referenced",unsupported:l="ignore"}=null!=t?t:{},_=new Set,d=r.createSourceFile("filename.ts",e,r.ScriptTarget.Latest,!0),p=e=>r.isTypeAliasDeclaration(e)||r.isInterfaceDeclaration(e),f=(e,t)=>[...t.filter(e=>r.isModuleDeclaration(e)).flatMap(t=>t.body.kind!==r.SyntaxKind.ModuleBlock?[]:f([...e,t.name.getText()],t.body.statements)),...t.filter(p).map(t=>{if(!(e.length>0&&"ignore"===a))return{namespaceParents:e,declaration:t}}).filter(e=>!!e)],m=e=>{const{declaration:t,namespaceParents:n}=e,r=[...n,t.name.getText()].join(".");_.add(r)},g=({declaration:e,namespaceParents:t})=>{const n=e.name.getText(),i="hoist"===a||"ignore"===a?n:[...t,n].join("join-dot"===a?".":"_"),o=r.factory.createIdentifier(i);return o.getText=e=>i,e.name=o,e},h=(e=>("hoist"===a?(e=>{const t=new Map;return e.forEach(e=>{const{declaration:n,namespaceParents:r}=e,i=n.name.getText(),o=t.get(i);o?o.namespaceParents.length>r.length?(t.set(i,e),m(o)):m(e):t.set(i,e)}),[...t.values()]})(e):e).map(g))(f([],d.statements)),y={options:{warn:n,namespaces:a,nonExported:s,unsupported:l},typeMap:new Map(h.map(e=>[e.name.getText(),{declaration:e,exported:(0,o.isExportedDeclaration)(e)}])),includeExtra:new Set,cyclicState:new Set,getUnsupportedError(t,n){const r=(0,i.locationToLineColumn)(e,(0,o.toLocation)(n));return new i.UnsupportedError(t,{blob:n,loc:r,source:e})},handleError(e){if("warn"===y.options.unsupported)y.options.warn(e.message,e);else if("error"===y.options.unsupported)throw e}};"fail"===y.options.nonExported&&h.filter(e=>!(0,o.isExportedDeclaration)(e)).forEach(e=>{throw new i.MalformedTypeError("Found non-exported type when 'nonExported' is 'fail'",{blob:e,path:[e.name.getText()],loc:(0,o.toLocation)(e)})});const v=e=>{y.cyclicState=new Set;const t=u(e,y);return t||_.add(e.name.getText()),t},b=h.filter(e=>"include"===y.options.nonExported||(0,o.isExportedDeclaration)(e)).map(e=>v(e)).filter(e=>!!e);return b.push(...[...y.includeExtra.values()].map(e=>{const t=y.typeMap.get(e);if(!t)throw new Error("Internal error on exporting non-exported type");return v(t.declaration)}).filter(e=>!!e)),{data:{version:1,types:b},convertedTypes:b.map(({name:e})=>e),notConvertedTypes:[..._]}}},{"./ts-annotations":27,"./ts-helpers":28,"core-types":30,typescript:47}],30:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.some=n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.formatSee=n.formatDefault=n.formatExamples=n.stringify=n.stripAnnotations=n.stringifyAnnotations=n.extractAnnotations=n.mergeAnnotations=n.isNonNullable=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.isPrimitiveType=n.ensureArray=n.validate=n.simplify=void 0,i(e("./lib/types"),n);var o=e("./lib/simplify");Object.defineProperty(n,"simplify",{enumerable:!0,get:function(){return o.simplify}});var a=e("./lib/validate");Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return a.validate}});var s=e("./lib/util");Object.defineProperty(n,"ensureArray",{enumerable:!0,get:function(){return s.ensureArray}}),Object.defineProperty(n,"isPrimitiveType",{enumerable:!0,get:function(){return s.isPrimitiveType}}),Object.defineProperty(n,"hasConstEnum",{enumerable:!0,get:function(){return s.hasConstEnum}}),Object.defineProperty(n,"isEqual",{enumerable:!0,get:function(){return s.isEqual}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return s.intersection}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"isNonNullable",{enumerable:!0,get:function(){return s.isNonNullable}});var c=e("./lib/annotation");Object.defineProperty(n,"mergeAnnotations",{enumerable:!0,get:function(){return c.mergeAnnotations}}),Object.defineProperty(n,"extractAnnotations",{enumerable:!0,get:function(){return c.extractAnnotations}}),Object.defineProperty(n,"stringifyAnnotations",{enumerable:!0,get:function(){return c.stringifyAnnotations}}),Object.defineProperty(n,"stripAnnotations",{enumerable:!0,get:function(){return c.stripAnnotations}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(n,"formatExamples",{enumerable:!0,get:function(){return c.formatExamples}}),Object.defineProperty(n,"formatDefault",{enumerable:!0,get:function(){return c.formatDefault}}),Object.defineProperty(n,"formatSee",{enumerable:!0,get:function(){return c.formatSee}});var l=e("./lib/error");Object.defineProperty(n,"MalformedTypeError",{enumerable:!0,get:function(){return l.MalformedTypeError}}),Object.defineProperty(n,"MissingReferenceError",{enumerable:!0,get:function(){return l.MissingReferenceError}}),Object.defineProperty(n,"UnsupportedError",{enumerable:!0,get:function(){return l.UnsupportedError}}),Object.defineProperty(n,"RelatedError",{enumerable:!0,get:function(){return l.RelatedError}}),Object.defineProperty(n,"throwUnsupportedError",{enumerable:!0,get:function(){return l.throwUnsupportedError}}),Object.defineProperty(n,"throwRelatedError",{enumerable:!0,get:function(){return l.throwRelatedError}}),Object.defineProperty(n,"isCoreTypesError",{enumerable:!0,get:function(){return l.isCoreTypesError}}),Object.defineProperty(n,"decorateErrorMeta",{enumerable:!0,get:function(){return l.decorateErrorMeta}}),Object.defineProperty(n,"decorateError",{enumerable:!0,get:function(){return l.decorateError}});var _=e("./lib/location");Object.defineProperty(n,"positionToLineColumn",{enumerable:!0,get:function(){return _.positionToLineColumn}}),Object.defineProperty(n,"locationToLineColumn",{enumerable:!0,get:function(){return _.locationToLineColumn}}),Object.defineProperty(n,"getPositionOffset",{enumerable:!0,get:function(){return _.getPositionOffset}}),Object.defineProperty(n,"mergeLocations",{enumerable:!0,get:function(){return _.mergeLocations}});var u=e("./lib/traverse");Object.defineProperty(n,"some",{enumerable:!0,get:function(){return u.some}}),Object.defineProperty(n,"traverse",{enumerable:!0,get:function(){return u.traverse}})},{"./lib/annotation":31,"./lib/error":32,"./lib/location":33,"./lib/simplify":37,"./lib/traverse":38,"./lib/types":39,"./lib/util":40,"./lib/validate":41}],31:[function(e,t,n){arguments[4][8][0].apply(n,arguments)},{"./location":33,"./util":40,dup:8}],32:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{dup:9}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=void 0;const r=e("./util");function i(e,t){const n=e.slice(0,t).split("\n").length,r=e.lastIndexOf("\n",t);return-1===r?{offset:t,line:n,column:t}:{offset:t,line:n,column:t-r}}n.positionToLineColumn=i,n.locationToLineColumn=function(e,t){return"object"==typeof t.start?t:{start:void 0===t.start?void 0:i(e,t.start),...null==t.end?{}:{end:i(e,t.end)}}},n.getPositionOffset=function(e){return void 0===e||"number"==typeof e?e:e.offset},n.mergeLocations=function(e){var t;let n,i;const o=e=>"number"==typeof e?e:null==e?void 0:e.offset;e.filter(r.isNonNullable).forEach(({start:e,end:t})=>{const r=o(e),a=o(t);void 0!==r&&(!n||"number"==typeof n.location&&n.location===r||n.offset>r)&&(n={location:e,offset:r}),void 0!==a&&(!i||"number"==typeof i.location&&i.location===r||i.offset=1){var i=n;return 55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(i-56320)+65536:i}return n}function c(a,s,c){var l=[a].concat(s).concat([c]),_=l[l.length-2],u=c,d=l.lastIndexOf(14);if(d>1&&l.slice(1,d).every(function(t){return t==e})&&-1==[e,r,o].indexOf(a))return 2;var p=l.lastIndexOf(t);if(p>0&&l.slice(1,p).every(function(e){return e==t})&&-1==[n,t].indexOf(_))return l.filter(function(e){return e==t}).length%2==1?3:4;if(0==_&&1==u)return 0;if(2==_||0==_||1==_)return 14==u&&s.every(function(t){return t==e})?2:1;if(2==u||0==u||1==u)return 1;if(6==_&&(6==u||7==u||9==u||10==u))return 0;if(!(9!=_&&7!=_||7!=u&&8!=u))return 0;if((10==_||8==_)&&8==u)return 0;if(u==e||15==u)return 0;if(5==u)return 0;if(_==n)return 0;var f=-1!=l.indexOf(e)?l.lastIndexOf(e)-1:l.length-2;return-1!=[r,o].indexOf(l[f])&&l.slice(f+1,-1).every(function(t){return t==e})&&14==u||15==_&&-1!=[i,o].indexOf(u)?0:-1!=s.indexOf(t)?2:_==t&&u==t?0:1}function l(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?n:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?r:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?i:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var n=l(s(e,t)),r=[],i=t+1;i=i)return t.substr(0,i);for(;i>t.length&&r>1;)1&r&&(t+=n),r>>=1,n+=n;return t=(t+=n).substr(0,i)}var i=function(e,t,n){if(null==e||null==t)return e;var r=String(e),i="number"==typeof t?t:parseInt(t,10);if(isNaN(i)||!isFinite(i))return r;var o=r.length;if(o>=i)return r;var a=null==n?"":String(n);""===a&&(a=" ");for(var s=i-o;a.lengths?a.substr(0,s):a)+r},o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},u=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},d=0,p=1,f=2,m=3,g=4,h=5,y=6,v=7,b=8,x=9,S=10,k={"{":d,"}":p,"[":f,"]":m,":":g,",":h},T={true:b,false:x,null:S},C=0,w=1,N=2,D={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},P=0,E=1,F=2,A=3,I=4,O=5,j=6,L=7;function M(e){return e>="1"&&e<="9"}function R(e){return e>="0"&&e<="9"}function B(e){return R(e)||e>="a"&&e<="f"||e>="A"&&e<="F"}function J(e){return"e"===e||"E"===e}function z(e,t,n,r){var i=e.charAt(t);if("\r"===i)t++,n++,r=1,"\n"===e.charAt(t)&&t++;else if("\n"===i)t++,n++,r=1;else{if("\t"!==i&&" "!==i)return null;t++,r++}return{index:t,line:n,column:r}}function q(e,t,n,r){var i=e.charAt(t);return i in k?{type:k[i],line:n,column:r+1,index:t+1,value:null}:null}function U(e,t,n,r){for(var i in T)if(T.hasOwnProperty(i)&&e.substr(t,i.length)===i)return{type:T[i],line:n,column:r+i.length,index:t+i.length,value:i};return null}function V(e,t,n,r){for(var i=t,o=C;t0?{type:v,line:n,column:r+o-i,index:o,value:e.slice(i,o)}:null}var $=0,H=1,K=2,G=3,X=0,Q=1,Y=2,Z=0,ee=1,te=2,ne=3,re={loc:!0,source:null};function ie(e,t,n){var r=t.length>0?t[t.length-1].loc.end:{line:1,column:1};c(l(),e,n.source,r.line,r.column)}function oe(e){for(var t=0,n=0;n<4;n++)t=16*t+parseInt(e[n],16);return String.fromCharCode(t)}var ae={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},se=['"',"\\","/"];function ce(e){for(var t="",n=0;ne),o=e=>`${(e=>"."+i.slice(0,e).join("."))(e)} [query: ${i.join(".")}]`,{loc:a}=i.reduce((e,t,r)=>"Object"===e.type?(()=>{const a=e.children.find(e=>e.key.value===t);if(!a)throw new Error(`No such property ${t} in ${o(r)}`);const{key:s,value:c}=a;return n&&r===i.length-1?s:c})():"Array"===e.type?(()=>{const n=Number(t);if(isNaN(n))throw new Error(`Invalid non-numeric array index "${t}" in array at ${o(r)}`);if(n<0||n>=e.children.length)throw new RangeError(`Index ${n} out-of-bounds in array of size ${e.children.length} at ${o(r)}`);return e.children,e.children[Number(t)]})():e,r);return{start:null==a?void 0:a.start,end:null==a?void 0:a.end}}},{}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAstByObject=n.getAstByString=void 0;const r=e("json-to-ast");function i(e,t){const n=r(e,{loc:!0});return{json:t||JSON.parse(e),jsonString:e,jsonAST:n}}n.getAstByString=i,n.getAstByObject=function(e,t=4){return i(JSON.stringify(e,null,t))}},{"json-to-ast":42}],46:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,_=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?_=l.concat(_):d=-1,_.length&&f())}function f(){if(!u){var e=c(p);u=!0;for(var t=_.length;t;){for(l=_,_=[];++d1)for(var n=1;n(0,r.ensureArray)(t).map(e=>`@see ${e}`).join("\n");if(e&&(null==t?void 0:t.length))return e+"\n\n"+n();return e||n()}(e.description,e.see):void 0;return{...t,...e.title?{title:e.title}:{},...n?{description:n}:{},...e.default?{default:e.default}:{},...e.examples?{examples:e.examples}:{},...e.comment?{$comment:e.comment}:{}}},n.annotateCoreTypes=function(e,t){var n;const{description:i,see:o}=function(e){const t=(null!=e?e:"").split("\n"),n=[];for(;t.length>0&&t[t.length-1].startsWith("@see ");)n.push(t.pop().slice(5));for(;t.length>0&&!t[t.length-1].trim();)t.pop();return{description:t.join("\n"),see:n}}(null!==(n=t.description)&&void 0!==n?n:"");return{...{...t.title?{title:t.title}:{},...t.default?{default:(0,r.stringify)(t.default)}:{},...t.examples?{examples:(0,r.stringify)(t.examples)}:{},...t.$comment?{comment:t.$comment}:{},...i?{description:i}:{},...o&&o.length>0?{see:o}:{}},...e}}},{"core-types":7}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertCoreTypesToJsonSchema=n.decorateSchema=void 0;const r=e("openapi-json-schema"),i=e("core-types"),o=e("./annotations");function a(e,{filename:t,sourceFilename:n,userPackage:r,userPackageUrl:i},o="core-types-json-schema",a="https://github.com/grantila/core-types-json-schema"){var s,c;void 0!==t&&(null!==(s=e.$id)&&void 0!==s||(e.$id=t));const l=r||i?r&&i?`${r} (${i})`:r||i:"",_=n?` from ${n}`:"";null!==(c=e.$comment)&&void 0!==c||(e.$comment=`Generated${_} by ${o} (${a})`+(l?` on behalf of ${l}`:""))}function s(e){const t=e.or.map(e=>c(e)),n=(0,o.annotateJsonSchema)(e,{anyOf:t});return t.length>1&&!t.some(e=>!function(e){const t=Object.keys(e).sort();return 1===t.length&&"type"===t[0]||2===t.length&&"title"===t[0]&&"type"===t[1]}(e))&&(delete n.anyOf,n.type=t.map(({type:e})=>e)),n}function c(e){if("any"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{}));if("null"===e.type)return(0,o.annotateJsonSchema)(e,{type:"null"});if("boolean"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"boolean"}));if("string"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"string"}));if("number"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"number"}));if("integer"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"integer"}));if("and"===e.type)return(0,o.annotateJsonSchema)(e,{allOf:e.and.map(e=>c(e))});if("or"===e.type)return s(e);if("object"===e.type){const t=Object.keys(e.properties),n=t.filter(t=>e.properties[t].required),r=Object.fromEntries(t.map(t=>[t,c(e.properties[t].node)]));return(0,o.annotateJsonSchema)(e,l(e,{type:"object",...t.length>0?{properties:r}:{},...n.length>0?{required:n}:{},...!0===e.additionalProperties?{}:e.additionalProperties?{additionalProperties:c(e.additionalProperties)}:{additionalProperties:!1}}))}if("array"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"array",items:c(e.elementType)}));if("tuple"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{type:"array",items:e.elementTypes.map(e=>c(e)),...!0===e.additionalItems?{}:e.additionalItems?{additionalItems:c(e.additionalItems)}:{additionalItems:!1},minItems:e.minItems}));if("ref"===e.type)return(0,o.annotateJsonSchema)(e,l(e,{$ref:(0,r.encodeRefNameJsonSchema)(e.ref)}));throw new i.UnsupportedError(`core-types node of type ${e.type} not supported`,e)}function l(e,t){return void 0!==e.const?{...t,const:e.const}:e.enum?{...t,enum:e.enum}:t}n.decorateSchema=a,n.convertCoreTypesToJsonSchema=function(e,t){const{version:n,types:r}=e;if(1!==n)throw new i.UnsupportedError(`core-types version ${n} not supported`);const o={definitions:Object.fromEntries(r.map(e=>[e.name,c(e)]))};return a(o,null!=t?t:{}),{data:o,convertedTypes:r.map(({name:e})=>e),notConvertedTypes:[]}}},{"./annotations":3,"core-types":7,"openapi-json-schema":19}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.complexProps=n.convertJsonSchemaToCoreTypes=void 0;const r=e("jsonpos"),i=e("openapi-json-schema"),o=e("core-types"),a=e("./annotations"),s=(e,t)=>({...e,path:[...e.path,t]});function c(e,t){if("boolean"==typeof e)t.throwUnsupportedError("Boolean JSON Schema definition not supported",{blob:{schema:e}});else if(function(e){return"object"==typeof e&&Object.keys(e).some(e=>n.complexProps.has(e))}(e))return function(e,t){const{then:n,else:r,allOf:i,anyOf:o,oneOf:a}=e,l=[...n?[[s(t,"then"),n]]:[],...r?[[s(t,"else"),r]]:[]],_=[...o?o.map((e,n)=>[s(s(t,"anyOf"),n),e]):[],...a?a.map((e,n)=>[s(s(t,"oneOf"),n),e]):[]],u=[...i?i.map((e,n)=>[s(s(t,"allOf"),n),e]):[]];return{type:"and",and:[{type:"or",or:l.map(([e,t])=>c(t,e))},{type:"or",or:_.map(([e,t])=>c(t,e))},{type:"and",and:u.map(([e,t])=>c(t,e))}]}}(function(e,t){const{$ref:n,type:r,enum:i,const:a,items:s,additionalItems:c,required:l,properties:_,additionalProperties:u,then:d,else:p,allOf:f,anyOf:m,oneOf:g}=e,h=f&&"object"==typeof f?f.filter(e=>e&&"object"==typeof e):null,y=m&&"object"==typeof m?m.filter(e=>e&&"object"==typeof e):null,v=g&&"object"==typeof g?g.filter(e=>e&&"object"==typeof e):null,b=(d,p)=>{var f,m,g,h,y;const v=(e,t)=>!(e&&t&&!(0,o.isEqual)(e,t));if(v(n,p.$ref)||t.throwUnsupportedError(`Cannot have $ref in a node *and* in its '${d}'`,{blob:e}),v(r,p.type)||t.throwUnsupportedError(`Cannot have 'type' in a node *and* in its '${d}'`,{blob:e}),i)if(p.enum){const e=(0,o.intersection)(i,p.enum);if(0===e.length)throw new o.MalformedTypeError("Cannot merge types with non-intersecting enums",{path:t.path,blob:{child:[...t.path,d]}});p.enum=e}else p.enum=i;if(void 0!==a)if(void 0!==p.const){if((0,o.isEqual)(a,p.const))throw new o.MalformedTypeError("Cannot merge types with mismatching const",{path:t.path,blob:{child:[...t.path,d]}})}else p.const=a;if(p.items=null!==(f=p.items)&&void 0!==f?f:s,p.additionalItems=null!==(m=p.additionalItems)&&void 0!==m?m:c,void 0===l&&void 0===p.required||(p.required=(0,o.union)(null!==(g=p.required)&&void 0!==g?g:[],null!=l?l:[])),void 0===_!=(void 0===p.properties))null!==(h=p.properties)&&void 0!==h||(p.properties=_);else if(void 0!==_){const e=_,t=p.properties,n=Object.keys(e),r=Object.keys(t),i=(0,o.union)(n,r),a={};i.forEach(n=>{void 0!==e[n]?a[n]=t[n]:void 0!==t[n]?a[n]=e[n]:a[n]={allOf:[e[n],t[n]]}})}void 0===u!=(void 0===p.additionalProperties)?null!==(y=p.additionalProperties)&&void 0!==y||(p.additionalProperties=u):void 0!==u&&(p.additionalProperties={allOf:[p.additionalProperties,u]})};return d&&"object"==typeof d&&b("then",d),p&&"object"==typeof p&&b("else",p),h&&"object"==typeof h&&h.forEach(e=>b("allOf",e)),y&&"object"==typeof y&&y.forEach(e=>b("anyOf",e)),v&&"object"==typeof v&&v.forEach(e=>b("oneOf",e)),{...d&&"object"==typeof d?{then:d}:{},...p&&"object"==typeof p?{else:p}:{},...h&&"object"==typeof h?{allOf:h}:{},...y&&"object"==typeof y?{anyOf:y}:{},...v&&"object"==typeof v?{oneOf:v}:{}}}(e,t),t);void 0===e&&t.throwUnsupportedError("Internal error",{blob:{schema:e}});const r=e=>({type:"ref",ref:(0,i.decodeRefNameJsonSchema)(e)}),_=t=>void 0===e.$ref?t:{type:"and",and:[t,r(e.$ref)]},{const:u,enum:d}=e,p={...void 0!==u?{const:u}:{},...void 0!==d?{enum:d}:{}};if(void 0===e.type)return e.$ref?{...r(e.$ref),...p}:{type:"any",...p};const f=(0,o.ensureArray)(e.type).map(n=>function(e,t,n,r){var i,o,_,u;if(l(t))return"null"===t?(0,a.annotateCoreTypes)({type:"null"},e):(0,a.annotateCoreTypes)({type:t,...n},e);if("array"===t)return Array.isArray(e.items)?(0,a.annotateCoreTypes)({type:"tuple",elementTypes:e.items.map(e=>c(e,s(r,"items"))),additionalItems:void 0===e.additionalItems||("boolean"==typeof e.additionalItems?e.additionalItems:c(e.additionalItems,s(r,"additionalItems"))),minItems:null!==(i=e.minItems)&&void 0!==i?i:0,...n},e):!1===e.items?(0,a.annotateCoreTypes)({type:"tuple",elementTypes:[],additionalItems:!1,minItems:0,...n},e):(0,a.annotateCoreTypes)({type:"array",elementType:void 0===e.items||!0===e.items?{type:"any"}:c(e.items,s(r,"items")),...n},e);if("object"===t){const t=new Set(null!==(o=e.required)&&void 0!==o?o:[]),i=null!==(_=e.additionalProperties)&&void 0!==_?_:r.defaultAdditionalProperties;return(0,a.annotateCoreTypes)({type:"object",properties:Object.fromEntries(Object.entries(null!==(u=e.properties)&&void 0!==u?u:{}).map(([e,n])=>[e,{node:c(n,s(s(r,"properties"),e)),required:t.has(e)}])),additionalProperties:"boolean"==typeof i?i:c(i,s(r,"additionalProperties")),...n},e)}r.throwUnsupportedError(`Unsupported JSON Schema type "${t}"`,{blob:{schema:e}})}(e,n,p,t));return 1===f.length?_(f[0]):_({type:"or",or:f})}n.convertJsonSchemaToCoreTypes=function(e,t={}){const n="string"==typeof e?(0,r.getAstByString)(e):(0,r.getAstByObject)(e),{json:i}=n,{definitions:a}=i,s={version:1,types:Object.keys(null!=a?a:{}).map(e=>{var i;return{...c((null!=a?a:{})[e],{locByPath(){return{path:this.path,loc:(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})}},path:["definitions",e],throwUnsupportedError(e,t){throw(t={...t}).path||(t.path=this.path),t.loc||(t.loc=(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})),new o.UnsupportedError(e,t)},defaultAdditionalProperties:null===(i=t.defaultAdditionalProperties)||void 0===i||i}),name:e}})};return{data:s,convertedTypes:s.types.map(({name:e})=>e),notConvertedTypes:[]}},n.complexProps=new Set(["anyOf","allOf","oneOf","then","else"]);const l=e=>["string","number","integer","boolean","null"].includes(e)},{"./annotations":3,"core-types":7,jsonpos:43,"openapi-json-schema":19}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertOpenApiToCoreTypes=n.convertCoreTypesToOpenApi=void 0;const r=e("openapi-json-schema"),i=e("./core-types-to-json-schema"),o=e("./json-schema-to-core-types");n.convertCoreTypesToOpenApi=function(e,t){const{data:n,...o}=(0,i.convertCoreTypesToJsonSchema)(e,t);return{...o,data:(0,r.jsonSchemaDocumentToOpenApi)(n,t)}},n.convertOpenApiToCoreTypes=function(e){e="string"==typeof e?JSON.parse(e):e;const t=(0,r.openApiToJsonSchema)(e);return(0,o.convertJsonSchemaToCoreTypes)(t)}},{"./core-types-to-json-schema":4,"./json-schema-to-core-types":5,"openapi-json-schema":19}],7:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.some=n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.formatSee=n.formatDefault=n.formatExamples=n.stringify=n.stripAnnotations=n.stringifyAnnotations=n.extractAnnotations=n.mergeAnnotations=n.isNonNullable=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.isPrimitiveType=n.ensureArray=n.validate=n.simplify=void 0,i(e("./lib/types"),n);var o=e("./lib/simplify");Object.defineProperty(n,"simplify",{enumerable:!0,get:function(){return o.simplify}});var a=e("./lib/validate");Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return a.validate}});var s=e("./lib/util");Object.defineProperty(n,"ensureArray",{enumerable:!0,get:function(){return s.ensureArray}}),Object.defineProperty(n,"isPrimitiveType",{enumerable:!0,get:function(){return s.isPrimitiveType}}),Object.defineProperty(n,"hasConstEnum",{enumerable:!0,get:function(){return s.hasConstEnum}}),Object.defineProperty(n,"isEqual",{enumerable:!0,get:function(){return s.isEqual}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return s.intersection}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"isNonNullable",{enumerable:!0,get:function(){return s.isNonNullable}});var c=e("./lib/annotation");Object.defineProperty(n,"mergeAnnotations",{enumerable:!0,get:function(){return c.mergeAnnotations}}),Object.defineProperty(n,"extractAnnotations",{enumerable:!0,get:function(){return c.extractAnnotations}}),Object.defineProperty(n,"stringifyAnnotations",{enumerable:!0,get:function(){return c.stringifyAnnotations}}),Object.defineProperty(n,"stripAnnotations",{enumerable:!0,get:function(){return c.stripAnnotations}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(n,"formatExamples",{enumerable:!0,get:function(){return c.formatExamples}}),Object.defineProperty(n,"formatDefault",{enumerable:!0,get:function(){return c.formatDefault}}),Object.defineProperty(n,"formatSee",{enumerable:!0,get:function(){return c.formatSee}});var l=e("./lib/error");Object.defineProperty(n,"MalformedTypeError",{enumerable:!0,get:function(){return l.MalformedTypeError}}),Object.defineProperty(n,"MissingReferenceError",{enumerable:!0,get:function(){return l.MissingReferenceError}}),Object.defineProperty(n,"UnsupportedError",{enumerable:!0,get:function(){return l.UnsupportedError}}),Object.defineProperty(n,"RelatedError",{enumerable:!0,get:function(){return l.RelatedError}}),Object.defineProperty(n,"throwUnsupportedError",{enumerable:!0,get:function(){return l.throwUnsupportedError}}),Object.defineProperty(n,"throwRelatedError",{enumerable:!0,get:function(){return l.throwRelatedError}}),Object.defineProperty(n,"isCoreTypesError",{enumerable:!0,get:function(){return l.isCoreTypesError}}),Object.defineProperty(n,"decorateErrorMeta",{enumerable:!0,get:function(){return l.decorateErrorMeta}}),Object.defineProperty(n,"decorateError",{enumerable:!0,get:function(){return l.decorateError}});var _=e("./lib/location");Object.defineProperty(n,"positionToLineColumn",{enumerable:!0,get:function(){return _.positionToLineColumn}}),Object.defineProperty(n,"locationToLineColumn",{enumerable:!0,get:function(){return _.locationToLineColumn}}),Object.defineProperty(n,"getPositionOffset",{enumerable:!0,get:function(){return _.getPositionOffset}}),Object.defineProperty(n,"mergeLocations",{enumerable:!0,get:function(){return _.mergeLocations}});var u=e("./lib/traverse");Object.defineProperty(n,"some",{enumerable:!0,get:function(){return u.some}}),Object.defineProperty(n,"traverse",{enumerable:!0,get:function(){return u.traverse}})},{"./lib/annotation":8,"./lib/error":9,"./lib/location":10,"./lib/simplify":14,"./lib/traverse":15,"./lib/types":16,"./lib/util":17,"./lib/validate":18}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=n.formatSee=n.formatDefault=n.formatExamples=n.arrayOrSingle=n.stripAnnotations=n.stringifyAnnotations=n.wrapWhitespace=n.extractAnnotations=n.mergeAnnotations=void 0;const r=e("./location"),i=e("./util");function o(e){return e.includes("\n")?["*",e.split("\n").map(e=>` * ${e}`).join("\n")," "].join("\n"):e.startsWith(" ")?e:` ${e}`}function a(e){return 1===e.length?e[0]:e}function s(e){return e.map(e=>"@example\n"+u(_(e).split("\n"),4)).join("\n").trim()}function c(e){return["@default",u(_(e).split("\n"),4)].join("\n").trim()}function l(e){return e.map(e=>"@see "+_(e)).join("\n").trim()}function _(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}function u(e,t,n=!1){return e.map((e,r)=>(0===r&&n?" ".repeat(t-2)+"* ":" ".repeat(t))+e).join("\n")}n.mergeAnnotations=function(e){var t;const n=e=>!!e,o=(e,t="\n")=>(0,i.uniq)(e.filter(n)).join(t).trim(),s=null===(t=e.find(e=>e.name))||void 0===t?void 0:t.name,c=o(e.map(e=>e.title),", "),l=o(e.map(e=>e.description)),_=(0,i.uniq)([].concat(...e.map(e=>(0,i.ensureArray)(e.examples))).filter(n)),u=o(e.map(e=>e.default)),d=(0,i.uniq)([].concat(...e.map(e=>(0,i.ensureArray)(e.see))).filter(n)),p=o(e.map(e=>e.comment)),f=(0,r.mergeLocations)(e.map(e=>e.loc));return{...s?{name:s}:{},...c?{title:c}:{},...l?{description:l}:{},..._.length>0?{examples:a(_)}:{},...u?{default:u}:{},...d.length>0?{see:a(d)}:{},...p?{comment:p}:{},...f?{loc:f}:{}}},n.extractAnnotations=function(e){const{title:t,description:n,examples:r,default:i,comment:o,see:a}=e;return{...t?{title:t}:{},...n?{description:n}:{},...r?{examples:r}:{},...i?{default:i}:{},...o?{comment:o}:{},...a?{see:a}:{}}},n.wrapWhitespace=o,n.stringifyAnnotations=function(e,{includeComment:t=!1,formatWhitespace:n=!1}={}){const{description:r,examples:a,default:_,comment:u,see:d}=e,p=[r,...null==a?[]:[s((0,i.ensureArray)(a))],...void 0===_?[]:[c(_)],...null==d?[]:[l((0,i.ensureArray)(d))],...t?[u]:[]].filter(e=>e).join("\n\n").trim().replace(/\*\//g,"*\\/");return n&&p?o(p):p},n.stripAnnotations=function e(t,n=!0){const{comment:r,description:i,default:o,examples:a,see:s,title:c,...l}=t,_=l;if(n){if("and"===_.type)return{..._,and:_.and.map(t=>e(t,!0))};if("or"===_.type)return{..._,or:_.or.map(t=>e(t,!0))};if("array"===_.type)return{..._,elementType:e(_.elementType,!0)};if("tuple"===_.type)return{..._,elementTypes:_.elementTypes.map(t=>e(t,!0)),additionalItems:"object"==typeof _.additionalItems?e(_.additionalItems,!0):_.additionalItems};if("object"===_.type)return{..._,properties:Object.fromEntries(Object.keys(_.properties).map(t=>[t,{..._.properties[t],node:e(_.properties[t].node,!0)}])),additionalProperties:"object"==typeof _.additionalProperties?e(_.additionalProperties,!0):_.additionalProperties}}return _},n.arrayOrSingle=a,n.formatExamples=s,n.formatDefault=c,n.formatSee=l,n.stringify=_},{"./location":10,"./util":17}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.CoreTypesError=void 0;class r extends Error{constructor(e,t={}){super(e),Object.setPrototypeOf(this,r.prototype),this.blob=t.blob,this.path=t.path,this.loc=t.loc,this.source=t.source,this.filename=t.filename,this.relatedError=t.relatedError}}n.CoreTypesError=r;class i extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,i.prototype)}}n.MalformedTypeError=i;class o extends r{constructor(e,t={}){super(`Reference to missing type "${e}"`,t),Object.setPrototypeOf(this,o.prototype)}}n.MissingReferenceError=o;class a extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,a.prototype)}}n.UnsupportedError=a;class s extends r{constructor(e,t={}){super(e.message,{...t,relatedError:e}),Object.setPrototypeOf(this,s.prototype)}}function c(e){return e instanceof r}function l(e,t){var n,r,i,o,a;return t.blob&&(null!==(n=e.blob)&&void 0!==n||(e.blob=t.blob)),t.path&&(null!==(r=e.path)&&void 0!==r||(e.path=t.path)),t.loc&&(null!==(i=e.loc)&&void 0!==i||(e.loc=t.loc)),t.source&&(null!==(o=e.source)&&void 0!==o||(e.source=t.source)),t.filename&&(null!==(a=e.filename)&&void 0!==a||(e.filename=t.filename)),e}n.RelatedError=s,n.throwUnsupportedError=function(e,t,n){throw new a(e,{blob:t,...t.loc?{loc:t.loc}:{},...n?{path:n}:{}})},n.throwRelatedError=function(e,t){throw new s(e,t)},n.isCoreTypesError=c,n.decorateErrorMeta=l,n.decorateError=function(e,t){return c(e)&&l(e,t),e}},{}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=void 0;const r=e("./util");function i(e,t){const n=e.slice(0,t).split("\n").length,r=e.lastIndexOf("\n",t);return-1===r?{offset:t,line:n,column:t}:{offset:t,line:n,column:t-r}}n.positionToLineColumn=i,n.locationToLineColumn=function(e,t){return"object"==typeof t.start?t:{start:void 0===t.start?void 0:i(e,t.start),...null==t.end?{}:{end:i(e,t.end)}}},n.getPositionOffset=function(e){return void 0===e||"number"==typeof e?e:e.offset},n.mergeLocations=function(e){var t,n,i;let o,a;const s=e=>"number"==typeof e?e:null==e?void 0:e.offset;e.filter(r.isNonNullable).forEach(({start:e,end:t})=>{const n=s(e),r=s(t);void 0!==n&&(!o||"number"==typeof o.location&&o.location===n||o.offset>n)&&(o={location:e,offset:n}),void 0!==r&&(!a||"number"==typeof a.location&&a.location===n||a.offseti(e));return t.some(e=>0===e.length)?[]:(0,r.uniq)([].concat(...t))},n.combineConstAndEnum=i},{"../util":17}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.intersectConstEnum=void 0;const r=e("../annotation"),i=e("../util");n.intersectConstEnum=function(e){if(0===e.length)throw new Error("Cannot intersect const and enum from an empty array of nodes");if(1===e.length)return e[0];const t=e.map(e=>void 0!==e.const?[e.const]:void 0!==e.enum?e.enum:void 0).filter(e=>!!e),n=t.slice(1).reduce((e,t)=>(0,i.intersection)(e,t),t[0]);return{type:e[0].type,...1===n.length?{const:n[0]}:{},...1!==n.length?{enum:n}:{},...(0,r.mergeAnnotations)(e)}}},{"../annotation":8,"../util":17}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplifySingle=void 0;const r=e("./const-enum");n.simplifySingle=function(e){return"boolean"===e.type||"integer"===e.type||"number"===e.type||"string"===e.type?(0,r.simplifyEnumAndConst)(e):e}},{"./const-enum":11}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplify=void 0;const r=e("./simplifications/single"),i=e("./simplifications/const-enum"),o=e("./simplifications/intersect-const-enum"),a=e("./error"),s=e("./annotation"),c=e("./util"),l=["any","string","number","integer","boolean"];n.simplify=function e(t){if(Array.isArray(t))return t.map(t=>e(t));if((0,c.isNodeDocument)(t))return{...t,types:e(t.types)};const n=e=>(0,c.copyName)(t,e);if("tuple"===t.type)return{...t,elementTypes:t.elementTypes.map(t=>e(t)),...t.additionalItems&&"object"==typeof t.additionalItems?{additionalItems:e(t.additionalItems)}:{}};if("array"===t.type)return{...t,elementType:e(t.elementType)};if("object"===t.type)return{...t,properties:Object.fromEntries(Object.entries(t.properties).map(([t,{node:n,required:r}])=>[t,{node:e(n),required:r}])),...t.additionalProperties&&"object"==typeof t.additionalProperties?{additionalProperties:e(t.additionalProperties)}:{}};if("and"!==t.type&&"or"!==t.type)return n((0,r.simplifySingle)(t));if("and"===t.type){const r=function(e){const t=(0,c.splitTypes)(e);if(t.any.length>0){if(0===t.and.length&&0===t.or.length&&0===t.ref.length&&0===t.null.length&&0===t.string.length&&0===t.number.length&&0===t.integer.length&&0===t.boolean.length&&0===t.object.length&&0===t.array.length&&0===t.tuple.length)return[{type:"any",...(0,s.mergeAnnotations)(t.any.map(({node:e})=>e))}];t.any=[]}const n=e=>e.map(({node:e})=>e);t.boolean.length>1&&(t.boolean=[{node:(0,o.intersectConstEnum)([...t.boolean.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.boolean)}]);t.string.length>1&&(t.string=[{node:(0,o.intersectConstEnum)([...t.string.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.string)}]);t.number.length>0&&t.integer.length>0?(t.number=[{node:(0,o.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.integer),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.number)}],t.integer=[]):t.number.length>1?t.number=[{node:(0,o.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.number)}]:t.integer.length>1&&(t.integer=[{node:(0,o.intersectConstEnum)([...t.integer.map(({node:e})=>e),...n(t.any)]),order:(0,c.firstSplitTypeIndex)(t.integer)}]);t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,c.flattenSplitTypeValues)(t)}([].concat(...t.and.map(t=>{const n=e(t);return n.and?n.and:[n]})));return 1===r.length?n({...r[0],...(0,s.mergeAnnotations)([(0,s.extractAnnotations)(t),r[0]])}):n({type:"and",and:r,...(0,s.extractAnnotations)(t)})}if("or"===t.type){const o=function(e){const t=(0,c.splitTypes)(e);if(t.any.length>0){const e=(0,i.mergeConstEnumUnion)(t.any.map(({node:e})=>e));if(0===e.length)return[{type:"any",...(0,s.mergeAnnotations)(t.any.map(({node:e})=>e))}]}for(const[e,n]of Object.entries(t)){const o=e;if(!l.includes(o)||!n.length)continue;const a=n,_=a.map(({node:e})=>e),u=(0,i.mergeConstEnumUnion)(_);0===u.length?t[o]=[{node:{type:o,...(0,s.mergeAnnotations)(_)},order:(0,c.firstSplitTypeIndex)(a)}]:t[o]=[{node:(0,r.simplifySingle)({type:o,enum:u,...(0,s.mergeAnnotations)(_)}),order:(0,c.firstSplitTypeIndex)(a)}]}t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,c.flattenSplitTypeValues)(t)}([].concat(...t.or.map(t=>{const n=e(t);return n.or?n.or:[n]})));return 1===o.length?n({...o[0],...(0,s.mergeAnnotations)([(0,s.extractAnnotations)(t),o[0]])}):n({type:"or",or:o,...(0,s.extractAnnotations)(t)})}throw new a.MalformedTypeError("Invalid node",t)}},{"./annotation":8,"./error":9,"./simplifications/const-enum":11,"./simplifications/intersect-const-enum":12,"./simplifications/single":13,"./util":17}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.some=n.traverse=void 0;class r extends Error{}function i(e,t){function n(e,t,n,r,i,o){const a={node:void 0!==o?o:void 0===r?t[n]:t[n][r],path:[...e.path,n,...void 0===r?[]:[r]],parentNode:t,parentProperty:n,index:r,required:i};return Object.assign({},e,a)}!function e(t,r){r(t);const{node:i}=t;if("array"===i.type)e(n(t,i,"elementType"),r);else if("tuple"===i.type)i.elementTypes.forEach((o,a)=>e(n(t,i,"elementTypes",a),r)),"object"==typeof i.additionalItems&&e(n(t,i,"additionalItems"),r);else if("object"===i.type){for(const o of Object.keys(i.properties))e(n(t,i,"properties",o,i.properties[o].required,i.properties[o].node),r);"object"==typeof i.additionalProperties&&e(n(t,i,"additionalProperties"),r)}else"and"===i.type?i.and.forEach((o,a)=>e(n(t,i,"and",a),r)):"or"===i.type&&i.or.forEach((o,a)=>e(n(t,i,"or",a),r))}({node:e,rootNode:e,path:[]},t)}n.traverse=i,n.some=function(e,t){try{i(e,e=>{if(t(e))throw new r})}catch(e){if(e instanceof r)return!0;throw e}return!1}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeDocument=n.isNonNullable=n.copyName=n.firstSplitTypeIndex=n.flattenSplitTypeValues=n.splitTypes=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.constEnumTypes=n.isPrimitiveType=n.ensureArray=n.uniq=void 0,n.uniq=function(e){return e.filter((t,n)=>{for(let i=0;i["null","string","number","integer","boolean"].includes(e.type),n.constEnumTypes=new Set(["any","string","number","integer","boolean","object","array","tuple","ref"]);function r(e,t){if(typeof e!=typeof t)return!1;if(null===e!=(null===t))return!1;if(null===e)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((e,n)=>!r(e,t[n]));if(Array.isArray(e)!==Array.isArray(t))return!1;if("object"==typeof e){const n=Object.keys(e).sort();return!!r(n,Object.keys(t).sort())&&!n.some(n=>!r(e[n],t[n]))}return e===t}n.hasConstEnum=e=>n.constEnumTypes.has(e.type),n.isEqual=r,n.intersection=function(e,t){const n=[];return e.forEach(e=>{t.forEach(t=>{r(e,t)&&n.push(e)})}),n},n.union=function(e,t){const n=[...e];return t.forEach(t=>{!e.some(e=>r(t,e))&&n.push(t)}),n},n.splitTypes=function(e){const t={and:[],or:[],ref:[],any:[],null:[],string:[],number:[],integer:[],boolean:[],object:[],array:[],tuple:[]};return e.forEach((e,n)=>{if("and"!==e.type&&"or"!==e.type||"and"===e.type&&e.and.length>0||"or"===e.type&&e.or.length>0){const r={node:e,order:n};t[e.type].push(r)}}),t},n.flattenSplitTypeValues=function(e){return[].concat(Object.values(e).flat().sort((e,t)=>e.order-t.order).map(({node:e})=>e))},n.firstSplitTypeIndex=function(e){return Math.min(...e.map(({order:e})=>e))},n.copyName=function(e,t){return void 0===e.name?t:{...t,name:e.name}},n.isNonNullable=function(e){return null!=e},n.isNodeDocument=function(e){return Array.isArray(e.types)}},{}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=void 0;const r=e("./error"),i=e("./util");n.validate=function e(t){(0,i.hasConstEnum)(t)&&function(e){if(e.enum&&0===e.enum.length)throw new r.MalformedTypeError("Empty enum is not allowed",e);if(e.enum&&void 0!==e.const&&!e.enum.some(t=>(0,i.isEqual)(t,e.const)))throw new r.MalformedTypeError("Enum and const are both set, but enum doesn't contain const",e)}(t),"and"===t.type&&t.and.forEach(t=>e(t)),"or"===t.type&&t.or.forEach(t=>e(t))}},{"./error":9,"./util":17}],19:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./lib"),n),i(e("./lib/types"),n),i(e("./lib/utils"),n)},{"./lib":20,"./lib/types":23,"./lib/utils":24}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchema=n.jsonSchemaDocumentToOpenApi=n.decorateOpenApi=void 0;const r=e("./json-schema-to-openapi"),i=e("./openapi-to-json-schema");function o(e,{title:t,version:n,schemaVersion:r="3.0.0"}){const i={title:t,version:n};return e.$id&&(i["x-id"]=e.$id,delete e.$id),e.$comment&&(i["x-comment"]=e.$comment,delete e.$comment),delete e.$schema,{openapi:r,info:i,paths:{},...e}}n.decorateOpenApi=o,n.jsonSchemaDocumentToOpenApi=function(e,t){const{definitions:n={},...i}=e;return o({...i,components:{schemas:Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(0,r.jsonSchemaTypeToOpenApi)(t)]))}},t)},n.openApiToJsonSchema=function(e){const t=e.components.schemas;return{definitions:Object.fromEntries(Object.keys(t).map(e=>[e,(0,i.openApiToJsonSchemaType)(t[e])]))}}},{"./json-schema-to-openapi":21,"./openapi-to-json-schema":22}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsonSchemaTypeToOpenApi=void 0;const r=e("./utils");n.jsonSchemaTypeToOpenApi=function e(t){return"boolean"==typeof t?t:(t=function(e){if(void 0===e.type)return e;const{type:t,...n}=e,r=Array.isArray(t)?t.includes("null"):"null"===t,i=Array.isArray(t)?t.filter(e=>"null"!==e):"null"===t?void 0:t,o=(e,t)=>"any"!==t&&t?{...e,type:t}:e;void 0!==e.const&&(n.enum=[e.const],delete n.const);const a=e=>r?{...e,nullable:r}:e;return Array.isArray(i)?0===i.length?a(n):1===i.length?o(a(n),i[0]):{...a(n),anyOf:i.map(e=>o({},e))}:o(a(n),i)}(t),t=(n=t).$ref?{...n,$ref:(0,r.encodeRefNameOpenApi)((0,r.decodeRefNameJsonSchema)(n.$ref))}:n,(0,r.recurseSchema)(t,e));var n}},{"./utils":24}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchemaType=void 0;const r=e("./utils");n.openApiToJsonSchemaType=function e(t){if("boolean"==typeof t)return t;const{type:n,nullable:i,...o}=t,a=function(e,t){if(void 0!==e&&"any"!==e){if(Array.isArray(e)){if(e.includes("any"))return;return!e.includes("null")&&t&&e.push("null"),1===e.length?e[0]:e}return"null"!==e&&t?[e,"null"]:e}}(n,i);let s={...o,...a?{type:a}:{}};var c;return s=(c=s).$ref?{...c,$ref:(0,r.encodeRefNameJsonSchema)((0,r.decodeRefNameOpenApi)(c.$ref))}:c,(0,r.recurseSchema)(s,e)}},{"./utils":24}],23:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{dup:16}],24:[function(e,t,n){"use strict";function r(e){return encodeURIComponent(e)}function i(e){return decodeURIComponent(e)}function o(e){return e&&Object.keys(e).length>0}Object.defineProperty(n,"__esModule",{value:!0}),n.recurseSchema=n.decodeRefNameOpenApi=n.encodeRefNameOpenApi=n.decodeRefNameJsonSchema=n.encodeRefNameJsonSchema=n.decodePathPart=n.encodePathPart=void 0,n.encodePathPart=r,n.decodePathPart=i,n.encodeRefNameJsonSchema=function(e){return`#/definitions/${r(e)}`},n.decodeRefNameJsonSchema=function(e){return e.startsWith("#/definitions/")?i(e.slice(14)):i(e)},n.encodeRefNameOpenApi=function(e){return`#/components/schemas/${r(e)}`},n.decodeRefNameOpenApi=function(e){return e.startsWith("#/components/schemas/")?i(e.slice(21)):i(e)},n.recurseSchema=function(e,t){if("object"!=typeof e)return e;const n=e;return{...n,..."object"!=typeof n.items?{}:Array.isArray(n.items)?{items:n.items.map(e=>t(e))}:{items:t(n.items)},..."object"!=typeof n.additionalItems?{}:{additionalItems:t(n.additionalItems)},..."object"!=typeof n.contains?{}:{contains:t(n.contains)},...o(n.properties)?{properties:Object.fromEntries(Object.keys(n.properties).map(e=>{var r;return[e,t(null===(r=n.properties)||void 0===r?void 0:r[e])]}))}:{},...o(n.patternProperties)?{patternProperties:Object.fromEntries(Object.keys(n.patternProperties).map(e=>{var r;return[e,t(null===(r=n.patternProperties)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.additionalProperties?{}:{additionalProperties:t(n.additionalProperties)},...o(n.dependencies)?{dependencies:Object.fromEntries(Object.keys(n.dependencies).map(e=>{var r;return[e,t(null===(r=n.dependencies)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.propertyNames?{}:{propertyNames:t(n.propertyNames)},..."object"!=typeof n.if?{}:{if:t(n.if)},..."object"!=typeof n.then?{}:{then:t(n.then)},..."object"!=typeof n.else?{}:{else:t(n.else)},..."object"==typeof n.allOf&&n.allOf.length?{allOf:n.allOf.map(e=>t(e))}:{},..."object"==typeof n.anyOf&&n.anyOf.length?{anyOf:n.anyOf.map(e=>t(e))}:{},..."object"==typeof n.oneOf&&n.oneOf.length?{oneOf:n.oneOf.map(e=>t(e))}:{},..."object"!=typeof n.not?{}:{not:t(n.not)},...o(n.definitions)?{definitions:Object.fromEntries(Object.keys(n.definitions).map(e=>{var r;return[e,t(null===(r=n.definitions)||void 0===r?void 0:r[e])]}))}:{}}}},{}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.helpers=n.convertTypeScriptToCoreTypes=n.convertSingleCoreTypeToTypeScriptAst=n.convertCoreTypesToTypeScript=void 0;var r=e("./lib/core-types-to-ts");Object.defineProperty(n,"convertCoreTypesToTypeScript",{enumerable:!0,get:function(){return r.convertCoreTypesToTypeScript}}),Object.defineProperty(n,"convertSingleCoreTypeToTypeScriptAst",{enumerable:!0,get:function(){return r.convertSingleCoreTypeToTypeScriptAst}});var i=e("./lib/ts-to-core-types");Object.defineProperty(n,"convertTypeScriptToCoreTypes",{enumerable:!0,get:function(){return i.convertTypeScriptToCoreTypes}}),n.helpers=e("./lib/ts-helpers")},{"./lib/core-types-to-ts":26,"./lib/ts-helpers":28,"./lib/ts-to-core-types":29}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertSingleCoreTypeToTypeScriptAst=n.convertCoreTypesToTypeScript=void 0;const r=e("core-types"),i=e("typescript"),o=e("./ts-helpers"),{factory:a}=i;function s(e,t,n){throw new r.UnsupportedError(e,{loc:t.loc,...n})}function c(e,t={}){const{useUnknown:n=!1,declaration:r=!1,namespaces:i="ignore"}=t,s={useUnknown:n},{name:c,namespaces:_}=function(e,t){if(!t||"ignore"===t)return{name:e,namespaces:[]};const n=e.split("dot"===t?".":"underscore"===t?"_":/[._]/);return{name:n.pop(),namespaces:n}}(e.name,i),u=p(s,e),d="flow-type"===u.type?function(e,t,n){return a.createTypeAliasDeclaration(l(e),a.createIdentifier(t),void 0,n)}(r,c,u.node):function(e,t,n){return a.createInterfaceDeclaration(l(e),a.createIdentifier(t),void 0,void 0,n)}(r,c,u.properties);return{declaration:(f=d,(0,o.wrapAnnotations)(f,e)),namespaceList:_};var f}function l(e){return a.createModifiersFromModifierFlags(e?i.ModifierFlags.Export|i.ModifierFlags.Ambient:i.ModifierFlags.Export)}function _(e,t){return"and"===t.type||"or"===t.type?u(e,t):p(e,t).node}function u(e,t){return"and"===t.type?function(e,t){return a.createIntersectionTypeNode(t.and.map(t=>(0,o.wrapAnnotations)(_(e,t),t)))}(e,t):function(e,t){return a.createUnionTypeNode(t.or.map(t=>(0,o.wrapAnnotations)(_(e,t),t)))}(e,t)}function d(e){return e.useUnknown?(0,o.tsUnknownTypeAnnotation)():a.createKeywordTypeNode(i.SyntaxKind.AnyKeyword)}function p(e,t){if("and"===t.type||"or"===t.type)return{type:"flow-type",node:u(e,t)};if("null"===t.type)return{type:"flow-type",node:g(t)};const{const:n,enum:i}=t;return n?{type:"flow-type",node:h(e,t,n)}:i?{type:"flow-type",node:a.createUnionTypeNode(i.map(n=>h(e,t,n)))}:(0,r.isPrimitiveType)(t)?{type:"flow-type",node:g(t)}:"any"===t.type?{type:"flow-type",node:d(e)}:"ref"===t.type?{type:"flow-type",node:S(t)}:"object"===t.type?{type:"object",...v(e,t)}:"array"===t.type||"tuple"===t.type?{type:"flow-type",node:x(e,t)}:void s(`Type ${t.type} not supported`,t)}function f(){return a.createLiteralTypeNode(a.createToken(i.SyntaxKind.NullKeyword))}n.convertCoreTypesToTypeScript=function(e,t={}){const{version:n,types:i}=e;if(1!==n)throw new r.UnsupportedError(`core-types version ${n} not supported`);const a=[],s=i.map(e=>{const{name:n}=e,r=c(e,t);return a.push(n),r}).map(({declaration:e,namespaceList:t})=>((e,t)=>0===t.length?e:t.map(e=>`namespace ${e} {`).join(" ")+`\n${e}\n`+t.map(()=>"}").join(" "))((0,o.generateCode)(e),t)).join("\n\n");return{data:(0,o.createCodeHeader)({...t,createdByPackage:"core-types-ts",createdByUrl:"https://github.com/grantila/core-types-ts"})+s+(s.endsWith("\n")?"":"\n"),convertedTypes:a,notConvertedTypes:[]}},n.convertSingleCoreTypeToTypeScriptAst=c;const m={string:i.SyntaxKind.StringKeyword,number:i.SyntaxKind.NumberKeyword,integer:i.SyntaxKind.NumberKeyword,boolean:i.SyntaxKind.BooleanKeyword};function g(e){const{type:t}=e;return"null"===t?f():m[t]?a.createKeywordTypeNode(m[t]):void s(`Invalid primitive type: ${t}`,e)}function h(e,t,n){return"null"===n?f():"string"==typeof n?a.createStringLiteral(n):"number"==typeof n?a.createNumericLiteral(n):"boolean"==typeof n?n?a.createTrue():a.createFalse():"object"==typeof n?Array.isArray(n)?function(e,t,n){return a.createTupleTypeNode(n.map(n=>h(e,t,n)))}(e,t,n):v(e,n).node:void s(`Invalid const value: "${n}"`,t,{blob:n})}function y(e,t){return!0===t?y(e,{type:"any"}):a.createIndexSignature(void 0,[a.createParameterDeclaration(void 0,void 0,"key",void 0,p(e,{type:"string"}).node)],p(e,t).node)}function v(e,t){const{properties:n,additionalProperties:r=!1}=t,s=!1===r?[]:[y(e,r)],c=[...Object.keys(n).map(e=>({name:e,...n[e]})).map(({name:t,node:r,required:s})=>(0,o.wrapAnnotations)(a.createPropertySignature(void 0,(0,o.safeName)(t),(e=>e?void 0:a.createToken(i.SyntaxKind.QuestionToken))(s),p(e,r).node),n[t].node)),...s];return{properties:c,node:a.createTypeLiteralNode(c)}}function b(e,t){return a.createArrayTypeNode(a.createRestTypeNode(p(e,t).node))}function x(e,t){return"tuple"===t.type?a.createTupleTypeNode([...t.elementTypes.map(t=>p(e,t).node),...t.additionalItems?!0===t.additionalItems?[b(e,{type:"any"})]:[b(e,t.additionalItems)]:[]]):a.createArrayTypeNode(p(e,t.elementType).node)}function S(e){return a.createTypeReferenceNode(e.ref)}},{"./ts-helpers":28,"core-types":30,typescript:47}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateNode=void 0;const r=e("typescript"),i=e("core-types");function o(e){const t=(e,n)=>{if(!e)return[];if(r.isArrayTypeNode(e)&&e.parent&&r.isRestTypeNode(e.parent))return t(e.parent,e);if(r.isRestTypeNode(e))return t(e.parent,e);if(r.isOptionalTypeNode(e))return t(e.parent,e);if(r.isUnionTypeNode(e))return t(e.parent,e);if(r.isParenthesizedTypeNode(e))return t(e.parent,e);if(r.isTypeLiteralNode(e))return t(e.parent,e);if(r.isArrayTypeNode(e))return["[]",...t(e.parent,e)];if(r.isTupleTypeNode(e)){const r=e.elements.indexOf(n);return[...-1===r?[]:[`${r}`],...t(e.parent,e)]}const i=r.isTypeAliasDeclaration(e)||r.isInterfaceDeclaration(e)||r.isPropertySignature(e)?e.name.getText():"";return i?[i,...t(e.parent,e)]:(e=>e.parent&&(r.isArrayTypeNode(e.parent)||r.isTupleTypeNode(e.parent)||r.isOptionalTypeNode(e.parent)||r.isRestTypeNode(e.parent)||r.isUnionTypeNode(e.parent)))(e)?t(e.parent,e):[]},n=t(e,void 0);return n.length?{title:n.reverse().join(".")}:{}}function a(e){return void 0===e||"string"==typeof e?e:e.map(({text:e})=>e).join(" ")}function s(e){const t=[],n=[],r=[],i=[];return e.forEach(e=>{var o,s,c,l,_,u;if(e.comment)if("example"===e.tagName.text)n.push(null!==(s=null===(o=a(e.comment))||void 0===o?void 0:o.trim())&&void 0!==s?s:"");else if("default"===e.tagName.text)r.push(null!==(l=null===(c=a(e.comment))||void 0===c?void 0:c.trim())&&void 0!==l?l:"");else if("see"===e.tagName.text)i.push((e=>{var t,n,r;return null!==(r=(e.name?(null===(t=e.name)||void 0===t?void 0:t.getText())+" ":"")+(null===(n=a(e.comment))||void 0===n?void 0:n.trim()))&&void 0!==r?r:""})(e));else{const n=null!==(u=null===(_=a(e.comment))||void 0===_?void 0:_.trim())&&void 0!==u?u:"";t.push(`@${e.tagName.text} ${n}`)}}),{...0===t.length?{}:{description:t.join("\n")},...0===n.length?{}:{examples:n},...0===r.length?{}:{default:r.join("\n")},...0===i.length?{}:{see:i}}}n.decorateNode=function(e,t){var n;const{includeJsDoc:r=!0}=null!=t?t:{},{jsDoc:c}=e,l=o(e);if(r&&c&&c.length){const e=c[0];return(0,i.mergeAnnotations)([(_=a(e.comment),_?{description:_}:{}),l,s(null!==(n=e.tags)&&void 0!==n?n:[])])}var _;return l}},{"core-types":30,typescript:47}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createCodeHeader=n.isExportedDeclaration=n.toLocation=n.tsStripOptionalType=n.generateCode=n.makeGenericComment=n.wrapAnnotations=n.safeName=n.tsUnknownTypeAnnotation=void 0;const r=e("typescript"),i=e("core-types"),{factory:o}=r;function a(e,t=!1){const n=Array.isArray(e)?e:e.trim().split("\n");return 1===n.length&&""===n[0]?void 0:(r=`*\n${function(e){return e.map(e=>` * ${e}`).join("\n")}(n)}\n `,t?r:`/*${r}*/`);var r}n.tsUnknownTypeAnnotation=function(){return o.createToken(r.SyntaxKind.UnknownKeyword)},n.safeName=function(e){return e.match(/^[a-zA-Z$][a-zA-Z0-9_$]*$/)?o.createIdentifier(e):o.createStringLiteral(e)},n.wrapAnnotations=function(e,t,n=!0){const o=(0,i.stringifyAnnotations)(t,{formatWhitespace:n}).trim();return o?n?r.addSyntheticLeadingComment(e,r.SyntaxKind.MultiLineCommentTrivia,o.includes("\n")?`${o}\n `:`* ${o} `,!0):o.split("\n").reduce((e,t)=>r.addSyntheticLeadingComment(e,r.SyntaxKind.SingleLineCommentTrivia,` ${t}`,!0),e):e},n.makeGenericComment=a,n.generateCode=function(e){const t=r.createPrinter({newLine:r.NewLineKind.LineFeed}),n=r.createSourceFile("output.ts","",r.ScriptTarget.ES2017,!1,r.ScriptKind.TS);return t.printNode(r.EmitHint.Unspecified,e,n)},n.tsStripOptionalType=function(e){return r.isOptionalTypeNode(e)?e.type:e},n.toLocation=function(e){return{start:e.pos,...null==e?{}:{end:e.end}}},n.isExportedDeclaration=function(e){var t;return!!(null===(t=e.modifiers)||void 0===t?void 0:t.some(e=>e.kind===r.SyntaxKind.ExportKeyword))},n.createCodeHeader=function({filename:e,sourceFilename:t,userPackage:n,userPackageUrl:r,noDisableLintHeader:i=!1,noDescriptiveHeader:o=!1,createdByPackage:s,createdByUrl:c}){return i&&o?"":[i?"":"/* tslint:disable */\n/* eslint-disable */",o?"":(()=>{const i=r?` - {@link ${r}}`:"";return a([`${e?`The file ${e}`:"This file"} is generated${t?` from ${t}`:""} by ${s}${n?` on behalf of ${n}`:""}, DO NOT EDIT.`,"For more information, see:",` - {@link ${c}}`,...i?[i]:[]])})()].join("\n")+"\n\n"}},{"core-types":30,typescript:47}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertTypeScriptToCoreTypes=void 0;const r=e("typescript"),i=e("core-types"),o=e("./ts-helpers"),a=e("./ts-annotations"),s={type:"any"},c=e=>(t,n)=>{var r,o,a;const s=(null===(r=null==n?void 0:n.loc)||void 0===r?void 0:r.start)?[n.loc,e.slice((0,i.getPositionOffset)(null===(o=n.loc)||void 0===o?void 0:o.start),(0,i.getPositionOffset)(null===(a=n.loc)||void 0===a?void 0:a.end))]:[];console.warn(t,...s)};function l(e){var t,n;return!(!(null===(t=e.typeArguments)||void 0===t?void 0:t.length)&&!(null===(n=e.typeParameters)||void 0===n?void 0:n.length))}function _(e,t){return t.handleError(t.getUnsupportedError("Generic types are not supported",e))}function u(e,t){var n;if(l(e))return _(e,t);if(r.isTypeAliasDeclaration(e))return{name:e.name.getText(),...(0,a.decorateNode)(e),...null!==(n=f(e.type,t))&&void 0!==n?n:s};if(r.isInterfaceDeclaration(e))return{name:e.name.getText(),type:"object",...p(e,t),...(0,a.decorateNode)(e)};throw new Error("Internal error")}function d(e){var t;return(null===(t=e.questionToken)||void 0===t?void 0:t.kind)===r.SyntaxKind.QuestionToken}function p(e,t){const n={properties:{},additionalProperties:!1};return e.members.forEach(e=>{var i,c,l;if(r.isPropertySignature(e)&&e.type){const r=e.name.getText();n.properties[r]={required:!d(e),node:{...null!==(i=f(e.type,t))&&void 0!==i?i:s,...(0,a.decorateNode)(e)}}}else if(r.isIndexSignatureDeclaration(e)){const i=e.parameters[0];if((null===(c=i.type)||void 0===c?void 0:c.kind)!==r.SyntaxKind.StringKeyword)return void t.options.warn("Will not convert non-string index signature",{blob:i,loc:(0,o.toLocation)(i)});n.additionalProperties=null!==(l=f(e.type,t))&&void 0!==l?l:s}}),n}function f(e,t,n){var c,d,g,h;const{peekOnly:y=!1}=null!=n?n:{};if(r.isUnionTypeNode(e))return{type:"or",or:e.types.map(e=>f(e,t)).filter(i.isNonNullable),...(0,a.decorateNode)(e)};if(r.isIntersectionTypeNode(e))return{type:"and",and:e.types.map(e=>f(e,t)).filter(i.isNonNullable),...(0,a.decorateNode)(e)};if(r.isParenthesizedTypeNode(e)){const n=[...e.getChildren()];return(null===(c=n[0])||void 0===c?void 0:c.kind)===r.SyntaxKind.OpenParenToken&&n.shift(),(null===(d=n[n.length-1])||void 0===d?void 0:d.kind)===r.SyntaxKind.CloseParenToken&&n.pop(),1===n.length&&r.isTypeNode(n[0])?f(n[0],t):t.handleError(t.getUnsupportedError("Parenthesis type not understood",e))}if(e.kind===r.SyntaxKind.AnyKeyword)return{type:"any",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.UnknownKeyword)return{type:"any",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.StringKeyword)return{type:"string",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.NumberKeyword)return{type:"number",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.BooleanKeyword)return{type:"boolean",...(0,a.decorateNode)(e)};if(e.kind===r.SyntaxKind.ObjectKeyword)return{type:"object",properties:{},additionalProperties:!0,...(0,a.decorateNode)(e)};if(r.isArrayTypeNode(e))return{type:"array",elementType:null!==(g=f(e.elementType,t))&&void 0!==g?g:s,...(0,a.decorateNode)(e)};if(r.isTypeReferenceNode(e)){if(e.typeName.kind===r.SyntaxKind.QualifiedName)return t.handleError(t.getUnsupportedError("Qualified reference names not supported",e));if("Array"===e.typeName.text){const n=e.typeArguments;return{type:"array",elementType:n&&null!==(h=f(n[0],t))&&void 0!==h?h:s,...(0,a.decorateNode)(e)}}const n=e.typeName.text,c=n=>{if(t.cyclicState.has(n))throw new i.MalformedTypeError(`Cyclic type found when trying to inline type ${n}`,{blob:e,loc:(0,o.toLocation)(e)});t.cyclicState.add(n)},d=e=>{if(r.isLiteralTypeNode(e)&&r.isStringLiteral(e.literal))return[e.literal.text];if(!r.isUnionTypeNode(e))return t.handleError(t.getUnsupportedError("Expected string union kind",e));const n=e.types.map(e=>r.isLiteralTypeNode(e)&&r.isStringLiteral(e.literal)?e.literal.text:void 0);return n.some(e=>void 0===e)?t.handleError(t.getUnsupportedError("Expected string union kind",e)):n},m=()=>{var i;const o=null!==(i=e.typeArguments)&&void 0!==i?i:[],a=o[0],s=o[1],l=void 0===s?void 0:d(s);if(void 0===a)return t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e));const _=f(a,t,{peekOnly:!0});if(void 0===_)return t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e));if("ref"===_.type){const i=a.getText(),o=t.typeMap.get(i);if(!o||!r.isTypeLiteralNode(o.declaration)&&!r.isInterfaceDeclaration(o.declaration))return t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e));c(i);return{members:p(o.declaration,t),secondNames:l}}return"object"===_.type?{members:_,secondNames:l}:t.handleError(t.getUnsupportedError(`${n}<> of non-objects are not supported`,e))};if("Omit"===n){const t=m();if(!t)return;const{members:n,secondNames:r}=t;if(void 0===r)return;return{type:"object",...{...n,properties:Object.fromEntries(Object.entries(n.properties).filter(([e])=>!r.includes(e)))},...(0,a.decorateNode)(e,{includeJsDoc:!1})}}if("Pick"===n){const t=m();if(!t)return;const{members:n,secondNames:r}=t;if(void 0===r)return;return{type:"object",...{...n,properties:Object.fromEntries(Object.entries(n.properties).filter(([e])=>r.includes(e)))},...(0,a.decorateNode)(e,{includeJsDoc:!1})}}if("Partial"===n){const t=m();if(!t)return;const{members:n}=t;return{type:"object",...{...n,properties:Object.fromEntries(Object.entries(n.properties).map(([e,t])=>[e,{...t,required:!1}]))},...(0,a.decorateNode)(e,{includeJsDoc:!1})}}if(l(e))return _(e,t);const g=t.typeMap.get(n);if(g&&!g.exported&&!y)if("include-if-referenced"===t.options.nonExported)t.includeExtra.add(n);else if("inline"===t.options.nonExported)return c(n),u(g.declaration,t);return{type:"ref",ref:n,...(0,a.decorateNode)(e)}}return r.isTupleTypeNode(e)?{type:"tuple",...m(e,t),...(0,a.decorateNode)(e)}:r.isLiteralTypeNode(e)?r.isNumericLiteral(e.literal)?{type:"number",const:Number(e.literal.text),...(0,a.decorateNode)(e)}:r.isStringLiteral(e.literal)?{type:"string",const:e.literal.text,...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.TrueKeyword?{type:"boolean",const:!0,...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.FalseKeyword?{type:"boolean",const:!1,...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.NullKeyword?{type:"null",...(0,a.decorateNode)(e)}:e.literal.kind===r.SyntaxKind.PrefixUnaryExpression?"operand"in e.literal&&e.literal.operator===r.SyntaxKind.MinusToken?{type:"number",const:-Number(e.literal.operand.getText()),...(0,a.decorateNode)(e)}:t.handleError(t.getUnsupportedError("Prefix unary expressions is only supported for MinusToken",e.literal)):t.handleError(t.getUnsupportedError("Literal type not understood",e.literal)):r.isTypeLiteralNode(e)?{type:"object",...p(e,t),...(0,a.decorateNode)(e)}:t.handleError(t.getUnsupportedError(`Unimplemented type (kind=${e.kind})`,e))}function m(e,t){var n;if(0===e.elements.length)return{elementTypes:[],additionalItems:!1,minItems:0};const i=r.isRestTypeNode(e.elements[e.elements.length-1]),[a,c]=i?[e.elements.slice(0,e.elements.length-1),e.elements[e.elements.length-1]]:[[...e.elements],void 0],l=a.map(e=>{var n;return null!==(n=f((0,o.tsStripOptionalType)(e),t))&&void 0!==n?n:s}),_=!!c&&(null!==(n=f(c.type.elementType,t))&&void 0!==n?n:s),u=a.findIndex(e=>r.isOptionalTypeNode(e)),d=-1===u?a.length:u;return{elementTypes:l,..._&&"any"===_.type?{additionalItems:!0}:{additionalItems:_},minItems:d}}n.convertTypeScriptToCoreTypes=function(e,t){const{warn:n=c(e),namespaces:a="ignore",nonExported:s="include-if-referenced",unsupported:l="ignore"}=null!=t?t:{},_=new Set,d=r.createSourceFile("filename.ts",e,r.ScriptTarget.Latest,!0),p=e=>r.isTypeAliasDeclaration(e)||r.isInterfaceDeclaration(e),f=(e,t)=>[...t.filter(e=>r.isModuleDeclaration(e)).flatMap(t=>t.body.kind!==r.SyntaxKind.ModuleBlock?[]:f([...e,t.name.getText()],t.body.statements)),...t.filter(p).map(t=>{if(!(e.length>0&&"ignore"===a))return{namespaceParents:e,declaration:t}}).filter(e=>!!e)],m=e=>{const{declaration:t,namespaceParents:n}=e,r=[...n,t.name.getText()].join(".");_.add(r)},g=({declaration:e,namespaceParents:t})=>{const n=e.name.getText(),i="hoist"===a||"ignore"===a?n:[...t,n].join("join-dot"===a?".":"_"),o=r.factory.createIdentifier(i);return o.getText=e=>i,e.name=o,e},h=(e=>("hoist"===a?(e=>{const t=new Map;return e.forEach(e=>{const{declaration:n,namespaceParents:r}=e,i=n.name.getText(),o=t.get(i);o?o.namespaceParents.length>r.length?(t.set(i,e),m(o)):m(e):t.set(i,e)}),[...t.values()]})(e):e).map(g))(f([],d.statements)),y={options:{warn:n,namespaces:a,nonExported:s,unsupported:l},typeMap:new Map(h.map(e=>[e.name.getText(),{declaration:e,exported:(0,o.isExportedDeclaration)(e)}])),includeExtra:new Set,cyclicState:new Set,getUnsupportedError(t,n){const r=(0,i.locationToLineColumn)(e,(0,o.toLocation)(n));return new i.UnsupportedError(t,{blob:n,loc:r,source:e})},handleError(e){if("warn"===y.options.unsupported)y.options.warn(e.message,e);else if("error"===y.options.unsupported)throw e}};"fail"===y.options.nonExported&&h.filter(e=>!(0,o.isExportedDeclaration)(e)).forEach(e=>{throw new i.MalformedTypeError("Found non-exported type when 'nonExported' is 'fail'",{blob:e,path:[e.name.getText()],loc:(0,o.toLocation)(e)})});const v=e=>{y.cyclicState=new Set;const t=u(e,y);return t||_.add(e.name.getText()),t},b=h.filter(e=>"include"===y.options.nonExported||(0,o.isExportedDeclaration)(e)).map(e=>v(e)).filter(e=>!!e);return b.push(...[...y.includeExtra.values()].map(e=>{const t=y.typeMap.get(e);if(!t)throw new Error("Internal error on exporting non-exported type");return v(t.declaration)}).filter(e=>!!e)),{data:{version:1,types:b},convertedTypes:b.map(({name:e})=>e),notConvertedTypes:[..._]}}},{"./ts-annotations":27,"./ts-helpers":28,"core-types":30,typescript:47}],30:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.some=n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.formatSee=n.formatDefault=n.formatExamples=n.stringify=n.stripAnnotations=n.stringifyAnnotations=n.extractAnnotations=n.mergeAnnotations=n.isNonNullable=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.isPrimitiveType=n.ensureArray=n.validate=n.simplify=void 0,i(e("./lib/types"),n);var o=e("./lib/simplify");Object.defineProperty(n,"simplify",{enumerable:!0,get:function(){return o.simplify}});var a=e("./lib/validate");Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return a.validate}});var s=e("./lib/util");Object.defineProperty(n,"ensureArray",{enumerable:!0,get:function(){return s.ensureArray}}),Object.defineProperty(n,"isPrimitiveType",{enumerable:!0,get:function(){return s.isPrimitiveType}}),Object.defineProperty(n,"hasConstEnum",{enumerable:!0,get:function(){return s.hasConstEnum}}),Object.defineProperty(n,"isEqual",{enumerable:!0,get:function(){return s.isEqual}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return s.intersection}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"isNonNullable",{enumerable:!0,get:function(){return s.isNonNullable}});var c=e("./lib/annotation");Object.defineProperty(n,"mergeAnnotations",{enumerable:!0,get:function(){return c.mergeAnnotations}}),Object.defineProperty(n,"extractAnnotations",{enumerable:!0,get:function(){return c.extractAnnotations}}),Object.defineProperty(n,"stringifyAnnotations",{enumerable:!0,get:function(){return c.stringifyAnnotations}}),Object.defineProperty(n,"stripAnnotations",{enumerable:!0,get:function(){return c.stripAnnotations}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(n,"formatExamples",{enumerable:!0,get:function(){return c.formatExamples}}),Object.defineProperty(n,"formatDefault",{enumerable:!0,get:function(){return c.formatDefault}}),Object.defineProperty(n,"formatSee",{enumerable:!0,get:function(){return c.formatSee}});var l=e("./lib/error");Object.defineProperty(n,"MalformedTypeError",{enumerable:!0,get:function(){return l.MalformedTypeError}}),Object.defineProperty(n,"MissingReferenceError",{enumerable:!0,get:function(){return l.MissingReferenceError}}),Object.defineProperty(n,"UnsupportedError",{enumerable:!0,get:function(){return l.UnsupportedError}}),Object.defineProperty(n,"RelatedError",{enumerable:!0,get:function(){return l.RelatedError}}),Object.defineProperty(n,"throwUnsupportedError",{enumerable:!0,get:function(){return l.throwUnsupportedError}}),Object.defineProperty(n,"throwRelatedError",{enumerable:!0,get:function(){return l.throwRelatedError}}),Object.defineProperty(n,"isCoreTypesError",{enumerable:!0,get:function(){return l.isCoreTypesError}}),Object.defineProperty(n,"decorateErrorMeta",{enumerable:!0,get:function(){return l.decorateErrorMeta}}),Object.defineProperty(n,"decorateError",{enumerable:!0,get:function(){return l.decorateError}});var _=e("./lib/location");Object.defineProperty(n,"positionToLineColumn",{enumerable:!0,get:function(){return _.positionToLineColumn}}),Object.defineProperty(n,"locationToLineColumn",{enumerable:!0,get:function(){return _.locationToLineColumn}}),Object.defineProperty(n,"getPositionOffset",{enumerable:!0,get:function(){return _.getPositionOffset}}),Object.defineProperty(n,"mergeLocations",{enumerable:!0,get:function(){return _.mergeLocations}});var u=e("./lib/traverse");Object.defineProperty(n,"some",{enumerable:!0,get:function(){return u.some}}),Object.defineProperty(n,"traverse",{enumerable:!0,get:function(){return u.traverse}})},{"./lib/annotation":31,"./lib/error":32,"./lib/location":33,"./lib/simplify":37,"./lib/traverse":38,"./lib/types":39,"./lib/util":40,"./lib/validate":41}],31:[function(e,t,n){arguments[4][8][0].apply(n,arguments)},{"./location":33,"./util":40,dup:8}],32:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{dup:9}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=void 0;const r=e("./util");function i(e,t){const n=e.slice(0,t).split("\n").length,r=e.lastIndexOf("\n",t);return-1===r?{offset:t,line:n,column:t}:{offset:t,line:n,column:t-r}}n.positionToLineColumn=i,n.locationToLineColumn=function(e,t){return"object"==typeof t.start?t:{start:void 0===t.start?void 0:i(e,t.start),...null==t.end?{}:{end:i(e,t.end)}}},n.getPositionOffset=function(e){return void 0===e||"number"==typeof e?e:e.offset},n.mergeLocations=function(e){var t;let n,i;const o=e=>"number"==typeof e?e:null==e?void 0:e.offset;e.filter(r.isNonNullable).forEach(({start:e,end:t})=>{const r=o(e),a=o(t);void 0!==r&&(!n||"number"==typeof n.location&&n.location===r||n.offset>r)&&(n={location:e,offset:r}),void 0!==a&&(!i||"number"==typeof i.location&&i.location===r||i.offset=1){var i=n;return 55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(i-56320)+65536:i}return n}function c(a,s,c){var l=[a].concat(s).concat([c]),_=l[l.length-2],u=c,d=l.lastIndexOf(14);if(d>1&&l.slice(1,d).every(function(t){return t==e})&&-1==[e,r,o].indexOf(a))return 2;var p=l.lastIndexOf(t);if(p>0&&l.slice(1,p).every(function(e){return e==t})&&-1==[n,t].indexOf(_))return l.filter(function(e){return e==t}).length%2==1?3:4;if(0==_&&1==u)return 0;if(2==_||0==_||1==_)return 14==u&&s.every(function(t){return t==e})?2:1;if(2==u||0==u||1==u)return 1;if(6==_&&(6==u||7==u||9==u||10==u))return 0;if(!(9!=_&&7!=_||7!=u&&8!=u))return 0;if((10==_||8==_)&&8==u)return 0;if(u==e||15==u)return 0;if(5==u)return 0;if(_==n)return 0;var f=-1!=l.indexOf(e)?l.lastIndexOf(e)-1:l.length-2;return-1!=[r,o].indexOf(l[f])&&l.slice(f+1,-1).every(function(t){return t==e})&&14==u||15==_&&-1!=[i,o].indexOf(u)?0:-1!=s.indexOf(t)?2:_==t&&u==t?0:1}function l(a){return 1536<=a&&a<=1541||1757==a||1807==a||2274==a||3406==a||69821==a||70082<=a&&a<=70083||72250==a||72326<=a&&a<=72329||73030==a?n:13==a?0:10==a?1:0<=a&&a<=9||11<=a&&a<=12||14<=a&&a<=31||127<=a&&a<=159||173==a||1564==a||6158==a||8203==a||8206<=a&&a<=8207||8232==a||8233==a||8234<=a&&a<=8238||8288<=a&&a<=8292||8293==a||8294<=a&&a<=8303||55296<=a&&a<=57343||65279==a||65520<=a&&a<=65528||65529<=a&&a<=65531||113824<=a&&a<=113827||119155<=a&&a<=119162||917504==a||917505==a||917506<=a&&a<=917535||917632<=a&&a<=917759||918e3<=a&&a<=921599?2:768<=a&&a<=879||1155<=a&&a<=1159||1160<=a&&a<=1161||1425<=a&&a<=1469||1471==a||1473<=a&&a<=1474||1476<=a&&a<=1477||1479==a||1552<=a&&a<=1562||1611<=a&&a<=1631||1648==a||1750<=a&&a<=1756||1759<=a&&a<=1764||1767<=a&&a<=1768||1770<=a&&a<=1773||1809==a||1840<=a&&a<=1866||1958<=a&&a<=1968||2027<=a&&a<=2035||2070<=a&&a<=2073||2075<=a&&a<=2083||2085<=a&&a<=2087||2089<=a&&a<=2093||2137<=a&&a<=2139||2260<=a&&a<=2273||2275<=a&&a<=2306||2362==a||2364==a||2369<=a&&a<=2376||2381==a||2385<=a&&a<=2391||2402<=a&&a<=2403||2433==a||2492==a||2494==a||2497<=a&&a<=2500||2509==a||2519==a||2530<=a&&a<=2531||2561<=a&&a<=2562||2620==a||2625<=a&&a<=2626||2631<=a&&a<=2632||2635<=a&&a<=2637||2641==a||2672<=a&&a<=2673||2677==a||2689<=a&&a<=2690||2748==a||2753<=a&&a<=2757||2759<=a&&a<=2760||2765==a||2786<=a&&a<=2787||2810<=a&&a<=2815||2817==a||2876==a||2878==a||2879==a||2881<=a&&a<=2884||2893==a||2902==a||2903==a||2914<=a&&a<=2915||2946==a||3006==a||3008==a||3021==a||3031==a||3072==a||3134<=a&&a<=3136||3142<=a&&a<=3144||3146<=a&&a<=3149||3157<=a&&a<=3158||3170<=a&&a<=3171||3201==a||3260==a||3263==a||3266==a||3270==a||3276<=a&&a<=3277||3285<=a&&a<=3286||3298<=a&&a<=3299||3328<=a&&a<=3329||3387<=a&&a<=3388||3390==a||3393<=a&&a<=3396||3405==a||3415==a||3426<=a&&a<=3427||3530==a||3535==a||3538<=a&&a<=3540||3542==a||3551==a||3633==a||3636<=a&&a<=3642||3655<=a&&a<=3662||3761==a||3764<=a&&a<=3769||3771<=a&&a<=3772||3784<=a&&a<=3789||3864<=a&&a<=3865||3893==a||3895==a||3897==a||3953<=a&&a<=3966||3968<=a&&a<=3972||3974<=a&&a<=3975||3981<=a&&a<=3991||3993<=a&&a<=4028||4038==a||4141<=a&&a<=4144||4146<=a&&a<=4151||4153<=a&&a<=4154||4157<=a&&a<=4158||4184<=a&&a<=4185||4190<=a&&a<=4192||4209<=a&&a<=4212||4226==a||4229<=a&&a<=4230||4237==a||4253==a||4957<=a&&a<=4959||5906<=a&&a<=5908||5938<=a&&a<=5940||5970<=a&&a<=5971||6002<=a&&a<=6003||6068<=a&&a<=6069||6071<=a&&a<=6077||6086==a||6089<=a&&a<=6099||6109==a||6155<=a&&a<=6157||6277<=a&&a<=6278||6313==a||6432<=a&&a<=6434||6439<=a&&a<=6440||6450==a||6457<=a&&a<=6459||6679<=a&&a<=6680||6683==a||6742==a||6744<=a&&a<=6750||6752==a||6754==a||6757<=a&&a<=6764||6771<=a&&a<=6780||6783==a||6832<=a&&a<=6845||6846==a||6912<=a&&a<=6915||6964==a||6966<=a&&a<=6970||6972==a||6978==a||7019<=a&&a<=7027||7040<=a&&a<=7041||7074<=a&&a<=7077||7080<=a&&a<=7081||7083<=a&&a<=7085||7142==a||7144<=a&&a<=7145||7149==a||7151<=a&&a<=7153||7212<=a&&a<=7219||7222<=a&&a<=7223||7376<=a&&a<=7378||7380<=a&&a<=7392||7394<=a&&a<=7400||7405==a||7412==a||7416<=a&&a<=7417||7616<=a&&a<=7673||7675<=a&&a<=7679||8204==a||8400<=a&&a<=8412||8413<=a&&a<=8416||8417==a||8418<=a&&a<=8420||8421<=a&&a<=8432||11503<=a&&a<=11505||11647==a||11744<=a&&a<=11775||12330<=a&&a<=12333||12334<=a&&a<=12335||12441<=a&&a<=12442||42607==a||42608<=a&&a<=42610||42612<=a&&a<=42621||42654<=a&&a<=42655||42736<=a&&a<=42737||43010==a||43014==a||43019==a||43045<=a&&a<=43046||43204<=a&&a<=43205||43232<=a&&a<=43249||43302<=a&&a<=43309||43335<=a&&a<=43345||43392<=a&&a<=43394||43443==a||43446<=a&&a<=43449||43452==a||43493==a||43561<=a&&a<=43566||43569<=a&&a<=43570||43573<=a&&a<=43574||43587==a||43596==a||43644==a||43696==a||43698<=a&&a<=43700||43703<=a&&a<=43704||43710<=a&&a<=43711||43713==a||43756<=a&&a<=43757||43766==a||44005==a||44008==a||44013==a||64286==a||65024<=a&&a<=65039||65056<=a&&a<=65071||65438<=a&&a<=65439||66045==a||66272==a||66422<=a&&a<=66426||68097<=a&&a<=68099||68101<=a&&a<=68102||68108<=a&&a<=68111||68152<=a&&a<=68154||68159==a||68325<=a&&a<=68326||69633==a||69688<=a&&a<=69702||69759<=a&&a<=69761||69811<=a&&a<=69814||69817<=a&&a<=69818||69888<=a&&a<=69890||69927<=a&&a<=69931||69933<=a&&a<=69940||70003==a||70016<=a&&a<=70017||70070<=a&&a<=70078||70090<=a&&a<=70092||70191<=a&&a<=70193||70196==a||70198<=a&&a<=70199||70206==a||70367==a||70371<=a&&a<=70378||70400<=a&&a<=70401||70460==a||70462==a||70464==a||70487==a||70502<=a&&a<=70508||70512<=a&&a<=70516||70712<=a&&a<=70719||70722<=a&&a<=70724||70726==a||70832==a||70835<=a&&a<=70840||70842==a||70845==a||70847<=a&&a<=70848||70850<=a&&a<=70851||71087==a||71090<=a&&a<=71093||71100<=a&&a<=71101||71103<=a&&a<=71104||71132<=a&&a<=71133||71219<=a&&a<=71226||71229==a||71231<=a&&a<=71232||71339==a||71341==a||71344<=a&&a<=71349||71351==a||71453<=a&&a<=71455||71458<=a&&a<=71461||71463<=a&&a<=71467||72193<=a&&a<=72198||72201<=a&&a<=72202||72243<=a&&a<=72248||72251<=a&&a<=72254||72263==a||72273<=a&&a<=72278||72281<=a&&a<=72283||72330<=a&&a<=72342||72344<=a&&a<=72345||72752<=a&&a<=72758||72760<=a&&a<=72765||72767==a||72850<=a&&a<=72871||72874<=a&&a<=72880||72882<=a&&a<=72883||72885<=a&&a<=72886||73009<=a&&a<=73014||73018==a||73020<=a&&a<=73021||73023<=a&&a<=73029||73031==a||92912<=a&&a<=92916||92976<=a&&a<=92982||94095<=a&&a<=94098||113821<=a&&a<=113822||119141==a||119143<=a&&a<=119145||119150<=a&&a<=119154||119163<=a&&a<=119170||119173<=a&&a<=119179||119210<=a&&a<=119213||119362<=a&&a<=119364||121344<=a&&a<=121398||121403<=a&&a<=121452||121461==a||121476==a||121499<=a&&a<=121503||121505<=a&&a<=121519||122880<=a&&a<=122886||122888<=a&&a<=122904||122907<=a&&a<=122913||122915<=a&&a<=122916||122918<=a&&a<=122922||125136<=a&&a<=125142||125252<=a&&a<=125258||917536<=a&&a<=917631||917760<=a&&a<=917999?e:127462<=a&&a<=127487?t:2307==a||2363==a||2366<=a&&a<=2368||2377<=a&&a<=2380||2382<=a&&a<=2383||2434<=a&&a<=2435||2495<=a&&a<=2496||2503<=a&&a<=2504||2507<=a&&a<=2508||2563==a||2622<=a&&a<=2624||2691==a||2750<=a&&a<=2752||2761==a||2763<=a&&a<=2764||2818<=a&&a<=2819||2880==a||2887<=a&&a<=2888||2891<=a&&a<=2892||3007==a||3009<=a&&a<=3010||3014<=a&&a<=3016||3018<=a&&a<=3020||3073<=a&&a<=3075||3137<=a&&a<=3140||3202<=a&&a<=3203||3262==a||3264<=a&&a<=3265||3267<=a&&a<=3268||3271<=a&&a<=3272||3274<=a&&a<=3275||3330<=a&&a<=3331||3391<=a&&a<=3392||3398<=a&&a<=3400||3402<=a&&a<=3404||3458<=a&&a<=3459||3536<=a&&a<=3537||3544<=a&&a<=3550||3570<=a&&a<=3571||3635==a||3763==a||3902<=a&&a<=3903||3967==a||4145==a||4155<=a&&a<=4156||4182<=a&&a<=4183||4228==a||6070==a||6078<=a&&a<=6085||6087<=a&&a<=6088||6435<=a&&a<=6438||6441<=a&&a<=6443||6448<=a&&a<=6449||6451<=a&&a<=6456||6681<=a&&a<=6682||6741==a||6743==a||6765<=a&&a<=6770||6916==a||6965==a||6971==a||6973<=a&&a<=6977||6979<=a&&a<=6980||7042==a||7073==a||7078<=a&&a<=7079||7082==a||7143==a||7146<=a&&a<=7148||7150==a||7154<=a&&a<=7155||7204<=a&&a<=7211||7220<=a&&a<=7221||7393==a||7410<=a&&a<=7411||7415==a||43043<=a&&a<=43044||43047==a||43136<=a&&a<=43137||43188<=a&&a<=43203||43346<=a&&a<=43347||43395==a||43444<=a&&a<=43445||43450<=a&&a<=43451||43453<=a&&a<=43456||43567<=a&&a<=43568||43571<=a&&a<=43572||43597==a||43755==a||43758<=a&&a<=43759||43765==a||44003<=a&&a<=44004||44006<=a&&a<=44007||44009<=a&&a<=44010||44012==a||69632==a||69634==a||69762==a||69808<=a&&a<=69810||69815<=a&&a<=69816||69932==a||70018==a||70067<=a&&a<=70069||70079<=a&&a<=70080||70188<=a&&a<=70190||70194<=a&&a<=70195||70197==a||70368<=a&&a<=70370||70402<=a&&a<=70403||70463==a||70465<=a&&a<=70468||70471<=a&&a<=70472||70475<=a&&a<=70477||70498<=a&&a<=70499||70709<=a&&a<=70711||70720<=a&&a<=70721||70725==a||70833<=a&&a<=70834||70841==a||70843<=a&&a<=70844||70846==a||70849==a||71088<=a&&a<=71089||71096<=a&&a<=71099||71102==a||71216<=a&&a<=71218||71227<=a&&a<=71228||71230==a||71340==a||71342<=a&&a<=71343||71350==a||71456<=a&&a<=71457||71462==a||72199<=a&&a<=72200||72249==a||72279<=a&&a<=72280||72343==a||72751==a||72766==a||72873==a||72881==a||72884==a||94033<=a&&a<=94078||119142==a||119149==a?5:4352<=a&&a<=4447||43360<=a&&a<=43388?6:4448<=a&&a<=4519||55216<=a&&a<=55238?7:4520<=a&&a<=4607||55243<=a&&a<=55291?8:44032==a||44060==a||44088==a||44116==a||44144==a||44172==a||44200==a||44228==a||44256==a||44284==a||44312==a||44340==a||44368==a||44396==a||44424==a||44452==a||44480==a||44508==a||44536==a||44564==a||44592==a||44620==a||44648==a||44676==a||44704==a||44732==a||44760==a||44788==a||44816==a||44844==a||44872==a||44900==a||44928==a||44956==a||44984==a||45012==a||45040==a||45068==a||45096==a||45124==a||45152==a||45180==a||45208==a||45236==a||45264==a||45292==a||45320==a||45348==a||45376==a||45404==a||45432==a||45460==a||45488==a||45516==a||45544==a||45572==a||45600==a||45628==a||45656==a||45684==a||45712==a||45740==a||45768==a||45796==a||45824==a||45852==a||45880==a||45908==a||45936==a||45964==a||45992==a||46020==a||46048==a||46076==a||46104==a||46132==a||46160==a||46188==a||46216==a||46244==a||46272==a||46300==a||46328==a||46356==a||46384==a||46412==a||46440==a||46468==a||46496==a||46524==a||46552==a||46580==a||46608==a||46636==a||46664==a||46692==a||46720==a||46748==a||46776==a||46804==a||46832==a||46860==a||46888==a||46916==a||46944==a||46972==a||47e3==a||47028==a||47056==a||47084==a||47112==a||47140==a||47168==a||47196==a||47224==a||47252==a||47280==a||47308==a||47336==a||47364==a||47392==a||47420==a||47448==a||47476==a||47504==a||47532==a||47560==a||47588==a||47616==a||47644==a||47672==a||47700==a||47728==a||47756==a||47784==a||47812==a||47840==a||47868==a||47896==a||47924==a||47952==a||47980==a||48008==a||48036==a||48064==a||48092==a||48120==a||48148==a||48176==a||48204==a||48232==a||48260==a||48288==a||48316==a||48344==a||48372==a||48400==a||48428==a||48456==a||48484==a||48512==a||48540==a||48568==a||48596==a||48624==a||48652==a||48680==a||48708==a||48736==a||48764==a||48792==a||48820==a||48848==a||48876==a||48904==a||48932==a||48960==a||48988==a||49016==a||49044==a||49072==a||49100==a||49128==a||49156==a||49184==a||49212==a||49240==a||49268==a||49296==a||49324==a||49352==a||49380==a||49408==a||49436==a||49464==a||49492==a||49520==a||49548==a||49576==a||49604==a||49632==a||49660==a||49688==a||49716==a||49744==a||49772==a||49800==a||49828==a||49856==a||49884==a||49912==a||49940==a||49968==a||49996==a||50024==a||50052==a||50080==a||50108==a||50136==a||50164==a||50192==a||50220==a||50248==a||50276==a||50304==a||50332==a||50360==a||50388==a||50416==a||50444==a||50472==a||50500==a||50528==a||50556==a||50584==a||50612==a||50640==a||50668==a||50696==a||50724==a||50752==a||50780==a||50808==a||50836==a||50864==a||50892==a||50920==a||50948==a||50976==a||51004==a||51032==a||51060==a||51088==a||51116==a||51144==a||51172==a||51200==a||51228==a||51256==a||51284==a||51312==a||51340==a||51368==a||51396==a||51424==a||51452==a||51480==a||51508==a||51536==a||51564==a||51592==a||51620==a||51648==a||51676==a||51704==a||51732==a||51760==a||51788==a||51816==a||51844==a||51872==a||51900==a||51928==a||51956==a||51984==a||52012==a||52040==a||52068==a||52096==a||52124==a||52152==a||52180==a||52208==a||52236==a||52264==a||52292==a||52320==a||52348==a||52376==a||52404==a||52432==a||52460==a||52488==a||52516==a||52544==a||52572==a||52600==a||52628==a||52656==a||52684==a||52712==a||52740==a||52768==a||52796==a||52824==a||52852==a||52880==a||52908==a||52936==a||52964==a||52992==a||53020==a||53048==a||53076==a||53104==a||53132==a||53160==a||53188==a||53216==a||53244==a||53272==a||53300==a||53328==a||53356==a||53384==a||53412==a||53440==a||53468==a||53496==a||53524==a||53552==a||53580==a||53608==a||53636==a||53664==a||53692==a||53720==a||53748==a||53776==a||53804==a||53832==a||53860==a||53888==a||53916==a||53944==a||53972==a||54e3==a||54028==a||54056==a||54084==a||54112==a||54140==a||54168==a||54196==a||54224==a||54252==a||54280==a||54308==a||54336==a||54364==a||54392==a||54420==a||54448==a||54476==a||54504==a||54532==a||54560==a||54588==a||54616==a||54644==a||54672==a||54700==a||54728==a||54756==a||54784==a||54812==a||54840==a||54868==a||54896==a||54924==a||54952==a||54980==a||55008==a||55036==a||55064==a||55092==a||55120==a||55148==a||55176==a?9:44033<=a&&a<=44059||44061<=a&&a<=44087||44089<=a&&a<=44115||44117<=a&&a<=44143||44145<=a&&a<=44171||44173<=a&&a<=44199||44201<=a&&a<=44227||44229<=a&&a<=44255||44257<=a&&a<=44283||44285<=a&&a<=44311||44313<=a&&a<=44339||44341<=a&&a<=44367||44369<=a&&a<=44395||44397<=a&&a<=44423||44425<=a&&a<=44451||44453<=a&&a<=44479||44481<=a&&a<=44507||44509<=a&&a<=44535||44537<=a&&a<=44563||44565<=a&&a<=44591||44593<=a&&a<=44619||44621<=a&&a<=44647||44649<=a&&a<=44675||44677<=a&&a<=44703||44705<=a&&a<=44731||44733<=a&&a<=44759||44761<=a&&a<=44787||44789<=a&&a<=44815||44817<=a&&a<=44843||44845<=a&&a<=44871||44873<=a&&a<=44899||44901<=a&&a<=44927||44929<=a&&a<=44955||44957<=a&&a<=44983||44985<=a&&a<=45011||45013<=a&&a<=45039||45041<=a&&a<=45067||45069<=a&&a<=45095||45097<=a&&a<=45123||45125<=a&&a<=45151||45153<=a&&a<=45179||45181<=a&&a<=45207||45209<=a&&a<=45235||45237<=a&&a<=45263||45265<=a&&a<=45291||45293<=a&&a<=45319||45321<=a&&a<=45347||45349<=a&&a<=45375||45377<=a&&a<=45403||45405<=a&&a<=45431||45433<=a&&a<=45459||45461<=a&&a<=45487||45489<=a&&a<=45515||45517<=a&&a<=45543||45545<=a&&a<=45571||45573<=a&&a<=45599||45601<=a&&a<=45627||45629<=a&&a<=45655||45657<=a&&a<=45683||45685<=a&&a<=45711||45713<=a&&a<=45739||45741<=a&&a<=45767||45769<=a&&a<=45795||45797<=a&&a<=45823||45825<=a&&a<=45851||45853<=a&&a<=45879||45881<=a&&a<=45907||45909<=a&&a<=45935||45937<=a&&a<=45963||45965<=a&&a<=45991||45993<=a&&a<=46019||46021<=a&&a<=46047||46049<=a&&a<=46075||46077<=a&&a<=46103||46105<=a&&a<=46131||46133<=a&&a<=46159||46161<=a&&a<=46187||46189<=a&&a<=46215||46217<=a&&a<=46243||46245<=a&&a<=46271||46273<=a&&a<=46299||46301<=a&&a<=46327||46329<=a&&a<=46355||46357<=a&&a<=46383||46385<=a&&a<=46411||46413<=a&&a<=46439||46441<=a&&a<=46467||46469<=a&&a<=46495||46497<=a&&a<=46523||46525<=a&&a<=46551||46553<=a&&a<=46579||46581<=a&&a<=46607||46609<=a&&a<=46635||46637<=a&&a<=46663||46665<=a&&a<=46691||46693<=a&&a<=46719||46721<=a&&a<=46747||46749<=a&&a<=46775||46777<=a&&a<=46803||46805<=a&&a<=46831||46833<=a&&a<=46859||46861<=a&&a<=46887||46889<=a&&a<=46915||46917<=a&&a<=46943||46945<=a&&a<=46971||46973<=a&&a<=46999||47001<=a&&a<=47027||47029<=a&&a<=47055||47057<=a&&a<=47083||47085<=a&&a<=47111||47113<=a&&a<=47139||47141<=a&&a<=47167||47169<=a&&a<=47195||47197<=a&&a<=47223||47225<=a&&a<=47251||47253<=a&&a<=47279||47281<=a&&a<=47307||47309<=a&&a<=47335||47337<=a&&a<=47363||47365<=a&&a<=47391||47393<=a&&a<=47419||47421<=a&&a<=47447||47449<=a&&a<=47475||47477<=a&&a<=47503||47505<=a&&a<=47531||47533<=a&&a<=47559||47561<=a&&a<=47587||47589<=a&&a<=47615||47617<=a&&a<=47643||47645<=a&&a<=47671||47673<=a&&a<=47699||47701<=a&&a<=47727||47729<=a&&a<=47755||47757<=a&&a<=47783||47785<=a&&a<=47811||47813<=a&&a<=47839||47841<=a&&a<=47867||47869<=a&&a<=47895||47897<=a&&a<=47923||47925<=a&&a<=47951||47953<=a&&a<=47979||47981<=a&&a<=48007||48009<=a&&a<=48035||48037<=a&&a<=48063||48065<=a&&a<=48091||48093<=a&&a<=48119||48121<=a&&a<=48147||48149<=a&&a<=48175||48177<=a&&a<=48203||48205<=a&&a<=48231||48233<=a&&a<=48259||48261<=a&&a<=48287||48289<=a&&a<=48315||48317<=a&&a<=48343||48345<=a&&a<=48371||48373<=a&&a<=48399||48401<=a&&a<=48427||48429<=a&&a<=48455||48457<=a&&a<=48483||48485<=a&&a<=48511||48513<=a&&a<=48539||48541<=a&&a<=48567||48569<=a&&a<=48595||48597<=a&&a<=48623||48625<=a&&a<=48651||48653<=a&&a<=48679||48681<=a&&a<=48707||48709<=a&&a<=48735||48737<=a&&a<=48763||48765<=a&&a<=48791||48793<=a&&a<=48819||48821<=a&&a<=48847||48849<=a&&a<=48875||48877<=a&&a<=48903||48905<=a&&a<=48931||48933<=a&&a<=48959||48961<=a&&a<=48987||48989<=a&&a<=49015||49017<=a&&a<=49043||49045<=a&&a<=49071||49073<=a&&a<=49099||49101<=a&&a<=49127||49129<=a&&a<=49155||49157<=a&&a<=49183||49185<=a&&a<=49211||49213<=a&&a<=49239||49241<=a&&a<=49267||49269<=a&&a<=49295||49297<=a&&a<=49323||49325<=a&&a<=49351||49353<=a&&a<=49379||49381<=a&&a<=49407||49409<=a&&a<=49435||49437<=a&&a<=49463||49465<=a&&a<=49491||49493<=a&&a<=49519||49521<=a&&a<=49547||49549<=a&&a<=49575||49577<=a&&a<=49603||49605<=a&&a<=49631||49633<=a&&a<=49659||49661<=a&&a<=49687||49689<=a&&a<=49715||49717<=a&&a<=49743||49745<=a&&a<=49771||49773<=a&&a<=49799||49801<=a&&a<=49827||49829<=a&&a<=49855||49857<=a&&a<=49883||49885<=a&&a<=49911||49913<=a&&a<=49939||49941<=a&&a<=49967||49969<=a&&a<=49995||49997<=a&&a<=50023||50025<=a&&a<=50051||50053<=a&&a<=50079||50081<=a&&a<=50107||50109<=a&&a<=50135||50137<=a&&a<=50163||50165<=a&&a<=50191||50193<=a&&a<=50219||50221<=a&&a<=50247||50249<=a&&a<=50275||50277<=a&&a<=50303||50305<=a&&a<=50331||50333<=a&&a<=50359||50361<=a&&a<=50387||50389<=a&&a<=50415||50417<=a&&a<=50443||50445<=a&&a<=50471||50473<=a&&a<=50499||50501<=a&&a<=50527||50529<=a&&a<=50555||50557<=a&&a<=50583||50585<=a&&a<=50611||50613<=a&&a<=50639||50641<=a&&a<=50667||50669<=a&&a<=50695||50697<=a&&a<=50723||50725<=a&&a<=50751||50753<=a&&a<=50779||50781<=a&&a<=50807||50809<=a&&a<=50835||50837<=a&&a<=50863||50865<=a&&a<=50891||50893<=a&&a<=50919||50921<=a&&a<=50947||50949<=a&&a<=50975||50977<=a&&a<=51003||51005<=a&&a<=51031||51033<=a&&a<=51059||51061<=a&&a<=51087||51089<=a&&a<=51115||51117<=a&&a<=51143||51145<=a&&a<=51171||51173<=a&&a<=51199||51201<=a&&a<=51227||51229<=a&&a<=51255||51257<=a&&a<=51283||51285<=a&&a<=51311||51313<=a&&a<=51339||51341<=a&&a<=51367||51369<=a&&a<=51395||51397<=a&&a<=51423||51425<=a&&a<=51451||51453<=a&&a<=51479||51481<=a&&a<=51507||51509<=a&&a<=51535||51537<=a&&a<=51563||51565<=a&&a<=51591||51593<=a&&a<=51619||51621<=a&&a<=51647||51649<=a&&a<=51675||51677<=a&&a<=51703||51705<=a&&a<=51731||51733<=a&&a<=51759||51761<=a&&a<=51787||51789<=a&&a<=51815||51817<=a&&a<=51843||51845<=a&&a<=51871||51873<=a&&a<=51899||51901<=a&&a<=51927||51929<=a&&a<=51955||51957<=a&&a<=51983||51985<=a&&a<=52011||52013<=a&&a<=52039||52041<=a&&a<=52067||52069<=a&&a<=52095||52097<=a&&a<=52123||52125<=a&&a<=52151||52153<=a&&a<=52179||52181<=a&&a<=52207||52209<=a&&a<=52235||52237<=a&&a<=52263||52265<=a&&a<=52291||52293<=a&&a<=52319||52321<=a&&a<=52347||52349<=a&&a<=52375||52377<=a&&a<=52403||52405<=a&&a<=52431||52433<=a&&a<=52459||52461<=a&&a<=52487||52489<=a&&a<=52515||52517<=a&&a<=52543||52545<=a&&a<=52571||52573<=a&&a<=52599||52601<=a&&a<=52627||52629<=a&&a<=52655||52657<=a&&a<=52683||52685<=a&&a<=52711||52713<=a&&a<=52739||52741<=a&&a<=52767||52769<=a&&a<=52795||52797<=a&&a<=52823||52825<=a&&a<=52851||52853<=a&&a<=52879||52881<=a&&a<=52907||52909<=a&&a<=52935||52937<=a&&a<=52963||52965<=a&&a<=52991||52993<=a&&a<=53019||53021<=a&&a<=53047||53049<=a&&a<=53075||53077<=a&&a<=53103||53105<=a&&a<=53131||53133<=a&&a<=53159||53161<=a&&a<=53187||53189<=a&&a<=53215||53217<=a&&a<=53243||53245<=a&&a<=53271||53273<=a&&a<=53299||53301<=a&&a<=53327||53329<=a&&a<=53355||53357<=a&&a<=53383||53385<=a&&a<=53411||53413<=a&&a<=53439||53441<=a&&a<=53467||53469<=a&&a<=53495||53497<=a&&a<=53523||53525<=a&&a<=53551||53553<=a&&a<=53579||53581<=a&&a<=53607||53609<=a&&a<=53635||53637<=a&&a<=53663||53665<=a&&a<=53691||53693<=a&&a<=53719||53721<=a&&a<=53747||53749<=a&&a<=53775||53777<=a&&a<=53803||53805<=a&&a<=53831||53833<=a&&a<=53859||53861<=a&&a<=53887||53889<=a&&a<=53915||53917<=a&&a<=53943||53945<=a&&a<=53971||53973<=a&&a<=53999||54001<=a&&a<=54027||54029<=a&&a<=54055||54057<=a&&a<=54083||54085<=a&&a<=54111||54113<=a&&a<=54139||54141<=a&&a<=54167||54169<=a&&a<=54195||54197<=a&&a<=54223||54225<=a&&a<=54251||54253<=a&&a<=54279||54281<=a&&a<=54307||54309<=a&&a<=54335||54337<=a&&a<=54363||54365<=a&&a<=54391||54393<=a&&a<=54419||54421<=a&&a<=54447||54449<=a&&a<=54475||54477<=a&&a<=54503||54505<=a&&a<=54531||54533<=a&&a<=54559||54561<=a&&a<=54587||54589<=a&&a<=54615||54617<=a&&a<=54643||54645<=a&&a<=54671||54673<=a&&a<=54699||54701<=a&&a<=54727||54729<=a&&a<=54755||54757<=a&&a<=54783||54785<=a&&a<=54811||54813<=a&&a<=54839||54841<=a&&a<=54867||54869<=a&&a<=54895||54897<=a&&a<=54923||54925<=a&&a<=54951||54953<=a&&a<=54979||54981<=a&&a<=55007||55009<=a&&a<=55035||55037<=a&&a<=55063||55065<=a&&a<=55091||55093<=a&&a<=55119||55121<=a&&a<=55147||55149<=a&&a<=55175||55177<=a&&a<=55203?10:9757==a||9977==a||9994<=a&&a<=9997||127877==a||127938<=a&&a<=127940||127943==a||127946<=a&&a<=127948||128066<=a&&a<=128067||128070<=a&&a<=128080||128110==a||128112<=a&&a<=128120||128124==a||128129<=a&&a<=128131||128133<=a&&a<=128135||128170==a||128372<=a&&a<=128373||128378==a||128400==a||128405<=a&&a<=128406||128581<=a&&a<=128583||128587<=a&&a<=128591||128675==a||128692<=a&&a<=128694||128704==a||128716==a||129304<=a&&a<=129308||129310<=a&&a<=129311||129318==a||129328<=a&&a<=129337||129341<=a&&a<=129342||129489<=a&&a<=129501?r:127995<=a&&a<=127999?14:8205==a?15:9792==a||9794==a||9877<=a&&a<=9878||9992==a||10084==a||127752==a||127806==a||127859==a||127891==a||127908==a||127912==a||127979==a||127981==a||128139==a||128187<=a&&a<=128188||128295==a||128300==a||128488==a||128640==a||128658==a?i:128102<=a&&a<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var n=l(s(e,t)),r=[],i=t+1;i=i)return t.substr(0,i);for(;i>t.length&&r>1;)1&r&&(t+=n),r>>=1,n+=n;return t=(t+=n).substr(0,i)}var i=function(e,t,n){if(null==e||null==t)return e;var r=String(e),i="number"==typeof t?t:parseInt(t,10);if(isNaN(i)||!isFinite(i))return r;var o=r.length;if(o>=i)return r;var a=null==n?"":String(n);""===a&&(a=" ");for(var s=i-o;a.lengths?a.substr(0,s):a)+r},o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},u=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},d=0,p=1,f=2,m=3,g=4,h=5,y=6,v=7,b=8,x=9,S=10,k={"{":d,"}":p,"[":f,"]":m,":":g,",":h},T={true:b,false:x,null:S},C=0,w=1,N=2,D={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},E=0,F=1,P=2,A=3,I=4,O=5,L=6,j=7;function M(e){return e>="1"&&e<="9"}function R(e){return e>="0"&&e<="9"}function B(e){return R(e)||e>="a"&&e<="f"||e>="A"&&e<="F"}function J(e){return"e"===e||"E"===e}function z(e,t,n,r){var i=e.charAt(t);if("\r"===i)t++,n++,r=1,"\n"===e.charAt(t)&&t++;else if("\n"===i)t++,n++,r=1;else{if("\t"!==i&&" "!==i)return null;t++,r++}return{index:t,line:n,column:r}}function q(e,t,n,r){var i=e.charAt(t);return i in k?{type:k[i],line:n,column:r+1,index:t+1,value:null}:null}function U(e,t,n,r){for(var i in T)if(T.hasOwnProperty(i)&&e.substr(t,i.length)===i)return{type:T[i],line:n,column:r+i.length,index:t+i.length,value:i};return null}function V(e,t,n,r){for(var i=t,o=C;t0?{type:v,line:n,column:r+o-i,index:o,value:e.slice(i,o)}:null}var $=0,K=1,H=2,G=3,X=0,Q=1,Y=2,Z=0,ee=1,te=2,ne=3,re={loc:!0,source:null};function ie(e,t,n){var r=t.length>0?t[t.length-1].loc.end:{line:1,column:1};c(l(),e,n.source,r.line,r.column)}function oe(e){for(var t=0,n=0;n<4;n++)t=16*t+parseInt(e[n],16);return String.fromCharCode(t)}var ae={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},se=['"',"\\","/"];function ce(e){for(var t="",n=0;ne),o=e=>`${(e=>"."+i.slice(0,e).join("."))(e)} [query: ${i.join(".")}]`,{loc:a}=i.reduce((e,t,r)=>"Object"===e.type?(()=>{const a=e.children.find(e=>e.key.value===t);if(!a)throw new Error(`No such property ${t} in ${o(r)}`);const{key:s,value:c}=a;return n&&r===i.length-1?s:c})():"Array"===e.type?(()=>{const n=Number(t);if(isNaN(n))throw new Error(`Invalid non-numeric array index "${t}" in array at ${o(r)}`);if(n<0||n>=e.children.length)throw new RangeError(`Index ${n} out-of-bounds in array of size ${e.children.length} at ${o(r)}`);return e.children,e.children[Number(t)]})():e,r);return{start:null==a?void 0:a.start,end:null==a?void 0:a.end}}},{}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAstByObject=n.getAstByString=void 0;const r=e("json-to-ast");function i(e,t){const n=r(e,{loc:!0});return{json:t||JSON.parse(e),jsonString:e,jsonAST:n}}n.getAstByString=i,n.getAstByObject=function(e,t=4){return i(JSON.stringify(e,null,t))}},{"json-to-ast":42}],46:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,_=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?_=l.concat(_):d=-1,_.length&&f())}function f(){if(!u){var e=c(p);u=!0;for(var t=_.length;t;){for(l=_,_=[];++d1)for(var n=1;n{"use strict";var o=Object.defineProperty,a=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.prototype.hasOwnProperty,(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})}),s={};a(s,{ANONYMOUS:()=>FZ,AccessFlags:()=>_i,AssertionLevel:()=>Dt,AssignmentDeclarationKind:()=>bi,AssignmentKind:()=>rh,Associativity:()=>hy,BreakpointResolver:()=>D5,BuilderFileEmit:()=>XV,BuilderProgramKind:()=>yW,BuilderState:()=>KV,CallHierarchy:()=>E5,CharacterCodes:()=>Li,CheckFlags:()=>ri,CheckMode:()=>qB,ClassificationType:()=>qG,ClassificationTypeNames:()=>zG,CommentDirectiveType:()=>Rr,Comparison:()=>d,CompletionInfoFlags:()=>OG,CompletionTriggerKind:()=>wG,Completions:()=>Oae,ContainerFlags:()=>WR,ContextFlags:()=>Kr,Debug:()=>Tn,DiagnosticCategory:()=>xi,Diagnostics:()=>Ca,DocumentHighlights:()=>B0,ElementFlags:()=>li,EmitFlags:()=>Ji,EmitHint:()=>Vi,EmitOnly:()=>qr,EndOfLineState:()=>MG,ExitStatus:()=>Vr,ExportKind:()=>P0,Extension:()=>Mi,ExternalEmitHelpers:()=>Ui,FileIncludeKind:()=>Jr,FilePreprocessingDiagnosticsKind:()=>zr,FileSystemEntryKind:()=>vo,FileWatcherEventKind:()=>Zi,FindAllReferences:()=>Ice,FlattenLevel:()=>bz,FlowFlags:()=>Mr,ForegroundColorEscapeSequences:()=>XU,FunctionFlags:()=>Wh,GeneratedIdentifierFlags:()=>Or,GetLiteralTextFlags:()=>sp,GoToDefinition:()=>ble,HighlightSpanKind:()=>DG,IdentifierNameMap:()=>GJ,IdentifierNameMultiMap:()=>XJ,ImportKind:()=>D0,ImportsNotUsedAsValues:()=>Ei,IndentStyle:()=>PG,IndexFlags:()=>ui,IndexKind:()=>mi,InferenceFlags:()=>yi,InferencePriority:()=>hi,InlayHintKind:()=>NG,InlayHints:()=>Rle,InternalEmitFlags:()=>zi,InternalSymbolName:()=>ii,IntersectionFlags:()=>Hr,InvalidatedProjectKind:()=>pH,JSDocParsingMode:()=>Xi,JsDoc:()=>Ule,JsTyping:()=>zK,JsxEmit:()=>Pi,JsxFlags:()=>Ar,JsxReferenceKind:()=>di,LanguageFeatureMinimumTarget:()=>qi,LanguageServiceMode:()=>SG,LanguageVariant:()=>Oi,LexicalEnvironmentFlags:()=>$i,ListFormat:()=>Hi,LogLevel:()=>Cn,MapCode:()=>l_e,MemberOverrideStatus:()=>Wr,ModifierFlags:()=>Fr,ModuleDetectionKind:()=>Ti,ModuleInstanceState:()=>zR,ModuleKind:()=>Di,ModuleResolutionKind:()=>ki,ModuleSpecifierEnding:()=>Zk,NavigateTo:()=>u2,NavigationBar:()=>S2,NewLineKind:()=>Fi,NodeBuilderFlags:()=>Gr,NodeCheckFlags:()=>oi,NodeFactoryFlags:()=>WC,NodeFlags:()=>Er,NodeResolutionFeatures:()=>BM,ObjectFlags:()=>si,OperationCanceledException:()=>Br,OperatorPrecedence:()=>Sy,OrganizeImports:()=>m_e,OrganizeImportsMode:()=>CG,OuterExpressionKinds:()=>Wi,OutliningElementsCollector:()=>H_e,OutliningSpanKind:()=>jG,OutputFileType:()=>LG,PackageJsonAutoImportPreference:()=>xG,PackageJsonDependencyGroup:()=>bG,PatternMatchKind:()=>d1,PollingInterval:()=>eo,PollingWatchKind:()=>Ni,PragmaKindFlags:()=>Ki,PrivateIdentifierKind:()=>Gw,ProcessLevel:()=>Uz,ProgramUpdateLevel:()=>wU,QuotePreference:()=>oY,RegularExpressionFlags:()=>jr,RelationComparisonResult:()=>Ir,Rename:()=>nue,ScriptElementKind:()=>BG,ScriptElementKindModifier:()=>JG,ScriptKind:()=>Ai,ScriptSnapshot:()=>pG,ScriptTarget:()=>Ii,SemanticClassificationFormat:()=>TG,SemanticMeaning:()=>VG,SemicolonPreference:()=>EG,SignatureCheckMode:()=>UB,SignatureFlags:()=>fi,SignatureHelp:()=>lue,SignatureInfo:()=>GV,SignatureKind:()=>pi,SmartSelectionRange:()=>jue,SnippetKind:()=>Bi,StatisticType:()=>rK,StructureIsReused:()=>Ur,SymbolAccessibility:()=>Yr,SymbolDisplay:()=>$ue,SymbolDisplayPartKind:()=>IG,SymbolFlags:()=>ni,SymbolFormatFlags:()=>Qr,SyntaxKind:()=>Pr,SyntheticSymbolKind:()=>Zr,Ternary:()=>vi,ThrottledCancellationToken:()=>v5,TokenClass:()=>RG,TokenFlags:()=>Lr,TransformFlags:()=>Ri,TypeFacts:()=>JB,TypeFlags:()=>ai,TypeFormatFlags:()=>Xr,TypeMapKind:()=>gi,TypePredicateKind:()=>ei,TypeReferenceSerializationKind:()=>ti,UnionReduction:()=>$r,UpToDateStatusType:()=>R$,VarianceFlags:()=>ci,Version:()=>In,VersionRange:()=>jn,WatchDirectoryFlags:()=>ji,WatchDirectoryKind:()=>wi,WatchFileKind:()=>Ci,WatchLogLevel:()=>jU,WatchType:()=>S$,accessPrivateIdentifier:()=>hz,addDisposableResourceHelper:()=>NN,addEmitFlags:()=>pw,addEmitHelper:()=>Iw,addEmitHelpers:()=>Ow,addInternalEmitFlags:()=>mw,addNodeFactoryPatcher:()=>HC,addObjectAllocatorPatcher:()=>iS,addRange:()=>ge,addRelatedInfo:()=>ST,addSyntheticLeadingComment:()=>ww,addSyntheticTrailingComment:()=>Pw,addToSeen:()=>Bx,advancedAsyncSuperHelper:()=>EN,affectsDeclarationPathOptionDeclarations:()=>OO,affectsEmitOptionDeclarations:()=>IO,allKeysStartWithDot:()=>gR,altDirectorySeparator:()=>No,and:()=>pn,append:()=>pe,appendIfUnique:()=>ye,arrayFrom:()=>We,arrayIsEqualTo:()=>_e,arrayIsHomogeneous:()=>LT,arrayIsSorted:()=>le,arrayOf:()=>Ve,arrayReverseIterator:()=>xe,arrayToMap:()=>Ke,arrayToMultiMap:()=>Xe,arrayToNumericMap:()=>Ge,arraysEqual:()=>F,assertType:()=>gn,assign:()=>$e,assignHelper:()=>iN,asyncDelegator:()=>sN,asyncGeneratorHelper:()=>aN,asyncSuperHelper:()=>PN,asyncValues:()=>cN,attachFileToDiagnostics:()=>pS,awaitHelper:()=>oN,awaiterHelper:()=>_N,base64decode:()=>Ub,base64encode:()=>qb,binarySearch:()=>je,binarySearchKey:()=>Le,bindSourceFile:()=>KR,breakIntoCharacterSpans:()=>P1,breakIntoWordSpans:()=>E1,buildLinkParts:()=>VY,buildOpts:()=>VO,buildOverload:()=>zfe,bundlerModuleNameResolver:()=>zM,canBeConvertedToAsync:()=>e2,canHaveDecorators:()=>xI,canHaveExportModifier:()=>sC,canHaveFlowNode:()=>Ug,canHaveIllegalDecorators:()=>RA,canHaveIllegalModifiers:()=>BA,canHaveIllegalType:()=>LA,canHaveIllegalTypeParameters:()=>MA,canHaveJSDoc:()=>Vg,canHaveLocals:()=>bu,canHaveModifiers:()=>bI,canHaveSymbol:()=>vu,canIncludeBindAndCheckDiagnsotics:()=>NT,canJsonReportNoInputFiles:()=>pL,canProduceDiagnostics:()=>kq,canUsePropertyAccess:()=>lC,canWatchAffectingLocation:()=>JW,canWatchAtTypes:()=>MW,canWatchDirectoryOrFile:()=>LW,cartesianProduct:()=>vn,cast:()=>pt,chainBundle:()=>qJ,chainDiagnosticMessages:()=>yS,changeAnyExtension:()=>ca,changeCompilerHostLikeToUseCache:()=>$U,changeExtension:()=>lT,changeFullExtension:()=>la,changesAffectModuleResolution:()=>_d,changesAffectingProgramStructure:()=>dd,characterToRegularExpressionFlag:()=>Ka,childIsDecorated:()=>Cm,classElementOrClassElementParameterIsDecorated:()=>Nm,classHasClassThisAssignment:()=>Az,classHasDeclaredOrExplicitlyAssignedName:()=>Bz,classHasExplicitlyAssignedName:()=>Rz,classOrConstructorParameterIsDecorated:()=>wm,classPrivateFieldGetHelper:()=>TN,classPrivateFieldInHelper:()=>wN,classPrivateFieldSetHelper:()=>CN,classicNameResolver:()=>OR,classifier:()=>G5,cleanExtendedConfigCache:()=>PU,clear:()=>L,clearMap:()=>Px,clearSharedExtendedConfigFileWatcher:()=>DU,climbPastPropertyAccess:()=>iX,climbPastPropertyOrElementAccess:()=>oX,clone:()=>Ze,cloneCompilerOptions:()=>PQ,closeFileWatcher:()=>bx,closeFileWatcherOf:()=>RU,codefix:()=>Q5,collapseTextChangeRangesAcrossMultipleVersions:()=>sc,collectExternalModuleInfo:()=>$J,combine:()=>fe,combinePaths:()=>Yo,commandLineOptionOfCustomType:()=>zO,commentPragmas:()=>Gi,commonOptionsWithBuild:()=>NO,commonPackageFolders:()=>vk,compact:()=>ue,compareBooleans:()=>Ht,compareDataObjects:()=>Dx,compareDiagnostics:()=>xS,compareDiagnosticsSkipRelatedInformation:()=>SS,compareEmitHelpers:()=>Qw,compareNumberOfDirectorySeparators:()=>iT,comparePaths:()=>fa,comparePathsCaseInsensitive:()=>pa,comparePathsCaseSensitive:()=>da,comparePatternKeys:()=>yR,compareProperties:()=>$t,compareStringsCaseInsensitive:()=>Lt,compareStringsCaseInsensitiveEslintCompatible:()=>Mt,compareStringsCaseSensitive:()=>Rt,compareStringsCaseSensitiveUI:()=>Wt,compareTextSpans:()=>Ot,compareValues:()=>It,compileOnSaveCommandLineOption:()=>bO,compilerOptionsAffectDeclarationPath:()=>ak,compilerOptionsAffectEmit:()=>ok,compilerOptionsAffectSemanticDiagnostics:()=>ik,compilerOptionsDidYouMeanDiagnostics:()=>oj,compilerOptionsIndicateEsModules:()=>ZQ,compose:()=>Nt,computeCommonSourceDirectoryOfFilenames:()=>zU,computeLineAndCharacterOfPosition:()=>Za,computeLineOfPosition:()=>es,computeLineStarts:()=>Ga,computePositionOfLineAndCharacter:()=>Qa,computeSignature:()=>SW,computeSignatureWithDiagnostics:()=>xW,computeSuggestionDiagnostics:()=>V1,computedOptions:()=>IS,concatenate:()=>ne,concatenateDiagnosticMessageChains:()=>vS,configDirTemplateSubstitutionOptions:()=>BO,configDirTemplateSubstitutionWatchOptions:()=>JO,consumesNodeCoreModules:()=>QZ,contains:()=>E,containsIgnoredPath:()=>KT,containsObjectRestOrSpread:()=>yI,containsParseError:()=>Nd,containsPath:()=>ma,convertCompilerOptionsForTelemetry:()=>WL,convertCompilerOptionsFromJson:()=>yL,convertJsonOption:()=>wL,convertToBase64:()=>zb,convertToJson:()=>Lj,convertToObject:()=>jj,convertToOptionsWithAbsolutePaths:()=>Gj,convertToRelativePath:()=>va,convertToTSConfig:()=>Bj,convertTypeAcquisitionFromJson:()=>vL,copyComments:()=>fZ,copyEntries:()=>hd,copyLeadingComments:()=>vZ,copyProperties:()=>tt,copyTrailingAsLeadingComments:()=>xZ,copyTrailingComments:()=>bZ,couldStartTrivia:()=>us,countWhere:()=>I,createAbstractBuilder:()=>IW,createAccessorPropertyBackingField:()=>dI,createAccessorPropertyGetRedirector:()=>pI,createAccessorPropertySetRedirector:()=>fI,createBaseNodeFactory:()=>RC,createBinaryExpressionTrampoline:()=>rI,createBindingHelper:()=>vN,createBuildInfo:()=>pU,createBuilderProgram:()=>kW,createBuilderProgramUsingProgramBuildInfo:()=>DW,createBuilderStatusReporter:()=>$$,createCacheWithRedirects:()=>kM,createCacheableExportInfoMap:()=>E0,createCachedDirectoryStructureHost:()=>CU,createClassNamedEvaluationHelperBlock:()=>Lz,createClassThisAssignmentBlock:()=>Ez,createClassifier:()=>R0,createCommentDirectivesMap:()=>Gd,createCompilerDiagnostic:()=>gS,createCompilerDiagnosticForInvalidCustomType:()=>XO,createCompilerDiagnosticFromMessageChain:()=>hS,createCompilerHost:()=>qU,createCompilerHostFromProgramHost:()=>T$,createCompilerHostWorker:()=>WU,createDetachedDiagnostic:()=>_S,createDiagnosticCollection:()=>wy,createDiagnosticForFileFromMessageChain:()=>Qp,createDiagnosticForNode:()=>Vp,createDiagnosticForNodeArray:()=>Wp,createDiagnosticForNodeArrayFromMessageChain:()=>Kp,createDiagnosticForNodeFromMessageChain:()=>Hp,createDiagnosticForNodeInSourceFile:()=>$p,createDiagnosticForRange:()=>Zp,createDiagnosticMessageChainFromDiagnostic:()=>Yp,createDiagnosticReporter:()=>YW,createDocumentPositionMapper:()=>MJ,createDocumentRegistry:()=>e1,createDocumentRegistryInternal:()=>t1,createEmitAndSemanticDiagnosticsBuilderProgram:()=>AW,createEmitHelperFactory:()=>Xw,createEmptyExports:()=>HF,createEvaluator:()=>FC,createExpressionForJsxElement:()=>YF,createExpressionForJsxFragment:()=>ZF,createExpressionForObjectLiteralElementLike:()=>iA,createExpressionForPropertyName:()=>rA,createExpressionFromEntityName:()=>nA,createExternalHelpersImportDeclarationIfNeeded:()=>kA,createFileDiagnostic:()=>fS,createFileDiagnosticFromMessageChain:()=>Xp,createFlowNode:()=>$R,createForOfBindingStatement:()=>eA,createFutureSourceFile:()=>N0,createGetCanonicalFileName:()=>on,createGetIsolatedDeclarationErrors:()=>wq,createGetSourceFile:()=>UU,createGetSymbolAccessibilityDiagnosticForNode:()=>Cq,createGetSymbolAccessibilityDiagnosticForNodeName:()=>Tq,createGetSymbolWalker:()=>eB,createIncrementalCompilerHost:()=>O$,createIncrementalProgram:()=>j$,createJsxFactoryExpression:()=>QF,createLanguageService:()=>S5,createLanguageServiceSourceFile:()=>m5,createMemberAccessForPropertyName:()=>KF,createModeAwareCache:()=>wM,createModeAwareCacheKey:()=>CM,createModuleNotFoundChain:()=>Sd,createModuleResolutionCache:()=>FM,createModuleResolutionLoader:()=>yV,createModuleResolutionLoaderUsingGlobalCache:()=>KW,createModuleSpecifierResolutionHost:()=>eY,createMultiMap:()=>rt,createNameResolver:()=>OC,createNodeConverters:()=>zC,createNodeFactory:()=>KC,createOptionNameMap:()=>$O,createOverload:()=>Jfe,createPackageJsonImportFilter:()=>XZ,createPackageJsonInfo:()=>GZ,createParenthesizerRules:()=>BC,createPatternMatcher:()=>f1,createPrinter:()=>xU,createPrinterWithDefaults:()=>hU,createPrinterWithRemoveComments:()=>yU,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>vU,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>bU,createProgram:()=>RV,createProgramHost:()=>N$,createPropertyNameNodeForIdentifierOrLiteral:()=>nC,createQueue:()=>at,createRange:()=>Qb,createRedirectedBuilderProgram:()=>EW,createResolutionCache:()=>GW,createRuntimeTypeSerializer:()=>Qz,createScanner:()=>Fs,createSemanticDiagnosticsBuilderProgram:()=>FW,createSet:()=>st,createSolutionBuilder:()=>X$,createSolutionBuilderHost:()=>K$,createSolutionBuilderWithWatch:()=>Q$,createSolutionBuilderWithWatchHost:()=>G$,createSortedArray:()=>ae,createSourceFile:()=>YI,createSourceMapGenerator:()=>hJ,createSourceMapSource:()=>sw,createSuperAccessVariableStatement:()=>tq,createSymbolTable:()=>ad,createSymlinkCache:()=>dk,createSyntacticTypeNodeBuilder:()=>JK,createSystemWatchFunctions:()=>So,createTextChange:()=>zQ,createTextChangeFromStartLength:()=>JQ,createTextChangeRange:()=>oc,createTextRangeFromNode:()=>MQ,createTextRangeFromSpan:()=>BQ,createTextSpan:()=>tc,createTextSpanFromBounds:()=>nc,createTextSpanFromNode:()=>jQ,createTextSpanFromRange:()=>RQ,createTextSpanFromStringLiteralLikeContent:()=>LQ,createTextWriter:()=>Xy,createTokenRange:()=>rx,createTypeChecker:()=>QB,createTypeReferenceDirectiveResolutionCache:()=>AM,createTypeReferenceResolutionLoader:()=>xV,createWatchCompilerHost:()=>L$,createWatchCompilerHostOfConfigFile:()=>E$,createWatchCompilerHostOfFilesAndCompilerOptions:()=>F$,createWatchFactory:()=>k$,createWatchHost:()=>x$,createWatchProgram:()=>M$,createWatchStatusReporter:()=>n$,createWriteFileMeasuringIO:()=>VU,declarationNameToString:()=>Rp,decodeMappings:()=>wJ,decodedTextSpanIntersectsWith:()=>Ys,decorateHelper:()=>Zw,deduplicate:()=>oe,defaultIncludeSpec:()=>nL,defaultInitCompilerOptions:()=>GO,defaultMaximumTruncationLength:()=>nd,diagnosticCategoryName:()=>Si,diagnosticToString:()=>b0,diagnosticsEqualityComparer:()=>CS,directoryProbablyExists:()=>Hb,directorySeparator:()=>wo,displayPart:()=>EY,displayPartsToString:()=>_5,disposeEmitNodes:()=>_w,disposeResourcesHelper:()=>DN,documentSpansEqual:()=>bY,dumpTracingLegend:()=>Dr,elementAt:()=>Te,elideNodes:()=>sI,emitComments:()=>Mv,emitDetachedComments:()=>Rv,emitFiles:()=>dU,emitFilesAndReportErrors:()=>h$,emitFilesAndReportErrorsAndGetExitStatus:()=>y$,emitModuleKindIsNonNodeESM:()=>XS,emitNewLineBeforeLeadingCommentOfPosition:()=>Lv,emitNewLineBeforeLeadingComments:()=>Ov,emitNewLineBeforeLeadingCommentsOfPosition:()=>jv,emitResolverSkipsTypeChecking:()=>uU,emitSkippedWithNoDiagnostics:()=>BV,emptyArray:()=>p,emptyFileSystemEntries:()=>vT,emptyMap:()=>f,emptyOptions:()=>kG,emptySet:()=>m,endsWith:()=>Xt,ensurePathIsNonModuleName:()=>sa,ensureScriptKind:()=>Lk,ensureTrailingDirectorySeparator:()=>aa,entityNameToString:()=>Up,enumerateInsertsAndDeletes:()=>yn,equalOwnProperties:()=>He,equateStringsCaseInsensitive:()=>Et,equateStringsCaseSensitive:()=>Ft,equateValues:()=>Pt,esDecorateHelper:()=>nN,escapeJsxAttributeString:()=>Vy,escapeLeadingUnderscores:()=>Tc,escapeNonAsciiString:()=>By,escapeSnippetText:()=>eC,escapeString:()=>My,escapeTemplateSubstitution:()=>Dy,evaluatorResult:()=>EC,every:()=>T,executeCommandLine:()=>bK,expandPreOrPostfixIncrementOrDecrementExpression:()=>oA,explainFiles:()=>u$,explainIfFileIsRedirectAndImpliedFormat:()=>d$,exportAssignmentIsAlias:()=>Ch,exportStarHelper:()=>kN,expressionResultIsUnused:()=>HT,extend:()=>et,extendsHelper:()=>uN,extensionFromPath:()=>mT,extensionIsTS:()=>pT,extensionsNotSupportingExtensionlessResolution:()=>Kk,externalHelpersModuleNameText:()=>td,factory:()=>aw,fileExtensionIs:()=>Ro,fileExtensionIsOneOf:()=>Bo,fileIncludeReasonToDiagnostics:()=>m$,fileShouldUseJavaScriptRequire:()=>C0,filter:()=>O,filterMutate:()=>j,filterSemanticDiagnostics:()=>zV,find:()=>C,findAncestor:()=>xc,findBestPatternMatch:()=>cn,findChildOfKind:()=>RX,findComputedPropertyNameCacheAssignment:()=>mI,findConfigFile:()=>BU,findConstructorDeclaration:()=>IC,findContainingList:()=>BX,findDiagnosticForNode:()=>e0,findFirstNonJsxWhitespaceToken:()=>eQ,findIndex:()=>N,findLast:()=>w,findLastIndex:()=>D,findListItemInfo:()=>LX,findMap:()=>P,findModifier:()=>gY,findNextToken:()=>nQ,findPackageJson:()=>HZ,findPackageJsons:()=>$Z,findPrecedingMatchingToken:()=>pQ,findPrecedingToken:()=>rQ,findSuperStatementIndexPath:()=>rz,findTokenOnLeftOfPosition:()=>tQ,findUseStrictPrologue:()=>_A,first:()=>Ne,firstDefined:()=>v,firstDefinedIterator:()=>b,firstIterator:()=>De,firstOrOnly:()=>o0,firstOrUndefined:()=>Ce,firstOrUndefinedIterator:()=>we,fixupCompilerOptions:()=>_2,flatMap:()=>z,flatMapIterator:()=>U,flatMapToMutable:()=>q,flatten:()=>J,flattenCommaList:()=>hI,flattenDestructuringAssignment:()=>xz,flattenDestructuringBinding:()=>Tz,flattenDiagnosticMessageText:()=>cV,forEach:()=>h,forEachAncestor:()=>fd,forEachAncestorDirectory:()=>Sa,forEachChild:()=>KI,forEachChildRecursively:()=>GI,forEachEmittedFile:()=>$q,forEachEnclosingBlockScopeContainer:()=>Mp,forEachEntry:()=>md,forEachExternalModuleToImportFrom:()=>A0,forEachImportClauseDeclaration:()=>Og,forEachKey:()=>gd,forEachLeadingCommentRange:()=>bs,forEachNameInAccessChainWalkingLeft:()=>$x,forEachNameOfDefaultExport:()=>M0,forEachPropertyAssignment:()=>Yf,forEachResolvedProjectReference:()=>kV,forEachReturnStatement:()=>jf,forEachRight:()=>y,forEachTrailingCommentRange:()=>xs,forEachTsConfigPropArray:()=>nm,forEachUnique:()=>SY,forEachYieldExpression:()=>Lf,forSomeAncestorDirectory:()=>jx,formatColorAndReset:()=>iV,formatDiagnostic:()=>GU,formatDiagnostics:()=>KU,formatDiagnosticsWithColorAndContext:()=>sV,formatGeneratedName:()=>uI,formatGeneratedNamePart:()=>lI,formatLocation:()=>aV,formatMessage:()=>mS,formatStringFromArgs:()=>aS,formatting:()=>Ede,fullTripleSlashAMDReferencePathRegEx:()=>Pf,fullTripleSlashReferencePathRegEx:()=>wf,generateDjb2Hash:()=>Qi,generateTSConfig:()=>Kj,generatorHelper:()=>yN,getAdjustedReferenceLocation:()=>KX,getAdjustedRenameLocation:()=>GX,getAliasDeclarationFromName:()=>kh,getAllAccessorDeclarations:()=>Dv,getAllDecoratorsOfClass:()=>_z,getAllDecoratorsOfClassElement:()=>uz,getAllJSDocTags:()=>yl,getAllJSDocTagsOfKind:()=>vl,getAllKeys:()=>qe,getAllProjectOutputs:()=>cU,getAllSuperTypeNodes:()=>Fh,getAllowJSCompilerOption:()=>KS,getAllowSyntheticDefaultImports:()=>JS,getAncestor:()=>Oh,getAnyExtensionFromPath:()=>Ho,getAreDeclarationMapsEnabled:()=>HS,getAssignedExpandoInitializer:()=>rg,getAssignedName:()=>Lc,getAssignedNameOfIdentifier:()=>Oz,getAssignmentDeclarationKind:()=>dg,getAssignmentDeclarationPropertyAccessKind:()=>Sg,getAssignmentTargetKind:()=>oh,getAutomaticTypeDirectiveNames:()=>yM,getBaseFileName:()=>Wo,getBinaryOperatorPrecedence:()=>Ty,getBuildInfo:()=>mU,getBuildInfoFileVersionMap:()=>PW,getBuildInfoText:()=>fU,getBuildOrderFromAnyBuildOrder:()=>W$,getBuilderCreationParameters:()=>vW,getBuilderFileEmit:()=>QV,getCanonicalDiagnostic:()=>ef,getCheckFlags:()=>xx,getClassExtendsHeritageElement:()=>Ph,getClassLikeDeclarationOfSymbol:()=>Ix,getCombinedLocalAndExportSymbolFlags:()=>Tx,getCombinedModifierFlags:()=>fc,getCombinedNodeFlags:()=>gc,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>mc,getCommentRange:()=>Sw,getCommonSourceDirectory:()=>aU,getCommonSourceDirectoryOfConfig:()=>sU,getCompilerOptionValue:()=>sk,getCompilerOptionsDiffValue:()=>$j,getConditions:()=>gM,getConfigFileParsingDiagnostics:()=>OV,getConstantValue:()=>Fw,getContainerFlags:()=>YR,getContainerNode:()=>vX,getContainingClass:()=>om,getContainingClassExcludingClassDecorators:()=>cm,getContainingClassStaticBlock:()=>am,getContainingFunction:()=>rm,getContainingFunctionDeclaration:()=>im,getContainingFunctionOrClassStaticBlock:()=>sm,getContainingNodeArray:()=>GT,getContainingObjectLiteralElement:()=>T5,getContextualTypeFromParent:()=>CZ,getContextualTypeFromParentOrAncestorTypeNode:()=>UX,getCurrentTime:()=>U$,getDeclarationDiagnostics:()=>Nq,getDeclarationEmitExtensionForPath:()=>sv,getDeclarationEmitOutputFilePath:()=>ov,getDeclarationEmitOutputFilePathWorker:()=>av,getDeclarationFileExtension:()=>_O,getDeclarationFromName:()=>vh,getDeclarationModifierFlagsFromSymbol:()=>Sx,getDeclarationOfKind:()=>id,getDeclarationsOfKind:()=>od,getDeclaredExpandoInitializer:()=>ng,getDecorators:()=>Mc,getDefaultCompilerOptions:()=>u5,getDefaultFormatCodeSettings:()=>FG,getDefaultLibFileName:()=>qs,getDefaultLibFilePath:()=>w5,getDefaultLikeExportInfo:()=>j0,getDefaultLikeExportNameFromDeclaration:()=>l0,getDiagnosticText:()=>dj,getDiagnosticsWithinSpan:()=>t0,getDirectoryPath:()=>Vo,getDirectoryToWatchFailedLookupLocation:()=>zW,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>VW,getDocumentPositionMapper:()=>z1,getDocumentSpansEqualityComparer:()=>xY,getESModuleInterop:()=>BS,getEditsForFileRename:()=>i1,getEffectiveBaseTypeNode:()=>Dh,getEffectiveConstraintOfTypeParameter:()=>Sl,getEffectiveContainerForJSDocTemplateTag:()=>Gg,getEffectiveImplementsTypeNodes:()=>Eh,getEffectiveInitializer:()=>tg,getEffectiveJSDocHost:()=>Yg,getEffectiveModifierFlags:()=>rb,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>ib,getEffectiveModifierFlagsNoCache:()=>cb,getEffectiveReturnTypeNode:()=>Fv,getEffectiveSetAccessorTypeAnnotationNode:()=>Iv,getEffectiveTypeAnnotationNode:()=>Pv,getEffectiveTypeParameterDeclarations:()=>xl,getEffectiveTypeRoots:()=>_M,getElementOrPropertyAccessArgumentExpressionOrName:()=>bg,getElementOrPropertyAccessName:()=>xg,getElementsOfBindingOrAssignmentPattern:()=>OA,getEmitDeclarations:()=>VS,getEmitFlags:()=>ip,getEmitHelpers:()=>Lw,getEmitModuleDetectionKind:()=>MS,getEmitModuleKind:()=>jS,getEmitModuleResolutionKind:()=>LS,getEmitScriptTarget:()=>OS,getEmitStandardClassFields:()=>rk,getEnclosingBlockScopeContainer:()=>Lp,getEnclosingContainer:()=>jp,getEncodedSemanticClassifications:()=>H0,getEncodedSyntacticClassifications:()=>Y0,getEndLinePosition:()=>Od,getEntityNameFromTypeNode:()=>bm,getEntrypointsFromPackageJsonInfo:()=>aR,getErrorCountForSummary:()=>i$,getErrorSpanForNode:()=>rf,getErrorSummaryText:()=>c$,getEscapedTextOfIdentifierOrLiteral:()=>ty,getEscapedTextOfJsxAttributeName:()=>hC,getEscapedTextOfJsxNamespacedName:()=>bC,getExpandoInitializer:()=>ig,getExportAssignmentExpression:()=>wh,getExportInfoMap:()=>O0,getExportNeedsImportStarHelper:()=>UJ,getExpressionAssociativity:()=>yy,getExpressionPrecedence:()=>by,getExternalHelpersModuleName:()=>xA,getExternalModuleImportEqualsDeclarationExpression:()=>jm,getExternalModuleName:()=>Fg,getExternalModuleNameFromDeclaration:()=>nv,getExternalModuleNameFromPath:()=>rv,getExternalModuleNameLiteral:()=>wA,getExternalModuleRequireArgument:()=>Lm,getFallbackOptions:()=>MU,getFileEmitOutput:()=>HV,getFileMatcherPatterns:()=>Fk,getFileNamesFromConfigSpecs:()=>IL,getFileWatcherEventKind:()=>po,getFilesInErrorForSummary:()=>o$,getFirstConstructorWithBody:()=>vv,getFirstIdentifier:()=>wb,getFirstNonSpaceCharacterPosition:()=>iZ,getFirstProjectOutput:()=>_U,getFixableErrorSpanExpression:()=>r0,getFormatCodeSettingsForWriting:()=>x0,getFullWidth:()=>vd,getFunctionFlags:()=>$h,getHeritageClause:()=>Ih,getHostSignatureFromJSDoc:()=>Qg,getIdentifierAutoGenerate:()=>$w,getIdentifierGeneratedImportReference:()=>Kw,getIdentifierTypeArguments:()=>Vw,getImmediatelyInvokedFunctionExpression:()=>fm,getImpliedNodeFormatForFile:()=>jV,getImpliedNodeFormatForFileWorker:()=>LV,getImportNeedsImportDefaultHelper:()=>WJ,getImportNeedsImportStarHelper:()=>VJ,getIndentSize:()=>Gy,getIndentString:()=>Ky,getInferredLibraryNameResolveFrom:()=>wV,getInitializedVariables:()=>hx,getInitializerOfBinaryExpression:()=>kg,getInitializerOfBindingOrAssignmentElement:()=>DA,getInterfaceBaseTypeNodes:()=>Ah,getInternalEmitFlags:()=>op,getInvokedExpression:()=>xm,getIsolatedModules:()=>RS,getJSDocAugmentsTag:()=>$c,getJSDocClassTag:()=>Kc,getJSDocCommentRanges:()=>Cf,getJSDocCommentsAndTags:()=>Wg,getJSDocDeprecatedTag:()=>il,getJSDocDeprecatedTagNoCache:()=>ol,getJSDocEnumTag:()=>al,getJSDocHost:()=>Zg,getJSDocImplementsTags:()=>Hc,getJSDocOverloadTags:()=>Xg,getJSDocOverrideTagNoCache:()=>rl,getJSDocParameterTags:()=>Jc,getJSDocParameterTagsNoCache:()=>zc,getJSDocPrivateTag:()=>Qc,getJSDocPrivateTagNoCache:()=>Yc,getJSDocProtectedTag:()=>Zc,getJSDocProtectedTagNoCache:()=>el,getJSDocPublicTag:()=>Gc,getJSDocPublicTagNoCache:()=>Xc,getJSDocReadonlyTag:()=>tl,getJSDocReadonlyTagNoCache:()=>nl,getJSDocReturnTag:()=>cl,getJSDocReturnType:()=>pl,getJSDocRoot:()=>eh,getJSDocSatisfiesExpressionType:()=>mC,getJSDocSatisfiesTag:()=>_l,getJSDocTags:()=>ml,getJSDocTagsNoCache:()=>gl,getJSDocTemplateTag:()=>ll,getJSDocThisTag:()=>sl,getJSDocType:()=>dl,getJSDocTypeAliasName:()=>jA,getJSDocTypeAssertionType:()=>mA,getJSDocTypeParameterDeclarations:()=>Av,getJSDocTypeParameterTags:()=>Uc,getJSDocTypeParameterTagsNoCache:()=>Vc,getJSDocTypeTag:()=>ul,getJSXImplicitImportBase:()=>lk,getJSXRuntimeImport:()=>_k,getJSXTransformEnabled:()=>ck,getKeyForCompilerOptions:()=>SM,getLanguageVariant:()=>DS,getLastChild:()=>Rx,getLeadingCommentRanges:()=>Cs,getLeadingCommentRangesOfNode:()=>Tf,getLeftmostAccessExpression:()=>Wx,getLeftmostExpression:()=>Hx,getLibraryNameFromLibFileName:()=>NV,getLineAndCharacterOfPosition:()=>ns,getLineInfo:()=>xJ,getLineOfLocalPosition:()=>hv,getLineOfLocalPositionFromLineMap:()=>yv,getLineStartPositionForPosition:()=>kX,getLineStarts:()=>Ya,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>mx,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>fx,getLinesBetweenPositions:()=>ts,getLinesBetweenRangeEndAndRangeStart:()=>lx,getLinesBetweenRangeEndPositions:()=>_x,getLiteralText:()=>cp,getLocalNameForExternalImport:()=>CA,getLocalSymbolForExportDefault:()=>Rb,getLocaleSpecificMessage:()=>lS,getLocaleTimeString:()=>t$,getMappedContextSpan:()=>wY,getMappedDocumentSpan:()=>CY,getMappedLocation:()=>TY,getMatchedFileSpec:()=>p$,getMatchedIncludeSpec:()=>f$,getMeaningFromDeclaration:()=>WG,getMeaningFromLocation:()=>$G,getMembersOfDeclaration:()=>Rf,getModeForFileReference:()=>lV,getModeForResolutionAtIndex:()=>_V,getModeForUsageLocation:()=>dV,getModifiedTime:()=>no,getModifiers:()=>Rc,getModuleInstanceState:()=>qR,getModuleNameStringLiteralAt:()=>$V,getModuleSpecifierEndingPreference:()=>tT,getModuleSpecifierResolverHost:()=>tY,getNameForExportedSymbol:()=>s0,getNameFromImportAttribute:()=>PC,getNameFromIndexInfo:()=>Bp,getNameFromPropertyName:()=>XQ,getNameOfAccessExpression:()=>Ux,getNameOfCompilerOptionValue:()=>Uj,getNameOfDeclaration:()=>jc,getNameOfExpando:()=>ag,getNameOfJSDocTypedef:()=>Ac,getNameOfScriptTarget:()=>nk,getNameOrArgument:()=>vg,getNameTable:()=>k5,getNamesForExportedSymbol:()=>a0,getNamespaceDeclarationNode:()=>Ag,getNewLineCharacter:()=>Xb,getNewLineKind:()=>v0,getNewLineOrDefaultFromHost:()=>$Y,getNewTargetContainer:()=>dm,getNextJSDocCommentLocation:()=>Hg,getNodeChildren:()=>VF,getNodeForGeneratedName:()=>cI,getNodeId:()=>KB,getNodeKind:()=>bX,getNodeModifiers:()=>xQ,getNodeModulePathParts:()=>iC,getNonAssignedNameOfDeclaration:()=>Oc,getNonAssignmentOperatorForCompoundAssignment:()=>ez,getNonAugmentationDeclaration:()=>Sp,getNonDecoratorTokenPosOfNode:()=>Qd,getNormalizedAbsolutePath:()=>ta,getNormalizedAbsolutePathWithoutRoot:()=>ra,getNormalizedPathComponents:()=>ea,getObjectFlags:()=>Ox,getOperator:()=>xy,getOperatorAssociativity:()=>vy,getOperatorPrecedence:()=>ky,getOptionFromName:()=>sj,getOptionsForLibraryResolution:()=>IM,getOptionsNameMap:()=>HO,getOrCreateEmitNode:()=>lw,getOrCreateExternalHelpersModuleNameIfNeeded:()=>TA,getOrUpdate:()=>G,getOriginalNode:()=>bc,getOriginalNodeId:()=>BJ,getOriginalSourceFile:()=>gy,getOutputDeclarationFileName:()=>Zq,getOutputDeclarationFileNameWorker:()=>eU,getOutputExtension:()=>Qq,getOutputFileNames:()=>lU,getOutputJSFileNameWorker:()=>nU,getOutputPathsFor:()=>Gq,getOutputPathsForBundle:()=>Kq,getOwnEmitOutputFilePath:()=>iv,getOwnKeys:()=>ze,getOwnValues:()=>Ue,getPackageJsonInfo:()=>dR,getPackageJsonTypesVersionsPaths:()=>lM,getPackageJsonsVisibleToFile:()=>KZ,getPackageNameFromTypesPackageName:()=>FR,getPackageScopeForPath:()=>lR,getParameterSymbolFromJSDoc:()=>Kg,getParameterTypeNode:()=>oC,getParentNodeInSpan:()=>fY,getParseTreeNode:()=>kc,getParsedCommandLineOfConfigFile:()=>pj,getPathComponents:()=>Ko,getPathComponentsRelativeTo:()=>ha,getPathFromPathComponents:()=>Go,getPathUpdater:()=>o1,getPathsBasePath:()=>lv,getPatternFromSpec:()=>Dk,getPendingEmitKind:()=>YV,getPositionOfLineAndCharacter:()=>Xa,getPossibleGenericSignatures:()=>gQ,getPossibleOriginalInputExtensionForExtension:()=>cv,getPossibleTypeArgumentsInfo:()=>hQ,getPreEmitDiagnostics:()=>HU,getPrecedingNonSpaceCharacterPosition:()=>oZ,getPrivateIdentifier:()=>mz,getProperties:()=>iz,getProperty:()=>Je,getPropertyArrayElementValue:()=>Zf,getPropertyAssignmentAliasLikeExpression:()=>Nh,getPropertyNameForPropertyNameNode:()=>Yh,getPropertyNameForUniqueESSymbol:()=>ny,getPropertyNameFromType:()=>TC,getPropertyNameOfBindingOrAssignmentElement:()=>FA,getPropertySymbolFromBindingElement:()=>pY,getPropertySymbolsFromContextualType:()=>C5,getQuoteFromPreference:()=>cY,getQuotePreference:()=>sY,getRangesWhere:()=>te,getRefactorContextSpan:()=>n0,getReferencedFileLocation:()=>AV,getRegexFromPattern:()=>Ak,getRegularExpressionForWildcard:()=>Ck,getRegularExpressionsForWildcards:()=>wk,getRelativePathFromDirectory:()=>ya,getRelativePathFromFile:()=>ba,getRelativePathToDirectoryOrUrl:()=>xa,getRenameLocation:()=>yZ,getReplacementSpanForContextToken:()=>OQ,getResolutionDiagnostic:()=>VV,getResolutionModeOverride:()=>fV,getResolveJsonModule:()=>US,getResolvePackageJsonExports:()=>zS,getResolvePackageJsonImports:()=>qS,getResolvedExternalModuleName:()=>ev,getRestIndicatorOfBindingOrAssignmentElement:()=>EA,getRestParameterElementType:()=>Mf,getRightMostAssignedExpression:()=>cg,getRootDeclaration:()=>py,getRootDirectoryOfResolutionCache:()=>WW,getRootLength:()=>Uo,getRootPathSplitLength:()=>$W,getScriptKind:()=>eZ,getScriptKindFromFileName:()=>Mk,getScriptTargetFeatures:()=>ap,getSelectedEffectiveModifierFlags:()=>eb,getSelectedSyntacticModifierFlags:()=>tb,getSemanticClassifications:()=>W0,getSemanticJsxChildren:()=>Cy,getSetAccessorTypeAnnotationNode:()=>xv,getSetAccessorValueParameter:()=>bv,getSetExternalModuleIndicator:()=>AS,getShebang:()=>Ns,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>Jg,getSingleVariableOfVariableStatement:()=>zg,getSnapshotText:()=>HQ,getSnippetElement:()=>Rw,getSourceFileOfModule:()=>Pd,getSourceFileOfNode:()=>Dd,getSourceFilePathInNewDir:()=>dv,getSourceFilePathInNewDirWorker:()=>pv,getSourceFileVersionAsHashFromText:()=>C$,getSourceFilesToEmit:()=>_v,getSourceMapRange:()=>gw,getSourceMapper:()=>J1,getSourceTextOfNodeFromSourceFile:()=>Yd,getSpanOfTokenAtPosition:()=>tf,getSpellingSuggestion:()=>Kt,getStartPositionOfLine:()=>Ad,getStartPositionOfRange:()=>px,getStartsOnNewLine:()=>bw,getStaticPropertiesAndClassStaticBlock:()=>az,getStrictOptionValue:()=>tk,getStringComparer:()=>Bt,getSubPatternFromSpec:()=>Pk,getSuperCallFromStatement:()=>tz,getSuperContainer:()=>pm,getSupportedCodeFixes:()=>d5,getSupportedExtensions:()=>Gk,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>Xk,getSwitchedType:()=>EZ,getSymbolId:()=>GB,getSymbolNameForPrivateIdentifier:()=>ry,getSymbolParentOrFail:()=>_0,getSymbolTarget:()=>tZ,getSyntacticClassifications:()=>Q0,getSyntacticModifierFlags:()=>ob,getSyntacticModifierFlagsNoCache:()=>lb,getSynthesizedDeepClone:()=>aZ,getSynthesizedDeepCloneWithReplacements:()=>sZ,getSynthesizedDeepClones:()=>lZ,getSynthesizedDeepClonesWithReplacements:()=>_Z,getSyntheticLeadingComments:()=>Tw,getSyntheticTrailingComments:()=>Nw,getTargetLabel:()=>aX,getTargetOfBindingOrAssignmentElement:()=>PA,getTemporaryModuleResolutionState:()=>cR,getTextOfConstantValue:()=>lp,getTextOfIdentifierOrLiteral:()=>ey,getTextOfJSDocComment:()=>bl,getTextOfJsxAttributeName:()=>yC,getTextOfJsxNamespacedName:()=>xC,getTextOfNode:()=>tp,getTextOfNodeFromSourceText:()=>ep,getTextOfPropertyName:()=>qp,getThisContainer:()=>lm,getThisParameter:()=>Sv,getTokenAtPosition:()=>YX,getTokenPosOfNode:()=>Xd,getTokenSourceMapRange:()=>yw,getTouchingPropertyName:()=>XX,getTouchingToken:()=>QX,getTrailingCommentRanges:()=>ws,getTrailingSemicolonDeferringWriter:()=>Qy,getTransformFlagsSubtreeExclusions:()=>nw,getTransformers:()=>Oq,getTsBuildInfoEmitOutputFilePath:()=>Hq,getTsConfigObjectLiteralExpression:()=>em,getTsConfigPropArrayElementValue:()=>tm,getTypeAnnotationNode:()=>Ev,getTypeArgumentOrTypeParameterList:()=>SQ,getTypeKeywordOfTypeOnlyImport:()=>yY,getTypeNode:()=>qw,getTypeNodeIfAccessible:()=>AZ,getTypeParameterFromJsDoc:()=>th,getTypeParameterOwner:()=>cc,getTypesPackageName:()=>PR,getUILocale:()=>Ut,getUniqueName:()=>hZ,getUniqueSymbolId:()=>rZ,getUseDefineForClassFields:()=>GS,getWatchErrorSummaryDiagnosticMessage:()=>a$,getWatchFactory:()=>LU,group:()=>Qe,groupBy:()=>Ye,guessIndentation:()=>Hu,handleNoEmitOptions:()=>JV,handleWatchOptionsConfigDirTemplateSubstitution:()=>iL,hasAbstractModifier:()=>Gv,hasAccessorModifier:()=>Qv,hasAmbientModifier:()=>Xv,hasChangesInResolutions:()=>wd,hasChildOfKind:()=>MX,hasContextSensitiveParameters:()=>XT,hasDecorators:()=>Zv,hasDocComment:()=>vQ,hasDynamicName:()=>Xh,hasEffectiveModifier:()=>Vv,hasEffectiveModifiers:()=>qv,hasEffectiveReadonlyModifier:()=>Yv,hasExtension:()=>Mo,hasIndexSignature:()=>PZ,hasInferredType:()=>MC,hasInitializer:()=>qu,hasInvalidEscape:()=>Ey,hasJSDocNodes:()=>Ju,hasJSDocParameterTags:()=>Wc,hasJSFileExtension:()=>Qk,hasJsonModuleEmitEnabled:()=>QS,hasOnlyExpressionInitializer:()=>Uu,hasOverrideModifier:()=>Kv,hasPossibleExternalModuleReference:()=>Ip,hasProperty:()=>Be,hasPropertyAccessExpressionWithName:()=>sX,hasQuestionToken:()=>jg,hasRecordedExternalHelpers:()=>SA,hasResolutionModeOverride:()=>wC,hasRestParameter:()=>Xu,hasScopeMarker:()=>su,hasStaticModifier:()=>Hv,hasSyntacticModifier:()=>Wv,hasSyntacticModifiers:()=>Uv,hasTSFileExtension:()=>Yk,hasTabstop:()=>_C,hasTrailingDirectorySeparator:()=>Jo,hasType:()=>zu,hasTypeArguments:()=>nh,hasZeroOrOneAsteriskCharacter:()=>uk,helperString:()=>Yw,hostGetCanonicalFileName:()=>Zy,hostUsesCaseSensitiveFileNames:()=>Yy,idText:()=>wc,identifierIsThisKeyword:()=>Nv,identifierToKeywordKind:()=>Nc,identity:()=>yt,identitySourceMapConsumer:()=>RJ,ignoreSourceNewlines:()=>Jw,ignoredPaths:()=>fo,importDefaultHelper:()=>SN,importFromModuleSpecifier:()=>Pg,importStarHelper:()=>xN,indexOfAnyCharCode:()=>A,indexOfNode:()=>rp,indicesOf:()=>ie,inferredTypesContainingFile:()=>CV,injectClassNamedEvaluationHelperBlockIfMissing:()=>Jz,injectClassThisAssignmentIfMissing:()=>Iz,insertImports:()=>hY,insertLeadingStatement:()=>tA,insertSorted:()=>se,insertStatementAfterCustomPrologue:()=>$d,insertStatementAfterStandardPrologue:()=>Wd,insertStatementsAfterCustomPrologue:()=>Vd,insertStatementsAfterStandardPrologue:()=>Ud,intersperse:()=>k,intrinsicTagNameToString:()=>SC,introducesArgumentsExoticObject:()=>Wf,inverseJsxOptionMap:()=>SO,isAbstractConstructorSymbol:()=>Ax,isAbstractModifier:()=>aD,isAccessExpression:()=>qx,isAccessibilityModifier:()=>DQ,isAccessor:()=>k_,isAccessorModifier:()=>cD,isAliasSymbolDeclaration:()=>Sh,isAliasableExpression:()=>Th,isAmbientModule:()=>pp,isAmbientPropertyDeclaration:()=>Cp,isAnonymousFunctionDefinition:()=>cy,isAnyDirectorySeparator:()=>Eo,isAnyImportOrBareOrAccessedRequire:()=>Ep,isAnyImportOrReExport:()=>Op,isAnyImportOrRequireStatement:()=>Fp,isAnyImportSyntax:()=>Pp,isAnySupportedFileExtension:()=>gT,isApplicableVersionedTypesKey:()=>xR,isArgumentExpressionOfElementAccess:()=>fX,isArray:()=>ct,isArrayBindingElement:()=>L_,isArrayBindingOrAssignmentElement:()=>U_,isArrayBindingOrAssignmentPattern:()=>q_,isArrayBindingPattern:()=>ZD,isArrayLiteralExpression:()=>tP,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>EQ,isArrayTypeNode:()=>OD,isArrowFunction:()=>uP,isAsExpression:()=>wP,isAssertClause:()=>mE,isAssertEntry:()=>gE,isAssertionExpression:()=>ru,isAssertsKeyword:()=>nD,isAssignmentDeclaration:()=>eg,isAssignmentExpression:()=>xb,isAssignmentOperator:()=>yb,isAssignmentPattern:()=>j_,isAssignmentTarget:()=>ah,isAsteriskToken:()=>WN,isAsyncFunction:()=>Hh,isAsyncModifier:()=>tD,isAutoAccessorPropertyDeclaration:()=>T_,isAwaitExpression:()=>mP,isAwaitKeyword:()=>rD,isBigIntLiteral:()=>IN,isBinaryExpression:()=>yP,isBinaryOperatorToken:()=>XA,isBindableObjectDefinePropertyCall:()=>pg,isBindableStaticAccessExpression:()=>gg,isBindableStaticElementAccessExpression:()=>hg,isBindableStaticNameExpression:()=>yg,isBindingElement:()=>eP,isBindingElementOfBareOrAccessedRequire:()=>Gm,isBindingName:()=>p_,isBindingOrAssignmentElement:()=>R_,isBindingOrAssignmentPattern:()=>B_,isBindingPattern:()=>O_,isBlock:()=>jP,isBlockLike:()=>w0,isBlockOrCatchScoped:()=>up,isBlockScope:()=>wp,isBlockScopedContainerTopLevel:()=>yp,isBooleanLiteral:()=>h_,isBreakOrContinueStatement:()=>Ll,isBreakStatement:()=>$P,isBuild:()=>vK,isBuildInfoFile:()=>Wq,isBuilderProgram:()=>l$,isBundle:()=>YE,isCallChain:()=>Nl,isCallExpression:()=>oP,isCallExpressionTarget:()=>KG,isCallLikeExpression:()=>H_,isCallLikeOrFunctionLikeExpression:()=>$_,isCallOrNewExpression:()=>K_,isCallOrNewExpressionTarget:()=>XG,isCallSignatureDeclaration:()=>CD,isCallToHelper:()=>FN,isCaseBlock:()=>lE,isCaseClause:()=>UE,isCaseKeyword:()=>uD,isCaseOrDefaultClause:()=>Ou,isCatchClause:()=>$E,isCatchClauseVariableDeclaration:()=>YT,isCatchClauseVariableDeclarationOrBindingElement:()=>dp,isCheckJsEnabledForFile:()=>yT,isChildOfNodeWithKind:()=>Of,isCircularBuildOrder:()=>V$,isClassDeclaration:()=>rE,isClassElement:()=>x_,isClassExpression:()=>kP,isClassInstanceProperty:()=>C_,isClassLike:()=>S_,isClassMemberModifier:()=>l_,isClassNamedEvaluationHelperBlock:()=>Mz,isClassOrTypeElement:()=>E_,isClassStaticBlockDeclaration:()=>xD,isClassThisAssignmentBlock:()=>Fz,isCollapsedRange:()=>nx,isColonToken:()=>KN,isCommaExpression:()=>dA,isCommaListExpression:()=>AP,isCommaSequence:()=>pA,isCommaToken:()=>qN,isComment:()=>kQ,isCommonJsExportPropertyAssignment:()=>Uf,isCommonJsExportedExpression:()=>qf,isCompoundAssignment:()=>ZJ,isComputedNonLiteralName:()=>Jp,isComputedPropertyName:()=>pD,isConciseBody:()=>uu,isConditionalExpression:()=>vP,isConditionalTypeNode:()=>zD,isConstAssertion:()=>AC,isConstTypeReference:()=>Il,isConstructSignatureDeclaration:()=>wD,isConstructorDeclaration:()=>SD,isConstructorTypeNode:()=>FD,isContextualKeyword:()=>Rh,isContinueStatement:()=>WP,isCustomPrologue:()=>bf,isDebuggerStatement:()=>ZP,isDeclaration:()=>ku,isDeclarationBindingElement:()=>M_,isDeclarationFileName:()=>lO,isDeclarationName:()=>yh,isDeclarationNameOfEnumOrNamespace:()=>gx,isDeclarationReadonly:()=>lf,isDeclarationStatement:()=>Tu,isDeclarationWithTypeParameterChildren:()=>Dp,isDeclarationWithTypeParameters:()=>Np,isDecorator:()=>gD,isDecoratorTarget:()=>YG,isDefaultClause:()=>VE,isDefaultImport:()=>Ig,isDefaultModifier:()=>eD,isDefaultedExpandoInitializer:()=>og,isDeleteExpression:()=>dP,isDeleteTarget:()=>gh,isDeprecatedDeclaration:()=>h0,isDestructuringAssignment:()=>kb,isDiagnosticWithLocation:()=>ZZ,isDiskPathRoot:()=>Io,isDoStatement:()=>JP,isDocumentRegistryEntry:()=>Z0,isDotDotDotToken:()=>zN,isDottedName:()=>Nb,isDynamicName:()=>Qh,isESSymbolIdentifier:()=>ay,isEffectiveExternalModule:()=>kp,isEffectiveModuleDeclaration:()=>gp,isEffectiveStrictModeSourceFile:()=>Tp,isElementAccessChain:()=>wl,isElementAccessExpression:()=>iP,isEmittedFileOfProgram:()=>OU,isEmptyArrayLiteral:()=>Mb,isEmptyBindingElement:()=>uc,isEmptyBindingPattern:()=>_c,isEmptyObjectLiteral:()=>Lb,isEmptyStatement:()=>MP,isEmptyStringLiteral:()=>Dm,isEntityName:()=>u_,isEntityNameExpression:()=>Cb,isEnumConst:()=>cf,isEnumDeclaration:()=>aE,isEnumMember:()=>XE,isEqualityOperatorKind:()=>NZ,isEqualsGreaterThanToken:()=>XN,isExclamationToken:()=>$N,isExcludedFile:()=>OL,isExclusivelyTypeOnlyImportOrExport:()=>uV,isExpandoPropertyDeclaration:()=>CC,isExportAssignment:()=>kE,isExportDeclaration:()=>TE,isExportModifier:()=>ZN,isExportName:()=>cA,isExportNamespaceAsDefaultDeclaration:()=>Zd,isExportOrDefaultModifier:()=>oI,isExportSpecifier:()=>wE,isExportsIdentifier:()=>lg,isExportsOrModuleExportsOrAlias:()=>QR,isExpression:()=>nu,isExpressionNode:()=>Em,isExpressionOfExternalModuleImportEqualsDeclaration:()=>yX,isExpressionOfOptionalChainRoot:()=>El,isExpressionStatement:()=>RP,isExpressionWithTypeArguments:()=>CP,isExpressionWithTypeArgumentsInClassExtendsClause:()=>Tb,isExternalModule:()=>tO,isExternalModuleAugmentation:()=>bp,isExternalModuleImportEqualsDeclaration:()=>Om,isExternalModuleIndicator:()=>lu,isExternalModuleNameRelative:()=>Js,isExternalModuleReference:()=>EE,isExternalModuleSymbol:()=>cd,isExternalOrCommonJsModule:()=>af,isFileLevelReservedGeneratedIdentifier:()=>i_,isFileLevelUniqueName:()=>jd,isFileProbablyExternalModule:()=>NI,isFirstDeclarationOfSymbolParameter:()=>NY,isFixablePromiseHandler:()=>G1,isForInOrOfStatement:()=>_u,isForInStatement:()=>UP,isForInitializer:()=>pu,isForOfStatement:()=>VP,isForStatement:()=>qP,isFullSourceFile:()=>Rm,isFunctionBlock:()=>Hf,isFunctionBody:()=>du,isFunctionDeclaration:()=>nE,isFunctionExpression:()=>_P,isFunctionExpressionOrArrowFunction:()=>ZT,isFunctionLike:()=>f_,isFunctionLikeDeclaration:()=>g_,isFunctionLikeKind:()=>v_,isFunctionLikeOrClassStaticBlockDeclaration:()=>m_,isFunctionOrConstructorTypeNode:()=>I_,isFunctionOrModuleBlock:()=>b_,isFunctionSymbol:()=>Ng,isFunctionTypeNode:()=>ED,isFutureReservedKeyword:()=>Jh,isGeneratedIdentifier:()=>n_,isGeneratedPrivateIdentifier:()=>r_,isGetAccessor:()=>Bu,isGetAccessorDeclaration:()=>kD,isGetOrSetAccessorDeclaration:()=>Tl,isGlobalDeclaration:()=>m0,isGlobalScopeAugmentation:()=>vp,isGlobalSourceFile:()=>of,isGrammarError:()=>Rd,isHeritageClause:()=>WE,isHoistedFunction:()=>xf,isHoistedVariableStatement:()=>kf,isIdentifier:()=>QN,isIdentifierANonContextualKeyword:()=>Uh,isIdentifierName:()=>xh,isIdentifierOrThisTypeNode:()=>zA,isIdentifierPart:()=>Ps,isIdentifierStart:()=>Ds,isIdentifierText:()=>Es,isIdentifierTypePredicate:()=>Xf,isIdentifierTypeReference:()=>jT,isIfStatement:()=>BP,isIgnoredFileFromWildCardWatching:()=>AU,isImplicitGlob:()=>Nk,isImportAttribute:()=>yE,isImportAttributeName:()=>t_,isImportAttributes:()=>hE,isImportCall:()=>gf,isImportClause:()=>pE,isImportDeclaration:()=>dE,isImportEqualsDeclaration:()=>uE,isImportKeyword:()=>_D,isImportMeta:()=>hf,isImportOrExportSpecifier:()=>Xl,isImportOrExportSpecifierName:()=>ZY,isImportSpecifier:()=>SE,isImportTypeAssertionContainer:()=>fE,isImportTypeNode:()=>GD,isImportableFile:()=>F0,isInComment:()=>yQ,isInCompoundLikeAssignment:()=>sh,isInExpressionContext:()=>Fm,isInJSDoc:()=>Vm,isInJSFile:()=>zm,isInJSXText:()=>uQ,isInJsonFile:()=>qm,isInNonReferenceComment:()=>AQ,isInReferenceComment:()=>FQ,isInRightSideOfInternalImportEqualsDeclaration:()=>HG,isInString:()=>sQ,isInTemplateString:()=>_Q,isInTopLevelContext:()=>um,isInTypeQuery:()=>Cv,isIncrementalCompilation:()=>$S,isIndexSignatureDeclaration:()=>ND,isIndexedAccessTypeNode:()=>$D,isInferTypeNode:()=>qD,isInfinityOrNaNString:()=>QT,isInitializedProperty:()=>sz,isInitializedVariable:()=>yx,isInsideJsxElement:()=>dQ,isInsideJsxElementOrAttribute:()=>cQ,isInsideNodeModules:()=>YZ,isInsideTemplateLiteral:()=>NQ,isInstanceOfExpression:()=>Ob,isInstantiatedModule:()=>XB,isInterfaceDeclaration:()=>iE,isInternalDeclaration:()=>Zu,isInternalModuleImportEqualsDeclaration:()=>Mm,isInternalName:()=>aA,isIntersectionTypeNode:()=>JD,isIntrinsicJsxName:()=>$y,isIterationStatement:()=>ou,isJSDoc:()=>pF,isJSDocAllType:()=>oF,isJSDocAugmentsTag:()=>gF,isJSDocAuthorTag:()=>hF,isJSDocCallbackTag:()=>vF,isJSDocClassTag:()=>yF,isJSDocCommentContainingNode:()=>Lu,isJSDocConstructSignature:()=>Lg,isJSDocDeprecatedTag:()=>wF,isJSDocEnumTag:()=>DF,isJSDocFunctionType:()=>_F,isJSDocImplementsTag:()=>MF,isJSDocImportTag:()=>JF,isJSDocIndexSignature:()=>Wm,isJSDocLikeText:()=>wI,isJSDocLink:()=>nF,isJSDocLinkCode:()=>rF,isJSDocLinkLike:()=>Gu,isJSDocLinkPlain:()=>iF,isJSDocMemberName:()=>tF,isJSDocNameReference:()=>eF,isJSDocNamepathType:()=>dF,isJSDocNamespaceBody:()=>gu,isJSDocNode:()=>ju,isJSDocNonNullableType:()=>cF,isJSDocNullableType:()=>sF,isJSDocOptionalParameter:()=>uC,isJSDocOptionalType:()=>lF,isJSDocOverloadTag:()=>CF,isJSDocOverrideTag:()=>TF,isJSDocParameterTag:()=>PF,isJSDocPrivateTag:()=>xF,isJSDocPropertyLikeTag:()=>Rl,isJSDocPropertyTag:()=>LF,isJSDocProtectedTag:()=>SF,isJSDocPublicTag:()=>bF,isJSDocReadonlyTag:()=>kF,isJSDocReturnTag:()=>EF,isJSDocSatisfiesExpression:()=>fC,isJSDocSatisfiesTag:()=>RF,isJSDocSeeTag:()=>NF,isJSDocSignature:()=>mF,isJSDocTag:()=>Mu,isJSDocTemplateTag:()=>IF,isJSDocThisTag:()=>FF,isJSDocThrowsTag:()=>BF,isJSDocTypeAlias:()=>Mg,isJSDocTypeAssertion:()=>fA,isJSDocTypeExpression:()=>ZE,isJSDocTypeLiteral:()=>fF,isJSDocTypeTag:()=>AF,isJSDocTypedefTag:()=>OF,isJSDocUnknownTag:()=>jF,isJSDocUnknownType:()=>aF,isJSDocVariadicType:()=>uF,isJSXTagName:()=>Pm,isJsonEqual:()=>DT,isJsonSourceFile:()=>sf,isJsxAttribute:()=>RE,isJsxAttributeLike:()=>Fu,isJsxAttributeName:()=>vC,isJsxAttributes:()=>BE,isJsxChild:()=>Eu,isJsxClosingElement:()=>OE,isJsxClosingFragment:()=>ME,isJsxElement:()=>FE,isJsxExpression:()=>zE,isJsxFragment:()=>jE,isJsxNamespacedName:()=>qE,isJsxOpeningElement:()=>IE,isJsxOpeningFragment:()=>LE,isJsxOpeningLikeElement:()=>Iu,isJsxOpeningLikeElementTagName:()=>ZG,isJsxSelfClosingElement:()=>AE,isJsxSpreadAttribute:()=>JE,isJsxTagNameExpression:()=>Pu,isJsxText:()=>jN,isJumpStatementTarget:()=>cX,isKeyword:()=>jh,isKeywordOrPunctuation:()=>Mh,isKnownSymbol:()=>iy,isLabelName:()=>_X,isLabelOfLabeledStatement:()=>lX,isLabeledStatement:()=>XP,isLateVisibilityPaintedStatement:()=>Ap,isLeftHandSideExpression:()=>X_,isLeftHandSideOfAssignment:()=>Sb,isLet:()=>ff,isLineBreak:()=>os,isLiteralComputedPropertyDeclarationName:()=>bh,isLiteralExpression:()=>Wl,isLiteralExpressionOfObject:()=>$l,isLiteralImportTypeNode:()=>yf,isLiteralKind:()=>Vl,isLiteralLikeAccess:()=>fg,isLiteralLikeElementAccess:()=>mg,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>hX,isLiteralTypeLikeExpression:()=>WA,isLiteralTypeLiteral:()=>tu,isLiteralTypeNode:()=>KD,isLocalName:()=>sA,isLogicalOperator:()=>pb,isLogicalOrCoalescingAssignmentExpression:()=>mb,isLogicalOrCoalescingAssignmentOperator:()=>fb,isLogicalOrCoalescingBinaryExpression:()=>hb,isLogicalOrCoalescingBinaryOperator:()=>gb,isMappedTypeNode:()=>HD,isMemberName:()=>kl,isMetaProperty:()=>PP,isMethodDeclaration:()=>bD,isMethodOrAccessor:()=>w_,isMethodSignature:()=>vD,isMinusToken:()=>VN,isMissingDeclaration:()=>NE,isMissingPackageJsonInfo:()=>bM,isModifier:()=>__,isModifierKind:()=>s_,isModifierLike:()=>D_,isModuleAugmentationExternal:()=>xp,isModuleBlock:()=>cE,isModuleBody:()=>fu,isModuleDeclaration:()=>sE,isModuleExportsAccessExpression:()=>ug,isModuleIdentifier:()=>_g,isModuleName:()=>VA,isModuleOrEnumDeclaration:()=>yu,isModuleReference:()=>Du,isModuleSpecifierLike:()=>uY,isModuleWithStringLiteralName:()=>fp,isNameOfFunctionDeclaration:()=>gX,isNameOfModuleDeclaration:()=>mX,isNamedClassElement:()=>N_,isNamedDeclaration:()=>Ic,isNamedEvaluation:()=>_y,isNamedEvaluationSource:()=>ly,isNamedExportBindings:()=>Ml,isNamedExports:()=>CE,isNamedImportBindings:()=>hu,isNamedImports:()=>xE,isNamedImportsOrExports:()=>Vx,isNamedTupleMember:()=>LD,isNamespaceBody:()=>mu,isNamespaceExport:()=>bE,isNamespaceExportDeclaration:()=>_E,isNamespaceImport:()=>vE,isNamespaceReexportDeclaration:()=>Im,isNewExpression:()=>aP,isNewExpressionTarget:()=>GG,isNoSubstitutionTemplateLiteral:()=>MN,isNode:()=>Bl,isNodeArray:()=>Ul,isNodeArrayMultiLine:()=>ux,isNodeDescendantOf:()=>hh,isNodeKind:()=>Jl,isNodeLikeSystem:()=>kn,isNodeModulesDirectory:()=>ka,isNodeWithPossibleHoistedDeclaration:()=>ch,isNonContextualKeyword:()=>Bh,isNonExportDefaultModifier:()=>aI,isNonGlobalAmbientModule:()=>mp,isNonGlobalDeclaration:()=>g0,isNonNullAccess:()=>pC,isNonNullChain:()=>jl,isNonNullExpression:()=>DP,isNonStaticMethodOrAccessorWithPrivateName:()=>cz,isNotEmittedOrPartiallyEmittedNode:()=>iu,isNotEmittedStatement:()=>DE,isNullishCoalesce:()=>Al,isNumber:()=>ut,isNumericLiteral:()=>AN,isNumericLiteralName:()=>tC,isObjectBindingElementWithoutPropertyName:()=>dY,isObjectBindingOrAssignmentElement:()=>z_,isObjectBindingOrAssignmentPattern:()=>J_,isObjectBindingPattern:()=>YD,isObjectLiteralElement:()=>Vu,isObjectLiteralElementLike:()=>F_,isObjectLiteralExpression:()=>nP,isObjectLiteralMethod:()=>Kf,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>Gf,isObjectTypeDeclaration:()=>Jx,isOctalDigit:()=>_s,isOmittedExpression:()=>TP,isOptionalChain:()=>Dl,isOptionalChainRoot:()=>Pl,isOptionalDeclaration:()=>dC,isOptionalJSDocPropertyLikeTag:()=>cC,isOptionalTypeNode:()=>MD,isOuterExpression:()=>gA,isOutermostOptionalChain:()=>Fl,isOverrideModifier:()=>sD,isPackageJsonInfo:()=>vM,isPackedArrayLiteral:()=>$T,isParameter:()=>mD,isParameterPropertyDeclaration:()=>lc,isParameterPropertyModifier:()=>c_,isParenthesizedExpression:()=>lP,isParenthesizedTypeNode:()=>UD,isParseTreeNode:()=>Sc,isPartOfParameterDeclaration:()=>dy,isPartOfTypeNode:()=>Af,isPartOfTypeQuery:()=>Am,isPartiallyEmittedExpression:()=>FP,isPatternMatch:()=>dn,isPinnedComment:()=>Kd,isPlainJsFile:()=>Ed,isPlusToken:()=>UN,isPossiblyTypeArgumentPosition:()=>mQ,isPostfixUnaryExpression:()=>hP,isPrefixUnaryExpression:()=>gP,isPrimitiveLiteralValue:()=>jC,isPrivateIdentifier:()=>YN,isPrivateIdentifierClassElementDeclaration:()=>o_,isPrivateIdentifierPropertyAccessExpression:()=>a_,isPrivateIdentifierSymbol:()=>oy,isProgramBundleEmitBuildInfo:()=>hW,isProgramUptoDate:()=>IV,isPrologueDirective:()=>vf,isPropertyAccessChain:()=>Cl,isPropertyAccessEntityNameExpression:()=>Db,isPropertyAccessExpression:()=>rP,isPropertyAccessOrQualifiedName:()=>W_,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>V_,isPropertyAssignment:()=>HE,isPropertyDeclaration:()=>yD,isPropertyName:()=>d_,isPropertyNameLiteral:()=>Zh,isPropertySignature:()=>hD,isProtoSetter:()=>sy,isPrototypeAccess:()=>Eb,isPrototypePropertyAssignment:()=>Tg,isPunctuation:()=>Lh,isPushOrUnshiftIdentifier:()=>uy,isQualifiedName:()=>dD,isQuestionDotToken:()=>GN,isQuestionOrExclamationToken:()=>JA,isQuestionOrPlusOrMinusToken:()=>UA,isQuestionToken:()=>HN,isRawSourceMap:()=>TJ,isReadonlyKeyword:()=>iD,isReadonlyKeywordOrPlusOrMinusToken:()=>qA,isRecognizedTripleSlashComment:()=>Hd,isReferenceFileLocation:()=>FV,isReferencedFile:()=>EV,isRegularExpressionLiteral:()=>LN,isRequireCall:()=>$m,isRequireVariableStatement:()=>Qm,isRestParameter:()=>Qu,isRestTypeNode:()=>RD,isReturnStatement:()=>HP,isReturnStatementWithFixablePromiseHandler:()=>K1,isRightSideOfAccessExpression:()=>Ab,isRightSideOfInstanceofExpression:()=>jb,isRightSideOfPropertyAccess:()=>pX,isRightSideOfQualifiedName:()=>dX,isRightSideOfQualifiedNameOrPropertyAccess:()=>Fb,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Ib,isRootedDiskPath:()=>Ao,isSameEntityName:()=>sg,isSatisfiesExpression:()=>NP,isScopeMarker:()=>au,isSemicolonClassElement:()=>OP,isSetAccessor:()=>Ru,isSetAccessorDeclaration:()=>TD,isShebangTrivia:()=>hs,isShiftOperatorOrHigher:()=>$A,isShorthandAmbientModuleSymbol:()=>hp,isShorthandPropertyAssignment:()=>KE,isSignedNumericLiteral:()=>Gh,isSimpleCopiableExpression:()=>QJ,isSimpleInlineableExpression:()=>YJ,isSimpleParameter:()=>yz,isSimpleParameterList:()=>vz,isSingleOrDoubleQuote:()=>Ym,isSourceFile:()=>QE,isSourceFileFromLibrary:()=>k0,isSourceFileJS:()=>Bm,isSourceFileNotJS:()=>Jm,isSourceFileNotJson:()=>Um,isSourceMapping:()=>DJ,isSpecialPropertyDeclaration:()=>Cg,isSpreadAssignment:()=>GE,isSpreadElement:()=>SP,isStatement:()=>wu,isStatementButNotDeclaration:()=>Cu,isStatementOrBlock:()=>Nu,isStatementWithLocals:()=>Fd,isStatic:()=>$v,isStaticModifier:()=>oD,isString:()=>_t,isStringAKeyword:()=>qh,isStringANonContextualKeyword:()=>zh,isStringAndEmptyAnonymousObjectIntersection:()=>wQ,isStringDoubleQuoted:()=>Zm,isStringLiteral:()=>ON,isStringLiteralLike:()=>Ku,isStringLiteralOrJsxExpression:()=>Au,isStringLiteralOrTemplate:()=>DZ,isStringOrNumericLiteralLike:()=>Kh,isStringOrRegularExpressionOrTemplateLiteral:()=>TQ,isStringTextContainingNode:()=>e_,isSuperCall:()=>mf,isSuperKeyword:()=>lD,isSuperOrSuperProperty:()=>mm,isSuperProperty:()=>gm,isSupportedSourceFileName:()=>nT,isSwitchStatement:()=>GP,isSyntaxList:()=>zF,isSyntheticExpression:()=>EP,isSyntheticReference:()=>PE,isTagName:()=>uX,isTaggedTemplateExpression:()=>sP,isTaggedTemplateTag:()=>QG,isTemplateExpression:()=>bP,isTemplateHead:()=>RN,isTemplateLiteral:()=>G_,isTemplateLiteralKind:()=>Hl,isTemplateLiteralToken:()=>Kl,isTemplateLiteralTypeNode:()=>QD,isTemplateLiteralTypeSpan:()=>XD,isTemplateMiddle:()=>BN,isTemplateMiddleOrTemplateTail:()=>Gl,isTemplateSpan:()=>IP,isTemplateTail:()=>JN,isTextWhiteSpaceLike:()=>kY,isThis:()=>xX,isThisContainerOrFunctionBlock:()=>_m,isThisIdentifier:()=>Tv,isThisInTypeQuery:()=>wv,isThisInitializedDeclaration:()=>ym,isThisInitializedObjectBindingExpression:()=>vm,isThisProperty:()=>hm,isThisTypeNode:()=>VD,isThisTypeParameter:()=>rC,isThisTypePredicate:()=>Qf,isThrowStatement:()=>QP,isToken:()=>ql,isTokenKind:()=>zl,isTraceEnabled:()=>GL,isTransientSymbol:()=>sd,isTrivia:()=>Vh,isTryStatement:()=>YP,isTupleTypeNode:()=>jD,isTypeAlias:()=>Rg,isTypeAliasDeclaration:()=>oE,isTypeAssertionExpression:()=>cP,isTypeDeclaration:()=>aC,isTypeElement:()=>P_,isTypeKeyword:()=>UQ,isTypeKeywordToken:()=>VQ,isTypeKeywordTokenOrIdentifier:()=>WQ,isTypeLiteralNode:()=>ID,isTypeNode:()=>A_,isTypeNodeKind:()=>zx,isTypeOfExpression:()=>pP,isTypeOnlyExportDeclaration:()=>Yl,isTypeOnlyImportDeclaration:()=>Ql,isTypeOnlyImportOrExportDeclaration:()=>Zl,isTypeOperatorNode:()=>WD,isTypeParameterDeclaration:()=>fD,isTypePredicateNode:()=>DD,isTypeQueryNode:()=>AD,isTypeReferenceNode:()=>PD,isTypeReferenceType:()=>Wu,isTypeUsableAsPropertyName:()=>kC,isUMDExportSymbol:()=>Lx,isUnaryExpression:()=>Y_,isUnaryExpressionWithWrite:()=>eu,isUnicodeIdentifierStart:()=>za,isUnionTypeNode:()=>BD,isUrl:()=>Fo,isValidBigIntString:()=>IT,isValidESSymbolDeclaration:()=>Vf,isValidTypeOnlyAliasUseSite:()=>OT,isValueSignatureDeclaration:()=>lh,isVarAwaitUsing:()=>_f,isVarConst:()=>df,isVarConstLike:()=>pf,isVarUsing:()=>uf,isVariableDeclaration:()=>eE,isVariableDeclarationInVariableStatement:()=>zf,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>Km,isVariableDeclarationInitializedToRequire:()=>Hm,isVariableDeclarationList:()=>tE,isVariableLike:()=>Bf,isVariableLikeOrAccessor:()=>Jf,isVariableStatement:()=>LP,isVoidExpression:()=>fP,isWatchSet:()=>vx,isWhileStatement:()=>zP,isWhiteSpaceLike:()=>rs,isWhiteSpaceSingleLine:()=>is,isWithStatement:()=>KP,isWriteAccess:()=>wx,isWriteOnlyAccess:()=>Cx,isYieldExpression:()=>xP,jsxModeNeedsExplicitImport:()=>S0,keywordPart:()=>AY,last:()=>Ee,lastOrUndefined:()=>Pe,length:()=>g,libMap:()=>CO,libs:()=>TO,lineBreakPart:()=>HY,linkNamePart:()=>qY,linkPart:()=>UY,linkTextPart:()=>zY,listFiles:()=>_$,loadModuleFromGlobalCache:()=>MR,loadWithModeAwareCache:()=>SV,makeIdentifierFromModuleName:()=>_p,makeImport:()=>rY,makeStringLiteral:()=>iY,mangleScopedPackageName:()=>ER,map:()=>M,mapAllOrFail:()=>W,mapDefined:()=>$,mapDefinedEntries:()=>K,mapDefinedIterator:()=>H,mapEntries:()=>Z,mapIterator:()=>R,mapOneOrMany:()=>i0,mapToDisplayParts:()=>KY,matchFiles:()=>Ik,matchPatternOrExact:()=>bT,matchedText:()=>sn,matchesExclude:()=>LL,maybeBind:()=>nt,maybeSetLocalizedDiagnosticMessages:()=>cS,memoize:()=>kt,memoizeCached:()=>wt,memoizeOne:()=>Tt,memoizeWeak:()=>Ct,metadataHelper:()=>eN,min:()=>jt,minAndMax:()=>kT,missingFileModifiedTime:()=>to,modifierToFlag:()=>ub,modifiersToFlags:()=>_b,moduleOptionDeclaration:()=>PO,moduleResolutionIsEqualTo:()=>xd,moduleResolutionNameAndModeGetter:()=>hV,moduleResolutionOptionDeclarations:()=>jO,moduleResolutionSupportsPackageJsonExportsAndImports:()=>ek,moduleResolutionUsesNodeModules:()=>nY,moduleSpecifierToValidIdentifier:()=>d0,moduleSpecifiers:()=>tB,moduleSymbolToValidIdentifier:()=>u0,moveEmitHelpers:()=>Mw,moveRangeEnd:()=>Yb,moveRangePastDecorators:()=>ex,moveRangePastModifiers:()=>tx,moveRangePos:()=>Zb,moveSyntheticComments:()=>Ew,mutateMap:()=>Fx,mutateMapSkippingNewValues:()=>Ex,needsParentheses:()=>TZ,needsScopeMarker:()=>cu,newCaseClauseTracker:()=>T0,newPrivateEnvironment:()=>fz,noEmitNotification:()=>zq,noEmitSubstitution:()=>Jq,noTransformers:()=>Iq,noTruncationMaximumTruncationLength:()=>rd,nodeCanBeDecorated:()=>Sm,nodeHasName:()=>Fc,nodeIsDecorated:()=>km,nodeIsMissing:()=>Ld,nodeIsPresent:()=>Md,nodeIsSynthesized:()=>my,nodeModuleNameResolver:()=>qM,nodeModulesPathPart:()=>KM,nodeNextJsonConfigResolver:()=>UM,nodeOrChildIsDecorated:()=>Tm,nodeOverlapsWithStartEnd:()=>FX,nodePosToString:()=>Id,nodeSeenTracker:()=>$Q,nodeStartsNewLexicalEnvironment:()=>fy,nodeToDisplayParts:()=>YY,noop:()=>ft,noopFileWatcher:()=>v$,normalizePath:()=>na,normalizeSlashes:()=>Xo,not:()=>mn,notImplemented:()=>St,notImplementedResolver:()=>gU,nullNodeConverters:()=>UC,nullParenthesizerRules:()=>JC,nullTransformationContext:()=>Uq,objectAllocator:()=>nS,operatorPart:()=>OY,optionDeclarations:()=>FO,optionMapToObject:()=>Jj,optionsAffectingProgramStructure:()=>MO,optionsForBuild:()=>UO,optionsForWatch:()=>wO,optionsHaveChanges:()=>pd,optionsHaveModuleResolutionChanges:()=>ud,or:()=>fn,orderedRemoveItem:()=>en,orderedRemoveItemAt:()=>tn,packageIdToPackageName:()=>kd,packageIdToString:()=>Td,paramHelper:()=>tN,parameterIsThisKeyword:()=>kv,parameterNamePart:()=>jY,parseBaseNodeFactory:()=>SI,parseBigInt:()=>FT,parseBuildCommand:()=>uj,parseCommandLine:()=>aj,parseCommandLineWorker:()=>nj,parseConfigFileTextToJson:()=>mj,parseConfigFileWithSystem:()=>r$,parseConfigHostFromCompilerHostLike:()=>qV,parseCustomTypeOption:()=>YO,parseIsolatedEntityName:()=>ZI,parseIsolatedJSDocComment:()=>rO,parseJSDocTypeExpressionForTests:()=>iO,parseJsonConfigFileContent:()=>Qj,parseJsonSourceFileConfigFileContent:()=>Yj,parseJsonText:()=>eO,parseListTypeOption:()=>ZO,parseNodeFactory:()=>kI,parseNodeModuleFromPath:()=>XM,parsePackageName:()=>mR,parsePseudoBigInt:()=>PT,parseValidBigInt:()=>AT,pasteEdits:()=>Efe,patchWriteFileEnsuringDirectory:()=>ko,pathContainsNodeModules:()=>GM,pathIsAbsolute:()=>Oo,pathIsBareSpecifier:()=>Lo,pathIsRelative:()=>jo,patternText:()=>an,perfLogger:()=>ir,performIncrementalCompilation:()=>A$,performance:()=>or,plainJSErrors:()=>MV,positionBelongsToNode:()=>IX,positionIsASICandidate:()=>RZ,positionIsSynthesized:()=>dT,positionsAreOnSameLine:()=>dx,preProcessFile:()=>R1,probablyUsesSemicolons:()=>BZ,processCommentPragmas:()=>uO,processPragmasIntoFields:()=>dO,processTaggedTemplateExpression:()=>Vz,programContainsEsModules:()=>YQ,programContainsModules:()=>QQ,projectReferenceIsEqualTo:()=>bd,propKeyHelper:()=>mN,propertyNamePart:()=>LY,pseudoBigIntToString:()=>ET,punctuationPart:()=>IY,pushIfUnique:()=>he,quote:()=>wZ,quotePreferenceFromString:()=>aY,rangeContainsPosition:()=>wX,rangeContainsPositionExclusive:()=>NX,rangeContainsRange:()=>TX,rangeContainsRangeExclusive:()=>CX,rangeContainsStartEnd:()=>PX,rangeEndIsOnSameLineAsRangeStart:()=>cx,rangeEndPositionsAreOnSameLine:()=>ax,rangeEquals:()=>ke,rangeIsOnSingleLine:()=>ix,rangeOfNode:()=>TT,rangeOfTypeParameters:()=>CT,rangeOverlapsWithStartEnd:()=>EX,rangeStartIsOnSameLineAsRangeEnd:()=>sx,rangeStartPositionsAreOnSameLine:()=>ox,readBuilderProgram:()=>I$,readConfigFile:()=>fj,readHelper:()=>pN,readJson:()=>Wb,readJsonConfigFile:()=>gj,readJsonOrUndefined:()=>Vb,reduceEachLeadingCommentRange:()=>Ss,reduceEachTrailingCommentRange:()=>ks,reduceLeft:()=>Me,reduceLeftIterator:()=>x,reducePathComponents:()=>Qo,refactor:()=>y6,regExpEscape:()=>gk,regularExpressionFlagToCharacter:()=>Ha,relativeComplement:()=>de,removeAllComments:()=>uw,removeEmitHelper:()=>jw,removeExtension:()=>cT,removeFileExtension:()=>aT,removeIgnoredPath:()=>OW,removeMinAndVersionNumbers:()=>Zt,removeOptionality:()=>fQ,removePrefix:()=>_n,removeSuffix:()=>Qt,removeTrailingDirectorySeparator:()=>oa,repeatString:()=>KQ,replaceElement:()=>Oe,replaceFirstStar:()=>DC,resolutionExtensionIsTSOrJson:()=>fT,resolveConfigFileProjectName:()=>B$,resolveJSModule:()=>RM,resolveLibrary:()=>OM,resolveModuleName:()=>LM,resolveModuleNameFromCache:()=>jM,resolvePackageNameToPackageJson:()=>hM,resolvePath:()=>Zo,resolveProjectReferencePath:()=>UV,resolveTripleslashReference:()=>JU,resolveTypeReferenceDirective:()=>fM,resolvingEmptyArray:()=>ed,restHelper:()=>lN,returnFalse:()=>mt,returnNoopFileWatcher:()=>b$,returnTrue:()=>gt,returnUndefined:()=>ht,returnsPromise:()=>H1,runInitializersHelper:()=>rN,sameFlatMap:()=>V,sameMap:()=>B,sameMapping:()=>NJ,scanShebangTrivia:()=>ys,scanTokenAtPosition:()=>nf,scanner:()=>UG,screenStartingMessageCodes:()=>e$,semanticDiagnosticsOptionDeclarations:()=>AO,serializeCompilerOptions:()=>Vj,server:()=>Mhe,servicesVersion:()=>W7,setCommentRange:()=>kw,setConfigFileInOptions:()=>Zj,setConstantValue:()=>Aw,setEachParent:()=>UT,setEmitFlags:()=>dw,setFunctionNameHelper:()=>gN,setGetSourceFileAsHashVersioned:()=>w$,setIdentifierAutoGenerate:()=>Ww,setIdentifierGeneratedImportReference:()=>Hw,setIdentifierTypeArguments:()=>Uw,setInternalEmitFlags:()=>fw,setLocalizedDiagnosticMessages:()=>sS,setModuleDefaultHelper:()=>bN,setNodeChildren:()=>WF,setNodeFlags:()=>zT,setObjectAllocator:()=>oS,setOriginalNode:()=>cw,setParent:()=>qT,setParentRecursive:()=>VT,setPrivateIdentifier:()=>gz,setSnippetElement:()=>Bw,setSourceMapRange:()=>hw,setStackTraceLimit:()=>Yi,setStartsOnNewLine:()=>xw,setSyntheticLeadingComments:()=>Cw,setSyntheticTrailingComments:()=>Dw,setSys:()=>Co,setSysLog:()=>ho,setTextRange:()=>vI,setTextRangeEnd:()=>RT,setTextRangePos:()=>MT,setTextRangePosEnd:()=>BT,setTextRangePosWidth:()=>JT,setTokenSourceMapRange:()=>vw,setTypeNode:()=>zw,setUILocale:()=>Vt,setValueDeclaration:()=>wg,shouldAllowImportingTsExtension:()=>LR,shouldPreserveConstEnums:()=>WS,shouldUseUriStyleNodeCoreModules:()=>y0,showModuleSpecifier:()=>Mx,signatureHasLiteralTypes:()=>nJ,signatureHasRestParameter:()=>tJ,signatureToDisplayParts:()=>QY,single:()=>Ae,singleElementArray:()=>hn,singleIterator:()=>Q,singleOrMany:()=>Ie,singleOrUndefined:()=>Fe,skipAlias:()=>kx,skipAssertions:()=>vA,skipConstraint:()=>GQ,skipOuterExpressions:()=>hA,skipParentheses:()=>mh,skipPartiallyEmittedExpressions:()=>Ol,skipTrivia:()=>ds,skipTypeChecking:()=>wT,skipTypeParentheses:()=>fh,skipWhile:()=>Sn,sliceAfter:()=>xT,some:()=>ee,sort:()=>be,sortAndDeduplicate:()=>ce,sortAndDeduplicateDiagnostics:()=>zs,sourceFileAffectingCompilerOptions:()=>LO,sourceFileMayBeEmitted:()=>uv,sourceMapCommentRegExp:()=>vJ,sourceMapCommentRegExpDontCareLineStart:()=>yJ,spacePart:()=>FY,spanMap:()=>Y,spreadArrayHelper:()=>fN,stableSort:()=>Se,startEndContainsRange:()=>DX,startEndOverlapsWithStartEnd:()=>AX,startOnNewLine:()=>bA,startTracing:()=>Nr,startsWith:()=>ln,startsWithDirectory:()=>ga,startsWithUnderscore:()=>f0,startsWithUseStrict:()=>uA,stringContainsAt:()=>p0,stringToToken:()=>Wa,stripQuotes:()=>Wy,supportedDeclarationExtensions:()=>$k,supportedJSExtensions:()=>qk,supportedJSExtensionsFlat:()=>Uk,supportedLocaleDirectories:()=>yc,supportedTSExtensions:()=>Rk,supportedTSExtensionsFlat:()=>Bk,supportedTSImplementationExtensions:()=>Hk,suppressLeadingAndTrailingTrivia:()=>uZ,suppressLeadingTrivia:()=>dZ,suppressTrailingTrivia:()=>pZ,symbolEscapedNameNoDefault:()=>_Y,symbolName:()=>Dc,symbolNameNoDefault:()=>lY,symbolPart:()=>PY,symbolToDisplayParts:()=>XY,syntaxMayBeASICandidate:()=>MZ,syntaxRequiresTrailingSemicolonOrASI:()=>LZ,sys:()=>To,sysLog:()=>go,tagNamesAreEquivalent:()=>vO,takeWhile:()=>xn,targetOptionDeclaration:()=>DO,templateObjectHelper:()=>dN,testFormatSettings:()=>AG,textChangeRangeIsUnchanged:()=>ic,textChangeRangeNewSpan:()=>rc,textChanges:()=>tde,textOrKeywordPart:()=>MY,textPart:()=>RY,textRangeContainsPositionInclusive:()=>$s,textSpanContainsPosition:()=>Ws,textSpanContainsTextSpan:()=>Hs,textSpanEnd:()=>Us,textSpanIntersection:()=>ec,textSpanIntersectsWith:()=>Qs,textSpanIntersectsWithPosition:()=>Zs,textSpanIntersectsWithTextSpan:()=>Xs,textSpanIsEmpty:()=>Vs,textSpanOverlap:()=>Gs,textSpanOverlapsWith:()=>Ks,textSpansEqual:()=>vY,textToKeywordObj:()=>Da,timestamp:()=>tr,toArray:()=>lt,toBuilderFileEmit:()=>wW,toBuilderStateFileInfoForMultiEmit:()=>CW,toEditorSettings:()=>c5,toFileNameLowerCase:()=>xt,toLowerCase:()=>vt,toPath:()=>ia,toProgramEmitPending:()=>NW,tokenIsIdentifierOrKeyword:()=>wa,tokenIsIdentifierOrKeywordOrGreaterThan:()=>Na,tokenToString:()=>Va,trace:()=>KL,tracing:()=>cr,tracingEnabled:()=>lr,transform:()=>N5,transformClassFields:()=>Gz,transformDeclarations:()=>Pq,transformECMAScriptModule:()=>xq,transformES2015:()=>gq,transformES2016:()=>fq,transformES2017:()=>eq,transformES2018:()=>nq,transformES2019:()=>rq,transformES2020:()=>iq,transformES2021:()=>oq,transformESDecorators:()=>Zz,transformESNext:()=>aq,transformGenerators:()=>hq,transformJsx:()=>dq,transformLegacyDecorators:()=>Yz,transformModule:()=>yq,transformNamedEvaluation:()=>qz,transformNodeModule:()=>Sq,transformNodes:()=>qq,transformSystemModule:()=>bq,transformTypeScript:()=>Kz,transpile:()=>l2,transpileDeclaration:()=>r2,transpileModule:()=>n2,transpileOptionValueCompilerOptions:()=>RO,tryAddToSet:()=>X,tryAndIgnoreErrors:()=>VZ,tryCast:()=>dt,tryDirectoryExists:()=>UZ,tryExtractTSExtension:()=>Bb,tryFileExists:()=>qZ,tryGetClassExtendingExpressionWithTypeArguments:()=>vb,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>bb,tryGetDirectories:()=>JZ,tryGetExtensionFromPath:()=>hT,tryGetImportFromModuleSpecifier:()=>Eg,tryGetJSDocSatisfiesTypeNode:()=>gC,tryGetModuleNameFromFile:()=>NA,tryGetModuleSpecifierFromDeclaration:()=>Dg,tryGetNativePerformanceHooks:()=>Zn,tryGetPropertyAccessOrIdentifierToString:()=>Pb,tryGetPropertyNameOfBindingOrAssignmentElement:()=>AA,tryGetSourceMappingURL:()=>SJ,tryGetTextOfPropertyName:()=>zp,tryIOAndConsumeErrors:()=>WZ,tryParseJson:()=>$b,tryParsePattern:()=>_T,tryParsePatterns:()=>uT,tryParseRawSourceMap:()=>CJ,tryReadDirectory:()=>zZ,tryReadFile:()=>hj,tryRemoveDirectoryPrefix:()=>fk,tryRemoveExtension:()=>sT,tryRemovePrefix:()=>un,tryRemoveSuffix:()=>Yt,typeAcquisitionDeclarations:()=>WO,typeAliasNamePart:()=>BY,typeDirectiveIsEqualTo:()=>Cd,typeKeywords:()=>qQ,typeParameterNamePart:()=>JY,typeToDisplayParts:()=>GY,unchangedPollThresholds:()=>ao,unchangedTextChangeRange:()=>ac,unescapeLeadingUnderscores:()=>Cc,unmangleScopedPackageName:()=>AR,unorderedRemoveItem:()=>rn,unorderedRemoveItemAt:()=>nn,unreachableCodeIsError:()=>YS,unsetNodeChildren:()=>$F,unusedLabelIsError:()=>ZS,unwrapInnermostStatementOfLabel:()=>$f,unwrapParenthesizedExpression:()=>LC,updateErrorForNoInputFiles:()=>fL,updateLanguageServiceSourceFile:()=>g5,updateMissingFilePathsWatch:()=>EU,updateResolutionField:()=>iM,updateSharedExtendedConfigFileWatcher:()=>NU,updateSourceFile:()=>nO,updateWatchingWildcardDirectories:()=>FU,usesExtensionsOnImports:()=>eT,usingSingleLineStringWriter:()=>yd,utf16EncodeAsString:()=>js,validateLocaleAndSetLanguage:()=>vc,valuesHelper:()=>hN,version:()=>u,versionMajorMinor:()=>c,visitArray:()=>aJ,visitCommaListElements:()=>pJ,visitEachChild:()=>fJ,visitFunctionBody:()=>uJ,visitIterationBody:()=>dJ,visitLexicalEnvironment:()=>cJ,visitNode:()=>iJ,visitNodes:()=>oJ,visitParameterList:()=>lJ,walkUpBindingElementsAndPatterns:()=>dc,walkUpLexicalEnvironments:()=>pz,walkUpOuterExpressions:()=>yA,walkUpParenthesizedExpressions:()=>dh,walkUpParenthesizedTypes:()=>uh,walkUpParenthesizedTypesAndGetParentAndChild:()=>ph,whitespaceOrMapCommentRegExp:()=>bJ,writeCommentRange:()=>Bv,writeFile:()=>fv,writeFileEnsuringDirectories:()=>gv,zipWith:()=>S}),t.exports=s;var c="5.5",u="5.5.3",d=(e=>(e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan",e))(d||{}),p=[],f=new Map,m=new Set;function g(e){return e?e.length:0}function h(e,t){if(e)for(let n=0;n=0;n--){const r=t(e[n],n);if(r)return r}}function v(e,t){if(void 0!==e)for(let n=0;n=0;r--){const n=e[r];if(t(n,r))return n}}function N(e,t,n){if(void 0===e)return-1;for(let r=n??0;r=0;r--)if(t(e[r],r))return r;return-1}function P(e,t){for(let n=0;nn(e,t[r]))}function A(e,t,n){for(let r=n||0;r{const i=t(r,e);if(void 0!==i){const[e,t]=i;void 0!==e&&void 0!==t&&n.set(e,t)}}),n}function G(e,t,n){if(e.has(t))return e.get(t);const r=n();return e.set(t,r),r}function X(e,t){return!e.has(t)&&(e.add(t),!0)}function*Q(e){yield e}function Y(e,t,n){let r;if(e){r=[];const i=e.length;let o,a,s=0,c=0;for(;s{const[i,o]=t(r,e);n.set(i,o)}),n}function ee(e,t){if(e){if(!t)return e.length>0;for(const n of e)if(t(n))return!0}return!1}function te(e,t,n){let r;for(let i=0;ie[t])}(e,t,n):function(e,t){const n=[];for(const r of e)he(n,r,t);return n}(e,t)}function ae(){return[]}function se(e,t,n,r,i){if(0===e.length)return e.push(t),!0;const o=je(e,t,yt,n);if(o<0){if(r&&!i){const n=~o;if(n>0&&r(t,e[n-1]))return!1;if(n0&&Tn.assertGreaterThanOrEqual(n(t[o],t[o-1]),0);t:for(const a=i;ia&&Tn.assertGreaterThanOrEqual(n(e[i],e[i-1]),0),n(t[o],e[i])){case-1:r.push(t[o]);continue e;case 0:continue e;case 1:continue t}}return r}function pe(e,t){return void 0===t?e:void 0===e?[t]:(e.push(t),e)}function fe(e,t){return void 0===e?t:void 0===t?e:ct(e)?ct(t)?ne(e,t):pe(e,t):ct(t)?pe(t,e):[e,t]}function me(e,t){return t<0?e.length+t:t}function ge(e,t,n,r){if(void 0===t||0===t.length)return e;if(void 0===e)return t.slice(n,r);n=void 0===n?0:me(t,n),r=void 0===r?t.length:me(t,r);for(let i=n;in(e[t],e[r])||It(t,r))}function be(e,t){return 0===e.length?e:e.slice().sort(t)}function*xe(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function Se(e,t){const n=ie(e);return ve(e,n,t),n.map(t=>e[t])}function ke(e,t,n,r){for(;nnull==e?void 0:e.at(t):(e,t)=>{if(e&&(t=me(e,t))>1);switch(r(n(e[i],i),t)){case-1:o=i+1;break;case 0:return i;case 1:a=i-1}}return~o}function Me(e,t,n,r,i){if(e&&e.length>0){const o=e.length;if(o>0){let a=void 0===r||r<0?0:r;const s=void 0===i||a+i>o-1?o-1:a+i;let c;for(arguments.length<=2?(c=e[a],a++):c=n;a<=s;)c=t(c,e[a],a),a++;return c}}return n}var Re=Object.prototype.hasOwnProperty;function Be(e,t){return Re.call(e,t)}function Je(e,t){return Re.call(e,t)?e[t]:void 0}function ze(e){const t=[];for(const n in e)Re.call(e,n)&&t.push(n);return t}function qe(e){const t=[];do{const n=Object.getOwnPropertyNames(e);for(const e of n)he(t,e)}while(e=Object.getPrototypeOf(e));return t}function Ue(e){const t=[];for(const n in e)Re.call(e,n)&&t.push(e[n]);return t}function Ve(e,t){const n=new Array(e);for(let r=0;r100&&n>t.length>>1){const e=t.length-n;t.copyWithin(0,n),t.length=e,n=0}return e},isEmpty:r}}function st(e,t){const n=new Map;let r=0;function*i(){for(const e of n.values())ct(e)?yield*e:yield e}const o={has(r){const i=e(r);if(!n.has(i))return!1;const o=n.get(i);if(!ct(o))return t(o,r);for(const e of o)if(t(e,r))return!0;return!1},add(i){const o=e(i);if(n.has(o)){const e=n.get(o);if(ct(e))E(e,i,t)||(e.push(i),r++);else{const a=e;t(a,i)||(n.set(o,[a,i]),r++)}}else n.set(o,i),r++;return this},delete(i){const o=e(i);if(!n.has(o))return!1;const a=n.get(o);if(ct(a)){for(let e=0;ei(),values:()=>i(),*entries(){for(const e of i())yield[e,e]},[Symbol.iterator]:()=>i(),[Symbol.toStringTag]:n[Symbol.toStringTag]};return o}function ct(e){return Array.isArray(e)}function lt(e){return ct(e)?e:[e]}function _t(e){return"string"==typeof e}function ut(e){return"number"==typeof e}function dt(e,t){return void 0!==e&&t(e)?e:void 0}function pt(e,t){return void 0!==e&&t(e)?e:Tn.fail(`Invalid cast. The supplied value ${e} did not pass the test '${Tn.getFunctionName(t)}'.`)}function ft(e){}function mt(){return!1}function gt(){return!0}function ht(){}function yt(e){return e}function vt(e){return e.toLowerCase()}var bt=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g;function xt(e){return bt.test(e)?e.replace(bt,vt):e}function St(){throw new Error("Not implemented")}function kt(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Tt(e){const t=new Map;return n=>{const r=`${typeof n}:${n}`;let i=t.get(r);return void 0!==i||t.has(r)||(i=e(n),t.set(r,i)),i}}function Ct(e){const t=new WeakMap;return n=>{let r=t.get(n);return void 0!==r||t.has(n)||(r=e(n),t.set(n,r)),r}}function wt(e,t){return(...n)=>{let r=t.get(n);return void 0!==r||t.has(n)||(r=e(...n),t.set(n,r)),r}}function Nt(e,t,n,r,i){if(i){const e=[];for(let t=0;tMe(e,(e,t)=>t(e),t)}return r?i=>r(n(t(e(i)))):n?r=>n(t(e(r))):t?n=>t(e(n)):e?t=>e(t):e=>e}var Dt=(e=>(e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive",e))(Dt||{});function Pt(e,t){return e===t}function Et(e,t){return e===t||void 0!==e&&void 0!==t&&e.toUpperCase()===t.toUpperCase()}function Ft(e,t){return Pt(e,t)}function At(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e-1===t(e,n)?e:n)}function Lt(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function Mt(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toLowerCase())<(t=t.toLowerCase())?-1:e>t?1:0}function Rt(e,t){return At(e,t)}function Bt(e){return e?Lt:Rt}var Jt,zt,qt=(()=>function(e){const t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(e,n)=>function(e,t,n){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;const r=n(e,t);return r<0?-1:r>0?1:0}(e,n,t)})();function Ut(){return zt}function Vt(e){zt!==e&&(zt=e,Jt=void 0)}function Wt(e,t){return(Jt||(Jt=qt(zt)))(e,t)}function $t(e,t,n,r){return e===t?0:void 0===e?-1:void 0===t?1:r(e[n],t[n])}function Ht(e,t){return It(e?1:0,t?1:0)}function Kt(e,t,n){const r=Math.max(2,Math.floor(.34*e.length));let i,o=Math.floor(.4*e.length)+1;for(const a of t){const t=n(a);if(void 0!==t&&Math.abs(t.length-e.length)<=r){if(t===e)continue;if(t.length<3&&t.toLowerCase()!==e.toLowerCase())continue;const n=Gt(e,t,o-.1);if(void 0===n)continue;Tn.assert(nn?a-n:1),l=Math.floor(t.length>n+a?n+a:t.length);i[0]=a;let _=a;for(let e=1;en)return;const u=r;r=i,i=u}const a=r[t.length];return a>n?void 0:a}function Xt(e,t,n){const r=e.length-t.length;return r>=0&&(n?Et(e.slice(r),t):e.indexOf(t,r)===r)}function Qt(e,t){return Xt(e,t)?e.slice(0,e.length-t.length):e}function Yt(e,t){return Xt(e,t)?e.slice(0,e.length-t.length):void 0}function Zt(e){let t=e.length;for(let n=t-1;n>0;n--){let r=e.charCodeAt(n);if(r>=48&&r<=57)do{--n,r=e.charCodeAt(n)}while(n>0&&r>=48&&r<=57);else{if(!(n>4)||110!==r&&78!==r)break;if(--n,r=e.charCodeAt(n),105!==r&&73!==r)break;if(--n,r=e.charCodeAt(n),109!==r&&77!==r)break;--n,r=e.charCodeAt(n)}if(45!==r&&46!==r)break;t=n}return t===e.length?e:e.slice(0,t)}function en(e,t){for(let n=0;ne===t)}function on(e){return e?yt:xt}function an({prefix:e,suffix:t}){return`${e}*${t}`}function sn(e,t){return Tn.assert(dn(e,t)),t.substring(e.prefix.length,t.length-e.suffix.length)}function cn(e,t,n){let r,i=-1;for(const o of e){const e=t(o);dn(e,n)&&e.prefix.length>i&&(i=e.prefix.length,r=o)}return r}function ln(e,t,n){return n?Et(e.slice(0,t.length),t):0===e.lastIndexOf(t,0)}function _n(e,t){return ln(e,t)?e.substr(t.length):e}function un(e,t,n=yt){return ln(n(e),n(t))?e.substring(t.length):void 0}function dn({prefix:e,suffix:t},n){return n.length>=e.length+t.length&&ln(n,e)&&Xt(n,t)}function pn(e,t){return n=>e(n)&&t(n)}function fn(...e){return(...t)=>{let n;for(const r of e)if(n=r(...t),n)return n;return n}}function mn(e){return(...t)=>!e(...t)}function gn(e){}function hn(e){return void 0===e?void 0:[e]}function yn(e,t,n,r,i,o){o=o||ft;let a=0,s=0;const c=e.length,l=t.length;let _=!1;for(;a(e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Verbose=4]="Verbose",e))(Cn||{});(e=>{let t=0;function n(t){return e.currentLogLevel<=t}function r(t,r){e.loggingHost&&n(t)&&e.loggingHost.log(t,r)}function i(e){r(3,e)}var o;e.currentLogLevel=2,e.isDebugging=!1,e.shouldLog=n,e.log=i,(o=i=e.log||(e.log={})).error=function(e){r(1,e)},o.warn=function(e){r(2,e)},o.log=function(e){r(3,e)},o.trace=function(e){r(4,e)};const a={};function s(e){return t>=e}function c(t,n){return!!s(t)||(a[n]={level:t,assertion:e[n]},e[n]=ft,!1)}function l(e,t){const n=new Error(e?`Debug Failure. ${e}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(n,t||l),n}function _(e,t,n,r){e||(t=t?`False expression: ${t}`:"False expression.",n&&(t+="\r\nVerbose Debug Information: "+("string"==typeof n?n:n())),l(t,r||_))}function u(e,t,n){null==e&&l(t,n||u)}function d(e,t,n){for(const r of e)u(r,t,n||d)}function p(e,t="Illegal value:",n){return l(`${t} ${"object"==typeof e&&Be(e,"kind")&&Be(e,"pos")?"SyntaxKind: "+y(e.kind):JSON.stringify(e)}`,n||p)}function f(e){}function m(e){if("function"!=typeof e)return"";if(Be(e,"name"))return e.name;{const t=Function.prototype.toString.call(e),n=/^function\s+([\w$]+)\s*\(/.exec(t);return n?n[1]:""}}function g(e=0,t,n){const r=function(e){const t=h.get(e);if(t)return t;const n=[];for(const t in e){const r=e[t];"number"==typeof r&&n.push([r,t])}const r=Se(n,(e,t)=>It(e[0],t[0]));return h.set(e,r),r}(t);if(0===e)return r.length>0&&0===r[0][0]?r[0][1]:"0";if(n){const t=[];let n=e;for(const[i,o]of r){if(i>e)break;0!==i&&i&e&&(t.push(o),n&=~i)}if(0===n)return t.join("|")}else for(const[t,n]of r)if(t===e)return n;return e.toString()}e.getAssertionLevel=function(){return t},e.setAssertionLevel=function(n){const r=t;if(t=n,n>r)for(const t of ze(a)){const r=a[t];void 0!==r&&e[t]!==r.assertion&&n>=r.level&&(e[t]=r,a[t]=void 0)}},e.shouldAssert=s,e.fail=l,e.failBadSyntaxKind=function e(t,n,r){return l(`${n||"Unexpected node."}\r\nNode ${y(t.kind)} was unexpected.`,r||e)},e.assert=_,e.assertEqual=function e(t,n,r,i,o){if(t!==n){l(`Expected ${t} === ${n}. ${r?i?`${r} ${i}`:r:""}`,o||e)}},e.assertLessThan=function e(t,n,r,i){t>=n&&l(`Expected ${t} < ${n}. ${r||""}`,i||e)},e.assertLessThanOrEqual=function e(t,n,r){t>n&&l(`Expected ${t} <= ${n}`,r||e)},e.assertGreaterThanOrEqual=function e(t,n,r){t= ${n}`,r||e)},e.assertIsDefined=u,e.checkDefined=function e(t,n,r){return u(t,n,r||e),t},e.assertEachIsDefined=d,e.checkEachDefined=function e(t,n,r){return d(t,n,r||e),t},e.assertNever=p,e.assertEachNode=function e(t,n,r,i){c(1,"assertEachNode")&&_(void 0===n||T(t,n),r||"Unexpected node.",()=>`Node array did not pass test '${m(n)}'.`,i||e)},e.assertNode=function e(t,n,r,i){c(1,"assertNode")&&_(void 0!==t&&(void 0===n||n(t)),r||"Unexpected node.",()=>`Node ${y(null==t?void 0:t.kind)} did not pass test '${m(n)}'.`,i||e)},e.assertNotNode=function e(t,n,r,i){c(1,"assertNotNode")&&_(void 0===t||void 0===n||!n(t),r||"Unexpected node.",()=>`Node ${y(t.kind)} should not have passed test '${m(n)}'.`,i||e)},e.assertOptionalNode=function e(t,n,r,i){c(1,"assertOptionalNode")&&_(void 0===n||void 0===t||n(t),r||"Unexpected node.",()=>`Node ${y(null==t?void 0:t.kind)} did not pass test '${m(n)}'.`,i||e)},e.assertOptionalToken=function e(t,n,r,i){c(1,"assertOptionalToken")&&_(void 0===n||void 0===t||t.kind===n,r||"Unexpected node.",()=>`Node ${y(null==t?void 0:t.kind)} was not a '${y(n)}' token.`,i||e)},e.assertMissingNode=function e(t,n,r){c(1,"assertMissingNode")&&_(void 0===t,n||"Unexpected node.",()=>`Node ${y(t.kind)} was unexpected'.`,r||e)},e.type=f,e.getFunctionName=m,e.formatSymbol=function(e){return`{ name: ${Cc(e.escapedName)}; flags: ${C(e.flags)}; declarations: ${M(e.declarations,e=>y(e.kind))} }`},e.formatEnum=g;const h=new Map;function y(e){return g(e,Pr,!1)}function v(e){return g(e,Er,!0)}function b(e){return g(e,Fr,!0)}function x(e){return g(e,Ri,!0)}function k(e){return g(e,Ji,!0)}function C(e){return g(e,ni,!0)}function w(e){return g(e,ai,!0)}function N(e){return g(e,fi,!0)}function D(e){return g(e,si,!0)}function P(e){return g(e,Mr,!0)}e.formatSyntaxKind=y,e.formatSnippetKind=function(e){return g(e,Bi,!1)},e.formatScriptKind=function(e){return g(e,Ai,!1)},e.formatNodeFlags=v,e.formatNodeCheckFlags=function(e){return g(e,oi,!0)},e.formatModifierFlags=b,e.formatTransformFlags=x,e.formatEmitFlags=k,e.formatSymbolFlags=C,e.formatTypeFlags=w,e.formatSignatureFlags=N,e.formatObjectFlags=D,e.formatFlowFlags=P,e.formatRelationComparisonResult=function(e){return g(e,Ir,!0)},e.formatCheckMode=function(e){return g(e,qB,!0)},e.formatSignatureCheckMode=function(e){return g(e,UB,!0)},e.formatTypeFacts=function(e){return g(e,JB,!0)};let E,F,A=!1;function I(e){"__debugFlowFlags"in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value(){const e=2&this.flags?"FlowStart":4&this.flags?"FlowBranchLabel":8&this.flags?"FlowLoopLabel":16&this.flags?"FlowAssignment":32&this.flags?"FlowTrueCondition":64&this.flags?"FlowFalseCondition":128&this.flags?"FlowSwitchClause":256&this.flags?"FlowArrayMutation":512&this.flags?"FlowCall":1024&this.flags?"FlowReduceLabel":1&this.flags?"FlowUnreachable":"UnknownFlow",t=-2048&this.flags;return`${e}${t?` (${P(t)})`:""}`}},__debugFlowFlags:{get(){return g(this.flags,Mr,!0)}},__debugToString:{value(){return L(this)}}})}function O(e){"__tsDebuggerDisplay"in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value:e=>`NodeArray ${e=String(e).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]")}`}})}e.attachFlowNodeDebugInfo=function(e){return A&&("function"==typeof Object.setPrototypeOf?(E||(E=Object.create(Object.prototype),I(E)),Object.setPrototypeOf(e,E)):I(e)),e},e.attachNodeArrayDebugInfo=function(e){A&&("function"==typeof Object.setPrototypeOf?(F||(F=Object.create(Array.prototype),O(F)),Object.setPrototypeOf(e,F)):O(e))},e.enableDebugInfo=function(){if(A)return;const e=new WeakMap,t=new WeakMap;Object.defineProperties(nS.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){const e=33554432&this.flags?"TransientSymbol":"Symbol",t=-33554433&this.flags;return`${e} '${Dc(this)}'${t?` (${C(t)})`:""}`}},__debugFlags:{get(){return C(this.flags)}}}),Object.defineProperties(nS.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){const e=67359327&this.flags?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:98304&this.flags?"NullableType":384&this.flags?`LiteralType ${JSON.stringify(this.value)}`:2048&this.flags?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:8192&this.flags?"UniqueESSymbolType":32&this.flags?"EnumType":1048576&this.flags?"UnionType":2097152&this.flags?"IntersectionType":4194304&this.flags?"IndexType":8388608&this.flags?"IndexedAccessType":16777216&this.flags?"ConditionalType":33554432&this.flags?"SubstitutionType":262144&this.flags?"TypeParameter":524288&this.flags?3&this.objectFlags?"InterfaceType":4&this.objectFlags?"TypeReference":8&this.objectFlags?"TupleType":16&this.objectFlags?"AnonymousType":32&this.objectFlags?"MappedType":1024&this.objectFlags?"ReverseMappedType":256&this.objectFlags?"EvolvingArrayType":"ObjectType":"Type",t=524288&this.flags?-1344&this.objectFlags:0;return`${e}${this.symbol?` '${Dc(this.symbol)}'`:""}${t?` (${D(t)})`:""}`}},__debugFlags:{get(){return w(this.flags)}},__debugObjectFlags:{get(){return 524288&this.flags?D(this.objectFlags):""}},__debugTypeToString:{value(){let t=e.get(this);return void 0===t&&(t=this.checker.typeToString(this),e.set(this,t)),t}}}),Object.defineProperties(nS.getSignatureConstructor().prototype,{__debugFlags:{get(){return N(this.flags)}},__debugSignatureToString:{value(){var e;return null==(e=this.checker)?void 0:e.signatureToString(this)}}});const n=[nS.getNodeConstructor(),nS.getIdentifierConstructor(),nS.getTokenConstructor(),nS.getSourceFileConstructor()];for(const e of n)Be(e.prototype,"__debugKind")||Object.defineProperties(e.prototype,{__tsDebuggerDisplay:{value(){return`${n_(this)?"GeneratedIdentifier":QN(this)?`Identifier '${wc(this)}'`:YN(this)?`PrivateIdentifier '${wc(this)}'`:ON(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:AN(this)?`NumericLiteral ${this.text}`:IN(this)?`BigIntLiteral ${this.text}n`:fD(this)?"TypeParameterDeclaration":mD(this)?"ParameterDeclaration":SD(this)?"ConstructorDeclaration":kD(this)?"GetAccessorDeclaration":TD(this)?"SetAccessorDeclaration":CD(this)?"CallSignatureDeclaration":wD(this)?"ConstructSignatureDeclaration":ND(this)?"IndexSignatureDeclaration":DD(this)?"TypePredicateNode":PD(this)?"TypeReferenceNode":ED(this)?"FunctionTypeNode":FD(this)?"ConstructorTypeNode":AD(this)?"TypeQueryNode":ID(this)?"TypeLiteralNode":OD(this)?"ArrayTypeNode":jD(this)?"TupleTypeNode":MD(this)?"OptionalTypeNode":RD(this)?"RestTypeNode":BD(this)?"UnionTypeNode":JD(this)?"IntersectionTypeNode":zD(this)?"ConditionalTypeNode":qD(this)?"InferTypeNode":UD(this)?"ParenthesizedTypeNode":VD(this)?"ThisTypeNode":WD(this)?"TypeOperatorNode":$D(this)?"IndexedAccessTypeNode":HD(this)?"MappedTypeNode":KD(this)?"LiteralTypeNode":LD(this)?"NamedTupleMember":GD(this)?"ImportTypeNode":y(this.kind)}${this.flags?` (${v(this.flags)})`:""}`}},__debugKind:{get(){return y(this.kind)}},__debugNodeFlags:{get(){return v(this.flags)}},__debugModifierFlags:{get(){return b(cb(this))}},__debugTransformFlags:{get(){return x(this.transformFlags)}},__debugIsParseTreeNode:{get(){return Sc(this)}},__debugEmitFlags:{get(){return k(ip(this))}},__debugGetText:{value(e){if(my(this))return"";let n=t.get(this);if(void 0===n){const r=kc(this),i=r&&Dd(r);n=i?Yd(i,r,e):"",t.set(this,n)}return n}}});A=!0},e.formatVariance=function(e){const t=7&e;let n=0===t?"in out":3===t?"[bivariant]":2===t?"in":1===t?"out":4===t?"[independent]":"";return 8&e?n+=" (unmeasurable)":16&e&&(n+=" (unreliable)"),n};class j{__debugToString(){var e;switch(this.kind){case 3:return(null==(e=this.debugInfo)?void 0:e.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return S(this.sources,this.targets||M(this.sources,()=>"any"),(e,t)=>`${e.__debugTypeToString()} -> ${"string"==typeof t?t:t.__debugTypeToString()}`).join(", ");case 2:return S(this.sources,this.targets,(e,t)=>`${e.__debugTypeToString()} -> ${t().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split("\n").join("\n ")}\nm2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;default:return p(this)}}}function L(e){let t,n=-1;function r(e){return e.id||(e.id=n,n--),e.id}var i;let o;var a;(i=t||(t={})).lr="─",i.ud="│",i.dr="╭",i.dl="╮",i.ul="╯",i.ur="╰",i.udr="├",i.udl="┤",i.dlr="┬",i.ulr="┴",i.udlr="╫",(a=o||(o={}))[a.None=0]="None",a[a.Up=1]="Up",a[a.Down=2]="Down",a[a.Left=4]="Left",a[a.Right=8]="Right",a[a.UpDown=3]="UpDown",a[a.LeftRight=12]="LeftRight",a[a.UpLeft=5]="UpLeft",a[a.UpRight=9]="UpRight",a[a.DownLeft=6]="DownLeft",a[a.DownRight=10]="DownRight",a[a.UpDownLeft=7]="UpDownLeft",a[a.UpDownRight=11]="UpDownRight",a[a.UpLeftRight=13]="UpLeftRight",a[a.DownLeftRight=14]="DownLeftRight",a[a.UpDownLeftRight=15]="UpDownLeftRight",a[a.NoChildren=16]="NoChildren";const s=Object.create(null),c=[],l=[],_=m(e,new Set);for(const e of c)e.text=v(e.flowNode,e.circular),h(e);const u=function e(t){let n=0;for(const r of p(t))n=Math.max(n,e(r));return n+1}(_),d=function(e){const t=x(Array(e),0);for(const e of c)t[e.level]=Math.max(t[e.level],e.text.length);return t}(u);return function e(t,n){if(-1===t.lane){t.lane=n,t.endLane=n;const r=p(t);for(let i=0;i0&&n++;const o=r[i];e(o,n),o.endLane>t.endLane&&(n=o.endLane)}t.endLane=n}}(_,0),function(){const e=d.length,t=c.reduce((e,t)=>Math.max(e,t.lane),0)+1,n=x(Array(t),""),r=d.map(()=>Array(t)),i=d.map(()=>x(Array(t),0));for(const e of c){r[e.level][e.lane]=e;const t=p(e);for(let n=0;n0&&(o|=1),n0&&(o|=1),t0?i[n-1][e]:0,r=e>0?i[n][e-1]:0;let o=i[n][e];o||(8&t&&(o|=12),2&r&&(o|=3),i[n][e]=o)}for(let t=0;t0?e.repeat(t):"";let n="";for(;n.length=0,"Invalid argument: major"),Tn.assert(t>=0,"Invalid argument: minor"),Tn.assert(n>=0,"Invalid argument: patch");const o=r?ct(r)?r:r.split("."):p,a=i?ct(i)?i:i.split("."):p;Tn.assert(T(o,e=>Dn.test(e)),"Invalid argument: prerelease"),Tn.assert(T(a,e=>En.test(e)),"Invalid argument: build"),this.major=e,this.minor=t,this.patch=n,this.prerelease=o,this.build=a}static tryParse(t){const n=On(t);if(!n)return;const{major:r,minor:i,patch:o,prerelease:a,build:s}=n;return new e(r,i,o,a,s)}compareTo(e){return this===e?0:void 0===e?1:It(this.major,e.major)||It(this.minor,e.minor)||It(this.patch,e.patch)||function(e,t){if(e===t)return 0;if(0===e.length)return 0===t.length?0:1;if(0===t.length)return-1;const n=Math.min(e.length,t.length);for(let r=0;r|>=|=)?\s*([a-z0-9-+.*]+)$/i;function zn(e){const t=[];for(let n of e.trim().split(Ln)){if(!n)continue;const e=[];n=n.trim();const r=Bn.exec(n);if(r){if(!Un(r[1],r[2],e))return}else for(const t of n.split(Mn)){const n=Jn.exec(t.trim());if(!n||!Vn(n[1],n[2],e))return}t.push(e)}return t}function qn(e){const t=Rn.exec(e);if(!t)return;const[,n,r="*",i="*",o,a]=t;return{version:new In(Wn(n)?0:parseInt(n,10),Wn(n)||Wn(r)?0:parseInt(r,10),Wn(n)||Wn(r)||Wn(i)?0:parseInt(i,10),o,a),major:n,minor:r,patch:i}}function Un(e,t,n){const r=qn(e);if(!r)return!1;const i=qn(t);return!!i&&(Wn(r.major)||n.push($n(">=",r.version)),Wn(i.major)||n.push(Wn(i.minor)?$n("<",i.version.increment("major")):Wn(i.patch)?$n("<",i.version.increment("minor")):$n("<=",i.version)),!0)}function Vn(e,t,n){const r=qn(t);if(!r)return!1;const{version:i,major:o,minor:a,patch:s}=r;if(Wn(o))"<"!==e&&">"!==e||n.push($n("<",In.zero));else switch(e){case"~":n.push($n(">=",i)),n.push($n("<",i.increment(Wn(a)?"major":"minor")));break;case"^":n.push($n(">=",i)),n.push($n("<",i.increment(i.major>0||Wn(a)?"major":i.minor>0||Wn(s)?"minor":"patch")));break;case"<":case">=":n.push(Wn(a)||Wn(s)?$n(e,i.with({prerelease:"0"})):$n(e,i));break;case"<=":case">":n.push(Wn(a)?$n("<="===e?"<":">=",i.increment("major").with({prerelease:"0"})):Wn(s)?$n("<="===e?"<":">=",i.increment("minor").with({prerelease:"0"})):$n(e,i));break;case"=":case void 0:Wn(a)||Wn(s)?(n.push($n(">=",i.with({prerelease:"0"}))),n.push($n("<",i.increment(Wn(a)?"major":"minor").with({prerelease:"0"})))):n.push($n("=",i));break;default:return!1}return!0}function Wn(e){return"*"===e||"x"===e||"X"===e}function $n(e,t){return{operator:e,operand:t}}function Hn(e,t){for(const n of t)if(!Kn(e,n.operator,n.operand))return!1;return!0}function Kn(e,t,n){const r=e.compareTo(n);switch(t){case"<":return r<0;case"<=":return r<=0;case">":return r>0;case">=":return r>=0;case"=":return 0===r;default:return Tn.assertNever(t)}}function Gn(e){return M(e,Xn).join(" ")}function Xn(e){return`${e.operator}${e.operand}`}var Qn=function(){const t=function(){if(kn())try{const{performance:t}=e("perf_hooks");return{shouldWriteNativeEvents:!1,performance:t}}catch{}if("object"==typeof performance)return{shouldWriteNativeEvents:!0,performance:performance}}();if(!t)return;const{shouldWriteNativeEvents:n,performance:r}=t,i={shouldWriteNativeEvents:n,performance:void 0,performanceTime:void 0};return"number"==typeof r.timeOrigin&&"function"==typeof r.now&&(i.performanceTime=r),i.performanceTime&&"function"==typeof r.mark&&"function"==typeof r.measure&&"function"==typeof r.clearMarks&&"function"==typeof r.clearMeasures&&(i.performance=r),i}(),Yn=null==Qn?void 0:Qn.performanceTime;function Zn(){return Qn}var er,tr=Yn?()=>Yn.now():Date.now;try{const t=n.env.TS_ETW_MODULE_PATH??"./node_modules/@microsoft/typescript-etw";er=e(t)}catch(e){er=void 0}var nr,rr,ir=(null==er?void 0:er.logEvent)?er:void 0,or={};function ar(e,t,n,r){return e?sr(t,n,r):_r}function sr(e,t,n){let r=0;return{enter:function(){1===++r&&gr(t)},exit:function(){0===--r?(gr(n),hr(e,t,n)):r<0&&Tn.fail("enter/exit count does not match.")}}}a(or,{clearMarks:()=>kr,clearMeasures:()=>Sr,createTimer:()=>sr,createTimerIf:()=>ar,disable:()=>wr,enable:()=>Cr,forEachMark:()=>xr,forEachMeasure:()=>br,getCount:()=>yr,getDuration:()=>vr,isEnabled:()=>Tr,mark:()=>gr,measure:()=>hr,nullTimer:()=>_r});var cr,lr,_r={enter:ft,exit:ft},ur=!1,dr=tr(),pr=new Map,fr=new Map,mr=new Map;function gr(e){if(ur){const t=fr.get(e)??0;fr.set(e,t+1),pr.set(e,tr()),null==rr||rr.mark(e),"function"==typeof onProfilerEvent&&onProfilerEvent(e)}}function hr(e,t,n){if(ur){const r=(void 0!==n?pr.get(n):void 0)??tr(),i=(void 0!==t?pr.get(t):void 0)??dr,o=mr.get(e)||0;mr.set(e,o+(r-i)),null==rr||rr.measure(e,t,n)}}function yr(e){return fr.get(e)||0}function vr(e){return mr.get(e)||0}function br(e){mr.forEach((t,n)=>e(n,t))}function xr(e){pr.forEach((t,n)=>e(n))}function Sr(e){void 0!==e?mr.delete(e):mr.clear(),null==rr||rr.clearMeasures(e)}function kr(e){void 0!==e?(fr.delete(e),pr.delete(e)):(fr.clear(),pr.clear()),null==rr||rr.clearMarks(e)}function Tr(){return ur}function Cr(e=To){var t;return ur||(ur=!0,nr||(nr=Zn()),(null==nr?void 0:nr.performance)&&(dr=nr.performance.timeOrigin,(nr.shouldWriteNativeEvents||(null==(t=null==e?void 0:e.cpuProfilingEnabled)?void 0:t.call(e))||(null==e?void 0:e.debugMode))&&(rr=nr.performance))),!0}function wr(){ur&&(pr.clear(),fr.clear(),mr.clear(),rr=void 0,ur=!1)}(t=>{let r,i,o=0,a=0;const s=[];let c;const l=[];let _;var u;t.startTracing=function(_,u,d){if(Tn.assert(!cr,"Tracing already started"),void 0===r)try{r=e("fs")}catch(e){throw new Error(`tracing requires having fs\n(original error: ${e.message||e})`)}i=_,s.length=0,void 0===c&&(c=Yo(u,"legend.json")),r.existsSync(u)||r.mkdirSync(u,{recursive:!0});const p="build"===i?`.${n.pid}-${++o}`:"server"===i?`.${n.pid}`:"",f=Yo(u,`trace${p}.json`),m=Yo(u,`types${p}.json`);l.push({configFilePath:d,tracePath:f,typesPath:m}),a=r.openSync(f,"w"),cr=t;const g={cat:"__metadata",ph:"M",ts:1e3*tr(),pid:1,tid:1};r.writeSync(a,"[\n"+[{name:"process_name",args:{name:"tsc"},...g},{name:"thread_name",args:{name:"Main"},...g},{name:"TracingStartedInBrowser",...g,cat:"disabled-by-default-devtools.timeline"}].map(e=>JSON.stringify(e)).join(",\n"))},t.stopTracing=function(){Tn.assert(cr,"Tracing is not in progress"),Tn.assert(!!s.length==("server"!==i)),r.writeSync(a,"\n]\n"),r.closeSync(a),cr=void 0,s.length?function(e){var t,n,i,o,a,s,c,_,u,d,p,f,m,h,y,v,b,x,S;gr("beginDumpTypes");const k=l[l.length-1].typesPath,T=r.openSync(k,"w"),C=new Map;r.writeSync(T,"[");const w=e.length;for(let l=0;le.id),referenceLocation:g(e.node)}}let A={};if(16777216&k.flags){const e=k;A={conditionalCheckType:null==(s=e.checkType)?void 0:s.id,conditionalExtendsType:null==(c=e.extendsType)?void 0:c.id,conditionalTrueType:(null==(_=e.resolvedTrueType)?void 0:_.id)??-1,conditionalFalseType:(null==(u=e.resolvedFalseType)?void 0:u.id)??-1}}let I={};if(33554432&k.flags){const e=k;I={substitutionBaseType:null==(d=e.baseType)?void 0:d.id,constraintType:null==(p=e.constraint)?void 0:p.id}}let O={};if(1024&N){const e=k;O={reverseMappedSourceType:null==(f=e.source)?void 0:f.id,reverseMappedMappedType:null==(m=e.mappedType)?void 0:m.id,reverseMappedConstraintType:null==(h=e.constraintType)?void 0:h.id}}let j,L={};if(256&N){const e=k;L={evolvingArrayElementType:e.elementType.id,evolvingArrayFinalType:null==(y=e.finalArrayType)?void 0:y.id}}const M=k.checker.getRecursionIdentity(k);M&&(j=C.get(M),j||(j=C.size,C.set(M,j)));const R={id:k.id,intrinsicName:k.intrinsicName,symbolName:(null==D?void 0:D.escapedName)&&Cc(D.escapedName),recursionId:j,isTuple:!!(8&N)||void 0,unionTypes:1048576&k.flags?null==(v=k.types)?void 0:v.map(e=>e.id):void 0,intersectionTypes:2097152&k.flags?k.types.map(e=>e.id):void 0,aliasTypeArguments:null==(b=k.aliasTypeArguments)?void 0:b.map(e=>e.id),keyofType:4194304&k.flags?null==(x=k.type)?void 0:x.id:void 0,...E,...F,...A,...I,...O,...L,destructuringPattern:g(k.pattern),firstDeclaration:g(null==(S=null==D?void 0:D.declarations)?void 0:S[0]),flags:Tn.formatTypeFlags(k.flags).split("|"),display:P};r.writeSync(T,JSON.stringify(R)),l0),f(d.length-1,1e3*tr(),e),d.length--},t.popAll=function(){const e=1e3*tr();for(let t=d.length-1;t>=0;t--)f(t,e);d.length=0};const p=1e4;function f(e,t,n){const{phase:r,name:i,args:o,time:a,separateBeginAndEnd:s}=d[e];s?(Tn.assert(!n,"`results` are not supported for events with `separateBeginAndEnd`"),m("E",r,i,o,void 0,t)):p-a%p<=t-a&&m("X",r,i,{...o,results:n},'"dur":'+(t-a),a)}function m(e,t,n,o,s,c=1e3*tr()){"server"===i&&"checkTypes"===t||(gr("beginTracing"),r.writeSync(a,`,\n{"pid":1,"tid":1,"ph":"${e}","cat":"${t}","ts":${c},"name":"${n}"`),s&&r.writeSync(a,`,${s}`),o&&r.writeSync(a,`,"args":${JSON.stringify(o)}`),r.writeSync(a,"}"),gr("endTracing"),hr("Tracing","beginTracing","endTracing"))}function g(e){const t=Dd(e);return t?{path:t.path,start:n(ns(t,e.pos)),end:n(ns(t,e.end))}:void 0;function n(e){return{line:e.line+1,character:e.character+1}}}t.dumpLegend=function(){c&&r.writeFileSync(c,JSON.stringify(l))}})(lr||(lr={}));var Nr=lr.startTracing,Dr=lr.dumpLegend,Pr=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.ImportAttributes=300]="ImportAttributes",e[e.ImportAttribute=301]="ImportAttribute",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.SourceFile=307]="SourceFile",e[e.Bundle=308]="Bundle",e[e.JSDocTypeExpression=309]="JSDocTypeExpression",e[e.JSDocNameReference=310]="JSDocNameReference",e[e.JSDocMemberName=311]="JSDocMemberName",e[e.JSDocAllType=312]="JSDocAllType",e[e.JSDocUnknownType=313]="JSDocUnknownType",e[e.JSDocNullableType=314]="JSDocNullableType",e[e.JSDocNonNullableType=315]="JSDocNonNullableType",e[e.JSDocOptionalType=316]="JSDocOptionalType",e[e.JSDocFunctionType=317]="JSDocFunctionType",e[e.JSDocVariadicType=318]="JSDocVariadicType",e[e.JSDocNamepathType=319]="JSDocNamepathType",e[e.JSDoc=320]="JSDoc",e[e.JSDocComment=320]="JSDocComment",e[e.JSDocText=321]="JSDocText",e[e.JSDocTypeLiteral=322]="JSDocTypeLiteral",e[e.JSDocSignature=323]="JSDocSignature",e[e.JSDocLink=324]="JSDocLink",e[e.JSDocLinkCode=325]="JSDocLinkCode",e[e.JSDocLinkPlain=326]="JSDocLinkPlain",e[e.JSDocTag=327]="JSDocTag",e[e.JSDocAugmentsTag=328]="JSDocAugmentsTag",e[e.JSDocImplementsTag=329]="JSDocImplementsTag",e[e.JSDocAuthorTag=330]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=331]="JSDocDeprecatedTag",e[e.JSDocClassTag=332]="JSDocClassTag",e[e.JSDocPublicTag=333]="JSDocPublicTag",e[e.JSDocPrivateTag=334]="JSDocPrivateTag",e[e.JSDocProtectedTag=335]="JSDocProtectedTag",e[e.JSDocReadonlyTag=336]="JSDocReadonlyTag",e[e.JSDocOverrideTag=337]="JSDocOverrideTag",e[e.JSDocCallbackTag=338]="JSDocCallbackTag",e[e.JSDocOverloadTag=339]="JSDocOverloadTag",e[e.JSDocEnumTag=340]="JSDocEnumTag",e[e.JSDocParameterTag=341]="JSDocParameterTag",e[e.JSDocReturnTag=342]="JSDocReturnTag",e[e.JSDocThisTag=343]="JSDocThisTag",e[e.JSDocTypeTag=344]="JSDocTypeTag",e[e.JSDocTemplateTag=345]="JSDocTemplateTag",e[e.JSDocTypedefTag=346]="JSDocTypedefTag",e[e.JSDocSeeTag=347]="JSDocSeeTag",e[e.JSDocPropertyTag=348]="JSDocPropertyTag",e[e.JSDocThrowsTag=349]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=350]="JSDocSatisfiesTag",e[e.JSDocImportTag=351]="JSDocImportTag",e[e.SyntaxList=352]="SyntaxList",e[e.NotEmittedStatement=353]="NotEmittedStatement",e[e.PartiallyEmittedExpression=354]="PartiallyEmittedExpression",e[e.CommaListExpression=355]="CommaListExpression",e[e.SyntheticReferenceExpression=356]="SyntheticReferenceExpression",e[e.Count=357]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=309]="FirstJSDocNode",e[e.LastJSDocNode=351]="LastJSDocNode",e[e.FirstJSDocTagNode=327]="FirstJSDocTagNode",e[e.LastJSDocTagNode=351]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(Pr||{}),Er=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(Er||{}),Fr=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(Fr||{}),Ar=(e=>(e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement",e))(Ar||{}),Ir=(e=>(e[e.None=0]="None",e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.Reported=4]="Reported",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask",e))(Ir||{}),Or=(e=>(e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Loop=2]="Loop",e[e.Unique=3]="Unique",e[e.Node=4]="Node",e[e.KindMask=7]="KindMask",e[e.ReservedInNestedScopes=8]="ReservedInNestedScopes",e[e.Optimistic=16]="Optimistic",e[e.FileLevel=32]="FileLevel",e[e.AllowNameSubstitution=64]="AllowNameSubstitution",e))(Or||{}),jr=(e=>(e[e.None=0]="None",e[e.HasIndices=1]="HasIndices",e[e.Global=2]="Global",e[e.IgnoreCase=4]="IgnoreCase",e[e.Multiline=8]="Multiline",e[e.DotAll=16]="DotAll",e[e.Unicode=32]="Unicode",e[e.UnicodeSets=64]="UnicodeSets",e[e.Sticky=128]="Sticky",e[e.AnyUnicodeMode=96]="AnyUnicodeMode",e[e.Modifiers=28]="Modifiers",e))(jr||{}),Lr=(e=>(e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.ContainsInvalidEscape=2048]="ContainsInvalidEscape",e[e.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=7176]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",e[e.IsInvalid=26656]="IsInvalid",e))(Lr||{}),Mr=(e=>(e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.ReduceLabel=1024]="ReduceLabel",e[e.Referenced=2048]="Referenced",e[e.Shared=4096]="Shared",e[e.Label=12]="Label",e[e.Condition=96]="Condition",e))(Mr||{}),Rr=(e=>(e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore",e))(Rr||{}),Br=class{},Jr=(e=>(e[e.RootFile=0]="RootFile",e[e.SourceFromProjectReference=1]="SourceFromProjectReference",e[e.OutputFromProjectReference=2]="OutputFromProjectReference",e[e.Import=3]="Import",e[e.ReferenceFile=4]="ReferenceFile",e[e.TypeReferenceDirective=5]="TypeReferenceDirective",e[e.LibFile=6]="LibFile",e[e.LibReferenceDirective=7]="LibReferenceDirective",e[e.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",e))(Jr||{}),zr=(e=>(e[e.FilePreprocessingLibReferenceDiagnostic=0]="FilePreprocessingLibReferenceDiagnostic",e[e.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",e[e.ResolutionDiagnostics=2]="ResolutionDiagnostics",e))(zr||{}),qr=(e=>(e[e.Js=0]="Js",e[e.Dts=1]="Dts",e))(qr||{}),Ur=(e=>(e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely",e))(Ur||{}),Vr=(e=>(e[e.Success=0]="Success",e[e.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",e[e.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",e[e.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",e))(Vr||{}),Wr=(e=>(e[e.Ok=0]="Ok",e[e.NeedsOverride=1]="NeedsOverride",e[e.HasInvalidOverride=2]="HasInvalidOverride",e))(Wr||{}),$r=(e=>(e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype",e))($r||{}),Hr=(e=>(e[e.None=0]="None",e[e.NoSupertypeReduction=1]="NoSupertypeReduction",e[e.NoConstraintReduction=2]="NoConstraintReduction",e))(Hr||{}),Kr=(e=>(e[e.None=0]="None",e[e.Signature=1]="Signature",e[e.NoConstraints=2]="NoConstraints",e[e.Completions=4]="Completions",e[e.SkipBindingPatterns=8]="SkipBindingPatterns",e))(Kr||{}),Gr=(e=>(e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.WriteComputedProps=1073741824]="WriteComputedProps",e[e.NoSyntacticPrinter=-2147483648]="NoSyntacticPrinter",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.DoNotIncludeSymbolChain=134217728]="DoNotIncludeSymbolChain",e[e.AllowUnresolvedNames=1]="AllowUnresolvedNames",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName",e))(Gr||{}),Xr=(e=>(e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AddUndefined=131072]="AddUndefined",e[e.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",e[e.InArrayType=524288]="InArrayType",e[e.InElementType=2097152]="InElementType",e[e.InFirstTypeArgument=4194304]="InFirstTypeArgument",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.NodeBuilderFlagsMask=848330095]="NodeBuilderFlagsMask",e))(Xr||{}),Qr=(e=>(e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",e[e.AllowAnyNodeKind=4]="AllowAnyNodeKind",e[e.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",e[e.WriteComputedProps=16]="WriteComputedProps",e[e.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",e))(Qr||{}),Yr=(e=>(e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed",e[e.NotResolved=3]="NotResolved",e))(Yr||{}),Zr=(e=>(e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread",e))(Zr||{}),ei=(e=>(e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier",e))(ei||{}),ti=(e=>(e[e.Unknown=0]="Unknown",e[e.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",e[e.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",e[e.NumberLikeType=3]="NumberLikeType",e[e.BigIntLikeType=4]="BigIntLikeType",e[e.StringLikeType=5]="StringLikeType",e[e.BooleanType=6]="BooleanType",e[e.ArrayLikeType=7]="ArrayLikeType",e[e.ESSymbolType=8]="ESSymbolType",e[e.Promise=9]="Promise",e[e.TypeWithCallSignature=10]="TypeWithCallSignature",e[e.ObjectType=11]="ObjectType",e))(ti||{}),ni=(e=>(e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=-1]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.AccessorExcludes=13247]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer",e))(ni||{}),ri=(e=>(e[e.None=0]="None",e[e.Instantiated=1]="Instantiated",e[e.SyntheticProperty=2]="SyntheticProperty",e[e.SyntheticMethod=4]="SyntheticMethod",e[e.Readonly=8]="Readonly",e[e.ReadPartial=16]="ReadPartial",e[e.WritePartial=32]="WritePartial",e[e.HasNonUniformType=64]="HasNonUniformType",e[e.HasLiteralType=128]="HasLiteralType",e[e.ContainsPublic=256]="ContainsPublic",e[e.ContainsProtected=512]="ContainsProtected",e[e.ContainsPrivate=1024]="ContainsPrivate",e[e.ContainsStatic=2048]="ContainsStatic",e[e.Late=4096]="Late",e[e.ReverseMapped=8192]="ReverseMapped",e[e.OptionalParameter=16384]="OptionalParameter",e[e.RestParameter=32768]="RestParameter",e[e.DeferredType=65536]="DeferredType",e[e.HasNeverType=131072]="HasNeverType",e[e.Mapped=262144]="Mapped",e[e.StripOptional=524288]="StripOptional",e[e.Unresolved=1048576]="Unresolved",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial",e))(ri||{}),ii=(e=>(e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.Resolving="__resolving__",e.ExportEquals="export=",e.Default="default",e.This="this",e.InstantiationExpression="__instantiationExpression",e.ImportAttributes="__importAttributes",e))(ii||{}),oi=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e[e.LazyFlags=539358128]="LazyFlags",e))(oi||{}),ai=(e=>(e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.TemplateLiteral=134217728]="TemplateLiteral",e[e.StringMapping=268435456]="StringMapping",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109472]="Unit",e[e.Freshable=2976]="Freshable",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.StringLike=402653316]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",e[e.DisjointDomains=469892092]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=406847488]="InstantiablePrimitive",e[e.Instantiable=465829888]="Instantiable",e[e.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899393]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(ai||{}),si=(e=>(e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.SingleSignatureType=134217728]="SingleSignatureType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",e))(si||{}),ci=(e=>(e[e.Invariant=0]="Invariant",e[e.Covariant=1]="Covariant",e[e.Contravariant=2]="Contravariant",e[e.Bivariant=3]="Bivariant",e[e.Independent=4]="Independent",e[e.VarianceMask=7]="VarianceMask",e[e.Unmeasurable=8]="Unmeasurable",e[e.Unreliable=16]="Unreliable",e[e.AllowsStructuralFallback=24]="AllowsStructuralFallback",e))(ci||{}),li=(e=>(e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest",e))(li||{}),_i=(e=>(e[e.None=0]="None",e[e.IncludeUndefined=1]="IncludeUndefined",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.Writing=4]="Writing",e[e.CacheSymbol=8]="CacheSymbol",e[e.NoTupleBoundsCheck=16]="NoTupleBoundsCheck",e[e.ExpressionPosition=32]="ExpressionPosition",e[e.ReportDeprecated=64]="ReportDeprecated",e[e.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",e[e.Contextual=256]="Contextual",e[e.Persistent=1]="Persistent",e))(_i||{}),ui=(e=>(e[e.None=0]="None",e[e.StringsOnly=1]="StringsOnly",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.NoReducibleCheck=4]="NoReducibleCheck",e))(ui||{}),di=(e=>(e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed",e))(di||{}),pi=(e=>(e[e.Call=0]="Call",e[e.Construct=1]="Construct",e))(pi||{}),fi=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(fi||{}),mi=(e=>(e[e.String=0]="String",e[e.Number=1]="Number",e))(mi||{}),gi=(e=>(e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Deferred=2]="Deferred",e[e.Function=3]="Function",e[e.Composite=4]="Composite",e[e.Merged=5]="Merged",e))(gi||{}),hi=(e=>(e[e.None=0]="None",e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.SubstituteSource=4]="SubstituteSource",e[e.HomomorphicMappedType=8]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=32]="MappedTypeConstraint",e[e.ContravariantConditional=64]="ContravariantConditional",e[e.ReturnType=128]="ReturnType",e[e.LiteralKeyof=256]="LiteralKeyof",e[e.NoConstraints=512]="NoConstraints",e[e.AlwaysStrict=1024]="AlwaysStrict",e[e.MaxValue=2048]="MaxValue",e[e.PriorityImpliesCombination=416]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity",e))(hi||{}),yi=(e=>(e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction",e))(yi||{}),vi=(e=>(e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True",e))(vi||{}),bi=(e=>(e[e.None=0]="None",e[e.ExportsProperty=1]="ExportsProperty",e[e.ModuleExports=2]="ModuleExports",e[e.PrototypeProperty=3]="PrototypeProperty",e[e.ThisProperty=4]="ThisProperty",e[e.Property=5]="Property",e[e.Prototype=6]="Prototype",e[e.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",e[e.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",e[e.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty",e))(bi||{}),xi=(e=>(e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message",e))(xi||{});function Si(e,t=!0){const n=xi[e.category];return t?n.toLowerCase():n}var ki=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e[e.Node10=2]="Node10",e[e.Node16=3]="Node16",e[e.NodeNext=99]="NodeNext",e[e.Bundler=100]="Bundler",e))(ki||{}),Ti=(e=>(e[e.Legacy=1]="Legacy",e[e.Auto=2]="Auto",e[e.Force=3]="Force",e))(Ti||{}),Ci=(e=>(e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e[e.UseFsEvents=4]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",e))(Ci||{}),wi=(e=>(e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e))(wi||{}),Ni=(e=>(e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority",e[e.FixedChunkSize=3]="FixedChunkSize",e))(Ni||{}),Di=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ES2020=6]="ES2020",e[e.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.NodeNext=199]="NodeNext",e[e.Preserve=200]="Preserve",e))(Di||{}),Pi=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(Pi||{}),Ei=(e=>(e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error",e))(Ei||{}),Fi=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(Fi||{}),Ai=(e=>(e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred",e))(Ai||{}),Ii=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(Ii||{}),Oi=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(Oi||{}),ji=(e=>(e[e.None=0]="None",e[e.Recursive=1]="Recursive",e))(ji||{}),Li=(e=>(e[e.EOF=-1]="EOF",e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e.replacementCharacter=65533]="replacementCharacter",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab",e))(Li||{}),Mi=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(Mi||{}),Ri=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(Ri||{}),Bi=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(Bi||{}),Ji=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(Ji||{}),zi=(e=>(e[e.None=0]="None",e[e.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=2]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",e[e.Immutable=8]="Immutable",e[e.IndirectCall=16]="IndirectCall",e[e.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",e))(zi||{}),qi=(e=>(e[e.Classes=2]="Classes",e[e.ForOf=2]="ForOf",e[e.Generators=2]="Generators",e[e.Iteration=2]="Iteration",e[e.SpreadElements=2]="SpreadElements",e[e.RestElements=2]="RestElements",e[e.TaggedTemplates=2]="TaggedTemplates",e[e.DestructuringAssignment=2]="DestructuringAssignment",e[e.BindingPatterns=2]="BindingPatterns",e[e.ArrowFunctions=2]="ArrowFunctions",e[e.BlockScopedVariables=2]="BlockScopedVariables",e[e.ObjectAssign=2]="ObjectAssign",e[e.RegularExpressionFlagsUnicode=2]="RegularExpressionFlagsUnicode",e[e.RegularExpressionFlagsSticky=2]="RegularExpressionFlagsSticky",e[e.Exponentiation=3]="Exponentiation",e[e.AsyncFunctions=4]="AsyncFunctions",e[e.ForAwaitOf=5]="ForAwaitOf",e[e.AsyncGenerators=5]="AsyncGenerators",e[e.AsyncIteration=5]="AsyncIteration",e[e.ObjectSpreadRest=5]="ObjectSpreadRest",e[e.RegularExpressionFlagsDotAll=5]="RegularExpressionFlagsDotAll",e[e.BindinglessCatch=6]="BindinglessCatch",e[e.BigInt=7]="BigInt",e[e.NullishCoalesce=7]="NullishCoalesce",e[e.OptionalChaining=7]="OptionalChaining",e[e.LogicalAssignment=8]="LogicalAssignment",e[e.TopLevelAwait=9]="TopLevelAwait",e[e.ClassFields=9]="ClassFields",e[e.PrivateNamesAndClassStaticBlocks=9]="PrivateNamesAndClassStaticBlocks",e[e.RegularExpressionFlagsHasIndices=9]="RegularExpressionFlagsHasIndices",e[e.ShebangComments=99]="ShebangComments",e[e.UsingAndAwaitUsing=99]="UsingAndAwaitUsing",e[e.ClassAndClassElementDecorators=99]="ClassAndClassElementDecorators",e[e.RegularExpressionFlagsUnicodeSets=99]="RegularExpressionFlagsUnicodeSets",e))(qi||{}),Ui=(e=>(e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",e[e.Metadata=16]="Metadata",e[e.Param=32]="Param",e[e.Awaiter=64]="Awaiter",e[e.Generator=128]="Generator",e[e.Values=256]="Values",e[e.Read=512]="Read",e[e.SpreadArray=1024]="SpreadArray",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.ImportStar=65536]="ImportStar",e[e.ImportDefault=131072]="ImportDefault",e[e.MakeTemplateObject=262144]="MakeTemplateObject",e[e.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",e[e.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",e[e.SetFunctionName=4194304]="SetFunctionName",e[e.PropKey=8388608]="PropKey",e[e.AddDisposableResourceAndDisposeResources=16777216]="AddDisposableResourceAndDisposeResources",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=16777216]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes",e))(Ui||{}),Vi=(e=>(e[e.SourceFile=0]="SourceFile",e[e.Expression=1]="Expression",e[e.IdentifierName=2]="IdentifierName",e[e.MappedTypeParameter=3]="MappedTypeParameter",e[e.Unspecified=4]="Unspecified",e[e.EmbeddedStatement=5]="EmbeddedStatement",e[e.JsxAttributeValue=6]="JsxAttributeValue",e[e.ImportTypeNodeAttributes=7]="ImportTypeNodeAttributes",e))(Vi||{}),Wi=(e=>(e[e.Parentheses=1]="Parentheses",e[e.TypeAssertions=2]="TypeAssertions",e[e.NonNullAssertions=4]="NonNullAssertions",e[e.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",e[e.Assertions=6]="Assertions",e[e.All=15]="All",e[e.ExcludeJSDocTypeAssertion=16]="ExcludeJSDocTypeAssertion",e))(Wi||{}),$i=(e=>(e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",e))($i||{}),Hi=(e=>(e[e.None=0]="None",e[e.SingleLine=0]="SingleLine",e[e.MultiLine=1]="MultiLine",e[e.PreserveLines=2]="PreserveLines",e[e.LinesMask=3]="LinesMask",e[e.NotDelimited=0]="NotDelimited",e[e.BarDelimited=4]="BarDelimited",e[e.AmpersandDelimited=8]="AmpersandDelimited",e[e.CommaDelimited=16]="CommaDelimited",e[e.AsteriskDelimited=32]="AsteriskDelimited",e[e.DelimitersMask=60]="DelimitersMask",e[e.AllowTrailingComma=64]="AllowTrailingComma",e[e.Indented=128]="Indented",e[e.SpaceBetweenBraces=256]="SpaceBetweenBraces",e[e.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",e[e.Braces=1024]="Braces",e[e.Parenthesis=2048]="Parenthesis",e[e.AngleBrackets=4096]="AngleBrackets",e[e.SquareBrackets=8192]="SquareBrackets",e[e.BracketsMask=15360]="BracketsMask",e[e.OptionalIfUndefined=16384]="OptionalIfUndefined",e[e.OptionalIfEmpty=32768]="OptionalIfEmpty",e[e.Optional=49152]="Optional",e[e.PreferNewLine=65536]="PreferNewLine",e[e.NoTrailingNewLine=131072]="NoTrailingNewLine",e[e.NoInterveningComments=262144]="NoInterveningComments",e[e.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",e[e.SingleElement=1048576]="SingleElement",e[e.SpaceAfterList=2097152]="SpaceAfterList",e[e.Modifiers=2359808]="Modifiers",e[e.HeritageClauses=512]="HeritageClauses",e[e.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",e[e.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",e[e.SingleLineTupleTypeElements=528]="SingleLineTupleTypeElements",e[e.MultiLineTupleTypeElements=657]="MultiLineTupleTypeElements",e[e.UnionTypeConstituents=516]="UnionTypeConstituents",e[e.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",e[e.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",e[e.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",e[e.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",e[e.ImportAttributes=526226]="ImportAttributes",e[e.ImportClauseEntries=526226]="ImportClauseEntries",e[e.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",e[e.CommaListElements=528]="CommaListElements",e[e.CallExpressionArguments=2576]="CallExpressionArguments",e[e.NewExpressionArguments=18960]="NewExpressionArguments",e[e.TemplateExpressionSpans=262144]="TemplateExpressionSpans",e[e.SingleLineBlockStatements=768]="SingleLineBlockStatements",e[e.MultiLineBlockStatements=129]="MultiLineBlockStatements",e[e.VariableDeclarationList=528]="VariableDeclarationList",e[e.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",e[e.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",e[e.ClassHeritageClauses=0]="ClassHeritageClauses",e[e.ClassMembers=129]="ClassMembers",e[e.InterfaceMembers=129]="InterfaceMembers",e[e.EnumMembers=145]="EnumMembers",e[e.CaseBlockClauses=129]="CaseBlockClauses",e[e.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",e[e.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",e[e.JsxElementAttributes=262656]="JsxElementAttributes",e[e.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",e[e.HeritageClauseTypes=528]="HeritageClauseTypes",e[e.SourceFileStatements=131073]="SourceFileStatements",e[e.Decorators=2146305]="Decorators",e[e.TypeArguments=53776]="TypeArguments",e[e.TypeParameters=53776]="TypeParameters",e[e.Parameters=2576]="Parameters",e[e.IndexSignatureParameters=8848]="IndexSignatureParameters",e[e.JSDocComment=33]="JSDocComment",e))(Hi||{}),Ki=(e=>(e[e.None=0]="None",e[e.TripleSlashXML=1]="TripleSlashXML",e[e.SingleLine=2]="SingleLine",e[e.MultiLine=4]="MultiLine",e[e.All=7]="All",e[e.Default=7]="Default",e))(Ki||{}),Gi={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},Xi=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))(Xi||{});function Qi(e){let t=5381;for(let n=0;n(e[e.Created=0]="Created",e[e.Changed=1]="Changed",e[e.Deleted=2]="Deleted",e))(Zi||{}),eo=(e=>(e[e.High=2e3]="High",e[e.Medium=500]="Medium",e[e.Low=250]="Low",e))(eo||{}),to=new Date(0);function no(e,t){return e.getModifiedTime(t)||to}function ro(e){return{250:e.Low,500:e.Medium,2e3:e.High}}var io={Low:32,Medium:64,High:256},oo=ro(io),ao=ro(io);function so(e,t,n,r,i){let o=n;for(let s=t.length;r&&s;a(),s--){const a=t[n];if(!a)continue;if(a.isClosed){t[n]=void 0;continue}r--;const s=uo(a,no(e,a.fileName));a.isClosed?t[n]=void 0:(null==i||i(a,n,s),t[n]&&(o{o.isClosed=!0,rn(t,o)}}};function a(e){const t=[];return t.pollingInterval=e,t.pollIndex=0,t.pollScheduled=!1,t}function s(e,t){t.pollIndex=l(t,t.pollingInterval,t.pollIndex,oo[t.pollingInterval]),t.length?p(t.pollingInterval):(Tn.assert(0===t.pollIndex),t.pollScheduled=!1)}function c(e,t){l(n,250,0,n.length),s(0,t),!t.pollScheduled&&n.length&&p(250)}function l(t,r,i,o){return so(e,t,i,o,function(e,i,o){o?(e.unchangedPolls=0,t!==n&&(t[i]=void 0,a=e,n.push(a),d(250))):e.unchangedPolls!==ao[r]?e.unchangedPolls++:t===n?(e.unchangedPolls=1,t[i]=void 0,u(e,250)):2e3!==r&&(e.unchangedPolls++,t[i]=void 0,u(e,250===r?500:2e3));var a})}function _(e){switch(e){case 250:return r;case 500:return i;case 2e3:return o}}function u(e,t){_(t).push(e),d(t)}function d(e){_(e).pollScheduled||p(e)}function p(t){_(t).pollScheduled=e.setTimeout(250===t?c:s,t,250===t?"pollLowPollingIntervalQueue":"pollPollingIntervalQueue",_(t))}}function lo(e,t,n,r){const i=rt(),o=r?new Map:void 0,a=new Map,s=on(t);return function(t,r,c,l){const _=s(t);1===i.add(_,r).length&&o&&o.set(_,n(t)||to);const u=Vo(_)||".",d=a.get(u)||function(t,r,c){const l=e(t,1,(e,r)=>{if(!_t(r))return;const a=ta(r,t),c=s(a),l=a&&i.get(c);if(l){let t,r=1;if(o){const i=o.get(c);if("change"===e&&(t=n(a)||to,t.getTime()===i.getTime()))return;t||(t=n(a)||to),o.set(c,t),i===to?r=0:t===to&&(r=2)}for(const e of l)e(a,r,t)}},!1,500,c);return l.referenceCount=0,a.set(r,l),l}(Vo(t)||".",u,l);return d.referenceCount++,{close:()=>{1===d.referenceCount?(d.close(),a.delete(u)):d.referenceCount--,i.remove(_,r)}}}}function _o(e,t,n,r,i){const o=on(t)(n),a=e.get(o);return a?a.callbacks.push(r):e.set(o,{watcher:i((t,n,r)=>{var i;return null==(i=e.get(o))?void 0:i.callbacks.slice().forEach(e=>e(t,n,r))}),callbacks:[r]}),{close:()=>{const t=e.get(o);t&&en(t.callbacks,r)&&!t.callbacks.length&&(e.delete(o),RU(t))}}}function uo(e,t){const n=e.mtime.getTime(),r=t.getTime();return n!==r&&(e.mtime=t,e.callback(e.fileName,po(n,r),t),!0)}function po(e,t){return 0===e?0:0===t?2:1}var fo=["/node_modules/.","/.git","/.#"],mo=ft;function go(e){return mo(e)}function ho(e){mo=e}function yo({watchDirectory:e,useCaseSensitiveFileNames:t,getCurrentDirectory:n,getAccessibleSortedChildDirectories:r,fileSystemEntryExists:i,realpath:o,setTimeout:a,clearTimeout:s}){const c=new Map,l=rt(),_=new Map;let u;const d=Bt(!t),f=on(t);return(t,n,r,i)=>r?m(t,i,n):e(t,n,r,i);function m(t,n,r,o){const d=f(t);let m=c.get(d);m?m.refCount++:(m={watcher:e(t,e=>{var r;x(e,n)||((null==n?void 0:n.synchronousWatchDirectory)?((null==(r=c.get(d))?void 0:r.targetWatcher)||g(t,d,e),b(t,d,n)):function(e,t,n,r){const o=c.get(t);if(o&&i(e,1))return void function(e,t,n,r){const i=_.get(t);i?i.fileNames.push(n):_.set(t,{dirName:e,options:r,fileNames:[n]});u&&(s(u),u=void 0);u=a(h,1e3,"timerToUpdateChildWatches")}(e,t,n,r);g(e,t,n),v(o),y(o)}(t,d,e,n))},!1,n),refCount:1,childWatches:p,targetWatcher:void 0,links:void 0},c.set(d,m),b(t,d,n)),o&&(m.links??(m.links=new Set)).add(o);const S=r&&{dirName:t,callback:r};return S&&l.add(d,S),{dirName:t,close:()=>{var e;const t=Tn.checkDefined(c.get(d));S&&l.remove(d,S),o&&(null==(e=t.links)||e.delete(o)),t.refCount--,t.refCount||(c.delete(d),t.links=void 0,RU(t),v(t),t.childWatches.forEach(bx))}}}function g(e,t,n,r){var i,o;let a,s;_t(n)?a=n:s=n,l.forEach((e,n)=>{if((!s||!0!==s.get(n))&&(n===t||ln(t,n)&&t[n.length]===wo))if(s)if(r){const e=s.get(n);e?e.push(...r):s.set(n,r.slice())}else s.set(n,!0);else e.forEach(({callback:e})=>e(a))}),null==(o=null==(i=c.get(t))?void 0:i.links)||o.forEach(t=>{const n=n=>Yo(t,ya(e,n,f));s?g(t,f(t),s,null==r?void 0:r.map(n)):g(t,f(t),n(a))})}function h(){var e;u=void 0,go(`sysLog:: onTimerToUpdateChildWatches:: ${_.size}`);const t=tr(),n=new Map;for(;!u&&_.size;){const t=_.entries().next();Tn.assert(!t.done);const{value:[r,{dirName:i,options:o,fileNames:a}]}=t;_.delete(r);const s=b(i,r,o);(null==(e=c.get(r))?void 0:e.targetWatcher)||g(i,r,n,s?void 0:a)}go(`sysLog:: invokingWatchers:: Elapsed:: ${tr()-t}ms:: ${_.size}`),l.forEach((e,t)=>{const r=n.get(t);r&&e.forEach(({callback:e,dirName:t})=>{ct(r)?r.forEach(e):e(t)})});go(`sysLog:: Elapsed:: ${tr()-t}ms:: onTimerToUpdateChildWatches:: ${_.size} ${u}`)}function y(e){if(!e)return;const t=e.childWatches;e.childWatches=p;for(const e of t)e.close(),y(c.get(f(e.dirName)))}function v(e){(null==e?void 0:e.targetWatcher)&&(e.targetWatcher.close(),e.targetWatcher=void 0)}function b(e,t,n){const a=c.get(t);if(!a)return!1;const s=na(o(e));let l,_;return 0===d(s,e)?l=yn(i(e,1)?$(r(e),t=>{const r=ta(t,e);return x(r,n)||0!==d(r,na(o(r)))?void 0:r}):p,a.childWatches,(e,t)=>d(e,t.dirName),function(e){u(m(e,n))},bx,u):a.targetWatcher&&0===d(s,a.targetWatcher.dirName)?(l=!1,Tn.assert(a.childWatches===p)):(v(a),a.targetWatcher=m(s,n,void 0,e),a.childWatches.forEach(bx),l=!0),a.childWatches=_||p,l;function u(e){(_||(_=[])).push(e)}}function x(e,r){return ee(fo,n=>function(e,n){return!!e.includes(n)||!t&&f(e).includes(n)}(e,n))||bo(e,r,t,n)}}var vo=(e=>(e[e.File=0]="File",e[e.Directory=1]="Directory",e))(vo||{});function bo(e,t,n,r){return((null==t?void 0:t.excludeDirectories)||(null==t?void 0:t.excludeFiles))&&(LL(e,null==t?void 0:t.excludeFiles,n,r())||LL(e,null==t?void 0:t.excludeDirectories,n,r()))}function xo(e,t,n,r,i){return(o,a)=>{if("rename"===o){const o=a?na(Yo(e,a)):e;a&&bo(o,n,r,i)||t(o)}}}function So({pollingWatchFileWorker:e,getModifiedTime:t,setTimeout:n,clearTimeout:r,fsWatchWorker:i,fileSystemEntryExists:o,useCaseSensitiveFileNames:a,getCurrentDirectory:s,fsSupportsRecursiveFsWatch:c,getAccessibleSortedChildDirectories:l,realpath:_,tscWatchFile:u,useNonPollingWatchers:d,tscWatchDirectory:p,inodeWatching:f,fsWatchWithTimestamp:m,sysLog:g}){const h=new Map,y=new Map,v=new Map;let b,x,S,k,T=!1;return{watchFile:C,watchDirectory:function(e,t,i,u){if(c)return F(e,1,xo(e,t,u,a,s),i,500,MU(u));k||(k=yo({useCaseSensitiveFileNames:a,getCurrentDirectory:s,fileSystemEntryExists:o,getAccessibleSortedChildDirectories:l,watchDirectory:P,realpath:_,setTimeout:n,clearTimeout:r}));return k(e,t,i,u)}};function C(e,n,r,i){i=function(e,t){if(e&&void 0!==e.watchFile)return e;switch(u){case"PriorityPollingInterval":return{watchFile:1};case"DynamicPriorityPolling":return{watchFile:2};case"UseFsEvents":return D(4,1,e);case"UseFsEventsWithFallbackDynamicPolling":return D(4,2,e);case"UseFsEventsOnParentDirectory":t=!0;default:return t?D(5,1,e):{watchFile:4}}}(i,d);const o=Tn.checkDefined(i.watchFile);switch(o){case 0:return E(e,n,250,void 0);case 1:return E(e,n,r,void 0);case 2:return w()(e,n,r,void 0);case 3:return N()(e,n,void 0,void 0);case 4:return F(e,0,function(e,t,n){return(r,i,o)=>{"rename"===r?(o||(o=n(e)||to),t(e,o!==to?0:2,o)):t(e,1,o)}}(e,n,t),!1,r,MU(i));case 5:return S||(S=lo(F,a,t,m)),S(e,n,r,MU(i));default:Tn.assertNever(o)}}function w(){return b||(b=co({getModifiedTime:t,setTimeout:n}))}function N(){return x||(x=function(e){const t=[];let n,r=0;return function(n,r){const i={fileName:n,callback:r,mtime:no(e,n)};return t.push(i),o(),{close:()=>{i.isClosed=!0,rn(t,i)}}};function i(){n=void 0,r=so(e,t,r,oo[250]),o()}function o(){t.length&&!n&&(n=e.setTimeout(i,2e3,"pollQueue"))}}({getModifiedTime:t,setTimeout:n}))}function D(e,t,n){const r=null==n?void 0:n.fallbackPolling;return{watchFile:e,fallbackPolling:void 0===r?t:r}}function P(e,t,n,r){Tn.assert(!n);const i=function(e){if(e&&void 0!==e.watchDirectory)return e;switch(p){case"RecursiveDirectoryUsingFsWatchFile":return{watchDirectory:1};case"RecursiveDirectoryUsingDynamicPriorityPolling":return{watchDirectory:2};default:const t=null==e?void 0:e.fallbackPolling;return{watchDirectory:0,fallbackPolling:void 0!==t?t:void 0}}}(r),o=Tn.checkDefined(i.watchDirectory);switch(o){case 1:return E(e,()=>t(e),500,void 0);case 2:return w()(e,()=>t(e),500,void 0);case 3:return N()(e,()=>t(e),void 0,void 0);case 0:return F(e,1,xo(e,t,r,a,s),n,500,MU(i));default:Tn.assertNever(o)}}function E(t,n,r,i){return _o(h,a,t,n,n=>e(t,n,r,i))}function F(e,n,r,s,c,l){return _o(s?v:y,a,e,r,r=>function(e,n,r,a,s,c){let l,_;f&&(l=e.substring(e.lastIndexOf(wo)),_=l.slice(wo.length));let u=o(e,n)?p():v();return{close:()=>{u&&(u.close(),u=void 0)}};function d(t){u&&(g(`sysLog:: ${e}:: Changing watcher to ${t===p?"Present":"Missing"}FileSystemEntryWatcher`),u.close(),u=t())}function p(){if(T)return g(`sysLog:: ${e}:: Defaulting to watchFile`),y();try{const t=(1!==n&&m?A:i)(e,a,f?h:r);return t.on("error",()=>{r("rename",""),d(v)}),t}catch(t){return T||(T="ENOSPC"===t.code),g(`sysLog:: ${e}:: Changing to watchFile`),y()}}function h(n,i){let o;if(i&&Xt(i,"~")&&(o=i,i=i.slice(0,i.length-1)),"rename"!==n||i&&i!==_&&!Xt(i,l))o&&r(n,o),r(n,i);else{const a=t(e)||to;o&&r(n,o,a),r(n,i,a),f?d(a===to?v:p):a===to&&d(v)}}function y(){return C(e,function(e){return(t,n,r)=>e(1===n?"change":"rename","",r)}(r),s,c)}function v(){return C(e,(n,i,o)=>{0===i&&(o||(o=t(e)||to),o!==to&&(r("rename","",o),d(p)))},s,c)}}(e,n,r,s,c,l))}function A(e,n,r){let o=t(e)||to;return i(e,n,(n,i,a)=>{"change"===n&&(a||(a=t(e)||to),a.getTime()===o.getTime())||(o=a||t(e)||to,r(n,i,o))})}}function ko(e){const t=e.writeFile;e.writeFile=(n,r,i)=>gv(n,r,!!i,(n,r,i)=>t.call(e,n,r,i),t=>e.createDirectory(t),t=>e.directoryExists(t))}var To=(()=>{let t;return kn()&&(t=function(){const t=/^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/,o=e("fs"),a=e("path"),s=e("os");let c,u;try{c=e("crypto")}catch{c=void 0}let d="./profile.cpuprofile";const p="darwin"===n.platform,f="linux"===n.platform||p,m=s.platform(),g="win32"!==m&&"win64"!==m&&!P((T=l,T.replace(/\w/g,e=>{const t=e.toUpperCase();return e===t?e.toLowerCase():t}))),h=o.realpathSync.native?"win32"===n.platform?function(e){return e.length<260?o.realpathSync.native(e):o.realpathSync(e)}:o.realpathSync.native:o.realpathSync,y=l.endsWith("sys.js")?a.join(a.dirname(_),"__fake__.js"):l,v="win32"===n.platform||p,b=kt(()=>n.cwd()),{watchFile:x,watchDirectory:S}=So({pollingWatchFileWorker:function(e,t,n){let r;return o.watchFile(e,{persistent:!0,interval:n},i),{close:()=>o.unwatchFile(e,i)};function i(n,i){const o=0===+i.mtime||2===r;if(0===+n.mtime){if(o)return;r=2}else if(o)r=0;else{if(+n.mtime===+i.mtime)return;r=1}t(e,r,n.mtime)}},getModifiedTime:A,setTimeout:setTimeout,clearTimeout:clearTimeout,fsWatchWorker:function(e,t,n){return o.watch(e,v?{persistent:!0,recursive:!!t}:{persistent:!0},n)},useCaseSensitiveFileNames:g,getCurrentDirectory:b,fileSystemEntryExists:D,fsSupportsRecursiveFsWatch:v,getAccessibleSortedChildDirectories:e=>N(e).directories,realpath:F,tscWatchFile:n.env.TSC_WATCHFILE,useNonPollingWatchers:!!n.env.TSC_NONPOLLING_WATCHER,tscWatchDirectory:n.env.TSC_WATCHDIRECTORY,inodeWatching:f,fsWatchWithTimestamp:p,sysLog:go}),k={args:n.argv.slice(2),newLine:s.EOL,useCaseSensitiveFileNames:g,write(e){n.stdout.write(e)},getWidthOfTerminal:()=>n.stdout.columns,writeOutputIsTTY:()=>n.stdout.isTTY,readFile:function(e,t){var n,r;null==(n=ir)||n.logStartReadFile(e);const i=function(e){let t;try{t=o.readFileSync(e)}catch(e){return}let n=t.length;if(n>=2&&254===t[0]&&255===t[1]){n&=-2;for(let e=0;e=2&&255===t[0]&&254===t[1]?t.toString("utf16le",2):n>=3&&239===t[0]&&187===t[1]&&191===t[2]?t.toString("utf8",3):t.toString("utf8")}(e);return null==(r=ir)||r.logStopReadFile(),i},writeFile:function(e,t,n){var r;let i;null==(r=ir)||r.logEvent("WriteFile: "+e),n&&(t="\ufeff"+t);try{i=o.openSync(e,"w"),o.writeSync(i,t,void 0,"utf8")}finally{void 0!==i&&o.closeSync(i)}},watchFile:x,watchDirectory:S,resolvePath:e=>a.resolve(e),fileExists:P,directoryExists:function(e){return D(e,1)},getAccessibleFileSystemEntries:N,createDirectory(e){if(!k.directoryExists(e))try{o.mkdirSync(e)}catch(e){if("EEXIST"!==e.code)throw e}},getExecutingFilePath:()=>y,getCurrentDirectory:b,getDirectories:function(e){return N(e).directories.slice()},getEnvironmentVariable:e=>n.env[e]||"",readDirectory:function(e,t,r,i,o){return Ik(e,t,r,i,g,n.cwd(),o,N,F)},getModifiedTime:A,setModifiedTime:function(e,t){try{o.utimesSync(e,t,t)}catch(e){return}},deleteFile:function(e){try{return o.unlinkSync(e)}catch(e){return}},createHash:c?I:Qi,createSHA256Hash:c?I:void 0,getMemoryUsage:()=>(r.gc&&r.gc(),n.memoryUsage().heapUsed),getFileSize(e){try{const t=C(e);if(null==t?void 0:t.isFile())return t.size}catch{}return 0},exit(e){w(()=>n.exit(e))},enableCPUProfiler:function(t,n){if(u)return n(),!1;const r=e("inspector");if(!r||!r.Session)return n(),!1;const i=new r.Session;return i.connect(),i.post("Profiler.enable",()=>{i.post("Profiler.start",()=>{u=i,d=t,n()})}),!0},disableCPUProfiler:w,cpuProfilingEnabled:()=>!!u||E(n.execArgv,"--cpu-prof")||E(n.execArgv,"--prof"),realpath:F,debugMode:!!n.env.NODE_INSPECTOR_IPC||!!n.env.VSCODE_INSPECTOR_OPTIONS||ee(n.execArgv,e=>/^--(inspect|debug)(-brk)?(=\d+)?$/i.test(e))||!!n.recordreplay,tryEnableSourceMapsForHost(){try{e("source-map-support").install()}catch{}},setTimeout:setTimeout,clearTimeout:clearTimeout,clearScreen:()=>{n.stdout.write("c")},setBlocking:()=>{var e;const t=null==(e=n.stdout)?void 0:e._handle;t&&t.setBlocking&&t.setBlocking(!0)},base64decode:e=>i.from(e,"base64").toString("utf8"),base64encode:e=>i.from(e).toString("base64"),require:(t,n)=>{try{const r=RM(n,t,k);return{module:e(r),modulePath:r,error:void 0}}catch(e){return{module:void 0,modulePath:void 0,error:e}}}};var T;return k;function C(e){return o.statSync(e,{throwIfNoEntry:!1})}function w(e){if(u&&"stopping"!==u){const r=u;return u.post("Profiler.stop",(i,{profile:s})=>{var c;if(!i){try{(null==(c=C(d))?void 0:c.isDirectory())&&(d=a.join(d,`${(new Date).toISOString().replace(/:/g,"-")}+P${n.pid}.cpuprofile`))}catch{}try{o.mkdirSync(a.dirname(d),{recursive:!0})}catch{}o.writeFileSync(d,JSON.stringify(function(e){let n=0;const r=new Map,i=Xo(a.dirname(y)),o=`file://${1===Uo(i)?"":"/"}${i}`;for(const i of e.nodes)if(i.callFrame.url){const e=Xo(i.callFrame.url);ma(o,e,g)?i.callFrame.url=xa(o,e,o,on(g),!0):t.test(e)||(i.callFrame.url=(r.has(e)?r:r.set(e,`external${n}.js`)).get(e),n++)}return e}(s)))}u=void 0,r.disconnect(),e()}),u="stopping",!0}return e(),!1}function N(e){var t;null==(t=ir)||t.logEvent("ReadDir: "+(e||"."));try{const t=o.readdirSync(e||".",{withFileTypes:!0}),n=[],r=[];for(const i of t){const t="string"==typeof i?i:i.name;if("."===t||".."===t)continue;let o;if("string"==typeof i||i.isSymbolicLink()){const n=Yo(e,t);try{if(o=C(n),!o)continue}catch(e){continue}}else o=i;o.isFile()?n.push(t):o.isDirectory()&&r.push(t)}return n.sort(),r.sort(),{files:n,directories:r}}catch(e){return vT}}function D(e,t){const n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{const n=C(e);if(!n)return!1;switch(t){case 0:return n.isFile();case 1:return n.isDirectory();default:return!1}}catch(e){return!1}finally{Error.stackTraceLimit=n}}function P(e){return D(e,0)}function F(e){try{return h(e)}catch{return e}}function A(e){var t;const n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return null==(t=C(e))?void 0:t.mtime}catch(e){return}finally{Error.stackTraceLimit=n}}function I(e){const t=c.createHash("sha256");return t.update(e),t.digest("hex")}}()),t&&ko(t),t})();function Co(e){To=e}To&&To.getEnvironmentVariable&&(!function(e){if(!e.getEnvironmentVariable)return;const t=function(e,t){const r=n("TSC_WATCH_POLLINGINTERVAL");return!!r&&(i("Low"),i("Medium"),i("High"),!0);function i(e){t[e]=r[e]||t[e]}}(0,eo);function n(t){let n;return r("Low"),r("Medium"),r("High"),n;function r(r){const i=function(t,n){return e.getEnvironmentVariable(`${t}_${n.toUpperCase()}`)}(t,r);i&&((n||(n={}))[r]=Number(i))}}function r(e,r){const i=n(e);return(t||i)&&ro(i?{...r,...i}:r)}oo=r("TSC_WATCH_POLLINGCHUNKSIZE",io)||oo,ao=r("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",io)||ao}(To),Tn.setAssertionLevel(/^development$/i.test(To.getEnvironmentVariable("NODE_ENV"))?1:0)),To&&To.debugMode&&(Tn.isDebugging=!0);var wo="/",No="\\",Do="://",Po=/\\/g;function Eo(e){return 47===e||92===e}function Fo(e){return qo(e)<0}function Ao(e){return qo(e)>0}function Io(e){const t=qo(e);return t>0&&t===e.length}function Oo(e){return 0!==qo(e)}function jo(e){return/^\.\.?($|[\\/])/.test(e)}function Lo(e){return!Oo(e)&&!jo(e)}function Mo(e){return Wo(e).includes(".")}function Ro(e,t){return e.length>t.length&&Xt(e,t)}function Bo(e,t){for(const n of t)if(Ro(e,n))return!0;return!1}function Jo(e){return e.length>0&&Eo(e.charCodeAt(e.length-1))}function zo(e){return e>=97&&e<=122||e>=65&&e<=90}function qo(e){if(!e)return 0;const t=e.charCodeAt(0);if(47===t||92===t){if(e.charCodeAt(1)!==t)return 1;const n=e.indexOf(47===t?wo:No,2);return n<0?e.length:n+1}if(zo(t)&&58===e.charCodeAt(1)){const t=e.charCodeAt(2);if(47===t||92===t)return 3;if(2===e.length)return 2}const n=e.indexOf(Do);if(-1!==n){const t=n+Do.length,r=e.indexOf(wo,t);if(-1!==r){const i=e.slice(0,n),o=e.slice(t,r);if("file"===i&&(""===o||"localhost"===o)&&zo(e.charCodeAt(r+1))){const t=function(e,t){const n=e.charCodeAt(t);if(58===n)return t+1;if(37===n&&51===e.charCodeAt(t+1)){const n=e.charCodeAt(t+2);if(97===n||65===n)return t+3}return-1}(e,r+2);if(-1!==t){if(47===e.charCodeAt(t))return~(t+1);if(t===e.length)return~t}}return~(r+1)}return~e.length}return 0}function Uo(e){const t=qo(e);return t<0?~t:t}function Vo(e){const t=Uo(e=Xo(e));return t===e.length?e:(e=oa(e)).slice(0,Math.max(t,e.lastIndexOf(wo)))}function Wo(e,t,n){if(Uo(e=Xo(e))===e.length)return"";const r=(e=oa(e)).slice(Math.max(Uo(e),e.lastIndexOf(wo)+1)),i=void 0!==t&&void 0!==n?Ho(r,t,n):void 0;return i?r.slice(0,r.length-i.length):r}function $o(e,t,n){if(ln(t,".")||(t="."+t),e.length>=t.length&&46===e.charCodeAt(e.length-t.length)){const r=e.slice(e.length-t.length);if(n(r,t))return r}}function Ho(e,t,n){if(t)return function(e,t,n){if("string"==typeof t)return $o(e,t,n)||"";for(const r of t){const t=$o(e,r,n);if(t)return t}return""}(oa(e),t,n?Et:Ft);const r=Wo(e),i=r.lastIndexOf(".");return i>=0?r.substring(i):""}function Ko(e,t=""){return function(e,t){const n=e.substring(0,t),r=e.substring(t).split(wo);return r.length&&!Pe(r)&&r.pop(),[n,...r]}(e=Yo(t,e),Uo(e))}function Go(e,t){if(0===e.length)return"";return(e[0]&&aa(e[0]))+e.slice(1,t).join(wo)}function Xo(e){return e.includes("\\")?e.replace(Po,wo):e}function Qo(e){if(!ee(e))return[];const t=[e[0]];for(let n=1;n1){if(".."!==t[t.length-1]){t.pop();continue}}else if(t[0])continue;t.push(r)}}return t}function Yo(e,...t){e&&(e=Xo(e));for(let n of t)n&&(n=Xo(n),e=e&&0===Uo(n)?aa(e)+n:n);return e}function Zo(e,...t){return na(ee(t)?Yo(e,...t):Xo(e))}function ea(e,t){return Qo(Ko(e,t))}function ta(e,t){return Go(ea(e,t))}function na(e){if(e=Xo(e),!_a.test(e))return e;const t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!_a.test(e)))return e;const n=Go(Qo(Ko(e)));return n&&Jo(e)?aa(n):n}function ra(e,t){return 0===(n=ea(e,t)).length?"":n.slice(1).join(wo);var n}function ia(e,t,n){return n(Ao(e)?na(e):ta(e,t))}function oa(e){return Jo(e)?e.substr(0,e.length-1):e}function aa(e){return Jo(e)?e:e+wo}function sa(e){return Oo(e)||jo(e)?e:"./"+e}function ca(e,t,n,r){const i=void 0!==n&&void 0!==r?Ho(e,n,r):Ho(e);return i?e.slice(0,e.length-i.length)+(ln(t,".")?t:"."+t):e}function la(e,t){const n=_O(e);return n?e.slice(0,e.length-n.length)+(ln(t,".")?t:"."+t):ca(e,t)}var _a=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/;function ua(e,t,n){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;const r=e.substring(0,Uo(e)),i=t.substring(0,Uo(t)),o=Lt(r,i);if(0!==o)return o;const a=e.substring(r.length),s=t.substring(i.length);if(!_a.test(a)&&!_a.test(s))return n(a,s);const c=Qo(Ko(e)),l=Qo(Ko(t)),_=Math.min(c.length,l.length);for(let e=1;e<_;e++){const t=n(c[e],l[e]);if(0!==t)return t}return It(c.length,l.length)}function da(e,t){return ua(e,t,Rt)}function pa(e,t){return ua(e,t,Lt)}function fa(e,t,n,r){return"string"==typeof n?(e=Yo(n,e),t=Yo(n,t)):"boolean"==typeof n&&(r=n),ua(e,t,Bt(r))}function ma(e,t,n,r){if("string"==typeof n?(e=Yo(n,e),t=Yo(n,t)):"boolean"==typeof n&&(r=n),void 0===e||void 0===t)return!1;if(e===t)return!0;const i=Qo(Ko(e)),o=Qo(Ko(t));if(o.length0==Uo(t)>0,"Paths must either both be absolute or both be relative");return Go(ha(e,t,"boolean"==typeof n&&n?Et:Ft,"function"==typeof n?n:yt))}function va(e,t,n){return Ao(e)?xa(t,e,t,n,!1):e}function ba(e,t,n){return sa(ya(Vo(e),t,n))}function xa(e,t,n,r,i){const o=ha(Zo(n,e),Zo(n,t),Ft,r),a=o[0];if(i&&Ao(a)){const e=a.charAt(0)===wo?"file://":"file:///";o[0]=e+a}return Go(o)}function Sa(e,t){for(;;){const n=t(e);if(void 0!==n)return n;const r=Vo(e);if(r===e)return;e=r}}function ka(e){return Xt(e,"/node_modules")}function Ta(e,t,n,r,i,o,a){return{code:e,category:t,key:n,message:r,reportsUnnecessary:i,elidedInCompatabilityPyramid:o,reportsDeprecated:a}}var Ca={Unterminated_string_literal:Ta(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:Ta(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:Ta(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:Ta(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:Ta(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:Ta(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:Ta(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:Ta(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:Ta(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:Ta(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:Ta(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:Ta(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:Ta(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:Ta(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:Ta(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:Ta(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:Ta(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:Ta(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:Ta(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:Ta(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:Ta(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:Ta(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:Ta(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:Ta(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:Ta(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:Ta(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:Ta(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:Ta(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:Ta(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:Ta(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:Ta(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:Ta(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:Ta(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:Ta(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:Ta(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:Ta(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:Ta(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:Ta(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:Ta(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:Ta(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:Ta(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:Ta(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:Ta(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:Ta(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:Ta(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:Ta(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:Ta(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:Ta(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:Ta(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:Ta(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:Ta(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:Ta(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:Ta(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:Ta(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:Ta(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:Ta(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:Ta(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:Ta(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:Ta(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:Ta(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:Ta(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:Ta(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:Ta(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:Ta(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:Ta(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:Ta(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:Ta(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:Ta(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:Ta(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:Ta(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:Ta(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:Ta(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:Ta(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:Ta(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:Ta(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:Ta(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:Ta(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:Ta(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:Ta(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:Ta(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:Ta(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:Ta(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:Ta(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:Ta(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:Ta(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:Ta(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:Ta(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:Ta(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:Ta(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:Ta(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:Ta(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:Ta(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:Ta(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:Ta(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:Ta(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:Ta(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:Ta(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:Ta(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:Ta(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:Ta(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:Ta(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:Ta(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:Ta(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:Ta(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:Ta(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:Ta(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:Ta(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:Ta(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:Ta(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:Ta(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:Ta(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:Ta(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:Ta(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:Ta(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:Ta(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:Ta(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:Ta(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:Ta(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:Ta(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:Ta(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:Ta(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:Ta(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:Ta(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:Ta(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:Ta(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:Ta(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:Ta(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:Ta(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:Ta(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:Ta(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:Ta(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:Ta(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:Ta(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:Ta(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:Ta(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:Ta(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:Ta(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:Ta(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:Ta(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:Ta(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:Ta(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:Ta(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:Ta(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:Ta(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:Ta(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:Ta(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:Ta(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:Ta(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:Ta(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:Ta(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:Ta(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:Ta(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:Ta(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:Ta(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:Ta(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:Ta(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:Ta(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:Ta(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:Ta(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:Ta(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:Ta(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:Ta(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:Ta(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:Ta(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:Ta(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:Ta(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:Ta(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:Ta(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:Ta(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:Ta(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:Ta(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:Ta(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:Ta(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:Ta(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:Ta(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:Ta(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:Ta(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:Ta(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:Ta(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:Ta(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:Ta(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:Ta(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:Ta(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:Ta(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:Ta(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:Ta(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:Ta(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:Ta(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:Ta(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:Ta(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:Ta(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:Ta(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:Ta(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:Ta(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:Ta(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:Ta(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:Ta(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:Ta(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:Ta(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:Ta(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:Ta(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:Ta(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:Ta(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:Ta(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:Ta(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:Ta(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:Ta(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:Ta(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:Ta(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:Ta(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:Ta(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:Ta(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:Ta(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:Ta(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:Ta(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:Ta(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:Ta(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:Ta(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:Ta(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:Ta(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:Ta(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:Ta(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:Ta(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:Ta(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:Ta(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:Ta(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:Ta(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:Ta(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:Ta(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:Ta(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:Ta(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:Ta(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:Ta(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:Ta(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:Ta(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:Ta(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:Ta(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:Ta(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:Ta(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:Ta(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:Ta(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:Ta(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),with_statements_are_not_allowed_in_an_async_function_block:Ta(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:Ta(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:Ta(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:Ta(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:Ta(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:Ta(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:Ta(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:Ta(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:Ta(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:Ta(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:Ta(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:Ta(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:Ta(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:Ta(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:Ta(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext:Ta(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),Argument_of_dynamic_import_cannot_be_spread_element:Ta(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:Ta(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:Ta(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:Ta(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:Ta(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:Ta(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:Ta(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:Ta(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:Ta(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:Ta(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:Ta(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:Ta(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:Ta(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:Ta(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:Ta(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:Ta(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:Ta(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:Ta(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:Ta(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:Ta(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:Ta(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:Ta(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:Ta(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:Ta(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:Ta(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:Ta(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:Ta(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:Ta(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:Ta(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:Ta(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:Ta(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:Ta(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:Ta(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:Ta(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:Ta(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:Ta(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:Ta(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:Ta(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:Ta(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:Ta(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:Ta(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:Ta(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:Ta(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:Ta(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:Ta(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:Ta(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:Ta(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:Ta(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:Ta(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:Ta(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:Ta(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:Ta(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:Ta(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:Ta(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:Ta(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:Ta(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:Ta(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:Ta(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:Ta(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:Ta(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:Ta(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:Ta(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:Ta(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:Ta(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:Ta(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:Ta(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:Ta(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:Ta(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:Ta(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:Ta(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:Ta(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:Ta(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:Ta(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:Ta(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:Ta(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:Ta(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:Ta(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:Ta(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:Ta(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:Ta(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:Ta(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:Ta(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:Ta(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:Ta(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:Ta(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:Ta(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:Ta(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:Ta(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:Ta(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:Ta(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:Ta(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:Ta(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:Ta(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:Ta(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:Ta(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:Ta(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:Ta(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:Ta(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:Ta(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:Ta(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:Ta(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:Ta(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:Ta(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:Ta(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:Ta(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:Ta(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:Ta(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:Ta(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:Ta(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443","Module declaration names may only use ' or \" quoted strings."),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:Ta(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:Ta(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:Ta(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:Ta(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:Ta(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:Ta(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:Ta(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:Ta(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:Ta(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:Ta(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",'File is ECMAScript module because \'{0}\' has field "type" with value "module"'),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:Ta(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",'File is CommonJS module because \'{0}\' has field "type" whose value is not "module"'),File_is_CommonJS_module_because_0_does_not_have_field_type:Ta(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460","File is CommonJS module because '{0}' does not have field \"type\""),File_is_CommonJS_module_because_package_json_was_not_found:Ta(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:Ta(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:Ta(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:Ta(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:Ta(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:Ta(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:Ta(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:Ta(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:Ta(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:Ta(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:Ta(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:Ta(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:Ta(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479","The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:Ta(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:Ta(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481","To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:Ta(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:Ta(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:Ta(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:Ta(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:Ta(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:Ta(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:Ta(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:Ta(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:Ta(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:Ta(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:Ta(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:Ta(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:Ta(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:Ta(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:Ta(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:Ta(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:Ta(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:Ta(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:Ta(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:Ta(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:Ta(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:Ta(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:Ta(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:Ta(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:Ta(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:Ta(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:Ta(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:Ta(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:Ta(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:Ta(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:Ta(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:Ta(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:Ta(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:Ta(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:Ta(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:Ta(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:Ta(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:Ta(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:Ta(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:Ta(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:Ta(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:Ta(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:Ta(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:Ta(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:Ta(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:Ta(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:Ta(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:Ta(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:Ta(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:Ta(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:Ta(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:Ta(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:Ta(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:Ta(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:Ta(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:Ta(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),The_types_of_0_are_incompatible_between_these_types:Ta(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:Ta(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:Ta(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:Ta(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:Ta(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:Ta(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:Ta(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:Ta(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:Ta(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:Ta(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:Ta(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:Ta(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:Ta(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:Ta(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:Ta(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:Ta(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:Ta(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:Ta(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:Ta(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:Ta(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:Ta(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:Ta(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:Ta(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:Ta(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:Ta(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:Ta(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:Ta(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:Ta(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:Ta(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:Ta(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:Ta(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:Ta(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:Ta(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:Ta(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:Ta(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:Ta(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:Ta(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:Ta(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:Ta(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:Ta(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:Ta(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:Ta(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:Ta(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:Ta(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:Ta(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:Ta(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:Ta(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:Ta(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:Ta(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:Ta(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:Ta(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:Ta(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:Ta(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:Ta(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:Ta(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:Ta(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:Ta(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Untyped_function_calls_may_not_accept_type_arguments:Ta(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:Ta(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:Ta(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:Ta(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:Ta(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:Ta(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:Ta(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:Ta(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:Ta(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:Ta(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:Ta(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:Ta(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:Ta(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:Ta(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:Ta(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:Ta(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:Ta(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:Ta(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:Ta(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:Ta(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:Ta(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:Ta(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:Ta(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:Ta(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:Ta(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:Ta(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:Ta(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:Ta(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:Ta(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:Ta(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:Ta(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:Ta(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:Ta(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:Ta(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:Ta(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:Ta(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:Ta(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:Ta(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:Ta(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:Ta(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:Ta(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:Ta(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:Ta(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:Ta(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:Ta(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:Ta(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:Ta(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:Ta(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:Ta(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:Ta(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:Ta(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:Ta(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:Ta(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:Ta(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:Ta(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:Ta(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:Ta(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:Ta(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:Ta(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:Ta(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:Ta(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:Ta(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:Ta(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:Ta(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:Ta(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:Ta(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:Ta(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:Ta(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:Ta(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:Ta(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:Ta(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:Ta(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:Ta(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:Ta(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:Ta(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:Ta(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:Ta(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:Ta(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:Ta(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:Ta(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:Ta(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:Ta(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:Ta(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:Ta(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:Ta(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:Ta(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:Ta(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:Ta(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:Ta(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:Ta(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:Ta(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:Ta(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:Ta(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:Ta(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:Ta(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:Ta(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:Ta(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:Ta(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:Ta(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:Ta(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:Ta(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:Ta(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:Ta(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:Ta(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:Ta(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:Ta(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:Ta(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:Ta(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:Ta(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:Ta(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:Ta(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:Ta(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:Ta(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:Ta(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:Ta(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:Ta(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:Ta(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:Ta(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:Ta(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:Ta(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:Ta(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:Ta(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:Ta(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:Ta(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:Ta(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:Ta(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:Ta(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:Ta(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:Ta(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:Ta(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:Ta(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:Ta(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:Ta(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:Ta(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:Ta(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:Ta(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:Ta(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:Ta(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:Ta(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:Ta(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:Ta(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:Ta(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:Ta(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:Ta(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:Ta(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:Ta(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:Ta(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:Ta(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:Ta(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:Ta(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:Ta(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:Ta(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:Ta(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:Ta(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:Ta(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:Ta(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:Ta(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:Ta(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:Ta(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:Ta(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:Ta(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:Ta(2525,1,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:Ta(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:Ta(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:Ta(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:Ta(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:Ta(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:Ta(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:Ta(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:Ta(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:Ta(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:Ta(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:Ta(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:Ta(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:Ta(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:Ta(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:Ta(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:Ta(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:Ta(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:Ta(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:Ta(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:Ta(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:Ta(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:Ta(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:Ta(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:Ta(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:Ta(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:Ta(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:Ta(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:Ta(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:Ta(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:Ta(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:Ta(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:Ta(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:Ta(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:Ta(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:Ta(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:Ta(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:Ta(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:Ta(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:Ta(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:Ta(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:Ta(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:Ta(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:Ta(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:Ta(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:Ta(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:Ta(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:Ta(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:Ta(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:Ta(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:Ta(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:Ta(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:Ta(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:Ta(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:Ta(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:Ta(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:Ta(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:Ta(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:Ta(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:Ta(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:Ta(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:Ta(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:Ta(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:Ta(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:Ta(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:Ta(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:Ta(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:Ta(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:Ta(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:Ta(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:Ta(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:Ta(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:Ta(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:Ta(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:Ta(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:Ta(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:Ta(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:Ta(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:Ta(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:Ta(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:Ta(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:Ta(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:Ta(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:Ta(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:Ta(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:Ta(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:Ta(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:Ta(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:Ta(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:Ta(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:Ta(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:Ta(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:Ta(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:Ta(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:Ta(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:Ta(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:Ta(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:Ta(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:Ta(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:Ta(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:Ta(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:Ta(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:Ta(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:Ta(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:Ta(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:Ta(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:Ta(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:Ta(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:Ta(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:Ta(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:Ta(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:Ta(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:Ta(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:Ta(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:Ta(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:Ta(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:Ta(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:Ta(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:Ta(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:Ta(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:Ta(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:Ta(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:Ta(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:Ta(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:Ta(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:Ta(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:Ta(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:Ta(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:Ta(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:Ta(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:Ta(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:Ta(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:Ta(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:Ta(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:Ta(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:Ta(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:Ta(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:Ta(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:Ta(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:Ta(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:Ta(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:Ta(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:Ta(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:Ta(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:Ta(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:Ta(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:Ta(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:Ta(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:Ta(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:Ta(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:Ta(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:Ta(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:Ta(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:Ta(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:Ta(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:Ta(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:Ta(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:Ta(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:Ta(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:Ta(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:Ta(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:Ta(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:Ta(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:Ta(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:Ta(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:Ta(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:Ta(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:Ta(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:Ta(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:Ta(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:Ta(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:Ta(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:Ta(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:Ta(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:Ta(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:Ta(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:Ta(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:Ta(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:Ta(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:Ta(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:Ta(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:Ta(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:Ta(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:Ta(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:Ta(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:Ta(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:Ta(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:Ta(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:Ta(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:Ta(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:Ta(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:Ta(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:Ta(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:Ta(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:Ta(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:Ta(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:Ta(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:Ta(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:Ta(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:Ta(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:Ta(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:Ta(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:Ta(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:Ta(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:Ta(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:Ta(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:Ta(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:Ta(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:Ta(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:Ta(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:Ta(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:Ta(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:Ta(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:Ta(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:Ta(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:Ta(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:Ta(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:Ta(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:Ta(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:Ta(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:Ta(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:Ta(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:Ta(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:Ta(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:Ta(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:Ta(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:Ta(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:Ta(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:Ta(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:Ta(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:Ta(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:Ta(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:Ta(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:Ta(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:Ta(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:Ta(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:Ta(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:Ta(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:Ta(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:Ta(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:Ta(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:Ta(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:Ta(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:Ta(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:Ta(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:Ta(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:Ta(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:Ta(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:Ta(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:Ta(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:Ta(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:Ta(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:Ta(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:Ta(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:Ta(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:Ta(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:Ta(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:Ta(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:Ta(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:Ta(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:Ta(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:Ta(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:Ta(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:Ta(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:Ta(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:Ta(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:Ta(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:Ta(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:Ta(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:Ta(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:Ta(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:Ta(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:Ta(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:Ta(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:Ta(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:Ta(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:Ta(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:Ta(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:Ta(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:Ta(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:Ta(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:Ta(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:Ta(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:Ta(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:Ta(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:Ta(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:Ta(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:Ta(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:Ta(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:Ta(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:Ta(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:Ta(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:Ta(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:Ta(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:Ta(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:Ta(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:Ta(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:Ta(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:Ta(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:Ta(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:Ta(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:Ta(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:Ta(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:Ta(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:Ta(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:Ta(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Import_declaration_0_is_using_private_name_1:Ta(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:Ta(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:Ta(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:Ta(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:Ta(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:Ta(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:Ta(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:Ta(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:Ta(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:Ta(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:Ta(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:Ta(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:Ta(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:Ta(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:Ta(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:Ta(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:Ta(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:Ta(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:Ta(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:Ta(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:Ta(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:Ta(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:Ta(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ta(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:Ta(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ta(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:Ta(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ta(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:Ta(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:Ta(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:Ta(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:Ta(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:Ta(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:Ta(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:Ta(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ta(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:Ta(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:Ta(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:Ta(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:Ta(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:Ta(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ta(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:Ta(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ta(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:Ta(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:Ta(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:Ta(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ta(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:Ta(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:Ta(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:Ta(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:Ta(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:Ta(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:Ta(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:Ta(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:Ta(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ta(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:Ta(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:Ta(4094,1,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:Ta(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ta(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:Ta(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:Ta(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:Ta(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:Ta(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:Ta(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:Ta(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:Ta(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:Ta(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ta(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:Ta(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:Ta(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:Ta(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:Ta(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:Ta(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:Ta(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:Ta(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:Ta(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:Ta(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:Ta(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:Ta(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:Ta(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:Ta(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:Ta(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:Ta(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:Ta(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:Ta(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:Ta(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),The_current_host_does_not_support_the_0_option:Ta(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:Ta(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:Ta(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:Ta(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:Ta(5014,1,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:Ta(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:Ta(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:Ta(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:Ta(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:Ta(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:Ta(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:Ta(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:Ta(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:Ta(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:Ta(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:Ta(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:Ta(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:Ta(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:Ta(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:Ta(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:Ta(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:Ta(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:Ta(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:Ta(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:Ta(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:Ta(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:Ta(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:Ta(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:Ta(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:Ta(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:Ta(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:Ta(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:Ta(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:Ta(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:Ta(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:Ta(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:Ta(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:Ta(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:Ta(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:Ta(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:Ta(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:Ta(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:Ta(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:Ta(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:Ta(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:Ta(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:Ta(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:Ta(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:Ta(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:Ta(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:Ta(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:Ta(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:Ta(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:Ta(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:Ta(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:Ta(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:Ta(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:Ta(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101","Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '\"ignoreDeprecations\": \"{2}\"' to silence this error."),Option_0_has_been_removed_Please_remove_it_from_your_configuration:Ta(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:Ta(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:Ta(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:Ta(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:Ta(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:Ta(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107","Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '\"ignoreDeprecations\": \"{3}\"' to silence this error."),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:Ta(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:Ta(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:Ta(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:Ta(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:Ta(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:Ta(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:Ta(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:Ta(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:Ta(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:Ta(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:Ta(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:Ta(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:Ta(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:Ta(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:Ta(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:Ta(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:Ta(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:Ta(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:Ta(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:Ta(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:Ta(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:Ta(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:Ta(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:Ta(6024,3,"options_6024","options"),file:Ta(6025,3,"file_6025","file"),Examples_Colon_0:Ta(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:Ta(6027,3,"Options_Colon_6027","Options:"),Version_0:Ta(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:Ta(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:Ta(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:Ta(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:Ta(6034,3,"KIND_6034","KIND"),FILE:Ta(6035,3,"FILE_6035","FILE"),VERSION:Ta(6036,3,"VERSION_6036","VERSION"),LOCATION:Ta(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:Ta(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:Ta(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:Ta(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:Ta(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:Ta(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:Ta(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:Ta(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:Ta(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:Ta(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unable_to_open_file_0:Ta(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:Ta(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:Ta(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:Ta(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:Ta(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:Ta(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:Ta(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:Ta(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:Ta(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:Ta(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:Ta(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:Ta(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:Ta(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:Ta(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:Ta(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:Ta(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:Ta(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:Ta(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:Ta(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:Ta(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:Ta(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:Ta(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:Ta(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:Ta(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:Ta(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:Ta(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:Ta(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:Ta(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:Ta(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:Ta(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:Ta(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:Ta(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:Ta(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:Ta(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:Ta(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:Ta(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:Ta(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:Ta(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:Ta(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:Ta(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:Ta(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:Ta(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:Ta(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:Ta(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:Ta(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:Ta(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:Ta(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:Ta(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:Ta(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:Ta(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:Ta(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:Ta(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:Ta(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:Ta(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:Ta(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:Ta(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:Ta(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:Ta(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:Ta(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:Ta(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:Ta(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:Ta(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:Ta(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:Ta(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:Ta(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:Ta(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:Ta(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:Ta(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:Ta(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:Ta(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:Ta(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:Ta(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:Ta(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:Ta(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:Ta(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:Ta(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:Ta(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:Ta(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:Ta(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:Ta(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:Ta(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:Ta(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:Ta(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:Ta(6145,3,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:Ta(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:Ta(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:Ta(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:Ta(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:Ta(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:Ta(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:Ta(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:Ta(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:Ta(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:Ta(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:Ta(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:Ta(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:Ta(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:Ta(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:Ta(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:Ta(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:Ta(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:Ta(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:Ta(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:Ta(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:Ta(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:Ta(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:Ta(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:Ta(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:Ta(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:Ta(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:Ta(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:Ta(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:Ta(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:Ta(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:Ta(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:Ta(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:Ta(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:Ta(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:Ta(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:Ta(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:Ta(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:Ta(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:Ta(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:Ta(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:Ta(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:Ta(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:Ta(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:Ta(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:Ta(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:Ta(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:Ta(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:Ta(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:Ta(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:Ta(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:Ta(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:Ta(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:Ta(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:Ta(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:Ta(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:Ta(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:Ta(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:Ta(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:Ta(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:Ta(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:Ta(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:Ta(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:Ta(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:Ta(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:Ta(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:Ta(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:Ta(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:Ta(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:Ta(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:Ta(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:Ta(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:Ta(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:Ta(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:Ta(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:Ta(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:Ta(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:Ta(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:Ta(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:Ta(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:Ta(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:Ta(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:Ta(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:Ta(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:Ta(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:Ta(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:Ta(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:Ta(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:Ta(6244,3,"Modules_6244","Modules"),File_Management:Ta(6245,3,"File_Management_6245","File Management"),Emit:Ta(6246,3,"Emit_6246","Emit"),JavaScript_Support:Ta(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:Ta(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:Ta(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:Ta(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:Ta(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:Ta(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:Ta(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:Ta(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:Ta(6255,3,"Projects_6255","Projects"),Output_Formatting:Ta(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:Ta(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:Ta(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:Ta(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:Ta(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:Ta(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:Ta(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:Ta(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:Ta(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:Ta(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:Ta(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:Ta(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:Ta(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:Ta(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:Ta(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:Ta(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:Ta(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:Ta(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:Ta(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:Ta(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278","There are types at '{0}', but this result could not be resolved when respecting package.json \"exports\". The '{1}' library may need to update its package.json or typings."),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:Ta(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:Ta(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:Ta(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:Ta(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:Ta(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),Enable_project_compilation:Ta(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:Ta(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:Ta(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:Ta(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:Ta(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:Ta(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:Ta(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:Ta(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:Ta(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:Ta(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:Ta(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:Ta(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:Ta(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:Ta(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:Ta(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:Ta(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:Ta(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:Ta(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:Ta(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:Ta(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:Ta(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:Ta(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:Ta(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:Ta(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:Ta(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:Ta(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:Ta(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:Ta(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:Ta(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:Ta(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:Ta(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:Ta(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:Ta(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:Ta(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:Ta(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:Ta(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:Ta(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:Ta(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:Ta(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:Ta(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:Ta(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:Ta(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:Ta(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:Ta(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:Ta(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:Ta(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:Ta(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:Ta(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:Ta(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:Ta(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:Ta(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:Ta(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:Ta(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:Ta(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:Ta(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:Ta(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:Ta(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:Ta(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:Ta(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:Ta(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:Ta(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:Ta(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:Ta(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:Ta(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:Ta(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:Ta(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:Ta(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:Ta(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:Ta(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:Ta(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:Ta(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:Ta(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:Ta(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:Ta(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:Ta(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:Ta(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:Ta(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:Ta(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:Ta(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:Ta(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:Ta(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:Ta(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:Ta(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:Ta(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:Ta(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:Ta(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:Ta(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:Ta(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:Ta(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:Ta(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:Ta(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:Ta(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:Ta(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:Ta(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:Ta(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:Ta(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:Ta(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:Ta(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:Ta(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:Ta(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:Ta(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:Ta(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:Ta(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:Ta(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:Ta(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:Ta(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:Ta(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:Ta(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:Ta(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:Ta(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:Ta(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:Ta(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:Ta(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:Ta(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:Ta(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:Ta(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:Ta(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:Ta(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:Ta(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:Ta(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:Ta(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:Ta(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:Ta(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:Ta(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:Ta(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:Ta(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:Ta(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:Ta(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:Ta(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:Ta(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:Ta(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:Ta(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:Ta(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:Ta(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:Ta(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:Ta(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:Ta(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:Ta(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:Ta(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:Ta(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:Ta(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:Ta(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:Ta(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:Ta(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:Ta(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:Ta(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:Ta(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:Ta(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:Ta(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:Ta(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:Ta(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:Ta(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:Ta(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:Ta(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:Ta(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:Ta(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:Ta(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:Ta(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:Ta(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:Ta(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:Ta(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:Ta(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:Ta(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:Ta(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:Ta(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:Ta(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:Ta(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:Ta(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:Ta(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:Ta(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:Ta(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:Ta(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:Ta(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:Ta(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:Ta(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:Ta(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:Ta(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:Ta(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:Ta(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:Ta(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:Ta(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:Ta(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:Ta(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:Ta(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:Ta(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:Ta(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:Ta(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:Ta(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:Ta(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Default_catch_clause_variables_as_unknown_instead_of_any:Ta(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:Ta(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:Ta(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),one_of_Colon:Ta(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:Ta(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:Ta(6902,3,"type_Colon_6902","type:"),default_Colon:Ta(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:Ta(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:Ta(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:Ta(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:Ta(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:Ta(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:Ta(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:Ta(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:Ta(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:Ta(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:Ta(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:Ta(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:Ta(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:Ta(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:Ta(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:Ta(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:Ta(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:Ta(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:Ta(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:Ta(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:Ta(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:Ta(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:Ta(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:Ta(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:Ta(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:Ta(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:Ta(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:Ta(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:Ta(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:Ta(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:Ta(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:Ta(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:Ta(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:Ta(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:Ta(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:Ta(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:Ta(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:Ta(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:Ta(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:Ta(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:Ta(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:Ta(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:Ta(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:Ta(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:Ta(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:Ta(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:Ta(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:Ta(7025,1,"Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025","Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:Ta(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:Ta(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:Ta(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:Ta(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:Ta(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:Ta(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:Ta(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:Ta(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:Ta(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:Ta(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:Ta(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:Ta(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:Ta(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:Ta(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:Ta(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:Ta(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:Ta(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:Ta(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:Ta(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:Ta(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:Ta(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:Ta(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:Ta(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:Ta(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:Ta(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:Ta(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:Ta(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:Ta(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:Ta(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:Ta(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:Ta(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:Ta(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:Ta(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:Ta(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:Ta(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:Ta(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:Ta(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:Ta(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:Ta(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:Ta(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:Ta(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:Ta(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:Ta(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:Ta(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:Ta(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:Ta(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:Ta(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:Ta(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:Ta(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:Ta(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:Ta(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:Ta(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:Ta(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:Ta(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:Ta(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:Ta(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:Ta(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:Ta(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:Ta(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:Ta(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:Ta(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:Ta(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:Ta(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:Ta(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:Ta(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:Ta(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:Ta(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:Ta(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:Ta(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:Ta(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:Ta(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:Ta(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:Ta(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:Ta(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:Ta(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:Ta(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:Ta(9009,1,"At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit return type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:Ta(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:Ta(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:Ta(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:Ta(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:Ta(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:Ta(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:Ta(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:Ta(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:Ta(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:Ta(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:Ta(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:Ta(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:Ta(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:Ta(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:Ta(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025","Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:Ta(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:Ta(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:Ta(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:Ta(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:Ta(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:Ta(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:Ta(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:Ta(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:Ta(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:Ta(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:Ta(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:Ta(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:Ta(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:Ta(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:Ta(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:Ta(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:Ta(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:Ta(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:Ta(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:Ta(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:Ta(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:Ta(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:Ta(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:Ta(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:Ta(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:Ta(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:Ta(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:Ta(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:Ta(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:Ta(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:Ta(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:Ta(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:Ta(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:Ta(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:Ta(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:Ta(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:Ta(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:Ta(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:Ta(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:Ta(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:Ta(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:Ta(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:Ta(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:Ta(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:Ta(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:Ta(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:Ta(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:Ta(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:Ta(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:Ta(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:Ta(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:Ta(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:Ta(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:Ta(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:Ta(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:Ta(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:Ta(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:Ta(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:Ta(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:Ta(90013,3,"Import_0_from_1_90013","Import '{0}' from \"{1}\""),Change_0_to_1:Ta(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:Ta(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:Ta(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:Ta(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:Ta(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:Ta(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:Ta(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:Ta(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:Ta(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:Ta(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:Ta(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:Ta(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:Ta(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:Ta(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:Ta(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:Ta(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:Ta(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:Ta(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:Ta(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:Ta(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:Ta(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:Ta(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:Ta(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:Ta(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:Ta(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:Ta(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:Ta(90055,3,"Remove_type_from_import_declaration_from_0_90055","Remove 'type' from import declaration from \"{0}\""),Remove_type_from_import_of_0_from_1:Ta(90056,3,"Remove_type_from_import_of_0_from_1_90056","Remove 'type' from import of '{0}' from \"{1}\""),Add_import_from_0:Ta(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:Ta(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:Ta(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:Ta(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:Ta(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:Ta(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:Ta(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:Ta(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:Ta(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:Ta(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:Ta(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:Ta(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:Ta(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:Ta(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:Ta(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:Ta(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:Ta(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:Ta(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:Ta(95005,3,"Extract_function_95005","Extract function"),Extract_constant:Ta(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:Ta(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:Ta(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:Ta(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:Ta(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:Ta(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:Ta(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:Ta(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:Ta(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:Ta(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:Ta(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:Ta(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:Ta(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:Ta(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:Ta(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:Ta(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:Ta(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:Ta(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:Ta(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:Ta(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:Ta(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:Ta(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:Ta(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:Ta(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:Ta(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:Ta(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:Ta(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:Ta(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:Ta(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:Ta(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:Ta(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:Ta(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:Ta(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:Ta(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:Ta(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:Ta(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:Ta(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:Ta(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:Ta(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:Ta(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:Ta(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:Ta(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:Ta(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:Ta(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:Ta(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:Ta(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:Ta(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:Ta(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:Ta(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:Ta(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:Ta(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:Ta(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:Ta(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:Ta(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:Ta(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:Ta(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:Ta(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:Ta(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:Ta(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:Ta(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:Ta(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:Ta(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:Ta(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:Ta(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:Ta(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:Ta(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:Ta(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:Ta(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:Ta(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:Ta(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:Ta(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:Ta(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:Ta(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:Ta(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:Ta(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:Ta(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:Ta(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:Ta(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:Ta(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:Ta(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:Ta(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:Ta(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:Ta(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:Ta(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:Ta(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:Ta(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:Ta(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:Ta(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:Ta(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:Ta(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:Ta(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:Ta(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:Ta(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:Ta(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:Ta(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:Ta(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:Ta(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:Ta(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:Ta(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:Ta(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:Ta(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:Ta(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:Ta(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:Ta(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:Ta(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:Ta(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:Ta(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:Ta(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:Ta(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:Ta(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:Ta(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:Ta(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:Ta(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:Ta(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:Ta(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:Ta(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:Ta(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:Ta(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:Ta(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:Ta(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:Ta(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:Ta(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:Ta(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:Ta(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:Ta(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:Ta(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:Ta(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:Ta(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:Ta(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:Ta(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:Ta(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:Ta(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:Ta(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:Ta(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:Ta(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:Ta(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:Ta(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:Ta(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:Ta(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:Ta(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:Ta(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:Ta(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:Ta(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:Ta(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:Ta(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:Ta(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:Ta(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:Ta(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:Ta(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:Ta(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:Ta(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:Ta(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:Ta(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:Ta(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:Ta(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:Ta(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:Ta(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:Ta(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:Ta(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:Ta(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:Ta(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:Ta(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:Ta(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:Ta(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:Ta(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:Ta(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:Ta(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:Ta(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:Ta(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:Ta(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:Ta(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:Ta(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:Ta(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:Ta(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:Ta(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:Ta(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:Ta(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:Ta(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:Ta(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:Ta(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:Ta(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:Ta(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:Ta(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:Ta(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:Ta(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:Ta(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:Ta(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:Ta(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:Ta(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:Ta(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:Ta(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:Ta(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:Ta(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:Ta(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:Ta(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:Ta(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:Ta(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:Ta(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:Ta(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:Ta(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:Ta(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:Ta(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:Ta(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:Ta(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:Ta(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:Ta(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:Ta(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:Ta(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:Ta(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:Ta(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:Ta(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:Ta(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:Ta(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:Ta(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:Ta(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:Ta(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:Ta(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:Ta(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:Ta(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:Ta(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:Ta(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:Ta(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:Ta(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:Ta(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:Ta(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:Ta(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:Ta(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:Ta(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:Ta(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:Ta(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled.")};function wa(e){return e>=80}function Na(e){return 32===e||wa(e)}var Da={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},Pa=new Map(Object.entries(Da)),Ea=new Map(Object.entries({...Da,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),Fa=new Map(Object.entries({d:1,g:2,i:4,m:8,s:16,u:32,v:64,y:128})),Aa=new Map([[1,9],[16,5],[32,2],[64,99],[128,2]]),Ia=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],Oa=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],ja=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],La=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],Ma=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,Ra=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,Ba=/@(?:see|link)/i;function Ja(e,t){if(e=2?ja:Ia)}function qa(e){const t=[];return e.forEach((e,n)=>{t[e]=n}),t}var Ua=qa(Ea);function Va(e){return Ua[e]}function Wa(e){return Ea.get(e)}var $a=qa(Fa);function Ha(e){return $a[e]}function Ka(e){return Fa.get(e)}function Ga(e){const t=[];let n=0,r=0;for(;n127&&os(i)&&(t.push(r),r=n)}}return t.push(r),t}function Xa(e,t,n,r){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,n,r):Qa(Ya(e),t,n,e.text,r)}function Qa(e,t,n,r,i){(t<0||t>=e.length)&&(i?t=t<0?0:t>=e.length?e.length-1:t:Tn.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${void 0!==r?F(e,Ga(r)):"unknown"}`));const o=e[t]+n;return i?o>e[t+1]?e[t+1]:"string"==typeof r&&o>r.length?r.length:o:(t=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function os(e){return 10===e||13===e||8232===e||8233===e}function as(e){return e>=48&&e<=57}function ss(e){return as(e)||e>=65&&e<=70||e>=97&&e<=102}function cs(e){return e>=65&&e<=90||e>=97&&e<=122}function ls(e){return cs(e)||as(e)||95===e}function _s(e){return e>=48&&e<=55}function us(e,t){const n=e.charCodeAt(t);switch(n){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return n>127}}function ds(e,t,n,r,i){if(dT(t))return t;let o=!1;for(;;){const a=e.charCodeAt(t);switch(a){case 13:10===e.charCodeAt(t+1)&&t++;case 10:if(t++,n)return t;o=!!i;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(r)break;if(47===e.charCodeAt(t+1)){for(t+=2;t127&&rs(a)){t++;continue}}return t}}var ps=7;function fs(e,t){if(Tn.assert(t>=0),0===t||os(e.charCodeAt(t-1))){const n=e.charCodeAt(t);if(t+ps=0&&n127&&rs(a)){u&&os(a)&&(_=!0),n++;continue}break e}}return u&&(p=i(s,c,l,_,o,p)),p}function bs(e,t,n,r){return vs(!1,e,t,!1,n,r)}function xs(e,t,n,r){return vs(!1,e,t,!0,n,r)}function Ss(e,t,n,r,i){return vs(!0,e,t,!1,n,r,i)}function ks(e,t,n,r,i){return vs(!0,e,t,!0,n,r,i)}function Ts(e,t,n,r,i,o=[]){return o.push({kind:n,pos:e,end:t,hasTrailingNewLine:r}),o}function Cs(e,t){return Ss(e,t,Ts,void 0,void 0)}function ws(e,t){return ks(e,t,Ts,void 0,void 0)}function Ns(e){const t=gs.exec(e);if(t)return t[0]}function Ds(e,t){return cs(e)||36===e||95===e||e>127&&za(e,t)}function Ps(e,t,n){return ls(e)||36===e||1===n&&(45===e||58===e)||e>127&&function(e,t){return Ja(e,t>=2?La:Oa)}(e,t)}function Es(e,t,n){let r=As(e,0);if(!Ds(r,t))return!1;for(let i=Is(r);il,getStartPos:()=>l,getTokenEnd:()=>s,getTextPos:()=>s,getToken:()=>u,getTokenStart:()=>_,getTokenPos:()=>_,getTokenText:()=>m.substring(_,s),getTokenValue:()=>d,hasUnicodeEscape:()=>!!(1024&p),hasExtendedUnicodeEscape:()=>!!(8&p),hasPrecedingLineBreak:()=>!!(1&p),hasPrecedingJSDocComment:()=>!!(2&p),isIdentifier:()=>80===u||u>118,isReservedWord:()=>u>=83&&u<=118,isUnterminated:()=>!!(4&p),getCommentDirectives:()=>f,getNumericLiteralFlags:()=>25584&p,getTokenFlags:()=>p,reScanGreaterToken:function(){if(32===u){if(62===S(s))return 62===S(s+1)?61===S(s+2)?(s+=3,u=73):(s+=2,u=50):61===S(s+1)?(s+=2,u=72):(s++,u=49);if(61===S(s))return s++,u=34}return u},reScanAsteriskEqualsToken:function(){return Tn.assert(67===u,"'reScanAsteriskEqualsToken' should only be called on a '*='"),s=_+1,u=64},reScanSlashToken:function(t){if(44===u||69===u){const n=_+1;s=n;let r=!1,i=!1,a=!1;for(;;){const e=k(s);if(-1===e||os(e)){p|=4;break}if(r)r=!1;else{if(47===e&&!a)break;91===e?a=!0:92===e?r=!0:93===e?a=!1:a||40!==e||63!==k(s+1)||60!==k(s+2)||61===k(s+3)||33===k(s+3)||(i=!0)}s++}const l=s;if(4&p){s=n,r=!1;let e=0,t=!1,i=0;for(;s{!function(t,n,r){var i,a,l,u,p=!!(64&t),f=!!(96&t),g=f||!n,y=!1,v=0,b=[];function C(e){for(;;){if(b.push(u),u=void 0,w(e),u=b.pop(),124!==k(s))return;s++}}function w(t){let n=!1;for(;;){const r=s,i=k(s);switch(i){case-1:return;case 94:case 36:s++,n=!1;break;case 92:switch(k(++s)){case 98:case 66:s++,n=!1;break;default:P(),n=!0}break;case 40:if(63===k(++s))switch(k(++s)){case 61:case 33:s++,n=!g;break;case 60:const t=s;switch(k(++s)){case 61:case 33:s++,n=!1;break;default:A(!1),H(62),e<5&&T(Ca.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later,t,s-t),v++,n=!0}break;default:const r=s,i=N(0);45===k(s)&&(s++,N(i),s===r+1&&T(Ca.Subpattern_flags_must_be_present_when_there_is_a_minus_sign,r,s-r)),H(58),n=!0}else v++,n=!0;C(!0),H(41);break;case 123:const o=++s;D();const a=d;if(!g&&!a){n=!0;break}if(44===k(s)){s++,D();const e=d;if(a)e&&Number.parseInt(a)>Number.parseInt(e)&&(g||125===k(s))&&T(Ca.Numbers_out_of_order_in_quantifier,o,s-o);else{if(!e&&125!==k(s)){T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,r,1,String.fromCharCode(i)),n=!0;break}T(Ca.Incomplete_quantifier_Digit_expected,o,0)}}else if(!a){g&&T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,r,1,String.fromCharCode(i)),n=!0;break}if(125!==k(s)){if(!g){n=!0;break}T(Ca._0_expected,s,0,String.fromCharCode(125)),s--}case 42:case 43:case 63:63===k(++s)&&s++,n||T(Ca.There_is_nothing_available_for_repetition,r,s-r),n=!1;break;case 46:s++,n=!0;break;case 91:s++,p?L():j(),H(93),n=!0;break;case 41:if(t)return;case 93:case 125:(g||41===i)&&T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(i)),s++,n=!0;break;case 47:case 124:return;default:$(),n=!0}}}function N(t){for(;;){const n=k(s);if(-1===n||!Ps(n,e))break;const r=Ka(String.fromCharCode(n));void 0===r?T(Ca.Unknown_regular_expression_flag,s,1):t&r?T(Ca.Duplicate_regular_expression_flag,s,1):28&r?(t|=r,V(r,s)):T(Ca.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern,s,1),s++}return t}function P(){switch(Tn.assertEqual(S(s-1),92),k(s)){case 107:60===k(++s)?(s++,A(!0),H(62)):(g||r)&&T(Ca.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets,s-2,2);break;case 113:if(p){s++,T(Ca.q_is_only_available_inside_character_class,s-2,2);break}default:Tn.assert(q()||E()||F(!0))}}function E(){Tn.assertEqual(S(s-1),92);const e=k(s);if(e>=49&&e<=57){const e=s;return D(),l=pe(l,{pos:e,end:s,value:+d}),!0}return!1}function F(e){Tn.assertEqual(S(s-1),92);let t=k(s);switch(t){case-1:return T(Ca.Undetermined_character_escape,s-1,1),"\\";case 99:if(t=k(++s),cs(t))return s++,String.fromCharCode(31&t);if(g)T(Ca.c_must_be_followed_by_an_ASCII_letter,s-2,2);else if(e)return s--,"\\";return String.fromCharCode(t);case 94:case 36:case 47:case 92:case 46:case 42:case 43:case 63:case 40:case 41:case 91:case 93:case 123:case 125:case 124:return s++,String.fromCharCode(t);default:return s--,I(4|(n?8:0)|(f?16:0)|(e?32:0))}}function A(t){var n;Tn.assertEqual(S(s-1),60),_=s,U((n=s)>=0&&nnull==e?void 0:e.has(d))?T(Ca.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other,_,s-_):(u??(u=new Set),u.add(d),i??(i=new Set),i.add(d))}function O(e){return 93===e||-1===e||s>=c}function j(){for(Tn.assertEqual(S(s-1),91),94===k(s)&&s++;;){if(O(k(s)))return;const e=s,t=z();if(45===k(s)){if(O(k(++s)))return;!t&&g&&T(Ca.A_character_class_range_must_not_be_bounded_by_another_character_class,e,s-1-e);const n=s,r=z();if(!r&&g){T(Ca.A_character_class_range_must_not_be_bounded_by_another_character_class,n,s-n);continue}if(!t)continue;const i=As(t,0),o=As(r,0);t.length===Is(i)&&r.length===Is(o)&&i>o&&T(Ca.Range_out_of_order_in_character_class,e,s-e)}}}function L(){Tn.assertEqual(S(s-1),91);let e=!1;94===k(s)&&(s++,e=!0);let t=!1,n=k(s);if(O(n))return;let r,i=s;switch(m.slice(s,s+2)){case"--":case"&&":T(Ca.Expected_a_class_set_operand),y=!1;break;default:r=R()}switch(k(s)){case 45:if(45===k(s+1))return e&&y&&T(Ca.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,i,s-i),t=y,M(3),void(y=!e&&t);break;case 38:if(38===k(s+1))return M(2),e&&y&&T(Ca.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,i,s-i),t=y,void(y=!e&&t);T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(n));break;default:e&&y&&T(Ca.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,i,s-i),t=y}for(;n=k(s),-1!==n;){switch(n){case 45:if(n=k(++s),O(n))return void(y=!e&&t);if(45===n){s++,T(Ca.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2),i=s-2,r=m.slice(i,s);continue}{r||T(Ca.A_character_class_range_must_not_be_bounded_by_another_character_class,i,s-1-i);const n=s,o=R();if(e&&y&&T(Ca.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,n,s-n),t||(t=y),!o){T(Ca.A_character_class_range_must_not_be_bounded_by_another_character_class,n,s-n);break}if(!r)break;const a=As(r,0),c=As(o,0);r.length===Is(a)&&o.length===Is(c)&&a>c&&T(Ca.Range_out_of_order_in_character_class,i,s-i)}break;case 38:i=s,38===k(++s)?(s++,T(Ca.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2),38===k(s)&&(T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(n)),s++)):T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s-1,1,String.fromCharCode(n)),r=m.slice(i,s);continue}if(O(k(s)))break;switch(i=s,m.slice(s,s+2)){case"--":case"&&":T(Ca.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s,2),s+=2,r=m.slice(i,s);break;default:r=R()}}y=!e&&t}function M(e){let t=y;for(;;){let n=k(s);if(O(n))break;switch(n){case 45:45===k(++s)?(s++,3!==e&&T(Ca.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2)):T(Ca.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-1,1);break;case 38:38===k(++s)?(s++,2!==e&&T(Ca.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2),38===k(s)&&(T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(n)),s++)):T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s-1,1,String.fromCharCode(n));break;default:switch(e){case 3:T(Ca._0_expected,s,0,"--");break;case 2:T(Ca._0_expected,s,0,"&&")}}if(n=k(s),O(n)){T(Ca.Expected_a_class_set_operand);break}R(),t&&(t=y)}y=t}function R(){switch(y=!1,k(s)){case-1:return"";case 91:return s++,L(),H(93),"";case 92:if(s++,q())return"";if(113===k(s))return 123===k(++s)?(s++,B(),H(125),""):(T(Ca.q_must_be_followed_by_string_alternatives_enclosed_in_braces,s-2,2),"q");s--;default:return J()}}function B(){Tn.assertEqual(S(s-1),123);let e=0;for(;;){switch(k(s)){case-1:return;case 125:return void(1!==e&&(y=!0));case 124:1!==e&&(y=!0),s++,o=s,e=0;break;default:J(),e++}}}function J(){const e=k(s);if(-1===e)return"";if(92===e){const e=k(++s);switch(e){case 98:return s++,"\b";case 38:case 45:case 33:case 35:case 37:case 44:case 58:case 59:case 60:case 61:case 62:case 64:case 96:case 126:return s++,String.fromCharCode(e);default:return F(!1)}}else if(e===k(s+1))switch(e){case 38:case 33:case 35:case 37:case 42:case 43:case 44:case 46:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 96:case 126:return T(Ca.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash,s,2),s+=2,m.substring(s-2,s)}switch(e){case 47:case 40:case 41:case 91:case 93:case 123:case 125:case 45:case 124:return T(Ca.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(e)),s++,String.fromCharCode(e)}return $()}function z(){if(92!==k(s))return $();{const e=k(++s);switch(e){case 98:return s++,"\b";case 45:return s++,String.fromCharCode(e);default:return q()?"":F(!1)}}}function q(){Tn.assertEqual(S(s-1),92);let e=!1;const t=s-1,n=k(s);switch(n){case 100:case 68:case 115:case 83:case 119:case 87:return s++,!0;case 80:e=!0;case 112:if(123===k(++s)){const n=++s,r=W();if(61===k(s)){const e=Ls.get(r);if(s===n)T(Ca.Expected_a_Unicode_property_name);else if(void 0===e){T(Ca.Unknown_Unicode_property_name,n,s-n);const e=Kt(r,Ls.keys(),yt);e&&T(Ca.Did_you_mean_0,n,s-n,e)}const t=++s,i=W();if(s===t)T(Ca.Expected_a_Unicode_property_value);else if(void 0!==e&&!Bs[e].has(i)){T(Ca.Unknown_Unicode_property_value,t,s-t);const n=Kt(i,Bs[e],yt);n&&T(Ca.Did_you_mean_0,t,s-t,n)}}else if(s===n)T(Ca.Expected_a_Unicode_property_name_or_value);else if(Rs.has(r))p?e?T(Ca.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,n,s-n):y=!0:T(Ca.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set,n,s-n);else if(!Bs.General_Category.has(r)&&!Ms.has(r)){T(Ca.Unknown_Unicode_property_name_or_value,n,s-n);const e=Kt(r,[...Bs.General_Category,...Ms,...Rs],yt);e&&T(Ca.Did_you_mean_0,n,s-n,e)}H(125),f||T(Ca.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,t,s-t)}else{if(!g)return s--,!1;T(Ca._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces,s-2,2,String.fromCharCode(n))}return!0}return!1}function W(){let e="";for(;;){const t=k(s);if(-1===t||!ls(t))break;e+=String.fromCharCode(t),s++}return e}function $(){const e=f?Is(k(s)):1;return s+=e,e>0?m.substring(s-e,s):""}function H(e){k(s)===e?s++:T(Ca._0_expected,s,0,String.fromCharCode(e))}C(!1),h(a,e=>{(null==i?void 0:i.has(e.name))||T(Ca.There_is_no_capturing_group_named_0_in_this_regular_expression,e.pos,e.end-e.pos,e.name)}),h(l,e=>{e.value>v&&(v?T(Ca.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression,e.pos,e.end-e.pos,v):T(Ca.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression,e.pos,e.end-e.pos))})}(r,!0,i)})}d=m.substring(_,s),u=14}return u},reScanTemplateToken:function(e){return s=_,u=A(!e)},reScanTemplateHeadOrNoSubstitutionTemplate:function(){return s=_,u=A(!0)},scanJsxIdentifier:function(){if(wa(u)){for(;s=c)return u=1;for(let t=S(s);s=0&&is(S(s-1))&&!(s+1{const e=b.getText();return e.slice(0,b.getTokenFullStart())+"║"+e.slice(b.getTokenFullStart())}}),b;function x(e){return As(m,e)}function S(e){return m.charCodeAt(e)}function k(e){return e>=0&&e=65&&e<=70)e+=32;else if(!(e>=48&&e<=57||e>=97&&e<=102))break;r.push(e),s++,o=!1}}return r.length=c){n+=m.substring(r,s),p|=4,T(Ca.Unterminated_string_literal);break}const i=S(s);if(i===t){n+=m.substring(r,s),s++;break}if(92!==i||e){if((10===i||13===i)&&!e){n+=m.substring(r,s),p|=4,T(Ca.Unterminated_string_literal);break}s++}else n+=m.substring(r,s),n+=I(3),r=s}return n}function A(e){const t=96===S(s);let n,r=++s,i="";for(;;){if(s>=c){i+=m.substring(r,s),p|=4,T(Ca.Unterminated_template_literal),n=t?15:18;break}const o=S(s);if(96===o){i+=m.substring(r,s),s++,n=t?15:18;break}if(36===o&&s+1=c)return T(Ca.Unexpected_end_of_text),"";const r=S(s);switch(s++,r){case 48:if(s>=c||!as(S(s)))return"\0";case 49:case 50:case 51:s=55296&&i<=56319&&s+6=56320&&n<=57343)return s=t,o+String.fromCharCode(n)}return o;case 120:for(;s1114111&&(e&&T(Ca.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,n,s-n),o=!0),s>=c?(e&&T(Ca.Unexpected_end_of_text),o=!0):125===S(s)?s++:(e&&T(Ca.Unterminated_Unicode_escape_sequence),o=!0),o?(p|=2048,m.substring(t,s)):(p|=8,js(i))}function j(){if(s+5=0&&Ps(r,e)){t+=O(!0),n=s;continue}if(r=j(),!(r>=0&&Ps(r,e)))break;p|=1024,t+=m.substring(n,s),t+=js(r),n=s+=6}}return t+=m.substring(n,s),t}function R(){const e=d.length;if(e>=2&&e<=12){const e=d.charCodeAt(0);if(e>=97&&e<=122){const e=Pa.get(d);if(void 0!==e)return u=e}}return u=80}function B(e){let t="",n=!1,r=!1;for(;;){const i=S(s);if(95!==i){if(n=!0,!as(i)||i-48>=e)break;t+=m[s],s++,r=!1}else p|=512,n?(n=!1,r=!0):T(r?Ca.Multiple_consecutive_numeric_separators_are_not_permitted:Ca.Numeric_separators_are_not_allowed_here,s,1),s++}return 95===S(s-1)&&T(Ca.Numeric_separators_are_not_allowed_here,s-1,1),t}function J(){if(110===S(s))return d+="n",384&p&&(d=PT(d)+"n"),s++,10;{const e=128&p?parseInt(d.slice(2),2):256&p?parseInt(d.slice(2),8):+d;return d=""+e,9}}function z(){l=s,p=0;let r=!1;for(;;){if(_=s,s>=c)return u=1;const i=x(s);if(0===s&&35===i&&hs(m,s)){if(s=ys(m,s),t)continue;return u=6}switch(i){case 10:case 13:if(p|=1,t){s++;continue}return 13===i&&s+1=0&&Ds(o,e))return d=O(!0)+M(),u=R();const a=j();return a>=0&&Ds(a,e)?(s+=6,p|=1024,d=String.fromCharCode(a)+M(),u=R()):(T(Ca.Invalid_character),s++,u=0);case 35:if(0!==s&&"!"===m[s+1])return T(Ca.can_only_be_used_at_the_start_of_a_file,s,2),s++,u=0;const l=x(s+1);if(92===l){s++;const t=L();if(t>=0&&Ds(t,e))return d="#"+O(!0)+M(),u=81;const n=j();if(n>=0&&Ds(n,e))return s+=6,p|=1024,d="#"+String.fromCharCode(n)+M(),u=81;s--}return Ds(l,e)?(s++,U(l,e)):(d="#",T(Ca.Invalid_character,s++,Is(i))),u=81;case 65533:return T(Ca.File_appears_to_be_binary,0,0),s=c,u=8;default:const h=U(i,e);if(h)return u=h;if(is(i)){s+=Is(i);continue}if(os(i)){p|=1,s+=Is(i);continue}const y=Is(i);return T(Ca.Invalid_character,s,y),s+=y,u=0}}}function q(){switch(v){case 0:return!0;case 1:return!1}return 3!==y&&4!==y||3!==v&&Ba.test(m.slice(l,s))}function U(e,t){let n=e;if(Ds(n,t)){for(s+=Is(n);s=c)return u=1;let t=S(s);if(60===t)return 47===S(s+1)?(s+=2,u=31):(s++,u=30);if(123===t)return s++,u=19;let n=0;for(;s0)break;rs(t)||(n=s)}s++}return d=m.substring(l,s),-1===n?13:12}function H(){switch(l=s,S(s)){case 34:case 39:return d=F(!0),u=11;default:return z()}}function K(){if(l=_=s,p=0,s>=c)return u=1;const t=x(s);switch(s+=Is(t),t){case 9:case 11:case 12:case 32:for(;s=0&&Ds(t,e))return d=O(!0)+M(),u=R();const n=j();return n>=0&&Ds(n,e)?(s+=6,p|=1024,d=String.fromCharCode(n)+M(),u=R()):(s++,u=0)}if(Ds(t,e)){let n=t;for(;s=0),s=e,l=e,_=e,u=0,d=void 0,p=0}}function As(e,t){return e.codePointAt(t)}function Is(e){return e>=65536?2:-1===e?0:1}var Os=String.fromCodePoint?e=>String.fromCodePoint(e):function(e){if(Tn.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);const t=Math.floor((e-65536)/1024)+55296,n=(e-65536)%1024+56320;return String.fromCharCode(t,n)};function js(e){return Os(e)}var Ls=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),Ms=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),Rs=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),Bs={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};function Js(e){return jo(e)||Ao(e)}function zs(e){return ce(e,xS,CS)}function qs(e){switch(OS(e)){case 99:return"lib.esnext.full.d.ts";case 10:return"lib.es2023.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.full.d.ts";case 7:return"lib.es2020.full.d.ts";case 6:return"lib.es2019.full.d.ts";case 5:return"lib.es2018.full.d.ts";case 4:return"lib.es2017.full.d.ts";case 3:return"lib.es2016.full.d.ts";case 2:return"lib.es6.d.ts";default:return"lib.d.ts"}}function Us(e){return e.start+e.length}function Vs(e){return 0===e.length}function Ws(e,t){return t>=e.start&&t=e.pos&&t<=e.end}function Hs(e,t){return t.start>=e.start&&Us(t)<=Us(e)}function Ks(e,t){return void 0!==Gs(e,t)}function Gs(e,t){const n=ec(e,t);return n&&0===n.length?void 0:n}function Xs(e,t){return Ys(e.start,e.length,t.start,t.length)}function Qs(e,t,n){return Ys(e.start,e.length,t,n)}function Ys(e,t,n,r){return n<=e+t&&n+r>=e}function Zs(e,t){return t<=Us(e)&&t>=e.start}function ec(e,t){const n=Math.max(e.start,t.start),r=Math.min(Us(e),Us(t));return n<=r?nc(n,r):void 0}function tc(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function nc(e,t){return tc(e,t-e)}function rc(e){return tc(e.span.start,e.newLength)}function ic(e){return Vs(e.span)&&0===e.newLength}function oc(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}Bs.Script_Extensions=Bs.Script;var ac=oc(tc(0,0),0);function sc(e){if(0===e.length)return ac;if(1===e.length)return e[0];const t=e[0];let n=t.span.start,r=Us(t.span),i=n+t.newLength;for(let t=1;t=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e}function Cc(e){const t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function wc(e){return Cc(e.escapedText)}function Nc(e){const t=Wa(e.escapedText);return t?dt(t,jh):void 0}function Dc(e){return e.valueDeclaration&&o_(e.valueDeclaration)?wc(e.valueDeclaration.name):Cc(e.escapedName)}function Pc(e){const t=e.parent.parent;if(t){if(ku(t))return Ec(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return Ec(t.declarationList.declarations[0]);break;case 244:let e=t.expression;switch(226===e.kind&&64===e.operatorToken.kind&&(e=e.left),e.kind){case 211:return e.name;case 212:const t=e.argumentExpression;if(QN(t))return t}break;case 217:return Ec(t.expression);case 256:if(ku(t.statement)||nu(t.statement))return Ec(t.statement)}}}function Ec(e){const t=jc(e);return t&&QN(t)?t:void 0}function Fc(e,t){return!(!Ic(e)||!QN(e.name)||wc(e.name)!==wc(t))||!(!LP(e)||!ee(e.declarationList.declarations,e=>Fc(e,t)))}function Ac(e){return e.name||Pc(e)}function Ic(e){return!!e.name}function Oc(e){switch(e.kind){case 80:return e;case 348:case 341:{const{name:t}=e;if(166===t.kind)return t.right;break}case 213:case 226:{const t=e;switch(dg(t)){case 1:case 4:case 5:case 3:return bg(t.left);case 7:case 8:case 9:return t.arguments[1];default:return}}case 346:return Ac(e);case 340:return Pc(e);case 277:{const{expression:t}=e;return QN(t)?t:void 0}case 212:const t=e;if(hg(t))return t.argumentExpression}return e.name}function jc(e){if(void 0!==e)return Oc(e)||(_P(e)||uP(e)||kP(e)?Lc(e):void 0)}function Lc(e){if(e.parent){if(HE(e.parent)||eP(e.parent))return e.parent.name;if(yP(e.parent)&&e===e.parent.right){if(QN(e.parent.left))return e.parent.left;if(qx(e.parent.left))return bg(e.parent.left)}else if(eE(e.parent)&&QN(e.parent.name))return e.parent.name}}function Mc(e){if(Zv(e))return O(e.modifiers,gD)}function Rc(e){if(Wv(e,98303))return O(e.modifiers,__)}function Bc(e,t){if(e.name){if(QN(e.name)){const n=e.name.escapedText;return fl(e.parent,t).filter(e=>PF(e)&&QN(e.name)&&e.name.escapedText===n)}{const n=e.parent.parameters.indexOf(e);Tn.assert(n>-1,"Parameters should always be in their parents' parameter list");const r=fl(e.parent,t).filter(PF);if(nIF(e)&&e.typeParameters.some(e=>e.name.escapedText===n))}function Uc(e){return qc(e,!1)}function Vc(e){return qc(e,!0)}function Wc(e){return!!hl(e,PF)}function $c(e){return hl(e,gF)}function Hc(e){return yl(e,MF)}function Kc(e){return hl(e,yF)}function Gc(e){return hl(e,bF)}function Xc(e){return hl(e,bF,!0)}function Qc(e){return hl(e,xF)}function Yc(e){return hl(e,xF,!0)}function Zc(e){return hl(e,SF)}function el(e){return hl(e,SF,!0)}function tl(e){return hl(e,kF)}function nl(e){return hl(e,kF,!0)}function rl(e){return hl(e,TF,!0)}function il(e){return hl(e,wF)}function ol(e){return hl(e,wF,!0)}function al(e){return hl(e,DF)}function sl(e){return hl(e,FF)}function cl(e){return hl(e,EF)}function ll(e){return hl(e,IF)}function _l(e){return hl(e,RF)}function ul(e){const t=hl(e,AF);if(t&&t.typeExpression&&t.typeExpression.type)return t}function dl(e){let t=hl(e,AF);return!t&&mD(e)&&(t=C(Jc(e),e=>!!e.typeExpression)),t&&t.typeExpression&&t.typeExpression.type}function pl(e){const t=cl(e);if(t&&t.typeExpression)return t.typeExpression.type;const n=ul(e);if(n&&n.typeExpression){const e=n.typeExpression.type;if(ID(e)){const t=C(e.members,CD);return t&&t.type}if(ED(e)||_F(e))return e.type}}function fl(e,t){var n;if(!Vg(e))return p;let r=null==(n=e.jsDoc)?void 0:n.jsDocCache;if(void 0===r||t){const n=Wg(e,t);Tn.assert(n.length<2||n[0]!==n[1]),r=z(n,e=>pF(e)?e.tags:e),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=r)}return r}function ml(e){return fl(e,!1)}function gl(e){return fl(e,!0)}function hl(e,t,n){return C(fl(e,n),t)}function yl(e,t){return ml(e).filter(t)}function vl(e,t){return ml(e).filter(e=>e.kind===t)}function bl(e){return"string"==typeof e?e:null==e?void 0:e.map(e=>321===e.kind?e.text:function(e){const t=324===e.kind?"link":325===e.kind?"linkcode":"linkplain",n=e.name?Up(e.name):"",r=e.name&&(""===e.text||e.text.startsWith("://"))?"":" ";return`{@${t} ${n}${r}${e.text}}`}(e)).join("")}function xl(e){if(mF(e)){if(CF(e.parent)){const t=eh(e.parent);if(t&&g(t.tags))return z(t.tags,e=>IF(e)?e.typeParameters:void 0)}return p}if(Mg(e))return Tn.assert(320===e.parent.kind),z(e.parent.tags,e=>IF(e)?e.typeParameters:void 0);if(e.typeParameters)return e.typeParameters;if(MA(e)&&e.typeParameters)return e.typeParameters;if(zm(e)){const t=Av(e);if(t.length)return t;const n=dl(e);if(n&&ED(n)&&n.typeParameters)return n.typeParameters}return p}function Sl(e){return e.constraint?e.constraint:IF(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function kl(e){return 80===e.kind||81===e.kind}function Tl(e){return 178===e.kind||177===e.kind}function Cl(e){return rP(e)&&!!(64&e.flags)}function wl(e){return iP(e)&&!!(64&e.flags)}function Nl(e){return oP(e)&&!!(64&e.flags)}function Dl(e){const t=e.kind;return!!(64&e.flags)&&(211===t||212===t||213===t||235===t)}function Pl(e){return Dl(e)&&!DP(e)&&!!e.questionDotToken}function El(e){return Pl(e.parent)&&e.parent.expression===e}function Fl(e){return!Dl(e.parent)||Pl(e.parent)||e!==e.parent.expression}function Al(e){return 226===e.kind&&61===e.operatorToken.kind}function Il(e){return PD(e)&&QN(e.typeName)&&"const"===e.typeName.escapedText&&!e.typeArguments}function Ol(e){return hA(e,8)}function jl(e){return DP(e)&&!!(64&e.flags)}function Ll(e){return 252===e.kind||251===e.kind}function Ml(e){return 280===e.kind||279===e.kind}function Rl(e){return 348===e.kind||341===e.kind}function Bl(e){return Jl(e.kind)}function Jl(e){return e>=166}function zl(e){return e>=0&&e<=165}function ql(e){return zl(e.kind)}function Ul(e){return Be(e,"pos")&&Be(e,"end")}function Vl(e){return 9<=e&&e<=15}function Wl(e){return Vl(e.kind)}function $l(e){switch(e.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function Hl(e){return 15<=e&&e<=18}function Kl(e){return Hl(e.kind)}function Gl(e){const t=e.kind;return 17===t||18===t}function Xl(e){return SE(e)||wE(e)}function Ql(e){switch(e.kind){case 276:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 274:return e.parent.isTypeOnly;case 273:case 271:return e.isTypeOnly}return!1}function Yl(e){switch(e.kind){case 281:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 278:return e.isTypeOnly&&!!e.moduleSpecifier&&!e.exportClause;case 280:return e.parent.isTypeOnly}return!1}function Zl(e){return Ql(e)||Yl(e)}function e_(e){return 11===e.kind||Hl(e.kind)}function t_(e){return ON(e)||QN(e)}function n_(e){var t;return QN(e)&&void 0!==(null==(t=e.emitNode)?void 0:t.autoGenerate)}function r_(e){var t;return YN(e)&&void 0!==(null==(t=e.emitNode)?void 0:t.autoGenerate)}function i_(e){const t=e.emitNode.autoGenerate.flags;return!!(32&t)&&!!(16&t)&&!!(8&t)}function o_(e){return(yD(e)||w_(e))&&YN(e.name)}function a_(e){return rP(e)&&YN(e.name)}function s_(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function c_(e){return!!(31&ub(e))}function l_(e){return c_(e)||126===e||164===e||129===e}function __(e){return s_(e.kind)}function u_(e){const t=e.kind;return 166===t||80===t}function d_(e){const t=e.kind;return 80===t||81===t||11===t||9===t||167===t}function p_(e){const t=e.kind;return 80===t||206===t||207===t}function f_(e){return!!e&&v_(e.kind)}function m_(e){return!!e&&(v_(e.kind)||xD(e))}function g_(e){return e&&y_(e.kind)}function h_(e){return 112===e.kind||97===e.kind}function y_(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function v_(e){switch(e){case 173:case 179:case 323:case 180:case 181:case 184:case 317:case 185:return!0;default:return y_(e)}}function b_(e){return QE(e)||cE(e)||jP(e)&&f_(e.parent)}function x_(e){const t=e.kind;return 176===t||172===t||174===t||177===t||178===t||181===t||175===t||240===t}function S_(e){return e&&(263===e.kind||231===e.kind)}function k_(e){return e&&(177===e.kind||178===e.kind)}function T_(e){return yD(e)&&Qv(e)}function C_(e){return zm(e)&&CC(e)?!(gg(e)&&Eb(e.expression)||yg(e,!0)):e.parent&&S_(e.parent)&&yD(e)&&!Qv(e)}function w_(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function N_(e){switch(e.kind){case 174:case 177:case 178:case 172:return!0;default:return!1}}function D_(e){return __(e)||gD(e)}function P_(e){const t=e.kind;return 180===t||179===t||171===t||173===t||181===t||177===t||178===t}function E_(e){return P_(e)||x_(e)}function F_(e){const t=e.kind;return 303===t||304===t||305===t||174===t||177===t||178===t}function A_(e){return zx(e.kind)}function I_(e){switch(e.kind){case 184:case 185:return!0}return!1}function O_(e){if(e){const t=e.kind;return 207===t||206===t}return!1}function j_(e){const t=e.kind;return 209===t||210===t}function L_(e){const t=e.kind;return 208===t||232===t}function M_(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function R_(e){return eE(e)||mD(e)||z_(e)||U_(e)}function B_(e){return J_(e)||q_(e)}function J_(e){switch(e.kind){case 206:case 210:return!0}return!1}function z_(e){switch(e.kind){case 208:case 303:case 304:case 305:return!0}return!1}function q_(e){switch(e.kind){case 207:case 209:return!0}return!1}function U_(e){switch(e.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return xb(e,!0)}function V_(e){const t=e.kind;return 211===t||166===t||205===t}function W_(e){const t=e.kind;return 211===t||166===t}function $_(e){return H_(e)||ZT(e)}function H_(e){switch(e.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function K_(e){return 213===e.kind||214===e.kind}function G_(e){const t=e.kind;return 228===t||15===t}function X_(e){return Q_(Ol(e).kind)}function Q_(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function Y_(e){return Z_(Ol(e).kind)}function Z_(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return Q_(e)}}function eu(e){switch(e.kind){case 225:return!0;case 224:return 46===e.operator||47===e.operator;default:return!1}}function tu(e){switch(e.kind){case 106:case 112:case 97:case 224:return!0;default:return Wl(e)}}function nu(e){return function(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 355:case 354:case 238:return!0;default:return Z_(e)}}(Ol(e).kind)}function ru(e){const t=e.kind;return 216===t||234===t}function iu(e){return DE(e)||FP(e)}function ou(e,t){switch(e.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return t&&ou(e.statement,t)}return!1}function au(e){return kE(e)||TE(e)}function su(e){return ee(e,au)}function cu(e){return!(Op(e)||kE(e)||Wv(e,32)||pp(e))}function lu(e){return Op(e)||kE(e)||Wv(e,32)}function _u(e){return 249===e.kind||250===e.kind}function uu(e){return jP(e)||nu(e)}function du(e){return jP(e)}function pu(e){return tE(e)||nu(e)}function fu(e){const t=e.kind;return 268===t||267===t||80===t}function mu(e){const t=e.kind;return 268===t||267===t}function gu(e){const t=e.kind;return 80===t||267===t}function hu(e){const t=e.kind;return 275===t||274===t}function yu(e){return 267===e.kind||266===e.kind}function vu(e){switch(e.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 338:case 340:case 317:case 341:case 348:case 323:case 346:case 322:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 307:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function bu(e){switch(e.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 338:case 340:case 317:case 323:case 346:case 200:case 174:case 173:case 267:case 178:case 307:case 265:return!0;default:return!1}}function xu(e){return 262===e||282===e||263===e||264===e||265===e||266===e||267===e||272===e||271===e||278===e||277===e||270===e}function Su(e){return 252===e||251===e||259===e||246===e||244===e||242===e||249===e||250===e||248===e||245===e||256===e||253===e||255===e||257===e||258===e||243===e||247===e||254===e||353===e}function ku(e){return 168===e.kind?e.parent&&345!==e.parent.kind||zm(e):219===(t=e.kind)||208===t||263===t||231===t||175===t||176===t||266===t||306===t||281===t||262===t||218===t||177===t||273===t||271===t||276===t||264===t||291===t||174===t||173===t||267===t||270===t||274===t||280===t||169===t||303===t||172===t||171===t||178===t||304===t||265===t||168===t||260===t||346===t||338===t||348===t||202===t;var t}function Tu(e){return xu(e.kind)}function Cu(e){return Su(e.kind)}function wu(e){const t=e.kind;return Su(t)||xu(t)||function(e){if(241!==e.kind)return!1;if(void 0!==e.parent&&(258===e.parent.kind||299===e.parent.kind))return!1;return!Hf(e)}(e)}function Nu(e){const t=e.kind;return Su(t)||xu(t)||241===t}function Du(e){const t=e.kind;return 283===t||166===t||80===t}function Pu(e){const t=e.kind;return 110===t||80===t||211===t||295===t}function Eu(e){const t=e.kind;return 284===t||294===t||285===t||12===t||288===t}function Fu(e){const t=e.kind;return 291===t||293===t}function Au(e){const t=e.kind;return 11===t||294===t}function Iu(e){const t=e.kind;return 286===t||285===t}function Ou(e){const t=e.kind;return 296===t||297===t}function ju(e){return e.kind>=309&&e.kind<=351}function Lu(e){return 320===e.kind||319===e.kind||321===e.kind||Gu(e)||Mu(e)||fF(e)||mF(e)}function Mu(e){return e.kind>=327&&e.kind<=351}function Ru(e){return 178===e.kind}function Bu(e){return 177===e.kind}function Ju(e){if(!Vg(e))return!1;const{jsDoc:t}=e;return!!t&&t.length>0}function zu(e){return!!e.type}function qu(e){return!!e.initializer}function Uu(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function Vu(e){return 291===e.kind||293===e.kind||F_(e)}function Wu(e){return 183===e.kind||233===e.kind}var $u=1073741823;function Hu(e){let t=$u;for(const n of e){if(!n.length)continue;let e=0;for(;e0?n.parent.parameters[r-1]:void 0,o=t.text,a=i?ne(ws(o,ds(o,i.end+1,!1,!0)),Cs(o,e.pos)):ws(o,ds(o,e.pos,!1,!0));return ee(a)&&Yu(Ee(a),t)}return!!h(n&&Tf(n,t),e=>Yu(e,t))}var ed=[],td="tslib",nd=160,rd=1e6;function id(e,t){const n=e.declarations;if(n)for(const e of n)if(e.kind===t)return e}function od(e,t){return O(e.declarations||p,e=>e.kind===t)}function ad(e){const t=new Map;if(e)for(const n of e)t.set(n.escapedName,n);return t}function sd(e){return!!(33554432&e.flags)}function cd(e){return!!(1536&e.flags)&&34===e.escapedName.charCodeAt(0)}var ld=function(){var e="";const t=t=>e+=t;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(e,n)=>t(e),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&rs(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:ft,decreaseIndent:ft,clear:()=>e=""}}();function _d(e,t){return e.configFilePath!==t.configFilePath||ud(e,t)}function ud(e,t){return pd(e,t,jO)}function dd(e,t){return pd(e,t,MO)}function pd(e,t,n){return e!==t&&n.some(n=>!DT(sk(e,n),sk(t,n)))}function fd(e,t){for(;;){const n=t(e);if("quit"===n)return;if(void 0!==n)return n;if(QE(e))return;e=e.parent}}function md(e,t){const n=e.entries();for(const[e,r]of n){const n=t(r,e);if(n)return n}}function gd(e,t){const n=e.keys();for(const e of n){const n=t(e);if(n)return n}}function hd(e,t){e.forEach((e,n)=>{t.set(n,e)})}function yd(e){const t=ld.getText();try{return e(ld),ld.getText()}finally{ld.clear(),ld.writeKeyword(t)}}function vd(e){return e.end-e.pos}function bd(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular}function xd(e,t){return e===t||e.resolvedModule===t.resolvedModule||!!e.resolvedModule&&!!t.resolvedModule&&e.resolvedModule.isExternalLibraryImport===t.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===t.resolvedModule.extension&&e.resolvedModule.resolvedFileName===t.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===t.resolvedModule.originalPath&&(n=e.resolvedModule.packageId,r=t.resolvedModule.packageId,n===r||!!n&&!!r&&n.name===r.name&&n.subModuleName===r.subModuleName&&n.version===r.version&&n.peerDependencies===r.peerDependencies)&&e.alternateResult===t.alternateResult;var n,r}function Sd(e,t,n,r,i){var o;const a=null==(o=t.getResolvedModule(e,n,r))?void 0:o.alternateResult,s=a&&(2===LS(t.getCompilerOptions())?[Ca.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler,[a]]:[Ca.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,[a,a.includes(KM+"@types/")?`@types/${ER(i)}`:i]]),c=s?yS(void 0,s[0],...s[1]):t.typesPackageExists(i)?yS(void 0,Ca.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,i,ER(i)):t.packageBundlesTypes(i)?yS(void 0,Ca.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,i,n):yS(void 0,Ca.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,n,ER(i));return c&&(c.repopulateInfo=()=>({moduleReference:n,mode:r,packageName:i===n?void 0:i})),c}function kd({name:e,subModuleName:t}){return t?`${e}/${t}`:e}function Td(e){return`${kd(e)}@${e.version}${e.peerDependencies??""}`}function Cd(e,t){return e===t||e.resolvedTypeReferenceDirective===t.resolvedTypeReferenceDirective||!!e.resolvedTypeReferenceDirective&&!!t.resolvedTypeReferenceDirective&&e.resolvedTypeReferenceDirective.resolvedFileName===t.resolvedTypeReferenceDirective.resolvedFileName&&!!e.resolvedTypeReferenceDirective.primary==!!t.resolvedTypeReferenceDirective.primary&&e.resolvedTypeReferenceDirective.originalPath===t.resolvedTypeReferenceDirective.originalPath}function wd(e,t,n,r){Tn.assert(e.length===t.length);for(let i=0;i=0),Ya(t)[e]}function Id(e){const t=Dd(e),n=ns(t,e.pos);return`${t.fileName}(${n.line+1},${n.character+1})`}function Od(e,t){Tn.assert(e>=0);const n=Ya(t),r=e,i=t.text;if(r+1===n.length)return i.length-1;{const e=n[r];let t=n[r+1]-1;for(Tn.assert(os(i.charCodeAt(t)));e<=t&&os(i.charCodeAt(t));)t--;return t}}function jd(e,t,n){return!(n&&n(t)||e.identifiers.has(t))}function Ld(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function Md(e){return!Ld(e)}function Rd(e,t){return fD(e)?t===e.expression:xD(e)?t===e.modifiers:hD(e)?t===e.initializer:yD(e)?t===e.questionToken&&T_(e):HE(e)?t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Bd(e.modifiers,t,D_):KE(e)?t===e.equalsToken||t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Bd(e.modifiers,t,D_):bD(e)?t===e.exclamationToken:SD(e)?t===e.typeParameters||t===e.type||Bd(e.typeParameters,t,fD):kD(e)?t===e.typeParameters||Bd(e.typeParameters,t,fD):TD(e)?t===e.typeParameters||t===e.type||Bd(e.typeParameters,t,fD):!!_E(e)&&(t===e.modifiers||Bd(e.modifiers,t,D_))}function Bd(e,t,n){return!(!e||ct(t)||!n(t))&&E(e,t)}function Jd(e,t,n){if(void 0===t||0===t.length)return e;let r=0;for(;r[`${ns(e,t.range.end).line}`,t])),r=new Map;return{getUnusedExpectations:function(){return We(n.entries()).filter(([e,t])=>0===t.type&&!r.get(e)).map(([e,t])=>t)},markUsed:function(e){if(!n.has(`${e}`))return!1;return r.set(`${e}`,!0),!0}}}function Xd(e,t,n){if(Ld(e))return e.pos;if(ju(e)||12===e.kind)return ds((t||Dd(e)).text,e.pos,!1,!0);if(n&&Ju(e))return Xd(e.jsDoc[0],t);if(352===e.kind){const r=Ce(VF(e));if(r)return Xd(r,t,n)}return ds((t||Dd(e)).text,e.pos,!1,!1,Vm(e))}function Qd(e,t){const n=!Ld(e)&&bI(e)?w(e.modifiers,gD):void 0;return n?ds((t||Dd(e)).text,n.end):Xd(e,t)}function Yd(e,t,n=!1){return ep(e.text,t,n)}function Zd(e){return!!(TE(e)&&e.exportClause&&bE(e.exportClause)&&"default"===e.exportClause.name.escapedText)}function ep(e,t,n=!1){if(Ld(t))return"";let r=e.substring(n?t.pos:ds(e,t.pos),t.end);return function(e){return!!xc(e,ZE)}(t)&&(r=r.split(/\r\n|\n|\r/).map(e=>e.replace(/^\s*\*/,"").trimStart()).join("\n")),r}function tp(e,t=!1){return Yd(Dd(e),e,t)}function np(e){return e.pos}function rp(e,t){return je(e,t,np,It)}function ip(e){const t=e.emitNode;return t&&t.flags||0}function op(e){const t=e.emitNode;return t&&t.internalFlags||0}var ap=kt(()=>new Map(Object.entries({Array:new Map(Object.entries({es2015:["find","findIndex","fill","copyWithin","entries","keys","values"],es2016:["includes"],es2019:["flat","flatMap"],es2022:["at"],es2023:["findLastIndex","findLast"]})),Iterator:new Map(Object.entries({es2015:p})),AsyncIterator:new Map(Object.entries({es2015:p})),Atomics:new Map(Object.entries({es2017:p})),SharedArrayBuffer:new Map(Object.entries({es2017:p})),AsyncIterable:new Map(Object.entries({es2018:p})),AsyncIterableIterator:new Map(Object.entries({es2018:p})),AsyncGenerator:new Map(Object.entries({es2018:p})),AsyncGeneratorFunction:new Map(Object.entries({es2018:p})),RegExp:new Map(Object.entries({es2015:["flags","sticky","unicode"],es2018:["dotAll"]})),Reflect:new Map(Object.entries({es2015:["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"]})),ArrayConstructor:new Map(Object.entries({es2015:["from","of"],esnext:["fromAsync"]})),ObjectConstructor:new Map(Object.entries({es2015:["assign","getOwnPropertySymbols","keys","is","setPrototypeOf"],es2017:["values","entries","getOwnPropertyDescriptors"],es2019:["fromEntries"],es2022:["hasOwn"]})),NumberConstructor:new Map(Object.entries({es2015:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"]})),Math:new Map(Object.entries({es2015:["clz32","imul","sign","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","fround","cbrt"]})),Map:new Map(Object.entries({es2015:["entries","keys","values"]})),Set:new Map(Object.entries({es2015:["entries","keys","values"]})),PromiseConstructor:new Map(Object.entries({es2015:["all","race","reject","resolve"],es2020:["allSettled"],es2021:["any"]})),Symbol:new Map(Object.entries({es2015:["for","keyFor"],es2019:["description"]})),WeakMap:new Map(Object.entries({es2015:["entries","keys","values"]})),WeakSet:new Map(Object.entries({es2015:["entries","keys","values"]})),String:new Map(Object.entries({es2015:["codePointAt","includes","endsWith","normalize","repeat","startsWith","anchor","big","blink","bold","fixed","fontcolor","fontsize","italics","link","small","strike","sub","sup"],es2017:["padStart","padEnd"],es2019:["trimStart","trimEnd","trimLeft","trimRight"],es2020:["matchAll"],es2021:["replaceAll"],es2022:["at"],esnext:["isWellFormed","toWellFormed"]})),StringConstructor:new Map(Object.entries({es2015:["fromCodePoint","raw"]})),DateTimeFormat:new Map(Object.entries({es2017:["formatToParts"]})),Promise:new Map(Object.entries({es2015:p,es2018:["finally"]})),RegExpMatchArray:new Map(Object.entries({es2018:["groups"]})),RegExpExecArray:new Map(Object.entries({es2018:["groups"]})),Intl:new Map(Object.entries({es2018:["PluralRules"]})),NumberFormat:new Map(Object.entries({es2018:["formatToParts"]})),SymbolConstructor:new Map(Object.entries({es2020:["matchAll"]})),DataView:new Map(Object.entries({es2020:["setBigInt64","setBigUint64","getBigInt64","getBigUint64"]})),BigInt:new Map(Object.entries({es2020:p})),RelativeTimeFormat:new Map(Object.entries({es2020:["format","formatToParts","resolvedOptions"]})),Int8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8ClampedArray:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float64Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),BigInt64Array:new Map(Object.entries({es2020:p,es2022:["at"],es2023:["findLastIndex","findLast"]})),BigUint64Array:new Map(Object.entries({es2020:p,es2022:["at"],es2023:["findLastIndex","findLast"]})),Error:new Map(Object.entries({es2022:["cause"]}))}))),sp=(e=>(e[e.None=0]="None",e[e.NeverAsciiEscape=1]="NeverAsciiEscape",e[e.JsxAttributeEscape=2]="JsxAttributeEscape",e[e.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",e[e.AllowNumericSeparator=8]="AllowNumericSeparator",e))(sp||{});function cp(e,t,n){if(t&&function(e,t){if(my(e)||!e.parent||4&t&&e.isUnterminated)return!1;if(AN(e)){if(26656&e.numericLiteralFlags)return!1;if(512&e.numericLiteralFlags)return!!(8&t)}return!IN(e)}(e,n))return Yd(t,e);switch(e.kind){case 11:{const t=2&n?Vy:1&n||16777216&ip(e)?My:By;return e.singleQuote?"'"+t(e.text,39)+"'":'"'+t(e.text,34)+'"'}case 15:case 16:case 17:case 18:{const t=1&n||16777216&ip(e)?My:By,r=e.rawText??Dy(t(e.text,96));switch(e.kind){case 15:return"`"+r+"`";case 16:return"`"+r+"${";case 17:return"}"+r+"${";case 18:return"}"+r+"`"}break}case 9:case 10:return e.text;case 14:return 4&n&&e.isUnterminated?e.text+(92===e.text.charCodeAt(e.text.length-1)?" /":"/"):e.text}return Tn.fail(`Literal kind '${e.kind}' not accounted for.`)}function lp(e){return _t(e)?`"${My(e)}"`:""+e}function _p(e){return Wo(e).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function up(e){return!!(7&gc(e))||dp(e)}function dp(e){const t=py(e);return 260===t.kind&&299===t.parent.kind}function pp(e){return sE(e)&&(11===e.name.kind||vp(e))}function fp(e){return sE(e)&&11===e.name.kind}function mp(e){return sE(e)&&ON(e.name)}function gp(e){return sE(e)||QN(e)}function hp(e){return!!(t=e.valueDeclaration)&&267===t.kind&&!t.body;var t}function yp(e){return 307===e.kind||267===e.kind||m_(e)}function vp(e){return!!(2048&e.flags)}function bp(e){return pp(e)&&xp(e)}function xp(e){switch(e.parent.kind){case 307:return tO(e.parent);case 268:return pp(e.parent.parent)&&QE(e.parent.parent.parent)&&!tO(e.parent.parent.parent)}return!1}function Sp(e){var t;return null==(t=e.declarations)?void 0:t.find(e=>!(bp(e)||sE(e)&&vp(e)))}function kp(e,t){return tO(e)||(1===(n=jS(t))||100===n||199===n)&&!!e.commonJsModuleIndicator;var n}function Tp(e,t){switch(e.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return!e.isDeclarationFile&&(!!tk(t,"alwaysStrict")||(!!uA(e.statements)||!(!tO(e)&&!RS(t))))}function Cp(e){return!!(33554432&e.flags)||Wv(e,128)}function wp(e,t){switch(e.kind){case 307:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!m_(t)}return!1}function Np(e){switch(Tn.type(e),e.kind){case 338:case 346:case 323:return!0;default:return Dp(e)}}function Dp(e){switch(Tn.type(e),e.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 317:case 263:case 231:case 264:case 265:case 345:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function Pp(e){switch(e.kind){case 272:case 271:return!0;default:return!1}}function Ep(e){return Pp(e)||Km(e)}function Fp(e){return Pp(e)||Qm(e)}function Ap(e){switch(e.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function Ip(e){return Op(e)||sE(e)||GD(e)||gf(e)}function Op(e){return Pp(e)||TE(e)}function jp(e){return xc(e.parent,e=>!!(1&YR(e)))}function Lp(e){return xc(e.parent,e=>wp(e,e.parent))}function Mp(e,t){let n=Lp(e);for(;n;)t(n),n=Lp(n)}function Rp(e){return e&&0!==vd(e)?tp(e):"(Missing)"}function Bp(e){return e.declaration?Rp(e.declaration.parameters[0].name):void 0}function Jp(e){return 167===e.kind&&!Kh(e.expression)}function zp(e){var t;switch(e.kind){case 80:case 81:return(null==(t=e.emitNode)?void 0:t.autoGenerate)?void 0:e.escapedText;case 11:case 9:case 15:return Tc(e.text);case 167:return Kh(e.expression)?Tc(e.expression.text):void 0;case 295:return bC(e);default:return Tn.assertNever(e)}}function qp(e){return Tn.checkDefined(zp(e))}function Up(e){switch(e.kind){case 110:return"this";case 81:case 80:return 0===vd(e)?wc(e):tp(e);case 166:return Up(e.left)+"."+Up(e.right);case 211:return QN(e.name)||YN(e.name)?Up(e.expression)+"."+Up(e.name):Tn.assertNever(e.name);case 311:return Up(e.left)+"#"+Up(e.right);case 295:return Up(e.namespace)+":"+Up(e.name);default:return Tn.assertNever(e)}}function Vp(e,t,...n){return $p(Dd(e),e,t,...n)}function Wp(e,t,n,...r){const i=ds(e.text,t.pos);return fS(e,i,t.end-i,n,...r)}function $p(e,t,n,...r){const i=rf(e,t);return fS(e,i.start,i.length,n,...r)}function Hp(e,t,n,r){const i=rf(e,t);return Xp(e,i.start,i.length,n,r)}function Kp(e,t,n,r){const i=ds(e.text,t.pos);return Xp(e,i,t.end-i,n,r)}function Gp(e,t,n){Tn.assertGreaterThanOrEqual(t,0),Tn.assertGreaterThanOrEqual(n,0),Tn.assertLessThanOrEqual(t,e.length),Tn.assertLessThanOrEqual(t+n,e.length)}function Xp(e,t,n,r,i){return Gp(e.text,t,n),{file:e,start:t,length:n,code:r.code,category:r.category,messageText:r.next?r:r.messageText,relatedInformation:i,canonicalHead:r.canonicalHead}}function Qp(e,t,n){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:n}}function Yp(e){return"string"==typeof e.messageText?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function Zp(e,t,n){return{file:e,start:t.pos,length:t.end-t.pos,code:n.code,category:n.category,messageText:n.message}}function ef(e,...t){return{code:e.code,messageText:mS(e,...t)}}function tf(e,t){const n=Fs(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);n.scan();return nc(n.getTokenStart(),n.getTokenEnd())}function nf(e,t){const n=Fs(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);return n.scan(),n.getToken()}function rf(e,t){let n=t;switch(t.kind){case 307:{const t=ds(e.text,0,!1);return t===e.text.length?tc(0,0):tf(e,t)}case 260:case 208:case 263:case 231:case 264:case 267:case 266:case 306:case 262:case 218:case 174:case 177:case 178:case 265:case 172:case 171:case 274:n=t.name;break;case 219:return function(e,t){const n=ds(e.text,t.pos);if(t.body&&241===t.body.kind){const{line:r}=ns(e,t.body.pos),{line:i}=ns(e,t.body.end);if(r0?t.statements[0].pos:t.end);case 253:case 229:return tf(e,ds(e.text,t.pos));case 238:return tf(e,ds(e.text,t.expression.end));case 350:return tf(e,ds(e.text,t.tagName.pos));case 176:{const n=t,r=ds(e.text,n.pos),i=Fs(e.languageVersion,!0,e.languageVariant,e.text,void 0,r);let o=i.scan();for(;137!==o&&1!==o;)o=i.scan();return nc(r,i.getTokenEnd())}}if(void 0===n)return tf(e,t.pos);Tn.assert(!pF(n));const r=Ld(n),i=r||jN(t)?n.pos:ds(e.text,n.pos);return r?(Tn.assert(i===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),Tn.assert(i===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(Tn.assert(i>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),Tn.assert(i<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),nc(i,n.end)}function of(e){return 307===e.kind&&!af(e)}function af(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)}function sf(e){return 6===e.scriptKind}function cf(e){return!!(4096&fc(e))}function lf(e){return!(!(8&fc(e))||lc(e,e.parent))}function _f(e){return 6==(7&gc(e))}function uf(e){return 4==(7&gc(e))}function df(e){return 2==(7&gc(e))}function pf(e){const t=7&gc(e);return 2===t||4===t||6===t}function ff(e){return 1==(7&gc(e))}function mf(e){return 213===e.kind&&108===e.expression.kind}function gf(e){return 213===e.kind&&102===e.expression.kind}function hf(e){return PP(e)&&102===e.keywordToken&&"meta"===e.name.escapedText}function yf(e){return GD(e)&&KD(e.argument)&&ON(e.argument.literal)}function vf(e){return 244===e.kind&&11===e.expression.kind}function bf(e){return!!(2097152&ip(e))}function xf(e){return bf(e)&&nE(e)}function Sf(e){return QN(e.name)&&!e.initializer}function kf(e){return bf(e)&&LP(e)&&T(e.declarationList.declarations,Sf)}function Tf(e,t){return 12!==e.kind?Cs(t.text,e.pos):void 0}function Cf(e,t){return O(169===e.kind||168===e.kind||218===e.kind||219===e.kind||217===e.kind||260===e.kind||281===e.kind?ne(ws(t,e.pos),Cs(t,e.pos)):Cs(t,e.pos),n=>n.end<=e.end&&42===t.charCodeAt(n.pos+1)&&42===t.charCodeAt(n.pos+2)&&47!==t.charCodeAt(n.pos+3))}var wf=/^(\/\/\/\s*/,Nf=/^(\/\/\/\s*/,Df=/^(\/\/\/\s*/,Pf=/^(\/\/\/\s*/,Ef=/^\/\/\/\s*/,Ff=/^(\/\/\/\s*/;function Af(e){if(182<=e.kind&&e.kind<=205)return!0;switch(e.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return 222!==e.parent.kind;case 233:return If(e);case 168:return 200===e.parent.kind||195===e.parent.kind;case 80:(166===e.parent.kind&&e.parent.right===e||211===e.parent.kind&&e.parent.name===e)&&(e=e.parent),Tn.assert(80===e.kind||166===e.kind||211===e.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{const{parent:t}=e;if(186===t.kind)return!1;if(205===t.kind)return!t.isTypeOf;if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 233:return If(t);case 168:case 345:return e===t.constraint;case 172:case 171:case 169:case 260:case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:case 179:case 180:case 181:case 216:return e===t.type;case 213:case 214:case 215:return E(t.typeArguments,e)}}}return!1}function If(e){return MF(e.parent)||gF(e.parent)||WE(e.parent)&&!Tb(e)}function Of(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1}function jf(e,t){return function e(n){switch(n.kind){case 253:return t(n);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return KI(n,e)}}(e)}function Lf(e,t){return function e(n){switch(n.kind){case 229:t(n);const r=n.expression;return void(r&&e(r));case 266:case 264:case 267:case 265:return;default:if(f_(n)){if(n.name&&167===n.name.kind)return void e(n.name.expression)}else Af(n)||KI(n,e)}}(e)}function Mf(e){return e&&188===e.kind?e.elementType:e&&183===e.kind?Fe(e.typeArguments):void 0}function Rf(e){switch(e.kind){case 264:case 263:case 231:case 187:return e.members;case 210:return e.properties}}function Bf(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function Jf(e){return Bf(e)||k_(e)}function zf(e){return 261===e.parent.kind&&243===e.parent.parent.kind}function qf(e){return!!zm(e)&&(nP(e.parent)&&yP(e.parent.parent)&&2===dg(e.parent.parent)||Uf(e.parent))}function Uf(e){return!!zm(e)&&(yP(e)&&1===dg(e))}function Vf(e){return(eE(e)?df(e)&&QN(e.name)&&zf(e):yD(e)?Yv(e)&&Hv(e):hD(e)&&Yv(e))||Uf(e)}function Wf(e){switch(e.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function $f(e,t){for(;;){if(t&&t(e),256!==e.statement.kind)return e.statement;e=e.statement}}function Hf(e){return e&&241===e.kind&&f_(e.parent)}function Kf(e){return e&&174===e.kind&&210===e.parent.kind}function Gf(e){return!(174!==e.kind&&177!==e.kind&&178!==e.kind||210!==e.parent.kind&&231!==e.parent.kind)}function Xf(e){return e&&1===e.kind}function Qf(e){return e&&0===e.kind}function Yf(e,t,n,r){return h(null==e?void 0:e.properties,e=>{if(!HE(e))return;const i=zp(e.name);return t===i||r&&r===i?n(e):void 0})}function Zf(e,t,n){return Yf(e,t,e=>tP(e.initializer)?C(e.initializer.elements,e=>ON(e)&&e.text===n):void 0)}function em(e){if(e&&e.statements.length){return dt(e.statements[0].expression,nP)}}function tm(e,t,n){return nm(e,t,e=>tP(e.initializer)?C(e.initializer.elements,e=>ON(e)&&e.text===n):void 0)}function nm(e,t,n){return Yf(em(e),t,n)}function rm(e){return xc(e.parent,f_)}function im(e){return xc(e.parent,g_)}function om(e){return xc(e.parent,S_)}function am(e){return xc(e.parent,e=>S_(e)||f_(e)?"quit":xD(e))}function sm(e){return xc(e.parent,m_)}function cm(e){const t=xc(e.parent,e=>S_(e)?"quit":gD(e));return t&&S_(t.parent)?om(t.parent):om(t??e)}function lm(e,t,n){for(Tn.assert(307!==e.kind);;){if(!(e=e.parent))return Tn.fail();switch(e.kind){case 167:if(n&&S_(e.parent.parent))return e;e=e.parent.parent;break;case 170:169===e.parent.kind&&x_(e.parent.parent)?e=e.parent.parent:x_(e.parent)&&(e=e.parent);break;case 219:if(!t)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 307:return e}}}function _m(e){switch(e.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(e.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function um(e){QN(e)&&(rE(e.parent)||nE(e.parent))&&e.parent.name===e&&(e=e.parent);return QE(lm(e,!0,!1))}function dm(e){const t=lm(e,!1,!1);if(t)switch(t.kind){case 176:case 262:case 218:return t}}function pm(e,t){for(;;){if(!(e=e.parent))return;switch(e.kind){case 167:e=e.parent;break;case 262:case 218:case 219:if(!t)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return e;case 170:169===e.parent.kind&&x_(e.parent.parent)?e=e.parent.parent:x_(e.parent)&&(e=e.parent)}}}function fm(e){if(218===e.kind||219===e.kind){let t=e,n=e.parent;for(;217===n.kind;)t=n,n=n.parent;if(213===n.kind&&n.expression===t)return n}}function mm(e){return 108===e.kind||gm(e)}function gm(e){const t=e.kind;return(211===t||212===t)&&108===e.expression.kind}function hm(e){const t=e.kind;return(211===t||212===t)&&110===e.expression.kind}function ym(e){var t;return!!e&&eE(e)&&110===(null==(t=e.initializer)?void 0:t.kind)}function vm(e){return!!e&&(KE(e)||HE(e))&&yP(e.parent.parent)&&64===e.parent.parent.operatorToken.kind&&110===e.parent.parent.right.kind}function bm(e){switch(e.kind){case 183:return e.typeName;case 233:return Cb(e.expression)?e.expression:void 0;case 80:case 166:return e}}function xm(e){switch(e.kind){case 215:return e.tag;case 286:case 285:return e.tagName;case 226:return e.right;default:return e.expression}}function Sm(e,t,n,r){if(e&&Ic(t)&&YN(t.name))return!1;switch(t.kind){case 263:return!0;case 231:return!e;case 172:return void 0!==n&&(e?rE(n):S_(n)&&!Gv(t)&&!Xv(t));case 177:case 178:case 174:return void 0!==t.body&&void 0!==n&&(e?rE(n):S_(n));case 169:return!!e&&(void 0!==n&&void 0!==n.body&&(176===n.kind||174===n.kind||178===n.kind)&&Sv(n)!==t&&void 0!==r&&263===r.kind)}return!1}function km(e,t,n,r){return Zv(t)&&Sm(e,t,n,r)}function Tm(e,t,n,r){return km(e,t,n,r)||Cm(e,t,n)}function Cm(e,t,n){switch(t.kind){case 263:return ee(t.members,r=>Tm(e,r,t,n));case 231:return!e&&ee(t.members,r=>Tm(e,r,t,n));case 174:case 178:case 176:return ee(t.parameters,r=>km(e,r,t,n));default:return!1}}function wm(e,t){if(km(e,t))return!0;const n=vv(t);return!!n&&Cm(e,n,t)}function Nm(e,t,n){let r;if(k_(t)){const{firstAccessor:e,secondAccessor:i,setAccessor:o}=Dv(n.members,t),a=Zv(e)?e:i&&Zv(i)?i:void 0;if(!a||t!==a)return!1;r=null==o?void 0:o.parameters}else bD(t)&&(r=t.parameters);if(km(e,t,n))return!0;if(r)for(const i of r)if(!kv(i)&&km(e,i,t,n))return!0;return!1}function Dm(e){if(e.textSourceNode){switch(e.textSourceNode.kind){case 11:return Dm(e.textSourceNode);case 15:return""===e.text}return!1}return""===e.text}function Pm(e){const{parent:t}=e;return(286===t.kind||285===t.kind||287===t.kind)&&t.tagName===e}function Em(e){switch(e.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!WE(e.parent)&&!gF(e.parent);case 166:for(;166===e.parent.kind;)e=e.parent;return 186===e.parent.kind||Gu(e.parent)||eF(e.parent)||tF(e.parent)||Pm(e);case 311:for(;tF(e.parent);)e=e.parent;return 186===e.parent.kind||Gu(e.parent)||eF(e.parent)||tF(e.parent)||Pm(e);case 81:return yP(e.parent)&&e.parent.left===e&&103===e.parent.operatorToken.kind;case 80:if(186===e.parent.kind||Gu(e.parent)||eF(e.parent)||tF(e.parent)||Pm(e))return!0;case 9:case 10:case 11:case 15:case 110:return Fm(e);default:return!1}}function Fm(e){const{parent:t}=e;switch(t.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return t.initializer===e;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return t.expression===e;case 248:const n=t;return n.initializer===e&&261!==n.initializer.kind||n.condition===e||n.incrementor===e;case 249:case 250:const r=t;return r.initializer===e&&261!==r.initializer.kind||r.expression===e;case 216:case 234:case 239:case 167:case 238:return e===t.expression;case 170:case 294:case 293:case 305:return!0;case 233:return t.expression===e&&!Af(t);case 304:return t.objectAssignmentInitializer===e;default:return Em(t)}}function Am(e){for(;166===e.kind||80===e.kind;)e=e.parent;return 186===e.kind}function Im(e){return bE(e)&&!!e.parent.moduleSpecifier}function Om(e){return 271===e.kind&&283===e.moduleReference.kind}function jm(e){return Tn.assert(Om(e)),e.moduleReference.expression}function Lm(e){return Km(e)&&Wx(e.initializer).arguments[0]}function Mm(e){return 271===e.kind&&283!==e.moduleReference.kind}function Rm(e){return 307===(null==e?void 0:e.kind)}function Bm(e){return zm(e)}function Jm(e){return!zm(e)}function zm(e){return!!e&&!!(524288&e.flags)}function qm(e){return!!e&&!!(134217728&e.flags)}function Um(e){return!sf(e)}function Vm(e){return!!e&&!!(16777216&e.flags)}function Wm(e){return PD(e)&&QN(e.typeName)&&"Object"===e.typeName.escapedText&&e.typeArguments&&2===e.typeArguments.length&&(154===e.typeArguments[0].kind||150===e.typeArguments[0].kind)}function $m(e,t){if(213!==e.kind)return!1;const{expression:n,arguments:r}=e;if(80!==n.kind||"require"!==n.escapedText)return!1;if(1!==r.length)return!1;const i=r[0];return!t||Ku(i)}function Hm(e){return Xm(e,!1)}function Km(e){return Xm(e,!0)}function Gm(e){return eP(e)&&Km(e.parent.parent)}function Xm(e,t){return eE(e)&&!!e.initializer&&$m(t?Wx(e.initializer):e.initializer,!0)}function Qm(e){return LP(e)&&e.declarationList.declarations.length>0&&T(e.declarationList.declarations,e=>Hm(e))}function Ym(e){return 39===e||34===e}function Zm(e,t){return 34===Yd(t,e).charCodeAt(0)}function eg(e){return yP(e)||qx(e)||QN(e)||oP(e)}function tg(e){return zm(e)&&e.initializer&&yP(e.initializer)&&(57===e.initializer.operatorToken.kind||61===e.initializer.operatorToken.kind)&&e.name&&Cb(e.name)&&sg(e.name,e.initializer.left)?e.initializer.right:e.initializer}function ng(e){const t=tg(e);return t&&ig(t,Eb(e.name))}function rg(e){if(e&&e.parent&&yP(e.parent)&&64===e.parent.operatorToken.kind){const t=Eb(e.parent.left);return ig(e.parent.right,t)||function(e,t,n){const r=yP(t)&&(57===t.operatorToken.kind||61===t.operatorToken.kind)&&ig(t.right,n);if(r&&sg(e,t.left))return r}(e.parent.left,e.parent.right,t)}if(e&&oP(e)&&pg(e)){const t=function(e,t){return h(e.properties,e=>HE(e)&&QN(e.name)&&"value"===e.name.escapedText&&e.initializer&&ig(e.initializer,t))}(e.arguments[2],"prototype"===e.arguments[1].text);if(t)return t}}function ig(e,t){if(oP(e)){const t=mh(e.expression);return 218===t.kind||219===t.kind?e:void 0}return 218===e.kind||231===e.kind||219===e.kind||nP(e)&&(0===e.properties.length||t)?e:void 0}function og(e){const t=eE(e.parent)?e.parent.name:yP(e.parent)&&64===e.parent.operatorToken.kind?e.parent.left:void 0;return t&&ig(e.right,Eb(t))&&Cb(t)&&sg(t,e.left)}function ag(e){if(yP(e.parent)){const t=57!==e.parent.operatorToken.kind&&61!==e.parent.operatorToken.kind||!yP(e.parent.parent)?e.parent:e.parent.parent;if(64===t.operatorToken.kind&&QN(t.left))return t.left}else if(eE(e.parent))return e.parent.name}function sg(e,t){return Zh(e)&&Zh(t)?ey(e)===ey(t):kl(e)&&fg(t)&&(110===t.expression.kind||QN(t.expression)&&("window"===t.expression.escapedText||"self"===t.expression.escapedText||"global"===t.expression.escapedText))?sg(e,vg(t)):!(!fg(e)||!fg(t))&&(xg(e)===xg(t)&&sg(e.expression,t.expression))}function cg(e){for(;xb(e,!0);)e=e.right;return e}function lg(e){return QN(e)&&"exports"===e.escapedText}function _g(e){return QN(e)&&"module"===e.escapedText}function ug(e){return(rP(e)||mg(e))&&_g(e.expression)&&"exports"===xg(e)}function dg(e){const t=function(e){if(oP(e)){if(!pg(e))return 0;const t=e.arguments[0];return lg(t)||ug(t)?8:gg(t)&&"prototype"===xg(t)?9:7}if(64!==e.operatorToken.kind||!qx(e.left)||(t=cg(e),fP(t)&&AN(t.expression)&&"0"===t.expression.text))return 0;var t;if(yg(e.left.expression,!0)&&"prototype"===xg(e.left)&&nP(kg(e)))return 6;return Sg(e.left)}(e);return 5===t||zm(e)?t:0}function pg(e){return 3===g(e.arguments)&&rP(e.expression)&&QN(e.expression.expression)&&"Object"===wc(e.expression.expression)&&"defineProperty"===wc(e.expression.name)&&Kh(e.arguments[1])&&yg(e.arguments[0],!0)}function fg(e){return rP(e)||mg(e)}function mg(e){return iP(e)&&Kh(e.argumentExpression)}function gg(e,t){return rP(e)&&(!t&&110===e.expression.kind||QN(e.name)&&yg(e.expression,!0))||hg(e,t)}function hg(e,t){return mg(e)&&(!t&&110===e.expression.kind||Cb(e.expression)||gg(e.expression,!0))}function yg(e,t){return Cb(e)||gg(e,t)}function vg(e){return rP(e)?e.name:e.argumentExpression}function bg(e){if(rP(e))return e.name;const t=mh(e.argumentExpression);return AN(t)||Ku(t)?t:e}function xg(e){const t=bg(e);if(t){if(QN(t))return t.escapedText;if(Ku(t)||AN(t))return Tc(t.text)}}function Sg(e){if(110===e.expression.kind)return 4;if(ug(e))return 2;if(yg(e.expression,!0)){if(Eb(e.expression))return 3;let t=e;for(;!QN(t.expression);)t=t.expression;const n=t.expression;if(("exports"===n.escapedText||"module"===n.escapedText&&"exports"===xg(t))&&gg(e))return 1;if(yg(e,!0)||iP(e)&&Qh(e))return 5}return 0}function kg(e){for(;yP(e.right);)e=e.right;return e.right}function Tg(e){return yP(e)&&3===dg(e)}function Cg(e){return zm(e)&&e.parent&&244===e.parent.kind&&(!iP(e)||mg(e))&&!!ul(e.parent)}function wg(e,t){const{valueDeclaration:n}=e;(!n||(!(33554432&t.flags)||zm(t)||33554432&n.flags)&&eg(n)&&!eg(t)||n.kind!==t.kind&&gp(n))&&(e.valueDeclaration=t)}function Ng(e){if(!e||!e.valueDeclaration)return!1;const t=e.valueDeclaration;return 262===t.kind||eE(t)&&t.initializer&&f_(t.initializer)}function Dg(e){var t,n;switch(e.kind){case 260:case 208:return null==(t=xc(e.initializer,e=>$m(e,!0)))?void 0:t.arguments[0];case 272:case 278:case 351:return dt(e.moduleSpecifier,Ku);case 271:return dt(null==(n=dt(e.moduleReference,EE))?void 0:n.expression,Ku);case 273:case 280:return dt(e.parent.moduleSpecifier,Ku);case 274:case 281:return dt(e.parent.parent.moduleSpecifier,Ku);case 276:return dt(e.parent.parent.parent.moduleSpecifier,Ku);case 205:return yf(e)?e.argument.literal:void 0;default:Tn.assertNever(e)}}function Pg(e){return Eg(e)||Tn.failBadSyntaxKind(e.parent)}function Eg(e){switch(e.parent.kind){case 272:case 278:case 351:return e.parent;case 283:return e.parent.parent;case 213:return gf(e.parent)||$m(e.parent,!1)?e.parent:void 0;case 201:return Tn.assert(ON(e)),dt(e.parent.parent,GD);default:return}}function Fg(e){switch(e.kind){case 272:case 278:case 351:return e.moduleSpecifier;case 271:return 283===e.moduleReference.kind?e.moduleReference.expression:void 0;case 205:return yf(e)?e.argument.literal:void 0;case 213:return e.arguments[0];case 267:return 11===e.name.kind?e.name:void 0;default:return Tn.assertNever(e)}}function Ag(e){switch(e.kind){case 272:return e.importClause&&dt(e.importClause.namedBindings,vE);case 271:return e;case 278:return e.exportClause&&dt(e.exportClause,bE);default:return Tn.assertNever(e)}}function Ig(e){return!(272!==e.kind&&351!==e.kind||!e.importClause||!e.importClause.name)}function Og(e,t){if(e.name){const n=t(e);if(n)return n}if(e.namedBindings){const n=vE(e.namedBindings)?t(e.namedBindings):h(e.namedBindings.elements,t);if(n)return n}}function jg(e){if(e)switch(e.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return void 0!==e.questionToken}return!1}function Lg(e){const t=_F(e)?Ce(e.parameters):void 0,n=dt(t&&t.name,QN);return!!n&&"new"===n.escapedText}function Mg(e){return 346===e.kind||338===e.kind||340===e.kind}function Rg(e){return Mg(e)||oE(e)}function Bg(e){return RP(e)&&yP(e.expression)&&0!==dg(e.expression)&&yP(e.expression.right)&&(57===e.expression.right.operatorToken.kind||61===e.expression.right.operatorToken.kind)?e.expression.right.right:void 0}function Jg(e){switch(e.kind){case 243:const t=zg(e);return t&&t.initializer;case 172:case 303:return e.initializer}}function zg(e){return LP(e)?Ce(e.declarationList.declarations):void 0}function qg(e){return sE(e)&&e.body&&267===e.body.kind?e.body:void 0}function Ug(e){if(e.kind>=243&&e.kind<=259)return!0;switch(e.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function Vg(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 317:case 323:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function Wg(e,t){let n;Bf(e)&&qu(e)&&Ju(e.initializer)&&(n=ge(n,$g(e,e.initializer.jsDoc)));let r=e;for(;r&&r.parent;){if(Ju(r)&&(n=ge(n,$g(e,r.jsDoc))),169===r.kind){n=ge(n,(t?zc:Jc)(r));break}if(168===r.kind){n=ge(n,(t?Vc:Uc)(r));break}r=Hg(r)}return n||p}function $g(e,t){const n=Ee(t);return z(t,t=>{if(t===n){const n=O(t.tags,t=>function(e,t){return!((AF(t)||RF(t))&&t.parent&&pF(t.parent)&&lP(t.parent.parent)&&t.parent.parent!==e)}(e,t));return t.tags===n?[t]:n}return O(t.tags,CF)})}function Hg(e){const t=e.parent;return 303===t.kind||277===t.kind||172===t.kind||244===t.kind&&211===e.kind||253===t.kind||qg(t)||xb(e)?t:t.parent&&(zg(t.parent)===e||xb(t))?t.parent:t.parent&&t.parent.parent&&(zg(t.parent.parent)||Jg(t.parent.parent)===e||Bg(t.parent.parent))?t.parent.parent:void 0}function Kg(e){if(e.symbol)return e.symbol;if(!QN(e.name))return;const t=e.name.escapedText,n=Qg(e);if(!n)return;const r=C(n.parameters,e=>80===e.name.kind&&e.name.escapedText===t);return r&&r.symbol}function Gg(e){if(pF(e.parent)&&e.parent.tags){const t=C(e.parent.tags,Mg);if(t)return t}return Qg(e)}function Xg(e){return yl(e,CF)}function Qg(e){const t=Yg(e);if(t)return hD(t)&&t.type&&f_(t.type)?t.type:f_(t)?t:void 0}function Yg(e){const t=Zg(e);if(t)return Bg(t)||function(e){return RP(e)&&yP(e.expression)&&64===e.expression.operatorToken.kind?cg(e.expression):void 0}(t)||Jg(t)||zg(t)||qg(t)||t}function Zg(e){const t=eh(e);if(!t)return;const n=t.parent;return n&&n.jsDoc&&t===Pe(n.jsDoc)?n:void 0}function eh(e){return xc(e.parent,pF)}function th(e){const t=e.name.escapedText,{typeParameters:n}=e.parent.parent.parent;return n&&C(n,e=>e.name.escapedText===t)}function nh(e){return!!e.typeArguments}var rh=(e=>(e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound",e))(rh||{});function ih(e){let t=e.parent;for(;;){switch(t.kind){case 226:const n=t;return yb(n.operatorToken.kind)&&n.left===e?n:void 0;case 224:case 225:const r=t,i=r.operator;return 46===i||47===i?r:void 0;case 249:case 250:const o=t;return o.initializer===e?o:void 0;case 217:case 209:case 230:case 235:e=t;break;case 305:e=t.parent;break;case 304:if(t.name!==e)return;e=t.parent;break;case 303:if(t.name===e)return;e=t.parent;break;default:return}t=e.parent}}function oh(e){const t=ih(e);if(!t)return 0;switch(t.kind){case 226:const e=t.operatorToken.kind;return 64===e||fb(e)?1:2;case 224:case 225:return 2;case 249:case 250:return 1}}function ah(e){return!!ih(e)}function sh(e){const t=ih(e);return!!t&&xb(t,!0)&&function(e){const t=mh(e.right);return 226===t.kind&&$A(t.operatorToken.kind)}(t)}function ch(e){switch(e.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function lh(e){return _P(e)||uP(e)||w_(e)||nE(e)||SD(e)}function _h(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function uh(e){return _h(e,196)}function dh(e){return _h(e,217)}function ph(e){let t;for(;e&&196===e.kind;)t=e,e=e.parent;return[t,e]}function fh(e){for(;UD(e);)e=e.type;return e}function mh(e,t){return hA(e,t?17:1)}function gh(e){return(211===e.kind||212===e.kind)&&((e=dh(e.parent))&&220===e.kind)}function hh(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function yh(e){return!QE(e)&&!O_(e)&&ku(e.parent)&&e.parent.name===e}function vh(e){const t=e.parent;switch(e.kind){case 11:case 15:case 9:if(pD(t))return t.parent;case 80:if(ku(t))return t.name===e?t:void 0;if(dD(t)){const e=t.parent;return PF(e)&&e.name===t?e:void 0}{const n=t.parent;return yP(n)&&0!==dg(n)&&(n.left.symbol||n.symbol)&&jc(n)===e?n:void 0}case 81:return ku(t)&&t.name===e?t:void 0;default:return}}function bh(e){return Kh(e)&&167===e.parent.kind&&ku(e.parent.parent)}function xh(e){const t=e.parent;switch(t.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return t.name===e;case 166:return t.right===e;case 208:case 276:return t.propertyName===e;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function Sh(e){return!!(271===e.kind||270===e.kind||273===e.kind&&e.name||274===e.kind||280===e.kind||276===e.kind||281===e.kind||277===e.kind&&Ch(e))||zm(e)&&(yP(e)&&2===dg(e)&&Ch(e)||rP(e)&&yP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind&&Th(e.parent.right))}function kh(e){switch(e.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return e.parent;case 166:do{e=e.parent}while(166===e.parent.kind);return kh(e)}}function Th(e){return Cb(e)||kP(e)}function Ch(e){return Th(wh(e))}function wh(e){return kE(e)?e.expression:e.right}function Nh(e){return 304===e.kind?e.name:303===e.kind?e.initializer:e.parent.right}function Dh(e){const t=Ph(e);if(t&&zm(e)){const t=$c(e);if(t)return t.class}return t}function Ph(e){const t=Ih(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function Eh(e){if(zm(e))return Hc(e).map(e=>e.class);{const t=Ih(e.heritageClauses,119);return null==t?void 0:t.types}}function Fh(e){return iE(e)?Ah(e)||p:S_(e)&&ne(hn(Dh(e)),Eh(e))||p}function Ah(e){const t=Ih(e.heritageClauses,96);return t?t.types:void 0}function Ih(e,t){if(e)for(const n of e)if(n.token===t)return n}function Oh(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function jh(e){return 83<=e&&e<=165}function Lh(e){return 19<=e&&e<=79}function Mh(e){return jh(e)||Lh(e)}function Rh(e){return 128<=e&&e<=165}function Bh(e){return jh(e)&&!Rh(e)}function Jh(e){return 119<=e&&e<=127}function zh(e){const t=Wa(e);return void 0!==t&&Bh(t)}function qh(e){const t=Wa(e);return void 0!==t&&jh(t)}function Uh(e){const t=Nc(e);return!!t&&!Rh(t)}function Vh(e){return 2<=e&&e<=7}var Wh=(e=>(e[e.Normal=0]="Normal",e[e.Generator=1]="Generator",e[e.Async=2]="Async",e[e.Invalid=4]="Invalid",e[e.AsyncGenerator=3]="AsyncGenerator",e))(Wh||{});function $h(e){if(!e)return 4;let t=0;switch(e.kind){case 262:case 218:case 174:e.asteriskToken&&(t|=1);case 219:Wv(e,1024)&&(t|=2)}return e.body||(t|=4),t}function Hh(e){switch(e.kind){case 262:case 218:case 219:case 174:return void 0!==e.body&&void 0===e.asteriskToken&&Wv(e,1024)}return!1}function Kh(e){return Ku(e)||AN(e)}function Gh(e){return gP(e)&&(40===e.operator||41===e.operator)&&AN(e.operand)}function Xh(e){const t=jc(e);return!!t&&Qh(t)}function Qh(e){if(167!==e.kind&&212!==e.kind)return!1;const t=iP(e)?mh(e.argumentExpression):e.expression;return!Kh(t)&&!Gh(t)}function Yh(e){switch(e.kind){case 80:case 81:return e.escapedText;case 11:case 15:case 9:return Tc(e.text);case 167:const t=e.expression;return Kh(t)?Tc(t.text):Gh(t)?41===t.operator?Va(t.operator)+t.operand.text:t.operand.text:void 0;case 295:return bC(e);default:return Tn.assertNever(e)}}function Zh(e){switch(e.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function ey(e){return kl(e)?wc(e):qE(e)?xC(e):e.text}function ty(e){return kl(e)?e.escapedText:qE(e)?bC(e):Tc(e.text)}function ny(e){return`__@${GB(e)}@${e.escapedName}`}function ry(e,t){return`__#${GB(e)}@${t}`}function iy(e){return ln(e.escapedName,"__@")}function oy(e){return ln(e.escapedName,"__#")}function ay(e){return 80===e.kind&&"Symbol"===e.escapedText}function sy(e){return QN(e)?"__proto__"===wc(e):ON(e)&&"__proto__"===e.text}function cy(e,t){switch((e=hA(e)).kind){case 231:if(Bz(e))return!1;break;case 218:if(e.name)return!1;break;case 219:break;default:return!1}return"function"!=typeof t||t(e)}function ly(e){switch(e.kind){case 303:return!sy(e.name);case 304:return!!e.objectAssignmentInitializer;case 260:return QN(e.name)&&!!e.initializer;case 169:case 208:return QN(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 172:return!!e.initializer;case 226:switch(e.operatorToken.kind){case 64:case 77:case 76:case 78:return QN(e.left)}break;case 277:return!0}return!1}function _y(e,t){if(!ly(e))return!1;switch(e.kind){case 303:case 260:case 169:case 208:case 172:return cy(e.initializer,t);case 304:return cy(e.objectAssignmentInitializer,t);case 226:return cy(e.right,t);case 277:return cy(e.expression,t)}}function uy(e){return"push"===e.escapedText||"unshift"===e.escapedText}function dy(e){return 169===py(e).kind}function py(e){for(;208===e.kind;)e=e.parent.parent;return e}function fy(e){const t=e.kind;return 176===t||218===t||262===t||219===t||174===t||177===t||178===t||267===t||307===t}function my(e){return dT(e.pos)||dT(e.end)}function gy(e){return kc(e,QE)||e}var hy=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(hy||{});function yy(e){const t=xy(e),n=214===e.kind&&void 0!==e.arguments;return vy(e.kind,t,n)}function vy(e,t,n){switch(e){case 214:return n?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(t){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function by(e){const t=xy(e),n=214===e.kind&&void 0!==e.arguments;return ky(e.kind,t,n)}function xy(e){return 226===e.kind?e.operatorToken.kind:224===e.kind||225===e.kind?e.operator:e.kind}var Sy=(e=>(e[e.Comma=0]="Comma",e[e.Spread=1]="Spread",e[e.Yield=2]="Yield",e[e.Assignment=3]="Assignment",e[e.Conditional=4]="Conditional",e[e.Coalesce=4]="Coalesce",e[e.LogicalOR=5]="LogicalOR",e[e.LogicalAND=6]="LogicalAND",e[e.BitwiseOR=7]="BitwiseOR",e[e.BitwiseXOR=8]="BitwiseXOR",e[e.BitwiseAND=9]="BitwiseAND",e[e.Equality=10]="Equality",e[e.Relational=11]="Relational",e[e.Shift=12]="Shift",e[e.Additive=13]="Additive",e[e.Multiplicative=14]="Multiplicative",e[e.Exponentiation=15]="Exponentiation",e[e.Unary=16]="Unary",e[e.Update=17]="Update",e[e.LeftHandSide=18]="LeftHandSide",e[e.Member=19]="Member",e[e.Primary=20]="Primary",e[e.Highest=20]="Highest",e[e.Lowest=0]="Lowest",e[e.Invalid=-1]="Invalid",e))(Sy||{});function ky(e,t,n){switch(e){case 355:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(t){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return Ty(t)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return n?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function Ty(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function Cy(e){return O(e,e=>{switch(e.kind){case 294:return!!e.expression;case 12:return!e.containsOnlyTriviaWhiteSpaces;default:return!0}})}function wy(){let e=[];const t=[],n=new Map;let r=!1;return{add:function(i){let o;i.file?(o=n.get(i.file.fileName),o||(o=[],n.set(i.file.fileName,o),se(t,i.file.fileName,Rt))):(r&&(r=!1,e=e.slice()),o=e);se(o,i,SS,CS)},lookup:function(t){let r;r=t.file?n.get(t.file.fileName):e;if(!r)return;const i=je(r,t,yt,SS);if(i>=0)return r[i];if(~i>0&&CS(t,r[~i-1]))return r[~i-1];return},getGlobalDiagnostics:function(){return r=!0,e},getDiagnostics:function(r){if(r)return n.get(r)||[];const i=q(t,e=>n.get(e));if(!e.length)return i;return i.unshift(...e),i}}}var Ny=/\$\{/g;function Dy(e){return e.replace(Ny,"\\${")}function Py(e){return!!(2048&(e.templateFlags||0))}function Ey(e){return e&&!!(MN(e)?Py(e):Py(e.head)||ee(e.templateSpans,e=>Py(e.literal)))}var Fy=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,Ay=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,Iy=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,Oy=new Map(Object.entries({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085","\r\n":"\\r\\n"}));function jy(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function Ly(e,t,n){if(0===e.charCodeAt(0)){const r=n.charCodeAt(t+e.length);return r>=48&&r<=57?"\\x00":"\\0"}return Oy.get(e)||jy(e.charCodeAt(0))}function My(e,t){const n=96===t?Iy:39===t?Ay:Fy;return e.replace(n,Ly)}var Ry=/[^\u0000-\u007F]/g;function By(e,t){return e=My(e,t),Ry.test(e)?e.replace(Ry,e=>jy(e.charCodeAt(0))):e}var Jy=/["\u0000-\u001f\u2028\u2029\u0085]/g,zy=/['\u0000-\u001f\u2028\u2029\u0085]/g,qy=new Map(Object.entries({'"':""","'":"'"}));function Uy(e){return 0===e.charCodeAt(0)?"�":qy.get(e)||"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function Vy(e,t){const n=39===t?zy:Jy;return e.replace(n,Uy)}function Wy(e){const t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&(39===(n=e.charCodeAt(0))||34===n||96===n)?e.substring(1,t-1):e;var n}function $y(e){const t=e.charCodeAt(0);return t>=97&&t<=122||e.includes("-")}var Hy=[""," "];function Ky(e){const t=Hy[1];for(let n=Hy.length;n<=e;n++)Hy.push(Hy[n-1]+t);return Hy[e]}function Gy(){return Hy[1].length}function Xy(e){var t,n,r,i,o,a=!1;function s(e){const n=Ga(e);n.length>1?(i=i+n.length-1,o=t.length-e.length+Ee(n),r=o-t.length===0):r=!1}function c(e){e&&e.length&&(r&&(e=Ky(n)+e,r=!1),t+=e,s(e))}function l(e){e&&(a=!1),c(e)}function _(){t="",n=0,r=!0,i=0,o=0,a=!1}return _(),{write:l,rawWrite:function(e){void 0!==e&&(t+=e,s(e),a=!1)},writeLiteral:function(e){e&&e.length&&l(e)},writeLine:function(n){r&&!n||(i++,o=(t+=e).length,r=!0,a=!1)},increaseIndent:()=>{n++},decreaseIndent:()=>{n--},getIndent:()=>n,getTextPos:()=>t.length,getLine:()=>i,getColumn:()=>r?n*Gy():t.length-o,getText:()=>t,isAtStartOfLine:()=>r,hasTrailingComment:()=>a,hasTrailingWhitespace:()=>!!t.length&&rs(t.charCodeAt(t.length-1)),clear:_,writeKeyword:l,writeOperator:l,writeParameter:l,writeProperty:l,writePunctuation:l,writeSpace:l,writeStringLiteral:l,writeSymbol:(e,t)=>l(e),writeTrailingSemicolon:l,writeComment:function(e){e&&(a=!0),c(e)}}}function Qy(e){let t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return{...e,writeTrailingSemicolon(){t=!0},writeLiteral(t){n(),e.writeLiteral(t)},writeStringLiteral(t){n(),e.writeStringLiteral(t)},writeSymbol(t,r){n(),e.writeSymbol(t,r)},writePunctuation(t){n(),e.writePunctuation(t)},writeKeyword(t){n(),e.writeKeyword(t)},writeOperator(t){n(),e.writeOperator(t)},writeParameter(t){n(),e.writeParameter(t)},writeSpace(t){n(),e.writeSpace(t)},writeProperty(t){n(),e.writeProperty(t)},writeComment(t){n(),e.writeComment(t)},writeLine(){n(),e.writeLine()},increaseIndent(){n(),e.increaseIndent()},decreaseIndent(){n(),e.decreaseIndent()}}}function Yy(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function Zy(e){return on(Yy(e))}function ev(e,t,n){return t.moduleName||rv(e,t.fileName,n&&n.fileName)}function tv(e,t){return e.getCanonicalFileName(ta(t,e.getCurrentDirectory()))}function nv(e,t,n){const r=t.getExternalModuleFileFromDeclaration(n);if(!r||r.isDeclarationFile)return;const i=Fg(n);return!i||!Ku(i)||jo(i.text)||tv(e,r.path).includes(tv(e,aa(e.getCommonSourceDirectory())))?ev(e,r):void 0}function rv(e,t,n){const r=t=>e.getCanonicalFileName(t),i=ia(n?Vo(n):e.getCommonSourceDirectory(),e.getCurrentDirectory(),r),o=aT(xa(i,ta(t,e.getCurrentDirectory()),i,r,!1));return n?sa(o):o}function iv(e,t,n){const r=t.getCompilerOptions();let i;return i=r.outDir?aT(dv(e,t,r.outDir)):aT(e),i+n}function ov(e,t){return av(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),e=>t.getCanonicalFileName(e))}function av(e,t,n,r,i){const o=t.declarationDir||t.outDir,a=o?pv(e,o,n,r,i):e,s=sv(a);return aT(a)+s}function sv(e){return Bo(e,[".mjs",".mts"])?".d.mts":Bo(e,[".cjs",".cts"])?".d.cts":Bo(e,[".json"])?".d.json.ts":".d.ts"}function cv(e){return Bo(e,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:Bo(e,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:Bo(e,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function lv(e,t){var n;if(e.paths)return e.baseUrl??Tn.checkDefined(e.pathsBasePath||(null==(n=t.getCurrentDirectory)?void 0:n.call(t)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function _v(e,t,n){const r=e.getCompilerOptions();if(r.outFile){const t=jS(r),i=r.emitDeclarationOnly||2===t||4===t;return O(e.getSourceFiles(),t=>(i||!tO(t))&&uv(t,e,n))}return O(void 0===t?e.getSourceFiles():[t],t=>uv(t,e,n))}function uv(e,t,n){const r=t.getCompilerOptions();if(r.noEmitForJsFiles&&Bm(e))return!1;if(e.isDeclarationFile)return!1;if(t.isSourceFileFromExternalLibrary(e))return!1;if(n)return!0;if(t.isSourceOfProjectReferenceRedirect(e.fileName))return!1;if(!sf(e))return!0;if(t.getResolvedProjectReferenceToRedirect(e.fileName))return!1;if(r.outFile)return!0;if(!r.outDir)return!1;if(r.rootDir||r.composite&&r.configFilePath){const n=ta(aU(r,()=>[],t.getCurrentDirectory(),t.getCanonicalFileName),t.getCurrentDirectory()),i=pv(e.fileName,r.outDir,t.getCurrentDirectory(),n,t.getCanonicalFileName);if(0===fa(e.fileName,i,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames()))return!1}return!0}function dv(e,t,n){return pv(e,n,t.getCurrentDirectory(),t.getCommonSourceDirectory(),e=>t.getCanonicalFileName(e))}function pv(e,t,n,r,i){let o=ta(e,n);return o=0===i(o).indexOf(i(r))?o.substring(r.length):o,Yo(t,o)}function fv(e,t,n,r,i,o,a){e.writeFile(n,r,i,e=>{t.add(gS(Ca.Could_not_write_file_0_Colon_1,n,e))},o,a)}function mv(e,t,n){if(e.length>Uo(e)&&!n(e)){mv(Vo(e),t,n),t(e)}}function gv(e,t,n,r,i,o){try{r(e,t,n)}catch{mv(Vo(na(e)),i,o),r(e,t,n)}}function hv(e,t){return es(Ya(e),t)}function yv(e,t){return es(e,t)}function vv(e){return C(e.members,e=>SD(e)&&Md(e.body))}function bv(e){if(e&&e.parameters.length>0){const t=2===e.parameters.length&&kv(e.parameters[0]);return e.parameters[t?1:0]}}function xv(e){const t=bv(e);return t&&t.type}function Sv(e){if(e.parameters.length&&!mF(e)){const t=e.parameters[0];if(kv(t))return t}}function kv(e){return Tv(e.name)}function Tv(e){return!!e&&80===e.kind&&Nv(e)}function Cv(e){return!!xc(e,e=>186===e.kind||80!==e.kind&&166!==e.kind&&"quit")}function wv(e){if(!Tv(e))return!1;for(;dD(e.parent)&&e.parent.left===e;)e=e.parent;return 186===e.parent.kind}function Nv(e){return"this"===e.escapedText}function Dv(e,t){let n,r,i,o;return Xh(t)?(n=t,177===t.kind?i=t:178===t.kind?o=t:Tn.fail("Accessor has wrong kind")):h(e,e=>{if(k_(e)&&$v(e)===$v(t)){Yh(e.name)===Yh(t.name)&&(n?r||(r=e):n=e,177!==e.kind||i||(i=e),178!==e.kind||o||(o=e))}}),{firstAccessor:n,secondAccessor:r,getAccessor:i,setAccessor:o}}function Pv(e){if(!zm(e)&&nE(e))return;if(oE(e))return;const t=e.type;return t||!zm(e)?t:Rl(e)?e.typeExpression&&e.typeExpression.type:dl(e)}function Ev(e){return e.type}function Fv(e){return mF(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:e.type||(zm(e)?pl(e):void 0)}function Av(e){return z(ml(e),e=>function(e){return IF(e)&&!(320===e.parent.kind&&(e.parent.tags.some(Mg)||e.parent.tags.some(CF)))}(e)?e.typeParameters:void 0)}function Iv(e){const t=bv(e);return t&&Pv(t)}function Ov(e,t,n,r){jv(e,t,n.pos,r)}function jv(e,t,n,r){r&&r.length&&n!==r[0].pos&&yv(e,n)!==yv(e,r[0].pos)&&t.writeLine()}function Lv(e,t,n,r){n!==r&&yv(e,n)!==yv(e,r)&&t.writeLine()}function Mv(e,t,n,r,i,o,a,s){if(r&&r.length>0){i&&n.writeSpace(" ");let c=!1;for(const i of r)c&&(n.writeSpace(" "),c=!1),s(e,t,n,i.pos,i.end,a),i.hasTrailingNewLine?n.writeLine():c=!0;c&&o&&n.writeSpace(" ")}}function Rv(e,t,n,r,i,o,a){let s,c;if(a?0===i.pos&&(s=O(Cs(e,i.pos),function(t){return Kd(e,t.pos)})):s=Cs(e,i.pos),s){const a=[];let l;for(const e of s){if(l){const n=yv(t,l.end);if(yv(t,e.pos)>=n+2)break}a.push(e),l=e}if(a.length){const l=yv(t,Ee(a).end);yv(t,ds(e,i.pos))>=l+2&&(Ov(t,n,i,s),Mv(e,t,n,a,!1,!0,o,r),c={nodePos:i.pos,detachedCommentEndPos:Ee(a).end})}}return c}function Bv(e,t,n,r,i,o){if(42===e.charCodeAt(r+1)){const a=Za(t,r),s=t.length;let c;for(let l=r,_=a.line;l0){let e=i%Gy();const t=Ky((i-e)/Gy());for(n.rawWrite(t);e;)n.rawWrite(" "),e--}else n.rawWrite("")}Jv(e,i,n,o,l,u),l=u}}else n.writeComment(e.substring(r,i))}function Jv(e,t,n,r,i,o){const a=Math.min(t,o-1),s=e.substring(i,a).trim();s?(n.writeComment(s),a!==t&&n.writeLine()):n.rawWrite(r)}function zv(e,t,n){let r=0;for(;t=0&&e.kind<=165?0:(536870912&e.modifierFlagsCache||(e.modifierFlagsCache=536870912|lb(e)),n||t&&zm(e)?(268435456&e.modifierFlagsCache||!e.parent||(e.modifierFlagsCache|=268435456|ab(e)),sb(e.modifierFlagsCache)):65535&e.modifierFlagsCache)}function rb(e){return nb(e,!0)}function ib(e){return nb(e,!0,!0)}function ob(e){return nb(e,!1)}function ab(e){let t=0;return e.parent&&!mD(e)&&(zm(e)&&(Xc(e)&&(t|=8388608),Yc(e)&&(t|=16777216),el(e)&&(t|=33554432),nl(e)&&(t|=67108864),rl(e)&&(t|=134217728)),ol(e)&&(t|=65536)),t}function sb(e){return 131071&e|(260046848&e)>>>23}function cb(e){return lb(e)|function(e){return sb(ab(e))}(e)}function lb(e){let t=bI(e)?_b(e.modifiers):0;return(8&e.flags||80===e.kind&&4096&e.flags)&&(t|=32),t}function _b(e){let t=0;if(e)for(const n of e)t|=ub(n.kind);return t}function ub(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function db(e){return 57===e||56===e}function pb(e){return db(e)||54===e}function fb(e){return 76===e||77===e||78===e}function mb(e){return yP(e)&&fb(e.operatorToken.kind)}function gb(e){return db(e)||61===e}function hb(e){return yP(e)&&gb(e.operatorToken.kind)}function yb(e){return e>=64&&e<=79}function vb(e){const t=bb(e);return t&&!t.isImplements?t.class:void 0}function bb(e){if(CP(e)){if(WE(e.parent)&&S_(e.parent.parent))return{class:e.parent.parent,isImplements:119===e.parent.token};if(gF(e.parent)){const t=Yg(e.parent);if(t&&S_(t))return{class:t,isImplements:!1}}}}function xb(e,t){return yP(e)&&(t?64===e.operatorToken.kind:yb(e.operatorToken.kind))&&X_(e.left)}function Sb(e){return xb(e.parent)&&e.parent.left===e}function kb(e){if(xb(e,!0)){const t=e.left.kind;return 210===t||209===t}return!1}function Tb(e){return void 0!==vb(e)}function Cb(e){return 80===e.kind||Db(e)}function wb(e){switch(e.kind){case 80:return e;case 166:do{e=e.left}while(80!==e.kind);return e;case 211:do{e=e.expression}while(80!==e.kind);return e}}function Nb(e){return 80===e.kind||110===e.kind||108===e.kind||236===e.kind||211===e.kind&&Nb(e.expression)||217===e.kind&&Nb(e.expression)}function Db(e){return rP(e)&&QN(e.name)&&Cb(e.expression)}function Pb(e){if(rP(e)){const t=Pb(e.expression);if(void 0!==t)return t+"."+Up(e.name)}else if(iP(e)){const t=Pb(e.expression);if(void 0!==t&&d_(e.argumentExpression))return t+"."+Yh(e.argumentExpression)}else{if(QN(e))return Cc(e.escapedText);if(qE(e))return xC(e)}}function Eb(e){return gg(e)&&"prototype"===xg(e)}function Fb(e){return 166===e.parent.kind&&e.parent.right===e||211===e.parent.kind&&e.parent.name===e||236===e.parent.kind&&e.parent.name===e}function Ab(e){return!!e.parent&&(rP(e.parent)&&e.parent.name===e||iP(e.parent)&&e.parent.argumentExpression===e)}function Ib(e){return dD(e.parent)&&e.parent.right===e||rP(e.parent)&&e.parent.name===e||tF(e.parent)&&e.parent.right===e}function Ob(e){return yP(e)&&104===e.operatorToken.kind}function jb(e){return Ob(e.parent)&&e===e.parent.right}function Lb(e){return 210===e.kind&&0===e.properties.length}function Mb(e){return 209===e.kind&&0===e.elements.length}function Rb(e){if(function(e){return e&&g(e.declarations)>0&&Wv(e.declarations[0],2048)}(e)&&e.declarations)for(const t of e.declarations)if(t.localSymbol)return t.localSymbol}function Bb(e){return C(zk,t=>Ro(e,t))}var Jb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function zb(e){let t="";const n=function(e){const t=[],n=e.length;for(let r=0;r>6|192),t.push(63&n|128)):n<65536?(t.push(n>>12|224),t.push(n>>6&63|128),t.push(63&n|128)):n<131072?(t.push(n>>18|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):Tn.assert(!1,"Unexpected code point")}return t}(e);let r=0;const i=n.length;let o,a,s,c;for(;r>2,a=(3&n[r])<<4|n[r+1]>>4,s=(15&n[r+1])<<2|n[r+2]>>6,c=63&n[r+2],r+1>=i?s=c=64:r+2>=i&&(c=64),t+=Jb.charAt(o)+Jb.charAt(a)+Jb.charAt(s)+Jb.charAt(c),r+=3;return t}function qb(e,t){return e&&e.base64encode?e.base64encode(t):zb(t)}function Ub(e,t){if(e&&e.base64decode)return e.base64decode(t);const n=t.length,r=[];let i=0;for(;i>4&3,c=(15&n)<<4|o>>2&15,l=(3&o)<<6|63&a;0===c&&0!==o?r.push(s):0===l&&0!==a?r.push(s,c):r.push(s,c,l),i+=4}return function(e){let t="",n=0;const r=e.length;for(;n=e||-1===t),{pos:e,end:t}}function Yb(e,t){return Qb(e.pos,t)}function Zb(e,t){return Qb(t,e.end)}function ex(e){const t=bI(e)?w(e.modifiers,gD):void 0;return t&&!dT(t.end)?Zb(e,t.end):e}function tx(e){if(yD(e)||bD(e))return Zb(e,e.name.pos);const t=bI(e)?Pe(e.modifiers):void 0;return t&&!dT(t.end)?Zb(e,t.end):ex(e)}function nx(e){return e.pos===e.end}function rx(e,t){return Qb(e,e+Va(t).length)}function ix(e,t){return sx(e,e,t)}function ox(e,t,n){return dx(px(e,n,!1),px(t,n,!1),n)}function ax(e,t,n){return dx(e.end,t.end,n)}function sx(e,t,n){return dx(px(e,n,!1),t.end,n)}function cx(e,t,n){return dx(e.end,px(t,n,!1),n)}function lx(e,t,n,r){const i=px(t,n,r);return ts(n,e.end,i)}function _x(e,t,n){return ts(n,e.end,t.end)}function ux(e,t){return!dx(e.pos,e.end,t)}function dx(e,t,n){return 0===ts(n,e,t)}function px(e,t,n){return dT(e.pos)?-1:ds(t.text,e.pos,!1,n)}function fx(e,t,n,r){const i=ds(n.text,e,!1,r),o=function(e,t=0,n){for(;e-- >t;)if(!rs(n.text.charCodeAt(e)))return e}(i,t,n);return ts(n,o??t,i)}function mx(e,t,n,r){const i=ds(n.text,e,!1,r);return ts(n,e,Math.min(t,i))}function gx(e){const t=kc(e);if(t)switch(t.parent.kind){case 266:case 267:return t===t.parent.name}return!1}function hx(e){return O(e.declarations,yx)}function yx(e){return eE(e)&&void 0!==e.initializer}function vx(e){return e.watch&&Be(e,"watch")}function bx(e){e.close()}function xx(e){return 33554432&e.flags?e.links.checkFlags:0}function Sx(e,t=!1){if(e.valueDeclaration){const n=fc(t&&e.declarations&&C(e.declarations,TD)||32768&e.flags&&C(e.declarations,kD)||e.valueDeclaration);return e.parent&&32&e.parent.flags?n:-8&n}if(6&xx(e)){const t=e.links.checkFlags;return(1024&t?2:256&t?1:4)|(2048&t?256:0)}return 4194304&e.flags?257:0}function kx(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e}function Tx(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function Cx(e){return 1===Nx(e)}function wx(e){return 0!==Nx(e)}function Nx(e){const{parent:t}=e;switch(null==t?void 0:t.kind){case 217:case 209:return Nx(t);case 225:case 224:const{operator:n}=t;return 46===n||47===n?2:0;case 226:const{left:r,operatorToken:i}=t;return r===e&&yb(i.kind)?64===i.kind?1:2:0;case 211:return t.name!==e?0:Nx(t);case 303:{const n=Nx(t.parent);return e===t.name?function(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return Tn.assertNever(e)}}(n):n}case 304:return e===t.objectAssignmentInitializer?0:Nx(t.parent);default:return 0}}function Dx(e,t){if(!e||!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if("object"==typeof e[n]){if(!Dx(e[n],t[n]))return!1}else if("function"!=typeof e[n]&&e[n]!==t[n])return!1;return!0}function Px(e,t){e.forEach(t),e.clear()}function Ex(e,t,n){const{onDeleteValue:r,onExistingValue:i}=n;e.forEach((n,o)=>{var a;(null==t?void 0:t.has(o))?i&&i(n,null==(a=t.get)?void 0:a.call(t,o),o):(e.delete(o),r(n,o))})}function Fx(e,t,n){Ex(e,t,n);const{createNewValue:r}=n;null==t||t.forEach((t,n)=>{e.has(n)||e.set(n,r(n,t))})}function Ax(e){if(32&e.flags){const t=Ix(e);return!!t&&Wv(t,64)}return!1}function Ix(e){var t;return null==(t=e.declarations)?void 0:t.find(S_)}function Ox(e){return 3899393&e.flags?e.objectFlags:0}function jx(e,t){return!!Sa(e,e=>!!t(e)||void 0)}function Lx(e){return!!e&&!!e.declarations&&!!e.declarations[0]&&_E(e.declarations[0])}function Mx({moduleSpecifier:e}){return ON(e)?e.text:tp(e)}function Rx(e){let t;return KI(e,e=>{Md(e)&&(t=e)},e=>{for(let n=e.length-1;n>=0;n--)if(Md(e[n])){t=e[n];break}}),t}function Bx(e,t,n=!0){return!e.has(t)&&(e.set(t,n),!0)}function Jx(e){return S_(e)||iE(e)||ID(e)}function zx(e){return e>=182&&e<=205||133===e||159===e||150===e||163===e||151===e||136===e||154===e||155===e||116===e||157===e||146===e||141===e||233===e||312===e||313===e||314===e||315===e||316===e||317===e||318===e}function qx(e){return 211===e.kind||212===e.kind}function Ux(e){return 211===e.kind?e.name:(Tn.assert(212===e.kind),e.argumentExpression)}function Vx(e){return 275===e.kind||279===e.kind}function Wx(e){for(;qx(e);)e=e.expression;return e}function $x(e,t){if(qx(e.parent)&&Ab(e))return function e(n){if(211===n.kind){const e=t(n.name);if(void 0!==e)return e}else if(212===n.kind){if(!QN(n.argumentExpression)&&!Ku(n.argumentExpression))return;{const e=t(n.argumentExpression);if(void 0!==e)return e}}if(qx(n.expression))return e(n.expression);if(QN(n.expression))return t(n.expression);return}(e.parent)}function Hx(e,t){for(;;){switch(e.kind){case 225:e=e.operand;continue;case 226:e=e.left;continue;case 227:e=e.condition;continue;case 215:e=e.tag;continue;case 213:if(t)return e;case 234:case 212:case 211:case 235:case 354:case 238:e=e.expression;continue}return e}}function Kx(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function Gx(e,t){this.flags=t,(Tn.isDebugging||cr)&&(this.checker=e)}function Xx(e,t){this.flags=t,Tn.isDebugging&&(this.checker=e)}function Qx(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function Yx(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function Zx(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function eS(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(e=>e)}var tS,nS={getNodeConstructor:()=>Qx,getTokenConstructor:()=>Yx,getIdentifierConstructor:()=>Zx,getPrivateIdentifierConstructor:()=>Qx,getSourceFileConstructor:()=>Qx,getSymbolConstructor:()=>Kx,getTypeConstructor:()=>Gx,getSignatureConstructor:()=>Xx,getSourceMapSourceConstructor:()=>eS},rS=[];function iS(e){rS.push(e),e(nS)}function oS(e){Object.assign(nS,e),h(rS,e=>e(nS))}function aS(e,t){return e.replace(/{(\d+)}/g,(e,n)=>""+Tn.checkDefined(t[+n]))}function sS(e){tS=e}function cS(e){!tS&&e&&(tS=e())}function lS(e){return tS&&tS[e.key]||e.message}function _S(e,t,n,r,i,...o){n+r>t.length&&(r=t.length-n),Gp(t,n,r);let a=lS(i);return ee(o)&&(a=aS(a,o)),{file:void 0,start:n,length:r,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary,fileName:e}}function uS(e){return void 0===e.file&&void 0!==e.start&&void 0!==e.length&&"string"==typeof e.fileName}function dS(e,t){const n=t.fileName||"",r=t.text.length;Tn.assertEqual(e.fileName,n),Tn.assertLessThanOrEqual(e.start,r),Tn.assertLessThanOrEqual(e.start+e.length,r);const i={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){i.relatedInformation=[];for(const o of e.relatedInformation)uS(o)&&o.fileName===n?(Tn.assertLessThanOrEqual(o.start,r),Tn.assertLessThanOrEqual(o.start+o.length,r),i.relatedInformation.push(dS(o,t))):i.relatedInformation.push(o)}return i}function pS(e,t){const n=[];for(const r of e)n.push(dS(r,t));return n}function fS(e,t,n,r,...i){Gp(e.text,t,n);let o=lS(r);return ee(i)&&(o=aS(o,i)),{file:e,start:t,length:n,messageText:o,category:r.category,code:r.code,reportsUnnecessary:r.reportsUnnecessary,reportsDeprecated:r.reportsDeprecated}}function mS(e,...t){let n=lS(e);return ee(t)&&(n=aS(n,t)),n}function gS(e,...t){let n=lS(e);return ee(t)&&(n=aS(n,t)),{file:void 0,start:void 0,length:void 0,messageText:n,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated}}function hS(e,t){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:t}}function yS(e,t,...n){let r=lS(t);return ee(n)&&(r=aS(r,n)),{messageText:r,category:t.category,code:t.code,next:void 0===e||Array.isArray(e)?e:[e]}}function vS(e,t){let n=e;for(;n.next;)n=n.next[0];n.next=[t]}function bS(e){return e.file?e.file.path:void 0}function xS(e,t){return SS(e,t)||function(e,t){if(!e.relatedInformation&&!t.relatedInformation)return 0;if(e.relatedInformation&&t.relatedInformation)return It(t.relatedInformation.length,e.relatedInformation.length)||h(e.relatedInformation,(e,n)=>xS(e,t.relatedInformation[n]))||0;return e.relatedInformation?-1:1}(e,t)||0}function SS(e,t){const n=wS(e),r=wS(t);return Rt(bS(e),bS(t))||It(e.start,t.start)||It(e.length,t.length)||It(n,r)||function(e,t){let n=NS(e),r=NS(t);"string"!=typeof n&&(n=n.messageText);"string"!=typeof r&&(r=r.messageText);const i="string"!=typeof e.messageText?e.messageText.next:void 0,o="string"!=typeof t.messageText?t.messageText.next:void 0;let a=Rt(n,r);if(a)return a;if(a=function(e,t){if(void 0===e&&void 0===t)return 0;if(void 0===e)return 1;if(void 0===t)return-1;return kS(e,t)||TS(e,t)}(i,o),a)return a;if(e.canonicalHead&&!t.canonicalHead)return-1;if(t.canonicalHead&&!e.canonicalHead)return 1;return 0}(e,t)||0}function kS(e,t){if(void 0===e&&void 0===t)return 0;if(void 0===e)return 1;if(void 0===t)return-1;let n=It(t.length,e.length);if(n)return n;for(let r=0;r{e.externalModuleIndicator=NI(e)||!e.isDeclarationFile||void 0};case 1:return e=>{e.externalModuleIndicator=NI(e)};case 2:const t=[NI];4!==e.jsx&&5!==e.jsx||t.push(ES),t.push(FS);const n=fn(...t);return e=>{e.externalModuleIndicator=n(e)}}}var IS={target:{dependencies:["module"],computeValue:e=>(0===e.target?void 0:e.target)??((100===e.module?9:199===e.module&&99)||1)},module:{dependencies:["target"],computeValue:e=>"number"==typeof e.module?e.module:IS.target.computeValue(e)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:e=>{let t=e.moduleResolution;if(void 0===t)switch(IS.module.computeValue(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;case 200:t=100;break;default:t=1}return t}},moduleDetection:{dependencies:["module","target"],computeValue:e=>e.moduleDetection||(100===IS.module.computeValue(e)||199===IS.module.computeValue(e)?3:2)},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:e=>!(!e.isolatedModules&&!e.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:e=>{if(void 0!==e.esModuleInterop)return e.esModuleInterop;switch(IS.module.computeValue(e)){case 100:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:e=>void 0!==e.allowSyntheticDefaultImports?e.allowSyntheticDefaultImports:IS.esModuleInterop.computeValue(e)||4===IS.module.computeValue(e)||100===IS.moduleResolution.computeValue(e)},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:e=>{const t=IS.moduleResolution.computeValue(e);if(!ek(t))return!1;if(void 0!==e.resolvePackageJsonExports)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:e=>{const t=IS.moduleResolution.computeValue(e);if(!ek(t))return!1;if(void 0!==e.resolvePackageJsonExports)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:e=>void 0!==e.resolveJsonModule?e.resolveJsonModule:100===IS.moduleResolution.computeValue(e)},declaration:{dependencies:["composite"],computeValue:e=>!(!e.declaration&&!e.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:e=>!(!e.preserveConstEnums&&!IS.isolatedModules.computeValue(e))},incremental:{dependencies:["composite"],computeValue:e=>!(!e.incremental&&!e.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:e=>!(!e.declarationMap||!IS.declaration.computeValue(e))},allowJs:{dependencies:["checkJs"],computeValue:e=>void 0===e.allowJs?!!e.checkJs:e.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:e=>void 0===e.useDefineForClassFields?IS.target.computeValue(e)>=9:e.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:e=>tk(e,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:e=>tk(e,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:e=>tk(e,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:e=>tk(e,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:e=>tk(e,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:e=>tk(e,"strictPropertyInitialization")},alwaysStrict:{dependencies:["strict"],computeValue:e=>tk(e,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:e=>tk(e,"useUnknownInCatchVariables")}},OS=IS.target.computeValue,jS=IS.module.computeValue,LS=IS.moduleResolution.computeValue,MS=IS.moduleDetection.computeValue,RS=IS.isolatedModules.computeValue,BS=IS.esModuleInterop.computeValue,JS=IS.allowSyntheticDefaultImports.computeValue,zS=IS.resolvePackageJsonExports.computeValue,qS=IS.resolvePackageJsonImports.computeValue,US=IS.resolveJsonModule.computeValue,VS=IS.declaration.computeValue,WS=IS.preserveConstEnums.computeValue,$S=IS.incremental.computeValue,HS=IS.declarationMap.computeValue,KS=IS.allowJs.computeValue,GS=IS.useDefineForClassFields.computeValue;function XS(e){return e>=5&&e<=99}function QS(e){switch(jS(e)){case 0:case 4:case 3:return!1}return!0}function YS(e){return!1===e.allowUnreachableCode}function ZS(e){return!1===e.allowUnusedLabels}function ek(e){return e>=3&&e<=99||100===e}function tk(e,t){return void 0===e[t]?!!e.strict:!!e[t]}function nk(e){return md(DO.type,(t,n)=>t===e?n:void 0)}function rk(e){return!1!==e.useDefineForClassFields&&OS(e)>=9}function ik(e,t){return pd(t,e,AO)}function ok(e,t){return pd(t,e,IO)}function ak(e,t){return pd(t,e,OO)}function sk(e,t){return t.strictFlag?tk(e,t.name):t.allowJsFlag?KS(e):e[t.name]}function ck(e){const t=e.jsx;return 2===t||4===t||5===t}function lk(e,t){const n=null==t?void 0:t.pragmas.get("jsximportsource"),r=ct(n)?n[n.length-1]:n;return 4===e.jsx||5===e.jsx||e.jsxImportSource||r?(null==r?void 0:r.arguments.factory)||e.jsxImportSource||"react":void 0}function _k(e,t){return e?`${e}/${5===t.jsx?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function uk(e){let t=!1;for(let n=0;ni,getSymlinkedDirectories:()=>n,getSymlinkedDirectoriesByRealpath:()=>r,setSymlinkedFile:(e,t)=>(i||(i=new Map)).set(e,t),setSymlinkedDirectory:(i,o)=>{let a=ia(i,e,t);KT(a)||(a=aa(a),!1===o||(null==n?void 0:n.has(a))||(r||(r=rt())).add(o.realPath,i),(n||(n=new Map)).set(a,o))},setSymlinksFromResolutions(e,t,n){Tn.assert(!o),o=!0,e(e=>a(this,e.resolvedModule)),t(e=>a(this,e.resolvedTypeReferenceDirective)),n.forEach(e=>a(this,e.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>o,setSymlinksFromResolution(e){a(this,e)},hasAnySymlinks:function(){return!!(null==i?void 0:i.size)||!!n&&!!md(n,e=>!!e)}};function a(n,r){if(!r||!r.originalPath||!r.resolvedFileName)return;const{resolvedFileName:i,originalPath:o}=r;n.setSymlinkedFile(ia(o,e,t),i);const[a,s]=function(e,t,n,r){const i=Ko(ta(e,n)),o=Ko(ta(t,n));let a=!1;for(;i.length>=2&&o.length>=2&&!pk(i[i.length-2],r)&&!pk(o[o.length-2],r)&&r(i[i.length-1])===r(o[o.length-1]);)i.pop(),o.pop(),a=!0;return a?[Go(i),Go(o)]:void 0}(i,o,e,t)||p;a&&s&&n.setSymlinkedDirectory(s,{real:aa(a),realPath:aa(ia(a,e,t))})}}function pk(e,t){return void 0!==e&&("node_modules"===t(e)||ln(e,"@"))}function fk(e,t,n){const r=un(e,t,n);return void 0===r?void 0:Eo((i=r).charCodeAt(0))?i.slice(1):void 0;var i}var mk=/[^\w\s/]/g;function gk(e){return e.replace(mk,hk)}function hk(e){return"\\"+e}var yk=[42,63],vk=["node_modules","bower_components","jspm_packages"],bk=`(?!(${vk.join("|")})(/|$))`,xk={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${bk}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Ek(e,xk.singleAsteriskRegexFragment)},Sk={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${bk}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Ek(e,Sk.singleAsteriskRegexFragment)},kk={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:e=>Ek(e,kk.singleAsteriskRegexFragment)},Tk={files:xk,directories:Sk,exclude:kk};function Ck(e,t,n){const r=wk(e,t,n);if(!r||!r.length)return;return`^(${r.map(e=>`(${e})`).join("|")})${"exclude"===n?"($|/)":"$"}`}function wk(e,t,n){if(void 0!==e&&0!==e.length)return z(e,e=>e&&Pk(e,t,n,Tk[n]))}function Nk(e){return!/[.*?]/.test(e)}function Dk(e,t,n){const r=e&&Pk(e,t,n,Tk[n]);return r&&`^(${r})${"exclude"===n?"($|/)":"$"}`}function Pk(e,t,n,{singleAsteriskRegexFragment:r,doubleAsteriskRegexFragment:i,replaceWildcardCharacter:o}=Tk[n]){let a="",s=!1;const c=ea(e,t),l=Ee(c);if("exclude"!==n&&"**"===l)return;c[0]=oa(c[0]),Nk(l)&&c.push("**","*");let _=0;for(let e of c){if("**"===e)a+=i;else if("directories"===n&&(a+="(",_++),s&&(a+=wo),"exclude"!==n){let t="";42===e.charCodeAt(0)?(t+="([^./]"+r+")?",e=e.substr(1)):63===e.charCodeAt(0)&&(t+="[^./]",e=e.substr(1)),t+=e.replace(mk,o),t!==e&&(a+=bk),a+=t}else a+=e.replace(mk,o);s=!0}for(;_>0;)a+=")?",_--;return a}function Ek(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function Fk(e,t,n,r,i){e=na(e);const o=Yo(i=na(i),e);return{includeFilePatterns:M(wk(n,o,"files"),e=>`^${e}$`),includeFilePattern:Ck(n,o,"files"),includeDirectoryPattern:Ck(n,o,"directories"),excludePattern:Ck(t,o,"exclude"),basePaths:Ok(e,n,r)}}function Ak(e,t){return new RegExp(e,t?"":"i")}function Ik(e,t,n,r,i,o,a,s,c){e=na(e),o=na(o);const l=Fk(e,n,r,i,o),_=l.includeFilePatterns&&l.includeFilePatterns.map(e=>Ak(e,i)),u=l.includeDirectoryPattern&&Ak(l.includeDirectoryPattern,i),d=l.excludePattern&&Ak(l.excludePattern,i),p=_?_.map(()=>[]):[[]],f=new Map,m=on(i);for(const e of l.basePaths)g(e,Yo(o,e),a);return J(p);function g(e,n,r){const i=m(c(n));if(f.has(i))return;f.set(i,!0);const{files:o,directories:a}=s(e);for(const r of be(o,Rt)){const i=Yo(e,r),o=Yo(n,r);if((!t||Bo(i,t))&&(!d||!d.test(o)))if(_){const e=N(_,e=>e.test(o));-1!==e&&p[e].push(i)}else p[0].push(i)}if(void 0===r||0!==--r)for(const t of be(a,Rt)){const i=Yo(e,t),o=Yo(n,t);u&&!u.test(o)||d&&d.test(o)||g(i,o,r)}}}function Ok(e,t,n){const r=[e];if(t){const i=[];for(const n of t){const t=Ao(n)?n:na(Yo(e,n));i.push(jk(t))}i.sort(Bt(!n));for(const t of i)T(r,r=>!ma(r,t,e,!n))&&r.push(t)}return r}function jk(e){const t=A(e,yk);return t<0?Mo(e)?oa(Vo(e)):e:e.substring(0,e.lastIndexOf(wo,t))}function Lk(e,t){return t||Mk(e)||3}function Mk(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var Rk=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],Bk=J(Rk),Jk=[...Rk,[".json"]],zk=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],qk=[[".js",".jsx"],[".mjs"],[".cjs"]],Uk=J(qk),Vk=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],Wk=[...Vk,[".json"]],$k=[".d.ts",".d.cts",".d.mts"],Hk=[".ts",".cts",".mts",".tsx"],Kk=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"];function Gk(e,t){const n=e&&KS(e);if(!t||0===t.length)return n?Vk:Rk;const r=n?Vk:Rk,i=J(r);return[...r,...$(t,e=>{return 7===e.scriptKind||n&&(1===(t=e.scriptKind)||2===t)&&!i.includes(e.extension)?[e.extension]:void 0;var t})]}function Xk(e,t){return e&&US(e)?t===Vk?Wk:t===Rk?Jk:[...t,[".json"]]:t}function Qk(e){return ee(Uk,t=>Ro(e,t))}function Yk(e){return ee(Bk,t=>Ro(e,t))}var Zk=(e=>(e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension",e[e.TsExtension=3]="TsExtension",e))(Zk||{});function eT({imports:e},t=fn(Qk,Yk)){return v(e,({text:e})=>jo(e)&&!Bo(e,Kk)?t(e):void 0)||!1}function tT(e,t,n,r){const i=LS(n),o=3<=i&&i<=99;return"js"===e||99===t&&o?LR(n)&&2!==a()?3:2:"minimal"===e?0:"index"===e?1:LR(n)?a():r&&eT(r)?2:0;function a(){let e=!1;const i=(null==r?void 0:r.imports.length)?r.imports:r&&Bm(r)?function(e){let t,n=0;for(const r of e.statements){if(n>3)break;Qm(r)?t=ne(t,r.declarationList.declarations.map(e=>e.initializer)):RP(r)&&$m(r.expression,!0)?t=pe(t,r.expression):n++}return t||p}(r).map(e=>e.arguments[0]):p;for(const a of i)if(jo(a.text)){if(o&&1===t&&99===dV(r,a,n))continue;if(Bo(a.text,Kk))continue;if(Yk(a.text))return 3;Qk(a.text)&&(e=!0)}return e?2:0}}function nT(e,t,n){if(!e)return!1;const r=Gk(t,n);for(const n of J(Xk(t,r)))if(Ro(e,n))return!0;return!1}function rT(e){const t=e.match(/\//g);return t?t.length:0}function iT(e,t){return It(rT(e),rT(t))}var oT=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"];function aT(e){for(const t of oT){const n=sT(e,t);if(void 0!==n)return n}return e}function sT(e,t){return Ro(e,t)?cT(e,t):void 0}function cT(e,t){return e.substring(0,e.length-t.length)}function lT(e,t){return ca(e,t,oT,!1)}function _T(e){const t=e.indexOf("*");return-1===t?e:-1!==e.indexOf("*",t+1)?void 0:{prefix:e.substr(0,t),suffix:e.substr(t+1)}}function uT(e){return $(ze(e),e=>_T(e))}function dT(e){return!(e>=0)}function pT(e){return".ts"===e||".tsx"===e||".d.ts"===e||".cts"===e||".mts"===e||".d.mts"===e||".d.cts"===e||ln(e,".d.")&&Xt(e,".ts")}function fT(e){return pT(e)||".json"===e}function mT(e){const t=hT(e);return void 0!==t?t:Tn.fail(`File ${e} has unknown extension.`)}function gT(e){return void 0!==hT(e)}function hT(e){return C(oT,t=>Ro(e,t))}function yT(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs}var vT={files:p,directories:p};function bT(e,t){const n=[];for(const r of e){if(r===t)return t;_t(r)||n.push(r)}return cn(n,e=>e,t)}function xT(e,t){const n=e.indexOf(t);return Tn.assert(-1!==n),e.slice(n)}function ST(e,...t){return t.length?(e.relatedInformation||(e.relatedInformation=[]),Tn.assert(e.relatedInformation!==p,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t),e):e}function kT(e,t){Tn.assert(0!==e.length);let n=t(e[0]),r=n;for(let i=1;ir&&(r=o)}return{min:n,max:r}}function TT(e){return{pos:Xd(e),end:e.end}}function CT(e,t){return{pos:t.pos-1,end:Math.min(e.text.length,ds(e.text,t.end)+1)}}function wT(e,t,n){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||t.noCheck||n.isSourceOfProjectReferenceRedirect(e.fileName)||!NT(e,t)}function NT(e,t){if(e.checkJsDirective&&!1===e.checkJsDirective.enabled)return!1;if(3===e.scriptKind||4===e.scriptKind||5===e.scriptKind)return!0;const n=(1===e.scriptKind||2===e.scriptKind)&&yT(e,t);return Ed(e,t.checkJs)||n||7===e.scriptKind}function DT(e,t){return e===t||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&He(e,t,DT)}function PT(e){let t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:const n=e.length-1;let r=0;for(;48===e.charCodeAt(r);)r++;return e.slice(r,n)||"0"}const n=e.length-1,r=(n-2)*t,i=new Uint16Array((r>>>4)+(15&r?1:0));for(let r=n-1,o=0;r>=2;r--,o+=t){const t=o>>>4,n=e.charCodeAt(r),a=(n<=57?n-48:10+n-(n<=70?65:97))<<(15&o);i[t]|=a;const s=a>>>16;s&&(i[t+1]|=s)}let o="",a=i.length-1,s=!0;for(;s;){let e=0;s=!1;for(let t=a;t>=0;t--){const n=e<<16|i[t],r=n/10|0;i[t]=r,e=n-10*r,r&&!s&&(a=t,s=!0)}o=e+o}return o}function ET({negative:e,base10Value:t}){return(e&&"0"!==t?"-":"")+t}function FT(e){if(IT(e,!1))return AT(e)}function AT(e){const t=e.startsWith("-");return{negative:t,base10Value:PT(`${t?e.slice(1):e}n`)}}function IT(e,t){if(""===e)return!1;const n=Fs(99,!1);let r=!0;n.setOnError(()=>r=!1),n.setText(e+"n");let i=n.scan();const o=41===i;o&&(i=n.scan());const a=n.getTokenFlags();return r&&10===i&&n.getTokenEnd()===e.length+1&&!(512&a)&&(!t||e===ET({negative:o,base10Value:PT(n.getTokenValue())}))}function OT(e){return!!(33554432&e.flags)||Am(e)||function(e){if(80!==e.kind)return!1;const t=xc(e.parent,e=>{switch(e.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return 119===(null==t?void 0:t.token)||264===(null==t?void 0:t.parent.kind)}(e)||function(e){for(;80===e.kind||211===e.kind;)e=e.parent;if(167!==e.kind)return!1;if(Wv(e.parent,64))return!0;const t=e.parent.parent.kind;return 264===t||187===t}(e)||!(Em(e)||function(e){return QN(e)&&KE(e.parent)&&e.parent.name===e}(e))}function jT(e){return PD(e)&&QN(e.typeName)}function LT(e,t=Pt){if(e.length<2)return!0;const n=e[0];for(let r=1,i=e.length;re.includes(t))}function GT(e){if(!e.parent)return;switch(e.kind){case 168:const{parent:t}=e;return 195===t.kind?void 0:t.typeParameters;case 169:return e.parent.parameters;case 204:case 239:return e.parent.templateSpans;case 170:{const{parent:t}=e;return xI(t)?t.modifiers:void 0}case 298:return e.parent.heritageClauses}const{parent:t}=e;if(Mu(e))return fF(e.parent)?void 0:e.parent.tags;switch(t.kind){case 187:case 264:return P_(e)?t.members:void 0;case 192:case 193:return t.types;case 189:case 209:case 355:case 275:case 279:return t.elements;case 210:case 292:return t.properties;case 213:case 214:return A_(e)?t.typeArguments:t.expression===e?void 0:t.arguments;case 284:case 288:return Eu(e)?t.children:void 0;case 286:case 285:return A_(e)?t.typeArguments:void 0;case 241:case 296:case 297:case 268:case 307:return t.statements;case 269:return t.clauses;case 263:case 231:return x_(e)?t.members:void 0;case 266:return XE(e)?t.members:void 0}}function XT(e){if(!e.typeParameters){if(ee(e.parameters,e=>!Pv(e)))return!0;if(219!==e.kind){const t=Ce(e.parameters);if(!t||!kv(t))return!0}}return!1}function QT(e){return"Infinity"===e||"-Infinity"===e||"NaN"===e}function YT(e){return 260===e.kind&&299===e.parent.kind}function ZT(e){return 218===e.kind||219===e.kind}function eC(e){return e.replace(/\$/gm,()=>"\\$")}function tC(e){return(+e).toString()===e}function nC(e,t,n,r,i){const o=i&&"new"===e;return!o&&Es(e,t)?aw.createIdentifier(e):!r&&!o&&tC(e)&&+e>=0?aw.createNumericLiteral(+e):aw.createStringLiteral(e,!!n)}function rC(e){return!!(262144&e.flags&&e.isThisType)}function iC(e){let t,n=0,r=0,i=0,o=0;var a;(a=t||(t={}))[a.BeforeNodeModules=0]="BeforeNodeModules",a[a.NodeModules=1]="NodeModules",a[a.Scope=2]="Scope",a[a.PackageContent=3]="PackageContent";let s=0,c=0,l=0;for(;c>=0;)switch(s=c,c=e.indexOf("/",s+1),l){case 0:e.indexOf(KM,s)===s&&(n=s,r=c,l=1);break;case 1:case 2:1===l&&"@"===e.charAt(s+1)?l=2:(i=c,l=3);break;case 3:l=e.indexOf(KM,s)===s?1:3}return o=s,l>1?{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:r,packageRootIndex:i,fileNameIndex:o}:void 0}function oC(e){var t;return 341===e.kind?null==(t=e.typeExpression)?void 0:t.type:e.type}function aC(e){switch(e.kind){case 168:case 263:case 264:case 265:case 266:case 346:case 338:case 340:return!0;case 273:return e.isTypeOnly;case 276:case 281:return e.parent.parent.isTypeOnly;default:return!1}}function sC(e){return aE(e)||LP(e)||nE(e)||rE(e)||iE(e)||aC(e)||sE(e)&&!bp(e)&&!vp(e)}function cC(e){if(!Rl(e))return!1;const{isBracketed:t,typeExpression:n}=e;return t||!!n&&316===n.type.kind}function lC(e,t){if(0===e.length)return!1;const n=e.charCodeAt(0);return 35===n?e.length>1&&Ds(e.charCodeAt(1),t):Ds(n,t)}function _C(e){var t;return 0===(null==(t=Rw(e))?void 0:t.kind)}function uC(e){return zm(e)&&(e.type&&316===e.type.kind||Jc(e).some(cC))}function dC(e){switch(e.kind){case 172:case 171:return!!e.questionToken;case 169:return!!e.questionToken||uC(e);case 348:case 341:return cC(e);default:return!1}}function pC(e){const t=e.kind;return(211===t||212===t)&&DP(e.expression)}function fC(e){return zm(e)&&lP(e)&&Ju(e)&&!!_l(e)}function mC(e){return Tn.checkDefined(gC(e))}function gC(e){const t=_l(e);return t&&t.typeExpression&&t.typeExpression.type}function hC(e){return QN(e)?e.escapedText:bC(e)}function yC(e){return QN(e)?wc(e):xC(e)}function vC(e){const t=e.kind;return 80===t||295===t}function bC(e){return`${e.namespace.escapedText}:${wc(e.name)}`}function xC(e){return`${wc(e.namespace)}:${wc(e.name)}`}function SC(e){return QN(e)?wc(e):xC(e)}function kC(e){return!!(8576&e.flags)}function TC(e){return 8192&e.flags?e.escapedName:384&e.flags?Tc(""+e.value):Tn.fail()}function CC(e){return!!e&&(rP(e)||iP(e)||yP(e))}function wC(e){return void 0!==e&&!!fV(e.attributes)}var NC=String.prototype.replace;function DC(e,t){return NC.call(e,"*",t)}function PC(e){return QN(e.name)?e.name.escapedText:Tc(e.name.text)}function EC(e,t=!1,n=!1,r=!1){return{value:e,isSyntacticallyString:t,resolvedOtherFiles:n,hasExternalReferences:r}}function FC({evaluateElementAccessExpression:e,evaluateEntityNameExpression:t}){function n(r,i){let o=!1,a=!1,s=!1;switch((r=mh(r)).kind){case 224:const c=n(r.operand,i);if(a=c.resolvedOtherFiles,s=c.hasExternalReferences,"number"==typeof c.value)switch(r.operator){case 40:return EC(c.value,o,a,s);case 41:return EC(-c.value,o,a,s);case 55:return EC(~c.value,o,a,s)}break;case 226:{const e=n(r.left,i),t=n(r.right,i);if(o=(e.isSyntacticallyString||t.isSyntacticallyString)&&40===r.operatorToken.kind,a=e.resolvedOtherFiles||t.resolvedOtherFiles,s=e.hasExternalReferences||t.hasExternalReferences,"number"==typeof e.value&&"number"==typeof t.value)switch(r.operatorToken.kind){case 52:return EC(e.value|t.value,o,a,s);case 51:return EC(e.value&t.value,o,a,s);case 49:return EC(e.value>>t.value,o,a,s);case 50:return EC(e.value>>>t.value,o,a,s);case 48:return EC(e.value<=2)break;case 174:case 176:case 177:case 178:case 262:if(3&p&&"arguments"===I){w=n;break e}break;case 218:if(3&p&&"arguments"===I){w=n;break e}if(16&p){const e=s.name;if(e&&I===e.escapedText){w=s.symbol;break e}}break;case 170:s.parent&&169===s.parent.kind&&(s=s.parent),s.parent&&(x_(s.parent)||263===s.parent.kind)&&(s=s.parent);break;case 346:case 338:case 340:case 351:const o=eh(s);o&&(s=o.parent);break;case 169:N&&(N===s.initializer||N===s.name&&O_(N))&&(E||(E=s));break;case 208:N&&(N===s.initializer||N===s.name&&O_(N))&&dy(s)&&!E&&(E=s);break;case 195:if(262144&p){const e=s.typeParameter.name;if(e&&I===e.escapedText){w=s.typeParameter.symbol;break e}}break;case 281:N&&N===s.propertyName&&s.parent.parent.moduleSpecifier&&(s=s.parent.parent.parent)}y(s,N)&&(D=s),N=s,s=IF(s)?Gg(s)||s.parent:(PF(s)||EF(s))&&Qg(s)||s.parent}!b||!w||D&&w===D.symbol||(w.isReferenced|=p);if(!w){if(N&&(Tn.assertNode(N,QE),N.commonJsModuleIndicator&&"exports"===I&&p&N.symbol.flags))return N.symbol;x||(w=a(o,I,p))}if(!w&&C&&zm(C)&&C.parent&&$m(C.parent,!1))return t;if(h){if(P&&l(C,I,P,w))return;w?u(C,w,p,N,E,A):_(C,c,p,h)}return w};function m(t,n,r){const i=OS(e),o=n;if(mD(r)&&o.body&&t.valueDeclaration&&t.valueDeclaration.pos>=o.body.pos&&t.valueDeclaration.end<=o.body.end&&i>=2){let e=c(o);return void 0===e&&(e=h(o.parameters,function(e){return a(e.name)||!!e.initializer&&a(e.initializer)})||!1,s(o,e)),!e}return!1;function a(e){switch(e.kind){case 219:case 218:case 262:case 176:return!1;case 174:case 177:case 178:case 303:return a(e.name);case 172:return Hv(e)?!p:a(e.name);default:return Al(e)||Dl(e)?i<7:eP(e)&&e.dotDotDotToken&&YD(e.parent)?i<4:!A_(e)&&(KI(e,a)||!1)}}}function g(e,t){return 219!==e.kind&&218!==e.kind?AD(e)||(g_(e)||172===e.kind&&!$v(e))&&(!t||t!==e.name):(!t||t!==e.name)&&(!(!e.asteriskToken&&!Wv(e,1024))||!fm(e))}function y(e,t){switch(e.kind){case 169:return!!t&&t===e.name;case 262:case 263:case 264:case 266:case 265:case 267:return!0;default:return!1}}function v(e,t){if(e.declarations)for(const n of e.declarations)if(168===n.kind){if((IF(n.parent)?Zg(n.parent):n.parent)===t)return!(IF(n.parent)&&C(n.parent.parent.tags,Mg))}return!1}}function jC(e,t=!0){switch(Tn.type(e),e.kind){case 112:case 97:case 9:case 11:case 15:return!0;case 10:return t;case 224:return 41===e.operator?AN(e.operand)||t&&IN(e.operand):40===e.operator&&AN(e.operand);default:return!1}}function LC(e){for(;217===e.kind;)e=e.expression;return e}function MC(e){switch(Tn.type(e),e.kind){case 169:case 171:case 172:case 208:case 211:case 212:case 226:case 260:case 277:case 303:return!0;default:return!1}}function RC(){let e,t,n,r,i;return{createBaseSourceFileNode:function(e){return new(i||(i=nS.getSourceFileConstructor()))(e,-1,-1)},createBaseIdentifierNode:function(e){return new(n||(n=nS.getIdentifierConstructor()))(e,-1,-1)},createBasePrivateIdentifierNode:function(e){return new(r||(r=nS.getPrivateIdentifierConstructor()))(e,-1,-1)},createBaseTokenNode:function(e){return new(t||(t=nS.getTokenConstructor()))(e,-1,-1)},createBaseNode:function(t){return new(e||(e=nS.getNodeConstructor()))(t,-1,-1)}}}function BC(e){let t,n;return{getParenthesizeLeftSideOfBinaryForOperator:function(e){t||(t=new Map);let n=t.get(e);n||(n=t=>o(e,t),t.set(e,n));return n},getParenthesizeRightSideOfBinaryForOperator:function(e){n||(n=new Map);let t=n.get(e);t||(t=t=>a(e,void 0,t),n.set(e,t));return t},parenthesizeLeftSideOfBinary:o,parenthesizeRightSideOfBinary:a,parenthesizeExpressionOfComputedPropertyName:function(t){return pA(t)?e.createParenthesizedExpression(t):t},parenthesizeConditionOfConditionalExpression:function(t){const n=ky(227,58),r=Ol(t);if(1!==It(by(r),n))return e.createParenthesizedExpression(t);return t},parenthesizeBranchOfConditionalExpression:function(t){return pA(Ol(t))?e.createParenthesizedExpression(t):t},parenthesizeExpressionOfExportDefault:function(t){const n=Ol(t);let r=pA(n);if(!r)switch(Hx(n,!1).kind){case 231:case 218:r=!0}return r?e.createParenthesizedExpression(t):t},parenthesizeExpressionOfNew:function(t){const n=Hx(t,!0);switch(n.kind){case 213:return e.createParenthesizedExpression(t);case 214:return n.arguments?t:e.createParenthesizedExpression(t)}return s(t)},parenthesizeLeftSideOfAccess:s,parenthesizeOperandOfPostfixUnary:function(t){return X_(t)?t:vI(e.createParenthesizedExpression(t),t)},parenthesizeOperandOfPrefixUnary:function(t){return Y_(t)?t:vI(e.createParenthesizedExpression(t),t)},parenthesizeExpressionsOfCommaDelimitedList:function(t){const n=B(t,c);return vI(e.createNodeArray(n,t.hasTrailingComma),t)},parenthesizeExpressionForDisallowedComma:c,parenthesizeExpressionOfExpressionStatement:function(t){const n=Ol(t);if(oP(n)){const r=n.expression,i=Ol(r).kind;if(218===i||219===i){const i=e.updateCallExpression(n,vI(e.createParenthesizedExpression(r),r),n.typeArguments,n.arguments);return e.restoreOuterExpressions(t,i,8)}}const r=Hx(n,!1).kind;if(210===r||218===r)return vI(e.createParenthesizedExpression(t),t);return t},parenthesizeConciseBodyOfArrowFunction:function(t){if(!jP(t)&&(pA(t)||210===Hx(t,!1).kind))return vI(e.createParenthesizedExpression(t),t);return t},parenthesizeCheckTypeOfConditionalType:l,parenthesizeExtendsTypeOfConditionalType:function(t){if(194===t.kind)return e.createParenthesizedType(t);return t},parenthesizeConstituentTypesOfUnionType:function(t){return e.createNodeArray(B(t,_))},parenthesizeConstituentTypeOfUnionType:_,parenthesizeConstituentTypesOfIntersectionType:function(t){return e.createNodeArray(B(t,u))},parenthesizeConstituentTypeOfIntersectionType:u,parenthesizeOperandOfTypeOperator:d,parenthesizeOperandOfReadonlyTypeOperator:function(t){if(198===t.kind)return e.createParenthesizedType(t);return d(t)},parenthesizeNonArrayTypeOfPostfixType:p,parenthesizeElementTypesOfTupleType:function(t){return e.createNodeArray(B(t,f))},parenthesizeElementTypeOfTupleType:f,parenthesizeTypeOfOptionalType:function(t){return m(t)?e.createParenthesizedType(t):p(t)},parenthesizeTypeArguments:function(t){if(ee(t))return e.createNodeArray(B(t,h))},parenthesizeLeadingTypeArgument:g};function r(e){if(Vl((e=Ol(e)).kind))return e.kind;if(226===e.kind&&40===e.operatorToken.kind){if(void 0!==e.cachedLiteralKind)return e.cachedLiteralKind;const t=r(e.left),n=Vl(t)&&t===r(e.right)?t:0;return e.cachedLiteralKind=n,n}return 0}function i(t,n,i,o){return 217===Ol(n).kind?n:function(e,t,n,i){const o=ky(226,e),a=vy(226,e),s=Ol(t);if(!n&&219===t.kind&&o>3)return!0;switch(It(by(s),o)){case-1:return!(!n&&1===a&&229===t.kind);case 1:return!1;case 0:if(n)return 1===a;if(yP(s)&&s.operatorToken.kind===e){if(function(e){return 42===e||52===e||51===e||53===e||28===e}(e))return!1;if(40===e){const e=i?r(i):0;if(Vl(e)&&e===r(s))return!1}}return 0===yy(s)}}(t,n,i,o)?e.createParenthesizedExpression(n):n}function o(e,t){return i(e,t,!0)}function a(e,t,n){return i(e,n,!1,t)}function s(t,n){const r=Ol(t);return!X_(r)||214===r.kind&&!r.arguments||!n&&Dl(r)?vI(e.createParenthesizedExpression(t),t):t}function c(t){return by(Ol(t))>ky(226,28)?t:vI(e.createParenthesizedExpression(t),t)}function l(t){switch(t.kind){case 184:case 185:case 194:return e.createParenthesizedType(t)}return t}function _(t){switch(t.kind){case 192:case 193:return e.createParenthesizedType(t)}return l(t)}function u(t){switch(t.kind){case 192:case 193:return e.createParenthesizedType(t)}return _(t)}function d(t){return 193===t.kind?e.createParenthesizedType(t):u(t)}function p(t){switch(t.kind){case 195:case 198:case 186:return e.createParenthesizedType(t)}return d(t)}function f(t){return m(t)?e.createParenthesizedType(t):t}function m(e){return sF(e)?e.postfix:LD(e)||ED(e)||FD(e)||WD(e)?m(e.type):zD(e)?m(e.falseType):BD(e)||JD(e)?m(Ee(e.types)):!!qD(e)&&(!!e.typeParameter.constraint&&m(e.typeParameter.constraint))}function g(t){return I_(t)&&t.typeParameters?e.createParenthesizedType(t):t}function h(e,t){return 0===t?g(e):e}}var JC={getParenthesizeLeftSideOfBinaryForOperator:e=>yt,getParenthesizeRightSideOfBinaryForOperator:e=>yt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,n)=>n,parenthesizeExpressionOfComputedPropertyName:yt,parenthesizeConditionOfConditionalExpression:yt,parenthesizeBranchOfConditionalExpression:yt,parenthesizeExpressionOfExportDefault:yt,parenthesizeExpressionOfNew:e=>pt(e,X_),parenthesizeLeftSideOfAccess:e=>pt(e,X_),parenthesizeOperandOfPostfixUnary:e=>pt(e,X_),parenthesizeOperandOfPrefixUnary:e=>pt(e,Y_),parenthesizeExpressionsOfCommaDelimitedList:e=>pt(e,Ul),parenthesizeExpressionForDisallowedComma:yt,parenthesizeExpressionOfExpressionStatement:yt,parenthesizeConciseBodyOfArrowFunction:yt,parenthesizeCheckTypeOfConditionalType:yt,parenthesizeExtendsTypeOfConditionalType:yt,parenthesizeConstituentTypesOfUnionType:e=>pt(e,Ul),parenthesizeConstituentTypeOfUnionType:yt,parenthesizeConstituentTypesOfIntersectionType:e=>pt(e,Ul),parenthesizeConstituentTypeOfIntersectionType:yt,parenthesizeOperandOfTypeOperator:yt,parenthesizeOperandOfReadonlyTypeOperator:yt,parenthesizeNonArrayTypeOfPostfixType:yt,parenthesizeElementTypesOfTupleType:e=>pt(e,Ul),parenthesizeElementTypeOfTupleType:yt,parenthesizeTypeOfOptionalType:yt,parenthesizeTypeArguments:e=>e&&pt(e,Ul),parenthesizeLeadingTypeArgument:yt};function zC(e){return{convertToFunctionBlock:function(t,n){if(jP(t))return t;const r=e.createReturnStatement(t);vI(r,t);const i=e.createBlock([r],n);return vI(i,t),i},convertToFunctionExpression:function(t){var n;if(!t.body)return Tn.fail("Cannot convert a FunctionDeclaration without a body");const r=e.createFunctionExpression(null==(n=Rc(t))?void 0:n.filter(e=>!ZN(e)&&!eD(e)),t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);cw(r,t),vI(r,t),bw(t)&&xw(r,!0);return r},convertToClassExpression:function(t){var n;const r=e.createClassExpression(null==(n=t.modifiers)?void 0:n.filter(e=>!ZN(e)&&!eD(e)),t.name,t.typeParameters,t.heritageClauses,t.members);cw(r,t),vI(r,t),bw(t)&&xw(r,!0);return r},convertToArrayAssignmentElement:t,convertToObjectAssignmentElement:n,convertToAssignmentPattern:r,convertToObjectAssignmentPattern:i,convertToArrayAssignmentPattern:o,convertToAssignmentElementTarget:a};function t(t){if(eP(t)){if(t.dotDotDotToken)return Tn.assertNode(t.name,QN),cw(vI(e.createSpreadElement(t.name),t),t);const n=a(t.name);return t.initializer?cw(vI(e.createAssignment(n,t.initializer),t),t):n}return pt(t,nu)}function n(t){if(eP(t)){if(t.dotDotDotToken)return Tn.assertNode(t.name,QN),cw(vI(e.createSpreadAssignment(t.name),t),t);if(t.propertyName){const n=a(t.name);return cw(vI(e.createPropertyAssignment(t.propertyName,t.initializer?e.createAssignment(n,t.initializer):n),t),t)}return Tn.assertNode(t.name,QN),cw(vI(e.createShorthandPropertyAssignment(t.name,t.initializer),t),t)}return pt(t,F_)}function r(e){switch(e.kind){case 207:case 209:return o(e);case 206:case 210:return i(e)}}function i(t){return YD(t)?cw(vI(e.createObjectLiteralExpression(M(t.elements,n)),t),t):pt(t,nP)}function o(n){return ZD(n)?cw(vI(e.createArrayLiteralExpression(M(n.elements,t)),n),n):pt(n,tP)}function a(e){return O_(e)?r(e):pt(e,nu)}}var qC,UC={convertToFunctionBlock:St,convertToFunctionExpression:St,convertToClassExpression:St,convertToArrayAssignmentElement:St,convertToObjectAssignmentElement:St,convertToAssignmentPattern:St,convertToObjectAssignmentPattern:St,convertToArrayAssignmentPattern:St,convertToAssignmentElementTarget:St},VC=0,WC=(e=>(e[e.None=0]="None",e[e.NoParenthesizerRules=1]="NoParenthesizerRules",e[e.NoNodeConverters=2]="NoNodeConverters",e[e.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",e[e.NoOriginalNode=8]="NoOriginalNode",e))(WC||{}),$C=[];function HC(e){$C.push(e)}function KC(e,t){const n=8&e?yt:cw,r=kt(()=>1&e?JC:BC(v)),i=kt(()=>2&e?UC:zC(v)),o=Tt(e=>(t,n)=>Ot(t,e,n)),a=Tt(e=>t=>At(e,t)),s=Tt(e=>t=>It(t,e)),c=Tt(e=>()=>function(e){return x(e)}(e)),l=Tt(e=>t=>ur(e,t)),_=Tt(e=>(t,n)=>function(e,t,n){return t.type!==n?Ii(ur(e,n),t):t}(e,t,n)),u=Tt(e=>(t,n)=>_r(e,t,n)),d=Tt(e=>(t,n)=>function(e,t,n){return t.type!==n?Ii(_r(e,n,t.postfix),t):t}(e,t,n)),f=Tt(e=>(t,n)=>Ir(e,t,n)),m=Tt(e=>(t,n,r)=>function(e,t,n=gr(t),r){return t.tagName!==n||t.comment!==r?Ii(Ir(e,n,r),t):t}(e,t,n,r)),g=Tt(e=>(t,n,r)=>Or(e,t,n,r)),y=Tt(e=>(t,n,r,i)=>function(e,t,n=gr(t),r,i){return t.tagName!==n||t.typeExpression!==r||t.comment!==i?Ii(Or(e,n,r,i),t):t}(e,t,n,r,i)),v={get parenthesizer(){return r()},get converters(){return i()},baseFactory:t,flags:e,createNodeArray:b,createNumericLiteral:C,createBigIntLiteral:w,createStringLiteral:D,createStringLiteralFromNode:function(e){const t=N(ey(e),void 0);return t.textSourceNode=e,t},createRegularExpressionLiteral:P,createLiteralLikeNode:function(e,t){switch(e){case 9:return C(t,0);case 10:return w(t);case 11:return D(t,void 0);case 12:return Wr(t,!1);case 13:return Wr(t,!0);case 14:return P(t);case 15:return zt(e,t,void 0,0)}},createIdentifier:A,createTempVariable:I,createLoopVariable:function(e){let t=2;e&&(t|=8);return F("",t,void 0,void 0)},createUniqueName:function(e,t=0,n,r){return Tn.assert(!(7&t),"Argument out of range: flags"),Tn.assert(32!=(48&t),"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),F(e,3|t,n,r)},getGeneratedNameForNode:O,createPrivateIdentifier:function(e){ln(e,"#")||Tn.fail("First character of private identifier must be #: "+e);return j(Tc(e))},createUniquePrivateName:function(e,t,n){e&&!ln(e,"#")&&Tn.fail("First character of private identifier must be #: "+e);return L(e??"",8|(e?3:1),t,n)},getGeneratedPrivateNameForNode:function(e,t,n){const r=kl(e)?uI(!0,t,e,n,wc):`#generated@${KB(e)}`,i=L(r,4|(t||n?16:0),t,n);return i.original=e,i},createToken:R,createSuper:function(){return R(108)},createThis:B,createNull:J,createTrue:z,createFalse:q,createModifier:U,createModifiersFromModifierFlags:W,createQualifiedName:$,updateQualifiedName:function(e,t,n){return e.left!==t||e.right!==n?Ii($(t,n),e):e},createComputedPropertyName:H,updateComputedPropertyName:function(e,t){return e.expression!==t?Ii(H(t),e):e},createTypeParameterDeclaration:K,updateTypeParameterDeclaration:G,createParameterDeclaration:X,updateParameterDeclaration:Q,createDecorator:Y,updateDecorator:function(e,t){return e.expression!==t?Ii(Y(t),e):e},createPropertySignature:Z,updatePropertySignature:te,createPropertyDeclaration:ne,updatePropertyDeclaration:re,createMethodSignature:ie,updateMethodSignature:oe,createMethodDeclaration:ae,updateMethodDeclaration:se,createConstructorDeclaration:le,updateConstructorDeclaration:_e,createGetAccessorDeclaration:ue,updateGetAccessorDeclaration:de,createSetAccessorDeclaration:fe,updateSetAccessorDeclaration:me,createCallSignature:ge,updateCallSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?k(ge(t,n,r),e):e},createConstructSignature:he,updateConstructSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?k(he(t,n,r),e):e},createIndexSignature:ye,updateIndexSignature:ve,createClassStaticBlockDeclaration:ce,updateClassStaticBlockDeclaration:function(e,t){return e.body!==t?function(e,t){e!==t&&(e.modifiers=t.modifiers);return Ii(e,t)}(ce(t),e):e},createTemplateLiteralTypeSpan:be,updateTemplateLiteralTypeSpan:function(e,t,n){return e.type!==t||e.literal!==n?Ii(be(t,n),e):e},createKeywordTypeNode:function(e){return R(e)},createTypePredicateNode:xe,updateTypePredicateNode:function(e,t,n,r){return e.assertsModifier!==t||e.parameterName!==n||e.type!==r?Ii(xe(t,n,r),e):e},createTypeReferenceNode:Se,updateTypeReferenceNode:function(e,t,n){return e.typeName!==t||e.typeArguments!==n?Ii(Se(t,n),e):e},createFunctionTypeNode:ke,updateFunctionTypeNode:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?function(e,t){e!==t&&(e.modifiers=t.modifiers);return k(e,t)}(ke(t,n,r),e):e},createConstructorTypeNode:Te,updateConstructorTypeNode:function(...e){return 5===e.length?we(...e):4===e.length?function(e,t,n,r){return we(e,e.modifiers,t,n,r)}(...e):Tn.fail("Incorrect number of arguments specified.")},createTypeQueryNode:Ne,updateTypeQueryNode:function(e,t,n){return e.exprName!==t||e.typeArguments!==n?Ii(Ne(t,n),e):e},createTypeLiteralNode:De,updateTypeLiteralNode:function(e,t){return e.members!==t?Ii(De(t),e):e},createArrayTypeNode:Ee,updateArrayTypeNode:function(e,t){return e.elementType!==t?Ii(Ee(t),e):e},createTupleTypeNode:Ae,updateTupleTypeNode:function(e,t){return e.elements!==t?Ii(Ae(t),e):e},createNamedTupleMember:Ie,updateNamedTupleMember:function(e,t,n,r,i){return e.dotDotDotToken!==t||e.name!==n||e.questionToken!==r||e.type!==i?Ii(Ie(t,n,r,i),e):e},createOptionalTypeNode:Oe,updateOptionalTypeNode:function(e,t){return e.type!==t?Ii(Oe(t),e):e},createRestTypeNode:je,updateRestTypeNode:function(e,t){return e.type!==t?Ii(je(t),e):e},createUnionTypeNode:function(e){return Le(192,e,r().parenthesizeConstituentTypesOfUnionType)},updateUnionTypeNode:function(e,t){return Re(e,t,r().parenthesizeConstituentTypesOfUnionType)},createIntersectionTypeNode:function(e){return Le(193,e,r().parenthesizeConstituentTypesOfIntersectionType)},updateIntersectionTypeNode:function(e,t){return Re(e,t,r().parenthesizeConstituentTypesOfIntersectionType)},createConditionalTypeNode:Je,updateConditionalTypeNode:function(e,t,n,r,i){return e.checkType!==t||e.extendsType!==n||e.trueType!==r||e.falseType!==i?Ii(Je(t,n,r,i),e):e},createInferTypeNode:ze,updateInferTypeNode:function(e,t){return e.typeParameter!==t?Ii(ze(t),e):e},createImportTypeNode:Ue,updateImportTypeNode:function(e,t,n,r,i,o=e.isTypeOf){return e.argument!==t||e.attributes!==n||e.qualifier!==r||e.typeArguments!==i||e.isTypeOf!==o?Ii(Ue(t,n,r,i,o),e):e},createParenthesizedType:Ve,updateParenthesizedType:function(e,t){return e.type!==t?Ii(Ve(t),e):e},createThisTypeNode:function(){const e=x(197);return e.transformFlags=1,e},createTypeOperatorNode:We,updateTypeOperatorNode:function(e,t){return e.type!==t?Ii(We(e.operator,t),e):e},createIndexedAccessTypeNode:$e,updateIndexedAccessTypeNode:function(e,t,n){return e.objectType!==t||e.indexType!==n?Ii($e(t,n),e):e},createMappedTypeNode:He,updateMappedTypeNode:function(e,t,n,r,i,o,a){return e.readonlyToken!==t||e.typeParameter!==n||e.nameType!==r||e.questionToken!==i||e.type!==o||e.members!==a?Ii(He(t,n,r,i,o,a),e):e},createLiteralTypeNode:Ke,updateLiteralTypeNode:function(e,t){return e.literal!==t?Ii(Ke(t),e):e},createTemplateLiteralType:qe,updateTemplateLiteralType:function(e,t,n){return e.head!==t||e.templateSpans!==n?Ii(qe(t,n),e):e},createObjectBindingPattern:Ge,updateObjectBindingPattern:function(e,t){return e.elements!==t?Ii(Ge(t),e):e},createArrayBindingPattern:Xe,updateArrayBindingPattern:function(e,t){return e.elements!==t?Ii(Xe(t),e):e},createBindingElement:Qe,updateBindingElement:function(e,t,n,r,i){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==r||e.initializer!==i?Ii(Qe(t,n,r,i),e):e},createArrayLiteralExpression:Ye,updateArrayLiteralExpression:function(e,t){return e.elements!==t?Ii(Ye(t,e.multiLine),e):e},createObjectLiteralExpression:Ze,updateObjectLiteralExpression:function(e,t){return e.properties!==t?Ii(Ze(t,e.multiLine),e):e},createPropertyAccessExpression:4&e?(e,t)=>dw(tt(e,t),262144):tt,updatePropertyAccessExpression:function(e,t,n){if(Cl(e))return rt(e,t,e.questionDotToken,pt(n,QN));return e.expression!==t||e.name!==n?Ii(tt(t,n),e):e},createPropertyAccessChain:4&e?(e,t,n)=>dw(nt(e,t,n),262144):nt,updatePropertyAccessChain:rt,createElementAccessExpression:ot,updateElementAccessExpression:function(e,t,n){if(wl(e))return st(e,t,e.questionDotToken,n);return e.expression!==t||e.argumentExpression!==n?Ii(ot(t,n),e):e},createElementAccessChain:at,updateElementAccessChain:st,createCallExpression:_t,updateCallExpression:function(e,t,n,r){if(Nl(e))return dt(e,t,e.questionDotToken,n,r);return e.expression!==t||e.typeArguments!==n||e.arguments!==r?Ii(_t(t,n,r),e):e},createCallChain:ut,updateCallChain:dt,createNewExpression:ft,updateNewExpression:function(e,t,n,r){return e.expression!==t||e.typeArguments!==n||e.arguments!==r?Ii(ft(t,n,r),e):e},createTaggedTemplateExpression:mt,updateTaggedTemplateExpression:function(e,t,n,r){return e.tag!==t||e.typeArguments!==n||e.template!==r?Ii(mt(t,n,r),e):e},createTypeAssertion:ht,updateTypeAssertion:vt,createParenthesizedExpression:bt,updateParenthesizedExpression:xt,createFunctionExpression:St,updateFunctionExpression:Ct,createArrowFunction:wt,updateArrowFunction:Nt,createDeleteExpression:Dt,updateDeleteExpression:function(e,t){return e.expression!==t?Ii(Dt(t),e):e},createTypeOfExpression:Pt,updateTypeOfExpression:function(e,t){return e.expression!==t?Ii(Pt(t),e):e},createVoidExpression:Et,updateVoidExpression:function(e,t){return e.expression!==t?Ii(Et(t),e):e},createAwaitExpression:Ft,updateAwaitExpression:function(e,t){return e.expression!==t?Ii(Ft(t),e):e},createPrefixUnaryExpression:At,updatePrefixUnaryExpression:function(e,t){return e.operand!==t?Ii(At(e.operator,t),e):e},createPostfixUnaryExpression:It,updatePostfixUnaryExpression:function(e,t){return e.operand!==t?Ii(It(t,e.operator),e):e},createBinaryExpression:Ot,updateBinaryExpression:function(e,t,n,r){return e.left!==t||e.operatorToken!==n||e.right!==r?Ii(Ot(t,n,r),e):e},createConditionalExpression:Lt,updateConditionalExpression:function(e,t,n,r,i,o){return e.condition!==t||e.questionToken!==n||e.whenTrue!==r||e.colonToken!==i||e.whenFalse!==o?Ii(Lt(t,n,r,i,o),e):e},createTemplateExpression:Mt,updateTemplateExpression:function(e,t,n){return e.head!==t||e.templateSpans!==n?Ii(Mt(t,n),e):e},createTemplateHead:function(e,t,n){return zt(16,e=Rt(16,e,t,n),t,n)},createTemplateMiddle:function(e,t,n){return zt(17,e=Rt(16,e,t,n),t,n)},createTemplateTail:function(e,t,n){return zt(18,e=Rt(16,e,t,n),t,n)},createNoSubstitutionTemplateLiteral:function(e,t,n){return Jt(15,e=Rt(16,e,t,n),t,n)},createTemplateLiteralLikeNode:zt,createYieldExpression:qt,updateYieldExpression:function(e,t,n){return e.expression!==n||e.asteriskToken!==t?Ii(qt(t,n),e):e},createSpreadElement:Ut,updateSpreadElement:function(e,t){return e.expression!==t?Ii(Ut(t),e):e},createClassExpression:Vt,updateClassExpression:Wt,createOmittedExpression:function(){return x(232)},createExpressionWithTypeArguments:$t,updateExpressionWithTypeArguments:function(e,t,n){return e.expression!==t||e.typeArguments!==n?Ii($t(t,n),e):e},createAsExpression:Ht,updateAsExpression:Kt,createNonNullExpression:Gt,updateNonNullExpression:Xt,createSatisfiesExpression:Qt,updateSatisfiesExpression:Yt,createNonNullChain:Zt,updateNonNullChain:en,createMetaProperty:tn,updateMetaProperty:function(e,t){return e.name!==t?Ii(tn(e.keywordToken,t),e):e},createTemplateSpan:nn,updateTemplateSpan:function(e,t,n){return e.expression!==t||e.literal!==n?Ii(nn(t,n),e):e},createSemicolonClassElement:function(){const e=x(240);return e.transformFlags|=1024,e},createBlock:rn,updateBlock:function(e,t){return e.statements!==t?Ii(rn(t,e.multiLine),e):e},createVariableStatement:on,updateVariableStatement:an,createEmptyStatement:sn,createExpressionStatement:cn,updateExpressionStatement:function(e,t){return e.expression!==t?Ii(cn(t),e):e},createIfStatement:_n,updateIfStatement:function(e,t,n,r){return e.expression!==t||e.thenStatement!==n||e.elseStatement!==r?Ii(_n(t,n,r),e):e},createDoStatement:un,updateDoStatement:function(e,t,n){return e.statement!==t||e.expression!==n?Ii(un(t,n),e):e},createWhileStatement:dn,updateWhileStatement:function(e,t,n){return e.expression!==t||e.statement!==n?Ii(dn(t,n),e):e},createForStatement:pn,updateForStatement:function(e,t,n,r,i){return e.initializer!==t||e.condition!==n||e.incrementor!==r||e.statement!==i?Ii(pn(t,n,r,i),e):e},createForInStatement:fn,updateForInStatement:function(e,t,n,r){return e.initializer!==t||e.expression!==n||e.statement!==r?Ii(fn(t,n,r),e):e},createForOfStatement:mn,updateForOfStatement:function(e,t,n,r,i){return e.awaitModifier!==t||e.initializer!==n||e.expression!==r||e.statement!==i?Ii(mn(t,n,r,i),e):e},createContinueStatement:gn,updateContinueStatement:function(e,t){return e.label!==t?Ii(gn(t),e):e},createBreakStatement:hn,updateBreakStatement:function(e,t){return e.label!==t?Ii(hn(t),e):e},createReturnStatement:yn,updateReturnStatement:function(e,t){return e.expression!==t?Ii(yn(t),e):e},createWithStatement:vn,updateWithStatement:function(e,t,n){return e.expression!==t||e.statement!==n?Ii(vn(t,n),e):e},createSwitchStatement:bn,updateSwitchStatement:function(e,t,n){return e.expression!==t||e.caseBlock!==n?Ii(bn(t,n),e):e},createLabeledStatement:xn,updateLabeledStatement:Sn,createThrowStatement:kn,updateThrowStatement:function(e,t){return e.expression!==t?Ii(kn(t),e):e},createTryStatement:Cn,updateTryStatement:function(e,t,n,r){return e.tryBlock!==t||e.catchClause!==n||e.finallyBlock!==r?Ii(Cn(t,n,r),e):e},createDebuggerStatement:function(){const e=x(259);return e.jsDoc=void 0,e.flowNode=void 0,e},createVariableDeclaration:wn,updateVariableDeclaration:function(e,t,n,r,i){return e.name!==t||e.type!==r||e.exclamationToken!==n||e.initializer!==i?Ii(wn(t,n,r,i),e):e},createVariableDeclarationList:Nn,updateVariableDeclarationList:function(e,t){return e.declarations!==t?Ii(Nn(t,e.flags),e):e},createFunctionDeclaration:Dn,updateFunctionDeclaration:Pn,createClassDeclaration:En,updateClassDeclaration:Fn,createInterfaceDeclaration:An,updateInterfaceDeclaration:In,createTypeAliasDeclaration:On,updateTypeAliasDeclaration:jn,createEnumDeclaration:Ln,updateEnumDeclaration:Mn,createModuleDeclaration:Rn,updateModuleDeclaration:Bn,createModuleBlock:Jn,updateModuleBlock:function(e,t){return e.statements!==t?Ii(Jn(t),e):e},createCaseBlock:zn,updateCaseBlock:function(e,t){return e.clauses!==t?Ii(zn(t),e):e},createNamespaceExportDeclaration:qn,updateNamespaceExportDeclaration:function(e,t){return e.name!==t?function(e,t){e!==t&&(e.modifiers=t.modifiers);return Ii(e,t)}(qn(t),e):e},createImportEqualsDeclaration:Un,updateImportEqualsDeclaration:Vn,createImportDeclaration:Wn,updateImportDeclaration:$n,createImportClause:Hn,updateImportClause:function(e,t,n,r){return e.isTypeOnly!==t||e.name!==n||e.namedBindings!==r?Ii(Hn(t,n,r),e):e},createAssertClause:Kn,updateAssertClause:function(e,t,n){return e.elements!==t||e.multiLine!==n?Ii(Kn(t,n),e):e},createAssertEntry:Gn,updateAssertEntry:function(e,t,n){return e.name!==t||e.value!==n?Ii(Gn(t,n),e):e},createImportTypeAssertionContainer:Xn,updateImportTypeAssertionContainer:function(e,t,n){return e.assertClause!==t||e.multiLine!==n?Ii(Xn(t,n),e):e},createImportAttributes:Qn,updateImportAttributes:function(e,t,n){return e.elements!==t||e.multiLine!==n?Ii(Qn(t,n,e.token),e):e},createImportAttribute:Yn,updateImportAttribute:function(e,t,n){return e.name!==t||e.value!==n?Ii(Yn(t,n),e):e},createNamespaceImport:Zn,updateNamespaceImport:function(e,t){return e.name!==t?Ii(Zn(t),e):e},createNamespaceExport:er,updateNamespaceExport:function(e,t){return e.name!==t?Ii(er(t),e):e},createNamedImports:tr,updateNamedImports:function(e,t){return e.elements!==t?Ii(tr(t),e):e},createImportSpecifier:nr,updateImportSpecifier:function(e,t,n,r){return e.isTypeOnly!==t||e.propertyName!==n||e.name!==r?Ii(nr(t,n,r),e):e},createExportAssignment:rr,updateExportAssignment:ir,createExportDeclaration:or,updateExportDeclaration:ar,createNamedExports:sr,updateNamedExports:function(e,t){return e.elements!==t?Ii(sr(t),e):e},createExportSpecifier:cr,updateExportSpecifier:function(e,t,n,r){return e.isTypeOnly!==t||e.propertyName!==n||e.name!==r?Ii(cr(t,n,r),e):e},createMissingDeclaration:function(){const e=S(282);return e.jsDoc=void 0,e},createExternalModuleReference:lr,updateExternalModuleReference:function(e,t){return e.expression!==t?Ii(lr(t),e):e},get createJSDocAllType(){return c(312)},get createJSDocUnknownType(){return c(313)},get createJSDocNonNullableType(){return u(315)},get updateJSDocNonNullableType(){return d(315)},get createJSDocNullableType(){return u(314)},get updateJSDocNullableType(){return d(314)},get createJSDocOptionalType(){return l(316)},get updateJSDocOptionalType(){return _(316)},get createJSDocVariadicType(){return l(318)},get updateJSDocVariadicType(){return _(318)},get createJSDocNamepathType(){return l(319)},get updateJSDocNamepathType(){return _(319)},createJSDocFunctionType:dr,updateJSDocFunctionType:function(e,t,n){return e.parameters!==t||e.type!==n?Ii(dr(t,n),e):e},createJSDocTypeLiteral:pr,updateJSDocTypeLiteral:function(e,t,n){return e.jsDocPropertyTags!==t||e.isArrayType!==n?Ii(pr(t,n),e):e},createJSDocTypeExpression:fr,updateJSDocTypeExpression:function(e,t){return e.type!==t?Ii(fr(t),e):e},createJSDocSignature:mr,updateJSDocSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?Ii(mr(t,n,r),e):e},createJSDocTemplateTag:vr,updateJSDocTemplateTag:function(e,t=gr(e),n,r,i){return e.tagName!==t||e.constraint!==n||e.typeParameters!==r||e.comment!==i?Ii(vr(t,n,r,i),e):e},createJSDocTypedefTag:br,updateJSDocTypedefTag:function(e,t=gr(e),n,r,i){return e.tagName!==t||e.typeExpression!==n||e.fullName!==r||e.comment!==i?Ii(br(t,n,r,i),e):e},createJSDocParameterTag:xr,updateJSDocParameterTag:function(e,t=gr(e),n,r,i,o,a){return e.tagName!==t||e.name!==n||e.isBracketed!==r||e.typeExpression!==i||e.isNameFirst!==o||e.comment!==a?Ii(xr(t,n,r,i,o,a),e):e},createJSDocPropertyTag:Sr,updateJSDocPropertyTag:function(e,t=gr(e),n,r,i,o,a){return e.tagName!==t||e.name!==n||e.isBracketed!==r||e.typeExpression!==i||e.isNameFirst!==o||e.comment!==a?Ii(Sr(t,n,r,i,o,a),e):e},createJSDocCallbackTag:kr,updateJSDocCallbackTag:function(e,t=gr(e),n,r,i){return e.tagName!==t||e.typeExpression!==n||e.fullName!==r||e.comment!==i?Ii(kr(t,n,r,i),e):e},createJSDocOverloadTag:Tr,updateJSDocOverloadTag:function(e,t=gr(e),n,r){return e.tagName!==t||e.typeExpression!==n||e.comment!==r?Ii(Tr(t,n,r),e):e},createJSDocAugmentsTag:Cr,updateJSDocAugmentsTag:function(e,t=gr(e),n,r){return e.tagName!==t||e.class!==n||e.comment!==r?Ii(Cr(t,n,r),e):e},createJSDocImplementsTag:wr,updateJSDocImplementsTag:function(e,t=gr(e),n,r){return e.tagName!==t||e.class!==n||e.comment!==r?Ii(wr(t,n,r),e):e},createJSDocSeeTag:Nr,updateJSDocSeeTag:function(e,t,n,r){return e.tagName!==t||e.name!==n||e.comment!==r?Ii(Nr(t,n,r),e):e},createJSDocImportTag:Mr,updateJSDocImportTag:function(e,t,n,r,i,o){return e.tagName!==t||e.comment!==o||e.importClause!==n||e.moduleSpecifier!==r||e.attributes!==i?Ii(Mr(t,n,r,i,o),e):e},createJSDocNameReference:Dr,updateJSDocNameReference:function(e,t){return e.name!==t?Ii(Dr(t),e):e},createJSDocMemberName:Pr,updateJSDocMemberName:function(e,t,n){return e.left!==t||e.right!==n?Ii(Pr(t,n),e):e},createJSDocLink:Er,updateJSDocLink:function(e,t,n){return e.name!==t?Ii(Er(t,n),e):e},createJSDocLinkCode:Fr,updateJSDocLinkCode:function(e,t,n){return e.name!==t?Ii(Fr(t,n),e):e},createJSDocLinkPlain:Ar,updateJSDocLinkPlain:function(e,t,n){return e.name!==t?Ii(Ar(t,n),e):e},get createJSDocTypeTag(){return g(344)},get updateJSDocTypeTag(){return y(344)},get createJSDocReturnTag(){return g(342)},get updateJSDocReturnTag(){return y(342)},get createJSDocThisTag(){return g(343)},get updateJSDocThisTag(){return y(343)},get createJSDocAuthorTag(){return f(330)},get updateJSDocAuthorTag(){return m(330)},get createJSDocClassTag(){return f(332)},get updateJSDocClassTag(){return m(332)},get createJSDocPublicTag(){return f(333)},get updateJSDocPublicTag(){return m(333)},get createJSDocPrivateTag(){return f(334)},get updateJSDocPrivateTag(){return m(334)},get createJSDocProtectedTag(){return f(335)},get updateJSDocProtectedTag(){return m(335)},get createJSDocReadonlyTag(){return f(336)},get updateJSDocReadonlyTag(){return m(336)},get createJSDocOverrideTag(){return f(337)},get updateJSDocOverrideTag(){return m(337)},get createJSDocDeprecatedTag(){return f(331)},get updateJSDocDeprecatedTag(){return m(331)},get createJSDocThrowsTag(){return g(349)},get updateJSDocThrowsTag(){return y(349)},get createJSDocSatisfiesTag(){return g(350)},get updateJSDocSatisfiesTag(){return y(350)},createJSDocEnumTag:Lr,updateJSDocEnumTag:function(e,t=gr(e),n,r){return e.tagName!==t||e.typeExpression!==n||e.comment!==r?Ii(Lr(t,n,r),e):e},createJSDocUnknownTag:jr,updateJSDocUnknownTag:function(e,t,n){return e.tagName!==t||e.comment!==n?Ii(jr(t,n),e):e},createJSDocText:Rr,updateJSDocText:function(e,t){return e.text!==t?Ii(Rr(t),e):e},createJSDocComment:Br,updateJSDocComment:function(e,t,n){return e.comment!==t||e.tags!==n?Ii(Br(t,n),e):e},createJsxElement:Jr,updateJsxElement:function(e,t,n,r){return e.openingElement!==t||e.children!==n||e.closingElement!==r?Ii(Jr(t,n,r),e):e},createJsxSelfClosingElement:zr,updateJsxSelfClosingElement:function(e,t,n,r){return e.tagName!==t||e.typeArguments!==n||e.attributes!==r?Ii(zr(t,n,r),e):e},createJsxOpeningElement:qr,updateJsxOpeningElement:function(e,t,n,r){return e.tagName!==t||e.typeArguments!==n||e.attributes!==r?Ii(qr(t,n,r),e):e},createJsxClosingElement:Ur,updateJsxClosingElement:function(e,t){return e.tagName!==t?Ii(Ur(t),e):e},createJsxFragment:Vr,createJsxText:Wr,updateJsxText:function(e,t,n){return e.text!==t||e.containsOnlyTriviaWhiteSpaces!==n?Ii(Wr(t,n),e):e},createJsxOpeningFragment:function(){const e=x(289);return e.transformFlags|=2,e},createJsxJsxClosingFragment:function(){const e=x(290);return e.transformFlags|=2,e},updateJsxFragment:function(e,t,n,r){return e.openingFragment!==t||e.children!==n||e.closingFragment!==r?Ii(Vr(t,n,r),e):e},createJsxAttribute:$r,updateJsxAttribute:function(e,t,n){return e.name!==t||e.initializer!==n?Ii($r(t,n),e):e},createJsxAttributes:Hr,updateJsxAttributes:function(e,t){return e.properties!==t?Ii(Hr(t),e):e},createJsxSpreadAttribute:Kr,updateJsxSpreadAttribute:function(e,t){return e.expression!==t?Ii(Kr(t),e):e},createJsxExpression:Gr,updateJsxExpression:function(e,t){return e.expression!==t?Ii(Gr(e.dotDotDotToken,t),e):e},createJsxNamespacedName:Xr,updateJsxNamespacedName:function(e,t,n){return e.namespace!==t||e.name!==n?Ii(Xr(t,n),e):e},createCaseClause:Qr,updateCaseClause:function(e,t,n){return e.expression!==t||e.statements!==n?Ii(Qr(t,n),e):e},createDefaultClause:Yr,updateDefaultClause:function(e,t){return e.statements!==t?Ii(Yr(t),e):e},createHeritageClause:Zr,updateHeritageClause:function(e,t){return e.types!==t?Ii(Zr(e.token,t),e):e},createCatchClause:ei,updateCatchClause:function(e,t,n){return e.variableDeclaration!==t||e.block!==n?Ii(ei(t,n),e):e},createPropertyAssignment:ti,updatePropertyAssignment:ni,createShorthandPropertyAssignment:ri,updateShorthandPropertyAssignment:function(e,t,n){return e.name!==t||e.objectAssignmentInitializer!==n?function(e,t){e!==t&&(e.modifiers=t.modifiers,e.questionToken=t.questionToken,e.exclamationToken=t.exclamationToken,e.equalsToken=t.equalsToken);return Ii(e,t)}(ri(t,n),e):e},createSpreadAssignment:ii,updateSpreadAssignment:function(e,t){return e.expression!==t?Ii(ii(t),e):e},createEnumMember:oi,updateEnumMember:function(e,t,n){return e.name!==t||e.initializer!==n?Ii(oi(t,n),e):e},createSourceFile:function(e,n,r){const i=t.createBaseSourceFileNode(307);return i.statements=b(e),i.endOfFileToken=n,i.flags|=r,i.text="",i.fileName="",i.path="",i.resolvedPath="",i.originalFileName="",i.languageVersion=1,i.languageVariant=0,i.scriptKind=0,i.isDeclarationFile=!1,i.hasNoDefaultLib=!1,i.transformFlags|=ew(i.statements)|ZC(i.endOfFileToken),i.locals=void 0,i.nextContainer=void 0,i.endFlowNode=void 0,i.nodeCount=0,i.identifierCount=0,i.symbolCount=0,i.parseDiagnostics=void 0,i.bindDiagnostics=void 0,i.bindSuggestionDiagnostics=void 0,i.lineMap=void 0,i.externalModuleIndicator=void 0,i.setExternalModuleIndicator=void 0,i.pragmas=void 0,i.checkJsDirective=void 0,i.referencedFiles=void 0,i.typeReferenceDirectives=void 0,i.libReferenceDirectives=void 0,i.amdDependencies=void 0,i.commentDirectives=void 0,i.identifiers=void 0,i.packageJsonLocations=void 0,i.packageJsonScope=void 0,i.imports=void 0,i.moduleAugmentations=void 0,i.ambientModuleNames=void 0,i.classifiableNames=void 0,i.impliedNodeFormat=void 0,i},updateSourceFile:function(e,t,n=e.isDeclarationFile,r=e.referencedFiles,i=e.typeReferenceDirectives,o=e.hasNoDefaultLib,a=e.libReferenceDirectives){return e.statements!==t||e.isDeclarationFile!==n||e.referencedFiles!==r||e.typeReferenceDirectives!==i||e.hasNoDefaultLib!==o||e.libReferenceDirectives!==a?Ii(function(e,t,n,r,i,o,a){const s=si(e);return s.statements=b(t),s.isDeclarationFile=n,s.referencedFiles=r,s.typeReferenceDirectives=i,s.hasNoDefaultLib=o,s.libReferenceDirectives=a,s.transformFlags=ew(s.statements)|ZC(s.endOfFileToken),s}(e,t,n,r,i,o,a),e):e},createRedirectedSourceFile:ai,createBundle:ci,updateBundle:function(e,t){return e.sourceFiles!==t?Ii(ci(t),e):e},createSyntheticExpression:function(e,t=!1,n){const r=x(237);return r.type=e,r.isSpread=t,r.tupleNameSource=n,r},createSyntaxList:function(e){const t=x(352);return WF(t,e),t},createNotEmittedStatement:function(e){const t=x(353);return t.original=e,vI(t,e),t},createPartiallyEmittedExpression:li,updatePartiallyEmittedExpression:_i,createCommaListExpression:di,updateCommaListExpression:function(e,t){return e.elements!==t?Ii(di(t),e):e},createSyntheticReferenceExpression:pi,updateSyntheticReferenceExpression:function(e,t,n){return e.expression!==t||e.thisArg!==n?Ii(pi(t,n),e):e},cloneNode:fi,get createComma(){return o(28)},get createAssignment(){return o(64)},get createLogicalOr(){return o(57)},get createLogicalAnd(){return o(56)},get createBitwiseOr(){return o(52)},get createBitwiseXor(){return o(53)},get createBitwiseAnd(){return o(51)},get createStrictEquality(){return o(37)},get createStrictInequality(){return o(38)},get createEquality(){return o(35)},get createInequality(){return o(36)},get createLessThan(){return o(30)},get createLessThanEquals(){return o(33)},get createGreaterThan(){return o(32)},get createGreaterThanEquals(){return o(34)},get createLeftShift(){return o(48)},get createRightShift(){return o(49)},get createUnsignedRightShift(){return o(50)},get createAdd(){return o(40)},get createSubtract(){return o(41)},get createMultiply(){return o(42)},get createDivide(){return o(44)},get createModulo(){return o(45)},get createExponent(){return o(43)},get createPrefixPlus(){return a(40)},get createPrefixMinus(){return a(41)},get createPrefixIncrement(){return a(46)},get createPrefixDecrement(){return a(47)},get createBitwiseNot(){return a(55)},get createLogicalNot(){return a(54)},get createPostfixIncrement(){return s(46)},get createPostfixDecrement(){return s(47)},createImmediatelyInvokedFunctionExpression:function(e,t,n){return _t(St(void 0,void 0,void 0,void 0,t?[t]:[],void 0,rn(e,!0)),void 0,n?[n]:[])},createImmediatelyInvokedArrowFunction:function(e,t,n){return _t(wt(void 0,void 0,t?[t]:[],void 0,void 0,rn(e,!0)),void 0,n?[n]:[])},createVoidZero:mi,createExportDefault:function(e){return rr(void 0,!1,e)},createExternalModuleExport:function(e){return or(void 0,!1,sr([cr(!1,void 0,e)]))},createTypeCheck:function(e,t){return"null"===t?v.createStrictEquality(e,J()):"undefined"===t?v.createStrictEquality(e,mi()):v.createStrictEquality(Pt(e),D(t))},createIsNotTypeCheck:function(e,t){return"null"===t?v.createStrictInequality(e,J()):"undefined"===t?v.createStrictInequality(e,mi()):v.createStrictInequality(Pt(e),D(t))},createMethodCall:gi,createGlobalMethodCall:hi,createFunctionBindCall:function(e,t,n){return gi(e,"bind",[t,...n])},createFunctionCallCall:function(e,t,n){return gi(e,"call",[t,...n])},createFunctionApplyCall:function(e,t,n){return gi(e,"apply",[t,n])},createArraySliceCall:function(e,t){return gi(e,"slice",void 0===t?[]:[Ei(t)])},createArrayConcatCall:function(e,t){return gi(e,"concat",t)},createObjectDefinePropertyCall:function(e,t,n){return hi("Object","defineProperty",[e,Ei(t),n])},createObjectGetOwnPropertyDescriptorCall:function(e,t){return hi("Object","getOwnPropertyDescriptor",[e,Ei(t)])},createReflectGetCall:function(e,t,n){return hi("Reflect","get",n?[e,t,n]:[e,t])},createReflectSetCall:function(e,t,n,r){return hi("Reflect","set",r?[e,t,n,r]:[e,t,n])},createPropertyDescriptor:function(e,t){const n=[];yi(n,"enumerable",Ei(e.enumerable)),yi(n,"configurable",Ei(e.configurable));let r=yi(n,"writable",Ei(e.writable));r=yi(n,"value",e.value)||r;let i=yi(n,"get",e.get);return i=yi(n,"set",e.set)||i,Tn.assert(!(r&&i),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),Ze(n,!t)},createCallBinding:function(e,t,n,i=!1){const o=hA(e,15);let a,s;gm(o)?(a=B(),s=o):lD(o)?(a=B(),s=void 0!==n&&n<2?vI(A("_super"),o):o):8192&ip(o)?(a=mi(),s=r().parenthesizeLeftSideOfAccess(o,!1)):rP(o)?vi(o.expression,i)?(a=I(t),s=tt(vI(v.createAssignment(a,o.expression),o.expression),o.name),vI(s,o)):(a=o.expression,s=o):iP(o)?vi(o.expression,i)?(a=I(t),s=ot(vI(v.createAssignment(a,o.expression),o.expression),o.argumentExpression),vI(s,o)):(a=o.expression,s=o):(a=mi(),s=r().parenthesizeLeftSideOfAccess(e,!1));return{target:s,thisArg:a}},createAssignmentTargetWrapper:function(e,t){return tt(bt(Ze([fe(void 0,"value",[X(void 0,void 0,e,void 0,void 0,void 0)],rn([cn(t)]))])),"value")},inlineExpressions:function(e){return e.length>10?di(e):Me(e,v.createComma)},getInternalName:function(e,t,n){return bi(e,t,n,98304)},getLocalName:function(e,t,n,r){return bi(e,t,n,32768,r)},getExportName:xi,getDeclarationName:function(e,t,n){return bi(e,t,n)},getNamespaceMemberName:Si,getExternalModuleOrNamespaceExportName:function(e,t,n,r){if(e&&Wv(t,32))return Si(e,bi(t),n,r);return xi(t,n,r)},restoreOuterExpressions:function e(t,n,r=15){if(t&&gA(t,r)&&(i=t,!(lP(i)&&my(i)&&my(gw(i))&&my(Sw(i)))||ee(Tw(i))||ee(Nw(i))))return function(e,t){switch(e.kind){case 217:return xt(e,t);case 216:return vt(e,e.type,t);case 234:return Kt(e,t,e.type);case 238:return Yt(e,t,e.type);case 235:return Xt(e,t);case 354:return _i(e,t)}}(t,e(t.expression,n));var i;return n},restoreEnclosingLabel:function e(t,n,r){if(!n)return t;const i=Sn(n,n.label,XP(n.statement)?e(t,n.statement):t);r&&r(n);return i},createUseStrictPrologue:Ti,copyPrologue:function(e,t,n,r){const i=Ci(e,t,0,n);return wi(e,t,i,r)},copyStandardPrologue:Ci,copyCustomPrologue:wi,ensureUseStrict:function(e){if(!_A(e))return vI(b([Ti(),...e]),e);return e},liftToBlock:function(e){return Tn.assert(T(e,Nu),"Cannot lift nodes to a Block."),Fe(e)||rn(e)},mergeLexicalEnvironment:function(e,t){if(!ee(t))return e;const n=Ni(e,vf,0),r=Ni(e,xf,n),i=Ni(e,kf,r),o=Ni(t,vf,0),a=Ni(t,xf,o),s=Ni(t,kf,a),c=Ni(t,bf,s);Tn.assert(c===t.length,"Expected declarations to be valid standard or custom prologues");const l=Ul(e)?e.slice():e;c>s&&l.splice(i,0,...t.slice(s,c));s>a&&l.splice(r,0,...t.slice(a,s));a>o&&l.splice(n,0,...t.slice(o,a));if(o>0)if(0===n)l.splice(0,0,...t.slice(0,o));else{const r=new Map;for(let t=0;t=0;e--){const n=t[e];r.has(n.expression.text)||l.unshift(n)}}if(Ul(e))return vI(b(l,e.hasTrailingComma),e);return e},replaceModifiers:function(e,t){let n;n="number"==typeof t?W(t):t;return fD(e)?G(e,n,e.name,e.constraint,e.default):mD(e)?Q(e,n,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer):FD(e)?we(e,n,e.typeParameters,e.parameters,e.type):hD(e)?te(e,n,e.name,e.questionToken,e.type):yD(e)?re(e,n,e.name,e.questionToken??e.exclamationToken,e.type,e.initializer):vD(e)?oe(e,n,e.name,e.questionToken,e.typeParameters,e.parameters,e.type):bD(e)?se(e,n,e.asteriskToken,e.name,e.questionToken,e.typeParameters,e.parameters,e.type,e.body):SD(e)?_e(e,n,e.parameters,e.body):kD(e)?de(e,n,e.name,e.parameters,e.type,e.body):TD(e)?me(e,n,e.name,e.parameters,e.body):ND(e)?ve(e,n,e.parameters,e.type):_P(e)?Ct(e,n,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body):uP(e)?Nt(e,n,e.typeParameters,e.parameters,e.type,e.equalsGreaterThanToken,e.body):kP(e)?Wt(e,n,e.name,e.typeParameters,e.heritageClauses,e.members):LP(e)?an(e,n,e.declarationList):nE(e)?Pn(e,n,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body):rE(e)?Fn(e,n,e.name,e.typeParameters,e.heritageClauses,e.members):iE(e)?In(e,n,e.name,e.typeParameters,e.heritageClauses,e.members):oE(e)?jn(e,n,e.name,e.typeParameters,e.type):aE(e)?Mn(e,n,e.name,e.members):sE(e)?Bn(e,n,e.name,e.body):uE(e)?Vn(e,n,e.isTypeOnly,e.name,e.moduleReference):dE(e)?$n(e,n,e.importClause,e.moduleSpecifier,e.attributes):kE(e)?ir(e,n,e.expression):TE(e)?ar(e,n,e.isTypeOnly,e.exportClause,e.moduleSpecifier,e.attributes):Tn.assertNever(e)},replaceDecoratorsAndModifiers:function(e,t){return mD(e)?Q(e,t,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer):yD(e)?re(e,t,e.name,e.questionToken??e.exclamationToken,e.type,e.initializer):bD(e)?se(e,t,e.asteriskToken,e.name,e.questionToken,e.typeParameters,e.parameters,e.type,e.body):kD(e)?de(e,t,e.name,e.parameters,e.type,e.body):TD(e)?me(e,t,e.name,e.parameters,e.body):kP(e)?Wt(e,t,e.name,e.typeParameters,e.heritageClauses,e.members):rE(e)?Fn(e,t,e.name,e.typeParameters,e.heritageClauses,e.members):Tn.assertNever(e)},replacePropertyName:function(e,t){switch(e.kind){case 177:return de(e,e.modifiers,t,e.parameters,e.type,e.body);case 178:return me(e,e.modifiers,t,e.parameters,e.body);case 174:return se(e,e.modifiers,e.asteriskToken,t,e.questionToken,e.typeParameters,e.parameters,e.type,e.body);case 173:return oe(e,e.modifiers,t,e.questionToken,e.typeParameters,e.parameters,e.type);case 172:return re(e,e.modifiers,t,e.questionToken??e.exclamationToken,e.type,e.initializer);case 171:return te(e,e.modifiers,t,e.questionToken,e.type);case 303:return ni(e,t,e.initializer)}}};return h($C,e=>e(v)),v;function b(e,t){if(void 0===e||e===p)e=[];else if(Ul(e)){if(void 0===t||e.hasTrailingComma===t)return void 0===e.transformFlags&&tw(e),Tn.attachNodeArrayDebugInfo(e),e;const n=e.slice();return n.pos=e.pos,n.end=e.end,n.hasTrailingComma=t,n.transformFlags=e.transformFlags,Tn.attachNodeArrayDebugInfo(n),n}const n=e.length,r=n>=1&&n<=4?e.slice():e;return r.pos=-1,r.end=-1,r.hasTrailingComma=!!t,r.transformFlags=0,tw(r),Tn.attachNodeArrayDebugInfo(r),r}function x(e){return t.createBaseNode(e)}function S(e){const t=x(e);return t.symbol=void 0,t.localSymbol=void 0,t}function k(e,t){return e!==t&&(e.typeArguments=t.typeArguments),Ii(e,t)}function C(e,t=0){const n="number"==typeof e?e+"":e;Tn.assert(45!==n.charCodeAt(0),"Negative numbers should be created in combination with createPrefixUnaryExpression");const r=S(9);return r.text=n,r.numericLiteralFlags=t,384&t&&(r.transformFlags|=1024),r}function w(e){const t=M(10);return t.text="string"==typeof e?e:ET(e)+"n",t.transformFlags|=32,t}function N(e,t){const n=S(11);return n.text=e,n.singleQuote=t,n}function D(e,t,n){const r=N(e,t);return r.hasExtendedUnicodeEscape=n,n&&(r.transformFlags|=1024),r}function P(e){const t=M(14);return t.text=e,t}function E(e){const n=t.createBaseIdentifierNode(80);return n.escapedText=e,n.jsDoc=void 0,n.flowNode=void 0,n.symbol=void 0,n}function F(e,t,n,r){const i=E(Tc(e));return Ww(i,{flags:t,id:VC,prefix:n,suffix:r}),VC++,i}function A(e,t,n){void 0===t&&e&&(t=Wa(e)),80===t&&(t=void 0);const r=E(Tc(e));return n&&(r.flags|=256),"await"===r.escapedText&&(r.transformFlags|=67108864),256&r.flags&&(r.transformFlags|=1024),r}function I(e,t,n,r){let i=1;t&&(i|=8);const o=F("",i,n,r);return e&&e(o),o}function O(e,t=0,n,r){Tn.assert(!(7&t),"Argument out of range: flags");(n||r)&&(t|=16);const i=F(e?kl(e)?uI(!1,n,e,r,wc):`generated@${KB(e)}`:"",4|t,n,r);return i.original=e,i}function j(e){const n=t.createBasePrivateIdentifierNode(81);return n.escapedText=e,n.transformFlags|=16777216,n}function L(e,t,n,r){const i=j(Tc(e));return Ww(i,{flags:t,id:VC,prefix:n,suffix:r}),VC++,i}function M(e){return t.createBaseTokenNode(e)}function R(e){Tn.assert(e>=0&&e<=165,"Invalid token"),Tn.assert(e<=15||e>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),Tn.assert(e<=9||e>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),Tn.assert(80!==e,"Invalid token. Use 'createIdentifier' to create identifiers");const t=M(e);let n=0;switch(e){case 134:n=384;break;case 160:n=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:n=1;break;case 108:n=134218752,t.flowNode=void 0;break;case 126:n=1024;break;case 129:n=16777216;break;case 110:n=16384,t.flowNode=void 0}return n&&(t.transformFlags|=n),t}function B(){return R(110)}function J(){return R(106)}function z(){return R(112)}function q(){return R(97)}function U(e){return R(e)}function W(e){const t=[];return 32&e&&t.push(U(95)),128&e&&t.push(U(138)),2048&e&&t.push(U(90)),4096&e&&t.push(U(87)),1&e&&t.push(U(125)),2&e&&t.push(U(123)),4&e&&t.push(U(124)),64&e&&t.push(U(128)),256&e&&t.push(U(126)),16&e&&t.push(U(164)),8&e&&t.push(U(148)),512&e&&t.push(U(129)),1024&e&&t.push(U(134)),8192&e&&t.push(U(103)),16384&e&&t.push(U(147)),t.length?t:void 0}function $(e,t){const n=x(166);return n.left=e,n.right=Pi(t),n.transformFlags|=ZC(n.left)|YC(n.right),n.flowNode=void 0,n}function H(e){const t=x(167);return t.expression=r().parenthesizeExpressionOfComputedPropertyName(e),t.transformFlags|=132096|ZC(t.expression),t}function K(e,t,n,r){const i=S(168);return i.modifiers=Di(e),i.name=Pi(t),i.constraint=n,i.default=r,i.transformFlags=1,i.expression=void 0,i.jsDoc=void 0,i}function G(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.constraint!==r||e.default!==i?Ii(K(t,n,r,i),e):e}function X(e,t,n,r,i,o){const a=S(169);return a.modifiers=Di(e),a.dotDotDotToken=t,a.name=Pi(n),a.questionToken=r,a.type=i,a.initializer=Fi(o),Tv(a.name)?a.transformFlags=1:a.transformFlags=ew(a.modifiers)|ZC(a.dotDotDotToken)|QC(a.name)|ZC(a.questionToken)|ZC(a.initializer)|(a.questionToken??a.type?1:0)|(a.dotDotDotToken??a.initializer?1024:0)|(31&_b(a.modifiers)?8192:0),a.jsDoc=void 0,a}function Q(e,t,n,r,i,o,a){return e.modifiers!==t||e.dotDotDotToken!==n||e.name!==r||e.questionToken!==i||e.type!==o||e.initializer!==a?Ii(X(t,n,r,i,o,a),e):e}function Y(e){const t=x(170);return t.expression=r().parenthesizeLeftSideOfAccess(e,!1),t.transformFlags|=33562625|ZC(t.expression),t}function Z(e,t,n,r){const i=S(171);return i.modifiers=Di(e),i.name=Pi(t),i.type=r,i.questionToken=n,i.transformFlags=1,i.initializer=void 0,i.jsDoc=void 0,i}function te(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.questionToken!==r||e.type!==i?function(e,t){e!==t&&(e.initializer=t.initializer);return Ii(e,t)}(Z(t,n,r,i),e):e}function ne(e,t,n,r,i){const o=S(172);o.modifiers=Di(e),o.name=Pi(t),o.questionToken=n&&HN(n)?n:void 0,o.exclamationToken=n&&$N(n)?n:void 0,o.type=r,o.initializer=Fi(i);const a=33554432&o.flags||128&_b(o.modifiers);return o.transformFlags=ew(o.modifiers)|QC(o.name)|ZC(o.initializer)|(a||o.questionToken||o.exclamationToken||o.type?1:0)|(pD(o.name)||256&_b(o.modifiers)&&o.initializer?8192:0)|16777216,o.jsDoc=void 0,o}function re(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.questionToken!==(void 0!==r&&HN(r)?r:void 0)||e.exclamationToken!==(void 0!==r&&$N(r)?r:void 0)||e.type!==i||e.initializer!==o?Ii(ne(t,n,r,i,o),e):e}function ie(e,t,n,r,i,o){const a=S(173);return a.modifiers=Di(e),a.name=Pi(t),a.questionToken=n,a.typeParameters=Di(r),a.parameters=Di(i),a.type=o,a.transformFlags=1,a.jsDoc=void 0,a.locals=void 0,a.nextContainer=void 0,a.typeArguments=void 0,a}function oe(e,t,n,r,i,o,a){return e.modifiers!==t||e.name!==n||e.questionToken!==r||e.typeParameters!==i||e.parameters!==o||e.type!==a?k(ie(t,n,r,i,o,a),e):e}function ae(e,t,n,r,i,o,a,s){const c=S(174);if(c.modifiers=Di(e),c.asteriskToken=t,c.name=Pi(n),c.questionToken=r,c.exclamationToken=void 0,c.typeParameters=Di(i),c.parameters=b(o),c.type=a,c.body=s,c.body){const e=1024&_b(c.modifiers),t=!!c.asteriskToken,n=e&&t;c.transformFlags=ew(c.modifiers)|ZC(c.asteriskToken)|QC(c.name)|ZC(c.questionToken)|ew(c.typeParameters)|ew(c.parameters)|ZC(c.type)|-67108865&ZC(c.body)|(n?128:e?256:t?2048:0)|(c.questionToken||c.typeParameters||c.type?1:0)|1024}else c.transformFlags=1;return c.typeArguments=void 0,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.flowNode=void 0,c.endFlowNode=void 0,c.returnFlowNode=void 0,c}function se(e,t,n,r,i,o,a,s,c){return e.modifiers!==t||e.asteriskToken!==n||e.name!==r||e.questionToken!==i||e.typeParameters!==o||e.parameters!==a||e.type!==s||e.body!==c?function(e,t){e!==t&&(e.exclamationToken=t.exclamationToken);return Ii(e,t)}(ae(t,n,r,i,o,a,s,c),e):e}function ce(e){const t=S(175);return t.body=e,t.transformFlags=16777216|ZC(e),t.modifiers=void 0,t.jsDoc=void 0,t.locals=void 0,t.nextContainer=void 0,t.endFlowNode=void 0,t.returnFlowNode=void 0,t}function le(e,t,n){const r=S(176);return r.modifiers=Di(e),r.parameters=b(t),r.body=n,r.transformFlags=ew(r.modifiers)|ew(r.parameters)|-67108865&ZC(r.body)|1024,r.typeParameters=void 0,r.type=void 0,r.typeArguments=void 0,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.endFlowNode=void 0,r.returnFlowNode=void 0,r}function _e(e,t,n,r){return e.modifiers!==t||e.parameters!==n||e.body!==r?function(e,t){e!==t&&(e.typeParameters=t.typeParameters,e.type=t.type);return k(e,t)}(le(t,n,r),e):e}function ue(e,t,n,r,i){const o=S(177);return o.modifiers=Di(e),o.name=Pi(t),o.parameters=b(n),o.type=r,o.body=i,o.body?o.transformFlags=ew(o.modifiers)|QC(o.name)|ew(o.parameters)|ZC(o.type)|-67108865&ZC(o.body)|(o.type?1:0):o.transformFlags=1,o.typeArguments=void 0,o.typeParameters=void 0,o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.flowNode=void 0,o.endFlowNode=void 0,o.returnFlowNode=void 0,o}function de(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.parameters!==r||e.type!==i||e.body!==o?function(e,t){e!==t&&(e.typeParameters=t.typeParameters);return k(e,t)}(ue(t,n,r,i,o),e):e}function fe(e,t,n,r){const i=S(178);return i.modifiers=Di(e),i.name=Pi(t),i.parameters=b(n),i.body=r,i.body?i.transformFlags=ew(i.modifiers)|QC(i.name)|ew(i.parameters)|-67108865&ZC(i.body)|(i.type?1:0):i.transformFlags=1,i.typeArguments=void 0,i.typeParameters=void 0,i.type=void 0,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.flowNode=void 0,i.endFlowNode=void 0,i.returnFlowNode=void 0,i}function me(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.parameters!==r||e.body!==i?function(e,t){e!==t&&(e.typeParameters=t.typeParameters,e.type=t.type);return k(e,t)}(fe(t,n,r,i),e):e}function ge(e,t,n){const r=S(179);return r.typeParameters=Di(e),r.parameters=Di(t),r.type=n,r.transformFlags=1,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function he(e,t,n){const r=S(180);return r.typeParameters=Di(e),r.parameters=Di(t),r.type=n,r.transformFlags=1,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function ye(e,t,n){const r=S(181);return r.modifiers=Di(e),r.parameters=Di(t),r.type=n,r.transformFlags=1,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function ve(e,t,n,r){return e.parameters!==n||e.type!==r||e.modifiers!==t?k(ye(t,n,r),e):e}function be(e,t){const n=x(204);return n.type=e,n.literal=t,n.transformFlags=1,n}function xe(e,t,n){const r=x(182);return r.assertsModifier=e,r.parameterName=Pi(t),r.type=n,r.transformFlags=1,r}function Se(e,t){const n=x(183);return n.typeName=Pi(e),n.typeArguments=t&&r().parenthesizeTypeArguments(b(t)),n.transformFlags=1,n}function ke(e,t,n){const r=S(184);return r.typeParameters=Di(e),r.parameters=Di(t),r.type=n,r.transformFlags=1,r.modifiers=void 0,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function Te(...e){return 4===e.length?Ce(...e):3===e.length?function(e,t,n){return Ce(void 0,e,t,n)}(...e):Tn.fail("Incorrect number of arguments specified.")}function Ce(e,t,n,r){const i=S(185);return i.modifiers=Di(e),i.typeParameters=Di(t),i.parameters=Di(n),i.type=r,i.transformFlags=1,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.typeArguments=void 0,i}function we(e,t,n,r,i){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==r||e.type!==i?k(Te(t,n,r,i),e):e}function Ne(e,t){const n=x(186);return n.exprName=e,n.typeArguments=t&&r().parenthesizeTypeArguments(t),n.transformFlags=1,n}function De(e){const t=S(187);return t.members=b(e),t.transformFlags=1,t}function Ee(e){const t=x(188);return t.elementType=r().parenthesizeNonArrayTypeOfPostfixType(e),t.transformFlags=1,t}function Ae(e){const t=x(189);return t.elements=b(r().parenthesizeElementTypesOfTupleType(e)),t.transformFlags=1,t}function Ie(e,t,n,r){const i=S(202);return i.dotDotDotToken=e,i.name=t,i.questionToken=n,i.type=r,i.transformFlags=1,i.jsDoc=void 0,i}function Oe(e){const t=x(190);return t.type=r().parenthesizeTypeOfOptionalType(e),t.transformFlags=1,t}function je(e){const t=x(191);return t.type=e,t.transformFlags=1,t}function Le(e,t,n){const r=x(e);return r.types=v.createNodeArray(n(t)),r.transformFlags=1,r}function Re(e,t,n){return e.types!==t?Ii(Le(e.kind,t,n),e):e}function Je(e,t,n,i){const o=x(194);return o.checkType=r().parenthesizeCheckTypeOfConditionalType(e),o.extendsType=r().parenthesizeExtendsTypeOfConditionalType(t),o.trueType=n,o.falseType=i,o.transformFlags=1,o.locals=void 0,o.nextContainer=void 0,o}function ze(e){const t=x(195);return t.typeParameter=e,t.transformFlags=1,t}function qe(e,t){const n=x(203);return n.head=e,n.templateSpans=b(t),n.transformFlags=1,n}function Ue(e,t,n,i,o=!1){const a=x(205);return a.argument=e,a.attributes=t,a.assertions&&a.assertions.assertClause&&a.attributes&&(a.assertions.assertClause=a.attributes),a.qualifier=n,a.typeArguments=i&&r().parenthesizeTypeArguments(i),a.isTypeOf=o,a.transformFlags=1,a}function Ve(e){const t=x(196);return t.type=e,t.transformFlags=1,t}function We(e,t){const n=x(198);return n.operator=e,n.type=148===e?r().parenthesizeOperandOfReadonlyTypeOperator(t):r().parenthesizeOperandOfTypeOperator(t),n.transformFlags=1,n}function $e(e,t){const n=x(199);return n.objectType=r().parenthesizeNonArrayTypeOfPostfixType(e),n.indexType=t,n.transformFlags=1,n}function He(e,t,n,r,i,o){const a=S(200);return a.readonlyToken=e,a.typeParameter=t,a.nameType=n,a.questionToken=r,a.type=i,a.members=o&&b(o),a.transformFlags=1,a.locals=void 0,a.nextContainer=void 0,a}function Ke(e){const t=x(201);return t.literal=e,t.transformFlags=1,t}function Ge(e){const t=x(206);return t.elements=b(e),t.transformFlags|=525312|ew(t.elements),32768&t.transformFlags&&(t.transformFlags|=65664),t}function Xe(e){const t=x(207);return t.elements=b(e),t.transformFlags|=525312|ew(t.elements),t}function Qe(e,t,n,r){const i=S(208);return i.dotDotDotToken=e,i.propertyName=Pi(t),i.name=Pi(n),i.initializer=Fi(r),i.transformFlags|=ZC(i.dotDotDotToken)|QC(i.propertyName)|QC(i.name)|ZC(i.initializer)|(i.dotDotDotToken?32768:0)|1024,i.flowNode=void 0,i}function Ye(e,t){const n=x(209),i=e&&Pe(e),o=b(e,!(!i||!TP(i))||void 0);return n.elements=r().parenthesizeExpressionsOfCommaDelimitedList(o),n.multiLine=t,n.transformFlags|=ew(n.elements),n}function Ze(e,t){const n=S(210);return n.properties=b(e),n.multiLine=t,n.transformFlags|=ew(n.properties),n.jsDoc=void 0,n}function et(e,t,n){const r=S(211);return r.expression=e,r.questionDotToken=t,r.name=n,r.transformFlags=ZC(r.expression)|ZC(r.questionDotToken)|(QN(r.name)?YC(r.name):536870912|ZC(r.name)),r.jsDoc=void 0,r.flowNode=void 0,r}function tt(e,t){const n=et(r().parenthesizeLeftSideOfAccess(e,!1),void 0,Pi(t));return lD(e)&&(n.transformFlags|=384),n}function nt(e,t,n){const i=et(r().parenthesizeLeftSideOfAccess(e,!0),t,Pi(n));return i.flags|=64,i.transformFlags|=32,i}function rt(e,t,n,r){return Tn.assert(!!(64&e.flags),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),e.expression!==t||e.questionDotToken!==n||e.name!==r?Ii(nt(t,n,r),e):e}function it(e,t,n){const r=S(212);return r.expression=e,r.questionDotToken=t,r.argumentExpression=n,r.transformFlags|=ZC(r.expression)|ZC(r.questionDotToken)|ZC(r.argumentExpression),r.jsDoc=void 0,r.flowNode=void 0,r}function ot(e,t){const n=it(r().parenthesizeLeftSideOfAccess(e,!1),void 0,Ei(t));return lD(e)&&(n.transformFlags|=384),n}function at(e,t,n){const i=it(r().parenthesizeLeftSideOfAccess(e,!0),t,Ei(n));return i.flags|=64,i.transformFlags|=32,i}function st(e,t,n,r){return Tn.assert(!!(64&e.flags),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),e.expression!==t||e.questionDotToken!==n||e.argumentExpression!==r?Ii(at(t,n,r),e):e}function lt(e,t,n,r){const i=S(213);return i.expression=e,i.questionDotToken=t,i.typeArguments=n,i.arguments=r,i.transformFlags|=ZC(i.expression)|ZC(i.questionDotToken)|ew(i.typeArguments)|ew(i.arguments),i.typeArguments&&(i.transformFlags|=1),gm(i.expression)&&(i.transformFlags|=16384),i}function _t(e,t,n){const i=lt(r().parenthesizeLeftSideOfAccess(e,!1),void 0,Di(t),r().parenthesizeExpressionsOfCommaDelimitedList(b(n)));return _D(i.expression)&&(i.transformFlags|=8388608),i}function ut(e,t,n,i){const o=lt(r().parenthesizeLeftSideOfAccess(e,!0),t,Di(n),r().parenthesizeExpressionsOfCommaDelimitedList(b(i)));return o.flags|=64,o.transformFlags|=32,o}function dt(e,t,n,r,i){return Tn.assert(!!(64&e.flags),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),e.expression!==t||e.questionDotToken!==n||e.typeArguments!==r||e.arguments!==i?Ii(ut(t,n,r,i),e):e}function ft(e,t,n){const i=S(214);return i.expression=r().parenthesizeExpressionOfNew(e),i.typeArguments=Di(t),i.arguments=n?r().parenthesizeExpressionsOfCommaDelimitedList(n):void 0,i.transformFlags|=ZC(i.expression)|ew(i.typeArguments)|ew(i.arguments)|32,i.typeArguments&&(i.transformFlags|=1),i}function mt(e,t,n){const i=x(215);return i.tag=r().parenthesizeLeftSideOfAccess(e,!1),i.typeArguments=Di(t),i.template=n,i.transformFlags|=ZC(i.tag)|ew(i.typeArguments)|ZC(i.template)|1024,i.typeArguments&&(i.transformFlags|=1),Ey(i.template)&&(i.transformFlags|=128),i}function ht(e,t){const n=x(216);return n.expression=r().parenthesizeOperandOfPrefixUnary(t),n.type=e,n.transformFlags|=ZC(n.expression)|ZC(n.type)|1,n}function vt(e,t,n){return e.type!==t||e.expression!==n?Ii(ht(t,n),e):e}function bt(e){const t=x(217);return t.expression=e,t.transformFlags=ZC(t.expression),t.jsDoc=void 0,t}function xt(e,t){return e.expression!==t?Ii(bt(t),e):e}function St(e,t,n,r,i,o,a){const s=S(218);s.modifiers=Di(e),s.asteriskToken=t,s.name=Pi(n),s.typeParameters=Di(r),s.parameters=b(i),s.type=o,s.body=a;const c=1024&_b(s.modifiers),l=!!s.asteriskToken,_=c&&l;return s.transformFlags=ew(s.modifiers)|ZC(s.asteriskToken)|QC(s.name)|ew(s.typeParameters)|ew(s.parameters)|ZC(s.type)|-67108865&ZC(s.body)|(_?128:c?256:l?2048:0)|(s.typeParameters||s.type?1:0)|4194304,s.typeArguments=void 0,s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.flowNode=void 0,s.endFlowNode=void 0,s.returnFlowNode=void 0,s}function Ct(e,t,n,r,i,o,a,s){return e.name!==r||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==i||e.parameters!==o||e.type!==a||e.body!==s?k(St(t,n,r,i,o,a,s),e):e}function wt(e,t,n,i,o,a){const s=S(219);s.modifiers=Di(e),s.typeParameters=Di(t),s.parameters=b(n),s.type=i,s.equalsGreaterThanToken=o??R(39),s.body=r().parenthesizeConciseBodyOfArrowFunction(a);const c=1024&_b(s.modifiers);return s.transformFlags=ew(s.modifiers)|ew(s.typeParameters)|ew(s.parameters)|ZC(s.type)|ZC(s.equalsGreaterThanToken)|-67108865&ZC(s.body)|(s.typeParameters||s.type?1:0)|(c?16640:0)|1024,s.typeArguments=void 0,s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.flowNode=void 0,s.endFlowNode=void 0,s.returnFlowNode=void 0,s}function Nt(e,t,n,r,i,o,a){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==r||e.type!==i||e.equalsGreaterThanToken!==o||e.body!==a?k(wt(t,n,r,i,o,a),e):e}function Dt(e){const t=x(220);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=ZC(t.expression),t}function Pt(e){const t=x(221);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=ZC(t.expression),t}function Et(e){const t=x(222);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=ZC(t.expression),t}function Ft(e){const t=x(223);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=2097536|ZC(t.expression),t}function At(e,t){const n=x(224);return n.operator=e,n.operand=r().parenthesizeOperandOfPrefixUnary(t),n.transformFlags|=ZC(n.operand),46!==e&&47!==e||!QN(n.operand)||n_(n.operand)||sA(n.operand)||(n.transformFlags|=268435456),n}function It(e,t){const n=x(225);return n.operator=t,n.operand=r().parenthesizeOperandOfPostfixUnary(e),n.transformFlags|=ZC(n.operand),!QN(n.operand)||n_(n.operand)||sA(n.operand)||(n.transformFlags|=268435456),n}function Ot(e,t,n){const i=S(226),o="number"==typeof(a=t)?R(a):a;var a;const s=o.kind;return i.left=r().parenthesizeLeftSideOfBinary(s,e),i.operatorToken=o,i.right=r().parenthesizeRightSideOfBinary(s,i.left,n),i.transformFlags|=ZC(i.left)|ZC(i.operatorToken)|ZC(i.right),61===s?i.transformFlags|=32:64===s?nP(i.left)?i.transformFlags|=5248|jt(i.left):tP(i.left)&&(i.transformFlags|=5120|jt(i.left)):43===s||68===s?i.transformFlags|=512:fb(s)&&(i.transformFlags|=16),103===s&&YN(i.left)&&(i.transformFlags|=536870912),i.jsDoc=void 0,i}function jt(e){return yI(e)?65536:0}function Lt(e,t,n,i,o){const a=x(227);return a.condition=r().parenthesizeConditionOfConditionalExpression(e),a.questionToken=t??R(58),a.whenTrue=r().parenthesizeBranchOfConditionalExpression(n),a.colonToken=i??R(59),a.whenFalse=r().parenthesizeBranchOfConditionalExpression(o),a.transformFlags|=ZC(a.condition)|ZC(a.questionToken)|ZC(a.whenTrue)|ZC(a.colonToken)|ZC(a.whenFalse),a}function Mt(e,t){const n=x(228);return n.head=e,n.templateSpans=b(t),n.transformFlags|=ZC(n.head)|ew(n.templateSpans)|1024,n}function Rt(e,t,n,r=0){let i;if(Tn.assert(!(-7177&r),"Unsupported template flags."),void 0!==n&&n!==t&&(i=function(e,t){qC||(qC=Fs(99,!1,0));switch(e){case 15:qC.setText("`"+t+"`");break;case 16:qC.setText("`"+t+"${");break;case 17:qC.setText("}"+t+"${");break;case 18:qC.setText("}"+t+"`")}let n,r=qC.scan();20===r&&(r=qC.reScanTemplateToken(!1));if(qC.isUnterminated())return qC.setText(void 0),XC;switch(r){case 15:case 16:case 17:case 18:n=qC.getTokenValue()}if(void 0===n||1!==qC.scan())return qC.setText(void 0),XC;return qC.setText(void 0),n}(e,n),"object"==typeof i))return Tn.fail("Invalid raw text");if(void 0===t){if(void 0===i)return Tn.fail("Arguments 'text' and 'rawText' may not both be undefined.");t=i}else void 0!==i&&Tn.assert(t===i,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return t}function Bt(e){let t=1024;return e&&(t|=128),t}function Jt(e,t,n,r){const i=S(e);return i.text=t,i.rawText=n,i.templateFlags=7176&r,i.transformFlags=Bt(i.templateFlags),i}function zt(e,t,n,r){return 15===e?Jt(e,t,n,r):function(e,t,n,r){const i=M(e);return i.text=t,i.rawText=n,i.templateFlags=7176&r,i.transformFlags=Bt(i.templateFlags),i}(e,t,n,r)}function qt(e,t){Tn.assert(!e||!!t,"A `YieldExpression` with an asteriskToken must have an expression.");const n=x(229);return n.expression=t&&r().parenthesizeExpressionForDisallowedComma(t),n.asteriskToken=e,n.transformFlags|=1049728|(ZC(n.expression)|ZC(n.asteriskToken)),n}function Ut(e){const t=x(230);return t.expression=r().parenthesizeExpressionForDisallowedComma(e),t.transformFlags|=33792|ZC(t.expression),t}function Vt(e,t,n,r,i){const o=S(231);return o.modifiers=Di(e),o.name=Pi(t),o.typeParameters=Di(n),o.heritageClauses=Di(r),o.members=b(i),o.transformFlags|=ew(o.modifiers)|QC(o.name)|ew(o.typeParameters)|ew(o.heritageClauses)|ew(o.members)|(o.typeParameters?1:0)|1024,o.jsDoc=void 0,o}function Wt(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.heritageClauses!==i||e.members!==o?Ii(Vt(t,n,r,i,o),e):e}function $t(e,t){const n=x(233);return n.expression=r().parenthesizeLeftSideOfAccess(e,!1),n.typeArguments=t&&r().parenthesizeTypeArguments(t),n.transformFlags|=ZC(n.expression)|ew(n.typeArguments)|1024,n}function Ht(e,t){const n=x(234);return n.expression=e,n.type=t,n.transformFlags|=ZC(n.expression)|ZC(n.type)|1,n}function Kt(e,t,n){return e.expression!==t||e.type!==n?Ii(Ht(t,n),e):e}function Gt(e){const t=x(235);return t.expression=r().parenthesizeLeftSideOfAccess(e,!1),t.transformFlags|=1|ZC(t.expression),t}function Xt(e,t){return jl(e)?en(e,t):e.expression!==t?Ii(Gt(t),e):e}function Qt(e,t){const n=x(238);return n.expression=e,n.type=t,n.transformFlags|=ZC(n.expression)|ZC(n.type)|1,n}function Yt(e,t,n){return e.expression!==t||e.type!==n?Ii(Qt(t,n),e):e}function Zt(e){const t=x(235);return t.flags|=64,t.expression=r().parenthesizeLeftSideOfAccess(e,!0),t.transformFlags|=1|ZC(t.expression),t}function en(e,t){return Tn.assert(!!(64&e.flags),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),e.expression!==t?Ii(Zt(t),e):e}function tn(e,t){const n=x(236);switch(n.keywordToken=e,n.name=t,n.transformFlags|=ZC(n.name),e){case 105:n.transformFlags|=1024;break;case 102:n.transformFlags|=32;break;default:return Tn.assertNever(e)}return n.flowNode=void 0,n}function nn(e,t){const n=x(239);return n.expression=e,n.literal=t,n.transformFlags|=ZC(n.expression)|ZC(n.literal)|1024,n}function rn(e,t){const n=x(241);return n.statements=b(e),n.multiLine=t,n.transformFlags|=ew(n.statements),n.jsDoc=void 0,n.locals=void 0,n.nextContainer=void 0,n}function on(e,t){const n=x(243);return n.modifiers=Di(e),n.declarationList=ct(t)?Nn(t):t,n.transformFlags|=ew(n.modifiers)|ZC(n.declarationList),128&_b(n.modifiers)&&(n.transformFlags=1),n.jsDoc=void 0,n.flowNode=void 0,n}function an(e,t,n){return e.modifiers!==t||e.declarationList!==n?Ii(on(t,n),e):e}function sn(){const e=x(242);return e.jsDoc=void 0,e}function cn(e){const t=x(244);return t.expression=r().parenthesizeExpressionOfExpressionStatement(e),t.transformFlags|=ZC(t.expression),t.jsDoc=void 0,t.flowNode=void 0,t}function _n(e,t,n){const r=x(245);return r.expression=e,r.thenStatement=Ai(t),r.elseStatement=Ai(n),r.transformFlags|=ZC(r.expression)|ZC(r.thenStatement)|ZC(r.elseStatement),r.jsDoc=void 0,r.flowNode=void 0,r}function un(e,t){const n=x(246);return n.statement=Ai(e),n.expression=t,n.transformFlags|=ZC(n.statement)|ZC(n.expression),n.jsDoc=void 0,n.flowNode=void 0,n}function dn(e,t){const n=x(247);return n.expression=e,n.statement=Ai(t),n.transformFlags|=ZC(n.expression)|ZC(n.statement),n.jsDoc=void 0,n.flowNode=void 0,n}function pn(e,t,n,r){const i=x(248);return i.initializer=e,i.condition=t,i.incrementor=n,i.statement=Ai(r),i.transformFlags|=ZC(i.initializer)|ZC(i.condition)|ZC(i.incrementor)|ZC(i.statement),i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.flowNode=void 0,i}function fn(e,t,n){const r=x(249);return r.initializer=e,r.expression=t,r.statement=Ai(n),r.transformFlags|=ZC(r.initializer)|ZC(r.expression)|ZC(r.statement),r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.flowNode=void 0,r}function mn(e,t,n,i){const o=x(250);return o.awaitModifier=e,o.initializer=t,o.expression=r().parenthesizeExpressionForDisallowedComma(n),o.statement=Ai(i),o.transformFlags|=ZC(o.awaitModifier)|ZC(o.initializer)|ZC(o.expression)|ZC(o.statement)|1024,e&&(o.transformFlags|=128),o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.flowNode=void 0,o}function gn(e){const t=x(251);return t.label=Pi(e),t.transformFlags|=4194304|ZC(t.label),t.jsDoc=void 0,t.flowNode=void 0,t}function hn(e){const t=x(252);return t.label=Pi(e),t.transformFlags|=4194304|ZC(t.label),t.jsDoc=void 0,t.flowNode=void 0,t}function yn(e){const t=x(253);return t.expression=e,t.transformFlags|=4194432|ZC(t.expression),t.jsDoc=void 0,t.flowNode=void 0,t}function vn(e,t){const n=x(254);return n.expression=e,n.statement=Ai(t),n.transformFlags|=ZC(n.expression)|ZC(n.statement),n.jsDoc=void 0,n.flowNode=void 0,n}function bn(e,t){const n=x(255);return n.expression=r().parenthesizeExpressionForDisallowedComma(e),n.caseBlock=t,n.transformFlags|=ZC(n.expression)|ZC(n.caseBlock),n.jsDoc=void 0,n.flowNode=void 0,n.possiblyExhaustive=!1,n}function xn(e,t){const n=x(256);return n.label=Pi(e),n.statement=Ai(t),n.transformFlags|=ZC(n.label)|ZC(n.statement),n.jsDoc=void 0,n.flowNode=void 0,n}function Sn(e,t,n){return e.label!==t||e.statement!==n?Ii(xn(t,n),e):e}function kn(e){const t=x(257);return t.expression=e,t.transformFlags|=ZC(t.expression),t.jsDoc=void 0,t.flowNode=void 0,t}function Cn(e,t,n){const r=x(258);return r.tryBlock=e,r.catchClause=t,r.finallyBlock=n,r.transformFlags|=ZC(r.tryBlock)|ZC(r.catchClause)|ZC(r.finallyBlock),r.jsDoc=void 0,r.flowNode=void 0,r}function wn(e,t,n,r){const i=S(260);return i.name=Pi(e),i.exclamationToken=t,i.type=n,i.initializer=Fi(r),i.transformFlags|=QC(i.name)|ZC(i.initializer)|(i.exclamationToken??i.type?1:0),i.jsDoc=void 0,i}function Nn(e,t=0){const n=x(261);return n.flags|=7&t,n.declarations=b(e),n.transformFlags|=4194304|ew(n.declarations),7&t&&(n.transformFlags|=263168),4&t&&(n.transformFlags|=4),n}function Dn(e,t,n,r,i,o,a){const s=S(262);if(s.modifiers=Di(e),s.asteriskToken=t,s.name=Pi(n),s.typeParameters=Di(r),s.parameters=b(i),s.type=o,s.body=a,!s.body||128&_b(s.modifiers))s.transformFlags=1;else{const e=1024&_b(s.modifiers),t=!!s.asteriskToken,n=e&&t;s.transformFlags=ew(s.modifiers)|ZC(s.asteriskToken)|QC(s.name)|ew(s.typeParameters)|ew(s.parameters)|ZC(s.type)|-67108865&ZC(s.body)|(n?128:e?256:t?2048:0)|(s.typeParameters||s.type?1:0)|4194304}return s.typeArguments=void 0,s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.endFlowNode=void 0,s.returnFlowNode=void 0,s}function Pn(e,t,n,r,i,o,a,s){return e.modifiers!==t||e.asteriskToken!==n||e.name!==r||e.typeParameters!==i||e.parameters!==o||e.type!==a||e.body!==s?function(e,t){e!==t&&e.modifiers===t.modifiers&&(e.modifiers=t.modifiers);return k(e,t)}(Dn(t,n,r,i,o,a,s),e):e}function En(e,t,n,r,i){const o=S(263);return o.modifiers=Di(e),o.name=Pi(t),o.typeParameters=Di(n),o.heritageClauses=Di(r),o.members=b(i),128&_b(o.modifiers)?o.transformFlags=1:(o.transformFlags|=ew(o.modifiers)|QC(o.name)|ew(o.typeParameters)|ew(o.heritageClauses)|ew(o.members)|(o.typeParameters?1:0)|1024,8192&o.transformFlags&&(o.transformFlags|=1)),o.jsDoc=void 0,o}function Fn(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.heritageClauses!==i||e.members!==o?Ii(En(t,n,r,i,o),e):e}function An(e,t,n,r,i){const o=S(264);return o.modifiers=Di(e),o.name=Pi(t),o.typeParameters=Di(n),o.heritageClauses=Di(r),o.members=b(i),o.transformFlags=1,o.jsDoc=void 0,o}function In(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.heritageClauses!==i||e.members!==o?Ii(An(t,n,r,i,o),e):e}function On(e,t,n,r){const i=S(265);return i.modifiers=Di(e),i.name=Pi(t),i.typeParameters=Di(n),i.type=r,i.transformFlags=1,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i}function jn(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.type!==i?Ii(On(t,n,r,i),e):e}function Ln(e,t,n){const r=S(266);return r.modifiers=Di(e),r.name=Pi(t),r.members=b(n),r.transformFlags|=ew(r.modifiers)|ZC(r.name)|ew(r.members)|1,r.transformFlags&=-67108865,r.jsDoc=void 0,r}function Mn(e,t,n,r){return e.modifiers!==t||e.name!==n||e.members!==r?Ii(Ln(t,n,r),e):e}function Rn(e,t,n,r=0){const i=S(267);return i.modifiers=Di(e),i.flags|=2088&r,i.name=t,i.body=n,128&_b(i.modifiers)?i.transformFlags=1:i.transformFlags|=ew(i.modifiers)|ZC(i.name)|ZC(i.body)|1,i.transformFlags&=-67108865,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i}function Bn(e,t,n,r){return e.modifiers!==t||e.name!==n||e.body!==r?Ii(Rn(t,n,r,e.flags),e):e}function Jn(e){const t=x(268);return t.statements=b(e),t.transformFlags|=ew(t.statements),t.jsDoc=void 0,t}function zn(e){const t=x(269);return t.clauses=b(e),t.transformFlags|=ew(t.clauses),t.locals=void 0,t.nextContainer=void 0,t}function qn(e){const t=S(270);return t.name=Pi(e),t.transformFlags|=1|YC(t.name),t.modifiers=void 0,t.jsDoc=void 0,t}function Un(e,t,n,r){const i=S(271);return i.modifiers=Di(e),i.name=Pi(n),i.isTypeOnly=t,i.moduleReference=r,i.transformFlags|=ew(i.modifiers)|YC(i.name)|ZC(i.moduleReference),EE(i.moduleReference)||(i.transformFlags|=1),i.transformFlags&=-67108865,i.jsDoc=void 0,i}function Vn(e,t,n,r,i){return e.modifiers!==t||e.isTypeOnly!==n||e.name!==r||e.moduleReference!==i?Ii(Un(t,n,r,i),e):e}function Wn(e,t,n,r){const i=x(272);return i.modifiers=Di(e),i.importClause=t,i.moduleSpecifier=n,i.attributes=i.assertClause=r,i.transformFlags|=ZC(i.importClause)|ZC(i.moduleSpecifier),i.transformFlags&=-67108865,i.jsDoc=void 0,i}function $n(e,t,n,r,i){return e.modifiers!==t||e.importClause!==n||e.moduleSpecifier!==r||e.attributes!==i?Ii(Wn(t,n,r,i),e):e}function Hn(e,t,n){const r=S(273);return r.isTypeOnly=e,r.name=t,r.namedBindings=n,r.transformFlags|=ZC(r.name)|ZC(r.namedBindings),e&&(r.transformFlags|=1),r.transformFlags&=-67108865,r}function Kn(e,t){const n=x(300);return n.elements=b(e),n.multiLine=t,n.token=132,n.transformFlags|=4,n}function Gn(e,t){const n=x(301);return n.name=e,n.value=t,n.transformFlags|=4,n}function Xn(e,t){const n=x(302);return n.assertClause=e,n.multiLine=t,n}function Qn(e,t,n){const r=x(300);return r.token=n??118,r.elements=b(e),r.multiLine=t,r.transformFlags|=4,r}function Yn(e,t){const n=x(301);return n.name=e,n.value=t,n.transformFlags|=4,n}function Zn(e){const t=S(274);return t.name=e,t.transformFlags|=ZC(t.name),t.transformFlags&=-67108865,t}function er(e){const t=S(280);return t.name=e,t.transformFlags|=32|ZC(t.name),t.transformFlags&=-67108865,t}function tr(e){const t=x(275);return t.elements=b(e),t.transformFlags|=ew(t.elements),t.transformFlags&=-67108865,t}function nr(e,t,n){const r=S(276);return r.isTypeOnly=e,r.propertyName=t,r.name=n,r.transformFlags|=ZC(r.propertyName)|ZC(r.name),r.transformFlags&=-67108865,r}function rr(e,t,n){const i=S(277);return i.modifiers=Di(e),i.isExportEquals=t,i.expression=t?r().parenthesizeRightSideOfBinary(64,void 0,n):r().parenthesizeExpressionOfExportDefault(n),i.transformFlags|=ew(i.modifiers)|ZC(i.expression),i.transformFlags&=-67108865,i.jsDoc=void 0,i}function ir(e,t,n){return e.modifiers!==t||e.expression!==n?Ii(rr(t,e.isExportEquals,n),e):e}function or(e,t,n,r,i){const o=S(278);return o.modifiers=Di(e),o.isTypeOnly=t,o.exportClause=n,o.moduleSpecifier=r,o.attributes=o.assertClause=i,o.transformFlags|=ew(o.modifiers)|ZC(o.exportClause)|ZC(o.moduleSpecifier),o.transformFlags&=-67108865,o.jsDoc=void 0,o}function ar(e,t,n,r,i,o){return e.modifiers!==t||e.isTypeOnly!==n||e.exportClause!==r||e.moduleSpecifier!==i||e.attributes!==o?function(e,t){e!==t&&e.modifiers===t.modifiers&&(e.modifiers=t.modifiers);return Ii(e,t)}(or(t,n,r,i,o),e):e}function sr(e){const t=x(279);return t.elements=b(e),t.transformFlags|=ew(t.elements),t.transformFlags&=-67108865,t}function cr(e,t,n){const r=x(281);return r.isTypeOnly=e,r.propertyName=Pi(t),r.name=Pi(n),r.transformFlags|=ZC(r.propertyName)|ZC(r.name),r.transformFlags&=-67108865,r.jsDoc=void 0,r}function lr(e){const t=x(283);return t.expression=e,t.transformFlags|=ZC(t.expression),t.transformFlags&=-67108865,t}function _r(e,t,n=!1){const i=ur(e,n?t&&r().parenthesizeNonArrayTypeOfPostfixType(t):t);return i.postfix=n,i}function ur(e,t){const n=x(e);return n.type=t,n}function dr(e,t){const n=S(317);return n.parameters=Di(e),n.type=t,n.transformFlags=ew(n.parameters)|(n.type?1:0),n.jsDoc=void 0,n.locals=void 0,n.nextContainer=void 0,n.typeArguments=void 0,n}function pr(e,t=!1){const n=S(322);return n.jsDocPropertyTags=Di(e),n.isArrayType=t,n}function fr(e){const t=x(309);return t.type=e,t}function mr(e,t,n){const r=S(323);return r.typeParameters=Di(e),r.parameters=b(t),r.type=n,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r}function gr(e){const t=GC(e.kind);return e.tagName.escapedText===Tc(t)?e.tagName:A(t)}function hr(e,t,n){const r=x(e);return r.tagName=t,r.comment=n,r}function yr(e,t,n){const r=S(e);return r.tagName=t,r.comment=n,r}function vr(e,t,n,r){const i=hr(345,e??A("template"),r);return i.constraint=t,i.typeParameters=b(n),i}function br(e,t,n,r){const i=yr(346,e??A("typedef"),r);return i.typeExpression=t,i.fullName=n,i.name=jA(n),i.locals=void 0,i.nextContainer=void 0,i}function xr(e,t,n,r,i,o){const a=yr(341,e??A("param"),o);return a.typeExpression=r,a.name=t,a.isNameFirst=!!i,a.isBracketed=n,a}function Sr(e,t,n,r,i,o){const a=yr(348,e??A("prop"),o);return a.typeExpression=r,a.name=t,a.isNameFirst=!!i,a.isBracketed=n,a}function kr(e,t,n,r){const i=yr(338,e??A("callback"),r);return i.typeExpression=t,i.fullName=n,i.name=jA(n),i.locals=void 0,i.nextContainer=void 0,i}function Tr(e,t,n){const r=hr(339,e??A("overload"),n);return r.typeExpression=t,r}function Cr(e,t,n){const r=hr(328,e??A("augments"),n);return r.class=t,r}function wr(e,t,n){const r=hr(329,e??A("implements"),n);return r.class=t,r}function Nr(e,t,n){const r=hr(347,e??A("see"),n);return r.name=t,r}function Dr(e){const t=x(310);return t.name=e,t}function Pr(e,t){const n=x(311);return n.left=e,n.right=t,n.transformFlags|=ZC(n.left)|ZC(n.right),n}function Er(e,t){const n=x(324);return n.name=e,n.text=t,n}function Fr(e,t){const n=x(325);return n.name=e,n.text=t,n}function Ar(e,t){const n=x(326);return n.name=e,n.text=t,n}function Ir(e,t,n){return hr(e,t??A(GC(e)),n)}function Or(e,t,n,r){const i=hr(e,t??A(GC(e)),r);return i.typeExpression=n,i}function jr(e,t){return hr(327,e,t)}function Lr(e,t,n){const r=yr(340,e??A(GC(340)),n);return r.typeExpression=t,r.locals=void 0,r.nextContainer=void 0,r}function Mr(e,t,n,r,i){const o=hr(351,e??A("import"),i);return o.importClause=t,o.moduleSpecifier=n,o.attributes=r,o.comment=i,o}function Rr(e){const t=x(321);return t.text=e,t}function Br(e,t){const n=x(320);return n.comment=e,n.tags=Di(t),n}function Jr(e,t,n){const r=x(284);return r.openingElement=e,r.children=b(t),r.closingElement=n,r.transformFlags|=ZC(r.openingElement)|ew(r.children)|ZC(r.closingElement)|2,r}function zr(e,t,n){const r=x(285);return r.tagName=e,r.typeArguments=Di(t),r.attributes=n,r.transformFlags|=ZC(r.tagName)|ew(r.typeArguments)|ZC(r.attributes)|2,r.typeArguments&&(r.transformFlags|=1),r}function qr(e,t,n){const r=x(286);return r.tagName=e,r.typeArguments=Di(t),r.attributes=n,r.transformFlags|=ZC(r.tagName)|ew(r.typeArguments)|ZC(r.attributes)|2,t&&(r.transformFlags|=1),r}function Ur(e){const t=x(287);return t.tagName=e,t.transformFlags|=2|ZC(t.tagName),t}function Vr(e,t,n){const r=x(288);return r.openingFragment=e,r.children=b(t),r.closingFragment=n,r.transformFlags|=ZC(r.openingFragment)|ew(r.children)|ZC(r.closingFragment)|2,r}function Wr(e,t){const n=x(12);return n.text=e,n.containsOnlyTriviaWhiteSpaces=!!t,n.transformFlags|=2,n}function $r(e,t){const n=S(291);return n.name=e,n.initializer=t,n.transformFlags|=ZC(n.name)|ZC(n.initializer)|2,n}function Hr(e){const t=S(292);return t.properties=b(e),t.transformFlags|=2|ew(t.properties),t}function Kr(e){const t=x(293);return t.expression=e,t.transformFlags|=2|ZC(t.expression),t}function Gr(e,t){const n=x(294);return n.dotDotDotToken=e,n.expression=t,n.transformFlags|=ZC(n.dotDotDotToken)|ZC(n.expression)|2,n}function Xr(e,t){const n=x(295);return n.namespace=e,n.name=t,n.transformFlags|=ZC(n.namespace)|ZC(n.name)|2,n}function Qr(e,t){const n=x(296);return n.expression=r().parenthesizeExpressionForDisallowedComma(e),n.statements=b(t),n.transformFlags|=ZC(n.expression)|ew(n.statements),n.jsDoc=void 0,n}function Yr(e){const t=x(297);return t.statements=b(e),t.transformFlags=ew(t.statements),t}function Zr(e,t){const n=x(298);switch(n.token=e,n.types=b(t),n.transformFlags|=ew(n.types),e){case 96:n.transformFlags|=1024;break;case 119:n.transformFlags|=1;break;default:return Tn.assertNever(e)}return n}function ei(e,t){const n=x(299);return n.variableDeclaration=function(e){if("string"==typeof e||e&&!eE(e))return wn(e,void 0,void 0,void 0);return e}(e),n.block=t,n.transformFlags|=ZC(n.variableDeclaration)|ZC(n.block)|(e?0:64),n.locals=void 0,n.nextContainer=void 0,n}function ti(e,t){const n=S(303);return n.name=Pi(e),n.initializer=r().parenthesizeExpressionForDisallowedComma(t),n.transformFlags|=QC(n.name)|ZC(n.initializer),n.modifiers=void 0,n.questionToken=void 0,n.exclamationToken=void 0,n.jsDoc=void 0,n}function ni(e,t,n){return e.name!==t||e.initializer!==n?function(e,t){e!==t&&(e.modifiers=t.modifiers,e.questionToken=t.questionToken,e.exclamationToken=t.exclamationToken);return Ii(e,t)}(ti(t,n),e):e}function ri(e,t){const n=S(304);return n.name=Pi(e),n.objectAssignmentInitializer=t&&r().parenthesizeExpressionForDisallowedComma(t),n.transformFlags|=YC(n.name)|ZC(n.objectAssignmentInitializer)|1024,n.equalsToken=void 0,n.modifiers=void 0,n.questionToken=void 0,n.exclamationToken=void 0,n.jsDoc=void 0,n}function ii(e){const t=S(305);return t.expression=r().parenthesizeExpressionForDisallowedComma(e),t.transformFlags|=65664|ZC(t.expression),t.jsDoc=void 0,t}function oi(e,t){const n=S(306);return n.name=Pi(e),n.initializer=t&&r().parenthesizeExpressionForDisallowedComma(t),n.transformFlags|=ZC(n.name)|ZC(n.initializer)|1,n.jsDoc=void 0,n}function ai(e){const t=Object.create(e.redirectTarget);return Object.defineProperties(t,{id:{get(){return this.redirectInfo.redirectTarget.id},set(e){this.redirectInfo.redirectTarget.id=e}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(e){this.redirectInfo.redirectTarget.symbol=e}}}),t.redirectInfo=e,t}function si(e){const r=e.redirectInfo?function(e){const t=ai(e.redirectInfo);return t.flags|=-17&e.flags,t.fileName=e.fileName,t.path=e.path,t.resolvedPath=e.resolvedPath,t.originalFileName=e.originalFileName,t.packageJsonLocations=e.packageJsonLocations,t.packageJsonScope=e.packageJsonScope,t.emitNode=void 0,t}(e):function(e){const n=t.createBaseSourceFileNode(307);n.flags|=-17&e.flags;for(const t in e)!Be(n,t)&&Be(e,t)&&("emitNode"!==t?n[t]=e[t]:n.emitNode=void 0);return n}(e);return n(r,e),r}function ci(e){const t=x(308);return t.sourceFiles=e,t.syntheticFileReferences=void 0,t.syntheticTypeReferences=void 0,t.syntheticLibReferences=void 0,t.hasNoDefaultLib=void 0,t}function li(e,t){const n=x(354);return n.expression=e,n.original=t,n.transformFlags|=1|ZC(n.expression),vI(n,t),n}function _i(e,t){return e.expression!==t?Ii(li(t,e.original),e):e}function ui(e){if(my(e)&&!Sc(e)&&!e.original&&!e.emitNode&&!e.id){if(AP(e))return e.elements;if(yP(e)&&qN(e.operatorToken))return[e.left,e.right]}return e}function di(e){const t=x(355);return t.elements=b(V(e,ui)),t.transformFlags|=ew(t.elements),t}function pi(e,t){const n=x(356);return n.expression=e,n.thisArg=t,n.transformFlags|=ZC(n.expression)|ZC(n.thisArg),n}function fi(e){if(void 0===e)return e;if(QE(e))return si(e);if(n_(e))return function(e){const t=E(e.escapedText);return t.flags|=-17&e.flags,t.transformFlags=e.transformFlags,n(t,e),Ww(t,{...e.emitNode.autoGenerate}),t}(e);if(QN(e))return function(e){const t=E(e.escapedText);t.flags|=-17&e.flags,t.jsDoc=e.jsDoc,t.flowNode=e.flowNode,t.symbol=e.symbol,t.transformFlags=e.transformFlags,n(t,e);const r=Vw(e);return r&&Uw(t,r),t}(e);if(r_(e))return function(e){const t=j(e.escapedText);return t.flags|=-17&e.flags,t.transformFlags=e.transformFlags,n(t,e),Ww(t,{...e.emitNode.autoGenerate}),t}(e);if(YN(e))return function(e){const t=j(e.escapedText);return t.flags|=-17&e.flags,t.transformFlags=e.transformFlags,n(t,e),t}(e);const r=Jl(e.kind)?t.createBaseNode(e.kind):t.createBaseTokenNode(e.kind);r.flags|=-17&e.flags,r.transformFlags=e.transformFlags,n(r,e);for(const t in e)!Be(r,t)&&Be(e,t)&&(r[t]=e[t]);return r}function mi(){return Et(C("0"))}function gi(e,t,n){return Nl(e)?ut(nt(e,void 0,t),void 0,void 0,n):_t(tt(e,t),void 0,n)}function hi(e,t,n){return gi(A(e),t,n)}function yi(e,t,n){return!!n&&(e.push(ti(t,n)),!0)}function vi(e,t){const n=mh(e);switch(n.kind){case 80:return t;case 110:case 9:case 10:case 11:return!1;case 209:return 0!==n.elements.length;case 210:return n.properties.length>0;default:return!0}}function bi(e,t,n,r=0,i){const o=i?e&&Oc(e):jc(e);if(o&&QN(o)&&!n_(o)){const e=qT(vI(fi(o),o),o.parent);return r|=ip(o),n||(r|=96),t||(r|=3072),r&&dw(e,r),e}return O(e)}function xi(e,t,n){return bi(e,t,n,16384)}function Si(e,t,n,r){const i=tt(e,my(t)?t:fi(t));vI(i,t);let o=0;return r||(o|=96),n||(o|=3072),o&&dw(i,o),i}function ki(e){return ON(e.expression)&&"use strict"===e.expression.text}function Ti(){return bA(cn(D("use strict")))}function Ci(e,t,n=0,r){Tn.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");let i=!1;const o=e.length;for(;n=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:case 206:case 207:return-2147450880;case 267:return-1941676032;case 169:case 216:case 238:case 234:case 354:case 217:case 108:case 211:case 212:default:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112}}var rw=RC();function iw(e){return e.flags|=16,e}var ow,aw=KC(4,{createBaseSourceFileNode:e=>iw(rw.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>iw(rw.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>iw(rw.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>iw(rw.createBaseTokenNode(e)),createBaseNode:e=>iw(rw.createBaseNode(e))});function sw(e,t,n){return new(ow||(ow=nS.getSourceMapSourceConstructor()))(e,t,n)}function cw(e,t){if(e.original!==t&&(e.original=t,t)){const n=t.emitNode;n&&(e.emitNode=function(e,t){const{flags:n,internalFlags:r,leadingComments:i,trailingComments:o,commentRange:a,sourceMapRange:s,tokenSourceMapRanges:c,constantValue:l,helpers:_,startsOnNewLine:u,snippetElement:d,classThis:p,assignedName:f}=e;t||(t={});n&&(t.flags=n);r&&(t.internalFlags=-9&r);i&&(t.leadingComments=ge(i.slice(),t.leadingComments));o&&(t.trailingComments=ge(o.slice(),t.trailingComments));a&&(t.commentRange=a);s&&(t.sourceMapRange=s);c&&(t.tokenSourceMapRanges=function(e,t){t||(t=[]);for(const n in e)t[n]=e[n];return t}(c,t.tokenSourceMapRanges));void 0!==l&&(t.constantValue=l);if(_)for(const e of _)t.helpers=ye(t.helpers,e);void 0!==u&&(t.startsOnNewLine=u);void 0!==d&&(t.snippetElement=d);p&&(t.classThis=p);f&&(t.assignedName=f);return t}(n,e.emitNode))}return e}function lw(e){if(e.emitNode)Tn.assert(!(8&e.emitNode.internalFlags),"Invalid attempt to mutate an immutable node.");else{if(Sc(e)){if(307===e.kind)return e.emitNode={annotatedNodes:[e]};lw(Dd(kc(Dd(e)))??Tn.fail("Could not determine parsed source file.")).annotatedNodes.push(e)}e.emitNode={}}return e.emitNode}function _w(e){var t,n;const r=null==(n=null==(t=Dd(kc(e)))?void 0:t.emitNode)?void 0:n.annotatedNodes;if(r)for(const e of r)e.emitNode=void 0}function uw(e){const t=lw(e);return t.flags|=3072,t.leadingComments=void 0,t.trailingComments=void 0,e}function dw(e,t){return lw(e).flags=t,e}function pw(e,t){const n=lw(e);return n.flags=n.flags|t,e}function fw(e,t){return lw(e).internalFlags=t,e}function mw(e,t){const n=lw(e);return n.internalFlags=n.internalFlags|t,e}function gw(e){var t;return(null==(t=e.emitNode)?void 0:t.sourceMapRange)??e}function hw(e,t){return lw(e).sourceMapRange=t,e}function yw(e,t){var n,r;return null==(r=null==(n=e.emitNode)?void 0:n.tokenSourceMapRanges)?void 0:r[t]}function vw(e,t,n){const r=lw(e);return(r.tokenSourceMapRanges??(r.tokenSourceMapRanges=[]))[t]=n,e}function bw(e){var t;return null==(t=e.emitNode)?void 0:t.startsOnNewLine}function xw(e,t){return lw(e).startsOnNewLine=t,e}function Sw(e){var t;return(null==(t=e.emitNode)?void 0:t.commentRange)??e}function kw(e,t){return lw(e).commentRange=t,e}function Tw(e){var t;return null==(t=e.emitNode)?void 0:t.leadingComments}function Cw(e,t){return lw(e).leadingComments=t,e}function ww(e,t,n,r){return Cw(e,pe(Tw(e),{kind:t,pos:-1,end:-1,hasTrailingNewLine:r,text:n}))}function Nw(e){var t;return null==(t=e.emitNode)?void 0:t.trailingComments}function Dw(e,t){return lw(e).trailingComments=t,e}function Pw(e,t,n,r){return Dw(e,pe(Nw(e),{kind:t,pos:-1,end:-1,hasTrailingNewLine:r,text:n}))}function Ew(e,t){Cw(e,Tw(t)),Dw(e,Nw(t));const n=lw(t);return n.leadingComments=void 0,n.trailingComments=void 0,e}function Fw(e){var t;return null==(t=e.emitNode)?void 0:t.constantValue}function Aw(e,t){return lw(e).constantValue=t,e}function Iw(e,t){const n=lw(e);return n.helpers=pe(n.helpers,t),e}function Ow(e,t){if(ee(t)){const n=lw(e);for(const e of t)n.helpers=ye(n.helpers,e)}return e}function jw(e,t){var n;const r=null==(n=e.emitNode)?void 0:n.helpers;return!!r&&en(r,t)}function Lw(e){var t;return null==(t=e.emitNode)?void 0:t.helpers}function Mw(e,t,n){const r=e.emitNode,i=r&&r.helpers;if(!ee(i))return;const o=lw(t);let a=0;for(let e=0;e0&&(i[e-a]=t)}a>0&&(i.length-=a)}function Rw(e){var t;return null==(t=e.emitNode)?void 0:t.snippetElement}function Bw(e,t){return lw(e).snippetElement=t,e}function Jw(e){return lw(e).internalFlags|=4,e}function zw(e,t){return lw(e).typeNode=t,e}function qw(e){var t;return null==(t=e.emitNode)?void 0:t.typeNode}function Uw(e,t){return lw(e).identifierTypeArguments=t,e}function Vw(e){var t;return null==(t=e.emitNode)?void 0:t.identifierTypeArguments}function Ww(e,t){return lw(e).autoGenerate=t,e}function $w(e){var t;return null==(t=e.emitNode)?void 0:t.autoGenerate}function Hw(e,t){return lw(e).generatedImportReference=t,e}function Kw(e){var t;return null==(t=e.emitNode)?void 0:t.generatedImportReference}var Gw=(e=>(e.Field="f",e.Method="m",e.Accessor="a",e))(Gw||{});function Xw(e){const t=e.factory,n=kt(()=>fw(t.createTrue(),8)),r=kt(()=>fw(t.createFalse(),8));return{getUnscopedHelperName:i,createDecorateHelper:function(n,r,o,a){e.requestEmitHelper(Zw);const s=[];s.push(t.createArrayLiteralExpression(n,!0)),s.push(r),o&&(s.push(o),a&&s.push(a));return t.createCallExpression(i("__decorate"),void 0,s)},createMetadataHelper:function(n,r){return e.requestEmitHelper(eN),t.createCallExpression(i("__metadata"),void 0,[t.createStringLiteral(n),r])},createParamHelper:function(n,r,o){return e.requestEmitHelper(tN),vI(t.createCallExpression(i("__param"),void 0,[t.createNumericLiteral(r+""),n]),o)},createESDecorateHelper:function(n,r,o,s,c,l){return e.requestEmitHelper(nN),t.createCallExpression(i("__esDecorate"),void 0,[n??t.createNull(),r??t.createNull(),o,a(s),c,l])},createRunInitializersHelper:function(n,r,o){return e.requestEmitHelper(rN),t.createCallExpression(i("__runInitializers"),void 0,o?[n,r,o]:[n,r])},createAssignHelper:function(n){if(OS(e.getCompilerOptions())>=2)return t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"assign"),void 0,n);return e.requestEmitHelper(iN),t.createCallExpression(i("__assign"),void 0,n)},createAwaitHelper:function(n){return e.requestEmitHelper(oN),t.createCallExpression(i("__await"),void 0,[n])},createAsyncGeneratorHelper:function(n,r){return e.requestEmitHelper(oN),e.requestEmitHelper(aN),(n.emitNode||(n.emitNode={})).flags|=1572864,t.createCallExpression(i("__asyncGenerator"),void 0,[r?t.createThis():t.createVoidZero(),t.createIdentifier("arguments"),n])},createAsyncDelegatorHelper:function(n){return e.requestEmitHelper(oN),e.requestEmitHelper(sN),t.createCallExpression(i("__asyncDelegator"),void 0,[n])},createAsyncValuesHelper:function(n){return e.requestEmitHelper(cN),t.createCallExpression(i("__asyncValues"),void 0,[n])},createRestHelper:function(n,r,o,a){e.requestEmitHelper(lN);const s=[];let c=0;for(let e=0;e{let r="";for(let i=0;i= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'},eN={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'},tN={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"},nN={name:"typescript:esDecorate",importName:"__esDecorate",scoped:!1,priority:2,text:'\n var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }\n var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";\n var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === "accessor") {\n if (result === void 0) continue;\n if (result === null || typeof result !== "object") throw new TypeError("Object expected");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === "field") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n };'},rN={name:"typescript:runInitializers",importName:"__runInitializers",scoped:!1,priority:2,text:"\n var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n };"},iN={name:"typescript:assign",importName:"__assign",scoped:!1,priority:1,text:"\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };"},oN={name:"typescript:await",importName:"__await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }"},aN={name:"typescript:asyncGenerator",importName:"__asyncGenerator",scoped:!1,dependencies:[oN],text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'},sN={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,dependencies:[oN],text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n };'},cN={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'},lN={name:"typescript:rest",importName:"__rest",scoped:!1,text:'\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n };'},_N={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'},uN={name:"typescript:extends",importName:"__extends",scoped:!1,priority:0,text:'\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();'},dN={name:"typescript:makeTemplateObject",importName:"__makeTemplateObject",scoped:!1,priority:0,text:'\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };'},pN={name:"typescript:read",importName:"__read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'},fN={name:"typescript:spreadArray",importName:"__spreadArray",scoped:!1,text:"\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"},mN={name:"typescript:propKey",importName:"__propKey",scoped:!1,text:'\n var __propKey = (this && this.__propKey) || function (x) {\n return typeof x === "symbol" ? x : "".concat(x);\n };'},gN={name:"typescript:setFunctionName",importName:"__setFunctionName",scoped:!1,text:'\n var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {\n if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";\n return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });\n };'},hN={name:"typescript:values",importName:"__values",scoped:!1,text:'\n var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === "number") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n };'},yN={name:"typescript:generator",importName:"__generator",scoped:!1,priority:6,text:'\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'},vN={name:"typescript:commonjscreatebinding",importName:"__createBinding",scoped:!1,priority:1,text:'\n var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n }) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n }));'},bN={name:"typescript:commonjscreatevalue",importName:"__setModuleDefault",scoped:!1,priority:1,text:'\n var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n }) : function(o, v) {\n o["default"] = v;\n });'},xN={name:"typescript:commonjsimportstar",importName:"__importStar",scoped:!1,dependencies:[vN,bN],priority:2,text:'\n var __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n };'},SN={name:"typescript:commonjsimportdefault",importName:"__importDefault",scoped:!1,text:'\n var __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n };'},kN={name:"typescript:export-star",importName:"__exportStar",scoped:!1,dependencies:[vN],priority:2,text:'\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n };'},TN={name:"typescript:classPrivateFieldGet",importName:"__classPrivateFieldGet",scoped:!1,text:'\n var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");\n return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);\n };'},CN={name:"typescript:classPrivateFieldSet",importName:"__classPrivateFieldSet",scoped:!1,text:'\n var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === "m") throw new TypeError("Private method is not writable");\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");\n return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n };'},wN={name:"typescript:classPrivateFieldIn",importName:"__classPrivateFieldIn",scoped:!1,text:'\n var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) {\n if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use \'in\' operator on non-object");\n return typeof state === "function" ? receiver === state : state.has(receiver);\n };'},NN={name:"typescript:addDisposableResource",importName:"__addDisposableResource",scoped:!1,text:'\n var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== "function") throw new TypeError("Object not disposable.");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n };'},DN={name:"typescript:disposeResources",importName:"__disposeResources",scoped:!1,text:'\n var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {\n return function (env) {\n function fail(e) {\n env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n };\n })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;\n });'},PN={name:"typescript:async-super",scoped:!0,text:Yw` - const ${"_superIndex"} = name => super[name];`},EN={name:"typescript:advanced-async-super",scoped:!0,text:Yw` +var o={};(t=>{"use strict";var o=Object.defineProperty,a=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.prototype.hasOwnProperty,(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})}),s={};a(s,{ANONYMOUS:()=>AZ,AccessFlags:()=>ti,AssertionLevel:()=>vt,AssignmentDeclarationKind:()=>ui,AssignmentKind:()=>th,Associativity:()=>cy,BreakpointResolver:()=>k7,BuilderFileEmit:()=>dW,BuilderProgramKind:()=>zW,BuilderState:()=>_W,CallHierarchy:()=>C7,CharacterCodes:()=>Ni,CheckFlags:()=>Hr,CheckMode:()=>sJ,ClassificationType:()=>oX,ClassificationTypeNames:()=>iX,CommentDirectiveType:()=>Er,Comparison:()=>d,CompletionInfoFlags:()=>QG,CompletionTriggerKind:()=>UG,Completions:()=>Mae,ContainerFlags:()=>aB,ContextFlags:()=>Br,Debug:()=>gn,DiagnosticCategory:()=>di,Diagnostics:()=>ha,DocumentHighlights:()=>R0,ElementFlags:()=>ei,EmitFlags:()=>Pi,EmitHint:()=>Li,EmitOnly:()=>Ir,EndOfLineState:()=>eX,ExitStatus:()=>Lr,ExportKind:()=>T0,Extension:()=>Di,ExternalEmitHelpers:()=>Oi,FileIncludeKind:()=>Pr,FilePreprocessingDiagnosticsKind:()=>Ar,FileSystemEntryKind:()=>lo,FileWatcherEventKind:()=>Vi,FindAllReferences:()=>Bce,FlattenLevel:()=>Rz,FlowFlags:()=>Dr,ForegroundColorEscapeSequences:()=>_V,FunctionFlags:()=>Jh,GeneratedIdentifierFlags:()=>Cr,GetLiteralTextFlags:()=>lp,GoToDefinition:()=>wle,HighlightSpanKind:()=>WG,IdentifierNameMap:()=>pz,ImportKind:()=>k0,ImportsNotUsedAsValues:()=>xi,IndentStyle:()=>$G,IndexFlags:()=>ni,IndexKind:()=>ai,InferenceFlags:()=>li,InferencePriority:()=>ci,InlayHintKind:()=>VG,InlayHints:()=>Vle,InternalEmitFlags:()=>Ai,InternalNodeBuilderFlags:()=>zr,InternalSymbolName:()=>Gr,IntersectionFlags:()=>Rr,InvalidatedProjectKind:()=>OK,JSDocParsingMode:()=>zi,JsDoc:()=>Gle,JsTyping:()=>cG,JsxEmit:()=>bi,JsxFlags:()=>Sr,JsxReferenceKind:()=>ri,LanguageFeatureMinimumTarget:()=>Ii,LanguageServiceMode:()=>BG,LanguageVariant:()=>Ci,LexicalEnvironmentFlags:()=>Mi,ListFormat:()=>Ri,LogLevel:()=>hn,MapCode:()=>m_e,MemberOverrideStatus:()=>jr,ModifierFlags:()=>xr,ModuleDetectionKind:()=>mi,ModuleInstanceState:()=>nB,ModuleKind:()=>vi,ModuleResolutionKind:()=>fi,ModuleSpecifierEnding:()=>Wk,NavigateTo:()=>_2,NavigationBar:()=>x2,NewLineKind:()=>Si,NodeBuilderFlags:()=>Jr,NodeCheckFlags:()=>Xr,NodeFactoryFlags:()=>lw,NodeFlags:()=>br,NodeResolutionFeatures:()=>ZM,ObjectFlags:()=>Yr,OperationCanceledException:()=>Fr,OperatorPrecedence:()=>py,OrganizeImports:()=>x_e,OrganizeImportsMode:()=>qG,OuterExpressionKinds:()=>ji,OutliningElementsCollector:()=>Z_e,OutliningSpanKind:()=>YG,OutputFileType:()=>ZG,PackageJsonAutoImportPreference:()=>RG,PackageJsonDependencyGroup:()=>MG,PatternMatchKind:()=>u1,PollingInterval:()=>Wi,PollingWatchKind:()=>yi,PragmaKindFlags:()=>Bi,PredicateSemantics:()=>Tr,PreparePasteEdits:()=>jfe,PrivateIdentifierKind:()=>dN,ProcessLevel:()=>oq,ProgramUpdateLevel:()=>zU,QuotePreference:()=>yY,RegularExpressionFlags:()=>wr,RelationComparisonResult:()=>kr,Rename:()=>cue,ScriptElementKind:()=>nX,ScriptElementKindModifier:()=>rX,ScriptKind:()=>ki,ScriptSnapshot:()=>FG,ScriptTarget:()=>Ti,SemanticClassificationFormat:()=>zG,SemanticMeaning:()=>sX,SemicolonPreference:()=>KG,SignatureCheckMode:()=>cJ,SignatureFlags:()=>oi,SignatureHelp:()=>mue,SignatureInfo:()=>uW,SignatureKind:()=>ii,SmartSelectionRange:()=>zue,SnippetKind:()=>Fi,StatisticType:()=>bH,StructureIsReused:()=>Or,SymbolAccessibility:()=>Vr,SymbolDisplay:()=>Yue,SymbolDisplayPartKind:()=>XG,SymbolFlags:()=>Kr,SymbolFormatFlags:()=>Ur,SyntaxKind:()=>vr,Ternary:()=>_i,ThrottledCancellationToken:()=>f7,TokenClass:()=>tX,TokenFlags:()=>Nr,TransformFlags:()=>Ei,TypeFacts:()=>oJ,TypeFlags:()=>Qr,TypeFormatFlags:()=>qr,TypeMapKind:()=>si,TypePredicateKind:()=>Wr,TypeReferenceSerializationKind:()=>$r,UnionReduction:()=>Mr,UpToDateStatusType:()=>aK,VarianceFlags:()=>Zr,Version:()=>Cn,VersionRange:()=>Nn,WatchDirectoryFlags:()=>wi,WatchDirectoryKind:()=>hi,WatchFileKind:()=>gi,WatchLogLevel:()=>GU,WatchType:()=>V$,accessPrivateIdentifier:()=>Oz,addEmitFlags:()=>Fw,addEmitHelper:()=>Xw,addEmitHelpers:()=>Qw,addInternalEmitFlags:()=>Aw,addNodeFactoryPatcher:()=>uw,addObjectAllocatorPatcher:()=>Kx,addRange:()=>de,addRelatedInfo:()=>fT,addSyntheticLeadingComment:()=>Uw,addSyntheticTrailingComment:()=>$w,addToSeen:()=>Dx,advancedAsyncSuperHelper:()=>KN,affectsDeclarationPathOptionDeclarations:()=>KO,affectsEmitOptionDeclarations:()=>$O,allKeysStartWithDot:()=>FR,altDirectorySeparator:()=>yo,and:()=>on,append:()=>le,appendIfUnique:()=>fe,arrayFrom:()=>Be,arrayIsEqualTo:()=>ae,arrayIsHomogeneous:()=>FT,arrayOf:()=>Re,arrayReverseIterator:()=>ge,arrayToMap:()=>qe,arrayToMultiMap:()=>Ve,arrayToNumericMap:()=>Ue,assertType:()=>cn,assign:()=>Je,asyncSuperHelper:()=>$N,attachFileToDiagnostics:()=>nS,base64decode:()=>Ab,base64encode:()=>Pb,binarySearch:()=>Ee,binarySearchKey:()=>Fe,bindSourceFile:()=>lB,breakIntoCharacterSpans:()=>D1,breakIntoWordSpans:()=>E1,buildLinkParts:()=>nZ,buildOpts:()=>iL,buildOverload:()=>Gfe,bundlerModuleNameResolver:()=>tR,canBeConvertedToAsync:()=>Z1,canHaveDecorators:()=>OI,canHaveExportModifier:()=>ZT,canHaveFlowNode:()=>zg,canHaveIllegalDecorators:()=>eI,canHaveIllegalModifiers:()=>tI,canHaveIllegalType:()=>YA,canHaveIllegalTypeParameters:()=>ZA,canHaveJSDoc:()=>qg,canHaveLocals:()=>fu,canHaveModifiers:()=>II,canHaveModuleSpecifier:()=>Tg,canHaveSymbol:()=>pu,canIncludeBindAndCheckDiagnostics:()=>xT,canJsonReportNoInputFiles:()=>Nj,canProduceDiagnostics:()=>Bq,canUsePropertyAccess:()=>tC,canWatchAffectingLocation:()=>_$,canWatchAtTypes:()=>s$,canWatchDirectoryOrFile:()=>o$,canWatchDirectoryOrFilePath:()=>a$,cartesianProduct:()=>un,cast:()=>st,chainBundle:()=>az,chainDiagnosticMessages:()=>sS,changeAnyExtension:()=>ea,changeCompilerHostLikeToUseCache:()=>aV,changeExtension:()=>eT,changeFullExtension:()=>ta,changesAffectModuleResolution:()=>ad,changesAffectingProgramStructure:()=>sd,characterCodeToRegularExpressionFlag:()=>Ja,childIsDecorated:()=>Sm,classElementOrClassElementParameterIsDecorated:()=>Tm,classHasClassThisAssignment:()=>Gz,classHasDeclaredOrExplicitlyAssignedName:()=>tq,classHasExplicitlyAssignedName:()=>eq,classOrConstructorParameterIsDecorated:()=>km,classicNameResolver:()=>GR,classifier:()=>V7,cleanExtendedConfigCache:()=>VU,clear:()=>I,clearMap:()=>vx,clearSharedExtendedConfigFileWatcher:()=>UU,climbPastPropertyAccess:()=>xX,clone:()=>Ke,cloneCompilerOptions:()=>qQ,closeFileWatcher:()=>_x,closeFileWatcherOf:()=>YU,codefix:()=>$7,collapseTextChangeRangesAcrossMultipleVersions:()=>ic,collectExternalModuleInfo:()=>_z,combine:()=>_e,combinePaths:()=>Uo,commandLineOptionOfCustomType:()=>eL,commentPragmas:()=>Ji,commonOptionsWithBuild:()=>JO,compact:()=>se,compareBooleans:()=>Bt,compareDataObjects:()=>yx,compareDiagnostics:()=>_S,compareEmitHelpers:()=>fN,compareNumberOfDirectorySeparators:()=>Gk,comparePaths:()=>aa,comparePathsCaseInsensitive:()=>oa,comparePathsCaseSensitive:()=>ia,comparePatternKeys:()=>AR,compareProperties:()=>Rt,compareStringsCaseInsensitive:()=>Dt,compareStringsCaseInsensitiveEslintCompatible:()=>Et,compareStringsCaseSensitive:()=>Ft,compareStringsCaseSensitiveUI:()=>Mt,compareTextSpans:()=>Ct,compareValues:()=>Tt,compilerOptionsAffectDeclarationPath:()=>ZS,compilerOptionsAffectEmit:()=>YS,compilerOptionsAffectSemanticDiagnostics:()=>QS,compilerOptionsDidYouMeanDiagnostics:()=>vL,compilerOptionsIndicateEsModules:()=>dY,computeCommonSourceDirectoryOfFilenames:()=>tV,computeLineAndCharacterOfPosition:()=>Wa,computeLineOfPosition:()=>$a,computeLineStarts:()=>za,computePositionOfLineAndCharacter:()=>Ua,computeSignatureWithDiagnostics:()=>VW,computeSuggestionDiagnostics:()=>U1,computedOptions:()=>TS,concatenate:()=>Y,concatenateDiagnosticMessageChains:()=>cS,consumesNodeCoreModules:()=>QZ,contains:()=>D,containsIgnoredPath:()=>zT,containsObjectRestOrSpread:()=>PI,containsParseError:()=>Cd,containsPath:()=>sa,convertCompilerOptionsForTelemetry:()=>oM,convertCompilerOptionsFromJson:()=>Aj,convertJsonOption:()=>Jj,convertToBase64:()=>Fb,convertToJson:()=>XL,convertToObject:()=>GL,convertToOptionsWithAbsolutePaths:()=>cj,convertToRelativePath:()=>ua,convertToTSConfig:()=>ZL,convertTypeAcquisitionFromJson:()=>Ij,copyComments:()=>hZ,copyEntries:()=>dd,copyLeadingComments:()=>bZ,copyProperties:()=>Ge,copyTrailingAsLeadingComments:()=>SZ,copyTrailingComments:()=>xZ,couldStartTrivia:()=>rs,countWhere:()=>F,createAbstractBuilder:()=>n$,createAccessorPropertyBackingField:()=>CI,createAccessorPropertyGetRedirector:()=>wI,createAccessorPropertySetRedirector:()=>NI,createBaseNodeFactory:()=>nw,createBinaryExpressionTrampoline:()=>yI,createBuilderProgram:()=>WW,createBuilderProgramUsingIncrementalBuildInfo:()=>XW,createBuilderStatusReporter:()=>pK,createCacheableExportInfoMap:()=>C0,createCachedDirectoryStructureHost:()=>JU,createClassifier:()=>M0,createCommentDirectivesMap:()=>Kd,createCompilerDiagnostic:()=>oS,createCompilerDiagnosticForInvalidCustomType:()=>_L,createCompilerDiagnosticFromMessageChain:()=>aS,createCompilerHost:()=>nV,createCompilerHostFromProgramHost:()=>$$,createCompilerHostWorker:()=>oV,createDetachedDiagnostic:()=>Zx,createDiagnosticCollection:()=>hy,createDiagnosticForFileFromMessageChain:()=>Yp,createDiagnosticForNode:()=>Wp,createDiagnosticForNodeArray:()=>$p,createDiagnosticForNodeArrayFromMessageChain:()=>Gp,createDiagnosticForNodeFromMessageChain:()=>Hp,createDiagnosticForNodeInSourceFile:()=>Kp,createDiagnosticForRange:()=>ef,createDiagnosticMessageChainFromDiagnostic:()=>Zp,createDiagnosticReporter:()=>x$,createDocumentPositionMapper:()=>tz,createDocumentRegistry:()=>Z0,createDocumentRegistryInternal:()=>e1,createEmitAndSemanticDiagnosticsBuilderProgram:()=>t$,createEmitHelperFactory:()=>pN,createEmptyExports:()=>dA,createEvaluator:()=>TC,createExpressionForJsxElement:()=>hA,createExpressionForJsxFragment:()=>yA,createExpressionForObjectLiteralElementLike:()=>SA,createExpressionForPropertyName:()=>xA,createExpressionFromEntityName:()=>bA,createExternalHelpersImportDeclarationIfNeeded:()=>JA,createFileDiagnostic:()=>rS,createFileDiagnosticFromMessageChain:()=>Qp,createFlowNode:()=>sB,createForOfBindingStatement:()=>vA,createFutureSourceFile:()=>S0,createGetCanonicalFileName:()=>Xt,createGetIsolatedDeclarationErrors:()=>qq,createGetSourceFile:()=>rV,createGetSymbolAccessibilityDiagnosticForNode:()=>zq,createGetSymbolAccessibilityDiagnosticForNodeName:()=>Jq,createGetSymbolWalker:()=>mB,createIncrementalCompilerHost:()=>nK,createIncrementalProgram:()=>rK,createJsxFactoryExpression:()=>gA,createLanguageService:()=>h7,createLanguageServiceSourceFile:()=>_7,createMemberAccessForPropertyName:()=>pA,createModeAwareCache:()=>JM,createModeAwareCacheKey:()=>BM,createModeMismatchDetails:()=>bd,createModuleNotFoundChain:()=>vd,createModuleResolutionCache:()=>WM,createModuleResolutionLoader:()=>IV,createModuleResolutionLoaderUsingGlobalCache:()=>h$,createModuleSpecifierResolutionHost:()=>pY,createMultiMap:()=>Qe,createNameResolver:()=>NC,createNodeConverters:()=>ow,createNodeFactory:()=>dw,createOptionNameMap:()=>aL,createOverload:()=>Hfe,createPackageJsonImportFilter:()=>XZ,createPackageJsonInfo:()=>GZ,createParenthesizerRules:()=>rw,createPatternMatcher:()=>p1,createPrinter:()=>jU,createPrinterWithDefaults:()=>AU,createPrinterWithRemoveComments:()=>IU,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>OU,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>LU,createProgram:()=>GV,createProgramDiagnostics:()=>cW,createProgramHost:()=>G$,createPropertyNameNodeForIdentifierOrLiteral:()=>GT,createQueue:()=>et,createRange:()=>Jb,createRedirectedBuilderProgram:()=>ZW,createResolutionCache:()=>y$,createRuntimeTypeSerializer:()=>pq,createScanner:()=>ks,createSemanticDiagnosticsBuilderProgram:()=>e$,createSet:()=>tt,createSolutionBuilder:()=>hK,createSolutionBuilderHost:()=>mK,createSolutionBuilderWithWatch:()=>yK,createSolutionBuilderWithWatchHost:()=>gK,createSortedArray:()=>re,createSourceFile:()=>uO,createSourceMapGenerator:()=>jJ,createSourceMapSource:()=>Tw,createSuperAccessVariableStatement:()=>hq,createSymbolTable:()=>nd,createSymlinkCache:()=>ok,createSyntacticTypeNodeBuilder:()=>sG,createSystemWatchFunctions:()=>po,createTextChange:()=>eY,createTextChangeFromStartLength:()=>ZQ,createTextChangeRange:()=>nc,createTextRangeFromNode:()=>XQ,createTextRangeFromSpan:()=>YQ,createTextSpan:()=>Ys,createTextSpanFromBounds:()=>Zs,createTextSpanFromNode:()=>HQ,createTextSpanFromRange:()=>QQ,createTextSpanFromStringLiteralLikeContent:()=>GQ,createTextWriter:()=>zy,createTokenRange:()=>Wb,createTypeChecker:()=>gJ,createTypeReferenceDirectiveResolutionCache:()=>$M,createTypeReferenceResolutionLoader:()=>jV,createWatchCompilerHost:()=>iK,createWatchCompilerHostOfConfigFile:()=>Y$,createWatchCompilerHostOfFilesAndCompilerOptions:()=>Z$,createWatchFactory:()=>W$,createWatchHost:()=>U$,createWatchProgram:()=>oK,createWatchStatusReporter:()=>C$,createWriteFileMeasuringIO:()=>iV,declarationNameToString:()=>Bp,decodeMappings:()=>VJ,decodedTextSpanIntersectsWith:()=>Ks,deduplicate:()=>ne,defaultHoverMaximumTruncationLength:()=>Zu,defaultInitCompilerOptions:()=>lL,defaultMaximumTruncationLength:()=>Qu,diagnosticCategoryName:()=>pi,diagnosticToString:()=>m0,diagnosticsEqualityComparer:()=>fS,directoryProbablyExists:()=>jb,directorySeparator:()=>ho,displayPart:()=>UY,displayPartsToString:()=>o7,disposeEmitNodes:()=>Nw,documentSpansEqual:()=>IY,dumpTracingLegend:()=>yr,elementAt:()=>ye,elideNodes:()=>bI,emitDetachedComments:()=>Dv,emitFiles:()=>DU,emitFilesAndReportErrors:()=>B$,emitFilesAndReportErrorsAndGetExitStatus:()=>J$,emitModuleKindIsNonNodeESM:()=>qS,emitNewLineBeforeLeadingCommentOfPosition:()=>Nv,emitResolverSkipsTypeChecking:()=>NU,emitSkippedWithNoDiagnostics:()=>eW,emptyArray:()=>p,emptyFileSystemEntries:()=>uT,emptyMap:()=>f,emptyOptions:()=>JG,endsWith:()=>qt,ensurePathIsNonModuleName:()=>Zo,ensureScriptKind:()=>Dk,ensureTrailingDirectorySeparator:()=>Yo,entityNameToString:()=>Vp,enumerateInsertsAndDeletes:()=>_n,equalOwnProperties:()=>ze,equateStringsCaseInsensitive:()=>xt,equateStringsCaseSensitive:()=>St,equateValues:()=>bt,escapeJsxAttributeString:()=>Ly,escapeLeadingUnderscores:()=>xc,escapeNonAsciiString:()=>Fy,escapeSnippetText:()=>KT,escapeString:()=>Dy,escapeTemplateSubstitution:()=>vy,evaluatorResult:()=>kC,every:()=>k,exclusivelyPrefixedNodeCoreModules:()=>OC,executeCommandLine:()=>MH,expandPreOrPostfixIncrementOrDecrementExpression:()=>kA,explainFiles:()=>I$,explainIfFileIsRedirectAndImpliedFormat:()=>O$,exportAssignmentIsAlias:()=>Sh,expressionResultIsUnused:()=>JT,extend:()=>He,extensionFromPath:()=>sT,extensionIsTS:()=>oT,extensionsNotSupportingExtensionlessResolution:()=>Bk,externalHelpersModuleNameText:()=>Xu,factory:()=>kw,fileExtensionIs:()=>Eo,fileExtensionIsOneOf:()=>Fo,fileIncludeReasonToDiagnostics:()=>M$,fileShouldUseJavaScriptRequire:()=>b0,filter:()=>P,filterMutate:()=>A,filterSemanticDiagnostics:()=>nW,find:()=>T,findAncestor:()=>yc,findBestPatternMatch:()=>Zt,findChildOfKind:()=>YX,findComputedPropertyNameCacheAssignment:()=>DI,findConfigFile:()=>ZU,findConstructorDeclaration:()=>wC,findContainingList:()=>ZX,findDiagnosticForNode:()=>e0,findFirstNonJsxWhitespaceToken:()=>fQ,findIndex:()=>w,findLast:()=>C,findLastIndex:()=>N,findListItemInfo:()=>XX,findModifier:()=>EY,findNextToken:()=>gQ,findPackageJson:()=>HZ,findPackageJsons:()=>KZ,findPrecedingMatchingToken:()=>NQ,findPrecedingToken:()=>hQ,findSuperStatementIndexPath:()=>xz,findTokenOnLeftOfPosition:()=>mQ,findUseStrictPrologue:()=>DA,first:()=>xe,firstDefined:()=>y,firstDefinedIterator:()=>v,firstIterator:()=>Se,firstOrOnly:()=>o0,firstOrUndefined:()=>ve,firstOrUndefinedIterator:()=>be,fixupCompilerOptions:()=>l2,flatMap:()=>R,flatMapIterator:()=>J,flatMapToMutable:()=>B,flatten:()=>M,flattenCommaList:()=>FI,flattenDestructuringAssignment:()=>Bz,flattenDestructuringBinding:()=>qz,flattenDiagnosticMessageText:()=>SV,forEach:()=>g,forEachAncestor:()=>ld,forEachAncestorDirectory:()=>fa,forEachAncestorDirectoryStoppingAtGlobalCache:()=>RR,forEachChild:()=>sO,forEachChildRecursively:()=>cO,forEachDynamicImportOrRequireCall:()=>jC,forEachEmittedFile:()=>cU,forEachEnclosingBlockScopeContainer:()=>Rp,forEachEntry:()=>_d,forEachExternalModuleToImportFrom:()=>D0,forEachImportClauseDeclaration:()=>Ag,forEachKey:()=>ud,forEachLeadingCommentRange:()=>ds,forEachNameInAccessChainWalkingLeft:()=>Lx,forEachNameOfDefaultExport:()=>j0,forEachOptionsSyntaxByName:()=>WC,forEachProjectReference:()=>qC,forEachPropertyAssignment:()=>Qf,forEachResolvedProjectReference:()=>zC,forEachReturnStatement:()=>Lf,forEachRight:()=>h,forEachTrailingCommentRange:()=>ps,forEachTsConfigPropArray:()=>em,forEachUnique:()=>LY,forEachYieldExpression:()=>jf,formatColorAndReset:()=>yV,formatDiagnostic:()=>lV,formatDiagnostics:()=>cV,formatDiagnosticsWithColorAndContext:()=>xV,formatGeneratedName:()=>TI,formatGeneratedNamePart:()=>SI,formatLocation:()=>bV,formatMessage:()=>iS,formatStringFromArgs:()=>Gx,formatting:()=>jde,generateDjb2Hash:()=>qi,generateTSConfig:()=>sj,getAdjustedReferenceLocation:()=>cQ,getAdjustedRenameLocation:()=>lQ,getAliasDeclarationFromName:()=>bh,getAllAccessorDeclarations:()=>bv,getAllDecoratorsOfClass:()=>Dz,getAllDecoratorsOfClassElement:()=>Ez,getAllJSDocTags:()=>fl,getAllJSDocTagsOfKind:()=>ml,getAllKeys:()=>je,getAllProjectOutputs:()=>TU,getAllSuperTypeNodes:()=>Dh,getAllowImportingTsExtensions:()=>CS,getAllowJSCompilerOption:()=>JS,getAllowSyntheticDefaultImports:()=>AS,getAncestor:()=>Ph,getAnyExtensionFromPath:()=>Ro,getAreDeclarationMapsEnabled:()=>BS,getAssignedExpandoInitializer:()=>Zm,getAssignedName:()=>Ic,getAssignmentDeclarationKind:()=>cg,getAssignmentDeclarationPropertyAccessKind:()=>yg,getAssignmentTargetKind:()=>rh,getAutomaticTypeDirectiveNames:()=>AM,getBaseFileName:()=>jo,getBinaryOperatorPrecedence:()=>my,getBuildInfo:()=>FU,getBuildInfoFileVersionMap:()=>QW,getBuildInfoText:()=>EU,getBuildOrderFromAnyBuildOrder:()=>dK,getBuilderCreationParameters:()=>qW,getBuilderFileEmit:()=>fW,getCanonicalDiagnostic:()=>tf,getCheckFlags:()=>ux,getClassExtendsHeritageElement:()=>wh,getClassLikeDeclarationOfSymbol:()=>kx,getCombinedLocalAndExportSymbolFlags:()=>fx,getCombinedModifierFlags:()=>uc,getCombinedNodeFlags:()=>pc,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>dc,getCommentRange:()=>Bw,getCommonSourceDirectory:()=>SU,getCommonSourceDirectoryOfConfig:()=>kU,getCompilerOptionValue:()=>ek,getConditions:()=>FM,getConfigFileParsingDiagnostics:()=>WV,getConstantValue:()=>Hw,getContainerFlags:()=>pB,getContainerNode:()=>LX,getContainingClass:()=>rm,getContainingClassExcludingClassDecorators:()=>am,getContainingClassStaticBlock:()=>im,getContainingFunction:()=>tm,getContainingFunctionDeclaration:()=>nm,getContainingFunctionOrClassStaticBlock:()=>om,getContainingNodeArray:()=>qT,getContainingObjectLiteralElement:()=>v7,getContextualTypeFromParent:()=>wZ,getContextualTypeFromParentOrAncestorTypeNode:()=>rQ,getDeclarationDiagnostics:()=>Uq,getDeclarationEmitExtensionForPath:()=>Yy,getDeclarationEmitOutputFilePath:()=>Xy,getDeclarationEmitOutputFilePathWorker:()=>Qy,getDeclarationFileExtension:()=>kO,getDeclarationFromName:()=>hh,getDeclarationModifierFlagsFromSymbol:()=>dx,getDeclarationOfKind:()=>ed,getDeclarationsOfKind:()=>td,getDeclaredExpandoInitializer:()=>Ym,getDecorators:()=>Oc,getDefaultCompilerOptions:()=>a7,getDefaultFormatCodeSettings:()=>HG,getDefaultLibFileName:()=>Ls,getDefaultLibFilePath:()=>x7,getDefaultLikeExportInfo:()=>O0,getDefaultLikeExportNameFromDeclaration:()=>s0,getDefaultResolutionModeForFileWorker:()=>ZV,getDiagnosticText:()=>wL,getDiagnosticsWithinSpan:()=>t0,getDirectoryPath:()=>Lo,getDirectoryToWatchFailedLookupLocation:()=>u$,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>f$,getDocumentPositionMapper:()=>J1,getDocumentSpansEqualityComparer:()=>OY,getESModuleInterop:()=>PS,getEditsForFileRename:()=>r1,getEffectiveBaseTypeNode:()=>Ch,getEffectiveConstraintOfTypeParameter:()=>yl,getEffectiveContainerForJSDocTemplateTag:()=>Kg,getEffectiveImplementsTypeNodes:()=>Nh,getEffectiveInitializer:()=>Qm,getEffectiveJSDocHost:()=>Xg,getEffectiveModifierFlags:()=>Kv,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>Hv,getEffectiveModifierFlagsNoCache:()=>Yv,getEffectiveReturnTypeNode:()=>kv,getEffectiveSetAccessorTypeAnnotationNode:()=>Cv,getEffectiveTypeAnnotationNode:()=>xv,getEffectiveTypeParameterDeclarations:()=>hl,getEffectiveTypeRoots:()=>kM,getElementOrPropertyAccessArgumentExpressionOrName:()=>gg,getElementOrPropertyAccessName:()=>hg,getElementsOfBindingOrAssignmentPattern:()=>XA,getEmitDeclarations:()=>jS,getEmitFlags:()=>ap,getEmitHelpers:()=>Zw,getEmitModuleDetectionKind:()=>ES,getEmitModuleFormatOfFileWorker:()=>QV,getEmitModuleKind:()=>NS,getEmitModuleResolutionKind:()=>DS,getEmitScriptTarget:()=>wS,getEmitStandardClassFields:()=>XS,getEnclosingBlockScopeContainer:()=>Mp,getEnclosingContainer:()=>jp,getEncodedSemanticClassifications:()=>$0,getEncodedSyntacticClassifications:()=>Q0,getEndLinePosition:()=>Ad,getEntityNameFromTypeNode:()=>hm,getEntrypointsFromPackageJsonInfo:()=>bR,getErrorCountForSummary:()=>N$,getErrorSpanForNode:()=>of,getErrorSummaryText:()=>P$,getEscapedTextOfIdentifierOrLiteral:()=>Xh,getEscapedTextOfJsxAttributeName:()=>lC,getEscapedTextOfJsxNamespacedName:()=>dC,getExpandoInitializer:()=>eg,getExportAssignmentExpression:()=>kh,getExportInfoMap:()=>I0,getExportNeedsImportStarHelper:()=>sz,getExpressionAssociativity:()=>ly,getExpressionPrecedence:()=>uy,getExternalHelpersModuleName:()=>RA,getExternalModuleImportEqualsDeclarationExpression:()=>Am,getExternalModuleName:()=>Eg,getExternalModuleNameFromDeclaration:()=>Ky,getExternalModuleNameFromPath:()=>Hy,getExternalModuleNameLiteral:()=>qA,getExternalModuleRequireArgument:()=>Im,getFallbackOptions:()=>QU,getFileEmitOutput:()=>lW,getFileMatcherPatterns:()=>kk,getFileNamesFromConfigSpecs:()=>Kj,getFileWatcherEventKind:()=>ro,getFilesInErrorForSummary:()=>D$,getFirstConstructorWithBody:()=>uv,getFirstIdentifier:()=>mb,getFirstNonSpaceCharacterPosition:()=>mZ,getFirstProjectOutput:()=>wU,getFixableErrorSpanExpression:()=>r0,getFormatCodeSettingsForWriting:()=>g0,getFullWidth:()=>fd,getFunctionFlags:()=>zh,getHeritageClause:()=>Fh,getHostSignatureFromJSDoc:()=>Gg,getIdentifierAutoGenerate:()=>lN,getIdentifierGeneratedImportReference:()=>uN,getIdentifierTypeArguments:()=>sN,getImmediatelyInvokedFunctionExpression:()=>dm,getImpliedNodeFormatForEmitWorker:()=>YV,getImpliedNodeFormatForFile:()=>$V,getImpliedNodeFormatForFileWorker:()=>KV,getImportNeedsImportDefaultHelper:()=>lz,getImportNeedsImportStarHelper:()=>cz,getIndentString:()=>By,getInferredLibraryNameResolveFrom:()=>BV,getInitializedVariables:()=>sx,getInitializerOfBinaryExpression:()=>vg,getInitializerOfBindingOrAssignmentElement:()=>VA,getInterfaceBaseTypeNodes:()=>Eh,getInternalEmitFlags:()=>sp,getInvokedExpression:()=>ym,getIsFileExcluded:()=>A0,getIsolatedModules:()=>FS,getJSDocAugmentsTag:()=>Uc,getJSDocClassTag:()=>Wc,getJSDocCommentRanges:()=>wf,getJSDocCommentsAndTags:()=>Ug,getJSDocDeprecatedTag:()=>tl,getJSDocDeprecatedTagNoCache:()=>nl,getJSDocEnumTag:()=>rl,getJSDocHost:()=>Qg,getJSDocImplementsTags:()=>Vc,getJSDocOverloadTags:()=>Hg,getJSDocOverrideTagNoCache:()=>el,getJSDocParameterTags:()=>Mc,getJSDocParameterTagsNoCache:()=>Rc,getJSDocPrivateTag:()=>Hc,getJSDocPrivateTagNoCache:()=>Gc,getJSDocProtectedTag:()=>Xc,getJSDocProtectedTagNoCache:()=>Qc,getJSDocPublicTag:()=>$c,getJSDocPublicTagNoCache:()=>Kc,getJSDocReadonlyTag:()=>Yc,getJSDocReadonlyTagNoCache:()=>Zc,getJSDocReturnTag:()=>ol,getJSDocReturnType:()=>_l,getJSDocRoot:()=>Yg,getJSDocSatisfiesExpressionType:()=>sC,getJSDocSatisfiesTag:()=>sl,getJSDocTags:()=>dl,getJSDocTemplateTag:()=>al,getJSDocThisTag:()=>il,getJSDocType:()=>ll,getJSDocTypeAliasName:()=>QA,getJSDocTypeAssertionType:()=>IA,getJSDocTypeParameterDeclarations:()=>Tv,getJSDocTypeParameterTags:()=>Jc,getJSDocTypeParameterTagsNoCache:()=>zc,getJSDocTypeTag:()=>cl,getJSXImplicitImportBase:()=>nk,getJSXRuntimeImport:()=>rk,getJSXTransformEnabled:()=>tk,getKeyForCompilerOptions:()=>jM,getLanguageVariant:()=>hS,getLastChild:()=>Nx,getLeadingCommentRanges:()=>hs,getLeadingCommentRangesOfNode:()=>Cf,getLeftmostAccessExpression:()=>Ox,getLeftmostExpression:()=>jx,getLibFileNameFromLibReference:()=>JC,getLibNameFromLibReference:()=>BC,getLibraryNameFromLibFileName:()=>JV,getLineAndCharacterOfPosition:()=>Ha,getLineInfo:()=>JJ,getLineOfLocalPosition:()=>lv,getLineStartPositionForPosition:()=>BX,getLineStarts:()=>Va,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>rx,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>nx,getLinesBetweenPositions:()=>Ka,getLinesBetweenRangeEndAndRangeStart:()=>Qb,getLinesBetweenRangeEndPositions:()=>Yb,getLiteralText:()=>_p,getLocalNameForExternalImport:()=>zA,getLocalSymbolForExportDefault:()=>Nb,getLocaleSpecificMessage:()=>Yx,getLocaleTimeString:()=>T$,getMappedContextSpan:()=>BY,getMappedDocumentSpan:()=>RY,getMappedLocation:()=>MY,getMatchedFileSpec:()=>L$,getMatchedIncludeSpec:()=>j$,getMeaningFromDeclaration:()=>cX,getMeaningFromLocation:()=>lX,getMembersOfDeclaration:()=>Rf,getModeForFileReference:()=>kV,getModeForResolutionAtIndex:()=>TV,getModeForUsageLocation:()=>wV,getModifiedTime:()=>Ki,getModifiers:()=>Lc,getModuleInstanceState:()=>rB,getModuleNameStringLiteralAt:()=>sW,getModuleSpecifierEndingPreference:()=>$k,getModuleSpecifierResolverHost:()=>fY,getNameForExportedSymbol:()=>a0,getNameFromImportAttribute:()=>xC,getNameFromIndexInfo:()=>Jp,getNameFromPropertyName:()=>lY,getNameOfAccessExpression:()=>Ax,getNameOfCompilerOptionValue:()=>ij,getNameOfDeclaration:()=>Ac,getNameOfExpando:()=>ng,getNameOfJSDocTypedef:()=>Ec,getNameOfScriptTarget:()=>GS,getNameOrArgument:()=>mg,getNameTable:()=>y7,getNamespaceDeclarationNode:()=>Fg,getNewLineCharacter:()=>Bb,getNewLineKind:()=>f0,getNewLineOrDefaultFromHost:()=>iZ,getNewTargetContainer:()=>_m,getNextJSDocCommentLocation:()=>Wg,getNodeChildren:()=>cA,getNodeForGeneratedName:()=>xI,getNodeId:()=>pJ,getNodeKind:()=>jX,getNodeModifiers:()=>OQ,getNodeModulePathParts:()=>QT,getNonAssignedNameOfDeclaration:()=>Pc,getNonAssignmentOperatorForCompoundAssignment:()=>yz,getNonAugmentationDeclaration:()=>kp,getNonDecoratorTokenPosOfNode:()=>Gd,getNonIncrementalBuildInfoRoots:()=>YW,getNonModifierTokenPosOfNode:()=>Xd,getNormalizedAbsolutePath:()=>$o,getNormalizedAbsolutePathWithoutRoot:()=>Go,getNormalizedPathComponents:()=>Wo,getObjectFlags:()=>Tx,getOperatorAssociativity:()=>_y,getOperatorPrecedence:()=>fy,getOptionFromName:()=>xL,getOptionsForLibraryResolution:()=>KM,getOptionsNameMap:()=>sL,getOptionsSyntaxByArrayElementValue:()=>UC,getOptionsSyntaxByValue:()=>VC,getOrCreateEmitNode:()=>ww,getOrUpdate:()=>W,getOriginalNode:()=>hc,getOriginalNodeId:()=>rz,getOutputDeclarationFileName:()=>mU,getOutputDeclarationFileNameWorker:()=>gU,getOutputExtension:()=>pU,getOutputFileNames:()=>CU,getOutputJSFileNameWorker:()=>yU,getOutputPathsFor:()=>uU,getOwnEmitOutputFilePath:()=>Gy,getOwnKeys:()=>Le,getOwnValues:()=>Me,getPackageJsonTypesVersionsPaths:()=>SM,getPackageNameFromTypesPackageName:()=>$R,getPackageScopeForPath:()=>kR,getParameterSymbolFromJSDoc:()=>$g,getParentNodeInSpan:()=>NY,getParseTreeNode:()=>bc,getParsedCommandLineOfConfigFile:()=>NL,getPathComponents:()=>Bo,getPathFromPathComponents:()=>Jo,getPathUpdater:()=>i1,getPathsBasePath:()=>tv,getPatternFromSpec:()=>bk,getPendingEmitKindWithSeen:()=>wW,getPositionOfLineAndCharacter:()=>qa,getPossibleGenericSignatures:()=>EQ,getPossibleOriginalInputExtensionForExtension:()=>Zy,getPossibleOriginalInputPathWithoutChangingExt:()=>ev,getPossibleTypeArgumentsInfo:()=>FQ,getPreEmitDiagnostics:()=>sV,getPrecedingNonSpaceCharacterPosition:()=>gZ,getPrivateIdentifier:()=>Az,getProperties:()=>Sz,getProperty:()=>Oe,getPropertyAssignmentAliasLikeExpression:()=>Th,getPropertyNameForPropertyNameNode:()=>Kh,getPropertyNameFromType:()=>gC,getPropertyNameOfBindingOrAssignmentElement:()=>KA,getPropertySymbolFromBindingElement:()=>wY,getPropertySymbolsFromContextualType:()=>b7,getQuoteFromPreference:()=>xY,getQuotePreference:()=>bY,getRangesWhere:()=>Q,getRefactorContextSpan:()=>n0,getReferencedFileLocation:()=>UV,getRegexFromPattern:()=>Tk,getRegularExpressionForWildcard:()=>hk,getRegularExpressionsForWildcards:()=>yk,getRelativePathFromDirectory:()=>_a,getRelativePathFromFile:()=>da,getRelativePathToDirectoryOrUrl:()=>pa,getRenameLocation:()=>vZ,getReplacementSpanForContextToken:()=>KQ,getResolutionDiagnostic:()=>oW,getResolutionModeOverride:()=>EV,getResolveJsonModule:()=>LS,getResolvePackageJsonExports:()=>IS,getResolvePackageJsonImports:()=>OS,getResolvedExternalModuleName:()=>Wy,getResolvedModuleFromResolution:()=>hd,getResolvedTypeReferenceDirectiveFromResolution:()=>yd,getRestIndicatorOfBindingOrAssignmentElement:()=>$A,getRestParameterElementType:()=>Mf,getRightMostAssignedExpression:()=>ig,getRootDeclaration:()=>oy,getRootDirectoryOfResolutionCache:()=>m$,getRootLength:()=>Oo,getScriptKind:()=>uZ,getScriptKindFromFileName:()=>Ek,getScriptTargetFeatures:()=>cp,getSelectedEffectiveModifierFlags:()=>Vv,getSelectedSyntacticModifierFlags:()=>Wv,getSemanticClassifications:()=>V0,getSemanticJsxChildren:()=>gy,getSetAccessorTypeAnnotationNode:()=>pv,getSetAccessorValueParameter:()=>dv,getSetExternalModuleIndicator:()=>xS,getShebang:()=>vs,getSingleVariableOfVariableStatement:()=>Bg,getSnapshotText:()=>aY,getSnippetElement:()=>tN,getSourceFileOfModule:()=>Nd,getSourceFileOfNode:()=>wd,getSourceFilePathInNewDir:()=>iv,getSourceFileVersionAsHashFromText:()=>K$,getSourceFilesToEmit:()=>nv,getSourceMapRange:()=>Iw,getSourceMapper:()=>B1,getSourceTextOfNodeFromSourceFile:()=>Qd,getSpanOfTokenAtPosition:()=>nf,getSpellingSuggestion:()=>Jt,getStartPositionOfLine:()=>Fd,getStartPositionOfRange:()=>tx,getStartsOnNewLine:()=>Mw,getStaticPropertiesAndClassStaticBlock:()=>Tz,getStrictOptionValue:()=>HS,getStringComparer:()=>Pt,getSubPatternFromSpec:()=>xk,getSuperCallFromStatement:()=>vz,getSuperContainer:()=>um,getSupportedCodeFixes:()=>s7,getSupportedExtensions:()=>Jk,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>zk,getSwitchedType:()=>PZ,getSymbolId:()=>fJ,getSymbolNameForPrivateIdentifier:()=>Qh,getSymbolTarget:()=>dZ,getSyntacticClassifications:()=>X0,getSyntacticModifierFlags:()=>Gv,getSyntacticModifierFlagsNoCache:()=>Zv,getSynthesizedDeepClone:()=>$C,getSynthesizedDeepCloneWithReplacements:()=>KC,getSynthesizedDeepClones:()=>GC,getSynthesizedDeepClonesWithReplacements:()=>XC,getSyntheticLeadingComments:()=>zw,getSyntheticTrailingComments:()=>Vw,getTargetLabel:()=>SX,getTargetOfBindingOrAssignmentElement:()=>WA,getTemporaryModuleResolutionState:()=>SR,getTextOfConstantValue:()=>up,getTextOfIdentifierOrLiteral:()=>Gh,getTextOfJSDocComment:()=>gl,getTextOfJsxAttributeName:()=>_C,getTextOfJsxNamespacedName:()=>pC,getTextOfNode:()=>rp,getTextOfNodeFromSourceText:()=>np,getTextOfPropertyName:()=>Up,getThisContainer:()=>sm,getThisParameter:()=>fv,getTokenAtPosition:()=>dQ,getTokenPosOfNode:()=>Hd,getTokenSourceMapRange:()=>Lw,getTouchingPropertyName:()=>_Q,getTouchingToken:()=>uQ,getTrailingCommentRanges:()=>ys,getTrailingSemicolonDeferringWriter:()=>qy,getTransformers:()=>Xq,getTsBuildInfoEmitOutputFilePath:()=>lU,getTsConfigObjectLiteralExpression:()=>Yf,getTsConfigPropArrayElementValue:()=>Zf,getTypeAnnotationNode:()=>Sv,getTypeArgumentOrTypeParameterList:()=>LQ,getTypeKeywordOfTypeOnlyImport:()=>PY,getTypeNode:()=>oN,getTypeNodeIfAccessible:()=>IZ,getTypeParameterFromJsDoc:()=>Zg,getTypeParameterOwner:()=>oc,getTypesPackageName:()=>VR,getUILocale:()=>Lt,getUniqueName:()=>yZ,getUniqueSymbolId:()=>fZ,getUseDefineForClassFields:()=>zS,getWatchErrorSummaryDiagnosticMessage:()=>E$,getWatchFactory:()=>XU,group:()=>We,groupBy:()=>$e,guessIndentation:()=>qu,handleNoEmitOptions:()=>tW,handleWatchOptionsConfigDirTemplateSubstitution:()=>hj,hasAbstractModifier:()=>Bv,hasAccessorModifier:()=>zv,hasAmbientModifier:()=>Jv,hasChangesInResolutions:()=>Td,hasContextSensitiveParameters:()=>UT,hasDecorators:()=>Uv,hasDocComment:()=>AQ,hasDynamicName:()=>Wh,hasEffectiveModifier:()=>Ov,hasEffectiveModifiers:()=>Av,hasEffectiveReadonlyModifier:()=>qv,hasExtension:()=>Do,hasImplementationTSFileExtension:()=>Vk,hasIndexSignature:()=>FZ,hasInferredType:()=>FC,hasInitializer:()=>Mu,hasInvalidEscape:()=>xy,hasJSDocNodes:()=>Lu,hasJSDocParameterTags:()=>qc,hasJSFileExtension:()=>qk,hasJsonModuleEmitEnabled:()=>US,hasOnlyExpressionInitializer:()=>Ru,hasOverrideModifier:()=>Rv,hasPossibleExternalModuleReference:()=>Op,hasProperty:()=>Ie,hasPropertyAccessExpressionWithName:()=>kX,hasQuestionToken:()=>Ig,hasRecordedExternalHelpers:()=>BA,hasResolutionModeOverride:()=>yC,hasRestParameter:()=>Wu,hasScopeMarker:()=>tu,hasStaticModifier:()=>Mv,hasSyntacticModifier:()=>Lv,hasSyntacticModifiers:()=>Iv,hasTSFileExtension:()=>Uk,hasTabstop:()=>nC,hasTrailingDirectorySeparator:()=>Po,hasType:()=>ju,hasTypeArguments:()=>eh,hasZeroOrOneAsteriskCharacter:()=>ik,hostGetCanonicalFileName:()=>Vy,hostUsesCaseSensitiveFileNames:()=>Uy,idText:()=>kc,identifierIsThisKeyword:()=>vv,identifierToKeywordKind:()=>Tc,identity:()=>dt,identitySourceMapConsumer:()=>nz,ignoreSourceNewlines:()=>rN,ignoredPaths:()=>io,importFromModuleSpecifier:()=>wg,importSyntaxAffectsModuleResolution:()=>SS,indexOfAnyCharCode:()=>E,indexOfNode:()=>op,indicesOf:()=>ee,inferredTypesContainingFile:()=>RV,injectClassNamedEvaluationHelperBlockIfMissing:()=>nq,injectClassThisAssignmentIfMissing:()=>Xz,insertImports:()=>FY,insertSorted:()=>ie,insertStatementAfterCustomPrologue:()=>Vd,insertStatementAfterStandardPrologue:()=>Ud,insertStatementsAfterCustomPrologue:()=>qd,insertStatementsAfterStandardPrologue:()=>zd,intersperse:()=>S,intrinsicTagNameToString:()=>fC,introducesArgumentsExoticObject:()=>Vf,inverseJsxOptionMap:()=>LO,isAbstractConstructorSymbol:()=>Sx,isAbstractModifier:()=>kD,isAccessExpression:()=>Px,isAccessibilityModifier:()=>zQ,isAccessor:()=>v_,isAccessorModifier:()=>CD,isAliasableExpression:()=>xh,isAmbientModule:()=>mp,isAmbientPropertyDeclaration:()=>wp,isAnyDirectorySeparator:()=>xo,isAnyImportOrBareOrAccessedRequire:()=>Pp,isAnyImportOrReExport:()=>Lp,isAnyImportOrRequireStatement:()=>Ap,isAnyImportSyntax:()=>Fp,isAnySupportedFileExtension:()=>cT,isApplicableVersionedTypesKey:()=>LR,isArgumentExpressionOfElementAccess:()=>FX,isArray:()=>nt,isArrayBindingElement:()=>P_,isArrayBindingOrAssignmentElement:()=>R_,isArrayBindingOrAssignmentPattern:()=>M_,isArrayBindingPattern:()=>gE,isArrayLiteralExpression:()=>yE,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>UQ,isArrayTypeNode:()=>QD,isArrowFunction:()=>DE,isAsExpression:()=>UE,isAssertClause:()=>AF,isAssertEntry:()=>IF,isAssertionExpression:()=>Y_,isAssertsKeyword:()=>vD,isAssignmentDeclaration:()=>Xm,isAssignmentExpression:()=>ub,isAssignmentOperator:()=>cb,isAssignmentPattern:()=>F_,isAssignmentTarget:()=>ih,isAsteriskToken:()=>cD,isAsyncFunction:()=>qh,isAsyncModifier:()=>yD,isAutoAccessorPropertyDeclaration:()=>b_,isAwaitExpression:()=>AE,isAwaitKeyword:()=>bD,isBigIntLiteral:()=>XN,isBinaryExpression:()=>LE,isBinaryLogicalOperator:()=>nb,isBinaryOperatorToken:()=>uI,isBindableObjectDefinePropertyCall:()=>lg,isBindableStaticAccessExpression:()=>dg,isBindableStaticElementAccessExpression:()=>pg,isBindableStaticNameExpression:()=>fg,isBindingElement:()=>hE,isBindingElementOfBareOrAccessedRequire:()=>Wm,isBindingName:()=>l_,isBindingOrAssignmentElement:()=>I_,isBindingOrAssignmentPattern:()=>O_,isBindingPattern:()=>E_,isBlock:()=>YE,isBlockLike:()=>x0,isBlockOrCatchScoped:()=>pp,isBlockScope:()=>Np,isBlockScopedContainerTopLevel:()=>vp,isBooleanLiteral:()=>p_,isBreakOrContinueStatement:()=>Al,isBreakStatement:()=>lF,isBuildCommand:()=>jH,isBuildInfoFile:()=>sU,isBuilderProgram:()=>A$,isBundle:()=>gP,isCallChain:()=>kl,isCallExpression:()=>SE,isCallExpressionTarget:()=>uX,isCallLikeExpression:()=>q_,isCallLikeOrFunctionLikeExpression:()=>z_,isCallOrNewExpression:()=>U_,isCallOrNewExpressionTarget:()=>pX,isCallSignatureDeclaration:()=>qD,isCallToHelper:()=>HN,isCaseBlock:()=>wF,isCaseClause:()=>sP,isCaseKeyword:()=>DD,isCaseOrDefaultClause:()=>Eu,isCatchClause:()=>_P,isCatchClauseVariableDeclaration:()=>WT,isCatchClauseVariableDeclarationOrBindingElement:()=>fp,isCheckJsEnabledForFile:()=>_T,isCircularBuildOrder:()=>uK,isClassDeclaration:()=>bF,isClassElement:()=>h_,isClassExpression:()=>JE,isClassInstanceProperty:()=>x_,isClassLike:()=>y_,isClassMemberModifier:()=>o_,isClassNamedEvaluationHelperBlock:()=>Zz,isClassOrTypeElement:()=>C_,isClassStaticBlockDeclaration:()=>RD,isClassThisAssignmentBlock:()=>Hz,isColonToken:()=>uD,isCommaExpression:()=>FA,isCommaListExpression:()=>GE,isCommaSequence:()=>PA,isCommaToken:()=>oD,isComment:()=>jQ,isCommonJsExportPropertyAssignment:()=>qf,isCommonJsExportedExpression:()=>zf,isCompoundAssignment:()=>hz,isComputedNonLiteralName:()=>zp,isComputedPropertyName:()=>FD,isConciseBody:()=>ou,isConditionalExpression:()=>jE,isConditionalTypeNode:()=>iE,isConstAssertion:()=>CC,isConstTypeReference:()=>El,isConstructSignatureDeclaration:()=>UD,isConstructorDeclaration:()=>BD,isConstructorTypeNode:()=>HD,isContextualKeyword:()=>Lh,isContinueStatement:()=>cF,isCustomPrologue:()=>xf,isDebuggerStatement:()=>gF,isDeclaration:()=>hu,isDeclarationBindingElement:()=>A_,isDeclarationFileName:()=>SO,isDeclarationName:()=>gh,isDeclarationNameOfEnumOrNamespace:()=>ax,isDeclarationReadonly:()=>_f,isDeclarationStatement:()=>yu,isDeclarationWithTypeParameterChildren:()=>Ep,isDeclarationWithTypeParameters:()=>Dp,isDecorator:()=>ID,isDecoratorTarget:()=>mX,isDefaultClause:()=>cP,isDefaultImport:()=>Pg,isDefaultModifier:()=>hD,isDefaultedExpandoInitializer:()=>tg,isDeleteExpression:()=>EE,isDeleteTarget:()=>fh,isDeprecatedDeclaration:()=>d0,isDestructuringAssignment:()=>db,isDiskPathRoot:()=>To,isDoStatement:()=>rF,isDocumentRegistryEntry:()=>Y0,isDotDotDotToken:()=>iD,isDottedName:()=>gb,isDynamicName:()=>$h,isEffectiveExternalModule:()=>Tp,isEffectiveStrictModeSourceFile:()=>Cp,isElementAccessChain:()=>Sl,isElementAccessExpression:()=>xE,isEmittedFileOfProgram:()=>HU,isEmptyArrayLiteral:()=>wb,isEmptyBindingElement:()=>cc,isEmptyBindingPattern:()=>sc,isEmptyObjectLiteral:()=>Cb,isEmptyStatement:()=>eF,isEmptyStringLiteral:()=>Cm,isEntityName:()=>s_,isEntityNameExpression:()=>fb,isEnumConst:()=>lf,isEnumDeclaration:()=>kF,isEnumMember:()=>fP,isEqualityOperatorKind:()=>DZ,isEqualsGreaterThanToken:()=>pD,isExclamationToken:()=>lD,isExcludedFile:()=>Hj,isExclusivelyTypeOnlyImportOrExport:()=>CV,isExpandoPropertyDeclaration:()=>hC,isExportAssignment:()=>JF,isExportDeclaration:()=>zF,isExportModifier:()=>gD,isExportName:()=>wA,isExportNamespaceAsDefaultDeclaration:()=>Yd,isExportOrDefaultModifier:()=>vI,isExportSpecifier:()=>UF,isExportsIdentifier:()=>og,isExportsOrModuleExportsOrAlias:()=>dB,isExpression:()=>Q_,isExpressionNode:()=>Nm,isExpressionOfExternalModuleImportEqualsDeclaration:()=>OX,isExpressionOfOptionalChainRoot:()=>wl,isExpressionStatement:()=>tF,isExpressionWithTypeArguments:()=>qE,isExpressionWithTypeArgumentsInClassExtendsClause:()=>pb,isExternalModule:()=>fO,isExternalModuleAugmentation:()=>xp,isExternalModuleImportEqualsDeclaration:()=>Pm,isExternalModuleIndicator:()=>ru,isExternalModuleNameRelative:()=>As,isExternalModuleReference:()=>HF,isExternalModuleSymbol:()=>id,isExternalOrCommonJsModule:()=>sf,isFileLevelReservedGeneratedIdentifier:()=>e_,isFileLevelUniqueName:()=>Id,isFileProbablyExternalModule:()=>JI,isFirstDeclarationOfSymbolParameter:()=>JY,isFixablePromiseHandler:()=>H1,isForInOrOfStatement:()=>iu,isForInStatement:()=>aF,isForInitializer:()=>su,isForOfStatement:()=>sF,isForStatement:()=>oF,isFullSourceFile:()=>Lm,isFunctionBlock:()=>$f,isFunctionBody:()=>au,isFunctionDeclaration:()=>vF,isFunctionExpression:()=>NE,isFunctionExpressionOrArrowFunction:()=>$T,isFunctionLike:()=>__,isFunctionLikeDeclaration:()=>d_,isFunctionLikeKind:()=>m_,isFunctionLikeOrClassStaticBlockDeclaration:()=>u_,isFunctionOrConstructorTypeNode:()=>D_,isFunctionOrModuleBlock:()=>g_,isFunctionSymbol:()=>kg,isFunctionTypeNode:()=>KD,isGeneratedIdentifier:()=>Yl,isGeneratedPrivateIdentifier:()=>Zl,isGetAccessor:()=>Ou,isGetAccessorDeclaration:()=>JD,isGetOrSetAccessorDeclaration:()=>bl,isGlobalScopeAugmentation:()=>bp,isGlobalSourceFile:()=>af,isGrammarError:()=>jd,isHeritageClause:()=>lP,isHoistedFunction:()=>Sf,isHoistedVariableStatement:()=>Tf,isIdentifier:()=>fD,isIdentifierANonContextualKeyword:()=>Rh,isIdentifierName:()=>vh,isIdentifierOrThisTypeNode:()=>rI,isIdentifierPart:()=>xs,isIdentifierStart:()=>bs,isIdentifierText:()=>Ss,isIdentifierTypePredicate:()=>Gf,isIdentifierTypeReference:()=>ET,isIfStatement:()=>nF,isIgnoredFileFromWildCardWatching:()=>KU,isImplicitGlob:()=>vk,isImportAttribute:()=>LF,isImportAttributeName:()=>Ql,isImportAttributes:()=>OF,isImportCall:()=>hf,isImportClause:()=>FF,isImportDeclaration:()=>EF,isImportEqualsDeclaration:()=>DF,isImportKeyword:()=>ND,isImportMeta:()=>yf,isImportOrExportSpecifier:()=>Wl,isImportOrExportSpecifierName:()=>_Z,isImportSpecifier:()=>BF,isImportTypeAssertionContainer:()=>PF,isImportTypeNode:()=>dE,isImportable:()=>w0,isInComment:()=>PQ,isInCompoundLikeAssignment:()=>oh,isInExpressionContext:()=>Dm,isInJSDoc:()=>Jm,isInJSFile:()=>Mm,isInJSXText:()=>CQ,isInJsonFile:()=>Rm,isInNonReferenceComment:()=>WQ,isInReferenceComment:()=>VQ,isInRightSideOfInternalImportEqualsDeclaration:()=>_X,isInString:()=>xQ,isInTemplateString:()=>TQ,isInTopLevelContext:()=>lm,isInTypeQuery:()=>hv,isIncrementalBuildInfo:()=>MW,isIncrementalBundleEmitBuildInfo:()=>jW,isIncrementalCompilation:()=>RS,isIndexSignatureDeclaration:()=>VD,isIndexedAccessTypeNode:()=>lE,isInferTypeNode:()=>oE,isInfinityOrNaNString:()=>VT,isInitializedProperty:()=>Cz,isInitializedVariable:()=>cx,isInsideJsxElement:()=>wQ,isInsideJsxElementOrAttribute:()=>SQ,isInsideNodeModules:()=>YZ,isInsideTemplateLiteral:()=>JQ,isInstanceOfExpression:()=>kb,isInstantiatedModule:()=>mJ,isInterfaceDeclaration:()=>xF,isInternalDeclaration:()=>Hu,isInternalModuleImportEqualsDeclaration:()=>Om,isInternalName:()=>TA,isIntersectionTypeNode:()=>rE,isIntrinsicJsxName:()=>My,isIterationStatement:()=>Z_,isJSDoc:()=>PP,isJSDocAllType:()=>kP,isJSDocAugmentsTag:()=>OP,isJSDocAuthorTag:()=>LP,isJSDocCallbackTag:()=>MP,isJSDocClassTag:()=>jP,isJSDocCommentContainingNode:()=>Pu,isJSDocConstructSignature:()=>Og,isJSDocDeprecatedTag:()=>VP,isJSDocEnumTag:()=>$P,isJSDocFunctionType:()=>DP,isJSDocImplementsTag:()=>tA,isJSDocImportTag:()=>iA,isJSDocIndexSignature:()=>zm,isJSDocLikeText:()=>BI,isJSDocLink:()=>bP,isJSDocLinkCode:()=>xP,isJSDocLinkLike:()=>Vu,isJSDocLinkPlain:()=>SP,isJSDocMemberName:()=>vP,isJSDocNameReference:()=>yP,isJSDocNamepathType:()=>FP,isJSDocNamespaceBody:()=>_u,isJSDocNode:()=>Fu,isJSDocNonNullableType:()=>wP,isJSDocNullableType:()=>CP,isJSDocOptionalParameter:()=>rC,isJSDocOptionalType:()=>NP,isJSDocOverloadTag:()=>UP,isJSDocOverrideTag:()=>qP,isJSDocParameterTag:()=>KP,isJSDocPrivateTag:()=>BP,isJSDocPropertyLikeTag:()=>Ol,isJSDocPropertyTag:()=>eA,isJSDocProtectedTag:()=>JP,isJSDocPublicTag:()=>RP,isJSDocReadonlyTag:()=>zP,isJSDocReturnTag:()=>HP,isJSDocSatisfiesExpression:()=>aC,isJSDocSatisfiesTag:()=>nA,isJSDocSeeTag:()=>WP,isJSDocSignature:()=>IP,isJSDocTag:()=>Au,isJSDocTemplateTag:()=>QP,isJSDocThisTag:()=>GP,isJSDocThrowsTag:()=>rA,isJSDocTypeAlias:()=>Lg,isJSDocTypeAssertion:()=>AA,isJSDocTypeExpression:()=>hP,isJSDocTypeLiteral:()=>AP,isJSDocTypeTag:()=>XP,isJSDocTypedefTag:()=>YP,isJSDocUnknownTag:()=>ZP,isJSDocUnknownType:()=>TP,isJSDocVariadicType:()=>EP,isJSXTagName:()=>wm,isJsonEqual:()=>ST,isJsonSourceFile:()=>cf,isJsxAttribute:()=>nP,isJsxAttributeLike:()=>Cu,isJsxAttributeName:()=>uC,isJsxAttributes:()=>rP,isJsxCallLike:()=>Du,isJsxChild:()=>Tu,isJsxClosingElement:()=>YF,isJsxClosingFragment:()=>tP,isJsxElement:()=>GF,isJsxExpression:()=>oP,isJsxFragment:()=>ZF,isJsxNamespacedName:()=>aP,isJsxOpeningElement:()=>QF,isJsxOpeningFragment:()=>eP,isJsxOpeningLikeElement:()=>Nu,isJsxOpeningLikeElementTagName:()=>gX,isJsxSelfClosingElement:()=>XF,isJsxSpreadAttribute:()=>iP,isJsxTagNameExpression:()=>ku,isJsxText:()=>YN,isJumpStatementTarget:()=>TX,isKeyword:()=>Ah,isKeywordOrPunctuation:()=>Oh,isKnownSymbol:()=>Yh,isLabelName:()=>wX,isLabelOfLabeledStatement:()=>CX,isLabeledStatement:()=>pF,isLateVisibilityPaintedStatement:()=>Ip,isLeftHandSideExpression:()=>W_,isLet:()=>mf,isLineBreak:()=>Qa,isLiteralComputedPropertyDeclarationName:()=>yh,isLiteralExpression:()=>Jl,isLiteralExpressionOfObject:()=>zl,isLiteralImportTypeNode:()=>vf,isLiteralKind:()=>Bl,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>IX,isLiteralTypeLiteral:()=>X_,isLiteralTypeNode:()=>uE,isLocalName:()=>CA,isLogicalOperator:()=>rb,isLogicalOrCoalescingAssignmentExpression:()=>ob,isLogicalOrCoalescingAssignmentOperator:()=>ib,isLogicalOrCoalescingBinaryExpression:()=>sb,isLogicalOrCoalescingBinaryOperator:()=>ab,isMappedTypeNode:()=>_E,isMemberName:()=>vl,isMetaProperty:()=>$E,isMethodDeclaration:()=>MD,isMethodOrAccessor:()=>S_,isMethodSignature:()=>jD,isMinusToken:()=>sD,isMissingDeclaration:()=>WF,isMissingPackageJsonInfo:()=>OM,isModifier:()=>a_,isModifierKind:()=>r_,isModifierLike:()=>k_,isModuleAugmentationExternal:()=>Sp,isModuleBlock:()=>CF,isModuleBody:()=>cu,isModuleDeclaration:()=>TF,isModuleExportName:()=>VF,isModuleExportsAccessExpression:()=>sg,isModuleIdentifier:()=>ag,isModuleName:()=>aI,isModuleOrEnumDeclaration:()=>du,isModuleReference:()=>Su,isModuleSpecifierLike:()=>TY,isModuleWithStringLiteralName:()=>gp,isNameOfFunctionDeclaration:()=>AX,isNameOfModuleDeclaration:()=>PX,isNamedDeclaration:()=>Fc,isNamedEvaluation:()=>ny,isNamedEvaluationSource:()=>ty,isNamedExportBindings:()=>Il,isNamedExports:()=>qF,isNamedImportBindings:()=>uu,isNamedImports:()=>RF,isNamedImportsOrExports:()=>Ix,isNamedTupleMember:()=>ZD,isNamespaceBody:()=>lu,isNamespaceExport:()=>MF,isNamespaceExportDeclaration:()=>NF,isNamespaceImport:()=>jF,isNamespaceReexportDeclaration:()=>Fm,isNewExpression:()=>kE,isNewExpressionTarget:()=>dX,isNewScopeNode:()=>RC,isNoSubstitutionTemplateLiteral:()=>eD,isNodeArray:()=>Rl,isNodeArrayMultiLine:()=>Zb,isNodeDescendantOf:()=>mh,isNodeKind:()=>Ll,isNodeLikeSystem:()=>mn,isNodeModulesDirectory:()=>ma,isNodeWithPossibleHoistedDeclaration:()=>ah,isNonContextualKeyword:()=>jh,isNonGlobalAmbientModule:()=>hp,isNonNullAccess:()=>oC,isNonNullChain:()=>Pl,isNonNullExpression:()=>WE,isNonStaticMethodOrAccessorWithPrivateName:()=>wz,isNotEmittedStatement:()=>$F,isNullishCoalesce:()=>Dl,isNumber:()=>ot,isNumericLiteral:()=>GN,isNumericLiteralName:()=>HT,isObjectBindingElementWithoutPropertyName:()=>CY,isObjectBindingOrAssignmentElement:()=>j_,isObjectBindingOrAssignmentPattern:()=>L_,isObjectBindingPattern:()=>mE,isObjectLiteralElement:()=>Bu,isObjectLiteralElementLike:()=>w_,isObjectLiteralExpression:()=>vE,isObjectLiteralMethod:()=>Kf,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>Hf,isObjectTypeDeclaration:()=>Ex,isOmittedExpression:()=>zE,isOptionalChain:()=>Tl,isOptionalChainRoot:()=>Cl,isOptionalDeclaration:()=>iC,isOptionalJSDocPropertyLikeTag:()=>eC,isOptionalTypeNode:()=>eE,isOuterExpression:()=>OA,isOutermostOptionalChain:()=>Nl,isOverrideModifier:()=>TD,isPackageJsonInfo:()=>IM,isPackedArrayLiteral:()=>BT,isParameter:()=>AD,isParameterPropertyDeclaration:()=>ac,isParameterPropertyModifier:()=>i_,isParenthesizedExpression:()=>wE,isParenthesizedTypeNode:()=>aE,isParseTreeNode:()=>vc,isPartOfParameterDeclaration:()=>iy,isPartOfTypeNode:()=>If,isPartOfTypeOnlyImportOrExportDeclaration:()=>Gl,isPartOfTypeQuery:()=>Em,isPartiallyEmittedExpression:()=>HE,isPatternMatch:()=>rn,isPinnedComment:()=>$d,isPlainJsFile:()=>Dd,isPlusToken:()=>aD,isPossiblyTypeArgumentPosition:()=>DQ,isPostfixUnaryExpression:()=>OE,isPrefixUnaryExpression:()=>IE,isPrimitiveLiteralValue:()=>DC,isPrivateIdentifier:()=>mD,isPrivateIdentifierClassElementDeclaration:()=>t_,isPrivateIdentifierPropertyAccessExpression:()=>n_,isPrivateIdentifierSymbol:()=>Zh,isProgramUptoDate:()=>VV,isPrologueDirective:()=>bf,isPropertyAccessChain:()=>xl,isPropertyAccessEntityNameExpression:()=>hb,isPropertyAccessExpression:()=>bE,isPropertyAccessOrQualifiedName:()=>J_,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>B_,isPropertyAssignment:()=>uP,isPropertyDeclaration:()=>LD,isPropertyName:()=>c_,isPropertyNameLiteral:()=>Hh,isPropertySignature:()=>OD,isPrototypeAccess:()=>vb,isPrototypePropertyAssignment:()=>bg,isPunctuation:()=>Ih,isPushOrUnshiftIdentifier:()=>ry,isQualifiedName:()=>ED,isQuestionDotToken:()=>dD,isQuestionOrExclamationToken:()=>nI,isQuestionOrPlusOrMinusToken:()=>oI,isQuestionToken:()=>_D,isReadonlyKeyword:()=>xD,isReadonlyKeywordOrPlusOrMinusToken:()=>iI,isRecognizedTripleSlashComment:()=>Wd,isReferenceFileLocation:()=>qV,isReferencedFile:()=>zV,isRegularExpressionLiteral:()=>ZN,isRequireCall:()=>qm,isRequireVariableStatement:()=>Km,isRestParameter:()=>$u,isRestTypeNode:()=>tE,isReturnStatement:()=>_F,isReturnStatementWithFixablePromiseHandler:()=>K1,isRightSideOfAccessExpression:()=>xb,isRightSideOfInstanceofExpression:()=>Tb,isRightSideOfPropertyAccess:()=>EX,isRightSideOfQualifiedName:()=>DX,isRightSideOfQualifiedNameOrPropertyAccess:()=>bb,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Sb,isRootedDiskPath:()=>ko,isSameEntityName:()=>rg,isSatisfiesExpression:()=>VE,isSemicolonClassElement:()=>QE,isSetAccessor:()=>Iu,isSetAccessorDeclaration:()=>zD,isShiftOperatorOrHigher:()=>sI,isShorthandAmbientModuleSymbol:()=>yp,isShorthandPropertyAssignment:()=>dP,isSideEffectImport:()=>PC,isSignedNumericLiteral:()=>Vh,isSimpleCopiableExpression:()=>mz,isSimpleInlineableExpression:()=>gz,isSimpleParameterList:()=>jz,isSingleOrDoubleQuote:()=>Hm,isSolutionConfig:()=>wj,isSourceElement:()=>SC,isSourceFile:()=>mP,isSourceFileFromLibrary:()=>y0,isSourceFileJS:()=>jm,isSourceFileNotJson:()=>Bm,isSourceMapping:()=>$J,isSpecialPropertyDeclaration:()=>xg,isSpreadAssignment:()=>pP,isSpreadElement:()=>BE,isStatement:()=>bu,isStatementButNotDeclaration:()=>vu,isStatementOrBlock:()=>xu,isStatementWithLocals:()=>Ed,isStatic:()=>jv,isStaticModifier:()=>SD,isString:()=>it,isStringANonContextualKeyword:()=>Mh,isStringAndEmptyAnonymousObjectIntersection:()=>BQ,isStringDoubleQuoted:()=>Gm,isStringLiteral:()=>QN,isStringLiteralLike:()=>Uu,isStringLiteralOrJsxExpression:()=>wu,isStringLiteralOrTemplate:()=>EZ,isStringOrNumericLiteralLike:()=>Uh,isStringOrRegularExpressionOrTemplateLiteral:()=>MQ,isStringTextContainingNode:()=>Xl,isSuperCall:()=>gf,isSuperKeyword:()=>wD,isSuperProperty:()=>pm,isSupportedSourceFileName:()=>Kk,isSwitchStatement:()=>dF,isSyntaxList:()=>oA,isSyntheticExpression:()=>KE,isSyntheticReference:()=>KF,isTagName:()=>NX,isTaggedTemplateExpression:()=>TE,isTaggedTemplateTag:()=>fX,isTemplateExpression:()=>ME,isTemplateHead:()=>tD,isTemplateLiteral:()=>V_,isTemplateLiteralKind:()=>ql,isTemplateLiteralToken:()=>Ul,isTemplateLiteralTypeNode:()=>fE,isTemplateLiteralTypeSpan:()=>pE,isTemplateMiddle:()=>nD,isTemplateMiddleOrTemplateTail:()=>Vl,isTemplateSpan:()=>XE,isTemplateTail:()=>rD,isTextWhiteSpaceLike:()=>jY,isThis:()=>MX,isThisContainerOrFunctionBlock:()=>cm,isThisIdentifier:()=>gv,isThisInTypeQuery:()=>yv,isThisInitializedDeclaration:()=>mm,isThisInitializedObjectBindingExpression:()=>gm,isThisProperty:()=>fm,isThisTypeNode:()=>sE,isThisTypeParameter:()=>XT,isThisTypePredicate:()=>Xf,isThrowStatement:()=>fF,isToken:()=>Ml,isTokenKind:()=>jl,isTraceEnabled:()=>cM,isTransientSymbol:()=>rd,isTrivia:()=>Bh,isTryStatement:()=>mF,isTupleTypeNode:()=>YD,isTypeAlias:()=>jg,isTypeAliasDeclaration:()=>SF,isTypeAssertionExpression:()=>CE,isTypeDeclaration:()=>YT,isTypeElement:()=>T_,isTypeKeyword:()=>nY,isTypeKeywordTokenOrIdentifier:()=>iY,isTypeLiteralNode:()=>XD,isTypeNode:()=>N_,isTypeNodeKind:()=>Fx,isTypeOfExpression:()=>FE,isTypeOnlyExportDeclaration:()=>Kl,isTypeOnlyImportDeclaration:()=>$l,isTypeOnlyImportOrExportDeclaration:()=>Hl,isTypeOperatorNode:()=>cE,isTypeParameterDeclaration:()=>PD,isTypePredicateNode:()=>WD,isTypeQueryNode:()=>GD,isTypeReferenceNode:()=>$D,isTypeReferenceType:()=>Ju,isTypeUsableAsPropertyName:()=>mC,isUMDExportSymbol:()=>Cx,isUnaryExpression:()=>K_,isUnaryExpressionWithWrite:()=>G_,isUnicodeIdentifierStart:()=>Ia,isUnionTypeNode:()=>nE,isUrl:()=>So,isValidBigIntString:()=>NT,isValidESSymbolDeclaration:()=>Uf,isValidTypeOnlyAliasUseSite:()=>DT,isValueSignatureDeclaration:()=>sh,isVarAwaitUsing:()=>uf,isVarConst:()=>pf,isVarConstLike:()=>ff,isVarUsing:()=>df,isVariableDeclaration:()=>hF,isVariableDeclarationInVariableStatement:()=>Jf,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>Vm,isVariableDeclarationInitializedToRequire:()=>Um,isVariableDeclarationList:()=>yF,isVariableLike:()=>Bf,isVariableStatement:()=>ZE,isVoidExpression:()=>PE,isWatchSet:()=>lx,isWhileStatement:()=>iF,isWhiteSpaceLike:()=>Ga,isWhiteSpaceSingleLine:()=>Xa,isWithStatement:()=>uF,isWriteAccess:()=>gx,isWriteOnlyAccess:()=>mx,isYieldExpression:()=>RE,jsxModeNeedsExplicitImport:()=>h0,keywordPart:()=>WY,last:()=>Te,lastOrUndefined:()=>ke,length:()=>m,libMap:()=>RO,libs:()=>MO,lineBreakPart:()=>oZ,loadModuleFromGlobalCache:()=>YR,loadWithModeAwareCache:()=>MV,makeIdentifierFromModuleName:()=>dp,makeImport:()=>gY,makeStringLiteral:()=>hY,mangleScopedPackageName:()=>WR,map:()=>O,mapAllOrFail:()=>q,mapDefined:()=>U,mapDefinedIterator:()=>V,mapEntries:()=>G,mapIterator:()=>L,mapOneOrMany:()=>i0,mapToDisplayParts:()=>aZ,matchFiles:()=>Ck,matchPatternOrExact:()=>dT,matchedText:()=>Yt,matchesExclude:()=>Xj,matchesExcludeWorker:()=>Qj,maxBy:()=>wt,maybeBind:()=>Xe,maybeSetLocalizedDiagnosticMessages:()=>Qx,memoize:()=>ht,memoizeOne:()=>yt,min:()=>Nt,minAndMax:()=>mT,missingFileModifiedTime:()=>$i,modifierToFlag:()=>tb,modifiersToFlags:()=>eb,moduleExportNameIsDefault:()=>tp,moduleExportNameTextEscaped:()=>ep,moduleExportNameTextUnescaped:()=>Zd,moduleOptionDeclaration:()=>qO,moduleResolutionIsEqualTo:()=>gd,moduleResolutionNameAndModeGetter:()=>AV,moduleResolutionOptionDeclarations:()=>HO,moduleResolutionSupportsPackageJsonExportsAndImports:()=>$S,moduleResolutionUsesNodeModules:()=>mY,moduleSpecifierToValidIdentifier:()=>l0,moduleSpecifiers:()=>gB,moduleSupportsImportAttributes:()=>KS,moduleSymbolToValidIdentifier:()=>c0,moveEmitHelpers:()=>eN,moveRangeEnd:()=>zb,moveRangePastDecorators:()=>Ub,moveRangePastModifiers:()=>Vb,moveRangePos:()=>qb,moveSyntheticComments:()=>Kw,mutateMap:()=>xx,mutateMapSkippingNewValues:()=>bx,needsParentheses:()=>CZ,needsScopeMarker:()=>nu,newCaseClauseTracker:()=>v0,newPrivateEnvironment:()=>Pz,noEmitNotification:()=>rU,noEmitSubstitution:()=>nU,noTransformers:()=>Gq,noTruncationMaximumTruncationLength:()=>Yu,nodeCanBeDecorated:()=>vm,nodeCoreModules:()=>LC,nodeHasName:()=>Dc,nodeIsDecorated:()=>bm,nodeIsMissing:()=>Od,nodeIsPresent:()=>Ld,nodeIsSynthesized:()=>sy,nodeModuleNameResolver:()=>nR,nodeModulesPathPart:()=>cR,nodeNextJsonConfigResolver:()=>rR,nodeOrChildIsDecorated:()=>xm,nodeOverlapsWithStartEnd:()=>WX,nodePosToString:()=>Pd,nodeSeenTracker:()=>oY,nodeStartsNewLexicalEnvironment:()=>ay,noop:()=>ct,noopFileWatcher:()=>z$,normalizePath:()=>Ko,normalizeSlashes:()=>zo,normalizeSpans:()=>Qs,not:()=>sn,notImplemented:()=>gt,notImplementedResolver:()=>PU,nullNodeConverters:()=>sw,nullParenthesizerRules:()=>iw,nullTransformationContext:()=>oU,objectAllocator:()=>Wx,operatorPart:()=>KY,optionDeclarations:()=>VO,optionMapToObject:()=>tj,optionsAffectingProgramStructure:()=>XO,optionsForBuild:()=>rL,optionsForWatch:()=>BO,optionsHaveChanges:()=>cd,or:()=>an,orderedRemoveItem:()=>$t,orderedRemoveItemAt:()=>Kt,packageIdToPackageName:()=>xd,packageIdToString:()=>Sd,parameterIsThisKeyword:()=>mv,parameterNamePart:()=>HY,parseBaseNodeFactory:()=>LI,parseBigInt:()=>CT,parseBuildCommand:()=>CL,parseCommandLine:()=>bL,parseCommandLineWorker:()=>gL,parseConfigFileTextToJson:()=>EL,parseConfigFileWithSystem:()=>w$,parseConfigHostFromCompilerHostLike:()=>rW,parseCustomTypeOption:()=>dL,parseIsolatedEntityName:()=>dO,parseIsolatedJSDocComment:()=>gO,parseJSDocTypeExpressionForTests:()=>hO,parseJsonConfigFileContent:()=>_j,parseJsonSourceFileConfigFileContent:()=>uj,parseJsonText:()=>pO,parseListTypeOption:()=>pL,parseNodeFactory:()=>jI,parseNodeModuleFromPath:()=>_R,parsePackageName:()=>ER,parsePseudoBigInt:()=>kT,parseValidBigInt:()=>wT,pasteEdits:()=>Rfe,patchWriteFileEnsuringDirectory:()=>fo,pathContainsNodeModules:()=>lR,pathIsAbsolute:()=>Co,pathIsBareSpecifier:()=>No,pathIsRelative:()=>wo,patternText:()=>Qt,performIncrementalCompilation:()=>eK,performance:()=>Gn,positionBelongsToNode:()=>KX,positionIsASICandidate:()=>BZ,positionIsSynthesized:()=>iT,positionsAreOnSameLine:()=>ex,preProcessFile:()=>M1,probablyUsesSemicolons:()=>JZ,processCommentPragmas:()=>TO,processPragmasIntoFields:()=>CO,processTaggedTemplateExpression:()=>aq,programContainsEsModules:()=>uY,programContainsModules:()=>_Y,projectReferenceIsEqualTo:()=>md,propertyNamePart:()=>GY,pseudoBigIntToString:()=>TT,punctuationPart:()=>$Y,pushIfUnique:()=>pe,quote:()=>NZ,quotePreferenceFromString:()=>vY,rangeContainsPosition:()=>zX,rangeContainsPositionExclusive:()=>qX,rangeContainsRange:()=>ix,rangeContainsRangeExclusive:()=>JX,rangeContainsStartEnd:()=>UX,rangeEndIsOnSameLineAsRangeStart:()=>Xb,rangeEndPositionsAreOnSameLine:()=>Hb,rangeEquals:()=>he,rangeIsOnSingleLine:()=>$b,rangeOfNode:()=>gT,rangeOfTypeParameters:()=>hT,rangeOverlapsWithStartEnd:()=>VX,rangeStartIsOnSameLineAsRangeEnd:()=>Gb,rangeStartPositionsAreOnSameLine:()=>Kb,readBuilderProgram:()=>tK,readConfigFile:()=>DL,readJson:()=>Ob,readJsonConfigFile:()=>FL,readJsonOrUndefined:()=>Ib,reduceEachLeadingCommentRange:()=>fs,reduceEachTrailingCommentRange:()=>ms,reduceLeft:()=>Pe,reduceLeftIterator:()=>b,reducePathComponents:()=>qo,refactor:()=>h4,regExpEscape:()=>lk,regularExpressionFlagToCharacterCode:()=>Ba,relativeComplement:()=>ce,removeAllComments:()=>Dw,removeEmitHelper:()=>Yw,removeExtension:()=>Zk,removeFileExtension:()=>Qk,removeIgnoredPath:()=>r$,removeMinAndVersionNumbers:()=>Wt,removePrefix:()=>tn,removeSuffix:()=>Ut,removeTrailingDirectorySeparator:()=>Qo,repeatString:()=>sY,replaceElement:()=>De,replaceFirstStar:()=>bC,resolutionExtensionIsTSOrJson:()=>aT,resolveConfigFileProjectName:()=>sK,resolveJSModule:()=>YM,resolveLibrary:()=>HM,resolveModuleName:()=>XM,resolveModuleNameFromCache:()=>GM,resolvePackageNameToPackageJson:()=>PM,resolvePath:()=>Vo,resolveProjectReferencePath:()=>iW,resolveTripleslashReference:()=>eV,resolveTypeReferenceDirective:()=>DM,resolvingEmptyArray:()=>Gu,returnFalse:()=>lt,returnNoopFileWatcher:()=>q$,returnTrue:()=>_t,returnUndefined:()=>ut,returnsPromise:()=>$1,rewriteModuleSpecifier:()=>Mz,sameFlatMap:()=>z,sameMap:()=>j,sameMapping:()=>WJ,scanTokenAtPosition:()=>rf,scanner:()=>aX,semanticDiagnosticsOptionDeclarations:()=>WO,serializeCompilerOptions:()=>oj,server:()=>Yhe,servicesVersion:()=>J5,setCommentRange:()=>Jw,setConfigFileInOptions:()=>dj,setConstantValue:()=>Gw,setEmitFlags:()=>Ew,setGetSourceFileAsHashVersioned:()=>H$,setIdentifierAutoGenerate:()=>cN,setIdentifierGeneratedImportReference:()=>_N,setIdentifierTypeArguments:()=>aN,setInternalEmitFlags:()=>Pw,setLocalizedDiagnosticMessages:()=>Xx,setNodeChildren:()=>lA,setNodeFlags:()=>LT,setObjectAllocator:()=>Hx,setOriginalNode:()=>Cw,setParent:()=>jT,setParentRecursive:()=>MT,setPrivateIdentifier:()=>Iz,setSnippetElement:()=>nN,setSourceMapRange:()=>Ow,setStackTraceLimit:()=>Ui,setStartsOnNewLine:()=>Rw,setSyntheticLeadingComments:()=>qw,setSyntheticTrailingComments:()=>Ww,setSys:()=>go,setSysLog:()=>so,setTextRange:()=>AI,setTextRangeEnd:()=>AT,setTextRangePos:()=>PT,setTextRangePosEnd:()=>IT,setTextRangePosWidth:()=>OT,setTokenSourceMapRange:()=>jw,setTypeNode:()=>iN,setUILocale:()=>jt,setValueDeclaration:()=>Sg,shouldAllowImportingTsExtension:()=>QR,shouldPreserveConstEnums:()=>MS,shouldRewriteModuleSpecifier:()=>Dg,shouldUseUriStyleNodeCoreModules:()=>p0,showModuleSpecifier:()=>wx,signatureHasRestParameter:()=>bJ,signatureToDisplayParts:()=>lZ,single:()=>we,singleElementArray:()=>ln,singleIterator:()=>K,singleOrMany:()=>Ne,singleOrUndefined:()=>Ce,skipAlias:()=>px,skipConstraint:()=>cY,skipOuterExpressions:()=>LA,skipParentheses:()=>ph,skipPartiallyEmittedExpressions:()=>Fl,skipTrivia:()=>is,skipTypeChecking:()=>yT,skipTypeCheckingIgnoringNoCheck:()=>vT,skipTypeParentheses:()=>dh,skipWhile:()=>fn,sliceAfter:()=>pT,some:()=>X,sortAndDeduplicate:()=>oe,sortAndDeduplicateDiagnostics:()=>Is,sourceFileAffectingCompilerOptions:()=>GO,sourceFileMayBeEmitted:()=>rv,sourceMapCommentRegExp:()=>RJ,sourceMapCommentRegExpDontCareLineStart:()=>MJ,spacePart:()=>VY,spanMap:()=>H,startEndContainsRange:()=>ox,startEndOverlapsWithStartEnd:()=>$X,startOnNewLine:()=>MA,startTracing:()=>hr,startsWith:()=>en,startsWithDirectory:()=>ca,startsWithUnderscore:()=>u0,startsWithUseStrict:()=>EA,stringContainsAt:()=>_0,stringToToken:()=>Ma,stripQuotes:()=>jy,supportedDeclarationExtensions:()=>Mk,supportedJSExtensionsFlat:()=>Ok,supportedLocaleDirectories:()=>mc,supportedTSExtensionsFlat:()=>Pk,supportedTSImplementationExtensions:()=>Rk,suppressLeadingAndTrailingTrivia:()=>QC,suppressLeadingTrivia:()=>YC,suppressTrailingTrivia:()=>ZC,symbolEscapedNameNoDefault:()=>kY,symbolName:()=>Cc,symbolNameNoDefault:()=>SY,symbolToDisplayParts:()=>cZ,sys:()=>mo,sysLog:()=>ao,tagNamesAreEquivalent:()=>AO,takeWhile:()=>pn,targetOptionDeclaration:()=>zO,targetToLibMap:()=>Os,testFormatSettings:()=>GG,textChangeRangeIsUnchanged:()=>tc,textChangeRangeNewSpan:()=>ec,textChanges:()=>sde,textOrKeywordPart:()=>XY,textPart:()=>QY,textRangeContainsPositionInclusive:()=>Bs,textRangeContainsTextSpan:()=>qs,textRangeIntersectsWithTextSpan:()=>Gs,textSpanContainsPosition:()=>Rs,textSpanContainsTextRange:()=>zs,textSpanContainsTextSpan:()=>Js,textSpanEnd:()=>js,textSpanIntersection:()=>Xs,textSpanIntersectsWith:()=>$s,textSpanIntersectsWithPosition:()=>Hs,textSpanIntersectsWithTextSpan:()=>Ws,textSpanIsEmpty:()=>Ms,textSpanOverlap:()=>Vs,textSpanOverlapsWith:()=>Us,textSpansEqual:()=>AY,textToKeywordObj:()=>ba,timestamp:()=>Hn,toArray:()=>rt,toBuilderFileEmit:()=>HW,toBuilderStateFileInfoForMultiEmit:()=>KW,toEditorSettings:()=>r7,toFileNameLowerCase:()=>mt,toPath:()=>Xo,toProgramEmitPending:()=>GW,toSorted:()=>me,tokenIsIdentifierOrKeyword:()=>ya,tokenIsIdentifierOrKeywordOrGreaterThan:()=>va,tokenToString:()=>ja,trace:()=>sM,tracing:()=>Yn,tracingEnabled:()=>Zn,transferSourceFileChildren:()=>uA,transform:()=>S7,transformClassFields:()=>uq,transformDeclarations:()=>$q,transformECMAScriptModule:()=>Mq,transformES2015:()=>Aq,transformES2016:()=>Fq,transformES2017:()=>gq,transformES2018:()=>yq,transformES2019:()=>vq,transformES2020:()=>bq,transformES2021:()=>xq,transformESDecorators:()=>mq,transformESNext:()=>Sq,transformGenerators:()=>Iq,transformImpliedNodeFormatDependentModule:()=>Rq,transformJsx:()=>Dq,transformLegacyDecorators:()=>fq,transformModule:()=>Oq,transformNamedEvaluation:()=>iq,transformNodes:()=>iU,transformSystemModule:()=>jq,transformTypeScript:()=>_q,transpile:()=>c2,transpileDeclaration:()=>n2,transpileModule:()=>t2,transpileOptionValueCompilerOptions:()=>QO,tryAddToSet:()=>$,tryAndIgnoreErrors:()=>WZ,tryCast:()=>at,tryDirectoryExists:()=>VZ,tryExtractTSExtension:()=>Db,tryFileExists:()=>UZ,tryGetClassExtendingExpressionWithTypeArguments:()=>lb,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>_b,tryGetDirectories:()=>zZ,tryGetExtensionFromPath:()=>lT,tryGetImportFromModuleSpecifier:()=>Ng,tryGetJSDocSatisfiesTypeNode:()=>cC,tryGetModuleNameFromFile:()=>UA,tryGetModuleSpecifierFromDeclaration:()=>Cg,tryGetNativePerformanceHooks:()=>Wn,tryGetPropertyAccessOrIdentifierToString:()=>yb,tryGetPropertyNameOfBindingOrAssignmentElement:()=>HA,tryGetSourceMappingURL:()=>zJ,tryGetTextOfPropertyName:()=>qp,tryParseJson:()=>Lb,tryParsePattern:()=>tT,tryParsePatterns:()=>rT,tryParseRawSourceMap:()=>UJ,tryReadDirectory:()=>qZ,tryReadFile:()=>PL,tryRemoveDirectoryPrefix:()=>sk,tryRemoveExtension:()=>Yk,tryRemovePrefix:()=>nn,tryRemoveSuffix:()=>Vt,tscBuildOption:()=>nL,typeAcquisitionDeclarations:()=>oL,typeAliasNamePart:()=>YY,typeDirectiveIsEqualTo:()=>kd,typeKeywords:()=>tY,typeParameterNamePart:()=>ZY,typeToDisplayParts:()=>sZ,unchangedPollThresholds:()=>Qi,unchangedTextChangeRange:()=>rc,unescapeLeadingUnderscores:()=>Sc,unmangleScopedPackageName:()=>KR,unorderedRemoveItem:()=>Gt,unprefixedNodeCoreModules:()=>IC,unreachableCodeIsError:()=>VS,unsetNodeChildren:()=>_A,unusedLabelIsError:()=>WS,unwrapInnermostStatementOfLabel:()=>Wf,unwrapParenthesizedExpression:()=>EC,updateErrorForNoInputFiles:()=>Dj,updateLanguageServiceSourceFile:()=>u7,updateMissingFilePathsWatch:()=>WU,updateResolutionField:()=>hM,updateSharedExtendedConfigFileWatcher:()=>qU,updateSourceFile:()=>mO,updateWatchingWildcardDirectories:()=>$U,usingSingleLineStringWriter:()=>pd,utf16EncodeAsString:()=>Ns,validateLocaleAndSetLanguage:()=>gc,version:()=>u,versionMajorMinor:()=>c,visitArray:()=>CJ,visitCommaListElements:()=>AJ,visitEachChild:()=>IJ,visitFunctionBody:()=>FJ,visitIterationBody:()=>PJ,visitLexicalEnvironment:()=>NJ,visitNode:()=>kJ,visitNodes:()=>TJ,visitParameterList:()=>DJ,walkUpBindingElementsAndPatterns:()=>lc,walkUpOuterExpressions:()=>jA,walkUpParenthesizedExpressions:()=>_h,walkUpParenthesizedTypes:()=>lh,walkUpParenthesizedTypesAndGetParentAndChild:()=>uh,whitespaceOrMapCommentRegExp:()=>BJ,writeCommentRange:()=>Ev,writeFile:()=>av,writeFileEnsuringDirectories:()=>cv,zipWith:()=>x}),t.exports=s;var c="5.9",u="5.9.3",d=(e=>(e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan",e))(d||{}),p=[],f=new Map;function m(e){return void 0!==e?e.length:0}function g(e,t){if(void 0!==e)for(let n=0;n=0;n--){const r=t(e[n],n);if(r)return r}}function y(e,t){if(void 0!==e)for(let n=0;n=0;r--){const n=e[r];if(t(n,r))return n}}function w(e,t,n){if(void 0===e)return-1;for(let r=n??0;r=0;r--)if(t(e[r],r))return r;return-1}function D(e,t,n=bt){if(void 0!==e)for(let r=0;r{const[i,o]=t(r,e);n.set(i,o)}),n}function X(e,t){if(void 0!==e){if(void 0===t)return e.length>0;for(let n=0;nn(e[t],e[r])||Tt(t,r))}(e,r,n);let i=e[r[0]];const o=[r[0]];for(let n=1;ne[t])}function ne(e,t,n){return 0===e.length?[]:1===e.length?e.slice():n?te(e,t,n):function(e,t){const n=[];for(let r=0;r0&&r(t,e[n-1]))return!1;if(n0&&gn.assertGreaterThanOrEqual(n(t[o],t[o-1]),0);t:for(const a=i;ia&&gn.assertGreaterThanOrEqual(n(e[i],e[i-1]),0),n(t[o],e[i])){case-1:r.push(t[o]);continue e;case 0:continue e;case 1:continue t}}return r}function le(e,t){return void 0===t?e:void 0===e?[t]:(e.push(t),e)}function _e(e,t){return void 0===e?t:void 0===t?e:nt(e)?nt(t)?Y(e,t):le(e,t):nt(t)?le(t,e):[e,t]}function ue(e,t){return t<0?e.length+t:t}function de(e,t,n,r){if(void 0===t||0===t.length)return e;if(void 0===e)return t.slice(n,r);n=void 0===n?0:ue(t,n),r=void 0===r?t.length:ue(t,r);for(let i=n;i=0;t--)yield e[t]}function he(e,t,n,r){for(;nnull==e?void 0:e.at(t):(e,t)=>{if(void 0!==e&&(t=ue(e,t))>1);switch(r(n(e[i],i),t)){case-1:o=i+1;break;case 0:return i;case 1:a=i-1}}return~o}function Pe(e,t,n,r,i){if(e&&e.length>0){const o=e.length;if(o>0){let a=void 0===r||r<0?0:r;const s=void 0===i||a+i>o-1?o-1:a+i;let c;for(arguments.length<=2?(c=e[a],a++):c=n;a<=s;)c=t(c,e[a],a),a++;return c}}return n}var Ae=Object.prototype.hasOwnProperty;function Ie(e,t){return Ae.call(e,t)}function Oe(e,t){return Ae.call(e,t)?e[t]:void 0}function Le(e){const t=[];for(const n in e)Ae.call(e,n)&&t.push(n);return t}function je(e){const t=[];do{const n=Object.getOwnPropertyNames(e);for(const e of n)pe(t,e)}while(e=Object.getPrototypeOf(e));return t}function Me(e){const t=[];for(const n in e)Ae.call(e,n)&&t.push(e[n]);return t}function Re(e,t){const n=new Array(e);for(let r=0;r100&&n>t.length>>1){const e=t.length-n;t.copyWithin(0,n),t.length=e,n=0}return e},isEmpty:r}}function tt(e,t){const n=new Map;let r=0;function*i(){for(const e of n.values())nt(e)?yield*e:yield e}const o={has(r){const i=e(r);if(!n.has(i))return!1;const o=n.get(i);return nt(o)?D(o,r,t):t(o,r)},add(i){const o=e(i);if(n.has(o)){const e=n.get(o);if(nt(e))D(e,i,t)||(e.push(i),r++);else{const a=e;t(a,i)||(n.set(o,[a,i]),r++)}}else n.set(o,i),r++;return this},delete(i){const o=e(i);if(!n.has(o))return!1;const a=n.get(o);if(nt(a)){for(let e=0;ei(),values:()=>i(),*entries(){for(const e of i())yield[e,e]},[Symbol.iterator]:()=>i(),[Symbol.toStringTag]:n[Symbol.toStringTag]};return o}function nt(e){return Array.isArray(e)}function rt(e){return nt(e)?e:[e]}function it(e){return"string"==typeof e}function ot(e){return"number"==typeof e}function at(e,t){return void 0!==e&&t(e)?e:void 0}function st(e,t){return void 0!==e&&t(e)?e:gn.fail(`Invalid cast. The supplied value ${e} did not pass the test '${gn.getFunctionName(t)}'.`)}function ct(e){}function lt(){return!1}function _t(){return!0}function ut(){}function dt(e){return e}function pt(e){return e.toLowerCase()}var ft=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g;function mt(e){return ft.test(e)?e.replace(ft,pt):e}function gt(){throw new Error("Not implemented")}function ht(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function yt(e){const t=new Map;return n=>{const r=`${typeof n}:${n}`;let i=t.get(r);return void 0!==i||t.has(r)||(i=e(n),t.set(r,i)),i}}var vt=(e=>(e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive",e))(vt||{});function bt(e,t){return e===t}function xt(e,t){return e===t||void 0!==e&&void 0!==t&&e.toUpperCase()===t.toUpperCase()}function St(e,t){return bt(e,t)}function kt(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e-1===t(e,n)?e:n)}function Dt(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function Et(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toLowerCase())<(t=t.toLowerCase())?-1:e>t?1:0}function Ft(e,t){return kt(e,t)}function Pt(e){return e?Dt:Ft}var At,It,Ot=(()=>function(e){const t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(e,n)=>function(e,t,n){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;const r=n(e,t);return r<0?-1:r>0?1:0}(e,n,t)})();function Lt(){return It}function jt(e){It!==e&&(It=e,At=void 0)}function Mt(e,t){return At??(At=Ot(It)),At(e,t)}function Rt(e,t,n,r){return e===t?0:void 0===e?-1:void 0===t?1:r(e[n],t[n])}function Bt(e,t){return Tt(e?1:0,t?1:0)}function Jt(e,t,n){const r=Math.max(2,Math.floor(.34*e.length));let i,o=Math.floor(.4*e.length)+1;for(const a of t){const t=n(a);if(void 0!==t&&Math.abs(t.length-e.length)<=r){if(t===e)continue;if(t.length<3&&t.toLowerCase()!==e.toLowerCase())continue;const n=zt(e,t,o-.1);if(void 0===n)continue;gn.assert(nn?a-n:1),l=Math.floor(t.length>n+a?n+a:t.length);i[0]=a;let _=a;for(let e=1;en)return;const u=r;r=i,i=u}const a=r[t.length];return a>n?void 0:a}function qt(e,t,n){const r=e.length-t.length;return r>=0&&(n?xt(e.slice(r),t):e.indexOf(t,r)===r)}function Ut(e,t){return qt(e,t)?e.slice(0,e.length-t.length):e}function Vt(e,t){return qt(e,t)?e.slice(0,e.length-t.length):void 0}function Wt(e){let t=e.length;for(let n=t-1;n>0;n--){let r=e.charCodeAt(n);if(r>=48&&r<=57)do{--n,r=e.charCodeAt(n)}while(n>0&&r>=48&&r<=57);else{if(!(n>4)||110!==r&&78!==r)break;if(--n,r=e.charCodeAt(n),105!==r&&73!==r)break;if(--n,r=e.charCodeAt(n),109!==r&&77!==r)break;--n,r=e.charCodeAt(n)}if(45!==r&&46!==r)break;t=n}return t===e.length?e:e.slice(0,t)}function $t(e,t){for(let n=0;ne===t)}function Xt(e){return e?dt:mt}function Qt({prefix:e,suffix:t}){return`${e}*${t}`}function Yt(e,t){return gn.assert(rn(e,t)),t.substring(e.prefix.length,t.length-e.suffix.length)}function Zt(e,t,n){let r,i=-1;for(let o=0;oi&&rn(s,n)&&(i=s.prefix.length,r=a)}return r}function en(e,t,n){return n?xt(e.slice(0,t.length),t):0===e.lastIndexOf(t,0)}function tn(e,t){return en(e,t)?e.substr(t.length):e}function nn(e,t,n=dt){return en(n(e),n(t))?e.substring(t.length):void 0}function rn({prefix:e,suffix:t},n){return n.length>=e.length+t.length&&en(n,e)&&qt(n,t)}function on(e,t){return n=>e(n)&&t(n)}function an(...e){return(...t)=>{let n;for(const r of e)if(n=r(...t),n)return n;return n}}function sn(e){return(...t)=>!e(...t)}function cn(e){}function ln(e){return void 0===e?void 0:[e]}function _n(e,t,n,r,i,o){o??(o=ct);let a=0,s=0;const c=e.length,l=t.length;let _=!1;for(;a(e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Verbose=4]="Verbose",e))(hn||{});(e=>{let t=0;function n(t){return e.currentLogLevel<=t}function r(t,r){e.loggingHost&&n(t)&&e.loggingHost.log(t,r)}function i(e){r(3,e)}var o;e.currentLogLevel=2,e.isDebugging=!1,e.shouldLog=n,e.log=i,(o=i=e.log||(e.log={})).error=function(e){r(1,e)},o.warn=function(e){r(2,e)},o.log=function(e){r(3,e)},o.trace=function(e){r(4,e)};const a={};function s(e){return t>=e}function c(t,n){return!!s(t)||(a[n]={level:t,assertion:e[n]},e[n]=ct,!1)}function l(e,t){const n=new Error(e?`Debug Failure. ${e}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(n,t||l),n}function _(e,t,n,r){e||(t=t?`False expression: ${t}`:"False expression.",n&&(t+="\r\nVerbose Debug Information: "+("string"==typeof n?n:n())),l(t,r||_))}function u(e,t,n){null==e&&l(t,n||u)}function d(e,t,n){for(const r of e)u(r,t,n||d)}function p(e,t="Illegal value:",n){return l(`${t} ${"object"==typeof e&&Ie(e,"kind")&&Ie(e,"pos")?"SyntaxKind: "+y(e.kind):JSON.stringify(e)}`,n||p)}function f(e){}function m(e){if("function"!=typeof e)return"";if(Ie(e,"name"))return e.name;{const t=Function.prototype.toString.call(e),n=/^function\s+([\w$]+)\s*\(/.exec(t);return n?n[1]:""}}function g(e=0,t,n){const r=function(e){const t=h.get(e);if(t)return t;const n=[];for(const t in e){const r=e[t];"number"==typeof r&&n.push([r,t])}const r=me(n,(e,t)=>Tt(e[0],t[0]));return h.set(e,r),r}(t);if(0===e)return r.length>0&&0===r[0][0]?r[0][1]:"0";if(n){const t=[];let n=e;for(const[i,o]of r){if(i>e)break;0!==i&&i&e&&(t.push(o),n&=~i)}if(0===n)return t.join("|")}else for(const[t,n]of r)if(t===e)return n;return e.toString()}e.getAssertionLevel=function(){return t},e.setAssertionLevel=function(n){const r=t;if(t=n,n>r)for(const t of Le(a)){const r=a[t];void 0!==r&&e[t]!==r.assertion&&n>=r.level&&(e[t]=r,a[t]=void 0)}},e.shouldAssert=s,e.fail=l,e.failBadSyntaxKind=function e(t,n,r){return l(`${n||"Unexpected node."}\r\nNode ${y(t.kind)} was unexpected.`,r||e)},e.assert=_,e.assertEqual=function e(t,n,r,i,o){if(t!==n){l(`Expected ${t} === ${n}. ${r?i?`${r} ${i}`:r:""}`,o||e)}},e.assertLessThan=function e(t,n,r,i){t>=n&&l(`Expected ${t} < ${n}. ${r||""}`,i||e)},e.assertLessThanOrEqual=function e(t,n,r){t>n&&l(`Expected ${t} <= ${n}`,r||e)},e.assertGreaterThanOrEqual=function e(t,n,r){t= ${n}`,r||e)},e.assertIsDefined=u,e.checkDefined=function e(t,n,r){return u(t,n,r||e),t},e.assertEachIsDefined=d,e.checkEachDefined=function e(t,n,r){return d(t,n,r||e),t},e.assertNever=p,e.assertEachNode=function e(t,n,r,i){c(1,"assertEachNode")&&_(void 0===n||k(t,n),r||"Unexpected node.",()=>`Node array did not pass test '${m(n)}'.`,i||e)},e.assertNode=function e(t,n,r,i){c(1,"assertNode")&&_(void 0!==t&&(void 0===n||n(t)),r||"Unexpected node.",()=>`Node ${y(null==t?void 0:t.kind)} did not pass test '${m(n)}'.`,i||e)},e.assertNotNode=function e(t,n,r,i){c(1,"assertNotNode")&&_(void 0===t||void 0===n||!n(t),r||"Unexpected node.",()=>`Node ${y(t.kind)} should not have passed test '${m(n)}'.`,i||e)},e.assertOptionalNode=function e(t,n,r,i){c(1,"assertOptionalNode")&&_(void 0===n||void 0===t||n(t),r||"Unexpected node.",()=>`Node ${y(null==t?void 0:t.kind)} did not pass test '${m(n)}'.`,i||e)},e.assertOptionalToken=function e(t,n,r,i){c(1,"assertOptionalToken")&&_(void 0===n||void 0===t||t.kind===n,r||"Unexpected node.",()=>`Node ${y(null==t?void 0:t.kind)} was not a '${y(n)}' token.`,i||e)},e.assertMissingNode=function e(t,n,r){c(1,"assertMissingNode")&&_(void 0===t,n||"Unexpected node.",()=>`Node ${y(t.kind)} was unexpected'.`,r||e)},e.type=f,e.getFunctionName=m,e.formatSymbol=function(e){return`{ name: ${Sc(e.escapedName)}; flags: ${C(e.flags)}; declarations: ${O(e.declarations,e=>y(e.kind))} }`},e.formatEnum=g;const h=new Map;function y(e){return g(e,vr,!1)}function v(e){return g(e,br,!0)}function b(e){return g(e,xr,!0)}function S(e){return g(e,Ei,!0)}function T(e){return g(e,Pi,!0)}function C(e){return g(e,Kr,!0)}function w(e){return g(e,Qr,!0)}function N(e){return g(e,oi,!0)}function D(e){return g(e,Yr,!0)}function E(e){return g(e,Dr,!0)}e.formatSyntaxKind=y,e.formatSnippetKind=function(e){return g(e,Fi,!1)},e.formatScriptKind=function(e){return g(e,ki,!1)},e.formatNodeFlags=v,e.formatNodeCheckFlags=function(e){return g(e,Xr,!0)},e.formatModifierFlags=b,e.formatTransformFlags=S,e.formatEmitFlags=T,e.formatSymbolFlags=C,e.formatTypeFlags=w,e.formatSignatureFlags=N,e.formatObjectFlags=D,e.formatFlowFlags=E,e.formatRelationComparisonResult=function(e){return g(e,kr,!0)},e.formatCheckMode=function(e){return g(e,sJ,!0)},e.formatSignatureCheckMode=function(e){return g(e,cJ,!0)},e.formatTypeFacts=function(e){return g(e,oJ,!0)};let F,P,A=!1;function I(e){"__debugFlowFlags"in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value(){const e=2&this.flags?"FlowStart":4&this.flags?"FlowBranchLabel":8&this.flags?"FlowLoopLabel":16&this.flags?"FlowAssignment":32&this.flags?"FlowTrueCondition":64&this.flags?"FlowFalseCondition":128&this.flags?"FlowSwitchClause":256&this.flags?"FlowArrayMutation":512&this.flags?"FlowCall":1024&this.flags?"FlowReduceLabel":1&this.flags?"FlowUnreachable":"UnknownFlow",t=-2048&this.flags;return`${e}${t?` (${E(t)})`:""}`}},__debugFlowFlags:{get(){return g(this.flags,Dr,!0)}},__debugToString:{value(){return M(this)}}})}function L(e){"__tsDebuggerDisplay"in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value:e=>`NodeArray ${e=String(e).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]")}`}})}e.attachFlowNodeDebugInfo=function(e){return A&&("function"==typeof Object.setPrototypeOf?(F||(F=Object.create(Object.prototype),I(F)),Object.setPrototypeOf(e,F)):I(e)),e},e.attachNodeArrayDebugInfo=function(e){A&&("function"==typeof Object.setPrototypeOf?(P||(P=Object.create(Array.prototype),L(P)),Object.setPrototypeOf(e,P)):L(e))},e.enableDebugInfo=function(){if(A)return;const e=new WeakMap,t=new WeakMap;Object.defineProperties(Wx.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){const e=33554432&this.flags?"TransientSymbol":"Symbol",t=-33554433&this.flags;return`${e} '${Cc(this)}'${t?` (${C(t)})`:""}`}},__debugFlags:{get(){return C(this.flags)}}}),Object.defineProperties(Wx.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){const e=67359327&this.flags?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:98304&this.flags?"NullableType":384&this.flags?`LiteralType ${JSON.stringify(this.value)}`:2048&this.flags?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:8192&this.flags?"UniqueESSymbolType":32&this.flags?"EnumType":1048576&this.flags?"UnionType":2097152&this.flags?"IntersectionType":4194304&this.flags?"IndexType":8388608&this.flags?"IndexedAccessType":16777216&this.flags?"ConditionalType":33554432&this.flags?"SubstitutionType":262144&this.flags?"TypeParameter":524288&this.flags?3&this.objectFlags?"InterfaceType":4&this.objectFlags?"TypeReference":8&this.objectFlags?"TupleType":16&this.objectFlags?"AnonymousType":32&this.objectFlags?"MappedType":1024&this.objectFlags?"ReverseMappedType":256&this.objectFlags?"EvolvingArrayType":"ObjectType":"Type",t=524288&this.flags?-1344&this.objectFlags:0;return`${e}${this.symbol?` '${Cc(this.symbol)}'`:""}${t?` (${D(t)})`:""}`}},__debugFlags:{get(){return w(this.flags)}},__debugObjectFlags:{get(){return 524288&this.flags?D(this.objectFlags):""}},__debugTypeToString:{value(){let t=e.get(this);return void 0===t&&(t=this.checker.typeToString(this),e.set(this,t)),t}}}),Object.defineProperties(Wx.getSignatureConstructor().prototype,{__debugFlags:{get(){return N(this.flags)}},__debugSignatureToString:{value(){var e;return null==(e=this.checker)?void 0:e.signatureToString(this)}}});const n=[Wx.getNodeConstructor(),Wx.getIdentifierConstructor(),Wx.getTokenConstructor(),Wx.getSourceFileConstructor()];for(const e of n)Ie(e.prototype,"__debugKind")||Object.defineProperties(e.prototype,{__tsDebuggerDisplay:{value(){return`${Yl(this)?"GeneratedIdentifier":fD(this)?`Identifier '${kc(this)}'`:mD(this)?`PrivateIdentifier '${kc(this)}'`:QN(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:GN(this)?`NumericLiteral ${this.text}`:XN(this)?`BigIntLiteral ${this.text}n`:PD(this)?"TypeParameterDeclaration":AD(this)?"ParameterDeclaration":BD(this)?"ConstructorDeclaration":JD(this)?"GetAccessorDeclaration":zD(this)?"SetAccessorDeclaration":qD(this)?"CallSignatureDeclaration":UD(this)?"ConstructSignatureDeclaration":VD(this)?"IndexSignatureDeclaration":WD(this)?"TypePredicateNode":$D(this)?"TypeReferenceNode":KD(this)?"FunctionTypeNode":HD(this)?"ConstructorTypeNode":GD(this)?"TypeQueryNode":XD(this)?"TypeLiteralNode":QD(this)?"ArrayTypeNode":YD(this)?"TupleTypeNode":eE(this)?"OptionalTypeNode":tE(this)?"RestTypeNode":nE(this)?"UnionTypeNode":rE(this)?"IntersectionTypeNode":iE(this)?"ConditionalTypeNode":oE(this)?"InferTypeNode":aE(this)?"ParenthesizedTypeNode":sE(this)?"ThisTypeNode":cE(this)?"TypeOperatorNode":lE(this)?"IndexedAccessTypeNode":_E(this)?"MappedTypeNode":uE(this)?"LiteralTypeNode":ZD(this)?"NamedTupleMember":dE(this)?"ImportTypeNode":y(this.kind)}${this.flags?` (${v(this.flags)})`:""}`}},__debugKind:{get(){return y(this.kind)}},__debugNodeFlags:{get(){return v(this.flags)}},__debugModifierFlags:{get(){return b(Yv(this))}},__debugTransformFlags:{get(){return S(this.transformFlags)}},__debugIsParseTreeNode:{get(){return vc(this)}},__debugEmitFlags:{get(){return T(ap(this))}},__debugGetText:{value(e){if(sy(this))return"";let n=t.get(this);if(void 0===n){const r=bc(this),i=r&&wd(r);n=i?Qd(i,r,e):"",t.set(this,n)}return n}}});A=!0},e.formatVariance=function(e){const t=7&e;let n=0===t?"in out":3===t?"[bivariant]":2===t?"in":1===t?"out":4===t?"[independent]":"";return 8&e?n+=" (unmeasurable)":16&e&&(n+=" (unreliable)"),n};class j{__debugToString(){var e;switch(this.kind){case 3:return(null==(e=this.debugInfo)?void 0:e.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return x(this.sources,this.targets||O(this.sources,()=>"any"),(e,t)=>`${e.__debugTypeToString()} -> ${"string"==typeof t?t:t.__debugTypeToString()}`).join(", ");case 2:return x(this.sources,this.targets,(e,t)=>`${e.__debugTypeToString()} -> ${t().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split("\n").join("\n ")}\nm2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`;default:return p(this)}}}function M(e){let t,n=-1;function r(e){return e.id||(e.id=n,n--),e.id}var i;let o;var a;(i=t||(t={})).lr="─",i.ud="│",i.dr="╭",i.dl="╮",i.ul="╯",i.ur="╰",i.udr="├",i.udl="┤",i.dlr="┬",i.ulr="┴",i.udlr="╫",(a=o||(o={}))[a.None=0]="None",a[a.Up=1]="Up",a[a.Down=2]="Down",a[a.Left=4]="Left",a[a.Right=8]="Right",a[a.UpDown=3]="UpDown",a[a.LeftRight=12]="LeftRight",a[a.UpLeft=5]="UpLeft",a[a.UpRight=9]="UpRight",a[a.DownLeft=6]="DownLeft",a[a.DownRight=10]="DownRight",a[a.UpDownLeft=7]="UpDownLeft",a[a.UpDownRight=11]="UpDownRight",a[a.UpLeftRight=13]="UpLeftRight",a[a.DownLeftRight=14]="DownLeftRight",a[a.UpDownLeftRight=15]="UpDownLeftRight",a[a.NoChildren=16]="NoChildren";const s=Object.create(null),c=[],l=[],_=m(e,new Set);for(const e of c)e.text=v(e.flowNode,e.circular),h(e);const u=function e(t){let n=0;for(const r of p(t))n=Math.max(n,e(r));return n+1}(_),d=function(e){const t=x(Array(e),0);for(const e of c)t[e.level]=Math.max(t[e.level],e.text.length);return t}(u);return function e(t,n){if(-1===t.lane){t.lane=n,t.endLane=n;const r=p(t);for(let i=0;i0&&n++;const o=r[i];e(o,n),o.endLane>t.endLane&&(n=o.endLane)}t.endLane=n}}(_,0),function(){const e=d.length,t=wt(c,0,e=>e.lane)+1,n=x(Array(t),""),r=d.map(()=>Array(t)),i=d.map(()=>x(Array(t),0));for(const e of c){r[e.level][e.lane]=e;const t=p(e);for(let n=0;n0&&(o|=1),n0&&(o|=1),t0?i[n-1][e]:0,r=e>0?i[n][e-1]:0;let o=i[n][e];o||(8&t&&(o|=12),2&r&&(o|=3),i[n][e]=o)}for(let t=0;t0?e.repeat(t):"";let n="";for(;n.length=0,"Invalid argument: major"),gn.assert(t>=0,"Invalid argument: minor"),gn.assert(n>=0,"Invalid argument: patch");const o=r?nt(r)?r:r.split("."):p,a=i?nt(i)?i:i.split("."):p;gn.assert(k(o,e=>bn.test(e)),"Invalid argument: prerelease"),gn.assert(k(a,e=>Sn.test(e)),"Invalid argument: build"),this.major=e,this.minor=t,this.patch=n,this.prerelease=o,this.build=a}static tryParse(t){const n=wn(t);if(!n)return;const{major:r,minor:i,patch:o,prerelease:a,build:s}=n;return new e(r,i,o,a,s)}compareTo(e){return this===e?0:void 0===e?1:Tt(this.major,e.major)||Tt(this.minor,e.minor)||Tt(this.patch,e.patch)||function(e,t){if(e===t)return 0;if(0===e.length)return 0===t.length?0:1;if(0===t.length)return-1;const n=Math.min(e.length,t.length);for(let r=0;r=]|<=|>=)?\s*([a-z0-9-+.*]+)$/i;function In(e){const t=[];for(let n of e.trim().split(Dn)){if(!n)continue;const e=[];n=n.trim();const r=Pn.exec(n);if(r){if(!Ln(r[1],r[2],e))return}else for(const t of n.split(En)){const n=An.exec(t.trim());if(!n||!jn(n[1],n[2],e))return}t.push(e)}return t}function On(e){const t=Fn.exec(e);if(!t)return;const[,n,r="*",i="*",o,a]=t;return{version:new Cn(Mn(n)?0:parseInt(n,10),Mn(n)||Mn(r)?0:parseInt(r,10),Mn(n)||Mn(r)||Mn(i)?0:parseInt(i,10),o,a),major:n,minor:r,patch:i}}function Ln(e,t,n){const r=On(e);if(!r)return!1;const i=On(t);return!!i&&(Mn(r.major)||n.push(Rn(">=",r.version)),Mn(i.major)||n.push(Mn(i.minor)?Rn("<",i.version.increment("major")):Mn(i.patch)?Rn("<",i.version.increment("minor")):Rn("<=",i.version)),!0)}function jn(e,t,n){const r=On(t);if(!r)return!1;const{version:i,major:o,minor:a,patch:s}=r;if(Mn(o))"<"!==e&&">"!==e||n.push(Rn("<",Cn.zero));else switch(e){case"~":n.push(Rn(">=",i)),n.push(Rn("<",i.increment(Mn(a)?"major":"minor")));break;case"^":n.push(Rn(">=",i)),n.push(Rn("<",i.increment(i.major>0||Mn(a)?"major":i.minor>0||Mn(s)?"minor":"patch")));break;case"<":case">=":n.push(Mn(a)||Mn(s)?Rn(e,i.with({prerelease:"0"})):Rn(e,i));break;case"<=":case">":n.push(Mn(a)?Rn("<="===e?"<":">=",i.increment("major").with({prerelease:"0"})):Mn(s)?Rn("<="===e?"<":">=",i.increment("minor").with({prerelease:"0"})):Rn(e,i));break;case"=":case void 0:Mn(a)||Mn(s)?(n.push(Rn(">=",i.with({prerelease:"0"}))),n.push(Rn("<",i.increment(Mn(a)?"major":"minor").with({prerelease:"0"})))):n.push(Rn("=",i));break;default:return!1}return!0}function Mn(e){return"*"===e||"x"===e||"X"===e}function Rn(e,t){return{operator:e,operand:t}}function Bn(e,t){for(const n of t)if(!Jn(e,n.operator,n.operand))return!1;return!0}function Jn(e,t,n){const r=e.compareTo(n);switch(t){case"<":return r<0;case"<=":return r<=0;case">":return r>0;case">=":return r>=0;case"=":return 0===r;default:return gn.assertNever(t)}}function zn(e){return O(e,qn).join(" ")}function qn(e){return`${e.operator}${e.operand}`}var Un=function(){const t=function(){if(mn())try{const{performance:t}=e("perf_hooks");if(t)return{shouldWriteNativeEvents:!1,performance:t}}catch{}if("object"==typeof performance)return{shouldWriteNativeEvents:!0,performance:performance}}();if(!t)return;const{shouldWriteNativeEvents:n,performance:r}=t,i={shouldWriteNativeEvents:n,performance:void 0,performanceTime:void 0};return"number"==typeof r.timeOrigin&&"function"==typeof r.now&&(i.performanceTime=r),i.performanceTime&&"function"==typeof r.mark&&"function"==typeof r.measure&&"function"==typeof r.clearMarks&&"function"==typeof r.clearMeasures&&(i.performance=r),i}(),Vn=null==Un?void 0:Un.performanceTime;function Wn(){return Un}var $n,Kn,Hn=Vn?()=>Vn.now():Date.now,Gn={};function Xn(e,t,n,r){return e?Qn(t,n,r):er}function Qn(e,t,n){let r=0;return{enter:function(){1===++r&&ar(t)},exit:function(){0===--r?(ar(n),sr(e,t,n)):r<0&&gn.fail("enter/exit count does not match.")}}}a(Gn,{clearMarks:()=>pr,clearMeasures:()=>dr,createTimer:()=>Qn,createTimerIf:()=>Xn,disable:()=>gr,enable:()=>mr,forEachMark:()=>ur,forEachMeasure:()=>_r,getCount:()=>cr,getDuration:()=>lr,isEnabled:()=>fr,mark:()=>ar,measure:()=>sr,nullTimer:()=>er});var Yn,Zn,er={enter:ct,exit:ct},tr=!1,nr=Hn(),rr=new Map,ir=new Map,or=new Map;function ar(e){if(tr){const t=ir.get(e)??0;ir.set(e,t+1),rr.set(e,Hn()),null==Kn||Kn.mark(e),"function"==typeof onProfilerEvent&&onProfilerEvent(e)}}function sr(e,t,n){if(tr){const r=(void 0!==n?rr.get(n):void 0)??Hn(),i=(void 0!==t?rr.get(t):void 0)??nr,o=or.get(e)||0;or.set(e,o+(r-i)),null==Kn||Kn.measure(e,t,n)}}function cr(e){return ir.get(e)||0}function lr(e){return or.get(e)||0}function _r(e){or.forEach((t,n)=>e(n,t))}function ur(e){rr.forEach((t,n)=>e(n))}function dr(e){void 0!==e?or.delete(e):or.clear(),null==Kn||Kn.clearMeasures(e)}function pr(e){void 0!==e?(ir.delete(e),rr.delete(e)):(ir.clear(),rr.clear()),null==Kn||Kn.clearMarks(e)}function fr(){return tr}function mr(e=mo){var t;return tr||(tr=!0,$n||($n=Wn()),(null==$n?void 0:$n.performance)&&(nr=$n.performance.timeOrigin,($n.shouldWriteNativeEvents||(null==(t=null==e?void 0:e.cpuProfilingEnabled)?void 0:t.call(e))||(null==e?void 0:e.debugMode))&&(Kn=$n.performance))),!0}function gr(){tr&&(rr.clear(),ir.clear(),or.clear(),Kn=void 0,tr=!1)}(t=>{let r,i,o=0,a=0;const s=[];let c;const l=[];let _;var u;t.startTracing=function(_,u,d){if(gn.assert(!Yn,"Tracing already started"),void 0===r)try{r=e("fs")}catch(e){throw new Error(`tracing requires having fs\n(original error: ${e.message||e})`)}i=_,s.length=0,void 0===c&&(c=Uo(u,"legend.json")),r.existsSync(u)||r.mkdirSync(u,{recursive:!0});const p="build"===i?`.${n.pid}-${++o}`:"server"===i?`.${n.pid}`:"",f=Uo(u,`trace${p}.json`),m=Uo(u,`types${p}.json`);l.push({configFilePath:d,tracePath:f,typesPath:m}),a=r.openSync(f,"w"),Yn=t;const g={cat:"__metadata",ph:"M",ts:1e3*Hn(),pid:1,tid:1};r.writeSync(a,"[\n"+[{name:"process_name",args:{name:"tsc"},...g},{name:"thread_name",args:{name:"Main"},...g},{name:"TracingStartedInBrowser",...g,cat:"disabled-by-default-devtools.timeline"}].map(e=>JSON.stringify(e)).join(",\n"))},t.stopTracing=function(){gn.assert(Yn,"Tracing is not in progress"),gn.assert(!!s.length==("server"!==i)),r.writeSync(a,"\n]\n"),r.closeSync(a),Yn=void 0,s.length?function(e){var t,n,i,o,a,s,c,_,u,d,p,f,m,h,y,v,b,x,S;ar("beginDumpTypes");const k=l[l.length-1].typesPath,T=r.openSync(k,"w"),C=new Map;r.writeSync(T,"[");const w=e.length;for(let l=0;le.id),referenceLocation:g(e.node)}}let A={};if(16777216&k.flags){const e=k;A={conditionalCheckType:null==(s=e.checkType)?void 0:s.id,conditionalExtendsType:null==(c=e.extendsType)?void 0:c.id,conditionalTrueType:(null==(_=e.resolvedTrueType)?void 0:_.id)??-1,conditionalFalseType:(null==(u=e.resolvedFalseType)?void 0:u.id)??-1}}let I={};if(33554432&k.flags){const e=k;I={substitutionBaseType:null==(d=e.baseType)?void 0:d.id,constraintType:null==(p=e.constraint)?void 0:p.id}}let O={};if(1024&N){const e=k;O={reverseMappedSourceType:null==(f=e.source)?void 0:f.id,reverseMappedMappedType:null==(m=e.mappedType)?void 0:m.id,reverseMappedConstraintType:null==(h=e.constraintType)?void 0:h.id}}let L,j={};if(256&N){const e=k;j={evolvingArrayElementType:e.elementType.id,evolvingArrayFinalType:null==(y=e.finalArrayType)?void 0:y.id}}const M=k.checker.getRecursionIdentity(k);M&&(L=C.get(M),L||(L=C.size,C.set(M,L)));const R={id:k.id,intrinsicName:k.intrinsicName,symbolName:(null==D?void 0:D.escapedName)&&Sc(D.escapedName),recursionId:L,isTuple:!!(8&N)||void 0,unionTypes:1048576&k.flags?null==(v=k.types)?void 0:v.map(e=>e.id):void 0,intersectionTypes:2097152&k.flags?k.types.map(e=>e.id):void 0,aliasTypeArguments:null==(b=k.aliasTypeArguments)?void 0:b.map(e=>e.id),keyofType:4194304&k.flags?null==(x=k.type)?void 0:x.id:void 0,...F,...P,...A,...I,...O,...j,destructuringPattern:g(k.pattern),firstDeclaration:g(null==(S=null==D?void 0:D.declarations)?void 0:S[0]),flags:gn.formatTypeFlags(k.flags).split("|"),display:E};r.writeSync(T,JSON.stringify(R)),l0),f(d.length-1,1e3*Hn(),e),d.length--},t.popAll=function(){const e=1e3*Hn();for(let t=d.length-1;t>=0;t--)f(t,e);d.length=0};const p=1e4;function f(e,t,n){const{phase:r,name:i,args:o,time:a,separateBeginAndEnd:s}=d[e];s?(gn.assert(!n,"`results` are not supported for events with `separateBeginAndEnd`"),m("E",r,i,o,void 0,t)):p-a%p<=t-a&&m("X",r,i,{...o,results:n},'"dur":'+(t-a),a)}function m(e,t,n,o,s,c=1e3*Hn()){"server"===i&&"checkTypes"===t||(ar("beginTracing"),r.writeSync(a,`,\n{"pid":1,"tid":1,"ph":"${e}","cat":"${t}","ts":${c},"name":"${n}"`),s&&r.writeSync(a,`,${s}`),o&&r.writeSync(a,`,"args":${JSON.stringify(o)}`),r.writeSync(a,"}"),ar("endTracing"),sr("Tracing","beginTracing","endTracing"))}function g(e){const t=wd(e);return t?{path:t.path,start:n(Ha(t,e.pos)),end:n(Ha(t,e.end))}:void 0;function n(e){return{line:e.line+1,character:e.character+1}}}t.dumpLegend=function(){c&&r.writeFileSync(c,JSON.stringify(l))}})(Zn||(Zn={}));var hr=Zn.startTracing,yr=Zn.dumpLegend,vr=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.DeferKeyword=166]="DeferKeyword",e[e.QualifiedName=167]="QualifiedName",e[e.ComputedPropertyName=168]="ComputedPropertyName",e[e.TypeParameter=169]="TypeParameter",e[e.Parameter=170]="Parameter",e[e.Decorator=171]="Decorator",e[e.PropertySignature=172]="PropertySignature",e[e.PropertyDeclaration=173]="PropertyDeclaration",e[e.MethodSignature=174]="MethodSignature",e[e.MethodDeclaration=175]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=176]="ClassStaticBlockDeclaration",e[e.Constructor=177]="Constructor",e[e.GetAccessor=178]="GetAccessor",e[e.SetAccessor=179]="SetAccessor",e[e.CallSignature=180]="CallSignature",e[e.ConstructSignature=181]="ConstructSignature",e[e.IndexSignature=182]="IndexSignature",e[e.TypePredicate=183]="TypePredicate",e[e.TypeReference=184]="TypeReference",e[e.FunctionType=185]="FunctionType",e[e.ConstructorType=186]="ConstructorType",e[e.TypeQuery=187]="TypeQuery",e[e.TypeLiteral=188]="TypeLiteral",e[e.ArrayType=189]="ArrayType",e[e.TupleType=190]="TupleType",e[e.OptionalType=191]="OptionalType",e[e.RestType=192]="RestType",e[e.UnionType=193]="UnionType",e[e.IntersectionType=194]="IntersectionType",e[e.ConditionalType=195]="ConditionalType",e[e.InferType=196]="InferType",e[e.ParenthesizedType=197]="ParenthesizedType",e[e.ThisType=198]="ThisType",e[e.TypeOperator=199]="TypeOperator",e[e.IndexedAccessType=200]="IndexedAccessType",e[e.MappedType=201]="MappedType",e[e.LiteralType=202]="LiteralType",e[e.NamedTupleMember=203]="NamedTupleMember",e[e.TemplateLiteralType=204]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=205]="TemplateLiteralTypeSpan",e[e.ImportType=206]="ImportType",e[e.ObjectBindingPattern=207]="ObjectBindingPattern",e[e.ArrayBindingPattern=208]="ArrayBindingPattern",e[e.BindingElement=209]="BindingElement",e[e.ArrayLiteralExpression=210]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=211]="ObjectLiteralExpression",e[e.PropertyAccessExpression=212]="PropertyAccessExpression",e[e.ElementAccessExpression=213]="ElementAccessExpression",e[e.CallExpression=214]="CallExpression",e[e.NewExpression=215]="NewExpression",e[e.TaggedTemplateExpression=216]="TaggedTemplateExpression",e[e.TypeAssertionExpression=217]="TypeAssertionExpression",e[e.ParenthesizedExpression=218]="ParenthesizedExpression",e[e.FunctionExpression=219]="FunctionExpression",e[e.ArrowFunction=220]="ArrowFunction",e[e.DeleteExpression=221]="DeleteExpression",e[e.TypeOfExpression=222]="TypeOfExpression",e[e.VoidExpression=223]="VoidExpression",e[e.AwaitExpression=224]="AwaitExpression",e[e.PrefixUnaryExpression=225]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=226]="PostfixUnaryExpression",e[e.BinaryExpression=227]="BinaryExpression",e[e.ConditionalExpression=228]="ConditionalExpression",e[e.TemplateExpression=229]="TemplateExpression",e[e.YieldExpression=230]="YieldExpression",e[e.SpreadElement=231]="SpreadElement",e[e.ClassExpression=232]="ClassExpression",e[e.OmittedExpression=233]="OmittedExpression",e[e.ExpressionWithTypeArguments=234]="ExpressionWithTypeArguments",e[e.AsExpression=235]="AsExpression",e[e.NonNullExpression=236]="NonNullExpression",e[e.MetaProperty=237]="MetaProperty",e[e.SyntheticExpression=238]="SyntheticExpression",e[e.SatisfiesExpression=239]="SatisfiesExpression",e[e.TemplateSpan=240]="TemplateSpan",e[e.SemicolonClassElement=241]="SemicolonClassElement",e[e.Block=242]="Block",e[e.EmptyStatement=243]="EmptyStatement",e[e.VariableStatement=244]="VariableStatement",e[e.ExpressionStatement=245]="ExpressionStatement",e[e.IfStatement=246]="IfStatement",e[e.DoStatement=247]="DoStatement",e[e.WhileStatement=248]="WhileStatement",e[e.ForStatement=249]="ForStatement",e[e.ForInStatement=250]="ForInStatement",e[e.ForOfStatement=251]="ForOfStatement",e[e.ContinueStatement=252]="ContinueStatement",e[e.BreakStatement=253]="BreakStatement",e[e.ReturnStatement=254]="ReturnStatement",e[e.WithStatement=255]="WithStatement",e[e.SwitchStatement=256]="SwitchStatement",e[e.LabeledStatement=257]="LabeledStatement",e[e.ThrowStatement=258]="ThrowStatement",e[e.TryStatement=259]="TryStatement",e[e.DebuggerStatement=260]="DebuggerStatement",e[e.VariableDeclaration=261]="VariableDeclaration",e[e.VariableDeclarationList=262]="VariableDeclarationList",e[e.FunctionDeclaration=263]="FunctionDeclaration",e[e.ClassDeclaration=264]="ClassDeclaration",e[e.InterfaceDeclaration=265]="InterfaceDeclaration",e[e.TypeAliasDeclaration=266]="TypeAliasDeclaration",e[e.EnumDeclaration=267]="EnumDeclaration",e[e.ModuleDeclaration=268]="ModuleDeclaration",e[e.ModuleBlock=269]="ModuleBlock",e[e.CaseBlock=270]="CaseBlock",e[e.NamespaceExportDeclaration=271]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=272]="ImportEqualsDeclaration",e[e.ImportDeclaration=273]="ImportDeclaration",e[e.ImportClause=274]="ImportClause",e[e.NamespaceImport=275]="NamespaceImport",e[e.NamedImports=276]="NamedImports",e[e.ImportSpecifier=277]="ImportSpecifier",e[e.ExportAssignment=278]="ExportAssignment",e[e.ExportDeclaration=279]="ExportDeclaration",e[e.NamedExports=280]="NamedExports",e[e.NamespaceExport=281]="NamespaceExport",e[e.ExportSpecifier=282]="ExportSpecifier",e[e.MissingDeclaration=283]="MissingDeclaration",e[e.ExternalModuleReference=284]="ExternalModuleReference",e[e.JsxElement=285]="JsxElement",e[e.JsxSelfClosingElement=286]="JsxSelfClosingElement",e[e.JsxOpeningElement=287]="JsxOpeningElement",e[e.JsxClosingElement=288]="JsxClosingElement",e[e.JsxFragment=289]="JsxFragment",e[e.JsxOpeningFragment=290]="JsxOpeningFragment",e[e.JsxClosingFragment=291]="JsxClosingFragment",e[e.JsxAttribute=292]="JsxAttribute",e[e.JsxAttributes=293]="JsxAttributes",e[e.JsxSpreadAttribute=294]="JsxSpreadAttribute",e[e.JsxExpression=295]="JsxExpression",e[e.JsxNamespacedName=296]="JsxNamespacedName",e[e.CaseClause=297]="CaseClause",e[e.DefaultClause=298]="DefaultClause",e[e.HeritageClause=299]="HeritageClause",e[e.CatchClause=300]="CatchClause",e[e.ImportAttributes=301]="ImportAttributes",e[e.ImportAttribute=302]="ImportAttribute",e[e.AssertClause=301]="AssertClause",e[e.AssertEntry=302]="AssertEntry",e[e.ImportTypeAssertionContainer=303]="ImportTypeAssertionContainer",e[e.PropertyAssignment=304]="PropertyAssignment",e[e.ShorthandPropertyAssignment=305]="ShorthandPropertyAssignment",e[e.SpreadAssignment=306]="SpreadAssignment",e[e.EnumMember=307]="EnumMember",e[e.SourceFile=308]="SourceFile",e[e.Bundle=309]="Bundle",e[e.JSDocTypeExpression=310]="JSDocTypeExpression",e[e.JSDocNameReference=311]="JSDocNameReference",e[e.JSDocMemberName=312]="JSDocMemberName",e[e.JSDocAllType=313]="JSDocAllType",e[e.JSDocUnknownType=314]="JSDocUnknownType",e[e.JSDocNullableType=315]="JSDocNullableType",e[e.JSDocNonNullableType=316]="JSDocNonNullableType",e[e.JSDocOptionalType=317]="JSDocOptionalType",e[e.JSDocFunctionType=318]="JSDocFunctionType",e[e.JSDocVariadicType=319]="JSDocVariadicType",e[e.JSDocNamepathType=320]="JSDocNamepathType",e[e.JSDoc=321]="JSDoc",e[e.JSDocComment=321]="JSDocComment",e[e.JSDocText=322]="JSDocText",e[e.JSDocTypeLiteral=323]="JSDocTypeLiteral",e[e.JSDocSignature=324]="JSDocSignature",e[e.JSDocLink=325]="JSDocLink",e[e.JSDocLinkCode=326]="JSDocLinkCode",e[e.JSDocLinkPlain=327]="JSDocLinkPlain",e[e.JSDocTag=328]="JSDocTag",e[e.JSDocAugmentsTag=329]="JSDocAugmentsTag",e[e.JSDocImplementsTag=330]="JSDocImplementsTag",e[e.JSDocAuthorTag=331]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=332]="JSDocDeprecatedTag",e[e.JSDocClassTag=333]="JSDocClassTag",e[e.JSDocPublicTag=334]="JSDocPublicTag",e[e.JSDocPrivateTag=335]="JSDocPrivateTag",e[e.JSDocProtectedTag=336]="JSDocProtectedTag",e[e.JSDocReadonlyTag=337]="JSDocReadonlyTag",e[e.JSDocOverrideTag=338]="JSDocOverrideTag",e[e.JSDocCallbackTag=339]="JSDocCallbackTag",e[e.JSDocOverloadTag=340]="JSDocOverloadTag",e[e.JSDocEnumTag=341]="JSDocEnumTag",e[e.JSDocParameterTag=342]="JSDocParameterTag",e[e.JSDocReturnTag=343]="JSDocReturnTag",e[e.JSDocThisTag=344]="JSDocThisTag",e[e.JSDocTypeTag=345]="JSDocTypeTag",e[e.JSDocTemplateTag=346]="JSDocTemplateTag",e[e.JSDocTypedefTag=347]="JSDocTypedefTag",e[e.JSDocSeeTag=348]="JSDocSeeTag",e[e.JSDocPropertyTag=349]="JSDocPropertyTag",e[e.JSDocThrowsTag=350]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=351]="JSDocSatisfiesTag",e[e.JSDocImportTag=352]="JSDocImportTag",e[e.SyntaxList=353]="SyntaxList",e[e.NotEmittedStatement=354]="NotEmittedStatement",e[e.NotEmittedTypeElement=355]="NotEmittedTypeElement",e[e.PartiallyEmittedExpression=356]="PartiallyEmittedExpression",e[e.CommaListExpression=357]="CommaListExpression",e[e.SyntheticReferenceExpression=358]="SyntheticReferenceExpression",e[e.Count=359]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=166]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=183]="FirstTypeNode",e[e.LastTypeNode=206]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=166]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=244]="FirstStatement",e[e.LastStatement=260]="LastStatement",e[e.FirstNode=167]="FirstNode",e[e.FirstJSDocNode=310]="FirstJSDocNode",e[e.LastJSDocNode=352]="LastJSDocNode",e[e.FirstJSDocTagNode=328]="FirstJSDocTagNode",e[e.LastJSDocTagNode=352]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=166]="LastContextualKeyword",e))(vr||{}),br=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(br||{}),xr=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(xr||{}),Sr=(e=>(e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement",e))(Sr||{}),kr=(e=>(e[e.None=0]="None",e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask",e[e.ComplexityOverflow=32]="ComplexityOverflow",e[e.StackDepthOverflow=64]="StackDepthOverflow",e[e.Overflow=96]="Overflow",e))(kr||{}),Tr=(e=>(e[e.None=0]="None",e[e.Always=1]="Always",e[e.Never=2]="Never",e[e.Sometimes=3]="Sometimes",e))(Tr||{}),Cr=(e=>(e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Loop=2]="Loop",e[e.Unique=3]="Unique",e[e.Node=4]="Node",e[e.KindMask=7]="KindMask",e[e.ReservedInNestedScopes=8]="ReservedInNestedScopes",e[e.Optimistic=16]="Optimistic",e[e.FileLevel=32]="FileLevel",e[e.AllowNameSubstitution=64]="AllowNameSubstitution",e))(Cr||{}),wr=(e=>(e[e.None=0]="None",e[e.HasIndices=1]="HasIndices",e[e.Global=2]="Global",e[e.IgnoreCase=4]="IgnoreCase",e[e.Multiline=8]="Multiline",e[e.DotAll=16]="DotAll",e[e.Unicode=32]="Unicode",e[e.UnicodeSets=64]="UnicodeSets",e[e.Sticky=128]="Sticky",e[e.AnyUnicodeMode=96]="AnyUnicodeMode",e[e.Modifiers=28]="Modifiers",e))(wr||{}),Nr=(e=>(e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.ContainsInvalidEscape=2048]="ContainsInvalidEscape",e[e.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.PrecedingJSDocLeadingAsterisks=32768]="PrecedingJSDocLeadingAsterisks",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=7176]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",e[e.IsInvalid=26656]="IsInvalid",e))(Nr||{}),Dr=(e=>(e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.ReduceLabel=1024]="ReduceLabel",e[e.Referenced=2048]="Referenced",e[e.Shared=4096]="Shared",e[e.Label=12]="Label",e[e.Condition=96]="Condition",e))(Dr||{}),Er=(e=>(e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore",e))(Er||{}),Fr=class{},Pr=(e=>(e[e.RootFile=0]="RootFile",e[e.SourceFromProjectReference=1]="SourceFromProjectReference",e[e.OutputFromProjectReference=2]="OutputFromProjectReference",e[e.Import=3]="Import",e[e.ReferenceFile=4]="ReferenceFile",e[e.TypeReferenceDirective=5]="TypeReferenceDirective",e[e.LibFile=6]="LibFile",e[e.LibReferenceDirective=7]="LibReferenceDirective",e[e.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",e))(Pr||{}),Ar=(e=>(e[e.FilePreprocessingLibReferenceDiagnostic=0]="FilePreprocessingLibReferenceDiagnostic",e[e.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",e[e.ResolutionDiagnostics=2]="ResolutionDiagnostics",e))(Ar||{}),Ir=(e=>(e[e.Js=0]="Js",e[e.Dts=1]="Dts",e[e.BuilderSignature=2]="BuilderSignature",e))(Ir||{}),Or=(e=>(e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely",e))(Or||{}),Lr=(e=>(e[e.Success=0]="Success",e[e.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",e[e.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",e[e.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",e))(Lr||{}),jr=(e=>(e[e.Ok=0]="Ok",e[e.NeedsOverride=1]="NeedsOverride",e[e.HasInvalidOverride=2]="HasInvalidOverride",e))(jr||{}),Mr=(e=>(e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype",e))(Mr||{}),Rr=(e=>(e[e.None=0]="None",e[e.NoSupertypeReduction=1]="NoSupertypeReduction",e[e.NoConstraintReduction=2]="NoConstraintReduction",e))(Rr||{}),Br=(e=>(e[e.None=0]="None",e[e.Signature=1]="Signature",e[e.NoConstraints=2]="NoConstraints",e[e.Completions=4]="Completions",e[e.SkipBindingPatterns=8]="SkipBindingPatterns",e))(Br||{}),Jr=(e=>(e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName",e))(Jr||{}),zr=(e=>(e[e.None=0]="None",e[e.WriteComputedProps=1]="WriteComputedProps",e[e.NoSyntacticPrinter=2]="NoSyntacticPrinter",e[e.DoNotIncludeSymbolChain=4]="DoNotIncludeSymbolChain",e[e.AllowUnresolvedNames=8]="AllowUnresolvedNames",e))(zr||{}),qr=(e=>(e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AddUndefined=131072]="AddUndefined",e[e.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",e[e.InArrayType=524288]="InArrayType",e[e.InElementType=2097152]="InElementType",e[e.InFirstTypeArgument=4194304]="InFirstTypeArgument",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.NodeBuilderFlagsMask=848330095]="NodeBuilderFlagsMask",e))(qr||{}),Ur=(e=>(e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",e[e.AllowAnyNodeKind=4]="AllowAnyNodeKind",e[e.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",e[e.WriteComputedProps=16]="WriteComputedProps",e[e.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",e))(Ur||{}),Vr=(e=>(e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed",e[e.NotResolved=3]="NotResolved",e))(Vr||{}),Wr=(e=>(e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier",e))(Wr||{}),$r=(e=>(e[e.Unknown=0]="Unknown",e[e.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",e[e.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",e[e.NumberLikeType=3]="NumberLikeType",e[e.BigIntLikeType=4]="BigIntLikeType",e[e.StringLikeType=5]="StringLikeType",e[e.BooleanType=6]="BooleanType",e[e.ArrayLikeType=7]="ArrayLikeType",e[e.ESSymbolType=8]="ESSymbolType",e[e.Promise=9]="Promise",e[e.TypeWithCallSignature=10]="TypeWithCallSignature",e[e.ObjectType=11]="ObjectType",e))($r||{}),Kr=(e=>(e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=-1]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.AccessorExcludes=13247]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer",e))(Kr||{}),Hr=(e=>(e[e.None=0]="None",e[e.Instantiated=1]="Instantiated",e[e.SyntheticProperty=2]="SyntheticProperty",e[e.SyntheticMethod=4]="SyntheticMethod",e[e.Readonly=8]="Readonly",e[e.ReadPartial=16]="ReadPartial",e[e.WritePartial=32]="WritePartial",e[e.HasNonUniformType=64]="HasNonUniformType",e[e.HasLiteralType=128]="HasLiteralType",e[e.ContainsPublic=256]="ContainsPublic",e[e.ContainsProtected=512]="ContainsProtected",e[e.ContainsPrivate=1024]="ContainsPrivate",e[e.ContainsStatic=2048]="ContainsStatic",e[e.Late=4096]="Late",e[e.ReverseMapped=8192]="ReverseMapped",e[e.OptionalParameter=16384]="OptionalParameter",e[e.RestParameter=32768]="RestParameter",e[e.DeferredType=65536]="DeferredType",e[e.HasNeverType=131072]="HasNeverType",e[e.Mapped=262144]="Mapped",e[e.StripOptional=524288]="StripOptional",e[e.Unresolved=1048576]="Unresolved",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial",e))(Hr||{}),Gr=(e=>(e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.Resolving="__resolving__",e.ExportEquals="export=",e.Default="default",e.This="this",e.InstantiationExpression="__instantiationExpression",e.ImportAttributes="__importAttributes",e))(Gr||{}),Xr=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e[e.PartiallyTypeChecked=8388608]="PartiallyTypeChecked",e[e.LazyFlags=539358128]="LazyFlags",e))(Xr||{}),Qr=(e=>(e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.TemplateLiteral=134217728]="TemplateLiteral",e[e.StringMapping=268435456]="StringMapping",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109472]="Unit",e[e.Freshable=2976]="Freshable",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.StringLike=402653316]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",e[e.DisjointDomains=469892092]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=406847488]="InstantiablePrimitive",e[e.Instantiable=465829888]="Instantiable",e[e.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899393]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(Qr||{}),Yr=(e=>(e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.SingleSignatureType=134217728]="SingleSignatureType",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",e))(Yr||{}),Zr=(e=>(e[e.Invariant=0]="Invariant",e[e.Covariant=1]="Covariant",e[e.Contravariant=2]="Contravariant",e[e.Bivariant=3]="Bivariant",e[e.Independent=4]="Independent",e[e.VarianceMask=7]="VarianceMask",e[e.Unmeasurable=8]="Unmeasurable",e[e.Unreliable=16]="Unreliable",e[e.AllowsStructuralFallback=24]="AllowsStructuralFallback",e))(Zr||{}),ei=(e=>(e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest",e))(ei||{}),ti=(e=>(e[e.None=0]="None",e[e.IncludeUndefined=1]="IncludeUndefined",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.Writing=4]="Writing",e[e.CacheSymbol=8]="CacheSymbol",e[e.AllowMissing=16]="AllowMissing",e[e.ExpressionPosition=32]="ExpressionPosition",e[e.ReportDeprecated=64]="ReportDeprecated",e[e.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",e[e.Contextual=256]="Contextual",e[e.Persistent=1]="Persistent",e))(ti||{}),ni=(e=>(e[e.None=0]="None",e[e.StringsOnly=1]="StringsOnly",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.NoReducibleCheck=4]="NoReducibleCheck",e))(ni||{}),ri=(e=>(e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed",e))(ri||{}),ii=(e=>(e[e.Call=0]="Call",e[e.Construct=1]="Construct",e))(ii||{}),oi=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(oi||{}),ai=(e=>(e[e.String=0]="String",e[e.Number=1]="Number",e))(ai||{}),si=(e=>(e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Deferred=2]="Deferred",e[e.Function=3]="Function",e[e.Composite=4]="Composite",e[e.Merged=5]="Merged",e))(si||{}),ci=(e=>(e[e.None=0]="None",e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.SubstituteSource=4]="SubstituteSource",e[e.HomomorphicMappedType=8]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=32]="MappedTypeConstraint",e[e.ContravariantConditional=64]="ContravariantConditional",e[e.ReturnType=128]="ReturnType",e[e.LiteralKeyof=256]="LiteralKeyof",e[e.NoConstraints=512]="NoConstraints",e[e.AlwaysStrict=1024]="AlwaysStrict",e[e.MaxValue=2048]="MaxValue",e[e.PriorityImpliesCombination=416]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity",e))(ci||{}),li=(e=>(e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction",e))(li||{}),_i=(e=>(e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True",e))(_i||{}),ui=(e=>(e[e.None=0]="None",e[e.ExportsProperty=1]="ExportsProperty",e[e.ModuleExports=2]="ModuleExports",e[e.PrototypeProperty=3]="PrototypeProperty",e[e.ThisProperty=4]="ThisProperty",e[e.Property=5]="Property",e[e.Prototype=6]="Prototype",e[e.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",e[e.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",e[e.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty",e))(ui||{}),di=(e=>(e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message",e))(di||{});function pi(e,t=!0){const n=di[e.category];return t?n.toLowerCase():n}var fi=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e[e.Node10=2]="Node10",e[e.Node16=3]="Node16",e[e.NodeNext=99]="NodeNext",e[e.Bundler=100]="Bundler",e))(fi||{}),mi=(e=>(e[e.Legacy=1]="Legacy",e[e.Auto=2]="Auto",e[e.Force=3]="Force",e))(mi||{}),gi=(e=>(e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e[e.UseFsEvents=4]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",e))(gi||{}),hi=(e=>(e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e))(hi||{}),yi=(e=>(e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority",e[e.FixedChunkSize=3]="FixedChunkSize",e))(yi||{}),vi=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ES2020=6]="ES2020",e[e.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.Node18=101]="Node18",e[e.Node20=102]="Node20",e[e.NodeNext=199]="NodeNext",e[e.Preserve=200]="Preserve",e))(vi||{}),bi=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(bi||{}),xi=(e=>(e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error",e))(xi||{}),Si=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(Si||{}),ki=(e=>(e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred",e))(ki||{}),Ti=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ES2024=11]="ES2024",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(Ti||{}),Ci=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(Ci||{}),wi=(e=>(e[e.None=0]="None",e[e.Recursive=1]="Recursive",e))(wi||{}),Ni=(e=>(e[e.EOF=-1]="EOF",e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e.replacementCharacter=65533]="replacementCharacter",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab",e))(Ni||{}),Di=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(Di||{}),Ei=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(Ei||{}),Fi=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(Fi||{}),Pi=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(Pi||{}),Ai=(e=>(e[e.None=0]="None",e[e.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=2]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",e[e.Immutable=8]="Immutable",e[e.IndirectCall=16]="IndirectCall",e[e.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",e))(Ai||{}),Ii={Classes:2,ForOf:2,Generators:2,Iteration:2,SpreadElements:2,RestElements:2,TaggedTemplates:2,DestructuringAssignment:2,BindingPatterns:2,ArrowFunctions:2,BlockScopedVariables:2,ObjectAssign:2,RegularExpressionFlagsUnicode:2,RegularExpressionFlagsSticky:2,Exponentiation:3,AsyncFunctions:4,ForAwaitOf:5,AsyncGenerators:5,AsyncIteration:5,ObjectSpreadRest:5,RegularExpressionFlagsDotAll:5,BindinglessCatch:6,BigInt:7,NullishCoalesce:7,OptionalChaining:7,LogicalAssignment:8,TopLevelAwait:9,ClassFields:9,PrivateNamesAndClassStaticBlocks:9,RegularExpressionFlagsHasIndices:9,ShebangComments:10,RegularExpressionFlagsUnicodeSets:11,UsingAndAwaitUsing:99,ClassAndClassElementDecorators:99},Oi=(e=>(e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",e[e.Metadata=16]="Metadata",e[e.Param=32]="Param",e[e.Awaiter=64]="Awaiter",e[e.Generator=128]="Generator",e[e.Values=256]="Values",e[e.Read=512]="Read",e[e.SpreadArray=1024]="SpreadArray",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.ImportStar=65536]="ImportStar",e[e.ImportDefault=131072]="ImportDefault",e[e.MakeTemplateObject=262144]="MakeTemplateObject",e[e.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",e[e.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",e[e.SetFunctionName=4194304]="SetFunctionName",e[e.PropKey=8388608]="PropKey",e[e.AddDisposableResourceAndDisposeResources=16777216]="AddDisposableResourceAndDisposeResources",e[e.RewriteRelativeImportExtension=33554432]="RewriteRelativeImportExtension",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=16777216]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes",e))(Oi||{}),Li=(e=>(e[e.SourceFile=0]="SourceFile",e[e.Expression=1]="Expression",e[e.IdentifierName=2]="IdentifierName",e[e.MappedTypeParameter=3]="MappedTypeParameter",e[e.Unspecified=4]="Unspecified",e[e.EmbeddedStatement=5]="EmbeddedStatement",e[e.JsxAttributeValue=6]="JsxAttributeValue",e[e.ImportTypeNodeAttributes=7]="ImportTypeNodeAttributes",e))(Li||{}),ji=(e=>(e[e.Parentheses=1]="Parentheses",e[e.TypeAssertions=2]="TypeAssertions",e[e.NonNullAssertions=4]="NonNullAssertions",e[e.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",e[e.ExpressionsWithTypeArguments=16]="ExpressionsWithTypeArguments",e[e.Satisfies=32]="Satisfies",e[e.Assertions=38]="Assertions",e[e.All=63]="All",e[e.ExcludeJSDocTypeAssertion=-2147483648]="ExcludeJSDocTypeAssertion",e))(ji||{}),Mi=(e=>(e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",e))(Mi||{}),Ri=(e=>(e[e.None=0]="None",e[e.SingleLine=0]="SingleLine",e[e.MultiLine=1]="MultiLine",e[e.PreserveLines=2]="PreserveLines",e[e.LinesMask=3]="LinesMask",e[e.NotDelimited=0]="NotDelimited",e[e.BarDelimited=4]="BarDelimited",e[e.AmpersandDelimited=8]="AmpersandDelimited",e[e.CommaDelimited=16]="CommaDelimited",e[e.AsteriskDelimited=32]="AsteriskDelimited",e[e.DelimitersMask=60]="DelimitersMask",e[e.AllowTrailingComma=64]="AllowTrailingComma",e[e.Indented=128]="Indented",e[e.SpaceBetweenBraces=256]="SpaceBetweenBraces",e[e.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",e[e.Braces=1024]="Braces",e[e.Parenthesis=2048]="Parenthesis",e[e.AngleBrackets=4096]="AngleBrackets",e[e.SquareBrackets=8192]="SquareBrackets",e[e.BracketsMask=15360]="BracketsMask",e[e.OptionalIfUndefined=16384]="OptionalIfUndefined",e[e.OptionalIfEmpty=32768]="OptionalIfEmpty",e[e.Optional=49152]="Optional",e[e.PreferNewLine=65536]="PreferNewLine",e[e.NoTrailingNewLine=131072]="NoTrailingNewLine",e[e.NoInterveningComments=262144]="NoInterveningComments",e[e.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",e[e.SingleElement=1048576]="SingleElement",e[e.SpaceAfterList=2097152]="SpaceAfterList",e[e.Modifiers=2359808]="Modifiers",e[e.HeritageClauses=512]="HeritageClauses",e[e.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",e[e.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",e[e.SingleLineTupleTypeElements=528]="SingleLineTupleTypeElements",e[e.MultiLineTupleTypeElements=657]="MultiLineTupleTypeElements",e[e.UnionTypeConstituents=516]="UnionTypeConstituents",e[e.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",e[e.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",e[e.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",e[e.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",e[e.ImportAttributes=526226]="ImportAttributes",e[e.ImportClauseEntries=526226]="ImportClauseEntries",e[e.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",e[e.CommaListElements=528]="CommaListElements",e[e.CallExpressionArguments=2576]="CallExpressionArguments",e[e.NewExpressionArguments=18960]="NewExpressionArguments",e[e.TemplateExpressionSpans=262144]="TemplateExpressionSpans",e[e.SingleLineBlockStatements=768]="SingleLineBlockStatements",e[e.MultiLineBlockStatements=129]="MultiLineBlockStatements",e[e.VariableDeclarationList=528]="VariableDeclarationList",e[e.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",e[e.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",e[e.ClassHeritageClauses=0]="ClassHeritageClauses",e[e.ClassMembers=129]="ClassMembers",e[e.InterfaceMembers=129]="InterfaceMembers",e[e.EnumMembers=145]="EnumMembers",e[e.CaseBlockClauses=129]="CaseBlockClauses",e[e.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",e[e.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",e[e.JsxElementAttributes=262656]="JsxElementAttributes",e[e.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",e[e.HeritageClauseTypes=528]="HeritageClauseTypes",e[e.SourceFileStatements=131073]="SourceFileStatements",e[e.Decorators=2146305]="Decorators",e[e.TypeArguments=53776]="TypeArguments",e[e.TypeParameters=53776]="TypeParameters",e[e.Parameters=2576]="Parameters",e[e.IndexSignatureParameters=8848]="IndexSignatureParameters",e[e.JSDocComment=33]="JSDocComment",e))(Ri||{}),Bi=(e=>(e[e.None=0]="None",e[e.TripleSlashXML=1]="TripleSlashXML",e[e.SingleLine=2]="SingleLine",e[e.MultiLine=4]="MultiLine",e[e.All=7]="All",e[e.Default=7]="Default",e))(Bi||{}),Ji={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}},zi=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))(zi||{});function qi(e){let t=5381;for(let n=0;n(e[e.Created=0]="Created",e[e.Changed=1]="Changed",e[e.Deleted=2]="Deleted",e))(Vi||{}),Wi=(e=>(e[e.High=2e3]="High",e[e.Medium=500]="Medium",e[e.Low=250]="Low",e))(Wi||{}),$i=new Date(0);function Ki(e,t){return e.getModifiedTime(t)||$i}function Hi(e){return{250:e.Low,500:e.Medium,2e3:e.High}}var Gi={Low:32,Medium:64,High:256},Xi=Hi(Gi),Qi=Hi(Gi);function Yi(e,t,n,r,i){let o=n;for(let s=t.length;r&&s;a(),s--){const a=t[n];if(!a)continue;if(a.isClosed){t[n]=void 0;continue}r--;const s=no(a,Ki(e,a.fileName));a.isClosed?t[n]=void 0:(null==i||i(a,n,s),t[n]&&(o{o.isClosed=!0,Gt(t,o)}}};function a(e){const t=[];return t.pollingInterval=e,t.pollIndex=0,t.pollScheduled=!1,t}function s(e,t){t.pollIndex=l(t,t.pollingInterval,t.pollIndex,Xi[t.pollingInterval]),t.length?p(t.pollingInterval):(gn.assert(0===t.pollIndex),t.pollScheduled=!1)}function c(e,t){l(n,250,0,n.length),s(0,t),!t.pollScheduled&&n.length&&p(250)}function l(t,r,i,o){return Yi(e,t,i,o,function(e,i,o){o?(e.unchangedPolls=0,t!==n&&(t[i]=void 0,a=e,n.push(a),d(250))):e.unchangedPolls!==Qi[r]?e.unchangedPolls++:t===n?(e.unchangedPolls=1,t[i]=void 0,u(e,250)):2e3!==r&&(e.unchangedPolls++,t[i]=void 0,u(e,250===r?500:2e3));var a})}function _(e){switch(e){case 250:return r;case 500:return i;case 2e3:return o}}function u(e,t){_(t).push(e),d(t)}function d(e){_(e).pollScheduled||p(e)}function p(t){_(t).pollScheduled=e.setTimeout(250===t?c:s,t,250===t?"pollLowPollingIntervalQueue":"pollPollingIntervalQueue",_(t))}}function eo(e,t,n,r){const i=Qe(),o=r?new Map:void 0,a=new Map,s=Xt(t);return function(t,r,c,l){const _=s(t);1===i.add(_,r).length&&o&&o.set(_,n(t)||$i);const u=Lo(_)||".",d=a.get(u)||function(t,r,c){const l=e(t,1,(e,r)=>{if(!it(r))return;const a=$o(r,t),c=s(a),l=a&&i.get(c);if(l){let t,r=1;if(o){const i=o.get(c);if("change"===e&&(t=n(a)||$i,t.getTime()===i.getTime()))return;t||(t=n(a)||$i),o.set(c,t),i===$i?r=0:t===$i&&(r=2)}for(const e of l)e(a,r,t)}},!1,500,c);return l.referenceCount=0,a.set(r,l),l}(Lo(t)||".",u,l);return d.referenceCount++,{close:()=>{1===d.referenceCount?(d.close(),a.delete(u)):d.referenceCount--,i.remove(_,r)}}}}function to(e,t,n,r,i){const o=Xt(t)(n),a=e.get(o);return a?a.callbacks.push(r):e.set(o,{watcher:i((t,n,r)=>{var i;return null==(i=e.get(o))?void 0:i.callbacks.slice().forEach(e=>e(t,n,r))}),callbacks:[r]}),{close:()=>{const t=e.get(o);t&&$t(t.callbacks,r)&&!t.callbacks.length&&(e.delete(o),YU(t))}}}function no(e,t){const n=e.mtime.getTime(),r=t.getTime();return n!==r&&(e.mtime=t,e.callback(e.fileName,ro(n,r),t),!0)}function ro(e,t){return 0===e?0:0===t?2:1}var io=["/node_modules/.","/.git","/.#"],oo=ct;function ao(e){return oo(e)}function so(e){oo=e}function co({watchDirectory:e,useCaseSensitiveFileNames:t,getCurrentDirectory:n,getAccessibleSortedChildDirectories:r,fileSystemEntryExists:i,realpath:o,setTimeout:a,clearTimeout:s}){const c=new Map,l=Qe(),_=new Map;let u;const d=Pt(!t),f=Xt(t);return(t,n,r,i)=>r?m(t,i,n):e(t,n,r,i);function m(t,n,r,o){const d=f(t);let m=c.get(d);m?m.refCount++:(m={watcher:e(t,e=>{var r;x(e,n)||((null==n?void 0:n.synchronousWatchDirectory)?((null==(r=c.get(d))?void 0:r.targetWatcher)||g(t,d,e),b(t,d,n)):function(e,t,n,r){const o=c.get(t);if(o&&i(e,1))return void function(e,t,n,r){const i=_.get(t);i?i.fileNames.push(n):_.set(t,{dirName:e,options:r,fileNames:[n]});u&&(s(u),u=void 0);u=a(h,1e3,"timerToUpdateChildWatches")}(e,t,n,r);g(e,t,n),v(o),y(o)}(t,d,e,n))},!1,n),refCount:1,childWatches:p,targetWatcher:void 0,links:void 0},c.set(d,m),b(t,d,n)),o&&(m.links??(m.links=new Set)).add(o);const S=r&&{dirName:t,callback:r};return S&&l.add(d,S),{dirName:t,close:()=>{var e;const t=gn.checkDefined(c.get(d));S&&l.remove(d,S),o&&(null==(e=t.links)||e.delete(o)),t.refCount--,t.refCount||(c.delete(d),t.links=void 0,YU(t),v(t),t.childWatches.forEach(_x))}}}function g(e,t,n,r){var i,o;let a,s;it(n)?a=n:s=n,l.forEach((e,n)=>{if((!s||!0!==s.get(n))&&(n===t||en(t,n)&&t[n.length]===ho))if(s)if(r){const e=s.get(n);e?e.push(...r):s.set(n,r.slice())}else s.set(n,!0);else e.forEach(({callback:e})=>e(a))}),null==(o=null==(i=c.get(t))?void 0:i.links)||o.forEach(t=>{const n=n=>Uo(t,_a(e,n,f));s?g(t,f(t),s,null==r?void 0:r.map(n)):g(t,f(t),n(a))})}function h(){var e;u=void 0,ao(`sysLog:: onTimerToUpdateChildWatches:: ${_.size}`);const t=Hn(),n=new Map;for(;!u&&_.size;){const t=_.entries().next();gn.assert(!t.done);const{value:[r,{dirName:i,options:o,fileNames:a}]}=t;_.delete(r);const s=b(i,r,o);(null==(e=c.get(r))?void 0:e.targetWatcher)||g(i,r,n,s?void 0:a)}ao(`sysLog:: invokingWatchers:: Elapsed:: ${Hn()-t}ms:: ${_.size}`),l.forEach((e,t)=>{const r=n.get(t);r&&e.forEach(({callback:e,dirName:t})=>{nt(r)?r.forEach(e):e(t)})});ao(`sysLog:: Elapsed:: ${Hn()-t}ms:: onTimerToUpdateChildWatches:: ${_.size} ${u}`)}function y(e){if(!e)return;const t=e.childWatches;e.childWatches=p;for(const e of t)e.close(),y(c.get(f(e.dirName)))}function v(e){(null==e?void 0:e.targetWatcher)&&(e.targetWatcher.close(),e.targetWatcher=void 0)}function b(e,t,n){const a=c.get(t);if(!a)return!1;const s=Ko(o(e));let l,_;return 0===d(s,e)?l=_n(i(e,1)?U(r(e),t=>{const r=$o(t,e);return x(r,n)||0!==d(r,Ko(o(r)))?void 0:r}):p,a.childWatches,(e,t)=>d(e,t.dirName),function(e){u(m(e,n))},_x,u):a.targetWatcher&&0===d(s,a.targetWatcher.dirName)?(l=!1,gn.assert(a.childWatches===p)):(v(a),a.targetWatcher=m(s,n,void 0,e),a.childWatches.forEach(_x),l=!0),a.childWatches=_||p,l;function u(e){(_||(_=[])).push(e)}}function x(e,r){return X(io,n=>function(e,n){return!!e.includes(n)||!t&&f(e).includes(n)}(e,n))||_o(e,r,t,n)}}var lo=(e=>(e[e.File=0]="File",e[e.Directory=1]="Directory",e))(lo||{});function _o(e,t,n,r){return((null==t?void 0:t.excludeDirectories)||(null==t?void 0:t.excludeFiles))&&(Xj(e,null==t?void 0:t.excludeFiles,n,r())||Xj(e,null==t?void 0:t.excludeDirectories,n,r()))}function uo(e,t,n,r,i){return(o,a)=>{if("rename"===o){const o=a?Ko(Uo(e,a)):e;a&&_o(o,n,r,i)||t(o)}}}function po({pollingWatchFileWorker:e,getModifiedTime:t,setTimeout:n,clearTimeout:r,fsWatchWorker:i,fileSystemEntryExists:o,useCaseSensitiveFileNames:a,getCurrentDirectory:s,fsSupportsRecursiveFsWatch:c,getAccessibleSortedChildDirectories:l,realpath:_,tscWatchFile:u,useNonPollingWatchers:d,tscWatchDirectory:p,inodeWatching:f,fsWatchWithTimestamp:m,sysLog:g}){const h=new Map,y=new Map,v=new Map;let b,x,S,k,T=!1;return{watchFile:C,watchDirectory:function(e,t,i,u){if(c)return P(e,1,uo(e,t,u,a,s),i,500,QU(u));k||(k=co({useCaseSensitiveFileNames:a,getCurrentDirectory:s,fileSystemEntryExists:o,getAccessibleSortedChildDirectories:l,watchDirectory:E,realpath:_,setTimeout:n,clearTimeout:r}));return k(e,t,i,u)}};function C(e,n,r,i){i=function(e,t){if(e&&void 0!==e.watchFile)return e;switch(u){case"PriorityPollingInterval":return{watchFile:1};case"DynamicPriorityPolling":return{watchFile:2};case"UseFsEvents":return D(4,1,e);case"UseFsEventsWithFallbackDynamicPolling":return D(4,2,e);case"UseFsEventsOnParentDirectory":t=!0;default:return t?D(5,1,e):{watchFile:4}}}(i,d);const o=gn.checkDefined(i.watchFile);switch(o){case 0:return F(e,n,250,void 0);case 1:return F(e,n,r,void 0);case 2:return w()(e,n,r,void 0);case 3:return N()(e,n,void 0,void 0);case 4:return P(e,0,function(e,t,n){return(r,i,o)=>{"rename"===r?(o||(o=n(e)||$i),t(e,o!==$i?0:2,o)):t(e,1,o)}}(e,n,t),!1,r,QU(i));case 5:return S||(S=eo(P,a,t,m)),S(e,n,r,QU(i));default:gn.assertNever(o)}}function w(){return b||(b=Zi({getModifiedTime:t,setTimeout:n}))}function N(){return x||(x=function(e){const t=[];let n,r=0;return function(n,r){const i={fileName:n,callback:r,mtime:Ki(e,n)};return t.push(i),o(),{close:()=>{i.isClosed=!0,Gt(t,i)}}};function i(){n=void 0,r=Yi(e,t,r,Xi[250]),o()}function o(){t.length&&!n&&(n=e.setTimeout(i,2e3,"pollQueue"))}}({getModifiedTime:t,setTimeout:n}))}function D(e,t,n){const r=null==n?void 0:n.fallbackPolling;return{watchFile:e,fallbackPolling:void 0===r?t:r}}function E(e,t,n,r){gn.assert(!n);const i=function(e){if(e&&void 0!==e.watchDirectory)return e;switch(p){case"RecursiveDirectoryUsingFsWatchFile":return{watchDirectory:1};case"RecursiveDirectoryUsingDynamicPriorityPolling":return{watchDirectory:2};default:const t=null==e?void 0:e.fallbackPolling;return{watchDirectory:0,fallbackPolling:void 0!==t?t:void 0}}}(r),o=gn.checkDefined(i.watchDirectory);switch(o){case 1:return F(e,()=>t(e),500,void 0);case 2:return w()(e,()=>t(e),500,void 0);case 3:return N()(e,()=>t(e),void 0,void 0);case 0:return P(e,1,uo(e,t,r,a,s),n,500,QU(i));default:gn.assertNever(o)}}function F(t,n,r,i){return to(h,a,t,n,n=>e(t,n,r,i))}function P(e,n,r,s,c,l){return to(s?v:y,a,e,r,r=>function(e,n,r,a,s,c){let l,_;f&&(l=e.substring(e.lastIndexOf(ho)),_=l.slice(ho.length));let u=o(e,n)?p():v();return{close:()=>{u&&(u.close(),u=void 0)}};function d(t){u&&(g(`sysLog:: ${e}:: Changing watcher to ${t===p?"Present":"Missing"}FileSystemEntryWatcher`),u.close(),u=t())}function p(){if(T)return g(`sysLog:: ${e}:: Defaulting to watchFile`),y();try{const t=(1!==n&&m?A:i)(e,a,f?h:r);return t.on("error",()=>{r("rename",""),d(v)}),t}catch(t){return T||(T="ENOSPC"===t.code),g(`sysLog:: ${e}:: Changing to watchFile`),y()}}function h(n,i){let o;if(i&&qt(i,"~")&&(o=i,i=i.slice(0,i.length-1)),"rename"!==n||i&&i!==_&&!qt(i,l))o&&r(n,o),r(n,i);else{const a=t(e)||$i;o&&r(n,o,a),r(n,i,a),f?d(a===$i?v:p):a===$i&&d(v)}}function y(){return C(e,function(e){return(t,n,r)=>e(1===n?"change":"rename","",r)}(r),s,c)}function v(){return C(e,(n,i,o)=>{0===i&&(o||(o=t(e)||$i),o!==$i&&(r("rename","",o),d(p)))},s,c)}}(e,n,r,s,c,l))}function A(e,n,r){let o=t(e)||$i;return i(e,n,(n,i,a)=>{"change"===n&&(a||(a=t(e)||$i),a.getTime()===o.getTime())||(o=a||t(e)||$i,r(n,i,o))})}}function fo(e){const t=e.writeFile;e.writeFile=(n,r,i)=>cv(n,r,!!i,(n,r,i)=>t.call(e,n,r,i),t=>e.createDirectory(t),t=>e.directoryExists(t))}var mo=(()=>{let t;return mn()&&(t=function(){const t=/^native |^\([^)]+\)$|^(?:internal[\\/]|[\w\s]+(?:\.js)?$)/,o=e("fs"),a=e("path"),s=e("os");let c,u;try{c=e("crypto")}catch{c=void 0}let d="./profile.cpuprofile";const p="darwin"===n.platform,f="linux"===n.platform||p,m={throwIfNoEntry:!1},g=s.platform(),h="win32"!==g&&"win64"!==g&&!P((C=l,C.replace(/\w/g,e=>{const t=e.toUpperCase();return e===t?e.toLowerCase():t}))),y=o.realpathSync.native?"win32"===n.platform?function(e){return e.length<260?o.realpathSync.native(e):o.realpathSync(e)}:o.realpathSync.native:o.realpathSync,v=l.endsWith("sys.js")?a.join(a.dirname(_),"__fake__.js"):l,b="win32"===n.platform||p,x=ht(()=>n.cwd()),{watchFile:S,watchDirectory:k}=po({pollingWatchFileWorker:function(e,t,n){let r;return o.watchFile(e,{persistent:!0,interval:n},i),{close:()=>o.unwatchFile(e,i)};function i(n,i){const o=0===+i.mtime||2===r;if(0===+n.mtime){if(o)return;r=2}else if(o)r=0;else{if(+n.mtime===+i.mtime)return;r=1}t(e,r,n.mtime)}},getModifiedTime:I,setTimeout:setTimeout,clearTimeout:clearTimeout,fsWatchWorker:function(e,t,n){return o.watch(e,b?{persistent:!0,recursive:!!t}:{persistent:!0},n)},useCaseSensitiveFileNames:h,getCurrentDirectory:x,fileSystemEntryExists:F,fsSupportsRecursiveFsWatch:b,getAccessibleSortedChildDirectories:e=>E(e).directories,realpath:A,tscWatchFile:n.env.TSC_WATCHFILE,useNonPollingWatchers:!!n.env.TSC_NONPOLLING_WATCHER,tscWatchDirectory:n.env.TSC_WATCHDIRECTORY,inodeWatching:f,fsWatchWithTimestamp:p,sysLog:ao}),T={args:n.argv.slice(2),newLine:s.EOL,useCaseSensitiveFileNames:h,write(e){n.stdout.write(e)},getWidthOfTerminal:()=>n.stdout.columns,writeOutputIsTTY:()=>n.stdout.isTTY,readFile:function(e,t){let n;try{n=o.readFileSync(e)}catch{return}let r=n.length;if(r>=2&&254===n[0]&&255===n[1]){r&=-2;for(let e=0;e=2&&255===n[0]&&254===n[1]?n.toString("utf16le",2):r>=3&&239===n[0]&&187===n[1]&&191===n[2]?n.toString("utf8",3):n.toString("utf8")},writeFile:function(e,t,n){let r;n&&(t="\ufeff"+t);try{r=o.openSync(e,"w"),o.writeSync(r,t,void 0,"utf8")}finally{void 0!==r&&o.closeSync(r)}},watchFile:S,watchDirectory:k,preferNonRecursiveWatch:!b,resolvePath:e=>a.resolve(e),fileExists:P,directoryExists:function(e){return F(e,1)},getAccessibleFileSystemEntries:E,createDirectory(e){if(!T.directoryExists(e))try{o.mkdirSync(e)}catch(e){if("EEXIST"!==e.code)throw e}},getExecutingFilePath:()=>v,getCurrentDirectory:x,getDirectories:function(e){return E(e).directories.slice()},getEnvironmentVariable:e=>n.env[e]||"",readDirectory:function(e,t,r,i,o){return Ck(e,t,r,i,h,n.cwd(),o,E,A)},getModifiedTime:I,setModifiedTime:function(e,t){try{o.utimesSync(e,t,t)}catch{return}},deleteFile:function(e){try{return o.unlinkSync(e)}catch{return}},createHash:c?O:qi,createSHA256Hash:c?O:void 0,getMemoryUsage:()=>(r.gc&&r.gc(),n.memoryUsage().heapUsed),getFileSize(e){const t=w(e);return(null==t?void 0:t.isFile())?t.size:0},exit(e){N(()=>n.exit(e))},enableCPUProfiler:function(t,n){if(u)return n(),!1;const r=e("inspector");if(!r||!r.Session)return n(),!1;const i=new r.Session;return i.connect(),i.post("Profiler.enable",()=>{i.post("Profiler.start",()=>{u=i,d=t,n()})}),!0},disableCPUProfiler:N,cpuProfilingEnabled:()=>!!u||D(n.execArgv,"--cpu-prof")||D(n.execArgv,"--prof"),realpath:A,debugMode:!!n.env.NODE_INSPECTOR_IPC||!!n.env.VSCODE_INSPECTOR_OPTIONS||X(n.execArgv,e=>/^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(e))||!!n.recordreplay,tryEnableSourceMapsForHost(){try{e("source-map-support").install()}catch{}},setTimeout:setTimeout,clearTimeout:clearTimeout,clearScreen:()=>{n.stdout.write("")},setBlocking:()=>{var e;const t=null==(e=n.stdout)?void 0:e._handle;t&&t.setBlocking&&t.setBlocking(!0)},base64decode:e=>i.from(e,"base64").toString("utf8"),base64encode:e=>i.from(e).toString("base64"),require:(t,n)=>{try{const r=YM(n,t,T);return{module:e(r),modulePath:r,error:void 0}}catch(e){return{module:void 0,modulePath:void 0,error:e}}}};var C;return T;function w(e){try{return o.statSync(e,m)}catch{return}}function N(e){if(u&&"stopping"!==u){const r=u;return u.post("Profiler.stop",(i,{profile:s})=>{var c;if(!i){(null==(c=w(d))?void 0:c.isDirectory())&&(d=a.join(d,`${(new Date).toISOString().replace(/:/g,"-")}+P${n.pid}.cpuprofile`));try{o.mkdirSync(a.dirname(d),{recursive:!0})}catch{}o.writeFileSync(d,JSON.stringify(function(e){let n=0;const r=new Map,i=zo(a.dirname(v)),o=`file://${1===Oo(i)?"":"/"}${i}`;for(const i of e.nodes)if(i.callFrame.url){const e=zo(i.callFrame.url);sa(o,e,h)?i.callFrame.url=pa(o,e,o,Xt(h),!0):t.test(e)||(i.callFrame.url=(r.has(e)?r:r.set(e,`external${n}.js`)).get(e),n++)}return e}(s)))}u=void 0,r.disconnect(),e()}),u="stopping",!0}return e(),!1}function E(e){try{const t=o.readdirSync(e||".",{withFileTypes:!0}),n=[],r=[];for(const i of t){const t="string"==typeof i?i:i.name;if("."===t||".."===t)continue;let o;if("string"==typeof i||i.isSymbolicLink()){if(o=w(Uo(e,t)),!o)continue}else o=i;o.isFile()?n.push(t):o.isDirectory()&&r.push(t)}return n.sort(),r.sort(),{files:n,directories:r}}catch{return uT}}function F(e,t){const n=w(e);if(!n)return!1;switch(t){case 0:return n.isFile();case 1:return n.isDirectory();default:return!1}}function P(e){return F(e,0)}function A(e){try{return y(e)}catch{return e}}function I(e){var t;return null==(t=w(e))?void 0:t.mtime}function O(e){const t=c.createHash("sha256");return t.update(e),t.digest("hex")}}()),t&&fo(t),t})();function go(e){mo=e}mo&&mo.getEnvironmentVariable&&(!function(e){if(!e.getEnvironmentVariable)return;const t=function(e,t){const r=n("TSC_WATCH_POLLINGINTERVAL");return!!r&&(i("Low"),i("Medium"),i("High"),!0);function i(e){t[e]=r[e]||t[e]}}(0,Wi);function n(t){let n;return r("Low"),r("Medium"),r("High"),n;function r(r){const i=function(t,n){return e.getEnvironmentVariable(`${t}_${n.toUpperCase()}`)}(t,r);i&&((n||(n={}))[r]=Number(i))}}function r(e,r){const i=n(e);return(t||i)&&Hi(i?{...r,...i}:r)}Xi=r("TSC_WATCH_POLLINGCHUNKSIZE",Gi)||Xi,Qi=r("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",Gi)||Qi}(mo),gn.setAssertionLevel(/^development$/i.test(mo.getEnvironmentVariable("NODE_ENV"))?1:0)),mo&&mo.debugMode&&(gn.isDebugging=!0);var ho="/",yo="\\",vo="://",bo=/\\/g;function xo(e){return 47===e||92===e}function So(e){return Io(e)<0}function ko(e){return Io(e)>0}function To(e){const t=Io(e);return t>0&&t===e.length}function Co(e){return 0!==Io(e)}function wo(e){return/^\.\.?(?:$|[\\/])/.test(e)}function No(e){return!Co(e)&&!wo(e)}function Do(e){return jo(e).includes(".")}function Eo(e,t){return e.length>t.length&&qt(e,t)}function Fo(e,t){for(const n of t)if(Eo(e,n))return!0;return!1}function Po(e){return e.length>0&&xo(e.charCodeAt(e.length-1))}function Ao(e){return e>=97&&e<=122||e>=65&&e<=90}function Io(e){if(!e)return 0;const t=e.charCodeAt(0);if(47===t||92===t){if(e.charCodeAt(1)!==t)return 1;const n=e.indexOf(47===t?ho:yo,2);return n<0?e.length:n+1}if(Ao(t)&&58===e.charCodeAt(1)){const t=e.charCodeAt(2);if(47===t||92===t)return 3;if(2===e.length)return 2}const n=e.indexOf(vo);if(-1!==n){const t=n+vo.length,r=e.indexOf(ho,t);if(-1!==r){const i=e.slice(0,n),o=e.slice(t,r);if("file"===i&&(""===o||"localhost"===o)&&Ao(e.charCodeAt(r+1))){const t=function(e,t){const n=e.charCodeAt(t);if(58===n)return t+1;if(37===n&&51===e.charCodeAt(t+1)){const n=e.charCodeAt(t+2);if(97===n||65===n)return t+3}return-1}(e,r+2);if(-1!==t){if(47===e.charCodeAt(t))return~(t+1);if(t===e.length)return~t}}return~(r+1)}return~e.length}return 0}function Oo(e){const t=Io(e);return t<0?~t:t}function Lo(e){const t=Oo(e=zo(e));return t===e.length?e:(e=Qo(e)).slice(0,Math.max(t,e.lastIndexOf(ho)))}function jo(e,t,n){if(Oo(e=zo(e))===e.length)return"";const r=(e=Qo(e)).slice(Math.max(Oo(e),e.lastIndexOf(ho)+1)),i=void 0!==t&&void 0!==n?Ro(r,t,n):void 0;return i?r.slice(0,r.length-i.length):r}function Mo(e,t,n){if(en(t,".")||(t="."+t),e.length>=t.length&&46===e.charCodeAt(e.length-t.length)){const r=e.slice(e.length-t.length);if(n(r,t))return r}}function Ro(e,t,n){if(t)return function(e,t,n){if("string"==typeof t)return Mo(e,t,n)||"";for(const r of t){const t=Mo(e,r,n);if(t)return t}return""}(Qo(e),t,n?xt:St);const r=jo(e),i=r.lastIndexOf(".");return i>=0?r.substring(i):""}function Bo(e,t=""){return function(e,t){const n=e.substring(0,t),r=e.substring(t).split(ho);return r.length&&!ke(r)&&r.pop(),[n,...r]}(e=Uo(t,e),Oo(e))}function Jo(e,t){if(0===e.length)return"";return(e[0]&&Yo(e[0]))+e.slice(1,t).join(ho)}function zo(e){return e.includes("\\")?e.replace(bo,ho):e}function qo(e){if(!X(e))return[];const t=[e[0]];for(let n=1;n1){if(".."!==t[t.length-1]){t.pop();continue}}else if(t[0])continue;t.push(r)}}return t}function Uo(e,...t){e&&(e=zo(e));for(let n of t)n&&(n=zo(n),e=e&&0===Oo(n)?Yo(e)+n:n);return e}function Vo(e,...t){return Ko(X(t)?Uo(e,...t):zo(e))}function Wo(e,t){return qo(Bo(e,t))}function $o(e,t){let n=Oo(e);0===n&&t?n=Oo(e=Uo(t,e)):e=zo(e);const r=Ho(e);if(void 0!==r)return r.length>n?Qo(r):r;const i=e.length,o=e.substring(0,n);let a,s=n,c=s,l=s,_=0!==n;for(;sc&&(a??(a=e.substring(0,c-1)),c=s);let r=e.indexOf(ho,s+1);-1===r&&(r=i);const u=r-c;if(1===u&&46===e.charCodeAt(s))a??(a=e.substring(0,l));else if(2===u&&46===e.charCodeAt(s)&&46===e.charCodeAt(s+1))if(_)if(void 0===a)a=l-2>=0?e.substring(0,Math.max(n,e.lastIndexOf(ho,l-2))):e.substring(0,l);else{const e=a.lastIndexOf(ho);a=-1!==e?a.substring(0,Math.max(n,e)):o,a.length===n&&(_=0!==n)}else void 0!==a?a+=a.length===n?"..":"/..":l=s+2;else void 0!==a?(a.length!==n&&(a+=ho),_=!0,a+=e.substring(c,r)):(_=!0,l=r);s=r+1}return a??(i>n?Qo(e):e)}function Ko(e){let t=Ho(e=zo(e));return void 0!==t?t:(t=$o(e,""),t&&Po(e)?Yo(t):t)}function Ho(e){if(!na.test(e))return e;let t=e.replace(/\/\.\//g,"/");return t.startsWith("./")&&(t=t.slice(2)),t===e||(e=t,na.test(e))?void 0:e}function Go(e,t){return 0===(n=Wo(e,t)).length?"":n.slice(1).join(ho);var n}function Xo(e,t,n){return n(ko(e)?Ko(e):$o(e,t))}function Qo(e){return Po(e)?e.substr(0,e.length-1):e}function Yo(e){return Po(e)?e:e+ho}function Zo(e){return Co(e)||wo(e)?e:"./"+e}function ea(e,t,n,r){const i=void 0!==n&&void 0!==r?Ro(e,n,r):Ro(e);return i?e.slice(0,e.length-i.length)+(en(t,".")?t:"."+t):e}function ta(e,t){const n=kO(e);return n?e.slice(0,e.length-n.length)+(en(t,".")?t:"."+t):ea(e,t)}var na=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function ra(e,t,n){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;const r=e.substring(0,Oo(e)),i=t.substring(0,Oo(t)),o=Dt(r,i);if(0!==o)return o;const a=e.substring(r.length),s=t.substring(i.length);if(!na.test(a)&&!na.test(s))return n(a,s);const c=qo(Bo(e)),l=qo(Bo(t)),_=Math.min(c.length,l.length);for(let e=1;e<_;e++){const t=n(c[e],l[e]);if(0!==t)return t}return Tt(c.length,l.length)}function ia(e,t){return ra(e,t,Ft)}function oa(e,t){return ra(e,t,Dt)}function aa(e,t,n,r){return"string"==typeof n?(e=Uo(n,e),t=Uo(n,t)):"boolean"==typeof n&&(r=n),ra(e,t,Pt(r))}function sa(e,t,n,r){if("string"==typeof n?(e=Uo(n,e),t=Uo(n,t)):"boolean"==typeof n&&(r=n),void 0===e||void 0===t)return!1;if(e===t)return!0;const i=qo(Bo(e)),o=qo(Bo(t));if(o.length0==Oo(t)>0,"Paths must either both be absolute or both be relative");return Jo(la(e,t,"boolean"==typeof n&&n?xt:St,"function"==typeof n?n:dt))}function ua(e,t,n){return ko(e)?pa(t,e,t,n,!1):e}function da(e,t,n){return Zo(_a(Lo(e),t,n))}function pa(e,t,n,r,i){const o=la(Vo(n,e),Vo(n,t),St,r),a=o[0];if(i&&ko(a)){const e=a.charAt(0)===ho?"file://":"file:///";o[0]=e+a}return Jo(o)}function fa(e,t){for(;;){const n=t(e);if(void 0!==n)return n;const r=Lo(e);if(r===e)return;e=r}}function ma(e){return qt(e,"/node_modules")}function ga(e,t,n,r,i,o,a){return{code:e,category:t,key:n,message:r,reportsUnnecessary:i,elidedInCompatabilityPyramid:o,reportsDeprecated:a}}var ha={Unterminated_string_literal:ga(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:ga(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:ga(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:ga(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:ga(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:ga(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:ga(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:ga(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:ga(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:ga(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:ga(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:ga(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:ga(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:ga(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:ga(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:ga(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:ga(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:ga(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:ga(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:ga(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:ga(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:ga(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:ga(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:ga(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:ga(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:ga(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:ga(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:ga(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:ga(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:ga(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:ga(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:ga(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:ga(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:ga(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:ga(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:ga(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:ga(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:ga(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:ga(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:ga(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:ga(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:ga(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055","Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:ga(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:ga(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:ga(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:ga(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:ga(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:ga(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:ga(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:ga(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:ga(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:ga(1066,1,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:ga(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:ga(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:ga(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:ga(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:ga(1079,1,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:ga(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:ga(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:ga(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:ga(1091,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:ga(1092,1,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:ga(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:ga(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:ga(1095,1,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:ga(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:ga(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:ga(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:ga(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:ga(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:ga(1101,1,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:ga(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:ga(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:ga(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:ga(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:ga(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:ga(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:ga(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:ga(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:ga(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:ga(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:ga(1113,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:ga(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:ga(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:ga(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name:ga(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:ga(1118,1,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:ga(1119,1,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:ga(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:ga(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:ga(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:ga(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:ga(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:ga(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:ga(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:ga(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:ga(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:ga(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:ga(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:ga(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:ga(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:ga(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:ga(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:ga(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:ga(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:ga(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:ga(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:ga(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:ga(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:ga(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:ga(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:ga(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:ga(1147,1,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:ga(1148,1,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:ga(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_declarations_must_be_initialized:ga(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:ga(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:ga(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:ga(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:ga(1162,1,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:ga(1163,1,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:ga(1164,1,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:ga(1165,1,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type:ga(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:ga(1168,1,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:ga(1169,1,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:ga(1170,1,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:ga(1171,1,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:ga(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:ga(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:ga(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:ga(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:ga(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:ga(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:ga(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:ga(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:ga(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:ga(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:ga(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:ga(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:ga(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:ga(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:ga(1186,1,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:ga(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:ga(1188,1,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:ga(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:ga(1190,1,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:ga(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:ga(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:ga(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:ga(1194,1,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:ga(1195,1,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:ga(1196,1,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:ga(1197,1,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:ga(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:ga(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:ga(1200,1,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:ga(1202,1,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:ga(1203,1,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_0_is_enabled_requires_using_export_type:ga(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:ga(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:ga(1207,1,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:ga(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:ga(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:ga(1211,1,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:ga(1212,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:ga(1213,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:ga(1214,1,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:ga(1215,1,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:ga(1216,1,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:ga(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:ga(1221,1,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:ga(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:ga(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:ga(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:ga(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:ga(1226,1,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:ga(1227,1,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:ga(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:ga(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:ga(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:ga(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:ga(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:ga(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:ga(1234,1,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module:ga(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:ga(1236,1,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:ga(1237,1,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:ga(1238,1,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:ga(1239,1,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:ga(1240,1,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:ga(1241,1,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:ga(1242,1,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:ga(1243,1,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:ga(1244,1,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:ga(1245,1,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:ga(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:ga(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:ga(1248,1,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:ga(1249,1,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5:ga(1250,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:ga(1251,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:ga(1252,1,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."),Abstract_properties_can_only_appear_within_an_abstract_class:ga(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:ga(1254,1,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:ga(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:ga(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:ga(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:ga(1259,1,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:ga(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:ga(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:ga(1262,1,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:ga(1263,1,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:ga(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:ga(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:ga(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:ga(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:ga(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:ga(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:ga(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:ga(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:ga(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:ga(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:ga(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:ga(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:ga(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:ga(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:ga(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:ga(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:ga(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:ga(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:ga(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:ga(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:ga(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:ga(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax:ga(1286,1,"ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286","ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:ga(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:ga(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:ga(1289,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:ga(1290,1,"_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290","'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:ga(1291,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default:ga(1292,1,"_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292","'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve:ga(1293,1,"ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293","ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled:ga(1294,1,"This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294","This syntax is not allowed when 'erasableSyntaxOnly' is enabled."),ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript:ga(1295,1,"ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295","ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest 'package.json' to make this file an ECMAScript module, or adjust your 'verbatimModuleSyntax', 'module', and 'moduleResolution' settings in TypeScript."),with_statements_are_not_allowed_in_an_async_function_block:ga(1300,1,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:ga(1308,1,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:ga(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:ga(1312,1,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:ga(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:ga(1314,1,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:ga(1315,1,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:ga(1316,1,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:ga(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:ga(1318,1,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:ga(1319,1,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:ga(1320,1,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:ga(1321,1,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:ga(1322,1,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext:ga(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve:ga(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'."),Argument_of_dynamic_import_cannot_be_spread_element:ga(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:ga(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:ga(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:ga(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:ga(1329,1,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:ga(1330,1,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:ga(1331,1,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:ga(1332,1,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:ga(1333,1,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:ga(1334,1,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:ga(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:ga(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:ga(1338,1,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:ga(1339,1,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:ga(1340,1,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Class_constructor_may_not_be_an_accessor:ga(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext:ga(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'."),A_label_is_not_allowed_here:ga(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:ga(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:ga(1346,1,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:ga(1347,1,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:ga(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:ga(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:ga(1350,3,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:ga(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:ga(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:ga(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:ga(1354,1,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:ga(1355,1,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:ga(1356,1,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:ga(1357,1,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:ga(1358,1,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:ga(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Type_0_does_not_satisfy_the_expected_type_1:ga(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:ga(1361,1,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:ga(1362,1,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:ga(1363,1,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:ga(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:ga(1365,3,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:ga(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:ga(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:ga(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:ga(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:ga(1375,1,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:ga(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:ga(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:ga(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:ga(1379,1,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:ga(1380,1,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:ga(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:ga(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:ga(1385,1,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:ga(1386,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:ga(1387,1,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:ga(1388,1,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:ga(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:ga(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:ga(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:ga(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:ga(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:ga(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:ga(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:ga(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:ga(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:ga(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:ga(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:ga(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:ga(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:ga(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:ga(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:ga(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:ga(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:ga(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:ga(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:ga(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:ga(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:ga(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:ga(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:ga(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:ga(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:ga(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:ga(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:ga(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:ga(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:ga(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:ga(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:ga(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:ga(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:ga(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:ga(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:ga(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:ga(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:ga(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:ga(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:ga(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:ga(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:ga(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:ga(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:ga(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:ga(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:ga(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:ga(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:ga(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:ga(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:ga(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:ga(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:ga(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:ga(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:ga(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443","Module declaration names may only use ' or \" quoted strings."),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:ga(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:ga(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:ga(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:ga(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:ga(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:ga(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:ga(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:ga(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:ga(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:ga(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",'File is ECMAScript module because \'{0}\' has field "type" with value "module"'),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:ga(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",'File is CommonJS module because \'{0}\' has field "type" whose value is not "module"'),File_is_CommonJS_module_because_0_does_not_have_field_type:ga(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460","File is CommonJS module because '{0}' does not have field \"type\""),File_is_CommonJS_module_because_package_json_was_not_found:ga(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:ga(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:ga(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:ga(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:ga(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:ga(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:ga(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:ga(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:ga(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:ga(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:ga(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:ga(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:ga(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479","The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:ga(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:ga(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481","To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:ga(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:ga(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:ga(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:ga(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:ga(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:ga(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:ga(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:ga(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:ga(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:ga(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:ga(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:ga(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:ga(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:ga(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:ga(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator:ga(1497,1,"Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497","Expression must be enclosed in parentheses to be used as a decorator."),Invalid_syntax_in_decorator:ga(1498,1,"Invalid_syntax_in_decorator_1498","Invalid syntax in decorator."),Unknown_regular_expression_flag:ga(1499,1,"Unknown_regular_expression_flag_1499","Unknown regular expression flag."),Duplicate_regular_expression_flag:ga(1500,1,"Duplicate_regular_expression_flag_1500","Duplicate regular expression flag."),This_regular_expression_flag_is_only_available_when_targeting_0_or_later:ga(1501,1,"This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501","This regular expression flag is only available when targeting '{0}' or later."),The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously:ga(1502,1,"The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502","The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later:ga(1503,1,"Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503","Named capturing groups are only available when targeting 'ES2018' or later."),Subpattern_flags_must_be_present_when_there_is_a_minus_sign:ga(1504,1,"Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504","Subpattern flags must be present when there is a minus sign."),Incomplete_quantifier_Digit_expected:ga(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),Numbers_out_of_order_in_quantifier:ga(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),There_is_nothing_available_for_repetition:ga(1507,1,"There_is_nothing_available_for_repetition_1507","There is nothing available for repetition."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:ga(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),This_regular_expression_flag_cannot_be_toggled_within_a_subpattern:ga(1509,1,"This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509","This regular expression flag cannot be toggled within a subpattern."),k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets:ga(1510,1,"k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510","'\\k' must be followed by a capturing group name enclosed in angle brackets."),q_is_only_available_inside_character_class:ga(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),c_must_be_followed_by_an_ASCII_letter:ga(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:ga(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Expected_a_capturing_group_name:ga(1514,1,"Expected_a_capturing_group_name_1514","Expected a capturing group name."),Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other:ga(1515,1,"Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515","Named capturing groups with the same name must be mutually exclusive to each other."),A_character_class_range_must_not_be_bounded_by_another_character_class:ga(1516,1,"A_character_class_range_must_not_be_bounded_by_another_character_class_1516","A character class range must not be bounded by another character class."),Range_out_of_order_in_character_class:ga(1517,1,"Range_out_of_order_in_character_class_1517","Range out of order in character class."),Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class:ga(1518,1,"Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518","Anything that would possibly match more than a single character is invalid inside a negated character class."),Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead:ga(1519,1,"Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519","Operators must not be mixed within a character class. Wrap it in a nested class instead."),Expected_a_class_set_operand:ga(1520,1,"Expected_a_class_set_operand_1520","Expected a class set operand."),q_must_be_followed_by_string_alternatives_enclosed_in_braces:ga(1521,1,"q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521","'\\q' must be followed by string alternatives enclosed in braces."),A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash:ga(1522,1,"A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522","A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),Expected_a_Unicode_property_name:ga(1523,1,"Expected_a_Unicode_property_name_1523","Expected a Unicode property name."),Unknown_Unicode_property_name:ga(1524,1,"Unknown_Unicode_property_name_1524","Unknown Unicode property name."),Expected_a_Unicode_property_value:ga(1525,1,"Expected_a_Unicode_property_value_1525","Expected a Unicode property value."),Unknown_Unicode_property_value:ga(1526,1,"Unknown_Unicode_property_value_1526","Unknown Unicode property value."),Expected_a_Unicode_property_name_or_value:ga(1527,1,"Expected_a_Unicode_property_name_or_value_1527","Expected a Unicode property name or value."),Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set:ga(1528,1,"Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528","Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),Unknown_Unicode_property_name_or_value:ga(1529,1,"Unknown_Unicode_property_name_or_value_1529","Unknown Unicode property name or value."),Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:ga(1530,1,"Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530","Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces:ga(1531,1,"_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531","'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),There_is_no_capturing_group_named_0_in_this_regular_expression:ga(1532,1,"There_is_no_capturing_group_named_0_in_this_regular_expression_1532","There is no capturing group named '{0}' in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression:ga(1533,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533","This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."),This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression:ga(1534,1,"This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534","This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."),This_character_cannot_be_escaped_in_a_regular_expression:ga(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:ga(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:ga(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set:ga(1538,1,"Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538","Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),A_bigint_literal_cannot_be_used_as_a_property_name:ga(1539,1,"A_bigint_literal_cannot_be_used_as_a_property_name_1539","A 'bigint' literal cannot be used as a property name."),A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead:ga(1540,2,"A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540","A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.",void 0,void 0,!0),Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:ga(1541,1,"Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541","Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:ga(1542,1,"Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542","Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."),Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0:ga(1543,1,"Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543","Importing a JSON file into an ECMAScript module requires a 'type: \"json\"' import attribute when 'module' is set to '{0}'."),Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0:ga(1544,1,"Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544","Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."),using_declarations_are_not_allowed_in_ambient_contexts:ga(1545,1,"using_declarations_are_not_allowed_in_ambient_contexts_1545","'using' declarations are not allowed in ambient contexts."),await_using_declarations_are_not_allowed_in_ambient_contexts:ga(1546,1,"await_using_declarations_are_not_allowed_in_ambient_contexts_1546","'await using' declarations are not allowed in ambient contexts."),The_types_of_0_are_incompatible_between_these_types:ga(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:ga(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:ga(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:ga(2203,1,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:ga(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:ga(2205,1,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:ga(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:ga(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:ga(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:ga(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:ga(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:ga(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:ga(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:ga(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:ga(2301,1,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:ga(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:ga(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:ga(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:ga(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:ga(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:ga(2307,1,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:ga(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:ga(2309,1,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:ga(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:ga(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:ga(2312,1,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:ga(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:ga(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:ga(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:ga(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:ga(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:ga(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:ga(2319,1,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:ga(2320,1,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:ga(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:ga(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:ga(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:ga(2324,1,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:ga(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:ga(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:ga(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:ga(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:ga(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:ga(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:ga(2331,1,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:ga(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_a_static_property_initializer:ga(2334,1,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:ga(2335,1,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:ga(2336,1,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:ga(2337,1,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:ga(2338,1,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:ga(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:ga(2340,1,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:ga(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:ga(2343,1,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:ga(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:ga(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:ga(2346,1,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:ga(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:ga(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:ga(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:ga(2350,1,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:ga(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:ga(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:ga(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:ga(2354,1,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value:ga(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:ga(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:ga(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:ga(2358,1,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:ga(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:ga(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:ga(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:ga(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:ga(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:ga(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:ga(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:ga(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:ga(2369,1,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:ga(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:ga(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:ga(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:ga(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:ga(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:ga(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:ga(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:ga(2377,1,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:ga(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:ga(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:ga(2383,1,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:ga(2384,1,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:ga(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:ga(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:ga(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:ga(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:ga(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:ga(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:ga(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:ga(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:ga(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:ga(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:ga(2395,1,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:ga(2396,1,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:ga(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:ga(2398,1,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:ga(2399,1,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:ga(2400,1,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:ga(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:ga(2402,1,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:ga(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:ga(2404,1,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:ga(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:ga(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:ga(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:ga(2408,1,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:ga(2409,1,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:ga(2410,1,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:ga(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:ga(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:ga(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:ga(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:ga(2415,1,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:ga(2416,1,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:ga(2417,1,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:ga(2418,1,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:ga(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:ga(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:ga(2422,1,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:ga(2423,1,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:ga(2425,1,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:ga(2426,1,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:ga(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:ga(2428,1,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:ga(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:ga(2431,1,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:ga(2432,1,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:ga(2433,1,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:ga(2434,1,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:ga(2435,1,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:ga(2436,1,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:ga(2437,1,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:ga(2438,1,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:ga(2439,1,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:ga(2440,1,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:ga(2441,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:ga(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:ga(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:ga(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:ga(2445,1,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2:ga(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:ga(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:ga(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:ga(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:ga(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:ga(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:ga(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:ga(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:ga(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:ga(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:ga(2458,1,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:ga(2459,1,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:ga(2460,1,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:ga(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:ga(2462,1,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:ga(2463,1,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:ga(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:ga(2465,1,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:ga(2466,1,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:ga(2467,1,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:ga(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:ga(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:ga(2472,1,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:ga(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:ga(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:ga(2475,1,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:ga(2476,1,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:ga(2477,1,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:ga(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:ga(2480,1,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:ga(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:ga(2483,1,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:ga(2484,1,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:ga(2487,1,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:ga(2488,1,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:ga(2489,1,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:ga(2490,1,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:ga(2491,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:ga(2492,1,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:ga(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:ga(2494,1,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:ga(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression:ga(2496,1,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496","The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:ga(2497,1,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:ga(2498,1,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:ga(2499,1,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:ga(2500,1,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:ga(2501,1,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:ga(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:ga(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:ga(2504,1,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:ga(2505,1,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:ga(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:ga(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:ga(2508,1,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:ga(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:ga(2510,1,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:ga(2511,1,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:ga(2512,1,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:ga(2513,1,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),A_tuple_type_cannot_be_indexed_with_a_negative_value:ga(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:ga(2515,1,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:ga(2516,1,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:ga(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:ga(2518,1,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:ga(2519,1,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:ga(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method:ga(2522,1,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522","The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:ga(2523,1,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:ga(2524,1,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:ga(2526,1,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:ga(2527,1,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:ga(2528,1,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:ga(2529,1,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:ga(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:ga(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:ga(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:ga(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:ga(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:ga(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:ga(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:ga(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:ga(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:ga(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:ga(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:ga(2543,1,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:ga(2544,1,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:ga(2545,1,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:ga(2547,1,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:ga(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:ga(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:ga(2550,1,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:ga(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:ga(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:ga(2553,1,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:ga(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:ga(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:ga(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:ga(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:ga(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:ga(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:ga(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:ga(2562,1,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:ga(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:ga(2564,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:ga(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:ga(2566,1,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:ga(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:ga(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:ga(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:ga(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:ga(2574,1,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:ga(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:ga(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:ga(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:ga(2578,1,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:ga(2580,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:ga(2581,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:ga(2582,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:ga(2583,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:ga(2584,1,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:ga(2585,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),Cannot_assign_to_0_because_it_is_a_constant:ga(2588,1,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:ga(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:ga(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:ga(2591,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:ga(2592,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:ga(2593,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:ga(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:ga(2595,1,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:ga(2596,1,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:ga(2597,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:ga(2598,1,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:ga(2602,1,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:ga(2603,1,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:ga(2604,1,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:ga(2606,1,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:ga(2607,1,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:ga(2608,1,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:ga(2609,1,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:ga(2610,1,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:ga(2611,1,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:ga(2612,1,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:ga(2613,1,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:ga(2614,1,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:ga(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:ga(2616,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:ga(2617,1,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:ga(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:ga(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:ga(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:ga(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:ga(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:ga(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:ga(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:ga(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:ga(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:ga(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:ga(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:ga(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:ga(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:ga(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:ga(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:ga(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:ga(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:ga(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:ga(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:ga(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:ga(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:ga(2649,1,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more:ga(2650,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650","Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:ga(2651,1,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:ga(2652,1,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:ga(2653,1,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2:ga(2654,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more:ga(2655,1,"Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655","Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1:ga(2656,1,"Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656","Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),JSX_expressions_must_have_one_parent_element:ga(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:ga(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:ga(2659,1,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:ga(2660,1,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:ga(2661,1,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:ga(2662,1,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:ga(2663,1,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:ga(2664,1,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:ga(2665,1,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:ga(2666,1,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:ga(2667,1,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:ga(2668,1,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:ga(2669,1,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:ga(2670,1,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:ga(2671,1,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:ga(2672,1,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:ga(2673,1,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:ga(2674,1,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:ga(2675,1,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:ga(2676,1,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:ga(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:ga(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:ga(2679,1,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:ga(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:ga(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:ga(2683,1,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:ga(2684,1,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:ga(2685,1,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:ga(2686,1,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:ga(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:ga(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:ga(2689,1,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:ga(2690,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:ga(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:ga(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:ga(2694,1,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:ga(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:ga(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:ga(2697,1,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),Spread_types_may_only_be_created_from_object_types:ga(2698,1,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:ga(2699,1,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:ga(2700,1,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:ga(2701,1,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:ga(2702,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:ga(2703,1,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:ga(2704,1,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:ga(2705,1,"An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705","An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Required_type_parameters_may_not_follow_optional_type_parameters:ga(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:ga(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:ga(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:ga(2709,1,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:ga(2710,1,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:ga(2711,1,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:ga(2712,1,"A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712","A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:ga(2713,1,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:ga(2714,1,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:ga(2715,1,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:ga(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:ga(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:ga(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:ga(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:ga(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:ga(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:ga(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:ga(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:ga(2724,1,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0:ga(2725,1,"Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 and above with module {0}."),Cannot_find_lib_definition_for_0:ga(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:ga(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:ga(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:ga(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:ga(2730,1,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:ga(2731,1,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:ga(2732,1,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:ga(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:ga(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:ga(2735,1,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:ga(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:ga(2737,1,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:ga(2738,3,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:ga(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:ga(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:ga(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:ga(2742,1,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:ga(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:ga(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:ga(2745,1,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:ga(2746,1,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:ga(2747,1,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_0_is_enabled:ga(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:ga(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:ga(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:ga(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:ga(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:ga(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:ga(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:ga(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:ga(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:ga(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:ga(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:ga(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:ga(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:ga(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:ga(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:ga(2763,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:ga(2764,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:ga(2765,1,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:ga(2766,1,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:ga(2767,1,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:ga(2768,1,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:ga(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:ga(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:ga(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:ga(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:ga(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:ga(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:ga(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:ga(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:ga(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:ga(2778,1,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:ga(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:ga(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:ga(2781,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:ga(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:ga(2783,1,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:ga(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:ga(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:ga(2786,1,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:ga(2787,1,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:ga(2788,1,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:ga(2789,1,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:ga(2790,1,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:ga(2791,1,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:ga(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:ga(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:ga(2794,1,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:ga(2795,1,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:ga(2796,1,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:ga(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:ga(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:ga(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:ga(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:ga(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:ga(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:ga(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:ga(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:ga(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:ga(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:ga(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:ga(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:ga(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:ga(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:ga(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:ga(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:ga(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks:ga(2815,1,"arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks_2815","'arguments' cannot be referenced in property initializers or class static initialization blocks."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:ga(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:ga(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:ga(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:ga(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:ga(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve:ga(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2821","Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:ga(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve:ga(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2823","Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."),Cannot_find_namespace_0_Did_you_mean_1:ga(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:ga(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:ga(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:ga(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:ga(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:ga(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:ga(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:ga(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:ga(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:ga(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:ga(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:ga(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:ga(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:ga(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:ga(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:ga(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:ga(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:ga(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:ga(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:ga(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:ga(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:ga(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:ga(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:ga(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:ga(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:ga(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:ga(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:ga(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:ga(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:ga(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:ga(2865,1,"Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865","Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."),Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled:ga(2866,1,"Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866","Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun:ga(2867,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig:ga(2868,1,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868","Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."),Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish:ga(2869,1,"Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869","Right operand of ?? is unreachable because the left operand is never nullish."),This_binary_expression_is_never_nullish_Are_you_missing_parentheses:ga(2870,1,"This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870","This binary expression is never nullish. Are you missing parentheses?"),This_expression_is_always_nullish:ga(2871,1,"This_expression_is_always_nullish_2871","This expression is always nullish."),This_kind_of_expression_is_always_truthy:ga(2872,1,"This_kind_of_expression_is_always_truthy_2872","This kind of expression is always truthy."),This_kind_of_expression_is_always_falsy:ga(2873,1,"This_kind_of_expression_is_always_falsy_2873","This kind of expression is always falsy."),This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found:ga(2874,1,"This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874","This JSX tag requires '{0}' to be in scope, but it could not be found."),This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed:ga(2875,1,"This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875","This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."),This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0:ga(2876,1,"This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876",'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".'),This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path:ga(2877,1,"This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877","This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files:ga(2878,1,"This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878","This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found:ga(2879,1,"Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879","Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert:ga(2880,1,"Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880","Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."),This_expression_is_never_nullish:ga(2881,1,"This_expression_is_never_nullish_2881","This expression is never nullish."),Import_declaration_0_is_using_private_name_1:ga(4e3,1,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:ga(4002,1,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:ga(4004,1,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:ga(4006,1,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:ga(4008,1,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:ga(4010,1,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:ga(4012,1,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:ga(4014,1,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:ga(4016,1,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:ga(4019,1,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:ga(4020,1,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:ga(4021,1,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:ga(4022,1,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4023,1,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:ga(4024,1,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:ga(4025,1,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4026,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4027,1,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:ga(4028,1,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4029,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4030,1,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:ga(4031,1,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:ga(4032,1,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:ga(4033,1,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4034,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:ga(4035,1,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4036,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:ga(4037,1,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4038,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4039,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:ga(4040,1,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4041,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4042,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:ga(4043,1,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ga(4044,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:ga(4045,1,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ga(4046,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:ga(4047,1,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ga(4048,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:ga(4049,1,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:ga(4050,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:ga(4051,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:ga(4052,1,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:ga(4053,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:ga(4054,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:ga(4055,1,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ga(4056,1,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:ga(4057,1,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:ga(4058,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:ga(4059,1,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:ga(4060,1,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4061,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4062,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:ga(4063,1,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ga(4064,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:ga(4065,1,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ga(4066,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:ga(4067,1,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4068,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4069,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:ga(4070,1,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4071,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4072,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:ga(4073,1,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ga(4074,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:ga(4075,1,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4076,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:ga(4077,1,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:ga(4078,1,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:ga(4081,1,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:ga(4082,1,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:ga(4083,1,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:ga(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:ga(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' has or is using private name '{1}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ga(4091,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:ga(4092,1,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected:ga(4094,1,"Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094","Property '{0}' of exported anonymous class type may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4095,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4096,1,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:ga(4097,1,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4098,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ga(4099,1,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:ga(4100,1,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:ga(4101,1,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:ga(4102,1,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:ga(4103,1,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:ga(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:ga(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:ga(4106,1,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:ga(4107,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ga(4108,1,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:ga(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:ga(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:ga(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:ga(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:ga(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:ga(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:ga(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:ga(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:ga(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:ga(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:ga(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:ga(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:ga(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:ga(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:ga(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:ga(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given:ga(4125,1,"Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125","Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value:ga(4126,1,"One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126","One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic:ga(4127,1,"This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127","This member cannot have an 'override' modifier because its name is dynamic."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic:ga(4128,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128","This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),The_current_host_does_not_support_the_0_option:ga(5001,1,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:ga(5009,1,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:ga(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:ga(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Unknown_compiler_option_0:ga(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:ga(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:ga(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:ga(5033,1,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:ga(5042,1,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:ga(5047,1,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:ga(5051,1,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:ga(5052,1,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:ga(5053,1,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:ga(5054,1,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:ga(5055,1,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:ga(5056,1,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:ga(5057,1,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:ga(5058,1,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:ga(5059,1,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:ga(5061,1,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:ga(5062,1,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:ga(5063,1,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:ga(5064,1,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:ga(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:ga(5066,1,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:ga(5067,1,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:ga(5068,1,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:ga(5069,1,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic:ga(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd:ga(5071,1,"Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071","Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."),Unknown_build_option_0:ga(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:ga(5073,1,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:ga(5074,1,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:ga(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:ga(5076,1,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:ga(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:ga(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:ga(5079,1,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:ga(5080,1,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:ga(5081,1,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:ga(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:ga(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:ga(5085,1,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:ga(5086,1,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:ga(5087,1,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:ga(5088,1,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:ga(5089,1,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:ga(5090,1,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:ga(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:ga(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:ga(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:ga(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later:ga(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:ga(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:ga(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:ga(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:ga(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101","Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '\"ignoreDeprecations\": \"{2}\"' to silence this error."),Option_0_has_been_removed_Please_remove_it_from_your_configuration:ga(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:ga(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:ga(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:ga(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:ga(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:ga(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107","Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '\"ignoreDeprecations\": \"{3}\"' to silence this error."),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:ga(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:ga(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:ga(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:ga(6e3,3,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:ga(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:ga(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:ga(6004,3,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:ga(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:ga(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:ga(6007,3,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:ga(6008,3,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:ga(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:ga(6010,3,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:ga(6011,3,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:ga(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:ga(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:ga(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:ga(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:ga(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:ga(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:ga(6019,3,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:ga(6020,3,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:ga(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:ga(6024,3,"options_6024","options"),file:ga(6025,3,"file_6025","file"),Examples_Colon_0:ga(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:ga(6027,3,"Options_Colon_6027","Options:"),Version_0:ga(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:ga(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:ga(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:ga(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:ga(6034,3,"KIND_6034","KIND"),FILE:ga(6035,3,"FILE_6035","FILE"),VERSION:ga(6036,3,"VERSION_6036","VERSION"),LOCATION:ga(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:ga(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:ga(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:ga(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:ga(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:ga(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:ga(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:ga(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:ga(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:ga(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unable_to_open_file_0:ga(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:ga(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:ga(6052,3,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:ga(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:ga(6054,1,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:ga(6055,3,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:ga(6056,3,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:ga(6058,3,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:ga(6059,1,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:ga(6060,3,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:ga(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:ga(6064,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:ga(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:ga(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:ga(6070,3,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:ga(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:ga(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:ga(6073,3,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:ga(6074,3,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:ga(6075,3,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:ga(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:ga(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:ga(6078,3,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:ga(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:ga(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),Only_amd_and_system_modules_are_supported_alongside_0:ga(6082,1,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:ga(6083,3,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:ga(6084,3,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:ga(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:ga(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:ga(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:ga(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:ga(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:ga(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:ga(6091,3,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:ga(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:ga(6093,3,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:ga(6094,3,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1:ga(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:ga(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:ga(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:ga(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:ga(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:ga(6100,3,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:ga(6101,3,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:ga(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:ga(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:ga(6105,3,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:ga(6106,3,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:ga(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:ga(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:ga(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:ga(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:ga(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:ga(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:ga(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:ga(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:ga(6115,3,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:ga(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:ga(6119,3,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:ga(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:ga(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:ga(6122,3,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:ga(6123,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:ga(6124,3,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:ga(6125,3,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:ga(6126,3,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:ga(6127,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:ga(6128,3,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:ga(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:ga(6131,1,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:ga(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:ga(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:ga(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:ga(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:ga(6136,3,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:ga(6137,1,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:ga(6138,1,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:ga(6139,3,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:ga(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:ga(6141,3,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:ga(6142,1,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:ga(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:ga(6146,3,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:ga(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:ga(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:ga(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:ga(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:ga(6151,3,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:ga(6152,3,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:ga(6153,3,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:ga(6154,3,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:ga(6155,3,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:ga(6156,3,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:ga(6157,3,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:ga(6158,3,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:ga(6159,3,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:ga(6160,3,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:ga(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:ga(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:ga(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:ga(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:ga(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:ga(6166,3,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:ga(6167,3,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:ga(6168,3,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:ga(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:ga(6170,3,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:ga(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5:ga(6179,3,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."),Enable_all_strict_type_checking_options:ga(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:ga(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:ga(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:ga(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:ga(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:ga(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:ga(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:ga(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:ga(6191,3,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:ga(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:ga(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:ga(6194,3,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:ga(6195,3,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:ga(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:ga(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:ga(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:ga(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:ga(6200,1,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:ga(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:ga(6202,1,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:ga(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:ga(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:ga(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:ga(6206,3,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:ga(6207,3,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:ga(6208,3,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:ga(6209,3,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:ga(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:ga(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:ga(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:ga(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:ga(6214,3,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:ga(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:ga(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:ga(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:ga(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:ga(6219,3,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:ga(6220,3,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:ga(6221,3,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:ga(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:ga(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:ga(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:ga(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:ga(6226,3,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:ga(6227,3,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:ga(6229,1,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:ga(6230,1,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:ga(6231,1,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:ga(6232,1,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:ga(6233,1,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:ga(6234,1,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:ga(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:ga(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:ga(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:ga(6238,1,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),File_0_exists_according_to_earlier_cached_lookups:ga(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:ga(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:ga(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:ga(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:ga(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:ga(6244,3,"Modules_6244","Modules"),File_Management:ga(6245,3,"File_Management_6245","File Management"),Emit:ga(6246,3,"Emit_6246","Emit"),JavaScript_Support:ga(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:ga(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:ga(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:ga(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:ga(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:ga(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:ga(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:ga(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:ga(6255,3,"Projects_6255","Projects"),Output_Formatting:ga(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:ga(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:ga(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:ga(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:ga(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:ga(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:ga(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:ga(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:ga(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:ga(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:ga(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:ga(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:ga(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:ga(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:ga(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:ga(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:ga(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:ga(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:ga(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:ga(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278","There are types at '{0}', but this result could not be resolved when respecting package.json \"exports\". The '{1}' library may need to update its package.json or typings."),Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update:ga(6279,3,"Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279","Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler:ga(6280,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280","There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."),package_json_has_a_peerDependencies_field:ga(6281,3,"package_json_has_a_peerDependencies_field_6281","'package.json' has a 'peerDependencies' field."),Found_peerDependency_0_with_1_version:ga(6282,3,"Found_peerDependency_0_with_1_version_6282","Found peerDependency '{0}' with '{1}' version."),Failed_to_find_peerDependency_0:ga(6283,3,"Failed_to_find_peerDependency_0_6283","Failed to find peerDependency '{0}'."),File_Layout:ga(6284,3,"File_Layout_6284","File Layout"),Environment_Settings:ga(6285,3,"Environment_Settings_6285","Environment Settings"),See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule:ga(6286,3,"See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule_6286","See also https://aka.ms/tsconfig/module"),For_nodejs_Colon:ga(6287,3,"For_nodejs_Colon_6287","For nodejs:"),and_npm_install_D_types_Slashnode:ga(6290,3,"and_npm_install_D_types_Slashnode_6290","and npm install -D @types/node"),Other_Outputs:ga(6291,3,"Other_Outputs_6291","Other Outputs"),Stricter_Typechecking_Options:ga(6292,3,"Stricter_Typechecking_Options_6292","Stricter Typechecking Options"),Style_Options:ga(6293,3,"Style_Options_6293","Style Options"),Recommended_Options:ga(6294,3,"Recommended_Options_6294","Recommended Options"),Enable_project_compilation:ga(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:ga(6304,1,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:ga(6305,1,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:ga(6306,1,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:ga(6307,1,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Referenced_project_0_may_not_disable_emit:ga(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:ga(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:ga(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:ga(6352,3,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:ga(6353,3,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:ga(6354,3,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:ga(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:ga(6356,3,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:ga(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:ga(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:ga(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:ga(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:ga(6362,3,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:ga(6363,3,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:ga(6364,3,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:ga(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:ga(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:ga(6369,1,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:ga(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:ga(6371,3,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:ga(6374,3,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:ga(6377,1,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Composite_projects_may_not_disable_incremental_compilation:ga(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:ga(6380,3,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:ga(6381,3,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:ga(6382,3,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:ga(6383,3,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:ga(6384,3,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:ga(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:ga(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_signature_0_of_1_is_deprecated:ga(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:ga(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:ga(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:ga(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:ga(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:ga(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:ga(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:ga(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:ga(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:ga(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:ga(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:ga(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:ga(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:ga(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:ga(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:ga(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:ga(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:ga(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:ga(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:ga(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:ga(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:ga(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:ga(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:ga(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:ga(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:ga(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:ga(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:ga(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:ga(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:ga(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:ga(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:ga(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors:ga(6419,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419","Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."),Project_0_is_out_of_date_because_1:ga(6420,3,"Project_0_is_out_of_date_because_1_6420","Project '{0}' is out of date because {1}."),Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files:ga(6421,3,"Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421","Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:ga(6500,3,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:ga(6501,3,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:ga(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:ga(6503,3,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:ga(6504,1,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:ga(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:ga(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files:ga(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:ga(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:ga(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:ga(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:ga(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:ga(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:ga(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:ga(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:ga(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:ga(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:ga(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:ga(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:ga(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:ga(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:ga(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:ga(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:ga(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:ga(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:ga(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:ga(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:ga(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:ga(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:ga(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:ga(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:ga(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:ga(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:ga(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:ga(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:ga(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:ga(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:ga(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:ga(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:ga(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:ga(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:ga(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:ga(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:ga(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:ga(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:ga(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Skip_building_downstream_projects_on_error_in_upstream_project:ga(6640,3,"Skip_building_downstream_projects_on_error_in_upstream_project_6640","Skip building downstream projects on error in upstream project."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:ga(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:ga(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:ga(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:ga(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:ga(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:ga(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:ga(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:ga(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:ga(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:ga(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:ga(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:ga(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:ga(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:ga(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:ga(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:ga(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:ga(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:ga(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:ga(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:ga(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:ga(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:ga(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:ga(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:ga(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:ga(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:ga(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:ga(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:ga(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:ga(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:ga(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:ga(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:ga(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:ga(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:ga(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:ga(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:ga(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:ga(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:ga(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:ga(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:ga(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:ga(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:ga(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:ga(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:ga(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:ga(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:ga(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:ga(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:ga(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:ga(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:ga(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:ga(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:ga(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:ga(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:ga(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:ga(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:ga(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:ga(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:ga(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:ga(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:ga(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:ga(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:ga(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:ga(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:ga(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:ga(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:ga(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:ga(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:ga(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:ga(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:ga(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:ga(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:ga(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:ga(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:ga(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:ga(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files:ga(6719,3,"Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719","Require sufficient annotation on exports so other tools can trivially generate declaration files."),Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any:ga(6720,3,"Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720","Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."),Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript:ga(6721,3,"Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript_6721","Do not allow runtime constructs that are not part of ECMAScript."),Default_catch_clause_variables_as_unknown_instead_of_any:ga(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:ga(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported:ga(6805,3,"Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805","Disable full type checking (only critical parse and emit errors will be reported)."),Check_side_effect_imports:ga(6806,3,"Check_side_effect_imports_6806","Check side effect imports."),This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2:ga(6807,1,"This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807","This operation can be simplified. This shift is identical to `{0} {1} {2}`."),Enable_lib_replacement:ga(6808,3,"Enable_lib_replacement_6808","Enable lib replacement."),one_of_Colon:ga(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:ga(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:ga(6902,3,"type_Colon_6902","type:"),default_Colon:ga(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:ga(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:ga(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:ga(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:ga(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:ga(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:ga(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:ga(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:ga(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:ga(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:ga(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:ga(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:ga(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:ga(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:ga(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:ga(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:ga(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:ga(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:ga(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:ga(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:ga(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:ga(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:ga(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:ga(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:ga(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:ga(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:ga(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:ga(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:ga(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:ga(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:ga(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:ga(7008,1,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:ga(7009,1,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:ga(7010,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:ga(7011,1,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:ga(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:ga(7013,1,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:ga(7014,1,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:ga(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:ga(7016,1,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:ga(7017,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:ga(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:ga(7019,1,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:ga(7020,1,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:ga(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:ga(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:ga(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation:ga(7025,1,"Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025","Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:ga(7026,1,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:ga(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:ga(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:ga(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:ga(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:ga(7031,1,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:ga(7032,1,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:ga(7033,1,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:ga(7034,1,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:ga(7035,1,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:ga(7036,1,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:ga(7037,3,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:ga(7038,3,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:ga(7039,1,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:ga(7040,1,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),The_containing_arrow_function_captures_the_global_value_of_this:ga(7041,1,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:ga(7042,1,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:ga(7043,2,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:ga(7044,2,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:ga(7045,2,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:ga(7046,2,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:ga(7047,2,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:ga(7048,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:ga(7049,2,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:ga(7050,2,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:ga(7051,1,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:ga(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:ga(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:ga(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:ga(7055,1,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:ga(7056,1,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:ga(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:ga(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:ga(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:ga(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:ga(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:ga(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:ga(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:ga(8002,1,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:ga(8003,1,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:ga(8004,1,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:ga(8005,1,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:ga(8006,1,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:ga(8008,1,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:ga(8009,1,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:ga(8010,1,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:ga(8011,1,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:ga(8012,1,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:ga(8013,1,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:ga(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:ga(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:ga(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:ga(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:ga(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:ga(8022,1,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:ga(8023,1,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:ga(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:ga(8025,1,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one '@augments' or '@extends' tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:ga(8026,1,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:ga(8027,1,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:ga(8028,1,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:ga(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:ga(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:ga(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:ga(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:ga(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:ga(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:ga(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:ga(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:ga(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:ga(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:ga(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:ga(9005,1,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:ga(9006,1,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:ga(9007,1,"Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007","Function must have an explicit return type annotation with --isolatedDeclarations."),Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations:ga(9008,1,"Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008","Method must have an explicit return type annotation with --isolatedDeclarations."),At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations:ga(9009,1,"At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009","At least one accessor must have an explicit type annotation with --isolatedDeclarations."),Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations:ga(9010,1,"Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010","Variable must have an explicit type annotation with --isolatedDeclarations."),Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations:ga(9011,1,"Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011","Parameter must have an explicit type annotation with --isolatedDeclarations."),Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations:ga(9012,1,"Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012","Property must have an explicit type annotation with --isolatedDeclarations."),Expression_type_can_t_be_inferred_with_isolatedDeclarations:ga(9013,1,"Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013","Expression type can't be inferred with --isolatedDeclarations."),Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations:ga(9014,1,"Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014","Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."),Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations:ga(9015,1,"Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015","Objects that contain spread assignments can't be inferred with --isolatedDeclarations."),Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations:ga(9016,1,"Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016","Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."),Only_const_arrays_can_be_inferred_with_isolatedDeclarations:ga(9017,1,"Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017","Only const arrays can be inferred with --isolatedDeclarations."),Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations:ga(9018,1,"Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018","Arrays with spread elements can't inferred with --isolatedDeclarations."),Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations:ga(9019,1,"Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019","Binding elements can't be exported directly with --isolatedDeclarations."),Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations:ga(9020,1,"Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020","Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."),Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations:ga(9021,1,"Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021","Extends clause can't contain an expression with --isolatedDeclarations."),Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations:ga(9022,1,"Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022","Inference from class expressions is not supported with --isolatedDeclarations."),Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function:ga(9023,1,"Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023","Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."),Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations:ga(9025,1,"Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025","Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."),Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations:ga(9026,1,"Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026","Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."),Add_a_type_annotation_to_the_variable_0:ga(9027,1,"Add_a_type_annotation_to_the_variable_0_9027","Add a type annotation to the variable {0}."),Add_a_type_annotation_to_the_parameter_0:ga(9028,1,"Add_a_type_annotation_to_the_parameter_0_9028","Add a type annotation to the parameter {0}."),Add_a_type_annotation_to_the_property_0:ga(9029,1,"Add_a_type_annotation_to_the_property_0_9029","Add a type annotation to the property {0}."),Add_a_return_type_to_the_function_expression:ga(9030,1,"Add_a_return_type_to_the_function_expression_9030","Add a return type to the function expression."),Add_a_return_type_to_the_function_declaration:ga(9031,1,"Add_a_return_type_to_the_function_declaration_9031","Add a return type to the function declaration."),Add_a_return_type_to_the_get_accessor_declaration:ga(9032,1,"Add_a_return_type_to_the_get_accessor_declaration_9032","Add a return type to the get accessor declaration."),Add_a_type_to_parameter_of_the_set_accessor_declaration:ga(9033,1,"Add_a_type_to_parameter_of_the_set_accessor_declaration_9033","Add a type to parameter of the set accessor declaration."),Add_a_return_type_to_the_method:ga(9034,1,"Add_a_return_type_to_the_method_9034","Add a return type to the method"),Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit:ga(9035,1,"Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035","Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."),Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it:ga(9036,1,"Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036","Move the expression in default export to a variable and add a type annotation to it."),Default_exports_can_t_be_inferred_with_isolatedDeclarations:ga(9037,1,"Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037","Default exports can't be inferred with --isolatedDeclarations."),Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations:ga(9038,1,"Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038","Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."),Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations:ga(9039,1,"Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039","Type containing private name '{0}' can't be used with --isolatedDeclarations."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:ga(17e3,1,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:ga(17001,1,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:ga(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:ga(17004,1,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:ga(17005,1,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:ga(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:ga(17007,1,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:ga(17008,1,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:ga(17009,1,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:ga(17010,1,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:ga(17011,1,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:ga(17012,1,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:ga(17013,1,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:ga(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:ga(17015,1,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:ga(17016,1,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:ga(17017,1,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:ga(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:ga(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:ga(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:ga(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:ga(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:ga(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:ga(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module:ga(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:ga(80002,2,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:ga(80003,2,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:ga(80004,2,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:ga(80005,2,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:ga(80006,2,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:ga(80007,2,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:ga(80008,2,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),JSDoc_typedef_may_be_converted_to_TypeScript_type:ga(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:ga(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:ga(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:ga(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:ga(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:ga(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:ga(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:ga(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:ga(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:ga(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:ga(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:ga(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:ga(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:ga(90013,3,"Import_0_from_1_90013","Import '{0}' from \"{1}\""),Change_0_to_1:ga(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:ga(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:ga(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:ga(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:ga(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:ga(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:ga(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:ga(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:ga(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:ga(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:ga(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:ga(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:ga(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:ga(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:ga(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:ga(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:ga(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:ga(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:ga(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:ga(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:ga(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:ga(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:ga(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:ga(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:ga(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:ga(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:ga(90055,3,"Remove_type_from_import_declaration_from_0_90055","Remove 'type' from import declaration from \"{0}\""),Remove_type_from_import_of_0_from_1:ga(90056,3,"Remove_type_from_import_of_0_from_1_90056","Remove 'type' from import of '{0}' from \"{1}\""),Add_import_from_0:ga(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:ga(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:ga(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:ga(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Update_modifiers_of_0:ga(90061,3,"Update_modifiers_of_0_90061","Update modifiers of '{0}'"),Add_annotation_of_type_0:ga(90062,3,"Add_annotation_of_type_0_90062","Add annotation of type '{0}'"),Add_return_type_0:ga(90063,3,"Add_return_type_0_90063","Add return type '{0}'"),Extract_base_class_to_variable:ga(90064,3,"Extract_base_class_to_variable_90064","Extract base class to variable"),Extract_default_export_to_variable:ga(90065,3,"Extract_default_export_to_variable_90065","Extract default export to variable"),Extract_binding_expressions_to_variable:ga(90066,3,"Extract_binding_expressions_to_variable_90066","Extract binding expressions to variable"),Add_all_missing_type_annotations:ga(90067,3,"Add_all_missing_type_annotations_90067","Add all missing type annotations"),Add_satisfies_and_an_inline_type_assertion_with_0:ga(90068,3,"Add_satisfies_and_an_inline_type_assertion_with_0_90068","Add satisfies and an inline type assertion with '{0}'"),Extract_to_variable_and_replace_with_0_as_typeof_0:ga(90069,3,"Extract_to_variable_and_replace_with_0_as_typeof_0_90069","Extract to variable and replace with '{0} as typeof {0}'"),Mark_array_literal_as_const:ga(90070,3,"Mark_array_literal_as_const_90070","Mark array literal as const"),Annotate_types_of_properties_expando_function_in_a_namespace:ga(90071,3,"Annotate_types_of_properties_expando_function_in_a_namespace_90071","Annotate types of properties expando function in a namespace"),Convert_function_to_an_ES2015_class:ga(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:ga(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:ga(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:ga(95005,3,"Extract_function_95005","Extract function"),Extract_constant:ga(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:ga(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:ga(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:ga(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:ga(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:ga(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:ga(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:ga(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:ga(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:ga(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:ga(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:ga(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:ga(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:ga(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:ga(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:ga(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:ga(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:ga(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:ga(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:ga(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:ga(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:ga(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:ga(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:ga(95030,3,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:ga(95031,3,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:ga(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:ga(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:ga(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:ga(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:ga(95036,3,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:ga(95037,3,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:ga(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:ga(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:ga(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:ga(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:ga(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:ga(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:ga(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:ga(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:ga(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:ga(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:ga(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:ga(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:ga(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:ga(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:ga(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:ga(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:ga(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:ga(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:ga(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:ga(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:ga(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:ga(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:ga(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:ga(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:ga(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:ga(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:ga(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:ga(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:ga(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:ga(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:ga(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:ga(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:ga(95070,3,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:ga(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:ga(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:ga(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:ga(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:ga(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:ga(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:ga(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:ga(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:ga(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:ga(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:ga(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:ga(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:ga(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:ga(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:ga(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:ga(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:ga(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:ga(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:ga(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:ga(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:ga(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:ga(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:ga(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:ga(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:ga(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:ga(95097,3,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:ga(95098,3,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:ga(95099,3,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:ga(95100,3,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:ga(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:ga(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:ga(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:ga(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:ga(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:ga(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:ga(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:ga(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:ga(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:ga(95112,3,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:ga(95113,3,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:ga(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:ga(95115,3,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:ga(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:ga(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:ga(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:ga(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:ga(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:ga(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:ga(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:ga(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:ga(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:ga(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:ga(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:ga(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:ga(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:ga(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:ga(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:ga(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:ga(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:ga(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:ga(95134,3,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:ga(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:ga(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:ga(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:ga(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:ga(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:ga(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:ga(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:ga(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:ga(95143,3,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:ga(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:ga(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:ga(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:ga(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:ga(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:ga(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:ga(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:ga(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:ga(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:ga(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:ga(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:ga(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:ga(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:ga(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:ga(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:ga(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:ga(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:ga(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:ga(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:ga(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:ga(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:ga(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:ga(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:ga(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:ga(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:ga(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:ga(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:ga(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:ga(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:ga(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:ga(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:ga(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:ga(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:ga(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:ga(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:ga(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:ga(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:ga(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:ga(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:ga(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:ga(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:ga(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:ga(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:ga(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Add_missing_parameter_to_0:ga(95188,3,"Add_missing_parameter_to_0_95188","Add missing parameter to '{0}'"),Add_missing_parameters_to_0:ga(95189,3,"Add_missing_parameters_to_0_95189","Add missing parameters to '{0}'"),Add_all_missing_parameters:ga(95190,3,"Add_all_missing_parameters_95190","Add all missing parameters"),Add_optional_parameter_to_0:ga(95191,3,"Add_optional_parameter_to_0_95191","Add optional parameter to '{0}'"),Add_optional_parameters_to_0:ga(95192,3,"Add_optional_parameters_to_0_95192","Add optional parameters to '{0}'"),Add_all_optional_parameters:ga(95193,3,"Add_all_optional_parameters_95193","Add all optional parameters"),Wrap_in_parentheses:ga(95194,3,"Wrap_in_parentheses_95194","Wrap in parentheses"),Wrap_all_invalid_decorator_expressions_in_parentheses:ga(95195,3,"Wrap_all_invalid_decorator_expressions_in_parentheses_95195","Wrap all invalid decorator expressions in parentheses"),Add_resolution_mode_import_attribute:ga(95196,3,"Add_resolution_mode_import_attribute_95196","Add 'resolution-mode' import attribute"),Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it:ga(95197,3,"Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197","Add 'resolution-mode' import attribute to all type-only imports that need it"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:ga(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:ga(18006,1,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:ga(18007,1,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:ga(18009,1,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:ga(18010,1,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:ga(18011,1,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:ga(18012,1,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:ga(18013,1,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:ga(18014,1,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:ga(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:ga(18016,1,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:ga(18017,1,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:ga(18018,1,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:ga(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:ga(18024,1,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:ga(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:ga(18027,1,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:ga(18028,1,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:ga(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:ga(18030,1,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:ga(18031,1,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:ga(18032,1,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:ga(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:ga(18034,3,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:ga(18035,1,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:ga(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:ga(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:ga(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:ga(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:ga(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:ga(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:ga(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:ga(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:ga(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:ga(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:ga(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:ga(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:ga(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:ga(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:ga(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Its_type_0_is_not_a_valid_JSX_element_type:ga(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:ga(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block."),_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled:ga(18055,1,"_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055","'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."),Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled:ga(18056,1,"Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056","Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."),String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020:ga(18057,1,"String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057","String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'."),Default_imports_are_not_allowed_in_a_deferred_import:ga(18058,1,"Default_imports_are_not_allowed_in_a_deferred_import_18058","Default imports are not allowed in a deferred import."),Named_imports_are_not_allowed_in_a_deferred_import:ga(18059,1,"Named_imports_are_not_allowed_in_a_deferred_import_18059","Named imports are not allowed in a deferred import."),Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve:ga(18060,1,"Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve_18060","Deferred imports are only supported when the '--module' flag is set to 'esnext' or 'preserve'."),_0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer:ga(18061,1,"_0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer_18061","'{0}' is not a valid meta-property for keyword 'import'. Did you mean 'meta' or 'defer'?")};function ya(e){return e>=80}function va(e){return 32===e||ya(e)}var ba={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,defer:166,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},xa=new Map(Object.entries(ba)),Sa=new Map(Object.entries({...ba,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),ka=new Map([[100,1],[103,2],[105,4],[109,8],[115,16],[117,32],[118,64],[121,128]]),Ta=new Map([[1,Ii.RegularExpressionFlagsHasIndices],[16,Ii.RegularExpressionFlagsDotAll],[32,Ii.RegularExpressionFlagsUnicode],[64,Ii.RegularExpressionFlagsUnicodeSets],[128,Ii.RegularExpressionFlagsSticky]]),Ca=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],wa=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],Na=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743],Da=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,118528,118573,118576,118598,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122624,122654,122661,122666,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,122928,122989,123023,123023,123136,123180,123184,123197,123200,123209,123214,123214,123536,123566,123584,123641,124112,124153,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,130032,130041,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743,917760,917999],Ea=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,Fa=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,Pa=/@(?:see|link)/i;function Aa(e,t){if(e=2?Na:Ca)}function Oa(e){const t=[];return e.forEach((e,n)=>{t[e]=n}),t}var La=Oa(Sa);function ja(e){return La[e]}function Ma(e){return Sa.get(e)}var Ra=Oa(ka);function Ba(e){return Ra[e]}function Ja(e){return ka.get(e)}function za(e){const t=[];let n=0,r=0;for(;n127&&Qa(i)&&(t.push(r),r=n)}}return t.push(r),t}function qa(e,t,n,r){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,n,r):Ua(Va(e),t,n,e.text,r)}function Ua(e,t,n,r,i){(t<0||t>=e.length)&&(i?t=t<0?0:t>=e.length?e.length-1:t:gn.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${void 0!==r?ae(e,za(r)):"unknown"}`));const o=e[t]+n;return i?o>e[t+1]?e[t+1]:"string"==typeof r&&o>r.length?r.length:o:(t=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function Qa(e){return 10===e||13===e||8232===e||8233===e}function Ya(e){return e>=48&&e<=57}function Za(e){return Ya(e)||e>=65&&e<=70||e>=97&&e<=102}function es(e){return e>=65&&e<=90||e>=97&&e<=122}function ts(e){return es(e)||Ya(e)||95===e}function ns(e){return e>=48&&e<=55}function rs(e,t){const n=e.charCodeAt(t);switch(n){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return n>127}}function is(e,t,n,r,i){if(iT(t))return t;let o=!1;for(;;){const a=e.charCodeAt(t);switch(a){case 13:10===e.charCodeAt(t+1)&&t++;case 10:if(t++,n)return t;o=!!i;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(r)break;if(47===e.charCodeAt(t+1)){for(t+=2;t127&&Ga(a)){t++;continue}}return t}}var os=7;function as(e,t){if(gn.assert(t>=0),0===t||Qa(e.charCodeAt(t-1))){const n=e.charCodeAt(t);if(t+os=0&&n127&&Ga(a)){u&&Qa(a)&&(_=!0),n++;continue}break e}}return u&&(p=i(s,c,l,_,o,p)),p}function ds(e,t,n,r){return us(!1,e,t,!1,n,r)}function ps(e,t,n,r){return us(!1,e,t,!0,n,r)}function fs(e,t,n,r,i){return us(!0,e,t,!1,n,r,i)}function ms(e,t,n,r,i){return us(!0,e,t,!0,n,r,i)}function gs(e,t,n,r,i,o=[]){return o.push({kind:n,pos:e,end:t,hasTrailingNewLine:r}),o}function hs(e,t){return fs(e,t,gs,void 0,void 0)}function ys(e,t){return ms(e,t,gs,void 0,void 0)}function vs(e){const t=cs.exec(e);if(t)return t[0]}function bs(e,t){return es(e)||36===e||95===e||e>127&&Ia(e,t)}function xs(e,t,n){return ts(e)||36===e||1===n&&(45===e||58===e)||e>127&&function(e,t){return Aa(e,t>=2?Da:wa)}(e,t)}function Ss(e,t,n){let r=Ts(e,0);if(!bs(r,t))return!1;for(let i=Cs(r);il,getStartPos:()=>l,getTokenEnd:()=>s,getTextPos:()=>s,getToken:()=>u,getTokenStart:()=>_,getTokenPos:()=>_,getTokenText:()=>m.substring(_,s),getTokenValue:()=>d,hasUnicodeEscape:()=>!!(1024&p),hasExtendedUnicodeEscape:()=>!!(8&p),hasPrecedingLineBreak:()=>!!(1&p),hasPrecedingJSDocComment:()=>!!(2&p),hasPrecedingJSDocLeadingAsterisks:()=>!!(32768&p),isIdentifier:()=>80===u||u>118,isReservedWord:()=>u>=83&&u<=118,isUnterminated:()=>!!(4&p),getCommentDirectives:()=>f,getNumericLiteralFlags:()=>25584&p,getTokenFlags:()=>p,reScanGreaterToken:function(){if(32===u){if(62===k(s))return 62===k(s+1)?61===k(s+2)?(s+=3,u=73):(s+=2,u=50):61===k(s+1)?(s+=2,u=72):(s++,u=49);if(61===k(s))return s++,u=34}return u},reScanAsteriskEqualsToken:function(){return gn.assert(67===u,"'reScanAsteriskEqualsToken' should only be called on a '*='"),s=_+1,u=64},reScanSlashToken:function(t){if(44===u||69===u){const n=_+1;s=n;let r=!1,i=!1,a=!1;for(;;){const e=T(s);if(-1===e||Qa(e)){p|=4;break}if(r)r=!1;else{if(47===e&&!a)break;91===e?a=!0:92===e?r=!0:93===e?a=!1:a||40!==e||63!==T(s+1)||60!==T(s+2)||61===T(s+3)||33===T(s+3)||(i=!0)}s++}const l=s;if(4&p){s=n,r=!1;let e=0,t=!1,i=0;for(;s{!function(t,n,r){var i,a,l,u,p=!!(64&t),f=!!(96&t),h=f||!n,y=!1,v=0,b=[];function x(e){for(;;){if(b.push(u),u=void 0,w(e),u=b.pop(),124!==T(s))return;s++}}function w(t){let n=!1;for(;;){const r=s,i=T(s);switch(i){case-1:return;case 94:case 36:s++,n=!1;break;case 92:switch(T(++s)){case 98:case 66:s++,n=!1;break;default:D(),n=!0}break;case 40:if(63===T(++s))switch(T(++s)){case 61:case 33:s++,n=!h;break;case 60:const t=s;switch(T(++s)){case 61:case 33:s++,n=!1;break;default:A(!1),K(62),e<5&&C(ha.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later,t,s-t),v++,n=!0}break;default:const r=s,i=N(0);45===T(s)&&(s++,N(i),s===r+1&&C(ha.Subpattern_flags_must_be_present_when_there_is_a_minus_sign,r,s-r)),K(58),n=!0}else v++,n=!0;x(!0),K(41);break;case 123:const o=++s;E();const a=d;if(!h&&!a){n=!0;break}if(44===T(s)){s++,E();const e=d;if(a)e&&Number.parseInt(a)>Number.parseInt(e)&&(h||125===T(s))&&C(ha.Numbers_out_of_order_in_quantifier,o,s-o);else{if(!e&&125!==T(s)){C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,r,1,String.fromCharCode(i)),n=!0;break}C(ha.Incomplete_quantifier_Digit_expected,o,0)}}else if(!a){h&&C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,r,1,String.fromCharCode(i)),n=!0;break}if(125!==T(s)){if(!h){n=!0;break}C(ha._0_expected,s,0,String.fromCharCode(125)),s--}case 42:case 43:case 63:63===T(++s)&&s++,n||C(ha.There_is_nothing_available_for_repetition,r,s-r),n=!1;break;case 46:s++,n=!0;break;case 91:s++,p?j():L(),K(93),n=!0;break;case 41:if(t)return;case 93:case 125:(h||41===i)&&C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(i)),s++,n=!0;break;case 47:case 124:return;default:$(),n=!0}}}function N(t){for(;;){const n=S(s);if(-1===n||!xs(n,e))break;const r=Cs(n),i=Ja(n);void 0===i?C(ha.Unknown_regular_expression_flag,s,r):t&i?C(ha.Duplicate_regular_expression_flag,s,r):28&i?(t|=i,W(i,r)):C(ha.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern,s,r),s+=r}return t}function D(){switch(gn.assertEqual(k(s-1),92),T(s)){case 107:60===T(++s)?(s++,A(!0),K(62)):(h||r)&&C(ha.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets,s-2,2);break;case 113:if(p){s++,C(ha.q_is_only_available_inside_character_class,s-2,2);break}default:gn.assert(q()||F()||P(!0))}}function F(){gn.assertEqual(k(s-1),92);const e=T(s);if(e>=49&&e<=57){const e=s;return E(),l=le(l,{pos:e,end:s,value:+d}),!0}return!1}function P(e){gn.assertEqual(k(s-1),92);let t=T(s);switch(t){case-1:return C(ha.Undetermined_character_escape,s-1,1),"\\";case 99:if(t=T(++s),es(t))return s++,String.fromCharCode(31&t);if(h)C(ha.c_must_be_followed_by_an_ASCII_letter,s-2,2);else if(e)return s--,"\\";return String.fromCharCode(t);case 94:case 36:case 47:case 92:case 46:case 42:case 43:case 63:case 40:case 41:case 91:case 93:case 123:case 125:case 124:return s++,String.fromCharCode(t);default:return s--,O(4|(n?8:0)|(f?16:0)|(e?32:0))}}function A(t){gn.assertEqual(k(s-1),60),_=s,V(S(s),e),s===_?C(ha.Expected_a_capturing_group_name):t?a=le(a,{pos:_,end:s,name:d}):(null==u?void 0:u.has(d))||b.some(e=>null==e?void 0:e.has(d))?C(ha.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other,_,s-_):(u??(u=new Set),u.add(d),i??(i=new Set),i.add(d))}function I(e){return 93===e||-1===e||s>=c}function L(){for(gn.assertEqual(k(s-1),91),94===T(s)&&s++;;){if(I(T(s)))return;const e=s,t=z();if(45===T(s)){if(I(T(++s)))return;!t&&h&&C(ha.A_character_class_range_must_not_be_bounded_by_another_character_class,e,s-1-e);const n=s,r=z();if(!r&&h){C(ha.A_character_class_range_must_not_be_bounded_by_another_character_class,n,s-n);continue}if(!t)continue;const i=Ts(t,0),o=Ts(r,0);t.length===Cs(i)&&r.length===Cs(o)&&i>o&&C(ha.Range_out_of_order_in_character_class,e,s-e)}}}function j(){gn.assertEqual(k(s-1),91);let e=!1;94===T(s)&&(s++,e=!0);let t=!1,n=T(s);if(I(n))return;let r,i=s;switch(m.slice(s,s+2)){case"--":case"&&":C(ha.Expected_a_class_set_operand),y=!1;break;default:r=R()}switch(T(s)){case 45:if(45===T(s+1))return e&&y&&C(ha.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,i,s-i),t=y,M(3),void(y=!e&&t);break;case 38:if(38===T(s+1))return M(2),e&&y&&C(ha.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,i,s-i),t=y,void(y=!e&&t);C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(n));break;default:e&&y&&C(ha.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,i,s-i),t=y}for(;n=T(s),-1!==n;){switch(n){case 45:if(n=T(++s),I(n))return void(y=!e&&t);if(45===n){s++,C(ha.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2),i=s-2,r=m.slice(i,s);continue}{r||C(ha.A_character_class_range_must_not_be_bounded_by_another_character_class,i,s-1-i);const n=s,o=R();if(e&&y&&C(ha.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,n,s-n),t||(t=y),!o){C(ha.A_character_class_range_must_not_be_bounded_by_another_character_class,n,s-n);break}if(!r)break;const a=Ts(r,0),c=Ts(o,0);r.length===Cs(a)&&o.length===Cs(c)&&a>c&&C(ha.Range_out_of_order_in_character_class,i,s-i)}break;case 38:i=s,38===T(++s)?(s++,C(ha.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2),38===T(s)&&(C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(n)),s++)):C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s-1,1,String.fromCharCode(n)),r=m.slice(i,s);continue}if(I(T(s)))break;switch(i=s,m.slice(s,s+2)){case"--":case"&&":C(ha.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s,2),s+=2,r=m.slice(i,s);break;default:r=R()}}y=!e&&t}function M(e){let t=y;for(;;){let n=T(s);if(I(n))break;switch(n){case 45:45===T(++s)?(s++,3!==e&&C(ha.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2)):C(ha.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-1,1);break;case 38:38===T(++s)?(s++,2!==e&&C(ha.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead,s-2,2),38===T(s)&&(C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(n)),s++)):C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s-1,1,String.fromCharCode(n));break;default:switch(e){case 3:C(ha._0_expected,s,0,"--");break;case 2:C(ha._0_expected,s,0,"&&")}}if(n=T(s),I(n)){C(ha.Expected_a_class_set_operand);break}R(),t&&(t=y)}y=t}function R(){switch(y=!1,T(s)){case-1:return"";case 91:return s++,j(),K(93),"";case 92:if(s++,q())return"";if(113===T(s))return 123===T(++s)?(s++,B(),K(125),""):(C(ha.q_must_be_followed_by_string_alternatives_enclosed_in_braces,s-2,2),"q");s--;default:return J()}}function B(){gn.assertEqual(k(s-1),123);let e=0;for(;;){switch(T(s)){case-1:return;case 125:return void(1!==e&&(y=!0));case 124:1!==e&&(y=!0),s++,o=s,e=0;break;default:J(),e++}}}function J(){const e=T(s);if(-1===e)return"";if(92===e){const e=T(++s);switch(e){case 98:return s++,"\b";case 38:case 45:case 33:case 35:case 37:case 44:case 58:case 59:case 60:case 61:case 62:case 64:case 96:case 126:return s++,String.fromCharCode(e);default:return P(!1)}}else if(e===T(s+1))switch(e){case 38:case 33:case 35:case 37:case 42:case 43:case 44:case 46:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 96:case 126:return C(ha.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash,s,2),s+=2,m.substring(s-2,s)}switch(e){case 47:case 40:case 41:case 91:case 93:case 123:case 125:case 45:case 124:return C(ha.Unexpected_0_Did_you_mean_to_escape_it_with_backslash,s,1,String.fromCharCode(e)),s++,String.fromCharCode(e)}return $()}function z(){if(92!==T(s))return $();{const e=T(++s);switch(e){case 98:return s++,"\b";case 45:return s++,String.fromCharCode(e);default:return q()?"":P(!1)}}}function q(){gn.assertEqual(k(s-1),92);let e=!1;const t=s-1,n=T(s);switch(n){case 100:case 68:case 115:case 83:case 119:case 87:return s++,!0;case 80:e=!0;case 112:if(123===T(++s)){const n=++s,r=U();if(61===T(s)){const e=Ds.get(r);if(s===n)C(ha.Expected_a_Unicode_property_name);else if(void 0===e){C(ha.Unknown_Unicode_property_name,n,s-n);const e=Jt(r,Ds.keys(),dt);e&&C(ha.Did_you_mean_0,n,s-n,e)}const t=++s,i=U();if(s===t)C(ha.Expected_a_Unicode_property_value);else if(void 0!==e&&!Ps[e].has(i)){C(ha.Unknown_Unicode_property_value,t,s-t);const n=Jt(i,Ps[e],dt);n&&C(ha.Did_you_mean_0,t,s-t,n)}}else if(s===n)C(ha.Expected_a_Unicode_property_name_or_value);else if(Fs.has(r))p?e?C(ha.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class,n,s-n):y=!0:C(ha.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set,n,s-n);else if(!Ps.General_Category.has(r)&&!Es.has(r)){C(ha.Unknown_Unicode_property_name_or_value,n,s-n);const e=Jt(r,[...Ps.General_Category,...Es,...Fs],dt);e&&C(ha.Did_you_mean_0,n,s-n,e)}K(125),f||C(ha.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,t,s-t)}else{if(!h)return s--,!1;C(ha._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces,s-2,2,String.fromCharCode(n))}return!0}return!1}function U(){let e="";for(;;){const t=T(s);if(-1===t||!ts(t))break;e+=String.fromCharCode(t),s++}return e}function $(){const e=f?Cs(S(s)):1;return s+=e,e>0?m.substring(s-e,s):""}function K(e){T(s)===e?s++:C(ha._0_expected,s,0,String.fromCharCode(e))}x(!1),g(a,e=>{if(!(null==i?void 0:i.has(e.name))&&(C(ha.There_is_no_capturing_group_named_0_in_this_regular_expression,e.pos,e.end-e.pos,e.name),i)){const t=Jt(e.name,i,dt);t&&C(ha.Did_you_mean_0,e.pos,e.end-e.pos,t)}}),g(l,e=>{e.value>v&&(v?C(ha.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression,e.pos,e.end-e.pos,v):C(ha.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression,e.pos,e.end-e.pos))})}(r,!0,i)})}d=m.substring(_,s),u=14}return u},reScanTemplateToken:function(e){return s=_,u=I(!e)},reScanTemplateHeadOrNoSubstitutionTemplate:function(){return s=_,u=I(!0)},scanJsxIdentifier:function(){if(ya(u)){for(;s=c)return u=1;for(let t=k(s);s=0&&Xa(k(s-1))&&!(s+1{const e=b.getText();return e.slice(0,b.getTokenFullStart())+"â•‘"+e.slice(b.getTokenFullStart())}}),b;function x(e){return Ts(m,e)}function S(e){return e>=0&&e=0&&e=65&&e<=70)e+=32;else if(!(e>=48&&e<=57||e>=97&&e<=102))break;r.push(e),s++,o=!1}}return r.length=c){n+=m.substring(r,s),p|=4,C(ha.Unterminated_string_literal);break}const i=k(s);if(i===t){n+=m.substring(r,s),s++;break}if(92!==i||e){if((10===i||13===i)&&!e){n+=m.substring(r,s),p|=4,C(ha.Unterminated_string_literal);break}s++}else n+=m.substring(r,s),n+=O(3),r=s}return n}function I(e){const t=96===k(s);let n,r=++s,i="";for(;;){if(s>=c){i+=m.substring(r,s),p|=4,C(ha.Unterminated_template_literal),n=t?15:18;break}const o=k(s);if(96===o){i+=m.substring(r,s),s++,n=t?15:18;break}if(36===o&&s+1=c)return C(ha.Unexpected_end_of_text),"";const r=k(s);switch(s++,r){case 48:if(s>=c||!Ya(k(s)))return"\0";case 49:case 50:case 51:s=55296&&i<=56319&&s+6=56320&&n<=57343)return s=t,o+String.fromCharCode(n)}return o;case 120:for(;s1114111&&(e&&C(ha.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,n,s-n),o=!0),s>=c?(e&&C(ha.Unexpected_end_of_text),o=!0):125===k(s)?s++:(e&&C(ha.Unterminated_Unicode_escape_sequence),o=!0),o?(p|=2048,m.substring(t,s)):(p|=8,Ns(i))}function j(){if(s+5=0&&xs(r,e)){t+=L(!0),n=s;continue}if(r=j(),!(r>=0&&xs(r,e)))break;p|=1024,t+=m.substring(n,s),t+=Ns(r),n=s+=6}}return t+=m.substring(n,s),t}function B(){const e=d.length;if(e>=2&&e<=12){const e=d.charCodeAt(0);if(e>=97&&e<=122){const e=xa.get(d);if(void 0!==e)return u=e}}return u=80}function J(e){let t="",n=!1,r=!1;for(;;){const i=k(s);if(95!==i){if(n=!0,!Ya(i)||i-48>=e)break;t+=m[s],s++,r=!1}else p|=512,n?(n=!1,r=!0):C(r?ha.Multiple_consecutive_numeric_separators_are_not_permitted:ha.Numeric_separators_are_not_allowed_here,s,1),s++}return 95===k(s-1)&&C(ha.Numeric_separators_are_not_allowed_here,s-1,1),t}function z(){if(110===k(s))return d+="n",384&p&&(d=kT(d)+"n"),s++,10;{const e=128&p?parseInt(d.slice(2),2):256&p?parseInt(d.slice(2),8):+d;return d=""+e,9}}function q(){for(l=s,p=0;;){if(_=s,s>=c)return u=1;const r=x(s);if(0===s&&35===r&&ls(m,s)){if(s=_s(m,s),t)continue;return u=6}switch(r){case 10:case 13:if(p|=1,t){s++;continue}return 13===r&&s+1=0&&bs(i,e))return d=L(!0)+R(),u=B();const o=j();return o>=0&&bs(o,e)?(s+=6,p|=1024,d=String.fromCharCode(o)+R(),u=B()):(C(ha.Invalid_character),s++,u=0);case 35:if(0!==s&&"!"===m[s+1])return C(ha.can_only_be_used_at_the_start_of_a_file,s,2),s++,u=0;const a=x(s+1);if(92===a){s++;const t=M();if(t>=0&&bs(t,e))return d="#"+L(!0)+R(),u=81;const n=j();if(n>=0&&bs(n,e))return s+=6,p|=1024,d="#"+String.fromCharCode(n)+R(),u=81;s--}return bs(a,e)?(s++,V(a,e)):(d="#",C(ha.Invalid_character,s++,Cs(r))),u=81;case 65533:return C(ha.File_appears_to_be_binary,0,0),s=c,u=8;default:const l=V(r,e);if(l)return u=l;if(Xa(r)){s+=Cs(r);continue}if(Qa(r)){p|=1,s+=Cs(r);continue}const g=Cs(r);return C(ha.Invalid_character,s,g),s+=g,u=0}}}function U(){switch(v){case 0:return!0;case 1:return!1}return 3!==y&&4!==y||3!==v&&Pa.test(m.slice(l,s))}function V(e,t){let n=e;if(bs(n,t)){for(s+=Cs(n);s=c)return u=1;let t=k(s);if(60===t)return 47===k(s+1)?(s+=2,u=31):(s++,u=30);if(123===t)return s++,u=19;let n=0;for(;s0)break;Ga(t)||(n=s)}s++}return d=m.substring(l,s),-1===n?13:12}function H(){switch(l=s,k(s)){case 34:case 39:return d=A(!0),u=11;default:return q()}}function G(){if(l=_=s,p=0,s>=c)return u=1;const t=x(s);switch(s+=Cs(t),t){case 9:case 11:case 12:case 32:for(;s=0&&bs(t,e))return d=L(!0)+R(),u=B();const n=j();return n>=0&&bs(n,e)?(s+=6,p|=1024,d=String.fromCharCode(n)+R(),u=B()):(s++,u=0)}if(bs(t,e)){let n=t;for(;s=0),s=e,l=e,_=e,u=0,d=void 0,p=0}}function Ts(e,t){return e.codePointAt(t)}function Cs(e){return e>=65536?2:-1===e?0:1}var ws=String.fromCodePoint?e=>String.fromCodePoint(e):function(e){if(gn.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);const t=Math.floor((e-65536)/1024)+55296,n=(e-65536)%1024+56320;return String.fromCharCode(t,n)};function Ns(e){return ws(e)}var Ds=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"})),Es=new Set(["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"]),Fs=new Set(["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"]),Ps={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};function As(e){return wo(e)||ko(e)}function Is(e){return oe(e,_S,fS)}Ps.Script_Extensions=Ps.Script;var Os=new Map([[99,"lib.esnext.full.d.ts"],[11,"lib.es2024.full.d.ts"],[10,"lib.es2023.full.d.ts"],[9,"lib.es2022.full.d.ts"],[8,"lib.es2021.full.d.ts"],[7,"lib.es2020.full.d.ts"],[6,"lib.es2019.full.d.ts"],[5,"lib.es2018.full.d.ts"],[4,"lib.es2017.full.d.ts"],[3,"lib.es2016.full.d.ts"],[2,"lib.es6.d.ts"]]);function Ls(e){const t=wS(e);switch(t){case 99:case 11:case 10:case 9:case 8:case 7:case 6:case 5:case 4:case 3:case 2:return Os.get(t);default:return"lib.d.ts"}}function js(e){return e.start+e.length}function Ms(e){return 0===e.length}function Rs(e,t){return t>=e.start&&t=e.pos&&t<=e.end}function Js(e,t){return t.start>=e.start&&js(t)<=js(e)}function zs(e,t){return t.pos>=e.start&&t.end<=js(e)}function qs(e,t){return t.start>=e.pos&&js(t)<=e.end}function Us(e,t){return void 0!==Vs(e,t)}function Vs(e,t){const n=Xs(e,t);return n&&0===n.length?void 0:n}function Ws(e,t){return Ks(e.start,e.length,t.start,t.length)}function $s(e,t,n){return Ks(e.start,e.length,t,n)}function Ks(e,t,n,r){return n<=e+t&&n+r>=e}function Hs(e,t){return t<=js(e)&&t>=e.start}function Gs(e,t){return $s(t,e.pos,e.end-e.pos)}function Xs(e,t){const n=Math.max(e.start,t.start),r=Math.min(js(e),js(t));return n<=r?Zs(n,r):void 0}function Qs(e){e=e.filter(e=>e.length>0).sort((e,t)=>e.start!==t.start?e.start-t.start:e.length-t.length);const t=[];let n=0;for(;n=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e}function Sc(e){const t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function kc(e){return Sc(e.escapedText)}function Tc(e){const t=Ma(e.escapedText);return t?at(t,Ah):void 0}function Cc(e){return e.valueDeclaration&&t_(e.valueDeclaration)?kc(e.valueDeclaration.name):Sc(e.escapedName)}function wc(e){const t=e.parent.parent;if(t){if(hu(t))return Nc(t);switch(t.kind){case 244:if(t.declarationList&&t.declarationList.declarations[0])return Nc(t.declarationList.declarations[0]);break;case 245:let e=t.expression;switch(227===e.kind&&64===e.operatorToken.kind&&(e=e.left),e.kind){case 212:return e.name;case 213:const t=e.argumentExpression;if(fD(t))return t}break;case 218:return Nc(t.expression);case 257:if(hu(t.statement)||Q_(t.statement))return Nc(t.statement)}}}function Nc(e){const t=Ac(e);return t&&fD(t)?t:void 0}function Dc(e,t){return!(!Fc(e)||!fD(e.name)||kc(e.name)!==kc(t))||!(!ZE(e)||!X(e.declarationList.declarations,e=>Dc(e,t)))}function Ec(e){return e.name||wc(e)}function Fc(e){return!!e.name}function Pc(e){switch(e.kind){case 80:return e;case 349:case 342:{const{name:t}=e;if(167===t.kind)return t.right;break}case 214:case 227:{const t=e;switch(cg(t)){case 1:case 4:case 5:case 3:return gg(t.left);case 7:case 8:case 9:return t.arguments[1];default:return}}case 347:return Ec(e);case 341:return wc(e);case 278:{const{expression:t}=e;return fD(t)?t:void 0}case 213:const t=e;if(pg(t))return t.argumentExpression}return e.name}function Ac(e){if(void 0!==e)return Pc(e)||(NE(e)||DE(e)||JE(e)?Ic(e):void 0)}function Ic(e){if(e.parent){if(uP(e.parent)||hE(e.parent))return e.parent.name;if(LE(e.parent)&&e===e.parent.right){if(fD(e.parent.left))return e.parent.left;if(Px(e.parent.left))return gg(e.parent.left)}else if(hF(e.parent)&&fD(e.parent.name))return e.parent.name}}function Oc(e){if(Uv(e))return P(e.modifiers,ID)}function Lc(e){if(Lv(e,98303))return P(e.modifiers,a_)}function jc(e,t){if(e.name){if(fD(e.name)){const n=e.name.escapedText;return ul(e.parent,t).filter(e=>KP(e)&&fD(e.name)&&e.name.escapedText===n)}{const n=e.parent.parameters.indexOf(e);gn.assert(n>-1,"Parameters should always be in their parents' parameter list");const r=ul(e.parent,t).filter(KP);if(nQP(e)&&e.typeParameters.some(e=>e.name.escapedText===n))}function Jc(e){return Bc(e,!1)}function zc(e){return Bc(e,!0)}function qc(e){return!!pl(e,KP)}function Uc(e){return pl(e,OP)}function Vc(e){return fl(e,tA)}function Wc(e){return pl(e,jP)}function $c(e){return pl(e,RP)}function Kc(e){return pl(e,RP,!0)}function Hc(e){return pl(e,BP)}function Gc(e){return pl(e,BP,!0)}function Xc(e){return pl(e,JP)}function Qc(e){return pl(e,JP,!0)}function Yc(e){return pl(e,zP)}function Zc(e){return pl(e,zP,!0)}function el(e){return pl(e,qP,!0)}function tl(e){return pl(e,VP)}function nl(e){return pl(e,VP,!0)}function rl(e){return pl(e,$P)}function il(e){return pl(e,GP)}function ol(e){return pl(e,HP)}function al(e){return pl(e,QP)}function sl(e){return pl(e,nA)}function cl(e){const t=pl(e,XP);if(t&&t.typeExpression&&t.typeExpression.type)return t}function ll(e){let t=pl(e,XP);return!t&&AD(e)&&(t=T(Mc(e),e=>!!e.typeExpression)),t&&t.typeExpression&&t.typeExpression.type}function _l(e){const t=ol(e);if(t&&t.typeExpression)return t.typeExpression.type;const n=cl(e);if(n&&n.typeExpression){const e=n.typeExpression.type;if(XD(e)){const t=T(e.members,qD);return t&&t.type}if(KD(e)||DP(e))return e.type}}function ul(e,t){var n;if(!qg(e))return p;let r=null==(n=e.jsDoc)?void 0:n.jsDocCache;if(void 0===r||t){const n=Ug(e,t);gn.assert(n.length<2||n[0]!==n[1]),r=R(n,e=>PP(e)?e.tags:e),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=r)}return r}function dl(e){return ul(e,!1)}function pl(e,t,n){return T(ul(e,n),t)}function fl(e,t){return dl(e).filter(t)}function ml(e,t){return dl(e).filter(e=>e.kind===t)}function gl(e){return"string"==typeof e?e:null==e?void 0:e.map(e=>322===e.kind?e.text:function(e){const t=325===e.kind?"link":326===e.kind?"linkcode":"linkplain",n=e.name?Vp(e.name):"",r=e.name&&(""===e.text||e.text.startsWith("://"))?"":" ";return`{@${t} ${n}${r}${e.text}}`}(e)).join("")}function hl(e){if(IP(e)){if(UP(e.parent)){const t=Yg(e.parent);if(t&&m(t.tags))return R(t.tags,e=>QP(e)?e.typeParameters:void 0)}return p}if(Lg(e))return gn.assert(321===e.parent.kind),R(e.parent.tags,e=>QP(e)?e.typeParameters:void 0);if(e.typeParameters)return e.typeParameters;if(ZA(e)&&e.typeParameters)return e.typeParameters;if(Mm(e)){const t=Tv(e);if(t.length)return t;const n=ll(e);if(n&&KD(n)&&n.typeParameters)return n.typeParameters}return p}function yl(e){return e.constraint?e.constraint:QP(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function vl(e){return 80===e.kind||81===e.kind}function bl(e){return 179===e.kind||178===e.kind}function xl(e){return bE(e)&&!!(64&e.flags)}function Sl(e){return xE(e)&&!!(64&e.flags)}function kl(e){return SE(e)&&!!(64&e.flags)}function Tl(e){const t=e.kind;return!!(64&e.flags)&&(212===t||213===t||214===t||236===t)}function Cl(e){return Tl(e)&&!WE(e)&&!!e.questionDotToken}function wl(e){return Cl(e.parent)&&e.parent.expression===e}function Nl(e){return!Tl(e.parent)||Cl(e.parent)||e!==e.parent.expression}function Dl(e){return 227===e.kind&&61===e.operatorToken.kind}function El(e){return $D(e)&&fD(e.typeName)&&"const"===e.typeName.escapedText&&!e.typeArguments}function Fl(e){return LA(e,8)}function Pl(e){return WE(e)&&!!(64&e.flags)}function Al(e){return 253===e.kind||252===e.kind}function Il(e){return 281===e.kind||280===e.kind}function Ol(e){return 349===e.kind||342===e.kind}function Ll(e){return e>=167}function jl(e){return e>=0&&e<=166}function Ml(e){return jl(e.kind)}function Rl(e){return Ie(e,"pos")&&Ie(e,"end")}function Bl(e){return 9<=e&&e<=15}function Jl(e){return Bl(e.kind)}function zl(e){switch(e.kind){case 211:case 210:case 14:case 219:case 232:return!0}return!1}function ql(e){return 15<=e&&e<=18}function Ul(e){return ql(e.kind)}function Vl(e){const t=e.kind;return 17===t||18===t}function Wl(e){return BF(e)||UF(e)}function $l(e){switch(e.kind){case 277:return e.isTypeOnly||156===e.parent.parent.phaseModifier;case 275:return 156===e.parent.phaseModifier;case 274:return 156===e.phaseModifier;case 272:return e.isTypeOnly}return!1}function Kl(e){switch(e.kind){case 282:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 279:return e.isTypeOnly&&!!e.moduleSpecifier&&!e.exportClause;case 281:return e.parent.isTypeOnly}return!1}function Hl(e){return $l(e)||Kl(e)}function Gl(e){return void 0!==yc(e,Hl)}function Xl(e){return 11===e.kind||ql(e.kind)}function Ql(e){return QN(e)||fD(e)}function Yl(e){var t;return fD(e)&&void 0!==(null==(t=e.emitNode)?void 0:t.autoGenerate)}function Zl(e){var t;return mD(e)&&void 0!==(null==(t=e.emitNode)?void 0:t.autoGenerate)}function e_(e){const t=e.emitNode.autoGenerate.flags;return!!(32&t)&&!!(16&t)&&!!(8&t)}function t_(e){return(LD(e)||S_(e))&&mD(e.name)}function n_(e){return bE(e)&&mD(e.name)}function r_(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function i_(e){return!!(31&tb(e))}function o_(e){return i_(e)||126===e||164===e||129===e}function a_(e){return r_(e.kind)}function s_(e){const t=e.kind;return 167===t||80===t}function c_(e){const t=e.kind;return 80===t||81===t||11===t||9===t||168===t}function l_(e){const t=e.kind;return 80===t||207===t||208===t}function __(e){return!!e&&m_(e.kind)}function u_(e){return!!e&&(m_(e.kind)||RD(e))}function d_(e){return e&&f_(e.kind)}function p_(e){return 112===e.kind||97===e.kind}function f_(e){switch(e){case 263:case 175:case 177:case 178:case 179:case 219:case 220:return!0;default:return!1}}function m_(e){switch(e){case 174:case 180:case 324:case 181:case 182:case 185:case 318:case 186:return!0;default:return f_(e)}}function g_(e){return mP(e)||CF(e)||YE(e)&&__(e.parent)}function h_(e){const t=e.kind;return 177===t||173===t||175===t||178===t||179===t||182===t||176===t||241===t}function y_(e){return e&&(264===e.kind||232===e.kind)}function v_(e){return e&&(178===e.kind||179===e.kind)}function b_(e){return LD(e)&&zv(e)}function x_(e){return Mm(e)&&hC(e)?!(dg(e)&&vb(e.expression)||fg(e,!0)):e.parent&&y_(e.parent)&&LD(e)&&!zv(e)}function S_(e){switch(e.kind){case 175:case 178:case 179:return!0;default:return!1}}function k_(e){return a_(e)||ID(e)}function T_(e){const t=e.kind;return 181===t||180===t||172===t||174===t||182===t||178===t||179===t||355===t}function C_(e){return T_(e)||h_(e)}function w_(e){const t=e.kind;return 304===t||305===t||306===t||175===t||178===t||179===t}function N_(e){return Fx(e.kind)}function D_(e){switch(e.kind){case 185:case 186:return!0}return!1}function E_(e){if(e){const t=e.kind;return 208===t||207===t}return!1}function F_(e){const t=e.kind;return 210===t||211===t}function P_(e){const t=e.kind;return 209===t||233===t}function A_(e){switch(e.kind){case 261:case 170:case 209:return!0}return!1}function I_(e){return hF(e)||AD(e)||j_(e)||R_(e)}function O_(e){return L_(e)||M_(e)}function L_(e){switch(e.kind){case 207:case 211:return!0}return!1}function j_(e){switch(e.kind){case 209:case 304:case 305:case 306:return!0}return!1}function M_(e){switch(e.kind){case 208:case 210:return!0}return!1}function R_(e){switch(e.kind){case 209:case 233:case 231:case 210:case 211:case 80:case 212:case 213:return!0}return ub(e,!0)}function B_(e){const t=e.kind;return 212===t||167===t||206===t}function J_(e){const t=e.kind;return 212===t||167===t}function z_(e){return q_(e)||$T(e)}function q_(e){switch(e.kind){case 214:case 215:case 216:case 171:case 287:case 286:case 290:return!0;case 227:return 104===e.operatorToken.kind;default:return!1}}function U_(e){return 214===e.kind||215===e.kind}function V_(e){const t=e.kind;return 229===t||15===t}function W_(e){return $_(Fl(e).kind)}function $_(e){switch(e){case 212:case 213:case 215:case 214:case 285:case 286:case 289:case 216:case 210:case 218:case 211:case 232:case 219:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 229:case 97:case 106:case 110:case 112:case 108:case 236:case 234:case 237:case 102:case 283:return!0;default:return!1}}function K_(e){return H_(Fl(e).kind)}function H_(e){switch(e){case 225:case 226:case 221:case 222:case 223:case 224:case 217:return!0;default:return $_(e)}}function G_(e){switch(e.kind){case 226:return!0;case 225:return 46===e.operator||47===e.operator;default:return!1}}function X_(e){switch(e.kind){case 106:case 112:case 97:case 225:return!0;default:return Jl(e)}}function Q_(e){return function(e){switch(e){case 228:case 230:case 220:case 227:case 231:case 235:case 233:case 357:case 356:case 239:return!0;default:return H_(e)}}(Fl(e).kind)}function Y_(e){const t=e.kind;return 217===t||235===t}function Z_(e,t){switch(e.kind){case 249:case 250:case 251:case 247:case 248:return!0;case 257:return t&&Z_(e.statement,t)}return!1}function eu(e){return JF(e)||zF(e)}function tu(e){return X(e,eu)}function nu(e){return!(Lp(e)||JF(e)||Lv(e,32)||mp(e))}function ru(e){return Lp(e)||JF(e)||Lv(e,32)}function iu(e){return 250===e.kind||251===e.kind}function ou(e){return YE(e)||Q_(e)}function au(e){return YE(e)}function su(e){return yF(e)||Q_(e)}function cu(e){const t=e.kind;return 269===t||268===t||80===t}function lu(e){const t=e.kind;return 269===t||268===t}function _u(e){const t=e.kind;return 80===t||268===t}function uu(e){const t=e.kind;return 276===t||275===t}function du(e){return 268===e.kind||267===e.kind}function pu(e){switch(e.kind){case 220:case 227:case 209:case 214:case 180:case 264:case 232:case 176:case 177:case 186:case 181:case 213:case 267:case 307:case 278:case 279:case 282:case 263:case 219:case 185:case 178:case 80:case 274:case 272:case 277:case 182:case 265:case 339:case 341:case 318:case 342:case 349:case 324:case 347:case 323:case 292:case 293:case 294:case 201:case 175:case 174:case 268:case 203:case 281:case 271:case 275:case 215:case 15:case 9:case 211:case 170:case 212:case 304:case 173:case 172:case 179:case 305:case 308:case 306:case 11:case 266:case 188:case 169:case 261:return!0;default:return!1}}function fu(e){switch(e.kind){case 220:case 242:case 180:case 270:case 300:case 176:case 195:case 177:case 186:case 181:case 249:case 250:case 251:case 263:case 219:case 185:case 178:case 182:case 339:case 341:case 318:case 324:case 347:case 201:case 175:case 174:case 268:case 179:case 308:case 266:return!0;default:return!1}}function mu(e){return 263===e||283===e||264===e||265===e||266===e||267===e||268===e||273===e||272===e||279===e||278===e||271===e}function gu(e){return 253===e||252===e||260===e||247===e||245===e||243===e||250===e||251===e||249===e||246===e||257===e||254===e||256===e||258===e||259===e||244===e||248===e||255===e||354===e}function hu(e){return 169===e.kind?e.parent&&346!==e.parent.kind||Mm(e):220===(t=e.kind)||209===t||264===t||232===t||176===t||177===t||267===t||307===t||282===t||263===t||219===t||178===t||274===t||272===t||277===t||265===t||292===t||175===t||174===t||268===t||271===t||275===t||281===t||170===t||304===t||173===t||172===t||179===t||305===t||266===t||169===t||261===t||347===t||339===t||349===t||203===t;var t}function yu(e){return mu(e.kind)}function vu(e){return gu(e.kind)}function bu(e){const t=e.kind;return gu(t)||mu(t)||function(e){if(242!==e.kind)return!1;if(void 0!==e.parent&&(259===e.parent.kind||300===e.parent.kind))return!1;return!$f(e)}(e)}function xu(e){const t=e.kind;return gu(t)||mu(t)||242===t}function Su(e){const t=e.kind;return 284===t||167===t||80===t}function ku(e){const t=e.kind;return 110===t||80===t||212===t||296===t}function Tu(e){const t=e.kind;return 285===t||295===t||286===t||12===t||289===t}function Cu(e){const t=e.kind;return 292===t||294===t}function wu(e){const t=e.kind;return 11===t||295===t}function Nu(e){const t=e.kind;return 287===t||286===t}function Du(e){const t=e.kind;return 287===t||286===t||290===t}function Eu(e){const t=e.kind;return 297===t||298===t}function Fu(e){return e.kind>=310&&e.kind<=352}function Pu(e){return 321===e.kind||320===e.kind||322===e.kind||Vu(e)||Au(e)||AP(e)||IP(e)}function Au(e){return e.kind>=328&&e.kind<=352}function Iu(e){return 179===e.kind}function Ou(e){return 178===e.kind}function Lu(e){if(!qg(e))return!1;const{jsDoc:t}=e;return!!t&&t.length>0}function ju(e){return!!e.type}function Mu(e){return!!e.initializer}function Ru(e){switch(e.kind){case 261:case 170:case 209:case 173:case 304:case 307:return!0;default:return!1}}function Bu(e){return 292===e.kind||294===e.kind||w_(e)}function Ju(e){return 184===e.kind||234===e.kind}var zu=1073741823;function qu(e){let t=zu;for(const n of e){if(!n.length)continue;let e=0;for(;e0?n.parent.parameters[r-1]:void 0,o=t.text,a=i?Y(ys(o,is(o,i.end+1,!1,!0)),hs(o,e.pos)):ys(o,is(o,e.pos,!1,!0));return X(a)&&Ku(Te(a),t)}return!!g(n&&Cf(n,t),e=>Ku(e,t))}var Gu=[],Xu="tslib",Qu=160,Yu=1e6,Zu=500;function ed(e,t){const n=e.declarations;if(n)for(const e of n)if(e.kind===t)return e}function td(e,t){return P(e.declarations||p,e=>e.kind===t)}function nd(e){const t=new Map;if(e)for(const n of e)t.set(n.escapedName,n);return t}function rd(e){return!!(33554432&e.flags)}function id(e){return!!(1536&e.flags)&&34===e.escapedName.charCodeAt(0)}var od=function(){var e="";const t=t=>e+=t;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(e,n)=>t(e),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&Ga(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:ct,decreaseIndent:ct,clear:()=>e=""}}();function ad(e,t){return e.configFilePath!==t.configFilePath||function(e,t){return cd(e,t,HO)}(e,t)}function sd(e,t){return cd(e,t,XO)}function cd(e,t,n){return e!==t&&n.some(n=>!ST(ek(e,n),ek(t,n)))}function ld(e,t){for(;;){const n=t(e);if("quit"===n)return;if(void 0!==n)return n;if(mP(e))return;e=e.parent}}function _d(e,t){const n=e.entries();for(const[e,r]of n){const n=t(r,e);if(n)return n}}function ud(e,t){const n=e.keys();for(const e of n){const n=t(e);if(n)return n}}function dd(e,t){e.forEach((e,n)=>{t.set(n,e)})}function pd(e){const t=od.getText();try{return e(od),od.getText()}finally{od.clear(),od.writeKeyword(t)}}function fd(e){return e.end-e.pos}function md(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular}function gd(e,t){return e===t||e.resolvedModule===t.resolvedModule||!!e.resolvedModule&&!!t.resolvedModule&&e.resolvedModule.isExternalLibraryImport===t.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===t.resolvedModule.extension&&e.resolvedModule.resolvedFileName===t.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===t.resolvedModule.originalPath&&(n=e.resolvedModule.packageId,r=t.resolvedModule.packageId,n===r||!!n&&!!r&&n.name===r.name&&n.subModuleName===r.subModuleName&&n.version===r.version&&n.peerDependencies===r.peerDependencies)&&e.alternateResult===t.alternateResult;var n,r}function hd(e){return e.resolvedModule}function yd(e){return e.resolvedTypeReferenceDirective}function vd(e,t,n,r,i){var o;const a=null==(o=t.getResolvedModule(e,n,r))?void 0:o.alternateResult,s=a&&(2===DS(t.getCompilerOptions())?[ha.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler,[a]]:[ha.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,[a,a.includes(cR+"@types/")?`@types/${WR(i)}`:i]]),c=s?sS(void 0,s[0],...s[1]):t.typesPackageExists(i)?sS(void 0,ha.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,i,WR(i)):t.packageBundlesTypes(i)?sS(void 0,ha.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,i,n):sS(void 0,ha.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,n,WR(i));return c&&(c.repopulateInfo=()=>({moduleReference:n,mode:r,packageName:i===n?void 0:i})),c}function bd(e){const t=lT(e.fileName),n=e.packageJsonScope,r=".ts"===t?".mts":".js"===t?".mjs":void 0,i=n&&!n.contents.packageJsonContent.type?r?sS(void 0,ha.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,r,Uo(n.packageDirectory,"package.json")):sS(void 0,ha.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,Uo(n.packageDirectory,"package.json")):r?sS(void 0,ha.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,r):sS(void 0,ha.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module);return i.repopulateInfo=()=>!0,i}function xd({name:e,subModuleName:t}){return t?`${e}/${t}`:e}function Sd(e){return`${xd(e)}@${e.version}${e.peerDependencies??""}`}function kd(e,t){return e===t||e.resolvedTypeReferenceDirective===t.resolvedTypeReferenceDirective||!!e.resolvedTypeReferenceDirective&&!!t.resolvedTypeReferenceDirective&&e.resolvedTypeReferenceDirective.resolvedFileName===t.resolvedTypeReferenceDirective.resolvedFileName&&!!e.resolvedTypeReferenceDirective.primary==!!t.resolvedTypeReferenceDirective.primary&&e.resolvedTypeReferenceDirective.originalPath===t.resolvedTypeReferenceDirective.originalPath}function Td(e,t,n,r){gn.assert(e.length===t.length);for(let i=0;i=0),Va(t)[e]}function Pd(e){const t=wd(e),n=Ha(t,e.pos);return`${t.fileName}(${n.line+1},${n.character+1})`}function Ad(e,t){gn.assert(e>=0);const n=Va(t),r=e,i=t.text;if(r+1===n.length)return i.length-1;{const e=n[r];let t=n[r+1]-1;for(gn.assert(Qa(i.charCodeAt(t)));e<=t&&Qa(i.charCodeAt(t));)t--;return t}}function Id(e,t,n){return!(n&&n(t)||e.identifiers.has(t))}function Od(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function Ld(e){return!Od(e)}function jd(e,t){return PD(e)?t===e.expression:RD(e)?t===e.modifiers:OD(e)?t===e.initializer:LD(e)?t===e.questionToken&&b_(e):uP(e)?t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Md(e.modifiers,t,k_):dP(e)?t===e.equalsToken||t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Md(e.modifiers,t,k_):MD(e)?t===e.exclamationToken:BD(e)?t===e.typeParameters||t===e.type||Md(e.typeParameters,t,PD):JD(e)?t===e.typeParameters||Md(e.typeParameters,t,PD):zD(e)?t===e.typeParameters||t===e.type||Md(e.typeParameters,t,PD):!!NF(e)&&(t===e.modifiers||Md(e.modifiers,t,k_))}function Md(e,t,n){return!(!e||nt(t)||!n(t))&&D(e,t)}function Rd(e,t,n){if(void 0===t||0===t.length)return e;let r=0;for(;r[`${Ha(e,t.range.end).line}`,t])),r=new Map;return{getUnusedExpectations:function(){return Be(n.entries()).filter(([e,t])=>0===t.type&&!r.get(e)).map(([e,t])=>t)},markUsed:function(e){if(!n.has(`${e}`))return!1;return r.set(`${e}`,!0),!0}}}function Hd(e,t,n){if(Od(e))return e.pos;if(Fu(e)||12===e.kind)return is((t??wd(e)).text,e.pos,!1,!0);if(n&&Lu(e))return Hd(e.jsDoc[0],t);if(353===e.kind){t??(t=wd(e));const r=ve(cA(e,t));if(r)return Hd(r,t,n)}return is((t??wd(e)).text,e.pos,!1,!1,Jm(e))}function Gd(e,t){const n=!Od(e)&&II(e)?C(e.modifiers,ID):void 0;return n?is((t||wd(e)).text,n.end):Hd(e,t)}function Xd(e,t){const n=!Od(e)&&II(e)&&e.modifiers?Te(e.modifiers):void 0;return n?is((t||wd(e)).text,n.end):Hd(e,t)}function Qd(e,t,n=!1){return np(e.text,t,n)}function Yd(e){return!!(zF(e)&&e.exportClause&&MF(e.exportClause)&&tp(e.exportClause.name))}function Zd(e){return 11===e.kind?e.text:Sc(e.escapedText)}function ep(e){return 11===e.kind?xc(e.text):e.escapedText}function tp(e){return"default"===(11===e.kind?e.text:e.escapedText)}function np(e,t,n=!1){if(Od(t))return"";let r=e.substring(n?t.pos:is(e,t.pos),t.end);return function(e){return!!yc(e,hP)}(t)&&(r=r.split(/\r\n|\n|\r/).map(e=>e.replace(/^\s*\*/,"").trimStart()).join("\n")),r}function rp(e,t=!1){return Qd(wd(e),e,t)}function ip(e){return e.pos}function op(e,t){return Ee(e,t,ip,Tt)}function ap(e){const t=e.emitNode;return t&&t.flags||0}function sp(e){const t=e.emitNode;return t&&t.internalFlags||0}var cp=ht(()=>new Map(Object.entries({Array:new Map(Object.entries({es2015:["find","findIndex","fill","copyWithin","entries","keys","values"],es2016:["includes"],es2019:["flat","flatMap"],es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Iterator:new Map(Object.entries({es2015:p})),AsyncIterator:new Map(Object.entries({es2015:p})),ArrayBuffer:new Map(Object.entries({es2024:["maxByteLength","resizable","resize","detached","transfer","transferToFixedLength"]})),Atomics:new Map(Object.entries({es2017:["add","and","compareExchange","exchange","isLockFree","load","or","store","sub","wait","notify","xor"],es2024:["waitAsync"],esnext:["pause"]})),SharedArrayBuffer:new Map(Object.entries({es2017:["byteLength","slice"],es2024:["growable","maxByteLength","grow"]})),AsyncIterable:new Map(Object.entries({es2018:p})),AsyncIterableIterator:new Map(Object.entries({es2018:p})),AsyncGenerator:new Map(Object.entries({es2018:p})),AsyncGeneratorFunction:new Map(Object.entries({es2018:p})),RegExp:new Map(Object.entries({es2015:["flags","sticky","unicode"],es2018:["dotAll"],es2024:["unicodeSets"]})),Reflect:new Map(Object.entries({es2015:["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"]})),ArrayConstructor:new Map(Object.entries({es2015:["from","of"],esnext:["fromAsync"]})),ObjectConstructor:new Map(Object.entries({es2015:["assign","getOwnPropertySymbols","keys","is","setPrototypeOf"],es2017:["values","entries","getOwnPropertyDescriptors"],es2019:["fromEntries"],es2022:["hasOwn"],es2024:["groupBy"]})),NumberConstructor:new Map(Object.entries({es2015:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"]})),Math:new Map(Object.entries({es2015:["clz32","imul","sign","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","fround","cbrt"],esnext:["f16round"]})),Map:new Map(Object.entries({es2015:["entries","keys","values"]})),MapConstructor:new Map(Object.entries({es2024:["groupBy"]})),Set:new Map(Object.entries({es2015:["entries","keys","values"],esnext:["union","intersection","difference","symmetricDifference","isSubsetOf","isSupersetOf","isDisjointFrom"]})),PromiseConstructor:new Map(Object.entries({es2015:["all","race","reject","resolve"],es2020:["allSettled"],es2021:["any"],es2024:["withResolvers"]})),Symbol:new Map(Object.entries({es2015:["for","keyFor"],es2019:["description"]})),WeakMap:new Map(Object.entries({es2015:["entries","keys","values"]})),WeakSet:new Map(Object.entries({es2015:["entries","keys","values"]})),String:new Map(Object.entries({es2015:["codePointAt","includes","endsWith","normalize","repeat","startsWith","anchor","big","blink","bold","fixed","fontcolor","fontsize","italics","link","small","strike","sub","sup"],es2017:["padStart","padEnd"],es2019:["trimStart","trimEnd","trimLeft","trimRight"],es2020:["matchAll"],es2021:["replaceAll"],es2022:["at"],es2024:["isWellFormed","toWellFormed"]})),StringConstructor:new Map(Object.entries({es2015:["fromCodePoint","raw"]})),DateTimeFormat:new Map(Object.entries({es2017:["formatToParts"]})),Promise:new Map(Object.entries({es2015:p,es2018:["finally"]})),RegExpMatchArray:new Map(Object.entries({es2018:["groups"]})),RegExpExecArray:new Map(Object.entries({es2018:["groups"]})),Intl:new Map(Object.entries({es2018:["PluralRules"]})),NumberFormat:new Map(Object.entries({es2018:["formatToParts"]})),SymbolConstructor:new Map(Object.entries({es2020:["matchAll"],esnext:["metadata","dispose","asyncDispose"]})),DataView:new Map(Object.entries({es2020:["setBigInt64","setBigUint64","getBigInt64","getBigUint64"],esnext:["setFloat16","getFloat16"]})),BigInt:new Map(Object.entries({es2020:p})),RelativeTimeFormat:new Map(Object.entries({es2020:["format","formatToParts","resolvedOptions"]})),Int8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint8ClampedArray:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Int16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Int32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Uint32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Float16Array:new Map(Object.entries({esnext:p})),Float32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Float64Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),BigInt64Array:new Map(Object.entries({es2020:p,es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),BigUint64Array:new Map(Object.entries({es2020:p,es2022:["at"],es2023:["findLastIndex","findLast","toReversed","toSorted","toSpliced","with"]})),Error:new Map(Object.entries({es2022:["cause"]}))}))),lp=(e=>(e[e.None=0]="None",e[e.NeverAsciiEscape=1]="NeverAsciiEscape",e[e.JsxAttributeEscape=2]="JsxAttributeEscape",e[e.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",e[e.AllowNumericSeparator=8]="AllowNumericSeparator",e))(lp||{});function _p(e,t,n){if(t&&function(e,t){if(sy(e)||!e.parent||4&t&&e.isUnterminated)return!1;if(GN(e)){if(26656&e.numericLiteralFlags)return!1;if(512&e.numericLiteralFlags)return!!(8&t)}return!XN(e)}(e,n))return Qd(t,e);switch(e.kind){case 11:{const t=2&n?Ly:1&n||16777216&ap(e)?Dy:Fy;return e.singleQuote?"'"+t(e.text,39)+"'":'"'+t(e.text,34)+'"'}case 15:case 16:case 17:case 18:{const t=1&n||16777216&ap(e)?Dy:Fy,r=e.rawText??vy(t(e.text,96));switch(e.kind){case 15:return"`"+r+"`";case 16:return"`"+r+"${";case 17:return"}"+r+"${";case 18:return"}"+r+"`"}break}case 9:case 10:return e.text;case 14:return 4&n&&e.isUnterminated?e.text+(92===e.text.charCodeAt(e.text.length-1)?" /":"/"):e.text}return gn.fail(`Literal kind '${e.kind}' not accounted for.`)}function up(e){return it(e)?`"${Dy(e)}"`:""+e}function dp(e){return jo(e).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function pp(e){return!!(7&pc(e))||fp(e)}function fp(e){const t=oy(e);return 261===t.kind&&300===t.parent.kind}function mp(e){return TF(e)&&(11===e.name.kind||bp(e))}function gp(e){return TF(e)&&11===e.name.kind}function hp(e){return TF(e)&&QN(e.name)}function yp(e){return!!(t=e.valueDeclaration)&&268===t.kind&&!t.body;var t}function vp(e){return 308===e.kind||268===e.kind||u_(e)}function bp(e){return!!(2048&e.flags)}function xp(e){return mp(e)&&Sp(e)}function Sp(e){switch(e.parent.kind){case 308:return fO(e.parent);case 269:return mp(e.parent.parent)&&mP(e.parent.parent.parent)&&!fO(e.parent.parent.parent)}return!1}function kp(e){var t;return null==(t=e.declarations)?void 0:t.find(e=>!(xp(e)||TF(e)&&bp(e)))}function Tp(e,t){return fO(e)||(1===(n=NS(t))||100<=n&&n<=199)&&!!e.commonJsModuleIndicator;var n}function Cp(e,t){switch(e.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return!e.isDeclarationFile&&(!!HS(t,"alwaysStrict")||(!!EA(e.statements)||!(!fO(e)&&!FS(t))))}function wp(e){return!!(33554432&e.flags)||Lv(e,128)}function Np(e,t){switch(e.kind){case 308:case 270:case 300:case 268:case 249:case 250:case 251:case 177:case 175:case 178:case 179:case 263:case 219:case 220:case 173:case 176:return!0;case 242:return!u_(t)}return!1}function Dp(e){switch(gn.type(e),e.kind){case 339:case 347:case 324:return!0;default:return Ep(e)}}function Ep(e){switch(gn.type(e),e.kind){case 180:case 181:case 174:case 182:case 185:case 186:case 318:case 264:case 232:case 265:case 266:case 346:case 263:case 175:case 177:case 178:case 179:case 219:case 220:return!0;default:return!1}}function Fp(e){switch(e.kind){case 273:case 272:return!0;default:return!1}}function Pp(e){return Fp(e)||Vm(e)}function Ap(e){return Fp(e)||Km(e)}function Ip(e){switch(e.kind){case 273:case 272:case 244:case 264:case 263:case 268:case 266:case 265:case 267:return!0;default:return!1}}function Op(e){return Lp(e)||TF(e)||dE(e)||hf(e)}function Lp(e){return Fp(e)||zF(e)}function jp(e){return yc(e.parent,e=>!!(1&pB(e)))}function Mp(e){return yc(e.parent,e=>Np(e,e.parent))}function Rp(e,t){let n=Mp(e);for(;n;)t(n),n=Mp(n)}function Bp(e){return e&&0!==fd(e)?rp(e):"(Missing)"}function Jp(e){return e.declaration?Bp(e.declaration.parameters[0].name):void 0}function zp(e){return 168===e.kind&&!Uh(e.expression)}function qp(e){var t;switch(e.kind){case 80:case 81:return(null==(t=e.emitNode)?void 0:t.autoGenerate)?void 0:e.escapedText;case 11:case 9:case 10:case 15:return xc(e.text);case 168:return Uh(e.expression)?xc(e.expression.text):void 0;case 296:return dC(e);default:return gn.assertNever(e)}}function Up(e){return gn.checkDefined(qp(e))}function Vp(e){switch(e.kind){case 110:return"this";case 81:case 80:return 0===fd(e)?kc(e):rp(e);case 167:return Vp(e.left)+"."+Vp(e.right);case 212:return fD(e.name)||mD(e.name)?Vp(e.expression)+"."+Vp(e.name):gn.assertNever(e.name);case 312:return Vp(e.left)+"#"+Vp(e.right);case 296:return Vp(e.namespace)+":"+Vp(e.name);default:return gn.assertNever(e)}}function Wp(e,t,...n){return Kp(wd(e),e,t,...n)}function $p(e,t,n,...r){const i=is(e.text,t.pos);return rS(e,i,t.end-i,n,...r)}function Kp(e,t,n,...r){const i=of(e,t);return rS(e,i.start,i.length,n,...r)}function Hp(e,t,n,r){const i=of(e,t);return Qp(e,i.start,i.length,n,r)}function Gp(e,t,n,r){const i=is(e.text,t.pos);return Qp(e,i,t.end-i,n,r)}function Xp(e,t,n){gn.assertGreaterThanOrEqual(t,0),gn.assertGreaterThanOrEqual(n,0),gn.assertLessThanOrEqual(t,e.length),gn.assertLessThanOrEqual(t+n,e.length)}function Qp(e,t,n,r,i){return Xp(e.text,t,n),{file:e,start:t,length:n,code:r.code,category:r.category,messageText:r.next?r:r.messageText,relatedInformation:i,canonicalHead:r.canonicalHead}}function Yp(e,t,n){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:n}}function Zp(e){return"string"==typeof e.messageText?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function ef(e,t,n){return{file:e,start:t.pos,length:t.end-t.pos,code:n.code,category:n.category,messageText:n.message}}function tf(e,...t){return{code:e.code,messageText:iS(e,...t)}}function nf(e,t){const n=ks(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);n.scan();return Zs(n.getTokenStart(),n.getTokenEnd())}function rf(e,t){const n=ks(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);return n.scan(),n.getToken()}function of(e,t){let n=t;switch(t.kind){case 308:{const t=is(e.text,0,!1);return t===e.text.length?Ys(0,0):nf(e,t)}case 261:case 209:case 264:case 232:case 265:case 268:case 267:case 307:case 263:case 219:case 175:case 178:case 179:case 266:case 173:case 172:case 275:n=t.name;break;case 220:return function(e,t){const n=is(e.text,t.pos);if(t.body&&242===t.body.kind){const{line:r}=Ha(e,t.body.pos),{line:i}=Ha(e,t.body.end);if(r0?t.statements[0].pos:t.end);case 254:case 230:return nf(e,is(e.text,t.pos));case 239:return nf(e,is(e.text,t.expression.end));case 351:return nf(e,is(e.text,t.tagName.pos));case 177:{const n=t,r=is(e.text,n.pos),i=ks(e.languageVersion,!0,e.languageVariant,e.text,void 0,r);let o=i.scan();for(;137!==o&&1!==o;)o=i.scan();return Zs(r,i.getTokenEnd())}}if(void 0===n)return nf(e,t.pos);gn.assert(!PP(n));const r=Od(n),i=r||YN(t)?n.pos:is(e.text,n.pos);return r?(gn.assert(i===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),gn.assert(i===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(gn.assert(i>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),gn.assert(i<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Zs(i,n.end)}function af(e){return 308===e.kind&&!sf(e)}function sf(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)}function cf(e){return 6===e.scriptKind}function lf(e){return!!(4096&uc(e))}function _f(e){return!(!(8&uc(e))||ac(e,e.parent))}function uf(e){return 6==(7&pc(e))}function df(e){return 4==(7&pc(e))}function pf(e){return 2==(7&pc(e))}function ff(e){const t=7&pc(e);return 2===t||4===t||6===t}function mf(e){return 1==(7&pc(e))}function gf(e){return 214===e.kind&&108===e.expression.kind}function hf(e){if(214!==e.kind)return!1;const t=e.expression;return 102===t.kind||$E(t)&&102===t.keywordToken&&"defer"===t.name.escapedText}function yf(e){return $E(e)&&102===e.keywordToken&&"meta"===e.name.escapedText}function vf(e){return dE(e)&&uE(e.argument)&&QN(e.argument.literal)}function bf(e){return 245===e.kind&&11===e.expression.kind}function xf(e){return!!(2097152&ap(e))}function Sf(e){return xf(e)&&vF(e)}function kf(e){return fD(e.name)&&!e.initializer}function Tf(e){return xf(e)&&ZE(e)&&k(e.declarationList.declarations,kf)}function Cf(e,t){return 12!==e.kind?hs(t.text,e.pos):void 0}function wf(e,t){return P(170===e.kind||169===e.kind||219===e.kind||220===e.kind||218===e.kind||261===e.kind||282===e.kind?Y(ys(t,e.pos),hs(t,e.pos)):hs(t,e.pos),n=>n.end<=e.end&&42===t.charCodeAt(n.pos+1)&&42===t.charCodeAt(n.pos+2)&&47!==t.charCodeAt(n.pos+3))}var Nf=/^\/\/\/\s*/,Df=/^\/\/\/\s*/,Ef=/^\/\/\/\s*/,Ff=/^\/\/\/\s*/,Pf=/^\/\/\/\s*/,Af=/^\/\/\/\s*/;function If(e){if(183<=e.kind&&e.kind<=206)return!0;switch(e.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return 223!==e.parent.kind;case 234:return Of(e);case 169:return 201===e.parent.kind||196===e.parent.kind;case 80:(167===e.parent.kind&&e.parent.right===e||212===e.parent.kind&&e.parent.name===e)&&(e=e.parent),gn.assert(80===e.kind||167===e.kind||212===e.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 167:case 212:case 110:{const{parent:t}=e;if(187===t.kind)return!1;if(206===t.kind)return!t.isTypeOf;if(183<=t.kind&&t.kind<=206)return!0;switch(t.kind){case 234:return Of(t);case 169:case 346:return e===t.constraint;case 173:case 172:case 170:case 261:case 263:case 219:case 220:case 177:case 175:case 174:case 178:case 179:case 180:case 181:case 182:case 217:return e===t.type;case 214:case 215:case 216:return D(t.typeArguments,e)}}}return!1}function Of(e){return tA(e.parent)||OP(e.parent)||lP(e.parent)&&!pb(e)}function Lf(e,t){return function e(n){switch(n.kind){case 254:return t(n);case 270:case 242:case 246:case 247:case 248:case 249:case 250:case 251:case 255:case 256:case 297:case 298:case 257:case 259:case 300:return sO(n,e)}}(e)}function jf(e,t){return function e(n){switch(n.kind){case 230:t(n);const r=n.expression;return void(r&&e(r));case 267:case 265:case 268:case 266:return;default:if(__(n)){if(n.name&&168===n.name.kind)return void e(n.name.expression)}else If(n)||sO(n,e)}}(e)}function Mf(e){return e&&189===e.kind?e.elementType:e&&184===e.kind?Ce(e.typeArguments):void 0}function Rf(e){switch(e.kind){case 265:case 264:case 232:case 188:return e.members;case 211:return e.properties}}function Bf(e){if(e)switch(e.kind){case 209:case 307:case 170:case 304:case 173:case 172:case 305:case 261:return!0}return!1}function Jf(e){return 262===e.parent.kind&&244===e.parent.parent.kind}function zf(e){return!!Mm(e)&&(vE(e.parent)&&LE(e.parent.parent)&&2===cg(e.parent.parent)||qf(e.parent))}function qf(e){return!!Mm(e)&&(LE(e)&&1===cg(e))}function Uf(e){return(hF(e)?pf(e)&&fD(e.name)&&Jf(e):LD(e)?qv(e)&&Mv(e):OD(e)&&qv(e))||qf(e)}function Vf(e){switch(e.kind){case 175:case 174:case 177:case 178:case 179:case 263:case 219:return!0}return!1}function Wf(e,t){for(;;){if(t&&t(e),257!==e.statement.kind)return e.statement;e=e.statement}}function $f(e){return e&&242===e.kind&&__(e.parent)}function Kf(e){return e&&175===e.kind&&211===e.parent.kind}function Hf(e){return!(175!==e.kind&&178!==e.kind&&179!==e.kind||211!==e.parent.kind&&232!==e.parent.kind)}function Gf(e){return e&&1===e.kind}function Xf(e){return e&&0===e.kind}function Qf(e,t,n,r){return g(null==e?void 0:e.properties,e=>{if(!uP(e))return;const i=qp(e.name);return t===i||r&&r===i?n(e):void 0})}function Yf(e){if(e&&e.statements.length){return at(e.statements[0].expression,vE)}}function Zf(e,t,n){return em(e,t,e=>yE(e.initializer)?T(e.initializer.elements,e=>QN(e)&&e.text===n):void 0)}function em(e,t,n){return Qf(Yf(e),t,n)}function tm(e){return yc(e.parent,__)}function nm(e){return yc(e.parent,d_)}function rm(e){return yc(e.parent,y_)}function im(e){return yc(e.parent,e=>y_(e)||__(e)?"quit":RD(e))}function om(e){return yc(e.parent,u_)}function am(e){const t=yc(e.parent,e=>y_(e)?"quit":ID(e));return t&&y_(t.parent)?rm(t.parent):rm(t??e)}function sm(e,t,n){for(gn.assert(308!==e.kind);;){if(!(e=e.parent))return gn.fail();switch(e.kind){case 168:if(n&&y_(e.parent.parent))return e;e=e.parent.parent;break;case 171:170===e.parent.kind&&h_(e.parent.parent)?e=e.parent.parent:h_(e.parent)&&(e=e.parent);break;case 220:if(!t)continue;case 263:case 219:case 268:case 176:case 173:case 172:case 175:case 174:case 177:case 178:case 179:case 180:case 181:case 182:case 267:case 308:return e}}}function cm(e){switch(e.kind){case 220:case 263:case 219:case 173:return!0;case 242:switch(e.parent.kind){case 177:case 175:case 178:case 179:return!0;default:return!1}default:return!1}}function lm(e){fD(e)&&(bF(e.parent)||vF(e.parent))&&e.parent.name===e&&(e=e.parent);return mP(sm(e,!0,!1))}function _m(e){const t=sm(e,!1,!1);if(t)switch(t.kind){case 177:case 263:case 219:return t}}function um(e,t){for(;;){if(!(e=e.parent))return;switch(e.kind){case 168:e=e.parent;break;case 263:case 219:case 220:if(!t)continue;case 173:case 172:case 175:case 174:case 177:case 178:case 179:case 176:return e;case 171:170===e.parent.kind&&h_(e.parent.parent)?e=e.parent.parent:h_(e.parent)&&(e=e.parent)}}}function dm(e){if(219===e.kind||220===e.kind){let t=e,n=e.parent;for(;218===n.kind;)t=n,n=n.parent;if(214===n.kind&&n.expression===t)return n}}function pm(e){const t=e.kind;return(212===t||213===t)&&108===e.expression.kind}function fm(e){const t=e.kind;return(212===t||213===t)&&110===e.expression.kind}function mm(e){var t;return!!e&&hF(e)&&110===(null==(t=e.initializer)?void 0:t.kind)}function gm(e){return!!e&&(dP(e)||uP(e))&&LE(e.parent.parent)&&64===e.parent.parent.operatorToken.kind&&110===e.parent.parent.right.kind}function hm(e){switch(e.kind){case 184:return e.typeName;case 234:return fb(e.expression)?e.expression:void 0;case 80:case 167:return e}}function ym(e){switch(e.kind){case 216:return e.tag;case 287:case 286:return e.tagName;case 227:return e.right;case 290:return e;default:return e.expression}}function vm(e,t,n,r){if(e&&Fc(t)&&mD(t.name))return!1;switch(t.kind){case 264:return!0;case 232:return!e;case 173:return void 0!==n&&(e?bF(n):y_(n)&&!Bv(t)&&!Jv(t));case 178:case 179:case 175:return void 0!==t.body&&void 0!==n&&(e?bF(n):y_(n));case 170:return!!e&&(void 0!==n&&void 0!==n.body&&(177===n.kind||175===n.kind||179===n.kind)&&fv(n)!==t&&void 0!==r&&264===r.kind)}return!1}function bm(e,t,n,r){return Uv(t)&&vm(e,t,n,r)}function xm(e,t,n,r){return bm(e,t,n,r)||Sm(e,t,n)}function Sm(e,t,n){switch(t.kind){case 264:return X(t.members,r=>xm(e,r,t,n));case 232:return!e&&X(t.members,r=>xm(e,r,t,n));case 175:case 179:case 177:return X(t.parameters,r=>bm(e,r,t,n));default:return!1}}function km(e,t){if(bm(e,t))return!0;const n=uv(t);return!!n&&Sm(e,n,t)}function Tm(e,t,n){let r;if(v_(t)){const{firstAccessor:e,secondAccessor:i,setAccessor:o}=bv(n.members,t),a=Uv(e)?e:i&&Uv(i)?i:void 0;if(!a||t!==a)return!1;r=null==o?void 0:o.parameters}else MD(t)&&(r=t.parameters);if(bm(e,t,n))return!0;if(r)for(const i of r)if(!mv(i)&&bm(e,i,t,n))return!0;return!1}function Cm(e){if(e.textSourceNode){switch(e.textSourceNode.kind){case 11:return Cm(e.textSourceNode);case 15:return""===e.text}return!1}return""===e.text}function wm(e){const{parent:t}=e;return(287===t.kind||286===t.kind||288===t.kind)&&t.tagName===e}function Nm(e){switch(e.kind){case 108:case 106:case 112:case 97:case 14:case 210:case 211:case 212:case 213:case 214:case 215:case 216:case 235:case 217:case 239:case 236:case 218:case 219:case 232:case 220:case 223:case 221:case 222:case 225:case 226:case 227:case 228:case 231:case 229:case 233:case 285:case 286:case 289:case 230:case 224:return!0;case 237:return!hf(e.parent)||e.parent.expression!==e;case 234:return!lP(e.parent)&&!OP(e.parent);case 167:for(;167===e.parent.kind;)e=e.parent;return 187===e.parent.kind||Vu(e.parent)||yP(e.parent)||vP(e.parent)||wm(e);case 312:for(;vP(e.parent);)e=e.parent;return 187===e.parent.kind||Vu(e.parent)||yP(e.parent)||vP(e.parent)||wm(e);case 81:return LE(e.parent)&&e.parent.left===e&&103===e.parent.operatorToken.kind;case 80:if(187===e.parent.kind||Vu(e.parent)||yP(e.parent)||vP(e.parent)||wm(e))return!0;case 9:case 10:case 11:case 15:case 110:return Dm(e);default:return!1}}function Dm(e){const{parent:t}=e;switch(t.kind){case 261:case 170:case 173:case 172:case 307:case 304:case 209:return t.initializer===e;case 245:case 246:case 247:case 248:case 254:case 255:case 256:case 297:case 258:return t.expression===e;case 249:const n=t;return n.initializer===e&&262!==n.initializer.kind||n.condition===e||n.incrementor===e;case 250:case 251:const r=t;return r.initializer===e&&262!==r.initializer.kind||r.expression===e;case 217:case 235:case 240:case 168:case 239:return e===t.expression;case 171:case 295:case 294:case 306:return!0;case 234:return t.expression===e&&!If(t);case 305:return t.objectAssignmentInitializer===e;default:return Nm(t)}}function Em(e){for(;167===e.kind||80===e.kind;)e=e.parent;return 187===e.kind}function Fm(e){return MF(e)&&!!e.parent.moduleSpecifier}function Pm(e){return 272===e.kind&&284===e.moduleReference.kind}function Am(e){return gn.assert(Pm(e)),e.moduleReference.expression}function Im(e){return Vm(e)&&Ox(e.initializer).arguments[0]}function Om(e){return 272===e.kind&&284!==e.moduleReference.kind}function Lm(e){return 308===(null==e?void 0:e.kind)}function jm(e){return Mm(e)}function Mm(e){return!!e&&!!(524288&e.flags)}function Rm(e){return!!e&&!!(134217728&e.flags)}function Bm(e){return!cf(e)}function Jm(e){return!!e&&!!(16777216&e.flags)}function zm(e){return $D(e)&&fD(e.typeName)&&"Object"===e.typeName.escapedText&&e.typeArguments&&2===e.typeArguments.length&&(154===e.typeArguments[0].kind||150===e.typeArguments[0].kind)}function qm(e,t){if(214!==e.kind)return!1;const{expression:n,arguments:r}=e;if(80!==n.kind||"require"!==n.escapedText)return!1;if(1!==r.length)return!1;const i=r[0];return!t||Uu(i)}function Um(e){return $m(e,!1)}function Vm(e){return $m(e,!0)}function Wm(e){return hE(e)&&Vm(e.parent.parent)}function $m(e,t){return hF(e)&&!!e.initializer&&qm(t?Ox(e.initializer):e.initializer,!0)}function Km(e){return ZE(e)&&e.declarationList.declarations.length>0&&k(e.declarationList.declarations,e=>Um(e))}function Hm(e){return 39===e||34===e}function Gm(e,t){return 34===Qd(t,e).charCodeAt(0)}function Xm(e){return LE(e)||Px(e)||fD(e)||SE(e)}function Qm(e){return Mm(e)&&e.initializer&&LE(e.initializer)&&(57===e.initializer.operatorToken.kind||61===e.initializer.operatorToken.kind)&&e.name&&fb(e.name)&&rg(e.name,e.initializer.left)?e.initializer.right:e.initializer}function Ym(e){const t=Qm(e);return t&&eg(t,vb(e.name))}function Zm(e){if(e&&e.parent&&LE(e.parent)&&64===e.parent.operatorToken.kind){const t=vb(e.parent.left);return eg(e.parent.right,t)||function(e,t,n){const r=LE(t)&&(57===t.operatorToken.kind||61===t.operatorToken.kind)&&eg(t.right,n);if(r&&rg(e,t.left))return r}(e.parent.left,e.parent.right,t)}if(e&&SE(e)&&lg(e)){const t=function(e,t){return g(e.properties,e=>uP(e)&&fD(e.name)&&"value"===e.name.escapedText&&e.initializer&&eg(e.initializer,t))}(e.arguments[2],"prototype"===e.arguments[1].text);if(t)return t}}function eg(e,t){if(SE(e)){const t=ph(e.expression);return 219===t.kind||220===t.kind?e:void 0}return 219===e.kind||232===e.kind||220===e.kind||vE(e)&&(0===e.properties.length||t)?e:void 0}function tg(e){const t=hF(e.parent)?e.parent.name:LE(e.parent)&&64===e.parent.operatorToken.kind?e.parent.left:void 0;return t&&eg(e.right,vb(t))&&fb(t)&&rg(t,e.left)}function ng(e){if(LE(e.parent)){const t=57!==e.parent.operatorToken.kind&&61!==e.parent.operatorToken.kind||!LE(e.parent.parent)?e.parent:e.parent.parent;if(64===t.operatorToken.kind&&fD(t.left))return t.left}else if(hF(e.parent))return e.parent.name}function rg(e,t){return Hh(e)&&Hh(t)?Gh(e)===Gh(t):vl(e)&&_g(t)&&(110===t.expression.kind||fD(t.expression)&&("window"===t.expression.escapedText||"self"===t.expression.escapedText||"global"===t.expression.escapedText))?rg(e,mg(t)):!(!_g(e)||!_g(t))&&(hg(e)===hg(t)&&rg(e.expression,t.expression))}function ig(e){for(;ub(e,!0);)e=e.right;return e}function og(e){return fD(e)&&"exports"===e.escapedText}function ag(e){return fD(e)&&"module"===e.escapedText}function sg(e){return(bE(e)||ug(e))&&ag(e.expression)&&"exports"===hg(e)}function cg(e){const t=function(e){if(SE(e)){if(!lg(e))return 0;const t=e.arguments[0];return og(t)||sg(t)?8:dg(t)&&"prototype"===hg(t)?9:7}if(64!==e.operatorToken.kind||!Px(e.left)||(t=ig(e),PE(t)&&GN(t.expression)&&"0"===t.expression.text))return 0;var t;if(fg(e.left.expression,!0)&&"prototype"===hg(e.left)&&vE(vg(e)))return 6;return yg(e.left)}(e);return 5===t||Mm(e)?t:0}function lg(e){return 3===m(e.arguments)&&bE(e.expression)&&fD(e.expression.expression)&&"Object"===kc(e.expression.expression)&&"defineProperty"===kc(e.expression.name)&&Uh(e.arguments[1])&&fg(e.arguments[0],!0)}function _g(e){return bE(e)||ug(e)}function ug(e){return xE(e)&&Uh(e.argumentExpression)}function dg(e,t){return bE(e)&&(!t&&110===e.expression.kind||fD(e.name)&&fg(e.expression,!0))||pg(e,t)}function pg(e,t){return ug(e)&&(!t&&110===e.expression.kind||fb(e.expression)||dg(e.expression,!0))}function fg(e,t){return fb(e)||dg(e,t)}function mg(e){return bE(e)?e.name:e.argumentExpression}function gg(e){if(bE(e))return e.name;const t=ph(e.argumentExpression);return GN(t)||Uu(t)?t:e}function hg(e){const t=gg(e);if(t){if(fD(t))return t.escapedText;if(Uu(t)||GN(t))return xc(t.text)}}function yg(e){if(110===e.expression.kind)return 4;if(sg(e))return 2;if(fg(e.expression,!0)){if(vb(e.expression))return 3;let t=e;for(;!fD(t.expression);)t=t.expression;const n=t.expression;if(("exports"===n.escapedText||"module"===n.escapedText&&"exports"===hg(t))&&dg(e))return 1;if(fg(e,!0)||xE(e)&&$h(e))return 5}return 0}function vg(e){for(;LE(e.right);)e=e.right;return e.right}function bg(e){return LE(e)&&3===cg(e)}function xg(e){return Mm(e)&&e.parent&&245===e.parent.kind&&(!xE(e)||ug(e))&&!!cl(e.parent)}function Sg(e,t){const{valueDeclaration:n}=e;(!n||(!(33554432&t.flags)||Mm(t)||33554432&n.flags)&&Xm(n)&&!Xm(t)||n.kind!==t.kind&&function(e){return TF(e)||fD(e)}(n))&&(e.valueDeclaration=t)}function kg(e){if(!e||!e.valueDeclaration)return!1;const t=e.valueDeclaration;return 263===t.kind||hF(t)&&t.initializer&&__(t.initializer)}function Tg(e){switch(null==e?void 0:e.kind){case 261:case 209:case 273:case 279:case 272:case 274:case 281:case 275:case 282:case 277:case 206:return!0}return!1}function Cg(e){var t,n;switch(e.kind){case 261:case 209:return null==(t=yc(e.initializer,e=>qm(e,!0)))?void 0:t.arguments[0];case 273:case 279:case 352:return at(e.moduleSpecifier,Uu);case 272:return at(null==(n=at(e.moduleReference,HF))?void 0:n.expression,Uu);case 274:case 281:return at(e.parent.moduleSpecifier,Uu);case 275:case 282:return at(e.parent.parent.moduleSpecifier,Uu);case 277:return at(e.parent.parent.parent.moduleSpecifier,Uu);case 206:return vf(e)?e.argument.literal:void 0;default:gn.assertNever(e)}}function wg(e){return Ng(e)||gn.failBadSyntaxKind(e.parent)}function Ng(e){switch(e.parent.kind){case 273:case 279:case 352:return e.parent;case 284:return e.parent.parent;case 214:return hf(e.parent)||qm(e.parent,!1)?e.parent:void 0;case 202:if(!QN(e))break;return at(e.parent.parent,dE);default:return}}function Dg(e,t){return!!t.rewriteRelativeImportExtensions&&wo(e)&&!SO(e)&&Uk(e)}function Eg(e){switch(e.kind){case 273:case 279:case 352:return e.moduleSpecifier;case 272:return 284===e.moduleReference.kind?e.moduleReference.expression:void 0;case 206:return vf(e)?e.argument.literal:void 0;case 214:return e.arguments[0];case 268:return 11===e.name.kind?e.name:void 0;default:return gn.assertNever(e)}}function Fg(e){switch(e.kind){case 273:return e.importClause&&at(e.importClause.namedBindings,jF);case 272:return e;case 279:return e.exportClause&&at(e.exportClause,MF);default:return gn.assertNever(e)}}function Pg(e){return!(273!==e.kind&&352!==e.kind||!e.importClause||!e.importClause.name)}function Ag(e,t){if(e.name){const n=t(e);if(n)return n}if(e.namedBindings){const n=jF(e.namedBindings)?t(e.namedBindings):g(e.namedBindings.elements,t);if(n)return n}}function Ig(e){switch(e.kind){case 170:case 175:case 174:case 305:case 304:case 173:case 172:return void 0!==e.questionToken}return!1}function Og(e){const t=DP(e)?ve(e.parameters):void 0,n=at(t&&t.name,fD);return!!n&&"new"===n.escapedText}function Lg(e){return 347===e.kind||339===e.kind||341===e.kind}function jg(e){return Lg(e)||SF(e)}function Mg(e){return tF(e)&&LE(e.expression)&&0!==cg(e.expression)&&LE(e.expression.right)&&(57===e.expression.right.operatorToken.kind||61===e.expression.right.operatorToken.kind)?e.expression.right.right:void 0}function Rg(e){switch(e.kind){case 244:const t=Bg(e);return t&&t.initializer;case 173:case 304:return e.initializer}}function Bg(e){return ZE(e)?ve(e.declarationList.declarations):void 0}function Jg(e){return TF(e)&&e.body&&268===e.body.kind?e.body:void 0}function zg(e){if(e.kind>=244&&e.kind<=260)return!0;switch(e.kind){case 80:case 110:case 108:case 167:case 237:case 213:case 212:case 209:case 219:case 220:case 175:case 178:case 179:return!0;default:return!1}}function qg(e){switch(e.kind){case 220:case 227:case 242:case 253:case 180:case 297:case 264:case 232:case 176:case 177:case 186:case 181:case 252:case 260:case 247:case 213:case 243:case 1:case 267:case 307:case 278:case 279:case 282:case 245:case 250:case 251:case 249:case 263:case 219:case 185:case 178:case 80:case 246:case 273:case 272:case 182:case 265:case 318:case 324:case 257:case 175:case 174:case 268:case 203:case 271:case 211:case 170:case 218:case 212:case 304:case 173:case 172:case 254:case 241:case 179:case 305:case 306:case 256:case 258:case 259:case 266:case 169:case 261:case 244:case 248:case 255:return!0;default:return!1}}function Ug(e,t){let n;Bf(e)&&Mu(e)&&Lu(e.initializer)&&(n=de(n,Vg(e,e.initializer.jsDoc)));let r=e;for(;r&&r.parent;){if(Lu(r)&&(n=de(n,Vg(e,r.jsDoc))),170===r.kind){n=de(n,(t?Rc:Mc)(r));break}if(169===r.kind){n=de(n,(t?zc:Jc)(r));break}r=Wg(r)}return n||p}function Vg(e,t){const n=Te(t);return R(t,t=>{if(t===n){const n=P(t.tags,t=>function(e,t){return!((XP(t)||nA(t))&&t.parent&&PP(t.parent)&&wE(t.parent.parent)&&t.parent.parent!==e)}(e,t));return t.tags===n?[t]:n}return P(t.tags,UP)})}function Wg(e){const t=e.parent;return 304===t.kind||278===t.kind||173===t.kind||245===t.kind&&212===e.kind||254===t.kind||Jg(t)||ub(e)?t:t.parent&&(Bg(t.parent)===e||ub(t))?t.parent:t.parent&&t.parent.parent&&(Bg(t.parent.parent)||Rg(t.parent.parent)===e||Mg(t.parent.parent))?t.parent.parent:void 0}function $g(e){if(e.symbol)return e.symbol;if(!fD(e.name))return;const t=e.name.escapedText,n=Gg(e);if(!n)return;const r=T(n.parameters,e=>80===e.name.kind&&e.name.escapedText===t);return r&&r.symbol}function Kg(e){if(PP(e.parent)&&e.parent.tags){const t=T(e.parent.tags,Lg);if(t)return t}return Gg(e)}function Hg(e){return fl(e,UP)}function Gg(e){const t=Xg(e);if(t)return OD(t)&&t.type&&__(t.type)?t.type:__(t)?t:void 0}function Xg(e){const t=Qg(e);if(t)return Mg(t)||function(e){return tF(e)&&LE(e.expression)&&64===e.expression.operatorToken.kind?ig(e.expression):void 0}(t)||Rg(t)||Bg(t)||Jg(t)||t}function Qg(e){const t=Yg(e);if(!t)return;const n=t.parent;return n&&n.jsDoc&&t===ke(n.jsDoc)?n:void 0}function Yg(e){return yc(e.parent,PP)}function Zg(e){const t=e.name.escapedText,{typeParameters:n}=e.parent.parent.parent;return n&&T(n,e=>e.name.escapedText===t)}function eh(e){return!!e.typeArguments}var th=(e=>(e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound",e))(th||{});function nh(e){let t=e.parent;for(;;){switch(t.kind){case 227:const n=t;return cb(n.operatorToken.kind)&&n.left===e?n:void 0;case 225:case 226:const r=t,i=r.operator;return 46===i||47===i?r:void 0;case 250:case 251:const o=t;return o.initializer===e?o:void 0;case 218:case 210:case 231:case 236:e=t;break;case 306:e=t.parent;break;case 305:if(t.name!==e)return;e=t.parent;break;case 304:if(t.name===e)return;e=t.parent;break;default:return}t=e.parent}}function rh(e){const t=nh(e);if(!t)return 0;switch(t.kind){case 227:const e=t.operatorToken.kind;return 64===e||ib(e)?1:2;case 225:case 226:return 2;case 250:case 251:return 1}}function ih(e){return!!nh(e)}function oh(e){const t=nh(e);return!!t&&ub(t,!0)&&function(e){const t=ph(e.right);return 227===t.kind&&sI(t.operatorToken.kind)}(t)}function ah(e){switch(e.kind){case 242:case 244:case 255:case 246:case 256:case 270:case 297:case 298:case 257:case 249:case 250:case 251:case 247:case 248:case 259:case 300:return!0}return!1}function sh(e){return NE(e)||DE(e)||S_(e)||vF(e)||BD(e)}function ch(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function lh(e){return ch(e,197)}function _h(e){return ch(e,218)}function uh(e){let t;for(;e&&197===e.kind;)t=e,e=e.parent;return[t,e]}function dh(e){for(;aE(e);)e=e.type;return e}function ph(e,t){return LA(e,t?-2147483647:1)}function fh(e){return(212===e.kind||213===e.kind)&&((e=_h(e.parent))&&221===e.kind)}function mh(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function gh(e){return!mP(e)&&!E_(e)&&hu(e.parent)&&e.parent.name===e}function hh(e){const t=e.parent;switch(e.kind){case 11:case 15:case 9:if(FD(t))return t.parent;case 80:if(hu(t))return t.name===e?t:void 0;if(ED(t)){const e=t.parent;return KP(e)&&e.name===t?e:void 0}{const n=t.parent;return LE(n)&&0!==cg(n)&&(n.left.symbol||n.symbol)&&Ac(n)===e?n:void 0}case 81:return hu(t)&&t.name===e?t:void 0;default:return}}function yh(e){return Uh(e)&&168===e.parent.kind&&hu(e.parent.parent)}function vh(e){const t=e.parent;switch(t.kind){case 173:case 172:case 175:case 174:case 178:case 179:case 307:case 304:case 212:return t.name===e;case 167:return t.right===e;case 209:case 277:return t.propertyName===e;case 282:case 292:case 286:case 287:case 288:return!0}return!1}function bh(e){switch(e.parent.kind){case 274:case 277:case 275:case 282:case 278:case 272:case 281:return e.parent;case 167:do{e=e.parent}while(167===e.parent.kind);return bh(e)}}function xh(e){return fb(e)||JE(e)}function Sh(e){return xh(kh(e))}function kh(e){return JF(e)?e.expression:e.right}function Th(e){return 305===e.kind?e.name:304===e.kind?e.initializer:e.parent.right}function Ch(e){const t=wh(e);if(t&&Mm(e)){const t=Uc(e);if(t)return t.class}return t}function wh(e){const t=Fh(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function Nh(e){if(Mm(e))return Vc(e).map(e=>e.class);{const t=Fh(e.heritageClauses,119);return null==t?void 0:t.types}}function Dh(e){return xF(e)?Eh(e)||p:y_(e)&&Y(ln(Ch(e)),Nh(e))||p}function Eh(e){const t=Fh(e.heritageClauses,96);return t?t.types:void 0}function Fh(e,t){if(e)for(const n of e)if(n.token===t)return n}function Ph(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function Ah(e){return 83<=e&&e<=166}function Ih(e){return 19<=e&&e<=79}function Oh(e){return Ah(e)||Ih(e)}function Lh(e){return 128<=e&&e<=166}function jh(e){return Ah(e)&&!Lh(e)}function Mh(e){const t=Ma(e);return void 0!==t&&jh(t)}function Rh(e){const t=Tc(e);return!!t&&!Lh(t)}function Bh(e){return 2<=e&&e<=7}var Jh=(e=>(e[e.Normal=0]="Normal",e[e.Generator=1]="Generator",e[e.Async=2]="Async",e[e.Invalid=4]="Invalid",e[e.AsyncGenerator=3]="AsyncGenerator",e))(Jh||{});function zh(e){if(!e)return 4;let t=0;switch(e.kind){case 263:case 219:case 175:e.asteriskToken&&(t|=1);case 220:Lv(e,1024)&&(t|=2)}return e.body||(t|=4),t}function qh(e){switch(e.kind){case 263:case 219:case 220:case 175:return void 0!==e.body&&void 0===e.asteriskToken&&Lv(e,1024)}return!1}function Uh(e){return Uu(e)||GN(e)}function Vh(e){return IE(e)&&(40===e.operator||41===e.operator)&&GN(e.operand)}function Wh(e){const t=Ac(e);return!!t&&$h(t)}function $h(e){if(168!==e.kind&&213!==e.kind)return!1;const t=xE(e)?ph(e.argumentExpression):e.expression;return!Uh(t)&&!Vh(t)}function Kh(e){switch(e.kind){case 80:case 81:return e.escapedText;case 11:case 15:case 9:case 10:return xc(e.text);case 168:const t=e.expression;return Uh(t)?xc(t.text):Vh(t)?41===t.operator?ja(t.operator)+t.operand.text:t.operand.text:void 0;case 296:return dC(e);default:return gn.assertNever(e)}}function Hh(e){switch(e.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function Gh(e){return vl(e)?kc(e):aP(e)?pC(e):e.text}function Xh(e){return vl(e)?e.escapedText:aP(e)?dC(e):xc(e.text)}function Qh(e,t){return`__#${fJ(e)}@${t}`}function Yh(e){return en(e.escapedName,"__@")}function Zh(e){return en(e.escapedName,"__#")}function ey(e,t){switch((e=LA(e)).kind){case 232:if(tq(e))return!1;break;case 219:if(e.name)return!1;break;case 220:break;default:return!1}return"function"!=typeof t||t(e)}function ty(e){switch(e.kind){case 304:return!function(e){return fD(e)?"__proto__"===kc(e):QN(e)&&"__proto__"===e.text}(e.name);case 305:return!!e.objectAssignmentInitializer;case 261:return fD(e.name)&&!!e.initializer;case 170:case 209:return fD(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 173:return!!e.initializer;case 227:switch(e.operatorToken.kind){case 64:case 77:case 76:case 78:return fD(e.left)}break;case 278:return!0}return!1}function ny(e,t){if(!ty(e))return!1;switch(e.kind){case 304:case 261:case 170:case 209:case 173:return ey(e.initializer,t);case 305:return ey(e.objectAssignmentInitializer,t);case 227:return ey(e.right,t);case 278:return ey(e.expression,t)}}function ry(e){return"push"===e.escapedText||"unshift"===e.escapedText}function iy(e){return 170===oy(e).kind}function oy(e){for(;209===e.kind;)e=e.parent.parent;return e}function ay(e){const t=e.kind;return 177===t||219===t||263===t||220===t||175===t||178===t||179===t||268===t||308===t}function sy(e){return iT(e.pos)||iT(e.end)}var cy=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(cy||{});function ly(e){const t=dy(e),n=215===e.kind&&void 0!==e.arguments;return _y(e.kind,t,n)}function _y(e,t,n){switch(e){case 215:return n?0:1;case 225:case 222:case 223:case 221:case 224:case 228:case 230:return 1;case 227:switch(t){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function uy(e){const t=dy(e),n=215===e.kind&&void 0!==e.arguments;return fy(e.kind,t,n)}function dy(e){return 227===e.kind?e.operatorToken.kind:225===e.kind||226===e.kind?e.operator:e.kind}var py=(e=>(e[e.Comma=0]="Comma",e[e.Spread=1]="Spread",e[e.Yield=2]="Yield",e[e.Assignment=3]="Assignment",e[e.Conditional=4]="Conditional",e[e.LogicalOR=5]="LogicalOR",e[e.Coalesce=5]="Coalesce",e[e.LogicalAND=6]="LogicalAND",e[e.BitwiseOR=7]="BitwiseOR",e[e.BitwiseXOR=8]="BitwiseXOR",e[e.BitwiseAND=9]="BitwiseAND",e[e.Equality=10]="Equality",e[e.Relational=11]="Relational",e[e.Shift=12]="Shift",e[e.Additive=13]="Additive",e[e.Multiplicative=14]="Multiplicative",e[e.Exponentiation=15]="Exponentiation",e[e.Unary=16]="Unary",e[e.Update=17]="Update",e[e.LeftHandSide=18]="LeftHandSide",e[e.Member=19]="Member",e[e.Primary=20]="Primary",e[e.Highest=20]="Highest",e[e.Lowest=0]="Lowest",e[e.Invalid=-1]="Invalid",e))(py||{});function fy(e,t,n){switch(e){case 357:return 0;case 231:return 1;case 230:return 2;case 228:return 4;case 227:switch(t){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return my(t)}case 217:case 236:case 225:case 222:case 223:case 221:case 224:return 16;case 226:return 17;case 214:return 18;case 215:return n?19:18;case 216:case 212:case 213:case 237:return 19;case 235:case 239:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 210:case 211:case 219:case 220:case 232:case 14:case 15:case 229:case 218:case 233:case 285:case 286:case 289:return 20;default:return-1}}function my(e){switch(e){case 61:case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function gy(e){return P(e,e=>{switch(e.kind){case 295:return!!e.expression;case 12:return!e.containsOnlyTriviaWhiteSpaces;default:return!0}})}function hy(){let e=[];const t=[],n=new Map;let r=!1;return{add:function(i){let o;i.file?(o=n.get(i.file.fileName),o||(o=[],n.set(i.file.fileName,o),ie(t,i.file.fileName,Ft))):(r&&(r=!1,e=e.slice()),o=e);ie(o,i,uS,fS)},lookup:function(t){let r;r=t.file?n.get(t.file.fileName):e;if(!r)return;const i=Ee(r,t,dt,uS);if(i>=0)return r[i];if(~i>0&&fS(t,r[~i-1]))return r[~i-1];return},getGlobalDiagnostics:function(){return r=!0,e},getDiagnostics:function(r){if(r)return n.get(r)||[];const i=B(t,e=>n.get(e));if(!e.length)return i;return i.unshift(...e),i}}}var yy=/\$\{/g;function vy(e){return e.replace(yy,"\\${")}function by(e){return!!(2048&(e.templateFlags||0))}function xy(e){return e&&!!(eD(e)?by(e):by(e.head)||X(e.templateSpans,e=>by(e.literal)))}var Sy=/[\\"\u0000-\u001f\u2028\u2029\u0085]/g,ky=/[\\'\u0000-\u001f\u2028\u2029\u0085]/g,Ty=/\r\n|[\\`\u0000-\u0009\u000b-\u001f\u2028\u2029\u0085]/g,Cy=new Map(Object.entries({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","Â…":"\\u0085","\r\n":"\\r\\n"}));function wy(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function Ny(e,t,n){if(0===e.charCodeAt(0)){const r=n.charCodeAt(t+e.length);return r>=48&&r<=57?"\\x00":"\\0"}return Cy.get(e)||wy(e.charCodeAt(0))}function Dy(e,t){const n=96===t?Ty:39===t?ky:Sy;return e.replace(n,Ny)}var Ey=/[^\u0000-\u007F]/g;function Fy(e,t){return e=Dy(e,t),Ey.test(e)?e.replace(Ey,e=>wy(e.charCodeAt(0))):e}var Py=/["\u0000-\u001f\u2028\u2029\u0085]/g,Ay=/['\u0000-\u001f\u2028\u2029\u0085]/g,Iy=new Map(Object.entries({'"':""","'":"'"}));function Oy(e){return 0===e.charCodeAt(0)?"�":Iy.get(e)||"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function Ly(e,t){const n=39===t?Ay:Py;return e.replace(n,Oy)}function jy(e){const t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&(39===(n=e.charCodeAt(0))||34===n||96===n)?e.substring(1,t-1):e;var n}function My(e){const t=e.charCodeAt(0);return t>=97&&t<=122||e.includes("-")}var Ry=[""," "];function By(e){const t=Ry[1];for(let n=Ry.length;n<=e;n++)Ry.push(Ry[n-1]+t);return Ry[e]}function Jy(){return Ry[1].length}function zy(e){var t,n,r,i,o,a=!1;function s(e){const n=za(e);n.length>1?(i=i+n.length-1,o=t.length-e.length+Te(n),r=o-t.length===0):r=!1}function c(e){e&&e.length&&(r&&(e=By(n)+e,r=!1),t+=e,s(e))}function l(e){e&&(a=!1),c(e)}function _(){t="",n=0,r=!0,i=0,o=0,a=!1}return _(),{write:l,rawWrite:function(e){void 0!==e&&(t+=e,s(e),a=!1)},writeLiteral:function(e){e&&e.length&&l(e)},writeLine:function(n){r&&!n||(i++,o=(t+=e).length,r=!0,a=!1)},increaseIndent:()=>{n++},decreaseIndent:()=>{n--},getIndent:()=>n,getTextPos:()=>t.length,getLine:()=>i,getColumn:()=>r?n*Jy():t.length-o,getText:()=>t,isAtStartOfLine:()=>r,hasTrailingComment:()=>a,hasTrailingWhitespace:()=>!!t.length&&Ga(t.charCodeAt(t.length-1)),clear:_,writeKeyword:l,writeOperator:l,writeParameter:l,writeProperty:l,writePunctuation:l,writeSpace:l,writeStringLiteral:l,writeSymbol:(e,t)=>l(e),writeTrailingSemicolon:l,writeComment:function(e){e&&(a=!0),c(e)}}}function qy(e){let t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return{...e,writeTrailingSemicolon(){t=!0},writeLiteral(t){n(),e.writeLiteral(t)},writeStringLiteral(t){n(),e.writeStringLiteral(t)},writeSymbol(t,r){n(),e.writeSymbol(t,r)},writePunctuation(t){n(),e.writePunctuation(t)},writeKeyword(t){n(),e.writeKeyword(t)},writeOperator(t){n(),e.writeOperator(t)},writeParameter(t){n(),e.writeParameter(t)},writeSpace(t){n(),e.writeSpace(t)},writeProperty(t){n(),e.writeProperty(t)},writeComment(t){n(),e.writeComment(t)},writeLine(){n(),e.writeLine()},increaseIndent(){n(),e.increaseIndent()},decreaseIndent(){n(),e.decreaseIndent()}}}function Uy(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function Vy(e){return Xt(Uy(e))}function Wy(e,t,n){return t.moduleName||Hy(e,t.fileName,n&&n.fileName)}function $y(e,t){return e.getCanonicalFileName($o(t,e.getCurrentDirectory()))}function Ky(e,t,n){const r=t.getExternalModuleFileFromDeclaration(n);if(!r||r.isDeclarationFile)return;const i=Eg(n);return!i||!Uu(i)||wo(i.text)||$y(e,r.path).includes($y(e,Yo(e.getCommonSourceDirectory())))?Wy(e,r):void 0}function Hy(e,t,n){const r=t=>e.getCanonicalFileName(t),i=Xo(n?Lo(n):e.getCommonSourceDirectory(),e.getCurrentDirectory(),r),o=Qk(pa(i,$o(t,e.getCurrentDirectory()),i,r,!1));return n?Zo(o):o}function Gy(e,t,n){const r=t.getCompilerOptions();let i;return i=r.outDir?Qk(iv(e,t,r.outDir)):Qk(e),i+n}function Xy(e,t){return Qy(e,t.getCompilerOptions(),t)}function Qy(e,t,n){const r=t.declarationDir||t.outDir,i=r?ov(e,r,n.getCurrentDirectory(),n.getCommonSourceDirectory(),e=>n.getCanonicalFileName(e)):e,o=Yy(i);return Qk(i)+o}function Yy(e){return Fo(e,[".mjs",".mts"])?".d.mts":Fo(e,[".cjs",".cts"])?".d.cts":Fo(e,[".json"])?".d.json.ts":".d.ts"}function Zy(e){return Fo(e,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:Fo(e,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:Fo(e,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function ev(e,t,n,r){return n?Vo(r(),_a(n,e,t)):e}function tv(e,t){var n;if(e.paths)return e.baseUrl??gn.checkDefined(e.pathsBasePath||(null==(n=t.getCurrentDirectory)?void 0:n.call(t)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function nv(e,t,n){const r=e.getCompilerOptions();if(r.outFile){const t=NS(r),i=r.emitDeclarationOnly||2===t||4===t;return P(e.getSourceFiles(),t=>(i||!fO(t))&&rv(t,e,n))}return P(void 0===t?e.getSourceFiles():[t],t=>rv(t,e,n))}function rv(e,t,n){const r=t.getCompilerOptions();if(r.noEmitForJsFiles&&jm(e))return!1;if(e.isDeclarationFile)return!1;if(t.isSourceFileFromExternalLibrary(e))return!1;if(n)return!0;if(t.isSourceOfProjectReferenceRedirect(e.fileName))return!1;if(!cf(e))return!0;if(t.getRedirectFromSourceFile(e.fileName))return!1;if(r.outFile)return!0;if(!r.outDir)return!1;if(r.rootDir||r.composite&&r.configFilePath){const n=$o(SU(r,()=>[],t.getCurrentDirectory(),t.getCanonicalFileName),t.getCurrentDirectory()),i=ov(e.fileName,r.outDir,t.getCurrentDirectory(),n,t.getCanonicalFileName);if(0===aa(e.fileName,i,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames()))return!1}return!0}function iv(e,t,n){return ov(e,n,t.getCurrentDirectory(),t.getCommonSourceDirectory(),e=>t.getCanonicalFileName(e))}function ov(e,t,n,r,i){let o=$o(e,n);return o=0===i(o).indexOf(i(r))?o.substring(r.length):o,Uo(t,o)}function av(e,t,n,r,i,o,a){e.writeFile(n,r,i,e=>{t.add(oS(ha.Could_not_write_file_0_Colon_1,n,e))},o,a)}function sv(e,t,n){if(e.length>Oo(e)&&!n(e)){sv(Lo(e),t,n),t(e)}}function cv(e,t,n,r,i,o){try{r(e,t,n)}catch{sv(Lo(Ko(e)),i,o),r(e,t,n)}}function lv(e,t){return $a(Va(e),t)}function _v(e,t){return $a(e,t)}function uv(e){return T(e.members,e=>BD(e)&&Ld(e.body))}function dv(e){if(e&&e.parameters.length>0){const t=2===e.parameters.length&&mv(e.parameters[0]);return e.parameters[t?1:0]}}function pv(e){const t=dv(e);return t&&t.type}function fv(e){if(e.parameters.length&&!IP(e)){const t=e.parameters[0];if(mv(t))return t}}function mv(e){return gv(e.name)}function gv(e){return!!e&&80===e.kind&&vv(e)}function hv(e){return!!yc(e,e=>187===e.kind||80!==e.kind&&167!==e.kind&&"quit")}function yv(e){if(!gv(e))return!1;for(;ED(e.parent)&&e.parent.left===e;)e=e.parent;return 187===e.parent.kind}function vv(e){return"this"===e.escapedText}function bv(e,t){let n,r,i,o;return Wh(t)?(n=t,178===t.kind?i=t:179===t.kind?o=t:gn.fail("Accessor has wrong kind")):g(e,e=>{if(v_(e)&&jv(e)===jv(t)){Kh(e.name)===Kh(t.name)&&(n?r||(r=e):n=e,178!==e.kind||i||(i=e),179!==e.kind||o||(o=e))}}),{firstAccessor:n,secondAccessor:r,getAccessor:i,setAccessor:o}}function xv(e){if(!Mm(e)&&vF(e))return;if(SF(e))return;const t=e.type;return t||!Mm(e)?t:Ol(e)?e.typeExpression&&e.typeExpression.type:ll(e)}function Sv(e){return e.type}function kv(e){return IP(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:e.type||(Mm(e)?_l(e):void 0)}function Tv(e){return R(dl(e),e=>function(e){return QP(e)&&!(321===e.parent.kind&&(e.parent.tags.some(Lg)||e.parent.tags.some(UP)))}(e)?e.typeParameters:void 0)}function Cv(e){const t=dv(e);return t&&xv(t)}function wv(e,t,n,r){!function(e,t,n,r){r&&r.length&&n!==r[0].pos&&_v(e,n)!==_v(e,r[0].pos)&&t.writeLine()}(e,t,n.pos,r)}function Nv(e,t,n,r){n!==r&&_v(e,n)!==_v(e,r)&&t.writeLine()}function Dv(e,t,n,r,i,o,a){let s,c;if(a?0===i.pos&&(s=P(hs(e,i.pos),function(t){return $d(e,t.pos)})):s=hs(e,i.pos),s){const a=[];let l;for(const e of s){if(l){const n=_v(t,l.end);if(_v(t,e.pos)>=n+2)break}a.push(e),l=e}if(a.length){const l=_v(t,Te(a).end);_v(t,is(e,i.pos))>=l+2&&(wv(t,n,i,s),function(e,t,n,r,i,o,a,s){if(r&&r.length>0){i&&n.writeSpace(" ");let c=!1;for(const i of r)c&&(n.writeSpace(" "),c=!1),s(e,t,n,i.pos,i.end,a),i.hasTrailingNewLine?n.writeLine():c=!0;c&&o&&n.writeSpace(" ")}}(e,t,n,a,!1,!0,o,r),c={nodePos:i.pos,detachedCommentEndPos:Te(a).end})}}return c}function Ev(e,t,n,r,i,o){if(42===e.charCodeAt(r+1)){const a=Wa(t,r),s=t.length;let c;for(let l=r,_=a.line;l0){let e=i%Jy();const t=By((i-e)/Jy());for(n.rawWrite(t);e;)n.rawWrite(" "),e--}else n.rawWrite("")}Fv(e,i,n,o,l,u),l=u}}else n.writeComment(e.substring(r,i))}function Fv(e,t,n,r,i,o){const a=Math.min(t,o-1),s=e.substring(i,a).trim();s?(n.writeComment(s),a!==t&&n.writeLine()):n.rawWrite(r)}function Pv(e,t,n){let r=0;for(;t=0&&e.kind<=166?0:(536870912&e.modifierFlagsCache||(e.modifierFlagsCache=536870912|Zv(e)),n||t&&Mm(e)?(268435456&e.modifierFlagsCache||!e.parent||(e.modifierFlagsCache|=268435456|Xv(e)),Qv(e.modifierFlagsCache)):65535&e.modifierFlagsCache)}function Kv(e){return $v(e,!0)}function Hv(e){return $v(e,!0,!0)}function Gv(e){return $v(e,!1)}function Xv(e){let t=0;return e.parent&&!AD(e)&&(Mm(e)&&(Kc(e)&&(t|=8388608),Gc(e)&&(t|=16777216),Qc(e)&&(t|=33554432),Zc(e)&&(t|=67108864),el(e)&&(t|=134217728)),nl(e)&&(t|=65536)),t}function Qv(e){return 131071&e|(260046848&e)>>>23}function Yv(e){return Zv(e)|function(e){return Qv(Xv(e))}(e)}function Zv(e){let t=II(e)?eb(e.modifiers):0;return(8&e.flags||80===e.kind&&4096&e.flags)&&(t|=32),t}function eb(e){let t=0;if(e)for(const n of e)t|=tb(n.kind);return t}function tb(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 171:return 32768}return 0}function nb(e){return 57===e||56===e}function rb(e){return nb(e)||54===e}function ib(e){return 76===e||77===e||78===e}function ob(e){return LE(e)&&ib(e.operatorToken.kind)}function ab(e){return nb(e)||61===e}function sb(e){return LE(e)&&ab(e.operatorToken.kind)}function cb(e){return e>=64&&e<=79}function lb(e){const t=_b(e);return t&&!t.isImplements?t.class:void 0}function _b(e){if(qE(e)){if(lP(e.parent)&&y_(e.parent.parent))return{class:e.parent.parent,isImplements:119===e.parent.token};if(OP(e.parent)){const t=Xg(e.parent);if(t&&y_(t))return{class:t,isImplements:!1}}}}function ub(e,t){return LE(e)&&(t?64===e.operatorToken.kind:cb(e.operatorToken.kind))&&W_(e.left)}function db(e){if(ub(e,!0)){const t=e.left.kind;return 211===t||210===t}return!1}function pb(e){return void 0!==lb(e)}function fb(e){return 80===e.kind||hb(e)}function mb(e){switch(e.kind){case 80:return e;case 167:do{e=e.left}while(80!==e.kind);return e;case 212:do{e=e.expression}while(80!==e.kind);return e}}function gb(e){return 80===e.kind||110===e.kind||108===e.kind||237===e.kind||212===e.kind&&gb(e.expression)||218===e.kind&&gb(e.expression)}function hb(e){return bE(e)&&fD(e.name)&&fb(e.expression)}function yb(e){if(bE(e)){const t=yb(e.expression);if(void 0!==t)return t+"."+Vp(e.name)}else if(xE(e)){const t=yb(e.expression);if(void 0!==t&&c_(e.argumentExpression))return t+"."+Kh(e.argumentExpression)}else{if(fD(e))return Sc(e.escapedText);if(aP(e))return pC(e)}}function vb(e){return dg(e)&&"prototype"===hg(e)}function bb(e){return 167===e.parent.kind&&e.parent.right===e||212===e.parent.kind&&e.parent.name===e||237===e.parent.kind&&e.parent.name===e}function xb(e){return!!e.parent&&(bE(e.parent)&&e.parent.name===e||xE(e.parent)&&e.parent.argumentExpression===e)}function Sb(e){return ED(e.parent)&&e.parent.right===e||bE(e.parent)&&e.parent.name===e||vP(e.parent)&&e.parent.right===e}function kb(e){return LE(e)&&104===e.operatorToken.kind}function Tb(e){return kb(e.parent)&&e===e.parent.right}function Cb(e){return 211===e.kind&&0===e.properties.length}function wb(e){return 210===e.kind&&0===e.elements.length}function Nb(e){if(function(e){return e&&m(e.declarations)>0&&Lv(e.declarations[0],2048)}(e)&&e.declarations)for(const t of e.declarations)if(t.localSymbol)return t.localSymbol}function Db(e){return T(Ik,t=>Eo(e,t))}var Eb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Fb(e){let t="";const n=function(e){const t=[],n=e.length;for(let r=0;r>6|192),t.push(63&n|128)):n<65536?(t.push(n>>12|224),t.push(n>>6&63|128),t.push(63&n|128)):n<131072?(t.push(n>>18|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):gn.assert(!1,"Unexpected code point")}return t}(e);let r=0;const i=n.length;let o,a,s,c;for(;r>2,a=(3&n[r])<<4|n[r+1]>>4,s=(15&n[r+1])<<2|n[r+2]>>6,c=63&n[r+2],r+1>=i?s=c=64:r+2>=i&&(c=64),t+=Eb.charAt(o)+Eb.charAt(a)+Eb.charAt(s)+Eb.charAt(c),r+=3;return t}function Pb(e,t){return e&&e.base64encode?e.base64encode(t):Fb(t)}function Ab(e,t){if(e&&e.base64decode)return e.base64decode(t);const n=t.length,r=[];let i=0;for(;i>4&3,c=(15&n)<<4|o>>2&15,l=(3&o)<<6|63&a;0===c&&0!==o?r.push(s):0===l&&0!==a?r.push(s,c):r.push(s,c,l),i+=4}return function(e){let t="",n=0;const r=e.length;for(;n=e||-1===t),{pos:e,end:t}}function zb(e,t){return Jb(e.pos,t)}function qb(e,t){return Jb(t,e.end)}function Ub(e){const t=II(e)?C(e.modifiers,ID):void 0;return t&&!iT(t.end)?qb(e,t.end):e}function Vb(e){if(LD(e)||MD(e))return qb(e,e.name.pos);const t=II(e)?ke(e.modifiers):void 0;return t&&!iT(t.end)?qb(e,t.end):Ub(e)}function Wb(e,t){return Jb(e,e+ja(t).length)}function $b(e,t){return Gb(e,e,t)}function Kb(e,t,n){return ex(tx(e,n,!1),tx(t,n,!1),n)}function Hb(e,t,n){return ex(e.end,t.end,n)}function Gb(e,t,n){return ex(tx(e,n,!1),t.end,n)}function Xb(e,t,n){return ex(e.end,tx(t,n,!1),n)}function Qb(e,t,n,r){const i=tx(t,n,r);return Ka(n,e.end,i)}function Yb(e,t,n){return Ka(n,e.end,t.end)}function Zb(e,t){return!ex(e.pos,e.end,t)}function ex(e,t,n){return 0===Ka(n,e,t)}function tx(e,t,n){return iT(e.pos)?-1:is(t.text,e.pos,!1,n)}function nx(e,t,n,r){const i=is(n.text,e,!1,r),o=function(e,t=0,n){for(;e-- >t;)if(!Ga(n.text.charCodeAt(e)))return e}(i,t,n);return Ka(n,o??t,i)}function rx(e,t,n,r){const i=is(n.text,e,!1,r);return Ka(n,e,Math.min(t,i))}function ix(e,t){return ox(e.pos,e.end,t)}function ox(e,t,n){return e<=n.pos&&t>=n.end}function ax(e){const t=bc(e);if(t)switch(t.parent.kind){case 267:case 268:return t===t.parent.name}return!1}function sx(e){return P(e.declarations,cx)}function cx(e){return hF(e)&&void 0!==e.initializer}function lx(e){return e.watch&&Ie(e,"watch")}function _x(e){e.close()}function ux(e){return 33554432&e.flags?e.links.checkFlags:0}function dx(e,t=!1){if(e.valueDeclaration){const n=uc(t&&e.declarations&&T(e.declarations,zD)||32768&e.flags&&T(e.declarations,JD)||e.valueDeclaration);return e.parent&&32&e.parent.flags?n:-8&n}if(6&ux(e)){const t=e.links.checkFlags;return(1024&t?2:256&t?1:4)|(2048&t?256:0)}return 4194304&e.flags?257:0}function px(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e}function fx(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function mx(e){return 1===hx(e)}function gx(e){return 0!==hx(e)}function hx(e){const{parent:t}=e;switch(null==t?void 0:t.kind){case 218:case 210:return hx(t);case 226:case 225:const{operator:n}=t;return 46===n||47===n?2:0;case 227:const{left:r,operatorToken:i}=t;return r===e&&cb(i.kind)?64===i.kind?1:2:0;case 212:return t.name!==e?0:hx(t);case 304:{const n=hx(t.parent);return e===t.name?function(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return gn.assertNever(e)}}(n):n}case 305:return e===t.objectAssignmentInitializer?0:hx(t.parent);case 250:case 251:return e===t.initializer?1:0;default:return 0}}function yx(e,t){if(!e||!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if("object"==typeof e[n]){if(!yx(e[n],t[n]))return!1}else if("function"!=typeof e[n]&&e[n]!==t[n])return!1;return!0}function vx(e,t){e.forEach(t),e.clear()}function bx(e,t,n){const{onDeleteValue:r,onExistingValue:i}=n;e.forEach((n,o)=>{var a;(null==t?void 0:t.has(o))?i&&i(n,null==(a=t.get)?void 0:a.call(t,o),o):(e.delete(o),r(n,o))})}function xx(e,t,n){bx(e,t,n);const{createNewValue:r}=n;null==t||t.forEach((t,n)=>{e.has(n)||e.set(n,r(n,t))})}function Sx(e){if(32&e.flags){const t=kx(e);return!!t&&Lv(t,64)}return!1}function kx(e){var t;return null==(t=e.declarations)?void 0:t.find(y_)}function Tx(e){return 3899393&e.flags?e.objectFlags:0}function Cx(e){return!!e&&!!e.declarations&&!!e.declarations[0]&&NF(e.declarations[0])}function wx({moduleSpecifier:e}){return QN(e)?e.text:rp(e)}function Nx(e){let t;return sO(e,e=>{Ld(e)&&(t=e)},e=>{for(let n=e.length-1;n>=0;n--)if(Ld(e[n])){t=e[n];break}}),t}function Dx(e,t){return!e.has(t)&&(e.add(t),!0)}function Ex(e){return y_(e)||xF(e)||XD(e)}function Fx(e){return e>=183&&e<=206||133===e||159===e||150===e||163===e||151===e||136===e||154===e||155===e||116===e||157===e||146===e||141===e||234===e||313===e||314===e||315===e||316===e||317===e||318===e||319===e}function Px(e){return 212===e.kind||213===e.kind}function Ax(e){return 212===e.kind?e.name:(gn.assert(213===e.kind),e.argumentExpression)}function Ix(e){return 276===e.kind||280===e.kind}function Ox(e){for(;Px(e);)e=e.expression;return e}function Lx(e,t){if(Px(e.parent)&&xb(e))return function e(n){if(212===n.kind){const e=t(n.name);if(void 0!==e)return e}else if(213===n.kind){if(!fD(n.argumentExpression)&&!Uu(n.argumentExpression))return;{const e=t(n.argumentExpression);if(void 0!==e)return e}}if(Px(n.expression))return e(n.expression);if(fD(n.expression))return t(n.expression);return}(e.parent)}function jx(e,t){for(;;){switch(e.kind){case 226:e=e.operand;continue;case 227:e=e.left;continue;case 228:e=e.condition;continue;case 216:e=e.tag;continue;case 214:if(t)return e;case 235:case 213:case 212:case 236:case 356:case 239:e=e.expression;continue}return e}}function Mx(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function Rx(e,t){this.flags=t,(gn.isDebugging||Yn)&&(this.checker=e)}function Bx(e,t){this.flags=t,gn.isDebugging&&(this.checker=e)}function Jx(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function zx(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function qx(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function Ux(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(e=>e)}var Vx,Wx={getNodeConstructor:()=>Jx,getTokenConstructor:()=>zx,getIdentifierConstructor:()=>qx,getPrivateIdentifierConstructor:()=>Jx,getSourceFileConstructor:()=>Jx,getSymbolConstructor:()=>Mx,getTypeConstructor:()=>Rx,getSignatureConstructor:()=>Bx,getSourceMapSourceConstructor:()=>Ux},$x=[];function Kx(e){$x.push(e),e(Wx)}function Hx(e){Object.assign(Wx,e),g($x,e=>e(Wx))}function Gx(e,t){return e.replace(/\{(\d+)\}/g,(e,n)=>""+gn.checkDefined(t[+n]))}function Xx(e){Vx=e}function Qx(e){!Vx&&e&&(Vx=e())}function Yx(e){return Vx&&Vx[e.key]||e.message}function Zx(e,t,n,r,i,...o){n+r>t.length&&(r=t.length-n),Xp(t,n,r);let a=Yx(i);return X(o)&&(a=Gx(a,o)),{file:void 0,start:n,length:r,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary,fileName:e}}function eS(e){return void 0===e.file&&void 0!==e.start&&void 0!==e.length&&"string"==typeof e.fileName}function tS(e,t){const n=t.fileName||"",r=t.text.length;gn.assertEqual(e.fileName,n),gn.assertLessThanOrEqual(e.start,r),gn.assertLessThanOrEqual(e.start+e.length,r);const i={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){i.relatedInformation=[];for(const o of e.relatedInformation)eS(o)&&o.fileName===n?(gn.assertLessThanOrEqual(o.start,r),gn.assertLessThanOrEqual(o.start+o.length,r),i.relatedInformation.push(tS(o,t))):i.relatedInformation.push(o)}return i}function nS(e,t){const n=[];for(const r of e)n.push(tS(r,t));return n}function rS(e,t,n,r,...i){Xp(e.text,t,n);let o=Yx(r);return X(i)&&(o=Gx(o,i)),{file:e,start:t,length:n,messageText:o,category:r.category,code:r.code,reportsUnnecessary:r.reportsUnnecessary,reportsDeprecated:r.reportsDeprecated}}function iS(e,...t){let n=Yx(e);return X(t)&&(n=Gx(n,t)),n}function oS(e,...t){let n=Yx(e);return X(t)&&(n=Gx(n,t)),{file:void 0,start:void 0,length:void 0,messageText:n,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated}}function aS(e,t){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:t}}function sS(e,t,...n){let r=Yx(t);return X(n)&&(r=Gx(r,n)),{messageText:r,category:t.category,code:t.code,next:void 0===e||Array.isArray(e)?e:[e]}}function cS(e,t){let n=e;for(;n.next;)n=n.next[0];n.next=[t]}function lS(e){return e.file?e.file.path:void 0}function _S(e,t){return uS(e,t)||function(e,t){if(!e.relatedInformation&&!t.relatedInformation)return 0;if(e.relatedInformation&&t.relatedInformation)return Tt(t.relatedInformation.length,e.relatedInformation.length)||g(e.relatedInformation,(e,n)=>_S(e,t.relatedInformation[n]))||0;return e.relatedInformation?-1:1}(e,t)||0}function uS(e,t){const n=mS(e),r=mS(t);return Ft(lS(e),lS(t))||Tt(e.start,t.start)||Tt(e.length,t.length)||Tt(n,r)||function(e,t){let n=gS(e),r=gS(t);"string"!=typeof n&&(n=n.messageText);"string"!=typeof r&&(r=r.messageText);const i="string"!=typeof e.messageText?e.messageText.next:void 0,o="string"!=typeof t.messageText?t.messageText.next:void 0;let a=Ft(n,r);if(a)return a;if(a=function(e,t){if(void 0===e&&void 0===t)return 0;if(void 0===e)return 1;if(void 0===t)return-1;return dS(e,t)||pS(e,t)}(i,o),a)return a;if(e.canonicalHead&&!t.canonicalHead)return-1;if(t.canonicalHead&&!e.canonicalHead)return 1;return 0}(e,t)||0}function dS(e,t){if(void 0===e&&void 0===t)return 0;if(void 0===e)return 1;if(void 0===t)return-1;let n=Tt(t.length,e.length);if(n)return n;for(let r=0;r{e.externalModuleIndicator=JI(e)||!e.isDeclarationFile||void 0};case 1:return e=>{e.externalModuleIndicator=JI(e)};case 2:const t=[JI];4!==e.jsx&&5!==e.jsx||t.push(vS),t.push(bS);const n=an(...t);return t=>{t.externalModuleIndicator=n(t,e)}}}function SS(e){const t=DS(e);return 3<=t&&t<=99||IS(e)||OS(e)}var kS={allowImportingTsExtensions:{dependencies:["rewriteRelativeImportExtensions"],computeValue:e=>!(!e.allowImportingTsExtensions&&!e.rewriteRelativeImportExtensions)},target:{dependencies:["module"],computeValue:e=>(0===e.target?void 0:e.target)??((100===e.module||101===e.module?9:102===e.module&&10)||199===e.module&&99||1)},module:{dependencies:["target"],computeValue:e=>"number"==typeof e.module?e.module:kS.target.computeValue(e)>=2?5:1},moduleResolution:{dependencies:["module","target"],computeValue:e=>{let t=e.moduleResolution;if(void 0===t)switch(kS.module.computeValue(e)){case 1:t=2;break;case 100:case 101:case 102:t=3;break;case 199:t=99;break;case 200:t=100;break;default:t=1}return t}},moduleDetection:{dependencies:["module","target"],computeValue:e=>{if(void 0!==e.moduleDetection)return e.moduleDetection;const t=kS.module.computeValue(e);return 100<=t&&t<=199?3:2}},isolatedModules:{dependencies:["verbatimModuleSyntax"],computeValue:e=>!(!e.isolatedModules&&!e.verbatimModuleSyntax)},esModuleInterop:{dependencies:["module","target"],computeValue:e=>{if(void 0!==e.esModuleInterop)return e.esModuleInterop;switch(kS.module.computeValue(e)){case 100:case 101:case 102:case 199:case 200:return!0}return!1}},allowSyntheticDefaultImports:{dependencies:["module","target","moduleResolution"],computeValue:e=>void 0!==e.allowSyntheticDefaultImports?e.allowSyntheticDefaultImports:kS.esModuleInterop.computeValue(e)||4===kS.module.computeValue(e)||100===kS.moduleResolution.computeValue(e)},resolvePackageJsonExports:{dependencies:["moduleResolution"],computeValue:e=>{const t=kS.moduleResolution.computeValue(e);if(!$S(t))return!1;if(void 0!==e.resolvePackageJsonExports)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolvePackageJsonImports:{dependencies:["moduleResolution","resolvePackageJsonExports"],computeValue:e=>{const t=kS.moduleResolution.computeValue(e);if(!$S(t))return!1;if(void 0!==e.resolvePackageJsonImports)return e.resolvePackageJsonImports;switch(t){case 3:case 99:case 100:return!0}return!1}},resolveJsonModule:{dependencies:["moduleResolution","module","target"],computeValue:e=>{if(void 0!==e.resolveJsonModule)return e.resolveJsonModule;switch(kS.module.computeValue(e)){case 102:case 199:return!0}return 100===kS.moduleResolution.computeValue(e)}},declaration:{dependencies:["composite"],computeValue:e=>!(!e.declaration&&!e.composite)},preserveConstEnums:{dependencies:["isolatedModules","verbatimModuleSyntax"],computeValue:e=>!(!e.preserveConstEnums&&!kS.isolatedModules.computeValue(e))},incremental:{dependencies:["composite"],computeValue:e=>!(!e.incremental&&!e.composite)},declarationMap:{dependencies:["declaration","composite"],computeValue:e=>!(!e.declarationMap||!kS.declaration.computeValue(e))},allowJs:{dependencies:["checkJs"],computeValue:e=>void 0===e.allowJs?!!e.checkJs:e.allowJs},useDefineForClassFields:{dependencies:["target","module"],computeValue:e=>void 0===e.useDefineForClassFields?kS.target.computeValue(e)>=9:e.useDefineForClassFields},noImplicitAny:{dependencies:["strict"],computeValue:e=>HS(e,"noImplicitAny")},noImplicitThis:{dependencies:["strict"],computeValue:e=>HS(e,"noImplicitThis")},strictNullChecks:{dependencies:["strict"],computeValue:e=>HS(e,"strictNullChecks")},strictFunctionTypes:{dependencies:["strict"],computeValue:e=>HS(e,"strictFunctionTypes")},strictBindCallApply:{dependencies:["strict"],computeValue:e=>HS(e,"strictBindCallApply")},strictPropertyInitialization:{dependencies:["strict"],computeValue:e=>HS(e,"strictPropertyInitialization")},strictBuiltinIteratorReturn:{dependencies:["strict"],computeValue:e=>HS(e,"strictBuiltinIteratorReturn")},alwaysStrict:{dependencies:["strict"],computeValue:e=>HS(e,"alwaysStrict")},useUnknownInCatchVariables:{dependencies:["strict"],computeValue:e=>HS(e,"useUnknownInCatchVariables")}},TS=kS,CS=kS.allowImportingTsExtensions.computeValue,wS=kS.target.computeValue,NS=kS.module.computeValue,DS=kS.moduleResolution.computeValue,ES=kS.moduleDetection.computeValue,FS=kS.isolatedModules.computeValue,PS=kS.esModuleInterop.computeValue,AS=kS.allowSyntheticDefaultImports.computeValue,IS=kS.resolvePackageJsonExports.computeValue,OS=kS.resolvePackageJsonImports.computeValue,LS=kS.resolveJsonModule.computeValue,jS=kS.declaration.computeValue,MS=kS.preserveConstEnums.computeValue,RS=kS.incremental.computeValue,BS=kS.declarationMap.computeValue,JS=kS.allowJs.computeValue,zS=kS.useDefineForClassFields.computeValue;function qS(e){return e>=5&&e<=99}function US(e){switch(NS(e)){case 0:case 4:case 3:return!1}return!0}function VS(e){return!1===e.allowUnreachableCode}function WS(e){return!1===e.allowUnusedLabels}function $S(e){return e>=3&&e<=99||100===e}function KS(e){return 101<=e&&e<=199||200===e||99===e}function HS(e,t){return void 0===e[t]?!!e.strict:!!e[t]}function GS(e){return _d(zO.type,(t,n)=>t===e?n:void 0)}function XS(e){return!1!==e.useDefineForClassFields&&wS(e)>=9}function QS(e,t){return cd(t,e,WO)}function YS(e,t){return cd(t,e,$O)}function ZS(e,t){return cd(t,e,KO)}function ek(e,t){return t.strictFlag?HS(e,t.name):t.allowJsFlag?JS(e):e[t.name]}function tk(e){const t=e.jsx;return 2===t||4===t||5===t}function nk(e,t){const n=null==t?void 0:t.pragmas.get("jsximportsource"),r=nt(n)?n[n.length-1]:n,i=null==t?void 0:t.pragmas.get("jsxruntime"),o=nt(i)?i[i.length-1]:i;if("classic"!==(null==o?void 0:o.arguments.factory))return 4===e.jsx||5===e.jsx||e.jsxImportSource||r||"automatic"===(null==o?void 0:o.arguments.factory)?(null==r?void 0:r.arguments.factory)||e.jsxImportSource||"react":void 0}function rk(e,t){return e?`${e}/${5===t.jsx?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function ik(e){let t=!1;for(let n=0;ni,getSymlinkedDirectories:()=>n,getSymlinkedDirectoriesByRealpath:()=>r,setSymlinkedFile:(e,t)=>(i||(i=new Map)).set(e,t),setSymlinkedDirectory:(i,o)=>{let a=Xo(i,e,t);zT(a)||(a=Yo(a),!1===o||(null==n?void 0:n.has(a))||(r||(r=Qe())).add(o.realPath,i),(n||(n=new Map)).set(a,o))},setSymlinksFromResolutions(e,t,n){gn.assert(!o),o=!0,e(e=>a(this,e.resolvedModule)),t(e=>a(this,e.resolvedTypeReferenceDirective)),n.forEach(e=>a(this,e.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>o,setSymlinksFromResolution(e){a(this,e)},hasAnySymlinks:function(){return!!(null==i?void 0:i.size)||!!n&&!!_d(n,e=>!!e)}};function a(n,r){if(!r||!r.originalPath||!r.resolvedFileName)return;const{resolvedFileName:i,originalPath:o}=r;n.setSymlinkedFile(Xo(o,e,t),i);const[a,s]=function(e,t,n,r){const i=Bo($o(e,n)),o=Bo($o(t,n));let a=!1;for(;i.length>=2&&o.length>=2&&!ak(i[i.length-2],r)&&!ak(o[o.length-2],r)&&r(i[i.length-1])===r(o[o.length-1]);)i.pop(),o.pop(),a=!0;return a?[Jo(i),Jo(o)]:void 0}(i,o,e,t)||p;a&&s&&n.setSymlinkedDirectory(s,{real:Yo(a),realPath:Yo(Xo(a,e,t))})}}function ak(e,t){return void 0!==e&&("node_modules"===t(e)||en(e,"@"))}function sk(e,t,n){const r=nn(e,t,n);return void 0===r?void 0:xo((i=r).charCodeAt(0))?i.slice(1):void 0;var i}var ck=/[^\w\s/]/g;function lk(e){return e.replace(ck,_k)}function _k(e){return"\\"+e}var uk=[42,63],dk=`(?!(?:${["node_modules","bower_components","jspm_packages"].join("|")})(?:/|$))`,pk={singleAsteriskRegexFragment:"(?:[^./]|(?:\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(?:/${dk}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Sk(e,pk.singleAsteriskRegexFragment)},fk={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(?:/${dk}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Sk(e,fk.singleAsteriskRegexFragment)},mk={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(?:/.+?)?",replaceWildcardCharacter:e=>Sk(e,mk.singleAsteriskRegexFragment)},gk={files:pk,directories:fk,exclude:mk};function hk(e,t,n){const r=yk(e,t,n);if(!r||!r.length)return;return`^(?:${r.map(e=>`(?:${e})`).join("|")})${"exclude"===n?"(?:$|/)":"$"}`}function yk(e,t,n){if(void 0!==e&&0!==e.length)return R(e,e=>e&&xk(e,t,n,gk[n]))}function vk(e){return!/[.*?]/.test(e)}function bk(e,t,n){const r=e&&xk(e,t,n,gk[n]);return r&&`^(?:${r})${"exclude"===n?"(?:$|/)":"$"}`}function xk(e,t,n,{singleAsteriskRegexFragment:r,doubleAsteriskRegexFragment:i,replaceWildcardCharacter:o}=gk[n]){let a="",s=!1;const c=Wo(e,t),l=Te(c);if("exclude"!==n&&"**"===l)return;c[0]=Qo(c[0]),vk(l)&&c.push("**","*");let _=0;for(let e of c){if("**"===e)a+=i;else if("directories"===n&&(a+="(?:",_++),s&&(a+=ho),"exclude"!==n){let t="";42===e.charCodeAt(0)?(t+="(?:[^./]"+r+")?",e=e.substr(1)):63===e.charCodeAt(0)&&(t+="[^./]",e=e.substr(1)),t+=e.replace(ck,o),t!==e&&(a+=dk),a+=t}else a+=e.replace(ck,o);s=!0}for(;_>0;)a+=")?",_--;return a}function Sk(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function kk(e,t,n,r,i){e=Ko(e);const o=Uo(i=Ko(i),e);return{includeFilePatterns:O(yk(n,o,"files"),e=>`^${e}$`),includeFilePattern:hk(n,o,"files"),includeDirectoryPattern:hk(n,o,"directories"),excludePattern:hk(t,o,"exclude"),basePaths:wk(e,n,r)}}function Tk(e,t){return new RegExp(e,t?"":"i")}function Ck(e,t,n,r,i,o,a,s,c){e=Ko(e),o=Ko(o);const l=kk(e,n,r,i,o),_=l.includeFilePatterns&&l.includeFilePatterns.map(e=>Tk(e,i)),u=l.includeDirectoryPattern&&Tk(l.includeDirectoryPattern,i),d=l.excludePattern&&Tk(l.excludePattern,i),p=_?_.map(()=>[]):[[]],f=new Map,m=Xt(i);for(const e of l.basePaths)g(e,Uo(o,e),a);return M(p);function g(e,n,r){const i=m(c(n));if(f.has(i))return;f.set(i,!0);const{files:o,directories:a}=s(e);for(const r of me(o,Ft)){const i=Uo(e,r),o=Uo(n,r);if((!t||Fo(i,t))&&(!d||!d.test(o)))if(_){const e=w(_,e=>e.test(o));-1!==e&&p[e].push(i)}else p[0].push(i)}if(void 0===r||0!==--r)for(const t of me(a,Ft)){const i=Uo(e,t),o=Uo(n,t);u&&!u.test(o)||d&&d.test(o)||g(i,o,r)}}}function wk(e,t,n){const r=[e];if(t){const i=[];for(const n of t){const t=ko(n)?n:Ko(Uo(e,n));i.push(Nk(t))}i.sort(Pt(!n));for(const t of i)k(r,r=>!sa(r,t,e,!n))&&r.push(t)}return r}function Nk(e){const t=E(e,uk);return t<0?Do(e)?Qo(Lo(e)):e:e.substring(0,e.lastIndexOf(ho,t))}function Dk(e,t){return t||Ek(e)||3}function Ek(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}var Fk=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],Pk=M(Fk),Ak=[...Fk,[".json"]],Ik=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],Ok=M([[".js",".jsx"],[".mjs"],[".cjs"]]),Lk=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],jk=[...Lk,[".json"]],Mk=[".d.ts",".d.cts",".d.mts"],Rk=[".ts",".cts",".mts",".tsx"],Bk=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"];function Jk(e,t){const n=e&&JS(e);if(!t||0===t.length)return n?Lk:Fk;const r=n?Lk:Fk,i=M(r);return[...r,...U(t,e=>{return 7===e.scriptKind||n&&(1===(t=e.scriptKind)||2===t)&&!i.includes(e.extension)?[e.extension]:void 0;var t})]}function zk(e,t){return e&&LS(e)?t===Lk?jk:t===Fk?Ak:[...t,[".json"]]:t}function qk(e){return X(Ok,t=>Eo(e,t))}function Uk(e){return X(Pk,t=>Eo(e,t))}function Vk(e){return X(Rk,t=>Eo(e,t))&&!SO(e)}var Wk=(e=>(e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension",e[e.TsExtension=3]="TsExtension",e))(Wk||{});function $k(e,t,n,r){const i=DS(n),o=3<=i&&i<=99;return"js"===e||99===t&&o?QR(n)&&2!==a()?3:2:"minimal"===e?0:"index"===e?1:QR(n)?a():r&&function({imports:e},t=an(qk,Uk)){return y(e,({text:e})=>wo(e)&&!Fo(e,Bk)?t(e):void 0)||!1}(r)?2:0;function a(){let e=!1;const i=(null==r?void 0:r.imports.length)?r.imports:r&&jm(r)?function(e){let t,n=0;for(const r of e.statements){if(n>3)break;Km(r)?t=Y(t,r.declarationList.declarations.map(e=>e.initializer)):tF(r)&&qm(r.expression,!0)?t=le(t,r.expression):n++}return t||p}(r).map(e=>e.arguments[0]):p;for(const a of i)if(wo(a.text)){if(o&&1===t&&99===wV(r,a,n))continue;if(Fo(a.text,Bk))continue;if(Uk(a.text))return 3;qk(a.text)&&(e=!0)}return e?2:0}}function Kk(e,t,n){if(!e)return!1;const r=Jk(t,n);for(const n of M(zk(t,r)))if(Eo(e,n))return!0;return!1}function Hk(e){const t=e.match(/\//g);return t?t.length:0}function Gk(e,t){return Tt(Hk(e),Hk(t))}var Xk=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"];function Qk(e){for(const t of Xk){const n=Yk(e,t);if(void 0!==n)return n}return e}function Yk(e,t){return Eo(e,t)?Zk(e,t):void 0}function Zk(e,t){return e.substring(0,e.length-t.length)}function eT(e,t){return ea(e,t,Xk,!1)}function tT(e){const t=e.indexOf("*");return-1===t?e:-1!==e.indexOf("*",t+1)?void 0:{prefix:e.substr(0,t),suffix:e.substr(t+1)}}var nT=new WeakMap;function rT(e){let t,n,r=nT.get(e);if(void 0!==r)return r;const i=Le(e);for(const e of i){const r=tT(e);void 0!==r&&("string"==typeof r?(t??(t=new Set)).add(r):(n??(n=[])).push(r))}return nT.set(e,r={matchableStringSet:t,patterns:n}),r}function iT(e){return!(e>=0)}function oT(e){return".ts"===e||".tsx"===e||".d.ts"===e||".cts"===e||".mts"===e||".d.mts"===e||".d.cts"===e||en(e,".d.")&&qt(e,".ts")}function aT(e){return oT(e)||".json"===e}function sT(e){const t=lT(e);return void 0!==t?t:gn.fail(`File ${e} has unknown extension.`)}function cT(e){return void 0!==lT(e)}function lT(e){return T(Xk,t=>Eo(e,t))}function _T(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs}var uT={files:p,directories:p};function dT(e,t){const{matchableStringSet:n,patterns:r}=e;return(null==n?void 0:n.has(t))?t:void 0!==r&&0!==r.length?Zt(r,e=>e,t):void 0}function pT(e,t){const n=e.indexOf(t);return gn.assert(-1!==n),e.slice(n)}function fT(e,...t){return t.length?(e.relatedInformation||(e.relatedInformation=[]),gn.assert(e.relatedInformation!==p,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t),e):e}function mT(e,t){gn.assert(0!==e.length);let n=t(e[0]),r=n;for(let i=1;ir&&(r=o)}return{min:n,max:r}}function gT(e){return{pos:Hd(e),end:e.end}}function hT(e,t){return{pos:t.pos-1,end:Math.min(e.text.length,is(e.text,t.end)+1)}}function yT(e,t,n){return bT(e,t,n,!1)}function vT(e,t,n){return bT(e,t,n,!0)}function bT(e,t,n,r){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||!r&&t.noCheck||n.isSourceOfProjectReferenceRedirect(e.fileName)||!xT(e,t)}function xT(e,t){if(e.checkJsDirective&&!1===e.checkJsDirective.enabled)return!1;if(3===e.scriptKind||4===e.scriptKind||5===e.scriptKind)return!0;const n=(1===e.scriptKind||2===e.scriptKind)&&_T(e,t);return Dd(e,t.checkJs)||n||7===e.scriptKind}function ST(e,t){return e===t||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&ze(e,t,ST)}function kT(e){let t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:const n=e.length-1;let r=0;for(;48===e.charCodeAt(r);)r++;return e.slice(r,n)||"0"}const n=e.length-1,r=(n-2)*t,i=new Uint16Array((r>>>4)+(15&r?1:0));for(let r=n-1,o=0;r>=2;r--,o+=t){const t=o>>>4,n=e.charCodeAt(r),a=(n<=57?n-48:10+n-(n<=70?65:97))<<(15&o);i[t]|=a;const s=a>>>16;s&&(i[t+1]|=s)}let o="",a=i.length-1,s=!0;for(;s;){let e=0;s=!1;for(let t=a;t>=0;t--){const n=e<<16|i[t],r=n/10|0;i[t]=r,e=n-10*r,r&&!s&&(a=t,s=!0)}o=e+o}return o}function TT({negative:e,base10Value:t}){return(e&&"0"!==t?"-":"")+t}function CT(e){if(NT(e,!1))return wT(e)}function wT(e){const t=e.startsWith("-");return{negative:t,base10Value:kT(`${t?e.slice(1):e}n`)}}function NT(e,t){if(""===e)return!1;const n=ks(99,!1);let r=!0;n.setOnError(()=>r=!1),n.setText(e+"n");let i=n.scan();const o=41===i;o&&(i=n.scan());const a=n.getTokenFlags();return r&&10===i&&n.getTokenEnd()===e.length+1&&!(512&a)&&(!t||e===TT({negative:o,base10Value:kT(n.getTokenValue())}))}function DT(e){return!!(33554432&e.flags)||Jm(e)||Em(e)||function(e){if(80!==e.kind)return!1;const t=yc(e.parent,e=>{switch(e.kind){case 299:return!0;case 212:case 234:return!1;default:return"quit"}});return 119===(null==t?void 0:t.token)||265===(null==t?void 0:t.parent.kind)}(e)||function(e){for(;80===e.kind||212===e.kind;)e=e.parent;if(168!==e.kind)return!1;if(Lv(e.parent,64))return!0;const t=e.parent.parent.kind;return 265===t||188===t}(e)||!(Nm(e)||function(e){return fD(e)&&dP(e.parent)&&e.parent.name===e}(e))}function ET(e){return $D(e)&&fD(e.typeName)}function FT(e,t=bt){if(e.length<2)return!0;const n=e[0];for(let r=1,i=e.length;re.includes(t))}function qT(e){if(!e.parent)return;switch(e.kind){case 169:const{parent:t}=e;return 196===t.kind?void 0:t.typeParameters;case 170:return e.parent.parameters;case 205:case 240:return e.parent.templateSpans;case 171:{const{parent:t}=e;return OI(t)?t.modifiers:void 0}case 299:return e.parent.heritageClauses}const{parent:t}=e;if(Au(e))return AP(e.parent)?void 0:e.parent.tags;switch(t.kind){case 188:case 265:return T_(e)?t.members:void 0;case 193:case 194:return t.types;case 190:case 210:case 357:case 276:case 280:return t.elements;case 211:case 293:return t.properties;case 214:case 215:return N_(e)?t.typeArguments:t.expression===e?void 0:t.arguments;case 285:case 289:return Tu(e)?t.children:void 0;case 287:case 286:return N_(e)?t.typeArguments:void 0;case 242:case 297:case 298:case 269:case 308:return t.statements;case 270:return t.clauses;case 264:case 232:return h_(e)?t.members:void 0;case 267:return fP(e)?t.members:void 0}}function UT(e){if(!e.typeParameters){if(X(e.parameters,e=>!xv(e)))return!0;if(220!==e.kind){const t=ve(e.parameters);if(!t||!mv(t))return!0}}return!1}function VT(e){return"Infinity"===e||"-Infinity"===e||"NaN"===e}function WT(e){return 261===e.kind&&300===e.parent.kind}function $T(e){return 219===e.kind||220===e.kind}function KT(e){return e.replace(/\$/g,()=>"\\$")}function HT(e){return(+e).toString()===e}function GT(e,t,n,r,i){const o=i&&"new"===e;return!o&&Ss(e,t)?kw.createIdentifier(e):!r&&!o&&HT(e)&&+e>=0?kw.createNumericLiteral(+e):kw.createStringLiteral(e,!!n)}function XT(e){return!!(262144&e.flags&&e.isThisType)}function QT(e){let t,n=0,r=0,i=0,o=0;var a;(a=t||(t={}))[a.BeforeNodeModules=0]="BeforeNodeModules",a[a.NodeModules=1]="NodeModules",a[a.Scope=2]="Scope",a[a.PackageContent=3]="PackageContent";let s=0,c=0,l=0;for(;c>=0;)switch(s=c,c=e.indexOf("/",s+1),l){case 0:e.indexOf(cR,s)===s&&(n=s,r=c,l=1);break;case 1:case 2:1===l&&"@"===e.charAt(s+1)?l=2:(i=c,l=3);break;case 3:l=e.indexOf(cR,s)===s?1:3}return o=s,l>1?{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:r,packageRootIndex:i,fileNameIndex:o}:void 0}function YT(e){switch(e.kind){case 169:case 264:case 265:case 266:case 267:case 347:case 339:case 341:return!0;case 274:return 156===e.phaseModifier;case 277:return 156===e.parent.parent.phaseModifier;case 282:return e.parent.parent.isTypeOnly;default:return!1}}function ZT(e){return kF(e)||ZE(e)||vF(e)||bF(e)||xF(e)||YT(e)||TF(e)&&!xp(e)&&!bp(e)}function eC(e){if(!Ol(e))return!1;const{isBracketed:t,typeExpression:n}=e;return t||!!n&&317===n.type.kind}function tC(e,t){if(0===e.length)return!1;const n=e.charCodeAt(0);return 35===n?e.length>1&&bs(e.charCodeAt(1),t):bs(n,t)}function nC(e){var t;return 0===(null==(t=tN(e))?void 0:t.kind)}function rC(e){return Mm(e)&&(e.type&&317===e.type.kind||Mc(e).some(eC))}function iC(e){switch(e.kind){case 173:case 172:return!!e.questionToken;case 170:return!!e.questionToken||rC(e);case 349:case 342:return eC(e);default:return!1}}function oC(e){const t=e.kind;return(212===t||213===t)&&WE(e.expression)}function aC(e){return Mm(e)&&wE(e)&&Lu(e)&&!!sl(e)}function sC(e){return gn.checkDefined(cC(e))}function cC(e){const t=sl(e);return t&&t.typeExpression&&t.typeExpression.type}function lC(e){return fD(e)?e.escapedText:dC(e)}function _C(e){return fD(e)?kc(e):pC(e)}function uC(e){const t=e.kind;return 80===t||296===t}function dC(e){return`${e.namespace.escapedText}:${kc(e.name)}`}function pC(e){return`${kc(e.namespace)}:${kc(e.name)}`}function fC(e){return fD(e)?kc(e):pC(e)}function mC(e){return!!(8576&e.flags)}function gC(e){return 8192&e.flags?e.escapedName:384&e.flags?xc(""+e.value):gn.fail()}function hC(e){return!!e&&(bE(e)||xE(e)||LE(e))}function yC(e){return void 0!==e&&!!EV(e.attributes)}var vC=String.prototype.replace;function bC(e,t){return vC.call(e,"*",t)}function xC(e){return fD(e.name)?e.name.escapedText:xc(e.name.text)}function SC(e){switch(e.kind){case 169:case 170:case 173:case 172:case 186:case 185:case 180:case 181:case 182:case 175:case 174:case 176:case 177:case 178:case 179:case 184:case 183:case 187:case 188:case 189:case 190:case 193:case 194:case 197:case 191:case 192:case 198:case 199:case 195:case 196:case 204:case 206:case 203:case 329:case 330:case 347:case 339:case 341:case 346:case 345:case 325:case 326:case 327:case 342:case 349:case 318:case 316:case 315:case 313:case 314:case 323:case 319:case 310:case 334:case 336:case 335:case 351:case 344:case 200:case 201:case 263:case 242:case 269:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 251:case 252:case 253:case 254:case 255:case 256:case 257:case 258:case 259:case 261:case 209:case 264:case 265:case 266:case 267:case 268:case 273:case 272:case 279:case 278:case 243:case 260:case 283:return!0}return!1}function kC(e,t=!1,n=!1,r=!1){return{value:e,isSyntacticallyString:t,resolvedOtherFiles:n,hasExternalReferences:r}}function TC({evaluateElementAccessExpression:e,evaluateEntityNameExpression:t}){function n(r,i){let o=!1,a=!1,s=!1;switch((r=ph(r)).kind){case 225:const c=n(r.operand,i);if(a=c.resolvedOtherFiles,s=c.hasExternalReferences,"number"==typeof c.value)switch(r.operator){case 40:return kC(c.value,o,a,s);case 41:return kC(-c.value,o,a,s);case 55:return kC(~c.value,o,a,s)}break;case 227:{const e=n(r.left,i),t=n(r.right,i);if(o=(e.isSyntacticallyString||t.isSyntacticallyString)&&40===r.operatorToken.kind,a=e.resolvedOtherFiles||t.resolvedOtherFiles,s=e.hasExternalReferences||t.hasExternalReferences,"number"==typeof e.value&&"number"==typeof t.value)switch(r.operatorToken.kind){case 52:return kC(e.value|t.value,o,a,s);case 51:return kC(e.value&t.value,o,a,s);case 49:return kC(e.value>>t.value,o,a,s);case 50:return kC(e.value>>>t.value,o,a,s);case 48:return kC(e.value<=2)break;case 175:case 177:case 178:case 179:case 263:if(3&p&&"arguments"===I){w=n;break e}break;case 219:if(3&p&&"arguments"===I){w=n;break e}if(16&p){const e=s.name;if(e&&I===e.escapedText){w=s.symbol;break e}}break;case 171:s.parent&&170===s.parent.kind&&(s=s.parent),s.parent&&(h_(s.parent)||264===s.parent.kind)&&(s=s.parent);break;case 347:case 339:case 341:case 352:const o=Yg(s);o&&(s=o.parent);break;case 170:N&&(N===s.initializer||N===s.name&&E_(N))&&(F||(F=s));break;case 209:N&&(N===s.initializer||N===s.name&&E_(N))&&iy(s)&&!F&&(F=s);break;case 196:if(262144&p){const e=s.typeParameter.name;if(e&&I===e.escapedText){w=s.typeParameter.symbol;break e}}break;case 282:N&&N===s.propertyName&&s.parent.parent.moduleSpecifier&&(s=s.parent.parent.parent)}y(s,N)&&(D=s),N=s,s=QP(s)?Kg(s)||s.parent:(KP(s)||HP(s))&&Gg(s)||s.parent}!b||!w||D&&w===D.symbol||(w.isReferenced|=p);if(!w){if(N&&(gn.assertNode(N,mP),N.commonJsModuleIndicator&&"exports"===I&&p&N.symbol.flags))return N.symbol;x||(w=a(o,I,p))}if(!w&&C&&Mm(C)&&C.parent&&qm(C.parent,!1))return t;if(g){if(E&&l(C,I,E,w))return;w?u(C,w,p,N,F,A):_(C,c,p,g)}return w};function m(t,n,r){const i=wS(e),o=n;if(AD(r)&&o.body&&t.valueDeclaration&&t.valueDeclaration.pos>=o.body.pos&&t.valueDeclaration.end<=o.body.end&&i>=2){let e=c(o);return void 0===e&&(e=g(o.parameters,function(e){return a(e.name)||!!e.initializer&&a(e.initializer)})||!1,s(o,e)),!e}return!1;function a(e){switch(e.kind){case 220:case 219:case 263:case 177:return!1;case 175:case 178:case 179:case 304:return a(e.name);case 173:return Mv(e)?!p:a(e.name);default:return Dl(e)||Tl(e)?i<7:hE(e)&&e.dotDotDotToken&&mE(e.parent)?i<4:!N_(e)&&(sO(e,a)||!1)}}}function h(e,t){return 220!==e.kind&&219!==e.kind?GD(e)||(d_(e)||173===e.kind&&!jv(e))&&(!t||t!==e.name):(!t||t!==e.name)&&(!(!e.asteriskToken&&!Lv(e,1024))||!dm(e))}function y(e,t){switch(e.kind){case 170:return!!t&&t===e.name;case 263:case 264:case 265:case 267:case 266:case 268:return!0;default:return!1}}function v(e,t){if(e.declarations)for(const n of e.declarations)if(169===n.kind){if((QP(n.parent)?Qg(n.parent):n.parent)===t)return!(QP(n.parent)&&T(n.parent.parent.tags,Lg))}return!1}}function DC(e,t=!0){switch(gn.type(e),e.kind){case 112:case 97:case 9:case 11:case 15:return!0;case 10:return t;case 225:return 41===e.operator?GN(e.operand)||t&&XN(e.operand):40===e.operator&&GN(e.operand);default:return!1}}function EC(e){for(;218===e.kind;)e=e.expression;return e}function FC(e){switch(gn.type(e),e.kind){case 170:case 172:case 173:case 209:case 212:case 213:case 227:case 261:case 278:case 304:case 305:case 342:case 349:return!0;default:return!1}}function PC(e){const t=yc(e,EF);return!!t&&!t.importClause}var AC=["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","test/mock_loader","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],IC=new Set(AC),OC=new Set(["node:sea","node:sqlite","node:test","node:test/reporters"]),LC=new Set([...AC,...AC.map(e=>`node:${e}`),...OC]);function jC(e,t,n,r){const i=Mm(e),o=/import|require/g;for(;null!==o.exec(e.text);){const a=MC(e,o.lastIndex,t);if(i&&qm(a,n))r(a,a.arguments[0]);else if(hf(a)&&a.arguments.length>=1&&(!n||Uu(a.arguments[0])))r(a,a.arguments[0]);else if(t&&vf(a))r(a,a.argument.literal);else if(t&&iA(a)){const e=Eg(a);e&&QN(e)&&e.text&&r(a,e)}}}function MC(e,t,n){const r=Mm(e);let i=e;const o=e=>{if(e.pos<=t&&(te&&t(e))}function qC(e,t,n,r){let i;return function e(t,o,a){if(r){const e=r(t,a);if(e)return e}let s;return g(o,(e,t)=>{if(e&&(null==i?void 0:i.has(e.sourceFile.path)))return void(s??(s=new Set)).add(e);const r=n(e,a,t);if(r||!e)return r;(i||(i=new Set)).add(e.sourceFile.path)})||g(o,t=>t&&!(null==s?void 0:s.has(t))?e(t.commandLine.projectReferences,t.references,t):void 0)}(e,t,void 0)}function UC(e,t,n){return e&&(r=n,Qf(e,t,e=>yE(e.initializer)?T(e.initializer.elements,e=>QN(e)&&e.text===r):void 0));var r}function VC(e,t,n){return WC(e,t,e=>QN(e.initializer)&&e.initializer.text===n?e.initializer:void 0)}function WC(e,t,n){return Qf(e,t,n)}function $C(e,t=!0){const n=e&&HC(e);return n&&!t&&QC(n),MT(n,!1)}function KC(e,t,n){let r=n(e);return r?Cw(r,e):r=HC(e,n),r&&!t&&QC(r),r}function HC(e,t){const n=t?e=>KC(e,!0,t):$C,r=IJ(e,n,void 0,t?e=>e&&XC(e,!0,t):e=>e&&GC(e),n);if(r===e){return AI(QN(e)?Cw(kw.createStringLiteralFromNode(e),e):GN(e)?Cw(kw.createNumericLiteral(e.text,e.numericLiteralFlags),e):kw.cloneNode(e),e)}return r.parent=void 0,r}function GC(e,t=!0){if(e){const n=kw.createNodeArray(e.map(e=>$C(e,t)),e.hasTrailingComma);return AI(n,e),n}return e}function XC(e,t,n){return kw.createNodeArray(e.map(e=>KC(e,t,n)),e.hasTrailingComma)}function QC(e){YC(e),ZC(e)}function YC(e){ew(e,1024,tw)}function ZC(e){ew(e,2048,Nx)}function ew(e,t,n){Fw(e,t);const r=n(e);r&&ew(r,t,n)}function tw(e){return sO(e,e=>e)}function nw(){let e,t,n,r,i;return{createBaseSourceFileNode:function(e){return new(i||(i=Wx.getSourceFileConstructor()))(e,-1,-1)},createBaseIdentifierNode:function(e){return new(n||(n=Wx.getIdentifierConstructor()))(e,-1,-1)},createBasePrivateIdentifierNode:function(e){return new(r||(r=Wx.getPrivateIdentifierConstructor()))(e,-1,-1)},createBaseTokenNode:function(e){return new(t||(t=Wx.getTokenConstructor()))(e,-1,-1)},createBaseNode:function(t){return new(e||(e=Wx.getNodeConstructor()))(t,-1,-1)}}}function rw(e){let t,n;return{getParenthesizeLeftSideOfBinaryForOperator:function(e){t||(t=new Map);let n=t.get(e);n||(n=t=>o(e,t),t.set(e,n));return n},getParenthesizeRightSideOfBinaryForOperator:function(e){n||(n=new Map);let t=n.get(e);t||(t=t=>a(e,void 0,t),n.set(e,t));return t},parenthesizeLeftSideOfBinary:o,parenthesizeRightSideOfBinary:a,parenthesizeExpressionOfComputedPropertyName:function(t){return PA(t)?e.createParenthesizedExpression(t):t},parenthesizeConditionOfConditionalExpression:function(t){const n=fy(228,58),r=Fl(t);if(1!==Tt(uy(r),n))return e.createParenthesizedExpression(t);return t},parenthesizeBranchOfConditionalExpression:function(t){return PA(Fl(t))?e.createParenthesizedExpression(t):t},parenthesizeExpressionOfExportDefault:function(t){const n=Fl(t);let r=PA(n);if(!r)switch(jx(n,!1).kind){case 232:case 219:r=!0}return r?e.createParenthesizedExpression(t):t},parenthesizeExpressionOfNew:function(t){const n=jx(t,!0);switch(n.kind){case 214:return e.createParenthesizedExpression(t);case 215:return n.arguments?t:e.createParenthesizedExpression(t)}return s(t)},parenthesizeLeftSideOfAccess:s,parenthesizeOperandOfPostfixUnary:function(t){return W_(t)?t:AI(e.createParenthesizedExpression(t),t)},parenthesizeOperandOfPrefixUnary:function(t){return K_(t)?t:AI(e.createParenthesizedExpression(t),t)},parenthesizeExpressionsOfCommaDelimitedList:function(t){const n=j(t,c);return AI(e.createNodeArray(n,t.hasTrailingComma),t)},parenthesizeExpressionForDisallowedComma:c,parenthesizeExpressionOfExpressionStatement:function(t){const n=Fl(t);if(SE(n)){const r=n.expression,i=Fl(r).kind;if(219===i||220===i){const i=e.updateCallExpression(n,AI(e.createParenthesizedExpression(r),r),n.typeArguments,n.arguments);return e.restoreOuterExpressions(t,i,8)}}const r=jx(n,!1).kind;if(211===r||219===r)return AI(e.createParenthesizedExpression(t),t);return t},parenthesizeConciseBodyOfArrowFunction:function(t){if(!YE(t)&&(PA(t)||211===jx(t,!1).kind))return AI(e.createParenthesizedExpression(t),t);return t},parenthesizeCheckTypeOfConditionalType:l,parenthesizeExtendsTypeOfConditionalType:function(t){if(195===t.kind)return e.createParenthesizedType(t);return t},parenthesizeConstituentTypesOfUnionType:function(t){return e.createNodeArray(j(t,_))},parenthesizeConstituentTypeOfUnionType:_,parenthesizeConstituentTypesOfIntersectionType:function(t){return e.createNodeArray(j(t,u))},parenthesizeConstituentTypeOfIntersectionType:u,parenthesizeOperandOfTypeOperator:d,parenthesizeOperandOfReadonlyTypeOperator:function(t){if(199===t.kind)return e.createParenthesizedType(t);return d(t)},parenthesizeNonArrayTypeOfPostfixType:p,parenthesizeElementTypesOfTupleType:function(t){return e.createNodeArray(j(t,f))},parenthesizeElementTypeOfTupleType:f,parenthesizeTypeOfOptionalType:function(t){return m(t)?e.createParenthesizedType(t):p(t)},parenthesizeTypeArguments:function(t){if(X(t))return e.createNodeArray(j(t,h))},parenthesizeLeadingTypeArgument:g};function r(e){if(Bl((e=Fl(e)).kind))return e.kind;if(227===e.kind&&40===e.operatorToken.kind){if(void 0!==e.cachedLiteralKind)return e.cachedLiteralKind;const t=r(e.left),n=Bl(t)&&t===r(e.right)?t:0;return e.cachedLiteralKind=n,n}return 0}function i(t,n,i,o){return 218===Fl(n).kind?n:function(e,t,n,i){const o=Fl(t);if(LE(o)&&(a=e,s=o.operatorToken.kind,61===a?56===s||57===s:61===s&&(56===a||57===a)))return!0;var a,s;const c=fy(227,e),l=_y(227,e);if(!n&&220===t.kind&&c>3)return!0;switch(Tt(uy(o),c)){case-1:return!(!n&&1===l&&230===t.kind);case 1:return!1;case 0:if(n)return 1===l;if(LE(o)&&o.operatorToken.kind===e){if(function(e){return 42===e||52===e||51===e||53===e||28===e}(e))return!1;if(40===e){const e=i?r(i):0;if(Bl(e)&&e===r(o))return!1}}return 0===ly(o)}}(t,n,i,o)?e.createParenthesizedExpression(n):n}function o(e,t){return i(e,t,!0)}function a(e,t,n){return i(e,n,!1,t)}function s(t,n){const r=Fl(t);return!W_(r)||215===r.kind&&!r.arguments||!n&&Tl(r)?AI(e.createParenthesizedExpression(t),t):t}function c(t){return uy(Fl(t))>fy(227,28)?t:AI(e.createParenthesizedExpression(t),t)}function l(t){switch(t.kind){case 185:case 186:case 195:return e.createParenthesizedType(t)}return t}function _(t){switch(t.kind){case 193:case 194:return e.createParenthesizedType(t)}return l(t)}function u(t){switch(t.kind){case 193:case 194:return e.createParenthesizedType(t)}return _(t)}function d(t){return 194===t.kind?e.createParenthesizedType(t):u(t)}function p(t){switch(t.kind){case 196:case 199:case 187:return e.createParenthesizedType(t)}return d(t)}function f(t){return m(t)?e.createParenthesizedType(t):t}function m(e){return CP(e)?e.postfix:ZD(e)||KD(e)||HD(e)||cE(e)?m(e.type):iE(e)?m(e.falseType):nE(e)||rE(e)?m(Te(e.types)):!!oE(e)&&(!!e.typeParameter.constraint&&m(e.typeParameter.constraint))}function g(t){return D_(t)&&t.typeParameters?e.createParenthesizedType(t):t}function h(e,t){return 0===t?g(e):e}}var iw={getParenthesizeLeftSideOfBinaryForOperator:e=>dt,getParenthesizeRightSideOfBinaryForOperator:e=>dt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,n)=>n,parenthesizeExpressionOfComputedPropertyName:dt,parenthesizeConditionOfConditionalExpression:dt,parenthesizeBranchOfConditionalExpression:dt,parenthesizeExpressionOfExportDefault:dt,parenthesizeExpressionOfNew:e=>st(e,W_),parenthesizeLeftSideOfAccess:e=>st(e,W_),parenthesizeOperandOfPostfixUnary:e=>st(e,W_),parenthesizeOperandOfPrefixUnary:e=>st(e,K_),parenthesizeExpressionsOfCommaDelimitedList:e=>st(e,Rl),parenthesizeExpressionForDisallowedComma:dt,parenthesizeExpressionOfExpressionStatement:dt,parenthesizeConciseBodyOfArrowFunction:dt,parenthesizeCheckTypeOfConditionalType:dt,parenthesizeExtendsTypeOfConditionalType:dt,parenthesizeConstituentTypesOfUnionType:e=>st(e,Rl),parenthesizeConstituentTypeOfUnionType:dt,parenthesizeConstituentTypesOfIntersectionType:e=>st(e,Rl),parenthesizeConstituentTypeOfIntersectionType:dt,parenthesizeOperandOfTypeOperator:dt,parenthesizeOperandOfReadonlyTypeOperator:dt,parenthesizeNonArrayTypeOfPostfixType:dt,parenthesizeElementTypesOfTupleType:e=>st(e,Rl),parenthesizeElementTypeOfTupleType:dt,parenthesizeTypeOfOptionalType:dt,parenthesizeTypeArguments:e=>e&&st(e,Rl),parenthesizeLeadingTypeArgument:dt};function ow(e){return{convertToFunctionBlock:function(t,n){if(YE(t))return t;const r=e.createReturnStatement(t);AI(r,t);const i=e.createBlock([r],n);return AI(i,t),i},convertToFunctionExpression:function(t){var n;if(!t.body)return gn.fail("Cannot convert a FunctionDeclaration without a body");const r=e.createFunctionExpression(null==(n=Lc(t))?void 0:n.filter(e=>!gD(e)&&!hD(e)),t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);Cw(r,t),AI(r,t),Mw(t)&&Rw(r,!0);return r},convertToClassExpression:function(t){var n;const r=e.createClassExpression(null==(n=t.modifiers)?void 0:n.filter(e=>!gD(e)&&!hD(e)),t.name,t.typeParameters,t.heritageClauses,t.members);Cw(r,t),AI(r,t),Mw(t)&&Rw(r,!0);return r},convertToArrayAssignmentElement:t,convertToObjectAssignmentElement:n,convertToAssignmentPattern:r,convertToObjectAssignmentPattern:i,convertToArrayAssignmentPattern:o,convertToAssignmentElementTarget:a};function t(t){if(hE(t)){if(t.dotDotDotToken)return gn.assertNode(t.name,fD),Cw(AI(e.createSpreadElement(t.name),t),t);const n=a(t.name);return t.initializer?Cw(AI(e.createAssignment(n,t.initializer),t),t):n}return st(t,Q_)}function n(t){if(hE(t)){if(t.dotDotDotToken)return gn.assertNode(t.name,fD),Cw(AI(e.createSpreadAssignment(t.name),t),t);if(t.propertyName){const n=a(t.name);return Cw(AI(e.createPropertyAssignment(t.propertyName,t.initializer?e.createAssignment(n,t.initializer):n),t),t)}return gn.assertNode(t.name,fD),Cw(AI(e.createShorthandPropertyAssignment(t.name,t.initializer),t),t)}return st(t,w_)}function r(e){switch(e.kind){case 208:case 210:return o(e);case 207:case 211:return i(e)}}function i(t){return mE(t)?Cw(AI(e.createObjectLiteralExpression(O(t.elements,n)),t),t):st(t,vE)}function o(n){return gE(n)?Cw(AI(e.createArrayLiteralExpression(O(n.elements,t)),n),n):st(n,yE)}function a(e){return E_(e)?r(e):st(e,Q_)}}var aw,sw={convertToFunctionBlock:gt,convertToFunctionExpression:gt,convertToClassExpression:gt,convertToArrayAssignmentElement:gt,convertToObjectAssignmentElement:gt,convertToAssignmentPattern:gt,convertToObjectAssignmentPattern:gt,convertToArrayAssignmentPattern:gt,convertToAssignmentElementTarget:gt},cw=0,lw=(e=>(e[e.None=0]="None",e[e.NoParenthesizerRules=1]="NoParenthesizerRules",e[e.NoNodeConverters=2]="NoNodeConverters",e[e.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",e[e.NoOriginalNode=8]="NoOriginalNode",e))(lw||{}),_w=[];function uw(e){_w.push(e)}function dw(e,t){const n=8&e?dt:Cw,r=ht(()=>1&e?iw:rw(v)),i=ht(()=>2&e?sw:ow(v)),o=yt(e=>(t,n)=>Ot(t,e,n)),a=yt(e=>t=>At(e,t)),s=yt(e=>t=>It(t,e)),c=yt(e=>()=>function(e){return x(e)}(e)),l=yt(e=>t=>dr(e,t)),_=yt(e=>(t,n)=>function(e,t,n){return t.type!==n?Oi(dr(e,n),t):t}(e,t,n)),u=yt(e=>(t,n)=>ur(e,t,n)),d=yt(e=>(t,n)=>function(e,t,n){return t.type!==n?Oi(ur(e,n,t.postfix),t):t}(e,t,n)),f=yt(e=>(t,n)=>Or(e,t,n)),m=yt(e=>(t,n,r)=>function(e,t,n=hr(t),r){return t.tagName!==n||t.comment!==r?Oi(Or(e,n,r),t):t}(e,t,n,r)),h=yt(e=>(t,n,r)=>Lr(e,t,n,r)),y=yt(e=>(t,n,r,i)=>function(e,t,n=hr(t),r,i){return t.tagName!==n||t.typeExpression!==r||t.comment!==i?Oi(Lr(e,n,r,i),t):t}(e,t,n,r,i)),v={get parenthesizer(){return r()},get converters(){return i()},baseFactory:t,flags:e,createNodeArray:b,createNumericLiteral:C,createBigIntLiteral:w,createStringLiteral:D,createStringLiteralFromNode:function(e){const t=N(Gh(e),void 0);return t.textSourceNode=e,t},createRegularExpressionLiteral:E,createLiteralLikeNode:function(e,t){switch(e){case 9:return C(t,0);case 10:return w(t);case 11:return D(t,void 0);case 12:return $r(t,!1);case 13:return $r(t,!0);case 14:return E(t);case 15:return zt(e,t,void 0,0)}},createIdentifier:A,createTempVariable:I,createLoopVariable:function(e){let t=2;e&&(t|=8);return P("",t,void 0,void 0)},createUniqueName:function(e,t=0,n,r){return gn.assert(!(7&t),"Argument out of range: flags"),gn.assert(32!=(48&t),"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),P(e,3|t,n,r)},getGeneratedNameForNode:O,createPrivateIdentifier:function(e){en(e,"#")||gn.fail("First character of private identifier must be #: "+e);return L(xc(e))},createUniquePrivateName:function(e,t,n){e&&!en(e,"#")&&gn.fail("First character of private identifier must be #: "+e);return j(e??"",8|(e?3:1),t,n)},getGeneratedPrivateNameForNode:function(e,t,n){const r=vl(e)?TI(!0,t,e,n,kc):`#generated@${pJ(e)}`,i=j(r,4|(t||n?16:0),t,n);return i.original=e,i},createToken:R,createSuper:function(){return R(108)},createThis:B,createNull:J,createTrue:q,createFalse:U,createModifier:V,createModifiersFromModifierFlags:W,createQualifiedName:$,updateQualifiedName:function(e,t,n){return e.left!==t||e.right!==n?Oi($(t,n),e):e},createComputedPropertyName:K,updateComputedPropertyName:function(e,t){return e.expression!==t?Oi(K(t),e):e},createTypeParameterDeclaration:H,updateTypeParameterDeclaration:G,createParameterDeclaration:Q,updateParameterDeclaration:Y,createDecorator:Z,updateDecorator:function(e,t){return e.expression!==t?Oi(Z(t),e):e},createPropertySignature:ee,updatePropertySignature:te,createPropertyDeclaration:ne,updatePropertyDeclaration:re,createMethodSignature:ie,updateMethodSignature:oe,createMethodDeclaration:ae,updateMethodDeclaration:se,createConstructorDeclaration:_e,updateConstructorDeclaration:ue,createGetAccessorDeclaration:de,updateGetAccessorDeclaration:pe,createSetAccessorDeclaration:fe,updateSetAccessorDeclaration:me,createCallSignature:ge,updateCallSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?T(ge(t,n,r),e):e},createConstructSignature:he,updateConstructSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?T(he(t,n,r),e):e},createIndexSignature:ye,updateIndexSignature:ve,createClassStaticBlockDeclaration:ce,updateClassStaticBlockDeclaration:function(e,t){return e.body!==t?function(e,t){e!==t&&(e.modifiers=t.modifiers);return Oi(e,t)}(ce(t),e):e},createTemplateLiteralTypeSpan:be,updateTemplateLiteralTypeSpan:function(e,t,n){return e.type!==t||e.literal!==n?Oi(be(t,n),e):e},createKeywordTypeNode:function(e){return R(e)},createTypePredicateNode:xe,updateTypePredicateNode:function(e,t,n,r){return e.assertsModifier!==t||e.parameterName!==n||e.type!==r?Oi(xe(t,n,r),e):e},createTypeReferenceNode:Se,updateTypeReferenceNode:function(e,t,n){return e.typeName!==t||e.typeArguments!==n?Oi(Se(t,n),e):e},createFunctionTypeNode:Te,updateFunctionTypeNode:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?function(e,t){e!==t&&(e.modifiers=t.modifiers);return T(e,t)}(Te(t,n,r),e):e},createConstructorTypeNode:we,updateConstructorTypeNode:function(...e){return 5===e.length?De(...e):4===e.length?function(e,t,n,r){return De(e,e.modifiers,t,n,r)}(...e):gn.fail("Incorrect number of arguments specified.")},createTypeQueryNode:Ee,updateTypeQueryNode:function(e,t,n){return e.exprName!==t||e.typeArguments!==n?Oi(Ee(t,n),e):e},createTypeLiteralNode:Fe,updateTypeLiteralNode:function(e,t){return e.members!==t?Oi(Fe(t),e):e},createArrayTypeNode:Ae,updateArrayTypeNode:function(e,t){return e.elementType!==t?Oi(Ae(t),e):e},createTupleTypeNode:Oe,updateTupleTypeNode:function(e,t){return e.elements!==t?Oi(Oe(t),e):e},createNamedTupleMember:Le,updateNamedTupleMember:function(e,t,n,r,i){return e.dotDotDotToken!==t||e.name!==n||e.questionToken!==r||e.type!==i?Oi(Le(t,n,r,i),e):e},createOptionalTypeNode:je,updateOptionalTypeNode:function(e,t){return e.type!==t?Oi(je(t),e):e},createRestTypeNode:Me,updateRestTypeNode:function(e,t){return e.type!==t?Oi(Me(t),e):e},createUnionTypeNode:function(e){return Re(193,e,r().parenthesizeConstituentTypesOfUnionType)},updateUnionTypeNode:function(e,t){return Be(e,t,r().parenthesizeConstituentTypesOfUnionType)},createIntersectionTypeNode:function(e){return Re(194,e,r().parenthesizeConstituentTypesOfIntersectionType)},updateIntersectionTypeNode:function(e,t){return Be(e,t,r().parenthesizeConstituentTypesOfIntersectionType)},createConditionalTypeNode:Je,updateConditionalTypeNode:function(e,t,n,r,i){return e.checkType!==t||e.extendsType!==n||e.trueType!==r||e.falseType!==i?Oi(Je(t,n,r,i),e):e},createInferTypeNode:ze,updateInferTypeNode:function(e,t){return e.typeParameter!==t?Oi(ze(t),e):e},createImportTypeNode:Ue,updateImportTypeNode:function(e,t,n,r,i,o=e.isTypeOf){return e.argument!==t||e.attributes!==n||e.qualifier!==r||e.typeArguments!==i||e.isTypeOf!==o?Oi(Ue(t,n,r,i,o),e):e},createParenthesizedType:Ve,updateParenthesizedType:function(e,t){return e.type!==t?Oi(Ve(t),e):e},createThisTypeNode:function(){const e=x(198);return e.transformFlags=1,e},createTypeOperatorNode:We,updateTypeOperatorNode:function(e,t){return e.type!==t?Oi(We(e.operator,t),e):e},createIndexedAccessTypeNode:$e,updateIndexedAccessTypeNode:function(e,t,n){return e.objectType!==t||e.indexType!==n?Oi($e(t,n),e):e},createMappedTypeNode:Ke,updateMappedTypeNode:function(e,t,n,r,i,o,a){return e.readonlyToken!==t||e.typeParameter!==n||e.nameType!==r||e.questionToken!==i||e.type!==o||e.members!==a?Oi(Ke(t,n,r,i,o,a),e):e},createLiteralTypeNode:He,updateLiteralTypeNode:function(e,t){return e.literal!==t?Oi(He(t),e):e},createTemplateLiteralType:qe,updateTemplateLiteralType:function(e,t,n){return e.head!==t||e.templateSpans!==n?Oi(qe(t,n),e):e},createObjectBindingPattern:Ge,updateObjectBindingPattern:function(e,t){return e.elements!==t?Oi(Ge(t),e):e},createArrayBindingPattern:Xe,updateArrayBindingPattern:function(e,t){return e.elements!==t?Oi(Xe(t),e):e},createBindingElement:Qe,updateBindingElement:function(e,t,n,r,i){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==r||e.initializer!==i?Oi(Qe(t,n,r,i),e):e},createArrayLiteralExpression:Ye,updateArrayLiteralExpression:function(e,t){return e.elements!==t?Oi(Ye(t,e.multiLine),e):e},createObjectLiteralExpression:Ze,updateObjectLiteralExpression:function(e,t){return e.properties!==t?Oi(Ze(t,e.multiLine),e):e},createPropertyAccessExpression:4&e?(e,t)=>Ew(tt(e,t),262144):tt,updatePropertyAccessExpression:function(e,t,n){if(xl(e))return it(e,t,e.questionDotToken,st(n,fD));return e.expression!==t||e.name!==n?Oi(tt(t,n),e):e},createPropertyAccessChain:4&e?(e,t,n)=>Ew(rt(e,t,n),262144):rt,updatePropertyAccessChain:it,createElementAccessExpression:at,updateElementAccessExpression:function(e,t,n){if(Sl(e))return lt(e,t,e.questionDotToken,n);return e.expression!==t||e.argumentExpression!==n?Oi(at(t,n),e):e},createElementAccessChain:ct,updateElementAccessChain:lt,createCallExpression:pt,updateCallExpression:function(e,t,n,r){if(kl(e))return mt(e,t,e.questionDotToken,n,r);return e.expression!==t||e.typeArguments!==n||e.arguments!==r?Oi(pt(t,n,r),e):e},createCallChain:ft,updateCallChain:mt,createNewExpression:gt,updateNewExpression:function(e,t,n,r){return e.expression!==t||e.typeArguments!==n||e.arguments!==r?Oi(gt(t,n,r),e):e},createTaggedTemplateExpression:vt,updateTaggedTemplateExpression:function(e,t,n,r){return e.tag!==t||e.typeArguments!==n||e.template!==r?Oi(vt(t,n,r),e):e},createTypeAssertion:bt,updateTypeAssertion:xt,createParenthesizedExpression:St,updateParenthesizedExpression:kt,createFunctionExpression:Tt,updateFunctionExpression:Ct,createArrowFunction:wt,updateArrowFunction:Nt,createDeleteExpression:Dt,updateDeleteExpression:function(e,t){return e.expression!==t?Oi(Dt(t),e):e},createTypeOfExpression:Et,updateTypeOfExpression:function(e,t){return e.expression!==t?Oi(Et(t),e):e},createVoidExpression:Ft,updateVoidExpression:function(e,t){return e.expression!==t?Oi(Ft(t),e):e},createAwaitExpression:Pt,updateAwaitExpression:function(e,t){return e.expression!==t?Oi(Pt(t),e):e},createPrefixUnaryExpression:At,updatePrefixUnaryExpression:function(e,t){return e.operand!==t?Oi(At(e.operator,t),e):e},createPostfixUnaryExpression:It,updatePostfixUnaryExpression:function(e,t){return e.operand!==t?Oi(It(t,e.operator),e):e},createBinaryExpression:Ot,updateBinaryExpression:function(e,t,n,r){return e.left!==t||e.operatorToken!==n||e.right!==r?Oi(Ot(t,n,r),e):e},createConditionalExpression:jt,updateConditionalExpression:function(e,t,n,r,i,o){return e.condition!==t||e.questionToken!==n||e.whenTrue!==r||e.colonToken!==i||e.whenFalse!==o?Oi(jt(t,n,r,i,o),e):e},createTemplateExpression:Mt,updateTemplateExpression:function(e,t,n){return e.head!==t||e.templateSpans!==n?Oi(Mt(t,n),e):e},createTemplateHead:function(e,t,n){return zt(16,e=Rt(16,e,t,n),t,n)},createTemplateMiddle:function(e,t,n){return zt(17,e=Rt(16,e,t,n),t,n)},createTemplateTail:function(e,t,n){return zt(18,e=Rt(16,e,t,n),t,n)},createNoSubstitutionTemplateLiteral:function(e,t,n){return Jt(15,e=Rt(16,e,t,n),t,n)},createTemplateLiteralLikeNode:zt,createYieldExpression:qt,updateYieldExpression:function(e,t,n){return e.expression!==n||e.asteriskToken!==t?Oi(qt(t,n),e):e},createSpreadElement:Ut,updateSpreadElement:function(e,t){return e.expression!==t?Oi(Ut(t),e):e},createClassExpression:Vt,updateClassExpression:Wt,createOmittedExpression:function(){return x(233)},createExpressionWithTypeArguments:$t,updateExpressionWithTypeArguments:Kt,createAsExpression:Ht,updateAsExpression:Gt,createNonNullExpression:Xt,updateNonNullExpression:Qt,createSatisfiesExpression:Yt,updateSatisfiesExpression:Zt,createNonNullChain:tn,updateNonNullChain:nn,createMetaProperty:rn,updateMetaProperty:function(e,t){return e.name!==t?Oi(rn(e.keywordToken,t),e):e},createTemplateSpan:on,updateTemplateSpan:function(e,t,n){return e.expression!==t||e.literal!==n?Oi(on(t,n),e):e},createSemicolonClassElement:function(){const e=x(241);return e.transformFlags|=1024,e},createBlock:an,updateBlock:function(e,t){return e.statements!==t?Oi(an(t,e.multiLine),e):e},createVariableStatement:sn,updateVariableStatement:cn,createEmptyStatement:ln,createExpressionStatement:_n,updateExpressionStatement:function(e,t){return e.expression!==t?Oi(_n(t),e):e},createIfStatement:un,updateIfStatement:function(e,t,n,r){return e.expression!==t||e.thenStatement!==n||e.elseStatement!==r?Oi(un(t,n,r),e):e},createDoStatement:dn,updateDoStatement:function(e,t,n){return e.statement!==t||e.expression!==n?Oi(dn(t,n),e):e},createWhileStatement:pn,updateWhileStatement:function(e,t,n){return e.expression!==t||e.statement!==n?Oi(pn(t,n),e):e},createForStatement:fn,updateForStatement:function(e,t,n,r,i){return e.initializer!==t||e.condition!==n||e.incrementor!==r||e.statement!==i?Oi(fn(t,n,r,i),e):e},createForInStatement:mn,updateForInStatement:function(e,t,n,r){return e.initializer!==t||e.expression!==n||e.statement!==r?Oi(mn(t,n,r),e):e},createForOfStatement:hn,updateForOfStatement:function(e,t,n,r,i){return e.awaitModifier!==t||e.initializer!==n||e.expression!==r||e.statement!==i?Oi(hn(t,n,r,i),e):e},createContinueStatement:yn,updateContinueStatement:function(e,t){return e.label!==t?Oi(yn(t),e):e},createBreakStatement:vn,updateBreakStatement:function(e,t){return e.label!==t?Oi(vn(t),e):e},createReturnStatement:bn,updateReturnStatement:function(e,t){return e.expression!==t?Oi(bn(t),e):e},createWithStatement:xn,updateWithStatement:function(e,t,n){return e.expression!==t||e.statement!==n?Oi(xn(t,n),e):e},createSwitchStatement:Sn,updateSwitchStatement:function(e,t,n){return e.expression!==t||e.caseBlock!==n?Oi(Sn(t,n),e):e},createLabeledStatement:kn,updateLabeledStatement:Tn,createThrowStatement:Cn,updateThrowStatement:function(e,t){return e.expression!==t?Oi(Cn(t),e):e},createTryStatement:wn,updateTryStatement:function(e,t,n,r){return e.tryBlock!==t||e.catchClause!==n||e.finallyBlock!==r?Oi(wn(t,n,r),e):e},createDebuggerStatement:function(){const e=x(260);return e.jsDoc=void 0,e.flowNode=void 0,e},createVariableDeclaration:Nn,updateVariableDeclaration:function(e,t,n,r,i){return e.name!==t||e.type!==r||e.exclamationToken!==n||e.initializer!==i?Oi(Nn(t,n,r,i),e):e},createVariableDeclarationList:Dn,updateVariableDeclarationList:function(e,t){return e.declarations!==t?Oi(Dn(t,e.flags),e):e},createFunctionDeclaration:En,updateFunctionDeclaration:Fn,createClassDeclaration:Pn,updateClassDeclaration:An,createInterfaceDeclaration:In,updateInterfaceDeclaration:On,createTypeAliasDeclaration:Ln,updateTypeAliasDeclaration:jn,createEnumDeclaration:Mn,updateEnumDeclaration:Rn,createModuleDeclaration:Bn,updateModuleDeclaration:Jn,createModuleBlock:zn,updateModuleBlock:function(e,t){return e.statements!==t?Oi(zn(t),e):e},createCaseBlock:qn,updateCaseBlock:function(e,t){return e.clauses!==t?Oi(qn(t),e):e},createNamespaceExportDeclaration:Un,updateNamespaceExportDeclaration:function(e,t){return e.name!==t?function(e,t){e!==t&&(e.modifiers=t.modifiers);return Oi(e,t)}(Un(t),e):e},createImportEqualsDeclaration:Vn,updateImportEqualsDeclaration:Wn,createImportDeclaration:$n,updateImportDeclaration:Kn,createImportClause:Hn,updateImportClause:function(e,t,n,r){"boolean"==typeof t&&(t=t?156:void 0);return e.phaseModifier!==t||e.name!==n||e.namedBindings!==r?Oi(Hn(t,n,r),e):e},createAssertClause:Gn,updateAssertClause:function(e,t,n){return e.elements!==t||e.multiLine!==n?Oi(Gn(t,n),e):e},createAssertEntry:Xn,updateAssertEntry:function(e,t,n){return e.name!==t||e.value!==n?Oi(Xn(t,n),e):e},createImportTypeAssertionContainer:Qn,updateImportTypeAssertionContainer:function(e,t,n){return e.assertClause!==t||e.multiLine!==n?Oi(Qn(t,n),e):e},createImportAttributes:Yn,updateImportAttributes:function(e,t,n){return e.elements!==t||e.multiLine!==n?Oi(Yn(t,n,e.token),e):e},createImportAttribute:Zn,updateImportAttribute:function(e,t,n){return e.name!==t||e.value!==n?Oi(Zn(t,n),e):e},createNamespaceImport:er,updateNamespaceImport:function(e,t){return e.name!==t?Oi(er(t),e):e},createNamespaceExport:tr,updateNamespaceExport:function(e,t){return e.name!==t?Oi(tr(t),e):e},createNamedImports:nr,updateNamedImports:function(e,t){return e.elements!==t?Oi(nr(t),e):e},createImportSpecifier:rr,updateImportSpecifier:function(e,t,n,r){return e.isTypeOnly!==t||e.propertyName!==n||e.name!==r?Oi(rr(t,n,r),e):e},createExportAssignment:ir,updateExportAssignment:or,createExportDeclaration:ar,updateExportDeclaration:sr,createNamedExports:cr,updateNamedExports:function(e,t){return e.elements!==t?Oi(cr(t),e):e},createExportSpecifier:lr,updateExportSpecifier:function(e,t,n,r){return e.isTypeOnly!==t||e.propertyName!==n||e.name!==r?Oi(lr(t,n,r),e):e},createMissingDeclaration:function(){const e=S(283);return e.jsDoc=void 0,e},createExternalModuleReference:_r,updateExternalModuleReference:function(e,t){return e.expression!==t?Oi(_r(t),e):e},get createJSDocAllType(){return c(313)},get createJSDocUnknownType(){return c(314)},get createJSDocNonNullableType(){return u(316)},get updateJSDocNonNullableType(){return d(316)},get createJSDocNullableType(){return u(315)},get updateJSDocNullableType(){return d(315)},get createJSDocOptionalType(){return l(317)},get updateJSDocOptionalType(){return _(317)},get createJSDocVariadicType(){return l(319)},get updateJSDocVariadicType(){return _(319)},get createJSDocNamepathType(){return l(320)},get updateJSDocNamepathType(){return _(320)},createJSDocFunctionType:pr,updateJSDocFunctionType:function(e,t,n){return e.parameters!==t||e.type!==n?Oi(pr(t,n),e):e},createJSDocTypeLiteral:fr,updateJSDocTypeLiteral:function(e,t,n){return e.jsDocPropertyTags!==t||e.isArrayType!==n?Oi(fr(t,n),e):e},createJSDocTypeExpression:mr,updateJSDocTypeExpression:function(e,t){return e.type!==t?Oi(mr(t),e):e},createJSDocSignature:gr,updateJSDocSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?Oi(gr(t,n,r),e):e},createJSDocTemplateTag:br,updateJSDocTemplateTag:function(e,t=hr(e),n,r,i){return e.tagName!==t||e.constraint!==n||e.typeParameters!==r||e.comment!==i?Oi(br(t,n,r,i),e):e},createJSDocTypedefTag:xr,updateJSDocTypedefTag:function(e,t=hr(e),n,r,i){return e.tagName!==t||e.typeExpression!==n||e.fullName!==r||e.comment!==i?Oi(xr(t,n,r,i),e):e},createJSDocParameterTag:Sr,updateJSDocParameterTag:function(e,t=hr(e),n,r,i,o,a){return e.tagName!==t||e.name!==n||e.isBracketed!==r||e.typeExpression!==i||e.isNameFirst!==o||e.comment!==a?Oi(Sr(t,n,r,i,o,a),e):e},createJSDocPropertyTag:kr,updateJSDocPropertyTag:function(e,t=hr(e),n,r,i,o,a){return e.tagName!==t||e.name!==n||e.isBracketed!==r||e.typeExpression!==i||e.isNameFirst!==o||e.comment!==a?Oi(kr(t,n,r,i,o,a),e):e},createJSDocCallbackTag:Tr,updateJSDocCallbackTag:function(e,t=hr(e),n,r,i){return e.tagName!==t||e.typeExpression!==n||e.fullName!==r||e.comment!==i?Oi(Tr(t,n,r,i),e):e},createJSDocOverloadTag:Cr,updateJSDocOverloadTag:function(e,t=hr(e),n,r){return e.tagName!==t||e.typeExpression!==n||e.comment!==r?Oi(Cr(t,n,r),e):e},createJSDocAugmentsTag:wr,updateJSDocAugmentsTag:function(e,t=hr(e),n,r){return e.tagName!==t||e.class!==n||e.comment!==r?Oi(wr(t,n,r),e):e},createJSDocImplementsTag:Nr,updateJSDocImplementsTag:function(e,t=hr(e),n,r){return e.tagName!==t||e.class!==n||e.comment!==r?Oi(Nr(t,n,r),e):e},createJSDocSeeTag:Dr,updateJSDocSeeTag:function(e,t,n,r){return e.tagName!==t||e.name!==n||e.comment!==r?Oi(Dr(t,n,r),e):e},createJSDocImportTag:Rr,updateJSDocImportTag:function(e,t,n,r,i,o){return e.tagName!==t||e.comment!==o||e.importClause!==n||e.moduleSpecifier!==r||e.attributes!==i?Oi(Rr(t,n,r,i,o),e):e},createJSDocNameReference:Er,updateJSDocNameReference:function(e,t){return e.name!==t?Oi(Er(t),e):e},createJSDocMemberName:Fr,updateJSDocMemberName:function(e,t,n){return e.left!==t||e.right!==n?Oi(Fr(t,n),e):e},createJSDocLink:Pr,updateJSDocLink:function(e,t,n){return e.name!==t?Oi(Pr(t,n),e):e},createJSDocLinkCode:Ar,updateJSDocLinkCode:function(e,t,n){return e.name!==t?Oi(Ar(t,n),e):e},createJSDocLinkPlain:Ir,updateJSDocLinkPlain:function(e,t,n){return e.name!==t?Oi(Ir(t,n),e):e},get createJSDocTypeTag(){return h(345)},get updateJSDocTypeTag(){return y(345)},get createJSDocReturnTag(){return h(343)},get updateJSDocReturnTag(){return y(343)},get createJSDocThisTag(){return h(344)},get updateJSDocThisTag(){return y(344)},get createJSDocAuthorTag(){return f(331)},get updateJSDocAuthorTag(){return m(331)},get createJSDocClassTag(){return f(333)},get updateJSDocClassTag(){return m(333)},get createJSDocPublicTag(){return f(334)},get updateJSDocPublicTag(){return m(334)},get createJSDocPrivateTag(){return f(335)},get updateJSDocPrivateTag(){return m(335)},get createJSDocProtectedTag(){return f(336)},get updateJSDocProtectedTag(){return m(336)},get createJSDocReadonlyTag(){return f(337)},get updateJSDocReadonlyTag(){return m(337)},get createJSDocOverrideTag(){return f(338)},get updateJSDocOverrideTag(){return m(338)},get createJSDocDeprecatedTag(){return f(332)},get updateJSDocDeprecatedTag(){return m(332)},get createJSDocThrowsTag(){return h(350)},get updateJSDocThrowsTag(){return y(350)},get createJSDocSatisfiesTag(){return h(351)},get updateJSDocSatisfiesTag(){return y(351)},createJSDocEnumTag:Mr,updateJSDocEnumTag:function(e,t=hr(e),n,r){return e.tagName!==t||e.typeExpression!==n||e.comment!==r?Oi(Mr(t,n,r),e):e},createJSDocUnknownTag:jr,updateJSDocUnknownTag:function(e,t,n){return e.tagName!==t||e.comment!==n?Oi(jr(t,n),e):e},createJSDocText:Br,updateJSDocText:function(e,t){return e.text!==t?Oi(Br(t),e):e},createJSDocComment:Jr,updateJSDocComment:function(e,t,n){return e.comment!==t||e.tags!==n?Oi(Jr(t,n),e):e},createJsxElement:zr,updateJsxElement:function(e,t,n,r){return e.openingElement!==t||e.children!==n||e.closingElement!==r?Oi(zr(t,n,r),e):e},createJsxSelfClosingElement:qr,updateJsxSelfClosingElement:function(e,t,n,r){return e.tagName!==t||e.typeArguments!==n||e.attributes!==r?Oi(qr(t,n,r),e):e},createJsxOpeningElement:Ur,updateJsxOpeningElement:function(e,t,n,r){return e.tagName!==t||e.typeArguments!==n||e.attributes!==r?Oi(Ur(t,n,r),e):e},createJsxClosingElement:Vr,updateJsxClosingElement:function(e,t){return e.tagName!==t?Oi(Vr(t),e):e},createJsxFragment:Wr,createJsxText:$r,updateJsxText:function(e,t,n){return e.text!==t||e.containsOnlyTriviaWhiteSpaces!==n?Oi($r(t,n),e):e},createJsxOpeningFragment:function(){const e=x(290);return e.transformFlags|=2,e},createJsxJsxClosingFragment:function(){const e=x(291);return e.transformFlags|=2,e},updateJsxFragment:function(e,t,n,r){return e.openingFragment!==t||e.children!==n||e.closingFragment!==r?Oi(Wr(t,n,r),e):e},createJsxAttribute:Kr,updateJsxAttribute:function(e,t,n){return e.name!==t||e.initializer!==n?Oi(Kr(t,n),e):e},createJsxAttributes:Hr,updateJsxAttributes:function(e,t){return e.properties!==t?Oi(Hr(t),e):e},createJsxSpreadAttribute:Gr,updateJsxSpreadAttribute:function(e,t){return e.expression!==t?Oi(Gr(t),e):e},createJsxExpression:Xr,updateJsxExpression:function(e,t){return e.expression!==t?Oi(Xr(e.dotDotDotToken,t),e):e},createJsxNamespacedName:Qr,updateJsxNamespacedName:function(e,t,n){return e.namespace!==t||e.name!==n?Oi(Qr(t,n),e):e},createCaseClause:Yr,updateCaseClause:function(e,t,n){return e.expression!==t||e.statements!==n?Oi(Yr(t,n),e):e},createDefaultClause:Zr,updateDefaultClause:function(e,t){return e.statements!==t?Oi(Zr(t),e):e},createHeritageClause:ei,updateHeritageClause:function(e,t){return e.types!==t?Oi(ei(e.token,t),e):e},createCatchClause:ti,updateCatchClause:function(e,t,n){return e.variableDeclaration!==t||e.block!==n?Oi(ti(t,n),e):e},createPropertyAssignment:ni,updatePropertyAssignment:ri,createShorthandPropertyAssignment:ii,updateShorthandPropertyAssignment:function(e,t,n){return e.name!==t||e.objectAssignmentInitializer!==n?function(e,t){e!==t&&(e.modifiers=t.modifiers,e.questionToken=t.questionToken,e.exclamationToken=t.exclamationToken,e.equalsToken=t.equalsToken);return Oi(e,t)}(ii(t,n),e):e},createSpreadAssignment:oi,updateSpreadAssignment:function(e,t){return e.expression!==t?Oi(oi(t),e):e},createEnumMember:ai,updateEnumMember:function(e,t,n){return e.name!==t||e.initializer!==n?Oi(ai(t,n),e):e},createSourceFile:function(e,n,r){const i=t.createBaseSourceFileNode(308);return i.statements=b(e),i.endOfFileToken=n,i.flags|=r,i.text="",i.fileName="",i.path="",i.resolvedPath="",i.originalFileName="",i.languageVersion=1,i.languageVariant=0,i.scriptKind=0,i.isDeclarationFile=!1,i.hasNoDefaultLib=!1,i.transformFlags|=yw(i.statements)|hw(i.endOfFileToken),i.locals=void 0,i.nextContainer=void 0,i.endFlowNode=void 0,i.nodeCount=0,i.identifierCount=0,i.symbolCount=0,i.parseDiagnostics=void 0,i.bindDiagnostics=void 0,i.bindSuggestionDiagnostics=void 0,i.lineMap=void 0,i.externalModuleIndicator=void 0,i.setExternalModuleIndicator=void 0,i.pragmas=void 0,i.checkJsDirective=void 0,i.referencedFiles=void 0,i.typeReferenceDirectives=void 0,i.libReferenceDirectives=void 0,i.amdDependencies=void 0,i.commentDirectives=void 0,i.identifiers=void 0,i.packageJsonLocations=void 0,i.packageJsonScope=void 0,i.imports=void 0,i.moduleAugmentations=void 0,i.ambientModuleNames=void 0,i.classifiableNames=void 0,i.impliedNodeFormat=void 0,i},updateSourceFile:function(e,t,n=e.isDeclarationFile,r=e.referencedFiles,i=e.typeReferenceDirectives,o=e.hasNoDefaultLib,a=e.libReferenceDirectives){return e.statements!==t||e.isDeclarationFile!==n||e.referencedFiles!==r||e.typeReferenceDirectives!==i||e.hasNoDefaultLib!==o||e.libReferenceDirectives!==a?Oi(function(e,t,n,r,i,o,a){const s=ci(e);return s.statements=b(t),s.isDeclarationFile=n,s.referencedFiles=r,s.typeReferenceDirectives=i,s.hasNoDefaultLib=o,s.libReferenceDirectives=a,s.transformFlags=yw(s.statements)|hw(s.endOfFileToken),s}(e,t,n,r,i,o,a),e):e},createRedirectedSourceFile:si,createBundle:li,updateBundle:function(e,t){return e.sourceFiles!==t?Oi(li(t),e):e},createSyntheticExpression:function(e,t=!1,n){const r=x(238);return r.type=e,r.isSpread=t,r.tupleNameSource=n,r},createSyntaxList:function(e){const t=x(353);return t._children=e,t},createNotEmittedStatement:function(e){const t=x(354);return t.original=e,AI(t,e),t},createNotEmittedTypeElement:function(){return x(355)},createPartiallyEmittedExpression:_i,updatePartiallyEmittedExpression:ui,createCommaListExpression:pi,updateCommaListExpression:function(e,t){return e.elements!==t?Oi(pi(t),e):e},createSyntheticReferenceExpression:fi,updateSyntheticReferenceExpression:function(e,t,n){return e.expression!==t||e.thisArg!==n?Oi(fi(t,n),e):e},cloneNode:mi,get createComma(){return o(28)},get createAssignment(){return o(64)},get createLogicalOr(){return o(57)},get createLogicalAnd(){return o(56)},get createBitwiseOr(){return o(52)},get createBitwiseXor(){return o(53)},get createBitwiseAnd(){return o(51)},get createStrictEquality(){return o(37)},get createStrictInequality(){return o(38)},get createEquality(){return o(35)},get createInequality(){return o(36)},get createLessThan(){return o(30)},get createLessThanEquals(){return o(33)},get createGreaterThan(){return o(32)},get createGreaterThanEquals(){return o(34)},get createLeftShift(){return o(48)},get createRightShift(){return o(49)},get createUnsignedRightShift(){return o(50)},get createAdd(){return o(40)},get createSubtract(){return o(41)},get createMultiply(){return o(42)},get createDivide(){return o(44)},get createModulo(){return o(45)},get createExponent(){return o(43)},get createPrefixPlus(){return a(40)},get createPrefixMinus(){return a(41)},get createPrefixIncrement(){return a(46)},get createPrefixDecrement(){return a(47)},get createBitwiseNot(){return a(55)},get createLogicalNot(){return a(54)},get createPostfixIncrement(){return s(46)},get createPostfixDecrement(){return s(47)},createImmediatelyInvokedFunctionExpression:function(e,t,n){return pt(Tt(void 0,void 0,void 0,void 0,t?[t]:[],void 0,an(e,!0)),void 0,n?[n]:[])},createImmediatelyInvokedArrowFunction:function(e,t,n){return pt(wt(void 0,void 0,t?[t]:[],void 0,void 0,an(e,!0)),void 0,n?[n]:[])},createVoidZero:gi,createExportDefault:function(e){return ir(void 0,!1,e)},createExternalModuleExport:function(e){return ar(void 0,!1,cr([lr(!1,void 0,e)]))},createTypeCheck:function(e,t){return"null"===t?v.createStrictEquality(e,J()):"undefined"===t?v.createStrictEquality(e,gi()):v.createStrictEquality(Et(e),D(t))},createIsNotTypeCheck:function(e,t){return"null"===t?v.createStrictInequality(e,J()):"undefined"===t?v.createStrictInequality(e,gi()):v.createStrictInequality(Et(e),D(t))},createMethodCall:hi,createGlobalMethodCall:yi,createFunctionBindCall:function(e,t,n){return hi(e,"bind",[t,...n])},createFunctionCallCall:function(e,t,n){return hi(e,"call",[t,...n])},createFunctionApplyCall:function(e,t,n){return hi(e,"apply",[t,n])},createArraySliceCall:function(e,t){return hi(e,"slice",void 0===t?[]:[Pi(t)])},createArrayConcatCall:function(e,t){return hi(e,"concat",t)},createObjectDefinePropertyCall:function(e,t,n){return yi("Object","defineProperty",[e,Pi(t),n])},createObjectGetOwnPropertyDescriptorCall:function(e,t){return yi("Object","getOwnPropertyDescriptor",[e,Pi(t)])},createReflectGetCall:function(e,t,n){return yi("Reflect","get",n?[e,t,n]:[e,t])},createReflectSetCall:function(e,t,n,r){return yi("Reflect","set",r?[e,t,n,r]:[e,t,n])},createPropertyDescriptor:function(e,t){const n=[];vi(n,"enumerable",Pi(e.enumerable)),vi(n,"configurable",Pi(e.configurable));let r=vi(n,"writable",Pi(e.writable));r=vi(n,"value",e.value)||r;let i=vi(n,"get",e.get);return i=vi(n,"set",e.set)||i,gn.assert(!(r&&i),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),Ze(n,!t)},createCallBinding:function(e,t,n,i=!1){const o=LA(e,63);let a,s;pm(o)?(a=B(),s=o):wD(o)?(a=B(),s=void 0!==n&&n<2?AI(A("_super"),o):o):8192&ap(o)?(a=gi(),s=r().parenthesizeLeftSideOfAccess(o,!1)):bE(o)?bi(o.expression,i)?(a=I(t),s=tt(AI(v.createAssignment(a,o.expression),o.expression),o.name),AI(s,o)):(a=o.expression,s=o):xE(o)?bi(o.expression,i)?(a=I(t),s=at(AI(v.createAssignment(a,o.expression),o.expression),o.argumentExpression),AI(s,o)):(a=o.expression,s=o):(a=gi(),s=r().parenthesizeLeftSideOfAccess(e,!1));return{target:s,thisArg:a}},createAssignmentTargetWrapper:function(e,t){return tt(St(Ze([fe(void 0,"value",[Q(void 0,void 0,e,void 0,void 0,void 0)],an([_n(t)]))])),"value")},inlineExpressions:function(e){return e.length>10?pi(e):Pe(e,v.createComma)},getInternalName:function(e,t,n){return xi(e,t,n,98304)},getLocalName:function(e,t,n,r){return xi(e,t,n,32768,r)},getExportName:Si,getDeclarationName:function(e,t,n){return xi(e,t,n)},getNamespaceMemberName:ki,getExternalModuleOrNamespaceExportName:function(e,t,n,r){if(e&&Lv(t,32))return ki(e,xi(t),n,r);return Si(t,n,r)},restoreOuterExpressions:function e(t,n,r=63){if(t&&OA(t,r)&&(i=t,!(wE(i)&&sy(i)&&sy(Iw(i))&&sy(Bw(i)))||X(zw(i))||X(Vw(i))))return function(e,t){switch(e.kind){case 218:return kt(e,t);case 217:return xt(e,e.type,t);case 235:return Gt(e,t,e.type);case 239:return Zt(e,t,e.type);case 236:return Qt(e,t);case 234:return Kt(e,t,e.typeArguments);case 356:return ui(e,t)}}(t,e(t.expression,n));var i;return n},restoreEnclosingLabel:function e(t,n,r){if(!n)return t;const i=Tn(n,n.label,pF(n.statement)?e(t,n.statement):t);r&&r(n);return i},createUseStrictPrologue:Ci,copyPrologue:function(e,t,n,r){const i=wi(e,t,0,n);return Ni(e,t,i,r)},copyStandardPrologue:wi,copyCustomPrologue:Ni,ensureUseStrict:function(e){if(!DA(e))return AI(b([Ci(),...e]),e);return e},liftToBlock:function(e){return gn.assert(k(e,xu),"Cannot lift nodes to a Block."),Ce(e)||an(e)},mergeLexicalEnvironment:function(e,t){if(!X(t))return e;const n=Di(e,bf,0),r=Di(e,Sf,n),i=Di(e,Tf,r),o=Di(t,bf,0),a=Di(t,Sf,o),s=Di(t,Tf,a),c=Di(t,xf,s);gn.assert(c===t.length,"Expected declarations to be valid standard or custom prologues");const l=Rl(e)?e.slice():e;c>s&&l.splice(i,0,...t.slice(s,c));s>a&&l.splice(r,0,...t.slice(a,s));a>o&&l.splice(n,0,...t.slice(o,a));if(o>0)if(0===n)l.splice(0,0,...t.slice(0,o));else{const r=new Map;for(let t=0;t=0;e--){const n=t[e];r.has(n.expression.text)||l.unshift(n)}}if(Rl(e))return AI(b(l,e.hasTrailingComma),e);return e},replaceModifiers:function(e,t){let n;n="number"==typeof t?W(t):t;return PD(e)?G(e,n,e.name,e.constraint,e.default):AD(e)?Y(e,n,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer):HD(e)?De(e,n,e.typeParameters,e.parameters,e.type):OD(e)?te(e,n,e.name,e.questionToken,e.type):LD(e)?re(e,n,e.name,e.questionToken??e.exclamationToken,e.type,e.initializer):jD(e)?oe(e,n,e.name,e.questionToken,e.typeParameters,e.parameters,e.type):MD(e)?se(e,n,e.asteriskToken,e.name,e.questionToken,e.typeParameters,e.parameters,e.type,e.body):BD(e)?ue(e,n,e.parameters,e.body):JD(e)?pe(e,n,e.name,e.parameters,e.type,e.body):zD(e)?me(e,n,e.name,e.parameters,e.body):VD(e)?ve(e,n,e.parameters,e.type):NE(e)?Ct(e,n,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body):DE(e)?Nt(e,n,e.typeParameters,e.parameters,e.type,e.equalsGreaterThanToken,e.body):JE(e)?Wt(e,n,e.name,e.typeParameters,e.heritageClauses,e.members):ZE(e)?cn(e,n,e.declarationList):vF(e)?Fn(e,n,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body):bF(e)?An(e,n,e.name,e.typeParameters,e.heritageClauses,e.members):xF(e)?On(e,n,e.name,e.typeParameters,e.heritageClauses,e.members):SF(e)?jn(e,n,e.name,e.typeParameters,e.type):kF(e)?Rn(e,n,e.name,e.members):TF(e)?Jn(e,n,e.name,e.body):DF(e)?Wn(e,n,e.isTypeOnly,e.name,e.moduleReference):EF(e)?Kn(e,n,e.importClause,e.moduleSpecifier,e.attributes):JF(e)?or(e,n,e.expression):zF(e)?sr(e,n,e.isTypeOnly,e.exportClause,e.moduleSpecifier,e.attributes):gn.assertNever(e)},replaceDecoratorsAndModifiers:function(e,t){return AD(e)?Y(e,t,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer):LD(e)?re(e,t,e.name,e.questionToken??e.exclamationToken,e.type,e.initializer):MD(e)?se(e,t,e.asteriskToken,e.name,e.questionToken,e.typeParameters,e.parameters,e.type,e.body):JD(e)?pe(e,t,e.name,e.parameters,e.type,e.body):zD(e)?me(e,t,e.name,e.parameters,e.body):JE(e)?Wt(e,t,e.name,e.typeParameters,e.heritageClauses,e.members):bF(e)?An(e,t,e.name,e.typeParameters,e.heritageClauses,e.members):gn.assertNever(e)},replacePropertyName:function(e,t){switch(e.kind){case 178:return pe(e,e.modifiers,t,e.parameters,e.type,e.body);case 179:return me(e,e.modifiers,t,e.parameters,e.body);case 175:return se(e,e.modifiers,e.asteriskToken,t,e.questionToken,e.typeParameters,e.parameters,e.type,e.body);case 174:return oe(e,e.modifiers,t,e.questionToken,e.typeParameters,e.parameters,e.type);case 173:return re(e,e.modifiers,t,e.questionToken??e.exclamationToken,e.type,e.initializer);case 172:return te(e,e.modifiers,t,e.questionToken,e.type);case 304:return ri(e,t,e.initializer)}}};return g(_w,e=>e(v)),v;function b(e,t){if(void 0===e||e===p)e=[];else if(Rl(e)){if(void 0===t||e.hasTrailingComma===t)return void 0===e.transformFlags&&vw(e),gn.attachNodeArrayDebugInfo(e),e;const n=e.slice();return n.pos=e.pos,n.end=e.end,n.hasTrailingComma=t,n.transformFlags=e.transformFlags,gn.attachNodeArrayDebugInfo(n),n}const n=e.length,r=n>=1&&n<=4?e.slice():e;return r.pos=-1,r.end=-1,r.hasTrailingComma=!!t,r.transformFlags=0,vw(r),gn.attachNodeArrayDebugInfo(r),r}function x(e){return t.createBaseNode(e)}function S(e){const t=x(e);return t.symbol=void 0,t.localSymbol=void 0,t}function T(e,t){return e!==t&&(e.typeArguments=t.typeArguments),Oi(e,t)}function C(e,t=0){const n="number"==typeof e?e+"":e;gn.assert(45!==n.charCodeAt(0),"Negative numbers should be created in combination with createPrefixUnaryExpression");const r=S(9);return r.text=n,r.numericLiteralFlags=t,384&t&&(r.transformFlags|=1024),r}function w(e){const t=M(10);return t.text="string"==typeof e?e:TT(e)+"n",t.transformFlags|=32,t}function N(e,t){const n=S(11);return n.text=e,n.singleQuote=t,n}function D(e,t,n){const r=N(e,t);return r.hasExtendedUnicodeEscape=n,n&&(r.transformFlags|=1024),r}function E(e){const t=M(14);return t.text=e,t}function F(e){const n=t.createBaseIdentifierNode(80);return n.escapedText=e,n.jsDoc=void 0,n.flowNode=void 0,n.symbol=void 0,n}function P(e,t,n,r){const i=F(xc(e));return cN(i,{flags:t,id:cw,prefix:n,suffix:r}),cw++,i}function A(e,t,n){void 0===t&&e&&(t=Ma(e)),80===t&&(t=void 0);const r=F(xc(e));return n&&(r.flags|=256),"await"===r.escapedText&&(r.transformFlags|=67108864),256&r.flags&&(r.transformFlags|=1024),r}function I(e,t,n,r){let i=1;t&&(i|=8);const o=P("",i,n,r);return e&&e(o),o}function O(e,t=0,n,r){gn.assert(!(7&t),"Argument out of range: flags");(n||r)&&(t|=16);const i=P(e?vl(e)?TI(!1,n,e,r,kc):`generated@${pJ(e)}`:"",4|t,n,r);return i.original=e,i}function L(e){const n=t.createBasePrivateIdentifierNode(81);return n.escapedText=e,n.transformFlags|=16777216,n}function j(e,t,n,r){const i=L(xc(e));return cN(i,{flags:t,id:cw,prefix:n,suffix:r}),cw++,i}function M(e){return t.createBaseTokenNode(e)}function R(e){gn.assert(e>=0&&e<=166,"Invalid token"),gn.assert(e<=15||e>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),gn.assert(e<=9||e>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),gn.assert(80!==e,"Invalid token. Use 'createIdentifier' to create identifiers");const t=M(e);let n=0;switch(e){case 134:n=384;break;case 160:n=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:n=1;break;case 108:n=134218752,t.flowNode=void 0;break;case 126:n=1024;break;case 129:n=16777216;break;case 110:n=16384,t.flowNode=void 0}return n&&(t.transformFlags|=n),t}function B(){return R(110)}function J(){return R(106)}function q(){return R(112)}function U(){return R(97)}function V(e){return R(e)}function W(e){const t=[];return 32&e&&t.push(V(95)),128&e&&t.push(V(138)),2048&e&&t.push(V(90)),4096&e&&t.push(V(87)),1&e&&t.push(V(125)),2&e&&t.push(V(123)),4&e&&t.push(V(124)),64&e&&t.push(V(128)),256&e&&t.push(V(126)),16&e&&t.push(V(164)),8&e&&t.push(V(148)),512&e&&t.push(V(129)),1024&e&&t.push(V(134)),8192&e&&t.push(V(103)),16384&e&&t.push(V(147)),t.length?t:void 0}function $(e,t){const n=x(167);return n.left=e,n.right=Fi(t),n.transformFlags|=hw(n.left)|gw(n.right),n.flowNode=void 0,n}function K(e){const t=x(168);return t.expression=r().parenthesizeExpressionOfComputedPropertyName(e),t.transformFlags|=132096|hw(t.expression),t}function H(e,t,n,r){const i=S(169);return i.modifiers=Ei(e),i.name=Fi(t),i.constraint=n,i.default=r,i.transformFlags=1,i.expression=void 0,i.jsDoc=void 0,i}function G(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.constraint!==r||e.default!==i?Oi(H(t,n,r,i),e):e}function Q(e,t,n,r,i,o){const a=S(170);return a.modifiers=Ei(e),a.dotDotDotToken=t,a.name=Fi(n),a.questionToken=r,a.type=i,a.initializer=Ai(o),gv(a.name)?a.transformFlags=1:a.transformFlags=yw(a.modifiers)|hw(a.dotDotDotToken)|mw(a.name)|hw(a.questionToken)|hw(a.initializer)|(a.questionToken??a.type?1:0)|(a.dotDotDotToken??a.initializer?1024:0)|(31&eb(a.modifiers)?8192:0),a.jsDoc=void 0,a}function Y(e,t,n,r,i,o,a){return e.modifiers!==t||e.dotDotDotToken!==n||e.name!==r||e.questionToken!==i||e.type!==o||e.initializer!==a?Oi(Q(t,n,r,i,o,a),e):e}function Z(e){const t=x(171);return t.expression=r().parenthesizeLeftSideOfAccess(e,!1),t.transformFlags|=33562625|hw(t.expression),t}function ee(e,t,n,r){const i=S(172);return i.modifiers=Ei(e),i.name=Fi(t),i.type=r,i.questionToken=n,i.transformFlags=1,i.initializer=void 0,i.jsDoc=void 0,i}function te(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.questionToken!==r||e.type!==i?function(e,t){e!==t&&(e.initializer=t.initializer);return Oi(e,t)}(ee(t,n,r,i),e):e}function ne(e,t,n,r,i){const o=S(173);o.modifiers=Ei(e),o.name=Fi(t),o.questionToken=n&&_D(n)?n:void 0,o.exclamationToken=n&&lD(n)?n:void 0,o.type=r,o.initializer=Ai(i);const a=33554432&o.flags||128&eb(o.modifiers);return o.transformFlags=yw(o.modifiers)|mw(o.name)|hw(o.initializer)|(a||o.questionToken||o.exclamationToken||o.type?1:0)|(FD(o.name)||256&eb(o.modifiers)&&o.initializer?8192:0)|16777216,o.jsDoc=void 0,o}function re(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.questionToken!==(void 0!==r&&_D(r)?r:void 0)||e.exclamationToken!==(void 0!==r&&lD(r)?r:void 0)||e.type!==i||e.initializer!==o?Oi(ne(t,n,r,i,o),e):e}function ie(e,t,n,r,i,o){const a=S(174);return a.modifiers=Ei(e),a.name=Fi(t),a.questionToken=n,a.typeParameters=Ei(r),a.parameters=Ei(i),a.type=o,a.transformFlags=1,a.jsDoc=void 0,a.locals=void 0,a.nextContainer=void 0,a.typeArguments=void 0,a}function oe(e,t,n,r,i,o,a){return e.modifiers!==t||e.name!==n||e.questionToken!==r||e.typeParameters!==i||e.parameters!==o||e.type!==a?T(ie(t,n,r,i,o,a),e):e}function ae(e,t,n,r,i,o,a,s){const c=S(175);if(c.modifiers=Ei(e),c.asteriskToken=t,c.name=Fi(n),c.questionToken=r,c.exclamationToken=void 0,c.typeParameters=Ei(i),c.parameters=b(o),c.type=a,c.body=s,c.body){const e=1024&eb(c.modifiers),t=!!c.asteriskToken,n=e&&t;c.transformFlags=yw(c.modifiers)|hw(c.asteriskToken)|mw(c.name)|hw(c.questionToken)|yw(c.typeParameters)|yw(c.parameters)|hw(c.type)|-67108865&hw(c.body)|(n?128:e?256:t?2048:0)|(c.questionToken||c.typeParameters||c.type?1:0)|1024}else c.transformFlags=1;return c.typeArguments=void 0,c.jsDoc=void 0,c.locals=void 0,c.nextContainer=void 0,c.flowNode=void 0,c.endFlowNode=void 0,c.returnFlowNode=void 0,c}function se(e,t,n,r,i,o,a,s,c){return e.modifiers!==t||e.asteriskToken!==n||e.name!==r||e.questionToken!==i||e.typeParameters!==o||e.parameters!==a||e.type!==s||e.body!==c?function(e,t){e!==t&&(e.exclamationToken=t.exclamationToken);return Oi(e,t)}(ae(t,n,r,i,o,a,s,c),e):e}function ce(e){const t=S(176);return t.body=e,t.transformFlags=16777216|hw(e),t.modifiers=void 0,t.jsDoc=void 0,t.locals=void 0,t.nextContainer=void 0,t.endFlowNode=void 0,t.returnFlowNode=void 0,t}function _e(e,t,n){const r=S(177);return r.modifiers=Ei(e),r.parameters=b(t),r.body=n,r.body?r.transformFlags=yw(r.modifiers)|yw(r.parameters)|-67108865&hw(r.body)|1024:r.transformFlags=1,r.typeParameters=void 0,r.type=void 0,r.typeArguments=void 0,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.endFlowNode=void 0,r.returnFlowNode=void 0,r}function ue(e,t,n,r){return e.modifiers!==t||e.parameters!==n||e.body!==r?function(e,t){e!==t&&(e.typeParameters=t.typeParameters,e.type=t.type);return T(e,t)}(_e(t,n,r),e):e}function de(e,t,n,r,i){const o=S(178);return o.modifiers=Ei(e),o.name=Fi(t),o.parameters=b(n),o.type=r,o.body=i,o.body?o.transformFlags=yw(o.modifiers)|mw(o.name)|yw(o.parameters)|hw(o.type)|-67108865&hw(o.body)|(o.type?1:0):o.transformFlags=1,o.typeArguments=void 0,o.typeParameters=void 0,o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.flowNode=void 0,o.endFlowNode=void 0,o.returnFlowNode=void 0,o}function pe(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.parameters!==r||e.type!==i||e.body!==o?function(e,t){e!==t&&(e.typeParameters=t.typeParameters);return T(e,t)}(de(t,n,r,i,o),e):e}function fe(e,t,n,r){const i=S(179);return i.modifiers=Ei(e),i.name=Fi(t),i.parameters=b(n),i.body=r,i.body?i.transformFlags=yw(i.modifiers)|mw(i.name)|yw(i.parameters)|-67108865&hw(i.body)|(i.type?1:0):i.transformFlags=1,i.typeArguments=void 0,i.typeParameters=void 0,i.type=void 0,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.flowNode=void 0,i.endFlowNode=void 0,i.returnFlowNode=void 0,i}function me(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.parameters!==r||e.body!==i?function(e,t){e!==t&&(e.typeParameters=t.typeParameters,e.type=t.type);return T(e,t)}(fe(t,n,r,i),e):e}function ge(e,t,n){const r=S(180);return r.typeParameters=Ei(e),r.parameters=Ei(t),r.type=n,r.transformFlags=1,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function he(e,t,n){const r=S(181);return r.typeParameters=Ei(e),r.parameters=Ei(t),r.type=n,r.transformFlags=1,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function ye(e,t,n){const r=S(182);return r.modifiers=Ei(e),r.parameters=Ei(t),r.type=n,r.transformFlags=1,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function ve(e,t,n,r){return e.parameters!==n||e.type!==r||e.modifiers!==t?T(ye(t,n,r),e):e}function be(e,t){const n=x(205);return n.type=e,n.literal=t,n.transformFlags=1,n}function xe(e,t,n){const r=x(183);return r.assertsModifier=e,r.parameterName=Fi(t),r.type=n,r.transformFlags=1,r}function Se(e,t){const n=x(184);return n.typeName=Fi(e),n.typeArguments=t&&r().parenthesizeTypeArguments(b(t)),n.transformFlags=1,n}function Te(e,t,n){const r=S(185);return r.typeParameters=Ei(e),r.parameters=Ei(t),r.type=n,r.transformFlags=1,r.modifiers=void 0,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.typeArguments=void 0,r}function we(...e){return 4===e.length?Ne(...e):3===e.length?function(e,t,n){return Ne(void 0,e,t,n)}(...e):gn.fail("Incorrect number of arguments specified.")}function Ne(e,t,n,r){const i=S(186);return i.modifiers=Ei(e),i.typeParameters=Ei(t),i.parameters=Ei(n),i.type=r,i.transformFlags=1,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.typeArguments=void 0,i}function De(e,t,n,r,i){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==r||e.type!==i?T(we(t,n,r,i),e):e}function Ee(e,t){const n=x(187);return n.exprName=e,n.typeArguments=t&&r().parenthesizeTypeArguments(t),n.transformFlags=1,n}function Fe(e){const t=S(188);return t.members=b(e),t.transformFlags=1,t}function Ae(e){const t=x(189);return t.elementType=r().parenthesizeNonArrayTypeOfPostfixType(e),t.transformFlags=1,t}function Oe(e){const t=x(190);return t.elements=b(r().parenthesizeElementTypesOfTupleType(e)),t.transformFlags=1,t}function Le(e,t,n,r){const i=S(203);return i.dotDotDotToken=e,i.name=t,i.questionToken=n,i.type=r,i.transformFlags=1,i.jsDoc=void 0,i}function je(e){const t=x(191);return t.type=r().parenthesizeTypeOfOptionalType(e),t.transformFlags=1,t}function Me(e){const t=x(192);return t.type=e,t.transformFlags=1,t}function Re(e,t,n){const r=x(e);return r.types=v.createNodeArray(n(t)),r.transformFlags=1,r}function Be(e,t,n){return e.types!==t?Oi(Re(e.kind,t,n),e):e}function Je(e,t,n,i){const o=x(195);return o.checkType=r().parenthesizeCheckTypeOfConditionalType(e),o.extendsType=r().parenthesizeExtendsTypeOfConditionalType(t),o.trueType=n,o.falseType=i,o.transformFlags=1,o.locals=void 0,o.nextContainer=void 0,o}function ze(e){const t=x(196);return t.typeParameter=e,t.transformFlags=1,t}function qe(e,t){const n=x(204);return n.head=e,n.templateSpans=b(t),n.transformFlags=1,n}function Ue(e,t,n,i,o=!1){const a=x(206);return a.argument=e,a.attributes=t,a.assertions&&a.assertions.assertClause&&a.attributes&&(a.assertions.assertClause=a.attributes),a.qualifier=n,a.typeArguments=i&&r().parenthesizeTypeArguments(i),a.isTypeOf=o,a.transformFlags=1,a}function Ve(e){const t=x(197);return t.type=e,t.transformFlags=1,t}function We(e,t){const n=x(199);return n.operator=e,n.type=148===e?r().parenthesizeOperandOfReadonlyTypeOperator(t):r().parenthesizeOperandOfTypeOperator(t),n.transformFlags=1,n}function $e(e,t){const n=x(200);return n.objectType=r().parenthesizeNonArrayTypeOfPostfixType(e),n.indexType=t,n.transformFlags=1,n}function Ke(e,t,n,r,i,o){const a=S(201);return a.readonlyToken=e,a.typeParameter=t,a.nameType=n,a.questionToken=r,a.type=i,a.members=o&&b(o),a.transformFlags=1,a.locals=void 0,a.nextContainer=void 0,a}function He(e){const t=x(202);return t.literal=e,t.transformFlags=1,t}function Ge(e){const t=x(207);return t.elements=b(e),t.transformFlags|=525312|yw(t.elements),32768&t.transformFlags&&(t.transformFlags|=65664),t}function Xe(e){const t=x(208);return t.elements=b(e),t.transformFlags|=525312|yw(t.elements),t}function Qe(e,t,n,r){const i=S(209);return i.dotDotDotToken=e,i.propertyName=Fi(t),i.name=Fi(n),i.initializer=Ai(r),i.transformFlags|=hw(i.dotDotDotToken)|mw(i.propertyName)|mw(i.name)|hw(i.initializer)|(i.dotDotDotToken?32768:0)|1024,i.flowNode=void 0,i}function Ye(e,t){const n=x(210),i=e&&ke(e),o=b(e,!(!i||!zE(i))||void 0);return n.elements=r().parenthesizeExpressionsOfCommaDelimitedList(o),n.multiLine=t,n.transformFlags|=yw(n.elements),n}function Ze(e,t){const n=S(211);return n.properties=b(e),n.multiLine=t,n.transformFlags|=yw(n.properties),n.jsDoc=void 0,n}function et(e,t,n){const r=S(212);return r.expression=e,r.questionDotToken=t,r.name=n,r.transformFlags=hw(r.expression)|hw(r.questionDotToken)|(fD(r.name)?gw(r.name):536870912|hw(r.name)),r.jsDoc=void 0,r.flowNode=void 0,r}function tt(e,t){const n=et(r().parenthesizeLeftSideOfAccess(e,!1),void 0,Fi(t));return wD(e)&&(n.transformFlags|=384),n}function rt(e,t,n){const i=et(r().parenthesizeLeftSideOfAccess(e,!0),t,Fi(n));return i.flags|=64,i.transformFlags|=32,i}function it(e,t,n,r){return gn.assert(!!(64&e.flags),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),e.expression!==t||e.questionDotToken!==n||e.name!==r?Oi(rt(t,n,r),e):e}function ot(e,t,n){const r=S(213);return r.expression=e,r.questionDotToken=t,r.argumentExpression=n,r.transformFlags|=hw(r.expression)|hw(r.questionDotToken)|hw(r.argumentExpression),r.jsDoc=void 0,r.flowNode=void 0,r}function at(e,t){const n=ot(r().parenthesizeLeftSideOfAccess(e,!1),void 0,Pi(t));return wD(e)&&(n.transformFlags|=384),n}function ct(e,t,n){const i=ot(r().parenthesizeLeftSideOfAccess(e,!0),t,Pi(n));return i.flags|=64,i.transformFlags|=32,i}function lt(e,t,n,r){return gn.assert(!!(64&e.flags),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),e.expression!==t||e.questionDotToken!==n||e.argumentExpression!==r?Oi(ct(t,n,r),e):e}function ut(e,t,n,r){const i=S(214);return i.expression=e,i.questionDotToken=t,i.typeArguments=n,i.arguments=r,i.transformFlags|=hw(i.expression)|hw(i.questionDotToken)|yw(i.typeArguments)|yw(i.arguments),i.typeArguments&&(i.transformFlags|=1),pm(i.expression)&&(i.transformFlags|=16384),i}function pt(e,t,n){const i=ut(r().parenthesizeLeftSideOfAccess(e,!1),void 0,Ei(t),r().parenthesizeExpressionsOfCommaDelimitedList(b(n)));return ND(i.expression)&&(i.transformFlags|=8388608),i}function ft(e,t,n,i){const o=ut(r().parenthesizeLeftSideOfAccess(e,!0),t,Ei(n),r().parenthesizeExpressionsOfCommaDelimitedList(b(i)));return o.flags|=64,o.transformFlags|=32,o}function mt(e,t,n,r,i){return gn.assert(!!(64&e.flags),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),e.expression!==t||e.questionDotToken!==n||e.typeArguments!==r||e.arguments!==i?Oi(ft(t,n,r,i),e):e}function gt(e,t,n){const i=S(215);return i.expression=r().parenthesizeExpressionOfNew(e),i.typeArguments=Ei(t),i.arguments=n?r().parenthesizeExpressionsOfCommaDelimitedList(n):void 0,i.transformFlags|=hw(i.expression)|yw(i.typeArguments)|yw(i.arguments)|32,i.typeArguments&&(i.transformFlags|=1),i}function vt(e,t,n){const i=x(216);return i.tag=r().parenthesizeLeftSideOfAccess(e,!1),i.typeArguments=Ei(t),i.template=n,i.transformFlags|=hw(i.tag)|yw(i.typeArguments)|hw(i.template)|1024,i.typeArguments&&(i.transformFlags|=1),xy(i.template)&&(i.transformFlags|=128),i}function bt(e,t){const n=x(217);return n.expression=r().parenthesizeOperandOfPrefixUnary(t),n.type=e,n.transformFlags|=hw(n.expression)|hw(n.type)|1,n}function xt(e,t,n){return e.type!==t||e.expression!==n?Oi(bt(t,n),e):e}function St(e){const t=x(218);return t.expression=e,t.transformFlags=hw(t.expression),t.jsDoc=void 0,t}function kt(e,t){return e.expression!==t?Oi(St(t),e):e}function Tt(e,t,n,r,i,o,a){const s=S(219);s.modifiers=Ei(e),s.asteriskToken=t,s.name=Fi(n),s.typeParameters=Ei(r),s.parameters=b(i),s.type=o,s.body=a;const c=1024&eb(s.modifiers),l=!!s.asteriskToken,_=c&&l;return s.transformFlags=yw(s.modifiers)|hw(s.asteriskToken)|mw(s.name)|yw(s.typeParameters)|yw(s.parameters)|hw(s.type)|-67108865&hw(s.body)|(_?128:c?256:l?2048:0)|(s.typeParameters||s.type?1:0)|4194304,s.typeArguments=void 0,s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.flowNode=void 0,s.endFlowNode=void 0,s.returnFlowNode=void 0,s}function Ct(e,t,n,r,i,o,a,s){return e.name!==r||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==i||e.parameters!==o||e.type!==a||e.body!==s?T(Tt(t,n,r,i,o,a,s),e):e}function wt(e,t,n,i,o,a){const s=S(220);s.modifiers=Ei(e),s.typeParameters=Ei(t),s.parameters=b(n),s.type=i,s.equalsGreaterThanToken=o??R(39),s.body=r().parenthesizeConciseBodyOfArrowFunction(a);const c=1024&eb(s.modifiers);return s.transformFlags=yw(s.modifiers)|yw(s.typeParameters)|yw(s.parameters)|hw(s.type)|hw(s.equalsGreaterThanToken)|-67108865&hw(s.body)|(s.typeParameters||s.type?1:0)|(c?16640:0)|1024,s.typeArguments=void 0,s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.flowNode=void 0,s.endFlowNode=void 0,s.returnFlowNode=void 0,s}function Nt(e,t,n,r,i,o,a){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==r||e.type!==i||e.equalsGreaterThanToken!==o||e.body!==a?T(wt(t,n,r,i,o,a),e):e}function Dt(e){const t=x(221);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=hw(t.expression),t}function Et(e){const t=x(222);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=hw(t.expression),t}function Ft(e){const t=x(223);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=hw(t.expression),t}function Pt(e){const t=x(224);return t.expression=r().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=2097536|hw(t.expression),t}function At(e,t){const n=x(225);return n.operator=e,n.operand=r().parenthesizeOperandOfPrefixUnary(t),n.transformFlags|=hw(n.operand),46!==e&&47!==e||!fD(n.operand)||Yl(n.operand)||CA(n.operand)||(n.transformFlags|=268435456),n}function It(e,t){const n=x(226);return n.operator=t,n.operand=r().parenthesizeOperandOfPostfixUnary(e),n.transformFlags|=hw(n.operand),!fD(n.operand)||Yl(n.operand)||CA(n.operand)||(n.transformFlags|=268435456),n}function Ot(e,t,n){const i=S(227),o="number"==typeof(a=t)?R(a):a;var a;const s=o.kind;return i.left=r().parenthesizeLeftSideOfBinary(s,e),i.operatorToken=o,i.right=r().parenthesizeRightSideOfBinary(s,i.left,n),i.transformFlags|=hw(i.left)|hw(i.operatorToken)|hw(i.right),61===s?i.transformFlags|=32:64===s?vE(i.left)?i.transformFlags|=5248|Lt(i.left):yE(i.left)&&(i.transformFlags|=5120|Lt(i.left)):43===s||68===s?i.transformFlags|=512:ib(s)&&(i.transformFlags|=16),103===s&&mD(i.left)&&(i.transformFlags|=536870912),i.jsDoc=void 0,i}function Lt(e){return PI(e)?65536:0}function jt(e,t,n,i,o){const a=x(228);return a.condition=r().parenthesizeConditionOfConditionalExpression(e),a.questionToken=t??R(58),a.whenTrue=r().parenthesizeBranchOfConditionalExpression(n),a.colonToken=i??R(59),a.whenFalse=r().parenthesizeBranchOfConditionalExpression(o),a.transformFlags|=hw(a.condition)|hw(a.questionToken)|hw(a.whenTrue)|hw(a.colonToken)|hw(a.whenFalse),a.flowNodeWhenFalse=void 0,a.flowNodeWhenTrue=void 0,a}function Mt(e,t){const n=x(229);return n.head=e,n.templateSpans=b(t),n.transformFlags|=hw(n.head)|yw(n.templateSpans)|1024,n}function Rt(e,t,n,r=0){let i;if(gn.assert(!(-7177&r),"Unsupported template flags."),void 0!==n&&n!==t&&(i=function(e,t){aw||(aw=ks(99,!1,0));switch(e){case 15:aw.setText("`"+t+"`");break;case 16:aw.setText("`"+t+"${");break;case 17:aw.setText("}"+t+"${");break;case 18:aw.setText("}"+t+"`")}let n,r=aw.scan();20===r&&(r=aw.reScanTemplateToken(!1));if(aw.isUnterminated())return aw.setText(void 0),fw;switch(r){case 15:case 16:case 17:case 18:n=aw.getTokenValue()}if(void 0===n||1!==aw.scan())return aw.setText(void 0),fw;return aw.setText(void 0),n}(e,n),"object"==typeof i))return gn.fail("Invalid raw text");if(void 0===t){if(void 0===i)return gn.fail("Arguments 'text' and 'rawText' may not both be undefined.");t=i}else void 0!==i&&gn.assert(t===i,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return t}function Bt(e){let t=1024;return e&&(t|=128),t}function Jt(e,t,n,r){const i=S(e);return i.text=t,i.rawText=n,i.templateFlags=7176&r,i.transformFlags=Bt(i.templateFlags),i}function zt(e,t,n,r){return 15===e?Jt(e,t,n,r):function(e,t,n,r){const i=M(e);return i.text=t,i.rawText=n,i.templateFlags=7176&r,i.transformFlags=Bt(i.templateFlags),i}(e,t,n,r)}function qt(e,t){gn.assert(!e||!!t,"A `YieldExpression` with an asteriskToken must have an expression.");const n=x(230);return n.expression=t&&r().parenthesizeExpressionForDisallowedComma(t),n.asteriskToken=e,n.transformFlags|=1049728|(hw(n.expression)|hw(n.asteriskToken)),n}function Ut(e){const t=x(231);return t.expression=r().parenthesizeExpressionForDisallowedComma(e),t.transformFlags|=33792|hw(t.expression),t}function Vt(e,t,n,r,i){const o=S(232);return o.modifiers=Ei(e),o.name=Fi(t),o.typeParameters=Ei(n),o.heritageClauses=Ei(r),o.members=b(i),o.transformFlags|=yw(o.modifiers)|mw(o.name)|yw(o.typeParameters)|yw(o.heritageClauses)|yw(o.members)|(o.typeParameters?1:0)|1024,o.jsDoc=void 0,o}function Wt(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.heritageClauses!==i||e.members!==o?Oi(Vt(t,n,r,i,o),e):e}function $t(e,t){const n=x(234);return n.expression=r().parenthesizeLeftSideOfAccess(e,!1),n.typeArguments=t&&r().parenthesizeTypeArguments(t),n.transformFlags|=hw(n.expression)|yw(n.typeArguments)|1024,n}function Kt(e,t,n){return e.expression!==t||e.typeArguments!==n?Oi($t(t,n),e):e}function Ht(e,t){const n=x(235);return n.expression=e,n.type=t,n.transformFlags|=hw(n.expression)|hw(n.type)|1,n}function Gt(e,t,n){return e.expression!==t||e.type!==n?Oi(Ht(t,n),e):e}function Xt(e){const t=x(236);return t.expression=r().parenthesizeLeftSideOfAccess(e,!1),t.transformFlags|=1|hw(t.expression),t}function Qt(e,t){return Pl(e)?nn(e,t):e.expression!==t?Oi(Xt(t),e):e}function Yt(e,t){const n=x(239);return n.expression=e,n.type=t,n.transformFlags|=hw(n.expression)|hw(n.type)|1,n}function Zt(e,t,n){return e.expression!==t||e.type!==n?Oi(Yt(t,n),e):e}function tn(e){const t=x(236);return t.flags|=64,t.expression=r().parenthesizeLeftSideOfAccess(e,!0),t.transformFlags|=1|hw(t.expression),t}function nn(e,t){return gn.assert(!!(64&e.flags),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),e.expression!==t?Oi(tn(t),e):e}function rn(e,t){const n=x(237);switch(n.keywordToken=e,n.name=t,n.transformFlags|=hw(n.name),e){case 105:n.transformFlags|=1024;break;case 102:n.transformFlags|=32;break;default:return gn.assertNever(e)}return n.flowNode=void 0,n}function on(e,t){const n=x(240);return n.expression=e,n.literal=t,n.transformFlags|=hw(n.expression)|hw(n.literal)|1024,n}function an(e,t){const n=x(242);return n.statements=b(e),n.multiLine=t,n.transformFlags|=yw(n.statements),n.jsDoc=void 0,n.locals=void 0,n.nextContainer=void 0,n}function sn(e,t){const n=x(244);return n.modifiers=Ei(e),n.declarationList=nt(t)?Dn(t):t,n.transformFlags|=yw(n.modifiers)|hw(n.declarationList),128&eb(n.modifiers)&&(n.transformFlags=1),n.jsDoc=void 0,n.flowNode=void 0,n}function cn(e,t,n){return e.modifiers!==t||e.declarationList!==n?Oi(sn(t,n),e):e}function ln(){const e=x(243);return e.jsDoc=void 0,e}function _n(e){const t=x(245);return t.expression=r().parenthesizeExpressionOfExpressionStatement(e),t.transformFlags|=hw(t.expression),t.jsDoc=void 0,t.flowNode=void 0,t}function un(e,t,n){const r=x(246);return r.expression=e,r.thenStatement=Ii(t),r.elseStatement=Ii(n),r.transformFlags|=hw(r.expression)|hw(r.thenStatement)|hw(r.elseStatement),r.jsDoc=void 0,r.flowNode=void 0,r}function dn(e,t){const n=x(247);return n.statement=Ii(e),n.expression=t,n.transformFlags|=hw(n.statement)|hw(n.expression),n.jsDoc=void 0,n.flowNode=void 0,n}function pn(e,t){const n=x(248);return n.expression=e,n.statement=Ii(t),n.transformFlags|=hw(n.expression)|hw(n.statement),n.jsDoc=void 0,n.flowNode=void 0,n}function fn(e,t,n,r){const i=x(249);return i.initializer=e,i.condition=t,i.incrementor=n,i.statement=Ii(r),i.transformFlags|=hw(i.initializer)|hw(i.condition)|hw(i.incrementor)|hw(i.statement),i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i.flowNode=void 0,i}function mn(e,t,n){const r=x(250);return r.initializer=e,r.expression=t,r.statement=Ii(n),r.transformFlags|=hw(r.initializer)|hw(r.expression)|hw(r.statement),r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r.flowNode=void 0,r}function hn(e,t,n,i){const o=x(251);return o.awaitModifier=e,o.initializer=t,o.expression=r().parenthesizeExpressionForDisallowedComma(n),o.statement=Ii(i),o.transformFlags|=hw(o.awaitModifier)|hw(o.initializer)|hw(o.expression)|hw(o.statement)|1024,e&&(o.transformFlags|=128),o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.flowNode=void 0,o}function yn(e){const t=x(252);return t.label=Fi(e),t.transformFlags|=4194304|hw(t.label),t.jsDoc=void 0,t.flowNode=void 0,t}function vn(e){const t=x(253);return t.label=Fi(e),t.transformFlags|=4194304|hw(t.label),t.jsDoc=void 0,t.flowNode=void 0,t}function bn(e){const t=x(254);return t.expression=e,t.transformFlags|=4194432|hw(t.expression),t.jsDoc=void 0,t.flowNode=void 0,t}function xn(e,t){const n=x(255);return n.expression=e,n.statement=Ii(t),n.transformFlags|=hw(n.expression)|hw(n.statement),n.jsDoc=void 0,n.flowNode=void 0,n}function Sn(e,t){const n=x(256);return n.expression=r().parenthesizeExpressionForDisallowedComma(e),n.caseBlock=t,n.transformFlags|=hw(n.expression)|hw(n.caseBlock),n.jsDoc=void 0,n.flowNode=void 0,n.possiblyExhaustive=!1,n}function kn(e,t){const n=x(257);return n.label=Fi(e),n.statement=Ii(t),n.transformFlags|=hw(n.label)|hw(n.statement),n.jsDoc=void 0,n.flowNode=void 0,n}function Tn(e,t,n){return e.label!==t||e.statement!==n?Oi(kn(t,n),e):e}function Cn(e){const t=x(258);return t.expression=e,t.transformFlags|=hw(t.expression),t.jsDoc=void 0,t.flowNode=void 0,t}function wn(e,t,n){const r=x(259);return r.tryBlock=e,r.catchClause=t,r.finallyBlock=n,r.transformFlags|=hw(r.tryBlock)|hw(r.catchClause)|hw(r.finallyBlock),r.jsDoc=void 0,r.flowNode=void 0,r}function Nn(e,t,n,r){const i=S(261);return i.name=Fi(e),i.exclamationToken=t,i.type=n,i.initializer=Ai(r),i.transformFlags|=mw(i.name)|hw(i.initializer)|(i.exclamationToken??i.type?1:0),i.jsDoc=void 0,i}function Dn(e,t=0){const n=x(262);return n.flags|=7&t,n.declarations=b(e),n.transformFlags|=4194304|yw(n.declarations),7&t&&(n.transformFlags|=263168),4&t&&(n.transformFlags|=4),n}function En(e,t,n,r,i,o,a){const s=S(263);if(s.modifiers=Ei(e),s.asteriskToken=t,s.name=Fi(n),s.typeParameters=Ei(r),s.parameters=b(i),s.type=o,s.body=a,!s.body||128&eb(s.modifiers))s.transformFlags=1;else{const e=1024&eb(s.modifiers),t=!!s.asteriskToken,n=e&&t;s.transformFlags=yw(s.modifiers)|hw(s.asteriskToken)|mw(s.name)|yw(s.typeParameters)|yw(s.parameters)|hw(s.type)|-67108865&hw(s.body)|(n?128:e?256:t?2048:0)|(s.typeParameters||s.type?1:0)|4194304}return s.typeArguments=void 0,s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.endFlowNode=void 0,s.returnFlowNode=void 0,s}function Fn(e,t,n,r,i,o,a,s){return e.modifiers!==t||e.asteriskToken!==n||e.name!==r||e.typeParameters!==i||e.parameters!==o||e.type!==a||e.body!==s?function(e,t){e!==t&&e.modifiers===t.modifiers&&(e.modifiers=t.modifiers);return T(e,t)}(En(t,n,r,i,o,a,s),e):e}function Pn(e,t,n,r,i){const o=S(264);return o.modifiers=Ei(e),o.name=Fi(t),o.typeParameters=Ei(n),o.heritageClauses=Ei(r),o.members=b(i),128&eb(o.modifiers)?o.transformFlags=1:(o.transformFlags|=yw(o.modifiers)|mw(o.name)|yw(o.typeParameters)|yw(o.heritageClauses)|yw(o.members)|(o.typeParameters?1:0)|1024,8192&o.transformFlags&&(o.transformFlags|=1)),o.jsDoc=void 0,o}function An(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.heritageClauses!==i||e.members!==o?Oi(Pn(t,n,r,i,o),e):e}function In(e,t,n,r,i){const o=S(265);return o.modifiers=Ei(e),o.name=Fi(t),o.typeParameters=Ei(n),o.heritageClauses=Ei(r),o.members=b(i),o.transformFlags=1,o.jsDoc=void 0,o}function On(e,t,n,r,i,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.heritageClauses!==i||e.members!==o?Oi(In(t,n,r,i,o),e):e}function Ln(e,t,n,r){const i=S(266);return i.modifiers=Ei(e),i.name=Fi(t),i.typeParameters=Ei(n),i.type=r,i.transformFlags=1,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i}function jn(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.typeParameters!==r||e.type!==i?Oi(Ln(t,n,r,i),e):e}function Mn(e,t,n){const r=S(267);return r.modifiers=Ei(e),r.name=Fi(t),r.members=b(n),r.transformFlags|=yw(r.modifiers)|hw(r.name)|yw(r.members)|1,r.transformFlags&=-67108865,r.jsDoc=void 0,r}function Rn(e,t,n,r){return e.modifiers!==t||e.name!==n||e.members!==r?Oi(Mn(t,n,r),e):e}function Bn(e,t,n,r=0){const i=S(268);return i.modifiers=Ei(e),i.flags|=2088&r,i.name=t,i.body=n,128&eb(i.modifiers)?i.transformFlags=1:i.transformFlags|=yw(i.modifiers)|hw(i.name)|hw(i.body)|1,i.transformFlags&=-67108865,i.jsDoc=void 0,i.locals=void 0,i.nextContainer=void 0,i}function Jn(e,t,n,r){return e.modifiers!==t||e.name!==n||e.body!==r?Oi(Bn(t,n,r,e.flags),e):e}function zn(e){const t=x(269);return t.statements=b(e),t.transformFlags|=yw(t.statements),t.jsDoc=void 0,t}function qn(e){const t=x(270);return t.clauses=b(e),t.transformFlags|=yw(t.clauses),t.locals=void 0,t.nextContainer=void 0,t}function Un(e){const t=S(271);return t.name=Fi(e),t.transformFlags|=1|gw(t.name),t.modifiers=void 0,t.jsDoc=void 0,t}function Vn(e,t,n,r){const i=S(272);return i.modifiers=Ei(e),i.name=Fi(n),i.isTypeOnly=t,i.moduleReference=r,i.transformFlags|=yw(i.modifiers)|gw(i.name)|hw(i.moduleReference),HF(i.moduleReference)||(i.transformFlags|=1),i.transformFlags&=-67108865,i.jsDoc=void 0,i}function Wn(e,t,n,r,i){return e.modifiers!==t||e.isTypeOnly!==n||e.name!==r||e.moduleReference!==i?Oi(Vn(t,n,r,i),e):e}function $n(e,t,n,r){const i=x(273);return i.modifiers=Ei(e),i.importClause=t,i.moduleSpecifier=n,i.attributes=i.assertClause=r,i.transformFlags|=hw(i.importClause)|hw(i.moduleSpecifier),i.transformFlags&=-67108865,i.jsDoc=void 0,i}function Kn(e,t,n,r,i){return e.modifiers!==t||e.importClause!==n||e.moduleSpecifier!==r||e.attributes!==i?Oi($n(t,n,r,i),e):e}function Hn(e,t,n){const r=S(274);return"boolean"==typeof e&&(e=e?156:void 0),r.isTypeOnly=156===e,r.phaseModifier=e,r.name=t,r.namedBindings=n,r.transformFlags|=hw(r.name)|hw(r.namedBindings),156===e&&(r.transformFlags|=1),r.transformFlags&=-67108865,r}function Gn(e,t){const n=x(301);return n.elements=b(e),n.multiLine=t,n.token=132,n.transformFlags|=4,n}function Xn(e,t){const n=x(302);return n.name=e,n.value=t,n.transformFlags|=4,n}function Qn(e,t){const n=x(303);return n.assertClause=e,n.multiLine=t,n}function Yn(e,t,n){const r=x(301);return r.token=n??118,r.elements=b(e),r.multiLine=t,r.transformFlags|=4,r}function Zn(e,t){const n=x(302);return n.name=e,n.value=t,n.transformFlags|=4,n}function er(e){const t=S(275);return t.name=e,t.transformFlags|=hw(t.name),t.transformFlags&=-67108865,t}function tr(e){const t=S(281);return t.name=e,t.transformFlags|=32|hw(t.name),t.transformFlags&=-67108865,t}function nr(e){const t=x(276);return t.elements=b(e),t.transformFlags|=yw(t.elements),t.transformFlags&=-67108865,t}function rr(e,t,n){const r=S(277);return r.isTypeOnly=e,r.propertyName=t,r.name=n,r.transformFlags|=hw(r.propertyName)|hw(r.name),r.transformFlags&=-67108865,r}function ir(e,t,n){const i=S(278);return i.modifiers=Ei(e),i.isExportEquals=t,i.expression=t?r().parenthesizeRightSideOfBinary(64,void 0,n):r().parenthesizeExpressionOfExportDefault(n),i.transformFlags|=yw(i.modifiers)|hw(i.expression),i.transformFlags&=-67108865,i.jsDoc=void 0,i}function or(e,t,n){return e.modifiers!==t||e.expression!==n?Oi(ir(t,e.isExportEquals,n),e):e}function ar(e,t,n,r,i){const o=S(279);return o.modifiers=Ei(e),o.isTypeOnly=t,o.exportClause=n,o.moduleSpecifier=r,o.attributes=o.assertClause=i,o.transformFlags|=yw(o.modifiers)|hw(o.exportClause)|hw(o.moduleSpecifier),o.transformFlags&=-67108865,o.jsDoc=void 0,o}function sr(e,t,n,r,i,o){return e.modifiers!==t||e.isTypeOnly!==n||e.exportClause!==r||e.moduleSpecifier!==i||e.attributes!==o?function(e,t){e!==t&&e.modifiers===t.modifiers&&(e.modifiers=t.modifiers);return Oi(e,t)}(ar(t,n,r,i,o),e):e}function cr(e){const t=x(280);return t.elements=b(e),t.transformFlags|=yw(t.elements),t.transformFlags&=-67108865,t}function lr(e,t,n){const r=x(282);return r.isTypeOnly=e,r.propertyName=Fi(t),r.name=Fi(n),r.transformFlags|=hw(r.propertyName)|hw(r.name),r.transformFlags&=-67108865,r.jsDoc=void 0,r}function _r(e){const t=x(284);return t.expression=e,t.transformFlags|=hw(t.expression),t.transformFlags&=-67108865,t}function ur(e,t,n=!1){const i=dr(e,n?t&&r().parenthesizeNonArrayTypeOfPostfixType(t):t);return i.postfix=n,i}function dr(e,t){const n=x(e);return n.type=t,n}function pr(e,t){const n=S(318);return n.parameters=Ei(e),n.type=t,n.transformFlags=yw(n.parameters)|(n.type?1:0),n.jsDoc=void 0,n.locals=void 0,n.nextContainer=void 0,n.typeArguments=void 0,n}function fr(e,t=!1){const n=S(323);return n.jsDocPropertyTags=Ei(e),n.isArrayType=t,n}function mr(e){const t=x(310);return t.type=e,t}function gr(e,t,n){const r=S(324);return r.typeParameters=Ei(e),r.parameters=b(t),r.type=n,r.jsDoc=void 0,r.locals=void 0,r.nextContainer=void 0,r}function hr(e){const t=pw(e.kind);return e.tagName.escapedText===xc(t)?e.tagName:A(t)}function yr(e,t,n){const r=x(e);return r.tagName=t,r.comment=n,r}function vr(e,t,n){const r=S(e);return r.tagName=t,r.comment=n,r}function br(e,t,n,r){const i=yr(346,e??A("template"),r);return i.constraint=t,i.typeParameters=b(n),i}function xr(e,t,n,r){const i=vr(347,e??A("typedef"),r);return i.typeExpression=t,i.fullName=n,i.name=QA(n),i.locals=void 0,i.nextContainer=void 0,i}function Sr(e,t,n,r,i,o){const a=vr(342,e??A("param"),o);return a.typeExpression=r,a.name=t,a.isNameFirst=!!i,a.isBracketed=n,a}function kr(e,t,n,r,i,o){const a=vr(349,e??A("prop"),o);return a.typeExpression=r,a.name=t,a.isNameFirst=!!i,a.isBracketed=n,a}function Tr(e,t,n,r){const i=vr(339,e??A("callback"),r);return i.typeExpression=t,i.fullName=n,i.name=QA(n),i.locals=void 0,i.nextContainer=void 0,i}function Cr(e,t,n){const r=yr(340,e??A("overload"),n);return r.typeExpression=t,r}function wr(e,t,n){const r=yr(329,e??A("augments"),n);return r.class=t,r}function Nr(e,t,n){const r=yr(330,e??A("implements"),n);return r.class=t,r}function Dr(e,t,n){const r=yr(348,e??A("see"),n);return r.name=t,r}function Er(e){const t=x(311);return t.name=e,t}function Fr(e,t){const n=x(312);return n.left=e,n.right=t,n.transformFlags|=hw(n.left)|hw(n.right),n}function Pr(e,t){const n=x(325);return n.name=e,n.text=t,n}function Ar(e,t){const n=x(326);return n.name=e,n.text=t,n}function Ir(e,t){const n=x(327);return n.name=e,n.text=t,n}function Or(e,t,n){return yr(e,t??A(pw(e)),n)}function Lr(e,t,n,r){const i=yr(e,t??A(pw(e)),r);return i.typeExpression=n,i}function jr(e,t){return yr(328,e,t)}function Mr(e,t,n){const r=vr(341,e??A(pw(341)),n);return r.typeExpression=t,r.locals=void 0,r.nextContainer=void 0,r}function Rr(e,t,n,r,i){const o=yr(352,e??A("import"),i);return o.importClause=t,o.moduleSpecifier=n,o.attributes=r,o.comment=i,o}function Br(e){const t=x(322);return t.text=e,t}function Jr(e,t){const n=x(321);return n.comment=e,n.tags=Ei(t),n}function zr(e,t,n){const r=x(285);return r.openingElement=e,r.children=b(t),r.closingElement=n,r.transformFlags|=hw(r.openingElement)|yw(r.children)|hw(r.closingElement)|2,r}function qr(e,t,n){const r=x(286);return r.tagName=e,r.typeArguments=Ei(t),r.attributes=n,r.transformFlags|=hw(r.tagName)|yw(r.typeArguments)|hw(r.attributes)|2,r.typeArguments&&(r.transformFlags|=1),r}function Ur(e,t,n){const r=x(287);return r.tagName=e,r.typeArguments=Ei(t),r.attributes=n,r.transformFlags|=hw(r.tagName)|yw(r.typeArguments)|hw(r.attributes)|2,t&&(r.transformFlags|=1),r}function Vr(e){const t=x(288);return t.tagName=e,t.transformFlags|=2|hw(t.tagName),t}function Wr(e,t,n){const r=x(289);return r.openingFragment=e,r.children=b(t),r.closingFragment=n,r.transformFlags|=hw(r.openingFragment)|yw(r.children)|hw(r.closingFragment)|2,r}function $r(e,t){const n=x(12);return n.text=e,n.containsOnlyTriviaWhiteSpaces=!!t,n.transformFlags|=2,n}function Kr(e,t){const n=S(292);return n.name=e,n.initializer=t,n.transformFlags|=hw(n.name)|hw(n.initializer)|2,n}function Hr(e){const t=S(293);return t.properties=b(e),t.transformFlags|=2|yw(t.properties),t}function Gr(e){const t=x(294);return t.expression=e,t.transformFlags|=2|hw(t.expression),t}function Xr(e,t){const n=x(295);return n.dotDotDotToken=e,n.expression=t,n.transformFlags|=hw(n.dotDotDotToken)|hw(n.expression)|2,n}function Qr(e,t){const n=x(296);return n.namespace=e,n.name=t,n.transformFlags|=hw(n.namespace)|hw(n.name)|2,n}function Yr(e,t){const n=x(297);return n.expression=r().parenthesizeExpressionForDisallowedComma(e),n.statements=b(t),n.transformFlags|=hw(n.expression)|yw(n.statements),n.jsDoc=void 0,n}function Zr(e){const t=x(298);return t.statements=b(e),t.transformFlags=yw(t.statements),t}function ei(e,t){const n=x(299);switch(n.token=e,n.types=b(t),n.transformFlags|=yw(n.types),e){case 96:n.transformFlags|=1024;break;case 119:n.transformFlags|=1;break;default:return gn.assertNever(e)}return n}function ti(e,t){const n=x(300);return n.variableDeclaration=function(e){if("string"==typeof e||e&&!hF(e))return Nn(e,void 0,void 0,void 0);return e}(e),n.block=t,n.transformFlags|=hw(n.variableDeclaration)|hw(n.block)|(e?0:64),n.locals=void 0,n.nextContainer=void 0,n}function ni(e,t){const n=S(304);return n.name=Fi(e),n.initializer=r().parenthesizeExpressionForDisallowedComma(t),n.transformFlags|=mw(n.name)|hw(n.initializer),n.modifiers=void 0,n.questionToken=void 0,n.exclamationToken=void 0,n.jsDoc=void 0,n}function ri(e,t,n){return e.name!==t||e.initializer!==n?function(e,t){e!==t&&(e.modifiers=t.modifiers,e.questionToken=t.questionToken,e.exclamationToken=t.exclamationToken);return Oi(e,t)}(ni(t,n),e):e}function ii(e,t){const n=S(305);return n.name=Fi(e),n.objectAssignmentInitializer=t&&r().parenthesizeExpressionForDisallowedComma(t),n.transformFlags|=gw(n.name)|hw(n.objectAssignmentInitializer)|1024,n.equalsToken=void 0,n.modifiers=void 0,n.questionToken=void 0,n.exclamationToken=void 0,n.jsDoc=void 0,n}function oi(e){const t=S(306);return t.expression=r().parenthesizeExpressionForDisallowedComma(e),t.transformFlags|=65664|hw(t.expression),t.jsDoc=void 0,t}function ai(e,t){const n=S(307);return n.name=Fi(e),n.initializer=t&&r().parenthesizeExpressionForDisallowedComma(t),n.transformFlags|=hw(n.name)|hw(n.initializer)|1,n.jsDoc=void 0,n}function si(e){const t=Object.create(e.redirectTarget);return Object.defineProperties(t,{id:{get(){return this.redirectInfo.redirectTarget.id},set(e){this.redirectInfo.redirectTarget.id=e}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(e){this.redirectInfo.redirectTarget.symbol=e}}}),t.redirectInfo=e,t}function ci(e){const r=e.redirectInfo?function(e){const t=si(e.redirectInfo);return t.flags|=-17&e.flags,t.fileName=e.fileName,t.path=e.path,t.resolvedPath=e.resolvedPath,t.originalFileName=e.originalFileName,t.packageJsonLocations=e.packageJsonLocations,t.packageJsonScope=e.packageJsonScope,t.emitNode=void 0,t}(e):function(e){const n=t.createBaseSourceFileNode(308);n.flags|=-17&e.flags;for(const t in e)!Ie(n,t)&&Ie(e,t)&&("emitNode"!==t?n[t]=e[t]:n.emitNode=void 0);return n}(e);return n(r,e),r}function li(e){const t=x(309);return t.sourceFiles=e,t.syntheticFileReferences=void 0,t.syntheticTypeReferences=void 0,t.syntheticLibReferences=void 0,t.hasNoDefaultLib=void 0,t}function _i(e,t){const n=x(356);return n.expression=e,n.original=t,n.transformFlags|=1|hw(n.expression),AI(n,t),n}function ui(e,t){return e.expression!==t?Oi(_i(t,e.original),e):e}function di(e){if(sy(e)&&!vc(e)&&!e.original&&!e.emitNode&&!e.id){if(GE(e))return e.elements;if(LE(e)&&oD(e.operatorToken))return[e.left,e.right]}return e}function pi(e){const t=x(357);return t.elements=b(z(e,di)),t.transformFlags|=yw(t.elements),t}function fi(e,t){const n=x(358);return n.expression=e,n.thisArg=t,n.transformFlags|=hw(n.expression)|hw(n.thisArg),n}function mi(e){if(void 0===e)return e;if(mP(e))return ci(e);if(Yl(e))return function(e){const t=F(e.escapedText);return t.flags|=-17&e.flags,t.transformFlags=e.transformFlags,n(t,e),cN(t,{...e.emitNode.autoGenerate}),t}(e);if(fD(e))return function(e){const t=F(e.escapedText);t.flags|=-17&e.flags,t.jsDoc=e.jsDoc,t.flowNode=e.flowNode,t.symbol=e.symbol,t.transformFlags=e.transformFlags,n(t,e);const r=sN(e);return r&&aN(t,r),t}(e);if(Zl(e))return function(e){const t=L(e.escapedText);return t.flags|=-17&e.flags,t.transformFlags=e.transformFlags,n(t,e),cN(t,{...e.emitNode.autoGenerate}),t}(e);if(mD(e))return function(e){const t=L(e.escapedText);return t.flags|=-17&e.flags,t.transformFlags=e.transformFlags,n(t,e),t}(e);const r=Ll(e.kind)?t.createBaseNode(e.kind):t.createBaseTokenNode(e.kind);r.flags|=-17&e.flags,r.transformFlags=e.transformFlags,n(r,e);for(const t in e)!Ie(r,t)&&Ie(e,t)&&(r[t]=e[t]);return r}function gi(){return Ft(C("0"))}function hi(e,t,n){return kl(e)?ft(rt(e,void 0,t),void 0,void 0,n):pt(tt(e,t),void 0,n)}function yi(e,t,n){return hi(A(e),t,n)}function vi(e,t,n){return!!n&&(e.push(ni(t,n)),!0)}function bi(e,t){const n=ph(e);switch(n.kind){case 80:return t;case 110:case 9:case 10:case 11:return!1;case 210:return 0!==n.elements.length;case 211:return n.properties.length>0;default:return!0}}function xi(e,t,n,r=0,i){const o=i?e&&Pc(e):Ac(e);if(o&&fD(o)&&!Yl(o)){const e=jT(AI(mi(o),o),o.parent);return r|=ap(o),n||(r|=96),t||(r|=3072),r&&Ew(e,r),e}return O(e)}function Si(e,t,n){return xi(e,t,n,16384)}function ki(e,t,n,r){const i=tt(e,sy(t)?t:mi(t));AI(i,t);let o=0;return r||(o|=96),n||(o|=3072),o&&Ew(i,o),i}function Ti(e){return QN(e.expression)&&"use strict"===e.expression.text}function Ci(){return MA(_n(D("use strict")))}function wi(e,t,n=0,r){gn.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");let i=!1;const o=e.length;for(;n=183&&e<=206)return-2;switch(e){case 214:case 215:case 210:case 207:case 208:return-2147450880;case 268:return-1941676032;case 170:case 217:case 239:case 235:case 356:case 218:case 108:case 212:case 213:default:return-2147483648;case 220:return-2072174592;case 219:case 263:return-1937940480;case 262:return-2146893824;case 264:case 232:return-2147344384;case 177:return-1937948672;case 173:return-2013249536;case 175:case 178:case 179:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 169:case 172:case 174:case 180:case 181:case 182:case 265:case 266:return-2;case 211:return-2147278848;case 300:return-2147418112}}(e.kind);return Fc(e)&&c_(e.name)?(n=e.name,t|134234112&n.transformFlags):t;var n}function yw(e){return e?e.transformFlags:0}function vw(e){let t=0;for(const n of e)t|=hw(n);e.transformFlags=t}var bw=nw();function xw(e){return e.flags|=16,e}var Sw,kw=dw(4,{createBaseSourceFileNode:e=>xw(bw.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>xw(bw.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>xw(bw.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>xw(bw.createBaseTokenNode(e)),createBaseNode:e=>xw(bw.createBaseNode(e))});function Tw(e,t,n){return new(Sw||(Sw=Wx.getSourceMapSourceConstructor()))(e,t,n)}function Cw(e,t){if(e.original!==t&&(e.original=t,t)){const n=t.emitNode;n&&(e.emitNode=function(e,t){const{flags:n,internalFlags:r,leadingComments:i,trailingComments:o,commentRange:a,sourceMapRange:s,tokenSourceMapRanges:c,constantValue:l,helpers:_,startsOnNewLine:u,snippetElement:d,classThis:p,assignedName:f}=e;t||(t={});n&&(t.flags=n);r&&(t.internalFlags=-9&r);i&&(t.leadingComments=de(i.slice(),t.leadingComments));o&&(t.trailingComments=de(o.slice(),t.trailingComments));a&&(t.commentRange=a);s&&(t.sourceMapRange=s);c&&(t.tokenSourceMapRanges=function(e,t){t||(t=[]);for(const n in e)t[n]=e[n];return t}(c,t.tokenSourceMapRanges));void 0!==l&&(t.constantValue=l);if(_)for(const e of _)t.helpers=fe(t.helpers,e);void 0!==u&&(t.startsOnNewLine=u);void 0!==d&&(t.snippetElement=d);p&&(t.classThis=p);f&&(t.assignedName=f);return t}(n,e.emitNode))}return e}function ww(e){if(e.emitNode)gn.assert(!(8&e.emitNode.internalFlags),"Invalid attempt to mutate an immutable node.");else{if(vc(e)){if(308===e.kind)return e.emitNode={annotatedNodes:[e]};ww(wd(bc(wd(e)))??gn.fail("Could not determine parsed source file.")).annotatedNodes.push(e)}e.emitNode={}}return e.emitNode}function Nw(e){var t,n;const r=null==(n=null==(t=wd(bc(e)))?void 0:t.emitNode)?void 0:n.annotatedNodes;if(r)for(const e of r)e.emitNode=void 0}function Dw(e){const t=ww(e);return t.flags|=3072,t.leadingComments=void 0,t.trailingComments=void 0,e}function Ew(e,t){return ww(e).flags=t,e}function Fw(e,t){const n=ww(e);return n.flags=n.flags|t,e}function Pw(e,t){return ww(e).internalFlags=t,e}function Aw(e,t){const n=ww(e);return n.internalFlags=n.internalFlags|t,e}function Iw(e){var t;return(null==(t=e.emitNode)?void 0:t.sourceMapRange)??e}function Ow(e,t){return ww(e).sourceMapRange=t,e}function Lw(e,t){var n,r;return null==(r=null==(n=e.emitNode)?void 0:n.tokenSourceMapRanges)?void 0:r[t]}function jw(e,t,n){const r=ww(e);return(r.tokenSourceMapRanges??(r.tokenSourceMapRanges=[]))[t]=n,e}function Mw(e){var t;return null==(t=e.emitNode)?void 0:t.startsOnNewLine}function Rw(e,t){return ww(e).startsOnNewLine=t,e}function Bw(e){var t;return(null==(t=e.emitNode)?void 0:t.commentRange)??e}function Jw(e,t){return ww(e).commentRange=t,e}function zw(e){var t;return null==(t=e.emitNode)?void 0:t.leadingComments}function qw(e,t){return ww(e).leadingComments=t,e}function Uw(e,t,n,r){return qw(e,le(zw(e),{kind:t,pos:-1,end:-1,hasTrailingNewLine:r,text:n}))}function Vw(e){var t;return null==(t=e.emitNode)?void 0:t.trailingComments}function Ww(e,t){return ww(e).trailingComments=t,e}function $w(e,t,n,r){return Ww(e,le(Vw(e),{kind:t,pos:-1,end:-1,hasTrailingNewLine:r,text:n}))}function Kw(e,t){qw(e,zw(t)),Ww(e,Vw(t));const n=ww(t);return n.leadingComments=void 0,n.trailingComments=void 0,e}function Hw(e){var t;return null==(t=e.emitNode)?void 0:t.constantValue}function Gw(e,t){return ww(e).constantValue=t,e}function Xw(e,t){const n=ww(e);return n.helpers=le(n.helpers,t),e}function Qw(e,t){if(X(t)){const n=ww(e);for(const e of t)n.helpers=fe(n.helpers,e)}return e}function Yw(e,t){var n;const r=null==(n=e.emitNode)?void 0:n.helpers;return!!r&&$t(r,t)}function Zw(e){var t;return null==(t=e.emitNode)?void 0:t.helpers}function eN(e,t,n){const r=e.emitNode,i=r&&r.helpers;if(!X(i))return;const o=ww(t);let a=0;for(let e=0;e0&&(i[e-a]=t)}a>0&&(i.length-=a)}function tN(e){var t;return null==(t=e.emitNode)?void 0:t.snippetElement}function nN(e,t){return ww(e).snippetElement=t,e}function rN(e){return ww(e).internalFlags|=4,e}function iN(e,t){return ww(e).typeNode=t,e}function oN(e){var t;return null==(t=e.emitNode)?void 0:t.typeNode}function aN(e,t){return ww(e).identifierTypeArguments=t,e}function sN(e){var t;return null==(t=e.emitNode)?void 0:t.identifierTypeArguments}function cN(e,t){return ww(e).autoGenerate=t,e}function lN(e){var t;return null==(t=e.emitNode)?void 0:t.autoGenerate}function _N(e,t){return ww(e).generatedImportReference=t,e}function uN(e){var t;return null==(t=e.emitNode)?void 0:t.generatedImportReference}var dN=(e=>(e.Field="f",e.Method="m",e.Accessor="a",e))(dN||{});function pN(e){const t=e.factory,n=ht(()=>Pw(t.createTrue(),8)),r=ht(()=>Pw(t.createFalse(),8));return{getUnscopedHelperName:i,createDecorateHelper:function(n,r,o,a){e.requestEmitHelper(gN);const s=[];s.push(t.createArrayLiteralExpression(n,!0)),s.push(r),o&&(s.push(o),a&&s.push(a));return t.createCallExpression(i("__decorate"),void 0,s)},createMetadataHelper:function(n,r){return e.requestEmitHelper(hN),t.createCallExpression(i("__metadata"),void 0,[t.createStringLiteral(n),r])},createParamHelper:function(n,r,o){return e.requestEmitHelper(yN),AI(t.createCallExpression(i("__param"),void 0,[t.createNumericLiteral(r+""),n]),o)},createESDecorateHelper:function(n,r,o,s,c,l){return e.requestEmitHelper(vN),t.createCallExpression(i("__esDecorate"),void 0,[n??t.createNull(),r??t.createNull(),o,a(s),c,l])},createRunInitializersHelper:function(n,r,o){return e.requestEmitHelper(bN),t.createCallExpression(i("__runInitializers"),void 0,o?[n,r,o]:[n,r])},createAssignHelper:function(n){if(wS(e.getCompilerOptions())>=2)return t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"assign"),void 0,n);return e.requestEmitHelper(xN),t.createCallExpression(i("__assign"),void 0,n)},createAwaitHelper:function(n){return e.requestEmitHelper(SN),t.createCallExpression(i("__await"),void 0,[n])},createAsyncGeneratorHelper:function(n,r){return e.requestEmitHelper(SN),e.requestEmitHelper(kN),(n.emitNode||(n.emitNode={})).flags|=1572864,t.createCallExpression(i("__asyncGenerator"),void 0,[r?t.createThis():t.createVoidZero(),t.createIdentifier("arguments"),n])},createAsyncDelegatorHelper:function(n){return e.requestEmitHelper(SN),e.requestEmitHelper(TN),t.createCallExpression(i("__asyncDelegator"),void 0,[n])},createAsyncValuesHelper:function(n){return e.requestEmitHelper(CN),t.createCallExpression(i("__asyncValues"),void 0,[n])},createRestHelper:function(n,r,o,a){e.requestEmitHelper(wN);const s=[];let c=0;for(let e=0;e{let r="";for(let i=0;i= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'},hN={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'},yN={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"},vN={name:"typescript:esDecorate",importName:"__esDecorate",scoped:!1,priority:2,text:'\n var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }\n var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";\n var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === "accessor") {\n if (result === void 0) continue;\n if (result === null || typeof result !== "object") throw new TypeError("Object expected");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === "field") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n };'},bN={name:"typescript:runInitializers",importName:"__runInitializers",scoped:!1,priority:2,text:"\n var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n };"},xN={name:"typescript:assign",importName:"__assign",scoped:!1,priority:1,text:"\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };"},SN={name:"typescript:await",importName:"__await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }"},kN={name:"typescript:asyncGenerator",importName:"__asyncGenerator",scoped:!1,dependencies:[SN],text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'},TN={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,dependencies:[SN],text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n };'},CN={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'},wN={name:"typescript:rest",importName:"__rest",scoped:!1,text:'\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n };'},NN={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'},DN={name:"typescript:extends",importName:"__extends",scoped:!1,priority:0,text:'\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();'},EN={name:"typescript:makeTemplateObject",importName:"__makeTemplateObject",scoped:!1,priority:0,text:'\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };'},FN={name:"typescript:read",importName:"__read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'},PN={name:"typescript:spreadArray",importName:"__spreadArray",scoped:!1,text:"\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"},AN={name:"typescript:propKey",importName:"__propKey",scoped:!1,text:'\n var __propKey = (this && this.__propKey) || function (x) {\n return typeof x === "symbol" ? x : "".concat(x);\n };'},IN={name:"typescript:setFunctionName",importName:"__setFunctionName",scoped:!1,text:'\n var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {\n if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";\n return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });\n };'},ON={name:"typescript:values",importName:"__values",scoped:!1,text:'\n var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === "number") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n };'},LN={name:"typescript:generator",importName:"__generator",scoped:!1,priority:6,text:'\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);\n return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'},jN={name:"typescript:commonjscreatebinding",importName:"__createBinding",scoped:!1,priority:1,text:'\n var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n }) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n }));'},MN={name:"typescript:commonjsimportstar",importName:"__importStar",scoped:!1,dependencies:[jN,{name:"typescript:commonjscreatevalue",importName:"__setModuleDefault",scoped:!1,priority:1,text:'\n var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n }) : function(o, v) {\n o["default"] = v;\n });'}],priority:2,text:'\n var __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n })();'},RN={name:"typescript:commonjsimportdefault",importName:"__importDefault",scoped:!1,text:'\n var __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n };'},BN={name:"typescript:export-star",importName:"__exportStar",scoped:!1,dependencies:[jN],priority:2,text:'\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n };'},JN={name:"typescript:classPrivateFieldGet",importName:"__classPrivateFieldGet",scoped:!1,text:'\n var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");\n return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);\n };'},zN={name:"typescript:classPrivateFieldSet",importName:"__classPrivateFieldSet",scoped:!1,text:'\n var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === "m") throw new TypeError("Private method is not writable");\n if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");\n if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");\n return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n };'},qN={name:"typescript:classPrivateFieldIn",importName:"__classPrivateFieldIn",scoped:!1,text:'\n var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) {\n if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use \'in\' operator on non-object");\n return typeof state === "function" ? receiver === state : state.has(receiver);\n };'},UN={name:"typescript:addDisposableResource",importName:"__addDisposableResource",scoped:!1,text:'\n var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== "function") throw new TypeError("Object not disposable.");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n };'},VN={name:"typescript:disposeResources",importName:"__disposeResources",scoped:!1,text:'\n var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {\n return function (env) {\n function fail(e) {\n env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n };\n })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;\n });'},WN={name:"typescript:rewriteRelativeImportExtensions",importName:"__rewriteRelativeImportExtension",scoped:!1,text:'\n var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {\n if (typeof path === "string" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");\n });\n }\n return path;\n };'},$N={name:"typescript:async-super",scoped:!0,text:mN` + const ${"_superIndex"} = name => super[name];`},KN={name:"typescript:advanced-async-super",scoped:!0,text:mN` const ${"_superIndex"} = (function (geti, seti) { const cache = Object.create(null); return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); - })(name => super[name], (name, value) => super[name] = value);`};function FN(e,t){return oP(e)&&QN(e.expression)&&!!(8192&ip(e.expression))&&e.expression.escapedText===t}function AN(e){return 9===e.kind}function IN(e){return 10===e.kind}function ON(e){return 11===e.kind}function jN(e){return 12===e.kind}function LN(e){return 14===e.kind}function MN(e){return 15===e.kind}function RN(e){return 16===e.kind}function BN(e){return 17===e.kind}function JN(e){return 18===e.kind}function zN(e){return 26===e.kind}function qN(e){return 28===e.kind}function UN(e){return 40===e.kind}function VN(e){return 41===e.kind}function WN(e){return 42===e.kind}function $N(e){return 54===e.kind}function HN(e){return 58===e.kind}function KN(e){return 59===e.kind}function GN(e){return 29===e.kind}function XN(e){return 39===e.kind}function QN(e){return 80===e.kind}function YN(e){return 81===e.kind}function ZN(e){return 95===e.kind}function eD(e){return 90===e.kind}function tD(e){return 134===e.kind}function nD(e){return 131===e.kind}function rD(e){return 135===e.kind}function iD(e){return 148===e.kind}function oD(e){return 126===e.kind}function aD(e){return 128===e.kind}function sD(e){return 164===e.kind}function cD(e){return 129===e.kind}function lD(e){return 108===e.kind}function _D(e){return 102===e.kind}function uD(e){return 84===e.kind}function dD(e){return 166===e.kind}function pD(e){return 167===e.kind}function fD(e){return 168===e.kind}function mD(e){return 169===e.kind}function gD(e){return 170===e.kind}function hD(e){return 171===e.kind}function yD(e){return 172===e.kind}function vD(e){return 173===e.kind}function bD(e){return 174===e.kind}function xD(e){return 175===e.kind}function SD(e){return 176===e.kind}function kD(e){return 177===e.kind}function TD(e){return 178===e.kind}function CD(e){return 179===e.kind}function wD(e){return 180===e.kind}function ND(e){return 181===e.kind}function DD(e){return 182===e.kind}function PD(e){return 183===e.kind}function ED(e){return 184===e.kind}function FD(e){return 185===e.kind}function AD(e){return 186===e.kind}function ID(e){return 187===e.kind}function OD(e){return 188===e.kind}function jD(e){return 189===e.kind}function LD(e){return 202===e.kind}function MD(e){return 190===e.kind}function RD(e){return 191===e.kind}function BD(e){return 192===e.kind}function JD(e){return 193===e.kind}function zD(e){return 194===e.kind}function qD(e){return 195===e.kind}function UD(e){return 196===e.kind}function VD(e){return 197===e.kind}function WD(e){return 198===e.kind}function $D(e){return 199===e.kind}function HD(e){return 200===e.kind}function KD(e){return 201===e.kind}function GD(e){return 205===e.kind}function XD(e){return 204===e.kind}function QD(e){return 203===e.kind}function YD(e){return 206===e.kind}function ZD(e){return 207===e.kind}function eP(e){return 208===e.kind}function tP(e){return 209===e.kind}function nP(e){return 210===e.kind}function rP(e){return 211===e.kind}function iP(e){return 212===e.kind}function oP(e){return 213===e.kind}function aP(e){return 214===e.kind}function sP(e){return 215===e.kind}function cP(e){return 216===e.kind}function lP(e){return 217===e.kind}function _P(e){return 218===e.kind}function uP(e){return 219===e.kind}function dP(e){return 220===e.kind}function pP(e){return 221===e.kind}function fP(e){return 222===e.kind}function mP(e){return 223===e.kind}function gP(e){return 224===e.kind}function hP(e){return 225===e.kind}function yP(e){return 226===e.kind}function vP(e){return 227===e.kind}function bP(e){return 228===e.kind}function xP(e){return 229===e.kind}function SP(e){return 230===e.kind}function kP(e){return 231===e.kind}function TP(e){return 232===e.kind}function CP(e){return 233===e.kind}function wP(e){return 234===e.kind}function NP(e){return 238===e.kind}function DP(e){return 235===e.kind}function PP(e){return 236===e.kind}function EP(e){return 237===e.kind}function FP(e){return 354===e.kind}function AP(e){return 355===e.kind}function IP(e){return 239===e.kind}function OP(e){return 240===e.kind}function jP(e){return 241===e.kind}function LP(e){return 243===e.kind}function MP(e){return 242===e.kind}function RP(e){return 244===e.kind}function BP(e){return 245===e.kind}function JP(e){return 246===e.kind}function zP(e){return 247===e.kind}function qP(e){return 248===e.kind}function UP(e){return 249===e.kind}function VP(e){return 250===e.kind}function WP(e){return 251===e.kind}function $P(e){return 252===e.kind}function HP(e){return 253===e.kind}function KP(e){return 254===e.kind}function GP(e){return 255===e.kind}function XP(e){return 256===e.kind}function QP(e){return 257===e.kind}function YP(e){return 258===e.kind}function ZP(e){return 259===e.kind}function eE(e){return 260===e.kind}function tE(e){return 261===e.kind}function nE(e){return 262===e.kind}function rE(e){return 263===e.kind}function iE(e){return 264===e.kind}function oE(e){return 265===e.kind}function aE(e){return 266===e.kind}function sE(e){return 267===e.kind}function cE(e){return 268===e.kind}function lE(e){return 269===e.kind}function _E(e){return 270===e.kind}function uE(e){return 271===e.kind}function dE(e){return 272===e.kind}function pE(e){return 273===e.kind}function fE(e){return 302===e.kind}function mE(e){return 300===e.kind}function gE(e){return 301===e.kind}function hE(e){return 300===e.kind}function yE(e){return 301===e.kind}function vE(e){return 274===e.kind}function bE(e){return 280===e.kind}function xE(e){return 275===e.kind}function SE(e){return 276===e.kind}function kE(e){return 277===e.kind}function TE(e){return 278===e.kind}function CE(e){return 279===e.kind}function wE(e){return 281===e.kind}function NE(e){return 282===e.kind}function DE(e){return 353===e.kind}function PE(e){return 356===e.kind}function EE(e){return 283===e.kind}function FE(e){return 284===e.kind}function AE(e){return 285===e.kind}function IE(e){return 286===e.kind}function OE(e){return 287===e.kind}function jE(e){return 288===e.kind}function LE(e){return 289===e.kind}function ME(e){return 290===e.kind}function RE(e){return 291===e.kind}function BE(e){return 292===e.kind}function JE(e){return 293===e.kind}function zE(e){return 294===e.kind}function qE(e){return 295===e.kind}function UE(e){return 296===e.kind}function VE(e){return 297===e.kind}function WE(e){return 298===e.kind}function $E(e){return 299===e.kind}function HE(e){return 303===e.kind}function KE(e){return 304===e.kind}function GE(e){return 305===e.kind}function XE(e){return 306===e.kind}function QE(e){return 307===e.kind}function YE(e){return 308===e.kind}function ZE(e){return 309===e.kind}function eF(e){return 310===e.kind}function tF(e){return 311===e.kind}function nF(e){return 324===e.kind}function rF(e){return 325===e.kind}function iF(e){return 326===e.kind}function oF(e){return 312===e.kind}function aF(e){return 313===e.kind}function sF(e){return 314===e.kind}function cF(e){return 315===e.kind}function lF(e){return 316===e.kind}function _F(e){return 317===e.kind}function uF(e){return 318===e.kind}function dF(e){return 319===e.kind}function pF(e){return 320===e.kind}function fF(e){return 322===e.kind}function mF(e){return 323===e.kind}function gF(e){return 328===e.kind}function hF(e){return 330===e.kind}function yF(e){return 332===e.kind}function vF(e){return 338===e.kind}function bF(e){return 333===e.kind}function xF(e){return 334===e.kind}function SF(e){return 335===e.kind}function kF(e){return 336===e.kind}function TF(e){return 337===e.kind}function CF(e){return 339===e.kind}function wF(e){return 331===e.kind}function NF(e){return 347===e.kind}function DF(e){return 340===e.kind}function PF(e){return 341===e.kind}function EF(e){return 342===e.kind}function FF(e){return 343===e.kind}function AF(e){return 344===e.kind}function IF(e){return 345===e.kind}function OF(e){return 346===e.kind}function jF(e){return 327===e.kind}function LF(e){return 348===e.kind}function MF(e){return 329===e.kind}function RF(e){return 350===e.kind}function BF(e){return 349===e.kind}function JF(e){return 351===e.kind}function zF(e){return 352===e.kind}var qF,UF=new WeakMap;function VF(e){return Jl(e.kind)?UF.get(e):p}function WF(e,t){return UF.set(e,t),t}function $F(e){UF.delete(e)}function HF(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function KF(e,t,n,r){if(pD(n))return vI(e.createElementAccessExpression(t,n.expression),r);{const r=vI(kl(n)?e.createPropertyAccessExpression(t,n):e.createElementAccessExpression(t,n),n);return pw(r,128),r}}function GF(e,t){const n=kI.createIdentifier(e||"React");return qT(n,kc(t)),n}function XF(e,t,n){if(dD(t)){const r=XF(e,t.left,n),i=e.createIdentifier(wc(t.right));return i.escapedText=t.right.escapedText,e.createPropertyAccessExpression(r,i)}return GF(wc(t),n)}function QF(e,t,n,r){return t?XF(e,t,r):e.createPropertyAccessExpression(GF(n,r),"createElement")}function YF(e,t,n,r,i,o){const a=[n];if(r&&a.push(r),i&&i.length>0)if(r||a.push(e.createNull()),i.length>1)for(const e of i)bA(e),a.push(e);else a.push(i[0]);return vI(e.createCallExpression(t,void 0,a),o)}function ZF(e,t,n,r,i,o,a){const s=function(e,t,n,r){return t?XF(e,t,r):e.createPropertyAccessExpression(GF(n,r),"Fragment")}(e,n,r,o),c=[s,e.createNull()];if(i&&i.length>0)if(i.length>1)for(const e of i)bA(e),c.push(e);else c.push(i[0]);return vI(e.createCallExpression(QF(e,t,r,o),void 0,c),a)}function eA(e,t,n){if(tE(t)){const r=Ne(t.declarations),i=e.updateVariableDeclaration(r,r.name,void 0,void 0,n);return vI(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}{const r=vI(e.createAssignment(t,n),t);return vI(e.createExpressionStatement(r),t)}}function tA(e,t,n){return jP(t)?e.updateBlock(t,vI(e.createNodeArray([n,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,n]),!0)}function nA(e,t){if(dD(t)){const n=nA(e,t.left),r=qT(vI(e.cloneNode(t.right),t.right),t.right.parent);return vI(e.createPropertyAccessExpression(n,r),t)}return qT(vI(e.cloneNode(t),t),t.parent)}function rA(e,t){return QN(t)?e.createStringLiteralFromNode(t):pD(t)?qT(vI(e.cloneNode(t.expression),t.expression),t.expression.parent):qT(vI(e.cloneNode(t),t),t.parent)}function iA(e,t,n,r){switch(n.name&&YN(n.name)&&Tn.failBadSyntaxKind(n.name,"Private identifiers are not allowed in object literals."),n.kind){case 177:case 178:return function(e,t,n,r,i){const{firstAccessor:o,getAccessor:a,setAccessor:s}=Dv(t,n);if(n===o)return vI(e.createObjectDefinePropertyCall(r,rA(e,n.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:a&&vI(cw(e.createFunctionExpression(Rc(a),void 0,void 0,void 0,a.parameters,void 0,a.body),a),a),set:s&&vI(cw(e.createFunctionExpression(Rc(s),void 0,void 0,void 0,s.parameters,void 0,s.body),s),s)},!i)),o)}(e,t.properties,n,r,!!t.multiLine);case 303:return function(e,t,n){return cw(vI(e.createAssignment(KF(e,n,t.name,t.name),t.initializer),t),t)}(e,n,r);case 304:return function(e,t,n){return cw(vI(e.createAssignment(KF(e,n,t.name,t.name),e.cloneNode(t.name)),t),t)}(e,n,r);case 174:return function(e,t,n){return cw(vI(e.createAssignment(KF(e,n,t.name,t.name),cw(vI(e.createFunctionExpression(Rc(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}(e,n,r)}}function oA(e,t,n,r,i){const o=t.operator;Tn.assert(46===o||47===o,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");const a=e.createTempVariable(r);vI(n=e.createAssignment(a,n),t.operand);let s=gP(t)?e.createPrefixUnaryExpression(o,a):e.createPostfixUnaryExpression(a,o);return vI(s,t),i&&(s=e.createAssignment(i,s),vI(s,t)),vI(n=e.createComma(n,s),t),hP(t)&&vI(n=e.createComma(n,a),t),n}function aA(e){return!!(65536&ip(e))}function sA(e){return!!(32768&ip(e))}function cA(e){return!!(16384&ip(e))}function lA(e){return ON(e.expression)&&"use strict"===e.expression.text}function _A(e){for(const t of e){if(!vf(t))break;if(lA(t))return t}}function uA(e){const t=Ce(e);return void 0!==t&&vf(t)&&lA(t)}function dA(e){return 226===e.kind&&28===e.operatorToken.kind}function pA(e){return dA(e)||AP(e)}function fA(e){return lP(e)&&zm(e)&&!!ul(e)}function mA(e){const t=dl(e);return Tn.assertIsDefined(t),t}function gA(e,t=15){switch(e.kind){case 217:return!(16&t&&fA(e))&&!!(1&t);case 216:case 234:case 233:case 238:return!!(2&t);case 235:return!!(4&t);case 354:return!!(8&t)}return!1}function hA(e,t=15){for(;gA(e,t);)e=e.expression;return e}function yA(e,t=15){let n=e.parent;for(;gA(n,t);)n=n.parent,Tn.assert(n);return n}function vA(e){return hA(e,6)}function bA(e){return xw(e,!0)}function xA(e){const t=bc(e,QE),n=t&&t.emitNode;return n&&n.externalHelpersModuleName}function SA(e){const t=bc(e,QE),n=t&&t.emitNode;return!(!n||!n.externalHelpersModuleName&&!n.externalHelpers)}function kA(e,t,n,r,i,o,a){if(r.importHelpers&&kp(n,r)){let s;const c=jS(r);if(c>=5&&c<=99||99===n.impliedNodeFormat){const r=Lw(n);if(r){const i=[];for(const e of r)if(!e.scoped){const t=e.importName;t&&he(i,t)}if(ee(i)){i.sort(Rt),s=e.createNamedImports(M(i,r=>jd(n,r)?e.createImportSpecifier(!1,void 0,e.createIdentifier(r)):e.createImportSpecifier(!1,e.createIdentifier(r),t.getUnscopedHelperName(r))));lw(bc(n,QE)).externalHelpers=!0}}}else{const t=TA(e,n,r,i,o||a);t&&(s=e.createNamespaceImport(t))}if(s){const t=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,s),e.createStringLiteral(td),void 0);return mw(t,2),t}}}function TA(e,t,n,r,i){if(n.importHelpers&&kp(t,n)){const o=xA(t);if(o)return o;const a=jS(n);let s=(r||BS(n)&&i)&&4!==a&&(a<5||1===t.impliedNodeFormat);if(!s){const e=Lw(t);if(e)for(const t of e)if(!t.scoped){s=!0;break}}if(s){const n=lw(bc(t,QE));return n.externalHelpersModuleName||(n.externalHelpersModuleName=e.createUniqueName(td))}}}function CA(e,t,n){const r=Ag(t);if(r&&!Ig(t)&&!Zd(t)){const t=r.name;return n_(t)?t:e.createIdentifier(Yd(n,t)||wc(t))}return 272===t.kind&&t.importClause||278===t.kind&&t.moduleSpecifier?e.getGeneratedNameForNode(t):void 0}function wA(e,t,n,r,i,o){const a=Fg(t);if(a&&ON(a))return function(e,t,n,r,i){return NA(n,r.getExternalModuleFileFromDeclaration(e),t,i)}(t,r,e,i,o)||function(e,t,n){const r=n.renamedDependencies&&n.renamedDependencies.get(t.text);return r?e.createStringLiteral(r):void 0}(e,a,n)||e.cloneNode(a)}function NA(e,t,n,r){if(t)return t.moduleName?e.createStringLiteral(t.moduleName):!t.isDeclarationFile&&r.outFile?e.createStringLiteral(rv(n,t.fileName)):void 0}function DA(e){if(M_(e))return e.initializer;if(HE(e)){const t=e.initializer;return xb(t,!0)?t.right:void 0}return KE(e)?e.objectAssignmentInitializer:xb(e,!0)?e.right:SP(e)?DA(e.expression):void 0}function PA(e){if(M_(e))return e.name;if(!F_(e))return xb(e,!0)?PA(e.left):SP(e)?PA(e.expression):e;switch(e.kind){case 303:return PA(e.initializer);case 304:return e.name;case 305:return PA(e.expression)}}function EA(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function FA(e){const t=AA(e);return Tn.assert(!!t||GE(e),"Invalid property name for binding element."),t}function AA(e){switch(e.kind){case 208:if(e.propertyName){const t=e.propertyName;return YN(t)?Tn.failBadSyntaxKind(t):pD(t)&&IA(t.expression)?t.expression:t}break;case 303:if(e.name){const t=e.name;return YN(t)?Tn.failBadSyntaxKind(t):pD(t)&&IA(t.expression)?t.expression:t}break;case 305:return e.name&&YN(e.name)?Tn.failBadSyntaxKind(e.name):e.name}const t=PA(e);if(t&&d_(t))return t}function IA(e){const t=e.kind;return 11===t||9===t}function OA(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function jA(e){if(e){let t=e;for(;;){if(QN(t)||!t.body)return QN(t)?t:t.name;t=t.body}}}function LA(e){const t=e.kind;return 176===t||178===t}function MA(e){const t=e.kind;return 176===t||177===t||178===t}function RA(e){const t=e.kind;return 303===t||304===t||262===t||176===t||181===t||175===t||282===t||243===t||264===t||265===t||266===t||267===t||271===t||272===t||270===t||278===t||277===t}function BA(e){const t=e.kind;return 175===t||303===t||304===t||282===t||270===t}function JA(e){return HN(e)||$N(e)}function zA(e){return QN(e)||VD(e)}function qA(e){return iD(e)||UN(e)||VN(e)}function UA(e){return HN(e)||UN(e)||VN(e)}function VA(e){return QN(e)||ON(e)}function WA(e){const t=e.kind;return 106===t||112===t||97===t||Wl(e)||gP(e)}function $A(e){return function(e){return 48===e||49===e||50===e}(e)||function(e){return function(e){return 40===e||41===e}(e)||function(e){return function(e){return 43===e}(e)||function(e){return 42===e||44===e||45===e}(e)}(e)}(e)}function HA(e){return function(e){return 35===e||37===e||36===e||38===e}(e)||function(e){return function(e){return 30===e||33===e||32===e||34===e||104===e||103===e}(e)||$A(e)}(e)}function KA(e){return function(e){return 56===e||57===e}(e)||function(e){return function(e){return 51===e||52===e||53===e}(e)||HA(e)}(e)}function GA(e){return function(e){return 61===e||KA(e)||yb(e)}(e)||28===e}function XA(e){return GA(e.kind)}(e=>{function t(e,n,r,i,o,a,c){const l=n>0?o[n-1]:void 0;return Tn.assertEqual(r[n],t),o[n]=e.onEnter(i[n],l,c),r[n]=s(e,t),n}function n(e,t,r,i,o,a,_){Tn.assertEqual(r[t],n),Tn.assertIsDefined(e.onLeft),r[t]=s(e,n);const u=e.onLeft(i[t].left,o[t],i[t]);return u?(l(t,i,u),c(t,r,i,o,u)):t}function r(e,t,n,i,o,a,c){return Tn.assertEqual(n[t],r),Tn.assertIsDefined(e.onOperator),n[t]=s(e,r),e.onOperator(i[t].operatorToken,o[t],i[t]),t}function i(e,t,n,r,o,a,_){Tn.assertEqual(n[t],i),Tn.assertIsDefined(e.onRight),n[t]=s(e,i);const u=e.onRight(r[t].right,o[t],r[t]);return u?(l(t,r,u),c(t,n,r,o,u)):t}function o(e,t,n,r,i,a,c){Tn.assertEqual(n[t],o),n[t]=s(e,o);const l=e.onExit(r[t],i[t]);if(t>0){if(t--,e.foldState){const r=n[t]===o?"right":"left";i[t]=e.foldState(i[t],l,r)}}else a.value=l;return t}function a(e,t,n,r,i,o,s){return Tn.assertEqual(n[t],a),t}function s(e,s){switch(s){case t:if(e.onLeft)return n;case n:if(e.onOperator)return r;case r:if(e.onRight)return i;case i:return o;case o:case a:return a;default:Tn.fail("Invalid state")}}function c(e,n,r,i,o){return n[++e]=t,r[e]=o,i[e]=void 0,e}function l(e,t,n){if(Tn.shouldAssert(2))for(;e>=0;)Tn.assert(t[e]!==n,"Circular traversal detected."),e--}e.enter=t,e.left=n,e.operator=r,e.right=i,e.exit=o,e.done=a,e.nextState=s})(qF||(qF={}));var QA,YA,ZA,eI,tI,nI=class{constructor(e,t,n,r,i,o){this.onEnter=e,this.onLeft=t,this.onOperator=n,this.onRight=r,this.onExit=i,this.foldState=o}};function rI(e,t,n,r,i,o){const a=new nI(e,t,n,r,i,o);return function(e,t){const n={value:void 0},r=[qF.enter],i=[e],o=[void 0];let s=0;for(;r[s]!==qF.done;)s=r[s](a,s,r,i,o,n,t);return Tn.assertEqual(s,0),n.value}}function iI(e){return 95===e||90===e}function oI(e){return iI(e.kind)}function aI(e){const t=e.kind;return s_(t)&&!iI(t)}function sI(e,t){if(void 0!==t)return 0===t.length?t:vI(e.createNodeArray([],t.hasTrailingComma),t)}function cI(e){var t;const n=e.emitNode.autoGenerate;if(4&n.flags){const r=n.id;let i=e,o=i.original;for(;o;){i=o;const e=null==(t=i.emitNode)?void 0:t.autoGenerate;if(kl(i)&&(void 0===e||4&e.flags&&e.id!==r))break;o=i.original}return i}return e}function lI(e,t){return"object"==typeof e?uI(!1,e.prefix,e.node,e.suffix,t):"string"==typeof e?e.length>0&&35===e.charCodeAt(0)?e.slice(1):e:""}function _I(e,t){return"string"==typeof e?e:function(e,t){return r_(e)?t(e).slice(1):n_(e)?t(e):YN(e)?e.escapedText.slice(1):wc(e)}(e,Tn.checkDefined(t))}function uI(e,t,n,r,i){return t=lI(t,i),r=lI(r,i),`${e?"#":""}${t}${n=_I(n,i)}${r}`}function dI(e,t,n,r){return e.updatePropertyDeclaration(t,n,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,r)}function pI(e,t,n,r,i=e.createThis()){return e.createGetAccessorDeclaration(n,r,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function fI(e,t,n,r,i=e.createThis()){return e.createSetAccessorDeclaration(n,r,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function mI(e){let t=e.expression;for(;;)if(t=hA(t),AP(t))t=Ee(t.elements);else{if(!dA(t)){if(xb(t,!0)&&n_(t.left))return t;break}t=t.right}}function gI(e,t){if(function(e){return lP(e)&&my(e)&&!e.emitNode}(e))gI(e.expression,t);else if(dA(e))gI(e.left,t),gI(e.right,t);else if(AP(e))for(const n of e.elements)gI(n,t);else t.push(e)}function hI(e){const t=[];return gI(e,t),t}function yI(e){if(65536&e.transformFlags)return!0;if(128&e.transformFlags)for(const t of OA(e)){const e=PA(t);if(e&&j_(e)){if(65536&e.transformFlags)return!0;if(128&e.transformFlags&&yI(e))return!0}}return!1}function vI(e,t){return t?BT(e,t.pos,t.end):e}function bI(e){const t=e.kind;return 168===t||169===t||171===t||172===t||173===t||174===t||176===t||177===t||178===t||181===t||185===t||218===t||219===t||231===t||243===t||262===t||263===t||264===t||265===t||266===t||267===t||271===t||272===t||277===t||278===t}function xI(e){const t=e.kind;return 169===t||172===t||174===t||177===t||178===t||231===t||263===t}var SI={createBaseSourceFileNode:e=>new(tI||(tI=nS.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(ZA||(ZA=nS.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(eI||(eI=nS.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(YA||(YA=nS.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(QA||(QA=nS.getNodeConstructor()))(e,-1,-1)},kI=KC(1,SI);function TI(e,t){return t&&e(t)}function CI(e,t,n){if(n){if(t)return t(n);for(const t of n){const n=e(t);if(n)return n}}}function wI(e,t){return 42===e.charCodeAt(t+1)&&42===e.charCodeAt(t+2)&&47!==e.charCodeAt(t+3)}function NI(e){return h(e.statements,DI)||function(e){return 8388608&e.flags?PI(e):void 0}(e)}function DI(e){return bI(e)&&function(e,t){return ee(e.modifiers,e=>e.kind===t)}(e,95)||uE(e)&&EE(e.moduleReference)||dE(e)||kE(e)||TE(e)?e:void 0}function PI(e){return function(e){return PP(e)&&102===e.keywordToken&&"meta"===e.name.escapedText}(e)?e:KI(e,PI)}var EI,FI={166:function(e,t,n){return TI(t,e.left)||TI(t,e.right)},168:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.constraint)||TI(t,e.default)||TI(t,e.expression)},304:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.exclamationToken)||TI(t,e.equalsToken)||TI(t,e.objectAssignmentInitializer)},305:function(e,t,n){return TI(t,e.expression)},169:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.dotDotDotToken)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.type)||TI(t,e.initializer)},172:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.exclamationToken)||TI(t,e.type)||TI(t,e.initializer)},171:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.type)||TI(t,e.initializer)},303:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.exclamationToken)||TI(t,e.initializer)},260:function(e,t,n){return TI(t,e.name)||TI(t,e.exclamationToken)||TI(t,e.type)||TI(t,e.initializer)},208:function(e,t,n){return TI(t,e.dotDotDotToken)||TI(t,e.propertyName)||TI(t,e.name)||TI(t,e.initializer)},181:function(e,t,n){return CI(t,n,e.modifiers)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)},185:function(e,t,n){return CI(t,n,e.modifiers)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)},184:function(e,t,n){return CI(t,n,e.modifiers)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)},179:AI,180:AI,174:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.asteriskToken)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.exclamationToken)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.body)},173:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.questionToken)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)},176:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.body)},177:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.body)},178:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.body)},262:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.asteriskToken)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.body)},218:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.asteriskToken)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.body)},219:function(e,t,n){return CI(t,n,e.modifiers)||CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)||TI(t,e.equalsGreaterThanToken)||TI(t,e.body)},175:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.body)},183:function(e,t,n){return TI(t,e.typeName)||CI(t,n,e.typeArguments)},182:function(e,t,n){return TI(t,e.assertsModifier)||TI(t,e.parameterName)||TI(t,e.type)},186:function(e,t,n){return TI(t,e.exprName)||CI(t,n,e.typeArguments)},187:function(e,t,n){return CI(t,n,e.members)},188:function(e,t,n){return TI(t,e.elementType)},189:function(e,t,n){return CI(t,n,e.elements)},192:II,193:II,194:function(e,t,n){return TI(t,e.checkType)||TI(t,e.extendsType)||TI(t,e.trueType)||TI(t,e.falseType)},195:function(e,t,n){return TI(t,e.typeParameter)},205:function(e,t,n){return TI(t,e.argument)||TI(t,e.attributes)||TI(t,e.qualifier)||CI(t,n,e.typeArguments)},302:function(e,t,n){return TI(t,e.assertClause)},196:OI,198:OI,199:function(e,t,n){return TI(t,e.objectType)||TI(t,e.indexType)},200:function(e,t,n){return TI(t,e.readonlyToken)||TI(t,e.typeParameter)||TI(t,e.nameType)||TI(t,e.questionToken)||TI(t,e.type)||CI(t,n,e.members)},201:function(e,t,n){return TI(t,e.literal)},202:function(e,t,n){return TI(t,e.dotDotDotToken)||TI(t,e.name)||TI(t,e.questionToken)||TI(t,e.type)},206:jI,207:jI,209:function(e,t,n){return CI(t,n,e.elements)},210:function(e,t,n){return CI(t,n,e.properties)},211:function(e,t,n){return TI(t,e.expression)||TI(t,e.questionDotToken)||TI(t,e.name)},212:function(e,t,n){return TI(t,e.expression)||TI(t,e.questionDotToken)||TI(t,e.argumentExpression)},213:LI,214:LI,215:function(e,t,n){return TI(t,e.tag)||TI(t,e.questionDotToken)||CI(t,n,e.typeArguments)||TI(t,e.template)},216:function(e,t,n){return TI(t,e.type)||TI(t,e.expression)},217:function(e,t,n){return TI(t,e.expression)},220:function(e,t,n){return TI(t,e.expression)},221:function(e,t,n){return TI(t,e.expression)},222:function(e,t,n){return TI(t,e.expression)},224:function(e,t,n){return TI(t,e.operand)},229:function(e,t,n){return TI(t,e.asteriskToken)||TI(t,e.expression)},223:function(e,t,n){return TI(t,e.expression)},225:function(e,t,n){return TI(t,e.operand)},226:function(e,t,n){return TI(t,e.left)||TI(t,e.operatorToken)||TI(t,e.right)},234:function(e,t,n){return TI(t,e.expression)||TI(t,e.type)},235:function(e,t,n){return TI(t,e.expression)},238:function(e,t,n){return TI(t,e.expression)||TI(t,e.type)},236:function(e,t,n){return TI(t,e.name)},227:function(e,t,n){return TI(t,e.condition)||TI(t,e.questionToken)||TI(t,e.whenTrue)||TI(t,e.colonToken)||TI(t,e.whenFalse)},230:function(e,t,n){return TI(t,e.expression)},241:MI,268:MI,307:function(e,t,n){return CI(t,n,e.statements)||TI(t,e.endOfFileToken)},243:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.declarationList)},261:function(e,t,n){return CI(t,n,e.declarations)},244:function(e,t,n){return TI(t,e.expression)},245:function(e,t,n){return TI(t,e.expression)||TI(t,e.thenStatement)||TI(t,e.elseStatement)},246:function(e,t,n){return TI(t,e.statement)||TI(t,e.expression)},247:function(e,t,n){return TI(t,e.expression)||TI(t,e.statement)},248:function(e,t,n){return TI(t,e.initializer)||TI(t,e.condition)||TI(t,e.incrementor)||TI(t,e.statement)},249:function(e,t,n){return TI(t,e.initializer)||TI(t,e.expression)||TI(t,e.statement)},250:function(e,t,n){return TI(t,e.awaitModifier)||TI(t,e.initializer)||TI(t,e.expression)||TI(t,e.statement)},251:RI,252:RI,253:function(e,t,n){return TI(t,e.expression)},254:function(e,t,n){return TI(t,e.expression)||TI(t,e.statement)},255:function(e,t,n){return TI(t,e.expression)||TI(t,e.caseBlock)},269:function(e,t,n){return CI(t,n,e.clauses)},296:function(e,t,n){return TI(t,e.expression)||CI(t,n,e.statements)},297:function(e,t,n){return CI(t,n,e.statements)},256:function(e,t,n){return TI(t,e.label)||TI(t,e.statement)},257:function(e,t,n){return TI(t,e.expression)},258:function(e,t,n){return TI(t,e.tryBlock)||TI(t,e.catchClause)||TI(t,e.finallyBlock)},299:function(e,t,n){return TI(t,e.variableDeclaration)||TI(t,e.block)},170:function(e,t,n){return TI(t,e.expression)},263:BI,231:BI,264:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.heritageClauses)||CI(t,n,e.members)},265:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.typeParameters)||TI(t,e.type)},266:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.members)},306:function(e,t,n){return TI(t,e.name)||TI(t,e.initializer)},267:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.body)},271:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||TI(t,e.moduleReference)},272:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.importClause)||TI(t,e.moduleSpecifier)||TI(t,e.attributes)},273:function(e,t,n){return TI(t,e.name)||TI(t,e.namedBindings)},300:function(e,t,n){return CI(t,n,e.elements)},301:function(e,t,n){return TI(t,e.name)||TI(t,e.value)},270:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)},274:function(e,t,n){return TI(t,e.name)},280:function(e,t,n){return TI(t,e.name)},275:JI,279:JI,278:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.exportClause)||TI(t,e.moduleSpecifier)||TI(t,e.attributes)},276:zI,281:zI,277:function(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.expression)},228:function(e,t,n){return TI(t,e.head)||CI(t,n,e.templateSpans)},239:function(e,t,n){return TI(t,e.expression)||TI(t,e.literal)},203:function(e,t,n){return TI(t,e.head)||CI(t,n,e.templateSpans)},204:function(e,t,n){return TI(t,e.type)||TI(t,e.literal)},167:function(e,t,n){return TI(t,e.expression)},298:function(e,t,n){return CI(t,n,e.types)},233:function(e,t,n){return TI(t,e.expression)||CI(t,n,e.typeArguments)},283:function(e,t,n){return TI(t,e.expression)},282:function(e,t,n){return CI(t,n,e.modifiers)},355:function(e,t,n){return CI(t,n,e.elements)},284:function(e,t,n){return TI(t,e.openingElement)||CI(t,n,e.children)||TI(t,e.closingElement)},288:function(e,t,n){return TI(t,e.openingFragment)||CI(t,n,e.children)||TI(t,e.closingFragment)},285:qI,286:qI,292:function(e,t,n){return CI(t,n,e.properties)},291:function(e,t,n){return TI(t,e.name)||TI(t,e.initializer)},293:function(e,t,n){return TI(t,e.expression)},294:function(e,t,n){return TI(t,e.dotDotDotToken)||TI(t,e.expression)},287:function(e,t,n){return TI(t,e.tagName)},295:function(e,t,n){return TI(t,e.namespace)||TI(t,e.name)},190:UI,191:UI,309:UI,315:UI,314:UI,316:UI,318:UI,317:function(e,t,n){return CI(t,n,e.parameters)||TI(t,e.type)},320:function(e,t,n){return("string"==typeof e.comment?void 0:CI(t,n,e.comment))||CI(t,n,e.tags)},347:function(e,t,n){return TI(t,e.tagName)||TI(t,e.name)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},310:function(e,t,n){return TI(t,e.name)},311:function(e,t,n){return TI(t,e.left)||TI(t,e.right)},341:VI,348:VI,330:function(e,t,n){return TI(t,e.tagName)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},329:function(e,t,n){return TI(t,e.tagName)||TI(t,e.class)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},328:function(e,t,n){return TI(t,e.tagName)||TI(t,e.class)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},345:function(e,t,n){return TI(t,e.tagName)||TI(t,e.constraint)||CI(t,n,e.typeParameters)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},346:function(e,t,n){return TI(t,e.tagName)||(e.typeExpression&&309===e.typeExpression.kind?TI(t,e.typeExpression)||TI(t,e.fullName)||("string"==typeof e.comment?void 0:CI(t,n,e.comment)):TI(t,e.fullName)||TI(t,e.typeExpression)||("string"==typeof e.comment?void 0:CI(t,n,e.comment)))},338:function(e,t,n){return TI(t,e.tagName)||TI(t,e.fullName)||TI(t,e.typeExpression)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},342:WI,344:WI,343:WI,340:WI,350:WI,349:WI,339:WI,323:function(e,t,n){return h(e.typeParameters,t)||h(e.parameters,t)||TI(t,e.type)},324:$I,325:$I,326:$I,322:function(e,t,n){return h(e.jsDocPropertyTags,t)},327:HI,332:HI,333:HI,334:HI,335:HI,336:HI,331:HI,337:HI,351:function(e,t,n){return TI(t,e.tagName)||TI(t,e.importClause)||TI(t,e.moduleSpecifier)||TI(t,e.attributes)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))},354:function(e,t,n){return TI(t,e.expression)}};function AI(e,t,n){return CI(t,n,e.typeParameters)||CI(t,n,e.parameters)||TI(t,e.type)}function II(e,t,n){return CI(t,n,e.types)}function OI(e,t,n){return TI(t,e.type)}function jI(e,t,n){return CI(t,n,e.elements)}function LI(e,t,n){return TI(t,e.expression)||TI(t,e.questionDotToken)||CI(t,n,e.typeArguments)||CI(t,n,e.arguments)}function MI(e,t,n){return CI(t,n,e.statements)}function RI(e,t,n){return TI(t,e.label)}function BI(e,t,n){return CI(t,n,e.modifiers)||TI(t,e.name)||CI(t,n,e.typeParameters)||CI(t,n,e.heritageClauses)||CI(t,n,e.members)}function JI(e,t,n){return CI(t,n,e.elements)}function zI(e,t,n){return TI(t,e.propertyName)||TI(t,e.name)}function qI(e,t,n){return TI(t,e.tagName)||CI(t,n,e.typeArguments)||TI(t,e.attributes)}function UI(e,t,n){return TI(t,e.type)}function VI(e,t,n){return TI(t,e.tagName)||(e.isNameFirst?TI(t,e.name)||TI(t,e.typeExpression):TI(t,e.typeExpression)||TI(t,e.name))||("string"==typeof e.comment?void 0:CI(t,n,e.comment))}function WI(e,t,n){return TI(t,e.tagName)||TI(t,e.typeExpression)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))}function $I(e,t,n){return TI(t,e.name)}function HI(e,t,n){return TI(t,e.tagName)||("string"==typeof e.comment?void 0:CI(t,n,e.comment))}function KI(e,t,n){if(void 0===e||e.kind<=165)return;const r=FI[e.kind];return void 0===r?void 0:r(e,t,n)}function GI(e,t,n){const r=XI(e),i=[];for(;i.length=0;--t)r.push(e[t]),i.push(o)}else{const n=t(e,o);if(n){if("skip"===n)continue;return n}if(e.kind>=166)for(const t of XI(e))r.push(t),i.push(e)}}}function XI(e){const t=[];return KI(e,n,n),t;function n(e){t.unshift(e)}}function QI(e){e.externalModuleIndicator=NI(e)}function YI(e,t,n,r=!1,i){var o,a,s,c;let l;null==(o=cr)||o.push(cr.Phase.Parse,"createSourceFile",{path:e},!0),gr("beforeParse"),null==(a=ir)||a.logStartParseSourceFile(e);const{languageVersion:_,setExternalModuleIndicator:u,impliedNodeFormat:d,jsDocParsingMode:p}="object"==typeof n?n:{languageVersion:n};if(100===_)l=EI.parseSourceFile(e,t,_,void 0,r,6,ft,p);else{const n=void 0===d?u:e=>(e.impliedNodeFormat=d,(u||QI)(e));l=EI.parseSourceFile(e,t,_,void 0,r,i,n,p)}return null==(s=ir)||s.logStopParseSourceFile(),gr("afterParse"),hr("Parse","beforeParse","afterParse"),null==(c=cr)||c.pop(),l}function ZI(e,t){return EI.parseIsolatedEntityName(e,t)}function eO(e,t){return EI.parseJsonText(e,t)}function tO(e){return void 0!==e.externalModuleIndicator}function nO(e,t,n,r=!1){const i=aO.updateSourceFile(e,t,n,r);return i.flags|=12582912&e.flags,i}function rO(e,t,n){const r=EI.JSDocParser.parseIsolatedJSDocComment(e,t,n);return r&&r.jsDoc&&EI.fixupParentReferences(r.jsDoc),r}function iO(e,t,n){return EI.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}(e=>{var t,n,r,i,o,a=Fs(99,!0),s=40960;function c(e){return x++,e}var l,_,u,d,m,g,h,y,v,b,x,S,k,T,C,w,D=KC(11,{createBaseSourceFileNode:e=>c(new o(e,0,0)),createBaseIdentifierNode:e=>c(new r(e,0,0)),createBasePrivateIdentifierNode:e=>c(new i(e,0,0)),createBaseTokenNode:e=>c(new n(e,0,0)),createBaseNode:e=>c(new t(e,0,0))}),{createNodeArray:P,createNumericLiteral:E,createStringLiteral:F,createLiteralLikeNode:A,createIdentifier:I,createPrivateIdentifier:O,createToken:j,createArrayLiteralExpression:L,createObjectLiteralExpression:M,createPropertyAccessExpression:R,createPropertyAccessChain:B,createElementAccessExpression:J,createElementAccessChain:z,createCallExpression:q,createCallChain:U,createNewExpression:V,createParenthesizedExpression:W,createBlock:H,createVariableStatement:K,createExpressionStatement:G,createIfStatement:X,createWhileStatement:Q,createForStatement:Y,createForOfStatement:Z,createVariableDeclaration:te,createVariableDeclarationList:re}=D,ie=!0,oe=!1;function ae(e,t,n=2,r,i=!1){se(e,t,n,r,6,0),_=w,We();const o=Je();let a,s;if(1===qe())a=St([],o,o),s=ht();else{let e;for(;1!==qe();){let t;switch(qe()){case 23:t=di();break;case 112:case 97:case 106:t=ht();break;case 41:t=tt(()=>9===We()&&59!==We())?Jr():fi();break;case 9:case 11:if(tt(()=>59!==We())){t=hn();break}default:t=fi()}e&&ct(e)?e.push(t):e?e=[e,t]:(e=t,1!==qe()&&je(Ca.Unexpected_token))}const t=ct(e)?kt(L(e),o):Tn.checkDefined(e),n=G(t);kt(n,o),a=St([n],o),s=gt(1,Ca.Unexpected_token)}const c=de(e,2,6,!1,a,s,_,ft);i&&ue(c),c.nodeCount=x,c.identifierCount=k,c.identifiers=S,c.parseDiagnostics=pS(h,c),y&&(c.jsDocDiagnostics=pS(y,c));const l=c;return ce(),l}function se(e,s,c,p,f,y){switch(t=nS.getNodeConstructor(),n=nS.getTokenConstructor(),r=nS.getIdentifierConstructor(),i=nS.getPrivateIdentifierConstructor(),o=nS.getSourceFileConstructor(),l=na(e),u=s,d=c,v=p,m=f,g=DS(f),h=[],T=0,S=new Map,k=0,x=0,_=0,ie=!0,m){case 1:case 2:w=524288;break;case 6:w=134742016;break;default:w=0}oe=!1,a.setText(u),a.setOnError(Be),a.setScriptTarget(d),a.setLanguageVariant(g),a.setScriptKind(m),a.setJSDocParsingMode(y)}function ce(){a.clearCommentDirectives(),a.setText(""),a.setOnError(void 0),a.setScriptKind(0),a.setJSDocParsingMode(0),u=void 0,d=void 0,v=void 0,m=void 0,g=void 0,_=0,h=void 0,y=void 0,T=0,S=void 0,C=void 0,ie=!0}e.parseSourceFile=function(e,t,n,r,i=!1,o,s,c=0){var d;if(6===(o=Lk(e,o))){const o=ae(e,t,n,r,i);return Lj(o,null==(d=o.statements[0])?void 0:d.expression,o.parseDiagnostics,!1,void 0),o.referencedFiles=p,o.typeReferenceDirectives=p,o.libReferenceDirectives=p,o.amdDependencies=p,o.hasNoDefaultLib=!1,o.pragmas=f,o}se(e,t,n,r,o,c);const m=function(e,t,n,r,i){const o=lO(l);o&&(w|=33554432);_=w,We();const s=Yt(0,Mi);Tn.assert(1===qe());const c=ze(),d=_e(ht(),c),p=de(l,e,n,o,s,d,_,r);uO(p,u),dO(p,f),p.commentDirectives=a.getCommentDirectives(),p.nodeCount=x,p.identifierCount=k,p.identifiers=S,p.parseDiagnostics=pS(h,p),p.jsDocParsingMode=i,y&&(p.jsDocDiagnostics=pS(y,p));t&&ue(p);return p;function f(e,t,n){h.push(_S(l,u,e,t,n))}}(n,i,o,s||QI,c);return ce(),m},e.parseIsolatedEntityName=function(e,t){se("",e,t,void 0,1,0),We();const n=cn(!0),r=1===qe()&&!h.length;return ce(),r?n:void 0},e.parseJsonText=ae;let le=!1;function _e(e,t){if(!t)return e;Tn.assert(!e.jsDoc);const n=$(Cf(e,u),t=>qo.parseJSDocComment(e,t.pos,t.end-t.pos));return n.length&&(e.jsDoc=n),le&&(le=!1,e.flags|=536870912),e}function ue(e){VT(e,!0)}function de(e,t,n,r,i,o,s,c){let l=D.createSourceFile(i,o,s);if(JT(l,0,u.length),_(l),!r&&tO(l)&&67108864&l.transformFlags){const e=l;l=function(e){const t=v,n=aO.createSyntaxCursor(e);v={currentNode:function(e){const t=n.currentNode(e);return ie&&t&&c(t)&&cO(t),t}};const r=[],i=h;h=[];let o=0,s=l(e.statements,0);for(;-1!==s;){const t=e.statements[o],n=e.statements[s];ge(r,e.statements,o,s),o=_(e.statements,s);const c=N(i,e=>e.start>=t.pos),u=c>=0?N(i,e=>e.start>=n.pos,c):-1;c>=0&&ge(h,i,c,u>=0?u:void 0),et(()=>{const t=w;for(w|=65536,a.resetTokenState(n.pos),We();1!==qe();){const t=a.getTokenFullStart(),n=Zt(0,Mi);if(r.push(n),t===a.getTokenFullStart()&&We(),o>=0){const t=e.statements[o];if(n.end===t.pos)break;n.end>t.pos&&(o=_(e.statements,o+1))}}w=t},2),s=o>=0?l(e.statements,o):-1}if(o>=0){const t=e.statements[o];ge(r,e.statements,o);const n=N(i,e=>e.start>=t.pos);n>=0&&ge(h,i,n)}return v=t,D.updateSourceFile(e,vI(P(r),e.statements));function c(e){return!(65536&e.flags||!(67108864&e.transformFlags))}function l(e,t){for(let n=t;n118}function it(){return 80===qe()||(127!==qe()||!Ee())&&((135!==qe()||!Oe())&&qe()>118)}function ot(e,t,n=!0){return qe()===e?(n&&We(),!0):(t?je(t):je(Ca._0_expected,Va(e)),!1)}e.fixupParentReferences=ue;const at=Object.keys(Da).filter(e=>e.length>2);function st(e){if(sP(e))return void Me(ds(u,e.template.pos),e.template.end,Ca.Module_declaration_names_may_only_use_or_quoted_strings);const t=QN(e)?wc(e):void 0;if(!t||!Es(t,d))return void je(Ca._0_expected,Va(27));const n=ds(u,e.pos);switch(t){case"const":case"let":case"var":return void Me(n,e.end,Ca.Variable_declaration_not_allowed_at_this_location);case"declare":return;case"interface":return void lt(Ca.Interface_name_cannot_be_0,Ca.Interface_must_be_given_a_name,19);case"is":return void Me(n,a.getTokenStart(),Ca.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);case"module":case"namespace":return void lt(Ca.Namespace_name_cannot_be_0,Ca.Namespace_must_be_given_a_name,19);case"type":return void lt(Ca.Type_alias_name_cannot_be_0,Ca.Type_alias_must_be_given_a_name,64)}const r=Kt(t,at,yt)??function(e){for(const t of at)if(e.length>t.length+2&&ln(e,t))return`${t} ${e.slice(t.length)}`;return}(t);r?Me(n,e.end,Ca.Unknown_keyword_or_identifier_Did_you_mean_0,r):0!==qe()&&Me(n,e.end,Ca.Unexpected_keyword_or_identifier)}function lt(e,t,n){qe()===n?je(t):je(e,a.getTokenValue())}function _t(e){return qe()===e?($e(),!0):(Tn.assert(Mh(e)),je(Ca._0_expected,Va(e)),!1)}function ut(e,t,n,r){if(qe()===t)return void We();const i=je(Ca._0_expected,Va(t));n&&i&&ST(i,_S(l,u,r,1,Ca.The_parser_expected_to_find_a_1_to_match_the_0_token_here,Va(e),Va(t)))}function dt(e){return qe()===e&&(We(),!0)}function pt(e){if(qe()===e)return ht()}function mt(e){if(qe()===e)return function(){const e=Je(),t=qe();return $e(),kt(j(t),e)}()}function gt(e,t,n){return pt(e)||Tt(e,!1,t||Ca._0_expected,n||Va(e))}function ht(){const e=Je(),t=qe();return We(),kt(j(t),e)}function vt(){return 27===qe()||(20===qe()||1===qe()||a.hasPrecedingLineBreak())}function bt(){return!!vt()&&(27===qe()&&We(),!0)}function xt(){return bt()||ot(27)}function St(e,t,n,r){const i=P(e,r);return BT(i,t,n??a.getTokenFullStart()),i}function kt(e,t,n){return BT(e,t,n??a.getTokenFullStart()),w&&(e.flags|=w),oe&&(oe=!1,e.flags|=262144),e}function Tt(e,t,n,...r){t?Le(a.getTokenFullStart(),0,n,...r):n&&je(n,...r);const i=Je();return kt(80===e?I("",void 0):Hl(e)?D.createTemplateLiteralLikeNode(e,"","",void 0):9===e?E("",void 0):11===e?F("",void 0):282===e?D.createMissingDeclaration():j(e),i)}function Ct(e){let t=S.get(e);return void 0===t&&S.set(e,t=e),t}function wt(e,t,n){if(e){k++;const e=Je(),t=qe(),n=Ct(a.getTokenValue()),r=a.hasExtendedUnicodeEscape();return Ue(),kt(I(n,t,r),e)}if(81===qe())return je(n||Ca.Private_identifiers_are_not_allowed_outside_class_bodies),wt(!0);if(0===qe()&&a.tryScan(()=>80===a.reScanInvalidIdentifier()))return wt(!0);k++;const r=1===qe(),i=a.isReservedWord(),o=a.getTokenText(),s=i?Ca.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:Ca.Identifier_expected;return Tt(80,r,t||s,o)}function Nt(e){return wt(rt(),void 0,e)}function Dt(e,t){return wt(it(),e,t)}function Pt(e){return wt(wa(qe()),e)}function Et(){return(a.hasUnicodeEscape()||a.hasExtendedUnicodeEscape())&&je(Ca.Unicode_escape_sequence_cannot_appear_here),wt(wa(qe()))}function Ft(){return wa(qe())||11===qe()||9===qe()}function At(e){if(11===qe()||9===qe()){const e=hn();return e.text=Ct(e.text),e}return e&&23===qe()?function(){const e=Je();ot(23);const t=Se(Tr);return ot(24),kt(D.createComputedPropertyName(t),e)}():81===qe()?Ot():Pt()}function It(){return At(!0)}function Ot(){const e=Je(),t=O(Ct(a.getTokenValue()));return We(),kt(t,e)}function jt(e){return qe()===e&&nt(Mt)}function Lt(){return We(),!a.hasPrecedingLineBreak()&&Jt()}function Mt(){switch(qe()){case 87:return 94===We();case 95:return We(),90===qe()?tt(zt):156===qe()?tt(Bt):Rt();case 90:return zt();case 126:case 139:case 153:return We(),Jt();default:return Lt()}}function Rt(){return 60===qe()||42!==qe()&&130!==qe()&&19!==qe()&&Jt()}function Bt(){return We(),Rt()}function Jt(){return 23===qe()||19===qe()||42===qe()||26===qe()||Ft()}function zt(){return We(),86===qe()||100===qe()||120===qe()||60===qe()||128===qe()&&tt(Ci)||134===qe()&&tt(wi)}function qt(e,t){if(en(e))return!0;switch(e){case 0:case 1:case 3:return!(27===qe()&&t)&&Ei();case 2:return 84===qe()||90===qe();case 4:return tt(zn);case 5:return tt(ao)||27===qe()&&!t;case 6:return 23===qe()||Ft();case 12:switch(qe()){case 23:case 42:case 26:case 25:return!0;default:return Ft()}case 18:return Ft();case 9:return 23===qe()||26===qe()||Ft();case 24:return wa(qe())||11===qe();case 7:return 19===qe()?tt(Ut):t?it()&&!Ht():Sr()&&!Ht();case 8:return Hi();case 10:return 28===qe()||26===qe()||Hi();case 19:return 103===qe()||87===qe()||it();case 15:switch(qe()){case 28:case 25:return!0}case 11:return 26===qe()||kr();case 16:return En(!1);case 17:return En(!0);case 20:case 21:return 28===qe()||ar();case 22:return xo();case 23:return(161!==qe()||!tt(zi))&&wa(qe());case 13:return wa(qe())||19===qe();case 14:case 25:return!0;case 26:return Tn.fail("ParsingContext.Count used as a context");default:Tn.assertNever(e,"Non-exhaustive case in 'isListElement'.")}}function Ut(){if(Tn.assert(19===qe()),20===We()){const e=We();return 28===e||19===e||96===e||119===e}return!0}function Vt(){return We(),it()}function Wt(){return We(),wa(qe())}function $t(){return We(),Na(qe())}function Ht(){return(119===qe()||96===qe())&&tt(Gt)}function Gt(){return We(),kr()}function Xt(){return We(),ar()}function Qt(e){if(1===qe())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return 20===qe();case 3:return 20===qe()||84===qe()||90===qe();case 7:return 19===qe()||96===qe()||119===qe();case 8:return function(){if(vt())return!0;if(Or(qe()))return!0;if(39===qe())return!0;return!1}();case 19:return 32===qe()||21===qe()||19===qe()||96===qe()||119===qe();case 11:return 22===qe()||27===qe();case 15:case 21:case 10:return 24===qe();case 17:case 16:case 18:return 22===qe()||24===qe();case 20:return 28!==qe();case 22:return 19===qe()||20===qe();case 13:return 32===qe()||44===qe();case 14:return 30===qe()&&tt(Do);default:return!1}}function Yt(e,t){const n=T;T|=1<=0)}function on(e){return 6===e?Ca.An_enum_member_name_must_be_followed_by_a_or:void 0}function an(){const e=St([],Je());return e.isMissingList=!0,e}function sn(e,t,n,r){if(ot(n)){const n=rn(e,t);return ot(r),n}return an()}function cn(e,t){const n=Je();let r=e?Pt(t):Dt(t);for(;dt(25)&&30!==qe();)r=kt(D.createQualifiedName(r,un(e,!1,!0)),n);return r}function _n(e,t){return kt(D.createQualifiedName(e,t),e.pos)}function un(e,t,n){if(a.hasPrecedingLineBreak()&&wa(qe())){if(tt(Ti))return Tt(80,!0,Ca.Identifier_expected)}if(81===qe()){const e=Ot();return t?e:Tt(80,!0,Ca.Identifier_expected)}return e?n?Pt():Et():Dt()}function dn(e){const t=Je();return kt(D.createTemplateExpression(yn(e),function(e){const t=Je(),n=[];let r;do{r=gn(e),n.push(r)}while(17===r.literal.kind);return St(n,t)}(e)),t)}function pn(){const e=Je();return kt(D.createTemplateLiteralType(yn(!1),function(){const e=Je(),t=[];let n;do{n=fn(),t.push(n)}while(17===n.literal.kind);return St(t,e)}()),e)}function fn(){const e=Je();return kt(D.createTemplateLiteralTypeSpan(br(),mn(!1)),e)}function mn(e){return 20===qe()?(Ge(e),function(){const e=vn(qe());return Tn.assert(17===e.kind||18===e.kind,"Template fragment has wrong token kind"),e}()):gt(18,Ca._0_expected,Va(20))}function gn(e){const t=Je();return kt(D.createTemplateSpan(Se(Tr),mn(e)),t)}function hn(){return vn(qe())}function yn(e){!e&&26656&a.getTokenFlags()&&Ge(!1);const t=vn(qe());return Tn.assert(16===t.kind,"Template head has wrong token kind"),t}function vn(e){const t=Je(),n=Hl(e)?D.createTemplateLiteralLikeNode(e,a.getTokenValue(),function(e){const t=15===e||18===e,n=a.getTokenText();return n.substring(1,n.length-(a.isUnterminated()?0:t?1:2))}(e),7176&a.getTokenFlags()):9===e?E(a.getTokenValue(),a.getNumericLiteralFlags()):11===e?F(a.getTokenValue(),void 0,a.hasExtendedUnicodeEscape()):Vl(e)?A(e,a.getTokenValue()):Tn.fail();return a.hasExtendedUnicodeEscape()&&(n.hasExtendedUnicodeEscape=!0),a.isUnterminated()&&(n.isUnterminated=!0),We(),kt(n,t)}function bn(){return cn(!0,Ca.Type_expected)}function xn(){if(!a.hasPrecedingLineBreak()&&30===Xe())return sn(20,br,30,32)}function Sn(){const e=Je();return kt(D.createTypeReferenceNode(bn(),xn()),e)}function kn(e){switch(e.kind){case 183:return Ld(e.typeName);case 184:case 185:{const{parameters:t,type:n}=e;return!!t.isMissingList||kn(n)}case 196:return kn(e.type);default:return!1}}function Cn(){const e=Je();return We(),kt(D.createThisTypeNode(),e)}function wn(){const e=Je();let t;return 110!==qe()&&105!==qe()||(t=Pt(),ot(59)),kt(D.createParameterDeclaration(void 0,void 0,t,void 0,Nn(),void 0),e)}function Nn(){a.setSkipJsDocLeadingAsterisks(!0);const e=Je();if(dt(144)){const t=D.createJSDocNamepathType(void 0);e:for(;;)switch(qe()){case 20:case 1:case 28:case 5:break e;default:$e()}return a.setSkipJsDocLeadingAsterisks(!1),kt(t,e)}const t=dt(26);let n=yr();return a.setSkipJsDocLeadingAsterisks(!1),t&&(n=kt(D.createJSDocVariadicType(n),e)),64===qe()?(We(),kt(D.createJSDocOptionalType(n),e)):n}function Dn(){const e=Je(),t=uo(!1,!0),n=Dt();let r,i;dt(96)&&(ar()||!kr()?r=br():i=zr());const o=dt(64)?br():void 0,a=D.createTypeParameterDeclaration(t,n,r,o);return a.expression=i,kt(a,e)}function Pn(){if(30===qe())return sn(19,Dn,30,32)}function En(e){return 26===qe()||Hi()||s_(qe())||60===qe()||ar(!e)}function Fn(e){return An(e)}function An(e,t=!0){const n=Je(),r=ze(),i=e?we(()=>uo(!0)):Ne(()=>uo(!0));if(110===qe()){const e=D.createParameterDeclaration(i,void 0,wt(!0),void 0,xr(),void 0),t=Ce(i);return t&&Re(t,Ca.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),_e(kt(e,n),r)}const o=ie;ie=!1;const a=pt(26);if(!t&&!rt()&&23!==qe()&&19!==qe())return;const s=_e(kt(D.createParameterDeclaration(i,a,function(e){const t=Ki(Ca.Private_identifiers_cannot_be_used_as_parameters);return 0===vd(t)&&!ee(e)&&s_(qe())&&We(),t}(i),pt(58),xr(),Cr()),n),r);return ie=o,s}function In(e,t){if(function(e,t){if(39===e)return ot(e),!0;if(dt(59))return!0;if(t&&39===qe())return je(Ca._0_expected,Va(59)),We(),!0;return!1}(e,t))return ke(yr)}function On(e,t){const n=Ee(),r=Oe();he(!!(1&e)),ve(!!(2&e));const i=32&e?rn(17,wn):rn(16,()=>t?Fn(r):An(r,!1));return he(n),ve(r),i}function jn(e){if(!ot(21))return an();const t=On(e,!0);return ot(22),t}function Ln(){dt(28)||xt()}function Mn(e){const t=Je(),n=ze();180===e&&ot(105);const r=Pn(),i=jn(4),o=In(59,!0);Ln();return _e(kt(179===e?D.createCallSignature(r,i,o):D.createConstructSignature(r,i,o),t),n)}function Rn(){return 23===qe()&&tt(Bn)}function Bn(){if(We(),26===qe()||24===qe())return!0;if(s_(qe())){if(We(),it())return!0}else{if(!it())return!1;We()}return 59===qe()||28===qe()||58===qe()&&(We(),59===qe()||28===qe()||24===qe())}function Jn(e,t,n){const r=sn(16,()=>Fn(!1),23,24),i=xr();Ln();return _e(kt(D.createIndexSignature(n,r,i),e),t)}function zn(){if(21===qe()||30===qe()||139===qe()||153===qe())return!0;let e=!1;for(;s_(qe());)e=!0,We();return 23===qe()||(Ft()&&(e=!0,We()),!!e&&(21===qe()||30===qe()||58===qe()||59===qe()||28===qe()||vt()))}function qn(){if(21===qe()||30===qe())return Mn(179);if(105===qe()&&tt(Un))return Mn(180);const e=Je(),t=ze(),n=uo(!1);return jt(139)?oo(e,t,n,177,4):jt(153)?oo(e,t,n,178,4):Rn()?Jn(e,t,n):function(e,t,n){const r=It(),i=pt(58);let o;if(21===qe()||30===qe()){const e=Pn(),t=jn(4),a=In(59,!0);o=D.createMethodSignature(n,r,i,e,t,a)}else{const e=xr();o=D.createPropertySignature(n,r,i,e),64===qe()&&(o.initializer=Cr())}return Ln(),_e(kt(o,e),t)}(e,t,n)}function Un(){return We(),21===qe()||30===qe()}function Vn(){return 25===We()}function Wn(){switch(We()){case 21:case 30:case 25:return!0}return!1}function $n(){let e;return ot(19)?(e=Yt(4,qn),ot(20)):e=an(),e}function Hn(){return We(),40===qe()||41===qe()?148===We():(148===qe()&&We(),23===qe()&&Vt()&&103===We())}function Kn(){const e=Je();let t;ot(19),148!==qe()&&40!==qe()&&41!==qe()||(t=ht(),148!==t.kind&&ot(148)),ot(23);const n=function(){const e=Je(),t=Pt();ot(103);const n=br();return kt(D.createTypeParameterDeclaration(void 0,t,n,void 0),e)}(),r=dt(130)?br():void 0;let i;ot(24),58!==qe()&&40!==qe()&&41!==qe()||(i=ht(),58!==i.kind&&ot(58));const o=xr();xt();const a=Yt(4,qn);return ot(20),kt(D.createMappedTypeNode(t,n,r,i,o,a),e)}function Gn(){const e=Je();if(dt(26))return kt(D.createRestTypeNode(br()),e);const t=br();if(sF(t)&&t.pos===t.type.pos){const e=D.createOptionalTypeNode(t.type);return vI(e,t),e.flags=t.flags,e}return t}function Xn(){return 59===We()||58===qe()&&59===We()}function Qn(){return 26===qe()?wa(We())&&Xn():wa(qe())&&Xn()}function Yn(){if(tt(Qn)){const e=Je(),t=ze(),n=pt(26),r=Pt(),i=pt(58);ot(59);const o=Gn();return _e(kt(D.createNamedTupleMember(n,r,i,o),e),t)}return Gn()}function Zn(){const e=Je(),t=ze(),n=function(){let e;if(128===qe()){const t=Je();We(),e=St([kt(j(128),t)],t)}return e}(),r=dt(105);Tn.assert(!n||r,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");const i=Pn(),o=jn(4),a=In(39,!1);return _e(kt(r?D.createConstructorTypeNode(n,i,o,a):D.createFunctionTypeNode(i,o,a),e),t)}function er(){const e=ht();return 25===qe()?void 0:e}function tr(e){const t=Je();e&&We();let n=112===qe()||97===qe()||106===qe()?ht():vn(qe());return e&&(n=kt(D.createPrefixUnaryExpression(41,n),t)),kt(D.createLiteralTypeNode(n),t)}function nr(){return We(),102===qe()}function rr(){_|=4194304;const e=Je(),t=dt(114);ot(102),ot(21);const n=br();let r;if(dt(28)){const e=a.getTokenStart();ot(19);const t=qe();if(118===t||132===t?We():je(Ca._0_expected,Va(118)),ot(59),r=Ao(t,!0),!ot(20)){const t=Pe(h);t&&t.code===Ca._0_expected.code&&ST(t,_S(l,u,e,1,Ca.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}ot(22);const i=dt(25)?bn():void 0,o=xn();return kt(D.createImportTypeNode(n,r,i,o,t),e)}function ir(){return We(),9===qe()||10===qe()}function or(){switch(qe()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return nt(er)||Sn();case 67:a.reScanAsteriskEqualsToken();case 42:return function(){const e=Je();return We(),kt(D.createJSDocAllType(),e)}();case 61:a.reScanQuestionToken();case 58:return function(){const e=Je();return We(),28===qe()||20===qe()||22===qe()||32===qe()||64===qe()||52===qe()?kt(D.createJSDocUnknownType(),e):kt(D.createJSDocNullableType(br(),!1),e)}();case 100:return function(){const e=Je(),t=ze();if(nt(wo)){const n=jn(36),r=In(59,!1);return _e(kt(D.createJSDocFunctionType(n,r),e),t)}return kt(D.createTypeReferenceNode(Pt(),void 0),e)}();case 54:return function(){const e=Je();return We(),kt(D.createJSDocNonNullableType(or(),!1),e)}();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return tr();case 41:return tt(ir)?tr(!0):Sn();case 116:return ht();case 110:{const t=Cn();return 142!==qe()||a.hasPrecedingLineBreak()?t:(e=t,We(),kt(D.createTypePredicateNode(void 0,e,br()),e.pos))}case 114:return tt(nr)?rr():function(){const e=Je();ot(114);const t=cn(!0),n=a.hasPrecedingLineBreak()?void 0:bo();return kt(D.createTypeQueryNode(t,n),e)}();case 19:return tt(Hn)?Kn():function(){const e=Je();return kt(D.createTypeLiteralNode($n()),e)}();case 23:return function(){const e=Je();return kt(D.createTupleTypeNode(sn(21,Yn,23,24)),e)}();case 21:return function(){const e=Je();ot(21);const t=br();return ot(22),kt(D.createParenthesizedType(t),e)}();case 102:return rr();case 131:return tt(Ti)?function(){const e=Je(),t=gt(131),n=110===qe()?Cn():Dt(),r=dt(142)?br():void 0;return kt(D.createTypePredicateNode(t,n,r),e)}():Sn();case 16:return pn();default:return Sn()}var e}function ar(e){switch(qe()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!e;case 41:return!e&&tt(ir);case 21:return!e&&tt(sr);default:return it()}}function sr(){return We(),22===qe()||En(!1)||ar()}function cr(){const e=Je();let t=or();for(;!a.hasPrecedingLineBreak();)switch(qe()){case 54:We(),t=kt(D.createJSDocNonNullableType(t,!0),e);break;case 58:if(tt(Xt))return t;We(),t=kt(D.createJSDocNullableType(t,!0),e);break;case 23:if(ot(23),ar()){const n=br();ot(24),t=kt(D.createIndexedAccessTypeNode(t,n),e)}else ot(24),t=kt(D.createArrayTypeNode(t),e);break;default:return t}return t}function lr(){if(dt(96)){const e=Te(br);if(Ae()||58!==qe())return e}}function _r(){const e=Je();return ot(140),kt(D.createInferTypeNode(function(){const e=Je(),t=Dt(),n=nt(lr);return kt(D.createTypeParameterDeclaration(void 0,t,n),e)}()),e)}function ur(){const e=qe();switch(e){case 143:case 158:case 148:return function(e){const t=Je();return ot(e),kt(D.createTypeOperatorNode(e,ur()),t)}(e);case 140:return _r()}return ke(cr)}function dr(e){if(gr()){const t=Zn();let n;return n=ED(t)?e?Ca.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:Ca.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:e?Ca.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:Ca.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,Re(t,n),t}}function pr(e,t,n){const r=Je(),i=52===e,o=dt(e);let a=o&&dr(i)||t();if(qe()===e||o){const o=[a];for(;dt(e);)o.push(dr(i)||t());a=kt(n(St(o,r)),r)}return a}function fr(){return pr(51,ur,D.createIntersectionTypeNode)}function mr(){return We(),105===qe()}function gr(){return 30===qe()||(!(21!==qe()||!tt(hr))||(105===qe()||128===qe()&&tt(mr)))}function hr(){if(We(),22===qe()||26===qe())return!0;if(function(){if(s_(qe())&&uo(!1),it()||110===qe())return We(),!0;if(23===qe()||19===qe()){const e=h.length;return Ki(),e===h.length}return!1}()){if(59===qe()||28===qe()||58===qe()||64===qe())return!0;if(22===qe()&&(We(),39===qe()))return!0}return!1}function yr(){const e=Je(),t=it()&&nt(vr),n=br();return t?kt(D.createTypePredicateNode(void 0,t,n),e):n}function vr(){const e=Dt();if(142===qe()&&!a.hasPrecedingLineBreak())return We(),e}function br(){if(81920&w)return be(81920,br);if(gr())return Zn();const e=Je(),t=pr(52,fr,D.createUnionTypeNode);if(!Ae()&&!a.hasPrecedingLineBreak()&&dt(96)){const n=Te(br);ot(58);const r=ke(br);ot(59);const i=ke(br);return kt(D.createConditionalTypeNode(t,n,r,i),e)}return t}function xr(){return dt(59)?br():void 0}function Sr(){switch(qe()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return tt(Wn);default:return it()}}function kr(){if(Sr())return!0;switch(qe()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return!!Lr()||it()}}function Tr(){const e=Ie();e&&ye(!1);const t=Je();let n,r=wr(!0);for(;n=pt(28);)r=Rr(r,n,wr(!0),t);return e&&ye(!0),r}function Cr(){return dt(64)?wr(!0):void 0}function wr(e){if(function(){if(127===qe())return!!Ee()||tt(Ni);return!1}())return function(){const e=Je();return We(),a.hasPrecedingLineBreak()||42!==qe()&&!kr()?kt(D.createYieldExpression(void 0,void 0),e):kt(D.createYieldExpression(pt(42),wr(!0)),e)}();const t=function(e){const t=function(){if(21===qe()||30===qe()||134===qe())return tt(Pr);if(39===qe())return 1;return 0}();if(0===t)return;return 1===t?Fr(!0,!0):nt(()=>function(e){const t=a.getTokenStart();if(null==C?void 0:C.has(t))return;const n=Fr(!1,e);n||(C||(C=new Set)).add(t);return n}(e))}(e)||function(e){if(134===qe()&&1===tt(Er)){const t=Je(),n=ze(),r=po();return Dr(t,Ir(0),e,n,r)}return}(e);if(t)return t;const n=Je(),r=ze(),i=Ir(0);return 80===i.kind&&39===qe()?Dr(n,i,e,r,void 0):X_(i)&&yb(Ke())?Rr(i,ht(),wr(e),n):function(e,t,n){const r=pt(58);if(!r)return e;let i;return kt(D.createConditionalExpression(e,r,be(s,()=>wr(!1)),i=gt(59),Md(i)?wr(n):Tt(80,!1,Ca._0_expected,Va(59))),t)}(i,n,e)}function Nr(){return We(),!a.hasPrecedingLineBreak()&&it()}function Dr(e,t,n,r,i){Tn.assert(39===qe(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>");const o=D.createParameterDeclaration(void 0,void 0,t,void 0,void 0,void 0);kt(o,t.pos);const a=St([o],o.pos,o.end),s=gt(39),c=Ar(!!i,n);return _e(kt(D.createArrowFunction(i,void 0,a,void 0,s,c),e),r)}function Pr(){if(134===qe()){if(We(),a.hasPrecedingLineBreak())return 0;if(21!==qe()&&30!==qe())return 0}const e=qe(),t=We();if(21===e){if(22===t){switch(We()){case 39:case 59:case 19:return 1;default:return 0}}if(23===t||19===t)return 2;if(26===t)return 1;if(s_(t)&&134!==t&&tt(Vt))return 130===We()?0:1;if(!it()&&110!==t)return 0;switch(We()){case 59:return 1;case 58:return We(),59===qe()||28===qe()||64===qe()||22===qe()?1:0;case 28:case 64:case 22:return 2}return 0}if(Tn.assert(30===e),!it()&&87!==qe())return 0;if(1===g){return tt(()=>{dt(87);const e=We();if(96===e){switch(We()){case 64:case 32:case 44:return!1;default:return!0}}else if(28===e||64===e)return!0;return!1})?1:0}return 2}function Er(){if(134===qe()){if(We(),a.hasPrecedingLineBreak()||39===qe())return 0;const e=Ir(0);if(!a.hasPrecedingLineBreak()&&80===e.kind&&39===qe())return 1}return 0}function Fr(e,t){const n=Je(),r=ze(),i=po(),o=ee(i,tD)?2:0,a=Pn();let s;if(ot(21)){if(e)s=On(o,e);else{const t=On(o,e);if(!t)return;s=t}if(!ot(22)&&!e)return}else{if(!e)return;s=an()}const c=59===qe(),l=In(59,!1);if(l&&!e&&kn(l))return;let _=l;for(;196===(null==_?void 0:_.kind);)_=_.type;const u=_&&_F(_);if(!e&&39!==qe()&&(u||19!==qe()))return;const d=qe(),p=gt(39),f=39===d||19===d?Ar(ee(i,tD),t):Dt();if(!t&&c&&59!==qe())return;return _e(kt(D.createArrowFunction(i,a,s,l,p,f),n),r)}function Ar(e,t){if(19===qe())return yi(e?2:0);if(27!==qe()&&100!==qe()&&86!==qe()&&Ei()&&(19===qe()||100===qe()||86===qe()||60===qe()||!kr()))return yi(16|(e?2:0));const n=ie;ie=!1;const r=e?we(()=>wr(t)):Ne(()=>wr(t));return ie=n,r}function Ir(e){const t=Je();return jr(e,zr(),t)}function Or(e){return 103===e||165===e}function jr(e,t,n){for(;;){Ke();const r=Ty(qe());if(!(43===qe()?r>=e:r>e))break;if(103===qe()&&Fe())break;if(130===qe()||152===qe()){if(a.hasPrecedingLineBreak())break;{const e=qe();We(),t=152===e?Mr(t,br()):Br(t,br())}}else t=Rr(t,ht(),Ir(r),n)}return t}function Lr(){return(!Fe()||103!==qe())&&Ty(qe())>0}function Mr(e,t){return kt(D.createSatisfiesExpression(e,t),e.pos)}function Rr(e,t,n,r){return kt(D.createBinaryExpression(e,t,n),r)}function Br(e,t){return kt(D.createAsExpression(e,t),e.pos)}function Jr(){const e=Je();return kt(D.createPrefixUnaryExpression(qe(),Ve(qr)),e)}function zr(){if(function(){switch(qe()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(1!==g)return!1;default:return!0}}()){const e=Je(),t=Ur();return 43===qe()?jr(Ty(qe()),t,e):t}const e=qe(),t=qr();if(43===qe()){const n=ds(u,t.pos),{end:r}=t;216===t.kind?Me(n,r,Ca.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(Tn.assert(Mh(e)),Me(n,r,Ca.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,Va(e)))}return t}function qr(){switch(qe()){case 40:case 41:case 55:case 54:return Jr();case 91:return function(){const e=Je();return kt(D.createDeleteExpression(Ve(qr)),e)}();case 114:return function(){const e=Je();return kt(D.createTypeOfExpression(Ve(qr)),e)}();case 116:return function(){const e=Je();return kt(D.createVoidExpression(Ve(qr)),e)}();case 30:return 1===g?$r(!0,void 0,void 0,!0):function(){Tn.assert(1!==g,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");const e=Je();ot(30);const t=br();ot(32);const n=qr();return kt(D.createTypeAssertion(t,n),e)}();case 135:if(135===qe()&&(Oe()||tt(Ni)))return function(){const e=Je();return kt(D.createAwaitExpression(Ve(qr)),e)}();default:return Ur()}}function Ur(){if(46===qe()||47===qe()){const e=Je();return kt(D.createPrefixUnaryExpression(qe(),Ve(Vr)),e)}if(1===g&&30===qe()&&tt($t))return $r(!0);const e=Vr();if(Tn.assert(X_(e)),(46===qe()||47===qe())&&!a.hasPrecedingLineBreak()){const t=qe();return We(),kt(D.createPostfixUnaryExpression(e,t),e.pos)}return e}function Vr(){const e=Je();let t;return 102===qe()?tt(Un)?(_|=4194304,t=ht()):tt(Vn)?(We(),We(),t=kt(D.createMetaProperty(102,Pt()),e),_|=8388608):t=Wr():t=108===qe()?function(){const e=Je();let t=ht();if(30===qe()){const e=Je(),n=nt(ci);void 0!==n&&(Me(e,Je(),Ca.super_may_not_use_type_arguments),ii()||(t=D.createExpressionWithTypeArguments(t,n)))}if(21===qe()||25===qe()||23===qe())return t;return gt(25,Ca.super_must_be_followed_by_an_argument_list_or_member_access),kt(R(t,un(!0,!0,!0)),e)}():Wr(),ai(e,t)}function Wr(){return ri(Je(),li(),!0)}function $r(e,t,n,r=!1){const i=Je(),o=function(e){const t=Je();if(ot(30),32===qe())return Ze(),kt(D.createJsxOpeningFragment(),t);const n=Gr(),r=524288&w?void 0:bo(),i=function(){const e=Je();return kt(D.createJsxAttributes(Yt(13,Qr)),e)}();let o;32===qe()?(Ze(),o=D.createJsxOpeningElement(n,r,i)):(ot(44),ot(32,void 0,!1)&&(e?We():Ze()),o=D.createJsxSelfClosingElement(n,r,i));return kt(o,t)}(e);let a;if(286===o.kind){let t,r=Kr(o);const s=r[r.length-1];if(284===(null==s?void 0:s.kind)&&!vO(s.openingElement.tagName,s.closingElement.tagName)&&vO(o.tagName,s.closingElement.tagName)){const e=s.children.end,n=kt(D.createJsxElement(s.openingElement,s.children,kt(D.createJsxClosingElement(kt(I(""),e,e)),e,e)),s.openingElement.pos,e);r=St([...r.slice(0,r.length-1),n],r.pos,e),t=s.closingElement}else t=function(e,t){const n=Je();ot(31);const r=Gr();ot(32,void 0,!1)&&(t||!vO(e.tagName,r)?We():Ze());return kt(D.createJsxClosingElement(r),n)}(o,e),vO(o.tagName,t.tagName)||(n&&IE(n)&&vO(t.tagName,n.tagName)?Re(o.tagName,Ca.JSX_element_0_has_no_corresponding_closing_tag,ep(u,o.tagName)):Re(t.tagName,Ca.Expected_corresponding_JSX_closing_tag_for_0,ep(u,o.tagName)));a=kt(D.createJsxElement(o,r,t),i)}else 289===o.kind?a=kt(D.createJsxFragment(o,Kr(o),function(e){const t=Je();ot(31),ot(32,Ca.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(e?We():Ze());return kt(D.createJsxJsxClosingFragment(),t)}(e)),i):(Tn.assert(285===o.kind),a=o);if(!r&&e&&30===qe()){const e=void 0===t?a.pos:t,n=nt(()=>$r(!0,e));if(n){const t=Tt(28,!1);return JT(t,n.pos,0),Me(ds(u,e),n.end,Ca.JSX_expressions_must_have_one_parent_element),kt(D.createBinaryExpression(a,t,n),i)}}return a}function Hr(e,t){switch(t){case 1:if(LE(e))Re(e,Ca.JSX_fragment_has_no_corresponding_closing_tag);else{const t=e.tagName;Me(Math.min(ds(u,t.pos),t.end),t.end,Ca.JSX_element_0_has_no_corresponding_closing_tag,ep(u,e.tagName))}return;case 31:case 7:return;case 12:case 13:return function(){const e=Je(),t=D.createJsxText(a.getTokenValue(),13===b);return b=a.scanJsxToken(),kt(t,e)}();case 19:return Xr(!1);case 30:return $r(!1,void 0,e);default:return Tn.assertNever(t)}}function Kr(e){const t=[],n=Je(),r=T;for(T|=16384;;){const n=Hr(e,b=a.reScanJsxToken());if(!n)break;if(t.push(n),IE(e)&&284===(null==n?void 0:n.kind)&&!vO(n.openingElement.tagName,n.closingElement.tagName)&&vO(e.tagName,n.closingElement.tagName))break}return T=r,St(t,n)}function Gr(){const e=Je(),t=function(){const e=Je();Ye();const t=110===qe(),n=Et();if(dt(59))return Ye(),kt(D.createJsxNamespacedName(n,Et()),e);return t?kt(D.createToken(110),e):n}();if(qE(t))return t;let n=t;for(;dt(25);)n=kt(R(n,un(!0,!1,!1)),e);return n}function Xr(e){const t=Je();if(!ot(19))return;let n,r;return 20!==qe()&&(e||(n=pt(26)),r=Tr()),e?ot(20):ot(20,void 0,!1)&&Ze(),kt(D.createJsxExpression(n,r),t)}function Qr(){if(19===qe())return function(){const e=Je();ot(19),ot(26);const t=Tr();return ot(20),kt(D.createJsxSpreadAttribute(t),e)}();const e=Je();return kt(D.createJsxAttribute(function(){const e=Je();Ye();const t=Et();if(dt(59))return Ye(),kt(D.createJsxNamespacedName(t,Et()),e);return t}(),function(){if(64===qe()){if(11===(b=a.scanJsxAttributeValue()))return hn();if(19===qe())return Xr(!0);if(30===qe())return $r(!0);je(Ca.or_JSX_element_expected)}return}()),e)}function Yr(){return We(),wa(qe())||23===qe()||ii()}function Zr(){return 29===qe()&&tt(Yr)}function ei(e){if(64&e.flags)return!0;if(DP(e)){let t=e.expression;for(;DP(t)&&!(64&t.flags);)t=t.expression;if(64&t.flags){for(;DP(e);)e.flags|=64,e=e.expression;return!0}}return!1}function ti(e,t,n){const r=un(!0,!0,!0),i=n||ei(t),o=i?B(t,n,r):R(t,r);if(i&&YN(o.name)&&Re(o.name,Ca.An_optional_chain_cannot_contain_private_identifiers),CP(t)&&t.typeArguments){Me(t.typeArguments.pos-1,ds(u,t.typeArguments.end)+1,Ca.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return kt(o,e)}function ni(e,t,n){let r;if(24===qe())r=Tt(80,!0,Ca.An_element_access_expression_should_take_an_argument);else{const e=Se(Tr);Kh(e)&&(e.text=Ct(e.text)),r=e}ot(24);return kt(n||ei(t)?z(t,n,r):J(t,r),e)}function ri(e,t,n){for(;;){let r,i=!1;if(n&&Zr()?(r=gt(29),i=wa(qe())):i=dt(25),i)t=ti(e,t,r);else if(!r&&Ie()||!dt(23)){if(!ii()){if(!r){if(54===qe()&&!a.hasPrecedingLineBreak()){We(),t=kt(D.createNonNullExpression(t),e);continue}const n=nt(ci);if(n){t=kt(D.createExpressionWithTypeArguments(t,n),e);continue}}return t}t=r||233!==t.kind?oi(e,t,r,void 0):oi(e,t.expression,r,t.typeArguments)}else t=ni(e,t,r)}}function ii(){return 15===qe()||16===qe()}function oi(e,t,n,r){const i=D.createTaggedTemplateExpression(t,r,15===qe()?(Ge(!0),hn()):dn(!0));return(n||64&t.flags)&&(i.flags|=64),i.questionDotToken=n,kt(i,e)}function ai(e,t){for(;;){let n;t=ri(e,t,!0);const r=pt(29);if(!r||(n=nt(ci),!ii())){if(n||21===qe()){r||233!==t.kind||(n=t.typeArguments,t=t.expression);const i=si();t=kt(r||ei(t)?U(t,r,n,i):q(t,n,i),e);continue}if(r){const n=Tt(80,!1,Ca.Identifier_expected);t=kt(B(t,r,n),e)}break}t=oi(e,t,r,n)}return t}function si(){ot(21);const e=rn(11,ui);return ot(22),e}function ci(){if(524288&w)return;if(30!==Xe())return;We();const e=rn(20,br);return 32===Ke()?(We(),e&&function(){switch(qe()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return a.hasPrecedingLineBreak()||Lr()||!kr()}()?e:void 0):void 0}function li(){switch(qe()){case 15:26656&a.getTokenFlags()&&Ge(!1);case 9:case 10:case 11:return hn();case 110:case 108:case 106:case 112:case 97:return ht();case 21:return function(){const e=Je(),t=ze();ot(21);const n=Se(Tr);return ot(22),_e(kt(W(n),e),t)}();case 23:return di();case 19:return fi();case 134:if(!tt(wi))break;return mi();case 60:return function(){const e=Je(),t=ze(),n=uo(!0);if(86===qe())return go(e,t,n,231);const r=Tt(282,!0,Ca.Expression_expected);return MT(r,e),r.modifiers=n,r}();case 86:return go(Je(),ze(),void 0,231);case 100:return mi();case 105:return function(){const e=Je();if(ot(105),dt(25)){const t=Pt();return kt(D.createMetaProperty(105,t),e)}let t,n=ri(Je(),li(),!1);233===n.kind&&(t=n.typeArguments,n=n.expression);29===qe()&&je(Ca.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,ep(u,n));const r=21===qe()?si():void 0;return kt(V(n,t,r),e)}();case 44:case 69:if(14===(b=a.reScanSlashToken()))return hn();break;case 16:return dn(!1);case 81:return Ot()}return Dt(Ca.Expression_expected)}function _i(){return 26===qe()?function(){const e=Je();ot(26);const t=wr(!0);return kt(D.createSpreadElement(t),e)}():28===qe()?kt(D.createOmittedExpression(),Je()):wr(!0)}function ui(){return be(s,_i)}function di(){const e=Je(),t=a.getTokenStart(),n=ot(23),r=a.hasPrecedingLineBreak(),i=rn(15,_i);return ut(23,24,n,t),kt(L(i,r),e)}function pi(){const e=Je(),t=ze();if(pt(26)){const n=wr(!0);return _e(kt(D.createSpreadAssignment(n),e),t)}const n=uo(!0);if(jt(139))return oo(e,t,n,177,0);if(jt(153))return oo(e,t,n,178,0);const r=pt(42),i=it(),o=It(),a=pt(58),s=pt(54);if(r||21===qe()||30===qe())return no(e,t,n,r,o,a,s);let c;if(i&&59!==qe()){const e=pt(64),t=e?Se(()=>wr(!0)):void 0;c=D.createShorthandPropertyAssignment(o,t),c.equalsToken=e}else{ot(59);const e=Se(()=>wr(!0));c=D.createPropertyAssignment(o,e)}return c.modifiers=n,c.questionToken=a,c.exclamationToken=s,_e(kt(c,e),t)}function fi(){const e=Je(),t=a.getTokenStart(),n=ot(19),r=a.hasPrecedingLineBreak(),i=rn(12,pi,!0);return ut(19,20,n,t),kt(M(i,r),e)}function mi(){const e=Ie();ye(!1);const t=Je(),n=ze(),r=uo(!1);ot(100);const i=pt(42),o=i?1:0,a=ee(r,tD)?2:0,s=o&&a?xe(81920,gi):o?function(e){return xe(16384,e)}(gi):a?we(gi):gi();const c=Pn(),l=jn(o|a),_=In(59,!1),u=yi(o|a);ye(e);return _e(kt(D.createFunctionExpression(r,i,s,c,l,_,u),t),n)}function gi(){return rt()?Nt():void 0}function hi(e,t){const n=Je(),r=ze(),i=a.getTokenStart(),o=ot(19,t);if(o||e){const e=a.hasPrecedingLineBreak(),t=Yt(1,Mi);ut(19,20,o,i);const s=_e(kt(H(t,e),n),r);return 64===qe()&&(je(Ca.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),We()),s}{const e=an();return _e(kt(H(e,void 0),n),r)}}function yi(e,t){const n=Ee();he(!!(1&e));const r=Oe();ve(!!(2&e));const i=ie;ie=!1;const o=Ie();o&&ye(!1);const a=hi(!!(16&e),t);return o&&ye(!0),ie=i,he(n),ve(r),a}function vi(){const e=Je(),t=ze();ot(99);const n=pt(135);let r;let i;if(ot(21),27!==qe()&&(r=115===qe()||121===qe()||87===qe()||160===qe()&&tt(Ai)||135===qe()&&tt(ji)?Qi(!0):xe(8192,Tr)),n?ot(165):dt(165)){const e=Se(()=>wr(!0));ot(22),i=Z(n,r,e,Mi())}else if(dt(103)){const e=Se(Tr);ot(22),i=D.createForInStatement(r,e,Mi())}else{ot(27);const e=27!==qe()&&22!==qe()?Se(Tr):void 0;ot(27);const t=22!==qe()?Se(Tr):void 0;ot(22),i=Y(r,e,t,Mi())}return _e(kt(i,e),t)}function bi(e){const t=Je(),n=ze();ot(252===e?83:88);const r=vt()?void 0:Dt();xt();return _e(kt(252===e?D.createBreakStatement(r):D.createContinueStatement(r),t),n)}function xi(){return 84===qe()?function(){const e=Je(),t=ze();ot(84);const n=Se(Tr);ot(59);const r=Yt(3,Mi);return _e(kt(D.createCaseClause(n,r),e),t)}():function(){const e=Je();ot(90),ot(59);const t=Yt(3,Mi);return kt(D.createDefaultClause(t),e)}()}function Si(){const e=Je(),t=ze();ot(109),ot(21);const n=Se(Tr);ot(22);const r=function(){const e=Je();ot(19);const t=Yt(2,xi);return ot(20),kt(D.createCaseBlock(t),e)}();return _e(kt(D.createSwitchStatement(n,r),e),t)}function ki(){const e=Je(),t=ze();ot(113);const n=hi(!1),r=85===qe()?function(){const e=Je();let t;ot(85),dt(21)?(t=Xi(),ot(22)):t=void 0;const n=hi(!1);return kt(D.createCatchClause(t,n),e)}():void 0;let i;return r&&98!==qe()||(ot(98,Ca.catch_or_finally_expected),i=hi(!1)),_e(kt(D.createTryStatement(n,r,i),e),t)}function Ti(){return We(),wa(qe())&&!a.hasPrecedingLineBreak()}function Ci(){return We(),86===qe()&&!a.hasPrecedingLineBreak()}function wi(){return We(),100===qe()&&!a.hasPrecedingLineBreak()}function Ni(){return We(),(wa(qe())||9===qe()||10===qe()||11===qe())&&!a.hasPrecedingLineBreak()}function Di(){for(;;)switch(qe()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Oi();case 135:return Li();case 120:case 156:return Nr();case 144:case 145:return Ui();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:const e=qe();if(We(),a.hasPrecedingLineBreak())return!1;if(138===e&&156===qe())return!0;continue;case 162:return We(),19===qe()||80===qe()||95===qe();case 102:return We(),11===qe()||42===qe()||19===qe()||wa(qe());case 95:let t=We();if(156===t&&(t=tt(We)),64===t||42===t||19===t||90===t||130===t||60===t)return!0;continue;case 126:We();continue;default:return!1}}function Pi(){return tt(Di)}function Ei(){switch(qe()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 102:return Pi()||tt(Wn);case 87:case 95:return Pi();case 129:case 125:case 123:case 124:case 126:case 148:return Pi()||!tt(Ti);default:return kr()}}function Fi(){return We(),rt()||19===qe()||23===qe()}function Ai(){return Ii(!0)}function Ii(e){return We(),(!e||165!==qe())&&((rt()||19===qe())&&!a.hasPrecedingLineBreak())}function Oi(){return tt(Ii)}function ji(e){return 160===We()&&Ii(e)}function Li(){return tt(ji)}function Mi(){switch(qe()){case 27:return function(){const e=Je(),t=ze();return ot(27),_e(kt(D.createEmptyStatement(),e),t)}();case 19:return hi(!1);case 115:return Zi(Je(),ze(),void 0);case 121:if(tt(Fi))return Zi(Je(),ze(),void 0);break;case 135:if(Li())return Zi(Je(),ze(),void 0);break;case 160:if(Oi())return Zi(Je(),ze(),void 0);break;case 100:return eo(Je(),ze(),void 0);case 86:return mo(Je(),ze(),void 0);case 101:return function(){const e=Je(),t=ze();ot(101);const n=a.getTokenStart(),r=ot(21),i=Se(Tr);ut(21,22,r,n);const o=Mi(),s=dt(93)?Mi():void 0;return _e(kt(X(i,o,s),e),t)}();case 92:return function(){const e=Je(),t=ze();ot(92);const n=Mi();ot(117);const r=a.getTokenStart(),i=ot(21),o=Se(Tr);return ut(21,22,i,r),dt(27),_e(kt(D.createDoStatement(n,o),e),t)}();case 117:return function(){const e=Je(),t=ze();ot(117);const n=a.getTokenStart(),r=ot(21),i=Se(Tr);ut(21,22,r,n);const o=Mi();return _e(kt(Q(i,o),e),t)}();case 99:return vi();case 88:return bi(251);case 83:return bi(252);case 107:return function(){const e=Je(),t=ze();ot(107);const n=vt()?void 0:Se(Tr);return xt(),_e(kt(D.createReturnStatement(n),e),t)}();case 118:return function(){const e=Je(),t=ze();ot(118);const n=a.getTokenStart(),r=ot(21),i=Se(Tr);ut(21,22,r,n);const o=xe(67108864,Mi);return _e(kt(D.createWithStatement(i,o),e),t)}();case 109:return Si();case 111:return function(){const e=Je(),t=ze();ot(111);let n=a.hasPrecedingLineBreak()?void 0:Se(Tr);return void 0===n&&(k++,n=kt(I(""),Je())),bt()||st(n),_e(kt(D.createThrowStatement(n),e),t)}();case 113:case 85:case 98:return ki();case 89:return function(){const e=Je(),t=ze();return ot(89),xt(),_e(kt(D.createDebuggerStatement(),e),t)}();case 60:return Bi();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Pi())return Bi()}return function(){const e=Je();let t,n=ze();const r=21===qe(),i=Se(Tr);return QN(i)&&dt(59)?t=D.createLabeledStatement(i,Mi()):(bt()||st(i),t=G(i),r&&(n=!1)),_e(kt(t,e),n)}()}function Ri(e){return 138===e.kind}function Bi(){const e=Je(),t=ze(),n=uo(!0);if(ee(n,Ri)){const r=function(e){return xe(33554432,()=>{const t=en(T,e);if(t)return tn(t)})}(e);if(r)return r;for(const e of n)e.flags|=33554432;return xe(33554432,()=>Ji(e,t,n))}return Ji(e,t,n)}function Ji(e,t,n){switch(qe()){case 115:case 121:case 87:case 160:case 135:return Zi(e,t,n);case 100:return eo(e,t,n);case 86:return mo(e,t,n);case 120:return function(e,t,n){ot(120);const r=Dt(),i=Pn(),o=ho(),a=$n();return _e(kt(D.createInterfaceDeclaration(n,r,i,o,a),e),t)}(e,t,n);case 156:return function(e,t,n){ot(156),a.hasPrecedingLineBreak()&&je(Ca.Line_break_not_permitted_here);const r=Dt(),i=Pn();ot(64);const o=141===qe()&&nt(er)||br();xt();return _e(kt(D.createTypeAliasDeclaration(n,r,i,o),e),t)}(e,t,n);case 94:return function(e,t,n){ot(94);const r=Dt();let i;ot(19)?(i=be(81920,()=>rn(6,So)),ot(20)):i=an();return _e(kt(D.createEnumDeclaration(n,r,i),e),t)}(e,t,n);case 162:case 144:case 145:return function(e,t,n){let r=0;if(162===qe())return Co(e,t,n);if(dt(145))r|=32;else if(ot(144),11===qe())return Co(e,t,n);return To(e,t,n,r)}(e,t,n);case 102:return function(e,t,n){ot(102);const r=a.getTokenFullStart();let i;it()&&(i=Dt());let o=!1;"type"===(null==i?void 0:i.escapedText)&&(161!==qe()||it()&&tt(qi))&&(it()||42===qe()||19===qe())&&(o=!0,i=it()?Dt():void 0);if(i&&28!==qe()&&161!==qe())return function(e,t,n,r,i){ot(64);const o=149===qe()&&tt(wo)?function(){const e=Je();ot(149),ot(21);const t=Io();return ot(22),kt(D.createExternalModuleReference(t),e)}():cn(!1);xt();const a=D.createImportEqualsDeclaration(n,i,r,o),s=_e(kt(a,e),t);return s}(e,t,n,i,o);const s=Po(i,r,o),c=Io(),l=Eo();xt();return _e(kt(D.createImportDeclaration(n,s,c,l),e),t)}(e,t,n);case 95:switch(We(),qe()){case 90:case 64:return function(e,t,n){const r=Oe();let i;ve(!0),dt(64)?i=!0:ot(90);const o=wr(!0);xt(),ve(r);return _e(kt(D.createExportAssignment(n,i,o),e),t)}(e,t,n);case 130:return function(e,t,n){ot(130),ot(145);const r=Dt();xt();const i=D.createNamespaceExportDeclaration(r);return i.modifiers=n,_e(kt(i,e),t)}(e,t,n);default:return function(e,t,n){const r=Oe();let i,o,s;ve(!0);const c=dt(156),l=Je();dt(42)?(dt(130)&&(i=function(e){return kt(D.createNamespaceExport(Pt()),e)}(l)),ot(161),o=Io()):(i=Oo(279),(161===qe()||11===qe()&&!a.hasPrecedingLineBreak())&&(ot(161),o=Io()));const _=qe();!o||118!==_&&132!==_||a.hasPrecedingLineBreak()||(s=Ao(_));xt(),ve(r);return _e(kt(D.createExportDeclaration(n,c,i,o,s),e),t)}(e,t,n)}default:if(n){const t=Tt(282,!0,Ca.Declaration_expected);return MT(t,e),t.modifiers=n,t}return}}function zi(){return 11===We()}function qi(){return We(),161===qe()||64===qe()}function Ui(){return We(),!a.hasPrecedingLineBreak()&&(it()||11===qe())}function Vi(e,t){if(19!==qe()){if(4&e)return void Ln();if(vt())return void xt()}return yi(e,t)}function Wi(){const e=Je();if(28===qe())return kt(D.createOmittedExpression(),e);const t=pt(26),n=Ki(),r=Cr();return kt(D.createBindingElement(t,void 0,n,r),e)}function $i(){const e=Je(),t=pt(26),n=rt();let r,i=It();n&&59!==qe()?(r=i,i=void 0):(ot(59),r=Ki());const o=Cr();return kt(D.createBindingElement(t,i,r,o),e)}function Hi(){return 19===qe()||23===qe()||81===qe()||rt()}function Ki(e){return 23===qe()?function(){const e=Je();ot(23);const t=Se(()=>rn(10,Wi));return ot(24),kt(D.createArrayBindingPattern(t),e)}():19===qe()?function(){const e=Je();ot(19);const t=Se(()=>rn(9,$i));return ot(20),kt(D.createObjectBindingPattern(t),e)}():Nt(e)}function Gi(){return Xi(!0)}function Xi(e){const t=Je(),n=ze(),r=Ki(Ca.Private_identifiers_are_not_allowed_in_variable_declarations);let i;e&&80===r.kind&&54===qe()&&!a.hasPrecedingLineBreak()&&(i=ht());const o=xr(),s=Or(qe())?void 0:Cr();return _e(kt(te(r,i,o,s),t),n)}function Qi(e){const t=Je();let n,r=0;switch(qe()){case 115:break;case 121:r|=1;break;case 87:r|=2;break;case 160:r|=4;break;case 135:Tn.assert(Li()),r|=6,We();break;default:Tn.fail()}if(We(),165===qe()&&tt(Yi))n=an();else{const t=Fe();me(e),n=rn(8,e?Xi:Gi),me(t)}return kt(re(n,r),t)}function Yi(){return Vt()&&22===We()}function Zi(e,t,n){const r=Qi(!1);xt();return _e(kt(K(n,r),e),t)}function eo(e,t,n){const r=Oe(),i=_b(n);ot(100);const o=pt(42),a=2048&i?gi():Nt(),s=o?1:0,c=1024&i?2:0,l=Pn();32&i&&ve(!0);const _=jn(s|c),u=In(59,!1),d=Vi(s|c,Ca.or_expected);ve(r);return _e(kt(D.createFunctionDeclaration(n,o,a,l,_,u,d),e),t)}function to(e,t,n){return nt(()=>{if(137===qe()?ot(137):11===qe()&&21===tt(We)?nt(()=>{const e=hn();return"constructor"===e.text?e:void 0}):void 0){const r=Pn(),i=jn(0),o=In(59,!1),a=Vi(0,Ca.or_expected),s=D.createConstructorDeclaration(n,i,a);return s.typeParameters=r,s.type=o,_e(kt(s,e),t)}})}function no(e,t,n,r,i,o,a,s){const c=r?1:0,l=ee(n,tD)?2:0,_=Pn(),u=jn(c|l),d=In(59,!1),p=Vi(c|l,s),f=D.createMethodDeclaration(n,r,i,o,_,u,d,p);return f.exclamationToken=a,_e(kt(f,e),t)}function ro(e,t,n,r,i){const o=i||a.hasPrecedingLineBreak()?void 0:pt(54),s=xr(),c=be(90112,Cr);!function(e,t,n){if(60!==qe()||a.hasPrecedingLineBreak())return 21===qe()?(je(Ca.Cannot_start_a_function_call_in_a_type_annotation),void We()):void(!t||vt()?bt()||(n?je(Ca._0_expected,Va(27)):st(e)):n?je(Ca._0_expected,Va(27)):je(Ca.Expected_for_property_initializer));je(Ca.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations)}(r,s,c);return _e(kt(D.createPropertyDeclaration(n,r,i||o,s,c),e),t)}function io(e,t,n){const r=pt(42),i=It(),o=pt(58);return r||21===qe()||30===qe()?no(e,t,n,r,i,o,void 0,Ca.or_expected):ro(e,t,n,i,o)}function oo(e,t,n,r,i){const o=It(),a=Pn(),s=jn(0),c=In(59,!1),l=Vi(i),_=177===r?D.createGetAccessorDeclaration(n,o,s,c,l):D.createSetAccessorDeclaration(n,o,s,l);return _.typeParameters=a,TD(_)&&(_.type=c),_e(kt(_,e),t)}function ao(){let e;if(60===qe())return!0;for(;s_(qe());){if(e=qe(),l_(e))return!0;We()}if(42===qe())return!0;if(Ft()&&(e=qe(),We()),23===qe())return!0;if(void 0!==e){if(!jh(e)||153===e||139===e)return!0;switch(qe()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return vt()}}return!1}function so(e,t,n){gt(126);const r=function(){const e=Ee(),t=Oe();he(!1),ve(!0);const n=hi(!1);return he(e),ve(t),n}(),i=_e(kt(D.createClassStaticBlockDeclaration(r),e),t);return i.modifiers=n,i}function co(){if(Oe()&&135===qe()){const e=Je(),t=Dt(Ca.Expression_expected);We();return ai(e,ri(e,t,!0))}return Vr()}function lo(){const e=Je();if(!dt(60))return;const t=xe(32768,co);return kt(D.createDecorator(t),e)}function _o(e,t,n){const r=Je(),i=qe();if(87===qe()&&t){if(!nt(Lt))return}else{if(n&&126===qe()&&tt(No))return;if(e&&126===qe())return;if(!s_(qe())||!nt(Mt))return}return kt(j(i),r)}function uo(e,t,n){const r=Je();let i,o,a,s=!1,c=!1,l=!1;if(e&&60===qe())for(;o=lo();)i=pe(i,o);for(;a=_o(s,t,n);)126===a.kind&&(s=!0),i=pe(i,a),c=!0;if(c&&e&&60===qe())for(;o=lo();)i=pe(i,o),l=!0;if(l)for(;a=_o(s,t,n);)126===a.kind&&(s=!0),i=pe(i,a);return i&&St(i,r)}function po(){let e;if(134===qe()){const t=Je();We();e=St([kt(j(134),t)],t)}return e}function fo(){const e=Je(),t=ze();if(27===qe())return We(),_e(kt(D.createSemicolonClassElement(),e),t);const n=uo(!0,!0,!0);if(126===qe()&&tt(No))return so(e,t,n);if(jt(139))return oo(e,t,n,177,0);if(jt(153))return oo(e,t,n,178,0);if(137===qe()||11===qe()){const r=to(e,t,n);if(r)return r}if(Rn())return Jn(e,t,n);if(wa(qe())||11===qe()||9===qe()||42===qe()||23===qe()){if(ee(n,Ri)){for(const e of n)e.flags|=33554432;return xe(33554432,()=>io(e,t,n))}return io(e,t,n)}if(n){const r=Tt(80,!0,Ca.Declaration_expected);return ro(e,t,n,r,void 0)}return Tn.fail("Should not have attempted to parse class member declaration.")}function mo(e,t,n){return go(e,t,n,263)}function go(e,t,n,r){const i=Oe();ot(86);const o=!rt()||119===qe()&&tt(Wt)?void 0:wt(rt()),a=Pn();ee(n,ZN)&&ve(!0);const s=ho();let c;ot(19)?(c=Yt(5,fo),ot(20)):c=an(),ve(i);return _e(kt(263===r?D.createClassDeclaration(n,o,a,s,c):D.createClassExpression(n,o,a,s,c),e),t)}function ho(){if(xo())return Yt(22,yo)}function yo(){const e=Je(),t=qe();Tn.assert(96===t||119===t),We();const n=rn(7,vo);return kt(D.createHeritageClause(t,n),e)}function vo(){const e=Je(),t=Vr();if(233===t.kind)return t;const n=bo();return kt(D.createExpressionWithTypeArguments(t,n),e)}function bo(){return 30===qe()?sn(20,br,30,32):void 0}function xo(){return 96===qe()||119===qe()}function So(){const e=Je(),t=ze(),n=It(),r=Se(Cr);return _e(kt(D.createEnumMember(n,r),e),t)}function ko(){const e=Je();let t;return ot(19)?(t=Yt(1,Mi),ot(20)):t=an(),kt(D.createModuleBlock(t),e)}function To(e,t,n,r){const i=32&r,o=8&r?Pt():Dt(),a=dt(25)?To(Je(),!1,void 0,8|i):ko();return _e(kt(D.createModuleDeclaration(n,o,a,r),e),t)}function Co(e,t,n){let r,i,o=0;162===qe()?(r=Dt(),o|=2048):(r=hn(),r.text=Ct(r.text)),19===qe()?i=ko():xt();return _e(kt(D.createModuleDeclaration(n,r,i,o),e),t)}function wo(){return 21===We()}function No(){return 19===We()}function Do(){return 44===We()}function Po(e,t,n,r=!1){let i;return(e||42===qe()||19===qe())&&(i=function(e,t,n,r){let i;e&&!dt(28)||(r&&a.setSkipJsDocLeadingAsterisks(!0),i=42===qe()?function(){const e=Je();ot(42),ot(130);const t=Dt();return kt(D.createNamespaceImport(t),e)}():Oo(275),r&&a.setSkipJsDocLeadingAsterisks(!1));return kt(D.createImportClause(n,e,i),t)}(e,t,n,r),ot(161)),i}function Eo(){const e=qe();if((118===e||132===e)&&!a.hasPrecedingLineBreak())return Ao(e)}function Fo(){const e=Je(),t=wa(qe())?Pt():vn(11);ot(59);const n=wr(!0);return kt(D.createImportAttribute(t,n),e)}function Ao(e,t){const n=Je();t||ot(e);const r=a.getTokenStart();if(ot(19)){const t=a.hasPrecedingLineBreak(),i=rn(24,Fo,!0);if(!ot(20)){const e=Pe(h);e&&e.code===Ca._0_expected.code&&ST(e,_S(l,u,r,1,Ca.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return kt(D.createImportAttributes(i,t,e),n)}{const t=St([],Je(),void 0,!1);return kt(D.createImportAttributes(t,!1,e),n)}}function Io(){if(11===qe()){const e=hn();return e.text=Ct(e.text),e}return Tr()}function Oo(e){const t=Je();return kt(275===e?D.createNamedImports(sn(23,Lo,19,20)):D.createNamedExports(sn(23,jo,19,20)),t)}function jo(){const e=ze();return _e(Mo(281),e)}function Lo(){return Mo(276)}function Mo(e){const t=Je();let n,r=jh(qe())&&!it(),i=a.getTokenStart(),o=a.getTokenEnd(),s=!1,c=!0,l=Pt();if("type"===l.escapedText)if(130===qe()){const e=Pt();if(130===qe()){const t=Pt();wa(qe())?(s=!0,n=e,l=_(),c=!1):(n=l,l=t,c=!1)}else wa(qe())?(n=l,c=!1,l=_()):(s=!0,l=e)}else wa(qe())&&(s=!0,l=_());c&&130===qe()&&(n=l,ot(130),l=_()),276===e&&r&&Me(i,o,Ca.Identifier_expected);return kt(276===e?D.createImportSpecifier(s,n,l):D.createExportSpecifier(s,n,l),t);function _(){return r=jh(qe())&&!it(),i=a.getTokenStart(),o=a.getTokenEnd(),Pt()}}let Ro;var Bo;let Jo;var zo;let qo;(Bo=Ro||(Ro={}))[Bo.SourceElements=0]="SourceElements",Bo[Bo.BlockStatements=1]="BlockStatements",Bo[Bo.SwitchClauses=2]="SwitchClauses",Bo[Bo.SwitchClauseStatements=3]="SwitchClauseStatements",Bo[Bo.TypeMembers=4]="TypeMembers",Bo[Bo.ClassMembers=5]="ClassMembers",Bo[Bo.EnumMembers=6]="EnumMembers",Bo[Bo.HeritageClauseElement=7]="HeritageClauseElement",Bo[Bo.VariableDeclarations=8]="VariableDeclarations",Bo[Bo.ObjectBindingElements=9]="ObjectBindingElements",Bo[Bo.ArrayBindingElements=10]="ArrayBindingElements",Bo[Bo.ArgumentExpressions=11]="ArgumentExpressions",Bo[Bo.ObjectLiteralMembers=12]="ObjectLiteralMembers",Bo[Bo.JsxAttributes=13]="JsxAttributes",Bo[Bo.JsxChildren=14]="JsxChildren",Bo[Bo.ArrayLiteralMembers=15]="ArrayLiteralMembers",Bo[Bo.Parameters=16]="Parameters",Bo[Bo.JSDocParameters=17]="JSDocParameters",Bo[Bo.RestProperties=18]="RestProperties",Bo[Bo.TypeParameters=19]="TypeParameters",Bo[Bo.TypeArguments=20]="TypeArguments",Bo[Bo.TupleElementTypes=21]="TupleElementTypes",Bo[Bo.HeritageClauses=22]="HeritageClauses",Bo[Bo.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",Bo[Bo.ImportAttributes=24]="ImportAttributes",Bo[Bo.JSDocComment=25]="JSDocComment",Bo[Bo.Count=26]="Count",(zo=Jo||(Jo={}))[zo.False=0]="False",zo[zo.True=1]="True",zo[zo.Unknown=2]="Unknown",(e=>{function t(e){const t=Je(),n=(e?dt:ot)(19),r=xe(16777216,Nn);e&&!n||_t(20);const i=D.createJSDocTypeExpression(r);return ue(i),kt(i,t)}function n(){const e=Je(),t=dt(19),n=Je();let r=cn(!1);for(;81===qe();)Qe(),$e(),r=kt(D.createJSDocMemberName(r,Dt()),n);t&&_t(20);const i=D.createJSDocNameReference(r);return ue(i),kt(i,e)}let r;var i;let o;var s;function c(e=0,r){const i=u,o=void 0===r?i.length:e+r;if(r=o-e,Tn.assert(e>=0),Tn.assert(e<=o),Tn.assert(o<=i.length),!wI(i,e))return;let s,c,_,d,p,f=[];const m=[],g=T;T|=1<<25;const h=a.scanRange(e+3,r-5,function(){let t,n=1,r=e-(i.lastIndexOf("\n",e)+1)+4;function l(e){t||(t=r),f.push(e),r+=e.length}$e();for(;Q(5););Q(4)&&(n=0,r=0);e:for(;;){switch(qe()){case 60:v(f),p||(p=Je()),A(C(r)),n=0,t=void 0;break;case 4:f.push(a.getTokenText()),n=0,r=0;break;case 42:const i=a.getTokenText();1===n?(n=2,l(i)):(Tn.assert(0===n),n=1,r+=i.length);break;case 5:Tn.assert(2!==n,"whitespace shouldn't come from the scanner while saving top-level comment text");const o=a.getTokenText();void 0!==t&&r+o.length>t&&f.push(o.slice(t-r)),r+=o.length;break;case 1:break e;case 82:n=2,l(a.getTokenValue());break;case 19:n=2;const s=a.getTokenFullStart(),c=P(a.getTokenEnd()-1);if(c){d||y(f),m.push(kt(D.createJSDocText(f.join("")),d??e,s)),m.push(c),f=[],d=a.getTokenEnd();break}default:n=2,l(a.getTokenText())}2===n?He(!1):$e()}const u=f.join("").trimEnd();m.length&&u.length&&m.push(kt(D.createJSDocText(u),d??e,p));m.length&&s&&Tn.assertIsDefined(p,"having parsed tags implies that the end of the comment span should be set");const g=s&&St(s,c,_);return kt(D.createJSDocComment(m.length?St(m,e,p):u.length?u:void 0,g),e,o)});return T=g,h;function y(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function v(e){for(;e.length;){const t=e[e.length-1].trimEnd();if(""!==t){if(t.length$(n)))&&345!==t.kind;)if(s=!0,344===t.kind){if(r){const e=je(Ca.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);e&&ST(e,_S(l,u,0,0,Ca.The_tag_was_first_specified_here));break}r=t}else o=pe(o,t);if(s){const t=i&&188===i.type.kind,n=D.createJSDocTypeLiteral(o,t);i=r&&r.typeExpression&&!L(r.typeExpression.type)?r.typeExpression:kt(n,e),a=i.end}}a=a||void 0!==s?Je():(o??i??t).end,s||(s=w(e,a,n,r));const c=D.createJSDocTypedefTag(t,i,o,s);return kt(c,e,a)}(r,i,e,o);break;case"callback":c=function(e,t,n,r){const i=U();x();let o=N(n);const a=V(e,n);o||(o=w(e,Je(),n,r));const s=void 0!==o?Je():a.end;return kt(D.createJSDocCallbackTag(t,a,i,o),e,s)}(r,i,e,o);break;case"overload":c=function(e,t,n,r){x();let i=N(n);const o=V(e,n);i||(i=w(e,Je(),n,r));const a=void 0!==i?Je():o.end;return kt(D.createJSDocOverloadTag(t,o,i),e,a)}(r,i,e,o);break;case"satisfies":c=function(e,n,r,i){const o=t(!1),a=void 0!==r&&void 0!==i?w(e,Je(),r,i):void 0;return kt(D.createJSDocSatisfiesTag(n,o,a),e)}(r,i,e,o);break;case"see":c=function(e,t,r,i){const o=23===qe()||tt(()=>60===$e()&&wa($e())&&F(a.getTokenValue()))?void 0:n(),s=void 0!==r&&void 0!==i?w(e,Je(),r,i):void 0;return kt(D.createJSDocSeeTag(t,o,s),e)}(r,i,e,o);break;case"exception":case"throws":c=function(e,t,n,r){const i=O(),o=w(e,Je(),n,r);return kt(D.createJSDocThrowsTag(t,i,o),e)}(r,i,e,o);break;case"import":c=function(e,t,n,r){const i=a.getTokenFullStart();let o;it()&&(o=Dt());const s=Po(o,i,!0,!0),c=Io(),l=Eo(),_=void 0!==n&&void 0!==r?w(e,Je(),n,r):void 0;return kt(D.createJSDocImportTag(t,s,c,l,_),e)}(r,i,e,o);break;default:c=function(e,t,n,r){return kt(D.createJSDocUnknownTag(t,w(e,Je(),n,r)),e)}(r,i,e,o)}return c}function w(e,t,n,r){return r||(n+=t-e),N(n,r.slice(n))}function N(e,t){const n=Je();let r=[];const i=[];let o,s,c=0;function l(t){s||(s=e),r.push(t),e+=t.length}void 0!==t&&(""!==t&&l(t),c=1);let _=qe();e:for(;;){switch(_){case 4:c=0,r.push(a.getTokenText()),e=0;break;case 60:a.resetTokenState(a.getTokenEnd()-1);break e;case 1:break e;case 5:Tn.assert(2!==c&&3!==c,"whitespace shouldn't come from the scanner while saving comment text");const t=a.getTokenText();void 0!==s&&e+t.length>s&&(r.push(t.slice(s-e)),c=2),e+=t.length;break;case 19:c=2;const _=a.getTokenFullStart(),u=P(a.getTokenEnd()-1);u?(i.push(kt(D.createJSDocText(r.join("")),o??n,_)),i.push(u),r=[],o=a.getTokenEnd()):l(a.getTokenText());break;case 62:c=3===c?2:3,l(a.getTokenText());break;case 82:3!==c&&(c=2),l(a.getTokenValue());break;case 42:if(0===c){c=1,e+=1;break}default:3!==c&&(c=2),l(a.getTokenText())}_=2===c||3===c?He(3===c):$e()}y(r);const u=r.join("").trimEnd();return i.length?(u.length&&i.push(kt(D.createJSDocText(u),o??n)),St(i,n,a.getTokenEnd())):u.length?u:void 0}function P(e){const t=nt(E);if(!t)return;$e(),x();const n=function(){if(wa(qe())){const e=Je();let t=Pt();for(;dt(25);)t=kt(D.createQualifiedName(t,81===qe()?Tt(80,!1):Pt()),e);for(;81===qe();)Qe(),$e(),t=kt(D.createJSDocMemberName(t,Dt()),e);return t}return}(),r=[];for(;20!==qe()&&4!==qe()&&1!==qe();)r.push(a.getTokenText()),$e();return kt(("link"===t?D.createJSDocLink:"linkcode"===t?D.createJSDocLinkCode:D.createJSDocLinkPlain)(n,r.join("")),e,a.getTokenEnd())}function E(){if(S(),19===qe()&&60===$e()&&wa($e())){const e=a.getTokenValue();if(F(e))return e}}function F(e){return"link"===e||"linkcode"===e||"linkplain"===e}function A(e){e&&(s?s.push(e):(s=[e],c=e.pos),_=e.end)}function O(){return S(),19===qe()?t():void 0}function j(){const e=Q(23);e&&x();const t=Q(62),n=function(){let e=Y();dt(23)&&ot(24);for(;dt(25);){const t=Y();dt(23)&&ot(24),e=_n(e,t)}return e}();var r;return t&&(mt(r=62)||(Tn.assert(Mh(r)),Tt(r,!1,Ca._0_expected,Va(r)))),e&&(x(),pt(64)&&Tr(),ot(24)),{name:n,isBracketed:e}}function L(e){switch(e.kind){case 151:return!0;case 188:return L(e.elementType);default:return PD(e)&&QN(e.typeName)&&"Object"===e.typeName.escapedText&&!e.typeArguments}}function M(e,t,n,r){let i=O(),o=!i;S();const{name:a,isBracketed:s}=j(),c=S();o&&!tt(E)&&(i=O());const l=w(e,Je(),r,c),_=function(e,t,n,r){if(e&&L(e.type)){const i=Je();let o,a;for(;o=nt(()=>H(n,r,t));)341===o.kind||348===o.kind?a=pe(a,o):345===o.kind&&Re(o.tagName,Ca.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(a){const t=kt(D.createJSDocTypeLiteral(a,188===e.type.kind),i);return kt(D.createJSDocTypeExpression(t),i)}}}(i,a,n,r);_&&(i=_,o=!0);return kt(1===n?D.createJSDocPropertyTag(t,a,s,i,o,l):D.createJSDocParameterTag(t,a,s,i,o,l),e)}function B(e,n,r,i){ee(s,AF)&&Me(n.pos,a.getTokenStart(),Ca._0_tag_already_specified,Cc(n.escapedText));const o=t(!0),c=void 0!==r&&void 0!==i?w(e,Je(),r,i):void 0;return kt(D.createJSDocTypeTag(n,o,c),e)}function J(){const e=dt(19),t=Je(),n=function(){const e=Je();let t=Y();for(;dt(25);){const n=Y();t=kt(R(t,n),e)}return t}();a.setSkipJsDocLeadingAsterisks(!0);const r=bo();a.setSkipJsDocLeadingAsterisks(!1);const i=kt(D.createExpressionWithTypeArguments(n,r),t);return e&&ot(20),i}function z(e,t,n,r,i){return kt(t(n,w(e,Je(),r,i)),e)}function q(e,n,r,i){const o=t(!0);return x(),kt(D.createJSDocThisTag(n,o,w(e,Je(),r,i)),e)}function U(e){const t=a.getTokenStart();if(!wa(qe()))return;const n=Y();if(dt(25)){const r=U(!0);return kt(D.createModuleDeclaration(void 0,n,r,e?8:void 0),t)}return e&&(n.flags|=4096),n}function V(e,t){const n=function(e){const t=Je();let n,r;for(;n=nt(()=>H(4,e));){if(345===n.kind){Re(n.tagName,Ca.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}r=pe(r,n)}return St(r||[],t)}(t),r=nt(()=>{if(Q(60)){const e=C(t);if(e&&342===e.kind)return e}});return kt(D.createJSDocSignature(void 0,n,r),e)}function W(e,t){for(;!QN(e)||!QN(t);){if(QN(e)||QN(t)||e.right.escapedText!==t.right.escapedText)return!1;e=e.left,t=t.left}return e.escapedText===t.escapedText}function $(e){return H(1,e)}function H(e,t,n){let r=!0,i=!1;for(;;)switch($e()){case 60:if(r){const r=K(e,t);return!(r&&(341===r.kind||348===r.kind)&&n&&(QN(r.name)||!W(n,r.name.left)))&&r}i=!1;break;case 4:r=!0,i=!1;break;case 42:i&&(r=!1),i=!0;break;case 80:r=!1;break;case 1:return!1}}function K(e,t){Tn.assert(60===qe());const n=a.getTokenFullStart();$e();const r=Y(),i=S();let o;switch(r.escapedText){case"type":return 1===e&&B(n,r);case"prop":case"property":o=1;break;case"arg":case"argument":case"param":o=6;break;case"template":return X(n,r,t,i);case"this":return q(n,r,t,i);default:return!1}return!!(e&o)&&M(n,r,e,t)}function G(){const e=Je(),t=Q(23);t&&x();const n=uo(!1,!0),r=Y(Ca.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);let i;if(t&&(x(),ot(64),i=xe(16777216,Nn),ot(24)),!Ld(r))return kt(D.createTypeParameterDeclaration(n,r,void 0,i),e)}function X(e,n,r,i){const o=19===qe()?t():void 0,a=function(){const e=Je(),t=[];do{x();const e=G();void 0!==e&&t.push(e),S()}while(Q(28));return St(t,e)}();return kt(D.createJSDocTemplateTag(n,o,a,w(e,Je(),r,i)),e)}function Q(e){return qe()===e&&($e(),!0)}function Y(e){if(!wa(qe()))return Tt(80,!e,e||Ca.Identifier_expected);k++;const t=a.getTokenStart(),n=a.getTokenEnd(),r=qe(),i=Ct(a.getTokenValue()),o=kt(I(i,r),t,n);return $e(),o}}e.parseJSDocTypeExpressionForTests=function(e,n,r){se("file.js",e,99,void 0,1,0),a.setText(e,n,r),b=a.scan();const i=t(),o=de("file.js",99,1,!1,[],j(1),0,ft),s=pS(h,o);return y&&(o.jsDocDiagnostics=pS(y,o)),ce(),i?{jsDocTypeExpression:i,diagnostics:s}:void 0},e.parseJSDocTypeExpression=t,e.parseJSDocNameReference=n,e.parseIsolatedJSDocComment=function(e,t,n){se("",e,99,void 0,1,0);const r=xe(16777216,()=>c(t,n)),i=pS(h,{languageVariant:0,text:e});return ce(),r?{jsDoc:r,diagnostics:i}:void 0},e.parseJSDocComment=function(e,t,n){const r=b,i=h.length,o=oe,a=xe(16777216,()=>c(t,n));return qT(a,e),524288&w&&(y||(y=[]),ge(y,h,i)),b=r,h.length=i,oe=o,a},(i=r||(r={}))[i.BeginningOfLine=0]="BeginningOfLine",i[i.SawAsterisk=1]="SawAsterisk",i[i.SavingComments=2]="SavingComments",i[i.SavingBackticks=3]="SavingBackticks",(s=o||(o={}))[s.Property=1]="Property",s[s.Parameter=2]="Parameter",s[s.CallbackParameter=4]="CallbackParameter"})(qo=e.JSDocParser||(e.JSDocParser={}))})(EI||(EI={}));var oO=new WeakSet;var aO,sO=new WeakSet;function cO(e){sO.add(e)}function lO(e){return void 0!==_O(e)}function _O(e){const t=Ho(e,$k,!1);if(t)return t;if(Ro(e,".ts")){const t=Wo(e).lastIndexOf(".d.");if(t>=0)return e.substring(t)}}function uO(e,t){const n=[];for(const e of Cs(t,0)||p){hO(n,e,t.substring(e.pos,e.end))}e.pragmas=new Map;for(const t of n){if(e.pragmas.has(t.name)){const n=e.pragmas.get(t.name);n instanceof Array?n.push(t.args):e.pragmas.set(t.name,[n,t.args]);continue}e.pragmas.set(t.name,t.args)}}function dO(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((n,r)=>{switch(r){case"reference":{const r=e.referencedFiles,i=e.typeReferenceDirectives,o=e.libReferenceDirectives;h(lt(n),n=>{const{types:a,lib:s,path:c,"resolution-mode":l,preserve:_}=n.arguments,u="true"===_||void 0;if("true"===n.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(a){const e=function(e,t,n,r){if(e)return"import"===e?99:"require"===e?1:void r(t,n-t,Ca.resolution_mode_should_be_either_require_or_import)}(l,a.pos,a.end,t);i.push({pos:a.pos,end:a.end,fileName:a.value,...e?{resolutionMode:e}:{},...u?{preserve:u}:{}})}else s?o.push({pos:s.pos,end:s.end,fileName:s.value,...u?{preserve:u}:{}}):c?r.push({pos:c.pos,end:c.end,fileName:c.value,...u?{preserve:u}:{}}):t(n.range.pos,n.range.end-n.range.pos,Ca.Invalid_reference_directive_syntax)});break}case"amd-dependency":e.amdDependencies=M(lt(n),e=>({name:e.arguments.name,path:e.arguments.path}));break;case"amd-module":if(n instanceof Array)for(const r of n)e.moduleName&&t(r.range.pos,r.range.end-r.range.pos,Ca.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=r.arguments.name;else e.moduleName=n.arguments.name;break;case"ts-nocheck":case"ts-check":h(lt(n),t=>{(!e.checkJsDirective||t.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:"ts-check"===r,end:t.range.end,pos:t.range.pos})});break;case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:Tn.fail("Unhandled pragma kind")}})}(e=>{function t(e,t,r,o,a,s){return void(t?l(e):c(e));function c(e){let t="";if(s&&n(e)&&(t=o.substring(e.pos,e.end)),$F(e),BT(e,e.pos+r,e.end+r),s&&n(e)&&Tn.assert(t===a.substring(e.pos,e.end)),KI(e,c,l),Ju(e))for(const t of e.jsDoc)c(t);i(e,s)}function l(e){BT(e,e.pos+r,e.end+r);for(const t of e)c(t)}}function n(e){switch(e.kind){case 11:case 9:case 80:return!0}return!1}function r(e,t,n,r,i){Tn.assert(e.end>=t,"Adjusting an element that was entirely before the change range"),Tn.assert(e.pos<=n,"Adjusting an element that was entirely after the change range"),Tn.assert(e.pos<=e.end);const o=Math.min(e.pos,r),a=e.end>=n?e.end+i:Math.min(e.end,r);if(Tn.assert(o<=a),e.parent){const t=e.parent;Tn.assertGreaterThanOrEqual(o,t.pos),Tn.assertLessThanOrEqual(a,t.end)}BT(e,o,a)}function i(e,t){if(t){let t=e.pos;const n=e=>{Tn.assert(e.pos>=t),t=e.end};if(Ju(e))for(const t of e.jsDoc)n(t);KI(e,n),Tn.assert(t<=e.end)}}function o(e,t){let n,r=e;if(KI(e,function e(i){if(Ld(i))return;if(!(i.pos<=t))return Tn.assert(i.pos>t),!0;if(i.pos>=r.pos&&(r=i),tr.pos&&(r=e)}return r}function a(e,t,n,r){const i=e.text;if(n&&(Tn.assert(i.length-n.span.length+n.newLength===t.length),r||Tn.shouldAssert(3))){const e=i.substr(0,n.span.start),r=t.substr(0,n.span.start);Tn.assert(e===r);const o=i.substring(Us(n.span),i.length),a=t.substring(Us(rc(n)),t.length);Tn.assert(o===a)}}function s(e){let t=e.statements,n=0;Tn.assert(n(o!==i&&(r&&r.end===o&&n=e.pos&&i=e.pos&&i0&&t<=n;t++){const t=o(e,r);Tn.assert(t.pos<=r);const n=t.pos;r=Math.max(0,n-1)}const i=nc(r,Us(t.span)),a=t.newLength+(t.span.start-r);return oc(i,a)}(e,c);a(e,n,d,l),Tn.assert(d.span.start<=c.span.start),Tn.assert(Us(d.span)===Us(c.span)),Tn.assert(Us(rc(d))===Us(rc(c)));const p=rc(d).length-d.span.length;!function(e,n,o,a,s,c,l,_){return void u(e);function u(e){if(Tn.assert(e.pos<=e.end),e.pos>o)return void t(e,!1,s,c,l,_);const p=e.end;if(p>=n){if(cO(e),$F(e),r(e,n,o,a,s),KI(e,u,d),Ju(e))for(const t of e.jsDoc)u(t);i(e,_)}else Tn.assert(po)return void t(e,!0,s,c,l,_);const i=e.end;if(i>=n){cO(e),r(e,n,o,a,s);for(const t of e)u(t)}else Tn.assert(ir){_();const t={range:{pos:e.pos+i,end:e.end+i},type:l};c=pe(c,t),s&&Tn.assert(o.substring(e.pos,e.end)===a.substring(t.range.pos,t.range.end))}}return _(),c;function _(){l||(l=!0,c?t&&c.push(...t):c=t)}}(e.commentDirectives,f.commentDirectives,d.span.start,Us(d.span),p,_,n,l),f.impliedNodeFormat=e.impliedNodeFormat,f},e.createSyntaxCursor=s,(l=c||(c={}))[l.Value=-1]="Value"})(aO||(aO={}));var pO=new Map;function fO(e){if(pO.has(e))return pO.get(e);const t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return pO.set(e,t),t}var mO=/^\/\/\/\s*<(\S+)\s.*?\/>/im,gO=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im;function hO(e,t,n){const r=2===t.kind&&mO.exec(n);if(r){const i=r[1].toLowerCase(),o=Gi[i];if(!(o&&1&o.kind))return;if(o.args){const r={};for(const e of o.args){const i=fO(e.name).exec(n);if(!i&&!e.optional)return;if(i){const n=i[2]||i[3];if(e.captureSpan){const o=t.pos+i.index+i[1].length+1;r[e.name]={value:n,pos:o,end:o+n.length}}else r[e.name]=n}}e.push({name:i,args:{arguments:r,range:t}})}else e.push({name:i,args:{arguments:{},range:t}});return}const i=2===t.kind&&gO.exec(n);if(i)return yO(e,t,2,i);if(3===t.kind){const r=/@(\S+)(\s+.*)?$/gim;let i;for(;i=r.exec(n);)yO(e,t,4,i)}}function yO(e,t,n,r){if(!r)return;const i=r[1].toLowerCase(),o=Gi[i];if(!(o&&o.kind&n))return;const a=function(e,t){if(!t)return{};if(!e.args)return{};const n=t.trim().split(/\s+/),r={};for(let t=0;t[""+t,e])),kO=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["es2021","lib.es2021.d.ts"],["es2022","lib.es2022.d.ts"],["es2023","lib.es2023.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["dom.asynciterable","lib.dom.asynciterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["webworker.iterable","lib.webworker.iterable.d.ts"],["webworker.asynciterable","lib.webworker.asynciterable.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2016.intl","lib.es2016.intl.d.ts"],["es2017.date","lib.es2017.date.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2019.intl","lib.es2019.intl.d.ts"],["es2020.bigint","lib.es2020.bigint.d.ts"],["es2020.date","lib.es2020.date.d.ts"],["es2020.promise","lib.es2020.promise.d.ts"],["es2020.sharedmemory","lib.es2020.sharedmemory.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["es2020.intl","lib.es2020.intl.d.ts"],["es2020.number","lib.es2020.number.d.ts"],["es2021.promise","lib.es2021.promise.d.ts"],["es2021.string","lib.es2021.string.d.ts"],["es2021.weakref","lib.es2021.weakref.d.ts"],["es2021.intl","lib.es2021.intl.d.ts"],["es2022.array","lib.es2022.array.d.ts"],["es2022.error","lib.es2022.error.d.ts"],["es2022.intl","lib.es2022.intl.d.ts"],["es2022.object","lib.es2022.object.d.ts"],["es2022.sharedmemory","lib.es2022.sharedmemory.d.ts"],["es2022.string","lib.es2022.string.d.ts"],["es2022.regexp","lib.es2022.regexp.d.ts"],["es2023.array","lib.es2023.array.d.ts"],["es2023.collection","lib.es2023.collection.d.ts"],["es2023.intl","lib.es2023.intl.d.ts"],["esnext.array","lib.es2023.array.d.ts"],["esnext.collection","lib.esnext.collection.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.disposable","lib.esnext.disposable.d.ts"],["esnext.bigint","lib.es2020.bigint.d.ts"],["esnext.string","lib.es2022.string.d.ts"],["esnext.promise","lib.esnext.promise.d.ts"],["esnext.weakref","lib.es2021.weakref.d.ts"],["esnext.decorators","lib.esnext.decorators.d.ts"],["esnext.object","lib.esnext.object.d.ts"],["esnext.array","lib.esnext.array.d.ts"],["esnext.regexp","lib.esnext.regexp.d.ts"],["esnext.string","lib.esnext.string.d.ts"],["decorators","lib.decorators.d.ts"],["decorators.legacy","lib.decorators.legacy.d.ts"]],TO=kO.map(e=>e[0]),CO=new Map(kO),wO=[{name:"watchFile",type:new Map(Object.entries({fixedpollinginterval:0,prioritypollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3,usefsevents:4,usefseventsonparentdirectory:5})),category:Ca.Watch_and_Build_Modes,description:Ca.Specify_how_the_TypeScript_watch_mode_works,defaultValueDescription:4},{name:"watchDirectory",type:new Map(Object.entries({usefsevents:0,fixedpollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3})),category:Ca.Watch_and_Build_Modes,description:Ca.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,defaultValueDescription:0},{name:"fallbackPolling",type:new Map(Object.entries({fixedinterval:0,priorityinterval:1,dynamicpriority:2,fixedchunksize:3})),category:Ca.Watch_and_Build_Modes,description:Ca.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,defaultValueDescription:1},{name:"synchronousWatchDirectory",type:"boolean",category:Ca.Watch_and_Build_Modes,description:Ca.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,defaultValueDescription:!1},{name:"excludeDirectories",type:"list",element:{name:"excludeDirectory",type:"string",isFilePath:!0,extraValidation:BL},allowConfigDirTemplateSubstitution:!0,category:Ca.Watch_and_Build_Modes,description:Ca.Remove_a_list_of_directories_from_the_watch_process},{name:"excludeFiles",type:"list",element:{name:"excludeFile",type:"string",isFilePath:!0,extraValidation:BL},allowConfigDirTemplateSubstitution:!0,category:Ca.Watch_and_Build_Modes,description:Ca.Remove_a_list_of_files_from_the_watch_mode_s_processing}],NO=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:Ca.Command_line_Options,description:Ca.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:Ca.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:Ca.Command_line_Options,description:Ca.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:Ca.Output_Formatting,description:Ca.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:Ca.Compiler_Diagnostics,description:Ca.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:Ca.Compiler_Diagnostics,description:Ca.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:Ca.Compiler_Diagnostics,description:Ca.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:Ca.Output_Formatting,description:Ca.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:Ca.Compiler_Diagnostics,description:Ca.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:Ca.Compiler_Diagnostics,description:Ca.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:Ca.Compiler_Diagnostics,description:Ca.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:Ca.FILE_OR_DIRECTORY,category:Ca.Compiler_Diagnostics,description:Ca.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,isCommandLineOnly:!0,paramType:Ca.DIRECTORY,category:Ca.Compiler_Diagnostics,description:Ca.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:Ca.Projects,description:Ca.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:Ca.false_unless_composite_is_set},{name:"declaration",shortName:"d",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Emit,transpileOptionValue:void 0,description:Ca.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,defaultValueDescription:Ca.false_unless_composite_is_set},{name:"declarationMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Emit,transpileOptionValue:void 0,defaultValueDescription:!1,description:Ca.Create_sourcemaps_for_d_ts_files},{name:"emitDeclarationOnly",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Emit,description:Ca.Only_output_d_ts_files_and_not_JavaScript_files,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Emit,defaultValueDescription:!1,description:Ca.Create_source_map_files_for_emitted_JavaScript_files},{name:"inlineSourceMap",type:"boolean",affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Include_sourcemap_files_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Watch_and_Build_Modes,description:Ca.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:Ca.Command_line_Options,isCommandLineOnly:!0,description:Ca.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:Ca.Platform_specific}],DO={name:"target",shortName:"t",type:new Map(Object.entries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,es2021:8,es2022:9,es2023:10,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,deprecatedKeys:new Set(["es3"]),paramType:Ca.VERSION,showInSimplifiedHelpView:!0,category:Ca.Language_and_Environment,description:Ca.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,defaultValueDescription:1},PO={name:"module",shortName:"m",type:new Map(Object.entries({none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5,es2020:6,es2022:7,esnext:99,node16:100,nodenext:199,preserve:200})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,paramType:Ca.KIND,showInSimplifiedHelpView:!0,category:Ca.Modules,description:Ca.Specify_what_module_code_is_generated,defaultValueDescription:void 0},EO=[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:Ca.Command_line_Options,description:Ca.Show_all_compiler_options,defaultValueDescription:!1},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:Ca.Command_line_Options,description:Ca.Print_the_compiler_s_version,defaultValueDescription:!1},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:Ca.Command_line_Options,description:Ca.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,defaultValueDescription:!1},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:Ca.Command_line_Options,paramType:Ca.FILE_OR_DIRECTORY,description:Ca.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:Ca.Command_line_Options,description:Ca.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,defaultValueDescription:!1},{name:"showConfig",type:"boolean",showInSimplifiedHelpView:!0,category:Ca.Command_line_Options,isCommandLineOnly:!0,description:Ca.Print_the_final_configuration_instead_of_building,defaultValueDescription:!1},{name:"listFilesOnly",type:"boolean",category:Ca.Command_line_Options,isCommandLineOnly:!0,description:Ca.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,defaultValueDescription:!1},DO,PO,{name:"lib",type:"list",element:{name:"lib",type:CO,defaultValueDescription:void 0},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:Ca.Language_and_Environment,description:Ca.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",allowJsFlag:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.JavaScript_Support,description:Ca.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,defaultValueDescription:!1},{name:"checkJs",type:"boolean",affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.JavaScript_Support,description:Ca.Enable_error_reporting_in_type_checked_JavaScript_files,defaultValueDescription:!1},{name:"jsx",type:xO,affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,paramType:Ca.KIND,showInSimplifiedHelpView:!0,category:Ca.Language_and_Environment,description:Ca.Specify_what_JSX_code_is_generated,defaultValueDescription:void 0},{name:"outFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:Ca.FILE,showInSimplifiedHelpView:!0,category:Ca.Emit,description:Ca.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:Ca.DIRECTORY,showInSimplifiedHelpView:!0,category:Ca.Emit,description:Ca.Specify_an_output_folder_for_all_emitted_files},{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:Ca.LOCATION,category:Ca.Modules,description:Ca.Specify_the_root_folder_within_your_source_files,defaultValueDescription:Ca.Computed_from_the_list_of_input_files},{name:"composite",type:"boolean",affectsBuildInfo:!0,isTSConfigOnly:!0,category:Ca.Projects,transpileOptionValue:void 0,defaultValueDescription:!1,description:Ca.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,isFilePath:!0,paramType:Ca.FILE,category:Ca.Projects,transpileOptionValue:void 0,defaultValueDescription:".tsbuildinfo",description:Ca.Specify_the_path_to_tsbuildinfo_incremental_compilation_file},{name:"removeComments",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Emit,defaultValueDescription:!1,description:Ca.Disable_emitting_comments},{name:"noCheck",type:"boolean",showInSimplifiedHelpView:!1,category:Ca.Compiler_Diagnostics,description:Ca.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,transpileOptionValue:!0,defaultValueDescription:!1,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,extraValidation:()=>[Ca.Unknown_compiler_option_0,"noCheck"]},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:Ca.Emit,description:Ca.Disable_emitting_files_from_a_compilation,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"importHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,defaultValueDescription:!1},{name:"importsNotUsedAsValues",type:new Map(Object.entries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Backwards_Compatibility,description:Ca.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,defaultValueDescription:0},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,defaultValueDescription:!1},{name:"isolatedModules",type:"boolean",category:Ca.Interop_Constraints,description:Ca.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,transpileOptionValue:!0,defaultValueDescription:!1},{name:"verbatimModuleSyntax",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Interop_Constraints,description:Ca.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,defaultValueDescription:!1},{name:"isolatedDeclarations",type:"boolean",category:Ca.Interop_Constraints,description:Ca.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"strict",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Type_Checking,description:Ca.Enable_all_strict_type_checking_options,defaultValueDescription:!1},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.When_type_checking_take_into_account_null_and_undefined,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"strictBindCallApply",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.Enable_error_reporting_when_this_is_given_the_type_any,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"useUnknownInCatchVariables",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.Default_catch_clause_variables_as_unknown_instead_of_any,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,strictFlag:!0,category:Ca.Type_Checking,description:Ca.Ensure_use_strict_is_always_emitted,defaultValueDescription:Ca.false_unless_strict_is_set},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Enable_error_reporting_when_local_variables_aren_t_read,defaultValueDescription:!1},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Raise_an_error_when_a_function_parameter_isn_t_read,defaultValueDescription:!1},{name:"exactOptionalPropertyTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Interpret_optional_property_types_as_written_rather_than_adding_undefined,defaultValueDescription:!1},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,defaultValueDescription:!1},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,defaultValueDescription:!1},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Add_undefined_to_a_type_when_accessed_using_an_index,defaultValueDescription:!1},{name:"noImplicitOverride",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,defaultValueDescription:!1},{name:"noPropertyAccessFromIndexSignature",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!1,category:Ca.Type_Checking,description:Ca.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,defaultValueDescription:!1},{name:"moduleResolution",type:new Map(Object.entries({node10:2,node:2,classic:1,node16:3,nodenext:99,bundler:100})),deprecatedKeys:new Set(["node"]),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:Ca.STRATEGY,category:Ca.Modules,description:Ca.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,defaultValueDescription:Ca.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:Ca.Modules,description:Ca.Specify_the_base_directory_to_resolve_non_relative_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,isTSConfigOnly:!0,category:Ca.Modules,description:Ca.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:Ca.Modules,description:Ca.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,transpileOptionValue:void 0,defaultValueDescription:Ca.Computed_from_the_list_of_input_files},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:Ca.Modules,description:Ca.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types},{name:"types",type:"list",element:{name:"types",type:"string"},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:Ca.Modules,description:Ca.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Interop_Constraints,description:Ca.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,defaultValueDescription:Ca.module_system_or_esModuleInterop},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:Ca.Interop_Constraints,description:Ca.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,defaultValueDescription:!1},{name:"preserveSymlinks",type:"boolean",category:Ca.Interop_Constraints,description:Ca.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,defaultValueDescription:!1},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Modules,description:Ca.Allow_accessing_UMD_globals_from_modules,defaultValueDescription:!1},{name:"moduleSuffixes",type:"list",element:{name:"suffix",type:"string"},listPreserveFalsyValues:!0,affectsModuleResolution:!0,category:Ca.Modules,description:Ca.List_of_file_name_suffixes_to_search_when_resolving_a_module},{name:"allowImportingTsExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Modules,description:Ca.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,defaultValueDescription:!1,transpileOptionValue:void 0},{name:"resolvePackageJsonExports",type:"boolean",affectsModuleResolution:!0,category:Ca.Modules,description:Ca.Use_the_package_json_exports_field_when_resolving_package_imports,defaultValueDescription:Ca.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"resolvePackageJsonImports",type:"boolean",affectsModuleResolution:!0,category:Ca.Modules,description:Ca.Use_the_package_json_imports_field_when_resolving_imports,defaultValueDescription:Ca.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"customConditions",type:"list",element:{name:"condition",type:"string"},affectsModuleResolution:!0,category:Ca.Modules,description:Ca.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports},{name:"sourceRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:Ca.LOCATION,category:Ca.Emit,description:Ca.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code},{name:"mapRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:Ca.LOCATION,category:Ca.Emit,description:Ca.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSources",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"experimentalDecorators",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Language_and_Environment,description:Ca.Enable_experimental_support_for_legacy_experimental_decorators,defaultValueDescription:!1},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Language_and_Environment,description:Ca.Emit_design_type_metadata_for_decorated_declarations_in_source_files,defaultValueDescription:!1},{name:"jsxFactory",type:"string",category:Ca.Language_and_Environment,description:Ca.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,defaultValueDescription:"`React.createElement`"},{name:"jsxFragmentFactory",type:"string",category:Ca.Language_and_Environment,description:Ca.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,defaultValueDescription:"React.Fragment"},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,category:Ca.Language_and_Environment,description:Ca.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,defaultValueDescription:"react"},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:Ca.Modules,description:Ca.Enable_importing_json_files,defaultValueDescription:!1},{name:"allowArbitraryExtensions",type:"boolean",affectsProgramStructure:!0,category:Ca.Modules,description:Ca.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,defaultValueDescription:!1},{name:"out",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!1,category:Ca.Backwards_Compatibility,paramType:Ca.FILE,transpileOptionValue:void 0,description:Ca.Deprecated_setting_Use_outFile_instead},{name:"reactNamespace",type:"string",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Language_and_Environment,description:Ca.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,defaultValueDescription:"`React`"},{name:"skipDefaultLibCheck",type:"boolean",affectsBuildInfo:!0,category:Ca.Completeness,description:Ca.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,defaultValueDescription:!1},{name:"charset",type:"string",category:Ca.Backwards_Compatibility,description:Ca.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,defaultValueDescription:"utf8"},{name:"emitBOM",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,defaultValueDescription:!1},{name:"newLine",type:new Map(Object.entries({crlf:0,lf:1})),affectsEmit:!0,affectsBuildInfo:!0,paramType:Ca.NEWLINE,category:Ca.Emit,description:Ca.Set_the_newline_character_for_emitting_files,defaultValueDescription:"lf"},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Output_Formatting,description:Ca.Disable_truncating_types_in_error_messages,defaultValueDescription:!1},{name:"noLib",type:"boolean",category:Ca.Language_and_Environment,affectsProgramStructure:!0,description:Ca.Disable_including_any_library_files_including_the_default_lib_d_ts,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:Ca.Modules,description:Ca.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,transpileOptionValue:!0,defaultValueDescription:!1},{name:"stripInternal",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,defaultValueDescription:!1},{name:"disableSizeLimit",type:"boolean",affectsProgramStructure:!0,category:Ca.Editor_Support,description:Ca.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,defaultValueDescription:!1},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:Ca.Projects,description:Ca.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,defaultValueDescription:!1},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:Ca.Projects,description:Ca.Opt_a_project_out_of_multi_project_reference_checking_when_editing,defaultValueDescription:!1},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:Ca.Projects,description:Ca.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,defaultValueDescription:!1},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Backwards_Compatibility,description:Ca.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,defaultValueDescription:!1},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,defaultValueDescription:!1},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,transpileOptionValue:void 0,description:Ca.Disable_emitting_files_if_any_type_checking_errors_are_reported,defaultValueDescription:!1},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Emit,description:Ca.Disable_erasing_const_enum_declarations_in_generated_code,defaultValueDescription:!1},{name:"declarationDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:Ca.DIRECTORY,category:Ca.Emit,transpileOptionValue:void 0,description:Ca.Specify_the_output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",affectsBuildInfo:!0,category:Ca.Completeness,description:Ca.Skip_type_checking_all_d_ts_files,defaultValueDescription:!1},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Disable_error_reporting_for_unused_labels,defaultValueDescription:void 0},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Type_Checking,description:Ca.Disable_error_reporting_for_unreachable_code,defaultValueDescription:void 0},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Backwards_Compatibility,description:Ca.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,defaultValueDescription:!1},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Backwards_Compatibility,description:Ca.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,defaultValueDescription:!1},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:Ca.Interop_Constraints,description:Ca.Ensure_that_casing_is_correct_in_imports,defaultValueDescription:!0},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:Ca.JavaScript_Support,description:Ca.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,defaultValueDescription:0},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:Ca.Backwards_Compatibility,description:Ca.Disable_strict_checking_of_generic_signatures_in_function_types,defaultValueDescription:!1},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Language_and_Environment,description:Ca.Emit_ECMAScript_standard_compliant_class_fields,defaultValueDescription:Ca.true_for_ES2022_and_above_including_ESNext},{name:"preserveValueImports",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:Ca.Backwards_Compatibility,description:Ca.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,defaultValueDescription:!1},{name:"keyofStringsOnly",type:"boolean",category:Ca.Backwards_Compatibility,description:Ca.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,defaultValueDescription:!1},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:Ca.Specify_a_list_of_language_service_plugins_to_include,category:Ca.Editor_Support},{name:"moduleDetection",type:new Map(Object.entries({auto:2,legacy:1,force:3})),affectsSourceFile:!0,affectsModuleResolution:!0,description:Ca.Control_what_method_is_used_to_detect_module_format_JS_files,category:Ca.Language_and_Environment,defaultValueDescription:Ca.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules},{name:"ignoreDeprecations",type:"string",defaultValueDescription:void 0}],FO=[...NO,...EO],AO=FO.filter(e=>!!e.affectsSemanticDiagnostics),IO=FO.filter(e=>!!e.affectsEmit),OO=FO.filter(e=>!!e.affectsDeclarationPath),jO=FO.filter(e=>!!e.affectsModuleResolution),LO=FO.filter(e=>!!e.affectsSourceFile||!!e.affectsBindDiagnostics),MO=FO.filter(e=>!!e.affectsProgramStructure),RO=FO.filter(e=>Be(e,"transpileOptionValue")),BO=FO.filter(e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath),JO=wO.filter(e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath),zO=FO.filter(function(e){return!_t(e.type)});var qO,UO=[{name:"verbose",shortName:"v",category:Ca.Command_line_Options,description:Ca.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1},{name:"dry",shortName:"d",category:Ca.Command_line_Options,description:Ca.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean",defaultValueDescription:!1},{name:"force",shortName:"f",category:Ca.Command_line_Options,description:Ca.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean",defaultValueDescription:!1},{name:"clean",category:Ca.Command_line_Options,description:Ca.Delete_the_outputs_of_all_projects,type:"boolean",defaultValueDescription:!1}],VO=[...NO,...UO],WO=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function $O(e){const t=new Map,n=new Map;return h(e,e=>{t.set(e.name.toLowerCase(),e),e.shortName&&n.set(e.shortName,e.name)}),{optionsNameMap:t,shortOptionNames:n}}function HO(){return qO||(qO=$O(FO))}var KO={diagnostic:Ca.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:lj},GO={module:1,target:3,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0};function XO(e){return QO(e,gS)}function QO(e,t){const n=We(e.type.keys()),r=(e.deprecatedKeys?n.filter(t=>!e.deprecatedKeys.has(t)):n).map(e=>`'${e}'`).join(", ");return t(Ca.Argument_for_0_option_must_be_Colon_1,`--${e.name}`,r)}function YO(e,t,n){return DL(e,(t??"").trim(),n)}function ZO(e,t="",n){if(ln(t=t.trim(),"-"))return;if("listOrElement"===e.type&&!t.includes(","))return NL(e,t,n);if(""===t)return[];const r=t.split(",");switch(e.element.type){case"number":return $(r,t=>NL(e.element,parseInt(t),n));case"string":return $(r,t=>NL(e.element,t||"",n));case"boolean":case"object":return Tn.fail(`List of ${e.element.type} is not yet supported.`);default:return $(r,t=>YO(e.element,t,n))}}function ej(e){return e.name}function tj(e,t,n,r,i){var o;if(null==(o=t.alternateMode)?void 0:o.getOptionsNameMap().optionsNameMap.has(e.toLowerCase()))return CL(i,r,t.alternateMode.diagnostic,e);const a=Kt(e,t.optionDeclarations,ej);return a?CL(i,r,t.unknownDidYouMeanDiagnostic,n||e,a.name):CL(i,r,t.unknownOptionDiagnostic,n||e)}function nj(e,t,n){const r={};let i;const o=[],a=[];return s(t),{options:r,watchOptions:i,fileNames:o,errors:a};function s(t){let n=0;for(;nTo.readFile(e)));if(!_t(t))return void a.push(t);const r=[];let i=0;for(;;){for(;i=t.length)break;const n=i;if(34===t.charCodeAt(n)){for(i++;i32;)i++;r.push(t.substring(n,i))}}s(r)}}function rj(e,t,n,r,i,o){if(r.isTSConfigOnly){const n=e[t];"null"===n?(i[r.name]=void 0,t++):"boolean"===r.type?"false"===n?(i[r.name]=NL(r,!1,o),t++):("true"===n&&t++,o.push(gS(Ca.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,r.name))):(o.push(gS(Ca.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,r.name)),n&&!ln(n,"-")&&t++)}else if(e[t]||"boolean"===r.type||o.push(gS(n.optionTypeMismatchDiagnostic,r.name,Mj(r))),"null"!==e[t])switch(r.type){case"number":i[r.name]=NL(r,parseInt(e[t]),o),t++;break;case"boolean":const n=e[t];i[r.name]=NL(r,"false"!==n,o),"false"!==n&&"true"!==n||t++;break;case"string":i[r.name]=NL(r,e[t]||"",o),t++;break;case"list":const a=ZO(r,e[t],o);i[r.name]=a||[],a&&t++;break;case"listOrElement":Tn.fail("listOrElement not supported here");break;default:i[r.name]=YO(r,e[t],o),t++}else i[r.name]=void 0,t++;return t}var ij,oj={alternateMode:KO,getOptionsNameMap:HO,optionDeclarations:FO,unknownOptionDiagnostic:Ca.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:Ca.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:Ca.Compiler_option_0_expects_an_argument};function aj(e,t){return nj(oj,e,t)}function sj(e,t){return cj(HO,e,t)}function cj(e,t,n=!1){t=t.toLowerCase();const{optionsNameMap:r,shortOptionNames:i}=e();if(n){const e=i.get(t);void 0!==e&&(t=e)}return r.get(t)}function lj(){return ij||(ij=$O(VO))}var _j={alternateMode:{diagnostic:Ca.Compiler_option_0_may_not_be_used_with_build,getOptionsNameMap:HO},getOptionsNameMap:lj,optionDeclarations:VO,unknownOptionDiagnostic:Ca.Unknown_build_option_0,unknownDidYouMeanDiagnostic:Ca.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:Ca.Build_option_0_requires_a_value_of_type_1};function uj(e){const{options:t,watchOptions:n,fileNames:r,errors:i}=nj(_j,e),o=t;return 0===r.length&&r.push("."),o.clean&&o.force&&i.push(gS(Ca.Options_0_and_1_cannot_be_combined,"clean","force")),o.clean&&o.verbose&&i.push(gS(Ca.Options_0_and_1_cannot_be_combined,"clean","verbose")),o.clean&&o.watch&&i.push(gS(Ca.Options_0_and_1_cannot_be_combined,"clean","watch")),o.watch&&o.dry&&i.push(gS(Ca.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:o,watchOptions:n,projects:r,errors:i}}function dj(e,...t){return pt(gS(e,...t).messageText,_t)}function pj(e,t,n,r,i,o){const a=hj(e,e=>n.readFile(e));if(!_t(a))return void n.onUnRecoverableConfigFileDiagnostic(a);const s=eO(e,a),c=n.getCurrentDirectory();return s.path=ia(e,c,on(n.useCaseSensitiveFileNames)),s.resolvedPath=s.path,s.originalFileName=s.fileName,Yj(s,n,ta(Vo(e),c),t,ta(e,c),void 0,o,r,i)}function fj(e,t){const n=hj(e,t);return _t(n)?mj(e,n):{config:{},error:n}}function mj(e,t){const n=eO(e,t);return{config:Oj(n,n.parseDiagnostics,void 0),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function gj(e,t){const n=hj(e,t);return _t(n)?eO(e,n):{fileName:e,parseDiagnostics:[n]}}function hj(e,t){let n;try{n=t(e)}catch(t){return gS(Ca.Cannot_read_file_0_Colon_1,e,t.message)}return void 0===n?gS(Ca.Cannot_read_file_0,e):n}function yj(e){return Ke(e,ej)}var vj,bj={optionDeclarations:WO,unknownOptionDiagnostic:Ca.Unknown_type_acquisition_option_0,unknownDidYouMeanDiagnostic:Ca.Unknown_type_acquisition_option_0_Did_you_mean_1};function xj(){return vj||(vj=$O(wO))}var Sj,kj,Tj,Cj={getOptionsNameMap:xj,optionDeclarations:wO,unknownOptionDiagnostic:Ca.Unknown_watch_option_0,unknownDidYouMeanDiagnostic:Ca.Unknown_watch_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:Ca.Watch_option_0_requires_a_value_of_type_1};function wj(){return Sj||(Sj=yj(FO))}function Nj(){return kj||(kj=yj(wO))}function Dj(){return Tj||(Tj=yj(WO))}var Pj,Ej={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:Ca.File_Management,disallowNullOrUndefined:!0},Fj={name:"compilerOptions",type:"object",elementOptions:wj(),extraKeyDiagnostics:oj},Aj={name:"watchOptions",type:"object",elementOptions:Nj(),extraKeyDiagnostics:Cj},Ij={name:"typeAcquisition",type:"object",elementOptions:Dj(),extraKeyDiagnostics:bj};function Oj(e,t,n){var r;const i=null==(r=e.statements[0])?void 0:r.expression;if(i&&210!==i.kind){if(t.push($p(e,i,Ca.The_root_value_of_a_0_file_must_be_an_object,"jsconfig.json"===Wo(e.fileName)?"jsconfig.json":"tsconfig.json")),tP(i)){const r=C(i.elements,nP);if(r)return Lj(e,r,t,!0,n)}return{}}return Lj(e,i,t,!0,n)}function jj(e,t){var n;return Lj(e,null==(n=e.statements[0])?void 0:n.expression,t,!0,void 0)}function Lj(e,t,n,r,i){return t?o(t,null==i?void 0:i.rootOptions):r?{}:void 0;function o(t,s){switch(t.kind){case 112:return!0;case 97:return!1;case 106:return null;case 11:return a(t)||n.push($p(e,t,Ca.String_literal_with_double_quotes_expected)),t.text;case 9:return Number(t.text);case 224:if(41!==t.operator||9!==t.operand.kind)break;return-Number(t.operand.text);case 210:return function(t,s){var c;const l=r?{}:void 0;for(const _ of t.properties){if(303!==_.kind){n.push($p(e,_,Ca.Property_assignment_expected));continue}_.questionToken&&n.push($p(e,_.questionToken,Ca.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),a(_.name)||n.push($p(e,_.name,Ca.String_literal_with_double_quotes_expected));const t=Jp(_.name)?void 0:qp(_.name),u=t&&Cc(t),d=u?null==(c=null==s?void 0:s.elementOptions)?void 0:c.get(u):void 0,p=o(_.initializer,d);void 0!==u&&(r&&(l[u]=p),null==i||i.onPropertySet(u,p,_,s,d))}return l}(t,s);case 209:return function(e,t){if(r)return O(e.map(e=>o(e,t)),e=>void 0!==e);e.forEach(e=>o(e,t))}(t.elements,s&&s.element)}s?n.push($p(e,t,Ca.Compiler_option_0_requires_a_value_of_type_1,s.name,Mj(s))):n.push($p(e,t,Ca.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}function a(t){return ON(t)&&Zm(t,e)}}function Mj(e){return"listOrElement"===e.type?`${Mj(e.element)} or Array`:"list"===e.type?"Array":_t(e.type)?e.type:"string"}function Rj(e,t){if(e){if(eL(t))return!e.disallowNullOrUndefined;if("list"===e.type)return ct(t);if("listOrElement"===e.type)return ct(t)||Rj(e.element,t);return typeof t===(_t(e.type)?e.type:"string")}return!1}function Bj(e,t,n){var r,i,o;const a=on(n.useCaseSensitiveFileNames),s=M(O(e.fileNames,(null==(i=null==(r=e.options.configFile)?void 0:r.configFileSpecs)?void 0:i.validatedIncludeSpecs)?function(e,t,n,r){if(!t)return gt;const i=Fk(e,n,t,r.useCaseSensitiveFileNames,r.getCurrentDirectory()),o=i.excludePattern&&Ak(i.excludePattern,r.useCaseSensitiveFileNames),a=i.includeFilePattern&&Ak(i.includeFilePattern,r.useCaseSensitiveFileNames);if(a)return o?e=>!(a.test(e)&&!o.test(e)):e=>!a.test(e);if(o)return e=>o.test(e);return gt}(t,e.options.configFile.configFileSpecs.validatedIncludeSpecs,e.options.configFile.configFileSpecs.validatedExcludeSpecs,n):gt),e=>ba(ta(t,n.getCurrentDirectory()),ta(e,n.getCurrentDirectory()),a)),c={configFilePath:ta(t,n.getCurrentDirectory()),useCaseSensitiveFileNames:n.useCaseSensitiveFileNames},l=Vj(e.options,c),_=e.watchOptions&&Wj(e.watchOptions,xj());const u={compilerOptions:{...Jj(l),showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0},watchOptions:_&&Jj(_),references:M(e.projectReferences,e=>({...e,path:e.originalPath?e.originalPath:"",originalPath:void 0})),files:g(s)?s:void 0,...(null==(o=e.options.configFile)?void 0:o.configFileSpecs)?{include:zj(e.options.configFile.configFileSpecs.validatedIncludeSpecs),exclude:e.options.configFile.configFileSpecs.validatedExcludeSpecs}:{},compileOnSave:!!e.compileOnSave||void 0},d=new Set(l.keys()),p={};for(const t in IS)if(!d.has(t)&&ee(IS[t].dependencies,e=>d.has(e))){IS[t].computeValue(e.options)!==IS[t].computeValue({})&&(p[t]=IS[t].computeValue(e.options))}return $e(u.compilerOptions,Jj(Vj(p,c))),u}function Jj(e){return{...We(e.entries()).reduce((e,t)=>({...e,[t[0]]:t[1]}),{})}}function zj(e){if(g(e)){if(1!==g(e))return e;if(e[0]!==nL)return e}}function qj(e){switch(e.type){case"string":case"number":case"boolean":case"object":return;case"list":case"listOrElement":return qj(e.element);default:return e.type}}function Uj(e,t){return md(t,(t,n)=>{if(t===e)return n})}function Vj(e,t){return Wj(e,HO(),t)}function Wj(e,{optionsNameMap:t},n){const r=new Map,i=n&&on(n.useCaseSensitiveFileNames);for(const o in e)if(Be(e,o)){if(t.has(o)&&(t.get(o).category===Ca.Command_line_Options||t.get(o).category===Ca.Output_Formatting))continue;const a=e[o],s=t.get(o.toLowerCase());if(s){Tn.assert("listOrElement"!==s.type);const e=qj(s);e?"list"===s.type?r.set(o,a.map(t=>Uj(t,e))):r.set(o,Uj(a,e)):n&&s.isFilePath?r.set(o,ba(n.configFilePath,ta(a,Vo(n.configFilePath)),i)):n&&"list"===s.type&&s.element.isFilePath?r.set(o,a.map(e=>ba(n.configFilePath,ta(e,Vo(n.configFilePath)),i))):r.set(o,a)}}return r}function $j(e,t){const n=Hj(e);return function(){const e=[],r=(i=2,Array(i+1).join(" "));var i;return EO.forEach(t=>{if(!n.has(t.name))return;const i=n.get(t.name),o=HL(t);i!==o?e.push(`${r}${t.name}: ${i}`):Be(GO,t.name)&&e.push(`${r}${t.name}: ${o}`)}),e.join(t)+t}()}function Hj(e){return Vj(et(e,GO))}function Kj(e,t,n){const r=Hj(e);return function(){const e=new Map;e.set(Ca.Projects,[]),e.set(Ca.Language_and_Environment,[]),e.set(Ca.Modules,[]),e.set(Ca.JavaScript_Support,[]),e.set(Ca.Emit,[]),e.set(Ca.Interop_Constraints,[]),e.set(Ca.Type_Checking,[]),e.set(Ca.Completeness,[]);for(const t of FO)if(o(t)){let n=e.get(t.category);n||e.set(t.category,n=[]),n.push(t)}let a=0,s=0;const c=[];e.forEach((e,t)=>{0!==c.length&&c.push({value:""}),c.push({value:`/* ${lS(t)} */`});for(const t of e){let e;e=r.has(t.name)?`"${t.name}": ${JSON.stringify(r.get(t.name))}${(s+=1)===r.size?"":","}`:`// "${t.name}": ${JSON.stringify(HL(t))},`,c.push({value:e,description:`/* ${t.description&&lS(t.description)||t.name} */`}),a=Math.max(e.length,a)}});const l=i(2),_=[];_.push("{"),_.push(`${l}"compilerOptions": {`),_.push(`${l}${l}/* ${lS(Ca.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`),_.push("");for(const e of c){const{value:t,description:n=""}=e;_.push(t&&`${l}${l}${t}${n&&i(a-t.length+2)+n}`)}if(t.length){_.push(`${l}},`),_.push(`${l}"files": [`);for(let e=0;e"object"==typeof e,"object"),n=h(y("files"));if(n){const r="no-prop"===e||ct(e)&&0===e.length,i=Be(d,"extends");if(0===n.length&&r&&!i)if(t){const e=a||"tsconfig.json",n=Ca.The_files_list_in_config_file_0_is_empty,r=nm(t,"files",e=>e.initializer),i=CL(t,r,n,e);_.push(i)}else b(Ca.The_files_list_in_config_file_0_is_empty,a||"tsconfig.json")}let r=h(y("include"));const i=y("exclude");let o,s,c,l,u=!1,f=h(i);if("no-prop"===i){const e=p.outDir,t=p.declarationDir;(e||t)&&(f=O([e,t],e=>!!e))}void 0===n&&void 0===r&&(r=[nL],u=!0);r&&(o=RL(r,_,!0,t,"include"),c=lL(o,m)||o);f&&(s=RL(f,_,!1,t,"exclude"),l=lL(s,m)||s);const g=O(n,_t),x=lL(g,m)||g;return{filesSpecs:n,includeSpecs:r,excludeSpecs:f,validatedFilesSpec:x,validatedIncludeSpecs:c,validatedExcludeSpecs:l,validatedFilesSpecBeforeSubstitution:g,validatedIncludeSpecsBeforeSubstitution:o,validatedExcludeSpecsBeforeSubstitution:s,pathPatterns:void 0,isDefaultIncludeSpec:u}}();return t&&(t.configFileSpecs=g),Zj(p,t),{options:p,watchOptions:f,fileNames:function(e){const t=IL(g,e,p,n,c);dL(t,pL(d),s)&&_.push(uL(g,a));return t}(m),projectReferences:function(e){let t;const n=v("references",e=>"object"==typeof e,"object");if(ct(n))for(const r of n)"string"!=typeof r.path?b(Ca.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(t||(t=[])).push({path:ta(r.path,e),originalPath:r.path,prepend:r.prepend,circular:r.circular});return t}(m),typeAcquisition:u.typeAcquisition||SL(),raw:d,errors:_,wildcardDirectories:JL(g,m,n.useCaseSensitiveFileNames),compileOnSave:!!d.compileOnSave};function h(e){return ct(e)?e:void 0}function y(e){return v(e,_t,"string")}function v(e,n,r){if(Be(d,e)&&!eL(d[e])){if(ct(d[e])){const i=d[e];return t||T(i,n)||_.push(gS(Ca.Compiler_option_0_requires_a_value_of_type_1,e,r)),i}return b(Ca.Compiler_option_0_requires_a_value_of_type_1,e,"Array"),"not-array"}return"no-prop"}function b(e,...n){t||_.push(gS(e,...n))}}function iL(e,t){return oL(e,JO,t)}function oL(e,t,n){if(!e)return e;let r;for(const r of t)if(void 0!==e[r.name]){const t=e[r.name];switch(r.type){case"string":Tn.assert(r.isFilePath),sL(t)&&i(r,cL(t,n));break;case"list":Tn.assert(r.element.isFilePath);const e=lL(t,n);e&&i(r,e);break;case"object":Tn.assert("paths"===r.name);const o=_L(t,n);o&&i(r,o);break;default:Tn.fail("option type not supported")}}return r||e;function i(t,n){(r??(r=$e({},e)))[t.name]=n}}var aL="${configDir}";function sL(e){return _t(e)&&ln(e,aL,!0)}function cL(e,t){return ta(e.replace(aL,"./"),t)}function lL(e,t){if(!e)return e;let n;return e.forEach((r,i)=>{sL(r)&&((n??(n=e.slice()))[i]=cL(r,t))}),n}function _L(e,t){let n;return ze(e).forEach(r=>{if(!ct(e[r]))return;const i=lL(e[r],t);i&&((n??(n=$e({},e)))[r]=i)}),n}function uL({includeSpecs:e,excludeSpecs:t},n){return gS(Ca.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,n||"tsconfig.json",JSON.stringify(e||[]),JSON.stringify(t||[]))}function dL(e,t,n){return 0===e.length&&t&&(!n||0===n.length)}function pL(e){return!Be(e,"files")&&!Be(e,"references")}function fL(e,t,n,r,i){const o=r.length;return dL(e,i)?r.push(uL(n,t)):j(r,e=>!function(e){return e.code===Ca.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}(e)),o!==r.length}function mL(e,t,n,r,i,o,a,s){var c;const l=ta(i||"",r=Xo(r));if(o.includes(l))return a.push(gS(Ca.Circularity_detected_while_resolving_configuration_Colon_0,[...o,l].join(" -> "))),{raw:e||jj(t,a)};const _=e?function(e,t,n,r,i){Be(e,"excludes")&&i.push(gS(Ca.Unknown_option_excludes_Did_you_mean_exclude));const o=xL(e.compilerOptions,n,i,r),a=kL(e.typeAcquisition,n,i,r),s=function(e,t,n){return TL(Nj(),e,t,void 0,Cj,n)}(e.watchOptions,n,i);e.compileOnSave=function(e,t,n){if(!Be(e,bO.name))return!1;const r=wL(bO,e.compileOnSave,t,n);return"boolean"==typeof r&&r}(e,n,i);const c=e.extends||""===e.extends?gL(e.extends,t,n,r,i):void 0;return{raw:e,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:c}}(e,n,r,i,a):function(e,t,n,r,i){const o=bL(r);let a,s,c,l;const _=(void 0===Pj&&(Pj={name:void 0,type:"object",elementOptions:yj([Fj,Aj,Ij,Ej,{name:"references",type:"list",element:{name:"references",type:"object"},category:Ca.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:Ca.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:Ca.File_Management,defaultValueDescription:Ca.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:Ca.File_Management,defaultValueDescription:Ca.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},bO])}),Pj),u=Oj(e,i,{rootOptions:_,onPropertySet:d});a||(a=SL(r));l&&u&&void 0===u.compilerOptions&&i.push($p(e,l[0],Ca._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file,qp(l[0])));return{raw:u,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:c};function d(u,d,p,f,m){if(m&&m!==Ej&&(d=wL(m,d,n,i,p,p.initializer,e)),null==f?void 0:f.name)if(m){let e;f===Fj?e=o:f===Aj?e=s??(s={}):f===Ij?e=a??(a=SL(r)):Tn.fail("Unknown option"),e[m.name]=d}else u&&(null==f?void 0:f.extraKeyDiagnostics)&&(f.elementOptions?i.push(tj(u,f.extraKeyDiagnostics,void 0,p.name,e)):i.push($p(e,p.name,f.extraKeyDiagnostics.unknownOptionDiagnostic,u)));else f===_&&(m===Ej?c=gL(d,t,n,r,i,p,p.initializer,e):m||("excludes"===u&&i.push($p(e,p.name,Ca.Unknown_option_excludes_Did_you_mean_exclude)),C(EO,e=>e.name===u)&&(l=pe(l,p.name))))}}(t,n,r,i,a);if((null==(c=_.options)?void 0:c.paths)&&(_.options.pathsBasePath=r),_.extendedConfigPath){o=o.concat([l]);const e={options:{}};_t(_.extendedConfigPath)?u(e,_.extendedConfigPath):_.extendedConfigPath.forEach(t=>u(e,t)),e.include&&(_.raw.include=e.include),e.exclude&&(_.raw.exclude=e.exclude),e.files&&(_.raw.files=e.files),void 0===_.raw.compileOnSave&&e.compileOnSave&&(_.raw.compileOnSave=e.compileOnSave),t&&e.extendedSourceFiles&&(t.extendedSourceFiles=We(e.extendedSourceFiles.keys())),_.options=$e(e.options,_.options),_.watchOptions=_.watchOptions&&e.watchOptions?$e(e.watchOptions,_.watchOptions):_.watchOptions||e.watchOptions}return _;function u(e,i){const c=function(e,t,n,r,i,o,a){const s=n.useCaseSensitiveFileNames?t:xt(t);let c,l,_;o&&(c=o.get(s))?({extendedResult:l,extendedConfig:_}=c):(l=gj(t,e=>n.readFile(e)),l.parseDiagnostics.length||(_=mL(void 0,l,n,Vo(t),Wo(t),r,i,o)),o&&o.set(s,{extendedResult:l,extendedConfig:_}));if(e&&((a.extendedSourceFiles??(a.extendedSourceFiles=new Set)).add(l.fileName),l.extendedSourceFiles))for(const e of l.extendedSourceFiles)a.extendedSourceFiles.add(e);if(l.parseDiagnostics.length)return void i.push(...l.parseDiagnostics);return _}(t,i,n,o,a,s,e);if(c&&c.options){const t=c.raw;let o;const a=a=>{_.raw[a]||t[a]&&(e[a]=M(t[a],e=>sL(e)||Ao(e)?e:Yo(o||(o=va(Vo(i),r,on(n.useCaseSensitiveFileNames))),e)))};a("include"),a("exclude"),a("files"),void 0!==t.compileOnSave&&(e.compileOnSave=t.compileOnSave),$e(e.options,c.options),e.watchOptions=e.watchOptions&&c.watchOptions?$e({},e.watchOptions,c.watchOptions):e.watchOptions||c.watchOptions}}}function gL(e,t,n,r,i,o,a,s){let c;const l=r?tL(r,n):n;if(_t(e))c=hL(e,t,l,i,a,s);else if(ct(e)){c=[];for(let r=0;rCL(i,r,e,...t)))}function PL(e,t,n,r,i,o,a){return O(M(t,(t,s)=>wL(e.element,t,n,r,i,null==o?void 0:o.elements[s],a)),t=>!!e.listPreserveFalsyValues||!!t)}var EL,FL=/(^|\/)\*\*\/?$/,AL=/^[^*?]*(?=\/[^/]*[*?])/;function IL(e,t,n,r,i=p){t=na(t);const o=on(r.useCaseSensitiveFileNames),a=new Map,s=new Map,c=new Map,{validatedFilesSpec:l,validatedIncludeSpecs:_,validatedExcludeSpecs:u}=e,d=Gk(n,i),f=Xk(n,d);if(l)for(const e of l){const n=ta(e,t);a.set(o(n),n)}let m;if(_&&_.length>0)for(const e of r.readDirectory(t,J(f),u,_,void 0)){if(Ro(e,".json")){if(!m){const e=M(wk(_.filter(e=>Xt(e,".json")),t,"files"),e=>`^${e}$`);m=e?e.map(e=>Ak(e,r.useCaseSensitiveFileNames)):p}if(-1!==N(m,t=>t.test(e))){const t=o(e);a.has(t)||c.has(t)||c.set(t,e)}continue}if(UL(e,a,s,d,o))continue;VL(e,s,d,o);const n=o(e);a.has(n)||s.has(n)||s.set(n,e)}const g=We(a.values()),h=We(s.values());return g.concat(h,We(c.values()))}function OL(e,t,n,r,i){const{validatedFilesSpec:o,validatedIncludeSpecs:a,validatedExcludeSpecs:s}=t;if(!g(a)||!g(s))return!1;n=na(n);const c=on(r);if(o)for(const t of o)if(c(ta(t,n))===e)return!1;return ML(e,s,r,i,n)}function jL(e){const t=ln(e,"**/")?0:e.indexOf("/**/");if(-1===t)return!1;return(Xt(e,"/..")?e.length:e.lastIndexOf("/../"))>t}function LL(e,t,n,r){return ML(e,O(t,e=>!jL(e)),n,r)}function ML(e,t,n,r,i){const o=Ck(t,Yo(na(r),i),"exclude"),a=o&&Ak(o,n);return!!a&&(!!a.test(e)||!Mo(e)&&a.test(aa(e)))}function RL(e,t,n,r,i){return e.filter(e=>{if(!_t(e))return!1;const o=BL(e,n);return void 0!==o&&t.push(function(e,t){const n=tm(r,i,t);return CL(r,n,e,t)}(...o)),void 0===o})}function BL(e,t){return Tn.assert("string"==typeof e),t&&FL.test(e)?[Ca.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:jL(e)?[Ca.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:void 0}function JL({validatedIncludeSpecs:e,validatedExcludeSpecs:t},n,r){const i=Ck(t,n,"exclude"),o=i&&new RegExp(i,r?"":"i"),a={},s=new Map;if(void 0!==e){const t=[];for(const i of e){const e=na(Yo(n,i));if(o&&o.test(e))continue;const c=qL(e,r);if(c){const{key:e,path:n,flags:r}=c,i=s.get(e),o=void 0!==i?a[i]:void 0;(void 0===o||oBo(e,t)?t:void 0);if(!o)return!1;for(const r of o){if(Ro(e,r)&&(".ts"!==r||!Ro(e,".d.ts")))return!1;const o=i(lT(e,r));if(t.has(o)||n.has(o)){if(".d.ts"===r&&(Ro(e,".js")||Ro(e,".jsx")))continue;return!0}}return!1}function VL(e,t,n,r){const i=h(n,t=>Bo(e,t)?t:void 0);if(i)for(let n=i.length-1;n>=0;n--){const o=i[n];if(Ro(e,o))return;const a=r(lT(e,o));t.delete(a)}}function WL(e){const t={};for(const n in e)if(Be(e,n)){const r=sj(n);void 0!==r&&(t[n]=$L(e[n],r))}return t}function $L(e,t){if(void 0===e)return e;switch(t.type){case"object":case"string":return"";case"number":return"number"==typeof e?e:"";case"boolean":return"boolean"==typeof e?e:"";case"listOrElement":if(!ct(e))return $L(e,t.element);case"list":const n=t.element;return ct(e)?$(e,e=>$L(e,n)):"";default:return md(t.type,(t,n)=>{if(t===e)return n})}}function HL(e){switch(e.type){case"number":return 1;case"boolean":return!0;case"string":const t=e.defaultValueDescription;return e.isFilePath?`./${t&&"string"==typeof t?t:""}`:"";case"list":return[];case"listOrElement":return HL(e.element);case"object":return{};default:const n=we(e.type.keys());return void 0!==n?n:Tn.fail("Expected 'option.type' to have entries.")}}function KL(e,t,...n){e.trace(mS(t,...n))}function GL(e,t){return!!e.traceResolution&&void 0!==t.trace}function XL(e,t,n){let r;if(t&&e){const i=e.contents.packageJsonContent;"string"==typeof i.name&&"string"==typeof i.version&&(r={name:i.name,subModuleName:t.path.slice(e.packageDirectory.length+wo.length),version:i.version,peerDependencies:uR(e,n)})}return t&&{path:t.path,extension:t.ext,packageId:r,resolvedUsingTsExtension:t.resolvedUsingTsExtension}}function QL(e){return XL(void 0,e,void 0)}function YL(e){if(e)return Tn.assert(void 0===e.packageId),{path:e.path,ext:e.extension,resolvedUsingTsExtension:e.resolvedUsingTsExtension}}function ZL(e){const t=[];return 1&e&&t.push("TypeScript"),2&e&&t.push("JavaScript"),4&e&&t.push("Declaration"),8&e&&t.push("JSON"),t.join(", ")}function eM(e){if(e)return Tn.assert(pT(e.extension)),{fileName:e.path,packageId:e.packageId}}function tM(e,t,n,r,i,o,a,s,c){if(!a.resultFromCache&&!a.compilerOptions.preserveSymlinks&&t&&n&&!t.originalPath&&!Js(e)){const{resolvedFileName:e,originalPath:n}=dM(t.path,a.host,a.traceEnabled);n&&(t={...t,path:e,originalPath:n})}return nM(t,n,r,i,o,a.resultFromCache,s,c)}function nM(e,t,n,r,i,o,a,s){return o?(null==a?void 0:a.isReadonly)?{...o,failedLookupLocations:oM(o.failedLookupLocations,n),affectingLocations:oM(o.affectingLocations,r),resolutionDiagnostics:oM(o.resolutionDiagnostics,i)}:(o.failedLookupLocations=iM(o.failedLookupLocations,n),o.affectingLocations=iM(o.affectingLocations,r),o.resolutionDiagnostics=iM(o.resolutionDiagnostics,i),o):{resolvedModule:e&&{resolvedFileName:e.path,originalPath:!0===e.originalPath?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:t,packageId:e.packageId,resolvedUsingTsExtension:!!e.resolvedUsingTsExtension},failedLookupLocations:rM(n),affectingLocations:rM(r),resolutionDiagnostics:rM(i),alternateResult:s}}function rM(e){return e.length?e:void 0}function iM(e,t){return(null==t?void 0:t.length)?(null==e?void 0:e.length)?(e.push(...t),e):t:e}function oM(e,t){return(null==e?void 0:e.length)?t.length?[...e,...t]:e.slice():rM(t)}function aM(e,t,n,r){if(!Be(e,t))return void(r.traceEnabled&&KL(r.host,Ca.package_json_does_not_have_a_0_field,t));const i=e[t];if(typeof i===n&&null!==i)return i;r.traceEnabled&&KL(r.host,Ca.Expected_type_of_0_field_in_package_json_to_be_1_got_2,t,n,null===i?"null":typeof i)}function sM(e,t,n,r){const i=aM(e,t,"string",r);if(void 0===i)return;if(!i)return void(r.traceEnabled&&KL(r.host,Ca.package_json_had_a_falsy_0_field,t));const o=na(Yo(n,i));return r.traceEnabled&&KL(r.host,Ca.package_json_has_0_field_1_that_references_2,t,i,o),o}function cM(e,t){const n=function(e,t){const n=aM(e,"typesVersions","object",t);if(void 0!==n)return t.traceEnabled&&KL(t.host,Ca.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),n}(e,t);if(void 0===n)return;if(t.traceEnabled)for(const e in n)Be(n,e)&&!jn.tryParse(e)&&KL(t.host,Ca.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,e);const r=lM(n);if(!r)return void(t.traceEnabled&&KL(t.host,Ca.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,c));const{version:i,paths:o}=r;if("object"==typeof o)return r;t.traceEnabled&&KL(t.host,Ca.Expected_type_of_0_field_in_package_json_to_be_1_got_2,`typesVersions['${i}']`,"object",typeof o)}function lM(e){EL||(EL=new In(u));for(const t in e){if(!Be(e,t))continue;const n=jn.tryParse(t);if(void 0!==n&&n.test(EL))return{version:t,paths:e[t]}}}function _M(e,t){if(e.typeRoots)return e.typeRoots;let n;return e.configFilePath?n=Vo(e.configFilePath):t.getCurrentDirectory&&(n=t.getCurrentDirectory()),void 0!==n?function(e){let t;return Sa(na(e),e=>{const n=Yo(e,uM);(t??(t=[])).push(n)}),t}(n):void 0}var uM=Yo("node_modules","@types");function dM(e,t,n){const r=$M(e,t,n),i=function(e,t,n){return 0===fa(e,t,!("function"==typeof n.useCaseSensitiveFileNames?n.useCaseSensitiveFileNames():n.useCaseSensitiveFileNames))}(e,r,t);return{resolvedFileName:i?e:r,originalPath:i?void 0:e}}function pM(e,t,n){return Yo(e,Xt(e,"/node_modules/@types")||Xt(e,"/node_modules/@types/")?DR(t,n):t)}function fM(e,t,n,r,i,o,a){Tn.assert("string"==typeof e,"Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");const s=GL(n,r);i&&(n=i.commandLine.options);const c=t?Vo(t):void 0;let l=c?null==o?void 0:o.getFromDirectoryCache(e,a,c,i):void 0;if(l||!c||Js(e)||(l=null==o?void 0:o.getFromNonRelativeNameCache(e,a,c,i)),l)return s&&(KL(r,Ca.Resolving_type_reference_directive_0_containing_file_1,e,t),i&&KL(r,Ca.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName),KL(r,Ca.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1,e,c),S(l)),l;const _=_M(n,r);s&&(void 0===t?void 0===_?KL(r,Ca.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,e):KL(r,Ca.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,e,_):void 0===_?KL(r,Ca.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,e,t):KL(r,Ca.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,e,t,_),i&&KL(r,Ca.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName));const u=[],d=[];let p=mM(n);void 0!==a&&(p|=30);const f=LS(n);99===a&&3<=f&&f<=99&&(p|=32);const m=8&p?gM(n,a):[],g=[],h={compilerOptions:n,host:r,traceEnabled:s,failedLookupLocations:u,affectingLocations:d,packageJsonInfoCache:o,features:p,conditions:m,requestContainingDirectory:c,reportDiagnostic:e=>{g.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let y,b=function(){if(_&&_.length)return s&&KL(r,Ca.Resolving_with_primary_search_path_0,_.join(", ")),v(_,t=>{const i=pM(t,e,h),o=Hb(t,r);if(!o&&s&&KL(r,Ca.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n.typeRoots){const e=ZM(4,i,!o,h);if(e){const t=XM(e.path);return eM(XL(t?dR(t,!1,h):void 0,e,h))}}return eM(oR(4,i,!o,h))});s&&KL(r,Ca.Root_directory_cannot_be_determined_skipping_primary_search_paths)}(),x=!0;if(b||(b=function(){const i=t&&Vo(t);if(void 0!==i){let o;if(n.typeRoots&&Xt(t,CV))s&&KL(r,Ca.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);else if(s&&KL(r,Ca.Looking_up_in_node_modules_folder_initial_location_0,i),Js(e)){const{path:t}=WM(i,e);o=HM(4,t,!1,h,!0)}else{const t=SR(4,e,i,h,void 0,void 0);o=t&&t.value}return eM(o)}s&&KL(r,Ca.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}(),x=!1),b){const{fileName:e,packageId:t}=b;let i,o=e;n.preserveSymlinks||({resolvedFileName:o,originalPath:i}=dM(e,r,s)),y={primary:x,resolvedFileName:o,originalPath:i,packageId:t,isExternalLibraryImport:GM(e)}}return l={resolvedTypeReferenceDirective:y,failedLookupLocations:rM(u),affectingLocations:rM(d),resolutionDiagnostics:rM(g)},c&&o&&!o.isReadonly&&(o.getOrCreateCacheForDirectory(c,i).set(e,a,l),Js(e)||o.getOrCreateCacheForNonRelativeName(e,a,i).set(c,l)),s&&S(l),l;function S(t){var n;(null==(n=t.resolvedTypeReferenceDirective)?void 0:n.resolvedFileName)?t.resolvedTypeReferenceDirective.packageId?KL(r,Ca.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,e,t.resolvedTypeReferenceDirective.resolvedFileName,Td(t.resolvedTypeReferenceDirective.packageId),t.resolvedTypeReferenceDirective.primary):KL(r,Ca.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,e,t.resolvedTypeReferenceDirective.resolvedFileName,t.resolvedTypeReferenceDirective.primary):KL(r,Ca.Type_reference_directive_0_was_not_resolved,e)}}function mM(e){let t=0;switch(LS(e)){case 3:case 99:case 100:t=30}return e.resolvePackageJsonExports?t|=8:!1===e.resolvePackageJsonExports&&(t&=-9),e.resolvePackageJsonImports?t|=2:!1===e.resolvePackageJsonImports&&(t&=-3),t}function gM(e,t){const n=LS(e);if(void 0===t)if(100===n)t=99;else if(2===n)return[];const r=99===t?["import"]:["require"];return e.noDtsResolution||r.push("types"),100!==n&&r.push("node"),ne(r,e.customConditions)}function hM(e,t,n,r,i){const o=cR(null==i?void 0:i.getPackageJsonInfoCache(),r,n);return Sa(t,t=>{if("node_modules"!==Wo(t)){const n=Yo(t,"node_modules");return dR(Yo(n,e),!1,o)}})}function yM(e,t){if(e.types)return e.types;const n=[];if(t.directoryExists&&t.getDirectories){const r=_M(e,t);if(r)for(const e of r)if(t.directoryExists(e))for(const r of t.getDirectories(e)){const i=na(r),o=Yo(e,i,"package.json");if(!(t.fileExists(o)&&null===Wb(o,t).typings)){const e=Wo(i);46!==e.charCodeAt(0)&&n.push(e)}}}return n}function vM(e){return!!(null==e?void 0:e.contents)}function bM(e){return!!e&&!e.contents}function xM(e){var t;if(null===e||"object"!=typeof e)return""+e;if(ct(e))return`[${null==(t=e.map(e=>xM(e)))?void 0:t.join(",")}]`;let n="{";for(const t in e)Be(e,t)&&(n+=`${t}: ${xM(e[t])}`);return n+"}"}function SM(e,t){return t.map(t=>xM(sk(e,t))).join("|")+`|${e.pathsBasePath}`}function kM(e,t){const n=new Map,r=new Map;let i=new Map;return e&&n.set(e,i),{getMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!1):i},getOrCreateMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!0):i},update:function(t){e!==t&&(e?i=o(t,!0):n.set(t,i),e=t)},clear:function(){const o=e&&t.get(e);i.clear(),n.clear(),t.clear(),r.clear(),e&&(o&&t.set(e,o),n.set(e,i))},getOwnMap:()=>i};function o(t,o){let s=n.get(t);if(s)return s;const c=a(t);if(s=r.get(c),!s){if(e){const t=a(e);t===c?s=i:r.has(t)||r.set(t,i)}o&&(s??(s=new Map)),s&&r.set(c,s)}return s&&n.set(t,s),s}function a(e){let n=t.get(e);return n||t.set(e,n=SM(e,jO)),n}}function TM(e,t,n,r){const i=e.getOrCreateMapOfCacheRedirects(t);let o=i.get(n);return o||(o=r(),i.set(n,o)),o}function CM(e,t){return void 0===t?e:`${t}|${e}`}function wM(){const e=new Map,t=new Map,n={get:(t,n)=>e.get(r(t,n)),set:(t,i,o)=>(e.set(r(t,i),o),n),delete:(t,i)=>(e.delete(r(t,i)),n),has:(t,n)=>e.has(r(t,n)),forEach:n=>e.forEach((e,r)=>{const[i,o]=t.get(r);return n(e,i,o)}),size:()=>e.size};return n;function r(e,n){const r=CM(e,n);return t.set(r,[e,n]),r}}function NM(e){return e.resolvedModule&&(e.resolvedModule.originalPath||e.resolvedModule.resolvedFileName)}function DM(e){return e.resolvedTypeReferenceDirective&&(e.resolvedTypeReferenceDirective.originalPath||e.resolvedTypeReferenceDirective.resolvedFileName)}function PM(e,t,n,r,i){const o=kM(n,i);return{getFromNonRelativeNameCache:function(e,t,n,r){var i,a;return Tn.assert(!Js(e)),null==(a=null==(i=o.getMapOfCacheRedirects(r))?void 0:i.get(CM(e,t)))?void 0:a.get(n)},getOrCreateCacheForNonRelativeName:function(e,t,n){return Tn.assert(!Js(e)),TM(o,n,CM(e,t),a)},clear:function(){o.clear()},update:function(e){o.update(e)}};function a(){const n=new Map;return{get:function(r){return n.get(ia(r,e,t))},set:function(i,o){const a=ia(i,e,t);if(n.has(a))return;n.set(a,o);const s=r(o),c=s&&function(n,r){const i=ia(Vo(r),e,t);let o=0;const a=Math.min(n.length,i.length);for(;owM())},clear:function(){i.clear()},update:function(e){i.update(e)},directoryToModuleNameMap:i}}(e,t,n,o),s=PM(e,t,n,i,o);return r??(r=function(e,t){let n;return{getPackageJsonInfo:function(r){return null==n?void 0:n.get(ia(r,e,t))},setPackageJsonInfo:function(r,i){(n||(n=new Map)).set(ia(r,e,t),i)},clear:function(){n=void 0},getInternalMap:function(){return n}}}(e,t)),{...r,...a,...s,clear:function(){c(),r.clear()},update:function(e){a.update(e),s.update(e)},getPackageJsonInfoCache:()=>r,clearAllExceptPackageJsonInfoCache:c,optionsToRedirectsKey:o};function c(){a.clear(),s.clear()}}function FM(e,t,n,r,i){const o=EM(e,t,n,r,NM,i);return o.getOrCreateCacheForModuleName=(e,t,n)=>o.getOrCreateCacheForNonRelativeName(e,t,n),o}function AM(e,t,n,r,i){return EM(e,t,n,r,DM,i)}function IM(e){return{moduleResolution:2,traceResolution:e.traceResolution}}function OM(e,t,n,r,i){return LM(e,t,IM(n),r,i)}function jM(e,t,n,r){const i=Vo(t);return n.getFromDirectoryCache(e,r,i,void 0)}function LM(e,t,n,r,i,o,a){var s,c,l;const _=GL(n,r);o&&(n=o.commandLine.options),_&&(KL(r,Ca.Resolving_module_0_from_1,e,t),o&&KL(r,Ca.Using_compiler_options_of_project_reference_redirect_0,o.sourceFile.fileName));const u=Vo(t);let d=null==i?void 0:i.getFromDirectoryCache(e,a,u,o);if(d)_&&KL(r,Ca.Resolution_for_module_0_was_found_in_cache_from_location_1,e,u);else{let p=n.moduleResolution;switch(void 0===p?(p=LS(n),_&&KL(r,Ca.Module_resolution_kind_is_not_specified_using_0,ki[p])):_&&KL(r,Ca.Explicitly_specified_module_resolution_kind_Colon_0,ki[p]),null==(s=ir)||s.logStartResolveModule(e),p){case 3:case 99:d=function(e,t,n,r,i,o,a){return JM(30,e,t,n,r,i,o,a)}(e,t,n,r,i,o,a);break;case 2:d=qM(e,t,n,r,i,o,a?gM(n,a):void 0);break;case 1:d=OR(e,t,n,r,i,o);break;case 100:d=zM(e,t,n,r,i,o,a?gM(n,a):void 0);break;default:return Tn.fail(`Unexpected moduleResolution: ${p}`)}d&&d.resolvedModule&&(null==(c=ir)||c.logInfoEvent(`Module "${e}" resolved to "${d.resolvedModule.resolvedFileName}"`)),null==(l=ir)||l.logStopResolveModule(d&&d.resolvedModule?""+d.resolvedModule.resolvedFileName:"null"),i&&!i.isReadonly&&(i.getOrCreateCacheForDirectory(u,o).set(e,a,d),Js(e)||i.getOrCreateCacheForNonRelativeName(e,a,o).set(u,d))}return _&&(d.resolvedModule?d.resolvedModule.packageId?KL(r,Ca.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,e,d.resolvedModule.resolvedFileName,Td(d.resolvedModule.packageId)):KL(r,Ca.Module_name_0_was_successfully_resolved_to_1,e,d.resolvedModule.resolvedFileName):KL(r,Ca.Module_name_0_was_not_resolved,e)),d}function MM(e,t,n,r,i){const o=function(e,t,n,r){var i;const{baseUrl:o,paths:a,configFile:s}=r.compilerOptions;if(a&&!jo(t)){r.traceEnabled&&(o&&KL(r.host,Ca.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,o,t),KL(r.host,Ca.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,t));return wR(e,t,lv(r.compilerOptions,r.host),a,(null==s?void 0:s.configFileSpecs)?(i=s.configFileSpecs).pathPatterns||(i.pathPatterns=uT(a)):void 0,n,!1,r)}}(e,t,r,i);return o?o.value:Js(t)?function(e,t,n,r,i){if(!i.compilerOptions.rootDirs)return;i.traceEnabled&&KL(i.host,Ca.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,t);const o=na(Yo(n,t));let a,s;for(const e of i.compilerOptions.rootDirs){let t=na(e);Xt(t,wo)||(t+=wo);const n=ln(o,t)&&(void 0===s||s.length(e[e.None=0]="None",e[e.Imports=2]="Imports",e[e.SelfName=4]="SelfName",e[e.Exports=8]="Exports",e[e.ExportsPatternTrailers=16]="ExportsPatternTrailers",e[e.AllFeatures=30]="AllFeatures",e[e.Node16Default=30]="Node16Default",e[e.NodeNextDefault=30]="NodeNextDefault",e[e.BundlerDefault=30]="BundlerDefault",e[e.EsmMode=32]="EsmMode",e))(BM||{});function JM(e,t,n,r,i,o,a,s,c){const l=Vo(n),_=99===s?32:0;let u=r.noDtsResolution?3:7;return US(r)&&(u|=8),VM(e|_,t,l,r,i,o,u,!1,a,c)}function zM(e,t,n,r,i,o,a){const s=Vo(t);let c=n.noDtsResolution?3:7;return US(n)&&(c|=8),VM(mM(n),e,s,n,r,i,c,!1,o,a)}function qM(e,t,n,r,i,o,a,s){let c;return s?c=8:n.noDtsResolution?(c=3,US(n)&&(c|=8)):c=US(n)?15:7,VM(a?30:0,e,Vo(t),n,r,i,c,!!s,o,a)}function UM(e,t,n){return VM(30,e,Vo(t),{moduleResolution:99},n,void 0,8,!0,void 0,void 0)}function VM(e,t,n,r,i,o,a,s,c,l){var _,u,d,f,m;const h=GL(r,i),y=[],v=[],b=LS(r);l??(l=gM(r,100===b||2===b?void 0:32&e?99:1));const x=[],S={compilerOptions:r,host:i,traceEnabled:h,failedLookupLocations:y,affectingLocations:v,packageJsonInfoCache:o,features:e,conditions:l??p,requestContainingDirectory:n,reportDiagnostic:e=>{x.push(e)},isConfigLookup:s,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let k,C;if(h&&ek(b)&&KL(i,Ca.Resolving_in_0_mode_with_conditions_1,32&e?"ESM":"CJS",S.conditions.map(e=>`'${e}'`).join(", ")),2===b){const e=5&a,t=-6&a;k=e&&w(e,S)||t&&w(t,S)||void 0}else k=w(a,S);if(S.resolvedPackageDirectory&&!s&&!Js(t)){const t=(null==k?void 0:k.value)&&5&a&&!fR(5,k.value.resolved.extension);if((null==(_=null==k?void 0:k.value)?void 0:_.isExternalLibraryImport)&&t&&8&e&&(null==l?void 0:l.includes("import"))){BR(S,Ca.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);const e=w(5&a,{...S,features:-9&S.features,reportDiagnostic:ft});(null==(u=null==e?void 0:e.value)?void 0:u.isExternalLibraryImport)&&(C=e.value.resolved.path)}else if((!(null==k?void 0:k.value)||t)&&2===b){BR(S,Ca.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);const e={...S.compilerOptions,moduleResolution:100},t=w(5&a,{...S,compilerOptions:e,features:30,conditions:gM(e),reportDiagnostic:ft});(null==(d=null==t?void 0:t.value)?void 0:d.isExternalLibraryImport)&&(C=t.value.resolved.path)}}return tM(t,null==(f=null==k?void 0:k.value)?void 0:f.resolved,null==(m=null==k?void 0:k.value)?void 0:m.isExternalLibraryImport,y,v,x,S,o,C);function w(r,a){const s=MM(r,t,n,(e,t,n,r)=>HM(e,t,n,r,!0),a);if(s)return RR({resolved:s,isExternalLibraryImport:GM(s.path)});if(Js(t)){const{path:e,parts:i}=WM(n,t),o=HM(r,e,!1,a,!0);return o&&RR({resolved:o,isExternalLibraryImport:E(i,"node_modules")})}{let s;if(2&e&&ln(t,"#")&&(s=function(e,t,n,r,i,o){var a,s;if("#"===t||ln(t,"#/"))return r.traceEnabled&&KL(r.host,Ca.Invalid_import_specifier_0_has_no_possible_resolutions,t),RR(void 0);const c=ta(Yo(n,"dummy"),null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),l=lR(c,r);if(!l)return r.traceEnabled&&KL(r.host,Ca.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve,c),RR(void 0);if(!l.contents.packageJsonContent.imports)return r.traceEnabled&&KL(r.host,Ca.package_json_scope_0_has_no_imports_defined,l.packageDirectory),RR(void 0);const _=vR(e,r,i,o,t,l.contents.packageJsonContent.imports,l,!0);if(_)return _;r.traceEnabled&&KL(r.host,Ca.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1,t,l.packageDirectory);return RR(void 0)}(r,t,n,a,o,c)),!s&&4&e&&(s=function(e,t,n,r,i,o){var a,s;const c=ta(Yo(n,"dummy"),null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),l=lR(c,r);if(!l||!l.contents.packageJsonContent.exports)return;if("string"!=typeof l.contents.packageJsonContent.name)return;const _=Ko(t),u=Ko(l.contents.packageJsonContent.name);if(!T(u,(e,t)=>_[t]===e))return;const d=_.slice(u.length),p=g(d)?`.${wo}${d.join(wo)}`:".";if(KS(r.compilerOptions)&&!GM(n))return hR(l,e,p,r,i,o);const f=5&e,m=-6&e;return hR(l,f,p,r,i,o)||hR(l,m,p,r,i,o)}(r,t,n,a,o,c)),!s){if(t.includes(":"))return void(h&&KL(i,Ca.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1,t,ZL(r)));h&&KL(i,Ca.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1,t,ZL(r)),s=SR(r,t,n,a,o,c)}return 4&r&&(s??(s=jR(t,a))),s&&{value:s.value&&{resolved:s.value,isExternalLibraryImport:!0}}}}}function WM(e,t){const n=Yo(e,t),r=Ko(n),i=Pe(r);return{path:"."===i||".."===i?aa(na(n)):na(n),parts:r}}function $M(e,t,n){if(!t.realpath)return e;const r=na(t.realpath(e));return n&&KL(t,Ca.Resolving_real_path_for_0_result_1,e,r),r}function HM(e,t,n,r,i){if(r.traceEnabled&&KL(r.host,Ca.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1,t,ZL(e)),!Jo(t)){if(!n){const e=Vo(t);Hb(e,r.host)||(r.traceEnabled&&KL(r.host,Ca.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!0)}const o=ZM(e,t,n,r);if(o){const e=i?XM(o.path):void 0;return XL(e?dR(e,!1,r):void 0,o,r)}}if(!n){Hb(t,r.host)||(r.traceEnabled&&KL(r.host,Ca.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n=!0)}if(!(32&r.features))return oR(e,t,n,r,i)}var KM="/node_modules/";function GM(e){return e.includes(KM)}function XM(e,t){const n=na(e),r=n.lastIndexOf(KM);if(-1===r)return;const i=r+KM.length;let o=QM(n,i,t);return 64===n.charCodeAt(i)&&(o=QM(n,o,t)),n.slice(0,o)}function QM(e,t,n){const r=e.indexOf(wo,t+1);return-1===r?n?e.length:t:r}function YM(e,t,n,r){return QL(ZM(e,t,n,r))}function ZM(e,t,n,r){const i=eR(e,t,n,r);if(i)return i;if(!(32&r.features)){const i=nR(t,e,"",n,r);if(i)return i}}function eR(e,t,n,r){if(!Wo(t).includes("."))return;let i=aT(t);i===t&&(i=t.substring(0,t.lastIndexOf(".")));const o=t.substring(i.length);return r.traceEnabled&&KL(r.host,Ca.File_name_0_has_a_1_extension_stripping_it,t,o),nR(i,e,o,n,r)}function tR(e,t,n,r){if(1&e&&Bo(t,Hk)||4&e&&Bo(t,$k)){return void 0!==rR(t,n,r)?{path:t,ext:Bb(t),resolvedUsingTsExtension:void 0}:void 0}if(r.isConfigLookup&&8===e&&Ro(t,".json")){return void 0!==rR(t,n,r)?{path:t,ext:".json",resolvedUsingTsExtension:void 0}:void 0}return eR(e,t,n,r)}function nR(e,t,n,r,i){if(!r){const t=Vo(e);t&&(r=!Hb(t,i.host))}switch(n){case".mjs":case".mts":case".d.mts":return 1&t&&o(".mts",".mts"===n||".d.mts"===n)||4&t&&o(".d.mts",".mts"===n||".d.mts"===n)||2&t&&o(".mjs")||void 0;case".cjs":case".cts":case".d.cts":return 1&t&&o(".cts",".cts"===n||".d.cts"===n)||4&t&&o(".d.cts",".cts"===n||".d.cts"===n)||2&t&&o(".cjs")||void 0;case".json":return 4&t&&o(".d.json.ts")||8&t&&o(".json")||void 0;case".tsx":case".jsx":return 1&t&&(o(".tsx",".tsx"===n)||o(".ts",".tsx"===n))||4&t&&o(".d.ts",".tsx"===n)||2&t&&(o(".jsx")||o(".js"))||void 0;case".ts":case".d.ts":case".js":case"":return 1&t&&(o(".ts",".ts"===n||".d.ts"===n)||o(".tsx",".ts"===n||".d.ts"===n))||4&t&&o(".d.ts",".ts"===n||".d.ts"===n)||2&t&&(o(".js")||o(".jsx"))||i.isConfigLookup&&o(".json")||void 0;default:return 4&t&&!lO(e+n)&&o(`.d${n}.ts`)||void 0}function o(t,n){const o=rR(e+t,r,i);return void 0===o?void 0:{path:o,ext:t,resolvedUsingTsExtension:!i.candidateIsFromPackageJsonField&&n}}}function rR(e,t,n){var r;if(!(null==(r=n.compilerOptions.moduleSuffixes)?void 0:r.length))return iR(e,t,n);const i=hT(e)??"",o=i?cT(e,i):e;return h(n.compilerOptions.moduleSuffixes,e=>iR(o+e+i,t,n))}function iR(e,t,n){var r;if(!t){if(n.host.fileExists(e))return n.traceEnabled&&KL(n.host,Ca.File_0_exists_use_it_as_a_name_resolution_result,e),e;n.traceEnabled&&KL(n.host,Ca.File_0_does_not_exist,e)}null==(r=n.failedLookupLocations)||r.push(e)}function oR(e,t,n,r,i=!0){const o=i?dR(t,n,r):void 0;return XL(o,pR(e,t,n,r,o&&o.contents.packageJsonContent,o&&_R(o,r)),r)}function aR(e,t,n,r,i){if(!i&&void 0!==e.contents.resolvedEntrypoints)return e.contents.resolvedEntrypoints;let o;const a=5|(i?2:0),s=mM(t),c=cR(null==r?void 0:r.getPackageJsonInfoCache(),n,t);c.conditions=gM(t),c.requestContainingDirectory=e.packageDirectory;const l=pR(a,e.packageDirectory,!1,c,e.contents.packageJsonContent,_R(e,c));if(o=pe(o,null==l?void 0:l.path),8&s&&e.contents.packageJsonContent.exports){const r=oe([gM(t,99),gM(t,1)],_e);for(const t of r){const r={...c,failedLookupLocations:[],conditions:t,host:n},i=sR(e,e.contents.packageJsonContent.exports,r,a);if(i)for(const e of i)o=ye(o,e.path)}}return e.contents.resolvedEntrypoints=o||!1}function sR(e,t,n,r){let i;if(ct(t))for(const e of t)o(e);else if("object"==typeof t&&null!==t&&gR(t))for(const e in t)o(t[e]);else o(t);return i;function o(t){var a,s;if("string"==typeof t&&ln(t,"./"))if(t.includes("*")&&n.host.readDirectory){if(t.indexOf("*")!==t.lastIndexOf("*"))return!1;n.host.readDirectory(e.packageDirectory,function(e){const t=[];return 1&e&&t.push(...Hk),2&e&&t.push(...Uk),4&e&&t.push(...$k),8&e&&t.push(".json"),t}(r),void 0,[la(DC(t,"**/*"),".*")]).forEach(e=>{i=ye(i,{path:e,ext:Ho(e),resolvedUsingTsExtension:void 0})})}else{const o=Ko(t).slice(2);if(o.includes("..")||o.includes(".")||o.includes("node_modules"))return!1;const c=ta(Yo(e.packageDirectory,t),null==(s=(a=n.host).getCurrentDirectory)?void 0:s.call(a)),l=tR(r,c,!1,n);if(l)return i=ye(i,l,(e,t)=>e.path===t.path),!0}else if(Array.isArray(t))for(const e of t){if(o(e))return!0}else if("object"==typeof t&&null!==t)return h(ze(t),e=>{if("default"===e||E(n.conditions,e)||xR(n.conditions,e))return o(t[e]),!0})}}function cR(e,t,n){return{host:t,compilerOptions:n,traceEnabled:GL(n,t),failedLookupLocations:void 0,affectingLocations:void 0,packageJsonInfoCache:e,features:0,conditions:p,requestContainingDirectory:void 0,reportDiagnostic:ft,isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1}}function lR(e,t){const n=Ko(e);for(n.pop();n.length>0;){const e=dR(Go(n),!1,t);if(e)return e;n.pop()}}function _R(e,t){return void 0===e.contents.versionPaths&&(e.contents.versionPaths=cM(e.contents.packageJsonContent,t)||!1),e.contents.versionPaths||void 0}function uR(e,t){return void 0===e.contents.peerDependencies&&(e.contents.peerDependencies=function(e,t){const n=aM(e.contents.packageJsonContent,"peerDependencies","object",t);if(void 0===n)return;t.traceEnabled&&KL(t.host,Ca.package_json_has_a_peerDependencies_field);const r=$M(e.packageDirectory,t.host,t.traceEnabled),i=r.substring(0,r.lastIndexOf("node_modules")+12)+wo;let o="";for(const e in n)if(Be(n,e)){const n=dR(i+e,!1,t);if(n){const r=n.contents.packageJsonContent.version;o+=`+${e}@${r}`,t.traceEnabled&&KL(t.host,Ca.Found_peerDependency_0_with_1_version,e,r)}else t.traceEnabled&&KL(t.host,Ca.Failed_to_find_peerDependency_0,e)}return o}(e,t)||!1),e.contents.peerDependencies||void 0}function dR(e,t,n){var r,i,o,a,s,c;const{host:l,traceEnabled:_}=n,u=Yo(e,"package.json");if(t)return void(null==(r=n.failedLookupLocations)||r.push(u));const d=null==(i=n.packageJsonInfoCache)?void 0:i.getPackageJsonInfo(u);if(void 0!==d)return vM(d)?(_&&KL(l,Ca.File_0_exists_according_to_earlier_cached_lookups,u),null==(o=n.affectingLocations)||o.push(u),d.packageDirectory===e?d:{packageDirectory:e,contents:d.contents}):(d.directoryExists&&_&&KL(l,Ca.File_0_does_not_exist_according_to_earlier_cached_lookups,u),void(null==(a=n.failedLookupLocations)||a.push(u)));const p=Hb(e,l);if(p&&l.fileExists(u)){const t=Wb(u,l);_&&KL(l,Ca.Found_package_json_at_0,u);const r={packageDirectory:e,contents:{packageJsonContent:t,versionPaths:void 0,resolvedEntrypoints:void 0,peerDependencies:void 0}};return n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(u,r),null==(s=n.affectingLocations)||s.push(u),r}p&&_&&KL(l,Ca.File_0_does_not_exist,u),n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(u,{packageDirectory:e,directoryExists:p}),null==(c=n.failedLookupLocations)||c.push(u)}function pR(e,t,n,r,i,o){let a;i&&(a=r.isConfigLookup?function(e,t,n){return sM(e,"tsconfig",t,n)}(i,t,r):4&e&&function(e,t,n){return sM(e,"typings",t,n)||sM(e,"types",t,n)}(i,t,r)||7&e&&function(e,t,n){return sM(e,"main",t,n)}(i,t,r)||void 0);const s=(e,t,n,r)=>{const o=tR(e,t,n,r);if(o)return QL(o);const a=4===e?5:e,s=r.features,c=r.candidateIsFromPackageJsonField;r.candidateIsFromPackageJsonField=!0,"module"!==(null==i?void 0:i.type)&&(r.features&=-33);const l=HM(a,t,n,r,!1);return r.features=s,r.candidateIsFromPackageJsonField=c,l},c=a?!Hb(Vo(a),r.host):void 0,l=n||!Hb(t,r.host),_=Yo(t,r.isConfigLookup?"tsconfig":"index");if(o&&(!a||ma(t,a))){const n=ya(t,a||_,!1);r.traceEnabled&&KL(r.host,Ca.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,o.version,u,n);const i=wR(e,n,t,o.paths,void 0,s,c||l,r);if(i)return YL(i.value)}const d=a&&YL(s(e,a,c,r));return d||(32&r.features?void 0:ZM(e,_,l,r))}function fR(e,t){return 2&e&&(".js"===t||".jsx"===t||".mjs"===t||".cjs"===t)||1&e&&(".ts"===t||".tsx"===t||".mts"===t||".cts"===t)||4&e&&(".d.ts"===t||".d.mts"===t||".d.cts"===t)||8&e&&".json"===t||!1}function mR(e){let t=e.indexOf(wo);return"@"===e[0]&&(t=e.indexOf(wo,t+1)),-1===t?{packageName:e,rest:""}:{packageName:e.slice(0,t),rest:e.slice(t+1)}}function gR(e){return T(ze(e),e=>ln(e,"."))}function hR(e,t,n,r,i,o){if(e.contents.packageJsonContent.exports){if("."===n){let a;if("string"==typeof e.contents.packageJsonContent.exports||Array.isArray(e.contents.packageJsonContent.exports)||"object"==typeof e.contents.packageJsonContent.exports&&!ee(ze(e.contents.packageJsonContent.exports),e=>ln(e,"."))?a=e.contents.packageJsonContent.exports:Be(e.contents.packageJsonContent.exports,".")&&(a=e.contents.packageJsonContent.exports["."]),a){return bR(t,r,i,o,n,e,!1)(a,"",!1,".")}}else if(gR(e.contents.packageJsonContent.exports)){if("object"!=typeof e.contents.packageJsonContent.exports)return r.traceEnabled&&KL(r.host,Ca.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),RR(void 0);const a=vR(t,r,i,o,n,e.contents.packageJsonContent.exports,e,!1);if(a)return a}return r.traceEnabled&&KL(r.host,Ca.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),RR(void 0)}}function yR(e,t){const n=e.indexOf("*"),r=t.indexOf("*"),i=-1===n?e.length:n+1,o=-1===r?t.length:r+1;return i>o?-1:o>i||-1===n?1:-1===r||e.length>t.length?-1:t.length>e.length?1:0}function vR(e,t,n,r,i,o,a,s){const c=bR(e,t,n,r,i,a,s);if(!Xt(i,wo)&&!i.includes("*")&&Be(o,i)){return c(o[i],"",!1,i)}const l=be(O(ze(o),e=>function(e){const t=e.indexOf("*");return-1!==t&&t===e.lastIndexOf("*")}(e)||Xt(e,"/")),yR);for(const e of l){if(16&t.features&&_(e,i)){const t=o[e],n=e.indexOf("*");return c(t,i.substring(e.substring(0,n).length,i.length-(e.length-1-n)),!0,e)}if(Xt(e,"*")&&ln(i,e.substring(0,e.length-1))){return c(o[e],i.substring(e.length-1),!0,e)}if(ln(i,e)){return c(o[e],i.substring(e.length),!1,e)}}function _(e,t){if(Xt(e,"*"))return!1;const n=e.indexOf("*");return-1!==n&&(ln(t,e.substring(0,n))&&Xt(t,e.substring(n+1)))}}function bR(e,t,n,r,i,o,a){return function s(c,l,_,u){if("string"==typeof c){if(!_&&l.length>0&&!Xt(c,"/"))return t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),RR(void 0);if(!ln(c,"./")){if(a&&!ln(c,"../")&&!ln(c,"/")&&!Ao(c)){const i=_?c.replace(/\*/g,l):c+l;BR(t,Ca.Using_0_subpath_1_with_target_2,"imports",u,i),BR(t,Ca.Resolving_module_0_from_1,i,o.packageDirectory+"/");const a=VM(t.features,i,o.packageDirectory+"/",t.compilerOptions,t.host,n,e,!1,r,t.conditions);return RR(a.resolvedModule?{path:a.resolvedModule.resolvedFileName,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,originalPath:a.resolvedModule.originalPath,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}:void 0)}return t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),RR(void 0)}const s=(jo(c)?Ko(c).slice(1):Ko(c)).slice(1);if(s.includes("..")||s.includes(".")||s.includes("node_modules"))return t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),RR(void 0);const f=Yo(o.packageDirectory,c),m=Ko(l);if(m.includes("..")||m.includes(".")||m.includes("node_modules"))return t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),RR(void 0);t.traceEnabled&&KL(t.host,Ca.Using_0_subpath_1_with_target_2,a?"imports":"exports",u,_?c.replace(/\*/g,l):c+l);const g=d(_?f.replace(/\*/g,l):f+l),h=function(n,r,i,a){var s,c,l,_;if(!t.isConfigLookup&&(t.compilerOptions.declarationDir||t.compilerOptions.outDir)&&!n.includes("/node_modules/")&&(!t.compilerOptions.configFile||ma(o.packageDirectory,d(t.compilerOptions.configFile.fileName),!JR(t)))){const p=Zy({useCaseSensitiveFileNames:()=>JR(t)}),f=[];if(t.compilerOptions.rootDir||t.compilerOptions.composite&&t.compilerOptions.configFilePath){const e=d(aU(t.compilerOptions,()=>[],(null==(c=(s=t.host).getCurrentDirectory)?void 0:c.call(s))||"",p));f.push(e)}else if(t.requestContainingDirectory){const e=d(Yo(t.requestContainingDirectory,"index.ts")),n=d(aU(t.compilerOptions,()=>[e,d(i)],(null==(_=(l=t.host).getCurrentDirectory)?void 0:_.call(l))||"",p));f.push(n);let r=aa(n);for(;r&&r.length>1;){const e=Ko(r);e.pop();const t=Go(e);f.unshift(t),r=aa(t)}}f.length>1&&t.reportDiagnostic(gS(a?Ca.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:Ca.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,""===r?".":r,i));for(const r of f){const i=u(r);for(const a of i)if(ma(a,n,!JR(t))){const i=Yo(r,n.slice(a.length+1)),s=[".mjs",".cjs",".js",".json",".d.mts",".d.cts",".d.ts"];for(const n of s)if(Ro(i,n)){const r=cv(i);for(const a of r){if(!fR(e,a))continue;const r=ca(i,a,n,!JR(t));if(t.host.fileExists(r))return RR(XL(o,tR(e,r,!1,t),t))}}}}}return;function u(e){var n,r;const i=t.compilerOptions.configFile?(null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))||"":e,o=[];return t.compilerOptions.declarationDir&&o.push(d(p(i,t.compilerOptions.declarationDir))),t.compilerOptions.outDir&&t.compilerOptions.outDir!==t.compilerOptions.declarationDir&&o.push(d(p(i,t.compilerOptions.outDir))),o}}(g,l,Yo(o.packageDirectory,"package.json"),a);return h||RR(XL(o,tR(e,g,!1,t),t))}if("object"==typeof c&&null!==c){if(!Array.isArray(c)){BR(t,Ca.Entering_conditional_exports);for(const e of ze(c))if("default"===e||t.conditions.includes(e)||xR(t.conditions,e)){BR(t,Ca.Matched_0_condition_1,a?"imports":"exports",e);const n=c[e],r=s(n,l,_,u);if(r)return BR(t,Ca.Resolved_under_condition_0,e),BR(t,Ca.Exiting_conditional_exports),r;BR(t,Ca.Failed_to_resolve_under_condition_0,e)}else BR(t,Ca.Saw_non_matching_condition_0,e);return void BR(t,Ca.Exiting_conditional_exports)}if(!g(c))return t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),RR(void 0);for(const e of c){const t=s(e,l,_,u);if(t)return t}}else if(null===c)return t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_explicitly_maps_specifier_1_to_null,o.packageDirectory,i),RR(void 0);t.traceEnabled&&KL(t.host,Ca.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i);return RR(void 0);function d(e){var n,r;return void 0===e?e:ta(e,null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))}function p(e,t){return aa(Yo(e,t))}}}function xR(e,t){if(!e.includes("types"))return!1;if(!ln(t,"types@"))return!1;const n=jn.tryParse(t.substring(6));return!!n&&n.test(u)}function SR(e,t,n,r,i,o){return kR(e,t,n,r,!1,i,o)}function kR(e,t,n,r,i,o,a){const s=0===r.features?void 0:32&r.features?99:1,c=5&e,l=-6&e;if(c){BR(r,Ca.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,ZL(c));const e=_(c);if(e)return e}if(l&&!i)return BR(r,Ca.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,ZL(l)),_(l);function _(e){return Sa(Xo(n),n=>{if("node_modules"!==Wo(n)){const c=IR(o,t,s,n,a,r);return c||RR(TR(e,t,n,r,i,o,a))}})}}function TR(e,t,n,r,i,o,a){const s=Yo(n,"node_modules"),c=Hb(s,r.host);if(!c&&r.traceEnabled&&KL(r.host,Ca.Directory_0_does_not_exist_skipping_all_lookups_in_it,s),!i){const n=CR(e,t,s,c,r,o,a);if(n)return n}if(4&e){const e=Yo(s,"@types");let n=c;return c&&!Hb(e,r.host)&&(r.traceEnabled&&KL(r.host,Ca.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!1),CR(4,DR(t,r),e,n,r,o,a)}}function CR(e,t,n,r,i,o,a){var s,c;const l=na(Yo(n,t)),{packageName:_,rest:d}=mR(t),f=Yo(n,_);let m,g=dR(l,!r,i);if(""!==d&&g&&(!(8&i.features)||!Be((null==(s=m=dR(f,!r,i))?void 0:s.contents.packageJsonContent)??p,"exports"))){const t=ZM(e,l,!r,i);if(t)return QL(t);const n=pR(e,l,!r,i,g.contents.packageJsonContent,_R(g,i));return XL(g,n,i)}const h=(e,t,n,r)=>{let i=(d||!(32&r.features))&&ZM(e,t,n,r)||pR(e,t,n,r,g&&g.contents.packageJsonContent,g&&_R(g,r));return!i&&g&&(void 0===g.contents.packageJsonContent.exports||null===g.contents.packageJsonContent.exports)&&32&r.features&&(i=ZM(e,Yo(t,"index.js"),n,r)),XL(g,i,r)};if(""!==d&&(g=m??dR(f,!r,i)),g&&(i.resolvedPackageDirectory=!0),g&&g.contents.packageJsonContent.exports&&8&i.features)return null==(c=hR(g,e,Yo(".",d),i,o,a))?void 0:c.value;const y=""!==d&&g?_R(g,i):void 0;if(y){i.traceEnabled&&KL(i.host,Ca.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,y.version,u,d);const t=r&&Hb(f,i.host),n=wR(e,d,f,y.paths,void 0,h,!t,i);if(n)return n.value}return h(e,l,!r,i)}function wR(e,t,n,r,i,o,a,s){i||(i=uT(r));const c=bT(i,t);if(c){const i=_t(c)?void 0:sn(c,t),l=_t(c)?c:an(c);s.traceEnabled&&KL(s.host,Ca.Module_name_0_matched_pattern_1,t,l);return{value:h(r[l],t=>{const r=i?DC(t,i):t,c=na(Yo(n,r));s.traceEnabled&&KL(s.host,Ca.Trying_substitution_0_candidate_module_location_Colon_1,t,r);const l=hT(t);if(void 0!==l){const e=rR(c,a,s);if(void 0!==e)return QL({path:e,ext:l,resolvedUsingTsExtension:void 0})}return o(e,c,a||!Hb(Vo(c),s.host),s)})}}}var NR="__";function DR(e,t){const n=ER(e);return t.traceEnabled&&n!==e&&KL(t.host,Ca.Scoped_package_detected_looking_in_0,n),n}function PR(e){return`@types/${ER(e)}`}function ER(e){if(ln(e,"@")){const t=e.replace(wo,NR);if(t!==e)return t.slice(1)}return e}function FR(e){const t=_n(e,"@types/");return t!==e?AR(t):e}function AR(e){return e.includes(NR)?"@"+e.replace(NR,wo):e}function IR(e,t,n,r,i,o){const a=e&&e.getFromNonRelativeNameCache(t,n,r,i);if(a)return o.traceEnabled&&KL(o.host,Ca.Resolution_for_module_0_was_found_in_cache_from_location_1,t,r),o.resultFromCache=a,{value:a.resolvedModule&&{path:a.resolvedModule.resolvedFileName,originalPath:a.resolvedModule.originalPath||!0,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}}}function OR(e,t,n,r,i,o){const a=GL(n,r),s=[],c=[],l=Vo(t),_=[],u={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:i,features:0,conditions:[],requestContainingDirectory:l,reportDiagnostic:e=>{_.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},d=p(5)||p(2|(n.resolveJsonModule?8:0));return tM(e,d&&d.value,(null==d?void 0:d.value)&&GM(d.value.path),s,c,_,u,i);function p(t){const n=MM(t,e,l,YM,u);if(n)return{value:n};if(Js(e)){const n=na(Yo(l,e));return RR(YM(t,n,!1,u))}{const n=Sa(l,n=>{const r=IR(i,e,void 0,n,o,u);if(r)return r;const a=na(Yo(n,e));return RR(YM(t,a,!1,u))});if(n)return n;if(5&t){let n=function(e,t,n){return kR(4,e,t,n,!0,void 0,void 0)}(e,l,u);return 4&t&&(n??(n=jR(e,u))),n}}}}function jR(e,t){if(t.compilerOptions.typeRoots)for(const n of t.compilerOptions.typeRoots){const r=pM(n,e,t),i=Hb(n,t.host);!i&&t.traceEnabled&&KL(t.host,Ca.Directory_0_does_not_exist_skipping_all_lookups_in_it,n);const o=ZM(4,r,!i,t);if(o){const e=XM(o.path);return RR(XL(e?dR(e,!1,t):void 0,o,t))}const a=oR(4,r,!i,t);if(a)return RR(a)}}function LR(e,t){return!!e.allowImportingTsExtensions||t&&lO(t)}function MR(e,t,n,r,i,o){const a=GL(n,r);a&&KL(r,Ca.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,t,e,i);const s=[],c=[],l=[],_={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:o,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:e=>{l.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};return nM(TR(4,e,i,_,!1,void 0,void 0),!0,s,c,l,_.resultFromCache,void 0)}function RR(e){return void 0!==e?{value:e}:void 0}function BR(e,t,...n){e.traceEnabled&&KL(e.host,t,...n)}function JR(e){return!e.host.useCaseSensitiveFileNames||("boolean"==typeof e.host.useCaseSensitiveFileNames?e.host.useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames())}var zR=(e=>(e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly",e))(zR||{});function qR(e,t){return e.body&&!e.body.parent&&(qT(e.body,e),VT(e.body,!1)),e.body?UR(e.body,t):1}function UR(e,t=new Map){const n=KB(e);if(t.has(n))return t.get(n)||0;t.set(n,void 0);const r=function(e,t){switch(e.kind){case 264:case 265:return 0;case 266:if(cf(e))return 2;break;case 272:case 271:if(!Wv(e,32))return 0;break;case 278:const n=e;if(!n.moduleSpecifier&&n.exportClause&&279===n.exportClause.kind){let e=0;for(const r of n.exportClause.elements){const n=VR(r,t);if(n>e&&(e=n),1===e)return e}return e}break;case 268:{let n=0;return KI(e,e=>{const r=UR(e,t);switch(r){case 0:return;case 2:return void(n=2);case 1:return n=1,!0;default:Tn.assertNever(r)}}),n}case 267:return qR(e,t);case 80:if(4096&e.flags)return 0}return 1}(e,t);return t.set(n,r),r}function VR(e,t){const n=e.propertyName||e.name;let r=e.parent;for(;r;){if(jP(r)||cE(r)||QE(r)){const e=r.statements;let i;for(const o of e)if(Fc(o,n)){o.parent||(qT(o,r),VT(o,!1));const e=UR(o,t);if((void 0===i||e>i)&&(i=e),1===i)return i;271===o.kind&&(i=1)}if(void 0!==i)return i}r=r.parent}return 1}var WR=(e=>(e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethodOrAccessor=128]="IsObjectLiteralOrClassExpressionMethodOrAccessor",e))(WR||{});function $R(e,t,n){return Tn.attachFlowNodeDebugInfo({flags:e,id:0,node:t,antecedent:n})}var HR=GR();function KR(e,t){var n,r;gr("beforeBind"),null==(n=ir)||n.logStartBindFile(""+e.fileName),HR(e,t),null==(r=ir)||r.logStopBindFile(),gr("afterBind"),hr("Bind","beforeBind","afterBind")}function GR(){var e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m,y,v,b,x,S,k,C,w,N,D,P=!1,F=0,A=$R(1,void 0,void 0),I=$R(1,void 0,void 0),O=function(){return rI(function(e,t){if(t){t.stackIndex++,qT(e,r);const n=w;Ve(e);const i=r;r=e,t.skip=!1,t.inStrictModeStack[t.stackIndex]=n,t.parentStack[t.stackIndex]=i}else t={stackIndex:0,skip:!1,inStrictModeStack:[void 0],parentStack:[void 0]};const n=e.operatorToken.kind;if(gb(n)||fb(n)){if(ue(e)){const t=Q(),n=u,r=k;k=!1,Se(e,t,t),u=k?le(t):n,k||(k=r)}else Se(e,m,y);t.skip=!0}return t},function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&ve(t),n}},function(e,t,n){t.skip||Je(e)},function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&ve(t),n}},function(e,t){if(!t.skip){const t=e.operatorToken.kind;if(yb(t)&&!ah(e)&&(xe(e.left),64===t&&212===e.left.kind)){X(e.left.expression)&&(u=se(256,u,e))}}const n=t.inStrictModeStack[t.stackIndex],i=t.parentStack[t.stackIndex];void 0!==n&&(w=n);void 0!==i&&(r=i);t.skip=!1,t.stackIndex--},void 0);function e(e){if(e&&yP(e)&&!kb(e))return e;Je(e)}}();return function(g,h){var b,T;e=g,n=OS(t=h),w=function(e,t){return!(!tk(t,"alwaysStrict")||e.isDeclarationFile)||!!e.externalModuleIndicator}(e,h),D=new Set,F=0,N=nS.getSymbolConstructor(),Tn.attachFlowNodeDebugInfo(A),Tn.attachFlowNodeDebugInfo(I),e.locals||(null==(b=cr)||b.push(cr.Phase.Bind,"bindSourceFile",{path:e.path},!0),Je(e),null==(T=cr)||T.pop(),e.symbolCount=F,e.classifiableNames=D,function(){if(!c)return;const t=i,n=s,o=a,l=r,_=u;for(const t of c){const n=t.parent.parent;i=jp(n)||e,a=Lp(n)||e,u=$R(2,void 0,void 0),r=t,Je(t.typeExpression);const o=jc(t);if((DF(t)||!t.fullName)&&o&&Db(o.parent)){const n=nt(o.parent);if(n){et(e.symbol,o.parent,n,!!xc(o,e=>rP(e)&&"prototype"===e.name.escapedText),!1);const r=i;switch(Sg(o.parent)){case 1:case 2:i=af(e)?e:void 0;break;case 4:i=o.parent.expression;break;case 3:i=o.parent.expression.name;break;case 5:i=QR(e,o.parent.expression)?e:rP(o.parent.expression)?o.parent.expression.name:o.parent.expression;break;case 0:return Tn.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}i&&z(t,524288,788968),i=r}}else DF(t)||!t.fullName||80===t.fullName.kind?(r=t.parent,Ie(t,524288,788968)):Je(t.fullName)}i=t,s=n,a=o,r=l,u=_}(),function(){if(void 0===_)return;const t=i,n=s,o=a,c=r,l=u;for(const t of _){const n=Zg(t),o=n?jp(n):void 0,s=n?Lp(n):void 0;i=o||e,a=s||e,u=$R(2,void 0,void 0),r=t,Je(t.importClause)}i=t,s=n,a=o,r=c,u=l}());e=void 0,t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,c=void 0,_=void 0,l=!1,u=void 0,d=void 0,p=void 0,f=void 0,m=void 0,y=void 0,v=void 0,x=void 0,S=!1,k=!1,P=!1,C=0};function j(t,n,...r){return $p(Dd(t)||e,t,n,...r)}function L(e,t){return F++,new N(e,t)}function M(e,t,n){e.flags|=n,t.symbol=e,e.declarations=ye(e.declarations,t),1955&n&&!e.exports&&(e.exports=ad()),6240&n&&!e.members&&(e.members=ad()),e.constEnumOnlyModule&&304&e.flags&&(e.constEnumOnlyModule=!1),111551&n&&wg(e,t)}function R(e){if(277===e.kind)return e.isExportEquals?"export=":"default";const t=jc(e);if(t){if(pp(e)){const n=ey(t);return vp(e)?"__global":`"${n}"`}if(167===t.kind){const e=t.expression;if(Kh(e))return Tc(e.text);if(Gh(e))return Va(e.operator)+e.operand.text;Tn.fail("Only computed properties with literal names have declaration names")}if(YN(t)){const n=om(e);if(!n)return;return ry(n.symbol,t.escapedText)}return qE(t)?bC(t):Zh(t)?ty(t):void 0}switch(e.kind){case 176:return"__constructor";case 184:case 179:case 323:return"__call";case 185:case 180:return"__new";case 181:return"__index";case 278:return"__export";case 307:return"export=";case 226:if(2===dg(e))return"export=";Tn.fail("Unknown binary declaration kind");break;case 317:return Lg(e)?"__new":"__call";case 169:Tn.assert(317===e.parent.kind,"Impossible parameter parent kind",()=>`parent is: ${Tn.formatSyntaxKind(e.parent.kind)}, expected JSDocFunctionType`);return"arg"+e.parent.parameters.indexOf(e)}}function B(e){return Ic(e)?Rp(e.name):Cc(Tn.checkDefined(R(e)))}function J(t,n,r,i,o,a,s){Tn.assert(s||!Xh(r));const c=Wv(r,2048)||wE(r)&&"default"===r.name.escapedText,l=s?"__computed":c&&n?"default":R(r);let _;if(void 0===l)_=L(0,"__missing");else if(_=t.get(l),2885600&i&&D.add(l),_){if(a&&!_.isReplaceableByMethod)return _;if(_.flags&o)if(_.isReplaceableByMethod)t.set(l,_=L(0,l));else if(!(3&i&&67108864&_.flags)){Ic(r)&&qT(r.name,r);let t=2&_.flags?Ca.Cannot_redeclare_block_scoped_variable_0:Ca.Duplicate_identifier_0,n=!0;(384&_.flags||384&i)&&(t=Ca.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,n=!1);let o=!1;g(_.declarations)&&(c||_.declarations&&_.declarations.length&&277===r.kind&&!r.isExportEquals)&&(t=Ca.A_module_cannot_have_multiple_default_exports,n=!1,o=!0);const a=[];oE(r)&&Ld(r.type)&&Wv(r,32)&&2887656&_.flags&&a.push(j(r,Ca.Did_you_mean_0,`export type { ${Cc(r.name.escapedText)} }`));const s=jc(r)||r;h(_.declarations,(r,i)=>{const c=jc(r)||r,l=n?j(c,t,B(r)):j(c,t);e.bindDiagnostics.push(o?ST(l,j(s,0===i?Ca.Another_export_default_is_here:Ca.and_here)):l),o&&a.push(j(c,Ca.The_first_export_default_is_here))});const u=n?j(s,t,B(r)):j(s,t);e.bindDiagnostics.push(ST(u,...a)),_=L(0,l)}}else t.set(l,_=L(0,l)),a&&(_.isReplaceableByMethod=!0);return M(_,r,i),_.parent?Tn.assert(_.parent===n,"Existing symbol parent should match new one"):_.parent=n,_}function z(e,t,n){const r=!!(32&fc(e))||function(e){e.parent&&sE(e)&&(e=e.parent);if(!Mg(e))return!1;if(!DF(e)&&e.fullName)return!0;const t=jc(e);return!!t&&(!(!Db(t.parent)||!nt(t.parent))||!!(ku(t.parent)&&32&fc(t.parent)))}(e);if(2097152&t)return 281===e.kind||271===e.kind&&r?J(i.symbol.exports,i.symbol,e,t,n):(Tn.assertNode(i,bu),J(i.locals,void 0,e,t,n));if(Mg(e)&&Tn.assert(zm(e)),!pp(e)&&(r||128&i.flags)){if(!bu(i)||!i.locals||Wv(e,2048)&&!R(e))return J(i.symbol.exports,i.symbol,e,t,n);const r=111551&t?1048576:0,o=J(i.locals,void 0,e,r,n);return o.exportSymbol=J(i.symbol.exports,i.symbol,e,t,n),e.localSymbol=o,o}return Tn.assertNode(i,bu),J(i.locals,void 0,e,t,n)}function q(e){U(e,e=>262===e.kind?Je(e):void 0),U(e,e=>262!==e.kind?Je(e):void 0)}function U(e,t=Je){void 0!==e&&h(e,t)}function V(e){KI(e,Je,U)}function W(e){const n=P;if(P=!1,function(e){if(!(1&u.flags))return!1;if(u===A){const n=Cu(e)&&242!==e.kind||263===e.kind||267===e.kind&&function(e){const n=qR(e);return 1===n||2===n&&WS(t)}(e);if(n&&(u=I,!t.allowUnreachableCode)){const n=YS(t)&&!(33554432&e.flags)&&(!LP(e)||!!(7&gc(e.declarationList))||e.declarationList.declarations.some(e=>!!e.initializer));!function(e,t){if(wu(e)&&XR(e)&&jP(e.parent)){const{statements:n}=e.parent,r=xT(n,e);te(r,XR,(e,n)=>t(r[e],r[n-1]))}else t(e,e)}(e,(e,t)=>Be(n,e,t,Ca.Unreachable_code_detected))}}return!0}(e))return V(e),ze(e),void(P=n);switch(e.kind>=243&&e.kind<=259&&(!t.allowUnreachableCode||253===e.kind)&&(e.flowNode=u),e.kind){case 247:!function(e){const t=ge(e,Y()),n=Q(),r=Q();ie(t,u),u=t,fe(e.expression,n,r),u=le(n),me(e.statement,r,t),ie(t,u),u=le(r)}(e);break;case 246:!function(e){const t=Y(),n=ge(e,Q()),r=Q();ie(t,u),u=t,me(e.statement,r,n),ie(n,u),u=le(n),fe(e.expression,t,r),u=le(r)}(e);break;case 248:!function(e){const t=ge(e,Y()),n=Q(),r=Q();Je(e.initializer),ie(t,u),u=t,fe(e.condition,n,r),u=le(n),me(e.statement,r,t),Je(e.incrementor),ie(t,u),u=le(r)}(e);break;case 249:case 250:!function(e){const t=ge(e,Y()),n=Q();Je(e.expression),ie(t,u),u=t,250===e.kind&&Je(e.awaitModifier);ie(n,u),Je(e.initializer),261!==e.initializer.kind&&xe(e.initializer);me(e.statement,n,t),ie(t,u),u=le(n)}(e);break;case 245:!function(e){const t=Q(),n=Q(),r=Q();fe(e.expression,t,n),u=le(t),Je(e.thenStatement),ie(r,u),u=le(n),Je(e.elseStatement),ie(r,u),u=le(r)}(e);break;case 253:case 257:!function(e){Je(e.expression),253===e.kind&&(S=!0,f&&ie(f,u));u=A,k=!0}(e);break;case 252:case 251:!function(e){if(Je(e.label),e.label){const t=function(e){for(let t=x;t;t=t.next)if(t.name===e)return t;return}(e.label.escapedText);t&&(t.referenced=!0,he(e,t.breakTarget,t.continueTarget))}else he(e,d,p)}(e);break;case 258:!function(e){const t=f,n=v,r=Q(),i=Q();let o=Q();e.finallyBlock&&(f=i);ie(o,u),v=o,Je(e.tryBlock),ie(r,u),e.catchClause&&(u=le(o),o=Q(),ie(o,u),v=o,Je(e.catchClause),ie(r,u));if(f=t,v=n,e.finallyBlock){const t=Q();t.antecedent=ne(ne(r.antecedent,o.antecedent),i.antecedent),u=t,Je(e.finallyBlock),1&u.flags?u=A:(f&&i.antecedent&&ie(f,Z(t,i.antecedent,u)),v&&o.antecedent&&ie(v,Z(t,o.antecedent,u)),u=r.antecedent?Z(t,r.antecedent,u):A)}else u=le(r)}(e);break;case 255:!function(e){const t=Q();Je(e.expression);const n=d,r=b;d=t,b=u,Je(e.caseBlock),ie(t,u);const i=h(e.caseBlock.clauses,e=>297===e.kind);e.possiblyExhaustive=!i&&!t.antecedent,i||ie(t,ae(b,e,0,0));d=n,b=r,u=le(t)}(e);break;case 269:!function(e){const n=e.clauses,r=112===e.parent.expression.kind||$(e.parent.expression);let i=A;for(let o=0;oTE(e)||kE(e))}(e)?e.flags|=128:e.flags&=-129}function Fe(e){const t=qR(e),n=0!==t;return Pe(e,n?512:1024,n?110735:0),t}function Ae(e,t,n){const r=L(t,n);return 106508&t&&(r.parent=i.symbol),M(r,e,t),r}function Ie(e,t,n){switch(a.kind){case 267:z(e,t,n);break;case 307:if(af(i)){z(e,t,n);break}default:Tn.assertNode(a,bu),a.locals||(a.locals=ad(),De(a)),J(a.locals,void 0,e,t,n)}}function Oe(t){if(!(e.parseDiagnostics.length||33554432&t.flags||16777216&t.flags||xh(t))){const n=Nc(t);if(void 0===n)return;w&&n>=119&&n<=127?e.bindDiagnostics.push(j(t,function(t){if(om(t))return Ca.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;if(e.externalModuleIndicator)return Ca.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;return Ca.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),Rp(t))):135===n?tO(e)&&um(t)?e.bindDiagnostics.push(j(t,Ca.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,Rp(t))):65536&t.flags&&e.bindDiagnostics.push(j(t,Ca.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Rp(t))):127===n&&16384&t.flags&&e.bindDiagnostics.push(j(t,Ca.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Rp(t)))}}function je(t,n){if(n&&80===n.kind){const i=n;if(QN(r=i)&&("eval"===r.escapedText||"arguments"===r.escapedText)){const r=rf(e,n);e.bindDiagnostics.push(fS(e,r.start,r.length,function(t){if(om(t))return Ca.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode;if(e.externalModuleIndicator)return Ca.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;return Ca.Invalid_use_of_0_in_strict_mode}(t),wc(i)))}}var r}function Le(e){!w||33554432&e.flags||je(e,e.name)}function Me(t){if(n<2&&307!==a.kind&&267!==a.kind&&!m_(a)){const n=rf(e,t);e.bindDiagnostics.push(fS(e,n.start,n.length,function(t){return om(t)?Ca.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:e.externalModuleIndicator?Ca.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:Ca.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5}(t)))}}function Re(t,n,...r){const i=tf(e,t.pos);e.bindDiagnostics.push(fS(e,i.start,i.length,n,...r))}function Be(t,n,r,i){!function(t,n,r){const i=fS(e,n.pos,n.end-n.pos,r);t?e.bindDiagnostics.push(i):e.bindSuggestionDiagnostics=pe(e.bindSuggestionDiagnostics,{...i,category:2})}(t,{pos:Xd(n,e),end:r.end},i)}function Je(t){if(!t)return;qT(t,r),cr&&(t.tracingPath=e.path);const n=w;if(Ve(t),t.kind>165){const e=r;r=t;const n=YR(t);0===n?W(t):function(e,t){const n=i,r=o,s=a;if(1&t?(219!==e.kind&&(o=i),i=a=e,32&t&&(i.locals=ad(),De(i))):2&t&&(a=e,32&t&&(a.locals=void 0)),4&t){const n=u,r=d,i=p,o=f,a=v,s=x,c=S,l=16&t&&!Wv(e,1024)&&!e.asteriskToken&&!!fm(e)||175===e.kind;l||(u=$R(2,void 0,void 0),144&t&&(u.node=e)),f=l||176===e.kind||zm(e)&&(262===e.kind||218===e.kind)?Q():void 0,v=void 0,d=void 0,p=void 0,x=void 0,S=!1,W(e),e.flags&=-5633,!(1&u.flags)&&8&t&&Md(e.body)&&(e.flags|=512,S&&(e.flags|=1024),e.endFlowNode=u),307===e.kind&&(e.flags|=C,e.endFlowNode=u),f&&(ie(f,u),u=le(f),(176===e.kind||175===e.kind||zm(e)&&(262===e.kind||218===e.kind))&&(e.returnFlowNode=u)),l||(u=n),d=r,p=i,f=o,v=a,x=s,S=c}else 64&t?(l=!1,W(e),Tn.assertNotNode(e,QN),e.flags=l?256|e.flags:-257&e.flags):W(e);i=n,o=r,a=s}(t,n),r=e}else{const e=r;1===t.kind&&(r=t),ze(t),r=e}w=n}function ze(e){if(Ju(e))if(zm(e))for(const t of e.jsDoc)Je(t);else for(const t of e.jsDoc)qT(t,e),VT(t,!1)}function qe(e){if(!w)for(const t of e){if(!vf(t))return;if(Ue(t))return void(w=!0)}}function Ue(t){const n=Yd(e,t.expression);return'"use strict"'===n||"'use strict'"===n}function Ve(n){switch(n.kind){case 80:if(4096&n.flags){let e=n.parent;for(;e&&!Mg(e);)e=e.parent;Ie(e,524288,788968);break}case 110:return u&&(nu(n)||304===r.kind)&&(n.flowNode=u),Oe(n);case 166:u&&Am(n)&&(n.flowNode=u);break;case 236:case 108:n.flowNode=u;break;case 81:return function(t){"#constructor"===t.escapedText&&(e.parseDiagnostics.length||e.bindDiagnostics.push(j(t,Ca.constructor_is_a_reserved_word,Rp(t))))}(n);case 211:case 212:const o=n;u&&H(o)&&(o.flowNode=u),Cg(o)&&function(e){110===e.expression.kind?Ge(e):gg(e)&&307===e.parent.parent.kind&&(Eb(e.expression)?Ye(e,e.parent):Ze(e))}(o),zm(o)&&e.commonJsModuleIndicator&&ug(o)&&!ZR(a,"module")&&J(e.locals,void 0,o.expression,134217729,111550);break;case 226:switch(dg(n)){case 1:He(n);break;case 2:!function(t){if(!$e(t))return;const n=cg(t.right);if(Lb(n)||i===e&&QR(e,n))return;if(nP(n)&&T(n.properties,KE))return void h(n.properties,Ke);const r=Ch(t)?2097152:1049092,o=J(e.symbol.exports,e.symbol,t,67108864|r,0);wg(o,t)}(n);break;case 3:Ye(n.left,n);break;case 6:!function(e){qT(e.left,e),qT(e.right,e),rt(e.left.expression,e.left,!1,!0)}(n);break;case 4:Ge(n);break;case 5:const t=n.left.expression;if(zm(n)&&QN(t)){const e=ZR(a,t.escapedText);if(ym(null==e?void 0:e.valueDeclaration)){Ge(n);break}}!function(t){var n;const r=it(t.left.expression,a)||it(t.left.expression,i);if(!zm(t)&&!Ng(r))return;const o=Wx(t.left);if(QN(o)&&2097152&(null==(n=ZR(i,o.escapedText))?void 0:n.flags))return;if(qT(t.left,t),qT(t.right,t),QN(t.left.expression)&&i===e&&QR(e,t.left.expression))He(t);else if(Xh(t)){Ae(t,67108868,"__computed");Qe(t,et(r,t.left.expression,nt(t.left),!1,!1))}else Ze(pt(t.left,yg))}(n);break;case 0:break;default:Tn.fail("Unknown binary expression special property assignment kind")}return function(e){w&&X_(e.left)&&yb(e.operatorToken.kind)&&je(e,e.left)}(n);case 299:return function(e){w&&e.variableDeclaration&&je(e,e.variableDeclaration.name)}(n);case 220:return function(t){if(w&&80===t.expression.kind){const n=rf(e,t.expression);e.bindDiagnostics.push(fS(e,n.start,n.length,Ca.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(n);case 225:return function(e){w&&je(e,e.operand)}(n);case 224:return function(e){w&&(46!==e.operator&&47!==e.operator||je(e,e.operand))}(n);case 254:return function(e){w&&Re(e,Ca.with_statements_are_not_allowed_in_strict_mode)}(n);case 256:return function(e){w&&OS(t)>=2&&(Tu(e.statement)||LP(e.statement))&&Re(e.label,Ca.A_label_is_not_allowed_here)}(n);case 197:return void(l=!0);case 182:break;case 168:return function(e){if(IF(e.parent)){const t=Gg(e.parent);t?(Tn.assertNode(t,bu),t.locals??(t.locals=ad()),J(t.locals,void 0,e,262144,526824)):Pe(e,262144,526824)}else if(195===e.parent.kind){const t=function(e){const t=xc(e,e=>e.parent&&zD(e.parent)&&e.parent.extendsType===e);return t&&t.parent}(e.parent);t?(Tn.assertNode(t,bu),t.locals??(t.locals=ad()),J(t.locals,void 0,e,262144,526824)):Ae(e,262144,R(e))}else Pe(e,262144,526824)}(n);case 169:return st(n);case 260:return at(n);case 208:return n.flowNode=u,at(n);case 172:case 171:return function(e){const t=T_(e),n=t?13247:0;return ct(e,(t?98304:4)|(e.questionToken?16777216:0),n)}(n);case 303:case 304:return ct(n,4,0);case 306:return ct(n,8,900095);case 179:case 180:case 181:return Pe(n,131072,0);case 174:case 173:return ct(n,8192|(n.questionToken?16777216:0),Kf(n)?0:103359);case 262:return function(t){e.isDeclarationFile||33554432&t.flags||Hh(t)&&(C|=4096);Le(t),w?(Me(t),Ie(t,16,110991)):Pe(t,16,110991)}(n);case 176:return Pe(n,16384,0);case 177:return ct(n,32768,46015);case 178:return ct(n,65536,78783);case 184:case 317:case 323:case 185:return function(e){const t=L(131072,R(e));M(t,e,131072);const n=L(2048,"__type");M(n,e,2048),n.members=ad(),n.members.set(t.escapedName,t)}(n);case 187:case 322:case 200:return function(e){return Ae(e,2048,"__type")}(n);case 332:return function(e){V(e);const t=Qg(e);t&&174!==t.kind&&M(t.symbol,t,32)}(n);case 210:return function(e){return Ae(e,4096,"__object")}(n);case 218:case 219:return function(t){e.isDeclarationFile||33554432&t.flags||Hh(t)&&(C|=4096);u&&(t.flowNode=u);Le(t);const n=t.name?t.name.escapedText:"__function";return Ae(t,16,n)}(n);case 213:switch(dg(n)){case 7:return function(e){let t=it(e.arguments[0]);const n=307===e.parent.parent.kind;t=et(t,e.arguments[0],n,!1,!1),tt(e,t,!1)}(n);case 8:return function(e){if(!$e(e))return;const t=ot(e.arguments[0],void 0,(e,t)=>(t&&M(t,e,67110400),t));if(t){const n=1048580;J(t.exports,t,e,n,0)}}(n);case 9:return function(e){const t=it(e.arguments[0].expression);t&&t.valueDeclaration&&M(t,t.valueDeclaration,32);tt(e,t,!0)}(n);case 0:break;default:return Tn.fail("Unknown call expression assignment declaration kind")}zm(n)&&function(t){!e.commonJsModuleIndicator&&$m(t,!1)&&$e(t)}(n);break;case 231:case 263:return w=!0,function(t){if(263===t.kind)Ie(t,32,899503);else{Ae(t,32,t.name?t.name.escapedText:"__class"),t.name&&D.add(t.name.escapedText)}const{symbol:n}=t,r=L(4194308,"prototype"),i=n.exports.get(r.escapedName);i&&(t.name&&qT(t.name,t),e.bindDiagnostics.push(j(i.declarations[0],Ca.Duplicate_identifier_0,Dc(r))));n.exports.set(r.escapedName,r),r.parent=n}(n);case 264:return Ie(n,64,788872);case 265:return Ie(n,524288,788968);case 266:return function(e){return cf(e)?Ie(e,128,899967):Ie(e,256,899327)}(n);case 267:return function(t){if(Ee(t),pp(t))if(Wv(t,32)&&Re(t,Ca.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),xp(t))Fe(t);else{let n;if(11===t.name.kind){const{text:e}=t.name;n=_T(e),void 0===n&&Re(t.name,Ca.Pattern_0_can_have_at_most_one_Asterisk_character,e)}const r=Pe(t,512,110735);e.patternAmbientModules=pe(e.patternAmbientModules,n&&!_t(n)?{pattern:n,symbol:r}:void 0)}else{const e=Fe(t);if(0!==e){const{symbol:n}=t;n.constEnumOnlyModule=!(304&n.flags)&&2===e&&!1!==n.constEnumOnlyModule}}}(n);case 292:return function(e){return Ae(e,4096,"__jsxAttributes")}(n);case 291:return function(e,t,n){return Pe(e,t,n)}(n,4,0);case 271:case 274:case 276:case 281:return Pe(n,2097152,2097152);case 270:return function(t){ee(t.modifiers)&&e.bindDiagnostics.push(j(t,Ca.Modifiers_cannot_appear_here));const n=QE(t.parent)?tO(t.parent)?t.parent.isDeclarationFile?void 0:Ca.Global_module_exports_may_only_appear_in_declaration_files:Ca.Global_module_exports_may_only_appear_in_module_files:Ca.Global_module_exports_may_only_appear_at_top_level;n?e.bindDiagnostics.push(j(t,n)):(e.symbol.globalExports=e.symbol.globalExports||ad(),J(e.symbol.globalExports,e.symbol,t,2097152,2097152))}(n);case 273:return function(e){e.name&&Pe(e,2097152,2097152)}(n);case 278:return function(e){i.symbol&&i.symbol.exports?e.exportClause?bE(e.exportClause)&&(qT(e.exportClause,e),J(i.symbol.exports,i.symbol,e.exportClause,2097152,2097152)):J(i.symbol.exports,i.symbol,e,8388608,0):Ae(e,8388608,R(e))}(n);case 277:return function(e){if(i.symbol&&i.symbol.exports){const t=Ch(e)?2097152:4,n=J(i.symbol.exports,i.symbol,e,t,-1);e.isExportEquals&&wg(n,e)}else Ae(e,111551,R(e))}(n);case 307:return qe(n.statements),function(){if(Ee(e),tO(e))We();else if(sf(e)){We();const t=e.symbol;J(e.symbol.exports,e.symbol,e,4,-1),e.symbol=t}}();case 241:if(!m_(n.parent))return;case 268:return qe(n.statements);case 341:if(323===n.parent.kind)return st(n);if(322!==n.parent.kind)break;case 348:const s=n;return Pe(s,s.isBracketed||s.typeExpression&&316===s.typeExpression.type.kind?16777220:4,0);case 346:case 338:case 340:return(c||(c=[])).push(n);case 339:return Je(n.typeExpression);case 351:return(_||(_=[])).push(n)}}function We(){Ae(e,512,`"${aT(e.fileName)}"`)}function $e(t){return(!e.externalModuleIndicator||!0===e.externalModuleIndicator)&&(e.commonJsModuleIndicator||(e.commonJsModuleIndicator=t,e.externalModuleIndicator||We()),!0)}function He(e){if(!$e(e))return;const t=ot(e.left.expression,void 0,(e,t)=>(t&&M(t,e,67110400),t));if(t){const n=Th(e.right)&&(lg(e.left.expression)||ug(e.left.expression))?2097152:1048580;qT(e.left,e),J(t.exports,t,e.left,n,0)}}function Ke(t){J(e.symbol.exports,e.symbol,t,69206016,0)}function Ge(e){Tn.assert(zm(e));if(yP(e)&&rP(e.left)&&YN(e.left.name)||rP(e)&&YN(e.name))return;const t=lm(e,!1,!1);switch(t.kind){case 262:case 218:let n=t.symbol;if(yP(t.parent)&&64===t.parent.operatorToken.kind){const e=t.parent.left;gg(e)&&Eb(e.expression)&&(n=it(e.expression.expression,o))}n&&n.valueDeclaration&&(n.members=n.members||ad(),Xh(e)?Xe(e,n,n.members):J(n.members,n,e,67108868,0),M(n,n.valueDeclaration,32));break;case 176:case 172:case 174:case 177:case 178:case 175:const r=t.parent,i=$v(t)?r.symbol.exports:r.symbol.members;Xh(e)?Xe(e,r.symbol,i):J(i,r.symbol,e,67108868,0,!0);break;case 307:if(Xh(e))break;t.commonJsModuleIndicator?J(t.symbol.exports,t.symbol,e,1048580,0):Pe(e,1,111550);break;case 267:break;default:Tn.failBadSyntaxKind(t)}}function Xe(e,t,n){J(n,t,e,4,0,!0,!0),Qe(e,t)}function Qe(e,t){t&&(t.assignmentDeclarationMembers||(t.assignmentDeclarationMembers=new Map)).set(KB(e),e)}function Ye(e,t){const n=e.expression,r=n.expression;qT(r,n),qT(n,e),qT(e,t),rt(r,e,!0,!0)}function Ze(e){Tn.assert(!QN(e)),qT(e.expression,e),rt(e.expression,e,!1,!1)}function et(t,n,r,i,o){if(2097152&(null==t?void 0:t.flags))return t;if(r&&!i){const r=67110400,i=110735;t=ot(n,t,(t,n,o)=>{if(n)return M(n,t,r),n;return J(o?o.exports:e.jsGlobalAugmentations||(e.jsGlobalAugmentations=ad()),o,t,r,i)})}return o&&t&&t.valueDeclaration&&M(t,t.valueDeclaration,32),t}function tt(e,t,n){if(!t||!function(e){if(1072&e.flags)return!0;const t=e.valueDeclaration;if(t&&oP(t))return!!rg(t);let n=t?eE(t)?t.initializer:yP(t)?t.right:rP(t)&&yP(t.parent)?t.parent.right:void 0:void 0;if(n=n&&cg(n),n){const e=Eb(eE(t)?t.name:yP(t)?t.left:t);return!!ig(!yP(n)||57!==n.operatorToken.kind&&61!==n.operatorToken.kind?n:n.right,e)}return!1}(t))return;const r=n?t.members||(t.members=ad()):t.exports||(t.exports=ad());let i=0,o=0;g_(rg(e))?(i=8192,o=103359):oP(e)&&pg(e)&&(ee(e.arguments[2].properties,e=>{const t=jc(e);return!!t&&QN(t)&&"set"===wc(t)})&&(i|=65540,o|=78783),ee(e.arguments[2].properties,e=>{const t=jc(e);return!!t&&QN(t)&&"get"===wc(t)})&&(i|=32772,o|=46015)),0===i&&(i=4,o=0),J(r,t,e,67108864|i,-67108865&o)}function nt(e){return yP(e.parent)?307===function(e){for(;yP(e.parent);)e=e.parent;return e.parent}(e.parent).parent.kind:307===e.parent.parent.kind}function rt(e,t,n,r){let o=it(e,a)||it(e,i);const s=nt(t);o=et(o,t.expression,s,n,r),tt(t,o,n)}function it(e,t=i){if(QN(e))return ZR(t,e.escapedText);{const t=it(e.expression);return t&&t.exports&&t.exports.get(xg(e))}}function ot(t,n,r){if(QR(e,t))return e.symbol;if(QN(t))return r(t,it(t),n);{const e=ot(t.expression,n,r),i=vg(t);return YN(i)&&Tn.fail("unexpected PrivateIdentifier"),r(i,e&&e.exports&&e.exports.get(xg(t)),e)}}function at(e){if(w&&je(e,e.name),!O_(e.name)){const t=260===e.kind?e:e.parent.parent;!zm(e)||!Km(t)||ul(e)||32&fc(e)?up(e)?Ie(e,2,111551):dy(e)?Pe(e,1,111551):Pe(e,1,111550):Pe(e,2097152,2097152)}}function st(e){if((341!==e.kind||323===i.kind)&&(!w||33554432&e.flags||je(e,e.name),O_(e.name)?Ae(e,1,"__"+e.parent.parameters.indexOf(e)):Pe(e,1,111551),lc(e,e.parent))){const t=e.parent.parent;J(t.symbol.members,t.symbol,e,4|(e.questionToken?16777216:0),0)}}function ct(t,n,r){return e.isDeclarationFile||33554432&t.flags||!Hh(t)||(C|=4096),u&&Gf(t)&&(t.flowNode=u),Xh(t)?Ae(t,n,"__computed"):Pe(t,n,r)}}function XR(e){return!(nE(e)||function(e){switch(e.kind){case 264:case 265:return!0;case 267:return 1!==qR(e);case 266:return Wv(e,4096);default:return!1}}(e)||aE(e)||LP(e)&&!(7&gc(e))&&e.declarationList.declarations.some(e=>!e.initializer))}function QR(e,t){let n=0;const r=at();for(r.enqueue(t);!r.isEmpty()&&n<100;){if(n++,lg(t=r.dequeue())||ug(t))return!0;if(QN(t)){const n=ZR(e,t.escapedText);if(n&&n.valueDeclaration&&eE(n.valueDeclaration)&&n.valueDeclaration.initializer){const e=n.valueDeclaration.initializer;r.enqueue(e),xb(e,!0)&&(r.enqueue(e.left),r.enqueue(e.right))}}}return!1}function YR(e){switch(e.kind){case 231:case 263:case 266:case 210:case 187:case 322:case 292:return 1;case 264:return 65;case 267:case 265:case 200:case 181:return 33;case 307:return 37;case 177:case 178:case 174:if(Gf(e))return 173;case 176:case 262:case 173:case 179:case 323:case 317:case 184:case 180:case 185:case 175:return 45;case 218:case 219:return 61;case 268:return 4;case 172:return e.initializer?4:0;case 299:case 248:case 249:case 250:case 269:return 34;case 241:return f_(e.parent)||xD(e.parent)?0:34}return 0}function ZR(e,t){var n,r,i,o;const a=null==(r=null==(n=dt(e,bu))?void 0:n.locals)?void 0:r.get(t);return a?a.exportSymbol??a:QE(e)&&e.jsGlobalAugmentations&&e.jsGlobalAugmentations.has(t)?e.jsGlobalAugmentations.get(t):vu(e)?null==(o=null==(i=e.symbol)?void 0:i.exports)?void 0:o.get(t):void 0}function eB(e,t,n,r,i,o,a,s,c,l){return function(_=()=>!0){const u=[],d=[];return{walkType:e=>{try{return p(e),{visitedTypes:Ue(u),visitedSymbols:Ue(d)}}finally{L(u),L(d)}},walkSymbol:e=>{try{return g(e),{visitedTypes:Ue(u),visitedSymbols:Ue(d)}}finally{L(u),L(d)}}};function p(e){if(!e)return;if(u[e.id])return;u[e.id]=e;if(!g(e.symbol)){if(524288&e.flags){const n=e,i=n.objectFlags;4&i&&function(e){p(e.target),h(l(e),p)}(e),32&i&&function(e){p(e.typeParameter),p(e.constraintType),p(e.templateType),p(e.modifiersType)}(e),3&i&&(m(t=e),h(t.typeParameters,p),h(r(t),p),p(t.thisType)),24&i&&m(n)}var t;262144&e.flags&&function(e){p(s(e))}(e),3145728&e.flags&&function(e){h(e.types,p)}(e),4194304&e.flags&&function(e){p(e.type)}(e),8388608&e.flags&&function(e){p(e.objectType),p(e.indexType),p(e.constraint)}(e)}}function f(r){const i=t(r);i&&p(i.type),h(r.typeParameters,p);for(const e of r.parameters)g(e);p(e(r)),p(n(r))}function m(e){const t=i(e);for(const e of t.indexInfos)p(e.keyType),p(e.type);for(const e of t.callSignatures)f(e);for(const e of t.constructSignatures)f(e);for(const e of t.properties)g(e)}function g(e){if(!e)return!1;const t=GB(e);if(d[t])return!1;if(d[t]=e,!_(e))return!0;return p(o(e)),e.exports&&e.exports.forEach(g),h(e.declarations,e=>{if(e.type&&186===e.type.kind){const t=e.type;g(a(c(t.exprName)))}}),!1}}}var tB={};a(tB,{RelativePreference:()=>nB,countPathComponents:()=>mB,forEachFileNameOfModule:()=>yB,getLocalModuleSpecifierBetweenFileNames:()=>dB,getModuleSpecifier:()=>oB,getModuleSpecifierPreferences:()=>rB,getModuleSpecifiers:()=>_B,getModuleSpecifiersWithCacheInfo:()=>uB,getNodeModulesPackageName:()=>aB,tryGetJSExtensionForFile:()=>PB,tryGetModuleSpecifiersFromCache:()=>cB,tryGetRealFileNameForNonJsDeclarationFileName:()=>NB,updateModuleSpecifier:()=>iB});var nB=(e=>(e[e.Relative=0]="Relative",e[e.NonRelative=1]="NonRelative",e[e.Shortest=2]="Shortest",e[e.ExternalNonRelative=3]="ExternalNonRelative",e))(nB||{});function rB({importModuleSpecifierPreference:e,importModuleSpecifierEnding:t},n,r,i){const o=a();return{relativePreference:void 0!==i?Js(i)?0:1:"relative"===e?0:"non-relative"===e?1:"project-relative"===e?3:2,getAllowedEndingsInPreferredOrder:e=>{const t=e!==r.impliedNodeFormat?a(e):o;if(99===(e??r.impliedNodeFormat))return LR(n,r.fileName)?[3,2]:[2];if(1===LS(n))return 2===t?[2,1]:[1,2];const i=LR(n,r.fileName);switch(t){case 2:return i?[2,3,0,1]:[2,0,1];case 3:return[3,0,2,1];case 1:return i?[1,0,3,2]:[1,0,2];case 0:return i?[0,1,3,2]:[0,1,2];default:Tn.assertNever(t)}}};function a(e){if(void 0!==i){if(Qk(i))return 2;if(Xt(i,"/index"))return 1}return tT(t,e??r.impliedNodeFormat,n,Rm(r)?r:void 0)}}function iB(e,t,n,r,i,o,a={}){const s=sB(e,t,n,r,i,rB({},e,t,o),{},a);if(s!==o)return s}function oB(e,t,n,r,i,o={}){return sB(e,t,n,r,i,rB({},e,t),{},o)}function aB(e,t,n,r,i,o={}){const a=pB(t.fileName,r);return v(vB(a,n,r,i,e,o),n=>TB(n,a,t,r,e,i,!0,o.overrideImportMode))}function sB(e,t,n,r,i,o,a,s={}){const c=pB(n,i);return v(vB(c,r,i,a,e,s),n=>TB(n,c,t,i,e,a,void 0,s.overrideImportMode))||fB(r,c,e,i,s.overrideImportMode||t.impliedNodeFormat,o)}function cB(e,t,n,r,i={}){const o=lB(e,t,n,r,i);return o[1]&&{kind:o[0],moduleSpecifiers:o[1],computedWithoutCache:!1}}function lB(e,t,n,r,i={}){var o;const a=Pd(e);if(!a)return p;const s=null==(o=n.getModuleSpecifierCache)?void 0:o.call(n),c=null==s?void 0:s.get(t.path,a.path,r,i);return[null==c?void 0:c.kind,null==c?void 0:c.moduleSpecifiers,a,null==c?void 0:c.modulePaths,s]}function _B(e,t,n,r,i,o,a={}){return uB(e,t,n,r,i,o,a,!1).moduleSpecifiers}function uB(e,t,n,r,i,o,a={},s){let c=!1;const l=function(e,t){var n;const r=null==(n=e.declarations)?void 0:n.find(e=>mp(e)&&(!bp(e)||!Js(ey(e.name))));if(r)return r.name.text;const i=$(e.declarations,e=>{var n,r,i,o;if(!sE(e))return;const a=l(e);if(!((null==(n=null==a?void 0:a.parent)?void 0:n.parent)&&cE(a.parent)&&pp(a.parent.parent)&&QE(a.parent.parent.parent)))return;const s=null==(o=null==(i=null==(r=a.parent.parent.symbol.exports)?void 0:r.get("export="))?void 0:i.valueDeclaration)?void 0:o.expression;if(!s)return;const c=t.getSymbolAtLocation(s);if(!c)return;if((2097152&(null==c?void 0:c.flags)?t.getAliasedSymbol(c):c)===e.symbol)return a.parent.parent;function l(e){for(;8&e.flags;)e=e.parent;return e}}),o=i[0];if(o)return o.name.text}(e,t);if(l)return{kind:"ambient",moduleSpecifiers:[l],computedWithoutCache:c};let[_,u,d,f,m]=lB(e,r,i,o,a);if(u)return{kind:_,moduleSpecifiers:u,computedWithoutCache:c};if(!d)return{kind:void 0,moduleSpecifiers:p,computedWithoutCache:c};c=!0,f||(f=xB(pB(r.fileName,i),d.originalFileName,i,n,a));const g=function(e,t,n,r,i,o={},a){const s=pB(n.fileName,r),c=rB(i,t,n),l=Rm(n)&&h(e,e=>h(r.getFileIncludeReasons().get(ia(e.path,r.getCurrentDirectory(),s.getCanonicalFileName)),e=>{if(3!==e.kind||e.file!==n.path)return;if(n.impliedNodeFormat&&n.impliedNodeFormat!==_V(n,e.index,t))return;const r=$V(n,e.index).text;return 1===c.relativePreference&&jo(r)?void 0:r}));if(l)return{kind:void 0,moduleSpecifiers:[l],computedWithoutCache:!0};const _=ee(e,e=>e.isInNodeModules);let u,d,p,f;for(const l of e){const e=l.isInNodeModules?TB(l,s,n,r,t,i,void 0,o.overrideImportMode):void 0;if(u=pe(u,e),e&&l.isRedirect)return{kind:"node_modules",moduleSpecifiers:u,computedWithoutCache:!0};if(!e){const e=fB(l.path,s,t,r,o.overrideImportMode||n.impliedNodeFormat,c,l.isRedirect);if(!e)continue;l.isRedirect?p=pe(p,e):Lo(e)?GM(e)?f=pe(f,e):d=pe(d,e):(a||!_||l.isInNodeModules)&&(f=pe(f,e))}}return(null==d?void 0:d.length)?{kind:"paths",moduleSpecifiers:d,computedWithoutCache:!0}:(null==p?void 0:p.length)?{kind:"redirect",moduleSpecifiers:p,computedWithoutCache:!0}:(null==u?void 0:u.length)?{kind:"node_modules",moduleSpecifiers:u,computedWithoutCache:!0}:{kind:"relative",moduleSpecifiers:Tn.checkDefined(f),computedWithoutCache:!0}}(f,n,r,i,o,a,s);return null==m||m.set(r.path,d.path,o,a,g.kind,f,g.moduleSpecifiers),g}function dB(e,t,n,r,i={}){return fB(t,pB(e.fileName,r),n,r,i.overrideImportMode??e.impliedNodeFormat,rB({},n,e))}function pB(e,t){e=ta(e,t.getCurrentDirectory());const n=on(!t.useCaseSensitiveFileNames||t.useCaseSensitiveFileNames()),r=Vo(e);return{getCanonicalFileName:n,importingSourceFileName:e,sourceDirectory:r,canonicalSourceDirectory:n(r)}}function fB(e,t,n,r,i,{getAllowedEndingsInPreferredOrder:o,relativePreference:a},s){const{baseUrl:c,paths:l,rootDirs:_}=n;if(s&&!l)return;const{sourceDirectory:u,canonicalSourceDirectory:d,getCanonicalFileName:p}=t,f=o(i),m=_&&function(e,t,n,r,i,o){const a=CB(t,e,r);if(void 0===a)return;const s=CB(n,e,r),c=z(s,e=>M(a,t=>sa(ya(e,t,r)))),l=jt(c,iT);if(!l)return;return wB(l,i,o)}(_,e,u,p,f,n)||wB(sa(ya(u,e,p)),f,n);if(!c&&!l&&!qS(n)||0===a)return s?void 0:m;const g=EB(e,ta(lv(n,r)||c,r.getCurrentDirectory()),p);if(!g)return s?void 0:m;const y=s?void 0:function(e,t,n,r,i){var o,a,s;if(!r.readFile||!qS(n))return;const c=hB(r,t);if(!c)return;const l=Yo(c,"package.json"),_=null==(a=null==(o=r.getPackageJsonInfoCache)?void 0:o.call(r))?void 0:a.getPackageJsonInfo(l);if(bM(_)||!r.fileExists(l))return;const u=(null==_?void 0:_.contents.packageJsonContent)||$b(r.readFile(l)),d=null==u?void 0:u.imports;if(!d)return;const p=gM(n,i);return null==(s=h(ze(d),t=>{if(!ln(t,"#")||"#"===t||ln(t,"#/"))return;const i=Xt(t,"/")?1:t.includes("*")?2:0;return kB(n,r,e,c,t,d[t],p,i,!0)}))?void 0:s.moduleFileToTry}(e,u,n,r,i),v=s||void 0===y?l&&SB(g,l,f,r,n):void 0;if(s)return v;const b=y??(void 0===v&&void 0!==c?wB(g,f,n):v);if(!b)return m;if(1===a&&!jo(b))return b;if(3===a&&!jo(b)){const i=n.configFilePath?ia(Vo(n.configFilePath),r.getCurrentDirectory(),t.getCanonicalFileName):t.getCanonicalFileName(r.getCurrentDirectory()),o=ia(e,i,p),a=ln(d,i),s=ln(o,i);if(a&&!s||!a&&s)return b;return function(e,t,n){return e===t||void 0!==e&&void 0!==t&&0===fa(e,t,n)}(hB(r,Vo(o)),hB(r,u),!Yy(r))?m:b}return FB(b)||mB(m)e.fileExists(Yo(t,"package.json"))?t:void 0)}function yB(e,t,n,r,i){var o;const a=Zy(n),s=n.getCurrentDirectory(),c=n.isSourceOfProjectReferenceRedirect(t)?n.getProjectReferenceRedirect(t):void 0,l=ia(t,s,a),_=n.redirectTargetsMap.get(l)||p,u=[...c?[c]:p,t,..._].map(e=>ta(e,s));let d=!T(u,KT);if(!r){const e=h(u,e=>!(d&&KT(e))&&i(e,c===e));if(e)return e}const f=null==(o=n.getSymlinkCache)?void 0:o.call(n).getSymlinkedDirectoriesByRealpath(),m=ta(t,s);return f&&Sa(Vo(m),t=>{const n=f.get(aa(ia(t,s,a)));if(n)return!ga(e,t,a)&&h(u,e=>{if(!ga(e,t,a))return;const r=ya(t,e,a);for(const t of n){const n=Zo(t,r),o=i(n,e===c);if(d=!0,o)return o}})})||(r?h(u,e=>d&&KT(e)?void 0:i(e,e===c)):void 0)}function vB(e,t,n,r,i,o={}){var a;const s=ia(e.importingSourceFileName,n.getCurrentDirectory(),Zy(n)),c=ia(t,n.getCurrentDirectory(),Zy(n)),l=null==(a=n.getModuleSpecifierCache)?void 0:a.call(n);if(l){const e=l.get(s,c,r,o);if(null==e?void 0:e.modulePaths)return e.modulePaths}const _=xB(e,t,n,i,o);return l&&l.setModulePaths(s,c,r,o,_),_}var bB=["dependencies","peerDependencies","optionalDependencies"];function xB(e,t,n,r,i){var o,a;const s=null==(o=n.getModuleResolutionCache)?void 0:o.call(n),c=null==(a=n.getSymlinkCache)?void 0:a.call(n);if(s&&c&&n.readFile&&!GM(e.importingSourceFileName)){Tn.type(n);const t=cR(s.getPackageJsonInfoCache(),n,{}),o=lR(e.importingSourceFileName,t);if(o){const e=function(e){let t;for(const n of bB){const r=e[n];r&&"object"==typeof r&&(t=ne(t,ze(r)))}return t}(o.contents.packageJsonContent);for(const t of e||p){const e=LM(t,Yo(o.packageDirectory,"package.json"),r,n,s,void 0,i.overrideImportMode);c.setSymlinksFromResolution(e.resolvedModule)}}}const l=new Map;let _=!1;yB(e.importingSourceFileName,t,n,!0,(t,n)=>{const r=GM(t);l.set(t,{path:e.getCanonicalFileName(t),isRedirect:n,isInNodeModules:r}),_=_||r});const u=[];for(let t=e.canonicalSourceDirectory;0!==l.size;){const e=aa(t);let n;l.forEach(({path:t,isRedirect:r,isInNodeModules:i},o)=>{ln(t,e)&&((n||(n=[])).push({path:o,isRedirect:r,isInNodeModules:i}),l.delete(o))}),n&&(n.length>1&&n.sort(gB),u.push(...n));const r=Vo(t);if(r===t)break;t=r}if(l.size){const e=We(l.entries(),([e,{isRedirect:t,isInNodeModules:n}])=>({path:e,isRedirect:t,isInNodeModules:n}));e.length>1&&e.sort(gB),u.push(...e)}return u}function SB(e,t,n,r,i){for(const r in t)for(const a of t[r]){const t=na(a),s=t.indexOf("*"),c=n.map(t=>({ending:t,value:wB(e,[t],i)}));if(hT(t)&&c.push({ending:void 0,value:e}),-1!==s){const e=t.substring(0,s),n=t.substring(s+1);for(const{ending:t,value:i}of c)if(i.length>=e.length+n.length&&ln(i,e)&&Xt(i,n)&&o({ending:t,value:i})){const t=i.substring(e.length,i.length-n.length);if(!jo(t))return DC(r,t)}}else if(ee(c,e=>0!==e.ending&&t===e.value)||ee(c,e=>0===e.ending&&t===e.value&&o(e)))return r}function o({ending:t,value:n}){return 0!==t||n===wB(e,[t],i,r)}}function kB(e,t,n,r,i,o,a,s,c){if("string"==typeof o){const a=!Yy(t),l=()=>t.getCommonSourceDirectory(),_=c&&nU(n,e,a,l),u=c&&eU(n,e,a,l),d=ta(Yo(r,o),void 0),p=Yk(n)?aT(n)+PB(n,e):void 0;switch(s){case 0:if(p&&0===fa(p,d,a)||0===fa(n,d,a)||_&&0===fa(_,d,a)||u&&0===fa(u,d,a))return{moduleFileToTry:i};break;case 1:if(p&&ma(d,p,a)){const e=ya(d,p,!1);return{moduleFileToTry:ta(Yo(Yo(i,o),e),void 0)}}if(ma(d,n,a)){const e=ya(d,n,!1);return{moduleFileToTry:ta(Yo(Yo(i,o),e),void 0)}}if(_&&ma(d,_,a)){const e=ya(d,_,!1);return{moduleFileToTry:Yo(i,e)}}if(u&&ma(d,u,a)){const e=ya(d,u,!1);return{moduleFileToTry:Yo(i,e)}}break;case 2:const e=d.indexOf("*"),t=d.slice(0,e),r=d.slice(e+1);if(p&&ln(p,t,a)&&Xt(p,r,a)){const e=p.slice(t.length,p.length-r.length);return{moduleFileToTry:DC(i,e)}}if(ln(n,t,a)&&Xt(n,r,a)){const e=n.slice(t.length,n.length-r.length);return{moduleFileToTry:DC(i,e)}}if(_&&ln(_,t,a)&&Xt(_,r,a)){const e=_.slice(t.length,_.length-r.length);return{moduleFileToTry:DC(i,e)}}if(u&&ln(u,t,a)&&Xt(u,r,a)){const e=u.slice(t.length,u.length-r.length);return{moduleFileToTry:DC(i,e)}}}}else{if(Array.isArray(o))return h(o,o=>kB(e,t,n,r,i,o,a,s,c));if("object"==typeof o&&null!==o)for(const l of ze(o))if("default"===l||a.indexOf(l)>=0||xR(a,l)){const _=o[l],u=kB(e,t,n,r,i,_,a,s,c);if(u)return u}}}function TB({path:e,isRedirect:t},{getCanonicalFileName:n,canonicalSourceDirectory:r},i,o,a,s,c,l){if(!o.fileExists||!o.readFile)return;const _=iC(e);if(!_)return;const u=rB(s,a,i).getAllowedEndingsInPreferredOrder();let d=e,p=!1;if(!c){let t,n=_.packageRootIndex;for(;;){const{moduleFileToTry:r,packageRootPath:i,blockedByExports:s,verbatimFromExports:c}=v(n);if(1!==LS(a)){if(s)return;if(c)return r}if(i){d=i,p=!0;break}if(t||(t=r),n=e.indexOf(wo,n+1),-1===n){d=wB(t,u,a,o);break}}}if(t&&!p)return;const f=o.getGlobalTypingsCacheLocation&&o.getGlobalTypingsCacheLocation(),m=n(d.substring(0,_.topLevelNodeModulesIndex));if(!(ln(r,m)||f&&ln(n(f),m)))return;const g=d.substring(_.topLevelPackageNameIndex+1),y=FR(g);return 1===LS(a)&&y===g?void 0:y;function v(t){var r,s;const c=e.substring(0,t),d=Yo(c,"package.json");let p=e,f=!1;const m=null==(s=null==(r=o.getPackageJsonInfoCache)?void 0:r.call(o))?void 0:s.getPackageJsonInfo(d);if(vM(m)||void 0===m&&o.fileExists(d)){const t=(null==m?void 0:m.contents.packageJsonContent)||$b(o.readFile(d)),r=l||i.impliedNodeFormat;if(zS(a)){const n=FR(c.substring(_.topLevelPackageNameIndex+1)),i=gM(a,r),s=(null==t?void 0:t.exports)?function(e,t,n,r,i,o,a){return"object"==typeof o&&null!==o&&!Array.isArray(o)&&gR(o)?h(ze(o),s=>{const c=ta(Yo(i,s),void 0),l=Xt(s,"/")?1:s.includes("*")?2:0;return kB(e,t,n,r,c,o[s],a,l,!1)}):kB(e,t,n,r,i,o,a,0,!1)}(a,o,e,c,n,t.exports,i):void 0;if(s)return{...s,verbatimFromExports:!0};if(null==t?void 0:t.exports)return{moduleFileToTry:e,blockedByExports:!0}}const s=(null==t?void 0:t.typesVersions)?lM(t.typesVersions):void 0;if(s){const t=SB(e.slice(c.length+1),s.paths,u,o,a);void 0===t?f=!0:p=Yo(c,t)}const g=(null==t?void 0:t.typings)||(null==t?void 0:t.types)||(null==t?void 0:t.main)||"index.js";if(_t(g)&&(!f||!bT(uT(s.paths),g))){const e=ia(g,c,n),r=n(p);if(aT(e)===aT(r))return{packageRootPath:c,moduleFileToTry:p};if("module"!==(null==t?void 0:t.type)&&!Bo(r,Kk)&&ln(r,e)&&Vo(r)===oa(e)&&"index"===aT(Wo(r)))return{packageRootPath:c,moduleFileToTry:p}}}else{const e=n(p.substring(_.packageRootIndex+1));if("index.d.ts"===e||"index.js"===e||"index.ts"===e||"index.tsx"===e)return{moduleFileToTry:p,packageRootPath:c}}return{moduleFileToTry:p}}}function CB(e,t,n){return $(t,t=>{const r=EB(e,t,n);return void 0!==r&&FB(r)?void 0:r})}function wB(e,t,n,r){if(Bo(e,[".json",".mjs",".cjs"]))return e;const i=aT(e);if(e===i)return e;const o=t.indexOf(2),a=t.indexOf(3);if(Bo(e,[".mts",".cts"])&&-1!==a&&a0===e||1===e);return-1!==r&&r(e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBigInt=4]="TypeofEQBigInt",e[e.TypeofEQBoolean=8]="TypeofEQBoolean",e[e.TypeofEQSymbol=16]="TypeofEQSymbol",e[e.TypeofEQObject=32]="TypeofEQObject",e[e.TypeofEQFunction=64]="TypeofEQFunction",e[e.TypeofEQHostObject=128]="TypeofEQHostObject",e[e.TypeofNEString=256]="TypeofNEString",e[e.TypeofNENumber=512]="TypeofNENumber",e[e.TypeofNEBigInt=1024]="TypeofNEBigInt",e[e.TypeofNEBoolean=2048]="TypeofNEBoolean",e[e.TypeofNESymbol=4096]="TypeofNESymbol",e[e.TypeofNEObject=8192]="TypeofNEObject",e[e.TypeofNEFunction=16384]="TypeofNEFunction",e[e.TypeofNEHostObject=32768]="TypeofNEHostObject",e[e.EQUndefined=65536]="EQUndefined",e[e.EQNull=131072]="EQNull",e[e.EQUndefinedOrNull=262144]="EQUndefinedOrNull",e[e.NEUndefined=524288]="NEUndefined",e[e.NENull=1048576]="NENull",e[e.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",e[e.Truthy=4194304]="Truthy",e[e.Falsy=8388608]="Falsy",e[e.IsUndefined=16777216]="IsUndefined",e[e.IsNull=33554432]="IsNull",e[e.IsUndefinedOrNull=50331648]="IsUndefinedOrNull",e[e.All=134217727]="All",e[e.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",e[e.BaseStringFacts=12582401]="BaseStringFacts",e[e.StringStrictFacts=16317953]="StringStrictFacts",e[e.StringFacts=16776705]="StringFacts",e[e.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",e[e.EmptyStringFacts=12582401]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",e[e.BaseNumberFacts=12582146]="BaseNumberFacts",e[e.NumberStrictFacts=16317698]="NumberStrictFacts",e[e.NumberFacts=16776450]="NumberFacts",e[e.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",e[e.ZeroNumberFacts=12582146]="ZeroNumberFacts",e[e.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",e[e.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",e[e.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",e[e.BaseBigIntFacts=12581636]="BaseBigIntFacts",e[e.BigIntStrictFacts=16317188]="BigIntStrictFacts",e[e.BigIntFacts=16775940]="BigIntFacts",e[e.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",e[e.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",e[e.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",e[e.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",e[e.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=12580616]="BaseBooleanFacts",e[e.BooleanStrictFacts=16316168]="BooleanStrictFacts",e[e.BooleanFacts=16774920]="BooleanFacts",e[e.FalseStrictFacts=12121864]="FalseStrictFacts",e[e.FalseFacts=12580616]="FalseFacts",e[e.TrueStrictFacts=7927560]="TrueStrictFacts",e[e.TrueFacts=16774920]="TrueFacts",e[e.SymbolStrictFacts=7925520]="SymbolStrictFacts",e[e.SymbolFacts=16772880]="SymbolFacts",e[e.ObjectStrictFacts=7888800]="ObjectStrictFacts",e[e.ObjectFacts=16736160]="ObjectFacts",e[e.FunctionStrictFacts=7880640]="FunctionStrictFacts",e[e.FunctionFacts=16728e3]="FunctionFacts",e[e.VoidFacts=9830144]="VoidFacts",e[e.UndefinedFacts=26607360]="UndefinedFacts",e[e.NullFacts=42917664]="NullFacts",e[e.EmptyObjectStrictFacts=83427327]="EmptyObjectStrictFacts",e[e.EmptyObjectFacts=83886079]="EmptyObjectFacts",e[e.UnknownFacts=83886079]="UnknownFacts",e[e.AllTypeofNE=556800]="AllTypeofNE",e[e.OrFactsMask=8256]="OrFactsMask",e[e.AndFactsMask=134209471]="AndFactsMask",e))(JB||{}),zB=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384})),qB=(e=>(e[e.Normal=0]="Normal",e[e.Contextual=1]="Contextual",e[e.Inferential=2]="Inferential",e[e.SkipContextSensitive=4]="SkipContextSensitive",e[e.SkipGenericFunctions=8]="SkipGenericFunctions",e[e.IsForSignatureHelp=16]="IsForSignatureHelp",e[e.RestBindingElement=32]="RestBindingElement",e[e.TypeOnly=64]="TypeOnly",e))(qB||{}),UB=(e=>(e[e.None=0]="None",e[e.BivariantCallback=1]="BivariantCallback",e[e.StrictCallback=2]="StrictCallback",e[e.IgnoreReturnTypes=4]="IgnoreReturnTypes",e[e.StrictArity=8]="StrictArity",e[e.StrictTopSignature=16]="StrictTopSignature",e[e.Callback=3]="Callback",e))(UB||{}),VB=pn(YB,function(e){return!k_(e)}),WB=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4})),$B=class{};function HB(){this.flags=0}function KB(e){return e.id||(e.id=MB,MB++),e.id}function GB(e){return e.id||(e.id=LB,LB++),e.id}function XB(e,t){const n=qR(e);return 1===n||t&&2===n}function QB(e){var t,n,r,i,o=[],a=e=>{o.push(e)},s=nS.getSymbolConstructor(),c=nS.getTypeConstructor(),l=nS.getSignatureConstructor(),_=0,u=0,d=0,f=0,m=0,y=0,b=!1,x=ad(),S=[1],k=e.getCompilerOptions(),P=OS(k),A=jS(k),j=!!k.experimentalDecorators,R=GS(k),q=rk(k),U=JS(k),V=tk(k,"strictNullChecks"),W=tk(k,"strictFunctionTypes"),H=tk(k,"strictBindCallApply"),K=tk(k,"strictPropertyInitialization"),Q=tk(k,"noImplicitAny"),Y=tk(k,"noImplicitThis"),Z=tk(k,"useUnknownInCatchVariables"),te=k.exactOptionalPropertyTypes,re=function(){const e=rI(function(e,t,r){t?(t.stackIndex++,t.skip=!1,n(t,void 0),i(t,void 0)):t={checkMode:r,skip:!1,stackIndex:0,typeStack:[void 0,void 0]};if(zm(e)&&rg(e))return t.skip=!0,i(t,zL(e.right,r)),t;!function(e){const{left:t,operatorToken:n,right:r}=e;61===n.kind&&(!yP(t)||57!==t.operatorToken.kind&&56!==t.operatorToken.kind||Uz(t,Ca._0_and_1_operations_cannot_be_mixed_without_parentheses,Va(t.operatorToken.kind),Va(n.kind)),!yP(r)||57!==r.operatorToken.kind&&56!==r.operatorToken.kind||Uz(r,Ca._0_and_1_operations_cannot_be_mixed_without_parentheses,Va(r.operatorToken.kind),Va(n.kind)))}(e);if(64===e.operatorToken.kind&&(210===e.left.kind||209===e.left.kind))return t.skip=!0,i(t,fL(e.left,zL(e.right,r),r,110===e.right.kind)),t;return t},function(e,n,r){if(!n.skip)return t(n,e)},function(e,t,o){if(!t.skip){const a=r(t);Tn.assertIsDefined(a),n(t,a),i(t,void 0);const s=e.kind;if(gb(s)){let e=o.parent;for(;217===e.kind||hb(e);)e=e.parent;(56===s||BP(e))&&uR(o.left,a,BP(e)?e.thenStatement:void 0),dR(a,o.left)}}},function(e,n,r){if(!n.skip)return t(n,e)},function(e,t){let o;if(t.skip)o=r(t);else{const n=function(e){return e.typeStack[e.stackIndex]}(t);Tn.assertIsDefined(n);const i=r(t);Tn.assertIsDefined(i),o=hL(e.left,e.operatorToken,e.right,n,i,t.checkMode,e)}return t.skip=!1,n(t,void 0),i(t,void 0),t.stackIndex--,o},function(e,t,n){return i(e,t),e});return(t,n)=>{const r=e(t,n);return Tn.assertIsDefined(r),r};function t(e,t){if(yP(t))return t;i(e,zL(t,e.checkMode))}function n(e,t){e.typeStack[e.stackIndex]=t}function r(e){return e.typeStack[e.stackIndex+1]}function i(e,t){e.typeStack[e.stackIndex+1]=t}}(),ae={getReferencedExportContainer:EJ,getReferencedImportDeclaration:FJ,getReferencedDeclarationWithCollidingName:IJ,isDeclarationWithCollidingName:OJ,isValueAliasDeclaration:e=>{const t=kc(e);return!t||!Fe||jJ(t)},hasGlobalName:iz,isReferencedAliasDeclaration:(e,t)=>{const n=kc(e);return!n||!Fe||BJ(n,t)},hasNodeCheckFlag:(e,t)=>{const n=kc(e);return!!n&&WJ(n,t)},isTopLevelValueImportEqualsWithEntityName:LJ,isDeclarationVisible:sc,isImplementationOfOverload:JJ,requiresAddingImplicitUndefined:zJ,isExpandoFunctionDeclaration:qJ,getPropertiesOfContainerFunction:UJ,createTypeOfDeclaration:QJ,createReturnTypeOfSignatureDeclaration:nz,createTypeOfExpression:rz,createLiteralConstValue:_z,isSymbolAccessible:js,isEntityNameVisible:Vs,getConstantValue:e=>{const t=kc(e,HJ);return t?KJ(t):void 0},getEnumMemberValue:e=>{const t=kc(e,XE);return t?$J(t):void 0},collectLinkedAliases:cc,markLinkedReferences:e=>{const t=kc(e);return t&&MP(t,0)},getReferencedValueDeclaration:az,getReferencedValueDeclarations:cz,getTypeReferenceSerializationKind:XJ,isOptionalParameter:Ef,isArgumentsLocalBinding:PJ,getExternalModuleFileFromDeclaration:e=>{const t=kc(e,Ip);return t&&fz(t)},isLiteralConstDeclaration:lz,isLateBound:e=>{const t=kc(e,ku),n=t&&rs(t);return!!(n&&4096&xx(n))},getJsxFactoryEntity:uz,getJsxFragmentFactoryEntity:dz,isBindingCapturedByNode:(e,t)=>{const n=kc(e),r=kc(t);return!!n&&!!r&&(eE(r)||eP(r))&&function(e,t){const n=Ho(e);return!!n&&E(n.capturedBlockScopeBindings,rs(t))}(n,r)},getDeclarationStatementsForSourceFile:(e,t,n)=>{const r=kc(e);Tn.assert(r&&307===r.kind,"Non-sourcefile node passed into getDeclarationsForSourceFile");const i=rs(e);return i?(Ua(i),i.exports?se.symbolTableToDeclarationStatements(i.exports,e,t,n):[]):e.locals?se.symbolTableToDeclarationStatements(e.locals,e,t,n):[]},isImportRequiredByAugmentation:function(e){const t=Dd(e);if(!t.symbol)return!1;const n=fz(e);if(!n)return!1;if(n===t)return!1;const r=Ya(t.symbol);for(const e of We(r.values()))if(e.mergeId){const t=ts(e);if(t.declarations)for(const e of t.declarations)if(Dd(e)===n)return!0}return!1}},se=function(){return{typeToTypeNode:(e,t,n,r)=>c(t,n,r,t=>_(e,t)),typePredicateToTypePredicateNode:(e,t,n,r)=>c(t,n,r,t=>F(e,t)),expressionOrTypeToTypeNode:(e,t,n,r,i,a)=>c(r,i,a,r=>o(r,e,t,n)),serializeTypeForDeclaration:(e,t,n,r,i,o)=>c(r,i,o,r=>ue(r,e,t,n)),serializeReturnTypeForSignature:(e,t,n,r)=>c(t,n,r,t=>de(t,e)),indexInfoToIndexSignatureDeclaration:(e,t,n,r)=>c(t,n,r,t=>b(e,t,void 0)),signatureToSignatureDeclaration:(e,t,n,r,i)=>c(n,r,i,n=>x(e,t,n)),symbolToEntityName:(e,t,n,r,i)=>c(n,r,i,n=>Z(e,n,t,!1)),symbolToExpression:(e,t,n,r,i)=>c(n,r,i,n=>te(e,n,t)),symbolToTypeParameterDeclarations:(e,t,n,r)=>c(t,n,r,t=>V(e,t)),symbolToParameterDeclaration:(e,t,n,r)=>c(t,n,r,t=>j(e,t)),typeParameterToDeclaration:(e,t,n,r)=>c(t,n,r,t=>D(e,t)),symbolTableToDeclarationStatements:(e,t,i,o)=>c(t,i,o,t=>function(e,t){var i;const o=ke(aw.createPropertyDeclaration,174,!0),a=ke((e,t,n,r)=>aw.createPropertySignature(e,t,n,r),173,!1),c=t.enclosingDeclaration;let l=[];const u=new Set,d=[],f=t;t={...f,usedSymbolNames:new Set(f.usedSymbolNames),remappedSymbolNames:new Map,remappedSymbolReferences:new Map(null==(i=f.remappedSymbolReferences)?void 0:i.entries()),tracker:void 0};const m={...f.tracker.inner,trackSymbol:(e,n,r)=>{var i,o;if(null==(i=t.remappedSymbolNames)?void 0:i.has(GB(e)))return!1;if(0===js(e,n,r,!1).accessibility){const n=q(e,t,r);if(!(4&e.flags)){const e=n[0],t=Dd(f.enclosingDeclaration);ee(e.declarations,e=>Dd(e)===t)&&H(e)}}else if(null==(o=f.tracker.inner)?void 0:o.trackSymbol)return f.tracker.inner.trackSymbol(e,n,r);return!1}};t.tracker=new rJ(t,m,f.tracker.moduleResolverHost),md(e,(e,t)=>{Ae(e,Cc(t))});let y=!t.bundled;const S=e.get("export=");S&&e.size>1&&2098688&S.flags&&(e=ad()).set("export=",S);return J(e),j(l);function k(e){return!!e&&80===e.kind}function w(e){return LP(e)?O(M(e.declarationList.declarations,jc),k):O([jc(e)],k)}function E(e){const t=C(e,kE),n=N(e,sE);let r=-1!==n?e[n]:void 0;if(r&&t&&t.isExportEquals&&QN(t.expression)&&QN(r.name)&&wc(r.name)===wc(t.expression)&&r.body&&cE(r.body)){const i=O(e,e=>!!(32&rb(e))),o=r.name;let a=r.body;if(g(i)&&(r=aw.updateModuleDeclaration(r,r.modifiers,r.name,a=aw.updateModuleBlock(a,aw.createNodeArray([...r.body.statements,aw.createExportDeclaration(void 0,!1,aw.createNamedExports(M(z(i,e=>w(e)),e=>aw.createExportSpecifier(!1,void 0,e))),void 0)]))),e=[...e.slice(0,n),r,...e.slice(n+1)]),!C(e,e=>e!==r&&Fc(e,o))){l=[];const n=!ee(a.statements,e=>Wv(e,32)||kE(e)||TE(e));h(a.statements,e=>{X(e,n?32:0)}),e=[...O(e,e=>e!==r&&e!==t),...l]}}return e}function F(e){const t=O(e,e=>TE(e)&&!e.moduleSpecifier&&!!e.exportClause&&CE(e.exportClause));if(g(t)>1){e=[...O(e,e=>!TE(e)||!!e.moduleSpecifier||!e.exportClause),aw.createExportDeclaration(void 0,!1,aw.createNamedExports(z(t,e=>pt(e.exportClause,CE).elements)),void 0)]}const n=O(e,e=>TE(e)&&!!e.moduleSpecifier&&!!e.exportClause&&CE(e.exportClause));if(g(n)>1){const t=Qe(n,e=>ON(e.moduleSpecifier)?">"+e.moduleSpecifier.text:">");if(t.length!==n.length)for(const n of t)n.length>1&&(e=[...O(e,e=>!n.includes(e)),aw.createExportDeclaration(void 0,!1,aw.createNamedExports(z(n,e=>pt(e.exportClause,CE).elements)),n[0].moduleSpecifier)])}return e}function I(e){const t=N(e,e=>TE(e)&&!e.moduleSpecifier&&!e.attributes&&!!e.exportClause&&CE(e.exportClause));if(t>=0){const n=e[t],r=$(n.exportClause.elements,t=>{if(!t.propertyName){const n=O(ie(e),n=>Fc(e[n],t.name));if(g(n)&&T(n,t=>sC(e[t]))){for(const t of n)e[t]=R(e[t]);return}}return t});g(r)?e[t]=aw.updateExportDeclaration(n,n.modifiers,n.isTypeOnly,aw.updateNamedExports(n.exportClause,r),n.moduleSpecifier,n.attributes):tn(e,t)}return e}function j(e){return e=I(e=F(e=E(e))),c&&(QE(c)&&af(c)||sE(c))&&(!ee(e,lu)||!su(e)&&ee(e,cu))&&e.push(HF(aw)),e}function R(e){const t=-129&rb(e)|32;return aw.replaceModifiers(e,t)}function B(e){const t=-33&rb(e);return aw.replaceModifiers(e,t)}function J(e,t,n){t||d.push(new Map),e.forEach(e=>{V(e,!1,!!n)}),t||(d[d.length-1].forEach(e=>{V(e,!0,!!n)}),d.pop())}function V(e,n,r){Hd(Kl(e));const i=ts(e);if(u.has(GB(i)))return;u.add(GB(i));if(!n||g(e.declarations)&&ee(e.declarations,e=>!!xc(e,e=>e===c))){const i=se(t);W(e,n,r),i()}}function W(e,n,i,o=e.escapedName){var a,s,c,l,_,u;const d=Cc(o),p="default"===o;if(n&&!(131072&t.flags)&&zh(d)&&!p)return void(t.encounteredError=!0);let f=p&&!!(-113&e.flags||16&e.flags&&g(Hd(Kl(e))))&&!(2097152&e.flags),m=!f&&!n&&zh(d)&&!p;(f||m)&&(n=!0);const h=(n?0:32)|(p&&!f?2048:0),y=1536&e.flags&&7&e.flags&&"export="!==o,v=y&&Se(Kl(e),e);if((8208&e.flags||v)&&_e(Kl(e),e,Ae(e,d),h),524288&e.flags&&Q(e,d,h),98311&e.flags&&"export="!==o&&!(4194304&e.flags)&&!(32&e.flags)&&!(8192&e.flags)&&!v)if(i){xe(e)&&(m=!1,f=!1)}else{const p=Kl(e),g=Ae(e,d);if(p.symbol&&p.symbol!==e&&16&p.symbol.flags&&ee(p.symbol.declarations,ZT)&&((null==(a=p.symbol.members)?void 0:a.size)||(null==(s=p.symbol.exports)?void 0:s.size)))t.remappedSymbolReferences||(t.remappedSymbolReferences=new Map),t.remappedSymbolReferences.set(GB(p.symbol),e),W(p.symbol,n,i,o),t.remappedSymbolReferences.delete(GB(p.symbol));else if(16&e.flags||!Se(p,e)){const i=2&e.flags?bP(e)?2:1:(null==(c=e.parent)?void 0:c.valueDeclaration)&&QE(null==(l=e.parent)?void 0:l.valueDeclaration)?2:void 0,o=!f&&4&e.flags?Ee(g,e):g;let a=e.declarations&&C(e.declarations,e=>eE(e));a&&tE(a.parent)&&1===a.parent.declarations.length&&(a=a.parent.parent);const s=null==(_=e.declarations)?void 0:_.find(rP);if(s&&yP(s.parent)&&QN(s.parent.right)&&(null==(u=p.symbol)?void 0:u.valueDeclaration)&&QE(p.symbol.valueDeclaration)){const e=g===s.parent.right.escapedText?void 0:s.parent.right;X(aw.createExportDeclaration(void 0,!1,aw.createNamedExports([aw.createExportSpecifier(!1,e,g)])),0),t.tracker.trackSymbol(p.symbol,t.enclosingDeclaration,111551)}else{X(r(t,aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(o,void 0,ue(t,void 0,p,e))],i)),a),o!==g?-33&h:h),o===g||n||(X(aw.createExportDeclaration(void 0,!1,aw.createNamedExports([aw.createExportSpecifier(!1,o,g)])),0),m=!1,f=!1)}}else _e(p,e,g,h)}if(384&e.flags&&ce(e,d,h),32&e.flags&&(4&e.flags&&e.valueDeclaration&&yP(e.valueDeclaration.parent)&&kP(e.valueDeclaration.parent.right)?ve(e,Ae(e,d),h):he(e,Ae(e,d),h)),(1536&e.flags&&(!y||re(e))||v)&&oe(e,d,h),64&e.flags&&!(32&e.flags)&&Y(e,d,h),2097152&e.flags&&ve(e,Ae(e,d),h),4&e.flags&&"export="===e.escapedName&&xe(e),8388608&e.flags&&e.declarations)for(const n of e.declarations){const e=Ba(n,n.moduleSpecifier);e&&X(aw.createExportDeclaration(void 0,n.isTypeOnly,void 0,aw.createStringLiteral(K(e,t))),0)}f?X(aw.createExportAssignment(void 0,!1,aw.createIdentifier(Ae(e,d))),0):m&&X(aw.createExportDeclaration(void 0,!1,aw.createNamedExports([aw.createExportSpecifier(!1,Ae(e,d),d)])),0)}function H(e){if(ee(e.declarations,dy))return;Tn.assertIsDefined(d[d.length-1]),Ee(Cc(e.escapedName),e);const t=!!(2097152&e.flags)&&!ee(e.declarations,e=>!!xc(e,TE)||bE(e)||uE(e)&&!EE(e.moduleReference));d[t?0:d.length-1].set(GB(e),e)}function G(e){return QE(e)&&(af(e)||sf(e))||pp(e)&&!vp(e)}function X(e,n){if(bI(e)){let r=0;const i=t.enclosingDeclaration&&(Mg(t.enclosingDeclaration)?Dd(t.enclosingDeclaration):t.enclosingDeclaration);32&n&&i&&(G(i)||sE(i))&&sC(e)&&(r|=32),!y||32&r||i&&33554432&i.flags||!(aE(e)||LP(e)||nE(e)||rE(e)||sE(e))||(r|=128),2048&n&&(rE(e)||iE(e)||nE(e))&&(r|=2048),r&&(e=aw.replaceModifiers(e,r|rb(e)))}l.push(e)}function Q(e,n,r){var i;const o=M_(e),a=M($o(e).typeParameters,e=>D(e,t)),c=null==(i=e.declarations)?void 0:i.find(Mg),l=bl(c?c.comment||c.parent.comment:void 0),u=t.flags;t.flags|=8388608;const d=t.enclosingDeclaration;t.enclosingDeclaration=c;const p=c&&c.typeExpression&&ZE(c.typeExpression)&&s(t,c.typeExpression.type,o,void 0)||_(o,t);X(Cw(aw.createTypeAliasDeclaration(void 0,Ae(e,n),a,p),l?[{kind:3,text:"*\n * "+l.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),r),t.flags=u,t.enclosingDeclaration=d}function Y(e,n,r){const i=L_(e),o=M(c_(e),e=>D(e,t)),a=P_(i),s=g(a)?Nv(a):void 0,c=z(Hd(i),e=>Te(e,s)),l=Ce(0,i,s,179),_=Ce(1,i,s,180),u=we(i,s),d=g(a)?[aw.createHeritageClause(96,$(a,e=>De(e,111551)))]:void 0;X(aw.createInterfaceDeclaration(void 0,Ae(e,n),o,d,[...u,..._,...l,...c]),r)}function ne(e){let t=We(Qa(e).values());const n=ts(e);if(n!==e){const e=new Set(t);for(const t of Qa(n).values())111551&Fa(Pa(t))||e.add(t);t=We(e)}return O(t,e=>me(e)&&Es(e.escapedName,99))}function re(e){return T(ne(e),e=>!(111551&Fa(Pa(e))))}function oe(e,n,r){const i=Xe(ne(e),t=>t.parent&&t.parent===e?"real":"merged"),o=i.get("real")||p,a=i.get("merged")||p;if(g(o)){pe(o,Ae(e,n),r,!!(67108880&e.flags))}if(g(a)){const r=Dd(t.enclosingDeclaration),i=Ae(e,n),o=aw.createModuleBlock([aw.createExportDeclaration(void 0,!1,aw.createNamedExports($(O(a,e=>"export="!==e.escapedName),n=>{var i,o;const a=Cc(n.escapedName),s=Ae(n,a),c=n.declarations&&ca(n);if(r&&(c?r!==Dd(c):!ee(n.declarations,e=>Dd(e)===r)))return void(null==(o=null==(i=t.tracker)?void 0:i.reportNonlocalAugmentation)||o.call(i,r,e,n));const l=c&&Na(c,!0);H(l||n);const _=l?Ae(l,Cc(l.escapedName)):s;return aw.createExportSpecifier(!1,a===_?void 0:_,a)})))]);X(aw.createModuleDeclaration(void 0,aw.createIdentifier(i),o,32),0)}}function ce(e,t,n){X(aw.createEnumDeclaration(aw.createModifiersFromModifierFlags(lL(e)?4096:0),Ae(e,t),M(O(Hd(Kl(e)),e=>!!(8&e.flags)),e=>{const t=e.declarations&&e.declarations[0]&&XE(e.declarations[0])?KJ(e.declarations[0]):void 0;return aw.createEnumMember(Cc(e.escapedName),void 0===t?void 0:"string"==typeof t?aw.createStringLiteral(t):aw.createNumericLiteral(t))})),n)}function _e(e,n,i,o){const a=uf(e,0);for(const e of a){const n=x(e,262,t,{name:aw.createIdentifier(i)});X(r(t,n,de(e)),o)}if(!(1536&n.flags&&n.exports&&n.exports.size)){pe(O(Hd(e),me),i,o,!0)}}function de(e){if(e.declaration&&e.declaration.parent){if(yP(e.declaration.parent)&&5===dg(e.declaration.parent))return e.declaration.parent;if(eE(e.declaration.parent)&&e.declaration.parent.parent)return e.declaration.parent.parent}return e.declaration}function pe(e,n,r,i){if(g(e)){const o=Xe(e,e=>!g(e.declarations)||ee(e.declarations,e=>Dd(e)===Dd(t.enclosingDeclaration))?"local":"remote").get("local")||p;let a=kI.createModuleDeclaration(void 0,aw.createIdentifier(n),aw.createModuleBlock([]),32);qT(a,c),a.locals=ad(e),a.symbol=e[0].parent;const s=l;l=[];const _=y;y=!1;const u={...t,enclosingDeclaration:a},d=t;t=u,J(ad(o),i,!0),t=d,y=_;const f=l;l=s;const m=M(f,e=>kE(e)&&!e.isExportEquals&&QN(e.expression)?aw.createExportDeclaration(void 0,!1,aw.createNamedExports([aw.createExportSpecifier(!1,e.expression,aw.createIdentifier("default"))])):e),h=T(m,e=>Wv(e,32))?M(m,B):m;a=aw.updateModuleDeclaration(a,a.modifiers,a.name,aw.createModuleBlock(h)),X(a,r)}}function me(e){return!!(2887656&e.flags)||!(4194304&e.flags||"prototype"===e.escapedName||e.valueDeclaration&&$v(e.valueDeclaration)&&S_(e.valueDeclaration.parent))}function ge(e){const r=$(e,e=>{const r=t.enclosingDeclaration;t.enclosingDeclaration=e;let i=e.expression;if(Cb(i)){if(QN(i)&&""===wc(i))return o(void 0);let e;if(({introducesError:e,node:i}=fe(i,t)),e)return o(void 0)}return o(aw.createExpressionWithTypeArguments(i,M(e.typeArguments,e=>s(t,e,n(t,e))||_(n(t,e),t))));function o(e){return t.enclosingDeclaration=r,e}});if(r.length===e.length)return r}function he(e,n,i){var a,s;const c=null==(a=e.declarations)?void 0:a.find(S_),l=t.enclosingDeclaration;t.enclosingDeclaration=c||l;const _=M(c_(e),e=>D(e,t)),u=Tu(L_(e)),d=P_(u),f=c&&Eh(c),m=f&&ge(f)||$(function(e){let t=p;if(e.symbol.declarations)for(const n of e.symbol.declarations){const e=Eh(n);if(e)for(const n of e){const e=Mx(n);Pc(e)||(t===p?t=[e]:t.push(e))}}return t}(u),Pe),y=Kl(e),v=!!(null==(s=y.symbol)?void 0:s.valueDeclaration)&&S_(y.symbol.valueDeclaration),b=v?N_(y):St,x=[...g(d)?[aw.createHeritageClause(96,M(d,e=>Ne(e,b,n)))]:[],...g(m)?[aw.createHeritageClause(119,m)]:[]],S=function(e,t,n){if(!g(t))return n;const r=new Map;h(n,e=>{r.set(e.escapedName,e)});for(const n of t){const t=Hd(Tu(n,e.thisType));for(const e of t){const t=r.get(e.escapedName);t&&e.parent===t.parent&&r.delete(e.escapedName)}}return We(r.values())}(u,d,Hd(u)),k=O(S,e=>{const t=e.valueDeclaration;return!(!t||Ic(t)&&YN(t.name))}),T=ee(S,e=>{const t=e.valueDeclaration;return!!t&&Ic(t)&&YN(t.name)})?[aw.createPropertyDeclaration(void 0,aw.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:p,C=z(k,e=>o(e,!1,d[0])),w=z(O(Hd(y),e=>!(4194304&e.flags||"prototype"===e.escapedName||me(e))),e=>o(e,!0,b)),N=!v&&!!e.valueDeclaration&&zm(e.valueDeclaration)&&!ee(uf(y,1))?[aw.createConstructorDeclaration(aw.createModifiersFromModifierFlags(2),[],void 0)]:Ce(1,y,b,176),P=we(u,d[0]);t.enclosingDeclaration=l,X(r(t,aw.createClassDeclaration(void 0,n,_,x,[...P,...w,...N,...C,...T]),e.declarations&&O(e.declarations,e=>rE(e)||kP(e))[0]),i)}function ye(e){return v(e,e=>{if(SE(e)||wE(e))return wc(e.propertyName||e.name);if(yP(e)||kE(e)){const t=kE(e)?e.expression:e.right;if(rP(t))return wc(t.name)}if(la(e)){const t=jc(e);if(t&&QN(t))return wc(t)}})}function ve(e,n,r){var i,o,a,s,c,l;const _=ca(e);if(!_)return Tn.fail();const u=ts(Na(_,!0));if(!u)return;let d=hp(u)&&ye(e.declarations)||Cc(u.escapedName);"export="===d&&U&&(d="default");const p=Ae(u,d);switch(H(u),_.kind){case 208:if(260===(null==(o=null==(i=_.parent)?void 0:i.parent)?void 0:o.kind)){const e=K(u.parent||u,t),{propertyName:r}=_;X(aw.createImportDeclaration(void 0,aw.createImportClause(!1,void 0,aw.createNamedImports([aw.createImportSpecifier(!1,r&&QN(r)?aw.createIdentifier(wc(r)):void 0,aw.createIdentifier(n))])),aw.createStringLiteral(e),void 0),0);break}Tn.failBadSyntaxKind((null==(a=_.parent)?void 0:a.parent)||_,"Unhandled binding element grandparent kind in declaration serialization");break;case 304:226===(null==(c=null==(s=_.parent)?void 0:s.parent)?void 0:c.kind)&&be(Cc(e.escapedName),p);break;case 260:if(rP(_.initializer)){const e=_.initializer,i=aw.createUniqueName(n),o=K(u.parent||u,t);X(aw.createImportEqualsDeclaration(void 0,!1,i,aw.createExternalModuleReference(aw.createStringLiteral(o))),0),X(aw.createImportEqualsDeclaration(void 0,!1,aw.createIdentifier(n),aw.createQualifiedName(i,e.name)),r);break}case 271:if("export="===u.escapedName&&ee(u.declarations,e=>QE(e)&&sf(e))){xe(e);break}const f=!(512&u.flags||eE(_));X(aw.createImportEqualsDeclaration(void 0,!1,aw.createIdentifier(n),f?Z(u,t,-1,!1):aw.createExternalModuleReference(aw.createStringLiteral(K(u,t)))),f?r:0);break;case 270:X(aw.createNamespaceExportDeclaration(wc(_.name)),0);break;case 273:{const e=K(u.parent||u,t),r=t.bundled?aw.createStringLiteral(e):_.parent.moduleSpecifier,i=dE(_.parent)?_.parent.attributes:void 0,o=JF(_.parent);X(aw.createImportDeclaration(void 0,aw.createImportClause(o,aw.createIdentifier(n),void 0),r,i),0);break}case 274:{const e=K(u.parent||u,t),r=t.bundled?aw.createStringLiteral(e):_.parent.parent.moduleSpecifier,i=JF(_.parent.parent);X(aw.createImportDeclaration(void 0,aw.createImportClause(i,void 0,aw.createNamespaceImport(aw.createIdentifier(n))),r,_.parent.attributes),0);break}case 280:X(aw.createExportDeclaration(void 0,!1,aw.createNamespaceExport(aw.createIdentifier(n)),aw.createStringLiteral(K(u,t))),0);break;case 276:{const e=K(u.parent||u,t),r=t.bundled?aw.createStringLiteral(e):_.parent.parent.parent.moduleSpecifier,i=JF(_.parent.parent.parent);X(aw.createImportDeclaration(void 0,aw.createImportClause(i,void 0,aw.createNamedImports([aw.createImportSpecifier(!1,n!==d?aw.createIdentifier(d):void 0,aw.createIdentifier(n))])),r,_.parent.parent.parent.attributes),0);break}case 281:const m=_.parent.parent.moduleSpecifier;m&&"default"===(null==(l=_.propertyName)?void 0:l.escapedText)&&(d="default"),be(Cc(e.escapedName),m?d:p,m&&Ku(m)?aw.createStringLiteral(m.text):void 0);break;case 277:xe(e);break;case 226:case 211:case 212:"default"===e.escapedName||"export="===e.escapedName?xe(e):be(n,p);break;default:return Tn.failBadSyntaxKind(_,"Unhandled alias declaration kind in symbol serializer!")}}function be(e,t,n){X(aw.createExportDeclaration(void 0,!1,aw.createNamedExports([aw.createExportSpecifier(!1,e!==t?t:void 0,e)]),n),0)}function xe(e){var n;if(4194304&e.flags)return!1;const r=Cc(e.escapedName),i="export="===r,o=i||"default"===r,a=e.declarations&&ca(e),s=a&&Na(a,!0);if(s&&g(s.declarations)&&ee(s.declarations,e=>Dd(e)===Dd(c))){const n=a&&(kE(a)||yP(a)?wh(a):Nh(a)),_=n&&Cb(n)?function(e){switch(e.kind){case 80:return e;case 166:do{e=e.left}while(80!==e.kind);return e;case 211:do{if(ug(e.expression)&&!YN(e.name))return e.name;e=e.expression}while(80!==e.kind);return e}}(n):void 0,u=_&&Ma(_,-1,!0,!0,c);(u||s)&&H(u||s);const d=t.tracker.disableTrackSymbol;if(t.tracker.disableTrackSymbol=!0,o)l.push(aw.createExportAssignment(void 0,i,te(s,t,-1)));else if(_===n&&_)be(r,wc(_));else if(n&&kP(n))be(r,Ae(s,Dc(s)));else{const n=Ee(r,e);X(aw.createImportEqualsDeclaration(void 0,!1,aw.createIdentifier(n),Z(s,t,-1,!1)),0),be(r,n)}return t.tracker.disableTrackSymbol=d,!0}{const a=Ee(r,e),c=YC(Kl(ts(e)));if(Se(c,e))_e(c,e,a,o?0:32);else{const i=267!==(null==(n=t.enclosingDeclaration)?void 0:n.kind)||98304&e.flags&&!(65536&e.flags)?2:1;X(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(a,void 0,ue(t,void 0,c,e))],i)),s&&4&s.flags&&"export="===s.escapedName?128:r===a?32:0)}return o?(l.push(aw.createExportAssignment(void 0,i,aw.createIdentifier(a))),!0):r!==a&&(be(r,a),!0)}}function Se(e,n){var r;const i=Dd(t.enclosingDeclaration);return 48&Ox(e)&&!ee(null==(r=e.symbol)?void 0:r.declarations,A_)&&!g(bf(e))&&!ec(e)&&!(!g(O(Hd(e),me))&&!g(uf(e,0)))&&!g(uf(e,1))&&!le(n,c)&&!(e.symbol&&ee(e.symbol.declarations,e=>Dd(e)!==i))&&!ee(Hd(e),e=>pu(e.escapedName))&&!ee(Hd(e),e=>ee(e.declarations,e=>Dd(e)!==i))&&T(Hd(e),e=>!!Es(Dc(e),P)&&(!(98304&e.flags)||Gl(e)===Hl(e)))}function ke(e,n,i){return function(o,a,s){var c,l,_,u,d;const p=Sx(o),f=!!(2&p);if(a&&2887656&o.flags)return[];if(4194304&o.flags||"constructor"===o.escapedName||s&&Zp(s,o.escapedName)&&Yj(Zp(s,o.escapedName))===Yj(o)&&(16777216&o.flags)==(16777216&Zp(s,o.escapedName).flags)&&PS(Kl(o),yc(s,o.escapedName)))return[];const m=-1025&p|(a?256:0),g=ae(o,t),y=null==(c=o.declarations)?void 0:c.find(fn(yD,k_,eE,hD,yP,rP));if(98304&o.flags&&i){const e=[];if(65536&o.flags){const n=o.declarations&&h(o.declarations,e=>178===e.kind?e:oP(e)&&pg(e)?h(e.arguments[2].properties,e=>{const t=jc(e);if(t&&QN(t)&&"set"===wc(t))return e}):void 0);Tn.assert(!!n);const i=g_(n)?$f(n).parameters[0]:void 0;e.push(r(t,aw.createSetAccessorDeclaration(aw.createModifiersFromModifierFlags(m),g,[aw.createParameterDeclaration(void 0,void 0,i?L(i,A(i),t):"value",void 0,f?void 0:ue(t,void 0,Hl(o),o))],void 0),(null==(l=o.declarations)?void 0:l.find(Ru))||y))}if(32768&o.flags){const n=2&p;e.push(r(t,aw.createGetAccessorDeclaration(aw.createModifiersFromModifierFlags(m),g,[],n?void 0:ue(t,void 0,Kl(o),o),void 0),(null==(_=o.declarations)?void 0:_.find(Bu))||y))}return e}if(98311&o.flags)return r(t,e(aw.createModifiersFromModifierFlags((Yj(o)?8:0)|m),g,16777216&o.flags?aw.createToken(58):void 0,f?void 0:ue(t,void 0,Hl(o),o),void 0),(null==(u=o.declarations)?void 0:u.find(fn(yD,eE)))||y);if(8208&o.flags){const i=uf(Kl(o),0);if(2&m)return r(t,e(aw.createModifiersFromModifierFlags((Yj(o)?8:0)|m),g,16777216&o.flags?aw.createToken(58):void 0,void 0,void 0),(null==(d=o.declarations)?void 0:d.find(g_))||i[0]&&i[0].declaration||o.declarations&&o.declarations[0]);const a=[];for(const e of i){const i=x(e,n,t,{name:g,questionToken:16777216&o.flags?aw.createToken(58):void 0,modifiers:m?aw.createModifiersFromModifierFlags(m):void 0}),s=e.declaration&&Tg(e.declaration.parent)?e.declaration.parent:e.declaration;a.push(r(t,i,s))}return a}return Tn.fail(`Unhandled class member kind! ${o.__debugFlags||o.flags}`)}}function Te(e,t){return a(e,!1,t)}function Ce(e,n,i,o){const a=uf(n,e);if(1===e){if(!i&&T(a,e=>0===g(e.parameters)))return[];if(i){const e=uf(i,1);if(!g(e)&&T(a,e=>0===g(e.parameters)))return[];if(e.length===a.length){let t=!1;for(let n=0;n_(e,t)),i=te(e.target.symbol,t,788968)):e.symbol&&Is(e.symbol,c,n)&&(i=te(e.symbol,t,788968)),i)return aw.createExpressionWithTypeArguments(i,r)}function Pe(e){const n=De(e,788968);return n||(e.symbol?aw.createExpressionWithTypeArguments(te(e.symbol,t,788968),void 0):void 0)}function Ee(e,n){var r,i;const o=n?GB(n):void 0;if(o&&t.remappedSymbolNames.has(o))return t.remappedSymbolNames.get(o);n&&(e=Fe(n,e));let a=0;const s=e;for(;null==(r=t.usedSymbolNames)?void 0:r.has(e);)a++,e=`${s}_${a}`;return null==(i=t.usedSymbolNames)||i.add(e),o&&t.remappedSymbolNames.set(o,e),e}function Fe(e,n){if("default"===n||"__class"===n||"__function"===n){const r=t.flags;t.flags|=16777216;const i=ac(e,t);t.flags=r,n=i.length>0&&Ym(i.charCodeAt(0))?Wy(i):i}return"default"===n?n="_default":"export="===n&&(n="_exports"),n=Es(n,P)&&!zh(n)?n:"_"+n.replace(/[^a-zA-Z0-9]/g,"_")}function Ae(e,n){const r=GB(e);return t.remappedSymbolNames.has(r)?t.remappedSymbolNames.get(r):(n=Fe(e,n),t.remappedSymbolNames.set(r,n),n)}}(e,t)),symbolToNode:(e,t,n,r,i)=>c(n,r,i,n=>function(e,t,n){if(1073741824&t.flags){if(e.valueDeclaration){const t=jc(e.valueDeclaration);if(t&&pD(t))return t}const r=$o(e).nameType;if(r&&9216&r.flags)return t.enclosingDeclaration=r.symbol.valueDeclaration,aw.createComputedPropertyName(te(r.symbol,t,n))}return te(e,t,n)}(e,n,t))};function n(e,t,n){const r=function(e){return Mx(e)}(t);if(!e.mapper)return r;const i=hS(r,e.mapper);return n&&i!==r?void 0:i}function r(e,t,n){return my(t)&&16&t.flags&&e.enclosingFile&&e.enclosingFile===Dd(bc(t))||(t=aw.cloneNode(t)),t===n?t:n?e.enclosingFile&&e.enclosingFile===Dd(bc(n))?vI(cw(t,n),n):cw(t,n):t}function o(e,t,n,r){const i=e.flags;!t||-2147483648&e.flags||ce.serializeTypeOfExpression(t,e,r),e.flags|=-2147483648;const o=function(e,t,n,r){if(t){const i=ru(t)?t.type:fA(t)?mA(t):void 0;if(i&&!Il(i)){const o=a(e,i,n,t.parent,r);if(o)return o}}r&&(n=DC(n));return _(n,e)}(e,t,n,r);return e.flags=i,o}function a(e,t,r,i,o){const a=r;o&&(r=DC(r));const c=s(e,t,r,i);if(c)return o&&!JN(n(e,t),e=>!!(32768&e.flags))?aw.createUnionTypeNode([c,aw.createKeywordTypeNode(157)]):c;if(o&&a!==r){const n=s(e,t,a,i);if(n)return aw.createUnionTypeNode([n,aw.createKeywordTypeNode(157)])}}function s(e,t,r,i=e.enclosingDeclaration,o=n(e,t,!0)){if(o&&function(e,t,n){if(n===t)return!0;if(e&&(mD(e)||hD(e)||yD(e))&&e.questionToken)return hN(t,524288)===n;return!1}(i,r,o)&&_e(t,r)){const n=he(e,t);if(n)return n}}function c(t,n,r,i){const o=(null==r?void 0:r.trackSymbol)?r.moduleResolverHost:134217728&n?function(e){return{getCommonSourceDirectory:e.getCommonSourceDirectory?()=>e.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>e.getCurrentDirectory(),getSymlinkCache:nt(e,e.getSymlinkCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getPackageJsonInfoCache)?void 0:t.call(e)},useCaseSensitiveFileNames:nt(e,e.useCaseSensitiveFileNames),redirectTargetsMap:e.redirectTargetsMap,getProjectReferenceRedirect:t=>e.getProjectReferenceRedirect(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),fileExists:t=>e.fileExists(t),getFileIncludeReasons:()=>e.getFileIncludeReasons(),readFile:e.readFile?t=>e.readFile(t):void 0}}(e):void 0,a={enclosingDeclaration:t,enclosingFile:t&&Dd(t),flags:n||0,tracker:void 0,encounteredError:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!!k.outFile&&!!t&&af(Dd(t)),truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,mapper:void 0};a.tracker=new rJ(a,r,o);const s=i(a);return a.truncating&&1&a.flags&&a.tracker.reportTruncationError(),a.encounteredError?void 0:s}function l(e){return e.truncating?e.truncating:e.truncating=e.approximateLength>(1&e.flags?rd:nd)}function _(e,o){const a=o.flags,c=function(e,o){var a,c;t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();const d=8388608&o.flags;if(o.flags&=-8388609,!e)return 262144&o.flags?(o.approximateLength+=3,aw.createKeywordTypeNode(133)):void(o.encounteredError=!0);536870912&o.flags||(e=Fp(e));if(1&e.flags)return e.aliasSymbol?aw.createTypeReferenceNode(G(e.aliasSymbol),y(e.aliasTypeArguments,o)):e===Nt?ww(aw.createKeywordTypeNode(133),3,"unresolved"):(o.approximateLength+=3,aw.createKeywordTypeNode(e===Et?141:133));if(2&e.flags)return aw.createKeywordTypeNode(159);if(4&e.flags)return o.approximateLength+=6,aw.createKeywordTypeNode(154);if(8&e.flags)return o.approximateLength+=6,aw.createKeywordTypeNode(150);if(64&e.flags)return o.approximateLength+=6,aw.createKeywordTypeNode(163);if(16&e.flags&&!e.aliasSymbol)return o.approximateLength+=7,aw.createKeywordTypeNode(136);if(1056&e.flags){if(8&e.symbol.flags){const t=as(e.symbol),n=X(t,o,788968);if(U_(t)===e)return n;const r=Dc(e.symbol);return Es(r,1)?L(n,aw.createTypeReferenceNode(r,void 0)):GD(n)?(n.isTypeOf=!0,aw.createIndexedAccessTypeNode(n,aw.createLiteralTypeNode(aw.createStringLiteral(r)))):PD(n)?aw.createIndexedAccessTypeNode(aw.createTypeQueryNode(n.typeName),aw.createLiteralTypeNode(aw.createStringLiteral(r))):Tn.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}return X(e.symbol,o,788968)}if(128&e.flags)return o.approximateLength+=e.value.length+2,aw.createLiteralTypeNode(dw(aw.createStringLiteral(e.value,!!(268435456&o.flags)),16777216));if(256&e.flags){const t=e.value;return o.approximateLength+=(""+t).length,aw.createLiteralTypeNode(t<0?aw.createPrefixUnaryExpression(41,aw.createNumericLiteral(-t)):aw.createNumericLiteral(t))}if(2048&e.flags)return o.approximateLength+=ET(e.value).length+1,aw.createLiteralTypeNode(aw.createBigIntLiteral(e.value));if(512&e.flags)return o.approximateLength+=e.intrinsicName.length,aw.createLiteralTypeNode("true"===e.intrinsicName?aw.createTrue():aw.createFalse());if(8192&e.flags){if(!(1048576&o.flags)){if(As(e.symbol,o.enclosingDeclaration))return o.approximateLength+=6,X(e.symbol,o,111551);o.tracker.reportInaccessibleUniqueSymbolError&&o.tracker.reportInaccessibleUniqueSymbolError()}return o.approximateLength+=13,aw.createTypeOperatorNode(158,aw.createKeywordTypeNode(155))}if(16384&e.flags)return o.approximateLength+=4,aw.createKeywordTypeNode(116);if(32768&e.flags)return o.approximateLength+=9,aw.createKeywordTypeNode(157);if(65536&e.flags)return o.approximateLength+=4,aw.createLiteralTypeNode(aw.createNull());if(131072&e.flags)return o.approximateLength+=5,aw.createKeywordTypeNode(146);if(4096&e.flags)return o.approximateLength+=6,aw.createKeywordTypeNode(155);if(67108864&e.flags)return o.approximateLength+=6,aw.createKeywordTypeNode(151);if(rC(e))return 4194304&o.flags&&(o.encounteredError||32768&o.flags||(o.encounteredError=!0),null==(c=(a=o.tracker).reportInaccessibleThisError)||c.call(a)),o.approximateLength+=4,aw.createThisTypeNode();if(!d&&e.aliasSymbol&&(16384&o.flags||(m=e.aliasSymbol,v=o.enclosingDeclaration,0===Ls(m,v,788968,!1,!0).accessibility))){const t=y(e.aliasTypeArguments,o);return!xs(e.aliasSymbol.escapedName)||32&e.aliasSymbol.flags?1===g(t)&&e.aliasSymbol===Xn.symbol?aw.createArrayTypeNode(t[0]):X(e.aliasSymbol,o,788968,t):aw.createTypeReferenceNode(aw.createIdentifier(""),t)}var m,v;const S=Ox(e);if(4&S)return Tn.assert(!!(524288&e.flags)),e.node?F(e,j):j(e);if(262144&e.flags||3&S){if(262144&e.flags&&E(o.inferTypeParameters,e)){let t;o.approximateLength+=Dc(e.symbol).length+6;const n=Gd(e);if(n){const r=Ng(e,!0);r&&PS(n,r)||(o.approximateLength+=9,t=n&&_(n,o))}return aw.createInferTypeNode(w(e,o,t))}if(4&o.flags&&262144&e.flags){const t=Y(e,o);return o.approximateLength+=wc(t).length,aw.createTypeReferenceNode(aw.createIdentifier(wc(t)),void 0)}if(e.symbol)return X(e.symbol,o,788968);const t=(e===Jn||e===zn)&&i&&i.symbol?(e===zn?"sub-":"super-")+Dc(i.symbol):"?";return aw.createTypeReferenceNode(aw.createIdentifier(t),void 0)}1048576&e.flags&&e.origin&&(e=e.origin);if(3145728&e.flags){const t=1048576&e.flags?function(e){const t=[];let n=0;for(let r=0;r0?1048576&e.flags?aw.createUnionTypeNode(n):aw.createIntersectionTypeNode(n):void(o.encounteredError||262144&o.flags||(o.encounteredError=!0))}if(48&S)return Tn.assert(!!(524288&e.flags)),P(e);if(4194304&e.flags){const t=e.type;o.approximateLength+=6;const n=_(t,o);return aw.createTypeOperatorNode(143,n)}if(134217728&e.flags){const t=e.texts,n=e.types,r=aw.createTemplateHead(t[0]),i=aw.createNodeArray(M(n,(e,r)=>aw.createTemplateLiteralTypeSpan(_(e,o),(rk(e));if(33554432&e.flags){const t=_(e.baseType,o),n=jh(e)&&ay("NoInfer",!1);return n?X(n,o,788968,[t]):t}return Tn.fail("Should be unreachable.");function k(e){const t=_(e.checkType,o);if(o.approximateLength+=15,4&o.flags&&e.root.isDistributive&&!(262144&e.checkType.flags)){const r=bs(Eo(262144,"T")),i=Y(r,o),a=aw.createTypeReferenceNode(i);o.approximateLength+=37;const s=eS(e.root.checkType,r,e.mapper),c=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const l=_(hS(e.root.extendsType,s),o);o.inferTypeParameters=c;const u=T(hS(n(o,e.root.node.trueType),s)),d=T(hS(n(o,e.root.node.falseType),s));return aw.createConditionalTypeNode(t,aw.createInferTypeNode(aw.createTypeParameterDeclaration(void 0,aw.cloneNode(a.typeName))),aw.createConditionalTypeNode(aw.createTypeReferenceNode(aw.cloneNode(i)),_(e.checkType,o),aw.createConditionalTypeNode(a,l,u,d),aw.createKeywordTypeNode(146)),aw.createKeywordTypeNode(146))}const r=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const i=_(e.extendsType,o);o.inferTypeParameters=r;const a=T(nx(e)),s=T(rx(e));return aw.createConditionalTypeNode(t,i,a,s)}function T(e){var t,n,r;return 1048576&e.flags?(null==(t=o.visitedTypes)?void 0:t.has(rv(e)))?(131072&o.flags||(o.encounteredError=!0,null==(r=null==(n=o.tracker)?void 0:n.reportCyclicStructureError)||r.call(n)),u(o)):F(e,e=>_(e,o)):_(e,o)}function C(e){return!!cS(e)}function N(e){return!!e.target&&C(e.target)&&!C(e)}function D(e){var t;Tn.assert(!!(524288&e.flags));const r=e.declaration.readonlyToken?aw.createToken(e.declaration.readonlyToken.kind):void 0,i=e.declaration.questionToken?aw.createToken(e.declaration.questionToken.kind):void 0;let a,s;const c=!Od(e)&&!(2&jd(e).flags)&&4&o.flags&&!(262144&Cd(e).flags&&4194304&(null==(t=Gd(Cd(e)))?void 0:t.flags));if(Od(e)){if(N(e)&&4&o.flags){const e=Y(bs(Eo(262144,"T")),o);s=aw.createTypeReferenceNode(e)}a=aw.createTypeOperatorNode(143,s||_(jd(e),o))}else if(c){const e=Y(bs(Eo(262144,"T")),o);s=aw.createTypeReferenceNode(e),a=s}else a=_(Cd(e),o);const l=w(Td(e),o,a),u=e.declaration.nameType?_(wd(e),o):void 0,d=_(zC(Ad(e),!!(4&Rd(e))),o),p=aw.createMappedTypeNode(r,l,u,i,d,void 0);o.approximateLength+=10;const f=dw(p,1);if(N(e)&&4&o.flags){const t=hS(Gd(n(o,e.declaration.typeParameter.constraint.type))||Ft,e.mapper);return aw.createConditionalTypeNode(_(jd(e),o),aw.createInferTypeNode(aw.createTypeParameterDeclaration(void 0,aw.cloneNode(s.typeName),2&t.flags?void 0:_(t,o))),f,aw.createKeywordTypeNode(146))}return c?aw.createConditionalTypeNode(_(Cd(e),o),aw.createInferTypeNode(aw.createTypeParameterDeclaration(void 0,aw.cloneNode(s.typeName),aw.createTypeOperatorNode(143,_(jd(e),o)))),f,aw.createKeywordTypeNode(146)):f}function P(e){var t,n;const r=e.id,i=e.symbol;if(i){if(!!(8388608&Ox(e))){const n=e.node;if(AD(n)){const t=s(o,n,e);if(t)return t}return(null==(t=o.visitedTypes)?void 0:t.has(r))?u(o):F(e,A)}const c=ec(e)?788968:111551;if(RO(i.valueDeclaration))return X(i,o,c);if(32&i.flags&&!Bl(i)&&(!(i.valueDeclaration&&S_(i.valueDeclaration)&&2048&o.flags)||rE(i.valueDeclaration)&&0===js(i,o.enclosingDeclaration,c,!1).accessibility)||896&i.flags||a())return X(i,o,c);if(null==(n=o.visitedTypes)?void 0:n.has(r)){const t=function(e){if(e.symbol&&2048&e.symbol.flags&&e.symbol.declarations){const t=uh(e.symbol.declarations[0].parent);if(oE(t))return rs(t)}return}(e);return t?X(t,o,788968):u(o)}return F(e,A)}return A(e);function a(){var e;const t=!!(8192&i.flags)&&ee(i.declarations,e=>$v(e)),n=!!(16&i.flags)&&(i.parent||h(i.declarations,e=>307===e.parent.kind||268===e.parent.kind));if(t||n)return(!!(4096&o.flags)||(null==(e=o.visitedTypes)?void 0:e.has(r)))&&(!(8&o.flags)||As(i,o.enclosingDeclaration))}}function F(e,t){var n,i,a;const s=e.id,c=16&Ox(e)&&e.symbol&&32&e.symbol.flags,l=4&Ox(e)&&e.node?"N"+KB(e.node):16777216&e.flags?"N"+KB(e.root.node):e.symbol?(c?"+":"")+GB(e.symbol):void 0;o.visitedTypes||(o.visitedTypes=new Set),l&&!o.symbolDepth&&(o.symbolDepth=new Map);const _=o.enclosingDeclaration&&Ho(o.enclosingDeclaration),d=`${rv(e)}|${o.flags}`;_&&(_.serializedTypes||(_.serializedTypes=new Map));const p=null==(n=null==_?void 0:_.serializedTypes)?void 0:n.get(d);if(p)return null==(i=p.trackedSymbols)||i.forEach(([e,t,n])=>o.tracker.trackSymbol(e,t,n)),p.truncating&&(o.truncating=!0),o.approximateLength+=p.addedLength,v(p.node);let f;if(l){if(f=o.symbolDepth.get(l)||0,f>10)return u(o);o.symbolDepth.set(l,f+1)}o.visitedTypes.add(s);const m=o.trackedSymbols;o.trackedSymbols=void 0;const g=o.approximateLength,h=t(e),y=o.approximateLength-g;return o.reportedDiagnostic||o.encounteredError||null==(a=null==_?void 0:_.serializedTypes)||a.set(d,{node:h,truncating:o.truncating,addedLength:y,trackedSymbols:o.trackedSymbols}),o.visitedTypes.delete(s),l&&o.symbolDepth.set(l,f),o.trackedSymbols=m,h;function v(e){return my(e)||kc(e)!==e?r(o,aw.cloneNode(fJ(e,v,void 0,b,v)),e):e}function b(e,t,n,r,i){return e&&0===e.length?vI(aw.createNodeArray(void 0,e.hasTrailingComma),e):oJ(e,t,n,r,i)}}function A(e){if(zd(e)||e.containsError)return D(e);const t=Ud(e);if(!t.properties.length&&!t.indexInfos.length){if(!t.callSignatures.length&&!t.constructSignatures.length)return o.approximateLength+=2,dw(aw.createTypeLiteralNode(void 0),1);if(1===t.callSignatures.length&&!t.constructSignatures.length){return x(t.callSignatures[0],184,o)}if(1===t.constructSignatures.length&&!t.callSignatures.length){return x(t.constructSignatures[0],185,o)}}const n=O(t.constructSignatures,e=>!!(4&e.flags));if(ee(n)){const e=M(n,e=>Zm(e));return t.callSignatures.length+(t.constructSignatures.length-n.length)+t.indexInfos.length+(2048&o.flags?I(t.properties,e=>!(4194304&e.flags)):g(t.properties))&&e.push(function(e){if(0===e.constructSignatures.length)return e;if(e.objectTypeWithoutAbstractConstructSignatures)return e.objectTypeWithoutAbstractConstructSignatures;const t=O(e.constructSignatures,e=>!(4&e.flags));if(e.constructSignatures===t)return e;const n=Cs(e.symbol,e.members,e.callSignatures,ee(t)?t:p,e.indexInfos);return e.objectTypeWithoutAbstractConstructSignatures=n,n.objectTypeWithoutAbstractConstructSignatures=n,n}(t)),_(Nv(e),o)}const r=o.flags;o.flags|=4194304;const i=J(t);o.flags=r;const a=aw.createTypeLiteralNode(i);return o.approximateLength+=2,dw(a,1024&o.flags?0:1),a}function j(e){let t=Hg(e);if(e.target===Xn||e.target===Qn){if(2&o.flags){const n=_(t[0],o);return aw.createTypeReferenceNode(e.target===Xn?"Array":"ReadonlyArray",[n])}const n=_(t[0],o),r=aw.createArrayTypeNode(n);return e.target===Xn?r:aw.createTypeOperatorNode(148,r)}if(!(8&e.target.objectFlags)){if(2048&o.flags&&e.symbol.valueDeclaration&&S_(e.symbol.valueDeclaration)&&!As(e.symbol,o.enclosingDeclaration))return P(e);{const n=e.target.outerTypeParameters;let r,i,a=0;if(n){const e=n.length;for(;a0){const n=(e.target.typeParameters||p).length;i=y(t.slice(a,n),o)}const s=o.flags;o.flags|=16;const c=X(e.symbol,o,788968,i);return o.flags=s,r?L(r,c):c}}if(t=B(t,(t,n)=>zC(t,!!(2&e.target.elementFlags[n]))),t.length>0){const n=nh(e),r=y(t.slice(0,n),o);if(r){const{labeledElementDeclarations:t}=e.target;for(let n=0;n!(32768&e.flags)),0);for(const r of e){const e=x(r,173,t,{name:s,questionToken:c});n.push(f(e))}if(e.length||!c)return}let l;d(e,t)?l=u(t):(i&&(t.reverseMappedStack||(t.reverseMappedStack=[]),t.reverseMappedStack.push(e)),l=o?ue(t,void 0,o,e):aw.createKeywordTypeNode(133),i&&t.reverseMappedStack.pop());const _=Yj(e)?[aw.createToken(148)]:void 0;_&&(t.approximateLength+=9);const p=aw.createPropertySignature(_,s,c,l);function f(n){var r;const i=null==(r=e.declarations)?void 0:r.find(e=>348===e.kind);if(i){const e=bl(i.comment);e&&Cw(n,[{kind:3,text:"*\n * "+e.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}])}else e.valueDeclaration&&m(t,n,e.valueDeclaration);return n}n.push(f(p))}function m(e,t,n){return e.enclosingFile&&e.enclosingFile===Dd(n)?kw(t,n):t}function y(e,t,n){if(ee(e)){if(l(t)){if(!n)return[aw.createTypeReferenceNode("...",void 0)];if(e.length>2)return[_(e[0],t),aw.createTypeReferenceNode(`... ${e.length-2} more ...`,void 0),_(e[e.length-1],t)]}const r=!(64&t.flags)?rt():void 0,i=[];let o=0;for(const n of e){if(o++,l(t)&&o+2{if(!LT(e,([e],[t])=>function(e,t){return e===t||!!e.symbol&&e.symbol===t.symbol||!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}(e,t)))for(const[n,r]of e)i[r]=_(n,t)}),t.flags=e}return i}}function b(e,t,n){const r=Bp(e)||"x",i=_(e.keyType,t),o=aw.createParameterDeclaration(void 0,void 0,r,void 0,i,void 0);return n||(n=_(e.type||St,t)),e.type||2097152&t.flags||(t.encounteredError=!0),t.approximateLength+=r.length+4,aw.createIndexSignature(e.isReadonly?[aw.createToken(148)]:void 0,[o],n)}function x(e,t,r,i){var o;let a,s;const c=Au(e,!0)[0],l=S(r,e.declaration,c,e.typeParameters,e.parameters,e.mapper);r.approximateLength+=3,32&r.flags&&e.target&&e.mapper&&e.target.typeParameters?s=e.target.typeParameters.map(t=>_(hS(t,e.mapper),r)):a=e.typeParameters&&e.typeParameters.map(e=>D(e,r));const u=r.flags;r.flags&=-257;const d=(ee(c,e=>e!==c[c.length-1]&&!!(32768&xx(e)))?e.parameters:c).map(e=>j(e,r,176===t)),p=33554432&r.flags?void 0:function(e,t){if(e.thisParameter)return j(e.thisParameter,t);if(e.declaration&&zm(e.declaration)){const r=sl(e.declaration);if(r&&r.typeExpression)return aw.createParameterDeclaration(void 0,void 0,"this",void 0,_(n(t,r.typeExpression),t))}}(e,r);p&&d.unshift(p),r.flags=u;const f=de(r,e);let m=null==i?void 0:i.modifiers;if(185===t&&4&e.flags){const e=_b(m);m=aw.createModifiersFromModifierFlags(64|e)}const g=179===t?aw.createCallSignature(a,d,f):180===t?aw.createConstructSignature(a,d,f):173===t?aw.createMethodSignature(m,(null==i?void 0:i.name)??aw.createIdentifier(""),null==i?void 0:i.questionToken,a,d,f):174===t?aw.createMethodDeclaration(m,void 0,(null==i?void 0:i.name)??aw.createIdentifier(""),void 0,a,d,f,void 0):176===t?aw.createConstructorDeclaration(m,d,void 0):177===t?aw.createGetAccessorDeclaration(m,(null==i?void 0:i.name)??aw.createIdentifier(""),d,f,void 0):178===t?aw.createSetAccessorDeclaration(m,(null==i?void 0:i.name)??aw.createIdentifier(""),d,void 0):181===t?aw.createIndexSignature(m,d,f):317===t?aw.createJSDocFunctionType(d,f):184===t?aw.createFunctionTypeNode(a,d,f??aw.createTypeReferenceNode(aw.createIdentifier(""))):185===t?aw.createConstructorTypeNode(m,a,d,f??aw.createTypeReferenceNode(aw.createIdentifier(""))):262===t?aw.createFunctionDeclaration(m,void 0,(null==i?void 0:i.name)?pt(i.name,QN):aw.createIdentifier(""),a,d,f,void 0):218===t?aw.createFunctionExpression(m,void 0,(null==i?void 0:i.name)?pt(i.name,QN):aw.createIdentifier(""),a,d,f,aw.createBlock([])):219===t?aw.createArrowFunction(m,a,d,f,void 0,aw.createBlock([])):Tn.assertNever(t);if(s&&(g.typeArguments=aw.createNodeArray(s)),323===(null==(o=e.declaration)?void 0:o.kind)&&339===e.declaration.parent.kind){ww(g,3,tp(e.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map(e=>e.replace(/^\s+/," ")).join("\n"),!0)}return null==l||l(),g}function S(e,t,n,r,i,o){const a=se(e);let s,c;const l=e.enclosingDeclaration,_=e.mapper;if(o&&(e.mapper=o),e.enclosingDeclaration&&t){let t=function(t,n){let r;Tn.assert(e.enclosingDeclaration),Ho(e.enclosingDeclaration).fakeScopeForSignatureDeclaration===t?r=e.enclosingDeclaration:e.enclosingDeclaration.parent&&Ho(e.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===t&&(r=e.enclosingDeclaration.parent),Tn.assertOptionalNode(r,jP);const i=(null==r?void 0:r.locals)??ad();let o,a;if(n((e,t)=>{if(r){const t=i.get(e);t?a=pe(a,{name:e,oldSymbol:t}):o=pe(o,e)}i.set(e,t)}),r)return function(){h(o,e=>i.delete(e)),h(a,e=>i.set(e.name,e.oldSymbol))};{const n=aw.createBlock(p);Ho(n).fakeScopeForSignatureDeclaration=t,n.locals=i,qT(n,e.enclosingDeclaration),e.enclosingDeclaration=n}};s=ee(n)?t("params",e=>{if(n)for(let t=0;t{return mD(t)&&O_(t.name)?(n(t.name),!0):void 0;function n(t){h(t.elements,t=>{switch(t.kind){case 232:return;case 208:return function(t){if(O_(t.name))return n(t.name);const r=rs(t);e(r.escapedName,r)}(t);default:return Tn.assertNever(t)}})}})||e(r.escapedName,r)}}):void 0,4&e.flags&&ee(r)&&(c=t("typeParams",t=>{for(const n of r??p){t(Y(n,e).escapedText,n.symbol)}}))}return()=>{null==s||s(),null==c||c(),a(),e.enclosingDeclaration=l,e.mapper=_}}function w(e,t,n){const r=t.flags;t.flags&=-513;const i=aw.createModifiersFromModifierFlags(Jk(e)),o=Y(e,t),a=mp(e),s=a&&_(a,t);return t.flags=r,aw.createTypeParameterDeclaration(i,o,n,s)}function D(e,t,n=Gd(e)){const r=n&&function(e,t,n){return t&&s(n,t,e)||_(e,n)}(n,Cg(e),t);return w(e,t,r)}function F(e,t){const n=2===e.kind||3===e.kind?aw.createToken(131):void 0,r=1===e.kind||3===e.kind?dw(aw.createIdentifier(e.parameterName),16777216):aw.createThisTypeNode(),i=e.type&&_(e.type,t);return aw.createTypePredicateNode(n,r,i)}function A(e){const t=id(e,169);return t||(sd(e)?void 0:id(e,341))}function j(e,t,n){const r=A(e),i=ue(t,r,Kl(e),e),o=!(8192&t.flags)&&n&&r&&bI(r)?M(Rc(r),aw.cloneNode):void 0,a=r&&Qu(r)||32768&xx(e)?aw.createToken(26):void 0,s=L(e,r,t),c=r&&Ef(r)||16384&xx(e)?aw.createToken(58):void 0,l=aw.createParameterDeclaration(o,a,s,c,i,void 0);return t.approximateLength+=Dc(e).length+3,l}function L(e,t,n){return t&&t.name?80===t.name.kind?dw(aw.cloneNode(t.name),16777216):166===t.name.kind?dw(aw.cloneNode(t.name.right),16777216):function e(t){n.tracker.canTrackSymbol&&pD(t)&&du(t)&&R(t.expression,n.enclosingDeclaration,n);let r=fJ(t,e,void 0,void 0,e);return eP(r)&&(r=aw.updateBindingElement(r,r.dotDotDotToken,r.propertyName,r.name,void 0)),my(r)||(r=aw.cloneNode(r)),dw(r,16777217)}(t.name):Dc(e)}function R(e,t,n){if(!n.tracker.canTrackSymbol)return;const r=wb(e),i=Le(r,r.escapedText,1160127,void 0,!0);i&&n.tracker.trackSymbol(i,t,111551)}function J(e,t,n,r){return t.tracker.trackSymbol(e,t.enclosingDeclaration,n),q(e,t,n,r)}function q(e,t,n,r){let i;return 262144&e.flags||!(t.enclosingDeclaration||64&t.flags)||134217728&t.flags?i=[e]:(i=Tn.checkDefined(function e(n,i,o){let a,s=Ds(n,t.enclosingDeclaration,i,!!(128&t.flags));if(!s||Ps(s[0],t.enclosingDeclaration,1===s.length?i:Ns(i))){const r=cs(s?s[0]:n,t.enclosingDeclaration,i);if(g(r)){a=r.map(e=>ee(e.declarations,Bs)?K(e,t):void 0);const o=r.map((e,t)=>t);o.sort(c);const l=o.map(e=>r[e]);for(const t of l){const r=e(t,Ns(i),!1);if(r){if(t.exports&&t.exports.get("export=")&&us(t.exports.get("export="),n)){s=r;break}s=r.concat(s||[_s(t,n)||n]);break}}}}if(s)return s;if(o||!(6144&n.flags)){if(!o&&!r&&h(n.declarations,Bs))return;return[n]}function c(e,t){const n=a[e],r=a[t];if(n&&r){const e=jo(r);return jo(n)===e?mB(n)-mB(r):e?-1:1}return 0}}(e,n,!0)),Tn.assert(i&&i.length>0)),i}function V(e,t){let n;return 524384&lB(e).flags&&(n=aw.createNodeArray(M(c_(e),e=>D(e,t)))),n}function W(e,t,n){var r;Tn.assert(e&&0<=t&&tHx(e,o.links.mapper)),n)}else a=V(i,n)}return a}function H(e){return $D(e.objectType)?H(e.objectType):e}function K(e,t,n){let r=id(e,307);if(!r){const t=v(e.declarations,t=>ls(t,e));t&&(r=id(t,307))}if(r&&void 0!==r.moduleName)return r.moduleName;if(!r&&OB.test(e.escapedName))return e.escapedName.substring(1,e.escapedName.length-1);if(!t.enclosingFile||!t.tracker.moduleResolverHost)return OB.test(e.escapedName)?e.escapedName.substring(1,e.escapedName.length-1):Dd(Sp(e)).fileName;const i=t.enclosingFile,o=n||(null==i?void 0:i.impliedNodeFormat),a=CM(i.path,o),s=$o(e);let c=s.specifierCache&&s.specifierCache.get(a);if(!c){const r=!!k.outFile,{moduleResolverHost:l}=t.tracker,_=r?{...k,baseUrl:l.getCommonSourceDirectory()}:k;c=Ne(_B(e,Be,_,i,l,{importModuleSpecifierPreference:r?"non-relative":"project-relative",importModuleSpecifierEnding:r?"minimal":99===o?"js":void 0},{overrideImportMode:n})),s.specifierCache??(s.specifierCache=new Map),s.specifierCache.set(a,c)}return c}function G(e){const t=aw.createIdentifier(Cc(e.escapedName));return e.parent?aw.createQualifiedName(G(e.parent),t):t}function X(e,t,n,r){const i=J(e,t,n,!(16384&t.flags)),o=111551===n;if(ee(i[0].declarations,Bs)){const e=i.length>1?s(i,i.length-1,1):void 0,n=r||W(i,0,t),a=Dd(bc(t.enclosingDeclaration)),c=Pd(i[0]);let l,_;if(3!==LS(k)&&99!==LS(k)||99===(null==c?void 0:c.impliedNodeFormat)&&c.impliedNodeFormat!==(null==a?void 0:a.impliedNodeFormat)&&(l=K(i[0],t,99),_=aw.createImportAttributes(aw.createNodeArray([aw.createImportAttribute(aw.createStringLiteral("resolution-mode"),aw.createStringLiteral("import"))]))),l||(l=K(i[0],t)),!(67108864&t.flags)&&1!==LS(k)&&l.includes("/node_modules/")){const e=l;if(3===LS(k)||99===LS(k)){const n=99===(null==a?void 0:a.impliedNodeFormat)?1:99;l=K(i[0],t,n),l.includes("/node_modules/")?l=e:_=aw.createImportAttributes(aw.createNodeArray([aw.createImportAttribute(aw.createStringLiteral("resolution-mode"),aw.createStringLiteral(99===n?"import":"require"))]))}_||(t.encounteredError=!0,t.tracker.reportLikelyUnsafeImportRequiredError&&t.tracker.reportLikelyUnsafeImportRequiredError(e))}const u=aw.createLiteralTypeNode(aw.createStringLiteral(l));if(t.approximateLength+=l.length+10,!e||u_(e)){if(e){Uw(QN(e)?e:e.right,void 0)}return aw.createImportTypeNode(u,_,e,n,o)}{const t=H(e),r=t.objectType.typeName;return aw.createIndexedAccessTypeNode(aw.createImportTypeNode(u,_,r,n,o),t.indexType)}}const a=s(i,i.length-1,0);if($D(a))return a;if(o)return aw.createTypeQueryNode(a);{const e=QN(a)?a:a.right,t=Vw(e);return Uw(e,void 0),aw.createTypeReferenceNode(a,t)}function s(e,n,i){const o=n===e.length-1?r:W(e,n,t),a=e[n],c=e[n-1];let l;if(0===n)t.flags|=16777216,l=ac(a,t),t.approximateLength+=(l?l.length:0)+1,t.flags^=16777216;else if(c&&Qa(c)){md(Qa(c),(e,t)=>{if(us(e,a)&&!pu(t)&&"export="!==t)return l=Cc(t),!0})}if(void 0===l){const r=v(a.declarations,jc);if(r&&pD(r)&&u_(r.expression)){const t=s(e,n-1,i);return u_(t)?aw.createIndexedAccessTypeNode(aw.createParenthesizedType(aw.createTypeQueryNode(t)),aw.createTypeQueryNode(r.expression)):t}l=ac(a,t)}if(t.approximateLength+=l.length+1,!(16&t.flags)&&c&&xu(c)&&xu(c).get(a.escapedName)&&us(xu(c).get(a.escapedName),a)){const t=s(e,n-1,i);return $D(t)?aw.createIndexedAccessTypeNode(t,aw.createLiteralTypeNode(aw.createStringLiteral(l))):aw.createIndexedAccessTypeNode(aw.createTypeReferenceNode(t,o),aw.createLiteralTypeNode(aw.createStringLiteral(l)))}const _=dw(aw.createIdentifier(l),16777216);if(o&&Uw(_,aw.createNodeArray(o)),_.symbol=a,n>i){const t=s(e,n-1,i);return u_(t)?aw.createQualifiedName(t,_):Tn.fail("Impossible construct - an export of an indexed access cannot be reachable")}return _}}function Q(e,t,n){const r=Le(t.enclosingDeclaration,e,788968,void 0,!1);return!!(r&&262144&r.flags)&&r!==n.symbol}function Y(e,t){var n,i,o,a;if(4&t.flags&&t.typeParameterNames){const n=t.typeParameterNames.get(rv(e));if(n)return n}let s=Z(e.symbol,t,788968,!0);if(!(80&s.kind))return aw.createIdentifier("(Missing type parameter)");const c=null==(i=null==(n=e.symbol)?void 0:n.declarations)?void 0:i[0];if(c&&fD(c)&&(s=r(t,s,c.name)),4&t.flags){const n=s.escapedText;let r=(null==(o=t.typeParameterNamesByTextNextNameCount)?void 0:o.get(n))||0,i=n;for(;(null==(a=t.typeParameterNamesByText)?void 0:a.has(i))||Q(i,t,e);)r++,i=`${n}_${r}`;if(i!==n){const e=Vw(s);s=aw.createIdentifier(i),Uw(s,e)}t.mustCreateTypeParametersNamesLookups&&(t.mustCreateTypeParametersNamesLookups=!1,t.typeParameterNames=new Map(t.typeParameterNames),t.typeParameterNamesByTextNextNameCount=new Map(t.typeParameterNamesByTextNextNameCount),t.typeParameterNamesByText=new Set(t.typeParameterNamesByText)),t.typeParameterNamesByTextNextNameCount.set(n,r),t.typeParameterNames.set(rv(e),s),t.typeParameterNamesByText.add(i)}return s}function Z(e,t,n,r){const i=J(e,t,n);return!r||1===i.length||t.encounteredError||65536&t.flags||(t.encounteredError=!0),function e(n,r){const i=W(n,r,t),o=n[r];0===r&&(t.flags|=16777216);const a=ac(o,t);0===r&&(t.flags^=16777216);const s=dw(aw.createIdentifier(a),16777216);i&&Uw(s,aw.createNodeArray(i));return s.symbol=o,r>0?aw.createQualifiedName(e(n,r-1),s):s}(i,i.length-1)}function te(e,t,n){const r=J(e,t,n);return function e(n,r){const i=W(n,r,t),o=n[r];0===r&&(t.flags|=16777216);let a=ac(o,t);0===r&&(t.flags^=16777216);let s=a.charCodeAt(0);if(Ym(s)&&ee(o.declarations,Bs))return aw.createStringLiteral(K(o,t));if(0===r||lC(a,P)){const t=dw(aw.createIdentifier(a),16777216);return i&&Uw(t,aw.createNodeArray(i)),t.symbol=o,r>0?aw.createPropertyAccessExpression(e(n,r-1),t):t}{let t;if(91===s&&(a=a.substring(1,a.length-1),s=a.charCodeAt(0)),!Ym(s)||8&o.flags?""+ +a===a&&(t=aw.createNumericLiteral(+a)):t=aw.createStringLiteral(Wy(a).replace(/\\./g,e=>e.substring(1)),39===s),!t){const e=dw(aw.createIdentifier(a),16777216);i&&Uw(e,aw.createNodeArray(i)),e.symbol=o,t=e}return aw.createElementAccessExpression(e(n,r-1),t)}}(r,r.length-1)}function re(e){const t=jc(e);if(!t)return!1;if(pD(t)){return!!(402653316&zL(t.expression).flags)}if(iP(t)){return!!(402653316&zL(t.argumentExpression).flags)}return ON(t)}function oe(e){const t=jc(e);return!!(t&&ON(t)&&(t.singleQuote||!my(t)&&ln(tp(t,!1),"'")))}function ae(e,t){const n=!!g(e.declarations)&&T(e.declarations,re),r=!!g(e.declarations)&&T(e.declarations,oe),i=!!(8192&e.flags),o=function(e,t,n,r,i){const o=$o(e).nameType;if(o){if(384&o.flags){const e=""+o.value;return Es(e,OS(k))||!r&&tC(e)?tC(e)&&ln(e,"-")?aw.createComputedPropertyName(aw.createPrefixUnaryExpression(41,aw.createNumericLiteral(-e))):nC(e,OS(k),n,r,i):aw.createStringLiteral(e,!!n)}if(8192&o.flags)return aw.createComputedPropertyName(te(o.symbol,t,111551))}}(e,t,r,n,i);if(o)return o;return nC(Cc(e.escapedName),OS(k),r,n,i)}function se(e){const t=e.mustCreateTypeParameterSymbolList,n=e.mustCreateTypeParametersNamesLookups;e.mustCreateTypeParameterSymbolList=!0,e.mustCreateTypeParametersNamesLookups=!0;const r=e.typeParameterNames,i=e.typeParameterNamesByText,o=e.typeParameterNamesByTextNextNameCount,a=e.typeParameterSymbolList;return()=>{e.typeParameterNames=r,e.typeParameterNamesByText=i,e.typeParameterNamesByTextNextNameCount=o,e.typeParameterSymbolList=a,e.mustCreateTypeParameterSymbolList=t,e.mustCreateTypeParametersNamesLookups=n}}function le(e,t){return e.declarations&&C(e.declarations,e=>!(!pz(e)||t&&!xc(e,e=>e===t)))}function _e(e,t){if(!(4&Ox(t)))return!0;if(!PD(e))return!0;Wh(e);const n=Ho(e).resolvedSymbol,r=n&&U_(n);return!r||r!==t.target||g(e.typeArguments)>=If(t.target.typeParameters)}function ue(e,t,n,r){var i;const s=t&&(mD(t)||PF(t))&&zJ(t),c=e.enclosingDeclaration,l=e.flags;if(!t||!MC(t)||-2147483648&e.flags||ce.serializeTypeOfDeclaration(t,e),e.flags|=-2147483648,c&&(!Pc(n)||1&e.flags)){const i=t&&pz(t)?t:le(r);if(i&&!g_(i)&&!kD(i)){const t=pz(i),r=!DD(t)&&a(e,t,n,i,s);if(r)return e.flags=l,r}}8192&n.flags&&n.symbol===r&&(!e.enclosingDeclaration||ee(r.declarations,t=>Dd(t)===Dd(e.enclosingDeclaration)))&&(e.flags|=1048576);const _=t??r.valueDeclaration??(null==(i=r.declarations)?void 0:i[0]),u=_&&function(e){return f_(e)||kE(e)||Bf(e)}(_)?ez(_):void 0,d=o(e,u,n,s);return e.flags=l,d}function de(e,t){const r=256&e.flags,i=e.flags;let a;r&&(e.flags&=-257);const s=mm(t);return!s||r&&Sc(s)?r||(a=aw.createKeywordTypeNode(133)):(!t.declaration||-2147483648&e.flags||ce.serializeReturnTypeForSignature(t.declaration,e),e.flags|=-2147483648,a=function(e,t){const r=nm(t),i=mm(t);if(e.enclosingDeclaration&&(!Pc(i)||1&e.flags)&&t.declaration&&!my(t.declaration)){const r=t.declaration&&function(e){const t=Fv(e);if(t)return t;if(177===e.kind){const t=YJ(e).setAccessor;if(t){const e=bv(t);if(e)return Pv(e)}}return}(t.declaration);if(r&&n(e,r)===i){const t=he(e,r);if(t)return t}}if(r)return F(r,e);const a=t.declaration&&ez(t.declaration);return o(e,a,i)}(e,t)),e.flags=i,a}function fe(e,t){let n=!1;const i=wb(e);if(zm(e)&&(lg(i)||ug(i.parent)||dD(i.parent)&&_g(i.parent.left)&&lg(i.parent.right)))return n=!0,{introducesError:n,node:e};const o=qs(e);let a;if(Tv(i))return a=rs(lm(i,!1,!1)),0!==js(a,i,o,!1).accessibility&&(n=!0,t.tracker.reportInaccessibleThisError()),{introducesError:n,node:s(e)};if(a=Ma(i,o,!0,!0),t.enclosingDeclaration&&!(a&&262144&a.flags)){a=ps(a);const r=Ma(i,o,!0,!0,t.enclosingDeclaration);if(r===ht||void 0===r&&void 0!==a||r&&a&&!us(ps(r),a))return r!==ht&&t.tracker.reportInferenceFallback(e),n=!0,{introducesError:n,node:e,sym:a}}return a?(1&a.flags&&a.valueDeclaration&&(dy(a.valueDeclaration)||PF(a.valueDeclaration))||(262144&a.flags||yh(e)||0===js(a,t.enclosingDeclaration,o,!1).accessibility?t.tracker.trackSymbol(a,t.enclosingDeclaration,o):(t.tracker.reportInferenceFallback(e),n=!0)),{introducesError:n,node:s(e)}):{introducesError:n,node:e};function s(e){if(e===i){const n=U_(a),i=262144&a.flags?Y(n,t):aw.cloneNode(e);return i.symbol=a,r(t,dw(i,16777216),e)}const n=fJ(e,e=>s(e),void 0);return n!==e&&r(t,n,e),n}}function me(e,t,n,r){const i=n?111551:788968,o=Ma(t,i,!0);if(!o)return;const a=2097152&o.flags?Ea(o):o;return 0===js(o,e.enclosingDeclaration,i,!1).accessibility?X(a,e,i,r):void 0}function ge(e,t){if(zm(t)&&yf(t)){ax(t);const e=Ho(t).resolvedSymbol;return!e||!!((t.isTypeOf||788968&e.flags)&&g(t.typeArguments)>=If(c_(e)))}if(VD(t)){if(void 0===e.mapper)return!0;return!!n(e,t,!0)}if(PD(t)){if(Il(t))return!1;const n=Wh(t),r=Ho(t).resolvedSymbol;if(!r)return!1;if(262144&r.flags){const t=U_(r);if(e.mapper&&Hx(t,e.mapper)!==t)return!1}if(Vm(t))return _e(t,n)&&!Vh(t)&&788968&r.flags}if(WD(t)&&158===t.operator&&155===t.type.kind){const n=e.enclosingDeclaration&&function(e){for(;Ho(e).fakeScopeForSignatureDeclaration;)e=e.parent;return e}(e.enclosingDeclaration);return!!xc(t,e=>e===n)}return!0}function he(e,i){t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();let o=!1;const{finalizeBoundary:a,startRecoveryScope:s}=function(){let t,n;const r=e.tracker,i=e.trackedSymbols;e.trackedSymbols=void 0;const a=e.encounteredError;return e.tracker=new rJ(e,{...r.inner,reportCyclicStructureError(){s(()=>r.reportCyclicStructureError())},reportInaccessibleThisError(){s(()=>r.reportInaccessibleThisError())},reportInaccessibleUniqueSymbolError(){s(()=>r.reportInaccessibleUniqueSymbolError())},reportLikelyUnsafeImportRequiredError(e){s(()=>r.reportLikelyUnsafeImportRequiredError(e))},reportNonSerializableProperty(e){s(()=>r.reportNonSerializableProperty(e))},trackSymbol:(e,n,r)=>((t??(t=[])).push([e,n,r]),!1),moduleResolverHost:e.tracker.moduleResolverHost},e.tracker.moduleResolverHost),{startRecoveryScope:function(){const e=(null==t?void 0:t.length)??0,r=(null==n?void 0:n.length)??0;return()=>{o=!1,t&&(t.length=e),n&&(n.length=r)}},finalizeBoundary:function(){if(e.tracker=r,e.trackedSymbols=i,e.encounteredError=a,null==n||n.forEach(e=>e()),o)return!1;return null==t||t.forEach(([t,n,r])=>e.tracker.trackSymbol(t,n,r)),!0}};function s(e){o=!0,(n??(n=[])).push(e)}}(),c=iJ(i,l,A_);if(a())return e.approximateLength+=i.end-i.pos,c;function l(t){if(o)return t;const i=s(),a=function(e){return f_(e)||mF(e)||HD(e)}(t)?u(t):void 0,c=function(t){if(ZE(t))return iJ(t.type,l,A_);if(oF(t)||319===t.kind)return aw.createKeywordTypeNode(133);if(aF(t))return aw.createKeywordTypeNode(159);if(sF(t))return aw.createUnionTypeNode([iJ(t.type,l,A_),aw.createLiteralTypeNode(aw.createNull())]);if(lF(t))return aw.createUnionTypeNode([iJ(t.type,l,A_),aw.createKeywordTypeNode(157)]);if(cF(t))return iJ(t.type,l);if(uF(t))return aw.createArrayTypeNode(iJ(t.type,l,A_));if(fF(t))return aw.createTypeLiteralNode(M(t.jsDocPropertyTags,r=>{const i=iJ(QN(r.name)?r.name:r.name.right,l,QN),o=yc(n(e,t),i.escapedText),a=o&&r.typeExpression&&n(e,r.typeExpression.type)!==o?_(o,e):void 0;return aw.createPropertySignature(void 0,i,r.isBracketed||r.typeExpression&&lF(r.typeExpression.type)?aw.createToken(58):void 0,a||r.typeExpression&&iJ(r.typeExpression.type,l,A_)||aw.createKeywordTypeNode(133))}));if(PD(t)&&QN(t.typeName)&&""===t.typeName.escapedText)return cw(aw.createKeywordTypeNode(133),t);if((CP(t)||PD(t))&&Wm(t))return aw.createTypeLiteralNode([aw.createIndexSignature(void 0,[aw.createParameterDeclaration(void 0,void 0,"x",void 0,iJ(t.typeArguments[0],l,A_))],iJ(t.typeArguments[1],l,A_))]);if(_F(t)){if(Lg(t)){let n;return aw.createConstructorTypeNode(void 0,oJ(t.typeParameters,l,fD),$(t.parameters,(t,i)=>t.name&&QN(t.name)&&"new"===t.name.escapedText?void(n=t.type):aw.createParameterDeclaration(void 0,s(t),r(e,aw.createIdentifier(c(t,i)),t),aw.cloneNode(t.questionToken),iJ(t.type,l,A_),void 0)),iJ(n||t.type,l,A_)||aw.createKeywordTypeNode(133))}return aw.createFunctionTypeNode(oJ(t.typeParameters,l,fD),M(t.parameters,(t,n)=>aw.createParameterDeclaration(void 0,s(t),r(e,aw.createIdentifier(c(t,n)),t),aw.cloneNode(t.questionToken),iJ(t.type,l,A_),void 0)),iJ(t.type,l,A_)||aw.createKeywordTypeNode(133))}if(VD(t))return ge(e,t)||(o=!0),t;if(fD(t))return aw.updateTypeParameterDeclaration(t,oJ(t.modifiers,l,__),r(e,Y(U_(rs(t)),e),t),iJ(t.constraint,l,A_),iJ(t.default,l,A_));if($D(t)){const e=p(t);return e||(o=!0,t)}if(PD(t)){const e=h(t);return e||(o=!0,t)}if(yf(t)){const i=Ho(t).resolvedSymbol;return!Vm(t)||!i||(t.isTypeOf||788968&i.flags)&&g(t.typeArguments)>=If(c_(i))?aw.updateImportTypeNode(t,aw.updateLiteralTypeNode(t.argument,d(t,t.argument.literal)),iJ(t.attributes,l,hE),iJ(t.qualifier,l,u_),oJ(t.typeArguments,l,A_),t.isTypeOf):r(e,_(n(e,t),e),t)}if(Ic(t)&&167===t.name.kind&&!du(t.name)&&!(1&e.flags&&Xh(t)&&Cb(t.name.expression)&&1&sA(t.name).flags))return;if(f_(t)&&!t.type||yD(t)&&!t.type&&!t.initializer||hD(t)&&!t.type&&!t.initializer||mD(t)&&!t.type&&!t.initializer){let n=i(t,l);return n===t&&(n=r(e,aw.cloneNode(t),t)),n.type=aw.createKeywordTypeNode(133),mD(t)&&(n.modifiers=void 0),n}if(AD(t)){const e=m(t);return e||(o=!0,t)}if(pD(t)&&Cb(t.expression)){const{node:n,introducesError:r}=fe(t.expression,e);if(r){const n=_(YC(TJ(t.expression)),e);let r;if(KD(n))r=n.literal;else{const i=yB(t.expression),o="string"==typeof i.value?aw.createStringLiteral(i.value,void 0):"number"==typeof i.value?aw.createNumericLiteral(i.value,0):void 0;if(!o)return GD(n)&&R(t.expression,e.enclosingDeclaration,e),t;r=o}return 11===r.kind&&Es(r.text,OS(k))?aw.createIdentifier(r.text):9!==r.kind||r.text.startsWith("-")?aw.updateComputedPropertyName(t,r):r}return aw.updateComputedPropertyName(t,n)}if(DD(t)){let n;if(QN(t.parameterName)){const{node:r,introducesError:i}=fe(t.parameterName,e);o=o||i,n=r}else n=aw.cloneNode(t.parameterName);return aw.updateTypePredicateNode(t,aw.cloneNode(t.assertsModifier),n,iJ(t.type,l,A_))}if(jD(t)||ID(t)||HD(t)){const n=i(t,l),o=r(e,n===t?aw.cloneNode(t):n,t);return dw(o,ip(o)|(1024&e.flags&&ID(t)?0:1)),o}if(ON(t)&&268435456&e.flags&&!t.singleQuote){const e=aw.cloneNode(t);return e.singleQuote=!0,e}if(zD(t)){const e=iJ(t.checkType,l,A_),n=u(t),r=iJ(t.extendsType,l,A_),i=iJ(t.trueType,l,A_);n();const o=iJ(t.falseType,l,A_);return aw.updateConditionalTypeNode(t,e,r,i,o)}if(WD(t))if(158===t.operator&&155===t.type.kind){if(!ge(e,t))return o=!0,t}else if(143===t.operator){const e=f(t);return e||(o=!0,t)}return i(t,l);function i(t,n){return fJ(t,n,void 0,!e.enclosingFile||e.enclosingFile!==Dd(t)?a:void 0)}function a(e,t,n,r,i){let o=oJ(e,t,n,r,i);return o&&(-1===o.pos&&-1===o.end||(o===e&&(o=aw.createNodeArray(e,e.hasTrailingComma)),BT(o,-1,-1))),o}function s(e){return e.dotDotDotToken||(e.type&&uF(e.type)?aw.createToken(26):void 0)}function c(e,t){return e.name&&QN(e.name)&&"this"===e.name.escapedText?"this":s(e)?"args":`arg${t}`}function d(n,r){if(e.bundled||e.enclosingFile!==Dd(r)){let i=r.text;const o=Ho(t).resolvedSymbol,a=n.isTypeOf?111551:788968,s=o&&0===js(o,e.enclosingDeclaration,a,!1).accessibility&&J(o,e,a,!0)[0];if(s&&cd(s))i=K(s,e);else{const t=fz(n);t&&(i=K(t.symbol,e))}if(i.includes("/node_modules/")&&(e.encounteredError=!0,e.tracker.reportLikelyUnsafeImportRequiredError&&e.tracker.reportLikelyUnsafeImportRequiredError(i)),i!==r.text)return cw(aw.createStringLiteral(i),r)}return iJ(r,l,ON)}}(t);return null==a||a(),o?A_(t)&&!DD(t)?(i(),function(e,t){return _(n(e,t),e)}(e,t)):t:c?r(e,c,t):void 0}function u(t){return S(e,t,function(e){return f_(e)||mF(e)?$f(e).parameters:void 0}(t),function(e){return f_(e)||mF(e)?$f(e).typeParameters:zD(e)?ix(e):[q_(rs(e.typeParameter))]}(t))}function d(e){const t=fh(e);switch(t.kind){case 183:return h(t);case 186:return m(t);case 199:return p(t);case 198:const e=t;if(143===e.operator)return f(e)}return iJ(e,l,A_)}function p(e){const t=d(e.objectType);if(void 0!==t)return aw.updateIndexedAccessTypeNode(e,t,iJ(e.indexType,l,A_))}function f(e){Tn.assertEqual(e.operator,143);const t=d(e.type);if(void 0!==t)return aw.updateTypeOperatorNode(e,t)}function m(t){const{introducesError:n,node:i}=fe(t.exprName,e);if(!n)return aw.updateTypeQueryNode(t,i,oJ(t.typeArguments,l,A_));const o=me(e,t.exprName,!0);return o?r(e,o,t.exprName):void 0}function h(t){if(ge(e,t)){const{introducesError:n,node:i}=fe(t.typeName,e),o=oJ(t.typeArguments,l,A_);if(!n){const n=aw.updateTypeReferenceNode(t,i,o);return r(e,n,t)}{const n=me(e,t.typeName,!1,o);if(n)return r(e,n,t.typeName)}}}}}(),ce=JK(k,{isEntityNameVisible:Vs,isExpandoFunctionDeclaration:qJ,getAllAccessorDeclarations:YJ,requiresAddingImplicitUndefined:zJ,isUndefinedIdentifierExpression:e=>(Tn.assert(Em(e)),xJ(e)===ue)}),le=FC({evaluateElementAccessExpression:function(e,t){const n=e.expression;if(Cb(n)&&Ku(e.argumentExpression)){const r=Ma(n,111551,!0);if(r&&384&r.flags){const n=Tc(e.argumentExpression.text),i=r.exports.get(n);if(i)return Tn.assert(Dd(i.valueDeclaration)===Dd(r.valueDeclaration)),t?vB(e,i,t):$J(i.valueDeclaration)}}return EC(void 0)},evaluateEntityNameExpression:yB}),_e=ad(),ue=Eo(4,"undefined");ue.declarations=[];var fe=Eo(1536,"globalThis",8);fe.exports=_e,fe.declarations=[],_e.set(fe.escapedName,fe);var me,ve,be,xe=Eo(4,"arguments"),Se=Eo(4,"require"),Te=k.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",Fe=!k.verbatimModuleSyntax,Ae=0,Ie=0,Le=OC({compilerOptions:k,requireSymbol:Se,argumentsSymbol:xe,globals:_e,getSymbolOfDeclaration:rs,error:So,getRequiresScopeChangeCache:Xo,setRequiresScopeChangeCache:Qo,lookup:Ko,onPropertyWithInvalidInitializer:function(e,t,n,r){if(!q)return e&&!r&&na(e,t,t)||So(e,e&&n.type&&$s(n.type,e.pos)?Ca.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:Ca.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,Rp(n.name),ea(t)),!0;return!1},onFailedToResolveSymbol:function(e,t,n,r){const i=_t(t)?t:t.escapedText;a(()=>{if(!(e&&(324===e.parent.kind||na(e,i,t)||ra(e)||function(e,t,n){const r=1920|(zm(e)?111551:0);if(n===r){const n=Pa(Le(e,t,788968&~r,void 0,!1)),i=e.parent;if(n){if(dD(i)){Tn.assert(i.left===e,"Should only be resolving left side of qualified name as a namespace");const r=i.right.escapedText;if(Zp(U_(n),r))return So(i,Ca.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Cc(t),Cc(r)),!0}return So(e,Ca._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,Cc(t)),!0}}return!1}(e,i,n)||function(e,t){if(oa(t)&&281===e.parent.kind)return So(e,Ca.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,t),!0;return!1}(e,i)||function(e,t,n){if(111127&n){if(Pa(Le(e,t,1024,void 0,!1)))return So(e,Ca.Cannot_use_namespace_0_as_a_value,Cc(t)),!0}else if(788544&n){if(Pa(Le(e,t,1536,void 0,!1)))return So(e,Ca.Cannot_use_namespace_0_as_a_type,Cc(t)),!0}return!1}(e,i,n)||function(e,t,n){if(111551&n){if(oa(t)){const n=e.parent.parent;if(n&&n.parent&&WE(n)){const r=n.token,i=n.parent.kind;264===i&&96===r?So(e,Ca.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types,Cc(t)):263===i&&96===r?So(e,Ca.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values,Cc(t)):263===i&&119===r&&So(e,Ca.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types,Cc(t))}else So(e,Ca._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,Cc(t));return!0}const n=Pa(Le(e,t,788544,void 0,!1)),r=n&&Fa(n);if(n&&void 0!==r&&!(111551&r)){const r=Cc(t);return!function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(t)?!function(e,t){const n=xc(e.parent,e=>!pD(e)&&!hD(e)&&(ID(e)||"quit"));if(n&&1===n.members.length){const e=U_(t);return!!(1048576&e.flags)&&sL(e,384,!0)}return!1}(e,n)?So(e,Ca._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,r):So(e,Ca._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,r,"K"===r?"P":"K"):So(e,Ca._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,r),!0}}return!1}(e,i,n)||function(e,t,n){if(788584&n){const n=Pa(Le(e,t,111127,void 0,!1));if(n&&!(1920&n.flags))return So(e,Ca._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Cc(t)),!0}return!1}(e,i,n)))){let o,a;if(t&&(a=function(e){const t=ea(e),n=ap().get(t);return n&&De(n.keys())}(t),a&&So(e,r,ea(t),a)),!a&&Li{var a;const s=t.escapedName,c=r&&QE(r)&&af(r);if(e&&(2&n||(32&n||384&n)&&!(111551&~n))){const n=ps(t);(2&n.flags||32&n.flags||384&n.flags)&&function(e,t){var n;if(Tn.assert(!!(2&e.flags||32&e.flags||384&e.flags)),67108881&e.flags&&32&e.flags)return;const r=null==(n=e.declarations)?void 0:n.find(e=>up(e)||S_(e)||266===e.kind);if(void 0===r)return Tn.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(33554432&r.flags||Go(r,t))){let n;const i=Rp(jc(r));2&e.flags?n=So(t,Ca.Block_scoped_variable_0_used_before_its_declaration,i):32&e.flags?n=So(t,Ca.Class_0_used_before_its_declaration,i):256&e.flags?n=So(t,Ca.Enum_0_used_before_its_declaration,i):(Tn.assert(!!(128&e.flags)),RS(k)&&(n=So(t,Ca.Enum_0_used_before_its_declaration,i))),n&&ST(n,Vp(r,Ca._0_is_declared_here,i))}}(n,e)}if(c&&!(111551&~n)&&!(16777216&e.flags)){const n=ts(t);g(n.declarations)&&T(n.declarations,e=>_E(e)||QE(e)&&!!e.symbol.globalExports)&&To(!k.allowUmdGlobalAccess,e,Ca._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,Cc(s))}if(i&&!o&&!(111551&~n)){const r=ts(Su(t)),o=py(i);r===rs(i)?So(e,Ca.Parameter_0_cannot_reference_itself,Rp(i.name)):r.valueDeclaration&&r.valueDeclaration.pos>i.pos&&o.parent.locals&&Ko(o.parent.locals,r.escapedName,n)===r&&So(e,Ca.Parameter_0_cannot_reference_identifier_1_declared_after_it,Rp(i.name),Rp(e))}if(e&&111551&n&&2097152&t.flags&&!(111551&t.flags)&&!OT(e)){const n=Oa(t,111551);if(n){const t=281===n.kind||278===n.kind||280===n.kind?Ca._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:Ca._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,r=Cc(s);Zo(So(e,t,r),n,r)}}if(k.isolatedModules&&t&&c&&!(111551&~n)){const e=Ko(_e,s,n)===t&&QE(r)&&r.locals&&Ko(r.locals,s,-111552);if(e){const t=null==(a=e.declarations)?void 0:a.find(e=>276===e.kind||273===e.kind||274===e.kind||271===e.kind);t&&!Ql(t)&&So(t,Ca.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Cc(s))}}})}}),Re=OC({compilerOptions:k,requireSymbol:Se,argumentsSymbol:xe,globals:_e,getSymbolOfDeclaration:rs,error:So,getRequiresScopeChangeCache:Xo,setRequiresScopeChangeCache:Qo,lookup:function(e,t,n){const r=Ko(e,t,n);if(r)return r;let i;if(e===_e){i=$(["string","number","boolean","object","bigint","symbol"],t=>e.has(t.charAt(0).toUpperCase()+t.slice(1))?Eo(524288,t):void 0).concat(We(e.values()))}else i=We(e.values());return FI(Cc(t),i,n)}});const Be={getNodeCount:()=>Me(e.getSourceFiles(),(e,t)=>e+t.nodeCount,0),getIdentifierCount:()=>Me(e.getSourceFiles(),(e,t)=>e+t.identifierCount,0),getSymbolCount:()=>Me(e.getSourceFiles(),(e,t)=>e+t.symbolCount,u),getTypeCount:()=>_,getInstantiationCount:()=>d,getRelationCacheSizes:()=>({assignable:lo.size,identity:uo.size,subtype:so.size,strictSubtype:co.size}),isUndefinedSymbol:e=>e===ue,isArgumentsSymbol:e=>e===xe,isUnknownSymbol:e=>e===ht,getMergedSymbol:ts,symbolIsValue:fs,getDiagnostics:_J,getGlobalDiagnostics:function(){return uJ(),io.getGlobalDiagnostics()},getRecursionIdentity:Qk,getUnmatchedProperties:xw,getTypeOfSymbolAtLocation:(e,t)=>{const n=kc(t);return n?function(e,t){if(e=ps(e),(80===t.kind||81===t.kind)&&(Fb(t)&&(t=t.parent),Em(t)&&(!ah(t)||wx(t)))){const n=RC(wx(t)&&211===t.kind?aI(t,void 0,!0):RL(t));if(ps(Ho(t).resolvedSymbol)===e)return n}if(yh(t)&&Ru(t.parent)&&Ol(t.parent))return Ml(t.parent.symbol);return Ab(t)&&wx(t.parent)?Hl(e):Gl(e)}(e,n):wt},getTypeOfSymbol:Kl,getSymbolsOfParameterPropertyDeclaration:(e,t)=>{const n=kc(e,mD);return void 0===n?Tn.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):(Tn.assert(lc(n,n.parent)),function(e,t){const n=e.parent,r=e.parent.parent,i=Ko(n.locals,t,111551),o=Ko(xu(r.symbol),t,111551);if(i&&o)return[i,o];return Tn.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,Tc(t)))},getDeclaredTypeOfSymbol:U_,getPropertiesOfType:Hd,getPropertyOfType:(e,t)=>Zp(e,Tc(t)),getPrivateIdentifierPropertyOfType:(e,t,n)=>{const r=kc(n);if(!r)return;const i=lI(Tc(t),r);return i?dI(e,i):void 0},getTypeOfPropertyOfType:(e,t)=>yc(e,Tc(t)),getIndexInfoOfType:(e,t)=>xf(e,0===t?Jt:zt),getIndexInfosOfType:bf,getIndexInfosOfIndexSymbol:vg,getSignaturesOfType:uf,getIndexTypeOfType:(e,t)=>Sf(e,0===t?Jt:zt),getIndexType:e=>ib(e),getBaseTypes:P_,getBaseTypeOfLiteralType:MT,getWidenedType:YC,getWidenedLiteralType:JT,getTypeFromTypeNode:e=>{const t=kc(e,A_);return t?Mx(t):wt},getParameterType:dj,getParameterIdentifierInfoAtPosition:function(e,t){var n;if(317===(null==(n=e.declaration)?void 0:n.kind))return;const r=e.parameters.length-(tJ(e)?1:0);if(txM(e),getReturnTypeOfSignature:mm,isNullableType:YA,getNullableType:NC,getNonNullableType:jC,getNonOptionalType:RC,getTypeArguments:Hg,typeToTypeNode:se.typeToTypeNode,indexInfoToIndexSignatureDeclaration:se.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:se.signatureToSignatureDeclaration,symbolToEntityName:se.symbolToEntityName,symbolToExpression:se.symbolToExpression,symbolToNode:se.symbolToNode,symbolToTypeParameterDeclarations:se.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:se.symbolToParameterDeclaration,typeParameterToDeclaration:se.typeParameterToDeclaration,getSymbolsInScope:(e,t)=>{const n=kc(e);return n?function(e,t){if(67108864&e.flags)return[];const n=ad();let r=!1;return i(),n.delete("this"),Nf(n);function i(){for(;e;){switch(bu(e)&&e.locals&&!of(e)&&a(e.locals,t),e.kind){case 307:if(!tO(e))break;case 267:s(rs(e).exports,2623475&t);break;case 266:a(rs(e).exports,8&t);break;case 231:e.name&&o(e.symbol,t);case 263:case 264:r||a(xu(rs(e)),788968&t);break;case 218:e.name&&o(e.symbol,t)}Wf(e)&&o(xe,t),r=$v(e),e=e.parent}a(_e,t)}function o(e,t){if(Tx(e)&t){const t=e.escapedName;n.has(t)||n.set(t,e)}}function a(e,t){t&&e.forEach(e=>{o(e,t)})}function s(e,t){t&&e.forEach(e=>{id(e,281)||id(e,280)||"default"===e.escapedName||o(e,t)})}}(n,t):[]},getSymbolAtLocation:e=>{const t=kc(e);return t?xJ(t,!0):void 0},getIndexInfosAtLocation:e=>{const t=kc(e);return t?function(e){if(QN(e)&&rP(e.parent)&&e.parent.name===e){const t=Bv(e),n=RL(e.parent.expression);return z(1048576&n.flags?n.types:[n],e=>O(bf(e),e=>hf(t,e.keyType)))}return}(t):void 0},getShorthandAssignmentValueSymbol:e=>{const t=kc(e);return t?function(e){if(e&&304===e.kind)return Ma(e.name,2208703);return}(t):void 0},getExportSpecifierLocalTargetSymbol:e=>{const t=kc(e,wE);return t?function(e){return wE(e)?e.parent.parent.moduleSpecifier?xa(e.parent.parent,e):Ma(e.propertyName||e.name,2998271):Ma(e,2998271)}(t):void 0},getExportSymbolOfSymbol:e=>ts(e.exportSymbol||e),getTypeAtLocation:e=>{const t=kc(e);return t?SJ(t):wt},getTypeOfAssignmentPattern:e=>{const t=kc(e,j_);return t&&kJ(t)||wt},getPropertySymbolOfDestructuringAssignment:e=>{const t=kc(e,QN);return t?function(e){const t=kJ(pt(e.parent.parent,j_));return t&&Zp(t,e.escapedText)}(t):void 0},signatureToString:(e,t,n,r)=>Ks(e,kc(t),n,r),typeToString:(e,t,n)=>Gs(e,kc(t),n),symbolToString:(e,t,n,r)=>Hs(e,kc(t),n,r),typePredicateToString:(e,t,n)=>tc(e,kc(t),n),writeSignature:(e,t,n,r,i)=>Ks(e,kc(t),n,r,i),writeType:(e,t,n,r)=>Gs(e,kc(t),n,r),writeSymbol:(e,t,n,r,i)=>Hs(e,kc(t),n,r,i),writeTypePredicate:(e,t,n,r)=>tc(e,kc(t),n,r),getAugmentedPropertiesOfType:NJ,getRootSymbols:function e(t){const n=function(e){if(6&xx(e))return $($o(e).containingType.types,t=>Zp(t,e.escapedName));if(33554432&e.flags){const{links:{leftSpread:t,rightSpread:n,syntheticOrigin:r}}=e;return t?[t,n]:r?[r]:hn(function(e){let t,n=e;for(;n=$o(n).target;)t=n;return t}(e))}return}(t);return n?z(n,e):[t]},getSymbolOfExpando:JO,getContextualType:(e,t)=>{const n=kc(e,nu);if(n)return 4&t?ze(n,()=>UF(n,t)):UF(n,t)},getContextualTypeForObjectLiteralElement:e=>{const t=kc(e,F_);return t?NF(t,void 0):void 0},getContextualTypeForArgumentAtIndex:(e,t)=>{const n=kc(e,H_);return n&&bF(n,t)},getContextualTypeForJsxAttribute:e=>{const t=kc(e,Fu);return t&&AF(t,void 0)},isContextSensitive:CS,getTypeOfPropertyOfContextualType:TF,getFullyQualifiedName:La,getResolvedSignature:(e,t,n)=>qe(e,t,n,0),getCandidateSignaturesForStringLiteralCompletions:function(e,t){const n=new Set,r=[];ze(t,()=>qe(e,r,void 0,0));for(const e of r)n.add(e);r.length=0,Je(t,()=>qe(e,r,void 0,0));for(const e of r)n.add(e);return We(n)},getResolvedSignatureForSignatureHelp:(e,t,n)=>Je(e,()=>qe(e,t,n,16)),getExpandedParameters:Au,hasEffectiveRestParameter:yj,containsArgumentsReference:Yf,getConstantValue:e=>{const t=kc(e,HJ);return t?KJ(t):void 0},isValidPropertyAccess:(e,t)=>{const n=kc(e,V_);return!!n&&function(e,t){switch(e.kind){case 211:return jI(e,108===e.expression.kind,t,YC(zL(e.expression)));case 166:return jI(e,!1,t,YC(zL(e.left)));case 205:return jI(e,!1,t,Mx(e))}}(n,Tc(t))},isValidPropertyAccessForCompletions:(e,t,n)=>{const r=kc(e,rP);return!!r&&OI(r,t,n)},getSignatureFromDeclaration:e=>{const t=kc(e,f_);return t?$f(t):void 0},isImplementationOfOverload:e=>{const t=kc(e,f_);return t?JJ(t):void 0},getImmediateAliasedSymbol:dA,getAliasedSymbol:Ea,getEmitResolver:function(e,t,n){n||_J(e,t);return ae},requiresAddingImplicitUndefined:zJ,getExportsOfModule:Ka,getExportsAndPropertiesOfModule:function(e){const t=Ka(e),n=Ua(e);if(n!==e){const e=Kl(n);Xa(e)&&ge(t,Hd(e))}return t},forEachExportAndPropertyOfModule:function(e,t){Ya(e).forEach((e,n)=>{xs(n)||t(e,n)});const n=Ua(e);if(n!==e){const e=Kl(n);Xa(e)&&function(e,t){e=Np(e),3670016&e.flags&&Ud(e).members.forEach((e,n)=>{ks(e,n)&&t(e,n)})}(e,(e,n)=>{t(e,n)})}},getSymbolWalker:eB(function(e){return Cm(e)||St},nm,mm,P_,Ud,Kl,Xw,Gd,wb,Hg),getAmbientModules:function(){Un||(Un=[],_e.forEach((e,t)=>{OB.test(t)&&Un.push(e)}));return Un},getJsxIntrinsicTagNamesAt:function(e){const t=wA(AB.IntrinsicElements,e);return t?Hd(t):p},isOptionalParameter:e=>{const t=kc(e,mD);return!!t&&Ef(t)},tryGetMemberInModuleExports:(e,t)=>Ga(Tc(e),t),tryGetMemberInModuleExportsAndProperties:(e,t)=>function(e,t){const n=Ga(e,t);if(n)return n;const r=Ua(t);if(r===t)return;const i=Kl(r);return Xa(i)?Zp(i,e):void 0}(Tc(e),t),tryFindAmbientModule:e=>Df(e,!0),tryFindAmbientModuleWithoutAugmentations:e=>Df(e,!1),getApparentType:wp,getUnionType:dv,isTypeAssignableTo:zS,createAnonymousType:Cs,createSignature:Nu,createSymbol:Eo,createIndexInfo:mg,getAnyType:()=>St,getStringType:()=>Jt,getStringLiteralType:kx,getNumberType:()=>zt,getNumberLiteralType:Nx,getBigIntType:()=>qt,createPromiseType:Rj,createArrayType:jy,getElementTypeOfArrayType:sT,getBooleanType:()=>Gt,getFalseType:e=>e?Ut:Vt,getTrueType:e=>e?Wt:$t,getVoidType:()=>Yt,getUndefinedType:()=>At,getNullType:()=>Rt,getESSymbolType:()=>Qt,getNeverType:()=>Zt,getOptionalType:()=>Mt,getPromiseType:()=>Sy(!1),getPromiseLikeType:()=>ky(!1),getAsyncIterableType:()=>{const e=Ny(!1);if(e!==An)return e},isSymbolAccessible:js,isArrayType:rT,isTupleType:$T,isArrayLikeType:lT,isEmptyAnonymousObjectType:yk,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some(t=>{const n=t.name&&(qE(t.name)?kx(yC(t.name)):Bv(t.name)),r=n&&kC(n)?TC(n):void 0,i=void 0===r?void 0:yc(e,r);return!!i&&FT(i)&&!zS(SJ(t),i)})},getExactOptionalProperties:function(e){return Hd(e).filter(e=>qC(Kl(e)))},getAllPossiblePropertiesOfTypes:function(e){const t=dv(e);if(!(1048576&t.flags))return NJ(t);const n=ad();for(const r of e)for(const{escapedName:e}of NJ(r))if(!n.has(e)){const r=Dp(t,e);r&&n.set(e,r)}return We(n.values())},getSuggestedSymbolForNonexistentProperty:wI,getSuggestedSymbolForNonexistentJSXAttribute:NI,getSuggestedSymbolForNonexistentSymbol:(e,t,n)=>PI(e,Tc(t),n),getSuggestedSymbolForNonexistentModule:EI,getSuggestedSymbolForNonexistentClassMember:CI,getBaseConstraintOfType:op,getDefaultFromTypeParameter:e=>e&&262144&e.flags?mp(e):void 0,resolveName:(e,t,n,r)=>Le(t,Tc(e),n,void 0,!1,r),getJsxNamespace:e=>Cc(ho(e)),getJsxFragmentFactory:e=>{const t=dz(e);return t&&Cc(wb(t).escapedText)},getAccessibleSymbolChain:Ds,getTypePredicateOfSignature:nm,resolveExternalModuleName:e=>{const t=kc(e,nu);return t&&Ba(t,t,!0)},resolveExternalModuleSymbol:Ua,tryGetThisTypeAt:(e,t,n)=>{const r=kc(e);return r&&jE(r,t,n)},getTypeArgumentConstraint:e=>{const t=kc(e,A_);return t&&function(e){const t=dt(e.parent,Wu);if(!t)return;const n=rM(t);if(!n)return;const r=Gd(n[t.typeArguments.indexOf(e)]);return r&&hS(r,$x(n,tM(t,n)))}(t)},getSuggestionDiagnostics:(n,r)=>{const i=kc(n,QE)||Tn.fail("Could not determine parsed source file.");if(wT(i,k,e))return p;let o;try{return t=r,dJ(i),Tn.assert(!!(1&Ho(i).flags)),o=ge(o,oo.getDiagnostics(i.fileName)),LM(lJ(i),(e,t,n)=>{Nd(e)||cJ(t,!!(33554432&e.flags))||(o||(o=[])).push({...n,category:2})}),o||p}finally{t=void 0}},runWithCancellationToken:(e,n)=>{try{return t=e,n(Be)}finally{t=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:c_,isDeclarationVisible:sc,isPropertyAccessible:LI,getTypeOnlyAliasDeclaration:Oa,getMemberOverrideModifierStatus:function(e,t,n){if(!t.name)return 0;const r=rs(e),i=U_(r),o=Tu(i),a=Kl(r),s=Dh(e)&&P_(i),c=(null==s?void 0:s.length)?Tu(Ne(s),i.thisType):void 0,l=N_(i),_=t.parent?Kv(t):Wv(t,16);return sB(e,a,l,c,i,o,_,Gv(t),$v(t),!1,Dc(n))},isTypeParameterPossiblyReferenced:sS,typeHasCallOrConstructSignatures:DJ,getSymbolFlags:Fa};function Je(e,t){if(e=xc(e,$_)){const n=[],r=[];for(;e;){const t=Ho(e);if(n.push([t,t.resolvedSignature]),t.resolvedSignature=void 0,ZT(e)){const t=$o(rs(e)),n=t.type;r.push([t,n]),t.type=void 0}e=xc(e.parent,$_)}const i=t();for(const[e,t]of n)e.resolvedSignature=t;for(const[e,t]of r)e.type=t;return i}return t()}function ze(e,t){const n=xc(e,H_);if(n){let t=e;do{Ho(t).skipDirectInference=!0,t=t.parent}while(t&&t!==n)}b=!0;const r=Je(e,t);if(b=!1,n){let t=e;do{Ho(t).skipDirectInference=void 0,t=t.parent}while(t&&t!==n)}return r}function qe(e,t,n,r){const i=kc(e,H_);me=n;const o=i?MO(i,t,r):void 0;return me=void 0,o}var Ue=new Map,$e=new Map,He=new Map,Ke=new Map,Ge=new Map,Ye=new Map,Ze=new Map,et=new Map,tt=new Map,it=new Map,ot=new Map,at=new Map,st=new Map,lt=new Map,ut=new Map,ft=[],mt=new Map,gt=new Set,ht=Eo(4,"unknown"),yt=Eo(0,"__resolving__"),vt=new Map,bt=new Map,xt=new Set,St=ys(1,"any"),kt=ys(1,"any",262144,"auto"),Tt=ys(1,"any",void 0,"wildcard"),Ct=ys(1,"any",void 0,"blocked string"),wt=ys(1,"error"),Nt=ys(1,"unresolved"),Dt=ys(1,"any",65536,"non-inferrable"),Et=ys(1,"intrinsic"),Ft=ys(2,"unknown"),At=ys(32768,"undefined"),Ot=V?At:ys(32768,"undefined",65536,"widening"),jt=ys(32768,"undefined",void 0,"missing"),Lt=te?jt:At,Mt=ys(32768,"undefined",void 0,"optional"),Rt=ys(65536,"null"),Bt=V?Rt:ys(65536,"null",65536,"widening"),Jt=ys(4,"string"),zt=ys(8,"number"),qt=ys(64,"bigint"),Ut=ys(512,"false",void 0,"fresh"),Vt=ys(512,"false"),Wt=ys(512,"true",void 0,"fresh"),$t=ys(512,"true");Wt.regularType=$t,Wt.freshType=Wt,$t.regularType=$t,$t.freshType=Wt,Ut.regularType=Vt,Ut.freshType=Ut,Vt.regularType=Vt,Vt.freshType=Ut;var Ht,Gt=dv([Vt,$t]),Qt=ys(4096,"symbol"),Yt=ys(16384,"void"),Zt=ys(131072,"never"),en=ys(131072,"never",262144,"silent"),nn=ys(131072,"never",void 0,"implicit"),rn=ys(131072,"never",void 0,"unreachable"),on=ys(67108864,"object"),an=dv([Jt,zt]),sn=dv([Jt,zt,Qt]),un=dv([zt,qt]),dn=dv([Jt,zt,Gt,qt,Rt,At]),gn=ab(["",""],[zt]),yn=Gx(e=>{return 262144&e.flags?!(t=e).constraint&&!Cg(t)||t.constraint===On?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=bs(t.symbol),t.restrictiveInstantiation.constraint=On,t.restrictiveInstantiation):e;var t},()=>"(restrictive mapper)"),bn=Gx(e=>262144&e.flags?Tt:e,()=>"(permissive mapper)"),xn=ys(131072,"never",void 0,"unique literal"),Sn=Gx(e=>262144&e.flags?xn:e,()=>"(unique literal mapper)"),kn=Gx(e=>(!Ht||e!==Mn&&e!==Rn&&e!==Bn||Ht(!0),e),()=>"(unmeasurable reporter)"),Cn=Gx(e=>(!Ht||e!==Mn&&e!==Rn&&e!==Bn||Ht(!1),e),()=>"(unreliable reporter)"),wn=Cs(void 0,x,p,p,p),Nn=Cs(void 0,x,p,p,p);Nn.objectFlags|=2048;var Dn=Eo(2048,"__type");Dn.members=ad();var Pn=Cs(Dn,x,p,p,p),En=Cs(void 0,x,p,p,p),Fn=V?dv([At,Rt,En]):Ft,An=Cs(void 0,x,p,p,p);An.instantiations=new Map;var In=Cs(void 0,x,p,p,p);In.objectFlags|=262144;var On=Cs(void 0,x,p,p,p),jn=Cs(void 0,x,p,p,p),Ln=Cs(void 0,x,p,p,p),Mn=bs(),Rn=bs();Rn.constraint=Mn;var Bn=bs(),Jn=bs(),zn=bs();zn.constraint=Jn;var qn,Un,Vn,Wn,$n,Hn,Kn,Gn,Xn,Qn,Yn,Zn,er,tr,nr,rr,ir,or,ar,sr,lr,_r,ur,dr,pr,fr,mr,yr,vr,br,xr,Sr,kr,Tr,Cr,wr,Nr,Dr,Pr,Er,Fr,Ar,Ir,Or,jr,Lr,Mr,Rr,Br,Jr,zr,qr,Ur,Vr,Wr,$r,Hr,Kr,Gr,Xr,Qr,Yr,Zr,ei=Ff(1,"<>",0,St),ti=Nu(void 0,void 0,void 0,p,St,void 0,0,0),ni=Nu(void 0,void 0,void 0,p,wt,void 0,0,0),ri=Nu(void 0,void 0,void 0,p,St,void 0,0,0),ii=Nu(void 0,void 0,void 0,p,en,void 0,0,0),oi=mg(zt,Jt,!0),ai=new Map,si={get yieldType(){return Tn.fail("Not supported")},get returnType(){return Tn.fail("Not supported")},get nextType(){return Tn.fail("Not supported")}},ci=vR(St,St,St),li=vR(St,St,Ft),_i=vR(Zt,St,At),ui={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Cr||(Cr=_y("AsyncIterator",3,e))||An},getGlobalIterableType:Ny,getGlobalIterableIteratorType:function(e){return wr||(wr=_y("AsyncIterableIterator",1,e))||An},getGlobalGeneratorType:function(e){return Nr||(Nr=_y("AsyncGenerator",3,e))||An},resolveIterationType:(e,t)=>xM(e,t,Ca.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),mustHaveANextMethodDiagnostic:Ca.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:Ca.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:Ca.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},di={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return vr||(vr=_y("Iterator",3,e))||An},getGlobalIterableType:Dy,getGlobalIterableIteratorType:function(e){return br||(br=_y("IterableIterator",1,e))||An},getGlobalGeneratorType:function(e){return xr||(xr=_y("Generator",3,e))||An},resolveIterationType:(e,t)=>e,mustHaveANextMethodDiagnostic:Ca.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:Ca.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:Ca.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},pi=new Map,fi=new Map,mi=0,gi=0,hi=0,yi=!1,vi=0,bi=[],xi=[],Si=[],ki=0,Ti=[],Ci=[],wi=0,Ni=kx(""),Pi=Nx(0),Ei=Dx({negative:!1,base10Value:"0"}),Fi=[],Ai=[],Ii=[],Oi=0,ji=!1,Li=0,Mi=10,Ri=[],Bi=[],Ji=[],zi=[],qi=[],Ui=[],Vi=[],Wi=[],$i=[],Hi=[],Ki=[],Gi=[],Xi=[],Qi=[],Yi=[],Zi=[],eo=[],to=[],no=[],ro=0,io=wy(),oo=wy(),ao=dv(We(zB.keys(),kx)),so=new Map,co=new Map,lo=new Map,_o=new Map,uo=new Map,po=new Map,fo=[[".mts",".mjs"],[".ts",".js"],[".cts",".cjs"],[".mjs",".mjs"],[".js",".js"],[".cjs",".cjs"],[".tsx",1===k.jsx?".jsx":".js"],[".jsx",".jsx"],[".json",".json"]];return function(){for(const t of e.getSourceFiles())KR(t,k);let t;qn=new Map;for(const n of e.getSourceFiles())if(!n.redirectInfo){if(!af(n)){const e=n.locals.get("globalThis");if(null==e?void 0:e.declarations)for(const t of e.declarations)io.add(Vp(t,Ca.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"));Uo(_e,n.locals)}if(n.jsGlobalAugmentations&&Uo(_e,n.jsGlobalAugmentations),n.patternAmbientModules&&n.patternAmbientModules.length&&(Vn=ne(Vn,n.patternAmbientModules)),n.moduleAugmentations.length&&(t||(t=[])).push(n.moduleAugmentations),n.symbol&&n.symbol.globalExports){n.symbol.globalExports.forEach((e,t)=>{_e.has(t)||_e.set(t,e)})}}if(t)for(const e of t)for(const t of e)vp(t.parent)&&Wo(t);(function(){const e=ue.escapedName,t=_e.get(e);t?h(t.declarations,t=>{aC(t)||io.add(Vp(t,Ca.Declaration_name_conflicts_with_built_in_global_identifier_0,Cc(e)))}):_e.set(e,ue)})(),$o(ue).type=Ot,$o(xe).type=_y("IArguments",0,!0),$o(ht).type=wt,$o(fe).type=vs(16,fe),Xn=_y("Array",1,!0),$n=_y("Object",0,!0),Hn=_y("Function",0,!0),Kn=H&&_y("CallableFunction",0,!0)||Hn,Gn=H&&_y("NewableFunction",0,!0)||Hn,Yn=_y("String",0,!0),Zn=_y("Number",0,!0),er=_y("Boolean",0,!0),tr=_y("RegExp",0,!0),rr=jy(St),(ir=jy(kt))===wn&&(ir=Cs(void 0,x,p,p,p));if(Qn=Ey("ReadonlyArray",1)||Xn,or=Qn?Ay(Qn,[St]):rr,nr=Ey("ThisType",1),t)for(const e of t)for(const t of e)vp(t.parent)||Wo(t);qn.forEach(({firstFile:e,secondFile:t,conflictingSymbols:n})=>{if(n.size<8)n.forEach(({isBlockScoped:e,firstFileLocations:t,secondFileLocations:n},r)=>{const i=e?Ca.Cannot_redeclare_block_scoped_variable_0:Ca.Duplicate_identifier_0;for(const e of t)qo(e,i,r,n);for(const e of n)qo(e,i,r,t)});else{const r=We(n.keys()).join(", ");io.add(ST(Vp(e,Ca.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Vp(t,Ca.Conflicts_are_in_this_file))),io.add(ST(Vp(t,Ca.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Vp(e,Ca.Conflicts_are_in_this_file)))}}),qn=void 0}(),Be;function mo(e){return e?ut.get(e):void 0}function go(e,t){return e&&ut.set(e,t),t}function ho(e){if(e){const t=Dd(e);if(t)if(LE(e)){if(t.localJsxFragmentNamespace)return t.localJsxFragmentNamespace;const n=t.pragmas.get("jsxfrag");if(n){const e=ct(n)?n[0]:n;if(t.localJsxFragmentFactory=ZI(e.arguments.factory,P),iJ(t.localJsxFragmentFactory,vo,u_),t.localJsxFragmentFactory)return t.localJsxFragmentNamespace=wb(t.localJsxFragmentFactory).escapedText}const r=dz(e);if(r)return t.localJsxFragmentFactory=r,t.localJsxFragmentNamespace=wb(r).escapedText}else{const e=yo(t);if(e)return t.localJsxNamespace=e}}return Yr||(Yr="React",k.jsxFactory?(iJ(Zr=ZI(k.jsxFactory,P),vo),Zr&&(Yr=wb(Zr).escapedText)):k.reactNamespace&&(Yr=Tc(k.reactNamespace))),Zr||(Zr=aw.createQualifiedName(aw.createIdentifier(Cc(Yr)),"createElement")),Yr}function yo(e){if(e.localJsxNamespace)return e.localJsxNamespace;const t=e.pragmas.get("jsx");if(t){const n=ct(t)?t[0]:t;if(e.localJsxFactory=ZI(n.arguments.factory,P),iJ(e.localJsxFactory,vo,u_),e.localJsxFactory)return e.localJsxNamespace=wb(e.localJsxFactory).escapedText}}function vo(e){return BT(e,-1,-1),fJ(e,vo,void 0)}function bo(e,t,n,...r){const i=So(t,n,...r);return i.skippedOn=e,i}function xo(e,t,...n){return e?Vp(e,t,...n):gS(t,...n)}function So(e,t,...n){const r=xo(e,t,...n);return io.add(r),r}function ko(e,t){e?io.add(t):oo.add({...t,category:2})}function To(e,t,n,...r){if(t.pos<0||t.end<0){if(!e)return;const i=Dd(t);return void ko(e,"message"in n?fS(i,0,0,n,...r):Qp(i,n))}ko(e,"message"in n?Vp(t,n,...r):Hp(Dd(t),t,n))}function Co(e,t,n,...r){const i=So(e,n,...r);if(t){ST(i,Vp(e,Ca.Did_you_forget_to_use_await))}return i}function wo(e,t){const n=Array.isArray(e)?h(e,il):il(e);return n&&ST(t,Vp(n,Ca.The_declaration_was_marked_as_deprecated_here)),oo.add(t),t}function No(e){const t=as(e);return t&&g(e.declarations)>1?64&t.flags?ee(e.declarations,Do):T(e.declarations,Do):!!e.valueDeclaration&&Do(e.valueDeclaration)||g(e.declarations)&&T(e.declarations,Do)}function Do(e){return!!(536870912&Qz(e))}function Po(e,t,n){return wo(t,Vp(e,Ca._0_is_deprecated,n))}function Eo(e,t,n){u++;const r=new s(33554432|e,t);return r.links=new $B,r.links.checkFlags=n||0,r}function Fo(e,t){const n=Eo(1,e);return n.links.type=t,n}function Ao(e,t){const n=Eo(4,e);return n.links.type=t,n}function Io(e){let t=0;return 2&e&&(t|=111551),1&e&&(t|=111550),4&e&&(t|=0),8&e&&(t|=900095),16&e&&(t|=110991),32&e&&(t|=899503),64&e&&(t|=788872),256&e&&(t|=899327),128&e&&(t|=899967),512&e&&(t|=110735),8192&e&&(t|=103359),32768&e&&(t|=46015),65536&e&&(t|=78783),262144&e&&(t|=526824),524288&e&&(t|=788968),2097152&e&&(t|=2097152),t}function Oo(e,t){t.mergeId||(t.mergeId=RB,RB++),Ri[t.mergeId]=e}function Lo(e){const t=Eo(e.flags,e.escapedName);return t.declarations=e.declarations?e.declarations.slice():[],t.parent=e.parent,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(t.constEnumOnlyModule=!0),e.members&&(t.members=new Map(e.members)),e.exports&&(t.exports=new Map(e.exports)),Oo(t,e),t}function Jo(e,t,n=!1){if(!(e.flags&Io(t.flags))||67108864&(t.flags|e.flags)){if(t===e)return e;if(!(33554432&e.flags)){const n=Pa(e);if(n===ht)return t;if(n.flags&Io(t.flags)&&!(67108864&(t.flags|n.flags)))return r(e,t),t;e=Lo(n)}512&t.flags&&512&e.flags&&e.constEnumOnlyModule&&!t.constEnumOnlyModule&&(e.constEnumOnlyModule=!1),e.flags|=t.flags,t.valueDeclaration&&wg(e,t.valueDeclaration),ge(e.declarations,t.declarations),t.members&&(e.members||(e.members=ad()),Uo(e.members,t.members,n)),t.exports&&(e.exports||(e.exports=ad()),Uo(e.exports,t.exports,n)),n||Oo(e,t)}else 1024&e.flags?e!==fe&&So(t.declarations&&jc(t.declarations[0]),Ca.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,Hs(e)):r(e,t);return e;function r(e,t){const n=!!(384&e.flags||384&t.flags),r=!!(2&e.flags||2&t.flags),o=n?Ca.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:r?Ca.Cannot_redeclare_block_scoped_variable_0:Ca.Duplicate_identifier_0,a=t.declarations&&Dd(t.declarations[0]),s=e.declarations&&Dd(e.declarations[0]),c=Ed(a,k.checkJs),l=Ed(s,k.checkJs),_=Hs(t);if(a&&s&&qn&&!n&&a!==s){const n=-1===fa(a.path,s.path)?a:s,o=n===a?s:a,u=G(qn,`${n.path}|${o.path}`,()=>({firstFile:n,secondFile:o,conflictingSymbols:new Map})),d=G(u.conflictingSymbols,_,()=>({isBlockScoped:r,firstFileLocations:[],secondFileLocations:[]}));c||i(d.firstFileLocations,t),l||i(d.secondFileLocations,e)}else c||zo(t,o,_,e),l||zo(e,o,_,t)}function i(e,t){if(t.declarations)for(const n of t.declarations)he(e,n)}}function zo(e,t,n,r){h(e.declarations,e=>{qo(e,t,n,r.declarations)})}function qo(e,t,n,r){const i=(ig(e,!1)?ag(e):jc(e))||e,o=function(e,t,...n){const r=e?Vp(e,t,...n):gS(t,...n);return io.lookup(r)||(io.add(r),r)}(i,t,n);for(const e of r||p){const t=(ig(e,!1)?ag(e):jc(e))||e;if(t===i)continue;o.relatedInformation=o.relatedInformation||[];const r=Vp(t,Ca._0_was_also_declared_here,n),a=Vp(t,Ca.and_here);g(o.relatedInformation)>=5||ee(o.relatedInformation,e=>0===xS(e,a)||0===xS(e,r))||ST(o,g(o.relatedInformation)?a:r)}}function Uo(e,t,n=!1){t.forEach((t,r)=>{const i=e.get(r);e.set(r,i?Jo(i,t,n):ts(t))})}function Wo(e){var t,n,r;const i=e.parent;if((null==(t=i.symbol.declarations)?void 0:t[0])===i)if(vp(i))Uo(_e,i.symbol.exports);else{let t=Ja(e,e,33554432&e.parent.parent.flags?void 0:Ca.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!0);if(!t)return;if(t=Ua(t),1920&t.flags)if(ee(Vn,e=>t===e.symbol)){const n=Jo(i.symbol,t,!0);Wn||(Wn=new Map),Wn.set(e.text,n)}else{if((null==(n=t.exports)?void 0:n.get("__export"))&&(null==(r=i.symbol.exports)?void 0:r.size)){const e=hu(t,"resolvedExports");for(const[n,r]of We(i.symbol.exports.entries()))e.has(n)&&!t.exports.has(n)&&Jo(e.get(n),r)}Jo(t,i.symbol)}else So(e,Ca.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,e.text)}else Tn.assert(i.symbol.declarations.length>1)}function $o(e){if(33554432&e.flags)return e.links;const t=GB(e);return Bi[t]??(Bi[t]=new $B)}function Ho(e){const t=KB(e);return Ji[t]||(Ji[t]=new HB)}function Ko(e,t,n){if(n){const r=ts(e.get(t));if(r){if(r.flags&n)return r;if(2097152&r.flags){if(Fa(r)&n)return r}}}}function Go(t,n){const r=Dd(t),i=Dd(n),o=Lp(t);if(r!==i){if(A&&(r.externalModuleIndicator||i.externalModuleIndicator)||!k.outFile||Cv(n)||33554432&t.flags)return!0;if(a(n,t))return!0;const o=e.getSourceFiles();return o.indexOf(r)<=o.indexOf(i)}if(16777216&n.flags||Cv(n)||Qw(n))return!0;if(t.pos<=n.pos&&(!yD(t)||!hm(n.parent)||t.initializer||t.exclamationToken)){if(208===t.kind){const e=Oh(n,208);return e?xc(e,eP)!==xc(t,eP)||t.pose===t?"quit":pD(e)?e.parent.parent===t:!j&&gD(e)&&(e.parent===t||bD(e.parent)&&e.parent.parent===t||Tl(e.parent)&&e.parent.parent===t||yD(e.parent)&&e.parent.parent===t||mD(e.parent)&&e.parent.parent.parent===t));return!e||!(j||!gD(e))&&!!xc(n,t=>t===e?"quit":f_(t)&&!fm(t))}return yD(t)?!s(t,n,!1):!lc(t,t.parent)||!(q&&om(t)===om(n)&&a(n,t))}return!!(281===n.parent.kind||277===n.parent.kind&&n.parent.isExportEquals)||(!(277!==n.kind||!n.isExportEquals)||!!a(n,t)&&(!q||!om(t)||!yD(t)&&!lc(t,t.parent)||!s(t,n,!0)));function a(e,t){return!!xc(e,n=>{if(n===o)return"quit";if(f_(n))return!0;if(xD(n))return t.pos=r&&o.pos<=i){const n=aw.createPropertyAccessExpression(aw.createThis(),e);qT(n.expression,n),qT(n,o),n.flowNode=o.returnFlowNode;if(!vk(qD(n,t,DC(t))))return!0}return!1}(e,Kl(rs(t)),O(t.parent.members,xD),t.parent.pos,n.pos))return!0}}}else{if(!(172===t.kind&&!$v(t))||om(e)!==om(t))return!0}}return!1})}function s(e,t,n){if(t.end>e.end)return!1;return void 0===xc(t,t=>{if(t===e)return"quit";switch(t.kind){case 219:return!0;case 172:return!n||!(yD(e)&&t.parent===e.parent||lc(e,e.parent)&&t.parent===e.parent.parent)||"quit";case 241:switch(t.parent.kind){case 177:case 174:case 178:return!0;default:return!1}default:return!1}})}}function Xo(e){return Ho(e).declarationRequiresScopeChange}function Qo(e,t){Ho(e).declarationRequiresScopeChange=t}function Zo(e,t,n){return t?ST(e,Vp(t,281===t.kind||278===t.kind||280===t.kind?Ca._0_was_exported_here:Ca._0_was_imported_here,n)):e}function ea(e){return _t(e)?Cc(e):Rp(e)}function na(e,t,n){if(!QN(e)||e.escapedText!==t||pJ(e)||Cv(e))return!1;const r=lm(e,!1,!1);let i=r;for(;i;){if(S_(i.parent)){const o=rs(i.parent);if(!o)break;if(Zp(Kl(o),t))return So(e,Ca.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,ea(n),Hs(o)),!0;if(i===r&&!$v(i)){if(Zp(U_(o).thisType,t))return So(e,Ca.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,ea(n)),!0}}i=i.parent}return!1}function ra(e){const t=ia(e);return!(!t||!Ma(t,64,!0))&&(So(e,Ca.Cannot_extend_an_interface_0_Did_you_mean_implements,tp(t)),!0)}function ia(e){switch(e.kind){case 80:case 211:return e.parent?ia(e.parent):void 0;case 233:if(Cb(e.expression))return e.expression;default:return}}function oa(e){return"any"===e||"string"===e||"number"===e||"boolean"===e||"never"===e||"unknown"===e}function aa(e,t,n){return!!t&&!!xc(e,e=>e===t||!!(e===n||f_(e)&&(!fm(e)||3&$h(e)))&&"quit")}function sa(e){switch(e.kind){case 271:return e;case 273:return e.parent;case 274:return e.parent.parent;case 276:return e.parent.parent.parent;default:return}}function ca(e){return e.declarations&&w(e.declarations,la)}function la(e){return 271===e.kind||270===e.kind||273===e.kind&&!!e.name||274===e.kind||280===e.kind||276===e.kind||281===e.kind||277===e.kind&&Ch(e)||yP(e)&&2===dg(e)&&Ch(e)||qx(e)&&yP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind&&_a(e.parent.right)||304===e.kind||303===e.kind&&_a(e.initializer)||260===e.kind&&Km(e)||208===e.kind&&Km(e.parent.parent)}function _a(e){return Th(e)||_P(e)&&RO(e)}function ua(e,t){const n=ka(e);if(n){const e=Wx(n.expression).arguments[0];return QN(n.name)?Pa(Zp(em(e),n.name.escapedText)):void 0}if(eE(e)||283===e.moduleReference.kind){const t=Ba(e,Lm(e)||jm(e)),n=Ua(t);return Aa(e,t,n,!1),n}const r=ja(e.moduleReference,t);return function(e,t){if(Aa(e,void 0,t,!1)&&!e.isTypeOnly){const t=Oa(rs(e)),n=281===t.kind||278===t.kind,r=n?Ca.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:Ca.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type,i=n?Ca._0_was_exported_here:Ca._0_was_imported_here,o=278===t.kind?"*":Cc(t.name.escapedText);ST(So(e.moduleReference,r),Vp(t,i,o))}}(e,r),r}function da(e,t,n,r){const i=e.exports.get("export="),o=i?Zp(Kl(i),t,!0):e.exports.get(t),a=Pa(o,r);return Aa(n,o,a,!1),a}function pa(e){return kE(e)&&!e.isExportEquals||Wv(e,2048)||wE(e)||bE(e)}function ma(t){return Ku(t)?e.getModeForUsageLocation(Dd(t),t):void 0}function ga(e,t){return 99===e&&1===t}function ha(e){return 99===ma(e)&&Xt(e.text,".json")}function ya(e,t,n,r){const i=e&&ma(r);if(e&&void 0!==i&&100<=A&&A<=199){const t=ga(i,e.impliedNodeFormat);if(99===i||t)return t}if(!U)return!1;if(!e||e.isDeclarationFile){const e=da(t,"default",void 0,!0);return(!e||!ee(e.declarations,pa))&&!da(t,Tc("__esModule"),void 0,n)}return Bm(e)?"object"!=typeof e.externalModuleIndicator&&!da(t,Tc("__esModule"),void 0,n):Ha(t)}function va(e,t,n){var r;let i;i=hp(e)?e:da(e,"default",t,n);const o=null==(r=e.declarations)?void 0:r.find(QE),a=ba(t);if(!a)return i;const s=ha(a),c=ya(o,e,n,a);if(i||c||s){if(c||s){const r=Ua(e,n)||Pa(e,n);return Aa(t,e,r,!1),r}}else if(Ha(e)&&!U){const n=A>=5?"allowSyntheticDefaultImports":"esModuleInterop",r=e.exports.get("export=").valueDeclaration,i=So(t.name,Ca.Module_0_can_only_be_default_imported_using_the_1_flag,Hs(e),n);r&&ST(i,Vp(r,Ca.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,n))}else pE(t)?function(e,t){var n,r,i;if(null==(n=e.exports)?void 0:n.has(t.symbol.escapedName))So(t.name,Ca.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,Hs(e),Hs(t.symbol));else{const n=So(t.name,Ca.Module_0_has_no_default_export,Hs(e)),o=null==(r=e.exports)?void 0:r.get("__export");if(o){const e=null==(i=o.declarations)?void 0:i.find(e=>{var t,n;return!!(TE(e)&&e.moduleSpecifier&&(null==(n=null==(t=Ba(e,e.moduleSpecifier))?void 0:t.exports)?void 0:n.has("default")))});e&&ST(n,Vp(e,Ca.export_Asterisk_does_not_re_export_a_default))}}}(e,t):Sa(e,e,t,Xl(t)&&t.propertyName||t.name);return Aa(t,i,void 0,!1),i}function ba(e){switch(e.kind){case 273:return e.parent.moduleSpecifier;case 271:return EE(e.moduleReference)?e.moduleReference.expression:void 0;case 274:case 281:return e.parent.parent.moduleSpecifier;case 276:return e.parent.parent.parent.moduleSpecifier;default:return Tn.assertNever(e)}}function xa(e,t,n=!1){var r;const i=Lm(e)||e.moduleSpecifier,o=Ba(e,i),a=!rP(t)&&t.propertyName||t.name;if(!QN(a))return;const s=Wa(o,i,!1,"default"===a.escapedText&&U);if(s&&a.escapedText){if(hp(o))return o;let c;c=o&&o.exports&&o.exports.get("export=")?Zp(Kl(s),a.escapedText,!0):function(e,t){if(3&e.flags){const n=e.valueDeclaration.type;if(n)return Pa(Zp(Mx(n),t))}}(s,a.escapedText),c=Pa(c,n);let l=function(e,t,n,r){var i;if(1536&e.flags){const o=Qa(e).get(t.escapedText),a=Pa(o,r);return Aa(n,o,a,!1,null==(i=$o(e).typeOnlyExportStarMap)?void 0:i.get(t.escapedText),t.escapedText),a}}(s,a,t,n);if(void 0===l&&"default"===a.escapedText){const e=null==(r=o.declarations)?void 0:r.find(QE);(ha(i)||ya(e,o,n,i))&&(l=Ua(o,n)||Pa(o,n))}const _=l&&c&&l!==c?function(e,t){if(e===ht&&t===ht)return ht;if(790504&e.flags)return e;const n=Eo(e.flags|t.flags,e.escapedName);return Tn.assert(e.declarations||t.declarations),n.declarations=oe(ne(e.declarations,t.declarations),Pt),n.parent=e.parent||t.parent,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration),t.members&&(n.members=new Map(t.members)),e.exports&&(n.exports=new Map(e.exports)),n}(c,l):l||c;return _||Sa(o,s,e,a),_}}function Sa(e,t,n,r){var i;const o=La(e,n),a=Rp(r),s=EI(r,t);if(void 0!==s){const e=Hs(s),t=So(r,Ca._0_has_no_exported_member_named_1_Did_you_mean_2,o,a,e);s.valueDeclaration&&ST(t,Vp(s.valueDeclaration,Ca._0_is_declared_here,e))}else(null==(i=e.exports)?void 0:i.has("default"))?So(r,Ca.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,o,a):function(e,t,n,r,i){var o,a;const s=null==(a=null==(o=dt(r.valueDeclaration,bu))?void 0:o.locals)?void 0:a.get(t.escapedText),c=r.exports;if(s){const r=null==c?void 0:c.get("export=");if(r)us(r,s)?function(e,t,n,r){if(A>=5){So(t,BS(k)?Ca._0_can_only_be_imported_by_using_a_default_import:Ca._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n)}else if(zm(e)){So(t,BS(k)?Ca._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:Ca._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n)}else{So(t,BS(k)?Ca._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:Ca._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n,n,r)}}(e,t,n,i):So(t,Ca.Module_0_has_no_exported_member_1,i,n);else{const e=c?C(Nf(c),e=>!!us(e,s)):void 0,r=e?So(t,Ca.Module_0_declares_1_locally_but_it_is_exported_as_2,i,n,Hs(e)):So(t,Ca.Module_0_declares_1_locally_but_it_is_not_exported,i,n);s.declarations&&ST(r,...M(s.declarations,(e,t)=>Vp(e,0===t?Ca._0_is_declared_here:Ca.and_here,n)))}}else So(t,Ca.Module_0_has_no_exported_member_1,i,n)}(n,r,a,e,o)}function ka(e){if(eE(e)&&e.initializer&&rP(e.initializer))return e.initializer}function Ta(e,t,n){if("default"===wc(e.propertyName||e.name)){const t=ba(e),r=t&&Ba(e,t);if(r)return va(r,e,!!n)}const r=e.parent.parent.moduleSpecifier?xa(e.parent.parent,e,n):Ma(e.propertyName||e.name,t,!1,n);return Aa(e,void 0,r,!1),r}function wa(e,t){if(kP(e))return SL(e).symbol;if(!u_(e)&&!Cb(e))return;const n=Ma(e,901119,!0,t);return n||(SL(e),Ho(e).resolvedSymbol)}function Na(e,t=!1){switch(e.kind){case 271:case 260:return ua(e,t);case 273:return function(e,t){const n=Ba(e,e.parent.moduleSpecifier);if(n)return va(n,e,t)}(e,t);case 274:return function(e,t){const n=e.parent.parent.moduleSpecifier,r=Ba(e,n),i=Wa(r,n,t,!1);return Aa(e,r,i,!1),i}(e,t);case 280:return function(e,t){const n=e.parent.moduleSpecifier,r=n&&Ba(e,n),i=n&&Wa(r,n,t,!1);return Aa(e,r,i,!1),i}(e,t);case 276:case 208:return function(e,t){if(SE(e)&&"default"===wc(e.propertyName||e.name)){const n=ba(e),r=n&&Ba(e,n);if(r)return va(r,e,t)}const n=eP(e)?py(e):e.parent.parent.parent,r=ka(n),i=xa(n,r||e,t),o=e.propertyName||e.name;return r&&i&&QN(o)?Pa(Zp(Kl(i),o.escapedText),t):(Aa(e,void 0,i,!1),i)}(e,t);case 281:return Ta(e,901119,t);case 277:case 226:return function(e,t){const n=wa(kE(e)?e.expression:e.right,t);return Aa(e,void 0,n,!1),n}(e,t);case 270:return function(e,t){if(vu(e.parent)){const n=Ua(e.parent.symbol,t);return Aa(e,void 0,n,!1),n}}(e,t);case 304:return Ma(e.name,901119,!0,t);case 303:return wa(e.initializer,t);case 212:case 211:return function(e,t){if(yP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind)return wa(e.parent.right,t)}(e,t);default:return Tn.fail()}}function Da(e,t=901119){return!!e&&(2097152==(e.flags&(2097152|t))||!!(2097152&e.flags&&67108864&e.flags))}function Pa(e,t){return!t&&Da(e)?Ea(e):e}function Ea(e){Tn.assert(!!(2097152&e.flags),"Should only get Alias here.");const t=$o(e);if(t.aliasTarget)t.aliasTarget===yt&&(t.aliasTarget=ht);else{t.aliasTarget=yt;const n=ca(e);if(!n)return Tn.fail();const r=Na(n);t.aliasTarget===yt?t.aliasTarget=r||ht:So(n,Ca.Circular_definition_of_import_alias_0,Hs(e))}return t.aliasTarget}function Fa(e,t,n){const r=t&&Oa(e),i=r&&TE(r),o=r&&(i?Ba(r.moduleSpecifier,r.moduleSpecifier,!0):Ea(r.symbol)),a=i&&o?Ya(o):void 0;let s,c=n?0:e.flags;for(;2097152&e.flags;){const t=ps(Ea(e));if(!i&&t===o||(null==a?void 0:a.get(t.escapedName))===t)break;if(t===ht)return-1;if(t===e||(null==s?void 0:s.has(t)))break;2097152&t.flags&&(s?s.add(t):s=new Set([e,t])),c|=t.flags,e=t}return c}function Aa(e,t,n,r,i,o){if(!e||rP(e))return!1;const a=rs(e);if(Zl(e)){return $o(a).typeOnlyDeclaration=e,!0}if(i){const e=$o(a);return e.typeOnlyDeclaration=i,a.escapedName!==o&&(e.typeOnlyExportStarName=o),!0}const s=$o(a);return Ia(s,t,r)||Ia(s,n,r)}function Ia(e,t,n){var r;if(t&&(void 0===e.typeOnlyDeclaration||n&&!1===e.typeOnlyDeclaration)){const n=(null==(r=t.exports)?void 0:r.get("export="))??t,i=n.declarations&&C(n.declarations,Zl);e.typeOnlyDeclaration=i??$o(n).typeOnlyDeclaration??!1}return!!e.typeOnlyDeclaration}function Oa(e,t){var n;if(!(2097152&e.flags))return;const r=$o(e);if(void 0===r.typeOnlyDeclaration){r.typeOnlyDeclaration=!1;const t=Pa(e);Aa(null==(n=e.declarations)?void 0:n[0],ca(e)&&dA(e),t,!0)}if(void 0===t)return r.typeOnlyDeclaration||void 0;if(r.typeOnlyDeclaration){return Fa(278===r.typeOnlyDeclaration.kind?Pa(Ya(r.typeOnlyDeclaration.symbol.parent).get(r.typeOnlyExportStarName||e.escapedName)):Ea(r.typeOnlyDeclaration.symbol))&t?r.typeOnlyDeclaration:void 0}}function ja(e,t){return 80===e.kind&&Fb(e)&&(e=e.parent),80===e.kind||166===e.parent.kind?Ma(e,1920,!1,t):(Tn.assert(271===e.parent.kind),Ma(e,901119,!1,t))}function La(e,t){return e.parent?La(e.parent,t)+"."+Hs(e):Hs(e,t,void 0,36)}function Ma(e,t,n,r,i){if(Ld(e))return;const o=1920|(zm(e)?111551&t:0);let a;if(80===e.kind){const r=t===o||my(e)?Ca.Cannot_find_namespace_0:Gw(wb(e)),s=zm(e)&&!my(e)?function(e,t){if(qh(e.parent)){const n=function(e){if(xc(e,e=>ju(e)||16777216&e.flags?Mg(e):"quit"))return;const t=Zg(e);if(t&&RP(t)&&Tg(t.expression)){const e=rs(t.expression.left);if(e)return Ra(e)}if(t&&_P(t)&&Tg(t.parent)&&RP(t.parent.parent)){const e=rs(t.parent.left);if(e)return Ra(e)}if(t&&(Kf(t)||HE(t))&&yP(t.parent.parent)&&6===dg(t.parent.parent)){const e=rs(t.parent.parent.left);if(e)return Ra(e)}const n=Yg(e);if(n&&f_(n)){const e=rs(n);return e&&e.valueDeclaration}}(e.parent);if(n)return Le(n,e,t,void 0,!0)}}(e,t):void 0;if(a=ts(Le(i||e,e,t,n||s?void 0:r,!0,!1)),!a)return ts(s)}else if(166===e.kind||211===e.kind){const r=166===e.kind?e.left:e.expression,s=166===e.kind?e.right:e.name;let c=Ma(r,o,n,!1,i);if(!c||Ld(s))return;if(c===ht)return c;if(c.valueDeclaration&&zm(c.valueDeclaration)&&100!==LS(k)&&eE(c.valueDeclaration)&&c.valueDeclaration.initializer&&KO(c.valueDeclaration.initializer)){const e=c.valueDeclaration.initializer.arguments[0],t=Ba(e,e);if(t){const e=Ua(t);e&&(c=e)}}if(a=ts(Ko(Qa(c),s.escapedText,t)),!a&&2097152&c.flags&&(a=ts(Ko(Qa(Ea(c)),s.escapedText,t))),!a){if(!n){const n=La(c),r=Rp(s),i=EI(s,c);if(i)return void So(s,Ca._0_has_no_exported_member_named_1_Did_you_mean_2,n,r,Hs(i));const o=dD(e)&&function(e){for(;dD(e.parent);)e=e.parent;return e}(e),a=$n&&788968&t&&o&&!pP(o.parent)&&function(e){let t=wb(e),n=Le(t,t,111551,void 0,!0);if(n){for(;dD(t.parent);){if(n=Zp(Kl(n),t.parent.right.escapedText),!n)return;t=t.parent}return n}}(o);if(a)return void So(o,Ca._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Up(o));if(1920&t&&dD(e.parent)){const t=ts(Ko(Qa(c),s.escapedText,788968));if(t)return void So(e.parent.right,Ca.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Hs(t),Cc(e.parent.right.escapedText))}So(s,Ca.Namespace_0_has_no_exported_member_1,n,r)}return}}else Tn.assertNever(e,"Unknown entity name kind.");return!my(e)&&u_(e)&&(2097152&a.flags||277===e.parent.kind)&&Aa(kh(e),a,void 0,!0),a.flags&t||r?a:Ea(a)}function Ra(e){const t=e.parent.valueDeclaration;if(!t)return;return(eg(t)?rg(t):Uu(t)?ng(t):void 0)||t}function Ba(e,t,n){const r=1===LS(k)?Ca.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:Ca.Cannot_find_module_0_or_its_corresponding_type_declarations;return Ja(e,t,n?void 0:r)}function Ja(e,t,n,r=!1){return Ku(t)?za(e,t.text,n,t,r):void 0}function za(t,n,r,i,o=!1){var a,s,c,l,_,u,d,p,f,m,g;if(ln(n,"@types/")){So(i,Ca.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,_n(n,"@types/"),n)}const h=Df(n,!0);if(h)return h;const y=Dd(t),v=Ku(t)?t:(null==(a=sE(t)?t:t.parent&&sE(t.parent)&&t.parent.name===t?t.parent:void 0)?void 0:a.name)||(null==(s=yf(t)?t:void 0)?void 0:s.argument.literal)||(zm(t)&&JF(t)?t.moduleSpecifier:void 0)||(eE(t)&&t.initializer&&$m(t.initializer,!0)?t.initializer.arguments[0]:void 0)||(null==(c=xc(t,gf))?void 0:c.arguments[0])||(null==(l=xc(t,dE))?void 0:l.moduleSpecifier)||(null==(_=xc(t,Om))?void 0:_.moduleReference.expression)||(null==(u=xc(t,TE))?void 0:u.moduleSpecifier),b=v&&Ku(v)?e.getModeForUsageLocation(y,v):y.impliedNodeFormat,x=LS(k),S=null==(d=e.getResolvedModule(y,n,b))?void 0:d.resolvedModule,T=S&&VV(k,S,y),C=S&&(!T||T===Ca.Module_0_was_resolved_to_1_but_jsx_is_not_set)&&e.getSourceFile(S.resolvedFileName);if(C){if(T&&So(i,T,n,S.resolvedFileName),S.resolvedUsingTsExtension&&lO(n)){const e=(null==(p=xc(t,dE))?void 0:p.importClause)||xc(t,fn(uE,TE));(e&&!e.isTypeOnly||xc(t,gf))&&So(i,Ca.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,function(e){const t=cT(n,e);if(XS(A)||99===b){const r=lO(n)&&LR(k);return t+(".mts"===e||".d.mts"===e?r?".mts":".mjs":".cts"===e||".d.mts"===e?r?".cts":".cjs":r?".ts":".js")}return t}(Tn.checkDefined(Bb(n))))}else if(S.resolvedUsingTsExtension&&!LR(k,y.fileName)){const e=(null==(f=xc(t,dE))?void 0:f.importClause)||xc(t,fn(uE,TE));if(!(null==e?void 0:e.isTypeOnly)&&!xc(t,GD)){const e=Tn.checkDefined(Bb(n));So(i,Ca.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled,e)}}if(C.symbol){if(S.isExternalLibraryImport&&!fT(S.extension)&&qa(!1,i,y,b,S,n),3===x||99===x){const e=1===y.impliedNodeFormat&&!xc(t,gf)||!!xc(t,uE),r=xc(t,e=>GD(e)||TE(e)||dE(e)||JF(e));if(e&&99===C.impliedNodeFormat&&!wC(r))if(xc(t,uE))So(i,Ca.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead,n);else{let e;const t=hT(y.fileName);if(".ts"===t||".js"===t||".tsx"===t||".jsx"===t){const n=y.packageJsonScope,r=".ts"===t?".mts":".js"===t?".mjs":void 0;e=n&&!n.contents.packageJsonContent.type?r?yS(void 0,Ca.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,r,Yo(n.packageDirectory,"package.json")):yS(void 0,Ca.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,Yo(n.packageDirectory,"package.json")):r?yS(void 0,Ca.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,r):yS(void 0,Ca.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module)}io.add(Hp(Dd(i),i,yS(e,Ca.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead,n)))}}return ts(C.symbol)}r&&So(i,Ca.File_0_is_not_a_module,C.fileName)}else{if(Vn){const e=cn(Vn,e=>e.pattern,n);if(e){const t=Wn&&Wn.get(n);return ts(t?t:e.symbol)}}if((!S||fT(S.extension)||void 0!==T)&&T!==Ca.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type){if(r){if(S){const t=e.getProjectReferenceRedirect(S.resolvedFileName);if(t)return void So(i,Ca.Output_file_0_has_not_been_built_from_source_file_1,t,S.resolvedFileName)}if(T)So(i,T,n,S.resolvedFileName);else{const t=jo(n)&&!Mo(n),o=3===x||99===x;if(!US(k)&&Ro(n,".json")&&1!==x&&QS(k))So(i,Ca.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,n);else if(99===b&&o&&t){const t=ta(n,Vo(y.path)),r=null==(m=fo.find(([n,r])=>e.fileExists(t+n)))?void 0:m[1];r?So(i,Ca.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0,n+r):So(i,Ca.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path)}else if(null==(g=e.getResolvedModule(y,n,b))?void 0:g.alternateResult){To(!0,i,yS(Sd(y,e,n,b,n),r,n))}else So(i,r,n)}}return}if(o){So(i,Ca.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,n,S.resolvedFileName)}else qa(Q&&!!r,i,y,b,S,n)}}function qa(t,n,r,i,{packageId:o,resolvedFileName:a},s){let c;!Js(s)&&o&&(c=Sd(r,e,s,i,o.name)),To(t,n,yS(c,Ca.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,s,a))}function Ua(e,t){if(null==e?void 0:e.exports){const n=function(e,t){if(!e||e===ht||e===t||1===t.exports.size||2097152&e.flags)return e;const n=$o(e);if(n.cjsExportMerged)return n.cjsExportMerged;const r=33554432&e.flags?e:Lo(e);r.flags=512|r.flags,void 0===r.exports&&(r.exports=ad());t.exports.forEach((e,t)=>{"export="!==t&&r.exports.set(t,r.exports.has(t)?Jo(r.exports.get(t),e):e)}),r===e&&($o(r).resolvedExports=void 0,$o(r).resolvedMembers=void 0);return $o(r).cjsExportMerged=r,n.cjsExportMerged=r}(ts(Pa(e.exports.get("export="),t)),ts(e));return ts(n)||e}}function Wa(e,t,n,r){var i;const o=Ua(e,n);if(!n&&o){if(!(r||1539&o.flags||id(o,307))){const e=A>=5?"allowSyntheticDefaultImports":"esModuleInterop";return So(t,Ca.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,e),o}const n=t.parent;if(dE(n)&&Ag(n)||gf(n)){const t=gf(n)?n.arguments[0]:n.moduleSpecifier,r=Kl(o),a=$O(r,o,e,t);if(a)return $a(o,a,n);const s=null==(i=null==e?void 0:e.declarations)?void 0:i.find(QE),c=s&&ga(ma(t),s.impliedNodeFormat);if(BS(k)||c){let i=_f(r,0);if(i&&i.length||(i=_f(r,1)),i&&i.length||Zp(r,"default",!0)||c){return $a(o,3670016&r.flags?HO(r,o,e,t):WO(o,o.parent),n)}}}}return o}function $a(e,t,n){const r=Eo(e.flags,e.escapedName);r.declarations=e.declarations?e.declarations.slice():[],r.parent=e.parent,r.links.target=e,r.links.originatingImport=n,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(r.constEnumOnlyModule=!0),e.members&&(r.members=new Map(e.members)),e.exports&&(r.exports=new Map(e.exports));const i=Ud(t);return r.links.type=Cs(r,i.members,p,p,i.indexInfos),r}function Ha(e){return void 0!==e.exports.get("export=")}function Ka(e){return Nf(Ya(e))}function Ga(e,t){const n=Ya(t);if(n)return n.get(e)}function Xa(e){return!(402784252&e.flags||1&Ox(e)||rT(e)||$T(e))}function Qa(e){return 6256&e.flags?hu(e,"resolvedExports"):1536&e.flags?Ya(e):e.exports||x}function Ya(e){const t=$o(e);if(!t.resolvedExports){const{exports:n,typeOnlyExportStarMap:r}=es(e);t.resolvedExports=n,t.typeOnlyExportStarMap=r}return t.resolvedExports}function Za(e,t,n,r){t&&t.forEach((t,i)=>{if("default"===i)return;const o=e.get(i);if(o){if(n&&r&&o&&Pa(o)!==Pa(t)){const e=n.get(i);e.exportsWithDuplicate?e.exportsWithDuplicate.push(r):e.exportsWithDuplicate=[r]}}else e.set(i,t),n&&r&&n.set(i,{specifierText:tp(r.moduleSpecifier)})})}function es(e){const t=[];let n;const r=new Set,i=function e(i,o,a){!a&&(null==i?void 0:i.exports)&&i.exports.forEach((e,t)=>r.add(t));if(!(i&&i.exports&&he(t,i)))return;const s=new Map(i.exports),c=i.exports.get("__export");if(c){const t=ad(),n=new Map;if(c.declarations)for(const r of c.declarations){const i=Ba(r,r.moduleSpecifier);Za(t,e(i,r,a||r.isTypeOnly),n,r)}n.forEach(({exportsWithDuplicate:e},t)=>{if("export="!==t&&e&&e.length&&!s.has(t))for(const r of e)io.add(Vp(r,Ca.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,n.get(t).specifierText,Cc(t)))}),Za(s,t)}(null==o?void 0:o.isTypeOnly)&&(n??(n=new Map),s.forEach((e,t)=>n.set(t,o)));return s}(e=Ua(e))||x;return n&&r.forEach(e=>n.delete(e)),{exports:i,typeOnlyExportStarMap:n}}function ts(e){let t;return e&&e.mergeId&&(t=Ri[e.mergeId])?t:e}function rs(e){return ts(e.symbol&&Su(e.symbol))}function is(e){return vu(e)?rs(e):void 0}function as(e){return ts(e.parent&&Su(e.parent))}function ss(e){var t,n;return(219===(null==(t=e.valueDeclaration)?void 0:t.kind)||218===(null==(n=e.valueDeclaration)?void 0:n.kind))&&is(e.valueDeclaration.parent)||e}function cs(t,n,r){const i=as(t);if(i&&!(262144&t.flags))return l(i);const o=$(t.declarations,e=>{if(!pp(e)&&e.parent){if(Bs(e.parent))return rs(e.parent);if(cE(e.parent)&&e.parent.parent&&Ua(rs(e.parent.parent))===t)return rs(e.parent.parent)}if(kP(e)&&yP(e.parent)&&64===e.parent.operatorToken.kind&&qx(e.parent.left)&&Cb(e.parent.left.expression))return ug(e.parent.left)||lg(e.parent.left.expression)?rs(Dd(e)):(SL(e.parent.left.expression),Ho(e.parent.left.expression).resolvedSymbol)});if(!g(o))return;const a=$(o,e=>_s(e,t)?e:void 0);let s=[],c=[];for(const e of a){const[t,...n]=l(e);s=pe(s,t),c=ge(c,n)}return ne(s,c);function l(i){const o=$(i.declarations,_),a=n&&function(t,n){const r=Dd(n),i=KB(r),o=$o(t);let a;if(o.extendedContainersByFile&&(a=o.extendedContainersByFile.get(i)))return a;if(r&&r.imports){for(const e of r.imports){if(my(e))continue;const r=Ba(n,e,!0);r&&(_s(r,t)&&(a=pe(a,r)))}if(g(a))return(o.extendedContainersByFile||(o.extendedContainersByFile=new Map)).set(i,a),a}if(o.extendedContainers)return o.extendedContainers;const s=e.getSourceFiles();for(const e of s){if(!tO(e))continue;const n=rs(e);_s(n,t)&&(a=pe(a,n))}return o.extendedContainers=a||p}(t,n),s=function(e,t){const n=!!g(e.declarations)&&Ne(e.declarations);if(111551&t&&n&&n.parent&&eE(n.parent)&&(nP(n)&&n===n.parent.initializer||ID(n)&&n===n.parent.type))return rs(n.parent)}(i,r);if(n&&i.flags&Ns(r)&&Ds(i,n,1920,!1))return pe(ne(ne([i],o),a),s);const c=!(i.flags&Ns(r))&&788968&i.flags&&524288&U_(i).flags&&111551===r?ws(n,e=>md(e,e=>{if(e.flags&Ns(r)&&Kl(e)===U_(i))return e})):void 0;let l=c?[c,...o,i]:[...o,i];return l=pe(l,s),l=ge(l,a),l}function _(e){return i&&ls(e,i)}}function ls(e,t){const n=Ms(e),r=n&&n.exports&&n.exports.get("export=");return r&&us(r,t)?n:void 0}function _s(e,t){if(e===as(t))return t;const n=e.exports&&e.exports.get("export=");if(n&&us(n,t))return e;const r=Qa(e),i=r.get(t.escapedName);return i&&us(i,t)?i:md(r,e=>{if(us(e,t))return e})}function us(e,t){if(ts(Pa(ts(e)))===ts(Pa(ts(t))))return e}function ps(e){return ts(e&&!!(1048576&e.flags)&&e.exportSymbol||e)}function fs(e,t){return!!(111551&e.flags||2097152&e.flags&&111551&Fa(e,!t))}function ms(e){var t;const n=new c(Be,e);return _++,n.id=_,null==(t=cr)||t.recordType(n),n}function gs(e,t){const n=ms(e);return n.symbol=t,n}function hs(e){return new c(Be,e)}function ys(e,t,n=0,r){!function(e,t){const n=`${e},${t??""}`;xt.has(n)&&Tn.fail(`Duplicate intrinsic type name ${e}${t?` (${t})`:""}; you may need to pass a name to createIntrinsicType.`);xt.add(n)}(t,r);const i=ms(e);return i.intrinsicName=t,i.debugIntrinsicName=r,i.objectFlags=52953088|n,i}function vs(e,t){const n=gs(524288,t);return n.objectFlags=e,n.members=void 0,n.properties=void 0,n.callSignatures=void 0,n.constructSignatures=void 0,n.indexInfos=void 0,n}function bs(e){return gs(262144,e)}function xs(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)&&35!==e.charCodeAt(2)}function Ss(e){let t;return e.forEach((e,n)=>{ks(e,n)&&(t||(t=[])).push(e)}),t||p}function ks(e,t){return!xs(t)&&fs(e)}function Ts(e,t,n,r,i){const o=e;return o.members=t,o.properties=p,o.callSignatures=n,o.constructSignatures=r,o.indexInfos=i,t!==x&&(o.properties=Ss(t)),o}function Cs(e,t,n,r,i){return Ts(vs(16,e),t,n,r,i)}function ws(e,t){let n;for(let r=e;r;r=r.parent){if(bu(r)&&r.locals&&!of(r)&&(n=t(r.locals,void 0,!0,r)))return n;switch(r.kind){case 307:if(!af(r))break;case 267:const e=rs(r);if(n=t((null==e?void 0:e.exports)||x,void 0,!0,r))return n;break;case 263:case 231:case 264:let i;if((rs(r).members||x).forEach((e,t)=>{788968&e.flags&&(i||(i=ad())).set(t,e)}),i&&(n=t(i,void 0,!1,r)))return n}}return t(_e,void 0,!0)}function Ns(e){return 111551===e?111551:1920}function Ds(e,t,n,r,i=new Map){if(!e||function(e){if(e.declarations&&e.declarations.length){for(const t of e.declarations)switch(t.kind){case 172:case 174:case 177:case 178:continue;default:return!1}return!0}return!1}(e))return;const o=$o(e),a=o.accessibleChainCache||(o.accessibleChainCache=new Map),s=ws(t,(e,t,n,r)=>r),c=`${r?0:1}|${s&&KB(s)}|${n}`;if(a.has(c))return a.get(c);const l=GB(e);let _=i.get(l);_||i.set(l,_=[]);const u=ws(t,d);return a.set(c,u),u;function d(n,i,o){if(!he(_,n))return;const a=function(n,i,o){if(f(n.get(e.escapedName),void 0,i))return[e];const a=md(n,n=>{if(2097152&n.flags&&"export="!==n.escapedName&&"default"!==n.escapedName&&!(Lx(n)&&t&&tO(Dd(t)))&&(!r||ee(n.declarations,Om))&&(!o||!ee(n.declarations,Im))&&(i||!id(n,281))){const e=m(n,Ea(n),i);if(e)return e}if(n.escapedName===e.escapedName&&n.exportSymbol&&f(ts(n.exportSymbol),void 0,i))return[e]});return a||(n===_e?m(fe,fe,i):void 0)}(n,i,o);return _.pop(),a}function p(e,n){return!Ps(e,t,n)||!!Ds(e.parent,t,Ns(n),r,i)}function f(t,r,i){return(e===(r||t)||ts(e)===ts(r||t))&&!ee(t.declarations,Bs)&&(i||p(ts(t),n))}function m(e,t,r){if(f(e,t,r))return[e];const i=Qa(t),o=i&&d(i,!0);return o&&p(e,Ns(n))?[e].concat(o):void 0}}function Ps(e,t,n){let r=!1;return ws(t,t=>{let i=ts(t.get(e.escapedName));if(!i)return!1;if(i===e)return!0;const o=2097152&i.flags&&!id(i,281);i=o?Ea(i):i;return!!((o?Fa(i):i.flags)&n)&&(r=!0,!0)}),r}function As(e,t){return 0===Ls(e,t,111551,!1,!0).accessibility}function Is(e,t,n){return 0===Ls(e,t,n,!1,!1).accessibility}function Os(e,t,n,r,i,o){if(!g(e))return;let a,s=!1;for(const c of e){const e=Ds(c,t,r,!1);if(e){a=c;const t=zs(e[0],i);if(t)return t}if(o&&ee(c.declarations,Bs)){if(i){s=!0;continue}return{accessibility:0}}const l=Os(cs(c,t,r),t,n,n===c?Ns(r):r,i,o);if(l)return l}return s?{accessibility:0}:a?{accessibility:1,errorSymbolName:Hs(n,t,r),errorModuleName:a!==n?Hs(a,t,1920):void 0}:void 0}function js(e,t,n,r){return Ls(e,t,n,r,!0)}function Ls(e,t,n,r,i){if(e&&t){const o=Os([e],t,e,n,r,i);if(o)return o;const a=h(e.declarations,Ms);if(a){if(a!==Ms(t))return{accessibility:2,errorSymbolName:Hs(e,t,n),errorModuleName:Hs(a),errorNode:zm(t)?t:void 0}}return{accessibility:1,errorSymbolName:Hs(e,t,n)}}return{accessibility:0}}function Ms(e){const t=xc(e,Rs);return t&&rs(t)}function Rs(e){return pp(e)||307===e.kind&&af(e)}function Bs(e){return fp(e)||307===e.kind&&af(e)}function zs(e,t){let n;if(T(O(e.declarations,e=>80!==e.kind),function(t){var n,i;if(!sc(t)){const o=sa(t);if(o&&!Wv(o,32)&&sc(o.parent))return r(t,o);if(eE(t)&&LP(t.parent.parent)&&!Wv(t.parent.parent,32)&&sc(t.parent.parent.parent))return r(t,t.parent.parent);if(Ap(t)&&!Wv(t,32)&&sc(t.parent))return r(t,t);if(eP(t)){if(2097152&e.flags&&zm(t)&&(null==(n=t.parent)?void 0:n.parent)&&eE(t.parent.parent)&&(null==(i=t.parent.parent.parent)?void 0:i.parent)&&LP(t.parent.parent.parent.parent)&&!Wv(t.parent.parent.parent.parent,32)&&t.parent.parent.parent.parent.parent&&sc(t.parent.parent.parent.parent.parent))return r(t,t.parent.parent.parent.parent);if(2&e.flags){const e=xc(t,LP);return!!Wv(e,32)||!!sc(e.parent)&&r(t,e)}}return!1}return!0}))return{accessibility:0,aliasesToMakeVisible:n};function r(e,r){return t&&(Ho(e).isVisible=!0,n=ye(n,r)),!0}}function qs(e){let t;return t=186===e.parent.kind||233===e.parent.kind&&!Af(e.parent)||167===e.parent.kind||182===e.parent.kind&&e.parent.parameterName===e?1160127:166===e.kind||211===e.kind||271===e.parent.kind||166===e.parent.kind&&e.parent.left===e||211===e.parent.kind&&e.parent.expression===e||212===e.parent.kind&&e.parent.expression===e?1920:788968,t}function Vs(e,t,n=!0){const r=qs(e),i=wb(e),o=Le(t,i.escapedText,r,void 0,!1);return o&&262144&o.flags&&788968&r||!o&&Tv(i)&&0===js(rs(lm(i,!1,!1)),i,r,!1).accessibility?{accessibility:0}:o?zs(o,n)||{accessibility:1,errorSymbolName:tp(i),errorNode:i}:{accessibility:3,errorSymbolName:tp(i),errorNode:i}}function Hs(e,t,n,r=4,i){let o=70221824;2&r&&(o|=128),1&r&&(o|=512),8&r&&(o|=16384),32&r&&(o|=134217728),16&r&&(o|=1073741824);const a=4&r?se.symbolToNode:se.symbolToEntityName;return i?s(i).getText():yd(s);function s(r){const i=a(e,n,t,o),s=307===(null==t?void 0:t.kind)?vU():yU(),c=t&&Dd(t);return s.writeNode(4,i,c,r),r}}function Ks(e,t,n=0,r,i){return i?o(i).getText():yd(o);function o(i){let o;o=262144&n?1===r?185:184:1===r?180:179;const a=se.signatureToSignatureDeclaration(e,o,t,70222336|Zs(n)),s=bU(),c=t&&Dd(t);return s.writeNode(4,a,c,Qy(i)),i}}function Gs(e,t,n=1064960,r=Xy("")){const i=k.noErrorTruncation||1&n,o=se.typeToTypeNode(e,t,70221824|Zs(n)|(i?1:0));if(void 0===o)return Tn.fail("should always get typenode");const a=e!==Nt?yU():hU(),s=t&&Dd(t);a.writeNode(4,o,s,r);const c=r.getText(),l=i?2*rd:2*nd;return l&&c&&c.length>=l?c.substr(0,l-3)+"...":c}function Xs(e,t){let n=Ys(e.symbol)?Gs(e,e.symbol.valueDeclaration):Gs(e),r=Ys(t.symbol)?Gs(t,t.symbol.valueDeclaration):Gs(t);return n===r&&(n=Qs(e),r=Qs(t)),[n,r]}function Qs(e){return Gs(e,void 0,64)}function Ys(e){return e&&!!e.valueDeclaration&&nu(e.valueDeclaration)&&!CS(e.valueDeclaration)}function Zs(e=0){return 848330095&e}function ec(e){return!!(e.symbol&&32&e.symbol.flags&&(e===L_(e.symbol)||524288&e.flags&&16777216&Ox(e)))}function tc(e,t,n=16384,r){return r?i(r).getText():yd(i);function i(r){const i=70222336|Zs(n),o=se.typePredicateToTypePredicateNode(e,t,i),a=yU(),s=t&&Dd(t);return a.writeNode(4,o,s,r),r}}function nc(e){return 2===e?"private":4===e?"protected":"public"}function rc(e){return e&&e.parent&&268===e.parent.kind&&bp(e.parent.parent)}function ic(e){return 307===e.kind||pp(e)}function oc(e,t){const n=$o(e).nameType;if(n){if(384&n.flags){const e=""+n.value;return Es(e,OS(k))||tC(e)?tC(e)&&ln(e,"-")?`[${e}]`:e:`"${My(e,34)}"`}if(8192&n.flags)return`[${ac(n.symbol,t)}]`}}function ac(e,t){var n;if((null==(n=null==t?void 0:t.remappedSymbolReferences)?void 0:n.has(GB(e)))&&(e=t.remappedSymbolReferences.get(GB(e))),t&&"default"===e.escapedName&&!(16384&t.flags)&&(!(16777216&t.flags)||!e.declarations||t.enclosingDeclaration&&xc(e.declarations[0],ic)!==xc(t.enclosingDeclaration,ic)))return"default";if(e.declarations&&e.declarations.length){let n=v(e.declarations,e=>jc(e)?e:void 0);const r=n&&jc(n);if(n&&r){if(oP(n)&&pg(n))return Dc(e);if(pD(r)&&!(4096&xx(e))){const n=$o(e).nameType;if(n&&384&n.flags){const n=oc(e,t);if(void 0!==n)return n}}return Rp(r)}if(n||(n=e.declarations[0]),n.parent&&260===n.parent.kind)return Rp(n.parent.name);switch(n.kind){case 231:case 218:case 219:return!t||t.encounteredError||131072&t.flags||(t.encounteredError=!0),231===n.kind?"(Anonymous class)":"(Anonymous function)"}}const r=oc(e,t);return void 0!==r?r:Dc(e)}function sc(e){if(e){const t=Ho(e);return void 0===t.isVisible&&(t.isVisible=!!function(){switch(e.kind){case 338:case 346:case 340:return!!(e.parent&&e.parent.parent&&e.parent.parent.parent&&QE(e.parent.parent.parent));case 208:return sc(e.parent.parent);case 260:if(O_(e.name)&&!e.name.elements.length)return!1;case 267:case 263:case 264:case 265:case 262:case 266:case 271:if(bp(e))return!0;const t=hc(e);return 32&Xz(e)||271!==e.kind&&307!==t.kind&&33554432&t.flags?sc(t):of(t);case 172:case 171:case 177:case 178:case 174:case 173:if(Vv(e,6))return!1;case 176:case 180:case 179:case 181:case 169:case 268:case 184:case 185:case 187:case 183:case 188:case 189:case 192:case 193:case 196:case 202:return sc(e.parent);case 273:case 274:case 276:return!1;case 168:case 307:case 270:return!0;default:return!1}}()),t.isVisible}return!1}function cc(e,t){let n,r,i;return e.parent&&277===e.parent.kind?n=Le(e,e,2998271,void 0,!1):281===e.parent.kind&&(n=Ta(e.parent,2998271)),n&&(i=new Set,i.add(GB(n)),function e(n){h(n,n=>{const o=sa(n)||n;if(t?Ho(n).isVisible=!0:(r=r||[],he(r,o)),Mm(n)){const t=wb(n.moduleReference),r=Le(n,t.escapedText,901119,void 0,!1);r&&i&&X(i,GB(r))&&e(r.declarations)}})}(n.declarations)),r}function _c(e,t){const n=uc(e,t);if(n>=0){const{length:e}=Fi;for(let t=n;t=Oi;n--){if(pc(Fi[n],Ii[n]))return-1;if(Fi[n]===e&&Ii[n]===t)return n}return-1}function pc(e,t){switch(t){case 0:return!!$o(e).type;case 2:return!!$o(e).declaredType;case 1:return!!e.resolvedBaseConstructorType;case 3:return!!e.resolvedReturnType;case 4:return!!e.immediateBaseConstraint;case 5:return!!e.resolvedTypeArguments;case 6:return!!e.baseTypesResolved;case 7:return!!$o(e).writeType;case 8:return void 0!==Ho(e).parameterInitializerContainsUndefined}return Tn.assertNever(t)}function mc(){return Fi.pop(),Ii.pop(),Ai.pop()}function hc(e){return xc(py(e),e=>{switch(e.kind){case 260:case 261:case 276:case 275:case 274:case 273:return!1;default:return!0}}).parent}function yc(e,t){const n=Zp(e,t);return n?Kl(n):void 0}function vc(e,t){var n;let r;return yc(e,t)||(r=null==(n=Cf(e,t))?void 0:n.type)&&Xc(r,!0,!0)}function Sc(e){return e&&!!(1&e.flags)}function Pc(e){return e===wt||!!(1&e.flags&&e.aliasSymbol)}function Ec(e,t){if(0!==t)return Qc(e,!1,t);const n=rs(e);return n&&$o(n).type||Qc(e,!1,t)}function Ac(e,t,n){if(131072&(e=qN(e,e=>!(98304&e.flags))).flags)return wn;if(1048576&e.flags)return WN(e,e=>Ac(e,t,n));let r=dv(M(t,Bv));const i=[],o=[];for(const t of Hd(e)){const e=Jv(t,8576);zS(e,r)||6&Sx(t)||!mx(t)?o.push(e):i.push(t)}if(Jb(e)||zb(r)){if(o.length&&(r=dv([r,...o])),131072&r.flags)return e;const t=(Lr||(Lr=sy("Omit",2,!0)||ht),Lr===ht?void 0:Lr);return t?ih(t,[e,r]):wt}const a=ad();for(const e of i)a.set(e.escapedName,gx(e,!1));const s=Cs(n,a,p,p,bf(e));return s.objectFlags|=4194304,s}function Oc(e){return!!(465829888&e.flags)&&oL(op(e)||Ft,32768)}function Lc(e){return hN(JN(e,Oc)?WN(e,e=>465829888&e.flags?sp(e):e):e,524288)}function Bc(e,t){const n=zc(e);return n?qD(n,t):t}function zc(e){const t=function(e){const t=e.parent.parent;switch(t.kind){case 208:case 303:return zc(t);case 209:return zc(e.parent);case 260:return t.initializer;case 226:return t.right}}(e);if(t&&Ug(t)&&t.flowNode){const n=qc(e);if(n){const r=vI(kI.createStringLiteral(n),e),i=X_(t)?t:kI.createParenthesizedExpression(t),o=vI(kI.createElementAccessExpression(i,r),e);return qT(r,o),qT(o,e),i!==t&&qT(i,o),o.flowNode=t.flowNode,o}}}function qc(e){const t=e.parent;return 208===e.kind&&206===t.kind?Uc(e.propertyName||e.name):303===e.kind||304===e.kind?Uc(e.name):""+t.elements.indexOf(e)}function Uc(e){const t=Bv(e);return 384&t.flags?""+t.value:void 0}function Vc(e){const t=e.dotDotDotToken?32:0,n=Ec(e.parent.parent,t);return n&&$c(e,n,!1)}function $c(e,t,n){if(Sc(t))return t;const r=e.parent;let i;if(V&&33554432&e.flags&&dy(e)?t=jC(t):V&&r.parent.initializer&&!mN(PN(r.parent.initializer),65536)&&(t=hN(t,524288)),206===r.kind)if(e.dotDotDotToken){if(2&(t=Fp(t)).flags||!vA(t))return So(e,Ca.Rest_types_may_only_be_created_from_object_types),wt;const n=[];for(const e of r.elements)e.dotDotDotToken||n.push(e.propertyName||e.name);i=Ac(t,n,e.symbol)}else{const n=e.propertyName||e.name;i=Bc(e,Hb(t,Bv(n),32,n))}else{const o=gR(65|(e.dotDotDotToken?0:128),t,At,r),a=r.elements.indexOf(e);if(e.dotDotDotToken){const e=WN(t,e=>58982400&e.flags?sp(e):e);i=zN(e,$T)?WN(e,e=>Yy(e,a)):jy(o)}else if(lT(t)){i=Bc(e,Gb(t,Nx(a),32|(n||rA(e)?16:0),e.name)||wt)}else i=o}return e.initializer?Pv(dc(e))?V&&!mN(TL(e,0),16777216)?Lc(i):i:CL(e,dv([Lc(i),TL(e,0)],2)):i}function Hc(e){const t=dl(e);if(t)return Mx(t)}function Gc(e){const t=mh(e,!0);return 209===t.kind&&0===t.elements.length}function Xc(e,t=!1,n=!0){return V&&n?DC(e,t):e}function Qc(e,t,n){if(eE(e)&&249===e.parent.parent.kind){const t=ib(ZA(zL(e.parent.parent.expression,n)));return 4456448&t.flags?ob(t):Jt}if(eE(e)&&250===e.parent.parent.kind){return mR(e.parent.parent)||St}if(O_(e.parent))return Vc(e);const r=yD(e)&&!Qv(e)||hD(e)||LF(e),i=t&&dC(e),o=wl(e);if(dp(e))return o?Sc(o)||o===Ft?o:wt:Z?Ft:St;if(o)return Xc(o,r,i);if((Q||zm(e))&&eE(e)&&!O_(e.name)&&!(32&Xz(e))&&!(33554432&e.flags)){if(!(6&Qz(e))&&(!e.initializer||function(e){const t=mh(e,!0);return 106===t.kind||80===t.kind&&Xw(t)===ue}(e.initializer)))return kt;if(e.initializer&&Gc(e.initializer))return ir}if(mD(e)){if(!e.symbol)return;const t=e.parent;if(178===t.kind&&mu(t)){const n=id(rs(e.parent),177);if(n){const r=$f(n),i=Fz(t);return i&&e===i?(Tn.assert(!i.type),Kl(r.thisParameter)):mm(r)}}const n=function(e,t){const n=Hf(e);if(!n)return;const r=e.parameters.indexOf(t);return t.dotDotDotToken?fj(n,r):dj(n,r)}(t,e);if(n)return n;const r="this"===e.symbol.escapedName?nF(t):rF(e);if(r)return Xc(r,!1,i)}if(Uu(e)&&e.initializer){if(zm(e)&&!mD(e)){const t=ol(e,rs(e),ng(e));if(t)return t}return Xc(CL(e,TL(e,n)),r,i)}if(yD(e)&&(Q||zm(e))){if(Hv(e)){const t=O(e.parent.members,xD),n=t.length?function(e,t){const n=ln(e.escapedName,"__#")?aw.createPrivateIdentifier(e.escapedName.split("@")[1]):Cc(e.escapedName);for(const r of t){const t=aw.createPropertyAccessExpression(aw.createThis(),n);qT(t.expression,t),qT(t,r),t.flowNode=r.returnFlowNode;const i=nl(t,e);if(!Q||i!==kt&&i!==ir||So(e.valueDeclaration,Ca.Member_0_implicitly_has_an_1_type,Hs(e),Gs(i)),!zN(i,YA))return rR(i)}}(e.symbol,t):128&rb(e)?$k(e.symbol):void 0;return n&&Xc(n,!0,i)}{const t=IC(e.parent),n=t?tl(e.symbol,t):128&rb(e)?$k(e.symbol):void 0;return n&&Xc(n,!0,i)}}return RE(e)?Wt:O_(e.name)?fl(e.name,!1,!0):void 0}function Yc(e){if(e.valueDeclaration&&yP(e.valueDeclaration)){const t=$o(e);return void 0===t.isConstructorDeclaredProperty&&(t.isConstructorDeclaredProperty=!1,t.isConstructorDeclaredProperty=!!el(e)&&T(e.declarations,t=>yP(t)&&SF(t)&&(212!==t.left.kind||Kh(t.left.argumentExpression))&&!cl(void 0,t,e,t))),t.isConstructorDeclaredProperty}return!1}function Zc(e){const t=e.valueDeclaration;return t&&yD(t)&&!Pv(t)&&!t.initializer&&(Q||zm(t))}function el(e){if(e.declarations)for(const t of e.declarations){const e=lm(t,!1,!1);if(e&&(176===e.kind||RO(e)))return e}}function tl(e,t){const n=ln(e.escapedName,"__#")?aw.createPrivateIdentifier(e.escapedName.split("@")[1]):Cc(e.escapedName),r=aw.createPropertyAccessExpression(aw.createThis(),n);qT(r.expression,r),qT(r,t),r.flowNode=t.returnFlowNode;const i=nl(r,e);return!Q||i!==kt&&i!==ir||So(e.valueDeclaration,Ca.Member_0_implicitly_has_an_1_type,Hs(e),Gs(i)),zN(i,YA)?void 0:rR(i)}function nl(e,t){const n=(null==t?void 0:t.valueDeclaration)&&(!Zc(t)||128&rb(t.valueDeclaration))&&$k(t)||At;return qD(e,kt,n)}function rl(e,t){const n=rg(e.valueDeclaration);if(n){const t=zm(n)?ul(n):void 0;if(t&&t.typeExpression)return Mx(t.typeExpression);return e.valueDeclaration&&ol(e.valueDeclaration,e,n)||JT(SL(n))}let r,i=!1,o=!1;if(Yc(e)&&(r=tl(e,el(e))),!r){let n;if(e.declarations){let a;for(const r of e.declarations){const s=yP(r)||oP(r)?r:qx(r)?yP(r.parent)?r.parent:r:void 0;if(!s)continue;const c=qx(s)?Sg(s):dg(s);(4===c||yP(s)&&SF(s,c))&&(_l(s)?i=!0:o=!0),oP(s)||(a=cl(a,s,e,r)),a||(n||(n=[])).push(yP(s)||oP(s)?ll(e,t,s,c):Zt)}r=a}if(!r){if(!g(n))return wt;let t=i&&e.declarations?function(e,t){return Tn.assert(e.length===t.length),e.filter((e,n)=>{const r=t[n],i=yP(r)?r:yP(r.parent)?r.parent:void 0;return i&&_l(i)})}(n,e.declarations):void 0;if(o){const n=$k(e);n&&((t||(t=[])).push(n),i=!0)}r=dv(ee(t,e=>!!(-98305&e.flags))?t:n)}}const a=YC(Xc(r,!1,o&&!i));return e.valueDeclaration&&zm(e.valueDeclaration)&&qN(a,e=>!!(-98305&e.flags))===Zt?(tw(e.valueDeclaration,St),St):a}function ol(e,t,n){var r,i;if(!zm(e)||!n||!nP(n)||n.properties.length)return;const o=ad();for(;yP(e)||rP(e);){const t=is(e);(null==(r=null==t?void 0:t.exports)?void 0:r.size)&&Uo(o,t.exports),e=yP(e)?e.parent:e.parent.parent}const a=is(e);(null==(i=null==a?void 0:a.exports)?void 0:i.size)&&Uo(o,a.exports);const s=Cs(t,o,p,p,p);return s.objectFlags|=4096,s}function cl(e,t,n,r){var i;const o=Pv(t.parent);if(o){const t=YC(Mx(o));if(!e)return t;Pc(e)||Pc(t)||PS(e,t)||oR(void 0,e,r,t)}if(null==(i=n.parent)?void 0:i.valueDeclaration){const e=ss(n.parent);if(e.valueDeclaration){const t=Pv(e.valueDeclaration);if(t){const e=Zp(Mx(t),n.escapedName);if(e)return Gl(e)}}}return e}function ll(e,t,n,r){if(oP(n)){if(t)return Kl(t);const e=SL(n.arguments[2]),r=yc(e,"value");if(r)return r;const i=yc(e,"get");if(i){const e=eO(i);if(e)return mm(e)}const o=yc(e,"set");if(o){const e=eO(o);if(e)return xj(e)}return St}if(function(e,t){return rP(e)&&110===e.expression.kind&&GI(t,t=>Zw(e,t))}(n.left,n.right))return St;const i=1===r&&(rP(n.left)||iP(n.left))&&(ug(n.left.expression)||QN(n.left.expression)&&lg(n.left.expression)),o=t?Kl(t):i?vx(SL(n.right)):JT(SL(n.right));if(524288&o.flags&&2===r&&"export="===e.escapedName){const n=Ud(o),r=ad();hd(n.members,r);const i=r.size;t&&!t.exports&&(t.exports=ad()),(t||e).exports.forEach((e,t)=>{var n;const i=r.get(t);if(!i||i===e||2097152&e.flags)r.set(t,e);else if(111551&e.flags&&111551&i.flags){if(e.valueDeclaration&&i.valueDeclaration&&Dd(e.valueDeclaration)!==Dd(i.valueDeclaration)){const t=Cc(e.escapedName),r=(null==(n=dt(i.valueDeclaration,Ic))?void 0:n.name)||i.valueDeclaration;ST(So(e.valueDeclaration,Ca.Duplicate_identifier_0,t),Vp(r,Ca._0_was_also_declared_here,t)),ST(So(r,Ca.Duplicate_identifier_0,t),Vp(e.valueDeclaration,Ca._0_was_also_declared_here,t))}const o=Eo(e.flags|i.flags,t);o.links.type=dv([Kl(e),Kl(i)]),o.valueDeclaration=i.valueDeclaration,o.declarations=ne(i.declarations,e.declarations),r.set(t,o)}else r.set(t,Jo(e,i))});const a=Cs(i!==r.size?void 0:n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);if(i===r.size&&(o.aliasSymbol&&(a.aliasSymbol=o.aliasSymbol,a.aliasTypeArguments=o.aliasTypeArguments),4&Ox(o))){a.aliasSymbol=o.symbol;const e=Hg(o);a.aliasTypeArguments=g(e)?e:void 0}return a.objectFlags|=Bg([o])|20608&Ox(o),a.symbol&&32&a.symbol.flags&&o===L_(a.symbol)&&(a.objectFlags|=16777216),a}return pT(o)?(tw(n,rr),rr):o}function _l(e){const t=lm(e,!1,!1);return 176===t.kind||262===t.kind||218===t.kind&&!Tg(t.parent)}function pl(e,t,n){if(e.initializer){return Xc(CL(e,TL(e,n?0:1,O_(e.name)?fl(e.name,!0,!1):Ft)))}return O_(e.name)?fl(e.name,t,n):(n&&!Cl(e)&&tw(e,St),t?Dt:St)}function fl(e,t=!1,n=!1){return 206===e.kind?function(e,t,n){const r=ad();let i,o=131200;h(e.elements,e=>{const a=e.propertyName||e.name;if(e.dotDotDotToken)return void(i=mg(Jt,St,!1));const s=Bv(a);if(!kC(s))return void(o|=512);const c=TC(s),l=Eo(4|(e.initializer?16777216:0),c);l.links.type=pl(e,t,n),l.links.bindingElement=e,r.set(l.escapedName,l)});const a=Cs(void 0,r,p,p,i?[i]:p);return a.objectFlags|=o,t&&(a.pattern=e,a.objectFlags|=131072),a}(e,t,n):function(e,t,n){const r=e.elements,i=Pe(r),o=i&&208===i.kind&&i.dotDotDotToken?i:void 0;if(0===r.length||1===r.length&&o)return P>=2?Oy(St):rr;const a=M(r,e=>TP(e)?St:pl(e,t,n)),s=D(r,e=>!(e===o||TP(e)||rA(e)),r.length-1)+1;let c=Vy(a,M(r,(e,t)=>e===o?4:t>=s?2:1));return t&&(c=Wg(c),c.pattern=e,c.objectFlags|=131072),c}(e,t,n)}function gl(e,t){return kl(Qc(e,!0,0),e,t)}function hl(e){const t=Ho(e);if(!t.resolvedType){const n=Eo(4096,"__importAttributes"),r=ad();h(e.elements,e=>{const t=Eo(4,PC(e));t.parent=n,t.links.type=function(e){return vx(SL(e.value))}(e),t.links.target=t,r.set(t.escapedName,t)});const i=Cs(n,r,p,p,p);i.objectFlags|=262272,t.resolvedType=i}return t.resolvedType}function vl(e){const t=is(e),n=(r=!1,lr||(lr=ay("SymbolConstructor",r)));var r;return n&&t&&t===n}function kl(e,t,n){return e?(4096&e.flags&&vl(t.parent)&&(e=Ex(t)),n&&nw(t,e),8192&e.flags&&(eP(t)||!t.type)&&e.symbol!==rs(t)&&(e=Qt),YC(e)):(e=mD(t)&&t.dotDotDotToken?rr:St,n&&(Cl(t)||tw(t,e)),e)}function Cl(e){const t=py(e);return lM(169===t.kind?t.parent:t)}function wl(e){const t=Pv(e);if(t)return Mx(t)}function Al(e,t){const n=$o(e);if(!n.type){const r=function(e,t){if(4194304&e.flags)return function(e){const t=U_(as(e));return t.typeParameters?qg(t,M(t.typeParameters,e=>St)):t}(e);if(e===Se)return St;if(134217728&e.flags&&e.valueDeclaration){const t=rs(Dd(e.valueDeclaration)),n=Eo(t.flags,"exports");n.declarations=t.declarations?t.declarations.slice():[],n.parent=e,n.links.target=t,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),t.members&&(n.members=new Map(t.members)),t.exports&&(n.exports=new Map(t.exports));const r=ad();return r.set("exports",n),Cs(e,r,p,p,p)}Tn.assertIsDefined(e.valueDeclaration);const n=e.valueDeclaration;if(QE(n)&&sf(n))return n.statements.length?YC(JT(zL(n.statements[0].expression))):wn;if(k_(n))return Ll(e);if(!_c(e,0))return 512&e.flags&&!(67108864&e.flags)?Jl(e):eP(n)&&1===t?wt:Ul(e);let r;if(277===n.kind)r=kl(wl(n)||SL(n.expression),n);else if(yP(n)||zm(n)&&(oP(n)||(rP(n)||hg(n))&&yP(n.parent)))r=rl(e);else if(rP(n)||iP(n)||QN(n)||Ku(n)||AN(n)||rE(n)||nE(n)||bD(n)&&!Kf(n)||vD(n)||QE(n)){if(9136&e.flags)return Jl(e);r=yP(n.parent)?rl(e):wl(n)||St}else if(HE(n))r=wl(n)||PL(n);else if(RE(n))r=wl(n)||SA(n);else if(KE(n))r=wl(n)||DL(n.name,0);else if(Kf(n))r=wl(n)||EL(n,0);else if(mD(n)||yD(n)||hD(n)||eE(n)||eP(n)||Rl(n))r=gl(n,!0);else if(aE(n))r=Jl(e);else{if(!XE(n))return Tn.fail("Unhandled declaration kind! "+Tn.formatSyntaxKind(n.kind)+" for "+Tn.formatSymbol(e));r=zl(e)}if(!mc())return 512&e.flags&&!(67108864&e.flags)?Jl(e):eP(n)&&1===t?r:Ul(e);return r}(e,t);return n.type||function(e){let t=e.valueDeclaration;return!!t&&(eP(t)&&(t=dc(t)),!!mD(t)&&NS(t.parent))}(e)||t||(n.type=r),r}return n.type}function Ol(e){if(e)switch(e.kind){case 177:return Fv(e);case 178:return Iv(e);case 172:Tn.assert(Qv(e));return Pv(e)}}function jl(e){const t=Ol(e);return t&&Mx(t)}function Ll(e){const t=$o(e);if(!t.type){if(!_c(e,0))return wt;const n=id(e,177),r=id(e,178),i=dt(id(e,172),T_);let o=n&&zm(n)&&Hc(n)||jl(n)||jl(r)||jl(i)||n&&n.body&&zj(n)||i&&i.initializer&&gl(i,!0);o||(r&&!lM(r)?To(Q,r,Ca.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Hs(e)):n&&!lM(n)?To(Q,n,Ca.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Hs(e)):i&&!lM(i)&&To(Q,i,Ca.Member_0_implicitly_has_an_1_type,Hs(e),"any"),o=St),mc()||(Ol(n)?So(n,Ca._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Hs(e)):Ol(r)||Ol(i)?So(r,Ca._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Hs(e)):n&&Q&&So(n,Ca._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Hs(e)),o=St),t.type??(t.type=o)}return t.type}function Ml(e){const t=$o(e);if(!t.writeType){if(!_c(e,7))return wt;const n=id(e,178)??dt(id(e,172),T_);let r=jl(n);mc()||(Ol(n)&&So(n,Ca._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Hs(e)),r=St),t.writeType??(t.writeType=r||Ll(e))}return t.writeType}function Bl(e){const t=N_(L_(e));return 8650752&t.flags?t:2097152&t.flags?C(t.types,e=>!!(8650752&e.flags)):void 0}function Jl(e){let t=$o(e);const n=t;if(!t.type){const r=e.valueDeclaration&&JO(e.valueDeclaration,!1);if(r){const n=BO(e,r);n&&(e=n,t=n.links)}n.type=t.type=function(e){const t=e.valueDeclaration;if(1536&e.flags&&hp(e))return St;if(t&&(226===t.kind||qx(t)&&226===t.parent.kind))return rl(e);if(512&e.flags&&t&&QE(t)&&t.commonJsModuleIndicator){const t=Ua(e);if(t!==e){if(!_c(e,0))return wt;const n=ts(e.exports.get("export=")),r=rl(n,n===t?void 0:t);return mc()?r:Ul(e)}}const n=vs(16,e);if(32&e.flags){const t=Bl(e);return t?Nv([n,t]):n}return V&&16777216&e.flags?DC(n,!0):n}(e)}return t.type}function zl(e){const t=$o(e);return t.type||(t.type=z_(e))}function ql(e){const t=$o(e);if(!t.type){if(!_c(e,0))return wt;const n=Ea(e),r=e.declarations&&Na(ca(e),!0),i=v(null==r?void 0:r.declarations,e=>kE(e)?wl(e):void 0);if(t.type??(t.type=(null==r?void 0:r.declarations)&&MB(r.declarations)&&e.declarations.length?function(e){const t=Dd(e.declarations[0]),n=Cc(e.escapedName),r=e.declarations.every(e=>zm(e)&&qx(e)&&ug(e.expression)),i=r?aw.createPropertyAccessExpression(aw.createPropertyAccessExpression(aw.createIdentifier("module"),aw.createIdentifier("exports")),n):aw.createPropertyAccessExpression(aw.createIdentifier("exports"),n);return r&&qT(i.expression.expression,i.expression),qT(i.expression,i),qT(i,t),i.flowNode=t.endFlowNode,qD(i,kt,At)}(r):MB(e.declarations)?kt:i||(111551&Fa(n)?Kl(n):wt)),!mc())return Ul(r??e),t.type??(t.type=wt)}return t.type}function Ul(e){const t=e.valueDeclaration;if(t){if(Pv(t))return So(e.valueDeclaration,Ca._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Hs(e)),wt;Q&&(169!==t.kind||t.initializer)&&So(e.valueDeclaration,Ca._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Hs(e))}else if(2097152&e.flags){const t=ca(e);t&&So(t,Ca.Circular_definition_of_import_alias_0,Hs(e))}return St}function Vl(e){const t=$o(e);return t.type||(Tn.assertIsDefined(t.deferralParent),Tn.assertIsDefined(t.deferralConstituents),t.type=1048576&t.deferralParent.flags?dv(t.deferralConstituents):Nv(t.deferralConstituents)),t.type}function Hl(e){const t=xx(e);return 4&e.flags?2&t?65536&t?function(e){const t=$o(e);return!t.writeType&&t.deferralWriteConstituents&&(Tn.assertIsDefined(t.deferralParent),Tn.assertIsDefined(t.deferralConstituents),t.writeType=1048576&t.deferralParent.flags?dv(t.deferralWriteConstituents):Nv(t.deferralWriteConstituents)),t.writeType}(e)||Vl(e):e.links.writeType||e.links.type:zC(Kl(e),!!(16777216&e.flags)):98304&e.flags?1&t?function(e){const t=$o(e);return t.writeType||(t.writeType=hS(Hl(t.target),t.mapper))}(e):Ml(e):Kl(e)}function Kl(e,t){const n=xx(e);return 65536&n?Vl(e):1&n?function(e){const t=$o(e);return t.type||(t.type=hS(Kl(t.target),t.mapper))}(e):262144&n?function(e){var t;if(!e.links.type){const n=e.links.mappedType;if(!_c(e,0))return n.containsError=!0,wt;const i=hS(Ad(n.target||n),tS(n.mapper,Td(n),e.links.keyType));let o=V&&16777216&e.flags&&!oL(i,49152)?DC(i,!0):524288&e.links.checkFlags?UC(i):i;mc()||(So(r,Ca.Type_of_property_0_circularly_references_itself_in_mapped_type_1,Hs(e),Gs(n)),o=wt),(t=e.links).type??(t.type=o)}return e.links.type}(e):8192&n?function(e){const t=$o(e);t.type||(t.type=bw(e.links.propertyType,e.links.mappedType,e.links.constraintType)||Ft);return t.type}(e):7&e.flags?Al(e,t):9136&e.flags?Jl(e):8&e.flags?zl(e):98304&e.flags?Ll(e):2097152&e.flags?ql(e):wt}function Gl(e){return zC(Kl(e),!!(16777216&e.flags))}function Yl(e,t){return void 0!==e&&void 0!==t&&!!(4&Ox(e))&&e.target===t}function e_(e){return 4&Ox(e)?e.target:e}function t_(e,t){return function e(n){if(7&Ox(n)){const r=e_(n);return r===t||ee(P_(r),e)}if(2097152&n.flags)return ee(n.types,e);return!1}(e)}function r_(e,t){for(const n of t)e=ye(e,q_(rs(n)));return e}function i_(e,t){for(;;){if((e=e.parent)&&yP(e)){const t=dg(e);if(6===t||3===t){const t=rs(e.left);t&&t.parent&&!xc(t.parent.valueDeclaration,t=>e===t)&&(e=t.parent.valueDeclaration)}}if(!e)return;switch(e.kind){case 263:case 231:case 264:case 179:case 180:case 173:case 184:case 185:case 317:case 262:case 174:case 218:case 219:case 265:case 345:case 346:case 340:case 338:case 200:case 194:{const n=i_(e,t);if(200===e.kind)return pe(n,q_(rs(e.typeParameter)));if(194===e.kind)return ne(n,ix(e));const r=r_(n,xl(e)),i=t&&(263===e.kind||231===e.kind||264===e.kind||RO(e))&&L_(rs(e)).thisType;return i?pe(r,i):r}case 341:const n=Kg(e);n&&(e=n.valueDeclaration);break;case 320:{const n=i_(e,t);return e.tags?r_(n,z(e.tags,e=>IF(e)?e.typeParameters:void 0)):n}}}}function s_(e){var t;const n=32&e.flags||16&e.flags?e.valueDeclaration:null==(t=e.declarations)?void 0:t.find(e=>{if(264===e.kind)return!0;if(260!==e.kind)return!1;const t=e.initializer;return!!t&&(218===t.kind||219===t.kind)});return Tn.assert(!!n,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),i_(n)}function c_(e){if(!e.declarations)return;let t;for(const n of e.declarations)if(264===n.kind||263===n.kind||231===n.kind||RO(n)||Rg(n)){t=r_(t,xl(n))}return t}function l_(e){const t=uf(e,1);if(1===t.length){const e=t[0];if(!e.typeParameters&&1===e.parameters.length&&tJ(e)){const t=aj(e.parameters[0]);return Sc(t)||sT(t)===St}}return!1}function p_(e){if(uf(e,1).length>0)return!0;if(8650752&e.flags){const t=op(e);return!!t&&l_(t)}return!1}function y_(e){const t=Ix(e.symbol);return t&&Dh(t)}function v_(e,t,n){const r=g(t),i=zm(n);return O(uf(e,1),e=>(i||r>=If(e.typeParameters))&&r<=g(e.typeParameters))}function w_(e,t,n){const r=v_(e,t,n),i=M(t,Mx);return B(r,e=>ee(e.typeParameters)?Dm(e,i,zm(n)):e)}function N_(e){if(!e.resolvedBaseConstructorType){const t=Ix(e.symbol),n=t&&Dh(t),r=y_(e);if(!r)return e.resolvedBaseConstructorType=At;if(!_c(e,1))return wt;const i=zL(r.expression);if(n&&r!==n&&(Tn.assert(!n.typeArguments),zL(n.expression)),2621440&i.flags&&Ud(i),!mc())return So(e.symbol.valueDeclaration,Ca._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Hs(e.symbol)),e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=wt);if(!(1&i.flags||i===Bt||p_(i))){const t=So(r.expression,Ca.Type_0_is_not_a_constructor_function_type,Gs(i));if(262144&i.flags){const e=Pg(i);let n=Ft;if(e){const t=uf(e,1);t[0]&&(n=mm(t[0]))}i.symbol.declarations&&ST(t,Vp(i.symbol.declarations[0],Ca.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,Hs(i.symbol),Gs(n)))}return e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=wt)}e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=i)}return e.resolvedBaseConstructorType}function D_(e,t){So(e,Ca.Type_0_recursively_references_itself_as_a_base_type,Gs(t,void 0,2))}function P_(e){if(!e.baseTypesResolved){if(_c(e,6)&&(8&e.objectFlags?e.resolvedBaseTypes=[E_(e)]:96&e.symbol.flags?(32&e.symbol.flags&&function(e){e.resolvedBaseTypes=ed;const t=wp(N_(e));if(!(2621441&t.flags))return e.resolvedBaseTypes=p;const n=y_(e);let r;const i=t.symbol?U_(t.symbol):void 0;if(t.symbol&&32&t.symbol.flags&&function(e){const t=e.outerTypeParameters;if(t){const n=t.length-1,r=Hg(e);return t[n].symbol!==r[n].symbol}return!0}(i))r=rh(n,t.symbol);else if(1&t.flags)r=t;else{const i=w_(t,n.typeArguments,n);if(!i.length)return So(n.expression,Ca.No_base_constructor_has_the_specified_number_of_type_arguments),e.resolvedBaseTypes=p;r=mm(i[0])}if(Pc(r))return e.resolvedBaseTypes=p;const o=Fp(r);if(!I_(o)){const t=yS(Xp(void 0,r),Ca.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Gs(o));return io.add(Hp(Dd(n.expression),n.expression,t)),e.resolvedBaseTypes=p}if(e===o||t_(o,e))return So(e.symbol.valueDeclaration,Ca.Type_0_recursively_references_itself_as_a_base_type,Gs(e,void 0,2)),e.resolvedBaseTypes=p;e.resolvedBaseTypes===ed&&(e.members=void 0);e.resolvedBaseTypes=[o]}(e),64&e.symbol.flags&&function(e){if(e.resolvedBaseTypes=e.resolvedBaseTypes||p,e.symbol.declarations)for(const t of e.symbol.declarations)if(264===t.kind&&Ah(t))for(const n of Ah(t)){const r=Fp(Mx(n));Pc(r)||(I_(r)?e===r||t_(r,e)?D_(t,e):e.resolvedBaseTypes===p?e.resolvedBaseTypes=[r]:e.resolvedBaseTypes.push(r):So(n,Ca.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}(e)):Tn.fail("type must be class or interface"),!mc()&&e.symbol.declarations))for(const t of e.symbol.declarations)263!==t.kind&&264!==t.kind||D_(t,e);e.baseTypesResolved=!0}return e.resolvedBaseTypes}function E_(e){return jy(dv(B(e.typeParameters,(t,n)=>8&e.elementFlags[n]?Hb(t,zt):t)||p),e.readonly)}function I_(e){if(262144&e.flags){const t=op(e);if(t)return I_(t)}return!!(67633153&e.flags&&!zd(e)||2097152&e.flags&&T(e.types,I_))}function L_(e){let t=$o(e);const n=t;if(!t.declaredType){const r=32&e.flags?1:2,i=BO(e,e.valueDeclaration&&function(e){var t;const n=e&&JO(e,!0),r=null==(t=null==n?void 0:n.exports)?void 0:t.get("prototype"),i=(null==r?void 0:r.valueDeclaration)&&function(e){if(!e.parent)return!1;let t=e.parent;for(;t&&211===t.kind;)t=t.parent;if(t&&yP(t)&&Eb(t.left)&&64===t.operatorToken.kind){const e=kg(t);return nP(e)&&e}}(r.valueDeclaration);return i?rs(i):void 0}(e.valueDeclaration));i&&(e=i,t=i.links);const o=n.declaredType=t.declaredType=vs(r,e),a=s_(e),s=c_(e);(a||s||1===r||!function(e){if(!e.declarations)return!0;for(const t of e.declarations)if(264===t.kind){if(256&t.flags)return!1;const e=Ah(t);if(e)for(const t of e)if(Cb(t.expression)){const e=Ma(t.expression,788968,!0);if(!e||!(64&e.flags)||L_(e).thisType)return!1}}return!0}(e))&&(o.objectFlags|=4,o.typeParameters=ne(a,s),o.outerTypeParameters=a,o.localTypeParameters=s,o.instantiations=new Map,o.instantiations.set(Ig(o.typeParameters),o),o.target=o,o.resolvedTypeArguments=o.typeParameters,o.thisType=bs(e),o.thisType.isThisType=!0,o.thisType.constraint=o)}return t.declaredType}function M_(e){var t;const n=$o(e);if(!n.declaredType){if(!_c(e,2))return wt;const r=Tn.checkDefined(null==(t=e.declarations)?void 0:t.find(Rg),"Type alias symbol with no valid declaration found"),i=Mg(r)?r.typeExpression:r.type;let o=i?Mx(i):wt;if(mc()){const t=c_(e);t&&(n.typeParameters=t,n.instantiations=new Map,n.instantiations.set(Ig(t),o))}else o=wt,340===r.kind?So(r.typeExpression.type,Ca.Type_alias_0_circularly_references_itself,Hs(e)):So(Ic(r)&&r.name||r,Ca.Type_alias_0_circularly_references_itself,Hs(e));n.declaredType??(n.declaredType=o)}return n.declaredType}function R_(e){return 1056&e.flags&&8&e.symbol.flags?U_(as(e.symbol)):e}function B_(e){const t=$o(e);if(!t.declaredType){const n=[];if(e.declarations)for(const t of e.declarations)if(266===t.kind)for(const r of t.members)if(mu(r)){const t=rs(r),i=$J(r).value,o=yx(void 0!==i?Px(i,GB(e),t):J_(t));$o(t).declaredType=o,n.push(vx(o))}const r=n.length?dv(n,1,e,void 0):J_(e);1048576&r.flags&&(r.flags|=1024,r.symbol=e),t.declaredType=r}return t.declaredType}function J_(e){const t=gs(32,e),n=gs(32,e);return t.regularType=t,t.freshType=n,n.regularType=t,n.freshType=n,t}function z_(e){const t=$o(e);if(!t.declaredType){const n=B_(as(e));t.declaredType||(t.declaredType=n)}return t.declaredType}function q_(e){const t=$o(e);return t.declaredType||(t.declaredType=bs(e))}function U_(e){return G_(e)||wt}function G_(e){return 96&e.flags?L_(e):524288&e.flags?M_(e):262144&e.flags?q_(e):384&e.flags?B_(e):8&e.flags?z_(e):2097152&e.flags?function(e){const t=$o(e);return t.declaredType||(t.declaredType=U_(Ea(e)))}(e):void 0}function Q_(e){switch(e.kind){case 133:case 159:case 154:case 150:case 163:case 136:case 155:case 151:case 116:case 157:case 146:case 201:return!0;case 188:return Q_(e.elementType);case 183:return!e.typeArguments||e.typeArguments.every(Q_)}return!1}function Y_(e){const t=Sl(e);return!t||Q_(t)}function Z_(e){const t=Pv(e);return t?Q_(t):!qu(e)}function eu(e){if(e.declarations&&1===e.declarations.length){const t=e.declarations[0];if(t)switch(t.kind){case 172:case 171:return Z_(t);case 174:case 173:case 176:case 177:case 178:return function(e){const t=Fv(e),n=xl(e);return(176===e.kind||!!t&&Q_(t))&&e.parameters.every(Z_)&&n.every(Y_)}(t)}}return!1}function tu(e,t,n){const r=ad();for(const i of e)r.set(i.escapedName,n&&eu(i)?i:oS(i,t));return r}function iu(e,t){for(const n of t){if(au(n))continue;const t=e.get(n.escapedName);(!t||t.valueDeclaration&&yP(t.valueDeclaration)&&!Yc(t)&&!am(t.valueDeclaration))&&(e.set(n.escapedName,n),e.set(n.escapedName,n))}}function au(e){return!!e.valueDeclaration&&o_(e.valueDeclaration)&&$v(e.valueDeclaration)}function uu(e){if(!e.declaredProperties){const t=e.symbol,n=xu(t);e.declaredProperties=Ss(n),e.declaredCallSignatures=p,e.declaredConstructSignatures=p,e.declaredIndexInfos=p,e.declaredCallSignatures=Zf(n.get("__call")),e.declaredConstructSignatures=Zf(n.get("__new")),e.declaredIndexInfos=gg(t)}return e}function du(e){if(!pD(e)&&!iP(e))return!1;const t=pD(e)?e.expression:e.argumentExpression;return Cb(t)&&kC(pD(e)?sA(e):SL(t))}function pu(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&64===e.charCodeAt(2)}function fu(e){const t=jc(e);return!!t&&du(t)}function mu(e){return!Xh(e)||fu(e)}function gu(e,t,n,r){Tn.assert(!!r.symbol,"The member is expected to have a symbol.");const i=Ho(r);if(!i.resolvedSymbol){i.resolvedSymbol=r.symbol;const o=yP(r)?r.left:r.name,a=iP(o)?SL(o.argumentExpression):sA(o);if(kC(a)){const s=TC(a),c=r.symbol.flags;let l=n.get(s);l||n.set(s,l=Eo(0,s,4096));const _=t&&t.get(s);if(!(32&e.flags)&&l.flags&Io(c)){const e=_?ne(_.declarations,l.declarations):l.declarations,t=!(8192&a.flags)&&Cc(s)||Rp(o);h(e,e=>So(jc(e)||e,Ca.Property_0_was_also_declared_here,t)),So(o||r,Ca.Duplicate_property_0,t),l=Eo(0,s,4096)}return l.links.nameType=a,function(e,t,n){Tn.assert(!!(4096&xx(e)),"Expected a late-bound symbol."),e.flags|=n,$o(t.symbol).lateSymbol=e,e.declarations?t.symbol.isReplaceableByMethod||e.declarations.push(t):e.declarations=[t],111551&n&&(e.valueDeclaration&&e.valueDeclaration.kind===t.kind||(e.valueDeclaration=t))}(l,r,c),l.parent?Tn.assert(l.parent===e,"Existing symbol parent should match new one"):l.parent=e,i.resolvedSymbol=l}}return i.resolvedSymbol}function hu(e,t){const n=$o(e);if(!n[t]){const r="resolvedExports"===t,i=r?1536&e.flags?es(e).exports:e.exports:e.members;n[t]=i||x;const o=ad();for(const t of e.declarations||p){const n=Rf(t);if(n)for(const t of n)r===Hv(t)&&fu(t)&&gu(e,i,o,t)}const a=ss(e).assignmentDeclarationMembers;if(a){const t=We(a.values());for(const n of t){const t=dg(n);r===!(3===t||yP(n)&&SF(n,t)||9===t||6===t)&&fu(n)&&gu(e,i,o,n)}}let s=function(e,t){if(!(null==e?void 0:e.size))return t;if(!(null==t?void 0:t.size))return e;const n=ad();return Uo(n,e),Uo(n,t),n}(i,o);if(33554432&e.flags&&n.cjsExportMerged&&e.declarations)for(const n of e.declarations){const e=$o(n.symbol)[t];s?e&&e.forEach((e,t)=>{const n=s.get(t);if(n){if(n===e)return;s.set(t,Jo(n,e))}else s.set(t,e)}):s=e}n[t]=s||x}return n[t]}function xu(e){return 6256&e.flags?hu(e,"resolvedMembers"):e.members||x}function Su(e){if(106500&e.flags&&"__computed"===e.escapedName){const t=$o(e);if(!t.lateSymbol&&ee(e.declarations,fu)){const t=ts(e.parent);ee(e.declarations,Hv)?Qa(t):xu(t)}return t.lateSymbol||(t.lateSymbol=e)}return e}function Tu(e,t,n){if(4&Ox(e)){const n=e.target,r=Hg(e);return g(n.typeParameters)===g(r)?qg(n,ne(r,[t||n.thisType])):e}if(2097152&e.flags){const r=B(e.types,e=>Tu(e,t,n));return r!==e.types?Nv(r):e}return n?wp(e):e}function Cu(e,t,n,r){let i,o,a,s,c;ke(n,r,0,n.length)?(o=t.symbol?xu(t.symbol):ad(t.declaredProperties),a=t.declaredCallSignatures,s=t.declaredConstructSignatures,c=t.declaredIndexInfos):(i=$x(n,r),o=tu(t.declaredProperties,i,1===n.length),a=Ux(t.declaredCallSignatures,i),s=Ux(t.declaredConstructSignatures,i),c=Vx(t.declaredIndexInfos,i));const l=P_(t);if(l.length){if(t.symbol&&o===xu(t.symbol)){const e=ad(t.declaredProperties),n=cg(t.symbol);n&&e.set("__index",n),o=e}Ts(e,o,a,s,c);const n=Pe(r);for(const e of l){const t=n?Tu(hS(e,i),n):e;iu(o,Hd(t)),a=ne(a,uf(t,0)),s=ne(s,uf(t,1));const r=t!==St?bf(t):[mg(Jt,St,!1)];c=ne(c,O(r,e=>!pf(c,e.keyType)))}}Ts(e,o,a,s,c)}function Nu(e,t,n,r,i,o,a,s){const c=new l(Be,s);return c.declaration=e,c.typeParameters=t,c.parameters=r,c.thisParameter=n,c.resolvedReturnType=i,c.resolvedTypePredicate=o,c.minArgumentCount=a,c.resolvedMinArgumentCount=void 0,c.target=void 0,c.mapper=void 0,c.compositeSignatures=void 0,c.compositeKind=void 0,c}function Du(e){const t=Nu(e.declaration,e.typeParameters,e.thisParameter,e.parameters,void 0,void 0,e.minArgumentCount,167&e.flags);return t.target=e.target,t.mapper=e.mapper,t.compositeSignatures=e.compositeSignatures,t.compositeKind=e.compositeKind,t}function Pu(e,t){const n=Du(e);return n.compositeSignatures=t,n.compositeKind=1048576,n.target=void 0,n.mapper=void 0,n}function Eu(e,t){if((24&e.flags)===t)return e;e.optionalCallSignatureCache||(e.optionalCallSignatureCache={});const n=8===t?"inner":"outer";return e.optionalCallSignatureCache[n]||(e.optionalCallSignatureCache[n]=function(e,t){Tn.assert(8===t||16===t,"An optional call signature can either be for an inner call chain or an outer call chain, but not both.");const n=Du(e);return n.flags|=t,n}(e,t))}function Au(e,t){if(tJ(e)){const r=e.parameters.length-1,i=e.parameters[r].escapedName,o=Kl(e.parameters[r]);if($T(o))return[n(o,r,i)];if(!t&&1048576&o.flags&&T(o.types,$T))return M(o.types,e=>n(e,r,i))}return[e.parameters];function n(t,n,r){const i=Hg(t),o=function(e,t){const n=new Map;return M(e.target.labeledElementDeclarations,(e,r)=>{const i=sj(e,r,t),o=n.get(i);return void 0===o?(n.set(i,1),i):(n.set(i,o+1),`${i}_${o}`)})}(t,r),a=M(i,(r,i)=>{const a=o&&o[i]?o[i]:cj(e,n+i,t),s=t.target.elementFlags[i],c=Eo(1,a,12&s?32768:2&s?16384:0);return c.links.type=4&s?jy(r):r,c});return ne(e.parameters.slice(0,n),a)}}function Ou(e,t,n,r,i){for(const o of e)if(eT(o,t,n,r,i,n?AS:ES))return o}function Lu(e,t,n){if(t.typeParameters){if(n>0)return;for(let n=1;n1&&(n=void 0===n?r:-1);for(const n of e[r])if(!t||!Ou(t,n,!1,!1,!0)){const i=Lu(e,n,r);if(i){let e=n;if(i.length>1){let t=n.thisParameter;const r=h(i,e=>e.thisParameter);if(r){t=WC(r,Nv($(i,e=>e.thisParameter&&Kl(e.thisParameter))))}e=Pu(n,i),e.thisParameter=t}(t||(t=[])).push(e)}}}if(!g(t)&&-1!==n){const r=e[void 0!==n?n:0];let i=r.slice();for(const t of e)if(t!==r){const e=t[0];if(Tn.assert(!!e,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),i=e.typeParameters&&ee(i,t=>!!t.typeParameters&&!Vu(e.typeParameters,t.typeParameters))?void 0:M(i,t=>$u(t,e)),!i)break}t=i}return t||p}function Vu(e,t){if(g(e)!==g(t))return!1;if(!e||!t)return!0;const n=$x(t,e);for(let r=0;r=i?e:t,a=o===e?t:e,s=o===e?r:i,c=yj(e)||yj(t),l=c&&!yj(o),_=new Array(s+(l?1:0));for(let u=0;u=hj(o)&&u>=hj(a),h=u>=r?void 0:cj(e,u),y=u>=i?void 0:cj(t,u),v=Eo(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${u}`,m?32768:g?16384:0);v.links.type=m?jy(f):f,_[u]=v}if(l){const e=Eo(1,"args",32768);e.links.type=jy(dj(a,s)),a===t&&(e.links.type=hS(e.links.type,n)),_[s]=e}return _}(e,t,r),a=function(e,t,n){return e&&t?WC(e,Nv([Kl(e),hS(Kl(t),n)])):e||t}(e.thisParameter,t.thisParameter,r),s=Nu(i,n,a,o,void 0,void 0,Math.max(e.minArgumentCount,t.minArgumentCount),167&(e.flags|t.flags));return s.compositeKind=1048576,s.compositeSignatures=ne(2097152!==e.compositeKind&&e.compositeSignatures||[e],[t]),r?s.mapper=2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures?Zx(e.mapper,r):r:2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures&&(s.mapper=e.mapper),s}function Hu(e){const t=bf(e[0]);if(t){const n=[];for(const r of t){const t=r.keyType;T(e,e=>!!xf(e,t))&&n.push(mg(t,dv(M(e,e=>Sf(e,t))),ee(e,e=>xf(e,t).isReadonly)))}return n}return p}function Yu(e,t){return e?t?Nv([e,t]):e:t}function Zu(e){const t=I(e,e=>uf(e,1).length>0),n=M(e,l_);if(t>0&&t===I(n,e=>e)){const e=n.indexOf(!0);n[e]=!1}return n}function ld(e,t,n,r){const i=[];for(let o=0;o!eT(e,n,!1,!1,!1,ES))||(e=pe(e,n));return e}function ud(e,t,n){if(e)for(let r=0;r{var n;418&t.flags||512&t.flags&&(null==(n=t.declarations)?void 0:n.length)&&T(t.declarations,pp)||e.set(t.escapedName,t)}),i=e}if(Ts(e,i,p,p,p),32&t.flags){const e=N_(L_(t));11272192&e.flags?(i=ad(function(e){const t=Ss(e),n=fg(e);return n?ne(t,[n]):t}(i)),iu(i,Hd(e))):e===St&&(r=mg(Jt,St,!1))}const o=fg(i);if(o?n=vg(o):(r&&(n=pe(n,r)),384&t.flags&&(32&U_(t).flags||ee(e.properties,e=>!!(296&Kl(e).flags)))&&(n=pe(n,oi))),Ts(e,i,p,p,n||p),8208&t.flags&&(e.callSignatures=Zf(t)),32&t.flags){const n=L_(t);let r=t.members?Zf(t.members.get("__constructor")):p;16&t.flags&&(r=ge(r.slice(),$(e.callSignatures,e=>RO(e.declaration)?Nu(e.declaration,e.typeParameters,e.thisParameter,e.parameters,n,void 0,e.minArgumentCount,167&e.flags):void 0))),r.length||(r=function(e){const t=uf(N_(e),1),n=Ix(e.symbol),r=!!n&&Wv(n,64);if(0===t.length)return[Nu(void 0,e.localTypeParameters,void 0,p,e,void 0,0,r?4:0)];const i=y_(e),o=zm(i),a=Hh(i),s=g(a),c=[];for(const n of t){const t=If(n.typeParameters),i=g(n.typeParameters);if(o||s>=t&&s<=i){const s=i?Jm(n,Of(a,n.typeParameters,t,o)):Du(n);s.typeParameters=e.localTypeParameters,s.resolvedReturnType=e,s.flags=r?4|s.flags:-5&s.flags,c.push(s)}}return c}(n)),e.constructSignatures=r}}function pd(e,t,n){return hS(e,$x([t.indexType,t.objectType],[Nx(0),Vy([n])]))}function fd(e){const t=xf(e.source,Jt),n=Rd(e.mappedType),r=!(1&n),i=4&n?0:16777216,o=t?[mg(Jt,bw(t.type,e.mappedType,e.constraintType)||Ft,r&&t.isReadonly)]:p,a=ad(),s=function(e){const t=Cd(e.mappedType);if(!(1048576&t.flags||2097152&t.flags))return;const n=1048576&t.flags?t.origin:t;if(!(n&&2097152&n.flags))return;const r=Nv(n.types.filter(t=>t!==e.constraintType));return r!==Zt?r:void 0}(e);for(const t of Hd(e.source)){if(s){if(!zS(Jv(t,8576),s))continue}const n=8192|(r&&Yj(t)?8:0),o=Eo(4|t.flags&i,t.escapedName,n);if(o.declarations=t.declarations,o.links.nameType=$o(t).nameType,o.links.propertyType=Kl(t),8388608&e.constraintType.type.flags&&262144&e.constraintType.type.objectType.flags&&262144&e.constraintType.type.indexType.flags){const t=e.constraintType.type.objectType,n=pd(e.mappedType,e.constraintType.type,t);o.links.mappedType=n,o.links.constraintType=ib(t)}else o.links.mappedType=e.mappedType,o.links.constraintType=e.constraintType;a.set(t.escapedName,o)}Ts(e,a,p,p,o)}function vd(e){if(4194304&e.flags){const t=wp(e.type);return KT(t)?Zy(t):ib(t)}if(16777216&e.flags){if(e.root.isDistributive){const t=e.checkType,n=vd(t);if(n!==t)return pS(e,eS(e.root.checkType,n,e.mapper),!1)}return e}if(1048576&e.flags)return WN(e,vd,!0);if(2097152&e.flags){const t=e.types;return 2===t.length&&76&t[0].flags&&t[1]===Pn?e:Nv(B(e.types,vd))}return e}function bd(e){return 4096&xx(e)}function xd(e,t,n,r){for(const n of Hd(e))r(Jv(n,t));if(1&e.flags)r(Jt);else for(const t of bf(e))(!n||134217732&t.keyType.flags)&&r(t.keyType)}function kd(e){const t=ad();let n;Ts(e,x,p,p,p);const r=Td(e),i=Cd(e),o=e.target||e,a=wd(o),s=2!==qd(o),c=Ad(o),l=wp(jd(e)),_=Rd(e);function u(i){BN(a?hS(a,tS(e.mapper,r,i)):i,o=>function(i,o){if(kC(o)){const n=TC(o),r=t.get(n);if(r)r.links.nameType=dv([r.links.nameType,o]),r.links.keyType=dv([r.links.keyType,i]);else{const r=kC(i)?Zp(l,TC(i)):void 0,a=!!(4&_||!(8&_)&&r&&16777216&r.flags),c=!!(1&_||!(2&_)&&r&&Yj(r)),u=V&&!a&&r&&16777216&r.flags,d=Eo(4|(a?16777216:0),n,262144|(r?bd(r):0)|(c?8:0)|(u?524288:0));d.links.mappedType=e,d.links.nameType=o,d.links.keyType=i,r&&(d.links.syntheticOrigin=r,d.declarations=s?r.declarations:void 0),t.set(n,d)}}else if(bg(o)||33&o.flags){const t=5&o.flags?Jt:40&o.flags?zt:o,a=hS(c,tS(e.mapper,r,i)),s=Tf(l,o),u=mg(t,a,!!(1&_||!(2&_)&&(null==s?void 0:s.isReadonly)));n=ud(n,u,!0)}}(i,o))}Od(e)?xd(l,8576,!1,u):BN(vd(i),u),Ts(e,t,p,p,n||p)}function Td(e){return e.typeParameter||(e.typeParameter=q_(rs(e.declaration.typeParameter)))}function Cd(e){return e.constraintType||(e.constraintType=Gd(Td(e))||wt)}function wd(e){return e.declaration.nameType?e.nameType||(e.nameType=hS(Mx(e.declaration.nameType),e.mapper)):void 0}function Ad(e){return e.templateType||(e.templateType=e.declaration.type?hS(Xc(Mx(e.declaration.type),!0,!!(4&Rd(e))),e.mapper):wt)}function Id(e){return Sl(e.declaration.typeParameter)}function Od(e){const t=Id(e);return 198===t.kind&&143===t.operator}function jd(e){if(!e.modifiersType)if(Od(e))e.modifiersType=hS(Mx(Id(e).type),e.mapper);else{const t=Cd(Qb(e.declaration)),n=t&&262144&t.flags?Gd(t):t;e.modifiersType=n&&4194304&n.flags?hS(n.type,e.mapper):Ft}return e.modifiersType}function Rd(e){const t=e.declaration;return(t.readonlyToken?41===t.readonlyToken.kind?2:1:0)|(t.questionToken?41===t.questionToken.kind?8:4:0)}function Bd(e){const t=Rd(e);return 8&t?-1:4&t?1:0}function Jd(e){if(32&Ox(e))return Bd(e)||Jd(jd(e));if(2097152&e.flags){const t=Jd(e.types[0]);return T(e.types,(e,n)=>0===n||Jd(e)===t)?t:0}return 0}function zd(e){if(32&Ox(e)){const t=Cd(e);if(zb(t))return!0;const n=wd(e);if(n&&zb(hS(n,Kx(Td(e),t))))return!0}return!1}function qd(e){const t=wd(e);return t?zS(t,Td(e))?1:2:0}function Ud(e){return e.members||(524288&e.flags?4&e.objectFlags?function(e){const t=uu(e.target),n=ne(t.typeParameters,[t.thisType]),r=Hg(e);Cu(e,t,n,r.length===n.length?r:ne(r,[e]))}(e):3&e.objectFlags?function(e){Cu(e,uu(e),p,p)}(e):1024&e.objectFlags?fd(e):16&e.objectFlags?dd(e):32&e.objectFlags?kd(e):Tn.fail("Unhandled object type "+Tn.formatObjectFlags(e.objectFlags)):1048576&e.flags?function(e){const t=Mu(M(e.types,e=>e===Hn?[ni]:uf(e,0))),n=Mu(M(e.types,e=>uf(e,1))),r=Hu(e.types);Ts(e,x,t,n,r)}(e):2097152&e.flags?function(e){let t,n,r;const i=e.types,o=Zu(i),a=I(o,e=>e);for(let s=0;s0&&(e=M(e,e=>{const t=Du(e);return t.resolvedReturnType=ld(mm(e),i,o,s),t})),n=_d(n,e)}t=_d(t,uf(c,0)),r=Me(bf(c),(e,t)=>ud(e,t,!1),r)}Ts(e,x,t||p,n||p,r||p)}(e):Tn.fail("Unhandled type "+Tn.formatTypeFlags(e.flags))),e}function Vd(e){return 524288&e.flags?Ud(e).properties:p}function Wd(e,t){if(524288&e.flags){const n=Ud(e).members.get(t);if(n&&fs(n))return n}}function $d(e){if(!e.resolvedProperties){const t=ad();for(const n of e.types){for(const r of Hd(n))if(!t.has(r.escapedName)){const n=Ep(e,r.escapedName,!!(2097152&e.flags));n&&t.set(r.escapedName,n)}if(1048576&e.flags&&0===bf(n).length)break}e.resolvedProperties=Ss(t)}return e.resolvedProperties}function Hd(e){return 3145728&(e=Np(e)).flags?$d(e):Vd(e)}function Kd(e){return 262144&e.flags?Gd(e):8388608&e.flags?function(e){return cp(e)?function(e){if(Cp(e))return $b(e.objectType,e.indexType);const t=Qd(e.indexType);if(t&&t!==e.indexType){const n=Gb(e.objectType,t,e.accessFlags);if(n)return n}const n=Qd(e.objectType);if(n&&n!==e.objectType)return Gb(n,e.indexType,e.accessFlags);return}(e):void 0}(e):16777216&e.flags?np(e):op(e)}function Gd(e){return cp(e)?Pg(e):void 0}function Xd(e,t=0){var n;return t<5&&!(!e||!(262144&e.flags&&ee(null==(n=e.symbol)?void 0:n.declarations,e=>Wv(e,4096))||3145728&e.flags&&ee(e.types,e=>Xd(e,t))||8388608&e.flags&&Xd(e.objectType,t+1)||16777216&e.flags&&Xd(np(e),t+1)||33554432&e.flags&&Xd(e.baseType,t)||32&Ox(e)&&function(e,t){const n=cS(e);return!!n&&Xd(n,t)}(e,t)||KT(e)&&N(nv(e),(n,r)=>!!(8&e.target.elementFlags[r])&&Xd(n,t))>=0))}function Qd(e){const t=Ub(e,!1);return t!==e?t:Kd(e)}function Yd(e){if(!e.resolvedDefaultConstraint){const t=function(e){return e.resolvedInferredTrueType||(e.resolvedInferredTrueType=e.combinedMapper?hS(Mx(e.root.node.trueType),e.combinedMapper):nx(e))}(e),n=rx(e);e.resolvedDefaultConstraint=Sc(t)?n:Sc(n)?t:dv([t,n])}return e.resolvedDefaultConstraint}function Zd(e){if(void 0!==e.resolvedConstraintOfDistributive)return e.resolvedConstraintOfDistributive||void 0;if(e.root.isDistributive&&e.restrictiveInstantiation!==e){const t=Ub(e.checkType,!1),n=t===e.checkType?Kd(t):t;if(n&&n!==e.checkType){const t=pS(e,eS(e.root.checkType,n,e.mapper),!0);if(!(131072&t.flags))return e.resolvedConstraintOfDistributive=t,t}}e.resolvedConstraintOfDistributive=!1}function ep(e){return Zd(e)||Yd(e)}function np(e){return cp(e)?ep(e):void 0}function op(e){if(464781312&e.flags||KT(e)){const t=lp(e);return t!==On&&t!==jn?t:void 0}return 4194304&e.flags?sn:void 0}function sp(e){return op(e)||e}function cp(e){return lp(e)!==jn}function lp(e){if(e.resolvedBaseConstraint)return e.resolvedBaseConstraint;const t=[];return e.resolvedBaseConstraint=n(e);function n(e){if(!e.immediateBaseConstraint){if(!_c(e,4))return jn;let n;const o=Qk(e);if((t.length<10||t.length<50&&!E(t,o))&&(t.push(o),n=function(e){if(262144&e.flags){const t=Pg(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){const t=e.types,n=[];let r=!1;for(const e of t){const t=i(e);t?(t!==e&&(r=!0),n.push(t)):r=!0}return r?1048576&e.flags&&n.length===t.length?dv(n):2097152&e.flags&&n.length?Nv(n):void 0:e}if(4194304&e.flags)return sn;if(134217728&e.flags){const t=e.types,n=$(t,i);return n.length===t.length?ab(e.texts,n):Jt}if(268435456&e.flags){const t=i(e.type);return t&&t!==e.type?cb(e.symbol,t):Jt}if(8388608&e.flags){if(Cp(e))return i($b(e.objectType,e.indexType));const t=i(e.objectType),n=i(e.indexType),r=t&&n&&Gb(t,n,e.accessFlags);return r&&i(r)}if(16777216&e.flags){const t=ep(e);return t&&i(t)}if(33554432&e.flags)return i(Rh(e));if(KT(e)){return Vy(M(nv(e),(t,n)=>{const r=262144&t.flags&&8&e.target.elementFlags[n]&&i(t)||t;return r!==t&&zN(r,e=>oT(e)&&!KT(e))?r:t}),e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations)}return e}(Ub(e,!1)),t.pop()),!mc()){if(262144&e.flags){const t=Cg(e);if(t){const n=So(t,Ca.Type_parameter_0_has_a_circular_constraint,Gs(e));!r||hh(t,r)||hh(r,t)||ST(n,Vp(r,Ca.Circularity_originates_in_type_at_this_location))}}n=jn}e.immediateBaseConstraint??(e.immediateBaseConstraint=n||On)}return e.immediateBaseConstraint}function i(e){const t=n(e);return t!==On&&t!==jn?t:void 0}}function _p(e){if(e.default)e.default===Ln&&(e.default=jn);else if(e.target){const t=_p(e.target);e.default=t?hS(t,e.mapper):On}else{e.default=Ln;const t=e.symbol&&h(e.symbol.declarations,e=>fD(e)&&e.default),n=t?Mx(t):On;e.default===Ln&&(e.default=n)}return e.default}function mp(e){const t=_p(e);return t!==On&&t!==jn?t:void 0}function gp(e){return!(!e.symbol||!h(e.symbol.declarations,e=>fD(e)&&e.default))}function xp(e){return e.resolvedApparentType||(e.resolvedApparentType=function(e){const t=e.target??e,n=cS(t);if(n&&!t.declaration.nameType){const r=jd(e),i=zd(r)?xp(r):op(r);if(i&&zN(i,e=>oT(e)||Tp(e)))return hS(t,eS(n,i,e.mapper))}return e}(e))}function Tp(e){return!!(2097152&e.flags)&&T(e.types,oT)}function Cp(e){let t;return!(!(8388608&e.flags&&32&Ox(t=e.objectType)&&!zd(t)&&zb(e.indexType))||8&Rd(t)||t.declaration.nameType)}function wp(e){const t=465829888&e.flags?op(e)||Ft:e,n=Ox(t);return 32&n?xp(t):4&n&&t!==e?Tu(t,e):2097152&t.flags?function(e,t){if(e===t)return e.resolvedApparentType||(e.resolvedApparentType=Tu(e,t,!0));const n=`I${rv(e)},${rv(t)}`;return mo(n)??go(n,Tu(e,t,!0))}(t,e):402653316&t.flags?Yn:296&t.flags?Zn:2112&t.flags?Rr||(Rr=_y("BigInt",0,!1))||wn:528&t.flags?er:12288&t.flags?xy():67108864&t.flags?wn:4194304&t.flags?sn:2&t.flags&&!V?wn:t}function Np(e){return Fp(wp(Fp(e)))}function Dp(e,t,n){var r,i,o;let a,s,c;const l=1048576&e.flags;let _,u=4,d=l?0:8,p=!1;for(const r of e.types){const e=wp(r);if(!(Pc(e)||131072&e.flags)){const r=Zp(e,t,n),i=r?Sx(r):0;if(r){if(106500&r.flags&&(_??(_=l?0:16777216),l?_|=16777216&r.flags:_&=r.flags),a){if(r!==a){if((lB(r)||r)===(lB(a)||a)&&-1===Zk(a,r,(e,t)=>e===t?-1:0))p=!!a.parent&&!!g(c_(a.parent));else{s||(s=new Map,s.set(GB(a),a));const e=GB(r);s.has(e)||s.set(e,r)}}}else a=r;l&&Yj(r)?d|=8:l||Yj(r)||(d&=-9),d|=(6&i?0:256)|(4&i?512:0)|(2&i?1024:0)|(256&i?2048:0),HA(r)||(u=2)}else if(l){const n=!pu(t)&&Cf(e,t);n?(d|=32|(n.isReadonly?8:0),c=pe(c,$T(e)?eC(e)||At:n.type)):!Bw(e)||2097152&Ox(e)?d|=16:(d|=32,c=pe(c,At))}}}if(!a||l&&(s||48&d)&&1536&d&&(!s||!function(e){let t;for(const n of e){if(!n.declarations)return;if(t){if(t.forEach(e=>{E(n.declarations,e)||t.delete(e)}),0===t.size)return}else t=new Set(n.declarations)}return t}(s.values())))return;if(!(s||16&d||c)){if(p){const t=null==(r=dt(a,sd))?void 0:r.links,n=WC(a,null==t?void 0:t.type);return n.parent=null==(o=null==(i=a.valueDeclaration)?void 0:i.symbol)?void 0:o.parent,n.links.containingType=e,n.links.mapper=null==t?void 0:t.mapper,n.links.writeType=Hl(a),n}return a}const f=s?We(s.values()):[a];let m,h,y;const v=[];let b,x,S=!1;for(const e of f){x?e.valueDeclaration&&e.valueDeclaration!==x&&(S=!0):x=e.valueDeclaration,m=ge(m,e.declarations);const t=Kl(e);h||(h=t,y=$o(e).nameType);const n=Hl(e);(b||n!==t)&&(b=pe(b||v.slice(),n)),t!==h&&(d|=64),(FT(t)||Lb(t))&&(d|=128),131072&t.flags&&t!==xn&&(d|=131072),v.push(t)}ge(v,c);const k=Eo(4|(_??0),t,u|d);return k.links.containingType=e,!S&&x&&(k.valueDeclaration=x,x.symbol.parent&&(k.parent=x.symbol.parent)),k.declarations=m,k.links.nameType=y,v.length>2?(k.links.checkFlags|=65536,k.links.deferralParent=e,k.links.deferralConstituents=v,k.links.deferralWriteConstituents=b):(k.links.type=l?dv(v):Nv(v),b&&(k.links.writeType=l?dv(b):Nv(b))),k}function Pp(e,t,n){var r,i,o;let a=n?null==(r=e.propertyCacheWithoutObjectFunctionPropertyAugment)?void 0:r.get(t):null==(i=e.propertyCache)?void 0:i.get(t);if(!a&&(a=Dp(e,t,n),a)){if((n?e.propertyCacheWithoutObjectFunctionPropertyAugment||(e.propertyCacheWithoutObjectFunctionPropertyAugment=ad()):e.propertyCache||(e.propertyCache=ad())).set(t,a),n&&!(48&xx(a))&&!(null==(o=e.propertyCache)?void 0:o.get(t))){(e.propertyCache||(e.propertyCache=ad())).set(t,a)}}return a}function Ep(e,t,n){const r=Pp(e,t,n);return!r||16&xx(r)?void 0:r}function Fp(e){return 1048576&e.flags&&16777216&e.objectFlags?e.resolvedReducedType||(e.resolvedReducedType=function(e){const t=B(e.types,Fp);if(t===e.types)return e;const n=dv(t);1048576&n.flags&&(n.resolvedReducedType=n);return n}(e)):2097152&e.flags?(16777216&e.objectFlags||(e.objectFlags|=16777216|(ee($d(e),Op)?33554432:0)),33554432&e.objectFlags?Zt:e):e}function Op(e){return zp(e)||$p(e)}function zp(e){return!(16777216&e.flags||192!=(131264&xx(e))||!(131072&Kl(e).flags))}function $p(e){return!e.valueDeclaration&&!!(1024&xx(e))}function Gp(e){return!!(1048576&e.flags&&16777216&e.objectFlags&&ee(e.types,Gp)||2097152&e.flags&&function(e){const t=e.uniqueLiteralFilledInstantiation||(e.uniqueLiteralFilledInstantiation=hS(e,Sn));return Fp(t)!==t}(e))}function Xp(e,t){if(2097152&t.flags&&33554432&Ox(t)){const n=C($d(t),zp);if(n)return yS(e,Ca.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,Gs(t,void 0,536870912),Hs(n));const r=C($d(t),$p);if(r)return yS(e,Ca.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,Gs(t,void 0,536870912),Hs(r))}return e}function Zp(e,t,n,r){var i,o;if(524288&(e=Np(e)).flags){const a=Ud(e),s=a.members.get(t);if(s&&!r&&512&(null==(i=e.symbol)?void 0:i.flags)&&(null==(o=$o(e.symbol).typeOnlyExportStarMap)?void 0:o.has(t)))return;if(s&&fs(s,r))return s;if(n)return;const c=a===In?Hn:a.callSignatures.length?Kn:a.constructSignatures.length?Gn:void 0;if(c){const e=Wd(c,t);if(e)return e}return Wd($n,t)}if(2097152&e.flags){const r=Ep(e,t,!0);return r||(n?void 0:Ep(e,t,n))}if(1048576&e.flags)return Ep(e,t,n)}function _f(e,t){if(3670016&e.flags){const n=Ud(e);return 0===t?n.callSignatures:n.constructSignatures}return p}function uf(e,t){const n=_f(Np(e),t);if(0===t&&!g(n)&&1048576&e.flags){if(e.arrayFallbackSignatures)return e.arrayFallbackSignatures;let r;if(zN(e,e=>{var t;return!!(null==(t=e.symbol)?void 0:t.parent)&&function(e){if(!e||!Xn.symbol||!Qn.symbol)return!1;return!!us(e,Xn.symbol)||!!us(e,Qn.symbol)}(e.symbol.parent)&&(r?r===e.symbol.escapedName:(r=e.symbol.escapedName,!0))})){const n=jy(WN(e,e=>Hx((df(e.symbol.parent)?Qn:Xn).typeParameters[0],e.mapper)),JN(e,e=>df(e.symbol.parent)));return e.arrayFallbackSignatures=uf(yc(n,r),t)}e.arrayFallbackSignatures=n}return n}function df(e){return!(!e||!Qn.symbol)&&!!us(e,Qn.symbol)}function pf(e,t){return C(e,e=>e.keyType===t)}function ff(e,t){let n,r,i;for(const o of e)o.keyType===Jt?n=o:hf(t,o.keyType)&&(r?(i||(i=[r])).push(o):r=o);return i?mg(Ft,Nv(M(i,e=>e.type)),Me(i,(e,t)=>e&&t.isReadonly,!0)):r||(n&&hf(t,Jt)?n:void 0)}function hf(e,t){return zS(e,t)||t===Jt&&zS(e,zt)||t===zt&&(e===gn||!!(128&e.flags)&&tC(e.value))}function vf(e){if(3670016&e.flags){return Ud(e).indexInfos}return p}function bf(e){return vf(Np(e))}function xf(e,t){return pf(bf(e),t)}function Sf(e,t){var n;return null==(n=xf(e,t))?void 0:n.type}function kf(e,t){return bf(e).filter(e=>hf(t,e.keyType))}function Tf(e,t){return ff(bf(e),t)}function Cf(e,t){return Tf(e,pu(t)?Qt:kx(Cc(t)))}function wf(e){var t;let n;for(const t of xl(e))n=ye(n,q_(t.symbol));return(null==n?void 0:n.length)?n:nE(e)?null==(t=Hf(e))?void 0:t.typeParameters:void 0}function Nf(e){const t=[];return e.forEach((e,n)=>{xs(n)||t.push(e)}),t}function Df(e,t){if(Js(e))return;const n=Ko(_e,'"'+e+'"',512);return n&&t?ts(n):n}function Pf(e){return jg(e)||cC(e)||mD(e)&&uC(e)}function Ef(e){if(Pf(e))return!0;if(!mD(e))return!1;if(e.initializer){const t=$f(e.parent),n=e.parent.parameters.indexOf(e);return Tn.assert(n>=0),n>=hj(t,3)}const t=fm(e.parent);return!!t&&(!e.type&&!e.dotDotDotToken&&e.parent.parameters.indexOf(e)>=gO(t).length)}function Ff(e,t,n,r){return{kind:e,parameterName:t,parameterIndex:n,type:r}}function If(e){let t=0;if(e)for(let n=0;n=n&&o<=i){const n=e?e.slice():[];for(let e=o;ec.arguments.length&&!u||(o=n.length)}if((177===e.kind||178===e.kind)&&mu(e)&&(!s||!r)){const t=177===e.kind?178:177,n=id(rs(e),t);n&&(r=function(e){const t=Fz(e);return t&&t.symbol}(n))}a&&a.typeExpression&&(r=WC(Eo(1,"this"),Mx(a.typeExpression)));const _=mF(e)?Yg(e):e,u=_&&SD(_)?L_(ts(_.parent.symbol)):void 0,d=u?u.localTypeParameters:wf(e);(Xu(e)||zm(e)&&function(e,t){if(mF(e)||!Yf(e))return!1;const n=Pe(e.parameters),r=n?Jc(n):ml(e).filter(PF),i=v(r,e=>e.typeExpression&&uF(e.typeExpression.type)?e.typeExpression.type:void 0),o=Eo(3,"args",32768);i?o.links.type=jy(Mx(i.type)):(o.links.checkFlags|=65536,o.links.deferralParent=Zt,o.links.deferralConstituents=[rr],o.links.deferralWriteConstituents=[rr]);i&&t.pop();return t.push(o),!0}(e,n))&&(i|=1),(FD(e)&&Wv(e,64)||SD(e)&&Wv(e.parent,64))&&(i|=4),t.resolvedSignature=Nu(e,d,r,n,void 0,void 0,o,i)}return t.resolvedSignature}function Hf(e){if(!zm(e)||!g_(e))return;const t=ul(e);return(null==t?void 0:t.typeExpression)&&eO(Mx(t.typeExpression))}function Yf(e){const t=Ho(e);return void 0===t.containsArgumentsReference&&(512&t.flags?t.containsArgumentsReference=!0:t.containsArgumentsReference=function e(t){if(!t)return!1;switch(t.kind){case 80:return t.escapedText===xe.escapedName&&oz(t)===xe;case 172:case 174:case 177:case 178:return 167===t.name.kind&&e(t.name);case 211:case 212:return e(t.expression);case 303:return e(t.initializer);default:return!fy(t)&&!Af(t)&&!!KI(t,e)}}(e.body)),t.containsArgumentsReference}function Zf(e){if(!e||!e.declarations)return p;const t=[];for(let n=0;n0&&r.body){const t=e.declarations[n-1];if(r.parent===t.parent&&r.kind===t.kind&&r.pos===t.end)continue}if(zm(r)&&r.jsDoc){const e=Xg(r);if(g(e)){for(const n of e){const e=n.typeExpression;void 0!==e.type||SD(r)||tw(e,St),t.push($f(e))}continue}}t.push(!ZT(r)&&!Kf(r)&&Hf(r)||$f(r))}}return t}function em(e){const t=Ba(e,e);if(t){const e=Ua(t);if(e)return Kl(e)}return St}function tm(e){if(e.thisParameter)return Kl(e.thisParameter)}function nm(e){if(!e.resolvedTypePredicate){if(e.target){const r=nm(e.target);e.resolvedTypePredicate=r?(t=r,n=e.mapper,Ff(t.kind,t.parameterName,t.parameterIndex,hS(t.type,n))):ei}else if(e.compositeSignatures)e.resolvedTypePredicate=function(e,t){let n;const r=[];for(const i of e){const e=nm(i);if(e){if(0!==e.kind&&1!==e.kind||n&&!fv(n,e))return;n=e,r.push(e.type)}else{const e=2097152!==t?mm(i):void 0;if(e!==Ut&&e!==Vt)return}}if(!n)return;const i=im(r,t);return Ff(n.kind,n.parameterName,n.parameterIndex,i)}(e.compositeSignatures,e.compositeKind)||ei;else{const t=e.declaration&&Fv(e.declaration);let n;if(!t){const t=Hf(e.declaration);t&&e!==t&&(n=nm(t))}if(t||n)e.resolvedTypePredicate=t&&DD(t)?function(e,t){const n=e.parameterName,r=e.type&&Mx(e.type);return 197===n.kind?Ff(e.assertsModifier?2:0,void 0,void 0,r):Ff(e.assertsModifier?3:1,n.escapedText,N(t.parameters,e=>e.escapedName===n.escapedText),r)}(t,e):n||ei;else if(e.declaration&&g_(e.declaration)&&(!e.resolvedReturnType||16&e.resolvedReturnType.flags)&&gj(e)>0){const{declaration:t}=e;e.resolvedTypePredicate=ei,e.resolvedTypePredicate=function(e){switch(e.kind){case 176:case 177:case 178:return}if(0!==$h(e))return;let t;if(e.body&&241!==e.body.kind)t=e.body;else{if(jf(e.body,e=>{if(t||!e.expression)return!0;t=e.expression})||!t||$j(e))return}return function(e,t){t=mh(t,!0);return 16&SL(t).flags?h(e.parameters,(n,r)=>{const i=Kl(n.symbol);if(!i||16&i.flags||!QN(n.name)||QD(n.symbol)||Qu(n))return;const o=function(e,t,n,r){const i=t.flowNode||253===t.parent.kind&&t.parent.flowNode||$R(2,void 0,void 0),o=$R(32,t,i),a=qD(n.name,r,r,e,o);if(a===r)return;const s=$R(64,t,i),c=qD(n.name,r,a,e,s);return 131072&c.flags?a:void 0}(e,t,n,i);return o?Ff(1,Cc(n.name.escapedText),r,o):void 0}):void 0}(e,t)}(t)||ei}else e.resolvedTypePredicate=ei}Tn.assert(!!e.resolvedTypePredicate)}var t,n;return e.resolvedTypePredicate===ei?void 0:e.resolvedTypePredicate}function im(e,t,n){return 2097152!==t?dv(e,n):Nv(e)}function mm(e){if(!e.resolvedReturnType){if(!_c(e,3))return wt;let t=e.target?hS(mm(e.target),e.mapper):e.compositeSignatures?hS(im(M(e.compositeSignatures,mm),e.compositeKind,2),e.mapper):km(e.declaration)||(Ld(e.declaration.body)?St:zj(e.declaration));if(8&e.flags?t=LC(t):16&e.flags&&(t=DC(t)),!mc()){if(e.declaration){const t=Fv(e.declaration);if(t)So(t,Ca.Return_type_annotation_circularly_references_itself);else if(Q){const t=e.declaration,n=jc(t);n?So(n,Ca._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Rp(n)):So(t,Ca.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}t=St}e.resolvedReturnType??(e.resolvedReturnType=t)}return e.resolvedReturnType}function km(e){if(176===e.kind)return L_(ts(e.parent.symbol));const t=Fv(e);if(mF(e)){const n=eh(e);if(n&&SD(n.parent)&&!t)return L_(ts(n.parent.parent.symbol))}if(Lg(e))return Mx(e.parameters[0].type);if(t)return Mx(t);if(177===e.kind&&mu(e)){const t=zm(e)&&Hc(e);if(t)return t;const n=jl(id(rs(e),178));if(n)return n}return function(e){const t=Hf(e);return t&&mm(t)}(e)}function Tm(e){return e.compositeSignatures&&ee(e.compositeSignatures,Tm)||!e.resolvedReturnType&&uc(e,3)>=0}function Cm(e){if(tJ(e)){const t=Kl(e.parameters[e.parameters.length-1]),n=$T(t)?eC(t):t;return n&&Sf(n,zt)}}function Dm(e,t,n,r){const i=Rm(e,Of(t,e.typeParameters,If(e.typeParameters),n));if(r){const e=nO(mm(i));if(e){const t=Du(e);t.typeParameters=r;const n=Du(i);return n.resolvedReturnType=Zm(t),n}}return i}function Rm(e,t){const n=e.instantiations||(e.instantiations=new Map),r=Ig(t);let i=n.get(r);return i||n.set(r,i=Jm(e,t)),i}function Jm(e,t){return iS(e,function(e,t){return $x(e.typeParameters,t)}(e,t),!0)}function Um(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return iS(e,Yx(e.typeParameters),!0)}(e)):e}function Hm(e){return e.typeParameters?e.canonicalSignatureCache||(e.canonicalSignatureCache=function(e){return Dm(e,M(e.typeParameters,e=>e.target&&!Gd(e.target)?e.target:e),zm(e.declaration))}(e)):e}function Xm(e){return e.typeParameters?e.implementationSignatureCache||(e.implementationSignatureCache=function(e){return e.typeParameters?iS(e,$x([],[])):e}(e)):e}function Qm(e){const t=e.typeParameters;if(t){if(e.baseSignatureCache)return e.baseSignatureCache;const n=Yx(t),r=$x(t,M(t,e=>Gd(e)||Ft));let i=M(t,e=>hS(e,r)||Ft);for(let e=0;e{bg(e)&&!pf(t,e)&&t.push(mg(e,n.type?Mx(n.type):St,Vv(n,8),n))})}return t}return p}function bg(e){return!!(4108&e.flags)||Lb(e)||!!(2097152&e.flags)&&!Rb(e)&&ee(e.types,bg)}function Cg(e){return $(O(e.symbol&&e.symbol.declarations,fD),Sl)[0]}function Ng(e,t){var n;let r;if(null==(n=e.symbol)?void 0:n.declarations)for(const n of e.symbol.declarations)if(195===n.parent.kind){const[i=n.parent,o]=ph(n.parent.parent);if(183!==o.kind||t){if(169===o.kind&&o.dotDotDotToken||191===o.kind||202===o.kind&&o.dotDotDotToken)r=pe(r,jy(Ft));else if(204===o.kind)r=pe(r,Jt);else if(168===o.kind&&200===o.parent.kind)r=pe(r,sn);else if(200===o.kind&&o.type&&mh(o.type)===n.parent&&194===o.parent.kind&&o.parent.extendsType===o&&200===o.parent.checkType.kind&&o.parent.checkType.type){const e=o.parent.checkType;r=pe(r,hS(Mx(e.type),Kx(q_(rs(e.typeParameter)),e.typeParameter.constraint?Mx(e.typeParameter.constraint):sn)))}}else{const t=o,n=rM(t);if(n){const o=t.typeArguments.indexOf(i);if(o()=>eM(t,n,r))));o!==e&&(r=pe(r,o))}}}}}return r&&Nv(r)}function Pg(e){if(!e.constraint)if(e.target){const t=Gd(e.target);e.constraint=t?hS(t,e.mapper):On}else{const t=Cg(e);if(t){let n=Mx(t);1&n.flags&&!Pc(n)&&(n=200===t.parent.parent.kind?sn:Ft),e.constraint=n}else e.constraint=Ng(e)||On}return e.constraint===On?void 0:e.constraint}function Eg(e){const t=id(e.symbol,168),n=IF(t.parent)?Gg(t.parent):t.parent;return n&&is(n)}function Ig(e){let t="";if(e){const n=e.length;let r=0;for(;r1&&(t+=":"+o),r+=o}}return t}function Og(e,t){return e?`@${GB(e)}`+(t?`:${Ig(t)}`:""):""}function Bg(e,t){let n=0;for(const r of e)void 0!==t&&r.flags&t||(n|=Ox(r));return 458752&n}function Jg(e,t){return ee(t)&&e===An?Ft:qg(e,t)}function qg(e,t){const n=Ig(t);let r=e.instantiations.get(n);return r||(r=vs(4,e.symbol),e.instantiations.set(n,r),r.objectFlags|=t?Bg(t):0,r.target=e,r.resolvedTypeArguments=t),r}function Wg(e){const t=gs(e.flags,e.symbol);return t.objectFlags=e.objectFlags,t.target=e.target,t.resolvedTypeArguments=e.resolvedTypeArguments,t}function $g(e,t,n,r,i){if(!r){const e=_x(r=lx(t));i=n?Jx(e,n):e}const o=vs(4,e.symbol);return o.target=e,o.node=t,o.mapper=n,o.aliasSymbol=r,o.aliasTypeArguments=i,o}function Hg(e){var t,n;if(!e.resolvedTypeArguments){if(!_c(e,5))return(null==(t=e.target.localTypeParameters)?void 0:t.map(()=>wt))||p;const i=e.node,o=i?183===i.kind?ne(e.target.outerTypeParameters,tM(i,e.target.localTypeParameters)):188===i.kind?[Mx(i.elementType)]:M(i.elements,Mx):p;mc()?e.resolvedTypeArguments??(e.resolvedTypeArguments=e.mapper?Jx(o,e.mapper):o):(e.resolvedTypeArguments??(e.resolvedTypeArguments=(null==(n=e.target.localTypeParameters)?void 0:n.map(()=>wt))||p),So(e.node||r,e.target.symbol?Ca.Type_arguments_for_0_circularly_reference_themselves:Ca.Tuple_type_arguments_circularly_reference_themselves,e.target.symbol&&Hs(e.target.symbol)))}return e.resolvedTypeArguments}function nh(e){return g(e.target.typeParameters)}function rh(e,t){const n=U_(ts(t)),r=n.localTypeParameters;if(r){const t=g(e.typeArguments),i=If(r),o=zm(e);if(!(!Q&&o)&&(tr.length)){const t=o&&CP(e)&&!gF(e.parent);if(So(e,i===r.length?t?Ca.Expected_0_type_arguments_provide_these_with_an_extends_tag:Ca.Generic_type_0_requires_1_type_argument_s:t?Ca.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:Ca.Generic_type_0_requires_between_1_and_2_type_arguments,Gs(n,void 0,2),i,r.length),!o)return wt}if(183===e.kind&&zy(e,g(e.typeArguments)!==r.length))return $g(n,e,void 0);return qg(n,ne(n.outerTypeParameters,Of(Hh(e),r,i,o)))}return Uh(e,t)?n:wt}function ih(e,t,n,r){const i=U_(e);if(i===Et){const n=WB.get(e.escapedName);if(void 0!==n&&t&&1===t.length)return 4===n?Fh(t[0]):cb(e,t[0])}const o=$o(e),a=o.typeParameters,s=Ig(t)+Og(n,r);let c=o.instantiations.get(s);return c||o.instantiations.set(s,c=bS(i,$x(a,Of(t,a,If(a),zm(e.valueDeclaration))),n,r)),c}function ch(e){var t;const n=null==(t=e.declarations)?void 0:t.find(Rg);return!(!n||!rm(n))}function _h(e){return e.parent?`${_h(e.parent)}.${e.escapedName}`:e.escapedName}function vh(e){const t=(166===e.kind?e.right:211===e.kind?e.name:e).escapedText;if(t){const n=166===e.kind?vh(e.left):211===e.kind?vh(e.expression):void 0,r=n?`${_h(n)}.${t}`:t;let i=vt.get(r);return i||(vt.set(r,i=Eo(524288,t,1048576)),i.parent=n,i.links.declaredType=Nt),i}return ht}function xh(e,t,n){const r=function(e){switch(e.kind){case 183:return e.typeName;case 233:const t=e.expression;if(Cb(t))return t}}(e);if(!r)return ht;const i=Ma(r,t,n);return i&&i!==ht?i:n?ht:vh(r)}function Sh(e,t){if(t===ht)return wt;if(96&(t=function(e){const t=e.valueDeclaration;if(!t||!zm(t)||524288&e.flags||ig(t,!1))return;const n=eE(t)?ng(t):rg(t);if(n){const t=is(n);if(t)return BO(t,e)}}(t)||t).flags)return rh(e,t);if(524288&t.flags)return function(e,t){if(1048576&xx(t)){const n=Hh(e),r=Og(t,n);let i=bt.get(r);return i||(i=ys(1,"error",void 0,`alias ${r}`),i.aliasSymbol=t,i.aliasTypeArguments=n,bt.set(r,i)),i}const n=U_(t),r=$o(t).typeParameters;if(r){const n=g(e.typeArguments),i=If(r);if(nr.length)return So(e,i===r.length?Ca.Generic_type_0_requires_1_type_argument_s:Ca.Generic_type_0_requires_between_1_and_2_type_arguments,Hs(t),i,r.length),wt;const o=lx(e);let a,s=!o||!ch(t)&&ch(o)?void 0:o;if(s)a=_x(s);else if(Wu(e)){const t=xh(e,2097152,!0);if(t&&t!==ht){const n=Ea(t);n&&524288&n.flags&&(s=n,a=Hh(e)||(r?[]:void 0))}}return ih(t,Hh(e),s,a)}return Uh(e,t)?n:wt}(e,t);const n=G_(t);if(n)return Uh(e,t)?vx(n):wt;if(111551&t.flags&&qh(e)){const n=function(e,t){const n=Ho(e);if(!n.resolvedJSDocType){const r=Kl(t);let i=r;if(t.valueDeclaration){const n=205===e.kind&&e.qualifier;r.symbol&&r.symbol!==t&&n&&(i=Sh(e,r.symbol))}n.resolvedJSDocType=i}return n.resolvedJSDocType}(e,t);return n||(xh(e,788968),Kl(t))}return wt}function Fh(e){return Ih(e)?Mh(e,Ft):e}function Ih(e){return!!(3145728&e.flags&&ee(e.types,Ih)||33554432&e.flags&&!jh(e)&&Ih(e.baseType)||524288&e.flags&&!yk(e)||432275456&e.flags&&!Lb(e))}function jh(e){return!!(33554432&e.flags&&2&e.constraint.flags)}function Lh(e,t){return 3&t.flags||t===e||1&e.flags?e:Mh(e,t)}function Mh(e,t){const n=`${rv(e)}>${rv(t)}`,r=at.get(n);if(r)return r;const i=ms(33554432);return i.baseType=e,i.constraint=t,at.set(n,i),i}function Rh(e){return jh(e)?e.baseType:Nv([e.constraint,e.baseType])}function Bh(e){return 189===e.kind&&1===e.elements.length}function Jh(e,t,n){return Bh(t)&&Bh(n)?Jh(e,t.elements[0],n.elements[0]):Yb(Mx(t))===Yb(e)?Mx(n):void 0}function qh(e){return!!(16777216&e.flags)&&(183===e.kind||205===e.kind)}function Uh(e,t){return!e.typeArguments||(So(e,Ca.Type_0_is_not_generic,t?Hs(t):e.typeName?Rp(e.typeName):jB),!1)}function Vh(e){if(QN(e.typeName)){const t=e.typeArguments;switch(e.typeName.escapedText){case"String":return Uh(e),Jt;case"Number":return Uh(e),zt;case"Boolean":return Uh(e),Gt;case"Void":return Uh(e),Yt;case"Undefined":return Uh(e),At;case"Null":return Uh(e),Rt;case"Function":case"function":return Uh(e),Hn;case"array":return t&&t.length||Q?void 0:rr;case"promise":return t&&t.length||Q?void 0:Rj(St);case"Object":if(t&&2===t.length){if(Wm(e)){const e=Mx(t[0]),n=Mx(t[1]),r=e===Jt||e===zt?[mg(e,n,!1)]:p;return Cs(void 0,x,p,p,r)}return St}return Uh(e),Q?void 0:St}}}function Wh(e){const t=Ho(e);if(!t.resolvedType){if(Il(e)&&ru(e.parent))return t.resolvedSymbol=ht,t.resolvedType=SL(e.parent.expression);let n,r;const i=788968;qh(e)&&(r=Vh(e),r||(n=xh(e,i,!0),n===ht?n=xh(e,111551|i):xh(e,i),r=Sh(e,n))),r||(n=xh(e,i),r=Sh(e,n)),t.resolvedSymbol=n,t.resolvedType=r}return t.resolvedType}function Hh(e){return M(e.typeArguments,Mx)}function Gh(e){const t=Ho(e);if(!t.resolvedType){const n=ej(e);t.resolvedType=vx(YC(n))}return t.resolvedType}function ny(e,t){function n(e){const t=e.declarations;if(t)for(const e of t)switch(e.kind){case 263:case 264:case 266:return e}}if(!e)return t?An:wn;const r=U_(e);return 524288&r.flags?g(r.typeParameters)!==t?(So(n(e),Ca.Global_type_0_must_have_1_type_parameter_s,Dc(e),t),t?An:wn):r:(So(n(e),Ca.Global_type_0_must_be_a_class_or_interface_type,Dc(e)),t?An:wn)}function oy(e,t){return cy(e,111551,t?Ca.Cannot_find_global_value_0:void 0)}function ay(e,t){return cy(e,788968,t?Ca.Cannot_find_global_type_0:void 0)}function sy(e,t,n){const r=cy(e,788968,n?Ca.Cannot_find_global_type_0:void 0);if(r&&(U_(r),g($o(r).typeParameters)!==t)){return void So(r.declarations&&C(r.declarations,oE),Ca.Global_type_0_must_have_1_type_parameter_s,Dc(r),t)}return r}function cy(e,t,n){return Le(void 0,e,t,n,!1,!1)}function _y(e,t,n){const r=ay(e,n);return r||n?ny(r,t):void 0}function gy(){return Pr||(Pr=_y("ImportMeta",0,!0)||wn)}function hy(){if(!Er){const e=Eo(0,"ImportMetaExpression"),t=gy(),n=Eo(4,"meta",8);n.parent=e,n.links.type=t;const r=ad([n]);e.members=r,Er=Cs(e,r,p,p,p)}return Er}function yy(e){return Fr||(Fr=_y("ImportCallOptions",0,e))||wn}function vy(e){return Ar||(Ar=_y("ImportAttributes",0,e))||wn}function by(e){return sr||(sr=oy("Symbol",e))}function xy(){return _r||(_r=_y("Symbol",0,!1))||wn}function Sy(e){return dr||(dr=_y("Promise",1,e))||An}function ky(e){return pr||(pr=_y("PromiseLike",1,e))||An}function Ty(e){return fr||(fr=oy("Promise",e))}function Ny(e){return Tr||(Tr=_y("AsyncIterable",1,e))||An}function Dy(e){return yr||(yr=_y("Iterable",1,e))||An}function Py(e){return Ir||(Ir=_y("Disposable",0,e))||wn}function Ey(e,t=0){const n=cy(e,788968,void 0);return n&&ny(n,t)}function Fy(e){return Mr||(Mr=sy("Awaited",1,e)||(e?ht:void 0)),Mr===ht?void 0:Mr}function Ay(e,t){return e!==An?qg(e,t):wn}function Iy(e){return Ay(ur||(ur=_y("TypedPropertyDescriptor",1,!0)||An),[e])}function Oy(e){return Ay(Dy(!0),[e])}function jy(e,t){return Ay(t?Qn:Xn,[e])}function Ly(e){switch(e.kind){case 190:return 2;case 191:return Ry(e);case 202:return e.questionToken?2:e.dotDotDotToken?Ry(e):1;default:return 1}}function Ry(e){return jx(e.type)?4:8}function By(e){const t=function(e){return WD(e)&&148===e.operator}(e.parent);if(jx(e))return t?Qn:Xn;return Hy(M(e.elements,Ly),t,M(e.elements,Jy))}function Jy(e){return LD(e)||mD(e)?e:void 0}function zy(e,t){return!!lx(e)||qy(e)&&(188===e.kind?Uy(e.elementType):189===e.kind?ee(e.elements,Uy):t||ee(e.typeArguments,Uy))}function qy(e){const t=e.parent;switch(t.kind){case 196:case 202:case 183:case 192:case 193:case 199:case 194:case 198:case 188:case 189:return qy(t);case 265:return!0}return!1}function Uy(e){switch(e.kind){case 183:return qh(e)||!!(524288&xh(e,788968).flags);case 186:return!0;case 198:return 158!==e.operator&&Uy(e.type);case 196:case 190:case 202:case 316:case 314:case 315:case 309:return Uy(e.type);case 191:return 188!==e.type.kind||Uy(e.type.elementType);case 192:case 193:return ee(e.types,Uy);case 199:return Uy(e.objectType)||Uy(e.indexType);case 194:return Uy(e.checkType)||Uy(e.extendsType)||Uy(e.trueType)||Uy(e.falseType)}return!1}function Vy(e,t,n=!1,r=[]){const i=Hy(t||M(e,e=>1),n,r);return i===An?wn:e.length?Ky(i,e):i}function Hy(e,t,n){if(1===e.length&&4&e[0])return t?Qn:Xn;const r=M(e,e=>1&e?"#":2&e?"?":4&e?".":"*").join()+(t?"R":"")+(ee(n,e=>!!e)?","+M(n,e=>e?KB(e):"_").join(","):"");let i=Ue.get(r);return i||Ue.set(r,i=function(e,t,n){const r=e.length,i=I(e,e=>!!(9&e));let o;const a=[];let s=0;if(r){o=new Array(r);for(let i=0;i!!(8&e.elementFlags[n]&&1179648&t.flags));if(n>=0)return Ev(M(t,(t,n)=>8&e.elementFlags[n]?t:Ft))?WN(t[n],r=>Gy(e,Oe(t,n,r))):wt}const s=[],c=[],l=[];let _=-1,u=-1,d=-1;for(let c=0;c=1e4)return So(r,Af(r)?Ca.Type_produces_a_tuple_type_that_is_too_large_to_represent:Ca.Expression_produces_a_tuple_type_that_is_too_large_to_represent),wt;h(e,(e,t)=>{var n;return f(e,l.target.elementFlags[t],null==(n=l.target.labeledElementDeclarations)?void 0:n[t])})}else f(lT(l)&&Sf(l,zt)||wt,4,null==(o=e.labeledElementDeclarations)?void 0:o[c]);else f(l,_,null==(a=e.labeledElementDeclarations)?void 0:a[c])}for(let e=0;e<_;e++)2&c[e]&&(c[e]=1);u>=0&&u8&c[u+t]?Hb(e,zt):e)),s.splice(u+1,d-u),c.splice(u+1,d-u),l.splice(u+1,d-u));const p=Hy(c,e.readonly,l);return p===An?wn:c.length?qg(p,s):p;function f(e,t,n){1&t&&(_=c.length),4&t&&u<0&&(u=c.length),6&t&&(d=c.length),s.push(2&t?Xc(e,!0):e),c.push(t),l.push(n)}}function Yy(e,t,n=0){const r=e.target,i=nh(e)-n;return t>r.fixedLength?function(e){const t=eC(e);return t&&jy(t)}(e)||Vy(p):Vy(Hg(e).slice(t,i),r.elementFlags.slice(t,i),!1,r.labeledElementDeclarations&&r.labeledElementDeclarations.slice(t,i))}function Zy(e){return dv(pe(Ve(e.target.fixedLength,e=>kx(""+e)),ib(e.target.readonly?Qn:Xn)))}function ev(e,t){return e.elementFlags.length-D(e.elementFlags,e=>!(e&t))-1}function tv(e){return e.fixedLength+ev(e,3)}function nv(e){const t=Hg(e),n=nh(e);return t.length===n?t:t.slice(0,n)}function rv(e){return e.id}function iv(e,t){return je(e,t,rv,It)>=0}function ov(e,t){const n=je(e,t,rv,It);return n<0&&(e.splice(~n,0,t),!0)}function av(e,t,n){const r=n.flags;if(!(131072&r))if(t|=473694207&r,465829888&r&&(t|=33554432),2097152&r&&67108864&Ox(n)&&(t|=536870912),n===Tt&&(t|=8388608),Pc(n)&&(t|=1073741824),!V&&98304&r)65536&Ox(n)||(t|=4194304);else{const t=e.length,r=t&&n.id>e[t-1].id?~t:je(e,n,rv,It);r<0&&e.splice(~r,0,n)}return t}function sv(e,t,n){let r;for(const i of n)i!==r&&(t=1048576&i.flags?sv(e,t|(lv(i)?1048576:0),i.types):av(e,t,i),r=i);return t}function cv(e,t){return 134217728&t.flags?Ow(e,t):Fw(e,t)}function lv(e){return!!(1048576&e.flags&&(e.aliasSymbol||e.origin))}function _v(e,t){for(const n of t)if(1048576&n.flags){const t=n.origin;n.aliasSymbol||t&&!(1048576&t.flags)?he(e,n):t&&1048576&t.flags&&_v(e,t.types)}}function uv(e,t){const n=hs(e);return n.types=t,n}function dv(e,t=1,n,r,i){if(0===e.length)return Zt;if(1===e.length)return e[0];if(2===e.length&&!i&&(1048576&e[0].flags||1048576&e[1].flags)){const i=0===t?"N":2===t?"S":"L",o=e[0].id=2&&a[0]===At&&a[1]===jt&&tn(a,1),(402664352&s||16384&s&&32768&s)&&function(e,t,n){let r=e.length;for(;r>0;){r--;const i=e[r],o=i.flags;(402653312&o&&4&t||256&o&&8&t||2048&o&&64&t||8192&o&&4096&t||n&&32768&o&&16384&t||bx(i)&&iv(e,i.regularType))&&tn(e,r)}}(a,s,!!(2&t)),128&s&&402653184&s&&function(e){const t=O(e,Lb);if(t.length){let n=e.length;for(;n>0;){n--;const r=e[n];128&r.flags&&ee(t,e=>cv(r,e))&&tn(e,n)}}}(a),536870912&s&&function(e){const t=[];for(const n of e)if(2097152&n.flags&&67108864&Ox(n)){const e=8650752&n.types[0].flags?0:1;he(t,n.types[e])}for(const n of t){const t=[];for(const r of e)if(2097152&r.flags&&67108864&Ox(r)){const e=8650752&r.types[0].flags?0:1;r.types[e]===n&&ov(t,r.types[1-e])}if(zN(op(n),e=>iv(t,e))){let r=e.length;for(;r>0;){r--;const i=e[r];if(2097152&i.flags&&67108864&Ox(i)){const o=8650752&i.types[0].flags?0:1;i.types[o]===n&&iv(t,i.types[1-o])&&tn(e,r)}}ov(e,n)}}}(a),2===t&&(a=function(e,t){var n;if(e.length<2)return e;const i=Ig(e),o=st.get(i);if(o)return o;const a=t&&ee(e,e=>!!(524288&e.flags)&&!zd(e)&&gk(Ud(e))),s=e.length;let c=s,l=0;for(;c>0;){c--;const t=e[c];if(a||469499904&t.flags){if(262144&t.flags&&1048576&sp(t).flags){kk(t,dv(M(e,e=>e===t?Zt:e)),co)&&tn(e,c);continue}const i=61603840&t.flags?C(Hd(t),e=>xT(Kl(e))):void 0,o=i&&vx(Kl(i));for(const a of e)if(t!==a){if(1e5===l&&l/(s-c)*s>1e6)return null==(n=cr)||n.instant(cr.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:e.map(e=>e.id)}),void So(r,Ca.Expression_produces_a_union_type_that_is_too_complex_to_represent);if(l++,i&&61603840&a.flags){const e=yc(a,i.escapedName);if(e&&xT(e)&&vx(e)!==o)continue}if(kk(t,a,co)&&(!(1&Ox(e_(t)))||!(1&Ox(e_(a)))||qS(t,a))){tn(e,c);break}}}}return st.set(i,e),e}(a,!!(524288&s)),!a))return wt;if(0===a.length)return 65536&s?4194304&s?Rt:Bt:32768&s?4194304&s?At:Ot:Zt}if(!o&&1048576&s){const t=[];_v(t,e);const r=[];for(const e of a)ee(t,t=>iv(t.types,e))||r.push(e);if(!n&&1===t.length&&0===r.length)return t[0];if(Me(t,(e,t)=>e+t.types.length,0)+r.length===a.length){for(const e of t)ov(r,e);o=uv(1048576,r)}}return mv(a,(36323331&s?0:32768)|(2097152&s?16777216:0),n,i,o)}function fv(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function mv(e,t,n,r,i){if(0===e.length)return Zt;if(1===e.length)return e[0];const o=(i?1048576&i.flags?`|${Ig(i.types)}`:2097152&i.flags?`&${Ig(i.types)}`:`#${i.type.id}|${Ig(e)}`:Ig(e))+Og(n,r);let a=$e.get(o);return a||(a=ms(1048576),a.objectFlags=t|Bg(e,98304),a.types=e,a.origin=i,a.aliasSymbol=n,a.aliasTypeArguments=r,2===e.length&&512&e[0].flags&&512&e[1].flags&&(a.flags|=16,a.intrinsicName="boolean"),$e.set(o,a)),a}function gv(e,t,n){const r=n.flags;return 2097152&r?hv(e,t,n.types):(yk(n)?16777216&t||(t|=16777216,e.set(n.id.toString(),n)):(3&r?(n===Tt&&(t|=8388608),Pc(n)&&(t|=1073741824)):!V&&98304&r||(n===jt&&(t|=262144,n=At),e.has(n.id.toString())||(109472&n.flags&&109472&t&&(t|=67108864),e.set(n.id.toString(),n))),t|=473694207&r),t)}function hv(e,t,n){for(const r of n)t=gv(e,t,vx(r));return t}function yv(e,t){for(const n of e)if(!iv(n.types,t)){const e=128&t.flags?Jt:288&t.flags?zt:2048&t.flags?qt:8192&t.flags?Qt:void 0;if(!e||!iv(n.types,e))return!1}return!0}function xv(e,t){for(let n=0;n!(e.flags&t))}function Nv(e,t=0,n,r){const i=new Map,o=hv(i,0,e),a=We(i.values());let s=0;if(131072&o)return E(a,en)?en:Zt;if(V&&98304&o&&84410368&o||67108864&o&&402783228&o||402653316&o&&67238776&o||296&o&&469891796&o||2112&o&&469889980&o||12288&o&&469879804&o||49152&o&&469842940&o)return Zt;if(402653184&o&&128&o&&function(e){let t=e.length;const n=O(e,e=>!!(128&e.flags));for(;t>0;){t--;const r=e[t];if(402653184&r.flags)for(const i of n){if(IS(i,r)){tn(e,t);break}if(Lb(r))return!0}}return!1}(a))return Zt;if(1&o)return 8388608&o?Tt:1073741824&o?wt:St;if(!V&&98304&o)return 16777216&o?Zt:32768&o?At:Rt;if((4&o&&402653312&o||8&o&&256&o||64&o&&2048&o||4096&o&&8192&o||16384&o&&32768&o||16777216&o&&470302716&o)&&(1&t||function(e,t){let n=e.length;for(;n>0;){n--;const r=e[n];(4&r.flags&&402653312&t||8&r.flags&&256&t||64&r.flags&&2048&t||4096&r.flags&&8192&t||16384&r.flags&&32768&t||yk(r)&&470302716&t)&&tn(e,n)}}(a,o)),262144&o&&(a[a.indexOf(At)]=jt),0===a.length)return Ft;if(1===a.length)return a[0];if(2===a.length&&!(2&t)){const e=8650752&a[0].flags?0:1,t=a[e],n=a[1-e];if(8650752&t.flags&&(469893116&n.flags&&!Mb(n)||16777216&o)){const e=op(t);if(e&&zN(e,e=>!!(469893116&e.flags)||yk(e))){if(MS(e,n))return t;if(!(1048576&e.flags&&JN(e,e=>MS(e,n))||MS(n,e)))return Zt;s=67108864}}}const c=Ig(a)+(2&t?"*":Og(n,r));let l=Ke.get(c);if(!l){if(1048576&o)if(function(e){let t;const n=N(e,e=>!!(32768&Ox(e)));if(n<0)return!1;let r=n+1;for(;r!!(1048576&e.flags&&32768&e.types[0].flags))){const e=ee(a,qC)?jt:At;xv(a,32768),l=dv([Nv(a,t),e],1,n,r)}else if(T(a,e=>!!(1048576&e.flags&&(65536&e.types[0].flags||65536&e.types[1].flags))))xv(a,65536),l=dv([Nv(a,t),Rt],1,n,r);else if(a.length>=4){const e=Math.floor(a.length/2);l=Nv([Nv(a.slice(0,e),t),Nv(a.slice(e),t)],t,n,r)}else{if(!Ev(a))return wt;const e=function(e,t){const n=Dv(e),r=[];for(let i=0;i=0;t--)if(1048576&e[t].flags){const r=e[t].types,i=r.length;n[t]=r[o%i],o=Math.floor(o/i)}const a=Nv(n,t);131072&a.flags||r.push(a)}return r}(a,t);l=dv(e,1,n,r,ee(e,e=>!!(2097152&e.flags))&&jv(e)>jv(a)?uv(2097152,a):void 0)}else l=function(e,t,n,r){const i=ms(2097152);return i.objectFlags=t|Bg(e,98304),i.types=e,i.aliasSymbol=n,i.aliasTypeArguments=r,i}(a,s,n,r);Ke.set(c,l)}return l}function Dv(e){return Me(e,(e,t)=>1048576&t.flags?e*t.types.length:131072&t.flags?0:e,1)}function Ev(e){var t;const n=Dv(e);return!(n>=1e5)||(null==(t=cr)||t.instant(cr.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:e.map(e=>e.id),size:n}),So(r,Ca.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1)}function Ov(e){return 3145728&e.flags&&!e.aliasSymbol?1048576&e.flags&&e.origin?Ov(e.origin):jv(e.types):1}function jv(e){return Me(e,(e,t)=>e+Ov(t),0)}function Lv(e,t){const n=ms(4194304);return n.type=e,n.indexFlags=t,n}function Mv(e,t){return 1&t?e.resolvedStringIndexType||(e.resolvedStringIndexType=Lv(e,1)):e.resolvedIndexType||(e.resolvedIndexType=Lv(e,0))}function Rv(e,t){const n=Td(e),r=Cd(e),i=wd(e.target||e);if(!(i||2&t))return r;const o=[];if(zb(r)){if(Od(e))return Mv(e,t);BN(r,s)}else if(Od(e)){xd(wp(jd(e)),8576,!!(1&t),s)}else BN(vd(r),s);const a=2&t?qN(dv(o),e=>!(5&e.flags)):dv(o);return 1048576&a.flags&&1048576&r.flags&&Ig(a.types)===Ig(r.types)?r:a;function s(t){const r=i?hS(i,tS(e.mapper,n,t)):t;o.push(r===Jt?an:r)}}function Bv(e){if(YN(e))return Zt;if(AN(e))return vx(zL(e));if(pD(e))return vx(sA(e));const t=Yh(e);return void 0!==t?kx(Cc(t)):nu(e)?vx(zL(e)):Zt}function Jv(e,t,n){if(n||!(6&Sx(e))){let n=$o(Su(e)).nameType;if(!n){const t=jc(e.valueDeclaration);n="default"===e.escapedName?kx("default"):t&&Bv(t)||(iy(e)?void 0:kx(Dc(e)))}if(n&&n.flags&t)return n}return Zt}function zv(e,t){return!!(e.flags&t||2097152&e.flags&&ee(e.types,e=>zv(e,t)))}function tb(e,t,n){const r=n&&(7&Ox(e)||e.aliasSymbol)?function(e){const t=hs(4194304);return t.type=e,t}(e):void 0;return dv(ne(M(Hd(e),e=>Jv(e,t)),M(bf(e),e=>e!==oi&&zv(e.keyType,t)?e.keyType===Jt&&8&t?an:e.keyType:Zt)),1,void 0,void 0,r)}function nb(e,t=0){return!!(58982400&e.flags||KT(e)||zd(e)&&(!function(e){const t=Td(e);return function e(n){return!!(470810623&n.flags)||(16777216&n.flags?n.root.isDistributive&&n.checkType===t:137363456&n.flags?T(n.types,e):8388608&n.flags?e(n.objectType)&&e(n.indexType):33554432&n.flags?e(n.baseType)&&e(n.constraint):!!(268435456&n.flags)&&e(n.type))}(wd(e)||t)}(e)||2===qd(e))||1048576&e.flags&&!(4&t)&&Gp(e)||2097152&e.flags&&oL(e,465829888)&&ee(e.types,yk))}function ib(e,t=0){return jh(e=Fp(e))?Fh(ib(e.baseType,t)):nb(e,t)?Mv(e,t):1048576&e.flags?Nv(M(e.types,e=>ib(e,t))):2097152&e.flags?dv(M(e.types,e=>ib(e,t))):32&Ox(e)?Rv(e,t):e===Tt?Tt:2&e.flags?Zt:131073&e.flags?sn:tb(e,(2&t?128:402653316)|(1&t?0:12584),0===t)}function ob(e){const t=(jr||(jr=sy("Extract",2,!0)||ht),jr===ht?void 0:jr);return t?ih(t,[e,Jt]):Jt}function ab(e,t){const n=N(t,e=>!!(1179648&e.flags));if(n>=0)return Ev(t)?WN(t[n],r=>ab(e,Oe(t,n,r))):wt;if(E(t,Tt))return Tt;const r=[],i=[];let o=e[0];if(!function e(t,n){for(let a=0;a""===e)){if(T(r,e=>!!(4&e.flags)))return Jt;if(1===r.length&&Lb(r[0]))return r[0]}const a=`${Ig(r)}|${M(i,e=>e.length).join(",")}|${i.join("")}`;let s=it.get(a);return s||it.set(a,s=function(e,t){const n=ms(134217728);return n.texts=e,n.types=t,n}(i,r)),s}function sb(e){return 128&e.flags?e.value:256&e.flags?""+e.value:2048&e.flags?ET(e.value):98816&e.flags?e.intrinsicName:void 0}function cb(e,t){return 1179648&t.flags?WN(t,t=>cb(e,t)):128&t.flags?kx(lb(e,t.value)):134217728&t.flags?ab(...function(e,t,n){switch(WB.get(e.escapedName)){case 0:return[t.map(e=>e.toUpperCase()),n.map(t=>cb(e,t))];case 1:return[t.map(e=>e.toLowerCase()),n.map(t=>cb(e,t))];case 2:return[""===t[0]?t:[t[0].charAt(0).toUpperCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[cb(e,n[0]),...n.slice(1)]:n];case 3:return[""===t[0]?t:[t[0].charAt(0).toLowerCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[cb(e,n[0]),...n.slice(1)]:n]}return[t,n]}(e,t.texts,t.types)):268435456&t.flags&&e===t.symbol?t:268435461&t.flags||zb(t)?db(e,t):kb(t)?db(e,ab(["",""],[t])):t}function lb(e,t){switch(WB.get(e.escapedName)){case 0:return t.toUpperCase();case 1:return t.toLowerCase();case 2:return t.charAt(0).toUpperCase()+t.slice(1);case 3:return t.charAt(0).toLowerCase()+t.slice(1)}return t}function db(e,t){const n=`${GB(e)},${rv(t)}`;let r=ot.get(n);return r||ot.set(n,r=function(e,t){const n=gs(268435456,e);return n.type=t,n}(e,t)),r}function pb(e){if(Q)return!1;if(4096&Ox(e))return!0;if(1048576&e.flags)return T(e.types,pb);if(2097152&e.flags)return ee(e.types,pb);if(465829888&e.flags){const t=lp(e);return t!==e&&pb(t)}return!1}function fb(e,t){return kC(e)?TC(e):t&&d_(t)?Yh(t):void 0}function mb(e,t){if(8208&t.flags){const n=xc(e.parent,e=>!qx(e))||e.parent;return H_(n)?K_(n)&&QN(e)&&_N(n,e):T(t.declarations,e=>!f_(e)||Do(e))}return!0}function vb(e,t,n,r,i,o){const a=i&&212===i.kind?i:void 0,s=i&&YN(i)?void 0:fb(n,i);if(void 0!==s){if(256&o)return TF(t,s)||St;const e=Zp(t,s);if(e){if(64&o&&i&&e.declarations&&No(e)&&mb(i,e)){Po((null==a?void 0:a.argumentExpression)??($D(i)?i.indexType:i),e.declarations,s)}if(a){if(AI(e,a,II(a.expression,t.symbol)),Zj(a,e,oh(a)))return void So(a.argumentExpression,Ca.Cannot_assign_to_0_because_it_is_a_read_only_property,Hs(e));if(8&o&&(Ho(i).resolvedSymbol=e),pI(a,e))return kt}const n=4&o?Hl(e):Kl(e);return a&&1!==oh(a)?qD(a,n):i&&$D(i)&&qC(n)?dv([n,At]):n}if(zN(t,$T)&&tC(s)){const e=+s;if(i&&zN(t,e=>!e.target.hasRestElement)&&!(16&o)){const n=Sb(i);if($T(t)){if(e<0)return So(n,Ca.A_tuple_type_cannot_be_indexed_with_a_negative_value),At;So(n,Ca.Tuple_type_0_of_length_1_has_no_element_at_index_2,Gs(t),nh(t),Cc(s))}else So(n,Ca.Property_0_does_not_exist_on_type_1,Cc(s),Gs(t))}if(e>=0)return c(xf(t,zt)),iC(t,e,1&o?jt:void 0)}}if(!(98304&n.flags)&&aL(n,402665900)){if(131073&t.flags)return t;const l=Tf(t,n)||xf(t,Jt);if(l){if(2&o&&l.keyType!==zt)return void(a&&(4&o?So(a,Ca.Type_0_is_generic_and_can_only_be_indexed_for_reading,Gs(e)):So(a,Ca.Type_0_cannot_be_used_to_index_type_1,Gs(n),Gs(e))));if(i&&l.keyType===Jt&&!aL(n,12)){return So(Sb(i),Ca.Type_0_cannot_be_used_as_an_index_type,Gs(n)),1&o?dv([l.type,jt]):l.type}return c(l),1&o&&!(t.symbol&&384&t.symbol.flags&&n.symbol&&1024&n.flags&&as(n.symbol)===t.symbol)?dv([l.type,jt]):l.type}if(131072&n.flags)return Zt;if(pb(t))return St;if(a&&!cL(t)){if(Bw(t)){if(Q&&384&n.flags)return io.add(Vp(a,Ca.Property_0_does_not_exist_on_type_1,n.value,Gs(t))),At;if(12&n.flags){return dv(pe(M(t.properties,e=>Kl(e)),At))}}if(t.symbol===fe&&void 0!==s&&fe.exports.has(s)&&418&fe.exports.get(s).flags)So(a,Ca.Property_0_does_not_exist_on_type_1,Cc(s),Gs(t));else if(Q&&!(128&o))if(void 0!==s&&TI(s,t)){const e=Gs(t);So(a,Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,s,e,e+"["+tp(a.argumentExpression)+"]")}else if(Sf(t,zt))So(a.argumentExpression,Ca.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let e;if(void 0!==s&&(e=DI(s,t)))void 0!==e&&So(a.argumentExpression,Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_2,s,Gs(t),e);else{const e=function(e,t,n){function r(t){const r=Wd(e,t);if(r){const e=eO(Kl(r));return!!e&&hj(e)>=1&&zS(n,dj(e,0))}return!1}const i=ah(t)?"set":"get";if(!r(i))return;let o=Pb(t.expression);void 0===o?o=i:o+="."+i;return o}(t,a,n);if(void 0!==e)So(a,Ca.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Gs(t),e);else{let e;if(1024&n.flags)e=yS(void 0,Ca.Property_0_does_not_exist_on_type_1,"["+Gs(n)+"]",Gs(t));else if(8192&n.flags){const r=La(n.symbol,a);e=yS(void 0,Ca.Property_0_does_not_exist_on_type_1,"["+r+"]",Gs(t))}else 128&n.flags||256&n.flags?e=yS(void 0,Ca.Property_0_does_not_exist_on_type_1,n.value,Gs(t)):12&n.flags&&(e=yS(void 0,Ca.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Gs(n),Gs(t)));e=yS(e,Ca.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Gs(r),Gs(t)),io.add(Hp(Dd(a),a,e))}}}return}}if(pb(t))return St;if(i){const e=Sb(i);384&n.flags?So(e,Ca.Property_0_does_not_exist_on_type_1,""+n.value,Gs(t)):12&n.flags?So(e,Ca.Type_0_has_no_matching_index_signature_for_type_1,Gs(t),Gs(n)):So(e,Ca.Type_0_cannot_be_used_as_an_index_type,Gs(n))}return Sc(n)?n:void 0;function c(e){e&&e.isReadonly&&a&&(ah(a)||gh(a))&&So(a,Ca.Index_signature_in_type_0_only_permits_reading,Gs(t))}}function Sb(e){return 212===e.kind?e.argumentExpression:199===e.kind?e.indexType:167===e.kind?e.expression:e}function kb(e){if(2097152&e.flags){let t=!1;for(const n of e.types)if(101248&n.flags||kb(n))t=!0;else if(!(524288&n.flags))return!1;return t}return!!(77&e.flags)||Lb(e)}function Lb(e){return!!(134217728&e.flags)&&T(e.types,kb)||!!(268435456&e.flags)&&kb(e.type)}function Mb(e){return!!(402653184&e.flags)&&!Lb(e)}function Rb(e){return!!qb(e)}function Jb(e){return!!(4194304&qb(e))}function zb(e){return!!(8388608&qb(e))}function qb(e){return 3145728&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|Me(e.types,(e,t)=>e|qb(t),0)),12582912&e.objectFlags):33554432&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|qb(e.baseType)|qb(e.constraint)),12582912&e.objectFlags):(58982400&e.flags||zd(e)||KT(e)?4194304:0)|(63176704&e.flags||Mb(e)?8388608:0)}function Ub(e,t){return 8388608&e.flags?function(e,t){const n=t?"simplifiedForWriting":"simplifiedForReading";if(e[n])return e[n]===jn?e:e[n];e[n]=jn;const r=Ub(e.objectType,t),i=Ub(e.indexType,t),o=function(e,t,n){if(1048576&t.flags){const r=M(t.types,t=>Ub(Hb(e,t),n));return n?Nv(r):dv(r)}}(r,i,t);if(o)return e[n]=o;if(!(465829888&i.flags)){const o=Vb(r,i,t);if(o)return e[n]=o}if(KT(r)&&296&i.flags){const o=oC(r,8&i.flags?0:r.target.fixedLength,0,t);if(o)return e[n]=o}if(zd(r)&&2!==qd(r))return e[n]=WN($b(r,e.indexType),e=>Ub(e,t));return e[n]=e}(e,t):16777216&e.flags?function(e,t){const n=e.checkType,r=e.extendsType,i=nx(e),o=rx(e);if(131072&o.flags&&Yb(i)===Yb(n)){if(1&n.flags||zS(kS(n),kS(r)))return Ub(i,t);if(Wb(n,r))return Zt}else if(131072&i.flags&&Yb(o)===Yb(n)){if(!(1&n.flags)&&zS(kS(n),kS(r)))return Zt;if(1&n.flags||Wb(n,r))return Ub(o,t)}return e}(e,t):e}function Vb(e,t,n){if(1048576&e.flags||2097152&e.flags&&!nb(e)){const r=M(e.types,e=>Ub(Hb(e,t),n));return 2097152&e.flags||n?Nv(r):dv(r)}}function Wb(e,t){return!!(131072&dv([Yu(e,t),Zt]).flags)}function $b(e,t){const n=$x([Td(e)],[t]),r=Zx(e.mapper,n),i=hS(Ad(e.target||e),r),o=Bd(e)>0||(Rb(e)?Jd(jd(e))>0:function(e,t){const n=op(t);return!!n&&ee(Hd(e),e=>!!(16777216&e.flags)&&zS(Jv(e,8576),n))}(e,t));return Xc(i,!0,o)}function Hb(e,t,n=0,r,i,o){return Gb(e,t,n,r,i,o)||(r?wt:Ft)}function Kb(e,t){return zN(e,e=>{if(384&e.flags){const n=TC(e);if(tC(n)){const e=+n;return e>=0&&e0&&!ee(e.elements,e=>MD(e)||RD(e)||LD(e)&&!(!e.questionToken&&!e.dotDotDotToken))}function ex(e,t){return Rb(e)||t&&$T(e)&&ee(nv(e),Rb)}function tx(e,t,n,i,o){let a,s,c=0;for(;;){if(1e3===c)return So(r,Ca.Type_instantiation_is_excessively_deep_and_possibly_infinite),wt;const _=hS(Yb(e.checkType),t),u=hS(e.extendsType,t);if(_===wt||u===wt)return wt;if(_===Tt||u===Tt)return Tt;const d=fh(e.node.checkType),p=fh(e.node.extendsType),f=Zb(d)&&Zb(p)&&g(d.elements)===g(p.elements),m=ex(_,f);let h;if(e.inferTypeParameters){const n=ow(e.inferTypeParameters,void 0,0);t&&(n.nonFixingMapper=Zx(n.nonFixingMapper,t)),m||Lw(n.inferences,_,u,1536),h=t?Zx(n.mapper,t):n.mapper}const y=h?hS(e.extendsType,h):u;if(!m&&!ex(y,f)){if(!(3&y.flags)&&(1&_.flags||!zS(SS(_),SS(y)))){(1&_.flags||n&&!(131072&y.flags)&&JN(SS(y),e=>zS(e,SS(_))))&&(s||(s=[])).push(hS(Mx(e.node.trueType),h||t));const r=Mx(e.node.falseType);if(16777216&r.flags){const n=r.root;if(n.node.parent===e.node&&(!n.isDistributive||n.checkType===e.checkType)){e=n;continue}if(l(r,t))continue}a=hS(r,t);break}if(3&y.flags||zS(kS(_),kS(y))){const n=Mx(e.node.trueType),r=h||t;if(l(n,r))continue;a=hS(n,r);break}}a=ms(16777216),a.root=e,a.checkType=hS(e.checkType,t),a.extendsType=hS(e.extendsType,t),a.mapper=t,a.combinedMapper=h,a.aliasSymbol=i||e.aliasSymbol,a.aliasTypeArguments=i?o:Jx(e.aliasTypeArguments,t);break}return s?dv(pe(s,a)):a;function l(n,r){if(16777216&n.flags&&r){const a=n.root;if(a.outerTypeParameters){const s=Zx(n.mapper,r),l=M(a.outerTypeParameters,e=>Hx(e,s)),_=$x(a.outerTypeParameters,l),u=a.isDistributive?Hx(a.checkType,_):void 0;if(!(u&&u!==a.checkType&&1179648&u.flags))return e=a,t=_,i=void 0,o=void 0,a.aliasSymbol&&c++,!0}}return!1}}function nx(e){return e.resolvedTrueType||(e.resolvedTrueType=hS(Mx(e.root.node.trueType),e.mapper))}function rx(e){return e.resolvedFalseType||(e.resolvedFalseType=hS(Mx(e.root.node.falseType),e.mapper))}function ix(e){let t;return e.locals&&e.locals.forEach(e=>{262144&e.flags&&(t=pe(t,U_(e)))}),t}function ox(e){return QN(e)?[e]:pe(ox(e.left),e.right)}function ax(e){var t;const n=Ho(e);if(!n.resolvedType){if(!yf(e))return So(e.argument,Ca.String_literal_expected),n.resolvedSymbol=ht,n.resolvedType=wt;const r=e.isTypeOf?111551:16777216&e.flags?900095:788968,i=Ba(e,e.argument.literal);if(!i)return n.resolvedSymbol=ht,n.resolvedType=wt;const o=!!(null==(t=i.exports)?void 0:t.get("export=")),a=Ua(i,!1);if(Ld(e.qualifier))if(a.flags&r)n.resolvedType=sx(e,n,a,r);else{So(e,111551===r?Ca.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:Ca.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0,e.argument.literal.text),n.resolvedSymbol=ht,n.resolvedType=wt}else{const t=ox(e.qualifier);let i,s=a;for(;i=t.shift();){const a=t.length?1920:r,c=ts(Pa(s)),l=e.isTypeOf||zm(e)&&o?Zp(Kl(c),i.escapedText,!1,!0):void 0,_=(e.isTypeOf?void 0:Ko(Qa(c),i.escapedText,a))??l;if(!_)return So(i,Ca.Namespace_0_has_no_exported_member_1,La(s),Rp(i)),n.resolvedType=wt;Ho(i).resolvedSymbol=_,Ho(i.parent).resolvedSymbol=_,s=_}n.resolvedType=sx(e,n,s,r)}}return n.resolvedType}function sx(e,t,n,r){const i=Pa(n);return t.resolvedSymbol=i,111551===r?tj(Kl(n),e):Sh(e,i)}function cx(e){const t=Ho(e);if(!t.resolvedType){const n=lx(e);if(0!==xu(e.symbol).size||n){let r=vs(16,e.symbol);r.aliasSymbol=n,r.aliasTypeArguments=_x(n),fF(e)&&e.isArrayType&&(r=jy(r)),t.resolvedType=r}else t.resolvedType=Pn}return t.resolvedType}function lx(e){let t=e.parent;for(;UD(t)||ZE(t)||WD(t)&&148===t.operator;)t=t.parent;return Rg(t)?rs(t):void 0}function _x(e){return e?c_(e):void 0}function ux(e){return!!(524288&e.flags)&&!zd(e)}function dx(e){return hk(e)||!!(474058748&e.flags)}function px(e,t){if(!(1048576&e.flags))return e;if(T(e.types,dx))return C(e.types,hk)||wn;const n=C(e.types,e=>!dx(e));if(!n)return e;return C(e.types,e=>e!==n&&!dx(e))?e:function(e){const n=ad();for(const r of Hd(e))if(6&Sx(r));else if(mx(r)){const e=65536&r.flags&&!(32768&r.flags),i=Eo(16777220,r.escapedName,bd(r)|(t?8:0));i.links.type=e?At:Xc(Kl(r),!0),i.declarations=r.declarations,i.links.nameType=$o(r).nameType,i.links.syntheticOrigin=r,n.set(r.escapedName,i)}const r=Cs(e.symbol,n,p,p,bf(e));return r.objectFlags|=131200,r}(n)}function fx(e,t,n,r,i){if(1&e.flags||1&t.flags)return St;if(2&e.flags||2&t.flags)return Ft;if(131072&e.flags)return t;if(131072&t.flags)return e;if(1048576&(e=px(e,i)).flags)return Ev([e,t])?WN(e,e=>fx(e,t,n,r,i)):wt;if(1048576&(t=px(t,i)).flags)return Ev([e,t])?WN(t,t=>fx(e,t,n,r,i)):wt;if(473960444&t.flags)return e;if(Jb(e)||Jb(t)){if(hk(e))return t;if(2097152&e.flags){const o=e.types,a=o[o.length-1];if(ux(a)&&ux(t))return Nv(ne(o.slice(0,o.length-1),[fx(a,t,n,r,i)]))}return Nv([e,t])}const o=ad(),a=new Set,s=e===wn?bf(t):Hu([e,t]);for(const e of Hd(t))6&Sx(e)?a.add(e.escapedName):mx(e)&&o.set(e.escapedName,gx(e,i));for(const t of Hd(e))if(!a.has(t.escapedName)&&mx(t))if(o.has(t.escapedName)){const e=o.get(t.escapedName),n=Kl(e);if(16777216&e.flags){const r=ne(t.declarations,e.declarations),i=Eo(4|16777216&t.flags,t.escapedName),a=Kl(t),s=UC(a),c=UC(n);i.links.type=s===c?a:dv([a,c],2),i.links.leftSpread=t,i.links.rightSpread=e,i.declarations=r,i.links.nameType=$o(t).nameType,o.set(t.escapedName,i)}}else o.set(t.escapedName,gx(t,i));const c=Cs(n,o,p,p,B(s,e=>function(e,t){return e.isReadonly!==t?mg(e.keyType,e.type,t,e.declaration):e}(e,i)));return c.objectFlags|=2228352|r,c}function mx(e){var t;return!(ee(e.declarations,o_)||106496&e.flags&&(null==(t=e.declarations)?void 0:t.some(e=>S_(e.parent))))}function gx(e,t){const n=65536&e.flags&&!(32768&e.flags);if(!n&&t===Yj(e))return e;const r=Eo(4|16777216&e.flags,e.escapedName,bd(e)|(t?8:0));return r.links.type=n?At:Kl(e),r.declarations=e.declarations,r.links.nameType=$o(e).nameType,r.links.syntheticOrigin=e,r}function hx(e,t,n,r){const i=gs(e,n);return i.value=t,i.regularType=r||i,i}function yx(e){if(2976&e.flags){if(!e.freshType){const t=hx(e.flags,e.value,e.symbol,e);t.freshType=t,e.freshType=t}return e.freshType}return e}function vx(e){return 2976&e.flags?e.regularType:1048576&e.flags?e.regularType||(e.regularType=WN(e,vx)):e}function bx(e){return!!(2976&e.flags)&&e.freshType===e}function kx(e){let t;return Ge.get(e)||(Ge.set(e,t=hx(128,e)),t)}function Nx(e){let t;return Ye.get(e)||(Ye.set(e,t=hx(256,e)),t)}function Dx(e){let t;const n=ET(e);return Ze.get(n)||(Ze.set(n,t=hx(2048,e)),t)}function Px(e,t,n){let r;const i=`${t}${"string"==typeof e?"@":"#"}${e}`,o=1024|("string"==typeof e?128:256);return et.get(i)||(et.set(i,r=hx(o,e,n)),r)}function Ex(e){if(zm(e)&&ZE(e)){const t=Zg(e);t&&(e=zg(t)||t)}if(Vf(e)){const t=Uf(e)?is(e.left):is(e);if(t){const e=$o(t);return e.uniqueESSymbolType||(e.uniqueESSymbolType=function(e){const t=gs(8192,e);return t.escapedName=`__@${t.symbol.escapedName}@${GB(t.symbol)}`,t}(t))}}return Qt}function Fx(e){const t=Ho(e);return t.resolvedType||(t.resolvedType=function(e){const t=lm(e,!1,!1),n=t&&t.parent;if(n&&(S_(n)||264===n.kind)&&!$v(t)&&(!SD(t)||hh(e,t.body)))return L_(rs(n)).thisType;if(n&&nP(n)&&yP(n.parent)&&6===dg(n.parent))return L_(is(n.parent.left).parent).thisType;const r=16777216&e.flags?Qg(e):void 0;return r&&_P(r)&&yP(r.parent)&&3===dg(r.parent)?L_(is(r.parent.left).parent).thisType:RO(t)&&hh(e,t.body)?L_(rs(t)).thisType:(So(e,Ca.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),wt)}(e)),t.resolvedType}function Ax(e){return Mx(jx(e.type)||e.type)}function jx(e){switch(e.kind){case 196:return jx(e.type);case 189:if(1===e.elements.length&&(191===(e=e.elements[0]).kind||202===e.kind&&e.dotDotDotToken))return jx(e.type);break;case 188:return e.elementType}}function Mx(e){return function(e,t){let n,r=!0;for(;t&&!wu(t)&&320!==t.kind;){const i=t.parent;if(169===i.kind&&(r=!r),(r||8650752&e.flags)&&194===i.kind&&t===i.trueType){const t=Jh(e,i.checkType,i.extendsType);t&&(n=pe(n,t))}else if(262144&e.flags&&200===i.kind&&!i.nameType&&t===i.type){const t=Mx(i);if(Td(t)===Yb(e)){const e=cS(t);if(e){const t=Gd(e);t&&zN(t,oT)&&(n=pe(n,dv([zt,gn])))}}}t=i}return n?Lh(e,Nv(n)):e}(Rx(e),e)}function Rx(e){switch(e.kind){case 133:case 312:case 313:return St;case 159:return Ft;case 154:return Jt;case 150:return zt;case 163:return qt;case 136:return Gt;case 155:return Qt;case 116:return Yt;case 157:return At;case 106:return Rt;case 146:return Zt;case 151:return 524288&e.flags&&!Q?St:on;case 141:return Et;case 197:case 110:return Fx(e);case 201:return function(e){if(106===e.literal.kind)return Rt;const t=Ho(e);return t.resolvedType||(t.resolvedType=vx(zL(e.literal))),t.resolvedType}(e);case 183:case 233:return Wh(e);case 182:return e.assertsModifier?Yt:Gt;case 186:return Gh(e);case 188:case 189:return function(e){const t=Ho(e);if(!t.resolvedType){const n=By(e);if(n===An)t.resolvedType=wn;else if(189===e.kind&&ee(e.elements,e=>!!(8&Ly(e)))||!zy(e)){const r=188===e.kind?[Mx(e.elementType)]:M(e.elements,Mx);t.resolvedType=Ky(n,r)}else t.resolvedType=189===e.kind&&0===e.elements.length?n:$g(n,e,void 0)}return t.resolvedType}(e);case 190:return function(e){return Xc(Mx(e.type),!0)}(e);case 192:return function(e){const t=Ho(e);if(!t.resolvedType){const n=lx(e);t.resolvedType=dv(M(e.types,Mx),1,n,_x(n))}return t.resolvedType}(e);case 193:return function(e){const t=Ho(e);if(!t.resolvedType){const n=lx(e),r=M(e.types,Mx),i=2===r.length?r.indexOf(Pn):-1,o=i>=0?r[1-i]:Ft,a=!!(76&o.flags||134217728&o.flags&&Lb(o));t.resolvedType=Nv(r,a?1:0,n,_x(n))}return t.resolvedType}(e);case 314:return function(e){const t=Mx(e.type);return V?NC(t,65536):t}(e);case 316:return Xc(Mx(e.type));case 202:return function(e){const t=Ho(e);return t.resolvedType||(t.resolvedType=e.dotDotDotToken?Ax(e):Xc(Mx(e.type),!0,!!e.questionToken))}(e);case 196:case 315:case 309:return Mx(e.type);case 191:return Ax(e);case 318:return function(e){const t=Mx(e.type),{parent:n}=e,r=e.parent.parent;if(ZE(e.parent)&&PF(r)){const e=Qg(r),n=vF(r.parent.parent);if(e||n){const i=Pe(n?r.parent.parent.typeExpression.parameters:e.parameters),o=Kg(r);if(!i||o&&i.symbol===o&&Qu(i))return jy(t)}}if(mD(n)&&_F(n.parent))return jy(t);return Xc(t)}(e);case 184:case 185:case 187:case 322:case 317:case 323:return cx(e);case 198:return function(e){const t=Ho(e);if(!t.resolvedType)switch(e.operator){case 143:t.resolvedType=ib(Mx(e.type));break;case 158:t.resolvedType=155===e.type.kind?Ex(uh(e.parent)):wt;break;case 148:t.resolvedType=Mx(e.type);break;default:Tn.assertNever(e.operator)}return t.resolvedType}(e);case 199:return Xb(e);case 200:return Qb(e);case 194:return function(e){const t=Ho(e);if(!t.resolvedType){const n=Mx(e.checkType),r=lx(e),i=_x(r),o=i_(e,!0),a=i?o:O(o,t=>sS(t,e)),s={node:e,checkType:n,extendsType:Mx(e.extendsType),isDistributive:!!(262144&n.flags),inferTypeParameters:ix(e),outerTypeParameters:a,instantiations:void 0,aliasSymbol:r,aliasTypeArguments:i};t.resolvedType=tx(s,void 0,!1),a&&(s.instantiations=new Map,s.instantiations.set(Ig(a),t.resolvedType))}return t.resolvedType}(e);case 195:return function(e){const t=Ho(e);return t.resolvedType||(t.resolvedType=q_(rs(e.typeParameter))),t.resolvedType}(e);case 203:return function(e){const t=Ho(e);return t.resolvedType||(t.resolvedType=ab([e.head.text,...M(e.templateSpans,e=>e.literal.text)],M(e.templateSpans,e=>Mx(e.type)))),t.resolvedType}(e);case 205:return ax(e);case 80:case 166:case 211:const t=xJ(e);return t?U_(t):wt;default:return wt}}function Bx(e,t,n){if(e&&e.length)for(let r=0;ree(n,t=>sS(e,t))):s,o.outerTypeParameters=s}if(s.length){const i=Zx(e.mapper,t),o=M(s,e=>Hx(e,i)),c=n||e.aliasSymbol,l=n?r:Jx(e.aliasTypeArguments,t),_=(134217728&e.objectFlags?"S":"")+Ig(o)+Og(c,l);a.instantiations||(a.instantiations=new Map,a.instantiations.set(Ig(s)+Og(a.aliasSymbol,a.aliasTypeArguments),a));let u=a.instantiations.get(_);if(!u){if(134217728&e.objectFlags)return u=dS(e,t),a.instantiations.set(_,u),u;const n=$x(s,o);u=4&a.objectFlags?$g(e.target,e.node,n,c,l):32&a.objectFlags?function(e,t,n,r){const i=cS(e);if(i){const e=hS(i,t);if(i!==e)return $N(Fp(e),o,n,r)}return hS(Cd(e),t)===Tt?Tt:dS(e,t,n,r);function o(n){if(61603843&n.flags&&n!==Tt&&!Pc(n)){if(!e.declaration.nameType){let r;if(rT(n)||1&n.flags&&uc(i,4)<0&&(r=Gd(i))&&zN(r,oT))return function(e,t,n){const r=uS(t,zt,!0,n);return Pc(r)?wt:jy(r,lS(iT(e),Rd(t)))}(n,e,eS(i,n,t));if($T(n))return function(e,t,n,r){const i=e.target.elementFlags,o=e.target.fixedLength,a=o?eS(n,e,r):r,s=M(nv(e),(e,s)=>{const c=i[s];return s1&e?2:e):8&c?M(i,e=>2&e?1:e):i,_=lS(e.target.readonly,Rd(t));return E(s,wt)?wt:Vy(s,l,_,e.target.labeledElementDeclarations)}(n,e,i,t);if(Tp(n))return Nv(M(n.types,o))}return dS(e,eS(i,n,t))}return n}}(a,n,c,l):dS(a,n,c,l),a.instantiations.set(_,u);const r=Ox(u);if(3899393&u.flags&&!(524288&r)){const e=ee(o,mw);524288&Ox(u)||(u.objectFlags|=52&r?524288|(e?1048576:0):e?0:524288)}}return u}return e}function sS(e,t){if(e.symbol&&e.symbol.declarations&&1===e.symbol.declarations.length){const r=e.symbol.declarations[0].parent;for(let e=t;e!==r;e=e.parent)if(!e||241===e.kind||194===e.kind&&KI(e.extendsType,n))return!0;return n(t)}return!0;function n(t){switch(t.kind){case 197:return!!e.isThisType;case 80:return!e.isThisType&&Af(t)&&function(e){return!(183===e.parent.kind&&e.parent.typeArguments&&e===e.parent.typeName||205===e.parent.kind&&e.parent.typeArguments&&e===e.parent.qualifier)}(t)&&Rx(t)===e;case 186:const r=wb(t.exprName);if(!Tv(r)){const i=Xw(r),o=e.symbol.declarations[0],a=168===o.kind?o.parent:e.isThisType?o:void 0;if(i.declarations&&a)return ee(i.declarations,e=>hh(e,a))||ee(t.typeArguments,n)}return!0;case 174:case 173:return!t.type&&!!t.body||ee(t.typeParameters,n)||ee(t.parameters,n)||!!t.type&&n(t.type)}return!!KI(t,n)}}function cS(e){const t=Cd(e);if(4194304&t.flags){const e=Yb(t.type);if(262144&e.flags)return e}}function lS(e,t){return!!(1&t)||!(2&t)&&e}function uS(e,t,n,r){const i=tS(r,Td(e),t),o=hS(Ad(e.target||e),i),a=Rd(e);return V&&4&a&&!oL(o,49152)?DC(o,!0):V&&8&a&&n?hN(o,524288):o}function dS(e,t,n,r){Tn.assert(e.symbol,"anonymous type must have symbol to be instantiated");const i=vs(-1572865&e.objectFlags|64,e.symbol);if(32&e.objectFlags){i.declaration=e.declaration;const n=Td(e),r=rS(n);i.typeParameter=r,t=Zx(Kx(n,r),t),r.mapper=t}return 8388608&e.objectFlags&&(i.node=e.node),134217728&e.objectFlags&&(i.outerTypeParameters=e.outerTypeParameters),i.target=e,i.mapper=t,i.aliasSymbol=n||e.aliasSymbol,i.aliasTypeArguments=n?r:Jx(e.aliasTypeArguments,t),i.objectFlags|=i.aliasTypeArguments?Bg(i.aliasTypeArguments):0,i}function pS(e,t,n,r,i){const o=e.root;if(o.outerTypeParameters){const e=M(o.outerTypeParameters,e=>Hx(e,t)),a=(n?"C":"")+Ig(e)+Og(r,i);let s=o.instantiations.get(a);if(!s){const t=$x(o.outerTypeParameters,e),c=o.checkType,l=o.isDistributive?Fp(Hx(c,t)):void 0;s=l&&c!==l&&1179648&l.flags?$N(l,e=>tx(o,eS(c,e,t),n),r,i):tx(o,t,n,r,i),o.instantiations.set(a,s)}return s}return e}function hS(e,t){return e&&t?bS(e,t,void 0,void 0):e}function bS(e,t,n,i){var o;if(!mw(e))return e;if(100===m||f>=5e6)return null==(o=cr)||o.instant(cr.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:e.id,instantiationDepth:m,instantiationCount:f}),So(r,Ca.Type_instantiation_is_excessively_deep_and_possibly_infinite),wt;d++,f++,m++;const a=function(e,t,n,r){const i=e.flags;if(262144&i)return Hx(e,t);if(524288&i){const i=e.objectFlags;if(52&i){if(4&i&&!e.node){const n=e.resolvedTypeArguments,r=Jx(n,t);return r!==n?Ky(e.target,r):e}return 1024&i?function(e,t){const n=hS(e.mappedType,t);if(!(32&Ox(n)))return e;const r=hS(e.constraintType,t);if(!(4194304&r.flags))return e;const i=yw(hS(e.source,t),n,r);if(i)return i;return e}(e,t):aS(e,t,n,r)}return e}if(3145728&i){const o=1048576&e.flags?e.origin:void 0,a=o&&3145728&o.flags?o.types:e.types,s=Jx(a,t);if(s===a&&n===e.aliasSymbol)return e;const c=n||e.aliasSymbol,l=n?r:Jx(e.aliasTypeArguments,t);return 2097152&i||o&&2097152&o.flags?Nv(s,0,c,l):dv(s,1,c,l)}if(4194304&i)return ib(hS(e.type,t));if(134217728&i)return ab(e.texts,Jx(e.types,t));if(268435456&i)return cb(e.symbol,hS(e.type,t));if(8388608&i){const i=n||e.aliasSymbol,o=n?r:Jx(e.aliasTypeArguments,t);return Hb(hS(e.objectType,t),hS(e.indexType,t),e.accessFlags,void 0,i,o)}if(16777216&i)return pS(e,Zx(e.mapper,t),!1,n,r);if(33554432&i){const n=hS(e.baseType,t);if(jh(e))return Fh(n);const r=hS(e.constraint,t);return 8650752&n.flags&&Rb(r)?Lh(n,r):3&r.flags||zS(kS(n),kS(r))?n:8650752&n.flags?Lh(n,r):Nv([r,n])}return e}(e,t,n,i);return m--,a}function SS(e){return 402915327&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=hS(e,bn))}function kS(e){return 402915327&e.flags?e:(e.restrictiveInstantiation||(e.restrictiveInstantiation=hS(e,yn),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation),e.restrictiveInstantiation)}function TS(e,t){return mg(e.keyType,hS(e.type,t),e.isReadonly,e.declaration)}function CS(e){switch(Tn.assert(174!==e.kind||Kf(e)),e.kind){case 218:case 219:case 174:case 262:return wS(e);case 210:return ee(e.properties,CS);case 209:return ee(e.elements,CS);case 227:return CS(e.whenTrue)||CS(e.whenFalse);case 226:return(57===e.operatorToken.kind||61===e.operatorToken.kind)&&(CS(e.left)||CS(e.right));case 303:return CS(e.initializer);case 217:return CS(e.expression);case 292:return ee(e.properties,CS)||IE(e.parent)&&ee(e.parent.parent.children,CS);case 291:{const{initializer:t}=e;return!!t&&CS(t)}case 294:{const{expression:t}=e;return!!t&&CS(t)}}return!1}function wS(e){return XT(e)||function(e){if(e.typeParameters||Fv(e)||!e.body)return!1;if(241!==e.body.kind)return CS(e.body);return!!jf(e.body,e=>!!e.expression&&CS(e.expression))}(e)}function NS(e){return(ZT(e)||Kf(e))&&wS(e)}function DS(e){if(524288&e.flags){const t=Ud(e);if(t.constructSignatures.length||t.callSignatures.length){const n=vs(16,e.symbol);return n.members=t.members,n.properties=t.properties,n.callSignatures=p,n.constructSignatures=p,n.indexInfos=p,n}}else if(2097152&e.flags)return Nv(M(e.types,DS));return e}function PS(e,t){return kk(e,t,uo)}function ES(e,t){return kk(e,t,uo)?-1:0}function FS(e,t){return kk(e,t,lo)?-1:0}function AS(e,t){return kk(e,t,so)?-1:0}function IS(e,t){return kk(e,t,so)}function MS(e,t){return kk(e,t,co)}function zS(e,t){return kk(e,t,lo)}function qS(e,t){return 1048576&e.flags?T(e.types,e=>qS(e,t)):1048576&t.flags?ee(t.types,t=>qS(e,t)):2097152&e.flags?ee(e.types,e=>qS(e,t)):58982400&e.flags?qS(op(e)||Ft,t):yk(t)?!!(67633152&e.flags):t===$n?!!(67633152&e.flags)&&!yk(e):t===Hn?!!(524288&e.flags)&&pN(e):t_(e,e_(t))||rT(t)&&!iT(t)&&qS(e,Qn)}function $S(e,t){return kk(e,t,_o)}function HS(e,t){return $S(e,t)||$S(t,e)}function KS(e,t,n,r,i,o){return Dk(e,t,lo,n,r,i,o)}function YS(e,t,n,r,i,o){return ZS(e,t,lo,n,r,i,o,void 0)}function ZS(e,t,n,r,i,o,a,s){return!!kk(e,t,n)||(!r||!nk(i,e,t,n,o,a,s))&&Dk(e,t,n,r,o,a,s)}function ek(e){return!!(16777216&e.flags||2097152&e.flags&&ee(e.types,ek))}function nk(e,t,n,r,i,o,a){if(!e||ek(n))return!1;if(!Dk(t,n,r,void 0)&&function(e,t,n,r,i,o,a){const s=uf(t,0),c=uf(t,1);for(const l of[c,s])if(ee(l,e=>{const t=mm(e);return!(131073&t.flags)&&Dk(t,n,r,void 0)})){const r=a||{};KS(t,n,e,i,o,r);return ST(r.errors[r.errors.length-1],Vp(e,l===c?Ca.Did_you_mean_to_use_new_with_this_expression:Ca.Did_you_mean_to_call_this_expression)),!0}return!1}(e,t,n,r,i,o,a))return!0;switch(e.kind){case 234:if(!AC(e))break;case 294:case 217:return nk(e.expression,t,n,r,i,o,a);case 226:switch(e.operatorToken.kind){case 64:case 28:return nk(e.right,t,n,r,i,o,a)}break;case 210:return function(e,t,n,r,i,o){return!(402915324&n.flags)&&ak(function*(e){if(!g(e.properties))return;for(const t of e.properties){if(GE(t))continue;const e=Jv(rs(t),8576);if(e&&!(131072&e.flags))switch(t.kind){case 178:case 177:case 174:case 304:yield{errorNode:t.name,innerExpression:void 0,nameType:e};break;case 303:yield{errorNode:t.name,innerExpression:t.initializer,nameType:e,errorMessage:Jp(t.name)?Ca.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0};break;default:Tn.assertNever(t)}}}(e),t,n,r,i,o)}(e,t,n,r,o,a);case 209:return function(e,t,n,r,i,o){if(402915324&n.flags)return!1;if(mT(t))return ak(uk(e,n),t,n,r,i,o);WF(e,n,!1);const a=iA(e,1,!0);if($F(),mT(a))return ak(uk(e,n),a,n,r,i,o);return!1}(e,t,n,r,o,a);case 292:return function(e,t,n,r,i,o){let a,s=ak(function*(e){if(!g(e.properties))return;for(const t of e.properties)JE(t)||bA(yC(t.name))||(yield{errorNode:t.name,innerExpression:t.initializer,nameType:kx(yC(t.name))})}(e),t,n,r,i,o);if(IE(e.parent)&&FE(e.parent.parent)){const a=e.parent.parent,l=FA(PA(e)),_=void 0===l?"children":Cc(l),u=kx(_),d=Hb(n,u),p=Cy(a.children);if(!g(p))return s;const f=g(p)>1;let m,h;if(Dy(!1)!==An){const e=Oy(St);m=qN(d,t=>zS(t,e)),h=qN(d,t=>!zS(t,e))}else m=qN(d,gT),h=qN(d,e=>!gT(e));if(f){if(m!==Zt){const e=Vy(kA(a,0)),t=function*(e,t){if(!g(e.children))return;let n=0;for(let r=0;r!gT(e)),c=s!==Zt?yR(13,0,s,void 0):void 0;let l=!1;for(let n=e.next();!n.done;n=e.next()){const{errorNode:e,innerExpression:s,nameType:_,errorMessage:u}=n.value;let d=c;const p=a!==Zt?ik(t,a,_):void 0;if(!p||8388608&p.flags||(d=c?dv([c,p]):p),!d)continue;let f=Gb(t,_);if(!f)continue;const m=fb(_,void 0);if(!Dk(f,d,r,void 0)){if(l=!0,!(s&&nk(s,f,d,r,void 0,i,o))){const n=o||{},c=s?ok(s,f):f;if(te&&Fk(c,d)){const t=Vp(e,Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Gs(c),Gs(d));io.add(t),n.errors=[t]}else{const o=!!(m&&16777216&(Zp(a,m)||ht).flags),s=!!(m&&16777216&(Zp(t,m)||ht).flags);d=zC(d,o),f=zC(f,o&&s);Dk(c,d,r,e,u,i,n)&&c!==f&&Dk(f,d,r,e,u,i,n)}}}}return l}(t,e,m,r,i,o)||s}else if(!kk(Hb(t,u),d,r)){s=!0;const e=So(a.openingElement.tagName,Ca.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,_,Gs(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}else if(h!==Zt){const e=sk(p[0],u,c);e&&(s=ak(function*(){yield e}(),t,n,r,i,o)||s)}else if(!kk(Hb(t,u),d,r)){s=!0;const e=So(a.openingElement.tagName,Ca.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,_,Gs(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}return s;function c(){if(!a){const t=tp(e.parent.tagName),r=FA(PA(e)),i=void 0===r?"children":Cc(r),o=Hb(n,kx(i)),s=Ca._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;a={...s,key:"!!ALREADY FORMATTED!!",message:mS(s,t,i,Gs(o))}}return a}}(e,t,n,r,o,a);case 219:return function(e,t,n,r,i,o){if(jP(e.body))return!1;if(ee(e.parameters,zu))return!1;const a=eO(t);if(!a)return!1;const s=uf(n,0);if(!g(s))return!1;const c=e.body,l=mm(a),_=dv(M(s,mm));if(!Dk(l,_,r,void 0)){const t=c&&nk(c,l,_,r,void 0,i,o);if(t)return t;const a=o||{};if(Dk(l,_,r,c,void 0,i,a),a.errors)return n.symbol&&g(n.symbol.declarations)&&ST(a.errors[a.errors.length-1],Vp(n.symbol.declarations[0],Ca.The_expected_type_comes_from_the_return_type_of_this_signature)),2&$h(e)||yc(l,"then")||!Dk(Rj(l),_,r,void 0)||ST(a.errors[a.errors.length-1],Vp(e,Ca.Did_you_mean_to_mark_this_function_as_async)),!0}return!1}(e,t,n,r,o,a)}return!1}function ik(e,t,n){const r=Gb(t,n);if(r)return r;if(1048576&t.flags){const r=Ak(e,t);if(r)return Gb(r,n)}}function ok(e,t){WF(e,t,!1);const n=DL(e,1);return $F(),n}function ak(e,t,n,r,i,o){let a=!1;for(const s of e){const{errorNode:e,innerExpression:c,nameType:l,errorMessage:_}=s;let u=ik(t,n,l);if(!u||8388608&u.flags)continue;let d=Gb(t,l);if(!d)continue;const p=fb(l,void 0);if(!Dk(d,u,r,void 0)){if(a=!0,!(c&&nk(c,d,u,r,void 0,i,o))){const a=o||{},s=c?ok(c,d):d;if(te&&Fk(s,u)){const t=Vp(e,Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Gs(s),Gs(u));io.add(t),a.errors=[t]}else{const o=!!(p&&16777216&(Zp(n,p)||ht).flags),c=!!(p&&16777216&(Zp(t,p)||ht).flags);u=zC(u,o),d=zC(d,o&&c);Dk(s,u,r,e,_,i,a)&&s!==d&&Dk(d,u,r,e,_,i,a)}if(a.errors){const e=a.errors[a.errors.length-1],t=kC(l)?TC(l):void 0,r=void 0!==t?Zp(n,t):void 0;let i=!1;if(!r){const t=Tf(n,l);t&&t.declaration&&!Dd(t.declaration).hasNoDefaultLib&&(i=!0,ST(e,Vp(t.declaration,Ca.The_expected_type_comes_from_this_index_signature)))}if(!i&&(r&&g(r.declarations)||n.symbol&&g(n.symbol.declarations))){const i=r&&g(r.declarations)?r.declarations[0]:n.symbol.declarations[0];Dd(i).hasNoDefaultLib||ST(e,Vp(i,Ca.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,!t||8192&l.flags?Gs(l):Cc(t),Gs(n)))}}}}}return a}function sk(e,t,n){switch(e.kind){case 294:return{errorNode:e,innerExpression:e.expression,nameType:t};case 12:if(e.containsOnlyTriviaWhiteSpaces)break;return{errorNode:e,innerExpression:void 0,nameType:t,errorMessage:n()};case 284:case 285:case 288:return{errorNode:e,innerExpression:e,nameType:t};default:return Tn.assertNever(e,"Found invalid jsx child")}}function*uk(e,t){const n=g(e.elements);if(n)for(let r=0;rc:hj(e)>c))return!r||8&n||i(Ca.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,hj(e),c),0;e.typeParameters&&e.typeParameters!==t.typeParameters&&(e=iO(e,t=Hm(t),void 0,a));const l=gj(e),_=bj(e),u=bj(t);(_||u)&&hS(_||u,s);const d=t.declaration?t.declaration.kind:0,p=!(3&n)&&W&&174!==d&&173!==d&&176!==d;let f=-1;const m=tm(e);if(m&&m!==Yt){const e=tm(t);if(e){const t=!p&&a(m,e,!1)||a(e,m,r);if(!t)return r&&i(Ca.The_this_types_of_each_signature_are_incompatible),0;f&=t}}const g=_||u?Math.min(l,c):Math.max(l,c),h=_||u?g-1:-1;for(let c=0;c=hj(e)&&c=3&&32768&t[0].flags&&65536&t[1].flags&&ee(t,yk)?67108864:0)}return!!(67108864&e.objectFlags)}return!1}(t))return!0}return!1}function kk(e,t,n){if(bx(e)&&(e=e.regularType),bx(t)&&(t=t.regularType),e===t)return!0;if(n!==uo){if(n===_o&&!(131072&t.flags)&&Sk(t,e,n)||Sk(e,t,n))return!0}else if(!(61865984&(e.flags|t.flags))){if(e.flags!==t.flags)return!1;if(67358815&e.flags)return!0}if(524288&e.flags&&524288&t.flags){const r=n.get(Uk(e,t,0,n,!1));if(void 0!==r)return!!(1&r)}return!!(469499904&e.flags||469499904&t.flags)&&Dk(e,t,n,void 0)}function Tk(e,t){return 2048&Ox(e)&&bA(t.escapedName)}function Ck(e,t){for(;;){const n=bx(e)?e.regularType:KT(e)?Nk(e,t):4&Ox(e)?e.node?qg(e.target,Hg(e)):uT(e)||e:3145728&e.flags?wk(e,t):33554432&e.flags?t?e.baseType:Rh(e):25165824&e.flags?Ub(e,t):e;if(n===e)return n;e=n}}function wk(e,t){const n=Fp(e);if(n!==e)return n;if(2097152&e.flags&&function(e){let t=!1,n=!1;for(const r of e.types)if(t||(t=!!(465829888&r.flags)),n||(n=!!(98304&r.flags)||yk(r)),t&&n)return!0;return!1}(e)){const n=B(e.types,e=>Ck(e,t));if(n!==e.types)return Nv(n)}return e}function Nk(e,t){const n=nv(e),r=B(n,e=>25165824&e.flags?Ub(e,t):e);return n!==r?Gy(e.target,r):e}function Dk(e,t,n,i,o,a,s){var c;let l,_,u,d,f,m,h,y,v=0,b=0,x=0,S=0,T=!1,C=0,w=0,D=16e6-n.size>>3;Tn.assert(n!==uo||!i,"no error reporting in identity checking");const P=U(e,t,3,!!i,o);if(y&&O(),T){const o=Uk(e,t,0,n,!1);n.set(o,6),null==(c=cr)||c.instant(cr.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:e.id,targetId:t.id,depth:b,targetDepth:x});const a=D<=0?Ca.Excessive_complexity_comparing_types_0_and_1:Ca.Excessive_stack_depth_comparing_types_0_and_1,l=So(i||r,a,Gs(e),Gs(t));s&&(s.errors||(s.errors=[])).push(l)}else if(l){if(a){const e=a();e&&(vS(e,l),l=e)}let r;if(o&&i&&!P&&e.symbol){const i=$o(e.symbol);if(i.originatingImport&&!gf(i.originatingImport)){if(Dk(Kl(i.target),t,n,void 0)){r=pe(r,Vp(i.originatingImport,Ca.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}}const c=Hp(Dd(i),i,l,r);_&&ST(c,..._),s&&(s.errors||(s.errors=[])).push(c),s&&s.skipLogging||io.add(c)}return i&&s&&s.skipLogging&&0===P&&Tn.assert(!!s.errors,"missed opportunity to interact with error."),0!==P;function F(e){l=e.errorInfo,h=e.lastSkippedInfo,y=e.incompatibleStack,C=e.overrideNextErrorInfo,w=e.skipParentCounter,_=e.relatedInfo}function A(){return{errorInfo:l,lastSkippedInfo:h,incompatibleStack:null==y?void 0:y.slice(),overrideNextErrorInfo:C,skipParentCounter:w,relatedInfo:null==_?void 0:_.slice()}}function I(e,...t){C++,h=void 0,(y||(y=[])).push([e,...t])}function O(){const e=y||[];y=void 0;const t=h;if(h=void 0,1===e.length)return j(...e[0]),void(t&&J(void 0,...t));let n="";const r=[];for(;e.length;){const[t,...i]=e.pop();switch(t.code){case Ca.Types_of_property_0_are_incompatible.code:{0===n.indexOf("new ")&&(n=`(${n})`);const e=""+i[0];n=0===n.length?`${e}`:Es(e,OS(k))?`${n}.${e}`:"["===e[0]&&"]"===e[e.length-1]?`${n}${e}`:`${n}[${e}]`;break}case Ca.Call_signature_return_types_0_and_1_are_incompatible.code:case Ca.Construct_signature_return_types_0_and_1_are_incompatible.code:case Ca.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case Ca.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:if(0===n.length){let e=t;t.code===Ca.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?e=Ca.Call_signature_return_types_0_and_1_are_incompatible:t.code===Ca.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(e=Ca.Construct_signature_return_types_0_and_1_are_incompatible),r.unshift([e,i[0],i[1]])}else{n=`${t.code===Ca.Construct_signature_return_types_0_and_1_are_incompatible.code||t.code===Ca.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":""}${n}(${t.code===Ca.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||t.code===Ca.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"..."})`}break;case Ca.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:r.unshift([Ca.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,i[0],i[1]]);break;case Ca.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:r.unshift([Ca.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,i[0],i[1],i[2]]);break;default:return Tn.fail(`Unhandled Diagnostic: ${t.code}`)}}n?j(")"===n[n.length-1]?Ca.The_types_returned_by_0_are_incompatible_between_these_types:Ca.The_types_of_0_are_incompatible_between_these_types,n):r.shift();for(const[e,...t]of r){const n=e.elidedInCompatabilityPyramid;e.elidedInCompatabilityPyramid=!1,j(e,...t),e.elidedInCompatabilityPyramid=n}t&&J(void 0,...t)}function j(e,...t){Tn.assert(!!i),y&&O(),e.elidedInCompatabilityPyramid||(0===w?l=yS(l,e,...t):w--)}function L(e,...t){j(e,...t),w++}function R(e){Tn.assert(!!l),_?_.push(e):_=[e]}function J(e,t,r){y&&O();const[i,o]=Xs(t,r);let a=t,s=i;FT(t)&&!Pk(r)&&(a=MT(t),Tn.assert(!zS(a,r),"generalized source shouldn't be assignable"),s=Qs(a));if(262144&(8388608&r.flags&&!(8388608&t.flags)?r.objectType.flags:r.flags)&&r!==Jn&&r!==zn){const e=op(r);let n;e&&(zS(a,e)||(n=zS(t,e)))?j(Ca._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,n?i:s,o,Gs(e)):(l=void 0,j(Ca._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,o,s))}if(e)e===Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1&&te&&Ek(t,r).length&&(e=Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties);else if(n===_o)e=Ca.Type_0_is_not_comparable_to_type_1;else if(i===o)e=Ca.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else if(te&&Ek(t,r).length)e=Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;else{if(128&t.flags&&1048576&r.flags){const e=function(e,t){const n=t.types.filter(e=>!!(128&e.flags));return Kt(e.value,n,e=>e.value)}(t,r);if(e)return void j(Ca.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,s,o,Gs(e))}e=Ca.Type_0_is_not_assignable_to_type_1}j(e,s,o)}function z(e,t,n){return $T(e)?e.target.readonly&&aT(t)?(n&&j(Ca.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Gs(e),Gs(t)),!1):oT(t):iT(e)&&aT(t)?(n&&j(Ca.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Gs(e),Gs(t)),!1):!$T(t)||rT(e)}function q(e,t,n){return U(e,t,3,n)}function U(e,t,r=3,o=!1,a,s=0){if(e===t)return-1;if(524288&e.flags&&402784252&t.flags)return n===_o&&!(131072&t.flags)&&Sk(t,e,n)||Sk(e,t,n,o?j:void 0)?-1:(o&&W(e,t,e,t,a),0);const c=Ck(e,!1);let l=Ck(t,!0);if(c===l)return-1;if(n===uo)return c.flags!==l.flags?0:67358815&c.flags?-1:($(c,l),ne(c,l,!1,0,r));if(262144&c.flags&&Kd(c)===l)return-1;if(470302716&c.flags&&1048576&l.flags){const e=l.types,t=2===e.length&&98304&e[0].flags?e[1]:3===e.length&&98304&e[0].flags&&98304&e[1].flags?e[2]:void 0;if(t&&!(98304&t.flags)&&(l=Ck(t,!0),c===l))return-1}if(n===_o&&!(131072&l.flags)&&Sk(l,c,n)||Sk(c,l,n,o?j:void 0))return-1;if(469499904&c.flags||469499904&l.flags){if(!(2&s)&&Bw(c)&&8192&Ox(c)&&function(e,t,r){var o;if(!VA(t)||!Q&&4096&Ox(t))return!1;const a=!!(2048&Ox(e));if((n===lo||n===_o)&&(RN($n,t)||!a&&hk(t)))return!1;let s,c=t;1048576&t.flags&&(c=Kz(e,t,U)||function(e){if(oL(e,67108864)){const t=qN(e,e=>!(402784252&e.flags));if(!(131072&t.flags))return t}return e}(t),s=1048576&c.flags?c.types:[c]);for(const t of Hd(e))if(K(t,e.symbol)&&!Tk(e,t)){if(!UA(c,t.escapedName,a)){if(r){const n=qN(c,VA);if(!i)return Tn.fail();if(BE(i)||Iu(i)||Iu(i.parent)){t.valueDeclaration&&RE(t.valueDeclaration)&&Dd(i)===Dd(t.valueDeclaration.name)&&(i=t.valueDeclaration.name);const e=Hs(t),r=NI(e,n),o=r?Hs(r):void 0;o?j(Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_2,e,Gs(n),o):j(Ca.Property_0_does_not_exist_on_type_1,e,Gs(n))}else{const r=(null==(o=e.symbol)?void 0:o.declarations)&&Ce(e.symbol.declarations);let a;if(t.valueDeclaration&&xc(t.valueDeclaration,e=>e===r)&&Dd(r)===Dd(i)){const e=t.valueDeclaration;Tn.assertNode(e,F_);const r=e.name;i=r,QN(r)&&(a=DI(r,n))}void 0!==a?L(Ca.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,Hs(t),Gs(n),a):L(Ca.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Hs(t),Gs(n))}}return!0}if(s&&!U(Kl(t),H(s,t.escapedName),3,r))return r&&I(Ca.Types_of_property_0_are_incompatible,Hs(t)),!0}return!1}(c,l,o))return o&&J(a,c,t.aliasSymbol?t:l),0;const _=(n!==_o||xT(c))&&!(2&s)&&405405692&c.flags&&c!==$n&&2621440&l.flags&&Ok(l)&&(Hd(c).length>0||DJ(c)),u=!!(2048&Ox(c));if(_&&!function(e,t,n){for(const r of Hd(e))if(UA(t,r.escapedName,n))return!0;return!1}(c,l,u)){if(o){const n=Gs(e.aliasSymbol?e:c),r=Gs(t.aliasSymbol?t:l),i=uf(c,0),o=uf(c,1);i.length>0&&U(mm(i[0]),l,1,!1)||o.length>0&&U(mm(o[0]),l,1,!1)?j(Ca.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,n,r):j(Ca.Type_0_has_no_properties_in_common_with_type_1,n,r)}return 0}$(c,l);const d=1048576&c.flags&&c.types.length<4&&!(1048576&l.flags)||1048576&l.flags&&l.types.length<4&&!(469499904&c.flags)?G(c,l,o,s):ne(c,l,o,s,r);if(d)return d}return o&&W(e,t,c,l,a),0}function W(e,t,n,r,o){var a,s;const c=!!uT(e),_=!!uT(t);n=e.aliasSymbol||c?e:n,r=t.aliasSymbol||_?t:r;let u=C>0;if(u&&C--,524288&n.flags&&524288&r.flags){const e=l;z(n,r,!0),l!==e&&(u=!!l)}if(524288&n.flags&&402784252&r.flags)!function(e,t){const n=Ys(e.symbol)?Gs(e,e.symbol.valueDeclaration):Gs(e),r=Ys(t.symbol)?Gs(t,t.symbol.valueDeclaration):Gs(t);(Yn===e&&Jt===t||Zn===e&&zt===t||er===e&&Gt===t||xy()===e&&Qt===t)&&j(Ca._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,r,n)}(n,r);else if(n.symbol&&524288&n.flags&&$n===n)j(Ca.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(2048&Ox(n)&&2097152&r.flags){const e=r.types,t=wA(AB.IntrinsicAttributes,i),n=wA(AB.IntrinsicClassAttributes,i);if(!Pc(t)&&!Pc(n)&&(E(e,t)||E(e,n)))return}else l=Xp(l,t);if(!o&&u){const e=A();let t;return J(o,n,r),l&&l!==e.errorInfo&&(t={code:l.code,messageText:l.messageText}),F(e),t&&l&&(l.canonicalHead=t),void(h=[n,r])}if(J(o,n,r),262144&n.flags&&(null==(s=null==(a=n.symbol)?void 0:a.declarations)?void 0:s[0])&&!Kd(n)){const e=rS(n);if(e.constraint=hS(r,Kx(n,e)),cp(e)){const e=Gs(r,n.symbol.declarations[0]);R(Vp(n.symbol.declarations[0],Ca.This_type_parameter_might_need_an_extends_0_constraint,e))}}}function $(e,t){if(cr&&3145728&e.flags&&3145728&t.flags){const n=e,r=t;if(n.objectFlags&r.objectFlags&32768)return;const o=n.types.length,a=r.types.length;o*a>1e6&&cr.instant(cr.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:e.id,sourceSize:o,targetId:t.id,targetSize:a,pos:null==i?void 0:i.pos,end:null==i?void 0:i.end})}}function H(e,t){return dv(Me(e,(e,n)=>{var r;const i=3145728&(n=wp(n)).flags?Ep(n,t):Wd(n,t);return pe(e,i&&Kl(i)||(null==(r=Cf(n,t))?void 0:r.type)||At)},void 0)||p)}function K(e,t){return e.valueDeclaration&&t.valueDeclaration&&e.valueDeclaration.parent===t.valueDeclaration}function G(e,t,r,i){if(1048576&e.flags){if(1048576&t.flags){const n=e.origin;if(n&&2097152&n.flags&&t.aliasSymbol&&E(n.types,t))return-1;const r=t.origin;if(r&&1048576&r.flags&&e.aliasSymbol&&E(r.types,e))return-1}return n===_o?Z(e,t,r&&!(402784252&e.flags),i):function(e,t,n,r){let i=-1;const o=e.types,a=function(e,t){if(1048576&e.flags&&1048576&t.flags&&!(32768&e.types[0].flags)&&32768&t.types[0].flags)return HN(t,-32769);return t}(e,t);for(let e=0;e=a.types.length&&o.length%a.types.length===0){const t=U(s,a.types[e%a.types.length],3,!1,void 0,r);if(t){i&=t;continue}}const c=U(s,t,1,n,void 0,r);if(!c)return 0;i&=c}return i}(e,t,r&&!(402784252&e.flags),i)}if(1048576&t.flags)return Y($C(e),t,r&&!(402784252&e.flags)&&!(402784252&t.flags),i);if(2097152&t.flags)return function(e,t,n,r){let i=-1;const o=t.types;for(const t of o){const o=U(e,t,2,n,void 0,r);if(!o)return 0;i&=o}return i}(e,t,r,2);if(n===_o&&402784252&t.flags){const n=B(e.types,e=>465829888&e.flags?op(e)||Ft:e);if(n!==e.types){if(131072&(e=Nv(n)).flags)return 0;if(!(2097152&e.flags))return U(e,t,1,!1)||U(t,e,1,!1)}}return Z(e,t,!1,1)}function X(e,t){let n=-1;const r=e.types;for(const e of r){const r=Y(e,t,!1,0);if(!r)return 0;n&=r}return n}function Y(e,t,r,i){const o=t.types;if(1048576&t.flags){if(iv(o,e))return-1;if(n!==_o&&32768&Ox(t)&&!(1024&e.flags)&&(2688&e.flags||(n===so||n===co)&&256&e.flags)){const t=e===e.regularType?e.freshType:e.regularType,n=128&e.flags?Jt:256&e.flags?zt:2048&e.flags?qt:void 0;return n&&iv(o,n)||t&&iv(o,t)?-1:0}const r=cN(t,e);if(r){const t=U(e,r,2,!1,void 0,i);if(t)return t}}for(const t of o){const n=U(e,t,2,!1,void 0,i);if(n)return n}if(r){const n=Ak(e,t,U);n&&U(e,n,2,!0,void 0,i)}return 0}function Z(e,t,n,r){const i=e.types;if(1048576&e.flags&&iv(i,t))return-1;const o=i.length;for(let e=0;e(w|=e?16:8,k(e))),3===S?(null==(a=cr)||a.instant(cr.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:e.id,sourceIdStack:f.map(e=>e.id),targetId:t.id,targetIdStack:m.map(e=>e.id),depth:b,targetDepth:x}),C=3):(null==(s=cr)||s.push(cr.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:e.id,targetId:t.id}),C=function(e,t,r,i){const o=A();let a=function(e,t,r,i,o){let a,s,c=!1,_=e.flags;const u=t.flags;if(n===uo){if(3145728&_){let n=X(e,t);return n&&(n&=X(t,e)),n}if(4194304&_)return U(e.type,t.type,3,!1);if(8388608&_&&(a=U(e.objectType,t.objectType,3,!1))&&(a&=U(e.indexType,t.indexType,3,!1)))return a;if(16777216&_&&e.root.isDistributive===t.root.isDistributive&&(a=U(e.checkType,t.checkType,3,!1))&&(a&=U(e.extendsType,t.extendsType,3,!1))&&(a&=U(nx(e),nx(t),3,!1))&&(a&=U(rx(e),rx(t),3,!1)))return a;if(33554432&_&&(a=U(e.baseType,t.baseType,3,!1))&&(a&=U(e.constraint,t.constraint,3,!1)))return a;if(!(524288&_))return 0}else if(3145728&_||3145728&u){if(a=G(e,t,r,i))return a;if(!(465829888&_||524288&_&&1048576&u||2097152&_&&467402752&u))return 0}if(17301504&_&&e.aliasSymbol&&e.aliasTypeArguments&&e.aliasSymbol===t.aliasSymbol&&!Bk(e)&&!Bk(t)){const n=Lk(e.aliasSymbol);if(n===p)return 1;const r=$o(e.aliasSymbol).typeParameters,o=If(r),a=y(Of(e.aliasTypeArguments,r,o,zm(e.aliasSymbol.valueDeclaration)),Of(t.aliasTypeArguments,r,o,zm(e.aliasSymbol.valueDeclaration)),n,i);if(void 0!==a)return a}if(GT(e)&&!e.target.readonly&&(a=U(Hg(e)[0],t,1))||GT(t)&&(t.target.readonly||aT(op(e)||e))&&(a=U(e,Hg(t)[0],2)))return a;if(262144&u){if(32&Ox(e)&&!e.declaration.nameType&&U(ib(t),Cd(e),3)&&!(4&Rd(e))){const n=Ad(e),i=Hb(t,Td(e));if(a=U(n,i,3,r))return a}if(n===_o&&262144&_){let n=Gd(e);if(n)for(;n&&JN(n,e=>!!(262144&e.flags));){if(a=U(n,t,1,!1))return a;n=Gd(n)}return 0}}else if(4194304&u){const n=t.type;if(4194304&_&&(a=U(n,e.type,3,!1)))return a;if($T(n)){if(a=U(e,Zy(n),2,r))return a}else{const i=Qd(n);if(i){if(-1===U(e,ib(i,4|t.indexFlags),2,r))return-1}else if(zd(n)){const t=wd(n),i=Cd(n);let o;if(t&&Od(n)){o=dv([re(t,n),t])}else o=t||i;if(-1===U(e,o,2,r))return-1}}}else if(8388608&u){if(8388608&_){if((a=U(e.objectType,t.objectType,3,r))&&(a&=U(e.indexType,t.indexType,3,r)),a)return a;r&&(s=l)}if(n===lo||n===_o){const n=t.objectType,c=t.indexType,_=op(n)||n,u=op(c)||c;if(!Jb(_)&&!zb(u)){const t=Gb(_,u,4|(_!==n?2:0));if(t){if(r&&s&&F(o),a=U(e,t,2,r,void 0,i))return a;r&&s&&l&&(l=h([s])<=h([l])?s:l)}}}r&&(s=void 0)}else if(zd(t)&&n!==uo){const n=!!t.declaration.nameType,i=Ad(t),c=Rd(t);if(!(8&c)){if(!n&&8388608&i.flags&&i.objectType===e&&i.indexType===Td(t))return-1;if(!zd(e)){const i=n?wd(t):Cd(t),_=ib(e,2),u=4&c,d=u?Yu(i,_):void 0;if(u?!(131072&d.flags):U(i,_,3)){const o=Ad(t),s=Td(t),c=HN(o,-98305);if(!n&&8388608&c.flags&&c.indexType===s){if(a=U(e,c.objectType,2,r))return a}else{const t=Hb(e,n?d||i:d?Nv([d,s]):s);if(a=U(t,o,3,r))return a}}s=l,F(o)}}}else if(16777216&u){if(Kk(t,m,x,10))return 3;const n=t;if(!(n.root.inferTypeParameters||(d=n.root,d.isDistributive&&(sS(d.checkType,d.node.trueType)||sS(d.checkType,d.node.falseType)))||16777216&e.flags&&e.root===n.root)){const t=!zS(SS(n.checkType),SS(n.extendsType)),r=!t&&zS(kS(n.checkType),kS(n.extendsType));if((a=t?-1:U(e,nx(n),2,!1,void 0,i))&&(a&=r?-1:U(e,rx(n),2,!1,void 0,i),a))return a}}else if(134217728&u){if(134217728&_){if(n===_o)return function(e,t){const n=e.texts[0],r=t.texts[0],i=e.texts[e.texts.length-1],o=t.texts[t.texts.length-1],a=Math.min(n.length,r.length),s=Math.min(i.length,o.length);return n.slice(0,a)!==r.slice(0,a)||i.slice(i.length-s)!==o.slice(o.length-s)}(e,t)?0:-1;hS(e,kn)}if(Ow(e,t))return-1}else if(268435456&t.flags&&!(268435456&e.flags)&&Fw(e,t))return-1;var d;if(8650752&_){if(!(8388608&_&&8388608&u)){const n=Kd(e)||Ft;if(a=U(n,t,1,!1,void 0,i))return a;if(a=U(Tu(n,e),t,1,r&&n!==Ft&&!(u&_&262144),void 0,i))return a;if(Cp(e)){const n=Kd(e.indexType);if(n&&(a=U(Hb(e.objectType,n),t,1,r)))return a}}}else if(4194304&_){const n=nb(e.type,e.indexFlags)&&32&Ox(e.type);if(a=U(sn,t,1,r&&!n))return a;if(n){const n=e.type,i=wd(n),o=i&&Od(n)?re(i,n):i||Cd(n);if(a=U(o,t,1,r))return a}}else if(134217728&_&&!(524288&u)){if(!(134217728&u)){const n=op(e);if(n&&n!==e&&(a=U(n,t,1,r)))return a}}else if(268435456&_)if(268435456&u){if(e.symbol!==t.symbol)return 0;if(a=U(e.type,t.type,3,r))return a}else{const n=op(e);if(n&&(a=U(n,t,1,r)))return a}else if(16777216&_){if(Kk(e,f,b,10))return 3;if(16777216&u){const n=e.root.inferTypeParameters;let i,o=e.extendsType;if(n){const e=ow(n,void 0,0,q);Lw(e.inferences,t.extendsType,o,1536),o=hS(o,e.mapper),i=e.mapper}if(PS(o,t.extendsType)&&(U(e.checkType,t.checkType,3)||U(t.checkType,e.checkType,3))&&((a=U(hS(nx(e),i),nx(t),3,r))&&(a&=U(rx(e),rx(t),3,r)),a))return a}const n=Yd(e);if(n&&(a=U(n,t,1,r)))return a;const i=16777216&u||!cp(e)?void 0:Zd(e);if(i&&(F(o),a=U(i,t,1,r)))return a}else{if(n!==so&&n!==co&&(32&Ox(g=t)&&4&Rd(g))&&hk(e))return-1;if(zd(t))return zd(e)&&(a=function(e,t,r){const i=n===_o||(n===uo?Rd(e)===Rd(t):Jd(e)<=Jd(t));if(i){let n;if(n=U(Cd(t),hS(Cd(e),Jd(e)<0?Cn:kn),3,r)){const i=$x([Td(e)],[Td(t)]);if(hS(wd(e),i)===hS(wd(t),i))return n&U(hS(Ad(e),i),Ad(t),3,r)}}return 0}(e,t,r))?a:0;const d=!!(402784252&_);if(n!==uo)_=(e=wp(e)).flags;else if(zd(e))return 0;if(4&Ox(e)&&4&Ox(t)&&e.target===t.target&&!$T(e)&&!Bk(e)&&!Bk(t)){if(pT(e))return-1;const n=jk(e.target);if(n===p)return 1;const r=y(Hg(e),Hg(t),n,i);if(void 0!==r)return r}else{if(iT(t)?zN(e,oT):rT(t)&&zN(e,e=>$T(e)&&!e.target.readonly))return n!==uo?U(Sf(e,zt)||St,Sf(t,zt)||St,3,r):0;if(KT(e)&&$T(t)&&!KT(t)){const n=sp(e);if(n!==e)return U(n,t,1,r)}else if((n===so||n===co)&&hk(t)&&8192&Ox(t)&&!hk(e))return 0}if(2621440&_&&524288&u){const n=r&&l===o.errorInfo&&!d;if(a=ae(e,t,n,void 0,!1,i),a&&(a&=se(e,t,0,n,i),a&&(a&=se(e,t,1,n,i),a&&(a&=de(e,t,d,n,i)))),c&&a)l=s||l||o.errorInfo;else if(a)return a}if(2621440&_&&1048576&u){const r=HN(t,36175872);if(1048576&r.flags){const t=function(e,t){var r;const i=Hd(e),o=oN(i,t);if(!o)return 0;let a=1;for(const n of o)if(a*=VN(Gl(n)),a>25)return null==(r=cr)||r.instant(cr.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:e.id,targetId:t.id,numCombinations:a}),0;const s=new Array(o.length),c=new Set;for(let e=0;er[i],!1,0,V||n===_o))continue e}he(_,a,Pt),i=!0}if(!i)return 0}let u=-1;for(const t of _)if(u&=ae(e,t,!1,c,!1,0),u&&(u&=se(e,t,0,!1,0),u&&(u&=se(e,t,1,!1,0),!u||$T(e)&&$T(t)||(u&=de(e,t,!1,!1,0)))),!u)return u;return u}(e,r);if(t)return t}}}var g;return 0;function h(e){return e?Me(e,(e,t)=>e+1+h(t.next),0):0}function y(e,t,i,_){if(a=function(e=p,t=p,r=p,i,o){if(e.length!==t.length&&n===uo)return 0;const a=e.length<=t.length?e.length:t.length;let s=-1;for(let c=0;c!!(24&e)))return s=void 0,void F(o);const u=t&&function(e,t){for(let n=0;n!(7&e))))return 0;s=l,F(o)}}}(e,t,r,i,o);if(n!==uo){if(!a&&(2097152&e.flags||262144&e.flags&&1048576&t.flags)){const n=function(e,t){let n,r=!1;for(const i of e)if(465829888&i.flags){let e=Kd(i);for(;e&&21233664&e.flags;)e=Kd(e);e&&(n=pe(n,e),t&&(n=pe(n,i)))}else(469892092&i.flags||yk(i))&&(r=!0);if(n&&(t||r)){if(r)for(const t of e)(469892092&t.flags||yk(t))&&(n=pe(n,t));return Ck(Nv(n,2),!1)}}(2097152&e.flags?e.types:[e],!!(1048576&t.flags));n&&zN(n,t=>t!==e)&&(a=U(n,t,1,!1,void 0,i))}a&&!(2&i)&&2097152&t.flags&&!Jb(t)&&2621440&e.flags?(a&=ae(e,t,r,void 0,!1,0),a&&Bw(e)&&8192&Ox(e)&&(a&=de(e,t,!1,r,0))):a&&ux(t)&&!oT(t)&&2097152&e.flags&&3670016&wp(e).flags&&!ee(e.types,e=>e===t||!!(262144&Ox(e)))&&(a&=ae(e,t,r,void 0,!0,i))}a&&F(o);return a}(e,t,r,i),null==(c=cr)||c.pop()),Ht&&(Ht=k),1&o&&b--,2&o&&x--,S=y,C?(-1===C||0===b&&0===x)&&N(-1===C||3===C):(n.set(_,2|(r?4:0)|w),D--,N(!1)),C;function N(e){for(let t=h;t{r.push(hS(e,tS(t.mapper,Td(t),n)))}),dv(r)}function ie(e,t){if(!t||0===e.length)return e;let n;for(let r=0;r{return!!(4&Sx(t))&&(n=e,r=Wk(t),!Vk(n,e=>{const t=Wk(e);return!!t&&t_(t,r)}));var n,r})}(r,i))return a&&j(Ca.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,Hs(i),Gs(Wk(r)||e),Gs(Wk(i)||t)),0}else if(4&l)return a&&j(Ca.Property_0_is_protected_in_type_1_but_public_in_type_2,Hs(i),Gs(e),Gs(t)),0;if(n===co&&Yj(r)&&!Yj(i))return 0;const u=function(e,t,n,r,i){const o=V&&!!(48&xx(t)),a=Xc(Gl(t),!1,o);return U(n(e),a,3,r,void 0,i)}(r,i,o,a,s);return u?!c&&16777216&r.flags&&106500&i.flags&&!(16777216&i.flags)?(a&&j(Ca.Property_0_is_optional_in_type_1_but_required_in_type_2,Hs(i),Gs(e),Gs(t)),0):u:(a&&I(Ca.Types_of_property_0_are_incompatible,Hs(i)),0)}function ae(e,t,r,i,a,s){if(n===uo)return function(e,t,n){if(!(524288&e.flags&&524288&t.flags))return 0;const r=ie(Vd(e),n),i=ie(Vd(t),n);if(r.length!==i.length)return 0;let o=-1;for(const e of r){const n=Wd(t,e.escapedName);if(!n)return 0;const r=Zk(e,n,U);if(!r)return 0;o&=r}return o}(e,t,i);let c=-1;if($T(t)){if(oT(e)){if(!t.target.readonly&&(iT(e)||$T(e)&&e.target.readonly))return 0;const n=nh(e),o=nh(t),a=$T(e)?4&e.target.combinedFlags:4,l=4&t.target.combinedFlags,_=$T(e)?e.target.minLength:0,u=t.target.minLength;if(!a&&n!(e&t));return n>=0?n:e.elementFlags.length}(t.target,11),m=ev(t.target,11),g=t.target.hasRestElement;let h=!!i;for(let a=0;a=f?o-1-Math.min(_,m):a,y=t.target.elementFlags[u];if(8&y&&!(8&l))return r&&j(Ca.Source_provides_no_match_for_variadic_element_at_position_0_in_target,u),0;if(8&l&&!(12&y))return r&&j(Ca.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,a,u),0;if(1&y&&!(1&l))return r&&j(Ca.Source_provides_no_match_for_required_element_at_position_0_in_target,u),0;if(h&&((12&l||12&y)&&(h=!1),h&&(null==i?void 0:i.has(""+a))))continue;const v=zC(d[a],!!(l&y&2)),b=p[u],x=U(v,8&l&&4&y?jy(b):zC(b,!!(2&y)),3,r,void 0,s);if(!x)return r&&(o>1||n>1)&&(g&&a>=f&&_>=m&&f!==n-m-1?I(Ca.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,f,n-m-1,u):I(Ca.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,a,u)),0;c&=x}return c}if(12&t.target.combinedFlags)return 0}const _=!(n!==so&&n!==co||Bw(e)||pT(e)||$T(e)),u=Sw(e,t,_,!1);if(u)return r&&function(e,t){const n=_f(e,0),r=_f(e,1),i=Vd(e);if((n.length||r.length)&&!i.length)return!!(uf(t,0).length&&n.length||uf(t,1).length&&r.length);return!0}(e,t)&&function(e,t,n,r){let i=!1;if(n.valueDeclaration&&Ic(n.valueDeclaration)&&YN(n.valueDeclaration.name)&&e.symbol&&32&e.symbol.flags){const r=n.valueDeclaration.name.escapedText,i=ry(e.symbol,r);if(i&&Zp(e,i)){const n=aw.getDeclarationName(e.symbol.valueDeclaration),i=aw.getDeclarationName(t.symbol.valueDeclaration);return void j(Ca.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2,ea(r),ea(""===n.escapedText?jB:n),ea(""===i.escapedText?jB:i))}}const a=We(xw(e,t,r,!1));if((!o||o.code!==Ca.Class_0_incorrectly_implements_interface_1.code&&o.code!==Ca.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(i=!0),1===a.length){const r=Hs(n,void 0,0,20);j(Ca.Property_0_is_missing_in_type_1_but_required_in_type_2,r,...Xs(e,t)),g(n.declarations)&&R(Vp(n.declarations[0],Ca._0_is_declared_here,r)),i&&l&&C++}else z(e,t,!1)&&(a.length>5?j(Ca.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Gs(e),Gs(t),M(a.slice(0,4),e=>Hs(e)).join(", "),a.length-4):j(Ca.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Gs(e),Gs(t),M(a,e=>Hs(e)).join(", ")),i&&l&&C++)}(e,t,u,_),0;if(Bw(t))for(const n of ie(Hd(e),i))if(!Wd(t,n.escapedName)){if(!(32768&Kl(n).flags))return r&&j(Ca.Property_0_does_not_exist_on_type_1,Hs(n),Gs(t)),0}const d=Hd(t),p=$T(e)&&$T(t);for(const o of ie(d,i)){const i=o.escapedName;if(!(4194304&o.flags)&&(!p||tC(i)||"length"===i)&&(!a||16777216&o.flags)){const a=Zp(e,i);if(a&&a!==o){const i=oe(e,t,a,o,Gl,r,s,n===_o);if(!i)return 0;c&=i}}}return c}function se(e,t,r,i,o){var a,s;if(n===uo)return function(e,t,n){const r=uf(e,n),i=uf(t,n);if(r.length!==i.length)return 0;let o=-1;for(let e=0;eKs(e,void 0,262144,r);return j(Ca.Type_0_is_not_assignable_to_type_1,e(t),e(c)),j(Ca.Types_of_construct_signatures_are_incompatible),d}}else e:for(const t of u){const n=A();let a=i;for(const e of _){const r=_e(e,t,!0,a,o,p(e,t));if(r){d&=r,F(n);continue e}a=!1}return a&&j(Ca.Type_0_provides_no_match_for_the_signature_1,Gs(e),Ks(t,void 0,void 0,r)),0}return d}function ce(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(Ca.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Gs(e),Gs(t)):(e,t)=>I(Ca.Call_signature_return_types_0_and_1_are_incompatible,Gs(e),Gs(t))}function le(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(Ca.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Gs(e),Gs(t)):(e,t)=>I(Ca.Construct_signature_return_types_0_and_1_are_incompatible,Gs(e),Gs(t))}function _e(e,t,r,i,o,a){const s=n===so?16:n===co?24:0;return fk(r?Um(e):e,r?Um(t):t,s,i,j,a,function(e,t,n){return U(e,t,3,n,void 0,o)},kn)}function ue(e,t,n,r){const i=U(e.type,t.type,3,n,void 0,r);return!i&&n&&(e.keyType===t.keyType?j(Ca._0_index_signatures_are_incompatible,Gs(e.keyType)):j(Ca._0_and_1_index_signatures_are_incompatible,Gs(e.keyType),Gs(t.keyType))),i}function de(e,t,r,i,o){if(n===uo)return function(e,t){const n=bf(e),r=bf(t);if(n.length!==r.length)return 0;for(const t of r){const n=xf(e,t.keyType);if(!n||!U(n.type,t.type,3)||n.isReadonly!==t.isReadonly)return 0}return-1}(e,t);const a=bf(t),s=ee(a,e=>e.keyType===Jt);let c=-1;for(const t of a){const a=n!==co&&!r&&s&&1&t.type.flags?-1:zd(e)&&s?U(Ad(e),t.type,3,i):fe(e,t,i,o);if(!a)return 0;c&=a}return c}function fe(e,t,r,i){const o=Tf(e,t.keyType);return o?ue(o,t,r,i):1&i||!(n!==co||8192&Ox(e))||!VC(e)?(r&&j(Ca.Index_signature_for_type_0_is_missing_in_type_1,Gs(t.keyType),Gs(e)),0):function(e,t,n,r){let i=-1;const o=t.keyType,a=2097152&e.flags?$d(e):Vd(e);for(const s of a)if(!Tk(e,s)&&hf(Jv(s,8576),o)){const e=Gl(s),a=U(te||32768&e.flags||o===zt||!(16777216&s.flags)?e:hN(e,524288),t.type,3,n,void 0,r);if(!a)return n&&j(Ca.Property_0_is_incompatible_with_index_signature,Hs(s)),0;i&=a}for(const a of bf(e))if(hf(a.keyType,o)){const e=ue(a,t,n,r);if(!e)return 0;i&=e}return i}(e,t,r,i)}}function Pk(e){if(16&e.flags)return!1;if(3145728&e.flags)return!!h(e.types,Pk);if(465829888&e.flags){const t=Kd(e);if(t&&t!==e)return Pk(t)}return xT(e)||!!(134217728&e.flags)||!!(268435456&e.flags)}function Ek(e,t){return $T(e)&&$T(t)?p:Hd(t).filter(t=>Fk(yc(e,t.escapedName),Kl(t)))}function Fk(e,t){return!!e&&!!t&&oL(e,32768)&&!!qC(t)}function Ak(e,t,n=FS){return Kz(e,t,n)||function(e,t){const n=Ox(e);if(20&n&&1048576&t.flags)return C(t.types,t=>{if(524288&t.flags){const r=n&Ox(t);if(4&r)return e.target===t.target;if(16&r)return!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}return!1})}(e,t)||function(e,t){if(128&Ox(e)&&JN(t,lT))return C(t.types,e=>!lT(e))}(e,t)||function(e,t){let n=0;const r=uf(e,n).length>0||(n=1,uf(e,n).length>0);if(r)return C(t.types,e=>uf(e,n).length>0)}(e,t)||function(e,t){let n;if(!(406978556&e.flags)){let r=0;for(const i of t.types)if(!(406978556&i.flags)){const t=Nv([ib(e),ib(i)]);if(4194304&t.flags)return i;if(xT(t)||1048576&t.flags){const e=1048576&t.flags?I(t.types,xT):1;e>=r&&(n=i,r=e)}}}return n}(e,t)}function Ik(e,t,n){const r=e.types,i=r.map(e=>402784252&e.flags?0:-1);for(const[e,o]of t){let t=!1;for(let a=0;ai[t]),0):e;return 131072&o.flags?e:o}function Ok(e){if(524288&e.flags){const t=Ud(e);return 0===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.indexInfos.length&&t.properties.length>0&&T(t.properties,e=>!!(16777216&e.flags))}return 33554432&e.flags?Ok(e.baseType):!!(2097152&e.flags)&&T(e.types,Ok)}function jk(e){return e===Xn||e===Qn||8&e.objectFlags?S:Mk(e.symbol,e.typeParameters)}function Lk(e){return Mk(e,$o(e).typeParameters)}function Mk(e,t=p){var n,r;const i=$o(e);if(!i.variances){null==(n=cr)||n.push(cr.Phase.CheckTypes,"getVariancesWorker",{arity:t.length,id:rv(U_(e))});const o=ji,a=Oi;ji||(ji=!0,Oi=Fi.length),i.variances=p;const s=[];for(const n of t){const t=Jk(n);let r=16384&t?8192&t?0:1:8192&t?2:void 0;if(void 0===r){let t=!1,i=!1;const o=Ht;Ht=e=>e?i=!0:t=!0;const a=Rk(e,n,Mn),s=Rk(e,n,Rn);r=(zS(s,a)?1:0)|(zS(a,s)?2:0),3===r&&zS(Rk(e,n,Bn),a)&&(r=4),Ht=o,(t||i)&&(t&&(r|=8),i&&(r|=16))}s.push(r)}o||(ji=!1,Oi=a),i.variances=s,null==(r=cr)||r.pop({variances:s.map(Tn.formatVariance)})}return i.variances}function Rk(e,t,n){const r=Kx(t,n),i=U_(e);if(Pc(i))return i;const o=524288&e.flags?ih(e,Jx($o(e).typeParameters,r)):qg(i,Jx(i.typeParameters,r));return gt.add(rv(o)),o}function Bk(e){return gt.has(rv(e))}function Jk(e){var t;return 28672&Me(null==(t=e.symbol)?void 0:t.declarations,(e,t)=>e|rb(t),0)}function zk(e){return 262144&e.flags&&!Gd(e)}function qk(e){return function(e){return!!(4&Ox(e))&&!e.node}(e)&&ee(Hg(e),e=>!!(262144&e.flags)||qk(e))}function Uk(e,t,n,r,i){if(r===uo&&e.id>t.id){const n=e;e=t,t=n}const o=n?":"+n:"";return qk(e)&&qk(t)?function(e,t,n,r){const i=[];let o="";const a=c(e,0),s=c(t,0);return`${o}${a},${s}${n}`;function c(e,t=0){let n=""+e.target.id;for(const a of Hg(e)){if(262144&a.flags){if(r||zk(a)){let e=i.indexOf(a);e<0&&(e=i.length,i.push(a)),n+="="+e;continue}o="*"}else if(t<4&&qk(a)){n+="<"+c(a,t+1)+">";continue}n+="-"+a.id}return n}}(e,t,o,i):`${e.id},${t.id}${o}`}function Vk(e,t){if(!(6&xx(e)))return t(e);for(const n of e.links.containingType.types){const r=Zp(n,e.escapedName),i=r&&Vk(r,t);if(i)return i}}function Wk(e){return e.parent&&32&e.parent.flags?U_(as(e)):void 0}function $k(e){const t=Wk(e),n=t&&P_(t)[0];return n&&yc(n,e.escapedName)}function Hk(e,t,n){return Vk(t,t=>!!(4&Sx(t,n))&&!t_(e,Wk(t)))?void 0:e}function Kk(e,t,n,r=3){if(n>=r){if(96&~Ox(e)||(e=Gk(e)),2097152&e.flags)return ee(e.types,e=>Kk(e,t,n,r));const i=Qk(e);let o=0,a=0;for(let e=0;e=a&&(o++,o>=r))return!0;a=n.id}}}return!1}function Gk(e){let t;for(;!(96&~Ox(e))&&(t=jd(e))&&(t.symbol||2097152&t.flags&&ee(t.types,e=>!!e.symbol));)e=t;return e}function Xk(e,t){return 96&~Ox(e)||(e=Gk(e)),2097152&e.flags?ee(e.types,e=>Xk(e,t)):Qk(e)===t}function Qk(e){if(524288&e.flags&&!Jw(e)){if(4&Ox(e)&&e.node)return e.node;if(e.symbol&&!(16&Ox(e)&&32&e.symbol.flags))return e.symbol;if($T(e))return e.target}if(262144&e.flags)return e.symbol;if(8388608&e.flags){do{e=e.objectType}while(8388608&e.flags);return e}return 16777216&e.flags?e.root:e}function Yk(e,t){return 0!==Zk(e,t,ES)}function Zk(e,t,n){if(e===t)return-1;const r=6&Sx(e);if(r!==(6&Sx(t)))return 0;if(r){if(lB(e)!==lB(t))return 0}else if((16777216&e.flags)!=(16777216&t.flags))return 0;return Yj(e)!==Yj(t)?0:n(Kl(e),Kl(t))}function eT(e,t,n,r,i,o){if(e===t)return-1;if(!function(e,t,n){const r=gj(e),i=gj(t),o=hj(e),a=hj(t),s=yj(e),c=yj(t);return r===i&&o===a&&s===c||!!(n&&o<=a)}(e,t,n))return 0;if(g(e.typeParameters)!==g(t.typeParameters))return 0;if(t.typeParameters){const n=$x(e.typeParameters,t.typeParameters);for(let r=0;re|(1048576&t.flags?tT(t.types):t.flags),0)}function nT(e){if(1===e.length)return e[0];const t=V?B(e,e=>qN(e,e=>!(98304&e.flags))):e,n=function(e){let t;for(const n of e)if(!(131072&n.flags)){const e=MT(n);if(t??(t=e),e===n||e!==t)return!1}return!0}(t)?dv(t):Me(t,(e,t)=>IS(e,t)?t:e);return t===e?n:NC(n,98304&tT(e))}function rT(e){return!!(4&Ox(e))&&(e.target===Xn||e.target===Qn)}function iT(e){return!!(4&Ox(e))&&e.target===Qn}function oT(e){return rT(e)||$T(e)}function aT(e){return rT(e)&&!iT(e)||$T(e)&&!e.target.readonly}function sT(e){return rT(e)?Hg(e)[0]:void 0}function lT(e){return rT(e)||!(98304&e.flags)&&zS(e,or)}function _T(e){return aT(e)||!(98305&e.flags)&&zS(e,rr)}function uT(e){if(!(4&Ox(e)&&3&Ox(e.target)))return;if(33554432&Ox(e))return 67108864&Ox(e)?e.cachedEquivalentBaseType:void 0;e.objectFlags|=33554432;const t=e.target;if(1&Ox(t)){const e=y_(t);if(e&&80!==e.expression.kind&&211!==e.expression.kind)return}const n=P_(t);if(1!==n.length)return;if(xu(e.symbol).size)return;let r=g(t.typeParameters)?hS(n[0],$x(t.typeParameters,Hg(e).slice(0,t.typeParameters.length))):n[0];return g(Hg(e))>g(t.typeParameters)&&(r=Tu(r,Ee(Hg(e)))),e.objectFlags|=67108864,e.cachedEquivalentBaseType=r}function dT(e){return V?e===nn:e===Ot}function pT(e){const t=sT(e);return!!t&&dT(t)}function mT(e){let t;return $T(e)||!!Zp(e,"0")||lT(e)&&!!(t=yc(e,"length"))&&zN(t,e=>!!(256&e.flags))}function gT(e){return lT(e)||mT(e)}function vT(e,t){const n=yc(e,""+t);return n||(zN(e,$T)?iC(e,t,k.noUncheckedIndexedAccess?At:void 0):void 0)}function bT(e){return!(240544&e.flags)}function xT(e){return!!(109472&e.flags)}function DT(e){const t=sp(e);return 2097152&t.flags?ee(t.types,xT):xT(t)}function FT(e){return!!(16&e.flags)||(1048576&e.flags?!!(1024&e.flags)||T(e.types,xT):xT(e))}function MT(e){return 1056&e.flags?R_(e):402653312&e.flags?Jt:256&e.flags?zt:2048&e.flags?qt:512&e.flags?Gt:1048576&e.flags?function(e){const t=`B${rv(e)}`;return mo(t)??go(t,WN(e,MT))}(e):e}function RT(e){return 402653312&e.flags?Jt:288&e.flags?zt:2048&e.flags?qt:512&e.flags?Gt:1048576&e.flags?WN(e,RT):e}function JT(e){return 1056&e.flags&&bx(e)?R_(e):128&e.flags&&bx(e)?Jt:256&e.flags&&bx(e)?zt:2048&e.flags&&bx(e)?qt:512&e.flags&&bx(e)?Gt:1048576&e.flags?WN(e,JT):e}function UT(e){return 8192&e.flags?Qt:1048576&e.flags?WN(e,UT):e}function VT(e,t){return wL(e,t)||(e=UT(JT(e))),vx(e)}function WT(e,t,n,r){if(e&&xT(e)){e=VT(e,t?zR(n,t,r):void 0)}return e}function $T(e){return!!(4&Ox(e)&&8&e.target.objectFlags)}function KT(e){return $T(e)&&!!(8&e.target.combinedFlags)}function GT(e){return KT(e)&&1===e.target.elementFlags.length}function eC(e){return oC(e,e.target.fixedLength)}function iC(e,t,n){return WN(e,e=>{const r=e,i=eC(r);return i?n&&t>=tv(r.target)?dv([i,n]):i:At})}function oC(e,t,n=0,r=!1,i=!1){const o=nh(e)-n;if(tmN(e,4194304))}function xC(e){return 4&e.flags?Ni:8&e.flags?Pi:64&e.flags?Ei:e===Vt||e===Ut||114691&e.flags||128&e.flags&&""===e.value||256&e.flags&&0===e.value||2048&e.flags&&_C(e)?e:Zt}function NC(e,t){const n=t&~e.flags&98304;return 0===n?e:dv(32768===n?[e,At]:65536===n?[e,Rt]:[e,At,Rt])}function DC(e,t=!1){Tn.assert(V);const n=t?Lt:At;return e===n||1048576&e.flags&&e.types[0]===n?e:dv([e,n])}function jC(e){return V?yN(e,2097152):e}function LC(e){return V?dv([e,Mt]):e}function RC(e){return V?UN(e,Mt):e}function BC(e,t,n){return n?Fl(t)?DC(e):LC(e):e}function JC(e,t){return El(t)?jC(e):Dl(t)?RC(e):e}function zC(e,t){return te&&t?UN(e,jt):e}function qC(e){return e===jt||!!(1048576&e.flags)&&e.types[0]===jt}function UC(e){return te?UN(e,jt):hN(e,524288)}function VC(e){const t=Ox(e);return 2097152&e.flags?T(e.types,VC):!(!(e.symbol&&7040&e.symbol.flags)||32&e.symbol.flags||DJ(e))||!!(4194304&t)||!!(1024&t&&VC(e.source))}function WC(e,t){const n=Eo(e.flags,e.escapedName,8&xx(e));n.declarations=e.declarations,n.parent=e.parent,n.links.type=t,n.links.target=e,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration);const r=$o(e).nameType;return r&&(n.links.nameType=r),n}function $C(e){if(!(Bw(e)&&8192&Ox(e)))return e;const t=e.regularType;if(t)return t;const n=e,r=function(e,t){const n=ad();for(const r of Vd(e)){const e=Kl(r),i=t(e);n.set(r.escapedName,i===e?r:WC(r,i))}return n}(e,$C),i=Cs(n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);return i.flags=n.flags,i.objectFlags|=-8193&n.objectFlags,e.regularType=i,i}function HC(e,t,n){return{parent:e,propertyName:t,siblings:n,resolvedProperties:void 0}}function KC(e){if(!e.siblings){const t=[];for(const n of KC(e.parent))if(Bw(n)){const r=Wd(n,e.propertyName);r&&BN(Kl(r),e=>{t.push(e)})}e.siblings=t}return e.siblings}function GC(e){if(!e.resolvedProperties){const t=new Map;for(const n of KC(e))if(Bw(n)&&!(2097152&Ox(n)))for(const e of Hd(n))t.set(e.escapedName,e);e.resolvedProperties=We(t.values())}return e.resolvedProperties}function XC(e,t){if(!(4&e.flags))return e;const n=Kl(e),r=ZC(n,t&&HC(t,e.escapedName,void 0));return r===n?e:WC(e,r)}function QC(e){const t=mt.get(e.escapedName);if(t)return t;const n=WC(e,Lt);return n.flags|=16777216,mt.set(e.escapedName,n),n}function YC(e){return ZC(e,void 0)}function ZC(e,t){if(196608&Ox(e)){if(void 0===t&&e.widened)return e.widened;let n;if(98305&e.flags)n=St;else if(Bw(e))n=function(e,t){const n=ad();for(const r of Vd(e))n.set(r.escapedName,XC(r,t));if(t)for(const e of GC(t))n.has(e.escapedName)||n.set(e.escapedName,QC(e));const r=Cs(e.symbol,n,p,p,B(bf(e),e=>mg(e.keyType,YC(e.type),e.isReadonly)));return r.objectFlags|=266240&Ox(e),r}(e,t);else if(1048576&e.flags){const r=t||HC(void 0,void 0,e.types),i=B(e.types,e=>98304&e.flags?e:ZC(e,r));n=dv(i,ee(i,hk)?2:1)}else 2097152&e.flags?n=Nv(B(e.types,YC)):oT(e)&&(n=qg(e.target,B(Hg(e),YC)));return n&&void 0===t&&(e.widened=n),n||e}return e}function ew(e){let t=!1;if(65536&Ox(e)){if(1048576&e.flags)if(ee(e.types,hk))t=!0;else for(const n of e.types)ew(n)&&(t=!0);if(oT(e))for(const n of Hg(e))ew(n)&&(t=!0);if(Bw(e))for(const n of Vd(e)){const e=Kl(n);65536&Ox(e)&&(ew(e)||So(n.valueDeclaration,Ca.Object_literal_s_property_0_implicitly_has_an_1_type,Hs(n),Gs(YC(e))),t=!0)}}return t}function tw(e,t,n){const r=Gs(YC(t));if(zm(e)&&!yT(Dd(e),k))return;let i;switch(e.kind){case 226:case 172:case 171:i=Q?Ca.Member_0_implicitly_has_an_1_type:Ca.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 169:const t=e;if(QN(t.name)){const n=Nc(t.name);if((CD(t.parent)||vD(t.parent)||ED(t.parent))&&t.parent.parameters.includes(t)&&(Le(t,t.name.escapedText,788968,void 0,!0)||n&&zx(n))){const n="arg"+t.parent.parameters.indexOf(t),r=Rp(t.name)+(t.dotDotDotToken?"[]":"");return void To(Q,e,Ca.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,n,r)}}i=e.dotDotDotToken?Q?Ca.Rest_parameter_0_implicitly_has_an_any_type:Ca.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:Q?Ca.Parameter_0_implicitly_has_an_1_type:Ca.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 208:if(i=Ca.Binding_element_0_implicitly_has_an_1_type,!Q)return;break;case 317:return void So(e,Ca.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);case 323:return void(Q&&CF(e.parent)&&So(e.parent.tagName,Ca.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation,r));case 262:case 174:case 173:case 177:case 178:case 218:case 219:if(Q&&!e.name)return void So(e,3===n?Ca.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:Ca.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);i=Q?3===n?Ca._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:Ca._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:Ca._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 200:return void(Q&&So(e,Ca.Mapped_object_type_implicitly_has_an_any_template_type));default:i=Q?Ca.Variable_0_implicitly_has_an_1_type:Ca.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}To(Q,e,i,Rp(jc(e)),r)}function nw(e,t,n){a(()=>{!(Q&&65536&Ox(t))||n&&eA(e)||ew(t)||tw(e,t,n)})}function rw(e,t,n){const r=gj(e),i=gj(t),o=vj(e),a=vj(t),s=a?i-1:i,c=o?s:Math.min(r,s),l=tm(e);if(l){const e=tm(t);e&&n(l,e)}for(let r=0;re.typeParameter),M(e.inferences,(t,n)=>()=>(t.isFixed||(!function(e){if(e.intraExpressionInferenceSites){for(const{node:t,type:n}of e.intraExpressionInferenceSites){const r=174===t.kind?wF(t,2):UF(t,2);r&&Lw(e.inferences,n,r)}e.intraExpressionInferenceSites=void 0}}(e),lw(e.inferences),t.isFixed=!0),Ww(e,n))))}(i),i.nonFixingMapper=function(e){return Xx(M(e.inferences,e=>e.typeParameter),M(e.inferences,(t,n)=>()=>Ww(e,n)))}(i),i}function lw(e){for(const t of e)t.isFixed||(t.inferredType=void 0)}function _w(e,t,n){(e.intraExpressionInferenceSites??(e.intraExpressionInferenceSites=[])).push({node:t,type:n})}function uw(e){return{typeParameter:e,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function pw(e){return{typeParameter:e.typeParameter,candidates:e.candidates&&e.candidates.slice(),contraCandidates:e.contraCandidates&&e.contraCandidates.slice(),inferredType:e.inferredType,priority:e.priority,topLevel:e.topLevel,isFixed:e.isFixed,impliedArity:e.impliedArity}}function fw(e){return e&&e.mapper}function mw(e){const t=Ox(e);if(524288&t)return!!(1048576&t);const n=!!(465829888&e.flags||524288&e.flags&&!gw(e)&&(4&t&&(e.node||ee(Hg(e),mw))||134217728&t&&g(e.outerTypeParameters)||16&t&&e.symbol&&14384&e.symbol.flags&&e.symbol.declarations||12583968&t)||3145728&e.flags&&!(1024&e.flags)&&!gw(e)&&ee(e.types,mw));return 3899393&e.flags&&(e.objectFlags|=524288|(n?1048576:0)),n}function gw(e){if(e.aliasSymbol&&!e.aliasTypeArguments){const t=id(e.aliasSymbol,265);return!(!t||!xc(t.parent,e=>307===e.kind||267!==e.kind&&"quit"))}return!1}function hw(e,t,n=0){return!!(e===t||3145728&e.flags&&ee(e.types,e=>hw(e,t,n))||n<3&&16777216&e.flags&&(hw(nx(e),t,n+1)||hw(rx(e),t,n+1)))}function yw(e,t,n){const r=e.id+","+t.id+","+n.id;if(pi.has(r))return pi.get(r);const i=function(e,t,n){if(!(xf(e,Jt)||0!==Hd(e).length&&vw(e)))return;if(rT(e)){const r=bw(Hg(e)[0],t,n);if(!r)return;return jy(r,iT(e))}if($T(e)){const r=M(nv(e),e=>bw(e,t,n));if(!T(r,e=>!!e))return;return Vy(r,4&Rd(t)?B(e.target.elementFlags,e=>2&e?1:e):e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations)}const r=vs(1040,void 0);return r.source=e,r.mappedType=t,r.constraintType=n,r}(e,t,n);return pi.set(r,i),i}function vw(e){return!(262144&Ox(e))||Bw(e)&&ee(Hd(e),e=>vw(Kl(e)))||$T(e)&&ee(nv(e),vw)}function bw(e,t,n){const r=e.id+","+t.id+","+n.id;if(pi.has(r))return pi.get(r)||Ft;to.push(e),no.push(t);const i=ro;let o;return Kk(e,to,to.length,2)&&(ro|=1),Kk(t,no,no.length,2)&&(ro|=2),3!==ro&&(o=function(e,t,n){const r=Hb(n.type,Td(t)),i=Ad(t),o=uw(r);return Lw([o],e,i),Tw(o)||Ft}(e,t,n)),to.pop(),no.pop(),ro=i,pi.set(r,o),o}function*xw(e,t,n,r){const i=Hd(t);for(const t of i)if(!au(t)&&(n||!(16777216&t.flags||48&xx(t)))){const n=Zp(e,t.escapedName);if(n){if(r){const e=Kl(t);if(109472&e.flags){const r=Kl(n);1&r.flags||vx(r)===vx(e)||(yield t)}}}else yield t}}function Sw(e,t,n,r){return we(xw(e,t,n,r))}function Tw(e){return e.candidates?dv(e.candidates,2):e.contraCandidates?Nv(e.contraCandidates):void 0}function Nw(e){return!!Ho(e).skipDirectInference}function Dw(e){return!(!e.symbol||!ee(e.symbol.declarations,Nw))}function Pw(e,t){if(""===e)return!1;const n=+e;return isFinite(n)&&(!t||""+n===e)}function Ew(e){return Dx(AT(e))}function Fw(e,t){if(1&t.flags)return!0;if(134217732&t.flags)return zS(e,t);if(268435456&t.flags){const n=[];for(;268435456&t.flags;)n.unshift(t.symbol),t=t.type;return Me(n,(e,t)=>cb(t,e),e)===e&&Fw(e,t)}return!1}function Aw(e,t){if(2097152&t.flags)return T(t.types,t=>t===Pn||Aw(e,t));if(4&t.flags||zS(e,t))return!0;if(128&e.flags){const n=e.value;return!!(8&t.flags&&Pw(n,!1)||64&t.flags&&IT(n,!1)||98816&t.flags&&n===t.intrinsicName||268435456&t.flags&&Fw(kx(n),t)||134217728&t.flags&&Ow(e,t))}if(134217728&e.flags){const n=e.texts;return 2===n.length&&""===n[0]&&""===n[1]&&zS(e.types[0],t)}return!1}function Iw(e,t){return 128&e.flags?jw([e.value],p,t):134217728&e.flags?F(e.texts,t.texts)?M(e.types,(e,n)=>{return zS(sp(e),sp(t.types[n]))?e:402653317&(r=e).flags?r:ab(["",""],[r]);var r}):jw(e.texts,e.types,t):void 0}function Ow(e,t){const n=Iw(e,t);return!!n&&T(n,(e,n)=>Aw(e,t.types[n]))}function jw(e,t,n){const r=e.length-1,i=e[0],o=e[r],a=n.texts,s=a.length-1,c=a[0],l=a[s];if(0===r&&i.length0){let t=d,r=p;for(;r=f(t).indexOf(n,r),!(r>=0);){if(t++,t===e.length)return;r=0}m(t,r),p+=n.length}else if(p{if(!(128&e.flags))return;const n=Tc(e.value),r=Eo(4,n);r.links.type=St,e.symbol&&(r.declarations=e.symbol.declarations,r.valueDeclaration=e.symbol.valueDeclaration),t.set(n,r)});const n=4&e.flags?[mg(Jt,wn,!1)]:p;return Cs(void 0,t,p,p,n)}(t);!function(e,t,n){const i=r;r|=n,y(e,t),r=i}(e,a.type,256)}else if(8388608&t.flags&&8388608&a.flags)d(t.objectType,a.objectType),d(t.indexType,a.indexType);else if(268435456&t.flags&&268435456&a.flags)t.symbol===a.symbol&&d(t.type,a.type);else if(33554432&t.flags)d(t.baseType,a),f(Rh(t),a,4);else if(16777216&a.flags)m(t,a,k);else if(3145728&a.flags)x(t,a.types,a.flags);else if(1048576&t.flags){const e=t.types;for(const t of e)d(t,a)}else if(134217728&a.flags)!function(e,t){const n=Iw(e,t),r=t.types;if(n||T(t.texts,e=>0===e.length))for(let e=0;ee|t.flags,0);if(!(4&r)){const n=t.value;296&r&&!Pw(n,!0)&&(r&=-297),2112&r&&!IT(n,!0)&&(r&=-2113);const o=Me(e,(e,i)=>i.flags&r?4&e.flags?e:4&i.flags?t:134217728&e.flags?e:134217728&i.flags&&Ow(t,i)?t:268435456&e.flags?e:268435456&i.flags&&n===lb(i.symbol,n)?t:128&e.flags?e:128&i.flags&&i.value===n?i:8&e.flags?e:8&i.flags?Nx(+n):32&e.flags?e:32&i.flags?Nx(+n):256&e.flags?e:256&i.flags&&i.value===+n?i:64&e.flags?e:64&i.flags?Ew(n):2048&e.flags?e:2048&i.flags&&ET(i.value)===n?i:16&e.flags?e:16&i.flags?"true"===n?Wt:"false"===n?Ut:Gt:512&e.flags?e:512&i.flags&&i.intrinsicName===n?i:32768&e.flags?e:32768&i.flags&&i.intrinsicName===n?i:65536&e.flags?e:65536&i.flags&&i.intrinsicName===n?i:e:e,Zt);if(!(131072&o.flags)){d(o,i);continue}}}}d(t,i)}}(t,a);else{if(zd(t=Fp(t))&&zd(a)&&m(t,a,w),!(512&r&&467927040&t.flags)){const e=wp(t);if(e!==t&&!(2621440&e.flags))return d(e,a);t=e}2621440&t.flags&&m(t,a,N)}else h(Hg(t),Hg(a),jk(t.target))}}}function f(e,t,n){const i=r;r|=n,d(e,t),r=i}function m(e,t,n){const r=e.id+","+t.id,i=a&&a.get(r);if(void 0!==i)return void(_=Math.min(_,i));(a||(a=new Map)).set(r,-1);const o=_;_=2048;const l=u;(s??(s=[])).push(e),(c??(c=[])).push(t),Kk(e,s,s.length,2)&&(u|=1),Kk(t,c,c.length,2)&&(u|=2),3!==u?n(e,t):_=-1,c.pop(),s.pop(),u=l,a.set(r,_),_=Math.min(_,o)}function g(e,t,n){let r,i;for(const o of t)for(const t of e)n(t,o)&&(d(t,o),r=ye(r,t),i=ye(i,o));return[r?O(e,e=>!E(r,e)):e,i?O(t,e=>!E(i,e)):t]}function h(e,t,n){const r=e.length!!b(e));if(!e||t&&e!==t)return;t=e}return t}(t);return void(n&&f(e,n,1))}if(1===i&&!s){const e=z(o,(e,t)=>a[t]?void 0:e);if(e.length)return void d(dv(e),n)}}else for(const n of t)b(n)?i++:d(e,n);if(2097152&n?1===i:i>0)for(const n of t)b(n)&&f(e,n,1)}function S(e,t,n){if(1048576&n.flags||2097152&n.flags){let r=!1;for(const i of n.types)r=S(e,t,i)||r;return r}if(4194304&n.flags){const r=b(n.type);if(r&&!r.isFixed&&!Dw(e)){const i=yw(e,t,n);i&&f(i,r.typeParameter,262144&Ox(e)?16:8)}return!0}if(262144&n.flags){f(ib(e,e.pattern?2:0),n,32);const r=Kd(n);if(r&&S(e,t,r))return!0;return d(dv(ne(M(Hd(e),Kl),M(bf(e),e=>e!==oi?e.type:Zt))),Ad(t)),!0}return!1}function k(e,t){if(16777216&e.flags)d(e.checkType,t.checkType),d(e.extendsType,t.extendsType),d(nx(e),nx(t)),d(rx(e),rx(t));else{!function(e,t,n,i){const o=r;r|=i,x(e,t,n),r=o}(e,[nx(t),rx(t)],t.flags,i?64:0)}}function w(e,t){d(Cd(e),Cd(t)),d(Ad(e),Ad(t));const n=wd(e),r=wd(t);n&&r&&d(n,r)}function N(e,t){var n,r;if(4&Ox(e)&&4&Ox(t)&&(e.target===t.target||rT(e)&&rT(t)))h(Hg(e),Hg(t),jk(e.target));else{if(zd(e)&&zd(t)&&w(e,t),32&Ox(t)&&!t.declaration.nameType){if(S(e,t,Cd(t)))return}if(!function(e,t){return $T(e)&&$T(t)?function(e,t){return!(8&t.target.combinedFlags)&&t.target.minLength>e.target.minLength||!t.target.hasRestElement&&(e.target.hasRestElement||t.target.fixedLength(12&e)==(12&o.target.elementFlags[t])))){for(let t=0;t0){const e=uf(t,n),o=e.length;for(let t=0;tIS(t,e)?t:e)}function qw(e,t){const n=function(e){if(e.length>1){const t=O(e,Jw);if(t.length){const n=dv(t,2);return ne(O(e,e=>!Jw(e)),[n])}}return e}(e.candidates),r=function(e){const t=Gd(e);return!!t&&oL(16777216&t.flags?Yd(t):t,406978556)}(e.typeParameter)||Xd(e.typeParameter),i=!r&&e.topLevel&&(e.isFixed||!function(e,t){const n=nm(e);return n?!!n.type&&hw(n.type,t):hw(mm(e),t)}(t,e.typeParameter)),o=r?B(n,vx):i?B(n,JT):n;return YC(416&e.priority?dv(o,2):nT(o))}function Ww(e,t){const n=e.inferences[t];if(!n.inferredType){let o,a;if(e.signature){const s=n.candidates?qw(n,e.signature):void 0,c=n.contraCandidates?zw(n):void 0;if(s||c){const t=s&&(!c||!(131072&s.flags)&&ee(n.contraCandidates,e=>IS(s,e))&&T(e.inferences,e=>e!==n&&Gd(e.typeParameter)!==n.typeParameter||T(e.candidates,e=>IS(e,s))));o=t?s:c,a=t?c:s}else if(1&e.flags)o=en;else{const a=mp(n.typeParameter);a&&(o=hS(a,(r=function(e,t){const n=e.inferences.slice(t);return $x(M(n,e=>e.typeParameter),M(n,()=>Ft))}(e,t),i=e.nonFixingMapper,r?Qx(5,r,i):i)))}}else o=Tw(n);n.inferredType=o||$w(!!(2&e.flags));const s=Gd(n.typeParameter);if(s){const t=hS(s,e.nonFixingMapper);o&&e.compareTypes(o,Tu(t,o))||(n.inferredType=a&&e.compareTypes(a,Tu(t,a))?a:t)}}var r,i;return n.inferredType}function $w(e){return e?St:Ft}function Hw(e){const t=[];for(let n=0;niE(e)||oE(e)||ID(e)))}function Yw(e,t,n,r){switch(e.kind){case 80:if(!wv(e)){const i=Xw(e);return i!==ht?`${r?KB(r):"-1"}|${rv(t)}|${rv(n)}|${GB(i)}`:void 0}case 110:return`0|${r?KB(r):"-1"}|${rv(t)}|${rv(n)}`;case 235:case 217:return Yw(e.expression,t,n,r);case 166:const i=Yw(e.left,t,n,r);return i&&`${i}.${e.right.escapedText}`;case 211:case 212:const o=eN(e);if(void 0!==o){const i=Yw(e.expression,t,n,r);return i&&`${i}.${o}`}if(iP(e)&&QN(e.argumentExpression)){const i=Xw(e.argumentExpression);if(bP(i)||xP(i)&&!QD(i)){const o=Yw(e.expression,t,n,r);return o&&`${o}.@${GB(i)}`}}break;case 206:case 207:case 262:case 218:case 219:case 174:return`${KB(e)}#${rv(t)}`}}function Zw(e,t){switch(t.kind){case 217:case 235:return Zw(e,t.expression);case 226:return xb(t)&&Zw(e,t.left)||yP(t)&&28===t.operatorToken.kind&&Zw(e,t.right)}switch(e.kind){case 236:return 236===t.kind&&e.keywordToken===t.keywordToken&&e.name.escapedText===t.name.escapedText;case 80:case 81:return wv(e)?110===t.kind:80===t.kind&&Xw(e)===Xw(t)||(eE(t)||eP(t))&&ps(Xw(e))===rs(t);case 110:return 110===t.kind;case 108:return 108===t.kind;case 235:case 217:return Zw(e.expression,t);case 211:case 212:const n=eN(e);if(void 0!==n){const r=qx(t)?eN(t):void 0;if(void 0!==r)return r===n&&Zw(e.expression,t.expression)}if(iP(e)&&iP(t)&&QN(e.argumentExpression)&&QN(t.argumentExpression)){const n=Xw(e.argumentExpression);if(n===Xw(t.argumentExpression)&&(bP(n)||xP(n)&&!QD(n)))return Zw(e.expression,t.expression)}break;case 166:return qx(t)&&e.right.escapedText===eN(t)&&Zw(e.left,t.expression);case 226:return yP(e)&&28===e.operatorToken.kind&&Zw(e.right,t)}return!1}function eN(e){if(rP(e))return e.name.escapedText;if(iP(e))return Kh((t=e).argumentExpression)?Tc(t.argumentExpression.text):Cb(t.argumentExpression)?function(e){const t=Ma(e,111551,!0);if(!t||!(bP(t)||8&t.flags))return;const n=t.valueDeclaration;if(void 0===n)return;const r=wl(n);if(r){const e=tN(r);if(void 0!==e)return e}if(Uu(n)&&Go(n,e)){const e=tg(n);if(e){const t=O_(n.parent)?Vc(n):RL(e);return t&&tN(t)}if(XE(n))return qp(n.name)}}(t.argumentExpression):void 0;var t;if(eP(e)){const t=qc(e);return t?Tc(t):void 0}return mD(e)?""+e.parent.parameters.indexOf(e):void 0}function tN(e){return 8192&e.flags?e.escapedName:384&e.flags?Tc(""+e.value):void 0}function nN(e,t){for(;qx(e);)if(Zw(e=e.expression,t))return!0;return!1}function rN(e,t){for(;Dl(e);)if(Zw(e=e.expression,t))return!0;return!1}function iN(e,t){if(e&&1048576&e.flags){const n=Pp(e,t);if(n&&2&xx(n))return void 0===n.links.isDiscriminantProperty&&(n.links.isDiscriminantProperty=!(192&~n.links.checkFlags||Rb(Kl(n)))),!!n.links.isDiscriminantProperty}return!1}function oN(e,t){let n;for(const r of e)if(iN(t,r.escapedName)){if(n){n.push(r);continue}n=[r]}return n}function aN(e){const t=e.types;if(!(t.length<10||32768&Ox(e)||I(t,e=>!!(59506688&e.flags))<10)){if(void 0===e.keyPropertyName){const n=h(t,e=>59506688&e.flags?h(Hd(e),e=>xT(Kl(e))?e.escapedName:void 0):void 0),r=n&&function(e,t){const n=new Map;let r=0;for(const i of e)if(61603840&i.flags){const e=yc(i,t);if(e){if(!FT(e))return;let t=!1;BN(e,e=>{const r=rv(vx(e)),o=n.get(r);o?o!==Ft&&(n.set(r,Ft),t=!0):n.set(r,i)}),t||r++}}return r>=10&&2*r>=e.length?n:void 0}(t,n);e.keyPropertyName=r?n:"",e.constituentMap=r}return e.keyPropertyName.length?e.keyPropertyName:void 0}}function sN(e,t){var n;const r=null==(n=e.constituentMap)?void 0:n.get(rv(vx(t)));return r!==Ft?r:void 0}function cN(e,t){const n=aN(e),r=n&&yc(t,n);return r&&sN(e,r)}function lN(e,t){return Zw(e,t)||nN(e,t)}function _N(e,t){if(e.arguments)for(const n of e.arguments)if(lN(t,n)||rN(n,t))return!0;return!(211!==e.expression.kind||!lN(t,e.expression.expression))}function uN(e){return e.id<=0&&(e.id=BB,BB++),e.id}function dN(e,t){if(e===t)return e;if(131072&t.flags)return t;const n=`A${rv(e)},${rv(t)}`;return mo(n)??go(n,function(e,t){const n=qN(e,e=>function(e,t){if(!(1048576&e.flags))return zS(e,t);for(const n of e.types)if(zS(n,t))return!0;return!1}(t,e)),r=512&t.flags&&bx(t)?WN(n,yx):n;return zS(t,r)?r:e}(e,t))}function pN(e){const t=Ud(e);return!!(t.callSignatures.length||t.constructSignatures.length||t.members.get("bind")&&IS(e,Hn))}function fN(e,t){return gN(e,t)&t}function mN(e,t){return 0!==fN(e,t)}function gN(e,t){467927040&e.flags&&(e=op(e)||Ft);const n=e.flags;if(268435460&n)return V?16317953:16776705;if(134217856&n){const t=128&n&&""===e.value;return V?t?12123649:7929345:t?12582401:16776705}if(40&n)return V?16317698:16776450;if(256&n){const t=0===e.value;return V?t?12123394:7929090:t?12582146:16776450}if(64&n)return V?16317188:16775940;if(2048&n){const t=_C(e);return V?t?12122884:7928580:t?12581636:16775940}if(16&n)return V?16316168:16774920;if(528&n)return V?e===Ut||e===Vt?12121864:7927560:e===Ut||e===Vt?12580616:16774920;if(524288&n){return 0===(t&(V?83427327:83886079))?0:16&Ox(e)&&hk(e)?V?83427327:83886079:pN(e)?V?7880640:16728e3:V?7888800:16736160}return 16384&n?9830144:32768&n?26607360:65536&n?42917664:12288&n?V?7925520:16772880:67108864&n?V?7888800:16736160:131072&n?0:1048576&n?Me(e.types,(e,n)=>e|gN(n,t),0):2097152&n?function(e,t){const n=oL(e,402784252);let r=0,i=134217727;for(const o of e.types)if(!(n&&524288&o.flags)){const e=gN(o,t);r|=e,i&=e}return 8256&r|134209471&i}(e,t):83886079}function hN(e,t){return qN(e,e=>mN(e,t))}function yN(e,t){const n=bN(hN(V&&2&e.flags?Fn:e,t));if(V)switch(t){case 524288:return vN(n,65536,131072,33554432,Rt);case 1048576:return vN(n,131072,65536,16777216,At);case 2097152:case 4194304:return WN(n,e=>mN(e,262144)?function(e){return ar||(ar=cy("NonNullable",524288,void 0)||ht),ar!==ht?ih(ar,[e]):Nv([e,wn])}(e):e)}return n}function vN(e,t,n,r,i){const o=fN(e,50528256);if(!(o&t))return e;const a=dv([wn,i]);return WN(e,e=>mN(e,t)?Nv([e,o&r||!mN(e,n)?wn:a]):e)}function bN(e){return e===Fn?Ft:e}function xN(e,t){return t?dv([Lc(e),RL(t)]):e}function SN(e,t){var n;const r=Bv(t);if(!kC(r))return wt;const i=TC(r);return yc(e,i)||TN(null==(n=Cf(e,i))?void 0:n.type)||wt}function kN(e,t){return zN(e,mT)&&vT(e,t)||TN(gR(65,e,At,void 0))||wt}function TN(e){return e&&k.noUncheckedIndexedAccess?dv([e,jt]):e}function CN(e){return jy(gR(65,e,At,void 0)||wt)}function wN(e){return 226===e.parent.kind&&e.parent.left===e||250===e.parent.kind&&e.parent.initializer===e}function NN(e){return SN(DN(e.parent),e.name)}function DN(e){const{parent:t}=e;switch(t.kind){case 249:return Jt;case 250:return mR(t)||wt;case 226:return function(e){return 209===e.parent.kind&&wN(e.parent)||303===e.parent.kind&&wN(e.parent.parent)?xN(DN(e),e.right):RL(e.right)}(t);case 220:return At;case 209:return function(e,t){return kN(DN(e),e.elements.indexOf(t))}(t,e);case 230:return function(e){return CN(DN(e.parent))}(t);case 303:return NN(t);case 304:return function(e){return xN(NN(e),e.objectAssignmentInitializer)}(t)}return wt}function PN(e){return Ho(e).resolvedType||RL(e)}function EN(e){return 260===e.kind?function(e){return e.initializer?PN(e.initializer):249===e.parent.parent.kind?Jt:250===e.parent.parent.kind&&mR(e.parent.parent)||wt}(e):function(e){const t=e.parent,n=EN(t.parent);return xN(206===t.kind?SN(n,e.propertyName||e.name):e.dotDotDotToken?CN(n):kN(n,t.elements.indexOf(e)),e.initializer)}(e)}function FN(e){switch(e.kind){case 217:return FN(e.expression);case 226:switch(e.operatorToken.kind){case 64:case 76:case 77:case 78:return FN(e.left);case 28:return FN(e.right)}}return e}function IN(e){const{parent:t}=e;return 217===t.kind||226===t.kind&&64===t.operatorToken.kind&&t.left===e||226===t.kind&&28===t.operatorToken.kind&&t.right===e?IN(t):e}function jN(e){return 296===e.kind?vx(RL(e.expression)):Zt}function LN(e){const t=Ho(e);if(!t.switchTypes){t.switchTypes=[];for(const n of e.caseBlock.clauses)t.switchTypes.push(jN(n))}return t.switchTypes}function MN(e){if(ee(e.caseBlock.clauses,e=>296===e.kind&&!Ku(e.expression)))return;const t=[];for(const n of e.caseBlock.clauses){const e=296===n.kind?n.expression.text:void 0;t.push(e&&!E(t,e)?e:void 0)}return t}function RN(e,t){return!!(e===t||131072&e.flags||1048576&t.flags&&function(e,t){if(1048576&e.flags){for(const n of e.types)if(!iv(t.types,n))return!1;return!0}if(1056&e.flags&&R_(e)===t)return!0;return iv(t.types,e)}(e,t))}function BN(e,t){return 1048576&e.flags?h(e.types,t):t(e)}function JN(e,t){return 1048576&e.flags?ee(e.types,t):t(e)}function zN(e,t){return 1048576&e.flags?T(e.types,t):t(e)}function qN(e,t){if(1048576&e.flags){const n=e.types,r=O(n,t);if(r===n)return e;const i=e.origin;let o;if(i&&1048576&i.flags){const e=i.types,a=O(e,e=>!!(1048576&e.flags)||t(e));if(e.length-a.length===n.length-r.length){if(1===a.length)return a[0];o=uv(1048576,a)}}return mv(r,16809984&e.objectFlags,void 0,void 0,o)}return 131072&e.flags||t(e)?e:Zt}function UN(e,t){return qN(e,e=>e!==t)}function VN(e){return 1048576&e.flags?e.types.length:1}function WN(e,t,n){if(131072&e.flags)return e;if(!(1048576&e.flags))return t(e);const r=e.origin,i=r&&1048576&r.flags?r.types:e.types;let o,a=!1;for(const e of i){const r=1048576&e.flags?WN(e,t,n):t(e);a||(a=e!==r),r&&(o?o.push(r):o=[r])}return a?o&&dv(o,n?0:1):e}function $N(e,t,n,r){return 1048576&e.flags&&n?dv(M(e.types,t),1,n,r):WN(e,t)}function HN(e,t){return qN(e,e=>0!==(e.flags&t))}function KN(e,t){return oL(e,134217804)&&oL(t,402655616)?WN(e,e=>4&e.flags?HN(t,402653316):Lb(e)&&!oL(t,402653188)?HN(t,128):8&e.flags?HN(t,264):64&e.flags?HN(t,2112):e):e}function GN(e){return 0===e.flags}function XN(e){return 0===e.flags?e.type:e}function ZN(e,t){return t?{flags:0,type:131072&e.flags?en:e}:e}function eD(e){return ft[e.id]||(ft[e.id]=function(e){const t=vs(256);return t.elementType=e,t}(e))}function tD(e,t){const n=$C(MT(JL(t)));return RN(n,e.elementType)?e:eD(dv([e.elementType,n]))}function nD(e){return e.finalArrayType||(e.finalArrayType=131072&(t=e.elementType).flags?ir:jy(1048576&t.flags?dv(t.types,2):t));var t}function rD(e){return 256&Ox(e)?nD(e):e}function iD(e){return 256&Ox(e)?e.elementType:Zt}function oD(e){const t=IN(e),n=t.parent,r=rP(n)&&("length"===n.name.escapedText||213===n.parent.kind&&QN(n.name)&&uy(n.name)),i=212===n.kind&&n.expression===t&&226===n.parent.kind&&64===n.parent.operatorToken.kind&&n.parent.left===n&&!ah(n.parent)&&aL(RL(n.argumentExpression),296);return r||i}function aD(e,t){if(8752&(e=Pa(e)).flags)return Kl(e);if(7&e.flags){if(262144&xx(e)){const t=e.links.syntheticOrigin;if(t&&aD(t))return Kl(e)}const r=e.valueDeclaration;if(r){if((eE(n=r)||yD(n)||hD(n)||mD(n))&&(Pv(n)||zm(n)&&qu(n)&&n.initializer&&ZT(n.initializer)&&Fv(n.initializer)))return Kl(e);if(eE(r)&&250===r.parent.parent.kind){const e=r.parent.parent,t=sD(e.expression,void 0);if(t){return gR(e.awaitModifier?15:13,t,At,void 0)}}t&&ST(t,Vp(r,Ca._0_needs_an_explicit_type_annotation,Hs(e)))}}var n}function sD(e,t){if(!(67108864&e.flags))switch(e.kind){case 80:return aD(ps(Xw(e)),t);case 110:return function(e){const t=lm(e,!1,!1);if(f_(t)){const e=$f(t);if(e.thisParameter)return aD(e.thisParameter)}if(S_(t.parent)){const e=rs(t.parent);return $v(t)?Kl(e):U_(e).thisType}}(e);case 108:return ME(e);case 211:{const n=sD(e.expression,t);if(n){const r=e.name;let i;if(YN(r)){if(!n.symbol)return;i=Zp(n,ry(n.symbol,r.escapedText))}else i=Zp(n,r.escapedText);return i&&aD(i,t)}return}case 217:return sD(e.expression,t)}}function cD(e){const t=Ho(e);let n=t.effectsSignature;if(void 0===n){let r;if(yP(e)){r=_L(QA(e.right))}else 244===e.parent.kind?r=sD(e.expression,void 0):108!==e.expression.kind&&(r=Dl(e)?iI(JC(zL(e.expression),e.expression),e.expression):QA(e.expression));const i=uf(r&&wp(r)||Ft,0),o=1!==i.length||i[0].typeParameters?ee(i,lD)?MO(e):void 0:i[0];n=t.effectsSignature=o&&lD(o)?o:ni}return n===ni?void 0:n}function lD(e){return!!(nm(e)||e.declaration&&131072&(km(e.declaration)||Ft).flags)}function uD(e){const t=OD(e,!1);return Gr=e,Xr=t,t}function ND(e){const t=mh(e,!0);return 97===t.kind||226===t.kind&&(56===t.operatorToken.kind&&(ND(t.left)||ND(t.right))||57===t.operatorToken.kind&&ND(t.left)&&ND(t.right))}function OD(e,t){for(;;){if(e===Gr)return Xr;const n=e.flags;if(4096&n){if(!t){const t=uN(e),n=Hi[t];return void 0!==n?n:Hi[t]=OD(e,!0)}t=!1}if(368&n)e=e.antecedent;else if(512&n){const t=cD(e.node);if(t){const n=nm(t);if(n&&3===n.kind&&!n.type){const t=e.node.arguments[n.parameterIndex];if(t&&ND(t))return!1}if(131072&mm(t).flags)return!1}e=e.antecedent}else{if(4&n)return ee(e.antecedent,e=>OD(e,!1));if(8&n){const t=e.antecedent;if(void 0===t||0===t.length)return!1;e=t[0]}else{if(!(128&n)){if(1024&n){Gr=void 0;const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=OD(e.antecedent,!1);return t.antecedent=n,r}return!(1&n)}{const t=e.node;if(t.clauseStart===t.clauseEnd&&Wj(t.switchStatement))return!1;e=e.antecedent}}}}}function BD(e,t){for(;;){const n=e.flags;if(4096&n){if(!t){const t=uN(e),n=Ki[t];return void 0!==n?n:Ki[t]=BD(e,!0)}t=!1}if(496&n)e=e.antecedent;else if(512&n){if(108===e.node.expression.kind)return!0;e=e.antecedent}else{if(4&n)return T(e.antecedent,e=>BD(e,!1));if(!(8&n)){if(1024&n){const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=BD(e.antecedent,!1);return t.antecedent=n,r}return!!(1&n)}e=e.antecedent[0]}}}function JD(e){switch(e.kind){case 110:return!0;case 80:if(!wv(e)){const t=Xw(e);return bP(t)||xP(t)&&!QD(t)||!!t.valueDeclaration&&_P(t.valueDeclaration)}break;case 211:case 212:return JD(e.expression)&&Yj(Ho(e).resolvedSymbol||ht);case 206:case 207:const t=py(e.parent);return mD(t)||YT(t)?!dP(t):eE(t)&&Yz(t)}return!1}function qD(e,t,n=t,r,i=(t=>null==(t=dt(e,Ug))?void 0:t.flowNode)()){let o,a=!1,s=0;if(yi)return wt;if(!i)return t;vi++;const c=hi,l=XN(d(i));hi=c;const _=256&Ox(l)&&oD(e)?ir:rD(l);return _===rn||e.parent&&235===e.parent.kind&&!(131072&_.flags)&&131072&hN(_,2097152).flags?t:_;function u(){return a?o:(a=!0,o=Yw(e,t,n,r))}function d(i){var o;if(2e3===s)return null==(o=cr)||o.instant(cr.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:i.id}),yi=!0,function(e){const t=xc(e,b_),n=Dd(e),r=tf(n,t.statements.pos);io.add(fS(n,r.start,r.length,Ca.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}(e),wt;let a;for(s++;;){const o=i.flags;if(4096&o){for(let e=c;e=0&&n.parameterIndex297===e.kind);if(n===r||o>=n&&ofN(e,t)===t)}return dv(M(i.slice(n,r),t=>t?$(e,t):Zt))}(i,t.node);else if(112===n.kind)i=function(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=N(t.caseBlock.clauses,e=>297===e.kind),o=n===r||i>=n&&i296===t.kind?Z(e,t.expression,!0):Zt))}(i,t.node);else{V&&(rN(n,e)?i=U(i,t.node,e=>!(163840&e.flags)):221===n.kind&&rN(n.expression,e)&&(i=U(i,t.node,e=>!(131072&e.flags||128&e.flags&&"undefined"===e.value))));const r=w(n,i);r&&(i=function(e,t,n){if(n.clauseStartsN(e,t)||Ft));if(t!==Ft)return t}return D(e,t,e=>W(e,n))}(i,r,t.node))}return ZN(i,GN(r))}function x(e){const r=[];let i,o=!1,a=!1;for(const s of e.antecedent){if(!i&&128&s.flags&&s.node.clauseStart===s.node.clauseEnd){i=s;continue}const e=d(s),c=XN(e);if(c===t&&t===n)return c;he(r,c),RN(c,n)||(o=!0),GN(e)&&(a=!0)}if(i){const e=d(i),s=XN(e);if(!(131072&s.flags||E(r,s)||Wj(i.node.switchStatement))){if(s===t&&t===n)return s;r.push(s),RN(s,n)||(o=!0),GN(e)&&(a=!0)}}return ZN(k(r,o?2:1),a)}function S(e){const r=uN(e),i=zi[r]||(zi[r]=new Map),o=u();if(!o)return t;const a=i.get(o);if(a)return a;for(let t=mi;t{const t=vc(e,r)||Ft;return!(131072&t.flags)&&!(131072&s.flags)&&HS(s,t)})}function P(e,t,n,r,i){if((37===n||38===n)&&1048576&e.flags){const o=aN(e);if(o&&o===eN(t)){const t=sN(e,RL(r));if(t)return n===(i?37:38)?t:xT(yc(t,o)||Ft)?UN(e,t):e}}return D(e,t,e=>J(e,n,r,i))}function A(t,n,r){if(Zw(e,n))return yN(t,r?4194304:8388608);V&&r&&rN(n,e)&&(t=yN(t,2097152));const i=w(n,t);return i?D(t,i,e=>hN(e,r?4194304:8388608)):t}function I(e,t,n){const r=Zp(e,t);return r?!!(16777216&r.flags||48&xx(r))||n:!!Cf(e,t)||!n}function O(e,t,n){const r=TC(t);if(JN(e,e=>I(e,r,!0)))return qN(e,e=>I(e,r,n));if(n){const n=(Jr||(Jr=sy("Record",2,!0)||ht),Jr===ht?void 0:Jr);if(n)return Nv([e,ih(n,[t,Ft])])}return e}function j(e,t,n,r,i){return Z(e,t,i=i!==(112===n.kind)!=(38!==r&&36!==r))}function L(t,n,r){switch(n.operatorToken.kind){case 64:case 76:case 77:case 78:return A(Z(t,n.right,r),n.left,r);case 35:case 36:case 37:case 38:const i=n.operatorToken.kind,o=FN(n.left),a=FN(n.right);if(221===o.kind&&Ku(a))return z(t,o,i,a,r);if(221===a.kind&&Ku(o))return z(t,a,i,o,r);if(Zw(e,o))return J(t,i,a,r);if(Zw(e,a))return J(t,i,o,r);V&&(rN(o,e)?t=R(t,i,a,r):rN(a,e)&&(t=R(t,i,o,r)));const s=w(o,t);if(s)return P(t,s,i,a,r);const c=w(a,t);if(c)return P(t,c,i,o,r);if(K(o))return G(t,i,a,r);if(K(a))return G(t,i,o,r);if(h_(a)&&!qx(o))return j(t,o,a,i,r);if(h_(o)&&!qx(a))return j(t,a,o,i,r);break;case 104:return function(t,n,r){const i=FN(n.left);if(!Zw(e,i))return r&&V&&rN(i,e)?yN(t,2097152):t;const o=n.right,a=RL(o);if(!qS(a,$n))return t;const s=cD(n),c=s&&nm(s);if(c&&1===c.kind&&0===c.parameterIndex)return Q(t,c.type,r,!0);if(!qS(a,Hn))return t;const l=WN(a,X);if(Sc(t)&&(l===$n||l===Hn)||!r&&(!(524288&l.flags)||yk(l)))return t;return Q(t,l,r,!0)}(t,n,r);case 103:if(YN(n.left))return function(t,n,r){const i=FN(n.right);if(!Zw(e,i))return t;Tn.assertNode(n.left,YN);const o=uI(n.left);if(void 0===o)return t;const a=o.parent,s=Hv(Tn.checkDefined(o.valueDeclaration,"should always have a declaration"))?Kl(a):U_(a);return Q(t,s,r,!0)}(t,n,r);const l=FN(n.right);if(qC(t)&&qx(e)&&Zw(e.expression,l)){const i=RL(n.left);if(kC(i)&&eN(e)===TC(i))return hN(t,r?524288:65536)}if(Zw(e,l)){const e=RL(n.left);if(kC(e))return O(t,e,r)}break;case 28:return Z(t,n.right,r);case 56:return r?Z(Z(t,n.left,!0),n.right,!0):dv([Z(t,n.left,!1),Z(t,n.right,!1)]);case 57:return r?dv([Z(t,n.left,!0),Z(t,n.right,!0)]):Z(Z(t,n.left,!1),n.right,!1)}return t}function R(e,t,n,r){const i=35===t||37===t,o=35===t||36===t?98304:32768,a=RL(n);return i!==r&&zN(a,e=>!!(e.flags&o))||i===r&&zN(a,e=>!(e.flags&(3|o)))?yN(e,2097152):e}function J(e,t,n,r){if(1&e.flags)return e;36!==t&&38!==t||(r=!r);const i=RL(n),o=35===t||36===t;if(98304&i.flags){if(!V)return e;return yN(e,o?r?262144:2097152:65536&i.flags?r?131072:1048576:r?65536:524288)}if(r){if(!o&&(2&e.flags||JN(e,yk))){if(469893116&i.flags||yk(i))return i;if(524288&i.flags)return on}return KN(qN(e,e=>{return HS(e,i)||o&&(t=i,!!(524&e.flags)&&!!(28&t.flags));var t}),i)}return xT(i)?qN(e,e=>!(DT(e)&&HS(e,i))):e}function z(t,n,r,i,o){36!==r&&38!==r||(o=!o);const a=FN(n.expression);if(!Zw(e,a)){V&&rN(a,e)&&o===("undefined"!==i.text)&&(t=yN(t,2097152));const n=w(a,t);return n?D(t,n,e=>q(e,i,o)):t}return q(t,i,o)}function q(e,t,n){return n?$(e,t.text):yN(e,zB.get(t.text)||32768)}function U(e,{switchStatement:t,clauseStart:n,clauseEnd:r},i){return n!==r&&T(LN(t).slice(n,r),i)?hN(e,2097152):e}function W(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=LN(t);if(!i.length)return e;const o=i.slice(n,r),a=n===r||E(o,Zt);if(2&e.flags&&!a){let t;for(let n=0;nHS(s,e)),s);if(!a)return c;const l=qN(e,e=>!(DT(e)&&E(i,32768&e.flags?At:vx(function(e){return 2097152&e.flags&&C(e.types,xT)||e}(e)))));return 131072&c.flags?l:dv([c,l])}function $(e,t){switch(t){case"string":return H(e,Jt,1);case"number":return H(e,zt,2);case"bigint":return H(e,qt,4);case"boolean":return H(e,Gt,8);case"symbol":return H(e,Qt,16);case"object":return 1&e.flags?e:dv([H(e,on,32),H(e,Rt,131072)]);case"function":return 1&e.flags?e:H(e,Hn,64);case"undefined":return H(e,At,65536)}return H(e,on,128)}function H(e,t,n){return WN(e,e=>kk(e,t,co)?mN(e,n)?e:Zt:IS(t,e)?t:mN(e,n)?Nv([e,t]):Zt)}function K(t){return(rP(t)&&"constructor"===wc(t.name)||iP(t)&&Ku(t.argumentExpression)&&"constructor"===t.argumentExpression.text)&&Zw(e,t.expression)}function G(e,t,n,r){if(r?35!==t&&37!==t:36!==t&&38!==t)return e;const i=RL(n);if(!GJ(i)&&!p_(i))return e;const o=Zp(i,"prototype");if(!o)return e;const a=Kl(o),s=Sc(a)?void 0:a;return s&&s!==$n&&s!==Hn?Sc(e)?s:qN(e,e=>function(e,t){if(524288&e.flags&&1&Ox(e)||524288&t.flags&&1&Ox(t))return e.symbol===t.symbol;return IS(e,t)}(e,s)):e}function X(e){const t=yc(e,"prototype");if(t&&!Sc(t))return t;const n=uf(e,1);return n.length?dv(M(n,e=>mm(Um(e)))):wn}function Q(e,t,n,r){const i=1048576&e.flags?`N${rv(e)},${rv(t)},${(n?1:0)|(r?2:0)}`:void 0;return mo(i)??go(i,function(e,t,n,r){if(!n){if(e===t)return Zt;if(r)return qN(e,e=>!qS(e,t));const n=Q(e,t,!0,!1);return qN(e,e=>!RN(e,n))}if(3&e.flags)return t;if(e===t)return t;const i=r?qS:IS,o=1048576&e.flags?aN(e):void 0,a=WN(t,t=>{const n=o&&yc(t,o),a=WN(n&&sN(e,n)||e,r?e=>qS(e,t)?e:qS(t,e)?t:Zt:e=>MS(e,t)?e:MS(t,e)?t:IS(e,t)?e:IS(t,e)?t:Zt);return 131072&a.flags?WN(e,e=>oL(e,465829888)&&i(t,op(e)||Ft)?Nv([e,t]):Zt):a});return 131072&a.flags?IS(t,e)?t:zS(e,t)?e:zS(t,e)?t:Nv([e,t]):a}(e,t,n,r))}function Y(t,n,r,i){if(n.type&&(!Sc(t)||n.type!==$n&&n.type!==Hn)){const o=function(e,t){if(1===e.kind||3===e.kind)return t.arguments[e.parameterIndex];const n=mh(t.expression);return qx(n)?mh(n.expression):void 0}(n,r);if(o){if(Zw(e,o))return Q(t,n.type,i,!1);V&&rN(o,e)&&(i&&!mN(n.type,65536)||!i&&zN(n.type,YA))&&(t=yN(t,2097152));const r=w(o,t);if(r)return D(t,r,e=>Q(e,n.type,i,!1))}}return t}function Z(t,n,r){if(El(n)||yP(n.parent)&&(61===n.parent.operatorToken.kind||78===n.parent.operatorToken.kind)&&n.parent.left===n)return function(t,n,r){if(Zw(e,n))return yN(t,r?2097152:262144);const i=w(n,t);if(i)return D(t,i,e=>hN(e,r?2097152:262144));return t}(t,n,r);switch(n.kind){case 80:if(!Zw(e,n)&&y<5){const i=Xw(n);if(bP(i)){const n=i.valueDeclaration;if(n&&eE(n)&&!n.type&&n.initializer&&JD(e)){y++;const e=Z(t,n.initializer,r);return y--,e}}}case 110:case 108:case 211:case 212:return A(t,n,r);case 213:return function(t,n,r){if(_N(n,e)){const e=r||!Nl(n)?cD(n):void 0,i=e&&nm(e);if(i&&(0===i.kind||1===i.kind))return Y(t,i,n,r)}if(qC(t)&&qx(e)&&rP(n.expression)){const i=n.expression;if(Zw(e.expression,FN(i.expression))&&QN(i.name)&&"hasOwnProperty"===i.name.escapedText&&1===n.arguments.length){const i=n.arguments[0];if(Ku(i)&&eN(e)===Tc(i.text))return hN(t,r?524288:65536)}}return t}(t,n,r);case 217:case 235:return Z(t,n.expression,r);case 226:return L(t,n,r);case 224:if(54===n.operator)return Z(t,n.operand,!r)}return t}}function XD(e){return xc(e.parent,e=>f_(e)&&!fm(e)||268===e.kind||307===e.kind||172===e.kind)}function QD(e){return!cP(e,void 0)}function cP(e,t){const n=xc(e.valueDeclaration,hP);if(!n)return!1;const r=Ho(n);return 131072&r.flags||(r.flags|=131072,xc(n.parent,e=>hP(e)&&!!(131072&Ho(e).flags))||vP(n)),!e.lastAssignmentPos||t&&e.lastAssignmentPos232!==e.kind&&fP(e.name))}function hP(e){return g_(e)||QE(e)}function vP(e){switch(e.kind){case 80:if(ah(e)){const t=Xw(e);if(xP(t)&&t.lastAssignmentPos!==Number.MAX_VALUE){const n=xc(e,hP),r=xc(t.valueDeclaration,hP);t.lastAssignmentPos=n===r?function(e,t){let n=e.pos;for(;e&&e.pos>t.pos;){switch(e.kind){case 243:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 258:case 263:n=e.end}e=e.parent}return n}(e,t.valueDeclaration):Number.MAX_VALUE}}return;case 281:const t=e.parent.parent;if(!e.isTypeOnly&&!t.isTypeOnly&&!t.moduleSpecifier){const t=Ma(e.propertyName||e.name,111551,!0,!0);t&&xP(t)&&(t.lastAssignmentPos=Number.MAX_VALUE)}return;case 264:case 265:case 266:return}A_(e)||KI(e,vP)}function bP(e){return 3&e.flags&&!!(6&$A(e))}function xP(e){const t=e.valueDeclaration&&py(e.valueDeclaration);return!!t&&(mD(t)||eE(t)&&($E(t.parent)||function(e){return!!(1&e.parent.flags)&&!(32&fc(e)||243===e.parent.parent.kind&&of(e.parent.parent.parent))}(t)))}function wP(e,t){const n=V&&169===t.kind&&t.initializer&&mN(e,16777216)&&!function(e){const t=Ho(e);if(void 0===t.parameterInitializerContainsUndefined){if(!_c(e,8))return Ul(e.symbol),!0;const n=!!mN(TL(e,0),16777216);if(!mc())return Ul(e.symbol),!0;t.parameterInitializerContainsUndefined??(t.parameterInitializerContainsUndefined=n)}return t.parameterInitializerContainsUndefined}(t);return n?hN(e,524288):e}function EP(e){return 2097152&e.flags?ee(e.types,EP):!!(465829888&e.flags&&1146880&sp(e).flags)}function FP(e){return 2097152&e.flags?ee(e.types,FP):!(!(465829888&e.flags)||oL(sp(e),98304))}function AP(e,t,n){jh(e)&&(e=e.baseType);const r=!(n&&2&n)&&JN(e,EP)&&(function(e,t){const n=t.parent;return 211===n.kind||166===n.kind||213===n.kind&&n.expression===t||214===n.kind&&n.expression===t||212===n.kind&&n.expression===t&&!(JN(e,FP)&&zb(RL(n.argumentExpression)))}(e,t)||function(e,t){const n=(QN(e)||rP(e)||iP(e))&&!((IE(e.parent)||AE(e.parent))&&e.parent.tagName===e)&&UF(e,t&&32&t?8:void 0);return n&&!Rb(n)}(t,n));return r?WN(e,sp):e}function OP(e){return!!xc(e,e=>{const t=e.parent;return void 0===t?"quit":kE(t)?t.expression===e&&Cb(e):!!wE(t)&&(t.name===e||t.propertyName===e)})}function MP(e,t,n,r){if(Fe&&!(33554432&e.flags))switch(t){case 1:return JP(e);case 2:return zP(e,n,r);case 3:return WP(e);case 4:return $P(e);case 5:return HP(e);case 6:return KP(e);case 7:return GP(e);case 8:return XP(e);case 0:if(QN(e)&&(Em(e)||KE(e.parent)||uE(e.parent)&&e.parent.moduleReference===e)&&yE(e)){if(W_(e.parent)){if((rP(e.parent)?e.parent.expression:e.parent.left)!==e)return}return void JP(e)}if(W_(e)){let t=e;for(;W_(t);){if(Af(t))return;t=t.parent}return zP(e)}if(kE(e))return WP(e);if(Iu(e)||LE(e))return $P(e);if(uE(e))return Mm(e)||TB(e)?KP(e):void 0;if(wE(e))return GP(e);if((g_(e)||vD(e))&&HP(e),!k.emitDecoratorMetadata)return;if(!(xI(e)&&Zv(e)&&e.modifiers&&Sm(j,e,e.parent,e.parent.parent)))return;return XP(e);default:Tn.assertNever(t,`Unhandled reference hint: ${t}`)}}function JP(e){const t=Xw(e);t&&t!==xe&&t!==ht&&!wv(e)&&QP(t,e)}function zP(e,t,n){const r=rP(e)?e.expression:e.left;if(Tv(r)||!QN(r))return;const i=Xw(r);if(!i||i===ht)return;if(RS(k)||WS(k)&&OP(e))return void QP(i,e);const o=n||SL(r);if(Sc(o)||o===en)return void QP(i,e);let a=t;if(!a&&!n){const t=rP(e)?e.name:e.right,n=YN(t)&&lI(t.escapedText,t),r=wp(0!==oh(e)||cI(e)?YC(o):o);a=YN(t)?n&&dI(r,n)||void 0:Zp(r,t.escapedText)}a&&(RJ(a)||8&a.flags&&306===e.parent.kind)||QP(i,e)}function WP(e){if(QN(e.expression)){const t=e.expression,n=ps(Ma(t,-1,!0,!0,e));n&&QP(n,t)}}function $P(e){if(!DA(e)){const t=io&&2===k.jsx?Ca.Cannot_find_name_0:void 0,n=ho(e),r=Iu(e)?e.tagName:e;let i;if(LE(e)&&"null"===n||(i=Le(r,n,111551,t,!0)),i&&(i.isReferenced=-1,Fe&&2097152&i.flags&&!Oa(i)&&YP(i)),LE(e)){const n=yo(Dd(e));n&&Le(r,n,111551,t,!0)}}}function HP(e){if(P<2&&2&$h(e)){const n=Fv(e);lE((t=n)&&bm(t),!1)}var t}function KP(e){Wv(e,32)&&ZP(e)}function GP(e){if(!e.parent.parent.moduleSpecifier&&!e.isTypeOnly&&!e.parent.parent.isTypeOnly){const t=e.propertyName||e.name,n=Le(t,t.escapedText,2998271,void 0,!0);if(n&&(n===ue||n===fe||n.declarations&&of(hc(n.declarations[0]))));else{const t=n&&(2097152&n.flags?Ea(n):n);(!t||111551&Fa(t))&&(ZP(e),JP(e.propertyName||e.name))}return}}function XP(e){if(k.emitDecoratorMetadata){const t=C(e.modifiers,gD);if(!t)return;switch(mz(t,16),e.kind){case 263:const t=vv(e);if(t)for(const e of t.parameters)fE(FM(e));break;case 177:case 178:const n=177===e.kind?178:177,r=id(rs(e),n);fE(Ol(e)||r&&Ol(r));break;case 174:for(const t of e.parameters)fE(FM(t));fE(Fv(e));break;case 172:fE(Pv(e));break;case 169:fE(FM(e));const i=e.parent;for(const e of i.parameters)fE(FM(e));fE(Fv(i))}}}function QP(e,t){if(Fe&&Da(e,111551)&&!Cv(t)){const n=Ea(e);1160127&Fa(e,!0)&&(RS(k)||WS(k)&&OP(t)||!RJ(ps(n)))&&YP(e)}}function YP(e){Tn.assert(Fe);const t=$o(e);if(!t.referenced){t.referenced=!0;const n=ca(e);if(!n)return Tn.fail();if(Mm(n)&&111551&Fa(Pa(e))){JP(wb(n.moduleReference))}}}function ZP(e){const t=rs(e),n=Ea(t);if(n){(n===ht||111551&Fa(t,!0)&&!RJ(n))&&YP(t)}}function lE(e,t){if(!e)return;const n=wb(e),r=2097152|(80===e.kind?788968:1920),i=Le(n,n.escapedText,r,void 0,!0);if(i&&2097152&i.flags)if(Fe&&fs(i)&&!RJ(Ea(i))&&!Oa(i))YP(i);else if(t&&RS(k)&&jS(k)>=5&&!fs(i)&&!ee(i.declarations,Zl)){const t=So(e,Ca.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled),r=C(i.declarations||p,la);r&&ST(t,Vp(r,Ca._0_was_imported_here,wc(n)))}}function fE(e){const t=PM(e);t&&u_(t)&&lE(t,!0)}function mE(e,t){if(wv(e))return;if(t===xe){if(hI(e))return void So(e,Ca.arguments_cannot_be_referenced_in_property_initializers);let t=rm(e);if(t)for(P<2&&(219===t.kind?So(e,Ca.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression):Wv(t,1024)&&So(e,Ca.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)),Ho(t).flags|=512;t&&uP(t);)t=rm(t),t&&(Ho(t).flags|=512);return}const n=ps(t),r=wB(n,e);No(r)&&mb(e,r)&&r.declarations&&Po(e,r.declarations,e.escapedText);const i=n.valueDeclaration;if(i&&32&n.flags&&S_(i)&&i.name!==e){let t=lm(e,!1,!1);for(;307!==t.kind&&t.parent!==i;)t=lm(t,!1,!1);307!==t.kind&&(Ho(i).flags|=262144,Ho(t).flags|=262144,Ho(e).flags|=536870912)}!function(e,t){if(P>=2||!(34&t.flags)||!t.valueDeclaration||QE(t.valueDeclaration)||299===t.valueDeclaration.parent.kind)return;const n=Lp(t.valueDeclaration),r=function(e,t){return!!xc(e,e=>e===t?"quit":f_(e)||e.parent&&yD(e.parent)&&!Hv(e.parent)&&e.parent.initializer===e)}(e,n),i=vE(n);if(i){if(r){let r=!0;if(qP(n)){const i=Oh(t.valueDeclaration,261);if(i&&i.parent===n){const i=function(e,t){return xc(e,e=>e===t?"quit":e===t.initializer||e===t.condition||e===t.incrementor||e===t.statement)}(e.parent,n);if(i){const e=Ho(i);e.flags|=8192;he(e.capturedBlockScopeBindings||(e.capturedBlockScopeBindings=[]),t),i===n.initializer&&(r=!1)}}}r&&(Ho(i).flags|=4096)}if(qP(n)){const r=Oh(t.valueDeclaration,261);r&&r.parent===n&&function(e,t){let n=e;for(;217===n.parent.kind;)n=n.parent;let r=!1;if(ah(n))r=!0;else if(224===n.parent.kind||225===n.parent.kind){const e=n.parent;r=46===e.operator||47===e.operator}if(!r)return!1;return!!xc(n,e=>e===t?"quit":e===t.statement)}(e,n)&&(Ho(t.valueDeclaration).flags|=65536)}Ho(t.valueDeclaration).flags|=32768}r&&(Ho(t.valueDeclaration).flags|=16384)}(e,t)}function gE(e,t){if(wv(e))return OE(e);const n=Xw(e);if(n===ht)return wt;if(mE(e,n),n===xe)return hI(e)?wt:Kl(n);yE(e)&&MP(e,1);const r=ps(n);let i=r.valueDeclaration,o=function(e,t,n){var r;const i=Kl(e,n),o=e.valueDeclaration;if(o){if(eP(o)&&!o.initializer&&!o.dotDotDotToken&&o.parent.elements.length>=2){const e=o.parent.parent,n=py(e);if(260===n.kind&&6&Qz(n)||169===n.kind){const r=Ho(e);if(!(4194304&r.flags)){r.flags|=4194304;const i=Ec(e,0),a=i&&WN(i,sp);if(r.flags&=-4194305,a&&1048576&a.flags&&(169!==n.kind||!dP(n))){const e=qD(o.parent,a,a,void 0,t.flowNode);return 131072&e.flags?Zt:$c(o,e,!0)}}}}if(mD(o)&&!o.type&&!o.initializer&&!o.dotDotDotToken){const e=o.parent;if(e.parameters.length>=2&&NS(e)){const n=tA(e);if(n&&1===n.parameters.length&&tJ(n)){const i=Np(hS(Kl(n.parameters[0]),null==(r=GF(e))?void 0:r.nonFixingMapper));if(1048576&i.flags&&zN(i,$T)&&!ee(e.parameters,dP))return Hb(qD(e,i,i,void 0,t.flowNode),Nx(e.parameters.indexOf(o)-(Sv(e)?1:0)))}}}}return i}(r,e,t);const a=oh(e);if(a){if(!(3&r.flags||zm(e)&&512&r.flags)){return So(e,384&r.flags?Ca.Cannot_assign_to_0_because_it_is_an_enum:32&r.flags?Ca.Cannot_assign_to_0_because_it_is_a_class:1536&r.flags?Ca.Cannot_assign_to_0_because_it_is_a_namespace:16&r.flags?Ca.Cannot_assign_to_0_because_it_is_a_function:2097152&r.flags?Ca.Cannot_assign_to_0_because_it_is_an_import:Ca.Cannot_assign_to_0_because_it_is_not_a_variable,Hs(n)),wt}if(Yj(r))return 3&r.flags?So(e,Ca.Cannot_assign_to_0_because_it_is_a_constant,Hs(n)):So(e,Ca.Cannot_assign_to_0_because_it_is_a_read_only_property,Hs(n)),wt}const s=2097152&r.flags;if(3&r.flags){if(1===a)return sh(e)?MT(o):o}else{if(!s)return o;i=ca(n)}if(!i)return o;o=AP(o,e,t);const c=169===py(i).kind,l=XD(i);let _=XD(e);const u=_!==l,d=e.parent&&e.parent.parent&&GE(e.parent)&&wN(e.parent.parent),p=134217728&n.flags,f=o===kt||o===ir,m=f&&235===e.parent.kind;for(;_!==l&&(218===_.kind||219===_.kind||Gf(_))&&(bP(r)&&o!==ir||xP(r)&&cP(r,e));)_=XD(_);const g=c||s||u||d||p||function(e,t){if(eP(t)){const n=xc(e,eP);return n&&py(n)===py(t)}}(e,i)||o!==kt&&o!==ir&&(!V||!!(16387&o.flags)||Cv(e)||Qw(e)||281===e.parent.kind)||235===e.parent.kind||260===i.kind&&i.exclamationToken||33554432&i.flags,h=m?At:g?c?wP(o,i):o:f?At:DC(o),y=m?jC(qD(e,o,h,_)):qD(e,o,h,_);if(oD(e)||o!==kt&&o!==ir){if(!g&&!vk(o)&&vk(y))return So(e,Ca.Variable_0_is_used_before_being_assigned,Hs(n)),o}else if(y===kt||y===ir)return Q&&(So(jc(i),Ca.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Hs(n),Gs(y)),So(e,Ca.Variable_0_implicitly_has_an_1_type,Hs(n),Gs(y))),rR(y);return a?MT(y):y}function yE(e){var t;const n=e.parent;if(n){if(rP(n)&&n.expression===e)return!1;if(wE(n)&&n.isTypeOnly)return!1;const r=null==(t=n.parent)?void 0:t.parent;if(r&&TE(r)&&r.isTypeOnly)return!1}return!0}function vE(e){return xc(e,e=>!e||fy(e)?"quit":ou(e,!1))}function xE(e,t){if(Ho(e).flags|=2,172===t.kind||176===t.kind){Ho(t.parent).flags|=4}else Ho(t).flags|=4}function NE(e){return mf(e)?e:f_(e)?void 0:KI(e,NE)}function DE(e){return N_(U_(rs(e)))===Bt}function PE(e,t,n){const r=t.parent;Ph(r)&&!DE(r)&&Ug(e)&&e.flowNode&&!BD(e.flowNode,!1)&&So(e,n)}function OE(e){const t=Cv(e);let n=lm(e,!0,!0),r=!1,i=!1;for(176===n.kind&&PE(e,n,Ca.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);219===n.kind&&(n=lm(n,!1,!i),r=!0),167===n.kind;)n=lm(n,!r,!1),i=!0;if(function(e,t){yD(t)&&Hv(t)&&j&&t.initializer&&$s(t.initializer,e.pos)&&Zv(t.parent)&&So(e,Ca.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class)}(e,n),i)So(e,Ca.this_cannot_be_referenced_in_a_computed_property_name);else switch(n.kind){case 267:So(e,Ca.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 266:So(e,Ca.this_cannot_be_referenced_in_current_location)}!t&&r&&P<2&&xE(e,n);const o=jE(e,!0,n);if(Y){const t=Kl(fe);if(o===t&&r)So(e,Ca.The_containing_arrow_function_captures_the_global_value_of_this);else if(!o){const r=So(e,Ca.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!QE(n)){const e=jE(n);e&&e!==t&&ST(r,Vp(n,Ca.An_outer_value_of_this_is_shadowed_by_this_container))}}}return o||St}function jE(e,t=!0,n=lm(e,!1,!1)){const r=zm(e);if(f_(n)&&(!dF(e)||Sv(n))){let t=tm($f(n))||r&&function(e){const t=sl(e);if(t&&t.typeExpression)return Mx(t.typeExpression);const n=Hf(e);if(n)return tm(n)}(n);if(!t){const e=function(e){if(218===e.kind&&yP(e.parent)&&3===dg(e.parent))return e.parent.left.expression.expression;if(174===e.kind&&210===e.parent.kind&&yP(e.parent.parent)&&6===dg(e.parent.parent))return e.parent.parent.left.expression;if(218===e.kind&&303===e.parent.kind&&210===e.parent.parent.kind&&yP(e.parent.parent.parent)&&6===dg(e.parent.parent.parent))return e.parent.parent.parent.left.expression;if(218===e.kind&&HE(e.parent)&&QN(e.parent.name)&&("value"===e.parent.name.escapedText||"get"===e.parent.name.escapedText||"set"===e.parent.name.escapedText)&&nP(e.parent.parent)&&oP(e.parent.parent.parent)&&e.parent.parent.parent.arguments[2]===e.parent.parent&&9===dg(e.parent.parent.parent))return e.parent.parent.parent.arguments[0].expression;if(bD(e)&&QN(e.name)&&("value"===e.name.escapedText||"get"===e.name.escapedText||"set"===e.name.escapedText)&&nP(e.parent)&&oP(e.parent.parent)&&e.parent.parent.arguments[2]===e.parent&&9===dg(e.parent.parent))return e.parent.parent.arguments[0].expression}(n);if(r&&e){const n=zL(e).symbol;n&&n.members&&16&n.flags&&(t=U_(n).thisType)}else RO(n)&&(t=U_(ts(n.symbol)).thisType);t||(t=nF(n))}if(t)return qD(e,t)}if(S_(n.parent)){const t=rs(n.parent);return qD(e,$v(n)?Kl(t):U_(t).thisType)}if(QE(n)){if(n.commonJsModuleIndicator){const e=rs(n);return e&&Kl(e)}if(n.externalModuleIndicator)return At;if(t)return Kl(fe)}}function ME(e){const t=213===e.parent.kind&&e.parent.expression===e,n=pm(e,!0);let r=n,i=!1,o=!1;if(!t){for(;r&&219===r.kind;)Wv(r,1024)&&(o=!0),r=pm(r,!0),i=P<2;r&&Wv(r,1024)&&(o=!0)}let a=0;if(!r||!function(e){if(t)return 176===e.kind;if(S_(e.parent)||210===e.parent.kind)return $v(e)?174===e.kind||173===e.kind||177===e.kind||178===e.kind||172===e.kind||175===e.kind:174===e.kind||173===e.kind||177===e.kind||178===e.kind||172===e.kind||171===e.kind||176===e.kind;return!1}(r)){const n=xc(e,e=>e===r?"quit":167===e.kind);return n&&167===n.kind?So(e,Ca.super_cannot_be_referenced_in_a_computed_property_name):t?So(e,Ca.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):r&&r.parent&&(S_(r.parent)||210===r.parent.kind)?So(e,Ca.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):So(e,Ca.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),wt}if(t||176!==n.kind||PE(e,r,Ca.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),$v(r)||t?(a=32,!t&&P>=2&&P<=8&&(yD(r)||xD(r))&&Mp(e.parent,e=>{QE(e)&&!af(e)||(Ho(e).flags|=2097152)})):a=16,Ho(e).flags|=a,174===r.kind&&o&&(gm(e.parent)&&ah(e.parent)?Ho(r).flags|=256:Ho(r).flags|=128),i&&xE(e.parent,r),210===r.parent.kind)return P<2?(So(e,Ca.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),wt):St;const s=r.parent;if(!Ph(s))return So(e,Ca.super_can_only_be_referenced_in_a_derived_class),wt;if(DE(s))return t?wt:Bt;const c=U_(rs(s)),l=c&&P_(c)[0];return l?176===r.kind&&function(e,t){return!!xc(e,e=>g_(e)?"quit":169===e.kind&&e.parent===t)}(e,r)?(So(e,Ca.super_cannot_be_referenced_in_constructor_arguments),wt):32===a?N_(c):Tu(l,c.thisType):wt}function zE(e){return 174!==e.kind&&177!==e.kind&&178!==e.kind||210!==e.parent.kind?218===e.kind&&303===e.parent.kind?e.parent.parent:void 0:e.parent}function UE(e){return 4&Ox(e)&&e.target===nr?Hg(e)[0]:void 0}function VE(e){return WN(e,e=>2097152&e.flags?h(e.types,UE):UE(e))}function YE(e,t){let n=e,r=t;for(;r;){const e=VE(r);if(e)return e;if(303!==n.parent.kind)break;n=n.parent.parent,r=BF(n,void 0)}}function nF(e){if(219===e.kind)return;if(NS(e)){const t=tA(e);if(t){const e=t.thisParameter;if(e)return Kl(e)}}const t=zm(e);if(Y||t){const n=zE(e);if(n){const e=BF(n,void 0),t=YE(n,e);return t?hS(t,fw(GF(n))):YC(e?jC(e):SL(n))}const r=dh(e.parent);if(xb(r)){const e=r.left;if(qx(e)){const{expression:n}=e;if(t&&QN(n)){const e=Dd(r);if(e.commonJsModuleIndicator&&Xw(n)===e.symbol)return}return YC(SL(n))}}}}function rF(e){const t=e.parent;if(!NS(t))return;const n=fm(t);if(n&&n.arguments){const r=gO(n),i=t.parameters.indexOf(e);if(e.dotDotDotToken)return cO(r,i,r.length,St,void 0,0);const o=Ho(n),a=o.resolvedSignature;o.resolvedSignature=ti;const s=i!!(58998787&e.flags)||$L(e,n,void 0)):2&n?qN(t,e=>!!(58998787&e.flags)||!!pM(e)):t}const i=fm(e);return i?UF(i,t):void 0}function yF(e,t){const n=gO(e).indexOf(t);return-1===n?void 0:bF(e,n)}function bF(e,t){if(gf(e))return 0===t?Jt:1===t?yy(!1):St;const n=Ho(e).resolvedSignature===ri?ri:MO(e);if(Iu(e)&&0===t)return XF(n,e);const r=n.parameters.length-1;return tJ(n)&&t>=r?Hb(Kl(n.parameters[r]),Nx(t-r),256):dj(n,t)}function xF(e,t){const n=e.parent,{left:r,operatorToken:i,right:o}=n;switch(i.kind){case 64:case 77:case 76:case 78:return e===o?function(e){var t,n;const r=dg(e);switch(r){case 0:case 4:const i=function(e){if(vu(e)&&e.symbol)return e.symbol;if(QN(e))return Xw(e);if(rP(e)){const n=RL(e.expression);return YN(e.name)?t(n,e.name):Zp(n,e.name.escapedText)}if(iP(e)){const t=SL(e.argumentExpression);if(!kC(t))return;return Zp(RL(e.expression),TC(t))}return;function t(e,t){const n=lI(t.escapedText,t);return n&&dI(e,n)}}(e.left),o=i&&i.valueDeclaration;if(o&&(yD(o)||hD(o))){const t=Pv(o);return t&&hS(Mx(t),$o(i).mapper)||(yD(o)?o.initializer&&RL(e.left):void 0)}return 0===r?RL(e.left):kF(e);case 5:if(SF(e,r))return kF(e);if(vu(e.left)&&e.left.symbol){const t=e.left.symbol.valueDeclaration;if(!t)return;const n=pt(e.left,qx),r=Pv(t);if(r)return Mx(r);if(QN(n.expression)){const e=n.expression,t=Le(e,e.escapedText,111551,void 0,!0);if(t){const e=t.valueDeclaration&&Pv(t.valueDeclaration);if(e){const t=xg(n);if(void 0!==t)return TF(Mx(e),t)}return}}return zm(t)||t===e.left?void 0:RL(e.left)}return RL(e.left);case 1:case 6:case 3:case 2:let a;2!==r&&(a=vu(e.left)?null==(t=e.left.symbol)?void 0:t.valueDeclaration:void 0),a||(a=null==(n=e.symbol)?void 0:n.valueDeclaration);const s=a&&Pv(a);return s?Mx(s):void 0;case 7:case 8:case 9:return Tn.fail("Does not apply");default:return Tn.assertNever(r)}}(n):void 0;case 57:case 61:const i=UF(n,t);return e===o&&(i&&i.pattern||!i&&!og(n))?RL(r):i;case 56:case 28:return e===o?UF(n,t):void 0;default:return}}function SF(e,t=dg(e)){if(4===t)return!0;if(!zm(e)||5!==t||!QN(e.left.expression))return!1;const n=e.left.expression.escapedText,r=Le(e.left,n,111551,void 0,!0,!0);return ym(null==r?void 0:r.valueDeclaration)}function kF(e){if(!e.symbol)return RL(e.left);if(e.symbol.valueDeclaration){const t=Pv(e.symbol.valueDeclaration);if(t){const e=Mx(t);if(e)return e}}const t=pt(e.left,qx);if(!Kf(lm(t.expression,!1,!1)))return;const n=OE(t.expression),r=xg(t);return void 0!==r&&TF(n,r)||void 0}function TF(e,t,n){return WN(e,e=>{var r,i;if(zd(e)&&!e.declaration.nameType){const r=Cd(e),i=op(r)||r,o=n||kx(Cc(t));if(zS(o,i))return $b(e,o)}else if(3670016&e.flags){const o=Zp(e,t);if(o)return 262144&xx(i=o)&&!i.links.type&&uc(i,0)>=0?void 0:zC(Kl(o),!!(16777216&o.flags));if($T(e)&&tC(t)&&+t>=0){const t=oC(e,e.target.fixedLength,0,!1,!0);if(t)return t}return null==(r=ff(vf(e),n||kx(Cc(t))))?void 0:r.type}},!0)}function wF(e,t){if(Tn.assert(Kf(e)),!(67108864&e.flags))return NF(e,t)}function NF(e,t){const n=e.parent,r=HE(e)&&iF(e,t);if(r)return r;const i=BF(n,t);if(i){if(mu(e)){const t=rs(e);return TF(i,t.escapedName,$o(t).nameType)}if(Xh(e)){const t=jc(e);if(t&&pD(t)){const e=zL(t.expression),n=kC(e)&&TF(i,TC(e));if(n)return n}}if(e.name){const t=Bv(e.name);return WN(i,e=>{var n;return null==(n=ff(vf(e),t))?void 0:n.type},!0)}}}function DF(e,t,n,r,i){return e&&WN(e,e=>{if($T(e)){if((void 0===r||ti)?n-t:0,a=o>0&&e.target.hasRestElement?ev(e.target,3):0;return o>0&&o<=a?Hg(e)[nh(e)-o]:oC(e,void 0===r?e.target.fixedLength:Math.min(e.target.fixedLength,r),void 0===n||void 0===i?a:Math.min(a,n-i),!1,!0)}return(!r||tlT(e)?Hb(e,Nx(a)):e,!0))}(n,e,t):void 0}function AF(e,t){if(RE(e)){const n=BF(e.parent,t);if(!n||Sc(n))return;return TF(n,hC(e.name))}return UF(e.parent,t)}function jF(e){switch(e.kind){case 11:case 9:case 10:case 15:case 228:case 112:case 97:case 106:case 80:case 157:return!0;case 211:case 217:return jF(e.expression);case 294:return!e.expression||jF(e.expression)}return!1}function MF(e,t){const n=`D${KB(e)},${rv(t)}`;return mo(n)??go(n,function(e,t){const n=aN(e),r=n&&C(t.properties,e=>e.symbol&&303===e.kind&&e.symbol.escapedName===n&&jF(e.initializer)),i=r&&JL(r.initializer);return i&&sN(e,i)}(t,e)??Ik(t,ne(M(O(e.properties,e=>!!e.symbol&&(303===e.kind?jF(e.initializer)&&iN(t,e.symbol.escapedName):304===e.kind&&iN(t,e.symbol.escapedName))),e=>[()=>JL(303===e.kind?e.initializer:e.name),e.symbol.escapedName]),M(O(Hd(t),n=>{var r;return!!(16777216&n.flags)&&!!(null==(r=null==e?void 0:e.symbol)?void 0:r.members)&&!e.symbol.members.has(n.escapedName)&&iN(t,n.escapedName)}),e=>[()=>At,e.escapedName])),zS))}function BF(e,t){const n=zF(Kf(e)?wF(e,t):UF(e,t),e,t);if(n&&!(t&&2&t&&8650752&n.flags)){const t=WN(n,e=>32&Ox(e)?e:wp(e),!0);return 1048576&t.flags&&nP(e)?MF(e,t):1048576&t.flags&&BE(e)?function(e,t){const n=`D${KB(e)},${rv(t)}`,r=mo(n);if(r)return r;const i=FA(PA(e));return go(n,Ik(t,ne(M(O(e.properties,e=>!!e.symbol&&291===e.kind&&iN(t,e.symbol.escapedName)&&(!e.initializer||jF(e.initializer))),e=>[e.initializer?()=>JL(e.initializer):()=>Wt,e.symbol.escapedName]),M(O(Hd(t),n=>{var r;if(!(16777216&n.flags&&(null==(r=null==e?void 0:e.symbol)?void 0:r.members)))return!1;const o=e.parent.parent;return(n.escapedName!==i||!FE(o)||!Cy(o.children).length)&&!e.symbol.members.has(n.escapedName)&&iN(t,n.escapedName)}),e=>[()=>At,e.escapedName])),zS))}(e,t):t}}function zF(e,t,n){if(e&&oL(e,465829888)){const r=GF(t);if(r&&1&n&&ee(r.inferences,OL))return qF(e,r.nonFixingMapper);if(null==r?void 0:r.returnMapper){const t=qF(e,r.returnMapper);return 1048576&t.flags&&iv(t.types,Vt)&&iv(t.types,$t)?qN(t,e=>e!==Vt&&e!==$t):t}}return e}function qF(e,t){return 465829888&e.flags?hS(e,t):1048576&e.flags?dv(M(e.types,e=>qF(e,t)),0):2097152&e.flags?Nv(M(e.types,e=>qF(e,t))):e}function UF(e,t){var n;if(67108864&e.flags)return;const r=KF(e,!t);if(r>=0)return xi[r];const{parent:i}=e;switch(i.kind){case 260:case 169:case 172:case 171:case 208:return function(e,t){const n=e.parent;if(qu(n)&&e===n.initializer){const e=iF(n,t);if(e)return e;if(!(8&t)&&O_(n.name)&&n.name.elements.length>0)return fl(n.name,!0,!1)}}(e,t);case 219:case 253:return function(e,t){const n=rm(e);if(n){let e=hF(n,t);if(e){const t=$h(n);if(1&t){const n=!!(2&t);1048576&e.flags&&(e=qN(e,e=>!!zR(1,e,n)));const r=zR(1,e,!!(2&t));if(!r)return;e=r}if(2&t){const t=WN(e,SM);return t&&dv([t,Bj(t)])}return e}}}(e,t);case 229:return function(e,t){const n=rm(e);if(n){const r=$h(n);let i=hF(n,t);if(i){const n=!!(2&r);if(!e.asteriskToken&&1048576&i.flags&&(i=qN(i,e=>!!zR(1,e,n))),e.asteriskToken){const r=UR(i,n),o=(null==r?void 0:r.yieldType)??en,a=UF(e,t)??en,s=(null==r?void 0:r.nextType)??Ft,c=qj(o,a,s,!1);return n?dv([c,qj(o,a,s,!0)]):c}return zR(0,i,n)}}}(i,t);case 223:return function(e,t){const n=UF(e,t);if(n){const e=SM(n);return e&&dv([e,Bj(e)])}}(i,t);case 213:case 214:return yF(i,e);case 170:return function(e){const t=Mj(e);return t?Zm(t):void 0}(i);case 216:case 234:return Il(i.type)?UF(i,t):Mx(i.type);case 226:return xF(e,t);case 303:case 304:return NF(i,t);case 305:return UF(i.parent,t);case 209:{const r=i,o=BF(r,t),a=rp(r.elements,e),s=(n=Ho(r)).spreadIndices??(n.spreadIndices=function(e){let t,n;for(let r=0;r=0)return xi[n]}return bF(e,0)}(i,t);case 301:return function(e){return TF(vy(!1),PC(e))}(i)}}function VF(e){WF(e,UF(e,void 0),!0)}function WF(e,t,n){bi[ki]=e,xi[ki]=t,Si[ki]=n,ki++}function $F(){ki--}function KF(e,t){for(let n=ki-1;n>=0;n--)if(e===bi[n]&&(t||!Si[n]))return n;return-1}function GF(e){for(let t=wi-1;t>=0;t--)if(hh(e,Ti[t]))return Ci[t]}function XF(e,t){return 0!==uO(t)?function(e,t){let n=Sj(e,Ft);n=QF(t,PA(t),n);const r=wA(AB.IntrinsicAttributes,t);Pc(r)||(n=Yu(r,n));return n}(e,t):function(e,t){const n=PA(t),r=(i=n,EA(AB.ElementAttributesPropertyNameContainer,i));var i;let o=void 0===r?Sj(e,Ft):""===r?mm(e):function(e,t){if(e.compositeSignatures){const n=[];for(const r of e.compositeSignatures){const e=mm(r);if(Sc(e))return e;const i=yc(e,t);if(!i)return;n.push(i)}return Nv(n)}const n=mm(e);return Sc(n)?n:yc(n,t)}(e,r);if(!o)return r&&g(t.attributes.properties)&&So(t,Ca.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,Cc(r)),Ft;if(o=QF(t,n,o),Sc(o))return o;{let n=o;const r=wA(AB.IntrinsicClassAttributes,t);if(!Pc(r)){const i=c_(r.symbol),o=mm(e);let a;if(i){a=hS(r,$x(i,Of([o],i,If(i),zm(t))))}else a=r;n=Yu(a,n)}const i=wA(AB.IntrinsicAttributes,t);return Pc(i)||(n=Yu(i,n)),n}}(e,t)}function QF(e,t,n){const r=(i=t)&&Ko(i.exports,AB.LibraryManagedAttributes,788968);var i;if(r){const t=function(e){if(xA(e.tagName))return Zm(OO(e,OA(e)));const t=SL(e.tagName);if(128&t.flags){const n=IA(t,e);return n?Zm(OO(e,n)):wt}return t}(e),i=zA(r,zm(e),t,n);if(i)return i}return n}function YF(e){return tk(k,"noImplicitAny")?Me(e,(e,t)=>e!==t&&e?Vu(e.typeParameters,t.typeParameters)?function(e,t){const n=e.typeParameters||t.typeParameters;let r;e.typeParameters&&t.typeParameters&&(r=$x(t.typeParameters,e.typeParameters));const i=e.declaration,o=function(e,t,n){const r=gj(e),i=gj(t),o=r>=i?e:t,a=o===e?t:e,s=o===e?r:i,c=yj(e)||yj(t),l=c&&!yj(o),_=new Array(s+(l?1:0));for(let u=0;u=hj(o)&&u>=hj(a),h=u>=r?void 0:cj(e,u),y=u>=i?void 0:cj(t,u),v=Eo(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${u}`);v.links.type=m?jy(f):f,_[u]=v}if(l){const e=Eo(1,"args");e.links.type=jy(dj(a,s)),a===t&&(e.links.type=hS(e.links.type,n)),_[s]=e}return _}(e,t,r),a=function(e,t,n){if(!e||!t)return e||t;const r=dv([Kl(e),hS(Kl(t),n)]);return WC(e,r)}(e.thisParameter,t.thisParameter,r),s=Math.max(e.minArgumentCount,t.minArgumentCount),c=Nu(i,n,a,o,void 0,void 0,s,167&(e.flags|t.flags));c.compositeKind=2097152,c.compositeSignatures=ne(2097152===e.compositeKind&&e.compositeSignatures||[e],[t]),r&&(c.mapper=2097152===e.compositeKind&&e.mapper&&e.compositeSignatures?Zx(e.mapper,r):r);return c}(e,t):void 0:e):void 0}function ZF(e,t){const n=O(uf(e,0),e=>!function(e,t){let n=0;for(;nfunction(e){const t=Dd(e);if(!Jz(t)&&!e.isUnterminated){let r;n??(n=Fs(99,!0)),n.setScriptTarget(t.languageVersion),n.setLanguageVariant(t.languageVariant),n.setOnError((e,i,o)=>{const a=n.getTokenEnd();if(3===e.category&&r&&a===r.start&&i===r.length){const n=_S(t.fileName,t.text,a,i,e,o);ST(r,n)}else r&&a===r.start||(r=fS(t,a,i,e,o),io.add(r))}),n.setText(t.text,e.pos,e.end-e.pos);try{return n.scan(),Tn.assert(14===n.reScanSlashToken(!0),"Expected scanner to rescan RegularExpressionLiteral"),!!r}finally{n.setText(""),n.setOnError(void 0)}}return!1}(e))),tr}function rA(e){return 208===e.kind&&!!e.initializer||226===e.kind&&64===e.operatorToken.kind}function iA(e,t,n){const r=e.elements,i=r.length,o=[],a=[];VF(e);const s=ah(e),c=NL(e),l=BF(e,void 0),_=function(e){const t=dh(e.parent);return SP(t)&&K_(t.parent)}(e)||!!l&&JN(l,e=>mT(e)||zd(e)&&!e.nameType&&!!cS(e.target||e));let u=!1;for(let c=0;c8&a[t]?Gb(e,zt)||St:e),2):V?nn:Ot,c))}function oA(e){if(!(4&Ox(e)))return e;let t=e.literalType;return t||(t=e.literalType=Wg(e),t.objectFlags|=147456),t}function aA(e){switch(e.kind){case 167:return function(e){return aL(sA(e),296)}(e);case 80:return tC(e.escapedText);case 9:case 11:return tC(e.text);default:return!1}}function sA(e){const t=Ho(e.expression);if(!t.resolvedType){if((ID(e.parent.parent)||S_(e.parent.parent)||iE(e.parent.parent))&&yP(e.expression)&&103===e.expression.operatorToken.kind&&177!==e.parent.kind&&178!==e.parent.kind)return t.resolvedType=wt;if(t.resolvedType=zL(e.expression),yD(e.parent)&&!Hv(e.parent)&&kP(e.parent.parent)){const t=vE(Lp(e.parent.parent));t&&(Ho(t).flags|=4096,Ho(e).flags|=32768,Ho(e.parent.parent).flags|=32768)}(98304&t.resolvedType.flags||!aL(t.resolvedType,402665900)&&!zS(t.resolvedType,sn))&&So(e,Ca.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return t.resolvedType}function cA(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return tC(e.escapedName)||n&&Ic(n)&&aA(n.name)}function lA(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return iy(e)||n&&Ic(n)&&pD(n.name)&&aL(sA(n.name),4096)}function uA(e,t,n,r){const i=[];for(let e=t;e0&&(s=fx(s,S(),e.symbol,g,_),a=[],o=ad(),y=!1,v=!1,b=!1);const r=Fp(zL(n.expression,2&t));if(vA(r)){const t=px(r,_);if(i&&TA(t,i,n),x=a.length,Pc(s))continue;s=fx(s,t,e.symbol,g,_)}else So(n,Ca.Spread_types_may_only_be_created_from_object_types),s=wt;continue}Tn.assert(177===n.kind||178===n.kind),QB(n)}!m||8576&m.flags?o.set(p.escapedName,p):zS(m,sn)&&(zS(m,zt)?v=!0:zS(m,Qt)?b=!0:y=!0,r&&(h=!0)),a.push(p)}if($F(),l){const t=xc(c.pattern.parent,e=>260===e.kind||226===e.kind||169===e.kind);if(305!==xc(e,e=>e===t||305===e.kind).kind)for(const e of Hd(c))o.get(e.escapedName)||Zp(s,e.escapedName)||(16777216&e.flags||So(e.valueDeclaration||(null==(n=dt(e,sd))?void 0:n.links.bindingElement),Ca.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),o.set(e.escapedName,e),a.push(e))}return Pc(s)?wt:s!==wn?(a.length>0&&(s=fx(s,S(),e.symbol,g,_),a=[],o=ad(),y=!1,v=!1),WN(s,e=>e===wn?S():e)):S();function S(){const t=[];y&&t.push(uA(e,x,a,Jt)),v&&t.push(uA(e,x,a,zt)),b&&t.push(uA(e,x,a,Qt));const n=Cs(e.symbol,o,p,p,t);return n.objectFlags|=131200|g,m&&(n.objectFlags|=4096),h&&(n.objectFlags|=512),r&&(n.pattern=e),n}}function vA(e){const t=vC(WN(e,sp));return!!(126615553&t.flags||3145728&t.flags&&T(t.types,vA))}function bA(e){return e.includes("-")}function xA(e){return QN(e)&&$y(e.escapedText)||qE(e)}function SA(e,t){return e.initializer?DL(e.initializer,t):Wt}function kA(e,t){const n=[];for(const r of e.children)if(12===r.kind)r.containsOnlyTriviaWhiteSpaces||n.push(Jt);else{if(294===r.kind&&!r.expression)continue;n.push(DL(r,t))}return n}function TA(e,t,n){for(const r of Hd(e))if(!(16777216&r.flags)){const e=t.get(r.escapedName);if(e){ST(So(e.valueDeclaration,Ca._0_is_specified_more_than_once_so_this_usage_will_be_overwritten,Cc(e.escapedName)),Vp(n,Ca.This_spread_always_overwrites_this_property))}}}function CA(e,t){return function(e,t=0){const n=e.attributes,r=UF(n,0),i=V?ad():void 0;let o,a=ad(),s=Nn,c=!1,l=!1,_=2048;const u=FA(PA(e));for(const e of n.properties){const d=e.symbol;if(RE(e)){const o=SA(e,t);_|=458752&Ox(o);const s=Eo(4|d.flags,d.escapedName);if(s.declarations=d.declarations,s.parent=d.parent,d.valueDeclaration&&(s.valueDeclaration=d.valueDeclaration),s.links.type=o,s.links.target=d,a.set(s.escapedName,s),null==i||i.set(s.escapedName,s),hC(e.name)===u&&(l=!0),r){const t=Zp(r,d.escapedName);t&&t.declarations&&No(t)&&QN(e.name)&&Po(e.name,t.declarations,e.name.escapedText)}if(r&&2&t&&!(4&t)&&CS(e)){const t=GF(n);Tn.assert(t),_w(t,e.initializer.expression,o)}}else{Tn.assert(293===e.kind),a.size>0&&(s=fx(s,f(),n.symbol,_,!1),a=ad());const r=Fp(zL(e.expression,2&t));Sc(r)&&(c=!0),vA(r)?(s=fx(s,r,n.symbol,_,!1),i&&TA(r,i,e)):(So(e.expression,Ca.Spread_types_may_only_be_created_from_object_types),o=o?Nv([o,r]):r)}}c||a.size>0&&(s=fx(s,f(),n.symbol,_,!1));const d=284===e.parent.kind?e.parent:void 0;if(d&&d.openingElement===e&&Cy(d.children).length>0){const r=kA(d,t);if(!c&&u&&""!==u){l&&So(n,Ca._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,Cc(u));const t=BF(e.attributes,void 0),i=t&&TF(t,u),o=Eo(4,u);o.links.type=1===r.length?r[0]:i&&JN(i,mT)?Vy(r):jy(dv(r)),o.valueDeclaration=aw.createPropertySignature(void 0,Cc(u),void 0,void 0),qT(o.valueDeclaration,n),o.valueDeclaration.symbol=o;const a=ad();a.set(u,o),s=fx(s,Cs(n.symbol,a,p,p,p),n.symbol,_,!1)}}return c?St:o&&s!==Nn?Nv([o,s]):o||(s===Nn?f():s);function f(){_|=8192;const e=Cs(n.symbol,a,p,p,p);return e.objectFlags|=131200|_,e}}(e.parent,t)}function wA(e,t){const n=PA(t),r=n&&Qa(n),i=r&&Ko(r,e,788968);return i?U_(i):wt}function NA(e){const t=Ho(e);if(!t.resolvedSymbol){const n=wA(AB.IntrinsicElements,e);if(Pc(n))return Q&&So(e,Ca.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,Cc(AB.IntrinsicElements)),t.resolvedSymbol=ht;{if(!QN(e.tagName)&&!qE(e.tagName))return Tn.fail();const r=qE(e.tagName)?bC(e.tagName):e.tagName.escapedText,i=Zp(n,r);if(i)return t.jsxFlags|=1,t.resolvedSymbol=i;const o=vJ(n,kx(Cc(r)));return o?(t.jsxFlags|=2,t.resolvedSymbol=o):vc(n,r)?(t.jsxFlags|=2,t.resolvedSymbol=n.symbol):(So(e,Ca.Property_0_does_not_exist_on_type_1,SC(e.tagName),"JSX."+AB.IntrinsicElements),t.resolvedSymbol=ht)}}return t.resolvedSymbol}function DA(e){const t=e&&Dd(e),n=t&&Ho(t);if(n&&!1===n.jsxImplicitImportContainer)return;if(n&&n.jsxImplicitImportContainer)return n.jsxImplicitImportContainer;const r=_k(lk(k,t),k);if(!r)return;const i=1===LS(k)?Ca.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:Ca.Cannot_find_module_0_or_its_corresponding_type_declarations,o=function(e,t){const n=k.importHelpers?1:0,r=null==e?void 0:e.imports[n];r&&Tn.assert(my(r)&&r.text===t,`Expected sourceFile.imports[${n}] to be the synthesized JSX runtime import`);return r}(t,r),a=za(o||e,r,i,e),s=a&&a!==ht?ts(Pa(a)):void 0;return n&&(n.jsxImplicitImportContainer=s||!1),s}function PA(e){const t=e&&Ho(e);if(t&&t.jsxNamespace)return t.jsxNamespace;if(!t||!1!==t.jsxNamespace){let n=DA(e);if(!n||n===ht){const t=ho(e);n=Le(e,t,1920,void 0,!1)}if(n){const e=Pa(Ko(Qa(Pa(n)),AB.JSX,1920));if(e&&e!==ht)return t&&(t.jsxNamespace=e),e}t&&(t.jsxNamespace=!1)}const n=Pa(cy(AB.JSX,1920,void 0));return n!==ht?n:void 0}function EA(e,t){const n=t&&Ko(t.exports,e,788968),r=n&&U_(n),i=r&&Hd(r);if(i){if(0===i.length)return"";if(1===i.length)return i[0].escapedName;i.length>1&&n.declarations&&So(n.declarations[0],Ca.The_global_type_JSX_0_may_not_have_more_than_one_property,Cc(e))}}function FA(e){return EA(AB.ElementChildrenAttributeNameContainer,e)}function AA(e,t){if(4&e.flags)return[ti];if(128&e.flags){const n=IA(e,t);if(n){return[OO(t,n)]}return So(t,Ca.Property_0_does_not_exist_on_type_1,e.value,"JSX."+AB.IntrinsicElements),p}const n=wp(e);let r=uf(n,1);return 0===r.length&&(r=uf(n,0)),0===r.length&&1048576&n.flags&&(r=Mu(M(n.types,e=>AA(e,t)))),r}function IA(e,t){const n=wA(AB.IntrinsicElements,t);if(!Pc(n)){const t=Zp(n,Tc(e.value));if(t)return Kl(t);const r=Sf(n,Jt);return r||void 0}return St}function OA(e){var t;Tn.assert(xA(e.tagName));const n=Ho(e);if(!n.resolvedJsxElementAttributesType){const r=NA(e);if(1&n.jsxFlags)return n.resolvedJsxElementAttributesType=Kl(r)||wt;if(2&n.jsxFlags){const r=qE(e.tagName)?bC(e.tagName):e.tagName.escapedText;return n.resolvedJsxElementAttributesType=(null==(t=Cf(wA(AB.IntrinsicElements,e),r))?void 0:t.type)||wt}return n.resolvedJsxElementAttributesType=wt}return n.resolvedJsxElementAttributesType}function jA(e){const t=wA(AB.ElementClass,e);if(!Pc(t))return t}function LA(e){return wA(AB.Element,e)}function MA(e){const t=LA(e);if(t)return dv([t,Rt])}function JA(e){const t=PA(e);if(!t)return;const n=(r=t)&&Ko(r.exports,AB.ElementType,788968);var r;if(!n)return;const i=zA(n,zm(e));return i&&!Pc(i)?i:void 0}function zA(e,t,...n){const r=U_(e);if(524288&e.flags){const i=$o(e).typeParameters;if(g(i)>=n.length){const o=Of(n,i,n.length,t);return 0===g(o)?r:ih(e,o)}}if(g(r.typeParameters)>=n.length){return qg(r,Of(n,r.typeParameters,n.length,t))}}function qA(e){const t=Iu(e);var n;if(t&&function(e){(function(e){if(rP(e)&&qE(e.expression))return Uz(e.expression,Ca.JSX_property_access_expressions_cannot_include_JSX_namespace_names);if(qE(e)&&ck(k)&&!$y(e.namespace.escapedText))Uz(e,Ca.React_components_cannot_include_JSX_namespace_names)})(e.tagName),kz(e,e.typeArguments);const t=new Map;for(const n of e.attributes.properties){if(293===n.kind)continue;const{name:e,initializer:r}=n,i=hC(e);if(t.get(i))return Uz(e,Ca.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(t.set(i,!0),r&&294===r.kind&&!r.expression)return Uz(r,Ca.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}(e),n=e,0===(k.jsx||0)&&So(n,Ca.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===LA(n)&&Q&&So(n,Ca.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist),MP(e,4),t){const t=e,n=MO(t);zO(n,e);const r=JA(t);if(void 0!==r){const e=t.tagName;Dk(xA(e)?kx(SC(e)):zL(e),r,lo,e,Ca.Its_type_0_is_not_a_valid_JSX_element_type,()=>{const t=tp(e);return yS(void 0,Ca._0_cannot_be_used_as_a_JSX_component,t)})}else!function(e,t,n){if(1===e){const e=MA(n);e&&Dk(t,e,lo,n.tagName,Ca.Its_return_type_0_is_not_a_valid_JSX_element,r)}else if(0===e){const e=jA(n);e&&Dk(t,e,lo,n.tagName,Ca.Its_instance_type_0_is_not_a_valid_JSX_element,r)}else{const e=MA(n),i=jA(n);if(!e||!i)return;Dk(t,dv([e,i]),lo,n.tagName,Ca.Its_element_type_0_is_not_a_valid_JSX_element,r)}function r(){const e=tp(n.tagName);return yS(void 0,Ca._0_cannot_be_used_as_a_JSX_component,e)}}(uO(t),mm(n),t)}}function UA(e,t,n){if(524288&e.flags&&(Wd(e,t)||Cf(e,t)||pu(t)&&xf(e,Jt)||n&&bA(t)))return!0;if(33554432&e.flags)return UA(e.baseType,t,n);if(3145728&e.flags&&VA(e))for(const r of e.types)if(UA(r,t,n))return!0;return!1}function VA(e){return!!(524288&e.flags&&!(512&Ox(e))||67108864&e.flags||33554432&e.flags&&VA(e.baseType)||1048576&e.flags&&ee(e.types,VA)||2097152&e.flags&&T(e.types,VA))}function WA(e,t){if(function(e){if(e.expression&&pA(e.expression))Uz(e.expression,Ca.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}(e),e.expression){const n=zL(e.expression,t);return e.dotDotDotToken&&n!==St&&!rT(n)&&So(e,Ca.JSX_spread_child_must_be_an_array_type),n}return wt}function $A(e){return e.valueDeclaration?Qz(e.valueDeclaration):0}function HA(e){if(8192&e.flags||4&xx(e))return!0;if(zm(e.valueDeclaration)){const t=e.valueDeclaration.parent;return t&&yP(t)&&3===dg(t)}}function KA(e,t,n,r,i,o=!0){return GA(e,t,n,r,i,o?166===e.kind?e.right:205===e.kind?e:208===e.kind&&e.propertyName?e.propertyName:e.name:void 0)}function GA(e,t,n,r,i,o){var a;const s=Sx(i,n);if(t){if(P<2&&XA(i))return o&&So(o,Ca.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(64&s)return o&&So(o,Ca.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,Hs(i),Gs(Wk(i))),!1;if(!(256&s)&&(null==(a=i.declarations)?void 0:a.some(C_)))return o&&So(o,Ca.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super,Hs(i)),!1}if(64&s&&XA(i)&&(hm(e)||vm(e)||YD(e.parent)&&ym(e.parent.parent))){const t=Ix(as(i));if(t&&xc(e,e=>!!(SD(e)&&Md(e.body)||yD(e))||!(!S_(e)&&!g_(e))&&"quit"))return o&&So(o,Ca.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,Hs(i),ey(t.name)),!1}if(!(6&s))return!0;if(2&s){return!!gJ(e,Ix(as(i)))||(o&&So(o,Ca.Property_0_is_private_and_only_accessible_within_class_1,Hs(i),Gs(Wk(i))),!1)}if(t)return!0;let c=mJ(e,e=>Hk(U_(rs(e)),i,n));return!c&&(c=function(e){const t=function(e){const t=lm(e,!1,!1);return t&&f_(t)?Sv(t):void 0}(e);let n=(null==t?void 0:t.type)&&Mx(t.type);n&&262144&n.flags&&(n=Gd(n));if(n&&7&Ox(n))return e_(n);return}(e),c=c&&Hk(c,i,n),256&s||!c)?(o&&So(o,Ca.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,Hs(i),Gs(Wk(i)||r)),!1):!!(256&s)||(262144&r.flags&&(r=r.isThisType?Gd(r):op(r)),!(!r||!t_(r,c))||(o&&So(o,Ca.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2,Hs(i),Gs(c),Gs(r)),!1))}function XA(e){return!!Vk(e,e=>!(8192&e.flags))}function QA(e){return iI(zL(e),e)}function YA(e){return mN(e,50331648)}function ZA(e){return YA(e)?jC(e):e}function eI(e,t){const n=Cb(e)?Up(e):void 0;if(106!==e.kind)if(void 0!==n&&n.length<100){if(QN(e)&&"undefined"===n)return void So(e,Ca.The_value_0_cannot_be_used_here,"undefined");So(e,16777216&t?33554432&t?Ca._0_is_possibly_null_or_undefined:Ca._0_is_possibly_undefined:Ca._0_is_possibly_null,n)}else So(e,16777216&t?33554432&t?Ca.Object_is_possibly_null_or_undefined:Ca.Object_is_possibly_undefined:Ca.Object_is_possibly_null);else So(e,Ca.The_value_0_cannot_be_used_here,"null")}function tI(e,t){So(e,16777216&t?33554432&t?Ca.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:Ca.Cannot_invoke_an_object_which_is_possibly_undefined:Ca.Cannot_invoke_an_object_which_is_possibly_null)}function nI(e,t,n){if(V&&2&e.flags){if(Cb(t)){const e=Up(t);if(e.length<100)return So(t,Ca._0_is_of_type_unknown,e),wt}return So(t,Ca.Object_is_of_type_unknown),wt}const r=fN(e,50331648);if(50331648&r){n(t,r);const i=jC(e);return 229376&i.flags?wt:i}return e}function iI(e,t){return nI(e,t,eI)}function oI(e,t){const n=iI(e,t);if(16384&n.flags){if(Cb(t)){const e=Up(t);if(QN(t)&&"undefined"===e)return So(t,Ca.The_value_0_cannot_be_used_here,e),n;if(e.length<100)return So(t,Ca._0_is_possibly_undefined,e),n}So(t,Ca.Object_is_possibly_undefined)}return n}function aI(e,t,n){return 64&e.flags?function(e,t){const n=zL(e.expression),r=JC(n,e.expression);return BC(fI(e,e.expression,iI(r,e.expression),e.name,t),e,r!==n)}(e,t):fI(e,e.expression,QA(e.expression),e.name,t,n)}function sI(e,t){const n=Am(e)&&Tv(e.left)?iI(OE(e.left),e.left):QA(e.left);return fI(e,e.left,n,e.right,t)}function cI(e){for(;217===e.parent.kind;)e=e.parent;return K_(e.parent)&&e.parent.expression===e}function lI(e,t){for(let n=cm(t);n;n=om(n)){const{symbol:t}=n,r=ry(t,e),i=t.members&&t.members.get(r)||t.exports&&t.exports.get(r);if(i)return i}}function _I(e){!function(e){if(!om(e))return Uz(e,Ca.Private_identifiers_are_not_allowed_outside_class_bodies);if(!UP(e.parent)){if(!Em(e))return Uz(e,Ca.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);const t=yP(e.parent)&&103===e.parent.operatorToken.kind;if(!uI(e)&&!t)return Uz(e,Ca.Cannot_find_name_0,wc(e))}}(e);const t=uI(e);return t&&AI(t,void 0,!1),St}function uI(e){if(!Em(e))return;const t=Ho(e);return void 0===t.resolvedSymbol&&(t.resolvedSymbol=lI(e.escapedText,e)),t.resolvedSymbol}function dI(e,t){return Zp(e,t.escapedName)}function pI(e,t){return(Yc(t)||hm(e)&&Zc(t))&&lm(e,!0,!1)===el(t)}function fI(e,t,n,r,i,o){const a=Ho(t).resolvedSymbol,s=oh(e),c=wp(0!==s||cI(e)?YC(n):n),l=Sc(c)||c===en;let _,u;if(YN(r)){(P<9||P<99||!R)&&(0!==s&&mz(e,1048576),1!==s&&mz(e,524288));const t=lI(r.escapedText,r);if(s&&t&&t.valueDeclaration&&bD(t.valueDeclaration)&&Uz(r,Ca.Cannot_assign_to_private_method_0_Private_methods_are_not_writable,wc(r)),l){if(t)return Pc(c)?wt:c;if(void 0===cm(r))return Uz(r,Ca.Private_identifiers_are_not_allowed_outside_class_bodies),St}if(_=t&&dI(n,t),void 0===_){if(function(e,t,n){let r;const i=Hd(e);i&&h(i,e=>{const n=e.valueDeclaration;if(n&&Ic(n)&&YN(n.name)&&n.name.escapedText===t.escapedText)return r=e,!0});const o=ea(t);if(r){const i=Tn.checkDefined(r.valueDeclaration),a=Tn.checkDefined(om(i));if(null==n?void 0:n.valueDeclaration){const r=n.valueDeclaration,s=om(r);if(Tn.assert(!!s),xc(s,e=>a===e))return ST(So(t,Ca.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,o,Gs(e)),Vp(r,Ca.The_shadowing_declaration_of_0_is_defined_here,o),Vp(i,Ca.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,o)),!0}return So(t,Ca.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,o,ea(a.name||jB)),!0}return!1}(n,r,t))return wt;const e=cm(r);e&&Ed(Dd(e),k.checkJs)&&Uz(r,Ca.Private_field_0_must_be_declared_in_an_enclosing_class,wc(r))}else{65536&_.flags&&!(32768&_.flags)&&1!==s&&So(e,Ca.Private_accessor_was_defined_without_a_getter)}}else{if(l)return QN(t)&&a&&MP(e,2,void 0,n),Pc(c)?wt:c;_=Zp(c,r.escapedText,cL(c),166===e.kind)}if(MP(e,2,_,n),_){const n=wB(_,r);if(No(n)&&mb(e,n)&&n.declarations&&Po(r,n.declarations,r.escapedText),function(e,t,n){const{valueDeclaration:r}=e;if(!r||Dd(t).isDeclarationFile)return;let i;const o=wc(n);!hI(t)||function(e){return yD(e)&&!Qv(e)&&e.questionToken}(r)||qx(t)&&qx(t.expression)||Go(r,n)||bD(r)&&256&Xz(r)||!R&&function(e){if(!(32&e.parent.flags))return!1;let t=Kl(e.parent);for(;;){if(t=t.symbol&&yI(t),!t)return!1;const n=Zp(t,e.escapedName);if(n&&n.valueDeclaration)return!0}}(e)?263!==r.kind||183===t.parent.kind||33554432&r.flags||Go(r,n)||(i=So(n,Ca.Class_0_used_before_its_declaration,o)):i=So(n,Ca.Property_0_is_used_before_its_initialization,o);i&&ST(i,Vp(r,Ca._0_is_declared_here,o))}(_,e,r),AI(_,e,II(t,a)),Ho(e).resolvedSymbol=_,KA(e,108===t.kind,wx(e),c,_),Zj(e,_,s))return So(r,Ca.Cannot_assign_to_0_because_it_is_a_read_only_property,wc(r)),wt;u=pI(e,_)?kt:o||Cx(e)?Hl(_):Kl(_)}else{const t=YN(r)||0!==s&&Jb(n)&&!rC(n)?void 0:Cf(c,r.escapedText);if(!t||!t.type){const t=mI(e,n.symbol,!0);return!t&&pb(n)?St:n.symbol===fe?(fe.exports.has(r.escapedText)&&418&fe.exports.get(r.escapedText).flags?So(r,Ca.Property_0_does_not_exist_on_type_1,Cc(r.escapedText),Gs(n)):Q&&So(r,Ca.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Gs(n)),St):(r.escapedText&&!ra(e)&&SI(r,rC(n)?c:n,t),wt)}t.isReadonly&&(ah(e)||gh(e))&&So(e,Ca.Index_signature_in_type_0_only_permits_reading,Gs(c)),u=t.type,k.noUncheckedIndexedAccess&&1!==oh(e)&&(u=dv([u,jt])),k.noPropertyAccessFromIndexSignature&&rP(e)&&So(r,Ca.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0,Cc(r.escapedText)),t.declaration&&Do(t.declaration)&&Po(r,[t.declaration],r.escapedText)}return gI(e,_,u,r,i)}function mI(e,t,n){var r;const i=Dd(e);if(i&&void 0===k.checkJs&&void 0===i.checkJsDirective&&(1===i.scriptKind||2===i.scriptKind)){const o=h(null==t?void 0:t.declarations,Dd),a=!(null==t?void 0:t.valueDeclaration)||!S_(t.valueDeclaration)||(null==(r=t.valueDeclaration.heritageClauses)?void 0:r.length)||wm(!1,t.valueDeclaration);return!(i!==o&&o&&of(o)||n&&t&&32&t.flags&&a||e&&n&&rP(e)&&110===e.expression.kind&&a)}return!1}function gI(e,t,n,r,i){const o=oh(e);if(1===o)return zC(n,!!(t&&16777216&t.flags));if(t&&!(98311&t.flags)&&!(8192&t.flags&&1048576&n.flags)&&!MB(t.declarations))return n;if(n===kt)return nl(e,t);n=AP(n,e,i);let a=!1;if(V&&K&&qx(e)&&110===e.expression.kind){const n=t&&t.valueDeclaration;if(n&&dB(n)&&!$v(n)){const t=XD(e);176!==t.kind||t.parent!==n.parent||33554432&n.flags||(a=!0)}}else V&&t&&t.valueDeclaration&&rP(t.valueDeclaration)&&Sg(t.valueDeclaration)&&XD(e)===XD(t.valueDeclaration)&&(a=!0);const s=qD(e,n,a?DC(n):n);return a&&!vk(n)&&vk(s)?(So(r,Ca.Property_0_is_used_before_being_assigned,Hs(t)),n):o?MT(s):s}function hI(e){return!!xc(e,e=>{switch(e.kind){case 172:return!0;case 303:case 174:case 177:case 178:case 305:case 167:case 239:case 294:case 291:case 292:case 293:case 286:case 233:case 298:return!1;case 219:case 244:return!(!jP(e.parent)||!xD(e.parent.parent))||"quit";default:return!Em(e)&&"quit"}})}function yI(e){const t=P_(e);if(0!==t.length)return Nv(t)}function SI(e,t,n){let r,i;if(!YN(e)&&1048576&t.flags&&!(402784252&t.flags))for(const n of t.types)if(!Zp(n,e.escapedText)&&!Cf(n,e.escapedText)){r=yS(r,Ca.Property_0_does_not_exist_on_type_1,Rp(e),Gs(n));break}if(TI(e.escapedText,t)){const n=Rp(e),i=Gs(t);r=yS(r,Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,n,i,i+"."+n)}else{const o=fM(t);if(o&&Zp(o,e.escapedText))r=yS(r,Ca.Property_0_does_not_exist_on_type_1,Rp(e),Gs(t)),i=Vp(e,Ca.Did_you_forget_to_use_await);else{const o=Rp(e),a=Gs(t),s=function(e,t){const n=wp(t).symbol;if(!n)return;const r=Dc(n),i=ap().get(r);if(i)for(const[t,n]of i)if(E(n,e))return t}(o,t);if(void 0!==s)r=yS(r,Ca.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later,o,a,s);else{const s=wI(e,t);if(void 0!==s){const e=Dc(s);r=yS(r,n?Ca.Property_0_may_not_exist_on_type_1_Did_you_mean_2:Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_2,o,a,e),i=s.valueDeclaration&&Vp(s.valueDeclaration,Ca._0_is_declared_here,e)}else{const e=function(e){return k.lib&&!k.lib.includes("dom")&&(t=e,n=e=>e.symbol&&/^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(Cc(e.symbol.escapedName)),3145728&t.flags?T(t.types,n):n(t))&&hk(e);var t,n}(t)?Ca.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:Ca.Property_0_does_not_exist_on_type_1;r=yS(Xp(r,t),e,o,a)}}}}const o=Hp(Dd(e),e,r);i&&ST(o,i),ko(!n||r.code!==Ca.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,o)}function TI(e,t){const n=t.symbol&&Zp(Kl(t.symbol),e);return void 0!==n&&!!n.valueDeclaration&&$v(n.valueDeclaration)}function CI(e,t){return FI(e,Hd(t),106500)}function wI(e,t){let n=Hd(t);if("string"!=typeof e){const r=e.parent;rP(r)&&(n=O(n,e=>OI(r,t,e))),e=wc(e)}return FI(e,n,111551)}function NI(e,t){const n=_t(e)?e:wc(e),r=Hd(t);return("for"===n?C(r,e=>"htmlFor"===Dc(e)):"class"===n?C(r,e=>"className"===Dc(e)):void 0)??FI(n,r,111551)}function DI(e,t){const n=wI(e,t);return n&&Dc(n)}function PI(e,t,n){Tn.assert(void 0!==t,"outername should always be defined");return Re(e,t,n,void 0,!1,!1)}function EI(e,t){return t.exports&&FI(wc(e),Ka(t),2623475)}function FI(e,t,n){return Kt(e,t,function(e){const t=Dc(e);if(ln(t,'"'))return;if(e.flags&n)return t;if(2097152&e.flags){const r=function(e){if($o(e).aliasTarget!==yt)return Ea(e)}(e);if(r&&r.flags&n)return t}return})}function AI(e,t,n){const r=e&&106500&e.flags&&e.valueDeclaration;if(!r)return;const i=Vv(r,2),o=e.valueDeclaration&&Ic(e.valueDeclaration)&&YN(e.valueDeclaration.name);if((i||o)&&(!t||!Cx(t)||65536&e.flags)){if(n){const n=xc(t,g_);if(n&&n.symbol===e)return}(1&xx(e)?$o(e).target:e).isReferenced=-1}}function II(e,t){return 110===e.kind||!!t&&Cb(e)&&t===Xw(wb(e))}function OI(e,t,n){return LI(e,211===e.kind&&108===e.expression.kind,!1,t,n)}function jI(e,t,n,r){if(Sc(r))return!0;const i=Zp(r,n);return!!i&&LI(e,t,!1,r,i)}function LI(e,t,n,r,i){if(Sc(r))return!0;if(i.valueDeclaration&&o_(i.valueDeclaration)){const t=om(i.valueDeclaration);return!Dl(e)&&!!xc(e,e=>e===t)}return GA(e,t,n,r,i)}function MI(e){const t=e.initializer;if(261===t.kind){const e=t.declarations[0];if(e&&!O_(e.name))return rs(e)}else if(80===t.kind)return Xw(t)}function RI(e){return 1===bf(e).length&&!!xf(e,zt)}function BI(e,t){return 64&e.flags?function(e,t){const n=zL(e.expression),r=JC(n,e.expression);return BC(JI(e,iI(r,e.expression),t),e,r!==n)}(e,t):JI(e,QA(e.expression),t)}function JI(e,t,n){const r=0!==oh(e)||cI(e)?YC(t):t,i=e.argumentExpression,o=zL(i);if(Pc(r)||r===en)return r;if(cL(r)&&!Ku(i))return So(i,Ca.A_const_enum_member_can_only_be_accessed_using_a_string_literal),wt;const a=function(e){const t=mh(e);if(80===t.kind){const n=Xw(t);if(3&n.flags){let t=e,r=e.parent;for(;r;){if(249===r.kind&&t===r.statement&&MI(r)===n&&RI(RL(r.expression)))return!0;t=r,r=r.parent}}}return!1}(i)?zt:o,s=oh(e);let c;0===s?c=32:(c=4|(Jb(r)&&!rC(r)?2:0),2===s&&(c|=32));const l=Gb(r,a,c,e)||wt;return aM(gI(e,Ho(e).resolvedSymbol,l,i,n),e)}function zI(e){return K_(e)||sP(e)||Iu(e)}function qI(e){return zI(e)&&h(e.typeArguments,JB),215===e.kind?zL(e.template):Iu(e)?zL(e.attributes):yP(e)?zL(e.left):K_(e)&&h(e.arguments,e=>{zL(e)}),ti}function UI(e){return qI(e),ni}function VI(e){return!!e&&(230===e.kind||237===e.kind&&e.isSpread)}function WI(e){return N(e,VI)}function $I(e){return!!(16384&e.flags)}function HI(e){return!!(49155&e.flags)}function XI(e,t,n,r=!1){let i,o=!1,a=gj(n),s=hj(n);if(215===e.kind)if(i=t.length,228===e.template.kind){const t=Ee(e.template.templateSpans);o=Ld(t.literal)||!!t.literal.isUnterminated}else{const t=e.template;Tn.assert(15===t.kind),o=!!t.isUnterminated}else if(170===e.kind)i=hO(e,n);else if(226===e.kind)i=1;else if(Iu(e)){if(o=e.attributes.end===e.end,o)return!0;i=0===s?t.length:1,a=0===t.length?a:1,s=Math.min(s,1)}else{if(!e.arguments)return Tn.assert(214===e.kind),0===hj(n);{i=r?t.length+1:t.length,o=e.arguments.end===e.end;const a=WI(t);if(a>=0)return a>=hj(n)&&(yj(n)||aa)return!1;if(o||i>=s)return!0;for(let t=i;t=r&&t.length<=n}function YI(e,t){let n;return!!(e.target&&(n=pj(e.target,t))&&Rb(n))}function eO(e){return rO(e,0,!1)}function nO(e){return rO(e,0,!1)||rO(e,1,!1)}function rO(e,t,n){if(524288&e.flags){const r=Ud(e);if(n||0===r.properties.length&&0===r.indexInfos.length){if(0===t&&1===r.callSignatures.length&&0===r.constructSignatures.length)return r.callSignatures[0];if(1===t&&1===r.constructSignatures.length&&0===r.callSignatures.length)return r.constructSignatures[0]}}}function iO(e,t,n,r){const i=ow(e.typeParameters,e,0,r),o=vj(t),a=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return rw(a?iS(t,a):t,e,(e,t)=>{Lw(i.inferences,e,t)}),n||iw(t,e,(e,t)=>{Lw(i.inferences,e,t,128)}),Dm(e,Hw(i),zm(t.declaration))}function oO(e){if(!e)return Yt;const t=zL(e);return jb(e)?t:Pl(e.parent)?jC(t):Dl(e.parent)?RC(t):t}function aO(e,t,n,r,i){if(Iu(e))return function(e,t,n,r){const i=XF(t,e),o=xL(e.attributes,i,r,n);return Lw(r.inferences,o,i),Hw(r)}(e,t,r,i);if(170!==e.kind&&226!==e.kind){const n=T(t.typeParameters,e=>!!mp(e)),r=UF(e,n?8:0);if(r){const o=mm(t);if(mw(o)){const a=GF(e);if(!(!n&&UF(e,8)!==r)){const e=fw(function(e,t=0){return e&&sw(M(e.inferences,pw),e.signature,e.flags|t,e.compareTypes)}(a,1)),t=hS(r,e),n=eO(t),s=n&&n.typeParameters?Zm(Rm(n,n.typeParameters)):t;Lw(i.inferences,s,o,128)}const s=ow(t.typeParameters,t,i.flags),c=hS(r,a&&a.returnMapper);Lw(s.inferences,c,o),i.returnMapper=ee(s.inferences,IL)?fw(function(e){const t=O(e.inferences,IL);return t.length?sw(M(t,pw),e.signature,e.flags,e.compareTypes):void 0}(s)):void 0}}}const o=bj(t),a=o?Math.min(gj(t)-1,n.length):n.length;if(o&&262144&o.flags){const e=C(i.inferences,e=>e.typeParameter===o);e&&(e.impliedArity=N(n,VI,a)<0?n.length-a:void 0)}const s=tm(t);if(s&&mw(s)){const t=fO(e);Lw(i.inferences,oO(t),s)}for(let e=0;e=n-1){const t=e[n-1];if(VI(t)){const e=237===t.kind?t.type:xL(t.expression,r,i,o);return lT(e)?sO(e):jy(gR(33,e,At,230===t.kind?t.expression:t),a)}}const s=[],c=[],l=[];for(let _=t;_yS(void 0,Ca.Type_0_does_not_satisfy_the_constraint_1):void 0,l=r||Ca.Type_0_does_not_satisfy_the_constraint_1;s||(s=$x(o,a));const _=a[e];if(!KS(_,Tu(hS(i,s),_),n?t[e]:void 0,l,c))return}}return a}function uO(e){if(xA(e.tagName))return 2;const t=wp(zL(e.tagName));return g(uf(t,1))?0:g(uf(t,0))?1:2}function dO(e){return NP(e=mh(e))?mh(e.expression):e}function pO(e,t,n,r,i,o,a,s){const c={errors:void 0,skipLogging:!0};if(Iu(e))return function(e,t,n,r,i,o,a){const s=XF(t,e),c=xL(e.attributes,s,void 0,r),l=4&r?$C(c):c;return function(){var t;if(DA(e))return!0;const n=!IE(e)&&!AE(e)||xA(e.tagName)||qE(e.tagName)?void 0:zL(e.tagName);if(!n)return!0;const r=uf(n,0);if(!g(r))return!0;const o=uz(e);if(!o)return!0;const s=Ma(o,111551,!0,!1,e);if(!s)return!0;const c=uf(Kl(s),0);if(!g(c))return!0;let l=!1,_=0;for(const e of c){const t=uf(dj(e,0),0);if(g(t))for(const e of t){if(l=!0,yj(e))return!0;const t=gj(e);t>_&&(_=t)}}if(!l)return!0;let u=1/0;for(const e of r){const t=hj(e);t{n.push(e.expression)}),n}if(170===e.kind)return function(e){const t=e.expression,n=Mj(e);if(n){const e=[];for(const r of n.parameters){const n=Kl(r);e.push(mO(t,n))}return e}return Tn.fail()}(e);if(226===e.kind)return[e.left];if(Iu(e))return e.attributes.properties.length>0||IE(e)&&e.parent.children.length>0?[e.attributes]:p;const t=e.arguments||p,n=WI(t);if(n>=0){const e=t.slice(0,n);for(let r=n;r{var o;const a=i.target.elementFlags[r],s=mO(n,4&a?jy(t):t,!!(12&a),null==(o=i.target.labeledElementDeclarations)?void 0:o[r]);e.push(s)}):e.push(n)}return e}return t}function hO(e,t){return k.experimentalDecorators?function(e,t){switch(e.parent.kind){case 263:case 231:return 1;case 172:return Qv(e.parent)?3:2;case 174:case 177:case 178:return t.parameters.length<=2?2:3;case 169:return 3;default:return Tn.fail()}}(e,t):Math.min(Math.max(gj(t),1),2)}function yO(e){const t=Dd(e),{start:n,length:r}=rf(t,rP(e.expression)?e.expression.name:e.expression);return{start:n,length:r,sourceFile:t}}function vO(e,t,...n){if(oP(e)){const{sourceFile:r,start:i,length:o}=yO(e);return"message"in t?fS(r,i,o,t,...n):Qp(r,t)}return"message"in t?Vp(e,t,...n):Hp(Dd(e),e,t)}function bO(e,t,n,r){var i;const o=WI(n);if(o>-1)return Vp(n[o],Ca.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let a,s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;for(const e of t){const t=hj(e),r=gj(e);tl&&(l=t),n.length1&&(S=P(d,so,m,w)),S||(S=P(d,lo,m,w)),S)return S;if(S=function(e,t,n,r,i){return Tn.assert(t.length>0),QB(e),r||1===t.length||t.some(e=>!!e.typeParameters)?function(e,t,n,r){const i=function(e,t){let n=-1,r=-1;for(let i=0;i=t)return i;a>r&&(r=a,n=i)}return n}(t,void 0===me?n.length:me),o=t[i],{typeParameters:a}=o;if(!a)return o;const s=zI(e)?e.typeArguments:void 0,c=s?Jm(o,function(e,t,n){const r=e.map(SJ);for(;r.length>t.length;)r.pop();for(;r.lengthe.thisParameter);let n;t.length&&(n=kO(t,t.map(aj)));const{min:r,max:i}=kT(e,SO),o=[];for(let t=0;ttJ(e)?tpj(e,t))))}const a=$(e,e=>tJ(e)?Ee(e.parameters):void 0);let s=128;if(0!==a.length){const t=jy(dv($(e,Cm),2));o.push(TO(a,t)),s|=1}e.some(nJ)&&(s|=2);return Nu(e[0].declaration,void 0,n,o,Nv(e.map(mm)),void 0,r,s)}(t)}(e,d,f,!!n,r),Ho(e).resolvedSignature=S,_)if(!o&&l&&(o=Ca.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method),y)if(1===y.length||y.length>3){const t=y[y.length-1];let n;y.length>3&&(n=yS(n,Ca.The_last_overload_gave_the_following_error),n=yS(n,Ca.No_overload_matches_this_call)),o&&(n=yS(n,o));const r=pO(e,f,t,lo,0,!0,()=>n,void 0);if(r)for(const e of r)t.declaration&&y.length>3&&ST(e,Vp(t.declaration,Ca.The_last_overload_is_declared_here)),D(t,e),io.add(e);else Tn.fail("No error for last overload signature")}else{const t=[];let n=0,r=Number.MAX_VALUE,i=0,a=0;for(const o of y){const s=pO(e,f,o,lo,0,!0,()=>yS(void 0,Ca.Overload_0_of_1_2_gave_the_following_error,a+1,d.length,Ks(o)),void 0);s?(s.length<=r&&(r=s.length,i=a),n=Math.max(n,s.length),t.push(s)):Tn.fail("No error for 3 or fewer overload signatures"),a++}const s=n>1?t[i]:J(t);Tn.assert(s.length>0,"No errors reported for 3 or fewer overload signatures");let c=yS(M(s,Yp),Ca.No_overload_matches_this_call);o&&(c=yS(c,o));const l=[...z(s,e=>e.relatedInformation)];let _;if(T(s,e=>e.start===s[0].start&&e.length===s[0].length&&e.file===s[0].file)){const{file:e,start:t,length:n}=s[0];_={file:e,start:t,length:n,code:c.code,category:c.category,messageText:c,relatedInformation:l}}else _=Hp(Dd(e),K_(N=e)?rP(N.expression)?N.expression.name:N.expression:sP(N)?rP(N.tag)?N.tag.name:N.tag:Iu(N)?N.tagName:N,c,l);D(y[0],_),io.add(_)}else if(v)io.add(bO(e,[v],f,o));else if(x)_O(x,e.typeArguments,!0,o);else{const n=O(t,e=>QI(e,u));0===n.length?io.add(function(e,t,n,r){const i=n.length;if(1===t.length){const o=t[0],a=If(o.typeParameters),s=g(o.typeParameters);if(r){let t=yS(void 0,Ca.Expected_0_type_arguments_but_got_1,ai?a=Math.min(a,t):n1?C(s,e=>g_(e)&&Md(e.body)):void 0;if(c){const e=$f(c),n=!e.typeParameters;P([e],lo,n)&&ST(t,Vp(c,Ca.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}y=i,v=o,x=a}function P(t,n,r,i=!1){var o,a;if(y=void 0,v=void 0,x=void 0,r){const r=t[0];if(ee(u)||!XI(e,f,r,i))return;return pO(e,f,r,n,0,!1,void 0,void 0)?void(y=[r]):r}for(let r=0;re===t)&&(l=Xm(l)),ee(u)){if(n=_O(l,u,!1),!n){x=l;continue}}else c=ow(l.typeParameters,l,zm(e)?2:0),n=Jx(aO(e,l,f,8|k,c),c.nonFixingMapper),k|=4&c.flags?8:0;if(s=Dm(l,n,zm(l.declaration),c&&c.inferredTypeParameters),bj(l)&&!XI(e,f,s,i)){v=s;continue}}else s=l;if(!pO(e,f,s,n,k,!1,void 0,c)){if(k){if(k=0,c){if(s=Dm(l,Jx(aO(e,l,f,k,c),c.mapper),zm(l.declaration),c.inferredTypeParameters),bj(l)&&!XI(e,f,s,i)){v=s;continue}}if(pO(e,f,s,n,k,!1,void 0,c)){(y||(y=[])).push(s);continue}}return t[r]=s,s}(y||(y=[])).push(s)}}}}function SO(e){const t=e.parameters.length;return tJ(e)?t-1:t}function kO(e,t){return TO(e,dv(t,2))}function TO(e,t){return WC(Ne(e),t)}function CO(e){return!(!e.typeParameters||!GJ(mm(e)))}function wO(e,t,n,r){return Sc(e)||Sc(t)&&!!(262144&e.flags)||!n&&!r&&!(1048576&t.flags)&&!(131072&Fp(t).flags)&&zS(e,Hn)}function NO(e,t,n){let r=QA(e.expression);if(r===en)return ii;if(r=wp(r),Pc(r))return UI(e);if(Sc(r))return e.typeArguments&&So(e,Ca.Untyped_function_calls_may_not_accept_type_arguments),qI(e);const i=uf(r,1);if(i.length){if(!function(e,t){if(!t||!t.declaration)return!0;const n=t.declaration,r=eb(n,6);if(!r||176!==n.kind)return!0;const i=Ix(n.parent.symbol),o=U_(n.parent.symbol);if(!gJ(e,i)){const t=om(e);if(t&&4&r){const e=SJ(t);if(PO(n.parent.symbol,e))return!0}return 2&r&&So(e,Ca.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Gs(o)),4&r&&So(e,Ca.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Gs(o)),!1}return!0}(e,i[0]))return UI(e);if(DO(i,e=>!!(4&e.flags)))return So(e,Ca.Cannot_create_an_instance_of_an_abstract_class),UI(e);const o=r.symbol&&Ix(r.symbol);return o&&Wv(o,64)?(So(e,Ca.Cannot_create_an_instance_of_an_abstract_class),UI(e)):xO(e,i,t,n,0)}const o=uf(r,0);if(o.length){const r=xO(e,o,t,n,0);return Q||(r.declaration&&!RO(r.declaration)&&mm(r)!==Yt&&So(e,Ca.Only_a_void_function_can_be_called_with_the_new_keyword),tm(r)===Yt&&So(e,Ca.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),r}return FO(e.expression,r,1),UI(e)}function DO(e,t){return ct(e)?ee(e,e=>DO(e,t)):1048576===e.compositeKind?ee(e.compositeSignatures,t):t(e)}function PO(e,t){const n=P_(t);if(!g(n))return!1;const r=n[0];if(2097152&r.flags){const t=Zu(r.types);let n=0;for(const i of r.types){if(!t[n]&&3&Ox(i)){if(i.symbol===e)return!0;if(PO(e,i))return!0}n++}return!1}return r.symbol===e||PO(e,r)}function EO(e,t,n){let r;const i=0===n,o=xM(t),a=o&&uf(o,n).length>0;if(1048576&t.flags){const e=t.types;let o=!1;for(const a of e){if(0!==uf(a,n).length){if(o=!0,r)break}else if(r||(r=yS(r,i?Ca.Type_0_has_no_call_signatures:Ca.Type_0_has_no_construct_signatures,Gs(a)),r=yS(r,i?Ca.Not_all_constituents_of_type_0_are_callable:Ca.Not_all_constituents_of_type_0_are_constructable,Gs(t))),o)break}o||(r=yS(void 0,i?Ca.No_constituent_of_type_0_is_callable:Ca.No_constituent_of_type_0_is_constructable,Gs(t))),r||(r=yS(r,i?Ca.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:Ca.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,Gs(t)))}else r=yS(r,i?Ca.Type_0_has_no_call_signatures:Ca.Type_0_has_no_construct_signatures,Gs(t));let s=i?Ca.This_expression_is_not_callable:Ca.This_expression_is_not_constructable;if(oP(e.parent)&&0===e.parent.arguments.length){const{resolvedSymbol:t}=Ho(e);t&&32768&t.flags&&(s=Ca.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without)}return{messageChain:yS(r,s),relatedMessage:a?Ca.Did_you_forget_to_use_await:void 0}}function FO(e,t,n,r){const{messageChain:i,relatedMessage:o}=EO(e,t,n),a=Hp(Dd(e),e,i);if(o&&ST(a,Vp(e,o)),oP(e.parent)){const{start:t,length:n}=yO(e.parent);a.start=t,a.length=n}io.add(a),AO(t,n,r?ST(a,r):a)}function AO(e,t,n){if(!e.symbol)return;const r=$o(e.symbol).originatingImport;if(r&&!gf(r)){const i=uf(Kl($o(e.symbol).target),t);if(!i||!i.length)return;ST(n,Vp(r,Ca.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}function IO(e,t,n){const r=zL(e.expression),i=wp(r);if(Pc(i))return UI(e);const o=uf(i,0),a=uf(i,1).length;if(wO(r,i,o.length,a))return qI(e);if(s=e,(c=o).length&&T(c,e=>0===e.minArgumentCount&&!tJ(e)&&e.parameters.lengthzm(e.declaration)&&!!Kc(e.declaration))?(So(e,Ca.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Gs(i)),UI(e)):xO(e,a,t,n,r)}(e,t,n);case 214:return NO(e,t,n);case 215:return function(e,t,n){const r=zL(e.tag),i=wp(r);if(Pc(i))return UI(e);const o=uf(i,0),a=uf(i,1).length;if(wO(r,i,o.length,a))return qI(e);if(!o.length){if(tP(e.parent)){const t=Vp(e.tag,Ca.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);return io.add(t),UI(e)}return FO(e.tag,i,0),UI(e)}return xO(e,o,t,n,0)}(e,t,n);case 170:return IO(e,t,n);case 286:case 285:return jO(e,t,n);case 226:return function(e,t,n){const r=zL(e.right);if(!Sc(r)){const i=_L(r);if(i){const r=wp(i);if(Pc(r))return UI(e);const o=uf(r,0),a=uf(r,1);if(wO(i,r,o.length,a.length))return qI(e);if(o.length)return xO(e,o,t,n,0)}else if(!DJ(r)&&!IS(r,Hn))return So(e.right,Ca.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method),UI(e)}return ti}(e,t,n)}Tn.assertNever(e,"Branch in 'resolveSignature' should be unreachable.")}function MO(e,t,n){const r=Ho(e),i=r.resolvedSignature;if(i&&i!==ri&&!t)return i;const o=Oi;i||(Oi=Fi.length),r.resolvedSignature=ri;let a=LO(e,t,n||0);return Oi=o,a!==ri&&(r.resolvedSignature!==ri&&(a=r.resolvedSignature),r.resolvedSignature=mi===gi?a:i),a}function RO(e){var t;if(!e||!zm(e))return!1;const n=nE(e)||_P(e)?e:(eE(e)||HE(e))&&e.initializer&&_P(e.initializer)?e.initializer:void 0;if(n){if(Kc(e))return!0;if(HE(dh(n.parent)))return!1;const r=rs(n);return!!(null==(t=null==r?void 0:r.members)?void 0:t.size)}return!1}function BO(e,t){var n,r;if(t){const i=$o(t);if(!i.inferredClassSymbol||!i.inferredClassSymbol.has(GB(e))){const o=sd(e)?e:Lo(e);return o.exports=o.exports||ad(),o.members=o.members||ad(),o.flags|=32&t.flags,(null==(n=t.exports)?void 0:n.size)&&Uo(o.exports,t.exports),(null==(r=t.members)?void 0:r.size)&&Uo(o.members,t.members),(i.inferredClassSymbol||(i.inferredClassSymbol=new Map)).set(GB(o),o),o}return i.inferredClassSymbol.get(GB(e))}}function JO(e,t){if(!e.parent)return;let n,r;if(eE(e.parent)&&e.parent.initializer===e){if(!(zm(e)||Yz(e.parent)&&g_(e)))return;n=e.parent.name,r=e.parent}else if(yP(e.parent)){const i=e.parent,o=e.parent.operatorToken.kind;if(64!==o||!t&&i.right!==e){if(!(57!==o&&61!==o||(eE(i.parent)&&i.parent.initializer===i?(n=i.parent.name,r=i.parent):yP(i.parent)&&64===i.parent.operatorToken.kind&&(t||i.parent.right===i)&&(n=i.parent.left,r=n),n&&yg(n)&&sg(n,i.left))))return}else n=i.left,r=n}else t&&nE(e)&&(n=e.name,r=e);return r&&n&&(t||ig(e,Eb(n)))?is(r):void 0}function zO(e,t){var n,r,i,o;if(!(128&e.flags)&&(e.declaration&&536870912&e.declaration.flags)){const a=qO(t),s=Pb(xm(t));n=a,r=e.declaration,i=s,o=Ks(e),wo(r,i?Vp(n,Ca.The_signature_0_of_1_is_deprecated,o,i):Vp(n,Ca._0_is_deprecated,o))}}function qO(e){switch((e=mh(e)).kind){case 213:case 170:case 214:return qO(e.expression);case 215:return qO(e.tag);case 286:case 285:return qO(e.tagName);case 212:return e.argumentExpression;case 211:return e.name;case 183:const t=e;return dD(t.typeName)?t.typeName.right:t;default:return e}}function UO(e){if(!oP(e))return!1;let t=e.expression;if(rP(t)&&"for"===t.name.escapedText&&(t=t.expression),!QN(t)||"Symbol"!==t.escapedText)return!1;const n=by(!1);return!!n&&n===Le(t,"Symbol",111551,void 0,!1)}function VO(e){if(function(e){if(k.verbatimModuleSyntax&&1===A)return Uz(e,Ca.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(5===A)return Uz(e,Ca.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);if(e.typeArguments)return Uz(e,Ca.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);const t=e.arguments;if(99!==A&&199!==A&&100!==A&&(vz(t),t.length>1)){return Uz(t[1],Ca.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext)}if(0===t.length||t.length>2)return Uz(e,Ca.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);const n=C(t,SP);if(n)return Uz(n,Ca.Argument_of_dynamic_import_cannot_be_spread_element)}(e),0===e.arguments.length)return Jj(e,St);const t=e.arguments[0],n=SL(t),r=e.arguments.length>1?SL(e.arguments[1]):void 0;for(let t=2;t!!e.typeParameters&&QI(e,n)),e=>{const t=_O(e,n,!0);return t?Dm(e,t,zm(e.declaration)):e})}}function nj(e,t,n){const r=zL(e,n),i=Mx(t);if(Pc(i))return i;return YS(r,i,xc(t.parent,e=>238===e.kind||350===e.kind),e,Ca.Type_0_does_not_satisfy_the_expected_type_1),r}function rj(e){return function(e){const t=e.name.escapedText;switch(e.keywordToken){case 105:if("target"!==t)return Uz(e.name,Ca._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Cc(e.name.escapedText),Va(e.keywordToken),"target");break;case 102:if("meta"!==t)Uz(e.name,Ca._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Cc(e.name.escapedText),Va(e.keywordToken),"meta")}}(e),105===e.keywordToken?oj(e):102===e.keywordToken?function(e){100===A||199===A?99!==Dd(e).impliedNodeFormat&&So(e,Ca.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output):A<6&&4!==A&&So(e,Ca.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext);const t=Dd(e);return Tn.assert(!!(8388608&t.flags),"Containing file is missing import meta node flag."),"meta"===e.name.escapedText?gy():wt}(e):Tn.assertNever(e.keywordToken)}function ij(e){switch(e.keywordToken){case 102:return hy();case 105:const t=oj(e);return Pc(t)?wt:function(e){const t=Eo(0,"NewTargetExpression"),n=Eo(4,"target",8);n.parent=t,n.links.type=e;const r=ad([n]);return t.members=r,Cs(t,r,p,p,p)}(t);default:Tn.assertNever(e.keywordToken)}}function oj(e){const t=dm(e);if(t){if(176===t.kind){return Kl(rs(t.parent))}return Kl(rs(t))}return So(e,Ca.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),wt}function aj(e){const t=e.valueDeclaration;return Xc(Kl(e),!1,!!t&&(qu(t)||dC(t)))}function sj(e,t,n="arg"){return e?(Tn.assert(QN(e.name)),e.name.escapedText):`${n}_${t}`}function cj(e,t,n){const r=e.parameters.length-(tJ(e)?1:0);if(t=r-1)return t===r-1?o:jy(Hb(o,zt));const a=[],s=[],c=[];for(let n=t;n!(1&e)),i=r<0?n.target.fixedLength:r;i>0&&(t=e.parameters.length-1+i)}}if(void 0===t){if(!n&&32&e.flags)return 0;t=e.minArgumentCount}if(r)return t;for(let n=t-1;n>=0;n--){if(131072&qN(dj(e,n),$I).flags)break;t=n}e.resolvedMinArgumentCount=t}return e.resolvedMinArgumentCount}function yj(e){if(tJ(e)){const t=Kl(e.parameters[e.parameters.length-1]);return!$T(t)||t.target.hasRestElement}return!1}function vj(e){if(tJ(e)){const t=Kl(e.parameters[e.parameters.length-1]);if(!$T(t))return Sc(t)?rr:t;if(t.target.hasRestElement)return Yy(t,t.target.fixedLength)}}function bj(e){const t=vj(e);return!t||rT(t)||Sc(t)?void 0:t}function xj(e){return Sj(e,Zt)}function Sj(e,t){return e.parameters.length>0?dj(e,0):t}function kj(e,t,n){const r=e.parameters.length-(tJ(e)?1:0);for(let i=0;i=0);const i=SD(e.parent)?Kl(rs(e.parent.parent)):CJ(e.parent),o=SD(e.parent)?At:wJ(e.parent),a=Nx(r),s=Fo("target",i),c=Fo("propertyKey",o),l=Fo("parameterIndex",a);n.decoratorSignature=TM(void 0,void 0,[s,c,l],Yt);break}case 174:case 177:case 178:case 172:{const e=t;if(!S_(e.parent))break;const r=Fo("target",CJ(e)),i=Fo("propertyKey",wJ(e)),o=yD(e)?Yt:Iy(SJ(e));if(!yD(t)||Qv(t)){const t=Fo("descriptor",Iy(SJ(e)));n.decoratorSignature=TM(void 0,void 0,[r,i,t],dv([o,Yt]))}else n.decoratorSignature=TM(void 0,void 0,[r,i],dv([o,Yt]));break}}return n.decoratorSignature===ti?void 0:n.decoratorSignature}(e):Lj(e)}function Rj(e){const t=Sy(!0);return t!==An?qg(t,[e=SM(yM(e))||Ft]):Ft}function Bj(e){const t=ky(!0);return t!==An?qg(t,[e=SM(yM(e))||Ft]):Ft}function Jj(e,t){const n=Rj(t);return n===Ft?(So(e,gf(e)?Ca.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:Ca.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),wt):(Ty(!0)||So(e,gf(e)?Ca.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:Ca.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),n)}function zj(e,t){if(!e.body)return wt;const n=$h(e),r=!!(2&n),i=!!(1&n);let o,a,s,c=Yt;if(241!==e.body.kind)o=SL(e.body,t&&-9&t),r&&(o=yM(mM(o,!1,e,Ca.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)));else if(i){const n=Hj(e,t);n?n.length>0&&(o=dv(n,2)):c=Zt;const{yieldTypes:r,nextTypes:i}=function(e,t){const n=[],r=[],i=!!(2&$h(e));return Lf(e.body,e=>{const o=e.expression?zL(e.expression,t):Ot;let a;if(he(n,Uj(e,o,St,i)),e.asteriskToken){const t=kR(o,i?19:17,e.expression);a=t&&t.nextType}else a=UF(e,void 0);a&&he(r,a)}),{yieldTypes:n,nextTypes:r}}(e,t);a=ee(r)?dv(r,2):void 0,s=ee(i)?Nv(i):void 0}else{const r=Hj(e,t);if(!r)return 2&n?Jj(e,Zt):Zt;if(0===r.length){const t=hF(e,void 0),r=t&&32768&(WR(t,n)||Yt).flags?At:Yt;return 2&n?Jj(e,r):r}o=dv(r,2)}if(o||a||s){if(a&&nw(e,a,3),o&&nw(e,o,1),s&&nw(e,s,2),o&&xT(o)||a&&xT(a)||s&&xT(s)){const t=eA(e),n=t?t===$f(e)?i?void 0:o:zF(mm(t),e,void 0):void 0;i?(a=WT(a,n,0,r),o=WT(o,n,1,r),s=WT(s,n,2,r)):o=function(e,t,n){e&&xT(e)&&(e=VT(e,t?n?fM(t):t:void 0));return e}(o,n,r)}a&&(a=YC(a)),o&&(o=YC(o)),s&&(s=YC(s))}return i?qj(a||Zt,o||c,s||pF(2,e)||Ft,r):r?Rj(o||c):o||c}function qj(e,t,n,r){const i=r?ui:di,o=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||Ft,t=i.resolveIterationType(t,void 0)||Ft,n=i.resolveIterationType(n,void 0)||Ft,o===An){const r=i.getGlobalIterableIteratorType(!1),o=r!==An?NR(r,i):void 0,a=o?o.returnType:St,s=o?o.nextType:At;return zS(t,a)&&zS(s,n)?r!==An?Ay(r,[e]):(i.getGlobalIterableIteratorType(!0),wn):(i.getGlobalGeneratorType(!0),wn)}return Ay(o,[e,t,n])}function Uj(e,t,n,r){const i=e.expression||e,o=e.asteriskToken?gR(r?19:17,t,n,i):t;return r?xM(o,i,e.asteriskToken?Ca.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:Ca.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function Vj(e,t,n){let r=0;for(let i=0;i=t?n[i]:void 0;r|=void 0!==o?zB.get(o)||32768:0}return r}function Wj(e){const t=Ho(e);if(void 0===t.isExhaustive){t.isExhaustive=0;const n=function(e){if(221===e.expression.kind){const t=MN(e);if(!t)return!1;const n=sp(SL(e.expression.expression)),r=Vj(0,0,t);return 3&n.flags?!(556800&~r):!JN(n,e=>fN(e,r)===r)}const t=SL(e.expression);if(!FT(t))return!1;const n=LN(e);if(!n.length||ee(n,bT))return!1;return r=WN(t,vx),i=n,1048576&r.flags?!h(r.types,e=>!E(i,e)):E(i,r);var r,i}(e);0===t.isExhaustive&&(t.isExhaustive=n)}else 0===t.isExhaustive&&(t.isExhaustive=!1);return t.isExhaustive}function $j(e){return e.endFlowNode&&uD(e.endFlowNode)}function Hj(e,t){const n=$h(e),r=[];let i=$j(e),o=!1;if(jf(e.body,a=>{let s=a.expression;if(s){if(s=mh(s,!0),2&n&&223===s.kind&&(s=mh(s.expression,!0)),213===s.kind&&80===s.expression.kind&&SL(s.expression).symbol===ts(e.symbol)&&(!ZT(e.symbol.valueDeclaration)||JD(s.expression)))return void(o=!0);let i=SL(s,t&&-9&t);2&n&&(i=yM(mM(i,!1,e,Ca.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member))),131072&i.flags&&(o=!0),he(r,i)}else i=!0}),0!==r.length||i||!o&&!function(e){switch(e.kind){case 218:case 219:return!0;case 174:return 210===e.parent.kind;default:return!1}}(e))return!(V&&r.length&&i)||RO(e)&&r.some(t=>t.symbol===e.symbol)||he(r,At),r}function Kj(e,t){return void a(function(){const n=$h(e),r=t&&WR(t,n);if(r&&(oL(r,16384)||32769&r.flags))return;if(173===e.kind||Ld(e.body)||241!==e.body.kind||!$j(e))return;const i=1024&e.flags,o=Fv(e)||e;if(r&&131072&r.flags)So(o,Ca.A_function_returning_never_cannot_have_a_reachable_end_point);else if(r&&!i)So(o,Ca.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);else if(r&&V&&!zS(At,r))So(o,Ca.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(k.noImplicitReturns){if(!r){if(!i)return;const t=mm($f(e));if(HR(e,t))return}So(o,Ca.Not_all_code_paths_return_a_value)}})}function Gj(e,t){if(Tn.assert(174!==e.kind||Kf(e)),QB(e),_P(e)&&nR(e,e.name),t&&4&t&&CS(e)){if(!Fv(e)&&!XT(e)){const n=tA(e);if(n&&mw(mm(n))){const n=Ho(e);if(n.contextFreeType)return n.contextFreeType;const r=zj(e,t),i=Nu(void 0,void 0,void 0,p,r,void 0,0,64),o=Cs(e.symbol,x,[i],p,p);return o.objectFlags|=262144,n.contextFreeType=o}}return In}return Sz(e)||218!==e.kind||Nz(e),function(e,t){const n=Ho(e);if(!(64&n.flags)){const r=tA(e);if(!(64&n.flags)){n.flags|=64;const i=Ce(uf(Kl(rs(e)),0));if(!i)return;if(CS(e))if(r){const n=GF(e);let o;if(t&&2&t){kj(i,r,n);const e=vj(r);e&&262144&e.flags&&(o=iS(r,n.nonFixingMapper))}o||(o=n?iS(r,n.mapper):r),function(e,t){if(t.typeParameters){if(e.typeParameters)return;e.typeParameters=t.typeParameters}if(t.thisParameter){const n=e.thisParameter;(!n||n.valueDeclaration&&!n.valueDeclaration.type)&&(n||(e.thisParameter=WC(t.thisParameter,void 0)),Tj(e.thisParameter,Kl(t.thisParameter)))}const n=e.parameters.length-(tJ(e)?1:0);for(let r=0;re.parameters.length){const n=GF(e);t&&2&t&&kj(i,r,n)}if(r&&!km(e)&&!i.resolvedReturnType){const n=zj(e,t);i.resolvedReturnType||(i.resolvedReturnType=n)}WL(e)}}}(e,t),Kl(rs(e))}function Xj(e,t,n,r=!1){if(!zS(t,un)){const i=r&&pM(t);return Co(e,!!i&&zS(i,un),n),!1}return!0}function Qj(e){if(!oP(e))return!1;if(!pg(e))return!1;const t=SL(e.arguments[2]);if(yc(t,"value")){const e=Zp(t,"writable"),n=e&&Kl(e);if(!n||n===Ut||n===Vt)return!0;if(e&&e.valueDeclaration&&HE(e.valueDeclaration)){const t=zL(e.valueDeclaration.initializer);if(t===Ut||t===Vt)return!0}return!1}return!Zp(t,"set")}function Yj(e){return!!(8&xx(e)||4&e.flags&&8&Sx(e)||3&e.flags&&6&$A(e)||98304&e.flags&&!(65536&e.flags)||8&e.flags||ee(e.declarations,Qj))}function Zj(e,t,n){var r,i;if(0===n)return!1;if(Yj(t)){if(4&t.flags&&qx(e)&&110===e.expression.kind){const n=rm(e);if(!n||176!==n.kind&&!RO(n))return!0;if(t.valueDeclaration){const e=yP(t.valueDeclaration),o=n.parent===t.valueDeclaration.parent,a=n===t.valueDeclaration.parent,s=e&&(null==(r=t.parent)?void 0:r.valueDeclaration)===n.parent,c=e&&(null==(i=t.parent)?void 0:i.valueDeclaration)===n;return!(o||a||s||c)}}return!0}if(qx(e)){const t=mh(e.expression);if(80===t.kind){const e=Ho(t).resolvedSymbol;if(2097152&e.flags){const t=ca(e);return!!t&&274===t.kind}}}return!1}function eL(e,t,n){const r=hA(e,7);return 80===r.kind||qx(r)?!(64&r.flags)||(So(e,n),!1):(So(e,t),!1)}function tL(e){zL(e.expression);const t=mh(e.expression);if(!qx(t))return So(t,Ca.The_operand_of_a_delete_operator_must_be_a_property_reference),Gt;rP(t)&&YN(t.name)&&So(t,Ca.The_operand_of_a_delete_operator_cannot_be_a_private_identifier);const n=ps(Ho(t).resolvedSymbol);return n&&(Yj(n)?So(t,Ca.The_operand_of_a_delete_operator_cannot_be_a_read_only_property):function(e,t){const n=Kl(t);!V||131075&n.flags||(te?16777216&t.flags:mN(n,16777216))||So(e,Ca.The_operand_of_a_delete_operator_must_be_optional)}(t,n)),Gt}function nL(e){let t=!1;const n=sm(e);if(n&&xD(n)){So(e,mP(e)?Ca.await_expression_cannot_be_used_inside_a_class_static_block:Ca.await_using_statements_cannot_be_used_inside_a_class_static_block),t=!0}else if(!(65536&e.flags))if(um(e)){const n=Dd(e);if(!Jz(n)){let r;if(!kp(n,k)){r??(r=tf(n,e.pos));const i=mP(e)?Ca.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:Ca.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module,o=fS(n,r.start,r.length,i);io.add(o),t=!0}switch(A){case 100:case 199:if(1===n.impliedNodeFormat){r??(r=tf(n,e.pos)),io.add(fS(n,r.start,r.length,Ca.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)),t=!0;break}case 7:case 99:case 200:case 4:if(P>=4)break;default:r??(r=tf(n,e.pos));const i=mP(e)?Ca.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:Ca.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;io.add(fS(n,r.start,r.length,i)),t=!0}}}else{const r=Dd(e);if(!Jz(r)){const i=tf(r,e.pos),o=mP(e)?Ca.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:Ca.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules,a=fS(r,i.start,i.length,o);if(n&&176!==n.kind&&!(2&$h(n))){ST(a,Vp(n,Ca.Did_you_mean_to_mark_this_function_as_async))}io.add(a),t=!0}}return mP(e)&&dF(e)&&(So(e,Ca.await_expressions_cannot_be_used_in_a_parameter_initializer),t=!0),t}function rL(e){return oL(e,2112)?aL(e,3)||oL(e,296)?un:qt:zt}function iL(e,t){if(oL(e,t))return!0;const n=sp(e);return!!n&&oL(n,t)}function oL(e,t){if(e.flags&t)return!0;if(3145728&e.flags){const n=e.types;for(const e of n)if(oL(e,t))return!0}return!1}function aL(e,t,n){return!!(e.flags&t)||!(n&&114691&e.flags)&&(!!(296&t)&&zS(e,zt)||!!(2112&t)&&zS(e,qt)||!!(402653316&t)&&zS(e,Jt)||!!(528&t)&&zS(e,Gt)||!!(16384&t)&&zS(e,Yt)||!!(131072&t)&&zS(e,Zt)||!!(65536&t)&&zS(e,Rt)||!!(32768&t)&&zS(e,At)||!!(4096&t)&&zS(e,Qt)||!!(67108864&t)&&zS(e,on))}function sL(e,t,n){return 1048576&e.flags?T(e.types,e=>sL(e,t,n)):aL(e,t,n)}function cL(e){return!!(16&Ox(e))&&!!e.symbol&&lL(e.symbol)}function lL(e){return!!(128&e.flags)}function _L(e){const t=PR("hasInstance");if(sL(e,67108864)){const n=Zp(e,t);if(n){const e=Kl(n);if(e&&0!==uf(e,0).length)return e}}}function uL(e,t,n,r){if(n===en||r===en)return en;if(YN(e)){if((P<9||P<99||!R)&&mz(e,2097152),!Ho(e).resolvedSymbol&&om(e)){SI(e,r,mI(e,r.symbol,!0))}}else KS(iI(n,e),sn,e);return KS(iI(r,t),on,t)&&JN(r,e=>e===En||!!(2097152&e.flags)&&yk(sp(e)))&&So(t,Ca.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,Gs(r)),Gt}function dL(e,t,n,r,i=!1){const o=e.properties,a=o[n];if(303===a.kind||304===a.kind){const e=a.name,n=Bv(e);if(kC(n)){const e=Zp(t,TC(n));e&&(AI(e,a,i),KA(a,!1,!0,t,e))}const r=Bc(a,Hb(t,n,32,e));return fL(304===a.kind?a:a.initializer,r)}if(305===a.kind){if(!(nYy(e,n)):jy(r),i)}So(o.operatorToken,Ca.A_rest_element_cannot_have_an_initializer)}}}function fL(e,t,n,r){let i;if(304===e.kind){const r=e;r.objectAssignmentInitializer&&(V&&!mN(zL(r.objectAssignmentInitializer),16777216)&&(t=hN(t,524288)),function(e,t,n,r,i){const o=t.kind;if(64===o&&(210===e.kind||209===e.kind))return fL(e,zL(n,r),r,110===n.kind);let a;a=gb(o)?pR(e,r):zL(e,r);const s=zL(n,r);hL(e,t,n,a,s,r,i)}(r.name,r.equalsToken,r.objectAssignmentInitializer,n)),i=e.name}else i=e;return 226===i.kind&&64===i.operatorToken.kind&&(re(i,n),i=i.left,V&&(t=hN(t,524288))),210===i.kind?function(e,t,n){const r=e.properties;if(V&&0===r.length)return iI(t,e);for(let i=0;iaL(t,e)&&aL(n,e)),St}return 65===c&&p(h),h;case 30:case 32:case 33:case 34:return d(c)&&(r=RT(iI(r,e)),i=RT(iI(i,n)),f((e,t)=>{if(Sc(e)||Sc(t))return!0;const n=zS(e,un),r=zS(t,un);return n&&r||!n&&!r&&HS(e,t)})),Gt;case 35:case 36:case 37:case 38:if(!(o&&64&o)){if(($l(e)||$l(n))&&(!zm(e)||37===c||38===c)){const e=35===c||37===c;So(s,Ca.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,e?"false":"true")}!function(e,t,n,r){const i=g(mh(n)),o=g(mh(r));if(i||o){const a=So(e,Ca.This_condition_will_always_return_0,Va(37===t||35===t?97:112));if(i&&o)return;const s=38===t||36===t?Va(54):"",c=i?r:n,l=mh(c);ST(a,Vp(c,Ca.Did_you_mean_0,`${s}Number.isNaN(${Cb(l)?Up(l):"..."})`))}}(s,c,e,n),f((e,t)=>gL(e,t)||gL(t,e))}return Gt;case 104:return function(e,t,n,r,i){if(n===en||r===en)return en;!Sc(n)&&sL(n,402784252)&&So(e,Ca.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),Tn.assert(Ob(e.parent));const o=MO(e.parent,void 0,i);return o===ri?en:(KS(mm(o),Gt,t,Ca.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression),Gt)}(e,n,r,i,o);case 103:return uL(e,n,r,i);case 56:case 77:{const e=mN(r,4194304)?dv([(_=V?r:MT(i),WN(_,xC)),i]):r;return 77===c&&p(i),e}case 57:case 76:{const e=mN(r,8388608)?dv([jC(vC(r)),i],2):r;return 76===c&&p(i),e}case 61:case 78:{const e=mN(r,262144)?dv([jC(r),i],2):r;return 78===c&&p(i),e}case 64:const y=yP(e.parent)?dg(e.parent):0;return function(e,t){if(2===e)for(const e of Vd(t)){const t=Kl(e);if(t.symbol&&32&t.symbol.flags){const t=e.escapedName,n=Le(e.valueDeclaration,t,788968,void 0,!1);(null==n?void 0:n.declarations)&&n.declarations.some(OF)&&(zo(n,Ca.Duplicate_identifier_0,Cc(t),e),zo(e,Ca.Duplicate_identifier_0,Cc(t),n))}}}(y,i),function(t){var r;switch(t){case 2:return!0;case 1:case 5:case 6:case 3:case 4:const t=is(e),i=rg(n);return!!i&&nP(i)&&!!(null==(r=null==t?void 0:t.exports)?void 0:r.size);default:return!1}}(y)?(524288&i.flags&&(2===y||6===y||hk(i)||pN(i)||1&Ox(i))||p(i),r):(p(i),i);case 28:if(!k.allowUnreachableCode&&mL(e)&&!(217===(l=e.parent).parent.kind&&AN(l.left)&&"0"===l.left.text&&(oP(l.parent.parent)&&l.parent.parent.expression===l.parent||215===l.parent.parent.kind)&&(qx(l.right)||QN(l.right)&&"eval"===l.right.escapedText))){const t=Dd(e),n=ds(t.text,e.pos);t.parseDiagnostics.some(e=>e.code===Ca.JSX_expressions_must_have_one_parent_element.code&&Ws(e,n))||So(e,Ca.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return i;default:return Tn.fail()}var l,_;function u(e,t){return aL(e,2112)&&aL(t,2112)}function d(t){const o=iL(r,12288)?e:iL(i,12288)?n:void 0;return!o||(So(o,Ca.The_0_operator_cannot_be_applied_to_type_symbol,Va(t)),!1)}function p(i){yb(c)&&a(function(){let o=r;ZJ(t.kind)&&211===e.kind&&(o=aI(e,void 0,!0));if(eL(e,Ca.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,Ca.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)){let t;if(te&&rP(e)&&oL(i,32768)){const n=yc(RL(e.expression),e.name.escapedText);Fk(i,n)&&(t=Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target)}YS(i,o,e,n,t)}})}function f(e){return!e(r,i)&&(m(e),!0)}function m(e){let n=!1;const o=s||t;if(e){const t=SM(r),o=SM(i);n=!(t===r&&o===i)&&!(!t||!o)&&e(t,o)}let a=r,c=i;!n&&e&&([a,c]=function(e,t,n){let r=e,i=t;const o=MT(e),a=MT(t);n(o,a)||(r=o,i=a);return[r,i]}(r,i,e));const[l,_]=Xs(a,c);(function(e,n,r,i){switch(t.kind){case 37:case 35:case 38:case 36:return Co(e,n,Ca.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,r,i);default:return}})(o,n,l,_)||Co(o,n,Ca.Operator_0_cannot_be_applied_to_types_1_and_2,Va(t.kind),l,_)}function g(e){if(QN(e)&&"NaN"===e.escapedText){const t=Br||(Br=oy("NaN",!1));return!!t&&t===Xw(e)}return!1}}function yL(e){const t=e.parent;return lP(t)&&yL(t)||iP(t)&&t.argumentExpression===e}function vL(e){const t=[e.head.text],n=[];for(const r of e.templateSpans){const e=zL(r.expression);iL(e,12288)&&So(r.expression,Ca.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String),t.push(r.literal.text),n.push(zS(e,dn)?e:Jt)}const r=215!==e.parent.kind&&le(e).value;return r?yx(kx(r)):NL(e)||yL(e)||JN(UF(e,void 0)||Ft,bL)?ab(t,n):Jt}function bL(e){return!!(134217856&e.flags||58982400&e.flags&&oL(op(e)||Ft,402653316))}function xL(e,t,n,r){const i=function(e){return BE(e)&&!AE(e.parent)?e.parent.parent:e}(e);WF(i,t,!1),function(e,t){Ti[wi]=e,Ci[wi]=t,wi++}(i,n);const o=zL(e,1|r|(n?2:0));n&&n.intraExpressionInferenceSites&&(n.intraExpressionInferenceSites=void 0);const a=oL(o,2944)&&wL(o,zF(t,e,void 0))?vx(o):o;return wi--,$F(),a}function SL(e,t){if(t)return zL(e,t);const n=Ho(e);if(!n.resolvedType){const r=mi,i=Qr;mi=gi,Qr=void 0,n.resolvedType=zL(e,t),Qr=i,mi=r}return n.resolvedType}function kL(e){return 216===(e=mh(e,!0)).kind||234===e.kind||fA(e)}function TL(e,t,n){const r=tg(e);if(zm(e)){const n=gC(e);if(n)return nj(r,n,t)}const i=BL(r)||(n?xL(r,n,void 0,t||0):SL(r,t));return mD(e)&&207===e.name.kind&&$T(i)&&!i.target.hasRestElement&&nh(i)wL(e,t))}if(58982400&t.flags){const n=op(t)||Ft;return oL(n,4)&&oL(e,128)||oL(n,8)&&oL(e,256)||oL(n,64)&&oL(e,2048)||oL(n,4096)&&oL(e,8192)||wL(e,n)}return!!(406847616&t.flags&&oL(e,128)||256&t.flags&&oL(e,256)||2048&t.flags&&oL(e,2048)||512&t.flags&&oL(e,512)||8192&t.flags&&oL(e,8192))}return!1}function NL(e){const t=e.parent;return ru(t)&&Il(t.type)||fA(t)&&Il(mA(t))||XO(e)&&Xd(UF(e,0))||(lP(t)||tP(t)||SP(t))&&NL(t)||(HE(t)||KE(t)||IP(t))&&NL(t.parent)}function DL(e,t,n){const r=zL(e,t,n);return NL(e)||qf(e)?vx(r):kL(e)?r:VT(r,zF(UF(e,void 0),e,void 0))}function PL(e,t){return 167===e.name.kind&&sA(e.name),DL(e.initializer,t)}function EL(e,t){Iz(e),167===e.name.kind&&sA(e.name);return FL(e,Gj(e,t),t)}function FL(e,t,n){if(n&&10&n){const r=rO(t,0,!0),i=rO(t,1,!0),o=r||i;if(o&&o.typeParameters){const t=BF(e,2);if(t){const i=rO(jC(t),r?0:1,!1);if(i&&!i.typeParameters){if(8&n)return AL(e,n),In;const t=GF(e),r=t.signature&&mm(t.signature),a=r&&nO(r);if(a&&!a.typeParameters&&!T(t.inferences,IL)){const e=function(e,t){const n=[];let r,i;for(const o of t){const t=o.symbol.escapedName;if(jL(e.inferredTypeParameters,t)||jL(n,t)){const a=bs(Eo(262144,LL(ne(e.inferredTypeParameters,n),t)));a.target=o,r=pe(r,o),i=pe(i,a),n.push(a)}else n.push(o)}if(i){const e=$x(r,i);for(const t of i)t.mapper=e}return n}(t,o.typeParameters),n=Rm(o,e),r=M(t.inferences,e=>uw(e.typeParameter));if(rw(n,i,(e,t)=>{Lw(r,e,t,0,!0)}),ee(r,IL)&&(iw(n,i,(e,t)=>{Lw(r,e,t)}),!function(e,t){for(let n=0;ne&&M(e.inferences,e=>e.typeParameter)).slice())}}}}return t}function AL(e,t){if(2&t){GF(e).flags|=4}}function IL(e){return!(!e.candidates&&!e.contraCandidates)}function OL(e){return!!(e.candidates||e.contraCandidates||gp(e.typeParameter))}function jL(e,t){return ee(e,e=>e.symbol.escapedName===t)}function LL(e,t){let n=t.length;for(;n>1&&t.charCodeAt(n-1)>=48&&t.charCodeAt(n-1)<=57;)n--;const r=t.slice(0,n);for(let t=1;;t++){const n=r+t;if(!jL(e,n))return n}}function ML(e){const t=eO(e);if(t&&!t.typeParameters)return mm(t)}function RL(e){const t=BL(e);if(t)return t;if(268435456&e.flags&&Qr){const t=Qr[KB(e)];if(t)return t}const n=vi,r=zL(e,64);if(vi!==n){(Qr||(Qr=[]))[KB(e)]=r,zT(e,268435456|e.flags)}return r}function BL(e){let t=mh(e,!0);if(fA(t)){const e=mA(t);if(!Il(e))return Mx(e)}if(t=mh(e),mP(t)){const e=BL(t.expression);return e?xM(e):void 0}return!oP(t)||108===t.expression.kind||$m(t,!0)||UO(t)?ru(t)&&!Il(t.type)?Mx(t.type):Wl(e)||h_(e)?zL(e):void 0:Nl(t)?function(e){const t=zL(e.expression),n=JC(t,e.expression),r=ML(t);return r&&BC(r,e,n!==t)}(t):ML(QA(t.expression))}function JL(e){const t=Ho(e);if(t.contextFreeType)return t.contextFreeType;WF(e,St,!1);const n=t.contextFreeType=zL(e,4);return $F(),n}function zL(n,i,o){var s,c;null==(s=cr)||s.push(cr.Phase.Check,"checkExpression",{kind:n.kind,pos:n.pos,end:n.end,path:n.tracingPath});const l=r;r=n,f=0;const _=function(e,n,r){const i=e.kind;if(t)switch(i){case 231:case 218:case 219:t.throwIfCancellationRequested()}switch(i){case 80:return gE(e,n);case 81:return _I(e);case 110:return OE(e);case 108:return ME(e);case 106:return Bt;case 15:case 11:return Nw(e)?Ct:yx(kx(e.text));case 9:return $z(e),yx(Nx(+e.text));case 10:return function(e){const t=KD(e.parent)||gP(e.parent)&&KD(e.parent.parent);if(!t&&P<7&&Uz(e,Ca.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020))return!0}(e),yx(Dx({negative:!1,base10Value:PT(e.text)}));case 112:return Wt;case 97:return Ut;case 228:return vL(e);case 14:return nA(e);case 209:return iA(e,n,r);case 210:return gA(e,n);case 211:return aI(e,n);case 166:return sI(e,n);case 212:return BI(e,n);case 213:if(102===e.expression.kind)return VO(e);case 214:return function(e,t){var n,r,i;kz(e,e.typeArguments);const o=MO(e,void 0,t);if(o===ri)return en;if(zO(o,e),108===e.expression.kind)return Yt;if(214===e.kind){const t=o.declaration;if(t&&176!==t.kind&&180!==t.kind&&185!==t.kind&&(!mF(t)||176!==(null==(r=null==(n=eh(t))?void 0:n.parent)?void 0:r.kind))&&!Lg(t)&&!RO(t))return Q&&So(e,Ca.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),St}if(zm(e)&&KO(e))return em(e.arguments[0]);const a=mm(o);if(12288&a.flags&&UO(e))return Ex(dh(e.parent));if(213===e.kind&&!e.questionDotToken&&244===e.parent.kind&&16384&a.flags&&nm(o))if(Nb(e.expression)){if(!cD(e)){const t=So(e.expression,Ca.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation);sD(e.expression,t)}}else So(e.expression,Ca.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);if(zm(e)){const t=JO(e,!1);if(null==(i=null==t?void 0:t.exports)?void 0:i.size){const e=Cs(t,t.exports,p,p,p);return e.objectFlags|=4096,Nv([a,e])}}return a}(e,n);case 215:return GO(e);case 217:return function(e,t){if(Ju(e)){if(fC(e))return nj(e.expression,mC(e),t);if(fA(e))return QO(e,t)}return zL(e.expression,t)}(e,n);case 231:return function(e){return oB(e),QB(e),function(e){if(e.name)return;const t=yA(e);if(!ly(t))return;let n;n=!j&&P<99&&wm(!1,e)?Ce(Mc(e))??e:iB(e);n&&(mz(n,4194304),(HE(t)||yD(t)||eP(t))&&pD(t.name)&&mz(n,8388608))}(e),Kl(rs(e))}(e);case 218:case 219:return Gj(e,n);case 221:return function(e){return zL(e.expression),ao}(e);case 216:case 234:return function(e,t){if(216===e.kind){const t=Dd(e);t&&Bo(t.fileName,[".cts",".mts"])&&Uz(e,Ca.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead)}return QO(e,t)}(e,n);case 235:return ZO(e);case 233:return ej(e);case 238:return function(e){return JB(e.type),nj(e.expression,e.type)}(e);case 236:return rj(e);case 220:return tL(e);case 222:return function(e){return QB(e),Ot}(e);case 223:return function(e){a(()=>nL(e));const t=zL(e.expression),n=mM(t,!0,e,Ca.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return n!==t||Pc(n)||3&t.flags||ko(!1,Vp(e,Ca.await_has_no_effect_on_the_type_of_this_expression)),n}(e);case 224:return function(e){const t=zL(e.operand);if(t===en)return en;switch(e.operand.kind){case 9:switch(e.operator){case 41:return yx(Nx(-e.operand.text));case 40:return yx(Nx(+e.operand.text))}break;case 10:if(41===e.operator)return yx(Dx({negative:!0,base10Value:PT(e.operand.text)}))}switch(e.operator){case 40:case 41:case 55:return iI(t,e.operand),iL(t,12288)&&So(e.operand,Ca.The_0_operator_cannot_be_applied_to_type_symbol,Va(e.operator)),40===e.operator?(iL(t,2112)&&So(e.operand,Ca.Operator_0_cannot_be_applied_to_type_1,Va(e.operator),Gs(MT(t))),zt):rL(t);case 54:dR(t,e.operand);const n=fN(t,12582912);return 4194304===n?Ut:8388608===n?Wt:Gt;case 46:case 47:return Xj(e.operand,iI(t,e.operand),Ca.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&eL(e.operand,Ca.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,Ca.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),rL(t)}return wt}(e);case 225:return function(e){const t=zL(e.operand);return t===en?en:(Xj(e.operand,iI(t,e.operand),Ca.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&eL(e.operand,Ca.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,Ca.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),rL(t))}(e);case 226:return re(e,n);case 227:return function(e,t){const n=pR(e.condition,t);return uR(e.condition,n,e.whenTrue),dv([zL(e.whenTrue,t),zL(e.whenFalse,t)],2)}(e,n);case 230:return function(e,t){return P<2&&mz(e,k.downlevelIteration?1536:1024),gR(33,zL(e.expression,t),At,e.expression)}(e,n);case 232:return Ot;case 229:return function(e){a(function(){16384&e.flags||zz(e,Ca.A_yield_expression_is_only_allowed_in_a_generator_body),dF(e)&&So(e,Ca.yield_expressions_cannot_be_used_in_a_parameter_initializer)});const t=rm(e);if(!t)return St;const n=$h(t);if(!(1&n))return St;const r=!!(2&n);e.asteriskToken&&(r&&P<5&&mz(e,26624),!r&&P<2&&k.downlevelIteration&&mz(e,256));let i=km(t);i&&1048576&i.flags&&(i=qN(i,e=>$L(e,n,void 0)));const o=i&&UR(i,r),s=o&&o.yieldType||St,c=o&&o.nextType||St,l=r?xM(c)||St:c,_=e.expression?zL(e.expression):Ot,u=Uj(e,_,l,r);if(i&&u&&YS(u,s,e.expression||e,e.expression),e.asteriskToken)return yR(r?19:17,1,_,e.expression)||St;if(i)return zR(2,i,r)||St;let d=pF(2,t);return d||(d=St,a(()=>{if(Q&&!HT(e)){const t=UF(e,void 0);t&&!Sc(t)||So(e,Ca.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation)}})),d}(e);case 237:return function(e){return e.isSpread?Hb(e.type,zt):e.type}(e);case 294:return WA(e,n);case 284:case 285:return function(e){return QB(e),LA(e)||St}(e);case 288:return function(e){qA(e.openingFragment);const t=Dd(e);return!ck(k)||!k.jsxFactory&&!t.pragmas.has("jsx")||k.jsxFragmentFactory||t.pragmas.has("jsxfrag")||So(e,k.jsxFactory?Ca.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:Ca.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments),kA(e),LA(e)||St}(e);case 292:return CA(e,n);case 286:Tn.fail("Shouldn't ever directly check a JsxOpeningElement")}return wt}(n,i,o),u=FL(n,_,i);return cL(u)&&function(t,n){const r=211===t.parent.kind&&t.parent.expression===t||212===t.parent.kind&&t.parent.expression===t||(80===t.kind||166===t.kind)&&hJ(t)||186===t.parent.kind&&t.parent.exprName===t||281===t.parent.kind;r||So(t,Ca.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);if(RS(k)){Tn.assert(!!(128&n.symbol.flags));const r=n.symbol.valueDeclaration,i=e.getRedirectReferenceForResolutionFromSourceOfProject(Dd(r).resolvedPath);!(33554432&r.flags)||OT(t)||i&&WS(i.commandLine.options)||So(t,Ca.Cannot_access_ambient_const_enums_when_0_is_enabled,Te)}}(n,u),r=l,null==(c=cr)||c.pop(),u}function qL(e){hz(e),e.expression&&zz(e.expression,Ca.Type_expected),JB(e.constraint),JB(e.default);const t=q_(rs(e));op(t),function(e){return _p(e)!==jn}(t)||So(e.default,Ca.Type_parameter_0_has_a_circular_default,Gs(t));const n=Gd(t),r=mp(t);n&&r&&KS(r,Tu(hS(n,Kx(t,r)),r),e.default,Ca.Type_0_does_not_satisfy_the_constraint_1),QB(e),a(()=>ZR(e.name,Ca.Type_parameter_name_cannot_be_0))}function UL(e){hz(e),iR(e);const t=rm(e);Wv(e,31)&&(176===t.kind&&Md(t.body)||So(e,Ca.A_parameter_property_is_only_allowed_in_a_constructor_implementation),176===t.kind&&QN(e.name)&&"constructor"===e.name.escapedText&&So(e.name,Ca.constructor_cannot_be_used_as_a_parameter_property_name)),!e.initializer&&dC(e)&&O_(e.name)&&t.body&&So(e,Ca.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),e.name&&QN(e.name)&&("this"===e.name.escapedText||"new"===e.name.escapedText)&&(0!==t.parameters.indexOf(e)&&So(e,Ca.A_0_parameter_must_be_the_first_parameter,e.name.escapedText),176!==t.kind&&180!==t.kind&&185!==t.kind||So(e,Ca.A_constructor_cannot_have_a_this_parameter),219===t.kind&&So(e,Ca.An_arrow_function_cannot_have_a_this_parameter),177!==t.kind&&178!==t.kind||So(e,Ca.get_and_set_accessors_cannot_declare_this_parameters)),!e.dotDotDotToken||O_(e.name)||zS(Fp(Kl(e.symbol)),or)||So(e,Ca.A_rest_parameter_must_be_of_an_array_type)}function VL(e,t,n){for(const r of e.elements){if(TP(r))continue;const e=r.name;if(80===e.kind&&e.escapedText===n)return So(t,Ca.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,n),!0;if((207===e.kind||206===e.kind)&&VL(e,t,n))return!0}}function WL(e){181===e.kind?function(e){hz(e)||function(e){const t=e.parameters[0];if(1!==e.parameters.length)return Uz(t?t.name:e,Ca.An_index_signature_must_have_exactly_one_parameter);if(vz(e.parameters,Ca.An_index_signature_cannot_have_a_trailing_comma),t.dotDotDotToken)return Uz(t.dotDotDotToken,Ca.An_index_signature_cannot_have_a_rest_parameter);if(qv(t))return Uz(t.name,Ca.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(t.questionToken)return Uz(t.questionToken,Ca.An_index_signature_parameter_cannot_have_a_question_mark);if(t.initializer)return Uz(t.name,Ca.An_index_signature_parameter_cannot_have_an_initializer);if(!t.type)return Uz(t.name,Ca.An_index_signature_parameter_must_have_a_type_annotation);const n=Mx(t.type);if(JN(n,e=>!!(8576&e.flags))||Rb(n))return Uz(t.name,Ca.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead);if(!zN(n,bg))return Uz(t.name,Ca.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type);if(!e.type)return Uz(e,Ca.An_index_signature_must_have_a_type_annotation)}(e)}(e):184!==e.kind&&262!==e.kind&&185!==e.kind&&179!==e.kind&&176!==e.kind&&180!==e.kind||Sz(e);const t=$h(e);4&t||(!(3&~t)&&P<5&&mz(e,6144),2==(3&t)&&P<4&&mz(e,64),3&t&&P<2&&mz(e,128)),tB(xl(e)),function(e){const t=O(ml(e),PF);if(!g(t))return;const n=zm(e),r=new Set,i=new Set;h(e.parameters,({name:e},t)=>{QN(e)&&r.add(e.escapedText),O_(e)&&i.add(t)});const o=Yf(e);if(o){const e=t.length-1,o=t[e];n&&o&&QN(o.name)&&o.typeExpression&&o.typeExpression.type&&!r.has(o.name.escapedText)&&!i.has(e)&&!rT(Mx(o.typeExpression.type))&&So(o.name,Ca.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,wc(o.name))}else h(t,({name:e,isNameFirst:t},o)=>{i.has(o)||QN(e)&&r.has(e.escapedText)||(dD(e)?n&&So(e,Ca.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,Up(e),Up(e.left)):t||To(n,e,Ca.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,wc(e)))})}(e),h(e.parameters,UL),e.type&&JB(e.type),a(function(){!function(e){if(P>=2||!Xu(e)||33554432&e.flags||Ld(e.body))return;h(e.parameters,e=>{e.name&&!O_(e.name)&&e.name.escapedText===xe.escapedName&&bo("noEmit",e,Ca.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}(e);let t=Fv(e),n=t;if(zm(e)){const r=ul(e);if(r&&r.typeExpression&&PD(r.typeExpression.type)){const e=eO(Mx(r.typeExpression));e&&e.declaration&&(t=Fv(e.declaration),n=r.typeExpression.type)}}if(Q&&!t)switch(e.kind){case 180:So(e,Ca.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 179:So(e,Ca.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(t&&n){const r=$h(e);if(1==(5&r)){const e=Mx(t);e===Yt?So(n,Ca.A_generator_cannot_have_a_void_type_annotation):$L(e,r,n)}else 2==(3&r)&&function(e,t,n){const r=Mx(t);if(P>=2){if(Pc(r))return;const e=Sy(!0);if(e!==An&&!Yl(r,e))return void o(Ca.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,t,n,Gs(SM(r)||Yt))}else{if(MP(e,5),Pc(r))return;const a=bm(t);if(void 0===a)return void o(Ca.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Gs(r));const s=Ma(a,111551,!0),c=s?Kl(s):wt;if(Pc(c))return void(80===a.kind&&"Promise"===a.escapedText&&e_(r)===Sy(!1)?So(n,Ca.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):o(Ca.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Up(a)));const l=(i=!0,mr||(mr=_y("PromiseConstructorLike",0,i))||wn);if(l===wn)return void o(Ca.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Up(a));const _=Ca.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;if(!KS(c,l,n,_,()=>t===n?void 0:yS(void 0,Ca.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)))return;const u=a&&wb(a),d=Ko(e.locals,u.escapedText,111551);if(d)return void So(d.valueDeclaration,Ca.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,wc(u),Up(a))}var i;function o(e,t,n,r){if(t===n)So(n,e,r);else{ST(So(n,Ca.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),Vp(t,e,r))}}mM(r,!1,e,Ca.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(e,t,n)}181!==e.kind&&317!==e.kind&&jM(e)})}function $L(e,t,n){const r=zR(0,e,!!(2&t))||St;return KS(qj(r,zR(1,e,!!(2&t))||r,zR(2,e,!!(2&t))||Ft,!!(2&t)),e,n)}function HL(e){const t=new Map;for(const n of e.members)if(171===n.kind){let e;const r=n.name;switch(r.kind){case 11:case 9:e=r.text;break;case 80:e=wc(r);break;default:continue}t.get(e)?(So(jc(n.symbol.valueDeclaration),Ca.Duplicate_identifier_0,e),So(n.name,Ca.Duplicate_identifier_0,e)):t.set(e,!0)}}function KL(e){if(264===e.kind){const t=rs(e);if(t.declarations&&t.declarations.length>0&&t.declarations[0]!==e)return}const t=cg(rs(e));if(null==t?void 0:t.declarations){const e=new Map;for(const n of t.declarations)1===n.parameters.length&&n.parameters[0].type&&BN(Mx(n.parameters[0].type),t=>{const r=e.get(rv(t));r?r.declarations.push(n):e.set(rv(t),{type:t,declarations:[n]})});e.forEach(e=>{if(e.declarations.length>1)for(const t of e.declarations)So(t,Ca.Duplicate_index_signature_for_type_0,Gs(e.type))})}}function GL(e){hz(e)||function(e){if(pD(e.name)&&yP(e.name.expression)&&103===e.name.expression.operatorToken.kind)return Uz(e.parent.members[0],Ca.A_mapped_type_may_not_declare_properties_or_methods);if(S_(e.parent)){if(ON(e.name)&&"constructor"===e.name.text)return Uz(e.name,Ca.Classes_may_not_have_a_field_named_constructor);if(Az(e.name,Ca.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type))return!0;if(P<2&&YN(e.name))return Uz(e.name,Ca.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(P<2&&T_(e))return Uz(e.name,Ca.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(T_(e)&&Dz(e.questionToken,Ca.An_accessor_property_cannot_be_declared_optional))return!0}else if(264===e.parent.kind){if(Az(e.name,Ca.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(Tn.assertNode(e,hD),e.initializer)return Uz(e.initializer,Ca.An_interface_property_cannot_have_an_initializer)}else if(ID(e.parent)){if(Az(e.name,Ca.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(Tn.assertNode(e,hD),e.initializer)return Uz(e.initializer,Ca.A_type_literal_property_cannot_have_an_initializer)}33554432&e.flags&&jz(e);if(yD(e)&&e.exclamationToken&&(!S_(e.parent)||!e.type||e.initializer||33554432&e.flags||$v(e)||Gv(e))){const t=e.initializer?Ca.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?Ca.A_definite_assignment_assertion_is_not_permitted_in_this_context:Ca.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return Uz(e.exclamationToken,t)}}(e)||wz(e.name),iR(e),XL(e),Wv(e,64)&&172===e.kind&&e.initializer&&So(e,Ca.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract,Rp(e.name))}function XL(e){if(YN(e.name)&&(P<9||P<99||!R)){for(let t=Lp(e);t;t=Lp(t))Ho(t).flags|=1048576;if(kP(e.parent)){const t=vE(e.parent);t&&(Ho(e.name).flags|=32768,Ho(t).flags|=4096)}}}function QL(e){WL(e),function(e){const t=zm(e)?Av(e):void 0,n=e.typeParameters||t&&Ce(t);if(n){const t=n.pos===n.end?n.pos:ds(Dd(e).text,n.pos);return qz(e,t,n.end-t,Ca.Type_parameters_cannot_appear_on_a_constructor_declaration)}}(e)||function(e){const t=e.type||Fv(e);if(t)Uz(t,Ca.Type_annotation_cannot_appear_on_a_constructor_declaration)}(e),JB(e.body);const t=rs(e),n=id(t,e.kind);function r(e){return!!o_(e)||172===e.kind&&!$v(e)&&!!e.initializer}e===n&&uM(t),Ld(e.body)||a(function(){const t=e.parent;if(Ph(t)){xE(e.parent,t);const n=DE(t),i=NE(e.body);if(i){n&&So(i,Ca.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null);if(!q&&(ee(e.parent.members,r)||ee(e.parameters,e=>Wv(e,31))))if(function(e,t){const n=dh(e.parent);return RP(n)&&n.parent===t}(i,e.body)){let t;for(const n of e.body.statements){if(RP(n)&&mf(hA(n.expression))){t=n;break}if(YL(n))break}void 0===t&&So(e,Ca.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers)}else So(i,Ca.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers)}else n||So(e,Ca.Constructors_for_derived_classes_must_contain_a_super_call)}})}function YL(e){return 108===e.kind||110===e.kind||!_m(e)&&!!KI(e,YL)}function ZL(e){QN(e.name)&&"constructor"===wc(e.name)&&S_(e.parent)&&So(e.name,Ca.Class_constructor_may_not_be_an_accessor),a(function(){Sz(e)||function(e){if(!(33554432&e.flags)&&187!==e.parent.kind&&264!==e.parent.kind){if(P<2&&YN(e.name))return Uz(e.name,Ca.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(void 0===e.body&&!Wv(e,64))return qz(e,e.end-1,1,Ca._0_expected,"{")}if(e.body){if(Wv(e,64))return Uz(e,Ca.An_abstract_accessor_cannot_have_an_implementation);if(187===e.parent.kind||264===e.parent.kind)return Uz(e.body,Ca.An_implementation_cannot_be_declared_in_ambient_contexts)}if(e.typeParameters)return Uz(e.name,Ca.An_accessor_cannot_have_type_parameters);if(!function(e){return Fz(e)||e.parameters.length===(177===e.kind?0:1)}(e))return Uz(e.name,177===e.kind?Ca.A_get_accessor_cannot_have_parameters:Ca.A_set_accessor_must_have_exactly_one_parameter);if(178===e.kind){if(e.type)return Uz(e.name,Ca.A_set_accessor_cannot_have_a_return_type_annotation);const t=Tn.checkDefined(bv(e),"Return value does not match parameter count assertion.");if(t.dotDotDotToken)return Uz(t.dotDotDotToken,Ca.A_set_accessor_cannot_have_rest_parameter);if(t.questionToken)return Uz(t.questionToken,Ca.A_set_accessor_cannot_have_an_optional_parameter);if(t.initializer)return Uz(e.name,Ca.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}(e)||wz(e.name);AM(e),WL(e),177===e.kind&&!(33554432&e.flags)&&Md(e.body)&&512&e.flags&&(1024&e.flags||So(e.name,Ca.A_get_accessor_must_return_a_value));167===e.name.kind&&sA(e.name);if(mu(e)){const t=rs(e),n=id(t,177),r=id(t,178);if(n&&r&&!(1&VJ(n))){Ho(n).flags|=1;const e=rb(n),t=rb(r);(64&e)!=(64&t)&&(So(n.name,Ca.Accessors_must_both_be_abstract_or_non_abstract),So(r.name,Ca.Accessors_must_both_be_abstract_or_non_abstract)),(4&e&&!(6&t)||2&e&&!(2&t))&&(So(n.name,Ca.A_get_accessor_must_be_at_least_as_accessible_as_the_setter),So(r.name,Ca.A_get_accessor_must_be_at_least_as_accessible_as_the_setter))}}const t=Ll(rs(e));177===e.kind&&Kj(e,t)}),JB(e.body),XL(e)}function eM(e,t,n){return e.typeArguments&&n{const t=rM(e);t&&nM(e,t)});const t=Ho(e).resolvedSymbol;t&&ee(t.declarations,e=>aC(e)&&!!(536870912&e.flags))&&Po(qO(e),t.declarations,t.escapedName)}}function aM(e,t){if(!(8388608&e.flags))return e;const n=e.objectType,r=e.indexType,i=zd(n)&&2===qd(n)?Rv(n,0):ib(n,0),o=!!xf(n,zt);if(zN(r,e=>zS(e,i)||o&&hf(e,zt)))return 212===t.kind&&ah(t)&&32&Ox(n)&&1&Rd(n)&&So(t,Ca.Index_signature_in_type_0_only_permits_reading,Gs(n)),e;if(Jb(n)){const e=fb(r,t);if(e){const r=BN(wp(n),t=>Zp(t,e));if(r&&6&Sx(r))return So(t,Ca.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,Cc(e)),wt}}return So(t,Ca.Type_0_cannot_be_used_to_index_type_1,Gs(r),Gs(n)),wt}function sM(e){!function(e){var t;if(null==(t=e.members)?void 0:t.length)Uz(e.members[0],Ca.A_mapped_type_may_not_declare_properties_or_methods)}(e),JB(e.typeParameter),JB(e.nameType),JB(e.type),e.type||tw(e,St);const t=Qb(e),n=wd(t);if(n)KS(n,sn,e.nameType);else{KS(Cd(t),sn,Sl(e.typeParameter))}}function cM(e){!function(e){if(158===e.operator){if(155!==e.type.kind)return Uz(e.type,Ca._0_expected,Va(155));let t=uh(e.parent);if(zm(t)&&ZE(t)){const e=Zg(t);e&&(t=zg(e)||e)}switch(t.kind){case 260:const n=t;if(80!==n.name.kind)return Uz(e,Ca.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!zf(n))return Uz(e,Ca.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(2&n.parent.flags))return Uz(t.name,Ca.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 172:if(!$v(t)||!Yv(t))return Uz(t.name,Ca.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 171:if(!Wv(t,8))return Uz(t.name,Ca.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:Uz(e,Ca.unique_symbol_types_are_not_allowed_here)}}else if(148===e.operator&&188!==e.type.kind&&189!==e.type.kind)zz(e,Ca.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,Va(155))}(e),JB(e.type)}function lM(e){return(Vv(e,2)||o_(e))&&!!(33554432&e.flags)}function _M(e,t){let n=Xz(e);if(264!==e.parent.kind&&263!==e.parent.kind&&231!==e.parent.kind&&33554432&e.flags){const t=jp(e);!(t&&128&t.flags)||128&n||cE(e.parent)&&sE(e.parent.parent)&&vp(e.parent.parent)||(n|=32),n|=128}return n&t}function uM(e){a(()=>function(e){function t(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}function n(e,n,r,i,o){if(0!==(i^o)){const i=_M(t(e,n),r);h(e,e=>{const t=_M(e,r)^i;32&t?So(jc(e),Ca.Overload_signatures_must_all_be_exported_or_non_exported):128&t?So(jc(e),Ca.Overload_signatures_must_all_be_ambient_or_non_ambient):6&t?So(jc(e)||e,Ca.Overload_signatures_must_all_be_public_private_or_protected):64&t&&So(jc(e),Ca.Overload_signatures_must_all_be_abstract_or_non_abstract)})}}function r(e,n,r,i){if(r!==i){const r=jg(t(e,n));h(e,e=>{jg(e)!==r&&So(jc(e),Ca.Overload_signatures_must_all_be_optional_or_required)})}}const i=230;let o,a,s,c=0,l=i,_=!1,u=!0,d=!1;const p=e.declarations,f=!!(16384&e.flags);function m(e){if(e.name&&Ld(e.name))return;let t=!1;const n=KI(e.parent,n=>{if(t)return n;t=n===e});if(n&&n.pos===e.end&&n.kind===e.kind){const t=n.name||n,r=n.name;if(e.name&&r&&(YN(e.name)&&YN(r)&&e.name.escapedText===r.escapedText||pD(e.name)&&pD(r)&&PS(sA(e.name),sA(r))||Zh(e.name)&&Zh(r)&&ty(e.name)===ty(r))){if((174===e.kind||173===e.kind)&&$v(e)!==$v(n)){So(t,$v(e)?Ca.Function_overload_must_be_static:Ca.Function_overload_must_not_be_static)}return}if(Md(n.body))return void So(t,Ca.Function_implementation_name_must_be_0,Rp(e.name))}const r=e.name||e;f?So(r,Ca.Constructor_implementation_is_missing):Wv(e,64)?So(r,Ca.All_declarations_of_an_abstract_method_must_be_consecutive):So(r,Ca.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}let y=!1,v=!1,b=!1;const x=[];if(p)for(const e of p){const t=e,n=33554432&t.flags,r=t.parent&&(264===t.parent.kind||187===t.parent.kind)||n;if(r&&(s=void 0),263!==t.kind&&231!==t.kind||n||(b=!0),262===t.kind||174===t.kind||173===t.kind||176===t.kind){x.push(t);const e=_M(t,i);c|=e,l&=e,_=_||jg(t),u=u&&jg(t);const n=Md(t.body);n&&o?f?v=!0:y=!0:(null==s?void 0:s.parent)===t.parent&&s.end!==t.pos&&m(s),n?o||(o=t):d=!0,s=t,r||(a=t)}zm(e)&&f_(e)&&e.jsDoc&&(d=g(Xg(e))>0)}v&&h(x,e=>{So(e,Ca.Multiple_constructor_implementations_are_not_allowed)});y&&h(x,e=>{So(jc(e)||e,Ca.Duplicate_function_implementation)});if(b&&!f&&16&e.flags&&p){const t=O(p,e=>263===e.kind).map(e=>Vp(e,Ca.Consider_adding_a_declare_modifier_to_this_class));h(p,n=>{const r=263===n.kind?Ca.Class_declaration_cannot_implement_overload_list_for_0:262===n.kind?Ca.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;r&&ST(So(jc(n)||n,r,Dc(e)),...t)})}!a||a.body||Wv(a,64)||a.questionToken||m(a);if(d&&(p&&(n(p,o,i,c,l),r(p,o,_,u)),o)){const t=Zf(e),n=$f(o);for(const e of t)if(!mk(n,e)){ST(So(e.declaration&&mF(e.declaration)?e.declaration.parent.tagName:e.declaration,Ca.This_overload_signature_is_not_compatible_with_its_implementation_signature),Vp(o,Ca.The_implementation_signature_is_declared_here));break}}}(e))}function dM(e){a(()=>function(e){let t=e.localSymbol;if(!t&&(t=rs(e),!t.exportSymbol))return;if(id(t,e.kind)!==e)return;let n=0,r=0,i=0;for(const e of t.declarations){const t=s(e),o=_M(e,2080);32&o?2048&o?i|=t:n|=t:r|=t}const o=n&r,a=i&(n|r);if(o||a)for(const e of t.declarations){const t=s(e),n=jc(e);t&a?So(n,Ca.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,Rp(n)):t&o&&So(n,Ca.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,Rp(n))}function s(e){let t=e;switch(t.kind){case 264:case 265:case 346:case 338:case 340:return 2;case 267:return pp(t)||0!==qR(t)?5:4;case 263:case 266:case 306:return 3;case 307:return 7;case 277:case 226:const e=t,n=kE(e)?e.expression:e.right;if(!Cb(n))return 1;t=n;case 271:case 274:case 273:let r=0;return h(Ea(rs(t)).declarations,e=>{r|=s(e)}),r;case 260:case 208:case 262:case 276:case 80:return 1;case 173:case 171:return 2;default:return Tn.failBadSyntaxKind(t)}}}(e))}function pM(e,t,n,...r){const i=fM(e,t);return i&&xM(i,t,n,...r)}function fM(e,t,n){if(Sc(e))return;const r=e;if(r.promisedTypeOfPromise)return r.promisedTypeOfPromise;if(Yl(e,Sy(!1)))return r.promisedTypeOfPromise=Hg(e)[0];if(sL(sp(e),402915324))return;const i=yc(e,"then");if(Sc(i))return;const o=i?uf(i,0):p;if(0===o.length)return void(t&&So(t,Ca.A_promise_must_have_a_then_method));let a,s;for(const t of o){const n=tm(t);n&&n!==Yt&&!kk(e,n,so)?a=n:s=pe(s,t)}if(!s)return Tn.assertIsDefined(a),n&&(n.value=a),void(t&&So(t,Ca.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Gs(e),Gs(a)));const c=hN(dv(M(s,xj)),2097152);if(Sc(c))return;const l=uf(c,0);if(0!==l.length)return r.promisedTypeOfPromise=dv(M(l,xj),2);t&&So(t,Ca.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback)}function mM(e,t,n,r,...i){return(t?xM(e,n,r,...i):SM(e,n,r,...i))||wt}function gM(e){if(sL(sp(e),402915324))return!1;const t=yc(e,"then");return!!t&&uf(hN(t,2097152),0).length>0}function hM(e){var t;if(16777216&e.flags){const n=Fy(!1);return!!n&&e.aliasSymbol===n&&1===(null==(t=e.aliasTypeArguments)?void 0:t.length)}return!1}function yM(e){return 1048576&e.flags?WN(e,yM):hM(e)?e.aliasTypeArguments[0]:e}function vM(e){if(Sc(e)||hM(e))return!1;if(Jb(e)){const t=op(e);if(t?3&t.flags||hk(t)||JN(t,gM):oL(e,8650752))return!0}return!1}function bM(e){return vM(e)?function(e){const t=Fy(!0);if(t)return ih(t,[yM(e)])}(e)??e:(Tn.assert(hM(e)||void 0===fM(e),"type provided should not be a non-generic 'promise'-like."),e)}function xM(e,t,n,...r){const i=SM(e,t,n,...r);return i&&bM(i)}function SM(e,t,n,...r){if(Sc(e))return e;if(hM(e))return e;const i=e;if(i.awaitedTypeOfType)return i.awaitedTypeOfType;if(1048576&e.flags){if(eo.lastIndexOf(e.id)>=0)return void(t&&So(t,Ca.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));const o=t?e=>SM(e,t,n,...r):SM;eo.push(e.id);const a=WN(e,o);return eo.pop(),i.awaitedTypeOfType=a}if(vM(e))return i.awaitedTypeOfType=e;const o={value:void 0},a=fM(e,void 0,o);if(a){if(e.id===a.id||eo.lastIndexOf(a.id)>=0)return void(t&&So(t,Ca.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));eo.push(e.id);const o=SM(a,t,n,...r);if(eo.pop(),!o)return;return i.awaitedTypeOfType=o}if(!gM(e))return i.awaitedTypeOfType=e;if(t){let i;Tn.assertIsDefined(n),o.value&&(i=yS(i,Ca.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Gs(e),Gs(o.value))),i=yS(i,n,...r),io.add(Hp(Dd(t),t,i))}}function kM(e){!function(e){if(!Jz(Dd(e))){let t=e.expression;if(lP(t))return!1;let n,r=!0;for(;;)if(CP(t)||DP(t))t=t.expression;else if(oP(t))r||(n=t),t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1;else{if(!rP(t)){QN(t)||(n=t);break}t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1}if(n)return ST(So(e.expression,Ca.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),Vp(n,Ca.Invalid_syntax_in_decorator)),!0}}(e);const t=MO(e);zO(t,e);const n=mm(t);if(1&n.flags)return;const r=Mj(e);if(!(null==r?void 0:r.resolvedReturnType))return;let i;const o=r.resolvedReturnType;switch(e.parent.kind){case 263:case 231:i=Ca.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;case 172:if(!j){i=Ca.Decorator_function_return_type_0_is_not_assignable_to_type_1;break}case 169:i=Ca.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;break;case 174:case 177:case 178:i=Ca.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;default:return Tn.failBadSyntaxKind(e.parent)}KS(n,o,e.expression,i)}function TM(e,t,n,r,i,o=n.length,a=0){return Nu(aw.createFunctionTypeNode(void 0,p,aw.createKeywordTypeNode(133)),e,t,n,r,i,o,a)}function wM(e,t,n,r,i,o,a){return Zm(TM(e,t,n,r,i,o,a))}function NM(e){return wM(void 0,void 0,p,e)}function DM(e){return wM(void 0,void 0,[Fo("value",e)],Yt)}function PM(e){if(e)switch(e.kind){case 193:case 192:return EM(e.types);case 194:return EM([e.trueType,e.falseType]);case 196:case 202:return PM(e.type);case 183:return e.typeName}}function EM(e){let t;for(let n of e){for(;196===n.kind||202===n.kind;)n=n.type;if(146===n.kind)continue;if(!V&&(201===n.kind&&106===n.literal.kind||157===n.kind))continue;const e=PM(n);if(!e)return;if(t){if(!QN(t)||!QN(e)||t.escapedText!==e.escapedText)return}else t=e}return t}function FM(e){const t=Pv(e);return Qu(e)?Mf(t):t}function AM(e){if(!(xI(e)&&Zv(e)&&e.modifiers&&Sm(j,e,e.parent,e.parent.parent)))return;const t=C(e.modifiers,gD);if(t){if(j)mz(t,8),169===e.kind&&mz(t,32);else if(P<99)if(mz(t,8),rE(e))if(e.name){iB(e)&&mz(t,4194304)}else mz(t,4194304);else kP(e)||(YN(e.name)&&(bD(e)||k_(e)||T_(e))&&mz(t,4194304),pD(e.name)&&mz(t,8388608));MP(e,8);for(const t of e.modifiers)gD(t)&&kM(t)}}function IM(e){switch(e.kind){case 80:return e;case 211:return e.name;default:return}}function OM(e){var t;AM(e),WL(e);const n=$h(e);if(e.name&&167===e.name.kind&&sA(e.name),mu(e)){const n=rs(e),r=e.localSymbol||n,i=null==(t=r.declarations)?void 0:t.find(t=>t.kind===e.kind&&!(524288&t.flags));e===i&&uM(r),n.parent&&uM(n)}const r=173===e.kind?void 0:e.body;if(JB(r),Kj(e,km(e)),a(function(){Fv(e)||(Ld(r)&&!lM(e)&&tw(e,St),1&n&&Md(r)&&mm($f(e)))}),zm(e)){const t=ul(e);t&&t.typeExpression&&!ZF(Mx(t.typeExpression),e)&&So(t.typeExpression.type,Ca.The_type_of_a_function_declaration_must_match_the_function_s_signature)}}function jM(e){a(function(){const t=Dd(e);let n=fi.get(t.path);n||(n=[],fi.set(t.path,n));n.push(e)})}function LM(e,t){for(const n of e)switch(n.kind){case 263:case 231:BM(n,t),zM(n,t);break;case 307:case 267:case 241:case 269:case 248:case 249:case 250:$M(n,t);break;case 176:case 218:case 262:case 219:case 174:case 177:case 178:n.body&&$M(n,t),zM(n,t);break;case 173:case 179:case 180:case 184:case 185:case 265:case 264:zM(n,t);break;case 195:JM(n,t);break;default:Tn.assertNever(n,"Node should not have been registered for unused identifiers check")}}function MM(e,t,n){n(e,0,Vp(jc(e)||e,aC(e)?Ca._0_is_declared_but_never_used:Ca._0_is_declared_but_its_value_is_never_read,t))}function RM(e){return QN(e)&&95===wc(e).charCodeAt(0)}function BM(e,t){for(const n of e.members)switch(n.kind){case 174:case 172:case 177:case 178:if(178===n.kind&&32768&n.symbol.flags)break;const e=rs(n);e.isReferenced||!(Vv(n,2)||Ic(n)&&YN(n.name))||33554432&n.flags||t(n,0,Vp(n.name,Ca._0_is_declared_but_its_value_is_never_read,Hs(e)));break;case 176:for(const e of n.parameters)!e.symbol.isReferenced&&Wv(e,2)&&t(e,0,Vp(e.name,Ca.Property_0_is_declared_but_its_value_is_never_read,Dc(e.symbol)));break;case 181:case 240:case 175:break;default:Tn.fail("Unexpected class member")}}function JM(e,t){const{typeParameter:n}=e;qM(n)&&t(e,1,Vp(e,Ca._0_is_declared_but_its_value_is_never_read,wc(n.name)))}function zM(e,t){const n=rs(e).declarations;if(!n||Ee(n)!==e)return;const r=xl(e),i=new Set;for(const e of r){if(!qM(e))continue;const n=wc(e.name),{parent:r}=e;if(195!==r.kind&&r.typeParameters.every(qM)){if(X(i,r)){const i=Dd(r),o=IF(r)?TT(r):CT(i,r.typeParameters),a=1===r.typeParameters.length?[Ca._0_is_declared_but_its_value_is_never_read,n]:[Ca.All_type_parameters_are_unused];t(e,1,fS(i,o.pos,o.end-o.pos,...a))}}else t(e,1,Vp(e,Ca._0_is_declared_but_its_value_is_never_read,n))}}function qM(e){return!(262144&ts(e.symbol).isReferenced||RM(e.name))}function UM(e,t,n,r){const i=String(r(t)),o=e.get(i);o?o[1].push(n):e.set(i,[t,[n]])}function VM(e){return dt(py(e),mD)}function WM(e){return eP(e)?YD(e.parent)?!(!e.propertyName||!RM(e.name)):RM(e.name):pp(e)||(eE(e)&&_u(e.parent.parent)||KM(e))&&RM(e.name)}function $M(e,t){const n=new Map,r=new Map,i=new Map;e.locals.forEach(e=>{if(!(262144&e.flags?!(3&e.flags)||3&e.isReferenced:e.isReferenced||e.exportSymbol)&&e.declarations)for(const o of e.declarations)if(!WM(o))if(KM(o))UM(n,GM(o),o,KB);else if(eP(o)&&YD(o.parent)){o!==Ee(o.parent.elements)&&Ee(o.parent.elements).dotDotDotToken||UM(r,o.parent,o,KB)}else if(eE(o)){const e=7&Qz(o),t=jc(o);(4===e||6===e)&&t&&RM(t)||UM(i,o.parent,o,KB)}else{const n=e.valueDeclaration&&VM(e.valueDeclaration),i=e.valueDeclaration&&jc(e.valueDeclaration);n&&i?lc(n,n.parent)||kv(n)||RM(i)||(eP(o)&&ZD(o.parent)?UM(r,o.parent,o,KB):t(n,1,Vp(i,Ca._0_is_declared_but_its_value_is_never_read,Dc(e)))):MM(o,Dc(e),t)}}),n.forEach(([e,n])=>{const r=e.parent;if((e.name?1:0)+(e.namedBindings?274===e.namedBindings.kind?1:e.namedBindings.elements.length:0)===n.length)t(r,0,1===n.length?Vp(r,Ca._0_is_declared_but_its_value_is_never_read,wc(Ne(n).name)):Vp(r,Ca.All_imports_in_import_declaration_are_unused));else for(const e of n)MM(e,wc(e.name),t)}),r.forEach(([e,n])=>{const r=VM(e.parent)?1:0;if(e.elements.length===n.length)1===n.length&&260===e.parent.kind&&261===e.parent.parent.kind?UM(i,e.parent.parent,e.parent,KB):t(e,r,1===n.length?Vp(e,Ca._0_is_declared_but_its_value_is_never_read,HM(Ne(n).name)):Vp(e,Ca.All_destructured_elements_are_unused));else for(const e of n)t(e,r,Vp(e,Ca._0_is_declared_but_its_value_is_never_read,HM(e.name)))}),i.forEach(([e,n])=>{if(e.declarations.length===n.length)t(e,0,1===n.length?Vp(Ne(n).name,Ca._0_is_declared_but_its_value_is_never_read,HM(Ne(n).name)):Vp(243===e.parent.kind?e.parent:e,Ca.All_variables_are_unused));else for(const e of n)t(e,0,Vp(e,Ca._0_is_declared_but_its_value_is_never_read,HM(e.name)))})}function HM(e){switch(e.kind){case 80:return wc(e);case 207:case 206:return HM(pt(Ne(e.elements),eP).name);default:return Tn.assertNever(e)}}function KM(e){return 273===e.kind||276===e.kind||274===e.kind}function GM(e){return 273===e.kind?e:274===e.kind?e.parent:e.parent.parent}function XM(e){if(241===e.kind&&Wz(e),b_(e)){const t=yi;h(e.statements,JB),yi=t}else h(e.statements,JB);e.locals&&jM(e)}function QM(e,t,n){if((null==t?void 0:t.escapedText)!==n)return!1;if(172===e.kind||171===e.kind||174===e.kind||173===e.kind||177===e.kind||178===e.kind||303===e.kind)return!1;if(33554432&e.flags)return!1;if((pE(e)||uE(e)||SE(e))&&Zl(e))return!1;const r=py(e);return!mD(r)||!Ld(r.parent.body)}function YM(e){xc(e,t=>{if(4&VJ(t)){return 80!==e.kind?So(jc(e),Ca.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):So(e,Ca.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0}return!1})}function ZM(e){xc(e,t=>{if(8&VJ(t)){return 80!==e.kind?So(jc(e),Ca.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):So(e,Ca.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0}return!1})}function eR(e){1048576&VJ(Lp(e))&&(Tn.assert(Ic(e)&&QN(e.name)&&"string"==typeof e.name.escapedText,"The target of a WeakMap/WeakSet collision check should be an identifier"),bo("noEmit",e,Ca.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel,e.name.escapedText))}function tR(e){let t=!1;if(kP(e)){for(const n of e.members)if(2097152&VJ(n)){t=!0;break}}else if(_P(e))2097152&VJ(e)&&(t=!0);else{const n=Lp(e);n&&2097152&VJ(n)&&(t=!0)}t&&(Tn.assert(Ic(e)&&QN(e.name),"The target of a Reflect collision check should be an identifier"),bo("noEmit",e,Ca.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers,Rp(e.name),"Reflect"))}function nR(e,t){t&&(function(e,t){if(A>=5&&!(A>=100&&1===Dd(e).impliedNodeFormat))return;if(!t||!QM(e,t,"require")&&!QM(e,t,"exports"))return;if(sE(e)&&1!==qR(e))return;const n=hc(e);307===n.kind&&af(n)&&bo("noEmit",t,Ca.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,Rp(t),Rp(t))}(e,t),function(e,t){if(!t||P>=4||!QM(e,t,"Promise"))return;if(sE(e)&&1!==qR(e))return;const n=hc(e);307===n.kind&&af(n)&&4096&n.flags&&bo("noEmit",t,Ca.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,Rp(t),Rp(t))}(e,t),function(e,t){P<=8&&(QM(e,t,"WeakMap")||QM(e,t,"WeakSet"))&&Qi.push(e)}(e,t),function(e,t){t&&P>=2&&P<=8&&QM(e,t,"Reflect")&&Yi.push(e)}(e,t),S_(e)?(ZR(t,Ca.Class_name_cannot_be_0),33554432&e.flags||function(e){P>=1&&"Object"===e.escapedText&&(A<5||1===Dd(e).impliedNodeFormat)&&So(e,Ca.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,Di[A])}(t)):aE(e)&&ZR(t,Ca.Enum_name_cannot_be_0))}function rR(e){return e===kt?St:e===ir?rr:e}function iR(e){var t;if(AM(e),eP(e)||JB(e.type),!e.name)return;if(167===e.name.kind&&(sA(e.name),Uu(e)&&e.initializer&&SL(e.initializer)),eP(e)){if(e.propertyName&&QN(e.name)&&dy(e)&&Ld(rm(e).body))return void Zi.push(e);YD(e.parent)&&e.dotDotDotToken&&P<5&&mz(e,4),e.propertyName&&167===e.propertyName.kind&&sA(e.propertyName);const t=e.parent.parent,n=Ec(t,e.dotDotDotToken?32:0),r=e.propertyName||e.name;if(n&&!O_(r)){const i=Bv(r);if(kC(i)){const r=Zp(n,TC(i));r&&(AI(r,void 0,!1),KA(e,!!t.initializer&&108===t.initializer.kind,!1,n,r))}}}if(O_(e.name)&&(207===e.name.kind&&P<2&&k.downlevelIteration&&mz(e,512),h(e.name.elements,JB)),e.initializer&&dy(e)&&Ld(rm(e).body))return void So(e,Ca.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);if(O_(e.name)){if(Qw(e))return;const t=Uu(e)&&e.initializer&&249!==e.parent.parent.kind,n=!ee(e.name.elements,mn(TP));if(t||n){const r=gl(e);if(t){const t=SL(e.initializer);V&&n?oI(t,e):YS(t,gl(e),e,e.initializer)}n&&(ZD(e.name)?gR(65,r,At,e):V&&oI(r,e))}return}const n=rs(e);if(2097152&n.flags&&(Km(e)||Gm(e)))return void CB(e);const r=rR(Kl(n));if(e===n.valueDeclaration){const o=Uu(e)&&tg(e);if(o){if(!(zm(e)&&nP(o)&&(0===o.properties.length||Eb(e.name))&&!!(null==(t=n.exports)?void 0:t.size))&&249!==e.parent.parent.kind){const t=SL(o);YS(t,r,e,o,void 0);const n=7&Qz(e);if(6===n){const e=(i=!0,Or||(Or=_y("AsyncDisposable",0,i))||wn),n=Py(!0);if(e!==wn&&n!==wn){KS(t,dv([e,n,Rt,At]),o,Ca.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined)}}else if(4===n){const e=Py(!0);if(e!==wn){KS(t,dv([e,Rt,At]),o,Ca.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined)}}}}n.declarations&&n.declarations.length>1&&ee(n.declarations,t=>t!==e&&Bf(t)&&!aR(t,e))&&So(e.name,Ca.All_declarations_of_0_must_have_identical_modifiers,Rp(e.name))}else{const t=rR(gl(e));Pc(r)||Pc(t)||PS(r,t)||67108864&n.flags||oR(n.valueDeclaration,r,e,t),Uu(e)&&e.initializer&&YS(SL(e.initializer),t,e,e.initializer,void 0),n.valueDeclaration&&!aR(e,n.valueDeclaration)&&So(e.name,Ca.All_declarations_of_0_must_have_identical_modifiers,Rp(e.name))}var i;172!==e.kind&&171!==e.kind&&(dM(e),260!==e.kind&&208!==e.kind||function(e){if(7&Qz(e)||dy(e))return;const t=rs(e);if(1&t.flags){if(!QN(e.name))return Tn.fail();const n=Le(e,e.name.escapedText,3,void 0,!1);if(n&&n!==t&&2&n.flags&&7&$A(n)){const t=Oh(n.valueDeclaration,261),r=243===t.parent.kind&&t.parent.parent?t.parent.parent:void 0;if(!r||!(241===r.kind&&f_(r.parent)||268===r.kind||267===r.kind||307===r.kind)){const t=Hs(n);So(e,Ca.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,t,t)}}}}(e),nR(e,e.name))}function oR(e,t,n,r){const i=jc(n),o=172===n.kind||171===n.kind?Ca.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:Ca.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,a=Rp(i),s=So(i,o,a,Gs(t),Gs(r));e&&ST(s,Vp(e,Ca._0_was_also_declared_here,a))}function aR(e,t){if(169===e.kind&&260===t.kind||260===e.kind&&169===t.kind)return!0;if(jg(e)!==jg(t))return!1;return eb(e,1358)===eb(t,1358)}function sR(e){var t,n;null==(t=cr)||t.push(cr.Phase.Check,"checkVariableDeclaration",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath}),function(e){const t=Qz(e),n=7&t;if(O_(e.name))switch(n){case 6:return Uz(e,Ca._0_declarations_may_not_have_binding_patterns,"await using");case 4:return Uz(e,Ca._0_declarations_may_not_have_binding_patterns,"using")}if(249!==e.parent.parent.kind&&250!==e.parent.parent.kind)if(33554432&t)jz(e);else if(!e.initializer){if(O_(e.name)&&!O_(e.parent))return Uz(e,Ca.A_destructuring_declaration_must_have_an_initializer);switch(n){case 6:return Uz(e,Ca._0_declarations_must_be_initialized,"await using");case 4:return Uz(e,Ca._0_declarations_must_be_initialized,"using");case 2:return Uz(e,Ca._0_declarations_must_be_initialized,"const")}}if(e.exclamationToken&&(243!==e.parent.parent.kind||!e.type||e.initializer||33554432&t)){const t=e.initializer?Ca.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?Ca.A_definite_assignment_assertion_is_not_permitted_in_this_context:Ca.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return Uz(e.exclamationToken,t)}!(A<5||1===Dd(e).impliedNodeFormat)||4===A||33554432&e.parent.parent.flags||!Wv(e.parent.parent,32)||Lz(e.name);!!n&&Mz(e.name)}(e),iR(e),null==(n=cr)||n.pop()}function cR(e){return function(e){if(e.dotDotDotToken){const t=e.parent.elements;if(e!==Ee(t))return Uz(e,Ca.A_rest_element_must_be_last_in_a_destructuring_pattern);if(vz(t,Ca.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),e.propertyName)return Uz(e.name,Ca.A_rest_element_cannot_have_a_property_name)}if(e.dotDotDotToken&&e.initializer)qz(e,e.initializer.pos-1,1,Ca.A_rest_element_cannot_have_an_initializer)}(e),iR(e)}function lR(e){const t=7&gc(e);(4===t||6===t)&&P<99&&mz(e,16777216),h(e.declarations,JB)}function _R(e){hz(e)||Rz(e.declarationList)||function(e){if(!Bz(e.parent)){const t=7&Qz(e.declarationList);if(t){const n=1===t?"let":2===t?"const":4===t?"using":6===t?"await using":Tn.fail("Unknown BlockScope flag");Uz(e,Ca._0_declarations_can_only_be_declared_inside_a_block,n)}}}(e),lR(e.declarationList)}function uR(e,t,n){function r(e,t){for(i(e=mh(e),t);yP(e)&&(57===e.operatorToken.kind||61===e.operatorToken.kind);)i(e=mh(e.left),t)}function i(e,n){const i=hb(e)?mh(e.right):e;if(ug(i))return;if(hb(i))return void r(i,n);const o=i===e?t:pR(i);if(1024&o.flags&&rP(i)&&384&(Ho(i.expression).resolvedSymbol??ht).flags)return void So(i,Ca.This_condition_will_always_return_0,o.value?"true":"false");const a=rP(i)&&kL(i.expression);if(!mN(o,4194304)||a)return;const s=uf(o,0),c=!!pM(o);if(0===s.length&&!c)return;const l=QN(i)?i:rP(i)?i.name:void 0,_=l&&xJ(l);if(!_&&!c)return;const u=_&&yP(e.parent)&&function(e,t){for(;yP(e)&&56===e.operatorToken.kind;){if(KI(e.right,function e(n){if(QN(n)){const e=xJ(n);if(e&&e===t)return!0}return KI(n,e)}))return!0;e=e.parent}return!1}(e.parent,_)||_&&n&&function(e,t,n,r){return!!KI(t,function t(i){if(QN(i)){const t=xJ(i);if(t&&t===r){if(QN(e)||QN(n)&&yP(n.parent))return!0;let t=n.parent,r=i.parent;for(;t&&r;){if(QN(t)&&QN(r)||110===t.kind&&110===r.kind)return xJ(t)===xJ(r);if(rP(t)&&rP(r)){if(xJ(t.name)!==xJ(r.name))return!1;r=r.expression,t=t.expression}else{if(!oP(t)||!oP(r))return!1;r=r.expression,t=t.expression}}}}return KI(i,t)})}(e,n,l,_);u||(c?Co(i,!0,Ca.This_condition_will_always_return_true_since_this_0_is_always_defined,Qs(o)):So(i,Ca.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead))}V&&r(e,n)}function dR(e,t){return 16384&e.flags&&So(t,Ca.An_expression_of_type_void_cannot_be_tested_for_truthiness),e}function pR(e,t){return dR(zL(e,t),e)}function fR(e){Ez(e);const t=ZA(zL(e.expression));if(261===e.initializer.kind){const t=e.initializer.declarations[0];t&&O_(t.name)&&So(t.name,Ca.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),lR(e.initializer)}else{const n=e.initializer,r=zL(n);209===n.kind||210===n.kind?So(n,Ca.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):zS(function(e){const t=ob(ib(e));return 131072&t.flags?Jt:t}(t),r)?eL(n,Ca.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access,Ca.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access):So(n,Ca.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}t!==Zt&&aL(t,126091264)||So(e.expression,Ca.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0,Gs(t)),JB(e.statement),e.locals&&jM(e)}function mR(e){return gR(e.awaitModifier?15:13,QA(e.expression),At,e.expression)}function gR(e,t,n,r){return Sc(t)?t:hR(e,t,n,r,!0)||St}function hR(e,t,n,r,i){const o=!!(2&e);if(t===Zt)return void(r&&FR(r,t,o));const a=P>=2,s=!a&&k.downlevelIteration,c=k.noUncheckedIndexedAccess&&!!(128&e);if(a||s||o){const o=kR(t,e,a?r:void 0);if(i&&o){const t=8&e?Ca.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&e?Ca.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&e?Ca.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&e?Ca.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;t&&KS(n,o.nextType,r,t)}if(o||a)return c?TN(o&&o.yieldType):o&&o.yieldType}let l=t,_=!1;if(4&e){if(1048576&l.flags){const e=t.types,n=O(e,e=>!(402653316&e.flags));n!==e&&(l=dv(n,2))}else 402653316&l.flags&&(l=Zt);if(_=l!==t,_&&131072&l.flags)return c?TN(Jt):Jt}if(!lT(l)){if(r){const n=!!(4&e)&&!_,[i,o]=function(n,r){var i;if(r)return n?[Ca.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[Ca.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0];if(yR(e,0,t,void 0))return[Ca.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!1];if(function(e){switch(e){case"Float32Array":case"Float64Array":case"Int16Array":case"Int32Array":case"Int8Array":case"NodeList":case"Uint16Array":case"Uint32Array":case"Uint8Array":case"Uint8ClampedArray":return!0}return!1}(null==(i=t.symbol)?void 0:i.escapedName))return[Ca.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!0];return n?[Ca.Type_0_is_not_an_array_type_or_a_string_type,!0]:[Ca.Type_0_is_not_an_array_type,!0]}(n,s);Co(r,o&&!!pM(l),i,Gs(l))}return _?c?TN(Jt):Jt:void 0}const u=Sf(l,zt);return _&&u?402653316&u.flags&&!k.noUncheckedIndexedAccess?Jt:dv(c?[u,Jt,At]:[u,Jt],2):128&e?TN(u):u}function yR(e,t,n,r){if(Sc(n))return;const i=kR(n,e,r);return i&&i[eJ(t)]}function vR(e=Zt,t=Zt,n=Ft){if(67359327&e.flags&&180227&t.flags&&180227&n.flags){const r=Ig([e,t,n]);let i=ai.get(r);return i||(i={yieldType:e,returnType:t,nextType:n},ai.set(r,i)),i}return{yieldType:e,returnType:t,nextType:n}}function bR(e){let t,n,r;for(const i of e)if(void 0!==i&&i!==si){if(i===ci)return ci;t=pe(t,i.yieldType),n=pe(n,i.returnType),r=pe(r,i.nextType)}return t||n||r?vR(t&&dv(t),n&&dv(n),r&&Nv(r)):si}function xR(e,t){return e[t]}function SR(e,t,n){return e[t]=n}function kR(e,t,n){var r,i;if(Sc(e))return ci;if(!(1048576&e.flags)){const i=n?{errors:void 0}:void 0,o=CR(e,t,n,i);if(o===si){if(n){const r=FR(n,e,!!(2&t));(null==i?void 0:i.errors)&&ST(r,...i.errors)}return}if(null==(r=null==i?void 0:i.errors)?void 0:r.length)for(const e of i.errors)io.add(e);return o}const o=2&t?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",a=xR(e,o);if(a)return a===si?void 0:a;let s;for(const r of e.types){const a=n?{errors:void 0}:void 0,c=CR(r,t,n,a);if(c===si){if(n){const r=FR(n,e,!!(2&t));(null==a?void 0:a.errors)&&ST(r,...a.errors)}return void SR(e,o,si)}if(null==(i=null==a?void 0:a.errors)?void 0:i.length)for(const e of a.errors)io.add(e);s=pe(s,c)}const c=s?bR(s):si;return SR(e,o,c),c===si?void 0:c}function TR(e,t){if(e===si)return si;if(e===ci)return ci;const{yieldType:n,returnType:r,nextType:i}=e;return t&&Fy(!0),vR(xM(n,t)||St,xM(r,t)||St,i)}function CR(e,t,n,r){if(Sc(e))return ci;let i=!1;if(2&t){const r=wR(e,ui)||DR(e,ui);if(r){if(r!==si||!n)return 8&t?TR(r,n):r;i=!0}}if(1&t){let r=wR(e,di)||DR(e,di);if(r)if(r===si&&n)i=!0;else{if(!(2&t))return r;if(r!==si)return r=TR(r,n),i?r:SR(e,"iterationTypesOfAsyncIterable",r)}}if(2&t){const t=ER(e,ui,n,r,i);if(t!==si)return t}if(1&t){let o=ER(e,di,n,r,i);if(o!==si)return 2&t?(o=TR(o,n),i?o:SR(e,"iterationTypesOfAsyncIterable",o)):o}return si}function wR(e,t){return xR(e,t.iterableCacheKey)}function NR(e,t){const n=wR(e,t)||ER(e,t,void 0,void 0,!1);return n===si?_i:n}function DR(e,t){let n;if(Yl(e,n=t.getGlobalIterableType(!1))||Yl(e,n=t.getGlobalIterableIteratorType(!1))){const[r]=Hg(e),{returnType:i,nextType:o}=NR(n,t);return SR(e,t.iterableCacheKey,vR(t.resolveIterationType(r,void 0)||r,t.resolveIterationType(i,void 0)||i,o))}if(Yl(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=Hg(e);return SR(e,t.iterableCacheKey,vR(t.resolveIterationType(n,void 0)||n,t.resolveIterationType(r,void 0)||r,i))}}function PR(e){const t=by(!1),n=t&&yc(Kl(t),Tc(e));return n&&kC(n)?TC(n):`__@${e}`}function ER(e,t,n,r,i){const o=Zp(e,PR(t.iteratorSymbolName)),a=!o||16777216&o.flags?void 0:Kl(o);if(Sc(a))return i?ci:SR(e,t.iterableCacheKey,ci);const s=a?uf(a,0):void 0;if(!ee(s))return i?si:SR(e,t.iterableCacheKey,si);const c=AR(Nv(M(s,mm)),t,n,r,i)??si;return i?c:SR(e,t.iterableCacheKey,c)}function FR(e,t,n){const r=n?Ca.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:Ca.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;return Co(e,!!pM(t)||!n&&VP(e.parent)&&e.parent.expression===e&&Ny(!1)!==An&&zS(t,Ny(!1)),r,Gs(t))}function AR(e,t,n,r,i){if(Sc(e))return ci;let o=IR(e,t)||function(e,t){const n=t.getGlobalIterableIteratorType(!1);if(Yl(e,n)){const[r]=Hg(e),i=IR(n,t)||JR(n,t,void 0,void 0,!1),{returnType:o,nextType:a}=i===si?_i:i;return SR(e,t.iteratorCacheKey,vR(r,o,a))}if(Yl(e,t.getGlobalIteratorType(!1))||Yl(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=Hg(e);return SR(e,t.iteratorCacheKey,vR(n,r,i))}}(e,t);return o===si&&n&&(o=void 0,i=!0),o??(o=JR(e,t,n,r,i)),o===si?void 0:o}function IR(e,t){return xR(e,t.iteratorCacheKey)}function OR(e,t){const n=yc(e,"done")||Ut;return zS(0===t?Ut:Wt,n)}function jR(e){return OR(e,0)}function MR(e){return OR(e,1)}function RR(e){if(Sc(e))return ci;const t=xR(e,"iterationTypesOfIteratorResult");if(t)return t;if(Yl(e,(n=!1,Sr||(Sr=_y("IteratorYieldResult",1,n))||An))){return SR(e,"iterationTypesOfIteratorResult",vR(Hg(e)[0],void 0,void 0))}var n;if(Yl(e,function(e){return kr||(kr=_y("IteratorReturnResult",1,e))||An}(!1))){return SR(e,"iterationTypesOfIteratorResult",vR(void 0,Hg(e)[0],void 0))}const r=qN(e,jR),i=r!==Zt?yc(r,"value"):void 0,o=qN(e,MR),a=o!==Zt?yc(o,"value"):void 0;return SR(e,"iterationTypesOfIteratorResult",i||a?vR(i,a||Yt,void 0):si)}function BR(e,t,n,r,i){var o,a,s,c;const l=Zp(e,n);if(!l&&"next"!==n)return;const _=!l||"next"===n&&16777216&l.flags?void 0:"next"===n?Kl(l):hN(Kl(l),2097152);if(Sc(_))return"next"===n?ci:li;const u=_?uf(_,0):p;if(0===u.length){if(r){const e="next"===n?t.mustHaveANextMethodDiagnostic:t.mustBeAMethodDiagnostic;i?(i.errors??(i.errors=[]),i.errors.push(Vp(r,e,n))):So(r,e,n)}return"next"===n?si:void 0}if((null==_?void 0:_.symbol)&&1===u.length){const e=t.getGlobalGeneratorType(!1),r=t.getGlobalIteratorType(!1),i=(null==(a=null==(o=e.symbol)?void 0:o.members)?void 0:a.get(n))===_.symbol,l=!i&&(null==(c=null==(s=r.symbol)?void 0:s.members)?void 0:c.get(n))===_.symbol;if(i||l){const t=i?e:r,{mapper:o}=_;return vR(Hx(t.typeParameters[0],o),Hx(t.typeParameters[1],o),"next"===n?Hx(t.typeParameters[2],o):void 0)}}let d,f,m,g,h;for(const e of u)"throw"!==n&&ee(e.parameters)&&(d=pe(d,dj(e,0))),f=pe(f,mm(e));if("throw"!==n){const e=d?dv(d):Ft;if("next"===n)g=e;else if("return"===n){m=pe(m,t.resolveIterationType(e,r)||St)}}const y=f?Nv(f):Zt,v=RR(t.resolveIterationType(y,r)||St);return v===si?(r&&(i?(i.errors??(i.errors=[]),i.errors.push(Vp(r,t.mustHaveAValueDiagnostic,n))):So(r,t.mustHaveAValueDiagnostic,n)),h=St,m=pe(m,St)):(h=v.yieldType,m=pe(m,v.returnType)),vR(h,dv(m),g)}function JR(e,t,n,r,i){const o=bR([BR(e,t,"next",n,r),BR(e,t,"return",n,r),BR(e,t,"throw",n,r)]);return i?o:SR(e,t.iteratorCacheKey,o)}function zR(e,t,n){if(Sc(t))return;const r=UR(t,n);return r&&r[eJ(e)]}function UR(e,t){if(Sc(e))return ci;const n=t?ui:di;return kR(e,t?2:1,void 0)||function(e,t,n,r){return AR(e,t,n,r,!1)}(e,n,void 0,void 0)}function VR(e){Wz(e)||function(e){let t=e;for(;t;){if(m_(t))return Uz(e,Ca.Jump_target_cannot_cross_function_boundary);switch(t.kind){case 256:if(e.label&&t.label.escapedText===e.label.escapedText){return!!(251===e.kind&&!ou(t.statement,!0))&&Uz(e,Ca.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}break;case 255:if(252===e.kind&&!e.label)return!1;break;default:if(ou(t,!1)&&!e.label)return!1}t=t.parent}if(e.label){return Uz(e,252===e.kind?Ca.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:Ca.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}Uz(e,252===e.kind?Ca.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:Ca.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement)}(e)}function WR(e,t){const n=!!(2&t);if(!!(1&t)){const t=zR(1,e,n);return t?n?SM(yM(t)):t:wt}return n?SM(e)||wt:e}function HR(e,t){const n=WR(t,$h(e));return!(!n||!(oL(n,16384)||32769&n.flags))}function GR(e){Wz(e)||QN(e.expression)&&!e.expression.escapedText&&function(e,t,...n){const r=Dd(e);if(!Jz(r)){const i=tf(r,e.pos);return io.add(fS(r,Us(i),0,t,...n)),!0}}(e,Ca.Line_break_not_permitted_here),e.expression&&zL(e.expression)}function XR(e,t,n){const r=bf(e);if(0===r.length)return;for(const t of Vd(e))n&&4194304&t.flags||QR(e,t,Jv(t,8576,!0),Gl(t));const i=t.valueDeclaration;if(i&&S_(i))for(const t of i.members)if(!$v(t)&&!mu(t)){const n=rs(t);QR(e,n,RL(t.name.expression),Gl(n))}if(r.length>1)for(const t of r)YR(e,t)}function QR(e,t,n,r){const i=t.valueDeclaration,o=jc(i);if(o&&YN(o))return;const a=kf(e,n),s=2&Ox(e)?id(e.symbol,264):void 0,c=i&&226===i.kind||o&&167===o.kind?i:void 0,l=as(t)===e.symbol?i:void 0;for(const n of a){const i=n.declaration&&as(rs(n.declaration))===e.symbol?n.declaration:void 0,o=l||i||(s&&!ee(P_(e),e=>!!Wd(e,t.escapedName)&&!!Sf(e,n.keyType))?s:void 0);if(o&&!zS(r,n.type)){const e=xo(o,Ca.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,Hs(t),Gs(r),Gs(n.keyType),Gs(n.type));c&&o!==c&&ST(e,Vp(c,Ca._0_is_declared_here,Hs(t))),io.add(e)}}}function YR(e,t){const n=t.declaration,r=kf(e,t.keyType),i=2&Ox(e)?id(e.symbol,264):void 0,o=n&&as(rs(n))===e.symbol?n:void 0;for(const n of r){if(n===t)continue;const r=n.declaration&&as(rs(n.declaration))===e.symbol?n.declaration:void 0,a=o||r||(i&&!ee(P_(e),e=>!!xf(e,t.keyType)&&!!Sf(e,n.keyType))?i:void 0);a&&!zS(t.type,n.type)&&So(a,Ca._0_index_type_1_is_not_assignable_to_2_index_type_3,Gs(t.keyType),Gs(t.type),Gs(n.keyType),Gs(n.type))}}function ZR(e,t){switch(e.escapedText){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":So(e,t,e.escapedText)}}function tB(e){let t=!1;if(e)for(let t=0;t{n.default?(t=!0,function(e,t,n){function r(e){if(183===e.kind){const r=Wh(e);if(262144&r.flags)for(let i=n;i263===e.kind||264===e.kind)}(e);if(!n||n.length<=1)return;if(!rB(n,U_(e).localTypeParameters,xl)){const t=Hs(e);for(const e of n)So(e.name,Ca.All_declarations_of_0_must_have_identical_type_parameters,t)}}}function rB(e,t,n){const r=g(t),i=If(t);for(const o of e){const e=n(o),a=e.length;if(ar)return!1;for(let n=0;n1)return zz(r.types[1],Ca.Classes_can_only_extend_a_single_class);t=!0}else{if(Tn.assert(119===r.token),n)return zz(r,Ca.implements_clause_already_seen);n=!0}Tz(r)}})(e)||bz(e.typeParameters,t)}(e),AM(e),nR(e,e.name),tB(xl(e)),dM(e);const t=rs(e),n=U_(t),r=Tu(n),i=Kl(t);nB(t),uM(t),function(e){const t=new Map,n=new Map,r=new Map;for(const o of e.members)if(176===o.kind)for(const e of o.parameters)lc(e,o)&&!O_(e.name)&&i(t,e.name,e.name.escapedText,3);else{const e=$v(o),a=o.name;if(!a)continue;const s=YN(a),c=s&&e?16:0,l=s?r:e?n:t,_=a&&Gz(a);if(_)switch(o.kind){case 177:i(l,a,_,1|c);break;case 178:i(l,a,_,2|c);break;case 172:i(l,a,_,3|c);break;case 174:i(l,a,_,8|c)}}function i(e,t,n,r){const i=e.get(n);if(i)if((16&i)!=(16&r))So(t,Ca.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name,tp(t));else{const o=!!(8&i),a=!!(8&r);o||a?o!==a&&So(t,Ca.Duplicate_identifier_0,tp(t)):i&r&-17?So(t,Ca.Duplicate_identifier_0,tp(t)):e.set(n,i|r)}else e.set(n,r)}}(e);!!(33554432&e.flags)||function(e){for(const t of e.members){const n=t.name;if($v(t)&&n){const t=Gz(n);switch(t){case"name":case"length":case"caller":case"arguments":if(R)break;case"prototype":So(n,Ca.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,t,ac(rs(e)))}}}}(e);const o=Dh(e);if(o){h(o.typeArguments,JB),P<2&&mz(o.parent,1);const t=Ph(e);t&&t!==o&&zL(t.expression);const s=P_(n);s.length&&a(()=>{const t=s[0],a=N_(n),c=wp(a);if(function(e,t){const n=uf(e,1);if(n.length){const r=n[0].declaration;if(r&&Vv(r,2)){gJ(t,Ix(e.symbol))||So(t,Ca.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,La(e.symbol))}}}(c,o),JB(o.expression),ee(o.typeArguments)){h(o.typeArguments,JB);for(const e of v_(c,o.typeArguments,o))if(!nM(o,e.typeParameters))break}const l=Tu(t,n.thisType);if(KS(r,l,void 0)?KS(i,DS(c),e.name||e,Ca.Class_static_side_0_incorrectly_extends_base_class_static_side_1):cB(e,r,l,Ca.Class_0_incorrectly_extends_base_class_1),8650752&a.flags)if(l_(i)){uf(a,1).some(e=>4&e.flags)&&!Wv(e,64)&&So(e.name||e,Ca.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract)}else So(e.name||e,Ca.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);if(!(c.symbol&&32&c.symbol.flags||8650752&a.flags)){h(w_(c,o.typeArguments,o),e=>!RO(e.declaration)&&!PS(mm(e),t))&&So(o.expression,Ca.Base_constructors_must_all_have_the_same_return_type)}!function(e,t){var n,r,i,o,a;const s=Hd(t),c=new Map;e:for(const l of s){const s=lB(l);if(4194304&s.flags)continue;const _=Wd(e,s.escapedName);if(!_)continue;const u=lB(_),d=Sx(s);if(Tn.assert(!!u,"derived should point to something, even if it is the base class' declaration."),u===s){const r=Ix(e.symbol);if(64&d&&(!r||!Wv(r,64))){for(const n of P_(e)){if(n===t)continue;const e=Wd(n,s.escapedName),r=e&&lB(e);if(r&&r!==s)continue e}const i=Gs(t),o=Gs(e),a=Hs(l),_=pe(null==(n=c.get(r))?void 0:n.missedProperties,a);c.set(r,{baseTypeName:i,typeName:o,missedProperties:_})}}else{const n=Sx(u);if(2&d||2&n)continue;let c;const l=98308&s.flags,_=98308&u.flags;if(l&&_){if((6&xx(s)?null==(r=s.declarations)?void 0:r.some(e=>uB(e,d)):null==(i=s.declarations)?void 0:i.every(e=>uB(e,d)))||262144&xx(s)||u.valueDeclaration&&yP(u.valueDeclaration))continue;const c=4!==l&&4===_;if(c||4===l&&4!==_){const n=c?Ca._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:Ca._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;So(jc(u.valueDeclaration)||u.valueDeclaration,n,Hs(s),Gs(t),Gs(e))}else if(R){const r=null==(o=u.declarations)?void 0:o.find(e=>172===e.kind&&!e.initializer);if(r&&!(33554432&u.flags)&&!(64&d)&&!(64&n)&&!(null==(a=u.declarations)?void 0:a.some(e=>!!(33554432&e.flags)))){const n=IC(Ix(e.symbol)),i=r.name;if(r.exclamationToken||!n||!QN(i)||!V||!pB(i,e,n)){const e=Ca.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;So(jc(u.valueDeclaration)||u.valueDeclaration,e,Hs(s),Gs(t))}}}continue}if(HA(s)){if(HA(u)||4&u.flags)continue;Tn.assert(!!(98304&u.flags)),c=Ca.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else c=98304&s.flags?Ca.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:Ca.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;So(jc(u.valueDeclaration)||u.valueDeclaration,c,Gs(t),Hs(s),Gs(e))}}for(const[e,t]of c)if(1===g(t.missedProperties))kP(e)?So(e,Ca.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,Ne(t.missedProperties),t.baseTypeName):So(e,Ca.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,t.typeName,Ne(t.missedProperties),t.baseTypeName);else if(g(t.missedProperties)>5){const n=M(t.missedProperties.slice(0,4),e=>`'${e}'`).join(", "),r=g(t.missedProperties)-4;kP(e)?So(e,Ca.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more,t.baseTypeName,n,r):So(e,Ca.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more,t.typeName,t.baseTypeName,n,r)}else{const n=M(t.missedProperties,e=>`'${e}'`).join(", ");kP(e)?So(e,Ca.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1,t.baseTypeName,n):So(e,Ca.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2,t.typeName,t.baseTypeName,n)}}(n,t)})}!function(e,t,n,r){const i=Dh(e),o=i&&P_(t),a=(null==o?void 0:o.length)?Tu(Ne(o),t.thisType):void 0,s=N_(t);for(const i of e.members)Xv(i)||(SD(i)&&h(i.parameters,o=>{lc(o,i)&&aB(e,r,s,a,t,n,o,!0)}),aB(e,r,s,a,t,n,i,!1))}(e,n,r,i);const s=Eh(e);if(s)for(const e of s)Cb(e.expression)&&!Dl(e.expression)||So(e.expression,Ca.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),iM(e),a(c(e));function c(t){return()=>{const i=Fp(Mx(t));if(!Pc(i))if(I_(i)){const t=i.symbol&&32&i.symbol.flags?Ca.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:Ca.Class_0_incorrectly_implements_interface_1,o=Tu(i,n.thisType);KS(r,o,void 0)||cB(e,r,o,t)}else So(t,Ca.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}a(()=>{XR(n,t),XR(i,t,!0),KL(e),function(e){if(!V||!K||33554432&e.flags)return;const t=IC(e);for(const n of e.members)if(!(128&rb(n))&&!$v(n)&&dB(n)){const e=n.name;if(QN(e)||YN(e)||pD(e)){const r=Kl(rs(n));3&r.flags||vk(r)||t&&pB(e,r,t)||So(n.name,Ca.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,Rp(e))}}}(e)})}function aB(e,t,n,r,i,o,a,s,c=!0){const l=a.name&&xJ(a.name)||xJ(a);return l?sB(e,t,n,r,i,o,Kv(a),Gv(a),$v(a),s,Dc(l),c?a:void 0):0}function sB(e,t,n,r,i,o,a,s,c,l,_,u){const d=zm(e),p=!!(33554432&e.flags);if(r&&(a||k.noImplicitOverride)){const e=Tc(_),i=c?n:r,f=Zp(c?t:o,e),m=Zp(i,e),g=Gs(r);if(f&&!m&&a){if(u){const e=CI(_,i);e?So(u,d?Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:Ca.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,g,Hs(e)):So(u,d?Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:Ca.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,g)}return 2}if(f&&(null==m?void 0:m.declarations)&&k.noImplicitOverride&&!p){const e=ee(m.declarations,Gv);if(a)return 0;if(!e){if(u){So(u,l?d?Ca.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:Ca.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:d?Ca.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:Ca.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0,g)}return 1}if(s&&e)return u&&So(u,Ca.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0,g),1}}else if(a){if(u){const e=Gs(i);So(u,d?Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:Ca.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,e)}return 2}return 0}function cB(e,t,n,r){let i=!1;for(const r of e.members){if($v(r))continue;const e=r.name&&xJ(r.name)||xJ(r);if(e){const o=Zp(t,e.escapedName),a=Zp(n,e.escapedName);if(o&&a){const s=()=>yS(void 0,Ca.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,Hs(e),Gs(t),Gs(n));KS(Kl(o),Kl(a),r.name||r,void 0,s)||(i=!0)}}}i||KS(t,n,e.name||e,r)}function lB(e){return 1&xx(e)?e.links.target:e}function uB(e,t){return 64&t&&(!yD(e)||!e.initializer)||iE(e.parent)}function dB(e){return 172===e.kind&&!Gv(e)&&!e.exclamationToken&&!e.initializer}function pB(e,t,n){const r=pD(e)?aw.createElementAccessExpression(aw.createThis(),e.expression):aw.createPropertyAccessExpression(aw.createThis(),e);qT(r.expression,r),qT(r,n),r.flowNode=n.returnFlowNode;return!vk(qD(r,t,DC(t)))}function fB(e){hz(e)||function(e){let t=!1;if(e.heritageClauses)for(const n of e.heritageClauses){if(96!==n.token)return Tn.assert(119===n.token),zz(n,Ca.Interface_declaration_cannot_have_implements_clause);if(t)return zz(n,Ca.extends_clause_already_seen);t=!0,Tz(n)}}(e),tB(e.typeParameters),a(()=>{ZR(e.name,Ca.Interface_name_cannot_be_0),dM(e);const t=rs(e);nB(t);const n=id(t,264);if(e===n){const n=U_(t),r=Tu(n);if(function(e,t){const n=P_(e);if(n.length<2)return!0;const r=new Map;h(uu(e).declaredProperties,t=>{r.set(t.escapedName,{prop:t,containingType:e})});let i=!0;for(const o of n){const n=Hd(Tu(o,e.thisType));for(const a of n){const n=r.get(a.escapedName);if(n){if(n.containingType!==e&&!Yk(n.prop,a)){i=!1;const r=Gs(n.containingType),s=Gs(o);let c=yS(void 0,Ca.Named_property_0_of_types_1_and_2_are_not_identical,Hs(a),r,s);c=yS(c,Ca.Interface_0_cannot_simultaneously_extend_types_1_and_2,Gs(e),r,s),io.add(Hp(Dd(t),t,c))}}else r.set(a.escapedName,{prop:a,containingType:o})}}return i}(n,e.name)){for(const t of P_(n))KS(r,Tu(t,n.thisType),e.name,Ca.Interface_0_incorrectly_extends_interface_1);XR(n,t)}}HL(e)}),h(Ah(e),e=>{Cb(e.expression)&&!Dl(e.expression)||So(e.expression,Ca.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),iM(e)}),h(e.members,JB),a(()=>{KL(e),jM(e)})}function gB(e){const t=Ho(e);if(!(1024&t.flags)){t.flags|=1024;let n,r=0;for(const t of e.members){const e=hB(t,r,n);Ho(t).enumMemberValue=e,r="number"==typeof e.value?e.value+1:void 0,n=t}}}function hB(e,t,n){if(Jp(e.name))So(e.name,Ca.Computed_property_names_are_not_allowed_in_enums);else{const t=qp(e.name);tC(t)&&!QT(t)&&So(e.name,Ca.An_enum_member_cannot_have_a_numeric_name)}if(e.initializer)return function(e){const t=cf(e.parent),n=e.initializer,r=le(n,e);void 0!==r.value?t&&"number"==typeof r.value&&!isFinite(r.value)?So(n,isNaN(r.value)?Ca.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:Ca.const_enum_member_initializer_was_evaluated_to_a_non_finite_value):RS(k)&&"string"==typeof r.value&&!r.isSyntacticallyString&&So(n,Ca._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,`${wc(e.parent.name)}.${qp(e.name)}`):t?So(n,Ca.const_enum_member_initializers_must_be_constant_expressions):33554432&e.parent.flags?So(n,Ca.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):KS(zL(n),zt,n,Ca.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values);return r}(e);if(33554432&e.parent.flags&&!cf(e.parent))return EC(void 0);if(void 0===t)return So(e.name,Ca.Enum_member_must_have_initializer),EC(void 0);if(RS(k)&&(null==n?void 0:n.initializer)){const t=$J(n);("number"!=typeof t.value||t.resolvedOtherFiles)&&So(e.name,Ca.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled)}return EC(t)}function yB(e,t){const n=Ma(e,111551,!0);if(!n)return EC(void 0);if(80===e.kind){const t=e;if(QT(t.escapedText)&&n===cy(t.escapedText,111551,void 0))return EC(+t.escapedText,!1)}if(8&n.flags)return t?vB(e,n,t):$J(n.valueDeclaration);if(bP(n)){const e=n.valueDeclaration;if(e&&eE(e)&&!e.type&&e.initializer&&(!t||e!==t&&Go(e,t))){const n=le(e.initializer,e);return t&&Dd(t)!==Dd(e)?EC(n.value,!1,!0,!0):EC(n.value,n.isSyntacticallyString,n.resolvedOtherFiles,!0)}}return EC(void 0)}function vB(e,t,n){const r=t.valueDeclaration;if(!r||r===n)return So(e,Ca.Property_0_is_used_before_being_assigned,Hs(t)),EC(void 0);if(!Go(r,n))return So(e,Ca.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),EC(0);const i=$J(r);return n.parent!==r.parent?EC(i.value,i.isSyntacticallyString,i.resolvedOtherFiles,!0):i}function bB(e){a(()=>function(e){hz(e),nR(e,e.name),dM(e),e.members.forEach(xB),gB(e);const t=rs(e),n=id(t,e.kind);if(e===n){if(t.declarations&&t.declarations.length>1){const n=cf(e);h(t.declarations,e=>{aE(e)&&cf(e)!==n&&So(jc(e),Ca.Enum_declarations_must_all_be_const_or_non_const)})}let n=!1;h(t.declarations,e=>{if(266!==e.kind)return!1;const t=e;if(!t.members.length)return!1;const r=t.members[0];r.initializer||(n?So(r.name,Ca.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):n=!0)})}}(e))}function xB(e){YN(e.name)&&So(e,Ca.An_enum_member_cannot_be_named_with_a_private_identifier),e.initializer&&zL(e.initializer)}function SB(e){e.body&&(JB(e.body),vp(e)||jM(e)),a(function(){var t,n;const r=vp(e),i=33554432&e.flags;r&&!i&&So(e.name,Ca.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);const o=pp(e),a=o?Ca.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:Ca.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;if(FB(e,a))return;hz(e)||i||11!==e.name.kind||Uz(e.name,Ca.Only_ambient_modules_can_use_quoted_names);QN(e.name)&&nR(e,e.name);dM(e);const s=rs(e);if(512&s.flags&&!i&&XB(e,WS(k))){if(RS(k)&&!Dd(e).externalModuleIndicator&&So(e.name,Ca.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement,Te),(null==(t=s.declarations)?void 0:t.length)>1){const t=function(e){const t=e.declarations;if(t)for(const e of t)if((263===e.kind||262===e.kind&&Md(e.body))&&!(33554432&e.flags))return e}(s);t&&(Dd(e)!==Dd(t)?So(e.name,Ca.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):e.pos95===e.kind);t&&So(t,Ca.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}}if(o)if(bp(e)){if((r||33554432&rs(e).flags)&&e.body)for(const t of e.body.statements)kB(t,r)}else of(e.parent)?r?So(e.name,Ca.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):Js(ey(e.name))&&So(e.name,Ca.Ambient_module_declaration_cannot_specify_relative_module_name):So(e.name,r?Ca.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:Ca.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)})}function kB(e,t){switch(e.kind){case 243:for(const n of e.declarationList.declarations)kB(n,t);break;case 277:case 278:zz(e,Ca.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 271:case 272:zz(e,Ca.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 208:case 260:const n=e.name;if(O_(n)){for(const e of n.elements)kB(e,t);break}case 263:case 266:case 262:case 264:case 267:case 265:if(t)return}}function TB(e){const t=Fg(e);if(!t||Ld(t))return!1;if(!ON(t))return So(t,Ca.String_literal_expected),!1;const n=268===e.parent.kind&&pp(e.parent.parent);if(307!==e.parent.kind&&!n)return So(t,278===e.kind?Ca.Export_declarations_are_not_permitted_in_a_namespace:Ca.Import_declarations_in_a_namespace_cannot_reference_a_module),!1;if(n&&Js(t.text)&&!rc(e))return So(e,Ca.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1;if(!uE(e)&&e.attributes){const t=118===e.attributes.token?Ca.Import_attribute_values_must_be_string_literal_expressions:Ca.Import_assertion_values_must_be_string_literal_expressions;let n=!1;for(const r of e.attributes.elements)ON(r.value)||(n=!0,So(r.value,t));return!n}return!0}function CB(e){var t,n,r,i;let o=rs(e);const a=Ea(o);if(a!==ht){if(o=ts(o.exportSymbol||o),zm(e)&&!(111551&a.flags)&&!Zl(e)){const s=Xl(e)?e.propertyName||e.name:Ic(e)?e.name:e;if(Tn.assert(280!==e.kind),281===e.kind){const i=So(s,Ca.Types_cannot_appear_in_export_declarations_in_JavaScript_files),o=null==(n=null==(t=Dd(e).symbol)?void 0:t.exports)?void 0:n.get((e.propertyName||e.name).escapedText);if(o===a){const e=null==(r=o.declarations)?void 0:r.find(ju);e&&ST(i,Vp(e,Ca._0_is_automatically_exported_here,Cc(o.escapedName)))}}else{Tn.assert(260!==e.kind);const t=xc(e,fn(dE,uE)),n=(t&&(null==(i=Dg(t))?void 0:i.text))??"...",r=Cc(QN(s)?s.escapedText:o.escapedName);So(s,Ca._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,r,`import("${n}").${r}`)}return}const s=Fa(a);if(s&((1160127&o.flags?111551:0)|(788968&o.flags?788968:0)|(1920&o.flags?1920:0))){So(e,281===e.kind?Ca.Export_declaration_conflicts_with_exported_declaration_of_0:Ca.Import_declaration_conflicts_with_local_declaration_of_0,Hs(o))}else if(281!==e.kind){k.isolatedModules&&!xc(e,Zl)&&1160127&o.flags&&So(e,Ca.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Hs(o),Te)}if(RS(k)&&!Zl(e)&&!(33554432&e.flags)){const t=Oa(o),n=!(111551&s);if(n||t)switch(e.kind){case 273:case 276:case 271:if(k.verbatimModuleSyntax){Tn.assertIsDefined(e.name,"An ImportClause with a symbol should have a name");const r=k.verbatimModuleSyntax&&Mm(e)?Ca.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:n?Ca._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:Ca._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled,i=wc(276===e.kind&&e.propertyName||e.name);Zo(So(e,r,i),n?void 0:t,i)}n&&271===e.kind&&Vv(e,32)&&So(e,Ca.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled,Te);break;case 281:if(k.verbatimModuleSyntax||Dd(t)!==Dd(e)){const r=wc(e.propertyName||e.name);Zo(n?So(e,Ca.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type,Te):So(e,Ca._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled,r,Te),n?void 0:t,r);break}}!k.verbatimModuleSyntax||271===e.kind||zm(e)||1!==A&&1!==Dd(e).impliedNodeFormat||So(e,Ca.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}if(SE(e)){const t=wB(o,e);No(t)&&t.declarations&&Po(e,t.declarations,t.escapedName)}}}function wB(e,t){if(!(2097152&e.flags)||No(e)||!ca(e))return e;const n=Ea(e);if(n===ht)return n;for(;2097152&e.flags;){const r=dA(e);if(!r)break;if(r===n)break;if(r.declarations&&g(r.declarations)){if(No(r)){Po(t,r.declarations,r.escapedName);break}if(e===n)break;e=r}}return n}function NB(e){nR(e,e.name),CB(e),276===e.kind&&"default"===wc(e.propertyName||e.name)&&BS(k)&&4!==A&&(A<5||1===Dd(e).impliedNodeFormat)&&mz(e,131072)}function DB(e){var t;const n=e.attributes;if(n){const r=vy(!0);r!==wn&&KS(hl(n),NC(r,32768),n);const i=uV(e),o=fV(n,i?Uz:void 0),a=118===e.attributes.token;if(i&&o)return;if(99!==(199===A&&e.moduleSpecifier&&ma(e.moduleSpecifier))&&99!==A&&200!==A){return Uz(n,a?199===A?Ca.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:Ca.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:199===A?Ca.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:Ca.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve)}if(JF(e)||(dE(e)?null==(t=e.importClause)?void 0:t.isTypeOnly:e.isTypeOnly))return Uz(n,a?Ca.Import_attributes_cannot_be_used_with_type_only_imports_or_exports:Ca.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);if(o)return Uz(n,Ca.resolution_mode_can_only_be_set_for_type_only_imports)}}function PB(e){if(!FB(e,zm(e)?Ca.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:Ca.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!hz(e)&&e.modifiers&&zz(e,Ca.An_import_declaration_cannot_have_modifiers),TB(e)){const t=e.importClause;if(t&&!function(e){var t;if(e.isTypeOnly&&e.name&&e.namedBindings)return Uz(e,Ca.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both);if(e.isTypeOnly&&275===(null==(t=e.namedBindings)?void 0:t.kind))return Hz(e.namedBindings);return!1}(t)&&(t.name&&NB(t),t.namedBindings))if(274===t.namedBindings.kind)NB(t.namedBindings),4!==A&&(A<5||1===Dd(e).impliedNodeFormat)&&BS(k)&&mz(e,65536);else{Ba(e,e.moduleSpecifier)&&h(t.namedBindings.elements,NB)}}DB(e)}}function EB(e){if(!FB(e,zm(e)?Ca.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:Ca.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!hz(e)&&Uv(e)&&zz(e,Ca.An_export_declaration_cannot_have_modifiers),function(e){var t;if(e.isTypeOnly&&279===(null==(t=e.exportClause)?void 0:t.kind))return Hz(e.exportClause)}(e),!e.moduleSpecifier||TB(e))if(e.exportClause&&!bE(e.exportClause)){h(e.exportClause.elements,IB);const t=268===e.parent.kind&&pp(e.parent.parent),n=!t&&268===e.parent.kind&&!e.moduleSpecifier&&33554432&e.flags;307===e.parent.kind||t||n||So(e,Ca.Export_declarations_are_not_permitted_in_a_namespace)}else{const t=Ba(e,e.moduleSpecifier);t&&Ha(t)?So(e.moduleSpecifier,Ca.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Hs(t)):e.exportClause&&CB(e.exportClause),4!==A&&(A<5||1===Dd(e).impliedNodeFormat)&&(e.exportClause?BS(k)&&mz(e,65536):mz(e,32768))}DB(e)}}function FB(e,t){const n=307===e.parent.kind||268===e.parent.kind||267===e.parent.kind;return n||zz(e,t),!n}function IB(e){if(CB(e),VS(k)&&cc(e.propertyName||e.name,!0),e.parent.parent.moduleSpecifier)BS(k)&&4!==A&&(A<5||1===Dd(e).impliedNodeFormat)&&"default"===wc(e.propertyName||e.name)&&mz(e,131072);else{const t=e.propertyName||e.name,n=Le(t,t.escapedText,2998271,void 0,!0);n&&(n===ue||n===fe||n.declarations&&of(hc(n.declarations[0])))?So(t,Ca.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,wc(t)):MP(e,7)}}function LB(e){const t=rs(e),n=$o(t);if(!n.exportsChecked){const e=t.exports.get("export=");if(e&&function(e){return md(e.exports,(e,t)=>"export="!==t)}(t)){const t=ca(e)||e.valueDeclaration;!t||rc(t)||zm(t)||So(t,Ca.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}const r=Ya(t);r&&r.forEach(({declarations:e,flags:t},n)=>{if("__export"===n)return;if(1920&t)return;const r=I(e,pn(VB,mn(iE)));if(!(524288&t&&r<=2)&&r>1&&!MB(e))for(const t of e)YB(t)&&io.add(Vp(t,Ca.Cannot_redeclare_exported_variable_0,Cc(n)))}),n.exportsChecked=!0}}function MB(e){return e&&e.length>1&&e.every(e=>zm(e)&&qx(e)&&(lg(e.expression)||ug(e.expression)))}function JB(e){if(e){const n=r;r=e,f=0,function(e){Vg(e)&&h(e.jsDoc,({comment:t,tags:n})=>{qB(t),h(n,t=>{qB(t.comment),zm(e)&&JB(t)})});const n=e.kind;if(t)switch(n){case 267:case 263:case 264:case 262:t.throwIfCancellationRequested()}n>=243&&n<=259&&Ug(e)&&e.flowNode&&!uD(e.flowNode)&&To(!1===k.allowUnreachableCode,e,Ca.Unreachable_code_detected);switch(n){case 168:return qL(e);case 169:return UL(e);case 172:return GL(e);case 171:return function(e){return YN(e.name)&&So(e,Ca.Private_identifiers_are_not_allowed_outside_class_bodies),GL(e)}(e);case 185:case 184:case 179:case 180:case 181:return WL(e);case 174:case 173:return function(e){Iz(e)||wz(e.name),bD(e)&&e.asteriskToken&&QN(e.name)&&"constructor"===wc(e.name)&&So(e.name,Ca.Class_constructor_may_not_be_a_generator),OM(e),Wv(e,64)&&174===e.kind&&e.body&&So(e,Ca.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,Rp(e.name)),YN(e.name)&&!om(e)&&So(e,Ca.Private_identifiers_are_not_allowed_outside_class_bodies),XL(e)}(e);case 175:return function(e){hz(e),KI(e,JB)}(e);case 176:return QL(e);case 177:case 178:return ZL(e);case 183:return iM(e);case 182:return function(e){const t=function(e){switch(e.parent.kind){case 219:case 179:case 262:case 218:case 184:case 174:case 173:const t=e.parent;if(e===t.type)return t}}(e);if(!t)return void So(e,Ca.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);const n=$f(t),r=nm(n);if(!r)return;JB(e.type);const{parameterName:i}=e;if(0===r.kind||2===r.kind)Fx(i);else if(r.parameterIndex>=0){if(tJ(n)&&r.parameterIndex===n.parameters.length-1)So(i,Ca.A_type_predicate_cannot_reference_a_rest_parameter);else if(r.type){const t=()=>yS(void 0,Ca.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);KS(r.type,Kl(n.parameters[r.parameterIndex]),e.type,void 0,t)}}else if(i){let n=!1;for(const{name:e}of t.parameters)if(O_(e)&&VL(e,i,r.parameterName)){n=!0;break}n||So(e.parameterName,Ca.Cannot_find_parameter_0,r.parameterName)}}(e);case 186:return function(e){Gh(e)}(e);case 187:return function(e){h(e.members,JB),a(function(){const t=cx(e);XR(t,t.symbol),KL(e),HL(e)})}(e);case 188:return function(e){JB(e.elementType)}(e);case 189:return function(e){let t=!1,n=!1;for(const r of e.elements){let e=Ly(r);if(8&e){const t=Mx(r.type);if(!lT(t)){So(r,Ca.A_rest_element_type_must_be_an_array_type);break}(rT(t)||$T(t)&&4&t.target.combinedFlags)&&(e|=4)}if(4&e){if(n){Uz(r,Ca.A_rest_element_cannot_follow_another_rest_element);break}n=!0}else if(2&e){if(n){Uz(r,Ca.An_optional_element_cannot_follow_a_rest_element);break}t=!0}else if(1&e&&t){Uz(r,Ca.A_required_element_cannot_follow_an_optional_element);break}}h(e.elements,JB),Mx(e)}(e);case 192:case 193:return function(e){h(e.types,JB),Mx(e)}(e);case 196:case 190:case 191:return JB(e.type);case 197:return function(e){Fx(e)}(e);case 198:return cM(e);case 194:return function(e){KI(e,JB)}(e);case 195:return function(e){xc(e,e=>e.parent&&194===e.parent.kind&&e.parent.extendsType===e)||Uz(e,Ca.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),JB(e.typeParameter);const t=rs(e.typeParameter);if(t.declarations&&t.declarations.length>1){const e=$o(t);if(!e.typeParametersChecked){e.typeParametersChecked=!0;const n=q_(t),r=od(t,168);if(!rB(r,[n],e=>[e])){const e=Hs(t);for(const t of r)So(t.name,Ca.All_declarations_of_0_must_have_identical_constraints,e)}}}jM(e)}(e);case 203:return function(e){for(const t of e.templateSpans)JB(t.type),KS(Mx(t.type),dn,t.type);Mx(e)}(e);case 205:return function(e){JB(e.argument),e.attributes&&fV(e.attributes,Uz),oM(e)}(e);case 202:return function(e){e.dotDotDotToken&&e.questionToken&&Uz(e,Ca.A_tuple_member_cannot_be_both_optional_and_rest),190===e.type.kind&&Uz(e.type,Ca.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type),191===e.type.kind&&Uz(e.type,Ca.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type),JB(e.type),Mx(e)}(e);case 328:return function(e){const t=Yg(e);if(!t||!rE(t)&&!kP(t))return void So(t,Ca.JSDoc_0_is_not_attached_to_a_class,wc(e.tagName));const n=ml(t).filter(gF);Tn.assert(n.length>0),n.length>1&&So(n[1],Ca.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);const r=IM(e.class.expression),i=Ph(t);if(i){const t=IM(i.expression);t&&r.escapedText!==t.escapedText&&So(r,Ca.JSDoc_0_1_does_not_match_the_extends_2_clause,wc(e.tagName),wc(r),wc(t))}}(e);case 329:return function(e){const t=Yg(e);t&&(rE(t)||kP(t))||So(t,Ca.JSDoc_0_is_not_attached_to_a_class,wc(e.tagName))}(e);case 346:case 338:case 340:return function(e){e.typeExpression||So(e.name,Ca.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),e.name&&ZR(e.name,Ca.Type_alias_name_cannot_be_0),JB(e.typeExpression),tB(xl(e))}(e);case 345:return function(e){JB(e.constraint);for(const t of e.typeParameters)JB(t)}(e);case 344:return function(e){JB(e.typeExpression)}(e);case 324:case 325:case 326:return function(e){e.name&&bJ(e.name,!0)}(e);case 341:case 348:return function(e){JB(e.typeExpression)}(e);case 317:!function(e){a(function(){e.type||Lg(e)||tw(e,St)}),WL(e)}(e);case 315:case 314:case 312:case 313:case 322:return UB(e),void KI(e,JB);case 318:return void function(e){UB(e),JB(e.type);const{parent:t}=e;if(mD(t)&&_F(t.parent))return void(Ee(t.parent.parameters)!==t&&So(e,Ca.A_rest_parameter_must_be_last_in_a_parameter_list));ZE(t)||So(e,Ca.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const n=e.parent.parent;if(!PF(n))return void So(e,Ca.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const r=Kg(n);if(!r)return;const i=Qg(n);i&&Ee(i.parameters).symbol===r||So(e,Ca.A_rest_parameter_must_be_last_in_a_parameter_list)}(e);case 309:return JB(e.type);case 333:case 335:case 334:return function(e){const t=Zg(e);t&&o_(t)&&So(e,Ca.An_accessibility_modifier_cannot_be_used_with_a_private_identifier)}(e);case 350:return function(e){JB(e.typeExpression);const t=Yg(e);if(t){const e=yl(t,RF);if(g(e)>1)for(let t=1;t{var i;297!==e.kind||n||(void 0===t?t=e:(Uz(e,Ca.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0)),296===e.kind&&a((i=e,()=>{const e=zL(i.expression);gL(r,e)||dk(e,r,i.expression,void 0)})),h(e.statements,JB),k.noFallthroughCasesInSwitch&&e.fallthroughFlowNode&&uD(e.fallthroughFlowNode)&&So(e,Ca.Fallthrough_case_in_switch)}),e.caseBlock.locals&&jM(e.caseBlock)}(e);case 256:return function(e){Wz(e)||xc(e.parent,t=>f_(t)?"quit":256===t.kind&&t.label.escapedText===e.label.escapedText&&(Uz(e.label,Ca.Duplicate_label_0,tp(e.label)),!0)),JB(e.statement)}(e);case 257:return GR(e);case 258:return function(e){Wz(e),XM(e.tryBlock);const t=e.catchClause;if(t){if(t.variableDeclaration){const e=t.variableDeclaration;iR(e);const n=Pv(e);if(n){const e=Mx(n);!e||3&e.flags||zz(n,Ca.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified)}else if(e.initializer)zz(e.initializer,Ca.Catch_clause_variable_cannot_have_an_initializer);else{const e=t.block.locals;e&&gd(t.locals,t=>{const n=e.get(t);(null==n?void 0:n.valueDeclaration)&&2&n.flags&&Uz(n.valueDeclaration,Ca.Cannot_redeclare_identifier_0_in_catch_clause,Cc(t))})}}XM(t.block)}e.finallyBlock&&XM(e.finallyBlock)}(e);case 260:return sR(e);case 208:return cR(e);case 263:return function(e){const t=C(e.modifiers,gD);j&&t&&ee(e.members,e=>Hv(e)&&o_(e))&&Uz(t,Ca.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator),e.name||Wv(e,2048)||zz(e,Ca.A_class_declaration_without_the_default_modifier_must_have_a_name),oB(e),h(e.members,JB),jM(e)}(e);case 264:return fB(e);case 265:return function(e){hz(e),ZR(e.name,Ca.Type_alias_name_cannot_be_0),dM(e),tB(e.typeParameters),141===e.type.kind?WB.has(e.name.escapedText)&&1===g(e.typeParameters)||So(e.type,Ca.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types):(JB(e.type),jM(e))}(e);case 266:return bB(e);case 267:return SB(e);case 272:return PB(e);case 271:return function(e){if(!FB(e,zm(e)?Ca.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:Ca.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)&&(hz(e),Mm(e)||TB(e)))if(NB(e),MP(e,6),283!==e.moduleReference.kind){const t=Ea(rs(e));if(t!==ht){const n=Fa(t);if(111551&n){const t=wb(e.moduleReference);1920&Ma(t,112575).flags||So(t,Ca.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,Rp(t))}788968&n&&ZR(e.name,Ca.Import_name_cannot_be_0)}e.isTypeOnly&&Uz(e,Ca.An_import_alias_cannot_use_import_type)}else!(A>=5&&200!==A&&void 0===Dd(e).impliedNodeFormat)||e.isTypeOnly||33554432&e.flags||Uz(e,Ca.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(e);case 278:return EB(e);case 277:return function(e){if(FB(e,e.isExportEquals?Ca.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:Ca.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration))return;const t=307===e.parent.kind?e.parent:e.parent.parent;if(267===t.kind&&!pp(t))return void(e.isExportEquals?So(e,Ca.An_export_assignment_cannot_be_used_in_a_namespace):So(e,Ca.A_default_export_can_only_be_used_in_an_ECMAScript_style_module));!hz(e)&&qv(e)&&zz(e,Ca.An_export_assignment_cannot_have_modifiers);const n=Pv(e);n&&KS(SL(e.expression),Mx(n),e.expression);const r=!e.isExportEquals&&!(33554432&e.flags)&&k.verbatimModuleSyntax&&(1===A||1===Dd(e).impliedNodeFormat);if(80===e.expression.kind){const t=e.expression,n=ps(Ma(t,-1,!0,!0,e));if(n){MP(e,3);const i=Oa(n,111551);if(111551&Fa(n)?(SL(t),r||33554432&e.flags||!k.verbatimModuleSyntax||!i||So(t,e.isExportEquals?Ca.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:Ca.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,wc(t))):r||33554432&e.flags||!k.verbatimModuleSyntax||So(t,e.isExportEquals?Ca.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:Ca.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,wc(t)),!r&&!(33554432&e.flags)&&RS(k)&&!(111551&n.flags)){const r=Fa(n,!1,!0);!(2097152&n.flags&&788968&r)||111551&r||i&&Dd(i)===Dd(e)?i&&Dd(i)!==Dd(e)&&Zo(So(t,e.isExportEquals?Ca._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:Ca._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,wc(t),Te),i,wc(t)):So(t,e.isExportEquals?Ca._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:Ca._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,wc(t),Te)}}else SL(t);VS(k)&&cc(t,!0)}else SL(e.expression);r&&So(e,Ca.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled),LB(t),33554432&e.flags&&!Cb(e.expression)&&Uz(e.expression,Ca.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),e.isExportEquals&&(A>=5&&200!==A&&(33554432&e.flags&&99===Dd(e).impliedNodeFormat||!(33554432&e.flags)&&1!==Dd(e).impliedNodeFormat)?Uz(e,Ca.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):4!==A||33554432&e.flags||Uz(e,Ca.Export_assignment_is_not_supported_when_module_flag_is_system))}(e);case 242:case 259:return void Wz(e);case 282:(function(e){AM(e)})(e)}}(e),r=n}}function qB(e){ct(e)&&h(e,e=>{Gu(e)&&JB(e)})}function UB(e){if(!zm(e))if(cF(e)||sF(e)){const t=Va(cF(e)?54:58),n=e.postfix?Ca._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:Ca._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1,r=Mx(e.type);Uz(e,n,t,Gs(sF(e)&&r!==Zt&&r!==Yt?dv(pe([r,At],e.postfix?void 0:Rt)):r))}else Uz(e,Ca.JSDoc_types_can_only_be_used_inside_documentation_comments)}function QB(e){const t=Ho(Dd(e));1&t.flags?Tn.assert(!t.deferredNodes,"A type-checked file should have no deferred nodes."):(t.deferredNodes||(t.deferredNodes=new Set),t.deferredNodes.add(e))}function aJ(e){var t,n;null==(t=cr)||t.push(cr.Phase.Check,"checkDeferredNode",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath});const o=r;switch(r=e,f=0,e.kind){case 213:case 214:case 215:case 170:case 286:qI(e);break;case 218:case 219:case 174:case 173:!function(e){Tn.assert(174!==e.kind||Kf(e));const t=$h(e),n=km(e);if(Kj(e,n),e.body)if(Fv(e)||mm($f(e)),241===e.body.kind)JB(e.body);else{const r=zL(e.body),i=n&&WR(n,t);if(i){const n=dO(e.body);YS(2==(3&t)?mM(r,!1,n,Ca.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):r,i,n,n)}}}(e);break;case 177:case 178:ZL(e);break;case 231:!function(e){h(e.members,JB),jM(e)}(e);break;case 168:!function(e){var t,n;if(iE(e.parent)||S_(e.parent)||oE(e.parent)){const r=q_(rs(e)),o=24576&Jk(r);if(o){const a=rs(e.parent);if(!oE(e.parent)||52&Ox(U_(a))){if(8192===o||16384===o){null==(t=cr)||t.push(cr.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:rv(U_(a)),id:rv(r)});const s=Rk(a,r,16384===o?zn:Jn),c=Rk(a,r,16384===o?Jn:zn),l=r;i=r,KS(s,c,e,Ca.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),i=l,null==(n=cr)||n.pop()}}else So(e,Ca.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types)}}}(e);break;case 285:!function(e){qA(e)}(e);break;case 284:!function(e){qA(e.openingElement),xA(e.closingElement.tagName)?NA(e.closingElement):zL(e.closingElement.tagName),kA(e)}(e);break;case 216:case 234:case 217:!function(e){const{type:t}=YO(e),n=lP(e)?t:e,r=Ho(e);Tn.assertIsDefined(r.assertionExpressionType);const i=$C(MT(r.assertionExpressionType)),o=Mx(t);Pc(o)||a(()=>{const e=YC(i);$S(o,e)||dk(i,o,n,Ca.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)})}(e);break;case 222:zL(e.expression);break;case 226:Ob(e)&&qI(e)}r=o,null==(n=cr)||n.pop()}function sJ(t){var n,r;null==(n=cr)||n.push(cr.Phase.Check,"checkSourceFile",{path:t.path},!0),gr("beforeCheck"),function(t){const n=Ho(t);if(!(1&n.flags)){if(wT(t,k,e))return;!function(e){!!(33554432&e.flags)&&function(e){for(const t of e.statements)if((ku(t)||243===t.kind)&&Vz(t))return!0}(e)}(t),L(Gi),L(Xi),L(Qi),L(Yi),L(Zi),h(t.statements,JB),JB(t.endOfFileToken),function(e){const t=Ho(e);t.deferredNodes&&t.deferredNodes.forEach(aJ),t.deferredNodes=void 0}(t),af(t)&&jM(t),a(()=>{t.isDeclarationFile||!k.noUnusedLocals&&!k.noUnusedParameters||LM(lJ(t),(e,t,n)=>{!Nd(e)&&cJ(t,!!(33554432&e.flags))&&io.add(n)}),t.isDeclarationFile||function(){var e;for(const t of Zi)if(!(null==(e=rs(t))?void 0:e.isReferenced)){const e=dc(t);Tn.assert(dy(e),"Only parameter declaration should be checked here");const n=Vp(t.name,Ca._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation,Rp(t.name),Rp(t.propertyName));e.type||ST(n,fS(Dd(e),e.end,1,Ca.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here,Rp(t.propertyName))),io.add(n)}}()}),af(t)&&LB(t),Gi.length&&(h(Gi,YM),L(Gi)),Xi.length&&(h(Xi,ZM),L(Xi)),Qi.length&&(h(Qi,eR),L(Qi)),Yi.length&&(h(Yi,tR),L(Yi)),n.flags|=1}}(t),gr("afterCheck"),hr("Check","beforeCheck","afterCheck"),null==(r=cr)||r.pop()}function cJ(e,t){if(t)return!1;switch(e){case 0:return!!k.noUnusedLocals;case 1:return!!k.noUnusedParameters;default:return Tn.assertNever(e)}}function lJ(e){return fi.get(e.path)||p}function _J(n,r){try{return t=r,function(t){if(t){uJ();const e=io.getGlobalDiagnostics(),n=e.length;dJ(t);const r=io.getDiagnostics(t.fileName),i=io.getGlobalDiagnostics();if(i!==e){return ne(de(e,i,xS),r)}return 0===n&&i.length>0?ne(i,r):r}return h(e.getSourceFiles(),dJ),io.getDiagnostics()}(n)}finally{t=void 0}}function uJ(){for(const e of o)e();o=[]}function dJ(e){uJ();const t=a;a=e=>e(),sJ(e),a=t}function pJ(e){for(;166===e.parent.kind;)e=e.parent;return 183===e.parent.kind}function mJ(e,t){let n,r=om(e);for(;r&&!(n=t(r));)r=om(r);return n}function gJ(e,t){return!!mJ(e,e=>e===t)}function hJ(e){return void 0!==function(e){for(;166===e.parent.kind;)e=e.parent;return 271===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:277===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function yJ(e){if(yh(e))return is(e.parent);if(zm(e)&&211===e.parent.kind&&e.parent===e.parent.parent.left&&!YN(e)&&!tF(e)&&!function(e){if(110===e.expression.kind){const t=lm(e,!1,!1);if(f_(t)){const e=zE(t);if(e){const t=YE(e,BF(e,void 0));return t&&!Sc(t)}}}}(e.parent)){const t=function(e){switch(dg(e.parent.parent)){case 1:case 3:return is(e.parent);case 5:if(rP(e.parent)&&Wx(e.parent)===e)return;case 4:case 2:return rs(e.parent.parent)}}(e);if(t)return t}if(277===e.parent.kind&&Cb(e)){const t=Ma(e,2998271,!0);if(t&&t!==ht)return t}else if(u_(e)&&hJ(e)){const t=Oh(e,271);return Tn.assert(void 0!==t),ja(e,!0)}if(u_(e)){const t=function(e){let t=e.parent;for(;dD(t);)e=t,t=t.parent;if(t&&205===t.kind&&t.qualifier===e)return t}(e);if(t){Mx(t);const n=Ho(e).resolvedSymbol;return n===ht?void 0:n}}for(;Ib(e);)e=e.parent;if(function(e){for(;211===e.parent.kind;)e=e.parent;return 233===e.parent.kind}(e)){let t=0;233===e.parent.kind?(t=Af(e)?788968:111551,Tb(e.parent)&&(t|=111551)):t=1920,t|=2097152;const n=Cb(e)?Ma(e,t,!0):void 0;if(n)return n}if(341===e.parent.kind)return Kg(e.parent);if(168===e.parent.kind&&345===e.parent.parent.kind){Tn.assert(!zm(e));const t=th(e.parent);return t&&t.symbol}if(Em(e)){if(Ld(e))return;const t=xc(e,fn(Gu,eF,tF)),n=t?901119:111551;if(80===e.kind){if(Pm(e)&&xA(e)){const t=NA(e.parent);return t===ht?void 0:t}const r=Ma(e,n,!0,!0,Qg(e));if(!r&&t){const t=xc(e,fn(S_,iE));if(t)return bJ(e,!0,rs(t))}if(r&&t){const t=Zg(e);if(t&&XE(t)&&t===r.valueDeclaration)return Ma(e,n,!0,!0,Dd(t))||r}return r}if(YN(e))return uI(e);if(211===e.kind||166===e.kind){const n=Ho(e);return n.resolvedSymbol?n.resolvedSymbol:(211===e.kind?(aI(e,0),n.resolvedSymbol||(n.resolvedSymbol=vJ(SL(e.expression),Bv(e.name)))):sI(e,0),!n.resolvedSymbol&&t&&dD(e)?bJ(e):n.resolvedSymbol)}if(tF(e))return bJ(e)}else if(pJ(e)){const t=Ma(e,183===e.parent.kind?788968:1920,!1,!0);return t&&t!==ht?t:vh(e)}return 182===e.parent.kind?Ma(e,1):void 0}function vJ(e,t){const n=kf(e,t);if(n.length&&e.members){const t=fg(Ud(e).members);if(n===bf(e))return t;if(t){const r=$o(t),i=M($(n,e=>e.declaration),KB).join(",");if(r.filteredIndexSymbolCache||(r.filteredIndexSymbolCache=new Map),r.filteredIndexSymbolCache.has(i))return r.filteredIndexSymbolCache.get(i);{const t=Eo(131072,"__index");return t.declarations=$(n,e=>e.declaration),t.parent=e.aliasSymbol?e.aliasSymbol:e.symbol?e.symbol:xJ(t.declarations[0].parent),r.filteredIndexSymbolCache.set(i,t),t}}}}function bJ(e,t,n){if(u_(e)){const r=901119;let i=Ma(e,r,t,!0,Qg(e));if(!i&&QN(e)&&n&&(i=ts(Ko(Qa(n),e.escapedText,r))),i)return i}const r=QN(e)?n:bJ(e.left,t,n),i=QN(e)?e.escapedText:e.right.escapedText;if(r){const e=111551&r.flags&&Zp(Kl(r),"prototype");return Zp(e?Kl(e):U_(r),i)}}function xJ(e,t){if(QE(e))return tO(e)?ts(e.symbol):void 0;const{parent:n}=e,r=n.parent;if(!(67108864&e.flags)){if(ZB(e)){const t=rs(n);return Xl(e.parent)&&e.parent.propertyName===e?dA(t):t}if(bh(e))return rs(n.parent);if(80===e.kind){if(hJ(e))return yJ(e);if(208===n.kind&&206===r.kind&&e===n.propertyName){const t=Zp(SJ(r),e.escapedText);if(t)return t}else if(PP(n)&&n.name===e)return 105===n.keywordToken&&"target"===wc(e)?oj(n).symbol:102===n.keywordToken&&"meta"===wc(e)?hy().members.get("meta"):void 0}switch(e.kind){case 80:case 81:case 211:case 166:if(!wv(e))return yJ(e);case 110:const i=lm(e,!1,!1);if(f_(i)){const e=$f(i);if(e.thisParameter)return e.thisParameter}if(Fm(e))return zL(e).symbol;case 197:return Fx(e).symbol;case 108:return zL(e).symbol;case 137:const o=e.parent;return o&&176===o.kind?o.parent.symbol:void 0;case 11:case 15:if(Om(e.parent.parent)&&jm(e.parent.parent)===e||(272===e.parent.kind||278===e.parent.kind)&&e.parent.moduleSpecifier===e||zm(e)&&JF(e.parent)&&e.parent.moduleSpecifier===e||zm(e)&&$m(e.parent,!1)||gf(e.parent)||KD(e.parent)&&yf(e.parent.parent)&&e.parent.parent.argument===e.parent)return Ba(e,e,t);if(oP(n)&&pg(n)&&n.arguments[1]===e)return rs(n);case 9:const a=iP(n)?n.argumentExpression===e?RL(n.expression):void 0:KD(n)&&$D(r)?Mx(r.objectType):void 0;return a&&Zp(a,Tc(e.text));case 90:case 100:case 39:case 86:return is(e.parent);case 205:return yf(e)?xJ(e.argument.literal,t):void 0;case 95:return kE(e.parent)?Tn.checkDefined(e.parent.symbol):void 0;case 102:case 105:return PP(e.parent)?ij(e.parent).symbol:void 0;case 104:if(yP(e.parent)){const t=RL(e.parent.right),n=_L(t);return(null==n?void 0:n.symbol)??t.symbol}return;case 236:return zL(e).symbol;case 295:if(Pm(e)&&xA(e)){const t=NA(e.parent);return t===ht?void 0:t}default:return}}}function SJ(e){if(QE(e)&&!tO(e))return wt;if(67108864&e.flags)return wt;const t=bb(e),n=t&&L_(rs(t.class));if(Af(e)){const t=Mx(e);return n?Tu(t,n.thisType):t}if(Em(e))return TJ(e);if(n&&!t.isImplements){const e=Ce(P_(n));return e?Tu(e,n.thisType):wt}if(aC(e)){return U_(rs(e))}if(80===(r=e).kind&&aC(r.parent)&&jc(r.parent)===r){const t=xJ(e);return t?U_(t):wt}var r;if(eP(e))return Qc(e,!0,0)||wt;if(ku(e)){const t=rs(e);return t?Kl(t):wt}if(ZB(e)){const t=xJ(e);return t?Kl(t):wt}if(O_(e))return Qc(e.parent,!0,0)||wt;if(hJ(e)){const t=xJ(e);if(t){const e=U_(t);return Pc(e)?Kl(t):e}}return PP(e.parent)&&e.parent.keywordToken===e.kind?ij(e.parent):hE(e)?vy(!1):wt}function kJ(e){if(Tn.assert(210===e.kind||209===e.kind),250===e.parent.kind){return fL(e,mR(e.parent)||wt)}if(226===e.parent.kind){return fL(e,RL(e.parent.right)||wt)}if(303===e.parent.kind){const t=pt(e.parent.parent,nP);return dL(t,kJ(t)||wt,rp(t.properties,e.parent))}const t=pt(e.parent,tP),n=kJ(t)||wt,r=gR(65,n,At,e.parent)||wt;return pL(t,n,t.elements.indexOf(e),r)}function TJ(e){return Fb(e)&&(e=e.parent),vx(RL(e))}function CJ(e){const t=is(e.parent);return $v(e)?Kl(t):U_(t)}function wJ(e){const t=e.name;switch(t.kind){case 80:return kx(wc(t));case 9:case 11:return kx(t.text);case 167:const e=sA(t);return aL(e,12288)?e:Jt;default:return Tn.fail("Unsupported property name.")}}function NJ(e){const t=ad(Hd(e=wp(e))),n=uf(e,0).length?Kn:uf(e,1).length?Gn:void 0;return n&&h(Hd(n),e=>{t.has(e.escapedName)||t.set(e.escapedName,e)}),Ss(t)}function DJ(e){return 0!==uf(e,0).length||0!==uf(e,1).length}function PJ(e){if(n_(e))return!1;const t=kc(e,QN);if(!t)return!1;const n=t.parent;if(!n)return!1;return!((rP(n)||HE(n))&&n.name===t)&&oz(t)===xe}function EJ(e,t){var n;const r=kc(e,QN);if(r){let e=oz(r,function(e){return yu(e.parent)&&e===e.parent.name}(r));if(e){if(1048576&e.flags){const n=ts(e.exportSymbol);if(!t&&944&n.flags&&!(3&n.flags))return;e=n}const i=as(e);if(i){if(512&i.flags&&307===(null==(n=i.valueDeclaration)?void 0:n.kind)){const e=i.valueDeclaration;return e!==Dd(r)?void 0:e}return xc(r.parent,e=>yu(e)&&rs(e)===i)}}}}function FJ(e){const t=Kw(e);if(t)return t;const n=kc(e,QN);if(n){const e=function(e){const t=Ho(e).resolvedSymbol;if(t&&t!==ht)return t;return Le(e,e.escapedText,3257279,void 0,!0,void 0)}(n);if(Da(e,111551)&&!Oa(e,111551))return ca(e)}}function AJ(e){if(418&e.flags&&e.valueDeclaration&&!QE(e.valueDeclaration)){const t=$o(e);if(void 0===t.isDeclarationWithCollidingName){const n=Lp(e.valueDeclaration);if(Fd(n)||function(e){return e.valueDeclaration&&eP(e.valueDeclaration)&&299===dc(e.valueDeclaration).parent.kind}(e))if(Le(n.parent,e.escapedName,111551,void 0,!1))t.isDeclarationWithCollidingName=!0;else if(WJ(e.valueDeclaration,16384)){const r=WJ(e.valueDeclaration,32768),i=ou(n,!1),o=241===n.kind&&ou(n.parent,!1);t.isDeclarationWithCollidingName=!(yp(n)||r&&(i||o))}else t.isDeclarationWithCollidingName=!1}return t.isDeclarationWithCollidingName}return!1}function IJ(e){if(!n_(e)){const t=kc(e,QN);if(t){const e=oz(t);if(e&&AJ(e))return e.valueDeclaration}}}function OJ(e){const t=kc(e,ku);if(t){const e=rs(t);if(e)return AJ(e)}return!1}function jJ(e){switch(Tn.assert(Fe),e.kind){case 271:return MJ(rs(e));case 273:case 274:case 276:case 281:const t=rs(e);return!!t&&MJ(t,!0);case 278:const n=e.exportClause;return!!n&&(bE(n)||ee(n.elements,jJ));case 277:return!e.expression||80!==e.expression.kind||MJ(rs(e),!0)}return!1}function LJ(e){const t=kc(e,uE);if(void 0===t||307!==t.parent.kind||!Mm(t))return!1;return MJ(rs(t))&&t.moduleReference&&!Ld(t.moduleReference)}function MJ(e,t){if(!e)return!1;const n=Dd(e.valueDeclaration);Ua(n&&rs(n));const r=ps(Ea(e));return r===ht?!t||!Oa(e):!!(111551&Fa(e,t,!0))&&(WS(k)||!RJ(r))}function RJ(e){return lL(e)||!!e.constEnumOnlyModule}function BJ(e,t){if(Tn.assert(Fe),la(e)){const t=rs(e),n=t&&$o(t);if(null==n?void 0:n.referenced)return!0;const r=$o(t).aliasTarget;if(r&&32&rb(e)&&111551&Fa(r)&&(WS(k)||!RJ(r)))return!0}return!!t&&!!KI(e,e=>BJ(e,t))}function JJ(e){if(Md(e.body)){if(Bu(e)||Ru(e))return!1;const t=Zf(rs(e));return t.length>1||1===t.length&&t[0].declaration!==e}return!1}function zJ(e){return(function(e){return!(!V||Ef(e)||PF(e)||!e.initializer||Wv(e,31))}(e)||function(e){return V&&Ef(e)&&(PF(e)||!e.initializer)&&Wv(e,31)}(e))&&!function(e){const t=pz(e);return!!t&&vk(Mx(t))}(e)}function qJ(e){const t=kc(e,e=>nE(e)||eE(e));if(!t)return!1;let n;if(eE(t)){if(t.type||!zm(t)&&!Yz(t))return!1;const e=ng(t);if(!e||!vu(e))return!1;n=rs(e)}else n=rs(t);return!!(n&&16&n.flags|3)&&!!md(Qa(n),e=>111551&e.flags&&CC(e.valueDeclaration))}function UJ(e){const t=kc(e,nE);if(!t)return p;const n=rs(t);return n&&Hd(Kl(n))||p}function VJ(e){var t;const n=e.id||0;return n<0||n>=Ji.length?0:(null==(t=Ji[n])?void 0:t.flags)||0}function WJ(e,t){return function(e,t){if(!k.noCheck&&NT(Dd(e),k))return;const n=Ho(e);if(n.calculatedFlags&t)return;switch(t){case 16:case 32:return a(e);case 128:case 256:case 2097152:return o(e);case 512:case 8192:case 65536:case 262144:return c(e);case 536870912:return l(e);case 4096:case 32768:case 16384:return u(e);default:return Tn.assertNever(t,`Unhandled node check flag calculation: ${Tn.formatNodeCheckFlags(t)}`)}function r(e,t){const n=t(e,e.parent);if("skip"!==n)return n||GI(e,t)}function i(e){const n=Ho(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=2097536,a(e)}function o(e){r(e,i)}function a(e){Ho(e).calculatedFlags|=48,108===e.kind&&ME(e)}function s(e){const n=Ho(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=336384,l(e)}function c(e){r(e,s)}function l(e){if(Ho(e).calculatedFlags|=536920064,QN(e)&&Em(e)&&(!rP(e.parent)||e.parent.name!==e)){const t=xJ(e,!0);t&&t!==ht&&mE(e,t)}}function _(e){const n=Ho(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=53248,d(e)}function u(e){r(Lp(yh(e)?e.parent:e),_)}function d(e){l(e),pD(e)&&sA(e),YN(e)&&x_(e.parent)&&XL(e.parent)}}(e,t),!!(VJ(e)&t)}function $J(e){return gB(e.parent),Ho(e).enumMemberValue??EC(void 0)}function HJ(e){switch(e.kind){case 306:case 211:case 212:return!0}return!1}function KJ(e){if(306===e.kind)return $J(e).value;Ho(e).resolvedSymbol||SL(e);const t=Ho(e).resolvedSymbol||(Cb(e)?Ma(e,111551,!0):void 0);if(t&&8&t.flags){const e=t.valueDeclaration;if(cf(e.parent))return $J(e).value}}function GJ(e){return!!(524288&e.flags)&&uf(e,0).length>0}function XJ(e,t){var n;const r=kc(e,u_);if(!r)return 0;if(t&&!(t=kc(t)))return 0;let i=!1;if(dD(r)){const e=Ma(wb(r),111551,!0,!0,t);i=!!(null==(n=null==e?void 0:e.declarations)?void 0:n.every(Zl))}const o=Ma(r,111551,!0,!0,t),a=o&&2097152&o.flags?Ea(o):o;i||(i=!(!o||!Oa(o,111551)));const s=Ma(r,788968,!0,!0,t),c=s&&2097152&s.flags?Ea(s):s;if(o||i||(i=!(!s||!Oa(s,788968))),a&&a===c){const e=Ty(!1);if(e&&a===e)return 9;const t=Kl(a);if(t&&p_(t))return i?10:1}if(!c)return i?11:0;const l=U_(c);return Pc(l)?i?11:0:3&l.flags?11:aL(l,245760)?2:aL(l,528)?6:aL(l,296)?3:aL(l,2112)?4:aL(l,402653316)?5:$T(l)?7:aL(l,12288)?8:GJ(l)?10:rT(l)?7:11}function QJ(e,t,n,r){const i=kc(e,Jf);if(!i)return aw.createToken(133);const o=rs(i),a=!o||133120&o.flags?wt:JT(Kl(o));return se.serializeTypeForDeclaration(i,a,o,t,1024|n,r)}function YJ(e){const t=178===(e=kc(e,Tl)).kind?177:178,n=id(rs(e),t);return{firstAccessor:n&&n.pos{if(t)return t=void 0,!0;t=e.expression}):t=n}return t}function nz(e,t,n,r){const i=kc(e,f_);return i?se.serializeReturnTypeForSignature($f(i),t,1024|n,r):aw.createToken(133)}function rz(e,t,n,r){const i=kc(e,nu);if(!i)return aw.createToken(133);const o=YC(TJ(i));return se.expressionOrTypeToTypeNode(i,o,void 0,t,1024|n,r)}function iz(e){return _e.has(Tc(e))}function oz(e,t){const n=Ho(e).resolvedSymbol;if(n)return n;let r=e;if(t){const t=e.parent;ku(t)&&e===t.name&&(r=hc(t))}return Le(r,e.escapedText,3257279,void 0,!0)}function az(e){if(!n_(e)){const t=kc(e,QN);if(t){const e=oz(t);if(e)return ps(e).valueDeclaration}}}function cz(e){if(!n_(e)){const t=kc(e,QN);if(t){const e=oz(t);if(e)return O(ps(e).declarations,e=>{switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 304:case 306:case 210:case 262:case 218:case 219:case 263:case 231:case 266:case 174:case 177:case 178:case 267:return!0}return!1})}}}function lz(e){return!!(lf(e)||eE(e)&&Yz(e))&&bx(Kl(rs(e)))}function _z(e,t){return function(e,t,n){const r=1056&e.flags?se.symbolToExpression(e.symbol,111551,t,void 0,n):e===Wt?aw.createTrue():e===Ut&&aw.createFalse();if(r)return r;const i=e.value;return"object"==typeof i?aw.createBigIntLiteral(i):"string"==typeof i?aw.createStringLiteral(i):i<0?aw.createPrefixUnaryExpression(41,aw.createNumericLiteral(-i)):aw.createNumericLiteral(i)}(Kl(rs(e)),e,t)}function uz(e){return e?(ho(e),Dd(e).localJsxFactory||Zr):Zr}function dz(e){if(e){const t=Dd(e);if(t){if(t.localJsxFragmentFactory)return t.localJsxFragmentFactory;const e=t.pragmas.get("jsxfrag"),n=ct(e)?e[0]:e;if(n)return t.localJsxFragmentFactory=ZI(n.arguments.factory,P),t.localJsxFragmentFactory}}if(k.jsxFragmentFactory)return ZI(k.jsxFragmentFactory,P)}function pz(e){const t=Pv(e);if(t)return t;if(169===e.kind&&178===e.parent.kind){const t=YJ(e.parent).getAccessor;if(t)return Fv(t)}}function fz(e){const t=267===e.kind?dt(e.name,ON):Fg(e),n=Ja(t,t,void 0);if(n)return id(n,307)}function mz(e,t){if(k.importHelpers){const n=Dd(e);if(kp(n,k)&&!(33554432&e.flags)){const r=function(e,t){const n=Ho(e);n.externalHelpersModule||(n.externalHelpersModule=za(function(e){Tn.assert(k.importHelpers,"Expected importHelpers to be enabled");const t=e.imports[0];return Tn.assert(t&&my(t)&&"tslib"===t.text,"Expected sourceFile.imports[0] to be the synthesized tslib import"),t}(e),td,Ca.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,t)||ht);return n.externalHelpersModule}(n,e);if(r!==ht){const n=$o(r);if(n.requestedExternalEmitHelpers??(n.requestedExternalEmitHelpers=0),(n.requestedExternalEmitHelpers&t)!==t){const i=t&~n.requestedExternalEmitHelpers;for(let t=1;t<=16777216;t<<=1)if(i&t)for(const n of gz(t)){const i=Pa(Ko(Ya(r),Tc(n),111551));i?524288&t?ee(Zf(i),e=>gj(e)>3)||So(e,Ca.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,td,n,4):1048576&t?ee(Zf(i),e=>gj(e)>4)||So(e,Ca.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,td,n,5):1024&t&&(ee(Zf(i),e=>gj(e)>2)||So(e,Ca.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,td,n,3)):So(e,Ca.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,td,n)}}n.requestedExternalEmitHelpers|=t}}}}function gz(e){switch(e){case 1:return["__extends"];case 2:return["__assign"];case 4:return["__rest"];case 8:return j?["__decorate"]:["__esDecorate","__runInitializers"];case 16:return["__metadata"];case 32:return["__param"];case 64:return["__awaiter"];case 128:return["__generator"];case 256:return["__values"];case 512:return["__read"];case 1024:return["__spreadArray"];case 2048:return["__await"];case 4096:return["__asyncGenerator"];case 8192:return["__asyncDelegator"];case 16384:return["__asyncValues"];case 32768:return["__exportStar"];case 65536:return["__importStar"];case 131072:return["__importDefault"];case 262144:return["__makeTemplateObject"];case 524288:return["__classPrivateFieldGet"];case 1048576:return["__classPrivateFieldSet"];case 2097152:return["__classPrivateFieldIn"];case 4194304:return["__setFunctionName"];case 8388608:return["__propKey"];case 16777216:return["__addDisposableResource","__disposeResources"];default:return Tn.fail("Unrecognized helper")}}function hz(e){var t;const n=function(e){const t=function(e){return RA(e)?C(e.modifiers,gD):void 0}(e);return t&&zz(t,Ca.Decorators_are_not_valid_here)}(e)||function(e){if(!e.modifiers)return!1;const t=function(e){switch(e.kind){case 177:case 178:case 176:case 172:case 171:case 174:case 173:case 181:case 267:case 272:case 271:case 278:case 277:case 218:case 219:case 169:case 168:return;case 175:case 303:case 304:case 270:case 282:return C(e.modifiers,__);default:if(268===e.parent.kind||307===e.parent.kind)return;switch(e.kind){case 262:return yz(e,134);case 263:case 185:return yz(e,128);case 231:case 264:case 265:return C(e.modifiers,__);case 243:return 4&e.declarationList.flags?yz(e,135):C(e.modifiers,__);case 266:return yz(e,87);default:Tn.assertNever(e)}}}(e);return t&&zz(t,Ca.Modifiers_cannot_appear_here)}(e);if(void 0!==n)return n;if(mD(e)&&kv(e))return zz(e,Ca.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);const r=LP(e)?7&e.declarationList.flags:0;let i,o,a,s,c,l=0,_=!1,u=!1;for(const n of e.modifiers)if(gD(n)){if(!Sm(j,e,e.parent,e.parent.parent))return 174!==e.kind||Md(e.body)?zz(e,Ca.Decorators_are_not_valid_here):zz(e,Ca.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(j&&(177===e.kind||178===e.kind)){const t=YJ(e);if(Zv(t.firstAccessor)&&e===t.secondAccessor)return zz(e,Ca.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}if(-34849&l)return Uz(n,Ca.Decorators_are_not_valid_here);if(u&&98303&l){Tn.assertIsDefined(c);return!Jz(Dd(n))&&(ST(So(n,Ca.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),Vp(c,Ca.Decorator_used_before_export_here)),!0)}l|=32768,98303&l?32&l&&(_=!0):u=!0,c??(c=n)}else{if(148!==n.kind){if(171===e.kind||173===e.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_type_member,Va(n.kind));if(181===e.kind&&(126!==n.kind||!S_(e.parent)))return Uz(n,Ca._0_modifier_cannot_appear_on_an_index_signature,Va(n.kind))}if(103!==n.kind&&147!==n.kind&&87!==n.kind&&168===e.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_type_parameter,Va(n.kind));switch(n.kind){case 87:{if(266!==e.kind&&168!==e.kind)return Uz(e,Ca.A_class_member_cannot_have_the_0_keyword,Va(87));const t=IF(e.parent)&&Yg(e.parent)||e.parent;if(168===e.kind&&!(g_(t)||S_(t)||ED(t)||FD(t)||CD(t)||wD(t)||vD(t)))return Uz(n,Ca._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class,Va(n.kind));break}case 164:if(16&l)return Uz(n,Ca._0_modifier_already_seen,"override");if(128&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"override","declare");if(8&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"override","readonly");if(512&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"override","accessor");if(1024&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"override","async");l|=16,s=n;break;case 125:case 124:case 123:const u=nc(ub(n.kind));if(7&l)return Uz(n,Ca.Accessibility_modifier_already_seen);if(16&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,u,"override");if(256&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,u,"static");if(512&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,u,"accessor");if(8&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,u,"readonly");if(1024&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,u,"async");if(268===e.parent.kind||307===e.parent.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_module_or_namespace_element,u);if(64&l)return 123===n.kind?Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,u,"abstract"):Uz(n,Ca._0_modifier_must_precede_1_modifier,u,"abstract");if(o_(e))return Uz(n,Ca.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);l|=ub(n.kind);break;case 126:if(256&l)return Uz(n,Ca._0_modifier_already_seen,"static");if(8&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"static","readonly");if(1024&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"static","async");if(512&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"static","accessor");if(268===e.parent.kind||307===e.parent.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(169===e.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_parameter,"static");if(64&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(16&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"static","override");l|=256,i=n;break;case 129:if(512&l)return Uz(n,Ca._0_modifier_already_seen,"accessor");if(8&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"accessor","readonly");if(128&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"accessor","declare");if(172!==e.kind)return Uz(n,Ca.accessor_modifier_can_only_appear_on_a_property_declaration);l|=512;break;case 148:if(8&l)return Uz(n,Ca._0_modifier_already_seen,"readonly");if(172!==e.kind&&171!==e.kind&&181!==e.kind&&169!==e.kind)return Uz(n,Ca.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);if(512&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"readonly","accessor");l|=8;break;case 95:if(k.verbatimModuleSyntax&&!(33554432&e.flags)&&265!==e.kind&&264!==e.kind&&267!==e.kind&&307===e.parent.kind&&(1===A||1===Dd(e).impliedNodeFormat))return Uz(n,Ca.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(32&l)return Uz(n,Ca._0_modifier_already_seen,"export");if(128&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"export","declare");if(64&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"export","abstract");if(1024&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"export","async");if(S_(e.parent))return Uz(n,Ca._0_modifier_cannot_appear_on_class_elements_of_this_kind,"export");if(169===e.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_parameter,"export");if(4===r)return Uz(n,Ca._0_modifier_cannot_appear_on_a_using_declaration,"export");if(6===r)return Uz(n,Ca._0_modifier_cannot_appear_on_an_await_using_declaration,"export");l|=32;break;case 90:const d=307===e.parent.kind?e.parent:e.parent.parent;if(267===d.kind&&!pp(d))return Uz(n,Ca.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);if(4===r)return Uz(n,Ca._0_modifier_cannot_appear_on_a_using_declaration,"default");if(6===r)return Uz(n,Ca._0_modifier_cannot_appear_on_an_await_using_declaration,"default");if(!(32&l))return Uz(n,Ca._0_modifier_must_precede_1_modifier,"export","default");if(_)return Uz(c,Ca.Decorators_are_not_valid_here);l|=2048;break;case 138:if(128&l)return Uz(n,Ca._0_modifier_already_seen,"declare");if(1024&l)return Uz(n,Ca._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(16&l)return Uz(n,Ca._0_modifier_cannot_be_used_in_an_ambient_context,"override");if(S_(e.parent)&&!yD(e))return Uz(n,Ca._0_modifier_cannot_appear_on_class_elements_of_this_kind,"declare");if(169===e.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_parameter,"declare");if(4===r)return Uz(n,Ca._0_modifier_cannot_appear_on_a_using_declaration,"declare");if(6===r)return Uz(n,Ca._0_modifier_cannot_appear_on_an_await_using_declaration,"declare");if(33554432&e.parent.flags&&268===e.parent.kind)return Uz(n,Ca.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);if(o_(e))return Uz(n,Ca._0_modifier_cannot_be_used_with_a_private_identifier,"declare");if(512&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"declare","accessor");l|=128,o=n;break;case 128:if(64&l)return Uz(n,Ca._0_modifier_already_seen,"abstract");if(263!==e.kind&&185!==e.kind){if(174!==e.kind&&172!==e.kind&&177!==e.kind&&178!==e.kind)return Uz(n,Ca.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(263!==e.parent.kind||!Wv(e.parent,64)){return Uz(n,172===e.kind?Ca.Abstract_properties_can_only_appear_within_an_abstract_class:Ca.Abstract_methods_can_only_appear_within_an_abstract_class)}if(256&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(2&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"private","abstract");if(1024&l&&a)return Uz(a,Ca._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");if(16&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"abstract","override");if(512&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"abstract","accessor")}if(Ic(e)&&81===e.name.kind)return Uz(n,Ca._0_modifier_cannot_be_used_with_a_private_identifier,"abstract");l|=64;break;case 134:if(1024&l)return Uz(n,Ca._0_modifier_already_seen,"async");if(128&l||33554432&e.parent.flags)return Uz(n,Ca._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(169===e.kind)return Uz(n,Ca._0_modifier_cannot_appear_on_a_parameter,"async");if(64&l)return Uz(n,Ca._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");l|=1024,a=n;break;case 103:case 147:{const r=103===n.kind?8192:16384,i=103===n.kind?"in":"out",o=IF(e.parent)&&(Yg(e.parent)||C(null==(t=eh(e.parent))?void 0:t.tags,OF))||e.parent;if(168!==e.kind||o&&!(iE(o)||S_(o)||oE(o)||OF(o)))return Uz(n,Ca._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias,i);if(l&r)return Uz(n,Ca._0_modifier_already_seen,i);if(8192&r&&16384&l)return Uz(n,Ca._0_modifier_must_precede_1_modifier,"in","out");l|=r;break}}}return 176===e.kind?256&l?Uz(i,Ca._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):16&l?Uz(s,Ca._0_modifier_cannot_appear_on_a_constructor_declaration,"override"):!!(1024&l)&&Uz(a,Ca._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):(272===e.kind||271===e.kind)&&128&l?Uz(o,Ca.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):169===e.kind&&31&l&&O_(e.name)?Uz(e,Ca.A_parameter_property_may_not_be_declared_using_a_binding_pattern):169===e.kind&&31&l&&e.dotDotDotToken?Uz(e,Ca.A_parameter_property_cannot_be_declared_using_a_rest_parameter):!!(1024&l)&&function(e,t){switch(e.kind){case 174:case 262:case 218:case 219:return!1}return Uz(t,Ca._0_modifier_cannot_be_used_here,"async")}(e,a)}function yz(e,t){const n=C(e.modifiers,__);return n&&n.kind!==t?n:void 0}function vz(e,t=Ca.Trailing_comma_not_allowed){return!(!e||!e.hasTrailingComma)&&qz(e[0],e.end-1,1,t)}function bz(e,t){if(e&&0===e.length){const n=e.pos-1;return qz(t,n,ds(t.text,e.end)+1-n,Ca.Type_parameter_list_cannot_be_empty)}return!1}function xz(e){if(P>=3){const t=e.body&&jP(e.body)&&_A(e.body.statements);if(t){const n=O(e.parameters,e=>!!e.initializer||O_(e.name)||Qu(e));if(g(n)){h(n,e=>{ST(So(e,Ca.This_parameter_is_not_allowed_with_use_strict_directive),Vp(t,Ca.use_strict_directive_used_here))});const e=n.map((e,t)=>Vp(e,0===t?Ca.Non_simple_parameter_declared_here:Ca.and_here));return ST(So(t,Ca.use_strict_directive_cannot_be_used_with_non_simple_parameter_list),...e),!0}}}return!1}function Sz(e){const t=Dd(e);return hz(e)||bz(e.typeParameters,t)||function(e){let t=!1;const n=e.length;for(let r=0;r1||e.typeParameters.hasTrailingComma||e.typeParameters[0].constraint)&&t&&Bo(t.fileName,[".mts",".cts"])&&Uz(e.typeParameters[0],Ca.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);const{equalsGreaterThanToken:n}=e,r=ns(t,n.pos).line,i=ns(t,n.end).line;return r!==i&&Uz(n,Ca.Line_terminator_not_permitted_before_arrow)}(e,t)||g_(e)&&xz(e)}function kz(e,t){return vz(t)||function(e,t){if(t&&0===t.length){const n=Dd(e),r=t.pos-1;return qz(n,r,ds(n.text,t.end)+1-r,Ca.Type_argument_list_cannot_be_empty)}return!1}(e,t)}function Tz(e){const t=e.types;if(vz(t))return!0;if(t&&0===t.length){const n=Va(e.token);return qz(e,t.pos,0,Ca._0_list_cannot_be_empty,n)}return ee(t,Cz)}function Cz(e){return CP(e)&&_D(e.expression)&&e.typeArguments?Uz(e,Ca.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments):kz(e,e.typeArguments)}function wz(e){if(167!==e.kind)return!1;const t=e;return 226===t.expression.kind&&28===t.expression.operatorToken.kind&&Uz(t.expression,Ca.A_comma_expression_is_not_allowed_in_a_computed_property_name)}function Nz(e){if(e.asteriskToken){if(Tn.assert(262===e.kind||218===e.kind||174===e.kind),33554432&e.flags)return Uz(e.asteriskToken,Ca.Generators_are_not_allowed_in_an_ambient_context);if(!e.body)return Uz(e.asteriskToken,Ca.An_overload_signature_cannot_be_declared_as_a_generator)}}function Dz(e,t){return!!e&&Uz(e,t)}function Pz(e,t){return!!e&&Uz(e,t)}function Ez(e){if(Wz(e))return!0;if(250===e.kind&&e.awaitModifier&&!(65536&e.flags)){const t=Dd(e);if(um(e)){if(!Jz(t))switch(kp(t,k)||io.add(Vp(e.awaitModifier,Ca.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)),A){case 100:case 199:if(1===t.impliedNodeFormat){io.add(Vp(e.awaitModifier,Ca.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));break}case 7:case 99:case 4:if(P>=4)break;default:io.add(Vp(e.awaitModifier,Ca.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher))}}else if(!Jz(t)){const t=Vp(e.awaitModifier,Ca.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules),n=rm(e);if(n&&176!==n.kind){Tn.assert(!(2&$h(n)),"Enclosing function should never be an async function.");ST(t,Vp(n,Ca.Did_you_mean_to_mark_this_function_as_async))}return io.add(t),!0}}if(VP(e)&&!(65536&e.flags)&&QN(e.initializer)&&"async"===e.initializer.escapedText)return Uz(e.initializer,Ca.The_left_hand_side_of_a_for_of_statement_may_not_be_async),!1;if(261===e.initializer.kind){const t=e.initializer;if(!Rz(t)){const n=t.declarations;if(!n.length)return!1;if(n.length>1){const n=249===e.kind?Ca.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:Ca.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return zz(t.declarations[1],n)}const r=n[0];if(r.initializer){const t=249===e.kind?Ca.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:Ca.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return Uz(r.name,t)}if(r.type){return Uz(r,249===e.kind?Ca.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:Ca.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}}return!1}function Fz(e){if(e.parameters.length===(177===e.kind?1:2))return Sv(e)}function Az(e,t){if(function(e){return Qh(e)&&!du(e)}(e))return Uz(e,t)}function Iz(e){if(Sz(e))return!0;if(174===e.kind){if(210===e.parent.kind){if(e.modifiers&&(1!==e.modifiers.length||134!==Ne(e.modifiers).kind))return zz(e,Ca.Modifiers_cannot_appear_here);if(Dz(e.questionToken,Ca.An_object_member_cannot_be_declared_optional))return!0;if(Pz(e.exclamationToken,Ca.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===e.body)return qz(e,e.end-1,1,Ca._0_expected,"{")}if(Nz(e))return!0}if(S_(e.parent)){if(P<2&&YN(e.name))return Uz(e.name,Ca.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(33554432&e.flags)return Az(e.name,Ca.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(174===e.kind&&!e.body)return Az(e.name,Ca.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(264===e.parent.kind)return Az(e.name,Ca.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(187===e.parent.kind)return Az(e.name,Ca.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function Oz(e){return Kh(e)||224===e.kind&&41===e.operator&&9===e.operand.kind}function jz(e){const t=e.initializer;if(t){const r=!(Oz(t)||function(e){if((rP(e)||iP(e)&&Oz(e.argumentExpression))&&Cb(e.expression))return!!(1056&SL(e).flags)}(t)||112===t.kind||97===t.kind||(n=t,10===n.kind||224===n.kind&&41===n.operator&&10===n.operand.kind));if(!(lf(e)||eE(e)&&Yz(e))||e.type)return Uz(t,Ca.Initializers_are_not_allowed_in_ambient_contexts);if(r)return Uz(t,Ca.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference)}var n}function Lz(e){if(80===e.kind){if("__esModule"===wc(e))return function(e,t,n,...r){if(!Jz(Dd(t)))return bo(e,t,n,...r),!0;return!1}("noEmit",e,Ca.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else{const t=e.elements;for(const e of t)if(!TP(e))return Lz(e.name)}return!1}function Mz(e){if(80===e.kind){if("let"===e.escapedText)return Uz(e,Ca.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else{const t=e.elements;for(const e of t)TP(e)||Mz(e.name)}return!1}function Rz(e){const t=e.declarations;if(vz(e.declarations))return!0;if(!e.declarations.length)return qz(e,t.pos,t.end-t.pos,Ca.Variable_declaration_list_cannot_be_empty);const n=7&e.flags;return 4!==n&&6!==n||!UP(e.parent)?6===n&&nL(e):Uz(e,4===n?Ca.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:Ca.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration)}function Bz(e){switch(e.kind){case 245:case 246:case 247:case 254:case 248:case 249:case 250:return!1;case 256:return Bz(e.parent)}return!0}function Jz(e){return e.parseDiagnostics.length>0}function zz(e,t,...n){const r=Dd(e);if(!Jz(r)){const i=tf(r,e.pos);return io.add(fS(r,i.start,i.length,t,...n)),!0}return!1}function qz(e,t,n,r,...i){const o=Dd(e);return!Jz(o)&&(io.add(fS(o,t,n,r,...i)),!0)}function Uz(e,t,...n){return!Jz(Dd(e))&&(io.add(Vp(e,t,...n)),!0)}function Vz(e){return 264!==e.kind&&265!==e.kind&&272!==e.kind&&271!==e.kind&&278!==e.kind&&277!==e.kind&&270!==e.kind&&!Wv(e,2208)&&zz(e,Ca.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function Wz(e){if(33554432&e.flags){if(!Ho(e).hasReportedStatementInAmbientContext&&(f_(e.parent)||k_(e.parent)))return Ho(e).hasReportedStatementInAmbientContext=zz(e,Ca.An_implementation_cannot_be_declared_in_ambient_contexts);if(241===e.parent.kind||268===e.parent.kind||307===e.parent.kind){const t=Ho(e.parent);if(!t.hasReportedStatementInAmbientContext)return t.hasReportedStatementInAmbientContext=zz(e,Ca.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function $z(e){const t=tp(e).includes("."),n=16&e.numericLiteralFlags;if(t||n)return;+e.text<=2**53-1||ko(!1,Vp(e,Ca.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}function Hz(e){return!!h(e.elements,e=>{if(e.isTypeOnly)return zz(e,276===e.kind?Ca.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:Ca.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement)})}function Kz(e,t,n){if(1048576&t.flags&&2621440&e.flags){const r=cN(t,e);if(r)return r;const i=Hd(e);if(i){const e=oN(i,t);if(e){const r=Ik(t,M(e,e=>[()=>Kl(e),e.escapedName]),n);if(r!==t)return r}}}}function Gz(e){const t=Yh(e);return t||(pD(e)?tN(RL(e.expression)):void 0)}function Xz(e){return be===e?Ie:(be=e,Ie=fc(e))}function Qz(e){return ve===e?Ae:(ve=e,Ae=gc(e))}function Yz(e){const t=7&Qz(e);return 2===t||4===t||6===t}}function YB(e){return 262!==e.kind&&174!==e.kind||!!e.body}function ZB(e){switch(e.parent.kind){case 276:case 281:return QN(e);default:return yh(e)}}function eJ(e){switch(e){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function tJ(e){return!!(1&e.flags)}function nJ(e){return!!(2&e.flags)}(IB=AB||(AB={})).JSX="JSX",IB.IntrinsicElements="IntrinsicElements",IB.ElementClass="ElementClass",IB.ElementAttributesPropertyNameContainer="ElementAttributesProperty",IB.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",IB.Element="Element",IB.ElementType="ElementType",IB.IntrinsicAttributes="IntrinsicAttributes",IB.IntrinsicClassAttributes="IntrinsicClassAttributes",IB.LibraryManagedAttributes="LibraryManagedAttributes";var rJ=class e{constructor(t,n,r){var i;for(this.moduleResolverHost=void 0,this.inner=void 0,this.disableTrackSymbol=!1;n instanceof e;)n=n.inner;this.inner=n,this.moduleResolverHost=r,this.context=t,this.canTrackSymbol=!!(null==(i=this.inner)?void 0:i.trackSymbol)}trackSymbol(e,t,n){var r,i;if((null==(r=this.inner)?void 0:r.trackSymbol)&&!this.disableTrackSymbol){if(this.inner.trackSymbol(e,t,n))return this.onDiagnosticReported(),!0;262144&e.flags||((i=this.context).trackedSymbols??(i.trackedSymbols=[])).push([e,t,n])}return!1}reportInaccessibleThisError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleThisError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(e){var t;(null==(t=this.inner)?void 0:t.reportPrivateInBaseOfClassExpression)&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(e))}reportInaccessibleUniqueSymbolError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleUniqueSymbolError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){var e;(null==(e=this.inner)?void 0:e.reportCyclicStructureError)&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(e){var t;(null==(t=this.inner)?void 0:t.reportLikelyUnsafeImportRequiredError)&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(e))}reportTruncationError(){var e;(null==(e=this.inner)?void 0:e.reportTruncationError)&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(e,t,n){var r;(null==(r=this.inner)?void 0:r.reportNonlocalAugmentation)&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(e,t,n))}reportNonSerializableProperty(e){var t;(null==(t=this.inner)?void 0:t.reportNonSerializableProperty)&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(e))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(e){var t;(null==(t=this.inner)?void 0:t.reportInferenceFallback)&&this.inner.reportInferenceFallback(e)}};function iJ(e,t,n,r){if(void 0===e)return e;const i=t(e);let o;return void 0!==i?(o=ct(i)?(r||gJ)(i):i,Tn.assertNode(o,n),o):void 0}function oJ(e,t,n,r,i){if(void 0===e)return e;const o=e.length;let a;(void 0===r||r<0)&&(r=0),(void 0===i||i>o-r)&&(i=o-r);let s=-1,c=-1;r>0||io-r)&&(i=o-r),sJ(e,t,n,r,i)}function sJ(e,t,n,r,i){let o;const a=e.length;(r>0||i=2&&(i=function(e,t){let n;for(let r=0;r{const o=rl,addSource:F,setSourceContent:A,addName:I,addMapping:O,appendSourceMap:function(e,t,n,r,i,o){Tn.assert(e>=S,"generatedLine cannot backtrack"),Tn.assert(t>=0,"generatedCharacter cannot be negative"),s();const a=[];let l;const _=wJ(n.mappings);for(const s of _){if(o&&(s.generatedLine>o.line||s.generatedLine===o.line&&s.generatedCharacter>o.character))break;if(i&&(s.generatedLineJSON.stringify(R())};function F(t){s();const n=xa(r,t,e.getCurrentDirectory(),e.getCanonicalFileName,!0);let i=u.get(n);return void 0===i&&(i=_.length,_.push(n),l.push(t),u.set(n,i)),c(),i}function A(e,t){if(s(),null!==t){for(o||(o=[]);o.length=S,"generatedLine cannot backtrack"),Tn.assert(t>=0,"generatedCharacter cannot be negative"),Tn.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),Tn.assert(void 0===r||r>=0,"sourceLine cannot be negative"),Tn.assert(void 0===i||i>=0,"sourceCharacter cannot be negative"),s(),(function(e,t){return!D||S!==e||k!==t}(e,t)||function(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n&&T===e&&(C>t||C===t&&w>n)}(n,r,i))&&(L(),S=e,k=t,P=!1,E=!1,D=!0),void 0!==n&&void 0!==r&&void 0!==i&&(T=n,C=r,w=i,P=!0,void 0!==o&&(N=o,E=!0)),c()}function j(e){p.push(e),p.length>=1024&&M()}function L(){if(D&&(!x||m!==S||g!==k||h!==T||y!==C||v!==w||b!==N)){if(s(),m0&&(f+=String.fromCharCode.apply(void 0,p),p.length=0)}function R(){return L(),M(),{version:3,file:t,sourceRoot:n,sources:_,names:d,mappings:f,sourcesContent:o}}function B(e){e<0?e=1+(-e<<1):e<<=1;do{let t=31&e;(e>>=5)>0&&(t|=32),j(PJ(t))}while(e>0)}}var yJ=/\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,vJ=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,bJ=/^\s*(\/\/[@#] .*)?$/;function xJ(e,t){return{getLineCount:()=>t.length,getLineText:n=>e.substring(t[n],t[n+1])}}function SJ(e){for(let t=e.getLineCount()-1;t>=0;t--){const n=e.getLineText(t),r=vJ.exec(n);if(r)return r[1].trimEnd();if(!n.match(bJ))break}}function kJ(e){return"string"==typeof e||null===e}function TJ(e){return null!==e&&"object"==typeof e&&3===e.version&&"string"==typeof e.file&&"string"==typeof e.mappings&&ct(e.sources)&&T(e.sources,_t)&&(void 0===e.sourceRoot||null===e.sourceRoot||"string"==typeof e.sourceRoot)&&(void 0===e.sourcesContent||null===e.sourcesContent||ct(e.sourcesContent)&&T(e.sourcesContent,kJ))&&(void 0===e.names||null===e.names||ct(e.names)&&T(e.names,_t))}function CJ(e){try{const t=JSON.parse(e);if(TJ(t))return t}catch{}}function wJ(e){let t,n=!1,r=0,i=0,o=0,a=0,s=0,c=0,l=0;return{get pos(){return r},get error(){return t},get state(){return _(!0,!0)},next(){for(;!n&&r=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;const o=EJ(e.charCodeAt(r));if(-1===o)return d("Invalid character in VLQ"),-1;t=!!(32&o),i|=(31&o)<>=1,i=-i):i>>=1,i}}function NJ(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex}function DJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function PJ(e){return e>=0&&e<26?65+e:e>=26&&e<52?97+e-26:e>=52&&e<62?48+e-52:62===e?43:63===e?47:Tn.fail(`${e}: not a base64 value`)}function EJ(e){return e>=65&&e<=90?e-65:e>=97&&e<=122?e-97+26:e>=48&&e<=57?e-48+52:43===e?62:47===e?63:-1}function FJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function AJ(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function IJ(e,t){return Tn.assert(e.sourceIndex===t.sourceIndex),It(e.sourcePosition,t.sourcePosition)}function OJ(e,t){return It(e.generatedPosition,t.generatedPosition)}function jJ(e){return e.sourcePosition}function LJ(e){return e.generatedPosition}function MJ(e,t,n){const r=Vo(n),i=t.sourceRoot?ta(t.sourceRoot,r):r,o=ta(t.file,r),a=e.getSourceFileLike(o),s=t.sources.map(e=>ta(e,i)),c=new Map(s.map((t,n)=>[e.getCanonicalFileName(t),n]));let l,_,u;return{getSourcePosition:function(e){const t=function(){if(void 0===_){const e=[];for(const t of f())e.push(t);_=ce(e,OJ,AJ)}return _}();if(!ee(t))return e;let n=Le(t,e.pos,LJ,It);n<0&&(n=~n);const r=t[n];if(void 0===r||!FJ(r))return e;return{fileName:s[r.sourceIndex],pos:r.sourcePosition}},getGeneratedPosition:function(t){const n=c.get(e.getCanonicalFileName(t.fileName));if(void 0===n)return t;const r=function(e){if(void 0===u){const e=[];for(const t of f()){if(!FJ(t))continue;let n=e[t.sourceIndex];n||(e[t.sourceIndex]=n=[]),n.push(t)}u=e.map(e=>ce(e,IJ,AJ))}return u[e]}(n);if(!ee(r))return t;let i=Le(r,t.pos,jJ,It);i<0&&(i=~i);const a=r[i];if(void 0===a||a.sourceIndex!==n)return t;return{fileName:o,pos:a.generatedPosition}}};function d(n){const r=void 0!==a?Xa(a,n.generatedLine,n.generatedCharacter,!0):-1;let i,o;if(DJ(n)){const r=e.getSourceFileLike(s[n.sourceIndex]);i=t.sources[n.sourceIndex],o=void 0!==r?Xa(r,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:r,source:i,sourceIndex:n.sourceIndex,sourcePosition:o,nameIndex:n.nameIndex}}function f(){if(void 0===l){const n=wJ(t.mappings),r=We(n,d);void 0!==n.error?(e.log&&e.log(`Encountered error while decoding sourcemap: ${n.error}`),l=p):l=r}return l}}var RJ={getSourcePosition:yt,getGeneratedPosition:yt};function BJ(e){return(e=bc(e))?KB(e):0}function JJ(e){return!!e&&(!(!xE(e)&&!CE(e))&&ee(e.elements,zJ))}function zJ(e){return void 0!==e.propertyName?"default"===e.propertyName.escapedText:"default"===e.name.escapedText}function qJ(e,t){return function(n){return 307===n.kind?t(n):function(n){return e.factory.createBundle(M(n.sourceFiles,t))}(n)}}function UJ(e){return!!Ag(e)}function VJ(e){if(Ag(e))return!0;const t=e.importClause&&e.importClause.namedBindings;if(!t)return!1;if(!xE(t))return!1;let n=0;for(const e of t.elements)zJ(e)&&n++;return n>0&&n!==t.elements.length||!!(t.elements.length-n)&&Ig(e)}function WJ(e){return!VJ(e)&&(Ig(e)||!!e.importClause&&xE(e.importClause.namedBindings)&&JJ(e.importClause.namedBindings))}function $J(e,t){const n=e.getEmitResolver(),r=e.getCompilerOptions(),i=[],o=new XJ,a=[],s=new Map,c=new Set;let l,_,u=!1,d=!1,p=!1,f=!1;for(const n of t.statements)switch(n.kind){case 272:i.push(n),!p&&VJ(n)&&(p=!0),!f&&WJ(n)&&(f=!0);break;case 271:283===n.moduleReference.kind&&i.push(n);break;case 278:if(n.moduleSpecifier)if(n.exportClause)if(i.push(n),CE(n.exportClause))g(n),f||(f=JJ(n.exportClause));else{const e=n.exportClause.name;s.get(wc(e))||(KJ(a,BJ(n),e),s.set(wc(e),!0),l=pe(l,e)),p=!0}else i.push(n),d=!0;else g(n);break;case 277:n.isExportEquals&&!_&&(_=n);break;case 243:if(Wv(n,32))for(const e of n.declarationList.declarations)l=HJ(e,s,l,a);break;case 262:Wv(n,32)&&h(n,void 0,Wv(n,2048));break;case 263:if(Wv(n,32))if(Wv(n,2048))u||(KJ(a,BJ(n),e.factory.getDeclarationName(n)),u=!0);else{const e=n.name;e&&!s.get(wc(e))&&(KJ(a,BJ(n),e),s.set(wc(e),!0),l=pe(l,e))}}const m=kA(e.factory,e.getEmitHelperFactory(),t,r,d,p,f);return m&&i.unshift(m),{externalImports:i,exportSpecifiers:o,exportEquals:_,hasExportStarsToExportValues:d,exportedBindings:a,exportedNames:l,exportedFunctions:c,externalHelpersImportDeclaration:m};function g(e){for(const t of pt(e.exportClause,CE).elements)if(!s.get(wc(t.name))){const r=t.propertyName||t.name;e.moduleSpecifier||o.add(r,t);const i=n.getReferencedImportDeclaration(r)||n.getReferencedValueDeclaration(r);if(i){if(262===i.kind){h(i,t.name,"default"===t.name.escapedText);continue}KJ(a,BJ(i),t.name)}s.set(wc(t.name),!0),l=pe(l,t.name)}}function h(t,n,r){c.add(t),r?u||(KJ(a,BJ(t),n??e.factory.getDeclarationName(t)),u=!0):(n??(n=t.name),s.get(wc(n))||(KJ(a,BJ(t),n),s.set(wc(n),!0)))}}function HJ(e,t,n,r){if(O_(e.name))for(const i of e.name.elements)TP(i)||(n=HJ(i,t,n,r));else if(!n_(e.name)){const i=wc(e.name);t.get(i)||(t.set(i,!0),n=pe(n,e.name),sA(e.name)&&KJ(r,BJ(e),e.name))}return n}function KJ(e,t,n){let r=e[t];return r?r.push(n):e[t]=r=[n],r}var GJ=class e{constructor(){this._map=new Map}get size(){return this._map.size}has(t){return this._map.has(e.toKey(t))}get(t){return this._map.get(e.toKey(t))}set(t,n){return this._map.set(e.toKey(t),n),this}delete(t){var n;return(null==(n=this._map)?void 0:n.delete(e.toKey(t)))??!1}clear(){this._map.clear()}values(){return this._map.values()}static toKey(t){if(r_(t)||n_(t)){const n=t.emitNode.autoGenerate;if(4==(7&n.flags)){const r=cI(t),i=kl(r)&&r!==t?e.toKey(r):`(generated@${KB(r)})`;return uI(!1,n.prefix,i,n.suffix,e.toKey)}{const t=`(auto@${n.id})`;return uI(!1,n.prefix,t,n.suffix,e.toKey)}}return YN(t)?wc(t).slice(1):wc(t)}},XJ=class extends GJ{add(e,t){let n=this.get(e);return n?n.push(t):this.set(e,n=[t]),n}remove(e,t){const n=this.get(e);n&&(rn(n,t),n.length||this.delete(e))}};function QJ(e){return Ku(e)||9===e.kind||jh(e.kind)||QN(e)}function YJ(e){return!QN(e)&&QJ(e)}function ZJ(e){return e>=65&&e<=79}function ez(e){switch(e){case 65:return 40;case 66:return 41;case 67:return 42;case 68:return 43;case 69:return 44;case 70:return 45;case 71:return 48;case 72:return 49;case 73:return 50;case 74:return 51;case 75:return 52;case 79:return 53;case 76:return 57;case 77:return 56;case 78:return 61}}function tz(e){if(!RP(e))return;const t=mh(e.expression);return mf(t)?t:void 0}function nz(e,t,n){for(let r=t;rfunction(e,t,n){return yD(e)&&(!!e.initializer||!t)&&Hv(e)===n}(e,t,n))}function oz(e){return yD(t=e)&&Hv(t)||xD(e);var t}function az(e){return O(e.members,oz)}function sz(e){return 172===e.kind&&void 0!==e.initializer}function cz(e){return!$v(e)&&(w_(e)||T_(e))&&YN(e.name)}function lz(e){let t;if(e){const n=e.parameters,r=n.length>0&&kv(n[0]),i=r?1:0,o=r?n.length-1:n.length;for(let e=0;emz(e.privateEnv,t))}function yz(e){return!e.initializer&&QN(e.name)}function vz(e){return T(e,yz)}var bz=(e=>(e[e.All=0]="All",e[e.ObjectRest=1]="ObjectRest",e))(bz||{});function xz(e,t,n,r,i,o){let a,s,c=e;if(kb(e))for(a=e.right;Mb(e.left)||Lb(e.left);){if(!kb(a))return Tn.checkDefined(iJ(a,t,nu));c=e=a,a=e.right}const l={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:_,emitBindingOrAssignment:function(e,r,i,a){Tn.assertNode(e,o?QN:nu);const s=o?o(e,r,i):vI(n.factory.createAssignment(Tn.checkDefined(iJ(e,t,nu)),r),i);s.original=a,_(s)},createArrayBindingOrAssignmentPattern:e=>function(e,t){return Tn.assertEachNode(t,U_),e.createArrayLiteralExpression(M(t,e.converters.convertToArrayAssignmentElement))}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return Tn.assertEachNode(t,z_),e.createObjectLiteralExpression(M(t,e.converters.convertToObjectAssignmentElement))}(n.factory,e),createArrayBindingOrAssignmentElement:Pz,visitor:t};if(a&&(a=iJ(a,t,nu),Tn.assert(a),QN(a)&&Sz(e,a.escapedText)||kz(e)?a=Dz(l,a,!1,c):i?a=Dz(l,a,!0,c):my(e)&&(c=a)),Cz(l,e,a,c,kb(e)),a&&i){if(!ee(s))return a;s.push(a)}return n.factory.inlineExpressions(s)||n.factory.createOmittedExpression();function _(e){s=pe(s,e)}}function Sz(e,t){const n=PA(e);return B_(n)?function(e,t){const n=OA(e);for(const e of n)if(Sz(e,t))return!0;return!1}(n,t):!!QN(n)&&n.escapedText===t}function kz(e){const t=AA(e);if(t&&pD(t)&&!Wl(t.expression))return!0;const n=PA(e);return!!n&&B_(n)&&!!h(OA(n),kz)}function Tz(e,t,n,r,i,o=!1,a){let s;const c=[],l=[],_={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:o,emitExpression:function(e){s=pe(s,e)},emitBindingOrAssignment:u,createArrayBindingOrAssignmentPattern:e=>function(e,t){return Tn.assertEachNode(t,L_),e.createArrayBindingPattern(t)}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return Tn.assertEachNode(t,eP),e.createObjectBindingPattern(t)}(n.factory,e),createArrayBindingOrAssignmentElement:e=>function(e,t){return e.createBindingElement(void 0,void 0,t)}(n.factory,e),visitor:t};if(eE(e)){let t=DA(e);t&&(QN(t)&&Sz(e,t.escapedText)||kz(e))&&(t=Dz(_,Tn.checkDefined(iJ(t,_.visitor,nu)),!1,t),e=n.factory.updateVariableDeclaration(e,e.name,void 0,void 0,t))}if(Cz(_,e,i,e,a),s){const e=n.factory.createTempVariable(void 0);if(o){const t=n.factory.inlineExpressions(s);s=void 0,u(e,t,void 0,void 0)}else{n.hoistVariableDeclaration(e);const t=Ee(c);t.pendingExpressions=pe(t.pendingExpressions,n.factory.createAssignment(e,t.value)),ge(t.pendingExpressions,s),t.value=e}}for(const{pendingExpressions:e,name:t,value:r,location:i,original:o}of c){const a=n.factory.createVariableDeclaration(t,void 0,void 0,e?n.factory.inlineExpressions(pe(e,r)):r);a.original=o,vI(a,i),l.push(a)}return l;function u(e,t,r,i){Tn.assertNode(e,p_),s&&(t=n.factory.inlineExpressions(pe(s,t)),s=void 0),c.push({pendingExpressions:s,name:e,value:t,location:r,original:i})}}function Cz(e,t,n,r,i){const o=PA(t);if(!i){const i=iJ(DA(t),e.visitor,nu);i?n?(n=function(e,t,n,r){return t=Dz(e,t,!0,r),e.context.factory.createConditionalExpression(e.context.factory.createTypeCheck(t,"undefined"),void 0,n,void 0,t)}(e,n,i,r),!YJ(i)&&B_(o)&&(n=Dz(e,n,!0,r))):n=i:n||(n=e.context.factory.createVoidZero())}J_(o)?function(e,t,n,r,i){const o=OA(n),a=o.length;if(1!==a){r=Dz(e,r,!M_(t)||0!==a,i)}let s,c;for(let t=0;t=1)||98304&l.transformFlags||98304&PA(l).transformFlags||pD(t)){s&&(e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n),s=void 0);const o=Nz(e,r,t);pD(t)&&(c=pe(c,o.argumentExpression)),Cz(e,l,o,l)}else s=pe(s,iJ(l,e.visitor,R_))}}s&&e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n)}(e,t,o,n,r):q_(o)?function(e,t,n,r,i){const o=OA(n),a=o.length;if(e.level<1&&e.downlevelIteration)r=Dz(e,vI(e.context.getEmitHelperFactory().createReadHelper(r,a>0&&EA(o[a-1])?void 0:a),i),!1,i);else if(1!==a&&(e.level<1||0===a)||T(o,TP)){r=Dz(e,r,!M_(t)||0!==a,i)}let s,c;for(let t=0;t=1)if(65536&n.transformFlags||e.hasTransformedPriorElement&&!wz(n)){e.hasTransformedPriorElement=!0;const t=e.context.factory.createTempVariable(void 0);e.hoistTempVariables&&e.context.hoistVariableDeclaration(t),c=pe(c,[t,n]),s=pe(s,e.createArrayBindingOrAssignmentElement(t))}else s=pe(s,n);else{if(TP(n))continue;if(EA(n)){if(t===a-1){const i=e.context.factory.createArraySliceCall(r,t);Cz(e,n,i,n)}}else{const i=e.context.factory.createElementAccessExpression(r,t);Cz(e,n,i,n)}}}s&&e.emitBindingOrAssignment(e.createArrayBindingOrAssignmentPattern(s),r,i,n);if(c)for(const[t,n]of c)Cz(e,n,t,n)}(e,t,o,n,r):e.emitBindingOrAssignment(o,n,r,t)}function wz(e){const t=PA(e);if(!t||TP(t))return!0;const n=AA(e);if(n&&!Zh(n))return!1;const r=DA(e);return!(r&&!YJ(r))&&(B_(t)?T(OA(t),wz):QN(t))}function Nz(e,t,n){const{factory:r}=e.context;if(pD(n)){const r=Dz(e,Tn.checkDefined(iJ(n.expression,e.visitor,nu)),!1,n);return e.context.factory.createElementAccessExpression(t,r)}if(Kh(n)){const i=r.cloneNode(n);return e.context.factory.createElementAccessExpression(t,i)}{const r=e.context.factory.createIdentifier(wc(n));return e.context.factory.createPropertyAccessExpression(t,r)}}function Dz(e,t,n,r){if(QN(t)&&n)return t;{const n=e.context.factory.createTempVariable(void 0);return e.hoistTempVariables?(e.context.hoistVariableDeclaration(n),e.emitExpression(vI(e.context.factory.createAssignment(n,t),r))):e.emitBindingOrAssignment(n,t,r,void 0),n}}function Pz(e){return e}function Ez(e,t,n=e.createThis()){const r=e.createAssignment(t,n),i=e.createExpressionStatement(r),o=e.createBlock([i],!1),a=e.createClassStaticBlockDeclaration(o);return lw(a).classThis=t,a}function Fz(e){var t;if(!xD(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return RP(n)&&xb(n.expression,!0)&&QN(n.expression.left)&&(null==(t=e.emitNode)?void 0:t.classThis)===n.expression.left&&110===n.expression.right.kind}function Az(e){var t;return!!(null==(t=e.emitNode)?void 0:t.classThis)&&ee(e.members,Fz)}function Iz(e,t,n,r){if(Az(t))return t;const i=Ez(e,n,r);t.name&&hw(i.body.statements[0],t.name);const o=e.createNodeArray([i,...t.members]);vI(o,t.members);const a=rE(t)?e.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o):e.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o);return lw(a).classThis=n,a}function Oz(e,t,n){const r=bc(hA(n));return(rE(r)||nE(r))&&!r.name&&Wv(r,2048)?e.createStringLiteral("default"):e.createStringLiteralFromNode(t)}function jz(e,t,n){const{factory:r}=e;if(void 0!==n){return{assignedName:r.createStringLiteral(n),name:t}}if(Zh(t)||YN(t)){return{assignedName:r.createStringLiteralFromNode(t),name:t}}if(Zh(t.expression)&&!QN(t.expression)){return{assignedName:r.createStringLiteralFromNode(t.expression),name:t}}const i=r.getGeneratedNameForNode(t);e.hoistVariableDeclaration(i);const o=e.getEmitHelperFactory().createPropKeyHelper(t.expression),a=r.createAssignment(i,o);return{assignedName:i,name:r.updateComputedPropertyName(t,a)}}function Lz(e,t,n=e.factory.createThis()){const{factory:r}=e,i=e.getEmitHelperFactory().createSetFunctionNameHelper(n,t),o=r.createExpressionStatement(i),a=r.createBlock([o],!1),s=r.createClassStaticBlockDeclaration(a);return lw(s).assignedName=t,s}function Mz(e){var t;if(!xD(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return RP(n)&&FN(n.expression,"___setFunctionName")&&n.expression.arguments.length>=2&&n.expression.arguments[1]===(null==(t=e.emitNode)?void 0:t.assignedName)}function Rz(e){var t;return!!(null==(t=e.emitNode)?void 0:t.assignedName)&&ee(e.members,Mz)}function Bz(e){return!!e.name||Rz(e)}function Jz(e,t,n,r){if(Rz(t))return t;const{factory:i}=e,o=Lz(e,n,r);t.name&&hw(o.body.statements[0],t.name);const a=N(t.members,Fz)+1,s=t.members.slice(0,a),c=t.members.slice(a),l=i.createNodeArray([...s,o,...c]);return vI(l,t.members),lw(t=rE(t)?i.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l):i.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l)).assignedName=n,t}function zz(e,t,n,r){if(r&&ON(n)&&Dm(n))return t;const{factory:i}=e,o=hA(t),a=kP(o)?pt(Jz(e,o,n),kP):e.getEmitHelperFactory().createSetFunctionNameHelper(o,n);return i.restoreOuterExpressions(t,a)}function qz(e,t,n,r){switch(t.kind){case 303:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=jz(e,t.name,r),s=zz(e,t.initializer,o,n);return i.updatePropertyAssignment(t,a,s)}(e,t,n,r);case 304:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Oz(i,t.name,t.objectAssignmentInitializer),a=zz(e,t.objectAssignmentInitializer,o,n);return i.updateShorthandPropertyAssignment(t,t.name,a)}(e,t,n,r);case 260:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Oz(i,t.name,t.initializer),a=zz(e,t.initializer,o,n);return i.updateVariableDeclaration(t,t.name,t.exclamationToken,t.type,a)}(e,t,n,r);case 169:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Oz(i,t.name,t.initializer),a=zz(e,t.initializer,o,n);return i.updateParameterDeclaration(t,t.modifiers,t.dotDotDotToken,t.name,t.questionToken,t.type,a)}(e,t,n,r);case 208:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Oz(i,t.name,t.initializer),a=zz(e,t.initializer,o,n);return i.updateBindingElement(t,t.dotDotDotToken,t.propertyName,t.name,a)}(e,t,n,r);case 172:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=jz(e,t.name,r),s=zz(e,t.initializer,o,n);return i.updatePropertyDeclaration(t,t.modifiers,a,t.questionToken??t.exclamationToken,t.type,s)}(e,t,n,r);case 226:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Oz(i,t.left,t.right),a=zz(e,t.right,o,n);return i.updateBinaryExpression(t,t.left,t.operatorToken,a)}(e,t,n,r);case 277:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):i.createStringLiteral(t.isExportEquals?"":"default"),a=zz(e,t.expression,o,n);return i.updateExportAssignment(t,t.modifiers,a)}(e,t,n,r)}}var Uz=(e=>(e[e.LiftRestriction=0]="LiftRestriction",e[e.All=1]="All",e))(Uz||{});function Vz(e,t,n,r,i,o){const a=iJ(t.tag,n,nu);Tn.assert(a);const s=[void 0],c=[],l=[],_=t.template;if(0===o&&!Ey(_))return fJ(t,n,e);const{factory:u}=e;if(MN(_))c.push(Wz(u,_)),l.push($z(u,_,r));else{c.push(Wz(u,_.head)),l.push($z(u,_.head,r));for(const e of _.templateSpans)c.push(Wz(u,e.literal)),l.push($z(u,e.literal,r)),s.push(Tn.checkDefined(iJ(e.expression,n,nu)))}const d=e.getEmitHelperFactory().createTemplateObjectHelper(u.createArrayLiteralExpression(c),u.createArrayLiteralExpression(l));if(tO(r)){const e=u.createUniqueName("templateObject");i(e),s[0]=u.createLogicalOr(e,u.createAssignment(e,d))}else s[0]=d;return u.createCallExpression(a,void 0,s)}function Wz(e,t){return 26656&t.templateFlags?e.createVoidZero():e.createStringLiteral(t.text)}function $z(e,t,n){let r=t.rawText;if(void 0===r){Tn.assertIsDefined(n,"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."),r=Yd(n,t);const e=15===t.kind||18===t.kind;r=r.substring(1,r.length-(e?1:2))}return r=r.replace(/\r\n?/g,"\n"),vI(e.createStringLiteral(r),t)}var Hz=!1;function Kz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getEmitResolver(),c=e.getCompilerOptions(),l=OS(c),_=jS(c),u=!!c.experimentalDecorators,d=c.emitDecoratorMetadata?Qz(e):void 0,p=e.onEmitNode,f=e.onSubstituteNode;let m,g,h,y,v,b,x,S;return e.onEmitNode=function(e,t,n){const r=S,i=m;QE(t)&&(m=t);2&x&&function(e){return 267===bc(e).kind}(t)&&(S|=2);8&x&&function(e){return 266===bc(e).kind}(t)&&(S|=8);p(e,t,n),S=r,m=i},e.onSubstituteNode=function(e,n){if(n=f(e,n),1===e)return function(e){switch(e.kind){case 80:return function(e){return Ne(e)||e}(e);case 211:case 212:return function(e){return De(e)}(e)}return e}(n);if(KE(n))return function(e){if(2&x){const n=e.name,r=Ne(n);if(r){if(e.objectAssignmentInitializer){const i=t.createAssignment(r,e.objectAssignmentInitializer);return vI(t.createPropertyAssignment(n,i),e)}return vI(t.createPropertyAssignment(n,r),e)}}return e}(n);return n},e.enableSubstitution(211),e.enableSubstitution(212),function(e){if(308===e.kind)return function(e){return t.createBundle(e.sourceFiles.map(k))}(e);return k(e)};function k(t){if(t.isDeclarationFile)return t;m=t;const n=T(t,B);return Ow(n,e.readEmitHelpers()),m=void 0,n}function T(e,t){const n=y,r=v,i=b;!function(e){switch(e.kind){case 307:case 269:case 268:case 241:y=e,v=void 0;break;case 263:case 262:if(Wv(e,128))break;e.name?se(e):Tn.assert(263===e.kind||Wv(e,2048))}}(e);const o=t(e);return y!==n&&(v=r),y=n,b=i,o}function C(e){return T(e,w)}function w(e){return 1&e.transformFlags?R(e):e}function N(e){return T(e,D)}function D(n){switch(n.kind){case 272:case 271:case 277:case 278:return function(n){if(function(e){const t=kc(e);if(t===e||kE(e))return!1;if(!t||t.kind!==e.kind)return!0;switch(e.kind){case 272:if(Tn.assertNode(t,dE),e.importClause!==t.importClause)return!0;if(e.attributes!==t.attributes)return!0;break;case 271:if(Tn.assertNode(t,uE),e.name!==t.name)return!0;if(e.isTypeOnly!==t.isTypeOnly)return!0;if(e.moduleReference!==t.moduleReference&&(u_(e.moduleReference)||u_(t.moduleReference)))return!0;break;case 278:if(Tn.assertNode(t,TE),e.exportClause!==t.exportClause)return!0;if(e.attributes!==t.attributes)return!0}return!1}(n))return 1&n.transformFlags?fJ(n,C,e):n;switch(n.kind){case 272:return function(e){if(!e.importClause)return e;if(e.importClause.isTypeOnly)return;const n=iJ(e.importClause,de,pE);return n?t.updateImportDeclaration(e,void 0,n,e.moduleSpecifier,e.attributes):void 0}(n);case 271:return ye(n);case 277:return function(t){return c.verbatimModuleSyntax||s.isValueAliasDeclaration(t)?fJ(t,C,e):void 0}(n);case 278:return function(e){if(e.isTypeOnly)return;if(!e.exportClause||bE(e.exportClause))return e;const n=!!c.verbatimModuleSyntax,r=iJ(e.exportClause,e=>function(e,n){return bE(e)?function(e){return t.updateNamespaceExport(e,Tn.checkDefined(iJ(e.name,C,QN)))}(e):function(e,n){const r=oJ(e.elements,he,wE);return n||ee(r)?t.updateNamedExports(e,r):void 0}(e,n)}(e,n),Ml);return r?t.updateExportDeclaration(e,void 0,e.isTypeOnly,r,e.moduleSpecifier,e.attributes):void 0}(n);default:Tn.fail("Unhandled ellided statement")}}(n);default:return w(n)}}function P(e){return T(e,E)}function E(e){if(278!==e.kind&&272!==e.kind&&273!==e.kind&&(271!==e.kind||283!==e.moduleReference.kind))return 1&e.transformFlags||Wv(e,32)?R(e):e}function F(n){return r=>T(r,r=>function(n,r){switch(n.kind){case 176:return function(n){if(!X(n))return;return t.updateConstructorDeclaration(n,void 0,lJ(n.parameters,C,e),function(n,r){const a=r&&O(r.parameters,e=>lc(e,r));if(!ee(a))return uJ(n,C,e);let s=[];i();const c=t.copyPrologue(n.statements,s,!1,C),l=rz(n.statements,c),_=$(a,Y);l.length?Q(s,n.statements,c,l,0,_):(ge(s,_),ge(s,oJ(n.statements,C,wu,c)));s=t.mergeLexicalEnvironment(s,o());const u=t.createBlock(vI(t.createNodeArray(s),n.statements),!0);return vI(u,n),cw(u,n),u}(n.body,n))}(n);case 172:return function(e,n){const r=33554432&e.flags||Wv(e,64);if(r&&(!u||!Zv(e)))return;let i=S_(n)?oJ(e.modifiers,r?j:C,D_):oJ(e.modifiers,I,D_);if(i=U(i,e,n),r)return t.updatePropertyDeclaration(e,ne(i,t.createModifiersFromModifierFlags(128)),Tn.checkDefined(iJ(e.name,C,d_)),void 0,void 0,void 0);return t.updatePropertyDeclaration(e,i,G(e),void 0,void 0,iJ(e.initializer,C,nu))}(n,r);case 177:return re(n,r);case 178:return ie(n,r);case 174:return Z(n,r);case 175:return fJ(n,C,e);case 240:return n;case 181:return;default:return Tn.failBadSyntaxKind(n)}}(r,n))}function A(e){return t=>T(t,t=>function(e,t){switch(e.kind){case 303:case 304:case 305:return C(e);case 177:return re(e,t);case 178:return ie(e,t);case 174:return Z(e,t);default:return Tn.failBadSyntaxKind(e)}}(t,e))}function I(e){return gD(e)?void 0:C(e)}function j(e){return __(e)?void 0:C(e)}function L(e){if(!gD(e)&&!(28895&ub(e.kind)||g&&95===e.kind))return e}function R(n){if(wu(n)&&Wv(n,128))return t.createNotEmittedStatement(n);switch(n.kind){case 95:case 90:return g?void 0:n;case 125:case 123:case 124:case 128:case 164:case 87:case 138:case 148:case 103:case 147:case 188:case 189:case 190:case 191:case 187:case 182:case 168:case 133:case 159:case 136:case 154:case 150:case 146:case 116:case 155:case 185:case 184:case 186:case 183:case 192:case 193:case 194:case 196:case 197:case 198:case 199:case 200:case 201:case 181:case 270:return;case 265:case 264:return t.createNotEmittedStatement(n);case 263:return function(n){const r=function(e){let t=0;ee(iz(e,!0,!0))&&(t|=1);const n=Dh(e);n&&106!==hA(n.expression).kind&&(t|=64);wm(u,e)&&(t|=2);Cm(u,e)&&(t|=4);ve(e)?t|=8:!function(e){return be(e)&&Wv(e,2048)}(e)?xe(e)&&(t|=16):t|=32;return t}(n),i=l<=1&&!!(7&r);if(!function(e){return Zv(e)||ee(e.typeParameters)||ee(e.heritageClauses,J)||ee(e.members,J)}(n)&&!wm(u,n)&&!ve(n))return t.updateClassDeclaration(n,oJ(n.modifiers,L,__),n.name,void 0,oJ(n.heritageClauses,C,WE),oJ(n.members,F(n),x_));i&&e.startLexicalEnvironment();const o=i||8&r;let a=oJ(n.modifiers,o?j:C,D_);2&r&&(a=q(a,n));const s=o&&!n.name||4&r||1&r,c=s?n.name??t.getGeneratedNameForNode(n):n.name,_=t.updateClassDeclaration(n,a,c,void 0,oJ(n.heritageClauses,C,WE),z(n));let d,p=ip(n);1&r&&(p|=64);if(dw(_,p),i){const r=[_],i=rx(ds(m.text,n.members.end),20),o=t.getInternalName(n),a=t.createPartiallyEmittedExpression(o);RT(a,i.end),dw(a,3072);const s=t.createReturnStatement(a);MT(s,i.pos),dw(s,3840),r.push(s),Ud(r,e.endLexicalEnvironment());const c=t.createImmediatelyInvokedArrowFunction(r);fw(c,1);const l=t.createVariableDeclaration(t.getLocalName(n,!1,!1),void 0,void 0,c);cw(l,n);const u=t.createVariableStatement(void 0,t.createVariableDeclarationList([l],1));cw(u,n),kw(u,n),hw(u,ex(n)),bA(u),d=u}else d=_;if(o){if(8&r)return[d,Se(n)];if(32&r)return[d,t.createExportDefault(t.getLocalName(n,!1,!0))];if(16&r)return[d,t.createExternalModuleExport(t.getDeclarationName(n,!1,!0))]}return d}(n);case 231:return function(e){let n=oJ(e.modifiers,j,D_);wm(u,e)&&(n=q(n,e));return t.updateClassExpression(e,n,e.name,void 0,oJ(e.heritageClauses,C,WE),z(e))}(n);case 298:return function(t){if(119===t.token)return;return fJ(t,C,e)}(n);case 233:return function(e){return t.updateExpressionWithTypeArguments(e,Tn.checkDefined(iJ(e.expression,C,X_)),void 0)}(n);case 210:return function(e){return t.updateObjectLiteralExpression(e,oJ(e.properties,A(e),F_))}(n);case 176:case 172:case 174:case 177:case 178:case 175:return Tn.fail("Class and object literal elements must be visited with their respective visitors");case 262:return function(n){if(!X(n))return t.createNotEmittedStatement(n);const r=t.updateFunctionDeclaration(n,oJ(n.modifiers,L,__),n.asteriskToken,n.name,void 0,lJ(n.parameters,C,e),void 0,uJ(n.body,C,e)||t.createBlock([]));if(ve(n)){const e=[r];return function(e,t){e.push(Se(t))}(e,n),e}return r}(n);case 218:return function(n){if(!X(n))return t.createOmittedExpression();const r=t.updateFunctionExpression(n,oJ(n.modifiers,L,__),n.asteriskToken,n.name,void 0,lJ(n.parameters,C,e),void 0,uJ(n.body,C,e)||t.createBlock([]));return r}(n);case 219:return function(n){const r=t.updateArrowFunction(n,oJ(n.modifiers,L,__),void 0,lJ(n.parameters,C,e),void 0,n.equalsGreaterThanToken,uJ(n.body,C,e));return r}(n);case 169:return function(e){if(kv(e))return;const n=t.updateParameterDeclaration(e,oJ(e.modifiers,e=>gD(e)?C(e):void 0,D_),e.dotDotDotToken,Tn.checkDefined(iJ(e.name,C,p_)),void 0,void 0,iJ(e.initializer,C,nu));n!==e&&(kw(n,e),vI(n,tx(e)),hw(n,tx(e)),dw(n.name,64));return n}(n);case 217:return function(n){const r=hA(n.expression,-7);if(ru(r)||NP(r)){const e=iJ(n.expression,C,nu);return Tn.assert(e),t.createPartiallyEmittedExpression(e,n)}return fJ(n,C,e)}(n);case 216:case 234:return function(e){const n=iJ(e.expression,C,nu);return Tn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 238:return function(e){const n=iJ(e.expression,C,nu);return Tn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 213:return function(e){return t.updateCallExpression(e,Tn.checkDefined(iJ(e.expression,C,nu)),void 0,oJ(e.arguments,C,nu))}(n);case 214:return function(e){return t.updateNewExpression(e,Tn.checkDefined(iJ(e.expression,C,nu)),void 0,oJ(e.arguments,C,nu))}(n);case 215:return function(e){return t.updateTaggedTemplateExpression(e,Tn.checkDefined(iJ(e.tag,C,nu)),void 0,Tn.checkDefined(iJ(e.template,C,G_)))}(n);case 235:return function(e){const n=iJ(e.expression,C,X_);return Tn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 266:return function(e){if(!function(e){return!cf(e)||WS(c)}(e))return t.createNotEmittedStatement(e);const n=[];let i=4;const a=le(n,e);a&&(4===_&&y===m||(i|=1024));const s=Ce(e),l=we(e),u=ve(e)?t.getExternalModuleOrNamespaceExportName(h,e,!1,!0):t.getDeclarationName(e,!1,!0);let d=t.createLogicalOr(u,t.createAssignment(u,t.createObjectLiteralExpression()));if(ve(e)){const n=t.getLocalName(e,!1,!0);d=t.createAssignment(n,d)}const p=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,s)],void 0,function(e,n){const i=h;h=n;const a=[];r();const s=M(e.members,ae);return Ud(a,o()),ge(a,s),h=i,t.createBlock(vI(t.createNodeArray(a),e.members),!0)}(e,l)),void 0,[d]));cw(p,e),a&&(Cw(p,void 0),Dw(p,void 0));return vI(p,e),pw(p,i),n.push(p),n}(n);case 243:return function(n){if(ve(n)){const e=hx(n.declarationList);if(0===e.length)return;return vI(t.createExpressionStatement(t.inlineExpressions(M(e,oe))),n)}return fJ(n,C,e)}(n);case 260:return function(e){const n=t.updateVariableDeclaration(e,Tn.checkDefined(iJ(e.name,C,p_)),void 0,void 0,iJ(e.initializer,C,nu));e.type&&zw(n.name,e.type);return n}(n);case 267:return _e(n);case 271:return ye(n);case 285:return function(e){return t.updateJsxSelfClosingElement(e,Tn.checkDefined(iJ(e.tagName,C,Pu)),void 0,Tn.checkDefined(iJ(e.attributes,C,BE)))}(n);case 286:return function(e){return t.updateJsxOpeningElement(e,Tn.checkDefined(iJ(e.tagName,C,Pu)),void 0,Tn.checkDefined(iJ(e.attributes,C,BE)))}(n);default:return fJ(n,C,e)}}function B(n){const r=tk(c,"alwaysStrict")&&!(tO(n)&&_>=5)&&!sf(n);return t.updateSourceFile(n,cJ(n.statements,N,e,0,r))}function J(e){return!!(8192&e.transformFlags)}function z(e){const n=oJ(e.members,F(e),x_);let r;const i=vv(e),o=i&&O(i.parameters,e=>lc(e,i));if(o)for(const e of o){const n=t.createPropertyDeclaration(void 0,e.name,void 0,void 0,void 0);cw(n,e),r=pe(r,n)}return r?(r=ge(r,n),vI(t.createNodeArray(r),e.members)):n}function q(e,n){const r=V(n,n);if(ee(r)){const n=[];ge(n,xn(e,oI)),ge(n,O(e,gD)),ge(n,r),ge(n,O(Sn(e,oI),__)),e=vI(t.createNodeArray(n),e)}return e}function U(e,n,r){if(S_(r)&&Nm(u,n,r)){const i=V(n,r);if(ee(i)){const n=[];ge(n,O(e,gD)),ge(n,i),ge(n,O(e,__)),e=vI(t.createNodeArray(n),e)}}return e}function V(e,r){if(u)return Hz?function(e,r){if(d){let i;if(W(e)){i=pe(i,t.createPropertyAssignment("type",t.createArrowFunction(void 0,void 0,[],void 0,t.createToken(39),d.serializeTypeOfNode({currentLexicalScope:y,currentNameScope:r},e,r))))}if(K(e)){i=pe(i,t.createPropertyAssignment("paramTypes",t.createArrowFunction(void 0,void 0,[],void 0,t.createToken(39),d.serializeParameterTypesOfNode({currentLexicalScope:y,currentNameScope:r},e,r))))}if(H(e)){i=pe(i,t.createPropertyAssignment("returnType",t.createArrowFunction(void 0,void 0,[],void 0,t.createToken(39),d.serializeReturnTypeOfNode({currentLexicalScope:y,currentNameScope:r},e))))}if(i){const e=n().createMetadataHelper("design:typeinfo",t.createObjectLiteralExpression(i,!0));return[t.createDecorator(e)]}}}(e,r):function(e,r){if(d){let i;if(W(e)){const o=n().createMetadataHelper("design:type",d.serializeTypeOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=pe(i,t.createDecorator(o))}if(K(e)){const o=n().createMetadataHelper("design:paramtypes",d.serializeParameterTypesOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=pe(i,t.createDecorator(o))}if(H(e)){const o=n().createMetadataHelper("design:returntype",d.serializeReturnTypeOfNode({currentLexicalScope:y,currentNameScope:r},e));i=pe(i,t.createDecorator(o))}return i}}(e,r)}function W(e){const t=e.kind;return 174===t||177===t||178===t||172===t}function H(e){return 174===e.kind}function K(e){switch(e.kind){case 263:case 231:return void 0!==vv(e);case 174:case 177:case 178:return!0}return!1}function G(e){const n=e.name;if(pD(n)&&(!Hv(e)&&b||Zv(e)&&u)){const e=iJ(n.expression,C,nu);Tn.assert(e);if(!YJ(Ol(e))){const r=t.getGeneratedNameForNode(n);return a(r),t.updateComputedPropertyName(n,t.createAssignment(r,e))}}return Tn.checkDefined(iJ(n,C,d_))}function X(e){return!Ld(e.body)}function Q(e,n,r,i,o,a){const s=i[o],c=n[s];if(ge(e,oJ(n,C,wu,r,s-r)),YP(c)){const n=[];Q(n,c.tryBlock.statements,0,i,o+1,a);vI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),iJ(c.catchClause,C,$E),iJ(c.finallyBlock,C,jP)))}else ge(e,oJ(n,C,wu,s,1)),ge(e,a);ge(e,oJ(n,C,wu,s+1))}function Y(e){const n=e.name;if(!QN(n))return;const r=qT(vI(t.cloneNode(n),n),n.parent);dw(r,3168);const i=qT(vI(t.cloneNode(n),n),n.parent);return dw(i,3072),bA(uw(vI(cw(t.createExpressionStatement(t.createAssignment(vI(t.createPropertyAccessExpression(t.createThis(),r),e.name),i)),e),Zb(e,-1))))}function Z(n,r){if(!(1&n.transformFlags))return n;if(!X(n))return;let i=S_(r)?oJ(n.modifiers,C,D_):oJ(n.modifiers,I,D_);return i=U(i,n,r),t.updateMethodDeclaration(n,i,n.asteriskToken,G(n),void 0,void 0,lJ(n.parameters,C,e),void 0,uJ(n.body,C,e))}function te(e){return!(Ld(e.body)&&Wv(e,64))}function re(n,r){if(!(1&n.transformFlags))return n;if(!te(n))return;let i=S_(r)?oJ(n.modifiers,C,D_):oJ(n.modifiers,I,D_);return i=U(i,n,r),t.updateGetAccessorDeclaration(n,i,G(n),lJ(n.parameters,C,e),void 0,uJ(n.body,C,e)||t.createBlock([]))}function ie(n,r){if(!(1&n.transformFlags))return n;if(!te(n))return;let i=S_(r)?oJ(n.modifiers,C,D_):oJ(n.modifiers,I,D_);return i=U(i,n,r),t.updateSetAccessorDeclaration(n,i,G(n),lJ(n.parameters,C,e),uJ(n.body,C,e)||t.createBlock([]))}function oe(n){const r=n.name;return O_(r)?xz(n,C,e,0,!1,ke):vI(t.createAssignment(Te(r),Tn.checkDefined(iJ(n.initializer,C,nu))),n)}function ae(n){const r=function(e,n){const r=e.name;return YN(r)?t.createIdentifier(""):pD(r)?n&&!YJ(r.expression)?t.getGeneratedNameForNode(r):r.expression:QN(r)?t.createStringLiteral(wc(r)):t.cloneNode(r)}(n,!1),i=s.getEnumMemberValue(n),o=function(n,r){return void 0!==r?"string"==typeof r?t.createStringLiteral(r):r<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-r)):t.createNumericLiteral(r):(8&x||(x|=8,e.enableSubstitution(80)),n.initializer?Tn.checkDefined(iJ(n.initializer,C,nu)):t.createVoidZero())}(n,null==i?void 0:i.value),a=t.createAssignment(t.createElementAccessExpression(h,r),o),c="string"==typeof(null==i?void 0:i.value)||(null==i?void 0:i.isSyntacticallyString)?a:t.createAssignment(t.createElementAccessExpression(h,a),r);return vI(t.createExpressionStatement(vI(c,n)),n)}function se(e){v||(v=new Map);const t=ce(e);v.has(t)||v.set(t,e)}function ce(e){return Tn.assertNode(e.name,QN),e.name.escapedText}function le(e,n){const r=t.createVariableDeclaration(t.getLocalName(n,!1,!0)),i=307===y.kind?0:1,o=t.createVariableStatement(oJ(n.modifiers,L,__),t.createVariableDeclarationList([r],i));return cw(r,n),Cw(r,void 0),Dw(r,void 0),cw(o,n),se(n),!!function(e){if(v){const t=ce(e);return v.get(t)===e}return!0}(n)&&(266===n.kind?hw(o.declarationList,n):hw(o,n),kw(o,n),pw(o,2048),e.push(o),!0)}function _e(n){if(!function(e){const t=kc(e,sE);return!t||XB(t,WS(c))}(n))return t.createNotEmittedStatement(n);Tn.assertNode(n.name,QN,"A TypeScript namespace should have an Identifier name."),2&x||(x|=2,e.enableSubstitution(80),e.enableSubstitution(304),e.enableEmitNotification(267));const i=[];let a=4;const s=le(i,n);s&&(4===_&&y===m||(a|=1024));const l=Ce(n),u=we(n),d=ve(n)?t.getExternalModuleOrNamespaceExportName(h,n,!1,!0):t.getDeclarationName(n,!1,!0);let p=t.createLogicalOr(d,t.createAssignment(d,t.createObjectLiteralExpression()));if(ve(n)){const e=t.getLocalName(n,!1,!0);p=t.createAssignment(e,p)}const f=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,l)],void 0,function(e,n){const i=h,a=g,s=v;h=n,g=e,v=void 0;const c=[];let l,_;if(r(),e.body)if(268===e.body.kind)T(e.body,e=>ge(c,oJ(e.statements,P,wu))),l=e.body.statements,_=e.body;else{const t=_e(e.body);t&&(ct(t)?ge(c,t):c.push(t));l=Zb(ue(e).body.statements,-1)}Ud(c,o()),h=i,g=a,v=s;const u=t.createBlock(vI(t.createNodeArray(c),l),!0);vI(u,_),e.body&&268===e.body.kind||dw(u,3072|ip(u));return u}(n,u)),void 0,[p]));return cw(f,n),s&&(Cw(f,void 0),Dw(f,void 0)),vI(f,n),pw(f,a),i.push(f),i}function ue(e){if(267===e.body.kind){return ue(e.body)||e.body}}function de(e){Tn.assert(!e.isTypeOnly);const n=Pe(e)?e.name:void 0,r=iJ(e.namedBindings,fe,hu);return n||r?t.updateImportClause(e,!1,n,r):void 0}function fe(e){if(274===e.kind)return Pe(e)?e:void 0;{const n=c.verbatimModuleSyntax,r=oJ(e.elements,me,SE);return n||ee(r)?t.updateNamedImports(e,r):void 0}}function me(e){return!e.isTypeOnly&&Pe(e)?e:void 0}function he(e){return e.isTypeOnly||!c.verbatimModuleSyntax&&!s.isValueAliasDeclaration(e)?void 0:e}function ye(n){if(n.isTypeOnly)return;if(Om(n)){return Pe(n)?fJ(n,C,e):void 0}if(!function(e){return Pe(e)||!tO(m)&&s.isTopLevelValueImportEqualsWithEntityName(e)}(n))return;const r=nA(t,n.moduleReference);return dw(r,7168),xe(n)||!ve(n)?cw(vI(t.createVariableStatement(oJ(n.modifiers,L,__),t.createVariableDeclarationList([cw(t.createVariableDeclaration(n.name,void 0,void 0,r),n)])),n),n):cw((i=n.name,o=r,a=n,vI(t.createExpressionStatement(t.createAssignment(t.getNamespaceMemberName(h,i,!1,!0),o)),a)),n);var i,o,a}function ve(e){return void 0!==g&&Wv(e,32)}function be(e){return void 0===g&&Wv(e,32)}function xe(e){return be(e)&&!Wv(e,2048)}function Se(e){const n=t.createAssignment(t.getExternalModuleOrNamespaceExportName(h,e,!1,!0),t.getLocalName(e));hw(n,Qb(e.name?e.name.pos:e.pos,e.end));const r=t.createExpressionStatement(n);return hw(r,Qb(-1,e.end)),r}function ke(e,n,r){return vI(t.createAssignment(Te(e),n),r)}function Te(e){return t.getNamespaceMemberName(h,e,!1,!0)}function Ce(e){const n=t.getGeneratedNameForNode(e);return hw(n,e.name),n}function we(e){return t.getGeneratedNameForNode(e)}function Ne(e){if(x&S&&!n_(e)&&!sA(e)){const n=s.getReferencedExportContainer(e,!1);if(n&&307!==n.kind){if(2&S&&267===n.kind||8&S&&266===n.kind)return vI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(n),e),e)}}}function De(e){const n=function(e){if(RS(c))return;return rP(e)||iP(e)?s.getConstantValue(e):void 0}(e);if(void 0!==n){Aw(e,n);const i="string"==typeof n?t.createStringLiteral(n):n<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-n)):t.createNumericLiteral(n);if(!c.removeComments){const t=bc(e,qx);Pw(i,3,` ${r=tp(t),r.replace(/\*\//g,"*_/")} `)}return i}var r;return e}function Pe(e){return c.verbatimModuleSyntax||zm(e)||s.isReferencedAliasDeclaration(e)}}function Gz(e){const{factory:t,getEmitHelperFactory:n,hoistVariableDeclaration:r,endLexicalEnvironment:i,startLexicalEnvironment:o,resumeLexicalEnvironment:a,addBlockScopedVariable:s}=e,c=e.getEmitResolver(),l=e.getCompilerOptions(),_=OS(l),u=GS(l),d=!!l.experimentalDecorators,p=!u,f=u&&_<9,m=p||f,g=_<9,h=_<99?-1:u?0:3,y=_<9,v=y&&_>=2,b=m||g||-1===h,x=e.onSubstituteNode;e.onSubstituteNode=function(e,n){if(n=x(e,n),1===e)return function(e){switch(e.kind){case 80:return function(e){return function(e){if(1&k&&c.hasNodeCheckFlag(e,536870912)){const n=c.getReferencedValueDeclaration(e);if(n){const r=T[n.id];if(r){const n=t.cloneNode(r);return hw(n,e),kw(n,e),n}}}return}(e)||e}(e);case 110:return function(e){if(2&k&&(null==D?void 0:D.data)&&!F.has(e)){const{facts:n,classConstructor:r,classThis:i}=D.data,o=j?i??r:r;if(o)return vI(cw(t.cloneNode(o),e),e);if(1&n&&d)return t.createParenthesizedExpression(t.createVoidZero())}return e}(e)}return e}(n);return n};const S=e.onEmitNode;e.onEmitNode=function(e,t,n){const r=bc(t),i=E.get(r);if(i){const o=D,a=L;return D=i,L=j,j=!(xD(r)&&32&op(r)),S(e,t,n),j=L,L=a,void(D=o)}switch(t.kind){case 218:if(uP(r)||524288&ip(t))break;case 262:case 176:case 177:case 178:case 174:case 172:{const r=D,i=L;return D=void 0,L=j,j=!1,S(e,t,n),j=L,L=i,void(D=r)}case 167:{const r=D,i=j;return D=null==D?void 0:D.previous,j=L,S(e,t,n),j=i,void(D=r)}}S(e,t,n)};let k,T,w,N,D,P=!1;const E=new Map,F=new Set;let A,I,j=!1,L=!1;return qJ(e,function(t){if(t.isDeclarationFile)return t;if(D=void 0,P=!!(32&op(t)),!b&&!P)return t;const n=fJ(t,B,e);return Ow(n,e.readEmitHelpers()),n});function R(e){return 129===e.kind?ne()?void 0:e:dt(e,__)}function B(n){if(!(16777216&n.transformFlags||134234112&n.transformFlags))return n;switch(n.kind){case 129:return Tn.fail("Use `modifierVisitor` instead.");case 263:return function(e){return ye(e,ve)}(n);case 231:return function(e){return ye(e,be)}(n);case 175:case 172:return Tn.fail("Use `classElementVisitor` instead.");case 303:case 260:case 169:case 208:return function(t){_y(t,_e)&&(t=qz(e,t));return fJ(t,B,e)}(n);case 243:return function(t){const n=N;N=[];const r=fJ(t,B,e),i=ee(N)?[r,...N]:r;return N=n,i}(n);case 277:return function(t){_y(t,_e)&&(t=qz(e,t,!0,t.isExportEquals?"":"default"));return fJ(t,B,e)}(n);case 81:return function(e){if(!g)return e;if(wu(e.parent))return e;return cw(t.createIdentifier(""),e)}(n);case 211:return function(n){if(YN(n.name)){const e=Re(n.name);if(e)return vI(cw(oe(e,n.expression),n),n)}if(v&&I&&gm(n)&&QN(n.name)&&Xz(I)&&(null==D?void 0:D.data)){const{classConstructor:e,superClassReference:r,facts:i}=D.data;if(1&i)return Pe(n);if(e&&r){const i=t.createReflectGetCall(r,t.createStringLiteralFromNode(n.name),e);return cw(i,n.expression),vI(i,n.expression),i}}return fJ(n,B,e)}(n);case 212:return function(n){if(v&&I&&gm(n)&&Xz(I)&&(null==D?void 0:D.data)){const{classConstructor:e,superClassReference:r,facts:i}=D.data;if(1&i)return Pe(n);if(e&&r){const i=t.createReflectGetCall(r,iJ(n.argumentExpression,B,nu),e);return cw(i,n.expression),vI(i,n.expression),i}}return fJ(n,B,e)}(n);case 224:case 225:return se(n,!1);case 226:return de(n,!1);case 217:return fe(n,!1);case 213:return function(n){var i;if(a_(n.expression)&&Re(n.expression.name)){const{thisArg:e,target:i}=t.createCallBinding(n.expression,r,_);return Nl(n)?t.updateCallChain(n,t.createPropertyAccessChain(iJ(i,B,nu),n.questionDotToken,"call"),void 0,void 0,[iJ(e,B,nu),...oJ(n.arguments,B,nu)]):t.updateCallExpression(n,t.createPropertyAccessExpression(iJ(i,B,nu),"call"),void 0,[iJ(e,B,nu),...oJ(n.arguments,B,nu)])}if(v&&I&&gm(n.expression)&&Xz(I)&&(null==(i=null==D?void 0:D.data)?void 0:i.classConstructor)){const e=t.createFunctionCallCall(iJ(n.expression,B,nu),D.data.classConstructor,oJ(n.arguments,B,nu));return cw(e,n),vI(e,n),e}return fJ(n,B,e)}(n);case 244:return function(e){return t.updateExpressionStatement(e,iJ(e.expression,z,nu))}(n);case 215:return function(n){var i;if(a_(n.tag)&&Re(n.tag.name)){const{thisArg:e,target:i}=t.createCallBinding(n.tag,r,_);return t.updateTaggedTemplateExpression(n,t.createCallExpression(t.createPropertyAccessExpression(iJ(i,B,nu),"bind"),void 0,[iJ(e,B,nu)]),void 0,iJ(n.template,B,G_))}if(v&&I&&gm(n.tag)&&Xz(I)&&(null==(i=null==D?void 0:D.data)?void 0:i.classConstructor)){const e=t.createFunctionBindCall(iJ(n.tag,B,nu),D.data.classConstructor,[]);return cw(e,n),vI(e,n),t.updateTaggedTemplateExpression(n,e,void 0,iJ(n.template,B,G_))}return fJ(n,B,e)}(n);case 248:return function(n){return t.updateForStatement(n,iJ(n.initializer,z,pu),iJ(n.condition,B,nu),iJ(n.incrementor,z,nu),dJ(n.statement,B,e))}(n);case 110:return function(e){if(y&&I&&xD(I)&&(null==D?void 0:D.data)){const{classThis:t,classConstructor:n}=D.data;return t??n??e}return e}(n);case 262:case 218:return Q(void 0,J,n);case 176:case 174:case 177:case 178:return Q(n,J,n);default:return J(n)}}function J(t){return fJ(t,B,e)}function z(e){switch(e.kind){case 224:case 225:return se(e,!0);case 226:return de(e,!0);case 355:return function(e,n){const r=n?pJ(e.elements,z):pJ(e.elements,B,z);return t.updateCommaListExpression(e,r)}(e,!0);case 217:return fe(e,!0);default:return B(e)}}function q(n){switch(n.kind){case 298:return fJ(n,q,e);case 233:return function(n){var i;if(4&((null==(i=null==D?void 0:D.data)?void 0:i.facts)||0)){const e=t.createTempVariable(r,!0);return Ee().superClassReference=e,t.updateExpressionWithTypeArguments(n,t.createAssignment(e,iJ(n.expression,B,nu)),void 0)}return fJ(n,B,e)}(n);default:return B(n)}}function U(e){switch(e.kind){case 210:case 209:return Ue(e);default:return B(e)}}function V(e){switch(e.kind){case 176:return Q(e,K,e);case 177:case 178:case 174:return Q(e,X,e);case 172:return Q(e,re,e);case 175:return Q(e,xe,e);case 167:return H(e);case 240:return e;default:return D_(e)?R(e):B(e)}}function W(e){return 167===e.kind?H(e):B(e)}function $(e){switch(e.kind){case 172:return te(e);case 177:case 178:return V(e);default:Tn.assertMissingNode(e,"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration")}}function H(e){const n=iJ(e.expression,B,nu);return t.updateComputedPropertyName(e,function(e){return ee(w)&&(lP(e)?(w.push(e.expression),e=t.updateParenthesizedExpression(e,t.inlineExpressions(w))):(w.push(e),e=t.inlineExpressions(w)),w=void 0),e}(n))}function K(e){return A?ke(e,A):J(e)}function G(e){return!!g||!!(Hv(e)&&32&op(e))}function X(n){if(Tn.assert(!Zv(n)),!o_(n)||!G(n))return fJ(n,V,e);const r=Re(n.name);if(Tn.assert(r,"Undeclared private name for property declaration."),!r.isValid)return n;const i=function(e){Tn.assert(YN(e.name));const t=Re(e.name);if(Tn.assert(t,"Undeclared private name for property declaration."),"m"===t.kind)return t.methodName;if("a"===t.kind){if(Bu(e))return t.getterName;if(Ru(e))return t.setterName}}(n);i&&Ae().push(t.createAssignment(i,t.createFunctionExpression(O(n.modifiers,e=>__(e)&&!oD(e)&&!cD(e)),n.asteriskToken,i,void 0,lJ(n.parameters,B,e),void 0,uJ(n.body,B,e))))}function Q(e,t,n){if(e!==I){const r=I;I=e;const i=t(n);return I=r,i}return t(n)}function Y(e){const n=Sw(e),i=gw(e),o=e.name;let a=o,s=o;if(pD(o)&&!YJ(o.expression)){const e=mI(o);if(e)a=t.updateComputedPropertyName(o,iJ(o.expression,B,nu)),s=t.updateComputedPropertyName(o,e.left);else{const e=t.createTempVariable(r);hw(e,o.expression);const n=iJ(o.expression,B,nu),i=t.createAssignment(e,n);hw(i,o.expression),a=t.updateComputedPropertyName(o,i),s=t.updateComputedPropertyName(o,e)}}const c=oJ(e.modifiers,R,__),l=dI(t,e,c,e.initializer);cw(l,e),dw(l,3072),hw(l,i);const _=$v(e)?function(){const e=Ee();return e.classThis??e.classConstructor??(null==A?void 0:A.name)}()??t.createThis():t.createThis(),u=pI(t,e,c,a,_);cw(u,e),kw(u,n),hw(u,i);const d=t.createModifiersFromModifierFlags(_b(c)),p=fI(t,e,d,s,_);return cw(p,e),dw(p,3072),hw(p,i),aJ([l,u,p],$,x_)}function Z(e){if(m&&!T_(e)){const n=function(e,n){if(pD(e)){const i=mI(e),o=iJ(e.expression,B,nu),a=Ol(o),l=YJ(a);if(!(!!i||xb(a)&&n_(a.left))&&!l&&n){const n=t.getGeneratedNameForNode(e);return c.hasNodeCheckFlag(e,32768)?s(n):r(n),t.createAssignment(n,o)}return l||QN(a)?void 0:o}}(e.name,!!e.initializer||u);if(n&&Ae().push(...hI(n)),$v(e)&&!g){const n=we(e,t.createThis());if(n){const r=t.createClassStaticBlockDeclaration(t.createBlock([n]));return cw(r,e),kw(r,e),kw(n,{pos:-1,end:-1}),Cw(n,void 0),Dw(n,void 0),r}}return}return t.updatePropertyDeclaration(e,oJ(e.modifiers,R,__),iJ(e.name,W,d_),void 0,void 0,iJ(e.initializer,B,nu))}function te(n){return Tn.assert(!Zv(n),"Decorators should already have been transformed and elided."),o_(n)?function(n){if(G(n)){const e=Re(n.name);if(Tn.assert(e,"Undeclared private name for property declaration."),!e.isValid)return n;if(e.isStatic&&!g){const e=we(n,t.createThis());if(e)return t.createClassStaticBlockDeclaration(t.createBlock([e],!0))}return}return p&&!$v(n)&&(null==D?void 0:D.data)&&16&D.data.facts?t.updatePropertyDeclaration(n,oJ(n.modifiers,B,D_),n.name,void 0,void 0,void 0):(_y(n,_e)&&(n=qz(e,n)),t.updatePropertyDeclaration(n,oJ(n.modifiers,R,__),iJ(n.name,W,d_),void 0,void 0,iJ(n.initializer,B,nu)))}(n):Z(n)}function ne(){return-1===h||3===h&&!!(null==D?void 0:D.data)&&!!(16&D.data.facts)}function re(e){return T_(e)&&(ne()||Hv(e)&&32&op(e))?Y(e):te(e)}function ie(e){if(I&&Hv(I)&&k_(I)&&T_(bc(I))){const t=hA(e);110===t.kind&&F.add(t)}}function oe(e,t){return ie(t=iJ(t,B,nu)),ae(e,t)}function ae(e,t){switch(kw(t,Zb(t,-1)),e.kind){case"a":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.getterName);case"m":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.methodName);case"f":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return Tn.fail("Access helpers should not be created for untransformed private elements");default:Tn.assertNever(e,"Unknown private element type")}}function se(n,i){if(46===n.operator||47===n.operator){const e=mh(n.operand);if(a_(e)){let o;if(o=Re(e.name)){const a=iJ(e.expression,B,nu);ie(a);const{readExpression:s,initializeExpression:c}=ce(a);let l=oe(o,s);const _=gP(n)||i?void 0:t.createTempVariable(r);return l=oA(t,n,l,r,_),l=me(o,c||s,l,64),cw(l,n),vI(l,n),_&&(l=t.createComma(l,_),vI(l,n)),l}}else if(v&&I&&gm(e)&&Xz(I)&&(null==D?void 0:D.data)){const{classConstructor:o,superClassReference:a,facts:s}=D.data;if(1&s){const r=Pe(e);return gP(n)?t.updatePrefixUnaryExpression(n,r):t.updatePostfixUnaryExpression(n,r)}if(o&&a){let s,c;if(rP(e)?QN(e.name)&&(c=s=t.createStringLiteralFromNode(e.name)):YJ(e.argumentExpression)?c=s=e.argumentExpression:(c=t.createTempVariable(r),s=t.createAssignment(c,iJ(e.argumentExpression,B,nu))),s&&c){let l=t.createReflectGetCall(a,c,o);vI(l,e);const _=i?void 0:t.createTempVariable(r);return l=oA(t,n,l,r,_),l=t.createReflectSetCall(a,s,l,o),cw(l,n),vI(l,n),_&&(l=t.createComma(l,_),vI(l,n)),l}}}}return fJ(n,B,e)}function ce(e){const n=my(e)?e:t.cloneNode(e);if(110===e.kind&&F.has(e)&&F.add(n),YJ(e))return{readExpression:n,initializeExpression:void 0};const i=t.createTempVariable(r);return{readExpression:i,initializeExpression:t.createAssignment(i,n)}}function le(e){if(D&&E.set(bc(e),D),g){if(Fz(e)){const t=iJ(e.body.statements[0].expression,B,nu);if(xb(t,!0)&&t.left===t.right)return;return t}if(Mz(e))return iJ(e.body.statements[0].expression,B,nu);o();let n=Q(e,e=>oJ(e,B,wu),e.body.statements);n=t.mergeLexicalEnvironment(n,i());const r=t.createImmediatelyInvokedArrowFunction(n);return cw(mh(r.expression),e),pw(mh(r.expression),4),cw(r,e),vI(r,e),r}}function _e(e){if(kP(e)&&!e.name){const t=az(e);if(ee(t,Mz))return!1;return(g||!!op(e))&&ee(t,e=>xD(e)||o_(e)||m&&sz(e))}return!1}function de(i,o){if(kb(i)){const e=w;w=void 0,i=t.updateBinaryExpression(i,iJ(i.left,U,nu),i.operatorToken,iJ(i.right,B,nu));const n=ee(w)?t.inlineExpressions(ue([...w,i])):i;return w=e,n}if(xb(i)){_y(i,_e)&&(i=qz(e,i),Tn.assertNode(i,xb));const n=hA(i.left,9);if(a_(n)){const e=Re(n.name);if(e)return vI(cw(me(e,n.expression,i.right,i.operatorToken.kind),i),i)}else if(v&&I&&gm(i.left)&&Xz(I)&&(null==D?void 0:D.data)){const{classConstructor:e,superClassReference:n,facts:a}=D.data;if(1&a)return t.updateBinaryExpression(i,Pe(i.left),i.operatorToken,iJ(i.right,B,nu));if(e&&n){let a=iP(i.left)?iJ(i.left.argumentExpression,B,nu):QN(i.left.name)?t.createStringLiteralFromNode(i.left.name):void 0;if(a){let s=iJ(i.right,B,nu);if(ZJ(i.operatorToken.kind)){let o=a;YJ(a)||(o=t.createTempVariable(r),a=t.createAssignment(o,a));const c=t.createReflectGetCall(n,o,e);cw(c,i.left),vI(c,i.left),s=t.createBinaryExpression(c,ez(i.operatorToken.kind),s),vI(s,i)}const c=o?void 0:t.createTempVariable(r);return c&&(s=t.createAssignment(c,s),vI(c,i)),s=t.createReflectSetCall(n,a,s,e),cw(s,i),vI(s,i),c&&(s=t.createComma(s,c),vI(s,i)),s}}}}return function(e){return YN(e.left)&&103===e.operatorToken.kind}(i)?function(t){const r=Re(t.left);if(r){const e=iJ(t.right,B,nu);return cw(n().createClassPrivateFieldInHelper(r.brandCheckIdentifier,e),t)}return fJ(t,B,e)}(i):fJ(i,B,e)}function fe(e,n){const r=n?z:B,i=iJ(e.expression,r,nu);return t.updateParenthesizedExpression(e,i)}function me(e,r,i,o){if(r=iJ(r,B,nu),i=iJ(i,B,nu),ie(r),ZJ(o)){const{readExpression:n,initializeExpression:a}=ce(r);r=a||n,i=t.createBinaryExpression(ae(e,n),ez(o),i)}switch(kw(r,Zb(r,-1)),e.kind){case"a":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.setterName);case"m":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,void 0);case"f":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return Tn.fail("Access helpers should not be created for untransformed private elements");default:Tn.assertNever(e,"Unknown private element type")}}function he(e){return O(e.members,cz)}function ye(n,r){var i;const o=A,a=w,s=D;A=n,w=void 0,D={previous:D,data:void 0};const l=32&op(n);if(g||l){const e=jc(n);if(e&&QN(e))Fe().data.className=e;else if((null==(i=n.emitNode)?void 0:i.assignedName)&&ON(n.emitNode.assignedName))if(n.emitNode.assignedName.textSourceNode&&QN(n.emitNode.assignedName.textSourceNode))Fe().data.className=n.emitNode.assignedName.textSourceNode;else if(Es(n.emitNode.assignedName.text,_)){const e=t.createIdentifier(n.emitNode.assignedName.text);Fe().data.className=e}}if(g){const e=he(n);ee(e)&&(Fe().data.weakSetName=Le("instances",e[0].name))}const u=function(e){var t;let n=0;const r=bc(e);S_(r)&&wm(d,r)&&(n|=1),g&&(Az(e)||Rz(e))&&(n|=2);let i=!1,o=!1,a=!1,s=!1;for(const r of e.members)$v(r)?(r.name&&(YN(r.name)||T_(r))&&g?n|=2:!T_(r)||-1!==h||e.name||(null==(t=e.emitNode)?void 0:t.classThis)||(n|=2),(yD(r)||xD(r))&&(y&&16384&r.transformFlags&&(n|=8,1&n||(n|=2)),v&&134217728&r.transformFlags&&(1&n||(n|=6)))):Gv(bc(r))||(T_(r)?(s=!0,a||(a=o_(r))):o_(r)?(a=!0,c.hasNodeCheckFlag(r,262144)&&(n|=2)):yD(r)&&(i=!0,o||(o=!!r.initializer)));return(f&&i||p&&o||g&&a||g&&s&&-1===h)&&(n|=16),n}(n);u&&(Ee().facts=u),8&u&&(2&k||(k|=2,e.enableSubstitution(110),e.enableEmitNotification(262),e.enableEmitNotification(218),e.enableEmitNotification(176),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(174),e.enableEmitNotification(172),e.enableEmitNotification(167)));const m=r(n,u);return D=null==D?void 0:D.previous,Tn.assert(D===s),A=o,w=a,m}function ve(e,n){var i,o;let a;if(2&n)if(g&&(null==(i=e.emitNode)?void 0:i.classThis))Ee().classConstructor=e.emitNode.classThis,a=t.createAssignment(e.emitNode.classThis,t.getInternalName(e));else{const n=t.createTempVariable(r,!0);Ee().classConstructor=t.cloneNode(n),a=t.createAssignment(n,t.getInternalName(e))}(null==(o=e.emitNode)?void 0:o.classThis)&&(Ee().classThis=e.emitNode.classThis);const s=c.hasNodeCheckFlag(e,262144),l=Wv(e,32),_=Wv(e,2048);let u=oJ(e.modifiers,R,__);const d=oJ(e.heritageClauses,q,WE),{members:f,prologue:m}=Se(e),h=[];if(a&&Ae().unshift(a),ee(w)&&h.push(t.createExpressionStatement(t.inlineExpressions(w))),p||g||32&op(e)){const n=az(e);ee(n)&&Ce(h,n,t.getInternalName(e))}h.length>0&&l&&_&&(u=oJ(u,e=>oI(e)?void 0:e,__),h.push(t.createExportAssignment(void 0,!1,t.getLocalName(e,!1,!0))));const y=Ee().classConstructor;s&&y&&(De(),T[BJ(e)]=y);const v=t.updateClassDeclaration(e,u,e.name,void 0,d,f);return h.unshift(v),m&&h.unshift(t.createExpressionStatement(m)),h}function be(e,n){var i,o,a;const l=!!(1&n),_=az(e),u=c.hasNodeCheckFlag(e,262144),d=c.hasNodeCheckFlag(e,32768);let p;function f(){var n;if(g&&(null==(n=e.emitNode)?void 0:n.classThis))return Ee().classConstructor=e.emitNode.classThis;const i=t.createTempVariable(d?s:r,!0);return Ee().classConstructor=t.cloneNode(i),i}(null==(i=e.emitNode)?void 0:i.classThis)&&(Ee().classThis=e.emitNode.classThis),2&n&&(p??(p=f()));const h=oJ(e.modifiers,R,__),y=oJ(e.heritageClauses,q,WE),{members:v,prologue:b}=Se(e),x=t.updateClassExpression(e,h,e.name,void 0,y,v),S=[];b&&S.push(b);if((g||32&op(e))&&ee(_,e=>xD(e)||o_(e)||m&&sz(e))||ee(w))if(l)Tn.assertIsDefined(N,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),ee(w)&&ge(N,M(w,t.createExpressionStatement)),ee(_)&&Ce(N,_,(null==(o=e.emitNode)?void 0:o.classThis)??t.getInternalName(e)),p?S.push(t.createAssignment(p,x)):g&&(null==(a=e.emitNode)?void 0:a.classThis)?S.push(t.createAssignment(e.emitNode.classThis,x)):S.push(x);else{if(p??(p=f()),u){De();const n=t.cloneNode(p);n.emitNode.autoGenerate.flags&=-9,T[BJ(e)]=n}S.push(t.createAssignment(p,x)),ge(S,w),ge(S,function(e,t){const n=[];for(const r of e){const e=xD(r)?Q(r,le,r):Q(r,()=>Ne(r,t),void 0);e&&(bA(e),cw(e,r),pw(e,3072&ip(r)),hw(e,tx(r)),kw(e,r),n.push(e))}return n}(_,p)),S.push(t.cloneNode(p))}else S.push(x);return S.length>1&&(pw(x,131072),S.forEach(bA)),t.inlineExpressions(S)}function xe(t){if(!g)return fJ(t,B,e)}function Se(e){const n=!!(32&op(e));if(g||P){for(const t of e.members)if(o_(t))if(G(t))je(t,t.name,Ie);else{gz(Fe(),t.name,{kind:"untransformed"})}if(g&&ee(he(e))&&function(){const{weakSetName:e}=Fe().data;Tn.assert(e,"weakSetName should be set in private identifier environment"),Ae().push(t.createAssignment(e,t.createNewExpression(t.createIdentifier("WeakSet"),void 0,[])))}(),ne())for(const r of e.members)if(T_(r)){const e=t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage");if(g||n&&Hv(r))je(r,e,Oe);else{gz(Fe(),e,{kind:"untransformed"})}}}let i,o,a,s=oJ(e.members,V,x_);if(ee(s,SD)||(i=ke(void 0,e)),!g&&ee(w)){let e=t.createExpressionStatement(t.inlineExpressions(w));if(134234112&e.transformFlags){const n=t.createTempVariable(r),i=t.createArrowFunction(void 0,void 0,[],void 0,void 0,t.createBlock([e]));o=t.createAssignment(n,i),e=t.createExpressionStatement(t.createCallExpression(n,void 0,[]))}const n=t.createBlock([e]);a=t.createClassStaticBlockDeclaration(n),w=void 0}if(i||a){let n;const r=C(s,Fz),o=C(s,Mz);n=pe(n,r),n=pe(n,o),n=pe(n,i),n=pe(n,a);n=ge(n,r||o?O(s,e=>e!==r&&e!==o):s),s=vI(t.createNodeArray(n),e.members)}return{members:s,prologue:o}}function ke(n,r){if(n=iJ(n,B,SD),!((null==D?void 0:D.data)&&16&D.data.facts))return n;const o=Dh(r),s=!(!o||106===hA(o.expression).kind),c=lJ(n?n.parameters:void 0,B,e),l=function(n,r,o){const s=iz(n,!1,!1);let c=s;u||(c=O(c,e=>!!e.initializer||YN(e.name)||Qv(e)));const l=he(n),_=ee(c)||ee(l);if(!r&&!_)return uJ(void 0,B,e);a();const d=!r&&o;let p=0,f=[];const m=[],h=t.createThis();if(function(e,n,r){if(!g||!ee(n))return;const{weakSetName:i}=Fe().data;Tn.assert(i,"weakSetName should be set in private identifier environment"),e.push(t.createExpressionStatement(function(e,t,n){return e.createCallExpression(e.createPropertyAccessExpression(n,"add"),void 0,[t])}(t,r,i)))}(m,l,h),r){const e=O(s,e=>lc(bc(e),r)),t=O(c,e=>!lc(bc(e),r));Ce(m,e,h),Ce(m,t,h)}else Ce(m,c,h);if(null==r?void 0:r.body){p=t.copyPrologue(r.body.statements,f,!1,B);const e=rz(r.body.statements,p);if(e.length)Te(f,r.body.statements,p,e,0,m,r);else{for(;p=f.length?r.body.multiLine??f.length>0:f.length>0;return vI(t.createBlock(vI(t.createNodeArray(f),r?r.body.statements:n.members),y),r?r.body:void 0)}(r,n,s);return l?n?(Tn.assert(c),t.updateConstructorDeclaration(n,void 0,c,l)):bA(cw(vI(t.createConstructorDeclaration(void 0,c??[],l),n||r),n)):n}function Te(e,n,r,i,o,a,s){const c=i[o],l=n[c];if(ge(e,oJ(n,B,wu,r,c-r)),r=c+1,YP(l)){const n=[];Te(n,l.tryBlock.statements,0,i,o+1,a,s);vI(t.createNodeArray(n),l.tryBlock.statements),e.push(t.updateTryStatement(l,t.updateBlock(l.tryBlock,n),iJ(l.catchClause,B,$E),iJ(l.finallyBlock,B,jP)))}else{for(ge(e,oJ(n,B,wu,c,1));rl(e,p,t),serializeTypeOfNode:(e,t,n)=>l(e,_,t,n),serializeParameterTypesOfNode:(e,t,n)=>l(e,u,t,n),serializeReturnTypeOfNode:(e,t)=>l(e,d,t)};function l(e,t,n,r){const i=s,o=c;s=e.currentLexicalScope,c=e.currentNameScope;const a=void 0===r?t(n):t(n,r);return s=i,c=o,a}function _(e,n){switch(e.kind){case 172:case 169:return p(e.type);case 178:case 177:return p(function(e,t){const n=Dv(t.members,e);return n.setAccessor&&xv(n.setAccessor)||n.getAccessor&&Fv(n.getAccessor)}(e,n));case 263:case 231:case 174:return t.createIdentifier("Function");default:return t.createVoidZero()}}function u(e,n){const r=S_(e)?vv(e):f_(e)&&Md(e.body)?e:void 0,i=[];if(r){const e=function(e,t){if(t&&177===e.kind){const{setAccessor:n}=Dv(t.members,e);if(n)return n.parameters}return e.parameters}(r,n),t=e.length;for(let r=0;re.parent&&zD(e.parent)&&(e.parent.trueType===e||e.parent.falseType===e)))return t.createIdentifier("Object");const r=y(e.typeName),o=t.createTempVariable(n);return t.createConditionalExpression(t.createTypeCheck(t.createAssignment(o,r),"function"),void 0,o,void 0,t.createIdentifier("Object"));case 1:return v(e.typeName);case 2:return t.createVoidZero();case 4:return b("BigInt",7);case 6:return t.createIdentifier("Boolean");case 3:return t.createIdentifier("Number");case 5:return t.createIdentifier("String");case 7:return t.createIdentifier("Array");case 8:return b("Symbol",2);case 10:return t.createIdentifier("Function");case 9:return t.createIdentifier("Promise");case 11:return t.createIdentifier("Object");default:return Tn.assertNever(i)}}(e);case 193:return m(e.types,!0);case 192:return m(e.types,!1);case 194:return m([e.trueType,e.falseType],!1);case 198:if(148===e.operator)return p(e.type);break;case 186:case 199:case 200:case 187:case 133:case 159:case 197:case 205:case 312:case 313:case 317:case 318:case 319:break;case 314:case 315:case 316:return p(e.type);default:return Tn.failBadSyntaxKind(e)}return t.createIdentifier("Object")}function f(e){switch(e.kind){case 11:case 15:return t.createIdentifier("String");case 224:{const t=e.operand;switch(t.kind){case 9:case 10:return f(t);default:return Tn.failBadSyntaxKind(t)}}case 9:return t.createIdentifier("Number");case 10:return b("BigInt",7);case 112:case 97:return t.createIdentifier("Boolean");case 106:return t.createVoidZero();default:return Tn.failBadSyntaxKind(e)}}function m(e,n){let r;for(let i of e){if(i=fh(i),146===i.kind){if(n)return t.createVoidZero();continue}if(159===i.kind){if(!n)return t.createIdentifier("Object");continue}if(133===i.kind)return t.createIdentifier("Object");if(!a&&(KD(i)&&106===i.literal.kind||157===i.kind))continue;const e=p(i);if(QN(e)&&"Object"===e.escapedText)return e;if(r){if(!g(r,e))return t.createIdentifier("Object")}else r=e}return r??t.createVoidZero()}function g(e,t){return n_(e)?n_(t):QN(e)?QN(t)&&e.escapedText===t.escapedText:rP(e)?rP(t)&&g(e.expression,t.expression)&&g(e.name,t.name):fP(e)?fP(t)&&AN(e.expression)&&"0"===e.expression.text&&AN(t.expression)&&"0"===t.expression.text:ON(e)?ON(t)&&e.text===t.text:pP(e)?pP(t)&&g(e.expression,t.expression):lP(e)?lP(t)&&g(e.expression,t.expression):vP(e)?vP(t)&&g(e.condition,t.condition)&&g(e.whenTrue,t.whenTrue)&&g(e.whenFalse,t.whenFalse):!!yP(e)&&(yP(t)&&e.operatorToken.kind===t.operatorToken.kind&&g(e.left,t.left)&&g(e.right,t.right))}function h(e,n){return t.createLogicalAnd(t.createStrictInequality(t.createTypeOfExpression(e),t.createStringLiteral("undefined")),n)}function y(e){if(80===e.kind){const t=v(e);return h(t,t)}if(80===e.left.kind)return h(v(e.left),v(e));const r=y(e.left),i=t.createTempVariable(n);return t.createLogicalAnd(t.createLogicalAnd(r.left,t.createStrictInequality(t.createAssignment(i,r.right),t.createVoidZero())),t.createPropertyAccessExpression(i,e.right))}function v(e){switch(e.kind){case 80:const n=qT(vI(kI.cloneNode(e),e),e.parent);return n.original=void 0,qT(n,kc(s)),n;case 166:return function(e){return t.createPropertyAccessExpression(v(e.left),e.right)}(e)}}function b(e,n){return ooI(e)||gD(e)?void 0:e,D_),f=tx(o),m=function(n){if(i.hasNodeCheckFlag(n,262144)){c||(e.enableSubstitution(80),c=[]);const i=t.createUniqueName(n.name&&!n_(n.name)?wc(n.name):"default");return c[BJ(n)]=i,r(i),i}}(o),h=a<2?t.getInternalName(o,!1,!0):t.getLocalName(o,!1,!0),y=oJ(o.heritageClauses,_,WE);let v=oJ(o.members,_,x_),b=[];({members:v,decorationStatements:b}=p(o,v));const x=a>=9&&!!m&&ee(v,e=>yD(e)&&Wv(e,256)||xD(e));x&&(v=vI(t.createNodeArray([t.createClassStaticBlockDeclaration(t.createBlock([t.createExpressionStatement(t.createAssignment(m,t.createThis()))])),...v]),v));const S=t.createClassExpression(d,s&&n_(s)?void 0:s,void 0,y,v);cw(S,o),vI(S,f);const k=m&&!x?t.createAssignment(m,S):S,T=t.createVariableDeclaration(h,void 0,void 0,k);cw(T,o);const C=t.createVariableDeclarationList([T],1),w=t.createVariableStatement(void 0,C);cw(w,o),vI(w,f),kw(w,o);const N=[w];if(ge(N,b),function(e,r){const i=function(e){const r=_z(e),i=g(r);if(!i)return;const o=c&&c[BJ(e)],s=a<2?t.getInternalName(e,!1,!0):t.getDeclarationName(e,!1,!0),l=n().createDecorateHelper(i,s),_=t.createAssignment(s,o?t.createAssignment(o,l):l);return dw(_,3072),hw(_,tx(e)),_}(r);i&&e.push(cw(t.createExpressionStatement(i),r))}(N,o),l)if(u){const e=t.createExportDefault(h);N.push(e)}else{const e=t.createExternalModuleExport(t.getDeclarationName(o));N.push(e)}return N}(o,o.name):function(e,n){const r=oJ(e.modifiers,l,__),i=oJ(e.heritageClauses,_,WE);let o=oJ(e.members,_,x_),a=[];({members:o,decorationStatements:a}=p(e,o));const s=t.updateClassDeclaration(e,r,n,void 0,i,o);return ge([s],a)}(o,o.name);return Ie(s)}(o);case 231:return function(e){return t.updateClassExpression(e,oJ(e.modifiers,l,__),e.name,void 0,oJ(e.heritageClauses,_,WE),oJ(e.members,_,x_))}(o);case 176:return function(e){return t.updateConstructorDeclaration(e,oJ(e.modifiers,l,__),oJ(e.parameters,_,mD),iJ(e.body,_,jP))}(o);case 174:return function(e){return f(t.updateMethodDeclaration(e,oJ(e.modifiers,l,__),e.asteriskToken,Tn.checkDefined(iJ(e.name,_,d_)),void 0,void 0,oJ(e.parameters,_,mD),void 0,iJ(e.body,_,jP)),e)}(o);case 178:return function(e){return f(t.updateSetAccessorDeclaration(e,oJ(e.modifiers,l,__),Tn.checkDefined(iJ(e.name,_,d_)),oJ(e.parameters,_,mD),iJ(e.body,_,jP)),e)}(o);case 177:return function(e){return f(t.updateGetAccessorDeclaration(e,oJ(e.modifiers,l,__),Tn.checkDefined(iJ(e.name,_,d_)),oJ(e.parameters,_,mD),void 0,iJ(e.body,_,jP)),e)}(o);case 172:return function(e){if(33554432&e.flags||Wv(e,128))return;return f(t.updatePropertyDeclaration(e,oJ(e.modifiers,l,__),Tn.checkDefined(iJ(e.name,_,d_)),void 0,void 0,iJ(e.initializer,_,nu)),e)}(o);case 169:return function(e){const n=t.updateParameterDeclaration(e,sI(t,e.modifiers),e.dotDotDotToken,Tn.checkDefined(iJ(e.name,_,p_)),void 0,void 0,iJ(e.initializer,_,nu));n!==e&&(kw(n,e),vI(n,tx(e)),hw(n,tx(e)),dw(n.name,64));return n}(o);default:return fJ(o,_,e)}}function u(e){return!!(536870912&e.transformFlags)}function d(e){return ee(e,u)}function p(e,n){let r=[];return h(r,e,!1),h(r,e,!0),function(e){for(const t of e.members){if(!xI(t))continue;const n=uz(t,e,!0);if(ee(null==n?void 0:n.decorators,u))return!0;if(ee(null==n?void 0:n.parameters,d))return!0}return!1}(e)&&(n=vI(t.createNodeArray([...n,t.createClassStaticBlockDeclaration(t.createBlock(r,!0))]),n),r=void 0),{decorationStatements:r,members:n}}function f(e,t){return e!==t&&(kw(e,t),hw(e,tx(t))),e}function m(e){return FN(e.expression,"___metadata")}function g(e){if(!e)return;const{false:t,true:n}=Ye(e.decorators,m),r=[];return ge(r,M(t,v)),ge(r,z(e.parameters,b)),ge(r,M(n,v)),r}function h(e,n,r){ge(e,M(function(e,t){const n=function(e,t){return O(e.members,n=>{return i=t,Tm(!0,r=n,e)&&i===$v(r);var r,i})}(e,t);let r;for(const t of n)r=pe(r,y(e,t));return r}(n,r),e=>t.createExpressionStatement(e)))}function y(e,r){const i=g(uz(r,e,!0));if(!i)return;const o=function(e,n){return $v(n)?t.getDeclarationName(e):function(e){return t.createPropertyAccessExpression(t.getDeclarationName(e),"prototype")}(e)}(e,r),a=function(e,n){const r=e.name;return YN(r)?t.createIdentifier(""):pD(r)?n&&!YJ(r.expression)?t.getGeneratedNameForNode(r):r.expression:QN(r)?t.createStringLiteral(wc(r)):t.cloneNode(r)}(r,!Wv(r,128)),s=yD(r)&&!Qv(r)?t.createVoidZero():t.createNull(),c=n().createDecorateHelper(i,o,a,s);return dw(c,3072),hw(c,tx(r)),c}function v(e){return Tn.checkDefined(iJ(e.expression,_,nu))}function b(e,t){let r;if(e){r=[];for(const i of e){const e=n().createParamHelper(v(i),t);vI(e,i.expression),dw(e,3072),r.push(e)}}return r}}function Zz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=OS(e.getCompilerOptions());let s,c,l,_,u,d;return qJ(e,function(t){s=void 0,d=!1;const n=fJ(t,b,e);Ow(n,e.readEmitHelpers()),d&&(mw(n,32),d=!1);return n});function p(){switch(c=void 0,l=void 0,_=void 0,null==s?void 0:s.kind){case"class":c=s.classInfo;break;case"class-element":c=s.next.classInfo,l=s.classThis,_=s.classSuper;break;case"name":const e=s.next.next.next;"class-element"===(null==e?void 0:e.kind)&&(c=e.next.classInfo,l=e.classThis,_=e.classSuper)}}function f(e){s={kind:"class",next:s,classInfo:e,savedPendingExpressions:u},u=void 0,p()}function m(){Tn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`),u=s.savedPendingExpressions,s=s.next,p()}function g(e){var t,n;Tn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`),s={kind:"class-element",next:s},(xD(e)||yD(e)&&Hv(e))&&(s.classThis=null==(t=s.next.classInfo)?void 0:t.classThis,s.classSuper=null==(n=s.next.classInfo)?void 0:n.classSuper),p()}function h(){var e;Tn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`),Tn.assert("class"===(null==(e=s.next)?void 0:e.kind),"Incorrect value for top.next.kind.",()=>{var e;return`Expected top.next.kind to be 'class' but got '${null==(e=s.next)?void 0:e.kind}' instead.`}),s=s.next,p()}function y(){Tn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`),s={kind:"name",next:s},p()}function v(){Tn.assert("name"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'name' but got '${null==s?void 0:s.kind}' instead.`),s=s.next,p()}function b(n){if(!function(e){return!!(33554432&e.transformFlags)||!!l&&!!(16384&e.transformFlags)||!!l&&!!_&&!!(134217728&e.transformFlags)}(n))return n;switch(n.kind){case 170:return Tn.fail("Use `modifierVisitor` instead.");case 263:return function(n){if(D(n)){const r=[],i=bc(n,S_)??n,o=i.name?t.createStringLiteralFromNode(i.name):t.createStringLiteral("default"),a=Wv(n,32),s=Wv(n,2048);if(n.name||(n=Jz(e,n,o)),a&&s){const e=N(n);if(n.name){const i=t.createVariableDeclaration(t.getLocalName(n),void 0,void 0,e);cw(i,n);const o=t.createVariableDeclarationList([i],1),a=t.createVariableStatement(void 0,o);r.push(a);const s=t.createExportDefault(t.getDeclarationName(n));cw(s,n),kw(s,Sw(n)),hw(s,ex(n)),r.push(s)}else{const i=t.createExportDefault(e);cw(i,n),kw(i,Sw(n)),hw(i,ex(n)),r.push(i)}}else{Tn.assertIsDefined(n.name,"A class declaration that is not a default export must have a name.");const e=N(n),i=a?e=>ZN(e)?void 0:S(e):S,o=oJ(n.modifiers,i,__),s=t.getLocalName(n,!1,!0),c=t.createVariableDeclaration(s,void 0,void 0,e);cw(c,n);const l=t.createVariableDeclarationList([c],1),_=t.createVariableStatement(o,l);if(cw(_,n),kw(_,Sw(n)),r.push(_),a){const e=t.createExternalModuleExport(s);cw(e,n),r.push(e)}}return Ie(r)}{const e=oJ(n.modifiers,S,__),r=oJ(n.heritageClauses,b,WE);f(void 0);const i=oJ(n.members,k,x_);return m(),t.updateClassDeclaration(n,e,n.name,void 0,r,i)}}(n);case 231:return function(e){if(D(e)){const t=N(e);return cw(t,e),t}{const n=oJ(e.modifiers,S,__),r=oJ(e.heritageClauses,b,WE);f(void 0);const i=oJ(e.members,k,x_);return m(),t.updateClassExpression(e,n,e.name,void 0,r,i)}}(n);case 176:case 172:case 175:return Tn.fail("Not supported outside of a class. Use 'classElementVisitor' instead.");case 169:return function(n){_y(n,I)&&(n=qz(e,n,O(n.initializer)));const r=t.updateParameterDeclaration(n,void 0,n.dotDotDotToken,iJ(n.name,b,p_),void 0,void 0,iJ(n.initializer,b,nu));r!==n&&(kw(r,n),vI(r,tx(n)),hw(r,tx(n)),dw(r.name,64));return r}(n);case 226:return j(n,!1);case 303:case 260:case 208:return function(t){_y(t,I)&&(t=qz(e,t,O(t.initializer)));return fJ(t,b,e)}(n);case 277:return function(t){_y(t,I)&&(t=qz(e,t,O(t.expression)));return fJ(t,b,e)}(n);case 110:return function(e){return l??e}(n);case 248:return function(n){return t.updateForStatement(n,iJ(n.initializer,T,pu),iJ(n.condition,b,nu),iJ(n.incrementor,T,nu),dJ(n.statement,b,e))}(n);case 244:return function(t){return fJ(t,T,e)}(n);case 355:return R(n,!1);case 217:return $(n,!1);case 354:return function(e,n){const r=n?T:b,i=iJ(e.expression,r,nu);return t.updatePartiallyEmittedExpression(e,i)}(n,!1);case 213:return function(n){if(gm(n.expression)&&l){const e=iJ(n.expression,b,nu),r=oJ(n.arguments,b,nu),i=t.createFunctionCallCall(e,l,r);return cw(i,n),vI(i,n),i}return fJ(n,b,e)}(n);case 215:return function(n){if(gm(n.tag)&&l){const e=iJ(n.tag,b,nu),r=t.createFunctionBindCall(e,l,[]);cw(r,n),vI(r,n);const i=iJ(n.template,b,G_);return t.updateTaggedTemplateExpression(n,r,void 0,i)}return fJ(n,b,e)}(n);case 224:case 225:return L(n,!1);case 211:return function(n){if(gm(n)&&QN(n.name)&&l&&_){const e=t.createStringLiteralFromNode(n.name),r=t.createReflectGetCall(_,e,l);return cw(r,n.expression),vI(r,n.expression),r}return fJ(n,b,e)}(n);case 212:return function(n){if(gm(n)&&l&&_){const e=iJ(n.argumentExpression,b,nu),r=t.createReflectGetCall(_,e,l);return cw(r,n.expression),vI(r,n.expression),r}return fJ(n,b,e)}(n);case 167:return J(n);case 174:case 178:case 177:case 218:case 262:{"other"===(null==s?void 0:s.kind)?(Tn.assert(!u),s.depth++):(s={kind:"other",next:s,depth:0,savedPendingExpressions:u},u=void 0,p());const t=fJ(n,x,e);return Tn.assert("other"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'other' but got '${null==s?void 0:s.kind}' instead.`),s.depth>0?(Tn.assert(!u),s.depth--):(u=s.savedPendingExpressions,s=s.next,p()),t}default:return fJ(n,x,e)}}function x(e){if(170!==e.kind)return b(e)}function S(e){if(170!==e.kind)return e}function k(a){switch(a.kind){case 176:return function(e){g(e);const n=oJ(e.modifiers,S,__),r=oJ(e.parameters,b,mD);let i;if(e.body&&c){const n=P(c.class,c);if(n){const r=[],o=t.copyPrologue(e.body.statements,r,!1,b),a=rz(e.body.statements,o);a.length>0?E(r,e.body.statements,o,a,0,n):(ge(r,n),ge(r,oJ(e.body.statements,b,wu))),i=t.createBlock(r,!0),cw(i,e.body),vI(i,e.body)}}return i??(i=iJ(e.body,b,jP)),h(),t.updateConstructorDeclaration(e,n,r,i)}(a);case 174:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,Z);if(i)return h(),F(function(e,n,r){return e=oJ(e,e=>oD(e)?e:void 0,__),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(r,t.createIdentifier("value")))]))}(n,r,i),e);{const i=oJ(e.parameters,b,mD),o=iJ(e.body,b,jP);return h(),F(t.updateMethodDeclaration(e,n,e.asteriskToken,r,void 0,void 0,i,void 0,o),e)}}(a);case 177:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,te);if(i)return h(),F(ie(n,r,i),e);{const i=oJ(e.parameters,b,mD),o=iJ(e.body,b,jP);return h(),F(t.updateGetAccessorDeclaration(e,n,r,i,void 0,o),e)}}(a);case 178:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ne);if(i)return h(),F(oe(n,r,i),e);{const i=oJ(e.parameters,b,mD),o=iJ(e.body,b,jP);return h(),F(t.updateSetAccessorDeclaration(e,n,r,i,o),e)}}(a);case 172:return function(a){_y(a,I)&&(a=qz(e,a,O(a.initializer)));g(a),Tn.assert(!Cp(a),"Not yet implemented.");const{modifiers:s,name:l,initializersName:_,extraInitializersName:u,descriptorName:d,thisArg:p}=A(a,c,Qv(a)?re:void 0);r();let f=iJ(a.initializer,b,nu);_&&(f=n().createRunInitializersHelper(p??t.createThis(),_,f??t.createVoidZero()));$v(a)&&c&&f&&(c.hasStaticInitializers=!0);const m=i();ee(m)&&(f=t.createImmediatelyInvokedArrowFunction([...m,t.createReturnStatement(f)]));c&&($v(a)?(f=G(c,!0,f),u&&(c.pendingStaticInitializers??(c.pendingStaticInitializers=[]),c.pendingStaticInitializers.push(n().createRunInitializersHelper(c.classThis??t.createThis(),u)))):(f=G(c,!1,f),u&&(c.pendingInstanceInitializers??(c.pendingInstanceInitializers=[]),c.pendingInstanceInitializers.push(n().createRunInitializersHelper(t.createThis(),u)))));if(h(),Qv(a)&&d){const e=Sw(a),n=gw(a),r=a.name;let i=r,c=r;if(pD(r)&&!YJ(r.expression)){const e=mI(r);if(e)i=t.updateComputedPropertyName(r,iJ(r.expression,b,nu)),c=t.updateComputedPropertyName(r,e.left);else{const e=t.createTempVariable(o);hw(e,r.expression);const n=iJ(r.expression,b,nu),a=t.createAssignment(e,n);hw(a,r.expression),i=t.updateComputedPropertyName(r,a),c=t.updateComputedPropertyName(r,e)}}const l=oJ(s,e=>129!==e.kind?e:void 0,__),_=dI(t,a,l,f);cw(_,a),dw(_,3072),hw(_,n),hw(_.name,a.name);const u=ie(l,i,d);cw(u,a),kw(u,e),hw(u,n);const p=oe(l,c,d);return cw(p,a),dw(p,3072),hw(p,n),[_,u,p]}return F(t.updatePropertyDeclaration(a,s,l,void 0,void 0,f),a)}(a);case 175:return function(n){let r;if(g(n),Mz(n))r=fJ(n,b,e);else if(Fz(n)){const t=l;l=void 0,r=fJ(n,b,e),l=t}else if(r=n=fJ(n,b,e),c&&(c.hasStaticInitializers=!0,ee(c.pendingStaticInitializers))){const e=[];for(const n of c.pendingStaticInitializers){const r=t.createExpressionStatement(n);hw(r,gw(n)),e.push(r)}const n=t.createBlock(e,!0);r=[t.createClassStaticBlockDeclaration(n),r],c.pendingStaticInitializers=void 0}return h(),r}(a);default:return b(a)}}function T(e){switch(e.kind){case 224:case 225:return L(e,!0);case 226:return j(e,!0);case 355:return R(e,!0);case 217:return $(e,!0);default:return b(e)}}function C(e,n){return t.createUniqueName(`${function(e){let t=e.name&&QN(e.name)&&!n_(e.name)?wc(e.name):e.name&&YN(e.name)&&!n_(e.name)?wc(e.name).slice(1):e.name&&ON(e.name)&&Es(e.name.text,99)?e.name.text:S_(e)?"class":"member";return Bu(e)&&(t=`get_${t}`),Ru(e)&&(t=`set_${t}`),e.name&&YN(e.name)&&(t=`private_${t}`),$v(e)&&(t=`static_${t}`),"_"+t}(e)}_${n}`,24)}function w(e,n){return t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,n)],1))}function N(o){r(),!Bz(o)&&wm(!1,o)&&(o=Jz(e,o,t.createStringLiteral("")));const a=t.getLocalName(o,!1,!1,!0),s=function(e){const r=t.createUniqueName("_metadata",48);let i,o,a,s,c,l=!1,_=!1,u=!1;if(km(!1,e)){const n=ee(e.members,e=>(o_(e)||T_(e))&&Hv(e));a=t.createUniqueName("_classThis",n?24:48)}for(const r of e.members){if(w_(r)&&Tm(!1,r,e))if(Hv(r)){if(!o){o=t.createUniqueName("_staticExtraInitializers",48);const r=n().createRunInitializersHelper(a??t.createThis(),o);hw(r,e.name??ex(e)),s??(s=[]),s.push(r)}}else{if(!i){i=t.createUniqueName("_instanceExtraInitializers",48);const r=n().createRunInitializersHelper(t.createThis(),i);hw(r,e.name??ex(e)),c??(c=[]),c.push(r)}i??(i=t.createUniqueName("_instanceExtraInitializers",48))}if(xD(r)?Mz(r)||(l=!0):yD(r)&&(Hv(r)?l||(l=!!r.initializer||Zv(r)):_||(_=!Cp(r))),(o_(r)||T_(r))&&Hv(r)&&(u=!0),o&&i&&l&&_&&u)break}return{class:e,classThis:a,metadataReference:r,instanceMethodExtraInitializersName:i,staticMethodExtraInitializersName:o,hasStaticInitializers:l,hasNonAmbientInstanceFields:_,hasStaticPrivateClassElements:u,pendingStaticInitializers:s,pendingInstanceInitializers:c}}(o),c=[];let l,_,p,g,h=!1;const y=X(_z(o));y&&(s.classDecoratorsName=t.createUniqueName("_classDecorators",48),s.classDescriptorName=t.createUniqueName("_classDescriptor",48),s.classExtraInitializersName=t.createUniqueName("_classExtraInitializers",48),Tn.assertIsDefined(s.classThis),c.push(w(s.classDecoratorsName,t.createArrayLiteralExpression(y)),w(s.classDescriptorName),w(s.classExtraInitializersName,t.createArrayLiteralExpression()),w(s.classThis)),s.hasStaticPrivateClassElements&&(h=!0,d=!0));const v=Ih(o.heritageClauses,96),x=v&&Ce(v.types),S=x&&iJ(x.expression,b,nu);if(S){s.classSuper=t.createUniqueName("_classSuper",48);const e=hA(S),n=kP(e)&&!e.name||_P(e)&&!e.name||uP(e)?t.createComma(t.createNumericLiteral(0),S):S;c.push(w(s.classSuper,n));const r=t.updateExpressionWithTypeArguments(x,s.classSuper,void 0),i=t.updateHeritageClause(v,[r]);g=t.createNodeArray([i])}const T=s.classThis??t.createThis();f(s),l=pe(l,function(e,n){const r=t.createVariableDeclaration(e,void 0,void 0,t.createConditionalExpression(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("Symbol"),"function"),t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),t.createToken(58),t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[n?ae(n):t.createNull()]),t.createToken(59),t.createVoidZero()));return t.createVariableStatement(void 0,t.createVariableDeclarationList([r],2))}(s.metadataReference,s.classSuper));let C=o.members;if(C=oJ(C,e=>SD(e)?e:k(e),x_),C=oJ(C,e=>SD(e)?k(e):e,x_),u){let n;for(let r of u){r=iJ(r,function r(i){return 16384&i.transformFlags?110===i.kind?(n||(n=t.createUniqueName("_outerThis",16),c.unshift(w(n,t.createThis()))),n):fJ(i,r,e):i},nu);l=pe(l,t.createExpressionStatement(r))}u=void 0}if(m(),ee(s.pendingInstanceInitializers)&&!vv(o)){const e=P(o,s);if(e){const n=Dh(o),r=[];if(!(!n||106===hA(n.expression).kind)){const e=t.createSpreadElement(t.createIdentifier("arguments")),n=t.createCallExpression(t.createSuper(),void 0,[e]);r.push(t.createExpressionStatement(n))}ge(r,e);const i=t.createBlock(r,!0);p=t.createConstructorDeclaration(void 0,[],i)}}if(s.staticMethodExtraInitializersName&&c.push(w(s.staticMethodExtraInitializersName,t.createArrayLiteralExpression())),s.instanceMethodExtraInitializersName&&c.push(w(s.instanceMethodExtraInitializersName,t.createArrayLiteralExpression())),s.memberInfos&&md(s.memberInfos,(e,n)=>{$v(n)&&(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))}),s.memberInfos&&md(s.memberInfos,(e,n)=>{$v(n)||(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))}),l=ge(l,s.staticNonFieldDecorationStatements),l=ge(l,s.nonStaticNonFieldDecorationStatements),l=ge(l,s.staticFieldDecorationStatements),l=ge(l,s.nonStaticFieldDecorationStatements),s.classDescriptorName&&s.classDecoratorsName&&s.classExtraInitializersName&&s.classThis){l??(l=[]);const e=t.createPropertyAssignment("value",T),r=t.createObjectLiteralExpression([e]),i=t.createAssignment(s.classDescriptorName,r),c=t.createPropertyAccessExpression(T,"name"),_=n().createESDecorateHelper(t.createNull(),i,s.classDecoratorsName,{kind:"class",name:c,metadata:s.metadataReference},t.createNull(),s.classExtraInitializersName),u=t.createExpressionStatement(_);hw(u,ex(o)),l.push(u);const d=t.createPropertyAccessExpression(s.classDescriptorName,"value"),p=t.createAssignment(s.classThis,d),f=t.createAssignment(a,p);l.push(t.createExpressionStatement(f))}if(l.push(function(e,n){const r=t.createObjectDefinePropertyCall(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata"),t.createPropertyDescriptor({configurable:!0,writable:!0,enumerable:!0,value:n},!0));return dw(t.createIfStatement(n,t.createExpressionStatement(r)),1)}(T,s.metadataReference)),ee(s.pendingStaticInitializers)){for(const e of s.pendingStaticInitializers){const n=t.createExpressionStatement(e);hw(n,gw(e)),_=pe(_,n)}s.pendingStaticInitializers=void 0}if(s.classExtraInitializersName){const e=n().createRunInitializersHelper(T,s.classExtraInitializersName),r=t.createExpressionStatement(e);hw(r,o.name??ex(o)),_=pe(_,r)}l&&_&&!s.hasStaticInitializers&&(ge(l,_),_=void 0);const N=l&&t.createClassStaticBlockDeclaration(t.createBlock(l,!0));N&&h&&fw(N,32);const D=_&&t.createClassStaticBlockDeclaration(t.createBlock(_,!0));if(N||p||D){const e=[],n=C.findIndex(Mz);N?(ge(e,C,0,n+1),e.push(N),ge(e,C,n+1)):ge(e,C),p&&e.push(p),D&&e.push(D),C=vI(t.createNodeArray(e),C)}const E=i();let F;if(y){F=t.createClassExpression(void 0,void 0,void 0,g,C),s.classThis&&(F=Iz(t,F,s.classThis));const e=t.createVariableDeclaration(a,void 0,void 0,F),n=t.createVariableDeclarationList([e]),r=s.classThis?t.createAssignment(a,s.classThis):a;c.push(t.createVariableStatement(void 0,n),t.createReturnStatement(r))}else F=t.createClassExpression(void 0,o.name,void 0,g,C),c.push(t.createReturnStatement(F));if(h){mw(F,32);for(const e of F.members)(o_(e)||T_(e))&&Hv(e)&&mw(e,32)}return cw(F,o),t.createImmediatelyInvokedArrowFunction(t.mergeLexicalEnvironment(c,E))}function D(e){return wm(!1,e)||Cm(!1,e)}function P(e,n){if(ee(n.pendingInstanceInitializers)){const e=[];return e.push(t.createExpressionStatement(t.inlineExpressions(n.pendingInstanceInitializers))),n.pendingInstanceInitializers=void 0,e}}function E(e,n,r,i,o,a){const s=i[o],c=n[s];if(ge(e,oJ(n,b,wu,r,s-r)),YP(c)){const n=[];E(n,c.tryBlock.statements,0,i,o+1,a);vI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),iJ(c.catchClause,b,$E),iJ(c.finallyBlock,b,jP)))}else ge(e,oJ(n,b,wu,s,1)),ge(e,a);ge(e,oJ(n,b,wu,s+1))}function F(e,t){return e!==t&&(kw(e,t),hw(e,ex(t))),e}function A(e,r,i){let a,s,c,l,_,d;if(!r){const t=oJ(e.modifiers,S,__);return y(),s=B(e.name),v(),{modifiers:t,referencedName:a,name:s,initializersName:c,descriptorName:d,thisArg:_}}const p=X(uz(e,r.class,!1)),f=oJ(e.modifiers,S,__);if(p){const m=C(e,"decorators"),g=t.createArrayLiteralExpression(p),h=t.createAssignment(m,g),x={memberDecoratorsName:m};r.memberInfos??(r.memberInfos=new Map),r.memberInfos.set(e,x),u??(u=[]),u.push(h);const S=w_(e)||T_(e)?$v(e)?r.staticNonFieldDecorationStatements??(r.staticNonFieldDecorationStatements=[]):r.nonStaticNonFieldDecorationStatements??(r.nonStaticNonFieldDecorationStatements=[]):yD(e)&&!T_(e)?$v(e)?r.staticFieldDecorationStatements??(r.staticFieldDecorationStatements=[]):r.nonStaticFieldDecorationStatements??(r.nonStaticFieldDecorationStatements=[]):Tn.fail(),k=kD(e)?"getter":TD(e)?"setter":bD(e)?"method":T_(e)?"accessor":yD(e)?"field":Tn.fail();let T;if(QN(e.name)||YN(e.name))T={computed:!1,name:e.name};else if(Zh(e.name))T={computed:!0,name:t.createStringLiteralFromNode(e.name)};else{const r=e.name.expression;Zh(r)&&!QN(r)?T={computed:!0,name:t.createStringLiteralFromNode(r)}:(y(),({referencedName:a,name:s}=function(e){if(Zh(e)||YN(e)){return{referencedName:t.createStringLiteralFromNode(e),name:iJ(e,b,d_)}}if(Zh(e.expression)&&!QN(e.expression)){return{referencedName:t.createStringLiteralFromNode(e.expression),name:iJ(e,b,d_)}}const r=t.getGeneratedNameForNode(e);o(r);const i=n().createPropKeyHelper(iJ(e.expression,b,nu)),a=t.createAssignment(r,i),s=t.updateComputedPropertyName(e,K(a));return{referencedName:r,name:s}}(e.name)),T={computed:!0,name:a},v())}const w={kind:k,name:T,static:$v(e),private:YN(e.name),access:{get:yD(e)||kD(e)||bD(e),set:yD(e)||TD(e)},metadata:r.metadataReference};if(w_(e)){const o=$v(e)?r.staticMethodExtraInitializersName:r.instanceMethodExtraInitializersName;let a;Tn.assertIsDefined(o),o_(e)&&i&&(a=i(e,oJ(f,e=>dt(e,tD),__)),x.memberDescriptorName=d=C(e,"descriptor"),a=t.createAssignment(d,a));const s=n().createESDecorateHelper(t.createThis(),a??t.createNull(),m,w,t.createNull(),o),c=t.createExpressionStatement(s);hw(c,ex(e)),S.push(c)}else if(yD(e)){let o;c=x.memberInitializersName??(x.memberInitializersName=C(e,"initializers")),l=x.memberExtraInitializersName??(x.memberExtraInitializersName=C(e,"extraInitializers")),$v(e)&&(_=r.classThis),o_(e)&&Qv(e)&&i&&(o=i(e,void 0),x.memberDescriptorName=d=C(e,"descriptor"),o=t.createAssignment(d,o));const a=n().createESDecorateHelper(T_(e)?t.createThis():t.createNull(),o??t.createNull(),m,w,c,l),s=t.createExpressionStatement(a);hw(s,ex(e)),S.push(s)}}return void 0===s&&(y(),s=B(e.name),v()),ee(f)||!bD(e)&&!yD(e)||dw(s,1024),{modifiers:f,referencedName:a,name:s,initializersName:c,extraInitializersName:l,descriptorName:d,thisArg:_}}function I(e){return kP(e)&&!e.name&&D(e)}function O(e){const t=hA(e);return kP(t)&&!t.name&&!wm(!1,t)}function j(n,r){if(kb(n)){const e=W(n.left),r=iJ(n.right,b,nu);return t.updateBinaryExpression(n,e,n.operatorToken,r)}if(xb(n)){if(_y(n,I))return fJ(n=qz(e,n,O(n.right)),b,e);if(gm(n.left)&&l&&_){let e=iP(n.left)?iJ(n.left.argumentExpression,b,nu):QN(n.left.name)?t.createStringLiteralFromNode(n.left.name):void 0;if(e){let i=iJ(n.right,b,nu);if(ZJ(n.operatorToken.kind)){let r=e;YJ(e)||(r=t.createTempVariable(o),e=t.createAssignment(r,e));const a=t.createReflectGetCall(_,r,l);cw(a,n.left),vI(a,n.left),i=t.createBinaryExpression(a,ez(n.operatorToken.kind),i),vI(i,n)}const a=r?void 0:t.createTempVariable(o);return a&&(i=t.createAssignment(a,i),vI(a,n)),i=t.createReflectSetCall(_,e,i,l),cw(i,n),vI(i,n),a&&(i=t.createComma(i,a),vI(i,n)),i}}}if(28===n.operatorToken.kind){const e=iJ(n.left,T,nu),i=iJ(n.right,r?T:b,nu);return t.updateBinaryExpression(n,e,n.operatorToken,i)}return fJ(n,b,e)}function L(n,r){if(46===n.operator||47===n.operator){const e=mh(n.operand);if(gm(e)&&l&&_){let i=iP(e)?iJ(e.argumentExpression,b,nu):QN(e.name)?t.createStringLiteralFromNode(e.name):void 0;if(i){let e=i;YJ(i)||(e=t.createTempVariable(o),i=t.createAssignment(e,i));let a=t.createReflectGetCall(_,e,l);cw(a,n),vI(a,n);const s=r?void 0:t.createTempVariable(o);return a=oA(t,n,a,o,s),a=t.createReflectSetCall(_,i,a,l),cw(a,n),vI(a,n),s&&(a=t.createComma(a,s),vI(a,n)),a}}}return fJ(n,b,e)}function R(e,n){const r=n?pJ(e.elements,T):pJ(e.elements,b,T);return t.updateCommaListExpression(e,r)}function B(e){return pD(e)?J(e):iJ(e,b,d_)}function J(e){let n=iJ(e.expression,b,nu);return YJ(n)||(n=K(n)),t.updateComputedPropertyName(e,n)}function z(n){if(nP(n)||tP(n))return W(n);if(gm(n)&&l&&_){const e=iP(n)?iJ(n.argumentExpression,b,nu):QN(n.name)?t.createStringLiteralFromNode(n.name):void 0;if(e){const r=t.createTempVariable(void 0),i=t.createAssignmentTargetWrapper(r,t.createReflectSetCall(_,e,r,l));return cw(i,n),vI(i,n),i}}return fJ(n,b,e)}function q(n){if(xb(n,!0)){_y(n,I)&&(n=qz(e,n,O(n.right)));const r=z(n.left),i=iJ(n.right,b,nu);return t.updateBinaryExpression(n,r,n.operatorToken,i)}return z(n)}function U(n){return Tn.assertNode(n,U_),SP(n)?function(n){if(X_(n.expression)){const e=z(n.expression);return t.updateSpreadElement(n,e)}return fJ(n,b,e)}(n):TP(n)?fJ(n,b,e):q(n)}function V(n){return Tn.assertNode(n,z_),GE(n)?function(n){if(X_(n.expression)){const e=z(n.expression);return t.updateSpreadAssignment(n,e)}return fJ(n,b,e)}(n):KE(n)?function(t){return _y(t,I)&&(t=qz(e,t,O(t.objectAssignmentInitializer))),fJ(t,b,e)}(n):HE(n)?function(n){const r=iJ(n.name,b,d_);if(xb(n.initializer,!0)){const e=q(n.initializer);return t.updatePropertyAssignment(n,r,e)}if(X_(n.initializer)){const e=z(n.initializer);return t.updatePropertyAssignment(n,r,e)}return fJ(n,b,e)}(n):fJ(n,b,e)}function W(e){if(tP(e)){const n=oJ(e.elements,U,nu);return t.updateArrayLiteralExpression(e,n)}{const n=oJ(e.properties,V,F_);return t.updateObjectLiteralExpression(e,n)}}function $(e,n){const r=n?T:b,i=iJ(e.expression,r,nu);return t.updateParenthesizedExpression(e,i)}function H(e,n){return ee(e)&&(n?lP(n)?(e.push(n.expression),n=t.updateParenthesizedExpression(n,t.inlineExpressions(e))):(e.push(n),n=t.inlineExpressions(e)):n=t.inlineExpressions(e)),n}function K(e){const t=H(u,e);return Tn.assertIsDefined(t),t!==e&&(u=void 0),t}function G(e,t,n){const r=H(t?e.pendingStaticInitializers:e.pendingInstanceInitializers,n);return r!==n&&(t?e.pendingStaticInitializers=void 0:e.pendingInstanceInitializers=void 0),r}function X(e){if(!e)return;const t=[];return ge(t,M(e.decorators,Q)),t}function Q(e){const n=iJ(e.expression,b,nu);dw(n,3072);if(qx(hA(n))){const{target:e,thisArg:r}=t.createCallBinding(n,o,a,!0);return t.restoreOuterExpressions(n,t.createFunctionBindCall(e,r,[]))}return n}function Y(e,r,i,o,a,s,c){const l=t.createFunctionExpression(i,o,void 0,void 0,s,void 0,c??t.createBlock([]));cw(l,e),hw(l,ex(e)),dw(l,3072);const _="get"===a||"set"===a?a:void 0,u=t.createStringLiteralFromNode(r,void 0),d=n().createSetFunctionNameHelper(l,u,_),p=t.createPropertyAssignment(t.createIdentifier(a),d);return cw(p,e),hw(p,ex(e)),dw(p,3072),p}function Z(e,n){return t.createObjectLiteralExpression([Y(e,e.name,n,e.asteriskToken,"value",oJ(e.parameters,b,mD),iJ(e.body,b,jP))])}function te(e,n){return t.createObjectLiteralExpression([Y(e,e.name,n,void 0,"get",[],iJ(e.body,b,jP))])}function ne(e,n){return t.createObjectLiteralExpression([Y(e,e.name,n,void 0,"set",oJ(e.parameters,b,mD),iJ(e.body,b,jP))])}function re(e,n){return t.createObjectLiteralExpression([Y(e,e.name,n,void 0,"get",[],t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)))])),Y(e,e.name,n,void 0,"set",[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)),t.createIdentifier("value")))]))])}function ie(e,n,r){return e=oJ(e,e=>oD(e)?e:void 0,__),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("get")),t.createThis(),[]))]))}function oe(e,n,r){return e=oJ(e,e=>oD(e)?e:void 0,__),t.createSetAccessorDeclaration(e,n,[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("set")),t.createThis(),[t.createIdentifier("value")]))]))}function ae(e){return t.createBinaryExpression(t.createElementAccessExpression(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),61,t.createNull())}}function eq(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=OS(s);let l,_,u,d,p,f=0;const m=[];let g=0;const y=e.onEmitNode,v=e.onSubstituteNode;return e.onEmitNode=function(e,t,n){if(1&l&&function(e){const t=e.kind;return 263===t||176===t||174===t||177===t||178===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==f){const i=f;return f=r,y(e,t,n),void(f=i)}}else if(l&&m[KB(t)]){const r=f;return f=0,y(e,t,n),void(f=r)}y(e,t,n)},e.onSubstituteNode=function(e,n){if(n=v(e,n),1===e&&f)return function(e){switch(e.kind){case 211:return $(e);case 212:return H(e);case 213:return function(e){const n=e.expression;if(gm(n)){const r=rP(n)?$(n):H(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n);return n},qJ(e,function(t){if(t.isDeclarationFile)return t;b(1,!1),b(2,!Tp(t,s));const n=fJ(t,C,e);return Ow(n,e.readEmitHelpers()),n});function b(e,t){g=t?g|e:g&~e}function x(e){return 0!==(g&e)}function S(e,t,n){const r=e&~g;if(r){b(r,!0);const e=t(n);return b(r,!1),e}return t(n)}function k(t){return fJ(t,C,e)}function T(t){switch(t.kind){case 218:case 262:case 174:case 177:case 178:case 176:return t;case 169:case 208:case 260:break;case 80:if(p&&a.isArgumentsLocalBinding(t))return p}return fJ(t,T,e)}function C(n){if(!(256&n.transformFlags))return p?T(n):n;switch(n.kind){case 134:return;case 223:return function(n){if(!x(1))return fJ(n,C,e);return cw(vI(t.createYieldExpression(void 0,iJ(n.expression,C,nu)),n),n)}(n);case 174:return S(3,D,n);case 262:return S(3,F,n);case 218:return S(3,A,n);case 219:return S(1,I,n);case 211:return u&&rP(n)&&108===n.expression.kind&&u.add(n.name.escapedText),fJ(n,C,e);case 212:return u&&108===n.expression.kind&&(d=!0),fJ(n,C,e);case 177:return S(3,P,n);case 178:return S(3,E,n);case 176:return S(3,N,n);case 263:case 231:return S(3,k,n);default:return fJ(n,C,e)}}function w(n){if(ch(n))switch(n.kind){case 243:return function(n){if(j(n.declarationList)){const e=L(n.declarationList,!1);return e?t.createExpressionStatement(e):void 0}return fJ(n,C,e)}(n);case 248:return function(n){const r=n.initializer;return t.updateForStatement(n,j(r)?L(r,!1):iJ(n.initializer,C,pu),iJ(n.condition,C,nu),iJ(n.incrementor,C,nu),dJ(n.statement,w,e))}(n);case 249:return function(n){return t.updateForInStatement(n,j(n.initializer)?L(n.initializer,!0):Tn.checkDefined(iJ(n.initializer,C,pu)),Tn.checkDefined(iJ(n.expression,C,nu)),dJ(n.statement,w,e))}(n);case 250:return function(n){return t.updateForOfStatement(n,iJ(n.awaitModifier,C,rD),j(n.initializer)?L(n.initializer,!0):Tn.checkDefined(iJ(n.initializer,C,pu)),Tn.checkDefined(iJ(n.expression,C,nu)),dJ(n.statement,w,e))}(n);case 299:return function(t){const n=new Set;let r;if(O(t.variableDeclaration,n),n.forEach((e,t)=>{_.has(t)&&(r||(r=new Set(_)),r.delete(t))}),r){const n=_;_=r;const i=fJ(t,w,e);return _=n,i}return fJ(t,w,e)}(n);case 241:case 255:case 269:case 296:case 297:case 258:case 246:case 247:case 245:case 254:case 256:return fJ(n,w,e);default:return Tn.assertNever(n,"Unhandled node.")}return C(n)}function N(n){const r=p;p=void 0;const i=t.updateConstructorDeclaration(n,oJ(n.modifiers,C,__),lJ(n.parameters,C,e),z(n));return p=r,i}function D(n){let r;const i=$h(n),o=p;p=void 0;const a=t.updateMethodDeclaration(n,oJ(n.modifiers,C,D_),n.asteriskToken,n.name,void 0,void 0,r=2&i?U(n):lJ(n.parameters,C,e),void 0,2&i?V(n,r):z(n));return p=o,a}function P(n){const r=p;p=void 0;const i=t.updateGetAccessorDeclaration(n,oJ(n.modifiers,C,D_),n.name,lJ(n.parameters,C,e),void 0,z(n));return p=r,i}function E(n){const r=p;p=void 0;const i=t.updateSetAccessorDeclaration(n,oJ(n.modifiers,C,D_),n.name,lJ(n.parameters,C,e),z(n));return p=r,i}function F(n){let r;const i=p;p=void 0;const o=$h(n),a=t.updateFunctionDeclaration(n,oJ(n.modifiers,C,D_),n.asteriskToken,n.name,void 0,r=2&o?U(n):lJ(n.parameters,C,e),void 0,2&o?V(n,r):uJ(n.body,C,e));return p=i,a}function A(n){let r;const i=p;p=void 0;const o=$h(n),a=t.updateFunctionExpression(n,oJ(n.modifiers,C,__),n.asteriskToken,n.name,void 0,r=2&o?U(n):lJ(n.parameters,C,e),void 0,2&o?V(n,r):uJ(n.body,C,e));return p=i,a}function I(n){let r;const i=$h(n);return t.updateArrowFunction(n,oJ(n.modifiers,C,__),void 0,r=2&i?U(n):lJ(n.parameters,C,e),void 0,n.equalsGreaterThanToken,2&i?V(n,r):uJ(n.body,C,e))}function O({name:e},t){if(QN(e))t.add(e.escapedText);else for(const n of e.elements)TP(n)||O(n,t)}function j(e){return!!e&&tE(e)&&!(7&e.flags)&&e.declarations.some(J)}function L(e,n){!function(e){h(e.declarations,R)}(e);const r=hx(e);return 0===r.length?n?iJ(t.converters.convertToAssignmentElementTarget(e.declarations[0].name),C,nu):void 0:t.inlineExpressions(M(r,B))}function R({name:e}){if(QN(e))o(e);else for(const t of e.elements)TP(t)||R(t)}function B(e){const n=hw(t.createAssignment(t.converters.convertToAssignmentElementTarget(e.name),e.initializer),e);return Tn.checkDefined(iJ(n,C,nu))}function J({name:e}){if(QN(e))return _.has(e.escapedText);for(const t of e.elements)if(!TP(t)&&J(t))return!0;return!1}function z(n){Tn.assertIsDefined(n.body);const r=u,i=d;u=new Set,d=!1;let o=uJ(n.body,C,e);const s=bc(n,g_);if(c>=2&&(a.hasNodeCheckFlag(n,256)||a.hasNodeCheckFlag(n,128))&&!!(3&~$h(s))){if(W(),u.size){const e=tq(t,a,n,u);m[KB(e)]=!0;const r=o.statements.slice();Ud(r,[e]),o=t.updateBlock(o,r)}d&&(a.hasNodeCheckFlag(n,256)?Iw(o,EN):a.hasNodeCheckFlag(n,128)&&Iw(o,PN))}return u=r,d=i,o}function q(){Tn.assert(p);const e=t.createVariableDeclaration(p,void 0,void 0,t.createIdentifier("arguments")),n=t.createVariableStatement(void 0,[e]);return bA(n),pw(n,2097152),n}function U(n){if(vz(n.parameters))return lJ(n.parameters,C,e);const r=[];for(const e of n.parameters){if(e.initializer||e.dotDotDotToken){if(219===n.kind){const e=t.createParameterDeclaration(void 0,t.createToken(26),t.createUniqueName("args",8));r.push(e)}break}const i=t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e.name,8));r.push(i)}const i=t.createNodeArray(r);return vI(i,n.parameters),i}function V(o,s){const l=vz(o.parameters)?void 0:lJ(o.parameters,C,e);r();const f=bc(o,f_).type,g=c<2?function(e){const t=e&&bm(e);if(t&&u_(t)){const e=a.getTypeReferenceSerializationKind(t);if(1===e||0===e)return t}return}(f):void 0,h=219===o.kind,y=p,v=a.hasNodeCheckFlag(o,512)&&!p;let b;if(v&&(p=t.createUniqueName("arguments")),l)if(h){const e=[];Tn.assert(s.length<=o.parameters.length);for(let n=0;n=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(r&&(W(),u.size)){const n=tq(t,a,o,u);m[KB(n)]=!0,Ud(e,[n])}v&&Ud(e,[q()]);const i=t.createBlock(e,!0);vI(i,o.body),r&&d&&(a.hasNodeCheckFlag(o,256)?Iw(i,EN):a.hasNodeCheckFlag(o,128)&&Iw(i,PN)),F=i}return _=S,h||(u=k,d=T,p=y),F}function W(){1&l||(l|=1,e.enableSubstitution(213),e.enableSubstitution(211),e.enableSubstitution(212),e.enableEmitNotification(263),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(176),e.enableEmitNotification(243))}function $(e){return 108===e.expression.kind?vI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function H(e){return 108===e.expression.kind?(n=e.argumentExpression,r=e,vI(256&f?t.createPropertyAccessExpression(t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[n]),"value"):t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[n]),r)):e;var n,r}}function tq(e,t,n,r){const i=t.hasNodeCheckFlag(n,256),o=[];return r.forEach((t,n)=>{const r=Cc(n),a=[];a.push(e.createPropertyAssignment("get",e.createArrowFunction(void 0,void 0,[],void 0,void 0,dw(e.createPropertyAccessExpression(dw(e.createSuper(),8),r),8)))),i&&a.push(e.createPropertyAssignment("set",e.createArrowFunction(void 0,void 0,[e.createParameterDeclaration(void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,e.createAssignment(dw(e.createPropertyAccessExpression(dw(e.createSuper(),8),r),8),e.createIdentifier("v"))))),o.push(e.createPropertyAssignment(r,e.createObjectLiteralExpression(a)))}),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createUniqueName("_super",48),void 0,void 0,e.createCallExpression(e.createPropertyAccessExpression(e.createIdentifier("Object"),"create"),void 0,[e.createNull(),e.createObjectLiteralExpression(o,!0)]))],2))}function nq(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=OS(s),l=e.onEmitNode;e.onEmitNode=function(e,t,n){if(1&u&&function(e){const t=e.kind;return 263===t||176===t||174===t||177===t||178===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==v){const i=v;return v=r,l(e,t,n),void(v=i)}}else if(u&&x[KB(t)]){const r=v;return v=0,l(e,t,n),void(v=r)}l(e,t,n)};const _=e.onSubstituteNode;e.onSubstituteNode=function(e,n){if(n=_(e,n),1===e&&v)return function(e){switch(e.kind){case 211:return G(e);case 212:return X(e);case 213:return function(e){const n=e.expression;if(gm(n)){const r=rP(n)?G(n):X(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n);return n};let u,d,p,f,m,g,h,y=!1,v=0,b=0;const x=[];return qJ(e,function(n){if(n.isDeclarationFile)return n;f=n;const r=function(n){const r=S(2,Tp(n,s)?0:1);y=!1;const i=fJ(n,C,e),o=ne(i.statements,m&&[t.createVariableStatement(void 0,t.createVariableDeclarationList(m))]),a=t.updateSourceFile(i,vI(t.createNodeArray(o),n.statements));return k(r),a}(n);return Ow(r,e.readEmitHelpers()),f=void 0,m=void 0,r});function S(e,t){const n=b;return b=3&(b&~e|t),n}function k(e){b=e}function T(e){m=pe(m,t.createVariableDeclaration(e))}function C(e){return E(e,!1)}function w(e){return E(e,!0)}function N(e){if(134!==e.kind)return e}function D(e,t,n,r){if(function(e,t){return b!==(b&~e|t)}(n,r)){const i=S(n,r),o=e(t);return k(i),o}return e(t)}function P(t){return fJ(t,C,e)}function E(r,i){if(!(128&r.transformFlags))return r;switch(r.kind){case 223:return function(r){if(2&d&&1&d)return cw(vI(t.createYieldExpression(void 0,n().createAwaitHelper(iJ(r.expression,C,nu))),r),r);return fJ(r,C,e)}(r);case 229:return function(r){if(2&d&&1&d){if(r.asteriskToken){const e=iJ(Tn.checkDefined(r.expression),C,nu);return cw(vI(t.createYieldExpression(void 0,n().createAwaitHelper(t.updateYieldExpression(r,r.asteriskToken,vI(n().createAsyncDelegatorHelper(vI(n().createAsyncValuesHelper(e),e)),e)))),r),r)}return cw(vI(t.createYieldExpression(void 0,O(r.expression?iJ(r.expression,C,nu):t.createVoidZero())),r),r)}return fJ(r,C,e)}(r);case 253:return function(n){if(2&d&&1&d)return t.updateReturnStatement(n,O(n.expression?iJ(n.expression,C,nu):t.createVoidZero()));return fJ(n,C,e)}(r);case 256:return function(n){if(2&d){const e=$f(n);return 250===e.kind&&e.awaitModifier?I(e,n):t.restoreEnclosingLabel(iJ(e,C,wu,t.liftToBlock),n)}return fJ(n,C,e)}(r);case 210:return function(r){if(65536&r.transformFlags){const e=function(e){let n;const r=[];for(const i of e)if(305===i.kind){n&&(r.push(t.createObjectLiteralExpression(n)),n=void 0);const e=i.expression;r.push(iJ(e,C,nu))}else n=pe(n,303===i.kind?t.createPropertyAssignment(i.name,iJ(i.initializer,C,nu)):iJ(i,C,F_));n&&r.push(t.createObjectLiteralExpression(n));return r}(r.properties);e.length&&210!==e[0].kind&&e.unshift(t.createObjectLiteralExpression());let i=e[0];if(e.length>1){for(let t=1;t=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(m){1&u||(u|=1,e.enableSubstitution(213),e.enableSubstitution(211),e.enableSubstitution(212),e.enableEmitNotification(263),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(176),e.enableEmitNotification(243));const n=tq(t,a,o,g);x[KB(n)]=!0,Ud(d,[n])}d.push(f);const y=t.updateBlock(o.body,d);return m&&h&&(a.hasNodeCheckFlag(o,256)?Iw(y,EN):a.hasNodeCheckFlag(o,128)&&Iw(y,PN)),g=l,h=_,y}function H(e){r();let n=0;const o=[],a=iJ(e.body,C,uu)??t.createBlock([]);jP(a)&&(n=t.copyPrologue(a.statements,o,!1,C)),ge(o,K(void 0,e));const s=i();if(n>0||ee(o)||ee(s)){const e=t.converters.convertToFunctionBlock(a,!0);return Ud(o,s),ge(o,e.statements.slice(n)),t.updateBlock(e,vI(t.createNodeArray(o),e.statements))}return a}function K(n,r){let i=!1;for(const o of r.parameters)if(i){if(O_(o.name)){if(o.name.elements.length>0){const r=Tz(o,C,e,0,t.getGeneratedNameForNode(o));if(ee(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);dw(i,2097152),n=pe(n,i)}}else if(o.initializer){const e=t.getGeneratedNameForNode(o),r=iJ(o.initializer,C,nu),i=t.createAssignment(e,r),a=t.createExpressionStatement(i);dw(a,2097152),n=pe(n,a)}}else if(o.initializer){const e=t.cloneNode(o.name);vI(e,o.name),dw(e,96);const r=iJ(o.initializer,C,nu);pw(r,3168);const i=t.createAssignment(e,r);vI(i,o),dw(i,3072);const a=t.createBlock([t.createExpressionStatement(i)]);vI(a,o),dw(a,3905);const s=t.createTypeCheck(t.cloneNode(o.name),"undefined"),c=t.createIfStatement(s,a);bA(c),vI(c,o),dw(c,2101056),n=pe(n,c)}}else if(65536&o.transformFlags){i=!0;const r=Tz(o,C,e,1,t.getGeneratedNameForNode(o),!1,!0);if(ee(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);dw(i,2097152),n=pe(n,i)}}return n}function G(e){return 108===e.expression.kind?vI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function X(e){return 108===e.expression.kind?(n=e.argumentExpression,r=e,vI(256&v?t.createPropertyAccessExpression(t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[n]),"value"):t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[n]),r)):e;var n,r}}function rq(e){const t=e.factory;return qJ(e,function(t){if(t.isDeclarationFile)return t;return fJ(t,n,e)});function n(r){return 64&r.transformFlags?299===r.kind?function(r){if(!r.variableDeclaration)return t.updateCatchClause(r,t.createVariableDeclaration(t.createTempVariable(void 0)),iJ(r.block,n,jP));return fJ(r,n,e)}(r):fJ(r,n,e):r}}function iq(e){const{factory:t,hoistVariableDeclaration:n}=e;return qJ(e,function(t){if(t.isDeclarationFile)return t;return fJ(t,r,e)});function r(i){if(!(32&i.transformFlags))return i;switch(i.kind){case 213:{const e=o(i,!1);return Tn.assertNotNode(e,PE),e}case 211:case 212:if(Dl(i)){const e=s(i,!1,!1);return Tn.assertNotNode(e,PE),e}return fJ(i,r,e);case 226:return 61===i.operatorToken.kind?function(e){let i=iJ(e.left,r,nu),o=i;QJ(i)||(o=t.createTempVariable(n),i=t.createAssignment(o,i));return vI(t.createConditionalExpression(c(i,o),void 0,o,void 0,iJ(e.right,r,nu)),e)}(i):fJ(i,r,e);case 220:return function(e){return Dl(mh(e.expression))?cw(a(e.expression,!1,!0),e):t.updateDeleteExpression(e,iJ(e.expression,r,nu))}(i);default:return fJ(i,r,e)}}function i(e,n,r){const i=a(e.expression,n,r);return PE(i)?t.createSyntheticReferenceExpression(t.updateParenthesizedExpression(e,i.expression),i.thisArg):t.updateParenthesizedExpression(e,i)}function o(n,o){if(Dl(n))return s(n,o,!1);if(lP(n.expression)&&Dl(mh(n.expression))){const e=i(n.expression,!0,!1),o=oJ(n.arguments,r,nu);return PE(e)?vI(t.createFunctionCallCall(e.expression,e.thisArg,o),n):t.updateCallExpression(n,e,void 0,o)}return fJ(n,r,e)}function a(e,a,c){switch(e.kind){case 217:return i(e,a,c);case 211:case 212:return function(e,i,o){if(Dl(e))return s(e,i,o);let a,c=iJ(e.expression,r,nu);return Tn.assertNotNode(c,PE),i&&(QJ(c)?a=c:(a=t.createTempVariable(n),c=t.createAssignment(a,c))),c=211===e.kind?t.updatePropertyAccessExpression(e,c,iJ(e.name,r,QN)):t.updateElementAccessExpression(e,c,iJ(e.argumentExpression,r,nu)),a?t.createSyntheticReferenceExpression(c,a):c}(e,a,c);case 213:return o(e,a);default:return iJ(e,r,nu)}}function s(e,i,o){const{expression:s,chain:l}=function(e){Tn.assertNotNode(e,jl);const t=[e];for(;!e.questionDotToken&&!sP(e);)e=pt(Ol(e.expression),Dl),Tn.assertNotNode(e,jl),t.unshift(e);return{expression:e.expression,chain:t}}(e),_=a(Ol(s),Nl(l[0]),!1);let u=PE(_)?_.thisArg:void 0,d=PE(_)?_.expression:_,p=t.restoreOuterExpressions(s,d,8);QJ(d)||(d=t.createTempVariable(n),p=t.createAssignment(d,p));let f,m=d;for(let e=0;ee&&ge(c,oJ(n.statements,_,wu,e,d-e));break}d++}Tn.assert(dt&&(t=e)}return t}(n.caseBlock.clauses);if(r){const i=m();return g([t.updateSwitchStatement(n,iJ(n.expression,_,nu),t.updateCaseBlock(n.caseBlock,n.caseBlock.clauses.map(n=>function(n,r){if(0!==uq(n.statements))return UE(n)?t.updateCaseClause(n,iJ(n.expression,_,nu),u(n.statements,0,n.statements.length,r,void 0)):t.updateDefaultClause(n,u(n.statements,0,n.statements.length,r,void 0));return fJ(n,_,e)}(n,i))))],i,2===r)}return fJ(n,_,e)}(n);default:return fJ(n,_,e)}}function u(i,o,a,s,u){const m=[];for(let r=o;rt&&(t=e)}return t}function dq(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getCompilerOptions();let i,o;return qJ(e,function(n){if(n.isDeclarationFile)return n;i=n,o={},o.importSpecifier=lk(r,n);let a=fJ(n,l,e);Ow(a,e.readEmitHelpers());let s=a.statements;o.filenameDeclaration&&(s=$d(s.slice(),t.createVariableStatement(void 0,t.createVariableDeclarationList([o.filenameDeclaration],2))));if(o.utilizedImplicitRuntimeImports)for(const[e,r]of We(o.utilizedImplicitRuntimeImports.entries()))if(tO(n)){const n=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamedImports(We(r.values()))),t.createStringLiteral(e),void 0);VT(n,!1),s=$d(s.slice(),n)}else if(af(n)){const n=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createObjectBindingPattern(We(r.values(),e=>t.createBindingElement(void 0,e.propertyName,e.name))),void 0,void 0,t.createCallExpression(t.createIdentifier("require"),void 0,[t.createStringLiteral(e)]))],2));VT(n,!1),s=$d(s.slice(),n)}s!==a.statements&&(a=t.updateSourceFile(a,s));return o=void 0,a});function a(){if(o.filenameDeclaration)return o.filenameDeclaration.name;const e=t.createVariableDeclaration(t.createUniqueName("_jsxFileName",48),void 0,void 0,t.createStringLiteral(i.fileName));return o.filenameDeclaration=e,o.filenameDeclaration.name}function s(e){const t=function(e){return 5===r.jsx?"jsxDEV":e?"jsxs":"jsx"}(e);return c(t)}function c(e){var n,i;const a="createElement"===e?o.importSpecifier:_k(o.importSpecifier,r),s=null==(i=null==(n=o.utilizedImplicitRuntimeImports)?void 0:n.get(a))?void 0:i.get(e);if(s)return s.name;o.utilizedImplicitRuntimeImports||(o.utilizedImplicitRuntimeImports=new Map);let c=o.utilizedImplicitRuntimeImports.get(a);c||(c=new Map,o.utilizedImplicitRuntimeImports.set(a,c));const l=t.createUniqueName(`_${e}`,112),_=t.createImportSpecifier(!1,t.createIdentifier(e),l);return Hw(l,_),c.set(e,_),l}function l(t){return 2&t.transformFlags?function(t){switch(t.kind){case 284:return f(t,!1);case 285:return m(t,!1);case 288:return h(t,!1);case 294:return F(t);default:return fJ(t,l,e)}}(t):t}function _(e){switch(e.kind){case 12:return function(e){const n=function(e){let t,n=0,r=-1;for(let i=0;iHE(e)&&(QN(e.name)&&"__proto__"===wc(e.name)||ON(e.name)&&"__proto__"===e.name.text))}function d(e){return void 0===o.importSpecifier||function(e){let t=!1;for(const n of e.attributes.properties)if(!JE(n)||nP(n.expression)&&!n.expression.properties.some(GE)){if(t&&RE(n)&&QN(n.name)&&"key"===n.name.escapedText)return!0}else t=!0;return!1}(e)}function f(e,t){return(d(e.openingElement)?x:v)(e.openingElement,e.children,t,e)}function m(e,t){return(d(e)?x:v)(e,void 0,t,e)}function h(e,t){return(void 0===o.importSpecifier?k:S)(e.openingFragment,e.children,t,e)}function y(e){const n=Cy(e);if(1===g(n)&&!n[0].dotDotDotToken){const e=_(n[0]);return e&&t.createPropertyAssignment("children",e)}const r=$(e,_);return g(r)?t.createPropertyAssignment("children",t.createArrayLiteralExpression(r)):void 0}function v(e,n,r,i){const o=E(e),a=n&&n.length?y(n):void 0,s=C(e.attributes.properties,e=>!!e.name&&QN(e.name)&&"key"===e.name.escapedText),c=s?O(e.attributes.properties,e=>e!==s):e.attributes.properties;return b(o,g(c)?T(c,a):t.createObjectLiteralExpression(a?[a]:p),s,n||p,r,i)}function b(e,n,o,c,l,_){var u;const d=Cy(c),p=g(d)>1||!!(null==(u=d[0])?void 0:u.dotDotDotToken),f=[e,n];if(o&&f.push(N(o.initializer)),5===r.jsx){const e=bc(i);if(e&&QE(e)){void 0===o&&f.push(t.createVoidZero()),f.push(p?t.createTrue():t.createFalse());const n=ns(e,_.pos);f.push(t.createObjectLiteralExpression([t.createPropertyAssignment("fileName",a()),t.createPropertyAssignment("lineNumber",t.createNumericLiteral(n.line+1)),t.createPropertyAssignment("columnNumber",t.createNumericLiteral(n.character+1))])),f.push(t.createThis())}}const m=vI(t.createCallExpression(s(p),void 0,f),_);return l&&bA(m),m}function x(n,a,s,l){const u=E(n),d=n.attributes.properties,p=g(d)?T(d):t.createNull(),f=void 0===o.importSpecifier?QF(t,e.getEmitResolver().getJsxFactoryEntity(i),r.reactNamespace,n):c("createElement"),m=YF(t,f,u,p,$(a,_),l);return s&&bA(m),m}function S(e,n,r,i){let o;if(n&&n.length){const e=function(e){const n=y(e);return n&&t.createObjectLiteralExpression([n])}(n);e&&(o=e)}return b(c("Fragment"),o||t.createObjectLiteralExpression([]),void 0,n,r,i)}function k(n,o,a,s){const c=ZF(t,e.getEmitResolver().getJsxFactoryEntity(i),e.getEmitResolver().getJsxFragmentFactoryEntity(i),r.reactNamespace,$(o,_),n,s);return a&&bA(c),c}function T(e,i){const o=OS(r);return o&&o>=5?t.createObjectLiteralExpression(function(e,n){const r=J(Y(e,JE,(e,n)=>J(M(e,e=>{return n?nP((r=e).expression)&&!u(r.expression)?B(r.expression.properties,e=>Tn.checkDefined(iJ(e,l,F_))):t.createSpreadAssignment(Tn.checkDefined(iJ(r.expression,l,nu))):w(e);var r}))));n&&r.push(n);return r}(e,i)):function(e,r){const i=[];let o=[];for(const t of e)if(JE(t)){if(nP(t.expression)&&!u(t.expression)){for(const e of t.expression.properties)GE(e)?(a(),i.push(Tn.checkDefined(iJ(e.expression,l,nu)))):o.push(Tn.checkDefined(iJ(e,l)));continue}a(),i.push(Tn.checkDefined(iJ(t.expression,l,nu)))}else o.push(w(t));r&&o.push(r);a(),i.length&&!nP(i[0])&&i.unshift(t.createObjectLiteralExpression());return Fe(i)||n().createAssignHelper(i);function a(){o.length&&(i.push(t.createObjectLiteralExpression(o)),o=[])}}(e,i)}function w(e){const n=function(e){const n=e.name;if(QN(n)){const e=wc(n);return/^[A-Za-z_]\w*$/.test(e)?n:t.createStringLiteral(e)}return t.createStringLiteral(wc(n.namespace)+":"+wc(n.name))}(e),r=N(e.initializer);return t.createPropertyAssignment(n,r)}function N(e){if(void 0===e)return t.createTrue();if(11===e.kind){const n=void 0!==e.singleQuote?e.singleQuote:!Zm(e,i);return vI(t.createStringLiteral(function(e){const t=P(e);return t===e?void 0:t}(e.text)||e.text,n),e)}return 294===e.kind?void 0===e.expression?t.createTrue():Tn.checkDefined(iJ(e.expression,l,nu)):FE(e)?f(e,!1):AE(e)?m(e,!1):jE(e)?h(e,!1):Tn.failBadSyntaxKind(e)}function D(e,t){const n=P(t);return void 0===e?n:e+" "+n}function P(e){return e.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,(e,t,n,r,i,o,a)=>{if(i)return js(parseInt(i,10));if(o)return js(parseInt(o,16));{const t=pq.get(a);return t?js(t):e}})}function E(e){if(284===e.kind)return E(e.openingElement);{const n=e.tagName;return QN(n)&&$y(n.escapedText)?t.createStringLiteral(wc(n)):qE(n)?t.createStringLiteral(wc(n.namespace)+":"+wc(n.name)):nA(t,n)}}function F(e){const n=iJ(e.expression,l,nu);return e.dotDotDotToken?t.createSpreadElement(n):n}}var pq=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}));function fq(e){const{factory:t,hoistVariableDeclaration:n}=e;return qJ(e,function(t){if(t.isDeclarationFile)return t;return fJ(t,r,e)});function r(i){return 512&i.transformFlags?226===i.kind?function(i){switch(i.operatorToken.kind){case 68:return function(e){let i,o;const a=iJ(e.left,r,nu),s=iJ(e.right,r,nu);if(iP(a)){const e=t.createTempVariable(n),r=t.createTempVariable(n);i=vI(t.createElementAccessExpression(vI(t.createAssignment(e,a.expression),a.expression),vI(t.createAssignment(r,a.argumentExpression),a.argumentExpression)),a),o=vI(t.createElementAccessExpression(e,r),a)}else if(rP(a)){const e=t.createTempVariable(n);i=vI(t.createPropertyAccessExpression(vI(t.createAssignment(e,a.expression),a.expression),a.name),a),o=vI(t.createPropertyAccessExpression(e,a.name),a)}else i=a,o=a;return vI(t.createAssignment(i,vI(t.createGlobalMethodCall("Math","pow",[o,s]),e)),e)}(i);case 43:return function(e){const n=iJ(e.left,r,nu),i=iJ(e.right,r,nu);return vI(t.createGlobalMethodCall("Math","pow",[n,i]),e)}(i);default:return fJ(i,r,e)}}(i):fJ(i,r,e):i}}function mq(e,t){return{kind:e,expression:t}}function gq(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getCompilerOptions(),c=e.getEmitResolver(),l=e.onSubstituteNode,_=e.onEmitNode;let u,d,p,f,m,g;function h(e){f=pe(f,t.createVariableDeclaration(e))}return e.onEmitNode=function(e,t,n){if(1&g&&f_(t)){const r=y(32670,16&ip(t)?81:65);return _(e,t,n),void v(r,0,0)}_(e,t,n)},e.onSubstituteNode=function(e,n){if(n=l(e,n),1===e)return function(e){switch(e.kind){case 80:return function(e){if(2&g&&!aA(e)){const n=c.getReferencedDeclarationWithCollidingName(e);if(n&&(!S_(n)||!function(e,t){let n=kc(t);if(!n||n===e||n.end<=e.pos||n.pos>=e.end)return!1;const r=Lp(e);for(;n;){if(n===r||n===e)return!1;if(x_(n)&&n.parent===e)return!0;n=n.parent}return!1}(n,e)))return vI(t.getGeneratedNameForNode(jc(n)),e)}return e}(e);case 110:return function(e){if(1&g&&16&p)return vI(P(),e);return e}(e)}return e}(n);if(QN(n))return function(e){if(2&g&&!aA(e)){const n=kc(e,QN);if(n&&function(e){switch(e.parent.kind){case 208:case 263:case 266:case 260:return e.parent.name===e&&c.isDeclarationWithCollidingName(e.parent)}return!1}(n))return vI(t.getGeneratedNameForNode(n),e)}return e}(n);return n},qJ(e,function(n){if(n.isDeclarationFile)return n;u=n,d=n.text;const i=function(e){const n=y(8064,64),i=[],a=[];r();const s=t.copyPrologue(e.statements,i,!1,S);ge(a,oJ(e.statements,S,wu,s)),f&&a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(f)));return t.mergeLexicalEnvironment(i,o()),oe(i,e),v(n,0,0),t.updateSourceFile(e,vI(t.createNodeArray(ne(i,a)),e.statements))}(n);return Ow(i,e.readEmitHelpers()),u=void 0,d=void 0,f=void 0,p=0,i});function y(e,t){const n=p;return p=32767&(p&~e|t),n}function v(e,t,n){p=-32768&(p&~t|n)|e}function b(e){return!!(8192&p)&&253===e.kind&&!e.expression}function x(e){return!!(1024&e.transformFlags)||void 0!==m||8192&p&&function(e){return 4194304&e.transformFlags&&(HP(e)||BP(e)||KP(e)||GP(e)||lE(e)||UE(e)||VE(e)||YP(e)||$E(e)||XP(e)||ou(e,!1)||jP(e))}(e)||ou(e,!1)&&qe(e)||!!(1&op(e))}function S(e){return x(e)?N(e,!1):e}function k(e){return x(e)?N(e,!0):e}function C(e){if(x(e)){const t=bc(e);if(yD(t)&&Hv(t)){const t=y(32670,16449),n=N(e,!1);return v(t,229376,0),n}return N(e,!1)}return e}function w(e){return 108===e.kind?st(e,!0):S(e)}function N(n,r){switch(n.kind){case 126:return;case 263:return function(e){const n=t.createVariableDeclaration(t.getLocalName(e,!0),void 0,void 0,F(e));cw(n,e);const r=[],i=t.createVariableStatement(void 0,t.createVariableDeclarationList([n]));if(cw(i,e),vI(i,e),bA(i),r.push(i),Wv(e,32)){const n=Wv(e,2048)?t.createExportDefault(t.getLocalName(e)):t.createExternalModuleExport(t.getLocalName(e));cw(n,i),r.push(n)}return Ie(r)}(n);case 231:return function(e){return F(e)}(n);case 169:return function(e){return e.dotDotDotToken?void 0:O_(e.name)?cw(vI(t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e),void 0,void 0,void 0),e),e):e.initializer?cw(vI(t.createParameterDeclaration(void 0,void 0,e.name,void 0,void 0,void 0),e),e):e}(n);case 262:return function(n){const r=m;m=void 0;const i=y(32670,65),o=lJ(n.parameters,S,e),a=me(n),s=32768&p?t.getLocalName(n):n.name;return v(i,229376,0),m=r,t.updateFunctionDeclaration(n,oJ(n.modifiers,S,__),n.asteriskToken,s,void 0,o,void 0,a)}(n);case 219:return function(n){16384&n.transformFlags&&!(16384&p)&&(p|=131072);const r=m;m=void 0;const i=y(15232,66),o=t.createFunctionExpression(void 0,void 0,void 0,void 0,lJ(n.parameters,S,e),void 0,me(n));return vI(o,n),cw(o,n),dw(o,16),v(i,0,0),m=r,o}(n);case 218:return function(n){const r=524288&ip(n)?y(32662,69):y(32670,65),i=m;m=void 0;const o=lJ(n.parameters,S,e),a=me(n),s=32768&p?t.getLocalName(n):n.name;return v(r,229376,0),m=i,t.updateFunctionExpression(n,void 0,n.asteriskToken,s,void 0,o,void 0,a)}(n);case 260:return ve(n);case 80:return E(n);case 261:return function(n){if(7&n.flags||524288&n.transformFlags){7&n.flags&&ct();const e=oJ(n.declarations,1&n.flags?ye:ve,eE),r=t.createVariableDeclarationList(e);return cw(r,n),vI(r,n),kw(r,n),524288&n.transformFlags&&(O_(n.declarations[0].name)||O_(Ee(n.declarations).name))&&hw(r,function(e){let t=-1,n=-1;for(const r of e)t=-1===t?r.pos:-1===r.pos?t:Math.min(t,r.pos),n=Math.max(n,r.end);return Qb(t,n)}(e)),r}return fJ(n,S,e)}(n);case 255:return function(t){if(void 0!==m){const n=m.allowedNonLabeledJumps;m.allowedNonLabeledJumps|=2;const r=fJ(t,S,e);return m.allowedNonLabeledJumps=n,r}return fJ(t,S,e)}(n);case 269:return function(t){const n=y(7104,0),r=fJ(t,S,e);return v(n,0,0),r}(n);case 241:return function(t,n){if(n)return fJ(t,S,e);const r=256&p?y(7104,512):y(6976,128),i=fJ(t,S,e);return v(r,0,0),i}(n,!1);case 252:case 251:return function(n){if(m){const e=252===n.kind?2:4;if(!(n.label&&m.labels&&m.labels.get(wc(n.label))||!n.label&&m.allowedNonLabeledJumps&e)){let e;const r=n.label;r?252===n.kind?(e=`break-${r.escapedText}`,Ge(m,!0,wc(r),e)):(e=`continue-${r.escapedText}`,Ge(m,!1,wc(r),e)):252===n.kind?(m.nonLocalJumps|=2,e="break"):(m.nonLocalJumps|=4,e="continue");let i=t.createStringLiteral(e);if(m.loopOutParameters.length){const e=m.loopOutParameters;let n;for(let r=0;rLP(e)&&!!Ne(e.declarationList.declarations).initializer,i=m;m=void 0;const o=oJ(n.statements,C,wu);m=i;const a=O(o,r),s=O(o,e=>!r(e)),c=pt(Ne(a),LP).declarationList.declarations[0],l=hA(c.initializer);let _=dt(l,xb);!_&&yP(l)&&28===l.operatorToken.kind&&(_=dt(l.left,xb));const u=pt(_?hA(_.right):l,oP),d=pt(hA(u.expression),_P),p=d.body.statements;let f=0,g=-1;const h=[];if(_){const e=dt(p[f],RP);e&&(h.push(e),f++),h.push(p[f]),f++,h.push(t.createExpressionStatement(t.createAssignment(_.left,pt(c.name,QN))))}for(;!HP(Te(p,g));)g--;ge(h,p,f,g),g<-1&&ge(h,p,g+1);const y=dt(Te(p,g),HP);for(const e of s)HP(e)&&(null==y?void 0:y.expression)&&!QN(y.expression)?h.push(y):h.push(e);return ge(h,a,1),t.restoreOuterExpressions(e.expression,t.restoreOuterExpressions(c.initializer,t.restoreOuterExpressions(_&&_.right,t.updateCallExpression(u,t.restoreOuterExpressions(u.expression,t.updateFunctionExpression(d,void 0,void 0,void 0,void 0,d.parameters,void 0,t.updateBlock(d.body,h))),void 0,u.arguments))))}(n);const r=hA(n.expression);if(108===r.kind||gm(r)||ee(n.arguments,SP))return function(n,r){if(32768&n.transformFlags||108===n.expression.kind||gm(hA(n.expression))){const{target:e,thisArg:i}=t.createCallBinding(n.expression,a);let o;if(108===n.expression.kind&&dw(i,8),o=32768&n.transformFlags?t.createFunctionApplyCall(Tn.checkDefined(iJ(e,w,nu)),108===n.expression.kind?i:Tn.checkDefined(iJ(i,S,nu)),tt(n.arguments,!0,!1,!1)):vI(t.createFunctionCallCall(Tn.checkDefined(iJ(e,w,nu)),108===n.expression.kind?i:Tn.checkDefined(iJ(i,S,nu)),oJ(n.arguments,S,nu)),n),108===n.expression.kind){const e=t.createLogicalOr(o,X());o=r?t.createAssignment(P(),e):e}return cw(o,n)}mf(n)&&(p|=131072);return fJ(n,S,e)}(n,!0);return t.updateCallExpression(n,Tn.checkDefined(iJ(n.expression,w,nu)),void 0,oJ(n.arguments,S,nu))}(n);case 214:return function(n){if(ee(n.arguments,SP)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return t.createNewExpression(t.createFunctionApplyCall(Tn.checkDefined(iJ(e,S,nu)),r,tt(t.createNodeArray([t.createVoidZero(),...n.arguments]),!0,!1,!1)),void 0,[])}return fJ(n,S,e)}(n);case 217:return function(t,n){return fJ(t,n?k:S,e)}(n,r);case 226:return he(n,r);case 355:return function(n,r){if(r)return fJ(n,k,e);let i;for(let e=0;e0&&e.push(t.createStringLiteral(r.literal.text)),n=t.createCallExpression(t.createPropertyAccessExpression(n,"concat"),void 0,e)}return vI(n,e)}(n);case 230:return function(e){return iJ(e.expression,S,nu)}(n);case 108:return st(n,!1);case 110:return function(e){p|=65536,2&p&&!(16384&p)&&(p|=131072);if(m)return 2&p?(m.containsLexicalThis=!0,e):m.thisName||(m.thisName=t.createUniqueName("this"));return e}(n);case 236:return function(e){if(105===e.keywordToken&&"target"===e.name.escapedText)return p|=32768,t.createUniqueName("_newTarget",48);return e}(n);case 174:return function(e){Tn.assert(!pD(e.name));const n=fe(e,Zb(e,-1),void 0,void 0);return dw(n,1024|ip(n)),vI(t.createPropertyAssignment(e.name,n),e)}(n);case 177:case 178:return function(n){Tn.assert(!pD(n.name));const r=m;m=void 0;const i=y(32670,65);let o;const a=lJ(n.parameters,S,e),s=me(n);o=177===n.kind?t.updateGetAccessorDeclaration(n,n.modifiers,n.name,a,n.type,s):t.updateSetAccessorDeclaration(n,n.modifiers,n.name,a,s);return v(i,229376,0),m=r,o}(n);case 243:return function(n){const r=y(0,Wv(n,32)?32:0);let i;if(!m||7&n.declarationList.flags||function(e){return 1===e.declarationList.declarations.length&&!!e.declarationList.declarations[0].initializer&&!!(1&op(e.declarationList.declarations[0].initializer))}(n))i=fJ(n,S,e);else{let r;for(const i of n.declarationList.declarations)if(Ve(m,i),i.initializer){let n;O_(i.name)?n=xz(i,S,e,0):(n=t.createBinaryExpression(i.name,64,Tn.checkDefined(iJ(i.initializer,S,nu))),vI(n,i)),r=pe(r,n)}i=r?vI(t.createExpressionStatement(t.inlineExpressions(r)),n):void 0}return v(r,0,0),i}(n);case 253:return function(n){if(m)return m.nonLocalJumps|=8,b(n)&&(n=D(n)),t.createReturnStatement(t.createObjectLiteralExpression([t.createPropertyAssignment(t.createIdentifier("value"),n.expression?Tn.checkDefined(iJ(n.expression,S,nu)):t.createVoidZero())]));if(b(n))return D(n);return fJ(n,S,e)}(n);default:return fJ(n,S,e)}}function D(e){return cw(t.createReturnStatement(P()),e)}function P(){return t.createUniqueName("_this",48)}function E(e){return m&&c.isArgumentsLocalBinding(e)?m.argumentsName||(m.argumentsName=t.createUniqueName("arguments")):256&e.flags?cw(vI(t.createIdentifier(Cc(e.escapedText)),e),e):e}function F(a){a.name&&ct();const s=Ph(a),c=t.createFunctionExpression(void 0,void 0,void 0,void 0,s?[t.createParameterDeclaration(void 0,void 0,at())]:[],void 0,function(a,s){const c=[],l=t.getInternalName(a),_=Uh(l)?t.getGeneratedNameForNode(l):l;r(),function(e,r,i){i&&e.push(vI(t.createExpressionStatement(n().createExtendsHelper(t.getInternalName(r))),i))}(c,a,s),function(n,r,a,s){const c=m;m=void 0;const l=y(32662,73),_=vv(r),u=function(e,t){if(!e||!t)return!1;if(ee(e.parameters))return!1;const n=Ce(e.body.statements);if(!n||!my(n)||244!==n.kind)return!1;const r=n.expression;if(!my(r)||213!==r.kind)return!1;const i=r.expression;if(!my(i)||108!==i.kind)return!1;const o=Fe(r.arguments);if(!o||!my(o)||230!==o.kind)return!1;const a=o.expression;return QN(a)&&"arguments"===a.escapedText}(_,void 0!==s),d=t.createFunctionDeclaration(void 0,void 0,a,void 0,function(t,n){return lJ(t&&!n?t.parameters:void 0,S,e)||[]}(_,u),void 0,function(e,n,r,a){const s=!!r&&106!==hA(r.expression).kind;if(!e)return function(e,n){const r=[];i(),t.mergeLexicalEnvironment(r,o()),n&&r.push(t.createReturnStatement(t.createLogicalOr(t.createLogicalAnd(t.createStrictInequality(at(),t.createNull()),t.createFunctionApplyCall(at(),X(),t.createIdentifier("arguments"))),X())));const a=t.createNodeArray(r);vI(a,e.members);const s=t.createBlock(a,!0);return vI(s,e),dw(s,3072),s}(n,s);const c=[],l=[];i();const _=t.copyStandardPrologue(e.body.statements,c,0);(a||I(e.body))&&(p|=8192);ge(l,oJ(e.body.statements,S,wu,_));const u=s||8192&p;Z(c,e),ie(c,e,a),se(c,e),u?ae(c,e,X()):oe(c,e);t.mergeLexicalEnvironment(c,o()),u&&!G(e.body)&&l.push(t.createReturnStatement(P()));const d=t.createBlock(vI(t.createNodeArray([...c,...l]),e.body.statements),!0);return vI(d,e.body),function(e,n,r){const i=e;e=function(e){for(let n=0;n0;n--){const i=e.statements[n];if(HP(i)&&i.expression&&j(i.expression)){const i=e.statements[n-1];let o;if(RP(i)&&W(hA(i.expression)))o=i.expression;else if(r&&R(i)){const e=i.declarationList.declarations[0];$(hA(e.initializer))&&(o=t.createAssignment(P(),e.initializer))}if(!o)break;const a=t.createReturnStatement(o);cw(a,i),vI(a,i);const s=t.createNodeArray([...e.statements.slice(0,n-1),a,...e.statements.slice(n+1)]);return vI(s,e.statements),t.updateBlock(e,s)}}return e}(e,n),e!==i&&(e=function(e,n){if(16384&n.transformFlags||65536&p||131072&p)return e;for(const t of n.statements)if(134217728&t.transformFlags&&!tz(t))return e;return t.updateBlock(e,oJ(e.statements,H,wu))}(e,n));r&&(e=function(e){return t.updateBlock(e,oJ(e.statements,K,wu))}(e));return e}(d,e.body,a)}(_,r,s,u));vI(d,_||r),s&&dw(d,16);n.push(d),v(l,229376,0),m=c}(c,a,_,s),function(e,t){for(const n of t.members)switch(n.kind){case 240:e.push(ce(n));break;case 174:e.push(le(lt(t,n),n,t));break;case 177:case 178:const r=Dv(t.members,n);n===r.firstAccessor&&e.push(ue(lt(t,n),r,t));break;case 176:case 175:break;default:Tn.failBadSyntaxKind(n,u&&u.fileName)}}(c,a);const f=rx(ds(d,a.members.end),20),g=t.createPartiallyEmittedExpression(_);RT(g,f.end),dw(g,3072);const h=t.createReturnStatement(g);MT(h,f.pos),dw(h,3840),c.push(h),Ud(c,o());const b=t.createBlock(vI(t.createNodeArray(c),a.members),!0);return dw(b,3072),b}(a,s));dw(c,131072&ip(a)|1048576);const l=t.createPartiallyEmittedExpression(c);RT(l,a.end),dw(l,3072);const _=t.createPartiallyEmittedExpression(l);RT(_,ds(d,a.pos)),dw(_,3072);const f=t.createParenthesizedExpression(t.createCallExpression(_,void 0,s?[Tn.checkDefined(iJ(s.expression,S,nu))]:[]));return ww(f,3,"* @class "),f}function A(e){return LP(e)&&T(e.declarationList.declarations,e=>QN(e.name)&&!e.initializer)}function I(e){if(mf(e))return!0;if(!(134217728&e.transformFlags))return!1;switch(e.kind){case 219:case 218:case 262:case 176:case 175:return!1;case 177:case 178:case 174:case 172:{const t=e;return!!pD(t.name)&&!!KI(t.name,I)}}return!!KI(e,I)}function j(e){return n_(e)&&"_this"===wc(e)}function L(e){return n_(e)&&"_super"===wc(e)}function R(e){return LP(e)&&1===e.declarationList.declarations.length&&function(e){return eE(e)&&j(e.name)&&!!e.initializer}(e.declarationList.declarations[0])}function B(e){return xb(e,!0)&&j(e.left)}function z(e){return oP(e)&&rP(e.expression)&&L(e.expression.expression)&&QN(e.expression.name)&&("call"===wc(e.expression.name)||"apply"===wc(e.expression.name))&&e.arguments.length>=1&&110===e.arguments[0].kind}function q(e){return yP(e)&&57===e.operatorToken.kind&&110===e.right.kind&&z(e.left)}function U(e){return yP(e)&&56===e.operatorToken.kind&&yP(e.left)&&38===e.left.operatorToken.kind&&L(e.left.left)&&106===e.left.right.kind&&z(e.right)&&"apply"===wc(e.right.expression.name)}function V(e){return yP(e)&&57===e.operatorToken.kind&&110===e.right.kind&&U(e.left)}function W(e){return B(e)&&q(e.right)}function $(e){return z(e)||q(e)||W(e)||U(e)||V(e)||function(e){return B(e)&&V(e.right)}(e)}function H(e){if(R(e)){if(110===e.declarationList.declarations[0].initializer.kind)return}else if(B(e))return t.createPartiallyEmittedExpression(e.right,e);switch(e.kind){case 219:case 218:case 262:case 176:case 175:return e;case 177:case 178:case 174:case 172:{const n=e;return pD(n.name)?t.replacePropertyName(n,fJ(n.name,H,void 0)):e}}return fJ(e,H,void 0)}function K(e){if(z(e)&&2===e.arguments.length&&QN(e.arguments[1])&&"arguments"===wc(e.arguments[1]))return t.createLogicalAnd(t.createStrictInequality(at(),t.createNull()),e);switch(e.kind){case 219:case 218:case 262:case 176:case 175:return e;case 177:case 178:case 174:case 172:{const n=e;return pD(n.name)?t.replacePropertyName(n,fJ(n.name,K,void 0)):e}}return fJ(e,K,void 0)}function G(e){if(253===e.kind)return!0;if(245===e.kind){const t=e;if(t.elseStatement)return G(t.thenStatement)&&G(t.elseStatement)}else if(241===e.kind){const t=Pe(e.statements);if(t&&G(t))return!0}return!1}function X(){return dw(t.createThis(),8)}function Q(e){return void 0!==e.initializer||O_(e.name)}function Z(e,t){if(!ee(t.parameters,Q))return!1;let n=!1;for(const r of t.parameters){const{name:t,initializer:i,dotDotDotToken:o}=r;o||(O_(t)?n=te(e,r,t,i)||n:i&&(re(e,r,t,i),n=!0))}return n}function te(n,r,i,o){return i.elements.length>0?($d(n,dw(t.createVariableStatement(void 0,t.createVariableDeclarationList(Tz(r,S,e,0,t.getGeneratedNameForNode(r)))),2097152)),!0):!!o&&($d(n,dw(t.createExpressionStatement(t.createAssignment(t.getGeneratedNameForNode(r),Tn.checkDefined(iJ(o,S,nu)))),2097152)),!0)}function re(e,n,r,i){i=Tn.checkDefined(iJ(i,S,nu));const o=t.createIfStatement(t.createTypeCheck(t.cloneNode(r),"undefined"),dw(vI(t.createBlock([t.createExpressionStatement(dw(vI(t.createAssignment(dw(qT(vI(t.cloneNode(r),r),r.parent),96),dw(i,3168|ip(i))),n),3072))]),n),3905));bA(o),vI(o,n),dw(o,2101056),$d(e,o)}function ie(n,r,i){const o=[],a=Pe(r.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(a,i))return!1;const s=80===a.name.kind?qT(vI(t.cloneNode(a.name),a.name),a.name.parent):t.createTempVariable(void 0);dw(s,96);const c=80===a.name.kind?t.cloneNode(a.name):s,l=r.parameters.length-1,_=t.createLoopVariable();o.push(dw(vI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(s,void 0,void 0,t.createArrayLiteralExpression([]))])),a),2097152));const u=t.createForStatement(vI(t.createVariableDeclarationList([t.createVariableDeclaration(_,void 0,void 0,t.createNumericLiteral(l))]),a),vI(t.createLessThan(_,t.createPropertyAccessExpression(t.createIdentifier("arguments"),"length")),a),vI(t.createPostfixIncrement(_),a),t.createBlock([bA(vI(t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(c,0===l?_:t.createSubtract(_,t.createNumericLiteral(l))),t.createElementAccessExpression(t.createIdentifier("arguments"),_))),a))]));return dw(u,2097152),bA(u),o.push(u),80!==a.name.kind&&o.push(dw(vI(t.createVariableStatement(void 0,t.createVariableDeclarationList(Tz(a,S,e,0,c))),a),2097152)),Vd(n,o),!0}function oe(e,n){return!!(131072&p&&219!==n.kind)&&(ae(e,n,t.createThis()),!0)}function ae(n,r,i){1&g||(g|=1,e.enableSubstitution(110),e.enableEmitNotification(176),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(219),e.enableEmitNotification(218),e.enableEmitNotification(262));const o=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(P(),void 0,void 0,i)]));dw(o,2100224),hw(o,r),$d(n,o)}function se(e,n){if(32768&p){let r;switch(n.kind){case 219:return e;case 174:case 177:case 178:r=t.createVoidZero();break;case 176:r=t.createPropertyAccessExpression(dw(t.createThis(),8),"constructor");break;case 262:case 218:r=t.createConditionalExpression(t.createLogicalAnd(dw(t.createThis(),8),t.createBinaryExpression(dw(t.createThis(),8),104,t.getLocalName(n))),void 0,t.createPropertyAccessExpression(dw(t.createThis(),8),"constructor"),void 0,t.createVoidZero());break;default:return Tn.failBadSyntaxKind(n)}const i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_newTarget",48),void 0,void 0,r)]));dw(i,2100224),$d(e,i)}return e}function ce(e){return vI(t.createEmptyStatement(),e)}function le(n,r,i){const o=Sw(r),a=gw(r),s=fe(r,r,void 0,i),c=iJ(r.name,S,d_);let l;if(Tn.assert(c),!YN(c)&&GS(e.getCompilerOptions())){const e=pD(c)?c.expression:QN(c)?t.createStringLiteral(Cc(c.escapedText)):c;l=t.createObjectDefinePropertyCall(n,e,t.createPropertyDescriptor({value:s,enumerable:!1,writable:!0,configurable:!0}))}else{const e=KF(t,n,c,r.name);l=t.createAssignment(e,s)}dw(s,3072),hw(s,a);const _=vI(t.createExpressionStatement(l),r);return cw(_,r),kw(_,o),dw(_,96),_}function ue(e,n,r){const i=t.createExpressionStatement(de(e,n,r,!1));return dw(i,3072),hw(i,gw(n.firstAccessor)),i}function de(e,{firstAccessor:n,getAccessor:r,setAccessor:i},o,a){const s=qT(vI(t.cloneNode(e),e),e.parent);dw(s,3136),hw(s,n.name);const c=iJ(n.name,S,d_);if(Tn.assert(c),YN(c))return Tn.failBadSyntaxKind(c,"Encountered unhandled private identifier while transforming ES2015.");const l=rA(t,c);dw(l,3104),hw(l,n.name);const _=[];if(r){const e=fe(r,void 0,void 0,o);hw(e,gw(r)),dw(e,1024);const n=t.createPropertyAssignment("get",e);kw(n,Sw(r)),_.push(n)}if(i){const e=fe(i,void 0,void 0,o);hw(e,gw(i)),dw(e,1024);const n=t.createPropertyAssignment("set",e);kw(n,Sw(i)),_.push(n)}_.push(t.createPropertyAssignment("enumerable",r||i?t.createFalse():t.createTrue()),t.createPropertyAssignment("configurable",t.createTrue()));const u=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[s,l,t.createObjectLiteralExpression(_,!0)]);return a&&bA(u),u}function fe(n,r,i,o){const a=m;m=void 0;const s=o&&S_(o)&&!$v(n)?y(32670,73):y(32670,65),c=lJ(n.parameters,S,e),l=me(n);return 32768&p&&!i&&(262===n.kind||218===n.kind)&&(i=t.getGeneratedNameForNode(n)),v(s,229376,0),m=a,cw(vI(t.createFunctionExpression(void 0,n.asteriskToken,i,void 0,c,void 0,l),r),n)}function me(e){let n,r,a=!1,s=!1;const c=[],l=[],_=e.body;let d;if(i(),jP(_)&&(d=t.copyStandardPrologue(_.statements,c,0,!1),d=t.copyCustomPrologue(_.statements,l,d,S,xf),d=t.copyCustomPrologue(_.statements,l,d,S,kf)),a=Z(l,e)||a,a=ie(l,e,!1)||a,jP(_))d=t.copyCustomPrologue(_.statements,l,d,S),n=_.statements,ge(l,oJ(_.statements,S,wu,d)),!a&&_.multiLine&&(a=!0);else{Tn.assert(219===e.kind),n=Yb(_,-1);const i=e.equalsGreaterThanToken;my(i)||my(_)||(cx(i,_,u)?s=!0:a=!0);const o=iJ(_,S,nu),c=t.createReturnStatement(o);vI(c,_),Ew(c,_),dw(c,2880),l.push(c),r=_}if(t.mergeLexicalEnvironment(c,o()),se(c,e),oe(c,e),ee(c)&&(a=!0),l.unshift(...c),jP(_)&&_e(l,_.statements))return _;const p=t.createBlock(vI(t.createNodeArray(l),n),a);return vI(p,e.body),!a&&s&&dw(p,1),r&&vw(p,20,r),cw(p,e.body),p}function he(n,r){return kb(n)?xz(n,S,e,0,!r):28===n.operatorToken.kind?t.updateBinaryExpression(n,Tn.checkDefined(iJ(n.left,k,nu)),n.operatorToken,Tn.checkDefined(iJ(n.right,r?k:S,nu))):fJ(n,S,e)}function ye(n){return O_(n.name)?ve(n):!n.initializer&&function(e){const t=c.hasNodeCheckFlag(e,16384),n=c.hasNodeCheckFlag(e,32768);return!(64&p||t&&n&&512&p)&&!(4096&p)&&(!c.isDeclarationWithCollidingName(e)||n&&!t&&!(6144&p))}(n)?t.updateVariableDeclaration(n,n.name,void 0,void 0,t.createVoidZero()):fJ(n,S,e)}function ve(t){const n=y(32,0);let r;return r=O_(t.name)?Tz(t,S,e,0,void 0,!!(32&n)):fJ(t,S,e),v(n,0,0),r}function be(e){m.labels.set(wc(e.label),!0)}function xe(e){m.labels.set(wc(e.label),!1)}function Se(n,i,a,s,c){const l=y(n,i),_=function(n,i,a,s){if(!qe(n)){let r;m&&(r=m.allowedNonLabeledJumps,m.allowedNonLabeledJumps=6);const o=s?s(n,i,void 0,a):t.restoreEnclosingLabel(qP(n)?function(e){return t.updateForStatement(e,iJ(e.initializer,k,pu),iJ(e.condition,S,nu),iJ(e.incrementor,k,nu),Tn.checkDefined(iJ(e.statement,S,wu,t.liftToBlock)))}(n):fJ(n,S,e),i,m&&xe);return m&&(m.allowedNonLabeledJumps=r),o}const c=function(e){let t;switch(e.kind){case 248:case 249:case 250:const n=e.initializer;n&&261===n.kind&&(t=n)}const n=[],r=[];if(t&&7&gc(t)){const i=Be(e)||Je(e)||ze(e);for(const o of t.declarations)Qe(e,o,n,r,i)}const i={loopParameters:n,loopOutParameters:r};m&&(m.argumentsName&&(i.argumentsName=m.argumentsName),m.thisName&&(i.thisName=m.thisName),m.hoistedLocalVariables&&(i.hoistedLocalVariables=m.hoistedLocalVariables));return i}(n),l=[],_=m;m=c;const u=Be(n)?function(e,n){const r=t.createUniqueName("_loop_init"),i=!!(1048576&e.initializer.transformFlags);let o=0;n.containsLexicalThis&&(o|=16);i&&4&p&&(o|=524288);const a=[];a.push(t.createVariableStatement(void 0,e.initializer)),Ke(n.loopOutParameters,2,1,a);const s=t.createVariableStatement(void 0,dw(t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,dw(t.createFunctionExpression(void 0,i?t.createToken(42):void 0,void 0,void 0,void 0,void 0,Tn.checkDefined(iJ(t.createBlock(a,!0),S,jP))),o))]),4194304)),c=t.createVariableDeclarationList(M(n.loopOutParameters,$e));return{functionName:r,containsYield:i,functionDeclaration:s,part:c}}(n,c):void 0,d=Ue(n)?function(e,n,i){const a=t.createUniqueName("_loop");r();const s=iJ(e.statement,S,wu,t.liftToBlock),c=o(),l=[];(Je(e)||ze(e))&&(n.conditionVariable=t.createUniqueName("inc"),e.incrementor?l.push(t.createIfStatement(n.conditionVariable,t.createExpressionStatement(Tn.checkDefined(iJ(e.incrementor,S,nu))),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))):l.push(t.createIfStatement(t.createLogicalNot(n.conditionVariable),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))),Je(e)&&l.push(t.createIfStatement(t.createPrefixUnaryExpression(54,Tn.checkDefined(iJ(e.condition,S,nu))),Tn.checkDefined(iJ(t.createBreakStatement(),S,wu)))));Tn.assert(s),jP(s)?ge(l,s.statements):l.push(s);Ke(n.loopOutParameters,1,1,l),Ud(l,c);const _=t.createBlock(l,!0);jP(s)&&cw(_,s);const u=!!(1048576&e.statement.transformFlags);let d=1048576;n.containsLexicalThis&&(d|=16);u&&4&p&&(d|=524288);const f=t.createVariableStatement(void 0,dw(t.createVariableDeclarationList([t.createVariableDeclaration(a,void 0,void 0,dw(t.createFunctionExpression(void 0,u?t.createToken(42):void 0,void 0,void 0,n.loopParameters,void 0,_),d))]),4194304)),m=function(e,n,r,i){const o=[],a=!(-5&n.nonLocalJumps||n.labeledNonLocalBreaks||n.labeledNonLocalContinues),s=t.createCallExpression(e,void 0,M(n.loopParameters,e=>e.name)),c=i?t.createYieldExpression(t.createToken(42),dw(s,8388608)):s;if(a)o.push(t.createExpressionStatement(c)),Ke(n.loopOutParameters,1,0,o);else{const e=t.createUniqueName("state"),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,c)]));if(o.push(i),Ke(n.loopOutParameters,1,0,o),8&n.nonLocalJumps){let n;r?(r.nonLocalJumps|=8,n=t.createReturnStatement(e)):n=t.createReturnStatement(t.createPropertyAccessExpression(e,"value")),o.push(t.createIfStatement(t.createTypeCheck(e,"object"),n))}if(2&n.nonLocalJumps&&o.push(t.createIfStatement(t.createStrictEquality(e,t.createStringLiteral("break")),t.createBreakStatement())),n.labeledNonLocalBreaks||n.labeledNonLocalContinues){const i=[];Xe(n.labeledNonLocalBreaks,!0,e,r,i),Xe(n.labeledNonLocalContinues,!1,e,r,i),o.push(t.createSwitchStatement(e,t.createCaseBlock(i)))}}return o}(a,n,i,u);return{functionName:a,containsYield:u,functionDeclaration:f,part:m}}(n,c,_):void 0;m=_,u&&l.push(u.functionDeclaration);d&&l.push(d.functionDeclaration);(function(e,n,r){let i;n.argumentsName&&(r?r.argumentsName=n.argumentsName:(i||(i=[])).push(t.createVariableDeclaration(n.argumentsName,void 0,void 0,t.createIdentifier("arguments"))));n.thisName&&(r?r.thisName=n.thisName:(i||(i=[])).push(t.createVariableDeclaration(n.thisName,void 0,void 0,t.createIdentifier("this"))));if(n.hoistedLocalVariables)if(r)r.hoistedLocalVariables=n.hoistedLocalVariables;else{i||(i=[]);for(const e of n.hoistedLocalVariables)i.push(t.createVariableDeclaration(e))}if(n.loopOutParameters.length){i||(i=[]);for(const e of n.loopOutParameters)i.push(t.createVariableDeclaration(e.outParamName))}n.conditionVariable&&(i||(i=[]),i.push(t.createVariableDeclaration(n.conditionVariable,void 0,void 0,t.createFalse())));i&&e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(i)))})(l,c,_),u&&l.push(function(e,n){const r=t.createCallExpression(e,void 0,[]),i=n?t.createYieldExpression(t.createToken(42),dw(r,8388608)):r;return t.createExpressionStatement(i)}(u.functionName,u.containsYield));let f;if(d)if(s)f=s(n,i,d.part,a);else{const e=We(n,u,t.createBlock(d.part,!0));f=t.restoreEnclosingLabel(e,i,m&&xe)}else{const e=We(n,u,Tn.checkDefined(iJ(n.statement,S,wu,t.liftToBlock)));f=t.restoreEnclosingLabel(e,i,m&&xe)}return l.push(f),l}(a,s,l,c);return v(l,0,0),_}function ke(e,t){return Se(0,1280,e,t)}function we(e,t){return Se(5056,3328,e,t)}function De(e,t){return Se(3008,5376,e,t)}function Ae(e,t){return Se(3008,5376,e,t,s.downlevelIteration?Me:Le)}function Oe(n,r,i){const o=[],a=n.initializer;if(tE(a)){7&n.initializer.flags&&ct();const i=Ce(a.declarations);if(i&&O_(i.name)){const a=Tz(i,S,e,0,r),s=vI(t.createVariableDeclarationList(a),n.initializer);cw(s,n.initializer),hw(s,Qb(a[0].pos,Ee(a).end)),o.push(t.createVariableStatement(void 0,s))}else o.push(vI(t.createVariableStatement(void 0,cw(vI(t.createVariableDeclarationList([t.createVariableDeclaration(i?i.name:t.createTempVariable(void 0),void 0,void 0,r)]),Zb(a,-1)),a)),Yb(a,-1)))}else{const e=t.createAssignment(a,r);kb(e)?o.push(t.createExpressionStatement(he(e,!0))):(RT(e,a.end),o.push(vI(t.createExpressionStatement(Tn.checkDefined(iJ(e,S,nu))),Yb(a,-1))))}if(i)return je(ge(o,i));{const e=iJ(n.statement,S,wu,t.liftToBlock);return Tn.assert(e),jP(e)?t.updateBlock(e,vI(t.createNodeArray(ne(o,e.statements)),e.statements)):(o.push(e),je(o))}}function je(e){return dw(t.createBlock(t.createNodeArray(e),!0),864)}function Le(e,n,r){const i=iJ(e.expression,S,nu);Tn.assert(i);const o=t.createLoopVariable(),a=QN(i)?t.getGeneratedNameForNode(i):t.createTempVariable(void 0);dw(i,96|ip(i));const s=vI(t.createForStatement(dw(vI(t.createVariableDeclarationList([vI(t.createVariableDeclaration(o,void 0,void 0,t.createNumericLiteral(0)),Zb(e.expression,-1)),vI(t.createVariableDeclaration(a,void 0,void 0,i),e.expression)]),e.expression),4194304),vI(t.createLessThan(o,t.createPropertyAccessExpression(a,"length")),e.expression),vI(t.createPostfixIncrement(o),e.expression),Oe(e,t.createElementAccessExpression(a,o),r)),e);return dw(s,512),vI(s,e),t.restoreEnclosingLabel(s,n,m&&xe)}function Me(e,r,i,o){const s=iJ(e.expression,S,nu);Tn.assert(s);const c=QN(s)?t.getGeneratedNameForNode(s):t.createTempVariable(void 0),l=QN(s)?t.getGeneratedNameForNode(c):t.createTempVariable(void 0),_=t.createUniqueName("e"),u=t.getGeneratedNameForNode(_),d=t.createTempVariable(void 0),p=vI(n().createValuesHelper(s),e.expression),f=t.createCallExpression(t.createPropertyAccessExpression(c,"next"),void 0,[]);a(_),a(d);const g=1024&o?t.inlineExpressions([t.createAssignment(_,t.createVoidZero()),p]):p,h=dw(vI(t.createForStatement(dw(vI(t.createVariableDeclarationList([vI(t.createVariableDeclaration(c,void 0,void 0,g),e.expression),t.createVariableDeclaration(l,void 0,void 0,f)]),e.expression),4194304),t.createLogicalNot(t.createPropertyAccessExpression(l,"done")),t.createAssignment(l,f),Oe(e,t.createPropertyAccessExpression(l,"value"),i)),e),512);return t.createTryStatement(t.createBlock([t.restoreEnclosingLabel(h,r,m&&xe)]),t.createCatchClause(t.createVariableDeclaration(u),dw(t.createBlock([t.createExpressionStatement(t.createAssignment(_,t.createObjectLiteralExpression([t.createPropertyAssignment("error",u)])))]),1)),t.createBlock([t.createTryStatement(t.createBlock([dw(t.createIfStatement(t.createLogicalAnd(t.createLogicalAnd(l,t.createLogicalNot(t.createPropertyAccessExpression(l,"done"))),t.createAssignment(d,t.createPropertyAccessExpression(c,"return"))),t.createExpressionStatement(t.createFunctionCallCall(d,c,[]))),1)]),void 0,dw(t.createBlock([dw(t.createIfStatement(_,t.createThrowStatement(t.createPropertyAccessExpression(_,"error"))),1)]),1))]))}function Re(e){return c.hasNodeCheckFlag(e,8192)}function Be(e){return qP(e)&&!!e.initializer&&Re(e.initializer)}function Je(e){return qP(e)&&!!e.condition&&Re(e.condition)}function ze(e){return qP(e)&&!!e.incrementor&&Re(e.incrementor)}function qe(e){return Ue(e)||Be(e)}function Ue(e){return c.hasNodeCheckFlag(e,4096)}function Ve(e,t){e.hoistedLocalVariables||(e.hoistedLocalVariables=[]),function t(n){if(80===n.kind)e.hoistedLocalVariables.push(n);else for(const e of n.elements)TP(e)||t(e.name)}(t.name)}function We(e,n,r){switch(e.kind){case 248:return function(e,n,r){const i=e.condition&&Re(e.condition),o=i||e.incrementor&&Re(e.incrementor);return t.updateForStatement(e,iJ(n?n.part:e.initializer,k,pu),iJ(i?void 0:e.condition,S,nu),iJ(o?void 0:e.incrementor,k,nu),r)}(e,n,r);case 249:return function(e,n){return t.updateForInStatement(e,Tn.checkDefined(iJ(e.initializer,S,pu)),Tn.checkDefined(iJ(e.expression,S,nu)),n)}(e,r);case 250:return function(e,n){return t.updateForOfStatement(e,void 0,Tn.checkDefined(iJ(e.initializer,S,pu)),Tn.checkDefined(iJ(e.expression,S,nu)),n)}(e,r);case 246:return function(e,n){return t.updateDoStatement(e,n,Tn.checkDefined(iJ(e.expression,S,nu)))}(e,r);case 247:return function(e,n){return t.updateWhileStatement(e,Tn.checkDefined(iJ(e.expression,S,nu)),n)}(e,r);default:return Tn.failBadSyntaxKind(e,"IterationStatement expected")}}function $e(e){return t.createVariableDeclaration(e.originalName,void 0,void 0,e.outParamName)}function He(e,n){const r=0===n?e.outParamName:e.originalName,i=0===n?e.originalName:e.outParamName;return t.createBinaryExpression(i,64,r)}function Ke(e,n,r,i){for(const o of e)o.flags&n&&i.push(t.createExpressionStatement(He(o,r)))}function Ge(e,t,n,r){t?(e.labeledNonLocalBreaks||(e.labeledNonLocalBreaks=new Map),e.labeledNonLocalBreaks.set(n,r)):(e.labeledNonLocalContinues||(e.labeledNonLocalContinues=new Map),e.labeledNonLocalContinues.set(n,r))}function Xe(e,n,r,i,o){e&&e.forEach((e,a)=>{const s=[];if(!i||i.labels&&i.labels.get(a)){const e=t.createIdentifier(a);s.push(n?t.createBreakStatement(e):t.createContinueStatement(e))}else Ge(i,n,a,e),s.push(t.createReturnStatement(r));o.push(t.createCaseClause(t.createStringLiteral(e),s))})}function Qe(e,n,r,i,o){const a=n.name;if(O_(a))for(const t of a.elements)TP(t)||Qe(e,t,r,i,o);else{r.push(t.createParameterDeclaration(void 0,void 0,a));const s=c.hasNodeCheckFlag(n,65536);if(s||o){const r=t.createUniqueName("out_"+wc(a));let o=0;s&&(o|=1),qP(e)&&(e.initializer&&c.isBindingCapturedByNode(e.initializer,n)&&(o|=2),(e.condition&&c.isBindingCapturedByNode(e.condition,n)||e.incrementor&&c.isBindingCapturedByNode(e.incrementor,n))&&(o|=1)),i.push({flags:o,originalName:a,outParamName:r})}}}function Ye(e,n,r){const i=t.createAssignment(KF(t,n,Tn.checkDefined(iJ(e.name,S,d_))),Tn.checkDefined(iJ(e.initializer,S,nu)));return vI(i,e),r&&bA(i),i}function Ze(e,n,r){const i=t.createAssignment(KF(t,n,Tn.checkDefined(iJ(e.name,S,d_))),t.cloneNode(e.name));return vI(i,e),r&&bA(i),i}function et(e,n,r,i){const o=t.createAssignment(KF(t,n,Tn.checkDefined(iJ(e.name,S,d_))),fe(e,e,void 0,r));return vI(o,e),i&&bA(o),o}function tt(e,r,i,o){const a=e.length,c=J(Y(e,nt,(e,t,n,r)=>t(e,i,o&&r===a)));if(1===c.length){const e=c[0];if(r&&!s.downlevelIteration||$T(e.expression)||FN(e.expression,"___spreadArray"))return e.expression}const l=n(),_=0!==c[0].kind;let u=_?t.createArrayLiteralExpression():c[0].expression;for(let e=_?0:1;e0?t.inlineExpressions(M(i,G)):void 0,iJ(n.condition,R,nu),iJ(n.incrementor,R,nu),dJ(n.statement,R,e))}else n=fJ(n,R,e);f&&ce();return n}(r);case 249:return function(n){f&&ae();const r=n.initializer;if(tE(r)){for(const e of r.declarations)a(e.name);n=t.updateForInStatement(n,r.declarations[0].name,Tn.checkDefined(iJ(n.expression,R,nu)),Tn.checkDefined(iJ(n.statement,R,wu,t.liftToBlock)))}else n=fJ(n,R,e);f&&ce();return n}(r);case 252:return function(t){if(f){const e=me(t.label&&wc(t.label));if(e>0)return ve(e,t)}return fJ(t,R,e)}(r);case 251:return function(t){if(f){const e=ge(t.label&&wc(t.label));if(e>0)return ve(e,t)}return fJ(t,R,e)}(r);case 253:return function(e){return n=iJ(e.expression,R,nu),r=e,vI(t.createReturnStatement(t.createArrayLiteralExpression(n?[ye(2),n]:[ye(2)])),r);var n,r}(r);default:return 1048576&r.transformFlags?function(r){switch(r.kind){case 226:return function(n){const r=yy(n);switch(r){case 0:return function(n){if(X(n.right))return pb(n.operatorToken.kind)?function(e){const t=ee(),n=Z();Se(n,Tn.checkDefined(iJ(e.left,R,nu)),e.left),56===e.operatorToken.kind?Ce(t,n,e.left):Te(t,n,e.left);return Se(n,Tn.checkDefined(iJ(e.right,R,nu)),e.right),te(t),n}(n):28===n.operatorToken.kind?U(n):t.updateBinaryExpression(n,Y(Tn.checkDefined(iJ(n.left,R,nu))),n.operatorToken,Tn.checkDefined(iJ(n.right,R,nu)));return fJ(n,R,e)}(n);case 1:return function(n){const{left:r,right:i}=n;if(X(i)){let e;switch(r.kind){case 211:e=t.updatePropertyAccessExpression(r,Y(Tn.checkDefined(iJ(r.expression,R,X_))),r.name);break;case 212:e=t.updateElementAccessExpression(r,Y(Tn.checkDefined(iJ(r.expression,R,X_))),Y(Tn.checkDefined(iJ(r.argumentExpression,R,nu))));break;default:e=Tn.checkDefined(iJ(r,R,nu))}const o=n.operatorToken.kind;return ZJ(o)?vI(t.createAssignment(e,vI(t.createBinaryExpression(Y(e),ez(o),Tn.checkDefined(iJ(i,R,nu))),n)),n):t.updateBinaryExpression(n,e,n.operatorToken,Tn.checkDefined(iJ(i,R,nu)))}return fJ(n,R,e)}(n);default:return Tn.assertNever(r)}}(r);case 355:return function(e){let n=[];for(const r of e.elements)yP(r)&&28===r.operatorToken.kind?n.push(U(r)):(X(r)&&n.length>0&&(we(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(Tn.checkDefined(iJ(r,R,nu))));return t.inlineExpressions(n)}(r);case 227:return function(t){if(X(t.whenTrue)||X(t.whenFalse)){const e=ee(),n=ee(),r=Z();return Ce(e,Tn.checkDefined(iJ(t.condition,R,nu)),t.condition),Se(r,Tn.checkDefined(iJ(t.whenTrue,R,nu)),t.whenTrue),ke(n),te(e),Se(r,Tn.checkDefined(iJ(t.whenFalse,R,nu)),t.whenFalse),te(n),r}return fJ(t,R,e)}(r);case 229:return function(e){const r=ee(),i=iJ(e.expression,R,nu);if(e.asteriskToken){!function(e,t){we(7,[e],t)}(8388608&ip(e.expression)?i:vI(n().createValuesHelper(i),e),e)}else!function(e,t){we(6,[e],t)}(i,e);return te(r),function(e){return vI(t.createCallExpression(t.createPropertyAccessExpression(C,"sent"),void 0,[]),e)}(e)}(r);case 209:return function(e){return V(e.elements,void 0,void 0,e.multiLine)}(r);case 210:return function(e){const n=e.properties,r=e.multiLine,i=Q(n),o=Z();Se(o,t.createObjectLiteralExpression(oJ(n,R,F_,0,i),r));const a=Me(n,s,[],i);return a.push(r?bA(qT(vI(t.cloneNode(o),o),o.parent)):o),t.inlineExpressions(a);function s(n,i){X(i)&&n.length>0&&(xe(t.createExpressionStatement(t.inlineExpressions(n))),n=[]);const a=iJ(iA(t,e,i,o),R,nu);return a&&(r&&bA(a),n.push(a)),n}}(r);case 212:return function(n){if(X(n.argumentExpression))return t.updateElementAccessExpression(n,Y(Tn.checkDefined(iJ(n.expression,R,X_))),Tn.checkDefined(iJ(n.argumentExpression,R,nu)));return fJ(n,R,e)}(r);case 213:return function(n){if(!gf(n)&&h(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(n.expression,a,c,!0);return cw(vI(t.createFunctionApplyCall(Y(Tn.checkDefined(iJ(e,R,X_))),r,V(n.arguments)),n),n)}return fJ(n,R,e)}(r);case 214:return function(n){if(h(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return cw(vI(t.createNewExpression(t.createFunctionApplyCall(Y(Tn.checkDefined(iJ(e,R,nu))),r,V(n.arguments,t.createVoidZero())),void 0,[]),n),n)}return fJ(n,R,e)}(r);default:return fJ(r,R,e)}}(r):4196352&r.transformFlags?fJ(r,R,e):r}}function J(n){if(n.asteriskToken)n=cw(vI(t.createFunctionDeclaration(n.modifiers,void 0,n.name,void 0,lJ(n.parameters,R,e),void 0,q(n.body)),n),n);else{const t=p,r=f;p=!1,f=!1,n=fJ(n,R,e),p=t,f=r}return p?void o(n):n}function z(n){if(n.asteriskToken)n=cw(vI(t.createFunctionExpression(void 0,void 0,n.name,void 0,lJ(n.parameters,R,e),void 0,q(n.body)),n),n);else{const t=p,r=f;p=!1,f=!1,n=fJ(n,R,e),p=t,f=r}return n}function q(e){const o=[],a=p,s=f,c=m,l=g,_=y,u=v,d=b,h=x,M=O,B=S,J=k,z=T,q=C;p=!0,f=!1,m=void 0,g=void 0,y=void 0,v=void 0,b=void 0,x=void 0,O=1,S=void 0,k=void 0,T=void 0,C=t.createTempVariable(void 0),r();const U=t.copyPrologue(e.statements,o,!1,R);W(e.statements,U);const V=function(){j=0,L=0,w=void 0,N=!1,D=!1,P=void 0,E=void 0,F=void 0,A=void 0,I=void 0;const e=function(){if(S){for(let e=0;e0)),1048576))}();return Ud(o,i()),o.push(t.createReturnStatement(V)),p=a,f=s,m=c,g=l,y=_,v=u,b=d,x=h,O=M,S=B,k=J,T=z,C=q,vI(t.createBlock(o,e.multiLine),e)}function U(e){let n=[];return r(e.left),r(e.right),t.inlineExpressions(n);function r(e){yP(e)&&28===e.operatorToken.kind?(r(e.left),r(e.right)):(X(e)&&n.length>0&&(we(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(Tn.checkDefined(iJ(e,R,nu))))}}function V(e,n,r,i){const o=Q(e);let a;if(o>0){a=Z();const r=oJ(e,R,nu,0,o);Se(a,t.createArrayLiteralExpression(n?[n,...r]:r)),n=void 0}const s=Me(e,function(e,r){if(X(r)&&e.length>0){const r=void 0!==a;a||(a=Z()),Se(a,r?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(e,i)]):t.createArrayLiteralExpression(n?[n,...e]:e,i)),n=void 0,e=[]}return e.push(Tn.checkDefined(iJ(r,R,nu))),e},[],o);return a?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(s,i)]):vI(t.createArrayLiteralExpression(n?[n,...s]:s,i),r)}function W(e,t=0){const n=e.length;for(let r=t;r0?ke(t,e):xe(e)}(n);case 252:return function(e){const t=me(e.label?wc(e.label):void 0);t>0?ke(t,e):xe(e)}(n);case 253:return function(e){t=iJ(e.expression,R,nu),n=e,we(8,[t],n);var t,n}(n);case 254:return function(e){X(e)?(function(e){const t=ee(),n=ee();te(t),ne({kind:1,expression:e,startLabel:t,endLabel:n})}(Y(Tn.checkDefined(iJ(e.expression,R,nu)))),$(e.statement),function(){Tn.assert(1===oe());te(re().endLabel)}()):xe(iJ(e,R,wu))}(n);case 255:return function(e){if(X(e.caseBlock)){const n=e.caseBlock,r=n.clauses.length,i=function(){const e=ee();return ne({kind:2,isScript:!1,breakLabel:e}),e}(),o=Y(Tn.checkDefined(iJ(e.expression,R,nu))),a=[];let s=-1;for(let e=0;e0)break;l.push(t.createCaseClause(Tn.checkDefined(iJ(r.expression,R,nu)),[ve(a[i],r.expression)]))}else e++}l.length&&(xe(t.createSwitchStatement(o,t.createCaseBlock(l))),c+=l.length,l=[]),e>0&&(c+=e,e=0)}ke(s>=0?a[s]:i);for(let e=0;e0)break;o.push(G(t))}o.length&&(xe(t.createExpressionStatement(t.inlineExpressions(o))),i+=o.length,o=[])}}function G(e){return hw(t.createAssignment(hw(t.cloneNode(e.name),e.name),Tn.checkDefined(iJ(e.initializer,R,nu))),e)}function X(e){return!!e&&!!(1048576&e.transformFlags)}function Q(e){const t=e.length;for(let n=0;n=0;n--){const t=v[n];if(!de(t))break;if(t.labelText===e)return!0}return!1}function me(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(de(n)&&n.labelText===e)return n.breakLabel;if(ue(n)&&fe(e,t-1))return n.breakLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(ue(t))return t.breakLabel}return 0}function ge(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(pe(n)&&fe(e,t-1))return n.continueLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(pe(t))return t.continueLabel}return 0}function he(e){if(void 0!==e&&e>0){void 0===x&&(x=[]);const n=t.createNumericLiteral(Number.MAX_SAFE_INTEGER);return void 0===x[e]?x[e]=[n]:x[e].push(n),n}return t.createOmittedExpression()}function ye(e){const n=t.createNumericLiteral(e);return Pw(n,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(e)),n}function ve(e,n){return Tn.assertLessThan(0,e,"Invalid label"),vI(t.createReturnStatement(t.createArrayLiteralExpression([ye(3),he(e)])),n)}function be(){we(0)}function xe(e){e?we(1,[e]):be()}function Se(e,t,n){we(2,[e,t],n)}function ke(e,t){we(3,[e],t)}function Te(e,t,n){we(4,[e,t],n)}function Ce(e,t,n){we(5,[e,t],n)}function we(e,t,n){void 0===S&&(S=[],k=[],T=[]),void 0===b&&te(ee());const r=S.length;S[r]=e,k[r]=t,T[r]=n}function Ne(){E&&(Ee(!N),N=!1,D=!1,L++)}function De(e){(function(e){if(!D)return!0;if(!b||!x)return!1;for(let t=0;t=0;e--){const n=I[e];E=[t.createWithStatement(n.expression,t.createBlock(E))]}if(A){const{startLabel:e,catchLabel:n,finallyLabel:r,endLabel:i}=A;E.unshift(t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createPropertyAccessExpression(C,"trys"),"push"),void 0,[t.createArrayLiteralExpression([he(e),he(n),he(r),he(i)])]))),A=void 0}e&&E.push(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(C,"label"),t.createNumericLiteral(L+1))))}P.push(t.createCaseClause(t.createNumericLiteral(L),E||[])),E=void 0}function Fe(e){if(b)for(let t=0;tt.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(wc(n))),e),t.createVoidZero())))}for(const e of h.exportedFunctions)U(o,e);pe(o,iJ(h.externalHelpersImportDeclaration,D,wu)),ge(o,oJ(n.statements,D,wu,c)),N(o,!1),Ud(o,i());const l=t.updateSourceFile(n,vI(t.createNodeArray(o),n.statements));return Ow(l,e.readEmitHelpers()),l}function S(n){const r=t.createIdentifier("define"),i=NA(t,n,c,a),o=sf(n)&&n,{aliasedModuleNames:s,unaliasedModuleNames:l,importAliasNames:_}=T(n,!0),u=t.updateSourceFile(n,vI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(r,void 0,[...i?[i]:[],t.createArrayLiteralExpression(o?p:[t.createStringLiteral("require"),t.createStringLiteral("exports"),...s,...l]),o?o.statements.length?o.statements[0].expression:t.createObjectLiteralExpression():t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),..._],void 0,w(n))]))]),n.statements));return Ow(u,e.readEmitHelpers()),u}function k(n){const{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}=T(n,!1),s=NA(t,n,c,a),l=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"factory")],void 0,vI(t.createBlock([t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("module"),"object"),t.createTypeCheck(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),"object")),t.createBlock([t.createVariableStatement(void 0,[t.createVariableDeclaration("v",void 0,void 0,t.createCallExpression(t.createIdentifier("factory"),void 0,[t.createIdentifier("require"),t.createIdentifier("exports")]))]),dw(t.createIfStatement(t.createStrictInequality(t.createIdentifier("v"),t.createIdentifier("undefined")),t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),t.createIdentifier("v")))),1)]),t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("define"),"function"),t.createPropertyAccessExpression(t.createIdentifier("define"),"amd")),t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("define"),void 0,[...s?[s]:[],t.createArrayLiteralExpression([t.createStringLiteral("require"),t.createStringLiteral("exports"),...r,...i]),t.createIdentifier("factory")]))])))],!0),void 0)),_=t.updateSourceFile(n,vI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(l,void 0,[t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),...o],void 0,w(n))]))]),n.statements));return Ow(_,e.readEmitHelpers()),_}function T(e,n){const r=[],i=[],o=[];for(const n of e.amdDependencies)n.name?(r.push(t.createStringLiteral(n.path)),o.push(t.createParameterDeclaration(void 0,void 0,n.name))):i.push(t.createStringLiteral(n.path));for(const e of h.externalImports){const l=wA(t,e,m,c,s,a),_=CA(t,e,m);l&&(n&&_?(dw(_,8),r.push(l),o.push(t.createParameterDeclaration(void 0,void 0,_))):i.push(l))}return{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}}function C(e){if(uE(e)||TE(e)||!wA(t,e,m,c,s,a))return;const n=CA(t,e,m),r=M(e,n);return r!==n?t.createExpressionStatement(t.createAssignment(n,r)):void 0}function w(e){r();const n=[],o=t.copyPrologue(e.statements,n,!0,D);b()&&pe(n,H()),ee(h.exportedNames)&&pe(n,t.createExpressionStatement(Me(h.exportedNames,(e,n)=>t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(wc(n))),e),t.createVoidZero())));for(const e of h.exportedFunctions)U(n,e);pe(n,iJ(h.externalHelpersImportDeclaration,D,wu)),2===_&&ge(n,$(h.externalImports,C)),ge(n,oJ(e.statements,D,wu,o)),N(n,!0),Ud(n,i());const a=t.createBlock(n,!0);return v&&Iw(a,vq),a}function N(e,n){if(h.exportEquals){const r=iJ(h.exportEquals.expression,F,nu);if(r)if(n){const n=t.createReturnStatement(r);vI(n,h.exportEquals),dw(n,3840),e.push(n)}else{const n=t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),r));vI(n,h.exportEquals),dw(n,3072),e.push(n)}}}function D(e){switch(e.kind){case 272:return function(e){let n;const r=Ag(e);if(2!==_){if(!e.importClause)return cw(vI(t.createExpressionStatement(R(e)),e),e);{const i=[];r&&!Ig(e)?i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,M(e,R(e)))):(i.push(t.createVariableDeclaration(t.getGeneratedNameForNode(e),void 0,void 0,M(e,R(e)))),r&&Ig(e)&&i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)))),n=pe(n,cw(vI(t.createVariableStatement(void 0,t.createVariableDeclarationList(i,l>=2?2:0)),e),e))}}else r&&Ig(e)&&(n=pe(n,t.createVariableStatement(void 0,t.createVariableDeclarationList([cw(vI(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)),e),e)],l>=2?2:0))));return n=function(e,t){if(h.exportEquals)return e;const n=t.importClause;if(!n)return e;const r=new GJ;n.name&&(e=V(e,r,n));const i=n.namedBindings;if(i)switch(i.kind){case 274:e=V(e,r,i);break;case 275:for(const t of i.elements)e=V(e,r,t,!0)}return e}(n,e),Ie(n)}(e);case 271:return function(e){let n;Tn.assert(Om(e),"import= for internal module references should be handled in an earlier transformer."),2!==_?n=Wv(e,32)?pe(n,cw(vI(t.createExpressionStatement(G(e.name,R(e))),e),e)):pe(n,cw(vI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,R(e))],l>=2?2:0)),e),e)):Wv(e,32)&&(n=pe(n,cw(vI(t.createExpressionStatement(G(t.getExportName(e),t.getLocalName(e))),e),e)));return n=function(e,t){if(h.exportEquals)return e;return V(e,new GJ,t)}(n,e),Ie(n)}(e);case 278:return function(e){if(!e.moduleSpecifier)return;const r=t.getGeneratedNameForNode(e);if(e.exportClause&&CE(e.exportClause)){const i=[];2!==_&&i.push(cw(vI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,R(e))])),e),e));for(const o of e.exportClause.elements){const s=!(!BS(a)||2&op(e)||"default"!==wc(o.propertyName||o.name)),c=t.createPropertyAccessExpression(s?n().createImportDefaultHelper(r):r,o.propertyName||o.name);i.push(cw(vI(t.createExpressionStatement(G(t.getExportName(o),c,void 0,!0)),o),o))}return Ie(i)}if(e.exportClause){const i=[];return i.push(cw(vI(t.createExpressionStatement(G(t.cloneNode(e.exportClause.name),function(e,t){if(!BS(a)||2&op(e))return t;if(UJ(e))return n().createImportStarHelper(t);return t}(e,2!==_?R(e):Zd(e)?r:t.createIdentifier(wc(e.exportClause.name))))),e),e)),Ie(i)}return cw(vI(t.createExpressionStatement(n().createExportStarHelper(2!==_?R(e):r)),e),e)}(e);case 277:return function(e){if(e.isExportEquals)return;return K(t.createIdentifier("default"),iJ(e.expression,F,nu),e,!0)}(e);default:return P(e)}}function P(n){switch(n.kind){case 243:return function(n){let r,i,o;if(Wv(n,32)){let e,a=!1;for(const r of n.declarationList.declarations)if(QN(r.name)&&sA(r.name))if(e||(e=oJ(n.modifiers,X,__)),r.initializer){i=pe(i,t.updateVariableDeclaration(r,r.name,void 0,void 0,G(r.name,iJ(r.initializer,F,nu))))}else i=pe(i,r);else if(r.initializer)if(!O_(r.name)&&(uP(r.initializer)||_P(r.initializer)||kP(r.initializer))){const e=t.createAssignment(vI(t.createPropertyAccessExpression(t.createIdentifier("exports"),r.name),r.name),t.createIdentifier(ey(r.name)));i=pe(i,t.createVariableDeclaration(r.name,r.exclamationToken,r.type,iJ(r.initializer,F,nu))),o=pe(o,e),a=!0}else o=pe(o,J(r));if(i&&(r=pe(r,t.updateVariableStatement(n,e,t.updateVariableDeclarationList(n.declarationList,i)))),o){const e=cw(vI(t.createExpressionStatement(t.inlineExpressions(o)),n),n);a&&uw(e),r=pe(r,e)}}else r=pe(r,fJ(n,F,e));return r=function(e,t){return z(e,t.declarationList,!1)}(r,n),Ie(r)}(n);case 262:return function(n){let r;r=Wv(n,32)?pe(r,cw(vI(t.createFunctionDeclaration(oJ(n.modifiers,X,__),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,oJ(n.parameters,F,mD),void 0,fJ(n.body,F,e)),n),n)):pe(r,fJ(n,F,e));return Ie(r)}(n);case 263:return function(n){let r;r=Wv(n,32)?pe(r,cw(vI(t.createClassDeclaration(oJ(n.modifiers,X,D_),t.getDeclarationName(n,!0,!0),void 0,oJ(n.heritageClauses,F,WE),oJ(n.members,F,x_)),n),n)):pe(r,fJ(n,F,e));return r=U(r,n),Ie(r)}(n);case 248:return O(n,!0);case 249:return function(n){if(tE(n.initializer)&&!(7&n.initializer.flags)){const r=z(void 0,n.initializer,!0);if(ee(r)){const i=iJ(n.initializer,A,pu),o=iJ(n.expression,F,nu),a=dJ(n.statement,P,e),s=jP(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0);return t.updateForInStatement(n,i,o,s)}}return t.updateForInStatement(n,iJ(n.initializer,A,pu),iJ(n.expression,F,nu),dJ(n.statement,P,e))}(n);case 250:return function(n){if(tE(n.initializer)&&!(7&n.initializer.flags)){const r=z(void 0,n.initializer,!0),i=iJ(n.initializer,A,pu),o=iJ(n.expression,F,nu);let a=dJ(n.statement,P,e);return ee(r)&&(a=jP(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0)),t.updateForOfStatement(n,n.awaitModifier,i,o,a)}return t.updateForOfStatement(n,n.awaitModifier,iJ(n.initializer,A,pu),iJ(n.expression,F,nu),dJ(n.statement,P,e))}(n);case 246:return function(n){return t.updateDoStatement(n,dJ(n.statement,P,e),iJ(n.expression,F,nu))}(n);case 247:return function(n){return t.updateWhileStatement(n,iJ(n.expression,F,nu),dJ(n.statement,P,e))}(n);case 256:return function(e){return t.updateLabeledStatement(e,e.label,Tn.checkDefined(iJ(e.statement,P,wu,t.liftToBlock)))}(n);case 254:return function(e){return t.updateWithStatement(e,iJ(e.expression,F,nu),Tn.checkDefined(iJ(e.statement,P,wu,t.liftToBlock)))}(n);case 245:return function(e){return t.updateIfStatement(e,iJ(e.expression,F,nu),Tn.checkDefined(iJ(e.thenStatement,P,wu,t.liftToBlock)),iJ(e.elseStatement,P,wu,t.liftToBlock))}(n);case 255:return function(e){return t.updateSwitchStatement(e,iJ(e.expression,F,nu),Tn.checkDefined(iJ(e.caseBlock,P,lE)))}(n);case 269:return function(e){return t.updateCaseBlock(e,oJ(e.clauses,P,Ou))}(n);case 296:return function(e){return t.updateCaseClause(e,iJ(e.expression,F,nu),oJ(e.statements,P,wu))}(n);case 297:case 258:return function(t){return fJ(t,P,e)}(n);case 299:return function(e){return t.updateCatchClause(e,e.variableDeclaration,Tn.checkDefined(iJ(e.block,P,jP)))}(n);case 241:return function(t){return t=fJ(t,P,e),t}(n);default:return F(n)}}function E(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 248:return O(n,!1);case 244:return function(e){return t.updateExpressionStatement(e,iJ(e.expression,A,nu))}(n);case 217:return function(e,n){return t.updateParenthesizedExpression(e,iJ(e.expression,n?A:F,nu))}(n,r);case 354:return function(e,n){return t.updatePartiallyEmittedExpression(e,iJ(e.expression,n?A:F,nu))}(n,r);case 213:if(gf(n)&&void 0===m.impliedNodeFormat)return function(n){if(0===_&&l>=7)return fJ(n,F,e);const r=wA(t,n,m,c,s,a),i=iJ(Ce(n.arguments),F,nu),u=!r||i&&ON(i)&&i.text===r.text?i:r,d=!!(16384&n.transformFlags);switch(a.module){case 2:return j(u,d);case 3:return function(e,n){if(v=!0,QJ(e)){const r=n_(e)?e:ON(e)?t.createStringLiteralFromNode(e):dw(vI(t.cloneNode(e),e),3072);return t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,L(e),void 0,j(r,n))}{const r=t.createTempVariable(o);return t.createComma(t.createAssignment(r,e),t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,L(r,!0),void 0,j(r,n)))}}(u??t.createVoidZero(),d);default:return L(u)}}(n);break;case 226:if(kb(n))return function(t,n){if(I(t.left))return xz(t,F,e,0,!n,B);return fJ(t,F,e)}(n,r);break;case 224:case 225:return function(n,r){if((46===n.operator||47===n.operator)&&QN(n.operand)&&!n_(n.operand)&&!sA(n.operand)&&!gx(n.operand)){const e=Y(n.operand);if(e){let i,a=iJ(n.operand,F,nu);gP(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(i=t.createTempVariable(o),a=t.createAssignment(i,a),vI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),vI(a,n));for(const t of e)y[KB(a)]=!0,a=G(t,a),vI(a,n);return i&&(y[KB(a)]=!0,a=t.createComma(a,i),vI(a,n)),a}}return fJ(n,F,e)}(n,r)}return fJ(n,F,e)}function F(e){return E(e,!1)}function A(e){return E(e,!0)}function I(e){if(nP(e))for(const t of e.properties)switch(t.kind){case 303:if(I(t.initializer))return!0;break;case 304:if(I(t.name))return!0;break;case 305:if(I(t.expression))return!0;break;case 174:case 177:case 178:return!1;default:Tn.assertNever(t,"Unhandled object member kind")}else if(tP(e)){for(const t of e.elements)if(SP(t)){if(I(t.expression))return!0}else if(I(t))return!0}else if(QN(e))return g(Y(e))>(cA(e)?1:0);return!1}function O(n,r){if(r&&n.initializer&&tE(n.initializer)&&!(7&n.initializer.flags)){const i=z(void 0,n.initializer,!1);if(i){const o=[],a=iJ(n.initializer,A,tE),s=t.createVariableStatement(void 0,a);o.push(s),ge(o,i);const c=iJ(n.condition,F,nu),l=iJ(n.incrementor,A,nu),_=dJ(n.statement,r?P:F,e);return o.push(t.updateForStatement(n,void 0,c,l,_)),o}}return t.updateForStatement(n,iJ(n.initializer,A,pu),iJ(n.condition,F,nu),iJ(n.incrementor,A,nu),dJ(n.statement,r?P:F,e))}function j(e,r){const i=t.createUniqueName("resolve"),o=t.createUniqueName("reject"),s=[t.createParameterDeclaration(void 0,void 0,i),t.createParameterDeclaration(void 0,void 0,o)],c=t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("require"),void 0,[t.createArrayLiteralExpression([e||t.createOmittedExpression()]),i,o]))]);let _;l>=2?_=t.createArrowFunction(void 0,void 0,s,void 0,void 0,c):(_=t.createFunctionExpression(void 0,void 0,void 0,void 0,s,void 0,c),r&&dw(_,16));const u=t.createNewExpression(t.createIdentifier("Promise"),void 0,[_]);return BS(a)?t.createCallExpression(t.createPropertyAccessExpression(u,t.createIdentifier("then")),void 0,[n().createImportStarCallbackHelper()]):u}function L(e,r){const i=e&&!YJ(e)&&!r,o=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Promise"),"resolve"),void 0,i?l>=2?[t.createTemplateExpression(t.createTemplateHead(""),[t.createTemplateSpan(e,t.createTemplateTail(""))])]:[t.createCallExpression(t.createPropertyAccessExpression(t.createStringLiteral(""),"concat"),void 0,[e])]:[]);let s=t.createCallExpression(t.createIdentifier("require"),void 0,i?[t.createIdentifier("s")]:e?[e]:[]);BS(a)&&(s=n().createImportStarHelper(s));const c=i?[t.createParameterDeclaration(void 0,void 0,"s")]:[];let _;_=l>=2?t.createArrowFunction(void 0,void 0,c,void 0,void 0,s):t.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,t.createBlock([t.createReturnStatement(s)]));return t.createCallExpression(t.createPropertyAccessExpression(o,"then"),void 0,[_])}function M(e,t){return!BS(a)||2&op(e)?t:VJ(e)?n().createImportStarHelper(t):WJ(e)?n().createImportDefaultHelper(t):t}function R(e){const n=wA(t,e,m,c,s,a),r=[];return n&&r.push(n),t.createCallExpression(t.createIdentifier("require"),void 0,r)}function B(e,n,r){const i=Y(e);if(i){let o=cA(e)?n:t.createAssignment(e,n);for(const e of i)dw(o,8),o=G(e,o,r);return o}return t.createAssignment(e,n)}function J(n){return O_(n.name)?xz(iJ(n,F,yx),F,e,0,!1,B):t.createAssignment(vI(t.createPropertyAccessExpression(t.createIdentifier("exports"),n.name),n.name),n.initializer?iJ(n.initializer,F,nu):t.createVoidZero())}function z(e,t,n){if(h.exportEquals)return e;for(const r of t.declarations)e=q(e,r,n);return e}function q(e,t,n){if(h.exportEquals)return e;if(O_(t.name))for(const r of t.name.elements)TP(r)||(e=q(e,r,n));else n_(t.name)||eE(t)&&!t.initializer&&!n||(e=V(e,new GJ,t));return e}function U(e,n){if(h.exportEquals)return e;const r=new GJ;if(Wv(n,32)){e=W(e,r,Wv(n,2048)?t.createIdentifier("default"):t.getDeclarationName(n),t.getLocalName(n),n)}return n.name&&(e=V(e,r,n)),e}function V(e,n,r,i){const o=t.getDeclarationName(r),a=h.exportSpecifiers.get(o);if(a)for(const t of a)e=W(e,n,t.name,o,t.name,void 0,i);return e}function W(e,t,n,r,i,o,a){return t.has(n)||(t.set(n,!0),e=pe(e,K(n,r,i,o,a))),e}function H(){const e=t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteral("__esModule"),t.createObjectLiteralExpression([t.createPropertyAssignment("value",t.createTrue())])]));return dw(e,2097152),e}function K(e,n,r,i,o){const a=vI(t.createExpressionStatement(G(e,n,void 0,o)),r);return bA(a),i||dw(a,3072),a}function G(e,n,r,i){return vI(i?t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteralFromNode(e),t.createObjectLiteralExpression([t.createPropertyAssignment("enumerable",t.createTrue()),t.createPropertyAssignment("get",t.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,t.createBlock([t.createReturnStatement(n)])))])]):t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),n),r)}function X(e){switch(e.kind){case 95:case 90:return}return e}function Q(e){var n,r;if(8192&ip(e)){const n=xA(m);return n?t.createPropertyAccessExpression(n,e):e}if((!n_(e)||64&e.emitNode.autoGenerate.flags)&&!sA(e)){const i=s.getReferencedExportContainer(e,cA(e));if(i&&307===i.kind)return vI(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),e);const o=s.getReferencedImportDeclaration(e);if(o){if(pE(o))return vI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default")),e);if(SE(o)){const i=o.propertyName||o.name;return vI(t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o),t.cloneNode(i)),e)}}}return e}function Y(e){if(n_(e)){if(i_(e)){const t=null==h?void 0:h.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}}else{const t=s.getReferencedImportDeclaration(e);if(t)return null==h?void 0:h.exportedBindings[BJ(t)];const n=new Set,r=s.getReferencedValueDeclarations(e);if(r){for(const e of r){const t=null==h?void 0:h.exportedBindings[BJ(e)];if(t)for(const e of t)n.add(e)}if(n.size)return We(n)}}}}var vq={name:"typescript:dynamicimport-sync-require",scoped:!0,text:'\n var __syncRequire = typeof module === "object" && typeof module.exports === "object";'};function bq(e){const{factory:t,startLexicalEnvironment:n,endLexicalEnvironment:r,hoistVariableDeclaration:i}=e,o=e.getCompilerOptions(),a=e.getEmitResolver(),s=e.getEmitHost(),c=e.onSubstituteNode,l=e.onEmitNode;e.onSubstituteNode=function(e,n){if(function(e){return x&&e.id&&x[e.id]}(n=c(e,n)))return n;if(1===e)return function(e){switch(e.kind){case 80:return function(e){var n,r;if(8192&ip(e)){const n=xA(f);return n?t.createPropertyAccessExpression(n,e):e}if(!n_(e)&&!sA(e)){const i=a.getReferencedImportDeclaration(e);if(i){if(pE(i))return vI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(i.parent),t.createIdentifier("default")),e);if(SE(i))return vI(t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=i.parent)?void 0:n.parent)?void 0:r.parent)||i),t.cloneNode(i.propertyName||i.name)),e)}}return e}(e);case 226:return function(e){if(yb(e.operatorToken.kind)&&QN(e.left)&&(!n_(e.left)||i_(e.left))&&!sA(e.left)){const t=H(e.left);if(t){let n=e;for(const e of t)n=R(e,K(n));return n}}return e}(e);case 236:return function(e){if(hf(e))return t.createPropertyAccessExpression(y,t.createIdentifier("meta"));return e}(e)}return e}(n);if(4===e)return function(e){if(304===e.kind)return function(e){var n,r;const i=e.name;if(!n_(i)&&!sA(i)){const o=a.getReferencedImportDeclaration(i);if(o){if(pE(o))return vI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default"))),e);if(SE(o))return vI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o),t.cloneNode(o.propertyName||o.name))),e)}}return e}(e);return e}(n);return n},e.onEmitNode=function(e,t,n){if(307===t.kind){const r=BJ(t);f=t,m=_[r],g=u[r],x=d[r],y=p[r],x&&delete d[r],l(e,t,n),f=void 0,m=void 0,g=void 0,y=void 0,x=void 0}else l(e,t,n)},e.enableSubstitution(80),e.enableSubstitution(304),e.enableSubstitution(226),e.enableSubstitution(236),e.enableEmitNotification(307);const _=[],u=[],d=[],p=[];let f,m,g,y,v,b,x;return qJ(e,function(i){if(i.isDeclarationFile||!(kp(i,o)||8388608&i.transformFlags))return i;const c=BJ(i);f=i,b=i,m=_[c]=$J(e,i),g=t.createUniqueName("exports"),u[c]=g,y=p[c]=t.createUniqueName("context");const l=function(e){const n=new Map,r=[];for(const i of e){const e=wA(t,i,f,s,a,o);if(e){const t=e.text,o=n.get(t);void 0!==o?r[o].externalImports.push(i):(n.set(t,r.length),r.push({name:e,externalImports:[i]}))}}return r}(m.externalImports),h=function(e,i){const a=[];n();const s=tk(o,"alwaysStrict")||tO(f),c=t.copyPrologue(e.statements,a,s,T);a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration("__moduleName",void 0,void 0,t.createLogicalAnd(y,t.createPropertyAccessExpression(y,"id")))]))),iJ(m.externalHelpersImportDeclaration,T,wu);const l=oJ(e.statements,T,wu,c);ge(a,v),Ud(a,r());const _=function(e){if(!m.hasExportStarsToExportValues)return;if(!ee(m.exportedNames)&&0===m.exportedFunctions.size&&0===m.exportSpecifiers.size){let t=!1;for(const e of m.externalImports)if(278===e.kind&&e.exportClause){t=!0;break}if(!t){const t=S(void 0);return e.push(t),t.name}}const n=[];if(m.exportedNames)for(const e of m.exportedNames)"default"!==e.escapedText&&n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e),t.createTrue()));for(const e of m.exportedFunctions)Wv(e,2048)||(Tn.assert(!!e.name),n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e.name),t.createTrue())));const r=t.createUniqueName("exportedNames");e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createObjectLiteralExpression(n,!0))])));const i=S(r);return e.push(i),i.name}(a),u=2097152&e.transformFlags?t.createModifiersFromModifierFlags(1024):void 0,d=t.createObjectLiteralExpression([t.createPropertyAssignment("setters",k(_,i)),t.createPropertyAssignment("execute",t.createFunctionExpression(u,void 0,void 0,void 0,[],void 0,t.createBlock(l,!0)))],!0);return a.push(t.createReturnStatement(d)),t.createBlock(a,!0)}(i,l),C=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,g),t.createParameterDeclaration(void 0,void 0,y)],void 0,h),w=NA(t,i,s,o),N=t.createArrayLiteralExpression(M(l,e=>e.name)),D=dw(t.updateSourceFile(i,vI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("System"),"register"),void 0,w?[w,N,C]:[N,C]))]),i.statements)),2048);o.outFile||Mw(D,h,e=>!e.scoped);x&&(d[c]=x,x=void 0);return f=void 0,m=void 0,g=void 0,y=void 0,v=void 0,b=void 0,D});function S(e){const n=t.createUniqueName("exportStar"),r=t.createIdentifier("m"),i=t.createIdentifier("n"),o=t.createIdentifier("exports");let a=t.createStrictInequality(i,t.createStringLiteral("default"));return e&&(a=t.createLogicalAnd(a,t.createLogicalNot(t.createCallExpression(t.createPropertyAccessExpression(e,"hasOwnProperty"),void 0,[i])))),t.createFunctionDeclaration(void 0,void 0,n,void 0,[t.createParameterDeclaration(void 0,void 0,r)],void 0,t.createBlock([t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(o,void 0,void 0,t.createObjectLiteralExpression([]))])),t.createForInStatement(t.createVariableDeclarationList([t.createVariableDeclaration(i)]),r,t.createBlock([dw(t.createIfStatement(a,t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(o,i),t.createElementAccessExpression(r,i)))),1)])),t.createExpressionStatement(t.createCallExpression(g,void 0,[o]))],!0))}function k(e,n){const r=[];for(const i of n){const n=h(i.externalImports,e=>CA(t,e,f)),o=n?t.getGeneratedNameForNode(n):t.createUniqueName(""),a=[];for(const n of i.externalImports){const r=CA(t,n,f);switch(n.kind){case 272:if(!n.importClause)break;case 271:Tn.assert(void 0!==r),a.push(t.createExpressionStatement(t.createAssignment(r,o))),Wv(n,32)&&a.push(t.createExpressionStatement(t.createCallExpression(g,void 0,[t.createStringLiteral(wc(r)),o])));break;case 278:if(Tn.assert(void 0!==r),n.exportClause)if(CE(n.exportClause)){const e=[];for(const r of n.exportClause.elements)e.push(t.createPropertyAssignment(t.createStringLiteral(wc(r.name)),t.createElementAccessExpression(o,t.createStringLiteral(wc(r.propertyName||r.name)))));a.push(t.createExpressionStatement(t.createCallExpression(g,void 0,[t.createObjectLiteralExpression(e,!0)])))}else a.push(t.createExpressionStatement(t.createCallExpression(g,void 0,[t.createStringLiteral(wc(n.exportClause.name)),o])));else a.push(t.createExpressionStatement(t.createCallExpression(e,void 0,[o])))}}r.push(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,o)],void 0,t.createBlock(a,!0)))}return t.createArrayLiteralExpression(r,!0)}function T(e){switch(e.kind){case 272:return function(e){let n;e.importClause&&i(CA(t,e,f));return Ie(function(e,t){if(m.exportEquals)return e;const n=t.importClause;if(!n)return e;n.name&&(e=O(e,n));const r=n.namedBindings;if(r)switch(r.kind){case 274:e=O(e,r);break;case 275:for(const t of r.elements)e=O(e,t)}return e}(n,e))}(e);case 271:return function(e){let n;return Tn.assert(Om(e),"import= for internal module references should be handled in an earlier transformer."),i(CA(t,e,f)),Ie(function(e,t){if(m.exportEquals)return e;return O(e,t)}(n,e))}(e);case 278:return function(e){return void Tn.assertIsDefined(e)}(e);case 277:return function(e){if(e.isExportEquals)return;const n=iJ(e.expression,U,nu);return L(t.createIdentifier("default"),n,!0)}(e);default:return B(e)}}function C(e){if(!N(e.declarationList))return iJ(e,U,wu);let n;if(uf(e.declarationList)||_f(e.declarationList)){const r=oJ(e.modifiers,$,D_),i=[];for(const n of e.declarationList.declarations)i.push(t.updateVariableDeclaration(n,t.getGeneratedNameForNode(n.name),void 0,void 0,D(n,!1)));const o=t.updateVariableDeclarationList(e.declarationList,i);n=pe(n,t.updateVariableStatement(e,r,o))}else{let r;const i=Wv(e,32);for(const t of e.declarationList.declarations)t.initializer?r=pe(r,D(t,i)):w(t);r&&(n=pe(n,vI(t.createExpressionStatement(t.inlineExpressions(r)),e)))}return n=function(e,t,n){if(m.exportEquals)return e;for(const r of t.declarationList.declarations)(r.initializer||n)&&(e=A(e,r,n));return e}(n,e,!1),Ie(n)}function w(e){if(O_(e.name))for(const t of e.name.elements)TP(t)||w(t);else i(t.cloneNode(e.name))}function N(e){return!(4194304&ip(e)||307!==b.kind&&7&bc(e).flags)}function D(t,n){const r=n?P:E;return O_(t.name)?xz(t,U,e,0,!1,r):t.initializer?r(t.name,iJ(t.initializer,U,nu)):t.name}function P(e,t,n){return F(e,t,n,!0)}function E(e,t,n){return F(e,t,n,!1)}function F(e,n,r,o){return i(t.cloneNode(e)),o?R(e,K(vI(t.createAssignment(e,n),r))):K(vI(t.createAssignment(e,n),r))}function A(e,n,r){if(m.exportEquals)return e;if(O_(n.name))for(const t of n.name.elements)TP(t)||(e=A(e,t,r));else if(!n_(n.name)){let i;r&&(e=j(e,n.name,t.getLocalName(n)),i=wc(n.name)),e=O(e,n,i)}return e}function I(e,n){if(m.exportEquals)return e;let r;if(Wv(n,32)){const i=Wv(n,2048)?t.createStringLiteral("default"):n.name;e=j(e,i,t.getLocalName(n)),r=ey(i)}return n.name&&(e=O(e,n,r)),e}function O(e,n,r){if(m.exportEquals)return e;const i=t.getDeclarationName(n),o=m.exportSpecifiers.get(i);if(o)for(const t of o)t.name.escapedText!==r&&(e=j(e,t.name,i));return e}function j(e,t,n,r){return e=pe(e,L(t,n,r))}function L(e,n,r){const i=t.createExpressionStatement(R(e,n));return bA(i),r||dw(i,3072),i}function R(e,n){const r=QN(e)?t.createStringLiteralFromNode(e):e;return dw(n,3072|ip(n)),kw(t.createCallExpression(g,void 0,[r,n]),n)}function B(n){switch(n.kind){case 243:return C(n);case 262:return function(n){v=Wv(n,32)?pe(v,t.updateFunctionDeclaration(n,oJ(n.modifiers,$,D_),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,oJ(n.parameters,U,mD),void 0,iJ(n.body,U,jP))):pe(v,fJ(n,U,e)),v=I(v,n)}(n);case 263:return function(e){let n;const r=t.getLocalName(e);return i(r),n=pe(n,vI(t.createExpressionStatement(t.createAssignment(r,vI(t.createClassExpression(oJ(e.modifiers,$,D_),e.name,void 0,oJ(e.heritageClauses,U,WE),oJ(e.members,U,x_)),e))),e)),n=I(n,e),Ie(n)}(n);case 248:return J(n,!0);case 249:return function(n){const r=b;return b=n,n=t.updateForInStatement(n,z(n.initializer),iJ(n.expression,U,nu),dJ(n.statement,B,e)),b=r,n}(n);case 250:return function(n){const r=b;return b=n,n=t.updateForOfStatement(n,n.awaitModifier,z(n.initializer),iJ(n.expression,U,nu),dJ(n.statement,B,e)),b=r,n}(n);case 246:return function(n){return t.updateDoStatement(n,dJ(n.statement,B,e),iJ(n.expression,U,nu))}(n);case 247:return function(n){return t.updateWhileStatement(n,iJ(n.expression,U,nu),dJ(n.statement,B,e))}(n);case 256:return function(e){return t.updateLabeledStatement(e,e.label,Tn.checkDefined(iJ(e.statement,B,wu,t.liftToBlock)))}(n);case 254:return function(e){return t.updateWithStatement(e,iJ(e.expression,U,nu),Tn.checkDefined(iJ(e.statement,B,wu,t.liftToBlock)))}(n);case 245:return function(e){return t.updateIfStatement(e,iJ(e.expression,U,nu),Tn.checkDefined(iJ(e.thenStatement,B,wu,t.liftToBlock)),iJ(e.elseStatement,B,wu,t.liftToBlock))}(n);case 255:return function(e){return t.updateSwitchStatement(e,iJ(e.expression,U,nu),Tn.checkDefined(iJ(e.caseBlock,B,lE)))}(n);case 269:return function(e){const n=b;return b=e,e=t.updateCaseBlock(e,oJ(e.clauses,B,Ou)),b=n,e}(n);case 296:return function(e){return t.updateCaseClause(e,iJ(e.expression,U,nu),oJ(e.statements,B,wu))}(n);case 297:case 258:return function(t){return fJ(t,B,e)}(n);case 299:return function(e){const n=b;return b=e,e=t.updateCatchClause(e,e.variableDeclaration,Tn.checkDefined(iJ(e.block,B,jP))),b=n,e}(n);case 241:return function(t){const n=b;return b=t,t=fJ(t,B,e),b=n,t}(n);default:return U(n)}}function J(n,r){const i=b;return b=n,n=t.updateForStatement(n,iJ(n.initializer,r?z:V,pu),iJ(n.condition,U,nu),iJ(n.incrementor,V,nu),dJ(n.statement,r?B:U,e)),b=i,n}function z(e){if(function(e){return tE(e)&&N(e)}(e)){let n;for(const t of e.declarations)n=pe(n,D(t,!1)),t.initializer||w(t);return n?t.inlineExpressions(n):t.createOmittedExpression()}return iJ(e,V,pu)}function q(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 248:return J(n,!1);case 244:return function(e){return t.updateExpressionStatement(e,iJ(e.expression,V,nu))}(n);case 217:return function(e,n){return t.updateParenthesizedExpression(e,iJ(e.expression,n?V:U,nu))}(n,r);case 354:return function(e,n){return t.updatePartiallyEmittedExpression(e,iJ(e.expression,n?V:U,nu))}(n,r);case 226:if(kb(n))return function(t,n){if(W(t.left))return xz(t,U,e,0,!n);return fJ(t,U,e)}(n,r);break;case 213:if(gf(n))return function(e){const n=wA(t,e,f,s,a,o),r=iJ(Ce(e.arguments),U,nu),i=!n||r&&ON(r)&&r.text===n.text?r:n;return t.createCallExpression(t.createPropertyAccessExpression(y,t.createIdentifier("import")),void 0,i?[i]:[])}(n);break;case 224:case 225:return function(n,r){if((46===n.operator||47===n.operator)&&QN(n.operand)&&!n_(n.operand)&&!sA(n.operand)&&!gx(n.operand)){const e=H(n.operand);if(e){let o,a=iJ(n.operand,U,nu);gP(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(o=t.createTempVariable(i),a=t.createAssignment(o,a),vI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),vI(a,n));for(const t of e)a=R(t,K(a));return o&&(a=t.createComma(a,o),vI(a,n)),a}}return fJ(n,U,e)}(n,r)}return fJ(n,U,e)}function U(e){return q(e,!1)}function V(e){return q(e,!0)}function W(e){if(xb(e,!0))return W(e.left);if(SP(e))return W(e.expression);if(nP(e))return ee(e.properties,W);if(tP(e))return ee(e.elements,W);if(KE(e))return W(e.name);if(HE(e))return W(e.initializer);if(QN(e)){const t=a.getReferencedExportContainer(e);return void 0!==t&&307===t.kind}return!1}function $(e){switch(e.kind){case 95:case 90:return}return e}function H(e){let n;const r=function(e){if(!n_(e)){const t=a.getReferencedImportDeclaration(e);if(t)return t;const n=a.getReferencedValueDeclaration(e);if(n&&(null==m?void 0:m.exportedBindings[BJ(n)]))return n;const r=a.getReferencedValueDeclarations(e);if(r)for(const e of r)if(e!==n&&(null==m?void 0:m.exportedBindings[BJ(e)]))return e;return n}}(e);if(r){const i=a.getReferencedExportContainer(e,!1);i&&307===i.kind&&(n=pe(n,t.getDeclarationName(r))),n=ge(n,null==m?void 0:m.exportedBindings[BJ(r)])}else if(n_(e)&&i_(e)){const t=null==m?void 0:m.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}return n}function K(e){return void 0===x&&(x=[]),x[KB(e)]=!0,e}}function xq(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getEmitHost(),i=e.getEmitResolver(),o=e.getCompilerOptions(),a=OS(o),s=e.onEmitNode,c=e.onSubstituteNode;let l,_,u;return e.onEmitNode=function(e,t,n){QE(t)?((tO(t)||RS(o))&&o.importHelpers&&(l=new Map),s(e,t,n),l=void 0):s(e,t,n)},e.onSubstituteNode=function(e,n){if(n=c(e,n),l&&QN(n)&&8192&ip(n))return function(e){const n=wc(e);let r=l.get(n);r||l.set(n,r=t.createUniqueName(n,48));return r}(n);return n},e.enableEmitNotification(307),e.enableSubstitution(80),qJ(e,function(r){if(r.isDeclarationFile)return r;if(tO(r)||RS(o)){_=r,u=void 0;let i=function(r){const i=kA(t,n(),r,o);if(i){const e=[],n=t.copyPrologue(r.statements,e);return pe(e,i),ge(e,oJ(r.statements,d,wu,n)),t.updateSourceFile(r,vI(t.createNodeArray(e),r.statements))}return fJ(r,d,e)}(r);return _=void 0,u&&(i=t.updateSourceFile(i,vI(t.createNodeArray(Vd(i.statements.slice(),u)),i.statements))),!tO(r)||200===jS(o)||ee(i.statements,lu)?i:t.updateSourceFile(i,vI(t.createNodeArray([...i.statements,HF(t)]),i.statements))}return r});function d(e){switch(e.kind){case 271:return jS(o)>=100?function(e){let n;return Tn.assert(Om(e),"import= for internal module references should be handled in an earlier transformer."),n=pe(n,cw(vI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,p(e))],a>=2?2:0)),e),e)),n=function(e,n){Wv(n,32)&&(e=pe(e,t.createExportDeclaration(void 0,n.isTypeOnly,t.createNamedExports([t.createExportSpecifier(!1,void 0,wc(n.name))]))));return e}(n,e),Ie(n)}(e):void 0;case 277:return function(e){if(e.isExportEquals){if(200===jS(o)){return cw(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),e.expression)),e)}return}return e}(e);case 278:return function(e){if(void 0!==o.module&&o.module>5)return e;if(!e.exportClause||!bE(e.exportClause)||!e.moduleSpecifier)return e;const n=e.exportClause.name,r=t.getGeneratedNameForNode(n),i=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamespaceImport(r)),e.moduleSpecifier,e.attributes);cw(i,e.exportClause);const a=Zd(e)?t.createExportDefault(r):t.createExportDeclaration(void 0,!1,t.createNamedExports([t.createExportSpecifier(!1,r,n)]));return cw(a,e),[i,a]}(e)}return e}function p(e){const n=wA(t,e,Tn.checkDefined(_),r,i,o),s=[];if(n&&s.push(n),200===jS(o))return t.createCallExpression(t.createIdentifier("require"),void 0,s);if(!u){const e=t.createUniqueName("_createRequire",48),n=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamedImports([t.createImportSpecifier(!1,t.createIdentifier("createRequire"),e)])),t.createStringLiteral("module"),void 0),r=t.createUniqueName("__require",48),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createCallExpression(t.cloneNode(e),void 0,[t.createPropertyAccessExpression(t.createMetaProperty(102,t.createIdentifier("meta")),t.createIdentifier("url"))]))],a>=2?2:0));u=[n,i]}const c=u[1].declarationList.declarations[0].name;return Tn.assertNode(c,QN),t.createCallExpression(t.cloneNode(c),void 0,s)}}function Sq(e){const t=e.onSubstituteNode,n=e.onEmitNode,r=xq(e),i=e.onSubstituteNode,o=e.onEmitNode;e.onSubstituteNode=t,e.onEmitNode=n;const a=yq(e),s=e.onSubstituteNode,c=e.onEmitNode;let l;return e.onSubstituteNode=function(e,n){return QE(n)?(l=n,t(e,n)):l?99===l.impliedNodeFormat?i(e,n):s(e,n):t(e,n)},e.onEmitNode=function(e,t,r){QE(t)&&(l=t);if(!l)return n(e,t,r);if(99===l.impliedNodeFormat)return o(e,t,r);return c(e,t,r)},e.enableSubstitution(307),e.enableEmitNotification(307),function(t){return 307===t.kind?_(t):function(t){return e.factory.createBundle(M(t.sourceFiles,_))}(t)};function _(e){if(e.isDeclarationFile)return e;l=e;const t=(99===e.impliedNodeFormat?r:a)(e);return l=void 0,Tn.assert(QE(t)),t}}function kq(e){return eE(e)||yD(e)||hD(e)||eP(e)||Ru(e)||Bu(e)||wD(e)||CD(e)||bD(e)||vD(e)||nE(e)||mD(e)||fD(e)||CP(e)||uE(e)||oE(e)||SD(e)||ND(e)||rP(e)||iP(e)||yP(e)||Mg(e)}function Tq(e){return Ru(e)||Bu(e)?function(t){const n=function(t){return $v(e)?t.errorModuleName?2===t.accessibility?Ca.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind?t.errorModuleName?2===t.accessibility?Ca.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?Ca.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:vD(e)||bD(e)?function(t){const n=function(t){return $v(e)?t.errorModuleName?2===t.accessibility?Ca.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind?t.errorModuleName?2===t.accessibility?Ca.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?Ca.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:Cq(e)}function Cq(e){return eE(e)||yD(e)||hD(e)||rP(e)||iP(e)||yP(e)||eP(e)||SD(e)?t:Ru(e)||Bu(e)?function(t){let n;n=178===e.kind?$v(e)?t.errorModuleName?Ca.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?Ca.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:$v(e)?t.errorModuleName?2===t.accessibility?Ca.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?2===t.accessibility?Ca.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1;return{diagnosticMessage:n,errorNode:e.name,typeName:e.name}}:wD(e)||CD(e)||bD(e)||vD(e)||nE(e)||ND(e)?function(t){let n;switch(e.kind){case 180:n=t.errorModuleName?Ca.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 179:n=t.errorModuleName?Ca.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 181:n=t.errorModuleName?Ca.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 174:case 173:n=$v(e)?t.errorModuleName?2===t.accessibility?Ca.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:Ca.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:263===e.parent.kind?t.errorModuleName?2===t.accessibility?Ca.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:Ca.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t.errorModuleName?Ca.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 262:n=t.errorModuleName?2===t.accessibility?Ca.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:Ca.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:Ca.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return Tn.fail("This is unknown kind for signature: "+e.kind)}return{diagnosticMessage:n,errorNode:e.name||e}}:mD(e)?lc(e,e.parent)&&Wv(e.parent,2)?t:function(t){const n=function(t){switch(e.parent.kind){case 176:return t.errorModuleName?2===t.accessibility?Ca.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 180:case 185:return t.errorModuleName?Ca.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 179:return t.errorModuleName?Ca.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 181:return t.errorModuleName?Ca.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 174:case 173:return $v(e.parent)?t.errorModuleName?2===t.accessibility?Ca.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:263===e.parent.parent.kind?t.errorModuleName?2===t.accessibility?Ca.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?Ca.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 262:case 184:return t.errorModuleName?2===t.accessibility?Ca.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 178:case 177:return t.errorModuleName?2===t.accessibility?Ca.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:Ca.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return Tn.fail(`Unknown parent for parameter: ${Tn.formatSyntaxKind(e.parent.kind)}`)}}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:fD(e)?function(){let t;switch(e.parent.kind){case 263:t=Ca.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 264:t=Ca.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 200:t=Ca.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 185:case 180:t=Ca.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 179:t=Ca.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 174:case 173:t=$v(e.parent)?Ca.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:263===e.parent.parent.kind?Ca.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:Ca.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:case 262:t=Ca.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 195:t=Ca.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;break;case 265:t=Ca.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return Tn.fail("This is unknown parent for type parameter: "+e.parent.kind)}return{diagnosticMessage:t,errorNode:e,typeName:e.name}}:CP(e)?function(){let t;t=rE(e.parent.parent)?WE(e.parent)&&119===e.parent.token?Ca.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.parent.parent.name?Ca.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:Ca.extends_clause_of_exported_class_has_or_is_using_private_name_0:Ca.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;return{diagnosticMessage:t,errorNode:e,typeName:jc(e.parent.parent)}}:uE(e)?function(){return{diagnosticMessage:Ca.Import_declaration_0_is_using_private_name_1,errorNode:e,typeName:e.name}}:oE(e)||Mg(e)?function(t){return{diagnosticMessage:t.errorModuleName?Ca.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:Ca.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:Mg(e)?Tn.checkDefined(e.typeExpression):e.type,typeName:Mg(e)?jc(e):e.name}}:Tn.assertNever(e,`Attempted to set a declaration diagnostic context for unhandled node kind: ${Tn.formatSyntaxKind(e.kind)}`);function t(t){const n=function(t){return 260===e.kind||208===e.kind?t.errorModuleName?2===t.accessibility?Ca.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:Ca.Exported_variable_0_has_or_is_using_private_name_1:172===e.kind||211===e.kind||212===e.kind||226===e.kind||171===e.kind||169===e.kind&&Wv(e.parent,2)?$v(e)?t.errorModuleName?2===t.accessibility?Ca.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind||169===e.kind?t.errorModuleName?2===t.accessibility?Ca.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:Ca.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:Ca.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?Ca.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:Ca.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}}function wq(e){const t={219:Ca.Add_a_return_type_to_the_function_expression,218:Ca.Add_a_return_type_to_the_function_expression,174:Ca.Add_a_return_type_to_the_method,177:Ca.Add_a_return_type_to_the_get_accessor_declaration,178:Ca.Add_a_type_to_parameter_of_the_set_accessor_declaration,262:Ca.Add_a_return_type_to_the_function_declaration,180:Ca.Add_a_return_type_to_the_function_declaration,169:Ca.Add_a_type_annotation_to_the_parameter_0,260:Ca.Add_a_type_annotation_to_the_variable_0,172:Ca.Add_a_type_annotation_to_the_property_0,171:Ca.Add_a_type_annotation_to_the_property_0,277:Ca.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it},n={218:Ca.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,262:Ca.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,219:Ca.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,174:Ca.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,180:Ca.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,177:Ca.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,178:Ca.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,169:Ca.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,260:Ca.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,172:Ca.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,171:Ca.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,167:Ca.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,305:Ca.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,304:Ca.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,209:Ca.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,277:Ca.Default_exports_can_t_be_inferred_with_isolatedDeclarations,230:Ca.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations};return function(r){if(xc(r,WE))return Vp(r,Ca.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);if((Af(r)||AD(r.parent))&&(u_(r)||Cb(r)))return function(e){const t=Vp(e,Ca.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations,tp(e,!1));return o(e,t),t}(r);switch(Tn.type(r),r.kind){case 177:case 178:return i(r);case 167:case 304:case 305:return function(e){const t=Vp(e,n[e.kind]);return o(e,t),t}(r);case 209:case 230:return function(e){const t=Vp(e,n[e.kind]);return o(e,t),t}(r);case 174:case 180:case 218:case 219:case 262:return function(e){const r=Vp(e,n[e.kind]);return o(e,r),ST(r,Vp(e,t[e.kind])),r}(r);case 208:return function(e){return Vp(e,Ca.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations)}(r);case 172:case 260:return function(e){const r=Vp(e,n[e.kind]),i=tp(e.name,!1);return ST(r,Vp(e,t[e.kind],i)),r}(r);case 169:return function(r){if(Ru(r.parent))return i(r.parent);const o=e.requiresAddingImplicitUndefined(r);if(!o&&r.initializer)return a(r.initializer);const s=o?Ca.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:n[r.kind],c=Vp(r,s),l=tp(r.name,!1);return ST(c,Vp(r,t[r.kind],l)),c}(r);case 303:return a(r.initializer);case 231:return function(e){return a(e,Ca.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)}(r);default:return a(r)}};function r(e){const t=xc(e,e=>kE(e)||wu(e)||eE(e)||yD(e)||mD(e));if(t)return kE(t)?t:HP(t)?xc(t,e=>g_(e)&&!SD(e)):wu(t)?void 0:t}function i(e){const{getAccessor:r,setAccessor:i}=Dv(e.symbol.declarations,e),o=Vp((Ru(e)?e.parameters[0]:e)??e,n[e.kind]);return i&&ST(o,Vp(i,t[i.kind])),r&&ST(o,Vp(r,t[r.kind])),o}function o(e,n){const i=r(e);if(i){const e=kE(i)||!i.name?"":tp(i.name,!1);ST(n,Vp(i,t[i.kind],e))}return n}function a(e,i){const o=r(e);let a;if(o){const r=kE(o)||!o.name?"":tp(o.name,!1);o===xc(e.parent,e=>kE(e)||(wu(e)?"quit":!lP(e)&&!cP(e)&&!wP(e)))?(a=Vp(e,i??n[o.kind]),ST(a,Vp(o,t[o.kind],r))):(a=Vp(e,i??Ca.Expression_type_can_t_be_inferred_with_isolatedDeclarations),ST(a,Vp(o,t[o.kind],r)),ST(a,Vp(e,Ca.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit)))}else a=Vp(e,i??Ca.Expression_type_can_t_be_inferred_with_isolatedDeclarations);return a}}function Nq(e,t,n){const r=e.getCompilerOptions(),i=O(_v(e,n),Um);return qq(t,e,aw,r,n?E(i,n)?[n]:p:i,[Pq],!1).diagnostics}var Dq=531469;function Pq(e){const t=()=>Tn.fail("Diagnostic emitted without context");let n,r,i,o,a=t,s=!0,c=!1,l=!1,_=!1,u=!1;const{factory:d}=e,f=e.getEmitHost(),m={trackSymbol:function(e,t,n){if(262144&e.flags)return!1;return A(T.isSymbolAccessible(e,t,n,!0))},reportInaccessibleThisError:function(){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,I(),"this"))},reportInaccessibleUniqueSymbolError:function(){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,I(),"unique symbol"))},reportCyclicStructureError:function(){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,I()))},reportPrivateInBaseOfClassExpression:function(t){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.Property_0_of_exported_class_expression_may_not_be_private_or_protected,t))},reportLikelyUnsafeImportRequiredError:function(t){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,I(),t))},reportTruncationError:function(){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))},moduleResolverHost:f,reportNonlocalAugmentation:function(t,n,r){var i;const o=null==(i=n.declarations)?void 0:i.find(e=>Dd(e)===t),a=O(r.declarations,e=>Dd(e)!==t);if(o&&a)for(const t of a)e.addDiagnostic(ST(Vp(t,Ca.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),Vp(o,Ca.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)))},reportNonSerializableProperty:function(t){(y||v)&&e.addDiagnostic(Vp(y||v,Ca.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized,t))},reportInferenceFallback:F};let y,v,b,x,S,k;const T=e.getEmitResolver(),C=e.getCompilerOptions(),w=wq(T),{stripInternal:N,isolatedDeclarations:D}=C;return function(p){if(307===p.kind&&p.isDeclarationFile)return p;if(308===p.kind){c=!0,x=[],S=[],k=[];let m=!1;const g=d.createBundle(M(p.sourceFiles,c=>{if(c.isDeclarationFile)return;if(m=m||c.hasNoDefaultLib,b=c,n=c,r=void 0,o=!1,i=new Map,a=t,_=!1,u=!1,h(c),af(c)||sf(c)){l=!1,s=!1;const t=Bm(c)?d.createNodeArray(j(c)):oJ(c.statements,oe,wu);return d.updateSourceFile(c,[d.createModuleDeclaration([d.createModifier(138)],d.createStringLiteral(ev(e.getEmitHost(),c)),d.createModuleBlock(vI(d.createNodeArray(re(t)),c.statements)))],!0,[],[],!1,[])}s=!0;const p=Bm(c)?d.createNodeArray(j(c)):oJ(c.statements,oe,wu);return d.updateSourceFile(c,re(p),!0,[],[],!1,[])})),y=Vo(Xo(Gq(p,f,!0).declarationFilePath));return g.syntheticFileReferences=C(y),g.syntheticTypeReferences=v(),g.syntheticLibReferences=T(),g.hasNoDefaultLib=m,g}let m;if(s=!0,_=!1,u=!1,n=p,b=p,a=t,c=!1,l=!1,o=!1,r=void 0,i=new Map,x=[],S=[],k=[],h(b),Bm(b))m=d.createNodeArray(j(p));else{const e=oJ(p.statements,oe,wu);m=vI(d.createNodeArray(re(e)),p.statements),tO(p)&&(!l||_&&!u)&&(m=vI(d.createNodeArray([...m,HF(d)]),m))}const g=Vo(Xo(Gq(p,f,!0).declarationFilePath));return d.updateSourceFile(p,m,!0,C(g),v(),p.hasNoDefaultLib,T());function h(e){x=ne(x,M(e.referencedFiles,t=>[e,t])),S=ne(S,e.typeReferenceDirectives),k=ne(k,e.libReferenceDirectives)}function y(e){const t={...e};return t.pos=-1,t.end=-1,t}function v(){return $(S,e=>{if(e.preserve)return y(e)})}function T(){return $(k,e=>{if(e.preserve)return y(e)})}function C(e){return $(x,([t,n])=>{if(!n.preserve)return;const r=f.getSourceFileFromReference(t,n);if(!r)return;let i;if(r.isDeclarationFile)i=r.fileName;else{if(c&&E(p.sourceFiles,r))return;const e=Gq(r,f,!0);i=e.declarationFilePath||e.jsFilePath||r.fileName}if(!i)return;const o=xa(e,i,f.getCurrentDirectory(),f.getCanonicalFileName,!1),a=y(n);return a.fileName=o,a})}};function P(t){T.getPropertiesOfContainerFunction(t).forEach(t=>{if(CC(t.valueDeclaration)){const n=yP(t.valueDeclaration)?t.valueDeclaration.left:t.valueDeclaration;e.addDiagnostic(Vp(n,Ca.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function))}})}function F(t){D&&!Bm(b)&&(eE(t)&&T.isExpandoFunctionDeclaration(t)?P(t):e.addDiagnostic(w(t)))}function A(t){if(0===t.accessibility){if(t.aliasesToMakeVisible)if(r)for(const e of t.aliasesToMakeVisible)he(r,e);else r=t.aliasesToMakeVisible}else if(3!==t.accessibility){const n=a(t);if(n)return n.typeName?e.addDiagnostic(Vp(t.errorNode||n.errorNode,n.diagnosticMessage,tp(n.typeName),t.errorSymbolName,t.errorModuleName)):e.addDiagnostic(Vp(t.errorNode||n.errorNode,n.diagnosticMessage,t.errorSymbolName,t.errorModuleName)),!0}return!1}function I(){return y?Rp(y):v&&jc(v)?Rp(jc(v)):v&&kE(v)?v.isExportEquals?"export=":"default":"(Missing)"}function j(e){const t=a;a=t=>t.errorNode&&kq(t.errorNode)?Cq(t.errorNode)(t):{diagnosticMessage:t.errorModuleName?Ca.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:Ca.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:t.errorNode||e};const n=T.getDeclarationStatementsForSourceFile(e,Dq,m);return a=t,n}function L(e){return 80===e.kind?e:207===e.kind?d.updateArrayBindingPattern(e,oJ(e.elements,t,L_)):d.updateObjectBindingPattern(e,oJ(e.elements,t,eP));function t(e){return 232===e.kind?e:(e.propertyName&&pD(e.propertyName)&&Cb(e.propertyName.expression)&&Q(e.propertyName.expression,n),d.updateBindingElement(e,e.dotDotDotToken,e.propertyName,L(e.name),void 0))}}function R(e,t,n){let r;o||(r=a,a=Cq(e));const i=d.updateParameterDeclaration(e,function(e,t,n,r){return e.createModifiersFromModifierFlags(Eq(t,n,r))}(d,e,t),e.dotDotDotToken,L(e.name),T.isOptionalParameter(e)?e.questionToken||d.createToken(58):void 0,U(e,n||e.type,!0),q(e));return o||(a=r),i}function B(e){return Aq(e)&&!!e.initializer&&T.isLiteralConstDeclaration(kc(e))}function q(e){if(B(e)){return jC(LC(e.initializer))||F(e),T.createLiteralConstValue(kc(e,Aq),m)}}function U(e,t,r){if(!r&&Vv(e,2))return;if(B(e))return;const i=169===e.kind&&T.requiresAddingImplicitUndefined(e);if(t&&!i)return iJ(t,ie,A_);let s,c;switch(y=e.name,o||(s=a,a=Cq(e)),e.kind){case 169:case 171:case 172:case 208:case 260:c=T.createTypeOfDeclaration(e,n,Dq,m);break;case 262:case 180:case 173:case 174:case 177:case 179:c=T.createReturnTypeOfSignatureDeclaration(e,n,Dq,m);break;default:Tn.assertNever(e)}return y=void 0,o||(a=s),c??d.createKeywordTypeNode(133)}function V(e){switch((e=kc(e)).kind){case 262:case 267:case 264:case 263:case 265:case 266:return!T.isDeclarationVisible(e);case 260:return!W(e);case 271:case 272:case 278:case 277:return!1;case 175:return!0}return!1}function W(e){return!TP(e)&&(O_(e.name)?ee(e.name.elements,W):T.isDeclarationVisible(e))}function H(e,t,n){if(Vv(e,2))return d.createNodeArray();const r=M(t,e=>R(e,n));return r?d.createNodeArray(r,t.hasTrailingComma):d.createNodeArray()}function K(e,t){let n;if(!t){const t=Sv(e);t&&(n=[R(t)])}if(TD(e)){let r;if(!t){const t=bv(e);if(t){r=R(t,void 0,me(e,Dv(nP(e.parent)?e.parent.properties:e.parent.members,e)))}}r||(r=d.createParameterDeclaration(void 0,void 0,"value")),n=pe(n,r)}return d.createNodeArray(n||p)}function G(e,t){return Vv(e,2)?void 0:oJ(t,ie,fD)}function X(e){return QE(e)||oE(e)||sE(e)||rE(e)||iE(e)||f_(e)||ND(e)||HD(e)}function Q(e,t){A(T.isEntityNameVisible(e,t))}function Y(e,t){return Ju(e)&&Ju(t)&&(e.jsDoc=t.jsDoc),kw(e,Sw(t))}function Z(t,n){if(n){if(l=l||267!==t.kind&&205!==t.kind,Ku(n)&&c){const n=nv(e.getEmitHost(),T,t);if(n)return d.createStringLiteral(n)}return n}}function te(e){const t=fV(e);return e&&void 0!==t?e:void 0}function re(e){for(;g(r);){const e=r.shift();if(!Ap(e))return Tn.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${Tn.formatSyntaxKind(e.kind)}`);const t=s;s=e.parent&&QE(e.parent)&&!(tO(e.parent)&&c);const n=ce(e);s=t,i.set(BJ(e),n)}return oJ(e,function(e){if(Ap(e)){const t=BJ(e);if(i.has(t)){const n=i.get(t);return i.delete(t),n&&((ct(n)?ee(n,cu):cu(n))&&(_=!0),QE(e.parent)&&(ct(n)?ee(n,lu):lu(n))&&(l=!0)),n}}return e},wu)}function ie(t){if(_e(t))return;if(ku(t)){if(V(t))return;if(Xh(t))if(D){if(rE(t.parent)||nP(t.parent))return void e.addDiagnostic(Vp(t,Ca.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));if((iE(t.parent)||ID(t.parent))&&!Cb(t.name.expression))return void e.addDiagnostic(Vp(t,Ca.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations))}else if(!T.isLateBound(kc(t))||!Cb(t.name.expression))return}if(f_(t)&&T.isImplementationOfOverload(t))return;if(OP(t))return;let r;X(t)&&(r=n,n=t);const i=a,s=kq(t),c=o;let l=(187===t.kind||200===t.kind)&&265!==t.parent.kind;if((bD(t)||vD(t))&&Vv(t,2)){if(t.symbol&&t.symbol.declarations&&t.symbol.declarations[0]!==t)return;return u(d.createPropertyDeclaration(fe(t),t.name,void 0,void 0,void 0))}if(s&&!o&&(a=Cq(t)),AD(t)&&Q(t.exprName,n),l&&(o=!0),function(e){switch(e.kind){case 180:case 176:case 174:case 177:case 178:case 172:case 171:case 173:case 179:case 181:case 260:case 168:case 233:case 183:case 194:case 184:case 185:case 205:return!0}return!1}(t))switch(t.kind){case 233:{(u_(t.expression)||Cb(t.expression))&&Q(t.expression,n);const r=fJ(t,ie,e);return u(d.updateExpressionWithTypeArguments(r,r.expression,r.typeArguments))}case 183:{Q(t.typeName,n);const r=fJ(t,ie,e);return u(d.updateTypeReferenceNode(r,r.typeName,r.typeArguments))}case 180:return u(d.updateConstructSignature(t,G(t,t.typeParameters),H(t,t.parameters),U(t,t.type)));case 176:return u(d.createConstructorDeclaration(fe(t),H(t,t.parameters,0),void 0));case 174:if(YN(t.name))return u(void 0);return u(d.createMethodDeclaration(fe(t),void 0,t.name,t.questionToken,G(t,t.typeParameters),H(t,t.parameters),U(t,t.type),void 0));case 177:{if(YN(t.name))return u(void 0);const e=me(t,Dv(nP(t.parent)?t.parent.properties:t.parent.members,t));return u(d.updateGetAccessorDeclaration(t,fe(t),t.name,K(t,Vv(t,2)),U(t,e),void 0))}case 178:return YN(t.name)?u(void 0):u(d.updateSetAccessorDeclaration(t,fe(t),t.name,K(t,Vv(t,2)),void 0));case 172:return YN(t.name)?u(void 0):u(d.updatePropertyDeclaration(t,fe(t),t.name,t.questionToken,U(t,t.type),q(t)));case 171:return YN(t.name)?u(void 0):u(d.updatePropertySignature(t,fe(t),t.name,t.questionToken,U(t,t.type)));case 173:return YN(t.name)?u(void 0):u(d.updateMethodSignature(t,fe(t),t.name,t.questionToken,G(t,t.typeParameters),H(t,t.parameters),U(t,t.type)));case 179:return u(d.updateCallSignature(t,G(t,t.typeParameters),H(t,t.parameters),U(t,t.type)));case 181:return u(d.updateIndexSignature(t,fe(t),H(t,t.parameters),iJ(t.type,ie,A_)||d.createKeywordTypeNode(133)));case 260:return O_(t.name)?le(t.name):(l=!0,o=!0,u(d.updateVariableDeclaration(t,t.name,void 0,U(t,t.type),q(t))));case 168:return 174===(_=t).parent.kind&&Vv(_.parent,2)&&(t.default||t.constraint)?u(d.updateTypeParameterDeclaration(t,t.modifiers,t.name,void 0,void 0)):u(fJ(t,ie,e));case 194:{const e=iJ(t.checkType,ie,A_),r=iJ(t.extendsType,ie,A_),i=n;n=t.trueType;const o=iJ(t.trueType,ie,A_);n=i;const a=iJ(t.falseType,ie,A_);return Tn.assert(e),Tn.assert(r),Tn.assert(o),Tn.assert(a),u(d.updateConditionalTypeNode(t,e,r,o,a))}case 184:return u(d.updateFunctionTypeNode(t,oJ(t.typeParameters,ie,fD),H(t,t.parameters),Tn.checkDefined(iJ(t.type,ie,A_))));case 185:return u(d.updateConstructorTypeNode(t,fe(t),oJ(t.typeParameters,ie,fD),H(t,t.parameters),Tn.checkDefined(iJ(t.type,ie,A_))));case 205:return yf(t)?u(d.updateImportTypeNode(t,d.updateLiteralTypeNode(t.argument,Z(t,t.argument.literal)),t.attributes,t.qualifier,oJ(t.typeArguments,ie,A_),t.isTypeOf)):u(t);default:Tn.assertNever(t,`Attempted to process unhandled node kind: ${Tn.formatSyntaxKind(t.kind)}`)}var _;return jD(t)&&ns(b,t.pos).line===ns(b,t.end).line&&dw(t,1),u(fJ(t,ie,e));function u(e){return e&&s&&Xh(t)&&function(e){let t;o||(t=a,a=Tq(e));y=e.name,Tn.assert(Xh(e));const r=e;Q(r.name.expression,n),o||(a=t);y=void 0}(t),X(t)&&(n=r),s&&!o&&(a=i),l&&(o=c),e===t?e:e&&cw(Y(e,t),t)}}function oe(e){if(!function(e){switch(e.kind){case 262:case 267:case 271:case 264:case 263:case 265:case 266:case 243:case 272:case 278:case 277:return!0}return!1}(e))return;if(_e(e))return;switch(e.kind){case 278:return QE(e.parent)&&(l=!0),u=!0,d.updateExportDeclaration(e,e.modifiers,e.isTypeOnly,e.exportClause,Z(e,e.moduleSpecifier),te(e.attributes));case 277:if(QE(e.parent)&&(l=!0),u=!0,80===e.expression.kind)return e;{const t=d.createUniqueName("_default",16);a=()=>({diagnosticMessage:Ca.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:e}),v=e;const n=d.createVariableDeclaration(t,void 0,T.createTypeOfExpression(e.expression,e,Dq,m),void 0);v=void 0;const r=d.createVariableStatement(s?[d.createModifier(138)]:[],d.createVariableDeclarationList([n],2));return Y(r,e),uw(e),[r,d.updateExportAssignment(e,e.modifiers,t)]}}const t=ce(e);return i.set(BJ(e),t),e}function ae(e){if(uE(e)||Vv(e,2048)||!bI(e))return e;const t=d.createModifiersFromModifierFlags(131039&rb(e));return d.replaceModifiers(e,t)}function se(e,t,n,r){const i=d.updateModuleDeclaration(e,t,n,r);if(pp(i)||32&i.flags)return i;const o=d.createModuleDeclaration(i.modifiers,i.name,i.body,32|i.flags);return cw(o,i),vI(o,i),o}function ce(t){if(r)for(;en(r,t););if(_e(t))return;switch(t.kind){case 271:return function(e){if(T.isDeclarationVisible(e)){if(283===e.moduleReference.kind){const t=jm(e);return d.updateImportEqualsDeclaration(e,e.modifiers,e.isTypeOnly,e.name,d.updateExternalModuleReference(e.moduleReference,Z(e,t)))}{const t=a;return a=Cq(e),Q(e.moduleReference,n),a=t,e}}}(t);case 272:return function(t){if(!t.importClause)return d.updateImportDeclaration(t,t.modifiers,t.importClause,Z(t,t.moduleSpecifier),te(t.attributes));const n=t.importClause&&t.importClause.name&&T.isDeclarationVisible(t.importClause)?t.importClause.name:void 0;if(!t.importClause.namedBindings)return n&&d.updateImportDeclaration(t,t.modifiers,d.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,void 0),Z(t,t.moduleSpecifier),te(t.attributes));if(274===t.importClause.namedBindings.kind){const e=T.isDeclarationVisible(t.importClause.namedBindings)?t.importClause.namedBindings:void 0;return n||e?d.updateImportDeclaration(t,t.modifiers,d.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,e),Z(t,t.moduleSpecifier),te(t.attributes)):void 0}const r=$(t.importClause.namedBindings.elements,e=>T.isDeclarationVisible(e)?e:void 0);return r&&r.length||n?d.updateImportDeclaration(t,t.modifiers,d.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,r&&r.length?d.updateNamedImports(t.importClause.namedBindings,r):void 0),Z(t,t.moduleSpecifier),te(t.attributes)):T.isImportRequiredByAugmentation(t)?(D&&e.addDiagnostic(Vp(t,Ca.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)),d.updateImportDeclaration(t,t.modifiers,void 0,Z(t,t.moduleSpecifier),te(t.attributes))):void 0}(t)}if(ku(t)&&V(t))return;if(JF(t))return;if(f_(t)&&T.isImplementationOfOverload(t))return;let o;X(t)&&(o=n,n=t);const c=kq(t),p=a;c&&(a=Cq(t));const f=s;switch(t.kind){case 265:{s=!1;const e=b(d.updateTypeAliasDeclaration(t,fe(t),t.name,oJ(t.typeParameters,ie,fD),Tn.checkDefined(iJ(t.type,ie,A_))));return s=f,e}case 264:return b(d.updateInterfaceDeclaration(t,fe(t),t.name,G(t,t.typeParameters),ge(t.heritageClauses),oJ(t.members,ie,P_)));case 262:{const e=b(d.updateFunctionDeclaration(t,fe(t),void 0,t.name,G(t,t.typeParameters),H(t,t.parameters),U(t,t.type),void 0));if(e&&T.isExpandoFunctionDeclaration(t)&&function(e){var t;if(e.body)return!0;const n=null==(t=e.symbol.declarations)?void 0:t.filter(e=>nE(e)&&!e.body);return!n||n.indexOf(e)===n.length-1}(t)){const r=T.getPropertiesOfContainerFunction(t);D&&P(t);const i=kI.createModuleDeclaration(void 0,e.name||d.createIdentifier("_default"),d.createModuleBlock([]),32);qT(i,n),i.locals=ad(r),i.symbol=r[0].parent;const o=[];let s=$(r,e=>{if(!CC(e.valueDeclaration))return;const t=Cc(e.escapedName);if(!Es(t,99))return;a=Cq(e.valueDeclaration);const n=T.createTypeOfDeclaration(e.valueDeclaration,i,-2147483648|Dq,m);a=p;const r=zh(t),s=r?d.getGeneratedNameForNode(e.valueDeclaration):d.createIdentifier(t);r&&o.push([s,t]);const c=d.createVariableDeclaration(s,void 0,n,void 0);return d.createVariableStatement(r?void 0:[d.createToken(95)],d.createVariableDeclarationList([c]))});o.length?s.push(d.createExportDeclaration(void 0,!1,d.createNamedExports(M(o,([e,t])=>d.createExportSpecifier(!1,e,t))))):s=$(s,e=>d.replaceModifiers(e,0));const c=d.createModuleDeclaration(fe(t),t.name,d.createModuleBlock(s),32);if(!Vv(e,2048))return[e,c];const _=d.createModifiersFromModifierFlags(-2081&rb(e)|128),f=d.updateFunctionDeclaration(e,_,void 0,e.name,e.typeParameters,e.parameters,e.type,void 0),g=d.updateModuleDeclaration(c,_,c.name,c.body),h=d.createExportAssignment(void 0,!1,c.name);return QE(t.parent)&&(l=!0),u=!0,[f,g,h]}return e}case 267:{s=!1;const e=t.body;if(e&&268===e.kind){const n=_,r=u;u=!1,_=!1;let i=re(oJ(e.statements,oe,wu));33554432&t.flags&&(_=!1),vp(t)||function(e){return ee(e,de)}(i)||u||(i=_?d.createNodeArray([...i,HF(d)]):oJ(i,ae,wu));const o=d.updateModuleBlock(e,i);s=f,_=n,u=r;const a=fe(t);return b(se(t,a,bp(t)?Z(t,t.name):t.name,o))}{s=f;const n=fe(t);s=!1,iJ(e,oe);const r=BJ(e),o=i.get(r);return i.delete(r),b(se(t,n,t.name,o))}}case 263:{y=t.name,v=t;const e=d.createNodeArray(fe(t)),n=G(t,t.typeParameters),r=vv(t);let i;if(r){const e=a;i=ue(z(r.parameters,e=>{if(Wv(e,31)&&!_e(e))return a=Cq(e),80===e.name.kind?Y(d.createPropertyDeclaration(fe(e),e.name,e.questionToken,U(e,e.type),q(e)),e):function t(n){let r;for(const i of n.elements)TP(i)||(O_(i.name)&&(r=ne(r,t(i.name))),r=r||[],r.push(d.createPropertyDeclaration(fe(e),i.name,void 0,U(i,void 0),void 0)));return r}(e.name)})),a=e}const o=ne(ne(ee(t.members,e=>!!e.name&&YN(e.name))?[d.createPropertyDeclaration(void 0,d.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:void 0,i),oJ(t.members,ie,x_)),c=d.createNodeArray(o),l=Dh(t);if(l&&!Cb(l.expression)&&106!==l.expression.kind){const r=t.name?Cc(t.name.escapedText):"default",i=d.createUniqueName(`${r}_base`,16);a=()=>({diagnosticMessage:Ca.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:l,typeName:t.name});const o=d.createVariableDeclaration(i,void 0,T.createTypeOfExpression(l.expression,t,Dq,m),void 0),_=d.createVariableStatement(s?[d.createModifier(138)]:[],d.createVariableDeclarationList([o],2)),u=d.createNodeArray(M(t.heritageClauses,e=>{if(96===e.token){const t=a;a=Cq(e.types[0]);const n=d.updateHeritageClause(e,M(e.types,e=>d.updateExpressionWithTypeArguments(e,i,oJ(e.typeArguments,ie,A_))));return a=t,n}return d.updateHeritageClause(e,oJ(d.createNodeArray(O(e.types,e=>Cb(e.expression)||106===e.expression.kind)),ie,CP))}));return[_,b(d.updateClassDeclaration(t,e,t.name,n,u,c))]}{const r=ge(t.heritageClauses);return b(d.updateClassDeclaration(t,e,t.name,n,r,c))}}case 243:return b(function(e){if(!h(e.declarationList.declarations,W))return;const t=oJ(e.declarationList.declarations,ie,eE);if(!g(t))return;const n=d.createNodeArray(fe(e));let r;uf(e.declarationList)||_f(e.declarationList)?(r=d.createVariableDeclarationList(t,2),cw(r,e.declarationList),vI(r,e.declarationList),kw(r,e.declarationList)):r=d.updateVariableDeclarationList(e.declarationList,t);return d.updateVariableStatement(e,n,r)}(t));case 266:return b(d.updateEnumDeclaration(t,d.createNodeArray(fe(t)),t.name,d.createNodeArray($(t.members,t=>{if(_e(t))return;const n=T.getEnumMemberValue(t),r=null==n?void 0:n.value;D&&t.initializer&&(null==n?void 0:n.hasExternalReferences)&&!pD(t.name)&&e.addDiagnostic(Vp(t,Ca.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));const i=void 0===r?void 0:"string"==typeof r?d.createStringLiteral(r):r<0?d.createPrefixUnaryExpression(41,d.createNumericLiteral(-r)):d.createNumericLiteral(r);return Y(d.updateEnumMember(t,t.name,i),t)}))))}return Tn.assertNever(t,`Unhandled top-level node in declaration emit: ${Tn.formatSyntaxKind(t.kind)}`);function b(e){return X(t)&&(n=o),c&&(a=p),267===t.kind&&(s=f),e===t?e:(v=void 0,y=void 0,e&&cw(Y(e,t),t))}}function le(e){return J($(e.elements,e=>function(e){if(232===e.kind)return;if(e.name){if(!W(e))return;return O_(e.name)?le(e.name):d.createVariableDeclaration(e.name,void 0,U(e,void 0),void 0)}}(e)))}function _e(e){return!!N&&!!e&&Zu(e,b)}function de(e){return kE(e)||TE(e)}function fe(e){const t=rb(e),n=function(e){let t=130030,n=s&&!function(e){if(264===e.kind)return!0;return!1}(e)?128:0;const r=307===e.parent.kind;(!r||c&&r&&tO(e.parent))&&(t^=128,n=0);return Eq(e,t,n)}(e);return t===n?aJ(e.modifiers,e=>dt(e,__),__):d.createModifiersFromModifierFlags(n)}function me(e,t){let n=Fq(e);return n||e===t.firstAccessor||(n=Fq(t.firstAccessor),a=Cq(t.firstAccessor)),!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=Fq(t.secondAccessor),a=Cq(t.secondAccessor)),n}function ge(e){return d.createNodeArray(O(M(e,e=>d.updateHeritageClause(e,oJ(d.createNodeArray(O(e.types,t=>Cb(t.expression)||96===e.token&&106===t.expression.kind)),ie,CP))),e=>e.types&&!!e.types.length))}}function Eq(e,t=131070,n=0){let r=rb(e)&t|n;return 2048&r&&!(32&r)&&(r^=32),2048&r&&128&r&&(r^=128),r}function Fq(e){if(e)return 177===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}function Aq(e){switch(e.kind){case 172:case 171:return!Vv(e,2);case 169:case 260:return!0}return!1}var Iq={scriptTransformers:p,declarationTransformers:p};function Oq(e,t,n){return{scriptTransformers:jq(e,t,n),declarationTransformers:Lq(t)}}function jq(e,t,n){if(n)return p;const r=OS(e),i=jS(e),o=GS(e),a=[];return ge(a,t&&M(t.before,Rq)),a.push(Kz),e.experimentalDecorators&&a.push(Yz),ck(e)&&a.push(dq),r<99&&a.push(aq),e.experimentalDecorators||!(r<99)&&o||a.push(Zz),a.push(Gz),r<8&&a.push(oq),r<7&&a.push(iq),r<6&&a.push(rq),r<5&&a.push(nq),r<4&&a.push(eq),r<3&&a.push(fq),r<2&&(a.push(gq),a.push(hq)),a.push(function(e){switch(e){case 99:case 7:case 6:case 5:case 200:return xq;case 4:return bq;case 100:case 199:return Sq;default:return yq}}(i)),ge(a,t&&M(t.after,Rq)),a}function Lq(e){const t=[];return t.push(Pq),ge(t,e&&M(e.afterDeclarations,Bq)),t}function Mq(e,t){return n=>{const r=e(n);return"function"==typeof r?t(n,r):function(e){return t=>YE(t)?e.transformBundle(t):e.transformSourceFile(t)}(r)}}function Rq(e){return Mq(e,qJ)}function Bq(e){return Mq(e,(e,t)=>t)}function Jq(e,t){return t}function zq(e,t,n){n(e,t)}function qq(e,t,n,r,i,o,a){var s,c;const l=new Array(357);let _,u,d,p,f,m=0,g=[],h=[],y=[],v=[],b=0,x=!1,S=[],k=0,T=Jq,C=zq,w=0;const N=[],D={factory:n,getCompilerOptions:()=>r,getEmitResolver:()=>e,getEmitHost:()=>t,getEmitHelperFactory:kt(()=>Xw(D)),startLexicalEnvironment:function(){Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),Tn.assert(!x,"Lexical environment is suspended."),g[b]=_,h[b]=u,y[b]=d,v[b]=m,b++,_=void 0,u=void 0,d=void 0,m=0},suspendLexicalEnvironment:function(){Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),Tn.assert(!x,"Lexical environment is already suspended."),x=!0},resumeLexicalEnvironment:function(){Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),Tn.assert(x,"Lexical environment is not suspended."),x=!1},endLexicalEnvironment:function(){let e;if(Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),Tn.assert(!x,"Lexical environment is suspended."),_||u||d){if(u&&(e=[...u]),_){const t=n.createVariableStatement(void 0,n.createVariableDeclarationList(_));dw(t,2097152),e?e.push(t):e=[t]}d&&(e=e?[...e,...d]:[...d])}b--,_=g[b],u=h[b],d=y[b],m=v[b],0===b&&(g=[],h=[],y=[],v=[]);return e},setLexicalEnvironmentFlags:function(e,t){m=t?m|e:m&~e},getLexicalEnvironmentFlags:function(){return m},hoistVariableDeclaration:function(e){Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed.");const t=dw(n.createVariableDeclaration(e),128);_?_.push(t):_=[t];1&m&&(m|=2)},hoistFunctionDeclaration:function(e){Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),dw(e,2097152),u?u.push(e):u=[e]},addInitializationStatement:function(e){Tn.assert(w>0,"Cannot modify the lexical environment during initialization."),Tn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),dw(e,2097152),d?d.push(e):d=[e]},startBlockScope:function(){Tn.assert(w>0,"Cannot start a block scope during initialization."),Tn.assert(w<2,"Cannot start a block scope after transformation has completed."),S[k]=p,k++,p=void 0},endBlockScope:function(){Tn.assert(w>0,"Cannot end a block scope during initialization."),Tn.assert(w<2,"Cannot end a block scope after transformation has completed.");const e=ee(p)?[n.createVariableStatement(void 0,n.createVariableDeclarationList(p.map(e=>n.createVariableDeclaration(e)),1))]:void 0;k--,p=S[k],0===k&&(S=[]);return e},addBlockScopedVariable:function(e){Tn.assert(k>0,"Cannot add a block scoped variable outside of an iteration body."),(p||(p=[])).push(e)},requestEmitHelper:function e(t){if(Tn.assert(w>0,"Cannot modify the transformation context during initialization."),Tn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),Tn.assert(!t.scoped,"Cannot request a scoped emit helper."),t.dependencies)for(const n of t.dependencies)e(n);f=pe(f,t)},readEmitHelpers:function(){Tn.assert(w>0,"Cannot modify the transformation context during initialization."),Tn.assert(w<2,"Cannot modify the transformation context after transformation has completed.");const e=f;return f=void 0,e},enableSubstitution:function(e){Tn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=1},enableEmitNotification:function(e){Tn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=2},isSubstitutionEnabled:I,isEmitNotificationEnabled:O,get onSubstituteNode(){return T},set onSubstituteNode(e){Tn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),Tn.assert(void 0!==e,"Value must not be 'undefined'"),T=e},get onEmitNode(){return C},set onEmitNode(e){Tn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),Tn.assert(void 0!==e,"Value must not be 'undefined'"),C=e},addDiagnostic(e){N.push(e)}};for(const e of i)_w(Dd(kc(e)));gr("beforeTransform");const P=o.map(e=>e(D)),E=e=>{for(const t of P)e=t(e);return e};w=1;const F=[];for(const e of i)null==(s=cr)||s.push(cr.Phase.Emit,"transformNodes",307===e.kind?{path:e.path}:{kind:e.kind,pos:e.pos,end:e.end}),F.push((a?E:A)(e)),null==(c=cr)||c.pop();return w=2,gr("afterTransform"),hr("transformTime","beforeTransform","afterTransform"),{transformed:F,substituteNode:function(e,t){return Tn.assert(w<3,"Cannot substitute a node after the result is disposed."),t&&I(t)&&T(e,t)||t},emitNodeWithNotification:function(e,t,n){Tn.assert(w<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),t&&(O(t)?C(e,t,n):n(e,t))},isEmitNotificationEnabled:O,dispose:function(){if(w<3){for(const e of i)_w(Dd(kc(e)));_=void 0,g=void 0,u=void 0,h=void 0,T=void 0,C=void 0,f=void 0,w=3}},diagnostics:N};function A(e){return!e||QE(e)&&e.isDeclarationFile?e:E(e)}function I(e){return!(!(1&l[e.kind])||8&ip(e))}function O(e){return!!(2&l[e.kind])||!!(4&ip(e))}}var Uq={factory:aw,getCompilerOptions:()=>({}),getEmitResolver:St,getEmitHost:St,getEmitHelperFactory:St,startLexicalEnvironment:ft,resumeLexicalEnvironment:ft,suspendLexicalEnvironment:ft,endLexicalEnvironment:ht,setLexicalEnvironmentFlags:ft,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:ft,hoistFunctionDeclaration:ft,addInitializationStatement:ft,startBlockScope:ft,endBlockScope:ht,addBlockScopedVariable:ft,requestEmitHelper:ft,readEmitHelpers:St,enableSubstitution:ft,enableEmitNotification:ft,isSubstitutionEnabled:St,isEmitNotificationEnabled:St,onSubstituteNode:Jq,onEmitNode:zq,addDiagnostic:ft},Vq=function(){const e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e}();function Wq(e){return Ro(e,".tsbuildinfo")}function $q(e,t,n,r=!1,i,o){const a=ct(n)?n:_v(e,n,r),s=e.getCompilerOptions();if(s.outFile){if(a.length){const n=aw.createBundle(a),i=t(Gq(n,e,r),n);if(i)return i}}else{if(!i)for(const n of a){const i=t(Gq(n,e,r),n);if(i)return i}if(o){const e=Hq(s);if(e)return t({buildInfoPath:e},void 0)}}}function Hq(e){const t=e.configFilePath;if(!$S(e))return;if(e.tsBuildInfoFile)return e.tsBuildInfoFile;const n=e.outFile;let r;if(n)r=aT(n);else{if(!t)return;const n=aT(t);r=e.outDir?e.rootDir?Zo(e.outDir,ya(e.rootDir,n,!0)):Yo(e.outDir,Wo(n)):n}return r+".tsbuildinfo"}function Kq(e,t){const n=e.outFile,r=e.emitDeclarationOnly?void 0:n,i=r&&Xq(r,e),o=t||VS(e)?aT(n)+".d.ts":void 0;return{jsFilePath:r,sourceMapFilePath:i,declarationFilePath:o,declarationMapPath:o&&HS(e)?o+".map":void 0,buildInfoPath:Hq(e)}}function Gq(e,t,n){const r=t.getCompilerOptions();if(308===e.kind)return Kq(r,n);{const i=iv(e.fileName,t,Qq(e.fileName,r)),o=sf(e),a=o&&0===fa(e.fileName,i,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames()),s=r.emitDeclarationOnly||a?void 0:i,c=!s||sf(e)?void 0:Xq(s,r),l=n||VS(r)&&!o?ov(e.fileName,t):void 0;return{jsFilePath:s,sourceMapFilePath:c,declarationFilePath:l,declarationMapPath:l&&HS(r)?l+".map":void 0,buildInfoPath:void 0}}}function Xq(e,t){return t.sourceMap&&!t.inlineSourceMap?e+".map":void 0}function Qq(e,t){return Ro(e,".json")?".json":1===t.jsx&&Bo(e,[".jsx",".tsx"])?".jsx":Bo(e,[".mts",".mjs"])?".mjs":Bo(e,[".cts",".cjs"])?".cjs":".js"}function Yq(e,t,n,r){return n?Zo(n,ya(r(),e,t)):e}function Zq(e,t,n,r=()=>sU(t,n)){return eU(e,t.options,n,r)}function eU(e,t,n,r){return lT(Yq(e,n,t.declarationDir||t.outDir,r),sv(e))}function tU(e,t,n,r=()=>sU(t,n)){if(t.options.emitDeclarationOnly)return;const i=Ro(e,".json"),o=nU(e,t.options,n,r);return i&&0===fa(e,o,Tn.checkDefined(t.options.configFilePath),n)?void 0:o}function nU(e,t,n,r){return lT(Yq(e,n,t.outDir,r),Qq(e,t))}function rU(){let e;return{addOutput:function(t){t&&(e||(e=[])).push(t)},getOutputs:function(){return e||p}}}function iU(e,t){const{jsFilePath:n,sourceMapFilePath:r,declarationFilePath:i,declarationMapPath:o,buildInfoPath:a}=Kq(e.options,!1);t(n),t(r),t(i),t(o),t(a)}function oU(e,t,n,r,i){if(lO(t))return;const o=tU(t,e,n,i);if(r(o),!Ro(t,".json")&&(o&&e.options.sourceMap&&r(`${o}.map`),VS(e.options))){const o=Zq(t,e,n,i);r(o),e.options.declarationMap&&r(`${o}.map`)}}function aU(e,t,n,r,i){let o;return e.rootDir?(o=ta(e.rootDir,n),null==i||i(e.rootDir)):e.composite&&e.configFilePath?(o=Vo(Xo(e.configFilePath)),null==i||i(o)):o=zU(t(),n,r),o&&o[o.length-1]!==wo&&(o+=wo),o}function sU({options:e,fileNames:t},n){return aU(e,()=>O(t,t=>!(e.noEmitForJsFiles&&Bo(t,Uk)||lO(t))),Vo(Xo(Tn.checkDefined(e.configFilePath))),on(!n))}function cU(e,t){const{addOutput:n,getOutputs:r}=rU();if(e.options.outFile)iU(e,n);else{const r=kt(()=>sU(e,t));for(const i of e.fileNames)oU(e,i,t,n,r);n(Hq(e.options))}return r()}function lU(e,t,n){t=na(t),Tn.assert(E(e.fileNames,t),"Expected fileName to be present in command line");const{addOutput:r,getOutputs:i}=rU();return e.options.outFile?iU(e,r):oU(e,t,n,r),i()}function _U(e,t){if(e.options.outFile){const{jsFilePath:t,declarationFilePath:n}=Kq(e.options,!1);return Tn.checkDefined(t||n,`project ${e.options.configFilePath} expected to have at least one output`)}const n=kt(()=>sU(e,t));for(const r of e.fileNames){if(lO(r))continue;const i=tU(r,e,t,n);if(i)return i;if(!Ro(r,".json")&&VS(e.options))return Zq(r,e,t,n)}const r=Hq(e.options);return r||Tn.fail(`project ${e.options.configFilePath} expected to have at least one output`)}function uU(e,t){return!!t&&!!e}function dU(e,t,n,{scriptTransformers:r,declarationTransformers:i},o,a,s){var c=t.getCompilerOptions(),l=c.sourceMap||c.inlineSourceMap||HS(c)?[]:void 0,_=c.listEmittedFiles?[]:void 0,u=wy(),d=Xb(c),p=Xy(d),{enter:f,exit:m}=sr("printTime","beforePrint","afterPrint"),h=!1;return f(),$q(t,function({jsFilePath:a,sourceMapFilePath:l,declarationFilePath:d,declarationMapPath:p,buildInfoPath:f},m){var b,x,S,k,T,C;null==(b=cr)||b.push(cr.Phase.Emit,"emitJsFileOrBundle",{jsFilePath:a}),function(n,i,a){if(!n||o||!i)return;if(t.isEmitBlocked(i)||c.noEmit)return void(h=!0);(QE(n)?[n]:O(n.sourceFiles,Um)).forEach(t=>{!c.noCheck&&NT(t,c)||GI(t,t=>!uE(t)||32&ob(t)?dE(t)?"skip":void e.markLinkedReferences(t):"skip")});const s=qq(e,t,aw,c,[n],r,!1),l=xU({removeComments:c.removeComments,newLine:c.newLine,noEmitHelpers:c.noEmitHelpers,module:jS(c),target:OS(c),sourceMap:c.sourceMap,inlineSourceMap:c.inlineSourceMap,inlineSources:c.inlineSources,extendedDiagnostics:c.extendedDiagnostics},{hasGlobalName:e.hasGlobalName,onEmitNode:s.emitNodeWithNotification,isEmitNotificationEnabled:s.isEmitNotificationEnabled,substituteNode:s.substituteNode});Tn.assert(1===s.transformed.length,"Should only see one output from the transform"),v(i,a,s,l,c),s.dispose(),_&&(_.push(i),a&&_.push(a))}(m,a,l),null==(x=cr)||x.pop(),null==(S=cr)||S.push(cr.Phase.Emit,"emitDeclarationFileOrBundle",{declarationFilePath:d}),function(n,r,a){if(!n||0===o)return;if(!r)return void((o||c.emitDeclarationOnly)&&(h=!0));const l=QE(n)?[n]:n.sourceFiles,d=s?l:O(l,Um),p=c.outFile?[aw.createBundle(d)]:d;d.forEach(e=>{(o&&!VS(c)||c.noCheck||uU(o,s)||!NT(e,c))&&y(e)});const f=qq(e,t,aw,c,p,i,!1);if(g(f.diagnostics))for(const e of f.diagnostics)u.add(e);const m=!!f.diagnostics&&!!f.diagnostics.length||!!t.isEmitBlocked(r)||!!c.noEmit;if(h=h||m,!m||s){Tn.assert(1===f.transformed.length,"Should only see one output from the decl transform");const t={removeComments:c.removeComments,newLine:c.newLine,noEmitHelpers:!0,module:c.module,target:c.target,sourceMap:!s&&c.declarationMap,inlineSourceMap:c.inlineSourceMap,extendedDiagnostics:c.extendedDiagnostics,onlyPrintJsDocStyle:!0,omitBraceSourceMapPositions:!0};v(r,a,f,xU(t,{hasGlobalName:e.hasGlobalName,onEmitNode:f.emitNodeWithNotification,isEmitNotificationEnabled:f.isEmitNotificationEnabled,substituteNode:f.substituteNode}),{sourceMap:t.sourceMap,sourceRoot:c.sourceRoot,mapRoot:c.mapRoot,extendedDiagnostics:c.extendedDiagnostics}),_&&(_.push(r),a&&_.push(a))}f.dispose()}(m,d,p),null==(k=cr)||k.pop(),null==(T=cr)||T.push(cr.Phase.Emit,"emitBuildInfo",{buildInfoPath:f}),function(e){if(!e||n||h)return;if(t.isEmitBlocked(e))return void(h=!0);const r=t.getBuildInfo()||pU(void 0);fv(t,u,e,fU(r),!1,void 0,{buildInfo:r}),null==_||_.push(e)}(f),null==(C=cr)||C.pop()},_v(t,n,s),s,a,!n),m(),{emitSkipped:h,diagnostics:u.getDiagnostics(),emittedFiles:_,sourceMaps:l};function y(t){kE(t)?80===t.expression.kind&&e.collectLinkedAliases(t.expression,!0):wE(t)?e.collectLinkedAliases(t.propertyName||t.name,!0):KI(t,y)}function v(e,n,r,i,o){const a=r.transformed[0],s=308===a.kind?a:void 0,_=307===a.kind?a:void 0,f=s?s.sourceFiles:[_];let m,g;if(function(e,t){return(e.sourceMap||e.inlineSourceMap)&&(307!==t.kind||!Ro(t.fileName,".json"))}(o,a)&&(m=hJ(t,Wo(Xo(e)),function(e){const t=Xo(e.sourceRoot||"");return t?aa(t):t}(o),function(e,n,r){if(e.sourceRoot)return t.getCommonSourceDirectory();if(e.mapRoot){let n=Xo(e.mapRoot);return r&&(n=Vo(dv(r.fileName,t,n))),0===Uo(n)&&(n=Yo(t.getCommonSourceDirectory(),n)),n}return Vo(na(n))}(o,e,_),o)),s?i.writeBundle(s,p,m):i.writeFile(_,p,m),m){l&&l.push({inputSourceFileNames:m.getSources(),sourceMap:m.toJSON()});const r=function(e,n,r,i,o){if(e.inlineSourceMap){const e=n.toString();return`data:application/json;base64,${qb(To,e)}`}const a=Wo(Xo(Tn.checkDefined(i)));if(e.mapRoot){let n=Xo(e.mapRoot);return o&&(n=Vo(dv(o.fileName,t,n))),0===Uo(n)?(n=Yo(t.getCommonSourceDirectory(),n),encodeURI(xa(Vo(na(r)),Yo(n,a),t.getCurrentDirectory(),t.getCanonicalFileName,!0))):encodeURI(Yo(n,a))}return encodeURI(a)}(o,m,e,n,_);if(r&&(p.isAtStartOfLine()||p.rawWrite(d),g=p.getTextPos(),p.writeComment(`//# sourceMappingURL=${r}`)),n){const e=m.toString();fv(t,u,n,e,!1,f)}}else p.writeLine();const h=p.getText();fv(t,u,e,h,!!c.emitBOM,f,{sourceMapUrlPos:g,diagnostics:r.diagnostics}),p.clear()}}function pU(e){return{program:e,version:u}}function fU(e){return JSON.stringify(e)}function mU(e,t){return Vb(e,t)}var gU={hasGlobalName:St,getReferencedExportContainer:St,getReferencedImportDeclaration:St,getReferencedDeclarationWithCollidingName:St,isDeclarationWithCollidingName:St,isValueAliasDeclaration:St,isReferencedAliasDeclaration:St,isTopLevelValueImportEqualsWithEntityName:St,hasNodeCheckFlag:St,isDeclarationVisible:St,isLateBound:e=>!1,collectLinkedAliases:St,markLinkedReferences:St,isImplementationOfOverload:St,requiresAddingImplicitUndefined:St,isExpandoFunctionDeclaration:St,getPropertiesOfContainerFunction:St,createTypeOfDeclaration:St,createReturnTypeOfSignatureDeclaration:St,createTypeOfExpression:St,createLiteralConstValue:St,isSymbolAccessible:St,isEntityNameVisible:St,getConstantValue:St,getEnumMemberValue:St,getReferencedValueDeclaration:St,getReferencedValueDeclarations:St,getTypeReferenceSerializationKind:St,isOptionalParameter:St,isArgumentsLocalBinding:St,getExternalModuleFileFromDeclaration:St,isLiteralConstDeclaration:St,getJsxFactoryEntity:St,getJsxFragmentFactoryEntity:St,isBindingCapturedByNode:St,getDeclarationStatementsForSourceFile:St,isImportRequiredByAugmentation:St},hU=kt(()=>xU({})),yU=kt(()=>xU({removeComments:!0})),vU=kt(()=>xU({removeComments:!0,neverAsciiEscape:!0})),bU=kt(()=>xU({removeComments:!0,omitTrailingSemicolon:!0}));function xU(e={},t={}){var n,r,i,o,a,s,c,l,_,u,d,p,f,m,g,y,v,b,x,S,k,C,w,D,P,E,{hasGlobalName:F,onEmitNode:A=zq,isEmitNotificationEnabled:I,substituteNode:O=Jq,onBeforeEmitNode:j,onAfterEmitNode:L,onBeforeEmitNodeArray:M,onAfterEmitNodeArray:R,onBeforeEmitToken:B,onAfterEmitToken:J}=t,z=!!e.extendedDiagnostics,q=!!e.omitBraceSourceMapPositions,U=Xb(e),V=jS(e),W=new Map,$=e.preserveSourceNewlines,H=function(e){v.write(e)},K=!0,G=-1,X=-1,Q=-1,Y=-1,Z=-1,te=!1,ne=!!e.removeComments,{enter:re,exit:ie}=ar(z,"commentTime","beforeComment","afterComment"),oe=aw.parenthesizer,ae={select:e=>0===e?oe.parenthesizeLeadingTypeArgument:void 0},se=function(){return rI(function(e,t){if(t){t.stackIndex++,t.preserveSourceNewlinesStack[t.stackIndex]=$,t.containerPosStack[t.stackIndex]=Q,t.containerEndStack[t.stackIndex]=Y,t.declarationListContainerEndStack[t.stackIndex]=Z;const n=t.shouldEmitCommentsStack[t.stackIndex]=Ie(e),r=t.shouldEmitSourceMapsStack[t.stackIndex]=Oe(e);null==j||j(e),n&&Gn(e),r&&yr(e),Ne(e)}else t={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return t},function(t,n,r){return e(t,r,"left")},function(e,t,n){const r=28!==e.kind,i=Cn(n,n.left,e),o=Cn(n,e,n.right);mn(i,r),cr(e.pos),un(e,103===e.kind?Zt:en),_r(e.end,!0),mn(o,!0)},function(t,n,r){return e(t,r,"right")},function(e,t){const n=Cn(e,e.left,e.operatorToken),r=Cn(e,e.operatorToken,e.right);if(gn(n,r),t.stackIndex>0){const n=t.preserveSourceNewlinesStack[t.stackIndex],r=t.containerPosStack[t.stackIndex],i=t.containerEndStack[t.stackIndex],o=t.declarationListContainerEndStack[t.stackIndex],a=t.shouldEmitCommentsStack[t.stackIndex],s=t.shouldEmitSourceMapsStack[t.stackIndex];De(n),s&&vr(e),a&&Xn(e,r,i,o),null==L||L(e),t.stackIndex--}},void 0);function e(e,t,n){const r="left"===n?oe.getParenthesizeLeftSideOfBinaryForOperator(t.operatorToken.kind):oe.getParenthesizeRightSideOfBinaryForOperator(t.operatorToken.kind);let i=je(0,1,e);if(i===Je&&(Tn.assertIsDefined(P),i=Le(1,1,e=r(pt(P,nu))),P=void 0),(i===Kn||i===hr||i===Re)&&yP(e))return e;E=r,i(1,e)}}();return ve(),{printNode:function(e,t,n){switch(e){case 0:Tn.assert(QE(t),"Expected a SourceFile node.");break;case 2:Tn.assert(QN(t),"Expected an Identifier node.");break;case 1:Tn.assert(nu(t),"Expected an Expression node.")}switch(t.kind){case 307:return le(t);case 308:return ce(t)}return _e(e,t,n,fe()),me()},printList:function(e,t,n){return ue(e,t,n,fe()),me()},printFile:le,printBundle:ce,writeNode:_e,writeList:ue,writeFile:pe,writeBundle:de};function ce(e){return de(e,fe(),void 0),me()}function le(e){return pe(e,fe(),void 0),me()}function _e(e,t,n,r){const i=v;ye(r,void 0),ge(e,t,n),ve(),v=i}function ue(e,t,n,r){const i=v;ye(r,void 0),n&&he(n),Wt(void 0,t,e),ve(),v=i}function de(e,t,n){x=!1;const r=v;var i;ye(t,n),Ft(e),Et(e),ze(e),Nt(!!(i=e).hasNoDefaultLib,i.syntheticFileReferences||[],i.syntheticTypeReferences||[],i.syntheticLibReferences||[]);for(const t of e.sourceFiles)ge(0,t,t);ve(),v=r}function pe(e,t,n){x=!0;const r=v;ye(t,n),Ft(e),Et(e),ge(0,e,e),ve(),v=r}function fe(){return b||(b=Xy(U))}function me(){const e=b.getText();return b.clear(),e}function ge(e,t,n){n&&he(n),Ae(e,t,void 0)}function he(e){n=e,w=void 0,D=void 0,e&&kr(e)}function ye(t,n){t&&e.omitTrailingSemicolon&&(t=Qy(t)),S=n,K=!(v=t)||!S}function ve(){r=[],i=[],o=[],a=new Set,s=[],c=new Map,l=[],_=0,u=[],d=0,p=[],f=void 0,m=[],g=void 0,n=void 0,w=void 0,D=void 0,ye(void 0,void 0)}function be(){return w||(w=Ya(Tn.checkDefined(n)))}function xe(e,t){void 0!==e&&Ae(4,e,t)}function ke(e){void 0!==e&&Ae(2,e,void 0)}function Te(e,t){void 0!==e&&Ae(1,e,t)}function we(e){Ae(ON(e)?6:4,e)}function Ne(e){$&&4&op(e)&&($=!1)}function De(e){$=e}function Ae(e,t,n){E=n;je(0,e,t)(e,t),E=void 0}function Ie(e){return!ne&&!QE(e)}function Oe(e){return!K&&!QE(e)&&!qm(e)}function je(e,t,n){switch(e){case 0:if(A!==zq&&(!I||I(n)))return Me;case 1:if(O!==Jq&&(P=O(t,n)||n)!==n)return E&&(P=E(P)),Je;case 2:if(Ie(n))return Kn;case 3:if(Oe(n))return hr;case 4:return Re;default:return Tn.assertNever(e)}}function Le(e,t,n){return je(e+1,t,n)}function Me(e,t){const n=Le(0,e,t);A(e,t,n)}function Re(e,t){if(null==j||j(t),$){const n=$;Ne(t),Be(e,t),De(n)}else Be(e,t);null==L||L(t),E=void 0}function Be(e,t,r=!0){if(r){const n=Rw(t);if(n)return function(e,t,n){switch(n.kind){case 1:!function(e,t,n){an(`\${${n.order}:`),Be(e,t,!1),an("}")}(e,t,n);break;case 0:!function(e,t,n){Tn.assert(242===t.kind,`A tab stop cannot be attached to a node of kind ${Tn.formatSyntaxKind(t.kind)}.`),Tn.assert(5!==e,"A tab stop cannot be attached to an embedded statement."),an(`$${n.order}`)}(e,t,n)}}(e,t,n)}if(0===e)return wt(pt(t,QE));if(2===e)return Ve(pt(t,QN));if(6===e)return Ue(pt(t,ON),!0);if(3===e)return function(e){xe(e.name),rn(),Zt("in"),rn(),xe(e.constraint)}(pt(t,fD));if(7===e)return function(e){Qt("{"),rn(),Zt(132===e.token?"assert":"with"),Qt(":"),rn();const t=e.elements;Wt(e,t,526226),rn(),Qt("}")}(pt(t,hE));if(5===e)return Tn.assertNode(t,MP),Ye(!0);if(4===e){switch(t.kind){case 16:case 17:case 18:return Ue(t,!1);case 80:return Ve(t);case 81:return We(t);case 166:return function(e){(function(e){80===e.kind?Te(e):xe(e)})(e.left),Qt("."),xe(e.right)}(t);case 167:return function(e){Qt("["),Te(e.expression,oe.parenthesizeExpressionOfComputedPropertyName),Qt("]")}(t);case 168:return function(e){Ot(e,e.modifiers),xe(e.name),e.constraint&&(rn(),Zt("extends"),rn(),xe(e.constraint));e.default&&(rn(),en("="),rn(),xe(e.default))}(t);case 169:return function(e){It(e,e.modifiers,!0),xe(e.dotDotDotToken),At(e.name,tn),xe(e.questionToken),e.parent&&317===e.parent.kind&&!e.name?xe(e.type):jt(e.type);Lt(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name?e.name.end:e.modifiers?e.modifiers.end:e.pos,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 170:return o=t,Qt("@"),void Te(o.expression,oe.parenthesizeLeftSideOfAccess);case 171:return function(e){Ot(e,e.modifiers),At(e.name,on),xe(e.questionToken),jt(e.type),Yt()}(t);case 172:return function(e){It(e,e.modifiers,!0),xe(e.name),xe(e.questionToken),xe(e.exclamationToken),jt(e.type),Lt(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name.end,e),Yt()}(t);case 173:return function(e){Ot(e,e.modifiers),xe(e.name),xe(e.questionToken),st(e,_t,lt)}(t);case 174:return function(e){It(e,e.modifiers,!0),xe(e.asteriskToken),xe(e.name),xe(e.questionToken),st(e,_t,ct)}(t);case 175:return function(e){Zt("static"),En(e),ut(e.body),Fn(e)}(t);case 176:return function(e){It(e,e.modifiers,!1),Zt("constructor"),st(e,_t,ct)}(t);case 177:case 178:return function(e){const t=It(e,e.modifiers,!0),n=177===e.kind?139:153;tt(n,t,Zt,e),rn(),xe(e.name),st(e,_t,ct)}(t);case 179:return function(e){st(e,_t,lt)}(t);case 180:return function(e){Zt("new"),rn(),st(e,_t,lt)}(t);case 181:return function(e){It(e,e.modifiers,!1),t=e,n=e.parameters,Wt(t,n,8848),jt(e.type),Yt();var t,n}(t);case 182:return function(e){e.assertsModifier&&(xe(e.assertsModifier),rn());xe(e.parameterName),e.type&&(rn(),Zt("is"),rn(),xe(e.type))}(t);case 183:return function(e){xe(e.typeName),Jt(e,e.typeArguments)}(t);case 184:return function(e){st(e,$e,He)}(t);case 185:return function(e){Ot(e,e.modifiers),Zt("new"),rn(),st(e,$e,He)}(t);case 186:return function(e){Zt("typeof"),rn(),xe(e.exprName),Jt(e,e.typeArguments)}(t);case 187:return function(e){En(e),h(e.members,jn),Qt("{");const t=1&ip(e)?768:32897;Wt(e,e.members,524288|t),Qt("}"),Fn(e)}(t);case 188:return function(e){xe(e.elementType,oe.parenthesizeNonArrayTypeOfPostfixType),Qt("["),Qt("]")}(t);case 189:return function(e){tt(23,e.pos,Qt,e);const t=1&ip(e)?528:657;Wt(e,e.elements,524288|t,oe.parenthesizeElementTypeOfTupleType),tt(24,e.elements.end,Qt,e)}(t);case 190:return function(e){xe(e.type,oe.parenthesizeTypeOfOptionalType),Qt("?")}(t);case 192:return function(e){Wt(e,e.types,516,oe.parenthesizeConstituentTypeOfUnionType)}(t);case 193:return function(e){Wt(e,e.types,520,oe.parenthesizeConstituentTypeOfIntersectionType)}(t);case 194:return function(e){xe(e.checkType,oe.parenthesizeCheckTypeOfConditionalType),rn(),Zt("extends"),rn(),xe(e.extendsType,oe.parenthesizeExtendsTypeOfConditionalType),rn(),Qt("?"),rn(),xe(e.trueType),rn(),Qt(":"),rn(),xe(e.falseType)}(t);case 195:return function(e){Zt("infer"),rn(),xe(e.typeParameter)}(t);case 196:return function(e){Qt("("),xe(e.type),Qt(")")}(t);case 233:return Xe(t);case 197:return void Zt("this");case 198:return function(e){dn(e.operator,Zt),rn();const t=148===e.operator?oe.parenthesizeOperandOfReadonlyTypeOperator:oe.parenthesizeOperandOfTypeOperator;xe(e.type,t)}(t);case 199:return function(e){xe(e.objectType,oe.parenthesizeNonArrayTypeOfPostfixType),Qt("["),xe(e.indexType),Qt("]")}(t);case 200:return function(e){const t=ip(e);Qt("{"),1&t?rn():(sn(),cn());e.readonlyToken&&(xe(e.readonlyToken),148!==e.readonlyToken.kind&&Zt("readonly"),rn());Qt("["),Ae(3,e.typeParameter),e.nameType&&(rn(),Zt("as"),rn(),xe(e.nameType));Qt("]"),e.questionToken&&(xe(e.questionToken),58!==e.questionToken.kind&&Qt("?"));Qt(":"),rn(),xe(e.type),Yt(),1&t?rn():(sn(),ln());Wt(e,e.members,2),Qt("}")}(t);case 201:return function(e){Te(e.literal)}(t);case 202:return function(e){xe(e.dotDotDotToken),xe(e.name),xe(e.questionToken),tt(59,e.name.end,Qt,e),rn(),xe(e.type)}(t);case 203:return function(e){xe(e.head),Wt(e,e.templateSpans,262144)}(t);case 204:return function(e){xe(e.type),xe(e.literal)}(t);case 205:return function(e){e.isTypeOf&&(Zt("typeof"),rn());Zt("import"),Qt("("),xe(e.argument),e.attributes&&(Qt(","),rn(),Ae(7,e.attributes));Qt(")"),e.qualifier&&(Qt("."),xe(e.qualifier));Jt(e,e.typeArguments)}(t);case 206:return function(e){Qt("{"),Wt(e,e.elements,525136),Qt("}")}(t);case 207:return function(e){Qt("["),Wt(e,e.elements,524880),Qt("]")}(t);case 208:return function(e){xe(e.dotDotDotToken),e.propertyName&&(xe(e.propertyName),Qt(":"),rn());xe(e.name),Lt(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 239:return function(e){Te(e.expression),xe(e.literal)}(t);case 240:return void Yt();case 241:return function(e){Qe(e,!e.multiLine&&wn(e))}(t);case 243:return function(e){It(e,e.modifiers,!1),xe(e.declarationList),Yt()}(t);case 242:return Ye(!1);case 244:return function(e){Te(e.expression,oe.parenthesizeExpressionOfExpressionStatement),n&&sf(n)&&!my(e.expression)||Yt()}(t);case 245:return function(e){const t=tt(101,e.pos,Zt,e);rn(),tt(21,t,Qt,e),Te(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.thenStatement),e.elseStatement&&(pn(e,e.thenStatement,e.elseStatement),tt(93,e.thenStatement.end,Zt,e),245===e.elseStatement.kind?(rn(),xe(e.elseStatement)):Bt(e,e.elseStatement))}(t);case 246:return function(e){tt(92,e.pos,Zt,e),Bt(e,e.statement),jP(e.statement)&&!$?rn():pn(e,e.statement,e.expression);Ze(e,e.statement.end),Yt()}(t);case 247:return function(e){Ze(e,e.pos),Bt(e,e.statement)}(t);case 248:return function(e){const t=tt(99,e.pos,Zt,e);rn();let n=tt(21,t,Qt,e);et(e.initializer),n=tt(27,e.initializer?e.initializer.end:n,Qt,e),Rt(e.condition),n=tt(27,e.condition?e.condition.end:n,Qt,e),Rt(e.incrementor),tt(22,e.incrementor?e.incrementor.end:n,Qt,e),Bt(e,e.statement)}(t);case 249:return function(e){const t=tt(99,e.pos,Zt,e);rn(),tt(21,t,Qt,e),et(e.initializer),rn(),tt(103,e.initializer.end,Zt,e),rn(),Te(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.statement)}(t);case 250:return function(e){const t=tt(99,e.pos,Zt,e);rn(),function(e){e&&(xe(e),rn())}(e.awaitModifier),tt(21,t,Qt,e),et(e.initializer),rn(),tt(165,e.initializer.end,Zt,e),rn(),Te(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.statement)}(t);case 251:return function(e){tt(88,e.pos,Zt,e),Mt(e.label),Yt()}(t);case 252:return function(e){tt(83,e.pos,Zt,e),Mt(e.label),Yt()}(t);case 253:return function(e){tt(107,e.pos,Zt,e),Rt(e.expression&&it(e.expression),it),Yt()}(t);case 254:return function(e){const t=tt(118,e.pos,Zt,e);rn(),tt(21,t,Qt,e),Te(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.statement)}(t);case 255:return function(e){const t=tt(109,e.pos,Zt,e);rn(),tt(21,t,Qt,e),Te(e.expression),tt(22,e.expression.end,Qt,e),rn(),xe(e.caseBlock)}(t);case 256:return function(e){xe(e.label),tt(59,e.label.end,Qt,e),rn(),xe(e.statement)}(t);case 257:return function(e){tt(111,e.pos,Zt,e),Rt(it(e.expression),it),Yt()}(t);case 258:return function(e){tt(113,e.pos,Zt,e),rn(),xe(e.tryBlock),e.catchClause&&(pn(e,e.tryBlock,e.catchClause),xe(e.catchClause));e.finallyBlock&&(pn(e,e.catchClause||e.tryBlock,e.finallyBlock),tt(98,(e.catchClause||e.tryBlock).end,Zt,e),rn(),xe(e.finallyBlock))}(t);case 259:return function(e){_n(89,e.pos,Zt),Yt()}(t);case 260:return function(e){var t,n,r;xe(e.name),xe(e.exclamationToken),jt(e.type),Lt(e.initializer,(null==(t=e.type)?void 0:t.end)??(null==(r=null==(n=e.name.emitNode)?void 0:n.typeNode)?void 0:r.end)??e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 261:return function(e){if(_f(e))Zt("await"),rn(),Zt("using");else{Zt(ff(e)?"let":df(e)?"const":uf(e)?"using":"var")}rn(),Wt(e,e.declarations,528)}(t);case 262:return function(e){at(e)}(t);case 263:return function(e){gt(e)}(t);case 264:return function(e){It(e,e.modifiers,!1),Zt("interface"),rn(),xe(e.name),zt(e,e.typeParameters),Wt(e,e.heritageClauses,512),rn(),Qt("{"),En(e),h(e.members,jn),Wt(e,e.members,129),Fn(e),Qt("}")}(t);case 265:return function(e){It(e,e.modifiers,!1),Zt("type"),rn(),xe(e.name),zt(e,e.typeParameters),rn(),Qt("="),rn(),xe(e.type),Yt()}(t);case 266:return function(e){It(e,e.modifiers,!1),Zt("enum"),rn(),xe(e.name),rn(),Qt("{"),Wt(e,e.members,145),Qt("}")}(t);case 267:return function(e){It(e,e.modifiers,!1),2048&~e.flags&&(Zt(32&e.flags?"namespace":"module"),rn());xe(e.name);let t=e.body;if(!t)return Yt();for(;t&&sE(t);)Qt("."),xe(t.name),t=t.body;rn(),xe(t)}(t);case 268:return function(e){En(e),h(e.statements,On),Qe(e,wn(e)),Fn(e)}(t);case 269:return function(e){tt(19,e.pos,Qt,e),Wt(e,e.clauses,129),tt(20,e.clauses.end,Qt,e,!0)}(t);case 270:return function(e){let t=tt(95,e.pos,Zt,e);rn(),t=tt(130,t,Zt,e),rn(),t=tt(145,t,Zt,e),rn(),xe(e.name),Yt()}(t);case 271:return function(e){It(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Zt,e),rn(),e.isTypeOnly&&(tt(156,e.pos,Zt,e),rn());xe(e.name),rn(),tt(64,e.name.end,Qt,e),rn(),function(e){80===e.kind?Te(e):xe(e)}(e.moduleReference),Yt()}(t);case 272:return function(e){It(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Zt,e),rn(),e.importClause&&(xe(e.importClause),rn(),tt(161,e.importClause.end,Zt,e),rn());Te(e.moduleSpecifier),e.attributes&&Mt(e.attributes);Yt()}(t);case 273:return function(e){e.isTypeOnly&&(tt(156,e.pos,Zt,e),rn());xe(e.name),e.name&&e.namedBindings&&(tt(28,e.name.end,Qt,e),rn());xe(e.namedBindings)}(t);case 274:return function(e){const t=tt(42,e.pos,Qt,e);rn(),tt(130,t,Zt,e),rn(),xe(e.name)}(t);case 280:return function(e){const t=tt(42,e.pos,Qt,e);rn(),tt(130,t,Zt,e),rn(),xe(e.name)}(t);case 275:case 279:return function(e){ht(e)}(t);case 276:case 281:return function(e){yt(e)}(t);case 277:return function(e){const t=tt(95,e.pos,Zt,e);rn(),e.isExportEquals?tt(64,t,en,e):tt(90,t,Zt,e);rn(),Te(e.expression,e.isExportEquals?oe.getParenthesizeRightSideOfBinaryForOperator(64):oe.parenthesizeExpressionOfExportDefault),Yt()}(t);case 278:return function(e){It(e,e.modifiers,!1);let t=tt(95,e.pos,Zt,e);rn(),e.isTypeOnly&&(t=tt(156,t,Zt,e),rn());e.exportClause?xe(e.exportClause):t=tt(42,t,Qt,e);if(e.moduleSpecifier){rn();tt(161,e.exportClause?e.exportClause.end:t,Zt,e),rn(),Te(e.moduleSpecifier)}e.attributes&&Mt(e.attributes);Yt()}(t);case 300:return function(e){tt(e.token,e.pos,Zt,e),rn();const t=e.elements;Wt(e,t,526226)}(t);case 301:return function(e){xe(e.name),Qt(":"),rn();const t=e.value;if(!(1024&ip(t))){_r(Sw(t).pos)}xe(t)}(t);case 282:case 319:case 330:case 331:case 333:case 334:case 335:case 336:case 353:return;case 283:return function(e){Zt("require"),Qt("("),Te(e.expression),Qt(")")}(t);case 12:return function(e){v.writeLiteral(e.text)}(t);case 286:case 289:return function(e){if(Qt("<"),IE(e)){const t=xn(e.tagName,e);vt(e.tagName),Jt(e,e.typeArguments),e.attributes.properties&&e.attributes.properties.length>0&&rn(),xe(e.attributes),Sn(e.attributes,e),gn(t)}Qt(">")}(t);case 287:case 290:return function(e){Qt("")}(t);case 291:return function(e){xe(e.name),function(e,t,n,r){n&&(t(e),r(n))}("=",Qt,e.initializer,we)}(t);case 292:return function(e){Wt(e,e.properties,262656)}(t);case 293:return function(e){Qt("{..."),Te(e.expression),Qt("}")}(t);case 294:return function(e){var t;if(e.expression||!ne&&!my(e)&&(r=e.pos,function(e){let t=!1;return xs((null==n?void 0:n.text)||"",e+1,()=>t=!0),t}(r)||function(e){let t=!1;return bs((null==n?void 0:n.text)||"",e+1,()=>t=!0),t}(r))){const r=n&&!my(e)&&ns(n,e.pos).line!==ns(n,e.end).line;r&&v.increaseIndent();const i=tt(19,e.pos,Qt,e);xe(e.dotDotDotToken),Te(e.expression),tt(20,(null==(t=e.expression)?void 0:t.end)||i,Qt,e),r&&v.decreaseIndent()}var r}(t);case 295:return function(e){ke(e.namespace),Qt(":"),ke(e.name)}(t);case 296:return function(e){tt(84,e.pos,Zt,e),rn(),Te(e.expression,oe.parenthesizeExpressionForDisallowedComma),bt(e,e.statements,e.expression.end)}(t);case 297:return function(e){const t=tt(90,e.pos,Zt,e);bt(e,e.statements,t)}(t);case 298:return function(e){rn(),dn(e.token,Zt),rn(),Wt(e,e.types,528)}(t);case 299:return function(e){const t=tt(85,e.pos,Zt,e);rn(),e.variableDeclaration&&(tt(21,t,Qt,e),xe(e.variableDeclaration),tt(22,e.variableDeclaration.end,Qt,e),rn());xe(e.block)}(t);case 303:return function(e){xe(e.name),Qt(":"),rn();const t=e.initializer;if(!(1024&ip(t))){_r(Sw(t).pos)}Te(t,oe.parenthesizeExpressionForDisallowedComma)}(t);case 304:return function(e){xe(e.name),e.objectAssignmentInitializer&&(rn(),Qt("="),rn(),Te(e.objectAssignmentInitializer,oe.parenthesizeExpressionForDisallowedComma))}(t);case 305:return function(e){e.expression&&(tt(26,e.pos,Qt,e),Te(e.expression,oe.parenthesizeExpressionForDisallowedComma))}(t);case 306:return function(e){xe(e.name),Lt(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 307:return wt(t);case 308:return Tn.fail("Bundles should be printed using printBundle");case 309:return Ct(t);case 310:return function(e){rn(),Qt("{"),xe(e.name),Qt("}")}(t);case 312:return Qt("*");case 313:return Qt("?");case 314:return function(e){Qt("?"),xe(e.type)}(t);case 315:return function(e){Qt("!"),xe(e.type)}(t);case 316:return function(e){xe(e.type),Qt("=")}(t);case 317:return function(e){Zt("function"),qt(e,e.parameters),Qt(":"),xe(e.type)}(t);case 191:case 318:return function(e){Qt("..."),xe(e.type)}(t);case 320:return function(e){if(H("/**"),e.comment){const t=bl(e.comment);if(t){const e=t.split(/\r\n?|\n/g);for(const t of e)sn(),rn(),Qt("*"),rn(),H(t)}}e.tags&&(1!==e.tags.length||344!==e.tags[0].kind||e.comment?Wt(e,e.tags,33):(rn(),xe(e.tags[0])));rn(),H("*/")}(t);case 322:return xt(t);case 323:return St(t);case 327:case 332:case 337:return kt((i=t).tagName),void Tt(i.comment);case 328:case 329:return function(e){kt(e.tagName),rn(),Qt("{"),xe(e.class),Qt("}"),Tt(e.comment)}(t);case 338:return function(e){kt(e.tagName),e.name&&(rn(),xe(e.name));Tt(e.comment),St(e.typeExpression)}(t);case 339:return function(e){Tt(e.comment),St(e.typeExpression)}(t);case 341:case 348:return function(e){kt(e.tagName),Ct(e.typeExpression),rn(),e.isBracketed&&Qt("[");xe(e.name),e.isBracketed&&Qt("]");Tt(e.comment)}(t);case 340:case 342:case 343:case 344:case 349:case 350:return function(e){kt(e.tagName),Ct(e.typeExpression),Tt(e.comment)}(t);case 345:return function(e){kt(e.tagName),Ct(e.constraint),rn(),Wt(e,e.typeParameters,528),Tt(e.comment)}(t);case 346:return function(e){kt(e.tagName),e.typeExpression&&(309===e.typeExpression.kind?Ct(e.typeExpression):(rn(),Qt("{"),H("Object"),e.typeExpression.isArrayType&&(Qt("["),Qt("]")),Qt("}")));e.fullName&&(rn(),xe(e.fullName));Tt(e.comment),e.typeExpression&&322===e.typeExpression.kind&&xt(e.typeExpression)}(t);case 347:return function(e){kt(e.tagName),xe(e.name),Tt(e.comment)}(t);case 351:return function(e){kt(e.tagName),rn(),e.importClause&&(xe(e.importClause),rn(),tt(161,e.importClause.end,Zt,e),rn());Te(e.moduleSpecifier),e.attributes&&Mt(e.attributes);Tt(e.comment)}(t)}if(nu(t)&&(e=1,O!==Jq)){const n=O(e,t)||t;n!==t&&(t=n,E&&(t=E(t)))}}var i,o;if(1===e)switch(t.kind){case 9:case 10:return function(e){Ue(e,!1)}(t);case 11:case 14:case 15:return Ue(t,!1);case 80:return Ve(t);case 81:return We(t);case 209:return function(e){const t=e.elements,n=e.multiLine?65536:0;$t(e,t,8914|n,oe.parenthesizeExpressionForDisallowedComma)}(t);case 210:return function(e){En(e),h(e.properties,jn);const t=131072&ip(e);t&&cn();const r=e.multiLine?65536:0,i=n&&n.languageVersion>=1&&!sf(n)?64:0;Wt(e,e.properties,526226|i|r),t&&ln();Fn(e)}(t);case 211:return function(e){Te(e.expression,oe.parenthesizeLeftSideOfAccess);const t=e.questionDotToken||BT(aw.createToken(25),e.expression.end,e.name.pos),n=Cn(e,e.expression,t),r=Cn(e,t,e.name);mn(n,!1);const i=29!==t.kind&&function(e){if(AN(e=Ol(e))){const t=Pn(e,!0,!1);return!(448&e.numericLiteralFlags||t.includes(Va(25))||t.includes(String.fromCharCode(69))||t.includes(String.fromCharCode(101)))}if(qx(e)){const t=Fw(e);return"number"==typeof t&&isFinite(t)&&t>=0&&Math.floor(t)===t}}(e.expression)&&!v.hasTrailingComment()&&!v.hasTrailingWhitespace();i&&Qt(".");e.questionDotToken?xe(t):tt(t.kind,e.expression.end,Qt,e);mn(r,!1),xe(e.name),gn(n,r)}(t);case 212:return function(e){Te(e.expression,oe.parenthesizeLeftSideOfAccess),xe(e.questionDotToken),tt(23,e.expression.end,Qt,e),Te(e.argumentExpression),tt(24,e.argumentExpression.end,Qt,e)}(t);case 213:return function(e){const t=16&op(e);t&&(Qt("("),Gt("0"),Qt(","),rn());Te(e.expression,oe.parenthesizeLeftSideOfAccess),t&&Qt(")");xe(e.questionDotToken),Jt(e,e.typeArguments),$t(e,e.arguments,2576,oe.parenthesizeExpressionForDisallowedComma)}(t);case 214:return function(e){tt(105,e.pos,Zt,e),rn(),Te(e.expression,oe.parenthesizeExpressionOfNew),Jt(e,e.typeArguments),$t(e,e.arguments,18960,oe.parenthesizeExpressionForDisallowedComma)}(t);case 215:return function(e){const t=16&op(e);t&&(Qt("("),Gt("0"),Qt(","),rn());Te(e.tag,oe.parenthesizeLeftSideOfAccess),t&&Qt(")");Jt(e,e.typeArguments),rn(),Te(e.template)}(t);case 216:return function(e){Qt("<"),xe(e.type),Qt(">"),Te(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 217:return function(e){const t=tt(21,e.pos,Qt,e),n=xn(e.expression,e);Te(e.expression,void 0),Sn(e.expression,e),gn(n),tt(22,e.expression?e.expression.end:t,Qt,e)}(t);case 218:return function(e){Ln(e.name),at(e)}(t);case 219:return function(e){Ot(e,e.modifiers),st(e,Ke,Ge)}(t);case 220:return function(e){tt(91,e.pos,Zt,e),rn(),Te(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 221:return function(e){tt(114,e.pos,Zt,e),rn(),Te(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 222:return function(e){tt(116,e.pos,Zt,e),rn(),Te(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 223:return function(e){tt(135,e.pos,Zt,e),rn(),Te(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 224:return function(e){dn(e.operator,en),function(e){const t=e.operand;return 224===t.kind&&(40===e.operator&&(40===t.operator||46===t.operator)||41===e.operator&&(41===t.operator||47===t.operator))}(e)&&rn();Te(e.operand,oe.parenthesizeOperandOfPrefixUnary)}(t);case 225:return function(e){Te(e.operand,oe.parenthesizeOperandOfPostfixUnary),dn(e.operator,en)}(t);case 226:return se(t);case 227:return function(e){const t=Cn(e,e.condition,e.questionToken),n=Cn(e,e.questionToken,e.whenTrue),r=Cn(e,e.whenTrue,e.colonToken),i=Cn(e,e.colonToken,e.whenFalse);Te(e.condition,oe.parenthesizeConditionOfConditionalExpression),mn(t,!0),xe(e.questionToken),mn(n,!0),Te(e.whenTrue,oe.parenthesizeBranchOfConditionalExpression),gn(t,n),mn(r,!0),xe(e.colonToken),mn(i,!0),Te(e.whenFalse,oe.parenthesizeBranchOfConditionalExpression),gn(r,i)}(t);case 228:return function(e){xe(e.head),Wt(e,e.templateSpans,262144)}(t);case 229:return function(e){tt(127,e.pos,Zt,e),xe(e.asteriskToken),Rt(e.expression&&it(e.expression),ot)}(t);case 230:return function(e){tt(26,e.pos,Qt,e),Te(e.expression,oe.parenthesizeExpressionForDisallowedComma)}(t);case 231:return function(e){Ln(e.name),gt(e)}(t);case 232:case 282:case 353:return;case 234:return function(e){Te(e.expression,void 0),e.type&&(rn(),Zt("as"),rn(),xe(e.type))}(t);case 235:return function(e){Te(e.expression,oe.parenthesizeLeftSideOfAccess),en("!")}(t);case 233:return Xe(t);case 238:return function(e){Te(e.expression,void 0),e.type&&(rn(),Zt("satisfies"),rn(),xe(e.type))}(t);case 236:return function(e){_n(e.keywordToken,e.pos,Qt),Qt("."),xe(e.name)}(t);case 237:return Tn.fail("SyntheticExpression should never be printed.");case 284:return function(e){xe(e.openingElement),Wt(e,e.children,262144),xe(e.closingElement)}(t);case 285:return function(e){Qt("<"),vt(e.tagName),Jt(e,e.typeArguments),rn(),xe(e.attributes),Qt("/>")}(t);case 288:return function(e){xe(e.openingFragment),Wt(e,e.children,262144),xe(e.closingFragment)}(t);case 352:return Tn.fail("SyntaxList should not be printed");case 354:return function(e){const t=ip(e);1024&t||e.pos===e.expression.pos||_r(e.expression.pos);Te(e.expression),2048&t||e.end===e.expression.end||cr(e.expression.end)}(t);case 355:return function(e){$t(e,e.elements,528,void 0)}(t);case 356:return Tn.fail("SyntheticReferenceExpression should not be printed")}return jh(t.kind)?un(t,Zt):zl(t.kind)?un(t,Qt):void Tn.fail(`Unhandled SyntaxKind: ${Tn.formatSyntaxKind(t.kind)}.`)}function Je(e,t){const n=Le(1,e,t);Tn.assertIsDefined(P),t=P,P=void 0,n(e,t)}function ze(t){let r=!1;const i=308===t.kind?t:void 0;if(i&&0===V)return;const o=i?i.sourceFiles.length:1;for(let a=0;a")}function He(e){rn(),xe(e.type)}function Ke(e){zt(e,e.typeParameters),Ut(e,e.parameters),jt(e.type),rn(),xe(e.equalsGreaterThanToken)}function Ge(e){jP(e.body)?ut(e.body):(rn(),Te(e.body,oe.parenthesizeConciseBodyOfArrowFunction))}function Xe(e){Te(e.expression,oe.parenthesizeLeftSideOfAccess),Jt(e,e.typeArguments)}function Qe(e,t){tt(19,e.pos,Qt,e);const n=t||1&ip(e)?768:129;Wt(e,e.statements,n),tt(20,e.statements.end,Qt,e,!!(1&n))}function Ye(e){e?Qt(";"):Yt()}function Ze(e,t){const n=tt(117,t,Zt,e);rn(),tt(21,n,Qt,e),Te(e.expression),tt(22,e.expression.end,Qt,e)}function et(e){void 0!==e&&(261===e.kind?xe(e):Te(e))}function tt(e,t,r,i,o){const a=kc(i),s=a&&a.kind===i.kind,c=t;if(s&&n&&(t=ds(n.text,t)),s&&i.pos!==c){const e=o&&n&&!dx(c,t,n);e&&cn(),cr(c),e&&ln()}if(t=q||19!==e&&20!==e?dn(e,r,t):_n(e,t,r,i),s&&i.end!==t){const e=294===i.kind;_r(t,!e,e)}return t}function nt(e){return 2===e.kind||!!e.hasTrailingNewLine}function rt(e){if(!n)return!1;const t=Cs(n.text,e.pos);if(t){const t=kc(e);if(t&&lP(t.parent))return!0}return!!ee(t,nt)||(!!ee(Tw(e),nt)||!!FP(e)&&(!(e.pos===e.expression.pos||!ee(ws(n.text,e.expression.pos),nt))||rt(e.expression)))}function it(e){if(!ne&&FP(e)&&rt(e)){const t=kc(e);if(t&&lP(t)){const n=aw.createParenthesizedExpression(e.expression);return cw(n,e),vI(n,t),n}return aw.createParenthesizedExpression(e)}return e}function ot(e){return it(oe.parenthesizeExpressionForDisallowedComma(e))}function at(e){It(e,e.modifiers,!1),Zt("function"),xe(e.asteriskToken),rn(),ke(e.name),st(e,_t,ct)}function st(e,t,n){const r=131072&ip(e);r&&cn(),En(e),h(e.parameters,On),t(e),n(e),Fn(e),r&&ln()}function ct(e){const t=e.body;t?ut(t):Yt()}function lt(e){Yt()}function _t(e){zt(e,e.typeParameters),qt(e,e.parameters),jt(e.type)}function ut(e){On(e),null==j||j(e),rn(),Qt("{"),cn();const t=function(e){if(1&ip(e))return!0;if(e.multiLine)return!1;if(!my(e)&&n&&!ix(e,n))return!1;if(hn(e,Ce(e.statements),2)||vn(e,Pe(e.statements),2,e.statements))return!1;let t;for(const n of e.statements){if(yn(t,n,2)>0)return!1;t=n}return!0}(e)?ft:mt;tr(e,e.statements,t),ln(),_n(20,e.statements.end,Qt,e),null==L||L(e)}function ft(e){mt(e,!0)}function mt(e,t){const n=Pt(e.statements),r=v.getTextPos();ze(e),0===n&&r===v.getTextPos()&&t?(ln(),Wt(e,e.statements,768),cn()):Wt(e,e.statements,1,void 0,n)}function gt(e){It(e,e.modifiers,!0),tt(86,tx(e).pos,Zt,e),e.name&&(rn(),ke(e.name));const t=131072&ip(e);t&&cn(),zt(e,e.typeParameters),Wt(e,e.heritageClauses,0),rn(),Qt("{"),En(e),h(e.members,jn),Wt(e,e.members,129),Fn(e),Qt("}"),t&&ln()}function ht(e){Qt("{"),Wt(e,e.elements,525136),Qt("}")}function yt(e){e.isTypeOnly&&(Zt("type"),rn()),e.propertyName&&(xe(e.propertyName),rn(),tt(130,e.propertyName.end,Zt,e),rn()),xe(e.name)}function vt(e){80===e.kind?Te(e):xe(e)}function bt(e,t,r){let i=163969;1===t.length&&(!n||my(e)||my(t[0])||ox(e,t[0],n))?(_n(59,r,Qt,e),rn(),i&=-130):tt(59,r,Qt,e),Wt(e,t,i)}function xt(e){Wt(e,aw.createNodeArray(e.jsDocPropertyTags),33)}function St(e){e.typeParameters&&Wt(e,aw.createNodeArray(e.typeParameters),33),e.parameters&&Wt(e,aw.createNodeArray(e.parameters),33),e.type&&(sn(),rn(),Qt("*"),rn(),xe(e.type))}function kt(e){Qt("@"),xe(e)}function Tt(e){const t=bl(e);t&&(rn(),H(t))}function Ct(e){e&&(rn(),Qt("{"),xe(e.type),Qt("}"))}function wt(e){sn();const t=e.statements;0===t.length||!vf(t[0])||my(t[0])?tr(e,t,Dt):Dt(e)}function Nt(e,t,r,i){if(e&&(nn('/// '),sn()),n&&n.moduleName&&(nn(`/// `),sn()),n&&n.amdDependencies)for(const e of n.amdDependencies)e.name?nn(`/// `):nn(`/// `),sn();function o(e,t){for(const n of t){const t=n.resolutionMode?`resolution-mode="${99===n.resolutionMode?"import":"require"}" `:"",r=n.preserve?'preserve="true" ':"";nn(`/// `),sn()}}o("path",t),o("types",r),o("lib",i)}function Dt(e){const t=e.statements;En(e),h(e.statements,On),ze(e);const n=N(t,e=>!vf(e));!function(e){e.isDeclarationFile&&Nt(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(e),Wt(e,t,1,void 0,-1===n?t.length:n),Fn(e)}function Pt(e,t,n){let r=!!t;for(let i=0;i=r.length||0===s;if(c&&32768&i)return null==M||M(r),void(null==R||R(r));15360&i&&(Qt(function(e){return Vq[15360&e][0]}(i)),c&&r&&_r(r.pos,!0)),null==M||M(r),c?!(1&i)||$&&(!t||n&&ix(t,n))?256&i&&!(524288&i)&&rn():sn():Kt(e,t,r,i,o,a,s,r.hasTrailingComma,r),null==R||R(r),15360&i&&(c&&r&&cr(r.end),Qt(function(e){return Vq[15360&e][1]}(i)))}function Kt(e,t,n,r,i,o,a,s,c){const l=!(262144&r);let _=l;const u=hn(t,n[o],r);u?(sn(u),_=!1):256&r&&rn(),128&r&&cn();const d=function(e,t){return 1===e.length?SU:"object"==typeof t?kU:TU}(e,i);let p,f=!1;for(let s=0;s0){if(131&r||(cn(),f=!0),_&&60&r&&!dT(a.pos)){_r(Sw(a).pos,!!(512&r),!0)}sn(e),_=!1}else p&&512&r&&rn()}if(_){_r(Sw(a).pos)}else _=l;y=a.pos,d(a,e,i,s),f&&(ln(),f=!1),p=a}const m=p?ip(p):0,g=ne||!!(2048&m),h=s&&64&r&&16&r;h&&(p&&!g?tt(28,p.end,Qt,p):Qt(",")),p&&(t?t.end:-1)!==p.end&&60&r&&!g&&cr(h&&(null==c?void 0:c.end)?c.end:p.end),128&r&&ln();const v=vn(t,n[o+a-1],r,c);v?sn(v):2097408&r&&rn()}function Gt(e){v.writeLiteral(e)}function Xt(e,t){v.writeSymbol(e,t)}function Qt(e){v.writePunctuation(e)}function Yt(){v.writeTrailingSemicolon(";")}function Zt(e){v.writeKeyword(e)}function en(e){v.writeOperator(e)}function tn(e){v.writeParameter(e)}function nn(e){v.writeComment(e)}function rn(){v.writeSpace(" ")}function on(e){v.writeProperty(e)}function an(e){v.nonEscapingWrite?v.nonEscapingWrite(e):v.write(e)}function sn(e=1){for(let t=0;t0)}function cn(){v.increaseIndent()}function ln(){v.decreaseIndent()}function _n(e,t,n,r){return K?dn(e,n,t):function(e,t,n,r,i){if(K||e&&qm(e))return i(t,n,r);const o=e&&e.emitNode,a=o&&o.flags||0,s=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[t],c=s&&s.source||k;r=br(c,s?s.pos:r),!(256&a)&&r>=0&&Sr(c,r);r=i(t,n,r),s&&(r=s.end);!(512&a)&&r>=0&&Sr(c,r);return r}(r,e,n,t,dn)}function un(e,t){B&&B(e),t(Va(e.kind)),J&&J(e)}function dn(e,t,n){const r=Va(e);return t(r),n<0?n:n+r.length}function pn(e,t,n){if(1&ip(e))rn();else if($){const r=Cn(e,t,n);r?sn(r):rn()}else sn()}function fn(e){const t=e.split(/\r\n?|\n/g),n=Hu(t);for(const e of t){const t=n?e.slice(n):e;t.length&&(sn(),H(t))}}function mn(e,t){e?(cn(),sn(e)):t&&rn()}function gn(e,t){e&&ln(),t&&ln()}function hn(e,t,r){if(2&r||$){if(65536&r)return 1;if(void 0===t)return!e||n&&ix(e,n)?0:1;if(t.pos===y)return 0;if(12===t.kind)return 0;if(n&&e&&!dT(e.pos)&&!my(t)&&(!t.parent||bc(t.parent)===bc(e)))return $?bn(r=>fx(t.pos,e.pos,n,r)):ox(e,t,n)?0:1;if(kn(t,r))return 1}return 1&r?1:0}function yn(e,t,r){if(2&r||$){if(void 0===e||void 0===t)return 0;if(12===t.kind)return 0;if(n&&!my(e)&&!my(t))return $&&function(e,t){if(t.pos-1&&r.indexOf(t)===i+1}(e,t)?bn(r=>lx(e,t,n,r)):!$&&(o=t,(i=bc(i=e)).parent&&i.parent===bc(o).parent)?cx(e,t,n)?0:1:65536&r?1:0;if(kn(e,r)||kn(t,r))return 1}else if(bw(t))return 1;var i,o;return 1&r?1:0}function vn(e,t,r,i){if(2&r||$){if(65536&r)return 1;if(void 0===t)return!e||n&&ix(e,n)?0:1;if(n&&e&&!dT(e.pos)&&!my(t)&&(!t.parent||t.parent===e)){if($){const r=i&&!dT(i.end)?i.end:t.end;return bn(t=>mx(r,e.end,n,t))}return ax(e,t,n)?0:1}if(kn(t,r))return 1}return 1&r&&!(131072&r)?1:0}function bn(e){Tn.assert(!!$);const t=e(!0);return 0===t?e(!1):t}function xn(e,t){const n=$&&hn(t,e,0);return n&&mn(n,!1),!!n}function Sn(e,t){const n=$&&vn(t,e,0,void 0);n&&sn(n)}function kn(e,t){if(my(e)){const n=bw(e);return void 0===n?!!(65536&t):n}return!!(65536&t)}function Cn(e,t,r){return 262144&ip(e)?0:(e=Nn(e),t=Nn(t),bw(r=Nn(r))?1:!n||my(e)||my(t)||my(r)?0:$?bn(e=>lx(t,r,n,e)):cx(t,r,n)?0:1)}function wn(e){return 0===e.statements.length&&(!n||cx(e,e,n))}function Nn(e){for(;217===e.kind&&my(e);)e=e.expression;return e}function Dn(e,t){if(n_(e)||r_(e))return Mn(e);if(ON(e)&&e.textSourceNode)return Dn(e.textSourceNode,t);const r=n,i=!!r&&!!e.parent&&!my(e);if(kl(e)){if(!i||Dd(e)!==bc(r))return wc(e)}else if(qE(e)){if(!i||Dd(e)!==bc(r))return xC(e)}else if(Tn.assertNode(e,Wl),!i)return e.text;return Yd(r,e,t)}function Pn(t,r,i){if(11===t.kind&&t.textSourceNode){const e=t.textSourceNode;if(QN(e)||YN(e)||AN(e)||qE(e)){const n=AN(e)?e.text:Dn(e);return i?`"${Vy(n)}"`:r||16777216&ip(t)?`"${My(n)}"`:`"${By(n)}"`}return Pn(e,r,i)}const o=(r?1:0)|(i?2:0)|(e.terminateUnterminatedLiterals?4:0)|(e.target&&e.target>=8?8:0);return cp(t,n,o)}function En(e){l.push(_),_=0,m.push(g),e&&1048576&ip(e)||(u.push(d),d=0,s.push(c),c=void 0,p.push(f))}function Fn(e){_=l.pop(),g=m.pop(),e&&1048576&ip(e)||(d=u.pop(),c=s.pop(),f=p.pop())}function An(e){f&&f!==Pe(p)||(f=new Set),f.add(e)}function In(e){g&&g!==Pe(m)||(g=new Set),g.add(e)}function On(e){if(e)switch(e.kind){case 241:case 296:case 297:h(e.statements,On);break;case 256:case 254:case 246:case 247:On(e.statement);break;case 245:On(e.thenStatement),On(e.elseStatement);break;case 248:case 250:case 249:On(e.initializer),On(e.statement);break;case 255:On(e.caseBlock);break;case 269:h(e.clauses,On);break;case 258:On(e.tryBlock),On(e.catchClause),On(e.finallyBlock);break;case 299:On(e.variableDeclaration),On(e.block);break;case 243:On(e.declarationList);break;case 261:h(e.declarations,On);break;case 260:case 169:case 208:case 263:case 274:case 280:Ln(e.name);break;case 262:Ln(e.name),1048576&ip(e)&&(h(e.parameters,On),On(e.body));break;case 206:case 207:case 275:h(e.elements,On);break;case 272:On(e.importClause);break;case 273:Ln(e.name),On(e.namedBindings);break;case 276:Ln(e.propertyName||e.name)}}function jn(e){if(e)switch(e.kind){case 303:case 304:case 172:case 171:case 174:case 173:case 177:case 178:Ln(e.name)}}function Ln(e){e&&(n_(e)||r_(e)?Mn(e):O_(e)&&On(e))}function Mn(e){const t=e.emitNode.autoGenerate;if(4==(7&t.flags))return Rn(cI(e),YN(e),t.flags,t.prefix,t.suffix);{const n=t.id;return o[n]||(o[n]=function(e){const t=e.emitNode.autoGenerate,n=lI(t.prefix,Mn),r=lI(t.suffix);switch(7&t.flags){case 1:return qn(0,!!(8&t.flags),YN(e),n,r);case 2:return Tn.assertNode(e,QN),qn(268435456,!!(8&t.flags),!1,n,r);case 3:return Un(wc(e),32&t.flags?Jn:Bn,!!(16&t.flags),!!(8&t.flags),YN(e),n,r)}return Tn.fail(`Unsupported GeneratedIdentifierKind: ${Tn.formatEnum(7&t.flags,Or,!0)}.`)}(e))}}function Rn(e,t,n,o,a){const s=KB(e),c=t?i:r;return c[s]||(c[s]=Hn(e,t,n??0,lI(o,Mn),lI(a)))}function Bn(e,t){return Jn(e,t)&&!function(e,t){let n,r;t?(n=g,r=m):(n=f,r=p);if(null==n?void 0:n.has(e))return!0;for(let t=r.length-1;t>=0;t--)if(n!==r[t]&&(n=r[t],null==n?void 0:n.has(e)))return!0;return!1}(e,t)&&!a.has(e)}function Jn(e,t){return!n||jd(n,e,F)}function zn(e,t){switch(e){case"":d=t;break;case"#":_=t;break;default:c??(c=new Map),c.set(e,t)}}function qn(e,t,n,r,i){r.length>0&&35===r.charCodeAt(0)&&(r=r.slice(1));const o=uI(n,r,"",i);let a=function(e){switch(e){case"":return d;case"#":return _;default:return(null==c?void 0:c.get(e))??0}}(o);if(e&&!(a&e)){const s=uI(n,r,268435456===e?"_i":"_n",i);if(Bn(s,n))return a|=e,n?In(s):t&&An(s),zn(o,a),s}for(;;){const e=268435455&a;if(a++,8!==e&&13!==e){const s=uI(n,r,e<26?"_"+String.fromCharCode(97+e):"_"+(e-26),i);if(Bn(s,n))return n?In(s):t&&An(s),zn(o,a),s}}}function Un(e,t=Bn,n,r,i,o,s){if(e.length>0&&35===e.charCodeAt(0)&&(e=e.slice(1)),o.length>0&&35===o.charCodeAt(0)&&(o=o.slice(1)),n){const n=uI(i,o,e,s);if(t(n,i))return i?In(n):r?An(n):a.add(n),n}95!==e.charCodeAt(e.length-1)&&(e+="_");let c=1;for(;;){const n=uI(i,o,e+c,s);if(t(n,i))return i?In(n):r?An(n):a.add(n),n;c++}}function Vn(e){return Un(e,Jn,!0,!1,!1,"","")}function Wn(e){const t=Dn(e.name);return function(e,t){for(let n=t;n&&hh(n,t);n=n.nextContainer)if(bu(n)&&n.locals){const t=n.locals.get(Tc(e));if(t&&3257279&t.flags)return!1}return!0}(t,dt(e,bu))?t:Un(t,Bn,!1,!1,!1,"","")}function $n(){return Un("default",Bn,!1,!1,!1,"","")}function Hn(e,t,n,r,i){switch(e.kind){case 80:case 81:return Un(Dn(e),Bn,!!(16&n),!!(8&n),t,r,i);case 267:case 266:return Tn.assert(!r&&!i&&!t),Wn(e);case 272:case 278:return Tn.assert(!r&&!i&&!t),function(e){const t=Fg(e);return Un(ON(t)?_p(t.text):"module",Bn,!1,!1,!1,"","")}(e);case 262:case 263:{Tn.assert(!r&&!i&&!t);const o=e.name;return o&&!n_(o)?Hn(o,!1,n,r,i):$n()}case 277:return Tn.assert(!r&&!i&&!t),$n();case 231:return Tn.assert(!r&&!i&&!t),Un("class",Bn,!1,!1,!1,"","");case 174:case 177:case 178:return function(e,t,n,r){return QN(e.name)?Rn(e.name,t):qn(0,!1,t,n,r)}(e,t,r,i);case 167:return qn(0,!0,t,r,i);default:return qn(0,!1,t,r,i)}}function Kn(e,t){const n=Le(2,e,t),r=Q,i=Y,o=Z;Gn(t),n(e,t),Xn(t,r,i,o)}function Gn(e){const t=ip(e),n=Sw(e);!function(e,t,n,r){re(),te=!1;const i=n<0||!!(1024&t)||12===e.kind,o=r<0||!!(2048&t)||12===e.kind;(n>0||r>0)&&n!==r&&(i||nr(n,353!==e.kind),(!i||n>=0&&1024&t)&&(Q=n),(!o||r>=0&&2048&t)&&(Y=r,261===e.kind&&(Z=r)));h(Tw(e),Yn),ie()}(e,t,n.pos,n.end),4096&t&&(ne=!0)}function Xn(e,t,n,r){const i=ip(e),o=Sw(e);4096&i&&(ne=!1),Qn(e,i,o.pos,o.end,t,n,r);const a=qw(e);a&&Qn(e,i,a.pos,a.end,t,n,r)}function Qn(e,t,n,r,i,o,a){re();const s=r<0||!!(2048&t)||12===e.kind;h(Nw(e),Zn),(n>0||r>0)&&n!==r&&(Q=i,Y=o,Z=a,s||353===e.kind||function(e){fr(e,lr)}(r)),ie()}function Yn(e){(e.hasLeadingNewline||2===e.kind)&&v.writeLine(),er(e),e.hasTrailingNewLine||2===e.kind?v.writeLine():v.writeSpace(" ")}function Zn(e){v.isAtStartOfLine()||v.writeSpace(" "),er(e),e.hasTrailingNewLine&&v.writeLine()}function er(e){const t=function(e){return 3===e.kind?`/*${e.text}*/`:`//${e.text}`}(e);Bv(t,3===e.kind?Ga(t):void 0,v,0,t.length,U)}function tr(e,t,r){re();const{pos:i,end:o}=t,a=ip(e),s=ne||o<0||!!(2048&a);i<0||!!(1024&a)||function(e){const t=n&&Rv(n.text,be(),v,mr,e,U,ne);t&&(D?D.push(t):D=[t])}(t),ie(),4096&a&&!ne?(ne=!0,r(e),ne=!1):r(e),re(),s||(nr(t.end,!0),te&&!v.isAtStartOfLine()&&v.writeLine()),ie()}function nr(e,t){te=!1,t?0===e&&(null==n?void 0:n.isDeclarationFile)?pr(e,ir):pr(e,sr):0===e&&pr(e,rr)}function rr(e,t,n,r,i){gr(e,t)&&sr(e,t,n,r,i)}function ir(e,t,n,r,i){gr(e,t)||sr(e,t,n,r,i)}function or(t,n){return!e.onlyPrintJsDocStyle||(wI(t,n)||Kd(t,n))}function sr(e,t,r,i,o){n&&or(n.text,e)&&(te||(Lv(be(),v,o,e),te=!0),xr(e),Bv(n.text,be(),v,e,t,U),xr(t),i?v.writeLine():3===r&&v.writeSpace(" "))}function cr(e){ne||-1===e||nr(e,!0)}function lr(e,t,r,i){n&&or(n.text,e)&&(v.isAtStartOfLine()||v.writeSpace(" "),xr(e),Bv(n.text,be(),v,e,t,U),xr(t),i&&v.writeLine())}function _r(e,t,n){ne||(re(),fr(e,t?lr:n?ur:dr),ie())}function ur(e,t,r){n&&(xr(e),Bv(n.text,be(),v,e,t,U),xr(t),2===r&&v.writeLine())}function dr(e,t,r,i){n&&(xr(e),Bv(n.text,be(),v,e,t,U),xr(t),i?v.writeLine():v.writeSpace(" "))}function pr(e,t){!n||-1!==Q&&e===Q||(function(e){return void 0!==D&&Ee(D).nodePos===e}(e)?function(e){if(!n)return;const t=Ee(D).detachedCommentEndPos;D.length-1?D.pop():D=void 0;bs(n.text,t,e,t)}(t):bs(n.text,e,t,e))}function fr(e,t){n&&(-1===Y||e!==Y&&e!==Z)&&xs(n.text,e,t)}function mr(e,t,r,i,o,a){n&&or(n.text,i)&&(xr(i),Bv(e,t,r,i,o,a),xr(o))}function gr(e,t){return!!n&&Hd(n.text,e,t)}function hr(e,t){const n=Le(3,e,t);yr(t),n(e,t),vr(t)}function yr(e){const t=ip(e),n=gw(e),r=n.source||k;353!==e.kind&&!(32&t)&&n.pos>=0&&Sr(n.source||k,br(r,n.pos)),128&t&&(K=!0)}function vr(e){const t=ip(e),n=gw(e);128&t&&(K=!1),353!==e.kind&&!(64&t)&&n.end>=0&&Sr(n.source||k,n.end)}function br(e,t){return e.skipTrivia?e.skipTrivia(t):ds(e.text,t)}function xr(e){if(K||dT(e)||Tr(k))return;const{line:t,character:n}=ns(k,e);S.addMapping(v.getLine(),v.getColumn(),G,t,n,void 0)}function Sr(e,t){if(e!==k){const n=k,r=G;kr(e),xr(t),function(e,t){k=e,G=t}(n,r)}else xr(t)}function kr(t){K||(k=t,t!==C?Tr(t)||(G=S.addSource(t.fileName),e.inlineSources&&S.setSourceContent(G,t.text),C=t,X=G):G=X)}function Tr(e){return Ro(e.fileName,".json")}}function SU(e,t,n,r){t(e)}function kU(e,t,n,r){t(e,n.select(r))}function TU(e,t,n,r){t(e,n)}function CU(e,t,n){if(!e.getDirectories||!e.readDirectory)return;const r=new Map,i=on(n);return{useCaseSensitiveFileNames:n,fileExists:function(t){const n=s(o(t));return n&&_(n.sortedAndCanonicalizedFiles,i(c(t)))||e.fileExists(t)},readFile:(t,n)=>e.readFile(t,n),directoryExists:e.directoryExists&&function(t){const n=o(t);return r.has(aa(n))||e.directoryExists(t)},getDirectories:function(t){const n=o(t),r=l(t,n);if(r)return r.directories.slice();return e.getDirectories(t)},readDirectory:function(r,i,a,s,_){const d=o(r),f=l(r,d);let m;if(void 0!==f)return Ik(r,i,a,s,n,t,_,function(e){const t=o(e);if(t===d)return f||g(e,t);const n=l(e,t);return void 0!==n?n||g(e,t):vT},u);return e.readDirectory(r,i,a,s,_);function g(t,n){if(m&&n===d)return m;const r={files:M(e.readDirectory(t,void 0,void 0,["*.*"]),c)||p,directories:e.getDirectories(t)||p};return n===d&&(m=r),r}},createDirectory:e.createDirectory&&function(t){const n=s(o(t));if(n){const e=c(t),r=i(e);se(n.sortedAndCanonicalizedDirectories,r,Rt)&&n.directories.push(e)}e.createDirectory(t)},writeFile:e.writeFile&&function(t,n,r){const i=s(o(t));i&&d(i,c(t),!0);return e.writeFile(t,n,r)},addOrDeleteFileOrDirectory:function(t,n){if(void 0!==a(n))return void f();const r=s(n);if(!r)return;if(!e.directoryExists)return void f();const o=c(t),l={fileExists:e.fileExists(t),directoryExists:e.directoryExists(t)};l.directoryExists||_(r.sortedAndCanonicalizedDirectories,i(o))?f():d(r,o,l.fileExists);return l},addOrDeleteFile:function(e,t,n){if(1===n)return;const r=s(t);r&&d(r,c(e),0===n)},clearCache:f,realpath:e.realpath&&u};function o(e){return ia(e,t,i)}function a(e){return r.get(aa(e))}function s(e){const t=a(Vo(e));return t?(t.sortedAndCanonicalizedFiles||(t.sortedAndCanonicalizedFiles=t.files.map(i).sort(),t.sortedAndCanonicalizedDirectories=t.directories.map(i).sort()),t):t}function c(e){return Wo(na(e))}function l(t,n){const i=a(n=aa(n));if(i)return i;try{return function(t,n){var i;if(!e.realpath||aa(o(e.realpath(t)))===n){const i={files:M(e.readDirectory(t,void 0,void 0,["*.*"]),c)||[],directories:e.getDirectories(t)||[]};return r.set(aa(n),i),i}if(null==(i=e.directoryExists)?void 0:i.call(e,t))return r.set(n,!1),!1}(t,n)}catch(e){return void Tn.assert(!r.has(aa(n)))}}function _(e,t){return je(e,t,yt,Rt)>=0}function u(t){return e.realpath?e.realpath(t):t}function d(e,t,n){const r=e.sortedAndCanonicalizedFiles,o=i(t);if(n)se(r,o,Rt)&&e.files.push(t);else{const t=je(r,o,yt,Rt);if(t>=0){r.splice(t,1);const n=e.files.findIndex(e=>i(e)===o);e.files.splice(n,1)}}}function f(){r.clear()}}var wU=(e=>(e[e.Update=0]="Update",e[e.RootNamesAndUpdate=1]="RootNamesAndUpdate",e[e.Full=2]="Full",e))(wU||{});function NU(e,t,n,r,i){var o;const a=Ke((null==(o=null==t?void 0:t.configFile)?void 0:o.extendedSourceFiles)||p,i);n.forEach((t,n)=>{a.has(n)||(t.projects.delete(e),t.close())}),a.forEach((t,i)=>{const o=n.get(i);o?o.projects.add(e):n.set(i,{projects:new Set([e]),watcher:r(t,i),close:()=>{const e=n.get(i);e&&0===e.projects.size&&(e.watcher.close(),n.delete(i))}})})}function DU(e,t){t.forEach(t=>{t.projects.delete(e)&&t.close()})}function PU(e,t,n){e.delete(t)&&e.forEach(({extendedResult:r},i)=>{var o;(null==(o=r.extendedSourceFiles)?void 0:o.some(e=>n(e)===t))&&PU(e,i,n)})}function EU(e,t,n){Fx(t,e.getMissingFilePaths(),{createNewValue:n,onDeleteValue:bx})}function FU(e,t,n){function r(e,t){return{watcher:n(e,t),flags:t}}t?Fx(e,new Map(Object.entries(t)),{createNewValue:r,onDeleteValue:RU,onExistingValue:function(t,n,i){if(t.flags===n)return;t.watcher.close(),e.set(i,r(i,n))}}):Px(e,RU)}function AU({watchedDirPath:e,fileOrDirectory:t,fileOrDirectoryPath:n,configFileName:r,options:i,program:o,extraFileExtensions:a,currentDirectory:s,useCaseSensitiveFileNames:c,writeLog:l,toPath:_,getScriptKind:u}){const d=OW(n);if(!d)return l(`Project: ${r} Detected ignored path: ${t}`),!0;if((n=d)===e)return!1;if(Mo(n)&&!nT(t,i,a)&&!function(){if(!u)return!1;switch(u(t)){case 3:case 4:case 7:case 5:return!0;case 1:case 2:return KS(i);case 6:return US(i);case 0:return!1}}())return l(`Project: ${r} Detected file add/remove of non supported extension: ${t}`),!0;if(OL(t,i.configFile.configFileSpecs,ta(Vo(r),s),c,s))return l(`Project: ${r} Detected excluded file: ${t}`),!0;if(!o)return!1;if(i.outFile||i.outDir)return!1;if(lO(n)){if(i.declarationDir)return!1}else if(!Bo(n,Uk))return!1;const p=aT(n),f=ct(o)?void 0:IU(o)?o.getProgramOrUndefined():o,m=f||ct(o)?void 0:o;return!(!g(p+".ts")&&!g(p+".tsx"))&&(l(`Project: ${r} Detected output file: ${t}`),!0);function g(e){return f?!!f.getSourceFileByPath(e):m?m.getState().fileInfos.has(e):!!C(o,t=>_(t)===e)}}function IU(e){return!!e.getState}function OU(e,t){return!!e&&e.isEmittedFile(t)}var jU=(e=>(e[e.None=0]="None",e[e.TriggerOnly=1]="TriggerOnly",e[e.Verbose=2]="Verbose",e))(jU||{});function LU(e,t,n,r){ho(2===t?n:ft);const i={watchFile:(t,n,r,i)=>e.watchFile(t,n,r,i),watchDirectory:(t,n,r,i)=>e.watchDirectory(t,n,!!(1&r),i)},o=0!==t?{watchFile:l("watchFile"),watchDirectory:l("watchDirectory")}:void 0,a=2===t?{watchFile:function(e,t,i,a,s,c){n(`FileWatcher:: Added:: ${_(e,i,a,s,c,r)}`);const l=o.watchFile(e,t,i,a,s,c);return{close:()=>{n(`FileWatcher:: Close:: ${_(e,i,a,s,c,r)}`),l.close()}}},watchDirectory:function(e,t,i,a,s,c){const l=`DirectoryWatcher:: Added:: ${_(e,i,a,s,c,r)}`;n(l);const u=tr(),d=o.watchDirectory(e,t,i,a,s,c),p=tr()-u;return n(`Elapsed:: ${p}ms ${l}`),{close:()=>{const t=`DirectoryWatcher:: Close:: ${_(e,i,a,s,c,r)}`;n(t);const o=tr();d.close();const l=tr()-o;n(`Elapsed:: ${l}ms ${t}`)}}}}:o||i,s=2===t?function(e,t,i,o,a){return n(`ExcludeWatcher:: Added:: ${_(e,t,i,o,a,r)}`),{close:()=>n(`ExcludeWatcher:: Close:: ${_(e,t,i,o,a,r)}`)}}:b$;return{watchFile:c("watchFile"),watchDirectory:c("watchDirectory")};function c(t){return(n,r,i,o,c,l)=>{var _;return LL(n,"watchFile"===t?null==o?void 0:o.excludeFiles:null==o?void 0:o.excludeDirectories,"boolean"==typeof e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),(null==(_=e.getCurrentDirectory)?void 0:_.call(e))||"")?s(n,i,o,c,l):a[t].call(void 0,n,r,i,o,c,l)}}function l(e){return(t,o,a,s,c,l)=>i[e].call(void 0,t,(...i)=>{const u=`${"watchFile"===e?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${i[0]} ${void 0!==i[1]?i[1]:""}:: ${_(t,a,s,c,l,r)}`;n(u);const d=tr();o.call(void 0,...i);const p=tr()-d;n(`Elapsed:: ${p}ms ${u}`)},a,s,c,l)}function _(e,t,n,r,i,o){return`WatchInfo: ${e} ${t} ${JSON.stringify(n)} ${o?o(r,i):void 0===i?r:`${r} ${i}`}`}}function MU(e){const t=null==e?void 0:e.fallbackPolling;return{watchFile:void 0!==t?t:1}}function RU(e){e.watcher.close()}function BU(e,t,n="tsconfig.json"){return Sa(e,e=>{const r=Yo(e,n);return t(r)?r:void 0})}function JU(e,t){const n=Vo(t);return na(Ao(e)?e:Yo(n,e))}function zU(e,t,n){let r;return h(e,e=>{const i=ea(e,t);if(i.pop(),!r)return void(r=i);const o=Math.min(r.length,i.length);for(let e=0;e{let o;try{gr("beforeIORead"),o=e(n),gr("afterIORead"),hr("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),o=""}return void 0!==o?YI(n,o,r,t):void 0}}function VU(e,t,n){return(r,i,o,a)=>{try{gr("beforeIOWrite"),gv(r,i,o,e,t,n),gr("afterIOWrite"),hr("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}}}function WU(e,t,n=To){const r=new Map,i=on(n.useCaseSensitiveFileNames);function o(){return Vo(na(n.getExecutingFilePath()))}const a=Xb(e),s=n.realpath&&(e=>n.realpath(e)),c={getSourceFile:UU(e=>c.readFile(e),t),getDefaultLibLocation:o,getDefaultLibFileName:e=>Yo(o(),qs(e)),writeFile:VU((e,t,r)=>n.writeFile(e,t,r),e=>(c.createDirectory||n.createDirectory)(e),e=>{return t=e,!!r.has(t)||!!(c.directoryExists||n.directoryExists)(t)&&(r.set(t,!0),!0);var t}),getCurrentDirectory:kt(()=>n.getCurrentDirectory()),useCaseSensitiveFileNames:()=>n.useCaseSensitiveFileNames,getCanonicalFileName:i,getNewLine:()=>a,fileExists:e=>n.fileExists(e),readFile:e=>n.readFile(e),trace:e=>n.write(e+a),directoryExists:e=>n.directoryExists(e),getEnvironmentVariable:e=>n.getEnvironmentVariable?n.getEnvironmentVariable(e):"",getDirectories:e=>n.getDirectories(e),realpath:s,readDirectory:(e,t,r,i,o)=>n.readDirectory(e,t,r,i,o),createDirectory:e=>n.createDirectory(e),createHash:nt(n,n.createHash)};return c}function $U(e,t,n){const r=e.readFile,i=e.fileExists,o=e.directoryExists,a=e.createDirectory,s=e.writeFile,c=new Map,l=new Map,_=new Map,u=new Map,d=(t,n)=>{const i=r.call(e,n);return c.set(t,void 0!==i&&i),i};e.readFile=n=>{const i=t(n),o=c.get(i);return void 0!==o?!1!==o?o:void 0:Ro(n,".json")||Wq(n)?d(i,n):r.call(e,n)};const p=n?(e,r,i,o)=>{const a=t(e),s="object"==typeof r?r.impliedNodeFormat:void 0,c=u.get(s),l=null==c?void 0:c.get(a);if(l)return l;const _=n(e,r,i,o);return _&&(lO(e)||Ro(e,".json"))&&u.set(s,(c||new Map).set(a,_)),_}:void 0;return e.fileExists=n=>{const r=t(n),o=l.get(r);if(void 0!==o)return o;const a=i.call(e,n);return l.set(r,!!a),a},s&&(e.writeFile=(n,r,...i)=>{const o=t(n);l.delete(o);const a=c.get(o);void 0!==a&&a!==r?(c.delete(o),u.forEach(e=>e.delete(o))):p&&u.forEach(e=>{const t=e.get(o);t&&t.text!==r&&e.delete(o)}),s.call(e,n,r,...i)}),o&&(e.directoryExists=n=>{const r=t(n),i=_.get(r);if(void 0!==i)return i;const a=o.call(e,n);return _.set(r,!!a),a},a&&(e.createDirectory=n=>{const r=t(n);_.delete(r),a.call(e,n)})),{originalReadFile:r,originalFileExists:i,originalDirectoryExists:o,originalCreateDirectory:a,originalWriteFile:s,getSourceFileWithCache:p,readFileWithCache:e=>{const n=t(e),r=c.get(n);return void 0!==r?!1!==r?r:void 0:d(n,e)}}}function HU(e,t,n){let r;return r=ge(r,e.getConfigFileParsingDiagnostics()),r=ge(r,e.getOptionsDiagnostics(n)),r=ge(r,e.getSyntacticDiagnostics(t,n)),r=ge(r,e.getGlobalDiagnostics(n)),r=ge(r,e.getSemanticDiagnostics(t,n)),VS(e.getCompilerOptions())&&(r=ge(r,e.getDeclarationDiagnostics(t,n))),zs(r||p)}function KU(e,t){let n="";for(const r of e)n+=GU(r,t);return n}function GU(e,t){const n=`${Si(e)} TS${e.code}: ${cV(e.messageText,t.getNewLine())}${t.getNewLine()}`;if(e.file){const{line:r,character:i}=ns(e.file,e.start);return`${va(e.file.fileName,t.getCurrentDirectory(),e=>t.getCanonicalFileName(e))}(${r+1},${i+1}): `+n}return n}var XU=(e=>(e.Grey="",e.Red="",e.Yellow="",e.Blue="",e.Cyan="",e))(XU||{}),QU="",YU=" ",ZU="",eV="...",tV=" ",nV=" ";function rV(e){switch(e){case 1:return"";case 0:return"";case 2:return Tn.fail("Should never get an Info diagnostic on the command line.");case 3:return""}}function iV(e,t){return t+e+ZU}function oV(e,t,n,r,i,o){const{line:a,character:s}=ns(e,t),{line:c,character:l}=ns(e,t+n),_=ns(e,e.text.length).line,u=c-a>=4;let d=(c+1+"").length;u&&(d=Math.max(eV.length,d));let p="";for(let t=a;t<=c;t++){p+=o.getNewLine(),u&&a+1n.getCanonicalFileName(e)):e.fileName,""),a+=":",a+=r(`${i+1}`,""),a+=":",a+=r(`${o+1}`,""),a}function sV(e,t){let n="";for(const r of e){if(r.file){const{file:e,start:i}=r;n+=aV(e,i,t),n+=" - "}if(n+=iV(Si(r),rV(r.category)),n+=iV(` TS${r.code}: `,""),n+=cV(r.messageText,t.getNewLine()),r.file&&r.code!==Ca.File_appears_to_be_binary.code&&(n+=t.getNewLine(),n+=oV(r.file,r.start,r.length,"",rV(r.category),t)),r.relatedInformation){n+=t.getNewLine();for(const{file:e,start:i,length:o,messageText:a}of r.relatedInformation)e&&(n+=t.getNewLine(),n+=tV+aV(e,i,t),n+=oV(e,i,o,nV,"",t)),n+=t.getNewLine(),n+=nV+cV(a,t.getNewLine())}n+=t.getNewLine()}return n}function cV(e,t,n=0){if(_t(e))return e;if(void 0===e)return"";let r="";if(n){r+=t;for(let e=0;edV(t,e,n)};function yV(e,t,n,r,i){return{nameAndMode:hV,resolve:(o,a)=>LM(o,e,n,r,i,t,a)}}function vV(e){return _t(e)?e:e.fileName}var bV={getName:vV,getMode:(e,t)=>lV(e,null==t?void 0:t.impliedNodeFormat)};function xV(e,t,n,r,i){return{nameAndMode:bV,resolve:(o,a)=>fM(o,e,n,r,t,i,a)}}function SV(e,t,n,r,i,o,a,s){if(0===e.length)return p;const c=[],l=new Map,_=s(t,n,r,o,a);for(const t of e){const e=_.nameAndMode.getName(t),o=_.nameAndMode.getMode(t,i,(null==n?void 0:n.commandLine.options)||r),a=CM(e,o);let s=l.get(a);s||l.set(a,s=_.resolve(e,o)),c.push(s)}return c}function kV(e,t){return TV(void 0,e,(e,n)=>e&&t(e,n))}function TV(e,t,n,r){let i;return function e(t,o,a){if(r){const e=r(t,a);if(e)return e}return h(o,(t,r)=>{if(t&&(null==i?void 0:i.has(t.sourceFile.path)))return;const o=n(t,a,r);return o||!t?o:((i||(i=new Set)).add(t.sourceFile.path),e(t.commandLine.projectReferences,t.references,t))})}(e,t,void 0)}var CV="__inferred type names__.ts";function wV(e,t,n){return Yo(e.configFilePath?Vo(e.configFilePath):t,`__lib_node_modules_lookup_${n}__.ts`)}function NV(e){const t=e.split(".");let n=t[1],r=2;for(;t[r]&&"d"!==t[r];)n+=(2===r?"/":"-")+t[r],r++;return"@typescript/lib-"+n}function DV(e){return xt(e.fileName)}function PV(e){const t=DV(e);return CO.get(t)}function EV(e){switch(null==e?void 0:e.kind){case 3:case 4:case 5:case 7:return!0;default:return!1}}function FV(e){return void 0!==e.pos}function AV(e,t){var n,r,i,o;const a=Tn.checkDefined(e.getSourceFileByPath(t.file)),{kind:s,index:c}=t;let l,_,u;switch(s){case 3:const t=$V(a,c);if(u=null==(r=null==(n=e.getResolvedModuleFromModuleSpecifier(t,a))?void 0:n.resolvedModule)?void 0:r.packageId,-1===t.pos)return{file:a,packageId:u,text:t.text};l=ds(a.text,t.pos),_=t.end;break;case 4:({pos:l,end:_}=a.referencedFiles[c]);break;case 5:({pos:l,end:_}=a.typeReferenceDirectives[c]),u=null==(o=null==(i=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a.typeReferenceDirectives[c],a))?void 0:i.resolvedTypeReferenceDirective)?void 0:o.packageId;break;case 7:({pos:l,end:_}=a.libReferenceDirectives[c]);break;default:return Tn.assertNever(s)}return{file:a,pos:l,end:_,packageId:u}}function IV(e,t,n,r,i,o,a,s,c,l){if(!e||(null==s?void 0:s()))return!1;if(!_e(e.getRootFileNames(),t))return!1;let _;if(!_e(e.getProjectReferences(),l,function(t,n,r){return bd(t,n)&&p(e.getResolvedProjectReferences()[r],t)}))return!1;if(e.getSourceFiles().some(function(e){return!function(e){return e.version===r(e.resolvedPath,e.fileName)}(e)||o(e.path)}))return!1;const u=e.getMissingFilePaths();if(u&&md(u,i))return!1;const d=e.getCompilerOptions();return!!Dx(d,n)&&((!e.resolvedLibReferences||!md(e.resolvedLibReferences,(e,t)=>a(t)))&&(!d.configFile||!n.configFile||d.configFile.text===n.configFile.text));function p(e,t){if(e){if(E(_,e))return!0;const n=UV(t),r=c(n);return!!r&&(e.commandLine.options.configFile===r.options.configFile&&(!!_e(e.commandLine.fileNames,r.fileNames)&&((_||(_=[])).push(e),!h(e.references,(t,n)=>!p(t,e.commandLine.projectReferences[n])))))}const n=UV(t);return!c(n)}}function OV(e){return e.options.configFile?[...e.options.configFile.parseDiagnostics,...e.errors]:e.errors}function jV(e,t,n,r){const i=LV(e,t,n,r);return"object"==typeof i?i.impliedNodeFormat:i}function LV(e,t,n,r){switch(LS(r)){case 3:case 99:return Bo(e,[".d.mts",".mts",".mjs"])?99:Bo(e,[".d.cts",".cts",".cjs"])?1:Bo(e,[".d.ts",".ts",".tsx",".js",".jsx"])?function(){const i=cR(t,n,r),o=[];i.failedLookupLocations=o,i.affectingLocations=o;const a=lR(e,i);return{impliedNodeFormat:"module"===(null==a?void 0:a.contents.packageJsonContent.type)?99:1,packageJsonLocations:o,packageJsonScope:a}}():void 0;default:return}}var MV=new Set([Ca.Cannot_redeclare_block_scoped_variable_0.code,Ca.A_module_cannot_have_multiple_default_exports.code,Ca.Another_export_default_is_here.code,Ca.The_first_export_default_is_here.code,Ca.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,Ca.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,Ca.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,Ca.constructor_is_a_reserved_word.code,Ca.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,Ca.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,Ca.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,Ca.Invalid_use_of_0_in_strict_mode.code,Ca.A_label_is_not_allowed_here.code,Ca.with_statements_are_not_allowed_in_strict_mode.code,Ca.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,Ca.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,Ca.A_class_declaration_without_the_default_modifier_must_have_a_name.code,Ca.A_class_member_cannot_have_the_0_keyword.code,Ca.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,Ca.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,Ca.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,Ca.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,Ca.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,Ca.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,Ca.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,Ca.A_destructuring_declaration_must_have_an_initializer.code,Ca.A_get_accessor_cannot_have_parameters.code,Ca.A_rest_element_cannot_contain_a_binding_pattern.code,Ca.A_rest_element_cannot_have_a_property_name.code,Ca.A_rest_element_cannot_have_an_initializer.code,Ca.A_rest_element_must_be_last_in_a_destructuring_pattern.code,Ca.A_rest_parameter_cannot_have_an_initializer.code,Ca.A_rest_parameter_must_be_last_in_a_parameter_list.code,Ca.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,Ca.A_return_statement_cannot_be_used_inside_a_class_static_block.code,Ca.A_set_accessor_cannot_have_rest_parameter.code,Ca.A_set_accessor_must_have_exactly_one_parameter.code,Ca.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,Ca.An_export_declaration_cannot_have_modifiers.code,Ca.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,Ca.An_import_declaration_cannot_have_modifiers.code,Ca.An_object_member_cannot_be_declared_optional.code,Ca.Argument_of_dynamic_import_cannot_be_spread_element.code,Ca.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,Ca.Cannot_redeclare_identifier_0_in_catch_clause.code,Ca.Catch_clause_variable_cannot_have_an_initializer.code,Ca.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,Ca.Classes_can_only_extend_a_single_class.code,Ca.Classes_may_not_have_a_field_named_constructor.code,Ca.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,Ca.Duplicate_label_0.code,Ca.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,Ca.for_await_loops_cannot_be_used_inside_a_class_static_block.code,Ca.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,Ca.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,Ca.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,Ca.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,Ca.Jump_target_cannot_cross_function_boundary.code,Ca.Line_terminator_not_permitted_before_arrow.code,Ca.Modifiers_cannot_appear_here.code,Ca.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,Ca.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,Ca.Private_identifiers_are_not_allowed_outside_class_bodies.code,Ca.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,Ca.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,Ca.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,Ca.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,Ca.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,Ca.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,Ca.Trailing_comma_not_allowed.code,Ca.Variable_declaration_list_cannot_be_empty.code,Ca._0_and_1_operations_cannot_be_mixed_without_parentheses.code,Ca._0_expected.code,Ca._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,Ca._0_list_cannot_be_empty.code,Ca._0_modifier_already_seen.code,Ca._0_modifier_cannot_appear_on_a_constructor_declaration.code,Ca._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,Ca._0_modifier_cannot_appear_on_a_parameter.code,Ca._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,Ca._0_modifier_cannot_be_used_here.code,Ca._0_modifier_must_precede_1_modifier.code,Ca._0_declarations_can_only_be_declared_inside_a_block.code,Ca._0_declarations_must_be_initialized.code,Ca.extends_clause_already_seen.code,Ca.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,Ca.Class_constructor_may_not_be_a_generator.code,Ca.Class_constructor_may_not_be_an_accessor.code,Ca.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,Ca.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,Ca.Private_field_0_must_be_declared_in_an_enclosing_class.code,Ca.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code]);function RV(e,t,n,r,i){var o,a,s,l,_,u,d,f,m,g,y,v,x,S,k,T;const w=ct(e)?function(e,t,n,r,i,o){return{rootNames:e,options:t,host:n,oldProgram:r,configFileParsingDiagnostics:i,typeScriptVersion:o}}(e,t,n,r,i):e,{rootNames:D,options:P,configFileParsingDiagnostics:F,projectReferences:A,typeScriptVersion:I}=w;let{oldProgram:j}=w;for(const e of zO)if(Be(P,e.name)&&"string"==typeof P[e.name])throw new Error(`${e.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);const L=kt(()=>Gn("ignoreDeprecations",Ca.Invalid_value_for_ignoreDeprecations));let M,R,B,q,U,V,W;const H=new Map;let K,G,X,Q=rt();const Y={},Z={};let te,re,ie,oe,ae,se,ce,le,ue,de;const fe="number"==typeof P.maxNodeModuleJsDepth?P.maxNodeModuleJsDepth:0;let me=0;const ge=new Map,he=new Map;null==(o=cr)||o.push(cr.Phase.Program,"createProgram",{configFilePath:P.configFilePath,rootDir:P.rootDir},!0),gr("beforeProgram");const ye=w.host||qU(P),ve=qV(ye);let be=P.noLib;const xe=kt(()=>ye.getDefaultLibFileName(P)),ke=ye.getDefaultLibLocation?ye.getDefaultLibLocation():Vo(xe()),Te=wy();let Ce=[];const we=ye.getCurrentDirectory(),Ne=Gk(P),De=Xk(P,Ne),Pe=new Map;let Ee,Fe,Ae,Ie;const Oe=ye.hasInvalidatedResolutions||mt;let je;if(ye.resolveModuleNameLiterals?(Ie=ye.resolveModuleNameLiterals.bind(ye),Ae=null==(a=ye.getModuleResolutionCache)?void 0:a.call(ye)):ye.resolveModuleNames?(Ie=(e,t,n,r,i,o)=>ye.resolveModuleNames(e.map(gV),t,null==o?void 0:o.map(gV),n,r,i).map(e=>e?void 0!==e.extension?{resolvedModule:e}:{resolvedModule:{...e,extension:mT(e.resolvedFileName)}}:mV),Ae=null==(s=ye.getModuleResolutionCache)?void 0:s.call(ye)):(Ae=FM(we,Ln,P),Ie=(e,t,n,r,i)=>SV(e,t,n,r,i,ye,Ae,yV)),ye.resolveTypeReferenceDirectiveReferences)je=ye.resolveTypeReferenceDirectiveReferences.bind(ye);else if(ye.resolveTypeReferenceDirectives)je=(e,t,n,r,i)=>ye.resolveTypeReferenceDirectives(e.map(vV),t,n,r,null==i?void 0:i.impliedNodeFormat).map(e=>({resolvedTypeReferenceDirective:e}));else{const e=AM(we,Ln,void 0,null==Ae?void 0:Ae.getPackageJsonInfoCache(),null==Ae?void 0:Ae.optionsToRedirectsKey);je=(t,n,r,i,o)=>SV(t,n,r,i,o,ye,e,xV)}const Le=ye.hasInvalidatedLibResolutions||mt;let Me;if(ye.resolveLibrary)Me=ye.resolveLibrary.bind(ye);else{const e=FM(we,Ln,P,null==Ae?void 0:Ae.getPackageJsonInfoCache());Me=(t,n,r)=>OM(t,n,r,ye,e)}const Re=new Map;let Je=new Map,ze=rt(),qe=!1;const Ue=new Map;let Ve=new Map;const We=ye.useCaseSensitiveFileNames()?new Map:void 0;let $e,He,Ke,Ge;const Xe=!!(null==(l=ye.useSourceOfProjectReferenceRedirect)?void 0:l.call(ye))&&!P.disableSourceOfProjectReferenceRedirect,{onProgramCreateComplete:Qe,fileExists:Ye,directoryExists:Ze}=function(e){let t;const n=e.compilerHost.fileExists,r=e.compilerHost.directoryExists,i=e.compilerHost.getDirectories,o=e.compilerHost.realpath;if(!e.useSourceOfProjectReferenceRedirect)return{onProgramCreateComplete:ft,fileExists:c};let a;e.compilerHost.fileExists=c,r&&(a=e.compilerHost.directoryExists=n=>r.call(e.compilerHost,n)?(u(n),!0):!!e.getResolvedProjectReferences()&&(t||(t=new Set,e.forEachResolvedProjectReference(n=>{const r=n.commandLine.options.outFile;if(r)t.add(Vo(e.toPath(r)));else{const r=n.commandLine.options.declarationDir||n.commandLine.options.outDir;r&&t.add(e.toPath(r))}})),d(n,!1)));i&&(e.compilerHost.getDirectories=t=>!e.getResolvedProjectReferences()||r&&r.call(e.compilerHost,t)?i.call(e.compilerHost,t):[]);o&&(e.compilerHost.realpath=t=>{var n;return(null==(n=e.getSymlinkCache().getSymlinkedFiles())?void 0:n.get(e.toPath(t)))||o.call(e.compilerHost,t)});return{onProgramCreateComplete:s,fileExists:c,directoryExists:a};function s(){e.compilerHost.fileExists=n,e.compilerHost.directoryExists=r,e.compilerHost.getDirectories=i}function c(t){return!!n.call(e.compilerHost,t)||!!e.getResolvedProjectReferences()&&(!!lO(t)&&d(t,!0))}function l(t){const r=e.getSourceOfProjectReferenceRedirect(e.toPath(t));return void 0!==r?!_t(r)||n.call(e.compilerHost,r):void 0}function _(n){const r=e.toPath(n),i=`${r}${wo}`;return gd(t,e=>r===e||ln(e,i)||ln(r,`${e}/`))}function u(t){var n;if(!e.getResolvedProjectReferences()||KT(t))return;if(!o||!t.includes(KM))return;const r=e.getSymlinkCache(),i=aa(e.toPath(t));if(null==(n=r.getSymlinkedDirectories())?void 0:n.has(i))return;const a=na(o.call(e.compilerHost,t));let s;a!==t&&(s=aa(e.toPath(a)))!==i?r.setSymlinkedDirectory(t,{real:aa(a),realPath:s}):r.setSymlinkedDirectory(i,!1)}function d(t,n){var r;const i=n?e=>l(e):e=>_(e),o=i(t);if(void 0!==o)return o;const a=e.getSymlinkCache(),s=a.getSymlinkedDirectories();if(!s)return!1;const c=e.toPath(t);return!!c.includes(KM)&&(!(!n||!(null==(r=a.getSymlinkedFiles())?void 0:r.has(c)))||(b(s.entries(),([r,o])=>{if(!o||!ln(c,r))return;const s=i(c.replace(r,o.realPath));if(n&&s){const n=ta(t,e.compilerHost.getCurrentDirectory());a.setSymlinkedFile(c,`${o.real}${n.replace(new RegExp(r,"i"),"")}`)}return s})||!1))}}({compilerHost:ye,getSymlinkCache:ir,useSourceOfProjectReferenceRedirect:Xe,toPath:Dt,getResolvedProjectReferences:Mt,getSourceOfProjectReferenceRedirect:wn,forEachResolvedProjectReference:Cn}),et=ye.readFile.bind(ye);null==(_=cr)||_.push(cr.Phase.Program,"shouldProgramCreateNewSourceFiles",{hasOldProgram:!!j});const tt=function(e,t){return!!e&&pd(e.getCompilerOptions(),t,LO)}(j,P);let it;if(null==(u=cr)||u.pop(),null==(d=cr)||d.push(cr.Phase.Program,"tryReuseStructureFromOldProgram",{}),it=function(){var e;if(!j)return 0;const t=j.getCompilerOptions();if(_d(t,P))return 0;if(!_e(j.getRootFileNames(),D))return 0;if(TV(j.getProjectReferences(),j.getResolvedProjectReferences(),(e,t,n)=>{const r=Rn((t?t.commandLine.projectReferences:A)[n]);return e?!r||r.sourceFile!==e.sourceFile||!_e(e.commandLine.fileNames,r.commandLine.fileNames):void 0!==r},(e,t)=>!_e(e,t?Dn(t.sourceFile.path).commandLine.projectReferences:A,bd)))return 0;A&&($e=A.map(Rn));const n=[],r=[];if(it=2,md(j.getMissingFilePaths(),e=>ye.fileExists(e)))return 0;const i=j.getSourceFiles();let o;a=o||(o={}),a[a.Exists=0]="Exists",a[a.Modified=1]="Modified";var a;const s=new Map;for(const t of i){const i=gn(t.fileName,Ae,ye,P);let o,a=ye.getSourceFileByPath?ye.getSourceFileByPath(t.fileName,t.resolvedPath,i,void 0,tt):ye.getSourceFile(t.fileName,i,void 0,tt);if(!a)return 0;if(a.packageJsonLocations=(null==(e=i.packageJsonLocations)?void 0:e.length)?i.packageJsonLocations:void 0,a.packageJsonScope=i.packageJsonScope,Tn.assert(!a.redirectInfo,"Host should not return a redirect source file from `getSourceFile`"),t.redirectInfo){if(a!==t.redirectInfo.unredirected)return 0;o=!1,a=t}else if(j.redirectTargetsMap.has(t.path)){if(a!==t)return 0;o=!1}else o=a!==t;a.path=t.path,a.originalFileName=t.originalFileName,a.resolvedPath=t.resolvedPath,a.fileName=t.fileName;const c=j.sourceFileToPackageName.get(t.path);if(void 0!==c){const e=s.get(c),t=o?1:0;if(void 0!==e&&1===t||1===e)return 0;s.set(c,t)}if(o)t.impliedNodeFormat!==a.impliedNodeFormat?it=1:_e(t.libReferenceDirectives,a.libReferenceDirectives,on)?t.hasNoDefaultLib!==a.hasNoDefaultLib?it=1:_e(t.referencedFiles,a.referencedFiles,on)?(cn(a),_e(t.imports,a.imports,an)&&_e(t.moduleAugmentations,a.moduleAugmentations,an)?(12582912&t.flags)!=(12582912&a.flags)?it=1:_e(t.typeReferenceDirectives,a.typeReferenceDirectives,on)||(it=1):it=1):it=1:it=1,r.push(a);else if(Oe(t.path))it=1,r.push(a);else for(const e of t.ambientModuleNames)H.set(e,t.fileName);n.push(a)}if(2!==it)return it;for(const e of r){const t=WV(e),n=At(t,e);(ce??(ce=new Map)).set(e.path,n);wd(t,n,t=>j.getResolvedModule(e,t.text,or(e,t)),xd)&&(it=1);const r=e.typeReferenceDirectives,i=Ot(r,e);(ue??(ue=new Map)).set(e.path,i);wd(r,i,t=>j.getResolvedTypeReferenceDirective(e,vV(t),lV(t,e.impliedNodeFormat)),Cd)&&(it=1)}if(2!==it)return it;if(dd(t,P))return 1;if(j.resolvedLibReferences&&md(j.resolvedLibReferences,(e,t)=>On(t).actual!==e.actual))return 1;if(ye.hasChangedAutomaticTypeDirectiveNames){if(ye.hasChangedAutomaticTypeDirectiveNames())return 1}else if(re=yM(P,ye),!_e(j.getAutomaticTypeDirectiveNames(),re))return 1;Ve=j.getMissingFilePaths(),Tn.assert(n.length===j.getSourceFiles().length);for(const e of n)Ue.set(e.path,e);return j.getFilesByNameMap().forEach((e,t)=>{e?e.path!==t?Ue.set(t,Ue.get(e.path)):j.isSourceFileFromExternalLibrary(e)&&he.set(e.path,!0):Ue.set(t,e)}),B=n,Q=j.getFileIncludeReasons(),te=j.getFileProcessingDiagnostics(),re=j.getAutomaticTypeDirectiveNames(),ie=j.getAutomaticTypeDirectiveResolutions(),Je=j.sourceFileToPackageName,ze=j.redirectTargetsMap,qe=j.usesUriStyleNodeCoreModules,se=j.resolvedModules,le=j.resolvedTypeReferenceDirectiveNames,oe=j.resolvedLibReferences,de=j.getCurrentPackagesMap(),2}(),null==(f=cr)||f.pop(),2!==it){if(M=[],R=[],A&&($e||($e=A.map(Rn)),D.length&&(null==$e||$e.forEach((e,t)=>{if(!e)return;const n=e.commandLine.options.outFile;if(Xe){if(n||0===jS(e.commandLine.options))for(const n of e.commandLine.fileNames)pn(n,{kind:1,index:t})}else if(n)pn(lT(n,".d.ts"),{kind:2,index:t});else if(0===jS(e.commandLine.options)){const n=kt(()=>sU(e.commandLine,!ye.useCaseSensitiveFileNames()));for(const r of e.commandLine.fileNames)lO(r)||Ro(r,".json")||pn(Zq(r,e.commandLine,!ye.useCaseSensitiveFileNames(),n),{kind:2,index:t})}}))),null==(m=cr)||m.push(cr.Phase.Program,"processRootFiles",{count:D.length}),h(D,(e,t)=>rn(e,!1,!1,{kind:0,index:t})),null==(g=cr)||g.pop(),re??(re=D.length?yM(P,ye):p),ie=wM(),re.length){null==(y=cr)||y.push(cr.Phase.Program,"processTypeReferences",{count:re.length});const e=Yo(P.configFilePath?Vo(P.configFilePath):we,CV),t=Ot(re,e);for(let e=0;e{rn(An(e),!0,!1,{kind:6,index:t})})}B=Se(M,function(e,t){return It(Nt(e),Nt(t))}).concat(R),M=void 0,R=void 0,K=void 0}if(j&&ye.onReleaseOldSourceFile){const e=j.getSourceFiles();for(const t of e){const e=qt(t.resolvedPath);(tt||!e||e.impliedNodeFormat!==t.impliedNodeFormat||t.resolvedPath===t.path&&e.resolvedPath!==t.path)&&ye.onReleaseOldSourceFile(t,j.getCompilerOptions(),!!qt(t.path))}ye.getParsedCommandLine||j.forEachResolvedProjectReference(e=>{Dn(e.sourceFile.path)||ye.onReleaseOldSourceFile(e.sourceFile,j.getCompilerOptions(),!1)})}j&&ye.onReleaseParsedCommandLine&&TV(j.getProjectReferences(),j.getResolvedProjectReferences(),(e,t,n)=>{const r=UV((null==t?void 0:t.commandLine.projectReferences[n])||j.getProjectReferences()[n]);(null==He?void 0:He.has(Dt(r)))||ye.onReleaseParsedCommandLine(r,e,j.getCompilerOptions())}),j=void 0,ae=void 0,ce=void 0,ue=void 0;const ot={getRootFileNames:()=>D,getSourceFile:zt,getSourceFileByPath:qt,getSourceFiles:()=>B,getMissingFilePaths:()=>Ve,getModuleResolutionCache:()=>Ae,getFilesByNameMap:()=>Ue,getCompilerOptions:()=>P,getSyntacticDiagnostics:function(e,t){return Ut(e,Wt,t)},getOptionsDiagnostics:function(){return zs(ne(at().getGlobalDiagnostics(),function(){if(!P.configFile)return p;let e=at().getDiagnostics(P.configFile.fileName);return Cn(t=>{e=ne(e,at().getDiagnostics(t.sourceFile.fileName))}),e}()))},getGlobalDiagnostics:function(){return D.length?zs(Bt().getGlobalDiagnostics().slice()):p},getSemanticDiagnostics:function(e,t){return Ut(e,Ht,t)},getCachedSemanticDiagnostics:function(e){var t;return e?null==(t=Y.perFile)?void 0:t.get(e.path):Y.allDiagnostics},getSuggestionDiagnostics:function(e,t){return $t(()=>Bt().getSuggestionDiagnostics(e,t))},getDeclarationDiagnostics:function(e,t){const n=ot.getCompilerOptions();return!e||n.outFile?Zt(e,t):Ut(e,nn,t)},getBindAndCheckDiagnostics:function(e,t){return Gt(e,t)},getProgramDiagnostics:Vt,getTypeChecker:Bt,getClassifiableNames:function(){var e;if(!W){Bt(),W=new Set;for(const t of B)null==(e=t.classifiableNames)||e.forEach(e=>W.add(e))}return W},getCommonSourceDirectory:Pt,emit:function(e,t,n,r,i,o){var a,s;null==(a=cr)||a.push(cr.Phase.Emit,"emit",{path:null==e?void 0:e.path},!0);const c=$t(()=>function(e,t,n,r,i,o,a){if(!a){const i=JV(e,t,n,r);if(i)return i}const s=Bt(),c=s.getEmitResolver(P.outFile?void 0:t,r,uU(i,a));gr("beforeEmit");const l=s.runWithCancellationToken(r,()=>dU(c,jt(n),t,Oq(P,o,i),i,!1,a));return gr("afterEmit"),hr("Emit","beforeEmit","afterEmit"),l}(ot,e,t,n,r,i,o));return null==(s=cr)||s.pop(),c},getCurrentDirectory:()=>we,getNodeCount:()=>Bt().getNodeCount(),getIdentifierCount:()=>Bt().getIdentifierCount(),getSymbolCount:()=>Bt().getSymbolCount(),getTypeCount:()=>Bt().getTypeCount(),getInstantiationCount:()=>Bt().getInstantiationCount(),getRelationCacheSizes:()=>Bt().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>te,getAutomaticTypeDirectiveNames:()=>re,getAutomaticTypeDirectiveResolutions:()=>ie,isSourceFileFromExternalLibrary:Rt,isSourceFileDefaultLibrary:function(e){if(!e.isDeclarationFile)return!1;if(e.hasNoDefaultLib)return!0;if(!P.noLib)return!1;const t=ye.useCaseSensitiveFileNames()?Ft:Et;return P.lib?ee(P.lib,n=>t(e.fileName,oe.get(n).actual)):t(e.fileName,xe())},getModeForUsageLocation:or,getModeForResolutionAtIndex:function(e,t){return or(e,$V(e,t))},getSourceFileFromReference:function(e,t){return un(JU(t.fileName,e.fileName),zt)},getLibFileFromReference:function(e){var t;const n=PV(e),r=n&&(null==(t=null==oe?void 0:oe.get(n))?void 0:t.actual);return void 0!==r?zt(r):void 0},sourceFileToPackageName:Je,redirectTargetsMap:ze,usesUriStyleNodeCoreModules:qe,resolvedModules:se,resolvedTypeReferenceDirectiveNames:le,resolvedLibReferences:oe,getResolvedModule:st,getResolvedModuleFromModuleSpecifier:function(e,t){return t??(t=Dd(e)),Tn.assertIsDefined(t,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),st(t,e.text,or(t,e))},getResolvedTypeReferenceDirective:lt,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:function(e,t){return lt(t,e.fileName,e.resolutionMode||t.impliedNodeFormat)},forEachResolvedModule:ut,forEachResolvedTypeReferenceDirective:pt,getCurrentPackagesMap:()=>de,typesPackageExists:function(e){return ht().has(PR(e))},packageBundlesTypes:function(e){return!!ht().get(e)},isEmittedFile:function(e){if(P.noEmit)return!1;const t=Dt(e);if(qt(t))return!1;const n=P.outFile;if(n)return rr(t,n)||rr(t,aT(n)+".d.ts");if(P.declarationDir&&ma(P.declarationDir,t,we,!ye.useCaseSensitiveFileNames()))return!0;if(P.outDir)return ma(P.outDir,t,we,!ye.useCaseSensitiveFileNames());if(Bo(t,Uk)||lO(t)){const e=aT(t);return!!qt(e+".ts")||!!qt(e+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return F||p},getProjectReferences:function(){return A},getResolvedProjectReferences:Mt,getProjectReferenceRedirect:bn,getResolvedProjectReferenceToRedirect:kn,getResolvedProjectReferenceByPath:Dn,forEachResolvedProjectReference:Cn,isSourceOfProjectReferenceRedirect:Nn,getRedirectReferenceForResolutionFromSourceOfProject:wt,emitBuildInfo:function(e){var t,n;Tn.assert(!P.outFile),null==(t=cr)||t.push(cr.Phase.Emit,"emitBuildInfo",{},!0),gr("beforeEmit");const r=dU(gU,jt(e),void 0,Iq,!1,!0);return gr("afterEmit"),hr("Emit","beforeEmit","afterEmit"),null==(n=cr)||n.pop(),r},fileExists:Ye,readFile:et,directoryExists:Ze,getSymlinkCache:ir,realpath:null==(k=ye.realpath)?void 0:k.bind(ye),useCaseSensitiveFileNames:()=>ye.useCaseSensitiveFileNames(),getCanonicalFileName:Ln,getFileIncludeReasons:()=>Q,structureIsReused:it,writeFile:Lt};return Qe(),function(){P.strictPropertyInitialization&&!tk(P,"strictNullChecks")&&Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks");P.exactOptionalPropertyTypes&&!tk(P,"strictNullChecks")&&Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1,"exactOptionalPropertyTypes","strictNullChecks");(P.isolatedModules||P.verbatimModuleSyntax)&&P.outFile&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"outFile",P.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules");P.isolatedDeclarations&&(KS(P)&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"allowJs","isolatedDeclarations"),VS(P)||Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"isolatedDeclarations","declaration","composite"));P.inlineSourceMap&&(P.sourceMap&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),P.mapRoot&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap"));P.composite&&(!1===P.declaration&&Kn(Ca.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===P.incremental&&Kn(Ca.Composite_projects_may_not_disable_incremental_compilation,"declaration"));const e=P.outFile;P.tsBuildInfoFile?$S(P)||Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"tsBuildInfoFile","incremental","composite"):!P.incremental||e||P.configFilePath||Te.add(gS(Ca.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));if(function(){Bn("5.0","5.5","6.0",function(e,t,n,r,...i){if(n){const o=yS(void 0,Ca.Use_0_instead,n);Qn(!t,e,void 0,yS(o,r,...i))}else Qn(!t,e,void 0,r,...i)},e=>{0===P.target&&e("target","ES3"),P.noImplicitUseStrict&&e("noImplicitUseStrict"),P.keyofStringsOnly&&e("keyofStringsOnly"),P.suppressExcessPropertyErrors&&e("suppressExcessPropertyErrors"),P.suppressImplicitAnyIndexErrors&&e("suppressImplicitAnyIndexErrors"),P.noStrictGenericChecks&&e("noStrictGenericChecks"),P.charset&&e("charset"),P.out&&e("out",void 0,"outFile"),P.importsNotUsedAsValues&&e("importsNotUsedAsValues",void 0,"verbatimModuleSyntax"),P.preserveValueImports&&e("preserveValueImports",void 0,"verbatimModuleSyntax")})}(),function(){const e=P.suppressOutputPathCheck?void 0:Hq(P);TV(A,$e,(t,n,r)=>{const i=(n?n.commandLine.projectReferences:A)[r],o=n&&n.sourceFile;if(function(e,t,n){function r(e,r,i,o,...a){Xn(t,n,o,...a)}Bn("5.0","5.5","6.0",r,t=>{e.prepend&&t("prepend")})}(i,o,r),!t)return void Xn(o,r,Ca.File_0_not_found,i.path);const a=t.commandLine.options;if(!a.composite||a.noEmit){(n?n.commandLine.fileNames:D).length&&(a.composite||Xn(o,r,Ca.Referenced_project_0_must_have_setting_composite_Colon_true,i.path),a.noEmit&&Xn(o,r,Ca.Referenced_project_0_may_not_disable_emit,i.path))}!n&&e&&e===Hq(a)&&(Xn(o,r,Ca.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,e,i.path),Pe.set(Dt(e),!0))})}(),P.composite){const e=new Set(D.map(Dt));for(const t of B)uv(t,ot)&&!e.has(t.path)&&qn(t,Ca.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,[t.fileName,P.configFilePath||""])}if(P.paths)for(const e in P.paths)if(Be(P.paths,e))if(uk(e)||Vn(!0,e,Ca.Pattern_0_can_have_at_most_one_Asterisk_character,e),ct(P.paths[e])){const t=P.paths[e].length;0===t&&Vn(!1,e,Ca.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,e);for(let n=0;ntO(e)&&!e.isDeclarationFile);if(P.isolatedModules||P.verbatimModuleSyntax)0===P.module&&t<2&&P.isolatedModules&&Kn(Ca.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target"),!1===P.preserveConstEnums&&Kn(Ca.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled,P.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules","preserveConstEnums");else if(n&&t<2&&0===P.module){const e=rf(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Te.add(fS(n,e.start,e.length,Ca.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(e&&!P.emitDeclarationOnly)if(P.module&&2!==P.module&&4!==P.module)Kn(Ca.Only_amd_and_system_modules_are_supported_alongside_0,"outFile","module");else if(void 0===P.module&&n){const e=rf(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Te.add(fS(n,e.start,e.length,Ca.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,"outFile"))}US(P)&&(1===LS(P)?Kn(Ca.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic,"resolveJsonModule"):QS(P)||Kn(Ca.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd,"resolveJsonModule","module"));if(P.outDir||P.rootDir||P.sourceRoot||P.mapRoot){const e=Pt();P.outDir&&""===e&&B.some(e=>Uo(e.fileName)>1)&&Kn(Ca.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}P.checkJs&&!KS(P)&&Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs");P.emitDeclarationOnly&&(VS(P)||Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),P.noEmit&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit"));P.noCheck&&P.noEmit&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"noCheck","noEmit");P.emitDecoratorMetadata&&!P.experimentalDecorators&&Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators");P.jsxFactory?(P.reactNamespace&&Kn(Ca.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),4!==P.jsx&&5!==P.jsx||Kn(Ca.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",SO.get(""+P.jsx)),ZI(P.jsxFactory,t)||Gn("jsxFactory",Ca.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,P.jsxFactory)):P.reactNamespace&&!Es(P.reactNamespace,t)&&Gn("reactNamespace",Ca.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,P.reactNamespace);P.jsxFragmentFactory&&(P.jsxFactory||Kn(Ca.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),4!==P.jsx&&5!==P.jsx||Kn(Ca.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",SO.get(""+P.jsx)),ZI(P.jsxFragmentFactory,t)||Gn("jsxFragmentFactory",Ca.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,P.jsxFragmentFactory));P.reactNamespace&&(4!==P.jsx&&5!==P.jsx||Kn(Ca.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",SO.get(""+P.jsx)));P.jsxImportSource&&2===P.jsx&&Kn(Ca.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",SO.get(""+P.jsx));const r=jS(P);P.verbatimModuleSyntax&&(2!==r&&3!==r&&4!==r||Kn(Ca.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System,"verbatimModuleSyntax"));!P.allowImportingTsExtensions||P.noEmit||P.emitDeclarationOnly||Gn("allowImportingTsExtensions",Ca.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);const i=LS(P);P.resolvePackageJsonExports&&!ek(i)&&Kn(Ca.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonExports");P.resolvePackageJsonImports&&!ek(i)&&Kn(Ca.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonImports");P.customConditions&&!ek(i)&&Kn(Ca.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"customConditions");100!==i||XS(r)||200===r||Gn("moduleResolution",Ca.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later,"bundler");if(Di[r]&&100<=r&&r<=199&&!(3<=i&&i<=99)){const e=Di[r];Gn("moduleResolution",Ca.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,e,e)}else if(ki[i]&&3<=i&&i<=99&&!(100<=r&&r<=199)){const e=ki[i];Gn("module",Ca.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1,e,e)}if(!P.noEmit&&!P.suppressOutputPathCheck){const e=jt(),t=new Set;$q(e,e=>{P.emitDeclarationOnly||o(e.jsFilePath,t),o(e.declarationFilePath,t)})}function o(e,t){if(e){const n=Dt(e);if(Ue.has(n)){let t;P.configFilePath||(t=yS(void 0,Ca.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),t=yS(t,Ca.Cannot_write_file_0_because_it_would_overwrite_input_file,e),nr(e,hS(t))}const r=ye.useCaseSensitiveFileNames()?n:xt(n);t.has(r)?nr(e,gS(Ca.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,e)):t.add(r)}}}(),gr("afterProgram"),hr("Program","beforeProgram","afterProgram"),null==(T=cr)||T.pop(),ot;function at(){return Ce&&(null==te||te.forEach(e=>{switch(e.kind){case 1:return Te.add(Jn(e.file&&qt(e.file),e.fileProcessingReason,e.diagnostic,e.args||p));case 0:return Te.add(function({reason:e}){const{file:t,pos:n,end:r}=AV(ot,e),i=DV(t.libReferenceDirectives[e.index]),o=Kt(Qt(_n(i,"lib."),".d.ts"),TO,yt);return fS(t,Tn.checkDefined(n),Tn.checkDefined(r)-n,o?Ca.Cannot_find_lib_definition_for_0_Did_you_mean_1:Ca.Cannot_find_lib_definition_for_0,i,o)}(e));case 2:return e.diagnostics.forEach(e=>Te.add(e));default:Tn.assertNever(e)}}),Ce.forEach(({file:e,diagnostic:t,args:n})=>Te.add(Jn(e,void 0,t,n))),Ce=void 0,G=void 0,X=void 0),Te}function st(e,t,n){var r;return null==(r=null==se?void 0:se.get(e.path))?void 0:r.get(t,n)}function lt(e,t,n){var r;return null==(r=null==le?void 0:le.get(e.path))?void 0:r.get(t,n)}function ut(e,t){gt(se,e,t)}function pt(e,t){gt(le,e,t)}function gt(e,t,n){var r;n?null==(r=null==e?void 0:e.get(n.path))||r.forEach((e,r,i)=>t(e,r,i,n.path)):null==e||e.forEach((e,n)=>e.forEach((e,r,i)=>t(e,r,i,n)))}function ht(){return de||(de=new Map,ut(({resolvedModule:e})=>{(null==e?void 0:e.packageId)&&de.set(e.packageId.name,".d.ts"===e.extension||!!de.get(e.packageId.name))}),de)}function vt(e){var t;(null==(t=e.resolutionDiagnostics)?void 0:t.length)&&(te??(te=[])).push({kind:2,diagnostics:e.resolutionDiagnostics})}function bt(e,t,n,r){if(ye.resolveModuleNameLiterals||!ye.resolveModuleNames)return vt(n);if(!Ae||Js(t))return;const i=Vo(ta(e.originalFileName,we)),o=Ct(e),a=Ae.getFromNonRelativeNameCache(t,r,i,o);a&&vt(a)}function St(e,t,n){var r,i;if(!e.length)return p;const o=ta(t.originalFileName,we),a=Ct(t);null==(r=cr)||r.push(cr.Phase.Program,"resolveModuleNamesWorker",{containingFileName:o}),gr("beforeResolveModule");const s=Ie(e,o,a,P,t,n);return gr("afterResolveModule"),hr("ResolveModule","beforeResolveModule","afterResolveModule"),null==(i=cr)||i.pop(),s}function Tt(e,t,n){var r,i;if(!e.length)return[];const o=_t(t)?void 0:t,a=_t(t)?t:ta(t.originalFileName,we),s=o&&Ct(o);null==(r=cr)||r.push(cr.Phase.Program,"resolveTypeReferenceDirectiveNamesWorker",{containingFileName:a}),gr("beforeResolveTypeReference");const c=je(e,a,s,P,o,n);return gr("afterResolveTypeReference"),hr("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),null==(i=cr)||i.pop(),c}function Ct(e){const t=kn(e.originalFileName);if(t||!lO(e.originalFileName))return t;const n=wt(e.path);if(n)return n;if(!ye.realpath||!P.preserveSymlinks||!e.originalFileName.includes(KM))return;const r=Dt(ye.realpath(e.originalFileName));return r===e.path?void 0:wt(r)}function wt(e){const t=wn(e);return _t(t)?kn(t):t?Cn(t=>{const n=t.commandLine.options.outFile;if(n)return Dt(n)===e?t:void 0}):void 0}function Nt(e){if(ma(ke,e.fileName,!1)){const t=Wo(e.fileName);if("lib.d.ts"===t||"lib.es6.d.ts"===t)return 0;const n=Qt(_n(t,"lib."),".d.ts"),r=TO.indexOf(n);if(-1!==r)return r+1}return TO.length+2}function Dt(e){return ia(e,we,Ln)}function Pt(){if(void 0===U){const e=O(B,e=>uv(e,ot));U=aU(P,()=>$(e,e=>e.isDeclarationFile?void 0:e.fileName),we,Ln,t=>function(e,t){let n=!0;const r=ye.getCanonicalFileName(ta(t,we));for(const i of e)if(!i.isDeclarationFile){0!==ye.getCanonicalFileName(ta(i.fileName,we)).indexOf(r)&&(qn(i,Ca.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,[i.fileName,t]),n=!1)}return n}(e,t))}return U}function At(e,t){if(0===it&&!t.ambientModuleNames.length)return St(e,t,void 0);let n,r,i;const o=mV,a=j&&j.getSourceFile(t.fileName);for(let s=0;swe,getSourceFile:ot.getSourceFile,getSourceFileByPath:ot.getSourceFileByPath,getSourceFiles:ot.getSourceFiles,isSourceFileFromExternalLibrary:Rt,getResolvedProjectReferenceToRedirect:kn,getProjectReferenceRedirect:bn,isSourceOfProjectReferenceRedirect:Nn,getSymlinkCache:ir,writeFile:e||Lt,isEmitBlocked:Jt,readFile:e=>ye.readFile(e),fileExists:e=>{const t=Dt(e);return!!qt(t)||!Ve.has(t)&&ye.fileExists(e)},realpath:nt(ye,ye.realpath),useCaseSensitiveFileNames:()=>ye.useCaseSensitiveFileNames(),getBuildInfo:()=>{var e;return null==(e=ot.getBuildInfo)?void 0:e.call(ot)},getSourceFileFromReference:(e,t)=>ot.getSourceFileFromReference(e,t),redirectTargetsMap:ze,getFileIncludeReasons:ot.getFileIncludeReasons,createHash:nt(ye,ye.createHash),getModuleResolutionCache:()=>ot.getModuleResolutionCache(),trace:nt(ye,ye.trace)}}function Lt(e,t,n,r,i,o){ye.writeFile(e,t,n,r,i,o)}function Mt(){return $e}function Rt(e){return!!he.get(e.path)}function Bt(){return V||(V=QB(ot))}function Jt(e){return Pe.has(Dt(e))}function zt(e){return qt(Dt(e))}function qt(e){return Ue.get(e)||void 0}function Ut(e,t,n){return zs(e?t(e,n):z(ot.getSourceFiles(),e=>(n&&n.throwIfCancellationRequested(),t(e,n))))}function Vt(e){var t;if(wT(e,P,ot))return p;const n=at().getDiagnostics(e.fileName);return(null==(t=e.commentDirectives)?void 0:t.length)?Yt(e,e.commentDirectives,n).diagnostics:n}function Wt(e){return Bm(e)?(e.additionalSyntacticDiagnostics||(e.additionalSyntacticDiagnostics=function(e){return $t(()=>{const t=[];return n(e,e),GI(e,n,r),t;function n(e,n){switch(n.kind){case 169:case 172:case 174:if(n.questionToken===e)return t.push(a(e,Ca.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),"skip";case 173:case 176:case 177:case 178:case 218:case 262:case 219:case 260:if(n.type===e)return t.push(a(e,Ca.Type_annotations_can_only_be_used_in_TypeScript_files)),"skip"}switch(e.kind){case 273:if(e.isTypeOnly)return t.push(a(n,Ca._0_declarations_can_only_be_used_in_TypeScript_files,"import type")),"skip";break;case 278:if(e.isTypeOnly)return t.push(a(e,Ca._0_declarations_can_only_be_used_in_TypeScript_files,"export type")),"skip";break;case 276:case 281:if(e.isTypeOnly)return t.push(a(e,Ca._0_declarations_can_only_be_used_in_TypeScript_files,SE(e)?"import...type":"export...type")),"skip";break;case 271:return t.push(a(e,Ca.import_can_only_be_used_in_TypeScript_files)),"skip";case 277:if(e.isExportEquals)return t.push(a(e,Ca.export_can_only_be_used_in_TypeScript_files)),"skip";break;case 298:if(119===e.token)return t.push(a(e,Ca.implements_clauses_can_only_be_used_in_TypeScript_files)),"skip";break;case 264:const r=Va(120);return Tn.assertIsDefined(r),t.push(a(e,Ca._0_declarations_can_only_be_used_in_TypeScript_files,r)),"skip";case 267:const i=32&e.flags?Va(145):Va(144);return Tn.assertIsDefined(i),t.push(a(e,Ca._0_declarations_can_only_be_used_in_TypeScript_files,i)),"skip";case 265:return t.push(a(e,Ca.Type_aliases_can_only_be_used_in_TypeScript_files)),"skip";case 176:case 174:case 262:return e.body?void 0:(t.push(a(e,Ca.Signature_declarations_can_only_be_used_in_TypeScript_files)),"skip");case 266:const o=Tn.checkDefined(Va(94));return t.push(a(e,Ca._0_declarations_can_only_be_used_in_TypeScript_files,o)),"skip";case 235:return t.push(a(e,Ca.Non_null_assertions_can_only_be_used_in_TypeScript_files)),"skip";case 234:return t.push(a(e.type,Ca.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 238:return t.push(a(e.type,Ca.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 216:Tn.fail()}}function r(e,n){if(RA(n)){const e=C(n.modifiers,gD);e&&t.push(a(e,Ca.Decorators_are_not_valid_here))}else if(xI(n)&&n.modifiers){const e=N(n.modifiers,gD);if(e>=0)if(mD(n)&&!P.experimentalDecorators)t.push(a(n.modifiers[e],Ca.Decorators_are_not_valid_here));else if(rE(n)){const r=N(n.modifiers,ZN);if(r>=0){const i=N(n.modifiers,eD);if(e>r&&i>=0&&e=0&&e=0&&t.push(ST(a(n.modifiers[i],Ca.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),a(n.modifiers[e],Ca.Decorator_used_before_export_here)))}}}}switch(n.kind){case 263:case 231:case 174:case 176:case 177:case 178:case 218:case 262:case 219:if(e===n.typeParameters)return t.push(o(e,Ca.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)),"skip";case 243:if(e===n.modifiers)return i(n.modifiers,243===n.kind),"skip";break;case 172:if(e===n.modifiers){for(const n of e)__(n)&&126!==n.kind&&129!==n.kind&&t.push(a(n,Ca.The_0_modifier_can_only_be_used_in_TypeScript_files,Va(n.kind)));return"skip"}break;case 169:if(e===n.modifiers&&ee(e,__))return t.push(o(e,Ca.Parameter_modifiers_can_only_be_used_in_TypeScript_files)),"skip";break;case 213:case 214:case 233:case 285:case 286:case 215:if(e===n.typeArguments)return t.push(o(e,Ca.Type_arguments_can_only_be_used_in_TypeScript_files)),"skip"}}function i(e,n){for(const r of e)switch(r.kind){case 87:if(n)continue;case 125:case 123:case 124:case 148:case 138:case 128:case 164:case 103:case 147:t.push(a(r,Ca.The_0_modifier_can_only_be_used_in_TypeScript_files,Va(r.kind)))}}function o(t,n,...r){const i=t.pos;return fS(e,i,t.end-i,n,...r)}function a(t,n,...r){return $p(e,t,n,...r)}})}(e)),ne(e.additionalSyntacticDiagnostics,e.parseDiagnostics)):e.parseDiagnostics}function $t(e){try{return e()}catch(e){throw e instanceof Br&&(V=void 0),e}}function Ht(e,t){return ne(zV(Gt(e,t),P),Vt(e))}function Gt(e,t){return tn(e,t,Y,Xt)}function Xt(e,t){return $t(()=>{if(wT(e,P,ot))return p;const n=Bt();Tn.assert(!!e.bindDiagnostics);const r=(1===e.scriptKind||2===e.scriptKind)&&yT(e,P),i=Ed(e,P.checkJs);let o=e.bindDiagnostics,a=n.getDiagnostics(e,t);return i&&(o=O(o,e=>MV.has(e.code)),a=O(a,e=>MV.has(e.code))),function(e,t,...n){var r;const i=J(n);if(!t||!(null==(r=e.commentDirectives)?void 0:r.length))return i;const{diagnostics:o,directives:a}=Yt(e,e.commentDirectives,i);for(const t of a.getUnusedExpectations())o.push(Zp(e,t.range,Ca.Unused_ts_expect_error_directive));return o}(e,!i,o,a,r?e.jsDocDiagnostics:void 0)})}function Yt(e,t,n){const r=Gd(e,t),i=n.filter(e=>-1===function(e,t){const{file:n,start:r}=e;if(!n)return-1;const i=Ya(n);let o=Za(i,r).line-1;for(;o>=0;){if(t.markUsed(o))return o;const e=n.text.slice(i[o],i[o+1]).trim();if(""!==e&&!/^(\s*)\/\/(.*)$/.test(e))return-1;o--}return-1}(e,r));return{diagnostics:i,directives:r}}function Zt(e,t){return tn(e,t,Z,en)}function en(e,t){return $t(()=>{const n=Bt().getEmitResolver(e,t);return Nq(jt(ft),n,e)||p})}function tn(e,t,n,r){var i;const o=e?null==(i=n.perFile)?void 0:i.get(e.path):n.allDiagnostics;if(o)return o;const a=r(e,t);return e?(n.perFile||(n.perFile=new Map)).set(e.path,a):n.allDiagnostics=a,a}function nn(e,t){return e.isDeclarationFile?[]:Zt(e,t)}function rn(e,t,n,r){dn(na(e),t,n,void 0,r)}function on(e,t){return e.fileName===t.fileName}function an(e,t){return 80===e.kind?80===t.kind&&e.escapedText===t.escapedText:11===t.kind&&e.text===t.text}function sn(e,t){const n=aw.createStringLiteral(e),r=aw.createImportDeclaration(void 0,void 0,n);return mw(r,2),qT(n,r),qT(r,t),n.flags&=-17,r.flags&=-17,n}function cn(e){if(e.imports)return;const t=Bm(e),n=tO(e);let r,i,o;if(t||!e.isDeclarationFile&&(RS(P)||tO(e))){P.importHelpers&&(r=[sn(td,e)]);const t=_k(lk(P,e),P);t&&(r||(r=[])).push(sn(t,e))}for(const t of e.statements)a(t,!1);return(4194304&e.flags||t)&&function(e){const n=/import|require/g;for(;null!==n.exec(e.text);){const i=s(e,n.lastIndex);if(t&&$m(i,!0))VT(i,!1),r=pe(r,i.arguments[0]);else if(gf(i)&&i.arguments.length>=1&&Ku(i.arguments[0]))VT(i,!1),r=pe(r,i.arguments[0]);else if(yf(i))VT(i,!1),r=pe(r,i.argument.literal);else if(t&&JF(i)){const e=Fg(i);e&&ON(e)&&e.text&&(VT(i,!1),r=pe(r,e))}}}(e),e.imports=r||p,e.moduleAugmentations=i||p,void(e.ambientModuleNames=o||p);function a(t,s){if(Op(t)){const n=Fg(t);!(n&&ON(n)&&n.text)||s&&Js(n.text)||(VT(t,!1),r=pe(r,n),qe||0!==me||e.isDeclarationFile||(qe=ln(n.text,"node:")))}else if(sE(t)&&pp(t)&&(s||Wv(t,128)||e.isDeclarationFile)){t.name.parent=t;const r=ey(t.name);if(n||s&&!Js(r))(i||(i=[])).push(t.name);else if(!s){e.isDeclarationFile&&(o||(o=[])).push(r);const n=t.body;if(n)for(const e of n.statements)a(e,!0)}}}function s(e,n){let r=e;const i=e=>{if(e.pos<=n&&(nRo(i,e)))return void(n&&(Qk(i)?n(Ca.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,e):n(Ca.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,e,"'"+J(Ne).join("', '")+"'")));const o=t(e);if(n)if(o)EV(r)&&i===ye.getCanonicalFileName(qt(r.file).fileName)&&n(Ca.A_file_cannot_have_a_reference_to_itself);else{const t=bn(e);t?n(Ca.Output_file_0_has_not_been_built_from_source_file_1,t,e):n(Ca.File_0_not_found,e)}return o}{const r=P.allowNonTsExtensions&&t(e);if(r)return r;if(n&&P.allowNonTsExtensions)return void n(Ca.File_0_not_found,e);const i=h(Ne[0],n=>t(e+n));return n&&!i&&n(Ca.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,e,"'"+J(Ne).join("', '")+"'"),i}}function dn(e,t,n,r,i){un(e,e=>mn(e,t,n,i,r),(e,...t)=>zn(void 0,i,e,t),i)}function pn(e,t){return dn(e,!1,!1,void 0,t)}function fn(e,t,n){!EV(n)&&ee(Q.get(t.path),EV)?zn(t,n,Ca.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[t.fileName,e]):zn(t,n,Ca.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[e,t.fileName])}function mn(e,t,n,r,i){var o,a;null==(o=cr)||o.push(cr.Phase.Program,"findSourceFile",{fileName:e,isDefaultLib:t||void 0,fileIncludeKind:Jr[r.kind]});const s=function(e,t,n,r,i){var o;const a=Dt(e);if(Xe){let o=wn(a);if(!o&&ye.realpath&&P.preserveSymlinks&&lO(e)&&e.includes(KM)){const t=Dt(ye.realpath(e));t!==a&&(o=wn(t))}if(o){const s=_t(o)?mn(o,t,n,r,i):void 0;return s&&yn(s,a,e,void 0),s}}const s=e;if(Ue.has(a)){const n=Ue.get(a),i=hn(n||void 0,r,!0);if(n&&i&&!1!==P.forceConsistentCasingInFileNames){const t=n.fileName;Dt(t)!==Dt(e)&&(e=bn(e)||e);ra(t,we)!==ra(e,we)&&fn(e,n,r)}return n&&he.get(n.path)&&0===me?(he.set(n.path,!1),P.noResolve||(Pn(n,t),En(n)),P.noLib||jn(n),ge.set(n.path,!1),Mn(n)):n&&ge.get(n.path)&&mezn(void 0,r,Ca.Cannot_read_file_0_Colon_1,[e,t]),tt);if(i){const t=Td(i),n=Re.get(t);if(n){const t=function(e,t,n,r,i,o,a){var s;const c=kI.createRedirectedSourceFile({redirectTarget:e,unredirected:t});return c.fileName=n,c.path=r,c.resolvedPath=i,c.originalFileName=o,c.packageJsonLocations=(null==(s=a.packageJsonLocations)?void 0:s.length)?a.packageJsonLocations:void 0,c.packageJsonScope=a.packageJsonScope,he.set(r,me>0),c}(n,_,e,a,Dt(e),s,l);return ze.add(n.path,e),yn(t,a,e,c),hn(t,r,!1),Je.set(a,kd(i)),R.push(t),t}_&&(Re.set(t,_),Je.set(a,kd(i)))}if(yn(_,a,e,c),_){if(he.set(a,me>0),_.fileName=e,_.path=a,_.resolvedPath=Dt(e),_.originalFileName=s,_.packageJsonLocations=(null==(o=l.packageJsonLocations)?void 0:o.length)?l.packageJsonLocations:void 0,_.packageJsonScope=l.packageJsonScope,hn(_,r,!1),ye.useCaseSensitiveFileNames()){const t=xt(a),n=We.get(t);n?fn(e,n,r):We.set(t,_)}be=be||_.hasNoDefaultLib&&!n,P.noResolve||(Pn(_,t),En(_)),P.noLib||jn(_),Mn(_),t?M.push(_):R.push(_),(K??(K=new Set)).add(_.path)}return _}(e,t,n,r,i);return null==(a=cr)||a.pop(),s}function gn(e,t,n,r){const i=LV(ta(e,we),null==t?void 0:t.getPackageJsonInfoCache(),n,r),o=OS(r),a=AS(r);return"object"==typeof i?{...i,languageVersion:o,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}:{languageVersion:o,impliedNodeFormat:i,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}}function hn(e,t,n){return!(!e||n&&EV(t)&&(null==K?void 0:K.has(t.file)))&&(Q.add(e.path,t),!0)}function yn(e,t,n,r){r?(vn(n,r,e),vn(n,t,e||!1)):vn(n,t,e)}function vn(e,t,n){Ue.set(t,n),void 0!==n?Ve.delete(t):Ve.set(t,e)}function bn(e){const t=xn(e);return t&&Sn(t,e)}function xn(e){if($e&&$e.length&&!lO(e)&&!Ro(e,".json"))return kn(e)}function Sn(e,t){const n=e.commandLine.options.outFile;return n?lT(n,".d.ts"):Zq(t,e.commandLine,!ye.useCaseSensitiveFileNames())}function kn(e){void 0===Ke&&(Ke=new Map,Cn(e=>{Dt(P.configFilePath)!==e.sourceFile.path&&e.commandLine.fileNames.forEach(t=>Ke.set(Dt(t),e.sourceFile.path))}));const t=Ke.get(Dt(e));return t&&Dn(t)}function Cn(e){return kV($e,e)}function wn(e){if(lO(e))return void 0===Ge&&(Ge=new Map,Cn(e=>{const t=e.commandLine.options.outFile;if(t){const e=lT(t,".d.ts");Ge.set(Dt(e),!0)}else{const t=kt(()=>sU(e.commandLine,!ye.useCaseSensitiveFileNames()));h(e.commandLine.fileNames,n=>{if(!lO(n)&&!Ro(n,".json")){const r=Zq(n,e.commandLine,!ye.useCaseSensitiveFileNames(),t);Ge.set(Dt(r),n)}})}})),Ge.get(e)}function Nn(e){return Xe&&!!kn(e)}function Dn(e){if(He)return He.get(e)||void 0}function Pn(e,t){h(e.referencedFiles,(n,r)=>{dn(JU(n.fileName,e.fileName),t,!1,void 0,{kind:4,file:e.path,index:r})})}function En(e){const t=e.typeReferenceDirectives;if(!t.length)return;const n=(null==ue?void 0:ue.get(e.path))||Ot(t,e),r=wM();(le??(le=new Map)).set(e.path,r);for(let i=0;i{const r=PV(t);r?rn(An(r),!0,!0,{kind:7,file:e.path,index:n}):(te||(te=[])).push({kind:0,reason:{kind:7,file:e.path,index:n}})})}function Ln(e){return ye.getCanonicalFileName(e)}function Mn(e){var t;if(cn(e),e.imports.length||e.moduleAugmentations.length){const n=WV(e),r=(null==ce?void 0:ce.get(e.path))||At(n,e);Tn.assert(r.length===n.length);const i=(null==(t=Ct(e))?void 0:t.commandLine.options)||P,o=wM();(se??(se=new Map)).set(e.path,o);for(let t=0;tfe,f=d&&!VV(i,a,e)&&!i.noResolve&&t{_?void 0===i?r(n,i,o,Ca.Option_0_has_been_removed_Please_remove_it_from_your_configuration,n):r(n,i,o,Ca.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration,n,i):void 0===i?r(n,i,o,Ca.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error,n,t,e):r(n,i,o,Ca.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error,n,i,t,e)})}function Jn(e,t,n,r){let i;const o=e&&Q.get(e.path);let a,s,c,l,_,u=EV(t)?t:void 0,d=e&&(null==G?void 0:G.get(e.path));d?(d.fileIncludeReasonDetails?(i=new Set(o),null==o||o.forEach(h)):null==o||o.forEach(g),l=d.redirectInfo):(null==o||o.forEach(g),l=e&&d$(e)),t&&g(t);const f=(null==i?void 0:i.size)!==(null==o?void 0:o.length);u&&1===(null==i?void 0:i.size)&&(i=void 0),i&&d&&(d.details&&!f?_=yS(d.details,n,...r||p):d.fileIncludeReasonDetails&&(f?a=y()?pe(d.fileIncludeReasonDetails.next.slice(0,o.length),a[0]):[...d.fileIncludeReasonDetails.next,a[0]]:y()?a=d.fileIncludeReasonDetails.next.slice(0,o.length):c=d.fileIncludeReasonDetails)),_||(c||(c=i&&yS(a,Ca.The_file_is_in_the_program_because_Colon)),_=yS(l?c?[c,...l]:l:c,n,...r||p)),e&&(d?(!d.fileIncludeReasonDetails||!f&&c)&&(d.fileIncludeReasonDetails=c):(G??(G=new Map)).set(e.path,d={fileIncludeReasonDetails:c,redirectInfo:l}),d.details||f||(d.details=_.next));const m=u&&AV(ot,u);return m&&FV(m)?Xp(m.file,m.pos,m.end-m.pos,_,s):hS(_,s);function g(e){(null==i?void 0:i.has(e))||((i??(i=new Set)).add(e),(a??(a=[])).push(m$(ot,e)),h(e))}function h(e){!u&&EV(e)?u=e:u!==e&&(s=pe(s,function(e){let t=null==X?void 0:X.get(e);void 0===t&&(X??(X=new Map)).set(e,t=function(e){if(EV(e)){const t=AV(ot,e);let n;switch(e.kind){case 3:n=Ca.File_is_included_via_import_here;break;case 4:n=Ca.File_is_included_via_reference_here;break;case 5:n=Ca.File_is_included_via_type_library_reference_here;break;case 7:n=Ca.File_is_included_via_library_reference_here;break;default:Tn.assertNever(e)}return FV(t)?fS(t.file,t.pos,t.end-t.pos,n):void 0}if(!P.configFile)return;let t,n;switch(e.kind){case 0:if(!P.configFile.configFileSpecs)return;const i=ta(D[e.index],we),o=p$(ot,i);if(o){t=tm(P.configFile,"files",o),n=Ca.File_is_matched_by_files_list_specified_here;break}const a=f$(ot,i);if(!a||!_t(a))return;t=tm(P.configFile,"include",a),n=Ca.File_is_matched_by_include_pattern_specified_here;break;case 1:case 2:const s=Tn.checkDefined(null==$e?void 0:$e[e.index]),c=TV(A,$e,(e,t,n)=>e===s?{sourceFile:(null==t?void 0:t.sourceFile)||P.configFile,index:n}:void 0);if(!c)return;const{sourceFile:l,index:_}=c,u=nm(l,"references",e=>tP(e.initializer)?e.initializer:void 0);return u&&u.elements.length>_?$p(l,u.elements[_],2===e.kind?Ca.File_is_output_from_referenced_project_specified_here:Ca.File_is_source_from_referenced_project_specified_here):void 0;case 8:if(!P.types)return;t=Hn("types",e.typeReference),n=Ca.File_is_entry_point_of_type_library_specified_here;break;case 6:if(void 0!==e.index){t=Hn("lib",P.lib[e.index]),n=Ca.File_is_library_specified_here;break}const d=nk(OS(P));t=d?(r=d,Wn("target",e=>ON(e.initializer)&&e.initializer.text===r?e.initializer:void 0)):void 0,n=Ca.File_is_default_library_for_target_specified_here;break;default:Tn.assertNever(e)}var r;return t&&$p(P.configFile,t,n)}(e)??!1);return t||void 0}(e)))}function y(){var e;return(null==(e=d.fileIncludeReasonDetails.next)?void 0:e.length)!==(null==o?void 0:o.length)}}function zn(e,t,n,r){(te||(te=[])).push({kind:1,file:e&&e.path,fileProcessingReason:t,diagnostic:n,args:r})}function qn(e,t,n){Ce.push({file:e,diagnostic:t,args:n})}function Un(e,t,n,...r){let i=!0;$n(o=>{nP(o.initializer)&&Yf(o.initializer,e,e=>{const o=e.initializer;tP(o)&&o.elements.length>t&&(Te.add($p(P.configFile,o.elements[t],n,...r)),i=!1)})}),i&&Yn(n,...r)}function Vn(e,t,n,...r){let i=!0;$n(o=>{nP(o.initializer)&&tr(o.initializer,e,t,void 0,n,...r)&&(i=!1)}),i&&Yn(n,...r)}function Wn(e,t){return Yf(Zn(),e,t)}function $n(e){return Wn("paths",e)}function Hn(e,t){const n=Zn();return n&&Zf(n,e,t)}function Kn(e,t,n,r){Qn(!0,t,n,e,t,n,r)}function Gn(e,t,...n){Qn(!1,e,void 0,t,...n)}function Xn(e,t,n,...r){const i=nm(e||P.configFile,"references",e=>tP(e.initializer)?e.initializer:void 0);i&&i.elements.length>t?Te.add($p(e||P.configFile,i.elements[t],n,...r)):Te.add(gS(n,...r))}function Qn(e,t,n,r,...i){const o=Zn();(!o||!tr(o,e,t,n,r,...i))&&Yn(r,...i)}function Yn(e,...t){const n=er();n?"messageText"in e?Te.add(Hp(P.configFile,n.name,e)):Te.add($p(P.configFile,n.name,e,...t)):"messageText"in e?Te.add(hS(e)):Te.add(gS(e,...t))}function Zn(){if(void 0===Ee){const e=er();Ee=e&&dt(e.initializer,nP)||!1}return Ee||void 0}function er(){return void 0===Fe&&(Fe=Yf(em(P.configFile),"compilerOptions",yt)||!1),Fe||void 0}function tr(e,t,n,r,i,...o){let a=!1;return Yf(e,n,e=>{"messageText"in i?Te.add(Hp(P.configFile,t?e.name:e.initializer,i)):Te.add($p(P.configFile,t?e.name:e.initializer,i,...o)),a=!0},r),a}function nr(e,t){Pe.set(Dt(e),!0),Te.add(t)}function rr(e,t){return 0===fa(e,t,we,!ye.useCaseSensitiveFileNames())}function ir(){return ye.getSymlinkCache?ye.getSymlinkCache():(q||(q=dk(we,Ln)),B&&!q.hasProcessedResolutions()&&q.setSymlinksFromResolutions(ut,pt,ie),q)}function or(e,t){var n;return pV(e,t,(null==(n=Ct(e))?void 0:n.commandLine.options)||P)}}var BV={diagnostics:p,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};function JV(e,t,n,r){const i=e.getCompilerOptions();if(i.noEmit)return e.getSemanticDiagnostics(t,r),t||i.outFile?BV:e.emitBuildInfo(n,r);if(!i.noEmitOnError)return;let o,a=[...e.getOptionsDiagnostics(r),...e.getSyntacticDiagnostics(t,r),...e.getGlobalDiagnostics(r),...e.getSemanticDiagnostics(t,r)];if(0===a.length&&VS(e.getCompilerOptions())&&(a=e.getDeclarationDiagnostics(void 0,r)),a.length){if(!t&&!i.outFile){const t=e.emitBuildInfo(n,r);t.diagnostics&&(a=[...a,...t.diagnostics]),o=t.emittedFiles}return{diagnostics:a,sourceMaps:void 0,emittedFiles:o,emitSkipped:!0}}}function zV(e,t){return O(e,e=>!e.skippedOn||!t[e.skippedOn])}function qV(e,t=e){return{fileExists:e=>t.fileExists(e),readDirectory:(e,n,r,i,o)=>(Tn.assertIsDefined(t.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(e,n,r,i,o)),readFile:e=>t.readFile(e),directoryExists:nt(t,t.directoryExists),getDirectories:nt(t,t.getDirectories),realpath:nt(t,t.realpath),useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),getCurrentDirectory:()=>e.getCurrentDirectory(),onUnRecoverableConfigFileDiagnostic:e.onUnRecoverableConfigFileDiagnostic||ht,trace:e.trace?t=>e.trace(t):void 0}}function UV(e){return B$(e.path)}function VV(e,{extension:t},{isDeclarationFile:n}){switch(t){case".ts":case".d.ts":case".mts":case".d.mts":case".cts":case".d.cts":return;case".tsx":return r();case".jsx":return r()||i();case".js":case".mjs":case".cjs":return i();case".json":return US(e)?void 0:Ca.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used;default:return n||e.allowArbitraryExtensions?void 0:Ca.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}function r(){return e.jsx?void 0:Ca.Module_0_was_resolved_to_1_but_jsx_is_not_set}function i(){return KS(e)||!tk(e,"noImplicitAny")?void 0:Ca.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}}function WV({imports:e,moduleAugmentations:t}){const n=e.map(e=>e);for(const e of t)11===e.kind&&n.push(e);return n}function $V({imports:e,moduleAugmentations:t},n){if(n(e[e.ComputedDts=0]="ComputedDts",e[e.StoredSignatureAtEmit=1]="StoredSignatureAtEmit",e[e.UsedVersion=2]="UsedVersion",e))(GV||{});(e=>{function t(){return function(e,t,r){const i={getKeys:e=>t.get(e),getValues:t=>e.get(t),keys:()=>e.keys(),size:()=>e.size,deleteKey:i=>{(r||(r=new Set)).add(i);const o=e.get(i);return!!o&&(o.forEach(e=>n(t,e,i)),e.delete(i),!0)},set:(o,a)=>{null==r||r.delete(o);const s=e.get(o);return e.set(o,a),null==s||s.forEach(e=>{a.has(e)||n(t,e,o)}),a.forEach(e=>{(null==s?void 0:s.has(e))||function(e,t,n){let r=e.get(t);r||(r=new Set,e.set(t,r));r.add(n)}(t,e,o)}),i}};return i}(new Map,new Map,void 0)}function n(e,t,n){const r=e.get(t);return!!(null==r?void 0:r.delete(n))&&(r.size||e.delete(t),!0)}function r(e,t){const n=e.getSymbolAtLocation(t);return n&&function(e){return $(e.declarations,e=>{var t;return null==(t=Dd(e))?void 0:t.resolvedPath})}(n)}function i(e,t,n,r){return ia(e.getProjectReferenceRedirect(t)||t,n,r)}function o(e,t,n){let o;if(t.imports&&t.imports.length>0){const n=e.getTypeChecker();for(const e of t.imports){const t=r(n,e);null==t||t.forEach(c)}}const a=Vo(t.resolvedPath);if(t.referencedFiles&&t.referencedFiles.length>0)for(const r of t.referencedFiles){c(i(e,r.fileName,a,n))}if(e.forEachResolvedTypeReferenceDirective(({resolvedTypeReferenceDirective:t})=>{if(!t)return;const r=t.resolvedFileName;c(i(e,r,a,n))},t),t.moduleAugmentations.length){const n=e.getTypeChecker();for(const e of t.moduleAugmentations){if(!ON(e))continue;const t=n.getSymbolAtLocation(e);t&&s(t)}}for(const t of e.getTypeChecker().getAmbientModules())t.declarations&&t.declarations.length>1&&s(t);return o;function s(e){if(e.declarations)for(const n of e.declarations){const e=Dd(n);e&&e!==t&&c(e.resolvedPath)}}function c(e){(o||(o=new Set)).add(e)}}function a(e,t){return t&&!t.referencedMap==!e}function s(e){return 0===e.module||e.outFile?void 0:t()}function c(e,t,n,r,i){const o=t.getSourceFileByPath(n);return o?_(e,t,o,r,i)?(e.referencedMap?h:g)(e,t,o,r,i):[o]:p}function l(e,t,n,r,i){e.emit(t,(n,o,a,s,c,l)=>{Tn.assert(lO(n),`File extension for signature expected to be dts: Got:: ${n}`),i(xW(e,t,o,r,l),c)},n,!0,void 0,!0)}function _(e,t,n,r,i,o=e.useFileVersionAsSignature){var a;if(null==(a=e.hasCalledUpdateShapeSignature)?void 0:a.has(n.resolvedPath))return!1;const s=e.fileInfos.get(n.resolvedPath),c=s.signature;let _;return n.isDeclarationFile||o||l(t,n,r,i,t=>{_=t,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,0)}),void 0===_&&(_=n.version,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,2)),(e.oldSignatures||(e.oldSignatures=new Map)).set(n.resolvedPath,c||!1),(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n.resolvedPath),s.signature=_,_!==c}function u(e,t){if(!e.allFileNames){const n=t.getSourceFiles();e.allFileNames=n===p?p:n.map(e=>e.fileName)}return e.allFileNames}function d(e,t){const n=e.referencedMap.getKeys(t);return n?We(n.keys()):[]}function f(e){return function(e){return ee(e.moduleAugmentations,e=>vp(e.parent))}(e)||!af(e)&&!sf(e)&&!function(e){for(const t of e.statements)if(!fp(t))return!1;return!0}(e)}function m(e,t,n){if(e.allFilesExcludingDefaultLibraryFile)return e.allFilesExcludingDefaultLibraryFile;let r;n&&i(n);for(const e of t.getSourceFiles())e!==n&&i(e);return e.allFilesExcludingDefaultLibraryFile=r||p,e.allFilesExcludingDefaultLibraryFile;function i(e){t.isSourceFileDefaultLibrary(e)||(r||(r=[])).push(e)}}function g(e,t,n){const r=t.getCompilerOptions();return r&&r.outFile?[n]:m(e,t,n)}function h(e,t,n,r,i){if(f(n))return m(e,t,n);const o=t.getCompilerOptions();if(o&&(RS(o)||o.outFile))return[n];const a=new Map;a.set(n.resolvedPath,n);const s=d(e,n.resolvedPath);for(;s.length>0;){const n=s.pop();if(!a.has(n)){const o=t.getSourceFileByPath(n);a.set(n,o),o&&_(e,t,o,r,i)&&s.push(...d(e,o.resolvedPath))}}return We(H(a.values(),e=>e))}e.createManyToManyPathMap=t,e.canReuseOldState=a,e.createReferencedMap=s,e.create=function(e,t,n){var r,i;const c=new Map,l=e.getCompilerOptions(),_=s(l),u=a(_,t);e.getTypeChecker();for(const n of e.getSourceFiles()){const a=Tn.checkDefined(n.version,"Program intended to be used with Builder should have source files with versions set"),s=u?null==(r=t.oldSignatures)?void 0:r.get(n.resolvedPath):void 0,d=void 0===s?u?null==(i=t.fileInfos.get(n.resolvedPath))?void 0:i.signature:void 0:s||void 0;if(_){const t=o(e,n,e.getCanonicalFileName);t&&_.set(n.resolvedPath,t)}c.set(n.resolvedPath,{version:a,signature:d,affectsGlobalScope:l.outFile?void 0:f(n)||void 0,impliedFormat:n.impliedNodeFormat})}return{fileInfos:c,referencedMap:_,useFileVersionAsSignature:!n&&!u}},e.releaseCache=function(e){e.allFilesExcludingDefaultLibraryFile=void 0,e.allFileNames=void 0},e.getFilesAffectedBy=function(e,t,n,r,i){var o;const a=c(e,t,n,r,i);return null==(o=e.oldSignatures)||o.clear(),a},e.getFilesAffectedByWithOldState=c,e.updateSignatureOfFile=function(e,t,n){e.fileInfos.get(n).signature=t,(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n)},e.computeDtsSignature=l,e.updateShapeSignature=_,e.getAllDependencies=function(e,t,n){if(t.getCompilerOptions().outFile)return u(e,t);if(!e.referencedMap||f(n))return u(e,t);const r=new Set,i=[n.resolvedPath];for(;i.length;){const t=i.pop();if(!r.has(t)){r.add(t);const n=e.referencedMap.getValues(t);if(n)for(const e of n.keys())i.push(e)}}return We(H(r.keys(),e=>{var n;return(null==(n=t.getSourceFileByPath(e))?void 0:n.fileName)??e}))},e.getReferencedByPaths=d,e.getAllFilesExcludingDefaultLibraryFile=m})(KV||(KV={}));var XV=(e=>(e[e.None=0]="None",e[e.Js=1]="Js",e[e.JsMap=2]="JsMap",e[e.JsInlineMap=4]="JsInlineMap",e[e.Dts=8]="Dts",e[e.DtsMap=16]="DtsMap",e[e.AllJs=7]="AllJs",e[e.AllDts=24]="AllDts",e[e.All=31]="All",e))(XV||{});function QV(e){let t=1;return e.sourceMap&&(t|=2),e.inlineSourceMap&&(t|=4),VS(e)&&(t|=8),e.declarationMap&&(t|=16),e.emitDeclarationOnly&&(t&=24),t}function YV(e,t){const n=t&&(ut(t)?t:QV(t)),r=ut(e)?e:QV(e);if(n===r)return 0;if(!n||!r)return r;const i=n^r;let o=0;return 7&i&&(o=7&r),24&i&&(o|=24&r),o}function ZV(e,t){var n,r;const i=KV.create(e,t,!1);i.program=e;const o=e.getCompilerOptions();i.compilerOptions=o;const a=o.outFile;a?o.composite&&(null==t?void 0:t.outSignature)&&a===t.compilerOptions.outFile&&(i.outSignature=t.outSignature&&tW(o,t.compilerOptions,t.outSignature)):i.semanticDiagnosticsPerFile=new Map,i.changedFilesSet=new Set,i.latestChangedDtsFile=o.composite?null==t?void 0:t.latestChangedDtsFile:void 0;const s=KV.canReuseOldState(i.referencedMap,t),c=s?t.compilerOptions:void 0,l=s&&t.semanticDiagnosticsPerFile&&!!i.semanticDiagnosticsPerFile&&!ik(o,c),_=o.composite&&(null==t?void 0:t.emitSignatures)&&!a&&!ak(o,t.compilerOptions);s?(null==(n=t.changedFilesSet)||n.forEach(e=>i.changedFilesSet.add(e)),!a&&(null==(r=t.affectedFilesPendingEmit)?void 0:r.size)&&(i.affectedFilesPendingEmit=new Map(t.affectedFilesPendingEmit),i.seenAffectedFiles=new Set),i.programEmitPending=t.programEmitPending):i.buildInfoEmitPending=!0;const u=i.referencedMap,d=s?t.referencedMap:void 0,p=l&&!o.skipLibCheck==!c.skipLibCheck,f=p&&!o.skipDefaultLibCheck==!c.skipDefaultLibCheck;if(i.fileInfos.forEach((n,r)=>{var a;let c,m;if(!s||!(c=t.fileInfos.get(r))||c.version!==n.version||c.impliedFormat!==n.impliedFormat||(g=m=u&&u.getValues(r),h=d&&d.getValues(r),g!==h&&(void 0===g||void 0===h||g.size!==h.size||gd(g,e=>!h.has(e))))||m&&gd(m,e=>!i.fileInfos.has(e)&&t.fileInfos.has(e)))eW(i,r);else{const n=e.getSourceFileByPath(r),o=null==(a=t.emitDiagnosticsPerFile)?void 0:a.get(r);if(o&&(i.emitDiagnosticsPerFile??(i.emitDiagnosticsPerFile=new Map)).set(r,t.hasReusableDiagnostic?oW(o,r,e):nW(o,e)),l){if(n.isDeclarationFile&&!p)return;if(n.hasNoDefaultLib&&!f)return;const o=t.semanticDiagnosticsPerFile.get(r);o&&(i.semanticDiagnosticsPerFile.set(r,t.hasReusableDiagnostic?oW(o,r,e):nW(o,e)),(i.semanticDiagnosticsFromOldState??(i.semanticDiagnosticsFromOldState=new Set)).add(r))}}var g,h;if(_){const e=t.emitSignatures.get(r);e&&(i.emitSignatures??(i.emitSignatures=new Map)).set(r,tW(o,t.compilerOptions,e))}}),s&&md(t.fileInfos,(e,t)=>!i.fileInfos.has(t)&&(!(!a&&!e.affectsGlobalScope)||(i.buildInfoEmitPending=!0,!1))))KV.getAllFilesExcludingDefaultLibraryFile(i,e,void 0).forEach(e=>eW(i,e.resolvedPath));else if(c){const t=ok(o,c)?QV(o):YV(o,c);0!==t&&(a?i.programEmitPending=i.programEmitPending?i.programEmitPending|t:t:(e.getSourceFiles().forEach(e=>{i.changedFilesSet.has(e.resolvedPath)||TW(i,e.resolvedPath,t)}),Tn.assert(!i.seenAffectedFiles||!i.seenAffectedFiles.size),i.seenAffectedFiles=i.seenAffectedFiles||new Set,i.buildInfoEmitPending=!0))}return i}function eW(e,t){e.changedFilesSet.add(t),e.buildInfoEmitPending=!0,e.programEmitPending=void 0}function tW(e,t,n){return!!e.declarationMap==!!t.declarationMap?n:_t(n)?[n]:n[0]}function nW(e,t){return e.length?B(e,e=>{if(_t(e.messageText))return e;const n=rW(e.messageText,e.file,t,e=>{var t;return null==(t=e.repopulateInfo)?void 0:t.call(e)});return n===e.messageText?e:{...e,messageText:n}}):e}function rW(e,t,n,r){const i=r(e);if(i)return{...Sd(t,n,i.moduleReference,i.mode,i.packageName||i.moduleReference),next:iW(e.next,t,n,r)};const o=iW(e.next,t,n,r);return o===e.next?e:{...e,next:o}}function iW(e,t,n,r){return B(e,e=>rW(e,t,n,r))}function oW(e,t,n){if(!e.length)return p;let r;return e.map(e=>{const r=aW(e,t,n,i);r.reportsUnnecessary=e.reportsUnnecessary,r.reportsDeprecated=e.reportDeprecated,r.source=e.source,r.skippedOn=e.skippedOn;const{relatedInformation:o}=e;return r.relatedInformation=o?o.length?o.map(e=>aW(e,t,n,i)):[]:void 0,r});function i(e){return r??(r=Vo(ta(Hq(n.getCompilerOptions()),n.getCurrentDirectory()))),ia(e,r,n.getCanonicalFileName)}}function aW(e,t,n,r){const{file:i}=e,o=!1!==i?n.getSourceFileByPath(i?r(i):t):void 0;return{...e,file:o,messageText:_t(e.messageText)?e.messageText:rW(e.messageText,o,n,e=>e.info)}}function sW(e,t){Tn.assert(!t||!e.affectedFiles||e.affectedFiles[e.affectedFilesIndex-1]!==t||!e.semanticDiagnosticsPerFile.has(t.resolvedPath))}function cW(e,t,n){for(var r;;){const{affectedFiles:i}=e;if(i){const o=e.seenAffectedFiles;let a=e.affectedFilesIndex;for(;at.isSourceFileDefaultLibrary(r)&&!wT(r,n,t)&&dW(e,r.resolvedPath))}}function _W(e,t,n,r){if(dW(e,t.resolvedPath),e.allFilesExcludingDefaultLibraryFile===e.affectedFiles)return lW(e),void KV.updateShapeSignature(e,Tn.checkDefined(e.program),t,n,r);e.compilerOptions.assumeChangesOnlyAffectDirectDependencies||function(e,t,n,r){var i,o;if(!e.referencedMap||!e.changedFilesSet.has(t.resolvedPath))return;if(!pW(e,t.resolvedPath))return;if(RS(e.compilerOptions)){const i=new Map;i.set(t.resolvedPath,!0);const o=KV.getReferencedByPaths(e,t.resolvedPath);for(;o.length>0;){const t=o.pop();if(!i.has(t)){if(i.set(t,!0),fW(e,t,!1,n,r))return;if(uW(e,t,!1,n,r),pW(e,t)){const n=Tn.checkDefined(e.program).getSourceFileByPath(t);o.push(...KV.getReferencedByPaths(e,n.resolvedPath))}}}}const a=new Set,s=!!(null==(i=t.symbol)?void 0:i.exports)&&!!md(t.symbol.exports,n=>{if(128&n.flags)return!0;const r=kx(n,e.program.getTypeChecker());return r!==n&&(!!(128&r.flags)&&ee(r.declarations,e=>Dd(e)===t))});null==(o=e.referencedMap.getKeys(t.resolvedPath))||o.forEach(t=>{if(fW(e,t,s,n,r))return!0;const i=e.referencedMap.getKeys(t);return i&&gd(i,t=>mW(e,t,s,a,n,r))})}(e,t,n,r)}function uW(e,t,n,r,i){if(dW(e,t),!e.changedFilesSet.has(t)){const o=Tn.checkDefined(e.program),a=o.getSourceFileByPath(t);a&&(KV.updateShapeSignature(e,o,a,r,i,!0),n?TW(e,t,QV(e.compilerOptions)):VS(e.compilerOptions)&&TW(e,t,e.compilerOptions.declarationMap?24:8))}}function dW(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function pW(e,t){const n=Tn.checkDefined(e.oldSignatures).get(t)||void 0;return Tn.checkDefined(e.fileInfos.get(t)).signature!==n}function fW(e,t,n,r,i){var o;return!!(null==(o=e.fileInfos.get(t))?void 0:o.affectsGlobalScope)&&(KV.getAllFilesExcludingDefaultLibraryFile(e,e.program,void 0).forEach(t=>uW(e,t.resolvedPath,n,r,i)),lW(e),!0)}function mW(e,t,n,r,i,o){var a;if(X(r,t)){if(fW(e,t,n,i,o))return!0;uW(e,t,n,i,o),null==(a=e.referencedMap.getKeys(t))||a.forEach(t=>mW(e,t,n,r,i,o))}}function gW(e,t,n){return ne(function(e,t,n){const r=t.resolvedPath;if(e.semanticDiagnosticsPerFile){const t=e.semanticDiagnosticsPerFile.get(r);if(t)return zV(t,e.compilerOptions)}const i=Tn.checkDefined(e.program).getBindAndCheckDiagnostics(t,n);e.semanticDiagnosticsPerFile&&e.semanticDiagnosticsPerFile.set(r,i);return zV(i,e.compilerOptions)}(e,t,n),Tn.checkDefined(e.program).getProgramDiagnostics(t))}function hW(e){var t;return!!(null==(t=e.options)?void 0:t.outFile)}var yW=(e=>(e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram",e))(yW||{});function vW(e,t,n,r,i,o){let a,s,c;return void 0===e?(Tn.assert(void 0===t),a=n,c=r,Tn.assert(!!c),s=c.getProgram()):ct(e)?(c=r,s=RV({rootNames:e,options:t,host:n,oldProgram:c&&c.getProgramOrUndefined(),configFileParsingDiagnostics:i,projectReferences:o}),a=n):(s=e,a=t,c=n,i=r),{host:a,newProgram:s,oldProgram:c,configFileParsingDiagnostics:i||p}}function bW(e,t){return void 0!==(null==t?void 0:t.sourceMapUrlPos)?e.substring(0,t.sourceMapUrlPos):e}function xW(e,t,n,r,i){var o;let a;return n=bW(n,i),(null==(o=null==i?void 0:i.diagnostics)?void 0:o.length)&&(n+=i.diagnostics.map(n=>`${function(n){if(n.file.resolvedPath===t.resolvedPath)return`(${n.start},${n.length})`;void 0===a&&(a=Vo(t.resolvedPath));return`${sa(ya(a,n.file.resolvedPath,e.getCanonicalFileName))}(${n.start},${n.length})`}(n)}${xi[n.category]}${n.code}: ${s(n.messageText)}`).join("\n")),(r.createHash??Qi)(n);function s(e){return _t(e)?e:void 0===e?"":e.next?e.messageText+e.next.map(s).join("\n"):e.messageText}}function SW(e,t,n){return(t.createHash??Qi)(bW(e,n))}function kW(e,{newProgram:t,host:n,oldProgram:r,configFileParsingDiagnostics:i}){let o=r&&r.getState();if(o&&t===o.program&&i===t.getConfigFileParsingDiagnostics())return t=void 0,o=void 0,r;const a=ZV(t,o);t.getBuildInfo=()=>function(e){var t,n;const r=Tn.checkDefined(e.program).getCurrentDirectory(),i=Vo(ta(Hq(e.compilerOptions),r)),o=e.latestChangedDtsFile?x(e.latestChangedDtsFile):void 0,a=[],s=new Map,c=new Set(e.program.getRootFileNames().map(t=>ia(t,r,e.program.getCanonicalFileName))),l=[];if(e.compilerOptions.outFile){const t=We(e.fileInfos.entries(),([e,t])=>(C(e,k(e)),t.impliedFormat?{version:t.version,impliedFormat:t.impliedFormat,signature:void 0,affectsGlobalScope:void 0}:t.version));return pU({fileNames:a,fileInfos:t,root:l,resolvedRoot:w(),options:N(e.compilerOptions),outSignature:e.outSignature,latestChangedDtsFile:o,pendingEmit:e.programEmitPending?e.programEmitPending!==QV(e.compilerOptions)&&e.programEmitPending:void 0})}let _,u,d;const f=We(e.fileInfos.entries(),([t,n])=>{var r,i;const o=k(t);C(t,o),Tn.assert(a[o-1]===S(t));const s=null==(r=e.oldSignatures)?void 0:r.get(t),c=void 0!==s?s||void 0:n.signature;if(e.compilerOptions.composite){const n=e.program.getSourceFileByPath(t);if(!sf(n)&&uv(n,e.program)){const n=null==(i=e.emitSignatures)?void 0:i.get(t);n!==c&&(d=pe(d,void 0===n?o:[o,_t(n)||n[0]!==c?n:p]))}}return n.version===c?n.affectsGlobalScope||n.impliedFormat?{version:n.version,signature:void 0,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:n.version:void 0!==c?void 0===s?n:{version:n.version,signature:c,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:{version:n.version,signature:!1,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}});let m;(null==(t=e.referencedMap)?void 0:t.size())&&(m=We(e.referencedMap.keys()).sort(Rt).map(t=>[k(t),T(e.referencedMap.getValues(t))]));const g=function(){let t;return e.fileInfos.forEach((n,r)=>{var i;const o=null==(i=e.semanticDiagnosticsPerFile)?void 0:i.get(r);o?o.length&&(t=pe(t,[k(r),P(o,r)])):e.changedFilesSet.has(r)||(t=pe(t,k(r)))}),t}();let y,v;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size){const t=QV(e.compilerOptions),n=new Set;for(const r of We(e.affectedFilesPendingEmit.keys()).sort(Rt))if(X(n,r)){const n=e.program.getSourceFileByPath(r);if(!n||!uv(n,e.program))continue;const i=k(r),o=e.affectedFilesPendingEmit.get(r);y=pe(y,o===t?i:8===o?[i]:[i,o])}}if(e.changedFilesSet.size)for(const t of We(e.changedFilesSet.keys()).sort(Rt))v=pe(v,k(t));const b=function(){var t;let n;if(!(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size))return n;for(const t of We(e.emitDiagnosticsPerFile.keys()).sort(Rt)){const r=e.emitDiagnosticsPerFile.get(t);n=pe(n,[k(t),P(r,t)])}return n}();return pU({fileNames:a,fileInfos:f,root:l,resolvedRoot:w(),options:N(e.compilerOptions),fileIdsList:_,referencedMap:m,semanticDiagnosticsPerFile:g,emitDiagnosticsPerFile:b,affectedFilesPendingEmit:y,changeFileSet:v,emitSignatures:d,latestChangedDtsFile:o});function x(e){return S(ta(e,r))}function S(t){return sa(ya(i,t,e.program.getCanonicalFileName))}function k(e){let t=s.get(e);return void 0===t&&(a.push(S(e)),s.set(e,t=a.length)),t}function T(e){const t=We(e.keys(),k).sort(It),n=t.join();let r=null==u?void 0:u.get(n);return void 0===r&&(_=pe(_,t),(u??(u=new Map)).set(n,r=_.length)),r}function C(t,n){const r=e.program.getSourceFile(t);if(!e.program.getFileIncludeReasons().get(r.path).some(e=>0===e.kind))return;if(!l.length)return l.push(n);const i=l[l.length-1],o=ct(i);if(o&&i[1]===n-1)return i[1]=n;if(o||1===l.length||i!==n-1)return l.push(n);const a=l[l.length-2];return ut(a)&&a===i-1?(l[l.length-2]=[a,n],l.length=l.length-1):l.push(n)}function w(){let t;return c.forEach(n=>{const r=e.program.getSourceFileByPath(n);r&&n!==r.resolvedPath&&(t=pe(t,[k(r.resolvedPath),k(n)]))}),t}function N(e){let t;const{optionsNameMap:n}=HO();for(const r of ze(e).sort(Rt)){const i=n.get(r.toLowerCase());(null==i?void 0:i.affectsBuildInfo)&&((t||(t={}))[r]=D(i,e[r]))}return t}function D(e,t){if(e)if(Tn.assert("listOrElement"!==e.type),"list"===e.type){const n=t;if(e.element.isFilePath&&n.length)return n.map(x)}else if(e.isFilePath)return x(t);return t}function P(e,t){return Tn.assert(!!e.length),e.map(e=>{const n=E(e,t);n.reportsUnnecessary=e.reportsUnnecessary,n.reportDeprecated=e.reportsDeprecated,n.source=e.source,n.skippedOn=e.skippedOn;const{relatedInformation:r}=e;return n.relatedInformation=r?r.length?r.map(e=>E(e,t)):[]:void 0,n})}function E(e,t){const{file:n}=e;return{...e,file:!!n&&(n.resolvedPath===t?void 0:S(n.resolvedPath)),messageText:_t(e.messageText)?e.messageText:F(e.messageText)}}function F(e){if(e.repopulateInfo)return{info:e.repopulateInfo(),next:A(e.next)};const t=A(e.next);return t===e.next?e:{...e,next:t}}function A(e){return e&&h(e,(t,n)=>{const r=F(t);if(t===r)return;const i=n>0?e.slice(0,n-1):[];i.push(r);for(let t=n+1;ta,c=EW(s,i);return c.getState=s,c.saveEmitState=()=>function(e){const t=e.compilerOptions.outFile;return Tn.assert(!e.changedFilesSet.size||t),{affectedFilesPendingEmit:e.affectedFilesPendingEmit&&new Map(e.affectedFilesPendingEmit),seenEmittedFiles:e.seenEmittedFiles&&new Map(e.seenEmittedFiles),programEmitPending:e.programEmitPending,emitSignatures:e.emitSignatures&&new Map(e.emitSignatures),outSignature:e.outSignature,latestChangedDtsFile:e.latestChangedDtsFile,hasChangedEmitSignature:e.hasChangedEmitSignature,changedFilesSet:t?new Set(e.changedFilesSet):void 0,buildInfoEmitPending:e.buildInfoEmitPending,emitDiagnosticsPerFile:e.emitDiagnosticsPerFile&&new Map(e.emitDiagnosticsPerFile)}}(a),c.restoreEmitState=e=>function(e,t){e.affectedFilesPendingEmit=t.affectedFilesPendingEmit,e.seenEmittedFiles=t.seenEmittedFiles,e.programEmitPending=t.programEmitPending,e.emitSignatures=t.emitSignatures,e.outSignature=t.outSignature,e.latestChangedDtsFile=t.latestChangedDtsFile,e.hasChangedEmitSignature=t.hasChangedEmitSignature,e.buildInfoEmitPending=t.buildInfoEmitPending,e.emitDiagnosticsPerFile=t.emitDiagnosticsPerFile,t.changedFilesSet&&(e.changedFilesSet=t.changedFilesSet)}(a,e),c.hasChangedEmitSignature=()=>!!a.hasChangedEmitSignature,c.getAllDependencies=e=>KV.getAllDependencies(a,Tn.checkDefined(a.program),e),c.getSemanticDiagnostics=function(e,t){sW(a,e);if(Tn.checkDefined(a.program).getCompilerOptions().outFile)return Tn.assert(!a.semanticDiagnosticsPerFile),Tn.checkDefined(a.program).getSemanticDiagnostics(e,t);if(e)return gW(a,e,t);for(;u(t););let n;for(const e of Tn.checkDefined(a.program).getSourceFiles())n=ge(n,gW(a,e,t));return n||p},c.emit=function(t,n,r,i,o){1===e&&sW(a,t);const s=JV(c,t,n,r);if(s)return s;if(!t){if(1===e){let e,t,a=[],s=!1,c=[];for(;t=l(n,r,i,o);)s=s||t.result.emitSkipped,e=ge(e,t.result.diagnostics),c=ge(c,t.result.emittedFiles),a=ge(a,t.result.sourceMaps);return{emitSkipped:s,diagnostics:e||p,emittedFiles:c,sourceMaps:a}}!function(e,t){var n;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size)t?e.affectedFilesPendingEmit.forEach((t,n)=>{const r=7&t;r?e.affectedFilesPendingEmit.set(n,r):e.affectedFilesPendingEmit.delete(n)}):e.affectedFilesPendingEmit=void 0}(a,i)}return Tn.checkDefined(a.program).emit(t,_(n,o),r,i,o)},c.releaseProgram=()=>function(e){KV.releaseCache(e),e.program=void 0}(a),0===e?c.getSemanticDiagnosticsOfNextAffectedFile=u:1===e?(c.getSemanticDiagnosticsOfNextAffectedFile=u,c.emitNextAffectedFile=l,c.emitBuildInfo=function(e,t){if(a.buildInfoEmitPending){const r=Tn.checkDefined(a.program).emitBuildInfo(e||nt(n,n.writeFile),t);return a.buildInfoEmitPending=!1,r}return BV}):St(),c;function l(e,t,r,i){var o,s,c;let l=cW(a,t,n);const u=QV(a.compilerOptions);let d,p=r?24&u:u;if(!l)if(a.compilerOptions.outFile){if(!a.programEmitPending)return;if(p=a.programEmitPending,r&&(p&=24),!p)return;l=a.program}else{const i=function(e,t){var n;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size)return md(e.affectedFilesPendingEmit,(n,r)=>{var i;const o=e.program.getSourceFileByPath(r);if(!o||!uv(o,e.program))return void e.affectedFilesPendingEmit.delete(r);let a=YV(n,null==(i=e.seenEmittedFiles)?void 0:i.get(o.resolvedPath));return t&&(a&=24),a?{affectedFile:o,emitKind:a}:void 0})}(a,r);if(!i){const r=function(e){var t;if(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size)return md(e.emitDiagnosticsPerFile,(t,n)=>{var r;const i=e.program.getSourceFileByPath(n);if(!i||!uv(i,e.program))return void e.emitDiagnosticsPerFile.delete(n);const o=(null==(r=e.seenEmittedFiles)?void 0:r.get(i.resolvedPath))||0;return 24&o?void 0:{affectedFile:i,diagnostics:t,seenKind:o}})}(a);if(r)return(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(r.affectedFile.resolvedPath,24|r.seenKind),{result:{emitSkipped:!0,diagnostics:r.diagnostics},affected:r.affectedFile};if(!a.buildInfoEmitPending)return;const i=a.program,o=i.emitBuildInfo(e||nt(n,n.writeFile),t);return a.buildInfoEmitPending=!1,{result:o,affected:i}}({affectedFile:l,emitKind:p}=i)}7&p&&(d=0),24&p&&(d=void 0===d?1:void 0),l===a.program&&(a.programEmitPending=a.changedFilesSet.size?YV(u,p):a.programEmitPending?YV(a.programEmitPending,p):void 0);const f=a.program.emit(l===a.program?void 0:l,_(e,i),t,d,i);if(l!==a.program){const e=l;a.seenAffectedFiles.add(e.resolvedPath),void 0!==a.affectedFilesIndex&&a.affectedFilesIndex++,a.buildInfoEmitPending=!0;const t=(null==(o=a.seenEmittedFiles)?void 0:o.get(e.resolvedPath))||0;(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(e.resolvedPath,p|t);const n=YV((null==(s=a.affectedFilesPendingEmit)?void 0:s.get(e.resolvedPath))||u,p|t);n?(a.affectedFilesPendingEmit??(a.affectedFilesPendingEmit=new Map)).set(e.resolvedPath,n):null==(c=a.affectedFilesPendingEmit)||c.delete(e.resolvedPath),f.diagnostics.length&&(a.emitDiagnosticsPerFile??(a.emitDiagnosticsPerFile=new Map)).set(e.resolvedPath,f.diagnostics)}else a.changedFilesSet.clear();return{result:f,affected:l}}function _(e,t){return VS(a.compilerOptions)?(r,i,o,s,c,l)=>{var _,u,d;if(lO(r))if(a.compilerOptions.outFile){if(a.compilerOptions.composite){const e=p(a.outSignature,void 0);if(!e)return;a.outSignature=e}}else{let e;if(Tn.assert(1===(null==c?void 0:c.length)),!t){const t=c[0],r=a.fileInfos.get(t.resolvedPath);if(r.signature===t.version){const o=xW(a.program,t,i,n,l);if((null==(_=null==l?void 0:l.diagnostics)?void 0:_.length)||(e=o),o!==t.version)if(n.storeSignatureInfo&&(a.signatureInfo??(a.signatureInfo=new Map)).set(t.resolvedPath,1),a.affectedFiles){void 0===(null==(u=a.oldSignatures)?void 0:u.get(t.resolvedPath))&&(a.oldSignatures??(a.oldSignatures=new Map)).set(t.resolvedPath,r.signature||!1),r.signature=o}else r.signature=o}}if(a.compilerOptions.composite){const t=c[0].resolvedPath;if(e=p(null==(d=a.emitSignatures)?void 0:d.get(t),e),!e)return;(a.emitSignatures??(a.emitSignatures=new Map)).set(t,e)}}function p(e,t){const o=!e||_t(e)?e:e[0];if(t??(t=SW(i,n,l)),t===o){if(e===o)return;l?l.differsOnlyInMap=!0:l={differsOnlyInMap:!0}}else a.hasChangedEmitSignature=!0,a.latestChangedDtsFile=r;return t}e?e(r,i,o,s,c,l):n.writeFile?n.writeFile(r,i,o,s,c,l):a.program.writeFile(r,i,o,s,c,l)}:e||nt(n,n.writeFile)}function u(e,t){for(;;){const r=cW(a,e,n);let i;if(!r)return;if(r!==a.program){const n=r;if(t&&t(n)||(i=gW(a,n,e)),a.seenAffectedFiles.add(n.resolvedPath),a.affectedFilesIndex++,a.buildInfoEmitPending=!0,!i)continue}else i=a.program.getSemanticDiagnostics(void 0,e),a.changedFilesSet.clear(),a.programEmitPending=QV(a.compilerOptions);return{result:i,affected:r}}}}function TW(e,t,n){var r,i;const o=(null==(r=e.affectedFilesPendingEmit)?void 0:r.get(t))||0;(e.affectedFilesPendingEmit??(e.affectedFilesPendingEmit=new Map)).set(t,o|n),null==(i=e.emitDiagnosticsPerFile)||i.delete(t)}function CW(e){return _t(e)?{version:e,signature:e,affectsGlobalScope:void 0,impliedFormat:void 0}:_t(e.signature)?e:{version:e.version,signature:!1===e.signature?void 0:e.version,affectsGlobalScope:e.affectsGlobalScope,impliedFormat:e.impliedFormat}}function wW(e,t){return ut(e)?t:e[1]||8}function NW(e,t){return e||QV(t||{})}function DW(e,t,n){var r,i,o,a;const s=e.program,c=Vo(ta(t,n.getCurrentDirectory())),l=on(n.useCaseSensitiveFileNames());let _;const u=null==(r=s.fileNames)?void 0:r.map(function(e){return ia(e,c,l)});let d;const f=s.latestChangedDtsFile?g(s.latestChangedDtsFile):void 0;if(hW(s)){const e=new Map;s.fileInfos.forEach((t,n)=>{const r=h(n+1);e.set(r,_t(t)?{version:t,signature:void 0,affectsGlobalScope:void 0,impliedFormat:void 0}:t)}),_={fileInfos:e,compilerOptions:s.options?Gj(s.options,g):{},latestChangedDtsFile:f,outSignature:s.outSignature,programEmitPending:void 0===s.pendingEmit?void 0:NW(s.pendingEmit,s.options)}}else{d=null==(i=s.fileIdsList)?void 0:i.map(e=>new Set(e.map(h)));const e=new Map,t=(null==(o=s.options)?void 0:o.composite)&&!s.options.outFile?new Map:void 0;s.fileInfos.forEach((n,r)=>{const i=h(r+1),o=CW(n);e.set(i,o),t&&o.signature&&t.set(i,o.signature)}),null==(a=s.emitSignatures)||a.forEach(e=>{if(ut(e))t.delete(h(e));else{const n=h(e[0]);t.set(n,_t(e[1])||e[1].length?e[1]:[t.get(n)])}});const n=new Set(M(s.changeFileSet,h)),r=s.affectedFilesPendingEmit?QV(s.options||{}):void 0;_={fileInfos:e,compilerOptions:s.options?Gj(s.options,g):{},referencedMap:function(e,t){const n=KV.createReferencedMap(t);return n&&e?(e.forEach(([e,t])=>n.set(h(e),d[t-1])),n):n}(s.referencedMap,s.options??{}),semanticDiagnosticsPerFile:function(e,t,n){const r=new Map(H(t.keys(),e=>n.has(e)?void 0:[e,p]));return null==e||e.forEach(e=>{ut(e)?r.delete(h(e)):r.set(h(e[0]),e[1])}),r.size?r:void 0}(s.semanticDiagnosticsPerFile,e,n),emitDiagnosticsPerFile:(m=s.emitDiagnosticsPerFile,m&&Ke(m,e=>h(e[0]),e=>e[1])),hasReusableDiagnostic:!0,affectedFilesPendingEmit:s.affectedFilesPendingEmit&&Ke(s.affectedFilesPendingEmit,e=>h(ut(e)?e:e[0]),e=>wW(e,r)),changedFilesSet:n,latestChangedDtsFile:f,emitSignatures:(null==t?void 0:t.size)?t:void 0}}var m;return{getState:()=>_,saveEmitState:ft,restoreEmitState:ft,getProgram:St,getProgramOrUndefined:ht,releaseProgram:ft,getCompilerOptions:()=>_.compilerOptions,getSourceFile:St,getSourceFiles:St,getOptionsDiagnostics:St,getGlobalDiagnostics:St,getConfigFileParsingDiagnostics:St,getSyntacticDiagnostics:St,getDeclarationDiagnostics:St,getSemanticDiagnostics:St,emit:St,getAllDependencies:St,getCurrentDirectory:St,emitNextAffectedFile:St,getSemanticDiagnosticsOfNextAffectedFile:St,emitBuildInfo:St,close:ft,hasChangedEmitSignature:mt};function g(e){return ta(e,c)}function h(e){return u[e-1]}}function PW(e,t,n){const r=Vo(ta(t,n.getCurrentDirectory())),i=on(n.useCaseSensitiveFileNames()),o=new Map;let a=0;const s=new Map,c=new Map(e.resolvedRoot);return e.fileInfos.forEach((t,n)=>{const s=ia(e.fileNames[n],r,i),c=_t(t)?t:t.version;if(o.set(s,c),ae().program,releaseProgram:()=>e().program=void 0,getCompilerOptions:()=>e().compilerOptions,getSourceFile:e=>n().getSourceFile(e),getSourceFiles:()=>n().getSourceFiles(),getOptionsDiagnostics:e=>n().getOptionsDiagnostics(e),getGlobalDiagnostics:e=>n().getGlobalDiagnostics(e),getConfigFileParsingDiagnostics:()=>t,getSyntacticDiagnostics:(e,t)=>n().getSyntacticDiagnostics(e,t),getDeclarationDiagnostics:(e,t)=>n().getDeclarationDiagnostics(e,t),getSemanticDiagnostics:(e,t)=>n().getSemanticDiagnostics(e,t),emit:(e,t,r,i,o)=>n().emit(e,t,r,i,o),emitBuildInfo:(e,t)=>n().emitBuildInfo(e,t),getAllDependencies:St,getCurrentDirectory:()=>n().getCurrentDirectory(),close:ft};function n(){return Tn.checkDefined(e().program)}}function FW(e,t,n,r,i,o){return kW(0,vW(e,t,n,r,i,o))}function AW(e,t,n,r,i,o){return kW(1,vW(e,t,n,r,i,o))}function IW(e,t,n,r,i,o){const{newProgram:a,configFileParsingDiagnostics:s}=vW(e,t,n,r,i,o);return EW(()=>({program:a,compilerOptions:a.getCompilerOptions()}),s)}function OW(e){return Xt(e,"/node_modules/.staging")?Qt(e,"/.staging"):ee(fo,t=>e.includes(t))?void 0:e}function jW(e,t){if(t<=1)return 1;let n=1,r=0===e[0].search(/[a-zA-Z]:/);if(e[0]!==wo&&!r&&0===e[1].search(/[a-zA-Z]\$$/)){if(2===t)return 2;n=2,r=!0}return r&&!e[n].match(/^users$/i)?n:e[n].match(/^workspaces$/i)?n+1:n+2}function LW(e,t){if(void 0===t&&(t=e.length),t<=2)return!1;return t>jW(e,t)+1}function MW(e){return BW(Vo(e))}function RW(e,t){if(t.lengthi.length+1?UW(s,a,Math.max(i.length+1,c+1),_):{dir:n,dirPath:r,nonRecursive:!0}:qW(s,a,a.length-1,c,l,i,_)}function qW(e,t,n,r,i,o,a){if(-1!==i)return UW(e,t,i+1,a);let s=!0,c=n;for(let e=0;e=n&&r+2function(e,t,n,r,i,o,a){const s=HW(e),c=LM(n,r,i,s,t,o,a);if(!e.getGlobalCache)return c;const l=e.getGlobalCache();if(!(void 0===l||Js(n)||c.resolvedModule&&pT(c.resolvedModule.extension))){const{resolvedModule:r,failedLookupLocations:o,affectingLocations:a,resolutionDiagnostics:_}=MR(Tn.checkDefined(e.globalCacheResolutionModuleName)(n),e.projectName,i,s,l,t);if(r)return c.resolvedModule=r,c.failedLookupLocations=iM(c.failedLookupLocations,o),c.affectingLocations=iM(c.affectingLocations,a),c.resolutionDiagnostics=iM(c.resolutionDiagnostics,_),c}return c}(r,i,o,e,n,t,a)}}function GW(e,t,n){let r,i,o;const a=rt(),s=new Set,c=new Set,l=new Map,_=new Map;let u,d,f,m,g,h=!1,y=!1;const v=kt(()=>e.getCurrentDirectory()),x=e.getCachedDirectoryStructureHost(),S=new Map,k=FM(v(),e.getCanonicalFileName,e.getCompilationSettings()),T=new Map,C=AM(v(),e.getCanonicalFileName,e.getCompilationSettings(),k.getPackageJsonInfoCache(),k.optionsToRedirectsKey),w=new Map,N=FM(v(),e.getCanonicalFileName,IM(e.getCompilationSettings()),k.getPackageJsonInfoCache()),D=new Map,P=new Map,E=WW(t,v),F=e.toPath(E),A=Ko(F),I=new Map,O=new Map,j=new Map,L=new Map;return{rootDirForResolution:t,resolvedModuleNames:S,resolvedTypeReferenceDirectives:T,resolvedLibraries:w,resolvedFileToResolution:l,resolutionsWithFailedLookups:s,resolutionsWithOnlyAffectingLocations:c,directoryWatchesOfFailedLookups:D,fileWatchesOfAffectingLocations:P,packageDirWatchers:O,dirPathToSymlinkPackageRefCount:j,watchFailedLookupLocationsOfExternalModuleResolutions:W,getModuleResolutionCache:()=>k,startRecordingFilesWithChangedResolutions:function(){r=[]},finishRecordingFilesWithChangedResolutions:function(){const e=r;return r=void 0,e},startCachingPerDirectoryResolution:function(){k.isReadonly=void 0,C.isReadonly=void 0,N.isReadonly=void 0,k.getPackageJsonInfoCache().isReadonly=void 0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),N.clearAllExceptPackageJsonInfoCache(),a.forEach(Q),a.clear(),I.clear()},finishCachingPerDirectoryResolution:function(t,n){o=void 0,y=!1,a.forEach(Q),a.clear(),t!==n&&(!function(t){w.forEach((n,r)=>{var i;(null==(i=null==t?void 0:t.resolvedLibReferences)?void 0:i.has(r))||(ne(n,e.toPath(wV(e.getCompilationSettings(),v(),r)),M),w.delete(r))})}(t),null==t||t.getSourceFiles().forEach(e=>{var t;const n=af(e)?(null==(t=e.packageJsonLocations)?void 0:t.length)??0:0,r=_.get(e.resolvedPath)??p;for(let t=r.length;tn)for(let e=n;e{const r=null==t?void 0:t.getSourceFileByPath(n);r&&r.resolvedPath===n||(e.forEach(e=>P.get(e).files--),_.delete(n))}));D.forEach(z),P.forEach(q),O.forEach(J),h=!1,k.isReadonly=!0,C.isReadonly=!0,N.isReadonly=!0,k.getPackageJsonInfoCache().isReadonly=!0,I.clear()},resolveModuleNameLiterals:function(t,r,i,o,a,s){return U({entries:t,containingFile:r,containingSourceFile:a,redirectedReference:i,options:o,reusedNames:s,perFileCache:S,loader:KW(r,i,o,e,k),getResolutionWithResolvedFileName:M,shouldRetryResolution:e=>!e.resolvedModule||!fT(e.resolvedModule.extension),logChanges:n,deferWatchingNonRelativeResolution:!0})},resolveTypeReferenceDirectiveReferences:function(t,n,r,i,o,a){return U({entries:t,containingFile:n,containingSourceFile:o,redirectedReference:r,options:i,reusedNames:a,perFileCache:T,loader:xV(n,r,i,HW(e),C),getResolutionWithResolvedFileName:R,shouldRetryResolution:e=>void 0===e.resolvedTypeReferenceDirective,deferWatchingNonRelativeResolution:!1})},resolveLibrary:function(t,n,r,i){const o=HW(e);let a=null==w?void 0:w.get(i);if(!a||a.isInvalidated){const s=a;a=OM(t,n,r,o,N);const c=e.toPath(n);W(t,a,c,M,!1),w.set(i,a),s&&ne(s,c,M)}else if(GL(r,o)){const e=M(a);KL(o,(null==e?void 0:e.resolvedFileName)?e.packageId?Ca.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:Ca.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:Ca.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&Td(e.packageId))}return a},resolveSingleModuleNameWithoutWatching:function(t,n){var r,i;const o=e.toPath(n),a=S.get(o),s=null==a?void 0:a.get(t,void 0);if(s&&!s.isInvalidated)return s;const c=null==(r=e.beforeResolveSingleModuleNameWithoutWatching)?void 0:r.call(e,k),l=HW(e),_=LM(t,n,e.getCompilationSettings(),l,k);return null==(i=e.afterResolveSingleModuleNameWithoutWatching)||i.call(e,k,t,n,_,c),_},removeResolutionsFromProjectReferenceRedirects:function(t){if(!Ro(t,".json"))return;const n=e.getCurrentProgram();if(!n)return;const r=n.getResolvedProjectReferenceByPath(t);if(!r)return;r.commandLine.fileNames.forEach(t=>ae(e.toPath(t)))},removeResolutionsOfFile:ae,hasChangedAutomaticTypeDirectiveNames:()=>h,invalidateResolutionOfFile:function(t){ae(t);const n=h;se(l.get(t),gt)&&h&&!n&&e.onChangedAutomaticTypeDirectiveNames()},invalidateResolutionsOfFailedLookupLocations:_e,setFilesWithInvalidatedNonRelativeUnresolvedImports:function(e){Tn.assert(o===e||void 0===o),o=e},createHasInvalidatedResolutions:function(e,t){_e();const n=i;return i=void 0,{hasInvalidatedResolutions:t=>e(t)||y||!!(null==n?void 0:n.has(t))||B(t),hasInvalidatedLibResolutions:e=>{var n;return t(e)||!!(null==(n=null==w?void 0:w.get(e))?void 0:n.isInvalidated)}}},isFileWithInvalidatedNonRelativeUnresolvedImports:B,updateTypeRootsWatch:function(){const t=e.getCompilationSettings();if(t.types)return void fe();const n=_M(t,{getCurrentDirectory:v});n?Fx(L,new Set(n),{createNewValue:me,onDeleteValue:bx}):fe()},closeTypeRootsWatch:fe,clear:function(){Px(D,RU),Px(P,RU),I.clear(),O.clear(),j.clear(),a.clear(),fe(),S.clear(),T.clear(),l.clear(),s.clear(),c.clear(),f=void 0,m=void 0,g=void 0,d=void 0,u=void 0,y=!1,k.clear(),C.clear(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings()),N.clear(),_.clear(),w.clear(),h=!1},onChangesAffectModuleResolution:function(){y=!0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings())}};function M(e){return e.resolvedModule}function R(e){return e.resolvedTypeReferenceDirective}function B(e){if(!o)return!1;const t=o.get(e);return!!t&&!!t.length}function J(e,t){0===e.dirPathToWatcher.size&&O.delete(t)}function z(e,t){0===e.refCount&&(D.delete(t),e.watcher.close())}function q(e,t){var n;0!==e.files||0!==e.resolutions||(null==(n=e.symlinks)?void 0:n.size)||(P.delete(t),e.watcher.close())}function U({entries:t,containingFile:n,containingSourceFile:i,redirectedReference:o,options:a,perFileCache:s,reusedNames:c,loader:l,getResolutionWithResolvedFileName:_,deferWatchingNonRelativeResolution:u,shouldRetryResolution:d,logChanges:p}){const f=e.toPath(n),m=s.get(f)||s.set(f,wM()).get(f),g=[],h=p&&B(f),v=e.getCurrentProgram(),b=v&&v.getResolvedProjectReferenceToRedirect(n),x=b?!o||o.sourceFile.path!==b.sourceFile.path:!!o,k=wM();for(const c of t){const t=l.nameAndMode.getName(c),v=l.nameAndMode.getMode(c,i,(null==o?void 0:o.commandLine.options)||a);let b=m.get(t,v);if(!k.has(t,v)&&(y||x||!b||b.isInvalidated||h&&!Js(t)&&d(b))){const n=b;b=l.resolve(t,v),e.onDiscoveredSymlink&&XW(b)&&e.onDiscoveredSymlink(),m.set(t,v,b),b!==n&&(W(t,b,f,_,u),n&&ne(n,f,_)),p&&r&&!T(n,b)&&(r.push(f),p=!1)}else{const r=HW(e);if(GL(a,r)&&!k.has(t,v)){const e=_(b);KL(r,s===S?(null==e?void 0:e.resolvedFileName)?e.packageId?Ca.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:Ca.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:Ca.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:(null==e?void 0:e.resolvedFileName)?e.packageId?Ca.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:Ca.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:Ca.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&Td(e.packageId))}}Tn.assert(void 0!==b&&!b.isInvalidated),k.set(t,v,!0),g.push(b)}return null==c||c.forEach(e=>k.set(l.nameAndMode.getName(e),l.nameAndMode.getMode(e,i,(null==o?void 0:o.commandLine.options)||a),!0)),m.size()!==k.size()&&m.forEach((e,t,n)=>{k.has(t,n)||(ne(e,f,_),m.delete(t,n))}),g;function T(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=_(e),r=_(t);return n===r||!(!n||!r)&&n.resolvedFileName===r.resolvedFileName}}function V(e){return Xt(e,"/node_modules/@types")}function W(t,n,r,i,o){var s;if(n.refCount)n.refCount++,Tn.assertIsDefined(n.files);else{n.refCount=1,Tn.assert(!(null==(s=n.files)?void 0:s.size)),!o||Js(t)?H(n):a.add(t,n);const r=i(n);if(r&&r.resolvedFileName){const t=e.toPath(r.resolvedFileName);let i=l.get(t);i||l.set(t,i=new Set),i.add(n)}}(n.files??(n.files=new Set)).add(r)}function $(t,n){const r=zW(t,e.toPath(t),E,F,A,v);if(r){const{dir:e,dirPath:t,nonRecursive:i,packageDir:o,packageDirPath:a}=r;t===F?(Tn.assert(i),Tn.assert(!o),n=!0):Y(e,t,o,a,i)}return n}function H(e){Tn.assert(!!e.refCount);const{failedLookupLocations:t,affectingLocations:n,alternateResult:r}=e;if(!(null==t?void 0:t.length)&&!(null==n?void 0:n.length)&&!r)return;((null==t?void 0:t.length)||r)&&s.add(e);let i=!1;if(t)for(const e of t)i=$(e,i);r&&(i=$(r,i)),i&&Y(E,F,void 0,void 0,!0),K(e,!(null==t?void 0:t.length)&&!r)}function K(e,t){Tn.assert(!!e.refCount);const{affectingLocations:n}=e;if(null==n?void 0:n.length){t&&c.add(e);for(const e of n)G(e,!0)}}function G(t,n){const r=P.get(t);if(r)return void(n?r.resolutions++:r.files++);let i,o=t,a=!1;e.realpath&&(o=e.realpath(t),t!==o&&(a=!0,i=P.get(o)));const s=n?1:0,c=n?0:1;if(!a||!i){const t={watcher:JW(e.toPath(o))?e.watchAffectingFileLocation(o,(t,n)=>{null==x||x.addOrDeleteFile(t,e.toPath(o),n),X(o,k.getPackageJsonInfoCache().getInternalMap()),e.scheduleInvalidateResolutionsOfFailedLookupLocations()}):v$,resolutions:a?0:s,files:a?0:c,symlinks:void 0};P.set(o,t),a&&(i=t)}if(a){Tn.assert(!!i);const e={watcher:{close:()=>{var e;const n=P.get(o);!(null==(e=null==n?void 0:n.symlinks)?void 0:e.delete(t))||n.symlinks.size||n.resolutions||n.files||(P.delete(o),n.watcher.close())}},resolutions:s,files:c,symlinks:void 0};P.set(t,e),(i.symlinks??(i.symlinks=new Set)).add(t)}}function X(t,n){var r;const i=P.get(t);(null==i?void 0:i.resolutions)&&(d??(d=new Set)).add(t),(null==i?void 0:i.files)&&(u??(u=new Set)).add(t),null==(r=null==i?void 0:i.symlinks)||r.forEach(e=>X(e,n)),null==n||n.delete(e.toPath(t))}function Q(t,n){const r=e.getCurrentProgram();r&&r.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(n)?t.forEach(e=>K(e,!0)):t.forEach(H)}function Y(t,n,r,i,o){i&&e.realpath?function(t,n,r,i,o){Tn.assert(!o);let a=I.get(i),s=O.get(i);if(void 0===a){const t=e.realpath(r);a=t!==r&&e.toPath(t)!==i,I.set(i,a),s?s.isSymlink!==a&&(s.dirPathToWatcher.forEach(e=>{re(s.isSymlink?i:n,!1),e.watcher=l()}),s.isSymlink=a):O.set(i,s={dirPathToWatcher:new Map,isSymlink:a})}else Tn.assertIsDefined(s),Tn.assert(a===s.isSymlink);const c=s.dirPathToWatcher.get(n);function l(){return a?Z(r,i,o):Z(t,n,o)}c?c.refCount++:(s.dirPathToWatcher.set(n,{watcher:l(),refCount:1}),a&&j.set(n,(j.get(n)??0)+1))}(t,n,r,i,o):Z(t,n,o)}function Z(e,t,n){let r=D.get(t);return r?(Tn.assert(!!n==!!r.nonRecursive),r.refCount++):D.set(t,r={watcher:ie(e,t,n),refCount:1,nonRecursive:n}),r}function te(t,n,r){const i=zW(t,e.toPath(t),E,F,A,v);if(i){const{dirPath:t,packageDirPath:o}=i;if(t===F)n=!0;else if(o&&e.realpath){const e=O.get(o),n=e.dirPathToWatcher.get(t);if(n.refCount--,0===n.refCount){if(re(e.isSymlink?o:t,r),e.dirPathToWatcher.delete(t),e.isSymlink){const e=j.get(t)-1;0===e?j.delete(t):j.set(t,e)}r&&J(e,o)}}else re(t,r)}return n}function ne(t,n,r,i){if(Tn.checkDefined(t.files).delete(n),t.refCount--,t.refCount)return;const o=r(t);if(o&&o.resolvedFileName){const n=e.toPath(o.resolvedFileName),r=l.get(n);(null==r?void 0:r.delete(t))&&!r.size&&l.delete(n)}const{failedLookupLocations:a,affectingLocations:_,alternateResult:u}=t;if(s.delete(t)){let e=!1;if(a)for(const t of a)e=te(t,e,i);u&&(e=te(u,e,i)),e&&re(F,i)}else(null==_?void 0:_.length)&&c.delete(t);if(_)for(const e of _){const t=P.get(e);t.resolutions--,i&&q(t,e)}}function re(e,t){const n=D.get(e);n.refCount--,t&&z(n,e)}function ie(t,n,r){return e.watchDirectoryOfFailedLookupLocation(t,t=>{const r=e.toPath(t);x&&x.addOrDeleteFileOrDirectory(t,r),ce(r,n===r)},r?0:1)}function oe(e,t,n,r){const i=e.get(t);i&&(i.forEach(e=>ne(e,t,n,r)),e.delete(t))}function ae(e,t){oe(S,e,M,t),oe(T,e,R,t)}function se(e,t){if(!e)return!1;let n=!1;return e.forEach(e=>{if(!e.isInvalidated&&t(e)){e.isInvalidated=n=!0;for(const t of Tn.checkDefined(e.files))(i??(i=new Set)).add(t),h=h||Xt(t,CV)}}),n}function ce(t,n){if(n)(g||(g=new Set)).add(t);else{const n=OW(t);if(!n)return!1;if(t=n,e.fileIsOpen(t))return!1;const r=Vo(t);if(V(t)||ka(t)||V(r)||ka(r))(f||(f=new Set)).add(t),(m||(m=new Set)).add(t);else{if(OU(e.getCurrentProgram(),t))return!1;if(Ro(t,".map"))return!1;(f||(f=new Set)).add(t);const n=XM(t,!0);n&&(m||(m=new Set)).add(n)}}e.scheduleInvalidateResolutionsOfFailedLookupLocations()}function le(){const e=k.getPackageJsonInfoCache().getInternalMap();e&&(f||m||g)&&e.forEach((t,n)=>de(n)?e.delete(n):void 0)}function _e(){var t;if(y)return u=void 0,le(),(f||m||g||d)&&se(w,ue),f=void 0,m=void 0,g=void 0,d=void 0,!0;let n=!1;return u&&(null==(t=e.getCurrentProgram())||t.getSourceFiles().forEach(e=>{ee(e.packageJsonLocations,e=>u.has(e))&&((i??(i=new Set)).add(e.path),n=!0)}),u=void 0),f||m||g||d?(n=se(s,ue)||n,le(),f=void 0,m=void 0,g=void 0,n=se(c,pe)||n,d=void 0,n):n}function ue(t){var n;return!!pe(t)||!!(f||m||g)&&((null==(n=t.failedLookupLocations)?void 0:n.some(t=>de(e.toPath(t))))||!!t.alternateResult&&de(e.toPath(t.alternateResult)))}function de(e){return(null==f?void 0:f.has(e))||b((null==m?void 0:m.keys())||[],t=>!!ln(e,t)||void 0)||b((null==g?void 0:g.keys())||[],t=>!(!(e.length>t.length&&ln(e,t))||!Io(t)&&e[t.length]!==wo)||void 0)}function pe(e){var t;return!!d&&(null==(t=e.affectingLocations)?void 0:t.some(e=>d.has(e)))}function fe(){Px(L,bx)}function me(t){return function(t){return!!e.getCompilationSettings().typeRoots||MW(e.toPath(t))}(t)?e.watchTypeRootsDirectory(t,n=>{const r=e.toPath(n);x&&x.addOrDeleteFileOrDirectory(n,r),h=!0,e.onChangedAutomaticTypeDirectiveNames();const i=VW(t,e.toPath(t),F,A,v,e=>D.has(e)||j.has(e));i&&ce(r,i===r)},1):v$}}function XW(e){var t,n;return!(!(null==(t=e.resolvedModule)?void 0:t.originalPath)&&!(null==(n=e.resolvedTypeReferenceDirective)?void 0:n.originalPath))}var QW=To?{getCurrentDirectory:()=>To.getCurrentDirectory(),getNewLine:()=>To.newLine,getCanonicalFileName:on(To.useCaseSensitiveFileNames)}:void 0;function YW(e,t){const n=e===To&&QW?QW:{getCurrentDirectory:()=>e.getCurrentDirectory(),getNewLine:()=>e.newLine,getCanonicalFileName:on(e.useCaseSensitiveFileNames)};if(!t)return t=>e.write(GU(t,n));const r=new Array(1);return t=>{r[0]=t,e.write(sV(r,n)+n.getNewLine()),r[0]=void 0}}function ZW(e,t,n){return!(!e.clearScreen||n.preserveWatchOutput||n.extendedDiagnostics||n.diagnostics||!E(e$,t.code))&&(e.clearScreen(),!0)}var e$=[Ca.Starting_compilation_in_watch_mode.code,Ca.File_change_detected_Starting_incremental_compilation.code];function t$(e){return e.now?e.now().toLocaleTimeString("en-US",{timeZone:"UTC"}).replace(" "," "):(new Date).toLocaleTimeString()}function n$(e,t){return t?(t,n,r)=>{ZW(e,t,r);let i=`[${iV(t$(e),"")}] `;i+=`${cV(t.messageText,e.newLine)}${n+n}`,e.write(i)}:(t,n,r)=>{let i="";ZW(e,t,r)||(i+=n),i+=`${t$(e)} - `,i+=`${cV(t.messageText,e.newLine)}${function(e,t){return E(e$,e.code)?t+t:t}(t,n)}`,e.write(i)}}function r$(e,t,n,r,i,o){const a=i;a.onUnRecoverableConfigFileDiagnostic=e=>P$(i,o,e);const s=pj(e,t,a,n,r);return a.onUnRecoverableConfigFileDiagnostic=void 0,s}function i$(e){return I(e,e=>1===e.category)}function o$(e){return O(e,e=>1===e.category).map(e=>{if(void 0!==e.file)return`${e.file.fileName}`}).map(t=>{if(void 0===t)return;const n=C(e,e=>void 0!==e.file&&e.file.fileName===t);if(void 0!==n){const{line:e}=ns(n.file,n.start);return{fileName:t,line:e+1}}})}function a$(e){return 1===e?Ca.Found_1_error_Watching_for_file_changes:Ca.Found_0_errors_Watching_for_file_changes}function s$(e,t){const n=iV(":"+e.line,"");return Oo(e.fileName)&&Oo(t)?ya(t,e.fileName,!1)+n:e.fileName+n}function c$(e,t,n,r){if(0===e)return"";const i=t.filter(e=>void 0!==e),o=i.map(e=>`${e.fileName}:${e.line}`).filter((e,t,n)=>n.indexOf(e)===t),a=i[0]&&s$(i[0],r.getCurrentDirectory());let s;s=1===e?void 0!==t[0]?[Ca.Found_1_error_in_0,a]:[Ca.Found_1_error]:0===o.length?[Ca.Found_0_errors,e]:1===o.length?[Ca.Found_0_errors_in_the_same_file_starting_at_Colon_1,e,a]:[Ca.Found_0_errors_in_1_files,e,o.length];const c=gS(...s),l=o.length>1?function(e,t){const n=e.filter((e,t,n)=>t===n.findIndex(t=>(null==t?void 0:t.fileName)===(null==e?void 0:e.fileName)));if(0===n.length)return"";const r=e=>Math.log(e)*Math.LOG10E+1,i=n.map(t=>[t,I(e,e=>e.fileName===t.fileName)]),o=i.reduce((e,t)=>Math.max(e,t[1]||0),0),a=Ca.Errors_Files.message,s=a.split(" ")[0].length,c=Math.max(s,r(o)),l=Math.max(r(o)-s,0);let _="";return _+=" ".repeat(l)+a+"\n",i.forEach(e=>{const[n,r]=e,i=Math.log(r)*Math.LOG10E+1|0,o=i{t(e.fileName)})}function u$(e,t){var n,r;const i=e.getFileIncludeReasons(),o=t=>va(t,e.getCurrentDirectory(),e.getCanonicalFileName);for(const a of e.getSourceFiles())t(`${g$(a,o)}`),null==(n=i.get(a.path))||n.forEach(n=>t(` ${m$(e,n,o).messageText}`)),null==(r=d$(a,o))||r.forEach(e=>t(` ${e.messageText}`))}function d$(e,t){var n;let r;if(e.path!==e.resolvedPath&&(r??(r=[])).push(yS(void 0,Ca.File_is_output_of_project_reference_source_0,g$(e.originalFileName,t))),e.redirectInfo&&(r??(r=[])).push(yS(void 0,Ca.File_redirects_to_file_0,g$(e.redirectInfo.redirectTarget,t))),af(e))switch(e.impliedNodeFormat){case 99:e.packageJsonScope&&(r??(r=[])).push(yS(void 0,Ca.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,g$(Ee(e.packageJsonLocations),t)));break;case 1:e.packageJsonScope?(r??(r=[])).push(yS(void 0,e.packageJsonScope.contents.packageJsonContent.type?Ca.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:Ca.File_is_CommonJS_module_because_0_does_not_have_field_type,g$(Ee(e.packageJsonLocations),t))):(null==(n=e.packageJsonLocations)?void 0:n.length)&&(r??(r=[])).push(yS(void 0,Ca.File_is_CommonJS_module_because_package_json_was_not_found))}return r}function p$(e,t){var n;const r=e.getCompilerOptions().configFile;if(!(null==(n=null==r?void 0:r.configFileSpecs)?void 0:n.validatedFilesSpec))return;const i=e.getCanonicalFileName(t),o=Vo(ta(r.fileName,e.getCurrentDirectory())),a=N(r.configFileSpecs.validatedFilesSpec,t=>e.getCanonicalFileName(ta(t,o))===i);return-1!==a?r.configFileSpecs.validatedFilesSpecBeforeSubstitution[a]:void 0}function f$(e,t){var n,r;const i=e.getCompilerOptions().configFile;if(!(null==(n=null==i?void 0:i.configFileSpecs)?void 0:n.validatedIncludeSpecs))return;if(i.configFileSpecs.isDefaultIncludeSpec)return!0;const o=Ro(t,".json"),a=Vo(ta(i.fileName,e.getCurrentDirectory())),s=e.useCaseSensitiveFileNames(),c=N(null==(r=null==i?void 0:i.configFileSpecs)?void 0:r.validatedIncludeSpecs,e=>{if(o&&!Xt(e,".json"))return!1;const n=Dk(e,a,"files");return!!n&&Ak(`(${n})$`,s).test(t)});return-1!==c?i.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[c]:void 0}function m$(e,t,n){var r,i;const o=e.getCompilerOptions();if(EV(t)){const r=AV(e,t),i=FV(r)?r.file.text.substring(r.pos,r.end):`"${r.text}"`;let o;switch(Tn.assert(FV(r)||3===t.kind,"Only synthetic references are imports"),t.kind){case 3:o=FV(r)?r.packageId?Ca.Imported_via_0_from_file_1_with_packageId_2:Ca.Imported_via_0_from_file_1:r.text===td?r.packageId?Ca.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:Ca.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:r.packageId?Ca.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:Ca.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 4:Tn.assert(!r.packageId),o=Ca.Referenced_via_0_from_file_1;break;case 5:o=r.packageId?Ca.Type_library_referenced_via_0_from_file_1_with_packageId_2:Ca.Type_library_referenced_via_0_from_file_1;break;case 7:Tn.assert(!r.packageId),o=Ca.Library_referenced_via_0_from_file_1;break;default:Tn.assertNever(t)}return yS(void 0,o,i,g$(r.file,n),r.packageId&&Td(r.packageId))}switch(t.kind){case 0:if(!(null==(r=o.configFile)?void 0:r.configFileSpecs))return yS(void 0,Ca.Root_file_specified_for_compilation);const a=ta(e.getRootFileNames()[t.index],e.getCurrentDirectory());if(p$(e,a))return yS(void 0,Ca.Part_of_files_list_in_tsconfig_json);const s=f$(e,a);return _t(s)?yS(void 0,Ca.Matched_by_include_pattern_0_in_1,s,g$(o.configFile,n)):yS(void 0,s?Ca.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:Ca.Root_file_specified_for_compilation);case 1:case 2:const c=2===t.kind,l=Tn.checkDefined(null==(i=e.getResolvedProjectReferences())?void 0:i[t.index]);return yS(void 0,o.outFile?c?Ca.Output_from_referenced_project_0_included_because_1_specified:Ca.Source_from_referenced_project_0_included_because_1_specified:c?Ca.Output_from_referenced_project_0_included_because_module_is_specified_as_none:Ca.Source_from_referenced_project_0_included_because_module_is_specified_as_none,g$(l.sourceFile.fileName,n),o.outFile?"--outFile":"--out");case 8:return yS(void 0,...o.types?t.packageId?[Ca.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1,t.typeReference,Td(t.packageId)]:[Ca.Entry_point_of_type_library_0_specified_in_compilerOptions,t.typeReference]:t.packageId?[Ca.Entry_point_for_implicit_type_library_0_with_packageId_1,t.typeReference,Td(t.packageId)]:[Ca.Entry_point_for_implicit_type_library_0,t.typeReference]);case 6:{if(void 0!==t.index)return yS(void 0,Ca.Library_0_specified_in_compilerOptions,o.lib[t.index]);const e=nk(OS(o));return yS(void 0,...e?[Ca.Default_library_for_target_0,e]:[Ca.Default_library])}default:Tn.assertNever(t)}}function g$(e,t){const n=_t(e)?e:e.fileName;return t?t(n):n}function h$(e,t,n,r,i,o,a,s){const c=!!e.getCompilerOptions().listFilesOnly,l=e.getConfigFileParsingDiagnostics().slice(),_=l.length;ge(l,e.getSyntacticDiagnostics(void 0,o)),l.length===_&&(ge(l,e.getOptionsDiagnostics(o)),c||(ge(l,e.getGlobalDiagnostics(o)),l.length===_&&ge(l,e.getSemanticDiagnostics(void 0,o))));const u=c?{emitSkipped:!0,diagnostics:p}:e.emit(void 0,i,o,a,s),{emittedFiles:d,diagnostics:f}=u;ge(l,f);const m=zs(l);if(m.forEach(t),n){const t=e.getCurrentDirectory();h(d,e=>{const r=ta(e,t);n(`TSFILE: ${r}`)}),_$(e,n)}return r&&r(i$(m),o$(m)),{emitResult:u,diagnostics:m}}function y$(e,t,n,r,i,o,a,s){const{emitResult:c,diagnostics:l}=h$(e,t,n,r,i,o,a,s);return c.emitSkipped&&l.length>0?1:l.length>0?2:0}var v$={close:ft},b$=()=>v$;function x$(e=To,t){return{onWatchStatusChange:t||n$(e),watchFile:nt(e,e.watchFile)||b$,watchDirectory:nt(e,e.watchDirectory)||b$,setTimeout:nt(e,e.setTimeout)||ft,clearTimeout:nt(e,e.clearTimeout)||ft}}var S$={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function k$(e,t){const n=e.trace?t.extendedDiagnostics?2:t.diagnostics?1:0:0,r=0!==n?t=>e.trace(t):ft,i=LU(e,n,r);return i.writeLog=r,i}function T$(e,t,n=e){const r=e.useCaseSensitiveFileNames(),i={getSourceFile:UU((t,n)=>n?e.readFile(t,n):i.readFile(t),void 0),getDefaultLibLocation:nt(e,e.getDefaultLibLocation),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:VU((t,n,r)=>e.writeFile(t,n,r),t=>e.createDirectory(t),t=>e.directoryExists(t)),getCurrentDirectory:kt(()=>e.getCurrentDirectory()),useCaseSensitiveFileNames:()=>r,getCanonicalFileName:on(r),getNewLine:()=>Xb(t()),fileExists:t=>e.fileExists(t),readFile:t=>e.readFile(t),trace:nt(e,e.trace),directoryExists:nt(n,n.directoryExists),getDirectories:nt(n,n.getDirectories),realpath:nt(e,e.realpath),getEnvironmentVariable:nt(e,e.getEnvironmentVariable)||(()=>""),createHash:nt(e,e.createHash),readDirectory:nt(e,e.readDirectory),storeSignatureInfo:e.storeSignatureInfo,jsDocParsingMode:e.jsDocParsingMode};return i}function C$(e,t){if(t.match(yJ)){let e=t.length,n=e;for(let r=e-1;r>=0;r--){const i=t.charCodeAt(r);switch(i){case 10:r&&13===t.charCodeAt(r-1)&&r--;case 13:break;default:if(i<127||!os(i)){n=r;continue}}const o=t.substring(n,e);if(o.match(vJ)){t=t.substring(0,n);break}if(!o.match(bJ))break;e=n}}return(e.createHash||Qi)(t)}function w$(e){const t=e.getSourceFile;e.getSourceFile=(...n)=>{const r=t.call(e,...n);return r&&(r.version=C$(e,r.text)),r}}function N$(e,t){const n=kt(()=>Vo(na(e.getExecutingFilePath())));return{useCaseSensitiveFileNames:()=>e.useCaseSensitiveFileNames,getNewLine:()=>e.newLine,getCurrentDirectory:kt(()=>e.getCurrentDirectory()),getDefaultLibLocation:n,getDefaultLibFileName:e=>Yo(n(),qs(e)),fileExists:t=>e.fileExists(t),readFile:(t,n)=>e.readFile(t,n),directoryExists:t=>e.directoryExists(t),getDirectories:t=>e.getDirectories(t),readDirectory:(t,n,r,i,o)=>e.readDirectory(t,n,r,i,o),realpath:nt(e,e.realpath),getEnvironmentVariable:nt(e,e.getEnvironmentVariable),trace:t=>e.write(t+e.newLine),createDirectory:t=>e.createDirectory(t),writeFile:(t,n,r)=>e.writeFile(t,n,r),createHash:nt(e,e.createHash),createProgram:t||AW,storeSignatureInfo:e.storeSignatureInfo,now:nt(e,e.now)}}function D$(e=To,t,n,r){const i=t=>e.write(t+e.newLine),o=N$(e,t);return tt(o,x$(e,r)),o.afterProgramCreate=e=>{const t=e.getCompilerOptions(),r=Xb(t);h$(e,n,i,e=>o.onWatchStatusChange(gS(a$(e),e),r,t,e))},o}function P$(e,t,n){t(n),e.exit(1)}function E$({configFileName:e,optionsToExtend:t,watchOptionsToExtend:n,extraFileExtensions:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=a||YW(i),l=D$(i,o,c,s);return l.onUnRecoverableConfigFileDiagnostic=e=>P$(i,c,e),l.configFileName=e,l.optionsToExtend=t,l.watchOptionsToExtend=n,l.extraFileExtensions=r,l}function F$({rootFiles:e,options:t,watchOptions:n,projectReferences:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=D$(i,o,a||YW(i),s);return c.rootFiles=e,c.options=t,c.watchOptions=n,c.projectReferences=r,c}function A$(e){const t=e.system||To,n=e.host||(e.host=O$(e.options,t)),r=j$(e),i=y$(r,e.reportDiagnostic||YW(t),e=>n.trace&&n.trace(e),e.reportErrorSummary||e.options.pretty?(e,r)=>t.write(c$(e,r,t.newLine,n)):void 0);return e.afterProgramEmitAndDiagnostics&&e.afterProgramEmitAndDiagnostics(r),i}function I$(e,t){const n=Hq(e);if(!n)return;let r;if(t.getBuildInfo)r=t.getBuildInfo(n,e.configFilePath);else{const e=t.readFile(n);if(!e)return;r=mU(n,e)}return r&&r.version===u&&r.program?DW(r,n,t):void 0}function O$(e,t=To){const n=WU(e,void 0,t);return n.createHash=nt(t,t.createHash),n.storeSignatureInfo=t.storeSignatureInfo,w$(n),$U(n,e=>ia(e,n.getCurrentDirectory(),n.getCanonicalFileName)),n}function j$({rootNames:e,options:t,configFileParsingDiagnostics:n,projectReferences:r,host:i,createProgram:o}){return(o=o||AW)(e,t,i=i||O$(t),I$(t,i),n,r)}function L$(e,t,n,r,i,o,a,s){return ct(e)?F$({rootFiles:e,options:t,watchOptions:s,projectReferences:a,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o}):E$({configFileName:e,optionsToExtend:t,watchOptionsToExtend:a,extraFileExtensions:s,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o})}function M$(e){let t,n,r,i,o,a,s,c,l=e.extendedConfigCache,_=!1;const u=new Map;let d,p=!1;const f=e.useCaseSensitiveFileNames(),m=e.getCurrentDirectory(),{configFileName:g,optionsToExtend:h={},watchOptionsToExtend:y,extraFileExtensions:v,createProgram:b}=e;let x,S,{rootFiles:k,options:T,watchOptions:C,projectReferences:w}=e,N=!1,D=!1;const P=void 0===g?void 0:CU(e,m,f),E=P||e,F=qV(e,E);let A=K();g&&e.configFileParsingResult&&(se(e.configFileParsingResult),A=K()),Z(Ca.Starting_compilation_in_watch_mode),g&&!e.configFileParsingResult&&(A=Xb(h),Tn.assert(!k),ae(),A=K()),Tn.assert(T),Tn.assert(k);const{watchFile:I,watchDirectory:O,writeLog:j}=k$(e,T),L=on(f);let M;j(`Current directory: ${m} CaseSensitiveFileNames: ${f}`),g&&(M=I(g,function(){Tn.assert(!!g),n=2,re()},2e3,C,S$.ConfigFile));const R=T$(e,()=>T,E);w$(R);const B=R.getSourceFile;R.getSourceFile=(e,...t)=>Q(e,G(e),...t),R.getSourceFileByPath=Q,R.getNewLine=()=>A,R.fileExists=function(e){const t=G(e);if(X(u.get(t)))return!1;return E.fileExists(e)},R.onReleaseOldSourceFile=function(e,t,n){const r=u.get(e.resolvedPath);void 0!==r&&(X(r)?(d||(d=[])).push(e.path):r.sourceFile===e&&(r.fileWatcher&&r.fileWatcher.close(),u.delete(e.resolvedPath),n||J.removeResolutionsOfFile(e.path)))},R.onReleaseParsedCommandLine=function(e){var t;const n=G(e),r=null==s?void 0:s.get(n);if(!r)return;s.delete(n),r.watchedDirectories&&Px(r.watchedDirectories,RU);null==(t=r.watcher)||t.close(),DU(n,c)},R.toPath=G,R.getCompilationSettings=()=>T,R.useSourceOfProjectReferenceRedirect=nt(e,e.useSourceOfProjectReferenceRedirect),R.watchDirectoryOfFailedLookupLocation=(e,t,n)=>O(e,t,n,C,S$.FailedLookupLocations),R.watchAffectingFileLocation=(e,t)=>I(e,t,2e3,C,S$.AffectingFileLocation),R.watchTypeRootsDirectory=(e,t,n)=>O(e,t,n,C,S$.TypeRoots),R.getCachedDirectoryStructureHost=()=>P,R.scheduleInvalidateResolutionsOfFailedLookupLocations=function(){if(!e.setTimeout||!e.clearTimeout)return J.invalidateResolutionsOfFailedLookupLocations();const t=te();j("Scheduling invalidateFailedLookup"+(t?", Cancelled earlier one":"")),a=e.setTimeout(ne,250,"timerToInvalidateFailedLookupResolutions")},R.onInvalidatedResolution=re,R.onChangedAutomaticTypeDirectiveNames=re,R.fileIsOpen=mt,R.getCurrentProgram=$,R.writeLog=j,R.getParsedCommandLine=ce;const J=GW(R,g?Vo(ta(g,m)):m,!1);R.resolveModuleNameLiterals=nt(e,e.resolveModuleNameLiterals),R.resolveModuleNames=nt(e,e.resolveModuleNames),R.resolveModuleNameLiterals||R.resolveModuleNames||(R.resolveModuleNameLiterals=J.resolveModuleNameLiterals.bind(J)),R.resolveTypeReferenceDirectiveReferences=nt(e,e.resolveTypeReferenceDirectiveReferences),R.resolveTypeReferenceDirectives=nt(e,e.resolveTypeReferenceDirectives),R.resolveTypeReferenceDirectiveReferences||R.resolveTypeReferenceDirectives||(R.resolveTypeReferenceDirectiveReferences=J.resolveTypeReferenceDirectiveReferences.bind(J)),R.resolveLibrary=e.resolveLibrary?e.resolveLibrary.bind(e):J.resolveLibrary.bind(J),R.getModuleResolutionCache=e.resolveModuleNameLiterals||e.resolveModuleNames?nt(e,e.getModuleResolutionCache):()=>J.getModuleResolutionCache();const z=!!(e.resolveModuleNameLiterals||e.resolveTypeReferenceDirectiveReferences||e.resolveModuleNames||e.resolveTypeReferenceDirectives)?nt(e,e.hasInvalidatedResolutions)||gt:mt,q=e.resolveLibrary?nt(e,e.hasInvalidatedLibResolutions)||gt:mt;return t=I$(T,R),H(),fe(),g&&ge(G(g),T,C,S$.ExtendedConfigFile),g?{getCurrentProgram:W,getProgram:oe,close:U,getResolutionCache:V}:{getCurrentProgram:W,getProgram:oe,updateRootFileNames:function(e){Tn.assert(!g,"Cannot update root file names with config file watch mode"),k=e,re()},close:U,getResolutionCache:V};function U(){te(),J.clear(),Px(u,e=>{e&&e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}),M&&(M.close(),M=void 0),null==l||l.clear(),l=void 0,c&&(Px(c,RU),c=void 0),i&&(Px(i,RU),i=void 0),r&&(Px(r,bx),r=void 0),s&&(Px(s,e=>{var t;null==(t=e.watcher)||t.close(),e.watcher=void 0,e.watchedDirectories&&Px(e.watchedDirectories,RU),e.watchedDirectories=void 0}),s=void 0),t=void 0}function V(){return J}function W(){return t}function $(){return t&&t.getProgramOrUndefined()}function H(){j("Synchronizing program"),Tn.assert(T),Tn.assert(k),te();const n=W();p&&(A=K(),n&&_d(n.getCompilerOptions(),T)&&J.onChangesAffectModuleResolution());const{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=J.createHasInvalidatedResolutions(z,q),{originalReadFile:a,originalFileExists:s,originalDirectoryExists:c,originalCreateDirectory:l,originalWriteFile:f,readFileWithCache:m}=$U(R,G);return IV($(),k,T,e=>function(e,t){const n=u.get(e);if(!n)return;if(n.version)return n.version;const r=t(e);return void 0!==r?C$(R,r):void 0}(e,m),e=>R.fileExists(e),i,o,ee,ce,w)?D&&(_&&Z(Ca.File_change_detected_Starting_incremental_compilation),t=b(void 0,void 0,R,t,S,w),D=!1):(_&&Z(Ca.File_change_detected_Starting_incremental_compilation),function(e,n){j("CreatingProgramWith::"),j(` roots: ${JSON.stringify(k)}`),j(` options: ${JSON.stringify(T)}`),w&&j(` projectReferences: ${JSON.stringify(w)}`);const i=p||!$();p=!1,D=!1,J.startCachingPerDirectoryResolution(),R.hasInvalidatedResolutions=e,R.hasInvalidatedLibResolutions=n,R.hasChangedAutomaticTypeDirectiveNames=ee;const o=$();t=b(k,T,R,t,S,w),J.finishCachingPerDirectoryResolution(t.getProgram(),o),EU(t.getProgram(),r||(r=new Map),de),i&&J.updateTypeRootsWatch();if(d){for(const e of d)r.has(e)||u.delete(e);d=void 0}}(i,o)),_=!1,e.afterProgramCreate&&n!==t&&e.afterProgramCreate(t),R.readFile=a,R.fileExists=s,R.directoryExists=c,R.createDirectory=l,R.writeFile=f,t}function K(){return Xb(T||h)}function G(e){return ia(e,m,L)}function X(e){return"boolean"==typeof e}function Q(e,t,n,r,i){const o=u.get(t);if(X(o))return;const a="object"==typeof n?n.impliedNodeFormat:void 0;if(void 0===o||i||function(e){return"boolean"==typeof e.version}(o)||o.sourceFile.impliedNodeFormat!==a){const i=B(e,n,r);if(o)i?(o.sourceFile=i,o.version=i.version,o.fileWatcher||(o.fileWatcher=le(t,e,_e,250,C,S$.SourceFile))):(o.fileWatcher&&o.fileWatcher.close(),u.set(t,!1));else if(i){const n=le(t,e,_e,250,C,S$.SourceFile);u.set(t,{sourceFile:i,version:i.version,fileWatcher:n})}else u.set(t,!1);return i}return o.sourceFile}function Y(e){const t=u.get(e);void 0!==t&&(X(t)?u.set(e,{version:!1}):t.version=!1)}function Z(t){e.onWatchStatusChange&&e.onWatchStatusChange(gS(t),A,T||h)}function ee(){return J.hasChangedAutomaticTypeDirectiveNames()}function te(){return!!a&&(e.clearTimeout(a),a=void 0,!0)}function ne(){a=void 0,J.invalidateResolutionsOfFailedLookupLocations()&&re()}function re(){e.setTimeout&&e.clearTimeout&&(o&&e.clearTimeout(o),j("Scheduling update"),o=e.setTimeout(ie,250,"timerToUpdateProgram"))}function ie(){o=void 0,_=!0,oe()}function oe(){var e,t,r,i;switch(n){case 1:null==(e=ir)||e.logStartUpdateProgram("PartialConfigReload"),function(){j("Reloading new file names and options"),Tn.assert(T),Tn.assert(g),n=0,k=IL(T.configFile.configFileSpecs,ta(Vo(g),m),T,F,v),fL(k,ta(g,m),T.configFile.configFileSpecs,S,N)&&(D=!0);H()}();break;case 2:null==(t=ir)||t.logStartUpdateProgram("FullConfigReload"),function(){Tn.assert(g),j(`Reloading config file: ${g}`),n=0,P&&P.clearCache();ae(),p=!0,H(),fe(),ge(G(g),T,C,S$.ExtendedConfigFile)}();break;default:null==(r=ir)||r.logStartUpdateProgram("SynchronizeProgram"),H()}return null==(i=ir)||i.logStopUpdateProgram("Done"),W()}function ae(){Tn.assert(g),se(pj(g,h,F,l||(l=new Map),y,v))}function se(e){k=e.fileNames,T=e.options,C=e.watchOptions,w=e.projectReferences,x=e.wildcardDirectories,S=OV(e).slice(),N=pL(e.raw),D=!0}function ce(t){const n=G(t);let r=null==s?void 0:s.get(n);if(r){if(!r.updateLevel)return r.parsedCommandLine;if(r.parsedCommandLine&&1===r.updateLevel&&!e.getParsedCommandLine){j("Reloading new file names and options"),Tn.assert(T);const e=IL(r.parsedCommandLine.options.configFile.configFileSpecs,ta(Vo(t),m),T,F);return r.parsedCommandLine={...r.parsedCommandLine,fileNames:e},r.updateLevel=void 0,r.parsedCommandLine}}j(`Loading config file: ${t}`);const i=e.getParsedCommandLine?e.getParsedCommandLine(t):function(e){const t=F.onUnRecoverableConfigFileDiagnostic;F.onUnRecoverableConfigFileDiagnostic=ft;const n=pj(e,void 0,F,l||(l=new Map),y);return F.onUnRecoverableConfigFileDiagnostic=t,n}(t);return r?(r.parsedCommandLine=i,r.updateLevel=void 0):(s||(s=new Map)).set(n,r={parsedCommandLine:i}),function(e,t,n){var r,i,o,a;n.watcher||(n.watcher=I(e,(n,r)=>{ue(e,t,r);const i=null==s?void 0:s.get(t);i&&(i.updateLevel=2),J.removeResolutionsFromProjectReferenceRedirects(t),re()},2e3,(null==(r=n.parsedCommandLine)?void 0:r.watchOptions)||C,S$.ConfigFileOfReferencedProject)),FU(n.watchedDirectories||(n.watchedDirectories=new Map),null==(i=n.parsedCommandLine)?void 0:i.wildcardDirectories,(r,i)=>{var o;return O(r,n=>{const i=G(n);P&&P.addOrDeleteFileOrDirectory(n,i),Y(i);const o=null==s?void 0:s.get(t);(null==o?void 0:o.parsedCommandLine)&&(AU({watchedDirPath:G(r),fileOrDirectory:n,fileOrDirectoryPath:i,configFileName:e,options:o.parsedCommandLine.options,program:o.parsedCommandLine.fileNames,currentDirectory:m,useCaseSensitiveFileNames:f,writeLog:j,toPath:G})||2!==o.updateLevel&&(o.updateLevel=1,re()))},i,(null==(o=n.parsedCommandLine)?void 0:o.watchOptions)||C,S$.WildcardDirectoryOfReferencedProject)}),ge(t,null==(o=n.parsedCommandLine)?void 0:o.options,(null==(a=n.parsedCommandLine)?void 0:a.watchOptions)||C,S$.ExtendedConfigOfReferencedProject)}(t,n,r),i}function le(e,t,n,r,i,o){return I(t,(t,r)=>n(t,r,e),r,i,o)}function _e(e,t,n){ue(e,n,t),2===t&&u.has(n)&&J.invalidateResolutionOfFile(n),Y(n),re()}function ue(e,t,n){P&&P.addOrDeleteFile(e,t,n)}function de(e,t){return(null==s?void 0:s.has(e))?v$:le(e,t,pe,500,C,S$.MissingFile)}function pe(e,t,n){ue(e,n,t),0===t&&r.has(n)&&(r.get(n).close(),r.delete(n),Y(n),re())}function fe(){FU(i||(i=new Map),x,me)}function me(e,t){return O(e,t=>{Tn.assert(g),Tn.assert(T);const r=G(t);P&&P.addOrDeleteFileOrDirectory(t,r),Y(r),AU({watchedDirPath:G(e),fileOrDirectory:t,fileOrDirectoryPath:r,configFileName:g,extraFileExtensions:v,options:T,program:W()||k,currentDirectory:m,useCaseSensitiveFileNames:f,writeLog:j,toPath:G})||2!==n&&(n=1,re())},t,C,S$.WildcardDirectory)}function ge(e,t,r,i){NU(e,t,c||(c=new Map),(e,t)=>I(e,(r,i)=>{var o;ue(e,t,i),l&&PU(l,t,G);const a=null==(o=c.get(t))?void 0:o.projects;(null==a?void 0:a.size)&&a.forEach(e=>{if(g&&G(g)===e)n=2;else{const t=null==s?void 0:s.get(e);t&&(t.updateLevel=2),J.removeResolutionsFromProjectReferenceRedirects(e)}re()})},2e3,r,i),G)}}var R$=(e=>(e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutputMissing=3]="OutputMissing",e[e.ErrorReadingFile=4]="ErrorReadingFile",e[e.OutOfDateWithSelf=5]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",e[e.OutOfDateBuildInfo=7]="OutOfDateBuildInfo",e[e.OutOfDateOptions=8]="OutOfDateOptions",e[e.OutOfDateRoots=9]="OutOfDateRoots",e[e.UpstreamOutOfDate=10]="UpstreamOutOfDate",e[e.UpstreamBlocked=11]="UpstreamBlocked",e[e.ComputingUpstream=12]="ComputingUpstream",e[e.TsVersionOutputOfDate=13]="TsVersionOutputOfDate",e[e.UpToDateWithInputFileText=14]="UpToDateWithInputFileText",e[e.ContainerOnly=15]="ContainerOnly",e[e.ForceBuild=16]="ForceBuild",e))(R$||{});function B$(e){return Ro(e,".json")?e:Yo(e,"tsconfig.json")}var J$=new Date(-864e13),z$=new Date(864e13);function q$(e,t){return function(e,t,n){const r=e.get(t);let i;return r||(i=n(),e.set(t,i)),r||i}(e,t,()=>new Map)}function U$(e){return e.now?e.now():new Date}function V$(e){return!!e&&!!e.buildOrder}function W$(e){return V$(e)?e.buildOrder:e}function $$(e,t){return n=>{let r=t?`[${iV(t$(e),"")}] `:`${t$(e)} - `;r+=`${cV(n.messageText,e.newLine)}${e.newLine+e.newLine}`,e.write(r)}}function H$(e,t,n,r){const i=N$(e,t);return i.getModifiedTime=e.getModifiedTime?t=>e.getModifiedTime(t):ht,i.setModifiedTime=e.setModifiedTime?(t,n)=>e.setModifiedTime(t,n):ft,i.deleteFile=e.deleteFile?t=>e.deleteFile(t):ft,i.reportDiagnostic=n||YW(e),i.reportSolutionBuilderStatus=r||$$(e),i.now=nt(e,e.now),i}function K$(e=To,t,n,r,i){const o=H$(e,t,n,r);return o.reportErrorSummary=i,o}function G$(e=To,t,n,r,i){const o=H$(e,t,n,r);return tt(o,x$(e,i)),o}function X$(e,t,n){return HH(!1,e,t,n)}function Q$(e,t,n,r){return HH(!0,e,t,n,r)}function Y$(e,t,n,r,i){const o=t,a=t,s=function(e){const t={};return NO.forEach(n=>{Be(e,n.name)&&(t[n.name]=e[n.name])}),t}(r),c=T$(o,()=>m.projectCompilerOptions);let l,_,u;w$(c),c.getParsedCommandLine=e=>rH(m,e,eH(m,e)),c.resolveModuleNameLiterals=nt(o,o.resolveModuleNameLiterals),c.resolveTypeReferenceDirectiveReferences=nt(o,o.resolveTypeReferenceDirectiveReferences),c.resolveLibrary=nt(o,o.resolveLibrary),c.resolveModuleNames=nt(o,o.resolveModuleNames),c.resolveTypeReferenceDirectives=nt(o,o.resolveTypeReferenceDirectives),c.getModuleResolutionCache=nt(o,o.getModuleResolutionCache),c.resolveModuleNameLiterals||c.resolveModuleNames||(l=FM(c.getCurrentDirectory(),c.getCanonicalFileName),c.resolveModuleNameLiterals=(e,t,n,r,i)=>SV(e,t,n,r,i,o,l,yV),c.getModuleResolutionCache=()=>l),c.resolveTypeReferenceDirectiveReferences||c.resolveTypeReferenceDirectives||(_=AM(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache(),null==l?void 0:l.optionsToRedirectsKey),c.resolveTypeReferenceDirectiveReferences=(e,t,n,r,i)=>SV(e,t,n,r,i,o,_,xV)),c.resolveLibrary||(u=FM(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache()),c.resolveLibrary=(e,t,n)=>OM(e,t,n,o,u)),c.getBuildInfo=(e,t)=>DH(m,e,eH(m,t),void 0);const{watchFile:d,watchDirectory:p,writeLog:f}=k$(a,r),m={host:o,hostWithWatch:a,parseConfigFileHost:qV(o),write:nt(o,o.trace),options:r,baseCompilerOptions:s,rootNames:n,baseWatchOptions:i,resolvedConfigFilePaths:new Map,configFileCache:new Map,projectStatus:new Map,extendedConfigCache:new Map,buildInfoCache:new Map,outputTimeStamps:new Map,builderPrograms:new Map,diagnostics:new Map,projectPendingBuild:new Map,projectErrorsReported:new Map,compilerHost:c,moduleResolutionCache:l,typeReferenceDirectiveResolutionCache:_,libraryResolutionCache:u,buildOrder:void 0,readFileWithCache:e=>o.readFile(e),projectCompilerOptions:s,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:e,watch:e,allWatchedWildcardDirectories:new Map,allWatchedInputFiles:new Map,allWatchedConfigFiles:new Map,allWatchedExtendedConfigFiles:new Map,allWatchedPackageJsonFiles:new Map,filesWatched:new Map,lastCachedPackageJsonLookups:new Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:d,watchDirectory:p,writeLog:f};return m}function Z$(e,t){return ia(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function eH(e,t){const{resolvedConfigFilePaths:n}=e,r=n.get(t);if(void 0!==r)return r;const i=Z$(e,t);return n.set(t,i),i}function tH(e){return!!e.options}function nH(e,t){const n=e.configFileCache.get(t);return n&&tH(n)?n:void 0}function rH(e,t,n){const{configFileCache:r}=e,i=r.get(n);if(i)return tH(i)?i:void 0;let o;gr("SolutionBuilder::beforeConfigFileParsing");const{parseConfigFileHost:a,baseCompilerOptions:s,baseWatchOptions:c,extendedConfigCache:l,host:_}=e;let u;return _.getParsedCommandLine?(u=_.getParsedCommandLine(t),u||(o=gS(Ca.File_0_not_found,t))):(a.onUnRecoverableConfigFileDiagnostic=e=>o=e,u=pj(t,s,a,l,c),a.onUnRecoverableConfigFileDiagnostic=ft),r.set(n,u||o),gr("SolutionBuilder::afterConfigFileParsing"),hr("SolutionBuilder::Config file parsing","SolutionBuilder::beforeConfigFileParsing","SolutionBuilder::afterConfigFileParsing"),u}function iH(e,t){return B$(Zo(e.compilerHost.getCurrentDirectory(),t))}function oH(e,t){const n=new Map,r=new Map,i=[];let o,a;for(const e of t)s(e);return a?{buildOrder:o||p,circularDiagnostics:a}:o||p;function s(t,c){const l=eH(e,t);if(r.has(l))return;if(n.has(l))return void(c||(a||(a=[])).push(gS(Ca.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,i.join("\r\n"))));n.set(l,!0),i.push(t);const _=rH(e,t,l);if(_&&_.projectReferences)for(const t of _.projectReferences){s(iH(e,t.path),c||t.circular)}i.pop(),r.set(l,!0),(o||(o=[])).push(t)}}function aH(e){return e.buildOrder||function(e){const t=oH(e,e.rootNames.map(t=>iH(e,t)));e.resolvedConfigFilePaths.clear();const n=new Set(W$(t).map(t=>eH(e,t))),r={onDeleteValue:ft};Ex(e.configFileCache,n,r),Ex(e.projectStatus,n,r),Ex(e.builderPrograms,n,r),Ex(e.diagnostics,n,r),Ex(e.projectPendingBuild,n,r),Ex(e.projectErrorsReported,n,r),Ex(e.buildInfoCache,n,r),Ex(e.outputTimeStamps,n,r),Ex(e.lastCachedPackageJsonLookups,n,r),e.watch&&(Ex(e.allWatchedConfigFiles,n,{onDeleteValue:bx}),e.allWatchedExtendedConfigFiles.forEach(e=>{e.projects.forEach(t=>{n.has(t)||e.projects.delete(t)}),e.close()}),Ex(e.allWatchedWildcardDirectories,n,{onDeleteValue:e=>e.forEach(RU)}),Ex(e.allWatchedInputFiles,n,{onDeleteValue:e=>e.forEach(bx)}),Ex(e.allWatchedPackageJsonFiles,n,{onDeleteValue:e=>e.forEach(bx)}));return e.buildOrder=t}(e)}function sH(e,t,n){const r=t&&iH(e,t),i=aH(e);if(V$(i))return i;if(r){const t=eH(e,r);if(-1===N(i,n=>eH(e,n)===t))return}const o=r?oH(e,[r]):i;return Tn.assert(!V$(o)),Tn.assert(!n||void 0!==r),Tn.assert(!n||o[o.length-1]===r),n?o.slice(0,o.length-1):o}function cH(e){e.cache&&lH(e);const{compilerHost:t,host:n}=e,r=e.readFileWithCache,i=t.getSourceFile,{originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,getSourceFileWithCache:_,readFileWithCache:u}=$U(n,t=>Z$(e,t),(...e)=>i.call(t,...e));e.readFileWithCache=u,t.getSourceFile=_,e.cache={originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,originalReadFileWithCache:r,originalGetSourceFile:i}}function lH(e){if(!e.cache)return;const{cache:t,host:n,compilerHost:r,extendedConfigCache:i,moduleResolutionCache:o,typeReferenceDirectiveResolutionCache:a,libraryResolutionCache:s}=e;n.readFile=t.originalReadFile,n.fileExists=t.originalFileExists,n.directoryExists=t.originalDirectoryExists,n.createDirectory=t.originalCreateDirectory,n.writeFile=t.originalWriteFile,r.getSourceFile=t.originalGetSourceFile,e.readFileWithCache=t.originalReadFileWithCache,i.clear(),null==o||o.clear(),null==a||a.clear(),null==s||s.clear(),e.cache=void 0}function _H(e,t){e.projectStatus.delete(t),e.diagnostics.delete(t)}function uH({projectPendingBuild:e},t,n){const r=e.get(t);(void 0===r||re.projectPendingBuild.set(eH(e,t),0)),t&&t.throwIfCancellationRequested()}var pH=(e=>(e[e.Build=0]="Build",e[e.UpdateOutputFileStamps=1]="UpdateOutputFileStamps",e))(pH||{});function fH(e,t){return e.projectPendingBuild.delete(t),e.diagnostics.has(t)?1:0}function mH(e,t,n,r,i,o){let a,s,c=0;return{kind:0,project:t,projectPath:n,buildOrder:o,getCompilerOptions:()=>i.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),getBuilderProgram:()=>l(yt),getProgram:()=>l(e=>e.getProgramOrUndefined()),getSourceFile:e=>l(t=>t.getSourceFile(e)),getSourceFiles:()=>_(e=>e.getSourceFiles()),getOptionsDiagnostics:e=>_(t=>t.getOptionsDiagnostics(e)),getGlobalDiagnostics:e=>_(t=>t.getGlobalDiagnostics(e)),getConfigFileParsingDiagnostics:()=>_(e=>e.getConfigFileParsingDiagnostics()),getSyntacticDiagnostics:(e,t)=>_(n=>n.getSyntacticDiagnostics(e,t)),getAllDependencies:e=>_(t=>t.getAllDependencies(e)),getSemanticDiagnostics:(e,t)=>_(n=>n.getSemanticDiagnostics(e,t)),getSemanticDiagnosticsOfNextAffectedFile:(e,t)=>l(n=>n.getSemanticDiagnosticsOfNextAffectedFile&&n.getSemanticDiagnosticsOfNextAffectedFile(e,t)),emit:(n,r,i,o,a)=>n||o?l(s=>{var c,l;return s.emit(n,r,i,o,a||(null==(l=(c=e.host).getCustomTransformers)?void 0:l.call(c,t)))}):(y(2,i),4===c?h(r,i):3===c?g(r,i,a):void 0),done:function(t,r,i){return y(6,t,r,i),gr("SolutionBuilder::Projects built"),fH(e,n)}};function l(e){return y(0),a&&e(a)}function _(e){return l(e)||p}function u(){var r,o,l;if(Tn.assert(void 0===a),e.options.dry)return GH(e,Ca.A_non_dry_build_would_build_project_0,t),s=1,void(c=5);if(e.options.verbose&&GH(e,Ca.Building_project_0,t),0===i.fileNames.length)return YH(e,n,OV(i)),s=0,void(c=5);const{host:_,compilerHost:u}=e;if(e.projectCompilerOptions=i.options,null==(r=e.moduleResolutionCache)||r.update(i.options),null==(o=e.typeReferenceDirectiveResolutionCache)||o.update(i.options),a=_.createProgram(i.fileNames,i.options,u,function({options:e,builderPrograms:t,compilerHost:n},r,i){if(e.force)return;const o=t.get(r);return o||I$(i.options,n)}(e,n,i),OV(i),i.projectReferences),e.watch){const t=null==(l=e.moduleResolutionCache)?void 0:l.getPackageJsonInfoCache().getInternalMap();e.lastCachedPackageJsonLookups.set(n,t&&new Set(We(t.values(),t=>e.host.realpath&&(vM(t)||t.directoryExists)?e.host.realpath(Yo(t.packageDirectory,"package.json")):Yo(t.packageDirectory,"package.json")))),e.builderPrograms.set(n,a)}c++}function d(t,r,o){t.length?({buildResult:s,step:c}=xH(e,n,a,i,t,r,o)):c++}function f(e){Tn.assertIsDefined(a),d([...a.getConfigFileParsingDiagnostics(),...a.getOptionsDiagnostics(e),...a.getGlobalDiagnostics(e),...a.getSyntacticDiagnostics(void 0,e)],8,"Syntactic")}function m(e){d(Tn.checkDefined(a).getSemanticDiagnostics(void 0,e),16,"Semantic")}function g(r,o,l){var _,u,d;Tn.assertIsDefined(a),Tn.assert(3===c);const p=a.saveEmitState();let f;const m=[],{emitResult:g}=h$(a,e=>(f||(f=[])).push(e),void 0,void 0,(e,t,n,r,i,o)=>m.push({name:e,text:t,writeByteOrderMark:n,data:o}),o,!1,l||(null==(u=(_=e.host).getCustomTransformers)?void 0:u.call(_,t)));if(f)return a.restoreEmitState(p),({buildResult:s,step:c}=xH(e,n,a,i,f,32,"Declaration file")),{emitSkipped:!0,diagnostics:g.diagnostics};const{host:h,compilerHost:y}=e,v=(null==(d=a.hasChangedEmitSignature)?void 0:d.call(a))?0:2,b=wy(),x=new Map,S=a.getCompilerOptions(),k=$S(S);let T,C;return m.forEach(({name:t,text:i,writeByteOrderMark:o,data:a})=>{const s=Z$(e,t);x.set(Z$(e,t),t),(null==a?void 0:a.buildInfo)&&wH(e,a.buildInfo,n,S,v);const c=(null==a?void 0:a.differsOnlyInMap)?no(e.host,t):void 0;fv(r?{writeFile:r}:y,b,t,i,o),(null==a?void 0:a.differsOnlyInMap)?e.host.setModifiedTime(t,c):!k&&e.watch&&(T||(T=CH(e,n))).set(s,C||(C=U$(e.host)))}),function(t,r,o,l){const _=t.getDiagnostics();if(_.length)return({buildResult:s,step:c}=xH(e,n,a,i,_,64,"Emit")),_;e.write&&r.forEach(t=>vH(e,i,t));AH(e,i,n,Ca.Updating_unchanged_output_timestamps_of_project_0,r),e.diagnostics.delete(n),e.projectStatus.set(n,{type:1,oldestOutputFileName:o}),bH(e,a),c=5,s=l}(b,x,m.length?m[0].name:_U(i,!h.useCaseSensitiveFileNames()),v),g}function h(t,r){Tn.assertIsDefined(a),Tn.assert(4===c);const o=a.emitBuildInfo((r,i,o,s,c,l)=>{(null==l?void 0:l.buildInfo)&&wH(e,l.buildInfo,n,a.getCompilerOptions(),2),t?t(r,i,o,s,c,l):e.compilerHost.writeFile(r,i,o,s,c,l)},r);return o.diagnostics.length&&(QH(e,o.diagnostics),e.diagnostics.set(n,[...e.diagnostics.get(n),...o.diagnostics]),s&=64),o.emittedFiles&&e.write&&o.emittedFiles.forEach(t=>vH(e,i,t)),bH(e,a),c=5,o}function y(a,l,_,d){for(;c<=a&&c<6;){const a=c;switch(c){case 0:u();break;case 1:f(l);break;case 2:m(l);break;case 3:g(_,l,d);break;case 4:h(_,l);break;case 5:jH(e,t,n,r,i,o,Tn.checkDefined(s)),c++;break;default:gn()}Tn.assert(c>a)}}}function gH(e,t,n){if(!e.projectPendingBuild.size)return;if(V$(t))return;const{options:r,projectPendingBuild:i}=e;for(let o=0;or.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),updateOutputFileStatmps:()=>{OH(e,r,n),o=!1},done:()=>(o&&OH(e,r,n),gr("SolutionBuilder::Timestamps only updates"),fH(e,n))}}(e,t.project,t.projectPath,t.config,n)}function yH(e,t,n){const r=gH(e,t,n);return r?hH(e,r,t):r}function vH({write:e},t,n){e&&t.options.listEmittedFiles&&e(`TSFILE: ${n}`)}function bH(e,t){t&&(e.write&&_$(t,e.write),e.host.afterProgramEmitAndDiagnostics&&e.host.afterProgramEmitAndDiagnostics(t),t.releaseProgram()),e.projectCompilerOptions=e.baseCompilerOptions}function xH(e,t,n,r,i,o,a){const s=n&&!n.getCompilerOptions().outFile;return YH(e,t,i),e.projectStatus.set(t,{type:0,reason:`${a} errors`}),s?{buildResult:o,step:4}:(bH(e,n),{buildResult:o,step:5})}function SH(e){return!!e.watcher}function kH(e,t){const n=Z$(e,t),r=e.filesWatched.get(n);if(e.watch&&r){if(!SH(r))return r;if(r.modifiedTime)return r.modifiedTime}const i=no(e.host,t);return e.watch&&(r?r.modifiedTime=i:e.filesWatched.set(n,i)),i}function TH(e,t,n,r,i,o,a){const s=Z$(e,t),c=e.filesWatched.get(s);if(c&&SH(c))c.callbacks.push(n);else{const l=e.watchFile(t,(t,n,r)=>{const i=Tn.checkDefined(e.filesWatched.get(s));Tn.assert(SH(i)),i.modifiedTime=r,i.callbacks.forEach(e=>e(t,n,r))},r,i,o,a);e.filesWatched.set(s,{callbacks:[n],watcher:l,modifiedTime:c})}return{close:()=>{const t=Tn.checkDefined(e.filesWatched.get(s));Tn.assert(SH(t)),1===t.callbacks.length?(e.filesWatched.delete(s),RU(t)):rn(t.callbacks,n)}}}function CH(e,t){if(!e.watch)return;let n=e.outputTimeStamps.get(t);return n||e.outputTimeStamps.set(t,n=new Map),n}function wH(e,t,n,r,i){const o=Hq(r),a=NH(e,o,n),s=U$(e.host);a?(a.buildInfo=t,a.modifiedTime=s,2&i||(a.latestChangedDtsTime=s)):e.buildInfoCache.set(n,{path:Z$(e,o),buildInfo:t,modifiedTime:s,latestChangedDtsTime:2&i?void 0:s})}function NH(e,t,n){const r=Z$(e,t),i=e.buildInfoCache.get(n);return(null==i?void 0:i.path)===r?i:void 0}function DH(e,t,n,r){const i=Z$(e,t),o=e.buildInfoCache.get(n);if(void 0!==o&&o.path===i)return o.buildInfo||void 0;const a=e.readFileWithCache(t),s=a?mU(t,a):void 0;return e.buildInfoCache.set(n,{path:i,buildInfo:s||!1,modifiedTime:r||to}),s}function PH(e,t,n,r){if(nb&&(y=n,b=t),m&&S.add(r)}if(m){g||(g=PW(m,_,l));const e=md(g.roots,(e,t)=>S.has(t)?void 0:t);if(e)return{type:9,buildInfoFile:_,inputFile:e}}if(!_){const r=cU(t,!l.useCaseSensitiveFileNames()),i=CH(e,n);for(const t of r){const n=Z$(e,t);let r=null==i?void 0:i.get(n);if(r||(r=no(e.host,t),null==i||i.set(n,r)),r===to)return{type:3,missingOutputFileName:t};if(rPH(e,t,v,d));if(w)return w;const N=e.lastCachedPackageJsonLookups.get(n),D=N&&gd(N,t=>PH(e,t,v,d));return D||{type:T?2:x?14:1,newestInputFileTime:b,newestInputFileName:y,oldestOutputFileName:d}}(e,t,n);return gr("SolutionBuilder::afterUpToDateCheck"),hr("SolutionBuilder::Up-to-date check","SolutionBuilder::beforeUpToDateCheck","SolutionBuilder::afterUpToDateCheck"),e.projectStatus.set(n,i),i}function AH(e,t,n,r,i){if(t.options.noEmit)return;let o;const a=Hq(t.options);if(a)return(null==i?void 0:i.has(Z$(e,a)))||(e.options.verbose&&GH(e,r,t.options.configFilePath),e.host.setModifiedTime(a,o=U$(e.host)),NH(e,a,n).modifiedTime=o),void e.outputTimeStamps.delete(n);const{host:s}=e,c=cU(t,!s.useCaseSensitiveFileNames()),l=CH(e,n),_=l?new Set:void 0;if(!i||c.length!==i.size){let n=!!e.options.verbose;for(const a of c){const c=Z$(e,a);(null==i?void 0:i.has(c))||(n&&(n=!1,GH(e,r,t.options.configFilePath)),s.setModifiedTime(a,o||(o=U$(e.host))),l&&(l.set(c,o),_.add(c)))}}null==l||l.forEach((e,t)=>{(null==i?void 0:i.has(t))||_.has(t)||l.delete(t)})}function IH(e,t,n){if(!t.composite)return;const r=Tn.checkDefined(e.buildInfoCache.get(n));if(void 0!==r.latestChangedDtsTime)return r.latestChangedDtsTime||void 0;const i=r.buildInfo&&r.buildInfo.program&&r.buildInfo.program.latestChangedDtsFile?e.host.getModifiedTime(ta(r.buildInfo.program.latestChangedDtsFile,Vo(r.path))):void 0;return r.latestChangedDtsTime=i||!1,i}function OH(e,t,n){if(e.options.dry)return GH(e,Ca.A_non_dry_build_would_update_timestamps_for_output_of_project_0,t.options.configFilePath);AH(e,t,n,Ca.Updating_output_timestamps_of_project_0),e.projectStatus.set(n,{type:1,oldestOutputFileName:_U(t,!e.host.useCaseSensitiveFileNames())})}function jH(e,t,n,r,i,o,a){if(!(124&a)&&i.options.composite)for(let i=r+1;ie.diagnostics.has(eH(e,t)))?c?2:1:0}(e,t,n,r,i,o);return gr("SolutionBuilder::afterBuild"),hr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),a}function MH(e,t,n){gr("SolutionBuilder::beforeClean");const r=function(e,t,n){const r=sH(e,t,n);if(!r)return 3;if(V$(r))return QH(e,r.circularDiagnostics),4;const{options:i,host:o}=e,a=i.dry?[]:void 0;for(const t of r){const n=eH(e,t),r=rH(e,t,n);if(void 0===r){ZH(e,n);continue}const i=cU(r,!o.useCaseSensitiveFileNames());if(!i.length)continue;const s=new Set(r.fileNames.map(t=>Z$(e,t)));for(const t of i)s.has(Z$(e,t))||o.fileExists(t)&&(a?a.push(t):(o.deleteFile(t),RH(e,n,0)))}a&&GH(e,Ca.A_non_dry_build_would_delete_the_following_files_Colon_0,a.map(e=>`\r\n * ${e}`).join(""));return 0}(e,t,n);return gr("SolutionBuilder::afterClean"),hr("SolutionBuilder::Clean","SolutionBuilder::beforeClean","SolutionBuilder::afterClean"),r}function RH(e,t,n){e.host.getParsedCommandLine&&1===n&&(n=2),2===n&&(e.configFileCache.delete(t),e.buildOrder=void 0),e.needsSummary=!0,_H(e,t),uH(e,t,n),cH(e)}function BH(e,t,n){e.reportFileChangeDetected=!0,RH(e,t,n),JH(e,250,!0)}function JH(e,t,n){const{hostWithWatch:r}=e;r.setTimeout&&r.clearTimeout&&(e.timerToBuildInvalidatedProject&&r.clearTimeout(e.timerToBuildInvalidatedProject),e.timerToBuildInvalidatedProject=r.setTimeout(zH,t,"timerToBuildInvalidatedProject",e,n))}function zH(e,t,n){gr("SolutionBuilder::beforeBuild");const r=function(e,t){e.timerToBuildInvalidatedProject=void 0,e.reportFileChangeDetected&&(e.reportFileChangeDetected=!1,e.projectErrorsReported.clear(),XH(e,Ca.File_change_detected_Starting_incremental_compilation));let n=0;const r=aH(e),i=yH(e,r,!1);if(i)for(i.done(),n++;e.projectPendingBuild.size;){if(e.timerToBuildInvalidatedProject)return;const i=gH(e,r,!1);if(!i)break;if(1!==i.kind&&(t||5===n))return void JH(e,100,!1);hH(e,i,r).done(),1!==i.kind&&n++}return lH(e),r}(t,n);gr("SolutionBuilder::afterBuild"),hr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),r&&eK(t,r)}function qH(e,t,n,r){e.watch&&!e.allWatchedConfigFiles.has(n)&&e.allWatchedConfigFiles.set(n,TH(e,t,()=>BH(e,n,2),2e3,null==r?void 0:r.watchOptions,S$.ConfigFile,t))}function UH(e,t,n){NU(t,null==n?void 0:n.options,e.allWatchedExtendedConfigFiles,(t,r)=>TH(e,t,()=>{var t;return null==(t=e.allWatchedExtendedConfigFiles.get(r))?void 0:t.projects.forEach(t=>BH(e,t,2))},2e3,null==n?void 0:n.watchOptions,S$.ExtendedConfigFile),t=>Z$(e,t))}function VH(e,t,n,r){e.watch&&FU(q$(e.allWatchedWildcardDirectories,n),r.wildcardDirectories,(i,o)=>e.watchDirectory(i,o=>{var a;AU({watchedDirPath:Z$(e,i),fileOrDirectory:o,fileOrDirectoryPath:Z$(e,o),configFileName:t,currentDirectory:e.compilerHost.getCurrentDirectory(),options:r.options,program:e.builderPrograms.get(n)||(null==(a=nH(e,n))?void 0:a.fileNames),useCaseSensitiveFileNames:e.parseConfigFileHost.useCaseSensitiveFileNames,writeLog:t=>e.writeLog(t),toPath:t=>Z$(e,t)})||BH(e,n,1)},o,null==r?void 0:r.watchOptions,S$.WildcardDirectory,t))}function WH(e,t,n,r){e.watch&&Fx(q$(e.allWatchedInputFiles,n),new Set(r.fileNames),{createNewValue:i=>TH(e,i,()=>BH(e,n,0),250,null==r?void 0:r.watchOptions,S$.SourceFile,t),onDeleteValue:bx})}function $H(e,t,n,r){e.watch&&e.lastCachedPackageJsonLookups&&Fx(q$(e.allWatchedPackageJsonFiles,n),e.lastCachedPackageJsonLookups.get(n),{createNewValue:i=>TH(e,i,()=>BH(e,n,0),2e3,null==r?void 0:r.watchOptions,S$.PackageJson,t),onDeleteValue:bx})}function HH(e,t,n,r,i){const o=Y$(e,t,n,r,i);return{build:(e,t,n,r)=>LH(o,e,t,n,r),clean:e=>MH(o,e),buildReferences:(e,t,n,r)=>LH(o,e,t,n,r,!0),cleanReferences:e=>MH(o,e,!0),getNextInvalidatedProject:e=>(dH(o,e),yH(o,aH(o),!1)),getBuildOrder:()=>aH(o),getUpToDateStatusOfProject:e=>{const t=iH(o,e),n=eH(o,t);return FH(o,rH(o,t,n),n)},invalidateProject:(e,t)=>RH(o,e,t||0),close:()=>function(e){Px(e.allWatchedConfigFiles,bx),Px(e.allWatchedExtendedConfigFiles,RU),Px(e.allWatchedWildcardDirectories,e=>Px(e,RU)),Px(e.allWatchedInputFiles,e=>Px(e,bx)),Px(e.allWatchedPackageJsonFiles,e=>Px(e,bx))}(o)}}function KH(e,t){return va(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function GH(e,t,...n){e.host.reportSolutionBuilderStatus(gS(t,...n))}function XH(e,t,...n){var r,i;null==(i=(r=e.hostWithWatch).onWatchStatusChange)||i.call(r,gS(t,...n),e.host.getNewLine(),e.baseCompilerOptions)}function QH({host:e},t){t.forEach(t=>e.reportDiagnostic(t))}function YH(e,t,n){QH(e,n),e.projectErrorsReported.set(t,!0),n.length&&e.diagnostics.set(t,n)}function ZH(e,t){YH(e,t,[e.configFileCache.get(t)])}function eK(e,t){if(!e.needsSummary)return;e.needsSummary=!1;const n=e.watch||!!e.host.reportErrorSummary,{diagnostics:r}=e;let i=0,o=[];V$(t)?(tK(e,t.buildOrder),QH(e,t.circularDiagnostics),n&&(i+=i$(t.circularDiagnostics)),n&&(o=[...o,...o$(t.circularDiagnostics)])):(t.forEach(t=>{const n=eH(e,t);e.projectErrorsReported.has(n)||QH(e,r.get(n)||p)}),n&&r.forEach(e=>i+=i$(e)),n&&r.forEach(e=>[...o,...o$(e)])),e.watch?XH(e,a$(i),i):e.host.reportErrorSummary&&e.host.reportErrorSummary(i,o)}function tK(e,t){e.options.verbose&&GH(e,Ca.Projects_in_this_build_Colon_0,t.map(t=>"\r\n * "+KH(e,t)).join(""))}function nK(e,t,n){e.options.verbose&&function(e,t,n){switch(n.type){case 5:return GH(e,Ca.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,KH(e,t),KH(e,n.outOfDateOutputFileName),KH(e,n.newerInputFileName));case 6:return GH(e,Ca.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,KH(e,t),KH(e,n.outOfDateOutputFileName),KH(e,n.newerProjectName));case 3:return GH(e,Ca.Project_0_is_out_of_date_because_output_file_1_does_not_exist,KH(e,t),KH(e,n.missingOutputFileName));case 4:return GH(e,Ca.Project_0_is_out_of_date_because_there_was_error_reading_file_1,KH(e,t),KH(e,n.fileName));case 7:return GH(e,Ca.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,KH(e,t),KH(e,n.buildInfoFile));case 8:return GH(e,Ca.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,KH(e,t),KH(e,n.buildInfoFile));case 9:return GH(e,Ca.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,KH(e,t),KH(e,n.buildInfoFile),KH(e,n.inputFile));case 1:if(void 0!==n.newestInputFileTime)return GH(e,Ca.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,KH(e,t),KH(e,n.newestInputFileName||""),KH(e,n.oldestOutputFileName||""));break;case 2:return GH(e,Ca.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,KH(e,t));case 14:return GH(e,Ca.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,KH(e,t));case 10:return GH(e,Ca.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,KH(e,t),KH(e,n.upstreamProjectName));case 11:return GH(e,n.upstreamProjectBlocked?Ca.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:Ca.Project_0_can_t_be_built_because_its_dependency_1_has_errors,KH(e,t),KH(e,n.upstreamProjectName));case 0:return GH(e,Ca.Failed_to_parse_file_0_Colon_1,KH(e,t),n.reason);case 13:return GH(e,Ca.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,KH(e,t),n.version,u);case 16:GH(e,Ca.Project_0_is_being_forcibly_rebuilt,KH(e,t))}}(e,t,n)}var rK=(e=>(e[e.time=0]="time",e[e.count=1]="count",e[e.memory=2]="memory",e))(rK||{});function iK(e){const t=function(){const e=new Map;return e.set("Library",0),e.set("Definitions",0),e.set("TypeScript",0),e.set("JavaScript",0),e.set("JSON",0),e.set("Other",0),e}();return h(e.getSourceFiles(),n=>{const r=function(e,t){if(e.isSourceFileDefaultLibrary(t))return"Library";if(t.isDeclarationFile)return"Definitions";const n=t.path;return Bo(n,Bk)?"TypeScript":Bo(n,Uk)?"JavaScript":Ro(n,".json")?"JSON":"Other"}(e,n),i=Ya(n).length;t.set(r,t.get(r)+i)}),t}function oK(e,t,n){return sK(e,n)?YW(e,!0):t}function aK(e){return!!e.writeOutputIsTTY&&e.writeOutputIsTTY()&&!e.getEnvironmentVariable("NO_COLOR")}function sK(e,t){return t&&void 0!==t.pretty?t.pretty:aK(e)}function cK(e){return e.options.all?be(FO,(e,t)=>Lt(e.name,t.name)):O(FO.slice(),e=>!!e.showInSimplifiedHelpView)}function lK(e){e.write(dj(Ca.Version_0,u)+e.newLine)}function _K(e){if(!aK(e))return{bold:e=>e,blue:e=>e,blueBackground:e=>e,brightWhite:e=>e};const t=e.getEnvironmentVariable("OS")&&e.getEnvironmentVariable("OS").toLowerCase().includes("windows"),n=e.getEnvironmentVariable("WT_SESSION"),r=e.getEnvironmentVariable("TERM_PROGRAM")&&"vscode"===e.getEnvironmentVariable("TERM_PROGRAM");const i="truecolor"===e.getEnvironmentVariable("COLORTERM")||"xterm-256color"===e.getEnvironmentVariable("TERM");function o(e){return`${e}`}return{bold:function(e){return`${e}`},blue:function(e){return!t||n||r?`${e}`:o(e)},brightWhite:o,blueBackground:function(e){return i?`${e}`:`${e}`}}}function uK(e){return`--${e.name}${e.shortName?`, -${e.shortName}`:""}`}function dK(e,t,n,r){var i;const o=[],a=_K(e),s=uK(t),c=function(e){if("object"===e.type)return;return{valueType:function(e){switch(Tn.assert("listOrElement"!==e.type),e.type){case"string":case"number":case"boolean":return dj(Ca.type_Colon);case"list":return dj(Ca.one_or_more_Colon);default:return dj(Ca.one_of_Colon)}}(e),possibleValues:function e(t){let n;switch(t.type){case"string":case"number":case"boolean":n=t.type;break;case"list":case"listOrElement":n=e(t.element);break;case"object":n="";break;default:const r={};return t.type.forEach((e,n)=>{var i;(null==(i=t.deprecatedKeys)?void 0:i.has(n))||(r[e]||(r[e]=[])).push(n)}),Object.entries(r).map(([,e])=>e.join("/")).join(", ")}return n}(e)}}(t),l="object"==typeof t.defaultValueDescription?dj(t.defaultValueDescription):(_=t.defaultValueDescription,u="list"===t.type||"listOrElement"===t.type?t.element.type:t.type,void 0!==_&&"object"==typeof u?We(u.entries()).filter(([,e])=>e===_).map(([e])=>e).join("/"):String(_));var _,u;const d=(null==(i=e.getWidthOfTerminal)?void 0:i.call(e))??0;if(d>=80){let i="";t.description&&(i=dj(t.description)),o.push(...f(s,i,n,r,d,!0),e.newLine),p(c,t)&&(c&&o.push(...f(c.valueType,c.possibleValues,n,r,d,!1),e.newLine),l&&o.push(...f(dj(Ca.default_Colon),l,n,r,d,!1),e.newLine)),o.push(e.newLine)}else{if(o.push(a.blue(s),e.newLine),t.description){const e=dj(t.description);o.push(e)}if(o.push(e.newLine),p(c,t)){if(c&&o.push(`${c.valueType} ${c.possibleValues}`),l){c&&o.push(e.newLine);const t=dj(Ca.default_Colon);o.push(`${t} ${l}`)}o.push(e.newLine)}o.push(e.newLine)}return o;function p(e,t){const n=t.defaultValueDescription;return t.category!==Ca.Command_line_Options&&(!E(["string"],null==e?void 0:e.possibleValues)||!E([void 0,"false","n/a"],n))}function f(e,t,n,r,i,o){const s=[];let c=!0,l=t;const _=i-r;for(;l.length>0;){let t="";c?(t=e.padStart(n),t=t.padEnd(r),t=o?a.blue(t):t):t="".padStart(r);const i=l.substr(0,_);l=l.slice(_),s.push(`${t}${i}`),c=!1}return s}}function pK(e,t){let n=0;for(const e of t){const t=uK(e).length;n=n>t?n:t}const r=n+2,i=r+2;let o=[];for(const n of t){const t=dK(e,n,r,i);o=[...o,...t]}return o[o.length-2]!==e.newLine&&o.push(e.newLine),o}function fK(e,t,n,r,i,o){let a=[];if(a.push(_K(e).bold(t)+e.newLine+e.newLine),i&&a.push(i+e.newLine+e.newLine),!r)return a=[...a,...pK(e,n)],o&&a.push(o+e.newLine+e.newLine),a;const s=new Map;for(const e of n){if(!e.category)continue;const t=dj(e.category),n=s.get(t)??[];n.push(e),s.set(t,n)}return s.forEach((t,n)=>{a.push(`### ${n}${e.newLine}${e.newLine}`),a=[...a,...pK(e,t)]}),o&&a.push(o+e.newLine+e.newLine),a}function mK(e,t){let n=[...gK(e,`${dj(Ca.tsc_Colon_The_TypeScript_Compiler)} - ${dj(Ca.Version_0,u)}`)];n=[...n,...fK(e,dj(Ca.BUILD_OPTIONS),t,!1,mS(Ca.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of n)e.write(t)}function gK(e,t){var n;const r=_K(e),i=[],o=(null==(n=e.getWidthOfTerminal)?void 0:n.call(e))??0,a=r.blueBackground("".padStart(5)),s=r.blueBackground(r.brightWhite("TS ".padStart(5)));if(o>=t.length+5){const n=(o>120?120:o)-5;i.push(t.padEnd(n)+a+e.newLine),i.push("".padStart(n)+s+e.newLine)}else i.push(t+e.newLine),i.push(e.newLine);return i}function hK(e,t){t.options.all?function(e,t,n,r){let i=[...gK(e,`${dj(Ca.tsc_Colon_The_TypeScript_Compiler)} - ${dj(Ca.Version_0,u)}`)];i=[...i,...fK(e,dj(Ca.ALL_COMPILER_OPTIONS),t,!0,void 0,mS(Ca.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))],i=[...i,...fK(e,dj(Ca.WATCH_OPTIONS),r,!1,dj(Ca.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon))],i=[...i,...fK(e,dj(Ca.BUILD_OPTIONS),n,!1,mS(Ca.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of i)e.write(t)}(e,cK(t),UO,wO):function(e,t){const n=_K(e);let r=[...gK(e,`${dj(Ca.tsc_Colon_The_TypeScript_Compiler)} - ${dj(Ca.Version_0,u)}`)];r.push(n.bold(dj(Ca.COMMON_COMMANDS))+e.newLine+e.newLine),a("tsc",Ca.Compiles_the_current_project_tsconfig_json_in_the_working_directory),a("tsc app.ts util.ts",Ca.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options),a("tsc -b",Ca.Build_a_composite_project_in_the_working_directory),a("tsc --init",Ca.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory),a("tsc -p ./path/to/tsconfig.json",Ca.Compiles_the_TypeScript_project_located_at_the_specified_path),a("tsc --help --all",Ca.An_expanded_version_of_this_information_showing_all_possible_compiler_options),a(["tsc --noEmit","tsc --target esnext"],Ca.Compiles_the_current_project_with_additional_settings);const i=t.filter(e=>e.isCommandLineOnly||e.category===Ca.Command_line_Options),o=t.filter(e=>!E(i,e));r=[...r,...fK(e,dj(Ca.COMMAND_LINE_FLAGS),i,!1,void 0,void 0),...fK(e,dj(Ca.COMMON_COMPILER_OPTIONS),o,!1,void 0,mS(Ca.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))];for(const t of r)e.write(t);function a(t,i){const o="string"==typeof t?[t]:t;for(const t of o)r.push(" "+n.blue(t)+e.newLine);r.push(" "+dj(i)+e.newLine+e.newLine)}}(e,cK(t))}function yK(e,t,n){let r,i=YW(e);if(n.options.build)return i(gS(Ca.Option_build_must_be_the_first_command_line_argument)),e.exit(1);if(n.options.locale&&vc(n.options.locale,e,n.errors),n.errors.length>0)return n.errors.forEach(i),e.exit(1);if(n.options.init)return function(e,t,n,r){const i=e.getCurrentDirectory(),o=na(Yo(i,"tsconfig.json"));if(e.fileExists(o))t(gS(Ca.A_tsconfig_json_file_is_already_defined_at_Colon_0,o));else{e.writeFile(o,Kj(n,r,e.newLine));const t=[e.newLine,...gK(e,"Created a new tsconfig.json with:")];t.push($j(n,e.newLine)+e.newLine+e.newLine),t.push("You can learn more at https://aka.ms/tsconfig"+e.newLine);for(const n of t)e.write(n)}}(e,i,n.options,n.fileNames),e.exit(0);if(n.options.version)return lK(e),e.exit(0);if(n.options.help||n.options.all)return hK(e,n),e.exit(0);if(n.options.watch&&n.options.listFilesOnly)return i(gS(Ca.Options_0_and_1_cannot_be_combined,"watch","listFilesOnly")),e.exit(1);if(n.options.project){if(0!==n.fileNames.length)return i(gS(Ca.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)),e.exit(1);const t=na(n.options.project);if(!t||e.directoryExists(t)){if(r=Yo(t,"tsconfig.json"),!e.fileExists(r))return i(gS(Ca.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0,n.options.project)),e.exit(1)}else if(r=t,!e.fileExists(r))return i(gS(Ca.The_specified_path_does_not_exist_Colon_0,n.options.project)),e.exit(1)}else if(0===n.fileNames.length){r=BU(na(e.getCurrentDirectory()),t=>e.fileExists(t))}if(0===n.fileNames.length&&!r)return n.options.showConfig?i(gS(Ca.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,na(e.getCurrentDirectory()))):(lK(e),hK(e,n)),e.exit(1);const o=e.getCurrentDirectory(),a=Gj(n.options,e=>ta(e,o));if(r){const o=new Map,s=r$(r,a,o,n.watchOptions,e,i);if(a.showConfig)return 0!==s.errors.length?(i=oK(e,i,s.options),s.errors.forEach(i),e.exit(1)):(e.write(JSON.stringify(Bj(s,r,e),null,4)+e.newLine),e.exit(0));if(i=oK(e,i,s.options),vx(s.options)){if(xK(e,i))return;return function(e,t,n,r,i,o,a){const s=E$({configFileName:r.options.configFilePath,optionsToExtend:i,watchOptionsToExtend:o,system:e,reportDiagnostic:n,reportWatchStatus:EK(e,r.options)});return PK(e,t,s),s.configFileParsingResult=r,s.extendedConfigCache=a,M$(s)}(e,t,i,s,a,n.watchOptions,o)}$S(s.options)?wK(e,t,i,s):CK(e,t,i,s)}else{if(a.showConfig)return e.write(JSON.stringify(Bj(n,Yo(o,"tsconfig.json"),e),null,4)+e.newLine),e.exit(0);if(i=oK(e,i,a),vx(a)){if(xK(e,i))return;return function(e,t,n,r,i,o){const a=F$({rootFiles:r,options:i,watchOptions:o,system:e,reportDiagnostic:n,reportWatchStatus:EK(e,i)});return PK(e,t,a),M$(a)}(e,t,i,n.fileNames,a,n.watchOptions)}$S(a)?wK(e,t,i,{...n,options:a}):CK(e,t,i,{...n,options:a})}}function vK(e){if(e.length>0&&45===e[0].charCodeAt(0)){const t=e[0].slice(45===e[0].charCodeAt(1)?2:1).toLowerCase();return"build"===t||"b"===t}return!1}function bK(e,t,n){if(vK(n)){const{buildOptions:r,watchOptions:i,projects:o,errors:a}=uj(n.slice(1));if(!r.generateCpuProfile||!e.enableCPUProfiler)return kK(e,t,r,i,o,a);e.enableCPUProfiler(r.generateCpuProfile,()=>kK(e,t,r,i,o,a))}const r=aj(n,t=>e.readFile(t));if(!r.options.generateCpuProfile||!e.enableCPUProfiler)return yK(e,t,r);e.enableCPUProfiler(r.options.generateCpuProfile,()=>yK(e,t,r))}function xK(e,t){return(!e.watchFile||!e.watchDirectory)&&(t(gS(Ca.The_current_host_does_not_support_the_0_option,"--watch")),e.exit(1),!0)}var SK=2;function kK(e,t,n,r,i,o){const a=oK(e,YW(e),n);if(n.locale&&vc(n.locale,e,o),o.length>0)return o.forEach(a),e.exit(1);if(n.help)return lK(e),mK(e,VO),e.exit(0);if(0===i.length)return lK(e),mK(e,VO),e.exit(0);if(!e.getModifiedTime||!e.setModifiedTime||n.clean&&!e.deleteFile)return a(gS(Ca.The_current_host_does_not_support_the_0_option,"--build")),e.exit(1);if(n.watch){if(xK(e,a))return;const o=G$(e,void 0,a,$$(e,sK(e,n)),EK(e,n));o.jsDocParsingMode=SK;const s=FK(e,n);NK(e,t,o,s);const c=o.onWatchStatusChange;let l=!1;o.onWatchStatusChange=(e,t,n,r)=>{null==c||c(e,t,n,r),!l||e.code!==Ca.Found_0_errors_Watching_for_file_changes.code&&e.code!==Ca.Found_1_error_Watching_for_file_changes.code||AK(_,s)};const _=Q$(o,i,n,r);return _.build(),AK(_,s),l=!0,_}const s=K$(e,void 0,a,$$(e,sK(e,n)),TK(e,n));s.jsDocParsingMode=SK;const c=FK(e,n);NK(e,t,s,c);const l=X$(s,i,n),_=n.clean?l.clean():l.build();return AK(l,c),Dr(),e.exit(_)}function TK(e,t){return sK(e,t)?(t,n)=>e.write(c$(t,n,e.newLine,e)):void 0}function CK(e,t,n,r){const{fileNames:i,options:o,projectReferences:a}=r,s=WU(o,void 0,e);s.jsDocParsingMode=SK;const c=s.getCurrentDirectory(),l=on(s.useCaseSensitiveFileNames());$U(s,e=>ia(e,c,l)),jK(e,o,!1);const _=RV({rootNames:i,options:o,projectReferences:a,host:s,configFileParsingDiagnostics:OV(r)}),u=y$(_,n,t=>e.write(t+e.newLine),TK(e,o));return MK(e,_,void 0),t(_),e.exit(u)}function wK(e,t,n,r){const{options:i,fileNames:o,projectReferences:a}=r;jK(e,i,!1);const s=O$(i,e);s.jsDocParsingMode=SK;const c=A$({host:s,system:e,rootNames:o,options:i,configFileParsingDiagnostics:OV(r),projectReferences:a,reportDiagnostic:n,reportErrorSummary:TK(e,i),afterProgramEmitAndDiagnostics:n=>{MK(e,n.getProgram(),void 0),t(n)}});return e.exit(c)}function NK(e,t,n,r){DK(e,n,!0),n.afterProgramEmitAndDiagnostics=n=>{MK(e,n.getProgram(),r),t(n)}}function DK(e,t,n){const r=t.createProgram;t.createProgram=(t,i,o,a,s,c)=>(Tn.assert(void 0!==t||void 0===i&&!!a),void 0!==i&&jK(e,i,n),r(t,i,o,a,s,c))}function PK(e,t,n){n.jsDocParsingMode=SK,DK(e,n,!1);const r=n.afterProgramCreate;n.afterProgramCreate=n=>{r(n),MK(e,n.getProgram(),void 0),t(n)}}function EK(e,t){return n$(e,sK(e,t))}function FK(e,t){if(e===To&&t.extendedDiagnostics)return Cr(),function(){let e;return{addAggregateStatistic:t,forEachAggregateStatistics:n,clear:r};function t(t){const n=null==e?void 0:e.get(t.name);n?2===n.type?n.value=Math.max(n.value,t.value):n.value+=t.value:(e??(e=new Map)).set(t.name,t)}function n(t){null==e||e.forEach(t)}function r(){e=void 0}}()}function AK(e,t){if(!t)return;if(!Tr())return void To.write(Ca.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n");const n=[];function r(e){const t=yr(e);t&&n.push({name:i(e),value:t,type:1})}function i(e){return e.replace("SolutionBuilder::","")}n.push({name:"Projects in scope",value:W$(e.getBuildOrder()).length,type:1}),r("SolutionBuilder::Projects built"),r("SolutionBuilder::Timestamps only updates"),r("SolutionBuilder::Bundles updated"),t.forEachAggregateStatistics(e=>{e.name=`Aggregate ${e.name}`,n.push(e)}),br((e,t)=>{LK(e)&&n.push({name:`${i(e)} time`,value:t,type:0})}),wr(),Cr(),t.clear(),RK(To,n)}function IK(e,t){return e===To&&(t.diagnostics||t.extendedDiagnostics)}function OK(e,t){return e===To&&t.generateTrace}function jK(e,t,n){IK(e,t)&&Cr(e),OK(e,t)&&Nr(n?"build":"project",t.generateTrace,t.configFilePath)}function LK(e){return ln(e,"SolutionBuilder::")}function MK(e,t,n){var r;const i=t.getCompilerOptions();let o;if(OK(e,i)&&(null==(r=cr)||r.stopTracing()),IK(e,i)){o=[];const r=e.getMemoryUsage?e.getMemoryUsage():-1;s("Files",t.getSourceFiles().length);const l=iK(t);if(i.extendedDiagnostics)for(const[e,t]of l.entries())s("Lines of "+e,t);else s("Lines",x(l.values(),(e,t)=>e+t,0));s("Identifiers",t.getIdentifierCount()),s("Symbols",t.getSymbolCount()),s("Types",t.getTypeCount()),s("Instantiations",t.getInstantiationCount()),r>=0&&a({name:"Memory used",value:r,type:2},!0);const _=Tr(),u=_?vr("Program"):0,d=_?vr("Bind"):0,p=_?vr("Check"):0,f=_?vr("Emit"):0;if(i.extendedDiagnostics){const e=t.getRelationCacheSizes();s("Assignability cache size",e.assignable),s("Identity cache size",e.identity),s("Subtype cache size",e.subtype),s("Strict subtype cache size",e.strictSubtype),_&&br((e,t)=>{LK(e)||c(`${e} time`,t,!0)})}else _&&(c("I/O read",vr("I/O Read"),!0),c("I/O write",vr("I/O Write"),!0),c("Parse time",u,!0),c("Bind time",d,!0),c("Check time",p,!0),c("Emit time",f,!0));_&&c("Total time",u+d+p+f,!1),RK(e,o),_?n?(br(e=>{LK(e)||Sr(e)}),xr(e=>{LK(e)||kr(e)})):wr():e.write(Ca.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n")}function a(e,t){o.push(e),t&&(null==n||n.addAggregateStatistic(e))}function s(e,t){a({name:e,value:t,type:1},!0)}function c(e,t,n){a({name:e,value:t,type:0},n)}}function RK(e,t){let n=0,r=0;for(const e of t){e.name.length>n&&(n=e.name.length);const t=BK(e);t.length>r&&(r=t.length)}for(const i of t)e.write(`${i.name}:`.padEnd(n+2)+BK(i).toString().padStart(r)+e.newLine)}function BK(e){switch(e.type){case 1:return""+e.value;case 0:return(e.value/1e3).toFixed(2)+"s";case 2:return Math.round(e.value/1e3)+"K";default:Tn.assertNever(e.type)}}function JK(e,t){const n=tk(e,"strictNullChecks");return{typeFromExpression:u,serializeTypeOfDeclaration:function(e,n){switch(e.kind){case 171:return r(Pv(e));case 169:return s(e,n);case 260:return function(e,n){const i=Pv(e);if(i)return r(i);let o;e.initializer&&(t.isExpandoFunctionDeclaration(e)||(o=u(e.initializer,n,void 0,void 0,pf(e))));return o??c(e,n)}(e,n);case 172:return function(e,t){const n=Pv(e);if(n)return r(n);let i;if(e.initializer){const n=lf(e);i=u(e.initializer,t,void 0,void 0,n)}return i??c(e,t)}(e,n);case 208:return c(e,n);case 277:return i(e.expression,n,void 0,!0);case 211:case 212:case 226:return r(Pv(e))||c(e,n);case 303:return u(e.initializer,n)||c(e,n);default:Tn.assertNever(e,`Node needs to be an inferrable node, found ${Tn.formatSyntaxKind(e.kind)}`)}},serializeReturnTypeForSignature:function(e,t){switch(e.kind){case 177:return a(e,t);case 174:case 262:case 180:case 173:case 179:case 176:case 178:case 181:case 184:case 185:case 218:case 219:case 317:case 323:return y(e,t);default:Tn.assertNever(e,`Node needs to be an inferrable node, found ${Tn.formatSyntaxKind(e.kind)}`)}},serializeTypeOfExpression:i};function r(e,t){return!(void 0===e||!(!t||e&&h(e)))||void 0}function i(e,t,n,r){return u(e,t,!1,n,r)??l(e,t)}function o(e){if(e)return 177===e.kind?Fv(e):e.parameters.length>0?Pv(e.parameters[0]):void 0}function a(e,n){const i=t.getAllAccessorDeclarations(e),a=function(e,t){let n=o(e);return n||e===t.firstAccessor||(n=o(t.firstAccessor)),!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=o(t.secondAccessor)),n}(e,i);return a?r(a):!!i.getAccessor&&y(i.getAccessor,n)}function s(e,n){const i=e.parent;if(178===i.kind)return a(i,n);const o=Pv(e),s=t.requiresAddingImplicitUndefined(e);let l;return o?l=r(o,s):e.initializer&&QN(e.name)&&(l=u(e.initializer,n,void 0,s)),l??c(e,n)}function c(e,t){return t.tracker.reportInferenceFallback(e),!1}function l(e,t){return t.tracker.reportInferenceFallback(e),!1}function _(e,t,n,i){return Il(t)?u(e,n,!0,i):(i&&!h(t)&&n.tracker.reportInferenceFallback(t),r(t))}function u(e,n,i=!1,o=!1,a=!1){switch(e.kind){case 217:return fA(e)?_(e.expression,mA(e),n,o):u(e.expression,n,i,o);case 80:if(t.isUndefinedIdentifierExpression(e))return!0;break;case 106:case 9:case 15:case 11:case 10:case 112:case 97:return!0;case 219:case 218:return function(e,t){const n=r(e.type)??y(e,t),i=f(e.typeParameters),o=e.parameters.every(e=>p(e,t));return n&&i&&o}(e,n);case 216:case 234:const s=e;return _(s.expression,s.type,n,o);case 224:const c=e;if(jC(c)){if(10===c.operand.kind)return!0;if(9===c.operand.kind)return!0}break;case 228:if(!i&&!a)return!0;break;case 209:return function(e,t,n){if(!function(e,t,n){if(!n)return t.tracker.reportInferenceFallback(e),!1;for(const n of e.elements)if(230===n.kind)return t.tracker.reportInferenceFallback(n),!1;return!0}(e,t,n))return!1;let r=!0;for(const i of e.elements)Tn.assert(230!==i.kind),232!==i.kind&&(r=(u(i,t,n)??l(i,t))&&r);return!0}(e,n,i);case 210:return function(e,t,n){if(!function(e,t){let n=!0;for(const r of e.properties){if(262144&r.flags){n=!1;break}if(304===r.kind||305===r.kind)t.tracker.reportInferenceFallback(r),n=!1;else{if(262144&r.name.flags){n=!1;break}if(81===r.name.kind)n=!1;else if(167===r.name.kind){jC(r.name.expression,!1)||(t.tracker.reportInferenceFallback(r.name),n=!1)}}}return n}(e,t))return!1;let r=!0;for(const i of e.properties){Tn.assert(!KE(i)&&!GE(i));const e=i.name;switch(i.kind){case 174:r=!!m(i,e,t)&&r;break;case 303:r=!!d(i,e,t,n)&&r;break;case 178:case 177:r=!!g(i,e,t)&&r}}return r}(e,n,i);case 231:return l(e,n)}}function d(e,t,n,r){return u(e.initializer,n,r)??c(e,n)}function p(e,t){return s(e,t)}function f(e){return(null==e?void 0:e.every(e=>r(e.constraint)&&r(e.default)))??!0}function m(e,t,n){const r=y(e,n),i=f(e.typeParameters),o=e.parameters.every(e=>p(e,n));return r&&i&&o}function g(e,n,i){const a=t.getAllAccessorDeclarations(e),s=a.getAccessor&&o(a.getAccessor),c=a.setAccessor&&o(a.setAccessor);if(void 0!==s&&void 0!==c){const t=e.parameters.every(e=>p(e,i));return Bu(e)?t&&r(s):t}if(a.firstAccessor===e){const t=s??c,n=t?r(t):function(e,t,n){return 177===e.kind?y(e,n):(n.tracker.reportInferenceFallback(e),!1)}(e,0,i);return n}return!1}function h(e){return!n||(!(!jh(e.kind)&&201!==e.kind&&184!==e.kind&&185!==e.kind&&188!==e.kind&&189!==e.kind&&187!==e.kind&&203!==e.kind&&197!==e.kind)||(196===e.kind?h(e.type):(192===e.kind||193===e.kind)&&e.types.every(h)))}function y(e,t){let n;const i=Fv(e);return i&&(n=r(i)),!n&&lh(e)&&(n=function(e,t){let n;if(e&&!Ld(e.body)){if(3&$h(e))return;const t=e.body;t&&jP(t)?jf(t,e=>{if(n)return n=void 0,!0;n=e.expression}):n=t}if(n)return u(n,t);return}(e,t)),n??function(e,t){return t.tracker.reportInferenceFallback(e),!1}(e,t)}}var zK={};a(zK,{NameValidationResult:()=>fG,discoverTypings:()=>dG,isTypingUpToDate:()=>iG,loadSafeList:()=>_G,loadTypesMap:()=>uG,nodeCoreModuleList:()=>sG,nodeCoreModules:()=>cG,nonRelativeModuleNameForTypingCache:()=>lG,prefixedNodeCoreModuleList:()=>aG,renderPackageNameValidationFailure:()=>yG,validatePackageName:()=>gG});var qK,UK,VK="action::set",WK="action::invalidate",$K="action::packageInstalled",HK="event::typesRegistry",KK="event::beginInstallTypes",GK="event::endInstallTypes",XK="event::initializationFailed",QK="action::watchTypingLocations";function YK(e){return To.args.includes(e)}function ZK(e){const t=To.args.indexOf(e);return t>=0&&t`node:${e}`),sG=[...oG,...aG],cG=new Set(sG);function lG(e){return cG.has(e)?"node":e}function _G(e,t){const n=fj(t,t=>e.readFile(t));return new Map(Object.entries(n.config))}function uG(e,t){var n;const r=fj(t,t=>e.readFile(t));if(null==(n=r.config)?void 0:n.simpleMap)return new Map(Object.entries(r.config.simpleMap))}function dG(e,t,n,r,i,o,a,s,c,l){if(!a||!a.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};const _=new Map;n=$(n,e=>{const t=na(e);if(Qk(t))return t});const u=[];a.include&&y(a.include,"Explicitly included types");const d=a.exclude||[];if(!l.types){const e=new Set(n.map(Vo));e.add(r),e.forEach(e=>{v(e,"bower.json","bower_components",u),v(e,"package.json","node_modules",u)})}if(a.disableFilenameBasedTypeAcquisition||function(e){const n=$(e,e=>{if(!Qk(e))return;const t=Zt(aT(xt(Wo(e))));return i.get(t)});n.length&&y(n,"Inferred typings from file names");ee(e,e=>Ro(e,".jsx"))&&(t&&t("Inferred 'react' typings due to presence of '.jsx' extension"),g("react"))}(n),s){y(oe(s.map(lG),Ft,Rt),"Inferred typings from unresolved imports")}for(const e of d){_.delete(e)&&t&&t(`Typing for ${e} is in exclude list, will be ignored.`)}o.forEach((e,t)=>{const n=c.get(t);!1===_.get(t)&&void 0!==n&&iG(e,n)&&_.set(t,e.typingLocation)});const p=[],f=[];_.forEach((e,t)=>{e?f.push(e):p.push(t)});const m={cachedTypingPaths:f,newTypingNames:p,filesToWatch:u};return t&&t(`Finished typings discovery:${rG(m)}`),m;function g(e){_.has(e)||_.set(e,!1)}function y(e,n){t&&t(`${n}: ${JSON.stringify(e)}`),h(e,g)}function v(n,r,i,o){const a=Yo(n,r);let s,c;e.fileExists(a)&&(o.push(a),s=fj(a,t=>e.readFile(t)).config,c=z([s.dependencies,s.devDependencies,s.optionalDependencies,s.peerDependencies],ze),y(c,`Typing names in '${a}' dependencies`));const l=Yo(n,i);if(o.push(l),!e.directoryExists(l))return;const u=[],d=c?c.map(e=>Yo(l,e,r)):e.readDirectory(l,[".json"],void 0,void 0,3).filter(e=>{if(Wo(e)!==r)return!1;const t=Ko(na(e)),n="@"===t[t.length-3][0];return n&&xt(t[t.length-4])===i||!n&&xt(t[t.length-3])===i});t&&t(`Searching for typing names in ${l}; all files: ${JSON.stringify(d)}`);for(const n of d){const r=na(n),i=fj(r,t=>e.readFile(t)).config;if(!i.name)continue;const o=i.types||i.typings;if(o){const n=ta(o,Vo(r));e.fileExists(n)?(t&&t(` Package '${i.name}' provides its own types.`),_.set(i.name,n)):t&&t(` Package '${i.name}' provides its own types but they are missing.`)}else u.push(i.name)}y(u," Found package names")}}var pG,fG=(e=>(e[e.Ok=0]="Ok",e[e.EmptyName=1]="EmptyName",e[e.NameTooLong=2]="NameTooLong",e[e.NameStartsWithDot=3]="NameStartsWithDot",e[e.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",e[e.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters",e))(fG||{}),mG=214;function gG(e){return hG(e,!0)}function hG(e,t){if(!e)return 1;if(e.length>mG)return 2;if(46===e.charCodeAt(0))return 3;if(95===e.charCodeAt(0))return 4;if(t){const t=/^@([^/]+)\/([^/]+)$/.exec(e);if(t){const e=hG(t[1],!1);if(0!==e)return{name:t[1],isScopeName:!0,result:e};const n=hG(t[2],!1);return 0!==n?{name:t[2],isScopeName:!1,result:n}:0}}return encodeURIComponent(e)!==e?5:0}function yG(e,t){return"object"==typeof e?vG(t,e.result,e.name,e.isScopeName):vG(t,e,t,!1)}function vG(e,t,n,r){const i=r?"Scope":"Package";switch(t){case 1:return`'${e}':: ${i} name '${n}' cannot be empty`;case 2:return`'${e}':: ${i} name '${n}' should be less than ${mG} characters`;case 3:return`'${e}':: ${i} name '${n}' cannot start with '.'`;case 4:return`'${e}':: ${i} name '${n}' cannot start with '_'`;case 5:return`'${e}':: ${i} name '${n}' contains non URI safe characters`;case 0:return Tn.fail();default:Tn.assertNever(t)}}(e=>{class t{constructor(e){this.text=e}getText(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)}getLength(){return this.text.length}getChangeRange(){}}e.fromString=function(e){return new t(e)}})(pG||(pG={}));var bG=(e=>(e[e.Dependencies=1]="Dependencies",e[e.DevDependencies=2]="DevDependencies",e[e.PeerDependencies=4]="PeerDependencies",e[e.OptionalDependencies=8]="OptionalDependencies",e[e.All=15]="All",e))(bG||{}),xG=(e=>(e[e.Off=0]="Off",e[e.On=1]="On",e[e.Auto=2]="Auto",e))(xG||{}),SG=(e=>(e[e.Semantic=0]="Semantic",e[e.PartialSemantic=1]="PartialSemantic",e[e.Syntactic=2]="Syntactic",e))(SG||{}),kG={},TG=(e=>(e.Original="original",e.TwentyTwenty="2020",e))(TG||{}),CG=(e=>(e.All="All",e.SortAndCombine="SortAndCombine",e.RemoveUnused="RemoveUnused",e))(CG||{}),wG=(e=>(e[e.Invoked=1]="Invoked",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",e))(wG||{}),NG=(e=>(e.Type="Type",e.Parameter="Parameter",e.Enum="Enum",e))(NG||{}),DG=(e=>(e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference",e))(DG||{}),PG=(e=>(e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart",e))(PG||{}),EG=(e=>(e.Ignore="ignore",e.Insert="insert",e.Remove="remove",e))(EG||{});function FG(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var AG=FG("\n"),IG=(e=>(e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral",e[e.link=22]="link",e[e.linkName=23]="linkName",e[e.linkText=24]="linkText",e))(IG||{}),OG=(e=>(e[e.None=0]="None",e[e.MayIncludeAutoImports=1]="MayIncludeAutoImports",e[e.IsImportStatementCompletion=2]="IsImportStatementCompletion",e[e.IsContinuation=4]="IsContinuation",e[e.ResolvedModuleSpecifiers=8]="ResolvedModuleSpecifiers",e[e.ResolvedModuleSpecifiersBeyondLimit=16]="ResolvedModuleSpecifiersBeyondLimit",e[e.MayIncludeMethodSnippets=32]="MayIncludeMethodSnippets",e))(OG||{}),jG=(e=>(e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports",e))(jG||{}),LG=(e=>(e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration",e))(LG||{}),MG=(e=>(e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition",e))(MG||{}),RG=(e=>(e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral",e))(RG||{}),BG=(e=>(e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.variableUsingElement="using",e.variableAwaitUsingElement="await using",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.memberAccessorVariableElement="accessor",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string",e.link="link",e.linkName="link name",e.linkText="link text",e))(BG||{}),JG=(e=>(e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.deprecatedModifier="deprecated",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json",e.dmtsModifier=".d.mts",e.mtsModifier=".mts",e.mjsModifier=".mjs",e.dctsModifier=".d.cts",e.ctsModifier=".cts",e.cjsModifier=".cjs",e))(JG||{}),zG=(e=>(e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value",e))(zG||{}),qG=(e=>(e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral",e))(qG||{}),UG=Fs(99,!0),VG=(e=>(e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All",e))(VG||{});function WG(e){switch(e.kind){case 260:return zm(e)&&al(e)?7:1;case 169:case 208:case 172:case 171:case 303:case 304:case 174:case 173:case 176:case 177:case 178:case 262:case 218:case 219:case 299:case 291:return 1;case 168:case 264:case 265:case 187:return 2;case 346:return void 0===e.name?3:2;case 306:case 263:return 3;case 267:return pp(e)||1===qR(e)?5:4;case 266:case 275:case 276:case 271:case 272:case 277:case 278:return 7;case 307:return 5}return 7}function $G(e){const t=(e=KX(e)).parent;return 307===e.kind?1:kE(t)||wE(t)||EE(t)||SE(t)||pE(t)||uE(t)&&e===t.name?7:HG(e)?function(e){const t=166===e.kind?e:dD(e.parent)&&e.parent.right===e?e.parent:void 0;return t&&271===t.parent.kind?7:4}(e):yh(e)?WG(t):u_(e)&&xc(e,fn(eF,Gu,tF))?7:function(e){Fb(e)&&(e=e.parent);switch(e.kind){case 110:return!Em(e);case 197:return!0}switch(e.parent.kind){case 183:return!0;case 205:return!e.parent.isTypeOf;case 233:return Af(e.parent)}return!1}(e)?2:function(e){return function(e){let t=e,n=!0;if(166===t.parent.kind){for(;t.parent&&166===t.parent.kind;)t=t.parent;n=t.right===e}return 183===t.parent.kind&&!n}(e)||function(e){let t=e,n=!0;if(211===t.parent.kind){for(;t.parent&&211===t.parent.kind;)t=t.parent;n=t.name===e}if(!n&&233===t.parent.kind&&298===t.parent.parent.kind){const e=t.parent.parent.parent;return 263===e.kind&&119===t.parent.parent.token||264===e.kind&&96===t.parent.parent.token}return!1}(e)}(e)?4:fD(t)?(Tn.assert(IF(t.parent)),2):KD(t)?3:1}function HG(e){for(;166===e.parent.kind;)e=e.parent;return Mm(e.parent)&&e.parent.moduleReference===e}function KG(e,t=!1,n=!1){return rX(e,oP,eX,t,n)}function GG(e,t=!1,n=!1){return rX(e,aP,eX,t,n)}function XG(e,t=!1,n=!1){return rX(e,K_,eX,t,n)}function QG(e,t=!1,n=!1){return rX(e,sP,tX,t,n)}function YG(e,t=!1,n=!1){return rX(e,gD,eX,t,n)}function ZG(e,t=!1,n=!1){return rX(e,Iu,nX,t,n)}function eX(e){return e.expression}function tX(e){return e.tag}function nX(e){return e.tagName}function rX(e,t,n,r,i){let o=r?oX(e):iX(e);return i&&(o=hA(o)),!!o&&!!o.parent&&t(o.parent)&&n(o.parent)===o}function iX(e){return pX(e)?e.parent:e}function oX(e){return pX(e)||fX(e)?e.parent:e}function aX(e,t){for(;e;){if(256===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}}function sX(e,t){return!!rP(e.expression)&&e.expression.name.text===t}function cX(e){var t;return QN(e)&&(null==(t=dt(e.parent,Ll))?void 0:t.label)===e}function lX(e){var t;return QN(e)&&(null==(t=dt(e.parent,XP))?void 0:t.label)===e}function _X(e){return lX(e)||cX(e)}function uX(e){var t;return(null==(t=dt(e.parent,Mu))?void 0:t.tagName)===e}function dX(e){var t;return(null==(t=dt(e.parent,dD))?void 0:t.right)===e}function pX(e){var t;return(null==(t=dt(e.parent,rP))?void 0:t.name)===e}function fX(e){var t;return(null==(t=dt(e.parent,iP))?void 0:t.argumentExpression)===e}function mX(e){var t;return(null==(t=dt(e.parent,sE))?void 0:t.name)===e}function gX(e){var t;return QN(e)&&(null==(t=dt(e.parent,f_))?void 0:t.name)===e}function hX(e){switch(e.parent.kind){case 172:case 171:case 303:case 306:case 174:case 173:case 177:case 178:case 267:return jc(e.parent)===e;case 212:return e.parent.argumentExpression===e;case 167:return!0;case 201:return 199===e.parent.parent.kind;default:return!1}}function yX(e){return Om(e.parent.parent)&&jm(e.parent.parent)===e}function vX(e){for(Mg(e)&&(e=e.parent.parent);;){if(!(e=e.parent))return;switch(e.kind){case 307:case 174:case 173:case 262:case 218:case 177:case 178:case 263:case 264:case 266:case 267:return e}}}function bX(e){switch(e.kind){case 307:return tO(e)?"module":"script";case 267:return"module";case 263:case 231:return"class";case 264:return"interface";case 265:case 338:case 346:return"type";case 266:return"enum";case 260:return t(e);case 208:return t(py(e));case 219:case 262:case 218:return"function";case 177:return"getter";case 178:return"setter";case 174:case 173:return"method";case 303:const{initializer:n}=e;return f_(n)?"method":"property";case 172:case 171:case 304:case 305:return"property";case 181:return"index";case 180:return"construct";case 179:return"call";case 176:case 175:return"constructor";case 168:return"type parameter";case 306:return"enum member";case 169:return Wv(e,31)?"property":"parameter";case 271:case 276:case 281:case 274:case 280:return"alias";case 226:const r=dg(e),{right:i}=e;switch(r){case 7:case 8:case 9:case 0:default:return"";case 1:case 2:const e=bX(i);return""===e?"const":e;case 3:case 5:return _P(i)?"method":"property";case 4:return"property";case 6:return"local class"}case 80:return pE(e.parent)?"alias":"";case 277:const o=bX(e.expression);return""===o?"const":o;default:return""}function t(e){return df(e)?"const":ff(e)?"let":"var"}}function xX(e){switch(e.kind){case 110:return!0;case 80:return Nv(e)&&169===e.parent.kind;default:return!1}}var SX=/^\/\/\/\s*=n.end}function PX(e,t,n){return e.pos<=t&&e.end>=n}function EX(e,t,n){return AX(e.pos,e.end,t,n)}function FX(e,t,n,r){return AX(e.getStart(t),e.end,n,r)}function AX(e,t,n,r){return Math.max(e,n)e.kind===t)}function BX(e){const t=C(e.parent.getChildren(),t=>zF(t)&&TX(t,e));return Tn.assert(!t||E(t.getChildren(),e)),t}function JX(e){return 90===e.kind}function zX(e){return 86===e.kind}function qX(e){return 100===e.kind}function UX(e,t){if(16777216&e.flags)return;const n=CZ(e,t);if(n)return n;const r=function(e){let t;return xc(e,e=>(A_(e)&&(t=e),!dD(e.parent)&&!A_(e.parent)&&!P_(e.parent))),t}(e);return r&&t.getTypeAtLocation(r)}function VX(e,t){if(!t)switch(e.kind){case 263:case 231:return function(e){if(Ic(e))return e.name;if(rE(e)){const t=e.modifiers&&C(e.modifiers,JX);if(t)return t}if(kP(e)){const t=C(e.getChildren(),zX);if(t)return t}}(e);case 262:case 218:return function(e){if(Ic(e))return e.name;if(nE(e)){const t=C(e.modifiers,JX);if(t)return t}if(_P(e)){const t=C(e.getChildren(),qX);if(t)return t}}(e);case 176:return e}if(Ic(e))return e.name}function WX(e,t){if(e.importClause){if(e.importClause.name&&e.importClause.namedBindings)return;if(e.importClause.name)return e.importClause.name;if(e.importClause.namedBindings){if(xE(e.importClause.namedBindings)){const t=Fe(e.importClause.namedBindings.elements);if(!t)return;return t.name}if(vE(e.importClause.namedBindings))return e.importClause.namedBindings.name}}if(!t)return e.moduleSpecifier}function $X(e,t){if(e.exportClause){if(CE(e.exportClause)){if(!Fe(e.exportClause.elements))return;return e.exportClause.elements[0].name}if(bE(e.exportClause))return e.exportClause.name}if(!t)return e.moduleSpecifier}function HX(e,t){const{parent:n}=e;if(__(e)&&(t||90!==e.kind)?bI(n)&&E(n.modifiers,e):86===e.kind?rE(n)||kP(e):100===e.kind?nE(n)||_P(e):120===e.kind?iE(n):94===e.kind?aE(n):156===e.kind?oE(n):145===e.kind||144===e.kind?sE(n):102===e.kind?uE(n):139===e.kind?kD(n):153===e.kind&&TD(n)){const e=VX(n,t);if(e)return e}if((115===e.kind||87===e.kind||121===e.kind)&&tE(n)&&1===n.declarations.length){const e=n.declarations[0];if(QN(e.name))return e.name}if(156===e.kind){if(pE(n)&&n.isTypeOnly){const e=WX(n.parent,t);if(e)return e}if(TE(n)&&n.isTypeOnly){const e=$X(n,t);if(e)return e}}if(130===e.kind){if(SE(n)&&n.propertyName||wE(n)&&n.propertyName||vE(n)||bE(n))return n.name;if(TE(n)&&n.exportClause&&bE(n.exportClause))return n.exportClause.name}if(102===e.kind&&dE(n)){const e=WX(n,t);if(e)return e}if(95===e.kind){if(TE(n)){const e=$X(n,t);if(e)return e}if(kE(n))return hA(n.expression)}if(149===e.kind&&EE(n))return n.expression;if(161===e.kind&&(dE(n)||TE(n))&&n.moduleSpecifier)return n.moduleSpecifier;if((96===e.kind||119===e.kind)&&WE(n)&&n.token===e.kind){const e=function(e){if(1===e.types.length)return e.types[0].expression}(n);if(e)return e}if(96===e.kind){if(fD(n)&&n.constraint&&PD(n.constraint))return n.constraint.typeName;if(zD(n)&&PD(n.extendsType))return n.extendsType.typeName}if(140===e.kind&&qD(n))return n.typeParameter.name;if(103===e.kind&&fD(n)&&HD(n.parent))return n.name;if(143===e.kind&&WD(n)&&143===n.operator&&PD(n.type))return n.type.typeName;if(148===e.kind&&WD(n)&&148===n.operator&&OD(n.type)&&PD(n.type.elementType))return n.type.elementType.typeName;if(!t){if((105===e.kind&&aP(n)||116===e.kind&&fP(n)||114===e.kind&&pP(n)||135===e.kind&&mP(n)||127===e.kind&&xP(n)||91===e.kind&&dP(n))&&n.expression)return hA(n.expression);if((103===e.kind||104===e.kind)&&yP(n)&&n.operatorToken===e)return hA(n.right);if(130===e.kind&&wP(n)&&PD(n.type))return n.type.typeName;if(103===e.kind&&UP(n)||165===e.kind&&VP(n))return hA(n.expression)}return e}function KX(e){return HX(e,!1)}function GX(e){return HX(e,!0)}function XX(e,t){return QX(e,t,e=>Zh(e)||jh(e.kind)||YN(e))}function QX(e,t,n){return ZX(e,t,!1,n,!1)}function YX(e,t){return ZX(e,t,!0,void 0,!1)}function ZX(e,t,n,r,i){let o,a=e;for(;;){const i=a.getChildren(e),c=Le(i,t,(e,t)=>t,(o,a)=>{const c=i[o].getEnd();if(ct?1:s(i[o],l,c)?i[o-1]&&s(i[o-1])?1:0:r&&l===t&&i[o-1]&&i[o-1].getEnd()===t&&s(i[o-1])?1:-1});if(o)return o;if(!(c>=0&&i[c]))return a;a=i[c]}function s(a,s,c){if(c??(c=a.getEnd()),ct)return!1;if(tn.getStart(e)&&t(r.pos<=e.pos&&r.end>e.end||r.pos===e.end)&&bQ(r,n)?t(r):void 0)}(t)}function rQ(e,t,n,r){const i=function i(o){if(iQ(o)&&1!==o.kind)return o;const a=o.getChildren(t),s=Le(a,e,(e,t)=>t,(t,n)=>e=a[t-1].end?0:1:-1);if(s>=0&&a[s]){const n=a[s];if(e=e||!bQ(n,t)||lQ(n)){const e=aQ(a,s,t,o.kind);return e?!r&&Lu(e)&&e.getChildren(t).length?i(e):oQ(e,t):void 0}return i(n)}}Tn.assert(void 0!==n||307===o.kind||1===o.kind||Lu(o));const c=aQ(a,a.length,t,o.kind);return c&&oQ(c,t)}(n||t);return Tn.assert(!(i&&lQ(i))),i}function iQ(e){return ql(e)&&!lQ(e)}function oQ(e,t){if(iQ(e))return e;const n=e.getChildren(t);if(0===n.length)return e;const r=aQ(n,n.length,t,e.kind);return r&&oQ(r,t)}function aQ(e,t,n,r){for(let i=t-1;i>=0;i--){if(lQ(e[i]))0!==i||12!==r&&285!==r||Tn.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(bQ(e[i],n))return e[i]}}function sQ(e,t,n=rQ(t,e)){if(n&&e_(n)){const r=n.getStart(e),i=n.getEnd();if(rn.getStart(e)}function uQ(e,t){const n=YX(e,t);return!!jN(n)||(!(19!==n.kind||!zE(n.parent)||!FE(n.parent.parent))||!(30!==n.kind||!Iu(n.parent)||!FE(n.parent.parent)))}function dQ(e,t){return function(n){for(;n;)if(n.kind>=285&&n.kind<=294||12===n.kind||30===n.kind||32===n.kind||80===n.kind||20===n.kind||19===n.kind||44===n.kind)n=n.parent;else{if(284!==n.kind)return!1;if(t>n.getStart(e))return!0;n=n.parent}return!1}(YX(e,t))}function pQ(e,t,n){const r=Va(e.kind),i=Va(t),o=e.getFullStart(),a=n.text.lastIndexOf(i,o);if(-1===a)return;if(n.text.lastIndexOf(r,o-1)!!e.typeParameters&&e.typeParameters.length>=t)}function hQ(e,t){if(-1===t.text.lastIndexOf("<",e?e.pos:t.text.length))return;let n=e,r=0,i=0;for(;n;){switch(n.kind){case 30:if(n=rQ(n.getFullStart(),t),n&&29===n.kind&&(n=rQ(n.getFullStart(),t)),!n||!QN(n))return;if(!r)return yh(n)?void 0:{called:n,nTypeArguments:i};r--;break;case 50:r=3;break;case 49:r=2;break;case 32:r++;break;case 20:if(n=pQ(n,19,t),!n)return;break;case 22:if(n=pQ(n,21,t),!n)return;break;case 24:if(n=pQ(n,23,t),!n)return;break;case 28:i++;break;case 39:case 80:case 11:case 9:case 10:case 112:case 97:case 114:case 96:case 143:case 25:case 52:case 58:case 59:break;default:if(A_(n))break;return}n=rQ(n.getFullStart(),t)}}function yQ(e,t,n){return Ede.getRangeOfEnclosingComment(e,t,void 0,n)}function vQ(e,t){return!!xc(YX(e,t),pF)}function bQ(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function xQ(e,t=0){const n=[],r=ku(e)?mc(e)&~t:0;return 2&r&&n.push("private"),4&r&&n.push("protected"),1&r&&n.push("public"),(256&r||xD(e))&&n.push("static"),64&r&&n.push("abstract"),32&r&&n.push("export"),65536&r&&n.push("deprecated"),33554432&e.flags&&n.push("declare"),277===e.kind&&n.push("export"),n.length>0?n.join(","):""}function SQ(e){return 183===e.kind||213===e.kind?e.typeArguments:f_(e)||263===e.kind||264===e.kind?e.typeParameters:void 0}function kQ(e){return 2===e||3===e}function TQ(e){return!(11!==e&&14!==e&&!Hl(e))}function CQ(e,t,n){return!!(4&t.flags)&&e.isEmptyAnonymousObjectType(n)}function wQ(e){if(!e.isIntersection())return!1;const{types:t,checker:n}=e;return 2===t.length&&(CQ(n,t[0],t[1])||CQ(n,t[1],t[0]))}function NQ(e,t,n){return Hl(e.kind)&&e.getStart(n){const n=KB(t);return!e[n]&&(e[n]=!0)}}function HQ(e){return e.getText(0,e.getLength())}function KQ(e,t){let n="";for(let r=0;r!(t.isDeclarationFile||e.isSourceFileFromExternalLibrary(t)||!t.externalModuleIndicator&&!t.commonJsModuleIndicator))}function YQ(e){return e.getSourceFiles().some(t=>!t.isDeclarationFile&&!e.isSourceFileFromExternalLibrary(t)&&!!t.externalModuleIndicator)}function ZQ(e){return!!e.module||OS(e)>=2||!!e.noEmit}function eY(e,t){return{fileExists:t=>e.fileExists(t),getCurrentDirectory:()=>t.getCurrentDirectory(),readFile:nt(t,t.readFile),useCaseSensitiveFileNames:nt(t,t.useCaseSensitiveFileNames),getSymlinkCache:nt(t,t.getSymlinkCache)||e.getSymlinkCache,getModuleSpecifierCache:nt(t,t.getModuleSpecifierCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getModuleResolutionCache())?void 0:t.getPackageJsonInfoCache()},getGlobalTypingsCacheLocation:nt(t,t.getGlobalTypingsCacheLocation),redirectTargetsMap:e.redirectTargetsMap,getProjectReferenceRedirect:t=>e.getProjectReferenceRedirect(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),getNearestAncestorDirectoryWithPackageJson:nt(t,t.getNearestAncestorDirectoryWithPackageJson),getFileIncludeReasons:()=>e.getFileIncludeReasons(),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function tY(e,t){return{...eY(e,t),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function nY(e){return 2===e||e>=3&&e<=99||100===e}function rY(e,t,n,r,i){return aw.createImportDeclaration(void 0,e||t?aw.createImportClause(!!i,e,t&&t.length?aw.createNamedImports(t):void 0):void 0,"string"==typeof n?iY(n,r):n,void 0)}function iY(e,t){return aw.createStringLiteral(e,0===t)}var oY=(e=>(e[e.Single=0]="Single",e[e.Double=1]="Double",e))(oY||{});function aY(e,t){return Zm(e,t)?1:0}function sY(e,t){if(t.quotePreference&&"auto"!==t.quotePreference)return"single"===t.quotePreference?0:1;{const t=Rm(e)&&e.imports&&C(e.imports,e=>ON(e)&&!my(e.parent));return t?aY(t,e):1}}function cY(e){switch(e){case 0:return"'";case 1:return'"';default:return Tn.assertNever(e)}}function lY(e){const t=_Y(e);return void 0===t?void 0:Cc(t)}function _Y(e){return"default"!==e.escapedName?e.escapedName:v(e.declarations,e=>{const t=jc(e);return t&&80===t.kind?t.escapedText:void 0})}function uY(e){return Ku(e)&&(EE(e.parent)||dE(e.parent)||JF(e.parent)||$m(e.parent,!1)&&e.parent.arguments[0]===e||gf(e.parent)&&e.parent.arguments[0]===e)}function dY(e){return eP(e)&&YD(e.parent)&&QN(e.name)&&!e.propertyName}function pY(e,t){const n=e.getTypeAtLocation(t.parent);return n&&e.getPropertyOfType(n,t.name.text)}function fY(e,t,n){if(e)for(;e.parent;){if(QE(e.parent)||!mY(n,e.parent,t))return e;e=e.parent}}function mY(e,t,n){return Ws(e,t.getStart(n))&&t.getEnd()<=Us(e)}function gY(e,t){return bI(e)?C(e.modifiers,e=>e.kind===t):void 0}function hY(e,t,n,r,i){var o;const a=243===(ct(n)?n[0]:n).kind?Qm:Pp,s=O(t.statements,a),{comparer:c,isSorted:l}=m_e.getOrganizeImportsStringComparerWithDetection(s,i),_=ct(n)?Se(n,(e,t)=>m_e.compareImportsOrRequireStatements(e,t,c)):[n];if(null==s?void 0:s.length)if(Tn.assert(Rm(t)),s&&l)for(const n of _){const r=m_e.getImportDeclarationInsertionIndex(s,n,c);if(0===r){const r=s[0]===t.statements[0]?{leadingTriviaOption:tde.LeadingTriviaOption.Exclude}:{};e.insertNodeBefore(t,s[0],n,!1,r)}else{const i=s[r-1];e.insertNodeAfter(t,i,n)}}else{const n=Pe(s);n?e.insertNodesAfter(t,n,_):e.insertNodesAtTopOfFile(t,_,r)}else if(Rm(t))e.insertNodesAtTopOfFile(t,_,r);else for(const n of _)e.insertStatementsInNewFile(t.fileName,[n],null==(o=bc(n))?void 0:o.getSourceFile())}function yY(e,t){return Tn.assert(e.isTypeOnly),pt(e.getChildAt(0,t),VQ)}function vY(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}function bY(e,t,n){return(n?Ft:Et)(e.fileName,t.fileName)&&vY(e.textSpan,t.textSpan)}function xY(e){return(t,n)=>bY(t,n,e)}function SY(e,t){if(e)for(let n=0;n!!mD(e)||!(eP(e)||YD(e)||ZD(e))&&"quit")}var DY=function(){const e=10*nd;let t,n,r,i;c();const o=e=>s(e,17);return{displayParts:()=>{const n=t.length&&t[t.length-1].text;return i>e&&n&&"..."!==n&&(rs(n.charCodeAt(n.length-1))||t.push(EY(" ",16)),t.push(EY("...",15))),t},writeKeyword:e=>s(e,5),writeOperator:e=>s(e,12),writePunctuation:e=>s(e,15),writeTrailingSemicolon:e=>s(e,15),writeSpace:e=>s(e,16),writeStringLiteral:e=>s(e,8),writeParameter:e=>s(e,13),writeProperty:e=>s(e,14),writeLiteral:e=>s(e,8),writeSymbol:function(n,r){if(i>e)return;a(),i+=n.length,t.push(PY(n,r))},writeLine:function(){if(i>e)return;i+=1,t.push(HY()),n=!0},write:o,writeComment:o,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:St,getIndent:()=>r,increaseIndent:()=>{r++},decreaseIndent:()=>{r--},clear:c};function a(){if(!(i>e)&&n){const e=Ky(r);e&&(i+=e.length,t.push(EY(e,16))),n=!1}}function s(n,r){i>e||(a(),i+=n.length,t.push(EY(n,r)))}function c(){t=[],n=!0,r=0,i=0}}();function PY(e,t){return EY(e,function(e){const t=e.flags;if(3&t)return NY(e)?13:9;return 4&t||32768&t||65536&t?14:8&t?19:16&t?20:32&t?1:64&t?4:384&t?2:1536&t?11:8192&t?10:262144&t?18:524288&t||2097152&t?0:17}(t))}function EY(e,t){return{text:e,kind:IG[t]}}function FY(){return EY(" ",16)}function AY(e){return EY(Va(e),5)}function IY(e){return EY(Va(e),15)}function OY(e){return EY(Va(e),12)}function jY(e){return EY(e,13)}function LY(e){return EY(e,14)}function MY(e){const t=Wa(e);return void 0===t?RY(e):AY(t)}function RY(e){return EY(e,17)}function BY(e){return EY(e,0)}function JY(e){return EY(e,18)}function zY(e){return EY(e,24)}function qY(e,t){return{text:e,kind:IG[23],target:{fileName:Dd(t).fileName,textSpan:jQ(t)}}}function UY(e){return EY(e,22)}function VY(e,t){var n;const r=[UY(`{@${nF(e)?"link":rF(e)?"linkcode":"linkplain"} `)];if(e.name){const i=null==t?void 0:t.getSymbolAtLocation(e.name),o=i&&t?tZ(i,t):void 0,a=function(e){let t=e.indexOf("://");if(0===t){for(;t"===e[n]&&t--,n++,!t)return n}return 0}(e.text),s=tp(e.name)+e.text.slice(0,a),c=function(e){let t=0;if(124===e.charCodeAt(t++)){for(;t{e.writeType(t,n,17408|r,i)})}function XY(e,t,n,r,i=0){return KY(o=>{e.writeSymbol(t,n,r,8|i,o)})}function QY(e,t,n,r=0){return r|=25632,KY(i=>{e.writeSignature(t,n,r,void 0,i)})}function YY(e,t){const n=t.getSourceFile();return KY(t=>{bU().writeNode(4,e,n,t)})}function ZY(e){return!!e.parent&&Xl(e.parent)&&e.parent.propertyName===e}function eZ(e,t){return Lk(e,t.getScriptKind&&t.getScriptKind(e))}function tZ(e,t){let n=e;for(;nZ(n)||sd(n)&&n.links.target;)n=sd(n)&&n.links.target?n.links.target:kx(n,t);return n}function nZ(e){return!!(2097152&e.flags)}function rZ(e,t){return GB(kx(e,t))}function iZ(e,t){for(;rs(e.charCodeAt(t));)t+=1;return t}function oZ(e,t){for(;t>-1&&is(e.charCodeAt(t));)t-=1;return t+1}function aZ(e,t=!0){const n=e&&cZ(e);return n&&!t&&uZ(n),VT(n,!1)}function sZ(e,t,n){let r=n(e);return r?cw(r,e):r=cZ(e,n),r&&!t&&uZ(r),r}function cZ(e,t){const n=t?e=>sZ(e,!0,t):aZ,r=fJ(e,n,void 0,t?e=>e&&_Z(e,!0,t):e=>e&&lZ(e),n);if(r===e){return vI(ON(e)?cw(aw.createStringLiteralFromNode(e),e):AN(e)?cw(aw.createNumericLiteral(e.text,e.numericLiteralFlags),e):aw.cloneNode(e),e)}return r.parent=void 0,r}function lZ(e,t=!0){if(e){const n=aw.createNodeArray(e.map(e=>aZ(e,t)),e.hasTrailingComma);return vI(n,e),n}return e}function _Z(e,t,n){return aw.createNodeArray(e.map(e=>sZ(e,t,n)),e.hasTrailingComma)}function uZ(e){dZ(e),pZ(e)}function dZ(e){mZ(e,1024,gZ)}function pZ(e){mZ(e,2048,Rx)}function fZ(e,t){const n=e.getSourceFile();!function(e,t){const n=e.getFullStart(),r=e.getStart();for(let e=n;ee)}function hZ(e,t){let n=e;for(let r=1;!jd(t,n);r++)n=`${e}_${r}`;return n}function yZ(e,t,n,r){let i=0,o=-1;for(const{fileName:a,textChanges:s}of e){Tn.assert(a===t);for(const e of s){const{span:t,newText:a}=e,s=kZ(a,My(n));if(-1!==s&&(o=t.start+i+s,!r))return o;i+=a.length-t.length}}return Tn.assert(r),Tn.assert(o>=0),o}function vZ(e,t,n,r,i){bs(n.text,e.pos,SZ(t,n,r,i,ww))}function bZ(e,t,n,r,i){xs(n.text,e.end,SZ(t,n,r,i,Pw))}function xZ(e,t,n,r,i){xs(n.text,e.pos,SZ(t,n,r,i,ww))}function SZ(e,t,n,r,i){return(o,a,s,c)=>{3===s?(o+=2,a-=2):o+=2,i(e,n||s,t.text.slice(o,a),void 0!==r?r:c)}}function kZ(e,t){if(ln(e,t))return 0;let n=e.indexOf(" "+t);return-1===n&&(n=e.indexOf("."+t)),-1===n&&(n=e.indexOf('"'+t)),-1===n?-1:n+1}function TZ(e){return yP(e)&&28===e.operatorToken.kind||nP(e)||(wP(e)||NP(e))&&nP(e.expression)}function CZ(e,t,n){const r=dh(e.parent);switch(r.kind){case 214:return t.getContextualType(r,n);case 226:{const{left:i,operatorToken:o,right:a}=r;return NZ(o.kind)?t.getTypeAtLocation(e===a?i:a):t.getContextualType(e,n)}case 296:return EZ(r,t);default:return t.getContextualType(e,n)}}function wZ(e,t,n){const r=sY(e,t),i=JSON.stringify(n);return 0===r?`'${Wy(i).replace(/'/g,()=>"\\'").replace(/\\"/g,'"')}'`:i}function NZ(e){switch(e){case 37:case 35:case 38:case 36:return!0;default:return!1}}function DZ(e){switch(e.kind){case 11:case 15:case 228:case 215:return!0;default:return!1}}function PZ(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()}function EZ(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}var FZ="anonymous function";function AZ(e,t,n,r){const i=n.getTypeChecker();let o=!0;const a=()=>o=!1,s=i.typeToTypeNode(e,t,1,{trackSymbol:(e,t,n)=>(o=o&&0===i.isSymbolAccessible(e,t,n,!1).accessibility,!o),reportInaccessibleThisError:a,reportPrivateInBaseOfClassExpression:a,reportInaccessibleUniqueSymbolError:a,moduleResolverHost:tY(n,r)});return o?s:void 0}function IZ(e){return 179===e||180===e||181===e||171===e||173===e}function OZ(e){return 262===e||176===e||174===e||177===e||178===e}function jZ(e){return 267===e}function LZ(e){return 243===e||244===e||246===e||251===e||252===e||253===e||257===e||259===e||172===e||265===e||272===e||271===e||278===e||270===e||277===e}var MZ=fn(IZ,OZ,jZ,LZ);function RZ(e,t,n){const r=xc(t,t=>t.end!==e?"quit":MZ(t.kind));return!!r&&function(e,t){const n=e.getLastToken(t);if(n&&27===n.kind)return!1;if(IZ(e.kind)){if(n&&28===n.kind)return!1}else if(jZ(e.kind)){const n=Ee(e.getChildren(t));if(n&&cE(n))return!1}else if(OZ(e.kind)){const n=Ee(e.getChildren(t));if(n&&Hf(n))return!1}else if(!LZ(e.kind))return!1;if(246===e.kind)return!0;const r=nQ(e,xc(e,e=>!e.parent),t);return!r||20===r.kind||t.getLineAndCharacterOfPosition(e.getEnd()).line!==t.getLineAndCharacterOfPosition(r.getStart(t)).line}(r,n)}function BZ(e){let t=0,n=0;return KI(e,function r(i){if(LZ(i.kind)){const r=i.getLastToken(e);27===(null==r?void 0:r.kind)?t++:n++}else if(IZ(i.kind)){const r=i.getLastToken(e);if(27===(null==r?void 0:r.kind))t++;else if(r&&28!==r.kind){ns(e,r.getStart(e)).line!==ns(e,tf(e,r.end).start).line&&n++}}return t+n>=5||KI(i,r)}),0===t&&n<=1||t/n>.2}function JZ(e,t){return WZ(e,e.getDirectories,t)||[]}function zZ(e,t,n,r,i){return WZ(e,e.readDirectory,t,n,r,i)||p}function qZ(e,t){return WZ(e,e.fileExists,t)}function UZ(e,t){return VZ(()=>Hb(t,e))||!1}function VZ(e){try{return e()}catch{return}}function WZ(e,t,...n){return VZ(()=>t&&t.apply(e,n))}function $Z(e,t,n){const r=[];return Sa(e,e=>{if(e===n)return!0;const i=Yo(e,"package.json");qZ(t,i)&&r.push(i)}),r}function HZ(e,t){let n;return Sa(e,e=>"node_modules"===e||(n=BU(e,e=>qZ(t,e),"package.json"),!!n||void 0)),n}function KZ(e,t){if(!t.fileExists)return[];const n=[];return Sa(Vo(e),e=>{const r=Yo(e,"package.json");if(t.fileExists(r)){const e=GZ(r,t);e&&n.push(e)}}),n}function GZ(e,t){if(!t.readFile)return;const n=["dependencies","devDependencies","optionalDependencies","peerDependencies"],r=$b(t.readFile(e)||""),i={};if(r)for(const e of n){const t=r[e];if(!t)continue;const n=new Map;for(const e in t)n.set(e,t[e]);i[e]=n}const o=[[1,i.dependencies],[2,i.devDependencies],[8,i.optionalDependencies],[4,i.peerDependencies]];return{...i,parseable:!!r,fileName:e,get:a,has:(e,t)=>!!a(e,t)};function a(e,t=15){for(const[n,r]of o)if(r&&t&n){const t=r.get(e);if(void 0!==t)return t}}}function XZ(e,t,n){const r=(n.getPackageJsonsVisibleToFile&&n.getPackageJsonsVisibleToFile(e.fileName)||KZ(e.fileName,n)).filter(e=>e.parseable);let i,o,a;return{allowsImportingAmbientModule:function(e,t){if(!r.length||!e.valueDeclaration)return!0;if(o){const t=o.get(e);if(void 0!==t)return t}else o=new Map;const n=Wy(e.getName());if(c(n))return o.set(e,!0),!0;const i=l(e.valueDeclaration.getSourceFile().fileName,t);if(void 0===i)return o.set(e,!0),!0;const a=s(i)||s(n);return o.set(e,a),a},allowsImportingSourceFile:function(e,t){if(!r.length)return!0;if(a){const t=a.get(e);if(void 0!==t)return t}else a=new Map;const n=l(e.fileName,t);if(!n)return a.set(e,!0),!0;const i=s(n);return a.set(e,i),i},allowsImportingSpecifier:function(e){if(!r.length||c(e))return!0;if(jo(e)||Ao(e))return!0;return s(e)}};function s(e){const t=_(e);for(const e of r)if(e.has(t)||e.has(PR(t)))return!0;return!1}function c(t){return!!(Rm(e)&&Bm(e)&&zK.nodeCoreModules.has(t)&&(void 0===i&&(i=QZ(e)),i))}function l(r,i){if(!r.includes("node_modules"))return;const o=tB.getNodeModulesPackageName(n.getCompilationSettings(),e,r,i,t);return o?jo(o)||Ao(o)?void 0:_(o):void 0}function _(e){const t=Ko(FR(e)).slice(1);return ln(t[0],"@")?`${t[0]}/${t[1]}`:t[0]}}function QZ(e){return ee(e.imports,({text:e})=>zK.nodeCoreModules.has(e))}function YZ(e){return E(Ko(e),"node_modules")}function ZZ(e){return void 0!==e.file&&void 0!==e.start&&void 0!==e.length}function e0(e,t){const n=Le(t,jQ(e),yt,Ot);if(n>=0){const r=t[n];return Tn.assertEqual(r.file,e.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),pt(r,ZZ)}}function t0(e,t){var n;let r=Le(t,e.start,e=>e.start,It);for(r<0&&(r=~r);(null==(n=t[r-1])?void 0:n.start)===e.start;)r--;const i=[],o=Us(e);for(;;){const n=dt(t[r],ZZ);if(!n||n.start>o)break;Hs(e,n)&&i.push(n),r++}return i}function n0({startPosition:e,endPosition:t}){return nc(e,void 0===t?e:t)}function r0(e,t){return xc(YX(e,t.start),n=>n.getStart(e)Us(t)?"quit":nu(n)&&vY(t,jQ(n,e)))}function i0(e,t,n=yt){return e?ct(e)?n(M(e,t)):t(e,0):void 0}function o0(e){return ct(e)?Ne(e):e}function a0(e,t){if(c0(e)){const n=l0(e);if(n)return n;const r=u0(_0(e),t,!1),i=u0(_0(e),t,!0);return r===i?r:[r,i]}return e.name}function s0(e,t,n){return c0(e)?l0(e)||u0(_0(e),t,!!n):e.name}function c0(e){return!(33554432&e.flags||"export="!==e.escapedName&&"default"!==e.escapedName)}function l0(e){return v(e.declarations,e=>{var t,n,r;return kE(e)?null==(t=dt(hA(e.expression),QN))?void 0:t.text:wE(e)&&2097152===e.symbol.flags?null==(n=dt(e.propertyName,QN))?void 0:n.text:null==(r=dt(jc(e),QN))?void 0:r.text})}function _0(e){var t;return Tn.checkDefined(e.parent,`Symbol parent was undefined. Flags: ${Tn.formatSymbolFlags(e.flags)}. Declarations: ${null==(t=e.declarations)?void 0:t.map(e=>{const t=Tn.formatSyntaxKind(e.kind),n=zm(e),{expression:r}=e;return(n?"[JS]":"")+t+(r?` (expression: ${Tn.formatSyntaxKind(r.kind)})`:"")}).join(", ")}.`)}function u0(e,t,n){return d0(aT(Wy(e.name)),t,n)}function d0(e,t,n){const r=Wo(Qt(e,"/index"));let i="",o=!0;const a=r.charCodeAt(0);Ds(a,t)?(i+=String.fromCharCode(a),n&&(i=i.toUpperCase())):o=!1;for(let e=1;ee.length)return!1;for(let i=0;isE(e)&&vp(e)))}function h0(e){return!!(65536&mc(e))}function y0(e,t){return v(e.imports,e=>{if(zK.nodeCoreModules.has(e.text))return ln(e.text,"node:")})??t.usesUriStyleNodeCoreModules}function v0(e){return"\n"===e?1:0}function b0(e){return ct(e)?aS(lS(e[0]),e.slice(1)):lS(e)}function x0({options:e},t){const n=!e.semicolons||"ignore"===e.semicolons,r="remove"===e.semicolons||n&&!BZ(t);return{...e,semicolons:r?"remove":"ignore"}}function S0(e){return 2===e||3===e}function k0(e,t){return e.isSourceFileFromExternalLibrary(t)||e.isSourceFileDefaultLibrary(t)}function T0(e,t){const n=new Set,r=new Set,i=new Set;for(const a of t)if(!VE(a)){const t=mh(a.expression);if(Wl(t))switch(t.kind){case 15:case 11:n.add(t.text);break;case 9:r.add(parseInt(t.text));break;case 10:const e=FT(Xt(t.text,"n")?t.text.slice(0,-1):t.text);e&&i.add(ET(e))}else{const t=e.getSymbolAtLocation(a.expression);if(t&&t.valueDeclaration&&XE(t.valueDeclaration)){const n=e.getConstantValue(t.valueDeclaration);void 0!==n&&o(n)}}}return{addValue:o,hasValue:function(e){switch(typeof e){case"string":return n.has(e);case"number":return r.has(e);case"object":return i.has(ET(e))}}};function o(e){switch(typeof e){case"string":n.add(e);break;case"number":r.add(e)}}}function C0(e,t,n,r){var i;if(!Qk("string"==typeof e?e:e.fileName))return!1;const o=t.getCompilerOptions(),a=jS(o),s="string"==typeof e?jV(ia(e,n.getCurrentDirectory(),Zy(n)),null==(i=t.getPackageJsonInfoCache)?void 0:i.call(t),n,o):e.impliedNodeFormat;if(99===s)return!1;if(1===s)return!0;if(o.verbatimModuleSyntax&&1===a)return!0;if(o.verbatimModuleSyntax&&XS(a))return!1;if("object"==typeof e){if(e.commonJsModuleIndicator)return!0;if(e.externalModuleIndicator)return!1}return r}function w0(e){switch(e.kind){case 241:case 307:case 268:case 296:return!0;default:return!1}}function N0(e,t,n,r){var i;const o=LV(e,null==(i=n.getPackageJsonInfoCache)?void 0:i.call(n),r,n.getCompilerOptions());let a,s;return"object"==typeof o&&(a=o.impliedNodeFormat,s=o.packageJsonScope),{path:ia(e,n.getCurrentDirectory(),n.getCanonicalFileName),fileName:e,externalModuleIndicator:99===t||void 0,commonJsModuleIndicator:1===t||void 0,impliedNodeFormat:a,packageJsonScope:s,statements:p,imports:p}}var D0=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.Namespace=2]="Namespace",e[e.CommonJS=3]="CommonJS",e))(D0||{}),P0=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e[e.UMD=3]="UMD",e))(P0||{});function E0(e){let t=1;const n=rt(),r=new Map,i=new Map;let o;const a={isUsableByFile:e=>e===o,isEmpty:()=>!n.size,clear:()=>{n.clear(),r.clear(),o=void 0},add:(e,s,c,l,_,u,d,p)=>{let f;if(e!==o&&(a.clear(),o=e),_){const t=iC(_.fileName);if(t){const{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:r,packageRootIndex:o}=t;if(f=AR(FR(_.fileName.substring(r+1,o))),ln(e,_.path.substring(0,n))){const e=i.get(f),t=_.fileName.substring(0,r+1);if(e){n>e.indexOf(KM)&&i.set(f,t)}else i.set(f,t)}}}const m=1===u&&Rb(s)||s,g=0===u||cd(m)?Cc(c):a0(m,void 0),h="string"==typeof g?g:g[0],y="string"==typeof g?void 0:g[1],v=Wy(l.name),b=t++,x=kx(s,p),S=33554432&s.flags?void 0:s,k=33554432&l.flags?void 0:l;S&&k||r.set(b,[s,l]),n.add(function(e,t,n,r){const i=n||"";return`${e.length} ${GB(kx(t,r))} ${e} ${i}`}(h,s,Js(v)?void 0:v,p),{id:b,symbolTableKey:c,symbolName:h,capitalizedSymbolName:y,moduleName:v,moduleFile:_,moduleFileName:null==_?void 0:_.fileName,packageName:f,exportKind:u,targetFlags:x.flags,isFromPackageJson:d,symbol:S,moduleSymbol:k})},get:(e,t)=>{if(e!==o)return;const r=n.get(t);return null==r?void 0:r.map(s)},search:(t,r,a,c)=>{if(t===o)return md(n,(t,n)=>{const{symbolName:o,ambientModuleName:l}=function(e){const t=e.indexOf(" "),n=e.indexOf(" ",t+1),r=parseInt(e.substring(0,t),10),i=e.substring(n+1),o=i.substring(0,r),a=i.substring(r+1),s=""===a?void 0:a;return{symbolName:o,ambientModuleName:s}}(n),_=r&&t[0].capitalizedSymbolName||o;if(a(_,t[0].targetFlags)){const r=t.map(s).filter((n,r)=>function(t,n){if(!n||!t.moduleFileName)return!0;const r=e.getGlobalTypingsCacheLocation();if(r&&ln(t.moduleFileName,r))return!0;const o=i.get(n);return!o||ln(t.moduleFileName,o)}(n,t[r].packageName));if(r.length){const e=c(r,_,!!l,n);if(void 0!==e)return e}}})},releaseSymbols:()=>{r.clear()},onFileChanged:(e,t,n)=>(!c(e)||!c(t))&&(o&&o!==t.path||n&&QZ(e)!==QZ(t)||!_e(e.moduleAugmentations,t.moduleAugmentations)||!function(e,t){if(!_e(e.ambientModuleNames,t.ambientModuleNames))return!1;let n=-1,r=-1;for(const i of t.ambientModuleNames){const o=e=>mp(e)&&e.name.text===i;if(n=N(e.statements,o,n+1),r=N(t.statements,o,r+1),e.statements[n]!==t.statements[r])return!1}return!0}(e,t)?(a.clear(),!0):(o=t.path,!1))};return Tn.isDebugging&&Object.defineProperty(a,"__cache",{value:n}),a;function s(t){if(t.symbol&&t.moduleSymbol)return t;const{id:n,exportKind:i,targetFlags:o,isFromPackageJson:a,moduleFileName:s}=t,[c,l]=r.get(n)||p;if(c&&l)return{symbol:c,moduleSymbol:l,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a};const _=(a?e.getPackageJsonAutoImportProvider():e.getCurrentProgram()).getTypeChecker(),u=t.moduleSymbol||l||Tn.checkDefined(t.moduleFile?_.getMergedSymbol(t.moduleFile.symbol):_.tryFindAmbientModule(t.moduleName)),d=t.symbol||c||Tn.checkDefined(2===i?_.resolveExternalModuleSymbol(u):_.tryGetMemberInModuleExportsAndProperties(Cc(t.symbolTableKey),u),`Could not find symbol '${t.symbolName}' by key '${t.symbolTableKey}' in module ${u.name}`);return r.set(n,[d,u]),{symbol:d,moduleSymbol:u,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a}}function c(e){return!(e.commonJsModuleIndicator||e.externalModuleIndicator||e.moduleAugmentations||e.ambientModuleNames)}}function F0(e,t,n,r,i,o,a){var s;if(t===n)return!1;const c=null==a?void 0:a.get(t.path,n.path,r,{});if(void 0!==(null==c?void 0:c.isBlockedByPackageJsonDependencies))return!c.isBlockedByPackageJsonDependencies;const l=Zy(o),_=null==(s=o.getGlobalTypingsCacheLocation)?void 0:s.call(o),u=!!tB.forEachFileNameOfModule(t.fileName,n.fileName,o,!1,r=>{const i=e.getSourceFile(r);return(i===n||!i)&&function(e,t,n,r){const i=Sa(t,e=>"node_modules"===Wo(e)?e:void 0),o=i&&Vo(n(i));return void 0===o||ln(n(e),o)||!!r&&ln(n(r),o)}(t.fileName,r,l,_)});if(i){const e=u&&i.allowsImportingSourceFile(n,o);return null==a||a.setBlockedByPackageJsonDependencies(t.path,n.path,r,{},!e),e}return u}function A0(e,t,n,r,i){var o,a;const s=Yy(t),c=n.autoImportFileExcludePatterns&&$(n.autoImportFileExcludePatterns,e=>{const t=Pk(e,"","exclude");return t?Ak(t,s):void 0});I0(e.getTypeChecker(),e.getSourceFiles(),c,t,(t,n)=>i(t,n,e,!1));const l=r&&(null==(o=t.getPackageJsonAutoImportProvider)?void 0:o.call(t));if(l){const n=tr(),r=e.getTypeChecker();I0(l.getTypeChecker(),l.getSourceFiles(),c,t,(t,n)=>{(n&&!e.getSourceFile(n.fileName)||!n&&!r.resolveName(t.name,void 0,1536,!1))&&i(t,n,l,!0)}),null==(a=t.log)||a.call(t,"forEachExternalModuleToImportFrom autoImportProvider: "+(tr()-n))}}function I0(e,t,n,r,i){var o,a;const s=null==(o=r.getSymlinkCache)?void 0:o.call(r).getSymlinkedDirectoriesByRealpath(),c=n&&(({fileName:e,path:t})=>{if(n.some(t=>t.test(e)))return!0;if((null==s?void 0:s.size)&&GM(e)){let r=Vo(e);return Sa(Vo(t),t=>{const i=s.get(aa(t));if(i)return i.some(t=>n.some(n=>n.test(e.replace(r,t))));r=Vo(r)})??!1}return!1});for(const t of e.getAmbientModules())t.name.includes("*")||n&&(null==(a=t.declarations)?void 0:a.every(e=>c(e.getSourceFile())))||i(t,void 0);for(const n of t)af(n)&&!(null==c?void 0:c(n))&&i(e.getMergedSymbol(n.symbol),n)}function O0(e,t,n,r,i){var o,a,s,c,l;const _=tr();null==(o=t.getPackageJsonAutoImportProvider)||o.call(t);const u=(null==(a=t.getCachedExportInfoMap)?void 0:a.call(t))||E0({getCurrentProgram:()=>n,getPackageJsonAutoImportProvider:()=>{var e;return null==(e=t.getPackageJsonAutoImportProvider)?void 0:e.call(t)},getGlobalTypingsCacheLocation:()=>{var e;return null==(e=t.getGlobalTypingsCacheLocation)?void 0:e.call(t)}});if(u.isUsableByFile(e.path))return null==(s=t.log)||s.call(t,"getExportInfoMap: cache hit"),u;null==(c=t.log)||c.call(t,"getExportInfoMap: cache miss or empty; calculating new results");let d=0;try{A0(n,t,r,!0,(t,n,r,o)=>{++d%100==0&&(null==i||i.throwIfCancellationRequested());const a=new Map,s=r.getTypeChecker(),c=j0(t,s);c&&L0(c.symbol,s)&&u.add(e.path,c.symbol,1===c.exportKind?"default":"export=",t,n,c.exportKind,o,s),s.forEachExportAndPropertyOfModule(t,(r,i)=>{r!==(null==c?void 0:c.symbol)&&L0(r,s)&&Bx(a,i)&&u.add(e.path,r,i,t,n,0,o,s)})})}catch(e){throw u.clear(),e}return null==(l=t.log)||l.call(t,`getExportInfoMap: done in ${tr()-_} ms`),u}function j0(e,t){const n=t.resolveExternalModuleSymbol(e);if(n!==e)return{symbol:n,exportKind:2};const r=t.tryGetMemberInModuleExports("default",e);return r?{symbol:r,exportKind:1}:void 0}function L0(e,t){return!(t.isUndefinedSymbol(e)||t.isUnknownSymbol(e)||iy(e)||oy(e))}function M0(e,t,n,r,i){let o,a=e;for(;a;){const e=l0(a);if(e){const t=i(e);if(t)return t}if("default"!==a.escapedName&&"export="!==a.escapedName){const e=i(a.name);if(e)return e}o=pe(o,a),a=2097152&a.flags?t.getImmediateAliasedSymbol(a):void 0}for(const e of o??p)if(e.parent&&cd(e.parent)){const t=i(u0(e.parent,OS(n),r));if(t)return t}}function R0(){const e=Fs(99,!1);function t(t,n,r){let i=0,o=0;const a=[],{prefix:s,pushTemplate:c}=function(e){switch(e){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return Tn.assertNever(e)}}(n);t=s+t;const l=s.length;c&&a.push(16),e.setText(t);let _=0;const u=[];let d=0;do{i=e.scan(),Vh(i)||(p(),o=i);const n=e.getTokenEnd();if(q0(e.getTokenStart(),n,l,V0(i),u),n>=t.length){const t=z0(e,i,Pe(a));void 0!==t&&(_=t)}}while(1!==i);function p(){switch(i){case 44:case 69:J0[o]||14!==e.reScanSlashToken()||(i=14);break;case 30:80===o&&d++;break;case 32:d>0&&d--;break;case 133:case 154:case 150:case 136:case 155:d>0&&!r&&(i=80);break;case 16:a.push(i);break;case 19:a.length>0&&a.push(i);break;case 20:if(a.length>0){const t=Pe(a);16===t?(i=e.reScanTemplateToken(!1),18===i?a.pop():Tn.assertEqual(i,17,"Should have been a template middle.")):(Tn.assertEqual(t,19,"Should have been an open brace"),a.pop())}break;default:if(!jh(i))break;(25===o||jh(o)&&jh(i)&&!function(e,t){if(!DQ(e))return!0;switch(t){case 139:case 153:case 137:case 126:case 129:return!0;default:return!1}}(o,i))&&(i=80)}}return{endOfLineState:_,spans:u}}return{getClassificationsForLine:function(e,n,r){return function(e,t){const n=[],r=e.spans;let i=0;for(let e=0;e=0){const e=t-i;e>0&&n.push({length:e,classification:4})}n.push({length:o,classification:U0(a)}),i=t+o}const o=t.length-i;o>0&&n.push({length:o,classification:4});return{entries:n,finalLexState:e.endOfLineState}}(t(e,n,r),e)},getEncodedLexicalClassifications:t}}var B0,J0=Ge([80,11,9,10,14,110,46,47,22,24,20,112,97],e=>e,()=>!0);function z0(e,t,n){switch(t){case 11:{if(!e.isUnterminated())return;const t=e.getTokenText(),n=t.length-1;let r=0;for(;92===t.charCodeAt(n-r);)r++;if(!(1&r))return;return 34===t.charCodeAt(0)?3:2}case 3:return e.isUnterminated()?1:void 0;default:if(Hl(t)){if(!e.isUnterminated())return;switch(t){case 18:return 5;case 15:return 4;default:return Tn.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+t)}}return 16===n?6:void 0}}function q0(e,t,n,r,i){if(8===r)return;0===e&&n>0&&(e+=n);const o=t-e;o>0&&i.push(e-n,o,r)}function U0(e){switch(e){case 1:return 3;case 3:return 1;case 4:return 6;case 25:return 7;case 5:return 2;case 6:return 8;case 8:return 4;case 10:return 0;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return 5;default:return}}function V0(e){if(jh(e))return 3;if(function(e){switch(e){case 42:case 44:case 45:case 40:case 41:case 48:case 49:case 50:case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:case 35:case 36:case 37:case 38:case 51:case 53:case 52:case 56:case 57:case 75:case 74:case 79:case 71:case 72:case 73:case 65:case 66:case 67:case 69:case 70:case 64:case 28:case 61:case 76:case 77:case 78:return!0;default:return!1}}(e)||function(e){switch(e){case 40:case 41:case 55:case 54:case 46:case 47:return!0;default:return!1}}(e))return 5;if(e>=19&&e<=79)return 10;switch(e){case 9:return 4;case 10:return 25;case 11:return 6;case 14:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;default:return Hl(e)?6:2}}function W0(e,t,n,r,i){return X0(H0(e,t,n,r,i))}function $0(e,t){switch(t){case 267:case 263:case 264:case 262:case 231:case 218:case 219:e.throwIfCancellationRequested()}}function H0(e,t,n,r,i){const o=[];return n.forEachChild(function a(s){if(s&&Qs(i,s.pos,s.getFullWidth())){if($0(t,s.kind),QN(s)&&!Ld(s)&&r.has(s.escapedText)){const t=e.getSymbolAtLocation(s),r=t&&K0(t,$G(s),e);r&&function(e,t,n){const r=t-e;Tn.assert(r>0,`Classification had non-positive length of ${r}`),o.push(e),o.push(r),o.push(n)}(s.getStart(n),s.getEnd(),r)}s.forEachChild(a)}}),{spans:o,endOfLineState:0}}function K0(e,t,n){const r=e.getFlags();return 2885600&r?32&r?11:384&r?12:524288&r?16:1536&r?4&t||1&t&&function(e){return ee(e.declarations,e=>sE(e)&&1===qR(e))}(e)?14:void 0:2097152&r?K0(n.getAliasedSymbol(e),t,n):2&t?64&r?13:262144&r?15:void 0:void 0:void 0}function G0(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function X0(e){Tn.assert(e.spans.length%3==0);const t=e.spans,n=[];for(let e=0;e])*)(\/>)?)?/im,i=/(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/gim,o=t.text.substr(e,n),a=r.exec(o);if(!a)return!1;if(!a[3]||!(a[3]in Gi))return!1;let s=e;_(s,a[1].length),s+=a[1].length,c(s,a[2].length,10),s+=a[2].length,c(s,a[3].length,21),s+=a[3].length;const l=a[4];let u=s;for(;;){const e=i.exec(l);if(!e)break;const t=s+e.index+e[1].length;t>u&&(_(u,t-u),u=t),c(u,e[2].length,22),u+=e[2].length,e[3].length&&(_(u,e[3].length),u+=e[3].length),c(u,e[4].length,5),u+=e[4].length,e[5].length&&(_(u,e[5].length),u+=e[5].length),c(u,e[6].length,24),u+=e[6].length}s+=a[4].length,s>u&&_(u,s-u);a[5]&&(c(s,a[5].length,10),s+=a[5].length);const d=e+n;s=0),i>0){const t=n||m(e.kind,e);t&&c(r,i,t)}return!0}function m(e,t){if(jh(e))return 3;if((30===e||32===e)&&t&&SQ(t.parent))return 10;if(Lh(e)){if(t){const n=t.parent;if(64===e&&(260===n.kind||172===n.kind||169===n.kind||291===n.kind))return 5;if(226===n.kind||224===n.kind||225===n.kind||227===n.kind)return 5}return 10}if(9===e)return 4;if(10===e)return 25;if(11===e)return t&&291===t.parent.kind?24:6;if(14===e)return 6;if(Hl(e))return 6;if(12===e)return 23;if(80===e){if(t){switch(t.parent.kind){case 263:return t.parent.name===t?11:void 0;case 168:return t.parent.name===t?15:void 0;case 264:return t.parent.name===t?13:void 0;case 266:return t.parent.name===t?12:void 0;case 267:return t.parent.name===t?14:void 0;case 169:return t.parent.name===t?Tv(t)?3:17:void 0}if(Il(t.parent))return 3}return 2}}function g(n){if(n&&Ys(r,i,n.pos,n.getFullWidth())){$0(e,n.kind);for(const e of n.getChildren(t))f(e)||g(e)}}}function Z0(e){return!!e.sourceFile}function e1(e,t,n){return t1(e,t,n)}function t1(e,t="",n,r){const i=new Map,o=on(!!e);function a(e){return"function"==typeof e.getCompilationSettings?e.getCompilationSettings():e}function s(e,t,n,r,i,o,a,s){return _(e,t,n,r,i,o,!0,a,s)}function c(e,t,n,r,i,o,s,c){return _(e,t,a(n),r,i,o,!1,s,c)}function l(e,t){const n=Z0(e)?e:e.get(Tn.checkDefined(t,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return Tn.assert(void 0===t||!n||n.sourceFile.scriptKind===t,`Script kind should match provided ScriptKind:${t} and sourceFile.scriptKind: ${null==n?void 0:n.sourceFile.scriptKind}, !entry: ${!n}`),n}function _(e,t,o,s,c,_,u,d,p){var f,m,g,h;d=Lk(e,d);const y=a(o),v=o===y?void 0:o,b=6===d?100:OS(y),x="object"==typeof p?p:{languageVersion:b,impliedNodeFormat:v&&jV(t,null==(h=null==(g=null==(m=null==(f=v.getCompilerHost)?void 0:f.call(v))?void 0:m.getModuleResolutionCache)?void 0:g.call(m))?void 0:h.getPackageJsonInfoCache(),v,y),setExternalModuleIndicator:AS(y),jsDocParsingMode:n};x.languageVersion=b,Tn.assertEqual(n,x.jsDocParsingMode);const S=i.size,k=r1(s,x.impliedNodeFormat),T=G(i,k,()=>new Map);if(cr){i.size>S&&cr.instant(cr.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:y.configFilePath,key:k});const e=!lO(t)&&md(i,(e,n)=>n!==k&&e.has(t)&&n);e&&cr.instant(cr.Phase.Session,"documentRegistryBucketOverlap",{path:t,key1:e,key2:k})}const C=T.get(t);let w=C&&l(C,d);if(!w&&r){const e=r.getDocument(k,t);e&&e.scriptKind===d&&e.text===HQ(c)&&(Tn.assert(u),w={sourceFile:e,languageServiceRefCount:0},N())}if(w)w.sourceFile.version!==_&&(w.sourceFile=g5(w.sourceFile,c,_,c.getChangeRange(w.sourceFile.scriptSnapshot)),r&&r.setDocument(k,t,w.sourceFile)),u&&w.languageServiceRefCount++;else{const n=m5(e,c,x,_,!1,d);r&&r.setDocument(k,t,n),w={sourceFile:n,languageServiceRefCount:1},N()}return Tn.assert(0!==w.languageServiceRefCount),w.sourceFile;function N(){if(C)if(Z0(C)){const e=new Map;e.set(C.sourceFile.scriptKind,C),e.set(d,w),T.set(t,e)}else C.set(d,w);else T.set(t,w)}}function u(e,t,n,r){const o=Tn.checkDefined(i.get(r1(t,r))),a=o.get(e),s=l(a,n);s.languageServiceRefCount--,Tn.assert(s.languageServiceRefCount>=0),0===s.languageServiceRefCount&&(Z0(a)?o.delete(e):(a.delete(n),1===a.size&&o.set(e,b(a.values(),yt))))}return{acquireDocument:function(e,n,r,i,c,l){return s(e,ia(e,t,o),n,n1(a(n)),r,i,c,l)},acquireDocumentWithKey:s,updateDocument:function(e,n,r,i,s,l){return c(e,ia(e,t,o),n,n1(a(n)),r,i,s,l)},updateDocumentWithKey:c,releaseDocument:function(e,n,r,i){return u(ia(e,t,o),n1(n),r,i)},releaseDocumentWithKey:u,getKeyForCompilationSettings:n1,getDocumentRegistryBucketKeyWithMode:r1,reportStats:function(){const e=We(i.keys()).filter(e=>e&&"_"===e.charAt(0)).map(e=>{const t=i.get(e),n=[];return t.forEach((e,t)=>{Z0(e)?n.push({name:t,scriptKind:e.sourceFile.scriptKind,refCount:e.languageServiceRefCount}):e.forEach((e,r)=>n.push({name:t,scriptKind:r,refCount:e.languageServiceRefCount}))}),n.sort((e,t)=>t.refCount-e.refCount),{bucket:e,sourceFiles:n}});return JSON.stringify(e,void 0,2)},getBuckets:()=>i}}function n1(e){return SM(e,LO)}function r1(e,t){return t?`${e}|${t}`:e}function i1(e,t,n,r,i,o,a){const s=Yy(r),c=on(s),l=o1(t,n,c,a),_=o1(n,t,c,a);return tde.ChangeTracker.with({host:r,formatContext:i,preferences:o},i=>{!function(e,t,n,r,i,o,a){const{configFile:s}=e.getCompilerOptions();if(!s)return;const c=Vo(s.fileName),l=em(s);if(!l)return;function _(e){const t=tP(e.initializer)?e.initializer.elements:[e.initializer];let n=!1;for(const e of t)n=u(e)||n;return n}function u(e){if(!ON(e))return!1;const r=a1(c,e.text),i=n(r);return void 0!==i&&(t.replaceRangeWithText(s,_1(e,s),d(i)),!0)}function d(e){return ya(c,e,!a)}u1(l,(e,n)=>{switch(n){case"files":case"include":case"exclude":{if(_(e)||"include"!==n||!tP(e.initializer))return;const l=$(e.initializer.elements,e=>ON(e)?e.text:void 0);if(0===l.length)return;const u=Fk(c,[],l,a,o);return void(Ak(Tn.checkDefined(u.includeFilePattern),a).test(r)&&!Ak(Tn.checkDefined(u.includeFilePattern),a).test(i)&&t.insertNodeAfter(s,Ee(e.initializer.elements),aw.createStringLiteral(d(i))))}case"compilerOptions":return void u1(e.initializer,(e,t)=>{const n=sj(t);Tn.assert("listOrElement"!==(null==n?void 0:n.type)),n&&(n.isFilePath||"list"===n.type&&n.element.isFilePath)?_(e):"paths"===t&&u1(e.initializer,e=>{if(tP(e.initializer))for(const t of e.initializer.elements)u(t)})})}})}(e,i,l,t,n,r.getCurrentDirectory(),s),function(e,t,n,r,i,o){const a=e.getSourceFiles();for(const s of a){const c=n(s.fileName),l=c??s.fileName,_=Vo(l),u=r(s.fileName),d=u||s.fileName,p=Vo(d),f=void 0!==c||void 0!==u;l1(s,t,e=>{if(!jo(e))return;const t=a1(p,e),r=n(t);return void 0===r?void 0:sa(ya(_,r,o))},t=>{const r=e.getTypeChecker().getSymbolAtLocation(t);if((null==r?void 0:r.declarations)&&r.declarations.some(e=>pp(e)))return;const o=void 0!==u?c1(t,LM(t.text,d,e.getCompilerOptions(),i),n,a):s1(r,t,s,e,i,n);return void 0!==o&&(o.updated||f&&jo(t.text))?tB.updateModuleSpecifier(e.getCompilerOptions(),s,l,o.newFileName,eY(e,i),t.text):void 0})}}(e,i,l,_,r,c)})}function o1(e,t,n,r){const i=n(e);return e=>{const o=r&&r.tryGetSourcePosition({fileName:e,pos:0}),a=function(e){if(n(e)===i)return t;const r=fk(e,i,n);return void 0===r?void 0:t+"/"+r}(o?o.fileName:e);return o?void 0===a?void 0:function(e,t,n,r){const i=ba(e,t,r);return a1(Vo(n),i)}(o.fileName,a,e,n):a}}function a1(e,t){return sa(function(e,t){return na(Yo(e,t))}(e,t))}function s1(e,t,n,r,i,o){if(e){const t=C(e.declarations,QE).fileName,n=o(t);return void 0===n?{newFileName:t,updated:!1}:{newFileName:n,updated:!0}}{const e=r.getModeForUsageLocation(n,t);return c1(t,i.resolveModuleNameLiterals||!i.resolveModuleNames?r.getResolvedModuleFromModuleSpecifier(t,n):i.getResolvedModuleWithFailedLookupLocationsFromCache&&i.getResolvedModuleWithFailedLookupLocationsFromCache(t.text,n.fileName,e),o,r.getSourceFiles())}}function c1(e,t,n,r){if(!t)return;if(t.resolvedModule){const e=a(t.resolvedModule.resolvedFileName);if(e)return e}const i=h(t.failedLookupLocations,function(e){const t=n(e);return t&&C(r,e=>e.fileName===t)?o(e):void 0})||jo(e.text)&&h(t.failedLookupLocations,o);return i||t.resolvedModule&&{newFileName:t.resolvedModule.resolvedFileName,updated:!1};function o(e){return Xt(e,"/package.json")?void 0:a(e)}function a(e){const t=n(e);return t&&{newFileName:t,updated:!0}}}function l1(e,t,n,r){for(const r of e.referencedFiles||p){const i=n(r.fileName);void 0!==i&&i!==e.text.slice(r.pos,r.end)&&t.replaceRangeWithText(e,r,i)}for(const n of e.imports){const i=r(n);void 0!==i&&i!==n.text&&t.replaceRangeWithText(e,_1(n,e),i)}}function _1(e,t){return Qb(e.getStart(t)+1,e.end-1)}function u1(e,t){if(nP(e))for(const n of e.properties)HE(n)&&ON(n.name)&&t(n,n.name.text)}(e=>{function t(e,t){return{fileName:t.fileName,textSpan:jQ(e,t),kind:"none"}}function n(e){return QP(e)?[e]:YP(e)?ne(e.catchClause?n(e.catchClause):e.tryBlock&&n(e.tryBlock),e.finallyBlock&&n(e.finallyBlock)):f_(e)?void 0:i(e,n)}function r(e){return Ll(e)?[e]:f_(e)?void 0:i(e,r)}function i(e,t){const n=[];return e.forEachChild(e=>{const r=t(e);void 0!==r&&n.push(...lt(r))}),n}function o(e,t){const n=a(t);return!!n&&n===e}function a(e){return xc(e,t=>{switch(t.kind){case 255:if(251===e.kind)return!1;case 248:case 249:case 250:case 247:case 246:return!e.label||function(e,t){return!!xc(e.parent,e=>XP(e)?e.label.escapedText===t:"quit")}(t,e.label.escapedText);default:return f_(t)&&"quit"}})}function s(e,t,...n){return!(!t||!E(n,t.kind))&&(e.push(t),!0)}function c(e){const t=[];if(s(t,e.getFirstToken(),99,117,92)&&246===e.kind){const n=e.getChildren();for(let e=n.length-1;e>=0&&!s(t,n[e],117);e--);}return h(r(e.statement),n=>{o(e,n)&&s(t,n.getFirstToken(),83,88)}),t}function l(e){const t=a(e);if(t)switch(t.kind){case 248:case 249:case 250:case 246:case 247:return c(t);case 255:return _(t)}}function _(e){const t=[];return s(t,e.getFirstToken(),109),h(e.caseBlock.clauses,n=>{s(t,n.getFirstToken(),84,90),h(r(n),n=>{o(e,n)&&s(t,n.getFirstToken(),83)})}),t}function u(e,t){const n=[];if(s(n,e.getFirstToken(),113),e.catchClause&&s(n,e.catchClause.getFirstToken(),85),e.finallyBlock){s(n,RX(e,98,t),98)}return n}function d(e,t){const r=function(e){let t=e;for(;t.parent;){const e=t.parent;if(Hf(e)||307===e.kind)return e;if(YP(e)&&e.tryBlock===t&&e.catchClause)return t;t=e}}(e);if(!r)return;const i=[];return h(n(r),e=>{i.push(RX(e,111,t))}),Hf(r)&&jf(r,e=>{i.push(RX(e,107,t))}),i}function p(e,t){const r=rm(e);if(!r)return;const i=[];return jf(pt(r.body,jP),e=>{i.push(RX(e,107,t))}),h(n(r.body),e=>{i.push(RX(e,111,t))}),i}function f(e){const t=rm(e);if(!t)return;const n=[];return t.modifiers&&t.modifiers.forEach(e=>{s(n,e,134)}),KI(t,e=>{m(e,e=>{mP(e)&&s(n,e.getFirstToken(),135)})}),n}function m(e,t){t(e),f_(e)||S_(e)||iE(e)||sE(e)||oE(e)||A_(e)||KI(e,e=>m(e,t))}e.getDocumentHighlights=function(e,n,r,i,o){const a=XX(r,i);if(a.parent&&(IE(a.parent)&&a.parent.tagName===a||OE(a.parent))){const{openingElement:e,closingElement:n}=a.parent.parent,i=[e,n].map(({tagName:e})=>t(e,r));return[{fileName:r.fileName,highlightSpans:i}]}return function(e,t,n,r,i){const o=new Set(i.map(e=>e.fileName)),a=Ice.getReferenceEntriesForNode(e,t,n,i,r,void 0,o);if(!a)return;const s=Xe(a.map(Ice.toHighlightSpan),e=>e.fileName,e=>e.span),c=on(n.useCaseSensitiveFileNames());return We(H(s.entries(),([e,t])=>{if(!o.has(e)){if(!n.redirectTargetsMap.has(ia(e,n.getCurrentDirectory(),c)))return;const t=n.getSourceFile(e);e=C(i,e=>!!e.redirectInfo&&e.redirectInfo.redirectTarget===t).fileName,Tn.assert(o.has(e))}return{fileName:e,highlightSpans:t}}))}(i,a,e,n,o)||function(e,n){const r=function(e,n){switch(e.kind){case 101:case 93:return BP(e.parent)?function(e,n){const r=function(e,t){const n=[];for(;BP(e.parent)&&e.parent.elseStatement===e;)e=e.parent;for(;;){const r=e.getChildren(t);s(n,r[0],101);for(let e=r.length-1;e>=0&&!s(n,r[e],93);e--);if(!e.elseStatement||!BP(e.elseStatement))break;e=e.elseStatement}return n}(e,n),i=[];for(let e=0;e=t.end;e--)if(!is(n.text.charCodeAt(e))){a=!1;break}if(a){i.push({fileName:n.fileName,textSpan:nc(t.getStart(),o.end),kind:"reference"}),e++;continue}}i.push(t(r[e],n))}return i}(e.parent,n):void 0;case 107:return o(e.parent,HP,p);case 111:return o(e.parent,QP,d);case 113:case 85:case 98:return o(85===e.kind?e.parent.parent:e.parent,YP,u);case 109:return o(e.parent,GP,_);case 84:case 90:return VE(e.parent)||UE(e.parent)?o(e.parent.parent.parent,GP,_):void 0;case 83:case 88:return o(e.parent,Ll,l);case 99:case 117:case 92:return o(e.parent,e=>ou(e,!0),c);case 137:return i(SD,[137]);case 139:case 153:return i(k_,[139,153]);case 135:return o(e.parent,mP,f);case 134:return a(f(e));case 127:return a(function(e){const t=rm(e);if(!t)return;const n=[];return KI(t,e=>{m(e,e=>{xP(e)&&s(n,e.getFirstToken(),127)})}),n}(e));case 103:case 147:return;default:return s_(e.kind)&&(ku(e.parent)||LP(e.parent))?a((r=e.kind,$(function(e,t){const n=e.parent;switch(n.kind){case 268:case 307:case 241:case 296:case 297:return 64&t&&rE(e)?[...e.members,e]:n.statements;case 176:case 174:case 262:return[...n.parameters,...S_(n.parent)?n.parent.members:[]];case 263:case 231:case 264:case 187:const r=n.members;if(15&t){const e=C(n.members,SD);if(e)return[...r,...e.parameters]}else if(64&t)return[...r,n];return r;case 210:return;default:Tn.assertNever(n,"Invalid container kind.")}}(e.parent,ub(r)),e=>gY(e,r)))):void 0}var r;function i(t,r){return o(e.parent,t,e=>{var i;return $(null==(i=dt(e,vu))?void 0:i.symbol.declarations,e=>t(e)?C(e.getChildren(n),e=>E(r,e.kind)):void 0)})}function o(e,t,r){return t(e)?a(r(e,n)):void 0}function a(e){return e&&e.map(e=>t(e,n))}}(e,n);return r&&[{fileName:n.fileName,highlightSpans:r}]}(a,r)}})(B0||(B0={}));var d1=(e=>(e[e.exact=0]="exact",e[e.prefix=1]="prefix",e[e.substring=2]="substring",e[e.camelCase=3]="camelCase",e))(d1||{});function p1(e,t){return{kind:e,isCaseSensitive:t}}function f1(e){const t=new Map,n=e.trim().split(".").map(e=>{return{totalTextChunk:D1(t=e.trim()),subWordTextChunks:N1(t)};var t});return 1===n.length&&""===n[0].totalTextChunk.text?{getMatchForLastSegmentOfPattern:()=>p1(2,!0),getFullMatch:()=>p1(2,!0),patternContainsDots:!1}:n.some(e=>!e.subWordTextChunks.length)?void 0:{getFullMatch:(e,r)=>function(e,t,n,r){const i=h1(t,Ee(n),r);if(!i)return;if(n.length-1>e.length)return;let o;for(let t=n.length-2,i=e.length-1;t>=0;t-=1,i-=1)o=y1(o,h1(e[i],n[t],r));return o}(e,r,n,t),getMatchForLastSegmentOfPattern:e=>h1(e,Ee(n),t),patternContainsDots:n.length>1}}function m1(e,t){let n=t.get(e);return n||t.set(e,n=E1(e)),n}function g1(e,t,n){const r=function(e,t){const n=e.length-t.length;for(let r=0;r<=n;r++)if(M1(t,(t,n)=>T1(e.charCodeAt(n+r))===t))return r;return-1}(e,t.textLowerCase);if(0===r)return p1(t.text.length===e.length?0:1,ln(e,t.text));if(t.isLowerCase){if(-1===r)return;const i=m1(e,n);for(const n of i)if(b1(e,n,t.text,!0))return p1(2,b1(e,n,t.text,!1));if(t.text.length0)return p1(2,!0);if(t.characterSpans.length>0){const r=m1(e,n),i=!!x1(e,r,t,!1)||!x1(e,r,t,!0)&&void 0;if(void 0!==i)return p1(3,i)}}}function h1(e,t,n){if(M1(t.totalTextChunk.text,e=>32!==e&&42!==e)){const r=g1(e,t.totalTextChunk,n);if(r)return r}const r=t.subWordTextChunks;let i;for(const t of r)i=y1(i,g1(e,t,n));return i}function y1(e,t){return jt([e,t],v1)}function v1(e,t){return void 0===e?1:void 0===t?-1:It(e.kind,t.kind)||Ht(!e.isCaseSensitive,!t.isCaseSensitive)}function b1(e,t,n,r,i={start:0,length:n.length}){return i.length<=t.length&&L1(0,i.length,o=>function(e,t,n){return n?T1(e)===T1(t):e===t}(n.charCodeAt(i.start+o),e.charCodeAt(t.start+o),r))}function x1(e,t,n,r){const i=n.characterSpans;let o,a,s=0,c=0;for(;;){if(c===i.length)return!0;if(s===t.length)return!1;let l=t[s],_=!1;for(;c=65&&e<=90)return!0;if(e<127||!za(e,99))return!1;const t=String.fromCharCode(e);return t===t.toUpperCase()}function k1(e){if(e>=97&&e<=122)return!0;if(e<127||!za(e,99))return!1;const t=String.fromCharCode(e);return t===t.toLowerCase()}function T1(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function C1(e){return e>=48&&e<=57}function w1(e){return S1(e)||k1(e)||C1(e)||95===e||36===e}function N1(e){const t=[];let n=0,r=0;for(let i=0;i0&&(t.push(D1(e.substr(n,r))),r=0)}return r>0&&t.push(D1(e.substr(n,r))),t}function D1(e){const t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:P1(e)}}function P1(e){return F1(e,!1)}function E1(e){return F1(e,!0)}function F1(e,t){const n=[];let r=0;for(let i=1;iA1(e)&&95!==e,t,n)}function O1(e,t,n){return t!==n&&t+1t(e.charCodeAt(n),n))}function R1(e,t=!0,n=!1){const r={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},i=[];let o,a,s,c=0,l=!1;function _(){return a=s,s=UG.scan(),19===s?c++:20===s&&c--,s}function u(){const e=UG.getTokenValue(),t=UG.getTokenStart();return{fileName:e,pos:t,end:t+e.length}}function d(){i.push(u()),p()}function p(){0===c&&(l=!0)}function f(){let e=UG.getToken();return 138===e&&(e=_(),144===e&&(e=_(),11===e&&(o||(o=[]),o.push({ref:u(),depth:c}))),!0)}function m(){if(25===a)return!1;let e=UG.getToken();if(102===e){if(e=_(),21===e){if(e=_(),11===e||15===e)return d(),!0}else{if(11===e)return d(),!0;if(156===e){UG.lookAhead(()=>{const e=UG.scan();return 161!==e&&(42===e||19===e||80===e||jh(e))})&&(e=_())}if(80===e||jh(e))if(e=_(),161===e){if(e=_(),11===e)return d(),!0}else if(64===e){if(y(!0))return!0}else{if(28!==e)return!0;e=_()}if(19===e){for(e=_();20!==e&&1!==e;)e=_();20===e&&(e=_(),161===e&&(e=_(),11===e&&d()))}else 42===e&&(e=_(),130===e&&(e=_(),(80===e||jh(e))&&(e=_(),161===e&&(e=_(),11===e&&d()))))}return!0}return!1}function h(){let e=UG.getToken();if(95===e){if(p(),e=_(),156===e){UG.lookAhead(()=>{const e=UG.scan();return 42===e||19===e})&&(e=_())}if(19===e){for(e=_();20!==e&&1!==e;)e=_();20===e&&(e=_(),161===e&&(e=_(),11===e&&d()))}else if(42===e)e=_(),161===e&&(e=_(),11===e&&d());else if(102===e){if(e=_(),156===e){UG.lookAhead(()=>{const e=UG.scan();return 80===e||jh(e)})&&(e=_())}if((80===e||jh(e))&&(e=_(),64===e&&y(!0)))return!0}return!0}return!1}function y(e,t=!1){let n=e?_():UG.getToken();return 149===n&&(n=_(),21===n&&(n=_(),(11===n||t&&15===n)&&d()),!0)}function v(){let e=UG.getToken();if(80===e&&"define"===UG.getTokenValue()){if(e=_(),21!==e)return!0;if(e=_(),11===e||15===e){if(e=_(),28!==e)return!0;e=_()}if(23!==e)return!0;for(e=_();24!==e&&1!==e;)11!==e&&15!==e||d(),e=_();return!0}return!1}if(t&&function(){for(UG.setText(e),_();1!==UG.getToken();){if(16===UG.getToken()){const e=[UG.getToken()];e:for(;g(e);){const t=UG.scan();switch(t){case 1:break e;case 102:m();break;case 16:e.push(t);break;case 19:g(e)&&e.push(t);break;case 20:g(e)&&(16===Pe(e)?18===UG.reScanTemplateToken(!1)&&e.pop():e.pop())}}_()}f()||m()||h()||n&&(y(!1,!0)||v())||_()}UG.setText(void 0)}(),uO(r,e),dO(r,ft),l){if(o)for(const e of o)i.push(e.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:void 0}}{let e;if(o)for(const t of o)0===t.depth?(e||(e=[]),e.push(t.ref.fileName)):i.push(t.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:e}}}var B1=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;function J1(e){const t=on(e.useCaseSensitiveFileNames()),n=e.getCurrentDirectory(),r=new Map,i=new Map;return{tryGetSourcePosition:function e(t){if(!lO(t.fileName))return;if(!s(t.fileName))return;const n=a(t.fileName).getSourcePosition(t);return n&&n!==t?e(n)||n:void 0},tryGetGeneratedPosition:function(r){if(lO(r.fileName))return;const i=s(r.fileName);if(!i)return;const o=e.getProgram();if(o.isSourceOfProjectReferenceRedirect(i.fileName))return;const c=o.getCompilerOptions().outFile,l=c?aT(c)+".d.ts":av(r.fileName,o.getCompilerOptions(),n,o.getCommonSourceDirectory(),t);if(void 0===l)return;const _=a(l,r.fileName).getGeneratedPosition(r);return _===r?void 0:_},toLineColumnOffset:function(e,t){return l(e).getLineAndCharacterOfPosition(t)},clearCache:function(){r.clear(),i.clear()},documentPositionMappers:i};function o(e){return ia(e,n,t)}function a(n,r){const a=o(n),s=i.get(a);if(s)return s;let c;if(e.getDocumentPositionMapper)c=e.getDocumentPositionMapper(n,r);else if(e.readFile){const r=l(n);c=r&&z1({getSourceFileLike:l,getCanonicalFileName:t,log:t=>e.log(t)},n,xJ(r.text,Ya(r)),t=>!e.fileExists||e.fileExists(t)?e.readFile(t):void 0)}return i.set(a,c||RJ),c||RJ}function s(t){const n=e.getProgram();if(!n)return;const r=o(t),i=n.getSourceFileByPath(r);return i&&i.resolvedPath===r?i:void 0}function c(t){const n=o(t),i=r.get(n);if(void 0!==i)return i||void 0;if(!e.readFile||e.fileExists&&!e.fileExists(t))return void r.set(n,!1);const a=e.readFile(t),s=!!a&&function(e,t){return{text:e,lineMap:t,getLineAndCharacterOfPosition(e){return Za(Ya(this),e)}}}(a);return r.set(n,s),s||void 0}function l(t){return e.getSourceFileLike?e.getSourceFileLike(t):s(t)||c(t)}}function z1(e,t,n,r){let i=SJ(n);if(i){const n=B1.exec(i);if(n){if(n[1]){const r=n[1];return q1(e,Ub(To,r),t)}i=void 0}}const o=[];i&&o.push(i),o.push(t+".map");const a=i&&ta(i,Vo(t));for(const n of o){const i=ta(n,Vo(t)),o=r(i,a);if(_t(o))return q1(e,o,i);if(void 0!==o)return o||void 0}}function q1(e,t,n){const r=CJ(t);if(r&&r.sources&&r.file&&r.mappings&&(!r.sourcesContent||!r.sourcesContent.some(_t)))return MJ(e,r,n)}var U1=new Map;function V1(e,t,n){var r;t.getSemanticDiagnostics(e,n);const i=[],o=t.getTypeChecker();var a;!(1===e.impliedNodeFormat||Bo(e.fileName,[".cts",".cjs"]))&&e.commonJsModuleIndicator&&(YQ(t)||ZQ(t.getCompilerOptions()))&&function(e){return e.statements.some(e=>{switch(e.kind){case 243:return e.declarationList.declarations.some(e=>!!e.initializer&&$m(W1(e.initializer),!0));case 244:{const{expression:t}=e;if(!yP(t))return $m(t,!0);const n=dg(t);return 1===n||2===n}default:return!1}})}(e)&&i.push(Vp(yP(a=e.commonJsModuleIndicator)?a.left:a,Ca.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));const s=Bm(e);if(U1.clear(),function t(n){if(s)(function(e,t){var n,r,i,o;if(_P(e)){if(eE(e.parent)&&(null==(n=e.symbol.members)?void 0:n.size))return!0;const o=t.getSymbolOfExpando(e,!1);return!(!o||!(null==(r=o.exports)?void 0:r.size)&&!(null==(i=o.members)?void 0:i.size))}if(nE(e))return!!(null==(o=e.symbol.members)?void 0:o.size);return!1})(n,o)&&i.push(Vp(eE(n.parent)?n.parent.name:n,Ca.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(LP(n)&&n.parent===e&&2&n.declarationList.flags&&1===n.declarationList.declarations.length){const e=n.declarationList.declarations[0].initializer;e&&$m(e,!0)&&i.push(Vp(e,Ca.require_call_may_be_converted_to_an_import))}const t=Q5.getJSDocTypedefNodes(n);for(const e of t)i.push(Vp(e,Ca.JSDoc_typedef_may_be_converted_to_TypeScript_type));Q5.parameterShouldGetTypeFromJSDoc(n)&&i.push(Vp(n.name||n,Ca.JSDoc_types_may_be_moved_to_TypeScript_types))}e2(n)&&function(e,t,n){(function(e,t){return!Hh(e)&&e.body&&jP(e.body)&&function(e,t){return!!jf(e,e=>K1(e,t))}(e.body,t)&&H1(e,t)})(e,t)&&!U1.has(Z1(e))&&n.push(Vp(!e.name&&eE(e.parent)&&QN(e.parent.name)?e.parent.name:e,Ca.This_may_be_converted_to_an_async_function))}(n,o,i);n.forEachChild(t)}(e),JS(t.getCompilerOptions()))for(const n of e.imports){const o=$1(Pg(n));if(!o)continue;const a=null==(r=t.getResolvedModuleFromModuleSpecifier(n,e))?void 0:r.resolvedModule,s=a&&t.getSourceFile(a.resolvedFileName);s&&s.externalModuleIndicator&&!0!==s.externalModuleIndicator&&kE(s.externalModuleIndicator)&&s.externalModuleIndicator.isExportEquals&&i.push(Vp(o,Ca.Import_may_be_converted_to_a_default_import))}return ge(i,e.bindSuggestionDiagnostics),ge(i,t.getSuggestionDiagnostics(e,n)),i.sort((e,t)=>e.start-t.start)}function W1(e){return rP(e)?W1(e.expression):e}function $1(e){switch(e.kind){case 272:const{importClause:t,moduleSpecifier:n}=e;return t&&!t.name&&t.namedBindings&&274===t.namedBindings.kind&&ON(n)?t.namedBindings.name:void 0;case 271:return e.name;default:return}}function H1(e,t){const n=t.getSignatureFromDeclaration(e),r=n?t.getReturnTypeOfSignature(n):void 0;return!!r&&!!t.getPromisedTypeOfPromise(r)}function K1(e,t){return HP(e)&&!!e.expression&&G1(e.expression,t)}function G1(e,t){if(!X1(e)||!Q1(e)||!e.arguments.every(e=>Y1(e,t)))return!1;let n=e.expression.expression;for(;X1(n)||rP(n);)if(oP(n)){if(!Q1(n)||!n.arguments.every(e=>Y1(e,t)))return!1;n=n.expression.expression}else n=n.expression;return!0}function X1(e){return oP(e)&&(sX(e,"then")||sX(e,"catch")||sX(e,"finally"))}function Q1(e){const t=e.expression.name.text,n="then"===t?2:"catch"===t||"finally"===t?1:0;return!(e.arguments.length>n)&&(e.arguments.length106===e.kind||QN(e)&&"undefined"===e.text)))}function Y1(e,t){switch(e.kind){case 262:case 218:if(1&$h(e))return!1;case 219:U1.set(Z1(e),!0);case 106:return!0;case 80:case 211:{const n=t.getSymbolAtLocation(e);return!!n&&(t.isUndefinedSymbol(n)||ee(kx(n,t).declarations,e=>f_(e)||qu(e)&&!!e.initializer&&f_(e.initializer)))}default:return!1}}function Z1(e){return`${e.pos.toString()}:${e.end.toString()}`}function e2(e){switch(e.kind){case 262:case 174:case 218:case 219:return!0;default:return!1}}var t2=new Set(["isolatedModules"]);function n2(e,t){return c2(e,t,!1)}function r2(e,t){return c2(e,t,!0)}var i2,o2,a2='/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number {}\ninterface Object {}\ninterface RegExp {}\ninterface String {}\ninterface Array { length: number; [n: number]: T; }\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}',s2="lib.d.ts";function c2(e,t,n){i2??(i2=YI(s2,a2,{languageVersion:99}));const r=[],i=t.compilerOptions?_2(t.compilerOptions,r):{},o={target:1,jsx:1};for(const e in o)Be(o,e)&&void 0===i[e]&&(i[e]=o[e]);for(const e of RO)i.verbatimModuleSyntax&&t2.has(e.name)||(i[e.name]=e.transpileOptionValue);i.suppressOutputPathCheck=!0,i.allowNonTsExtensions=!0,n?(i.declaration=!0,i.emitDeclarationOnly=!0,i.isolatedDeclarations=!0):i.declaration=!1;const a=Xb(i),s={getSourceFile:e=>e===na(c)?l:e===na(s2)?i2:void 0,writeFile:(e,t)=>{Ro(e,".map")?(Tn.assertEqual(u,void 0,"Unexpected multiple source map outputs, file:",e),u=t):(Tn.assertEqual(_,void 0,"Unexpected multiple outputs, file:",e),_=t)},getDefaultLibFileName:()=>s2,useCaseSensitiveFileNames:()=>!1,getCanonicalFileName:e=>e,getCurrentDirectory:()=>"",getNewLine:()=>a,fileExists:e=>e===c||!!n&&e===s2,readFile:()=>"",directoryExists:()=>!0,getDirectories:()=>[]},c=t.fileName||(t.compilerOptions&&t.compilerOptions.jsx?"module.tsx":"module.ts"),l=YI(c,e,{languageVersion:OS(i),impliedNodeFormat:jV(ia(c,"",s.getCanonicalFileName),void 0,s,i),setExternalModuleIndicator:AS(i),jsDocParsingMode:t.jsDocParsingMode??0});let _,u;t.moduleName&&(l.moduleName=t.moduleName),t.renamedDependencies&&(l.renamedDependencies=new Map(Object.entries(t.renamedDependencies)));const d=RV(n?[c,s2]:[c],i,s);t.reportDiagnostics&&(ge(r,d.getSyntacticDiagnostics(l)),ge(r,d.getOptionsDiagnostics()));return ge(r,d.emit(void 0,void 0,void 0,n,t.transformers,n).diagnostics),void 0===_?Tn.fail("Output generation failed"):{outputText:_,diagnostics:r,sourceMapText:u}}function l2(e,t,n,r,i){const o=n2(e,{compilerOptions:t,fileName:n,reportDiagnostics:!!r,moduleName:i});return ge(r,o.diagnostics),o.outputText}function _2(e,t){o2=o2||O(FO,e=>"object"==typeof e.type&&!md(e.type,e=>"number"!=typeof e)),e=PQ(e);for(const n of o2){if(!Be(e,n.name))continue;const r=e[n.name];_t(r)?e[n.name]=YO(n,r,t):md(n.type,e=>e===r)||t.push(XO(n))}return e}var u2={};function d2(e,t,n,r,i,o,a){const s=f1(r);if(!s)return p;const c=[],l=1===e.length?e[0]:void 0;for(const r of e)n.throwIfCancellationRequested(),o&&r.isDeclarationFile||p2(r,!!a,l)||r.getNamedDeclarations().forEach((e,n)=>{f2(s,n,e,t,r.fileName,!!a,l,c)});return c.sort(b2),(void 0===i?c:c.slice(0,i)).map(x2)}function p2(e,t,n){return e!==n&&t&&(YZ(e.path)||e.hasNoDefaultLib)}function f2(e,t,n,r,i,o,a,s){const c=e.getMatchForLastSegmentOfPattern(t);if(c)for(const l of n)if(m2(l,r,o,a))if(e.patternContainsDots){const n=e.getFullMatch(v2(l),t);n&&s.push({name:t,fileName:i,matchKind:n.kind,isCaseSensitive:n.isCaseSensitive,declaration:l})}else s.push({name:t,fileName:i,matchKind:c.kind,isCaseSensitive:c.isCaseSensitive,declaration:l})}function m2(e,t,n,r){var i;switch(e.kind){case 273:case 276:case 271:const o=t.getSymbolAtLocation(e.name),a=t.getAliasedSymbol(o);return o.escapedName!==a.escapedName&&!(null==(i=a.declarations)?void 0:i.every(e=>p2(e.getSourceFile(),n,r)));default:return!0}}function g2(e,t){const n=jc(e);return!!n&&(y2(n,t)||167===n.kind&&h2(n.expression,t))}function h2(e,t){return y2(e,t)||rP(e)&&(t.push(e.name.text),!0)&&h2(e.expression,t)}function y2(e,t){return Zh(e)&&(t.push(ey(e)),!0)}function v2(e){const t=[],n=jc(e);if(n&&167===n.kind&&!h2(n.expression,t))return p;t.shift();let r=vX(e);for(;r;){if(!g2(r,t))return p;r=vX(r)}return t.reverse()}function b2(e,t){return It(e.matchKind,t.matchKind)||Wt(e.name,t.name)}function x2(e){const t=e.declaration,n=vX(t),r=n&&jc(n);return{name:e.name,kind:bX(t),kindModifiers:xQ(t),matchKind:d1[e.matchKind],isCaseSensitive:e.isCaseSensitive,fileName:e.fileName,textSpan:jQ(t),containerName:r?r.text:"",containerKind:r?bX(n):""}}a(u2,{getNavigateToItems:()=>d2});var S2={};a(S2,{getNavigationBarItems:()=>A2,getNavigationTree:()=>I2});var k2,T2,C2,w2,N2=/\s+/g,D2=150,P2=[],E2=[],F2=[];function A2(e,t){k2=t,T2=e;try{return M(function(e){const t=[];function n(e){if(r(e)&&(t.push(e),e.children))for(const t of e.children)n(t)}return n(e),t;function r(e){if(e.children)return!0;switch(L2(e)){case 263:case 231:case 266:case 264:case 267:case 307:case 265:case 346:case 338:return!0;case 219:case 262:case 218:return t(e);default:return!1}function t(e){if(!e.node.body)return!1;switch(L2(e.parent)){case 268:case 307:case 174:case 176:return!0;default:return!1}}}}(R2(e)),s6)}finally{O2()}}function I2(e,t){k2=t,T2=e;try{return a6(R2(e))}finally{O2()}}function O2(){T2=void 0,k2=void 0,P2=[],C2=void 0,F2=[]}function j2(e){return h6(e.getText(T2))}function L2(e){return e.node.kind}function M2(e,t){e.children?e.children.push(t):e.children=[t]}function R2(e){Tn.assert(!P2.length);const t={node:e,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};C2=t;for(const t of e.statements)G2(t);return W2(),Tn.assert(!C2&&!P2.length),t}function B2(e,t){M2(C2,J2(e,t))}function J2(e,t){return{node:e,name:t||(ku(e)||nu(e)?jc(e):void 0),additionalNodes:void 0,parent:C2,children:void 0,indent:C2.indent+1}}function z2(e){w2||(w2=new Map),w2.set(e,!0)}function q2(e){for(let t=0;t0;t--){V2(e,n[t])}return[n.length-1,n[0]]}function V2(e,t){const n=J2(e,t);M2(C2,n),P2.push(C2),E2.push(w2),w2=void 0,C2=n}function W2(){C2.children&&(X2(C2.children,C2),n6(C2.children)),C2=P2.pop(),w2=E2.pop()}function $2(e,t,n){V2(e,n),G2(t),W2()}function H2(e){e.initializer&&function(e){switch(e.kind){case 219:case 218:case 231:return!0;default:return!1}}(e.initializer)?(V2(e),KI(e.initializer,G2),W2()):$2(e,e.initializer)}function K2(e){const t=jc(e);if(void 0===t)return!1;if(pD(t)){const e=t.expression;return Cb(e)||AN(e)||Kh(e)}return!!t}function G2(e){if(k2.throwIfCancellationRequested(),e&&!ql(e))switch(e.kind){case 176:const t=e;$2(t,t.body);for(const e of t.parameters)lc(e,t)&&B2(e);break;case 174:case 177:case 178:case 173:K2(e)&&$2(e,e.body);break;case 172:K2(e)&&H2(e);break;case 171:K2(e)&&B2(e);break;case 273:const n=e;n.name&&B2(n.name);const{namedBindings:r}=n;if(r)if(274===r.kind)B2(r);else for(const e of r.elements)B2(e);break;case 304:$2(e,e.name);break;case 305:const{expression:i}=e;QN(i)?B2(e,i):B2(e);break;case 208:case 303:case 260:{const t=e;O_(t.name)?G2(t.name):H2(t);break}case 262:const o=e.name;o&&QN(o)&&z2(o.text),$2(e,e.body);break;case 219:case 218:$2(e,e.body);break;case 266:V2(e);for(const t of e.members)d6(t)||B2(t);W2();break;case 263:case 231:case 264:V2(e);for(const t of e.members)G2(t);W2();break;case 267:$2(e,u6(e).body);break;case 277:{const t=e.expression,n=nP(t)||oP(t)?t:uP(t)||_P(t)?t.body:void 0;n?(V2(e),G2(n),W2()):B2(e);break}case 281:case 271:case 181:case 179:case 180:case 265:B2(e);break;case 213:case 226:{const t=dg(e);switch(t){case 1:case 2:return void $2(e,e.right);case 6:case 3:{const n=e,r=n.left,i=3===t?r.expression:r;let o,a=0;return QN(i.expression)?(z2(i.expression.text),o=i.expression):[a,o]=U2(n,i.expression),6===t?nP(n.right)&&n.right.properties.length>0&&(V2(n,o),KI(n.right,G2),W2()):_P(n.right)||uP(n.right)?$2(e,n.right,o):(V2(n,o),$2(e,n.right,r.name),W2()),void q2(a)}case 7:case 9:{const n=e,r=7===t?n.arguments[0]:n.arguments[0].expression,i=n.arguments[1],[o,a]=U2(e,r);return V2(e,a),V2(e,vI(aw.createIdentifier(i.text),i)),G2(e.arguments[2]),W2(),W2(),void q2(o)}case 5:{const t=e,n=t.left,r=n.expression;if(QN(r)&&"prototype"!==xg(n)&&w2&&w2.has(r.text))return void(_P(t.right)||uP(t.right)?$2(e,t.right,r):gg(n)&&(V2(t,r),$2(t.left,t.right,vg(n)),W2()));break}case 4:case 0:case 8:break;default:Tn.assertNever(t)}}default:Ju(e)&&h(e.jsDoc,e=>{h(e.tags,e=>{Mg(e)&&B2(e)})}),KI(e,G2)}}function X2(e,t){const n=new Map;j(e,(e,r)=>{const i=e.name||jc(e.node),o=i&&j2(i);if(!o)return!0;const a=n.get(o);if(!a)return n.set(o,e),!0;if(a instanceof Array){for(const n of a)if(Y2(n,e,r,t))return!1;return a.push(e),!0}{const i=a;return!Y2(i,e,r,t)&&(n.set(o,[i,e]),!0)}})}var Q2={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function Y2(e,t,n,r){return!!function(e,t,n,r){function i(e){return _P(e)||nE(e)||eE(e)}const o=yP(t.node)||oP(t.node)?dg(t.node):0,a=yP(e.node)||oP(e.node)?dg(e.node):0;if(Q2[o]&&Q2[a]||i(e.node)&&Q2[o]||i(t.node)&&Q2[a]||rE(e.node)&&Z2(e.node)&&Q2[o]||rE(t.node)&&Q2[a]||rE(e.node)&&Z2(e.node)&&i(t.node)||rE(t.node)&&i(e.node)&&Z2(e.node)){let o=e.additionalNodes&&Pe(e.additionalNodes)||e.node;if(!rE(e.node)&&!rE(t.node)||i(e.node)||i(t.node)){const n=i(e.node)?e.node:i(t.node)?t.node:void 0;if(void 0!==n){const r=J2(vI(aw.createConstructorDeclaration(void 0,[],void 0),n));r.indent=e.indent+1,r.children=e.node===n?e.children:t.children,e.children=e.node===n?ne([r],t.children||[t]):ne(e.children||[{...e}],[r])}else(e.children||t.children)&&(e.children=ne(e.children||[{...e}],t.children||[t]),e.children&&(X2(e.children,e),n6(e.children)));o=e.node=vI(aw.createClassDeclaration(void 0,e.name||aw.createIdentifier("__class__"),void 0,void 0,[]),e.node)}else e.children=ne(e.children,t.children),e.children&&X2(e.children,e);const a=t.node;return r.children[n-1].node.end===o.end?vI(o,{pos:o.pos,end:a.end}):(e.additionalNodes||(e.additionalNodes=[]),e.additionalNodes.push(vI(aw.createClassDeclaration(void 0,e.name||aw.createIdentifier("__class__"),void 0,void 0,[]),t.node))),!0}return 0!==o}(e,t,n,r)||!!function(e,t,n){if(e.kind!==t.kind||e.parent!==t.parent&&(!e6(e,n)||!e6(t,n)))return!1;switch(e.kind){case 172:case 174:case 177:case 178:return $v(e)===$v(t);case 267:return t6(e,t)&&_6(e)===_6(t);default:return!0}}(e.node,t.node,r)&&(function(e,t){e.additionalNodes=e.additionalNodes||[],e.additionalNodes.push(t.node),t.additionalNodes&&e.additionalNodes.push(...t.additionalNodes);e.children=ne(e.children,t.children),e.children&&(X2(e.children,e),n6(e.children))}(e,t),!0)}function Z2(e){return!!(16&e.flags)}function e6(e,t){const n=cE(e.parent)?e.parent.parent:e.parent;return n===t.node||E(t.additionalNodes,n)}function t6(e,t){return e.body&&t.body?e.body.kind===t.body.kind&&(267!==e.body.kind||t6(e.body,t.body)):e.body===t.body}function n6(e){e.sort(r6)}function r6(e,t){return Wt(i6(e.node),i6(t.node))||It(L2(e),L2(t))}function i6(e){if(267===e.kind)return l6(e);const t=jc(e);if(t&&d_(t)){const e=Yh(t);return e&&Cc(e)}switch(e.kind){case 218:case 219:case 231:return m6(e);default:return}}function o6(e,t){if(267===e.kind)return h6(l6(e));if(t){const e=QN(t)?t.text:iP(t)?`[${j2(t.argumentExpression)}]`:j2(t);if(e.length>0)return h6(e)}switch(e.kind){case 307:const t=e;return tO(t)?`"${My(Wo(aT(na(t.fileName))))}"`:"";case 277:return kE(e)&&e.isExportEquals?"export=":"default";case 219:case 262:case 218:case 263:case 231:return 2048&ob(e)?"default":m6(e);case 176:return"constructor";case 180:return"new()";case 179:return"()";case 181:return"[]";default:return""}}function a6(e){return{text:o6(e.node,e.name),kind:bX(e.node),kindModifiers:f6(e.node),spans:c6(e),nameSpan:e.name&&p6(e.name),childItems:M(e.children,a6)}}function s6(e){return{text:o6(e.node,e.name),kind:bX(e.node),kindModifiers:f6(e.node),spans:c6(e),childItems:M(e.children,function(e){return{text:o6(e.node,e.name),kind:bX(e.node),kindModifiers:xQ(e.node),spans:c6(e),childItems:F2,indent:0,bolded:!1,grayed:!1}})||F2,indent:e.indent,bolded:!1,grayed:!1}}function c6(e){const t=[p6(e.node)];if(e.additionalNodes)for(const n of e.additionalNodes)t.push(p6(n));return t}function l6(e){return pp(e)?tp(e.name):_6(e)}function _6(e){const t=[ey(e.name)];for(;e.body&&267===e.body.kind;)e=e.body,t.push(ey(e.name));return t.join(".")}function u6(e){return e.body&&sE(e.body)?u6(e.body):e}function d6(e){return!e.name||167===e.name.kind}function p6(e){return 307===e.kind?RQ(e):jQ(e,T2)}function f6(e){return e.parent&&260===e.parent.kind&&(e=e.parent),xQ(e)}function m6(e){const{parent:t}=e;if(e.name&&vd(e.name)>0)return h6(Rp(e.name));if(eE(t))return h6(Rp(t.name));if(yP(t)&&64===t.operatorToken.kind)return j2(t.left).replace(N2,"");if(HE(t))return j2(t.name);if(2048&ob(e))return"default";if(S_(e))return"";if(oP(t)){let e=g6(t.expression);if(void 0!==e){if(e=h6(e),e.length>D2)return`${e} callback`;return`${e}(${h6($(t.arguments,e=>Ku(e)||G_(e)?e.getText(T2):void 0).join(", "))}) callback`}}return""}function g6(e){if(QN(e))return e.text;if(rP(e)){const t=g6(e.expression),n=e.name.text;return void 0===t?n:`${t}.${n}`}}function h6(e){return(e=e.length>D2?e.substring(0,D2)+"...":e).replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}var y6={};a(y6,{addExportToChanges:()=>h4,addExportsInOldFile:()=>Z6,addImportsForMovedSymbols:()=>s4,addNewFileToTsconfig:()=>X6,addOrRemoveBracesToArrowFunction:()=>K4,addTargetFileImports:()=>M4,containsJsx:()=>b4,convertArrowFunctionOrFunctionExpression:()=>o3,convertParamsToDestructuredObject:()=>m3,convertStringOrTemplateLiteral:()=>j3,convertToOptionalChainExpression:()=>X3,createNewFileName:()=>y4,deleteMovedStatements:()=>Q6,deleteUnusedImports:()=>l4,deleteUnusedOldImports:()=>Y6,doChangeNamedToNamespaceOrDefault:()=>O6,extractSymbol:()=>c7,filterImport:()=>f4,forEachImportInStatement:()=>o4,generateGetAccessorAndSetAccessor:()=>N7,getApplicableRefactors:()=>x6,getEditsForRefactor:()=>S6,getExistingLocals:()=>I4,getIdentifierForNode:()=>L4,getNewStatementsAndRemoveFromOldFile:()=>G6,getStatementsToMove:()=>v4,getTopLevelDeclarationStatement:()=>g4,getUsageInfo:()=>S4,inferFunctionReturnType:()=>F7,isRefactorErrorInfo:()=>O4,isTopLevelDeclaration:()=>D4,moduleSpecifierFromImport:()=>i4,nameOfTopLevelDeclaration:()=>m4,refactorKindBeginsWith:()=>j4,registerRefactor:()=>b6,updateImportsInOtherFiles:()=>e4});var v6=new Map;function b6(e,t){v6.set(e,t)}function x6(e,t){return We(U(v6.values(),n=>{var r;return e.cancellationToken&&e.cancellationToken.isCancellationRequested()||!(null==(r=n.kinds)?void 0:r.some(t=>j4(t,e.kind)))?void 0:n.getAvailableActions(e,t)}))}function S6(e,t,n,r){const i=v6.get(t);return i&&i.getEditsForAction(e,n,r)}var k6="Convert export",T6={name:"Convert default export to named export",description:lS(Ca.Convert_default_export_to_named_export),kind:"refactor.rewrite.export.named"},C6={name:"Convert named export to default export",description:lS(Ca.Convert_named_export_to_default_export),kind:"refactor.rewrite.export.default"};function w6(e,t=!0){const{file:n,program:r}=e,i=n0(e),o=YX(n,i.start),a=o.parent&&32&ob(o.parent)&&t?o.parent:fY(o,n,i);if(!(a&&(QE(a.parent)||cE(a.parent)&&pp(a.parent.parent))))return{error:lS(Ca.Could_not_find_export_statement)};const s=r.getTypeChecker(),c=function(e,t){if(QE(e))return e.symbol;const n=e.parent.symbol;if(n.valueDeclaration&&bp(n.valueDeclaration))return t.getMergedSymbol(n);return n}(a.parent,s),l=ob(a)||(kE(a)&&!a.isExportEquals?2080:0),_=!!(2048&l);if(!(32&l)||!_&&c.exports.has("default"))return{error:lS(Ca.This_file_already_has_a_default_export)};const u=e=>QN(e)&&s.getSymbolAtLocation(e)?void 0:{error:lS(Ca.Can_only_convert_named_export)};switch(a.kind){case 262:case 263:case 264:case 266:case 265:case 267:{const e=a;if(!e.name)return;return u(e.name)||{exportNode:e,exportName:e.name,wasDefault:_,exportingModuleSymbol:c}}case 243:{const e=a;if(!(2&e.declarationList.flags)||1!==e.declarationList.declarations.length)return;const t=Ne(e.declarationList.declarations);if(!t.initializer)return;return Tn.assert(!_,"Can't have a default flag here"),u(t.name)||{exportNode:e,exportName:t.name,wasDefault:_,exportingModuleSymbol:c}}case 277:{const e=a;if(e.isExportEquals)return;return u(e.expression)||{exportNode:e,exportName:e.expression,wasDefault:_,exportingModuleSymbol:c}}default:return}}function N6(e,t){return aw.createImportSpecifier(!1,e===t?void 0:aw.createIdentifier(e),aw.createIdentifier(t))}function D6(e,t){return aw.createExportSpecifier(!1,e===t?void 0:aw.createIdentifier(e),aw.createIdentifier(t))}b6(k6,{kinds:[T6.kind,C6.kind],getAvailableActions:function(e){const t=w6(e,"invoked"===e.triggerReason);if(!t)return p;if(!O4(t)){const e=t.wasDefault?T6:C6;return[{name:k6,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:k6,description:lS(Ca.Convert_default_export_to_named_export),actions:[{...T6,notApplicableReason:t.error},{...C6,notApplicableReason:t.error}]}]:p},getEditsForAction:function(e,t){Tn.assert(t===T6.name||t===C6.name,"Unexpected action name");const n=w6(e);Tn.assert(n&&!O4(n),"Expected applicable refactor info");const r=tde.ChangeTracker.with(e,t=>function(e,t,n,r,i){(function(e,{wasDefault:t,exportNode:n,exportName:r},i,o){if(t)if(kE(n)&&!n.isExportEquals){const t=n.expression,r=D6(t.text,t.text);i.replaceNode(e,n,aw.createExportDeclaration(void 0,!1,aw.createNamedExports([r])))}else i.delete(e,Tn.checkDefined(gY(n,90),"Should find a default keyword in modifier list"));else{const t=Tn.checkDefined(gY(n,95),"Should find an export keyword in modifier list");switch(n.kind){case 262:case 263:case 264:i.insertNodeAfter(e,t,aw.createToken(90));break;case 243:const a=Ne(n.declarationList.declarations);if(!Ice.Core.isSymbolReferencedInFile(r,o,e)&&!a.type){i.replaceNode(e,n,aw.createExportDefault(Tn.checkDefined(a.initializer,"Initializer was previously known to be present")));break}case 266:case 265:case 267:i.deleteModifier(e,t),i.insertNodeAfter(e,n,aw.createExportDefault(aw.createIdentifier(r.text)));break;default:Tn.fail(`Unexpected exportNode kind ${n.kind}`)}}})(e,n,r,t.getTypeChecker()),function(e,{wasDefault:t,exportName:n,exportingModuleSymbol:r},i,o){const a=e.getTypeChecker(),s=Tn.checkDefined(a.getSymbolAtLocation(n),"Export name should resolve to a symbol");Ice.Core.eachExportReference(e.getSourceFiles(),a,o,s,r,n.text,t,e=>{if(n===e)return;const r=e.getSourceFile();t?function(e,t,n,r){const{parent:i}=t;switch(i.kind){case 211:n.replaceNode(e,t,aw.createIdentifier(r));break;case 276:case 281:{const t=i;n.replaceNode(e,t,N6(r,t.name.text));break}case 273:{const o=i;Tn.assert(o.name===t,"Import clause name should match provided ref");const a=N6(r,t.text),{namedBindings:s}=o;if(s)if(274===s.kind){n.deleteRange(e,{pos:t.getStart(e),end:s.getStart(e)});const i=ON(o.parent.moduleSpecifier)?aY(o.parent.moduleSpecifier,e):1,a=rY(void 0,[N6(r,t.text)],o.parent.moduleSpecifier,i);n.insertNodeAfter(e,o.parent,a)}else n.delete(e,t),n.insertNodeAtEndOfList(e,s.elements,a);else n.replaceNode(e,t,aw.createNamedImports([a]));break}case 205:const o=i;n.replaceNode(e,i,aw.createImportTypeNode(o.argument,o.attributes,aw.createIdentifier(r),o.typeArguments,o.isTypeOf));break;default:Tn.failBadSyntaxKind(i)}}(r,e,i,n.text):function(e,t,n){const r=t.parent;switch(r.kind){case 211:n.replaceNode(e,t,aw.createIdentifier("default"));break;case 276:{const t=aw.createIdentifier(r.name.text);1===r.parent.elements.length?n.replaceNode(e,r.parent,t):(n.delete(e,r),n.insertNodeBefore(e,r.parent,t));break}case 281:n.replaceNode(e,r,D6("default",r.name.text));break;default:Tn.assertNever(r,`Unexpected parent kind ${r.kind}`)}}(r,e,i)})}(t,n,r,i)}(e.file,e.program,n,t,e.cancellationToken));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var P6="Convert import",E6={0:{name:"Convert namespace import to named imports",description:lS(Ca.Convert_namespace_import_to_named_imports),kind:"refactor.rewrite.import.named"},2:{name:"Convert named imports to namespace import",description:lS(Ca.Convert_named_imports_to_namespace_import),kind:"refactor.rewrite.import.namespace"},1:{name:"Convert named imports to default import",description:lS(Ca.Convert_named_imports_to_default_import),kind:"refactor.rewrite.import.default"}};function F6(e,t=!0){const{file:n}=e,r=n0(e),i=YX(n,r.start),o=t?xc(i,fn(dE,JF)):fY(i,n,r);if(void 0===o||!dE(o)&&!JF(o))return{error:"Selection is not an import declaration."};const a=r.start+r.length,s=nQ(o,o.parent,n);if(s&&a>s.getStart())return;const{importClause:c}=o;if(!c)return{error:lS(Ca.Could_not_find_import_clause)};if(!c.namedBindings)return{error:lS(Ca.Could_not_find_namespace_import_or_named_imports)};if(274===c.namedBindings.kind)return{convertTo:0,import:c.namedBindings};return A6(e.program,c)?{convertTo:1,import:c.namedBindings}:{convertTo:2,import:c.namedBindings}}function A6(e,t){return JS(e.getCompilerOptions())&&function(e,t){const n=t.resolveExternalModuleName(e);if(!n)return!1;const r=t.resolveExternalModuleSymbol(n);return n!==r}(t.parent.moduleSpecifier,e.getTypeChecker())}function I6(e){return rP(e)?e.name:e.right}function O6(e,t,n,r,i=A6(t,r.parent)){const o=t.getTypeChecker(),a=r.parent.parent,{moduleSpecifier:s}=a,c=new Set;r.elements.forEach(e=>{const t=o.getSymbolAtLocation(e.name);t&&c.add(t)});const l=s&&ON(s)?d0(s.text,99):"module";const _=r.elements.some(function(t){return!!Ice.Core.eachSymbolReferenceInFile(t.name,o,e,e=>{const t=o.resolveName(l,e,-1,!0);return!!t&&(!c.has(t)||wE(e.parent))})})?hZ(l,e):l,u=new Set;for(const t of r.elements){const r=(t.propertyName||t.name).text;Ice.Core.eachSymbolReferenceInFile(t.name,o,e,i=>{const o=aw.createPropertyAccessExpression(aw.createIdentifier(_),r);KE(i.parent)?n.replaceNode(e,i.parent,aw.createPropertyAssignment(i.text,o)):wE(i.parent)?u.add(t):n.replaceNode(e,i,o)})}if(n.replaceNode(e,r,i?aw.createIdentifier(_):aw.createNamespaceImport(aw.createIdentifier(_))),u.size&&dE(a)){const t=We(u.values(),e=>aw.createImportSpecifier(e.isTypeOnly,e.propertyName&&aw.createIdentifier(e.propertyName.text),aw.createIdentifier(e.name.text)));n.insertNodeAfter(e,r.parent.parent,j6(a,void 0,t))}}function j6(e,t,n){return aw.createImportDeclaration(void 0,L6(t,n),e.moduleSpecifier,void 0)}function L6(e,t){return aw.createImportClause(!1,e,t&&t.length?aw.createNamedImports(t):void 0)}b6(P6,{kinds:Ue(E6).map(e=>e.kind),getAvailableActions:function(e){const t=F6(e,"invoked"===e.triggerReason);if(!t)return p;if(!O4(t)){const e=E6[t.convertTo];return[{name:P6,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?Ue(E6).map(e=>({name:P6,description:e.description,actions:[{...e,notApplicableReason:t.error}]})):p},getEditsForAction:function(e,t){Tn.assert(ee(Ue(E6),e=>e.name===t),"Unexpected action name");const n=F6(e);Tn.assert(n&&!O4(n),"Expected applicable refactor info");const r=tde.ChangeTracker.with(e,t=>function(e,t,n,r){const i=t.getTypeChecker();0===r.convertTo?function(e,t,n,r,i){let o=!1;const a=[],s=new Map;Ice.Core.eachSymbolReferenceInFile(r.name,t,e,e=>{if(W_(e.parent)){const r=I6(e.parent).text;t.resolveName(r,e,-1,!0)&&s.set(r,!0),Tn.assert((rP(n=e.parent)?n.expression:n.left)===e,"Parent expression should match id"),a.push(e.parent)}else o=!0;var n});const c=new Map;for(const t of a){const r=I6(t).text;let i=c.get(r);void 0===i&&c.set(r,i=s.has(r)?hZ(r,e):r),n.replaceNode(e,t,aw.createIdentifier(i))}const l=[];c.forEach((e,t)=>{l.push(aw.createImportSpecifier(!1,e===t?void 0:aw.createIdentifier(t),aw.createIdentifier(e)))});const _=r.parent.parent;if(o&&!i&&dE(_))n.insertNodeAfter(e,_,j6(_,void 0,l));else{const t=o?aw.createIdentifier(r.name.text):void 0;n.replaceNode(e,r.parent,L6(t,l))}}(e,i,n,r.import,JS(t.getCompilerOptions())):O6(e,t,n,r.import,1===r.convertTo)}(e.file,e.program,t,n));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var M6="Extract type",R6={name:"Extract to type alias",description:lS(Ca.Extract_to_type_alias),kind:"refactor.extract.type"},B6={name:"Extract to interface",description:lS(Ca.Extract_to_interface),kind:"refactor.extract.interface"},J6={name:"Extract to typedef",description:lS(Ca.Extract_to_typedef),kind:"refactor.extract.typedef"};function z6(e,t=!0){const{file:n,startPosition:r}=e,i=Bm(n),o=BQ(n0(e)),a=o.pos===o.end&&t,s=function(e,t,n,r){const i=[()=>YX(e,t),()=>QX(e,t,()=>!0)];for(const t of i){const i=t(),o=FX(i,e,n.pos,n.end),a=xc(i,t=>t.parent&&A_(t)&&!U6(n,t.parent,e)&&(r||o));if(a)return a}return}(n,r,o,a);if(!s||!A_(s))return{info:{error:lS(Ca.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const c=e.program.getTypeChecker(),l=function(e,t){return xc(e,wu)||(t?xc(e,pF):void 0)}(s,i);if(void 0===l)return{info:{error:lS(Ca.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const _=function(e,t){return xc(e,e=>e===t?"quit":!(!BD(e.parent)&&!JD(e.parent)))??e}(s,l);if(!A_(_))return{info:{error:lS(Ca.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const u=[];(BD(_.parent)||JD(_.parent))&&o.end>s.end&&ge(u,_.parent.types.filter(e=>FX(e,n,o.pos,o.end)));const d=u.length>1?u:_,{typeParameters:f,affectedTextRange:m}=function(e,t,n,r){const i=[],o=lt(t),a={pos:o[0].getStart(r),end:o[o.length-1].end};for(const e of o)if(s(e))return{typeParameters:void 0,affectedTextRange:void 0};return{typeParameters:i,affectedTextRange:a};function s(t){if(PD(t)){if(QN(t.typeName)){const o=t.typeName,s=e.resolveName(o.text,o,262144,!0);for(const e of(null==s?void 0:s.declarations)||p)if(fD(e)&&e.getSourceFile()===r){if(e.name.escapedText===o.escapedText&&U6(e,a,r))return!0;if(U6(n,e,r)&&!U6(a,e,r)){he(i,e);break}}}}else if(qD(t)){const e=xc(t,e=>zD(e)&&U6(e.extendsType,t,r));if(!e||!U6(a,e,r))return!0}else if(DD(t)||VD(t)){const e=xc(t.parent,f_);if(e&&e.type&&U6(e.type,t,r)&&!U6(a,e,r))return!0}else if(AD(t))if(QN(t.exprName)){const i=e.resolveName(t.exprName.text,t.exprName,111551,!1);if((null==i?void 0:i.valueDeclaration)&&U6(n,i.valueDeclaration,r)&&!U6(a,i.valueDeclaration,r))return!0}else if(Tv(t.exprName.left)&&!U6(a,t.parent,r))return!0;return r&&jD(t)&&ns(r,t.pos).line===ns(r,t.end).line&&dw(t,1),KI(t,s)}}(c,d,l,n);if(!f)return{info:{error:lS(Ca.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};return{info:{isJS:i,selection:d,enclosingNode:l,typeParameters:f,typeElements:q6(c,d)},affectedTextRange:m}}function q6(e,t){if(t){if(ct(t)){const n=[];for(const r of t){const t=q6(e,r);if(!t)return;ge(n,t)}return n}if(JD(t)){const n=[],r=new Map;for(const i of t.types){const t=q6(e,i);if(!t||!t.every(e=>e.name&&Bx(r,XQ(e.name))))return;ge(n,t)}return n}return UD(t)?q6(e,t.type):ID(t)?t.members:void 0}}function U6(e,t,n){return PX(e,ds(n.text,t.pos),t.end)}function V6(e){return ct(e.selection)?{firstTypeNode:e.selection[0],lastTypeNode:e.selection[e.selection.length-1],newTypeNode:BD(e.selection[0].parent)?aw.createUnionTypeNode(e.selection):aw.createIntersectionTypeNode(e.selection)}:{firstTypeNode:e.selection,lastTypeNode:e.selection,newTypeNode:e.selection}}b6(M6,{kinds:[R6.kind,B6.kind,J6.kind],getAvailableActions:function(e){const{info:t,affectedTextRange:n}=z6(e,"invoked"===e.triggerReason);if(!t)return p;if(!O4(t)){return[{name:M6,description:lS(Ca.Extract_type),actions:t.isJS?[J6]:pe([R6],t.typeElements&&B6)}].map(t=>({...t,actions:t.actions.map(t=>({...t,range:n?{start:{line:ns(e.file,n.pos).line,offset:ns(e.file,n.pos).character},end:{line:ns(e.file,n.end).line,offset:ns(e.file,n.end).character}}:void 0}))}))}return e.preferences.provideRefactorNotApplicableReason?[{name:M6,description:lS(Ca.Extract_type),actions:[{...J6,notApplicableReason:t.error},{...R6,notApplicableReason:t.error},{...B6,notApplicableReason:t.error}]}]:p},getEditsForAction:function(e,t){const{file:n}=e,{info:r}=z6(e);Tn.assert(r&&!O4(r),"Expected to find a range to extract");const i=hZ("NewType",n),o=tde.ChangeTracker.with(e,o=>{switch(t){case R6.name:return Tn.assert(!r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r){const{enclosingNode:i,typeParameters:o}=r,{firstTypeNode:a,lastTypeNode:s,newTypeNode:c}=V6(r),l=aw.createTypeAliasDeclaration(void 0,n,o.map(e=>aw.updateTypeParameterDeclaration(e,e.modifiers,e.name,e.constraint,void 0)),c);e.insertNodeBefore(t,i,Jw(l),!0),e.replaceNodeRange(t,a,s,aw.createTypeReferenceNode(n,o.map(e=>aw.createTypeReferenceNode(e.name,void 0))),{leadingTriviaOption:tde.LeadingTriviaOption.Exclude,trailingTriviaOption:tde.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);case J6.name:return Tn.assert(r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r,i){var o;lt(i.selection).forEach(e=>{dw(e,7168)});const{enclosingNode:a,typeParameters:s}=i,{firstTypeNode:c,lastTypeNode:l,newTypeNode:_}=V6(i),u=aw.createJSDocTypedefTag(aw.createIdentifier("typedef"),aw.createJSDocTypeExpression(_),aw.createIdentifier(r)),d=[];h(s,e=>{const t=Sl(e),n=aw.createTypeParameterDeclaration(void 0,e.name),r=aw.createJSDocTemplateTag(aw.createIdentifier("template"),t&&pt(t,ZE),[n]);d.push(r)});const p=aw.createJSDocComment(void 0,aw.createNodeArray(ne(d,[u])));if(pF(a)){const r=a.getStart(n),i=$Y(t.host,null==(o=t.formatContext)?void 0:o.options);e.insertNodeAt(n,a.getStart(n),p,{suffix:i+i+n.text.slice(oZ(n.text,r-1),r)})}else e.insertNodeBefore(n,a,p,!0);e.replaceNodeRange(n,c,l,aw.createTypeReferenceNode(r,s.map(e=>aw.createTypeReferenceNode(e.name,void 0))))}(o,e,n,i,r);case B6.name:return Tn.assert(!r.isJS&&!!r.typeElements,"Invalid actionName/JS combo"),function(e,t,n,r){var i;const{enclosingNode:o,typeParameters:a,typeElements:s}=r,c=aw.createInterfaceDeclaration(void 0,n,a,void 0,s);vI(c,null==(i=s[0])?void 0:i.parent),e.insertNodeBefore(t,o,Jw(c),!0);const{firstTypeNode:l,lastTypeNode:_}=V6(r);e.replaceNodeRange(t,l,_,aw.createTypeReferenceNode(n,a.map(e=>aw.createTypeReferenceNode(e.name,void 0))),{leadingTriviaOption:tde.LeadingTriviaOption.Exclude,trailingTriviaOption:tde.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);default:Tn.fail("Unexpected action name")}}),a=n.fileName;return{edits:o,renameFilename:a,renameLocation:yZ(o,a,i,!1)}}});var W6="Move to file",$6=lS(Ca.Move_to_file),H6={name:"Move to file",description:$6,kind:"refactor.move.file"};function K6(e){return{edits:[],renameFilename:void 0,renameLocation:void 0,notApplicableReason:e}}function G6(e,t,n,r,i,o,a,s,c,l){const _=o.getTypeChecker(),u=xn(e.statements,vf),d=!C0(t.fileName,o,a,!!e.commonJsModuleIndicator),p=sY(e,s);s4(n.oldFileImportsFromTargetFile,t.fileName,l,o),Y6(e,i.all,n.unusedImportsFromOldFile,l),l.writeFixes(r,p),Q6(e,i.ranges,r),e4(r,o,a,e,n.movedSymbols,t.fileName,p),Z6(e,n.targetFileImportsFromOldFile,r,d),M4(e,n.oldImportsNeededByTargetFile,n.targetFileImportsFromOldFile,_,o,c),!Rm(t)&&u.length&&r.insertStatementsInNewFile(t.fileName,u,e),c.writeFixes(r,p);const f=function(e,t,n,r){return z(t,t=>{if(_4(t)&&!c4(e,t,r)&&C4(t,e=>{var t;return n.includes(Tn.checkDefined(null==(t=dt(e,vu))?void 0:t.symbol))})){const e=function(e,t){return t?[u4(e)]:function(e){return[e,...p4(e).map(d4)]}(e)}(aZ(t),r);if(e)return e}return aZ(t)})}(e,i.all,We(n.oldFileImportsFromTargetFile.keys()),d);Rm(t)&&t.statements.length>0?function(e,t,n,r,i){var o;const a=new Set,s=null==(o=r.symbol)?void 0:o.exports;if(s){const n=t.getTypeChecker(),o=new Map;for(const e of i.all)_4(e)&&Wv(e,32)&&C4(e,e=>{var t;const n=v(vu(e)?null==(t=s.get(e.symbol.escapedName))?void 0:t.declarations:void 0,e=>TE(e)?e:wE(e)?dt(e.parent.parent,TE):void 0);n&&n.moduleSpecifier&&o.set(n,(o.get(n)||new Set).add(e))});for(const[t,i]of We(o))if(t.exportClause&&CE(t.exportClause)&&g(t.exportClause.elements)){const o=t.exportClause.elements,s=O(o,e=>void 0===C(kx(e.symbol,n).declarations,e=>D4(e)&&i.has(e)));if(0===g(s)){e.deleteNode(r,t),a.add(t);continue}g(s)TE(e)&&!!e.moduleSpecifier&&!a.has(e));c?e.insertNodesBefore(r,c,n,!0):e.insertNodesAfter(r,r.statements[r.statements.length-1],n)}(r,o,f,t,i):Rm(t)?r.insertNodesAtEndOfFile(t,f,!1):r.insertStatementsInNewFile(t.fileName,c.hasFixes()?[4,...f]:f,e)}function X6(e,t,n,r,i){const o=e.getCompilerOptions().configFile;if(!o)return;const a=na(Yo(n,"..",r)),s=ba(o.fileName,a,i),c=o.statements[0]&&dt(o.statements[0].expression,nP),l=c&&C(c.properties,e=>HE(e)&&ON(e.name)&&"files"===e.name.text);l&&tP(l.initializer)&&t.insertNodeInListAfter(o,Ee(l.initializer.elements),aw.createStringLiteral(s),l.initializer.elements)}function Q6(e,t,n){for(const{first:r,afterLast:i}of t)n.deleteNodeRangeExcludingEnd(e,r,i)}function Y6(e,t,n,r){for(const i of e.statements)E(t,i)||o4(i,e=>{a4(e,e=>{n.has(e.symbol)&&r.removeExistingImport(e)})})}function Z6(e,t,n,r){const i=$Q();t.forEach((t,o)=>{if(o.declarations)for(const t of o.declarations){if(!D4(t))continue;const o=m4(t);if(!o)continue;const a=g4(t);i(a)&&h4(e,a,o,n,r)}})}function e4(e,t,n,r,i,o,a){const s=t.getTypeChecker();for(const c of t.getSourceFiles())if(c!==r)for(const l of c.statements)o4(l,_=>{if(s.getSymbolAtLocation(i4(_))!==r.symbol)return;const u=e=>{const t=eP(e.parent)?pY(s,e.parent):kx(s.getSymbolAtLocation(e),s);return!!t&&i.has(t)};l4(c,_,e,u);const d=Zo(Vo(ta(r.fileName,t.getCurrentDirectory())),o);if(0===Bt(!t.useCaseSensitiveFileNames())(d,c.fileName))return;const p=oB(t.getCompilerOptions(),c,c.fileName,d,eY(t,n)),f=f4(_,iY(p,a),u);f&&e.insertNodeAfter(c,l,f);const m=t4(_);m&&n4(e,c,s,i,p,m,_,a)})}function t4(e){switch(e.kind){case 272:return e.importClause&&e.importClause.namedBindings&&274===e.importClause.namedBindings.kind?e.importClause.namedBindings.name:void 0;case 271:return e.name;case 260:return dt(e.name,QN);default:return Tn.assertNever(e,`Unexpected node kind ${e.kind}`)}}function n4(e,t,n,r,i,o,a,s){const c=d0(i,99);let l=!1;const _=[];if(Ice.Core.eachSymbolReferenceInFile(o,n,t,e=>{rP(e.parent)&&(l=l||!!n.resolveName(c,e,-1,!0),r.has(n.getSymbolAtLocation(e.parent.name))&&_.push(e))}),_.length){const n=l?hZ(c,t):c;for(const r of _)e.replaceNode(t,r,aw.createIdentifier(n));e.insertNodeAfter(t,a,function(e,t,n,r){const i=aw.createIdentifier(t),o=iY(n,r);switch(e.kind){case 272:return aw.createImportDeclaration(void 0,aw.createImportClause(!1,void 0,aw.createNamespaceImport(i)),o,void 0);case 271:return aw.createImportEqualsDeclaration(void 0,!1,i,aw.createExternalModuleReference(o));case 260:return aw.createVariableDeclaration(i,void 0,void 0,r4(o));default:return Tn.assertNever(e,`Unexpected node kind ${e.kind}`)}}(a,c,i,s))}}function r4(e){return aw.createCallExpression(aw.createIdentifier("require"),void 0,[e])}function i4(e){return 272===e.kind?e.moduleSpecifier:271===e.kind?e.moduleReference.expression:e.initializer.arguments[0]}function o4(e,t){if(dE(e))ON(e.moduleSpecifier)&&t(e);else if(uE(e))EE(e.moduleReference)&&Ku(e.moduleReference.expression)&&t(e);else if(LP(e))for(const n of e.declarationList.declarations)n.initializer&&$m(n.initializer,!0)&&t(n)}function a4(e,t){var n,r,i,o,a;if(272===e.kind){if((null==(n=e.importClause)?void 0:n.name)&&t(e.importClause),274===(null==(i=null==(r=e.importClause)?void 0:r.namedBindings)?void 0:i.kind)&&t(e.importClause.namedBindings),275===(null==(a=null==(o=e.importClause)?void 0:o.namedBindings)?void 0:a.kind))for(const n of e.importClause.namedBindings.elements)t(n)}else if(271===e.kind)t(e);else if(260===e.kind)if(80===e.name.kind)t(e);else if(206===e.name.kind)for(const n of e.name.elements)QN(n.name)&&t(n)}function s4(e,t,n,r){for(const[i,o]of e){const e=s0(i,OS(r.getCompilerOptions())),a="default"===i.name&&i.parent?1:0;n.addImportForNonExistentExport(e,t,a,i.flags,o)}}function c4(e,t,n,r){var i;return n?!RP(t)&&Wv(t,32)||!!(r&&e.symbol&&(null==(i=e.symbol.exports)?void 0:i.has(r.escapedText))):!!e.symbol&&!!e.symbol.exports&&p4(t).some(t=>e.symbol.exports.has(Tc(t)))}function l4(e,t,n,r){if(272===t.kind&&t.importClause){const{name:i,namedBindings:o}=t.importClause;if((!i||r(i))&&(!o||275===o.kind&&0!==o.elements.length&&o.elements.every(e=>r(e.name))))return n.delete(e,t)}a4(t,t=>{t.name&&QN(t.name)&&r(t.name)&&n.delete(e,t)})}function _4(e){return Tn.assert(QE(e.parent),"Node parent should be a SourceFile"),F4(e)||LP(e)}function u4(e){const t=bI(e)?ne([aw.createModifier(95)],Rc(e)):void 0;switch(e.kind){case 262:return aw.updateFunctionDeclaration(e,t,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body);case 263:const n=xI(e)?Mc(e):void 0;return aw.updateClassDeclaration(e,ne(n,t),e.name,e.typeParameters,e.heritageClauses,e.members);case 243:return aw.updateVariableStatement(e,t,e.declarationList);case 267:return aw.updateModuleDeclaration(e,t,e.name,e.body);case 266:return aw.updateEnumDeclaration(e,t,e.name,e.members);case 265:return aw.updateTypeAliasDeclaration(e,t,e.name,e.typeParameters,e.type);case 264:return aw.updateInterfaceDeclaration(e,t,e.name,e.typeParameters,e.heritageClauses,e.members);case 271:return aw.updateImportEqualsDeclaration(e,t,e.isTypeOnly,e.name,e.moduleReference);case 244:return Tn.fail();default:return Tn.assertNever(e,`Unexpected declaration kind ${e.kind}`)}}function d4(e){return aw.createExpressionStatement(aw.createBinaryExpression(aw.createPropertyAccessExpression(aw.createIdentifier("exports"),aw.createIdentifier(e)),64,aw.createIdentifier(e)))}function p4(e){switch(e.kind){case 262:case 263:return[e.name.text];case 243:return $(e.declarationList.declarations,e=>QN(e.name)?e.name.text:void 0);case 267:case 266:case 265:case 264:case 271:return p;case 244:return Tn.fail("Can't export an ExpressionStatement");default:return Tn.assertNever(e,`Unexpected decl kind ${e.kind}`)}}function f4(e,t,n){switch(e.kind){case 272:{const r=e.importClause;if(!r)return;const i=r.name&&n(r.name)?r.name:void 0,o=r.namedBindings&&function(e,t){if(274===e.kind)return t(e.name)?e:void 0;{const n=e.elements.filter(e=>t(e.name));return n.length?aw.createNamedImports(n):void 0}}(r.namedBindings,n);return i||o?aw.createImportDeclaration(void 0,aw.createImportClause(r.isTypeOnly,i,o),aZ(t),void 0):void 0}case 271:return n(e.name)?e:void 0;case 260:{const r=function(e,t){switch(e.kind){case 80:return t(e)?e:void 0;case 207:return e;case 206:{const n=e.elements.filter(e=>e.propertyName||!QN(e.name)||t(e.name));return n.length?aw.createObjectBindingPattern(n):void 0}}}(e.name,n);return r?function(e,t,n,r=2){return aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(e,void 0,t,n)],r))}(r,e.type,r4(t),e.parent.flags):void 0}default:return Tn.assertNever(e,`Unexpected import kind ${e.kind}`)}}function m4(e){return RP(e)?dt(e.expression.left.name,QN):dt(e.name,QN)}function g4(e){switch(e.kind){case 260:return e.parent.parent;case 208:return g4(pt(e.parent.parent,e=>eE(e)||eP(e)));default:return e}}function h4(e,t,n,r,i){if(!c4(e,t,i,n))if(i)RP(t)||r.insertExportModifier(e,t);else{const n=p4(t);0!==n.length&&r.insertNodesAfter(e,t,n.map(d4))}}function y4(e,t,n,r){const i=t.getTypeChecker();if(r){const t=S4(e,r.all,i),s=Vo(e.fileName),c=mT(e.fileName),l=Yo(s,function(e,t,n,r){let i=e;for(let o=1;;o++){const a=Yo(n,i+t);if(!r.fileExists(a))return i;i=`${e}.${o}`}}((o=t.oldFileImportsFromTargetFile,a=t.movedSymbols,gd(o,lY)||gd(a,lY)||"newFile"),c,s,n))+c;return l}var o,a;return""}function v4(e){const t=function(e){const{file:t}=e,n=BQ(n0(e)),{statements:r}=t;let i=N(r,e=>e.end>n.pos);if(-1===i)return;const o=A4(t,r[i]);o&&(i=o.start);let a=N(r,e=>e.end>=n.end,i);-1!==a&&n.end<=r[a].getStart()&&a--;const s=A4(t,r[a]);return s&&(a=s.end),{toMove:r.slice(i,-1===a?r.length:a+1),afterLast:-1===a?void 0:r[a+1]}}(e);if(void 0===t)return;const n=[],r=[],{toMove:i,afterLast:o}=t;return te(i,x4,(e,t)=>{for(let r=e;r!!(2&e.transformFlags))}function x4(e){return!function(e){switch(e.kind){case 272:return!0;case 271:return!Wv(e,32);case 243:return e.declarationList.declarations.every(e=>!!e.initializer&&$m(e.initializer,!0));default:return!1}}(e)&&!vf(e)}function S4(e,t,n,r=new Set){var i;const o=new Set,a=new Map,s=new Map,c=function(e){if(void 0===e)return;const t=n.getJsxNamespace(e),r=n.resolveName(t,e,1920,!0);return r&&ee(r.declarations,w4)?r:void 0}(b4(t));c&&a.set(c,[!1,dt(null==(i=c.declarations)?void 0:i[0],e=>SE(e)||pE(e)||vE(e)||uE(e)||eP(e)||eE(e))]);for(const e of t)C4(e,e=>{o.add(Tn.checkDefined(RP(e)?n.getSymbolAtLocation(e.expression.left):e.symbol,"Need a symbol here"))});const l=new Set;for(const i of t)T4(i,n,(t,i)=>{if(t.declarations&&!k4(n,t))if(r.has(kx(t,n)))l.add(t);else for(const n of t.declarations)if(w4(n)){const e=a.get(t);a.set(t,[(void 0===e||e)&&i,dt(n,e=>SE(e)||pE(e)||vE(e)||uE(e)||eP(e)||eE(e))])}else D4(n)&&P4(n)===e&&!o.has(t)&&s.set(t,i)});for(const e of a.keys())l.add(e);const _=new Map;for(const r of e.statements)E(t,r)||(c&&2&r.transformFlags&&l.delete(c),T4(r,n,(e,t)=>{o.has(e)&&_.set(e,t),l.delete(e)}));return{movedSymbols:o,targetFileImportsFromOldFile:s,oldFileImportsFromTargetFile:_,oldImportsNeededByTargetFile:a,unusedImportsFromOldFile:l}}function k4(e,t){return!!e.resolveName(t.name,void 0,788968,!1)}function T4(e,t,n){e.forEachChild(function e(r){if(QN(r)&&!yh(r)){const e=t.getSymbolAtLocation(r);e&&n(e,OT(r))}else r.forEachChild(e)})}function C4(e,t){switch(e.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return t(e);case 243:return v(e.declarationList.declarations,e=>E4(e.name,t));case 244:{const{expression:n}=e;return yP(n)&&1===dg(n)?t(e):void 0}}}function w4(e){switch(e.kind){case 271:case 276:case 273:case 274:return!0;case 260:return N4(e);case 208:return eE(e.parent.parent)&&N4(e.parent.parent);default:return!1}}function N4(e){return QE(e.parent.parent.parent)&&!!e.initializer&&$m(e.initializer,!0)}function D4(e){return F4(e)&&QE(e.parent)||eE(e)&&QE(e.parent.parent.parent)}function P4(e){return eE(e)?e.parent.parent.parent:e.parent}function E4(e,t){switch(e.kind){case 80:return t(pt(e.parent,e=>eE(e)||eP(e)));case 207:case 206:return v(e.elements,e=>TP(e)?void 0:E4(e.name,t));default:return Tn.assertNever(e,`Unexpected name kind ${e.kind}`)}}function F4(e){switch(e.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return!0;default:return!1}}function A4(e,t){if(g_(t)){const n=t.symbol.declarations;if(void 0===n||g(n)<=1||!E(n,t))return;const r=n[0],i=n[g(n)-1],o=$(n,t=>Dd(t)===e&&wu(t)?t:void 0),a=N(e.statements,e=>e.end>=i.end);return{toMove:o,start:N(e.statements,e=>e.end>=r.end),end:a}}}function I4(e,t,n){const r=new Set;for(const t of e.imports){const e=Pg(t);if(dE(e)&&e.importClause&&e.importClause.namedBindings&&xE(e.importClause.namedBindings))for(const t of e.importClause.namedBindings.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(kx(e,n))}if(Hm(e.parent)&&YD(e.parent.name))for(const t of e.parent.name.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(kx(e,n))}}for(const i of t)T4(i,n,t=>{const i=kx(t,n);i.valueDeclaration&&Dd(i.valueDeclaration).path===e.path&&r.add(i)});return r}function O4(e){return void 0!==e.error}function j4(e,t){return!t||e.substr(0,t.length)===t}function L4(e,t,n,r){return!rP(e)||S_(t)||n.resolveName(e.name.text,e,111551,!1)||YN(e.name)||Nc(e.name)?hZ(S_(t)?"newProperty":"newLocal",r):e.name.text}function M4(e,t,n,r,i,o){t.forEach(([e,t],n)=>{var i;const a=kx(n,r);r.isUnknownSymbol(a)?o.addVerbatimImport(Tn.checkDefined(t??xc(null==(i=n.declarations)?void 0:i[0],Fp))):o.addImportFromExportedSymbol(a,e,t)}),s4(n,e.fileName,o,i)}b6(W6,{kinds:[H6.kind],getAvailableActions:function(e,t){const n=e.file,r=v4(e);if(!t)return p;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=xc(YX(n,e.startPosition),w0),r=xc(YX(n,e.endPosition),w0);if(t&&!QE(t)&&r&&!QE(r))return p}if(e.preferences.allowTextChangesInNewFiles&&r){const e={start:{line:ns(n,r.all[0].getStart(n)).line,offset:ns(n,r.all[0].getStart(n)).character},end:{line:ns(n,Ee(r.all).end).line,offset:ns(n,Ee(r.all).end).character}};return[{name:W6,description:$6,actions:[{...H6,range:e}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:W6,description:$6,actions:[{...H6,notApplicableReason:lS(Ca.Selection_is_not_a_valid_statement_or_statements)}]}]:p},getEditsForAction:function(e,t,n){Tn.assert(t===W6,"Wrong refactor invoked");const r=Tn.checkDefined(v4(e)),{host:i,program:o}=e;Tn.assert(n,"No interactive refactor arguments available");const a=n.targetFile;if(Qk(a)||Yk(a)){if(i.fileExists(a)&&void 0===o.getSourceFile(a))return K6(lS(Ca.Cannot_move_statements_to_the_selected_file));const t=tde.ChangeTracker.with(e,t=>function(e,t,n,r,i,o,a,s){const c=r.getTypeChecker(),l=!a.fileExists(n),_=l?N0(n,t.externalModuleIndicator?99:t.commonJsModuleIndicator?1:void 0,r,a):Tn.checkDefined(r.getSourceFile(n)),u=Q5.createImportAdder(t,e.program,e.preferences,e.host),d=Q5.createImportAdder(_,e.program,e.preferences,e.host);G6(t,_,S4(t,i.all,c,l?void 0:I4(_,i.all,c)),o,i,r,a,s,d,u),l&&X6(r,o,t.fileName,n,Zy(a))}(e,e.file,n.targetFile,e.program,r,t,e.host,e.preferences));return{edits:t,renameFilename:void 0,renameLocation:void 0}}return K6(lS(Ca.Cannot_move_to_file_selected_file_is_invalid))}});var R4="Inline variable",B4=lS(Ca.Inline_variable),J4={name:R4,description:B4,kind:"refactor.inline.variable"};function z4(e,t,n,r){var i,o;const a=r.getTypeChecker(),s=XX(e,t),c=s.parent;if(QN(s)){if(yx(c)&&zf(c)&&QN(c.name)){if(1!==(null==(i=a.getMergedSymbol(c.symbol).declarations)?void 0:i.length))return{error:lS(Ca.Variables_with_multiple_declarations_cannot_be_inlined)};if(q4(c))return;const t=U4(c,a,e);return t&&{references:t,declaration:c,replacement:c.initializer}}if(n){let t=a.resolveName(s.text,s,111551,!1);if(t=t&&a.getMergedSymbol(t),1!==(null==(o=null==t?void 0:t.declarations)?void 0:o.length))return{error:lS(Ca.Variables_with_multiple_declarations_cannot_be_inlined)};const n=t.declarations[0];if(!yx(n)||!zf(n)||!QN(n.name))return;if(q4(n))return;const r=U4(n,a,e);return r&&{references:r,declaration:n,replacement:n.initializer}}return{error:lS(Ca.Could_not_find_variable_to_inline)}}}function q4(e){return ee(pt(e.parent.parent,LP).modifiers,ZN)}function U4(e,t,n){const r=[],i=Ice.Core.eachSymbolReferenceInFile(e.name,t,n,t=>!(!Ice.isWriteAccessForReference(t)||KE(t.parent))||(!(!wE(t.parent)&&!kE(t.parent))||(!!AD(t.parent)||(!!$s(e,t.pos)||void r.push(t)))));return 0===r.length||i?void 0:r}function V4(e,t){t=aZ(t);const{parent:n}=e;return nu(n)&&(by(t){for(const t of a)e.replaceNode(n,t,V4(t,c));e.delete(n,s)})}}});var W4="Move to a new file",$4=lS(Ca.Move_to_a_new_file),H4={name:W4,description:$4,kind:"refactor.move.newFile"};b6(W4,{kinds:[H4.kind],getAvailableActions:function(e){const t=v4(e),n=e.file;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=xc(YX(n,e.startPosition),w0),r=xc(YX(n,e.endPosition),w0);if(t&&!QE(t)&&r&&!QE(r))return p}if(e.preferences.allowTextChangesInNewFiles&&t){const n=e.file,r={start:{line:ns(n,t.all[0].getStart(n)).line,offset:ns(n,t.all[0].getStart(n)).character},end:{line:ns(n,Ee(t.all).end).line,offset:ns(n,Ee(t.all).end).character}};return[{name:W4,description:$4,actions:[{...H4,range:r}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:W4,description:$4,actions:[{...H4,notApplicableReason:lS(Ca.Selection_is_not_a_valid_statement_or_statements)}]}]:p},getEditsForAction:function(e,t){Tn.assert(t===W4,"Wrong refactor invoked");const n=Tn.checkDefined(v4(e)),r=tde.ChangeTracker.with(e,t=>function(e,t,n,r,i,o,a){const s=t.getTypeChecker(),c=S4(e,n.all,s),l=y4(e,t,i,n),_=N0(l,e.externalModuleIndicator?99:e.commonJsModuleIndicator?1:void 0,t,i),u=Q5.createImportAdder(e,o.program,o.preferences,o.host),d=Q5.createImportAdder(_,o.program,o.preferences,o.host);G6(e,_,c,r,n,t,i,a,d,u),X6(t,r,e.fileName,l,Zy(i))}(e.file,e.program,n,t,e.host,e,e.preferences));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var K4={},G4="Convert overload list to single signature",X4=lS(Ca.Convert_overload_list_to_single_signature),Q4={name:G4,description:X4,kind:"refactor.rewrite.function.overloadList"};function Y4(e){switch(e.kind){case 173:case 174:case 179:case 176:case 180:case 262:return!0}return!1}function Z4(e,t,n){const r=xc(YX(e,t),Y4);if(!r)return;if(g_(r)&&r.body&&wX(r.body,t))return;const i=n.getTypeChecker(),o=r.symbol;if(!o)return;const a=o.declarations;if(g(a)<=1)return;if(!T(a,t=>Dd(t)===e))return;if(!Y4(a[0]))return;const s=a[0].kind;if(!T(a,e=>e.kind===s))return;const c=a;if(ee(c,e=>!!e.typeParameters||ee(e.parameters,e=>!!e.modifiers||!QN(e.name))))return;const l=$(c,e=>i.getSignatureFromDeclaration(e));if(g(l)!==g(a))return;const _=i.getReturnTypeOfSignature(l[0]);return T(l,e=>i.getReturnTypeOfSignature(e)===_)?c:void 0}b6(G4,{kinds:[Q4.kind],getEditsForAction:function(e){const{file:t,startPosition:n,program:r}=e,i=Z4(t,n,r);if(!i)return;const o=r.getTypeChecker(),a=i[i.length-1];let s=a;switch(a.kind){case 173:s=aw.updateMethodSignature(a,a.modifiers,a.name,a.questionToken,a.typeParameters,c(i),a.type);break;case 174:s=aw.updateMethodDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.questionToken,a.typeParameters,c(i),a.type,a.body);break;case 179:s=aw.updateCallSignature(a,a.typeParameters,c(i),a.type);break;case 176:s=aw.updateConstructorDeclaration(a,a.modifiers,c(i),a.body);break;case 180:s=aw.updateConstructSignature(a,a.typeParameters,c(i),a.type);break;case 262:s=aw.updateFunctionDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.typeParameters,c(i),a.type,a.body);break;default:return Tn.failBadSyntaxKind(a,"Unhandled signature kind in overload list conversion refactoring")}if(s===a)return;return{renameFilename:void 0,renameLocation:void 0,edits:tde.ChangeTracker.with(e,e=>{e.replaceNodeRange(t,i[0],i[i.length-1],s)})};function c(e){const t=e[e.length-1];return g_(t)&&t.body&&(e=e.slice(0,e.length-1)),aw.createNodeArray([aw.createParameterDeclaration(void 0,aw.createToken(26),"args",void 0,aw.createUnionTypeNode(M(e,l)))])}function l(e){const t=M(e.parameters,_);return dw(aw.createTupleTypeNode(t),ee(t,e=>!!g(Tw(e)))?0:1)}function _(e){Tn.assert(QN(e.name));const t=vI(aw.createNamedTupleMember(e.dotDotDotToken,e.name,e.questionToken,e.type||aw.createKeywordTypeNode(133)),e),n=e.symbol&&e.symbol.getDocumentationComment(o);if(n){const e=_5(n);e.length&&Cw(t,[{text:`*\n${e.split("\n").map(e=>` * ${e}`).join("\n")}\n `,kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return t}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r}=e;return Z4(t,n,r)?[{name:G4,description:X4,actions:[Q4]}]:p}});var e3="Add or remove braces in an arrow function",t3=lS(Ca.Add_or_remove_braces_in_an_arrow_function),n3={name:"Add braces to arrow function",description:lS(Ca.Add_braces_to_arrow_function),kind:"refactor.rewrite.arrow.braces.add"},r3={name:"Remove braces from arrow function",description:lS(Ca.Remove_braces_from_arrow_function),kind:"refactor.rewrite.arrow.braces.remove"};function i3(e,t,n=!0,r){const i=YX(e,t),o=rm(i);if(!o)return{error:lS(Ca.Could_not_find_a_containing_arrow_function)};if(!uP(o))return{error:lS(Ca.Containing_function_is_not_an_arrow_function)};if(TX(o,i)&&(!TX(o.body,i)||n)){if(j4(n3.kind,r)&&nu(o.body))return{func:o,addBraces:!0,expression:o.body};if(j4(r3.kind,r)&&jP(o.body)&&1===o.body.statements.length){const e=Ne(o.body.statements);if(HP(e)){return{func:o,addBraces:!1,expression:e.expression&&nP(Hx(e.expression,!1))?aw.createParenthesizedExpression(e.expression):e.expression,returnStatement:e}}}}}b6(e3,{kinds:[r3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=i3(n,r);Tn.assert(i&&!O4(i),"Expected applicable refactor info");const{expression:o,returnStatement:a,func:s}=i;let c;if(t===n3.name){const e=aw.createReturnStatement(o);c=aw.createBlock([e],!0),vZ(o,e,n,3,!0)}else if(t===r3.name&&a){const e=o||aw.createVoidZero();c=TZ(e)?aw.createParenthesizedExpression(e):e,xZ(a,c,n,3,!1),vZ(a,c,n,3,!1),bZ(a,c,n,3,!1)}else Tn.fail("invalid action");return{renameFilename:void 0,renameLocation:void 0,edits:tde.ChangeTracker.with(e,e=>{e.replaceNode(n,s.body,c)})}},getAvailableActions:function(e){const{file:t,startPosition:n,triggerReason:r}=e,i=i3(t,n,"invoked"===r);if(!i)return p;if(!O4(i))return[{name:e3,description:t3,actions:[i.addBraces?n3:r3]}];if(e.preferences.provideRefactorNotApplicableReason)return[{name:e3,description:t3,actions:[{...n3,notApplicableReason:i.error},{...r3,notApplicableReason:i.error}]}];return p}});var o3={},a3="Convert arrow function or function expression",s3=lS(Ca.Convert_arrow_function_or_function_expression),c3={name:"Convert to anonymous function",description:lS(Ca.Convert_to_anonymous_function),kind:"refactor.rewrite.function.anonymous"},l3={name:"Convert to named function",description:lS(Ca.Convert_to_named_function),kind:"refactor.rewrite.function.named"},_3={name:"Convert to arrow function",description:lS(Ca.Convert_to_arrow_function),kind:"refactor.rewrite.function.arrow"};function u3(e){let t=!1;return e.forEachChild(function e(n){xX(n)?t=!0:S_(n)||nE(n)||_P(n)||KI(n,e)}),t}function d3(e,t,n){const r=YX(e,t),i=n.getTypeChecker(),o=function(e,t,n){if(!function(e){return eE(e)||tE(e)&&1===e.declarations.length}(n))return;const r=(eE(n)?n:Ne(n.declarations)).initializer;if(r&&(uP(r)||_P(r)&&!f3(e,t,r)))return r;return}(e,i,r.parent);if(o&&!u3(o.body)&&!i.containsArgumentsReference(o))return{selectedVariableDeclaration:!0,func:o};const a=rm(r);if(a&&(_P(a)||uP(a))&&!TX(a.body,r)&&!u3(a.body)&&!i.containsArgumentsReference(a)){if(_P(a)&&f3(e,i,a))return;return{selectedVariableDeclaration:!1,func:a}}}function p3(e){if(nu(e)){const t=aw.createReturnStatement(e),n=e.getSourceFile();return vI(t,e),uZ(t),xZ(e,t,n,void 0,!0),aw.createBlock([t],!0)}return e}function f3(e,t,n){return!!n.name&&Ice.Core.isSymbolReferencedInFile(n.name,t,e)}b6(a3,{kinds:[c3.kind,l3.kind,_3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r,program:i}=e,o=d3(n,r,i);if(!o)return;const{func:a}=o,s=[];switch(t){case c3.name:s.push(...function(e,t){const{file:n}=e,r=p3(t.body),i=aw.createFunctionExpression(t.modifiers,t.asteriskToken,void 0,t.typeParameters,t.parameters,t.type,r);return tde.ChangeTracker.with(e,e=>e.replaceNode(n,t,i))}(e,a));break;case l3.name:const t=function(e){const t=e.parent;if(!eE(t)||!zf(t))return;const n=t.parent,r=n.parent;return tE(n)&&LP(r)&&QN(t.name)?{variableDeclaration:t,variableDeclarationList:n,statement:r,name:t.name}:void 0}(a);if(!t)return;s.push(...function(e,t,n){const{file:r}=e,i=p3(t.body),{variableDeclaration:o,variableDeclarationList:a,statement:s,name:c}=n;dZ(s);const l=32&fc(o)|rb(t),_=aw.createModifiersFromModifierFlags(l),u=aw.createFunctionDeclaration(g(_)?_:void 0,t.asteriskToken,c,t.typeParameters,t.parameters,t.type,i);return 1===a.declarations.length?tde.ChangeTracker.with(e,e=>e.replaceNode(r,s,u)):tde.ChangeTracker.with(e,e=>{e.delete(r,o),e.insertNodeAfter(r,s,u)})}(e,a,t));break;case _3.name:if(!_P(a))return;s.push(...function(e,t){const{file:n}=e,r=t.body.statements,i=r[0];let o;!function(e,t){return 1===e.statements.length&&HP(t)&&!!t.expression}(t.body,i)?o=t.body:(o=i.expression,uZ(o),fZ(i,o));const a=aw.createArrowFunction(t.modifiers,t.typeParameters,t.parameters,t.type,aw.createToken(39),o);return tde.ChangeTracker.with(e,e=>e.replaceNode(n,t,a))}(e,a));break;default:return Tn.fail("invalid action")}return{renameFilename:void 0,renameLocation:void 0,edits:s}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r,kind:i}=e,o=d3(t,n,r);if(!o)return p;const{selectedVariableDeclaration:a,func:s}=o,c=[],l=[];if(j4(l3.kind,i)){const e=a||uP(s)&&eE(s.parent)?void 0:lS(Ca.Could_not_convert_to_named_function);e?l.push({...l3,notApplicableReason:e}):c.push(l3)}if(j4(c3.kind,i)){const e=!a&&uP(s)?void 0:lS(Ca.Could_not_convert_to_anonymous_function);e?l.push({...c3,notApplicableReason:e}):c.push(c3)}if(j4(_3.kind,i)){const e=_P(s)?void 0:lS(Ca.Could_not_convert_to_arrow_function);e?l.push({..._3,notApplicableReason:e}):c.push(_3)}return[{name:a3,description:s3,actions:0===c.length&&e.preferences.provideRefactorNotApplicableReason?l:c}]}});var m3={},g3="Convert parameters to destructured object",h3=lS(Ca.Convert_parameters_to_destructured_object),y3={name:g3,description:h3,kind:"refactor.rewrite.parameters.toDestructured"};function v3(e,t){const n=T5(e);if(n){const e=t.getContextualTypeForObjectLiteralElement(n),r=null==e?void 0:e.getSymbol();if(r&&!(6&xx(r)))return r}}function b3(e){const t=e.node;return SE(t.parent)||pE(t.parent)||uE(t.parent)||vE(t.parent)||wE(t.parent)||kE(t.parent)?t:void 0}function x3(e){if(ku(e.node.parent))return e.node}function S3(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 213:case 214:const e=dt(n,K_);if(e&&e.expression===t)return e;break;case 211:const r=dt(n,rP);if(r&&r.parent&&r.name===t){const e=dt(r.parent,K_);if(e&&e.expression===r)return e}break;case 212:const i=dt(n,iP);if(i&&i.parent&&i.argumentExpression===t){const e=dt(i.parent,K_);if(e&&e.expression===i)return e}}}}function k3(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 211:const e=dt(n,rP);if(e&&e.expression===t)return e;break;case 212:const r=dt(n,iP);if(r&&r.expression===t)return r}}}function T3(e){const t=e.node;if(2===$G(t)||Tb(t.parent))return t}function C3(e,t,n){const r=QX(e,t),i=im(r);if(!function(e){const t=xc(e,ju);if(t){const e=xc(t,e=>!ju(e));return!!e&&g_(e)}return!1}(r))return!(i&&function(e,t){var n;if(!function(e,t){return function(e){if(E3(e))return e.length-1;return e.length}(e)>=1&&T(e,e=>function(e,t){if(Qu(e)){const n=t.getTypeAtLocation(e);if(!t.isArrayType(n)&&!t.isTupleType(n))return!1}return!e.modifiers&&QN(e.name)}(e,t))}(e.parameters,t))return!1;switch(e.kind){case 262:return D3(e)&&N3(e,t);case 174:if(nP(e.parent)){const r=v3(e.name,t);return 1===(null==(n=null==r?void 0:r.declarations)?void 0:n.length)&&N3(e,t)}return N3(e,t);case 176:return rE(e.parent)?D3(e.parent)&&N3(e,t):P3(e.parent.parent)&&N3(e,t);case 218:case 219:return P3(e.parent)}return!1}(i,n)&&TX(i,r))||i.body&&TX(i.body,r)?void 0:i}function w3(e){return vD(e)&&(iE(e.parent)||ID(e.parent))}function N3(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function D3(e){if(!e.name){return!!gY(e,90)}return!0}function P3(e){return eE(e)&&df(e)&&QN(e.name)&&!e.type}function E3(e){return e.length>0&&xX(e[0].name)}function F3(e){return E3(e)&&(e=aw.createNodeArray(e.slice(1),e.hasTrailingComma)),e}function A3(e,t){const n=F3(e.parameters),r=Qu(Ee(n)),i=M(r?t.slice(0,n.length-1):t,(e,t)=>{const r=O3(n[t]),i=(o=r,QN(a=e)&&ey(a)===o?aw.createShorthandPropertyAssignment(o):aw.createPropertyAssignment(o,a));var o,a;return uZ(i.name),HE(i)&&uZ(i.initializer),fZ(e,i),i});if(r&&t.length>=n.length){const e=t.slice(n.length-1),r=aw.createPropertyAssignment(O3(Ee(n)),aw.createArrayLiteralExpression(e));i.push(r)}return aw.createObjectLiteralExpression(i,!1)}function I3(e,t,n){const r=t.getTypeChecker(),i=F3(e.parameters),o=M(i,function(e){const t=aw.createBindingElement(void 0,void 0,O3(e),Qu(e)&&u(e)?aw.createArrayLiteralExpression():e.initializer);uZ(t),e.initializer&&t.initializer&&fZ(e.initializer,t.initializer);return t}),a=aw.createObjectBindingPattern(o),s=function(e){const t=M(e,_);return pw(aw.createTypeLiteralNode(t),1)}(i);let c;T(i,u)&&(c=aw.createObjectLiteralExpression());const l=aw.createParameterDeclaration(void 0,void 0,a,void 0,s,c);if(E3(e.parameters)){const t=e.parameters[0],n=aw.createParameterDeclaration(void 0,void 0,t.name,void 0,t.type);return uZ(n.name),fZ(t.name,n.name),t.type&&(uZ(n.type),fZ(t.type,n.type)),aw.createNodeArray([n,l])}return aw.createNodeArray([l]);function _(e){let i=e.type;var o;i||!e.initializer&&!Qu(e)||(o=e,i=AZ(r.getTypeAtLocation(o),o,t,n));const a=aw.createPropertySignature(void 0,O3(e),u(e)?aw.createToken(58):e.questionToken,i);return uZ(a),fZ(e.name,a.name),e.type&&a.type&&fZ(e.type,a.type),a}function u(e){if(Qu(e)){const t=r.getTypeAtLocation(e);return!r.isTupleType(t)}return r.isOptionalParameter(e)}}function O3(e){return ey(e.name)}b6(g3,{kinds:[y3.kind],getEditsForAction:function(e,t){Tn.assert(t===g3,"Unexpected action name");const{file:n,startPosition:r,program:i,cancellationToken:o,host:a}=e,s=C3(n,r,i.getTypeChecker());if(!s||!o)return;const c=function(e,t,n){const r=function(e){switch(e.kind){case 262:if(e.name)return[e.name];return[Tn.checkDefined(gY(e,90),"Nameless function declaration should be a default export")];case 174:return[e.name];case 176:const t=Tn.checkDefined(RX(e,137,e.getSourceFile()),"Constructor declaration should have constructor keyword");if(231===e.parent.kind){return[e.parent.parent.name,t]}return[t];case 219:return[e.parent.name];case 218:return e.name?[e.name,e.parent.name]:[e.parent.name];default:return Tn.assertNever(e,`Unexpected function declaration kind ${e.kind}`)}}(e),i=SD(e)?function(e){switch(e.parent.kind){case 263:const t=e.parent;if(t.name)return[t.name];return[Tn.checkDefined(gY(t,90),"Nameless class declaration should be a default export")];case 231:const n=e.parent,r=e.parent.parent,i=n.name;return i?[i,r.name]:[r.name]}}(e):[],o=oe([...r,...i],Pt),a=t.getTypeChecker(),s=z(o,e=>Ice.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n)),c=l(s);T(c.declarations,e=>E(o,e))||(c.valid=!1);return c;function l(t){const n={accessExpressions:[],typeUsages:[]},o={functionCalls:[],declarations:[],classReferences:n,valid:!0},s=M(r,_),c=M(i,_),l=SD(e),u=M(r,e=>v3(e,a));for(const r of t){if(r.kind===Ice.EntryKind.Span){o.valid=!1;continue}if(E(u,_(r.node))){if(w3(r.node.parent)){o.signature=r.node.parent;continue}const e=S3(r);if(e){o.functionCalls.push(e);continue}}const t=v3(r.node,a);if(t&&E(u,t)){const e=x3(r);if(e){o.declarations.push(e);continue}}if(E(s,_(r.node))||GG(r.node)){if(b3(r))continue;const e=x3(r);if(e){o.declarations.push(e);continue}const t=S3(r);if(t){o.functionCalls.push(t);continue}}if(l&&E(c,_(r.node))){if(b3(r))continue;const t=x3(r);if(t){o.declarations.push(t);continue}const i=k3(r);if(i){n.accessExpressions.push(i);continue}if(rE(e.parent)){const e=T3(r);if(e){n.typeUsages.push(e);continue}}}o.valid=!1}return o}function _(e){const t=a.getSymbolAtLocation(e);return t&&tZ(t,a)}}(s,i,o);if(c.valid){const t=tde.ChangeTracker.with(e,e=>function(e,t,n,r,i,o){const a=o.signature,s=M(I3(i,t,n),e=>aZ(e));if(a){l(a,M(I3(a,t,n),e=>aZ(e)))}l(i,s);const c=ce(o.functionCalls,(e,t)=>It(e.pos,t.pos));for(const e of c)if(e.arguments&&e.arguments.length){const t=aZ(A3(i,e.arguments),!0);r.replaceNodeRange(Dd(e),Ne(e.arguments),Ee(e.arguments),t,{leadingTriviaOption:tde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:tde.TrailingTriviaOption.Include})}function l(t,n){r.replaceNodeRangeWithNodes(e,Ne(t.parameters),Ee(t.parameters),n,{joiner:", ",indentation:0,leadingTriviaOption:tde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:tde.TrailingTriviaOption.Include})}}(n,i,a,e,s,c));return{renameFilename:void 0,renameLocation:void 0,edits:t}}return{edits:[]}},getAvailableActions:function(e){const{file:t,startPosition:n}=e;if(Bm(t))return p;return C3(t,n,e.program.getTypeChecker())?[{name:g3,description:h3,actions:[y3]}]:p}});var j3={},L3="Convert to template string",M3=lS(Ca.Convert_to_template_string),R3={name:L3,description:M3,kind:"refactor.rewrite.string"};function B3(e,t){const n=YX(e,t),r=z3(n);return!q3(r).isValidConcatenation&&lP(r.parent)&&yP(r.parent.parent)?r.parent.parent:n}function J3(e,t){const n=z3(t),r=e.file,i=function({nodes:e,operators:t},n){const r=U3(t,n),i=V3(e,n,r),[o,a,s,c]=H3(0,e);if(o===e.length){const e=aw.createNoSubstitutionTemplateLiteral(a,s);return i(c,e),e}const l=[],_=aw.createTemplateHead(a,s);i(c,_);for(let t=o;t{K3(e);const r=t===n.templateSpans.length-1,i=e.literal.text+(r?a:""),o=$3(e.literal)+(r?s:"");return aw.createTemplateSpan(e.expression,_&&r?aw.createTemplateTail(i,o):aw.createTemplateMiddle(i,o))});l.push(...e)}else{const e=_?aw.createTemplateTail(a,s):aw.createTemplateMiddle(a,s);i(c,e),l.push(aw.createTemplateSpan(n,e))}}return aw.createTemplateExpression(_,l)}(q3(n),r),o=ws(r.text,n.end);if(o){const t=o[o.length-1],a={pos:o[0].pos,end:t.end};return tde.ChangeTracker.with(e,e=>{e.deleteRange(r,a),e.replaceNode(r,n,i)})}return tde.ChangeTracker.with(e,e=>e.replaceNode(r,n,i))}function z3(e){return xc(e.parent,e=>{switch(e.kind){case 211:case 212:return!1;case 228:case 226:return!(yP(e.parent)&&(t=e.parent,64!==t.operatorToken.kind&&65!==t.operatorToken.kind));default:return"quit"}var t})||e}function q3(e){const t=e=>{if(!yP(e))return{nodes:[e],operators:[],validOperators:!0,hasString:ON(e)||MN(e)};const{nodes:n,operators:r,hasString:i,validOperators:o}=t(e.left);if(!(i||ON(e.right)||bP(e.right)))return{nodes:[e],operators:[],hasString:!1,validOperators:!0};const a=40===e.operatorToken.kind,s=o&&a;return n.push(e.right),r.push(e.operatorToken),{nodes:n,operators:r,hasString:!0,validOperators:s}},{nodes:n,operators:r,validOperators:i,hasString:o}=t(e);return{nodes:n,operators:r,isValidConcatenation:i&&o}}b6(L3,{kinds:[R3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=B3(n,r);if(t===M3)return{edits:J3(e,i)};return Tn.fail("invalid action")},getAvailableActions:function(e){const{file:t,startPosition:n}=e,r=z3(B3(t,n)),i=ON(r),o={name:L3,description:M3,actions:[]};if(i&&"invoked"!==e.triggerReason)return p;if(Em(r)&&(i||yP(r)&&q3(r).isValidConcatenation))return o.actions.push(R3),[o];if(e.preferences.provideRefactorNotApplicableReason)return o.actions.push({...R3,notApplicableReason:lS(Ca.Can_only_convert_string_concatenations_and_string_literals)}),[o];return p}});var U3=(e,t)=>(n,r)=>{n(r,i)=>{for(;r.length>0;){const o=r.shift();bZ(e[o],i,t,3,!1),n(o,i)}};function W3(e){return e.replace(/\\.|[$`]/g,e=>"\\"===e[0]?e:"\\"+e)}function $3(e){const t=RN(e)||BN(e)?-2:-1;return tp(e).slice(1,t)}function H3(e,t){const n=[];let r="",i="";for(;e=a.pos?s.getEnd():a.getEnd()),l=o?function(e){for(;e.parent;){if(t7(e)&&!t7(e.parent))return e;e=e.parent}return}(a):function(e,t){for(;e.parent;){if(t7(e)&&0!==t.length&&e.end>=t.start+t.length)return e;e=e.parent}return}(a,c),_=l&&t7(l)?function(e){if(e7(e))return e;if(LP(e)){const t=zg(e),n=null==t?void 0:t.initializer;return n&&e7(n)?n:void 0}return e.expression&&e7(e.expression)?e.expression:void 0}(l):void 0;if(!_)return{error:lS(Ca.Could_not_find_convertible_access_expression)};const u=r.getTypeChecker();return vP(_)?function(e,t){const n=e.condition,r=a7(e.whenTrue);if(!r||t.isNullableType(t.getTypeAtLocation(r)))return{error:lS(Ca.Could_not_find_convertible_access_expression)};if((rP(n)||QN(n))&&i7(n,r.expression))return{finalExpression:r,occurrences:[n],expression:e};if(yP(n)){const t=r7(r.expression,n);return t?{finalExpression:r,occurrences:t,expression:e}:{error:lS(Ca.Could_not_find_matching_access_expressions)}}}(_,u):function(e){if(56!==e.operatorToken.kind)return{error:lS(Ca.Can_only_convert_logical_AND_access_chains)};const t=a7(e.right);if(!t)return{error:lS(Ca.Could_not_find_convertible_access_expression)};const n=r7(t.expression,e.left);return n?{finalExpression:t,occurrences:n,expression:e}:{error:lS(Ca.Could_not_find_matching_access_expressions)}}(_)}function r7(e,t){const n=[];for(;yP(t)&&56===t.operatorToken.kind;){const r=i7(mh(e),mh(t.right));if(!r)break;n.push(r),e=r,t=t.left}const r=i7(e,t);return r&&n.push(r),n.length>0?n:void 0}function i7(e,t){if(QN(t)||rP(t)||iP(t))return function(e,t){for(;(oP(e)||rP(e)||iP(e))&&o7(e)!==o7(t);)e=e.expression;for(;rP(e)&&rP(t)||iP(e)&&iP(t);){if(o7(e)!==o7(t))return!1;e=e.expression,t=t.expression}return QN(e)&&QN(t)&&e.getText()===t.getText()}(e,t)?t:void 0}function o7(e){return QN(e)||Kh(e)?e.getText():rP(e)?o7(e.name):iP(e)?o7(e.argumentExpression):void 0}function a7(e){return yP(e=mh(e))?a7(e.left):(rP(e)||iP(e)||oP(e))&&!Dl(e)?e:void 0}function s7(e,t,n){if(rP(t)||iP(t)||oP(t)){const r=s7(e,t.expression,n),i=n.length>0?n[n.length-1]:void 0,o=(null==i?void 0:i.getText())===t.expression.getText();if(o&&n.pop(),oP(t))return o?aw.createCallChain(r,aw.createToken(29),t.typeArguments,t.arguments):aw.createCallChain(r,t.questionDotToken,t.typeArguments,t.arguments);if(rP(t))return o?aw.createPropertyAccessChain(r,aw.createToken(29),t.name):aw.createPropertyAccessChain(r,t.questionDotToken,t.name);if(iP(t))return o?aw.createElementAccessChain(r,aw.createToken(29),t.argumentExpression):aw.createElementAccessChain(r,t.questionDotToken,t.argumentExpression)}return t}b6(Q3,{kinds:[Z3.kind],getEditsForAction:function(e,t){const n=n7(e);Tn.assert(n&&!O4(n),"Expected applicable refactor info");return{edits:tde.ChangeTracker.with(e,t=>function(e,t,n,r){const{finalExpression:i,occurrences:o,expression:a}=r,s=o[o.length-1],c=s7(t,i,o);c&&(rP(c)||iP(c)||oP(c))&&(yP(a)?n.replaceNodeRange(e,s,i,c):vP(a)&&n.replaceNode(e,a,aw.createBinaryExpression(c,aw.createToken(61),a.whenFalse)))}(e.file,e.program.getTypeChecker(),t,n)),renameFilename:void 0,renameLocation:void 0}},getAvailableActions:function(e){const t=n7(e,"invoked"===e.triggerReason);if(!t)return p;if(!O4(t))return[{name:Q3,description:Y3,actions:[Z3]}];if(e.preferences.provideRefactorNotApplicableReason)return[{name:Q3,description:Y3,actions:[{...Z3,notApplicableReason:t.error}]}];return p}});var c7={};a(c7,{Messages:()=>l7,RangeFacts:()=>m7,getRangeToExtract:()=>g7,getRefactorActionsToExtractSymbol:()=>p7,getRefactorEditsToExtractSymbol:()=>f7});var l7,_7="Extract Symbol",u7={name:"Extract Constant",description:lS(Ca.Extract_constant),kind:"refactor.extract.constant"},d7={name:"Extract Function",description:lS(Ca.Extract_function),kind:"refactor.extract.function"};function p7(e){const t=e.kind,n=g7(e.file,n0(e),"invoked"===e.triggerReason),r=n.targetRange;if(void 0===r){if(!n.errors||0===n.errors.length||!e.preferences.provideRefactorNotApplicableReason)return p;const r=[];return j4(d7.kind,t)&&r.push({name:_7,description:d7.description,actions:[{...d7,notApplicableReason:m(n.errors)}]}),j4(u7.kind,t)&&r.push({name:_7,description:u7.description,actions:[{...u7,notApplicableReason:m(n.errors)}]}),r}const{affectedTextRange:i,extractions:o}=function(e,t){const{scopes:n,affectedTextRange:r,readsAndWrites:{functionErrorsPerScope:i,constantErrorsPerScope:o}}=v7(e,t),a=n.map((e,t)=>{const n=function(e){return g_(e)?"inner function":S_(e)?"method":"function"}(e),r=function(e){return S_(e)?"readonly field":"constant"}(e),a=g_(e)?function(e){switch(e.kind){case 176:return"constructor";case 218:case 262:return e.name?`function '${e.name.text}'`:FZ;case 219:return"arrow function";case 174:return`method '${e.name.getText()}'`;case 177:return`'get ${e.name.getText()}'`;case 178:return`'set ${e.name.getText()}'`;default:Tn.assertNever(e,`Unexpected scope kind ${e.kind}`)}}(e):S_(e)?function(e){return 263===e.kind?e.name?`class '${e.name.text}'`:"anonymous class declaration":e.name?`class expression '${e.name.text}'`:"anonymous class expression"}(e):function(e){return 268===e.kind?`namespace '${e.parent.name.getText()}'`:e.externalModuleIndicator?0:1}(e);let s,c;return 1===a?(s=aS(lS(Ca.Extract_to_0_in_1_scope),[n,"global"]),c=aS(lS(Ca.Extract_to_0_in_1_scope),[r,"global"])):0===a?(s=aS(lS(Ca.Extract_to_0_in_1_scope),[n,"module"]),c=aS(lS(Ca.Extract_to_0_in_1_scope),[r,"module"])):(s=aS(lS(Ca.Extract_to_0_in_1),[n,a]),c=aS(lS(Ca.Extract_to_0_in_1),[r,a])),0!==t||S_(e)||(c=aS(lS(Ca.Extract_to_0_in_enclosing_scope),[r])),{functionExtraction:{description:s,errors:i[t]},constantExtraction:{description:c,errors:o[t]}}});return{affectedTextRange:r,extractions:a}}(r,e);if(void 0===o)return p;const a=[],s=new Map;let c;const l=[],_=new Map;let u,d=0;for(const{functionExtraction:n,constantExtraction:r}of o){if(j4(d7.kind,t)){const t=n.description;0===n.errors.length?s.has(t)||(s.set(t,!0),a.push({description:t,name:`function_scope_${d}`,kind:d7.kind,range:{start:{line:ns(e.file,i.pos).line,offset:ns(e.file,i.pos).character},end:{line:ns(e.file,i.end).line,offset:ns(e.file,i.end).character}}})):c||(c={description:t,name:`function_scope_${d}`,notApplicableReason:m(n.errors),kind:d7.kind})}if(j4(u7.kind,t)){const t=r.description;0===r.errors.length?_.has(t)||(_.set(t,!0),l.push({description:t,name:`constant_scope_${d}`,kind:u7.kind,range:{start:{line:ns(e.file,i.pos).line,offset:ns(e.file,i.pos).character},end:{line:ns(e.file,i.end).line,offset:ns(e.file,i.end).character}}})):u||(u={description:t,name:`constant_scope_${d}`,notApplicableReason:m(r.errors),kind:u7.kind})}d++}const f=[];return a.length?f.push({name:_7,description:lS(Ca.Extract_function),actions:a}):e.preferences.provideRefactorNotApplicableReason&&c&&f.push({name:_7,description:lS(Ca.Extract_function),actions:[c]}),l.length?f.push({name:_7,description:lS(Ca.Extract_constant),actions:l}):e.preferences.provideRefactorNotApplicableReason&&u&&f.push({name:_7,description:lS(Ca.Extract_constant),actions:[u]}),f.length?f:p;function m(e){let t=e[0].messageText;return"string"!=typeof t&&(t=t.messageText),t}}function f7(e,t){const n=g7(e.file,n0(e)).targetRange,r=/^function_scope_(\d+)$/.exec(t);if(r){const t=+r[1];return Tn.assert(isFinite(t),"Expected to parse a finite number from the function scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,functionErrorsPerScope:a,exposedVariableDeclarations:s}}=v7(e,t);return Tn.assert(!a[n].length,"The extraction went missing? How?"),t.cancellationToken.throwIfCancellationRequested(),function(e,t,{usages:n,typeParameterUsages:r,substitutions:i},o,a,s){const c=s.program.getTypeChecker(),l=OS(s.program.getCompilerOptions()),_=Q5.createImportAdder(s.file,s.program,s.preferences,s.host),u=t.getSourceFile(),d=hZ(S_(t)?"newMethod":"newFunction",u),f=zm(t),m=aw.createIdentifier(d);let g;const h=[],y=[];let v;n.forEach((e,n)=>{let r;if(!f){let n=c.getTypeOfSymbolAtLocation(e.symbol,e.node);n=c.getBaseTypeOfLiteralType(n),r=Q5.typeToAutoImportableTypeNode(c,_,n,t,l,1)}const i=aw.createParameterDeclaration(void 0,void 0,n,void 0,r);h.push(i),2===e.usage&&(v||(v=[])).push(e),y.push(aw.createIdentifier(n))});const b=We(r.values(),e=>({type:e,declaration:b7(e,s.startPosition)})),x=b.sort(x7),S=0===x.length?void 0:$(x,({declaration:e})=>e),k=void 0!==S?S.map(e=>aw.createTypeReferenceNode(e.name,void 0)):void 0;if(nu(e)&&!f){const n=c.getContextualType(e);g=c.typeToTypeNode(n,t,1)}const{body:T,returnValueProperty:w}=function(e,t,n,r,i){const o=void 0!==n||t.length>0;if(jP(e)&&!o&&0===r.size)return{body:aw.createBlock(e.statements,!0),returnValueProperty:void 0};let a,s=!1;const c=aw.createNodeArray(jP(e)?e.statements.slice(0):[wu(e)?e:aw.createReturnStatement(mh(e))]);if(o||r.size){const r=oJ(c,l,wu).slice();if(o&&!i&&wu(e)){const e=S7(t,n);1===e.length?r.push(aw.createReturnStatement(e[0].name)):r.push(aw.createReturnStatement(aw.createObjectLiteralExpression(e)))}return{body:aw.createBlock(r,!0),returnValueProperty:a}}return{body:aw.createBlock(c,!0),returnValueProperty:void 0};function l(e){if(!s&&HP(e)&&o){const r=S7(t,n);return e.expression&&(a||(a="__return"),r.unshift(aw.createPropertyAssignment(a,iJ(e.expression,l,nu)))),1===r.length?aw.createReturnStatement(r[0].name):aw.createReturnStatement(aw.createObjectLiteralExpression(r))}{const t=s;s=s||g_(e)||S_(e);const n=r.get(KB(e).toString()),i=n?aZ(n):fJ(e,l,void 0);return s=t,i}}}(e,o,v,i,!!(1&a.facts));let N;uZ(T);const D=!!(16&a.facts);if(S_(t)){const e=f?[]:[aw.createModifier(123)];32&a.facts&&e.push(aw.createModifier(126)),4&a.facts&&e.push(aw.createModifier(134)),N=aw.createMethodDeclaration(e.length?e:void 0,2&a.facts?aw.createToken(42):void 0,m,void 0,S,h,g,T)}else D&&h.unshift(aw.createParameterDeclaration(void 0,void 0,"this",void 0,c.typeToTypeNode(c.getTypeAtLocation(a.thisNode),t,1),void 0)),N=aw.createFunctionDeclaration(4&a.facts?[aw.createToken(134)]:void 0,2&a.facts?aw.createToken(42):void 0,m,S,h,g,T);const P=tde.ChangeTracker.fromContext(s),E=function(e,t){return C(function(e){if(g_(e)){const t=e.body;if(jP(t))return t.statements}else{if(cE(e)||QE(e))return e.statements;if(S_(e))return e.members}return p}(t),t=>t.pos>=e&&g_(t)&&!SD(t))}((k7(a.range)?Ee(a.range):a.range).end,t);E?P.insertNodeBefore(s.file,E,N,!0):P.insertNodeAtEndOfScope(s.file,t,N);_.writeFixes(P);const F=[],A=function(e,t,n){const r=aw.createIdentifier(n);if(S_(e)){const n=32&t.facts?aw.createIdentifier(e.name.text):aw.createThis();return aw.createPropertyAccessExpression(n,r)}return r}(t,a,d);D&&y.unshift(aw.createIdentifier("this"));let I=aw.createCallExpression(D?aw.createPropertyAccessExpression(A,"call"):A,k,y);2&a.facts&&(I=aw.createYieldExpression(aw.createToken(42),I));4&a.facts&&(I=aw.createAwaitExpression(I));C7(e)&&(I=aw.createJsxExpression(void 0,I));if(o.length&&!v)if(Tn.assert(!w,"Expected no returnValueProperty"),Tn.assert(!(1&a.facts),"Expected RangeFacts.HasReturn flag to be unset"),1===o.length){const e=o[0];F.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(aZ(e.name),void 0,aZ(e.type),I)],e.parent.flags)))}else{const e=[],n=[];let r=o[0].parent.flags,i=!1;for(const a of o){e.push(aw.createBindingElement(void 0,void 0,aZ(a.name)));const o=c.typeToTypeNode(c.getBaseTypeOfLiteralType(c.getTypeAtLocation(a)),t,1);n.push(aw.createPropertySignature(void 0,a.symbol.name,void 0,o)),i=i||void 0!==a.type,r&=a.parent.flags}const a=i?aw.createTypeLiteralNode(n):void 0;a&&dw(a,1),F.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(aw.createObjectBindingPattern(e),void 0,a,I)],r)))}else if(o.length||v){if(o.length)for(const e of o){let t=e.parent.flags;2&t&&(t=-3&t|1),F.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(e.symbol.name,void 0,M(e.type))],t)))}w&&F.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(w,void 0,M(g))],1)));const e=S7(o,v);w&&e.unshift(aw.createShorthandPropertyAssignment(w)),1===e.length?(Tn.assert(!w,"Shouldn't have returnValueProperty here"),F.push(aw.createExpressionStatement(aw.createAssignment(e[0].name,I))),1&a.facts&&F.push(aw.createReturnStatement())):(F.push(aw.createExpressionStatement(aw.createAssignment(aw.createObjectLiteralExpression(e),I))),w&&F.push(aw.createReturnStatement(aw.createIdentifier(w))))}else 1&a.facts?F.push(aw.createReturnStatement(I)):k7(a.range)?F.push(aw.createExpressionStatement(I)):F.push(I);k7(a.range)?P.replaceNodeRangeWithNodes(s.file,Ne(a.range),Ee(a.range),F):P.replaceNodeWithNodes(s.file,a.range,F);const O=P.getChanges(),j=(k7(a.range)?Ne(a.range):a.range).getSourceFile().fileName,L=yZ(O,j,d,!1);return{renameFilename:j,renameLocation:L,edits:O};function M(e){if(void 0===e)return;const t=aZ(e);let n=t;for(;UD(n);)n=n.type;return BD(n)&&C(n.types,e=>157===e.kind)?t:aw.createUnionTypeNode([t,aw.createKeywordTypeNode(157)])}}(i,r[n],o[n],s,e,t)}(n,e,t)}const i=/^constant_scope_(\d+)$/.exec(t);if(i){const t=+i[1];return Tn.assert(isFinite(t),"Expected to parse a finite number from the constant scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,constantErrorsPerScope:a,exposedVariableDeclarations:s}}=v7(e,t);Tn.assert(!a[n].length,"The extraction went missing? How?"),Tn.assert(0===s.length,"Extract constant accepted a range containing a variable declaration?"),t.cancellationToken.throwIfCancellationRequested();return function(e,t,{substitutions:n},r,i){const o=i.program.getTypeChecker(),a=t.getSourceFile(),s=L4(e,t,o,a),c=zm(t);let l=c||!o.isContextSensitive(e)?void 0:o.typeToTypeNode(o.getContextualType(e),t,1),_=function(e,t){return t.size?n(e):e;function n(e){const r=t.get(KB(e).toString());return r?aZ(r):fJ(e,n,void 0)}}(mh(e),n);({variableType:l,initializer:_}=m(l,_)),uZ(_);const u=tde.ChangeTracker.fromContext(i);if(S_(t)){Tn.assert(!c,"Cannot extract to a JS class");const n=[];n.push(aw.createModifier(123)),32&r&&n.push(aw.createModifier(126)),n.push(aw.createModifier(148));const o=aw.createPropertyDeclaration(n,s,void 0,l,_);let a=aw.createPropertyAccessExpression(32&r?aw.createIdentifier(t.name.getText()):aw.createThis(),aw.createIdentifier(s));C7(e)&&(a=aw.createJsxExpression(void 0,a));const d=function(e,t){const n=t.members;let r;Tn.assert(n.length>0,"Found no members");let i=!0;for(const t of n){if(t.pos>e)return r||n[0];if(i&&!yD(t)){if(void 0!==r)return t;i=!1}r=t}return void 0===r?Tn.fail():r}(e.pos,t);u.insertNodeBefore(i.file,d,o,!0),u.replaceNode(i.file,e,a)}else{const n=aw.createVariableDeclaration(s,void 0,l,_),r=function(e,t){let n;for(;void 0!==e&&e!==t;){if(eE(e)&&e.initializer===n&&tE(e.parent)&&e.parent.declarations.length>1)return e;n=e,e=e.parent}}(e,t);if(r){u.insertNodeBefore(i.file,r,n);const t=aw.createIdentifier(s);u.replaceNode(i.file,e,t)}else if(244===e.parent.kind&&t===xc(e,y7)){const t=aw.createVariableStatement(void 0,aw.createVariableDeclarationList([n],2));u.replaceNode(i.file,e.parent,t)}else{const r=aw.createVariableStatement(void 0,aw.createVariableDeclarationList([n],2)),o=function(e,t){let n;Tn.assert(!S_(t));for(let r=e;r!==t;r=r.parent)y7(r)&&(n=r);for(let r=(n||e).parent;;r=r.parent){if(w0(r)){let t;for(const n of r.statements){if(n.pos>e.pos)break;t=n}return!t&&UE(r)?(Tn.assert(GP(r.parent.parent),"Grandparent isn't a switch statement"),r.parent.parent):Tn.checkDefined(t,"prevStatement failed to get set")}Tn.assert(r!==t,"Didn't encounter a block-like before encountering scope")}}(e,t);if(0===o.pos?u.insertNodeAtTopOfFile(i.file,r,!1):u.insertNodeBefore(i.file,o,r,!1),244===e.parent.kind)u.delete(i.file,e.parent);else{let t=aw.createIdentifier(s);C7(e)&&(t=aw.createJsxExpression(void 0,t)),u.replaceNode(i.file,e,t)}}}const d=u.getChanges(),p=e.getSourceFile().fileName,f=yZ(d,p,s,!0);return{renameFilename:p,renameLocation:f,edits:d};function m(n,r){if(void 0===n)return{variableType:n,initializer:r};if(!_P(r)&&!uP(r)||r.typeParameters)return{variableType:n,initializer:r};const i=o.getTypeAtLocation(e),a=Fe(o.getSignaturesOfType(i,0));if(!a)return{variableType:n,initializer:r};if(a.getTypeParameters())return{variableType:n,initializer:r};const s=[];let c=!1;for(const e of r.parameters)if(e.type)s.push(e);else{const n=o.getTypeAtLocation(e);n===o.getAnyType()&&(c=!0),s.push(aw.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type||o.typeToTypeNode(n,t,1),e.initializer))}if(c)return{variableType:n,initializer:r};if(n=void 0,uP(r))r=aw.updateArrowFunction(r,bI(e)?Rc(e):void 0,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.equalsGreaterThanToken,r.body);else{if(a&&a.thisParameter){const n=Ce(s);if(!n||QN(n.name)&&"this"!==n.name.escapedText){const n=o.getTypeOfSymbolAtLocation(a.thisParameter,e);s.splice(0,0,aw.createParameterDeclaration(void 0,void 0,"this",void 0,o.typeToTypeNode(n,t,1)))}}r=aw.updateFunctionExpression(r,bI(e)?Rc(e):void 0,r.asteriskToken,r.name,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.body)}return{variableType:n,initializer:r}}}(nu(i)?i:i.statements[0].expression,r[n],o[n],e.facts,t)}(n,e,t)}Tn.fail("Unrecognized action name")}b6(_7,{kinds:[u7.kind,d7.kind],getEditsForAction:f7,getAvailableActions:p7}),(e=>{function t(e){return{message:e,code:0,category:3,key:e}}e.cannotExtractRange=t("Cannot extract range."),e.cannotExtractImport=t("Cannot extract import statement."),e.cannotExtractSuper=t("Cannot extract super call."),e.cannotExtractJSDoc=t("Cannot extract JSDoc."),e.cannotExtractEmpty=t("Cannot extract empty range."),e.expressionExpected=t("expression expected."),e.uselessConstantType=t("No reason to extract constant of type."),e.statementOrExpressionExpected=t("Statement or expression expected."),e.cannotExtractRangeContainingConditionalBreakOrContinueStatements=t("Cannot extract range containing conditional break or continue statements."),e.cannotExtractRangeContainingConditionalReturnStatement=t("Cannot extract range containing conditional return statement."),e.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=t("Cannot extract range containing labeled break or continue with target outside of the range."),e.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=t("Cannot extract range containing writes to references located outside of the target range in generators."),e.typeWillNotBeVisibleInTheNewScope=t("Type will not visible in the new scope."),e.functionWillNotBeVisibleInTheNewScope=t("Function will not visible in the new scope."),e.cannotExtractIdentifier=t("Select more than a single identifier."),e.cannotExtractExportedEntity=t("Cannot extract exported declaration"),e.cannotWriteInExpression=t("Cannot write back side-effects when extracting an expression"),e.cannotExtractReadonlyPropertyInitializerOutsideConstructor=t("Cannot move initialization of read-only class property outside of the constructor"),e.cannotExtractAmbientBlock=t("Cannot extract code from ambient contexts"),e.cannotAccessVariablesFromNestedScopes=t("Cannot access variables from nested scopes"),e.cannotExtractToJSClass=t("Cannot extract constant to a class scope in JS"),e.cannotExtractToExpressionArrowFunction=t("Cannot extract constant to an arrow function without a block"),e.cannotExtractFunctionsContainingThisToMethod=t("Cannot extract functions containing this to method")})(l7||(l7={}));var m7=(e=>(e[e.None=0]="None",e[e.HasReturn=1]="HasReturn",e[e.IsGenerator=2]="IsGenerator",e[e.IsAsyncFunction=4]="IsAsyncFunction",e[e.UsesThis=8]="UsesThis",e[e.UsesThisInFunction=16]="UsesThisInFunction",e[e.InStaticRegion=32]="InStaticRegion",e))(m7||{});function g7(e,t,n=!0){const{length:r}=t;if(0===r&&!n)return{errors:[fS(e,t.start,r,l7.cannotExtractEmpty)]};const i=0===r&&n,o=eQ(e,t.start),a=tQ(e,Us(t)),s=o&&a&&n?function(e,t,n){const r=e.getStart(n);let i=t.getEnd();59===n.text.charCodeAt(i)&&i++;return{start:r,length:i-r}}(o,a,e):t,c=i?function(e){return xc(e,e=>e.parent&&T7(e)&&!yP(e.parent))}(o):fY(o,e,s),l=i?c:fY(a,e,s);let _,u=0;if(!c||!l)return{errors:[fS(e,t.start,r,l7.cannotExtractRange)]};if(16777216&c.flags)return{errors:[fS(e,t.start,r,l7.cannotExtractJSDoc)]};if(c.parent!==l.parent)return{errors:[fS(e,t.start,r,l7.cannotExtractRange)]};if(c!==l){if(!w0(c.parent))return{errors:[fS(e,t.start,r,l7.cannotExtractRange)]};const n=[];for(const e of c.parent.statements){if(e===c||n.length){const t=f(e);if(t)return{errors:t};n.push(e)}if(e===l)break}return n.length?{targetRange:{range:n,facts:u,thisNode:_}}:{errors:[fS(e,t.start,r,l7.cannotExtractRange)]}}if(HP(c)&&!c.expression)return{errors:[fS(e,t.start,r,l7.cannotExtractRange)]};const d=function(e){if(HP(e)){if(e.expression)return e.expression}else if(LP(e)||tE(e)){const t=LP(e)?e.declarationList.declarations:e.declarations;let n,r=0;for(const e of t)e.initializer&&(r++,n=e.initializer);if(1===r)return n}else if(eE(e)&&e.initializer)return e.initializer;return e}(c),p=function(e){if(QN(RP(e)?e.expression:e))return[Vp(e,l7.cannotExtractIdentifier)];return}(d)||f(d);return p?{errors:p}:{targetRange:{range:h7(d),facts:u,thisNode:_}};function f(e){let n;var r;if((r=n||(n={}))[r.None=0]="None",r[r.Break=1]="Break",r[r.Continue=2]="Continue",r[r.Return=4]="Return",Tn.assert(e.pos<=e.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),Tn.assert(!dT(e.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!(wu(e)||Em(e)&&T7(e)||w7(e)))return[Vp(e,l7.statementOrExpressionExpected)];if(33554432&e.flags)return[Vp(e,l7.cannotExtractAmbientBlock)];const i=om(e);let o;i&&function(e,t){let n=e;for(;n!==t;){if(172===n.kind){$v(n)&&(u|=32);break}if(169===n.kind){176===rm(n).kind&&(u|=32);break}174===n.kind&&$v(n)&&(u|=32),n=n.parent}}(e,i);let a,s=4;if(function e(n){if(o)return!0;if(ku(n)){if(Wv(260===n.kind?n.parent.parent:n,32))return(o||(o=[])).push(Vp(n,l7.cannotExtractExportedEntity)),!0}switch(n.kind){case 272:return(o||(o=[])).push(Vp(n,l7.cannotExtractImport)),!0;case 277:return(o||(o=[])).push(Vp(n,l7.cannotExtractExportedEntity)),!0;case 108:if(213===n.parent.kind){const e=om(n);if(void 0===e||e.pos=t.start+t.length)return(o||(o=[])).push(Vp(n,l7.cannotExtractSuper)),!0}else u|=8,_=n;break;case 219:KI(n,function e(t){if(xX(t))u|=8,_=n;else{if(S_(t)||f_(t)&&!uP(t))return!1;KI(t,e)}});case 263:case 262:QE(n.parent)&&void 0===n.parent.externalModuleIndicator&&(o||(o=[])).push(Vp(n,l7.functionWillNotBeVisibleInTheNewScope));case 231:case 218:case 174:case 176:case 177:case 178:return!1}const r=s;switch(n.kind){case 245:s&=-5;break;case 258:s=0;break;case 241:n.parent&&258===n.parent.kind&&n.parent.finallyBlock===n&&(s=4);break;case 297:case 296:s|=1;break;default:ou(n,!1)&&(s|=3)}switch(n.kind){case 197:case 110:u|=8,_=n;break;case 256:{const t=n.label;(a||(a=[])).push(t.escapedText),KI(n,e),a.pop();break}case 252:case 251:{const e=n.label;e?E(a,e.escapedText)||(o||(o=[])).push(Vp(n,l7.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):s&(252===n.kind?1:2)||(o||(o=[])).push(Vp(n,l7.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break}case 223:u|=4;break;case 229:u|=2;break;case 253:4&s?u|=1:(o||(o=[])).push(Vp(n,l7.cannotExtractRangeContainingConditionalReturnStatement));break;default:KI(n,e)}s=r}(e),8&u){const t=lm(e,!1,!1);(262===t.kind||174===t.kind&&210===t.parent.kind||218===t.kind)&&(u|=16)}return o}}function h7(e){return wu(e)?[e]:Em(e)?RP(e.parent)?[e.parent]:e:w7(e)?e:void 0}function y7(e){return uP(e)?du(e.body):g_(e)||QE(e)||cE(e)||S_(e)}function v7(e,t){const{file:n}=t,r=function(e){let t=k7(e.range)?Ne(e.range):e.range;if(8&e.facts&&!(16&e.facts)){const e=om(t);if(e){const n=xc(t,g_);return n?[n,e]:[e]}}const n=[];for(;;)if(t=t.parent,169===t.kind&&(t=xc(t,e=>g_(e)).parent),y7(t)&&(n.push(t),307===t.kind))return n}(e),i=function(e,t){return k7(e.range)?{pos:Ne(e.range).getStart(t),end:Ee(e.range).getEnd()}:e.range}(e,n),o=function(e,t,n,r,i,o){const a=new Map,s=[],c=[],l=[],_=[],u=[],d=new Map,p=[];let f;const m=k7(e.range)?1===e.range.length&&RP(e.range[0])?e.range[0].expression:void 0:e.range;let g;if(void 0===m){const t=e.range,n=Ne(t).getStart(),i=Ee(t).end;g=fS(r,n,i-n,l7.expressionExpected)}else 147456&i.getTypeAtLocation(m).flags&&(g=Vp(m,l7.uselessConstantType));for(const e of t){s.push({usages:new Map,typeParameterUsages:new Map,substitutions:new Map}),c.push(new Map),l.push([]);const t=[];g&&t.push(g),S_(e)&&zm(e)&&t.push(Vp(e,l7.cannotExtractToJSClass)),uP(e)&&!jP(e.body)&&t.push(Vp(e,l7.cannotExtractToExpressionArrowFunction)),_.push(t)}const h=new Map,y=k7(e.range)?aw.createBlock(e.range):e.range,v=k7(e.range)?Ne(e.range):e.range,b=x(v);if(k(y),b&&!k7(e.range)&&!RE(e.range)){S(i.getContextualType(e.range))}if(a.size>0){const e=new Map;let n=0;for(let r=v;void 0!==r&&n{s[n].typeParameterUsages.set(t,e)}),n++),Np(r))for(const t of xl(r)){const n=i.getTypeAtLocation(t);a.has(n.id.toString())&&e.set(n.id.toString(),n)}Tn.assert(n===t.length,"Should have iterated all scopes")}if(u.length){KI(wp(t[0],t[0].parent)?t[0]:Lp(t[0]),N)}for(let n=0;n0&&(r.usages.size>0||r.typeParameterUsages.size>0)){const t=k7(e.range)?e.range[0]:e.range;_[n].push(Vp(t,l7.cannotAccessVariablesFromNestedScopes))}16&e.facts&&S_(t[n])&&l[n].push(Vp(e.thisNode,l7.cannotExtractFunctionsContainingThisToMethod));let i,o=!1;if(s[n].usages.forEach(e=>{2===e.usage&&(o=!0,106500&e.symbol.flags&&e.symbol.valueDeclaration&&Vv(e.symbol.valueDeclaration,8)&&(i=e.symbol.valueDeclaration))}),Tn.assert(k7(e.range)||0===p.length,"No variable declarations expected if something was extracted"),o&&!k7(e.range)){const t=Vp(e.range,l7.cannotWriteInExpression);l[n].push(t),_[n].push(t)}else if(i&&n>0){const e=Vp(i,l7.cannotExtractReadonlyPropertyInitializerOutsideConstructor);l[n].push(e),_[n].push(e)}else if(f){const e=Vp(f,l7.cannotExtractExportedEntity);l[n].push(e),_[n].push(e)}}return{target:y,usagesPerScope:s,functionErrorsPerScope:l,constantErrorsPerScope:_,exposedVariableDeclarations:p};function x(e){return!!xc(e,e=>Np(e)&&0!==xl(e).length)}function S(e){const t=i.getSymbolWalker(()=>(o.throwIfCancellationRequested(),!0)),{visitedTypes:n}=t.walkType(e);for(const e of n)e.isTypeParameter()&&a.set(e.id.toString(),e)}function k(e,t=1){if(b){S(i.getTypeAtLocation(e))}if(ku(e)&&e.symbol&&u.push(e),xb(e))k(e.left,2),k(e.right);else if(eu(e))k(e.operand,2);else if(rP(e)||iP(e))KI(e,k);else if(QN(e)){if(!e.parent)return;if(dD(e.parent)&&e!==e.parent.left)return;if(rP(e.parent)&&e!==e.parent.expression)return;T(e,t,Af(e))}else KI(e,k)}function T(e,n,r){const i=w(e,n,r);if(i)for(let n=0;n=a)return p;if(h.set(p,a),f){for(const e of s){e.usages.get(o.text)&&e.usages.set(o.text,{usage:a,symbol:d,node:o})}return p}const m=d.getDeclarations(),g=m&&C(m,e=>e.getSourceFile()===r);if(g&&!PX(n,g.getStart(),g.end)){if(2&e.facts&&2===a){const e=Vp(o,l7.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);for(const t of l)t.push(e);for(const t of _)t.push(e)}for(let e=0;ee.symbol===n);if(e)if(eE(e)){const t=e.symbol.id.toString();d.has(t)||(p.push(e),d.set(t,!0))}else f=f||e}KI(t,N)}function D(e){return e.parent&&KE(e.parent)&&e.parent.name===e?i.getShorthandAssignmentValueSymbol(e.parent):i.getSymbolAtLocation(e)}function P(e,t,n){if(!e)return;const r=e.getDeclarations();if(r&&r.some(e=>e.parent===t))return aw.createIdentifier(e.name);const i=P(e.parent,t,n);return void 0!==i?n?aw.createQualifiedName(i,aw.createIdentifier(e.name)):aw.createPropertyAccessExpression(i,e.name):void 0}}(e,r,i,n,t.program.getTypeChecker(),t.cancellationToken);return{scopes:r,affectedTextRange:i,readsAndWrites:o}}function b7(e,t){let n;const r=e.symbol;if(r&&r.declarations)for(const e of r.declarations)(void 0===n||e.posaw.createShorthandPropertyAssignment(e.symbol.name)),r=M(t,e=>aw.createShorthandPropertyAssignment(e.symbol.name));return void 0===n?r:void 0===r?n:n.concat(r)}function k7(e){return ct(e)}function T7(e){const{parent:t}=e;if(306===t.kind)return!1;switch(e.kind){case 11:return 272!==t.kind&&276!==t.kind;case 230:case 206:case 208:return!1;case 80:return 208!==t.kind&&276!==t.kind&&281!==t.kind}return!0}function C7(e){return w7(e)||(FE(e)||AE(e)||jE(e))&&(FE(e.parent)||jE(e.parent))}function w7(e){return ON(e)&&e.parent&&RE(e.parent)}var N7={},D7="Generate 'get' and 'set' accessors",P7=lS(Ca.Generate_get_and_set_accessors),E7={name:D7,description:P7,kind:"refactor.rewrite.property.generateAccessors"};b6(D7,{kinds:[E7.kind],getEditsForAction:function(e,t){if(!e.endPosition)return;const n=Q5.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition);Tn.assert(n&&!O4(n),"Expected applicable refactor info");const r=Q5.generateAccessorFromProperty(e.file,e.program,e.startPosition,e.endPosition,e,t);if(!r)return;const i=e.file.fileName,o=n.renameAccessor?n.accessorName:n.fieldName;return{renameFilename:i,renameLocation:(QN(o)?0:-1)+yZ(r,i,o.text,mD(n.declaration)),edits:r}},getAvailableActions(e){if(!e.endPosition)return p;const t=Q5.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition,"invoked"===e.triggerReason);return t?O4(t)?e.preferences.provideRefactorNotApplicableReason?[{name:D7,description:P7,actions:[{...E7,notApplicableReason:t.error}]}]:p:[{name:D7,description:P7,actions:[E7]}]:p}});var F7={},A7="Infer function return type",I7=lS(Ca.Infer_function_return_type),O7={name:A7,description:I7,kind:"refactor.rewrite.function.returnType"};function j7(e){if(zm(e.file)||!j4(O7.kind,e.kind))return;const t=xc(XX(e.file,e.startPosition),e=>jP(e)||e.parent&&uP(e.parent)&&(39===e.kind||e.parent.body===e)?"quit":function(e){switch(e.kind){case 262:case 218:case 219:case 174:return!0;default:return!1}}(e));if(!t||!t.body||t.type)return{error:lS(Ca.Return_type_must_be_inferred_from_a_function)};const n=e.program.getTypeChecker(),r=function(e,t){if(e.isImplementationOfOverload(t)){const n=e.getTypeAtLocation(t).getCallSignatures();if(n.length>1)return e.getUnionType($(n,e=>e.getReturnType()))}const n=e.getSignatureFromDeclaration(t);if(n)return e.getReturnTypeOfSignature(n)}(n,t);if(!r)return{error:lS(Ca.Could_not_determine_function_return_type)};const i=n.typeToTypeNode(r,t,1);return i?{declaration:t,returnTypeNode:i}:void 0}b6(A7,{kinds:[O7.kind],getEditsForAction:function(e){const t=j7(e);if(t&&!O4(t)){return{renameFilename:void 0,renameLocation:void 0,edits:tde.ChangeTracker.with(e,n=>function(e,t,n,r){const i=RX(n,22,e),o=uP(n)&&void 0===i,a=o?Ne(n.parameters):i;a&&(o&&(t.insertNodeBefore(e,a,aw.createToken(21)),t.insertNodeAfter(e,a,aw.createToken(22))),t.insertNodeAt(e,a.end,r,{prefix:": "}))}(e.file,n,t.declaration,t.returnTypeNode))}}return},getAvailableActions:function(e){const t=j7(e);if(!t)return p;if(!O4(t))return[{name:A7,description:I7,actions:[O7]}];if(e.preferences.provideRefactorNotApplicableReason)return[{name:A7,description:I7,actions:[{...O7,notApplicableReason:t.error}]}];return p}});var L7=(e=>(e[e.typeOffset=8]="typeOffset",e[e.modifierMask=255]="modifierMask",e))(L7||{}),M7=(e=>(e[e.class=0]="class",e[e.enum=1]="enum",e[e.interface=2]="interface",e[e.namespace=3]="namespace",e[e.typeParameter=4]="typeParameter",e[e.type=5]="type",e[e.parameter=6]="parameter",e[e.variable=7]="variable",e[e.enumMember=8]="enumMember",e[e.property=9]="property",e[e.function=10]="function",e[e.member=11]="member",e))(M7||{}),R7=(e=>(e[e.declaration=0]="declaration",e[e.static=1]="static",e[e.async=2]="async",e[e.readonly=3]="readonly",e[e.defaultLibrary=4]="defaultLibrary",e[e.local=5]="local",e))(R7||{});function B7(e,t,n,r){const i=J7(e,t,n,r);Tn.assert(i.spans.length%3==0);const o=i.spans,a=[];for(let e=0;ee(r)||r.isUnion()&&r.types.some(e);if(6!==n&&e(e=>e.getConstructSignatures().length>0))return 0;if(e(e=>e.getCallSignatures().length>0)&&!e(e=>e.getProperties().length>0)||function(e){for(;U7(e);)e=e.parent;return oP(e.parent)&&e.parent.expression===e}(t))return 9===n?11:10}}return n}(o,c,i);const s=n.valueDeclaration;if(s){const r=fc(s),o=gc(s);256&r&&(a|=2),1024&r&&(a|=4),0!==i&&2!==i&&(8&r||2&o||8&n.getFlags())&&(a|=8),7!==i&&10!==i||!function(e,t){eP(e)&&(e=q7(e));if(eE(e))return(!QE(e.parent.parent.parent)||$E(e.parent))&&e.getSourceFile()===t;if(nE(e))return!QE(e.parent)&&e.getSourceFile()===t;return!1}(s,t)||(a|=32),e.isSourceFileDefaultLibrary(s.getSourceFile())&&(a|=16)}else n.declarations&&n.declarations.some(t=>e.isSourceFileDefaultLibrary(t.getSourceFile()))&&(a|=16);r(c,i,a)}}}KI(c,s),a=l}s(t)}(e,t,n,(e,n,r)=>{i.push(e.getStart(t),e.getWidth(t),(n+1<<8)+r)},r),i}function q7(e){for(;;){if(!eP(e.parent.parent))return e.parent.parent;e=e.parent.parent}}function U7(e){return dD(e.parent)&&e.parent.right===e||rP(e.parent)&&e.parent.name===e}var V7=new Map([[260,7],[169,6],[172,9],[267,3],[266,1],[306,8],[263,0],[174,11],[262,10],[218,10],[173,11],[177,9],[178,9],[171,9],[264,2],[265,5],[168,4],[303,9],[304,9]]),W7="0.8";function $7(e,t,n,r){const i=Jl(e)?new H7(e,t,n):80===e?new Y7(80,t,n):81===e?new Z7(81,t,n):new Q7(e,t,n);return i.parent=r,i.flags=101441536&r.flags,i}var H7=class{constructor(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(e){Tn.assert(!dT(this.pos)&&!dT(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return Dd(this)}getStart(e,t){return this.assertHasRealPosition(),Xd(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),VF(this)??WF(this,function(e,t){const n=[];if(Lu(e))return e.forEachChild(e=>{n.push(e)}),n;UG.setText((t||e.getSourceFile()).text);let r=e.pos;const i=t=>{K7(n,r,t.pos,e),n.push(t),r=t.end},o=t=>{K7(n,r,t.pos,e),n.push(function(e,t){const n=$7(352,e.pos,e.end,t),r=[];let i=e.pos;for(const n of e)K7(r,i,n.pos,t),r.push(n),i=n.end;return K7(r,i,e.end,t),WF(n,r),n}(t,e)),r=t.end};return h(e.jsDoc,i),r=e.pos,e.forEachChild(i,o),K7(n,r,e.end,e),UG.setText(void 0),n}(this,e))}getFirstToken(e){this.assertHasRealPosition();const t=this.getChildren(e);if(!t.length)return;const n=C(t,e=>e.kind<309||e.kind>351);return n.kind<166?n:n.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();const t=Pe(this.getChildren(e));if(t)return t.kind<166?t:t.getLastToken(e)}forEachChild(e,t){return KI(this,e,t)}};function K7(e,t,n,r){for(UG.resetTokenState(t);t"inheritDoc"===e.tagName.text||"inheritdoc"===e.tagName.text)}function r5(e,t){if(!e)return p;let n=Ule.getJsDocTagsFromDeclarations(e,t);if(t&&(0===n.length||e.some(n5))){const r=new Set;for(const i of e){const e=o5(t,i,e=>{var n;if(!r.has(e))return r.add(e),177===i.kind||178===i.kind?e.getContextualJsDocTags(i,t):1===(null==(n=e.declarations)?void 0:n.length)?e.getJsDocTags(t):void 0});e&&(n=[...e,...n])}}return n}function i5(e,t){if(!e)return p;let n=Ule.getJsDocCommentsFromDeclarations(e,t);if(t&&(0===n.length||e.some(n5))){const r=new Set;for(const i of e){const e=o5(t,i,e=>{if(!r.has(e))return r.add(e),177===i.kind||178===i.kind?e.getContextualDocumentationComment(i,t):e.getDocumentationComment(t)});e&&(n=0===n.length?e.slice():e.concat(HY(),n))}}return n}function o5(e,t,n){var r;const i=176===(null==(r=t.parent)?void 0:r.kind)?t.parent.parent:t.parent;if(!i)return;const o=Hv(t);return v(Fh(i),r=>{const i=e.getTypeAtLocation(r),a=o&&i.symbol?e.getTypeOfSymbol(i.symbol):i,s=e.getPropertyOfType(a,t.symbol.name);return s?n(s):void 0})}var a5=class extends H7{constructor(e,t,n){super(e,t,n)}update(e,t){return nO(this,e,t)}getLineAndCharacterOfPosition(e){return ns(this,e)}getLineStarts(){return Ya(this)}getPositionOfLineAndCharacter(e,t,n){return Qa(Ya(this),e,t,this.text,n)}getLineEndOfPosition(e){const{line:t}=this.getLineAndCharacterOfPosition(e),n=this.getLineStarts();let r;t+1>=n.length&&(r=this.getEnd()),r||(r=n[t+1]-1);const i=this.getFullText();return"\n"===i[r]&&"\r"===i[r-1]?r-1:r}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){const e=rt();return this.forEachChild(function r(i){switch(i.kind){case 262:case 218:case 174:case 173:const o=i,a=n(o);if(a){const t=function(t){let n=e.get(t);n||e.set(t,n=[]);return n}(a),n=Pe(t);n&&o.parent===n.parent&&o.symbol===n.symbol?o.body&&!n.body&&(t[t.length-1]=o):t.push(o)}KI(i,r);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(i),KI(i,r);break;case 169:if(!Wv(i,31))break;case 260:case 208:{const e=i;if(O_(e.name)){KI(e.name,r);break}e.initializer&&r(e.initializer)}case 306:case 172:case 171:t(i);break;case 278:const s=i;s.exportClause&&(CE(s.exportClause)?h(s.exportClause.elements,r):r(s.exportClause.name));break;case 272:const c=i.importClause;c&&(c.name&&t(c.name),c.namedBindings&&(274===c.namedBindings.kind?t(c.namedBindings):h(c.namedBindings.elements,r)));break;case 226:0!==dg(i)&&t(i);default:KI(i,r)}}),e;function t(t){const r=n(t);r&&e.add(r,t)}function n(e){const t=Oc(e);return t&&(pD(t)&&rP(t.expression)?t.expression.name.text:d_(t)?XQ(t):void 0)}}},s5=class{constructor(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(e=>e)}getLineAndCharacterOfPosition(e){return ns(this,e)}};function c5(e){let t=!0;for(const n in e)if(Be(e,n)&&!l5(n)){t=!1;break}if(t)return e;const n={};for(const t in e)if(Be(e,t)){n[l5(t)?t:t.charAt(0).toLowerCase()+t.substr(1)]=e[t]}return n}function l5(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function _5(e){return e?M(e,e=>e.text).join(""):""}function u5(){return{target:1,jsx:1}}function d5(){return Q5.getSupportedErrorCodes()}var p5=class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,n,r,i,o,a,s,c;const l=this.host.getScriptSnapshot(e);if(!l)throw new Error("Could not find file: '"+e+"'.");const _=eZ(e,this.host),u=this.host.getScriptVersion(e);let d;if(this.currentFileName!==e){d=m5(e,l,{languageVersion:99,impliedNodeFormat:jV(ia(e,this.host.getCurrentDirectory(),(null==(r=null==(n=(t=this.host).getCompilerHost)?void 0:n.call(t))?void 0:r.getCanonicalFileName)||Zy(this.host)),null==(c=null==(s=null==(a=null==(o=(i=this.host).getCompilerHost)?void 0:o.call(i))?void 0:a.getModuleResolutionCache)?void 0:s.call(a))?void 0:c.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:AS(this.host.getCompilationSettings()),jsDocParsingMode:0},u,!0,_)}else if(this.currentFileVersion!==u){const e=l.getChangeRange(this.currentFileScriptSnapshot);d=g5(this.currentSourceFile,l,u,e)}return d&&(this.currentFileVersion=u,this.currentFileName=e,this.currentFileScriptSnapshot=l,this.currentSourceFile=d),this.currentSourceFile}};function f5(e,t,n){e.version=n,e.scriptSnapshot=t}function m5(e,t,n,r,i,o){const a=YI(e,HQ(t),n,i,o);return f5(a,t,r),a}function g5(e,t,n,r,i){if(r&&n!==e.version){let o;const a=0!==r.span.start?e.text.substr(0,r.span.start):"",s=Us(r.span)!==e.text.length?e.text.substr(Us(r.span)):"";if(0===r.newLength)o=a&&s?a+s:a||s;else{const e=t.getText(r.span.start,r.span.start+r.newLength);o=a&&s?a+e+s:a?a+e:e+s}const c=nO(e,o,r,i);return f5(c,t,n),c.nameTable=void 0,e!==c&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),c}const o={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode};return m5(e.fileName,t,o,n,!0,e.scriptKind)}var h5={isCancellationRequested:mt,throwIfCancellationRequested:ft},y5=class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=cr)||e.instant(cr.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new Br}},v5=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){const e=tr();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested())}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=cr)||e.instant(cr.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new Br}},b5=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],x5=[...b5,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"];function S5(e,t=e1(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory(),e.jsDocParsingMode),n){var r;let i;i=void 0===n?0:"boolean"==typeof n?n?2:0:n;const o=new p5(e);let a,s,c=0;const l=e.getCancellationToken?new y5(e.getCancellationToken()):h5,_=e.getCurrentDirectory();function u(t){e.log&&e.log(t)}cS(null==(r=e.getLocalizedDiagnosticMessages)?void 0:r.bind(e));const d=Yy(e),f=on(d),m=J1({useCaseSensitiveFileNames:()=>d,getCurrentDirectory:()=>_,getProgram:v,fileExists:nt(e,e.fileExists),readFile:nt(e,e.readFile),getDocumentPositionMapper:nt(e,e.getDocumentPositionMapper),getSourceFileLike:nt(e,e.getSourceFileLike),log:u});function g(e){const t=a.getSourceFile(e);if(!t){const t=new Error(`Could not find source file: '${e}'.`);throw t.ProgramFiles=a.getSourceFiles().map(e=>e.fileName),t}return t}function y(){e.updateFromProject&&!e.updateFromProjectInProgress?e.updateFromProject():function(){var n,r,o;if(Tn.assert(2!==i),e.getProjectVersion){const t=e.getProjectVersion();if(t){if(s===t&&!(null==(n=e.hasChangedAutomaticTypeDirectiveNames)?void 0:n.call(e)))return;s=t}}const p=e.getTypeRootsVersion?e.getTypeRootsVersion():0;c!==p&&(u("TypeRoots version has changed; provide new program"),a=void 0,c=p);const g=e.getScriptFileNames().slice(),h=e.getCompilationSettings()||{target:1,jsx:1},y=e.hasInvalidatedResolutions||mt,v=nt(e,e.hasInvalidatedLibResolutions)||mt,b=nt(e,e.hasChangedAutomaticTypeDirectiveNames),x=null==(r=e.getProjectReferences)?void 0:r.call(e);let S,k={getSourceFile:I,getSourceFileByPath:O,getCancellationToken:()=>l,getCanonicalFileName:f,useCaseSensitiveFileNames:()=>d,getNewLine:()=>Xb(h),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:ft,getCurrentDirectory:()=>_,fileExists:t=>e.fileExists(t),readFile:t=>e.readFile&&e.readFile(t),getSymlinkCache:nt(e,e.getSymlinkCache),realpath:nt(e,e.realpath),directoryExists:t=>Hb(t,e),getDirectories:t=>e.getDirectories?e.getDirectories(t):[],readDirectory:(t,n,r,i,o)=>(Tn.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(t,n,r,i,o)),onReleaseOldSourceFile:A,onReleaseParsedCommandLine:F,hasInvalidatedResolutions:y,hasInvalidatedLibResolutions:v,hasChangedAutomaticTypeDirectiveNames:b,trace:nt(e,e.trace),resolveModuleNames:nt(e,e.resolveModuleNames),getModuleResolutionCache:nt(e,e.getModuleResolutionCache),createHash:nt(e,e.createHash),resolveTypeReferenceDirectives:nt(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:nt(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:nt(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:nt(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:nt(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:P,jsDocParsingMode:e.jsDocParsingMode};const T=k.getSourceFile,{getSourceFileWithCache:C}=$U(k,e=>ia(e,_,f),(...e)=>T.call(k,...e));k.getSourceFile=C,null==(o=e.setCompilerHost)||o.call(e,k);const w={useCaseSensitiveFileNames:d,fileExists:e=>k.fileExists(e),readFile:e=>k.readFile(e),directoryExists:e=>k.directoryExists(e),getDirectories:e=>k.getDirectories(e),realpath:k.realpath,readDirectory:(...e)=>k.readDirectory(...e),trace:k.trace,getCurrentDirectory:k.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:ft},N=t.getKeyForCompilationSettings(h);let D=new Set;if(IV(a,g,h,(t,n)=>e.getScriptVersion(n),e=>k.fileExists(e),y,v,b,P,x))return k=void 0,S=void 0,void(D=void 0);return a=RV({rootNames:g,options:h,host:k,oldProgram:a,projectReferences:x}),k=void 0,S=void 0,D=void 0,m.clearCache(),void a.getTypeChecker();function P(t){const n=ia(t,_,f),r=null==S?void 0:S.get(n);if(void 0!==r)return r||void 0;const i=e.getParsedCommandLine?e.getParsedCommandLine(t):E(t);return(S||(S=new Map)).set(n,i||!1),i}function E(e){const t=I(e,100);if(t)return t.path=ia(e,_,f),t.resolvedPath=t.path,t.originalFileName=t.fileName,Yj(t,w,ta(Vo(e),_),void 0,ta(e,_))}function F(t,n,r){var i;e.getParsedCommandLine?null==(i=e.onReleaseParsedCommandLine)||i.call(e,t,n,r):n&&A(n.sourceFile,r)}function A(e,n){const r=t.getKeyForCompilationSettings(n);t.releaseDocumentWithKey(e.resolvedPath,r,e.scriptKind,e.impliedNodeFormat)}function I(e,t,n,r){return O(e,ia(e,_,f),t,n,r)}function O(n,r,i,o,s){Tn.assert(k,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");const c=e.getScriptSnapshot(n);if(!c)return;const l=eZ(n,e),_=e.getScriptVersion(n);if(!s){const o=a&&a.getSourceFileByPath(r);if(o){if(l===o.scriptKind||D.has(o.resolvedPath))return t.updateDocumentWithKey(n,r,e,N,c,_,l,i);t.releaseDocumentWithKey(o.resolvedPath,t.getKeyForCompilationSettings(a.getCompilerOptions()),o.scriptKind,o.impliedNodeFormat),D.add(o.resolvedPath)}}return t.acquireDocumentWithKey(n,r,e,N,c,_,l,i)}}()}function v(){if(2!==i)return y(),a;Tn.assert(void 0===a)}function b(){if(a){const e=t.getKeyForCompilationSettings(a.getCompilerOptions());h(a.getSourceFiles(),n=>t.releaseDocumentWithKey(n.resolvedPath,e,n.scriptKind,n.impliedNodeFormat)),a=void 0}}function x(e,t,n,r){y();const i=n&&n.use===Ice.FindReferencesUse.Rename?a.getSourceFiles().filter(e=>!a.isSourceFileDefaultLibrary(e)):a.getSourceFiles();return Ice.findReferenceOrRenameEntries(a,l,i,e,t,n,r)}const S=new Map(Object.entries({19:20,21:22,23:24,32:30}));function k(t){return Tn.assertEqual(t.type,"install package"),e.installPackage?e.installPackage({fileName:(n=t.file,ia(n,_,f)),packageName:t.packageName}):Promise.reject("Host does not implement `installPackage`");var n}function T(e,t){return{lineStarts:e.getLineStarts(),firstLine:e.getLineAndCharacterOfPosition(t.pos).line,lastLine:e.getLineAndCharacterOfPosition(t.end).line}}function C(e,t,n){const r=o.getCurrentSourceFile(e),i=[],{lineStarts:a,firstLine:s,lastLine:c}=T(r,t);let l=n||!1,_=Number.MAX_VALUE;const u=new Map,d=new RegExp(/\S/),p=dQ(r,a[s]),f=p?"{/*":"//";for(let e=s;e<=c;e++){const t=r.text.substring(a[e],r.getLineEndOfPosition(a[e])),i=d.exec(t);i&&(_=Math.min(_,i.index),u.set(e.toString(),i.index),t.substr(i.index,f.length)!==f&&(l=void 0===n||n))}for(let n=s;n<=c;n++){if(s!==c&&a[n]===t.end)continue;const o=u.get(n.toString());void 0!==o&&(p?i.push(...w(e,{pos:a[n]+_,end:r.getLineEndOfPosition(a[n])},l,p)):l?i.push({newText:f,span:{length:0,start:a[n]+_}}):r.text.substr(a[n]+o,f.length)===f&&i.push({newText:"",span:{length:f.length,start:a[n]+o}}))}return i}function w(e,t,n,r){var i;const a=o.getCurrentSourceFile(e),s=[],{text:c}=a;let l=!1,_=n||!1;const u=[];let{pos:d}=t;const p=void 0!==r?r:dQ(a,d),f=p?"{/*":"/*",m=p?"*/}":"*/",g=p?"\\{\\/\\*":"\\/\\*",h=p?"\\*\\/\\}":"\\*\\/";for(;d<=t.end;){const e=yQ(a,d+(c.substr(d,f.length)===f?f.length:0));if(e)p&&(e.pos--,e.end++),u.push(e.pos),3===e.kind&&u.push(e.end),l=!0,d=e.end+1;else{const e=c.substring(d,t.end).search(`(${g})|(${h})`);_=void 0!==n?n:_||!kY(c,d,-1===e?t.end:d+e),d=-1===e?t.end+1:d+e+m.length}}if(_||!l){2!==(null==(i=yQ(a,t.pos))?void 0:i.kind)&&se(u,t.pos,It),se(u,t.end,It);const e=u[0];c.substr(e,f.length)!==f&&s.push({newText:f,span:{length:0,start:e}});for(let e=1;e0?e-m.length:0,n=c.substr(t,m.length)===m?m.length:0;s.push({newText:"",span:{length:f.length,start:e-n}})}return s}function N({openingElement:e,closingElement:t,parent:n}){return!vO(e.tagName,t.tagName)||FE(n)&&vO(e.tagName,n.openingElement.tagName)&&N(n)}function D({closingFragment:e,parent:t}){return!!(262144&e.flags)||jE(t)&&D(t)}function P(t,n,r,i,o,a){const[s,c]="number"==typeof n?[n,void 0]:[n.pos,n.end];return{file:t,startPosition:s,endPosition:c,program:v(),host:e,formatContext:Ede.getFormatContext(i,e),cancellationToken:l,preferences:r,triggerReason:o,kind:a}}S.forEach((e,t)=>S.set(e.toString(),Number(t)));const E={dispose:function(){b(),e=void 0},cleanupSemanticCache:b,getSyntacticDiagnostics:function(e){return y(),a.getSyntacticDiagnostics(g(e),l).slice()},getSemanticDiagnostics:function(e){y();const t=g(e),n=a.getSemanticDiagnostics(t,l);if(!VS(a.getCompilerOptions()))return n.slice();const r=a.getDeclarationDiagnostics(t,l);return[...n,...r]},getSuggestionDiagnostics:function(e){return y(),V1(g(e),a,l)},getCompilerOptionsDiagnostics:function(){return y(),[...a.getOptionsDiagnostics(l),...a.getGlobalDiagnostics(l)]},getSyntacticClassifications:function(e,t){return Q0(l,o.getCurrentSourceFile(e),t)},getSemanticClassifications:function(e,t,n){return y(),"2020"===(n||"original")?B7(a,l,g(e),t):W0(a.getTypeChecker(),l,g(e),a.getClassifiableNames(),t)},getEncodedSyntacticClassifications:function(e,t){return Y0(l,o.getCurrentSourceFile(e),t)},getEncodedSemanticClassifications:function(e,t,n){return y(),"original"===(n||"original")?H0(a.getTypeChecker(),l,g(e),a.getClassifiableNames(),t):J7(a,l,g(e),t)},getCompletionsAtPosition:function(t,n,r=kG,i){const o={...r,includeCompletionsForModuleExports:r.includeCompletionsForModuleExports||r.includeExternalModuleExports,includeCompletionsWithInsertText:r.includeCompletionsWithInsertText||r.includeInsertTextCompletions};return y(),Oae.getCompletionsAtPosition(e,a,u,g(t),n,o,r.triggerCharacter,r.triggerKind,l,i&&Ede.getFormatContext(i,e),r.includeSymbol)},getCompletionEntryDetails:function(t,n,r,i,o,s=kG,c){return y(),Oae.getCompletionEntryDetails(a,u,g(t),n,{name:r,source:o,data:c},e,i&&Ede.getFormatContext(i,e),s,l)},getCompletionEntrySymbol:function(t,n,r,i,o=kG){return y(),Oae.getCompletionEntrySymbol(a,u,g(t),n,{name:r,source:i},e,o)},getSignatureHelpItems:function(e,t,{triggerReason:n}=kG){y();const r=g(e);return lue.getSignatureHelpItems(a,r,t,n,l)},getQuickInfoAtPosition:function(e,t){y();const n=g(e),r=XX(n,t);if(r===n)return;const i=a.getTypeChecker(),o=function(e){if(aP(e.parent)&&e.pos===e.parent.pos)return e.parent.expression;if(LD(e.parent)&&e.pos===e.parent.pos)return e.parent;if(hf(e.parent)&&e.parent.name===e)return e.parent;if(qE(e.parent))return e.parent;return e}(r),s=function(e,t){const n=T5(e);if(n){const e=t.getContextualType(n.parent),r=e&&C5(n,t,e,!1);if(r&&1===r.length)return Ne(r)}return t.getSymbolAtLocation(e)}(o,i);if(!s||i.isUnknownSymbol(s)){const e=function(e,t,n){switch(t.kind){case 80:return!(16777216&t.flags&&!zm(t)&&(171===t.parent.kind&&t.parent.name===t||xc(t,e=>169===e.kind)))&&(!_X(t)&&!uX(t)&&!Il(t.parent));case 211:case 166:return!yQ(e,n);case 110:case 197:case 108:case 202:return!0;case 236:return hf(t);default:return!1}}(n,o,t)?i.getTypeAtLocation(o):void 0;return e&&{kind:"",kindModifiers:"",textSpan:jQ(o,n),displayParts:i.runWithCancellationToken(l,t=>GY(t,e,vX(o))),documentation:e.symbol?e.symbol.getDocumentationComment(i):void 0,tags:e.symbol?e.symbol.getJsDocTags(i):void 0}}const{symbolKind:c,displayParts:_,documentation:u,tags:d}=i.runWithCancellationToken(l,e=>$ue.getSymbolDisplayPartsDocumentationAndSymbolKind(e,s,n,vX(o),o));return{kind:c,kindModifiers:$ue.getSymbolModifiers(i,s),textSpan:jQ(o,n),displayParts:_,documentation:u,tags:d}},getDefinitionAtPosition:function(e,t,n,r){return y(),ble.getDefinitionAtPosition(a,g(e),t,n,r)},getDefinitionAndBoundSpan:function(e,t){return y(),ble.getDefinitionAndBoundSpan(a,g(e),t)},getImplementationAtPosition:function(e,t){return y(),Ice.getImplementationsAtPosition(a,l,a.getSourceFiles(),g(e),t)},getTypeDefinitionAtPosition:function(e,t){return y(),ble.getTypeDefinitionAtPosition(a.getTypeChecker(),g(e),t)},getReferencesAtPosition:function(e,t){return y(),x(XX(g(e),t),t,{use:Ice.FindReferencesUse.References},Ice.toReferenceEntry)},findReferences:function(e,t){return y(),Ice.findReferencedSymbols(a,l,a.getSourceFiles(),g(e),t)},getFileReferences:function(e){return y(),Ice.Core.getReferencesForFileName(e,a,a.getSourceFiles()).map(Ice.toReferenceEntry)},getDocumentHighlights:function(e,t,n){const r=na(e);Tn.assert(n.some(e=>na(e)===r)),y();const i=$(n,e=>a.getSourceFile(e)),o=g(e);return B0.getDocumentHighlights(a,l,o,t,i)},getNameOrDottedNameSpan:function(e,t,n){const r=o.getCurrentSourceFile(e),i=XX(r,t);if(i===r)return;switch(i.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let a=i;for(;;)if(pX(a)||dX(a))a=a.parent;else{if(!mX(a))break;if(267!==a.parent.parent.kind||a.parent.parent.body!==a.parent)break;a=a.parent.parent.name}return nc(a.getStart(),i.getEnd())},getBreakpointStatementAtPosition:function(e,t){const n=o.getCurrentSourceFile(e);return D5.spanInSourceFileAtLocation(n,t)},getNavigateToItems:function(e,t,n,r=!1,i=!1){return y(),d2(n?[g(n)]:a.getSourceFiles(),a.getTypeChecker(),l,e,t,r,i)},getRenameInfo:function(e,t,n){return y(),nue.getRenameInfo(a,g(e),t,n||{})},getSmartSelectionRange:function(e,t){return jue.getSmartSelectionRange(t,o.getCurrentSourceFile(e))},findRenameLocations:function(e,t,n,r,i){y();const o=g(e),a=GX(XX(o,t));if(nue.nodeIsEligibleForRename(a)){if(QN(a)&&(IE(a.parent)||OE(a.parent))&&$y(a.escapedText)){const{openingElement:e,closingElement:t}=a.parent.parent;return[e,t].map(e=>{const t=jQ(e.tagName,o);return{fileName:o.fileName,textSpan:t,...Ice.toContextSpan(t,o,e.parent)}})}{const e=sY(o,i??kG),s="boolean"==typeof i?i:null==i?void 0:i.providePrefixAndSuffixTextForRename;return x(a,t,{findInStrings:n,findInComments:r,providePrefixAndSuffixTextForRename:s,use:Ice.FindReferencesUse.Rename},(t,n,r)=>Ice.toRenameLocation(t,n,r,s||!1,e))}}},getNavigationBarItems:function(e){return A2(o.getCurrentSourceFile(e),l)},getNavigationTree:function(e){return I2(o.getCurrentSourceFile(e),l)},getOutliningSpans:function(e){const t=o.getCurrentSourceFile(e);return H_e.collectElements(t,l)},getTodoComments:function(e,t){y();const n=g(e);l.throwIfCancellationRequested();const r=n.text,i=[];if(t.length>0&&!n.fileName.includes("/node_modules/")){const e=function(){const e="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+M(t,e=>"("+(e.text.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")+")")).join("|")+")";return new RegExp(e+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}();let a;for(;a=e.exec(r);){l.throwIfCancellationRequested();const e=3;Tn.assert(a.length===t.length+e);const s=a[1],c=a.index+s.length;if(!yQ(n,c))continue;let _;for(let n=0;n=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}},getBraceMatchingAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=QX(n,t),i=r.getStart(n)===t?S.get(r.kind.toString()):void 0,a=i&&RX(r.parent,i,n);return a?[jQ(r,n),jQ(a,n)].sort((e,t)=>e.start-t.start):p},getIndentationAtPosition:function(e,t,n){let r=tr();const i=c5(n),a=o.getCurrentSourceFile(e);u("getIndentationAtPosition: getCurrentSourceFile: "+(tr()-r)),r=tr();const s=Ede.SmartIndenter.getIndentation(t,a,i);return u("getIndentationAtPosition: computeIndentation : "+(tr()-r)),s},getFormattingEditsForRange:function(t,n,r,i){const a=o.getCurrentSourceFile(t);return Ede.formatSelection(n,r,a,Ede.getFormatContext(c5(i),e))},getFormattingEditsForDocument:function(t,n){return Ede.formatDocument(o.getCurrentSourceFile(t),Ede.getFormatContext(c5(n),e))},getFormattingEditsAfterKeystroke:function(t,n,r,i){const a=o.getCurrentSourceFile(t),s=Ede.getFormatContext(c5(i),e);if(!yQ(a,n))switch(r){case"{":return Ede.formatOnOpeningCurly(n,a,s);case"}":return Ede.formatOnClosingCurly(n,a,s);case";":return Ede.formatOnSemicolon(n,a,s);case"\n":return Ede.formatOnEnter(n,a,s)}return[]},getDocCommentTemplateAtPosition:function(t,n,r,i){const a=i?Ede.getFormatContext(i,e).options:void 0;return Ule.getDocCommentTemplateAtPosition($Y(e,a),o.getCurrentSourceFile(t),n,r)},isValidBraceCompletionAtPosition:function(e,t,n){if(60===n)return!1;const r=o.getCurrentSourceFile(e);if(sQ(r,t))return!1;if(cQ(r,t))return 123===n;if(_Q(r,t))return!1;switch(n){case 39:case 34:case 96:return!yQ(r,t)}return!0},getJsxClosingTagAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=rQ(t,n);if(!r)return;const i=32===r.kind&&IE(r.parent)?r.parent.parent:jN(r)&&FE(r.parent)?r.parent:void 0;if(i&&N(i))return{newText:``};const a=32===r.kind&&LE(r.parent)?r.parent.parent:jN(r)&&jE(r.parent)?r.parent:void 0;return a&&D(a)?{newText:""}:void 0},getLinkedEditingRangeAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=rQ(t,n);if(!r||307===r.parent.kind)return;const i="[a-zA-Z0-9:\\-\\._$]*";if(jE(r.parent.parent)){const e=r.parent.parent.openingFragment,o=r.parent.parent.closingFragment;if(Nd(e)||Nd(o))return;const a=e.getStart(n)+1,s=o.getStart(n)+2;if(t!==a&&t!==s)return;return{ranges:[{start:a,length:0},{start:s,length:0}],wordPattern:i}}{const e=xc(r.parent,e=>!(!IE(e)&&!OE(e)));if(!e)return;Tn.assert(IE(e)||OE(e),"tag should be opening or closing element");const o=e.parent.openingElement,a=e.parent.closingElement,s=o.tagName.getStart(n),c=o.tagName.end,l=a.tagName.getStart(n),_=a.tagName.end;if(s===o.getStart(n)||l===a.getStart(n)||c===o.getEnd()||_===a.getEnd())return;if(!(s<=t&&t<=c||l<=t&&t<=_))return;if(o.tagName.getText(n)!==a.tagName.getText(n))return;return{ranges:[{start:s,length:c-s},{start:l,length:_-l}],wordPattern:i}}},getSpanOfEnclosingComment:function(e,t,n){const r=o.getCurrentSourceFile(e),i=Ede.getRangeOfEnclosingComment(r,t);return!i||n&&3!==i.kind?void 0:RQ(i)},getCodeFixesAtPosition:function(t,n,r,i,o,s=kG){y();const c=g(t),_=nc(n,r),u=Ede.getFormatContext(o,e);return z(oe(i,Pt,It),t=>(l.throwIfCancellationRequested(),Q5.getFixes({errorCode:t,sourceFile:c,span:_,program:a,host:e,cancellationToken:l,formatContext:u,preferences:s})))},getCombinedCodeFix:function(t,n,r,i=kG){y(),Tn.assert("file"===t.type);const o=g(t.fileName),s=Ede.getFormatContext(r,e);return Q5.getAllFixes({fixId:n,sourceFile:o,program:a,host:e,cancellationToken:l,formatContext:s,preferences:i})},applyCodeActionCommand:function(e,t){const n="string"==typeof e?t:e;return ct(n)?Promise.all(n.map(e=>k(e))):k(n)},organizeImports:function(t,n,r=kG){y(),Tn.assert("file"===t.type);const i=g(t.fileName),o=Ede.getFormatContext(n,e),s=t.mode??(t.skipDestructiveCodeActions?"SortAndCombine":"All");return m_e.organizeImports(i,o,e,a,r,s)},getEditsForFileRename:function(t,n,r,i=kG){return i1(v(),t,n,e,Ede.getFormatContext(r,e),i,m)},getEmitOutput:function(t,n,r){y();const i=g(t),o=e.getCustomTransformers&&e.getCustomTransformers();return HV(a,i,!!n,l,o,r)},getNonBoundSourceFile:function(e){return o.getCurrentSourceFile(e)},getProgram:v,getCurrentProgram:()=>a,getAutoImportProvider:function(){var t;return null==(t=e.getPackageJsonAutoImportProvider)?void 0:t.call(e)},updateIsDefinitionOfReferencedSymbols:function(t,n){const r=a.getTypeChecker(),i=function(){for(const i of t)for(const t of i.references){if(n.has(t)){const e=o(t);return Tn.assertIsDefined(e),r.getSymbolAtLocation(e)}const i=CY(t,m,nt(e,e.fileExists));if(i&&n.has(i)){const e=o(i);if(e)return r.getSymbolAtLocation(e)}}return}();if(!i)return!1;for(const r of t)for(const t of r.references){const r=o(t);if(Tn.assertIsDefined(r),n.has(t)||Ice.isDeclarationOfSymbol(r,i)){n.add(t),t.isDefinition=!0;const r=CY(t,m,nt(e,e.fileExists));r&&n.add(r)}else t.isDefinition=!1}return!0;function o(e){const t=a.getSourceFile(e.fileName);if(!t)return;const n=XX(t,e.textSpan.start);return Ice.Core.getAdjustedNode(n,{use:Ice.FindReferencesUse.References})}},getApplicableRefactors:function(e,t,n=kG,r,i,o){y();const a=g(e);return y6.getApplicableRefactors(P(a,t,n,kG,r,i),o)},getEditsForRefactor:function(e,t,n,r,i,o=kG,a){y();const s=g(e);return y6.getEditsForRefactor(P(s,n,o,t),r,i,a)},getMoveToRefactoringFileSuggestions:function(t,n,r=kG){y();const i=g(t),o=Tn.checkDefined(a.getSourceFiles()),s=mT(t),c=v4(P(i,n,r,kG)),l=b4(null==c?void 0:c.all),_=$(o,e=>{const t=mT(e.fileName);return!(null==a?void 0:a.isSourceFileFromExternalLibrary(i))&&!(i===g(e.fileName)||".ts"===s&&".d.ts"===t||".d.ts"===s&&ln(Wo(e.fileName),"lib.")&&".d.ts"===t)&&(s===t||(".tsx"===s&&".ts"===t||".jsx"===s&&".js"===t)&&!l)?e.fileName:void 0});return{newFileName:y4(i,a,e,c),files:_}},toLineColumnOffset:function(e,t){return 0===t?{line:0,character:0}:m.toLineColumnOffset(e,t)},getSourceMapper:()=>m,clearSourceMapperCache:()=>m.clearCache(),prepareCallHierarchy:function(e,t){y();const n=E5.resolveCallHierarchyDeclaration(a,XX(g(e),t));return n&&i0(n,e=>E5.createCallHierarchyItem(a,e))},provideCallHierarchyIncomingCalls:function(e,t){y();const n=g(e),r=o0(E5.resolveCallHierarchyDeclaration(a,0===t?n:XX(n,t)));return r?E5.getIncomingCalls(a,r,l):[]},provideCallHierarchyOutgoingCalls:function(e,t){y();const n=g(e),r=o0(E5.resolveCallHierarchyDeclaration(a,0===t?n:XX(n,t)));return r?E5.getOutgoingCalls(a,r):[]},toggleLineComment:C,toggleMultilineComment:w,commentSelection:function(e,t){const n=o.getCurrentSourceFile(e),{firstLine:r,lastLine:i}=T(n,t);return r===i&&t.pos!==t.end?w(e,t,!0):C(e,t,!0)},uncommentSelection:function(e,t){const n=o.getCurrentSourceFile(e),r=[],{pos:i}=t;let{end:a}=t;i===a&&(a+=dQ(n,i)?2:1);for(let t=i;t<=a;t++){const i=yQ(n,t);if(i){switch(i.kind){case 2:r.push(...C(e,{end:i.end,pos:i.pos+1},!1));break;case 3:r.push(...w(e,{end:i.end,pos:i.pos+1},!1))}t=i.end+1}}return r},provideInlayHints:function(t,n,r=kG){y();const i=g(t);return Rle.provideInlayHints(function(t,n,r){return{file:t,program:v(),host:e,span:n,preferences:r,cancellationToken:l}}(i,n,r))},getSupportedCodeFixes:d5,getPasteEdits:function(t,n){return y(),Efe.pasteEditsProvider(g(t.targetFile),t.pastedText,t.pasteLocations,t.copiedFrom?{file:g(t.copiedFrom.file),range:t.copiedFrom.range}:void 0,e,t.preferences,Ede.getFormatContext(n,e),l)},mapCode:function(t,n,r,i,a){return l_e.mapCode(o.getCurrentSourceFile(t),n,r,e,Ede.getFormatContext(i,e),a)}};switch(i){case 0:break;case 1:b5.forEach(e=>E[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:x5.forEach(e=>E[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.Syntactic`)});break;default:Tn.assertNever(i)}return E}function k5(e){return e.nameTable||function(e){const t=e.nameTable=new Map;e.forEachChild(function e(n){if(QN(n)&&!uX(n)&&n.escapedText||Kh(n)&&function(e){return yh(e)||283===e.parent.kind||function(e){return e&&e.parent&&212===e.parent.kind&&e.parent.argumentExpression===e}(e)||bh(e)}(n)){const e=ty(n);t.set(e,void 0===t.get(e)?n.pos:-1)}else if(YN(n)){const e=n.escapedText;t.set(e,void 0===t.get(e)?n.pos:-1)}if(KI(n,e),Ju(n))for(const t of n.jsDoc)KI(t,e)})}(e),e.nameTable}function T5(e){const t=function(e){switch(e.kind){case 11:case 15:case 9:if(167===e.parent.kind)return Vu(e.parent.parent)?e.parent.parent:void 0;case 80:return!Vu(e.parent)||210!==e.parent.parent.kind&&292!==e.parent.parent.kind||e.parent.name!==e?void 0:e.parent}return}(e);return t&&(nP(t.parent)||BE(t.parent))?t:void 0}function C5(e,t,n,r){const i=XQ(e.name);if(!i)return p;if(!n.isUnion()){const e=n.getProperty(i);return e?[e]:p}const o=nP(e.parent)||BE(e.parent)?O(n.types,n=>!t.isTypeInvalidDueToUnionDiscriminant(n,e.parent)):n.types,a=$(o,e=>e.getProperty(i));if(r&&(0===a.length||a.length===n.types.length)){const e=n.getProperty(i);if(e)return[e]}return o.length||a.length?oe(a,Pt):$(n.types,e=>e.getProperty(i))}function w5(e){if(To)return Yo(Vo(na(To.getExecutingFilePath())),qs(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}function N5(e,t,n){const r=[];n=_2(n,r);const i=ct(e)?e:[e],o=qq(void 0,void 0,aw,n,i,t,!0);return o.diagnostics=ne(o.diagnostics,r),o}oS({getNodeConstructor:()=>H7,getTokenConstructor:()=>Q7,getIdentifierConstructor:()=>Y7,getPrivateIdentifierConstructor:()=>Z7,getSourceFileConstructor:()=>a5,getSymbolConstructor:()=>X7,getTypeConstructor:()=>e5,getSignatureConstructor:()=>t5,getSourceMapSourceConstructor:()=>s5});var D5={};function P5(e,t){if(e.isDeclarationFile)return;let n=YX(e,t);const r=e.getLineAndCharacterOfPosition(t).line;if(e.getLineAndCharacterOfPosition(n.getStart(e)).line>r){const t=rQ(n.pos,e);if(!t||e.getLineAndCharacterOfPosition(t.getEnd()).line!==r)return;n=t}if(!(33554432&n.flags))return l(n);function i(t,n){const r=xI(t)?w(t.modifiers,gD):void 0;return nc(r?ds(e.text,r.end):t.getStart(e),(n||t).getEnd())}function o(t,n){return i(t,nQ(n,n.parent,e))}function a(t,n){return t&&r===e.getLineAndCharacterOfPosition(t.getStart(e)).line?l(t):l(n)}function s(t){return l(rQ(t.pos,e))}function c(t){return l(nQ(t,t.parent,e))}function l(t){if(t){const{parent:n}=t;switch(t.kind){case 243:return r(t.declarationList.declarations[0]);case 260:case 172:case 171:return r(t);case 169:return function e(t){if(O_(t.name))return p(t.name);if(function(e){return!!e.initializer||void 0!==e.dotDotDotToken||Wv(e,3)}(t))return i(t);{const n=t.parent,r=n.parameters.indexOf(t);return Tn.assert(-1!==r),0!==r?e(n.parameters[r-1]):l(n.body)}}(t);case 262:case 174:case 173:case 177:case 178:case 176:case 218:case 219:return function(e){if(!e.body)return;if(_(e))return i(e);return l(e.body)}(t);case 241:if(Hf(t))return function(e){const t=e.statements.length?e.statements[0]:e.getLastToken();if(_(e.parent))return a(e.parent,t);return l(t)}(t);case 268:return u(t);case 299:return u(t.block);case 244:return i(t.expression);case 253:return i(t.getChildAt(0),t.expression);case 247:return o(t,t.expression);case 246:return l(t.statement);case 259:return i(t.getChildAt(0));case 245:return o(t,t.expression);case 256:return l(t.statement);case 252:case 251:return i(t.getChildAt(0),t.label);case 248:return function(e){if(e.initializer)return d(e);if(e.condition)return i(e.condition);if(e.incrementor)return i(e.incrementor)}(t);case 249:return o(t,t.expression);case 250:return d(t);case 255:return o(t,t.expression);case 296:case 297:return l(t.statements[0]);case 258:return u(t.tryBlock);case 257:case 277:return i(t,t.expression);case 271:return i(t,t.moduleReference);case 272:case 278:return i(t,t.moduleSpecifier);case 267:if(1!==qR(t))return;case 263:case 266:case 306:case 208:return i(t);case 254:return l(t.statement);case 170:return function(t,n,r){if(t){const i=t.indexOf(n);if(i>=0){let n=i,o=i+1;for(;n>0&&r(t[n-1]);)n--;for(;o0)return l(t.declarations[0])}}function p(e){const t=h(e.elements,e=>232!==e.kind?e:void 0);return t?l(t):208===e.parent.kind?i(e.parent):n(e.parent)}function f(e){Tn.assert(207!==e.kind&&206!==e.kind);const t=h(209===e.kind?e.elements:e.properties,e=>232!==e.kind?e:void 0);return t?l(t):i(226===e.parent.kind?e.parent:e)}}}a(D5,{spanInSourceFileAtLocation:()=>P5});var E5={};function F5(e){return yD(e)||eE(e)}function A5(e){return(_P(e)||uP(e)||kP(e))&&F5(e.parent)&&e===e.parent.initializer&&QN(e.parent.name)&&(!!(2&gc(e.parent))||yD(e.parent))}function I5(e){return QE(e)||sE(e)||nE(e)||_P(e)||rE(e)||kP(e)||xD(e)||bD(e)||vD(e)||kD(e)||TD(e)}function O5(e){return QE(e)||sE(e)&&QN(e.name)||nE(e)||rE(e)||xD(e)||bD(e)||vD(e)||kD(e)||TD(e)||function(e){return(_P(e)||kP(e))&&Ic(e)}(e)||A5(e)}function j5(e){return QE(e)?e:Ic(e)?e.name:A5(e)?e.parent.name:Tn.checkDefined(e.modifiers&&C(e.modifiers,L5))}function L5(e){return 90===e.kind}function M5(e,t){const n=j5(t);return n&&e.getSymbolAtLocation(n)}function R5(e,t){if(t.body)return t;if(SD(t))return vv(t.parent);if(nE(t)||bD(t)){const n=M5(e,t);return n&&n.valueDeclaration&&g_(n.valueDeclaration)&&n.valueDeclaration.body?n.valueDeclaration:void 0}return t}function B5(e,t){const n=M5(e,t);let r;if(n&&n.declarations){const e=ie(n.declarations),t=M(n.declarations,e=>({file:e.getSourceFile().fileName,pos:e.pos}));e.sort((e,n)=>Rt(t[e].file,t[n].file)||t[e].pos-t[n].pos);const i=M(e,e=>n.declarations[e]);let o;for(const e of i)O5(e)&&(o&&o.parent===e.parent&&o.end===e.pos||(r=pe(r,e)),o=e)}return r}function J5(e,t){return xD(t)?t:g_(t)?R5(e,t)??B5(e,t)??t:B5(e,t)??t}function z5(e,t){const n=e.getTypeChecker();let r=!1;for(;;){if(O5(t))return J5(n,t);if(I5(t)){const e=xc(t,O5);return e&&J5(n,e)}if(yh(t)){if(O5(t.parent))return J5(n,t.parent);if(I5(t.parent)){const e=xc(t.parent,O5);return e&&J5(n,e)}return F5(t.parent)&&t.parent.initializer&&A5(t.parent.initializer)?t.parent.initializer:void 0}if(SD(t))return O5(t.parent)?t.parent:void 0;if(126!==t.kind||!xD(t.parent)){if(eE(t)&&t.initializer&&A5(t.initializer))return t.initializer;if(!r){let e=n.getSymbolAtLocation(t);if(e&&(2097152&e.flags&&(e=n.getAliasedSymbol(e)),e.valueDeclaration)){r=!0,t=e.valueDeclaration;continue}}return}t=t.parent}}function q5(e,t){const n=t.getSourceFile(),r=function(e,t){if(QE(t))return{text:t.fileName,pos:0,end:0};if((nE(t)||rE(t))&&!Ic(t)){const e=t.modifiers&&C(t.modifiers,L5);if(e)return{text:"default",pos:e.getStart(),end:e.getEnd()}}if(xD(t)){const n=ds(t.getSourceFile().text,tx(t).pos),r=n+6,i=e.getTypeChecker(),o=i.getSymbolAtLocation(t.parent);return{text:(o?`${i.symbolToString(o,t.parent)} `:"")+"static {}",pos:n,end:r}}const n=A5(t)?t.parent.name:Tn.checkDefined(jc(t),"Expected call hierarchy item to have a name");let r=QN(n)?wc(n):Kh(n)?n.text:pD(n)&&Kh(n.expression)?n.expression.text:void 0;if(void 0===r){const i=e.getTypeChecker(),o=i.getSymbolAtLocation(n);o&&(r=i.symbolToString(o,t))}if(void 0===r){const e=bU();r=yd(n=>e.writeNode(4,t,t.getSourceFile(),n))}return{text:r,pos:n.getStart(),end:n.getEnd()}}(e,t),i=function(e){var t,n,r,i;if(A5(e))return yD(e.parent)&&S_(e.parent.parent)?kP(e.parent.parent)?null==(t=Lc(e.parent.parent))?void 0:t.getText():null==(n=e.parent.parent.name)?void 0:n.getText():cE(e.parent.parent.parent.parent)&&QN(e.parent.parent.parent.parent.parent.name)?e.parent.parent.parent.parent.parent.name.getText():void 0;switch(e.kind){case 177:case 178:case 174:return 210===e.parent.kind?null==(r=Lc(e.parent))?void 0:r.getText():null==(i=jc(e.parent))?void 0:i.getText();case 262:case 263:case 267:if(cE(e.parent)&&QN(e.parent.parent.name))return e.parent.parent.name.getText()}}(t),o=bX(t),a=xQ(t),s=nc(ds(n.text,t.getFullStart(),!1,!0),t.getEnd()),c=nc(r.pos,r.end);return{file:n.fileName,kind:o,kindModifiers:a,name:r.text,containerName:i,span:s,selectionSpan:c}}function U5(e){return void 0!==e}function V5(e){if(e.kind===Ice.EntryKind.Node){const{node:t}=e;if(XG(t,!0,!0)||QG(t,!0,!0)||YG(t,!0,!0)||ZG(t,!0,!0)||pX(t)||fX(t)){const e=t.getSourceFile();return{declaration:xc(t,O5)||e,range:MQ(t,e)}}}}function W5(e){return KB(e.declaration)}function $5(e,t,n){if(QE(t)||sE(t)||xD(t))return[];const r=j5(t),i=O(Ice.findReferenceOrRenameEntries(e,n,e.getSourceFiles(),r,0,{use:Ice.FindReferencesUse.References},V5),U5);return i?Qe(i,W5,t=>function(e,t){return n=q5(e,t[0].declaration),r=M(t,e=>RQ(e.range)),{from:n,fromSpans:r};var n,r}(e,t)):[]}function H5(e,t){const n=[],r=function(e,t){function n(n){const r=sP(n)?n.tag:Iu(n)?n.tagName:qx(n)||xD(n)?n:n.expression,i=z5(e,r);if(i){const e=MQ(r,n.getSourceFile());if(ct(i))for(const n of i)t.push({declaration:n,range:e});else t.push({declaration:i,range:e})}}return function e(t){if(t&&!(33554432&t.flags))if(O5(t)){if(S_(t))for(const n of t.members)n.name&&pD(n.name)&&e(n.name.expression)}else{switch(t.kind){case 80:case 271:case 272:case 278:case 264:case 265:return;case 175:return void n(t);case 216:case 234:case 238:return void e(t.expression);case 260:case 169:return e(t.name),void e(t.initializer);case 213:case 214:return n(t),e(t.expression),void h(t.arguments,e);case 215:return n(t),e(t.tag),void e(t.template);case 286:case 285:return n(t),e(t.tagName),void e(t.attributes);case 170:return n(t),void e(t.expression);case 211:case 212:n(t),KI(t,e)}Af(t)||KI(t,e)}}}(e,n);switch(t.kind){case 307:!function(e,t){h(e.statements,t)}(t,r);break;case 267:!function(e,t){!Wv(e,128)&&e.body&&cE(e.body)&&h(e.body.statements,t)}(t,r);break;case 262:case 218:case 219:case 174:case 177:case 178:!function(e,t,n){const r=R5(e,t);r&&(h(r.parameters,n),n(r.body))}(e.getTypeChecker(),t,r);break;case 263:case 231:!function(e,t){h(e.modifiers,t);const n=Ph(e);n&&t(n.expression);for(const n of e.members)bI(n)&&h(n.modifiers,t),yD(n)?t(n.initializer):SD(n)&&n.body?(h(n.parameters,t),t(n.body)):xD(n)&&t(n)}(t,r);break;case 175:!function(e,t){t(e.body)}(t,r);break;default:Tn.assertNever(t)}return n}function K5(e,t){return 33554432&t.flags||vD(t)?[]:Qe(H5(e,t),W5,t=>function(e,t){return n=q5(e,t[0].declaration),r=M(t,e=>RQ(e.range)),{to:n,fromSpans:r};var n,r}(e,t))}a(E5,{createCallHierarchyItem:()=>q5,getIncomingCalls:()=>$5,getOutgoingCalls:()=>K5,resolveCallHierarchyDeclaration:()=>z5});var G5={};a(G5,{v2020:()=>X5});var X5={};a(X5,{TokenEncodingConsts:()=>L7,TokenModifier:()=>R7,TokenType:()=>M7,getEncodedSemanticClassifications:()=>J7,getSemanticClassifications:()=>B7});var Q5={};a(Q5,{PreserveOptionalFlags:()=>eoe,addNewNodeForMemberSymbol:()=>toe,codeFixAll:()=>u8,createCodeFixAction:()=>n8,createCodeFixActionMaybeFixAll:()=>r8,createCodeFixActionWithoutFixAll:()=>t8,createCombinedCodeActions:()=>l8,createFileTextChanges:()=>_8,createImportAdder:()=>Iee,createImportSpecifierResolver:()=>jee,createJsonPropertyAssignment:()=>moe,createMissingMemberNodes:()=>Yie,createSignatureDeclarationFromCallExpression:()=>roe,createSignatureDeclarationFromSignature:()=>noe,createStubbedBody:()=>doe,eachDiagnostic:()=>d8,findAncestorMatchingSpan:()=>boe,findJsonProperty:()=>goe,generateAccessorFromProperty:()=>xoe,getAccessorConvertiblePropertyAtPosition:()=>Coe,getAllFixes:()=>c8,getAllSupers:()=>Doe,getArgumentTypesAndTypeParameters:()=>soe,getFixes:()=>s8,getImportCompletionAction:()=>Lee,getImportKind:()=>Yee,getJSDocTypedefNodes:()=>bee,getNoopSymbolTrackerWithResolver:()=>Zie,getPromoteTypeOnlyCompletionAction:()=>Mee,getSupportedErrorCodes:()=>a8,importFixName:()=>Eee,importSymbols:()=>voe,parameterShouldGetTypeFromJSDoc:()=>Z8,registerCodeFix:()=>o8,setJsonCompilerOptionValue:()=>foe,setJsonCompilerOptionValues:()=>poe,tryGetAutoImportableReferenceFromTypeNode:()=>hoe,typeToAutoImportableTypeNode:()=>ooe});var Y5,Z5=rt(),e8=new Map;function t8(e,t,n){return i8(e,b0(n),t,void 0,void 0)}function n8(e,t,n,r,i,o){return i8(e,b0(n),t,r,b0(i),o)}function r8(e,t,n,r,i,o){return i8(e,b0(n),t,r,i&&b0(i),o)}function i8(e,t,n,r,i,o){return{fixName:e,description:t,changes:n,fixId:r,fixAllDescription:i,commands:o?[o]:void 0}}function o8(e){for(const t of e.errorCodes)Y5=void 0,Z5.add(String(t),e);if(e.fixIds)for(const t of e.fixIds)Tn.assert(!e8.has(t)),e8.set(t,e)}function a8(){return Y5??(Y5=We(Z5.keys()))}function s8(e){const t=p8(e);return z(Z5.get(String(e.errorCode)),n=>M(n.getCodeActions(e),function(e,t){const{errorCodes:n}=e;let r=0;for(const e of t)if(E(n,e.code)&&r++,r>1)break;const i=r<2;return({fixId:e,fixAllDescription:t,...n})=>i?n:{...n,fixId:e,fixAllDescription:t}}(n,t)))}function c8(e){return e8.get(pt(e.fixId,_t)).getAllCodeActions(e)}function l8(e,t){return{changes:e,commands:t}}function _8(e,t){return{fileName:e,textChanges:t}}function u8(e,t,n){const r=[];return l8(tde.ChangeTracker.with(e,i=>d8(e,t,e=>n(i,e,r))),0===r.length?void 0:r)}function d8(e,t,n){for(const r of p8(e))E(t,r.code)&&n(r)}function p8({program:e,sourceFile:t,cancellationToken:n}){const r=[...e.getSemanticDiagnostics(t,n),...e.getSyntacticDiagnostics(t,n),...V1(t,e,n)];return VS(e.getCompilerOptions())&&r.push(...e.getDeclarationDiagnostics(t,n)),r}var f8="addConvertToUnknownForNonOverlappingTypes",m8=[Ca.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function g8(e,t,n){const r=wP(n)?aw.createAsExpression(n.expression,aw.createKeywordTypeNode(159)):aw.createTypeAssertion(aw.createKeywordTypeNode(159),n.expression);e.replaceNode(t,n.expression,r)}function h8(e,t){if(!zm(e))return xc(YX(e,t),e=>wP(e)||cP(e))}o8({errorCodes:m8,getCodeActions:function(e){const t=h8(e.sourceFile,e.span.start);if(void 0===t)return;const n=tde.ChangeTracker.with(e,n=>g8(n,e.sourceFile,t));return[n8(f8,n,Ca.Add_unknown_conversion_for_non_overlapping_types,f8,Ca.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[f8],getAllCodeActions:e=>u8(e,m8,(e,t)=>{const n=h8(t.file,t.start);n&&g8(e,t.file,n)})}),o8({errorCodes:[Ca.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,Ca.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,Ca.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(e){const{sourceFile:t}=e;return[t8("addEmptyExportDeclaration",tde.ChangeTracker.with(e,e=>{const n=aw.createExportDeclaration(void 0,!1,aw.createNamedExports([]),void 0);e.insertNodeAtEndOfScope(t,t,n)}),Ca.Add_export_to_make_this_file_into_a_module)]}});var y8="addMissingAsync",v8=[Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,Ca.Type_0_is_not_assignable_to_type_1.code,Ca.Type_0_is_not_comparable_to_type_1.code];function b8(e,t,n,r){const i=n(n=>function(e,t,n,r){if(r&&r.has(KB(n)))return;null==r||r.add(KB(n));const i=aw.replaceModifiers(aZ(n,!0),aw.createNodeArray(aw.createModifiersFromModifierFlags(1024|ob(n))));e.replaceNode(t,n,i)}(n,e.sourceFile,t,r));return n8(y8,i,Ca.Add_async_modifier_to_containing_function,y8,Ca.Add_all_missing_async_modifiers)}function x8(e,t){if(!t)return;return xc(YX(e,t.start),n=>n.getStart(e)Us(t)?"quit":(uP(n)||bD(n)||_P(n)||nE(n))&&vY(t,jQ(n,e)))}o8({fixIds:[y8],errorCodes:v8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,cancellationToken:r,program:i,span:o}=e,a=C(i.getTypeChecker().getDiagnostics(t,r),function(e,t){return({start:n,length:r,relatedInformation:i,code:o})=>ut(n)&&ut(r)&&vY({start:n,length:r},e)&&o===t&&!!i&&ee(i,e=>e.code===Ca.Did_you_mean_to_mark_this_function_as_async.code)}(o,n)),s=x8(t,a&&a.relatedInformation&&C(a.relatedInformation,e=>e.code===Ca.Did_you_mean_to_mark_this_function_as_async.code));if(!s)return;return[b8(e,s,t=>tde.ChangeTracker.with(e,t))]},getAllCodeActions:e=>{const{sourceFile:t}=e,n=new Set;return u8(e,v8,(r,i)=>{const o=i.relatedInformation&&C(i.relatedInformation,e=>e.code===Ca.Did_you_mean_to_mark_this_function_as_async.code),a=x8(t,o);if(!a)return;return b8(e,a,e=>(e(r),[]),n)})}});var S8="addMissingAwait",k8=Ca.Property_0_does_not_exist_on_type_1.code,T8=[Ca.This_expression_is_not_callable.code,Ca.This_expression_is_not_constructable.code],C8=[Ca.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,Ca.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,Ca.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,Ca.Operator_0_cannot_be_applied_to_type_1.code,Ca.Operator_0_cannot_be_applied_to_types_1_and_2.code,Ca.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,Ca.This_condition_will_always_return_true_since_this_0_is_always_defined.code,Ca.Type_0_is_not_an_array_type.code,Ca.Type_0_is_not_an_array_type_or_a_string_type.code,Ca.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,Ca.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,Ca.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,Ca.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,Ca.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,k8,...T8];function w8(e,t,n,r,i){const o=r0(e,n);return o&&function(e,t,n,r,i){const o=i.getTypeChecker(),a=o.getDiagnostics(e,r);return ee(a,({start:e,length:r,relatedInformation:i,code:o})=>ut(e)&&ut(r)&&vY({start:e,length:r},n)&&o===t&&!!i&&ee(i,e=>e.code===Ca.Did_you_forget_to_use_await.code))}(e,t,n,r,i)&&E8(o)?o:void 0}function N8(e,t,n,r,i,o){const{sourceFile:a,program:s,cancellationToken:c}=e,l=function(e,t,n,r,i){const o=function(e,t){if(rP(e.parent)&&QN(e.parent.expression))return{identifiers:[e.parent.expression],isCompleteFix:!0};if(QN(e))return{identifiers:[e],isCompleteFix:!0};if(yP(e)){let n,r=!0;for(const i of[e.left,e.right]){const e=t.getTypeAtLocation(i);if(t.getPromisedTypeOfPromise(e)){if(!QN(i)){r=!1;continue}(n||(n=[])).push(i)}}return n&&{identifiers:n,isCompleteFix:r}}}(e,i);if(!o)return;let a,s=o.isCompleteFix;for(const e of o.identifiers){const o=i.getSymbolAtLocation(e);if(!o)continue;const c=dt(o.valueDeclaration,eE),l=c&&dt(c.name,QN),_=Oh(c,243);if(!c||!_||c.type||!c.initializer||_.getSourceFile()!==t||Wv(_,32)||!l||!E8(c.initializer)){s=!1;continue}const u=r.getSemanticDiagnostics(t,n);Ice.Core.eachSymbolReferenceInFile(l,i,t,n=>e!==n&&!P8(n,u,t,i))?s=!1:(a||(a=[])).push({expression:c.initializer,declarationSymbol:o})}return a&&{initializers:a,needsSecondPassForFixAll:!s}}(t,a,c,s,r);if(l){return t8("addMissingAwaitToInitializer",i(e=>{h(l.initializers,({expression:t})=>F8(e,n,a,r,t,o)),o&&l.needsSecondPassForFixAll&&F8(e,n,a,r,t,o)}),1===l.initializers.length?[Ca.Add_await_to_initializer_for_0,l.initializers[0].declarationSymbol.name]:Ca.Add_await_to_initializers)}}function D8(e,t,n,r,i,o){const a=i(i=>F8(i,n,e.sourceFile,r,t,o));return n8(S8,a,Ca.Add_await,S8,Ca.Fix_all_expressions_possibly_missing_await)}function P8(e,t,n,r){const i=rP(e.parent)?e.parent.name:yP(e.parent)?e.parent:e,o=C(t,e=>e.start===i.getStart(n)&&e.start+e.length===i.getEnd());return o&&E(C8,o.code)||1&r.getTypeAtLocation(i).flags}function E8(e){return 65536&e.flags||!!xc(e,e=>e.parent&&uP(e.parent)&&e.parent.body===e||jP(e)&&(262===e.parent.kind||218===e.parent.kind||219===e.parent.kind||174===e.parent.kind))}function F8(e,t,n,r,i,o){if(VP(i.parent)&&!i.parent.awaitModifier){const t=r.getTypeAtLocation(i),o=r.getAsyncIterableType();if(o&&r.isTypeAssignableTo(t,o)){const t=i.parent;return void e.replaceNode(n,t,aw.updateForOfStatement(t,aw.createToken(135),t.initializer,t.expression,t.statement))}}if(yP(i))for(const t of[i.left,i.right]){if(o&&QN(t)){const e=r.getSymbolAtLocation(t);if(e&&o.has(GB(e)))continue}const i=r.getTypeAtLocation(t),a=r.getPromisedTypeOfPromise(i)?aw.createAwaitExpression(t):t;e.replaceNode(n,t,a)}else if(t===k8&&rP(i.parent)){if(o&&QN(i.parent.expression)){const e=r.getSymbolAtLocation(i.parent.expression);if(e&&o.has(GB(e)))return}e.replaceNode(n,i.parent.expression,aw.createParenthesizedExpression(aw.createAwaitExpression(i.parent.expression))),A8(e,i.parent.expression,n)}else if(E(T8,t)&&K_(i.parent)){if(o&&QN(i)){const e=r.getSymbolAtLocation(i);if(e&&o.has(GB(e)))return}e.replaceNode(n,i,aw.createParenthesizedExpression(aw.createAwaitExpression(i))),A8(e,i,n)}else{if(o&&eE(i.parent)&&QN(i.parent.name)){const e=r.getSymbolAtLocation(i.parent.name);if(e&&!X(o,GB(e)))return}e.replaceNode(n,i,aw.createAwaitExpression(i))}}function A8(e,t,n){const r=rQ(t.pos,n);r&&RZ(r.end,r.parent,n)&&e.insertText(n,t.getStart(n),";")}o8({fixIds:[S8],errorCodes:C8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,span:r,cancellationToken:i,program:o}=e,a=w8(t,n,r,i,o);if(!a)return;const s=e.program.getTypeChecker(),c=t=>tde.ChangeTracker.with(e,t);return ue([N8(e,a,n,s,c),D8(e,a,n,s,c)])},getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=e.program.getTypeChecker(),o=new Set;return u8(e,C8,(a,s)=>{const c=w8(t,s.code,s,r,n);if(!c)return;const l=e=>(e(a),[]);return N8(e,c,s.code,i,l,o)||D8(e,c,s.code,i,l,o)})}});var I8="addMissingConst",O8=[Ca.Cannot_find_name_0.code,Ca.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];function j8(e,t,n,r,i){const o=YX(t,n),a=xc(o,e=>_u(e.parent)?e.parent.initializer===e:!function(e){switch(e.kind){case 80:case 209:case 210:case 303:case 304:return!0;default:return!1}}(e)&&"quit");if(a)return L8(e,a,t,i);const s=o.parent;if(yP(s)&&64===s.operatorToken.kind&&RP(s.parent))return L8(e,o,t,i);if(tP(s)){const n=r.getTypeChecker();if(!T(s.elements,e=>function(e,t){const n=QN(e)?e:xb(e,!0)&&QN(e.left)?e.left:void 0;return!!n&&!t.getSymbolAtLocation(n)}(e,n)))return;return L8(e,s,t,i)}const c=xc(o,e=>!!RP(e.parent)||!function(e){switch(e.kind){case 80:case 226:case 28:return!0;default:return!1}}(e)&&"quit");if(c){if(!M8(c,r.getTypeChecker()))return;return L8(e,c,t,i)}}function L8(e,t,n,r){r&&!X(r,t)||e.insertModifierBefore(n,87,t)}function M8(e,t){return!!yP(e)&&(28===e.operatorToken.kind?T([e.left,e.right],e=>M8(e,t)):64===e.operatorToken.kind&&QN(e.left)&&!t.getSymbolAtLocation(e.left))}o8({errorCodes:O8,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>j8(t,e.sourceFile,e.span.start,e.program));if(t.length>0)return[n8(I8,t,Ca.Add_const_to_unresolved_variable,I8,Ca.Add_const_to_all_unresolved_variables)]},fixIds:[I8],getAllCodeActions:e=>{const t=new Set;return u8(e,O8,(n,r)=>j8(n,r.file,r.start,e.program,t))}});var R8="addMissingDeclareProperty",B8=[Ca.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function J8(e,t,n,r){const i=YX(t,n);if(!QN(i))return;const o=i.parent;172!==o.kind||r&&!X(r,o)||e.insertModifierBefore(t,138,o)}o8({errorCodes:B8,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>J8(t,e.sourceFile,e.span.start));if(t.length>0)return[n8(R8,t,Ca.Prefix_with_declare,R8,Ca.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[R8],getAllCodeActions:e=>{const t=new Set;return u8(e,B8,(e,n)=>J8(e,n.file,n.start,t))}});var z8="addMissingInvocationForDecorator",q8=[Ca._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function U8(e,t,n){const r=xc(YX(t,n),gD);Tn.assert(!!r,"Expected position to be owned by a decorator.");const i=aw.createCallExpression(r.expression,void 0,void 0);e.replaceNode(t,r.expression,i)}o8({errorCodes:q8,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>U8(t,e.sourceFile,e.span.start));return[n8(z8,t,Ca.Call_decorator_expression,z8,Ca.Add_to_all_uncalled_decorators)]},fixIds:[z8],getAllCodeActions:e=>u8(e,q8,(e,t)=>U8(e,t.file,t.start))});var V8="addNameToNamelessParameter",W8=[Ca.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function $8(e,t,n){const r=YX(t,n),i=r.parent;if(!mD(i))return Tn.fail("Tried to add a parameter name to a non-parameter: "+Tn.formatSyntaxKind(r.kind));const o=i.parent.parameters.indexOf(i);Tn.assert(!i.type,"Tried to add a parameter name to a parameter that already had one."),Tn.assert(o>-1,"Parameter not found in parent parameter list.");let a=i.name.getEnd(),s=aw.createTypeReferenceNode(i.name,void 0),c=H8(t,i);for(;c;)s=aw.createArrayTypeNode(s),a=c.getEnd(),c=H8(t,c);const l=aw.createParameterDeclaration(i.modifiers,i.dotDotDotToken,"arg"+o,i.questionToken,i.dotDotDotToken&&!OD(s)?aw.createArrayTypeNode(s):s,i.initializer);e.replaceRange(t,Qb(i.getStart(t),a),l)}function H8(e,t){const n=nQ(t.name,t.parent,e);if(n&&23===n.kind&&ZD(n.parent)&&mD(n.parent.parent))return n.parent.parent}o8({errorCodes:W8,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>$8(t,e.sourceFile,e.span.start));return[n8(V8,t,Ca.Add_parameter_name,V8,Ca.Add_names_to_all_parameters_without_names)]},fixIds:[V8],getAllCodeActions:e=>u8(e,W8,(e,t)=>$8(e,t.file,t.start))});var K8="addOptionalPropertyUndefined";function G8(e,t){var n;if(e){if(yP(e.parent)&&64===e.parent.operatorToken.kind)return{source:e.parent.right,target:e.parent.left};if(eE(e.parent)&&e.parent.initializer)return{source:e.parent.initializer,target:e.parent.name};if(oP(e.parent)){const n=t.getSymbolAtLocation(e.parent.expression);if(!(null==n?void 0:n.valueDeclaration)||!v_(n.valueDeclaration.kind))return;if(!nu(e))return;const r=e.parent.arguments.indexOf(e);if(-1===r)return;const i=n.valueDeclaration.parameters[r].name;if(QN(i))return{source:e,target:i}}else if(HE(e.parent)&&QN(e.parent.name)||KE(e.parent)){const r=G8(e.parent.parent,t);if(!r)return;const i=t.getPropertyOfType(t.getTypeAtLocation(r.target),e.parent.name.text),o=null==(n=null==i?void 0:i.declarations)?void 0:n[0];if(!o)return;return{source:HE(e.parent)?e.parent.initializer:e.parent.name,target:o}}}}o8({errorCodes:[Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code],getCodeActions(e){const t=e.program.getTypeChecker(),n=function(e,t,n){var r,i;const o=G8(r0(e,t),n);if(!o)return p;const{source:a,target:s}=o,c=function(e,t,n){return rP(t)&&!!n.getExactOptionalProperties(n.getTypeAtLocation(t.expression)).length&&n.getTypeAtLocation(e)===n.getUndefinedType()}(a,s,n)?n.getTypeAtLocation(s.expression):n.getTypeAtLocation(s);if(null==(i=null==(r=c.symbol)?void 0:r.declarations)?void 0:i.some(e=>Dd(e).fileName.match(/\.d\.ts$/)))return p;return n.getExactOptionalProperties(c)}(e.sourceFile,e.span,t);if(!n.length)return;const r=tde.ChangeTracker.with(e,e=>function(e,t){for(const n of t){const t=n.valueDeclaration;if(t&&(hD(t)||yD(t))&&t.type){const n=aw.createUnionTypeNode([...192===t.type.kind?t.type.types:[t.type],aw.createTypeReferenceNode("undefined")]);e.replaceNode(t.getSourceFile(),t.type,n)}}}(e,n));return[t8(K8,r,Ca.Add_undefined_to_optional_property_type)]},fixIds:[K8]});var X8="annotateWithTypeFromJSDoc",Q8=[Ca.JSDoc_types_may_be_moved_to_TypeScript_types.code];function Y8(e,t){const n=YX(e,t);return dt(mD(n.parent)?n.parent.parent:n.parent,Z8)}function Z8(e){return function(e){return g_(e)||260===e.kind||171===e.kind||172===e.kind}(e)&&e9(e)}function e9(e){return g_(e)?e.parameters.some(e9)||!e.type&&!!pl(e):!e.type&&!!dl(e)}function t9(e,t,n){if(g_(n)&&(pl(n)||n.parameters.some(e=>!!dl(e)))){if(!n.typeParameters){const r=Av(n);r.length&&e.insertTypeParameters(t,n,r)}const r=uP(n)&&!RX(n,21,t);r&&e.insertNodeBefore(t,Ne(n.parameters),aw.createToken(21));for(const r of n.parameters)if(!r.type){const n=dl(r);n&&e.tryInsertTypeAnnotation(t,r,iJ(n,n9,A_))}if(r&&e.insertNodeAfter(t,Ee(n.parameters),aw.createToken(22)),!n.type){const r=pl(n);r&&e.tryInsertTypeAnnotation(t,n,iJ(r,n9,A_))}}else{const r=Tn.checkDefined(dl(n),"A JSDocType for this declaration should exist");Tn.assert(!n.type,"The JSDocType decl should have a type"),e.tryInsertTypeAnnotation(t,n,iJ(r,n9,A_))}}function n9(e){switch(e.kind){case 312:case 313:return aw.createTypeReferenceNode("any",p);case 316:return function(e){return aw.createUnionTypeNode([iJ(e.type,n9,A_),aw.createTypeReferenceNode("undefined",p)])}(e);case 315:return n9(e.type);case 314:return function(e){return aw.createUnionTypeNode([iJ(e.type,n9,A_),aw.createTypeReferenceNode("null",p)])}(e);case 318:return function(e){return aw.createArrayTypeNode(iJ(e.type,n9,A_))}(e);case 317:return function(e){return aw.createFunctionTypeNode(p,e.parameters.map(r9),e.type??aw.createKeywordTypeNode(133))}(e);case 183:return function(e){let t=e.typeName,n=e.typeArguments;if(QN(e.typeName)){if(Wm(e))return function(e){const t=aw.createParameterDeclaration(void 0,void 0,150===e.typeArguments[0].kind?"n":"s",void 0,aw.createTypeReferenceNode(150===e.typeArguments[0].kind?"number":"string",[]),void 0),n=aw.createTypeLiteralNode([aw.createIndexSignature(void 0,[t],e.typeArguments[1])]);return dw(n,1),n}(e);let r=e.typeName.text;switch(e.typeName.text){case"String":case"Boolean":case"Object":case"Number":r=r.toLowerCase();break;case"array":case"date":case"promise":r=r[0].toUpperCase()+r.slice(1)}t=aw.createIdentifier(r),n="Array"!==r&&"Promise"!==r||e.typeArguments?oJ(e.typeArguments,n9,A_):aw.createNodeArray([aw.createTypeReferenceNode("any",p)])}return aw.createTypeReferenceNode(t,n)}(e);case 322:return function(e){const t=aw.createTypeLiteralNode(M(e.jsDocPropertyTags,e=>aw.createPropertySignature(void 0,QN(e.name)?e.name:e.name.right,cC(e)?aw.createToken(58):void 0,e.typeExpression&&iJ(e.typeExpression.type,n9,A_)||aw.createKeywordTypeNode(133))));return dw(t,1),t}(e);default:const t=fJ(e,n9,void 0);return dw(t,1),t}}function r9(e){const t=e.parent.parameters.indexOf(e),n=318===e.type.kind&&t===e.parent.parameters.length-1,r=e.name||(n?"rest":"arg"+t),i=n?aw.createToken(26):e.dotDotDotToken;return aw.createParameterDeclaration(e.modifiers,i,r,e.questionToken,iJ(e.type,n9,A_),e.initializer)}o8({errorCodes:Q8,getCodeActions(e){const t=Y8(e.sourceFile,e.span.start);if(!t)return;const n=tde.ChangeTracker.with(e,n=>t9(n,e.sourceFile,t));return[n8(X8,n,Ca.Annotate_with_type_from_JSDoc,X8,Ca.Annotate_everything_with_types_from_JSDoc)]},fixIds:[X8],getAllCodeActions:e=>u8(e,Q8,(e,t)=>{const n=Y8(t.file,t.start);n&&t9(e,t.file,n)})});var i9="convertFunctionToEs6Class",o9=[Ca.This_constructor_function_may_be_converted_to_a_class_declaration.code];function a9(e,t,n,r,i,o){const a=r.getSymbolAtLocation(YX(t,n));if(!(a&&a.valueDeclaration&&19&a.flags))return;const s=a.valueDeclaration;if(nE(s)||_P(s))e.replaceNode(t,s,function(e){const t=c(a);e.body&&t.unshift(aw.createConstructorDeclaration(void 0,e.parameters,e.body));const n=s9(e,95);return aw.createClassDeclaration(n,e.name,void 0,void 0,t)}(s));else if(eE(s)){const n=function(e){const t=e.initializer;if(!t||!_P(t)||!QN(e.name))return;const n=c(e.symbol);t.body&&n.unshift(aw.createConstructorDeclaration(void 0,t.parameters,t.body));const r=s9(e.parent.parent,95);return aw.createClassDeclaration(r,e.name,void 0,void 0,n)}(s);if(!n)return;const r=s.parent.parent;tE(s.parent)&&s.parent.declarations.length>1?(e.delete(t,s),e.insertNodeAfter(t,r,n)):e.replaceNode(t,r,n)}function c(n){const r=[];return n.exports&&n.exports.forEach(e=>{if("prototype"===e.name&&e.declarations){const t=e.declarations[0];if(1===e.declarations.length&&rP(t)&&yP(t.parent)&&64===t.parent.operatorToken.kind&&nP(t.parent.right)){a(t.parent.right.symbol,void 0,r)}}else a(e,[aw.createToken(126)],r)}),n.members&&n.members.forEach((i,o)=>{var s,c,l,_;if("constructor"===o&&i.valueDeclaration){const r=null==(_=null==(l=null==(c=null==(s=n.exports)?void 0:s.get("prototype"))?void 0:c.declarations)?void 0:l[0])?void 0:_.parent;return void(r&&yP(r)&&nP(r.right)&&ee(r.right.properties,c9)||e.delete(t,i.valueDeclaration.parent))}a(i,void 0,r)}),r;function a(n,r,a){if(!(8192&n.flags||4096&n.flags))return;const s=n.valueDeclaration,c=s.parent,l=c.right;if(u=l,!(qx(_=s)?rP(_)&&c9(_)||f_(u):T(_.properties,e=>!!(bD(e)||Tl(e)||HE(e)&&_P(e.initializer)&&e.name||c9(e)))))return;var _,u;if(ee(a,e=>{const t=jc(e);return!(!t||!QN(t)||wc(t)!==Dc(n))}))return;const d=c.parent&&244===c.parent.kind?c.parent:c;if(e.delete(t,d),l){if(qx(s)&&(_P(l)||uP(l))){const e=sY(t,i),n=function(e,t,n){if(rP(e))return e.name;const r=e.argumentExpression;if(AN(r))return r;if(Ku(r))return Es(r.text,OS(t))?aw.createIdentifier(r.text):MN(r)?aw.createStringLiteral(r.text,0===n):r;return}(s,o,e);return void(n&&p(a,l,n))}if(!nP(l)){if(Bm(t))return;if(!rP(s))return;const e=aw.createPropertyDeclaration(r,s.name,void 0,void 0,l);return vZ(c.parent,e,t),void a.push(e)}h(l.properties,e=>{(bD(e)||Tl(e))&&a.push(e),HE(e)&&_P(e.initializer)&&p(a,e.initializer,e.name),c9(e)})}else a.push(aw.createPropertyDeclaration(r,n.name,void 0,void 0,void 0));function p(e,n,i){return _P(n)?function(e,n,i){const o=ne(r,s9(n,134)),a=aw.createMethodDeclaration(o,void 0,i,void 0,void 0,n.parameters,void 0,n.body);return vZ(c,a,t),void e.push(a)}(e,n,i):function(e,n,i){const o=n.body;let a;a=241===o.kind?o:aw.createBlock([aw.createReturnStatement(o)]);const s=ne(r,s9(n,134)),l=aw.createMethodDeclaration(s,void 0,i,void 0,void 0,n.parameters,void 0,a);vZ(c,l,t),e.push(l)}(e,n,i)}}}}function s9(e,t){return bI(e)?O(e.modifiers,e=>e.kind===t):void 0}function c9(e){return!!e.name&&!(!QN(e.name)||"constructor"!==e.name.text)}o8({errorCodes:o9,getCodeActions(e){const t=tde.ChangeTracker.with(e,t=>a9(t,e.sourceFile,e.span.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions()));return[n8(i9,t,Ca.Convert_function_to_an_ES2015_class,i9,Ca.Convert_all_constructor_functions_to_classes)]},fixIds:[i9],getAllCodeActions:e=>u8(e,o9,(t,n)=>a9(t,n.file,n.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions()))});var l9="convertToAsyncFunction",_9=[Ca.This_may_be_converted_to_an_async_function.code],u9=!0;function d9(e,t,n,r){const i=YX(t,n);let o;if(o=QN(i)&&eE(i.parent)&&i.parent.initializer&&g_(i.parent.initializer)?i.parent.initializer:dt(rm(YX(t,n)),e2),!o)return;const a=new Map,s=zm(o),c=function(e,t){if(!e.body)return new Set;const n=new Set;return KI(e.body,function e(r){p9(r,t,"then")?(n.add(KB(r)),h(r.arguments,e)):p9(r,t,"catch")||p9(r,t,"finally")?(n.add(KB(r)),KI(r,e)):g9(r,t)?n.add(KB(r)):KI(r,e)}),n}(o,r),l=function(e,t,n){const r=new Map,i=rt();return KI(e,function e(o){if(!QN(o))return void KI(o,e);const a=t.getSymbolAtLocation(o);if(a){const e=P9(t.getTypeAtLocation(o),t),s=GB(a).toString();if(!e||mD(o.parent)||g_(o.parent)||n.has(s)){if(o.parent&&(mD(o.parent)||eE(o.parent)||eP(o.parent))){const e=o.text,t=i.get(e);if(t&&t.some(e=>e!==a)){const t=h9(o,i);r.set(s,t.identifier),n.set(s,t),i.add(e,a)}else{const t=aZ(o);n.set(s,I9(t)),i.add(e,a)}}}else{const t=Ce(e.parameters),r=(null==t?void 0:t.valueDeclaration)&&mD(t.valueDeclaration)&&dt(t.valueDeclaration.name,QN)||aw.createUniqueName("result",16),o=h9(r,i);n.set(s,o),i.add(r.text,a)}}}),sZ(e,!0,e=>{if(eP(e)&&QN(e.name)&&YD(e.parent)){const n=t.getSymbolAtLocation(e.name),i=n&&r.get(String(GB(n)));if(i&&i.text!==(e.name||e.propertyName).getText())return aw.createBindingElement(e.dotDotDotToken,e.propertyName||e.name,i,e.initializer)}else if(QN(e)){const n=t.getSymbolAtLocation(e),i=n&&r.get(String(GB(n)));if(i)return aw.createIdentifier(i.text)}})}(o,r,a);if(!H1(l,r))return;const _=l.body&&jP(l.body)?function(e,t){const n=[];return jf(e,e=>{K1(e,t)&&n.push(e)}),n}(l.body,r):p,u={checker:r,synthNamesMap:a,setOfExpressionsToReturn:c,isInJSFile:s};if(!_.length)return;const d=ds(t.text,tx(o).pos);e.insertModifierAt(t,d,134,{suffix:" "});for(const n of _)if(KI(n,function r(i){if(oP(i)){const r=b9(i,i,u,!1);if(y9())return!0;e.replaceNodeWithNodes(t,n,r)}else if(!f_(i)&&(KI(i,r),y9()))return!0}),y9())return}function p9(e,t,n){if(!oP(e))return!1;const r=sX(e,n)&&t.getTypeAtLocation(e);return!(!r||!t.getPromisedTypeOfPromise(r))}function f9(e,t){return!!(4&Ox(e))&&e.target===t}function m9(e,t,n){if("finally"===e.expression.name.escapedText)return;const r=n.getTypeAtLocation(e.expression.expression);if(f9(r,n.getPromiseType())||f9(r,n.getPromiseLikeType())){if("then"!==e.expression.name.escapedText)return Te(e.typeArguments,0);if(t===Te(e.arguments,0))return Te(e.typeArguments,0);if(t===Te(e.arguments,1))return Te(e.typeArguments,1)}}function g9(e,t){return!!nu(e)&&!!t.getPromisedTypeOfPromise(t.getTypeAtLocation(e))}function h9(e,t){const n=(t.get(e.text)||p).length;return I9(0===n?e:aw.createIdentifier(e.text+"_"+n))}function y9(){return!u9}function v9(){return u9=!1,p}function b9(e,t,n,r,i){if(p9(t,n.checker,"then"))return function(e,t,n,r,i,o){if(!t||x9(r,t))return T9(e,n,r,i,o);if(n&&!x9(r,n))return v9();const a=F9(t,r),s=b9(e.expression.expression,e.expression.expression,r,!0,a);if(y9())return v9();const c=N9(t,i,o,a,e,r);return y9()?v9():ne(s,c)}(t,Te(t.arguments,0),Te(t.arguments,1),n,r,i);if(p9(t,n.checker,"catch"))return T9(t,Te(t.arguments,0),n,r,i);if(p9(t,n.checker,"finally"))return function(e,t,n,r,i){if(!t||x9(n,t))return b9(e,e.expression.expression,n,r,i);const o=S9(e,n,i),a=b9(e,e.expression.expression,n,!0,o);if(y9())return v9();const s=N9(t,r,void 0,void 0,e,n);if(y9())return v9();const c=aw.createBlock(a),l=aw.createBlock(s),_=aw.createTryStatement(c,void 0,l);return k9(e,n,_,o,i)}(t,Te(t.arguments,0),n,r,i);if(rP(t))return b9(e,t.expression,n,r,i);const o=n.checker.getTypeAtLocation(t);return o&&n.checker.getPromisedTypeOfPromise(o)?(Tn.assertNode(bc(t).parent,rP),function(e,t,n,r,i){if(B9(e,n)){let e=aZ(t);return r&&(e=aw.createAwaitExpression(e)),[aw.createReturnStatement(e)]}return C9(i,aw.createAwaitExpression(t),void 0)}(e,t,n,r,i)):v9()}function x9({checker:e},t){if(106===t.kind)return!0;if(QN(t)&&!n_(t)&&"undefined"===wc(t)){const n=e.getSymbolAtLocation(t);return!n||e.isUndefinedSymbol(n)}return!1}function S9(e,t,n){let r;return n&&!B9(e,t)&&(R9(n)?(r=n,t.synthNamesMap.forEach((e,r)=>{if(e.identifier.text===n.identifier.text){const e=(i=n,I9(aw.createUniqueName(i.identifier.text,16)));t.synthNamesMap.set(r,e)}var i})):r=I9(aw.createUniqueName("result",16),n.types),M9(r)),r}function k9(e,t,n,r,i){const o=[];let a;if(r&&!B9(e,t)){a=aZ(M9(r));const e=r.types,n=t.checker.getUnionType(e,2),i=t.isInJSFile?void 0:t.checker.typeToTypeNode(n,void 0,void 0),s=[aw.createVariableDeclaration(a,void 0,i)],c=aw.createVariableStatement(void 0,aw.createVariableDeclarationList(s,1));o.push(c)}return o.push(n),i&&a&&1===i.kind&&o.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(aZ(L9(i)),void 0,void 0,a)],2))),o}function T9(e,t,n,r,i){if(!t||x9(n,t))return b9(e,e.expression.expression,n,r,i);const o=F9(t,n),a=S9(e,n,i),s=b9(e,e.expression.expression,n,!0,a);if(y9())return v9();const c=N9(t,r,a,o,e,n);if(y9())return v9();const l=aw.createBlock(s),_=aw.createCatchClause(o&&aZ(j9(o)),aw.createBlock(c));return k9(e,n,aw.createTryStatement(l,_,void 0),a,i)}function C9(e,t,n){return!e||A9(e)?[aw.createExpressionStatement(t)]:R9(e)&&e.hasBeenDeclared?[aw.createExpressionStatement(aw.createAssignment(aZ(O9(e)),t))]:[aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(aZ(j9(e)),void 0,n,t)],2))]}function w9(e,t){if(t&&e){const n=aw.createUniqueName("result",16);return[...C9(I9(n),e,t),aw.createReturnStatement(n)]}return[aw.createReturnStatement(e)]}function N9(e,t,n,r,i,o){var a;switch(e.kind){case 106:break;case 211:case 80:if(!r)break;const s=aw.createCallExpression(aZ(e),void 0,R9(r)?[O9(r)]:[]);if(B9(i,o))return w9(s,m9(i,e,o.checker));const c=o.checker.getTypeAtLocation(e),l=o.checker.getSignaturesOfType(c,0);if(!l.length)return v9();const _=l[0].getReturnType(),u=C9(n,aw.createAwaitExpression(s),m9(i,e,o.checker));return n&&n.types.push(o.checker.getAwaitedType(_)||_),u;case 218:case 219:{const r=e.body,s=null==(a=P9(o.checker.getTypeAtLocation(e),o.checker))?void 0:a.getReturnType();if(jP(r)){let a=[],c=!1;for(const l of r.statements)if(HP(l))if(c=!0,K1(l,o.checker))a=a.concat(E9(o,l,t,n));else{const t=s&&l.expression?D9(o.checker,s,l.expression):l.expression;a.push(...w9(t,m9(i,e,o.checker)))}else{if(t&&jf(l,gt))return v9();a.push(l)}return B9(i,o)?a.map(e=>aZ(e)):function(e,t,n,r){const i=[];for(const r of e)if(HP(r)){if(r.expression){const e=g9(r.expression,n.checker)?aw.createAwaitExpression(r.expression):r.expression;void 0===t?i.push(aw.createExpressionStatement(e)):R9(t)&&t.hasBeenDeclared?i.push(aw.createExpressionStatement(aw.createAssignment(O9(t),e))):i.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(j9(t),void 0,void 0,e)],2)))}}else i.push(aZ(r));r||void 0===t||i.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(j9(t),void 0,void 0,aw.createIdentifier("undefined"))],2)));return i}(a,n,o,c)}{const a=G1(r,o.checker)?E9(o,aw.createReturnStatement(r),t,n):p;if(a.length>0)return a;if(s){const t=D9(o.checker,s,r);if(B9(i,o))return w9(t,m9(i,e,o.checker));{const e=C9(n,t,void 0);return n&&n.types.push(o.checker.getAwaitedType(s)||s),e}}return v9()}}default:return v9()}return p}function D9(e,t,n){const r=aZ(n);return e.getPromisedTypeOfPromise(t)?aw.createAwaitExpression(r):r}function P9(e,t){return Pe(t.getSignaturesOfType(e,0))}function E9(e,t,n,r){let i=[];return KI(t,function t(o){if(oP(o)){const t=b9(o,o,e,n,r);if(i=i.concat(t),i.length>0)return}else f_(o)||KI(o,t)}),i}function F9(e,t){const n=[];let r;if(g_(e)){if(e.parameters.length>0){r=function e(t){if(QN(t))return i(t);const n=z(t.elements,t=>TP(t)?[]:[e(t.name)]);return function(e,t=p,n=[]){return{kind:1,bindingPattern:e,elements:t,types:n}}(t,n)}(e.parameters[0].name)}}else QN(e)?r=i(e):rP(e)&&QN(e.name)&&(r=i(e.name));if(r&&(!("identifier"in r)||"undefined"!==r.identifier.text))return r;function i(e){var r;const i=function(e){var n;return(null==(n=dt(e,vu))?void 0:n.symbol)??t.checker.getSymbolAtLocation(e)}((r=e).original?r.original:r);if(!i)return I9(e,n);return t.synthNamesMap.get(GB(i).toString())||I9(e,n)}}function A9(e){return!e||(R9(e)?!e.identifier.text:T(e.elements,A9))}function I9(e,t=[]){return{kind:0,identifier:e,types:t,hasBeenDeclared:!1,hasBeenReferenced:!1}}function O9(e){return e.hasBeenReferenced=!0,e.identifier}function j9(e){return R9(e)?M9(e):L9(e)}function L9(e){for(const t of e.elements)j9(t);return e.bindingPattern}function M9(e){return e.hasBeenDeclared=!0,e.identifier}function R9(e){return 0===e.kind}function B9(e,t){return!!e.original&&t.setOfExpressionsToReturn.has(KB(e.original))}function J9(e,t,n,r,i){var o;for(const a of e.imports){const s=null==(o=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:o.resolvedModule;if(!s||s.resolvedFileName!==t.fileName)continue;const c=Pg(a);switch(c.kind){case 271:r.replaceNode(e,c,rY(c.name,void 0,a,i));break;case 213:$m(c,!1)&&r.replaceNode(e,c,aw.createPropertyAccessExpression(aZ(c),"default"))}}}function z9(e,t){e.forEachChild(function n(r){if(rP(r)&&QR(e,r.expression)&&QN(r.name)){const{parent:e}=r;t(r,yP(e)&&e.left===r&&64===e.operatorToken.kind)}r.forEachChild(n)})}function q9(e,t,n,r,i,o,a,s,c){switch(t.kind){case 243:return U9(e,t,r,n,i,o,c),!1;case 244:{const{expression:i}=t;switch(i.kind){case 213:return $m(i,!0)&&r.replaceNode(e,t,rY(void 0,void 0,i.arguments[0],c)),!1;case 226:{const{operatorToken:t}=i;return 64===t.kind&&function(e,t,n,r,i,o){const{left:a,right:s}=n;if(!rP(a))return!1;if(QR(e,a)){if(!QR(e,s)){const i=nP(s)?function(e,t){const n=W(e.properties,e=>{switch(e.kind){case 177:case 178:case 304:case 305:return;case 303:return QN(e.name)?function(e,t,n){const r=[aw.createToken(95)];switch(t.kind){case 218:{const{name:n}=t;if(n&&n.text!==e)return i()}case 219:return X9(e,r,t,n);case 231:return function(e,t,n,r){return aw.createClassDeclaration(ne(t,lZ(n.modifiers)),e,lZ(n.typeParameters),lZ(n.heritageClauses),$9(n.members,r))}(e,r,t,n);default:return i()}function i(){return Z9(r,aw.createIdentifier(e),$9(t,n))}}(e.name.text,e.initializer,t):void 0;case 174:return QN(e.name)?X9(e.name.text,[aw.createToken(95)],e,t):void 0;default:Tn.assertNever(e,`Convert to ES6 got invalid prop kind ${e.kind}`)}});return n&&[n,!1]}(s,o):$m(s,!0)?function(e,t){const n=e.text,r=t.getSymbolAtLocation(e),i=r?r.exports:f;return i.has("export=")?[[W9(n)],!0]:i.has("default")?i.size>1?[[V9(n),W9(n)],!0]:[[W9(n)],!0]:[[V9(n)],!1]}(s.arguments[0],t):void 0;return i?(r.replaceNodeWithNodes(e,n.parent,i[0]),i[1]):(r.replaceRangeWithText(e,Qb(a.getStart(e),s.pos),"export default"),!0)}r.delete(e,n.parent)}else QR(e,a.expression)&&function(e,t,n,r){const{text:i}=t.left.name,o=r.get(i);if(void 0!==o){const r=[Z9(void 0,o,t.right),eee([aw.createExportSpecifier(!1,o,i)])];n.replaceNodeWithNodes(e,t.parent,r)}else!function({left:e,right:t,parent:n},r,i){const o=e.name.text;if(!(_P(t)||uP(t)||kP(t))||t.name&&t.name.text!==o)i.replaceNodeRangeWithNodes(r,e.expression,RX(e,25,r),[aw.createToken(95),aw.createToken(87)],{joiner:" ",suffix:" "});else{i.replaceRange(r,{pos:e.getStart(r),end:t.getStart(r)},aw.createToken(95),{suffix:" "}),t.name||i.insertName(r,t,o);const a=RX(n,27,r);a&&i.delete(r,a)}}(t,e,n)}(e,n,r,i);return!1}(e,n,i,r,a,s)}}}default:return!1}}function U9(e,t,n,r,i,o,a){const{declarationList:s}=t;let c=!1;const l=M(s.declarations,t=>{const{name:n,initializer:l}=t;if(l){if(QR(e,l))return c=!0,tee([]);if($m(l,!0))return c=!0,function(e,t,n,r,i,o){switch(e.kind){case 206:{const n=W(e.elements,e=>e.dotDotDotToken||e.initializer||e.propertyName&&!QN(e.propertyName)||!QN(e.name)?void 0:Y9(e.propertyName&&e.propertyName.text,e.name.text));if(n)return tee([rY(void 0,n,t,o)])}case 207:{const n=H9(d0(t.text,i),r);return tee([rY(aw.createIdentifier(n),void 0,t,o),Z9(void 0,aZ(e),aw.createIdentifier(n))])}case 80:return function(e,t,n,r,i){const o=n.getSymbolAtLocation(e),a=new Map;let s,c=!1;for(const t of r.original.get(e.text)){if(n.getSymbolAtLocation(t)!==o||t===e)continue;const{parent:i}=t;if(rP(i)){const{name:{text:e}}=i;if("default"===e){c=!0;const e=t.getText();(s??(s=new Map)).set(i,aw.createIdentifier(e))}else{Tn.assert(i.expression===t,"Didn't expect expression === use");let n=a.get(e);void 0===n&&(n=H9(e,r),a.set(e,n)),(s??(s=new Map)).set(i,aw.createIdentifier(n))}}else c=!0}const l=0===a.size?void 0:We(R(a.entries(),([e,t])=>aw.createImportSpecifier(!1,e===t?void 0:aw.createIdentifier(e),aw.createIdentifier(t))));l||(c=!0);return tee([rY(c?aZ(e):void 0,l,t,i)],s)}(e,t,n,r,o);default:return Tn.assertNever(e,`Convert to ES module got invalid name kind ${e.kind}`)}}(n,l.arguments[0],r,i,o,a);if(rP(l)&&$m(l.expression,!0))return c=!0,function(e,t,n,r,i){switch(e.kind){case 206:case 207:{const o=H9(t,r);return tee([Q9(o,t,n,i),Z9(void 0,e,aw.createIdentifier(o))])}case 80:return tee([Q9(e.text,t,n,i)]);default:return Tn.assertNever(e,`Convert to ES module got invalid syntax form ${e.kind}`)}}(n,l.name.text,l.expression.arguments[0],i,a)}return tee([aw.createVariableStatement(void 0,aw.createVariableDeclarationList([t],s.flags))])});if(c){let r;return n.replaceNodeWithNodes(e,t,z(l,e=>e.newImports)),h(l,e=>{e.useSitesToUnqualify&&hd(e.useSitesToUnqualify,r??(r=new Map))}),r}}function V9(e){return eee(void 0,e)}function W9(e){return eee([aw.createExportSpecifier(!1,void 0,"default")],e)}function $9(e,t){return t&&ee(We(t.keys()),t=>TX(e,t))?ct(e)?_Z(e,!0,n):sZ(e,!0,n):e;function n(e){if(211===e.kind){const n=t.get(e);return t.delete(e),n}}}function H9(e,t){for(;t.original.has(e)||t.additional.has(e);)e=`_${e}`;return t.additional.add(e),e}function K9(e){const t=rt();return G9(e,e=>t.add(e.text,e)),t}function G9(e,t){QN(e)&&function(e){const{parent:t}=e;switch(t.kind){case 211:return t.name!==e;case 208:case 276:return t.propertyName!==e;default:return!0}}(e)&&t(e),e.forEachChild(e=>G9(e,t))}function X9(e,t,n,r){return aw.createFunctionDeclaration(ne(t,lZ(n.modifiers)),aZ(n.asteriskToken),e,lZ(n.typeParameters),lZ(n.parameters),aZ(n.type),aw.converters.convertToFunctionBlock($9(n.body,r)))}function Q9(e,t,n,r){return"default"===t?rY(aw.createIdentifier(e),void 0,n,r):rY(void 0,[Y9(t,e)],n,r)}function Y9(e,t){return aw.createImportSpecifier(!1,void 0!==e&&e!==t?aw.createIdentifier(e):void 0,aw.createIdentifier(t))}function Z9(e,t,n){return aw.createVariableStatement(e,aw.createVariableDeclarationList([aw.createVariableDeclaration(t,void 0,void 0,n)],2))}function eee(e,t){return aw.createExportDeclaration(void 0,!1,e&&aw.createNamedExports(e),void 0===t?void 0:aw.createStringLiteral(t))}function tee(e,t){return{newImports:e,useSitesToUnqualify:t}}o8({errorCodes:_9,getCodeActions(e){u9=!0;const t=tde.ChangeTracker.with(e,t=>d9(t,e.sourceFile,e.span.start,e.program.getTypeChecker()));return u9?[n8(l9,t,Ca.Convert_to_async_function,l9,Ca.Convert_all_to_async_functions)]:[]},fixIds:[l9],getAllCodeActions:e=>u8(e,_9,(t,n)=>d9(t,n.file,n.start,e.program.getTypeChecker()))}),o8({errorCodes:[Ca.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],getCodeActions(e){const{sourceFile:t,program:n,preferences:r}=e;return[t8("convertToEsModule",tde.ChangeTracker.with(e,e=>{const i=function(e,t,n,r,i){const o={original:K9(e),additional:new Set},a=function(e,t,n){const r=new Map;return z9(e,e=>{const{text:i}=e.name;r.has(i)||!Uh(e.name)&&!t.resolveName(i,e,111551,!0)||r.set(i,H9(`_${i}`,n))}),r}(e,t,o);!function(e,t,n){z9(e,(r,i)=>{if(i)return;const{text:o}=r.name;n.replaceNode(e,r,aw.createIdentifier(t.get(o)||o))})}(e,a,n);let s,c=!1;for(const a of O(e.statements,LP)){const c=U9(e,a,n,t,o,r,i);c&&hd(c,s??(s=new Map))}for(const l of O(e.statements,e=>!LP(e))){const _=q9(e,l,t,n,o,r,a,s,i);c=c||_}return null==s||s.forEach((t,r)=>{n.replaceNode(e,r,t)}),c}(t,n.getTypeChecker(),e,OS(n.getCompilerOptions()),sY(t,r));if(i)for(const i of n.getSourceFiles())J9(i,t,n,e,sY(i,r))}),Ca.Convert_to_ES_module)]}});var nee="correctQualifiedNameToIndexedAccessType",ree=[Ca.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];function iee(e,t){const n=xc(YX(e,t),dD);return Tn.assert(!!n,"Expected position to be owned by a qualified name."),QN(n.left)?n:void 0}function oee(e,t,n){const r=n.right.text,i=aw.createIndexedAccessTypeNode(aw.createTypeReferenceNode(n.left,void 0),aw.createLiteralTypeNode(aw.createStringLiteral(r)));e.replaceNode(t,n,i)}o8({errorCodes:ree,getCodeActions(e){const t=iee(e.sourceFile,e.span.start);if(!t)return;const n=tde.ChangeTracker.with(e,n=>oee(n,e.sourceFile,t)),r=`${t.left.text}["${t.right.text}"]`;return[n8(nee,n,[Ca.Rewrite_as_the_indexed_access_type_0,r],nee,Ca.Rewrite_all_as_indexed_access_types)]},fixIds:[nee],getAllCodeActions:e=>u8(e,ree,(e,t)=>{const n=iee(t.file,t.start);n&&oee(e,t.file,n)})});var aee=[Ca.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code],see="convertToTypeOnlyExport";function cee(e,t){return dt(YX(t,e.start).parent,wE)}function lee(e,t,n){if(!t)return;const r=t.parent,i=r.parent,o=function(e,t){const n=e.parent;if(1===n.elements.length)return n.elements;const r=t0(jQ(n),t.program.getSemanticDiagnostics(t.sourceFile,t.cancellationToken));return O(n.elements,t=>{var n;return t===e||(null==(n=e0(t,r))?void 0:n.code)===aee[0]})}(t,n);if(o.length===r.elements.length)e.insertModifierBefore(n.sourceFile,156,r);else{const t=aw.updateExportDeclaration(i,i.modifiers,!1,aw.updateNamedExports(r,O(r.elements,e=>!E(o,e))),i.moduleSpecifier,void 0),a=aw.createExportDeclaration(void 0,!0,aw.createNamedExports(o),i.moduleSpecifier,void 0);e.replaceNode(n.sourceFile,i,t,{leadingTriviaOption:tde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:tde.TrailingTriviaOption.Exclude}),e.insertNodeAfter(n.sourceFile,i,a)}}o8({errorCodes:aee,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>lee(t,cee(e.span,e.sourceFile),e));if(t.length)return[n8(see,t,Ca.Convert_to_type_only_export,see,Ca.Convert_all_re_exported_types_to_type_only_exports)]},fixIds:[see],getAllCodeActions:function(e){const t=new Map;return u8(e,aee,(n,r)=>{const i=cee(r,e.sourceFile);i&&Bx(t,KB(i.parent.parent))&&lee(n,i,e)})}});var _ee=[Ca._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,Ca._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code],uee="convertToTypeOnlyImport";function dee(e,t){const{parent:n}=YX(e,t);return SE(n)||dE(n)&&n.importClause?n:void 0}function pee(e,t,n){if(e.parent.parent.name)return!1;const r=e.parent.elements.filter(e=>!e.isTypeOnly);if(1===r.length)return!0;const i=n.getTypeChecker();for(const e of r){if(Ice.Core.eachSymbolReferenceInFile(e.name,i,t,e=>{const t=i.getSymbolAtLocation(e);return!!t&&i.symbolIsValue(t)||!OT(e)}))return!1}return!0}function fee(e,t,n){var r;if(SE(n))e.replaceNode(t,n,aw.updateImportSpecifier(n,!0,n.propertyName,n.name));else{const i=n.importClause;if(i.name&&i.namedBindings)e.replaceNodeWithNodes(t,n,[aw.createImportDeclaration(lZ(n.modifiers,!0),aw.createImportClause(!0,aZ(i.name,!0),void 0),aZ(n.moduleSpecifier,!0),aZ(n.attributes,!0)),aw.createImportDeclaration(lZ(n.modifiers,!0),aw.createImportClause(!0,void 0,aZ(i.namedBindings,!0)),aZ(n.moduleSpecifier,!0),aZ(n.attributes,!0))]);else{const o=275===(null==(r=i.namedBindings)?void 0:r.kind)?aw.updateNamedImports(i.namedBindings,B(i.namedBindings.elements,e=>aw.updateImportSpecifier(e,!1,e.propertyName,e.name))):i.namedBindings,a=aw.updateImportDeclaration(n,n.modifiers,aw.updateImportClause(i,!0,i.name,o),n.moduleSpecifier,n.attributes);e.replaceNode(t,n,a)}}}o8({errorCodes:_ee,getCodeActions:function(e){var t;const n=dee(e.sourceFile,e.span.start);if(n){const r=tde.ChangeTracker.with(e,t=>fee(t,e.sourceFile,n)),i=276===n.kind&&dE(n.parent.parent.parent)&&pee(n,e.sourceFile,e.program)?tde.ChangeTracker.with(e,t=>fee(t,e.sourceFile,n.parent.parent.parent)):void 0,o=n8(uee,r,276===n.kind?[Ca.Use_type_0,(null==(t=n.propertyName)?void 0:t.text)??n.name.text]:Ca.Use_import_type,uee,Ca.Fix_all_with_type_only_imports);return ee(i)?[t8(uee,i,Ca.Use_import_type),o]:[o]}},fixIds:[uee],getAllCodeActions:function(e){const t=new Set;return u8(e,_ee,(n,r)=>{const i=dee(r.file,r.start);272!==(null==i?void 0:i.kind)||t.has(i)?276===(null==i?void 0:i.kind)&&dE(i.parent.parent.parent)&&!t.has(i.parent.parent.parent)&&pee(i,r.file,e.program)?(fee(n,r.file,i.parent.parent.parent),t.add(i.parent.parent.parent)):276===(null==i?void 0:i.kind)&&fee(n,r.file,i):(fee(n,r.file,i),t.add(i))})}});var mee="convertTypedefToType",gee=[Ca.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];function hee(e,t,n,r,i=!1){if(!OF(t))return;const o=function(e){var t;const{typeExpression:n}=e;if(!n)return;const r=null==(t=e.name)?void 0:t.getText();if(!r)return;if(322===n.kind)return function(e,t){const n=vee(t);if(!ee(n))return;return aw.createInterfaceDeclaration(void 0,e,void 0,void 0,n)}(r,n);if(309===n.kind)return function(e,t){const n=aZ(t.type);if(!n)return;return aw.createTypeAliasDeclaration(void 0,aw.createIdentifier(e),void 0,n)}(r,n)}(t);if(!o)return;const a=t.parent,{leftSibling:s,rightSibling:c}=function(e){const t=e.parent,n=t.getChildCount()-1,r=t.getChildren().findIndex(t=>t.getStart()===e.getStart()&&t.getEnd()===e.getEnd()),i=r>0?t.getChildAt(r-1):void 0,o=r0;e--)if(!/[*/\s]/g.test(r.substring(e-1,e)))return t+e;return n}function vee(e){const t=e.jsDocPropertyTags;if(!ee(t))return;return $(t,e=>{var t;const n=function(e){return 80===e.name.kind?e.name.text:e.name.right.text}(e),r=null==(t=e.typeExpression)?void 0:t.type,i=e.isBracketed;let o;if(r&&fF(r)){const e=vee(r);o=aw.createTypeLiteralNode(e)}else r&&(o=aZ(r));if(o&&n){const e=i?aw.createToken(58):void 0;return aw.createPropertySignature(void 0,n,e,o)}})}function bee(e){return Ju(e)?z(e.jsDoc,e=>{var t;return null==(t=e.tags)?void 0:t.filter(e=>OF(e))}):[]}o8({fixIds:[mee],errorCodes:gee,getCodeActions(e){const t=$Y(e.host,e.formatContext.options),n=YX(e.sourceFile,e.span.start);if(!n)return;const r=tde.ChangeTracker.with(e,r=>hee(r,n,e.sourceFile,t));return r.length>0?[n8(mee,r,Ca.Convert_typedef_to_TypeScript_type,mee,Ca.Convert_all_typedef_to_TypeScript_types)]:void 0},getAllCodeActions:e=>u8(e,gee,(t,n)=>{const r=$Y(e.host,e.formatContext.options),i=YX(n.file,n.start);i&&hee(t,i,n.file,r,!0)})});var xee="convertLiteralTypeToMappedType",See=[Ca._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];function kee(e,t){const n=YX(e,t);if(QN(n)){const t=pt(n.parent.parent,hD),r=n.getText(e);return{container:pt(t.parent,ID),typeNode:t.type,constraint:r,name:"K"===r?"P":"K"}}}function Tee(e,t,{container:n,typeNode:r,constraint:i,name:o}){e.replaceNode(t,n,aw.createMappedTypeNode(void 0,aw.createTypeParameterDeclaration(void 0,o,aw.createTypeReferenceNode(i)),void 0,void 0,r,void 0))}o8({errorCodes:See,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=kee(t,n.start);if(!r)return;const{name:i,constraint:o}=r,a=tde.ChangeTracker.with(e,e=>Tee(e,t,r));return[n8(xee,a,[Ca.Convert_0_to_1_in_0,o,i],xee,Ca.Convert_all_type_literals_to_mapped_type)]},fixIds:[xee],getAllCodeActions:e=>u8(e,See,(e,t)=>{const n=kee(t.file,t.start);n&&Tee(e,t.file,n)})});var Cee=[Ca.Class_0_incorrectly_implements_interface_1.code,Ca.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],wee="fixClassIncorrectlyImplementsInterface";function Nee(e,t){return Tn.checkDefined(om(YX(e,t)),"There should be a containing class")}function Dee(e){return!(e.valueDeclaration&&2&rb(e.valueDeclaration))}function Pee(e,t,n,r,i,o){const a=e.program.getTypeChecker(),s=function(e,t){const n=Dh(e);if(!n)return ad();const r=t.getTypeAtLocation(n),i=t.getPropertiesOfType(r);return ad(i.filter(Dee))}(r,a),c=a.getTypeAtLocation(t),l=a.getPropertiesOfType(c).filter(pn(Dee,e=>!s.has(e.escapedName))),_=a.getTypeAtLocation(r),u=C(r.members,e=>SD(e));_.getNumberIndexType()||p(c,1),_.getStringIndexType()||p(c,0);const d=Iee(n,e.program,o,e.host);function p(t,i){const o=a.getIndexInfoOfType(t,i);o&&f(n,r,a.indexInfoToIndexSignatureDeclaration(o,r,void 0,Zie(e)))}function f(e,t,n){u?i.insertNodeAfter(e,u,n):i.insertMemberAtStart(e,t,n)}Yie(r,l,n,e,o,d,e=>f(n,r,e)),d.writeFixes(i)}o8({errorCodes:Cee,getCodeActions(e){const{sourceFile:t,span:n}=e,r=Nee(t,n.start);return $(Eh(r),n=>{const i=tde.ChangeTracker.with(e,i=>Pee(e,n,t,r,i,e.preferences));return 0===i.length?void 0:n8(wee,i,[Ca.Implement_interface_0,n.getText(t)],wee,Ca.Implement_all_unimplemented_interfaces)})},fixIds:[wee],getAllCodeActions(e){const t=new Map;return u8(e,Cee,(n,r)=>{const i=Nee(r.file,r.start);if(Bx(t,KB(i)))for(const t of Eh(i))Pee(e,t,r.file,i,n,e.preferences)})}});var Eee="import",Fee="fixMissingImport",Aee=[Ca.Cannot_find_name_0.code,Ca.Cannot_find_name_0_Did_you_mean_1.code,Ca.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,Ca.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,Ca.Cannot_find_namespace_0.code,Ca._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,Ca._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,Ca.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,Ca._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,Ca.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,Ca.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,Ca.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,Ca.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,Ca.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,Ca.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,Ca.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,Ca.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,Ca.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,Ca.Cannot_find_namespace_0_Did_you_mean_1.code];function Iee(e,t,n,r,i){return Oee(e,t,!1,n,r,i)}function Oee(e,t,n,r,i,o){const a=t.getCompilerOptions(),s=[],c=[],l=new Map,_=new Set,u=new Set,d=new Map;return{addImportFromDiagnostic:function(e,t){const r=Hee(t,e.code,e.start,n);if(!r||!r.length)return;p(Ne(r))},addImportFromExportedSymbol:function(n,s,c){var l;const _=Tn.checkDefined(n.parent),u=s0(n,OS(a)),d=t.getTypeChecker(),f=d.getMergedSymbol(kx(n,d)),m=Jee(e,f,u,_,!1,t,i,r,o),g=Wee(e,t);let h=Ree(e,Tn.checkDefined(m),t,void 0,!!s,g,i,r);if(h){const e=(null==(l=dt(null==c?void 0:c.name,QN))?void 0:l.text)??u;c&&Ql(c)&&(3===h.kind||2===h.kind)&&1===h.addAsTypeOnly&&(h={...h,addAsTypeOnly:2}),p({fix:h,symbolName:e??u,errorIdentifierText:void 0})}},writeFixes:function(t,n){var i,o;let u,p,m;u=Rm(e)&&0===e.imports.length&&void 0!==n?n:sY(e,r);for(const n of s)ote(t,e,n);for(const n of c)ate(t,e,n,u);if(_.size){Tn.assert(Rm(e),"Cannot remove imports from a future source file");const n=new Set($([..._],e=>xc(e,dE))),r=new Set($([..._],e=>xc(e,Hm))),a=[...n].filter(e=>{var t,n,r;return!l.has(e.importClause)&&(!(null==(t=e.importClause)?void 0:t.name)||_.has(e.importClause))&&(!dt(null==(n=e.importClause)?void 0:n.namedBindings,vE)||_.has(e.importClause.namedBindings))&&(!dt(null==(r=e.importClause)?void 0:r.namedBindings,xE)||T(e.importClause.namedBindings.elements,e=>_.has(e)))}),s=[...r].filter(e=>(206!==e.name.kind||!l.has(e.name))&&(206!==e.name.kind||T(e.name.elements,e=>_.has(e)))),c=[...n].filter(e=>{var t,n;return(null==(t=e.importClause)?void 0:t.namedBindings)&&-1===a.indexOf(e)&&!(null==(n=l.get(e.importClause))?void 0:n.namedImports)&&(274===e.importClause.namedBindings.kind||T(e.importClause.namedBindings.elements,e=>_.has(e)))});for(const n of[...a,...s])t.delete(e,n);for(const n of c)t.replaceNode(e,n.importClause,aw.updateImportClause(n.importClause,n.importClause.isTypeOnly,n.importClause.name,void 0));for(const n of _){const r=xc(n,dE);r&&-1===a.indexOf(r)&&-1===c.indexOf(r)?273===n.kind?t.delete(e,n.name):(Tn.assert(276===n.kind,"NamespaceImport should have been handled earlier"),(null==(i=l.get(r.importClause))?void 0:i.namedImports)?(p??(p=new Set)).add(n):t.delete(e,n)):208===n.kind?(null==(o=l.get(n.parent))?void 0:o.namedImports)?(p??(p=new Set)).add(n):t.delete(e,n):271===n.kind&&t.delete(e,n)}}l.forEach(({importClauseOrBindingPattern:n,defaultImport:i,namedImports:o})=>{ite(t,e,n,i,We(o.entries(),([e,t])=>({addAsTypeOnly:t,name:e})),p,r)}),d.forEach(({useRequire:e,defaultImport:t,namedImports:n,namespaceLikeImport:i},o)=>{const s=(e?ute:_te)(o.slice(2),u,t,n&&We(n.entries(),([e,t])=>({addAsTypeOnly:t,name:e})),i,a,r);m=fe(m,s)}),m=fe(m,f()),m&&hY(t,e,m,!0,r)},hasFixes:function(){return s.length>0||c.length>0||l.size>0||d.size>0||u.size>0||_.size>0},addImportForUnresolvedIdentifier:function(e,t,n){const r=function(e,t,n){const r=Zee(e,t,n),i=XZ(e.sourceFile,e.preferences,e.host);return r&&Kee(r,e.sourceFile,e.program,i,e.host,e.preferences)}(e,t,n);if(!r||!r.length)return;p(Ne(r))},addImportForNonExistentExport:function(n,o,s,c,l){const _=t.getSourceFile(o),u=Wee(e,t);if(_&&_.symbol){const{fixes:a}=qee([{exportKind:s,isFromPackageJson:!1,moduleFileName:o,moduleSymbol:_.symbol,targetFlags:c}],void 0,l,u,t,e,i,r);a.length&&p({fix:a[0],symbolName:n,errorIdentifierText:n})}else{const r=N0(o,99,t,i);p({fix:{kind:3,moduleSpecifierKind:"relative",moduleSpecifier:tB.getLocalModuleSpecifierBetweenFileNames(e,o,a,eY(t,i)),importKind:Yee(r,s,a),addAsTypeOnly:Uee(l,!0,void 0,c,t.getTypeChecker(),a),useRequire:u},symbolName:n,errorIdentifierText:n})}},removeExistingImport:function(e){273===e.kind&&Tn.assertIsDefined(e.name,"ImportClause should have a name if it's being removed");_.add(e)},addVerbatimImport:function(e){u.add(e)}};function p(e){var t,n;const{fix:r,symbolName:i}=e;switch(r.kind){case 0:s.push(r);break;case 1:c.push(r);break;case 2:{const{importClauseOrBindingPattern:e,importKind:n,addAsTypeOnly:a}=r;let s=l.get(e);if(s||l.set(e,s={importClauseOrBindingPattern:e,defaultImport:void 0,namedImports:new Map}),0===n){const e=null==s?void 0:s.namedImports.get(i);s.namedImports.set(i,o(e,a))}else Tn.assert(void 0===s.defaultImport||s.defaultImport.name===i,"(Add to Existing) Default import should be missing or match symbolName"),s.defaultImport={name:i,addAsTypeOnly:o(null==(t=s.defaultImport)?void 0:t.addAsTypeOnly,a)};break}case 3:{const{moduleSpecifier:e,importKind:t,useRequire:s,addAsTypeOnly:c}=r,l=function(e,t,n,r){const i=_(e,!0),o=_(e,!1),a=d.get(i),s=d.get(o),c={defaultImport:void 0,namedImports:void 0,namespaceLikeImport:void 0,useRequire:n};if(1===t&&2===r)return a||(d.set(i,c),c);if(1===r&&(a||s))return a||s;if(s)return s;return d.set(o,c),c}(e,t,s,c);switch(Tn.assert(l.useRequire===s,"(Add new) Tried to add an `import` and a `require` for the same module"),t){case 1:Tn.assert(void 0===l.defaultImport||l.defaultImport.name===i,"(Add new) Default import should be missing or match symbolName"),l.defaultImport={name:i,addAsTypeOnly:o(null==(n=l.defaultImport)?void 0:n.addAsTypeOnly,c)};break;case 0:const e=(l.namedImports||(l.namedImports=new Map)).get(i);l.namedImports.set(i,o(e,c));break;case 3:if(a.verbatimModuleSyntax){const e=(l.namedImports||(l.namedImports=new Map)).get(i);l.namedImports.set(i,o(e,c))}else Tn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===i,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:i,addAsTypeOnly:c};break;case 2:Tn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===i,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:i,addAsTypeOnly:c}}break}case 4:break;default:Tn.assertNever(r,`fix wasn't never - got kind ${r.kind}`)}function o(e,t){return Math.max(e??0,t)}function _(e,t){return`${t?1:0}|${e}`}}function f(){if(!u.size)return;const e=new Set($([...u],e=>xc(e,dE))),t=new Set($([...u],e=>xc(e,Qm)));return[...$([...u],e=>271===e.kind?aZ(e,!0):void 0),...[...e].map(e=>{var t;return u.has(e)?aZ(e,!0):aZ(aw.updateImportDeclaration(e,e.modifiers,e.importClause&&aw.updateImportClause(e.importClause,e.importClause.isTypeOnly,u.has(e.importClause)?e.importClause.name:void 0,u.has(e.importClause.namedBindings)?e.importClause.namedBindings:(null==(t=dt(e.importClause.namedBindings,xE))?void 0:t.elements.some(e=>u.has(e)))?aw.updateNamedImports(e.importClause.namedBindings,e.importClause.namedBindings.elements.filter(e=>u.has(e))):void 0),e.moduleSpecifier,e.attributes),!0)}),...[...t].map(e=>u.has(e)?aZ(e,!0):aZ(aw.updateVariableStatement(e,e.modifiers,aw.updateVariableDeclarationList(e.declarationList,$(e.declarationList.declarations,e=>u.has(e)?e:aw.updateVariableDeclaration(e,206===e.name.kind?aw.updateObjectBindingPattern(e.name,e.name.elements.filter(e=>u.has(e))):e.name,e.exclamationToken,e.type,e.initializer)))),!0))]}}function jee(e,t,n,r){const i=XZ(e,r,n),o=Vee(t.getTypeChecker(),e,t.getCompilerOptions());return{getModuleSpecifierForBestExportInfo:function(a,s,c,l){const{fixes:_,computedWithoutCacheCount:u}=qee(a,s,c,!1,t,e,n,r,o,l),d=Gee(_,e,t,i,n,r);return d&&{...d,computedWithoutCacheCount:u}}}}function Lee(e,t,n,r,i,o,a,s,c,l,_,u){let d;n?(d=O0(r,a,s,_,u).get(r.path,n),Tn.assertIsDefined(d,"Some exportInfo should match the specified exportMapKey")):(d=Lo(Wy(t.name))?[zee(e,i,t,s,a)]:Jee(r,e,i,t,o,s,a,_,u),Tn.assertIsDefined(d,"Some exportInfo should match the specified symbol / moduleSymbol"));const p=Wee(r,s),f=OT(YX(r,l)),m=Tn.checkDefined(Ree(r,d,s,l,f,p,a,_));return{moduleSpecifier:m.moduleSpecifier,codeAction:Bee(nte({host:a,formatContext:c,preferences:_},r,i,m,!1,s,_))}}function Mee(e,t,n,r,i,o){const a=n.getCompilerOptions(),s=Ae(tte(e,n.getTypeChecker(),t,a)),c=ete(e,t,s,n),l=s!==t.text;return c&&Bee(nte({host:r,formatContext:i,preferences:o},e,s,c,l,n,o))}function Ree(e,t,n,r,i,o,a,s){const c=XZ(e,s,a);return Gee(qee(t,r,i,o,n,e,a,s).fixes,e,n,c,a,s)}function Bee({description:e,changes:t,commands:n}){return{description:e,changes:t,commands:n}}function Jee(e,t,n,r,i,o,a,s,c){const l=$ee(o,a);return O0(e,a,o,s,c).search(e.path,i,e=>e===n,e=>{if(kx(e[0].symbol,l(e[0].isFromPackageJson))===t&&e.some(e=>e.moduleSymbol===r||e.symbol.parent===r))return e})}function zee(e,t,n,r,i){var o,a;const s=l(r.getTypeChecker(),!1);if(s)return s;const c=null==(a=null==(o=i.getPackageJsonAutoImportProvider)?void 0:o.call(i))?void 0:a.getTypeChecker();return Tn.checkDefined(c&&l(c,!0),"Could not find symbol in specified module for code actions");function l(r,i){const o=j0(n,r);if(o&&kx(o.symbol,r)===e)return{symbol:o.symbol,moduleSymbol:n,moduleFileName:void 0,exportKind:o.exportKind,targetFlags:kx(e,r).flags,isFromPackageJson:i};const a=r.tryGetMemberInModuleExportsAndProperties(t,n);return a&&kx(a,r)===e?{symbol:a,moduleSymbol:n,moduleFileName:void 0,exportKind:0,targetFlags:kx(e,r).flags,isFromPackageJson:i}:void 0}}function qee(e,t,n,r,i,o,a,s,c=(Rm(o)?Vee(i.getTypeChecker(),o,i.getCompilerOptions()):void 0),l){const _=i.getTypeChecker(),u=c?z(e,c.getImportsForExportInfo):p,d=void 0!==t&&function(e,t){return v(e,({declaration:e,importKind:n})=>{var r;if(0!==n)return;const i=function(e){var t,n,r;switch(e.kind){case 260:return null==(t=dt(e.name,QN))?void 0:t.text;case 271:return e.name.text;case 351:case 272:return null==(r=dt(null==(n=e.importClause)?void 0:n.namedBindings,vE))?void 0:r.name.text;default:return Tn.assertNever(e)}}(e),o=i&&(null==(r=Dg(e))?void 0:r.text);return o?{kind:0,namespacePrefix:i,usagePosition:t,moduleSpecifierKind:void 0,moduleSpecifier:o}:void 0})}(u,t),f=function(e,t,n,r){let i;for(const t of e){const e=o(t);if(!e)continue;const n=Ql(e.importClauseOrBindingPattern);if(4!==e.addAsTypeOnly&&n||4===e.addAsTypeOnly&&!n)return e;i??(i=e)}return i;function o({declaration:e,importKind:i,symbol:o,targetFlags:a}){if(3===i||2===i||271===e.kind)return;if(260===e.kind)return 0!==i&&1!==i||206!==e.name.kind?void 0:{kind:2,importClauseOrBindingPattern:e.name,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.initializer.arguments[0].text,addAsTypeOnly:4};const{importClause:s}=e;if(!s||!Ku(e.moduleSpecifier))return;const{name:c,namedBindings:l}=s;if(s.isTypeOnly&&(0!==i||!l))return;const _=Uee(t,!1,o,a,n,r);return 1===i&&(c||2===_&&l)||0===i&&274===(null==l?void 0:l.kind)?void 0:{kind:2,importClauseOrBindingPattern:s,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.moduleSpecifier.text,addAsTypeOnly:_}}}(u,n,_,i.getCompilerOptions());if(f)return{computedWithoutCacheCount:0,fixes:[...d?[d]:p,f]};const{fixes:m,computedWithoutCacheCount:g=0}=function(e,t,n,r,i,o,a,s,c,l){const _=v(t,e=>function({declaration:e,importKind:t,symbol:n,targetFlags:r},i,o,a,s){var c;const l=null==(c=Dg(e))?void 0:c.text;if(l){return{kind:3,moduleSpecifierKind:void 0,moduleSpecifier:l,importKind:t,addAsTypeOnly:o?4:Uee(i,!0,n,r,a,s),useRequire:o}}}(e,o,a,n.getTypeChecker(),n.getCompilerOptions()));return _?{fixes:[_]}:function(e,t,n,r,i,o,a,s,c){const l=Qk(t.fileName),_=e.getCompilerOptions(),u=eY(e,a),d=$ee(e,a),p=nY(LS(_)),f=c?e=>tB.tryGetModuleSpecifiersFromCache(e.moduleSymbol,t,u,s):(e,n)=>tB.getModuleSpecifiersWithCacheInfo(e.moduleSymbol,n,_,t,u,s,void 0,!0);let m=0;const g=z(o,(e,o)=>{const a=d(e.isFromPackageJson),{computedWithoutCache:s,moduleSpecifiers:c,kind:u}=f(e,a)??{},g=!!(111551&e.targetFlags),h=Uee(r,!0,e.symbol,e.targetFlags,a,_);return m+=s?1:0,$(c,r=>{if(p&&GM(r))return;if(!g&&l&&void 0!==n)return{kind:1,moduleSpecifierKind:u,moduleSpecifier:r,usagePosition:n,exportInfo:e,isReExport:o>0};const s=Yee(t,e.exportKind,_);let c;if(void 0!==n&&3===s&&0===e.exportKind){const t=a.resolveExternalModuleSymbol(e.moduleSymbol);let r;t!==e.moduleSymbol&&(r=M0(t,a,_,!1,yt)),r||(r=u0(e.moduleSymbol,OS(_),!1)),c={namespacePrefix:r,usagePosition:n}}return{kind:3,moduleSpecifierKind:u,moduleSpecifier:r,importKind:s,useRequire:i,addAsTypeOnly:h,exportInfo:e,isReExport:o>0,qualification:c}})});return{computedWithoutCacheCount:m,fixes:g}}(n,r,i,o,a,e,s,c,l)}(e,u,i,o,t,n,r,a,s,l);return{computedWithoutCacheCount:g,fixes:[...d?[d]:p,...m]}}function Uee(e,t,n,r,i,o){return e?!n||!o.verbatimModuleSyntax||111551&r&&!i.getTypeOnlyAliasDeclaration(n)?1:2:4}function Vee(e,t,n){let r;for(const n of t.imports){const t=Pg(n);if(Hm(t.parent)){const i=e.resolveExternalModuleName(n);i&&(r||(r=rt())).add(GB(i),t.parent)}else if(272===t.kind||271===t.kind||351===t.kind){const i=e.getSymbolAtLocation(n);i&&(r||(r=rt())).add(GB(i),t)}}return{getImportsForExportInfo:({moduleSymbol:e,exportKind:i,targetFlags:o,symbol:a})=>{const s=null==r?void 0:r.get(GB(e));if(!s)return p;if(Bm(t)&&!(111551&o)&&!T(s,JF))return p;const c=Yee(t,i,n);return s.map(e=>({declaration:e,importKind:c,symbol:a,targetFlags:o}))}}}function Wee(e,t){if(!Qk(e.fileName))return!1;if(e.commonJsModuleIndicator&&!e.externalModuleIndicator)return!0;if(e.externalModuleIndicator&&!e.commonJsModuleIndicator)return!1;const n=t.getCompilerOptions();if(n.configFile)return jS(n)<5;if(1===e.impliedNodeFormat)return!0;if(99===e.impliedNodeFormat)return!1;for(const n of t.getSourceFiles())if(n!==e&&Bm(n)&&!t.isSourceFileFromExternalLibrary(n)){if(n.commonJsModuleIndicator&&!n.externalModuleIndicator)return!0;if(n.externalModuleIndicator&&!n.commonJsModuleIndicator)return!1}return!0}function $ee(e,t){return Tt(n=>n?t.getPackageJsonAutoImportProvider().getTypeChecker():e.getTypeChecker())}function Hee(e,t,n,r){const i=YX(e.sourceFile,n);let o;if(t===Ca._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code)o=function({sourceFile:e,program:t,host:n,preferences:r},i){const o=t.getTypeChecker(),a=function(e,t){const n=QN(e)?t.getSymbolAtLocation(e):void 0;if(Lx(n))return n;const{parent:r}=e;if(Iu(r)&&r.tagName===e||LE(r)){const n=t.resolveName(t.getJsxNamespace(r),Iu(r)?e:r,111551,!1);if(Lx(n))return n}return}(i,o);if(!a)return;const s=o.getAliasedSymbol(a),c=a.name,l=[{symbol:a,moduleSymbol:s,moduleFileName:void 0,exportKind:3,targetFlags:s.flags,isFromPackageJson:!1}],_=Wee(e,t);return qee(l,void 0,!1,_,t,e,n,r).fixes.map(e=>{var t;return{fix:e,symbolName:c,errorIdentifierText:null==(t=dt(i,QN))?void 0:t.text}})}(e,i);else{if(!QN(i))return;if(t===Ca._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code){const t=Ae(tte(e.sourceFile,e.program.getTypeChecker(),i,e.program.getCompilerOptions())),n=ete(e.sourceFile,i,t,e.program);return n&&[{fix:n,symbolName:t,errorIdentifierText:i.text}]}o=Zee(e,i,r)}const a=XZ(e.sourceFile,e.preferences,e.host);return o&&Kee(o,e.sourceFile,e.program,a,e.host,e.preferences)}function Kee(e,t,n,r,i,o){const a=e=>ia(e,i.getCurrentDirectory(),Zy(i));return be(e,(e,i)=>Ht(!!e.isJsxNamespaceFix,!!i.isJsxNamespaceFix)||It(e.fix.kind,i.fix.kind)||Xee(e.fix,i.fix,t,n,o,r.allowsImportingSpecifier,a))}function Gee(e,t,n,r,i,o){if(ee(e))return 0===e[0].kind||2===e[0].kind?e[0]:e.reduce((e,a)=>-1===Xee(a,e,t,n,o,r.allowsImportingSpecifier,e=>ia(e,i.getCurrentDirectory(),Zy(i)))?a:e)}function Xee(e,t,n,r,i,o,a){return 0!==e.kind&&0!==t.kind?Ht("node_modules"!==t.moduleSpecifierKind||o(t.moduleSpecifier),"node_modules"!==e.moduleSpecifierKind||o(e.moduleSpecifier))||function(e,t,n){if("non-relative"===n.importModuleSpecifierPreference||"project-relative"===n.importModuleSpecifierPreference)return Ht("relative"===e.moduleSpecifierKind,"relative"===t.moduleSpecifierKind);return 0}(e,t,i)||function(e,t,n,r){return ln(e,"node:")&&!ln(t,"node:")?y0(n,r)?-1:1:ln(t,"node:")&&!ln(e,"node:")?y0(n,r)?1:-1:0}(e.moduleSpecifier,t.moduleSpecifier,n,r)||Ht(Qee(e,n.path,a),Qee(t,n.path,a))||iT(e.moduleSpecifier,t.moduleSpecifier):0}function Qee(e,t,n){var r;if(e.isReExport&&(null==(r=e.exportInfo)?void 0:r.moduleFileName)&&"index"===Wo(e.exportInfo.moduleFileName,[".js",".jsx",".d.ts",".ts",".tsx"],!0)){return ln(t,n(Vo(e.exportInfo.moduleFileName)))}return!1}function Yee(e,t,n,r){if(n.verbatimModuleSyntax&&(1===jS(n)||1===e.impliedNodeFormat))return 3;switch(t){case 0:return 0;case 1:return 1;case 2:return function(e,t,n){const r=JS(t),i=Qk(e.fileName);if(!i&&jS(t)>=5)return r?1:2;if(i)return e.externalModuleIndicator||n?r?1:2:3;for(const t of e.statements??p)if(uE(t)&&!Ld(t.moduleReference))return 3;return r?1:3}(e,n,!!r);case 3:return function(e,t,n){if(JS(t))return 1;const r=jS(t);switch(r){case 2:case 1:case 3:return Qk(e.fileName)&&(e.externalModuleIndicator||n)?2:3;case 4:case 5:case 6:case 7:case 99:case 0:case 200:return 2;case 100:case 199:return 99===e.impliedNodeFormat?2:3;default:return Tn.assertNever(r,`Unexpected moduleKind ${r}`)}}(e,n,!!r);default:return Tn.assertNever(t)}}function Zee({sourceFile:e,program:t,cancellationToken:n,host:r,preferences:i},o,a){const s=t.getTypeChecker(),c=t.getCompilerOptions();return z(tte(e,s,o,c),s=>{if("default"===s)return;const c=OT(o),l=Wee(e,t),_=function(e,t,n,r,i,o,a,s,c){var l;const _=rt(),u=XZ(i,c,s),d=null==(l=s.getModuleSpecifierCache)?void 0:l.call(s),p=Tt(e=>eY(e?s.getPackageJsonAutoImportProvider():o,s));function f(e,t,n,r,o,a){const s=p(a);if(t&&F0(o,i,t,c,u,s,d)||!t&&u.allowsImportingAmbientModule(e,s)){const i=o.getTypeChecker();_.add(rZ(n,i).toString(),{symbol:n,moduleSymbol:e,moduleFileName:null==t?void 0:t.fileName,exportKind:r,targetFlags:kx(n,i).flags,isFromPackageJson:a})}}return A0(o,s,c,a,(i,o,a,s)=>{const c=a.getTypeChecker();r.throwIfCancellationRequested();const l=a.getCompilerOptions(),_=j0(i,c);_&&pte(c.getSymbolFlags(_.symbol),n)&&M0(_.symbol,c,l,t,t=>t===e)&&f(i,o,_.symbol,_.exportKind,a,s);const u=c.tryGetMemberInModuleExportsAndProperties(e,i);u&&pte(c.getSymbolFlags(u),n)&&f(i,o,u,0,a,s)}),_}(s,Pm(o),$G(o),n,e,t,a,r,i);return We(U(_.values(),n=>qee(n,o.getStart(e),c,l,t,e,r,i).fixes),e=>({fix:e,symbolName:s,errorIdentifierText:o.text,isJsxNamespaceFix:s!==o.text}))})}function ete(e,t,n,r){const i=r.getTypeChecker(),o=i.resolveName(n,t,111551,!0);if(!o)return;const a=i.getTypeOnlyAliasDeclaration(o);return a&&Dd(a)===e?{kind:4,typeOnlyAliasDeclaration:a}:void 0}function tte(e,t,n,r){const i=n.parent;if((Iu(i)||OE(i))&&i.tagName===n&&S0(r.jsx)){const r=t.getJsxNamespace(e);if(function(e,t,n){if($y(t.text))return!0;const r=n.resolveName(e,t,111551,!0);return!r||ee(r.declarations,Zl)&&!(111551&r.flags)}(r,n,t)){return!$y(n.text)&&!t.resolveName(n.text,n,111551,!1)?[n.text,r]:[r]}}return[n.text]}function nte(e,t,n,r,i,o,a){let s;const c=tde.ChangeTracker.with(e,e=>{s=function(e,t,n,r,i,o,a){const s=sY(t,a);switch(r.kind){case 0:return ote(e,t,r),[Ca.Change_0_to_1,n,`${r.namespacePrefix}.${n}`];case 1:return ate(e,t,r,s),[Ca.Change_0_to_1,n,ste(r.moduleSpecifier,s)+n];case 2:{const{importClauseOrBindingPattern:o,importKind:s,addAsTypeOnly:c,moduleSpecifier:l}=r;ite(e,t,o,1===s?{name:n,addAsTypeOnly:c}:void 0,0===s?[{name:n,addAsTypeOnly:c}]:p,void 0,a);const _=Wy(l);return i?[Ca.Import_0_from_1,n,_]:[Ca.Update_import_from_0,_]}case 3:{const{importKind:c,moduleSpecifier:l,addAsTypeOnly:_,useRequire:u,qualification:d}=r;return hY(e,t,(u?ute:_te)(l,s,1===c?{name:n,addAsTypeOnly:_}:void 0,0===c?[{name:n,addAsTypeOnly:_}]:void 0,2===c||3===c?{importKind:c,name:(null==d?void 0:d.namespacePrefix)||n,addAsTypeOnly:_}:void 0,o.getCompilerOptions(),a),!0,a),d&&ote(e,t,d),i?[Ca.Import_0_from_1,n,l]:[Ca.Add_import_from_0,l]}case 4:{const{typeOnlyAliasDeclaration:i}=r,s=function(e,t,n,r,i){const o=n.getCompilerOptions(),a=o.verbatimModuleSyntax;switch(t.kind){case 276:if(t.isTypeOnly){if(t.parent.elements.length>1){const n=aw.updateImportSpecifier(t,!1,t.propertyName,t.name),{specifierComparer:o}=m_e.getNamedImportSpecifierComparerWithDetection(t.parent.parent.parent,i,r),a=m_e.getImportSpecifierInsertionIndex(t.parent.elements,n,o);if(a!==t.parent.elements.indexOf(t))return e.delete(r,t),e.insertImportSpecifierAtIndex(r,n,t.parent,a),t}return e.deleteRange(r,{pos:Xd(t.getFirstToken()),end:Xd(t.propertyName??t.name)}),t}return Tn.assert(t.parent.parent.isTypeOnly),s(t.parent.parent),t.parent.parent;case 273:return s(t),t;case 274:return s(t.parent),t.parent;case 271:return e.deleteRange(r,t.getChildAt(1)),t;default:Tn.failBadSyntaxKind(t)}function s(s){var c;if(e.delete(r,yY(s,r)),!o.allowImportingTsExtensions){const t=Dg(s.parent),i=t&&(null==(c=n.getResolvedModuleFromModuleSpecifier(t,r))?void 0:c.resolvedModule);if(null==i?void 0:i.resolvedUsingTsExtension){const n=ca(t.text,Qq(t.text,o));e.replaceNode(r,t,aw.createStringLiteral(n))}}if(a){const n=dt(s.namedBindings,xE);if(n&&n.elements.length>1){!1!==m_e.getNamedImportSpecifierComparerWithDetection(s.parent,i,r).isSorted&&276===t.kind&&0!==n.elements.indexOf(t)&&(e.delete(r,t),e.insertImportSpecifierAtIndex(r,t,n,0));for(const i of n.elements)i===t||i.isTypeOnly||e.insertModifierBefore(r,156,i)}}}}(e,i,o,t,a);return 276===s.kind?[Ca.Remove_type_from_import_of_0_from_1,n,rte(s.parent.parent)]:[Ca.Remove_type_from_import_declaration_from_0,rte(s)]}default:return Tn.assertNever(r,`Unexpected fix kind ${r.kind}`)}}(e,t,n,r,i,o,a)});return n8(Eee,c,s,Fee,Ca.Add_all_missing_imports)}function rte(e){var t,n;return 271===e.kind?(null==(n=dt(null==(t=dt(e.moduleReference,EE))?void 0:t.expression,Ku))?void 0:n.text)||e.moduleReference.getText():pt(e.parent.moduleSpecifier,ON).text}function ite(e,t,n,r,i,o,a){var s;if(206===n.kind){if(o&&n.elements.some(e=>o.has(e)))return void e.replaceNode(t,n,aw.createObjectBindingPattern([...n.elements.filter(e=>!o.has(e)),...r?[aw.createBindingElement(void 0,"default",r.name)]:p,...i.map(e=>aw.createBindingElement(void 0,void 0,e.name))]));r&&_(n,r.name,"default");for(const e of i)_(n,e.name,void 0);return}const c=n.isTypeOnly&&ee([r,...i],e=>4===(null==e?void 0:e.addAsTypeOnly)),l=n.namedBindings&&(null==(s=dt(n.namedBindings,xE))?void 0:s.elements);if(r&&(Tn.assert(!n.name,"Cannot add a default import to an import clause that already has one"),e.insertNodeAt(t,n.getStart(t),aw.createIdentifier(r.name),{suffix:", "})),i.length){const{specifierComparer:r,isSorted:s}=m_e.getNamedImportSpecifierComparerWithDetection(n.parent,a,t),_=Se(i.map(e=>aw.createImportSpecifier((!n.isTypeOnly||c)&<e(e,a),void 0,aw.createIdentifier(e.name))),r);if(o)e.replaceNode(t,n.namedBindings,aw.updateNamedImports(n.namedBindings,Se([...l.filter(e=>!o.has(e)),..._],r)));else if((null==l?void 0:l.length)&&!1!==s){const i=c&&l?aw.updateNamedImports(n.namedBindings,B(l,e=>aw.updateImportSpecifier(e,!0,e.propertyName,e.name))).elements:l;for(const o of _){const a=m_e.getImportSpecifierInsertionIndex(i,o,r);e.insertImportSpecifierAtIndex(t,o,n.namedBindings,a)}}else if(null==l?void 0:l.length)for(const n of _)e.insertNodeInListAfter(t,Ee(l),n,l);else if(_.length){const r=aw.createNamedImports(_);n.namedBindings?e.replaceNode(t,n.namedBindings,r):e.insertNodeAfter(t,Tn.checkDefined(n.name,"Import clause must have either named imports or a default import"),r)}}if(c&&(e.delete(t,yY(n,t)),l))for(const n of l)e.insertModifierBefore(t,156,n);function _(n,r,i){const o=aw.createBindingElement(void 0,i,r);n.elements.length?e.insertNodeInListAfter(t,Ee(n.elements),o):e.replaceNode(t,n,aw.createObjectBindingPattern([o]))}}function ote(e,t,{namespacePrefix:n,usagePosition:r}){e.insertText(t,r,n+".")}function ate(e,t,{moduleSpecifier:n,usagePosition:r},i){e.insertText(t,r,ste(n,i))}function ste(e,t){const n=cY(t);return`import(${n}${e}${n}).`}function cte({addAsTypeOnly:e}){return 2===e}function lte(e,t){return cte(e)||!!t.preferTypeOnlyAutoImports&&4!==e.addAsTypeOnly}function _te(e,t,n,r,i,o,a){const s=iY(e,t);let c;if(void 0!==n||(null==r?void 0:r.length)){const i=(!n||cte(n))&&T(r,cte)||(o.verbatimModuleSyntax||a.preferTypeOnlyAutoImports)&&4!==(null==n?void 0:n.addAsTypeOnly)&&!ee(r,e=>4===e.addAsTypeOnly);c=fe(c,rY(n&&aw.createIdentifier(n.name),null==r?void 0:r.map(e=>aw.createImportSpecifier(!i&<e(e,a),void 0,aw.createIdentifier(e.name))),e,t,i))}if(i){c=fe(c,3===i.importKind?aw.createImportEqualsDeclaration(void 0,lte(i,a),aw.createIdentifier(i.name),aw.createExternalModuleReference(s)):aw.createImportDeclaration(void 0,aw.createImportClause(lte(i,a),void 0,aw.createNamespaceImport(aw.createIdentifier(i.name))),s,void 0))}return Tn.checkDefined(c)}function ute(e,t,n,r,i){const o=iY(e,t);let a;if(n||(null==r?void 0:r.length)){const e=(null==r?void 0:r.map(({name:e})=>aw.createBindingElement(void 0,void 0,e)))||[];n&&e.unshift(aw.createBindingElement(void 0,"default",n.name));a=fe(a,dte(aw.createObjectBindingPattern(e),o))}if(i){a=fe(a,dte(i.name,o))}return Tn.checkDefined(a)}function dte(e,t){return aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration("string"==typeof e?aw.createIdentifier(e):e,void 0,void 0,aw.createCallExpression(aw.createIdentifier("require"),void 0,[t]))],2))}function pte(e,t){return 7===t||(1&t?!!(111551&e):2&t?!!(788968&e):!!(4&t)&&!!(1920&e))}o8({errorCodes:Aee,getCodeActions(e){const{errorCode:t,preferences:n,sourceFile:r,span:i,program:o}=e,a=Hee(e,t,i.start,!0);if(a)return a.map(({fix:t,symbolName:i,errorIdentifierText:a})=>nte(e,r,i,t,i!==a,o,n))},fixIds:[Fee],getAllCodeActions:e=>{const{sourceFile:t,program:n,preferences:r,host:i,cancellationToken:o}=e,a=Oee(t,n,!0,r,i,o);return d8(e,Aee,t=>a.addImportFromDiagnostic(t,e)),l8(tde.ChangeTracker.with(e,a.writeFixes))}});var fte="addMissingConstraint",mte=[Ca.Type_0_is_not_comparable_to_type_1.code,Ca.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,Ca.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,Ca.Type_0_is_not_assignable_to_type_1.code,Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,Ca.Property_0_is_incompatible_with_index_signature.code,Ca.Property_0_in_type_1_is_not_assignable_to_type_2.code,Ca.Type_0_does_not_satisfy_the_constraint_1.code];function gte(e,t,n){const r=C(e.getSemanticDiagnostics(t),e=>e.start===n.start&&e.length===n.length);if(void 0===r||void 0===r.relatedInformation)return;const i=C(r.relatedInformation,e=>e.code===Ca.This_type_parameter_might_need_an_extends_0_constraint.code);if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;let o=boe(i.file,tc(i.start,i.length));if(void 0!==o&&(QN(o)&&fD(o.parent)&&(o=o.parent),fD(o))){if(HD(o.parent))return;const r=YX(t,n.start),a=function(e,t){if(A_(t.parent))return e.getTypeArgumentConstraint(t.parent);const n=nu(t)?e.getContextualType(t):void 0;return n||e.getTypeAtLocation(t)}(e.getTypeChecker(),r)||function(e){const[,t]=cV(e,"\n",0).match(/`extends (.*)`/)||[];return t}(i.messageText);return{constraint:a,declaration:o,token:r}}}function hte(e,t,n,r,i,o){const{declaration:a,constraint:s}=o,c=t.getTypeChecker();if(_t(s))e.insertText(i,a.name.end,` extends ${s}`);else{const o=OS(t.getCompilerOptions()),l=Zie({program:t,host:r}),_=Iee(i,t,n,r),u=ooe(c,_,s,void 0,o,void 0,l);u&&(e.replaceNode(i,a,aw.updateTypeParameterDeclaration(a,void 0,a.name,u,a.default)),_.writeFixes(e))}}o8({errorCodes:mte,getCodeActions(e){const{sourceFile:t,span:n,program:r,preferences:i,host:o}=e,a=gte(r,t,n);if(void 0===a)return;const s=tde.ChangeTracker.with(e,e=>hte(e,r,i,o,t,a));return[n8(fte,s,Ca.Add_extends_constraint,fte,Ca.Add_extends_constraint_to_all_type_parameters)]},fixIds:[fte],getAllCodeActions:e=>{const{program:t,preferences:n,host:r}=e,i=new Map;return l8(tde.ChangeTracker.with(e,o=>{d8(e,mte,e=>{const a=gte(t,e.file,tc(e.start,e.length));if(a&&Bx(i,KB(a.declaration)))return hte(o,t,n,r,e.file,a)})}))}});var yte="fixOverrideModifier",vte="fixAddOverrideModifier",bte="fixRemoveOverrideModifier",xte=[Ca.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,Ca.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,Ca.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,Ca.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,Ca.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,Ca.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,Ca.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code],Ste={[Ca.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:Ca.Add_override_modifier,fixId:vte,fixAllDescriptions:Ca.Add_all_missing_override_modifiers},[Ca.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:Ca.Add_override_modifier,fixId:vte,fixAllDescriptions:Ca.Add_all_missing_override_modifiers},[Ca.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:Ca.Remove_override_modifier,fixId:bte,fixAllDescriptions:Ca.Remove_all_unnecessary_override_modifiers},[Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:Ca.Remove_override_modifier,fixId:bte,fixAllDescriptions:Ca.Remove_override_modifier},[Ca.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]:{descriptions:Ca.Add_override_modifier,fixId:vte,fixAllDescriptions:Ca.Add_all_missing_override_modifiers},[Ca.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:Ca.Add_override_modifier,fixId:vte,fixAllDescriptions:Ca.Add_all_missing_override_modifiers},[Ca.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]:{descriptions:Ca.Add_override_modifier,fixId:vte,fixAllDescriptions:Ca.Remove_all_unnecessary_override_modifiers},[Ca.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:Ca.Remove_override_modifier,fixId:bte,fixAllDescriptions:Ca.Remove_all_unnecessary_override_modifiers},[Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:Ca.Remove_override_modifier,fixId:bte,fixAllDescriptions:Ca.Remove_all_unnecessary_override_modifiers}};function kte(e,t,n,r){switch(n){case Ca.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:case Ca.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:case Ca.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:case Ca.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:case Ca.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:return function(e,t,n){const r=Cte(t,n);if(Bm(t))return void e.addJSDocTags(t,r,[aw.createJSDocOverrideTag(aw.createIdentifier("override"))]);const i=r.modifiers||p,o=C(i,oD),a=C(i,aD),s=C(i,e=>DQ(e.kind)),c=w(i,gD),l=a?a.end:o?o.end:s?s.end:c?ds(t.text,c.end):r.getStart(t),_=s||o||a?{prefix:" "}:{suffix:" "};e.insertModifierAt(t,l,164,_)}(e,t.sourceFile,r);case Ca.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:case Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:case Ca.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:case Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:return function(e,t,n){const r=Cte(t,n);if(Bm(t))return void e.filterJSDocTags(t,r,mn(TF));const i=C(r.modifiers,sD);Tn.assertIsDefined(i),e.deleteModifier(t,i)}(e,t.sourceFile,r);default:Tn.fail("Unexpected error code: "+n)}}function Tte(e){switch(e.kind){case 176:case 172:case 174:case 177:case 178:return!0;case 169:return lc(e,e.parent);default:return!1}}function Cte(e,t){const n=xc(YX(e,t),e=>S_(e)?"quit":Tte(e));return Tn.assert(n&&Tte(n)),n}o8({errorCodes:xte,getCodeActions:function(e){const{errorCode:t,span:n}=e,r=Ste[t];if(!r)return p;const{descriptions:i,fixId:o,fixAllDescriptions:a}=r,s=tde.ChangeTracker.with(e,r=>kte(r,e,t,n.start));return[r8(yte,s,i,o,a)]},fixIds:[yte,vte,bte],getAllCodeActions:e=>u8(e,xte,(t,n)=>{const{code:r,start:i}=n,o=Ste[r];o&&o.fixId===e.fixId&&kte(t,e,r,i)})});var wte="fixNoPropertyAccessFromIndexSignature",Nte=[Ca.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code];function Dte(e,t,n,r){const i=sY(t,r),o=aw.createStringLiteral(n.name.text,0===i);e.replaceNode(t,n,Cl(n)?aw.createElementAccessChain(n.expression,n.questionDotToken,o):aw.createElementAccessExpression(n.expression,o))}function Pte(e,t){return pt(YX(e,t).parent,rP)}o8({errorCodes:Nte,fixIds:[wte],getCodeActions(e){const{sourceFile:t,span:n,preferences:r}=e,i=Pte(t,n.start),o=tde.ChangeTracker.with(e,t=>Dte(t,e.sourceFile,i,r));return[n8(wte,o,[Ca.Use_element_access_for_0,i.name.text],wte,Ca.Use_element_access_for_all_undeclared_properties)]},getAllCodeActions:e=>u8(e,Nte,(t,n)=>Dte(t,n.file,Pte(n.file,n.start),e.preferences))});var Ete="fixImplicitThis",Fte=[Ca.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function Ate(e,t,n,r){const i=YX(t,n);if(!xX(i))return;const o=lm(i,!1,!1);if((nE(o)||_P(o))&&!QE(lm(o,!1,!1))){const n=Tn.checkDefined(RX(o,100,t)),{name:i}=o,a=Tn.checkDefined(o.body);if(_P(o)){if(i&&Ice.Core.isSymbolReferencedInFile(i,r,t,a))return;return e.delete(t,n),i&&e.delete(t,i),e.insertText(t,a.pos," =>"),[Ca.Convert_function_expression_0_to_arrow_function,i?i.text:FZ]}return e.replaceNode(t,n,aw.createToken(87)),e.insertText(t,i.end," = "),e.insertText(t,a.pos," =>"),[Ca.Convert_function_declaration_0_to_arrow_function,i.text]}}o8({errorCodes:Fte,getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e;let i;const o=tde.ChangeTracker.with(e,e=>{i=Ate(e,t,r.start,n.getTypeChecker())});return i?[n8(Ete,o,i,Ete,Ca.Fix_all_implicit_this_errors)]:p},fixIds:[Ete],getAllCodeActions:e=>u8(e,Fte,(t,n)=>{Ate(t,n.file,n.start,e.program.getTypeChecker())})});var Ite="fixImportNonExportedMember",Ote=[Ca.Module_0_declares_1_locally_but_it_is_not_exported.code];function jte(e,t,n){var r,i;const o=YX(e,t);if(QN(o)){const t=xc(o,dE);if(void 0===t)return;const a=ON(t.moduleSpecifier)?t.moduleSpecifier:void 0;if(void 0===a)return;const s=null==(r=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:r.resolvedModule;if(void 0===s)return;const c=n.getSourceFile(s.resolvedFileName);if(void 0===c||k0(n,c))return;const l=null==(i=dt(c.symbol.valueDeclaration,bu))?void 0:i.locals;if(void 0===l)return;const _=l.get(o.escapedText);if(void 0===_)return;const u=function(e){if(void 0===e.valueDeclaration)return Ce(e.declarations);const t=e.valueDeclaration,n=eE(t)?dt(t.parent.parent,LP):void 0;return n&&1===g(n.declarationList.declarations)?n:t}(_);if(void 0===u)return;return{exportName:{node:o,isTypeOnly:aC(u)},node:u,moduleSourceFile:c,moduleSpecifier:a.text}}}function Lte(e,t,n,r,i){g(r)&&(i?Rte(e,t,n,i,r):Bte(e,t,n,r))}function Mte(e,t){return w(e.statements,e=>TE(e)&&(t&&e.isTypeOnly||!e.isTypeOnly))}function Rte(e,t,n,r,i){const o=r.exportClause&&CE(r.exportClause)?r.exportClause.elements:aw.createNodeArray([]),a=!(r.isTypeOnly||!RS(t.getCompilerOptions())&&!C(o,e=>e.isTypeOnly));e.replaceNode(n,r,aw.updateExportDeclaration(r,r.modifiers,r.isTypeOnly,aw.createNamedExports(aw.createNodeArray([...o,...Jte(i,a)],o.hasTrailingComma)),r.moduleSpecifier,r.attributes))}function Bte(e,t,n,r){e.insertNodeAtEndOfScope(n,n,aw.createExportDeclaration(void 0,!1,aw.createNamedExports(Jte(r,RS(t.getCompilerOptions()))),void 0,void 0))}function Jte(e,t){return aw.createNodeArray(M(e,e=>aw.createExportSpecifier(t&&e.isTypeOnly,void 0,e.node)))}o8({errorCodes:Ote,fixIds:[Ite],getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=jte(t,n.start,r);if(void 0===i)return;const o=tde.ChangeTracker.with(e,e=>function(e,t,{exportName:n,node:r,moduleSourceFile:i}){const o=Mte(i,n.isTypeOnly);o?Rte(e,t,i,o,[n]):sC(r)?e.insertExportModifier(i,r):Bte(e,t,i,[n])}(e,r,i));return[n8(Ite,o,[Ca.Export_0_from_module_1,i.exportName.node.text,i.moduleSpecifier],Ite,Ca.Export_all_referenced_locals)]},getAllCodeActions(e){const{program:t}=e;return l8(tde.ChangeTracker.with(e,n=>{const r=new Map;d8(e,Ote,e=>{const i=jte(e.file,e.start,t);if(void 0===i)return;const{exportName:o,node:a,moduleSourceFile:s}=i;if(void 0===Mte(s,o.isTypeOnly)&&sC(a))n.insertExportModifier(s,a);else{const e=r.get(s)||{typeOnlyExports:[],exports:[]};o.isTypeOnly?e.typeOnlyExports.push(o):e.exports.push(o),r.set(s,e)}}),r.forEach((e,r)=>{const i=Mte(r,!0);i&&i.isTypeOnly?(Lte(n,t,r,e.typeOnlyExports,i),Lte(n,t,r,e.exports,Mte(r,!1))):Lte(n,t,r,[...e.exports,...e.typeOnlyExports],i)})}))}});var zte="fixIncorrectNamedTupleSyntax";o8({errorCodes:[Ca.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,Ca.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code],getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=function(e,t){const n=YX(e,t);return xc(n,e=>202===e.kind)}(t,n.start),i=tde.ChangeTracker.with(e,e=>function(e,t,n){if(!n)return;let r=n.type,i=!1,o=!1;for(;190===r.kind||191===r.kind||196===r.kind;)190===r.kind?i=!0:191===r.kind&&(o=!0),r=r.type;const a=aw.updateNamedTupleMember(n,n.dotDotDotToken||(o?aw.createToken(26):void 0),n.name,n.questionToken||(i?aw.createToken(58):void 0),r);if(a===n)return;e.replaceNode(t,n,a)}(e,t,r));return[n8(zte,i,Ca.Move_labeled_tuple_element_modifiers_to_labels,zte,Ca.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[zte]});var qte="fixSpelling",Ute=[Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,Ca.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,Ca.Cannot_find_name_0_Did_you_mean_1.code,Ca.Could_not_find_name_0_Did_you_mean_1.code,Ca.Cannot_find_namespace_0_Did_you_mean_1.code,Ca.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,Ca.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,Ca._0_has_no_exported_member_named_1_Did_you_mean_2.code,Ca.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,Ca.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,Ca.No_overload_matches_this_call.code,Ca.Type_0_is_not_assignable_to_type_1.code];function Vte(e,t,n,r){const i=YX(e,t),o=i.parent;if((r===Ca.No_overload_matches_this_call.code||r===Ca.Type_0_is_not_assignable_to_type_1.code)&&!RE(o))return;const a=n.program.getTypeChecker();let s;if(rP(o)&&o.name===i){Tn.assert(kl(i),"Expected an identifier for spelling (property access)");let e=a.getTypeAtLocation(o.expression);64&o.flags&&(e=a.getNonNullableType(e)),s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(yP(o)&&103===o.operatorToken.kind&&o.left===i&&YN(i)){const e=a.getTypeAtLocation(o.right);s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(dD(o)&&o.right===i){const e=a.getSymbolAtLocation(o.left);e&&1536&e.flags&&(s=a.getSuggestedSymbolForNonexistentModule(o.right,e))}else if(SE(o)&&o.name===i){Tn.assertNode(i,QN,"Expected an identifier for spelling (import)");const t=function(e,t,n){var r;if(!t||!Ku(t.moduleSpecifier))return;const i=null==(r=e.program.getResolvedModuleFromModuleSpecifier(t.moduleSpecifier,n))?void 0:r.resolvedModule;return i?e.program.getSourceFile(i.resolvedFileName):void 0}(n,xc(i,dE),e);t&&t.symbol&&(s=a.getSuggestedSymbolForNonexistentModule(i,t.symbol))}else if(RE(o)&&o.name===i){Tn.assertNode(i,QN,"Expected an identifier for JSX attribute");const e=xc(i,Iu),t=a.getContextualTypeForArgumentAtIndex(e,0);s=a.getSuggestedSymbolForNonexistentJSXAttribute(i,t)}else if(Kv(o)&&x_(o)&&o.name===i){const e=xc(i,S_),t=e?Dh(e):void 0,n=t?a.getTypeAtLocation(t):void 0;n&&(s=a.getSuggestedSymbolForNonexistentClassMember(tp(i),n))}else{const e=$G(i),t=tp(i);Tn.assert(void 0!==t,"name should be defined"),s=a.getSuggestedSymbolForNonexistentSymbol(i,t,function(e){let t=0;4&e&&(t|=1920);2&e&&(t|=788968);1&e&&(t|=111551);return t}(e))}return void 0===s?void 0:{node:i,suggestedSymbol:s}}function Wte(e,t,n,r,i){const o=Dc(r);if(!Es(o,i)&&rP(n.parent)){const i=r.valueDeclaration;i&&Ic(i)&&YN(i.name)?e.replaceNode(t,n,aw.createIdentifier(o)):e.replaceNode(t,n.parent,aw.createElementAccessExpression(n.parent.expression,aw.createStringLiteral(o)))}else e.replaceNode(t,n,aw.createIdentifier(o))}o8({errorCodes:Ute,getCodeActions(e){const{sourceFile:t,errorCode:n}=e,r=Vte(t,e.span.start,e,n);if(!r)return;const{node:i,suggestedSymbol:o}=r,a=OS(e.host.getCompilationSettings());return[n8("spelling",tde.ChangeTracker.with(e,e=>Wte(e,t,i,o,a)),[Ca.Change_spelling_to_0,Dc(o)],qte,Ca.Fix_all_detected_spelling_errors)]},fixIds:[qte],getAllCodeActions:e=>u8(e,Ute,(t,n)=>{const r=Vte(n.file,n.start,e,n.code),i=OS(e.host.getCompilationSettings());r&&Wte(t,e.sourceFile,r.node,r.suggestedSymbol,i)})});var $te="returnValueCorrect",Hte="fixAddReturnStatement",Kte="fixRemoveBracesFromArrowFunctionBody",Gte="fixWrapTheBlockWithParen",Xte=[Ca.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,Ca.Type_0_is_not_assignable_to_type_1.code,Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];function Qte(e,t,n){const r=e.createSymbol(4,t.escapedText);r.links.type=e.getTypeAtLocation(n);const i=ad([r]);return e.createAnonymousType(void 0,i,[],[],[])}function Yte(e,t,n,r){if(!t.body||!jP(t.body)||1!==g(t.body.statements))return;const i=Ne(t.body.statements);if(RP(i)&&Zte(e,t,e.getTypeAtLocation(i.expression),n,r))return{declaration:t,kind:0,expression:i.expression,statement:i,commentSource:i.expression};if(XP(i)&&RP(i.statement)){const o=aw.createObjectLiteralExpression([aw.createPropertyAssignment(i.label,i.statement.expression)]);if(Zte(e,t,Qte(e,i.label,i.statement.expression),n,r))return uP(t)?{declaration:t,kind:1,expression:o,statement:i,commentSource:i.statement.expression}:{declaration:t,kind:0,expression:o,statement:i,commentSource:i.statement.expression}}else if(jP(i)&&1===g(i.statements)){const o=Ne(i.statements);if(XP(o)&&RP(o.statement)){const a=aw.createObjectLiteralExpression([aw.createPropertyAssignment(o.label,o.statement.expression)]);if(Zte(e,t,Qte(e,o.label,o.statement.expression),n,r))return{declaration:t,kind:0,expression:a,statement:i,commentSource:o}}}}function Zte(e,t,n,r,i){if(i){const r=e.getSignatureFromDeclaration(t);if(r){Wv(t,1024)&&(n=e.createPromiseType(n));const i=e.createSignature(t,r.typeParameters,r.thisParameter,r.parameters,n,void 0,r.minArgumentCount,r.flags);n=e.createAnonymousType(void 0,ad(),[i],[],[])}else n=e.getAnyType()}return e.isTypeAssignableTo(n,r)}function ene(e,t,n,r){const i=YX(t,n);if(!i.parent)return;const o=xc(i.parent,g_);switch(r){case Ca.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:if(!(o&&o.body&&o.type&&TX(o.type,i)))return;return Yte(e,o,e.getTypeFromTypeNode(o.type),!1);case Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!o||!oP(o.parent)||!o.body)return;const t=o.parent.arguments.indexOf(o);if(-1===t)return;const n=e.getContextualTypeForArgumentAtIndex(o.parent,t);if(!n)return;return Yte(e,o,n,!0);case Ca.Type_0_is_not_assignable_to_type_1.code:if(!yh(i)||!Bf(i.parent)&&!RE(i.parent))return;const r=function(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:return e.initializer;case 291:return e.initializer&&(zE(e.initializer)?e.initializer.expression:void 0);case 304:case 171:case 306:case 348:case 341:return}}(i.parent);if(!r||!g_(r)||!r.body)return;return Yte(e,r,e.getTypeAtLocation(i.parent),!0)}}function tne(e,t,n,r){uZ(n);const i=BZ(t);e.replaceNode(t,r,aw.createReturnStatement(n),{leadingTriviaOption:tde.LeadingTriviaOption.Exclude,trailingTriviaOption:tde.TrailingTriviaOption.Exclude,suffix:i?";":void 0})}function nne(e,t,n,r,i,o){const a=o||TZ(r)?aw.createParenthesizedExpression(r):r;uZ(i),fZ(i,a),e.replaceNode(t,n.body,a)}function rne(e,t,n,r){e.replaceNode(t,n.body,aw.createParenthesizedExpression(r))}function ine(e,t,n){const r=tde.ChangeTracker.with(e,r=>tne(r,e.sourceFile,t,n));return n8($te,r,Ca.Add_a_return_statement,Hte,Ca.Add_all_missing_return_statement)}function one(e,t,n){const r=tde.ChangeTracker.with(e,r=>rne(r,e.sourceFile,t,n));return n8($te,r,Ca.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,Gte,Ca.Wrap_all_object_literal_with_parentheses)}o8({errorCodes:Xte,fixIds:[Hte,Kte,Gte],getCodeActions:function(e){const{program:t,sourceFile:n,span:{start:r},errorCode:i}=e,o=ene(t.getTypeChecker(),n,r,i);if(o)return 0===o.kind?pe([ine(e,o.expression,o.statement)],uP(o.declaration)?function(e,t,n,r){const i=tde.ChangeTracker.with(e,i=>nne(i,e.sourceFile,t,n,r,!1));return n8($te,i,Ca.Remove_braces_from_arrow_function_body,Kte,Ca.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}(e,o.declaration,o.expression,o.commentSource):void 0):[one(e,o.declaration,o.expression)]},getAllCodeActions:e=>u8(e,Xte,(t,n)=>{const r=ene(e.program.getTypeChecker(),n.file,n.start,n.code);if(r)switch(e.fixId){case Hte:tne(t,n.file,r.expression,r.statement);break;case Kte:if(!uP(r.declaration))return;nne(t,n.file,r.declaration,r.expression,r.commentSource,!1);break;case Gte:if(!uP(r.declaration))return;rne(t,n.file,r.declaration,r.expression);break;default:Tn.fail(JSON.stringify(e.fixId))}})});var ane="fixMissingMember",sne="fixMissingProperties",cne="fixMissingAttributes",lne="fixMissingFunctionDeclaration",_ne=[Ca.Property_0_does_not_exist_on_type_1.code,Ca.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,Ca.Property_0_is_missing_in_type_1_but_required_in_type_2.code,Ca.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,Ca.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,Ca.Cannot_find_name_0.code];function une(e,t,n,r,i){var o;const a=YX(e,t),s=a.parent;if(n===Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code){if(19!==a.kind||!nP(s)||!oP(s.parent))return;const e=N(s.parent.arguments,e=>e===s);if(e<0)return;const t=r.getResolvedSignature(s.parent);if(!(t&&t.declaration&&t.parameters[e]))return;const n=t.parameters[e].valueDeclaration;if(!(n&&mD(n)&&QN(n.name)))return;const i=We(r.getUnmatchedProperties(r.getTypeAtLocation(s),r.getParameterType(t,e),!1,!1));if(!g(i))return;return{kind:3,token:n.name,identifier:n.name.text,properties:i,parentDeclaration:s}}if(19===a.kind&&nP(s)){const e=r.getContextualType(s)||r.getTypeAtLocation(s),t=We(r.getUnmatchedProperties(r.getTypeAtLocation(s),e,!1,!1));if(!g(t))return;return{kind:3,token:s,identifier:"",properties:t,parentDeclaration:s}}if(!kl(a))return;if(QN(a)&&qu(s)&&s.initializer&&nP(s.initializer)){const e=r.getContextualType(a)||r.getTypeAtLocation(a),t=We(r.getUnmatchedProperties(r.getTypeAtLocation(s.initializer),e,!1,!1));if(!g(t))return;return{kind:3,token:a,identifier:a.text,properties:t,parentDeclaration:s.initializer}}if(QN(a)&&Iu(a.parent)){const e=function(e,t,n){const r=e.getContextualType(n.attributes);if(void 0===r)return p;const i=r.getProperties();if(!g(i))return p;const o=new Set;for(const t of n.attributes.properties)if(RE(t)&&o.add(hC(t.name)),JE(t)){const n=e.getTypeAtLocation(t.expression);for(const e of n.getProperties())o.add(e.escapedName)}return O(i,e=>Es(e.name,t,1)&&!(16777216&e.flags||48&xx(e)||o.has(e.escapedName)))}(r,OS(i.getCompilerOptions()),a.parent);if(!g(e))return;return{kind:4,token:a,attributes:e,parentDeclaration:a.parent}}if(QN(a)){const t=null==(o=r.getContextualType(a))?void 0:o.getNonNullableType();if(t&&16&Ox(t)){const n=Ce(r.getSignaturesOfType(t,0));if(void 0===n)return;return{kind:5,token:a,signature:n,sourceFile:e,parentDeclaration:Tne(a)}}if(oP(s)&&s.expression===a)return{kind:2,token:a,call:s,sourceFile:e,modifierFlags:0,parentDeclaration:Tne(a)}}if(!rP(s))return;const c=GQ(r.getTypeAtLocation(s.expression)),l=c.symbol;if(!l||!l.declarations)return;if(QN(a)&&oP(s.parent)){const t=C(l.declarations,sE),n=null==t?void 0:t.getSourceFile();if(t&&n&&!k0(i,n))return{kind:2,token:a,call:s.parent,sourceFile:e,modifierFlags:32,parentDeclaration:t};const r=C(l.declarations,QE);if(e.commonJsModuleIndicator)return;if(r&&!k0(i,r))return{kind:2,token:a,call:s.parent,sourceFile:r,modifierFlags:32,parentDeclaration:r}}const _=C(l.declarations,S_);if(!_&&YN(a))return;const u=_||C(l.declarations,e=>iE(e)||ID(e));if(u&&!k0(i,u.getSourceFile())){const e=!ID(u)&&(c.target||c)!==r.getDeclaredTypeOfSymbol(l);if(e&&(YN(a)||iE(u)))return;const t=u.getSourceFile(),n=ID(u)?0:(e?256:0)|(f0(a.text)?2:0),i=Bm(t);return{kind:0,token:a,call:dt(s.parent,oP),modifierFlags:n,parentDeclaration:u,declSourceFile:t,isJSFile:i}}const d=C(l.declarations,aE);return!d||1056&c.flags||YN(a)||k0(i,d.getSourceFile())?void 0:{kind:1,token:a,parentDeclaration:d}}function dne(e,t,n,r,i){const o=r.text;if(i){if(231===n.kind)return;const r=n.name.getText(),i=pne(aw.createIdentifier(r),o);e.insertNodeAfter(t,n,i)}else if(YN(r)){const r=aw.createPropertyDeclaration(void 0,o,void 0,void 0,void 0),i=gne(n);i?e.insertNodeAfter(t,i,r):e.insertMemberAtStart(t,n,r)}else{const r=vv(n);if(!r)return;const i=pne(aw.createThis(),o);e.insertNodeAtConstructorEnd(t,r,i)}}function pne(e,t){return aw.createExpressionStatement(aw.createAssignment(aw.createPropertyAccessExpression(e,t),kne()))}function fne(e,t,n){let r;if(226===n.parent.parent.kind){const i=n.parent.parent,o=n.parent===i.left?i.right:i.left,a=e.getWidenedType(e.getBaseTypeOfLiteralType(e.getTypeAtLocation(o)));r=e.typeToTypeNode(a,t,1)}else{const t=e.getContextualType(n.parent);r=t?e.typeToTypeNode(t,void 0,1):void 0}return r||aw.createKeywordTypeNode(133)}function mne(e,t,n,r,i,o){const a=o?aw.createNodeArray(aw.createModifiersFromModifierFlags(o)):void 0,s=S_(n)?aw.createPropertyDeclaration(a,r,void 0,i,void 0):aw.createPropertySignature(void 0,r,void 0,i),c=gne(n);c?e.insertNodeAfter(t,c,s):e.insertMemberAtStart(t,n,s)}function gne(e){let t;for(const n of e.members){if(!yD(n))break;t=n}return t}function hne(e,t,n,r,i,o,a){const s=Iee(a,e.program,e.preferences,e.host),c=roe(S_(o)?174:173,e,s,n,r,i,o),l=function(e,t){if(ID(e))return;const n=xc(t,e=>bD(e)||SD(e));return n&&n.parent===e?n:void 0}(o,n);l?t.insertNodeAfter(a,l,c):t.insertMemberAtStart(a,o,c),s.writeFixes(t)}function yne(e,t,{token:n,parentDeclaration:r}){const i=ee(r.members,e=>{const n=t.getTypeAtLocation(e);return!!(n&&402653316&n.flags)}),o=r.getSourceFile(),a=aw.createEnumMember(n,i?aw.createStringLiteral(n.text):void 0),s=Pe(r.members);s?e.insertNodeInListAfter(o,s,a,r.members):e.insertMemberAtStart(o,r,a)}function vne(e,t,n){const r=sY(t.sourceFile,t.preferences),i=Iee(t.sourceFile,t.program,t.preferences,t.host),o=2===n.kind?roe(262,t,i,n.call,wc(n.token),n.modifierFlags,n.parentDeclaration):noe(262,t,r,n.signature,doe(Ca.Function_not_implemented.message,r),n.token,void 0,void 0,void 0,i);void 0===o&&Tn.fail("fixMissingFunctionDeclaration codefix got unexpected error."),HP(n.parentDeclaration)?e.insertNodeBefore(n.sourceFile,n.parentDeclaration,o,!0):e.insertNodeAtEndOfScope(n.sourceFile,n.parentDeclaration,o),i.writeFixes(e)}function bne(e,t,n){const r=Iee(t.sourceFile,t.program,t.preferences,t.host),i=sY(t.sourceFile,t.preferences),o=t.program.getTypeChecker(),a=n.parentDeclaration.attributes,s=ee(a.properties,JE),c=M(n.attributes,e=>{const a=Sne(t,o,r,i,o.getTypeOfSymbol(e),n.parentDeclaration),s=aw.createIdentifier(e.name),c=aw.createJsxAttribute(s,aw.createJsxExpression(void 0,a));return qT(s,c),c}),l=aw.createJsxAttributes(s?[...c,...a.properties]:[...a.properties,...c]),_={prefix:a.pos===a.end?" ":void 0};e.replaceNode(t.sourceFile,a,l,_),r.writeFixes(e)}function xne(e,t,n){const r=Iee(t.sourceFile,t.program,t.preferences,t.host),i=sY(t.sourceFile,t.preferences),o=OS(t.program.getCompilerOptions()),a=t.program.getTypeChecker(),s=M(n.properties,e=>{const s=Sne(t,a,r,i,a.getTypeOfSymbol(e),n.parentDeclaration);return aw.createPropertyAssignment(function(e,t,n,r){if(sd(e)){const t=r.symbolToNode(e,111551,void 0,1073741824);if(t&&pD(t))return t}return nC(e.name,t,0===n,!1,!1)}(e,o,i,a),s)}),c={leadingTriviaOption:tde.LeadingTriviaOption.Exclude,trailingTriviaOption:tde.TrailingTriviaOption.Exclude,indentation:n.indentation};e.replaceNode(t.sourceFile,n.parentDeclaration,aw.createObjectLiteralExpression([...n.parentDeclaration.properties,...s],!0),c),r.writeFixes(e)}function Sne(e,t,n,r,i,o){if(3&i.flags)return kne();if(134217732&i.flags)return aw.createStringLiteral("",0===r);if(8&i.flags)return aw.createNumericLiteral(0);if(64&i.flags)return aw.createBigIntLiteral("0n");if(16&i.flags)return aw.createFalse();if(1056&i.flags){const e=i.symbol.exports?we(i.symbol.exports.values()):i.symbol,n=t.symbolToExpression(i.symbol.parent?i.symbol.parent:i.symbol,111551,void 0,64);return void 0===e||void 0===n?aw.createNumericLiteral(0):aw.createPropertyAccessExpression(n,t.symbolToString(e))}if(256&i.flags)return aw.createNumericLiteral(i.value);if(2048&i.flags)return aw.createBigIntLiteral(i.value);if(128&i.flags)return aw.createStringLiteral(i.value,0===r);if(512&i.flags)return i===t.getFalseType()||i===t.getFalseType(!0)?aw.createFalse():aw.createTrue();if(65536&i.flags)return aw.createNull();if(1048576&i.flags){return v(i.types,i=>Sne(e,t,n,r,i,o))??kne()}if(t.isArrayLikeType(i))return aw.createArrayLiteralExpression();if(function(e){return 524288&e.flags&&(128&Ox(e)||e.symbol&&dt(Fe(e.symbol.declarations),ID))}(i)){const a=M(t.getPropertiesOfType(i),i=>{const a=Sne(e,t,n,r,t.getTypeOfSymbol(i),o);return aw.createPropertyAssignment(i.name,a)});return aw.createObjectLiteralExpression(a,!0)}if(16&Ox(i)){if(void 0===C(i.symbol.declarations||p,fn(ED,vD,bD)))return kne();const a=t.getSignaturesOfType(i,0);if(void 0===a)return kne();return noe(218,e,r,a[0],doe(Ca.Function_not_implemented.message,r),void 0,void 0,void 0,o,n)??kne()}if(1&Ox(i)){const e=Ix(i.symbol);if(void 0===e||Gv(e))return kne();const t=vv(e);return t&&g(t.parameters)?kne():aw.createNewExpression(aw.createIdentifier(i.symbol.name),void 0,void 0)}return kne()}function kne(){return aw.createIdentifier("undefined")}function Tne(e){if(xc(e,zE)){const t=xc(e.parent,HP);if(t)return t}return Dd(e)}o8({errorCodes:_ne,getCodeActions(e){const t=e.program.getTypeChecker(),n=une(e.sourceFile,e.span.start,e.errorCode,t,e.program);if(n){if(3===n.kind){const t=tde.ChangeTracker.with(e,t=>xne(t,e,n));return[n8(sne,t,Ca.Add_missing_properties,sne,Ca.Add_all_missing_properties)]}if(4===n.kind){const t=tde.ChangeTracker.with(e,t=>bne(t,e,n));return[n8(cne,t,Ca.Add_missing_attributes,cne,Ca.Add_all_missing_attributes)]}if(2===n.kind||5===n.kind){const t=tde.ChangeTracker.with(e,t=>vne(t,e,n));return[n8(lne,t,[Ca.Add_missing_function_declaration_0,n.token.text],lne,Ca.Add_all_missing_function_declarations)]}if(1===n.kind){const t=tde.ChangeTracker.with(e,t=>yne(t,e.program.getTypeChecker(),n));return[n8(ane,t,[Ca.Add_missing_enum_member_0,n.token.text],ane,Ca.Add_all_missing_members)]}return ne(function(e,t){const{parentDeclaration:n,declSourceFile:r,modifierFlags:i,token:o,call:a}=t;if(void 0===a)return;const s=o.text,c=t=>tde.ChangeTracker.with(e,i=>hne(e,i,a,o,t,n,r)),l=[n8(ane,c(256&i),[256&i?Ca.Declare_static_method_0:Ca.Declare_method_0,s],ane,Ca.Add_all_missing_members)];2&i&&l.unshift(t8(ane,c(2),[Ca.Declare_private_method_0,s]));return l}(e,n),function(e,t){return t.isJSFile?hn(function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){if(iE(t)||ID(t))return;const o=tde.ChangeTracker.with(e,e=>dne(e,n,t,i,!!(256&r)));if(0===o.length)return;const a=256&r?Ca.Initialize_static_property_0:YN(i)?Ca.Declare_a_private_field_named_0:Ca.Initialize_property_0_in_the_constructor;return n8(ane,o,[a,i.text],ane,Ca.Add_all_missing_members)}(e,t)):function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){const o=i.text,a=256&r,s=fne(e.program.getTypeChecker(),t,i),c=r=>tde.ChangeTracker.with(e,e=>mne(e,n,t,o,s,r)),l=[n8(ane,c(256&r),[a?Ca.Declare_static_property_0:Ca.Declare_property_0,o],ane,Ca.Add_all_missing_members)];if(a||YN(i))return l;2&r&&l.unshift(t8(ane,c(2),[Ca.Declare_private_property_0,o]));return l.push(function(e,t,n,r,i){const o=aw.createKeywordTypeNode(154),a=aw.createParameterDeclaration(void 0,void 0,"x",void 0,o,void 0),s=aw.createIndexSignature(void 0,[a],i),c=tde.ChangeTracker.with(e,e=>e.insertMemberAtStart(t,n,s));return t8(ane,c,[Ca.Add_index_signature_for_property_0,r])}(e,n,t,i.text,s)),l}(e,t)}(e,n))}},fixIds:[ane,lne,sne,cne],getAllCodeActions:e=>{const{program:t,fixId:n}=e,r=t.getTypeChecker(),i=new Map,o=new Map;return l8(tde.ChangeTracker.with(e,t=>{d8(e,_ne,a=>{const s=une(a.file,a.start,a.code,r,e.program);if(s&&Bx(i,KB(s.parentDeclaration)+"#"+(3===s.kind?s.identifier:s.token.text)))if(n!==lne||2!==s.kind&&5!==s.kind){if(n===sne&&3===s.kind)xne(t,e,s);else if(n===cne&&4===s.kind)bne(t,e,s);else if(1===s.kind&&yne(t,r,s),0===s.kind){const{parentDeclaration:e,token:t}=s,n=G(o,e,()=>[]);n.some(e=>e.token.text===t.text)||n.push(s)}}else vne(t,e,s)}),o.forEach((n,i)=>{const a=ID(i)?void 0:Doe(i,r);for(const i of n){if(null==a?void 0:a.some(e=>{const t=o.get(e);return!!t&&t.some(({token:e})=>e.text===i.token.text)}))continue;const{parentDeclaration:n,declSourceFile:s,modifierFlags:c,token:l,call:_,isJSFile:u}=i;if(_&&!YN(l))hne(e,t,_,l,256&c,n,s);else if(!u||iE(n)||ID(n)){const e=fne(r,n,l);mne(t,s,n,l.text,e,256&c)}else dne(t,s,n,l,!!(256&c))}})}))}});var Cne="addMissingNewOperator",wne=[Ca.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];function Nne(e,t,n){const r=pt(function(e,t){let n=YX(e,t.start);const r=Us(t);for(;n.endNne(e,t,n));return[n8(Cne,r,Ca.Add_missing_new_operator_to_call,Cne,Ca.Add_missing_new_operator_to_all_calls)]},fixIds:[Cne],getAllCodeActions:e=>u8(e,wne,(t,n)=>Nne(t,e.sourceFile,n))});var Dne="addMissingParam",Pne="addOptionalParam",Ene=[Ca.Expected_0_arguments_but_got_1.code];function Fne(e,t,n){const r=xc(YX(e,n),oP);if(void 0===r||0===g(r.arguments))return;const i=t.getTypeChecker(),o=O(i.getTypeAtLocation(r.expression).symbol.declarations,One);if(void 0===o)return;const a=Pe(o);if(void 0===a||void 0===a.body||k0(t,a.getSourceFile()))return;const s=function(e){const t=jc(e);if(t)return t;if(eE(e.parent)&&QN(e.parent.name)||yD(e.parent)||mD(e.parent))return e.parent.name}(a);if(void 0===s)return;const c=[],l=[],_=g(a.parameters),u=g(r.arguments);if(_>u)return;const d=[a,...Lne(a,o)];for(let e=0,t=0,n=0;e{const s=Dd(i),c=Iee(s,t,n,r);g(i.parameters)?e.replaceNodeRangeWithNodes(s,Ne(i.parameters),Ee(i.parameters),jne(c,a,i,o),{joiner:", ",indentation:0,leadingTriviaOption:tde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:tde.TrailingTriviaOption.Include}):h(jne(c,a,i,o),(t,n)=>{0===g(i.parameters)&&0===n?e.insertNodeAt(s,i.parameters.end,t):e.insertNodeAtEndOfList(s,i.parameters,t)}),c.writeFixes(e)})}function One(e){switch(e.kind){case 262:case 218:case 174:case 219:return!0;default:return!1}}function jne(e,t,n,r){const i=M(n.parameters,e=>aw.createParameterDeclaration(e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer));for(const{pos:n,declaration:o}of r){const r=n>0?i[n-1]:void 0;i.splice(n,0,aw.updateParameterDeclaration(o,o.modifiers,o.dotDotDotToken,o.name,r&&r.questionToken?aw.createToken(58):o.questionToken,Jne(e,o.type,t),o.initializer))}return i}function Lne(e,t){const n=[];for(const r of t)if(Mne(r)){if(g(r.parameters)===g(e.parameters)){n.push(r);continue}if(g(r.parameters)>g(e.parameters))return[]}return n}function Mne(e){return One(e)&&void 0===e.body}function Rne(e,t,n){return aw.createParameterDeclaration(void 0,void 0,e,n,t,void 0)}function Bne(e,t){return g(e)&&ee(e,e=>tIne(t,e.program,e.preferences,e.host,r,i)),[g(i)>1?Ca.Add_missing_parameters_to_0:Ca.Add_missing_parameter_to_0,n],Dne,Ca.Add_all_missing_parameters)),g(o)&&pe(a,n8(Pne,tde.ChangeTracker.with(e,t=>Ine(t,e.program,e.preferences,e.host,r,o)),[g(o)>1?Ca.Add_optional_parameters_to_0:Ca.Add_optional_parameter_to_0,n],Pne,Ca.Add_all_optional_parameters)),a},getAllCodeActions:e=>u8(e,Ene,(t,n)=>{const r=Fne(e.sourceFile,e.program,n.start);if(r){const{declarations:n,newParameters:i,newOptionalParameters:o}=r;e.fixId===Dne&&Ine(t,e.program,e.preferences,e.host,n,i),e.fixId===Pne&&Ine(t,e.program,e.preferences,e.host,n,o)}})});var zne="installTypesPackage",qne=Ca.Cannot_find_module_0_or_its_corresponding_type_declarations.code,Une=[qne,Ca.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code];function Vne(e,t){return{type:"install package",file:e,packageName:t}}function Wne(e,t){const n=dt(YX(e,t),ON);if(!n)return;const r=n.text,{packageName:i}=mR(r);return Js(i)?void 0:i}function $ne(e,t,n){var r;return n===qne?zK.nodeCoreModules.has(e)?"@types/node":void 0:(null==(r=t.isKnownTypesPackageName)?void 0:r.call(t,e))?PR(e):void 0}o8({errorCodes:Une,getCodeActions:function(e){const{host:t,sourceFile:n,span:{start:r}}=e,i=Wne(n,r);if(void 0===i)return;const o=$ne(i,t,e.errorCode);return void 0===o?[]:[n8("fixCannotFindModule",[],[Ca.Install_0,o],zne,Ca.Install_all_missing_types_packages,Vne(n.fileName,o))]},fixIds:[zne],getAllCodeActions:e=>u8(e,Une,(t,n,r)=>{const i=Wne(n.file,n.start);if(void 0!==i)switch(e.fixId){case zne:{const t=$ne(i,e.host,n.code);t&&r.push(Vne(n.file.fileName,t));break}default:Tn.fail(`Bad fixId: ${e.fixId}`)}})});var Hne=[Ca.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,Ca.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,Ca.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,Ca.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,Ca.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,Ca.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code],Kne="fixClassDoesntImplementInheritedAbstractMember";function Gne(e,t){return pt(YX(e,t).parent,S_)}function Xne(e,t,n,r,i){const o=Dh(e),a=n.program.getTypeChecker(),s=a.getTypeAtLocation(o),c=a.getPropertiesOfType(s).filter(Qne),l=Iee(t,n.program,i,n.host);Yie(e,c,t,n,i,l,n=>r.insertMemberAtStart(t,e,n)),l.writeFixes(r)}function Qne(e){const t=ob(Ne(e.getDeclarations()));return!(2&t||!(64&t))}o8({errorCodes:Hne,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=tde.ChangeTracker.with(e,r=>Xne(Gne(t,n.start),t,e,r,e.preferences));return 0===r.length?void 0:[n8(Kne,r,Ca.Implement_inherited_abstract_class,Kne,Ca.Implement_all_inherited_abstract_classes)]},fixIds:[Kne],getAllCodeActions:function(e){const t=new Map;return u8(e,Hne,(n,r)=>{const i=Gne(r.file,r.start);Bx(t,KB(i))&&Xne(i,e.sourceFile,e,n,e.preferences)})}});var Yne="classSuperMustPrecedeThisAccess",Zne=[Ca.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];function ere(e,t,n,r){e.insertNodeAtConstructorStart(t,n,r),e.delete(t,r)}function tre(e,t){const n=YX(e,t);if(110!==n.kind)return;const r=rm(n),i=nre(r.body);return i&&!i.expression.arguments.some(e=>rP(e)&&e.expression===n)?{constructor:r,superCall:i}:void 0}function nre(e){return RP(e)&&mf(e.expression)?e:f_(e)?void 0:KI(e,nre)}o8({errorCodes:Zne,getCodeActions(e){const{sourceFile:t,span:n}=e,r=tre(t,n.start);if(!r)return;const{constructor:i,superCall:o}=r,a=tde.ChangeTracker.with(e,e=>ere(e,t,i,o));return[n8(Yne,a,Ca.Make_super_call_the_first_statement_in_the_constructor,Yne,Ca.Make_all_super_calls_the_first_statement_in_their_constructor)]},fixIds:[Yne],getAllCodeActions(e){const{sourceFile:t}=e,n=new Map;return u8(e,Zne,(e,r)=>{const i=tre(r.file,r.start);if(!i)return;const{constructor:o,superCall:a}=i;Bx(n,KB(o.parent))&&ere(e,t,o,a)})}});var rre="constructorForDerivedNeedSuperCall",ire=[Ca.Constructors_for_derived_classes_must_contain_a_super_call.code];function ore(e,t){const n=YX(e,t);return Tn.assert(SD(n.parent),"token should be at the constructor declaration"),n.parent}function are(e,t,n){const r=aw.createExpressionStatement(aw.createCallExpression(aw.createSuper(),void 0,p));e.insertNodeAtConstructorStart(t,n,r)}o8({errorCodes:ire,getCodeActions(e){const{sourceFile:t,span:n}=e,r=ore(t,n.start),i=tde.ChangeTracker.with(e,e=>are(e,t,r));return[n8(rre,i,Ca.Add_missing_super_call,rre,Ca.Add_all_missing_super_calls)]},fixIds:[rre],getAllCodeActions:e=>u8(e,ire,(t,n)=>are(t,e.sourceFile,ore(n.file,n.start)))});var sre="fixEnableJsxFlag",cre=[Ca.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];function lre(e,t){foe(e,t,"jsx",aw.createStringLiteral("react"))}o8({errorCodes:cre,getCodeActions:function(e){const{configFile:t}=e.program.getCompilerOptions();if(void 0===t)return;const n=tde.ChangeTracker.with(e,e=>lre(e,t));return[t8(sre,n,Ca.Enable_the_jsx_flag_in_your_configuration_file)]},fixIds:[sre],getAllCodeActions:e=>u8(e,cre,t=>{const{configFile:n}=e.program.getCompilerOptions();void 0!==n&&lre(t,n)})});var _re="fixNaNEquality",ure=[Ca.This_condition_will_always_return_0.code];function dre(e,t,n){const r=C(e.getSemanticDiagnostics(t),e=>e.start===n.start&&e.length===n.length);if(void 0===r||void 0===r.relatedInformation)return;const i=C(r.relatedInformation,e=>e.code===Ca.Did_you_mean_0.code);if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;const o=boe(i.file,tc(i.start,i.length));return void 0!==o&&nu(o)&&yP(o.parent)?{suggestion:fre(i.messageText),expression:o.parent,arg:o}:void 0}function pre(e,t,n,r){const i=aw.createCallExpression(aw.createPropertyAccessExpression(aw.createIdentifier("Number"),aw.createIdentifier("isNaN")),void 0,[n]),o=r.operatorToken.kind;e.replaceNode(t,r,38===o||36===o?aw.createPrefixUnaryExpression(54,i):i)}function fre(e){const[,t]=cV(e,"\n",0).match(/'(.*)'/)||[];return t}o8({errorCodes:ure,getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=dre(r,t,n);if(void 0===i)return;const{suggestion:o,expression:a,arg:s}=i,c=tde.ChangeTracker.with(e,e=>pre(e,t,s,a));return[n8(_re,c,[Ca.Use_0,o],_re,Ca.Use_Number_isNaN_in_all_conditions)]},fixIds:[_re],getAllCodeActions:e=>u8(e,ure,(t,n)=>{const r=dre(e.program,n.file,tc(n.start,n.length));r&&pre(t,n.file,r.arg,r.expression)})}),o8({errorCodes:[Ca.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,Ca.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,Ca.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code],getCodeActions:function(e){const t=e.program.getCompilerOptions(),{configFile:n}=t;if(void 0===n)return;const r=[],i=jS(t);if(i>=5&&i<99){const t=tde.ChangeTracker.with(e,e=>{foe(e,n,"module",aw.createStringLiteral("esnext"))});r.push(t8("fixModuleOption",t,[Ca.Set_the_module_option_in_your_configuration_file_to_0,"esnext"]))}const o=OS(t);if(o<4||o>99){const t=tde.ChangeTracker.with(e,e=>{if(!em(n))return;const t=[["target",aw.createStringLiteral("es2017")]];1===i&&t.push(["module",aw.createStringLiteral("commonjs")]),poe(e,n,t)});r.push(t8("fixTargetOption",t,[Ca.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))}return r.length?r:void 0}});var mre="fixPropertyAssignment",gre=[Ca.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];function hre(e,t,n){e.replaceNode(t,n,aw.createPropertyAssignment(n.name,n.objectAssignmentInitializer))}function yre(e,t){return pt(YX(e,t).parent,KE)}o8({errorCodes:gre,fixIds:[mre],getCodeActions(e){const{sourceFile:t,span:n}=e,r=yre(t,n.start),i=tde.ChangeTracker.with(e,t=>hre(t,e.sourceFile,r));return[n8(mre,i,[Ca.Change_0_to_1,"=",":"],mre,[Ca.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:e=>u8(e,gre,(e,t)=>hre(e,t.file,yre(t.file,t.start)))});var vre="extendsInterfaceBecomesImplements",bre=[Ca.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function xre(e,t){const n=om(YX(e,t)).heritageClauses,r=n[0].getFirstToken();return 96===r.kind?{extendsToken:r,heritageClauses:n}:void 0}function Sre(e,t,n,r){if(e.replaceNode(t,n,aw.createToken(119)),2===r.length&&96===r[0].token&&119===r[1].token){const n=r[1].getFirstToken(),i=n.getFullStart();e.replaceRange(t,{pos:i,end:i},aw.createToken(28));const o=t.text;let a=n.end;for(;aSre(e,t,r,i));return[n8(vre,o,Ca.Change_extends_to_implements,vre,Ca.Change_all_extended_interfaces_to_implements)]},fixIds:[vre],getAllCodeActions:e=>u8(e,bre,(e,t)=>{const n=xre(t.file,t.start);n&&Sre(e,t.file,n.extendsToken,n.heritageClauses)})});var kre="forgottenThisPropertyAccess",Tre=Ca.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,Cre=[Ca.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,Ca.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,Tre];function wre(e,t,n){const r=YX(e,t);if(QN(r)||YN(r))return{node:r,className:n===Tre?om(r).name.text:void 0}}function Nre(e,t,{node:n,className:r}){uZ(n),e.replaceNode(t,n,aw.createPropertyAccessExpression(r?aw.createIdentifier(r):aw.createThis(),n))}o8({errorCodes:Cre,getCodeActions(e){const{sourceFile:t}=e,n=wre(t,e.span.start,e.errorCode);if(!n)return;const r=tde.ChangeTracker.with(e,e=>Nre(e,t,n));return[n8(kre,r,[Ca.Add_0_to_unresolved_variable,n.className||"this"],kre,Ca.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]},fixIds:[kre],getAllCodeActions:e=>u8(e,Cre,(t,n)=>{const r=wre(n.file,n.start,n.code);r&&Nre(t,e.sourceFile,r)})});var Dre="fixInvalidJsxCharacters_expression",Pre="fixInvalidJsxCharacters_htmlEntity",Ere=[Ca.Unexpected_token_Did_you_mean_or_gt.code,Ca.Unexpected_token_Did_you_mean_or_rbrace.code];o8({errorCodes:Ere,fixIds:[Dre,Pre],getCodeActions(e){const{sourceFile:t,preferences:n,span:r}=e,i=tde.ChangeTracker.with(e,e=>Are(e,n,t,r.start,!1)),o=tde.ChangeTracker.with(e,e=>Are(e,n,t,r.start,!0));return[n8(Dre,i,Ca.Wrap_invalid_character_in_an_expression_container,Dre,Ca.Wrap_all_invalid_characters_in_an_expression_container),n8(Pre,o,Ca.Convert_invalid_character_to_its_html_entity_code,Pre,Ca.Convert_all_invalid_characters_to_HTML_entity_code)]},getAllCodeActions:e=>u8(e,Ere,(t,n)=>Are(t,e.preferences,n.file,n.start,e.fixId===Pre))});var Fre={">":">","}":"}"};function Are(e,t,n,r,i){const o=n.getText()[r];if(!function(e){return Be(Fre,e)}(o))return;const a=i?Fre[o]:`{${wZ(n,t,o)}}`;e.replaceRangeWithText(n,{pos:r,end:r+1},a)}var Ire="deleteUnmatchedParameter",Ore="renameUnmatchedParameter",jre=[Ca.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code];function Lre(e,t){const n=YX(e,t);if(n.parent&&PF(n.parent)&&QN(n.parent.name)){const e=n.parent,t=Zg(e),r=Qg(e);if(t&&r)return{jsDocHost:t,signature:r,name:n.parent.name,jsDocParameterTag:e}}}o8({fixIds:[Ire,Ore],errorCodes:jre,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=[],i=Lre(t,n.start);if(i)return pe(r,function(e,{name:t,jsDocHost:n,jsDocParameterTag:r}){const i=tde.ChangeTracker.with(e,t=>t.filterJSDocTags(e.sourceFile,n,e=>e!==r));return n8(Ire,i,[Ca.Delete_unused_param_tag_0,t.getText(e.sourceFile)],Ire,Ca.Delete_all_unused_param_tags)}(e,i)),pe(r,function(e,{name:t,jsDocHost:n,signature:r,jsDocParameterTag:i}){if(!g(r.parameters))return;const o=e.sourceFile,a=ml(r),s=new Set;for(const e of a)PF(e)&&QN(e.name)&&s.add(e.name.escapedText);const c=v(r.parameters,e=>QN(e.name)&&!s.has(e.name.escapedText)?e.name.getText(o):void 0);if(void 0===c)return;const l=aw.updateJSDocParameterTag(i,i.tagName,aw.createIdentifier(c),i.isBracketed,i.typeExpression,i.isNameFirst,i.comment),_=tde.ChangeTracker.with(e,e=>e.replaceJSDocComment(o,n,M(a,e=>e===i?l:e)));return t8(Ore,_,[Ca.Rename_param_tag_name_0_to_1,t.getText(o),c])}(e,i)),r},getAllCodeActions:function(e){const t=new Map;return l8(tde.ChangeTracker.with(e,n=>{d8(e,jre,({file:e,start:n})=>{const r=Lre(e,n);r&&t.set(r.signature,pe(t.get(r.signature),r.jsDocParameterTag))}),t.forEach((t,r)=>{if(e.fixId===Ire){const e=new Set(t);n.filterJSDocTags(r.getSourceFile(),r,t=>!e.has(t))}})}))}});var Mre="fixUnreferenceableDecoratorMetadata";o8({errorCodes:[Ca.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code],getCodeActions:e=>{const t=function(e,t,n){const r=dt(YX(e,n),QN);if(!r||183!==r.parent.kind)return;const i=t.getTypeChecker().getSymbolAtLocation(r);return C((null==i?void 0:i.declarations)||p,fn(pE,SE,uE))}(e.sourceFile,e.program,e.span.start);if(!t)return;const n=tde.ChangeTracker.with(e,n=>276===t.kind&&function(e,t,n,r){y6.doChangeNamedToNamespaceOrDefault(t,r,e,n.parent)}(n,e.sourceFile,t,e.program)),r=tde.ChangeTracker.with(e,n=>function(e,t,n,r){if(271===n.kind)return void e.insertModifierBefore(t,156,n.name);const i=273===n.kind?n:n.parent.parent;if(i.name&&i.namedBindings)return;const o=r.getTypeChecker();if(Og(i,e=>{if(111551&kx(e.symbol,o).flags)return!0}))return;e.insertModifierBefore(t,156,i)}(n,e.sourceFile,t,e.program));let i;return n.length&&(i=pe(i,t8(Mre,n,Ca.Convert_named_imports_to_namespace_import))),r.length&&(i=pe(i,t8(Mre,r,Ca.Use_import_type))),i},fixIds:[Mre]});var Rre="unusedIdentifier",Bre="unusedIdentifier_prefix",Jre="unusedIdentifier_delete",zre="unusedIdentifier_deleteImports",qre="unusedIdentifier_infer",Ure=[Ca._0_is_declared_but_its_value_is_never_read.code,Ca._0_is_declared_but_never_used.code,Ca.Property_0_is_declared_but_its_value_is_never_read.code,Ca.All_imports_in_import_declaration_are_unused.code,Ca.All_destructured_elements_are_unused.code,Ca.All_variables_are_unused.code,Ca.All_type_parameters_are_unused.code];function Vre(e,t,n){e.replaceNode(t,n.parent,aw.createKeywordTypeNode(159))}function Wre(e,t){return n8(Rre,e,t,Jre,Ca.Delete_all_unused_declarations)}function $re(e,t,n){e.delete(t,Tn.checkDefined(pt(n.parent,Dp).typeParameters,"The type parameter to delete should exist"))}function Hre(e){return 102===e.kind||80===e.kind&&(276===e.parent.kind||273===e.parent.kind)}function Kre(e){return 102===e.kind?dt(e.parent,dE):void 0}function Gre(e,t){return tE(t.parent)&&Ne(t.parent.getChildren(e))===t}function Xre(e,t,n){e.delete(t,243===n.parent.kind?n.parent:n)}function Qre(e,t,n,r){t!==Ca.Property_0_is_declared_but_its_value_is_never_read.code&&(140===r.kind&&(r=pt(r.parent,qD).typeParameter.name),QN(r)&&function(e){switch(e.parent.kind){case 169:case 168:return!0;case 260:switch(e.parent.parent.parent.kind){case 250:case 249:return!0}}return!1}(r)&&(e.replaceNode(n,r,aw.createIdentifier(`_${r.text}`)),mD(r.parent)&&Jc(r.parent).forEach(t=>{QN(t.name)&&e.replaceNode(n,t.name,aw.createIdentifier(`_${t.name.text}`))})))}function Yre(e,t,n,r,i,o,a,s){!function(e,t,n,r,i,o,a,s){const{parent:c}=e;if(mD(c))!function(e,t,n,r,i,o,a,s=!1){if(function(e,t,n,r,i,o,a){const{parent:s}=n;switch(s.kind){case 174:case 176:const c=s.parameters.indexOf(n),l=bD(s)?s.name:s,_=Ice.Core.getReferencedSymbolsForNode(s.pos,l,i,r,o);if(_)for(const e of _)for(const t of e.references)if(t.kind===Ice.EntryKind.Node){const e=lD(t.node)&&oP(t.node.parent)&&t.node.parent.arguments.length>c,r=rP(t.node.parent)&&lD(t.node.parent.expression)&&oP(t.node.parent.parent)&&t.node.parent.parent.arguments.length>c,i=(bD(t.node.parent)||vD(t.node.parent))&&t.node.parent!==n.parent&&t.node.parent.parameters.length>c;if(e||r||i)return!1}return!0;case 262:return!s.name||!function(e,t,n){return!!Ice.Core.eachSymbolReferenceInFile(n,e,t,e=>QN(e)&&oP(e.parent)&&e.parent.arguments.includes(e))}(e,t,s.name)||eie(s,n,a);case 218:case 219:return eie(s,n,a);case 178:return!1;case 177:return!0;default:return Tn.failBadSyntaxKind(s)}}(r,t,n,i,o,a,s))if(n.modifiers&&n.modifiers.length>0&&(!QN(n.name)||Ice.Core.isSymbolReferencedInFile(n.name,r,t)))for(const r of n.modifiers)__(r)&&e.deleteModifier(t,r);else!n.initializer&&Zre(n,r,i)&&e.delete(t,n)}(t,n,c,r,i,o,a,s);else if(!(s&&QN(e)&&Ice.Core.isSymbolReferencedInFile(e,r,n))){const r=pE(c)?e:pD(c)?c.parent:c;Tn.assert(r!==n,"should not delete whole source file"),t.delete(n,r)}}(t,n,e,r,i,o,a,s),QN(t)&&Ice.Core.eachSymbolReferenceInFile(t,r,e,t=>{var r;rP(t.parent)&&t.parent.name===t&&(t=t.parent),!s&&((yP((r=t).parent)&&r.parent.left===r||(hP(r.parent)||gP(r.parent))&&r.parent.operand===r)&&RP(r.parent.parent))&&n.delete(e,t.parent.parent)})}function Zre(e,t,n){const r=e.parent.parameters.indexOf(e);return!Ice.Core.someSignatureUsage(e.parent,n,t,(e,t)=>!t||t.arguments.length>r)}function eie(e,t,n){const r=e.parameters,i=r.indexOf(t);return Tn.assert(-1!==i,"The parameter should already be in the list"),n?r.slice(i+1).every(e=>QN(e.name)&&!e.symbol.isReferenced):i===r.length-1}o8({errorCodes:Ure,getCodeActions(e){const{errorCode:t,sourceFile:n,program:r,cancellationToken:i}=e,o=r.getTypeChecker(),a=r.getSourceFiles(),s=YX(n,e.span.start);if(IF(s))return[Wre(tde.ChangeTracker.with(e,e=>e.delete(n,s)),Ca.Remove_template_tag)];if(30===s.kind){return[Wre(tde.ChangeTracker.with(e,e=>$re(e,n,s)),Ca.Remove_type_parameters)]}const c=Kre(s);if(c){const t=tde.ChangeTracker.with(e,e=>e.delete(n,c));return[n8(Rre,t,[Ca.Remove_import_from_0,Mx(c)],zre,Ca.Delete_all_unused_imports)]}if(Hre(s)){const t=tde.ChangeTracker.with(e,e=>Yre(n,s,e,o,a,r,i,!1));if(t.length)return[n8(Rre,t,[Ca.Remove_unused_declaration_for_Colon_0,s.getText(n)],zre,Ca.Delete_all_unused_imports)]}if(YD(s.parent)||ZD(s.parent)){if(mD(s.parent.parent)){const t=s.parent.elements,r=[t.length>1?Ca.Remove_unused_declarations_for_Colon_0:Ca.Remove_unused_declaration_for_Colon_0,M(t,e=>e.getText(n)).join(", ")];return[Wre(tde.ChangeTracker.with(e,e=>function(e,t,n){h(n.elements,n=>e.delete(t,n))}(e,n,s.parent)),r)]}return[Wre(tde.ChangeTracker.with(e,t=>function(e,t,n,{parent:r}){if(eE(r)&&r.initializer&&H_(r.initializer))if(tE(r.parent)&&g(r.parent.declarations)>1){const i=r.parent.parent,o=i.getStart(n),a=i.end;t.delete(n,r),t.insertNodeAt(n,a,r.initializer,{prefix:$Y(e.host,e.formatContext.options)+n.text.slice(oZ(n.text,o-1),o),suffix:BZ(n)?";":""})}else t.replaceNode(n,r.parent,r.initializer);else t.delete(n,r)}(e,t,n,s.parent)),Ca.Remove_unused_destructuring_declaration)]}if(Gre(n,s))return[Wre(tde.ChangeTracker.with(e,e=>Xre(e,n,s.parent)),Ca.Remove_variable_statement)];if(QN(s)&&nE(s.parent))return[Wre(tde.ChangeTracker.with(e,e=>function(e,t,n){const r=n.symbol.declarations;if(r)for(const n of r)e.delete(t,n)}(e,n,s.parent)),[Ca.Remove_unused_declaration_for_Colon_0,s.getText(n)])];const l=[];if(140===s.kind){const t=tde.ChangeTracker.with(e,e=>Vre(e,n,s)),r=pt(s.parent,qD).typeParameter.name.text;l.push(n8(Rre,t,[Ca.Replace_infer_0_with_unknown,r],qre,Ca.Replace_all_unused_infer_with_unknown))}else{const t=tde.ChangeTracker.with(e,e=>Yre(n,s,e,o,a,r,i,!1));if(t.length){const e=pD(s.parent)?s.parent:s;l.push(Wre(t,[Ca.Remove_unused_declaration_for_Colon_0,e.getText(n)]))}}const _=tde.ChangeTracker.with(e,e=>Qre(e,t,n,s));return _.length&&l.push(n8(Rre,_,[Ca.Prefix_0_with_an_underscore,s.getText(n)],Bre,Ca.Prefix_all_unused_declarations_with_where_possible)),l},fixIds:[Bre,Jre,zre,qre],getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=n.getTypeChecker(),o=n.getSourceFiles();return u8(e,Ure,(a,s)=>{const c=YX(t,s.start);switch(e.fixId){case Bre:Qre(a,s.code,t,c);break;case zre:{const e=Kre(c);e?a.delete(t,e):Hre(c)&&Yre(t,c,a,i,o,n,r,!0);break}case Jre:if(140===c.kind||Hre(c))break;if(IF(c))a.delete(t,c);else if(30===c.kind)$re(a,t,c);else if(YD(c.parent)){if(c.parent.parent.initializer)break;mD(c.parent.parent)&&!Zre(c.parent.parent,i,o)||a.delete(t,c.parent.parent)}else{if(ZD(c.parent.parent)&&c.parent.parent.parent.initializer)break;Gre(t,c)?Xre(a,t,c.parent):Yre(t,c,a,i,o,n,r,!0)}break;case qre:140===c.kind&&Vre(a,t,c);break;default:Tn.fail(JSON.stringify(e.fixId))}})}});var tie="fixUnreachableCode",nie=[Ca.Unreachable_code_detected.code];function rie(e,t,n,r,i){const o=YX(t,n),a=xc(o,wu);if(a.getStart(t)!==o.getStart(t)){const e=JSON.stringify({statementKind:Tn.formatSyntaxKind(a.kind),tokenKind:Tn.formatSyntaxKind(o.kind),errorCode:i,start:n,length:r});Tn.fail("Token and statement should start at the same point. "+e)}const s=(jP(a.parent)?a.parent:a).parent;if(!jP(a.parent)||a===Ne(a.parent.statements))switch(s.kind){case 245:if(s.elseStatement){if(jP(a.parent))break;return void e.replaceNode(t,a,aw.createBlock(p))}case 247:case 248:return void e.delete(t,s)}if(jP(a.parent)){const i=n+r,o=Tn.checkDefined(function(e,t){let n;for(const r of e){if(!t(r))break;n=r}return n}(xT(a.parent.statements,a),e=>e.posrie(t,e.sourceFile,e.span.start,e.span.length,e.errorCode));return[n8(tie,t,Ca.Remove_unreachable_code,tie,Ca.Remove_all_unreachable_code)]},fixIds:[tie],getAllCodeActions:e=>u8(e,nie,(e,t)=>rie(e,t.file,t.start,t.length,t.code))});var iie="fixUnusedLabel",oie=[Ca.Unused_label.code];function aie(e,t,n){const r=YX(t,n),i=pt(r.parent,XP),o=r.getStart(t),a=i.statement.getStart(t),s=dx(o,a,t)?a:ds(t.text,RX(i,59,t).end,!0);e.deleteRange(t,{pos:o,end:s})}o8({errorCodes:oie,getCodeActions(e){const t=tde.ChangeTracker.with(e,t=>aie(t,e.sourceFile,e.span.start));return[n8(iie,t,Ca.Remove_unused_label,iie,Ca.Remove_all_unused_labels)]},fixIds:[iie],getAllCodeActions:e=>u8(e,oie,(e,t)=>aie(e,t.file,t.start))});var sie="fixJSDocTypes_plain",cie="fixJSDocTypes_nullable",lie=[Ca.JSDoc_types_can_only_be_used_inside_documentation_comments.code,Ca._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,Ca._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code];function _ie(e,t,n,r,i){e.replaceNode(t,n,i.typeToTypeNode(r,n,void 0))}function uie(e,t,n){const r=xc(YX(e,t),die),i=r&&r.type;return i&&{typeNode:i,type:pie(n,i)}}function die(e){switch(e.kind){case 234:case 179:case 180:case 262:case 177:case 181:case 200:case 174:case 173:case 169:case 172:case 171:case 178:case 265:case 216:case 260:return!0;default:return!1}}function pie(e,t){if(sF(t)){const n=e.getTypeFromTypeNode(t.type);return n===e.getNeverType()||n===e.getVoidType()?n:e.getUnionType(pe([n,e.getUndefinedType()],t.postfix?void 0:e.getNullType()))}return e.getTypeFromTypeNode(t)}o8({errorCodes:lie,getCodeActions(e){const{sourceFile:t}=e,n=e.program.getTypeChecker(),r=uie(t,e.span.start,n);if(!r)return;const{typeNode:i,type:o}=r,a=i.getText(t),s=[c(o,sie,Ca.Change_all_jsdoc_style_types_to_TypeScript)];return 314===i.kind&&s.push(c(o,cie,Ca.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),s;function c(r,o,s){return n8("jdocTypes",tde.ChangeTracker.with(e,e=>_ie(e,t,i,r,n)),[Ca.Change_0_to_1,a,n.typeToString(r)],o,s)}},fixIds:[sie,cie],getAllCodeActions(e){const{fixId:t,program:n,sourceFile:r}=e,i=n.getTypeChecker();return u8(e,lie,(e,n)=>{const o=uie(n.file,n.start,i);if(!o)return;const{typeNode:a,type:s}=o,c=314===a.kind&&t===cie?i.getNullableType(s,32768):s;_ie(e,r,a,c,i)})}});var fie="fixMissingCallParentheses",mie=[Ca.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code];function gie(e,t,n){e.replaceNodeWithText(t,n,`${n.text}()`)}function hie(e,t){const n=YX(e,t);if(rP(n.parent)){let e=n.parent;for(;rP(e.parent);)e=e.parent;return e.name}if(QN(n))return n}o8({errorCodes:mie,fixIds:[fie],getCodeActions(e){const{sourceFile:t,span:n}=e,r=hie(t,n.start);if(!r)return;const i=tde.ChangeTracker.with(e,t=>gie(t,e.sourceFile,r));return[n8(fie,i,Ca.Add_missing_call_parentheses,fie,Ca.Add_all_missing_call_parentheses)]},getAllCodeActions:e=>u8(e,mie,(e,t)=>{const n=hie(t.file,t.start);n&&gie(e,t.file,n)})});var yie="fixMissingTypeAnnotationOnExports",vie="add-annotation",bie="add-type-assertion",xie=[Ca.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,Ca.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,Ca.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,Ca.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,Ca.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,Ca.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,Ca.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,Ca.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,Ca.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,Ca.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,Ca.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,Ca.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,Ca.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,Ca.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,Ca.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,Ca.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,Ca.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,Ca.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,Ca.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code,Ca.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,Ca.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code],Sie=new Set([177,174,172,262,218,219,260,169,277,263,206,207]);function kie(e,t,n,r,i){const o=Tie(n,r,i);o.result&&o.textChanges.length&&t.push(n8(e,o.textChanges,o.result,yie,Ca.Add_all_missing_type_annotations))}function Tie(e,t,n){const r={typeNode:void 0,mutatedTarget:!1},i=tde.ChangeTracker.fromContext(e),o=e.sourceFile,a=e.program,s=a.getTypeChecker(),c=OS(a.getCompilerOptions()),l=Iee(e.sourceFile,e.program,e.preferences,e.host),_=new Set,u=new Set,d=xU({preserveSourceNewlines:!1}),p=n({addTypeAnnotation:function(t){e.cancellationToken.throwIfCancellationRequested();const n=YX(o,t.start),r=g(n);if(r)return nE(r)?function(e){var t;if(null==u?void 0:u.has(e))return;null==u||u.add(e);const n=s.getTypeAtLocation(e),r=s.getPropertiesOfType(n);if(!e.name||0===r.length)return;const c=[];for(const t of r)Es(t.name,OS(a.getCompilerOptions()))&&(t.valueDeclaration&&eE(t.valueDeclaration)||c.push(aw.createVariableStatement([aw.createModifier(95)],aw.createVariableDeclarationList([aw.createVariableDeclaration(t.name,void 0,w(s.getTypeOfSymbol(t),e),void 0)]))));if(0===c.length)return;const l=[];(null==(t=e.modifiers)?void 0:t.some(e=>95===e.kind))&&l.push(aw.createModifier(95));l.push(aw.createModifier(138));const _=aw.createModuleDeclaration(l,e.name,aw.createModuleBlock(c),101441696);return i.insertNodeAfter(o,e,_),[Ca.Annotate_types_of_properties_expando_function_in_a_namespace]}(r):h(r);const c=(l=n,xc(l,e=>Sie.has(e.kind)&&(!YD(e)&&!ZD(e)||eE(e.parent))));var l;if(c)return h(c);return},addInlineAssertion:function(t){e.cancellationToken.throwIfCancellationRequested();const n=YX(o,t.start);if(g(n))return;const r=D(n,t);if(!r||lh(r)||lh(r.parent))return;const a=nu(r),c=KE(r);if(!c&&ku(r))return;if(xc(r,O_))return;if(xc(r,XE))return;if(a&&(xc(r,WE)||xc(r,A_)))return;if(SP(r))return;const l=xc(r,eE),_=l&&s.getTypeAtLocation(l);if(_&&8192&_.flags)return;if(!a&&!c)return;const{typeNode:u,mutatedTarget:d}=x(r,_);if(!u||d)return;c?i.insertNodeAt(o,r.end,m(aZ(r.name),u),{prefix:": "}):a?i.replaceNode(o,r,function(e,t){f(e)&&(e=aw.createParenthesizedExpression(e));return aw.createAsExpression(aw.createSatisfiesExpression(e,aZ(t)),t)}(aZ(r),u)):Tn.assertNever(r);return[Ca.Add_satisfies_and_an_inline_type_assertion_with_0,N(u)]},extractAsVariable:function(t){e.cancellationToken.throwIfCancellationRequested();const n=D(YX(o,t.start),t);if(!n||lh(n)||lh(n.parent))return;if(!nu(n))return;if(tP(n))return i.replaceNode(o,n,m(n,aw.createTypeReferenceNode("const"))),[Ca.Mark_array_literal_as_const];const r=xc(n,HE);if(r){if(r===n.parent&&Cb(n))return;const e=aw.createUniqueName(L4(n,o,s,o),16);let t=n,a=n;if(SP(t)&&(t=dh(t.parent),a=T(t.parent)?t=t.parent:m(t,aw.createTypeReferenceNode("const"))),Cb(t))return;const c=aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(e,void 0,void 0,a)],2)),l=xc(n,wu);return i.insertNodeBefore(o,l,c),i.replaceNode(o,t,aw.createAsExpression(aw.cloneNode(e),aw.createTypeQueryNode(aw.cloneNode(e)))),[Ca.Extract_to_variable_and_replace_with_0_as_typeof_0,N(e)]}}});return l.writeFixes(i),{result:p,textChanges:i.getChanges()};function f(e){return!(Cb(e)||oP(e)||nP(e)||tP(e))}function m(e,t){return f(e)&&(e=aw.createParenthesizedExpression(e)),aw.createAsExpression(e,t)}function g(e){const t=xc(e,e=>wu(e)?"quit":CC(e));if(t&&CC(t)){let e=t;if(yP(e)&&(e=e.left,!CC(e)))return;const n=s.getTypeAtLocation(e.expression);if(!n)return;if(ee(s.getPropertiesOfType(n),e=>e.valueDeclaration===t||e.valueDeclaration===t.parent)){const e=n.symbol.valueDeclaration;if(e){if(ZT(e)&&eE(e.parent))return e.parent;if(nE(e))return e}}}}function h(e){if(!(null==_?void 0:_.has(e)))switch(null==_||_.add(e),e.kind){case 169:case 172:case 260:return function(e){const{typeNode:t}=x(e);if(t)return e.type?i.replaceNode(Dd(e),e.type,t):i.tryInsertTypeAnnotation(Dd(e),e,t),[Ca.Add_annotation_of_type_0,N(t)]}(e);case 219:case 218:case 262:case 174:case 177:return function(e,t){if(e.type)return;const{typeNode:n}=x(e);if(n)return i.tryInsertTypeAnnotation(t,e,n),[Ca.Add_return_type_0,N(n)]}(e,o);case 277:return function(e){if(e.isExportEquals)return;const{typeNode:t}=x(e.expression);if(!t)return;const n=aw.createUniqueName("_default");return i.replaceNodeWithNodes(o,e,[aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(n,void 0,t,e.expression)],2)),aw.updateExportAssignment(e,null==e?void 0:e.modifiers,n)]),[Ca.Extract_default_export_to_variable]}(e);case 263:return function(e){var t,n;const r=null==(t=e.heritageClauses)?void 0:t.find(e=>96===e.token),a=null==r?void 0:r.types[0];if(!a)return;const{typeNode:s}=x(a.expression);if(!s)return;const c=aw.createUniqueName(e.name?e.name.text+"Base":"Anonymous",16),l=aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(c,void 0,s,a.expression)],2));i.insertNodeBefore(o,e,l);const _=ws(o.text,a.end),u=(null==(n=null==_?void 0:_[_.length-1])?void 0:n.end)??a.end;return i.replaceRange(o,{pos:a.getFullStart(),end:u},c,{prefix:" "}),[Ca.Extract_base_class_to_variable]}(e);case 206:case 207:return function(e){var t;const n=e.parent,r=e.parent.parent.parent;if(!n.initializer)return;let a;const s=[];if(QN(n.initializer))a={expression:{kind:3,identifier:n.initializer}};else{const e=aw.createUniqueName("dest",16);a={expression:{kind:3,identifier:e}},s.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(e,void 0,void 0,n.initializer)],2)))}const c=[];ZD(e)?y(e,c,a):v(e,c,a);const l=new Map;for(const e of c){if(e.element.propertyName&&pD(e.element.propertyName)){const t=e.element.propertyName.expression,n=aw.getGeneratedNameForNode(t),r=aw.createVariableDeclaration(n,void 0,void 0,t),i=aw.createVariableDeclarationList([r],2),o=aw.createVariableStatement(void 0,i);s.push(o),l.set(t,n)}const n=e.element.name;if(ZD(n))y(n,c,e);else if(YD(n))v(n,c,e);else{const{typeNode:i}=x(n);let o=b(e,l);if(e.element.initializer){const n=null==(t=e.element)?void 0:t.propertyName,r=aw.createUniqueName(n&&QN(n)?n.text:"temp",16);s.push(aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(r,void 0,void 0,o)],2))),o=aw.createConditionalExpression(aw.createBinaryExpression(r,aw.createToken(37),aw.createIdentifier("undefined")),aw.createToken(58),e.element.initializer,aw.createToken(59),o)}const a=Wv(r,32)?[aw.createToken(95)]:void 0;s.push(aw.createVariableStatement(a,aw.createVariableDeclarationList([aw.createVariableDeclaration(n,void 0,i,o)],2)))}}r.declarationList.declarations.length>1&&s.push(aw.updateVariableStatement(r,r.modifiers,aw.updateVariableDeclarationList(r.declarationList,r.declarationList.declarations.filter(t=>t!==e.parent))));return i.replaceNodeWithNodes(o,r,s),[Ca.Extract_binding_expressions_to_variable]}(e);default:throw new Error(`Cannot find a fix for the given node ${e.kind}`)}}function y(e,t,n){for(let r=0;r=0;--e){const i=n[e].expression;0===i.kind?r=aw.createPropertyAccessChain(r,void 0,aw.createIdentifier(i.text)):1===i.kind?r=aw.createElementAccessExpression(r,t.get(i.computed)):2===i.kind&&(r=aw.createElementAccessExpression(r,i.arrayIndex))}return r}function x(e,n){if(1===t)return C(e);let i=lh(e)?function(e){const t=s.getSignatureFromDeclaration(e);if(t)return s.getReturnTypeOfSignature(t)}(e):s.getTypeAtLocation(e);if(!i)return r;if(2===t){n&&(i=n);const e=s.getWidenedLiteralType(i);if(s.isTypeAssignableTo(e,i))return r;i=e}mD(e)&&s.requiresAddingImplicitUndefined(e)&&(i=s.getUnionType([s.getUndefinedType(),i],0));const a=(eE(e)||yD(e)&&Wv(e,264))&&8192&i.flags?1048576:0;return{typeNode:w(i,xc(e,ku)??o,a),mutatedTarget:!1}}function S(e){return aw.createTypeQueryNode(aZ(e))}function k(e,t,n,a,s,c,l,_){const u=[],d=[];let p;const f=xc(e,wu);for(const t of a(e))s(t)?(g(),Cb(t.expression)?(u.push(S(t.expression)),d.push(t)):m(t.expression)):(p??(p=[])).push(t);return 0===d.length?r:(g(),i.replaceNode(o,e,l(d)),{typeNode:_(u),mutatedTarget:!0});function m(e){const r=aw.createUniqueName(t+"_Part"+(d.length+1),16),a=n?aw.createAsExpression(e,aw.createTypeReferenceNode("const")):e,s=aw.createVariableStatement(void 0,aw.createVariableDeclarationList([aw.createVariableDeclaration(r,void 0,void 0,a)],2));i.insertNodeBefore(o,f,s),u.push(S(r)),d.push(c(r))}function g(){p&&(m(l(p)),p=void 0)}}function T(e){return ru(e)&&Il(e.type)}function C(e){if(mD(e))return r;if(KE(e))return{typeNode:S(e.name),mutatedTarget:!1};if(Cb(e))return{typeNode:S(e),mutatedTarget:!1};if(T(e))return C(e.expression);if(tP(e)){const t=xc(e,eE);return function(e,t="temp"){const n=!!xc(e,T);return n?k(e,t,n,e=>e.elements,SP,aw.createSpreadElement,e=>aw.createArrayLiteralExpression(e,!0),e=>aw.createTupleTypeNode(e.map(aw.createRestTypeNode))):r}(e,t&&QN(t.name)?t.name.text:void 0)}if(nP(e)){const t=xc(e,eE);return function(e,t="temp"){return k(e,t,!!xc(e,T),e=>e.properties,GE,aw.createSpreadAssignment,e=>aw.createObjectLiteralExpression(e,!0),aw.createIntersectionTypeNode)}(e,t&&QN(t.name)?t.name.text:void 0)}if(eE(e)&&e.initializer)return C(e.initializer);if(vP(e)){const{typeNode:t,mutatedTarget:n}=C(e.whenTrue);if(!t)return r;const{typeNode:i,mutatedTarget:o}=C(e.whenFalse);return i?{typeNode:aw.createUnionTypeNode([t,i]),mutatedTarget:n||o}:r}return r}function w(e,t,n=0){let r=!1;const i=ooe(s,l,e,t,c,1074273293|n,{moduleResolverHost:a,trackSymbol:()=>!0,reportTruncationError(){r=!0}});return r?aw.createKeywordTypeNode(133):i}function N(e){dw(e,1);const t=d.printNode(4,e,o);return t.length>nd?t.substring(0,nd-3)+"...":(dw(e,0),t)}function D(e,t){for(;e&&e.endt.addTypeAnnotation(e.span)),kie(vie,t,e,1,t=>t.addTypeAnnotation(e.span)),kie(vie,t,e,2,t=>t.addTypeAnnotation(e.span)),kie(bie,t,e,0,t=>t.addInlineAssertion(e.span)),kie(bie,t,e,1,t=>t.addInlineAssertion(e.span)),kie(bie,t,e,2,t=>t.addInlineAssertion(e.span)),kie("extract-expression",t,e,0,t=>t.extractAsVariable(e.span)),t},getAllCodeActions:e=>l8(Tie(e,0,t=>{d8(e,xie,e=>{t.addTypeAnnotation(e)})}).textChanges)});var Cie="fixAwaitInSyncFunction",wie=[Ca.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,Ca.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,Ca.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,Ca.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code];function Nie(e,t){const n=rm(YX(e,t));if(!n)return;let r;switch(n.kind){case 174:r=n.name;break;case 262:case 218:r=RX(n,100,e);break;case 219:r=RX(n,n.typeParameters?30:21,e)||Ne(n.parameters);break;default:return}return r&&{insertBefore:r,returnType:(i=n,i.type?i.type:eE(i.parent)&&i.parent.type&&ED(i.parent.type)?i.parent.type.type:void 0)};var i}function Die(e,t,{insertBefore:n,returnType:r}){if(r){const n=bm(r);n&&80===n.kind&&"Promise"===n.text||e.replaceNode(t,r,aw.createTypeReferenceNode("Promise",aw.createNodeArray([r])))}e.insertModifierBefore(t,134,n)}o8({errorCodes:wie,getCodeActions(e){const{sourceFile:t,span:n}=e,r=Nie(t,n.start);if(!r)return;const i=tde.ChangeTracker.with(e,e=>Die(e,t,r));return[n8(Cie,i,Ca.Add_async_modifier_to_containing_function,Cie,Ca.Add_all_missing_async_modifiers)]},fixIds:[Cie],getAllCodeActions:function(e){const t=new Map;return u8(e,wie,(n,r)=>{const i=Nie(r.file,r.start);i&&Bx(t,KB(i.insertBefore))&&Die(n,e.sourceFile,i)})}});var Pie=[Ca._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,Ca._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code],Eie="fixPropertyOverrideAccessor";function Fie(e,t,n,r,i){let o,a;if(r===Ca._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code)o=t,a=t+n;else if(r===Ca._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code){const n=i.program.getTypeChecker(),r=YX(e,t).parent;Tn.assert(k_(r),"error span of fixPropertyOverrideAccessor should only be on an accessor");const s=r.parent;Tn.assert(S_(s),"erroneous accessors should only be inside classes");const c=Fe(Doe(s,n));if(!c)return[];const l=Cc(qp(r.name)),_=n.getPropertyOfType(n.getTypeAtLocation(c),l);if(!_||!_.valueDeclaration)return[];o=_.valueDeclaration.pos,a=_.valueDeclaration.end,e=Dd(_.valueDeclaration)}else Tn.fail("fixPropertyOverrideAccessor codefix got unexpected error code "+r);return xoe(e,i.program,o,a,i,Ca.Generate_get_and_set_accessors.message)}o8({errorCodes:Pie,getCodeActions(e){const t=Fie(e.sourceFile,e.span.start,e.span.length,e.errorCode,e);if(t)return[n8(Eie,t,Ca.Generate_get_and_set_accessors,Eie,Ca.Generate_get_and_set_accessors_for_all_overriding_properties)]},fixIds:[Eie],getAllCodeActions:e=>u8(e,Pie,(t,n)=>{const r=Fie(n.file,n.start,n.length,n.code,e);if(r)for(const n of r)t.pushRaw(e.sourceFile,n)})});var Aie="inferFromUsage",Iie=[Ca.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,Ca.Variable_0_implicitly_has_an_1_type.code,Ca.Parameter_0_implicitly_has_an_1_type.code,Ca.Rest_parameter_0_implicitly_has_an_any_type.code,Ca.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,Ca._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,Ca.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,Ca.Member_0_implicitly_has_an_1_type.code,Ca.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,Ca.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,Ca.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,Ca.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,Ca.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,Ca._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,Ca.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,Ca.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,Ca.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function Oie(e,t){switch(e){case Ca.Parameter_0_implicitly_has_an_1_type.code:case Ca.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return TD(rm(t))?Ca.Infer_type_of_0_from_usage:Ca.Infer_parameter_types_from_usage;case Ca.Rest_parameter_0_implicitly_has_an_any_type.code:case Ca.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return Ca.Infer_parameter_types_from_usage;case Ca.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return Ca.Infer_this_type_of_0_from_usage;default:return Ca.Infer_type_of_0_from_usage}}function jie(e,t,n,r,i,o,a,s,c){if(!c_(n.kind)&&80!==n.kind&&26!==n.kind&&110!==n.kind)return;const{parent:l}=n,_=Iee(t,i,c,s);switch(r=function(e){switch(e){case Ca.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return Ca.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case Ca.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return Ca.Variable_0_implicitly_has_an_1_type.code;case Ca.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return Ca.Parameter_0_implicitly_has_an_1_type.code;case Ca.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return Ca.Rest_parameter_0_implicitly_has_an_any_type.code;case Ca.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return Ca.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case Ca._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return Ca._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case Ca.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return Ca.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case Ca.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return Ca.Member_0_implicitly_has_an_1_type.code}return e}(r)){case Ca.Member_0_implicitly_has_an_1_type.code:case Ca.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(eE(l)&&a(l)||yD(l)||hD(l))return Lie(e,_,t,l,i,s,o),_.writeFixes(e),l;if(rP(l)){const n=AZ(zie(l.name,i,o),l,i,s);if(n){const r=aw.createJSDocTypeTag(void 0,aw.createJSDocTypeExpression(n),void 0);e.addJSDocTags(t,pt(l.parent.parent,RP),[r])}return _.writeFixes(e),l}return;case Ca.Variable_0_implicitly_has_an_1_type.code:{const t=i.getTypeChecker().getSymbolAtLocation(n);return t&&t.valueDeclaration&&eE(t.valueDeclaration)&&a(t.valueDeclaration)?(Lie(e,_,Dd(t.valueDeclaration),t.valueDeclaration,i,s,o),_.writeFixes(e),t.valueDeclaration):void 0}}const u=rm(n);if(void 0===u)return;let d;switch(r){case Ca.Parameter_0_implicitly_has_an_1_type.code:if(TD(u)){Mie(e,_,t,u,i,s,o),d=u;break}case Ca.Rest_parameter_0_implicitly_has_an_any_type.code:if(a(u)){const n=pt(l,mD);!function(e,t,n,r,i,o,a,s){if(!QN(r.name))return;const c=function(e,t,n,r){const i=qie(e,t,n,r);return i&&Uie(n,i,r).parameters(e)||e.parameters.map(e=>({declaration:e,type:QN(e.name)?zie(e.name,n,r):n.getTypeChecker().getAnyType()}))}(i,n,o,s);if(Tn.assert(i.parameters.length===c.length,"Parameter count and inference count should match"),zm(i))Bie(e,n,c,o,a);else{const r=uP(i)&&!RX(i,21,n);r&&e.insertNodeBefore(n,Ne(i.parameters),aw.createToken(21));for(const{declaration:r,type:i}of c)!r||r.type||r.initializer||Rie(e,t,n,r,i,o,a);r&&e.insertNodeAfter(n,Ee(i.parameters),aw.createToken(22))}}(e,_,t,n,u,i,s,o),d=n}break;case Ca.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case Ca._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:kD(u)&&QN(u.name)&&(Rie(e,_,t,u,zie(u.name,i,o),i,s),d=u);break;case Ca.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:TD(u)&&(Mie(e,_,t,u,i,s,o),d=u);break;case Ca.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:tde.isThisTypeAnnotatable(u)&&a(u)&&(!function(e,t,n,r,i,o){const a=qie(n,t,r,o);if(!a||!a.length)return;const s=Uie(r,a,o).thisParameter(),c=AZ(s,n,r,i);if(!c)return;zm(n)?function(e,t,n,r){e.addJSDocTags(t,n,[aw.createJSDocThisTag(void 0,aw.createJSDocTypeExpression(r))])}(e,t,n,c):e.tryInsertThisTypeAnnotation(t,n,c)}(e,t,u,i,s,o),d=u);break;default:return Tn.fail(String(r))}return _.writeFixes(e),d}function Lie(e,t,n,r,i,o,a){QN(r.name)&&Rie(e,t,n,r,zie(r.name,i,a),i,o)}function Mie(e,t,n,r,i,o,a){const s=Ce(r.parameters);if(s&&QN(r.name)&&QN(s.name)){let c=zie(r.name,i,a);c===i.getTypeChecker().getAnyType()&&(c=zie(s.name,i,a)),zm(r)?Bie(e,n,[{declaration:s,type:c}],i,o):Rie(e,t,n,s,c,i,o)}}function Rie(e,t,n,r,i,o,a){const s=AZ(i,r,o,a);if(s)if(zm(n)&&171!==r.kind){const t=eE(r)?dt(r.parent.parent,LP):r;if(!t)return;const i=aw.createJSDocTypeExpression(s),o=kD(r)?aw.createJSDocReturnTag(void 0,i,void 0):aw.createJSDocTypeTag(void 0,i,void 0);e.addJSDocTags(n,t,[o])}else(function(e,t,n,r,i,o){const a=hoe(e,o);if(a&&r.tryInsertTypeAnnotation(n,t,a.typeNode))return h(a.symbols,e=>i.addImportFromExportedSymbol(e,!0)),!0;return!1})(s,r,n,e,t,OS(o.getCompilerOptions()))||e.tryInsertTypeAnnotation(n,r,s)}function Bie(e,t,n,r,i){const o=n.length&&n[0].declaration.parent;if(!o)return;const a=$(n,e=>{const t=e.declaration;if(t.initializer||dl(t)||!QN(t.name))return;const n=e.type&&AZ(e.type,t,r,i);if(n){return dw(aw.cloneNode(t.name),7168),{name:aw.cloneNode(t.name),param:t,isOptional:!!e.isOptional,typeNode:n}}});if(a.length)if(uP(o)||_P(o)){const n=uP(o)&&!RX(o,21,t);n&&e.insertNodeBefore(t,Ne(o.parameters),aw.createToken(21)),h(a,({typeNode:n,param:r})=>{const i=aw.createJSDocTypeTag(void 0,aw.createJSDocTypeExpression(n)),o=aw.createJSDocComment(void 0,[i]);e.insertNodeAt(t,r.getStart(t),o,{suffix:" "})}),n&&e.insertNodeAfter(t,Ee(o.parameters),aw.createToken(22))}else{const n=M(a,({name:e,typeNode:t,isOptional:n})=>aw.createJSDocParameterTag(void 0,e,!!n,aw.createJSDocTypeExpression(t),!1,void 0));e.addJSDocTags(t,o,n)}}function Jie(e,t,n){return $(Ice.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n),e=>e.kind!==Ice.EntryKind.Span?dt(e.node,QN):void 0)}function zie(e,t,n){return Uie(t,Jie(e,t,n),n).single()}function qie(e,t,n,r){let i;switch(e.kind){case 176:i=RX(e,137,t);break;case 219:case 218:const n=e.parent;i=(eE(n)||yD(n))&&QN(n.name)?n.name:e.name;break;case 262:case 174:case 173:i=e.name}if(i)return Jie(i,n,r)}function Uie(e,t,n){const r=e.getTypeChecker(),i={string:()=>r.getStringType(),number:()=>r.getNumberType(),Array:e=>r.createArrayType(e),Promise:e=>r.createPromiseType(e)},o=[r.getStringType(),r.getNumberType(),r.createArrayType(r.getAnyType()),r.createPromiseType(r.getAnyType())];return{single:function(){return u(s(t))},parameters:function(i){if(0===t.length||!i.parameters)return;const o={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const e of t)n.throwIfCancellationRequested(),c(e,o);const a=[...o.constructs||[],...o.calls||[]];return i.parameters.map((t,o)=>{const c=[],l=Qu(t);let _=!1;for(const e of a)if(e.argumentTypes.length<=o)_=zm(i),c.push(r.getUndefinedType());else if(l)for(let t=o;t{t.has(n)||t.set(n,[]),t.get(n).push(e)});const n=new Map;return t.forEach((e,t)=>{n.set(t,a(e))}),{isNumber:e.some(e=>e.isNumber),isString:e.some(e=>e.isString),isNumberOrString:e.some(e=>e.isNumberOrString),candidateTypes:z(e,e=>e.candidateTypes),properties:n,calls:z(e,e=>e.calls),constructs:z(e,e=>e.constructs),numberIndex:h(e,e=>e.numberIndex),stringIndex:h(e,e=>e.stringIndex),candidateThisTypes:z(e,e=>e.candidateThisTypes),inferredTypes:void 0}}function s(e){const t={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const r of e)n.throwIfCancellationRequested(),c(r,t);return d(t)}function c(e,t){for(;Fb(e);)e=e.parent;switch(e.parent.kind){case 244:!function(e,t){v(t,oP(e)?r.getVoidType():r.getAnyType())}(e,t);break;case 225:t.isNumber=!0;break;case 224:!function(e,t){switch(e.operator){case 46:case 47:case 41:case 55:t.isNumber=!0;break;case 40:t.isNumberOrString=!0}}(e.parent,t);break;case 226:!function(e,t,n){switch(t.operatorToken.kind){case 43:case 42:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 66:case 68:case 67:case 69:case 70:case 74:case 75:case 79:case 71:case 73:case 72:case 41:case 30:case 33:case 32:case 34:const i=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&i.flags?v(n,i):n.isNumber=!0;break;case 65:case 40:const o=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&o.flags?v(n,o):296&o.flags?n.isNumber=!0:402653316&o.flags?n.isString=!0:1&o.flags||(n.isNumberOrString=!0);break;case 64:case 35:case 37:case 38:case 36:case 77:case 78:case 76:v(n,r.getTypeAtLocation(t.left===e?t.right:t.left));break;case 103:e===t.left&&(n.isString=!0);break;case 57:case 61:e!==t.left||260!==e.parent.parent.kind&&!xb(e.parent.parent,!0)||v(n,r.getTypeAtLocation(t.right))}}(e,e.parent,t);break;case 296:case 297:!function(e,t){v(t,r.getTypeAtLocation(e.parent.parent.expression))}(e.parent,t);break;case 213:case 214:e.parent.expression===e?function(e,t){const n={argumentTypes:[],return_:{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}};if(e.arguments)for(const t of e.arguments)n.argumentTypes.push(r.getTypeAtLocation(t));c(e,n.return_),213===e.kind?(t.calls||(t.calls=[])).push(n):(t.constructs||(t.constructs=[])).push(n)}(e.parent,t):l(e,t);break;case 211:!function(e,t){const n=Tc(e.name.text);t.properties||(t.properties=new Map);const r=t.properties.get(n)||{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,r),t.properties.set(n,r)}(e.parent,t);break;case 212:!function(e,t,n){if(t===e.argumentExpression)return void(n.isNumberOrString=!0);{const t=r.getTypeAtLocation(e.argumentExpression),i={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,i),296&t.flags?n.numberIndex=i:n.stringIndex=i}}(e.parent,e,t);break;case 303:case 304:!function(e,t){const n=eE(e.parent.parent)?e.parent.parent:e.parent;b(t,r.getTypeAtLocation(n))}(e.parent,t);break;case 172:!function(e,t){b(t,r.getTypeAtLocation(e.parent))}(e.parent,t);break;case 260:{const{name:n,initializer:i}=e.parent;if(e===n){i&&v(t,r.getTypeAtLocation(i));break}}default:return l(e,t)}}function l(e,t){Em(e)&&v(t,r.getContextualType(e))}function _(e){return u(d(e))}function u(e){if(!e.length)return r.getAnyType();const t=r.getUnionType([r.getStringType(),r.getNumberType()]);let n=function(e,t){const n=[];for(const r of e)for(const{high:e,low:i}of t)e(r)&&(Tn.assert(!i(r),"Priority can't have both low and high"),n.push(i));return e.filter(e=>n.every(t=>!t(e)))}(e,[{high:e=>e===r.getStringType()||e===r.getNumberType(),low:e=>e===t},{high:e=>!(16385&e.flags),low:e=>!!(16385&e.flags)},{high:e=>!(114689&e.flags||16&Ox(e)),low:e=>!!(16&Ox(e))}]);const i=n.filter(e=>16&Ox(e));return i.length&&(n=n.filter(e=>!(16&Ox(e))),n.push(function(e){if(1===e.length)return e[0];const t=[],n=[],i=[],o=[];let a=!1,s=!1;const c=rt();for(const l of e){for(const e of r.getPropertiesOfType(l))c.add(e.escapedName,e.valueDeclaration?r.getTypeOfSymbolAtLocation(e,e.valueDeclaration):r.getAnyType());t.push(...r.getSignaturesOfType(l,0)),n.push(...r.getSignaturesOfType(l,1));const e=r.getIndexInfoOfType(l,0);e&&(i.push(e.type),a=a||e.isReadonly);const _=r.getIndexInfoOfType(l,1);_&&(o.push(_.type),s=s||_.isReadonly)}const l=Z(c,(t,n)=>{const i=n.lengthr.getBaseTypeOfLiteralType(e)),l=(null==(a=e.calls)?void 0:a.length)?f(e):void 0;return l&&c?s.push(r.getUnionType([l,...c],2)):(l&&s.push(l),g(c)&&s.push(...c)),s.push(...function(e){if(!e.properties||!e.properties.size)return[];const t=o.filter(t=>function(e,t){return!!t.properties&&!md(t.properties,(t,n)=>{const i=r.getTypeOfPropertyOfType(e,n);if(!i)return!0;if(t.calls){return!r.getSignaturesOfType(i,0).length||!r.isTypeAssignableTo(i,(o=t.calls,r.createAnonymousType(void 0,ad(),[y(o)],p,p)))}return!r.isTypeAssignableTo(i,_(t));var o})}(t,e));if(0function(e,t){if(!(4&Ox(e)&&t.properties))return e;const n=e.target,o=Fe(n.typeParameters);if(!o)return e;const a=[];return t.properties.forEach((e,t)=>{const i=r.getTypeOfPropertyOfType(n,t);Tn.assert(!!i,"generic should have all the properties of its reference."),a.push(...m(i,_(e),o))}),i[e.symbol.escapedName](u(a))}(t,e));return[]}(e)),s}function f(e){const t=new Map;e.properties&&e.properties.forEach((e,n)=>{const i=r.createSymbol(4,n);i.links.type=_(e),t.set(n,i)});const n=e.calls?[y(e.calls)]:[],i=e.constructs?[y(e.constructs)]:[],o=e.stringIndex?[r.createIndexInfo(r.getStringType(),_(e.stringIndex),!1)]:[];return r.createAnonymousType(void 0,t,n,i,o)}function m(e,t,n){if(e===n)return[t];if(3145728&e.flags)return z(e.types,e=>m(e,t,n));if(4&Ox(e)&&4&Ox(t)){const i=r.getTypeArguments(e),o=r.getTypeArguments(t),a=[];if(i&&o)for(let e=0;ee.argumentTypes.length));for(let i=0;ie.argumentTypes[i]||r.getUndefinedType())),e.some(e=>void 0===e.argumentTypes[i])&&(n.flags|=16777216),t.push(n)}const i=_(a(e.map(e=>e.return_)));return r.createSignature(void 0,void 0,void 0,t,i,void 0,n,0)}function v(e,t){!t||1&t.flags||131072&t.flags||(e.candidateTypes||(e.candidateTypes=[])).push(t)}function b(e,t){!t||1&t.flags||131072&t.flags||(e.candidateThisTypes||(e.candidateThisTypes=[])).push(t)}}o8({errorCodes:Iie,getCodeActions(e){const{sourceFile:t,program:n,span:{start:r},errorCode:i,cancellationToken:o,host:a,preferences:s}=e,c=YX(t,r);let l;const _=tde.ChangeTracker.with(e,e=>{l=jie(e,t,c,i,n,o,gt,a,s)}),u=l&&jc(l);return u&&0!==_.length?[n8(Aie,_,[Oie(i,c),tp(u)],Aie,Ca.Infer_all_types_from_usage)]:void 0},fixIds:[Aie],getAllCodeActions(e){const{sourceFile:t,program:n,cancellationToken:r,host:i,preferences:o}=e,a=$Q();return u8(e,Iie,(e,s)=>{jie(e,t,YX(s.file,s.start),s.code,n,r,a,i,o)})}});var Vie="fixReturnTypeInAsyncFunction",Wie=[Ca.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code];function $ie(e,t,n){if(zm(e))return;const r=xc(YX(e,n),g_),i=null==r?void 0:r.type;if(!i)return;const o=t.getTypeFromTypeNode(i),a=t.getAwaitedType(o)||t.getVoidType(),s=t.typeToTypeNode(a,i,void 0);return s?{returnTypeNode:i,returnType:o,promisedTypeNode:s,promisedType:a}:void 0}function Hie(e,t,n,r){e.replaceNode(t,n,aw.createTypeReferenceNode("Promise",[r]))}o8({errorCodes:Wie,fixIds:[Vie],getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e,i=n.getTypeChecker(),o=$ie(t,n.getTypeChecker(),r.start);if(!o)return;const{returnTypeNode:a,returnType:s,promisedTypeNode:c,promisedType:l}=o,_=tde.ChangeTracker.with(e,e=>Hie(e,t,a,c));return[n8(Vie,_,[Ca.Replace_0_with_Promise_1,i.typeToString(s),i.typeToString(l)],Vie,Ca.Fix_all_incorrect_return_type_of_an_async_functions)]},getAllCodeActions:e=>u8(e,Wie,(t,n)=>{const r=$ie(n.file,e.program.getTypeChecker(),n.start);r&&Hie(t,n.file,r.returnTypeNode,r.promisedTypeNode)})});var Kie="disableJsDiagnostics",Gie="disableJsDiagnostics",Xie=$(Object.keys(Ca),e=>{const t=Ca[e];return 1===t.category?t.code:void 0});function Qie(e,t,n,r){const{line:i}=ns(t,n);r&&!X(r,i)||e.insertCommentBeforeLine(t,i,n," @ts-ignore")}function Yie(e,t,n,r,i,o,a){const s=e.symbol.members;for(const c of t)s.has(c.escapedName)||toe(c,e,n,r,i,o,a,void 0)}function Zie(e){return{trackSymbol:()=>!1,moduleResolverHost:tY(e.program,e.host)}}o8({errorCodes:Xie,getCodeActions:function(e){const{sourceFile:t,program:n,span:r,host:i,formatContext:o}=e;if(!zm(t)||!yT(t,n.getCompilerOptions()))return;const a=t.checkJsDirective?"":$Y(i,o.options),s=[t8(Kie,[_8(t.fileName,[zQ(t.checkJsDirective?nc(t.checkJsDirective.pos,t.checkJsDirective.end):tc(0,0),`// @ts-nocheck${a}`)])],Ca.Disable_checking_for_this_file)];return tde.isValidLocationToAddComment(t,r.start)&&s.unshift(n8(Kie,tde.ChangeTracker.with(e,e=>Qie(e,t,r.start)),Ca.Ignore_this_error_message,Gie,Ca.Add_ts_ignore_to_all_error_messages)),s},fixIds:[Gie],getAllCodeActions:e=>{const t=new Set;return u8(e,Xie,(e,n)=>{tde.isValidLocationToAddComment(n.file,n.start)&&Qie(e,n.file,n.start,t)})}});var eoe=(e=>(e[e.Method=1]="Method",e[e.Property=2]="Property",e[e.All=3]="All",e))(eoe||{});function toe(e,t,n,r,i,o,a,s,c=3,l=!1){const _=e.getDeclarations(),u=Ce(_),d=r.program.getTypeChecker(),f=OS(r.program.getCompilerOptions()),m=(null==u?void 0:u.kind)??171,h=function(e,t){if(262144&xx(e)){const t=e.links.nameType;if(t&&kC(t))return aw.createIdentifier(Cc(TC(t)))}return aZ(jc(t),!1)}(e,u),y=u?rb(u):0;let v=256&y;v|=1&y?1:4&y?4:0,u&&T_(u)&&(v|=512);const b=function(){let e;v&&(e=fe(e,aw.createModifiersFromModifierFlags(v)));r.program.getCompilerOptions().noImplicitOverride&&u&&Gv(u)&&(e=pe(e,aw.createToken(164)));return e&&aw.createNodeArray(e)}(),x=d.getWidenedType(d.getTypeOfSymbolAtLocation(e,t)),S=!!(16777216&e.flags),k=!!(33554432&t.flags)||l,T=sY(n,i);switch(m){case 171:case 172:let n=1;n|=0===T?268435456:0;let i=d.typeToTypeNode(x,t,n,Zie(r));if(o){const e=hoe(i,f);e&&(i=e.typeNode,voe(o,e.symbols))}a(aw.createPropertyDeclaration(b,u?w(h):e.getName(),S&&2&c?aw.createToken(58):void 0,i,void 0));break;case 177:case 178:{Tn.assertIsDefined(_);let e=d.typeToTypeNode(x,t,void 0,Zie(r));const n=Dv(_,u),i=n.secondAccessor?[n.firstAccessor,n.secondAccessor]:[n.firstAccessor];if(o){const t=hoe(e,f);t&&(e=t.typeNode,voe(o,t.symbols))}for(const t of i)if(kD(t))a(aw.createGetAccessorDeclaration(b,w(h),p,D(e),N(s,T,k)));else{Tn.assertNode(t,TD,"The counterpart to a getter should be a setter");const n=bv(t),r=n&&QN(n.name)?wc(n.name):void 0;a(aw.createSetAccessorDeclaration(b,w(h),_oe(1,[r],[D(e)],1,!1),N(s,T,k)))}break}case 173:case 174:Tn.assertIsDefined(_);const l=x.isUnion()?z(x.types,e=>e.getCallSignatures()):x.getCallSignatures();if(!ee(l))break;if(1===_.length){Tn.assert(1===l.length,"One declaration implies one signature");const e=l[0];C(T,e,b,w(h),N(s,T,k));break}for(const e of l)C(T,e,b,w(h));if(!k)if(_.length>l.length){const e=d.getSignatureFromDeclaration(_[_.length-1]);C(T,e,b,w(h),N(s,T))}else Tn.assert(_.length===l.length,"Declarations and signatures should match count"),a(function(e,t,n,r,i,o,a,s,c){let l=r[0],_=r[0].minArgumentCount,u=!1;for(const e of r)_=Math.min(e.minArgumentCount,_),tJ(e)&&(u=!0),e.parameters.length>=l.parameters.length&&(!tJ(e)||tJ(l))&&(l=e);const d=l.parameters.length-(tJ(l)?1:0),p=l.parameters.map(e=>e.name),f=_oe(d,p,void 0,_,!1);if(u){const e=aw.createParameterDeclaration(void 0,aw.createToken(26),p[d]||"rest",d>=_?aw.createToken(58):void 0,aw.createArrayTypeNode(aw.createKeywordTypeNode(159)),void 0);f.push(e)}return function(e,t,n,r,i,o,a,s){return aw.createMethodDeclaration(e,void 0,t,n?aw.createToken(58):void 0,r,i,o,s||uoe(a))}(a,i,o,void 0,f,function(e,t,n,r){if(g(e)){const i=t.getUnionType(M(e,t.getReturnTypeOfSignature));return t.typeToTypeNode(i,r,1,Zie(n))}}(r,e,t,n),s,c)}(d,r,t,l,w(h),S&&!!(1&c),b,T,s))}function C(e,n,i,s,l){const _=noe(174,r,e,n,l,s,i,S&&!!(1&c),t,o);_&&a(_)}function w(e){return QN(e)&&"constructor"===e.escapedText?aw.createComputedPropertyName(aw.createStringLiteral(wc(e),0===T)):aZ(e,!1)}function N(e,t,n){return n?void 0:aZ(e,!1)||uoe(t)}function D(e){return aZ(e,!1)}}function noe(e,t,n,r,i,o,a,s,c,l){const _=t.program,u=_.getTypeChecker(),d=OS(_.getCompilerOptions()),p=zm(c),f=524545|(0===n?268435456:0),m=u.signatureToSignatureDeclaration(r,e,c,f,Zie(t));if(!m)return;let g=p?void 0:m.typeParameters,h=m.parameters,y=p?void 0:aZ(m.type);if(l){if(g){const e=B(g,e=>{let t=e.constraint,n=e.default;if(t){const e=hoe(t,d);e&&(t=e.typeNode,voe(l,e.symbols))}if(n){const e=hoe(n,d);e&&(n=e.typeNode,voe(l,e.symbols))}return aw.updateTypeParameterDeclaration(e,e.modifiers,e.name,t,n)});g!==e&&(g=vI(aw.createNodeArray(e,g.hasTrailingComma),g))}const e=B(h,e=>{let t=p?void 0:e.type;if(t){const e=hoe(t,d);e&&(t=e.typeNode,voe(l,e.symbols))}return aw.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,p?void 0:e.questionToken,t,e.initializer)});if(h!==e&&(h=vI(aw.createNodeArray(e,h.hasTrailingComma),h)),y){const e=hoe(y,d);e&&(y=e.typeNode,voe(l,e.symbols))}}const v=s?aw.createToken(58):void 0,b=m.asteriskToken;return _P(m)?aw.updateFunctionExpression(m,a,m.asteriskToken,dt(o,QN),g,h,y,i??m.body):uP(m)?aw.updateArrowFunction(m,a,g,h,y,m.equalsGreaterThanToken,i??m.body):bD(m)?aw.updateMethodDeclaration(m,a,b,o??aw.createIdentifier(""),v,g,h,y,i):nE(m)?aw.updateFunctionDeclaration(m,a,m.asteriskToken,dt(o,QN),g,h,y,i??m.body):void 0}function roe(e,t,n,r,i,o,a){const s=sY(t.sourceFile,t.preferences),c=OS(t.program.getCompilerOptions()),l=Zie(t),_=t.program.getTypeChecker(),u=zm(a),{typeArguments:d,arguments:p,parent:f}=r,m=u?void 0:_.getContextualType(r),g=M(p,e=>QN(e)?e.text:rP(e)&&QN(e.name)?e.name.text:void 0),h=u?[]:M(p,e=>_.getTypeAtLocation(e)),{argumentTypeNodes:y,argumentTypeParameters:v}=soe(_,n,h,a,c,1,l),b=o?aw.createNodeArray(aw.createModifiersFromModifierFlags(o)):void 0,x=xP(f)?aw.createToken(42):void 0,S=u?void 0:function(e,t,n){const r=new Set(t.map(e=>e[0])),i=new Map(t);if(n){const i=n.filter(n=>!t.some(t=>{var r;return e.getTypeAtLocation(n)===(null==(r=t[1])?void 0:r.argumentType)})),o=r.size+i.length;for(let e=0;r.size{var t;return aw.createTypeParameterDeclaration(void 0,e,null==(t=i.get(e))?void 0:t.constraint)})}(_,v,d),k=_oe(p.length,g,y,void 0,u),T=u||void 0===m?void 0:_.typeToTypeNode(m,a,void 0,l);switch(e){case 174:return aw.createMethodDeclaration(b,x,i,void 0,S,k,T,uoe(s));case 173:return aw.createMethodSignature(b,i,void 0,S,k,void 0===T?aw.createKeywordTypeNode(159):T);case 262:return Tn.assert("string"==typeof i||QN(i),"Unexpected name"),aw.createFunctionDeclaration(b,x,i,S,k,T,doe(Ca.Function_not_implemented.message,s));default:Tn.fail("Unexpected kind")}}function ioe(e){return 84+e<=90?String.fromCharCode(84+e):`T${e}`}function ooe(e,t,n,r,i,o,a){let s=e.typeToTypeNode(n,r,o,a);if(s&&GD(s)){const e=hoe(s,i);e&&(voe(t,e.symbols),s=e.typeNode)}return aZ(s)}function aoe(e){return e.isUnionOrIntersection()?e.types.some(aoe):262144&e.flags}function soe(e,t,n,r,i,o,a){const s=[],c=new Map;for(let l=0;l=r?aw.createToken(58):void 0,i?void 0:(null==n?void 0:n[s])||aw.createKeywordTypeNode(159),void 0);o.push(l)}return o}function uoe(e){return doe(Ca.Method_not_implemented.message,e)}function doe(e,t){return aw.createBlock([aw.createThrowStatement(aw.createNewExpression(aw.createIdentifier("Error"),void 0,[aw.createStringLiteral(e,0===t)]))],!0)}function poe(e,t,n){const r=em(t);if(!r)return;const i=goe(r,"compilerOptions");if(void 0===i)return void e.insertNodeAtObjectStart(t,r,moe("compilerOptions",aw.createObjectLiteralExpression(n.map(([e,t])=>moe(e,t)),!0)));const o=i.initializer;if(nP(o))for(const[r,i]of n){const n=goe(o,r);void 0===n?e.insertNodeAtObjectStart(t,o,moe(r,i)):e.replaceNode(t,n.initializer,i)}}function foe(e,t,n,r){poe(e,t,[[n,r]])}function moe(e,t){return aw.createPropertyAssignment(aw.createStringLiteral(e),t)}function goe(e,t){return C(e.properties,e=>HE(e)&&!!e.name&&ON(e.name)&&e.name.text===t)}function hoe(e,t){let n;const r=iJ(e,function e(r){if(yf(r)&&r.qualifier){const i=wb(r.qualifier),o=s0(i.symbol,t),a=o!==i.text?yoe(r.qualifier,aw.createIdentifier(o)):r.qualifier;n=pe(n,i.symbol);const s=oJ(r.typeArguments,e,A_);return aw.createTypeReferenceNode(a,s)}return fJ(r,e,void 0)},A_);if(n&&r)return{typeNode:r,symbols:n}}function yoe(e,t){return 80===e.kind?t:aw.createQualifiedName(yoe(e.left,t),e.right)}function voe(e,t){t.forEach(t=>e.addImportFromExportedSymbol(t,!0))}function boe(e,t){const n=Us(t);let r=YX(e,t.start);for(;r.ende.replaceNode(t,n,r));return t8(Poe,i,[Ca.Replace_import_with_0,i[0].textChanges[0].newText])}function Foe(e,t){const n=e.program.getTypeChecker().getTypeAtLocation(t);if(!(n.symbol&&sd(n.symbol)&&n.symbol.links.originatingImport))return[];const r=[],i=n.symbol.links.originatingImport;if(gf(i)||ge(r,function(e,t){const n=Dd(t),r=Ag(t),i=e.program.getCompilerOptions(),o=[];return o.push(Eoe(e,n,t,rY(r.name,void 0,t.moduleSpecifier,sY(n,e.preferences)))),1===jS(i)&&o.push(Eoe(e,n,t,aw.createImportEqualsDeclaration(void 0,!1,r.name,aw.createExternalModuleReference(t.moduleSpecifier)))),o}(e,i)),nu(t)&&(!Ic(t.parent)||t.parent.name!==t)){const n=e.sourceFile,i=tde.ChangeTracker.with(e,e=>e.replaceNode(n,t,aw.createPropertyAccessExpression(t,"default"),{}));r.push(t8(Poe,i,Ca.Use_synthetic_default_member))}return r}o8({errorCodes:[Ca.This_expression_is_not_callable.code,Ca.This_expression_is_not_constructable.code],getCodeActions:function(e){const t=e.sourceFile,n=Ca.This_expression_is_not_callable.code===e.errorCode?213:214,r=xc(YX(t,e.span.start),e=>e.kind===n);if(!r)return[];const i=r.expression;return Foe(e,i)}}),o8({errorCodes:[Ca.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,Ca.Type_0_does_not_satisfy_the_constraint_1.code,Ca.Type_0_is_not_assignable_to_type_1.code,Ca.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,Ca.Type_predicate_0_is_not_assignable_to_1.code,Ca.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,Ca._0_index_type_1_is_not_assignable_to_2_index_type_3.code,Ca.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,Ca.Property_0_in_type_1_is_not_assignable_to_type_2.code,Ca.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,Ca.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:function(e){const t=xc(YX(e.sourceFile,e.span.start),t=>t.getStart()===e.span.start&&t.getEnd()===e.span.start+e.span.length);if(!t)return[];return Foe(e,t)}});var Aoe="strictClassInitialization",Ioe="addMissingPropertyDefiniteAssignmentAssertions",Ooe="addMissingPropertyUndefinedType",joe="addMissingPropertyInitializer",Loe=[Ca.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];function Moe(e,t){const n=YX(e,t);if(QN(n)&&yD(n.parent)){const e=Pv(n.parent);if(e)return{type:e,prop:n.parent,isJs:zm(n.parent)}}}function Roe(e,t,n){uZ(n);const r=aw.updatePropertyDeclaration(n,n.modifiers,n.name,aw.createToken(54),n.type,n.initializer);e.replaceNode(t,n,r)}function Boe(e,t,n){const r=aw.createKeywordTypeNode(157),i=BD(n.type)?n.type.types.concat(r):[n.type,r],o=aw.createUnionTypeNode(i);n.isJs?e.addJSDocTags(t,n.prop,[aw.createJSDocTypeTag(void 0,aw.createJSDocTypeExpression(o))]):e.replaceNode(t,n.type,o)}function Joe(e,t,n,r){uZ(n);const i=aw.updatePropertyDeclaration(n,n.modifiers,n.name,n.questionToken,n.type,r);e.replaceNode(t,n,i)}function zoe(e,t){return qoe(e,e.getTypeFromTypeNode(t.type))}function qoe(e,t){if(512&t.flags)return t===e.getFalseType()||t===e.getFalseType(!0)?aw.createFalse():aw.createTrue();if(t.isStringLiteral())return aw.createStringLiteral(t.value);if(t.isNumberLiteral())return aw.createNumericLiteral(t.value);if(2048&t.flags)return aw.createBigIntLiteral(t.value);if(t.isUnion())return v(t.types,t=>qoe(e,t));if(t.isClass()){const e=Ix(t.symbol);if(!e||Wv(e,64))return;const n=vv(e);if(n&&n.parameters.length)return;return aw.createNewExpression(aw.createIdentifier(t.symbol.name),void 0,void 0)}return e.isArrayLikeType(t)?aw.createArrayLiteralExpression():void 0}o8({errorCodes:Loe,getCodeActions:function(e){const t=Moe(e.sourceFile,e.span.start);if(!t)return;const n=[];return pe(n,function(e,t){const n=tde.ChangeTracker.with(e,n=>Boe(n,e.sourceFile,t));return n8(Aoe,n,[Ca.Add_undefined_type_to_property_0,t.prop.name.getText()],Ooe,Ca.Add_undefined_type_to_all_uninitialized_properties)}(e,t)),pe(n,function(e,t){if(t.isJs)return;const n=tde.ChangeTracker.with(e,n=>Roe(n,e.sourceFile,t.prop));return n8(Aoe,n,[Ca.Add_definite_assignment_assertion_to_property_0,t.prop.getText()],Ioe,Ca.Add_definite_assignment_assertions_to_all_uninitialized_properties)}(e,t)),pe(n,function(e,t){if(t.isJs)return;const n=e.program.getTypeChecker(),r=zoe(n,t.prop);if(!r)return;const i=tde.ChangeTracker.with(e,n=>Joe(n,e.sourceFile,t.prop,r));return n8(Aoe,i,[Ca.Add_initializer_to_property_0,t.prop.name.getText()],joe,Ca.Add_initializers_to_all_uninitialized_properties)}(e,t)),n},fixIds:[Ioe,Ooe,joe],getAllCodeActions:e=>u8(e,Loe,(t,n)=>{const r=Moe(n.file,n.start);if(r)switch(e.fixId){case Ioe:Roe(t,n.file,r.prop);break;case Ooe:Boe(t,n.file,r);break;case joe:const i=zoe(e.program.getTypeChecker(),r.prop);if(!i)return;Joe(t,n.file,r.prop,i);break;default:Tn.fail(JSON.stringify(e.fixId))}})});var Uoe="requireInTs",Voe=[Ca.require_call_may_be_converted_to_an_import.code];function Woe(e,t,n){const{allowSyntheticDefaults:r,defaultImportName:i,namedImports:o,statement:a,required:s}=n;e.replaceNode(t,a,i&&!r?aw.createImportEqualsDeclaration(void 0,!1,i,aw.createExternalModuleReference(s)):aw.createImportDeclaration(void 0,aw.createImportClause(!1,i,o),s,void 0))}function $oe(e,t,n){const{parent:r}=YX(e,n);$m(r,!0)||Tn.failBadSyntaxKind(r);const i=pt(r.parent,eE),o=dt(i.name,QN),a=YD(i.name)?function(e){const t=[];for(const n of e.elements){if(!QN(n.name)||n.initializer)return;t.push(aw.createImportSpecifier(!1,dt(n.propertyName,QN),n.name))}if(t.length)return aw.createNamedImports(t)}(i.name):void 0;if(o||a)return{allowSyntheticDefaults:JS(t.getCompilerOptions()),defaultImportName:o,namedImports:a,statement:pt(i.parent.parent,LP),required:Ne(r.arguments)}}o8({errorCodes:Voe,getCodeActions(e){const t=$oe(e.sourceFile,e.program,e.span.start);if(!t)return;const n=tde.ChangeTracker.with(e,n=>Woe(n,e.sourceFile,t));return[n8(Uoe,n,Ca.Convert_require_to_import,Uoe,Ca.Convert_all_require_to_import)]},fixIds:[Uoe],getAllCodeActions:e=>u8(e,Voe,(t,n)=>{const r=$oe(n.file,e.program,n.start);r&&Woe(t,e.sourceFile,r)})});var Hoe="useDefaultImport",Koe=[Ca.Import_may_be_converted_to_a_default_import.code];function Goe(e,t){const n=YX(e,t);if(!QN(n))return;const{parent:r}=n;if(uE(r)&&EE(r.moduleReference))return{importNode:r,name:n,moduleSpecifier:r.moduleReference.expression};if(vE(r)&&dE(r.parent.parent)){const e=r.parent.parent;return{importNode:e,name:n,moduleSpecifier:e.moduleSpecifier}}}function Xoe(e,t,n,r){e.replaceNode(t,n.importNode,rY(n.name,void 0,n.moduleSpecifier,sY(t,r)))}o8({errorCodes:Koe,getCodeActions(e){const{sourceFile:t,span:{start:n}}=e,r=Goe(t,n);if(!r)return;const i=tde.ChangeTracker.with(e,n=>Xoe(n,t,r,e.preferences));return[n8(Hoe,i,Ca.Convert_to_default_import,Hoe,Ca.Convert_all_to_default_imports)]},fixIds:[Hoe],getAllCodeActions:e=>u8(e,Koe,(t,n)=>{const r=Goe(n.file,n.start);r&&Xoe(t,n.file,r,e.preferences)})});var Qoe="useBigintLiteral",Yoe=[Ca.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];function Zoe(e,t,n){const r=dt(YX(t,n.start),AN);if(!r)return;const i=r.getText(t)+"n";e.replaceNode(t,r,aw.createBigIntLiteral(i))}o8({errorCodes:Yoe,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>Zoe(t,e.sourceFile,e.span));if(t.length>0)return[n8(Qoe,t,Ca.Convert_to_a_bigint_numeric_literal,Qoe,Ca.Convert_all_to_bigint_numeric_literals)]},fixIds:[Qoe],getAllCodeActions:e=>u8(e,Yoe,(e,t)=>Zoe(e,t.file,t))});var eae="fixAddModuleReferTypeMissingTypeof",tae=[Ca.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function nae(e,t){const n=YX(e,t);return Tn.assert(102===n.kind,"This token should be an ImportKeyword"),Tn.assert(205===n.parent.kind,"Token parent should be an ImportType"),n.parent}function rae(e,t,n){const r=aw.updateImportTypeNode(n,n.argument,n.attributes,n.qualifier,n.typeArguments,!0);e.replaceNode(t,n,r)}o8({errorCodes:tae,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=nae(t,n.start),i=tde.ChangeTracker.with(e,e=>rae(e,t,r));return[n8(eae,i,Ca.Add_missing_typeof,eae,Ca.Add_missing_typeof)]},fixIds:[eae],getAllCodeActions:e=>u8(e,tae,(t,n)=>rae(t,e.sourceFile,nae(n.file,n.start)))});var iae="wrapJsxInFragment",oae=[Ca.JSX_expressions_must_have_one_parent_element.code];function aae(e,t){let n=YX(e,t).parent.parent;if((yP(n)||(n=n.parent,yP(n)))&&Ld(n.operatorToken))return n}function sae(e,t,n){const r=function(e){const t=[];let n=e;for(;;){if(yP(n)&&Ld(n.operatorToken)&&28===n.operatorToken.kind){if(t.push(n.left),Eu(n.right))return t.push(n.right),t;if(yP(n.right)){n=n.right;continue}return}return}}(n);r&&e.replaceNode(t,n,aw.createJsxFragment(aw.createJsxOpeningFragment(),r,aw.createJsxJsxClosingFragment()))}o8({errorCodes:oae,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=aae(t,n.start);if(!r)return;const i=tde.ChangeTracker.with(e,e=>sae(e,t,r));return[n8(iae,i,Ca.Wrap_in_JSX_fragment,iae,Ca.Wrap_all_unparented_JSX_in_JSX_fragment)]},fixIds:[iae],getAllCodeActions:e=>u8(e,oae,(t,n)=>{const r=aae(e.sourceFile,n.start);r&&sae(t,e.sourceFile,r)})});var cae="wrapDecoratorInParentheses",lae=[Ca.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];function _ae(e,t,n){const r=xc(YX(t,n),gD);Tn.assert(!!r,"Expected position to be owned by a decorator.");const i=aw.createParenthesizedExpression(r.expression);e.replaceNode(t,r.expression,i)}o8({errorCodes:lae,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>_ae(t,e.sourceFile,e.span.start));return[n8(cae,t,Ca.Wrap_in_parentheses,cae,Ca.Wrap_all_invalid_decorator_expressions_in_parentheses)]},fixIds:[cae],getAllCodeActions:e=>u8(e,lae,(e,t)=>_ae(e,t.file,t.start))});var uae="fixConvertToMappedObjectType",dae=[Ca.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];function pae(e,t){const n=dt(YX(e,t).parent.parent,ND);if(!n)return;const r=iE(n.parent)?n.parent:dt(n.parent.parent,oE);return r?{indexSignature:n,container:r}:void 0}function fae(e,t,{indexSignature:n,container:r}){const i=(iE(r)?r.members:r.type.members).filter(e=>!ND(e)),o=Ne(n.parameters),a=aw.createTypeParameterDeclaration(void 0,pt(o.name,QN),o.type),s=aw.createMappedTypeNode(Yv(n)?aw.createModifier(148):void 0,a,void 0,n.questionToken,n.type,void 0),c=aw.createIntersectionTypeNode([...Fh(r),s,...i.length?[aw.createTypeLiteralNode(i)]:p]);var l,_;e.replaceNode(t,r,(l=r,_=c,aw.createTypeAliasDeclaration(l.modifiers,l.name,l.typeParameters,_)))}o8({errorCodes:dae,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=pae(t,n.start);if(!r)return;const i=tde.ChangeTracker.with(e,e=>fae(e,t,r)),o=wc(r.container.name);return[n8(uae,i,[Ca.Convert_0_to_mapped_object_type,o],uae,[Ca.Convert_0_to_mapped_object_type,o])]},fixIds:[uae],getAllCodeActions:e=>u8(e,dae,(e,t)=>{const n=pae(t.file,t.start);n&&fae(e,t.file,n)})});var mae="removeAccidentalCallParentheses";o8({errorCodes:[Ca.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code],getCodeActions(e){const t=xc(YX(e.sourceFile,e.span.start),oP);if(!t)return;const n=tde.ChangeTracker.with(e,n=>{n.deleteRange(e.sourceFile,{pos:t.expression.end,end:t.end})});return[t8(mae,n,Ca.Remove_parentheses)]},fixIds:[mae]});var gae="removeUnnecessaryAwait",hae=[Ca.await_has_no_effect_on_the_type_of_this_expression.code];function yae(e,t,n){const r=dt(YX(t,n.start),e=>135===e.kind),i=r&&dt(r.parent,mP);if(!i)return;let o=i;if(lP(i.parent)){if(QN(Hx(i.expression,!1))){const e=rQ(i.parent.pos,t);e&&105!==e.kind&&(o=i.parent)}}e.replaceNode(t,o,i.expression)}o8({errorCodes:hae,getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>yae(t,e.sourceFile,e.span));if(t.length>0)return[n8(gae,t,Ca.Remove_unnecessary_await,gae,Ca.Remove_all_unnecessary_uses_of_await)]},fixIds:[gae],getAllCodeActions:e=>u8(e,hae,(e,t)=>yae(e,t.file,t))});var vae=[Ca.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],bae="splitTypeOnlyImport";function xae(e,t){return xc(YX(e,t.start),dE)}function Sae(e,t,n){if(!t)return;const r=Tn.checkDefined(t.importClause);e.replaceNode(n.sourceFile,t,aw.updateImportDeclaration(t,t.modifiers,aw.updateImportClause(r,r.isTypeOnly,r.name,void 0),t.moduleSpecifier,t.attributes)),e.insertNodeAfter(n.sourceFile,t,aw.createImportDeclaration(void 0,aw.updateImportClause(r,r.isTypeOnly,void 0,r.namedBindings),t.moduleSpecifier,t.attributes))}o8({errorCodes:vae,fixIds:[bae],getCodeActions:function(e){const t=tde.ChangeTracker.with(e,t=>Sae(t,xae(e.sourceFile,e.span),e));if(t.length)return[n8(bae,t,Ca.Split_into_two_separate_import_declarations,bae,Ca.Split_all_invalid_type_only_imports)]},getAllCodeActions:e=>u8(e,vae,(t,n)=>{Sae(t,xae(e.sourceFile,n),e)})});var kae="fixConvertConstToLet",Tae=[Ca.Cannot_assign_to_0_because_it_is_a_constant.code];function Cae(e,t,n){var r;const i=n.getTypeChecker().getSymbolAtLocation(YX(e,t));if(void 0===i)return;const o=dt(null==(r=null==i?void 0:i.valueDeclaration)?void 0:r.parent,tE);if(void 0===o)return;const a=RX(o,87,e);return void 0!==a?{symbol:i,token:a}:void 0}function wae(e,t,n){e.replaceNode(t,n,aw.createToken(121))}o8({errorCodes:Tae,getCodeActions:function(e){const{sourceFile:t,span:n,program:r}=e,i=Cae(t,n.start,r);if(void 0===i)return;const o=tde.ChangeTracker.with(e,e=>wae(e,t,i.token));return[r8(kae,o,Ca.Convert_const_to_let,kae,Ca.Convert_all_const_to_let)]},getAllCodeActions:e=>{const{program:t}=e,n=new Map;return l8(tde.ChangeTracker.with(e,r=>{d8(e,Tae,e=>{const i=Cae(e.file,e.start,t);if(i&&Bx(n,GB(i.symbol)))return wae(r,e.file,i.token)})}))},fixIds:[kae]});var Nae="fixExpectedComma",Dae=[Ca._0_expected.code];function Pae(e,t,n){const r=YX(e,t);return 27===r.kind&&r.parent&&(nP(r.parent)||tP(r.parent))?{node:r}:void 0}function Eae(e,t,{node:n}){const r=aw.createToken(28);e.replaceNode(t,n,r)}o8({errorCodes:Dae,getCodeActions(e){const{sourceFile:t}=e,n=Pae(t,e.span.start,e.errorCode);if(!n)return;const r=tde.ChangeTracker.with(e,e=>Eae(e,t,n));return[n8(Nae,r,[Ca.Change_0_to_1,";",","],Nae,[Ca.Change_0_to_1,";",","])]},fixIds:[Nae],getAllCodeActions:e=>u8(e,Dae,(t,n)=>{const r=Pae(n.file,n.start,n.code);r&&Eae(t,e.sourceFile,r)})});var Fae="addVoidToPromise",Aae=[Ca.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,Ca.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];function Iae(e,t,n,r,i){const o=YX(t,n.start);if(!QN(o)||!oP(o.parent)||o.parent.expression!==o||0!==o.parent.arguments.length)return;const a=r.getTypeChecker(),s=a.getSymbolAtLocation(o),c=null==s?void 0:s.valueDeclaration;if(!c||!mD(c)||!aP(c.parent.parent))return;if(null==i?void 0:i.has(c))return;null==i||i.add(c);const l=function(e){var t;if(!zm(e))return e.typeArguments;if(lP(e.parent)){const n=null==(t=ul(e.parent))?void 0:t.typeExpression.type;if(n&&PD(n)&&QN(n.typeName)&&"Promise"===wc(n.typeName))return n.typeArguments}}(c.parent.parent);if(ee(l)){const n=l[0],r=!BD(n)&&!UD(n)&&UD(aw.createUnionTypeNode([n,aw.createKeywordTypeNode(116)]).types[0]);r&&e.insertText(t,n.pos,"("),e.insertText(t,n.end,r?") | void":" | void")}else{const n=a.getResolvedSignature(o.parent),r=null==n?void 0:n.parameters[0],i=r&&a.getTypeOfSymbolAtLocation(r,c.parent.parent);zm(c)?(!i||3&i.flags)&&(e.insertText(t,c.parent.parent.end,")"),e.insertText(t,ds(t.text,c.parent.parent.pos),"/** @type {Promise} */(")):(!i||2&i.flags)&&e.insertText(t,c.parent.parent.expression.end,"")}}o8({errorCodes:Aae,fixIds:[Fae],getCodeActions(e){const t=tde.ChangeTracker.with(e,t=>Iae(t,e.sourceFile,e.span,e.program));if(t.length>0)return[n8("addVoidToPromise",t,Ca.Add_void_to_Promise_resolved_without_a_value,Fae,Ca.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions:e=>u8(e,Aae,(t,n)=>Iae(t,n.file,n,e.program,new Set))});var Oae={};a(Oae,{CompletionKind:()=>Cse,CompletionSource:()=>Rae,SortText:()=>Mae,StringCompletions:()=>rce,SymbolOriginInfoKind:()=>Bae,createCompletionDetails:()=>kse,createCompletionDetailsForSymbol:()=>Sse,getCompletionEntriesFromSymbols:()=>yse,getCompletionEntryDetails:()=>bse,getCompletionEntrySymbol:()=>Tse,getCompletionsAtPosition:()=>Hae,getPropertiesForObjectExpression:()=>Bse,moduleSpecifierResolutionCacheAttemptLimit:()=>Lae,moduleSpecifierResolutionLimit:()=>jae});var jae=100,Lae=1e3,Mae={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated:e=>"z"+e,ObjectLiteralProperty:(e,t)=>`${e}\0${t}\0`,SortBelow:e=>e+"1"},Rae=(e=>(e.ThisProperty="ThisProperty/",e.ClassMemberSnippet="ClassMemberSnippet/",e.TypeOnlyAlias="TypeOnlyAlias/",e.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",e.SwitchCases="SwitchCases/",e.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",e))(Rae||{}),Bae=(e=>(e[e.ThisType=1]="ThisType",e[e.SymbolMember=2]="SymbolMember",e[e.Export=4]="Export",e[e.Promise=8]="Promise",e[e.Nullable=16]="Nullable",e[e.ResolvedExport=32]="ResolvedExport",e[e.TypeOnlyAlias=64]="TypeOnlyAlias",e[e.ObjectLiteralMethod=128]="ObjectLiteralMethod",e[e.Ignore=256]="Ignore",e[e.ComputedPropertyName=512]="ComputedPropertyName",e[e.SymbolMemberNoExport=2]="SymbolMemberNoExport",e[e.SymbolMemberExport=6]="SymbolMemberExport",e))(Bae||{});function Jae(e){return!!(e&&4&e.kind)}function zae(e){return!(!e||32!==e.kind)}function qae(e){return(Jae(e)||zae(e))&&!!e.isFromPackageJson}function Uae(e){return!!(e&&64&e.kind)}function Vae(e){return!!(e&&128&e.kind)}function Wae(e){return!!(e&&512&e.kind)}function $ae(e,t,n,r,i,o,a,s,c){var l,_,u;const d=tr(),p=a||ek(LS(r.getCompilerOptions()));let f=!1,m=0,g=0,h=0,y=0;const v=c({tryResolve:function(e,t){if(t){const t=n.getModuleSpecifierForBestExportInfo(e,i,s);return t&&m++,t||"failed"}const r=p||o.allowIncompleteCompletions&&gf,resolvedAny:()=>g>0,resolvedBeyondLimit:()=>g>jae}),b=y?` (${(h/y*100).toFixed(1)}% hit rate)`:"";return null==(l=t.log)||l.call(t,`${e}: resolved ${g} module specifiers, plus ${m} ambient and ${h} from cache${b}`),null==(_=t.log)||_.call(t,`${e}: response is ${f?"incomplete":"complete"}`),null==(u=t.log)||u.call(t,`${e}: ${tr()-d}`),v}function Hae(e,t,n,r,i,o,a,s,c,l,_=!1){var u;const{previousToken:d}=Dse(i,r);if(a&&!sQ(r,i,d)&&!function(e,t,n,r){switch(t){case".":case"@":return!0;case'"':case"'":case"`":return!!n&&DZ(n)&&r===n.getStart(e)+1;case"#":return!!n&&YN(n)&&!!om(n);case"<":return!!n&&30===n.kind&&(!yP(n.parent)||Vse(n.parent));case"/":return!!n&&(Ku(n)?!!Eg(n):44===n.kind&&OE(n.parent));case" ":return!!n&&_D(n)&&307===n.parent.kind;default:return Tn.assertNever(t)}}(r,a,d,i))return;if(" "===a)return o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText?{isGlobalCompletion:!0,isMemberCompletion:!1,isNewIdentifierLocation:!0,isIncomplete:!0,entries:[]}:void 0;const p=t.getCompilerOptions(),f=t.getTypeChecker(),m=o.allowIncompleteCompletions?null==(u=e.getIncompleteCompletionsCache)?void 0:u.call(e):void 0;if(m&&3===s&&d&&QN(d)){const n=function(e,t,n,r,i,o,a,s){const c=e.get();if(!c)return;const l=XX(t,s),_=n.text.toLowerCase(),u=O0(t,i,r,o,a),d=$ae("continuePreviousIncompleteResponse",i,Q5.createImportSpecifierResolver(t,r,i,o),r,n.getStart(),o,!1,OT(n),e=>{const n=$(c.entries,n=>{var o;if(!n.hasAction||!n.source||!n.data||Gae(n.data))return n;if(!ece(n.name,_))return;const{origin:a}=Tn.checkDefined(Pse(n.name,n.data,r,i)),s=u.get(t.path,n.data.exportMapKey),c=s&&e.tryResolve(s,!Js(Wy(a.moduleSymbol.name)));if("skipped"===c)return n;if(!c||"failed"===c)return void(null==(o=i.log)||o.call(i,`Unexpected failure resolving auto import for '${n.name}' from '${n.source}'`));const l={...a,kind:32,moduleSpecifier:c.moduleSpecifier};return n.data=pse(l),n.source=hse(l),n.sourceDisplay=[RY(l.moduleSpecifier)],n});return e.skippedAny()||(c.isIncomplete=void 0),n});return c.entries=d,c.flags=4|(c.flags||0),c.optionalReplacementSpan=tse(l),c}(m,r,d,t,e,o,c,i);if(n)return n}else null==m||m.clear();const g=rce.getStringLiteralCompletions(r,i,d,p,e,t,n,o,_);if(g)return g;if(d&&Ll(d.parent)&&(83===d.kind||88===d.kind||80===d.kind))return function(e){const t=function(e){const t=[],n=new Map;let r=e;for(;r&&!f_(r);){if(XP(r)){const e=r.label.text;n.has(e)||(n.set(e,!0),t.push({name:e,kindModifiers:"",kind:"label",sortText:Mae.LocationPriority}))}r=r.parent}return t}(e);if(t.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:t}}(d.parent);const h=Nse(t,n,r,p,i,o,void 0,e,l,c);var y;if(h)switch(h.kind){case 0:const a=function(e,t,n,r,i,o,a,s,c,l){const{symbols:_,contextToken:u,completionKind:d,isInSnippetScope:p,isNewIdentifierLocation:f,location:m,propertyAccessToConvert:g,keywordFilters:h,symbolToOriginInfoMap:y,recommendedCompletion:v,isJsxInitializer:b,isTypeOnlyLocation:x,isJsxIdentifierExpected:S,isRightOfOpenTag:k,isRightOfDotOrQuestionDot:T,importStatementCompletion:C,insideJsDocTagTypeExpression:w,symbolToSortTextMap:N,hasUnresolvedAutoImports:D}=o;let P=o.literals;const E=n.getTypeChecker();if(1===DS(e.scriptKind)){const t=function(e,t){const n=xc(e,e=>{switch(e.kind){case 287:return!0;case 44:case 32:case 80:case 211:return!1;default:return"quit"}});if(n){const e=!!RX(n,32,t),r=n.parent.openingElement.tagName.getText(t)+(e?"":">");return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:jQ(n.tagName),entries:[{name:r,kind:"class",kindModifiers:void 0,sortText:Mae.LocationPriority}]}}return}(m,e);if(t)return t}const F=xc(u,UE);if(F&&(uD(u)||hh(u,F.expression))){const e=T0(E,F.parent.clauses);P=P.filter(t=>!e.hasValue(t)),_.forEach((t,n)=>{if(t.valueDeclaration&&XE(t.valueDeclaration)){const r=E.getConstantValue(t.valueDeclaration);void 0!==r&&e.hasValue(r)&&(y[n]={kind:256})}})}const A=[],I=nse(e,r);if(I&&!f&&(!_||0===_.length)&&0===h)return;const O=yse(_,A,void 0,u,m,c,e,t,n,OS(r),i,d,a,r,s,x,g,S,b,C,v,y,N,S,k,l);if(0!==h)for(const t of Ise(h,!w&&Bm(e)))(x&&UQ(Wa(t.name))||!x&&nce(t.name)||!O.has(t.name))&&(O.add(t.name),se(A,t,Kae,void 0,!0));for(const e of function(e,t){const n=[];if(e){const r=e.getSourceFile(),i=e.parent,o=r.getLineAndCharacterOfPosition(e.end).line,a=r.getLineAndCharacterOfPosition(t).line;(dE(i)||TE(i)&&i.moduleSpecifier)&&e===i.moduleSpecifier&&o===a&&n.push({name:Va(132),kind:"keyword",kindModifiers:"",sortText:Mae.GlobalsOrKeywords})}return n}(u,c))O.has(e.name)||(O.add(e.name),se(A,e,Kae,void 0,!0));for(const t of P){const n=cse(e,a,t);O.add(n.name),se(A,n,Kae,void 0,!0)}I||function(e,t,n,r,i){k5(e).forEach((e,o)=>{if(e===t)return;const a=Cc(o);!n.has(a)&&Es(a,r)&&(n.add(a),se(i,{name:a,kind:"warning",kindModifiers:"",sortText:Mae.JavascriptIdentifiers,isFromUncheckedFile:!0},Kae))})}(e,m.pos,O,OS(r),A);let j;if(a.includeCompletionsWithInsertText&&u&&!k&&!T&&(j=xc(u,lE))){const i=rse(j,e,a,r,t,n,s);i&&A.push(i.entry)}return{flags:o.flags,isGlobalCompletion:p,isIncomplete:!(!a.allowIncompleteCompletions||!D)||void 0,isMemberCompletion:ase(d),isNewIdentifierLocation:f,optionalReplacementSpan:tse(m),entries:A}}(r,e,t,p,n,h,o,l,i,_);return(null==a?void 0:a.isIncomplete)&&(null==m||m.set(a)),a;case 1:return Xae([...Ule.getJSDocTagNameCompletions(),...Qae(r,i,f,p,o,!0)]);case 2:return Xae([...Ule.getJSDocTagCompletions(),...Qae(r,i,f,p,o,!1)]);case 3:return Xae(Ule.getJSDocParameterNameCompletions(h.tag));case 4:return y=h.keywordCompletions,{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:h.isNewIdentifierLocation,entries:y.slice()};default:return Tn.assertNever(h)}}function Kae(e,t){var n,r;let i=Wt(e.sortText,t.sortText);return 0===i&&(i=Wt(e.name,t.name)),0===i&&(null==(n=e.data)?void 0:n.moduleSpecifier)&&(null==(r=t.data)?void 0:r.moduleSpecifier)&&(i=iT(e.data.moduleSpecifier,t.data.moduleSpecifier)),0===i?-1:i}function Gae(e){return!!(null==e?void 0:e.moduleSpecifier)}function Xae(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e}}function Qae(e,t,n,r,i,o){const a=YX(e,t);if(!Mu(a)&&!pF(a))return[];const s=pF(a)?a:a.parent;if(!pF(s))return[];const c=s.parent;if(!f_(c))return[];const l=Bm(e),_=i.includeCompletionsWithSnippetText||void 0,u=I(s.tags,e=>PF(e)&&e.getEnd()<=t);return $(c.parameters,e=>{if(!Jc(e).length){if(QN(e.name)){const t={tabstop:1},a=e.name.text;let s=Zae(a,e.initializer,e.dotDotDotToken,l,!1,!1,n,r,i),c=_?Zae(a,e.initializer,e.dotDotDotToken,l,!1,!0,n,r,i,t):void 0;return o&&(s=s.slice(1),c&&(c=c.slice(1))),{name:s,kind:"parameter",sortText:Mae.LocationPriority,insertText:_?c:void 0,isSnippet:_}}if(e.parent.parameters.indexOf(e)===u){const t=`param${u}`,a=Yae(t,e.name,e.initializer,e.dotDotDotToken,l,!1,n,r,i),s=_?Yae(t,e.name,e.initializer,e.dotDotDotToken,l,!0,n,r,i):void 0;let c=a.join(Xb(r)+"* "),d=null==s?void 0:s.join(Xb(r)+"* ");return o&&(c=c.slice(1),d&&(d=d.slice(1))),{name:c,kind:"parameter",sortText:Mae.LocationPriority,insertText:_?d:void 0,isSnippet:_}}}})}function Yae(e,t,n,r,i,o,a,s,c){return i?l(e,t,n,r,{tabstop:1}):[Zae(e,n,r,i,!1,o,a,s,c,{tabstop:1})];function l(e,t,n,r,l){if(YD(t)&&!r){const u={tabstop:l.tabstop},d=Zae(e,n,r,i,!0,o,a,s,c,u);let p=[];for(const n of t.elements){const t=_(e,n,u);if(!t){p=void 0;break}p.push(...t)}if(p)return l.tabstop=u.tabstop,[d,...p]}return[Zae(e,n,r,i,!1,o,a,s,c,l)]}function _(e,t,n){if(!t.propertyName&&QN(t.name)||QN(t.name)){const r=t.propertyName?zp(t.propertyName):t.name.text;if(!r)return;return[Zae(`${e}.${r}`,t.initializer,t.dotDotDotToken,i,!1,o,a,s,c,n)]}if(t.propertyName){const r=zp(t.propertyName);return r&&l(`${e}.${r}`,t.name,t.initializer,t.dotDotDotToken,n)}}}function Zae(e,t,n,r,i,o,a,s,c,l){if(o&&Tn.assertIsDefined(l),t&&(e=function(e,t){const n=t.getText().trim();if(n.includes("\n")||n.length>80)return`[${e}]`;return`[${e}=${n}]`}(e,t)),o&&(e=eC(e)),r){let r="*";if(i)Tn.assert(!n,"Cannot annotate a rest parameter with type 'Object'."),r="Object";else{if(t){const e=a.getTypeAtLocation(t.parent);if(!(16385&e.flags)){const n=t.getSourceFile(),i=0===sY(n,c)?268435456:0,l=a.typeToTypeNode(e,xc(t,f_),i);if(l){const e=o?dse({removeComments:!0,module:s.module,target:s.target}):xU({removeComments:!0,module:s.module,target:s.target});dw(l,1),r=e.printNode(4,l,n)}}}o&&"*"===r&&(r=`\${${l.tabstop++}:${r}}`)}return`@param {${!i&&n?"...":""}${r}} ${e} ${o?`\${${l.tabstop++}}`:""}`}return`@param ${e} ${o?`\${${l.tabstop++}}`:""}`}function ese(e,t,n){return{kind:4,keywordCompletions:Ise(e,t),isNewIdentifierLocation:n}}function tse(e){return 80===(null==e?void 0:e.kind)?jQ(e):void 0}function nse(e,t){return!Bm(e)||!!yT(e,t)}function rse(e,t,n,r,i,o,a){const s=e.clauses,c=o.getTypeChecker(),l=c.getTypeAtLocation(e.parent.expression);if(l&&l.isUnion()&&T(l.types,e=>e.isLiteral())){const _=T0(c,s),u=OS(r),d=sY(t,n),p=Q5.createImportAdder(t,o,n,i),f=[];for(const t of l.types)if(1024&t.flags){Tn.assert(t.symbol,"An enum member type should have a symbol"),Tn.assert(t.symbol.parent,"An enum member type should have a parent symbol (the enum symbol)");const n=t.symbol.valueDeclaration&&c.getConstantValue(t.symbol.valueDeclaration);if(void 0!==n){if(_.hasValue(n))continue;_.addValue(n)}const r=Q5.typeToAutoImportableTypeNode(c,p,t,e,u);if(!r)return;const i=ise(r,u,d);if(!i)return;f.push(i)}else if(!_.hasValue(t.value))switch(typeof t.value){case"object":f.push(t.value.negative?aw.createPrefixUnaryExpression(41,aw.createBigIntLiteral({negative:!1,base10Value:t.value.base10Value})):aw.createBigIntLiteral(t.value));break;case"number":f.push(t.value<0?aw.createPrefixUnaryExpression(41,aw.createNumericLiteral(-t.value)):aw.createNumericLiteral(t.value));break;case"string":f.push(aw.createStringLiteral(t.value,0===d))}if(0===f.length)return;const m=M(f,e=>aw.createCaseClause(e,[])),g=$Y(i,null==a?void 0:a.options),h=dse({removeComments:!0,module:r.module,target:r.target,newLine:v0(g)}),y=a?e=>h.printAndFormatNode(4,e,t,a):e=>h.printNode(4,e,t),v=M(m,(e,t)=>n.includeCompletionsWithSnippetText?`${y(e)}$${t+1}`:`${y(e)}`).join(g);return{entry:{name:`${h.printNode(4,m[0],t)} ...`,kind:"",sortText:Mae.GlobalsOrKeywords,insertText:v,hasAction:p.hasFixes()||void 0,source:"SwitchCases/",isSnippet:!!n.includeCompletionsWithSnippetText||void 0},importAdder:p}}}function ise(e,t,n){switch(e.kind){case 183:return ose(e.typeName,t,n);case 199:const r=ise(e.objectType,t,n),i=ise(e.indexType,t,n);return r&&i&&aw.createElementAccessExpression(r,i);case 201:const o=e.literal;switch(o.kind){case 11:return aw.createStringLiteral(o.text,0===n);case 9:return aw.createNumericLiteral(o.text,o.numericLiteralFlags)}return;case 196:const a=ise(e.type,t,n);return a&&(QN(a)?a:aw.createParenthesizedExpression(a));case 186:return ose(e.exprName,t,n);case 205:Tn.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.")}}function ose(e,t,n){if(QN(e))return e;const r=Cc(e.right.escapedText);return lC(r,t)?aw.createPropertyAccessExpression(ose(e.left,t,n),r):aw.createElementAccessExpression(ose(e.left,t,n),aw.createStringLiteral(r,0===n))}function ase(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}function sse(e,t,n){return"object"==typeof n?ET(n)+"n":_t(n)?wZ(e,t,n):JSON.stringify(n)}function cse(e,t,n){return{name:sse(e,t,n),kind:"string",kindModifiers:"",sortText:Mae.LocationPriority}}function lse(e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m,g,h,y,v,b,x,S,k){var w,N;let D,P,E,F,A,I,O,j=OQ(n,o),L=hse(u);const M=c.getTypeChecker(),R=u&&function(e){return!!(16&e.kind)}(u),B=u&&function(e){return!!(2&e.kind)}(u)||_;if(u&&function(e){return!!(1&e.kind)}(u))D=_?`this${R?"?.":""}[${mse(a,y,l)}]`:`this${R?"?.":"."}${l}`;else if((B||R)&&p){D=B?_?`[${mse(a,y,l)}]`:`[${l}]`:l,(R||p.questionDotToken)&&(D=`?.${D}`);const e=RX(p,25,a)||RX(p,29,a);if(!e)return;const t=ln(l,p.name.text)?p.name.end:e.end;j=nc(e.getStart(a),t)}if(f&&(void 0===D&&(D=l),D=`{${D}}`,"boolean"!=typeof f&&(j=jQ(f,a))),u&&function(e){return!!(8&e.kind)}(u)&&p){void 0===D&&(D=l);const e=rQ(p.pos,a);let t="";e&&RZ(e.end,e.parent,a)&&(t=";"),t+=`(await ${p.expression.getText()})`,D=_?`${t}${D}`:`${t}${R?"?.":"."}${D}`;j=nc((dt(p.parent,mP)?p.parent:p.expression).getStart(a),p.end)}if(zae(u)&&(A=[RY(u.moduleSpecifier)],m&&(({insertText:D,replacementSpan:j}=function(e,t,n,r,i,o,a){const s=t.replacementSpan,c=eC(wZ(i,a,n.moduleSpecifier)),l=n.isDefaultExport?1:"export="===n.exportName?2:0,_=a.includeCompletionsWithSnippetText?"$1":"",u=Q5.getImportKind(i,l,o,!0),d=t.couldBeTypeOnlyImportSpecifier,p=t.isTopLevelTypeOnly?` ${Va(156)} `:" ",f=d?`${Va(156)} `:"",m=r?";":"";switch(u){case 3:return{replacementSpan:s,insertText:`import${p}${eC(e)}${_} = require(${c})${m}`};case 1:return{replacementSpan:s,insertText:`import${p}${eC(e)}${_} from ${c}${m}`};case 2:return{replacementSpan:s,insertText:`import${p}* as ${eC(e)} from ${c}${m}`};case 0:return{replacementSpan:s,insertText:`import${p}{ ${f}${eC(e)}${_} } from ${c}${m}`}}}(l,m,u,g,a,h,y)),F=!!y.includeCompletionsWithSnippetText||void 0)),64===(null==u?void 0:u.kind)&&(I=!0),0===v&&r&&28!==(null==(w=rQ(r.pos,a,r))?void 0:w.kind)&&(bD(r.parent.parent)||kD(r.parent.parent)||TD(r.parent.parent)||GE(r.parent)||(null==(N=xc(r.parent,HE))?void 0:N.getLastToken(a))===r||KE(r.parent)&&ns(a,r.getEnd()).line!==ns(a,o).line)&&(L="ObjectLiteralMemberWithComma/",I=!0),y.includeCompletionsWithClassMemberSnippets&&y.includeCompletionsWithInsertText&&3===v&&function(e,t,n){if(zm(t))return!1;const r=106500;return!!(e.flags&r)&&(S_(t)||t.parent&&t.parent.parent&&x_(t.parent)&&t===t.parent.name&&t.parent.getLastToken(n)===t.parent.name&&S_(t.parent.parent)||t.parent&&zF(t)&&S_(t.parent))}(e,i,a)){let t;const n=_se(s,c,h,y,l,e,i,o,r,b);if(!n)return;({insertText:D,filterText:P,isSnippet:F,importAdder:t}=n),((null==t?void 0:t.hasFixes())||n.eraseRange)&&(I=!0,L="ClassMemberSnippet/")}if(u&&Vae(u)&&(({insertText:D,isSnippet:F,labelDetails:O}=u),y.useLabelDetailsInCompletionEntries||(l+=O.detail,O=void 0),L="ObjectLiteralMethodSnippet/",t=Mae.SortBelow(t)),x&&!S&&y.includeCompletionsWithSnippetText&&y.jsxAttributeCompletionStyle&&"none"!==y.jsxAttributeCompletionStyle&&(!RE(i.parent)||!i.parent.initializer)){let t="braces"===y.jsxAttributeCompletionStyle;const n=M.getTypeOfSymbolAtLocation(e,i);"auto"!==y.jsxAttributeCompletionStyle||528&n.flags||1048576&n.flags&&C(n.types,e=>!!(528&e.flags))||(402653316&n.flags||1048576&n.flags&&T(n.types,e=>!!(402686084&e.flags||wQ(e)))?(D=`${eC(l)}=${wZ(a,y,"$1")}`,F=!0):t=!0),t&&(D=`${eC(l)}={$1}`,F=!0)}if(void 0!==D&&!y.includeCompletionsWithInsertText)return;(Jae(u)||zae(u))&&(E=pse(u),I=!m);const J=xc(i,Vx);if(275===(null==J?void 0:J.kind)){const e=Wa(l);J&&e&&(135===e||Bh(e))&&(D=`${l} as ${l}_`)}return{name:l,kind:$ue.getSymbolKind(M,e,i),kindModifiers:$ue.getSymbolModifiers(M,e),sortText:t,source:L,hasAction:!!I||void 0,isRecommended:gse(e,d,M)||void 0,insertText:D,filterText:P,replacementSpan:j,sourceDisplay:A,labelDetails:O,isSnippet:F,isPackageJsonImport:qae(u)||void 0,isImportStatementCompletion:!!m||void 0,data:E,...k?{symbol:e}:void 0}}function _se(e,t,n,r,i,o,a,s,c,l){const _=xc(a,S_);if(!_)return;let u,d=i;const p=i,f=t.getTypeChecker(),m=a.getSourceFile(),g=dse({removeComments:!0,module:n.module,target:n.target,omitTrailingSemicolon:!1,newLine:v0($Y(e,null==l?void 0:l.options))}),h=Q5.createImportAdder(m,t,r,e);let y;if(r.includeCompletionsWithSnippetText){u=!0;const e=aw.createEmptyStatement();y=aw.createBlock([e],!0),Bw(e,{kind:0,order:0})}else y=aw.createBlock([],!0);let v=0;const{modifiers:b,range:x,decorators:S}=function(e,t,n){if(!e||ns(t,n).line>ns(t,e.getEnd()).line)return{modifiers:0};let r,i,o=0;const a={pos:n,end:n};if(yD(e.parent)&&(i=function(e){if(__(e))return e.kind;if(QN(e)){const t=Nc(e);if(t&&s_(t))return t}return}(e))){e.parent.modifiers&&(o|=98303&_b(e.parent.modifiers),r=e.parent.modifiers.filter(gD)||[],a.pos=Math.min(...e.parent.modifiers.map(e=>e.getStart(t))));const n=ub(i);o&n||(o|=n,a.pos=Math.min(a.pos,e.getStart(t))),e.parent.name!==e&&(a.end=e.parent.name.getStart(t))}return{modifiers:o,decorators:r,range:a.pos{let t=0;k&&(t|=64),x_(e)&&1===f.getMemberOverrideModifierStatus(_,e,o)&&(t|=16),T.length||(v=e.modifierFlagsCache|t),e=aw.replaceModifiers(e,v),T.push(e)},y,Q5.PreserveOptionalFlags.Property,!!k),T.length){const e=8192&o.flags;let t=17|v;t|=e?1024:136;const n=b&t;if(b&~t)return;if(4&v&&1&n&&(v&=-5),0===n||1&n||(v&=-2),v|=n,T=T.map(e=>aw.replaceModifiers(e,v)),null==S?void 0:S.length){const e=T[T.length-1];xI(e)&&(T[T.length-1]=aw.replaceDecoratorsAndModifiers(e,S.concat(Rc(e)||[])))}const r=131073;d=l?g.printAndFormatSnippetList(r,aw.createNodeArray(T),m,l):g.printSnippetList(r,aw.createNodeArray(T),m)}return{insertText:d,filterText:p,isSnippet:u,importAdder:h,eraseRange:x}}function use(e,t,n,r,i,o,a,s){const c=a.includeCompletionsWithSnippetText||void 0;let l=t;const _=n.getSourceFile(),u=function(e,t,n,r,i,o){const a=e.getDeclarations();if(!a||!a.length)return;const s=r.getTypeChecker(),c=a[0],l=aZ(jc(c),!1),_=s.getWidenedType(s.getTypeOfSymbolAtLocation(e,t)),u=sY(n,o),d=33554432|(0===u?268435456:0);switch(c.kind){case 171:case 172:case 173:case 174:{let e=1048576&_.flags&&_.types.length<10?s.getUnionType(_.types,2):_;if(1048576&e.flags){const t=O(e.types,e=>s.getSignaturesOfType(e,0).length>0);if(1!==t.length)return;e=t[0]}if(1!==s.getSignaturesOfType(e,0).length)return;const n=s.typeToTypeNode(e,t,d,Q5.getNoopSymbolTrackerWithResolver({program:r,host:i}));if(!n||!ED(n))return;let a;if(o.includeCompletionsWithSnippetText){const e=aw.createEmptyStatement();a=aw.createBlock([e],!0),Bw(e,{kind:0,order:0})}else a=aw.createBlock([],!0);const c=n.parameters.map(e=>aw.createParameterDeclaration(void 0,e.dotDotDotToken,e.name,void 0,void 0,e.initializer));return aw.createMethodDeclaration(void 0,void 0,l,void 0,void 0,c,void 0,a)}default:return}}(e,n,_,r,i,a);if(!u)return;const d=dse({removeComments:!0,module:o.module,target:o.target,omitTrailingSemicolon:!1,newLine:v0($Y(i,null==s?void 0:s.options))});l=s?d.printAndFormatSnippetList(80,aw.createNodeArray([u],!0),_,s):d.printSnippetList(80,aw.createNodeArray([u],!0),_);const p=xU({removeComments:!0,module:o.module,target:o.target,omitTrailingSemicolon:!0}),f=aw.createMethodSignature(void 0,"",u.questionToken,u.typeParameters,u.parameters,u.type);return{isSnippet:c,insertText:l,labelDetails:{detail:p.printNode(4,f,_)}}}function dse(e){let t;const n=tde.createWriter(Xb(e)),r=xU(e,n),i={...n,write:e=>o(e,()=>n.write(e)),nonEscapingWrite:n.write,writeLiteral:e=>o(e,()=>n.writeLiteral(e)),writeStringLiteral:e=>o(e,()=>n.writeStringLiteral(e)),writeSymbol:(e,t)=>o(e,()=>n.writeSymbol(e,t)),writeParameter:e=>o(e,()=>n.writeParameter(e)),writeComment:e=>o(e,()=>n.writeComment(e)),writeProperty:e=>o(e,()=>n.writeProperty(e))};return{printSnippetList:function(e,n,r){const i=a(e,n,r);return t?tde.applyChanges(i,t):i},printAndFormatSnippetList:function(e,n,r,i){const o={text:a(e,n,r),getLineAndCharacterOfPosition(e){return ns(this,e)}},s=x0(i,r),c=z(n,e=>{const t=tde.assignPositionsToNode(e);return Ede.formatNodeGivenIndentation(t,o,r.languageVariant,0,0,{...i,options:s})}),l=t?Se(ne(c,t),(e,t)=>Ot(e.span,t.span)):c;return tde.applyChanges(o.text,l)},printNode:function(e,n,r){const i=s(e,n,r);return t?tde.applyChanges(i,t):i},printAndFormatNode:function(e,n,r,i){const o={text:s(e,n,r),getLineAndCharacterOfPosition(e){return ns(this,e)}},a=x0(i,r),c=tde.assignPositionsToNode(n),l=Ede.formatNodeGivenIndentation(c,o,r.languageVariant,0,0,{...i,options:a}),_=t?Se(ne(l,t),(e,t)=>Ot(e.span,t.span)):l;return tde.applyChanges(o.text,_)}};function o(e,r){const i=eC(e);if(i!==e){const e=n.getTextPos();r();const o=n.getTextPos();t=pe(t||(t=[]),{newText:i,span:{start:e,length:o-e}})}else r()}function a(e,n,o){return t=void 0,i.clear(),r.writeList(e,n,o,i),i.getText()}function s(e,n,o){return t=void 0,i.clear(),r.writeNode(e,n,o,i),i.getText()}}function pse(e){const t=e.fileName?void 0:Wy(e.moduleSymbol.name),n=!!e.isFromPackageJson||void 0;if(zae(e)){return{exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,ambientModuleName:t,fileName:e.fileName,isPackageJsonImport:n}}return{exportName:e.exportName,exportMapKey:e.exportMapKey,fileName:e.fileName,ambientModuleName:e.fileName?void 0:Wy(e.moduleSymbol.name),isPackageJsonImport:!!e.isFromPackageJson||void 0}}function fse(e,t,n){const r="default"===e.exportName,i=!!e.isPackageJsonImport;if(Gae(e)){return{kind:32,exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}}return{kind:4,exportName:e.exportName,exportMapKey:e.exportMapKey,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}}function mse(e,t,n){return/^\d+$/.test(n)?n:wZ(e,t,n)}function gse(e,t,n){return e===t||!!(1048576&e.flags)&&n.getExportSymbolOfSymbol(e)===t}function hse(e){return Jae(e)?Wy(e.moduleSymbol.name):zae(e)?e.moduleSpecifier:1===(null==e?void 0:e.kind)?"ThisProperty/":64===(null==e?void 0:e.kind)?"TypeOnlyAlias/":void 0}function yse(e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m,g,h,y,v,b,x,S,k,T,C=!1){const w=tr(),N=function(e,t){if(!e)return;const n=xc(e,e=>Hf(e)||Qse(e)||O_(e)?"quit":(mD(e)||fD(e))&&!ND(e.parent)),r=xc(t,e=>Hf(e)||Qse(e)||O_(e)?"quit":eE(e));return n||r}(r,i),D=BZ(a),P=c.getTypeChecker(),E=new Map;for(let _=0;_e.getSourceFile()===i.getSourceFile()));E.set(O,R),se(t,M,Kae,void 0,!0)}return _("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(tr()-w)),{has:e=>E.has(e),add:e=>E.set(e,!0)};function F(e,t){var n;let r=e.flags;if(!QE(i)){if(kE(i.parent))return!0;if(dt(N,eE)&&e.valueDeclaration===N)return!1;const o=e.valueDeclaration??(null==(n=e.declarations)?void 0:n[0]);if(N&&o&&(fD(N)&&fD(o)||mD(N)&&mD(o))){const e=o.pos,t=mD(N)?N.parent.parameters:qD(N.parent)?void 0:N.parent.typeParameters;if(e>=N.pos&&t&&esse(n,a,e)===i.name);return void 0!==y?{type:"literal",literal:y}:v(l,(e,t)=>{const n=p[t],r=Ese(e,OS(s),n,d,c.isJsxIdentifierExpected);return r&&r.name===i.name&&("ClassMemberSnippet/"===i.source&&106500&e.flags||"ObjectLiteralMethodSnippet/"===i.source&&8196&e.flags||hse(n)===i.source||"ObjectLiteralMemberWithComma/"===i.source)?{type:"symbol",symbol:e,location:u,origin:n,contextToken:f,previousToken:m,isJsxInitializer:g,isTypeOnlyLocation:h}:void 0})||{type:"none"}}function bse(e,t,n,r,i,o,a,s,c){const l=e.getTypeChecker(),_=e.getCompilerOptions(),{name:u,source:d,data:p}=i,{previousToken:f,contextToken:m}=Dse(r,n);if(sQ(n,r,f))return rce.getStringLiteralCompletionDetails(u,n,r,f,e,o,c,s);const g=vse(e,t,n,r,i,o,s);switch(g.type){case"request":{const{request:e}=g;switch(e.kind){case 1:return Ule.getJSDocTagNameCompletionDetails(u);case 2:return Ule.getJSDocTagCompletionDetails(u);case 3:return Ule.getJSDocParameterNameCompletionDetails(u);case 4:return ee(e.keywordCompletions,e=>e.name===u)?xse(u,"keyword",5):void 0;default:return Tn.assertNever(e)}}case"symbol":{const{symbol:t,location:i,contextToken:f,origin:m,previousToken:h}=g,{codeActions:y,sourceDisplay:v}=function(e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m){if((null==p?void 0:p.moduleSpecifier)&&_&&Wse(n||_,c).replacementSpan)return{codeActions:void 0,sourceDisplay:[RY(p.moduleSpecifier)]};if("ClassMemberSnippet/"===f){const{importAdder:r,eraseRange:_}=_se(a,o,s,d,e,i,t,l,n,u);if((null==r?void 0:r.hasFixes())||_){return{sourceDisplay:void 0,codeActions:[{changes:tde.ChangeTracker.with({host:a,formatContext:u,preferences:d},e=>{r&&r.writeFixes(e),_&&e.deleteRange(c,_)}),description:(null==r?void 0:r.hasFixes())?b0([Ca.Includes_imports_of_types_referenced_by_0,e]):b0([Ca.Update_modifiers_of_0,e])}]}}}if(Uae(r)){const e=Q5.getPromoteTypeOnlyCompletionAction(c,r.declaration.name,o,a,u,d);return Tn.assertIsDefined(e,"Expected to have a code action for promoting type-only alias"),{codeActions:[e],sourceDisplay:void 0}}if("ObjectLiteralMemberWithComma/"===f&&n){const t=tde.ChangeTracker.with({host:a,formatContext:u,preferences:d},e=>e.insertText(c,n.end,","));if(t)return{sourceDisplay:void 0,codeActions:[{changes:t,description:b0([Ca.Add_missing_comma_for_object_member_completion_0,e])}]}}if(!r||!Jae(r)&&!zae(r))return{codeActions:void 0,sourceDisplay:void 0};const g=r.isFromPackageJson?a.getPackageJsonAutoImportProvider().getTypeChecker():o.getTypeChecker(),{moduleSymbol:h}=r,y=g.getMergedSymbol(kx(i.exportSymbol||i,g)),v=30===(null==n?void 0:n.kind)&&Iu(n.parent),{moduleSpecifier:b,codeAction:x}=Q5.getImportCompletionAction(y,h,null==p?void 0:p.exportMapKey,c,e,v,a,o,u,_&&QN(_)?_.getStart(c):l,d,m);return Tn.assert(!(null==p?void 0:p.moduleSpecifier)||b===p.moduleSpecifier),{sourceDisplay:[RY(b)],codeActions:[x]}}(u,i,f,m,t,e,o,_,n,r,h,a,s,p,d,c);return Sse(t,Wae(m)?m.symbolName:t.name,l,n,i,c,y,v)}case"literal":{const{literal:e}=g;return xse(sse(n,s,e),"string","string"==typeof e?8:7)}case"cases":{const t=rse(m.parent,n,s,e.getCompilerOptions(),o,e,void 0);if(null==t?void 0:t.importAdder.hasFixes()){const{entry:e,importAdder:n}=t,r=tde.ChangeTracker.with({host:o,formatContext:a,preferences:s},n.writeFixes);return{name:e.name,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0,codeActions:[{changes:r,description:b0([Ca.Includes_imports_of_types_referenced_by_0,u])}]}}return{name:u,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return Ase().some(e=>e.name===u)?xse(u,"keyword",5):void 0;default:Tn.assertNever(g)}}function xse(e,t,n){return kse(e,"",t,[EY(e,n)])}function Sse(e,t,n,r,i,o,a,s){const{displayParts:c,documentation:l,symbolKind:_,tags:u}=n.runWithCancellationToken(o,t=>$ue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,r,i,i,7));return kse(t,$ue.getSymbolModifiers(n,e),_,c,l,u,a,s)}function kse(e,t,n,r,i,o,a,s){return{name:e,kindModifiers:t,kind:n,displayParts:r,documentation:i,tags:o,codeActions:a,source:s,sourceDisplay:s}}function Tse(e,t,n,r,i,o,a){const s=vse(e,t,n,r,i,o,a);return"symbol"===s.type?s.symbol:void 0}var Cse=(e=>(e[e.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",e[e.Global=1]="Global",e[e.PropertyAccess=2]="PropertyAccess",e[e.MemberLike=3]="MemberLike",e[e.String=4]="String",e[e.None=5]="None",e))(Cse||{});function wse(e,t,n){const r=n.getAccessibleSymbolChain(e,t,-1,!1);return r?Ne(r):e.parent&&(function(e){var t;return!!(null==(t=e.declarations)?void 0:t.some(e=>307===e.kind))}(e.parent)?e:wse(e.parent,t,n))}function Nse(e,t,n,r,i,o,a,s,c,l){const _=e.getTypeChecker(),u=nse(n,r);let d=tr(),p=YX(n,i);t("getCompletionData: Get current token: "+(tr()-d)),d=tr();const f=yQ(n,i,p);t("getCompletionData: Is inside comment: "+(tr()-d));let m=!1,g=!1,y=!1;if(f){if(vQ(n,i)){if(64===n.text.charCodeAt(i-1))return{kind:1};{const e=kX(i,n);if(!/[^*|\s(/)]/.test(n.text.substring(e,i)))return{kind:2}}}const e=function(e,t){return xc(e,e=>!(!Mu(e)||!wX(e,t))||!!pF(e)&&"quit")}(p,i);if(e){if(e.tagName.pos<=i&&i<=e.tagName.end)return{kind:1};if(JF(e))g=!0;else{const t=function(e){if(function(e){switch(e.kind){case 341:case 348:case 342:case 344:case 346:case 349:case 350:return!0;case 345:return!!e.constraint;default:return!1}}(e)){const t=IF(e)?e.constraint:e.typeExpression;return t&&309===t.kind?t:void 0}if(gF(e)||MF(e))return e.class;return}(e);if(t&&(p=YX(n,i),p&&(yh(p)||348===p.parent.kind&&p.parent.name===p)||(m=ge(t))),!m&&PF(e)&&(Ld(e.name)||e.name.pos<=i&&i<=e.name.end))return{kind:3,tag:e}}}if(!m&&!g)return void t("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}d=tr();const b=!m&&!g&&Bm(n),x=Dse(i,n),S=x.previousToken;let k=x.contextToken;t("getCompletionData: Get previous token: "+(tr()-d));let T,w,N=p,D=!1,P=!1,E=!1,F=!1,A=!1,I=!1,j=XX(n,i),L=0,M=!1,R=0;if(k){const e=Wse(k,n);if(e.keywordCompletion){if(e.isKeywordOnlyCompletion)return{kind:4,keywordCompletions:[(B=e.keywordCompletion,{name:Va(B),kind:"keyword",kindModifiers:"",sortText:Mae.GlobalsOrKeywords})],isNewIdentifierLocation:e.isNewIdentifierLocation};L=function(e){if(156===e)return 8;Tn.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters")}(e.keywordCompletion)}if(e.replacementSpan&&o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText&&(R|=2,w=e,M=e.isNewIdentifierLocation),!e.replacementSpan&&function(e){const r=tr(),o=function(e){return(LN(e)||e_(e))&&(NX(e,i)||i===e.end&&(!!e.isUnterminated||LN(e)))}(e)||function(e){const t=e.parent,r=t.kind;switch(e.kind){case 28:return 260===r||261===(o=e).parent.kind&&!mQ(o,n,_)||243===r||266===r||de(r)||264===r||207===r||265===r||S_(t)&&!!t.typeParameters&&t.typeParameters.end>=e.pos;case 25:case 23:return 207===r;case 59:return 208===r;case 21:return 299===r||de(r);case 19:return 266===r;case 30:return 263===r||231===r||264===r||265===r||v_(r);case 126:return 172===r&&!S_(t.parent);case 26:return 169===r||!!t.parent&&207===t.parent.kind;case 125:case 123:case 124:return 169===r&&!SD(t.parent);case 130:return 276===r||281===r||274===r;case 139:case 153:return!Use(e);case 80:if(276===r&&e===t.name&&"type"===e.text)return!1;if(xc(e.parent,eE)&&function(e,t){return n.getLineEndOfPosition(e.getEnd())S.end))}(e)||function(e){if(9===e.kind){const t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(e)||function(e){if(12===e.kind)return!0;if(32===e.kind&&e.parent){if(j===e.parent&&(286===j.kind||285===j.kind))return!1;if(286===e.parent.kind)return 286!==j.parent.kind;if(287===e.parent.kind||285===e.parent.kind)return!!e.parent.parent&&284===e.parent.parent.kind}return!1}(e)||IN(e);return t("getCompletionsAtPosition: isCompletionListBlocker: "+(tr()-r)),o}(k))return t("Returning an empty list because completion was requested in an invalid position."),L?ese(L,b,le()):void 0;let r=k.parent;if(25===k.kind||29===k.kind)switch(D=25===k.kind,P=29===k.kind,r.kind){case 211:T=r,N=T.expression;if(Ld(Wx(T))||(oP(N)||f_(N))&&N.end===k.pos&&N.getChildCount(n)&&22!==Ee(N.getChildren(n)).kind)return;break;case 166:N=r.left;break;case 267:N=r.name;break;case 205:N=r;break;case 236:N=r.getFirstToken(n),Tn.assert(102===N.kind||105===N.kind);break;default:return}else if(!w){if(r&&211===r.kind&&(k=r,r=r.parent),p.parent===j)switch(p.kind){case 32:284!==p.parent.kind&&286!==p.parent.kind||(j=p);break;case 44:285===p.parent.kind&&(j=p)}switch(r.kind){case 287:44===k.kind&&(F=!0,j=k);break;case 226:if(!Vse(r))break;case 285:case 284:case 286:I=!0,30===k.kind&&(E=!0,j=k);break;case 294:case 293:(20===S.kind||80===S.kind&&291===S.parent.kind)&&(I=!0);break;case 291:if(r.initializer===S&&S.endeY(t?s.getPackageJsonAutoImportProvider():e,s));if(D||P)!function(){U=2;const e=yf(N),t=e&&!N.isTypeOf||Af(N.parent)||mQ(k,n,_),r=HG(N);if(u_(N)||e||rP(N)){const n=sE(N.parent);n&&(M=!0);let i=_.getSymbolAtLocation(N);if(i&&(i=kx(i,_),1920&i.flags)){const a=_.getExportsOfModule(i);Tn.assertEachIsDefined(a,"getExportsOfModule() should all be defined");const s=t=>_.isValidPropertyAccess(e?N:N.parent,t.name),c=e=>Yse(e,_),l=n?e=>{var t;return!!(1920&e.flags)&&!(null==(t=e.declarations)?void 0:t.every(e=>e.parent===N.parent))}:r?e=>c(e)||s(e):t||m?c:s;for(const e of a)l(e)&&W.push(e);if(!t&&!m&&i.declarations&&i.declarations.some(e=>307!==e.kind&&267!==e.kind&&266!==e.kind)){let e=_.getTypeOfSymbolAtLocation(i,N).getNonOptionalType(),t=!1;if(e.isNullableType()){const n=D&&!P&&!1!==o.includeAutomaticOptionalChainCompletions;(n||P)&&(e=e.getNonNullableType(),n&&(t=!0))}ie(e,!!(65536&N.flags),t)}return}}if(!t||Cv(N)){_.tryGetThisTypeAt(N,!1);let e=_.getTypeAtLocation(N).getNonOptionalType();if(t)ie(e.getNonNullableType(),!1,!1);else{let t=!1;if(e.isNullableType()){const n=D&&!P&&!1!==o.includeAutomaticOptionalChainCompletions;(n||P)&&(e=e.getNonNullableType(),n&&(t=!0))}ie(e,!!(65536&N.flags),t)}}}();else if(E)W=_.getJsxIntrinsicTagNamesAt(j),Tn.assertEachIsDefined(W,"getJsxIntrinsicTagNames() should all be defined"),se(),U=1,L=0;else if(F){const e=k.parent.parent.openingElement.tagName,t=_.getSymbolAtLocation(e);t&&(W=[t]),U=1,L=0}else if(!se())return L?ese(L,b,M):void 0;t("getCompletionData: Semantic work: "+(tr()-J));const Z=S&&function(e,t,n,r){const{parent:i}=e;switch(e.kind){case 80:return CZ(e,r);case 64:switch(i.kind){case 260:return r.getContextualType(i.initializer);case 226:return r.getTypeAtLocation(i.left);case 291:return r.getContextualTypeForJsxAttribute(i);default:return}case 105:return r.getContextualType(i);case 84:const o=dt(i,UE);return o?EZ(o,r):void 0;case 19:return!zE(i)||FE(i.parent)||jE(i.parent)?void 0:r.getContextualTypeForJsxAttribute(i.parent);default:const a=lue.getArgumentInfoForCompletions(e,t,n,r);return a?r.getContextualTypeForArgumentAtIndex(a.invocation,a.argumentIndex):NZ(e.kind)&&yP(i)&&NZ(i.operatorToken.kind)?r.getTypeAtLocation(i.left):r.getContextualType(e,4)||r.getContextualType(e)}}(S,i,n,_),te=!dt(S,Ku)&&!I?$(Z&&(Z.isUnion()?Z.types:[Z]),e=>!e.isLiteral()||1024&e.flags?void 0:e.value):[],re=S&&Z&&function(e,t,n){return v(t&&(t.isUnion()?t.types:[t]),t=>{const r=t&&t.symbol;return r&&424&r.flags&&!Ax(r)?wse(r,e,n):void 0})}(S,Z,_);return{kind:0,symbols:W,completionKind:U,isInSnippetScope:y,propertyAccessToConvert:T,isNewIdentifierLocation:M,location:j,keywordFilters:L,literals:te,symbolToOriginInfoMap:H,recommendedCompletion:re,previousToken:S,contextToken:k,isJsxInitializer:A,insideJsDocTagTypeExpression:m,symbolToSortTextMap:K,isTypeOnlyLocation:X,isJsxIdentifierExpected:I,isRightOfOpenTag:E,isRightOfDotOrQuestionDot:D||P,importStatementCompletion:w,hasUnresolvedAutoImports:V,flags:R};function ie(e,t,n){M=!!e.getStringIndexType(),P&&ee(e.getCallSignatures())&&(M=!0);const r=205===N.kind?N:N.parent;if(u)for(const t of e.getApparentProperties())_.isValidPropertyAccessForCompletions(r,e,t)&&oe(t,!1,n);else W.push(...O(zse(e,_),t=>_.isValidPropertyAccessForCompletions(r,e,t)));if(t&&o.includeCompletionsWithInsertText){const t=_.getPromisedTypeOfPromise(e);if(t)for(const e of t.getApparentProperties())_.isValidPropertyAccessForCompletions(r,t,e)&&oe(e,!0,n)}}function oe(t,r,a){var c;const l=v(t.declarations,e=>dt(jc(e),pD));if(l){const r=ae(l.expression),a=r&&_.getSymbolAtLocation(r),f=a&&wse(a,k,_),m=f&&GB(f);if(m&&Bx(G,m)){const t=W.length;W.push(f);const r=f.parent;if(r&&cd(r)&&_.tryGetMemberInModuleExportsAndProperties(f.name,r)===f){const a=Js(Wy(r.name))?null==(c=Pd(r))?void 0:c.fileName:void 0,{moduleSpecifier:l}=(q||(q=Q5.createImportSpecifierResolver(n,e,s,o))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:a,isFromPackageJson:!1,moduleSymbol:r,symbol:f,targetFlags:kx(f,_).flags}],i,OT(j))||{};if(l){const e={kind:p(6),moduleSymbol:r,isDefaultExport:!1,symbolName:f.name,exportName:f.name,fileName:a,moduleSpecifier:l};H[t]=e}}else H[t]={kind:p(2)}}else if(o.includeCompletionsWithInsertText){if(m&&G.has(m))return;d(t),u(t),W.push(t)}}else d(t),u(t),W.push(t);function u(e){(function(e){return!!(e.valueDeclaration&&256&rb(e.valueDeclaration)&&S_(e.valueDeclaration.parent))})(e)&&(K[GB(e)]=Mae.LocalDeclarationPriority)}function d(e){o.includeCompletionsWithInsertText&&(r&&Bx(G,GB(e))?H[W.length]={kind:p(8)}:a&&(H[W.length]={kind:16}))}function p(e){return a?16|e:e}}function ae(e){return QN(e)?e:rP(e)?ae(e.expression):void 0}function se(){const t=function(){const e=function(e){if(!e)return;const t=e.parent;switch(e.kind){case 19:if(ID(t))return t;break;case 27:case 28:case 80:if(171===t.kind&&ID(t.parent))return t.parent}return}(k);if(!e)return 0;const t=(JD(e.parent)?e.parent:void 0)||e,n=qse(t,_);if(!n)return 0;const r=_.getTypeFromTypeNode(t),i=zse(n,_),o=zse(r,_),a=new Set;return o.forEach(e=>a.add(e.escapedName)),W=ne(W,O(i,e=>!a.has(e.escapedName))),U=0,M=!0,1}()||function(){if(26===(null==k?void 0:k.kind))return 0;const t=W.length,a=function(e,t,n){var r;if(e){const{parent:i}=e;switch(e.kind){case 19:case 28:if(nP(i)||YD(i))return i;break;case 42:return bD(i)?dt(i.parent,nP):void 0;case 134:return dt(i.parent,nP);case 80:if("async"===e.text&&KE(e.parent))return e.parent.parent;{if(nP(e.parent.parent)&&(GE(e.parent)||KE(e.parent)&&ns(n,e.getEnd()).line!==ns(n,t).line))return e.parent.parent;const r=xc(i,HE);if((null==r?void 0:r.getLastToken(n))===e&&nP(r.parent))return r.parent}break;default:if((null==(r=i.parent)?void 0:r.parent)&&(bD(i.parent)||kD(i.parent)||TD(i.parent))&&nP(i.parent.parent))return i.parent.parent;if(GE(i)&&nP(i.parent))return i.parent;const o=xc(i,HE);if(59!==e.kind&&(null==o?void 0:o.getLastToken(n))===e&&nP(o.parent))return o.parent}}return}(k,i,n);if(!a)return 0;let l,u;if(U=0,210===a.kind){const e=function(e,t){const n=t.getContextualType(e);if(n)return n;const r=dh(e.parent);if(yP(r)&&64===r.operatorToken.kind&&e===r.left)return t.getTypeAtLocation(r);if(nu(r))return t.getContextualType(r);return}(a,_);if(void 0===e)return 67108864&a.flags?2:0;const t=_.getContextualType(a,4),n=(t||e).getStringIndexType(),r=(t||e).getNumberIndexType();if(M=!!n||!!r,l=Bse(e,t,a,_),u=a.properties,0===l.length&&!r)return 0}else{Tn.assert(206===a.kind),M=!1;const e=py(a.parent);if(!Bf(e))return Tn.fail("Root declaration is not variable-like.");let t=qu(e)||!!Pv(e)||250===e.parent.parent.kind;if(t||169!==e.kind||(nu(e.parent)?t=!!_.getContextualType(e.parent):174!==e.parent.kind&&178!==e.parent.kind||(t=nu(e.parent.parent)&&!!_.getContextualType(e.parent.parent))),t){const e=_.getTypeAtLocation(a);if(!e)return 2;l=_.getPropertiesOfType(e).filter(t=>_.isPropertyAccessible(a,!1,!1,e,t)),u=a.elements}}if(l&&l.length>0){const n=function(e,t){if(0===t.length)return e;const n=new Set,r=new Set;for(const e of t){if(303!==e.kind&&304!==e.kind&&208!==e.kind&&174!==e.kind&&177!==e.kind&&178!==e.kind&&305!==e.kind)continue;if(ge(e))continue;let t;if(GE(e))pe(e,n);else if(eP(e)&&e.propertyName)80===e.propertyName.kind&&(t=e.propertyName.escapedText);else{const n=jc(e);t=n&&Zh(n)?ty(n):void 0}void 0!==t&&r.add(t)}const i=e.filter(e=>!r.has(e.escapedName));return me(n,i),i}(l,Tn.checkDefined(u));W=ne(W,n),fe(),210===a.kind&&o.includeCompletionsWithObjectLiteralMethodSnippets&&o.includeCompletionsWithInsertText&&(function(e){for(let t=e;t{if(!function(e){if(!(8196&e.flags))return!1;return!0}(t))return;const i=Ese(t,OS(r),void 0,0,!1);if(!i)return;const{name:a}=i,l=use(t,a,n,e,s,r,o,c);if(!l)return;const _={kind:128,...l};R|=32,H[W.length]=_,W.push(t)})}(n,a))}return 1}()||(w?(M=!0,ce(),1):0)||function(){if(!k)return 0;const e=19===k.kind||28===k.kind?dt(k.parent,Vx):WQ(k)?dt(k.parent.parent,Vx):void 0;if(!e)return 0;WQ(k)||(L=8);const{moduleSpecifier:t}=275===e.kind?e.parent.parent:e.parent;if(!t)return M=!0,275===e.kind?2:0;const n=_.getSymbolAtLocation(t);if(!n)return M=!0,2;U=3,M=!1;const r=_.getExportsAndPropertiesOfModule(n),i=new Set(e.elements.filter(e=>!ge(e)).map(e=>(e.propertyName||e.name).escapedText)),o=r.filter(e=>"default"!==e.escapedName&&!i.has(e.escapedName));W=ne(W,o),o.length||(L=0);return 1}()||function(){if(void 0===k)return 0;const e=19===k.kind||28===k.kind?dt(k.parent,hE):59===k.kind?dt(k.parent.parent,hE):void 0;if(void 0===e)return 0;const t=new Set(e.elements.map(PC));return W=O(_.getTypeAtLocation(e).getApparentProperties(),e=>!t.has(e.escapedName)),1}()||function(){var e;const t=!k||19!==k.kind&&28!==k.kind?void 0:dt(k.parent,CE);if(!t)return 0;const n=xc(t,fn(QE,sE));return U=5,M=!1,null==(e=n.locals)||e.forEach((e,t)=>{var r,i;W.push(e),(null==(i=null==(r=n.symbol)?void 0:r.exports)?void 0:i.has(t))&&(K[GB(e)]=Mae.OptionalMember)}),1}()||(function(e){if(e){const t=e.parent;switch(e.kind){case 21:case 28:return SD(e.parent)?e.parent:void 0;default:if(_e(e))return t.parent}}}(k)?(U=5,M=!0,L=4,1):0)||function(){const e=function(e,t,n,r){switch(n.kind){case 352:return dt(n.parent,Jx);case 1:const t=dt(Pe(pt(n.parent,QE).statements),Jx);if(t&&!RX(t,20,e))return t;break;case 81:if(dt(n.parent,yD))return xc(n,S_);break;case 80:if(Nc(n))return;if(yD(n.parent)&&n.parent.initializer===n)return;if(Use(n))return xc(n,Jx)}if(!t)return;if(137===n.kind||QN(t)&&yD(t.parent)&&S_(n))return xc(t,S_);switch(t.kind){case 64:return;case 27:case 20:return Use(n)&&n.parent.name===n?n.parent.parent:dt(n,Jx);case 19:case 28:return dt(t.parent,Jx);default:if(Jx(n)){if(ns(e,t.getEnd()).line!==ns(e,r).line)return n;const i=S_(t.parent.parent)?Lse:jse;return i(t.kind)||42===t.kind||QN(t)&&i(Nc(t)??0)?t.parent.parent:void 0}return}}(n,k,j,i);if(!e)return 0;if(U=3,M=!0,L=42===k.kind?0:S_(e)?2:3,!S_(e))return 1;const t=27===k.kind?k.parent.parent:k.parent;let r=x_(t)?rb(t):0;if(80===k.kind&&!ge(k))switch(k.getText()){case"private":r|=2;break;case"static":r|=256;break;case"override":r|=16}xD(t)&&(r|=256);if(!(2&r)){const t=z(S_(e)&&16&r?hn(Dh(e)):Fh(e),t=>{const n=_.getTypeAtLocation(t);return 256&r?(null==n?void 0:n.symbol)&&_.getPropertiesOfType(_.getTypeOfSymbolAtLocation(n.symbol,e)):n&&_.getPropertiesOfType(n)});W=ne(W,function(e,t,n){const r=new Set;for(const e of t){if(172!==e.kind&&174!==e.kind&&177!==e.kind&&178!==e.kind)continue;if(ge(e))continue;if(Vv(e,2))continue;if($v(e)!==!!(256&n))continue;const t=Yh(e.name);t&&r.add(t)}return e.filter(e=>!(r.has(e.escapedName)||!e.declarations||2&Sx(e)||e.valueDeclaration&&o_(e.valueDeclaration)))}(t,e.members,r)),h(W,(e,t)=>{const n=null==e?void 0:e.valueDeclaration;if(n&&x_(n)&&n.name&&pD(n.name)){const n={kind:512,symbolName:_.symbolToString(e)};H[t]=n}})}return 1}()||function(){const e=function(e){if(e){const t=e.parent;switch(e.kind){case 32:case 31:case 44:case 80:case 211:case 292:case 291:case 293:if(t&&(285===t.kind||286===t.kind)){if(32===e.kind){const r=rQ(e.pos,n,void 0);if(!t.typeArguments||r&&44===r.kind)break}return t}if(291===t.kind)return t.parent.parent;break;case 11:if(t&&(291===t.kind||293===t.kind))return t.parent.parent;break;case 20:if(t&&294===t.kind&&t.parent&&291===t.parent.kind)return t.parent.parent.parent;if(t&&293===t.kind)return t.parent.parent}}return}(k),t=e&&_.getContextualType(e.attributes);if(!t)return 0;const r=e&&_.getContextualType(e.attributes,4);return W=ne(W,function(e,t){const n=new Set,r=new Set;for(const e of t)ge(e)||(291===e.kind?n.add(hC(e.name)):JE(e)&&pe(e,r));const i=e.filter(e=>!n.has(e.escapedName));return me(r,i),i}(Bse(t,r,e.attributes,_),e.attributes.properties)),fe(),U=3,M=!1,1}()||(function(){L=function(e){if(e){let t;const n=xc(e.parent,e=>S_(e)?"quit":!(!g_(e)||t!==e.body)||(t=e,!1));return n&&n}}(k)?5:1,U=1,M=le(),S!==k&&Tn.assert(!!S,"Expected 'contextToken' to be defined when different from 'previousToken'.");const e=S!==k?S.getStart():i,t=function(e,t,n){let r=e;for(;r&&!IX(r,t,n);)r=r.parent;return r}(k,e,n)||n;y=function(e){switch(e.kind){case 307:case 228:case 294:case 241:return!0;default:return wu(e)}}(t);const r=2887656|(X?0:111551),a=S&&!OT(S);W=ne(W,_.getSymbolsInScope(t,r)),Tn.assertEachIsDefined(W,"getSymbolsInScope() should all be defined");for(let e=0;ee.getSourceFile()===n)||(K[GB(t)]=Mae.GlobalsOrKeywords),a&&!(111551&t.flags)){const n=t.declarations&&C(t.declarations,Ql);if(n){const t={kind:64,declaration:n};H[e]=t}}}if(o.includeCompletionsWithInsertText&&307!==t.kind){const e=_.tryGetThisTypeAt(t,!1,S_(t.parent)?t:void 0);if(e&&!function(e,t,n){const r=n.resolveName("self",void 0,111551,!1);if(r&&n.getTypeOfSymbolAtLocation(r,t)===e)return!0;const i=n.resolveName("global",void 0,111551,!1);if(i&&n.getTypeOfSymbolAtLocation(i,t)===e)return!0;const o=n.resolveName("globalThis",void 0,111551,!1);if(o&&n.getTypeOfSymbolAtLocation(o,t)===e)return!0;return!1}(e,n,_))for(const t of zse(e,_))H[W.length]={kind:1},W.push(t),K[GB(t)]=Mae.SuggestedClassMembers}ce(),X&&(L=k&&ru(k.parent)?6:7)}(),1);return 1===t}function ce(){var t,r;if(!function(){var t;return!!w||!!o.includeCompletionsForModuleExports&&(!(!n.externalModuleIndicator&&!n.commonJsModuleIndicator)||!!ZQ(e.getCompilerOptions())||(null==(t=e.getSymlinkCache)?void 0:t.call(e).hasAnySymlinks())||!!e.getCompilerOptions().paths||QQ(e))}())return;if(Tn.assert(!(null==a?void 0:a.data),"Should not run 'collectAutoImports' when faster path is available via `data`"),a&&!a.source)return;R|=1;const c=S===k&&w?"":S&&QN(S)?S.text.toLowerCase():"",_=null==(t=s.getModuleSpecifierCache)?void 0:t.call(s),u=O0(n,s,e,o,l),d=null==(r=s.getPackageJsonAutoImportProvider)?void 0:r.call(s),p=a?void 0:XZ(n,o,s);function f(t){const r=dt(t.moduleSymbol.valueDeclaration,QE);if(!r){const r=Wy(t.moduleSymbol.name);return(!zK.nodeCoreModules.has(r)||ln(r,"node:")===y0(n,e))&&(!p||p.allowsImportingAmbientModule(t.moduleSymbol,Y(t.isFromPackageJson)))}return F0(t.isFromPackageJson?d:e,n,r,o,p,Y(t.isFromPackageJson),_)}$ae("collectAutoImports",s,q||(q=Q5.createImportSpecifierResolver(n,e,s,o)),e,i,o,!!w,OT(j),e=>{u.search(n.path,E,(e,t)=>{if(!Es(e,OS(s.getCompilationSettings())))return!1;if(!a&&zh(e))return!1;if(!(X||w||111551&t))return!1;if(X&&!(790504&t))return!1;const n=e.charCodeAt(0);return(!E||!(n<65||n>90))&&(!!a||ece(e,c))},(t,n,r,i)=>{if(a&&!ee(t,e=>a.source===Wy(e.moduleSymbol.name)))return;if(!(t=O(t,f)).length)return;const o=e.tryResolve(t,r)||{};if("failed"===o)return;let s,c=t[0];"skipped"!==o&&({exportInfo:c=t[0],moduleSpecifier:s}=o);const l=1===c.exportKind;!function(e,t){const n=GB(e);if(K[n]===Mae.GlobalsOrKeywords)return;H[W.length]=t,K[n]=w?Mae.LocationPriority:Mae.AutoImportSuggestions,W.push(e)}(l&&Rb(Tn.checkDefined(c.symbol))||Tn.checkDefined(c.symbol),{kind:s?32:4,moduleSpecifier:s,symbolName:n,exportMapKey:i,exportName:2===c.exportKind?"export=":Tn.checkDefined(c.symbol).name,fileName:c.moduleFileName,isDefaultExport:l,moduleSymbol:c.moduleSymbol,isFromPackageJson:c.isFromPackageJson})}),V=e.skippedAny(),R|=e.resolvedAny()?8:0,R|=e.resolvedBeyondLimit()?16:0})}function le(){if(k){const e=k.parent.kind,t=Rse(k);switch(t){case 28:return 213===e||176===e||214===e||209===e||226===e||184===e||210===e;case 21:return 213===e||176===e||214===e||217===e||196===e;case 23:return 209===e||181===e||167===e;case 144:case 145:case 102:return!0;case 25:return 267===e;case 19:return 263===e||210===e;case 64:return 260===e||226===e;case 16:return 228===e;case 17:return 239===e;case 134:return 174===e||304===e;case 42:return 174===e}if(Lse(t))return!0}return!1}function _e(e){return!!e.parent&&mD(e.parent)&&SD(e.parent.parent)&&(c_(e.kind)||yh(e))}function ue(e,t){return 64!==e.kind&&(27===e.kind||!dx(e.end,t,n))}function de(e){return v_(e)&&176!==e}function pe(e,t){const n=e.expression,r=_.getSymbolAtLocation(n),i=r&&_.getTypeOfSymbolAtLocation(r,n),o=i&&i.properties;o&&o.forEach(e=>{t.add(e.name)})}function fe(){W.forEach(e=>{if(16777216&e.flags){const t=GB(e);K[t]=K[t]??Mae.OptionalMember}})}function me(e,t){if(0!==e.size)for(const n of t)e.has(n.name)&&(K[GB(n)]=Mae.MemberDeclaredBySpreadAssignment)}function ge(e){return e.getStart(n)<=i&&i<=e.getEnd()}}function Dse(e,t){const n=rQ(e,t);if(n&&e<=n.end&&(kl(n)||jh(n.kind))){return{contextToken:rQ(n.getFullStart(),t,void 0),previousToken:n}}return{contextToken:n,previousToken:n}}function Pse(e,t,n,r){const i=t.isPackageJsonImport?r.getPackageJsonAutoImportProvider():n,o=i.getTypeChecker(),a=t.ambientModuleName?o.tryFindAmbientModule(t.ambientModuleName):t.fileName?o.getMergedSymbol(Tn.checkDefined(i.getSourceFile(t.fileName)).symbol):void 0;if(!a)return;let s="export="===t.exportName?o.resolveExternalModuleSymbol(a):o.tryGetMemberInModuleExportsAndProperties(t.exportName,a);if(!s)return;return s="default"===t.exportName&&Rb(s)||s,{symbol:s,origin:fse(t,e,a)}}function Ese(e,t,n,r,i){if(function(e){return!!(e&&256&e.kind)}(n))return;const o=function(e){return Jae(e)||zae(e)||Wae(e)}(n)?n.symbolName:e.name;if(void 0===o||1536&e.flags&&Ym(o.charCodeAt(0))||iy(e))return;const a={name:o,needsConvertPropertyAccess:!1};if(Es(o,t,i?1:0)||e.valueDeclaration&&o_(e.valueDeclaration))return a;switch(r){case 3:return Wae(n)?{name:n.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(o),needsConvertPropertyAccess:!1};case 2:case 1:return 32===o.charCodeAt(0)?void 0:{name:o,needsConvertPropertyAccess:!0};case 5:case 4:return a;default:Tn.assertNever(r)}}var Fse=[],Ase=kt(()=>{const e=[];for(let t=83;t<=165;t++)e.push({name:Va(t),kind:"keyword",kindModifiers:"",sortText:Mae.GlobalsOrKeywords});return e});function Ise(e,t){if(!t)return Ose(e);const n=e+8+1;return Fse[n]||(Fse[n]=Ose(e).filter(e=>!function(e){switch(e){case 128:case 133:case 163:case 136:case 138:case 94:case 162:case 119:case 140:case 120:case 142:case 143:case 144:case 145:case 146:case 150:case 151:case 164:case 123:case 124:case 125:case 148:case 154:case 155:case 156:case 158:case 159:return!0;default:return!1}}(Wa(e.name))))}function Ose(e){return Fse[e]||(Fse[e]=Ase().filter(t=>{const n=Wa(t.name);switch(e){case 0:return!1;case 1:return Mse(n)||138===n||144===n||156===n||145===n||128===n||UQ(n)&&157!==n;case 5:return Mse(n);case 2:return Lse(n);case 3:return jse(n);case 4:return c_(n);case 6:return UQ(n)||87===n;case 7:return UQ(n);case 8:return 156===n;default:return Tn.assertNever(e)}}))}function jse(e){return 148===e}function Lse(e){switch(e){case 128:case 129:case 137:case 139:case 153:case 134:case 138:case 164:return!0;default:return l_(e)}}function Mse(e){return 134===e||135===e||160===e||130===e||152===e||156===e||!Rh(e)&&!Lse(e)}function Rse(e){return QN(e)?Nc(e)??0:e.kind}function Bse(e,t,n,r){const i=t&&t!==e,o=!i||3&t.flags?e:r.getUnionType([e,t]),a=function(e,t,n){return e.isUnion()?n.getAllPossiblePropertiesOfTypes(O(e.types,e=>!(402784252&e.flags||n.isArrayLikeType(e)||n.isTypeInvalidDueToUnionDiscriminant(e,t)||n.typeHasCallOrConstructSignatures(e)||e.isClass()&&Jse(e.getApparentProperties())))):e.getApparentProperties()}(o,n,r);return o.isClass()&&Jse(a)?[]:i?O(a,function(e){return!g(e.declarations)||ee(e.declarations,e=>e.parent!==n)}):a}function Jse(e){return ee(e,e=>!!(6&Sx(e)))}function zse(e,t){return e.isUnion()?Tn.checkEachDefined(t.getAllPossiblePropertiesOfTypes(e.types),"getAllPossiblePropertiesOfTypes() should all be defined"):Tn.checkEachDefined(e.getApparentProperties(),"getApparentProperties() should all be defined")}function qse(e,t){if(!e)return;if(A_(e)&&Wu(e.parent))return t.getTypeArgumentConstraint(e);const n=qse(e.parent,t);if(n)switch(e.kind){case 171:return t.getTypeOfPropertyOfContextualType(n,e.symbol.escapedName);case 193:case 187:case 192:return n}}function Use(e){return e.parent&&E_(e.parent)&&Jx(e.parent.parent)}function Vse({left:e}){return Ld(e)}function Wse(e,t){var n,r,i;let o,a=!1;const s=function(){const n=e.parent;if(uE(n)){const r=n.getLastToken(t);return QN(e)&&r!==e?(o=161,void(a=!0)):(o=156===e.kind?void 0:156,Xse(n.moduleReference)?n:void 0)}if(Kse(n,e)&&Gse(n.parent))return n;if(xE(n)||vE(n)){if(n.parent.isTypeOnly||19!==e.kind&&102!==e.kind&&28!==e.kind||(o=156),Gse(n)){if(20!==e.kind&&80!==e.kind)return n.parent.parent;a=!0,o=161}return}if(TE(n)&&42===e.kind||CE(n)&&20===e.kind)return a=!0,void(o=161);if(_D(e)&&QE(n))return o=156,e;if(_D(e)&&dE(n))return o=156,Xse(n.moduleSpecifier)?n:void 0;return}();return{isKeywordOnlyCompletion:a,keywordCompletion:o,isNewIdentifierLocation:!(!s&&156!==o),isTopLevelTypeOnly:!!(null==(r=null==(n=dt(s,dE))?void 0:n.importClause)?void 0:r.isTypeOnly)||!!(null==(i=dt(s,uE))?void 0:i.isTypeOnly),couldBeTypeOnlyImportSpecifier:!!s&&Kse(s,e),replacementSpan:$se(s)}}function $se(e){var t;if(!e)return;const n=xc(e,fn(dE,uE,JF))??e,r=n.getSourceFile();if(ix(n,r))return jQ(n,r);Tn.assert(102!==n.kind&&276!==n.kind);const i=272===n.kind||351===n.kind?Hse(null==(t=n.importClause)?void 0:t.namedBindings)??n.moduleSpecifier:n.moduleReference,o={pos:n.getFirstToken().getStart(),end:i.pos};return ix(o,r)?RQ(o):void 0}function Hse(e){var t;return C(null==(t=dt(e,xE))?void 0:t.elements,t=>{var n;return!t.propertyName&&zh(t.name.text)&&28!==(null==(n=rQ(t.name.pos,e.getSourceFile(),e))?void 0:n.kind)})}function Kse(e,t){return SE(e)&&(e.isTypeOnly||t===e.name&&WQ(t))}function Gse(e){if(!Xse(e.parent.parent.moduleSpecifier)||e.parent.name)return!1;if(xE(e)){const t=Hse(e);return(t?e.elements.indexOf(t):e.elements.length)<2}return!0}function Xse(e){var t;return!!Ld(e)||!(null==(t=dt(EE(e)?e.expression:e,Ku))?void 0:t.text)}function Qse(e){return e.parent&&uP(e.parent)&&(e.parent.body===e||39===e.kind)}function Yse(e,t,n=new Map){return r(e)||r(kx(e.exportSymbol||e,t));function r(e){return!!(788968&e.flags)||t.isUnknownSymbol(e)||!!(1536&e.flags)&&Bx(n,GB(e))&&t.getExportsOfModule(e).some(e=>Yse(e,t,n))}}function Zse(e,t){const n=kx(e,t).declarations;return!!g(n)&&T(n,h0)}function ece(e,t){if(0===t.length)return!0;let n,r=!1,i=0;const o=e.length;for(let a=0;asce,getStringLiteralCompletions:()=>ace});var ice={directory:0,script:1,"external module name":2};function oce(){const e=new Map;return{add:function(t){const n=e.get(t.name);(!n||ice[n.kind]t>=e.pos&&t<=e.end);if(!a)return;const s=e.text.slice(a.pos,t),c=Ece.exec(s);if(!c)return;const[,l,_,u]=c,d=Vo(e.path),p="path"===_?bce(u,d,yce(n,0,e),r,!0,e.path):"types"===_?Pce(r,n,d,Cce(u),yce(n,1,e)):Tn.fail();return gce(u,a.pos+l.length,We(p.values()))}(e,t,r,i);return n&&cce(n)}if(sQ(e,t,n)){if(!n||!Ku(n))return;return function(e,t,n,r,i,o,a,s,c,l){if(void 0===e)return;const _=LQ(t,c);switch(e.kind){case 0:return cce(e.paths);case 1:{const u=[];return yse(e.symbols,u,t,t,n,c,n,r,i,99,o,4,s,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,l),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:e.hasIndexSignature,optionalReplacementSpan:_,entries:u}}case 2:{const n=15===t.kind?96:ln(tp(t),"'")?39:34,r=e.types.map(e=>({name:My(e.value,n),kindModifiers:"",kind:"string",sortText:Mae.LocationPriority,replacementSpan:OQ(t,c)}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:e.isNewIdentifier,optionalReplacementSpan:_,entries:r}}default:return Tn.assertNever(e)}}(_ce(e,n,t,o,i,s),n,e,i,o,a,r,s,t,c)}}function sce(e,t,n,r,i,o,a,s){if(!r||!Ku(r))return;const c=_ce(t,r,n,i,o,s);return c&&function(e,t,n,r,i,o){switch(n.kind){case 0:{const t=C(n.paths,t=>t.name===e);return t&&kse(e,lce(t.extension),t.kind,[RY(e)])}case 1:{const a=C(n.symbols,t=>t.name===e);return a&&Sse(a,a.name,i,r,t,o)}case 2:return C(n.types,t=>t.value===e)?kse(e,"","string",[RY(e)]):void 0;default:return Tn.assertNever(n)}}(e,r,c,t,i.getTypeChecker(),a)}function cce(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:e.map(({name:e,kind:t,span:n,extension:r})=>({name:e,kind:t,kindModifiers:lce(r),sortText:Mae.LocationPriority,replacementSpan:n}))}}function lce(e){switch(e){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".d.mts":return".d.mts";case".mjs":return".mjs";case".mts":return".mts";case".d.cts":return".d.cts";case".cjs":return".cjs";case".cts":return".cts";case".tsbuildinfo":return Tn.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return Tn.assertNever(e)}}function _ce(e,t,n,r,i,o){const a=r.getTypeChecker(),s=uce(t.parent);switch(s.kind){case 201:{const c=uce(s.parent);return 205===c.kind?{kind:0,paths:hce(e,t,r,i,o)}:function e(t){switch(t.kind){case 233:case 183:{const e=xc(s,e=>e.parent===t);return e?{kind:2,types:pce(a.getTypeArgumentConstraint(e)),isNewIdentifier:!1}:void 0}case 199:const{indexType:i,objectType:o}=t;if(!wX(i,n))return;return dce(a.getTypeFromTypeNode(o));case 192:{const n=e(uce(t.parent));if(!n)return;const i=(r=s,$(t.types,e=>e!==r&&KD(e)&&ON(e.literal)?e.literal.text:void 0));return 1===n.kind?{kind:1,symbols:n.symbols.filter(e=>!E(i,e.name)),hasIndexSignature:n.hasIndexSignature}:{kind:2,types:n.types.filter(e=>!E(i,e.value)),isNewIdentifier:!1}}default:return}var r}(c)}case 303:return nP(s.parent)&&s.name===t?function(e,t){const n=e.getContextualType(t);if(!n)return;const r=e.getContextualType(t,4);return{kind:1,symbols:Bse(n,r,t,e),hasIndexSignature:PZ(n)}}(a,s.parent):c()||c(0);case 212:{const{expression:e,argumentExpression:n}=s;return t===mh(n)?dce(a.getTypeAtLocation(e)):void 0}case 213:case 214:case 291:if(!function(e){return oP(e.parent)&&Ce(e.parent.arguments)===e&&QN(e.parent.expression)&&"require"===e.parent.expression.escapedText}(t)&&!gf(s)){const r=lue.getArgumentInfoForCompletions(291===s.kind?s.parent:t,n,e,a);return r&&function(e,t,n,r){let i=!1;const o=new Map,a=Iu(e)?Tn.checkDefined(xc(t.parent,RE)):t,s=z(r.getCandidateSignaturesForStringLiteralCompletions(e,a),t=>{if(!tJ(t)&&n.argumentCount>t.parameters.length)return;let s=t.getTypeParameterAtPosition(n.argumentIndex);if(Iu(e)){const e=r.getTypeOfPropertyOfType(s,yC(a.name));e&&(s=e)}return i=i||!!(4&s.flags),pce(s,o)});return g(s)?{kind:2,types:s,isNewIdentifier:i}:void 0}(r.invocation,t,r,a)||c(0)}case 272:case 278:case 283:case 351:return{kind:0,paths:hce(e,t,r,i,o)};case 296:const l=T0(a,s.parent.clauses),_=c();if(!_)return;return{kind:2,types:_.types.filter(e=>!l.hasValue(e.value)),isNewIdentifier:!1};default:return c()||c(0)}function c(e=4){const n=pce(CZ(t,a,e));if(n.length)return{kind:2,types:n,isNewIdentifier:!1}}}function uce(e){switch(e.kind){case 196:return uh(e);case 217:return dh(e);default:return e}}function dce(e){return e&&{kind:1,symbols:O(e.getApparentProperties(),e=>!(e.valueDeclaration&&o_(e.valueDeclaration))),hasIndexSignature:PZ(e)}}function pce(e,t=new Map){return e?(e=GQ(e)).isUnion()?z(e.types,e=>pce(e,t)):!e.isStringLiteral()||1024&e.flags||!Bx(t,e.value)?p:[e]:p}function fce(e,t,n){return{name:e,kind:t,extension:n}}function mce(e){return fce(e,"directory",void 0)}function gce(e,t,n){const r=function(e,t){const n=Math.max(e.lastIndexOf(wo),e.lastIndexOf(No)),r=-1!==n?n+1:0,i=e.length-r;return 0===i||Es(e.substr(r,i),99)?void 0:tc(t+r,i)}(e,t),i=0===e.length?void 0:tc(t,e.length);return n.map(({name:e,kind:t,extension:n})=>e.includes(wo)||e.includes(No)?{name:e,kind:t,extension:n,span:i}:{name:e,kind:t,extension:n,span:r})}function hce(e,t,n,r,i){return gce(t.text,t.getStart(e)+1,function(e,t,n,r,i){const o=Xo(t.text),a=Ku(t)?n.getModeForUsageLocation(e,t):void 0,s=e.path,c=Vo(s),l=n.getCompilerOptions(),_=n.getTypeChecker(),u=yce(l,1,e,_,i,a);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){const t=e.length>=3&&46===e.charCodeAt(1)?2:1,n=e.charCodeAt(t);return 47===n||92===n}return!1}(o)||!l.baseUrl&&!l.paths&&(Ao(o)||Fo(o))?function(e,t,n,r,i,o){return n.rootDirs?function(e,t,n,r,i,o,a){const s=i.project||o.getCurrentDirectory(),c=!(o.useCaseSensitiveFileNames&&o.useCaseSensitiveFileNames()),l=function(e,t,n,r){e=e.map(e=>aa(na(Ao(e)?e:Yo(t,e))));const i=v(e,e=>ma(e,n,t,r)?n.substr(e.length):void 0);return oe([...e.map(e=>Yo(e,i)),n].map(e=>oa(e)),Ft,Rt)}(e,s,n,c);return oe(z(l,e=>We(bce(t,e,r,o,!0,a).values())),(e,t)=>e.name===t.name&&e.kind===t.kind&&e.extension===t.extension)}(n.rootDirs,e,t,o,n,r,i):We(bce(e,t,o,r,!0,i).values())}(o,c,l,r,s,u):function(e,t,n,r,i,o,a){const{baseUrl:s,paths:c}=r,l=oce(),_=LS(r);if(s){const t=na(Yo(i.getCurrentDirectory(),s));bce(e,t,o,i,!1,void 0,l)}if(c){const t=lv(r,i);Sce(l,e,t,o,i,c)}const u=Cce(e);for(const t of function(e,t,n){const r=n.getAmbientModules().map(e=>Wy(e.name)).filter(t=>ln(t,e)&&!t.includes("*"));if(void 0!==t){const e=aa(t);return r.map(t=>_n(t,e))}return r}(e,u,a))l.add(fce(t,"external module name",void 0));if(Pce(i,r,t,u,o,l),nY(_)){let a=!1;if(void 0===u)for(const e of function(e,t){if(!e.readFile||!e.fileExists)return p;const n=[];for(const r of $Z(t,e)){const t=Wb(r,e);for(const e of Fce){const r=t[e];if(r)for(const e in r)Be(r,e)&&!ln(e,"@types/")&&n.push(e)}}return n}(i,t)){const t=fce(e,"external module name",void 0);l.has(t.name)||(a=!0,l.add(t))}if(!a){let a=t=>{const n=Yo(t,"node_modules");UZ(i,n)&&bce(e,n,o,i,!1,void 0,l)};if(u&&zS(r)){const t=a;a=a=>{const s=Ko(e);s.shift();let c=s.shift();if(!c)return t(a);if(ln(c,"@")){const e=s.shift();if(!e)return t(a);c=Yo(c,e)}const _=Yo(a,"node_modules",c),u=Yo(_,"package.json");if(qZ(i,u)){const t=Wb(u,i).exports;if(t){if("object"!=typeof t||null===t)return;const a=ze(t),c=s.join("/")+(s.length&&Jo(e)?"/":""),u=gM(r,n);return void kce(l,!0,c,_,o,i,a,e=>hn(Tce(t[e],u)),yR)}}return t(a)}}Sa(t,a)}}return We(l.values())}(o,c,a,l,r,u,_)}(e,t,n,r,i))}function yce(e,t,n,r,i,o){return{extensionsToSearch:J(vce(e,r)),referenceKind:t,importingSourceFile:n,endingPreference:null==i?void 0:i.importModuleSpecifierEnding,resolutionMode:o}}function vce(e,t){const n=t?$(t.getAmbientModules(),e=>{const t=e.name.slice(1,-1);if(t.startsWith("*.")&&!t.includes("/"))return t.slice(1)}):[],r=[...Gk(e),n];return nY(LS(e))?Xk(e,r):r}function bce(e,t,n,r,i,o,a=oce()){var s;void 0===e&&(e=""),Jo(e=Xo(e))||(e=Vo(e)),""===e&&(e="."+wo);const c=Zo(t,e=aa(e)),l=Jo(c)?c:Vo(c);if(!i){const e=HZ(l,r);if(e){const t=Wb(e,r).typesVersions;if("object"==typeof t){const i=null==(s=lM(t))?void 0:s.paths;if(i){const t=Vo(e);if(Sce(a,c.slice(aa(t).length),t,n,r,i))return a}}}}const _=!(r.useCaseSensitiveFileNames&&r.useCaseSensitiveFileNames());if(!UZ(r,l))return a;const u=zZ(r,l,n.extensionsToSearch,void 0,["./*"]);if(u)for(let e of u){if(e=na(e),o&&0===fa(e,o,t,_))continue;const{name:i,extension:s}=xce(Wo(e),r.getCompilationSettings(),n,!1);a.add(fce(i,"script",s))}const d=JZ(r,l);if(d)for(const e of d){const t=Wo(na(e));"@types"!==t&&a.add(mce(t))}return a}function xce(e,t,n,r){const i=tB.tryGetRealFileNameForNonJsDeclarationFileName(e);if(i)return{name:i,extension:hT(i)};if(0===n.referenceKind)return{name:e,extension:hT(e)};let o=rB({importModuleSpecifierEnding:n.endingPreference},t,n.importingSourceFile).getAllowedEndingsInPreferredOrder(n.resolutionMode);if(r&&(o=o.filter(e=>0!==e&&1!==e)),3===o[0]){if(Bo(e,Hk))return{name:e,extension:hT(e)};const n=tB.tryGetJSExtensionForFile(e,t);return n?{name:lT(e,n),extension:n}:{name:e,extension:hT(e)}}if(!r&&(0===o[0]||1===o[0])&&Bo(e,[".js",".jsx",".ts",".tsx",".d.ts"]))return{name:aT(e),extension:hT(e)};const a=tB.tryGetJSExtensionForFile(e,t);return a?{name:lT(e,a),extension:a}:{name:e,extension:hT(e)}}function Sce(e,t,n,r,i,o){return kce(e,!1,t,n,r,i,ze(o),e=>o[e],(e,t)=>{const n=_T(e),r=_T(t),i="object"==typeof n?n.prefix.length:e.length;return It("object"==typeof r?r.prefix.length:t.length,i)})}function kce(e,t,n,r,i,o,a,s,c){let l,_=[];for(const e of a){if("."===e)continue;const a=e.replace(/^\.\//,""),u=s(e);if(u){const s=_T(a);if(!s)continue;const d="object"==typeof s&&dn(s,n);d&&(void 0===l||-1===c(e,l))&&(l=e,_=_.filter(e=>!e.matchedPattern)),"string"!=typeof s&&void 0!==l&&1===c(e,l)||_.push({matchedPattern:d,results:wce(a,u,n,r,i,t&&d,o).map(({name:e,kind:t,extension:n})=>fce(e,t,n))})}}return _.forEach(t=>t.results.forEach(t=>e.add(t))),void 0!==l}function Tce(e,t){if("string"==typeof e)return e;if(e&&"object"==typeof e&&!ct(e))for(const n in e)if("default"===n||t.includes(n)||xR(t,n)){return Tce(e[n],t)}}function Cce(e){return Ace(e)?Jo(e)?e:Vo(e):void 0}function wce(e,t,n,r,i,o,a){if(!Xt(e,"*"))return e.includes("*")?p:l(e,"script");const s=e.slice(0,e.length-1),c=un(n,s);if(void 0===c){return"/"===e[e.length-2]?l(s,"directory"):z(t,e=>{var t;return null==(t=Nce("",r,e,i,o,a))?void 0:t.map(({name:e,...t})=>({name:s+e,...t}))})}return z(t,e=>Nce(c,r,e,i,o,a));function l(e,t){return ln(e,n)?[{name:oa(e),kind:t,extension:void 0}]:p}}function Nce(e,t,n,r,i,o){if(!o.readDirectory)return;const a=_T(n);if(void 0===a||_t(a))return;const s=Zo(a.prefix),c=Jo(a.prefix)?s:Vo(s),l=Jo(a.prefix)?"":Wo(s),_=Ace(e),u=_?Jo(e)?e:Vo(e):void 0,d=_?Yo(c,l+u):c,f=na(a.suffix),m=f&&sv("_"+f),g=m?[lT(f,m),f]:[f],h=na(Yo(t,d)),y=_?h:aa(h)+l,b=f?g.map(e=>"**/*"+e):["./*"];return[...$(zZ(o,h,r.extensionsToSearch,void 0,b),e=>{const t=(n=e,v(g,e=>{const t=(r=na(n),o=e,ln(r,i=y)&&Xt(r,o)?r.slice(i.length,r.length-o.length):void 0);var r,i,o;return void 0===t?void 0:Dce(t)}));var n;if(t){if(Ace(t))return mce(Ko(Dce(t))[1]);const{name:e,extension:n}=xce(t,o.getCompilationSettings(),r,i);return fce(e,"script",n)}}),...f?p:$(JZ(o,h),e=>"node_modules"===e?void 0:mce(e))]}function Dce(e){return e[0]===wo?e.slice(1):e}function Pce(e,t,n,r,i,o=oce()){const a=new Map,s=VZ(()=>_M(t,e))||p;for(const e of s)c(e);for(const t of $Z(n,e)){c(Yo(Vo(t),"node_modules/@types"))}return o;function c(n){if(UZ(e,n))for(const s of JZ(e,n)){const c=AR(s);if(!t.types||E(t.types,c))if(void 0===r)a.has(c)||(o.add(fce(c,"external module name",void 0)),a.set(c,!0));else{const t=Yo(n,s),a=fk(r,c,Zy(e));void 0!==a&&bce(a,t,i,e,!1,void 0,o)}}}}var Ece=/^(\/\/\/\s*{const i=t.getSymbolAtLocation(n);if(i){const t=GB(i).toString();let n=r.get(t);n||r.set(t,n=[]),n.push(e)}});return r}(e,n,r);return(o,a,s)=>{const{directImports:c,indirectUsers:l}=function(e,t,n,{exportingModuleSymbol:r,exportKind:i},o,a){const s=$Q(),c=$Q(),l=[],_=!!r.globalExports,u=_?void 0:[];return p(r),{directImports:l,indirectUsers:d()};function d(){if(_)return e;if(r.declarations)for(const e of r.declarations)bp(e)&&t.has(e.getSourceFile().fileName)&&h(e);return u.map(Dd)}function p(e){const t=y(e);if(t)for(const e of t)if(s(e))switch(a&&a.throwIfCancellationRequested(),e.kind){case 213:if(gf(e)){f(e);break}if(!_){const t=e.parent;if(2===i&&260===t.kind){const{name:e}=t;if(80===e.kind){l.push(e);break}}}break;case 80:break;case 271:g(e,e.name,Wv(e,32),!1);break;case 272:case 351:l.push(e);const t=e.importClause&&e.importClause.namedBindings;t&&274===t.kind?g(e,t.name,!1,!0):!_&&Ig(e)&&h(Vce(e));break;case 278:e.exportClause?280===e.exportClause.kind?h(Vce(e),!0):l.push(e):p(Uce(e,o));break;case 205:!_&&e.isTypeOf&&!e.qualifier&&m(e)&&h(e.getSourceFile(),!0),l.push(e);break;default:Tn.failBadSyntaxKind(e,"Unexpected import kind.")}}function f(e){h(xc(e,Wce)||e.getSourceFile(),!!m(e,!0))}function m(e,t=!1){return xc(e,e=>t&&Wce(e)?"quit":bI(e)&&ee(e.modifiers,ZN))}function g(e,t,n,r){if(2===i)r||l.push(e);else if(!_){const r=Vce(e);Tn.assert(307===r.kind||267===r.kind),n||function(e,t,n){const r=n.getSymbolAtLocation(t);return!!Bce(e,e=>{if(!TE(e))return;const{exportClause:t,moduleSpecifier:i}=e;return!i&&t&&CE(t)&&t.elements.some(e=>n.getExportSpecifierLocalTargetSymbol(e)===r)})}(r,t,o)?h(r,!0):h(r)}}function h(e,t=!1){Tn.assert(!_);if(!c(e))return;if(u.push(e),!t)return;const n=o.getMergedSymbol(e.symbol);if(!n)return;Tn.assert(!!(1536&n.flags));const r=y(n);if(r)for(const e of r)GD(e)||h(Vce(e),!0)}function y(e){return n.get(GB(e).toString())}}(e,t,i,a,n,r);return{indirectUsers:l,...Mce(c,o,a.exportKind,n,s)}}}a(Ice,{Core:()=>ele,DefinitionKind:()=>Hce,EntryKind:()=>Kce,ExportKind:()=>jce,FindReferencesUse:()=>tle,ImportExport:()=>Lce,createImportTracker:()=>Oce,findModuleReferences:()=>Rce,findReferenceOrRenameEntries:()=>ole,findReferencedSymbols:()=>nle,getContextNode:()=>Yce,getExportInfo:()=>qce,getImplementationsAtPosition:()=>rle,getImportOrExportSymbol:()=>zce,getReferenceEntriesForNode:()=>ale,getTextSpanOfEntry:()=>hle,isContextWithStartAndEndNode:()=>Xce,isDeclarationOfSymbol:()=>vle,isWriteAccessForReference:()=>yle,nodeEntry:()=>Gce,toContextSpan:()=>Zce,toHighlightSpan:()=>mle,toReferenceEntry:()=>ule,toRenameLocation:()=>_le});var jce=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e))(jce||{}),Lce=(e=>(e[e.Import=0]="Import",e[e.Export=1]="Export",e))(Lce||{});function Mce(e,t,n,r,i){const o=[],a=[];function s(e,t){o.push([e,t])}if(e)for(const t of e)c(t);return{importSearches:o,singleReferences:a};function c(e){if(271===e.kind)return void($ce(e)&&l(e.name));if(80===e.kind)return void l(e);if(205===e.kind){if(e.qualifier){const n=wb(e.qualifier);n.escapedText===Dc(t)&&a.push(n)}else 2===n&&a.push(e.argument.literal);return}if(11!==e.moduleSpecifier.kind)return;if(278===e.kind)return void(e.exportClause&&CE(e.exportClause)&&_(e.exportClause));const{name:o,namedBindings:c}=e.importClause||{name:void 0,namedBindings:void 0};if(c)switch(c.kind){case 274:l(c.name);break;case 275:0!==n&&1!==n||_(c);break;default:Tn.assertNever(c)}if(o&&(1===n||2===n)&&(!i||o.escapedText===_Y(t))){s(o,r.getSymbolAtLocation(o))}}function l(e){2!==n||i&&!u(e.escapedText)||s(e,r.getSymbolAtLocation(e))}function _(e){if(e)for(const n of e.elements){const{name:e,propertyName:o}=n;if(u((o||e).escapedText))if(o)a.push(o),i&&e.escapedText!==t.escapedName||s(e,r.getSymbolAtLocation(e));else{s(e,281===n.kind&&n.propertyName?r.getExportSpecifierLocalTargetSymbol(n):r.getSymbolAtLocation(e))}}}function u(e){return e===t.escapedName||0!==n&&"default"===e}}function Rce(e,t,n){var r;const i=[],o=e.getTypeChecker();for(const a of t){const t=n.valueDeclaration;if(307===(null==t?void 0:t.kind)){for(const n of a.referencedFiles)e.getSourceFileFromReference(a,n)===t&&i.push({kind:"reference",referencingFile:a,ref:n});for(const n of a.typeReferenceDirectives){const o=null==(r=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(n,a))?void 0:r.resolvedTypeReferenceDirective;void 0!==o&&o.resolvedFileName===t.fileName&&i.push({kind:"reference",referencingFile:a,ref:n})}}Jce(a,(e,t)=>{o.getSymbolAtLocation(t)===n&&i.push(my(e)?{kind:"implicit",literal:t,referencingFile:a}:{kind:"import",literal:t})})}return i}function Bce(e,t){return h(307===e.kind?e.statements:e.body.statements,e=>t(e)||Wce(e)&&h(e.body&&e.body.statements,t))}function Jce(e,t){if(e.externalModuleIndicator||void 0!==e.imports)for(const n of e.imports)t(Pg(n),n);else Bce(e,e=>{switch(e.kind){case 278:case 272:{const n=e;n.moduleSpecifier&&ON(n.moduleSpecifier)&&t(n,n.moduleSpecifier);break}case 271:{const n=e;$ce(n)&&t(n,n.moduleReference.expression);break}}})}function zce(e,t,n,r){return r?i():i()||function(){if(!function(e){const{parent:t}=e;switch(t.kind){case 271:return t.name===e&&$ce(t);case 276:return!t.propertyName;case 273:case 274:return Tn.assert(t.name===e),!0;case 208:return zm(e)&&Km(t.parent.parent);default:return!1}}(e))return;let r=n.getImmediateAliasedSymbol(t);if(!r)return;if(r=function(e,t){if(e.declarations)for(const n of e.declarations){if(wE(n)&&!n.propertyName&&!n.parent.parent.moduleSpecifier)return t.getExportSpecifierLocalTargetSymbol(n)||e;if(rP(n)&&ug(n.expression)&&!YN(n.name))return t.getSymbolAtLocation(n);if(KE(n)&&yP(n.parent.parent)&&2===dg(n.parent.parent))return t.getExportSpecifierLocalTargetSymbol(n.name)}return e}(r,n),"export="===r.escapedName&&(r=function(e,t){var n,r;if(2097152&e.flags)return t.getImmediateAliasedSymbol(e);const i=Tn.checkDefined(e.valueDeclaration);if(kE(i))return null==(n=dt(i.expression,vu))?void 0:n.symbol;if(yP(i))return null==(r=dt(i.right,vu))?void 0:r.symbol;if(QE(i))return i.symbol;return}(r,n),void 0===r))return;const i=_Y(r);if(void 0===i||"default"===i||i===t.escapedName)return{kind:0,symbol:r}}();function i(){var i;const{parent:s}=e,c=s.parent;if(t.exportSymbol)return 211===s.kind?(null==(i=t.declarations)?void 0:i.some(e=>e===s))&&yP(c)?_(c,!1):void 0:o(t.exportSymbol,a(s));{const i=function(e,t){const n=eE(e)?e:eP(e)?dc(e):void 0;return n?e.name!==t||$E(n.parent)?void 0:LP(n.parent.parent)?n.parent.parent:void 0:e}(s,e);if(i&&Wv(i,32)){if(uE(i)&&i.moduleReference===e){if(r)return;return{kind:0,symbol:n.getSymbolAtLocation(i.name)}}return o(t,a(i))}if(bE(s))return o(t,0);if(kE(s))return l(s);if(kE(c))return l(c);if(yP(s))return _(s,!0);if(yP(c))return _(c,!0);if(OF(s)||vF(s))return o(t,0)}function l(e){if(!e.symbol.parent)return;const n=e.isExportEquals?2:1;return{kind:1,symbol:t,exportInfo:{exportingModuleSymbol:e.symbol.parent,exportKind:n}}}function _(e,r){let i;switch(dg(e)){case 1:i=0;break;case 2:i=2;break;default:return}const a=r?n.getSymbolAtLocation(Ux(pt(e.left,qx))):t;return a&&o(a,i)}}function o(e,t){const r=qce(e,t,n);return r&&{kind:1,symbol:e,exportInfo:r}}function a(e){return Wv(e,2048)?1:0}}function qce(e,t,n){const r=e.parent;if(!r)return;const i=n.getMergedSymbol(r);return cd(i)?{exportingModuleSymbol:i,exportKind:t}:void 0}function Uce(e,t){return t.getMergedSymbol(Vce(e).symbol)}function Vce(e){if(213===e.kind)return e.getSourceFile();const{parent:t}=e;return 307===t.kind?t:(Tn.assert(268===t.kind),pt(t.parent,Wce))}function Wce(e){return 267===e.kind&&11===e.name.kind}function $ce(e){return 283===e.moduleReference.kind&&11===e.moduleReference.expression.kind}var Hce=(e=>(e[e.Symbol=0]="Symbol",e[e.Label=1]="Label",e[e.Keyword=2]="Keyword",e[e.This=3]="This",e[e.String=4]="String",e[e.TripleSlashReference=5]="TripleSlashReference",e))(Hce||{}),Kce=(e=>(e[e.Span=0]="Span",e[e.Node=1]="Node",e[e.StringLiteral=2]="StringLiteral",e[e.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",e[e.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",e))(Kce||{});function Gce(e,t=1){return{kind:t,node:e.name||e,context:Qce(e)}}function Xce(e){return e&&void 0===e.kind}function Qce(e){if(ku(e))return Yce(e);if(e.parent){if(!ku(e.parent)&&!kE(e.parent)){if(zm(e)){const t=yP(e.parent)?e.parent:qx(e.parent)&&yP(e.parent.parent)&&e.parent.parent.left===e.parent?e.parent.parent:void 0;if(t&&0!==dg(t))return Yce(t)}if(IE(e.parent)||OE(e.parent))return e.parent.parent;if(AE(e.parent)||XP(e.parent)||Ll(e.parent))return e.parent;if(Ku(e)){const t=Eg(e);if(t){const e=xc(t,e=>ku(e)||wu(e)||Mu(e));return ku(e)?Yce(e):e}}const t=xc(e,pD);return t?Yce(t.parent):void 0}return e.parent.name===e||SD(e.parent)||kE(e.parent)||(Xl(e.parent)||eP(e.parent))&&e.parent.propertyName===e||90===e.kind&&Wv(e.parent,2080)?Yce(e.parent):void 0}}function Yce(e){if(e)switch(e.kind){case 260:return tE(e.parent)&&1===e.parent.declarations.length?LP(e.parent.parent)?e.parent.parent:_u(e.parent.parent)?Yce(e.parent.parent):e.parent:e;case 208:return Yce(e.parent.parent);case 276:return e.parent.parent.parent;case 281:case 274:return e.parent.parent;case 273:case 280:return e.parent;case 226:return RP(e.parent)?e.parent:e;case 250:case 249:return{start:e.initializer,end:e.expression};case 303:case 304:return EQ(e.parent)?Yce(xc(e.parent,e=>yP(e)||_u(e))):e;case 255:return{start:C(e.getChildren(e.getSourceFile()),e=>109===e.kind),end:e.caseBlock};default:return e}}function Zce(e,t,n){if(!n)return;const r=Xce(n)?gle(n.start,t,n.end):gle(n,t);return r.start!==e.start||r.length!==e.length?{contextSpan:r}:void 0}var ele,tle=(e=>(e[e.Other=0]="Other",e[e.References=1]="References",e[e.Rename=2]="Rename",e))(tle||{});function nle(e,t,n,r,i){const o=XX(r,i),a={use:1},s=ele.getReferencedSymbolsForNode(i,o,e,n,t,a),c=e.getTypeChecker(),l=ele.getAdjustedNode(o,a),_=function(e){return 90===e.kind||!!vh(e)||bh(e)||137===e.kind&&SD(e.parent)}(l)?c.getSymbolAtLocation(l):void 0;return s&&s.length?$(s,({definition:e,references:n})=>e&&{definition:c.runWithCancellationToken(t,t=>function(e,t,n){const r=(()=>{switch(e.type){case 0:{const{symbol:r}=e,{displayParts:i,kind:o}=lle(r,t,n),a=i.map(e=>e.text).join(""),s=r.declarations&&Ce(r.declarations);return{...cle(s?jc(s)||s:n),name:a,kind:o,displayParts:i,context:Yce(s)}}case 1:{const{node:t}=e;return{...cle(t),name:t.text,kind:"label",displayParts:[EY(t.text,17)]}}case 2:{const{node:t}=e,n=Va(t.kind);return{...cle(t),name:n,kind:"keyword",displayParts:[{text:n,kind:"keyword"}]}}case 3:{const{node:n}=e,r=t.getSymbolAtLocation(n),i=r&&$ue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,r,n.getSourceFile(),vX(n),n).displayParts||[RY("this")];return{...cle(n),name:"this",kind:"var",displayParts:i}}case 4:{const{node:t}=e;return{...cle(t),name:t.text,kind:"var",displayParts:[EY(tp(t),8)]}}case 5:return{textSpan:RQ(e.reference),sourceFile:e.file,name:e.reference.fileName,kind:"string",displayParts:[EY(`"${e.reference.fileName}"`,8)]};default:return Tn.assertNever(e)}})(),{sourceFile:i,textSpan:o,name:a,kind:s,displayParts:c,context:l}=r;return{containerKind:"",containerName:"",fileName:i.fileName,kind:s,name:a,textSpan:o,displayParts:c,...Zce(o,i,l)}}(e,t,o)),references:n.map(e=>function(e,t){const n=ule(e);return t?{...n,isDefinition:0!==e.kind&&vle(e.node,t)}:n}(e,_))}):void 0}function rle(e,t,n,r,i){const o=XX(r,i);let a;const s=ile(e,t,n,o,i);if(211===o.parent.kind||208===o.parent.kind||212===o.parent.kind||108===o.kind)a=s&&[...s];else if(s){const r=at(s),i=new Map;for(;!r.isEmpty();){const o=r.dequeue();if(!Bx(i,KB(o.node)))continue;a=pe(a,o);const s=ile(e,t,n,o.node,o.node.pos);s&&r.enqueue(...s)}}const c=e.getTypeChecker();return M(a,e=>function(e,t){const n=dle(e);if(0!==e.kind){const{node:r}=e;return{...n,...fle(r,t)}}return{...n,kind:"",displayParts:[]}}(e,c))}function ile(e,t,n,r,i){if(307===r.kind)return;const o=e.getTypeChecker();if(304===r.parent.kind){const e=[];return ele.getReferenceEntriesForShorthandPropertyAssignment(r,o,t=>e.push(Gce(t))),e}if(108===r.kind||gm(r.parent)){const e=o.getSymbolAtLocation(r);return e.valueDeclaration&&[Gce(e.valueDeclaration)]}return ale(i,r,e,n,t,{implementations:!0,use:1})}function ole(e,t,n,r,i,o,a){return M(sle(ele.getReferencedSymbolsForNode(i,r,e,n,t,o)),t=>a(t,r,e.getTypeChecker()))}function ale(e,t,n,r,i,o={},a=new Set(r.map(e=>e.fileName))){return sle(ele.getReferencedSymbolsForNode(e,t,n,r,i,o,a))}function sle(e){return e&&z(e,e=>e.references)}function cle(e){const t=e.getSourceFile();return{sourceFile:t,textSpan:gle(pD(e)?e.expression:e,t)}}function lle(e,t,n){const r=ele.getIntersectingMeaningFromDeclarations(n,e),i=e.declarations&&Ce(e.declarations)||n,{displayParts:o,symbolKind:a}=$ue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,i.getSourceFile(),i,i,r);return{displayParts:o,kind:a}}function _le(e,t,n,r,i){return{...dle(e),...r&&ple(e,t,n,i)}}function ule(e){const t=dle(e);if(0===e.kind)return{...t,isWriteAccess:!1};const{kind:n,node:r}=e;return{...t,isWriteAccess:yle(r),isInString:2===n||void 0}}function dle(e){if(0===e.kind)return{textSpan:e.textSpan,fileName:e.fileName};{const t=e.node.getSourceFile(),n=gle(e.node,t);return{textSpan:n,fileName:t.fileName,...Zce(n,t,e.context)}}}function ple(e,t,n,r){if(0!==e.kind&&(QN(t)||Ku(t))){const{node:r,kind:i}=e,o=r.parent,a=t.text,s=KE(o);if(s||dY(o)&&o.name===r&&void 0===o.dotDotDotToken){const e={prefixText:a+": "},t={suffixText:": "+a};if(3===i)return e;if(4===i)return t;if(s){const n=o.parent;return nP(n)&&yP(n.parent)&&ug(n.parent.left)?e:t}return e}if(SE(o)&&!o.propertyName){return E((wE(t.parent)?n.getExportSpecifierLocalTargetSymbol(t.parent):n.getSymbolAtLocation(t)).declarations,o)?{prefixText:a+" as "}:kG}if(wE(o)&&!o.propertyName)return t===e.node||n.getSymbolAtLocation(t)===n.getSymbolAtLocation(e.node)?{prefixText:a+" as "}:{suffixText:" as "+a}}if(0!==e.kind&&AN(e.node)&&qx(e.node.parent)){const e=cY(r);return{prefixText:e,suffixText:e}}return kG}function fle(e,t){const n=t.getSymbolAtLocation(ku(e)&&e.name?e.name:e);return n?lle(n,t,e):210===e.kind?{kind:"interface",displayParts:[IY(21),RY("object literal"),IY(22)]}:231===e.kind?{kind:"local class",displayParts:[IY(21),RY("anonymous local class"),IY(22)]}:{kind:bX(e),displayParts:[]}}function mle(e){const t=dle(e);if(0===e.kind)return{fileName:t.fileName,span:{textSpan:t.textSpan,kind:"reference"}};const n=yle(e.node),r={textSpan:t.textSpan,kind:n?"writtenReference":"reference",isInString:2===e.kind||void 0,...t.contextSpan&&{contextSpan:t.contextSpan}};return{fileName:t.fileName,span:r}}function gle(e,t,n){let r=e.getStart(t),i=(n||e).getEnd();return Ku(e)&&i-r>2&&(Tn.assert(void 0===n),r+=1,i-=1),269===(null==n?void 0:n.kind)&&(i=n.getFullStart()),nc(r,i)}function hle(e){return 0===e.kind?e.textSpan:gle(e.node,e.node.getSourceFile())}function yle(e){const t=vh(e);return!!t&&function(e){if(33554432&e.flags)return!0;switch(e.kind){case 226:case 208:case 263:case 231:case 90:case 266:case 306:case 281:case 273:case 271:case 276:case 264:case 338:case 346:case 291:case 267:case 270:case 274:case 280:case 169:case 304:case 265:case 168:return!0;case 303:return!EQ(e.parent);case 262:case 218:case 176:case 174:case 177:case 178:return!!e.body;case 260:case 172:return!!e.initializer||$E(e.parent);case 173:case 171:case 348:case 341:return!1;default:return Tn.failBadSyntaxKind(e)}}(t)||90===e.kind||wx(e)}function vle(e,t){var n;if(!t)return!1;const r=vh(e)||(90===e.kind?e.parent:bh(e)||137===e.kind&&SD(e.parent)?e.parent.parent:void 0),i=r&&yP(r)?r.left:void 0;return!(!r||!(null==(n=t.declarations)?void 0:n.some(e=>e===r||e===i)))}(e=>{function t(e,t){return 1===t.use?e=KX(e):2===t.use&&(e=GX(e)),e}function n(e,t,n){let r;const i=t.get(e.path)||p;for(const e of i)if(EV(e)){const t=n.getSourceFileByPath(e.file),i=AV(n,e);FV(i)&&(r=pe(r,{kind:0,fileName:t.fileName,textSpan:RQ(i)}))}return r}function r(e,t,n){if(e.parent&&_E(e.parent)){const e=n.getAliasedSymbol(t),r=n.getMergedSymbol(e);if(e!==r)return r}}function i(e,t,n,r,i,a){const c=1536&e.flags&&e.declarations&&C(e.declarations,QE);if(!c)return;const _=e.exports.get("export="),u=s(t,e,!!_,n,a);if(!_||!a.has(c.fileName))return u;const d=t.getTypeChecker();return o(t,u,l(e=kx(_,d),void 0,n,a,d,r,i))}function o(e,...t){let n;for(const r of t)if(r&&r.length)if(n)for(const t of r){if(!t.definition||0!==t.definition.type){n.push(t);continue}const r=t.definition.symbol,i=N(n,e=>!!e.definition&&0===e.definition.type&&e.definition.symbol===r);if(-1===i){n.push(t);continue}const o=n[i];n[i]={definition:o.definition,references:o.references.concat(t.references).sort((t,n)=>{const r=a(e,t),i=a(e,n);if(r!==i)return It(r,i);const o=hle(t),s=hle(n);return o.start!==s.start?It(o.start,s.start):It(o.length,s.length)})}}else n=r;return n}function a(e,t){const n=0===t.kind?e.getSourceFile(t.fileName):t.node.getSourceFile();return e.getSourceFiles().indexOf(n)}function s(e,t,n,r,i){Tn.assert(!!t.valueDeclaration);const o=$(Rce(e,r,t),e=>{if("import"===e.kind){const t=e.literal.parent;if(KD(t)){const e=pt(t.parent,GD);if(n&&!e.qualifier)return}return Gce(e.literal)}if("implicit"===e.kind){return Gce(e.literal.text!==td&&GI(e.referencingFile,e=>2&e.transformFlags?FE(e)||AE(e)||jE(e)?e:void 0:"skip")||e.referencingFile.statements[0]||e.referencingFile)}return{kind:0,fileName:e.referencingFile.fileName,textSpan:RQ(e.ref)}});if(t.declarations)for(const e of t.declarations)switch(e.kind){case 307:break;case 267:i.has(e.getSourceFile().fileName)&&o.push(Gce(e.name));break;default:Tn.assert(!!(33554432&t.flags),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}const a=t.exports.get("export=");if(null==a?void 0:a.declarations)for(const e of a.declarations){const t=e.getSourceFile();if(i.has(t.fileName)){const n=yP(e)&&rP(e.left)?e.left.expression:kE(e)?Tn.checkDefined(RX(e,95,t)):jc(e)||e;o.push(Gce(n))}}return o.length?[{definition:{type:0,symbol:t},references:o}]:p}function c(e){return 148===e.kind&&WD(e.parent)&&148===e.parent.operator}function l(e,t,n,r,i,o,a){const s=t&&function(e,t,n,r){const{parent:i}=t;if(wE(i)&&r)return L(t,e,i,n);return v(e.declarations,r=>{if(!r.parent){if(33554432&e.flags)return;Tn.fail(`Unexpected symbol at ${Tn.formatSyntaxKind(t.kind)}: ${Tn.formatSymbol(e)}`)}return ID(r.parent)&&BD(r.parent.parent)?n.getPropertyOfType(n.getTypeFromTypeNode(r.parent.parent),e.name):void 0})}(e,t,i,!Y(a))||e,c=t?K(t,s):7,l=[],u=new m(n,r,t?function(e){switch(e.kind){case 176:case 137:return 1;case 80:if(S_(e.parent))return Tn.assert(e.parent.name===e),2;default:return 0}}(t):0,i,o,c,a,l),d=Y(a)&&s.declarations?C(s.declarations,wE):void 0;if(d)j(d.name,s,d,u.createSearch(t,e,void 0),u,!0,!0);else if(t&&90===t.kind&&"default"===s.escapedName&&s.parent)M(t,s,u),y(t,s,{exportingModuleSymbol:s.parent,exportKind:1},u);else{const e=u.createSearch(t,s,void 0,{allSearchSymbols:t?V(s,t,i,2===a.use,!!a.providePrefixAndSuffixTextForRename,!!a.implementations):[s]});_(s,u,e)}return l}function _(e,t,n){const r=function(e){const{declarations:t,flags:n,parent:r,valueDeclaration:i}=e;if(i&&(218===i.kind||231===i.kind))return i;if(!t)return;if(8196&n){const e=C(t,e=>Vv(e,2)||o_(e));return e?Oh(e,263):void 0}if(t.some(dY))return;const o=r&&!(262144&e.flags);if(o&&(!cd(r)||r.globalExports))return;let a;for(const e of t){const t=vX(e);if(a&&a!==t)return;if(!t||307===t.kind&&!af(t))return;if(a=t,_P(a)){let e;for(;e=Hg(a);)a=e}}return o?a.getSourceFile():a}(e);if(r)F(r,r.getSourceFile(),n,t,!(QE(r)&&!E(t.sourceFiles,r)));else for(const e of t.sourceFiles)t.cancellationToken.throwIfCancellationRequested(),S(e,n,t)}let u;var d;function f(e){if(!(33555968&e.flags))return;const t=e.declarations&&C(e.declarations,e=>!QE(e)&&!sE(e));return t&&t.symbol}e.getReferencedSymbolsForNode=function(e,a,_,u,d,f={},m=new Set(u.map(e=>e.fileName))){var g,h;if(QE(a=t(a,f))){const t=ble.getReferenceAtPosition(a,e,_);if(!(null==t?void 0:t.file))return;const r=_.getTypeChecker().getMergedSymbol(t.file.symbol);if(r)return s(_,r,!1,u,m);const i=_.getFileIncludeReasons();if(!i)return;return[{definition:{type:5,reference:t.reference,file:a},references:n(t.file,i,_)||p}]}if(!f.implementations){const e=function(e,t,n){if(UQ(e.kind)){if(116===e.kind&&fP(e.parent))return;if(148===e.kind&&!c(e))return;return function(e,t,n,r){const i=z(e,e=>(n.throwIfCancellationRequested(),$(T(e,Va(t),e),e=>{if(e.kind===t&&(!r||r(e)))return Gce(e)})));return i.length?[{definition:{type:2,node:i[0].node},references:i}]:void 0}(t,e.kind,n,148===e.kind?c:void 0)}if(hf(e.parent)&&e.parent.name===e)return function(e,t){const n=z(e,e=>(t.throwIfCancellationRequested(),$(T(e,"meta",e),e=>{const t=e.parent;if(hf(t))return Gce(t)})));return n.length?[{definition:{type:2,node:n[0].node},references:n}]:void 0}(t,n);if(oD(e)&&xD(e.parent))return[{definition:{type:2,node:e},references:[Gce(e)]}];if(cX(e)){const t=aX(e.parent,e.text);return t&&D(t.parent,t)}if(lX(e))return D(e.parent,e);if(xX(e))return function(e,t,n){let r=lm(e,!1,!1),i=256;switch(r.kind){case 174:case 173:if(Kf(r)){i&=ob(r),r=r.parent;break}case 172:case 171:case 176:case 177:case 178:i&=ob(r),r=r.parent;break;case 307:if(tO(r)||U(e))return;case 262:case 218:break;default:return}const o=z(307===r.kind?t:[r.getSourceFile()],e=>(n.throwIfCancellationRequested(),T(e,"this",QE(r)?e:r).filter(e=>{if(!xX(e))return!1;const t=lm(e,!1,!1);if(!vu(t))return!1;switch(r.kind){case 218:case 262:return r.symbol===t.symbol;case 174:case 173:return Kf(r)&&r.symbol===t.symbol;case 231:case 263:case 210:return t.parent&&vu(t.parent)&&r.symbol===t.parent.symbol&&$v(t)===!!i;case 307:return 307===t.kind&&!tO(t)&&!U(e)}}))).map(e=>Gce(e)),a=v(o,e=>mD(e.node.parent)?e.node:void 0);return[{definition:{type:3,node:a||e},references:o}]}(e,t,n);if(108===e.kind)return function(e){let t=pm(e,!1);if(!t)return;let n=256;switch(t.kind){case 172:case 171:case 174:case 173:case 176:case 177:case 178:n&=ob(t),t=t.parent;break;default:return}const r=$(T(t.getSourceFile(),"super",t),e=>{if(108!==e.kind)return;const r=pm(e,!1);return r&&$v(r)===!!n&&r.parent.symbol===t.symbol?Gce(e):void 0});return[{definition:{type:0,symbol:t.symbol},references:r}]}(e);return}(a,u,d);if(e)return e}const y=_.getTypeChecker(),b=y.getSymbolAtLocation(SD(a)&&a.parent.name||a);if(!b){if(!f.implementations&&Ku(a)){if(uY(a)){const e=_.getFileIncludeReasons(),t=null==(h=null==(g=_.getResolvedModuleFromModuleSpecifier(a))?void 0:g.resolvedModule)?void 0:h.resolvedFileName,r=t?_.getSourceFile(t):void 0;if(r)return[{definition:{type:4,node:a},references:n(r,e,_)||p}]}return function(e,t,n,r){const i=UX(e,n),o=z(t,t=>(r.throwIfCancellationRequested(),$(T(t,e.text),r=>{if(Ku(r)&&r.text===e.text){if(!i)return MN(r)&&!ix(r,t)?void 0:Gce(r,2);{const e=UX(r,n);if(i!==n.getStringType()&&(i===e||function(e,t){if(hD(e.parent))return t.getPropertyOfType(t.getTypeAtLocation(e.parent.parent),e.text)}(r,n)))return Gce(r,2)}}})));return[{definition:{type:4,node:e},references:o}]}(a,u,y,d)}return}if("export="===b.escapedName)return s(_,b.parent,!1,u,m);const x=i(b,_,u,d,f,m);if(x&&!(33554432&b.flags))return x;const S=r(a,b,y),k=S&&i(S,_,u,d,f,m);return o(_,x,l(b,a,u,m,y,d,f),k)},e.getAdjustedNode=t,e.getReferencesForFileName=function(e,t,r,i=new Set(r.map(e=>e.fileName))){var o,a;const c=null==(o=t.getSourceFile(e))?void 0:o.symbol;if(c)return(null==(a=s(t,c,!1,r,i)[0])?void 0:a.references)||p;const l=t.getFileIncludeReasons(),_=t.getSourceFile(e);return _&&l&&n(_,l,t)||p},(d=u||(u={}))[d.None=0]="None",d[d.Constructor=1]="Constructor",d[d.Class=2]="Class";class m{constructor(e,t,n,r,i,o,a,s){this.sourceFiles=e,this.sourceFilesSet=t,this.specialSearchKind=n,this.checker=r,this.cancellationToken=i,this.searchMeaning=o,this.options=a,this.result=s,this.inheritsFromCache=new Map,this.markSeenContainingTypeReference=$Q(),this.markSeenReExportRHS=$Q(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}includesSourceFile(e){return this.sourceFilesSet.has(e.fileName)}getImportSearches(e,t){return this.importTracker||(this.importTracker=Oce(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(e,t,2===this.options.use)}createSearch(e,t,n,r={}){const{text:i=Wy(Dc(Rb(t)||f(t)||t)),allSearchSymbols:o=[t]}=r,a=Tc(i),s=this.options.implementations&&e?function(e,t,n){const r=pX(e)?e.parent:void 0,i=r&&n.getTypeAtLocation(r.expression),o=$(i&&(i.isUnionOrIntersection()?i.types:i.symbol===t.parent?void 0:[i]),e=>e.symbol&&96&e.symbol.flags?e.symbol:void 0);return 0===o.length?void 0:o}(e,t,this.checker):void 0;return{symbol:t,comingFrom:n,text:i,escapedText:a,parents:s,allSearchSymbols:o,includes:e=>E(o,e)}}referenceAdder(e){const t=GB(e);let n=this.symbolIdToReferences[t];return n||(n=this.symbolIdToReferences[t]=[],this.result.push({definition:{type:0,symbol:e},references:n})),(e,t)=>n.push(Gce(e,t))}addStringOrCommentReference(e,t){this.result.push({definition:void 0,references:[{kind:0,fileName:e,textSpan:t}]})}markSearchedSymbols(e,t){const n=KB(e),r=this.sourceFileToSeenSymbols[n]||(this.sourceFileToSeenSymbols[n]=new Set);let i=!1;for(const e of t)i=X(r,GB(e))||i;return i}}function y(e,t,n,r){const{importSearches:i,singleReferences:o,indirectUsers:a}=r.getImportSearches(t,n);if(o.length){const e=r.referenceAdder(t);for(const t of o)b(t,r)&&e(t)}for(const[e,t]of i)P(e.getSourceFile(),r.createSearch(e,t,1),r);if(a.length){let i;switch(n.exportKind){case 0:i=r.createSearch(e,t,1);break;case 1:i=2===r.options.use?void 0:r.createSearch(e,t,1,{text:"default"})}if(i)for(const e of a)S(e,i,r)}}function b(e,t){return!!A(e,t)&&(2!==t.options.use||!!QN(e)&&!(Xl(e.parent)&&"default"===e.escapedText))}function x(e,t){if(e.declarations)for(const n of e.declarations){const r=n.getSourceFile();P(r,t.createSearch(n,e,0),t,t.includesSourceFile(r))}}function S(e,t,n){void 0!==k5(e).get(t.escapedText)&&P(e,t,n)}function k(e,t,n,r,i=n){const o=lc(e.parent,e.parent.parent)?Ne(t.getSymbolsOfParameterPropertyDeclaration(e.parent,e.text)):t.getSymbolAtLocation(e);if(o)for(const a of T(n,o.name,i)){if(!QN(a)||a===e||a.escapedText!==e.escapedText)continue;const n=t.getSymbolAtLocation(a);if(n===o||t.getShorthandAssignmentValueSymbol(a.parent)===o||wE(a.parent)&&L(a,n,a.parent,t)===o){const e=r(a);if(e)return e}}}function T(e,t,n=e){return $(w(e,t,n),t=>{const n=XX(e,t);return n===e?void 0:n})}function w(e,t,n=e){const r=[];if(!t||!t.length)return r;const i=e.text,o=i.length,a=t.length;let s=i.indexOf(t,n.pos);for(;s>=0&&!(s>n.end);){const e=s+a;0!==s&&Ps(i.charCodeAt(s-1),99)||e!==o&&Ps(i.charCodeAt(e),99)||r.push(s),s=i.indexOf(t,s+a+1)}return r}function D(e,t){const n=e.getSourceFile(),r=t.text,i=$(T(n,r,e),e=>e===t||cX(e)&&aX(e,r)===t?Gce(e):void 0);return[{definition:{type:1,node:t},references:i}]}function P(e,t,n,r=!0){return n.cancellationToken.throwIfCancellationRequested(),F(e,e,t,n,r)}function F(e,t,n,r,i){if(r.markSearchedSymbols(t,n.allSearchSymbols))for(const o of w(t,n.text,e))I(t,o,n,r,i)}function A(e,t){return!!($G(e)&t.searchMeaning)}function I(e,t,n,r,i){const o=XX(e,t);if(!function(e,t){switch(e.kind){case 81:if(tF(e.parent))return!0;case 80:return e.text.length===t.length;case 15:case 11:{const n=e;return(hX(n)||mX(e)||yX(e)||oP(e.parent)&&pg(e.parent)&&e.parent.arguments[1]===e)&&n.text.length===t.length}case 9:return hX(e)&&e.text.length===t.length;case 90:return 7===t.length;default:return!1}}(o,n.text))return void(!r.options.implementations&&(r.options.findInStrings&&sQ(e,t)||r.options.findInComments&&AQ(e,t))&&r.addStringOrCommentReference(e.fileName,tc(t,n.text.length)));if(!A(o,r))return;let a=r.checker.getSymbolAtLocation(o);if(!a)return;const s=o.parent;if(SE(s)&&s.propertyName===o)return;if(wE(s))return Tn.assert(80===o.kind),void j(o,a,s,n,r,i);if(Rl(s)&&s.isNameFirst&&s.typeExpression&&fF(s.typeExpression.type)&&s.typeExpression.type.jsDocPropertyTags&&g(s.typeExpression.type.jsDocPropertyTags))return void function(e,t,n,r){const i=r.referenceAdder(n.symbol);M(t,n.symbol,r),h(e,e=>{dD(e.name)&&i(e.name.left)})}(s.typeExpression.type.jsDocPropertyTags,o,n,r);const c=function(e,t,n,r){const{checker:i}=r;return W(t,n,i,!1,2!==r.options.use||!!r.options.providePrefixAndSuffixTextForRename,(n,r,i,o)=>(i&&H(t)!==H(i)&&(i=void 0),e.includes(i||r||n)?{symbol:!r||6&xx(n)?n:r,kind:o}:void 0),t=>!(e.parents&&!e.parents.some(e=>q(t.parent,e,r.inheritsFromCache,i))))}(n,a,o,r);if(c){switch(r.specialSearchKind){case 0:i&&M(o,c,r);break;case 1:!function(e,t,n,r){GG(e)&&M(e,n.symbol,r);const i=()=>r.referenceAdder(n.symbol);if(S_(e.parent))Tn.assert(90===e.kind||e.parent.name===e),function(e,t,n){const r=R(e);if(r&&r.declarations)for(const e of r.declarations){const r=RX(e,137,t);Tn.assert(176===e.kind&&!!r),n(r)}e.exports&&e.exports.forEach(e=>{const t=e.valueDeclaration;if(t&&174===t.kind){const e=t.body;e&&Q(e,110,e=>{GG(e)&&n(e)})}})}(n.symbol,t,i());else{const t=vb(iX(e).parent);t&&(function(e,t){const n=R(e.symbol);if(!n||!n.declarations)return;for(const e of n.declarations){Tn.assert(176===e.kind);const n=e.body;n&&Q(n,108,e=>{KG(e)&&t(e)})}}(t,i()),function(e,t){if(function(e){return!!R(e.symbol)}(e))return;const n=e.symbol,r=t.createSearch(void 0,n,void 0);_(n,t,r)}(t,r))}}(o,e,n,r);break;case 2:!function(e,t,n){M(e,t.symbol,n);const r=e.parent;if(2===n.options.use||!S_(r))return;Tn.assert(r.name===e);const i=n.referenceAdder(t.symbol);for(const e of r.members)w_(e)&&$v(e)&&e.body&&e.body.forEachChild(function e(t){110===t.kind?i(t):f_(t)||S_(t)||t.forEachChild(e)})}(o,n,r);break;default:Tn.assertNever(r.specialSearchKind)}zm(o)&&eP(o.parent)&&Km(o.parent.parent.parent)&&(a=o.parent.symbol,!a)||function(e,t,n,r){const i=zce(e,t,r.checker,1===n.comingFrom);if(!i)return;const{symbol:o}=i;0===i.kind?Y(r.options)||x(o,r):y(e,o,i.exportInfo,r)}(o,a,n,r)}else!function({flags:e,valueDeclaration:t},n,r){const i=r.checker.getShorthandAssignmentValueSymbol(t),o=t&&jc(t);33554432&e||!o||!n.includes(i)||M(o,i,r)}(a,n,r)}function j(e,t,n,r,i,o,a){Tn.assert(!a||!!i.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");const{parent:s,propertyName:c,name:l}=n,_=s.parent,u=L(e,t,n,i.checker);if(a||r.includes(u)){if(c?e===c?(_.moduleSpecifier||d(),o&&2!==i.options.use&&i.markSeenReExportRHS(l)&&M(l,Tn.checkDefined(n.symbol),i)):i.markSeenReExportRHS(e)&&d():2===i.options.use&&"default"===l.escapedText||d(),!Y(i.options)||a){const t="default"===e.escapedText||"default"===n.name.escapedText?1:0,r=Tn.checkDefined(n.symbol),o=qce(r,t,i.checker);o&&y(e,r,o,i)}if(1!==r.comingFrom&&_.moduleSpecifier&&!c&&!Y(i.options)){const e=i.checker.getExportSpecifierLocalTargetSymbol(n);e&&x(e,i)}}function d(){o&&M(e,u,i)}}function L(e,t,n,r){return function(e,t){const{parent:n,propertyName:r,name:i}=t;return Tn.assert(r===e||i===e),r?r===e:!n.parent.moduleSpecifier}(e,n)&&r.getExportSpecifierLocalTargetSymbol(n)||t}function M(e,t,n){const{kind:r,symbol:i}="kind"in t?t:{kind:void 0,symbol:t};if(2===n.options.use&&90===e.kind)return;const o=n.referenceAdder(i);n.options.implementations?function(e,t,n){if(yh(e)&&(r=e.parent,33554432&r.flags?!iE(r)&&!oE(r):Bf(r)?qu(r):g_(r)?r.body:S_(r)||yu(r)))return void t(e);var r;if(80!==e.kind)return;304===e.parent.kind&&G(e,n.checker,t);const i=B(e);if(i)return void t(i);const o=xc(e,e=>!dD(e.parent)&&!A_(e.parent)&&!P_(e.parent)),a=o.parent;if(zu(a)&&a.type===o&&n.markSeenContainingTypeReference(a))if(qu(a))s(a.initializer);else if(f_(a)&&a.body){const e=a.body;241===e.kind?jf(e,e=>{e.expression&&s(e.expression)}):s(e)}else ru(a)&&s(a.expression);function s(e){J(e)&&t(e)}}(e,o,n):o(e,r)}function R(e){return e.members&&e.members.get("__constructor")}function B(e){return QN(e)||rP(e)?B(e.parent):CP(e)?dt(e.parent.parent,fn(S_,iE)):void 0}function J(e){switch(e.kind){case 217:return J(e.expression);case 219:case 218:case 210:case 231:case 209:return!0;default:return!1}}function q(e,t,n,r){if(e===t)return!0;const i=GB(e)+","+GB(t),o=n.get(i);if(void 0!==o)return o;n.set(i,!1);const a=!!e.declarations&&e.declarations.some(e=>Fh(e).some(e=>{const i=r.getTypeAtLocation(e);return!!i&&!!i.symbol&&q(i.symbol,t,n,r)}));return n.set(i,a),a}function U(e){return 80===e.kind&&169===e.parent.kind&&e.parent.name===e}function V(e,t,n,r,i,o){const a=[];return W(e,t,n,r,!(r&&i),(t,n,r)=>{r&&H(e)!==H(r)&&(r=void 0),a.push(r||n||t)},()=>!o),a}function W(e,t,n,i,o,a,s){const c=T5(t);if(c){const e=n.getShorthandAssignmentValueSymbol(t.parent);if(e&&i)return a(e,void 0,void 0,3);const r=n.getContextualType(c.parent),o=r&&v(C5(c,n,r,!0),e=>d(e,4));if(o)return o;const s=function(e,t){return EQ(e.parent.parent)?t.getPropertySymbolOfDestructuringAssignment(e):void 0}(t,n),l=s&&a(s,void 0,void 0,4);if(l)return l;const _=e&&a(e,void 0,void 0,3);if(_)return _}const l=r(t,e,n);if(l){const e=a(l,void 0,void 0,1);if(e)return e}const _=d(e);if(_)return _;if(e.valueDeclaration&&lc(e.valueDeclaration,e.valueDeclaration.parent)){const t=n.getSymbolsOfParameterPropertyDeclaration(pt(e.valueDeclaration,mD),e.name);return Tn.assert(2===t.length&&!!(1&t[0].flags)&&!!(4&t[1].flags)),d(1&e.flags?t[1]:t[0])}const u=id(e,281);if(!i||u&&!u.propertyName){const e=u&&n.getExportSpecifierLocalTargetSymbol(u);if(e){const t=a(e,void 0,void 0,1);if(t)return t}}if(!i){let r;return r=o?dY(t.parent)?pY(n,t.parent):void 0:p(e,n),r&&d(r,4)}Tn.assert(i);if(o){const t=p(e,n);return t&&d(t,4)}function d(e,t){return v(n.getRootSymbols(e),r=>a(e,r,void 0,t)||(r.parent&&96&r.parent.flags&&s(r)?function(e,t,n,r){const i=new Map;return o(e);function o(e){if(96&e.flags&&Bx(i,GB(e)))return v(e.declarations,e=>v(Fh(e),e=>{const i=n.getTypeAtLocation(e),a=i&&i.symbol&&n.getPropertyOfType(i,t);return i&&a&&(v(n.getRootSymbols(a),r)||o(i.symbol))}))}}(r.parent,r.name,n,n=>a(e,r,n,t)):void 0))}function p(e,t){const n=id(e,208);if(n&&dY(n))return pY(t,n)}}function H(e){if(!e.valueDeclaration)return!1;return!!(256&rb(e.valueDeclaration))}function K(e,t){let n=$G(e);const{declarations:r}=t;if(r){let e;do{e=n;for(const e of r){const t=WG(e);t&n&&(n|=t)}}while(n!==e)}return n}function G(e,t,n){const r=t.getSymbolAtLocation(e),i=t.getShorthandAssignmentValueSymbol(r.valueDeclaration);if(i)for(const e of i.getDeclarations())1&WG(e)&&n(e)}function Q(e,t,n){KI(e,e=>{e.kind===t&&n(e),Q(e,t,n)})}function Y(e){return 2===e.use&&e.providePrefixAndSuffixTextForRename}e.eachExportReference=function(e,t,n,r,i,o,a,s){const c=Oce(e,new Set(e.map(e=>e.fileName)),t,n),{importSearches:l,indirectUsers:_,singleReferences:u}=c(r,{exportKind:a?1:0,exportingModuleSymbol:i},!1);for(const[e]of l)s(e);for(const e of u)QN(e)&&GD(e.parent)&&s(e);for(const e of _)for(const n of T(e,a?"default":o)){const e=t.getSymbolAtLocation(n),i=ee(null==e?void 0:e.declarations,e=>!!dt(e,kE));!QN(n)||Xl(n.parent)||e!==r&&!i||s(n)}},e.isSymbolReferencedInFile=function(e,t,n,r=n){return k(e,t,n,()=>!0,r)||!1},e.eachSymbolReferenceInFile=k,e.getTopMostDeclarationNamesInFile=function(e,t){return O(T(t,e),e=>!!vh(e)).reduce((e,t)=>{const n=function(e){let t=0;for(;e;)e=vX(e),t++;return t}(t);return ee(e.declarationNames)&&n!==e.depth?ne===i)&&r(t,a))return!0}return!1},e.getIntersectingMeaningFromDeclarations=K,e.getReferenceEntriesForShorthandPropertyAssignment=G})(ele||(ele={}));var ble={};function xle(e,t,n,r,i){var o;const a=kle(t,n,e),s=a&&[(c=a.reference.fileName,l=a.fileName,_=a.unverified,{fileName:l,textSpan:nc(0,0),kind:"script",name:c,containerName:void 0,containerKind:void 0,unverified:_})]||p;var c,l,_;if(null==a?void 0:a.file)return s;const u=XX(t,n);if(u===t)return;const{parent:d}=u,f=e.getTypeChecker();if(164===u.kind||QN(u)&&TF(d)&&d.tagName===u)return function(e,t){const n=xc(t,x_);if(!n||!n.name)return;const r=xc(n,S_);if(!r)return;const i=Dh(r);if(!i)return;const o=mh(i.expression),a=kP(o)?o.symbol:e.getSymbolAtLocation(o);if(!a)return;const s=Cc(qp(n.name)),c=Hv(n)?e.getPropertyOfType(e.getTypeOfSymbol(a),s):e.getPropertyOfType(e.getDeclaredTypeOfSymbol(a),s);if(!c)return;return Fle(e,c,t)}(f,u)||p;if(cX(u)){const e=aX(u.parent,u.text);return e?[Ile(f,e,"label",u.text,void 0)]:void 0}switch(u.kind){case 107:const e=xc(u.parent,e=>xD(e)?"quit":g_(e));return e?[Lle(f,e)]:void 0;case 90:if(!VE(u.parent))break;case 84:const n=xc(u.parent,GP);if(n)return[Ole(n,t)]}if(135===u.kind){const e=xc(u,e=>g_(e));return e&&ee(e.modifiers,e=>134===e.kind)?[Lle(f,e)]:void 0}if(127===u.kind){const e=xc(u,e=>g_(e));return e&&e.asteriskToken?[Lle(f,e)]:void 0}if(oD(u)&&xD(u.parent)){const e=u.parent.parent,{symbol:t,failedAliasResolution:n}=Ele(e,f,i),r=O(e.members,xD),o=t?f.symbolToString(t,e):"",a=u.getSourceFile();return M(r,e=>{let{pos:t}=tx(e);return t=ds(a.text,t),Ile(f,e,"constructor","static {}",o,!1,n,{start:t,length:6})})}let{symbol:m,failedAliasResolution:g}=Ele(u,f,i),y=u;if(r&&g){const e=h([u,...(null==m?void 0:m.declarations)||p],e=>xc(e,Ep)),t=e&&Dg(e);t&&(({symbol:m,failedAliasResolution:g}=Ele(t,f,i)),y=t)}if(!m&&uY(y)){const n=null==(o=e.getResolvedModuleFromModuleSpecifier(y,t))?void 0:o.resolvedModule;if(n)return[{name:y.text,fileName:n.resolvedFileName,containerName:void 0,containerKind:void 0,kind:"script",textSpan:tc(0,0),failedAliasResolution:g,isAmbient:lO(n.resolvedFileName),unverified:y!==u}]}if(!m)return ne(s,function(e,t){return $(t.getIndexInfosAtLocation(e),e=>e.declaration&&Lle(t,e.declaration))}(u,f));if(r&&T(m.declarations,e=>e.getSourceFile().fileName===t.fileName))return;const v=function(e,t){const n=function(e){const t=xc(e,e=>!pX(e)),n=null==t?void 0:t.parent;return n&&H_(n)&&xm(n)===t?n:void 0}(t),r=n&&e.getResolvedSignature(n);return dt(r&&r.declaration,e=>f_(e)&&!ED(e))}(f,u);if(v&&(!Iu(u.parent)||!function(e){switch(e.kind){case 176:case 185:case 179:case 180:return!0;default:return!1}}(v))){const e=Lle(f,v,g);if(f.getRootSymbols(m).some(e=>function(e,t){var n;return e===t.symbol||e===t.symbol.parent||xb(t.parent)||!H_(t.parent)&&e===(null==(n=dt(t.parent,vu))?void 0:n.symbol)}(e,v)))return[e];{const t=Fle(f,m,u,g,v)||p;return 108===u.kind?[e,...t]:[...t,e]}}if(304===u.parent.kind){const e=f.getShorthandAssignmentValueSymbol(m.valueDeclaration);return ne((null==e?void 0:e.declarations)?e.declarations.map(t=>Ale(t,f,e,u,!1,g)):p,Sle(f,u))}if(d_(u)&&eP(d)&&YD(d.parent)&&u===(d.propertyName||d.name)){const e=XQ(u),t=f.getTypeAtLocation(d.parent);return void 0===e?p:z(t.isUnion()?t.types:[t],t=>{const n=t.getProperty(e);return n&&Fle(f,n,u)})}const b=Sle(f,u);return ne(s,b.length?b:Fle(f,m,u,g))}function Sle(e,t){const n=T5(t);if(n){const r=n&&e.getContextualType(n.parent);if(r)return z(C5(n,e,r,!1),n=>Fle(e,n,t))}return p}function kle(e,t,n){var r,i;const o=Mle(e.referencedFiles,t);if(o){const t=n.getSourceFileFromReference(e,o);return t&&{reference:o,fileName:t.fileName,file:t,unverified:!1}}const a=Mle(e.typeReferenceDirectives,t);if(a){const t=null==(r=n.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a,e))?void 0:r.resolvedTypeReferenceDirective,i=t&&n.getSourceFile(t.resolvedFileName);return i&&{reference:a,fileName:i.fileName,file:i,unverified:!1}}const s=Mle(e.libReferenceDirectives,t);if(s){const e=n.getLibFileFromReference(s);return e&&{reference:s,fileName:e.fileName,file:e,unverified:!1}}if(e.imports.length||e.moduleAugmentations.length){const r=QX(e,t);let o;if(uY(r)&&Js(r.text)&&(o=n.getResolvedModuleFromModuleSpecifier(r,e))){const t=null==(i=o.resolvedModule)?void 0:i.resolvedFileName,a=t||Zo(Vo(e.fileName),r.text);return{file:n.getSourceFile(a),fileName:a,reference:{pos:r.getStart(),end:r.getEnd(),fileName:r.text},unverified:!t}}}}a(ble,{createDefinitionInfo:()=>Ale,findReferenceInPosition:()=>Mle,getDefinitionAndBoundSpan:()=>Ple,getDefinitionAtPosition:()=>xle,getReferenceAtPosition:()=>kle,getTypeDefinitionAtPosition:()=>Nle});var Tle=new Set(["Array","ArrayLike","ReadonlyArray","Promise","PromiseLike","Iterable","IterableIterator","AsyncIterable","Set","WeakSet","ReadonlySet","Map","WeakMap","ReadonlyMap","Partial","Required","Readonly","Pick","Omit"]);function Cle(e,t){if(!t.aliasSymbol)return!1;const n=t.aliasSymbol.name;if(!Tle.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.aliasSymbol}function wle(e,t,n,r){var i,o;if(4&Ox(t)&&function(e,t){const n=t.symbol.name;if(!Tle.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.target.symbol}(e,t))return Dle(e.getTypeArguments(t)[0],e,n,r);if(Cle(e,t)&&t.aliasTypeArguments)return Dle(t.aliasTypeArguments[0],e,n,r);if(32&Ox(t)&&t.target&&Cle(e,t.target)){const a=null==(o=null==(i=t.aliasSymbol)?void 0:i.declarations)?void 0:o[0];if(a&&oE(a)&&PD(a.type)&&a.type.typeArguments)return Dle(e.getTypeAtLocation(a.type.typeArguments[0]),e,n,r)}return[]}function Nle(e,t,n){const r=XX(t,n);if(r===t)return;if(hf(r.parent)&&r.parent.name===r)return Dle(e.getTypeAtLocation(r.parent),e,r.parent,!1);const{symbol:i,failedAliasResolution:o}=Ele(r,e,!1);if(!i)return;const a=e.getTypeOfSymbolAtLocation(i,r),s=function(e,t,n){if(t.symbol===e||e.valueDeclaration&&t.symbol&&eE(e.valueDeclaration)&&e.valueDeclaration.initializer===t.symbol.valueDeclaration){const e=t.getCallSignatures();if(1===e.length)return n.getReturnTypeOfSignature(Ne(e))}return}(i,a,e),c=s&&Dle(s,e,r,o),[l,_]=c&&0!==c.length?[s,c]:[a,Dle(a,e,r,o)];return _.length?[...wle(e,l,r,o),..._]:!(111551&i.flags)&&788968&i.flags?Fle(e,kx(i,e),r,o):void 0}function Dle(e,t,n,r){return z(!e.isUnion()||32&e.flags?[e]:e.types,e=>e.symbol&&Fle(t,e.symbol,n,r))}function Ple(e,t,n){const r=xle(e,t,n);if(!r||0===r.length)return;const i=Mle(t.referencedFiles,n)||Mle(t.typeReferenceDirectives,n)||Mle(t.libReferenceDirectives,n);if(i)return{definitions:r,textSpan:RQ(i)};const o=XX(t,n);return{definitions:r,textSpan:tc(o.getStart(),o.getWidth())}}function Ele(e,t,n){const r=t.getSymbolAtLocation(e);let i=!1;if((null==r?void 0:r.declarations)&&2097152&r.flags&&!n&&function(e,t){if(80!==e.kind)return!1;if(e.parent===t)return!0;if(274===t.kind)return!1;return!0}(e,r.declarations[0])){const e=t.getAliasedSymbol(r);if(e.declarations)return{symbol:e};i=!0}return{symbol:r,failedAliasResolution:i}}function Fle(e,t,n,r,i){const o=O(t.declarations,e=>e!==i),a=function(){if(32&t.flags&&!(19&t.flags)&&(GG(n)||137===n.kind)){const e=C(o,S_);return e&&c(e.members,!0)}}()||(XG(n)||gX(n)?c(o,!1):void 0);if(a)return a;const s=O(o,e=>!function(e){if(!eg(e))return!1;const t=xc(e,e=>!!xb(e)||!eg(e)&&"quit");return!!t&&5===dg(t)}(e));return M(ee(s)?s:o,i=>Ale(i,e,t,n,!1,r));function c(i,o){if(!i)return;const a=i.filter(o?SD:f_),s=a.filter(e=>!!e.body);return a.length?0!==s.length?s.map(r=>Ale(r,e,t,n)):[Ale(Ee(a),e,t,n,!1,r)]:void 0}}function Ale(e,t,n,r,i,o){const a=t.symbolToString(n),s=$ue.getSymbolKind(t,n,r),c=n.parent?t.symbolToString(n.parent,r):"";return Ile(t,e,s,a,c,i,o)}function Ile(e,t,n,r,i,o,a,s){const c=t.getSourceFile();if(!s){s=jQ(jc(t)||t,c)}return{fileName:c.fileName,textSpan:s,kind:n,name:r,containerKind:void 0,containerName:i,...Ice.toContextSpan(s,c,Ice.getContextNode(t)),isLocal:!jle(e,t),isAmbient:!!(33554432&t.flags),unverified:o,failedAliasResolution:a}}function Ole(e,t){const n=Ice.getContextNode(e),r=jQ(Xce(n)?n.start:n,t);return{fileName:t.fileName,textSpan:r,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...Ice.toContextSpan(r,t,n),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function jle(e,t){if(e.isDeclarationVisible(t))return!0;if(!t.parent)return!1;if(qu(t.parent)&&t.parent.initializer===t)return jle(e,t.parent);switch(t.kind){case 172:case 177:case 178:case 174:if(Vv(t,2))return!1;case 176:case 303:case 304:case 210:case 231:case 219:case 218:return jle(e,t.parent);default:return!1}}function Lle(e,t,n){return Ale(t,e,t.symbol,t,!1,n)}function Mle(e,t){return C(e,e=>$s(e,t))}var Rle={};a(Rle,{provideInlayHints:()=>qle});var Ble=e=>new RegExp(`^\\s?/\\*\\*?\\s?${e}\\s?\\*\\/\\s?$`);function Jle(e){return"literals"===e.includeInlayParameterNameHints}function zle(e){return!0===e.interactiveInlayHints}function qle(e){const{file:t,program:n,span:r,cancellationToken:i,preferences:o}=e,a=t.text,s=n.getCompilerOptions(),c=sY(t,o),l=n.getTypeChecker(),_=[];return function e(n){if(!n||0===n.getFullWidth())return;switch(n.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 174:case 219:i.throwIfCancellationRequested()}if(!Qs(r,n.pos,n.getFullWidth()))return;if(A_(n)&&!CP(n))return;o.includeInlayVariableTypeHints&&eE(n)||o.includeInlayPropertyDeclarationTypeHints&&yD(n)?f(n):o.includeInlayEnumMemberValueHints&&XE(n)?function(e){if(e.initializer)return;const t=l.getConstantValue(e);void 0!==t&&(n=t.toString(),r=e.end,_.push({text:`= ${n}`,position:r,kind:"Enum",whitespaceBefore:!0}));var n,r}(n):function(e){return"literals"===e.includeInlayParameterNameHints||"all"===e.includeInlayParameterNameHints}(o)&&(oP(n)||aP(n))?function(e){const t=e.arguments;if(!t||!t.length)return;const n=[],r=l.getResolvedSignatureForSignatureHelp(e,n);if(!r||!n.length)return;let i=0;for(const e of t){const t=mh(e);if(Jle(o)&&!h(t)){i++;continue}let n=0;if(SP(t)){const e=l.getTypeAtLocation(t.expression);if(l.isTupleType(e)){const{elementFlags:t,fixedLength:r}=e.target;if(0===r)continue;const i=N(t,e=>!(1&e));(i<0?r:i)>0&&(n=i<0?r:i)}}const a=l.getParameterIdentifierInfoAtPosition(r,i);if(i+=n||1,a){const{parameter:n,parameterName:r,isRestParameter:i}=a;if(!(o.includeInlayParameterNameHintsWhenArgumentMatchesName||!m(t,r))&&!i)continue;const s=Cc(r);if(g(t,s))continue;u(s,n,e.getStart(),i)}}}(n):(o.includeInlayFunctionParameterTypeHints&&g_(n)&&XT(n)&&function(e){const t=l.getSignatureFromDeclaration(e);if(!t)return;for(let n=0;ne.text).join("");if(!1===o.includeInlayVariableTypeHintsWhenTypeMatchesName&&Et(e.name.getText(),t))return;d(n,e.name.end)}}function m(e,t){return QN(e)?e.text===t:!!rP(e)&&e.name.text===t}function g(e,n){if(!Es(n,OS(s),DS(t.scriptKind)))return!1;const r=Cs(a,e.pos);if(!(null==r?void 0:r.length))return!1;const i=Ble(n);return ee(r,e=>i.test(a.substring(e.pos,e.end)))}function h(e){switch(e.kind){case 224:{const t=e.operand;return Wl(t)||QN(t)&&QT(t.escapedText)}case 112:case 97:case 106:case 15:case 228:return!0;case 80:{const t=e.escapedText;return function(e){return"undefined"===e}(t)||QT(t)}}return Wl(e)}function y(e){const t=e.valueDeclaration;if(!t||!mD(t))return;const n=l.getTypeOfSymbolAtLocation(e,t);return p(n)?void 0:v(n)}function v(e){if(!zle(o))return function(e){const n=yU();return yd(r=>{const i=l.typeToTypeNode(e,void 0,71286784);Tn.assertIsDefined(i,"should always get typenode"),n.writeNode(4,i,t,r)})}(e);const n=l.typeToTypeNode(e,void 0,71286784);Tn.assertIsDefined(n,"should always get typenode");const r=[];return i(n),r;function i(e){var t,n;if(!e)return;const o=Va(e.kind);if(o)r.push({text:o});else if(Wl(e))r.push({text:_(e)});else switch(e.kind){case 80:Tn.assertNode(e,QN);const o=wc(e),c=e.symbol&&e.symbol.declarations&&e.symbol.declarations.length&&jc(e.symbol.declarations[0]);c?r.push(x(o,c)):r.push({text:o});break;case 166:Tn.assertNode(e,dD),i(e.left),r.push({text:"."}),i(e.right);break;case 182:Tn.assertNode(e,DD),e.assertsModifier&&r.push({text:"asserts "}),i(e.parameterName),e.type&&(r.push({text:" is "}),i(e.type));break;case 183:Tn.assertNode(e,PD),i(e.typeName),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 168:Tn.assertNode(e,fD),e.modifiers&&s(e.modifiers," "),i(e.name),e.constraint&&(r.push({text:" extends "}),i(e.constraint)),e.default&&(r.push({text:" = "}),i(e.default));break;case 169:Tn.assertNode(e,mD),e.modifiers&&s(e.modifiers," "),e.dotDotDotToken&&r.push({text:"..."}),i(e.name),e.questionToken&&r.push({text:"?"}),e.type&&(r.push({text:": "}),i(e.type));break;case 185:Tn.assertNode(e,FD),r.push({text:"new "}),a(e),r.push({text:" => "}),i(e.type);break;case 186:Tn.assertNode(e,AD),r.push({text:"typeof "}),i(e.exprName),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 187:Tn.assertNode(e,ID),r.push({text:"{"}),e.members.length&&(r.push({text:" "}),s(e.members,"; "),r.push({text:" "})),r.push({text:"}"});break;case 188:Tn.assertNode(e,OD),i(e.elementType),r.push({text:"[]"});break;case 189:Tn.assertNode(e,jD),r.push({text:"["}),s(e.elements,", "),r.push({text:"]"});break;case 202:Tn.assertNode(e,LD),e.dotDotDotToken&&r.push({text:"..."}),i(e.name),e.questionToken&&r.push({text:"?"}),r.push({text:": "}),i(e.type);break;case 190:Tn.assertNode(e,MD),i(e.type),r.push({text:"?"});break;case 191:Tn.assertNode(e,RD),r.push({text:"..."}),i(e.type);break;case 192:Tn.assertNode(e,BD),s(e.types," | ");break;case 193:Tn.assertNode(e,JD),s(e.types," & ");break;case 194:Tn.assertNode(e,zD),i(e.checkType),r.push({text:" extends "}),i(e.extendsType),r.push({text:" ? "}),i(e.trueType),r.push({text:" : "}),i(e.falseType);break;case 195:Tn.assertNode(e,qD),r.push({text:"infer "}),i(e.typeParameter);break;case 196:Tn.assertNode(e,UD),r.push({text:"("}),i(e.type),r.push({text:")"});break;case 198:Tn.assertNode(e,WD),r.push({text:`${Va(e.operator)} `}),i(e.type);break;case 199:Tn.assertNode(e,$D),i(e.objectType),r.push({text:"["}),i(e.indexType),r.push({text:"]"});break;case 200:Tn.assertNode(e,HD),r.push({text:"{ "}),e.readonlyToken&&(40===e.readonlyToken.kind?r.push({text:"+"}):41===e.readonlyToken.kind&&r.push({text:"-"}),r.push({text:"readonly "})),r.push({text:"["}),i(e.typeParameter),e.nameType&&(r.push({text:" as "}),i(e.nameType)),r.push({text:"]"}),e.questionToken&&(40===e.questionToken.kind?r.push({text:"+"}):41===e.questionToken.kind&&r.push({text:"-"}),r.push({text:"?"})),r.push({text:": "}),e.type&&i(e.type),r.push({text:"; }"});break;case 201:Tn.assertNode(e,KD),i(e.literal);break;case 184:Tn.assertNode(e,ED),a(e),r.push({text:" => "}),i(e.type);break;case 205:Tn.assertNode(e,GD),e.isTypeOf&&r.push({text:"typeof "}),r.push({text:"import("}),i(e.argument),e.assertions&&(r.push({text:", { assert: "}),s(e.assertions.assertClause.elements,", "),r.push({text:" }"})),r.push({text:")"}),e.qualifier&&(r.push({text:"."}),i(e.qualifier)),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 171:Tn.assertNode(e,hD),(null==(t=e.modifiers)?void 0:t.length)&&(s(e.modifiers," "),r.push({text:" "})),i(e.name),e.questionToken&&r.push({text:"?"}),e.type&&(r.push({text:": "}),i(e.type));break;case 181:Tn.assertNode(e,ND),r.push({text:"["}),s(e.parameters,", "),r.push({text:"]"}),e.type&&(r.push({text:": "}),i(e.type));break;case 173:Tn.assertNode(e,vD),(null==(n=e.modifiers)?void 0:n.length)&&(s(e.modifiers," "),r.push({text:" "})),i(e.name),e.questionToken&&r.push({text:"?"}),a(e),e.type&&(r.push({text:": "}),i(e.type));break;case 179:Tn.assertNode(e,CD),a(e),e.type&&(r.push({text:": "}),i(e.type));break;case 207:Tn.assertNode(e,ZD),r.push({text:"["}),s(e.elements,", "),r.push({text:"]"});break;case 206:Tn.assertNode(e,YD),r.push({text:"{"}),e.elements.length&&(r.push({text:" "}),s(e.elements,", "),r.push({text:" "})),r.push({text:"}"});break;case 208:Tn.assertNode(e,eP),i(e.name);break;case 224:Tn.assertNode(e,gP),r.push({text:Va(e.operator)}),i(e.operand);break;case 203:Tn.assertNode(e,QD),i(e.head),e.templateSpans.forEach(i);break;case 16:Tn.assertNode(e,RN),r.push({text:_(e)});break;case 204:Tn.assertNode(e,XD),i(e.type),i(e.literal);break;case 17:Tn.assertNode(e,BN),r.push({text:_(e)});break;case 18:Tn.assertNode(e,JN),r.push({text:_(e)});break;case 197:Tn.assertNode(e,VD),r.push({text:"this"});break;default:Tn.failBadSyntaxKind(e)}}function a(e){e.typeParameters&&(r.push({text:"<"}),s(e.typeParameters,", "),r.push({text:">"})),r.push({text:"("}),s(e.parameters,", "),r.push({text:")"})}function s(e,t){e.forEach((e,n)=>{n>0&&r.push({text:t}),i(e)})}function _(e){switch(e.kind){case 11:return 0===c?`'${My(e.text,39)}'`:`"${My(e.text,34)}"`;case 16:case 17:case 18:{const t=e.rawText??Dy(My(e.text,96));switch(e.kind){case 16:return"`"+t+"${";case 17:return"}"+t+"${";case 18:return"}"+t+"`"}}}return e.text}}function b(e){if((dy(e)||eE(e)&&df(e))&&e.initializer){const t=mh(e.initializer);return!(h(t)||aP(t)||nP(t)||ru(t))}return!0}function x(e,t){const n=t.getSourceFile();return{text:e,span:jQ(t,n),file:n.fileName}}}var Ule={};a(Ule,{getDocCommentTemplateAtPosition:()=>a_e,getJSDocParameterNameCompletionDetails:()=>o_e,getJSDocParameterNameCompletions:()=>i_e,getJSDocTagCompletionDetails:()=>r_e,getJSDocTagCompletions:()=>n_e,getJSDocTagNameCompletionDetails:()=>t_e,getJSDocTagNameCompletions:()=>e_e,getJsDocCommentsFromDeclarations:()=>Hle,getJsDocTagsFromDeclarations:()=>Gle});var Vle,Wle,$le=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"];function Hle(e,t){const n=[];return SY(e,e=>{for(const r of function(e){switch(e.kind){case 341:case 348:return[e];case 338:case 346:return[e,e.parent];case 323:if(CF(e.parent))return[e.parent.parent];default:return Wg(e)}}(e)){const i=pF(r)&&r.tags&&C(r.tags,e=>327===e.kind&&("inheritDoc"===e.tagName.escapedText||"inheritdoc"===e.tagName.escapedText));if(void 0===r.comment&&!i||pF(r)&&346!==e.kind&&338!==e.kind&&r.tags&&r.tags.some(e=>346===e.kind||338===e.kind)&&!r.tags.some(e=>341===e.kind||342===e.kind))continue;let o=r.comment?Yle(r.comment,t):[];i&&i.comment&&(o=o.concat(Yle(i.comment,t))),E(n,o,Kle)||n.push(o)}}),J(k(n,[HY()]))}function Kle(e,t){return F(e,t,(e,t)=>e.kind===t.kind&&e.text===t.text)}function Gle(e,t){const n=[];return SY(e,e=>{const r=ml(e);if(!r.some(e=>346===e.kind||338===e.kind)||r.some(e=>341===e.kind||342===e.kind))for(const e of r)n.push({name:e.tagName.text,text:Zle(e,t)}),n.push(...Xle(Qle(e),t))}),n}function Xle(e,t){return z(e,e=>ne([{name:e.tagName.text,text:Zle(e,t)}],Xle(Qle(e),t)))}function Qle(e){return Rl(e)&&e.isNameFirst&&e.typeExpression&&fF(e.typeExpression.type)?e.typeExpression.type.jsDocPropertyTags:void 0}function Yle(e,t){return"string"==typeof e?[RY(e)]:z(e,e=>321===e.kind?[RY(e.text)]:VY(e,t))}function Zle(e,t){const{comment:n,kind:r}=e,i=function(e){switch(e){case 341:return jY;case 348:return LY;case 345:return JY;case 346:case 338:return BY;default:return RY}}(r);switch(r){case 349:const r=e.typeExpression;return r?o(r):void 0===n?void 0:Yle(n,t);case 329:case 328:return o(e.class);case 345:const a=e,s=[];if(a.constraint&&s.push(RY(a.constraint.getText())),g(a.typeParameters)){g(s)&&s.push(FY());const e=a.typeParameters[a.typeParameters.length-1];h(a.typeParameters,t=>{s.push(i(t.getText())),e!==t&&s.push(IY(28),FY())})}return n&&s.push(FY(),...Yle(n,t)),s;case 344:case 350:return o(e.typeExpression);case 346:case 338:case 348:case 341:case 347:const{name:c}=e;return c?o(c):void 0===n?void 0:Yle(n,t);default:return void 0===n?void 0:Yle(n,t)}function o(e){return r=e.getText(),n?r.match(/^https?$/)?[RY(r),...Yle(n,t)]:[i(r),FY(),...Yle(n,t)]:[RY(r)];var r}}function e_e(){return Vle||(Vle=M($le,e=>({name:e,kind:"keyword",kindModifiers:"",sortText:Oae.SortText.LocationPriority})))}var t_e=r_e;function n_e(){return Wle||(Wle=M($le,e=>({name:`@${e}`,kind:"keyword",kindModifiers:"",sortText:Oae.SortText.LocationPriority})))}function r_e(e){return{name:e,kind:"",kindModifiers:"",displayParts:[RY(e)],documentation:p,tags:void 0,codeActions:void 0}}function i_e(e){if(!QN(e.name))return p;const t=e.name.text,n=e.parent,r=n.parent;return f_(r)?$(r.parameters,r=>{if(!QN(r.name))return;const i=r.name.text;return n.tags.some(t=>t!==e&&PF(t)&&QN(t.name)&&t.name.escapedText===i)||void 0!==t&&!ln(i,t)?void 0:{name:i,kind:"parameter",kindModifiers:"",sortText:Oae.SortText.LocationPriority}}):[]}function o_e(e){return{name:e,kind:"parameter",kindModifiers:"",displayParts:[RY(e)],documentation:p,tags:void 0,codeActions:void 0}}function a_e(e,t,n,r){const i=YX(t,n),o=xc(i,pF);if(o&&(void 0!==o.comment||g(o.tags)))return;const a=i.getStart(t);if(!o&&as_e(e,t))}(i,r);if(!s)return;const{commentOwner:c,parameters:l,hasReturn:_}=s,u=Pe(Ju(c)&&c.jsDoc?c.jsDoc:void 0);if(c.getStart(t){const a=80===e.kind?e.text:"param"+o;return`${n} * @param ${t?i?"{...any} ":"{any} ":""}${a}${r}`}).join("")}(l||[],p,d,e):"")+(_?function(e,t){return`${e} * @returns${t}`}(d,e):""),m=g(ml(c))>0;if(f&&!m){const t="/**"+e+d+" * ";return{newText:t+e+f+d+" */"+(a===n?e+d:""),caretOffset:t.length}}return{newText:"/** */",caretOffset:3}}function s_e(e,t){switch(e.kind){case 262:case 218:case 174:case 176:case 173:case 219:const n=e;return{commentOwner:e,parameters:n.parameters,hasReturn:c_e(n,t)};case 303:return s_e(e.initializer,t);case 263:case 264:case 266:case 306:case 265:return{commentOwner:e};case 171:{const n=e;return n.type&&ED(n.type)?{commentOwner:e,parameters:n.type.parameters,hasReturn:c_e(n.type,t)}:{commentOwner:e}}case 243:{const n=e.declarationList.declarations,r=1===n.length&&n[0].initializer?function(e){for(;217===e.kind;)e=e.expression;switch(e.kind){case 218:case 219:return e;case 231:return C(e.members,SD)}}(n[0].initializer):void 0;return r?{commentOwner:e,parameters:r.parameters,hasReturn:c_e(r,t)}:{commentOwner:e}}case 307:return"quit";case 267:return 267===e.parent.kind?void 0:{commentOwner:e};case 244:return s_e(e.expression,t);case 226:{const n=e;return 0===dg(n)?"quit":f_(n.right)?{commentOwner:e,parameters:n.right.parameters,hasReturn:c_e(n.right,t)}:{commentOwner:e}}case 172:const r=e.initializer;if(r&&(_P(r)||uP(r)))return{commentOwner:e,parameters:r.parameters,hasReturn:c_e(r,t)}}}function c_e(e,t){return!!(null==t?void 0:t.generateReturnInDocTemplate)&&(ED(e)||uP(e)&&nu(e.body)||g_(e)&&e.body&&jP(e.body)&&!!jf(e.body,e=>e))}var l_e={};function __e(e,t,n,r,i,o){return tde.ChangeTracker.with({host:r,formatContext:i,preferences:o},r=>{const i=t.map(t=>function(e,t){const n=[{parse:()=>YI("__mapcode_content_nodes.ts",t,e.languageVersion,!0,e.scriptKind),body:e=>e.statements},{parse:()=>YI("__mapcode_class_content_nodes.ts",`class __class {\n${t}\n}`,e.languageVersion,!0,e.scriptKind),body:e=>e.statements[0].members}],r=[];for(const{parse:e,body:t}of n){const n=e(),i=t(n);if(i.length&&0===n.parseDiagnostics.length)return i;i.length&&r.push({sourceFile:n,body:i})}const{body:i}=r.sort((e,t)=>e.sourceFile.parseDiagnostics.length-t.sourceFile.parseDiagnostics.length)[0];return i}(e,t)),o=n&&J(n);for(const t of i)u_e(e,r,t,o)})}function u_e(e,t,n,r){x_(n[0])||P_(n[0])?function(e,t,n,r){let i;i=r&&r.length?h(r,t=>xc(YX(e,t.start),fn(S_,iE))):C(e.statements,fn(S_,iE));if(!i)return;const o=i.members.find(e=>n.some(t=>d_e(t,e)));if(o){const r=w(i.members,e=>n.some(t=>d_e(t,e)));return h(n,p_e),void t.replaceNodeRangeWithNodes(e,o,r,n)}h(n,p_e),t.insertNodesAfter(e,i.members[i.members.length-1],n)}(e,t,n,r):function(e,t,n,r){if(!(null==r?void 0:r.length))return void t.insertNodesAtEndOfFile(e,n,!1);for(const i of r){const r=xc(YX(e,i.start),e=>fn(jP,QE)(e)&&ee(e.statements,e=>n.some(t=>d_e(t,e))));if(r){const i=r.statements.find(e=>n.some(t=>d_e(t,e)));if(i){const o=w(r.statements,e=>n.some(t=>d_e(t,e)));return h(n,p_e),void t.replaceNodeRangeWithNodes(e,i,o,n)}}}let i=e.statements;for(const t of r){const n=xc(YX(e,t.start),jP);if(n){i=n.statements;break}}h(n,p_e),t.insertNodesAfter(e,i[i.length-1],n)}(e,t,n,r)}function d_e(e,t){var n,r,i,o,a,s;return e.kind===t.kind&&(176===e.kind?e.kind===t.kind:Ic(e)&&Ic(t)?e.name.getText()===t.name.getText():BP(e)&&BP(t)||zP(e)&&zP(t)?e.expression.getText()===t.expression.getText():qP(e)&&qP(t)?(null==(n=e.initializer)?void 0:n.getText())===(null==(r=t.initializer)?void 0:r.getText())&&(null==(i=e.incrementor)?void 0:i.getText())===(null==(o=t.incrementor)?void 0:o.getText())&&(null==(a=e.condition)?void 0:a.getText())===(null==(s=t.condition)?void 0:s.getText()):_u(e)&&_u(t)?e.expression.getText()===t.expression.getText()&&e.initializer.getText()===t.initializer.getText():XP(e)&&XP(t)?e.label.getText()===t.label.getText():e.getText()===t.getText())}function p_e(e){f_e(e),e.parent=void 0}function f_e(e){e.pos=-1,e.end=-1,e.forEachChild(f_e)}a(l_e,{mapCode:()=>__e});var m_e={};function g_e(e,t,n,r,i,o){const a=tde.ChangeTracker.fromContext({host:n,formatContext:t,preferences:i}),s="SortAndCombine"===o||"All"===o,c=s,l="RemoveUnused"===o||"All"===o,_=e.statements.filter(dE),u=y_e(e,_),{comparersToTest:d,typeOrdersToTest:p}=h_e(i),f=d[0],m={moduleSpecifierComparer:"boolean"==typeof i.organizeImportsIgnoreCase?f:void 0,namedImportComparer:"boolean"==typeof i.organizeImportsIgnoreCase?f:void 0,typeOrder:i.organizeImportsTypeOrder};if("boolean"!=typeof i.organizeImportsIgnoreCase&&({comparer:m.moduleSpecifierComparer}=E_e(u,d)),!m.typeOrder||"boolean"!=typeof i.organizeImportsIgnoreCase){const e=F_e(_,d,p);if(e){const{namedImportComparer:t,typeOrder:n}=e;m.namedImportComparer=m.namedImportComparer??t,m.typeOrder=m.typeOrder??n}}u.forEach(e=>y(e,m)),"RemoveUnused"!==o&&function(e){const t=[],n=e.statements,r=g(n);let i=0,o=0;for(;iy_e(e,t))}(e).forEach(e=>v(e,m.namedImportComparer));for(const t of e.statements.filter(pp)){if(!t.body)continue;if(y_e(e,t.body.statements.filter(dE)).forEach(e=>y(e,m)),"RemoveUnused"!==o){v(t.body.statements.filter(TE),m.namedImportComparer)}}return a.getChanges();function h(r,i){if(0===g(r))return;dw(r[0],1024);const o=c?Qe(r,e=>b_e(e.moduleSpecifier)):[r],l=z(s?Se(o,(e,t)=>w_e(e[0].moduleSpecifier,t[0].moduleSpecifier,m.moduleSpecifierComparer??f)):o,e=>b_e(e[0].moduleSpecifier)||void 0===e[0].moduleSpecifier?i(e):e);if(0===l.length)a.deleteNodes(e,r,{leadingTriviaOption:tde.LeadingTriviaOption.Exclude,trailingTriviaOption:tde.TrailingTriviaOption.Include},!0);else{const i={leadingTriviaOption:tde.LeadingTriviaOption.Exclude,trailingTriviaOption:tde.TrailingTriviaOption.Include,suffix:$Y(n,t.options)};a.replaceNodeWithNodes(e,r[0],l,i);const o=a.nodeHasTrailingComment(e,r[0],i);a.deleteNodes(e,r.slice(1),{trailingTriviaOption:tde.TrailingTriviaOption.Include},o)}}function y(t,n){const i=n.moduleSpecifierComparer??f,o=n.namedImportComparer??f,a=B_e({organizeImportsTypeOrder:n.typeOrder??"last"},o);h(t,t=>(l&&(t=function(e,t,n){const r=n.getTypeChecker(),i=n.getCompilerOptions(),o=r.getJsxNamespace(t),a=r.getJsxFragmentFactory(t),s=!!(2&t.transformFlags),c=[];for(const n of e){const{importClause:e,moduleSpecifier:r}=n;if(!e){c.push(n);continue}let{name:i,namedBindings:o}=e;if(i&&!l(i)&&(i=void 0),o)if(vE(o))l(o.name)||(o=void 0);else{const e=o.elements.filter(e=>l(e.name));e.lengthU_e(e,t,i))),t))}function v(e,t){const n=B_e(i,t);h(e,e=>k_e(e,n))}}function h_e(e){return{comparersToTest:"boolean"==typeof e.organizeImportsIgnoreCase?[M_e(e,e.organizeImportsIgnoreCase)]:[M_e(e,!0),M_e(e,!1)],typeOrdersToTest:e.organizeImportsTypeOrder?[e.organizeImportsTypeOrder]:["last","inline","first"]}}function y_e(e,t){const n=Fs(e.languageVersion,!1,e.languageVariant),r=[];let i=0;for(const o of t)r[i]&&v_e(e,o,n)&&i++,r[i]||(r[i]=[]),r[i].push(o);return r}function v_e(e,t,n){const r=t.getFullStart(),i=t.getStart();n.setText(e.text,r,i-r);let o=0;for(;n.getTokenStart()=2))return!0}return!1}function b_e(e){return void 0!==e&&Ku(e)?e.text:void 0}function x_e(e){let t;const n={defaultImports:[],namespaceImports:[],namedImports:[]},r={defaultImports:[],namespaceImports:[],namedImports:[]};for(const i of e){if(void 0===i.importClause){t=t||i;continue}const e=i.importClause.isTypeOnly?n:r,{name:o,namedBindings:a}=i.importClause;o&&e.defaultImports.push(i),a&&(vE(a)?e.namespaceImports.push(i):e.namedImports.push(i))}return{importWithoutClause:t,typeOnlyImports:n,regularImports:r}}function S_e(e,t,n,r){if(0===e.length)return e;const i=Ye(e,e=>{if(e.attributes){let t=e.attributes.token+" ";for(const n of be(e.attributes.elements,(e,t)=>Rt(e.name.text,t.name.text)))t+=n.name.text+":",t+=Ku(n.value)?`"${n.value.text}"`:n.value.getText()+" ";return t}return""}),o=[];for(const e in i){const a=i[e],{importWithoutClause:s,typeOnlyImports:c,regularImports:l}=x_e(a);s&&o.push(s);for(const e of[l,c]){const i=e===c,{defaultImports:a,namespaceImports:s,namedImports:l}=e;if(!i&&1===a.length&&1===s.length&&0===l.length){const e=a[0];o.push(T_e(e,e.importClause.name,s[0].importClause.namedBindings));continue}const _=Se(s,(e,n)=>t(e.importClause.namedBindings.name.text,n.importClause.namedBindings.name.text));for(const e of _)o.push(T_e(e,void 0,e.importClause.namedBindings));const u=Ce(a),d=Ce(l),f=u??d;if(!f)continue;let m;const g=[];if(1===a.length)m=a[0].importClause.name;else for(const e of a)g.push(aw.createImportSpecifier(!1,aw.createIdentifier("default"),e.importClause.name));g.push(...P_e(l));const h=aw.createNodeArray(Se(g,n),null==d?void 0:d.importClause.namedBindings.elements.hasTrailingComma),y=0===h.length?m?void 0:aw.createNamedImports(p):d?aw.updateNamedImports(d.importClause.namedBindings,h):aw.createNamedImports(h);r&&y&&(null==d?void 0:d.importClause.namedBindings)&&!ix(d.importClause.namedBindings,r)&&dw(y,2),i&&m&&y?(o.push(T_e(f,m,void 0)),o.push(T_e(d??f,void 0,y))):o.push(T_e(f,m,y))}}return o}function k_e(e,t){if(0===e.length)return e;const{exportWithoutClause:n,namedExports:r,typeOnlyExports:i}=function(e){let t;const n=[],r=[];for(const i of e)void 0===i.exportClause?t=t||i:i.isTypeOnly?r.push(i):n.push(i);return{exportWithoutClause:t,namedExports:n,typeOnlyExports:r}}(e),o=[];n&&o.push(n);for(const e of[r,i]){if(0===e.length)continue;const n=[];n.push(...z(e,e=>e.exportClause&&CE(e.exportClause)?e.exportClause.elements:p));const r=Se(n,t),i=e[0];o.push(aw.updateExportDeclaration(i,i.modifiers,i.isTypeOnly,i.exportClause&&(CE(i.exportClause)?aw.updateNamedExports(i.exportClause,r):aw.updateNamespaceExport(i.exportClause,i.exportClause.name)),i.moduleSpecifier,i.attributes))}return o}function T_e(e,t,n){return aw.updateImportDeclaration(e,e.modifiers,aw.updateImportClause(e.importClause,e.importClause.isTypeOnly,t,n),e.moduleSpecifier,e.attributes)}function C_e(e,t,n,r){switch(null==r?void 0:r.organizeImportsTypeOrder){case"first":return Ht(t.isTypeOnly,e.isTypeOnly)||n(e.name.text,t.name.text);case"inline":return n(e.name.text,t.name.text);default:return Ht(e.isTypeOnly,t.isTypeOnly)||n(e.name.text,t.name.text)}}function w_e(e,t,n){const r=void 0===e?void 0:b_e(e),i=void 0===t?void 0:b_e(t);return Ht(void 0===r,void 0===i)||Ht(Js(r),Js(i))||n(r,i)}function N_e(e){var t;switch(e.kind){case 271:return null==(t=dt(e.moduleReference,EE))?void 0:t.expression;case 272:return e.moduleSpecifier;case 243:return e.declarationList.declarations[0].initializer.arguments[0]}}function D_e(e,t){const n=ON(t)&&t.text;return _t(n)&&ee(e.moduleAugmentations,e=>ON(e)&&e.text===n)}function P_e(e){return z(e,e=>M(function(e){var t;return(null==(t=e.importClause)?void 0:t.namedBindings)&&xE(e.importClause.namedBindings)?e.importClause.namedBindings.elements:void 0}(e),e=>e.name&&e.propertyName&&e.name.escapedText===e.propertyName.escapedText?aw.updateImportSpecifier(e,e.isTypeOnly,void 0,e.name):e))}function E_e(e,t){const n=[];return e.forEach(e=>{n.push(e.map(e=>b_e(N_e(e))||""))}),I_e(n,t)}function F_e(e,t,n){let r=!1;const i=e.filter(e=>{var t,n;const i=null==(n=dt(null==(t=e.importClause)?void 0:t.namedBindings,xE))?void 0:n.elements;return!!(null==i?void 0:i.length)&&(!r&&i.some(e=>e.isTypeOnly)&&i.some(e=>!e.isTypeOnly)&&(r=!0),!0)});if(0===i.length)return;const o=i.map(e=>{var t,n;return null==(n=dt(null==(t=e.importClause)?void 0:t.namedBindings,xE))?void 0:n.elements}).filter(e=>void 0!==e);if(!r||0===n.length){const e=I_e(o.map(e=>e.map(e=>e.name.text)),t);return{namedImportComparer:e.comparer,typeOrder:1===n.length?n[0]:void 0,isSorted:e.isSorted}}const a={first:1/0,last:1/0,inline:1/0},s={first:t[0],last:t[0],inline:t[0]};for(const e of t){const t={first:0,last:0,inline:0};for(const r of o)for(const i of n)t[i]=(t[i]??0)+A_e(r,(t,n)=>C_e(t,n,e,{organizeImportsTypeOrder:i}));for(const r of n){const n=r;t[n]0&&n++;return n}function I_e(e,t){let n,r=1/0;for(const i of t){let t=0;for(const n of e){if(n.length<=1)continue;t+=A_e(n,i)}tC_e(t,r,n,e)}function J_e(e,t,n){const{comparersToTest:r,typeOrdersToTest:i}=h_e(t),o=F_e([e],r,i);let a,s=B_e(t,r[0]);if("boolean"!=typeof t.organizeImportsIgnoreCase||!t.organizeImportsTypeOrder)if(o){const{namedImportComparer:e,typeOrder:t,isSorted:n}=o;a=n,s=B_e({organizeImportsTypeOrder:t},e)}else if(n){const e=F_e(n.statements.filter(dE),r,i);if(e){const{namedImportComparer:t,typeOrder:n,isSorted:r}=e;a=r,s=B_e({organizeImportsTypeOrder:n},t)}}return{specifierComparer:s,isSorted:a}}function z_e(e,t,n){const r=je(e,t,yt,(e,t)=>U_e(e,t,n));return r<0?~r:r}function q_e(e,t,n){const r=je(e,t,yt,n);return r<0?~r:r}function U_e(e,t,n){return w_e(N_e(e),N_e(t),n)||function(e,t){return It(O_e(e),O_e(t))}(e,t)}function V_e(e,t,n,r){const i=j_e(t);return S_e(e,i,B_e({organizeImportsTypeOrder:null==r?void 0:r.organizeImportsTypeOrder},i),n)}function W_e(e,t,n){return k_e(e,(e,r)=>C_e(e,r,j_e(t),{organizeImportsTypeOrder:(null==n?void 0:n.organizeImportsTypeOrder)??"last"}))}function $_e(e,t,n){return w_e(e,t,j_e(!!n))}a(m_e,{compareImportsOrRequireStatements:()=>U_e,compareModuleSpecifiers:()=>$_e,getDetectionLists:()=>h_e,getImportDeclarationInsertionIndex:()=>z_e,getImportSpecifierInsertionIndex:()=>q_e,getNamedImportSpecifierComparerWithDetection:()=>J_e,getOrganizeImportsStringComparerWithDetection:()=>R_e,organizeImports:()=>g_e,testCoalesceExports:()=>W_e,testCoalesceImports:()=>V_e});var H_e={};function K_e(e,t){const n=[];return function(e,t,n){let r=40,i=0;const o=[...e.statements,e.endOfFileToken],a=o.length;for(;i...")}function a(e){const n=nc(e.openingFragment.getStart(t),e.closingFragment.getEnd());return tue(n,"code",n,!1,"<>...")}function s(e){if(0!==e.properties.length)return Z_e(e.getStart(t),e.getEnd(),"code")}function c(e){if(15!==e.kind||0!==e.text.length)return Z_e(e.getStart(t),e.getEnd(),"code")}function l(e,t=19){return _(e,!1,!tP(e.parent)&&!oP(e.parent),t)}function _(n,r=!1,i=!0,o=19,a=(19===o?20:24)){const s=RX(e,o,t),c=RX(e,a,t);return s&&c&&eue(s,c,n,t,r,i)}function u(e){return e.length?tue(RQ(e),"code"):void 0}function d(e){if(dx(e.getStart(),e.getEnd(),t))return;return tue(nc(e.getStart(),e.getEnd()),"code",jQ(e))}}(i,e);a&&n.push(a),r--,oP(i)?(r++,s(i.expression),r--,i.arguments.forEach(s),null==(o=i.typeArguments)||o.forEach(s)):BP(i)&&i.elseStatement&&BP(i.elseStatement)?(s(i.expression),s(i.thenStatement),r++,s(i.elseStatement),r--):i.forEachChild(s),r++}}(e,t,n),function(e,t){const n=[],r=e.getLineStarts();for(const i of r){const r=e.getLineEndOfPosition(i),o=X_e(e.text.substring(i,r));if(o&&!yQ(e,i))if(o[1]){const e=n.pop();e&&(e.textSpan.length=r-e.textSpan.start,e.hintSpan.length=r-e.textSpan.start,t.push(e))}else{const t=nc(e.text.indexOf("//",i),r);n.push(tue(t,"region",t,!1,o[2]||"#region"))}}}(e,n),n.sort((e,t)=>e.textSpan.start-t.textSpan.start)}a(H_e,{collectElements:()=>K_e});var G_e=/^#(end)?region(?:\s+(.*))?(?:\r)?$/;function X_e(e){return ln(e=e.trimStart(),"//")?(e=e.slice(2).trim(),G_e.exec(e)):null}function Q_e(e,t,n,r){const i=Cs(t.text,e);if(!i)return;let o=-1,a=-1,s=0;const c=t.getFullText();for(const{kind:e,pos:t,end:_}of i)switch(n.throwIfCancellationRequested(),e){case 2:if(X_e(c.slice(t,_))){l(),s=0;break}0===s&&(o=t),a=_,s++;break;case 3:l(),r.push(Z_e(t,_,"comment")),s=0;break;default:Tn.assertNever(e)}function l(){s>1&&r.push(Z_e(o,a,"comment"))}l()}function Y_e(e,t,n,r){jN(e)||Q_e(e.pos,t,n,r)}function Z_e(e,t,n){return tue(nc(e,t),n)}function eue(e,t,n,r,i=!1,o=!0){return tue(nc(o?e.getFullStart():e.getStart(r),t.getEnd()),"code",jQ(n,r),i)}function tue(e,t,n=e,r=!1,i="..."){return{textSpan:e,kind:t,hintSpan:n,bannerText:i,autoCollapse:r}}var nue={};function rue(e,t,n,r){const i=GX(XX(t,n));if(cue(i)){const n=function(e,t,n,r,i){const o=t.getSymbolAtLocation(e);if(!o){if(Ku(e)){const r=UX(e,t);if(r&&(128&r.flags||1048576&r.flags&&T(r.types,e=>!!(128&e.flags))))return oue(e.text,e.text,"string","",e,n)}else if(_X(e)){const t=tp(e);return oue(t,t,"label","",e,n)}return}const{declarations:a}=o;if(!a||0===a.length)return;if(a.some(e=>function(e,t){const n=t.getSourceFile();return e.isSourceFileDefaultLibrary(n)&&Ro(n.fileName,".d.ts")}(r,e)))return aue(Ca.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(QN(e)&&"default"===e.escapedText&&o.parent&&1536&o.parent.flags)return;if(Ku(e)&&Eg(e))return i.allowRenameOfImportPath?function(e,t,n){if(!Js(e.text))return aue(Ca.You_cannot_rename_a_module_via_a_global_import);const r=n.declarations&&C(n.declarations,QE);if(!r)return;const i=Xt(e.text,"/index")||Xt(e.text,"/index.js")?void 0:Yt(aT(r.fileName),"/index"),o=void 0===i?r.fileName:i,a=void 0===i?"module":"directory",s=e.text.lastIndexOf("/")+1,c=tc(e.getStart(t)+1+s,e.text.length-s);return{canRename:!0,fileToRename:o,kind:a,displayName:o,fullDisplayName:e.text,kindModifiers:"",triggerSpan:c}}(e,n,o):void 0;const s=function(e,t,n,r){if(!r.providePrefixAndSuffixTextForRename&&2097152&t.flags){const e=t.declarations&&C(t.declarations,e=>SE(e));e&&!e.propertyName&&(t=n.getAliasedSymbol(t))}const{declarations:i}=t;if(!i)return;const o=iue(e.path);if(void 0===o)return ee(i,e=>YZ(e.getSourceFile().path))?Ca.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:void 0;for(const e of i){const t=iue(e.getSourceFile().path);if(t){const e=Math.min(o.length,t.length);for(let n=0;n<=e;n++)if(0!==Rt(o[n],t[n]))return Ca.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder}}return}(n,o,t,i);if(s)return aue(s);const c=$ue.getSymbolKind(t,o,e),l=ZY(e)||Kh(e)&&167===e.parent.kind?Wy(ey(e)):void 0,_=l||t.symbolToString(o),u=l||t.getFullyQualifiedName(o);return oue(_,u,c,$ue.getSymbolModifiers(t,o),e,n)}(i,e.getTypeChecker(),t,e,r);if(n)return n}return aue(Ca.You_cannot_rename_this_element)}function iue(e){const t=Ko(e),n=t.lastIndexOf("node_modules");if(-1!==n)return t.slice(0,n+2)}function oue(e,t,n,r,i,o){return{canRename:!0,fileToRename:void 0,kind:n,displayName:e,fullDisplayName:t,kindModifiers:r,triggerSpan:sue(i,o)}}function aue(e){return{canRename:!1,localizedErrorMessage:lS(e)}}function sue(e,t){let n=e.getStart(t),r=e.getWidth(t);return Ku(e)&&(n+=1,r-=2),tc(n,r)}function cue(e){switch(e.kind){case 80:case 81:case 11:case 15:case 110:return!0;case 9:return hX(e);default:return!1}}a(nue,{getRenameInfo:()=>rue,nodeIsEligibleForRename:()=>cue});var lue={};function _ue(e,t,n,r,i){const o=e.getTypeChecker(),a=tQ(t,n);if(!a)return;const s=!!r&&"characterTyped"===r.kind;if(s&&(sQ(t,n,a)||yQ(t,n)))return;const c=!!r&&"invoked"===r.kind,l=function(e,t,n,r,i){for(let o=e;!QE(o)&&(i||!jP(o));o=o.parent){Tn.assert(TX(o.parent,o),"Not a subspan",()=>`Child: ${Tn.formatSyntaxKind(o.kind)}, parent: ${Tn.formatSyntaxKind(o.parent.kind)}`);const e=mue(o,t,n,r);if(e)return e}return}(a,n,t,o,c);if(!l)return;i.throwIfCancellationRequested();const _=function({invocation:e,argumentCount:t},n,r,i,o){switch(e.kind){case 0:{if(o&&!function(e,t,n){if(!K_(t))return!1;const r=t.getChildren(n);switch(e.kind){case 21:return E(r,e);case 28:{const t=BX(e);return!!t&&E(r,t)}case 30:return uue(e,n,t.expression);default:return!1}}(i,e.node,r))return;const a=[],s=n.getResolvedSignatureForSignatureHelp(e.node,a,t);return 0===a.length?void 0:{kind:0,candidates:a,resolvedSignature:s}}case 1:{const{called:a}=e;if(o&&!uue(i,r,QN(a)?a.parent:a))return;const s=gQ(a,t,n);if(0!==s.length)return{kind:0,candidates:s,resolvedSignature:Ne(s)};const c=n.getSymbolAtLocation(a);return c&&{kind:1,symbol:c}}case 2:return{kind:0,candidates:[e.signature],resolvedSignature:e.signature};default:return Tn.assertNever(e)}}(l,o,t,a,s);return i.throwIfCancellationRequested(),_?o.runWithCancellationToken(i,e=>0===_.kind?Due(_.candidates,_.resolvedSignature,l,t,e):function(e,{argumentCount:t,argumentsSpan:n,invocation:r,argumentIndex:i},o,a){const s=a.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);if(!s)return;const c=[Pue(e,s,a,wue(r),o)];return{items:c,applicableSpan:n,selectedItemIndex:0,argumentIndex:i,argumentCount:t}}(_.symbol,l,t,e)):Bm(t)?function(e,t,n){if(2===e.invocation.kind)return;const r=Cue(e.invocation),i=rP(r)?r.name.text:void 0,o=t.getTypeChecker();return void 0===i?void 0:v(t.getSourceFiles(),t=>v(t.getNamedDeclarations().get(i),r=>{const i=r.symbol&&o.getTypeOfSymbolAtLocation(r.symbol,r),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,n=>Due(a,a[0],e,t,n,!0))}))}(l,e,i):void 0}function uue(e,t,n){const r=e.getFullStart();let i=e.parent;for(;i;){const e=rQ(r,t,i,!0);if(e)return TX(n,e);i=i.parent}return Tn.fail("Could not find preceding token")}function due(e,t,n,r){const i=fue(e,t,n,r);return!i||i.isTypeParameterList||0!==i.invocation.kind?void 0:{invocation:i.invocation.node,argumentCount:i.argumentCount,argumentIndex:i.argumentIndex}}function pue(e,t,n,r){const i=function(e,t,n){if(30===e.kind||21===e.kind)return{list:Tue(e.parent,e,t),argumentIndex:0};{const t=BX(e);return t&&{list:t,argumentIndex:bue(n,t,e)}}}(e,n,r);if(!i)return;const{list:o,argumentIndex:a}=i,s=function(e,t){return xue(e,t,void 0)}(r,o);0!==a&&Tn.assertLessThan(a,s);const c=function(e,t){const n=e.getFullStart(),r=ds(t.text,e.getEnd(),!1);return tc(n,r-n)}(o,n);return{list:o,argumentIndex:a,argumentCount:s,argumentsSpan:c}}function fue(e,t,n,r){const{parent:i}=e;if(K_(i)){const t=i,o=pue(e,0,n,r);if(!o)return;const{list:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===a.pos,invocation:{kind:0,node:t},argumentsSpan:l,argumentIndex:s,argumentCount:c}}if(MN(e)&&sP(i))return NQ(e,t,n)?Sue(i,0,n):void 0;if(RN(e)&&215===i.parent.kind){const r=i,o=r.parent;Tn.assert(228===r.kind);return Sue(o,NQ(e,t,n)?0:1,n)}if(IP(i)&&sP(i.parent.parent)){const r=i,o=i.parent.parent;if(JN(e)&&!NQ(e,t,n))return;const a=function(e,t,n,r){if(Tn.assert(n>=t.getStart(),"Assumed 'position' could not occur before node."),Kl(t))return NQ(t,n,r)?0:e+2;return e+1}(r.parent.templateSpans.indexOf(r),e,t,n);return Sue(o,a,n)}if(Iu(i)){const e=i.attributes.pos;return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:tc(e,ds(n.text,i.attributes.end,!1)-e),argumentIndex:0,argumentCount:1}}{const t=hQ(e,n);if(t){const{called:r,nTypeArguments:i}=t;return{isTypeParameterList:!0,invocation:{kind:1,called:r},argumentsSpan:nc(r.getStart(n),e.end),argumentIndex:i,argumentCount:i+1}}return}}function mue(e,t,n,r){return function(e,t,n,r){const i=function(e){switch(e.kind){case 21:case 28:return e;default:return xc(e.parent,e=>!!mD(e)||!(eP(e)||YD(e)||ZD(e))&&"quit")}}(e);if(void 0===i)return;const o=function(e,t,n,r){const{parent:i}=e;switch(i.kind){case 217:case 174:case 218:case 219:const n=pue(e,0,t,r);if(!n)return;const{argumentIndex:o,argumentCount:a,argumentsSpan:s}=n,c=bD(i)?r.getContextualTypeForObjectLiteralElement(i):r.getContextualType(i);return c&&{contextualType:c,argumentIndex:o,argumentCount:a,argumentsSpan:s};case 226:{const t=gue(i),n=r.getContextualType(t),o=21===e.kind?0:hue(i)-1,a=hue(t);return n&&{contextualType:n,argumentIndex:o,argumentCount:a,argumentsSpan:jQ(i)}}default:return}}(i,n,0,r);if(void 0===o)return;const{contextualType:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o,_=a.getNonNullableType(),u=_.symbol;if(void 0===u)return;const d=Pe(_.getCallSignatures());if(void 0===d)return;return{isTypeParameterList:!1,invocation:{kind:2,signature:d,node:e,symbol:yue(u)},argumentsSpan:l,argumentIndex:s,argumentCount:c}}(e,0,n,r)||fue(e,t,n,r)}function gue(e){return yP(e.parent)?gue(e.parent):e}function hue(e){return yP(e.left)?hue(e.left)+1:2}function yue(e){return"__type"===e.name&&v(e.declarations,e=>{var t;return ED(e)?null==(t=dt(e.parent,vu))?void 0:t.symbol:void 0})||e}function vue(e,t){const n=t.getTypeAtLocation(e.expression);if(t.isTupleType(n)){const{elementFlags:e,fixedLength:t}=n.target;if(0===t)return 0;const r=N(e,e=>!(1&e));return r<0?t:r}return 0}function bue(e,t,n){return xue(e,t,n)}function xue(e,t,n){const r=t.getChildren();let i=0,o=!1;for(const t of r){if(n&&t===n)return o||28!==t.kind||i++,i;SP(t)?(i+=vue(t,e),o=!0):28===t.kind?o?o=!1:i++:(i++,o=!0)}return n?i:r.length&&28===Ee(r).kind?i+1:i}function Sue(e,t,n){const r=MN(e.template)?1:e.template.templateSpans.length+1;return 0!==t&&Tn.assertLessThan(t,r),{isTypeParameterList:!1,invocation:{kind:0,node:e},argumentsSpan:kue(e,n),argumentIndex:t,argumentCount:r}}function kue(e,t){const n=e.template,r=n.getStart();let i=n.getEnd();if(228===n.kind){0===Ee(n.templateSpans).literal.getFullWidth()&&(i=ds(t.text,i,!1))}return tc(r,i-r)}function Tue(e,t,n){const r=e.getChildren(n),i=r.indexOf(t);return Tn.assert(i>=0&&r.length>i+1),r[i+1]}function Cue(e){return 0===e.kind?xm(e.node):e.called}function wue(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}a(lue,{getArgumentInfoForCompletions:()=>due,getSignatureHelpItems:()=>_ue});var Nue=70246400;function Due(e,t,{isTypeParameterList:n,argumentCount:r,argumentsSpan:i,invocation:o,argumentIndex:a},s,c,l){var _;const u=wue(o),d=2===o.kind?o.symbol:c.getSymbolAtLocation(Cue(o))||l&&(null==(_=t.declaration)?void 0:_.symbol),f=d?XY(c,d,l?s:void 0,void 0):p,m=M(e,e=>function(e,t,n,r,i,o){const a=(n?Aue:Iue)(e,r,i,o);return M(a,({isVariadic:n,parameters:o,prefix:a,suffix:s})=>{const c=[...t,...a],l=[...s,...Fue(e,i,r)],_=e.getDocumentationComment(r),u=e.getJsDocTags();return{isVariadic:n,prefixDisplayParts:c,suffixDisplayParts:l,separatorDisplayParts:Eue,parameters:o,documentation:_,tags:u}})}(e,f,n,c,u,s));0!==a&&Tn.assertLessThan(a,r);let g=0,h=0;for(let n=0;n1)){let e=0;for(const t of i){if(t.isVariadic||t.parameters.length>=r){g=h+e;break}e++}}h+=i.length}Tn.assert(-1!==g);const y={items:q(m,yt),applicableSpan:i,selectedItemIndex:g,argumentIndex:a,argumentCount:r},v=y.items[g];if(v.isVariadic){const e=N(v.parameters,e=>!!e.isRest);-1Oue(e,n,r,i,a)),c=e.getDocumentationComment(n),l=e.getJsDocTags(n);return{isVariadic:!1,prefixDisplayParts:[...o,IY(30)],suffixDisplayParts:[IY(32)],separatorDisplayParts:Eue,parameters:s,documentation:c,tags:l}}var Eue=[IY(28),FY()];function Fue(e,t,n){return KY(r=>{r.writePunctuation(":"),r.writeSpace(" ");const i=n.getTypePredicateOfSignature(e);i?n.writeTypePredicate(i,t,void 0,r):n.writeType(n.getReturnTypeOfSignature(e),t,void 0,r)})}function Aue(e,t,n,r){const i=(e.target||e).typeParameters,o=yU(),a=(i||p).map(e=>Oue(e,t,n,r,o)),s=e.thisParameter?[t.symbolToParameterDeclaration(e.thisParameter,n,Nue)]:[];return t.getExpandedParameters(e).map(e=>{const i=aw.createNodeArray([...s,...M(e,e=>t.symbolToParameterDeclaration(e,n,Nue))]),c=KY(e=>{o.writeList(2576,i,r,e)});return{isVariadic:!1,parameters:a,prefix:[IY(30)],suffix:[IY(32),...c]}})}function Iue(e,t,n,r){const i=yU(),o=KY(o=>{if(e.typeParameters&&e.typeParameters.length){const a=aw.createNodeArray(e.typeParameters.map(e=>t.typeParameterToDeclaration(e,n,Nue)));i.writeList(53776,a,r,o)}}),a=t.getExpandedParameters(e),s=t.hasEffectiveRestParameter(e)?1===a.length?e=>!0:e=>{var t;return!!(e.length&&32768&(null==(t=dt(e[e.length-1],sd))?void 0:t.links.checkFlags))}:e=>!1;return a.map(e=>({isVariadic:s(e),parameters:e.map(e=>function(e,t,n,r,i){const o=KY(o=>{const a=t.symbolToParameterDeclaration(e,n,Nue);i.writeNode(4,a,r,o)}),a=t.isOptionalParameter(e.valueDeclaration),s=sd(e)&&!!(32768&e.links.checkFlags);return{name:e.name,documentation:e.getDocumentationComment(t),displayParts:o,isOptional:a,isRest:s}}(e,t,n,r,i)),prefix:[...o,IY(21)],suffix:[IY(22)]}))}function Oue(e,t,n,r,i){const o=KY(o=>{const a=t.typeParameterToDeclaration(e,n,Nue);i.writeNode(4,a,r,o)});return{name:e.symbol.name,documentation:e.symbol.getDocumentationComment(t),displayParts:o,isOptional:!1,isRest:!1}}var jue={};function Lue(e,t){var n,r;let i={textSpan:nc(t.getFullStart(),t.getEnd())},o=t;e:for(;;){const i=Bue(o);if(!i.length)break;for(let c=0;ce)break e;const d=Fe(ws(t.text,_.end));if(d&&2===d.kind&&s(d.pos,d.end),Mue(t,e,_)){if(du(_)&&g_(o)&&!dx(_.getStart(t),_.getEnd(),t)&&a(_.getStart(t),_.getEnd()),jP(_)||IP(_)||RN(_)||JN(_)||l&&RN(l)||tE(_)&&LP(o)||zF(_)&&tE(o)||eE(_)&&zF(o)&&1===i.length||ZE(_)||mF(_)||fF(_)){o=_;break}if(IP(o)&&u&&Gl(u)){a(_.getFullStart()-2,u.getStart()+1)}const e=zF(_)&&Uue(l)&&Vue(u)&&!dx(l.getStart(),u.getStart(),t);let s=e?l.getEnd():_.getStart();const c=e?u.getStart():Wue(t,_);if(Ju(_)&&(null==(n=_.jsDoc)?void 0:n.length)&&a(Ne(_.jsDoc).getStart(),c),zF(_)){const e=_.getChildren()[0];e&&Ju(e)&&(null==(r=e.jsDoc)?void 0:r.length)&&e.getStart()!==_.pos&&(s=Math.min(s,Ne(e.jsDoc).getStart()))}a(s,c),(ON(_)||G_(_))&&a(s+1,c-1),o=_;break}if(c===i.length-1)break e}}return i;function a(t,n){if(t!==n){const r=nc(t,n);(!i||!vY(r,i.textSpan)&&Zs(r,e))&&(i={textSpan:r,...i&&{parent:i}})}}function s(e,n){a(e,n);let r=e;for(;47===t.text.charCodeAt(r);)r++;a(r,n)}}function Mue(e,t,n){if(Tn.assert(n.pos<=t),tLue});var Rue=fn(dE,uE);function Bue(e){var t;if(QE(e))return Jue(e.getChildAt(0).getChildren(),Rue);if(HD(e)){const[t,...n]=e.getChildren(),r=Tn.checkDefined(n.pop());Tn.assertEqual(t.kind,19),Tn.assertEqual(r.kind,20);const i=Jue(n,t=>t===e.readonlyToken||148===t.kind||t===e.questionToken||58===t.kind);return[t,que(zue(Jue(i,({kind:e})=>23===e||168===e||24===e),({kind:e})=>59===e)),r]}if(hD(e)){const n=Jue(e.getChildren(),t=>t===e.name||E(e.modifiers,t)),r=320===(null==(t=n[0])?void 0:t.kind)?n[0]:void 0,i=zue(r?n.slice(1):n,({kind:e})=>59===e);return r?[r,que(i)]:i}if(mD(e)){const t=Jue(e.getChildren(),t=>t===e.dotDotDotToken||t===e.name);return zue(Jue(t,n=>n===t[0]||n===e.questionToken),({kind:e})=>64===e)}return eP(e)?zue(e.getChildren(),({kind:e})=>64===e):e.getChildren()}function Jue(e,t){const n=[];let r;for(const i of e)t(i)?(r=r||[],r.push(i)):(r&&(n.push(que(r)),r=void 0),n.push(i));return r&&n.push(que(r)),n}function zue(e,t,n=!0){if(e.length<2)return e;const r=N(e,t);if(-1===r)return e;const i=e.slice(0,r),o=e[r],a=Ee(e),s=n&&27===a.kind,c=e.slice(r+1,s?e.length-1:void 0),l=ue([i.length?que(i):void 0,o,c.length?que(c):void 0]);return s?l.concat(a):l}function que(e){return Tn.assertGreaterThanOrEqual(e.length,1),BT(kI.createSyntaxList(e),e[0].pos,Ee(e).end)}function Uue(e){const t=e&&e.kind;return 19===t||23===t||21===t||286===t}function Vue(e){const t=e&&e.kind;return 20===t||24===t||22===t||287===t}function Wue(e,t){switch(t.kind){case 341:case 338:case 348:case 346:case 343:return e.getLineEndOfPosition(t.getStart());default:return t.getEnd()}}var $ue={};a($ue,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>Zue,getSymbolKind:()=>Kue,getSymbolModifiers:()=>Que});var Hue=70246400;function Kue(e,t,n){const r=Gue(e,t,n);if(""!==r)return r;const i=Tx(t);return 32&i?id(t,231)?"local class":"class":384&i?"enum":524288&i?"type":64&i?"interface":262144&i?"type parameter":8&i?"enum member":2097152&i?"alias":1536&i?"module":r}function Gue(e,t,n){const r=e.getRootSymbols(t);if(1===r.length&&8192&Ne(r).flags&&0!==e.getTypeOfSymbolAtLocation(t,n).getNonNullableType().getCallSignatures().length)return"method";if(e.isUndefinedSymbol(t))return"var";if(e.isArgumentsSymbol(t))return"local var";if(110===n.kind&&nu(n)||wv(n))return"parameter";const i=Tx(t);if(3&i)return NY(t)?"parameter":t.valueDeclaration&&df(t.valueDeclaration)?"const":t.valueDeclaration&&uf(t.valueDeclaration)?"using":t.valueDeclaration&&_f(t.valueDeclaration)?"await using":h(t.declarations,ff)?"let":ede(t)?"local var":"var";if(16&i)return ede(t)?"local function":"function";if(32768&i)return"getter";if(65536&i)return"setter";if(8192&i)return"method";if(16384&i)return"constructor";if(131072&i)return"index";if(4&i){if(33554432&i&&6&t.links.checkFlags){const r=h(e.getRootSymbols(t),e=>{if(98311&e.getFlags())return"property"});if(!r){return e.getTypeOfSymbolAtLocation(t,n).getCallSignatures().length?"method":"property"}return r}return"property"}return""}function Xue(e){if(e.declarations&&e.declarations.length){const[t,...n]=e.declarations,r=xQ(t,g(n)&&h0(t)&&ee(n,e=>!h0(e))?65536:0);if(r)return r.split(",")}return[]}function Que(e,t){if(!t)return"";const n=new Set(Xue(t));if(2097152&t.flags){const r=e.getAliasedSymbol(t);r!==t&&h(Xue(r),e=>{n.add(e)})}return 16777216&t.flags&&n.add("optional"),n.size>0?We(n.values()).join(","):""}function Yue(e,t,n,r,i,o,a,s){var c;const l=[];let _=[],u=[];const d=Tx(t);let f=1&a?Gue(e,t,i):"",m=!1;const g=110===i.kind&&Fm(i)||wv(i);let y,b,x=!1;if(110===i.kind&&!g)return{displayParts:[AY(110)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==f||32&d||2097152&d){if("getter"===f||"setter"===f){const e=C(t.declarations,e=>e.name===i);if(e)switch(e.kind){case 177:f="getter";break;case 178:f="setter";break;case 172:f="accessor";break;default:Tn.assertNever(e)}else f="property"}let n,a;if(o??(o=g?e.getTypeAtLocation(i):e.getTypeOfSymbolAtLocation(t,i)),i.parent&&211===i.parent.kind){const e=i.parent.name;(e===i||e&&0===e.getFullWidth())&&(i=i.parent)}if(K_(i)?a=i:(KG(i)||GG(i)||i.parent&&(Iu(i.parent)||sP(i.parent))&&f_(t.valueDeclaration))&&(a=i.parent),a){n=e.getResolvedSignature(a);const i=214===a.kind||oP(a)&&108===a.expression.kind,s=i?o.getConstructSignatures():o.getCallSignatures();if(!n||E(s,n.target)||E(s,n)||(n=s.length?s[0]:void 0),n){switch(i&&32&d?(f="constructor",D(o.symbol,f)):2097152&d?(f="alias",P(f),l.push(FY()),i&&(4&n.flags&&(l.push(AY(128)),l.push(FY())),l.push(AY(105)),l.push(FY())),N(t)):D(t,f),f){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":l.push(IY(59)),l.push(FY()),16&Ox(o)||!o.symbol||(ge(l,XY(e,o.symbol,r,void 0,5)),l.push(HY())),i&&(4&n.flags&&(l.push(AY(128)),l.push(FY())),l.push(AY(105)),l.push(FY())),F(n,s,262144);break;default:F(n,s)}m=!0,x=s.length>1}}else if(gX(i)&&!(98304&d)||137===i.kind&&176===i.parent.kind){const r=i.parent;if(t.declarations&&C(t.declarations,e=>e===(137===i.kind?r.parent:r))){const i=176===r.kind?o.getNonNullableType().getConstructSignatures():o.getNonNullableType().getCallSignatures();n=e.isImplementationOfOverload(r)?i[0]:e.getSignatureFromDeclaration(r),176===r.kind?(f="constructor",D(o.symbol,f)):D(179!==r.kind||2048&o.symbol.flags||4096&o.symbol.flags?t:o.symbol,f),n&&F(n,i),m=!0,x=i.length>1}}}if(32&d&&!m&&!g&&(T(),id(t,231)?P("local class"):l.push(AY(86)),l.push(FY()),N(t),A(t,n)),64&d&&2&a&&(k(),l.push(AY(120)),l.push(FY()),N(t),A(t,n)),524288&d&&2&a&&(k(),l.push(AY(156)),l.push(FY()),N(t),A(t,n),l.push(FY()),l.push(OY(64)),l.push(FY()),ge(l,GY(e,i.parent&&Il(i.parent)?e.getTypeAtLocation(i.parent):e.getDeclaredTypeOfSymbol(t),r,8388608))),384&d&&(k(),ee(t.declarations,e=>aE(e)&&cf(e))&&(l.push(AY(87)),l.push(FY())),l.push(AY(94)),l.push(FY()),N(t)),1536&d&&!g){k();const e=id(t,267),n=e&&e.name&&80===e.name.kind;l.push(AY(n?145:144)),l.push(FY()),N(t)}if(262144&d&&2&a)if(k(),l.push(IY(21)),l.push(RY("type parameter")),l.push(IY(22)),l.push(FY()),N(t),t.parent)w(),N(t.parent,r),A(t.parent,r);else{const r=id(t,168);if(void 0===r)return Tn.fail();const i=r.parent;if(i)if(f_(i)){w();const t=e.getSignatureFromDeclaration(i);180===i.kind?(l.push(AY(105)),l.push(FY())):179!==i.kind&&i.name&&N(i.symbol),ge(l,QY(e,t,n,32))}else oE(i)&&(w(),l.push(AY(156)),l.push(FY()),N(i.symbol),A(i.symbol,n))}if(8&d){f="enum member",D(t,"enum member");const n=null==(c=t.declarations)?void 0:c[0];if(306===(null==n?void 0:n.kind)){const t=e.getConstantValue(n);void 0!==t&&(l.push(FY()),l.push(OY(64)),l.push(FY()),l.push(EY(lp(t),"number"==typeof t?7:8)))}}if(2097152&t.flags){if(k(),!m||0===_.length&&0===u.length){const n=e.getAliasedSymbol(t);if(n!==t&&n.declarations&&n.declarations.length>0){const i=n.declarations[0],s=jc(i);if(s&&!m){const c=fp(i)&&Wv(i,128),_="default"!==t.name&&!c,u=Yue(e,n,Dd(i),r,s,o,a,_?t:n);l.push(...u.displayParts),l.push(HY()),y=u.documentation,b=u.tags}else y=n.getContextualDocumentationComment(i,e),b=n.getJsDocTags(e)}}if(t.declarations)switch(t.declarations[0].kind){case 270:l.push(AY(95)),l.push(FY()),l.push(AY(145));break;case 277:l.push(AY(95)),l.push(FY()),l.push(AY(t.declarations[0].isExportEquals?64:90));break;case 281:l.push(AY(95));break;default:l.push(AY(102))}l.push(FY()),N(t),h(t.declarations,t=>{if(271===t.kind){const n=t;if(Om(n))l.push(FY()),l.push(OY(64)),l.push(FY()),l.push(AY(149)),l.push(IY(21)),l.push(EY(tp(jm(n)),8)),l.push(IY(22));else{const t=e.getSymbolAtLocation(n.moduleReference);t&&(l.push(FY()),l.push(OY(64)),l.push(FY()),N(t,r))}return!0}})}if(!m)if(""!==f){if(o)if(g?(k(),l.push(AY(110))):D(t,f),"property"===f||"accessor"===f||"getter"===f||"setter"===f||"JSX attribute"===f||3&d||"local var"===f||"index"===f||"using"===f||"await using"===f||g){if(l.push(IY(59)),l.push(FY()),o.symbol&&262144&o.symbol.flags&&"index"!==f){const t=KY(t=>{const n=e.typeParameterToDeclaration(o,r,Hue);S().writeNode(4,n,Dd(kc(r)),t)});ge(l,t)}else ge(l,GY(e,o,r));if(sd(t)&&t.links.target&&sd(t.links.target)&&t.links.target.links.tupleLabelDeclaration){const e=t.links.target.links.tupleLabelDeclaration;Tn.assertNode(e.name,QN),l.push(FY()),l.push(IY(21)),l.push(RY(wc(e.name))),l.push(IY(22))}}else if(16&d||8192&d||16384&d||131072&d||98304&d||"method"===f){const e=o.getNonNullableType().getCallSignatures();e.length&&(F(e[0],e),x=e.length>1)}}else f=Kue(e,t,i);if(0!==_.length||x||(_=t.getContextualDocumentationComment(r,e)),0===_.length&&4&d&&t.parent&&t.declarations&&h(t.parent.declarations,e=>307===e.kind))for(const n of t.declarations){if(!n.parent||226!==n.parent.kind)continue;const t=e.getSymbolAtLocation(n.parent.right);if(t&&(_=t.getDocumentationComment(e),u=t.getJsDocTags(e),_.length>0))break}if(0===_.length&&QN(i)&&t.valueDeclaration&&eP(t.valueDeclaration)){const n=t.valueDeclaration,r=n.parent,i=n.propertyName||n.name;if(QN(i)&&YD(r)){const t=ey(i),n=e.getTypeAtLocation(r);_=v(n.isUnion()?n.types:[n],n=>{const r=n.getProperty(t);return r?r.getDocumentationComment(e):void 0})||p}}return 0!==u.length||x||(u=t.getContextualJsDocTags(r,e)),0===_.length&&y&&(_=y),0===u.length&&b&&(u=b),{displayParts:l,documentation:_,symbolKind:f,tags:0===u.length?void 0:u};function S(){return yU()}function k(){l.length&&l.push(HY()),T()}function T(){s&&(P("alias"),l.push(FY()))}function w(){l.push(FY()),l.push(AY(103)),l.push(FY())}function N(r,i){let o;s&&r===t&&(r=s),"index"===f&&(o=e.getIndexInfosOfIndexSymbol(r));let a=[];131072&r.flags&&o?(r.parent&&(a=XY(e,r.parent)),a.push(IY(23)),o.forEach((t,n)=>{a.push(...GY(e,t.keyType)),n!==o.length-1&&(a.push(FY()),a.push(IY(52)),a.push(FY()))}),a.push(IY(24))):a=XY(e,r,i||n,void 0,7),ge(l,a),16777216&t.flags&&l.push(IY(58))}function D(e,t){k(),t&&(P(t),e&&!ee(e.declarations,e=>uP(e)||(_P(e)||kP(e))&&!e.name)&&(l.push(FY()),N(e)))}function P(e){switch(e){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":return void l.push(MY(e));default:return l.push(IY(21)),l.push(MY(e)),void l.push(IY(22))}}function F(t,n,i=0){ge(l,QY(e,t,r,32|i)),n.length>1&&(l.push(FY()),l.push(IY(21)),l.push(OY(40)),l.push(EY((n.length-1).toString(),7)),l.push(FY()),l.push(RY(2===n.length?"overload":"overloads")),l.push(IY(22))),_=t.getDocumentationComment(e),u=t.getJsDocTags(),n.length>1&&0===_.length&&0===u.length&&(_=n[0].getDocumentationComment(e),u=n[0].getJsDocTags().filter(e=>"deprecated"!==e.name))}function A(t,n){const r=KY(r=>{const i=e.symbolToTypeParameterDeclarations(t,n,Hue);S().writeList(53776,i,Dd(kc(n)),r)});ge(l,r)}}function Zue(e,t,n,r,i,o=$G(i),a){return Yue(e,t,n,r,i,void 0,o,a)}function ede(e){return!e.parent&&h(e.declarations,e=>{if(218===e.kind)return!0;if(260!==e.kind&&262!==e.kind)return!1;for(let t=e.parent;!Hf(t);t=t.parent)if(307===t.kind||268===t.kind)return!1;return!0})}var tde={};function nde(e){const t=e.__pos;return Tn.assert("number"==typeof t),t}function rde(e,t){Tn.assert("number"==typeof t),e.__pos=t}function ide(e){const t=e.__end;return Tn.assert("number"==typeof t),t}function ode(e,t){Tn.assert("number"==typeof t),e.__end=t}a(tde,{ChangeTracker:()=>hde,LeadingTriviaOption:()=>ade,TrailingTriviaOption:()=>sde,applyChanges:()=>xde,assignPositionsToNode:()=>Tde,createWriter:()=>wde,deleteNode:()=>Dde,isThisTypeAnnotatable:()=>mde,isValidLocationToAddComment:()=>Nde});var ade=(e=>(e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll",e[e.JSDoc=2]="JSDoc",e[e.StartLine=3]="StartLine",e))(ade||{}),sde=(e=>(e[e.Exclude=0]="Exclude",e[e.ExcludeWhitespace=1]="ExcludeWhitespace",e[e.Include=2]="Include",e))(sde||{});function cde(e,t){return ds(e,t,!1,!0)}var lde={leadingTriviaOption:0,trailingTriviaOption:0};function _de(e,t,n,r){return{pos:ude(e,t,r),end:pde(e,n,r)}}function ude(e,t,n,r=!1){var i,o;const{leadingTriviaOption:a}=n;if(0===a)return t.getStart(e);if(3===a){const n=t.getStart(e),r=kX(n,e);return wX(t,r)?r:n}if(2===a){const n=Cf(t,e.text);if(null==n?void 0:n.length)return kX(n[0].pos,e)}const s=t.getFullStart(),c=t.getStart(e);if(s===c)return c;const l=kX(s,e);if(kX(c,e)===l)return 1===a?s:c;if(r){const t=(null==(i=Cs(e.text,s))?void 0:i[0])||(null==(o=ws(e.text,s))?void 0:o[0]);if(t)return ds(e.text,t.end,!0,!0)}const _=s>0?1:0;let u=Ad(hv(e,l)+_,e);return u=cde(e.text,u),Ad(hv(e,u),e)}function dde(e,t,n){const{end:r}=t,{trailingTriviaOption:i}=n;if(2===i){const n=ws(e.text,r);if(n){const r=hv(e,t.end);for(const t of n){if(2===t.kind||hv(e,t.pos)>r)break;if(hv(e,t.end)>r)return ds(e.text,t.end,!0,!0)}}}}function pde(e,t,n){var r;const{end:i}=t,{trailingTriviaOption:o}=n;if(0===o)return i;if(1===o){const t=ne(ws(e.text,i),Cs(e.text,i)),n=null==(r=null==t?void 0:t[t.length-1])?void 0:r.end;return n||i}const a=dde(e,t,n);if(a)return a;const s=ds(e.text,i,!0);return s===i||2!==o&&!os(e.text.charCodeAt(s-1))?i:s}function fde(e,t){return!!t&&!!e.parent&&(28===t.kind||27===t.kind&&210===e.parent.kind)}function mde(e){return _P(e)||nE(e)}var gde,hde=class e{constructor(e,t){this.newLineCharacter=e,this.formatContext=t,this.changes=[],this.classesWithNodesInsertedAtStart=new Map,this.deletedNodes=[]}static fromContext(t){return new e($Y(t.host,t.formatContext.options),t.formatContext)}static with(t,n){const r=e.fromContext(t);return n(r),r.getChanges()}pushRaw(e,t){Tn.assertEqual(e.fileName,t.fileName);for(const n of t.textChanges)this.changes.push({kind:3,sourceFile:e,text:n.newText,range:BQ(n.span)})}deleteRange(e,t){this.changes.push({kind:0,sourceFile:e,range:t})}delete(e,t){this.deletedNodes.push({sourceFile:e,node:t})}deleteNode(e,t,n={leadingTriviaOption:1}){this.deleteRange(e,_de(e,t,t,n))}deleteNodes(e,t,n={leadingTriviaOption:1},r){for(const i of t){const t=ude(e,i,n,r),o=pde(e,i,n);this.deleteRange(e,{pos:t,end:o}),r=!!dde(e,i,n)}}deleteModifier(e,t){this.deleteRange(e,{pos:t.getStart(e),end:ds(e.text,t.end,!0)})}deleteNodeRange(e,t,n,r={leadingTriviaOption:1}){const i=ude(e,t,r),o=pde(e,n,r);this.deleteRange(e,{pos:i,end:o})}deleteNodeRangeExcludingEnd(e,t,n,r={leadingTriviaOption:1}){const i=ude(e,t,r),o=void 0===n?e.text.length:ude(e,n,r);this.deleteRange(e,{pos:i,end:o})}replaceRange(e,t,n,r={}){this.changes.push({kind:1,sourceFile:e,range:t,options:r,node:n})}replaceNode(e,t,n,r=lde){this.replaceRange(e,_de(e,t,t,r),n,r)}replaceNodeRange(e,t,n,r,i=lde){this.replaceRange(e,_de(e,t,n,i),r,i)}replaceRangeWithNodes(e,t,n,r={}){this.changes.push({kind:2,sourceFile:e,range:t,options:r,nodes:n})}replaceNodeWithNodes(e,t,n,r=lde){this.replaceRangeWithNodes(e,_de(e,t,t,r),n,r)}replaceNodeWithText(e,t,n){this.replaceRangeWithText(e,_de(e,t,t,lde),n)}replaceNodeRangeWithNodes(e,t,n,r,i=lde){this.replaceRangeWithNodes(e,_de(e,t,n,i),r,i)}nodeHasTrailingComment(e,t,n=lde){return!!dde(e,t,n)}nextCommaToken(e,t){const n=nQ(t,t.parent,e);return n&&28===n.kind?n:void 0}replacePropertyAssignment(e,t,n){const r=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;this.replaceNode(e,t,n,{suffix:r})}insertNodeAt(e,t,n,r={}){this.replaceRange(e,Qb(t),n,r)}insertNodesAt(e,t,n,r={}){this.replaceRangeWithNodes(e,Qb(t),n,r)}insertNodeAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertNodesAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertAtTopOfFile(e,t,n){const r=function(e){let t;for(const n of e.statements){if(!vf(n))break;t=n}let n=0;const r=e.text;if(t)return n=t.end,c(),n;const i=Ns(r);void 0!==i&&(n=i.length,c());const o=Cs(r,n);if(!o)return n;let a,s;for(const t of o){if(3===t.kind){if(Kd(r,t.pos)){a={range:t,pinnedOrTripleSlash:!0};continue}}else if(Hd(r,t.pos,t.end)){a={range:t,pinnedOrTripleSlash:!0};continue}if(a){if(a.pinnedOrTripleSlash)break;if(e.getLineAndCharacterOfPosition(t.pos).line>=e.getLineAndCharacterOfPosition(a.range.end).line+2)break}if(e.statements.length){void 0===s&&(s=e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line);if(s_t(e.comment)?aw.createJSDocText(e.comment):e.comment),r=Fe(t.jsDoc);return r&&dx(r.pos,r.end,e)&&0===g(n)?void 0:aw.createNodeArray(k(n,aw.createJSDocText("\n")))}replaceJSDocComment(e,t,n){this.insertJsdocCommentBefore(e,function(e){if(219!==e.kind)return e;const t=172===e.parent.kind?e.parent:e.parent.parent;return t.jsDoc=e.jsDoc,t}(t),aw.createJSDocComment(this.createJSDocText(e,t),aw.createNodeArray(n)))}addJSDocTags(e,t,n){const r=q(t.jsDoc,e=>e.tags),i=n.filter(e=>!r.some((t,n)=>{const i=function(e,t){if(e.kind!==t.kind)return;switch(e.kind){case 341:{const n=e,r=t;return QN(n.name)&&QN(r.name)&&n.name.escapedText===r.name.escapedText?aw.createJSDocParameterTag(void 0,r.name,!1,r.typeExpression,r.isNameFirst,n.comment):void 0}case 342:return aw.createJSDocReturnTag(void 0,t.typeExpression,e.comment);case 344:return aw.createJSDocTypeTag(void 0,t.typeExpression,e.comment)}}(t,e);return i&&(r[n]=i),!!i}));this.replaceJSDocComment(e,t,[...r,...i])}filterJSDocTags(e,t,n){this.replaceJSDocComment(e,t,O(q(t.jsDoc,e=>e.tags),n))}replaceRangeWithText(e,t,n){this.changes.push({kind:3,sourceFile:e,range:t,text:n})}insertText(e,t,n){this.replaceRangeWithText(e,Qb(t),n)}tryInsertTypeAnnotation(e,t,n){let r;if(f_(t)){if(r=RX(t,22,e),!r){if(!uP(t))return!1;r=Ne(t.parameters)}}else r=(260===t.kind?t.exclamationToken:t.questionToken)??t.name;return this.insertNodeAt(e,r.end,n,{prefix:": "}),!0}tryInsertThisTypeAnnotation(e,t,n){const r=RX(t,21,e).getStart(e)+1,i=t.parameters.length?", ":"";this.insertNodeAt(e,r,n,{prefix:"this: ",suffix:i})}insertTypeParameters(e,t,n){const r=(RX(t,21,e)||Ne(t.parameters)).getStart(e);this.insertNodesAt(e,r,n,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(e,t,n){return wu(e)||x_(e)?{suffix:n?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:eE(e)?{suffix:", "}:mD(e)?mD(t)?{suffix:", "}:{}:ON(e)&&dE(e.parent)||xE(e)?{suffix:", "}:SE(e)?{suffix:","+(n?this.newLineCharacter:" ")}:Tn.failBadSyntaxKind(e)}insertNodeAtConstructorStart(e,t,n){const r=Ce(t.body.statements);r&&t.body.multiLine?this.insertNodeBefore(e,r,n):this.replaceConstructorBody(e,t,[n,...t.body.statements])}insertNodeAtConstructorStartAfterSuperCall(e,t,n){const r=C(t.body.statements,e=>RP(e)&&mf(e.expression));r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}insertNodeAtConstructorEnd(e,t,n){const r=Pe(t.body.statements);r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}replaceConstructorBody(e,t,n){this.replaceNode(e,t.body,aw.createBlock(n,!0))}insertNodeAtEndOfScope(e,t,n){const r=ude(e,t.getLastToken(),{});this.insertNodeAt(e,r,n,{prefix:os(e.text.charCodeAt(t.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtObjectStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtStartWorker(e,t,n){const r=this.guessIndentationFromExistingMembers(e,t)??this.computeIndentationForNewMember(e,t);this.insertNodeAt(e,bde(t).pos,n,this.getInsertNodeAtStartInsertOptions(e,t,r))}guessIndentationFromExistingMembers(e,t){let n,r=t;for(const i of bde(t)){if(ox(r,i,e))return;const t=i.getStart(e),o=Ede.SmartIndenter.findFirstNonWhitespaceColumn(kX(t,e),t,e,this.formatContext.options);if(void 0===n)n=o;else if(o!==n)return;r=i}return n}computeIndentationForNewMember(e,t){const n=t.getStart(e);return Ede.SmartIndenter.findFirstNonWhitespaceColumn(kX(n,e),n,e,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(e,t,n){const r=0===bde(t).length,i=Bx(this.classesWithNodesInsertedAtStart,KB(t),{node:t,sourceFile:e}),o=nP(t)&&(!sf(e)||!r);return{indentation:n,prefix:(nP(t)&&sf(e)&&r&&!i?",":"")+this.newLineCharacter,suffix:o?",":iE(t)&&r?";":""}}insertNodeAfterComma(e,t,n){const r=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAtEndOfList(e,t,n){this.insertNodeAt(e,t.end,n,{prefix:", "})}insertNodesAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,Ne(n));this.insertNodesAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfterWorker(e,t,n){var r,i;i=n,((hD(r=t)||yD(r))&&E_(i)&&167===i.name.kind||Cu(r)&&Cu(i))&&59!==e.text.charCodeAt(t.end-1)&&this.replaceRange(e,Qb(t.end),aw.createToken(27));return pde(e,t,{})}getInsertNodeAfterOptions(e,t){const n=this.getInsertNodeAfterOptionsWorker(t);return{...n,prefix:t.end===e.end&&wu(t)?n.prefix?`\n${n.prefix}`:"\n":n.prefix}}getInsertNodeAfterOptionsWorker(e){switch(e.kind){case 263:case 267:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 260:case 11:case 80:return{prefix:", "};case 303:return{suffix:","+this.newLineCharacter};case 95:return{prefix:" "};case 169:return{};default:return Tn.assert(wu(e)||E_(e)),{suffix:this.newLineCharacter}}}insertName(e,t,n){if(Tn.assert(!t.name),219===t.kind){const r=RX(t,39,e),i=RX(t,21,e);i?(this.insertNodesAt(e,i.getStart(e),[aw.createToken(100),aw.createIdentifier(n)],{joiner:" "}),Dde(this,e,r)):(this.insertText(e,Ne(t.parameters).getStart(e),`function ${n}(`),this.replaceRange(e,r,aw.createToken(22))),241!==t.body.kind&&(this.insertNodesAt(e,t.body.getStart(e),[aw.createToken(19),aw.createToken(107)],{joiner:" ",suffix:" "}),this.insertNodesAt(e,t.body.end,[aw.createToken(27),aw.createToken(20)],{joiner:" "}))}else{const r=RX(t,218===t.kind?100:86,e).end;this.insertNodeAt(e,r,aw.createIdentifier(n),{prefix:" "})}}insertExportModifier(e,t){this.insertText(e,t.getStart(e),"export ")}insertImportSpecifierAtIndex(e,t,n,r){const i=n.elements[r-1];i?this.insertNodeInListAfter(e,i,t):this.insertNodeBefore(e,n.elements[0],t,!dx(n.elements[0].getStart(),n.parent.parent.getStart(),e))}insertNodeInListAfter(e,t,n,r=Ede.SmartIndenter.getContainingList(t,e)){if(!r)return void Tn.fail("node is not a list element");const i=rp(r,t);if(i<0)return;const o=t.getEnd();if(i!==r.length-1){const o=YX(e,t.end);if(o&&fde(t,o)){const t=r[i+1],a=cde(e.text,t.getFullStart()),s=`${Va(o.kind)}${e.text.substring(o.end,a)}`;this.insertNodesAt(e,a,[n],{suffix:s})}}else{const a=t.getStart(e),s=kX(a,e);let c,l=!1;if(1===r.length)c=28;else{const n=rQ(t.pos,e);c=fde(t,n)?n.kind:28;l=kX(r[i-1].getStart(e),e)!==s}if(!function(e,t){let n=t;for(;n{const[n,r]=function(e,t){const n=RX(e,19,t),r=RX(e,20,t);return[null==n?void 0:n.end,null==r?void 0:r.end]}(e,t);if(void 0!==n&&void 0!==r){const i=0===bde(e).length,o=dx(n,r,t);i&&o&&n!==r-1&&this.deleteRange(t,Qb(n,r-1)),o&&this.insertText(t,r-1,this.newLineCharacter)}})}finishDeleteDeclarations(){const e=new Set;for(const{sourceFile:t,node:n}of this.deletedNodes)this.deletedNodes.some(e=>e.sourceFile===t&&CX(e.node,n))||(ct(n)?this.deleteRange(t,CT(t,n)):Sde.deleteDeclaration(this,e,t,n));e.forEach(t=>{const n=t.getSourceFile(),r=Ede.SmartIndenter.getContainingList(t,n);if(t!==Ee(r))return;const i=D(r,t=>!e.has(t),r.length-2);-1!==i&&this.deleteRange(n,{pos:r[i].end,end:yde(n,r[i+1])})})}getChanges(e){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();const t=gde.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,e);return this.newFileChanges&&this.newFileChanges.forEach((e,n)=>{t.push(gde.newFileChanges(n,e,this.newLineCharacter,this.formatContext))}),t}createNewFile(e,t,n){this.insertStatementsInNewFile(t,n,e)}};function yde(e,t){return ds(e.text,ude(e,t,{leadingTriviaOption:1}),!1,!0)}function vde(e,t,n,r){const i=yde(e,r);if(void 0===n||dx(pde(e,t,{}),i,e))return i;const o=rQ(r.getStart(e),e);if(fde(t,o)){const r=rQ(t.getStart(e),e);if(fde(n,r)){const t=ds(e.text,o.getEnd(),!0,!0);if(dx(r.getStart(e),o.getStart(e),e))return os(e.text.charCodeAt(t-1))?t-1:t;if(os(e.text.charCodeAt(t)))return t}}return i}function bde(e){return nP(e)?e.properties:e.members}function xde(e,t){for(let n=t.length-1;n>=0;n--){const{span:r,newText:i}=t[n];e=`${e.substring(0,r.start)}${i}${e.substring(Us(r))}`}return e}(e=>{function t(e,t,r,i){const o=z(t,e=>e.statements.map(t=>4===t?"":n(t,e.oldFile,r).text)).join(r),a=YI("any file name",o,{languageVersion:99,jsDocParsingMode:1},!0,e);return xde(o,Ede.formatDocument(a,i))+r}function n(e,t,n){const r=wde(n);return xU({newLine:v0(n),neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},r).writeNode(4,e,t,r),{text:r.getText(),node:Tde(e)}}e.getTextChangesFromChanges=function(e,t,r,i){return $(Qe(e,e=>e.sourceFile.path),e=>{const o=e[0].sourceFile,a=Se(e,(e,t)=>e.range.pos-t.range.pos||e.range.end-t.range.end);for(let e=0;e`${JSON.stringify(a[e].range)} and ${JSON.stringify(a[e+1].range)}`);const s=$(a,e=>{const a=RQ(e.range),s=1===e.kind?Dd(bc(e.node))??e.sourceFile:2===e.kind?Dd(bc(e.nodes[0]))??e.sourceFile:e.sourceFile,c=function(e,t,r,i,o,a){var s;if(0===e.kind)return"";if(3===e.kind)return e.text;const{options:c={},range:{pos:l}}=e,_=e=>function(e,t,r,i,{indentation:o,prefix:a,delta:s},c,l,_){const{node:u,text:d}=n(e,t,c);_&&_(u,d);const p=x0(l,t),f=void 0!==o?o:Ede.SmartIndenter.getIndentation(i,r,p,a===c||kX(i,t)===i);void 0===s&&(s=Ede.SmartIndenter.shouldIndentChildNode(p,e)&&p.indentSize||0);const m={text:d,getLineAndCharacterOfPosition(e){return ns(this,e)}},g=Ede.formatNodeGivenIndentation(u,m,t.languageVariant,f,s,{...l,options:p});return xde(d,g)}(e,t,r,l,c,i,o,a),u=2===e.kind?e.nodes.map(e=>Qt(_(e),i)).join((null==(s=e.options)?void 0:s.joiner)||i):_(e.node),d=void 0!==c.indentation||kX(l,t)===l?u:u.replace(/^\s+/,"");return(c.prefix||"")+d+(!c.suffix||Xt(d,c.suffix)?"":c.suffix)}(e,s,o,t,r,i);if(a.length!==c.length||!p0(s.text,c,a.start))return zQ(a,c)});return s.length>0?{fileName:o.fileName,textChanges:s}:void 0})},e.newFileChanges=function(e,n,r,i){const o=t(Mk(e),n,r,i);return{fileName:e,textChanges:[zQ(tc(0,0),o)],isNewFile:!0}},e.newFileChangesWorker=t,e.getNonformattedText=n})(gde||(gde={}));var Sde,kde={...Uq,factory:KC(1|Uq.factory.flags,Uq.factory.baseFactory)};function Tde(e){const t=fJ(e,Tde,kde,Cde,Tde),n=my(t)?t:Object.create(t);return BT(n,nde(e),ide(e)),n}function Cde(e,t,n,r,i){const o=oJ(e,t,n,r,i);if(!o)return o;Tn.assert(e);const a=o===e?aw.createNodeArray(o.slice(0)):o;return BT(a,nde(e),ide(e)),a}function wde(e){let t=0;const n=Xy(e);function r(e,r){if(r||!function(e){return ds(e,0)===e.length}(e)){t=n.getTextPos();let r=0;for(;rs(e.charCodeAt(e.length-r-1));)r++;t-=r}}return{onBeforeEmitNode:e=>{e&&rde(e,t)},onAfterEmitNode:e=>{e&&ode(e,t)},onBeforeEmitNodeArray:e=>{e&&rde(e,t)},onAfterEmitNodeArray:e=>{e&&ode(e,t)},onBeforeEmitToken:e=>{e&&rde(e,t)},onAfterEmitToken:e=>{e&&ode(e,t)},write:function(e){n.write(e),r(e,!1)},writeComment:function(e){n.writeComment(e)},writeKeyword:function(e){n.writeKeyword(e),r(e,!1)},writeOperator:function(e){n.writeOperator(e),r(e,!1)},writePunctuation:function(e){n.writePunctuation(e),r(e,!1)},writeTrailingSemicolon:function(e){n.writeTrailingSemicolon(e),r(e,!1)},writeParameter:function(e){n.writeParameter(e),r(e,!1)},writeProperty:function(e){n.writeProperty(e),r(e,!1)},writeSpace:function(e){n.writeSpace(e),r(e,!1)},writeStringLiteral:function(e){n.writeStringLiteral(e),r(e,!1)},writeSymbol:function(e,t){n.writeSymbol(e,t),r(e,!1)},writeLine:function(e){n.writeLine(e)},increaseIndent:function(){n.increaseIndent()},decreaseIndent:function(){n.decreaseIndent()},getText:function(){return n.getText()},rawWrite:function(e){n.rawWrite(e),r(e,!1)},writeLiteral:function(e){n.writeLiteral(e),r(e,!0)},getTextPos:function(){return n.getTextPos()},getLine:function(){return n.getLine()},getColumn:function(){return n.getColumn()},getIndent:function(){return n.getIndent()},isAtStartOfLine:function(){return n.isAtStartOfLine()},hasTrailingComment:()=>n.hasTrailingComment(),hasTrailingWhitespace:()=>n.hasTrailingWhitespace(),clear:function(){n.clear(),t=0}}}function Nde(e,t){return!(yQ(e,t)||sQ(e,t)||_Q(e,t)||uQ(e,t))}function Dde(e,t,n,r={leadingTriviaOption:1}){const i=ude(t,n,r),o=pde(t,n,r);e.deleteRange(t,{pos:i,end:o})}function Pde(e,t,n,r){const i=Tn.checkDefined(Ede.SmartIndenter.getContainingList(r,n)),o=rp(i,r);Tn.assert(-1!==o),1!==i.length?(Tn.assert(!t.has(r),"Deleting a node twice"),t.add(r),e.deleteRange(n,{pos:yde(n,r),end:o===i.length-1?pde(n,r,{}):vde(n,r,i[o-1],i[o+1])})):Dde(e,n,r)}(e=>{function t(e,t,n){if(n.parent.name){const r=Tn.checkDefined(YX(t,n.pos-1));e.deleteRange(t,{pos:r.getStart(t),end:n.end})}else{Dde(e,t,Oh(n,272))}}e.deleteDeclaration=function(e,n,r,i){switch(i.kind){case 169:{const t=i.parent;uP(t)&&1===t.parameters.length&&!RX(t,21,r)?e.replaceNodeWithText(r,i,"()"):Pde(e,n,r,i);break}case 272:case 271:Dde(e,r,i,{leadingTriviaOption:r.imports.length&&i===Ne(r.imports).parent||i===C(r.statements,Pp)?0:Ju(i)?2:3});break;case 208:const o=i.parent;207===o.kind&&i!==Ee(o.elements)?Dde(e,r,i):Pde(e,n,r,i);break;case 260:!function(e,t,n,r){const{parent:i}=r;if(299===i.kind)return void e.deleteNodeRange(n,RX(i,21,n),RX(i,22,n));if(1!==i.declarations.length)return void Pde(e,t,n,r);const o=i.parent;switch(o.kind){case 250:case 249:e.replaceNode(n,r,aw.createObjectLiteralExpression());break;case 248:Dde(e,n,i);break;case 243:Dde(e,n,o,{leadingTriviaOption:Ju(o)?2:3});break;default:Tn.assertNever(o)}}(e,n,r,i);break;case 168:Pde(e,n,r,i);break;case 276:const a=i.parent;1===a.elements.length?t(e,r,a):Pde(e,n,r,i);break;case 274:t(e,r,i);break;case 27:Dde(e,r,i,{trailingTriviaOption:0});break;case 100:Dde(e,r,i,{leadingTriviaOption:0});break;case 263:case 262:Dde(e,r,i,{leadingTriviaOption:Ju(i)?2:3});break;default:i.parent?pE(i.parent)&&i.parent.name===i?function(e,t,n){if(n.namedBindings){const r=n.name.getStart(t),i=YX(t,n.name.end);if(i&&28===i.kind){const n=ds(t.text,i.end,!1,!0);e.deleteRange(t,{pos:r,end:n})}else Dde(e,t,n.name)}else Dde(e,t,n.parent)}(e,r,i.parent):oP(i.parent)&&E(i.parent.arguments,i)?Pde(e,n,r,i):Dde(e,r,i):Dde(e,r,i)}}})(Sde||(Sde={}));var Ede={};a(Ede,{FormattingContext:()=>Ade,FormattingRequestKind:()=>Fde,RuleAction:()=>Rde,RuleFlags:()=>Bde,SmartIndenter:()=>cfe,anyContext:()=>Mde,createTextRangeWithKind:()=>ffe,formatDocument:()=>vfe,formatNodeGivenIndentation:()=>Tfe,formatOnClosingCurly:()=>yfe,formatOnEnter:()=>mfe,formatOnOpeningCurly:()=>hfe,formatOnSemicolon:()=>gfe,formatSelection:()=>bfe,getAllRules:()=>Jde,getFormatContext:()=>efe,getFormattingScanner:()=>jde,getIndentationString:()=>Pfe,getRangeOfEnclosingComment:()=>Dfe});var Fde=(e=>(e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",e[e.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",e))(Fde||{}),Ade=class{constructor(e,t,n){this.sourceFile=e,this.formattingRequestKind=t,this.options=n}updateContext(e,t,n,r,i){this.currentTokenSpan=Tn.checkDefined(e),this.currentTokenParent=Tn.checkDefined(t),this.nextTokenSpan=Tn.checkDefined(n),this.nextTokenParent=Tn.checkDefined(r),this.contextNode=Tn.checkDefined(i),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(void 0===this.tokensAreOnSameLine){const e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line}BlockIsOnOneLine(e){const t=RX(e,19,this.sourceFile),n=RX(e,20,this.sourceFile);if(t&&n){return this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line}return!1}},Ide=Fs(99,!1,0),Ode=Fs(99,!1,1);function jde(e,t,n,r,i){const o=1===t?Ode:Ide;o.setText(e),o.resetTokenState(n);let a,s,c,l,_,u=!0;const d=i({advance:function(){_=void 0;o.getTokenFullStart()!==n?u=!!s&&4===Ee(s).kind:o.scan();a=void 0,s=void 0;let e=o.getTokenFullStart();for(;ea,lastTrailingTriviaWasNewLine:()=>u,skipToEndOf:function(e){o.resetTokenState(e.end),c=o.getTokenFullStart(),l=void 0,_=void 0,u=!1,a=void 0,s=void 0},skipToStartOf:function(e){o.resetTokenState(e.pos),c=o.getTokenFullStart(),l=void 0,_=void 0,u=!1,a=void 0,s=void 0},getTokenFullStart:()=>(null==_?void 0:_.token.pos)??o.getTokenStart(),getStartPos:()=>(null==_?void 0:_.token.pos)??o.getTokenStart()});return _=void 0,o.setText(void 0),d;function p(){const e=_?_.token.kind:o.getToken();return 1!==e&&!Vh(e)}function f(){return 1===(_?_.token.kind:o.getToken())}function m(e,t){return ql(t)&&e.token.kind!==t.kind&&(e.token.kind=t.kind),e}}var Lde,Mde=p,Rde=(e=>(e[e.None=0]="None",e[e.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",e[e.StopProcessingTokenActions=2]="StopProcessingTokenActions",e[e.InsertSpace=4]="InsertSpace",e[e.InsertNewLine=8]="InsertNewLine",e[e.DeleteSpace=16]="DeleteSpace",e[e.DeleteToken=32]="DeleteToken",e[e.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",e[e.StopAction=3]="StopAction",e[e.ModifySpaceAction=28]="ModifySpaceAction",e[e.ModifyTokenAction=96]="ModifyTokenAction",e))(Rde||{}),Bde=(e=>(e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines",e))(Bde||{});function Jde(){const e=[];for(let t=0;t<=165;t++)1!==t&&e.push(t);function t(...t){return{tokens:e.filter(e=>!t.some(t=>t===e)),isSpecific:!1}}const n={tokens:e,isSpecific:!1},r=qde([...e,3]),i=qde([...e,1]),o=Vde(83,165),a=Vde(30,79),s=[103,104,165,130,142,152],c=[80,...qQ],l=r,_=qde([80,32,3,86,95,102]),u=qde([22,3,92,113,98,93,85]);return[...[zde("IgnoreBeforeComment",n,[2,3],Mde,1),zde("IgnoreAfterLineComment",2,n,Mde,1),zde("NotSpaceBeforeColon",n,59,[wpe,epe,tpe],16),zde("SpaceAfterColon",59,n,[wpe,epe,Ape],4),zde("NoSpaceBeforeQuestionMark",n,58,[wpe,epe,tpe],16),zde("SpaceAfterQuestionMarkInConditionalOperator",58,n,[wpe,ipe],4),zde("NoSpaceAfterQuestionMark",58,n,[wpe,rpe],16),zde("NoSpaceBeforeDot",n,[25,29],[wpe,Zpe],16),zde("NoSpaceAfterDot",[25,29],n,[wpe],16),zde("NoSpaceBetweenImportParenInImportType",102,21,[wpe,Cpe],16),zde("NoSpaceAfterUnaryPrefixOperator",[46,47,55,54],[9,10,80,21,23,19,110,105],[wpe,epe],16),zde("NoSpaceAfterUnaryPreincrementOperator",46,[80,21,110,105],[wpe],16),zde("NoSpaceAfterUnaryPredecrementOperator",47,[80,21,110,105],[wpe],16),zde("NoSpaceBeforeUnaryPostincrementOperator",[80,22,24,105],46,[wpe,Xpe],16),zde("NoSpaceBeforeUnaryPostdecrementOperator",[80,22,24,105],47,[wpe,Xpe],16),zde("SpaceAfterPostincrementWhenFollowedByAdd",46,40,[wpe,Zde],4),zde("SpaceAfterAddWhenFollowedByUnaryPlus",40,40,[wpe,Zde],4),zde("SpaceAfterAddWhenFollowedByPreincrement",40,46,[wpe,Zde],4),zde("SpaceAfterPostdecrementWhenFollowedBySubtract",47,41,[wpe,Zde],4),zde("SpaceAfterSubtractWhenFollowedByUnaryMinus",41,41,[wpe,Zde],4),zde("SpaceAfterSubtractWhenFollowedByPredecrement",41,47,[wpe,Zde],4),zde("NoSpaceAfterCloseBrace",20,[28,27],[wpe],16),zde("NewLineBeforeCloseBraceInBlockContext",r,20,[cpe],8),zde("SpaceAfterCloseBrace",20,t(22),[wpe,hpe],4),zde("SpaceBetweenCloseBraceAndElse",20,93,[wpe],4),zde("SpaceBetweenCloseBraceAndWhile",20,117,[wpe],4),zde("NoSpaceBetweenEmptyBraceBrackets",19,20,[wpe,vpe],16),zde("SpaceAfterConditionalClosingParen",22,23,[ype],4),zde("NoSpaceBetweenFunctionKeywordAndStar",100,42,[fpe],16),zde("SpaceAfterStarInGeneratorDeclaration",42,80,[fpe],4),zde("SpaceAfterFunctionInFuncDecl",100,n,[dpe],4),zde("NewLineAfterOpenBraceInBlockContext",19,n,[cpe],8),zde("SpaceAfterGetSetInMember",[139,153],80,[dpe],4),zde("NoSpaceBetweenYieldKeywordAndStar",127,42,[wpe,Kpe],16),zde("SpaceBetweenYieldOrYieldStarAndOperand",[127,42],n,[wpe,Kpe],4),zde("NoSpaceBetweenReturnAndSemicolon",107,27,[wpe],16),zde("SpaceAfterCertainKeywords",[115,111,105,91,107,114,135],n,[wpe],4),zde("SpaceAfterLetConstInVariableDeclaration",[121,87],n,[wpe,Rpe],4),zde("NoSpaceBeforeOpenParenInFuncCall",n,21,[wpe,bpe,xpe],16),zde("SpaceBeforeBinaryKeywordOperator",n,s,[wpe,Zde],4),zde("SpaceAfterBinaryKeywordOperator",s,n,[wpe,Zde],4),zde("SpaceAfterVoidOperator",116,n,[wpe,Hpe],4),zde("SpaceBetweenAsyncAndOpenParen",134,21,[Tpe,wpe],4),zde("SpaceBetweenAsyncAndFunctionKeyword",134,[100,80],[wpe],4),zde("NoSpaceBetweenTagAndTemplateString",[80,22],[15,16],[wpe],16),zde("SpaceBeforeJsxAttribute",n,80,[Epe,wpe],4),zde("SpaceBeforeSlashInJsxOpeningElement",n,44,[Ope,wpe],4),zde("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",44,32,[Ope,wpe],16),zde("NoSpaceBeforeEqualInJsxAttribute",n,64,[Fpe,wpe],16),zde("NoSpaceAfterEqualInJsxAttribute",64,n,[Fpe,wpe],16),zde("NoSpaceBeforeJsxNamespaceColon",80,59,[Ipe],16),zde("NoSpaceAfterJsxNamespaceColon",59,80,[Ipe],16),zde("NoSpaceAfterModuleImport",[144,149],21,[wpe],16),zde("SpaceAfterCertainTypeScriptKeywords",[128,129,86,138,90,94,95,96,139,119,102,120,144,145,123,125,124,148,153,126,156,161,143,140],n,[wpe],4),zde("SpaceBeforeCertainTypeScriptKeywords",n,[96,119,161],[wpe],4),zde("SpaceAfterModuleName",11,19,[Jpe],4),zde("SpaceBeforeArrow",n,39,[wpe],4),zde("SpaceAfterArrow",39,n,[wpe],4),zde("NoSpaceAfterEllipsis",26,80,[wpe],16),zde("NoSpaceAfterOptionalParameters",58,[22,28],[wpe,epe],16),zde("NoSpaceBetweenEmptyInterfaceBraceBrackets",19,20,[wpe,zpe],16),zde("NoSpaceBeforeOpenAngularBracket",c,30,[wpe,Vpe],16),zde("NoSpaceBetweenCloseParenAndAngularBracket",22,30,[wpe,Vpe],16),zde("NoSpaceAfterOpenAngularBracket",30,n,[wpe,Vpe],16),zde("NoSpaceBeforeCloseAngularBracket",n,32,[wpe,Vpe],16),zde("NoSpaceAfterCloseAngularBracket",32,[21,23,32,28],[wpe,Vpe,ppe,$pe],16),zde("SpaceBeforeAt",[22,80],60,[wpe],4),zde("NoSpaceAfterAt",60,n,[wpe],16),zde("SpaceAfterDecorator",n,[128,80,95,90,86,126,125,123,124,139,153,23,42],[Lpe],4),zde("NoSpaceBeforeNonNullAssertionOperator",n,54,[wpe,Gpe],16),zde("NoSpaceAfterNewKeywordOnConstructorSignature",105,21,[wpe,qpe],16),zde("SpaceLessThanAndNonJSXTypeAnnotation",30,30,[wpe],4)],...[zde("SpaceAfterConstructor",137,21,[$de("insertSpaceAfterConstructor"),wpe],4),zde("NoSpaceAfterConstructor",137,21,[Kde("insertSpaceAfterConstructor"),wpe],16),zde("SpaceAfterComma",28,n,[$de("insertSpaceAfterCommaDelimiter"),wpe,Dpe,Spe,kpe],4),zde("NoSpaceAfterComma",28,n,[Kde("insertSpaceAfterCommaDelimiter"),wpe,Dpe],16),zde("SpaceAfterAnonymousFunctionKeyword",[100,42],21,[$de("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),dpe],4),zde("NoSpaceAfterAnonymousFunctionKeyword",[100,42],21,[Kde("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),dpe],16),zde("SpaceAfterKeywordInControl",o,21,[$de("insertSpaceAfterKeywordsInControlFlowStatements"),ype],4),zde("NoSpaceAfterKeywordInControl",o,21,[Kde("insertSpaceAfterKeywordsInControlFlowStatements"),ype],16),zde("SpaceAfterOpenParen",21,n,[$de("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),wpe],4),zde("SpaceBeforeCloseParen",n,22,[$de("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),wpe],4),zde("SpaceBetweenOpenParens",21,21,[$de("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),wpe],4),zde("NoSpaceBetweenParens",21,22,[wpe],16),zde("NoSpaceAfterOpenParen",21,n,[Kde("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),wpe],16),zde("NoSpaceBeforeCloseParen",n,22,[Kde("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),wpe],16),zde("SpaceAfterOpenBracket",23,n,[$de("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),wpe],4),zde("SpaceBeforeCloseBracket",n,24,[$de("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),wpe],4),zde("NoSpaceBetweenBrackets",23,24,[wpe],16),zde("NoSpaceAfterOpenBracket",23,n,[Kde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),wpe],16),zde("NoSpaceBeforeCloseBracket",n,24,[Kde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),wpe],16),zde("SpaceAfterOpenBrace",19,n,[Xde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),ape],4),zde("SpaceBeforeCloseBrace",n,20,[Xde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),ape],4),zde("NoSpaceBetweenEmptyBraceBrackets",19,20,[wpe,vpe],16),zde("NoSpaceAfterOpenBrace",19,n,[Hde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),wpe],16),zde("NoSpaceBeforeCloseBrace",n,20,[Hde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),wpe],16),zde("SpaceBetweenEmptyBraceBrackets",19,20,[$de("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")],4),zde("NoSpaceBetweenEmptyBraceBrackets",19,20,[Hde("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"),wpe],16),zde("SpaceAfterTemplateHeadAndMiddle",[16,17],n,[$de("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Npe],4,1),zde("SpaceBeforeTemplateMiddleAndTail",n,[17,18],[$de("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),wpe],4),zde("NoSpaceAfterTemplateHeadAndMiddle",[16,17],n,[Kde("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Npe],16,1),zde("NoSpaceBeforeTemplateMiddleAndTail",n,[17,18],[Kde("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),wpe],16),zde("SpaceAfterOpenBraceInJsxExpression",19,n,[$de("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),wpe,Ppe],4),zde("SpaceBeforeCloseBraceInJsxExpression",n,20,[$de("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),wpe,Ppe],4),zde("NoSpaceAfterOpenBraceInJsxExpression",19,n,[Kde("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),wpe,Ppe],16),zde("NoSpaceBeforeCloseBraceInJsxExpression",n,20,[Kde("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),wpe,Ppe],16),zde("SpaceAfterSemicolonInFor",27,n,[$de("insertSpaceAfterSemicolonInForStatements"),wpe,Qde],4),zde("NoSpaceAfterSemicolonInFor",27,n,[Kde("insertSpaceAfterSemicolonInForStatements"),wpe,Qde],16),zde("SpaceBeforeBinaryOperator",n,a,[$de("insertSpaceBeforeAndAfterBinaryOperators"),wpe,Zde],4),zde("SpaceAfterBinaryOperator",a,n,[$de("insertSpaceBeforeAndAfterBinaryOperators"),wpe,Zde],4),zde("NoSpaceBeforeBinaryOperator",n,a,[Kde("insertSpaceBeforeAndAfterBinaryOperators"),wpe,Zde],16),zde("NoSpaceAfterBinaryOperator",a,n,[Kde("insertSpaceBeforeAndAfterBinaryOperators"),wpe,Zde],16),zde("SpaceBeforeOpenParenInFuncDecl",n,21,[$de("insertSpaceBeforeFunctionParenthesis"),wpe,dpe],4),zde("NoSpaceBeforeOpenParenInFuncDecl",n,21,[Kde("insertSpaceBeforeFunctionParenthesis"),wpe,dpe],16),zde("NewLineBeforeOpenBraceInControl",u,19,[$de("placeOpenBraceOnNewLineForControlBlocks"),ype,spe],8,1),zde("NewLineBeforeOpenBraceInFunction",l,19,[$de("placeOpenBraceOnNewLineForFunctions"),dpe,spe],8,1),zde("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",_,19,[$de("placeOpenBraceOnNewLineForFunctions"),mpe,spe],8,1),zde("SpaceAfterTypeAssertion",32,n,[$de("insertSpaceAfterTypeAssertion"),wpe,Wpe],4),zde("NoSpaceAfterTypeAssertion",32,n,[Kde("insertSpaceAfterTypeAssertion"),wpe,Wpe],16),zde("SpaceBeforeTypeAnnotation",n,[58,59],[$de("insertSpaceBeforeTypeAnnotation"),wpe,npe],4),zde("NoSpaceBeforeTypeAnnotation",n,[58,59],[Kde("insertSpaceBeforeTypeAnnotation"),wpe,npe],16),zde("NoOptionalSemicolon",27,i,[Wde("semicolons","remove"),Qpe],32),zde("OptionalSemicolon",n,i,[Wde("semicolons","insert"),Ype],64)],...[zde("NoSpaceBeforeSemicolon",n,27,[wpe],16),zde("SpaceBeforeOpenBraceInControl",u,19,[Gde("placeOpenBraceOnNewLineForControlBlocks"),ype,Bpe,ope],4,1),zde("SpaceBeforeOpenBraceInFunction",l,19,[Gde("placeOpenBraceOnNewLineForFunctions"),dpe,_pe,Bpe,ope],4,1),zde("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",_,19,[Gde("placeOpenBraceOnNewLineForFunctions"),mpe,Bpe,ope],4,1),zde("NoSpaceBeforeComma",n,28,[wpe],16),zde("NoSpaceBeforeOpenBracket",t(134,84),23,[wpe],16),zde("NoSpaceAfterCloseBracket",24,n,[wpe,jpe],16),zde("SpaceAfterSemicolon",27,n,[wpe],4),zde("SpaceBetweenForAndAwaitKeyword",99,135,[wpe],4),zde("SpaceBetweenDotDotDotAndTypeName",26,c,[wpe],16),zde("SpaceBetweenStatements",[22,92,93,84],n,[wpe,Dpe,Yde],4),zde("SpaceAfterTryCatchFinally",[113,85,98],19,[wpe],4)]]}function zde(e,t,n,r,i,o=0){return{leftTokenRange:Ude(t),rightTokenRange:Ude(n),rule:{debugName:e,context:r,action:i,flags:o}}}function qde(e){return{tokens:e,isSpecific:!0}}function Ude(e){return"number"==typeof e?qde([e]):ct(e)?qde(e):e}function Vde(e,t,n=[]){const r=[];for(let i=e;i<=t;i++)E(n,i)||r.push(i);return qde(r)}function Wde(e,t){return n=>n.options&&n.options[e]===t}function $de(e){return t=>t.options&&Be(t.options,e)&&!!t.options[e]}function Hde(e){return t=>t.options&&Be(t.options,e)&&!t.options[e]}function Kde(e){return t=>!t.options||!Be(t.options,e)||!t.options[e]}function Gde(e){return t=>!t.options||!Be(t.options,e)||!t.options[e]||t.TokensAreOnSameLine()}function Xde(e){return t=>!t.options||!Be(t.options,e)||!!t.options[e]}function Qde(e){return 248===e.contextNode.kind}function Yde(e){return!Qde(e)}function Zde(e){switch(e.contextNode.kind){case 226:return 28!==e.contextNode.operatorToken.kind;case 227:case 194:case 234:case 281:case 276:case 182:case 192:case 193:case 238:return!0;case 208:case 265:case 271:case 277:case 260:case 169:case 306:case 172:case 171:return 64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 249:case 168:return 103===e.currentTokenSpan.kind||103===e.nextTokenSpan.kind||64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 250:return 165===e.currentTokenSpan.kind||165===e.nextTokenSpan.kind}return!1}function epe(e){return!Zde(e)}function tpe(e){return!npe(e)}function npe(e){const t=e.contextNode.kind;return 172===t||171===t||169===t||260===t||v_(t)}function rpe(e){return!function(e){return yD(e.contextNode)&&e.contextNode.questionToken}(e)}function ipe(e){return 227===e.contextNode.kind||194===e.contextNode.kind}function ope(e){return e.TokensAreOnSameLine()||_pe(e)}function ape(e){return 206===e.contextNode.kind||200===e.contextNode.kind||function(e){return lpe(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}(e)}function spe(e){return _pe(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())}function cpe(e){return lpe(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function lpe(e){return upe(e.contextNode)}function _pe(e){return upe(e.nextTokenParent)}function upe(e){if(gpe(e))return!0;switch(e.kind){case 241:case 269:case 210:case 268:return!0}return!1}function dpe(e){switch(e.contextNode.kind){case 262:case 174:case 173:case 177:case 178:case 179:case 218:case 176:case 219:case 264:return!0}return!1}function ppe(e){return!dpe(e)}function fpe(e){return 262===e.contextNode.kind||218===e.contextNode.kind}function mpe(e){return gpe(e.contextNode)}function gpe(e){switch(e.kind){case 263:case 231:case 264:case 266:case 187:case 267:case 278:case 279:case 272:case 275:return!0}return!1}function hpe(e){switch(e.currentTokenParent.kind){case 263:case 267:case 266:case 299:case 268:case 255:return!0;case 241:{const t=e.currentTokenParent.parent;if(!t||219!==t.kind&&218!==t.kind)return!0}}return!1}function ype(e){switch(e.contextNode.kind){case 245:case 255:case 248:case 249:case 250:case 247:case 258:case 246:case 254:case 299:return!0;default:return!1}}function vpe(e){return 210===e.contextNode.kind}function bpe(e){return function(e){return 213===e.contextNode.kind}(e)||function(e){return 214===e.contextNode.kind}(e)}function xpe(e){return 28!==e.currentTokenSpan.kind}function Spe(e){return 24!==e.nextTokenSpan.kind}function kpe(e){return 22!==e.nextTokenSpan.kind}function Tpe(e){return 219===e.contextNode.kind}function Cpe(e){return 205===e.contextNode.kind}function wpe(e){return e.TokensAreOnSameLine()&&12!==e.contextNode.kind}function Npe(e){return 12!==e.contextNode.kind}function Dpe(e){return 284!==e.contextNode.kind&&288!==e.contextNode.kind}function Ppe(e){return 294===e.contextNode.kind||293===e.contextNode.kind}function Epe(e){return 291===e.nextTokenParent.kind||295===e.nextTokenParent.kind&&291===e.nextTokenParent.parent.kind}function Fpe(e){return 291===e.contextNode.kind}function Ape(e){return 295!==e.nextTokenParent.kind}function Ipe(e){return 295===e.nextTokenParent.kind}function Ope(e){return 285===e.contextNode.kind}function jpe(e){return!dpe(e)&&!_pe(e)}function Lpe(e){return e.TokensAreOnSameLine()&&Zv(e.contextNode)&&Mpe(e.currentTokenParent)&&!Mpe(e.nextTokenParent)}function Mpe(e){for(;e&&nu(e);)e=e.parent;return e&&170===e.kind}function Rpe(e){return 261===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos}function Bpe(e){return 2!==e.formattingRequestKind}function Jpe(e){return 267===e.contextNode.kind}function zpe(e){return 187===e.contextNode.kind}function qpe(e){return 180===e.contextNode.kind}function Upe(e,t){if(30!==e.kind&&32!==e.kind)return!1;switch(t.kind){case 183:case 216:case 265:case 263:case 231:case 264:case 262:case 218:case 219:case 174:case 173:case 179:case 180:case 213:case 214:case 233:return!0;default:return!1}}function Vpe(e){return Upe(e.currentTokenSpan,e.currentTokenParent)||Upe(e.nextTokenSpan,e.nextTokenParent)}function Wpe(e){return 216===e.contextNode.kind}function $pe(e){return!Wpe(e)}function Hpe(e){return 116===e.currentTokenSpan.kind&&222===e.currentTokenParent.kind}function Kpe(e){return 229===e.contextNode.kind&&void 0!==e.contextNode.expression}function Gpe(e){return 235===e.contextNode.kind}function Xpe(e){return!function(e){switch(e.contextNode.kind){case 245:case 248:case 249:case 250:case 246:case 247:return!0;default:return!1}}(e)}function Qpe(e){let t=e.nextTokenSpan.kind,n=e.nextTokenSpan.pos;if(Vh(t)){const r=e.nextTokenParent===e.currentTokenParent?nQ(e.currentTokenParent,xc(e.currentTokenParent,e=>!e.parent),e.sourceFile):e.nextTokenParent.getFirstToken(e.sourceFile);if(!r)return!0;t=r.kind,n=r.getStart(e.sourceFile)}return e.sourceFile.getLineAndCharacterOfPosition(e.currentTokenSpan.pos).line===e.sourceFile.getLineAndCharacterOfPosition(n).line?20===t||1===t:240!==t&&27!==t&&(264===e.contextNode.kind||265===e.contextNode.kind?!hD(e.currentTokenParent)||!!e.currentTokenParent.type||21!==t:yD(e.currentTokenParent)?!e.currentTokenParent.initializer:248!==e.currentTokenParent.kind&&242!==e.currentTokenParent.kind&&240!==e.currentTokenParent.kind&&23!==t&&21!==t&&40!==t&&41!==t&&44!==t&&14!==t&&28!==t&&228!==t&&16!==t&&15!==t&&25!==t)}function Ype(e){return RZ(e.currentTokenSpan.end,e.currentTokenParent,e.sourceFile)}function Zpe(e){return!rP(e.contextNode)||!AN(e.contextNode.expression)||e.contextNode.expression.getText().includes(".")}function efe(e,t){return{options:e,getRules:tfe(),host:t}}function tfe(){return void 0===Lde&&(Lde=function(e){const t=function(e){const t=new Array(ufe*ufe),n=new Array(t.length);for(const r of e){const e=r.leftTokenRange.isSpecific&&r.rightTokenRange.isSpecific;for(const i of r.leftTokenRange.tokens)for(const o of r.rightTokenRange.tokens){const a=rfe(i,o);let s=t[a];void 0===s&&(s=t[a]=[]),pfe(s,r.rule,e,n,a)}}return t}(e);return e=>{const n=t[rfe(e.currentTokenSpan.kind,e.nextTokenSpan.kind)];if(n){const t=[];let r=0;for(const i of n){const n=~nfe(r);i.action&n&&T(i.context,t=>t(e))&&(t.push(i),r|=i.action)}if(t.length)return t}}}(Jde())),Lde}function nfe(e){let t=0;return 1&e&&(t|=28),2&e&&(t|=96),28&e&&(t|=28),96&e&&(t|=96),t}function rfe(e,t){return Tn.assert(e<=165&&t<=165,"Must compute formatting context from tokens"),e*ufe+t}var ife,ofe,afe,sfe,cfe,lfe=5,_fe=31,ufe=166,dfe=((ife=dfe||{})[ife.StopRulesSpecific=0]="StopRulesSpecific",ife[ife.StopRulesAny=1*lfe]="StopRulesAny",ife[ife.ContextRulesSpecific=2*lfe]="ContextRulesSpecific",ife[ife.ContextRulesAny=3*lfe]="ContextRulesAny",ife[ife.NoContextRulesSpecific=4*lfe]="NoContextRulesSpecific",ife[ife.NoContextRulesAny=5*lfe]="NoContextRulesAny",ife);function pfe(e,t,n,r,i){const o=3&t.action?n?0:dfe.StopRulesAny:t.context!==Mde?n?dfe.ContextRulesSpecific:dfe.ContextRulesAny:n?dfe.NoContextRulesSpecific:dfe.NoContextRulesAny,a=r[i]||0;e.splice(function(e,t){let n=0;for(let r=0;r<=t;r+=lfe)n+=e&_fe,e>>=lfe;return n}(a,o),0,t),r[i]=function(e,t){const n=1+(e>>t&_fe);return Tn.assert((n&_fe)===n,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),e&~(_fe<Tn.formatSyntaxKind(n)}),r}function mfe(e,t,n){const r=t.getLineAndCharacterOfPosition(e).line;if(0===r)return[];let i=Od(r,t);for(;is(t.text.charCodeAt(i));)i--;os(t.text.charCodeAt(i))&&i--;return wfe({pos:Ad(r-1,t),end:i+1},t,n,2)}function gfe(e,t,n){return Cfe(Sfe(xfe(e,27,t)),t,n,3)}function hfe(e,t,n){const r=xfe(e,19,t);if(!r)return[];return wfe({pos:kX(Sfe(r.parent).getStart(t),t),end:e},t,n,4)}function yfe(e,t,n){return Cfe(Sfe(xfe(e,20,t)),t,n,5)}function vfe(e,t){return wfe({pos:0,end:e.text.length},e,t,0)}function bfe(e,t,n,r){return wfe({pos:kX(e,n),end:t},n,r,1)}function xfe(e,t,n){const r=rQ(e,n);return r&&r.kind===t&&e===r.getEnd()?r:void 0}function Sfe(e){let t=e;for(;t&&t.parent&&t.parent.end===e.end&&!kfe(t.parent,t);)t=t.parent;return t}function kfe(e,t){switch(e.kind){case 263:case 264:return TX(e.members,t);case 267:const n=e.body;return!!n&&268===n.kind&&TX(n.statements,t);case 307:case 241:case 268:return TX(e.statements,t);case 299:return TX(e.block.statements,t)}return!1}function Tfe(e,t,n,r,i,o){const a={pos:e.pos,end:e.end};return jde(t.text,n,a.pos,a.end,n=>Nfe(a,e,r,i,n,o,1,e=>!1,t))}function Cfe(e,t,n,r){if(!e)return[];return wfe({pos:kX(e.getStart(t),t),end:e.end},t,n,r)}function wfe(e,t,n,r){const i=function(e,t){return function n(r){const i=KI(r,n=>DX(n.getStart(t),n.end,e)&&n);if(i){const e=n(i);if(e)return e}return r}(t)}(e,t);return jde(t.text,t.languageVariant,function(e,t,n){const r=e.getStart(n);if(r===t.pos&&e.end===t.end)return r;const i=rQ(t.pos,n);return i?i.end>=t.pos?e.pos:i.end:e.pos}(i,e,t),e.end,o=>Nfe(e,i,cfe.getIndentationForNode(i,e,t,n.options),function(e,t,n){let r,i=-1;for(;e;){const o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==i&&o!==i)break;if(cfe.shouldIndentChildNode(t,e,r,n))return t.indentSize;i=o,r=e,e=e.parent}return 0}(i,n.options,t),o,n,r,function(e,t){if(!e.length)return i;const n=e.filter(e=>EX(t,e.start,e.start+e.length)).sort((e,t)=>e.start-t.start);if(!n.length)return i;let r=0;return e=>{for(;;){if(r>=n.length)return!1;const t=n[r];if(e.end<=t.start)return!1;if(AX(e.pos,e.end,t.start,t.start+t.length))return!0;r++}};function i(){return!1}}(t.parseDiagnostics,e),t))}function Nfe(e,t,n,r,i,{options:o,getRules:a,host:s},c,l,_){var u;const d=new Ade(_,c,o);let p,f,m,g,h,v=-1;const b=[];if(i.advance(),i.isOnToken()){const a=_.getLineAndCharacterOfPosition(t.getStart(_)).line;let s=a;Zv(t)&&(s=_.getLineAndCharacterOfPosition(Qd(t,_)).line),function t(n,r,a,s,c,u){if(!EX(e,n.getStart(_),n.getEnd()))return;const d=S(n,a,c,u);let m=r;KI(n,e=>{g(e,-1,n,d,a,s,!1)},e=>{y(e,n,a,d)});for(;i.isOnToken()&&i.getTokenFullStart()Math.min(n.end,e.end))break;b(t,n,d,n)}function g(r,a,s,c,l,u,d,p){if(Tn.assert(!my(r)),Ld(r)||Rd(s,r))return a;const f=r.getStart(_),g=_.getLineAndCharacterOfPosition(f).line;let y=g;Zv(r)&&(y=_.getLineAndCharacterOfPosition(Qd(r,_)).line);let x=-1;if(d&&TX(e,s)&&(x=function(e,t,n,r,i){if(EX(r,e,t)||PX(r,e,t)){if(-1!==i)return i}else{const t=_.getLineAndCharacterOfPosition(e).line,r=kX(e,_),i=cfe.findFirstNonWhitespaceColumn(r,e,_,o);if(t!==n||e===i){const e=cfe.getBaseIndentation(o);return e>i?e:i}}return-1}(f,r.end,l,e,a),-1!==x&&(a=x)),!EX(e,r.pos,r.end))return r.ende.end)return a;if(t.token.end>f){t.token.pos>f&&i.skipToStartOf(r);break}b(t,n,c,n)}if(!i.isOnToken()||i.getTokenFullStart()>=e.end)return a;if(ql(r)){const e=i.readTokenInfo(r);if(12!==r.kind)return Tn.assert(e.token.end===r.end,"Token end is child end"),b(e,n,c,r),a}const S=170===r.kind?g:u,k=function(e,t,n,r,i,a){const s=cfe.shouldIndentChildNode(o,e)?o.indentSize:0;return a===t?{indentation:t===h?v:i.getIndentation(),delta:Math.min(o.indentSize,i.getDelta(e)+s)}:-1===n?21===e.kind&&t===h?{indentation:v,delta:i.getDelta(e)}:cfe.childStartsOnTheSameLineWithElseInIfStatement(r,e,t,_)||cfe.childIsUnindentedBranchOfConditionalExpression(r,e,t,_)||cfe.argumentStartsOnSameLineAsPreviousArgument(r,e,t,_)?{indentation:i.getIndentation(),delta:s}:{indentation:i.getIndentation()+i.getDelta(e),delta:s}:{indentation:n,delta:s}}(r,g,x,n,c,S);return t(r,m,g,y,k.indentation,k.delta),m=n,p&&209===s.kind&&-1===a&&(a=k.indentation),a}function y(t,r,a,s){Tn.assert(Ul(t)),Tn.assert(!my(t));const c=function(e,t){switch(e.kind){case 176:case 262:case 218:case 174:case 173:case 219:case 179:case 180:case 184:case 185:case 177:case 178:if(e.typeParameters===t)return 30;if(e.parameters===t)return 21;break;case 213:case 214:if(e.typeArguments===t)return 30;if(e.arguments===t)return 21;break;case 263:case 231:case 264:case 265:if(e.typeParameters===t)return 30;break;case 183:case 215:case 186:case 233:case 205:if(e.typeArguments===t)return 30;break;case 187:return 19}return 0}(r,t);let l=s,u=a;if(!EX(e,t.pos,t.end))return void(t.endt.pos)break;if(e.token.kind===c){let t;if(u=_.getLineAndCharacterOfPosition(e.token.pos).line,b(e,r,s,r),-1!==v)t=v;else{const n=kX(e.token.pos,_);t=cfe.findFirstNonWhitespaceColumn(n,e.token.pos,_,o)}l=S(r,a,t,o.indentSize)}else b(e,r,s,r)}let d=-1;for(let e=0;eP(e.pos,i,!1))}-1!==e&&n&&(P(t.token.pos,e,1===u),h=g.line,v=e)}i.advance(),m=n}}(t,t,a,s,n,r)}const x=i.getCurrentLeadingTrivia();if(x){const r=cfe.nodeWillIndentChild(o,t,void 0,_,!1)?n+o.indentSize:n;k(x,r,!0,e=>{w(e,_.getLineAndCharacterOfPosition(e.pos),t,t,void 0),P(e.pos,r,!1)}),!1!==o.trimTrailingWhitespace&&function(t){let n=f?f.end:e.pos;for(const e of t)kQ(e.kind)&&(n=e.end){const e=i.isOnEOF()?i.readEOFTokenRange():i.isOnToken()?i.readTokenInfo(t).token:void 0;if(e&&e.pos===p){const n=(null==(u=rQ(e.end,_,t))?void 0:u.parent)||m;D(e,_.getLineAndCharacterOfPosition(e.pos).line,n,f,g,m,n,void 0)}}return b;function S(e,t,n,r){return{getIndentationForComment:(e,t,r)=>{switch(e){case 20:case 24:case 22:return n+i(r)}return-1!==t?t:n},getIndentationForToken:(r,o,a,s)=>!s&&function(n,r,i){switch(r){case 19:case 20:case 22:case 93:case 117:case 60:return!1;case 44:case 32:switch(i.kind){case 286:case 287:case 285:return!1}break;case 23:case 24:if(200!==i.kind)return!1}return t!==n&&!(Zv(e)&&r===function(e){if(bI(e)){const t=C(e.modifiers,__,N(e.modifiers,gD));if(t)return t.kind}switch(e.kind){case 263:return 86;case 264:return 120;case 262:return 100;case 266:return 266;case 177:return 139;case 178:return 153;case 174:if(e.asteriskToken)return 42;case 172:case 169:const t=jc(e);if(t)return t.kind}}(e))}(r,o,a)?n+i(a):n,getIndentation:()=>n,getDelta:i,recomputeIndentation:(t,i)=>{cfe.shouldIndentChildNode(o,i,e,_)&&(n+=t?o.indentSize:-o.indentSize,r=cfe.shouldIndentChildNode(o,e)?o.indentSize:0)}};function i(t){return cfe.nodeWillIndentChild(o,e,t,_,!0)?r:0}}function k(t,n,r,i){for(const o of t){const t=TX(e,o);switch(o.kind){case 3:t&&E(o,n,!r),r=!1;break;case 2:r&&t&&i(o),r=!1;break;case 4:r=!0}}return r}function T(t,n,r,i){for(const o of t)if(kQ(o.kind)&&TX(e,o)){w(o,_.getLineAndCharacterOfPosition(o.pos),n,r,i)}}function w(t,n,r,i,o){let a=0;if(!l(t))if(f)a=D(t,n.line,r,f,g,m,i,o);else{F(_.getLineAndCharacterOfPosition(e.pos).line,n.line)}return f=t,p=t.end,m=r,g=n.line,a}function D(e,t,n,r,i,c,l,u){d.updateContext(r,c,e,n,l);const p=a(d);let f=!1!==d.options.trimTrailingWhitespace,m=0;return p?y(p,a=>{if(m=function(e,t,n,r,i){const a=i!==n;switch(e.action){case 1:return 0;case 16:if(t.end!==r.pos)return O(t.end,r.pos-t.end),a?2:0;break;case 32:O(t.pos,t.end-t.pos);break;case 8:if(1!==e.flags&&n!==i)return 0;if(1!==i-n)return j(t.end,r.pos-t.end,$Y(s,o)),a?0:1;break;case 4:if(1!==e.flags&&n!==i)return 0;if(1!==r.pos-t.end||32!==_.text.charCodeAt(t.end))return j(t.end,r.pos-t.end," "),a?2:0;break;case 64:c=t.end,(l=";")&&b.push(JQ(c,0,l))}var c,l;return 0}(a,r,i,e,t),u)switch(m){case 2:n.getStart(_)===e.pos&&u.recomputeIndentation(!1,l);break;case 1:n.getStart(_)===e.pos&&u.recomputeIndentation(!0,l);break;default:Tn.assert(0===m)}f=f&&!(16&a.action)&&1!==a.flags}):f=f&&1!==e.kind,t!==i&&f&&F(i,t,r),m}function P(e,t,n){const r=Pfe(t,o);if(n)j(e,0,r);else{const n=_.getLineAndCharacterOfPosition(e),i=Ad(n.line,_);(t!==function(e,t){let n=0;for(let r=0;r0){const e=Pfe(r,o);j(t,n.character,e)}else O(t,n.character)}}function F(e,t,n){for(let r=e;rt)continue;const i=A(e,t);-1!==i&&(Tn.assert(i===e||!is(_.text.charCodeAt(i-1))),O(i,t+1-i))}}function A(e,t){let n=t;for(;n>=e&&is(_.text.charCodeAt(n));)n--;return n!==t?n+1:-1}function I(e,t,n){F(_.getLineAndCharacterOfPosition(e).line,_.getLineAndCharacterOfPosition(t).line+1,n)}function O(e,t){t&&b.push(JQ(e,t,""))}function j(e,t,n){(t||n)&&b.push(JQ(e,t,n))}}function Dfe(e,t,n,r=YX(e,t)){const i=xc(r,pF);i&&(r=i.parent);if(r.getStart(e)<=t&&tNX(n,t)||t===n.end&&(2===n.kind||t===e.getFullWidth()))}function Pfe(e,t){if((!ofe||ofe.tabSize!==t.tabSize||ofe.indentSize!==t.indentSize)&&(ofe={tabSize:t.tabSize,indentSize:t.indentSize},afe=sfe=void 0),t.convertTabsToSpaces){let n;const r=Math.floor(e/t.indentSize),i=e%t.indentSize;return sfe||(sfe=[]),void 0===sfe[r]?(n=KQ(" ",t.indentSize*r),sfe[r]=n):n=sfe[r],i?n+KQ(" ",i):n}{const n=Math.floor(e/t.tabSize),r=e-n*t.tabSize;let i;return afe||(afe=[]),void 0===afe[n]?afe[n]=i=KQ("\t",n):i=afe[n],r?i+KQ(" ",r):i}}(e=>{let t;var n;function r(e){return e.baseIndentSize||0}function i(e,t,n,i,s,c,l){var f;let m=e.parent;for(;m;){let r=!0;if(n){const t=e.getStart(s);r=tn.end}const h=o(m,e,s),y=h.line===t.line||d(m,e,t.line,s);if(r){const n=null==(f=p(e,s))?void 0:f[0];let r=g(e,s,l,!!n&&_(n,s).line>h.line);if(-1!==r)return r+i;if(r=a(e,m,t,y,s,l),-1!==r)return r+i}S(l,m,e,s,c)&&!y&&(i+=l.indentSize);const v=u(m,e,t.line,s);m=(e=m).parent,t=v?s.getLineAndCharacterOfPosition(e.getStart(s)):h}return i+r(l)}function o(e,t,n){const r=p(t,n),i=r?r.pos:e.getStart(n);return n.getLineAndCharacterOfPosition(i)}function a(e,t,n,r,i,o){return(ku(e)||Cu(e))&&(307===t.kind||!r)?y(n,i,o):-1}let s;var c;function l(e,t,n,r){const i=nQ(e,t,r);if(!i)return 0;if(19===i.kind)return 1;if(20===i.kind){return n===_(i,r).line?2:0}return 0}function _(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function u(e,t,n,r){if(!oP(e)||!E(e.arguments,t))return!1;return ns(r,e.expression.getEnd()).line===n}function d(e,t,n,r){if(245===e.kind&&e.elseStatement===t){const t=RX(e,93,r);Tn.assert(void 0!==t);return _(t,r).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(e,t,n,r){switch(n.kind){case 183:return i(n.typeArguments);case 210:return i(n.properties);case 209:case 275:case 279:case 206:case 207:return i(n.elements);case 187:return i(n.members);case 262:case 218:case 219:case 174:case 173:case 179:case 176:case 185:case 180:return i(n.typeParameters)||i(n.parameters);case 177:return i(n.parameters);case 263:case 231:case 264:case 265:case 345:return i(n.typeParameters);case 214:case 213:return i(n.typeArguments)||i(n.arguments);case 261:return i(n.declarations)}function i(i){return i&&PX(function(e,t,n){const r=e.getChildren(n);for(let e=1;e=0&&t=0;o--){if(28===e[o].kind)continue;if(n.getLineAndCharacterOfPosition(e[o].end).line!==i.line)return y(i,n,r);i=_(e[o],n)}return-1}function y(e,t,n){const r=t.getPositionOfLineAndCharacter(e.line,0);return b(r,r+e.character,t,n)}function v(e,t,n,r){let i=0,o=0;for(let a=e;at.text.length)return r(n);if(0===n.indentStyle)return 0;const a=rQ(e,t,void 0,!0),s=Dfe(t,e,a||null);if(s&&3===s.kind)return function(e,t,n,r){const i=ns(e,t).line-1,o=ns(e,r.pos).line;if(Tn.assert(o>=0),i<=o)return b(Ad(o,e),t,e,n);const a=Ad(i,e),{column:s,character:c}=v(a,t,e,n);if(0===s)return s;const l=e.text.charCodeAt(a+c);return 42===l?s-1:s}(t,e,n,s);if(!a)return r(n);if(TQ(a.kind)&&a.getStart(t)<=e&&e0;){if(!rs(e.text.charCodeAt(r)))break;r--}const i=kX(r,e);return b(i,r,e,n)}(t,e,n);if(28===a.kind&&226!==a.parent.kind){const e=function(e,t,n){const r=LX(e);return r&&r.listItemIndex>0?h(r.list.getChildren(),r.listItemIndex-1,t,n):-1}(a,t,n);if(-1!==e)return e}const p=function(e,t,n){return t&&f(e,e,t,n)}(e,a.parent,t);if(p&&!TX(p,a)){const e=[218,219].includes(u.parent.kind)?0:n.indentSize;return m(p,t,n)+e}return function(e,t,n,o,a,s){let c,u=n;for(;u;){if(IX(u,t,e)&&S(s,u,c,e,!0)){const t=_(u,e),r=l(n,u,o,e);return i(u,t,void 0,0!==r?a&&2===r?s.indentSize:0:o!==t.line?s.indentSize:0,e,!0,s)}const r=g(u,e,s,!0);if(-1!==r)return r;c=u,u=u.parent}return r(s)}(t,e,a,c,o,n)},e.getIndentationForNode=function(e,t,n,r){const o=n.getLineAndCharacterOfPosition(e.getStart(n));return i(e,o,t,0,n,!1,r)},e.getBaseIndentation=r,(c=s||(s={}))[c.Unknown=0]="Unknown",c[c.OpenBrace=1]="OpenBrace",c[c.CloseBrace=2]="CloseBrace",e.isArgumentAndStartLineOverlapsExpressionBeingCalled=u,e.childStartsOnTheSameLineWithElseInIfStatement=d,e.childIsUnindentedBranchOfConditionalExpression=function(e,t,n,r){if(vP(e)&&(t===e.whenTrue||t===e.whenFalse)){const i=ns(r,e.condition.end).line;if(t===e.whenTrue)return n===i;{const t=_(e.whenTrue,r).line,o=ns(r,e.whenTrue.end).line;return i===t&&o===n}}return!1},e.argumentStartsOnSameLineAsPreviousArgument=function(e,t,n,r){if(K_(e)){if(!e.arguments)return!1;const i=C(e.arguments,e=>e.pos===t.pos);if(!i)return!1;const o=e.arguments.indexOf(i);if(0===o)return!1;if(n===ns(r,e.arguments[o-1].getEnd()).line)return!0}return!1},e.getContainingList=p,e.findFirstNonWhitespaceCharacterAndColumn=v,e.findFirstNonWhitespaceColumn=b,e.nodeWillIndentChild=x,e.shouldIndentChildNode=S})(cfe||(cfe={}));var Efe={};a(Efe,{pasteEditsProvider:()=>Afe});var Ffe="providePostPasteEdits";function Afe(e,t,n,r,i,o,a,s){return{edits:tde.ChangeTracker.with({host:i,formatContext:a,preferences:o},c=>Ife(e,t,n,r,i,o,a,s,c)),fixId:Ffe}}function Ife(e,t,n,r,i,o,a,s,c){let l;t.length!==n.length&&(l=1===t.length?t:[t.join("\n")]);const _=[];let u=e.text;for(let e=n.length-1;e>=0;e--){const{pos:r,end:i}=n[e];u=l?u.slice(0,r)+l[0]+u.slice(i):u.slice(0,r)+t[e]+u.slice(i)}Tn.checkDefined(i.runWithTemporaryFileUpdate).call(i,e.fileName,u,(n,l,u)=>{const d=Q5.createImportAdder(u,n,o,i);if(null==r?void 0:r.range){Tn.assert(r.range.length===t.length),r.range.forEach(e=>{const t=r.file.statements,n=N(t,t=>t.end>e.pos);if(-1===n)return;let i=N(t,t=>t.end>=e.end,n);-1!==i&&e.end<=t[i].getStart()&&i--,_.push(...t.slice(n,-1===i?t.length:i+1))});const o=S4(r.file,_,l.getTypeChecker(),I4(u,_,l.getTypeChecker()));Tn.assertIsDefined(l);const a=!C0(e.fileName,l,i,!!r.file.commonJsModuleIndicator);Z6(r.file,o.targetFileImportsFromOldFile,c,a),M4(r.file,o.oldImportsNeededByTargetFile,o.targetFileImportsFromOldFile,l.getTypeChecker(),n,d)}else{const e={sourceFile:u,program:l,cancellationToken:s,host:i,preferences:o,formatContext:a};KI(u,function t(n){QN(n)&&!(null==l?void 0:l.getTypeChecker().resolveName(n.text,n,-1,!1))&&d.addImportForUnresolvedIdentifier(e,n,!0),n.forEachChild(t)})}d.writeFixes(c,sY(r?r.file:e,o))}),n.forEach((n,r)=>{c.replaceRangeWithText(e,{pos:n.pos,end:n.end},l?l[0]:t[r])})}var Ofe={};a(Ofe,{ANONYMOUS:()=>FZ,AccessFlags:()=>_i,AssertionLevel:()=>Dt,AssignmentDeclarationKind:()=>bi,AssignmentKind:()=>rh,Associativity:()=>hy,BreakpointResolver:()=>D5,BuilderFileEmit:()=>XV,BuilderProgramKind:()=>yW,BuilderState:()=>KV,CallHierarchy:()=>E5,CharacterCodes:()=>Li,CheckFlags:()=>ri,CheckMode:()=>qB,ClassificationType:()=>qG,ClassificationTypeNames:()=>zG,CommentDirectiveType:()=>Rr,Comparison:()=>d,CompletionInfoFlags:()=>OG,CompletionTriggerKind:()=>wG,Completions:()=>Oae,ContainerFlags:()=>WR,ContextFlags:()=>Kr,Debug:()=>Tn,DiagnosticCategory:()=>xi,Diagnostics:()=>Ca,DocumentHighlights:()=>B0,ElementFlags:()=>li,EmitFlags:()=>Ji,EmitHint:()=>Vi,EmitOnly:()=>qr,EndOfLineState:()=>MG,ExitStatus:()=>Vr,ExportKind:()=>P0,Extension:()=>Mi,ExternalEmitHelpers:()=>Ui,FileIncludeKind:()=>Jr,FilePreprocessingDiagnosticsKind:()=>zr,FileSystemEntryKind:()=>vo,FileWatcherEventKind:()=>Zi,FindAllReferences:()=>Ice,FlattenLevel:()=>bz,FlowFlags:()=>Mr,ForegroundColorEscapeSequences:()=>XU,FunctionFlags:()=>Wh,GeneratedIdentifierFlags:()=>Or,GetLiteralTextFlags:()=>sp,GoToDefinition:()=>ble,HighlightSpanKind:()=>DG,IdentifierNameMap:()=>GJ,IdentifierNameMultiMap:()=>XJ,ImportKind:()=>D0,ImportsNotUsedAsValues:()=>Ei,IndentStyle:()=>PG,IndexFlags:()=>ui,IndexKind:()=>mi,InferenceFlags:()=>yi,InferencePriority:()=>hi,InlayHintKind:()=>NG,InlayHints:()=>Rle,InternalEmitFlags:()=>zi,InternalSymbolName:()=>ii,IntersectionFlags:()=>Hr,InvalidatedProjectKind:()=>pH,JSDocParsingMode:()=>Xi,JsDoc:()=>Ule,JsTyping:()=>zK,JsxEmit:()=>Pi,JsxFlags:()=>Ar,JsxReferenceKind:()=>di,LanguageFeatureMinimumTarget:()=>qi,LanguageServiceMode:()=>SG,LanguageVariant:()=>Oi,LexicalEnvironmentFlags:()=>$i,ListFormat:()=>Hi,LogLevel:()=>Cn,MapCode:()=>l_e,MemberOverrideStatus:()=>Wr,ModifierFlags:()=>Fr,ModuleDetectionKind:()=>Ti,ModuleInstanceState:()=>zR,ModuleKind:()=>Di,ModuleResolutionKind:()=>ki,ModuleSpecifierEnding:()=>Zk,NavigateTo:()=>u2,NavigationBar:()=>S2,NewLineKind:()=>Fi,NodeBuilderFlags:()=>Gr,NodeCheckFlags:()=>oi,NodeFactoryFlags:()=>WC,NodeFlags:()=>Er,NodeResolutionFeatures:()=>BM,ObjectFlags:()=>si,OperationCanceledException:()=>Br,OperatorPrecedence:()=>Sy,OrganizeImports:()=>m_e,OrganizeImportsMode:()=>CG,OuterExpressionKinds:()=>Wi,OutliningElementsCollector:()=>H_e,OutliningSpanKind:()=>jG,OutputFileType:()=>LG,PackageJsonAutoImportPreference:()=>xG,PackageJsonDependencyGroup:()=>bG,PatternMatchKind:()=>d1,PollingInterval:()=>eo,PollingWatchKind:()=>Ni,PragmaKindFlags:()=>Ki,PrivateIdentifierKind:()=>Gw,ProcessLevel:()=>Uz,ProgramUpdateLevel:()=>wU,QuotePreference:()=>oY,RegularExpressionFlags:()=>jr,RelationComparisonResult:()=>Ir,Rename:()=>nue,ScriptElementKind:()=>BG,ScriptElementKindModifier:()=>JG,ScriptKind:()=>Ai,ScriptSnapshot:()=>pG,ScriptTarget:()=>Ii,SemanticClassificationFormat:()=>TG,SemanticMeaning:()=>VG,SemicolonPreference:()=>EG,SignatureCheckMode:()=>UB,SignatureFlags:()=>fi,SignatureHelp:()=>lue,SignatureInfo:()=>GV,SignatureKind:()=>pi,SmartSelectionRange:()=>jue,SnippetKind:()=>Bi,StatisticType:()=>rK,StructureIsReused:()=>Ur,SymbolAccessibility:()=>Yr,SymbolDisplay:()=>$ue,SymbolDisplayPartKind:()=>IG,SymbolFlags:()=>ni,SymbolFormatFlags:()=>Qr,SyntaxKind:()=>Pr,SyntheticSymbolKind:()=>Zr,Ternary:()=>vi,ThrottledCancellationToken:()=>v5,TokenClass:()=>RG,TokenFlags:()=>Lr,TransformFlags:()=>Ri,TypeFacts:()=>JB,TypeFlags:()=>ai,TypeFormatFlags:()=>Xr,TypeMapKind:()=>gi,TypePredicateKind:()=>ei,TypeReferenceSerializationKind:()=>ti,UnionReduction:()=>$r,UpToDateStatusType:()=>R$,VarianceFlags:()=>ci,Version:()=>In,VersionRange:()=>jn,WatchDirectoryFlags:()=>ji,WatchDirectoryKind:()=>wi,WatchFileKind:()=>Ci,WatchLogLevel:()=>jU,WatchType:()=>S$,accessPrivateIdentifier:()=>hz,addDisposableResourceHelper:()=>NN,addEmitFlags:()=>pw,addEmitHelper:()=>Iw,addEmitHelpers:()=>Ow,addInternalEmitFlags:()=>mw,addNodeFactoryPatcher:()=>HC,addObjectAllocatorPatcher:()=>iS,addRange:()=>ge,addRelatedInfo:()=>ST,addSyntheticLeadingComment:()=>ww,addSyntheticTrailingComment:()=>Pw,addToSeen:()=>Bx,advancedAsyncSuperHelper:()=>EN,affectsDeclarationPathOptionDeclarations:()=>OO,affectsEmitOptionDeclarations:()=>IO,allKeysStartWithDot:()=>gR,altDirectorySeparator:()=>No,and:()=>pn,append:()=>pe,appendIfUnique:()=>ye,arrayFrom:()=>We,arrayIsEqualTo:()=>_e,arrayIsHomogeneous:()=>LT,arrayIsSorted:()=>le,arrayOf:()=>Ve,arrayReverseIterator:()=>xe,arrayToMap:()=>Ke,arrayToMultiMap:()=>Xe,arrayToNumericMap:()=>Ge,arraysEqual:()=>F,assertType:()=>gn,assign:()=>$e,assignHelper:()=>iN,asyncDelegator:()=>sN,asyncGeneratorHelper:()=>aN,asyncSuperHelper:()=>PN,asyncValues:()=>cN,attachFileToDiagnostics:()=>pS,awaitHelper:()=>oN,awaiterHelper:()=>_N,base64decode:()=>Ub,base64encode:()=>qb,binarySearch:()=>je,binarySearchKey:()=>Le,bindSourceFile:()=>KR,breakIntoCharacterSpans:()=>P1,breakIntoWordSpans:()=>E1,buildLinkParts:()=>VY,buildOpts:()=>VO,buildOverload:()=>zfe,bundlerModuleNameResolver:()=>zM,canBeConvertedToAsync:()=>e2,canHaveDecorators:()=>xI,canHaveExportModifier:()=>sC,canHaveFlowNode:()=>Ug,canHaveIllegalDecorators:()=>RA,canHaveIllegalModifiers:()=>BA,canHaveIllegalType:()=>LA,canHaveIllegalTypeParameters:()=>MA,canHaveJSDoc:()=>Vg,canHaveLocals:()=>bu,canHaveModifiers:()=>bI,canHaveSymbol:()=>vu,canIncludeBindAndCheckDiagnsotics:()=>NT,canJsonReportNoInputFiles:()=>pL,canProduceDiagnostics:()=>kq,canUsePropertyAccess:()=>lC,canWatchAffectingLocation:()=>JW,canWatchAtTypes:()=>MW,canWatchDirectoryOrFile:()=>LW,cartesianProduct:()=>vn,cast:()=>pt,chainBundle:()=>qJ,chainDiagnosticMessages:()=>yS,changeAnyExtension:()=>ca,changeCompilerHostLikeToUseCache:()=>$U,changeExtension:()=>lT,changeFullExtension:()=>la,changesAffectModuleResolution:()=>_d,changesAffectingProgramStructure:()=>dd,characterToRegularExpressionFlag:()=>Ka,childIsDecorated:()=>Cm,classElementOrClassElementParameterIsDecorated:()=>Nm,classHasClassThisAssignment:()=>Az,classHasDeclaredOrExplicitlyAssignedName:()=>Bz,classHasExplicitlyAssignedName:()=>Rz,classOrConstructorParameterIsDecorated:()=>wm,classPrivateFieldGetHelper:()=>TN,classPrivateFieldInHelper:()=>wN,classPrivateFieldSetHelper:()=>CN,classicNameResolver:()=>OR,classifier:()=>G5,cleanExtendedConfigCache:()=>PU,clear:()=>L,clearMap:()=>Px,clearSharedExtendedConfigFileWatcher:()=>DU,climbPastPropertyAccess:()=>iX,climbPastPropertyOrElementAccess:()=>oX,clone:()=>Ze,cloneCompilerOptions:()=>PQ,closeFileWatcher:()=>bx,closeFileWatcherOf:()=>RU,codefix:()=>Q5,collapseTextChangeRangesAcrossMultipleVersions:()=>sc,collectExternalModuleInfo:()=>$J,combine:()=>fe,combinePaths:()=>Yo,commandLineOptionOfCustomType:()=>zO,commentPragmas:()=>Gi,commonOptionsWithBuild:()=>NO,commonPackageFolders:()=>vk,compact:()=>ue,compareBooleans:()=>Ht,compareDataObjects:()=>Dx,compareDiagnostics:()=>xS,compareDiagnosticsSkipRelatedInformation:()=>SS,compareEmitHelpers:()=>Qw,compareNumberOfDirectorySeparators:()=>iT,comparePaths:()=>fa,comparePathsCaseInsensitive:()=>pa,comparePathsCaseSensitive:()=>da,comparePatternKeys:()=>yR,compareProperties:()=>$t,compareStringsCaseInsensitive:()=>Lt,compareStringsCaseInsensitiveEslintCompatible:()=>Mt,compareStringsCaseSensitive:()=>Rt,compareStringsCaseSensitiveUI:()=>Wt,compareTextSpans:()=>Ot,compareValues:()=>It,compileOnSaveCommandLineOption:()=>bO,compilerOptionsAffectDeclarationPath:()=>ak,compilerOptionsAffectEmit:()=>ok,compilerOptionsAffectSemanticDiagnostics:()=>ik,compilerOptionsDidYouMeanDiagnostics:()=>oj,compilerOptionsIndicateEsModules:()=>ZQ,compose:()=>Nt,computeCommonSourceDirectoryOfFilenames:()=>zU,computeLineAndCharacterOfPosition:()=>Za,computeLineOfPosition:()=>es,computeLineStarts:()=>Ga,computePositionOfLineAndCharacter:()=>Qa,computeSignature:()=>SW,computeSignatureWithDiagnostics:()=>xW,computeSuggestionDiagnostics:()=>V1,computedOptions:()=>IS,concatenate:()=>ne,concatenateDiagnosticMessageChains:()=>vS,configDirTemplateSubstitutionOptions:()=>BO,configDirTemplateSubstitutionWatchOptions:()=>JO,consumesNodeCoreModules:()=>QZ,contains:()=>E,containsIgnoredPath:()=>KT,containsObjectRestOrSpread:()=>yI,containsParseError:()=>Nd,containsPath:()=>ma,convertCompilerOptionsForTelemetry:()=>WL,convertCompilerOptionsFromJson:()=>yL,convertJsonOption:()=>wL,convertToBase64:()=>zb,convertToJson:()=>Lj,convertToObject:()=>jj,convertToOptionsWithAbsolutePaths:()=>Gj,convertToRelativePath:()=>va,convertToTSConfig:()=>Bj,convertTypeAcquisitionFromJson:()=>vL,copyComments:()=>fZ,copyEntries:()=>hd,copyLeadingComments:()=>vZ,copyProperties:()=>tt,copyTrailingAsLeadingComments:()=>xZ,copyTrailingComments:()=>bZ,couldStartTrivia:()=>us,countWhere:()=>I,createAbstractBuilder:()=>IW,createAccessorPropertyBackingField:()=>dI,createAccessorPropertyGetRedirector:()=>pI,createAccessorPropertySetRedirector:()=>fI,createBaseNodeFactory:()=>RC,createBinaryExpressionTrampoline:()=>rI,createBindingHelper:()=>vN,createBuildInfo:()=>pU,createBuilderProgram:()=>kW,createBuilderProgramUsingProgramBuildInfo:()=>DW,createBuilderStatusReporter:()=>$$,createCacheWithRedirects:()=>kM,createCacheableExportInfoMap:()=>E0,createCachedDirectoryStructureHost:()=>CU,createClassNamedEvaluationHelperBlock:()=>Lz,createClassThisAssignmentBlock:()=>Ez,createClassifier:()=>R0,createCommentDirectivesMap:()=>Gd,createCompilerDiagnostic:()=>gS,createCompilerDiagnosticForInvalidCustomType:()=>XO,createCompilerDiagnosticFromMessageChain:()=>hS,createCompilerHost:()=>qU,createCompilerHostFromProgramHost:()=>T$,createCompilerHostWorker:()=>WU,createDetachedDiagnostic:()=>_S,createDiagnosticCollection:()=>wy,createDiagnosticForFileFromMessageChain:()=>Qp,createDiagnosticForNode:()=>Vp,createDiagnosticForNodeArray:()=>Wp,createDiagnosticForNodeArrayFromMessageChain:()=>Kp,createDiagnosticForNodeFromMessageChain:()=>Hp,createDiagnosticForNodeInSourceFile:()=>$p,createDiagnosticForRange:()=>Zp,createDiagnosticMessageChainFromDiagnostic:()=>Yp,createDiagnosticReporter:()=>YW,createDocumentPositionMapper:()=>MJ,createDocumentRegistry:()=>e1,createDocumentRegistryInternal:()=>t1,createEmitAndSemanticDiagnosticsBuilderProgram:()=>AW,createEmitHelperFactory:()=>Xw,createEmptyExports:()=>HF,createEvaluator:()=>FC,createExpressionForJsxElement:()=>YF,createExpressionForJsxFragment:()=>ZF,createExpressionForObjectLiteralElementLike:()=>iA,createExpressionForPropertyName:()=>rA,createExpressionFromEntityName:()=>nA,createExternalHelpersImportDeclarationIfNeeded:()=>kA,createFileDiagnostic:()=>fS,createFileDiagnosticFromMessageChain:()=>Xp,createFlowNode:()=>$R,createForOfBindingStatement:()=>eA,createFutureSourceFile:()=>N0,createGetCanonicalFileName:()=>on,createGetIsolatedDeclarationErrors:()=>wq,createGetSourceFile:()=>UU,createGetSymbolAccessibilityDiagnosticForNode:()=>Cq,createGetSymbolAccessibilityDiagnosticForNodeName:()=>Tq,createGetSymbolWalker:()=>eB,createIncrementalCompilerHost:()=>O$,createIncrementalProgram:()=>j$,createJsxFactoryExpression:()=>QF,createLanguageService:()=>S5,createLanguageServiceSourceFile:()=>m5,createMemberAccessForPropertyName:()=>KF,createModeAwareCache:()=>wM,createModeAwareCacheKey:()=>CM,createModuleNotFoundChain:()=>Sd,createModuleResolutionCache:()=>FM,createModuleResolutionLoader:()=>yV,createModuleResolutionLoaderUsingGlobalCache:()=>KW,createModuleSpecifierResolutionHost:()=>eY,createMultiMap:()=>rt,createNameResolver:()=>OC,createNodeConverters:()=>zC,createNodeFactory:()=>KC,createOptionNameMap:()=>$O,createOverload:()=>Jfe,createPackageJsonImportFilter:()=>XZ,createPackageJsonInfo:()=>GZ,createParenthesizerRules:()=>BC,createPatternMatcher:()=>f1,createPrinter:()=>xU,createPrinterWithDefaults:()=>hU,createPrinterWithRemoveComments:()=>yU,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>vU,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>bU,createProgram:()=>RV,createProgramHost:()=>N$,createPropertyNameNodeForIdentifierOrLiteral:()=>nC,createQueue:()=>at,createRange:()=>Qb,createRedirectedBuilderProgram:()=>EW,createResolutionCache:()=>GW,createRuntimeTypeSerializer:()=>Qz,createScanner:()=>Fs,createSemanticDiagnosticsBuilderProgram:()=>FW,createSet:()=>st,createSolutionBuilder:()=>X$,createSolutionBuilderHost:()=>K$,createSolutionBuilderWithWatch:()=>Q$,createSolutionBuilderWithWatchHost:()=>G$,createSortedArray:()=>ae,createSourceFile:()=>YI,createSourceMapGenerator:()=>hJ,createSourceMapSource:()=>sw,createSuperAccessVariableStatement:()=>tq,createSymbolTable:()=>ad,createSymlinkCache:()=>dk,createSyntacticTypeNodeBuilder:()=>JK,createSystemWatchFunctions:()=>So,createTextChange:()=>zQ,createTextChangeFromStartLength:()=>JQ,createTextChangeRange:()=>oc,createTextRangeFromNode:()=>MQ,createTextRangeFromSpan:()=>BQ,createTextSpan:()=>tc,createTextSpanFromBounds:()=>nc,createTextSpanFromNode:()=>jQ,createTextSpanFromRange:()=>RQ,createTextSpanFromStringLiteralLikeContent:()=>LQ,createTextWriter:()=>Xy,createTokenRange:()=>rx,createTypeChecker:()=>QB,createTypeReferenceDirectiveResolutionCache:()=>AM,createTypeReferenceResolutionLoader:()=>xV,createWatchCompilerHost:()=>L$,createWatchCompilerHostOfConfigFile:()=>E$,createWatchCompilerHostOfFilesAndCompilerOptions:()=>F$,createWatchFactory:()=>k$,createWatchHost:()=>x$,createWatchProgram:()=>M$,createWatchStatusReporter:()=>n$,createWriteFileMeasuringIO:()=>VU,declarationNameToString:()=>Rp,decodeMappings:()=>wJ,decodedTextSpanIntersectsWith:()=>Ys,decorateHelper:()=>Zw,deduplicate:()=>oe,defaultIncludeSpec:()=>nL,defaultInitCompilerOptions:()=>GO,defaultMaximumTruncationLength:()=>nd,diagnosticCategoryName:()=>Si,diagnosticToString:()=>b0,diagnosticsEqualityComparer:()=>CS,directoryProbablyExists:()=>Hb,directorySeparator:()=>wo,displayPart:()=>EY,displayPartsToString:()=>_5,disposeEmitNodes:()=>_w,disposeResourcesHelper:()=>DN,documentSpansEqual:()=>bY,dumpTracingLegend:()=>Dr,elementAt:()=>Te,elideNodes:()=>sI,emitComments:()=>Mv,emitDetachedComments:()=>Rv,emitFiles:()=>dU,emitFilesAndReportErrors:()=>h$,emitFilesAndReportErrorsAndGetExitStatus:()=>y$,emitModuleKindIsNonNodeESM:()=>XS,emitNewLineBeforeLeadingCommentOfPosition:()=>Lv,emitNewLineBeforeLeadingComments:()=>Ov,emitNewLineBeforeLeadingCommentsOfPosition:()=>jv,emitResolverSkipsTypeChecking:()=>uU,emitSkippedWithNoDiagnostics:()=>BV,emptyArray:()=>p,emptyFileSystemEntries:()=>vT,emptyMap:()=>f,emptyOptions:()=>kG,emptySet:()=>m,endsWith:()=>Xt,ensurePathIsNonModuleName:()=>sa,ensureScriptKind:()=>Lk,ensureTrailingDirectorySeparator:()=>aa,entityNameToString:()=>Up,enumerateInsertsAndDeletes:()=>yn,equalOwnProperties:()=>He,equateStringsCaseInsensitive:()=>Et,equateStringsCaseSensitive:()=>Ft,equateValues:()=>Pt,esDecorateHelper:()=>nN,escapeJsxAttributeString:()=>Vy,escapeLeadingUnderscores:()=>Tc,escapeNonAsciiString:()=>By,escapeSnippetText:()=>eC,escapeString:()=>My,escapeTemplateSubstitution:()=>Dy,evaluatorResult:()=>EC,every:()=>T,executeCommandLine:()=>bK,expandPreOrPostfixIncrementOrDecrementExpression:()=>oA,explainFiles:()=>u$,explainIfFileIsRedirectAndImpliedFormat:()=>d$,exportAssignmentIsAlias:()=>Ch,exportStarHelper:()=>kN,expressionResultIsUnused:()=>HT,extend:()=>et,extendsHelper:()=>uN,extensionFromPath:()=>mT,extensionIsTS:()=>pT,extensionsNotSupportingExtensionlessResolution:()=>Kk,externalHelpersModuleNameText:()=>td,factory:()=>aw,fileExtensionIs:()=>Ro,fileExtensionIsOneOf:()=>Bo,fileIncludeReasonToDiagnostics:()=>m$,fileShouldUseJavaScriptRequire:()=>C0,filter:()=>O,filterMutate:()=>j,filterSemanticDiagnostics:()=>zV,find:()=>C,findAncestor:()=>xc,findBestPatternMatch:()=>cn,findChildOfKind:()=>RX,findComputedPropertyNameCacheAssignment:()=>mI,findConfigFile:()=>BU,findConstructorDeclaration:()=>IC,findContainingList:()=>BX,findDiagnosticForNode:()=>e0,findFirstNonJsxWhitespaceToken:()=>eQ,findIndex:()=>N,findLast:()=>w,findLastIndex:()=>D,findListItemInfo:()=>LX,findMap:()=>P,findModifier:()=>gY,findNextToken:()=>nQ,findPackageJson:()=>HZ,findPackageJsons:()=>$Z,findPrecedingMatchingToken:()=>pQ,findPrecedingToken:()=>rQ,findSuperStatementIndexPath:()=>rz,findTokenOnLeftOfPosition:()=>tQ,findUseStrictPrologue:()=>_A,first:()=>Ne,firstDefined:()=>v,firstDefinedIterator:()=>b,firstIterator:()=>De,firstOrOnly:()=>o0,firstOrUndefined:()=>Ce,firstOrUndefinedIterator:()=>we,fixupCompilerOptions:()=>_2,flatMap:()=>z,flatMapIterator:()=>U,flatMapToMutable:()=>q,flatten:()=>J,flattenCommaList:()=>hI,flattenDestructuringAssignment:()=>xz,flattenDestructuringBinding:()=>Tz,flattenDiagnosticMessageText:()=>cV,forEach:()=>h,forEachAncestor:()=>fd,forEachAncestorDirectory:()=>Sa,forEachChild:()=>KI,forEachChildRecursively:()=>GI,forEachEmittedFile:()=>$q,forEachEnclosingBlockScopeContainer:()=>Mp,forEachEntry:()=>md,forEachExternalModuleToImportFrom:()=>A0,forEachImportClauseDeclaration:()=>Og,forEachKey:()=>gd,forEachLeadingCommentRange:()=>bs,forEachNameInAccessChainWalkingLeft:()=>$x,forEachNameOfDefaultExport:()=>M0,forEachPropertyAssignment:()=>Yf,forEachResolvedProjectReference:()=>kV,forEachReturnStatement:()=>jf,forEachRight:()=>y,forEachTrailingCommentRange:()=>xs,forEachTsConfigPropArray:()=>nm,forEachUnique:()=>SY,forEachYieldExpression:()=>Lf,forSomeAncestorDirectory:()=>jx,formatColorAndReset:()=>iV,formatDiagnostic:()=>GU,formatDiagnostics:()=>KU,formatDiagnosticsWithColorAndContext:()=>sV,formatGeneratedName:()=>uI,formatGeneratedNamePart:()=>lI,formatLocation:()=>aV,formatMessage:()=>mS,formatStringFromArgs:()=>aS,formatting:()=>Ede,fullTripleSlashAMDReferencePathRegEx:()=>Pf,fullTripleSlashReferencePathRegEx:()=>wf,generateDjb2Hash:()=>Qi,generateTSConfig:()=>Kj,generatorHelper:()=>yN,getAdjustedReferenceLocation:()=>KX,getAdjustedRenameLocation:()=>GX,getAliasDeclarationFromName:()=>kh,getAllAccessorDeclarations:()=>Dv,getAllDecoratorsOfClass:()=>_z,getAllDecoratorsOfClassElement:()=>uz,getAllJSDocTags:()=>yl,getAllJSDocTagsOfKind:()=>vl,getAllKeys:()=>qe,getAllProjectOutputs:()=>cU,getAllSuperTypeNodes:()=>Fh,getAllowJSCompilerOption:()=>KS,getAllowSyntheticDefaultImports:()=>JS,getAncestor:()=>Oh,getAnyExtensionFromPath:()=>Ho,getAreDeclarationMapsEnabled:()=>HS,getAssignedExpandoInitializer:()=>rg,getAssignedName:()=>Lc,getAssignedNameOfIdentifier:()=>Oz,getAssignmentDeclarationKind:()=>dg,getAssignmentDeclarationPropertyAccessKind:()=>Sg,getAssignmentTargetKind:()=>oh,getAutomaticTypeDirectiveNames:()=>yM,getBaseFileName:()=>Wo,getBinaryOperatorPrecedence:()=>Ty,getBuildInfo:()=>mU,getBuildInfoFileVersionMap:()=>PW,getBuildInfoText:()=>fU,getBuildOrderFromAnyBuildOrder:()=>W$,getBuilderCreationParameters:()=>vW,getBuilderFileEmit:()=>QV,getCanonicalDiagnostic:()=>ef,getCheckFlags:()=>xx,getClassExtendsHeritageElement:()=>Ph,getClassLikeDeclarationOfSymbol:()=>Ix,getCombinedLocalAndExportSymbolFlags:()=>Tx,getCombinedModifierFlags:()=>fc,getCombinedNodeFlags:()=>gc,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>mc,getCommentRange:()=>Sw,getCommonSourceDirectory:()=>aU,getCommonSourceDirectoryOfConfig:()=>sU,getCompilerOptionValue:()=>sk,getCompilerOptionsDiffValue:()=>$j,getConditions:()=>gM,getConfigFileParsingDiagnostics:()=>OV,getConstantValue:()=>Fw,getContainerFlags:()=>YR,getContainerNode:()=>vX,getContainingClass:()=>om,getContainingClassExcludingClassDecorators:()=>cm,getContainingClassStaticBlock:()=>am,getContainingFunction:()=>rm,getContainingFunctionDeclaration:()=>im,getContainingFunctionOrClassStaticBlock:()=>sm,getContainingNodeArray:()=>GT,getContainingObjectLiteralElement:()=>T5,getContextualTypeFromParent:()=>CZ,getContextualTypeFromParentOrAncestorTypeNode:()=>UX,getCurrentTime:()=>U$,getDeclarationDiagnostics:()=>Nq,getDeclarationEmitExtensionForPath:()=>sv,getDeclarationEmitOutputFilePath:()=>ov,getDeclarationEmitOutputFilePathWorker:()=>av,getDeclarationFileExtension:()=>_O,getDeclarationFromName:()=>vh,getDeclarationModifierFlagsFromSymbol:()=>Sx,getDeclarationOfKind:()=>id,getDeclarationsOfKind:()=>od,getDeclaredExpandoInitializer:()=>ng,getDecorators:()=>Mc,getDefaultCompilerOptions:()=>u5,getDefaultFormatCodeSettings:()=>FG,getDefaultLibFileName:()=>qs,getDefaultLibFilePath:()=>w5,getDefaultLikeExportInfo:()=>j0,getDefaultLikeExportNameFromDeclaration:()=>l0,getDiagnosticText:()=>dj,getDiagnosticsWithinSpan:()=>t0,getDirectoryPath:()=>Vo,getDirectoryToWatchFailedLookupLocation:()=>zW,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>VW,getDocumentPositionMapper:()=>z1,getDocumentSpansEqualityComparer:()=>xY,getESModuleInterop:()=>BS,getEditsForFileRename:()=>i1,getEffectiveBaseTypeNode:()=>Dh,getEffectiveConstraintOfTypeParameter:()=>Sl,getEffectiveContainerForJSDocTemplateTag:()=>Gg,getEffectiveImplementsTypeNodes:()=>Eh,getEffectiveInitializer:()=>tg,getEffectiveJSDocHost:()=>Yg,getEffectiveModifierFlags:()=>rb,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>ib,getEffectiveModifierFlagsNoCache:()=>cb,getEffectiveReturnTypeNode:()=>Fv,getEffectiveSetAccessorTypeAnnotationNode:()=>Iv,getEffectiveTypeAnnotationNode:()=>Pv,getEffectiveTypeParameterDeclarations:()=>xl,getEffectiveTypeRoots:()=>_M,getElementOrPropertyAccessArgumentExpressionOrName:()=>bg,getElementOrPropertyAccessName:()=>xg,getElementsOfBindingOrAssignmentPattern:()=>OA,getEmitDeclarations:()=>VS,getEmitFlags:()=>ip,getEmitHelpers:()=>Lw,getEmitModuleDetectionKind:()=>MS,getEmitModuleKind:()=>jS,getEmitModuleResolutionKind:()=>LS,getEmitScriptTarget:()=>OS,getEmitStandardClassFields:()=>rk,getEnclosingBlockScopeContainer:()=>Lp,getEnclosingContainer:()=>jp,getEncodedSemanticClassifications:()=>H0,getEncodedSyntacticClassifications:()=>Y0,getEndLinePosition:()=>Od,getEntityNameFromTypeNode:()=>bm,getEntrypointsFromPackageJsonInfo:()=>aR,getErrorCountForSummary:()=>i$,getErrorSpanForNode:()=>rf,getErrorSummaryText:()=>c$,getEscapedTextOfIdentifierOrLiteral:()=>ty,getEscapedTextOfJsxAttributeName:()=>hC,getEscapedTextOfJsxNamespacedName:()=>bC,getExpandoInitializer:()=>ig,getExportAssignmentExpression:()=>wh,getExportInfoMap:()=>O0,getExportNeedsImportStarHelper:()=>UJ,getExpressionAssociativity:()=>yy,getExpressionPrecedence:()=>by,getExternalHelpersModuleName:()=>xA,getExternalModuleImportEqualsDeclarationExpression:()=>jm,getExternalModuleName:()=>Fg,getExternalModuleNameFromDeclaration:()=>nv,getExternalModuleNameFromPath:()=>rv,getExternalModuleNameLiteral:()=>wA,getExternalModuleRequireArgument:()=>Lm,getFallbackOptions:()=>MU,getFileEmitOutput:()=>HV,getFileMatcherPatterns:()=>Fk,getFileNamesFromConfigSpecs:()=>IL,getFileWatcherEventKind:()=>po,getFilesInErrorForSummary:()=>o$,getFirstConstructorWithBody:()=>vv,getFirstIdentifier:()=>wb,getFirstNonSpaceCharacterPosition:()=>iZ,getFirstProjectOutput:()=>_U,getFixableErrorSpanExpression:()=>r0,getFormatCodeSettingsForWriting:()=>x0,getFullWidth:()=>vd,getFunctionFlags:()=>$h,getHeritageClause:()=>Ih,getHostSignatureFromJSDoc:()=>Qg,getIdentifierAutoGenerate:()=>$w,getIdentifierGeneratedImportReference:()=>Kw,getIdentifierTypeArguments:()=>Vw,getImmediatelyInvokedFunctionExpression:()=>fm,getImpliedNodeFormatForFile:()=>jV,getImpliedNodeFormatForFileWorker:()=>LV,getImportNeedsImportDefaultHelper:()=>WJ,getImportNeedsImportStarHelper:()=>VJ,getIndentSize:()=>Gy,getIndentString:()=>Ky,getInferredLibraryNameResolveFrom:()=>wV,getInitializedVariables:()=>hx,getInitializerOfBinaryExpression:()=>kg,getInitializerOfBindingOrAssignmentElement:()=>DA,getInterfaceBaseTypeNodes:()=>Ah,getInternalEmitFlags:()=>op,getInvokedExpression:()=>xm,getIsolatedModules:()=>RS,getJSDocAugmentsTag:()=>$c,getJSDocClassTag:()=>Kc,getJSDocCommentRanges:()=>Cf,getJSDocCommentsAndTags:()=>Wg,getJSDocDeprecatedTag:()=>il,getJSDocDeprecatedTagNoCache:()=>ol,getJSDocEnumTag:()=>al,getJSDocHost:()=>Zg,getJSDocImplementsTags:()=>Hc,getJSDocOverloadTags:()=>Xg,getJSDocOverrideTagNoCache:()=>rl,getJSDocParameterTags:()=>Jc,getJSDocParameterTagsNoCache:()=>zc,getJSDocPrivateTag:()=>Qc,getJSDocPrivateTagNoCache:()=>Yc,getJSDocProtectedTag:()=>Zc,getJSDocProtectedTagNoCache:()=>el,getJSDocPublicTag:()=>Gc,getJSDocPublicTagNoCache:()=>Xc,getJSDocReadonlyTag:()=>tl,getJSDocReadonlyTagNoCache:()=>nl,getJSDocReturnTag:()=>cl,getJSDocReturnType:()=>pl,getJSDocRoot:()=>eh,getJSDocSatisfiesExpressionType:()=>mC,getJSDocSatisfiesTag:()=>_l,getJSDocTags:()=>ml,getJSDocTagsNoCache:()=>gl,getJSDocTemplateTag:()=>ll,getJSDocThisTag:()=>sl,getJSDocType:()=>dl,getJSDocTypeAliasName:()=>jA,getJSDocTypeAssertionType:()=>mA,getJSDocTypeParameterDeclarations:()=>Av,getJSDocTypeParameterTags:()=>Uc,getJSDocTypeParameterTagsNoCache:()=>Vc,getJSDocTypeTag:()=>ul,getJSXImplicitImportBase:()=>lk,getJSXRuntimeImport:()=>_k,getJSXTransformEnabled:()=>ck,getKeyForCompilerOptions:()=>SM,getLanguageVariant:()=>DS,getLastChild:()=>Rx,getLeadingCommentRanges:()=>Cs,getLeadingCommentRangesOfNode:()=>Tf,getLeftmostAccessExpression:()=>Wx,getLeftmostExpression:()=>Hx,getLibraryNameFromLibFileName:()=>NV,getLineAndCharacterOfPosition:()=>ns,getLineInfo:()=>xJ,getLineOfLocalPosition:()=>hv,getLineOfLocalPositionFromLineMap:()=>yv,getLineStartPositionForPosition:()=>kX,getLineStarts:()=>Ya,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>mx,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>fx,getLinesBetweenPositions:()=>ts,getLinesBetweenRangeEndAndRangeStart:()=>lx,getLinesBetweenRangeEndPositions:()=>_x,getLiteralText:()=>cp,getLocalNameForExternalImport:()=>CA,getLocalSymbolForExportDefault:()=>Rb,getLocaleSpecificMessage:()=>lS,getLocaleTimeString:()=>t$,getMappedContextSpan:()=>wY,getMappedDocumentSpan:()=>CY,getMappedLocation:()=>TY,getMatchedFileSpec:()=>p$,getMatchedIncludeSpec:()=>f$,getMeaningFromDeclaration:()=>WG,getMeaningFromLocation:()=>$G,getMembersOfDeclaration:()=>Rf,getModeForFileReference:()=>lV,getModeForResolutionAtIndex:()=>_V,getModeForUsageLocation:()=>dV,getModifiedTime:()=>no,getModifiers:()=>Rc,getModuleInstanceState:()=>qR,getModuleNameStringLiteralAt:()=>$V,getModuleSpecifierEndingPreference:()=>tT,getModuleSpecifierResolverHost:()=>tY,getNameForExportedSymbol:()=>s0,getNameFromImportAttribute:()=>PC,getNameFromIndexInfo:()=>Bp,getNameFromPropertyName:()=>XQ,getNameOfAccessExpression:()=>Ux,getNameOfCompilerOptionValue:()=>Uj,getNameOfDeclaration:()=>jc,getNameOfExpando:()=>ag,getNameOfJSDocTypedef:()=>Ac,getNameOfScriptTarget:()=>nk,getNameOrArgument:()=>vg,getNameTable:()=>k5,getNamesForExportedSymbol:()=>a0,getNamespaceDeclarationNode:()=>Ag,getNewLineCharacter:()=>Xb,getNewLineKind:()=>v0,getNewLineOrDefaultFromHost:()=>$Y,getNewTargetContainer:()=>dm,getNextJSDocCommentLocation:()=>Hg,getNodeChildren:()=>VF,getNodeForGeneratedName:()=>cI,getNodeId:()=>KB,getNodeKind:()=>bX,getNodeModifiers:()=>xQ,getNodeModulePathParts:()=>iC,getNonAssignedNameOfDeclaration:()=>Oc,getNonAssignmentOperatorForCompoundAssignment:()=>ez,getNonAugmentationDeclaration:()=>Sp,getNonDecoratorTokenPosOfNode:()=>Qd,getNormalizedAbsolutePath:()=>ta,getNormalizedAbsolutePathWithoutRoot:()=>ra,getNormalizedPathComponents:()=>ea,getObjectFlags:()=>Ox,getOperator:()=>xy,getOperatorAssociativity:()=>vy,getOperatorPrecedence:()=>ky,getOptionFromName:()=>sj,getOptionsForLibraryResolution:()=>IM,getOptionsNameMap:()=>HO,getOrCreateEmitNode:()=>lw,getOrCreateExternalHelpersModuleNameIfNeeded:()=>TA,getOrUpdate:()=>G,getOriginalNode:()=>bc,getOriginalNodeId:()=>BJ,getOriginalSourceFile:()=>gy,getOutputDeclarationFileName:()=>Zq,getOutputDeclarationFileNameWorker:()=>eU,getOutputExtension:()=>Qq,getOutputFileNames:()=>lU,getOutputJSFileNameWorker:()=>nU,getOutputPathsFor:()=>Gq,getOutputPathsForBundle:()=>Kq,getOwnEmitOutputFilePath:()=>iv,getOwnKeys:()=>ze,getOwnValues:()=>Ue,getPackageJsonInfo:()=>dR,getPackageJsonTypesVersionsPaths:()=>lM,getPackageJsonsVisibleToFile:()=>KZ,getPackageNameFromTypesPackageName:()=>FR,getPackageScopeForPath:()=>lR,getParameterSymbolFromJSDoc:()=>Kg,getParameterTypeNode:()=>oC,getParentNodeInSpan:()=>fY,getParseTreeNode:()=>kc,getParsedCommandLineOfConfigFile:()=>pj,getPathComponents:()=>Ko,getPathComponentsRelativeTo:()=>ha,getPathFromPathComponents:()=>Go,getPathUpdater:()=>o1,getPathsBasePath:()=>lv,getPatternFromSpec:()=>Dk,getPendingEmitKind:()=>YV,getPositionOfLineAndCharacter:()=>Xa,getPossibleGenericSignatures:()=>gQ,getPossibleOriginalInputExtensionForExtension:()=>cv,getPossibleTypeArgumentsInfo:()=>hQ,getPreEmitDiagnostics:()=>HU,getPrecedingNonSpaceCharacterPosition:()=>oZ,getPrivateIdentifier:()=>mz,getProperties:()=>iz,getProperty:()=>Je,getPropertyArrayElementValue:()=>Zf,getPropertyAssignmentAliasLikeExpression:()=>Nh,getPropertyNameForPropertyNameNode:()=>Yh,getPropertyNameForUniqueESSymbol:()=>ny,getPropertyNameFromType:()=>TC,getPropertyNameOfBindingOrAssignmentElement:()=>FA,getPropertySymbolFromBindingElement:()=>pY,getPropertySymbolsFromContextualType:()=>C5,getQuoteFromPreference:()=>cY,getQuotePreference:()=>sY,getRangesWhere:()=>te,getRefactorContextSpan:()=>n0,getReferencedFileLocation:()=>AV,getRegexFromPattern:()=>Ak,getRegularExpressionForWildcard:()=>Ck,getRegularExpressionsForWildcards:()=>wk,getRelativePathFromDirectory:()=>ya,getRelativePathFromFile:()=>ba,getRelativePathToDirectoryOrUrl:()=>xa,getRenameLocation:()=>yZ,getReplacementSpanForContextToken:()=>OQ,getResolutionDiagnostic:()=>VV,getResolutionModeOverride:()=>fV,getResolveJsonModule:()=>US,getResolvePackageJsonExports:()=>zS,getResolvePackageJsonImports:()=>qS,getResolvedExternalModuleName:()=>ev,getRestIndicatorOfBindingOrAssignmentElement:()=>EA,getRestParameterElementType:()=>Mf,getRightMostAssignedExpression:()=>cg,getRootDeclaration:()=>py,getRootDirectoryOfResolutionCache:()=>WW,getRootLength:()=>Uo,getRootPathSplitLength:()=>$W,getScriptKind:()=>eZ,getScriptKindFromFileName:()=>Mk,getScriptTargetFeatures:()=>ap,getSelectedEffectiveModifierFlags:()=>eb,getSelectedSyntacticModifierFlags:()=>tb,getSemanticClassifications:()=>W0,getSemanticJsxChildren:()=>Cy,getSetAccessorTypeAnnotationNode:()=>xv,getSetAccessorValueParameter:()=>bv,getSetExternalModuleIndicator:()=>AS,getShebang:()=>Ns,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>Jg,getSingleVariableOfVariableStatement:()=>zg,getSnapshotText:()=>HQ,getSnippetElement:()=>Rw,getSourceFileOfModule:()=>Pd,getSourceFileOfNode:()=>Dd,getSourceFilePathInNewDir:()=>dv,getSourceFilePathInNewDirWorker:()=>pv,getSourceFileVersionAsHashFromText:()=>C$,getSourceFilesToEmit:()=>_v,getSourceMapRange:()=>gw,getSourceMapper:()=>J1,getSourceTextOfNodeFromSourceFile:()=>Yd,getSpanOfTokenAtPosition:()=>tf,getSpellingSuggestion:()=>Kt,getStartPositionOfLine:()=>Ad,getStartPositionOfRange:()=>px,getStartsOnNewLine:()=>bw,getStaticPropertiesAndClassStaticBlock:()=>az,getStrictOptionValue:()=>tk,getStringComparer:()=>Bt,getSubPatternFromSpec:()=>Pk,getSuperCallFromStatement:()=>tz,getSuperContainer:()=>pm,getSupportedCodeFixes:()=>d5,getSupportedExtensions:()=>Gk,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>Xk,getSwitchedType:()=>EZ,getSymbolId:()=>GB,getSymbolNameForPrivateIdentifier:()=>ry,getSymbolParentOrFail:()=>_0,getSymbolTarget:()=>tZ,getSyntacticClassifications:()=>Q0,getSyntacticModifierFlags:()=>ob,getSyntacticModifierFlagsNoCache:()=>lb,getSynthesizedDeepClone:()=>aZ,getSynthesizedDeepCloneWithReplacements:()=>sZ,getSynthesizedDeepClones:()=>lZ,getSynthesizedDeepClonesWithReplacements:()=>_Z,getSyntheticLeadingComments:()=>Tw,getSyntheticTrailingComments:()=>Nw,getTargetLabel:()=>aX,getTargetOfBindingOrAssignmentElement:()=>PA,getTemporaryModuleResolutionState:()=>cR,getTextOfConstantValue:()=>lp,getTextOfIdentifierOrLiteral:()=>ey,getTextOfJSDocComment:()=>bl,getTextOfJsxAttributeName:()=>yC,getTextOfJsxNamespacedName:()=>xC,getTextOfNode:()=>tp,getTextOfNodeFromSourceText:()=>ep,getTextOfPropertyName:()=>qp,getThisContainer:()=>lm,getThisParameter:()=>Sv,getTokenAtPosition:()=>YX,getTokenPosOfNode:()=>Xd,getTokenSourceMapRange:()=>yw,getTouchingPropertyName:()=>XX,getTouchingToken:()=>QX,getTrailingCommentRanges:()=>ws,getTrailingSemicolonDeferringWriter:()=>Qy,getTransformFlagsSubtreeExclusions:()=>nw,getTransformers:()=>Oq,getTsBuildInfoEmitOutputFilePath:()=>Hq,getTsConfigObjectLiteralExpression:()=>em,getTsConfigPropArrayElementValue:()=>tm,getTypeAnnotationNode:()=>Ev,getTypeArgumentOrTypeParameterList:()=>SQ,getTypeKeywordOfTypeOnlyImport:()=>yY,getTypeNode:()=>qw,getTypeNodeIfAccessible:()=>AZ,getTypeParameterFromJsDoc:()=>th,getTypeParameterOwner:()=>cc,getTypesPackageName:()=>PR,getUILocale:()=>Ut,getUniqueName:()=>hZ,getUniqueSymbolId:()=>rZ,getUseDefineForClassFields:()=>GS,getWatchErrorSummaryDiagnosticMessage:()=>a$,getWatchFactory:()=>LU,group:()=>Qe,groupBy:()=>Ye,guessIndentation:()=>Hu,handleNoEmitOptions:()=>JV,handleWatchOptionsConfigDirTemplateSubstitution:()=>iL,hasAbstractModifier:()=>Gv,hasAccessorModifier:()=>Qv,hasAmbientModifier:()=>Xv,hasChangesInResolutions:()=>wd,hasChildOfKind:()=>MX,hasContextSensitiveParameters:()=>XT,hasDecorators:()=>Zv,hasDocComment:()=>vQ,hasDynamicName:()=>Xh,hasEffectiveModifier:()=>Vv,hasEffectiveModifiers:()=>qv,hasEffectiveReadonlyModifier:()=>Yv,hasExtension:()=>Mo,hasIndexSignature:()=>PZ,hasInferredType:()=>MC,hasInitializer:()=>qu,hasInvalidEscape:()=>Ey,hasJSDocNodes:()=>Ju,hasJSDocParameterTags:()=>Wc,hasJSFileExtension:()=>Qk,hasJsonModuleEmitEnabled:()=>QS,hasOnlyExpressionInitializer:()=>Uu,hasOverrideModifier:()=>Kv,hasPossibleExternalModuleReference:()=>Ip,hasProperty:()=>Be,hasPropertyAccessExpressionWithName:()=>sX,hasQuestionToken:()=>jg,hasRecordedExternalHelpers:()=>SA,hasResolutionModeOverride:()=>wC,hasRestParameter:()=>Xu,hasScopeMarker:()=>su,hasStaticModifier:()=>Hv,hasSyntacticModifier:()=>Wv,hasSyntacticModifiers:()=>Uv,hasTSFileExtension:()=>Yk,hasTabstop:()=>_C,hasTrailingDirectorySeparator:()=>Jo,hasType:()=>zu,hasTypeArguments:()=>nh,hasZeroOrOneAsteriskCharacter:()=>uk,helperString:()=>Yw,hostGetCanonicalFileName:()=>Zy,hostUsesCaseSensitiveFileNames:()=>Yy,idText:()=>wc,identifierIsThisKeyword:()=>Nv,identifierToKeywordKind:()=>Nc,identity:()=>yt,identitySourceMapConsumer:()=>RJ,ignoreSourceNewlines:()=>Jw,ignoredPaths:()=>fo,importDefaultHelper:()=>SN,importFromModuleSpecifier:()=>Pg,importStarHelper:()=>xN,indexOfAnyCharCode:()=>A,indexOfNode:()=>rp,indicesOf:()=>ie,inferredTypesContainingFile:()=>CV,injectClassNamedEvaluationHelperBlockIfMissing:()=>Jz,injectClassThisAssignmentIfMissing:()=>Iz,insertImports:()=>hY,insertLeadingStatement:()=>tA,insertSorted:()=>se,insertStatementAfterCustomPrologue:()=>$d,insertStatementAfterStandardPrologue:()=>Wd,insertStatementsAfterCustomPrologue:()=>Vd,insertStatementsAfterStandardPrologue:()=>Ud,intersperse:()=>k,intrinsicTagNameToString:()=>SC,introducesArgumentsExoticObject:()=>Wf,inverseJsxOptionMap:()=>SO,isAbstractConstructorSymbol:()=>Ax,isAbstractModifier:()=>aD,isAccessExpression:()=>qx,isAccessibilityModifier:()=>DQ,isAccessor:()=>k_,isAccessorModifier:()=>cD,isAliasSymbolDeclaration:()=>Sh,isAliasableExpression:()=>Th,isAmbientModule:()=>pp,isAmbientPropertyDeclaration:()=>Cp,isAnonymousFunctionDefinition:()=>cy,isAnyDirectorySeparator:()=>Eo,isAnyImportOrBareOrAccessedRequire:()=>Ep,isAnyImportOrReExport:()=>Op,isAnyImportOrRequireStatement:()=>Fp,isAnyImportSyntax:()=>Pp,isAnySupportedFileExtension:()=>gT,isApplicableVersionedTypesKey:()=>xR,isArgumentExpressionOfElementAccess:()=>fX,isArray:()=>ct,isArrayBindingElement:()=>L_,isArrayBindingOrAssignmentElement:()=>U_,isArrayBindingOrAssignmentPattern:()=>q_,isArrayBindingPattern:()=>ZD,isArrayLiteralExpression:()=>tP,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>EQ,isArrayTypeNode:()=>OD,isArrowFunction:()=>uP,isAsExpression:()=>wP,isAssertClause:()=>mE,isAssertEntry:()=>gE,isAssertionExpression:()=>ru,isAssertsKeyword:()=>nD,isAssignmentDeclaration:()=>eg,isAssignmentExpression:()=>xb,isAssignmentOperator:()=>yb,isAssignmentPattern:()=>j_,isAssignmentTarget:()=>ah,isAsteriskToken:()=>WN,isAsyncFunction:()=>Hh,isAsyncModifier:()=>tD,isAutoAccessorPropertyDeclaration:()=>T_,isAwaitExpression:()=>mP,isAwaitKeyword:()=>rD,isBigIntLiteral:()=>IN,isBinaryExpression:()=>yP,isBinaryOperatorToken:()=>XA,isBindableObjectDefinePropertyCall:()=>pg,isBindableStaticAccessExpression:()=>gg,isBindableStaticElementAccessExpression:()=>hg,isBindableStaticNameExpression:()=>yg,isBindingElement:()=>eP,isBindingElementOfBareOrAccessedRequire:()=>Gm,isBindingName:()=>p_,isBindingOrAssignmentElement:()=>R_,isBindingOrAssignmentPattern:()=>B_,isBindingPattern:()=>O_,isBlock:()=>jP,isBlockLike:()=>w0,isBlockOrCatchScoped:()=>up,isBlockScope:()=>wp,isBlockScopedContainerTopLevel:()=>yp,isBooleanLiteral:()=>h_,isBreakOrContinueStatement:()=>Ll,isBreakStatement:()=>$P,isBuild:()=>vK,isBuildInfoFile:()=>Wq,isBuilderProgram:()=>l$,isBundle:()=>YE,isCallChain:()=>Nl,isCallExpression:()=>oP,isCallExpressionTarget:()=>KG,isCallLikeExpression:()=>H_,isCallLikeOrFunctionLikeExpression:()=>$_,isCallOrNewExpression:()=>K_,isCallOrNewExpressionTarget:()=>XG,isCallSignatureDeclaration:()=>CD,isCallToHelper:()=>FN,isCaseBlock:()=>lE,isCaseClause:()=>UE,isCaseKeyword:()=>uD,isCaseOrDefaultClause:()=>Ou,isCatchClause:()=>$E,isCatchClauseVariableDeclaration:()=>YT,isCatchClauseVariableDeclarationOrBindingElement:()=>dp,isCheckJsEnabledForFile:()=>yT,isChildOfNodeWithKind:()=>Of,isCircularBuildOrder:()=>V$,isClassDeclaration:()=>rE,isClassElement:()=>x_,isClassExpression:()=>kP,isClassInstanceProperty:()=>C_,isClassLike:()=>S_,isClassMemberModifier:()=>l_,isClassNamedEvaluationHelperBlock:()=>Mz,isClassOrTypeElement:()=>E_,isClassStaticBlockDeclaration:()=>xD,isClassThisAssignmentBlock:()=>Fz,isCollapsedRange:()=>nx,isColonToken:()=>KN,isCommaExpression:()=>dA,isCommaListExpression:()=>AP,isCommaSequence:()=>pA,isCommaToken:()=>qN,isComment:()=>kQ,isCommonJsExportPropertyAssignment:()=>Uf,isCommonJsExportedExpression:()=>qf,isCompoundAssignment:()=>ZJ,isComputedNonLiteralName:()=>Jp,isComputedPropertyName:()=>pD,isConciseBody:()=>uu,isConditionalExpression:()=>vP,isConditionalTypeNode:()=>zD,isConstAssertion:()=>AC,isConstTypeReference:()=>Il,isConstructSignatureDeclaration:()=>wD,isConstructorDeclaration:()=>SD,isConstructorTypeNode:()=>FD,isContextualKeyword:()=>Rh,isContinueStatement:()=>WP,isCustomPrologue:()=>bf,isDebuggerStatement:()=>ZP,isDeclaration:()=>ku,isDeclarationBindingElement:()=>M_,isDeclarationFileName:()=>lO,isDeclarationName:()=>yh,isDeclarationNameOfEnumOrNamespace:()=>gx,isDeclarationReadonly:()=>lf,isDeclarationStatement:()=>Tu,isDeclarationWithTypeParameterChildren:()=>Dp,isDeclarationWithTypeParameters:()=>Np,isDecorator:()=>gD,isDecoratorTarget:()=>YG,isDefaultClause:()=>VE,isDefaultImport:()=>Ig,isDefaultModifier:()=>eD,isDefaultedExpandoInitializer:()=>og,isDeleteExpression:()=>dP,isDeleteTarget:()=>gh,isDeprecatedDeclaration:()=>h0,isDestructuringAssignment:()=>kb,isDiagnosticWithLocation:()=>ZZ,isDiskPathRoot:()=>Io,isDoStatement:()=>JP,isDocumentRegistryEntry:()=>Z0,isDotDotDotToken:()=>zN,isDottedName:()=>Nb,isDynamicName:()=>Qh,isESSymbolIdentifier:()=>ay,isEffectiveExternalModule:()=>kp,isEffectiveModuleDeclaration:()=>gp,isEffectiveStrictModeSourceFile:()=>Tp,isElementAccessChain:()=>wl,isElementAccessExpression:()=>iP,isEmittedFileOfProgram:()=>OU,isEmptyArrayLiteral:()=>Mb,isEmptyBindingElement:()=>uc,isEmptyBindingPattern:()=>_c,isEmptyObjectLiteral:()=>Lb,isEmptyStatement:()=>MP,isEmptyStringLiteral:()=>Dm,isEntityName:()=>u_,isEntityNameExpression:()=>Cb,isEnumConst:()=>cf,isEnumDeclaration:()=>aE,isEnumMember:()=>XE,isEqualityOperatorKind:()=>NZ,isEqualsGreaterThanToken:()=>XN,isExclamationToken:()=>$N,isExcludedFile:()=>OL,isExclusivelyTypeOnlyImportOrExport:()=>uV,isExpandoPropertyDeclaration:()=>CC,isExportAssignment:()=>kE,isExportDeclaration:()=>TE,isExportModifier:()=>ZN,isExportName:()=>cA,isExportNamespaceAsDefaultDeclaration:()=>Zd,isExportOrDefaultModifier:()=>oI,isExportSpecifier:()=>wE,isExportsIdentifier:()=>lg,isExportsOrModuleExportsOrAlias:()=>QR,isExpression:()=>nu,isExpressionNode:()=>Em,isExpressionOfExternalModuleImportEqualsDeclaration:()=>yX,isExpressionOfOptionalChainRoot:()=>El,isExpressionStatement:()=>RP,isExpressionWithTypeArguments:()=>CP,isExpressionWithTypeArgumentsInClassExtendsClause:()=>Tb,isExternalModule:()=>tO,isExternalModuleAugmentation:()=>bp,isExternalModuleImportEqualsDeclaration:()=>Om,isExternalModuleIndicator:()=>lu,isExternalModuleNameRelative:()=>Js,isExternalModuleReference:()=>EE,isExternalModuleSymbol:()=>cd,isExternalOrCommonJsModule:()=>af,isFileLevelReservedGeneratedIdentifier:()=>i_,isFileLevelUniqueName:()=>jd,isFileProbablyExternalModule:()=>NI,isFirstDeclarationOfSymbolParameter:()=>NY,isFixablePromiseHandler:()=>G1,isForInOrOfStatement:()=>_u,isForInStatement:()=>UP,isForInitializer:()=>pu,isForOfStatement:()=>VP,isForStatement:()=>qP,isFullSourceFile:()=>Rm,isFunctionBlock:()=>Hf,isFunctionBody:()=>du,isFunctionDeclaration:()=>nE,isFunctionExpression:()=>_P,isFunctionExpressionOrArrowFunction:()=>ZT,isFunctionLike:()=>f_,isFunctionLikeDeclaration:()=>g_,isFunctionLikeKind:()=>v_,isFunctionLikeOrClassStaticBlockDeclaration:()=>m_,isFunctionOrConstructorTypeNode:()=>I_,isFunctionOrModuleBlock:()=>b_,isFunctionSymbol:()=>Ng,isFunctionTypeNode:()=>ED,isFutureReservedKeyword:()=>Jh,isGeneratedIdentifier:()=>n_,isGeneratedPrivateIdentifier:()=>r_,isGetAccessor:()=>Bu,isGetAccessorDeclaration:()=>kD,isGetOrSetAccessorDeclaration:()=>Tl,isGlobalDeclaration:()=>m0,isGlobalScopeAugmentation:()=>vp,isGlobalSourceFile:()=>of,isGrammarError:()=>Rd,isHeritageClause:()=>WE,isHoistedFunction:()=>xf,isHoistedVariableStatement:()=>kf,isIdentifier:()=>QN,isIdentifierANonContextualKeyword:()=>Uh,isIdentifierName:()=>xh,isIdentifierOrThisTypeNode:()=>zA,isIdentifierPart:()=>Ps,isIdentifierStart:()=>Ds,isIdentifierText:()=>Es,isIdentifierTypePredicate:()=>Xf,isIdentifierTypeReference:()=>jT,isIfStatement:()=>BP,isIgnoredFileFromWildCardWatching:()=>AU,isImplicitGlob:()=>Nk,isImportAttribute:()=>yE,isImportAttributeName:()=>t_,isImportAttributes:()=>hE,isImportCall:()=>gf,isImportClause:()=>pE,isImportDeclaration:()=>dE,isImportEqualsDeclaration:()=>uE,isImportKeyword:()=>_D,isImportMeta:()=>hf,isImportOrExportSpecifier:()=>Xl,isImportOrExportSpecifierName:()=>ZY,isImportSpecifier:()=>SE,isImportTypeAssertionContainer:()=>fE,isImportTypeNode:()=>GD,isImportableFile:()=>F0,isInComment:()=>yQ,isInCompoundLikeAssignment:()=>sh,isInExpressionContext:()=>Fm,isInJSDoc:()=>Vm,isInJSFile:()=>zm,isInJSXText:()=>uQ,isInJsonFile:()=>qm,isInNonReferenceComment:()=>AQ,isInReferenceComment:()=>FQ,isInRightSideOfInternalImportEqualsDeclaration:()=>HG,isInString:()=>sQ,isInTemplateString:()=>_Q,isInTopLevelContext:()=>um,isInTypeQuery:()=>Cv,isIncrementalCompilation:()=>$S,isIndexSignatureDeclaration:()=>ND,isIndexedAccessTypeNode:()=>$D,isInferTypeNode:()=>qD,isInfinityOrNaNString:()=>QT,isInitializedProperty:()=>sz,isInitializedVariable:()=>yx,isInsideJsxElement:()=>dQ,isInsideJsxElementOrAttribute:()=>cQ,isInsideNodeModules:()=>YZ,isInsideTemplateLiteral:()=>NQ,isInstanceOfExpression:()=>Ob,isInstantiatedModule:()=>XB,isInterfaceDeclaration:()=>iE,isInternalDeclaration:()=>Zu,isInternalModuleImportEqualsDeclaration:()=>Mm,isInternalName:()=>aA,isIntersectionTypeNode:()=>JD,isIntrinsicJsxName:()=>$y,isIterationStatement:()=>ou,isJSDoc:()=>pF,isJSDocAllType:()=>oF,isJSDocAugmentsTag:()=>gF,isJSDocAuthorTag:()=>hF,isJSDocCallbackTag:()=>vF,isJSDocClassTag:()=>yF,isJSDocCommentContainingNode:()=>Lu,isJSDocConstructSignature:()=>Lg,isJSDocDeprecatedTag:()=>wF,isJSDocEnumTag:()=>DF,isJSDocFunctionType:()=>_F,isJSDocImplementsTag:()=>MF,isJSDocImportTag:()=>JF,isJSDocIndexSignature:()=>Wm,isJSDocLikeText:()=>wI,isJSDocLink:()=>nF,isJSDocLinkCode:()=>rF,isJSDocLinkLike:()=>Gu,isJSDocLinkPlain:()=>iF,isJSDocMemberName:()=>tF,isJSDocNameReference:()=>eF,isJSDocNamepathType:()=>dF,isJSDocNamespaceBody:()=>gu,isJSDocNode:()=>ju,isJSDocNonNullableType:()=>cF,isJSDocNullableType:()=>sF,isJSDocOptionalParameter:()=>uC,isJSDocOptionalType:()=>lF,isJSDocOverloadTag:()=>CF,isJSDocOverrideTag:()=>TF,isJSDocParameterTag:()=>PF,isJSDocPrivateTag:()=>xF,isJSDocPropertyLikeTag:()=>Rl,isJSDocPropertyTag:()=>LF,isJSDocProtectedTag:()=>SF,isJSDocPublicTag:()=>bF,isJSDocReadonlyTag:()=>kF,isJSDocReturnTag:()=>EF,isJSDocSatisfiesExpression:()=>fC,isJSDocSatisfiesTag:()=>RF,isJSDocSeeTag:()=>NF,isJSDocSignature:()=>mF,isJSDocTag:()=>Mu,isJSDocTemplateTag:()=>IF,isJSDocThisTag:()=>FF,isJSDocThrowsTag:()=>BF,isJSDocTypeAlias:()=>Mg,isJSDocTypeAssertion:()=>fA,isJSDocTypeExpression:()=>ZE,isJSDocTypeLiteral:()=>fF,isJSDocTypeTag:()=>AF,isJSDocTypedefTag:()=>OF,isJSDocUnknownTag:()=>jF,isJSDocUnknownType:()=>aF,isJSDocVariadicType:()=>uF,isJSXTagName:()=>Pm,isJsonEqual:()=>DT,isJsonSourceFile:()=>sf,isJsxAttribute:()=>RE,isJsxAttributeLike:()=>Fu,isJsxAttributeName:()=>vC,isJsxAttributes:()=>BE,isJsxChild:()=>Eu,isJsxClosingElement:()=>OE,isJsxClosingFragment:()=>ME,isJsxElement:()=>FE,isJsxExpression:()=>zE,isJsxFragment:()=>jE,isJsxNamespacedName:()=>qE,isJsxOpeningElement:()=>IE,isJsxOpeningFragment:()=>LE,isJsxOpeningLikeElement:()=>Iu,isJsxOpeningLikeElementTagName:()=>ZG,isJsxSelfClosingElement:()=>AE,isJsxSpreadAttribute:()=>JE,isJsxTagNameExpression:()=>Pu,isJsxText:()=>jN,isJumpStatementTarget:()=>cX,isKeyword:()=>jh,isKeywordOrPunctuation:()=>Mh,isKnownSymbol:()=>iy,isLabelName:()=>_X,isLabelOfLabeledStatement:()=>lX,isLabeledStatement:()=>XP,isLateVisibilityPaintedStatement:()=>Ap,isLeftHandSideExpression:()=>X_,isLeftHandSideOfAssignment:()=>Sb,isLet:()=>ff,isLineBreak:()=>os,isLiteralComputedPropertyDeclarationName:()=>bh,isLiteralExpression:()=>Wl,isLiteralExpressionOfObject:()=>$l,isLiteralImportTypeNode:()=>yf,isLiteralKind:()=>Vl,isLiteralLikeAccess:()=>fg,isLiteralLikeElementAccess:()=>mg,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>hX,isLiteralTypeLikeExpression:()=>WA,isLiteralTypeLiteral:()=>tu,isLiteralTypeNode:()=>KD,isLocalName:()=>sA,isLogicalOperator:()=>pb,isLogicalOrCoalescingAssignmentExpression:()=>mb,isLogicalOrCoalescingAssignmentOperator:()=>fb,isLogicalOrCoalescingBinaryExpression:()=>hb,isLogicalOrCoalescingBinaryOperator:()=>gb,isMappedTypeNode:()=>HD,isMemberName:()=>kl,isMetaProperty:()=>PP,isMethodDeclaration:()=>bD,isMethodOrAccessor:()=>w_,isMethodSignature:()=>vD,isMinusToken:()=>VN,isMissingDeclaration:()=>NE,isMissingPackageJsonInfo:()=>bM,isModifier:()=>__,isModifierKind:()=>s_,isModifierLike:()=>D_,isModuleAugmentationExternal:()=>xp,isModuleBlock:()=>cE,isModuleBody:()=>fu,isModuleDeclaration:()=>sE,isModuleExportsAccessExpression:()=>ug,isModuleIdentifier:()=>_g,isModuleName:()=>VA,isModuleOrEnumDeclaration:()=>yu,isModuleReference:()=>Du,isModuleSpecifierLike:()=>uY,isModuleWithStringLiteralName:()=>fp,isNameOfFunctionDeclaration:()=>gX,isNameOfModuleDeclaration:()=>mX,isNamedClassElement:()=>N_,isNamedDeclaration:()=>Ic,isNamedEvaluation:()=>_y,isNamedEvaluationSource:()=>ly,isNamedExportBindings:()=>Ml,isNamedExports:()=>CE,isNamedImportBindings:()=>hu,isNamedImports:()=>xE,isNamedImportsOrExports:()=>Vx,isNamedTupleMember:()=>LD,isNamespaceBody:()=>mu,isNamespaceExport:()=>bE,isNamespaceExportDeclaration:()=>_E,isNamespaceImport:()=>vE,isNamespaceReexportDeclaration:()=>Im,isNewExpression:()=>aP,isNewExpressionTarget:()=>GG,isNoSubstitutionTemplateLiteral:()=>MN,isNode:()=>Bl,isNodeArray:()=>Ul,isNodeArrayMultiLine:()=>ux,isNodeDescendantOf:()=>hh,isNodeKind:()=>Jl,isNodeLikeSystem:()=>kn,isNodeModulesDirectory:()=>ka,isNodeWithPossibleHoistedDeclaration:()=>ch,isNonContextualKeyword:()=>Bh,isNonExportDefaultModifier:()=>aI,isNonGlobalAmbientModule:()=>mp,isNonGlobalDeclaration:()=>g0,isNonNullAccess:()=>pC,isNonNullChain:()=>jl,isNonNullExpression:()=>DP,isNonStaticMethodOrAccessorWithPrivateName:()=>cz,isNotEmittedOrPartiallyEmittedNode:()=>iu,isNotEmittedStatement:()=>DE,isNullishCoalesce:()=>Al,isNumber:()=>ut,isNumericLiteral:()=>AN,isNumericLiteralName:()=>tC,isObjectBindingElementWithoutPropertyName:()=>dY,isObjectBindingOrAssignmentElement:()=>z_,isObjectBindingOrAssignmentPattern:()=>J_,isObjectBindingPattern:()=>YD,isObjectLiteralElement:()=>Vu,isObjectLiteralElementLike:()=>F_,isObjectLiteralExpression:()=>nP,isObjectLiteralMethod:()=>Kf,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>Gf,isObjectTypeDeclaration:()=>Jx,isOctalDigit:()=>_s,isOmittedExpression:()=>TP,isOptionalChain:()=>Dl,isOptionalChainRoot:()=>Pl,isOptionalDeclaration:()=>dC,isOptionalJSDocPropertyLikeTag:()=>cC,isOptionalTypeNode:()=>MD,isOuterExpression:()=>gA,isOutermostOptionalChain:()=>Fl,isOverrideModifier:()=>sD,isPackageJsonInfo:()=>vM,isPackedArrayLiteral:()=>$T,isParameter:()=>mD,isParameterPropertyDeclaration:()=>lc,isParameterPropertyModifier:()=>c_,isParenthesizedExpression:()=>lP,isParenthesizedTypeNode:()=>UD,isParseTreeNode:()=>Sc,isPartOfParameterDeclaration:()=>dy,isPartOfTypeNode:()=>Af,isPartOfTypeQuery:()=>Am,isPartiallyEmittedExpression:()=>FP,isPatternMatch:()=>dn,isPinnedComment:()=>Kd,isPlainJsFile:()=>Ed,isPlusToken:()=>UN,isPossiblyTypeArgumentPosition:()=>mQ,isPostfixUnaryExpression:()=>hP,isPrefixUnaryExpression:()=>gP,isPrimitiveLiteralValue:()=>jC,isPrivateIdentifier:()=>YN,isPrivateIdentifierClassElementDeclaration:()=>o_,isPrivateIdentifierPropertyAccessExpression:()=>a_,isPrivateIdentifierSymbol:()=>oy,isProgramBundleEmitBuildInfo:()=>hW,isProgramUptoDate:()=>IV,isPrologueDirective:()=>vf,isPropertyAccessChain:()=>Cl,isPropertyAccessEntityNameExpression:()=>Db,isPropertyAccessExpression:()=>rP,isPropertyAccessOrQualifiedName:()=>W_,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>V_,isPropertyAssignment:()=>HE,isPropertyDeclaration:()=>yD,isPropertyName:()=>d_,isPropertyNameLiteral:()=>Zh,isPropertySignature:()=>hD,isProtoSetter:()=>sy,isPrototypeAccess:()=>Eb,isPrototypePropertyAssignment:()=>Tg,isPunctuation:()=>Lh,isPushOrUnshiftIdentifier:()=>uy,isQualifiedName:()=>dD,isQuestionDotToken:()=>GN,isQuestionOrExclamationToken:()=>JA,isQuestionOrPlusOrMinusToken:()=>UA,isQuestionToken:()=>HN,isRawSourceMap:()=>TJ,isReadonlyKeyword:()=>iD,isReadonlyKeywordOrPlusOrMinusToken:()=>qA,isRecognizedTripleSlashComment:()=>Hd,isReferenceFileLocation:()=>FV,isReferencedFile:()=>EV,isRegularExpressionLiteral:()=>LN,isRequireCall:()=>$m,isRequireVariableStatement:()=>Qm,isRestParameter:()=>Qu,isRestTypeNode:()=>RD,isReturnStatement:()=>HP,isReturnStatementWithFixablePromiseHandler:()=>K1,isRightSideOfAccessExpression:()=>Ab,isRightSideOfInstanceofExpression:()=>jb,isRightSideOfPropertyAccess:()=>pX,isRightSideOfQualifiedName:()=>dX,isRightSideOfQualifiedNameOrPropertyAccess:()=>Fb,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Ib,isRootedDiskPath:()=>Ao,isSameEntityName:()=>sg,isSatisfiesExpression:()=>NP,isScopeMarker:()=>au,isSemicolonClassElement:()=>OP,isSetAccessor:()=>Ru,isSetAccessorDeclaration:()=>TD,isShebangTrivia:()=>hs,isShiftOperatorOrHigher:()=>$A,isShorthandAmbientModuleSymbol:()=>hp,isShorthandPropertyAssignment:()=>KE,isSignedNumericLiteral:()=>Gh,isSimpleCopiableExpression:()=>QJ,isSimpleInlineableExpression:()=>YJ,isSimpleParameter:()=>yz,isSimpleParameterList:()=>vz,isSingleOrDoubleQuote:()=>Ym,isSourceFile:()=>QE,isSourceFileFromLibrary:()=>k0,isSourceFileJS:()=>Bm,isSourceFileNotJS:()=>Jm,isSourceFileNotJson:()=>Um,isSourceMapping:()=>DJ,isSpecialPropertyDeclaration:()=>Cg,isSpreadAssignment:()=>GE,isSpreadElement:()=>SP,isStatement:()=>wu,isStatementButNotDeclaration:()=>Cu,isStatementOrBlock:()=>Nu,isStatementWithLocals:()=>Fd,isStatic:()=>$v,isStaticModifier:()=>oD,isString:()=>_t,isStringAKeyword:()=>qh,isStringANonContextualKeyword:()=>zh,isStringAndEmptyAnonymousObjectIntersection:()=>wQ,isStringDoubleQuoted:()=>Zm,isStringLiteral:()=>ON,isStringLiteralLike:()=>Ku,isStringLiteralOrJsxExpression:()=>Au,isStringLiteralOrTemplate:()=>DZ,isStringOrNumericLiteralLike:()=>Kh,isStringOrRegularExpressionOrTemplateLiteral:()=>TQ,isStringTextContainingNode:()=>e_,isSuperCall:()=>mf,isSuperKeyword:()=>lD,isSuperOrSuperProperty:()=>mm,isSuperProperty:()=>gm,isSupportedSourceFileName:()=>nT,isSwitchStatement:()=>GP,isSyntaxList:()=>zF,isSyntheticExpression:()=>EP,isSyntheticReference:()=>PE,isTagName:()=>uX,isTaggedTemplateExpression:()=>sP,isTaggedTemplateTag:()=>QG,isTemplateExpression:()=>bP,isTemplateHead:()=>RN,isTemplateLiteral:()=>G_,isTemplateLiteralKind:()=>Hl,isTemplateLiteralToken:()=>Kl,isTemplateLiteralTypeNode:()=>QD,isTemplateLiteralTypeSpan:()=>XD,isTemplateMiddle:()=>BN,isTemplateMiddleOrTemplateTail:()=>Gl,isTemplateSpan:()=>IP,isTemplateTail:()=>JN,isTextWhiteSpaceLike:()=>kY,isThis:()=>xX,isThisContainerOrFunctionBlock:()=>_m,isThisIdentifier:()=>Tv,isThisInTypeQuery:()=>wv,isThisInitializedDeclaration:()=>ym,isThisInitializedObjectBindingExpression:()=>vm,isThisProperty:()=>hm,isThisTypeNode:()=>VD,isThisTypeParameter:()=>rC,isThisTypePredicate:()=>Qf,isThrowStatement:()=>QP,isToken:()=>ql,isTokenKind:()=>zl,isTraceEnabled:()=>GL,isTransientSymbol:()=>sd,isTrivia:()=>Vh,isTryStatement:()=>YP,isTupleTypeNode:()=>jD,isTypeAlias:()=>Rg,isTypeAliasDeclaration:()=>oE,isTypeAssertionExpression:()=>cP,isTypeDeclaration:()=>aC,isTypeElement:()=>P_,isTypeKeyword:()=>UQ,isTypeKeywordToken:()=>VQ,isTypeKeywordTokenOrIdentifier:()=>WQ,isTypeLiteralNode:()=>ID,isTypeNode:()=>A_,isTypeNodeKind:()=>zx,isTypeOfExpression:()=>pP,isTypeOnlyExportDeclaration:()=>Yl,isTypeOnlyImportDeclaration:()=>Ql,isTypeOnlyImportOrExportDeclaration:()=>Zl,isTypeOperatorNode:()=>WD,isTypeParameterDeclaration:()=>fD,isTypePredicateNode:()=>DD,isTypeQueryNode:()=>AD,isTypeReferenceNode:()=>PD,isTypeReferenceType:()=>Wu,isTypeUsableAsPropertyName:()=>kC,isUMDExportSymbol:()=>Lx,isUnaryExpression:()=>Y_,isUnaryExpressionWithWrite:()=>eu,isUnicodeIdentifierStart:()=>za,isUnionTypeNode:()=>BD,isUrl:()=>Fo,isValidBigIntString:()=>IT,isValidESSymbolDeclaration:()=>Vf,isValidTypeOnlyAliasUseSite:()=>OT,isValueSignatureDeclaration:()=>lh,isVarAwaitUsing:()=>_f,isVarConst:()=>df,isVarConstLike:()=>pf,isVarUsing:()=>uf,isVariableDeclaration:()=>eE,isVariableDeclarationInVariableStatement:()=>zf,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>Km,isVariableDeclarationInitializedToRequire:()=>Hm,isVariableDeclarationList:()=>tE,isVariableLike:()=>Bf,isVariableLikeOrAccessor:()=>Jf,isVariableStatement:()=>LP,isVoidExpression:()=>fP,isWatchSet:()=>vx,isWhileStatement:()=>zP,isWhiteSpaceLike:()=>rs,isWhiteSpaceSingleLine:()=>is,isWithStatement:()=>KP,isWriteAccess:()=>wx,isWriteOnlyAccess:()=>Cx,isYieldExpression:()=>xP,jsxModeNeedsExplicitImport:()=>S0,keywordPart:()=>AY,last:()=>Ee,lastOrUndefined:()=>Pe,length:()=>g,libMap:()=>CO,libs:()=>TO,lineBreakPart:()=>HY,linkNamePart:()=>qY,linkPart:()=>UY,linkTextPart:()=>zY,listFiles:()=>_$,loadModuleFromGlobalCache:()=>MR,loadWithModeAwareCache:()=>SV,makeIdentifierFromModuleName:()=>_p,makeImport:()=>rY,makeStringLiteral:()=>iY,mangleScopedPackageName:()=>ER,map:()=>M,mapAllOrFail:()=>W,mapDefined:()=>$,mapDefinedEntries:()=>K,mapDefinedIterator:()=>H,mapEntries:()=>Z,mapIterator:()=>R,mapOneOrMany:()=>i0,mapToDisplayParts:()=>KY,matchFiles:()=>Ik,matchPatternOrExact:()=>bT,matchedText:()=>sn,matchesExclude:()=>LL,maybeBind:()=>nt,maybeSetLocalizedDiagnosticMessages:()=>cS,memoize:()=>kt,memoizeCached:()=>wt,memoizeOne:()=>Tt,memoizeWeak:()=>Ct,metadataHelper:()=>eN,min:()=>jt,minAndMax:()=>kT,missingFileModifiedTime:()=>to,modifierToFlag:()=>ub,modifiersToFlags:()=>_b,moduleOptionDeclaration:()=>PO,moduleResolutionIsEqualTo:()=>xd,moduleResolutionNameAndModeGetter:()=>hV,moduleResolutionOptionDeclarations:()=>jO,moduleResolutionSupportsPackageJsonExportsAndImports:()=>ek,moduleResolutionUsesNodeModules:()=>nY,moduleSpecifierToValidIdentifier:()=>d0,moduleSpecifiers:()=>tB,moduleSymbolToValidIdentifier:()=>u0,moveEmitHelpers:()=>Mw,moveRangeEnd:()=>Yb,moveRangePastDecorators:()=>ex,moveRangePastModifiers:()=>tx,moveRangePos:()=>Zb,moveSyntheticComments:()=>Ew,mutateMap:()=>Fx,mutateMapSkippingNewValues:()=>Ex,needsParentheses:()=>TZ,needsScopeMarker:()=>cu,newCaseClauseTracker:()=>T0,newPrivateEnvironment:()=>fz,noEmitNotification:()=>zq,noEmitSubstitution:()=>Jq,noTransformers:()=>Iq,noTruncationMaximumTruncationLength:()=>rd,nodeCanBeDecorated:()=>Sm,nodeHasName:()=>Fc,nodeIsDecorated:()=>km,nodeIsMissing:()=>Ld,nodeIsPresent:()=>Md,nodeIsSynthesized:()=>my,nodeModuleNameResolver:()=>qM,nodeModulesPathPart:()=>KM,nodeNextJsonConfigResolver:()=>UM,nodeOrChildIsDecorated:()=>Tm,nodeOverlapsWithStartEnd:()=>FX,nodePosToString:()=>Id,nodeSeenTracker:()=>$Q,nodeStartsNewLexicalEnvironment:()=>fy,nodeToDisplayParts:()=>YY,noop:()=>ft,noopFileWatcher:()=>v$,normalizePath:()=>na,normalizeSlashes:()=>Xo,not:()=>mn,notImplemented:()=>St,notImplementedResolver:()=>gU,nullNodeConverters:()=>UC,nullParenthesizerRules:()=>JC,nullTransformationContext:()=>Uq,objectAllocator:()=>nS,operatorPart:()=>OY,optionDeclarations:()=>FO,optionMapToObject:()=>Jj,optionsAffectingProgramStructure:()=>MO,optionsForBuild:()=>UO,optionsForWatch:()=>wO,optionsHaveChanges:()=>pd,optionsHaveModuleResolutionChanges:()=>ud,or:()=>fn,orderedRemoveItem:()=>en,orderedRemoveItemAt:()=>tn,packageIdToPackageName:()=>kd,packageIdToString:()=>Td,paramHelper:()=>tN,parameterIsThisKeyword:()=>kv,parameterNamePart:()=>jY,parseBaseNodeFactory:()=>SI,parseBigInt:()=>FT,parseBuildCommand:()=>uj,parseCommandLine:()=>aj,parseCommandLineWorker:()=>nj,parseConfigFileTextToJson:()=>mj,parseConfigFileWithSystem:()=>r$,parseConfigHostFromCompilerHostLike:()=>qV,parseCustomTypeOption:()=>YO,parseIsolatedEntityName:()=>ZI,parseIsolatedJSDocComment:()=>rO,parseJSDocTypeExpressionForTests:()=>iO,parseJsonConfigFileContent:()=>Qj,parseJsonSourceFileConfigFileContent:()=>Yj,parseJsonText:()=>eO,parseListTypeOption:()=>ZO,parseNodeFactory:()=>kI,parseNodeModuleFromPath:()=>XM,parsePackageName:()=>mR,parsePseudoBigInt:()=>PT,parseValidBigInt:()=>AT,pasteEdits:()=>Efe,patchWriteFileEnsuringDirectory:()=>ko,pathContainsNodeModules:()=>GM,pathIsAbsolute:()=>Oo,pathIsBareSpecifier:()=>Lo,pathIsRelative:()=>jo,patternText:()=>an,perfLogger:()=>ir,performIncrementalCompilation:()=>A$,performance:()=>or,plainJSErrors:()=>MV,positionBelongsToNode:()=>IX,positionIsASICandidate:()=>RZ,positionIsSynthesized:()=>dT,positionsAreOnSameLine:()=>dx,preProcessFile:()=>R1,probablyUsesSemicolons:()=>BZ,processCommentPragmas:()=>uO,processPragmasIntoFields:()=>dO,processTaggedTemplateExpression:()=>Vz,programContainsEsModules:()=>YQ,programContainsModules:()=>QQ,projectReferenceIsEqualTo:()=>bd,propKeyHelper:()=>mN,propertyNamePart:()=>LY,pseudoBigIntToString:()=>ET,punctuationPart:()=>IY,pushIfUnique:()=>he,quote:()=>wZ,quotePreferenceFromString:()=>aY,rangeContainsPosition:()=>wX,rangeContainsPositionExclusive:()=>NX,rangeContainsRange:()=>TX,rangeContainsRangeExclusive:()=>CX,rangeContainsStartEnd:()=>PX,rangeEndIsOnSameLineAsRangeStart:()=>cx,rangeEndPositionsAreOnSameLine:()=>ax,rangeEquals:()=>ke,rangeIsOnSingleLine:()=>ix,rangeOfNode:()=>TT,rangeOfTypeParameters:()=>CT,rangeOverlapsWithStartEnd:()=>EX,rangeStartIsOnSameLineAsRangeEnd:()=>sx,rangeStartPositionsAreOnSameLine:()=>ox,readBuilderProgram:()=>I$,readConfigFile:()=>fj,readHelper:()=>pN,readJson:()=>Wb,readJsonConfigFile:()=>gj,readJsonOrUndefined:()=>Vb,reduceEachLeadingCommentRange:()=>Ss,reduceEachTrailingCommentRange:()=>ks,reduceLeft:()=>Me,reduceLeftIterator:()=>x,reducePathComponents:()=>Qo,refactor:()=>y6,regExpEscape:()=>gk,regularExpressionFlagToCharacter:()=>Ha,relativeComplement:()=>de,removeAllComments:()=>uw,removeEmitHelper:()=>jw,removeExtension:()=>cT,removeFileExtension:()=>aT,removeIgnoredPath:()=>OW,removeMinAndVersionNumbers:()=>Zt,removeOptionality:()=>fQ,removePrefix:()=>_n,removeSuffix:()=>Qt,removeTrailingDirectorySeparator:()=>oa,repeatString:()=>KQ,replaceElement:()=>Oe,replaceFirstStar:()=>DC,resolutionExtensionIsTSOrJson:()=>fT,resolveConfigFileProjectName:()=>B$,resolveJSModule:()=>RM,resolveLibrary:()=>OM,resolveModuleName:()=>LM,resolveModuleNameFromCache:()=>jM,resolvePackageNameToPackageJson:()=>hM,resolvePath:()=>Zo,resolveProjectReferencePath:()=>UV,resolveTripleslashReference:()=>JU,resolveTypeReferenceDirective:()=>fM,resolvingEmptyArray:()=>ed,restHelper:()=>lN,returnFalse:()=>mt,returnNoopFileWatcher:()=>b$,returnTrue:()=>gt,returnUndefined:()=>ht,returnsPromise:()=>H1,runInitializersHelper:()=>rN,sameFlatMap:()=>V,sameMap:()=>B,sameMapping:()=>NJ,scanShebangTrivia:()=>ys,scanTokenAtPosition:()=>nf,scanner:()=>UG,screenStartingMessageCodes:()=>e$,semanticDiagnosticsOptionDeclarations:()=>AO,serializeCompilerOptions:()=>Vj,server:()=>qfe,servicesVersion:()=>W7,setCommentRange:()=>kw,setConfigFileInOptions:()=>Zj,setConstantValue:()=>Aw,setEachParent:()=>UT,setEmitFlags:()=>dw,setFunctionNameHelper:()=>gN,setGetSourceFileAsHashVersioned:()=>w$,setIdentifierAutoGenerate:()=>Ww,setIdentifierGeneratedImportReference:()=>Hw,setIdentifierTypeArguments:()=>Uw,setInternalEmitFlags:()=>fw,setLocalizedDiagnosticMessages:()=>sS,setModuleDefaultHelper:()=>bN,setNodeChildren:()=>WF,setNodeFlags:()=>zT,setObjectAllocator:()=>oS,setOriginalNode:()=>cw,setParent:()=>qT,setParentRecursive:()=>VT,setPrivateIdentifier:()=>gz,setSnippetElement:()=>Bw,setSourceMapRange:()=>hw,setStackTraceLimit:()=>Yi,setStartsOnNewLine:()=>xw,setSyntheticLeadingComments:()=>Cw,setSyntheticTrailingComments:()=>Dw,setSys:()=>Co,setSysLog:()=>ho,setTextRange:()=>vI,setTextRangeEnd:()=>RT,setTextRangePos:()=>MT,setTextRangePosEnd:()=>BT,setTextRangePosWidth:()=>JT,setTokenSourceMapRange:()=>vw,setTypeNode:()=>zw,setUILocale:()=>Vt,setValueDeclaration:()=>wg,shouldAllowImportingTsExtension:()=>LR,shouldPreserveConstEnums:()=>WS,shouldUseUriStyleNodeCoreModules:()=>y0,showModuleSpecifier:()=>Mx,signatureHasLiteralTypes:()=>nJ,signatureHasRestParameter:()=>tJ,signatureToDisplayParts:()=>QY,single:()=>Ae,singleElementArray:()=>hn,singleIterator:()=>Q,singleOrMany:()=>Ie,singleOrUndefined:()=>Fe,skipAlias:()=>kx,skipAssertions:()=>vA,skipConstraint:()=>GQ,skipOuterExpressions:()=>hA,skipParentheses:()=>mh,skipPartiallyEmittedExpressions:()=>Ol,skipTrivia:()=>ds,skipTypeChecking:()=>wT,skipTypeParentheses:()=>fh,skipWhile:()=>Sn,sliceAfter:()=>xT,some:()=>ee,sort:()=>be,sortAndDeduplicate:()=>ce,sortAndDeduplicateDiagnostics:()=>zs,sourceFileAffectingCompilerOptions:()=>LO,sourceFileMayBeEmitted:()=>uv,sourceMapCommentRegExp:()=>vJ,sourceMapCommentRegExpDontCareLineStart:()=>yJ,spacePart:()=>FY,spanMap:()=>Y,spreadArrayHelper:()=>fN,stableSort:()=>Se,startEndContainsRange:()=>DX,startEndOverlapsWithStartEnd:()=>AX,startOnNewLine:()=>bA,startTracing:()=>Nr,startsWith:()=>ln,startsWithDirectory:()=>ga,startsWithUnderscore:()=>f0,startsWithUseStrict:()=>uA,stringContainsAt:()=>p0,stringToToken:()=>Wa,stripQuotes:()=>Wy,supportedDeclarationExtensions:()=>$k,supportedJSExtensions:()=>qk,supportedJSExtensionsFlat:()=>Uk,supportedLocaleDirectories:()=>yc,supportedTSExtensions:()=>Rk,supportedTSExtensionsFlat:()=>Bk,supportedTSImplementationExtensions:()=>Hk,suppressLeadingAndTrailingTrivia:()=>uZ,suppressLeadingTrivia:()=>dZ,suppressTrailingTrivia:()=>pZ,symbolEscapedNameNoDefault:()=>_Y,symbolName:()=>Dc,symbolNameNoDefault:()=>lY,symbolPart:()=>PY,symbolToDisplayParts:()=>XY,syntaxMayBeASICandidate:()=>MZ,syntaxRequiresTrailingSemicolonOrASI:()=>LZ,sys:()=>To,sysLog:()=>go,tagNamesAreEquivalent:()=>vO,takeWhile:()=>xn,targetOptionDeclaration:()=>DO,templateObjectHelper:()=>dN,testFormatSettings:()=>AG,textChangeRangeIsUnchanged:()=>ic,textChangeRangeNewSpan:()=>rc,textChanges:()=>tde,textOrKeywordPart:()=>MY,textPart:()=>RY,textRangeContainsPositionInclusive:()=>$s,textSpanContainsPosition:()=>Ws,textSpanContainsTextSpan:()=>Hs,textSpanEnd:()=>Us,textSpanIntersection:()=>ec,textSpanIntersectsWith:()=>Qs,textSpanIntersectsWithPosition:()=>Zs,textSpanIntersectsWithTextSpan:()=>Xs,textSpanIsEmpty:()=>Vs,textSpanOverlap:()=>Gs,textSpanOverlapsWith:()=>Ks,textSpansEqual:()=>vY,textToKeywordObj:()=>Da,timestamp:()=>tr,toArray:()=>lt,toBuilderFileEmit:()=>wW,toBuilderStateFileInfoForMultiEmit:()=>CW,toEditorSettings:()=>c5,toFileNameLowerCase:()=>xt,toLowerCase:()=>vt,toPath:()=>ia,toProgramEmitPending:()=>NW,tokenIsIdentifierOrKeyword:()=>wa,tokenIsIdentifierOrKeywordOrGreaterThan:()=>Na,tokenToString:()=>Va,trace:()=>KL,tracing:()=>cr,tracingEnabled:()=>lr,transform:()=>N5,transformClassFields:()=>Gz,transformDeclarations:()=>Pq,transformECMAScriptModule:()=>xq,transformES2015:()=>gq,transformES2016:()=>fq,transformES2017:()=>eq,transformES2018:()=>nq,transformES2019:()=>rq,transformES2020:()=>iq,transformES2021:()=>oq,transformESDecorators:()=>Zz,transformESNext:()=>aq,transformGenerators:()=>hq,transformJsx:()=>dq,transformLegacyDecorators:()=>Yz,transformModule:()=>yq,transformNamedEvaluation:()=>qz,transformNodeModule:()=>Sq,transformNodes:()=>qq,transformSystemModule:()=>bq,transformTypeScript:()=>Kz,transpile:()=>l2,transpileDeclaration:()=>r2,transpileModule:()=>n2,transpileOptionValueCompilerOptions:()=>RO,tryAddToSet:()=>X,tryAndIgnoreErrors:()=>VZ,tryCast:()=>dt,tryDirectoryExists:()=>UZ,tryExtractTSExtension:()=>Bb,tryFileExists:()=>qZ,tryGetClassExtendingExpressionWithTypeArguments:()=>vb,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>bb,tryGetDirectories:()=>JZ,tryGetExtensionFromPath:()=>hT,tryGetImportFromModuleSpecifier:()=>Eg,tryGetJSDocSatisfiesTypeNode:()=>gC,tryGetModuleNameFromFile:()=>NA,tryGetModuleSpecifierFromDeclaration:()=>Dg,tryGetNativePerformanceHooks:()=>Zn,tryGetPropertyAccessOrIdentifierToString:()=>Pb,tryGetPropertyNameOfBindingOrAssignmentElement:()=>AA,tryGetSourceMappingURL:()=>SJ,tryGetTextOfPropertyName:()=>zp,tryIOAndConsumeErrors:()=>WZ,tryParseJson:()=>$b,tryParsePattern:()=>_T,tryParsePatterns:()=>uT,tryParseRawSourceMap:()=>CJ,tryReadDirectory:()=>zZ,tryReadFile:()=>hj,tryRemoveDirectoryPrefix:()=>fk,tryRemoveExtension:()=>sT,tryRemovePrefix:()=>un,tryRemoveSuffix:()=>Yt,typeAcquisitionDeclarations:()=>WO,typeAliasNamePart:()=>BY,typeDirectiveIsEqualTo:()=>Cd,typeKeywords:()=>qQ,typeParameterNamePart:()=>JY,typeToDisplayParts:()=>GY,unchangedPollThresholds:()=>ao,unchangedTextChangeRange:()=>ac,unescapeLeadingUnderscores:()=>Cc,unmangleScopedPackageName:()=>AR,unorderedRemoveItem:()=>rn,unorderedRemoveItemAt:()=>nn,unreachableCodeIsError:()=>YS,unsetNodeChildren:()=>$F,unusedLabelIsError:()=>ZS,unwrapInnermostStatementOfLabel:()=>$f,unwrapParenthesizedExpression:()=>LC,updateErrorForNoInputFiles:()=>fL,updateLanguageServiceSourceFile:()=>g5,updateMissingFilePathsWatch:()=>EU,updateResolutionField:()=>iM,updateSharedExtendedConfigFileWatcher:()=>NU,updateSourceFile:()=>nO,updateWatchingWildcardDirectories:()=>FU,usesExtensionsOnImports:()=>eT,usingSingleLineStringWriter:()=>yd,utf16EncodeAsString:()=>js,validateLocaleAndSetLanguage:()=>vc,valuesHelper:()=>hN,version:()=>u,versionMajorMinor:()=>c,visitArray:()=>aJ,visitCommaListElements:()=>pJ,visitEachChild:()=>fJ,visitFunctionBody:()=>uJ,visitIterationBody:()=>dJ,visitLexicalEnvironment:()=>cJ,visitNode:()=>iJ,visitNodes:()=>oJ,visitParameterList:()=>lJ,walkUpBindingElementsAndPatterns:()=>dc,walkUpLexicalEnvironments:()=>pz,walkUpOuterExpressions:()=>yA,walkUpParenthesizedExpressions:()=>dh,walkUpParenthesizedTypes:()=>uh,walkUpParenthesizedTypesAndGetParentAndChild:()=>ph,whitespaceOrMapCommentRegExp:()=>bJ,writeCommentRange:()=>Bv,writeFile:()=>fv,writeFileEnsuringDirectories:()=>gv,zipWith:()=>S});var jfe,Lfe=!0;function Mfe(e,t,n,r,i){let o=t?"DeprecationError: ":"DeprecationWarning: ";return o+=`'${e}' `,o+=r?`has been deprecated since v${r}`:"is deprecated",o+=t?" and can no longer be used.":n?` and will no longer be usable after v${n}.`:".",o+=i?` ${aS(i,[e])}`:"",o}function Rfe(e,t={}){const n="string"==typeof t.typeScriptVersion?new In(t.typeScriptVersion):t.typeScriptVersion??jfe??(jfe=new In(u)),r="string"==typeof t.errorAfter?new In(t.errorAfter):t.errorAfter,i="string"==typeof t.warnAfter?new In(t.warnAfter):t.warnAfter,o="string"==typeof t.since?new In(t.since):t.since??i,a=t.error||r&&n.compareTo(r)>=0,s=!i||n.compareTo(i)>=0;return a?function(e,t,n,r){const i=Mfe(e,!0,t,n,r);return()=>{throw new TypeError(i)}}(e,r,o,t.message):s?function(e,t,n,r){let i=!1;return()=>{Lfe&&!i&&(Tn.log.warn(Mfe(e,!1,t,n,r)),i=!0)}}(e,r,o,t.message):ft}function Bfe(e,t){return function(e,t){return function(){return e(),t.apply(this,arguments)}}(Rfe((null==t?void 0:t.name)??Tn.getFunctionName(e),t),e)}function Jfe(e,t,n,r){if(Object.defineProperty(o,"name",{...Object.getOwnPropertyDescriptor(o,"name"),value:e}),r)for(const n of Object.keys(r)){const i=+n;!isNaN(i)&&Be(t,`${i}`)&&(t[i]=Bfe(t[i],{...r[i],name:e}))}const i=function(e,t){return n=>{for(let r=0;Be(e,`${r}`)&&Be(t,`${r}`);r++){if((0,t[r])(n))return r}}}(t,n);return o;function o(...e){const n=i(e),r=void 0!==n?t[n]:void 0;if("function"==typeof r)return r(...e);throw new TypeError("Invalid arguments")}}function zfe(e){return{overload:t=>({bind:n=>({finish:()=>Jfe(e,t,n),deprecate:r=>({finish:()=>Jfe(e,t,n,r)})})})}}var qfe={};a(qfe,{ActionInvalidate:()=>WK,ActionPackageInstalled:()=>$K,ActionSet:()=>VK,ActionWatchTypingLocations:()=>QK,Arguments:()=>qK,AutoImportProviderProject:()=>qme,AuxiliaryProject:()=>Jme,CharRangeSection:()=>whe,CloseFileWatcherEvent:()=>cge,CommandNames:()=>rhe,ConfigFileDiagEvent:()=>nge,ConfiguredProject:()=>Ume,ConfiguredProjectLoadKind:()=>Dge,CreateDirectoryWatcherEvent:()=>sge,CreateFileWatcherEvent:()=>age,Errors:()=>Xfe,EventBeginInstallTypes:()=>KK,EventEndInstallTypes:()=>GK,EventInitializationFailed:()=>XK,EventTypesRegistry:()=>HK,ExternalProject:()=>Vme,GcTimer:()=>dme,InferredProject:()=>Bme,LargeFileReferencedEvent:()=>tge,LineIndex:()=>Ahe,LineLeaf:()=>Ohe,LineNode:()=>Ihe,LogLevel:()=>Yfe,Msg:()=>eme,OpenFileInfoTelemetryEvent:()=>oge,Project:()=>Rme,ProjectInfoTelemetryEvent:()=>ige,ProjectKind:()=>Ame,ProjectLanguageServiceStateEvent:()=>rge,ProjectLoadingFinishEvent:()=>ege,ProjectLoadingStartEvent:()=>Zme,ProjectService:()=>$ge,ProjectsUpdatedInBackgroundEvent:()=>Yme,ScriptInfo:()=>Dme,ScriptVersionCache:()=>Ehe,Session:()=>vhe,TextStorage:()=>wme,ThrottledOperations:()=>ume,TypingsCache:()=>Fme,TypingsInstallerAdapter:()=>Lhe,allFilesAreJsOrDts:()=>jme,allRootFilesAreJsOrDts:()=>Ome,asNormalizedPath:()=>ime,convertCompilerOptions:()=>gge,convertFormatOptions:()=>mge,convertScriptKindName:()=>bge,convertTypeAcquisition:()=>yge,convertUserPreferences:()=>xge,convertWatchOptions:()=>hge,countEachFileTypes:()=>Ime,createInstallTypingsRequest:()=>tme,createModuleSpecifierCache:()=>Gge,createNormalizedPathMap:()=>ome,createPackageJsonCache:()=>Xge,createSortedArray:()=>_me,emptyArray:()=>Zfe,findArgument:()=>ZK,forEachResolvedProjectReferenceProject:()=>Pge,formatDiagnosticToProtocol:()=>nhe,formatMessage:()=>ihe,getBaseConfigFileName:()=>pme,getLocationInNewDocument:()=>khe,hasArgument:()=>YK,hasNoTypeScriptSource:()=>Lme,indent:()=>nG,isBackgroundProject:()=>Kme,isConfigFile:()=>Hge,isConfiguredProject:()=>$me,isDynamicFileName:()=>Nme,isExternalProject:()=>Hme,isInferredProject:()=>Wme,isInferredProjectName:()=>ame,isProjectDeferredClose:()=>Gme,makeAutoImportProviderProjectName:()=>cme,makeAuxiliaryProjectName:()=>lme,makeInferredProjectName:()=>sme,maxFileSize:()=>Qme,maxProgramSizeForNonTsFiles:()=>Xme,normalizedPathToPath:()=>rme,nowString:()=>eG,nullCancellationToken:()=>Qge,nullTypingsInstaller:()=>Pme,protocol:()=>mme,removeSorted:()=>fme,stringifyIndented:()=>rG,toEvent:()=>ahe,toNormalizedPath:()=>nme,tryConvertScriptKindName:()=>vge,typingsInstaller:()=>Ufe,updateProjectIfDirty:()=>Lge});var Ufe={};a(Ufe,{TypingsInstaller:()=>Kfe,getNpmCommandForInstallation:()=>Hfe,installNpmPackages:()=>$fe,typingsName:()=>Gfe});var Vfe={isEnabled:()=>!1,writeLine:ft};function Wfe(e,t,n,r){try{const r=LM(t,Yo(e,"index.d.ts"),{moduleResolution:2},n);return r.resolvedModule&&r.resolvedModule.resolvedFileName}catch(n){return void(r.isEnabled()&&r.writeLine(`Failed to resolve ${t} in folder '${e}': ${n.message}`))}}function $fe(e,t,n,r){let i=!1;for(let o=n.length;o>0;){const a=Hfe(e,t,n,o);o=a.remaining,i=r(a.command)||i}return i}function Hfe(e,t,n,r){const i=n.length-r;let o,a=r;for(;o=`${e} install --ignore-scripts ${(a===n.length?n:n.slice(i,i+a)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`,!(o.length<8e3);)a-=Math.floor(a/2);return{command:o,remaining:r-a}}var Kfe=class{constructor(e,t,n,r,i,o=Vfe){this.installTypingHost=e,this.globalCachePath=t,this.safeListPath=n,this.typesMapLocation=r,this.throttleLimit=i,this.log=o,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest";this.log.isEnabled()&&this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${r}`),this.processCacheLocation(this.globalCachePath)}handleRequest(e){switch(e.kind){case"discover":this.install(e);break;case"closeProject":this.closeProject(e);break;case"typesRegistry":{const e={};this.typesRegistry.forEach((t,n)=>{e[n]=t});const t={kind:HK,typesRegistry:e};this.sendResponse(t);break}case"installPackage":this.installPackage(e);break;default:Tn.assertNever(e)}}closeProject(e){this.closeWatchers(e.projectName)}closeWatchers(e){this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}'`);this.projectWatchers.get(e)?(this.projectWatchers.delete(e),this.sendResponse({kind:QK,projectName:e,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}' - done.`)):this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${e}'`)}install(e){this.log.isEnabled()&&this.log.writeLine(`Got install request${rG(e)}`),e.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`),this.processCacheLocation(e.cachePath)),void 0===this.safeList&&this.initializeSafeList();const t=zK.discoverTypings(this.installTypingHost,this.log.isEnabled()?e=>this.log.writeLine(e):void 0,e.fileNames,e.projectRootPath,this.safeList,this.packageNameToTypingLocation,e.typeAcquisition,e.unresolvedImports,this.typesRegistry,e.compilerOptions);this.watchFiles(e.projectName,t.filesToWatch),t.newTypingNames.length?this.installTypings(e,e.cachePath||this.globalCachePath,t.cachedTypingPaths,t.newTypingNames):(this.sendResponse(this.createSetTypings(e,t.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}installPackage(e){const{fileName:t,packageName:n,projectName:r,projectRootPath:i,id:o}=e,a=Sa(Vo(t),e=>{if(this.installTypingHost.fileExists(Yo(e,"package.json")))return e})||i;if(a)this.installWorker(-1,[n],a,e=>{const t={kind:$K,projectName:r,id:o,success:e,message:e?`Package ${n} installed.`:`There was an error installing ${n}.`};this.sendResponse(t)});else{const e={kind:$K,projectName:r,id:o,success:!1,message:"Could not determine a project root path."};this.sendResponse(e)}}initializeSafeList(){if(this.typesMapLocation){const e=zK.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(e)return this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),void(this.safeList=e);this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=zK.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(e){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${e}'`),this.knownCachesSet.has(e))return void(this.log.isEnabled()&&this.log.writeLine("Cache location was already processed..."));const t=Yo(e,"package.json"),n=Yo(e,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${t}'...`),this.installTypingHost.fileExists(t)&&this.installTypingHost.fileExists(n)){const r=JSON.parse(this.installTypingHost.readFile(t)),i=JSON.parse(this.installTypingHost.readFile(n));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${t}':${rG(r)}`),this.log.writeLine(`Loaded content of '${n}':${rG(i)}`)),r.devDependencies&&i.dependencies)for(const t in r.devDependencies){if(!Be(i.dependencies,t))continue;const n=Wo(t);if(!n)continue;const r=Wfe(e,n,this.installTypingHost,this.log);if(!r){this.missingTypingsSet.add(n);continue}const o=this.packageNameToTypingLocation.get(n);if(o){if(o.typingLocation===r)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${n} from '${r}' conflicts with existing typing file '${o}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${n}' => '${r}'`);const a=Je(i.dependencies,t),s=a&&a.version;if(!s)continue;const c={typingLocation:r,version:new In(s)};this.packageNameToTypingLocation.set(n,c)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${e}'`),this.knownCachesSet.add(e)}filterTypings(e){return $(e,e=>{const t=ER(e);if(this.missingTypingsSet.has(t))return void(this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' is in missingTypingsSet - skipping...`));const n=zK.validatePackageName(e);if(n!==zK.NameValidationResult.Ok)return this.missingTypingsSet.add(t),void(this.log.isEnabled()&&this.log.writeLine(zK.renderPackageNameValidationFailure(n,e)));if(this.typesRegistry.has(t)){if(!this.packageNameToTypingLocation.get(t)||!zK.isTypingUpToDate(this.packageNameToTypingLocation.get(t),this.typesRegistry.get(t)))return t;this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' already has an up-to-date typing - skipping...`)}else this.log.isEnabled()&&this.log.writeLine(`'${e}':: Entry for package '${t}' does not exist in local types registry - skipping...`)})}ensurePackageDirectoryExists(e){const t=Yo(e,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${t}`),this.installTypingHost.fileExists(t)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`),this.ensureDirectoryExists(e,this.installTypingHost),this.installTypingHost.writeFile(t,'{ "private": true }'))}installTypings(e,t,n,r){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(r)}`);const i=this.filterTypings(r);if(0===i.length)return this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),void this.sendResponse(this.createSetTypings(e,n));this.ensurePackageDirectoryExists(t);const o=this.installRunCount;this.installRunCount++,this.sendResponse({kind:KK,eventId:o,typingsInstallerVersion:u,projectName:e.projectName});const a=i.map(Gfe);this.installTypingsAsync(o,a,t,r=>{try{if(!r){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(i)}`);for(const e of i)this.missingTypingsSet.add(e);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(a)}`);const o=[];for(const e of i){const n=Wfe(t,e,this.installTypingHost,this.log);if(!n){this.missingTypingsSet.add(e);continue}const r=this.typesRegistry.get(e),i={typingLocation:n,version:new In(r[`ts${c}`]||r[this.latestDistTag])};this.packageNameToTypingLocation.set(e,i),o.push(n)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(o)}`),this.sendResponse(this.createSetTypings(e,n.concat(o)))}finally{const t={kind:GK,eventId:o,projectName:e.projectName,packagesToInstall:a,installSuccess:r,typingsInstallerVersion:u};this.sendResponse(t)}})}ensureDirectoryExists(e,t){const n=Vo(e);t.directoryExists(n)||this.ensureDirectoryExists(n,t),t.directoryExists(e)||t.createDirectory(e)}watchFiles(e,t){if(!t.length)return void this.closeWatchers(e);const n=this.projectWatchers.get(e),r=new Set(t);!n||gd(r,e=>!n.has(e))||gd(n,e=>!r.has(e))?(this.projectWatchers.set(e,r),this.sendResponse({kind:QK,projectName:e,files:t})):this.sendResponse({kind:QK,projectName:e,files:void 0})}createSetTypings(e,t){return{projectName:e.projectName,typeAcquisition:e.typeAcquisition,compilerOptions:e.compilerOptions,typings:t,unresolvedImports:e.unresolvedImports,kind:VK}}installTypingsAsync(e,t,n,r){this.pendingRunRequests.unshift({requestId:e,packageNames:t,cwd:n,onRequestCompleted:r}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,e.onRequestCompleted(t),this.executeWithThrottling()})}}};function Gfe(e){return`@types/${e}@ts${c}`}var Xfe,Qfe,Yfe=(e=>(e[e.terse=0]="terse",e[e.normal=1]="normal",e[e.requestTime=2]="requestTime",e[e.verbose=3]="verbose",e))(Yfe||{}),Zfe=[],eme=(e=>(e.Err="Err",e.Info="Info",e.Perf="Perf",e))(eme||{});function tme(e,t,n,r){return{projectName:e.getProjectName(),fileNames:e.getFileNames(!0,!0).concat(e.getExcludedFiles()),compilerOptions:e.getCompilationSettings(),typeAcquisition:t,unresolvedImports:n,projectRootPath:e.getCurrentDirectory(),cachePath:r,kind:"discover"}}function nme(e){return na(e)}function rme(e,t,n){return n(Ao(e)?e:ta(e,t))}function ime(e){return e}function ome(){const e=new Map;return{get:t=>e.get(t),set(t,n){e.set(t,n)},contains:t=>e.has(t),remove(t){e.delete(t)}}}function ame(e){return/dev\/null\/inferredProject\d+\*/.test(e)}function sme(e){return`/dev/null/inferredProject${e}*`}function cme(e){return`/dev/null/autoImportProviderProject${e}*`}function lme(e){return`/dev/null/auxiliaryProject${e}*`}function _me(){return[]}(Qfe=Xfe||(Xfe={})).ThrowNoProject=function(){throw new Error("No Project.")},Qfe.ThrowProjectLanguageServiceDisabled=function(){throw new Error("The project's language service is disabled.")},Qfe.ThrowProjectDoesNotContainDocument=function(e,t){throw new Error(`Project '${t.getProjectName()}' does not contain document '${e}'`)};var ume=class e{constructor(e,t){this.host=e,this.pendingTimeouts=new Map,this.logger=t.hasLevel(3)?t:void 0}schedule(t,n,r){const i=this.pendingTimeouts.get(t);i&&this.host.clearTimeout(i),this.pendingTimeouts.set(t,this.host.setTimeout(e.run,n,t,this,r)),this.logger&&this.logger.info(`Scheduled: ${t}${i?", Cancelled earlier one":""}`)}cancel(e){const t=this.pendingTimeouts.get(e);return!!t&&(this.host.clearTimeout(t),this.pendingTimeouts.delete(e))}static run(e,t,n){var r,i;null==(r=ir)||r.logStartScheduledOperation(e),t.pendingTimeouts.delete(e),t.logger&&t.logger.info(`Running: ${e}`),n(),null==(i=ir)||i.logStopScheduledOperation()}},dme=class e{constructor(e,t,n){this.host=e,this.delay=t,this.logger=n}scheduleCollect(){this.host.gc&&void 0===this.timerId&&(this.timerId=this.host.setTimeout(e.run,this.delay,this))}static run(e){var t,n;e.timerId=void 0,null==(t=ir)||t.logStartScheduledOperation("GC collect");const r=e.logger.hasLevel(2),i=r&&e.host.getMemoryUsage();if(e.host.gc(),r){const t=e.host.getMemoryUsage();e.logger.perftrc(`GC::before ${i}, after ${t}`)}null==(n=ir)||n.logStopScheduledOperation()}};function pme(e){const t=Wo(e);return"tsconfig.json"===t||"jsconfig.json"===t?t:void 0}function fme(e,t,n){if(!e||0===e.length)return;if(e[0]===t)return void e.splice(0,1);const r=je(e,t,yt,n);r>=0&&e.splice(r,1)}var mme={};a(mme,{ClassificationType:()=>qG,CommandTypes:()=>gme,CompletionTriggerKind:()=>wG,IndentStyle:()=>bme,JsxEmit:()=>xme,ModuleKind:()=>Sme,ModuleResolutionKind:()=>kme,NewLineKind:()=>Tme,OrganizeImportsMode:()=>CG,PollingWatchKind:()=>vme,ScriptTarget:()=>Cme,SemicolonPreference:()=>EG,WatchDirectoryKind:()=>yme,WatchFileKind:()=>hme});var gme=(e=>(e.JsxClosingTag="jsxClosingTag",e.LinkedEditingRange="linkedEditingRange",e.Brace="brace",e.BraceFull="brace-full",e.BraceCompletion="braceCompletion",e.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",e.Change="change",e.Close="close",e.Completions="completions",e.CompletionInfo="completionInfo",e.CompletionsFull="completions-full",e.CompletionDetails="completionEntryDetails",e.CompletionDetailsFull="completionEntryDetails-full",e.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",e.CompileOnSaveEmitFile="compileOnSaveEmitFile",e.Configure="configure",e.Definition="definition",e.DefinitionFull="definition-full",e.DefinitionAndBoundSpan="definitionAndBoundSpan",e.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",e.Implementation="implementation",e.ImplementationFull="implementation-full",e.EmitOutput="emit-output",e.Exit="exit",e.FileReferences="fileReferences",e.FileReferencesFull="fileReferences-full",e.Format="format",e.Formatonkey="formatonkey",e.FormatFull="format-full",e.FormatonkeyFull="formatonkey-full",e.FormatRangeFull="formatRange-full",e.Geterr="geterr",e.GeterrForProject="geterrForProject",e.SemanticDiagnosticsSync="semanticDiagnosticsSync",e.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",e.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",e.NavBar="navbar",e.NavBarFull="navbar-full",e.Navto="navto",e.NavtoFull="navto-full",e.NavTree="navtree",e.NavTreeFull="navtree-full",e.DocumentHighlights="documentHighlights",e.DocumentHighlightsFull="documentHighlights-full",e.Open="open",e.Quickinfo="quickinfo",e.QuickinfoFull="quickinfo-full",e.References="references",e.ReferencesFull="references-full",e.Reload="reload",e.Rename="rename",e.RenameInfoFull="rename-full",e.RenameLocationsFull="renameLocations-full",e.Saveto="saveto",e.SignatureHelp="signatureHelp",e.SignatureHelpFull="signatureHelp-full",e.FindSourceDefinition="findSourceDefinition",e.Status="status",e.TypeDefinition="typeDefinition",e.ProjectInfo="projectInfo",e.ReloadProjects="reloadProjects",e.Unknown="unknown",e.OpenExternalProject="openExternalProject",e.OpenExternalProjects="openExternalProjects",e.CloseExternalProject="closeExternalProject",e.SynchronizeProjectList="synchronizeProjectList",e.ApplyChangedToOpenFiles="applyChangedToOpenFiles",e.UpdateOpen="updateOpen",e.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",e.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",e.Cleanup="cleanup",e.GetOutliningSpans="getOutliningSpans",e.GetOutliningSpansFull="outliningSpans",e.TodoComments="todoComments",e.Indentation="indentation",e.DocCommentTemplate="docCommentTemplate",e.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",e.NameOrDottedNameSpan="nameOrDottedNameSpan",e.BreakpointStatement="breakpointStatement",e.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",e.GetCodeFixes="getCodeFixes",e.GetCodeFixesFull="getCodeFixes-full",e.GetCombinedCodeFix="getCombinedCodeFix",e.GetCombinedCodeFixFull="getCombinedCodeFix-full",e.ApplyCodeActionCommand="applyCodeActionCommand",e.GetSupportedCodeFixes="getSupportedCodeFixes",e.GetApplicableRefactors="getApplicableRefactors",e.GetEditsForRefactor="getEditsForRefactor",e.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",e.GetPasteEdits="getPasteEdits",e.GetEditsForRefactorFull="getEditsForRefactor-full",e.OrganizeImports="organizeImports",e.OrganizeImportsFull="organizeImports-full",e.GetEditsForFileRename="getEditsForFileRename",e.GetEditsForFileRenameFull="getEditsForFileRename-full",e.ConfigurePlugin="configurePlugin",e.SelectionRange="selectionRange",e.SelectionRangeFull="selectionRange-full",e.ToggleLineComment="toggleLineComment",e.ToggleLineCommentFull="toggleLineComment-full",e.ToggleMultilineComment="toggleMultilineComment",e.ToggleMultilineCommentFull="toggleMultilineComment-full",e.CommentSelection="commentSelection",e.CommentSelectionFull="commentSelection-full",e.UncommentSelection="uncommentSelection",e.UncommentSelectionFull="uncommentSelection-full",e.PrepareCallHierarchy="prepareCallHierarchy",e.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",e.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",e.ProvideInlayHints="provideInlayHints",e.WatchChange="watchChange",e.MapCode="mapCode",e))(gme||{}),hme=(e=>(e.FixedPollingInterval="FixedPollingInterval",e.PriorityPollingInterval="PriorityPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e.UseFsEvents="UseFsEvents",e.UseFsEventsOnParentDirectory="UseFsEventsOnParentDirectory",e))(hme||{}),yme=(e=>(e.UseFsEvents="UseFsEvents",e.FixedPollingInterval="FixedPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e))(yme||{}),vme=(e=>(e.FixedInterval="FixedInterval",e.PriorityInterval="PriorityInterval",e.DynamicPriority="DynamicPriority",e.FixedChunkSize="FixedChunkSize",e))(vme||{}),bme=(e=>(e.None="None",e.Block="Block",e.Smart="Smart",e))(bme||{}),xme=(e=>(e.None="none",e.Preserve="preserve",e.ReactNative="react-native",e.React="react",e.ReactJSX="react-jsx",e.ReactJSXDev="react-jsxdev",e))(xme||{}),Sme=(e=>(e.None="none",e.CommonJS="commonjs",e.AMD="amd",e.UMD="umd",e.System="system",e.ES6="es6",e.ES2015="es2015",e.ES2020="es2020",e.ES2022="es2022",e.ESNext="esnext",e.Node16="node16",e.NodeNext="nodenext",e.Preserve="preserve",e))(Sme||{}),kme=(e=>(e.Classic="classic",e.Node="node",e.NodeJs="node",e.Node10="node10",e.Node16="node16",e.NodeNext="nodenext",e.Bundler="bundler",e))(kme||{}),Tme=(e=>(e.Crlf="Crlf",e.Lf="Lf",e))(Tme||{}),Cme=(e=>(e.ES3="es3",e.ES5="es5",e.ES6="es6",e.ES2015="es2015",e.ES2016="es2016",e.ES2017="es2017",e.ES2018="es2018",e.ES2019="es2019",e.ES2020="es2020",e.ES2021="es2021",e.ES2022="es2022",e.ES2023="es2023",e.ESNext="esnext",e.JSON="json",e.Latest="esnext",e))(Cme||{}),wme=class{constructor(e,t,n){this.host=e,this.info=t,this.isOpen=!1,this.ownFileText=!1,this.pendingReloadFromDisk=!1,this.version=n||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return void 0!==this.svc}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(e){this.svc=void 0,this.text=e,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(e,t,n){this.switchToScriptVersionCache().edit(e,t-e,n),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(e){return Tn.assert(void 0!==e),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=HQ(this.svc.getSnapshot())),this.text!==e&&(this.useText(e),this.ownFileText=!1,!0)}reloadWithFileText(e){const{text:t,fileSize:n}=e||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(e):{text:"",fileSize:void 0},r=this.reload(t);return this.fileSize=n,this.ownFileText=!e||e===this.info.fileName,this.ownFileText&&this.info.mTime===to.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||to).getTime()),r}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText&&(this.pendingReloadFromDisk=!0)}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){var e;return(null==(e=this.tryUseScriptVersionCache())?void 0:e.getSnapshot())||(this.textSnapshot??(this.textSnapshot=pG.fromString(Tn.checkDefined(this.text))))}getAbsolutePositionAndLineText(e){const t=this.tryUseScriptVersionCache();if(t)return t.getAbsolutePositionAndLineText(e);const n=this.getLineMap();return e<=n.length?{absolutePosition:n[e-1],lineText:this.text.substring(n[e-1],n[e])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(e){const t=this.tryUseScriptVersionCache();if(t)return t.lineToTextSpan(e);const n=this.getLineMap();return nc(n[e],e+1void 0===t?t=this.host.readFile(n)||"":t;if(!Yk(this.info.fileName)){const e=this.host.getFileSize?this.host.getFileSize(n):r().length;if(e>Qme){Tn.assert(!!this.info.containingProjects.length);return this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${n} for info ${this.info.fileName}: fileSize: ${e}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(n,e),{text:"",fileSize:e}}}return{text:r()}}switchToScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||(this.svc=Ehe.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||this.getOrLoadText(),this.isOpen?(this.svc||this.textSnapshot||(this.svc=Ehe.fromString(Tn.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(void 0===this.text||this.pendingReloadFromDisk)&&(Tn.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return Tn.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=Ga(Tn.checkDefined(this.text)))}getLineInfo(){const e=this.tryUseScriptVersionCache();if(e)return{getLineCount:()=>e.getLineCount(),getLineText:t=>e.getAbsolutePositionAndLineText(t+1).lineText};const t=this.getLineMap();return xJ(this.text,t)}};function Nme(e){return"^"===e[0]||(e.includes("walkThroughSnippet:/")||e.includes("untitled:/"))&&"^"===Wo(e)[0]||e.includes(":^")&&!e.includes(wo)}var Dme=class{constructor(e,t,n,r,i,o){this.host=e,this.fileName=t,this.scriptKind=n,this.hasMixedContent=r,this.path=i,this.containingProjects=[],this.isDynamic=Nme(t),this.textStorage=new wme(e,this,o),(r||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=n||Mk(t)}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(e){this.textStorage.isOpen=!0,void 0!==e&&this.textStorage.reload(e)&&this.markContainingProjectsAsDirty()}close(e=!0){this.textStorage.isOpen=!1,e&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}ensureRealPath(){if(void 0===this.realpath&&(this.realpath=this.path,this.host.realpath)){Tn.assert(!!this.containingProjects.length);const e=this.containingProjects[0],t=this.host.realpath(this.path);t&&(this.realpath=e.toPath(t),this.realpath!==this.path&&e.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}getPreferences(){return this.preferences}attachToProject(e){const t=!this.isAttached(e);return t&&(this.containingProjects.push(e),e.getCompilerOptions().preserveSymlinks||this.ensureRealPath(),e.onFileAddedOrRemoved(this.isSymlink())),t}isAttached(e){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===e;case 2:return this.containingProjects[0]===e||this.containingProjects[1]===e;default:return E(this.containingProjects,e)}}detachFromProject(e){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===e?(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:en(this.containingProjects,e)&&e.onFileAddedOrRemoved(this.isSymlink())}}detachAllProjects(){for(const e of this.containingProjects){$me(e)&&e.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);const t=e.getRootFilesMap().get(this.path);e.removeFile(this,!1,!1),e.onFileAddedOrRemoved(this.isSymlink()),t&&!Wme(e)&&e.addMissingFileRoot(t.fileName)}L(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return Xfe.ThrowNoProject();case 1:return Gme(this.containingProjects[0])||Kme(this.containingProjects[0])?Xfe.ThrowNoProject():this.containingProjects[0];default:let e,t,n,r;for(let i=0;i!e.isOrphan())}isContainedByBackgroundProject(){return ee(this.containingProjects,Kme)}lineToTextSpan(e){return this.textStorage.lineToTextSpan(e)}lineOffsetToPosition(e,t,n){return this.textStorage.lineOffsetToPosition(e,t,n)}positionToLineOffset(e){!function(e){Tn.assert("number"==typeof e,`Expected position ${e} to be a number.`),Tn.assert(e>=0,"Expected position to be non-negative.")}(e);const t=this.textStorage.positionToLineOffset(e);return function(e){Tn.assert("number"==typeof e.line,`Expected line ${e.line} to be a number.`),Tn.assert("number"==typeof e.offset,`Expected offset ${e.offset} to be a number.`),Tn.assert(e.line>0,"Expected line to be non-"+(0===e.line?"zero":"negative")),Tn.assert(e.offset>0,"Expected offset to be non-"+(0===e.offset?"zero":"negative"))}(t),t}isJavaScript(){return 1===this.scriptKind||2===this.scriptKind}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!_t(this.sourceMapFilePath)&&(RU(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}};var Pme={isKnownTypesPackageName:mt,installPackage:St,enqueueInstallTypingsRequest:ft,attach:ft,onProjectClosed:ft,globalTypingsCacheLocation:void 0};function Eme(e,t){if(e===t)return!0;if(0===(e||Zfe).length&&0===(t||Zfe).length)return!0;const n=new Map;let r=0;for(const t of e)!0!==n.get(t)&&(n.set(t,!0),r++);for(const e of t){const t=n.get(e);if(void 0===t)return!1;!0===t&&(n.set(e,!1),r--)}return 0===r}var Fme=class{constructor(e){this.installer=e,this.perProjectCache=new Map}isKnownTypesPackageName(e){return this.installer.isKnownTypesPackageName(e)}installPackage(e){return this.installer.installPackage(e)}enqueueInstallTypingsForProject(e,t,n){const r=e.getTypeAcquisition();if(!r||!r.enable)return;const i=this.perProjectCache.get(e.getProjectName());var o,a,s,c;!n&&i&&(s=r,c=i.typeAcquisition,s.enable===c.enable&&Eme(s.include,c.include)&&Eme(s.exclude,c.exclude))&&!function(e,t){return KS(e)!==KS(t)}(e.getCompilationSettings(),i.compilerOptions)&&(o=t,a=i.unresolvedImports,o===a||_e(o,a))||(this.perProjectCache.set(e.getProjectName(),{compilerOptions:e.getCompilationSettings(),typeAcquisition:r,typings:i?i.typings:Zfe,unresolvedImports:t,poisoned:!0}),this.installer.enqueueInstallTypingsRequest(e,r,t))}updateTypingsForProject(e,t,n,r,i){const o=be(i);return this.perProjectCache.set(e,{compilerOptions:t,typeAcquisition:n,typings:o,unresolvedImports:r,poisoned:!1}),n&&n.enable?o:Zfe}onProjectClosed(e){this.perProjectCache.delete(e.getProjectName())&&this.installer.onProjectClosed(e)}},Ame=(e=>(e[e.Inferred=0]="Inferred",e[e.Configured=1]="Configured",e[e.External=2]="External",e[e.AutoImportProvider=3]="AutoImportProvider",e[e.Auxiliary=4]="Auxiliary",e))(Ame||{});function Ime(e,t=!1){const n={js:0,jsSize:0,jsx:0,jsxSize:0,ts:0,tsSize:0,tsx:0,tsxSize:0,dts:0,dtsSize:0,deferred:0,deferredSize:0};for(const r of e){const e=t?r.textStorage.getTelemetryFileSize():0;switch(r.scriptKind){case 1:n.js+=1,n.jsSize+=e;break;case 2:n.jsx+=1,n.jsxSize+=e;break;case 3:lO(r.fileName)?(n.dts+=1,n.dtsSize+=e):(n.ts+=1,n.tsSize+=e);break;case 4:n.tsx+=1,n.tsxSize+=e;break;case 7:n.deferred+=1,n.deferredSize+=e}}return n}function Ome(e){const t=Ime(e.getRootScriptInfos());return 0===t.ts&&0===t.tsx}function jme(e){const t=Ime(e.getScriptInfos());return 0===t.ts&&0===t.tsx}function Lme(e){return!e.some(e=>Ro(e,".ts")&&!lO(e)||Ro(e,".tsx"))}function Mme(e){return void 0!==e.generatedFilePath}var Rme=class e{constructor(e,t,n,r,i,o,a,s,c,l,_){switch(this.projectKind=t,this.projectService=n,this.documentRegistry=r,this.compilerOptions=a,this.compileOnSaveEnabled=s,this.watchOptions=c,this.rootFilesMap=new Map,this.plugins=[],this.cachedUnresolvedImportsPerFile=new Map,this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1,this.lastReportedVersion=0,this.projectProgramVersion=0,this.projectStateVersion=0,this.isInitialLoadPending=mt,this.dirty=!1,this.typingFiles=Zfe,this.moduleSpecifierCache=Gge(this),this.createHash=nt(this.projectService.host,this.projectService.host.createHash),this.globalCacheResolutionModuleName=zK.nonRelativeModuleNameForTypingCache,this.updateFromProjectInProgress=!1,this.projectName=e,this.directoryStructureHost=l,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(_),this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new v5(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds),this.compilerOptions?(i||KS(this.compilerOptions)||this.projectService.hasDeferredExtension())&&(this.compilerOptions.allowNonTsExtensions=!0):(this.compilerOptions={target:1,jsx:1},this.compilerOptions.allowNonTsExtensions=!0,this.compilerOptions.allowJs=!0),n.serverMode){case 0:this.languageServiceEnabled=!0;break;case 1:this.languageServiceEnabled=!0,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;case 2:this.languageServiceEnabled=!1,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;default:Tn.assertNever(n.serverMode)}this.setInternalCompilerOptionsForEmittingJsFiles();const u=this.projectService.host;this.projectService.logger.loggingEnabled()?this.trace=e=>this.writeLog(e):u.trace&&(this.trace=e=>u.trace(e)),this.realpath=nt(u,u.realpath),this.resolutionCache=GW(this,this.currentDirectory,!0),this.languageService=S5(this,this.documentRegistry,this.projectService.serverMode),o&&this.disableLanguageService(o),this.markAsDirty(),Kme(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getResolvedProjectReferenceToRedirect(e){}isNonTsProject(){return Lge(this),jme(this)}isJsOnlyProject(){return Lge(this),function(e){const t=Ime(e.getScriptInfos());return t.js>0&&0===t.ts&&0===t.tsx}(this)}static resolveModule(t,n,r,i){return e.importServicePluginSync({name:t},[n],r,i).resolvedModule}static importServicePluginSync(e,t,n,r){let i,o;Tn.assertIsDefined(n.require);for(const a of t){const t=Xo(n.resolvePath(Yo(a,"node_modules")));r(`Loading ${e.name} from ${a} (resolved to ${t})`);const s=n.require(t,e.name);if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to load module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}static async importServicePluginAsync(e,t,n,r){let i,o;Tn.assertIsDefined(n.importPlugin);for(const a of t){const t=Yo(a,"node_modules");let s;r(`Dynamically importing ${e.name} from ${a} (resolved to ${t})`);try{s=await n.importPlugin(t,e.name)}catch(e){s={module:void 0,error:e}}if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to dynamically import module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}isKnownTypesPackageName(e){return this.typingsCache.isKnownTypesPackageName(e)}installPackage(e){return this.typingsCache.installPackage({...e,projectName:this.projectName,projectRootPath:this.toPath(this.currentDirectory)})}getGlobalTypingsCacheLocation(){return this.getGlobalCache()}get typingsCache(){return this.projectService.typingsCache}getSymlinkCache(){return this.symlinks||(this.symlinks=dk(this.getCurrentDirectory(),this.getCanonicalFileName)),this.program&&!this.symlinks.hasProcessedResolutions()&&this.symlinks.setSymlinksFromResolutions(this.program.forEachResolvedModule,this.program.forEachResolvedTypeReferenceDirective,this.program.getAutomaticTypeDirectiveResolutions()),this.symlinks}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return this.projectService.host.newLine}getProjectVersion(){return this.projectStateVersion.toString()}getProjectReferences(){}getScriptFileNames(){if(!this.rootFilesMap.size)return p;let e;return this.rootFilesMap.forEach(t=>{(this.languageServiceEnabled||t.info&&t.info.isScriptOpen())&&(e||(e=[])).push(t.fileName)}),ge(e,this.typingFiles)||p}getOrCreateScriptInfoAndAttachToProject(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);if(t){const e=this.rootFilesMap.get(t.path);e&&e.info!==t&&(e.info=t),t.attachToProject(this)}return t}getScriptKind(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&t.scriptKind}getScriptVersion(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);return t&&t.getLatestVersion()}getScriptSnapshot(e){const t=this.getOrCreateScriptInfoAndAttachToProject(e);if(t)return t.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){return Yo(Vo(na(this.projectService.getExecutingFilePath())),qs(this.compilerOptions))}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(e,t,n,r,i){return this.directoryStructureHost.readDirectory(e,t,n,r,i)}readFile(e){return this.projectService.host.readFile(e)}writeFile(e,t){return this.projectService.host.writeFile(e,t)}fileExists(e){const t=this.toPath(e);return!this.isWatchedMissingFile(t)&&this.directoryStructureHost.fileExists(e)}resolveModuleNameLiterals(e,t,n,r,i,o){return this.resolutionCache.resolveModuleNameLiterals(e,t,n,r,i,o)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o){return this.resolutionCache.resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o)}resolveLibrary(e,t,n,r){return this.resolutionCache.resolveLibrary(e,t,n,r)}directoryExists(e){return this.directoryStructureHost.directoryExists(e)}getDirectories(e){return this.directoryStructureHost.getDirectories(e)}getCachedDirectoryStructureHost(){}toPath(e){return ia(e,this.currentDirectory,this.projectService.toCanonicalFileName)}watchDirectoryOfFailedLookupLocation(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),S$.FailedLookupLocations,this)}watchAffectingFileLocation(e,t){return this.projectService.watchFactory.watchFile(e,t,2e3,this.projectService.getWatchOptions(this),S$.AffectingFileLocation,this)}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)})}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}watchTypeRootsDirectory(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),S$.TypeRoots,this)}hasChangedAutomaticTypeDirectiveNames(){return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames()}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}getGlobalCache(){return this.getTypeAcquisition().enable?this.projectService.typingsInstaller.globalTypingsCacheLocation:void 0}fileIsOpen(e){return this.projectService.openFiles.has(e)}writeLog(e){this.projectService.logger.info(e)}log(e){this.writeLog(e)}error(e){this.projectService.logger.msg(e,"Err")}setInternalCompilerOptionsForEmittingJsFiles(){0!==this.projectKind&&2!==this.projectKind||(this.compilerOptions.noEmitForJsFiles=!0)}getGlobalProjectErrors(){return O(this.projectErrors,e=>!e.file)||Zfe}getAllProjectErrors(){return this.projectErrors||Zfe}setProjectErrors(e){this.projectErrors=e}getLanguageService(e=!0){return e&&Lge(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}clearSourceMapperCache(){this.languageService.clearSourceMapperCache()}getDocumentPositionMapper(e,t){return this.projectService.getDocumentPositionMapper(this,e,t)}getSourceFileLike(e){return this.projectService.getSourceFileLike(e,this)}shouldEmitFile(e){return e&&!e.isDynamicOrHasMixedContent()&&!this.program.isSourceOfProjectReferenceRedirect(e.path)}getCompileOnSaveAffectedFileList(e){return this.languageServiceEnabled?(Lge(this),this.builderState=KV.create(this.program,this.builderState,!0),$(KV.getFilesAffectedBy(this.builderState,this.program,e.path,this.cancellationToken,this.projectService.host),e=>this.shouldEmitFile(this.projectService.getScriptInfoForPath(e.path))?e.fileName:void 0)):[]}emitFile(e,t){if(!this.languageServiceEnabled||!this.shouldEmitFile(e))return{emitSkipped:!0,diagnostics:Zfe};const{emitSkipped:n,diagnostics:r,outputFiles:i}=this.getLanguageService().getEmitOutput(e.fileName);if(!n){for(const e of i){t(ta(e.name,this.currentDirectory),e.text,e.writeByteOrderMark)}if(this.builderState&&VS(this.compilerOptions)){const t=i.filter(e=>lO(e.name));if(1===t.length){const n=this.program.getSourceFile(e.fileName),r=this.projectService.host.createHash?this.projectService.host.createHash(t[0].text):Qi(t[0].text);KV.updateSignatureOfFile(this.builderState,r,n.resolvedPath)}}}return{emitSkipped:n,diagnostics:r}}enableLanguageService(){this.languageServiceEnabled||2===this.projectService.serverMode||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}cleanupProgram(){if(this.program){for(const e of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(e.fileName);this.program.forEachResolvedProjectReference(e=>this.detachScriptInfoFromProject(e.sourceFile.fileName)),this.program=void 0}}disableLanguageService(e){this.languageServiceEnabled&&(Tn.assert(2!==this.projectService.serverMode),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=e,this.builderState=void 0,this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.resolutionCache.closeTypeRootsWatch(),this.clearGeneratedFileWatch(),this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}getProjectName(){return this.projectName}removeLocalTypingsFromTypeAcquisition(e){return e&&e.include?{...e,include:this.removeExistingTypings(e.include)}:e}getExternalFiles(e){return be(z(this.plugins,t=>{if("function"==typeof t.module.getExternalFiles)try{return t.module.getExternalFiles(this,e||0)}catch(e){this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`),e.stack&&this.projectService.logger.info(e.stack)}}))}getSourceFile(e){if(this.program)return this.program.getSourceFileByPath(e)}getSourceFileOrConfigFile(e){const t=this.program.getCompilerOptions();return e===t.configFilePath?t.configFile:this.getSourceFile(e)}close(){var e;this.projectService.typingsCache.onProjectClosed(this),this.closeWatchingTypingLocations(),this.cleanupProgram(),h(this.externalFiles,e=>this.detachScriptInfoIfNotRoot(e)),this.rootFilesMap.forEach(e=>{var t;return null==(t=e.info)?void 0:t.detachFromProject(this)}),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.builderState=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,null==(e=this.packageJsonWatches)||e.forEach(e=>{e.projects.delete(this),e.close()}),this.packageJsonWatches=void 0,this.moduleSpecifierCache.clear(),this.moduleSpecifierCache=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.plugins.length=0,this.missingFilesMap&&(Px(this.missingFilesMap,bx),this.missingFilesMap=void 0),this.clearGeneratedFileWatch(),this.clearInvalidateResolutionOfFailedLookupTimer(),this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.noDtsResolutionProject&&this.noDtsResolutionProject.close(),this.noDtsResolutionProject=void 0,this.languageService.dispose(),this.languageService=void 0}detachScriptInfoIfNotRoot(e){const t=this.projectService.getScriptInfo(e);t&&!this.isRoot(t)&&t.detachFromProject(this)}isClosed(){return void 0===this.rootFilesMap}hasRoots(){var e;return!!(null==(e=this.rootFilesMap)?void 0:e.size)}isOrphan(){return!1}getRootFiles(){return this.rootFilesMap&&We(H(this.rootFilesMap.values(),e=>{var t;return null==(t=e.info)?void 0:t.fileName}))}getRootFilesMap(){return this.rootFilesMap}getRootScriptInfos(){return We(H(this.rootFilesMap.values(),e=>e.info))}getScriptInfos(){return this.languageServiceEnabled?M(this.program.getSourceFiles(),e=>{const t=this.projectService.getScriptInfoForPath(e.resolvedPath);return Tn.assert(!!t,"getScriptInfo",()=>`scriptInfo for a file '${e.fileName}' Path: '${e.path}' / '${e.resolvedPath}' is missing.`),t}):this.getRootScriptInfos()}getExcludedFiles(){return Zfe}getFileNames(e,t){if(!this.program)return[];if(!this.languageServiceEnabled){let e=this.getRootFiles();if(this.compilerOptions){const t=w5(this.compilerOptions);t&&(e||(e=[])).push(t)}return e}const n=[];for(const t of this.program.getSourceFiles())e&&this.program.isSourceFileFromExternalLibrary(t)||n.push(ime(t.fileName));if(!t){const e=this.program.getCompilerOptions().configFile;if(e&&(n.push(e.fileName),e.extendedSourceFiles))for(const t of e.extendedSourceFiles)n.push(ime(t))}return n}getFileNamesWithRedirectInfo(e){return this.getFileNames().map(t=>({fileName:t,isSourceOfProjectReferenceRedirect:e&&this.isSourceOfProjectReferenceRedirect(t)}))}hasConfigFile(e){if(this.program&&this.languageServiceEnabled){const t=this.program.getCompilerOptions().configFile;if(t){if(e===t.fileName)return!0;if(t.extendedSourceFiles)for(const n of t.extendedSourceFiles)if(e===ime(n))return!0}}return!1}containsScriptInfo(e){if(this.isRoot(e))return!0;if(!this.program)return!1;const t=this.program.getSourceFileByPath(e.path);return!!t&&t.resolvedPath===e.path}containsFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(e);return!(!n||!n.isScriptOpen()&&t)&&this.containsScriptInfo(n)}isRoot(e){var t,n;return(null==(n=null==(t=this.rootFilesMap)?void 0:t.get(e.path))?void 0:n.info)===e}addRoot(e,t){Tn.assert(!this.isRoot(e)),this.rootFilesMap.set(e.path,{fileName:t||e.fileName,info:e}),e.attachToProject(this),this.markAsDirty()}addMissingFileRoot(e){const t=this.projectService.toPath(e);this.rootFilesMap.set(t,{fileName:e}),this.markAsDirty()}removeFile(e,t,n){this.isRoot(e)&&this.removeRoot(e),t?this.resolutionCache.removeResolutionsOfFile(e.path):this.resolutionCache.invalidateResolutionOfFile(e.path),this.cachedUnresolvedImportsPerFile.delete(e.path),n&&e.detachFromProject(this),this.markAsDirty()}registerFileUpdate(e){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(e)}markFileAsDirty(e){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(e)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}markAutoImportProviderAsDirty(){var e;this.autoImportProviderHost||(this.autoImportProviderHost=void 0),null==(e=this.autoImportProviderHost)||e.markAsDirty()}onAutoImportProviderSettingsChanged(){var e;!1===this.autoImportProviderHost?this.autoImportProviderHost=void 0:null==(e=this.autoImportProviderHost)||e.markAsDirty()}onPackageJsonChange(){this.moduleSpecifierCache.clear(),this.autoImportProviderHost&&this.autoImportProviderHost.markAsDirty()}onFileAddedOrRemoved(e){this.hasAddedorRemovedFiles=!0,e&&(this.hasAddedOrRemovedSymlinks=!0)}onDiscoveredSymlink(){this.hasAddedOrRemovedSymlinks=!0}updateFromProject(){Lge(this)}updateGraph(){var e,t,n,r;null==(e=cr)||e.push(cr.Phase.Session,"updateGraph",{name:this.projectName,kind:Ame[this.projectKind]}),null==(t=ir)||t.logStartUpdateGraph(),this.resolutionCache.startRecordingFilesWithChangedResolutions();const i=this.updateGraphWorker(),o=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;const a=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||Zfe;for(const e of a)this.cachedUnresolvedImportsPerFile.delete(e);this.languageServiceEnabled&&0===this.projectService.serverMode&&!this.isOrphan()?((i||a.length)&&(this.lastCachedUnresolvedImportsList=function(e,t){var n,r;const i=e.getSourceFiles();null==(n=cr)||n.push(cr.Phase.Session,"getUnresolvedImports",{count:i.length});const o=e.getTypeChecker().getAmbientModules().map(e=>Wy(e.getName())),a=ce(z(i,n=>function(e,t,n,r){return G(r,t.path,()=>{let r;return e.forEachResolvedModule(({resolvedModule:e},t)=>{e&&fT(e.extension)||Js(t)||n.some(e=>e===t)||(r=pe(r,mR(t).packageName))},t),r||Zfe})}(e,n,o,t)));return null==(r=cr)||r.pop(),a}(this.program,this.cachedUnresolvedImportsPerFile)),this.projectService.typingsCache.enqueueInstallTypingsForProject(this,this.lastCachedUnresolvedImportsList,o)):this.lastCachedUnresolvedImportsList=void 0;const s=0===this.projectProgramVersion&&i;return i&&this.projectProgramVersion++,o&&this.markAutoImportProviderAsDirty(),s&&this.getPackageJsonAutoImportProvider(),null==(n=ir)||n.logStopUpdateGraph(),null==(r=cr)||r.pop(),!i}updateTypingFiles(e){yn(e,this.typingFiles,Bt(!this.useCaseSensitiveFileNames()),ft,e=>this.detachScriptInfoFromProject(e))&&(this.typingFiles=e,this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}closeWatchingTypingLocations(){this.typingWatchers&&Px(this.typingWatchers,bx),this.typingWatchers=void 0}onTypingInstallerWatchInvoke(){this.typingWatchers.isInvoked=!0,this.projectService.updateTypingsForProject({projectName:this.getProjectName(),kind:WK})}watchTypingLocations(e){if(!e)return void(this.typingWatchers.isInvoked=!1);if(!e.length)return void this.closeWatchingTypingLocations();const t=new Map(this.typingWatchers);this.typingWatchers||(this.typingWatchers=new Map),this.typingWatchers.isInvoked=!1;const n=(e,n)=>{const r=this.toPath(e);t.delete(r),this.typingWatchers.has(r)||this.typingWatchers.set(r,"FileWatcher"===n?this.projectService.watchFactory.watchFile(e,()=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):this.onTypingInstallerWatchInvoke(),2e3,this.projectService.getWatchOptions(this),S$.TypingInstallerLocationFile,this):this.projectService.watchFactory.watchDirectory(e,e=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):Ro(e,".json")?fa(e,Yo(this.projectService.typingsInstaller.globalTypingsCacheLocation,"package.json"),!this.useCaseSensitiveFileNames())?this.writeLog("Ignoring package.json change at global typings location"):void this.onTypingInstallerWatchInvoke():this.writeLog("Ignoring files that are not *.json"),1,this.projectService.getWatchOptions(this),S$.TypingInstallerLocationDirectory,this))};for(const t of e){const e=Wo(t);if("package.json"!==e&&"bower.json"!==e){if(ma(this.currentDirectory,t,this.currentDirectory,!this.useCaseSensitiveFileNames())){const e=t.indexOf(wo,this.currentDirectory.length+1);n(-1!==e?t.substr(0,e):t,"DirectoryWatcher");continue}ma(this.projectService.typingsInstaller.globalTypingsCacheLocation,t,this.currentDirectory,!this.useCaseSensitiveFileNames())?n(this.projectService.typingsInstaller.globalTypingsCacheLocation,"DirectoryWatcher"):n(t,"DirectoryWatcher")}else n(t,"FileWatcher")}t.forEach((e,t)=>{e.close(),this.typingWatchers.delete(t)})}getCurrentProgram(){return this.program}removeExistingTypings(e){const t=yM(this.getCompilerOptions(),this.directoryStructureHost);return e.filter(e=>!t.includes(e))}updateGraphWorker(){var e,t;const n=this.languageService.getCurrentProgram();Tn.assert(n===this.program),Tn.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);const r=tr(),{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=this.resolutionCache.createHasInvalidatedResolutions(mt,mt);this.hasInvalidatedResolutions=i,this.hasInvalidatedLibResolutions=o,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,null==(e=cr)||e.push(cr.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,n),null==(t=cr)||t.pop(),Tn.assert(void 0===n||void 0!==this.program);let a=!1;if(this.program&&(!n||this.program!==n&&2!==this.program.structureIsReused)){if(a=!0,n){for(const e of n.getSourceFiles()){const t=this.program.getSourceFileByPath(e.resolvedPath);(!t||e.resolvedPath===e.path&&t.resolvedPath!==e.path)&&this.detachScriptInfoFromProject(e.fileName,!!this.program.getSourceFileByPath(e.path),!0)}n.forEachResolvedProjectReference(e=>{this.program.getResolvedProjectReferenceByPath(e.sourceFile.path)||this.detachScriptInfoFromProject(e.sourceFile.fileName,void 0,!0)})}if(this.rootFilesMap.forEach((e,t)=>{var n;const r=this.program.getSourceFileByPath(t),i=e.info;r&&(null==(n=e.info)?void 0:n.path)!==r.resolvedPath&&(e.info=this.projectService.getScriptInfo(r.fileName),Tn.assert(e.info.isAttached(this)),null==i||i.detachFromProject(this))}),EU(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),(e,t)=>this.addMissingFileWatcher(e,t)),this.generatedFilesMap){const e=this.compilerOptions.outFile;Mme(this.generatedFilesMap)?e&&this.isValidGeneratedFileWatcher(aT(e)+".d.ts",this.generatedFilesMap)||this.clearGeneratedFileWatch():e?this.clearGeneratedFileWatch():this.generatedFilesMap.forEach((e,t)=>{const n=this.program.getSourceFileByPath(t);n&&n.resolvedPath===t&&this.isValidGeneratedFileWatcher(av(n.fileName,this.compilerOptions,this.currentDirectory,this.program.getCommonSourceDirectory(),this.getCanonicalFileName),e)||(RU(e),this.generatedFilesMap.delete(t))})}this.languageServiceEnabled&&0===this.projectService.serverMode&&this.resolutionCache.updateTypeRootsWatch()}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||n&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&n&&this.program&&gd(this.changedFilesForExportMapCache,e=>{const t=n.getSourceFileByPath(e),r=this.program.getSourceFileByPath(e);return t&&r?this.exportMapCache.onFileChanged(t,r,!!this.getTypeAcquisition().enable):(this.exportMapCache.clear(),!0)})),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions().preserveSymlinks)&&(this.symlinks=void 0,this.moduleSpecifierCache.clear());const s=this.externalFiles||Zfe;this.externalFiles=this.getExternalFiles(),yn(this.externalFiles,s,Bt(!this.useCaseSensitiveFileNames()),e=>{const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);null==t||t.attachToProject(this)},e=>this.detachScriptInfoFromProject(e));const c=tr()-r;return this.sendPerformanceEvent("UpdateGraph",c),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${a}${this.program?` structureIsReused:: ${Ur[this.program.structureIsReused]}`:""} Elapsed: ${c}ms`),this.projectService.logger.isTestLogger?this.program!==n?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==n&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),a}sendPerformanceEvent(e,t){this.projectService.sendPerformanceEvent(e,t)}detachScriptInfoFromProject(e,t,n){const r=this.projectService.getScriptInfo(e);r&&(r.detachFromProject(this),t||this.resolutionCache.removeResolutionsOfFile(r.path,n))}addMissingFileWatcher(e,t){var n;if($me(this)){const t=this.projectService.configFileExistenceInfoCache.get(e);if(null==(n=null==t?void 0:t.config)?void 0:n.projects.has(this.canonicalConfigFilePath))return v$}const r=this.projectService.watchFactory.watchFile(ta(t,this.currentDirectory),(t,n)=>{$me(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(t,e,n),0===n&&this.missingFilesMap.has(e)&&(this.missingFilesMap.delete(e),r.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))},500,this.projectService.getWatchOptions(this),S$.MissingFile,this);return r}isWatchedMissingFile(e){return!!this.missingFilesMap&&this.missingFilesMap.has(e)}addGeneratedFileWatch(e,t){if(this.compilerOptions.outFile)this.generatedFilesMap||(this.generatedFilesMap=this.createGeneratedFileWatcher(e));else{const n=this.toPath(t);if(this.generatedFilesMap){if(Mme(this.generatedFilesMap))return void Tn.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);if(this.generatedFilesMap.has(n))return}else this.generatedFilesMap=new Map;this.generatedFilesMap.set(n,this.createGeneratedFileWatcher(e))}}createGeneratedFileWatcher(e){return{generatedFilePath:this.toPath(e),watcher:this.projectService.watchFactory.watchFile(e,()=>{this.clearSourceMapperCache(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)},2e3,this.projectService.getWatchOptions(this),S$.MissingGeneratedFile,this)}}isValidGeneratedFileWatcher(e,t){return this.toPath(e)===t.generatedFilePath}clearGeneratedFileWatch(){this.generatedFilesMap&&(Mme(this.generatedFilesMap)?RU(this.generatedFilesMap):Px(this.generatedFilesMap,RU),this.generatedFilesMap=void 0)}getScriptInfoForNormalizedPath(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&!t.isAttached(this)?Xfe.ThrowProjectDoesNotContainDocument(e,this):t}getScriptInfo(e){return this.projectService.getScriptInfo(e)}filesToString(e){return this.filesToStringWorker(e,!0,!1)}filesToStringWorker(e,t,n){if(this.isInitialLoadPending())return"\tFiles (0) InitialLoadPending\n";if(!this.program)return"\tFiles (0) NoProgram\n";const r=this.program.getSourceFiles();let i=`\tFiles (${r.length})\n`;if(e){for(const e of r)i+=`\t${e.fileName}${n?` ${e.version} ${JSON.stringify(e.text)}`:""}\n`;t&&(i+="\n\n",u$(this.program,e=>i+=`\t${e}\n`))}return i}print(e,t,n){var r;this.writeLog(`Project '${this.projectName}' (${Ame[this.projectKind]})`),this.writeLog(this.filesToStringWorker(e&&this.projectService.logger.hasLevel(3),t&&this.projectService.logger.hasLevel(3),n&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------"),this.autoImportProviderHost&&this.autoImportProviderHost.print(!1,!1,!1),null==(r=this.noDtsResolutionProject)||r.print(!1,!1,!1)}setCompilerOptions(e){var t;if(e){e.allowNonTsExtensions=!0;const n=this.compilerOptions;this.compilerOptions=e,this.setInternalCompilerOptionsForEmittingJsFiles(),null==(t=this.noDtsResolutionProject)||t.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()),_d(n,e)&&(this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.resolutionCache.onChangesAffectModuleResolution(),this.moduleSpecifierCache.clear()),this.markAsDirty()}}setWatchOptions(e){this.watchOptions=e}getWatchOptions(){return this.watchOptions}setTypeAcquisition(e){e&&(this.typeAcquisition=this.removeLocalTypingsFromTypeAcquisition(e))}getTypeAcquisition(){return this.typeAcquisition||{}}getChangesSinceVersion(e,t){var n,r;const i=t?e=>We(e.entries(),([e,t])=>({fileName:e,isSourceOfProjectReferenceRedirect:t})):e=>We(e.keys());this.isInitialLoadPending()||Lge(this);const o={projectName:this.getProjectName(),version:this.projectProgramVersion,isInferred:Wme(this),options:this.getCompilationSettings(),languageServiceDisabled:!this.languageServiceEnabled,lastFileExceededProgramSize:this.lastFileExceededProgramSize},a=this.updatedFileNames;if(this.updatedFileNames=void 0,this.lastReportedFileNames&&e===this.lastReportedVersion){if(this.projectProgramVersion===this.lastReportedVersion&&!a)return{info:o,projectErrors:this.getGlobalProjectErrors()};const e=this.lastReportedFileNames,r=(null==(n=this.externalFiles)?void 0:n.map(e=>({fileName:nme(e),isSourceOfProjectReferenceRedirect:!1})))||Zfe,s=Ke(this.getFileNamesWithRedirectInfo(!!t).concat(r),e=>e.fileName,e=>e.isSourceOfProjectReferenceRedirect),c=new Map,l=new Map,_=a?We(a.keys()):[],u=[];return md(s,(n,r)=>{e.has(r)?t&&n!==e.get(r)&&u.push({fileName:r,isSourceOfProjectReferenceRedirect:n}):c.set(r,n)}),md(e,(e,t)=>{s.has(t)||l.set(t,e)}),this.lastReportedFileNames=s,this.lastReportedVersion=this.projectProgramVersion,{info:o,changes:{added:i(c),removed:i(l),updated:t?_.map(e=>({fileName:e,isSourceOfProjectReferenceRedirect:this.isSourceOfProjectReferenceRedirect(e)})):_,updatedRedirects:t?u:void 0},projectErrors:this.getGlobalProjectErrors()}}{const e=this.getFileNamesWithRedirectInfo(!!t),n=(null==(r=this.externalFiles)?void 0:r.map(e=>({fileName:nme(e),isSourceOfProjectReferenceRedirect:!1})))||Zfe,i=e.concat(n);return this.lastReportedFileNames=Ke(i,e=>e.fileName,e=>e.isSourceOfProjectReferenceRedirect),this.lastReportedVersion=this.projectProgramVersion,{info:o,files:t?i:i.map(e=>e.fileName),projectErrors:this.getGlobalProjectErrors()}}}removeRoot(e){this.rootFilesMap.delete(e.path)}isSourceOfProjectReferenceRedirect(e){return!!this.program&&this.program.isSourceOfProjectReferenceRedirect(e)}getGlobalPluginSearchPaths(){return[...this.projectService.pluginProbeLocations,Yo(this.projectService.getExecutingFilePath(),"../../..")]}enableGlobalPlugins(e){if(!this.projectService.globalPlugins.length)return;const t=this.projectService.host;if(!t.require&&!t.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const n=this.getGlobalPluginSearchPaths();for(const t of this.projectService.globalPlugins)t&&(e.plugins&&e.plugins.some(e=>e.name===t)||(this.projectService.logger.info(`Loading global plugin ${t}`),this.enablePlugin({name:t,global:!0},n)))}enablePlugin(e,t){this.projectService.requestEnablePlugin(this,e,t)}enableProxy(e,t){try{if("function"!=typeof e)return void this.projectService.logger.info(`Skipped loading plugin ${t.name} because it did not expose a proper factory function`);const n={config:t,project:this,languageService:this.languageService,languageServiceHost:this,serverHost:this.projectService.host,session:this.projectService.session},r=e({typescript:Ofe}),i=r.create(n);for(const e of Object.keys(this.languageService))e in i||(this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${e} in created LS. Patching.`),i[e]=this.languageService[e]);this.projectService.logger.info("Plugin validation succeeded"),this.languageService=i,this.plugins.push({name:t.name,module:r})}catch(e){this.projectService.logger.info(`Plugin activation failed: ${e}`)}}onPluginConfigurationChanged(e,t){this.plugins.filter(t=>t.name===e).forEach(e=>{e.module.onConfigurationChanged&&e.module.onConfigurationChanged(t)})}refreshDiagnostics(){this.projectService.sendProjectsUpdatedInBackgroundEvent()}getPackageJsonsVisibleToFile(e,t){return 0!==this.projectService.serverMode?Zfe:this.projectService.getPackageJsonsVisibleToFile(e,this,t)}getNearestAncestorDirectoryWithPackageJson(e){return this.projectService.getNearestAncestorDirectoryWithPackageJson(e)}getPackageJsonsForAutoImport(e){return this.getPackageJsonsVisibleToFile(Yo(this.currentDirectory,CV),e)}getPackageJsonCache(){return this.projectService.packageJsonCache}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=E0(this))}clearCachedExportInfoMap(){var e;null==(e=this.exportMapCache)||e.clear()}getModuleSpecifierCache(){return this.moduleSpecifierCache}includePackageJsonAutoImports(){return 0!==this.projectService.includePackageJsonAutoImports()&&this.languageServiceEnabled&&!YZ(this.currentDirectory)&&this.isDefaultProjectForOpenFiles()?this.projectService.includePackageJsonAutoImports():0}getHostForAutoImportProvider(){var e,t;return this.program?{fileExists:this.program.fileExists,directoryExists:this.program.directoryExists,realpath:this.program.realpath||(null==(e=this.projectService.host.realpath)?void 0:e.bind(this.projectService.host)),getCurrentDirectory:this.getCurrentDirectory.bind(this),readFile:this.projectService.host.readFile.bind(this.projectService.host),getDirectories:this.projectService.host.getDirectories.bind(this.projectService.host),trace:null==(t=this.projectService.host.trace)?void 0:t.bind(this.projectService.host),useCaseSensitiveFileNames:this.program.useCaseSensitiveFileNames(),readDirectory:this.projectService.host.readDirectory.bind(this.projectService.host)}:this.projectService.host}getPackageJsonAutoImportProvider(){var e,t,n;if(!1===this.autoImportProviderHost)return;if(0!==this.projectService.serverMode)return void(this.autoImportProviderHost=!1);if(this.autoImportProviderHost)return Lge(this.autoImportProviderHost),this.autoImportProviderHost.isEmpty()?(this.autoImportProviderHost.close(),void(this.autoImportProviderHost=void 0)):this.autoImportProviderHost.getCurrentProgram();const r=this.includePackageJsonAutoImports();if(r){null==(e=cr)||e.push(cr.Phase.Session,"getPackageJsonAutoImportProvider");const i=tr();if(this.autoImportProviderHost=qme.create(r,this,this.getHostForAutoImportProvider(),this.documentRegistry),this.autoImportProviderHost)return Lge(this.autoImportProviderHost),this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider",tr()-i),null==(t=cr)||t.pop(),this.autoImportProviderHost.getCurrentProgram();null==(n=cr)||n.pop()}}isDefaultProjectForOpenFiles(){return!!md(this.projectService.openFiles,(e,t)=>this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(t))===this)}watchNodeModulesForPackageJsonChanges(e){return this.projectService.watchPackageJsonsInNodeModules(e,this)}getIncompleteCompletionsCache(){return this.projectService.getIncompleteCompletionsCache()}getNoDtsResolutionProject(e){return Tn.assert(0===this.projectService.serverMode),this.noDtsResolutionProject||(this.noDtsResolutionProject=new Jme(this.projectService,this.documentRegistry,this.getCompilerOptionsForNoDtsResolutionProject(),this.currentDirectory)),this.noDtsResolutionProject.rootFile!==e&&(this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject,[e]),this.noDtsResolutionProject.rootFile=e),this.noDtsResolutionProject}runWithTemporaryFileUpdate(e,t,n){var r,i,o,a;const s=this.program,c=Tn.checkDefined(null==(r=this.program)?void 0:r.getSourceFile(e),"Expected file to be part of program"),l=Tn.checkDefined(c.getText());null==(i=this.getScriptInfo(e))||i.editContent(0,l.length,t),this.updateGraph();try{n(this.program,s,null==(o=this.program)?void 0:o.getSourceFile(e))}finally{null==(a=this.getScriptInfo(e))||a.editContent(0,this.program.getSourceFile(e).getText().length,l)}}getCompilerOptionsForNoDtsResolutionProject(){return{...this.getCompilerOptions(),noDtsResolution:!0,allowJs:!0,maxNodeModuleJsDepth:3,diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:p,lib:p,noLib:!0}}};var Bme=class extends Rme{constructor(e,t,n,r,i,o,a){super(e.newInferredProjectName(),0,e,t,void 0,void 0,n,!1,r,e.host,o),this._isJsInferredProject=!1,this.typeAcquisition=a,this.projectRootPath=i&&e.toCanonicalFileName(i),i||e.useSingleInferredProject||(this.canonicalCurrentDirectory=e.toCanonicalFileName(this.currentDirectory)),this.enableGlobalPlugins(this.getCompilerOptions())}toggleJsInferredProject(e){e!==this._isJsInferredProject&&(this._isJsInferredProject=e,this.setCompilerOptions())}setCompilerOptions(e){if(!e&&!this.getCompilationSettings())return;const t=PQ(e||this.getCompilationSettings());this._isJsInferredProject&&"number"!=typeof t.maxNodeModuleJsDepth?t.maxNodeModuleJsDepth=2:this._isJsInferredProject||(t.maxNodeModuleJsDepth=void 0),t.allowJs=!0,super.setCompilerOptions(t)}addRoot(e){Tn.assert(e.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(e),!this._isJsInferredProject&&e.isJavaScript()?this.toggleJsInferredProject(!0):this.isOrphan()&&this._isJsInferredProject&&!e.isJavaScript()&&this.toggleJsInferredProject(!1),super.addRoot(e)}removeRoot(e){this.projectService.stopWatchingConfigFilesForScriptInfo(e),super.removeRoot(e),!this.isOrphan()&&this._isJsInferredProject&&e.isJavaScript()&&T(this.getRootScriptInfos(),e=>!e.isJavaScript())&&this.toggleJsInferredProject(!1)}isOrphan(){return!this.hasRoots()}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||1===this.getRootScriptInfos().length}close(){h(this.getRootScriptInfos(),e=>this.projectService.stopWatchingConfigFilesForScriptInfo(e)),super.close()}getTypeAcquisition(){return this.typeAcquisition||{enable:Ome(this),include:p,exclude:p}}},Jme=class extends Rme{constructor(e,t,n,r){super(e.newAuxiliaryProjectName(),4,e,t,!1,void 0,n,!1,void 0,e.host,r)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},zme=class e extends Rme{constructor(e,t,n,r){super(e.projectService.newAutoImportProviderProjectName(),3,e.projectService,n,!1,void 0,r,!1,e.getWatchOptions(),e.projectService.host,e.currentDirectory),this.hostProject=e,this.rootFileNames=t,this.useSourceOfProjectReferenceRedirect=nt(this.hostProject,this.hostProject.useSourceOfProjectReferenceRedirect),this.getParsedCommandLine=nt(this.hostProject,this.hostProject.getParsedCommandLine)}static getRootFileNames(e,t,n,r){var i,o;if(!e)return p;const a=t.getCurrentProgram();if(!a)return p;const s=tr();let c,l;const _=Yo(t.currentDirectory,CV),u=t.getPackageJsonsForAutoImport(Yo(t.currentDirectory,_));for(const e of u)null==(i=e.dependencies)||i.forEach((e,t)=>y(t)),null==(o=e.peerDependencies)||o.forEach((e,t)=>y(t));let d=0;if(c){const i=t.getSymlinkCache();for(const o of We(c.keys())){if(2===e&&d>this.maxDependencies)return t.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`),p;const s=hM(o,t.currentDirectory,r,n,a.getModuleResolutionCache());if(s){const e=v(s,a,i);if(e){d+=g(e);continue}}if(!h([t.currentDirectory,t.getGlobalTypingsCacheLocation()],e=>{if(e){const t=hM(`@types/${o}`,e,r,n,a.getModuleResolutionCache());if(t){const e=v(t,a,i);return d+=g(e),!0}}})&&(s&&r.allowJs&&r.maxNodeModuleJsDepth)){const e=v(s,a,i,!0);d+=g(e)}}}const f=a.getResolvedProjectReferences();let m=0;return(null==f?void 0:f.length)&&t.projectService.getHostPreferences().includeCompletionsForModuleExports&&f.forEach(e=>{if(null==e?void 0:e.commandLine.options.outFile)m+=g(b([lT(e.commandLine.options.outFile,".d.ts")]));else if(e){const n=kt(()=>sU(e.commandLine,!t.useCaseSensitiveFileNames()));m+=g(b($(e.commandLine.fileNames,r=>lO(r)||Ro(r,".json")||a.getSourceFile(r)?void 0:Zq(r,e.commandLine,!t.useCaseSensitiveFileNames(),n))))}}),(null==l?void 0:l.size)&&t.log(`AutoImportProviderProject: found ${l.size} root files in ${d} dependencies ${m} referenced projects in ${tr()-s} ms`),l?We(l.values()):p;function g(e){return(null==e?void 0:e.length)?(l??(l=new Set),e.forEach(e=>l.add(e)),1):0}function y(e){ln(e,"@types/")||(c||(c=new Set)).add(e)}function v(e,i,o,a){var s;const c=aR(e,r,n,i.getModuleResolutionCache(),a);if(c){const r=null==(s=n.realpath)?void 0:s.call(n,e.packageDirectory),i=r?t.toPath(r):void 0,a=i&&i!==t.toPath(e.packageDirectory);return a&&o.setSymlinkedDirectory(e.packageDirectory,{real:aa(r),realPath:aa(i)}),b(c,a?t=>t.replace(e.packageDirectory,r):void 0)}}function b(e,t){return $(e,e=>{const n=t?t(e):e;if(!(a.getSourceFile(n)||t&&a.getSourceFile(e)))return n})}}static create(t,n,r,i){if(0===t)return;const o={...n.getCompilerOptions(),...this.compilerOptionsOverrides},a=this.getRootFileNames(t,n,r,o);return a.length?new e(n,a,i,o):void 0}isEmpty(){return!ee(this.rootFileNames)}isOrphan(){return!0}updateGraph(){let t=this.rootFileNames;t||(t=e.getRootFileNames(this.hostProject.includePackageJsonAutoImports(),this.hostProject,this.hostProject.getHostForAutoImportProvider(),this.getCompilationSettings())),this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this,t),this.rootFileNames=t;const n=this.getCurrentProgram(),r=super.updateGraph();return n&&n!==this.getCurrentProgram()&&this.hostProject.clearCachedExportInfoMap(),r}scheduleInvalidateResolutionsOfFailedLookupLocations(){}hasRoots(){var e;return!!(null==(e=this.rootFileNames)?void 0:e.length)}markAsDirty(){this.rootFileNames=void 0,super.markAsDirty()}getScriptFileNames(){return this.rootFileNames||p}getLanguageService(){throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.")}onAutoImportProviderSettingsChanged(){throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.")}onPackageJsonChange(){throw new Error("package.json changes should be notified on an AutoImportProvider's host project")}getHostForAutoImportProvider(){throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.")}getProjectReferences(){return this.hostProject.getProjectReferences()}includePackageJsonAutoImports(){return 0}getSymlinkCache(){return this.hostProject.getSymlinkCache()}getModuleResolutionCache(){var e;return null==(e=this.hostProject.getCurrentProgram())?void 0:e.getModuleResolutionCache()}};zme.maxDependencies=10,zme.compilerOptionsOverrides={diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:p,lib:p,noLib:!0};var qme=zme,Ume=class extends Rme{constructor(e,t,n,r,i,o){super(e,1,n,r,!1,void 0,{},!1,void 0,i,Vo(e)),this.canonicalConfigFilePath=t,this.openFileWatchTriggered=new Map,this.canConfigFileJsonReportNoInputFiles=!1,this.isInitialLoadPending=gt,this.sendLoadingProjectFinish=!1,this.pendingUpdateLevel=2,this.pendingUpdateReason=o}setCompilerHost(e){this.compilerHost=e}getCompilerHost(){return this.compilerHost}useSourceOfProjectReferenceRedirect(){return this.languageServiceEnabled}getParsedCommandLine(e){const t=na(e),n=this.projectService.toCanonicalFileName(t);let r=this.projectService.configFileExistenceInfoCache.get(n);return r||this.projectService.configFileExistenceInfoCache.set(n,r={exists:this.projectService.host.fileExists(t)}),this.projectService.ensureParsedConfigUptoDate(t,n,r,this),this.languageServiceEnabled&&0===this.projectService.serverMode&&this.projectService.watchWildcards(t,r,this),r.exists?r.config.parsedCommandLine:void 0}onReleaseParsedCommandLine(e){this.releaseParsedConfig(this.projectService.toCanonicalFileName(na(e)))}releaseParsedConfig(e){this.projectService.stopWatchingWildCards(e,this),this.projectService.releaseParsedConfig(e,this)}updateGraph(){if(this.deferredClose)return!1;const e=this.dirty;this.isInitialLoadPending=mt;const t=this.pendingUpdateLevel;let n;switch(this.pendingUpdateLevel=0,t){case 1:this.openFileWatchTriggered.clear(),n=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();const e=Tn.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,e),n=!0;break;default:n=super.updateGraph()}return this.compilerHost=void 0,this.projectService.sendProjectLoadingFinishEvent(this),this.projectService.sendProjectTelemetry(this),2!==t&&(!n||e&&this.triggerFileForConfigFileDiag&&2!==this.getCurrentProgram().structureIsReused)?this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1):this.triggerFileForConfigFileDiag=void 0,n}getCachedDirectoryStructureHost(){return this.directoryStructureHost}getConfigFilePath(){return this.getProjectName()}getProjectReferences(){return this.projectReferences}updateReferences(e){this.projectReferences=e,this.potentialProjectReferences=void 0}setPotentialProjectReference(e){Tn.assert(this.isInitialLoadPending()),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(e)}getResolvedProjectReferenceToRedirect(e){const t=this.getCurrentProgram();return t&&t.getResolvedProjectReferenceToRedirect(e)}forEachResolvedProjectReference(e){var t;return null==(t=this.getCurrentProgram())?void 0:t.forEachResolvedProjectReference(e)}enablePluginsWithOptions(e){var t;if(this.plugins.length=0,!(null==(t=e.plugins)?void 0:t.length)&&!this.projectService.globalPlugins.length)return;const n=this.projectService.host;if(!n.require&&!n.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const r=this.getGlobalPluginSearchPaths();if(this.projectService.allowLocalPluginLoads){const e=Vo(this.canonicalConfigFilePath);this.projectService.logger.info(`Local plugin loading enabled; adding ${e} to search paths`),r.unshift(e)}if(e.plugins)for(const t of e.plugins)this.enablePlugin(t,r);return this.enableGlobalPlugins(e)}getGlobalProjectErrors(){return O(this.projectErrors,e=>!e.file)||Zfe}getAllProjectErrors(){return this.projectErrors||Zfe}setProjectErrors(e){this.projectErrors=e}close(){this.projectService.configFileExistenceInfoCache.forEach((e,t)=>this.releaseParsedConfig(t)),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}markAsDirty(){this.deferredClose||super.markAsDirty()}isSolution(){return 0===this.getRootFilesMap().size&&!this.canConfigFileJsonReportNoInputFiles}isOrphan(){return!!this.deferredClose}getEffectiveTypeRoots(){return _M(this.getCompilationSettings(),this)||[]}updateErrorOnNoInputFiles(e){fL(e,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,this.canConfigFileJsonReportNoInputFiles)}},Vme=class extends Rme{constructor(e,t,n,r,i,o,a,s){super(e,2,t,n,!0,i,r,o,s,t.host,Vo(a||Xo(e))),this.externalProjectName=e,this.compileOnSaveEnabled=o,this.excludedFiles=[],this.enableGlobalPlugins(this.getCompilerOptions())}updateGraph(){const e=super.updateGraph();return this.projectService.sendProjectTelemetry(this),e}getExcludedFiles(){return this.excludedFiles}};function Wme(e){return 0===e.projectKind}function $me(e){return 1===e.projectKind}function Hme(e){return 2===e.projectKind}function Kme(e){return 3===e.projectKind||4===e.projectKind}function Gme(e){return $me(e)&&!!e.deferredClose}var Xme=20971520,Qme=4194304,Yme="projectsUpdatedInBackground",Zme="projectLoadingStart",ege="projectLoadingFinish",tge="largeFileReferenced",nge="configFileDiag",rge="projectLanguageServiceState",ige="projectInfo",oge="openFileInfo",age="createFileWatcher",sge="createDirectoryWatcher",cge="closeFileWatcher",lge="*ensureProjectForOpenFiles*";function _ge(e){const t=new Map;for(const n of e)if("object"==typeof n.type){const e=n.type;e.forEach(e=>{Tn.assert("number"==typeof e)}),t.set(n.name,e)}return t}var uge=_ge(FO),dge=_ge(wO),pge=new Map(Object.entries({none:0,block:1,smart:2})),fge={jquery:{match:/jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i,types:["jquery"]},WinJS:{match:/^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,exclude:[["^",1,"/.*"]],types:["winjs"]},Kendo:{match:/^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i,exclude:[["^",1,"/.*"]],types:["kendo-ui"]},"Office Nuget":{match:/^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,exclude:[["^",1,"/.*"]],types:["office"]},References:{match:/^(.*\/_references\.js)$/i,exclude:[["^",1,"$"]]}};function mge(e){return _t(e.indentStyle)&&(e.indentStyle=pge.get(e.indentStyle.toLowerCase()),Tn.assert(void 0!==e.indentStyle)),e}function gge(e){return uge.forEach((t,n)=>{const r=e[n];_t(r)&&(e[n]=t.get(r.toLowerCase()))}),e}function hge(e,t){let n,r;return wO.forEach(i=>{const o=e[i.name];if(void 0===o)return;const a=dge.get(i.name);(n||(n={}))[i.name]=a?_t(o)?a.get(o.toLowerCase()):o:wL(i,o,t||"",r||(r=[]))}),n&&{watchOptions:n,errors:r}}function yge(e){let t;return WO.forEach(n=>{const r=e[n.name];void 0!==r&&((t||(t={}))[n.name]=r)}),t}function vge(e){return _t(e)?bge(e):e}function bge(e){switch(e){case"JS":return 1;case"JSX":return 2;case"TS":return 3;case"TSX":return 4;default:return 0}}function xge(e){const{lazyConfiguredProjectsFromExternalProject:t,...n}=e;return n}var Sge={getFileName:e=>e,getScriptKind:(e,t)=>{let n;if(t){const r=Ho(e);r&&ee(t,e=>e.extension===r&&(n=e.scriptKind,!0))}return n},hasMixedContent:(e,t)=>ee(t,t=>t.isMixedContent&&Ro(e,t.extension))},kge={getFileName:e=>e.fileName,getScriptKind:e=>vge(e.scriptKind),hasMixedContent:e=>!!e.hasMixedContent};function Tge(e,t){for(const n of t)if(n.getProjectName()===e)return n}var Cge={close:ft};function wge(e,t){if(t&&!Nge(e))return t.get(e.path)}function Nge(e){return!!e.configFileInfo}var Dge=(e=>(e[e.Find=0]="Find",e[e.Create=1]="Create",e[e.Reload=2]="Reload",e))(Dge||{});function Pge(e,t,n,r,i,o,a,s){var c;const l=null==(c=e.getCurrentProgram())?void 0:c.getResolvedProjectReferences();if(!l)return;const _=t?e.getResolvedProjectReferenceToRedirect(t):void 0;if(_){const t=nme(_.sourceFile.fileName),n=e.projectService.findConfiguredProjectByProjectName(t,o);if(n){const e=d(n);if(e)return e}else if(0!==r){const t=Ege(l,e.getCompilerOptions(),(e,t)=>_===e?u(e,t):void 0,r,e.projectService);if(t)return t}}return Ege(l,e.getCompilerOptions(),(e,t)=>_!==e?u(e,t):void 0,r,e.projectService);function u(t,c){const l=e.projectService.findCreateOrReloadConfiguredProject(nme(t.sourceFile.fileName),c,i,o,a,s);return l&&(c===r?n(l.project,l.sentConfigFileDiag):d(l.project))}function d(e){let t=!1;switch(r){case 1:t=Rge(e,a);break;case 2:t=e.projectService.reloadConfiguredProjectClearingSemanticCache(e,i,s);break;case 0:break;default:Tn.assertNever(r)}const o=n(e,t);if(o)return o}}function Ege(e,t,n,r,i,o){const a=t.disableReferencedProjectLoad?0:r;return h(e,e=>{if(!e)return;const t=nme(e.sourceFile.fileName),r=i.toCanonicalFileName(t),s=null==o?void 0:o.get(r);if(void 0!==s&&s>=a)return;const c=n(e,a);return c||((o||(o=new Map)).set(r,a),e.references&&Ege(e.references,e.commandLine.options,n,a,i,o))})}function Fge(e,t){return e.potentialProjectReferences&&gd(e.potentialProjectReferences,t)}function Age(e,t,n){const r=n&&e.projectService.configuredProjects.get(n);return r&&t(r)}function Ige(e,t){return function(e,t,n,r){return e.getCurrentProgram()?e.forEachResolvedProjectReference(t):e.isInitialLoadPending()?Fge(e,r):h(e.getProjectReferences(),n)}(e,n=>Age(e,t,n.sourceFile.path),n=>Age(e,t,e.toPath(UV(n))),n=>Age(e,t,n))}function Oge(e,t){return`${_t(t)?`Config: ${t} `:t?`Project: ${t.getProjectName()} `:""}WatchType: ${e}`}function jge(e){return!e.isScriptOpen()&&void 0!==e.mTime}function Lge(e){return e.invalidateResolutionsOfFailedLookupLocations(),e.dirty&&!e.updateGraph()}function Mge(e,t,n){if(!n&&(e.invalidateResolutionsOfFailedLookupLocations(),!e.dirty))return!1;e.triggerFileForConfigFileDiag=t;const r=e.pendingUpdateLevel;if(e.updateGraph(),!e.triggerFileForConfigFileDiag&&!n)return 2===r;const i=e.projectService.sendConfigFileDiagEvent(e,t,n);return e.triggerFileForConfigFileDiag=void 0,i}function Rge(e,t){if(t){if(Mge(e,t,!1))return!0}else Lge(e);return!1}function Bge(e){return`Creating possible configured project for ${e.fileName} to open`}function Jge(e){return`User requested reload projects: ${e}`}function zge(e){$me(e)&&(e.projectOptions=!0)}function qge(e){let t=1;return()=>e(t++)}function Uge(){return{idToCallbacks:new Map,pathToId:new Map}}function Vge(e,t){if(!t||!e.eventHandler||!e.session)return;const n=Uge(),r=Uge(),i=Uge();let o=1;return e.session.addProtocolHandler("watchChange",e=>{var t;return ct(t=e.arguments)?t.forEach(s):s(t),{responseRequired:!1}}),{watchFile:function(e,t){return a(n,e,t,t=>({eventName:age,data:{id:t,path:e}}))},watchDirectory:function(e,t,n){return a(n?i:r,e,t,t=>({eventName:sge,data:{id:t,path:e,recursive:!!n,ignoreUpdate:!e.endsWith("/node_modules")||void 0}}))},getCurrentDirectory:()=>e.host.getCurrentDirectory(),useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames};function a({pathToId:t,idToCallbacks:n},r,i,a){const s=e.toPath(r);let c=t.get(s);c||t.set(s,c=o++);let l=n.get(c);return l||(n.set(c,l=new Set),e.eventHandler(a(c))),l.add(i),{close(){const r=n.get(c);(null==r?void 0:r.delete(i))&&(r.size||(n.delete(c),t.delete(s),e.eventHandler({eventName:cge,data:{id:c}})))}}}function s({id:e,created:t,deleted:n,updated:r}){c(e,t,0),c(e,n,2),c(e,r,1)}function c(e,t,o){(null==t?void 0:t.length)&&(l(n,e,t,(e,t)=>e(t,o)),l(r,e,t,(e,t)=>e(t)),l(i,e,t,(e,t)=>e(t)))}function l(e,t,n,r){var i;null==(i=e.idToCallbacks.get(t))||i.forEach(e=>{n.forEach(t=>r(e,Xo(t)))})}}var Wge=class e{constructor(e){var t;this.filenameToScriptInfo=new Map,this.nodeModulesWatchers=new Map,this.filenameToScriptInfoVersion=new Map,this.allJsFilesForOpenFileTelemetry=new Map,this.externalProjectToConfiguredProjectMap=new Map,this.externalProjects=[],this.inferredProjects=[],this.configuredProjects=new Map,this.newInferredProjectName=qge(sme),this.newAutoImportProviderProjectName=qge(cme),this.newAuxiliaryProjectName=qge(lme),this.openFiles=new Map,this.configFileForOpenFiles=new Map,this.rootOfInferredProjects=new Set,this.openFilesWithNonRootedDiskPath=new Map,this.compilerOptionsForInferredProjectsPerProjectRoot=new Map,this.watchOptionsForInferredProjectsPerProjectRoot=new Map,this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map,this.projectToSizeMap=new Map,this.configFileExistenceInfoCache=new Map,this.safelist=fge,this.legacySafelist=new Map,this.pendingProjectUpdates=new Map,this.pendingEnsureProjectForOpenFiles=!1,this.seenProjects=new Map,this.sharedExtendedConfigFileWatchers=new Map,this.extendedConfigCache=new Map,this.baseline=ft,this.verifyDocumentRegistry=ft,this.verifyProgram=ft,this.onProjectCreation=ft,this.host=e.host,this.logger=e.logger,this.cancellationToken=e.cancellationToken,this.useSingleInferredProject=e.useSingleInferredProject,this.useInferredProjectPerProjectRoot=e.useInferredProjectPerProjectRoot,this.typingsInstaller=e.typingsInstaller||Pme,this.throttleWaitMilliseconds=e.throttleWaitMilliseconds,this.eventHandler=e.eventHandler,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.globalPlugins=e.globalPlugins||Zfe,this.pluginProbeLocations=e.pluginProbeLocations||Zfe,this.allowLocalPluginLoads=!!e.allowLocalPluginLoads,this.typesMapLocation=void 0===e.typesMapLocation?Yo(Vo(this.getExecutingFilePath()),"typesMap.json"):e.typesMapLocation,this.session=e.session,this.jsDocParsingMode=e.jsDocParsingMode,void 0!==e.serverMode?this.serverMode=e.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=rt()),this.currentDirectory=nme(this.host.getCurrentDirectory()),this.toCanonicalFileName=on(this.host.useCaseSensitiveFileNames),this.globalCacheLocationDirectoryPath=this.typingsInstaller.globalTypingsCacheLocation?aa(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)):void 0,this.throttledOperations=new ume(this.host,this.logger),this.typesMapLocation?this.loadTypesMap():this.logger.info("No types map provided; using the default"),this.typingsInstaller.attach(this),this.typingsCache=new Fme(this.typingsInstaller),this.hostConfiguration={formatCodeOptions:FG(this.host.newLine),preferences:kG,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=t1(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);const n=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0,r=0!==n?e=>this.logger.info(e):ft;this.packageJsonCache=Xge(this),this.watchFactory=0!==this.serverMode?{watchFile:b$,watchDirectory:b$}:LU(Vge(this,e.canUseWatchEvents)||this.host,n,r,Oge),null==(t=e.incrementalVerifier)||t.call(e,this)}toPath(e){return ia(e,this.currentDirectory,this.toCanonicalFileName)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(e){return ta(e,this.host.getCurrentDirectory())}setDocument(e,t,n){Tn.checkDefined(this.getScriptInfoForPath(t)).cacheSourceFile={key:e,sourceFile:n}}getDocument(e,t){const n=this.getScriptInfoForPath(t);return n&&n.cacheSourceFile&&n.cacheSourceFile.key===e?n.cacheSourceFile.sourceFile:void 0}ensureInferredProjectsUpToDate_TestOnly(){this.ensureProjectStructuresUptoDate()}getCompilerOptionsForInferredProjects(){return this.compilerOptionsForInferredProjects}onUpdateLanguageServiceStateForProject(e,t){if(!this.eventHandler)return;const n={eventName:rge,data:{project:e,languageServiceEnabled:t}};this.eventHandler(n)}loadTypesMap(){try{const e=this.host.readFile(this.typesMapLocation);if(void 0===e)return void this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`);const t=JSON.parse(e);for(const e of Object.keys(t.typesMap))t.typesMap[e].match=new RegExp(t.typesMap[e].match,"i");this.safelist=t.typesMap;for(const e in t.simpleMap)Be(t.simpleMap,e)&&this.legacySafelist.set(e,t.simpleMap[e].toLowerCase())}catch(e){this.logger.info(`Error loading types map: ${e}`),this.safelist=fge,this.legacySafelist.clear()}}updateTypingsForProject(e){const t=this.findProject(e.projectName);if(t)switch(e.kind){case VK:return void t.updateTypingFiles(this.typingsCache.updateTypingsForProject(e.projectName,e.compilerOptions,e.typeAcquisition,e.unresolvedImports,e.typings));case WK:return void this.typingsCache.enqueueInstallTypingsForProject(t,t.lastCachedUnresolvedImportsList,!0)}}watchTypingLocations(e){var t;null==(t=this.findProject(e.projectName))||t.watchTypingLocations(e.files)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule(lge,2500,()=>{0!==this.pendingProjectUpdates.size?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())}))}delayUpdateProjectGraph(e){if(Gme(e))return;if(e.markAsDirty(),Kme(e))return;const t=e.getProjectName();this.pendingProjectUpdates.set(t,e),this.throttledOperations.schedule(t,250,()=>{this.pendingProjectUpdates.delete(t)&&Lge(e)})}hasPendingProjectUpdate(e){return this.pendingProjectUpdates.has(e.getProjectName())}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;const e={eventName:Yme,data:{openFiles:We(this.openFiles.keys(),e=>this.getScriptInfoForPath(e).fileName)}};this.eventHandler(e)}sendLargeFileReferencedEvent(e,t){if(!this.eventHandler)return;const n={eventName:tge,data:{file:e,fileSize:t,maxFileSize:Qme}};this.eventHandler(n)}sendProjectLoadingStartEvent(e,t){if(!this.eventHandler)return;e.sendLoadingProjectFinish=!0;const n={eventName:Zme,data:{project:e,reason:t}};this.eventHandler(n)}sendProjectLoadingFinishEvent(e){if(!this.eventHandler||!e.sendLoadingProjectFinish)return;e.sendLoadingProjectFinish=!1;const t={eventName:ege,data:{project:e}};this.eventHandler(t)}sendPerformanceEvent(e,t){this.performanceEventHandler&&this.performanceEventHandler({kind:e,durationMs:t})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(e){this.delayUpdateProjectGraph(e),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectGraphs(e,t){if(e.length){for(const n of e)t&&n.clearSourceMapperCache(),this.delayUpdateProjectGraph(n);this.delayEnsureProjectForOpenFiles()}}setCompilerOptionsForInferredProjects(e,t){Tn.assert(void 0===t||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");const n=gge(e),r=hge(e,t),i=yge(e);n.allowNonTsExtensions=!0;const o=t&&this.toCanonicalFileName(t);o?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(o,n),this.watchOptionsForInferredProjectsPerProjectRoot.set(o,r||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(o,i)):(this.compilerOptionsForInferredProjects=n,this.watchOptionsForInferredProjects=r,this.typeAcquisitionForInferredProjects=i);for(const e of this.inferredProjects)(o?e.projectRootPath!==o:e.projectRootPath&&this.compilerOptionsForInferredProjectsPerProjectRoot.has(e.projectRootPath))||(e.setCompilerOptions(n),e.setTypeAcquisition(i),e.setWatchOptions(null==r?void 0:r.watchOptions),e.setProjectErrors(null==r?void 0:r.errors),e.compileOnSaveEnabled=n.compileOnSave,e.markAsDirty(),this.delayUpdateProjectGraph(e));this.delayEnsureProjectForOpenFiles()}findProject(e){if(void 0!==e)return ame(e)?Tge(e,this.inferredProjects):this.findExternalProjectByProjectName(e)||this.findConfiguredProjectByProjectName(nme(e))}forEachProject(e){this.externalProjects.forEach(e),this.configuredProjects.forEach(e),this.inferredProjects.forEach(e)}forEachEnabledProject(e){this.forEachProject(t=>{!t.isOrphan()&&t.languageServiceEnabled&&e(t)})}getDefaultProjectForFile(e,t){return t?this.ensureDefaultProjectForFile(e):this.tryGetDefaultProjectForFile(e)}tryGetDefaultProjectForFile(e){const t=_t(e)?this.getScriptInfoForNormalizedPath(e):e;return t&&!t.isOrphan()?t.getDefaultProject():void 0}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e){var t;const n=_t(e)?this.getScriptInfoForNormalizedPath(e):e;if(n)return(null==(t=this.pendingOpenFileProjectUpdates)?void 0:t.delete(n.path))&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(n,1),n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,this.openFiles.get(n.path))),this.tryGetDefaultProjectForFile(n)}ensureDefaultProjectForFile(e){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e)||this.doEnsureDefaultProjectForFile(e)}doEnsureDefaultProjectForFile(e){this.ensureProjectStructuresUptoDate();const t=_t(e)?this.getScriptInfoForNormalizedPath(e):e;return t?t.getDefaultProject():(this.logErrorForScriptInfoNotFound(_t(e)?e:e.fileName),Xfe.ThrowNoProject())}getScriptInfoEnsuringProjectsUptoDate(e){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(e)}ensureProjectStructuresUptoDate(){let e=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();const t=t=>{e=Lge(t)||e};this.externalProjects.forEach(t),this.configuredProjects.forEach(t),this.inferredProjects.forEach(t),e&&this.ensureProjectForOpenFiles()}getFormatCodeOptions(e){const t=this.getScriptInfoForNormalizedPath(e);return t&&t.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}getPreferences(e){const t=this.getScriptInfoForNormalizedPath(e);return{...this.hostConfiguration.preferences,...t&&t.getPreferences()}}getHostFormatCodeOptions(){return this.hostConfiguration.formatCodeOptions}getHostPreferences(){return this.hostConfiguration.preferences}onSourceFileChanged(e,t){Tn.assert(!e.isScriptOpen()),2===t?this.handleDeletedFile(e,!0):(e.deferredDelete&&(e.deferredDelete=void 0),e.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e))}handleSourceMapProjects(e){if(e.sourceMapFilePath)if(_t(e.sourceMapFilePath)){const t=this.getScriptInfoForPath(e.sourceMapFilePath);this.delayUpdateSourceInfoProjects(null==t?void 0:t.sourceInfos)}else this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos);this.delayUpdateSourceInfoProjects(e.sourceInfos),e.declarationInfoPath&&this.delayUpdateProjectsOfScriptInfoPath(e.declarationInfoPath)}delayUpdateSourceInfoProjects(e){e&&e.forEach((e,t)=>this.delayUpdateProjectsOfScriptInfoPath(t))}delayUpdateProjectsOfScriptInfoPath(e){const t=this.getScriptInfoForPath(e);t&&this.delayUpdateProjectGraphs(t.containingProjects,!0)}handleDeletedFile(e,t){Tn.assert(!e.isScriptOpen()),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e),e.detachAllProjects(),t?(e.delayReloadNonMixedContentFile(),e.deferredDelete=!0):this.deleteScriptInfo(e)}watchWildcardDirectory(e,t,n,r){let i=this.watchFactory.watchDirectory(e,t=>{const i=this.toPath(t),a=r.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(t,i);if("package.json"===Wo(i)&&!YZ(i)&&(a&&a.fileExists||!a&&this.host.fileExists(t))){const e=this.getNormalizedAbsolutePath(t);this.logger.info(`Config: ${n} Detected new package.json: ${e}`),this.packageJsonCache.addOrUpdate(e,i),this.watchPackageJsonFile(e,i,o)}const s=this.findConfiguredProjectByProjectName(n);AU({watchedDirPath:this.toPath(e),fileOrDirectory:t,fileOrDirectoryPath:i,configFileName:n,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:r.parsedCommandLine.options,program:(null==s?void 0:s.getCurrentProgram())||r.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:e=>this.logger.info(e),toPath:e=>this.toPath(e),getScriptKind:s?e=>s.getScriptKind(e):void 0})||(2!==r.updateLevel&&(r.updateLevel=1),r.projects.forEach((e,t)=>{var r;if(!e)return;const o=this.getConfiguredProjectByCanonicalConfigFilePath(t);if(!o)return;if(s!==o&&this.getHostPreferences().includeCompletionsForModuleExports){const e=this.toPath(n);C(null==(r=o.getCurrentProgram())?void 0:r.getResolvedProjectReferences(),t=>(null==t?void 0:t.sourceFile.path)===e)&&o.markAutoImportProviderAsDirty()}const a=s===o?1:0;if(!(o.pendingUpdateLevel>a))if(this.openFiles.has(i)){if(Tn.checkDefined(this.getScriptInfoForPath(i)).isAttached(o)){const e=Math.max(a,o.openFileWatchTriggered.get(i)||0);o.openFileWatchTriggered.set(i,e)}else o.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(o)}else o.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(o)}))},t,this.getWatchOptionsFromProjectWatchOptions(r.parsedCommandLine.watchOptions,Vo(n)),S$.WildcardDirectory,n);const o={packageJsonWatches:void 0,close(){var e;i&&(i.close(),i=void 0,null==(e=o.packageJsonWatches)||e.forEach(e=>{e.projects.delete(o),e.close()}),o.packageJsonWatches=void 0)}};return o}delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,t){const n=this.configFileExistenceInfoCache.get(e);if(!(null==n?void 0:n.config))return!1;let r=!1;return n.config.updateLevel=2,n.config.projects.forEach((n,i)=>{var o;const a=this.getConfiguredProjectByCanonicalConfigFilePath(i);if(a)if(r=!0,i===e){if(a.isInitialLoadPending())return;a.pendingUpdateLevel=2,a.pendingUpdateReason=t,this.delayUpdateProjectGraph(a),a.markAutoImportProviderAsDirty()}else{const t=this.toPath(e);a.resolutionCache.removeResolutionsFromProjectReferenceRedirects(t),this.delayUpdateProjectGraph(a),this.getHostPreferences().includeCompletionsForModuleExports&&C(null==(o=a.getCurrentProgram())?void 0:o.getResolvedProjectReferences(),e=>(null==e?void 0:e.sourceFile.path)===t)&&a.markAutoImportProviderAsDirty()}}),r}onConfigFileChanged(e,t,n){const r=this.configFileExistenceInfoCache.get(t),i=this.getConfiguredProjectByCanonicalConfigFilePath(t),o=null==i?void 0:i.deferredClose;2===n?(r.exists=!1,i&&(i.deferredClose=!0)):(r.exists=!0,o&&(i.deferredClose=void 0,i.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(t,"Change in config file detected");const a=new Set(i?[i]:void 0);this.openFiles.forEach((t,n)=>{var i,o;const s=this.configFileForOpenFiles.get(n);if(!(null==(i=r.openFilesImpactedByConfigFile)?void 0:i.has(n)))return;this.configFileForOpenFiles.delete(n);const c=this.getScriptInfoForPath(n),l=this.getConfigFileNameForFile(c,!1);if(!l)return;const _=this.findConfiguredProjectByProjectName(l)??this.createConfiguredProject(l,`Change in config file ${e} detected, ${Bge(c)}`);(null==(o=this.pendingOpenFileProjectUpdates)?void 0:o.has(n))||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(n,s),X(a,_)&&_.isInitialLoadPending()&&this.delayUpdateProjectGraph(_)}),this.delayEnsureProjectForOpenFiles()}removeProject(e){switch(this.logger.info("`remove Project::"),e.print(!0,!0,!1),e.close(),Tn.shouldAssert(1)&&this.filenameToScriptInfo.forEach(t=>Tn.assert(!t.isAttached(e),"Found script Info still attached to project",()=>`${e.projectName}: ScriptInfos still attached: ${JSON.stringify(We(H(this.filenameToScriptInfo.values(),t=>t.isAttached(e)?{fileName:t.fileName,projects:t.containingProjects.map(e=>e.projectName),hasMixedContent:t.hasMixedContent}:void 0)),void 0," ")}`)),this.pendingProjectUpdates.delete(e.getProjectName()),e.projectKind){case 2:rn(this.externalProjects,e),this.projectToSizeMap.delete(e.getProjectName());break;case 1:this.configuredProjects.delete(e.canonicalConfigFilePath),this.projectToSizeMap.delete(e.canonicalConfigFilePath);break;case 0:rn(this.inferredProjects,e)}}assignOrphanScriptInfoToInferredProject(e,t){Tn.assert(e.isOrphan());const n=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(e.isDynamic?t||this.currentDirectory:Vo(Ao(e.fileName)?e.fileName:ta(e.fileName,t?this.getNormalizedAbsolutePath(t):this.currentDirectory)));if(n.addRoot(e),e.containingProjects[0]!==n&&(en(e.containingProjects,n),e.containingProjects.unshift(n)),n.updateGraph(),!this.useSingleInferredProject&&!n.projectRootPath)for(const e of this.inferredProjects){if(e===n||e.isOrphan())continue;const t=e.getRootScriptInfos();Tn.assert(1===t.length||!!e.projectRootPath),1===t.length&&h(t[0].containingProjects,e=>e!==t[0].containingProjects[0]&&!e.isOrphan())&&e.removeFile(t[0],!0,!0)}return n}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,e)})}closeOpenFile(e,t){var n;const r=!e.isDynamic&&this.host.fileExists(e.fileName);e.close(r),this.stopWatchingConfigFilesForScriptInfo(e);const i=this.toCanonicalFileName(e.fileName);this.openFilesWithNonRootedDiskPath.get(i)===e&&this.openFilesWithNonRootedDiskPath.delete(i);let o=!1;for(const t of e.containingProjects){if($me(t)){e.hasMixedContent&&e.registerFileUpdate();const n=t.openFileWatchTriggered.get(e.path);void 0!==n&&(t.openFileWatchTriggered.delete(e.path),t.pendingUpdateLevelthis.onConfigFileChanged(e,t,r),2e3,this.getWatchOptionsFromProjectWatchOptions(null==(i=null==(r=null==o?void 0:o.config)?void 0:r.parsedCommandLine)?void 0:i.watchOptions,Vo(e)),S$.ConfigFile,n));const a=o.config.projects;a.set(n.canonicalConfigFilePath,a.get(n.canonicalConfigFilePath)||!1)}releaseParsedConfig(e,t){var n,r,i;const o=this.configFileExistenceInfoCache.get(e);(null==(n=o.config)?void 0:n.projects.delete(t.canonicalConfigFilePath))&&((null==(r=o.config)?void 0:r.projects.size)||(o.config=void 0,DU(e,this.sharedExtendedConfigFileWatchers),Tn.checkDefined(o.watcher),(null==(i=o.openFilesImpactedByConfigFile)?void 0:i.size)?o.inferredProjectRoots?LW(Ko(Vo(e)))||(o.watcher.close(),o.watcher=Cge):(o.watcher.close(),o.watcher=void 0):(o.watcher.close(),this.configFileExistenceInfoCache.delete(e))))}stopWatchingConfigFilesForScriptInfo(e){if(0!==this.serverMode)return;const t=this.rootOfInferredProjects.delete(e),n=e.isScriptOpen();n&&!t||this.forEachConfigFileLocation(e,r=>{var i,o,a;const s=this.configFileExistenceInfoCache.get(r);if(s){if(n){if(!(null==(i=null==s?void 0:s.openFilesImpactedByConfigFile)?void 0:i.has(e.path)))return}else if(!(null==(o=s.openFilesImpactedByConfigFile)?void 0:o.delete(e.path)))return;t&&(s.inferredProjectRoots--,!s.watcher||s.config||s.inferredProjectRoots||(s.watcher.close(),s.watcher=void 0)),(null==(a=s.openFilesImpactedByConfigFile)?void 0:a.size)||s.config||(Tn.assert(!s.watcher),this.configFileExistenceInfoCache.delete(r))}})}startWatchingConfigFilesForInferredProjectRoot(e){0===this.serverMode&&(Tn.assert(e.isScriptOpen()),this.rootOfInferredProjects.add(e),this.forEachConfigFileLocation(e,(t,n)=>{let r=this.configFileExistenceInfoCache.get(t);r?r.inferredProjectRoots=(r.inferredProjectRoots??0)+1:(r={exists:this.host.fileExists(n),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(t,r)),(r.openFilesImpactedByConfigFile??(r.openFilesImpactedByConfigFile=new Set)).add(e.path),r.watcher||(r.watcher=LW(Ko(Vo(t)))?this.watchFactory.watchFile(n,(e,r)=>this.onConfigFileChanged(n,t,r),2e3,this.hostConfiguration.watchOptions,S$.ConfigFileForInferredRoot):Cge)}))}forEachConfigFileLocation(e,t){if(0!==this.serverMode)return;Tn.assert(!e.containingProjects||this.openFiles.has(e.path));const n=this.openFiles.get(e.path);if(Tn.checkDefined(this.getScriptInfo(e.path)).isDynamic)return;let r=Vo(e.fileName);const i=()=>ma(n,r,this.currentDirectory,!this.host.useCaseSensitiveFileNames),o=!n||!i();let a=!Nge(e);do{if(a){const e=rme(r,this.currentDirectory,this.toCanonicalFileName),n=ime(Yo(r,"tsconfig.json"));let i=t(Yo(e,"tsconfig.json"),n);if(i)return n;const o=ime(Yo(r,"jsconfig.json"));if(i=t(Yo(e,"jsconfig.json"),o),i)return o;if(ka(e))break}const e=ime(Vo(r));if(e===r)break;r=e,a=!0}while(o||i())}findDefaultConfiguredProject(e){var t;return e.isScriptOpen()?null==(t=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,0))?void 0:t.defaultProject:void 0}getConfigFileNameForFileFromCache(e,t){if(t){const t=wge(e,this.pendingOpenFileProjectUpdates);if(void 0!==t)return t}return wge(e,this.configFileForOpenFiles)}setConfigFileNameForFileInCache(e,t){this.openFiles.has(e.path)&&(Nge(e)||this.configFileForOpenFiles.set(e.path,t||!1))}getConfigFileNameForFile(e,t){const n=this.getConfigFileNameForFileFromCache(e,t);if(void 0!==n)return n||void 0;if(t)return;const r=this.forEachConfigFileLocation(e,(t,n)=>this.configFileExists(n,t,e));return this.logger.info(`getConfigFileNameForFile:: File: ${e.fileName} ProjectRootPath: ${this.openFiles.get(e.path)}:: Result: ${r}`),this.setConfigFileNameForFileInCache(e,r),r}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.externalProjects.forEach(Kge),this.configuredProjects.forEach(Kge),this.inferredProjects.forEach(Kge),this.logger.info("Open files: "),this.openFiles.forEach((e,t)=>{const n=this.getScriptInfoForPath(t);this.logger.info(`\tFileName: ${n.fileName} ProjectRootPath: ${e}`),this.logger.info(`\t\tProjects: ${n.containingProjects.map(e=>e.getProjectName())}`)}),this.logger.endGroup())}findConfiguredProjectByProjectName(e,t){const n=this.toCanonicalFileName(e),r=this.getConfiguredProjectByCanonicalConfigFilePath(n);return t?r:(null==r?void 0:r.deferredClose)?void 0:r}getConfiguredProjectByCanonicalConfigFilePath(e){return this.configuredProjects.get(e)}findExternalProjectByProjectName(e){return Tge(e,this.externalProjects)}getFilenameForExceededTotalSizeLimitForNonTsFiles(e,t,n,r){if(t&&t.disableSizeLimit||!this.host.getFileSize)return;let i=Xme;this.projectToSizeMap.set(e,0),this.projectToSizeMap.forEach(e=>i-=e||0);let o=0;for(const e of n){const t=r.getFileName(e);if(!Yk(t)&&(o+=this.host.getFileSize(t),o>Xme||o>i)){const e=n.map(e=>r.getFileName(e)).filter(e=>!Yk(e)).map(e=>({name:e,size:this.host.getFileSize(e)})).sort((e,t)=>t.size-e.size).slice(0,5);return this.logger.info(`Non TS file size exceeded limit (${o}). Largest files: ${e.map(e=>`${e.name}:${e.size}`).join(", ")}`),t}}this.projectToSizeMap.set(e,o)}createExternalProject(e,t,n,r,i){const o=gge(n),a=hge(n,Vo(Xo(e))),s=new Vme(e,this,this.documentRegistry,o,this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e,o,t,kge),void 0===n.compileOnSave||n.compileOnSave,void 0,null==a?void 0:a.watchOptions);return s.setProjectErrors(null==a?void 0:a.errors),s.excludedFiles=i,this.addFilesToNonInferredProject(s,t,kge,r),this.externalProjects.push(s),s}sendProjectTelemetry(e){if(this.seenProjects.has(e.projectName))return void zge(e);if(this.seenProjects.set(e.projectName,!0),!this.eventHandler||!this.host.createSHA256Hash)return void zge(e);const t=$me(e)?e.projectOptions:void 0;zge(e);const n={projectId:this.host.createSHA256Hash(e.projectName),fileStats:Ime(e.getScriptInfos(),!0),compilerOptions:WL(e.getCompilationSettings()),typeAcquisition:function({enable:e,include:t,exclude:n}){return{enable:e,include:void 0!==t&&0!==t.length,exclude:void 0!==n&&0!==n.length}}(e.getTypeAcquisition()),extends:t&&t.configHasExtendsProperty,files:t&&t.configHasFilesProperty,include:t&&t.configHasIncludeProperty,exclude:t&&t.configHasExcludeProperty,compileOnSave:e.compileOnSaveEnabled,configFileName:function(){if(!$me(e))return"other";return pme(e.getConfigFilePath())||"other"}(),projectType:e instanceof Vme?"external":"configured",languageServiceEnabled:e.languageServiceEnabled,version:u};this.eventHandler({eventName:ige,data:n})}addFilesToNonInferredProject(e,t,n,r){this.updateNonInferredProjectFiles(e,t,n),e.setTypeAcquisition(r),e.markAsDirty()}createConfiguredProject(e,t){var n;null==(n=cr)||n.instant(cr.Phase.Session,"createConfiguredProject",{configFilePath:e}),this.logger.info(`Creating configuration project ${e}`);const r=this.toCanonicalFileName(e);let i=this.configFileExistenceInfoCache.get(r);i?i.exists=!0:this.configFileExistenceInfoCache.set(r,i={exists:!0}),i.config||(i.config={cachedDirectoryStructureHost:CU(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});const o=new Ume(e,r,this,this.documentRegistry,i.config.cachedDirectoryStructureHost,t);return Tn.assert(!this.configuredProjects.has(r)),this.configuredProjects.set(r,o),this.createConfigFileWatcherForParsedConfig(e,r,o),o}loadConfiguredProject(e,t){var n,r;null==(n=cr)||n.push(cr.Phase.Session,"loadConfiguredProject",{configFilePath:e.canonicalConfigFilePath}),this.sendProjectLoadingStartEvent(e,t);const i=na(e.getConfigFilePath()),o=this.ensureParsedConfigUptoDate(i,e.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath),e),a=o.config.parsedCommandLine;Tn.assert(!!a.fileNames);const s=a.options;e.projectOptions||(e.projectOptions={configHasExtendsProperty:void 0!==a.raw.extends,configHasFilesProperty:void 0!==a.raw.files,configHasIncludeProperty:void 0!==a.raw.include,configHasExcludeProperty:void 0!==a.raw.exclude}),e.canConfigFileJsonReportNoInputFiles=pL(a.raw),e.setProjectErrors(a.options.configFile.parseDiagnostics),e.updateReferences(a.projectReferences);const c=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.canonicalConfigFilePath,s,a.fileNames,Sge);c?(e.disableLanguageService(c),this.configFileExistenceInfoCache.forEach((t,n)=>this.stopWatchingWildCards(n,e))):(e.setCompilerOptions(s),e.setWatchOptions(a.watchOptions),e.enableLanguageService(),this.watchWildcards(i,o,e)),e.enablePluginsWithOptions(s);const l=a.fileNames.concat(e.getExternalFiles(2));this.updateRootAndOptionsOfNonInferredProject(e,l,Sge,s,a.typeAcquisition,a.compileOnSave,a.watchOptions),null==(r=cr)||r.pop()}ensureParsedConfigUptoDate(e,t,n,r){var i,o,a;if(n.config){if(!n.config.updateLevel)return n;if(1===n.config.updateLevel)return this.reloadFileNamesOfParsedConfig(e,n.config),n}const s=(null==(i=n.config)?void 0:i.cachedDirectoryStructureHost)||CU(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),c=hj(e,e=>this.host.readFile(e)),l=eO(e,_t(c)?c:""),_=l.parseDiagnostics;_t(c)||_.push(c);const u=Vo(e),d=Yj(l,s,u,void 0,e,void 0,this.hostConfiguration.extraFileExtensions,this.extendedConfigCache);d.errors.length&&_.push(...d.errors),this.logger.info(`Config: ${e} : ${JSON.stringify({rootNames:d.fileNames,options:d.options,watchOptions:d.watchOptions,projectReferences:d.projectReferences},void 0," ")}`);const p=null==(o=n.config)?void 0:o.parsedCommandLine;return n.config?(n.config.parsedCommandLine=d,n.config.watchedDirectoriesStale=!0,n.config.updateLevel=void 0):n.config={parsedCommandLine:d,cachedDirectoryStructureHost:s,projects:new Map},p||DT(this.getWatchOptionsFromProjectWatchOptions(void 0,u),this.getWatchOptionsFromProjectWatchOptions(d.watchOptions,u))||(null==(a=n.watcher)||a.close(),n.watcher=void 0),this.createConfigFileWatcherForParsedConfig(e,t,r),NU(t,d.options,this.sharedExtendedConfigFileWatchers,(t,n)=>this.watchFactory.watchFile(t,()=>{var e;PU(this.extendedConfigCache,n,e=>this.toPath(e));let r=!1;null==(e=this.sharedExtendedConfigFileWatchers.get(n))||e.projects.forEach(e=>{r=this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,`Change in extended config file ${t} detected`)||r}),r&&this.delayEnsureProjectForOpenFiles()},2e3,this.hostConfiguration.watchOptions,S$.ExtendedConfigFile,e),e=>this.toPath(e)),n}watchWildcards(e,{exists:t,config:n},r){if(n.projects.set(r.canonicalConfigFilePath,!0),t){if(n.watchedDirectories&&!n.watchedDirectoriesStale)return;n.watchedDirectoriesStale=!1,FU(n.watchedDirectories||(n.watchedDirectories=new Map),n.parsedCommandLine.wildcardDirectories,(t,r)=>this.watchWildcardDirectory(t,r,e,n))}else{if(n.watchedDirectoriesStale=!1,!n.watchedDirectories)return;Px(n.watchedDirectories,RU),n.watchedDirectories=void 0}}stopWatchingWildCards(e,t){const n=this.configFileExistenceInfoCache.get(e);n.config&&n.config.projects.get(t.canonicalConfigFilePath)&&(n.config.projects.set(t.canonicalConfigFilePath,!1),md(n.config.projects,yt)||(n.config.watchedDirectories&&(Px(n.config.watchedDirectories,RU),n.config.watchedDirectories=void 0),n.config.watchedDirectoriesStale=void 0))}updateNonInferredProjectFiles(e,t,n){var r;const i=e.getRootFilesMap(),o=new Map;for(const a of t){const t=n.getFileName(a),s=nme(t);let c;if(Nme(s)||e.fileExists(t)){const t=n.getScriptKind(a,this.hostConfiguration.extraFileExtensions),r=n.hasMixedContent(a,this.hostConfiguration.extraFileExtensions),o=Tn.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(s,e.currentDirectory,t,r,e.directoryStructureHost,!1));c=o.path;const l=i.get(c);l&&l.info===o?l.fileName=s:(e.addRoot(o,s),o.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(o))}else{c=rme(s,this.currentDirectory,this.toCanonicalFileName);const t=i.get(c);t?((null==(r=t.info)?void 0:r.path)===c&&(e.removeFile(t.info,!1,!0),t.info=void 0),t.fileName=s):i.set(c,{fileName:s})}o.set(c,!0)}i.size>o.size&&i.forEach((t,n)=>{o.has(n)||(t.info?e.removeFile(t.info,e.fileExists(t.info.fileName),!0):i.delete(n))})}updateRootAndOptionsOfNonInferredProject(e,t,n,r,i,o,a){e.setCompilerOptions(r),e.setWatchOptions(a),void 0!==o&&(e.compileOnSaveEnabled=o),this.addFilesToNonInferredProject(e,t,n,i)}reloadFileNamesOfConfiguredProject(e){const t=this.reloadFileNamesOfParsedConfig(e.getConfigFilePath(),this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath).config);return e.updateErrorOnNoInputFiles(t),this.updateNonInferredProjectFiles(e,t.concat(e.getExternalFiles(1)),Sge),e.markAsDirty(),e.updateGraph()}reloadFileNamesOfParsedConfig(e,t){if(void 0===t.updateLevel)return t.parsedCommandLine.fileNames;Tn.assert(1===t.updateLevel);const n=IL(t.parsedCommandLine.options.configFile.configFileSpecs,Vo(e),t.parsedCommandLine.options,t.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return t.parsedCommandLine={...t.parsedCommandLine,fileNames:n},n}setFileNamesOfAutpImportProviderOrAuxillaryProject(e,t){this.updateNonInferredProjectFiles(e,t,Sge)}reloadConfiguredProjectClearingSemanticCache(e,t,n){return!!X(n,e)&&(this.clearSemanticCache(e),this.reloadConfiguredProject(e,Jge(t)),!0)}reloadConfiguredProject(e,t){e.isInitialLoadPending=mt,e.pendingUpdateReason=void 0,e.pendingUpdateLevel=0;e.getCachedDirectoryStructureHost().clearCache(),this.loadConfiguredProject(e,t),Mge(e,e.triggerFileForConfigFileDiag??e.getConfigFilePath(),!0)}clearSemanticCache(e){e.originalConfiguredProjects=void 0,e.resolutionCache.clear(),e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram(),e.markAsDirty()}sendConfigFileDiagEvent(e,t,n){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;const r=e.getLanguageService().getCompilerOptionsDiagnostics();return r.push(...e.getAllProjectErrors()),!(!n&&r.length===(e.configDiagDiagnosticsReported??0))&&(e.configDiagDiagnosticsReported=r.length,this.eventHandler({eventName:nge,data:{configFileName:e.getConfigFilePath(),diagnostics:r,triggerFile:t??e.getConfigFilePath()}}),!0)}getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t){if(!this.useInferredProjectPerProjectRoot||e.isDynamic&&void 0===t)return;if(t){const e=this.toCanonicalFileName(t);for(const t of this.inferredProjects)if(t.projectRootPath===e)return t;return this.createInferredProject(t,!1,t)}let n;for(const t of this.inferredProjects)t.projectRootPath&&ma(t.projectRootPath,e.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(n&&n.projectRootPath.length>t.projectRootPath.length||(n=t));return n}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&void 0===this.inferredProjects[0].projectRootPath?this.inferredProjects[0]:this.createInferredProject("",!0)}getOrCreateSingleInferredWithoutProjectRoot(e){Tn.assert(!this.useSingleInferredProject);const t=this.toCanonicalFileName(this.getNormalizedAbsolutePath(e));for(const e of this.inferredProjects)if(!e.projectRootPath&&e.isOrphan()&&e.canonicalCurrentDirectory===t)return e;return this.createInferredProject(e)}createInferredProject(e,t,n){const r=n&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(n)||this.compilerOptionsForInferredProjects;let i,o;n&&(i=this.watchOptionsForInferredProjectsPerProjectRoot.get(n),o=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(n)),void 0===i&&(i=this.watchOptionsForInferredProjects),void 0===o&&(o=this.typeAcquisitionForInferredProjects),i=i||void 0;const a=new Bme(this,this.documentRegistry,r,null==i?void 0:i.watchOptions,n,e,o);return a.setProjectErrors(null==i?void 0:i.errors),t?this.inferredProjects.unshift(a):this.inferredProjects.push(a),a}getOrCreateScriptInfoNotOpenedByClient(e,t,n,r){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(nme(e),t,void 0,void 0,n,r)}getScriptInfo(e){return this.getScriptInfoForNormalizedPath(nme(e))}getScriptInfoOrConfig(e){const t=nme(e),n=this.getScriptInfoForNormalizedPath(t);if(n)return n;const r=this.configuredProjects.get(this.toPath(e));return r&&r.getCompilerOptions().configFile}logErrorForScriptInfoNotFound(e){const t=We(H(this.filenameToScriptInfo.entries(),e=>e[1].deferredDelete?void 0:e),([e,t])=>({path:e,fileName:t.fileName}));this.logger.msg(`Could not find file ${JSON.stringify(e)}.\nAll files are: ${JSON.stringify(t)}`,"Err")}getSymlinkedProjects(e){let t;if(this.realpathToScriptInfos){const t=e.getRealpathIfDifferent();t&&h(this.realpathToScriptInfos.get(t),n),h(this.realpathToScriptInfos.get(e.path),n)}return t;function n(n){if(n!==e)for(const r of n.containingProjects)!r.languageServiceEnabled||r.isOrphan()||r.getCompilerOptions().preserveSymlinks||e.isAttached(r)||(t?md(t,(e,t)=>t!==n.path&&E(e,r))||t.add(n.path,r):(t=rt(),t.add(n.path,r)))}}watchClosedScriptInfo(e){if(Tn.assert(!e.fileWatcher),!(e.isDynamicOrHasMixedContent()||this.globalCacheLocationDirectoryPath&&ln(e.path,this.globalCacheLocationDirectoryPath))){const t=e.fileName.indexOf("/node_modules/");this.host.getModifiedTime&&-1!==t?(e.mTime=this.getModifiedTime(e),e.fileWatcher=this.watchClosedScriptInfoInNodeModules(e.fileName.substring(0,t))):e.fileWatcher=this.watchFactory.watchFile(e.fileName,(t,n)=>this.onSourceFileChanged(e,n),500,this.hostConfiguration.watchOptions,S$.ClosedScriptInfo)}}createNodeModulesWatcher(e,t){let n=this.watchFactory.watchDirectory(e,e=>{var n;const i=OW(this.toPath(e));if(!i)return;const o=Wo(i);if(!(null==(n=r.affectedModuleSpecifierCacheProjects)?void 0:n.size)||"package.json"!==o&&"node_modules"!==o||r.affectedModuleSpecifierCacheProjects.forEach(e=>{var t;null==(t=e.getModuleSpecifierCache())||t.clear()}),r.refreshScriptInfoRefCount)if(t===i)this.refreshScriptInfosInDirectory(t);else{const e=this.filenameToScriptInfo.get(i);e?jge(e)&&this.refreshScriptInfo(e):Mo(i)||this.refreshScriptInfosInDirectory(i)}},1,this.hostConfiguration.watchOptions,S$.NodeModules);const r={refreshScriptInfoRefCount:0,affectedModuleSpecifierCacheProjects:void 0,close:()=>{var e;!n||r.refreshScriptInfoRefCount||(null==(e=r.affectedModuleSpecifierCacheProjects)?void 0:e.size)||(n.close(),n=void 0,this.nodeModulesWatchers.delete(t))}};return this.nodeModulesWatchers.set(t,r),r}watchPackageJsonsInNodeModules(e,t){var n;const r=this.toPath(e),i=this.nodeModulesWatchers.get(r)||this.createNodeModulesWatcher(e,r);return Tn.assert(!(null==(n=i.affectedModuleSpecifierCacheProjects)?void 0:n.has(t))),(i.affectedModuleSpecifierCacheProjects||(i.affectedModuleSpecifierCacheProjects=new Set)).add(t),{close:()=>{var e;null==(e=i.affectedModuleSpecifierCacheProjects)||e.delete(t),i.close()}}}watchClosedScriptInfoInNodeModules(e){const t=e+"/node_modules",n=this.toPath(t),r=this.nodeModulesWatchers.get(n)||this.createNodeModulesWatcher(t,n);return r.refreshScriptInfoRefCount++,{close:()=>{r.refreshScriptInfoRefCount--,r.close()}}}getModifiedTime(e){return(this.host.getModifiedTime(e.fileName)||to).getTime()}refreshScriptInfo(e){const t=this.getModifiedTime(e);if(t!==e.mTime){const n=po(e.mTime,t);e.mTime=t,this.onSourceFileChanged(e,n)}}refreshScriptInfosInDirectory(e){e+=wo,this.filenameToScriptInfo.forEach(t=>{jge(t)&&ln(t.path,e)&&this.refreshScriptInfo(t)})}stopWatchingScriptInfo(e){e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(e,t,n,r,i,o){if(Ao(e)||Nme(e))return this.getOrCreateScriptInfoWorker(e,t,!1,void 0,n,!!r,i,o);const a=this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e));return a||void 0}getOrCreateScriptInfoForNormalizedPath(e,t,n,r,i,o){return this.getOrCreateScriptInfoWorker(e,this.currentDirectory,t,n,r,!!i,o,!1)}getOrCreateScriptInfoWorker(e,t,n,r,i,o,a,s){Tn.assert(void 0===r||n,"ScriptInfo needs to be opened by client to be able to set its user defined content");const c=rme(e,t,this.toCanonicalFileName);let l=this.filenameToScriptInfo.get(c);if(l){if(l.deferredDelete){if(Tn.assert(!l.isDynamic),!n&&!(a||this.host).fileExists(e))return s?l:void 0;l.deferredDelete=void 0}}else{const r=Nme(e);if(Tn.assert(Ao(e)||r||n,"",()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:We(this.openFilesWithNonRootedDiskPath.keys())})}\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`),Tn.assert(!Ao(e)||this.currentDirectory===t||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(e)),"",()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:We(this.openFilesWithNonRootedDiskPath.keys())})}\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names`),Tn.assert(!r||this.currentDirectory===t||this.useInferredProjectPerProjectRoot,"",()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:We(this.openFilesWithNonRootedDiskPath.keys())})}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`),!n&&!r&&!(a||this.host).fileExists(e))return;l=new Dme(this.host,e,i,o,c,this.filenameToScriptInfoVersion.get(c)),this.filenameToScriptInfo.set(l.path,l),this.filenameToScriptInfoVersion.delete(l.path),n?Ao(e)||r&&this.currentDirectory===t||this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(e),l):this.watchClosedScriptInfo(l)}return n&&(this.stopWatchingScriptInfo(l),l.open(r),o&&l.registerFileUpdate()),l}getScriptInfoForNormalizedPath(e){return!Ao(e)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e))||this.getScriptInfoForPath(rme(e,this.currentDirectory,this.toCanonicalFileName))}getScriptInfoForPath(e){const t=this.filenameToScriptInfo.get(e);return t&&t.deferredDelete?void 0:t}getDocumentPositionMapper(e,t,n){const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!1);if(!r)return void(n&&e.addGeneratedFileWatch(t,n));if(r.getSnapshot(),_t(r.sourceMapFilePath)){const t=this.getScriptInfoForPath(r.sourceMapFilePath);if(t&&(t.getSnapshot(),void 0!==t.documentPositionMapper))return t.sourceInfos=this.addSourceInfoToSourceMap(n,e,t.sourceInfos),t.documentPositionMapper?t.documentPositionMapper:void 0;r.sourceMapFilePath=void 0}else{if(r.sourceMapFilePath)return void(r.sourceMapFilePath.sourceInfos=this.addSourceInfoToSourceMap(n,e,r.sourceMapFilePath.sourceInfos));if(void 0!==r.sourceMapFilePath)return}let i,o=(t,n)=>{const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!0);if(i=r||n,!r||r.deferredDelete)return;const o=r.getSnapshot();return void 0!==r.documentPositionMapper?r.documentPositionMapper:HQ(o)};const a=e.projectName,s=z1({getCanonicalFileName:this.toCanonicalFileName,log:e=>this.logger.info(e),getSourceFileLike:e=>this.getSourceFileLike(e,a,r)},r.fileName,r.textStorage.getLineInfo(),o);return o=void 0,i?_t(i)?r.sourceMapFilePath={watcher:this.addMissingSourceMapFile(e.currentDirectory===this.currentDirectory?i:ta(i,e.currentDirectory),r.path),sourceInfos:this.addSourceInfoToSourceMap(n,e)}:(r.sourceMapFilePath=i.path,i.declarationInfoPath=r.path,i.deferredDelete||(i.documentPositionMapper=s||!1),i.sourceInfos=this.addSourceInfoToSourceMap(n,e,i.sourceInfos)):r.sourceMapFilePath=!1,s}addSourceInfoToSourceMap(e,t,n){if(e){const r=this.getOrCreateScriptInfoNotOpenedByClient(e,t.currentDirectory,t.directoryStructureHost,!1);(n||(n=new Set)).add(r.path)}return n}addMissingSourceMapFile(e,t){return this.watchFactory.watchFile(e,()=>{const e=this.getScriptInfoForPath(t);e&&e.sourceMapFilePath&&!_t(e.sourceMapFilePath)&&(this.delayUpdateProjectGraphs(e.containingProjects,!0),this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos),e.closeSourceMapFileWatcher())},2e3,this.hostConfiguration.watchOptions,S$.MissingSourceMapFile)}getSourceFileLike(e,t,n){const r=t.projectName?t:this.findProject(t);if(r){const t=r.toPath(e),n=r.getSourceFile(t);if(n&&n.resolvedPath===t)return n}const i=this.getOrCreateScriptInfoNotOpenedByClient(e,(r||this).currentDirectory,r?r.directoryStructureHost:this.host,!1);if(i){if(n&&_t(n.sourceMapFilePath)&&i!==n){const e=this.getScriptInfoForPath(n.sourceMapFilePath);e&&(e.sourceInfos??(e.sourceInfos=new Set)).add(i.path)}return i.cacheSourceFile?i.cacheSourceFile.sourceFile:(i.sourceFileLike||(i.sourceFileLike={get text(){return Tn.fail("shouldnt need text"),""},getLineAndCharacterOfPosition:e=>{const t=i.positionToLineOffset(e);return{line:t.line-1,character:t.offset-1}},getPositionOfLineAndCharacter:(e,t,n)=>i.lineOffsetToPosition(e+1,t+1,n)}),i.sourceFileLike)}}setPerformanceEventHandler(e){this.performanceEventHandler=e}setHostConfiguration(e){var t;if(e.file){const t=this.getScriptInfoForNormalizedPath(nme(e.file));t&&(t.setOptions(mge(e.formatOptions),e.preferences),this.logger.info(`Host configuration update for file ${e.file}`))}else{if(void 0!==e.hostInfo&&(this.hostConfiguration.hostInfo=e.hostInfo,this.logger.info(`Host information ${e.hostInfo}`)),e.formatOptions&&(this.hostConfiguration.formatCodeOptions={...this.hostConfiguration.formatCodeOptions,...mge(e.formatOptions)},this.logger.info("Format host information updated")),e.preferences){const{lazyConfiguredProjectsFromExternalProject:t,includePackageJsonAutoImports:n,includeCompletionsForModuleExports:r}=this.hostConfiguration.preferences;this.hostConfiguration.preferences={...this.hostConfiguration.preferences,...e.preferences},t&&!this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject&&this.externalProjectToConfiguredProjectMap.forEach(e=>e.forEach(e=>{e.deferredClose||e.isClosed()||2!==e.pendingUpdateLevel||this.hasPendingProjectUpdate(e)||e.updateGraph()})),n===e.preferences.includePackageJsonAutoImports&&!!r==!!e.preferences.includeCompletionsForModuleExports||this.forEachProject(e=>{e.onAutoImportProviderSettingsChanged()})}if(e.extraFileExtensions&&(this.hostConfiguration.extraFileExtensions=e.extraFileExtensions,this.reloadProjects(),this.logger.info("Host file extension mappings updated")),e.watchOptions){const n=null==(t=hge(e.watchOptions))?void 0:t.watchOptions,r=iL(n,this.currentDirectory);this.hostConfiguration.watchOptions=r,this.hostConfiguration.beforeSubstitution=r===n?void 0:n,this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`)}}}getWatchOptions(e){return this.getWatchOptionsFromProjectWatchOptions(e.getWatchOptions(),e.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(e,t){const n=this.hostConfiguration.beforeSubstitution?iL(this.hostConfiguration.beforeSubstitution,t):this.hostConfiguration.watchOptions;return e&&n?{...n,...e}:e||n}closeLog(){this.logger.close()}reloadProjects(){this.logger.info("reload projects."),this.filenameToScriptInfo.forEach(e=>{this.openFiles.has(e.path)||e.fileWatcher&&this.onSourceFileChanged(e,this.host.fileExists(e.fileName)?e.deferredDelete?0:1:2)}),this.pendingProjectUpdates.forEach((e,t)=>{this.throttledOperations.cancel(t),this.pendingProjectUpdates.delete(t)}),this.throttledOperations.cancel(lge),this.pendingOpenFileProjectUpdates=void 0,this.pendingEnsureProjectForOpenFiles=!1,this.configFileExistenceInfoCache.forEach(e=>{e.config&&(e.config.updateLevel=2)}),this.configFileForOpenFiles.clear(),this.externalProjects.forEach(e=>{this.clearSemanticCache(e),e.updateGraph()});const e=new Set,t=new Set;this.externalProjectToConfiguredProjectMap.forEach((n,r)=>{const i=`Reloading configured project in external project: ${r}`;n.forEach(n=>{this.getHostPreferences().lazyConfiguredProjectsFromExternalProject?(n.isInitialLoadPending()||(this.clearSemanticCache(n),n.pendingUpdateLevel=2,n.pendingUpdateReason=Jge(i)),t.add(n)):this.reloadConfiguredProjectClearingSemanticCache(n,i,e)})}),this.openFiles.forEach((n,r)=>{const i=this.getScriptInfoForPath(r);C(i.containingProjects,Hme)||this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(i,2,e,t)}),t.forEach(t=>e.add(t)),this.inferredProjects.forEach(e=>this.clearSemanticCache(e)),this.ensureProjectForOpenFiles(),this.cleanupProjectsAndScriptInfos(e,new Set(this.openFiles.keys()),new Set(this.externalProjectToConfiguredProjectMap.keys())),this.logger.info("After reloading projects.."),this.printProjects()}removeRootOfInferredProjectIfNowPartOfOtherProject(e){Tn.assert(e.containingProjects.length>0);const t=e.containingProjects[0];!t.isOrphan()&&Wme(t)&&t.isRoot(e)&&h(e.containingProjects,e=>e!==t&&!e.isOrphan())&&t.removeFile(e,!0,!0)}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();const e=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,null==e||e.forEach((e,t)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(t),1)),this.openFiles.forEach((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()?this.assignOrphanScriptInfoToInferredProject(n,e):this.removeRootOfInferredProjectIfNowPartOfOtherProject(n)}),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(Lge),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}openClientFile(e,t,n,r){return this.openClientFileWithNormalizedPath(nme(e),t,n,!1,r?nme(r):void 0)}getOriginalLocationEnsuringConfiguredProject(e,t){const n=e.isSourceOfProjectReferenceRedirect(t.fileName),r=n?t:e.getSourceMapper().tryGetSourcePosition(t);if(!r)return;const{fileName:i}=r,o=this.getScriptInfo(i);if(!o&&!this.host.fileExists(i))return;const a={fileName:nme(i),path:this.toPath(i)},s=this.getConfigFileNameForFile(a,!1);if(!s)return;let c=this.findConfiguredProjectByProjectName(s);if(!c){if(e.getCompilerOptions().disableReferencedProjectLoad)return n?t:(null==o?void 0:o.containingProjects.length)?r:t;c=this.createConfiguredProject(s,`Creating project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`)}Lge(c);const l=e=>{const t=this.getScriptInfo(i);return t&&e.containsScriptInfo(t)&&!e.isSourceOfProjectReferenceRedirect(t.path)};if(c.isSolution()||!l(c)){if(c=Pge(c,i,e=>l(e)?e:void 0,1,`Creating project referenced in solution ${c.projectName} to find possible configured project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`),!c)return;if(c===e)return r}u(c);const _=this.getScriptInfo(i);if(_&&_.containingProjects.length)return _.containingProjects.forEach(e=>{$me(e)&&u(e)}),r;function u(t){(e.originalConfiguredProjects??(e.originalConfiguredProjects=new Set)).add(t.canonicalConfigFilePath)}}fileExists(e){return!!this.getScriptInfoForNormalizedPath(e)||this.host.fileExists(e)}findExternalProjectContainingOpenScriptInfo(e){return C(this.externalProjects,t=>(Lge(t),t.containsScriptInfo(e)))}getOrCreateOpenScriptInfo(e,t,n,r,i){const o=this.getOrCreateScriptInfoWorker(e,i?this.getNormalizedAbsolutePath(i):this.currentDirectory,!0,t,n,!!r,void 0,!0);return this.openFiles.set(o.path,i),o}assignProjectToOpenedScriptInfo(e){let t,n;let r,i;if(!this.findExternalProjectContainingOpenScriptInfo(e)&&0===this.serverMode){const o=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,1);o&&(r=o.seenProjects,i=o.sentConfigDiag,o.defaultProject&&(t=o.defaultProject.getConfigFilePath(),n=o.defaultProject.getAllProjectErrors()))}return e.containingProjects.forEach(Lge),e.isOrphan()&&(null==r||r.forEach(t=>{i.has(t)||this.sendConfigFileDiagEvent(t,e.fileName,!0)}),Tn.assert(this.openFiles.has(e.path)),this.assignOrphanScriptInfoToInferredProject(e,this.openFiles.get(e.path))),Tn.assert(!e.isOrphan()),{configFileName:t,configFileErrors:n,retainProjects:r}}findCreateOrReloadConfiguredProject(e,t,n,r,i,o,a,s){let c=this.findConfiguredProjectByProjectName(e,r),l=!1;switch(t){case 0:if(!c)return;break;case 1:c??(c=this.createConfiguredProject(e,n)),l=!a&&Rge(c,i);break;case 2:c??(c=this.createConfiguredProject(e,Jge(n))),l=!s&&this.reloadConfiguredProjectClearingSemanticCache(c,n,o),!s||s.has(c)||o.has(c)||(c.pendingUpdateLevel=2,c.pendingUpdateReason=Jge(n),s.add(c));break;default:Tn.assertNever(t)}return{project:c,sentConfigFileDiag:l}}tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,n,r){const i=this.getConfigFileNameForFile(e,0===t);if(!i)return;const o=this.findCreateOrReloadConfiguredProject(i,t,Bge(e),n,e.fileName,r);if(!o)return;const a=new Set,s=new Set(o.sentConfigFileDiag?[o.project]:void 0);let c,l;var _;return u(_=o.project)||function(i){Pge(i,e.path,(e,t)=>(t&&s.add(e),u(e)),t,`Creating project referenced in solution ${i.projectName} to find possible configured project for ${e.fileName} to open`,n,e.fileName,r)}(_),{defaultProject:c??l,sentConfigDiag:s,seenProjects:a};function u(t){if(!X(a,t))return;const n=t.containsScriptInfo(e);if(n&&!t.isSourceOfProjectReferenceRedirect(e.path))return c=t;l??(l=n?t:void 0)}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,t,n,r){const i=0===t,o=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,i,n);if(!o)return;const{defaultProject:a,seenProjects:s}=o;return a&&function(e,t,n,r,i,o,a,s){for(;;){if(!t.isInitialLoadPending()&&(!t.getCompilerOptions().composite||t.getCompilerOptions().disableSolutionSearching))return;const c=t.projectService.getConfigFileNameForFile({fileName:t.getConfigFilePath(),path:e.path,configFileInfo:!0},0===r);if(!c)return;const l=t.projectService.findCreateOrReloadConfiguredProject(c,r,i,o,void 0,a,!0,s);if(!l)return;l.project.isInitialLoadPending()&&t.getCompilerOptions().composite&&l.project.setPotentialProjectReference(t.canonicalConfigFilePath);const _=n(l.project);if(_)return _;t=l.project}}(e,a,e=>{s.add(e)},t,`Creating project possibly referencing default composite project ${a.getProjectName()} of open file ${e.fileName}`,i,n,r),o}loadAncestorProjectTree(e){e=e||K(this.configuredProjects,(e,t)=>t.isInitialLoadPending()?void 0:[e,!0]);const t=new Set;for(const n of We(this.configuredProjects.values()))Fge(n,t=>e.has(t))&&Lge(n),this.ensureProjectChildren(n,e,t)}ensureProjectChildren(e,t,n){var r;if(!X(n,e.canonicalConfigFilePath))return;if(e.getCompilerOptions().disableReferencedProjectLoad)return;const i=null==(r=e.getCurrentProgram())?void 0:r.getResolvedProjectReferences();if(i)for(const r of i){if(!r)continue;const i=kV(r.references,e=>t.has(e.sourceFile.path)?e:void 0);if(!i)continue;const o=nme(r.sourceFile.fileName),a=this.findConfiguredProjectByProjectName(o)??this.createConfiguredProject(o,`Creating project referenced by : ${e.projectName} as it references project ${i.sourceFile.fileName}`);Lge(a),this.ensureProjectChildren(a,t,n)}}cleanupConfiguredProjects(e,t,n){this.getOrphanConfiguredProjects(e,n,t).forEach(e=>this.removeProject(e))}cleanupProjectsAndScriptInfos(e,t,n){this.cleanupConfiguredProjects(e,n,t);for(const e of this.inferredProjects.slice())e.isOrphan()&&this.removeProject(e);this.removeOrphanScriptInfos()}openClientFileWithNormalizedPath(e,t,n,r,i){const o=this.getOrCreateOpenScriptInfo(e,t,n,r,i),{retainProjects:a,...s}=this.assignProjectToOpenedScriptInfo(o);return this.cleanupProjectsAndScriptInfos(a,new Set([o.path]),void 0),this.telemetryOnOpenFile(o),this.printProjects(),s}getOrphanConfiguredProjects(e,t,n){const r=new Set(this.configuredProjects.values()),i=e=>{!e.originalConfiguredProjects||!$me(e)&&e.isOrphan()||e.originalConfiguredProjects.forEach((e,t)=>{const n=this.getConfiguredProjectByCanonicalConfigFilePath(t);return n&&s(n)})};return null==e||e.forEach(s),this.inferredProjects.forEach(i),this.externalProjects.forEach(i),this.externalProjectToConfiguredProjectMap.forEach((e,t)=>{(null==n?void 0:n.has(t))||e.forEach(s)}),this.openFiles.forEach((e,n)=>{if(null==t?void 0:t.has(n))return;const r=this.getScriptInfoForPath(n);if(C(r.containingProjects,Hme))return;const i=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,0);(null==i?void 0:i.defaultProject)&&(null==i||i.seenProjects.forEach(s))}),this.configuredProjects.forEach(e=>{r.has(e)&&(a(e)||Ige(e,o))&&s(e)}),r;function o(e){return!r.has(e)||a(e)}function a(e){var t,n;return(e.deferredClose||e.projectService.hasPendingProjectUpdate(e))&&!!(null==(n=null==(t=e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath))?void 0:t.openFilesImpactedByConfigFile)?void 0:n.size)}function s(e){r.delete(e)&&(i(e),Ige(e,s))}}removeOrphanScriptInfos(){const e=new Map(this.filenameToScriptInfo);this.filenameToScriptInfo.forEach(t=>{if(!t.deferredDelete){if(!t.isScriptOpen()&&t.isOrphan()&&!t.isContainedByBackgroundProject()){if(!t.sourceMapFilePath)return;let e;if(_t(t.sourceMapFilePath)){const n=this.filenameToScriptInfo.get(t.sourceMapFilePath);e=null==n?void 0:n.sourceInfos}else e=t.sourceMapFilePath.sourceInfos;if(!e)return;if(!gd(e,e=>{const t=this.getScriptInfoForPath(e);return!!t&&(t.isScriptOpen()||!t.isOrphan())}))return}if(e.delete(t.path),t.sourceMapFilePath){let n;if(_t(t.sourceMapFilePath)){const r=this.filenameToScriptInfo.get(t.sourceMapFilePath);(null==r?void 0:r.deferredDelete)?t.sourceMapFilePath={watcher:this.addMissingSourceMapFile(r.fileName,t.path),sourceInfos:r.sourceInfos}:e.delete(t.sourceMapFilePath),n=null==r?void 0:r.sourceInfos}else n=t.sourceMapFilePath.sourceInfos;n&&n.forEach((t,n)=>e.delete(n))}}}),e.forEach(e=>this.deleteScriptInfo(e))}telemetryOnOpenFile(e){if(0!==this.serverMode||!this.eventHandler||!e.isJavaScript()||!Bx(this.allJsFilesForOpenFileTelemetry,e.path))return;const t=this.ensureDefaultProjectForFile(e);if(!t.languageServiceEnabled)return;const n=t.getSourceFile(e.path),r=!!n&&!!n.checkJsDirective;this.eventHandler({eventName:oge,data:{info:{checkJs:r}}})}closeClientFile(e,t){const n=this.getScriptInfoForNormalizedPath(nme(e)),r=!!n&&this.closeOpenFile(n,t);return t||this.printProjects(),r}collectChanges(e,t,n,r){for(const i of t){const t=C(e,e=>e.projectName===i.getProjectName());r.push(i.getChangesSinceVersion(t&&t.version,n))}}synchronizeProjectList(e,t){const n=[];return this.collectChanges(e,this.externalProjects,t,n),this.collectChanges(e,H(this.configuredProjects.values(),e=>e.deferredClose?void 0:e),t,n),this.collectChanges(e,this.inferredProjects,t,n),n}applyChangesInOpenFiles(e,t,n){let r,i,o=!1;if(e)for(const t of e){const e=this.getOrCreateOpenScriptInfo(nme(t.fileName),t.content,vge(t.scriptKind),t.hasMixedContent,t.projectRootPath?nme(t.projectRootPath):void 0);(r||(r=[])).push(e)}if(t)for(const e of t){const t=this.getScriptInfo(e.fileName);Tn.assert(!!t),this.applyChangesToFile(t,e.changes)}if(n)for(const e of n)o=this.closeClientFile(e,!0)||o;null==r||r.forEach(e=>{var t;return null==(t=this.assignProjectToOpenedScriptInfo(e).retainProjects)?void 0:t.forEach(e=>(i??(i=new Set)).add(e))}),o&&this.assignOrphanScriptInfosToInferredProject(),r?(this.cleanupProjectsAndScriptInfos(i,new Set(r.map(e=>e.path)),void 0),r.forEach(e=>this.telemetryOnOpenFile(e)),this.printProjects()):g(n)&&this.printProjects()}applyChangesToFile(e,t){for(const n of t)e.editContent(n.span.start,n.span.start+n.span.length,n.newText)}closeExternalProject(e,t){const n=nme(e);if(this.externalProjectToConfiguredProjectMap.get(n))this.externalProjectToConfiguredProjectMap.delete(n);else{const t=this.findExternalProjectByProjectName(e);t&&this.removeProject(t)}t&&(this.cleanupConfiguredProjects(),this.printProjects())}openExternalProjects(e){const t=new Set(this.externalProjects.map(e=>e.getProjectName()));this.externalProjectToConfiguredProjectMap.forEach((e,n)=>t.add(n));for(const n of e)this.openExternalProject(n,!1),t.delete(n.projectFileName);t.forEach(e=>this.closeExternalProject(e,!1)),this.cleanupConfiguredProjects(),this.printProjects()}static escapeFilenameForRegex(e){return e.replace(this.filenameEscapeRegexp,"\\$&")}resetSafeList(){this.safelist=fge}applySafeList(e){const t=e.typeAcquisition;Tn.assert(!!t,"proj.typeAcquisition should be set by now");const n=this.applySafeListWorker(e,e.rootFiles,t);return(null==n?void 0:n.excludedFiles)??[]}applySafeListWorker(t,n,r){if(!1===r.enable||r.disableFilenameBasedTypeAcquisition)return;const i=r.include||(r.include=[]),o=[],a=n.map(e=>Xo(e.fileName));for(const t of Object.keys(this.safelist)){const n=this.safelist[t];for(const r of a)if(n.match.test(r)){if(this.logger.info(`Excluding files based on rule ${t} matching file '${r}'`),n.types)for(const e of n.types)i.includes(e)||i.push(e);if(n.exclude)for(const i of n.exclude){const a=r.replace(n.match,(...n)=>i.map(r=>"number"==typeof r?_t(n[r])?e.escapeFilenameForRegex(n[r]):(this.logger.info(`Incorrect RegExp specification in safelist rule ${t} - not enough groups`),"\\*"):r).join(""));o.includes(a)||o.push(a)}else{const t=e.escapeFilenameForRegex(r);o.includes(t)||o.push(t)}}}const s=o.map(e=>new RegExp(e,"i"));let c,l;for(let e=0;et.test(a[e])))_(e);else{if(r.enable){const t=Wo(xt(a[e]));if(Ro(t,"js")){const n=Zt(aT(t)),r=this.legacySafelist.get(n);if(void 0!==r){this.logger.info(`Excluded '${a[e]}' because it matched ${n} from the legacy safelist`),_(e),i.includes(r)||i.push(r);continue}}}/^.+[.-]min\.js$/.test(a[e])?_(e):null==c||c.push(n[e])}return l?{rootFiles:c,excludedFiles:l}:void 0;function _(e){l||(Tn.assert(!c),c=n.slice(0,e),l=[]),l.push(a[e])}}openExternalProject(e,t){const n=this.findExternalProjectByProjectName(e.projectFileName);let r,i=[];for(const t of e.rootFiles){const n=nme(t.fileName);if(pme(n)){if(0===this.serverMode&&this.host.fileExists(n)){let t=this.findConfiguredProjectByProjectName(n);t||(t=this.createConfiguredProject(n,`Creating configured project in external project: ${e.projectFileName}`),this.getHostPreferences().lazyConfiguredProjectsFromExternalProject||t.updateGraph()),(r??(r=new Set)).add(t),Tn.assert(!t.isClosed())}}else i.push(t)}if(r)this.externalProjectToConfiguredProjectMap.set(e.projectFileName,r),n&&this.removeProject(n);else{this.externalProjectToConfiguredProjectMap.delete(e.projectFileName);const t=e.typeAcquisition||{};t.include=t.include||[],t.exclude=t.exclude||[],void 0===t.enable&&(t.enable=Lme(i.map(e=>e.fileName)));const r=this.applySafeListWorker(e,i,t),o=(null==r?void 0:r.excludedFiles)??[];if(i=(null==r?void 0:r.rootFiles)??i,n){n.excludedFiles=o;const r=gge(e.options),a=hge(e.options,n.getCurrentDirectory()),s=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.projectFileName,r,i,kge);s?n.disableLanguageService(s):n.enableLanguageService(),n.setProjectErrors(null==a?void 0:a.errors),this.updateRootAndOptionsOfNonInferredProject(n,i,kge,r,t,e.options.compileOnSave,null==a?void 0:a.watchOptions),n.updateGraph()}else{this.createExternalProject(e.projectFileName,i,e.options,t,o).updateGraph()}}t&&(this.cleanupConfiguredProjects(r,new Set(e.projectFileName)),this.printProjects())}hasDeferredExtension(){for(const e of this.hostConfiguration.extraFileExtensions)if(7===e.scriptKind)return!0;return!1}requestEnablePlugin(e,t,n){if(this.host.importPlugin||this.host.require)if(this.logger.info(`Enabling plugin ${t.name} from candidate paths: ${n.join(",")}`),!t.name||Js(t.name)||/[\\/]\.\.?($|[\\/])/.test(t.name))this.logger.info(`Skipped loading plugin ${t.name||JSON.stringify(t)} because only package name is allowed plugin name`);else{if(this.host.importPlugin){const r=Rme.importServicePluginAsync(t,n,this.host,e=>this.logger.info(e));this.pendingPluginEnablements??(this.pendingPluginEnablements=new Map);let i=this.pendingPluginEnablements.get(e);return i||this.pendingPluginEnablements.set(e,i=[]),void i.push(r)}this.endEnablePlugin(e,Rme.importServicePluginSync(t,n,this.host,e=>this.logger.info(e)))}else this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded")}endEnablePlugin(e,{pluginConfigEntry:t,resolvedModule:n,errorLogs:r}){var i;if(n){const r=null==(i=this.currentPluginConfigOverrides)?void 0:i.get(t.name);if(r){const e=t.name;(t=r).name=e}e.enableProxy(n,t)}else h(r,e=>this.logger.info(e)),this.logger.info(`Couldn't find ${t.name}`)}hasNewPluginEnablementRequests(){return!!this.pendingPluginEnablements}hasPendingPluginEnablements(){return!!this.currentPluginEnablementPromise}async waitForPendingPlugins(){for(;this.currentPluginEnablementPromise;)await this.currentPluginEnablementPromise}enableRequestedPlugins(){this.pendingPluginEnablements&&this.enableRequestedPluginsAsync()}async enableRequestedPluginsAsync(){if(this.currentPluginEnablementPromise&&await this.waitForPendingPlugins(),!this.pendingPluginEnablements)return;const e=We(this.pendingPluginEnablements.entries());this.pendingPluginEnablements=void 0,this.currentPluginEnablementPromise=this.enableRequestedPluginsWorker(e),await this.currentPluginEnablementPromise}async enableRequestedPluginsWorker(e){Tn.assert(void 0===this.currentPluginEnablementPromise);let t=!1;await Promise.all(M(e,async([e,n])=>{const r=await Promise.all(n);if(e.isClosed()||Gme(e))this.logger.info(`Cancelling plugin enabling for ${e.getProjectName()} as it is ${e.isClosed()?"closed":"deferred close"}`);else{t=!0;for(const t of r)this.endEnablePlugin(e,t);this.delayUpdateProjectGraph(e)}})),this.currentPluginEnablementPromise=void 0,t&&this.sendProjectsUpdatedInBackgroundEvent()}configurePlugin(e){this.forEachEnabledProject(t=>t.onPluginConfigurationChanged(e.pluginName,e.configuration)),this.currentPluginConfigOverrides=this.currentPluginConfigOverrides||new Map,this.currentPluginConfigOverrides.set(e.pluginName,e.configuration)}getPackageJsonsVisibleToFile(e,t,n){const r=this.packageJsonCache,i=n&&this.toPath(n),o=[],a=e=>{switch(r.directoryHasPackageJson(e)){case 3:return r.searchDirectoryAndAncestors(e),a(e);case-1:const n=Yo(e,"package.json");this.watchPackageJsonFile(n,this.toPath(n),t);const i=r.getInDirectory(e);i&&o.push(i)}if(i&&i===e)return!0};return Sa(Vo(e),a),o}getNearestAncestorDirectoryWithPackageJson(e){return Sa(e,e=>{switch(this.packageJsonCache.directoryHasPackageJson(e)){case-1:return e;case 0:return;case 3:return this.host.fileExists(Yo(e,"package.json"))?e:void 0}})}watchPackageJsonFile(e,t,n){Tn.assert(void 0!==n);let r=(this.packageJsonFilesMap??(this.packageJsonFilesMap=new Map)).get(t);if(!r){let n=this.watchFactory.watchFile(e,(e,n)=>{switch(n){case 0:case 1:this.packageJsonCache.addOrUpdate(e,t),this.onPackageJsonChange(r);break;case 2:this.packageJsonCache.delete(t),this.onPackageJsonChange(r),r.projects.clear(),r.close()}},250,this.hostConfiguration.watchOptions,S$.PackageJson);r={projects:new Set,close:()=>{var e;!r.projects.size&&n&&(n.close(),n=void 0,null==(e=this.packageJsonFilesMap)||e.delete(t),this.packageJsonCache.invalidate(t))}},this.packageJsonFilesMap.set(t,r)}r.projects.add(n),(n.packageJsonWatches??(n.packageJsonWatches=new Set)).add(r)}onPackageJsonChange(e){e.projects.forEach(e=>{var t;return null==(t=e.onPackageJsonChange)?void 0:t.call(e)})}includePackageJsonAutoImports(){switch(this.hostConfiguration.preferences.includePackageJsonAutoImports){case"on":return 1;case"off":return 0;default:return 2}}getIncompleteCompletionsCache(){return this.incompleteCompletionsCache||(this.incompleteCompletionsCache=function(){let e;return{get:()=>e,set(t){e=t},clear(){e=void 0}}}())}};Wge.filenameEscapeRegexp=/[-/\\^$*+?.()|[\]{}]/g;var $ge=Wge;function Hge(e){return void 0!==e.kind}function Kge(e){e.print(!1,!1,!1)}function Gge(e){let t,n,r;const i={get(e,t,i,o){if(n&&r===a(e,i,o))return n.get(t)},set(n,r,i,a,c,l,_){if(o(n,i,a).set(r,s(c,l,_,!1)),_)for(const n of l)if(n.isInNodeModules){const r=n.path.substring(0,n.path.indexOf(KM)+KM.length-1),i=e.toPath(r);(null==t?void 0:t.has(i))||(t||(t=new Map)).set(i,e.watchNodeModulesForPackageJsonChanges(r))}},setModulePaths(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.modulePaths=i:a.set(t,s(void 0,i,void 0,void 0))},setBlockedByPackageJsonDependencies(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.isBlockedByPackageJsonDependencies=i:a.set(t,s(void 0,void 0,void 0,i))},clear(){null==t||t.forEach(bx),null==n||n.clear(),null==t||t.clear(),r=void 0},count:()=>n?n.size:0};return Tn.isDebugging&&Object.defineProperty(i,"__cache",{get:()=>n}),i;function o(e,t,o){const s=a(e,t,o);return n&&r!==s&&i.clear(),r=s,n||(n=new Map)}function a(e,t,n){return`${e},${t.importModuleSpecifierEnding},${t.importModuleSpecifierPreference},${n.overrideImportMode}`}function s(e,t,n,r){return{kind:e,modulePaths:t,moduleSpecifiers:n,isBlockedByPackageJsonDependencies:r}}}function Xge(e){const t=new Map,n=new Map;return{addOrUpdate:r,invalidate:function(e){t.delete(e),n.delete(Vo(e))},delete:e=>{t.delete(e),n.set(Vo(e),!0)},getInDirectory:n=>t.get(e.toPath(Yo(n,"package.json")))||void 0,directoryHasPackageJson:t=>i(e.toPath(t)),searchDirectoryAndAncestors:t=>{Sa(t,t=>{const o=e.toPath(t);if(3!==i(o))return!0;const a=Yo(t,"package.json");qZ(e,a)?r(a,Yo(o,"package.json")):n.set(o,!0)})}};function r(r,i){const o=Tn.checkDefined(GZ(r,e.host));t.set(i,o),n.delete(Vo(i))}function i(e){return t.has(Yo(e,"package.json"))?-1:n.has(e)?0:3}}var Qge={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}};function Yge(e,t){if((Wme(e)||Hme(e))&&e.isJsOnlyProject()){const n=e.getScriptInfoForNormalizedPath(t);return n&&!n.isJavaScript()}return!1}function Zge(e,t,n){const r=t.getScriptInfoForNormalizedPath(e);return{start:r.positionToLineOffset(n.start),end:r.positionToLineOffset(n.start+n.length),text:cV(n.messageText,"\n"),code:n.code,category:Si(n),reportsUnnecessary:n.reportsUnnecessary,reportsDeprecated:n.reportsDeprecated,source:n.source,relatedInformation:M(n.relatedInformation,ehe)}}function ehe(e){return e.file?{span:{start:the(ns(e.file,e.start)),end:the(ns(e.file,e.start+e.length)),file:e.file.fileName},message:cV(e.messageText,"\n"),category:Si(e),code:e.code}:{message:cV(e.messageText,"\n"),category:Si(e),code:e.code}}function the(e){return{line:e.line+1,offset:e.character+1}}function nhe(e,t){const n=e.file&&the(ns(e.file,e.start)),r=e.file&&the(ns(e.file,e.start+e.length)),i=cV(e.messageText,"\n"),{code:o,source:a}=e,s={start:n,end:r,text:i,code:o,category:Si(e),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,source:a,relatedInformation:M(e.relatedInformation,ehe)};return t?{...s,fileName:e.file&&e.file.fileName}:s}var rhe=gme;function ihe(e,t,n,r){const i=t.hasLevel(3),o=JSON.stringify(e);i&&t.info(`${e.type}:${rG(e)}`);return`Content-Length: ${1+n(o,"utf8")}\r\n\r\n${o}${r}`}var ohe=class{constructor(e){this.operationHost=e}startNew(e){this.complete(),this.requestId=this.operationHost.getCurrentRequestId(),this.executeAction(e)}complete(){void 0!==this.requestId&&(this.operationHost.sendRequestCompletedEvent(this.requestId),this.requestId=void 0),this.setTimerHandle(void 0),this.setImmediateId(void 0)}immediate(e,t){const n=this.requestId;Tn.assert(n===this.operationHost.getCurrentRequestId(),"immediate: incorrect request id"),this.setImmediateId(this.operationHost.getServerHost().setImmediate(()=>{this.immediateId=void 0,this.operationHost.executeWithRequestId(n,()=>this.executeAction(t))},e))}delay(e,t,n){const r=this.requestId;Tn.assert(r===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout(()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(r,()=>this.executeAction(n))},t,e))}executeAction(e){var t,n,r,i,o,a;let s=!1;try{this.operationHost.isCancellationRequested()?(s=!0,null==(t=cr)||t.instant(cr.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):(null==(n=cr)||n.push(cr.Phase.Session,"stepAction",{seq:this.requestId}),e(this),null==(r=cr)||r.pop())}catch(e){null==(i=cr)||i.popAll(),s=!0,e instanceof Br?null==(o=cr)||o.instant(cr.Phase.Session,"stepCanceled",{seq:this.requestId}):(null==(a=cr)||a.instant(cr.Phase.Session,"stepError",{seq:this.requestId,message:e.message}),this.operationHost.logError(e,`delayed processing of request ${this.requestId}`))}!s&&this.hasPendingWork()||this.complete()}setTimerHandle(e){void 0!==this.timerHandle&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=e}setImmediateId(e){void 0!==this.immediateId&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=e}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}};function ahe(e,t){return{seq:0,type:"event",event:e,body:t}}function she(e){return st(({textSpan:e})=>e.start+100003*e.length,xY(e))}function che(e,t,n){for(const r of ct(e)?e:e.projects)n(r,t);!ct(e)&&e.symLinkedProjects&&e.symLinkedProjects.forEach((e,t)=>{for(const r of e)n(r,t)})}function lhe(e,t,n,r,i,o){const a=new Map,s=at();s.enqueue({project:t,location:n}),che(e,n.fileName,(e,t)=>{const r={fileName:t,pos:n.pos};s.enqueue({project:e,location:r})});const c=t.projectService,l=t.getCancellationToken(),_=function(e,t,n){const r=e.getLanguageService().getDefinitionAtPosition(t.fileName,t.pos,!1,n),i=r&&Ce(r);return i&&!i.isLocal?{fileName:i.fileName,pos:i.textSpan.start}:void 0}(t,n,r),u=kt(()=>t.isSourceOfProjectReferenceRedirect(_.fileName)?_:t.getLanguageService().getSourceMapper().tryGetGeneratedPosition(_)),d=kt(()=>t.isSourceOfProjectReferenceRedirect(_.fileName)?_:t.getLanguageService().getSourceMapper().tryGetSourcePosition(_)),p=new Set;e:for(;!s.isEmpty();){for(;!s.isEmpty();){if(l.isCancellationRequested())break e;const{project:e,location:t}=s.dequeue();if(a.has(e))continue;if(uhe(e,t))continue;if(Lge(e),!e.containsFile(nme(t.fileName)))continue;const n=f(e,t);a.set(e,n??Zfe),p.add(dhe(e))}_&&(c.loadAncestorProjectTree(p),c.forEachEnabledProject(e=>{if(l.isCancellationRequested())return;if(a.has(e))return;const t=_he(_,e,u,d);t&&s.enqueue({project:e,location:t})}))}return 1===a.size?De(a.values()):a;function f(e,t){const n=i(e,t);if(n){for(const t of n)o(t,t=>{const n=c.getOriginalLocationEnsuringConfiguredProject(e,t);if(!n)return;const r=c.getScriptInfo(n.fileName);for(const e of r.containingProjects)e.isOrphan()||a.has(e)||s.enqueue({project:e,location:n});const i=c.getSymlinkedProjects(r);i&&i.forEach((e,t)=>{for(const r of e)r.isOrphan()||a.has(r)||s.enqueue({project:r,location:{fileName:t,pos:n.pos}})})});return n}}}function _he(e,t,n,r){if(t.containsFile(nme(e.fileName))&&!uhe(t,e))return e;const i=n();if(i&&t.containsFile(nme(i.fileName)))return i;const o=r();return o&&t.containsFile(nme(o.fileName))?o:void 0}function uhe(e,t){if(!t)return!1;const n=e.getLanguageService().getProgram();if(!n)return!1;const r=n.getSourceFile(t.fileName);return!!r&&r.resolvedPath!==r.path&&r.resolvedPath!==e.toPath(t.fileName)}function dhe(e){return $me(e)?e.canonicalConfigFilePath:e.getProjectName()}function phe({fileName:e,textSpan:t}){return{fileName:e,pos:t.start}}function fhe(e,t){return TY(e,t.getSourceMapper(),e=>t.projectService.fileExists(e))}function mhe(e,t){return CY(e,t.getSourceMapper(),e=>t.projectService.fileExists(e))}function ghe(e,t){return wY(e,t.getSourceMapper(),e=>t.projectService.fileExists(e))}var hhe=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits"],yhe=[...hhe,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full"],vhe=class e{constructor(e){this.changeSeq=0,this.handlers=new Map(Object.entries({status:()=>{const e={version:u};return this.requiredResponse(e)},openExternalProject:e=>(this.projectService.openExternalProject(e.arguments,!0),this.requiredResponse(!0)),openExternalProjects:e=>(this.projectService.openExternalProjects(e.arguments.projects),this.requiredResponse(!0)),closeExternalProject:e=>(this.projectService.closeExternalProject(e.arguments.projectFileName,!0),this.requiredResponse(!0)),synchronizeProjectList:e=>{const t=this.projectService.synchronizeProjectList(e.arguments.knownProjects,e.arguments.includeProjectReferenceRedirectInfo);if(!t.some(e=>e.projectErrors&&0!==e.projectErrors.length))return this.requiredResponse(t);const n=M(t,e=>e.projectErrors&&0!==e.projectErrors.length?{info:e.info,changes:e.changes,files:e.files,projectErrors:this.convertToDiagnosticsWithLinePosition(e.projectErrors,void 0)}:e);return this.requiredResponse(n)},updateOpen:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles&&R(e.arguments.openFiles,e=>({fileName:e.file,content:e.fileContent,scriptKind:e.scriptKindName,projectRootPath:e.projectRootPath})),e.arguments.changedFiles&&R(e.arguments.changedFiles,e=>({fileName:e.fileName,changes:H(xe(e.textChanges),t=>{const n=Tn.checkDefined(this.projectService.getScriptInfo(e.fileName)),r=n.lineOffsetToPosition(t.start.line,t.start.offset),i=n.lineOffsetToPosition(t.end.line,t.end.offset);return r>=0?{span:{start:r,length:i-r},newText:t.newText}:void 0})})),e.arguments.closedFiles),this.requiredResponse(!0)),applyChangedToOpenFiles:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles,e.arguments.changedFiles&&R(e.arguments.changedFiles,e=>({fileName:e.fileName,changes:xe(e.changes)})),e.arguments.closedFiles),this.requiredResponse(!0)),exit:()=>(this.exit(),this.notRequired()),definition:e=>this.requiredResponse(this.getDefinition(e.arguments,!0)),"definition-full":e=>this.requiredResponse(this.getDefinition(e.arguments,!1)),definitionAndBoundSpan:e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!0)),"definitionAndBoundSpan-full":e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!1)),findSourceDefinition:e=>this.requiredResponse(this.findSourceDefinition(e.arguments)),"emit-output":e=>this.requiredResponse(this.getEmitOutput(e.arguments)),typeDefinition:e=>this.requiredResponse(this.getTypeDefinition(e.arguments)),implementation:e=>this.requiredResponse(this.getImplementation(e.arguments,!0)),"implementation-full":e=>this.requiredResponse(this.getImplementation(e.arguments,!1)),references:e=>this.requiredResponse(this.getReferences(e.arguments,!0)),"references-full":e=>this.requiredResponse(this.getReferences(e.arguments,!1)),rename:e=>this.requiredResponse(this.getRenameLocations(e.arguments,!0)),"renameLocations-full":e=>this.requiredResponse(this.getRenameLocations(e.arguments,!1)),"rename-full":e=>this.requiredResponse(this.getRenameInfo(e.arguments)),open:e=>(this.openClientFile(nme(e.arguments.file),e.arguments.fileContent,bge(e.arguments.scriptKindName),e.arguments.projectRootPath?nme(e.arguments.projectRootPath):void 0),this.notRequired()),quickinfo:e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!0)),"quickinfo-full":e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!1)),getOutliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!0)),outliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!1)),todoComments:e=>this.requiredResponse(this.getTodoComments(e.arguments)),indentation:e=>this.requiredResponse(this.getIndentation(e.arguments)),nameOrDottedNameSpan:e=>this.requiredResponse(this.getNameOrDottedNameSpan(e.arguments)),breakpointStatement:e=>this.requiredResponse(this.getBreakpointStatement(e.arguments)),braceCompletion:e=>this.requiredResponse(this.isValidBraceCompletion(e.arguments)),docCommentTemplate:e=>this.requiredResponse(this.getDocCommentTemplate(e.arguments)),getSpanOfEnclosingComment:e=>this.requiredResponse(this.getSpanOfEnclosingComment(e.arguments)),fileReferences:e=>this.requiredResponse(this.getFileReferences(e.arguments,!0)),"fileReferences-full":e=>this.requiredResponse(this.getFileReferences(e.arguments,!1)),format:e=>this.requiredResponse(this.getFormattingEditsForRange(e.arguments)),formatonkey:e=>this.requiredResponse(this.getFormattingEditsAfterKeystroke(e.arguments)),"format-full":e=>this.requiredResponse(this.getFormattingEditsForDocumentFull(e.arguments)),"formatonkey-full":e=>this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(e.arguments)),"formatRange-full":e=>this.requiredResponse(this.getFormattingEditsForRangeFull(e.arguments)),completionInfo:e=>this.requiredResponse(this.getCompletions(e.arguments,"completionInfo")),completions:e=>this.requiredResponse(this.getCompletions(e.arguments,"completions")),"completions-full":e=>this.requiredResponse(this.getCompletions(e.arguments,"completions-full")),completionEntryDetails:e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!1)),"completionEntryDetails-full":e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!0)),compileOnSaveAffectedFileList:e=>this.requiredResponse(this.getCompileOnSaveAffectedFileList(e.arguments)),compileOnSaveEmitFile:e=>this.requiredResponse(this.emitFile(e.arguments)),signatureHelp:e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!0)),"signatureHelp-full":e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!1)),"compilerOptionsDiagnostics-full":e=>this.requiredResponse(this.getCompilerOptionsDiagnostics(e.arguments)),"encodedSyntacticClassifications-full":e=>this.requiredResponse(this.getEncodedSyntacticClassifications(e.arguments)),"encodedSemanticClassifications-full":e=>this.requiredResponse(this.getEncodedSemanticClassifications(e.arguments)),cleanup:()=>(this.cleanup(),this.requiredResponse(!0)),semanticDiagnosticsSync:e=>this.requiredResponse(this.getSemanticDiagnosticsSync(e.arguments)),syntacticDiagnosticsSync:e=>this.requiredResponse(this.getSyntacticDiagnosticsSync(e.arguments)),suggestionDiagnosticsSync:e=>this.requiredResponse(this.getSuggestionDiagnosticsSync(e.arguments)),geterr:e=>(this.errorCheck.startNew(t=>this.getDiagnostics(t,e.arguments.delay,e.arguments.files)),this.notRequired()),geterrForProject:e=>(this.errorCheck.startNew(t=>this.getDiagnosticsForProject(t,e.arguments.delay,e.arguments.file)),this.notRequired()),change:e=>(this.change(e.arguments),this.notRequired()),configure:e=>(this.projectService.setHostConfiguration(e.arguments),this.doOutput(void 0,"configure",e.seq,!0),this.notRequired()),reload:e=>(this.reload(e.arguments,e.seq),this.requiredResponse({reloadFinished:!0})),saveto:e=>{const t=e.arguments;return this.saveToTmp(t.file,t.tmpfile),this.notRequired()},close:e=>{const t=e.arguments;return this.closeClientFile(t.file),this.notRequired()},navto:e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!0)),"navto-full":e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!1)),brace:e=>this.requiredResponse(this.getBraceMatching(e.arguments,!0)),"brace-full":e=>this.requiredResponse(this.getBraceMatching(e.arguments,!1)),navbar:e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!0)),"navbar-full":e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!1)),navtree:e=>this.requiredResponse(this.getNavigationTree(e.arguments,!0)),"navtree-full":e=>this.requiredResponse(this.getNavigationTree(e.arguments,!1)),documentHighlights:e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!0)),"documentHighlights-full":e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!1)),compilerOptionsForInferredProjects:e=>(this.setCompilerOptionsForInferredProjects(e.arguments),this.requiredResponse(!0)),projectInfo:e=>this.requiredResponse(this.getProjectInfo(e.arguments)),reloadProjects:()=>(this.projectService.reloadProjects(),this.notRequired()),jsxClosingTag:e=>this.requiredResponse(this.getJsxClosingTag(e.arguments)),linkedEditingRange:e=>this.requiredResponse(this.getLinkedEditingRange(e.arguments)),getCodeFixes:e=>this.requiredResponse(this.getCodeFixes(e.arguments,!0)),"getCodeFixes-full":e=>this.requiredResponse(this.getCodeFixes(e.arguments,!1)),getCombinedCodeFix:e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!0)),"getCombinedCodeFix-full":e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!1)),applyCodeActionCommand:e=>this.requiredResponse(this.applyCodeActionCommand(e.arguments)),getSupportedCodeFixes:e=>this.requiredResponse(this.getSupportedCodeFixes(e.arguments)),getApplicableRefactors:e=>this.requiredResponse(this.getApplicableRefactors(e.arguments)),getEditsForRefactor:e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!0)),getMoveToRefactoringFileSuggestions:e=>this.requiredResponse(this.getMoveToRefactoringFileSuggestions(e.arguments)),getPasteEdits:e=>this.requiredResponse(this.getPasteEdits(e.arguments)),"getEditsForRefactor-full":e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!1)),organizeImports:e=>this.requiredResponse(this.organizeImports(e.arguments,!0)),"organizeImports-full":e=>this.requiredResponse(this.organizeImports(e.arguments,!1)),getEditsForFileRename:e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!0)),"getEditsForFileRename-full":e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!1)),configurePlugin:e=>(this.configurePlugin(e.arguments),this.doOutput(void 0,"configurePlugin",e.seq,!0),this.notRequired()),selectionRange:e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!0)),"selectionRange-full":e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!1)),prepareCallHierarchy:e=>this.requiredResponse(this.prepareCallHierarchy(e.arguments)),provideCallHierarchyIncomingCalls:e=>this.requiredResponse(this.provideCallHierarchyIncomingCalls(e.arguments)),provideCallHierarchyOutgoingCalls:e=>this.requiredResponse(this.provideCallHierarchyOutgoingCalls(e.arguments)),toggleLineComment:e=>this.requiredResponse(this.toggleLineComment(e.arguments,!0)),"toggleLineComment-full":e=>this.requiredResponse(this.toggleLineComment(e.arguments,!1)),toggleMultilineComment:e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!0)),"toggleMultilineComment-full":e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!1)),commentSelection:e=>this.requiredResponse(this.commentSelection(e.arguments,!0)),"commentSelection-full":e=>this.requiredResponse(this.commentSelection(e.arguments,!1)),uncommentSelection:e=>this.requiredResponse(this.uncommentSelection(e.arguments,!0)),"uncommentSelection-full":e=>this.requiredResponse(this.uncommentSelection(e.arguments,!1)),provideInlayHints:e=>this.requiredResponse(this.provideInlayHints(e.arguments)),mapCode:e=>this.requiredResponse(this.mapCode(e.arguments))})),this.host=e.host,this.cancellationToken=e.cancellationToken,this.typingsInstaller=e.typingsInstaller||Pme,this.byteLength=e.byteLength,this.hrtime=e.hrtime,this.logger=e.logger,this.canUseEvents=e.canUseEvents,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=e.noGetErrOnBackgroundUpdate;const{throttleWaitMilliseconds:t}=e;this.eventHandler=this.canUseEvents?e.eventHandler||(e=>this.defaultEventHandler(e)):void 0;const n={executeWithRequestId:(e,t)=>this.executeWithRequestId(e,t),getCurrentRequestId:()=>this.currentRequestId,getServerHost:()=>this.host,logError:(e,t)=>this.logError(e,t),sendRequestCompletedEvent:e=>this.sendRequestCompletedEvent(e),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new ohe(n);const r={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:e.useSingleInferredProject,useInferredProjectPerProjectRoot:e.useInferredProjectPerProjectRoot,typingsInstaller:this.typingsInstaller,throttleWaitMilliseconds:t,eventHandler:this.eventHandler,suppressDiagnosticEvents:this.suppressDiagnosticEvents,globalPlugins:e.globalPlugins,pluginProbeLocations:e.pluginProbeLocations,allowLocalPluginLoads:e.allowLocalPluginLoads,typesMapLocation:e.typesMapLocation,serverMode:e.serverMode,session:this,canUseWatchEvents:e.canUseWatchEvents,incrementalVerifier:e.incrementalVerifier};switch(this.projectService=new $ge(r),this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)),this.gcTimer=new dme(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:hhe.forEach(e=>this.handlers.set(e,e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:yhe.forEach(e=>this.handlers.set(e,e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.Syntactic`)}));break;default:Tn.assertNever(this.projectService.serverMode)}}sendRequestCompletedEvent(e){this.event({request_seq:e},"requestCompleted")}addPerformanceData(e,t){this.performanceData||(this.performanceData={}),this.performanceData[e]=(this.performanceData[e]??0)+t}performanceEventHandler(e){switch(e.kind){case"UpdateGraph":this.addPerformanceData("updateGraphDurationMs",e.durationMs);break;case"CreatePackageJsonAutoImportProvider":this.addPerformanceData("createAutoImportProviderProgramDurationMs",e.durationMs)}}defaultEventHandler(e){switch(e.eventName){case Yme:this.projectsUpdatedInBackgroundEvent(e.data.openFiles);break;case Zme:this.event({projectName:e.data.project.getProjectName(),reason:e.data.reason},e.eventName);break;case ege:this.event({projectName:e.data.project.getProjectName()},e.eventName);break;case tge:case age:case sge:case cge:this.event(e.data,e.eventName);break;case nge:this.event({triggerFile:e.data.triggerFile,configFile:e.data.configFileName,diagnostics:M(e.data.diagnostics,e=>nhe(e,!0))},e.eventName);break;case rge:this.event({projectName:e.data.project.getProjectName(),languageServiceEnabled:e.data.languageServiceEnabled},e.eventName);break;case ige:{const t="telemetry";this.event({telemetryEventName:e.eventName,payload:e.data},t);break}}}projectsUpdatedInBackgroundEvent(e){this.projectService.logger.info(`got projects updated in background ${e}`),e.length&&(this.suppressDiagnosticEvents||this.noGetErrOnBackgroundUpdate||(this.projectService.logger.info(`Queueing diagnostics update for ${e}`),this.errorCheck.startNew(t=>this.updateErrorCheck(t,e,100,!0))),this.event({openFiles:e},Yme))}logError(e,t){this.logErrorWorker(e,t)}logErrorWorker(e,t,n){let r="Exception on executing command "+t;if(e.message&&(r+=":\n"+nG(e.message),e.stack&&(r+="\n"+nG(e.stack))),this.logger.hasLevel(3)){if(n)try{const{file:e,project:t}=this.getFileAndProject(n),i=t.getScriptInfoForNormalizedPath(e);if(i){const e=HQ(i.getSnapshot());r+=`\n\nFile text of ${n.file}:${nG(e)}\n`}}catch{}if(e.ProgramFiles){r+=`\n\nProgram files: ${JSON.stringify(e.ProgramFiles)}\n`,r+="\n\nProjects::\n";let t=0;const n=e=>{r+=`\nProject '${e.projectName}' (${Ame[e.projectKind]}) ${t}\n`,r+=e.filesToString(!0),r+="\n-----------------------------------------------\n",t++};this.projectService.externalProjects.forEach(n),this.projectService.configuredProjects.forEach(n),this.projectService.inferredProjects.forEach(n)}}this.logger.msg(r,"Err")}send(e){"event"!==e.type||this.canUseEvents?this.writeMessage(e):this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${rG(e)}`)}writeMessage(e){var t;const n=ihe(e,this.logger,this.byteLength,this.host.newLine);null==(t=ir)||t.logEvent(`Response message size: ${n.length}`),this.host.write(n)}event(e,t){this.send(ahe(t,e))}doOutput(e,t,n,r,i){const o={seq:0,type:"response",command:t,request_seq:n,success:r,performanceData:this.performanceData};if(r){let t;if(ct(e))o.body=e,t=e.metadata,delete e.metadata;else if("object"==typeof e)if(e.metadata){const{metadata:n,...r}=e;o.body=r,t=n}else o.body=e;else o.body=e;t&&(o.metadata=t)}else Tn.assert(void 0===e);i&&(o.message=i),this.send(o)}semanticCheck(e,t){var n,r;null==(n=cr)||n.push(cr.Phase.Session,"semanticCheck",{file:e,configFilePath:t.canonicalConfigFilePath});const i=Yge(t,e)?Zfe:t.getLanguageService().getSemanticDiagnostics(e).filter(e=>!!e.file);this.sendDiagnosticsEvent(e,t,i,"semanticDiag"),null==(r=cr)||r.pop()}syntacticCheck(e,t){var n,r;null==(n=cr)||n.push(cr.Phase.Session,"syntacticCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSyntacticDiagnostics(e),"syntaxDiag"),null==(r=cr)||r.pop()}suggestionCheck(e,t){var n,r;null==(n=cr)||n.push(cr.Phase.Session,"suggestionCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSuggestionDiagnostics(e),"suggestionDiag"),null==(r=cr)||r.pop()}sendDiagnosticsEvent(e,t,n,r){try{this.event({file:e,diagnostics:n.map(n=>Zge(e,t,n))},r)}catch(e){this.logError(e,r)}}updateErrorCheck(e,t,n,r=!0){Tn.assert(!this.suppressDiagnosticEvents);const i=this.changeSeq,o=Math.min(n,200);let a=0;const s=()=>{a++,t.length>a&&e.delay("checkOne",o,c)},c=()=>{if(this.changeSeq!==i)return;let n=t[a];if(_t(n)&&(n=this.toPendingErrorCheck(n),!n))return void s();const{fileName:o,project:c}=n;Lge(c),c.containsFile(o,r)&&(this.syntacticCheck(o,c),this.changeSeq===i&&(0===c.projectService.serverMode?e.immediate("semanticCheck",()=>{this.semanticCheck(o,c),this.changeSeq===i&&(this.getPreferences(o).disableSuggestions?s():e.immediate("suggestionCheck",()=>{this.suggestionCheck(o,c),s()}))}):s()))};t.length>a&&this.changeSeq===i&&e.delay("checkOne",n,c)}cleanProjects(e,t){if(t){this.logger.info(`cleaning ${e}`);for(const e of t)e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram()}}cleanup(){this.cleanProjects("inferred projects",this.projectService.inferredProjects),this.cleanProjects("configured projects",We(this.projectService.configuredProjects.values())),this.cleanProjects("external projects",this.projectService.externalProjects),this.host.gc&&(this.logger.info("host.gc()"),this.host.gc())}getEncodedSyntacticClassifications(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e);return n.getEncodedSyntacticClassifications(t,e)}getEncodedSemanticClassifications(e){const{file:t,project:n}=this.getFileAndProject(e),r="2020"===e.format?"2020":"original";return n.getLanguageService().getEncodedSemanticClassifications(t,e,r)}getProject(e){return void 0===e?void 0:this.projectService.findProject(e)}getConfigFileAndProject(e){const t=this.getProject(e.projectFileName),n=nme(e.file);return{configFile:t&&t.hasConfigFile(n)?n:void 0,project:t}}getConfigFileDiagnostics(e,t,n){const r=O(ne(t.getAllProjectErrors(),t.getLanguageService().getCompilerOptionsDiagnostics()),t=>!!t.file&&t.file.fileName===e);return n?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r):M(r,e=>nhe(e,!1))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(e){return e.map(e=>({message:cV(e.messageText,this.host.newLine),start:e.start,length:e.length,category:Si(e),code:e.code,source:e.source,startLocation:e.file&&the(ns(e.file,e.start)),endLocation:e.file&&the(ns(e.file,e.start+e.length)),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:M(e.relatedInformation,ehe)}))}getCompilerOptionsDiagnostics(e){const t=this.getProject(e.projectFileName);return this.convertToDiagnosticsWithLinePosition(O(t.getLanguageService().getCompilerOptionsDiagnostics(),e=>!e.file),void 0)}convertToDiagnosticsWithLinePosition(e,t){return e.map(e=>({message:cV(e.messageText,this.host.newLine),start:e.start,length:e.length,category:Si(e),code:e.code,source:e.source,startLocation:t&&t.positionToLineOffset(e.start),endLocation:t&&t.positionToLineOffset(e.start+e.length),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:M(e.relatedInformation,ehe)}))}getDiagnosticsWorker(e,t,n,r){const{project:i,file:o}=this.getFileAndProject(e);if(t&&Yge(i,o))return Zfe;const a=i.getScriptInfoForNormalizedPath(o),s=n(i,o);return r?this.convertToDiagnosticsWithLinePosition(s,a):s.map(e=>Zge(o,i,e))}getDefinition(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapDefinitionInfoLocations(i.getLanguageService().getDefinitionAtPosition(r,o)||Zfe,i);return n?this.mapDefinitionInfo(a,i):a.map(e.mapToOriginalLocation)}mapDefinitionInfoLocations(e,t){return e.map(e=>{const n=mhe(e,t);return n?{...n,containerKind:e.containerKind,containerName:e.containerName,kind:e.kind,name:e.name,failedAliasResolution:e.failedAliasResolution,...e.unverified&&{unverified:e.unverified}}:e})}getDefinitionAndBoundSpan(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=Tn.checkDefined(i.getScriptInfo(r)),s=i.getLanguageService().getDefinitionAndBoundSpan(r,o);if(!s||!s.definitions)return{definitions:Zfe,textSpan:void 0};const c=this.mapDefinitionInfoLocations(s.definitions,i),{textSpan:l}=s;return n?{definitions:this.mapDefinitionInfo(c,i),textSpan:bhe(l,a)}:{definitions:c.map(e.mapToOriginalLocation),textSpan:l}}findSourceDefinition(e){var t;const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDefinitionAtPosition(n,i);let a=this.mapDefinitionInfoLocations(o||Zfe,r).slice();if(0===this.projectService.serverMode&&(!ee(a,e=>nme(e.fileName)!==n&&!e.isAmbient)||ee(a,e=>!!e.failedAliasResolution))){const e=st(e=>e.textSpan.start,xY(this.host.useCaseSensitiveFileNames));null==a||a.forEach(t=>e.add(t));const o=r.getNoDtsResolutionProject(n),_=o.getLanguageService(),u=null==(t=_.getDefinitionAtPosition(n,i,!0,!1))?void 0:t.filter(e=>nme(e.fileName)!==n);if(ee(u))for(const t of u){if(t.unverified){const n=c(t,r.getLanguageService().getProgram(),_.getProgram());if(ee(n)){for(const t of n)e.add(t);continue}}e.add(t)}else{const t=a.filter(e=>nme(e.fileName)!==n&&e.isAmbient);for(const a of ee(t)?t:function(){const e=r.getLanguageService(),t=e.getProgram(),o=XX(t.getSourceFile(n),i);if((Ku(o)||QN(o))&&qx(o.parent))return $x(o,t=>{var r;if(t===o)return;const i=null==(r=e.getDefinitionAtPosition(n,t.getStart(),!0,!1))?void 0:r.filter(e=>nme(e.fileName)!==n&&e.isAmbient).map(e=>({fileName:e.fileName,name:ey(o)}));return ee(i)?i:void 0})||Zfe;return Zfe}()){const t=s(a.fileName,n,o);if(!t)continue;const r=this.projectService.getOrCreateScriptInfoNotOpenedByClient(t,o.currentDirectory,o.directoryStructureHost,!1);if(!r)continue;o.containsScriptInfo(r)||(o.addRoot(r),o.updateGraph());const i=_.getProgram(),c=Tn.checkDefined(i.getSourceFile(t));for(const t of l(a.name,c,i))e.add(t)}}a=We(e.values())}return a=a.filter(e=>!e.isAmbient&&!e.failedAliasResolution),this.mapDefinitionInfo(a,r);function s(e,t,n){var i,o,a;const s=iC(e);if(s&&e.lastIndexOf(KM)===s.topLevelNodeModulesIndex){const c=e.substring(0,s.packageRootIndex),l=null==(i=r.getModuleResolutionCache())?void 0:i.getPackageJsonInfoCache(),_=r.getCompilationSettings(),u=lR(ta(c+"/package.json",r.getCurrentDirectory()),cR(l,r,_));if(!u)return;const d=aR(u,{moduleResolution:2},r,r.getModuleResolutionCache()),p=FR(AR(e.substring(s.topLevelPackageNameIndex+1,s.packageRootIndex))),f=r.toPath(e);if(d&&ee(d,e=>r.toPath(e)===f))return null==(o=n.resolutionCache.resolveSingleModuleNameWithoutWatching(p,t).resolvedModule)?void 0:o.resolvedFileName;{const r=`${p}/${aT(e.substring(s.packageRootIndex+1))}`;return null==(a=n.resolutionCache.resolveSingleModuleNameWithoutWatching(r,t).resolvedModule)?void 0:a.resolvedFileName}}}function c(e,t,r){var o;const a=r.getSourceFile(e.fileName);if(!a)return;const s=XX(t.getSourceFile(n),i),c=t.getTypeChecker().getSymbolAtLocation(s),_=c&&id(c,276);if(!_)return;return l((null==(o=_.propertyName)?void 0:o.text)||_.name.text,a,r)}function l(e,t,n){return $(Ice.Core.getTopMostDeclarationNamesInFile(e,t),e=>{const t=n.getTypeChecker().getSymbolAtLocation(e),r=vh(e);if(t&&r)return ble.createDefinitionInfo(r,n.getTypeChecker(),t,r,!0)})}}getEmitOutput(e){const{file:t,project:n}=this.getFileAndProject(e);if(!n.shouldEmitFile(n.getScriptInfo(t)))return{emitSkipped:!0,outputFiles:[],diagnostics:[]};const r=n.getLanguageService().getEmitOutput(t);return e.richResponse?{...r,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r.diagnostics):r.diagnostics.map(e=>nhe(e,!0))}:r}mapJSDocTagInfo(e,t,n){return e?e.map(e=>{var r;return{...e,text:n?this.mapDisplayParts(e.text,t):null==(r=e.text)?void 0:r.map(e=>e.text).join("")}}):[]}mapDisplayParts(e,t){return e?e.map(e=>"linkName"!==e.kind?e:{...e,target:this.toFileSpan(e.target.fileName,e.target.textSpan,t)}):[]}mapSignatureHelpItems(e,t,n){return e.map(e=>({...e,documentation:this.mapDisplayParts(e.documentation,t),parameters:e.parameters.map(e=>({...e,documentation:this.mapDisplayParts(e.documentation,t)})),tags:this.mapJSDocTagInfo(e.tags,t,n)}))}mapDefinitionInfo(e,t){return e.map(e=>({...this.toFileSpanWithContext(e.fileName,e.textSpan,e.contextSpan,t),...e.unverified&&{unverified:e.unverified}}))}static mapToOriginalLocation(e){return e.originalFileName?(Tn.assert(void 0!==e.originalTextSpan,"originalTextSpan should be present if originalFileName is"),{...e,fileName:e.originalFileName,textSpan:e.originalTextSpan,targetFileName:e.fileName,targetTextSpan:e.textSpan,contextSpan:e.originalContextSpan,targetContextSpan:e.contextSpan}):e}toFileSpan(e,t,n){const r=n.getLanguageService(),i=r.toLineColumnOffset(e,t.start),o=r.toLineColumnOffset(e,Us(t));return{file:e,start:{line:i.line+1,offset:i.character+1},end:{line:o.line+1,offset:o.character+1}}}toFileSpanWithContext(e,t,n,r){const i=this.toFileSpan(e,t,r),o=n&&this.toFileSpan(e,n,r);return o?{...i,contextStart:o.start,contextEnd:o.end}:i}getTypeDefinition(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.mapDefinitionInfoLocations(n.getLanguageService().getTypeDefinitionAtPosition(t,r)||Zfe,n);return this.mapDefinitionInfo(i,n)}mapImplementationLocations(e,t){return e.map(e=>{const n=mhe(e,t);return n?{...n,kind:e.kind,displayParts:e.displayParts}:e})}getImplementation(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapImplementationLocations(i.getLanguageService().getImplementationAtPosition(r,o)||Zfe,i);return n?a.map(({fileName:e,textSpan:t,contextSpan:n})=>this.toFileSpanWithContext(e,t,n,i)):a.map(e.mapToOriginalLocation)}getSyntacticDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?Zfe:this.getDiagnosticsWorker(e,!1,(e,t)=>e.getLanguageService().getSyntacticDiagnostics(t),!!e.includeLinePosition)}getSemanticDiagnosticsSync(e){const{configFile:t,project:n}=this.getConfigFileAndProject(e);return t?this.getConfigFileDiagnostics(t,n,!!e.includeLinePosition):this.getDiagnosticsWorker(e,!0,(e,t)=>e.getLanguageService().getSemanticDiagnostics(t).filter(e=>!!e.file),!!e.includeLinePosition)}getSuggestionDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?Zfe:this.getDiagnosticsWorker(e,!0,(e,t)=>e.getLanguageService().getSuggestionDiagnostics(t),!!e.includeLinePosition)}getJsxClosingTag(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getJsxClosingTagAtPosition(t,r);return void 0===i?void 0:{newText:i.newText,caretOffset:0}}getLinkedEditingRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getLinkedEditingRangeAtPosition(t,r),o=this.projectService.getScriptInfoForNormalizedPath(t);if(void 0!==o&&void 0!==i)return function(e,t){const n=e.ranges.map(e=>({start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(e.start+e.length)}));return e.wordPattern?{ranges:n,wordPattern:e.wordPattern}:{ranges:n}}(i,o)}getDocumentHighlights(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDocumentHighlights(n,i,e.filesToSearch);return o?t?o.map(({fileName:e,highlightSpans:t})=>{const n=r.getScriptInfo(e);return{file:e,highlightSpans:t.map(({textSpan:e,kind:t,contextSpan:r})=>({...xhe(e,r,n),kind:t}))}}):o:Zfe}provideInlayHints(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);return n.getLanguageService().provideInlayHints(t,e,this.getPreferences(t)).map(e=>{const{position:t,displayParts:n}=e;return{...e,position:r.positionToLineOffset(t),displayParts:null==n?void 0:n.map(({text:e,span:t,file:n})=>{if(t){Tn.assertIsDefined(n,"Target file should be defined together with its span.");const r=this.projectService.getScriptInfo(n);return{text:e,span:{start:r.positionToLineOffset(t.start),end:r.positionToLineOffset(t.start+t.length),file:n}}}return{text:e}})}})}mapCode(e){var t;const n=this.getHostFormatOptions(),r=this.getHostPreferences(),{file:i,languageService:o}=this.getFileAndLanguageServiceForSyntacticOperation(e),a=this.projectService.getScriptInfoForNormalizedPath(i),s=null==(t=e.mapping.focusLocations)?void 0:t.map(e=>e.map(e=>{const t=a.lineOffsetToPosition(e.start.line,e.start.offset);return{start:t,length:a.lineOffsetToPosition(e.end.line,e.end.offset)-t}})),c=o.mapCode(i,e.mapping.contents,s,n,r);return this.mapTextChangesToCodeEdits(c)}setCompilerOptionsForInferredProjects(e){this.projectService.setCompilerOptionsForInferredProjects(e.options,e.projectRootPath)}getProjectInfo(e){return this.getProjectInfoWorker(e.file,e.projectFileName,e.needFileNameList,!1)}getProjectInfoWorker(e,t,n,r){const{project:i}=this.getFileAndProjectWorker(e,t);Lge(i);return{configFileName:i.getProjectName(),languageServiceDisabled:!i.languageServiceEnabled,fileNames:n?i.getFileNames(!1,r):void 0}}getRenameInfo(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.getPreferences(t);return n.getLanguageService().getRenameInfo(t,r,i)}getProjects(e,t,n){let r,i;if(e.projectFileName){const t=this.getProject(e.projectFileName);t&&(r=[t])}else{const o=t?this.projectService.getScriptInfoEnsuringProjectsUptoDate(e.file):this.projectService.getScriptInfo(e.file);if(!o)return n?Zfe:(this.projectService.logErrorForScriptInfoNotFound(e.file),Xfe.ThrowNoProject());t||this.projectService.ensureDefaultProjectForFile(o),r=o.containingProjects,i=this.projectService.getSymlinkedProjects(o)}return r=O(r,e=>e.languageServiceEnabled&&!e.isOrphan()),n||r&&r.length||i?i?{projects:r,symLinkedProjects:i}:r:(this.projectService.logErrorForScriptInfoNotFound(e.file??e.projectFileName),Xfe.ThrowNoProject())}getDefaultProject(e){if(e.projectFileName){const t=this.getProject(e.projectFileName);if(t)return t;if(!e.file)return Xfe.ThrowNoProject()}return this.projectService.getScriptInfo(e.file).getDefaultProject()}getRenameLocations(e,t){const n=nme(e.file),r=this.getPositionInFile(e,n),i=this.getProjects(e),o=this.getDefaultProject(e),a=this.getPreferences(n),s=this.mapRenameInfo(o.getLanguageService().getRenameInfo(n,r,a),Tn.checkDefined(this.projectService.getScriptInfo(n)));if(!s.canRename)return t?{info:s,locs:[]}:[];const c=function(e,t,n,r,i,o,a){const s=lhe(e,t,n,!0,(e,t)=>e.getLanguageService().findRenameLocations(t.fileName,t.pos,r,i,o),(e,t)=>t(phe(e)));if(ct(s))return s;const c=[],l=she(a);return s.forEach((e,t)=>{for(const n of e)l.has(n)||fhe(phe(n),t)||(c.push(n),l.add(n))}),c}(i,o,{fileName:e.file,pos:r},!!e.findInStrings,!!e.findInComments,a,this.host.useCaseSensitiveFileNames);return t?{info:s,locs:this.toSpanGroups(c)}:c}mapRenameInfo(e,t){if(e.canRename){const{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:c}=e;return{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:bhe(c,t)}}return e}toSpanGroups(e){const t=new Map;for(const{fileName:n,textSpan:r,contextSpan:i,originalContextSpan:o,originalTextSpan:a,originalFileName:s,...c}of e){let e=t.get(n);e||t.set(n,e={file:n,locs:[]});const o=Tn.checkDefined(this.projectService.getScriptInfo(n));e.locs.push({...xhe(r,i,o),...c})}return We(t.values())}getReferences(e,t){const n=nme(e.file),r=this.getProjects(e),i=this.getPositionInFile(e,n),o=function(e,t,n,r,i){var o,a;const s=lhe(e,t,n,!1,(e,t)=>(i.info(`Finding references to ${t.fileName} position ${t.pos} in project ${e.getProjectName()}`),e.getLanguageService().findReferences(t.fileName,t.pos)),(e,t)=>{t(phe(e.definition));for(const n of e.references)t(phe(n))});if(ct(s))return s;const c=s.get(t);if(void 0===(null==(a=null==(o=null==c?void 0:c[0])?void 0:o.references[0])?void 0:a.isDefinition))s.forEach(e=>{for(const t of e)for(const e of t.references)delete e.isDefinition});else{const e=she(r);for(const t of c)for(const n of t.references)if(n.isDefinition){e.add(n);break}const t=new Set;for(;;){let n=!1;if(s.forEach((r,i)=>{t.has(i)||i.getLanguageService().updateIsDefinitionOfReferencedSymbols(r,e)&&(t.add(i),n=!0)}),!n)break}s.forEach((e,n)=>{if(!t.has(n))for(const t of e)for(const e of t.references)e.isDefinition=!1})}const l=[],_=she(r);return s.forEach((e,t)=>{for(const n of e){const e=fhe(phe(n.definition),t),i=void 0===e?n.definition:{...n.definition,textSpan:tc(e.pos,n.definition.textSpan.length),fileName:e.fileName,contextSpan:ghe(n.definition,t)};let o=C(l,e=>bY(e.definition,i,r));o||(o={definition:i,references:[]},l.push(o));for(const e of n.references)_.has(e)||fhe(phe(e),t)||(_.add(e),o.references.push(e))}}),l.filter(e=>0!==e.references.length)}(r,this.getDefaultProject(e),{fileName:e.file,pos:i},this.host.useCaseSensitiveFileNames,this.logger);if(!t)return o;const a=this.getPreferences(n),s=this.getDefaultProject(e),c=s.getScriptInfoForNormalizedPath(n),l=s.getLanguageService().getQuickInfoAtPosition(n,i),_=l?_5(l.displayParts):"",u=l&&l.textSpan,d=u?c.positionToLineOffset(u.start).offset:0,p=u?c.getSnapshot().getText(u.start,Us(u)):"";return{refs:z(o,e=>e.references.map(e=>The(this.projectService,e,a))),symbolName:p,symbolStartOffset:d,symbolDisplayString:_}}getFileReferences(e,t){const n=this.getProjects(e),r=e.file,i=this.getPreferences(nme(r)),o=[],a=she(this.host.useCaseSensitiveFileNames);if(che(n,void 0,e=>{if(e.getCancellationToken().isCancellationRequested())return;const t=e.getLanguageService().getFileReferences(r);if(t)for(const e of t)a.has(e)||(o.push(e),a.add(e))}),!t)return o;return{refs:o.map(e=>The(this.projectService,e,i)),symbolName:`"${e.file}"`}}openClientFile(e,t,n,r){this.projectService.openClientFileWithNormalizedPath(e,t,n,!1,r)}getPosition(e,t){return void 0!==e.position?e.position:t.lineOffsetToPosition(e.line,e.offset)}getPositionInFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(t);return this.getPosition(e,n)}getFileAndProject(e){return this.getFileAndProjectWorker(e.file,e.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(e){const{file:t,project:n}=this.getFileAndProject(e);return{file:t,languageService:n.getLanguageService(!1)}}getFileAndProjectWorker(e,t){const n=nme(e);return{file:n,project:this.getProject(t)||this.projectService.ensureDefaultProjectForFile(n)}}getOutliningSpans(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getOutliningSpans(n);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return i.map(t=>({textSpan:bhe(t.textSpan,e),hintSpan:bhe(t.hintSpan,e),bannerText:t.bannerText,autoCollapse:t.autoCollapse,kind:t.kind}))}return i}getTodoComments(e){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getTodoComments(t,e.descriptors)}getDocCommentTemplate(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getDocCommentTemplateAtPosition(t,r,this.getPreferences(t),this.getFormatOptions(t))}getSpanOfEnclosingComment(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.onlyMultiLine,i=this.getPositionInFile(e,t);return n.getSpanOfEnclosingComment(t,i,r)}getIndentation(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=e.options?mge(e.options):this.getFormatOptions(t);return{position:r,indentation:n.getIndentationAtPosition(t,r,i)}}getBreakpointStatement(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getBreakpointStatementAtPosition(t,r)}getNameOrDottedNameSpan(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getNameOrDottedNameSpan(t,r,r)}isValidBraceCompletion(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.isValidBraceCompletionAtPosition(t,r,e.openingBrace.charCodeAt(0))}getQuickInfoWorker(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getQuickInfoAtPosition(n,this.getPosition(e,i));if(!o)return;const a=!!this.getPreferences(n).displayPartsForJSDoc;if(t){const e=_5(o.displayParts);return{kind:o.kind,kindModifiers:o.kindModifiers,start:i.positionToLineOffset(o.textSpan.start),end:i.positionToLineOffset(Us(o.textSpan)),displayString:e,documentation:a?this.mapDisplayParts(o.documentation,r):_5(o.documentation),tags:this.mapJSDocTagInfo(o.tags,r,a)}}return a?o:{...o,tags:this.mapJSDocTagInfo(o.tags,r,!1)}}getFormattingEditsForRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=r.lineOffsetToPosition(e.endLine,e.endOffset),a=n.getFormattingEditsForRange(t,i,o,this.getFormatOptions(t));if(a)return a.map(e=>this.convertTextChangeToCodeEdit(e,r))}getFormattingEditsForRangeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?mge(e.options):this.getFormatOptions(t);return n.getFormattingEditsForRange(t,e.position,e.endPosition,r)}getFormattingEditsForDocumentFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?mge(e.options):this.getFormatOptions(t);return n.getFormattingEditsForDocument(t,r)}getFormattingEditsAfterKeystrokeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?mge(e.options):this.getFormatOptions(t);return n.getFormattingEditsAfterKeystroke(t,e.position,e.key,r)}getFormattingEditsAfterKeystroke(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=this.getFormatOptions(t),a=n.getFormattingEditsAfterKeystroke(t,i,e.key,o);if("\n"===e.key&&(!a||0===a.length||function(e,t){return e.every(e=>Us(e.span)({start:r.positionToLineOffset(e.span.start),end:r.positionToLineOffset(Us(e.span)),newText:e.newText?e.newText:""}))}getCompletions(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getCompletionsAtPosition(n,o,{...xge(this.getPreferences(n)),triggerCharacter:e.triggerCharacter,triggerKind:e.triggerKind,includeExternalModuleExports:e.includeExternalModuleExports,includeInsertTextCompletions:e.includeInsertTextCompletions},r.projectService.getFormatCodeOptions(n));if(void 0===a)return;if("completions-full"===t)return a;const s=e.prefix||"",c=$(a.entries,e=>{if(a.isMemberCompletion||ln(e.name.toLowerCase(),s.toLowerCase())){const{name:t,kind:n,kindModifiers:r,sortText:o,insertText:a,filterText:s,replacementSpan:c,hasAction:l,source:_,sourceDisplay:u,labelDetails:d,isSnippet:p,isRecommended:f,isPackageJsonImport:m,isImportStatementCompletion:g,data:h}=e;return{name:t,kind:n,kindModifiers:r,sortText:o,insertText:a,filterText:s,replacementSpan:c?bhe(c,i):void 0,isSnippet:p,hasAction:l||void 0,source:_,sourceDisplay:u,labelDetails:d,isRecommended:f,isPackageJsonImport:m,isImportStatementCompletion:g,data:h}}});if("completions"===t)return a.metadata&&(c.metadata=a.metadata),c;return{...a,optionalReplacementSpan:a.optionalReplacementSpan&&bhe(a.optionalReplacementSpan,i),entries:c}}getCompletionEntryDetails(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.projectService.getFormatCodeOptions(n),s=!!this.getPreferences(n).displayPartsForJSDoc,c=$(e.entryNames,e=>{const{name:t,source:i,data:s}="string"==typeof e?{name:e,source:void 0,data:void 0}:e;return r.getLanguageService().getCompletionEntryDetails(n,o,t,a,i,this.getPreferences(n),s?pt(s,Che):void 0)});return t?s?c:c.map(e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)})):c.map(e=>({...e,codeActions:M(e.codeActions,e=>this.mapCodeAction(e)),documentation:this.mapDisplayParts(e.documentation,r),tags:this.mapJSDocTagInfo(e.tags,r,s)}))}getCompileOnSaveAffectedFileList(e){const t=this.getProjects(e,!0,!0),n=this.projectService.getScriptInfo(e.file);return n?function(e,t,n,r){const i=q(ct(n)?n:n.projects,t=>r(t,e));return!ct(n)&&n.symLinkedProjects&&n.symLinkedProjects.forEach((e,n)=>{const o=t(n);i.push(...z(e,e=>r(e,o)))}),oe(i,Pt)}(n,e=>this.projectService.getScriptInfoForPath(e),t,(e,t)=>{if(!e.compileOnSaveEnabled||!e.languageServiceEnabled||e.isOrphan())return;const n=e.getCompilationSettings();return n.noEmit||lO(t.fileName)&&!function(e){return VS(e)||!!e.emitDecoratorMetadata}(n)?void 0:{projectFileName:e.getProjectName(),fileNames:e.getCompileOnSaveAffectedFileList(t),projectUsesOutFile:!!n.outFile}}):Zfe}emitFile(e){const{file:t,project:n}=this.getFileAndProject(e);if(n||Xfe.ThrowNoProject(),!n.languageServiceEnabled)return!!e.richResponse&&{emitSkipped:!0,diagnostics:[]};const r=n.getScriptInfo(t),{emitSkipped:i,diagnostics:o}=n.emitFile(r,(e,t,n)=>this.host.writeFile(e,t,n));return e.richResponse?{emitSkipped:i,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(o):o.map(e=>nhe(e,!0))}:!i}getSignatureHelpItems(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getSignatureHelpItems(n,o,e),s=!!this.getPreferences(n).displayPartsForJSDoc;if(a&&t){const e=a.applicableSpan;return{...a,applicableSpan:{start:i.positionToLineOffset(e.start),end:i.positionToLineOffset(e.start+e.length)},items:this.mapSignatureHelpItems(a.items,r,s)}}return s||!a?a:{...a,items:a.items.map(e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)}))}}toPendingErrorCheck(e){const t=nme(e),n=this.projectService.tryGetDefaultProjectForFile(t);return n&&{fileName:t,project:n}}getDiagnostics(e,t,n){this.suppressDiagnosticEvents||n.length>0&&this.updateErrorCheck(e,n,t)}change(e){const t=this.projectService.getScriptInfo(e.file);Tn.assert(!!t),t.textStorage.switchToScriptVersionCache();const n=t.lineOffsetToPosition(e.line,e.offset),r=t.lineOffsetToPosition(e.endLine,e.endOffset);n>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(t,Q({span:{start:n,length:r-n},newText:e.insertString})))}reload(e,t){const n=nme(e.file),r=void 0===e.tmpfile?void 0:nme(e.tmpfile),i=this.projectService.getScriptInfoForNormalizedPath(n);i&&(this.changeSeq++,i.reloadFromFile(r)&&this.doOutput(void 0,"reload",t,!0))}saveToTmp(e,t){const n=this.projectService.getScriptInfo(e);n&&n.saveTo(t)}closeClientFile(e){if(!e)return;const t=na(e);this.projectService.closeClientFile(t)}mapLocationNavigationBarItems(e,t){return M(e,e=>({text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map(e=>bhe(e,t)),childItems:this.mapLocationNavigationBarItems(e.childItems,t),indent:e.indent}))}getNavigationBarItems(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationBarItems(n);return i?t?this.mapLocationNavigationBarItems(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}toLocationNavigationTree(e,t){return{text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map(e=>bhe(e,t)),nameSpan:e.nameSpan&&bhe(e.nameSpan,t),childItems:M(e.childItems,e=>this.toLocationNavigationTree(e,t))}}getNavigationTree(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationTree(n);return i?t?this.toLocationNavigationTree(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}getNavigateToItems(e,t){const n=this.getFullNavigateToItems(e);return z(n,t?({project:e,navigateToItems:t})=>t.map(t=>{const n=e.getScriptInfo(t.fileName),r={name:t.name,kind:t.kind,kindModifiers:t.kindModifiers,isCaseSensitive:t.isCaseSensitive,matchKind:t.matchKind,file:t.fileName,start:n.positionToLineOffset(t.textSpan.start),end:n.positionToLineOffset(Us(t.textSpan))};return t.kindModifiers&&""!==t.kindModifiers&&(r.kindModifiers=t.kindModifiers),t.containerName&&t.containerName.length>0&&(r.containerName=t.containerName),t.containerKind&&t.containerKind.length>0&&(r.containerKind=t.containerKind),r}):({navigateToItems:e})=>e)}getFullNavigateToItems(e){const{currentFileOnly:t,searchValue:n,maxResultCount:r,projectFileName:i}=e;if(t){Tn.assertIsDefined(e.file);const{file:t,project:i}=this.getFileAndProject(e);return[{project:i,navigateToItems:i.getLanguageService().getNavigateToItems(n,r,t)}]}const o=this.getHostPreferences(),a=[],s=new Map;if(e.file||i){che(this.getProjects(e),void 0,e=>c(e))}else this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(e=>c(e));return a;function c(e){const t=O(e.getLanguageService().getNavigateToItems(n,r,void 0,e.isNonTsProject(),o.excludeLibrarySymbolsInNavTo),t=>function(e){const t=e.name;if(!s.has(t))return s.set(t,[e]),!0;const n=s.get(t);for(const t of n)if(l(t,e))return!1;return n.push(e),!0}(t)&&!fhe(phe(t),e));t.length&&a.push({project:e,navigateToItems:t})}function l(e,t){return e===t||!(!e||!t)&&(e.containerKind===t.containerKind&&e.containerName===t.containerName&&e.fileName===t.fileName&&e.isCaseSensitive===t.isCaseSensitive&&e.kind===t.kind&&e.kindModifiers===t.kindModifiers&&e.matchKind===t.matchKind&&e.name===t.name&&e.textSpan.start===t.textSpan.start&&e.textSpan.length===t.textSpan.length)}}getSupportedCodeFixes(e){if(!e)return d5();if(e.file){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getSupportedCodeFixes(t)}const t=this.getProject(e.projectFileName);return t||Xfe.ThrowNoProject(),t.getLanguageService().getSupportedCodeFixes()}isLocation(e){return void 0!==e.line}extractPositionOrRange(e,t){let n,r;var i;return this.isLocation(e)?n=void 0!==(i=e).position?i.position:t.lineOffsetToPosition(i.line,i.offset):r=this.getRange(e,t),Tn.checkDefined(void 0===n?r:n)}getRange(e,t){const{startPosition:n,endPosition:r}=this.getStartAndEndPosition(e,t);return{pos:n,end:r}}getApplicableRefactors(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getApplicableRefactors(t,this.extractPositionOrRange(e,r),this.getPreferences(t),e.triggerReason,e.kind,e.includeInteractiveActions).map(e=>({...e,actions:e.actions.map(e=>({...e,range:e.range?{start:the({line:e.range.start.line,character:e.range.start.offset}),end:the({line:e.range.end.line,character:e.range.end.offset})}:void 0}))}))}getEditsForRefactor(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getEditsForRefactor(n,this.getFormatOptions(n),this.extractPositionOrRange(e,i),e.refactor,e.action,this.getPreferences(n),e.interactiveRefactorArguments);if(void 0===o)return{edits:[]};if(t){const{renameFilename:e,renameLocation:t,edits:n}=o;let i;if(void 0!==e&&void 0!==t){i=khe(HQ(r.getScriptInfoForNormalizedPath(nme(e)).getSnapshot()),e,t,n)}return{renameLocation:i,renameFilename:e,edits:this.mapTextChangesToCodeEdits(n),notApplicableReason:o.notApplicableReason}}return o}getMoveToRefactoringFileSuggestions(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getMoveToRefactoringFileSuggestions(t,this.extractPositionOrRange(e,r),this.getPreferences(t))}getPasteEdits(e){const{file:t,project:n}=this.getFileAndProject(e),r=e.copiedFrom?{file:e.copiedFrom.file,range:e.copiedFrom.spans.map(t=>this.getRange({file:e.copiedFrom.file,startLine:t.start.line,startOffset:t.start.offset,endLine:t.end.line,endOffset:t.end.offset},n.getScriptInfoForNormalizedPath(nme(e.copiedFrom.file))))}:void 0,i=n.getLanguageService().getPasteEdits({targetFile:t,pastedText:e.pastedText,pasteLocations:e.pasteLocations.map(e=>this.getRange({file:t,startLine:e.start.line,startOffset:e.start.offset,endLine:e.end.line,endOffset:e.end.offset},n.getScriptInfoForNormalizedPath(t))),copiedFrom:r,preferences:this.getPreferences(t)},this.getFormatOptions(t));return i&&this.mapPasteEditsAction(i)}organizeImports(e,t){Tn.assert("file"===e.scope.type);const{file:n,project:r}=this.getFileAndProject(e.scope.args),i=r.getLanguageService().organizeImports({fileName:n,mode:e.mode??(e.skipDestructiveCodeActions?"SortAndCombine":void 0),type:"file"},this.getFormatOptions(n),this.getPreferences(n));return t?this.mapTextChangesToCodeEdits(i):i}getEditsForFileRename(e,t){const n=nme(e.oldFilePath),r=nme(e.newFilePath),i=this.getHostFormatOptions(),o=this.getHostPreferences(),a=new Set,s=[];return this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(e=>{const t=e.getLanguageService().getEditsForFileRename(n,r,i,o),c=[];for(const e of t)a.has(e.fileName)||(s.push(e),c.push(e.fileName));for(const e of c)a.add(e)}),t?s.map(e=>this.mapTextChangeToCodeEdit(e)):s}getCodeFixes(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),{startPosition:o,endPosition:a}=this.getStartAndEndPosition(e,i);let s;try{s=r.getLanguageService().getCodeFixesAtPosition(n,o,a,e.errorCodes,this.getFormatOptions(n),this.getPreferences(n))}catch(t){const i=r.getLanguageService(),s=[...i.getSyntacticDiagnostics(n),...i.getSemanticDiagnostics(n),...i.getSuggestionDiagnostics(n)].map(e=>Ys(o,a-o,e.start,e.length)&&e.code),c=e.errorCodes.find(e=>!s.includes(e));throw void 0!==c&&(t.message=`BADCLIENT: Bad error code, ${c} not found in range ${o}..${a} (found: ${s.join(", ")}); could have caused this error:\n${t.message}`),t}return t?s.map(e=>this.mapCodeFixAction(e)):s}getCombinedCodeFix({scope:e,fixId:t},n){Tn.assert("file"===e.type);const{file:r,project:i}=this.getFileAndProject(e.args),o=i.getLanguageService().getCombinedCodeFix({type:"file",fileName:r},t,this.getFormatOptions(r),this.getPreferences(r));return n?{changes:this.mapTextChangesToCodeEdits(o.changes),commands:o.commands}:o}applyCodeActionCommand(e){const t=e.command;for(const e of lt(t)){const{file:t,project:n}=this.getFileAndProject(e);n.getLanguageService().applyCodeActionCommand(e,this.getFormatOptions(t)).then(e=>{},e=>{})}return{}}getStartAndEndPosition(e,t){let n,r;return void 0!==e.startPosition?n=e.startPosition:(n=t.lineOffsetToPosition(e.startLine,e.startOffset),e.startPosition=n),void 0!==e.endPosition?r=e.endPosition:(r=t.lineOffsetToPosition(e.endLine,e.endOffset),e.endPosition=r),{startPosition:n,endPosition:r}}mapCodeAction({description:e,changes:t,commands:n}){return{description:e,changes:this.mapTextChangesToCodeEdits(t),commands:n}}mapCodeFixAction({fixName:e,description:t,changes:n,commands:r,fixId:i,fixAllDescription:o}){return{fixName:e,description:t,changes:this.mapTextChangesToCodeEdits(n),commands:r,fixId:i,fixAllDescription:o}}mapPasteEditsAction({edits:e,fixId:t}){return{edits:this.mapTextChangesToCodeEdits(e),fixId:t}}mapTextChangesToCodeEdits(e){return e.map(e=>this.mapTextChangeToCodeEdit(e))}mapTextChangeToCodeEdit(e){const t=this.projectService.getScriptInfoOrConfig(e.fileName);return!!e.isNewFile==!!t&&(t||this.projectService.logErrorForScriptInfoNotFound(e.fileName),Tn.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!e.isNewFile,hasScriptInfo:!!t}))),t?{fileName:e.fileName,textChanges:e.textChanges.map(e=>function(e,t){return{start:She(t,e.span.start),end:She(t,Us(e.span)),newText:e.newText}}(e,t))}:function(e){Tn.assert(1===e.textChanges.length);const t=Ne(e.textChanges);return Tn.assert(0===t.span.start&&0===t.span.length),{fileName:e.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:t.newText}]}}(e)}convertTextChangeToCodeEdit(e,t){return{start:t.positionToLineOffset(e.span.start),end:t.positionToLineOffset(e.span.start+e.span.length),newText:e.newText?e.newText:""}}getBraceMatching(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getBraceMatchingAtPosition(n,o);return a?t?a.map(e=>bhe(e,i)):a:void 0}getDiagnosticsForProject(e,t,n){if(this.suppressDiagnosticEvents)return;const{fileNames:r,languageServiceDisabled:i}=this.getProjectInfoWorker(n,void 0,!0,!0);if(i)return;const o=r.filter(e=>!e.includes("lib.d.ts"));if(0===o.length)return;const a=[],s=[],c=[],l=[],_=nme(n),u=this.projectService.ensureDefaultProjectForFile(_);for(const e of o)if(this.getCanonicalFileName(e)===this.getCanonicalFileName(n))a.push(e);else{this.projectService.getScriptInfo(e).isScriptOpen()?s.push(e):lO(e)?l.push(e):c.push(e)}const d=[...a,...s,...c,...l].map(e=>({fileName:e,project:u}));this.updateErrorCheck(e,d,t,!1)}configurePlugin(e){this.projectService.configurePlugin(e)}getSmartSelectionRange(e,t){const{locations:n}=e,{file:r,languageService:i}=this.getFileAndLanguageServiceForSyntacticOperation(e),o=Tn.checkDefined(this.projectService.getScriptInfo(r));return M(n,e=>{const n=this.getPosition(e,o),a=i.getSmartSelectionRange(r,n);return t?this.mapSelectionRange(a,o):a})}toggleLineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfo(n),o=this.getRange(e,i),a=r.toggleLineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}toggleMultilineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.toggleMultilineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}commentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.commentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}uncommentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.uncommentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}mapSelectionRange(e,t){const n={textSpan:bhe(e.textSpan,t)};return e.parent&&(n.parent=this.mapSelectionRange(e.parent,t)),n}getScriptInfoFromProjectService(e){const t=nme(e),n=this.projectService.getScriptInfoForNormalizedPath(t);return n||(this.projectService.logErrorForScriptInfoNotFound(t),Xfe.ThrowNoProject())}toProtocolCallHierarchyItem(e){const t=this.getScriptInfoFromProjectService(e.file);return{name:e.name,kind:e.kind,kindModifiers:e.kindModifiers,file:e.file,containerName:e.containerName,span:bhe(e.span,t),selectionSpan:bhe(e.selectionSpan,t)}}toProtocolCallHierarchyIncomingCall(e){const t=this.getScriptInfoFromProjectService(e.from.file);return{from:this.toProtocolCallHierarchyItem(e.from),fromSpans:e.fromSpans.map(e=>bhe(e,t))}}toProtocolCallHierarchyOutgoingCall(e,t){return{to:this.toProtocolCallHierarchyItem(e.to),fromSpans:e.fromSpans.map(e=>bhe(e,t))}}prepareCallHierarchy(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);if(r){const i=this.getPosition(e,r),o=n.getLanguageService().prepareCallHierarchy(t,i);return o&&i0(o,e=>this.toProtocolCallHierarchyItem(e))}}provideCallHierarchyIncomingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyIncomingCalls(t,this.getPosition(e,r)).map(e=>this.toProtocolCallHierarchyIncomingCall(e))}provideCallHierarchyOutgoingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyOutgoingCalls(t,this.getPosition(e,r)).map(e=>this.toProtocolCallHierarchyOutgoingCall(e,r))}getCanonicalFileName(e){return na(this.host.useCaseSensitiveFileNames?e:xt(e))}exit(){}notRequired(){return{responseRequired:!1}}requiredResponse(e){return{response:e,responseRequired:!0}}addProtocolHandler(e,t){if(this.handlers.has(e))throw new Error(`Protocol handler already exists for command "${e}"`);this.handlers.set(e,t)}setCurrentRequest(e){Tn.assert(void 0===this.currentRequestId),this.currentRequestId=e,this.cancellationToken.setRequest(e)}resetCurrentRequest(e){Tn.assert(this.currentRequestId===e),this.currentRequestId=void 0,this.cancellationToken.resetRequest(e)}executeWithRequestId(e,t){try{return this.setCurrentRequest(e),t()}finally{this.resetCurrentRequest(e)}}executeCommand(e){const t=this.handlers.get(e.command);if(t){const n=this.executeWithRequestId(e.seq,()=>t(e));return this.projectService.enableRequestedPlugins(),n}return this.logger.msg(`Unrecognized JSON command:${rG(e)}`,"Err"),this.doOutput(void 0,"unknown",e.seq,!1,`Unrecognized JSON command: ${e.command}`),{responseRequired:!1}}onMessage(e){var t,n,r,i,o,a,s,c,l,_,u;let d,p,f;this.gcTimer.scheduleCollect(),this.performanceData=void 0,this.logger.hasLevel(2)&&(d=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${nG(this.toStringMessage(e))}`));try{p=this.parseMessage(e),f=p.arguments&&p.arguments.file?p.arguments:void 0,null==(t=cr)||t.instant(cr.Phase.Session,"request",{seq:p.seq,command:p.command}),null==(n=ir)||n.logStartCommand(""+p.command,this.toStringMessage(e).substring(0,100)),null==(r=cr)||r.push(cr.Phase.Session,"executeCommand",{seq:p.seq,command:p.command},!0);const{response:s,responseRequired:c}=this.executeCommand(p);if(null==(i=cr)||i.pop(),this.logger.hasLevel(2)){const e=(m=this.hrtime(d),(1e9*m[0]+m[1])/1e6).toFixed(4);c?this.logger.perftrc(`${p.seq}::${p.command}: elapsed time (in milliseconds) ${e}`):this.logger.perftrc(`${p.seq}::${p.command}: async elapsed time (in milliseconds) ${e}`)}null==(o=ir)||o.logStopCommand(""+p.command,"Success"),null==(a=cr)||a.instant(cr.Phase.Session,"response",{seq:p.seq,command:p.command,success:!!s}),s?this.doOutput(s,p.command,p.seq,!0):c&&this.doOutput(void 0,p.command,p.seq,!1,"No content available.")}catch(t){if(null==(s=cr)||s.popAll(),t instanceof Br)return null==(c=ir)||c.logStopCommand(""+(p&&p.command),"Canceled: "+t),null==(l=cr)||l.instant(cr.Phase.Session,"commandCanceled",{seq:null==p?void 0:p.seq,command:null==p?void 0:p.command}),void this.doOutput({canceled:!0},p.command,p.seq,!0);this.logErrorWorker(t,this.toStringMessage(e),f),null==(_=ir)||_.logStopCommand(""+(p&&p.command),"Error: "+t),null==(u=cr)||u.instant(cr.Phase.Session,"commandError",{seq:null==p?void 0:p.seq,command:null==p?void 0:p.command,message:t.message}),this.doOutput(void 0,p?p.command:"unknown",p?p.seq:0,!1,"Error processing request. "+t.message+"\n"+t.stack)}var m}parseMessage(e){return JSON.parse(e)}toStringMessage(e){return e}getFormatOptions(e){return this.projectService.getFormatCodeOptions(e)}getPreferences(e){return this.projectService.getPreferences(e)}getHostFormatOptions(){return this.projectService.getHostFormatCodeOptions()}getHostPreferences(){return this.projectService.getHostPreferences()}};function bhe(e,t){return{start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(Us(e))}}function xhe(e,t,n){const r=bhe(e,n),i=t&&bhe(t,n);return i?{...r,contextStart:i.start,contextEnd:i.end}:r}function She(e,t){return Hge(e)?{line:(n=e.getLineAndCharacterOfPosition(t)).line+1,offset:n.character+1}:e.positionToLineOffset(t);var n}function khe(e,t,n,r){const i=function(e,t,n){for(const{fileName:r,textChanges:i}of n)if(r===t)for(let t=i.length-1;t>=0;t--){const{newText:n,span:{start:r,length:o}}=i[t];e=e.slice(0,r)+n+e.slice(r+o)}return e}(e,t,r),{line:o,character:a}=Za(Ga(i),n);return{line:o+1,offset:a+1}}function The(e,{fileName:t,textSpan:n,contextSpan:r,isWriteAccess:i,isDefinition:o},{disableLineTextInReferences:a}){const s=Tn.checkDefined(e.getScriptInfo(t)),c=xhe(n,r,s),l=a?void 0:function(e,t){const n=e.lineToTextSpan(t.start.line-1);return e.getSnapshot().getText(n.start,Us(n)).replace(/\r|\n/g,"")}(s,c);return{file:t,...c,lineText:l,isWriteAccess:i,isDefinition:o}}function Che(e){return void 0===e||e&&"object"==typeof e&&"string"==typeof e.exportName&&(void 0===e.fileName||"string"==typeof e.fileName)&&(void 0===e.ambientModuleName||"string"==typeof e.ambientModuleName&&(void 0===e.isPackageJsonImport||"boolean"==typeof e.isPackageJsonImport))}var whe=(e=>(e[e.PreStart=0]="PreStart",e[e.Start=1]="Start",e[e.Entire=2]="Entire",e[e.Mid=3]="Mid",e[e.End=4]="End",e[e.PostEnd=5]="PostEnd",e))(whe||{}),Nhe=class{constructor(){this.goSubtree=!0,this.lineIndex=new Ahe,this.endBranch=[],this.state=2,this.initialText="",this.trailingText="",this.lineIndex.root=new Ihe,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(e,t){t&&(this.trailingText=""),e=e?this.initialText+e+this.trailingText:this.initialText+this.trailingText;const n=Ahe.linesFromText(e).lines;let r,i;n.length>1&&""===n[n.length-1]&&n.pop();for(let e=this.endBranch.length-1;e>=0;e--)this.endBranch[e].updateCounts(),0===this.endBranch[e].charCount()&&(i=this.endBranch[e],r=e>0?this.endBranch[e-1]:this.branchNode);i&&r.remove(i);const o=this.startPath[this.startPath.length-1];if(n.length>0)if(o.text=n[0],n.length>1){let e=new Array(n.length-1),t=o;for(let t=1;t=0;){const n=this.startPath[r];e=n.insertAt(t,e),r--,t=n}let i=e.length;for(;i>0;){const t=new Ihe;t.add(this.lineIndex.root),e=t.insertAt(this.lineIndex.root,e),i=e.length,this.lineIndex.root=t}this.lineIndex.root.updateCounts()}else for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts();else{this.startPath[this.startPath.length-2].remove(o);for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts()}return this.lineIndex}post(e,t,n){n===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(e,t,n,r,i){const o=this.stack[this.stack.length-1];let a;function s(e){return e.isLeaf()?new Ohe(""):new Ihe}switch(2===this.state&&1===i&&(this.state=1,this.branchNode=o,this.lineCollectionAtBranch=n),i){case 0:this.goSubtree=!1,4!==this.state&&o.add(n);break;case 1:4===this.state?this.goSubtree=!1:(a=s(n),o.add(a),this.startPath.push(a));break;case 2:4!==this.state?(a=s(n),o.add(a),this.startPath.push(a)):n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 3:this.goSubtree=!1;break;case 4:4!==this.state?this.goSubtree=!1:n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 5:this.goSubtree=!1,1!==this.state&&o.add(n)}this.goSubtree&&this.stack.push(a)}leaf(e,t,n){1===this.state?this.initialText=n.text.substring(0,e):2===this.state?(this.initialText=n.text.substring(0,e),this.trailingText=n.text.substring(e+t)):this.trailingText=n.text.substring(e+t)}},Dhe=class{constructor(e,t,n){this.pos=e,this.deleteLen=t,this.insertedText=n}getTextChangeRange(){return oc(tc(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}},Phe=class e{constructor(){this.changes=[],this.versions=new Array(e.maxVersions),this.minVersion=0,this.currentVersion=0}versionToIndex(t){if(!(tthis.currentVersion))return t%e.maxVersions}currentVersionToIndex(){return this.currentVersion%e.maxVersions}edit(t,n,r){this.changes.push(new Dhe(t,n,r)),(this.changes.length>e.changeNumberThreshold||n>e.changeLengthThreshold||r&&r.length>e.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let t=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let n=t.index;for(const e of this.changes)n=n.edit(e.pos,e.deleteLen,e.insertedText);t=new Fhe(this.currentVersion+1,this,n,this.changes),this.currentVersion=t.version,this.versions[this.currentVersionToIndex()]=t,this.changes=[],this.currentVersion-this.minVersion>=e.maxVersions&&(this.minVersion=this.currentVersion-e.maxVersions+1)}return t}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(e){return this._getSnapshot().index.lineNumberToInfo(e)}lineOffsetToPosition(e,t){return this._getSnapshot().index.absolutePositionOfStartOfLine(e)+(t-1)}positionToLineOffset(e){return this._getSnapshot().index.positionToLineOffset(e)}lineToTextSpan(e){const t=this._getSnapshot().index,{lineText:n,absolutePosition:r}=t.lineNumberToInfo(e+1);return tc(r,void 0!==n?n.length:t.absolutePositionOfStartOfLine(e+2)-r)}getTextChangesBetweenVersions(e,t){if(!(e=this.minVersion){const n=[];for(let r=e+1;r<=t;r++){const e=this.versions[this.versionToIndex(r)];for(const t of e.changesSincePreviousVersion)n.push(t.getTextChangeRange())}return sc(n)}}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(t){const n=new e,r=new Fhe(0,n,new Ahe);n.versions[n.currentVersion]=r;const i=Ahe.linesFromText(t);return r.index.load(i.lines),n}};Phe.changeNumberThreshold=8,Phe.changeLengthThreshold=256,Phe.maxVersions=8;var Ehe=Phe,Fhe=class e{constructor(e,t,n,r=Zfe){this.version=e,this.cache=t,this.index=n,this.changesSincePreviousVersion=r}getText(e,t){return this.index.getText(e,t-e)}getLength(){return this.index.getLength()}getChangeRange(t){if(t instanceof e&&this.cache===t.cache)return this.version<=t.version?ac:this.cache.getTextChangesBetweenVersions(t.version,this.version)}},Ahe=class e{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(e){return this.lineNumberToInfo(e).absolutePosition}positionToLineOffset(e){const{oneBasedLine:t,zeroBasedColumn:n}=this.root.charOffsetToLineInfo(1,e);return{line:t,offset:n+1}}positionToColumnAndLineText(e){return this.root.charOffsetToLineInfo(1,e)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(e){if(e<=this.getLineCount()){const{position:t,leaf:n}=this.root.lineNumberToInfo(e,0);return{absolutePosition:t,lineText:n&&n.text}}return{absolutePosition:this.root.charCount(),lineText:void 0}}load(t){if(t.length>0){const n=[];for(let e=0;e0&&e{n=n.concat(r.text.substring(e,e+t))}}),n}getLength(){return this.root.charCount()}every(e,t,n){n||(n=this.root.charCount());const r={goSubtree:!0,done:!1,leaf(t,n,r){e(r,t,n)||(this.done=!0)}};return this.walk(t,n-t,r),!r.done}edit(t,n,r){if(0===this.root.charCount())return Tn.assert(0===n),void 0!==r?(this.load(e.linesFromText(r).lines),this):void 0;{let e;if(this.checkEdits){const i=this.getText(0,this.root.charCount());e=i.slice(0,t)+r+i.slice(t+n)}const i=new Nhe;let o=!1;if(t>=this.root.charCount()){t=this.root.charCount()-1;const e=this.getText(t,1);r=r?e+r:e,n=0,o=!0}else if(n>0){const e=t+n,{zeroBasedColumn:i,lineText:o}=this.positionToColumnAndLineText(e);0===i&&(n+=o.length,r=r?r+o:o)}if(this.root.walk(t,n,i),i.insertLines(r,o),this.checkEdits){const t=i.lineIndex.getText(0,i.lineIndex.getLength());Tn.assert(e===t,"buffer edit mismatch")}return i.lineIndex}}static buildTreeFromBottom(e){if(e.length<4)return new Ihe(e);const t=new Array(Math.ceil(e.length/4));let n=0;for(let r=0;r0?n[r]=i:n.pop(),{lines:n,lineMap:t}}},Ihe=class e{constructor(e=[]){this.children=e,this.totalChars=0,this.totalLines=0,e.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(const e of this.children)this.totalChars+=e.charCount(),this.totalLines+=e.lineCount()}execWalk(e,t,n,r,i){return n.pre&&n.pre(e,t,this.children[r],this,i),n.goSubtree?(this.children[r].walk(e,t,n),n.post&&n.post(e,t,this.children[r],this,i)):n.goSubtree=!0,n.done}skipChild(e,t,n,r,i){r.pre&&!r.done&&(r.pre(e,t,this.children[n],this,i),r.goSubtree=!0)}walk(e,t,n){let r=0,i=this.children[r].charCount(),o=e;for(;o>=i;)this.skipChild(o,t,r,n,0),o-=i,r++,i=this.children[r].charCount();if(o+t<=i){if(this.execWalk(o,t,n,r,2))return}else{if(this.execWalk(o,i-o,n,r,1))return;let e=t-(i-o);r++;for(i=this.children[r].charCount();e>i;){if(this.execWalk(0,i,n,r,3))return;e-=i,r++,i=this.children[r].charCount()}if(e>0&&this.execWalk(0,e,n,r,4))return}if(n.pre){const e=this.children.length;if(rt)return n.isLeaf()?{oneBasedLine:e,zeroBasedColumn:t,lineText:n.text}:n.charOffsetToLineInfo(e,t);t-=n.charCount(),e+=n.lineCount()}const n=this.lineCount();if(0===n)return{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0};return{oneBasedLine:n,zeroBasedColumn:Tn.checkDefined(this.lineNumberToInfo(n,0).leaf).charCount(),lineText:void 0}}lineNumberToInfo(e,t){for(const n of this.children){const r=n.lineCount();if(r>=e)return n.isLeaf()?{position:t,leaf:n}:n.lineNumberToInfo(e,t);e-=r,t+=n.charCount()}return{position:t,leaf:void 0}}splitAfter(t){let n;const r=this.children.length,i=++t;if(t=0;e--)0===a[e].children.length&&a.pop()}t&&a.push(t),this.updateCounts();for(let e=0;e{(this.packageInstalledPromise??(this.packageInstalledPromise=new Map)).set(this.packageInstallId,{resolve:e,reject:t})});return this.installer.send(t),n}attach(e){this.projectService=e,this.installer=this.createInstallerProcess()}onProjectClosed(e){this.installer.send({projectName:e.getProjectName(),kind:"closeProject"})}enqueueInstallTypingsRequest(e,t,n){const r=tme(e,t,n);this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling throttled operation:${rG(r)}`),this.activeRequestCount0?this.activeRequestCount--:Tn.fail("TIAdapter:: Received too many responses");!this.requestQueue.isEmpty();){const e=this.requestQueue.dequeue();if(this.requestMap.get(e.projectName)===e){this.requestMap.delete(e.projectName),this.scheduleRequest(e);break}this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Skipping defunct request for: ${e.projectName}`)}this.projectService.updateTypingsForProject(e),this.event(e,"setTypings");break;case QK:this.projectService.watchTypingLocations(e)}}scheduleRequest(t){this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling request for: ${t.projectName}`),this.activeRequestCount++,this.host.setTimeout(()=>{this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Sending request:${rG(t)}`),this.installer.send(t)},e.requestDelayMillis,`${t.projectName}::${t.kind}`)}};jhe.requestDelayMillis=100;var Lhe=jhe,Mhe={};a(Mhe,{ActionInvalidate:()=>WK,ActionPackageInstalled:()=>$K,ActionSet:()=>VK,ActionWatchTypingLocations:()=>QK,Arguments:()=>qK,AutoImportProviderProject:()=>qme,AuxiliaryProject:()=>Jme,CharRangeSection:()=>whe,CloseFileWatcherEvent:()=>cge,CommandNames:()=>rhe,ConfigFileDiagEvent:()=>nge,ConfiguredProject:()=>Ume,ConfiguredProjectLoadKind:()=>Dge,CreateDirectoryWatcherEvent:()=>sge,CreateFileWatcherEvent:()=>age,Errors:()=>Xfe,EventBeginInstallTypes:()=>KK,EventEndInstallTypes:()=>GK,EventInitializationFailed:()=>XK,EventTypesRegistry:()=>HK,ExternalProject:()=>Vme,GcTimer:()=>dme,InferredProject:()=>Bme,LargeFileReferencedEvent:()=>tge,LineIndex:()=>Ahe,LineLeaf:()=>Ohe,LineNode:()=>Ihe,LogLevel:()=>Yfe,Msg:()=>eme,OpenFileInfoTelemetryEvent:()=>oge,Project:()=>Rme,ProjectInfoTelemetryEvent:()=>ige,ProjectKind:()=>Ame,ProjectLanguageServiceStateEvent:()=>rge,ProjectLoadingFinishEvent:()=>ege,ProjectLoadingStartEvent:()=>Zme,ProjectService:()=>$ge,ProjectsUpdatedInBackgroundEvent:()=>Yme,ScriptInfo:()=>Dme,ScriptVersionCache:()=>Ehe,Session:()=>vhe,TextStorage:()=>wme,ThrottledOperations:()=>ume,TypingsCache:()=>Fme,TypingsInstallerAdapter:()=>Lhe,allFilesAreJsOrDts:()=>jme,allRootFilesAreJsOrDts:()=>Ome,asNormalizedPath:()=>ime,convertCompilerOptions:()=>gge,convertFormatOptions:()=>mge,convertScriptKindName:()=>bge,convertTypeAcquisition:()=>yge,convertUserPreferences:()=>xge,convertWatchOptions:()=>hge,countEachFileTypes:()=>Ime,createInstallTypingsRequest:()=>tme,createModuleSpecifierCache:()=>Gge,createNormalizedPathMap:()=>ome,createPackageJsonCache:()=>Xge,createSortedArray:()=>_me,emptyArray:()=>Zfe,findArgument:()=>ZK,forEachResolvedProjectReferenceProject:()=>Pge,formatDiagnosticToProtocol:()=>nhe,formatMessage:()=>ihe,getBaseConfigFileName:()=>pme,getLocationInNewDocument:()=>khe,hasArgument:()=>YK,hasNoTypeScriptSource:()=>Lme,indent:()=>nG,isBackgroundProject:()=>Kme,isConfigFile:()=>Hge,isConfiguredProject:()=>$me,isDynamicFileName:()=>Nme,isExternalProject:()=>Hme,isInferredProject:()=>Wme,isInferredProjectName:()=>ame,isProjectDeferredClose:()=>Gme,makeAutoImportProviderProjectName:()=>cme,makeAuxiliaryProjectName:()=>lme,makeInferredProjectName:()=>sme,maxFileSize:()=>Qme,maxProgramSizeForNonTsFiles:()=>Xme,normalizedPathToPath:()=>rme,nowString:()=>eG,nullCancellationToken:()=>Qge,nullTypingsInstaller:()=>Pme,protocol:()=>mme,removeSorted:()=>fme,stringifyIndented:()=>rG,toEvent:()=>ahe,toNormalizedPath:()=>nme,tryConvertScriptKindName:()=>vge,typingsInstaller:()=>Ufe,updateProjectIfDirty:()=>Lge}),"undefined"!=typeof console&&(Tn.loggingHost={log(e,t){switch(e){case 1:return console.error(t);case 2:return console.warn(t);case 3:case 4:return console.log(t)}}})})({get exports(){return o},set exports(e){o=e,void 0!==t&&t.exports&&(t.exports=e)}})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/typescript/lib/typescript.js","/node_modules/typescript/lib")},{_process:46,buffer:1,crypto:1,fs:1,inspector:1,os:1,path:1,perf_hooks:1,"source-map-support":1}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("core-types-json-schema"),i=e("core-types-ts/dist/lib/ts-to-core-types"),o=e("core-types-ts"),a=e("./utils/sharedUtils"),s=e("./utils/constants"),c=e("./utils/nosqlUtils"),l=e("./utils/constants-nosql");Draw.loadPlugin(function(e){const t=document.createElement("div");t.style.userSelect="none",t.style.overflow="hidden",t.style.padding="10px",t.style.height="100%";const n=document.createElement("textarea");n.style.height="200px",n.style.width="100%";const _="-- click a nosql type button";n.value=_,mxUtils.br(t),t.appendChild(n);const u=e.menus.get("exportAs");let d="tonosql=To NoSQL";u&&!window.VsCodeApi||(d="tonosql=Export As NoSQL"),mxResources.parse(d);const p=new mxWindow(mxResources.get("tonosql"),t,document.body.offsetWidth-480,140,320,320,!0,!0);function f(t){const i=(0,a.getMermaidDiagramDb)(e,t),l=(0,c.dbToOpenApi)(i);let _="";if("ts"==t){const{data:e}=(0,r.convertOpenApiToCoreTypes)(l),{data:n}=(0,o.convertCoreTypesToTypeScript)(e);_=`/*\n\tGenerated in drawio\n\tDatabase: ${t}\n\tPlugin: nosql\n\tVersion: ${s.pluginVersion}\n*/\n\n`+_,_+=n}else"openapi"==t&&(_=JSON.stringify(l,null,2));n.value=_}p.destroyOnClose=!1,p.setMaximizable(!1),p.setResizable(!1),p.setClosable(!0),mxUtils.br(t);const m=mxUtils.button(mxResources.get("reset"),function(){n.value=_});m.style.marginTop="8px",m.style.marginRight="4px",m.style.padding="4px",t.appendChild(m);let g=mxUtils.button("TS",function(){f("ts")});g.style.marginTop="8px",g.style.padding="4px",t.appendChild(g),g=mxUtils.button("OpenAPI",function(){f("openapi")}),g.style.marginTop="8px",g.style.padding="4px",t.appendChild(g),e.actions.addAction("tonosql",function(){p.setVisible(!p.isVisible()),p.isVisible()&&n.focus()});let h=[],y=[],v=[],b=[],x=null,S=null,k=0,T=0;const C=document.createElement("div");C.style.userSelect="none",C.style.overflow="hidden",C.style.padding="10px",C.style.height="100%";const w=document.createElement("textarea");w.style.height="200px",w.style.width="100%",w.value=l.defaultReset,mxUtils.br(C),C.appendChild(w),mxResources.parse("fromNoSql=From NoSQL");const N=new mxWindow(mxResources.get("fromNoSql"),C,document.body.offsetWidth-480,140,320,320,!0,!0);function D(t,n){var o;b=[],x=null,S=null;try{let l=null;const _={title:"nosql default options",version:s.pluginVersion};if("openapi"==n){const e=JSON.parse(t),{data:n}=(0,r.convertOpenApiToCoreTypes)(e),{data:i}=(0,r.convertCoreTypesToJsonSchema)(n);(0,r.jsonSchemaDocumentToOpenApi)(i,_),l=e}else if("ts"==n){const{data:e}=(0,i.convertTypeScriptToCoreTypes)(t),{data:n}=(0,r.convertCoreTypesToJsonSchema)(e);l=(0,r.jsonSchemaDocumentToOpenApi)(n,_)}const u=null===(o=null==l?void 0:l.components)||void 0===o?void 0:o.schemas;if(u){const t=(0,c.ConvertOpenApiToDatabaseModel)(u);h=t.ForeignKeyList,y=t.PrimaryKeyList,v=t.TableList,T=v.length;const r=(0,a.CreateTableUI)(e,N,v,b,S,x,h,k,n);r&&(b=r.cells,k=r.dx,x=r.tableCell,S=r.rowCell)}}catch(e){console.log(`unable to serialize the response:${n}`),console.log(e)}}N.destroyOnClose=!1,N.setMaximizable(!1),N.setResizable(!1),N.setClosable(!0),mxUtils.br(C);const P=mxUtils.button(mxResources.get("Reset TS"),function(){w.value=l.defaultReset});P.style.marginTop="8px",P.style.marginRight="4px",P.style.padding="4px",C.appendChild(P);const E=mxUtils.button("Reset OpenAPI",function(){w.value=l.defaultResetOpenApi});E.style.marginTop="8px",E.style.marginRight="4px",E.style.padding="4px",C.appendChild(E);const F=mxUtils.button("Insert TS",function(){D(w.value,"ts")});F.style.marginTop="8px",F.style.padding="4px",C.appendChild(F);const A=mxUtils.button("Insert OpenAPI",function(){D(w.value,"openapi")});A.style.marginTop="8px",A.style.padding="4px",C.appendChild(A),e.actions.addAction("fromNoSql",function(){N.setVisible(!N.isVisible()),N.isVisible()&&w.focus()});const I=e.menus.get("insert");if(I){const t=I.funct;I.funct=function(...n){const[r,i]=n;t.apply(this,n),e.menus.addMenuItems(r,["fromNoSql"],i)}}if(u&&!window.VsCodeApi){const t=u.funct;u.funct=function(...n){const[r,i]=n;t.apply(this,n),e.menus.addMenuItems(r,["tonosql"],i)}}else{const t=e.menus.get("file");if(t&&t.enabled){const n=t.funct;t.funct=function(...t){const[r,i]=t;n.apply(this,t),e.menus.addMenuItems(r,["tonosql"],i)}}}})},{"./utils/constants":50,"./utils/constants-nosql":49,"./utils/nosqlUtils":51,"./utils/sharedUtils":52,"core-types-json-schema":2,"core-types-ts":25,"core-types-ts/dist/lib/ts-to-core-types":29}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validJSONSchemaTypes=n.defaultResetOpenApi=n.defaultReset=void 0;const r=e("./constants");n.defaultReset=`/*\n\tDrawio default value\n\tPlugin: nosql\n\tVersion: ${r.pluginVersion}\n*/\n\n\nexport interface WeatherForecast {\n /** @format date-time */\n date?: string;\n /** @format int32 */\n temperatureC?: number;\n /** @format int32 */\n temperatureF?: number;\n summary?: string | null;\n nestedProp: string[];\n children?: Child[];\n}\n\nexport interface Child {\n name: string\n}\n `,n.defaultResetOpenApi=`\n{\n "openapi": "3.0.0",\n "info": {\n "title": "nosql plugin sample",\n "version": "${r.pluginVersion}",\n "x-comment": "Generated by core-types-json-schema (https://github.com/grantila/core-types-json-schema)"\n },\n "paths": {},\n "components": {\n "schemas": {\n "WeatherForecast": {\n "properties": {\n "date": {\n "title": "WeatherForecast.date",\n "description": "@format date-time",\n "type": "string"\n },\n "temperatureC": {\n "title": "WeatherForecast.temperatureC",\n "description": "@format int32",\n "type": "number"\n },\n "temperatureF": {\n "title": "WeatherForecast.temperatureF",\n "description": "@format int32",\n "type": "number"\n },\n "summary": {\n "title": "WeatherForecast.summary",\n "nullable": true,\n "type": "string"\n },\n "nestedProp": {\n "items": {\n "title": "WeatherForecast.nestedProp.[]",\n "type": "string"\n },\n "title": "WeatherForecast.nestedProp",\n "type": "array"\n },\n "child": {\n "$ref": "#/components/schemas/Child",\n "title": "WeatherForecast.child"\n }\n },\n "required": [\n "nestedProp"\n ],\n "additionalProperties": false,\n "title": "WeatherForecast",\n "type": "object"\n },\n "Child": {\n "properties": {\n "name": {\n "title": "Child.name",\n "type": "string"\n }\n },\n "required": [\n "name"\n ],\n "additionalProperties": false,\n "title": "Child",\n "type": "object"\n }\n }\n }\n}\n `;n.validJSONSchemaTypes=["string","number","integer","boolean","object","array","null","any"]},{"./constants":50}],50:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.objectKeyword=n.arrayKeyword=n.nullableKeyword=n.enumKeyword=n.formatKeyword=n.commentColumnQuantifiers=n.pluginVersion=void 0,n.pluginVersion="0.0.7",n.commentColumnQuantifiers={Start:"/**",End:"*/"},n.formatKeyword="@format",n.enumKeyword="enum",n.nullableKeyword="nullable",n.arrayKeyword="array",n.objectKeyword="object"},{}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dbToOpenApi=function(e){var t,n,a,s,c,l;const _={openapi:"3.0.0",info:{title:"drawio nosql export",version:r.pluginVersion,"x-comment":"Generated by from drawio uml using plugin nosql"},paths:{},components:{schemas:{}}},u={},d=e.getEntities();for(const _ in d)if(Object.prototype.hasOwnProperty.call(d,_)){let p=_;const f=d[_];let m=(0,i.getCommentIndexes)(_),g="",h="";if(m.start>-1&&m.end>-1){let e=p.toString().trim();m=(0,i.getCommentIndexes)(e);const t=m.start,n=m.end;if(p=e.substring(0,m.beforeStart).trim(),e=e.substring(t,n).trim(),-1!==e.indexOf(r.formatKeyword)){const t=e.indexOf(r.formatKeyword);h=e.substring(t+r.formatKeyword.length).trim(),e=e.substring(0,t)}e&&(g=e)}if(u[p])continue;u[p]={type:r.objectKeyword,title:p,additionalProperties:!1,properties:{}},g&&(u[p].description=g.trim()),h&&(u[p].format=h.trim());for(let d=0;de.entityA==_),o=`[${_}.${g}]`,s=n.find(e=>-1!=e.roleA.indexOf(o));if(s){const e=(0,i.getCommentIndexes)(s.entityB);t=`#/components/schemas/${s.entityB.substring(0,e.beforeStart).trim()}`}t&&("array"==y&&(r={$ref:t}),"object"==y&&(a={$ref:t}))}const s={title:`${p}.${g}`,type:y};a&&(s.additionalProperties=a),r&&(s.items=r),(null===(l=m.attributeType)||void 0===l?void 0:l.includes("nullable"))&&(s.nullable=!0),!t||(null==a?void 0:a.$ref)||(null==r?void 0:r.$ref)||(s.$ref=t),n&&delete s.type,v.trim()&&!t&&(s.description=v.trim()),b.trim()&&(s.items?s.items.format=b.trim():s.format=b.trim()),u[p].properties[m.attributeName]=s}}0===Object.keys(u[p].properties).length&&delete u[p].properties}return _.components.schemas=u,_},n.GeneratePropertyModel=a,n.ConvertOpenApiToDatabaseModel=function(e){var t,n,o,s,c,l;const _={Dialect:"nosql",TableList:[],PrimaryKeyList:[],ForeignKeyList:[]},u={};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=e[o],c=(0,i.dbTypeEnds)(o),l={Name:(0,i.dbTypeEnds)(o),Properties:[]};if(s.enum){const e=s.enum,t=`${s.type} ${r.enumKeyword}`,n={enum:e};s.description&&(n.description=s.description),s.format&&(n.format=s.format);const i=a(o,t,n);l.Properties.push(i)}else{const e=(0,i.generateComment)(s.description,s.format);e&&(l.Name+=` ${e}`)}for(const o in s.properties)if(Object.prototype.hasOwnProperty.call(s.properties,o)){const c=s.properties[o];let u=null;if(c.$ref?u=c.$ref.split("/").pop():c.items&&typeof c.items==r.objectKeyword?u=null===(t=c.items.$ref)||void 0===t?void 0:t.split("/").pop():c.additionalProperties&&"object"==typeof c.additionalProperties&&(u=null===(n=c.additionalProperties.$ref)||void 0===n?void 0:n.split("/").pop()),u){const t=e[u];if(t&&!t.enum){const e=(0,i.generateComment)(t.description,t.format);u=e?`${(0,i.dbTypeEnds)(u)} ${e}`:(0,i.dbTypeEnds)(u)}else u=(0,i.dbTypeEnds)(u)}u&&!c.type&&(c.type=u);const d=a(l.Name,o,c);if(u){const e={PrimaryKeyTableName:l.Name,ReferencesTableName:u,PrimaryKeyName:(0,i.dbTypeEnds)(o),ReferencesPropertyName:"",IsDestination:!1},t={ReferencesTableName:l.Name,PrimaryKeyTableName:u,ReferencesPropertyName:(0,i.dbTypeEnds)(o),PrimaryKeyName:"",IsDestination:!0};_.ForeignKeyList.push(t),_.ForeignKeyList.push(e),d.IsForeignKey=!0}l.Properties.push(d)}_.TableList.push(l),u[c]||(u[c]=l)}for(let e=0;e<_.ForeignKeyList.length;e++){const t=_.ForeignKeyList[e];if(!t.ReferencesPropertyName){let n=null===(o=_.TableList.find(e=>e.Name==t.ReferencesTableName))||void 0===o?void 0:o.Properties[0];n||(n=null===(s=u[t.ReferencesTableName])||void 0===s?void 0:s.Properties[0]),n&&(_.ForeignKeyList[e].ReferencesPropertyName=n.Name)}if(!t.PrimaryKeyName){let n=null===(c=_.TableList.find(e=>e.Name==t.PrimaryKeyTableName))||void 0===c?void 0:c.Properties[0];n||(n=null===(l=u[t.PrimaryKeyTableName])||void 0===l?void 0:l.Properties[0]),n&&(_.ForeignKeyList[e].PrimaryKeyName=n.Name)}}return _};const r=e("./constants"),i=e("./sharedUtils"),o=e("./constants-nosql");function a(e,t,n){var o;let a=(null!==(o=n.type)&&void 0!==o?o:r.objectKeyword).toString();a===r.arrayKeyword&&n.items&&typeof n.items===r.objectKeyword&&(n.items.format&&!n.format&&(n.format=n.items.format),n.items.type&&(a=`${n.items.type}[]`)),n.enum?a=`${JSON.stringify(n.enum)}`:n.nullable&&(a+=` ${r.nullableKeyword}`);const s=(0,i.generateComment)(n.description,n.format);s&&(a+=` ${s}`);return{Name:(0,i.dbTypeEnds)(t),IsPrimaryKey:!1,IsForeignKey:!1,ColumnProperties:a,TableName:(0,i.dbTypeEnds)(e),ForeignKey:[]}}},{"./constants":50,"./constants-nosql":49,"./sharedUtils":52}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GetColumnQuantifiers=i,n.removeHtml=o,n.dbTypeEnds=function(e){return`\`${e}\``},n.RemoveNameQuantifiers=a,n.getDbLabel=s,n.entityName=function(e,t){let n="";e&&(n+=`${e}`);t&&(n+=` ${r.formatKeyword} ${t}`);n&&(n=n.trim(),n=`/** ${n} */`);return n},n.getCommentIndexes=c,n.getMermaidDiagramDb=function(e,t){const n=e.editor.graph.getModel(),o={},u=[];for(const e in n.cells)if(Object.hasOwnProperty.call(n.cells,e)){const l=n.cells[e];if(-1!==l.mxObjectId.indexOf("mxCell")&&l.style&&l.style.trim().startsWith("swimlane;")){let e=l.value.toString(),n="",d="";if((null==e?void 0:e.includes(r.commentColumnQuantifiers.Start))&&(null==e?void 0:e.includes(r.commentColumnQuantifiers.End))){let t=e.toString();const i=c(t),o=i.start,a=i.end;if(e=t.substring(0,i.beforeStart),t=t.substring(o,a),-1!==t.indexOf(r.formatKeyword)){const e=t.indexOf(r.formatKeyword);d=t.substring(e+r.formatKeyword.length).trim(),t=t.substring(0,e)}t&&(n=t)}const p={name:a(e),attributes:[]},f=_(n,d);f&&(p.name+=` ${f}`);for(let e=0;e-1!==["FK","PK"].findIndex(t=>t==e.value.toUpperCase())||-1!=e.value.toUpperCase().indexOf("PK,"));if(l&&(r.attributeKeyType=l.value,"PK"!=r.attributeKeyType&&-1!=r.attributeKeyType.indexOf("PK")&&(r.attributeKeyType="PK")),p.attributes.push(r),n.edges&&n.edges.length)for(let t=0;t-1!=n.toLocaleLowerCase().indexOf(e)),f=l&&-1!=d.findIndex(e=>-1!=l.toLocaleLowerCase().indexOf(e));if(!f&&!p||f&&p){if(f&&p){let t=r.source.value;const n=s(t,e);n.attributeKeyType="PK",t=n.attributeName;const i=a(r.source.parent.value);let c=r.target.value;const l=s(c,e);l.attributeKeyType="PK",c=l.attributeName;const _=a(r.target.parent.value),d={name:a(i)+"_"+a(_),attributes:[n,l]};o[d.name]||(o[d.name]=d);const p={entityA:i,entityB:d.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${i}.${t}] to [${d.name}.${t}]`};let f=u.findIndex(e=>e.entityA==p.entityA&&e.entityB==p.entityB&&e.roleA==p.roleA);-1==f&&u.push(p);const m={entityA:_,entityB:d.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${_}.${c}] to [${d.name}.${c}]`};f=u.findIndex(e=>e.entityA==m.entityA&&e.entityB==m.entityB&&e.roleA==m.roleA),-1==f&&u.push(m)}}else{let t=r.source.value;t=s(t,e).attributeName;let n=r.source.parent.value,i=c(n);if(-1!=i.start&&-1!=i.end){const e=n.substring(i.start,i.end).trim();n=n.substring(0,i.beforeStart).trim(),n=`${a(n)} ${_(e)}`}else n=a(n);let o=r.target.value;o=s(o,e).attributeName;let l=r.target.parent.value;if(i=c(l),-1!=i.start&&-1!=i.end){const e=l.substring(i.start,i.end).trim();l=l.substring(0,i.beforeStart).trim(),l=`${a(l)} ${_(e)}`}else l=a(l);const d={entityA:p?n:l,entityB:p?l:n,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:p?`[${n}.${t}] to [${l}.${o}]`:`[${l}.${o}] to [${n}.${t}]`};-1==u.findIndex(e=>e.entityA==d.entityA&&e.entityB==d.entityB&&e.roleA==d.roleA)&&u.push(d)}}}}}if(o[p.name]){let e=2;for(;o[p.name+e.toString()];)e++;o[p.name+e.toString()]=p}else o[p.name]=p}}return l(o,u)},n.GenerateDatabaseModel=l,n.generateComment=_,n.CreateTableUI=function(e,t,n,r,o,c,l,_,u){if(n.forEach(function(t){const n=100+t.Name.length;if((c=new mxCell(t.Name,new mxGeometry(_,0,n,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=default;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=default;align=center;")).vertex=!0,o){const t=e.editor.graph.getPreferredSizeForCell(o);null!==t&&(c.geometry.width=t.width+n)}r.push(c),t.Properties.forEach(function(n){const r=function(e,t,n,r,i){const o=t.Name+(t.ColumnProperties?" "+t.ColumnProperties:"");r=new mxCell(o,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=64;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"),r.vertex=!0;const a=t.IsPrimaryKey&&t.IsForeignKey?"PK | FK":t.IsPrimaryKey?"PK":t.IsForeignKey?"FK":"",s=sb.cloneCell(r,a);s.connectable=!1,s.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=180;points=[];portConstraint=eastwest;part=1;",s.geometry.width=54,s.geometry.height=26,r.insert(s);const c=e.editor.graph.getPreferredSizeForCell(r);i&&(null!==c&&i.geometry.width0){const t=e.editor.graph,n=t.view,o=t.getGraphBounds(),c=Math.ceil(Math.max(0,o.x/n.scale-n.translate.x)+4*t.gridSize),_=Math.ceil(Math.max(0,(o.y+o.height)/n.scale-n.translate.y)+4*t.gridSize);t.setSelectionCells(t.importCells(r,c,_));const d=t.getModel(),p=i(u),f=mxUtils.bind(this,function(e,n,r){t.insertEdge(null,null,"",r.invert?n:e,r.invert?e:n,"edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;")});l.forEach(function(e){if(e.IsDestination&&e.PrimaryKeyName&&e.ReferencesPropertyName&&e.PrimaryKeyTableName&&e.ReferencesTableName){const t={invert:!0};let n=null,r=null;for(const t in d.cells){if(n&&r)break;if(Object.hasOwnProperty.call(d.cells,t)){const i=d.cells[t];if(i.style&&i.style.trim().startsWith("swimlane;")){const t={name:i.value,attributes:[]},o=t.name==e.PrimaryKeyTableName,c=t.name==e.ReferencesTableName;if(o||c)for(let t=0;t1&&(l=c.slice(1).join(" "),i=c[0]);return{attributeName:s,attributeType:i,attributeComment:l}}function c(e){let t=!1;-1!==e.indexOf(r.commentColumnQuantifiers.Start)&&-1!==e.indexOf(r.commentColumnQuantifiers.End)&&(t=!0);return{beforeStart:t?e.indexOf(r.commentColumnQuantifiers.Start):-1,start:t?e.indexOf(r.commentColumnQuantifiers.Start)+r.commentColumnQuantifiers.Start.length:-1,end:t?e.indexOf(r.commentColumnQuantifiers.End)-1:-1}}function l(e,t){const n=new class{constructor(e,t){this.entities=e,this.relationships=t}getEntities(){return this.entities}getRelationships(){return this.relationships}}(e,t);return n}function _(e,t){let n="";return e&&(n+=`${e}`),t&&(n+=` ${r.formatKeyword} ${t}`),n&&(n=n.trim(),n=`${r.commentColumnQuantifiers.Start} ${n} ${r.commentColumnQuantifiers.End}`),n}},{"./constants":50}]},{},[48]); \ No newline at end of file + })(name => super[name], (name, value) => super[name] = value);`};function HN(e,t){return SE(e)&&fD(e.expression)&&!!(8192&ap(e.expression))&&e.expression.escapedText===t}function GN(e){return 9===e.kind}function XN(e){return 10===e.kind}function QN(e){return 11===e.kind}function YN(e){return 12===e.kind}function ZN(e){return 14===e.kind}function eD(e){return 15===e.kind}function tD(e){return 16===e.kind}function nD(e){return 17===e.kind}function rD(e){return 18===e.kind}function iD(e){return 26===e.kind}function oD(e){return 28===e.kind}function aD(e){return 40===e.kind}function sD(e){return 41===e.kind}function cD(e){return 42===e.kind}function lD(e){return 54===e.kind}function _D(e){return 58===e.kind}function uD(e){return 59===e.kind}function dD(e){return 29===e.kind}function pD(e){return 39===e.kind}function fD(e){return 80===e.kind}function mD(e){return 81===e.kind}function gD(e){return 95===e.kind}function hD(e){return 90===e.kind}function yD(e){return 134===e.kind}function vD(e){return 131===e.kind}function bD(e){return 135===e.kind}function xD(e){return 148===e.kind}function SD(e){return 126===e.kind}function kD(e){return 128===e.kind}function TD(e){return 164===e.kind}function CD(e){return 129===e.kind}function wD(e){return 108===e.kind}function ND(e){return 102===e.kind}function DD(e){return 84===e.kind}function ED(e){return 167===e.kind}function FD(e){return 168===e.kind}function PD(e){return 169===e.kind}function AD(e){return 170===e.kind}function ID(e){return 171===e.kind}function OD(e){return 172===e.kind}function LD(e){return 173===e.kind}function jD(e){return 174===e.kind}function MD(e){return 175===e.kind}function RD(e){return 176===e.kind}function BD(e){return 177===e.kind}function JD(e){return 178===e.kind}function zD(e){return 179===e.kind}function qD(e){return 180===e.kind}function UD(e){return 181===e.kind}function VD(e){return 182===e.kind}function WD(e){return 183===e.kind}function $D(e){return 184===e.kind}function KD(e){return 185===e.kind}function HD(e){return 186===e.kind}function GD(e){return 187===e.kind}function XD(e){return 188===e.kind}function QD(e){return 189===e.kind}function YD(e){return 190===e.kind}function ZD(e){return 203===e.kind}function eE(e){return 191===e.kind}function tE(e){return 192===e.kind}function nE(e){return 193===e.kind}function rE(e){return 194===e.kind}function iE(e){return 195===e.kind}function oE(e){return 196===e.kind}function aE(e){return 197===e.kind}function sE(e){return 198===e.kind}function cE(e){return 199===e.kind}function lE(e){return 200===e.kind}function _E(e){return 201===e.kind}function uE(e){return 202===e.kind}function dE(e){return 206===e.kind}function pE(e){return 205===e.kind}function fE(e){return 204===e.kind}function mE(e){return 207===e.kind}function gE(e){return 208===e.kind}function hE(e){return 209===e.kind}function yE(e){return 210===e.kind}function vE(e){return 211===e.kind}function bE(e){return 212===e.kind}function xE(e){return 213===e.kind}function SE(e){return 214===e.kind}function kE(e){return 215===e.kind}function TE(e){return 216===e.kind}function CE(e){return 217===e.kind}function wE(e){return 218===e.kind}function NE(e){return 219===e.kind}function DE(e){return 220===e.kind}function EE(e){return 221===e.kind}function FE(e){return 222===e.kind}function PE(e){return 223===e.kind}function AE(e){return 224===e.kind}function IE(e){return 225===e.kind}function OE(e){return 226===e.kind}function LE(e){return 227===e.kind}function jE(e){return 228===e.kind}function ME(e){return 229===e.kind}function RE(e){return 230===e.kind}function BE(e){return 231===e.kind}function JE(e){return 232===e.kind}function zE(e){return 233===e.kind}function qE(e){return 234===e.kind}function UE(e){return 235===e.kind}function VE(e){return 239===e.kind}function WE(e){return 236===e.kind}function $E(e){return 237===e.kind}function KE(e){return 238===e.kind}function HE(e){return 356===e.kind}function GE(e){return 357===e.kind}function XE(e){return 240===e.kind}function QE(e){return 241===e.kind}function YE(e){return 242===e.kind}function ZE(e){return 244===e.kind}function eF(e){return 243===e.kind}function tF(e){return 245===e.kind}function nF(e){return 246===e.kind}function rF(e){return 247===e.kind}function iF(e){return 248===e.kind}function oF(e){return 249===e.kind}function aF(e){return 250===e.kind}function sF(e){return 251===e.kind}function cF(e){return 252===e.kind}function lF(e){return 253===e.kind}function _F(e){return 254===e.kind}function uF(e){return 255===e.kind}function dF(e){return 256===e.kind}function pF(e){return 257===e.kind}function fF(e){return 258===e.kind}function mF(e){return 259===e.kind}function gF(e){return 260===e.kind}function hF(e){return 261===e.kind}function yF(e){return 262===e.kind}function vF(e){return 263===e.kind}function bF(e){return 264===e.kind}function xF(e){return 265===e.kind}function SF(e){return 266===e.kind}function kF(e){return 267===e.kind}function TF(e){return 268===e.kind}function CF(e){return 269===e.kind}function wF(e){return 270===e.kind}function NF(e){return 271===e.kind}function DF(e){return 272===e.kind}function EF(e){return 273===e.kind}function FF(e){return 274===e.kind}function PF(e){return 303===e.kind}function AF(e){return 301===e.kind}function IF(e){return 302===e.kind}function OF(e){return 301===e.kind}function LF(e){return 302===e.kind}function jF(e){return 275===e.kind}function MF(e){return 281===e.kind}function RF(e){return 276===e.kind}function BF(e){return 277===e.kind}function JF(e){return 278===e.kind}function zF(e){return 279===e.kind}function qF(e){return 280===e.kind}function UF(e){return 282===e.kind}function VF(e){return 80===e.kind||11===e.kind}function WF(e){return 283===e.kind}function $F(e){return 354===e.kind}function KF(e){return 358===e.kind}function HF(e){return 284===e.kind}function GF(e){return 285===e.kind}function XF(e){return 286===e.kind}function QF(e){return 287===e.kind}function YF(e){return 288===e.kind}function ZF(e){return 289===e.kind}function eP(e){return 290===e.kind}function tP(e){return 291===e.kind}function nP(e){return 292===e.kind}function rP(e){return 293===e.kind}function iP(e){return 294===e.kind}function oP(e){return 295===e.kind}function aP(e){return 296===e.kind}function sP(e){return 297===e.kind}function cP(e){return 298===e.kind}function lP(e){return 299===e.kind}function _P(e){return 300===e.kind}function uP(e){return 304===e.kind}function dP(e){return 305===e.kind}function pP(e){return 306===e.kind}function fP(e){return 307===e.kind}function mP(e){return 308===e.kind}function gP(e){return 309===e.kind}function hP(e){return 310===e.kind}function yP(e){return 311===e.kind}function vP(e){return 312===e.kind}function bP(e){return 325===e.kind}function xP(e){return 326===e.kind}function SP(e){return 327===e.kind}function kP(e){return 313===e.kind}function TP(e){return 314===e.kind}function CP(e){return 315===e.kind}function wP(e){return 316===e.kind}function NP(e){return 317===e.kind}function DP(e){return 318===e.kind}function EP(e){return 319===e.kind}function FP(e){return 320===e.kind}function PP(e){return 321===e.kind}function AP(e){return 323===e.kind}function IP(e){return 324===e.kind}function OP(e){return 329===e.kind}function LP(e){return 331===e.kind}function jP(e){return 333===e.kind}function MP(e){return 339===e.kind}function RP(e){return 334===e.kind}function BP(e){return 335===e.kind}function JP(e){return 336===e.kind}function zP(e){return 337===e.kind}function qP(e){return 338===e.kind}function UP(e){return 340===e.kind}function VP(e){return 332===e.kind}function WP(e){return 348===e.kind}function $P(e){return 341===e.kind}function KP(e){return 342===e.kind}function HP(e){return 343===e.kind}function GP(e){return 344===e.kind}function XP(e){return 345===e.kind}function QP(e){return 346===e.kind}function YP(e){return 347===e.kind}function ZP(e){return 328===e.kind}function eA(e){return 349===e.kind}function tA(e){return 330===e.kind}function nA(e){return 351===e.kind}function rA(e){return 350===e.kind}function iA(e){return 352===e.kind}function oA(e){return 353===e.kind}var aA,sA=new WeakMap;function cA(e,t){var n;const r=e.kind;return Ll(r)?353===r?e._children:null==(n=sA.get(t))?void 0:n.get(e):p}function lA(e,t,n){353===e.kind&&gn.fail("Should not need to re-set the children of a SyntaxList.");let r=sA.get(t);return void 0===r&&(r=new WeakMap,sA.set(t,r)),r.set(e,n),n}function _A(e,t){var n;353===e.kind&&gn.fail("Did not expect to unset the children of a SyntaxList."),null==(n=sA.get(t))||n.delete(e)}function uA(e,t){const n=sA.get(e);void 0!==n&&(sA.delete(e),sA.set(t,n))}function dA(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function pA(e,t,n,r){if(FD(n))return AI(e.createElementAccessExpression(t,n.expression),r);{const r=AI(vl(n)?e.createPropertyAccessExpression(t,n):e.createElementAccessExpression(t,n),n);return Fw(r,128),r}}function fA(e,t){const n=jI.createIdentifier(e||"React");return jT(n,bc(t)),n}function mA(e,t,n){if(ED(t)){const r=mA(e,t.left,n),i=e.createIdentifier(kc(t.right));return i.escapedText=t.right.escapedText,e.createPropertyAccessExpression(r,i)}return fA(kc(t),n)}function gA(e,t,n,r){return t?mA(e,t,r):e.createPropertyAccessExpression(fA(n,r),"createElement")}function hA(e,t,n,r,i,o){const a=[n];if(r&&a.push(r),i&&i.length>0)if(r||a.push(e.createNull()),i.length>1)for(const e of i)MA(e),a.push(e);else a.push(i[0]);return AI(e.createCallExpression(t,void 0,a),o)}function yA(e,t,n,r,i,o,a){const s=function(e,t,n,r){return t?mA(e,t,r):e.createPropertyAccessExpression(fA(n,r),"Fragment")}(e,n,r,o),c=[s,e.createNull()];if(i&&i.length>0)if(i.length>1)for(const e of i)MA(e),c.push(e);else c.push(i[0]);return AI(e.createCallExpression(gA(e,t,r,o),void 0,c),a)}function vA(e,t,n){if(yF(t)){const r=xe(t.declarations),i=e.updateVariableDeclaration(r,r.name,void 0,void 0,n);return AI(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}{const r=AI(e.createAssignment(t,n),t);return AI(e.createExpressionStatement(r),t)}}function bA(e,t){if(ED(t)){const n=bA(e,t.left),r=jT(AI(e.cloneNode(t.right),t.right),t.right.parent);return AI(e.createPropertyAccessExpression(n,r),t)}return jT(AI(e.cloneNode(t),t),t.parent)}function xA(e,t){return fD(t)?e.createStringLiteralFromNode(t):FD(t)?jT(AI(e.cloneNode(t.expression),t.expression),t.expression.parent):jT(AI(e.cloneNode(t),t),t.parent)}function SA(e,t,n,r){switch(n.name&&mD(n.name)&&gn.failBadSyntaxKind(n.name,"Private identifiers are not allowed in object literals."),n.kind){case 178:case 179:return function(e,t,n,r,i){const{firstAccessor:o,getAccessor:a,setAccessor:s}=bv(t,n);if(n===o)return AI(e.createObjectDefinePropertyCall(r,xA(e,n.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:a&&AI(Cw(e.createFunctionExpression(Lc(a),void 0,void 0,void 0,a.parameters,void 0,a.body),a),a),set:s&&AI(Cw(e.createFunctionExpression(Lc(s),void 0,void 0,void 0,s.parameters,void 0,s.body),s),s)},!i)),o)}(e,t.properties,n,r,!!t.multiLine);case 304:return function(e,t,n){return Cw(AI(e.createAssignment(pA(e,n,t.name,t.name),t.initializer),t),t)}(e,n,r);case 305:return function(e,t,n){return Cw(AI(e.createAssignment(pA(e,n,t.name,t.name),e.cloneNode(t.name)),t),t)}(e,n,r);case 175:return function(e,t,n){return Cw(AI(e.createAssignment(pA(e,n,t.name,t.name),Cw(AI(e.createFunctionExpression(Lc(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}(e,n,r)}}function kA(e,t,n,r,i){const o=t.operator;gn.assert(46===o||47===o,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");const a=e.createTempVariable(r);AI(n=e.createAssignment(a,n),t.operand);let s=IE(t)?e.createPrefixUnaryExpression(o,a):e.createPostfixUnaryExpression(a,o);return AI(s,t),i&&(s=e.createAssignment(i,s),AI(s,t)),AI(n=e.createComma(n,s),t),OE(t)&&AI(n=e.createComma(n,a),t),n}function TA(e){return!!(65536&ap(e))}function CA(e){return!!(32768&ap(e))}function wA(e){return!!(16384&ap(e))}function NA(e){return QN(e.expression)&&"use strict"===e.expression.text}function DA(e){for(const t of e){if(!bf(t))break;if(NA(t))return t}}function EA(e){const t=ve(e);return void 0!==t&&bf(t)&&NA(t)}function FA(e){return 227===e.kind&&28===e.operatorToken.kind}function PA(e){return FA(e)||GE(e)}function AA(e){return wE(e)&&Mm(e)&&!!cl(e)}function IA(e){const t=ll(e);return gn.assertIsDefined(t),t}function OA(e,t=63){switch(e.kind){case 218:return!(-2147483648&t&&AA(e))&&!!(1&t);case 217:case 235:return!!(2&t);case 239:return!!(34&t);case 234:return!!(16&t);case 236:return!!(4&t);case 356:return!!(8&t)}return!1}function LA(e,t=63){for(;OA(e,t);)e=e.expression;return e}function jA(e,t=63){let n=e.parent;for(;OA(n,t);)n=n.parent,gn.assert(n);return n}function MA(e){return Rw(e,!0)}function RA(e){const t=hc(e,mP),n=t&&t.emitNode;return n&&n.externalHelpersModuleName}function BA(e){const t=hc(e,mP),n=t&&t.emitNode;return!(!n||!n.externalHelpersModuleName&&!n.externalHelpers)}function JA(e,t,n,r,i,o,a){if(r.importHelpers&&Tp(n,r)){const s=NS(r),c=YV(n,r),l=function(e){return P(Zw(e),e=>!e.scoped)}(n);if(1!==c&&(s>=5&&s<=99||99===c||void 0===c&&200===s)){if(l){const r=[];for(const e of l){const t=e.importName;t&&pe(r,t)}if(X(r)){r.sort(Ft);const i=e.createNamedImports(O(r,r=>Id(n,r)?e.createImportSpecifier(!1,void 0,e.createIdentifier(r)):e.createImportSpecifier(!1,e.createIdentifier(r),t.getUnscopedHelperName(r))));ww(hc(n,mP)).externalHelpers=!0;const o=e.createImportDeclaration(void 0,e.createImportClause(void 0,void 0,i),e.createStringLiteral(Xu),void 0);return Aw(o,2),o}}}else{const t=function(e,t,n,r,i,o){const a=RA(t);if(a)return a;const s=X(r)||(i||PS(n)&&o)&&QV(t,n)<4;if(s){const n=ww(hc(t,mP));return n.externalHelpersModuleName||(n.externalHelpersModuleName=e.createUniqueName(Xu))}}(e,n,r,l,i,o||a);if(t){const n=e.createImportEqualsDeclaration(void 0,!1,t,e.createExternalModuleReference(e.createStringLiteral(Xu)));return Aw(n,2),n}}}}function zA(e,t,n){const r=Fg(t);if(r&&!Pg(t)&&!Yd(t)){const i=r.name;return 11===i.kind?e.getGeneratedNameForNode(t):Yl(i)?i:e.createIdentifier(Qd(n,i)||kc(i))}return 273===t.kind&&t.importClause||279===t.kind&&t.moduleSpecifier?e.getGeneratedNameForNode(t):void 0}function qA(e,t,n,r,i,o){const a=Eg(t);if(a&&QN(a))return function(e,t,n,r,i){return UA(n,r.getExternalModuleFileFromDeclaration(e),t,i)}(t,r,e,i,o)||function(e,t,n){const r=n.renamedDependencies&&n.renamedDependencies.get(t.text);return r?e.createStringLiteral(r):void 0}(e,a,n)||e.cloneNode(a)}function UA(e,t,n,r){if(t)return t.moduleName?e.createStringLiteral(t.moduleName):!t.isDeclarationFile&&r.outFile?e.createStringLiteral(Hy(n,t.fileName)):void 0}function VA(e){if(A_(e))return e.initializer;if(uP(e)){const t=e.initializer;return ub(t,!0)?t.right:void 0}return dP(e)?e.objectAssignmentInitializer:ub(e,!0)?e.right:BE(e)?VA(e.expression):void 0}function WA(e){if(A_(e))return e.name;if(!w_(e))return ub(e,!0)?WA(e.left):BE(e)?WA(e.expression):e;switch(e.kind){case 304:return WA(e.initializer);case 305:return e.name;case 306:return WA(e.expression)}}function $A(e){switch(e.kind){case 170:case 209:return e.dotDotDotToken;case 231:case 306:return e}}function KA(e){const t=HA(e);return gn.assert(!!t||pP(e),"Invalid property name for binding element."),t}function HA(e){switch(e.kind){case 209:if(e.propertyName){const t=e.propertyName;return mD(t)?gn.failBadSyntaxKind(t):FD(t)&&GA(t.expression)?t.expression:t}break;case 304:if(e.name){const t=e.name;return mD(t)?gn.failBadSyntaxKind(t):FD(t)&&GA(t.expression)?t.expression:t}break;case 306:return e.name&&mD(e.name)?gn.failBadSyntaxKind(e.name):e.name}const t=WA(e);if(t&&c_(t))return t}function GA(e){const t=e.kind;return 11===t||9===t}function XA(e){switch(e.kind){case 207:case 208:case 210:return e.elements;case 211:return e.properties}}function QA(e){if(e){let t=e;for(;;){if(fD(t)||!t.body)return fD(t)?t:t.name;t=t.body}}}function YA(e){const t=e.kind;return 177===t||179===t}function ZA(e){const t=e.kind;return 177===t||178===t||179===t}function eI(e){const t=e.kind;return 304===t||305===t||263===t||177===t||182===t||176===t||283===t||244===t||265===t||266===t||267===t||268===t||272===t||273===t||271===t||279===t||278===t}function tI(e){const t=e.kind;return 176===t||304===t||305===t||283===t||271===t}function nI(e){return _D(e)||lD(e)}function rI(e){return fD(e)||sE(e)}function iI(e){return xD(e)||aD(e)||sD(e)}function oI(e){return _D(e)||aD(e)||sD(e)}function aI(e){return fD(e)||QN(e)}function sI(e){return function(e){return 48===e||49===e||50===e}(e)||function(e){return function(e){return 40===e||41===e}(e)||function(e){return function(e){return 43===e}(e)||function(e){return 42===e||44===e||45===e}(e)}(e)}(e)}function cI(e){return function(e){return 35===e||37===e||36===e||38===e}(e)||function(e){return function(e){return 30===e||33===e||32===e||34===e||104===e||103===e}(e)||sI(e)}(e)}function lI(e){return function(e){return 56===e||57===e}(e)||function(e){return function(e){return 51===e||52===e||53===e}(e)||cI(e)}(e)}function _I(e){return function(e){return 61===e||lI(e)||cb(e)}(e)||28===e}function uI(e){return _I(e.kind)}(e=>{function t(e,n,r,i,o,a,c){const l=n>0?o[n-1]:void 0;return gn.assertEqual(r[n],t),o[n]=e.onEnter(i[n],l,c),r[n]=s(e,t),n}function n(e,t,r,i,o,a,_){gn.assertEqual(r[t],n),gn.assertIsDefined(e.onLeft),r[t]=s(e,n);const u=e.onLeft(i[t].left,o[t],i[t]);return u?(l(t,i,u),c(t,r,i,o,u)):t}function r(e,t,n,i,o,a,c){return gn.assertEqual(n[t],r),gn.assertIsDefined(e.onOperator),n[t]=s(e,r),e.onOperator(i[t].operatorToken,o[t],i[t]),t}function i(e,t,n,r,o,a,_){gn.assertEqual(n[t],i),gn.assertIsDefined(e.onRight),n[t]=s(e,i);const u=e.onRight(r[t].right,o[t],r[t]);return u?(l(t,r,u),c(t,n,r,o,u)):t}function o(e,t,n,r,i,a,c){gn.assertEqual(n[t],o),n[t]=s(e,o);const l=e.onExit(r[t],i[t]);if(t>0){if(t--,e.foldState){const r=n[t]===o?"right":"left";i[t]=e.foldState(i[t],l,r)}}else a.value=l;return t}function a(e,t,n,r,i,o,s){return gn.assertEqual(n[t],a),t}function s(e,s){switch(s){case t:if(e.onLeft)return n;case n:if(e.onOperator)return r;case r:if(e.onRight)return i;case i:return o;case o:case a:return a;default:gn.fail("Invalid state")}}function c(e,n,r,i,o){return n[++e]=t,r[e]=o,i[e]=void 0,e}function l(e,t,n){if(gn.shouldAssert(2))for(;e>=0;)gn.assert(t[e]!==n,"Circular traversal detected."),e--}e.enter=t,e.left=n,e.operator=r,e.right=i,e.exit=o,e.done=a,e.nextState=s})(aA||(aA={}));var dI,pI,fI,mI,gI,hI=class{constructor(e,t,n,r,i,o){this.onEnter=e,this.onLeft=t,this.onOperator=n,this.onRight=r,this.onExit=i,this.foldState=o}};function yI(e,t,n,r,i,o){const a=new hI(e,t,n,r,i,o);return function(e,t){const n={value:void 0},r=[aA.enter],i=[e],o=[void 0];let s=0;for(;r[s]!==aA.done;)s=r[s](a,s,r,i,o,n,t);return gn.assertEqual(s,0),n.value}}function vI(e){return function(e){return 95===e||90===e}(e.kind)}function bI(e,t){if(void 0!==t)return 0===t.length?t:AI(e.createNodeArray([],t.hasTrailingComma),t)}function xI(e){var t;const n=e.emitNode.autoGenerate;if(4&n.flags){const r=n.id;let i=e,o=i.original;for(;o;){i=o;const e=null==(t=i.emitNode)?void 0:t.autoGenerate;if(vl(i)&&(void 0===e||4&e.flags&&e.id!==r))break;o=i.original}return i}return e}function SI(e,t){return"object"==typeof e?TI(!1,e.prefix,e.node,e.suffix,t):"string"==typeof e?e.length>0&&35===e.charCodeAt(0)?e.slice(1):e:""}function kI(e,t){return"string"==typeof e?e:function(e,t){return Zl(e)?t(e).slice(1):Yl(e)?t(e):mD(e)?e.escapedText.slice(1):kc(e)}(e,gn.checkDefined(t))}function TI(e,t,n,r,i){return t=SI(t,i),r=SI(r,i),`${e?"#":""}${t}${n=kI(n,i)}${r}`}function CI(e,t,n,r){return e.updatePropertyDeclaration(t,n,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,r)}function wI(e,t,n,r,i=e.createThis()){return e.createGetAccessorDeclaration(n,r,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function NI(e,t,n,r,i=e.createThis()){return e.createSetAccessorDeclaration(n,r,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function DI(e){let t=e.expression;for(;;)if(t=LA(t),GE(t))t=Te(t.elements);else{if(!FA(t)){if(ub(t,!0)&&Yl(t.left))return t;break}t=t.right}}function EI(e,t){if(function(e){return wE(e)&&sy(e)&&!e.emitNode}(e))EI(e.expression,t);else if(FA(e))EI(e.left,t),EI(e.right,t);else if(GE(e))for(const n of e.elements)EI(n,t);else t.push(e)}function FI(e){const t=[];return EI(e,t),t}function PI(e){if(65536&e.transformFlags)return!0;if(128&e.transformFlags)for(const t of XA(e)){const e=WA(t);if(e&&F_(e)){if(65536&e.transformFlags)return!0;if(128&e.transformFlags&&PI(e))return!0}}return!1}function AI(e,t){return t?IT(e,t.pos,t.end):e}function II(e){const t=e.kind;return 169===t||170===t||172===t||173===t||174===t||175===t||177===t||178===t||179===t||182===t||186===t||219===t||220===t||232===t||244===t||263===t||264===t||265===t||266===t||267===t||268===t||272===t||273===t||278===t||279===t}function OI(e){const t=e.kind;return 170===t||173===t||175===t||178===t||179===t||232===t||264===t}var LI={createBaseSourceFileNode:e=>new(gI||(gI=Wx.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(fI||(fI=Wx.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(mI||(mI=Wx.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(pI||(pI=Wx.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(dI||(dI=Wx.getNodeConstructor()))(e,-1,-1)},jI=dw(1,LI);function MI(e,t){return t&&e(t)}function RI(e,t,n){if(n){if(t)return t(n);for(const t of n){const n=e(t);if(n)return n}}}function BI(e,t){return 42===e.charCodeAt(t+1)&&42===e.charCodeAt(t+2)&&47!==e.charCodeAt(t+3)}function JI(e){return g(e.statements,zI)||function(e){return 8388608&e.flags?qI(e):void 0}(e)}function zI(e){return II(e)&&function(e,t){return X(e.modifiers,e=>e.kind===t)}(e,95)||DF(e)&&HF(e.moduleReference)||EF(e)||JF(e)||zF(e)?e:void 0}function qI(e){return function(e){return $E(e)&&102===e.keywordToken&&"meta"===e.name.escapedText}(e)?e:sO(e,qI)}var UI,VI={167:function(e,t,n){return MI(t,e.left)||MI(t,e.right)},169:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.constraint)||MI(t,e.default)||MI(t,e.expression)},305:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.exclamationToken)||MI(t,e.equalsToken)||MI(t,e.objectAssignmentInitializer)},306:function(e,t,n){return MI(t,e.expression)},170:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.dotDotDotToken)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.type)||MI(t,e.initializer)},173:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.exclamationToken)||MI(t,e.type)||MI(t,e.initializer)},172:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.type)||MI(t,e.initializer)},304:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.exclamationToken)||MI(t,e.initializer)},261:function(e,t,n){return MI(t,e.name)||MI(t,e.exclamationToken)||MI(t,e.type)||MI(t,e.initializer)},209:function(e,t,n){return MI(t,e.dotDotDotToken)||MI(t,e.propertyName)||MI(t,e.name)||MI(t,e.initializer)},182:function(e,t,n){return RI(t,n,e.modifiers)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)},186:function(e,t,n){return RI(t,n,e.modifiers)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)},185:function(e,t,n){return RI(t,n,e.modifiers)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)},180:WI,181:WI,175:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.asteriskToken)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.exclamationToken)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.body)},174:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.questionToken)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)},177:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.body)},178:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.body)},179:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.body)},263:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.asteriskToken)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.body)},219:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.asteriskToken)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.body)},220:function(e,t,n){return RI(t,n,e.modifiers)||RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)||MI(t,e.equalsGreaterThanToken)||MI(t,e.body)},176:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.body)},184:function(e,t,n){return MI(t,e.typeName)||RI(t,n,e.typeArguments)},183:function(e,t,n){return MI(t,e.assertsModifier)||MI(t,e.parameterName)||MI(t,e.type)},187:function(e,t,n){return MI(t,e.exprName)||RI(t,n,e.typeArguments)},188:function(e,t,n){return RI(t,n,e.members)},189:function(e,t,n){return MI(t,e.elementType)},190:function(e,t,n){return RI(t,n,e.elements)},193:$I,194:$I,195:function(e,t,n){return MI(t,e.checkType)||MI(t,e.extendsType)||MI(t,e.trueType)||MI(t,e.falseType)},196:function(e,t,n){return MI(t,e.typeParameter)},206:function(e,t,n){return MI(t,e.argument)||MI(t,e.attributes)||MI(t,e.qualifier)||RI(t,n,e.typeArguments)},303:function(e,t,n){return MI(t,e.assertClause)},197:KI,199:KI,200:function(e,t,n){return MI(t,e.objectType)||MI(t,e.indexType)},201:function(e,t,n){return MI(t,e.readonlyToken)||MI(t,e.typeParameter)||MI(t,e.nameType)||MI(t,e.questionToken)||MI(t,e.type)||RI(t,n,e.members)},202:function(e,t,n){return MI(t,e.literal)},203:function(e,t,n){return MI(t,e.dotDotDotToken)||MI(t,e.name)||MI(t,e.questionToken)||MI(t,e.type)},207:HI,208:HI,210:function(e,t,n){return RI(t,n,e.elements)},211:function(e,t,n){return RI(t,n,e.properties)},212:function(e,t,n){return MI(t,e.expression)||MI(t,e.questionDotToken)||MI(t,e.name)},213:function(e,t,n){return MI(t,e.expression)||MI(t,e.questionDotToken)||MI(t,e.argumentExpression)},214:GI,215:GI,216:function(e,t,n){return MI(t,e.tag)||MI(t,e.questionDotToken)||RI(t,n,e.typeArguments)||MI(t,e.template)},217:function(e,t,n){return MI(t,e.type)||MI(t,e.expression)},218:function(e,t,n){return MI(t,e.expression)},221:function(e,t,n){return MI(t,e.expression)},222:function(e,t,n){return MI(t,e.expression)},223:function(e,t,n){return MI(t,e.expression)},225:function(e,t,n){return MI(t,e.operand)},230:function(e,t,n){return MI(t,e.asteriskToken)||MI(t,e.expression)},224:function(e,t,n){return MI(t,e.expression)},226:function(e,t,n){return MI(t,e.operand)},227:function(e,t,n){return MI(t,e.left)||MI(t,e.operatorToken)||MI(t,e.right)},235:function(e,t,n){return MI(t,e.expression)||MI(t,e.type)},236:function(e,t,n){return MI(t,e.expression)},239:function(e,t,n){return MI(t,e.expression)||MI(t,e.type)},237:function(e,t,n){return MI(t,e.name)},228:function(e,t,n){return MI(t,e.condition)||MI(t,e.questionToken)||MI(t,e.whenTrue)||MI(t,e.colonToken)||MI(t,e.whenFalse)},231:function(e,t,n){return MI(t,e.expression)},242:XI,269:XI,308:function(e,t,n){return RI(t,n,e.statements)||MI(t,e.endOfFileToken)},244:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.declarationList)},262:function(e,t,n){return RI(t,n,e.declarations)},245:function(e,t,n){return MI(t,e.expression)},246:function(e,t,n){return MI(t,e.expression)||MI(t,e.thenStatement)||MI(t,e.elseStatement)},247:function(e,t,n){return MI(t,e.statement)||MI(t,e.expression)},248:function(e,t,n){return MI(t,e.expression)||MI(t,e.statement)},249:function(e,t,n){return MI(t,e.initializer)||MI(t,e.condition)||MI(t,e.incrementor)||MI(t,e.statement)},250:function(e,t,n){return MI(t,e.initializer)||MI(t,e.expression)||MI(t,e.statement)},251:function(e,t,n){return MI(t,e.awaitModifier)||MI(t,e.initializer)||MI(t,e.expression)||MI(t,e.statement)},252:QI,253:QI,254:function(e,t,n){return MI(t,e.expression)},255:function(e,t,n){return MI(t,e.expression)||MI(t,e.statement)},256:function(e,t,n){return MI(t,e.expression)||MI(t,e.caseBlock)},270:function(e,t,n){return RI(t,n,e.clauses)},297:function(e,t,n){return MI(t,e.expression)||RI(t,n,e.statements)},298:function(e,t,n){return RI(t,n,e.statements)},257:function(e,t,n){return MI(t,e.label)||MI(t,e.statement)},258:function(e,t,n){return MI(t,e.expression)},259:function(e,t,n){return MI(t,e.tryBlock)||MI(t,e.catchClause)||MI(t,e.finallyBlock)},300:function(e,t,n){return MI(t,e.variableDeclaration)||MI(t,e.block)},171:function(e,t,n){return MI(t,e.expression)},264:YI,232:YI,265:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.heritageClauses)||RI(t,n,e.members)},266:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.typeParameters)||MI(t,e.type)},267:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.members)},307:function(e,t,n){return MI(t,e.name)||MI(t,e.initializer)},268:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.body)},272:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||MI(t,e.moduleReference)},273:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.importClause)||MI(t,e.moduleSpecifier)||MI(t,e.attributes)},274:function(e,t,n){return MI(t,e.name)||MI(t,e.namedBindings)},301:function(e,t,n){return RI(t,n,e.elements)},302:function(e,t,n){return MI(t,e.name)||MI(t,e.value)},271:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)},275:function(e,t,n){return MI(t,e.name)},281:function(e,t,n){return MI(t,e.name)},276:ZI,280:ZI,279:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.exportClause)||MI(t,e.moduleSpecifier)||MI(t,e.attributes)},277:eO,282:eO,278:function(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.expression)},229:function(e,t,n){return MI(t,e.head)||RI(t,n,e.templateSpans)},240:function(e,t,n){return MI(t,e.expression)||MI(t,e.literal)},204:function(e,t,n){return MI(t,e.head)||RI(t,n,e.templateSpans)},205:function(e,t,n){return MI(t,e.type)||MI(t,e.literal)},168:function(e,t,n){return MI(t,e.expression)},299:function(e,t,n){return RI(t,n,e.types)},234:function(e,t,n){return MI(t,e.expression)||RI(t,n,e.typeArguments)},284:function(e,t,n){return MI(t,e.expression)},283:function(e,t,n){return RI(t,n,e.modifiers)},357:function(e,t,n){return RI(t,n,e.elements)},285:function(e,t,n){return MI(t,e.openingElement)||RI(t,n,e.children)||MI(t,e.closingElement)},289:function(e,t,n){return MI(t,e.openingFragment)||RI(t,n,e.children)||MI(t,e.closingFragment)},286:tO,287:tO,293:function(e,t,n){return RI(t,n,e.properties)},292:function(e,t,n){return MI(t,e.name)||MI(t,e.initializer)},294:function(e,t,n){return MI(t,e.expression)},295:function(e,t,n){return MI(t,e.dotDotDotToken)||MI(t,e.expression)},288:function(e,t,n){return MI(t,e.tagName)},296:function(e,t,n){return MI(t,e.namespace)||MI(t,e.name)},191:nO,192:nO,310:nO,316:nO,315:nO,317:nO,319:nO,318:function(e,t,n){return RI(t,n,e.parameters)||MI(t,e.type)},321:function(e,t,n){return("string"==typeof e.comment?void 0:RI(t,n,e.comment))||RI(t,n,e.tags)},348:function(e,t,n){return MI(t,e.tagName)||MI(t,e.name)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},311:function(e,t,n){return MI(t,e.name)},312:function(e,t,n){return MI(t,e.left)||MI(t,e.right)},342:rO,349:rO,331:function(e,t,n){return MI(t,e.tagName)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},330:function(e,t,n){return MI(t,e.tagName)||MI(t,e.class)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},329:function(e,t,n){return MI(t,e.tagName)||MI(t,e.class)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},346:function(e,t,n){return MI(t,e.tagName)||MI(t,e.constraint)||RI(t,n,e.typeParameters)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},347:function(e,t,n){return MI(t,e.tagName)||(e.typeExpression&&310===e.typeExpression.kind?MI(t,e.typeExpression)||MI(t,e.fullName)||("string"==typeof e.comment?void 0:RI(t,n,e.comment)):MI(t,e.fullName)||MI(t,e.typeExpression)||("string"==typeof e.comment?void 0:RI(t,n,e.comment)))},339:function(e,t,n){return MI(t,e.tagName)||MI(t,e.fullName)||MI(t,e.typeExpression)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},343:iO,345:iO,344:iO,341:iO,351:iO,350:iO,340:iO,324:function(e,t,n){return g(e.typeParameters,t)||g(e.parameters,t)||MI(t,e.type)},325:oO,326:oO,327:oO,323:function(e,t,n){return g(e.jsDocPropertyTags,t)},328:aO,333:aO,334:aO,335:aO,336:aO,337:aO,332:aO,338:aO,352:function(e,t,n){return MI(t,e.tagName)||MI(t,e.importClause)||MI(t,e.moduleSpecifier)||MI(t,e.attributes)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))},356:function(e,t,n){return MI(t,e.expression)}};function WI(e,t,n){return RI(t,n,e.typeParameters)||RI(t,n,e.parameters)||MI(t,e.type)}function $I(e,t,n){return RI(t,n,e.types)}function KI(e,t,n){return MI(t,e.type)}function HI(e,t,n){return RI(t,n,e.elements)}function GI(e,t,n){return MI(t,e.expression)||MI(t,e.questionDotToken)||RI(t,n,e.typeArguments)||RI(t,n,e.arguments)}function XI(e,t,n){return RI(t,n,e.statements)}function QI(e,t,n){return MI(t,e.label)}function YI(e,t,n){return RI(t,n,e.modifiers)||MI(t,e.name)||RI(t,n,e.typeParameters)||RI(t,n,e.heritageClauses)||RI(t,n,e.members)}function ZI(e,t,n){return RI(t,n,e.elements)}function eO(e,t,n){return MI(t,e.propertyName)||MI(t,e.name)}function tO(e,t,n){return MI(t,e.tagName)||RI(t,n,e.typeArguments)||MI(t,e.attributes)}function nO(e,t,n){return MI(t,e.type)}function rO(e,t,n){return MI(t,e.tagName)||(e.isNameFirst?MI(t,e.name)||MI(t,e.typeExpression):MI(t,e.typeExpression)||MI(t,e.name))||("string"==typeof e.comment?void 0:RI(t,n,e.comment))}function iO(e,t,n){return MI(t,e.tagName)||MI(t,e.typeExpression)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))}function oO(e,t,n){return MI(t,e.name)}function aO(e,t,n){return MI(t,e.tagName)||("string"==typeof e.comment?void 0:RI(t,n,e.comment))}function sO(e,t,n){if(void 0===e||e.kind<=166)return;const r=VI[e.kind];return void 0===r?void 0:r(e,t,n)}function cO(e,t,n){const r=lO(e),i=[];for(;i.length=0;--t)r.push(e[t]),i.push(o)}else{const n=t(e,o);if(n){if("skip"===n)continue;return n}if(e.kind>=167)for(const t of lO(e))r.push(t),i.push(e)}}}function lO(e){const t=[];return sO(e,n,n),t;function n(e){t.unshift(e)}}function _O(e){e.externalModuleIndicator=JI(e)}function uO(e,t,n,r=!1,i){var o,a;let s;null==(o=Yn)||o.push(Yn.Phase.Parse,"createSourceFile",{path:e},!0),ar("beforeParse");const{languageVersion:c,setExternalModuleIndicator:l,impliedNodeFormat:_,jsDocParsingMode:u}="object"==typeof n?n:{languageVersion:n};if(100===c)s=UI.parseSourceFile(e,t,c,void 0,r,6,ct,u);else{const n=void 0===_?l:e=>(e.impliedNodeFormat=_,(l||_O)(e));s=UI.parseSourceFile(e,t,c,void 0,r,i,n,u)}return ar("afterParse"),sr("Parse","beforeParse","afterParse"),null==(a=Yn)||a.pop(),s}function dO(e,t){return UI.parseIsolatedEntityName(e,t)}function pO(e,t){return UI.parseJsonText(e,t)}function fO(e){return void 0!==e.externalModuleIndicator}function mO(e,t,n,r=!1){const i=vO.updateSourceFile(e,t,n,r);return i.flags|=12582912&e.flags,i}function gO(e,t,n){const r=UI.JSDocParser.parseIsolatedJSDocComment(e,t,n);return r&&r.jsDoc&&UI.fixupParentReferences(r.jsDoc),r}function hO(e,t,n){return UI.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}(e=>{var t,n,r,i,o,a=ks(99,!0),s=40960;function c(e){return x++,e}var l,_,u,d,m,g,h,y,v,b,x,S,k,T,C,N,D=dw(11,{createBaseSourceFileNode:e=>c(new o(e,0,0)),createBaseIdentifierNode:e=>c(new r(e,0,0)),createBasePrivateIdentifierNode:e=>c(new i(e,0,0)),createBaseTokenNode:e=>c(new n(e,0,0)),createBaseNode:e=>c(new t(e,0,0))}),{createNodeArray:E,createNumericLiteral:F,createStringLiteral:P,createLiteralLikeNode:A,createIdentifier:I,createPrivateIdentifier:O,createToken:L,createArrayLiteralExpression:j,createObjectLiteralExpression:M,createPropertyAccessExpression:R,createPropertyAccessChain:B,createElementAccessExpression:J,createElementAccessChain:z,createCallExpression:q,createCallChain:V,createNewExpression:W,createParenthesizedExpression:$,createBlock:K,createVariableStatement:H,createExpressionStatement:G,createIfStatement:Q,createWhileStatement:Z,createForStatement:ee,createForOfStatement:te,createVariableDeclaration:ne,createVariableDeclarationList:re}=D,ie=!0,oe=!1;function ae(e,t,n=2,r,i=!1){se(e,t,n,r,6,0),_=N,We();const o=Je();let a,s;if(1===qe())a=St([],o,o),s=yt();else{let e;for(;1!==qe();){let t;switch(qe()){case 23:t=di();break;case 112:case 97:case 106:t=yt();break;case 41:t=tt(()=>9===We()&&59!==We())?Jr():fi();break;case 9:case 11:if(tt(()=>59!==We())){t=yn();break}default:t=fi()}e&&nt(e)?e.push(t):e?e=[e,t]:(e=t,1!==qe()&&Le(ha.Unexpected_token))}const t=nt(e)?kt(j(e),o):gn.checkDefined(e),n=G(t);kt(n,o),a=St([n],o),s=ht(1,ha.Unexpected_token)}const c=fe(e,2,6,!1,a,s,_,ct);i&&pe(c),c.nodeCount=x,c.identifierCount=k,c.identifiers=S,c.parseDiagnostics=nS(h,c),y&&(c.jsDocDiagnostics=nS(y,c));const l=c;return ce(),l}function se(e,s,c,p,f,y){switch(t=Wx.getNodeConstructor(),n=Wx.getTokenConstructor(),r=Wx.getIdentifierConstructor(),i=Wx.getPrivateIdentifierConstructor(),o=Wx.getSourceFileConstructor(),l=Ko(e),u=s,d=c,v=p,m=f,g=hS(f),h=[],T=0,S=new Map,k=0,x=0,_=0,ie=!0,m){case 1:case 2:N=524288;break;case 6:N=134742016;break;default:N=0}oe=!1,a.setText(u),a.setOnError(Be),a.setScriptTarget(d),a.setLanguageVariant(g),a.setScriptKind(m),a.setJSDocParsingMode(y)}function ce(){a.clearCommentDirectives(),a.setText(""),a.setOnError(void 0),a.setScriptKind(0),a.setJSDocParsingMode(0),u=void 0,d=void 0,v=void 0,m=void 0,g=void 0,_=0,h=void 0,y=void 0,T=0,S=void 0,C=void 0,ie=!0}e.parseSourceFile=function(e,t,n,r,i=!1,o,s,c=0){var d;if(6===(o=Dk(e,o))){const o=ae(e,t,n,r,i);return XL(o,null==(d=o.statements[0])?void 0:d.expression,o.parseDiagnostics,!1,void 0),o.referencedFiles=p,o.typeReferenceDirectives=p,o.libReferenceDirectives=p,o.amdDependencies=p,o.hasNoDefaultLib=!1,o.pragmas=f,o}se(e,t,n,r,o,c);const m=function(e,t,n,r,i){const o=SO(l);o&&(N|=33554432);_=N,We();const s=Yt(0,Ri);gn.assert(1===qe());const c=ze(),d=ue(yt(),c),p=fe(l,e,n,o,s,d,_,r);TO(p,u),CO(p,f),p.commentDirectives=a.getCommentDirectives(),p.nodeCount=x,p.identifierCount=k,p.identifiers=S,p.parseDiagnostics=nS(h,p),p.jsDocParsingMode=i,y&&(p.jsDocDiagnostics=nS(y,p));t&&pe(p);return p;function f(e,t,n){h.push(Zx(l,u,e,t,n))}}(n,i,o,s||_O,c);return ce(),m},e.parseIsolatedEntityName=function(e,t){se("",e,t,void 0,1,0),We();const n=ln(!0),r=1===qe()&&!h.length;return ce(),r?n:void 0},e.parseJsonText=ae;let _e=!1;function ue(e,t){if(!t)return e;gn.assert(!e.jsDoc);const n=U(wf(e,u),t=>Wo.parseJSDocComment(e,t.pos,t.end-t.pos));return n.length&&(e.jsDoc=n),_e&&(_e=!1,e.flags|=536870912),e}function pe(e){MT(e,!0)}function fe(e,t,n,r,i,o,s,c){let l=D.createSourceFile(i,o,s);if(OT(l,0,u.length),_(l),!r&&fO(l)&&67108864&l.transformFlags){const e=l;l=function(e){const t=v,n=vO.createSyntaxCursor(e);v={currentNode:function(e){const t=n.currentNode(e);return ie&&t&&c(t)&&xO(t),t}};const r=[],i=h;h=[];let o=0,s=l(e.statements,0);for(;-1!==s;){const t=e.statements[o],n=e.statements[s];de(r,e.statements,o,s),o=_(e.statements,s);const c=w(i,e=>e.start>=t.pos),u=c>=0?w(i,e=>e.start>=n.pos,c):-1;c>=0&&de(h,i,c,u>=0?u:void 0),et(()=>{const t=N;for(N|=65536,a.resetTokenState(n.pos),We();1!==qe();){const t=a.getTokenFullStart(),n=Zt(0,Ri);if(r.push(n),t===a.getTokenFullStart()&&We(),o>=0){const t=e.statements[o];if(n.end===t.pos)break;n.end>t.pos&&(o=_(e.statements,o+1))}}N=t},2),s=o>=0?l(e.statements,o):-1}if(o>=0){const t=e.statements[o];de(r,e.statements,o);const n=w(i,e=>e.start>=t.pos);n>=0&&de(h,i,n)}return v=t,D.updateSourceFile(e,AI(E(r),e.statements));function c(e){return!(65536&e.flags||!(67108864&e.transformFlags))}function l(e,t){for(let n=t;n118}function ot(){return 80===qe()||(127!==qe()||!Fe())&&((135!==qe()||!Oe())&&qe()>118)}function at(e,t,n=!0){return qe()===e?(n&&We(),!0):(t?Le(t):Le(ha._0_expected,ja(e)),!1)}e.fixupParentReferences=pe;const st=Object.keys(ba).filter(e=>e.length>2);function lt(e){if(TE(e))return void Me(is(u,e.template.pos),e.template.end,ha.Module_declaration_names_may_only_use_or_quoted_strings);const t=fD(e)?kc(e):void 0;if(!t||!Ss(t,d))return void Le(ha._0_expected,ja(27));const n=is(u,e.pos);switch(t){case"const":case"let":case"var":return void Me(n,e.end,ha.Variable_declaration_not_allowed_at_this_location);case"declare":return;case"interface":return void _t(ha.Interface_name_cannot_be_0,ha.Interface_must_be_given_a_name,19);case"is":return void Me(n,a.getTokenStart(),ha.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);case"module":case"namespace":return void _t(ha.Namespace_name_cannot_be_0,ha.Namespace_must_be_given_a_name,19);case"type":return void _t(ha.Type_alias_name_cannot_be_0,ha.Type_alias_must_be_given_a_name,64)}const r=Jt(t,st,dt)??function(e){for(const t of st)if(e.length>t.length+2&&en(e,t))return`${t} ${e.slice(t.length)}`;return}(t);r?Me(n,e.end,ha.Unknown_keyword_or_identifier_Did_you_mean_0,r):0!==qe()&&Me(n,e.end,ha.Unexpected_keyword_or_identifier)}function _t(e,t,n){qe()===n?Le(t):Le(e,a.getTokenValue())}function ut(e){return qe()===e?($e(),!0):(gn.assert(Oh(e)),Le(ha._0_expected,ja(e)),!1)}function pt(e,t,n,r){if(qe()===t)return void We();const i=Le(ha._0_expected,ja(t));n&&i&&fT(i,Zx(l,u,r,1,ha.The_parser_expected_to_find_a_1_to_match_the_0_token_here,ja(e),ja(t)))}function ft(e){return qe()===e&&(We(),!0)}function mt(e){if(qe()===e)return yt()}function gt(e){if(qe()===e)return function(){const e=Je(),t=qe();return $e(),kt(L(t),e)}()}function ht(e,t,n){return mt(e)||Tt(e,!1,t||ha._0_expected,n||ja(e))}function yt(){const e=Je(),t=qe();return We(),kt(L(t),e)}function vt(){return 27===qe()||(20===qe()||1===qe()||a.hasPrecedingLineBreak())}function bt(){return!!vt()&&(27===qe()&&We(),!0)}function xt(){return bt()||at(27)}function St(e,t,n,r){const i=E(e,r);return IT(i,t,n??a.getTokenFullStart()),i}function kt(e,t,n){return IT(e,t,n??a.getTokenFullStart()),N&&(e.flags|=N),oe&&(oe=!1,e.flags|=262144),e}function Tt(e,t,n,...r){t?je(a.getTokenFullStart(),0,n,...r):n&&Le(n,...r);const i=Je();return kt(80===e?I("",void 0):ql(e)?D.createTemplateLiteralLikeNode(e,"","",void 0):9===e?F("",void 0):11===e?P("",void 0):283===e?D.createMissingDeclaration():L(e),i)}function Ct(e){let t=S.get(e);return void 0===t&&S.set(e,t=e),t}function wt(e,t,n){if(e){k++;const e=a.hasPrecedingJSDocLeadingAsterisks()?a.getTokenStart():Je(),t=qe(),n=Ct(a.getTokenValue()),r=a.hasExtendedUnicodeEscape();return Ue(),kt(I(n,t,r),e)}if(81===qe())return Le(n||ha.Private_identifiers_are_not_allowed_outside_class_bodies),wt(!0);if(0===qe()&&a.tryScan(()=>80===a.reScanInvalidIdentifier()))return wt(!0);k++;const r=1===qe(),i=a.isReservedWord(),o=a.getTokenText(),s=i?ha.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:ha.Identifier_expected;return Tt(80,r,t||s,o)}function Nt(e){return wt(it(),void 0,e)}function Dt(e,t){return wt(ot(),e,t)}function Et(e){return wt(ya(qe()),e)}function Ft(){return(a.hasUnicodeEscape()||a.hasExtendedUnicodeEscape())&&Le(ha.Unicode_escape_sequence_cannot_appear_here),wt(ya(qe()))}function Pt(){return ya(qe())||11===qe()||9===qe()||10===qe()}function At(e){if(11===qe()||9===qe()||10===qe()){const e=yn();return e.text=Ct(e.text),e}return e&&23===qe()?function(){const e=Je();at(23);const t=Te(Tr);return at(24),kt(D.createComputedPropertyName(t),e)}():81===qe()?Ot():Et()}function It(){return At(!0)}function Ot(){const e=Je(),t=O(Ct(a.getTokenValue()));return We(),kt(t,e)}function Lt(e){return qe()===e&&rt(Mt)}function jt(){return We(),!a.hasPrecedingLineBreak()&&zt()}function Mt(){switch(qe()){case 87:return 94===We();case 95:return We(),90===qe()?tt(qt):156===qe()?tt(Bt):Rt();case 90:return qt();case 126:return We(),zt();case 139:case 153:return We(),23===qe()||Pt();default:return jt()}}function Rt(){return 60===qe()||42!==qe()&&130!==qe()&&19!==qe()&&zt()}function Bt(){return We(),Rt()}function zt(){return 23===qe()||19===qe()||42===qe()||26===qe()||Pt()}function qt(){return We(),86===qe()||100===qe()||120===qe()||60===qe()||128===qe()&&tt(Ci)||134===qe()&&tt(wi)}function Ut(e,t){if(tn(e))return!0;switch(e){case 0:case 1:case 3:return!(27===qe()&&t)&&Fi();case 2:return 84===qe()||90===qe();case 4:return tt(zn);case 5:return tt(so)||27===qe()&&!t;case 6:return 23===qe()||Pt();case 12:switch(qe()){case 23:case 42:case 26:case 25:return!0;default:return Pt()}case 18:return Pt();case 9:return 23===qe()||26===qe()||Pt();case 24:return ya(qe())||11===qe();case 7:return 19===qe()?tt(Vt):t?ot()&&!Ht():Sr()&&!Ht();case 8:return Hi();case 10:return 28===qe()||26===qe()||Hi();case 19:return 103===qe()||87===qe()||ot();case 15:switch(qe()){case 28:case 25:return!0}case 11:return 26===qe()||kr();case 16:return Fn(!1);case 17:return Fn(!0);case 20:case 21:return 28===qe()||ar();case 22:return So();case 23:return(161!==qe()||!tt(qi))&&(11===qe()||ya(qe()));case 13:return ya(qe())||19===qe();case 14:case 25:return!0;case 26:return gn.fail("ParsingContext.Count used as a context");default:gn.assertNever(e,"Non-exhaustive case in 'isListElement'.")}}function Vt(){if(gn.assert(19===qe()),20===We()){const e=We();return 28===e||19===e||96===e||119===e}return!0}function Wt(){return We(),ot()}function $t(){return We(),ya(qe())}function Kt(){return We(),va(qe())}function Ht(){return(119===qe()||96===qe())&&tt(Gt)}function Gt(){return We(),kr()}function Xt(){return We(),ar()}function Qt(e){if(1===qe())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return 20===qe();case 3:return 20===qe()||84===qe()||90===qe();case 7:return 19===qe()||96===qe()||119===qe();case 8:return function(){if(vt())return!0;if(Or(qe()))return!0;if(39===qe())return!0;return!1}();case 19:return 32===qe()||21===qe()||19===qe()||96===qe()||119===qe();case 11:return 22===qe()||27===qe();case 15:case 21:case 10:return 24===qe();case 17:case 16:case 18:return 22===qe()||24===qe();case 20:return 28!==qe();case 22:return 19===qe()||20===qe();case 13:return 32===qe()||44===qe();case 14:return 30===qe()&&tt(Eo);default:return!1}}function Yt(e,t){const n=T;T|=1<=0)}function an(e){return 6===e?ha.An_enum_member_name_must_be_followed_by_a_or:void 0}function sn(){const e=St([],Je());return e.isMissingList=!0,e}function cn(e,t,n,r){if(at(n)){const n=on(e,t);return at(r),n}return sn()}function ln(e,t){const n=Je();let r=e?Et(t):Dt(t);for(;ft(25)&&30!==qe();)r=kt(D.createQualifiedName(r,un(e,!1,!0)),n);return r}function _n(e,t){return kt(D.createQualifiedName(e,t),e.pos)}function un(e,t,n){if(a.hasPrecedingLineBreak()&&ya(qe())){if(tt(Ti))return Tt(80,!0,ha.Identifier_expected)}if(81===qe()){const e=Ot();return t?e:Tt(80,!0,ha.Identifier_expected)}return e?n?Et():Ft():Dt()}function dn(e){const t=Je();return kt(D.createTemplateExpression(vn(e),function(e){const t=Je(),n=[];let r;do{r=hn(e),n.push(r)}while(17===r.literal.kind);return St(n,t)}(e)),t)}function pn(){const e=Je();return kt(D.createTemplateLiteralType(vn(!1),function(){const e=Je(),t=[];let n;do{n=fn(),t.push(n)}while(17===n.literal.kind);return St(t,e)}()),e)}function fn(){const e=Je();return kt(D.createTemplateLiteralTypeSpan(br(),mn(!1)),e)}function mn(e){return 20===qe()?(Ge(e),function(){const e=bn(qe());return gn.assert(17===e.kind||18===e.kind,"Template fragment has wrong token kind"),e}()):ht(18,ha._0_expected,ja(20))}function hn(e){const t=Je();return kt(D.createTemplateSpan(Te(Tr),mn(e)),t)}function yn(){return bn(qe())}function vn(e){!e&&26656&a.getTokenFlags()&&Ge(!1);const t=bn(qe());return gn.assert(16===t.kind,"Template head has wrong token kind"),t}function bn(e){const t=Je(),n=ql(e)?D.createTemplateLiteralLikeNode(e,a.getTokenValue(),function(e){const t=15===e||18===e,n=a.getTokenText();return n.substring(1,n.length-(a.isUnterminated()?0:t?1:2))}(e),7176&a.getTokenFlags()):9===e?F(a.getTokenValue(),a.getNumericLiteralFlags()):11===e?P(a.getTokenValue(),void 0,a.hasExtendedUnicodeEscape()):Bl(e)?A(e,a.getTokenValue()):gn.fail();return a.hasExtendedUnicodeEscape()&&(n.hasExtendedUnicodeEscape=!0),a.isUnterminated()&&(n.isUnterminated=!0),We(),kt(n,t)}function xn(){return ln(!0,ha.Type_expected)}function Sn(){if(!a.hasPrecedingLineBreak()&&30===Xe())return cn(20,br,30,32)}function kn(){const e=Je();return kt(D.createTypeReferenceNode(xn(),Sn()),e)}function Tn(e){switch(e.kind){case 184:return Od(e.typeName);case 185:case 186:{const{parameters:t,type:n}=e;return!!t.isMissingList||Tn(n)}case 197:return Tn(e.type);default:return!1}}function Cn(){const e=Je();return We(),kt(D.createThisTypeNode(),e)}function wn(){const e=Je();let t;return 110!==qe()&&105!==qe()||(t=Et(),at(59)),kt(D.createParameterDeclaration(void 0,void 0,t,void 0,Nn(),void 0),e)}function Nn(){a.setSkipJsDocLeadingAsterisks(!0);const e=Je();if(ft(144)){const t=D.createJSDocNamepathType(void 0);e:for(;;)switch(qe()){case 20:case 1:case 28:case 5:break e;default:$e()}return a.setSkipJsDocLeadingAsterisks(!1),kt(t,e)}const t=ft(26);let n=yr();return a.setSkipJsDocLeadingAsterisks(!1),t&&(n=kt(D.createJSDocVariadicType(n),e)),64===qe()?(We(),kt(D.createJSDocOptionalType(n),e)):n}function Dn(){const e=Je(),t=po(!1,!0),n=Dt();let r,i;ft(96)&&(ar()||!kr()?r=br():i=zr());const o=ft(64)?br():void 0,a=D.createTypeParameterDeclaration(t,n,r,o);return a.expression=i,kt(a,e)}function En(){if(30===qe())return cn(19,Dn,30,32)}function Fn(e){return 26===qe()||Hi()||r_(qe())||60===qe()||ar(!e)}function Pn(e){return An(e)}function An(e,t=!0){const n=Je(),r=ze(),i=e?Ne(()=>po(!0)):De(()=>po(!0));if(110===qe()){const e=D.createParameterDeclaration(i,void 0,wt(!0),void 0,xr(),void 0),t=ve(i);return t&&Re(t,ha.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),ue(kt(e,n),r)}const o=ie;ie=!1;const a=mt(26);if(!t&&!it()&&23!==qe()&&19!==qe())return;const s=ue(kt(D.createParameterDeclaration(i,a,function(e){const t=Gi(ha.Private_identifiers_cannot_be_used_as_parameters);return 0===fd(t)&&!X(e)&&r_(qe())&&We(),t}(i),mt(58),xr(),Cr()),n),r);return ie=o,s}function In(e,t){if(function(e,t){if(39===e)return at(e),!0;if(ft(59))return!0;if(t&&39===qe())return Le(ha._0_expected,ja(59)),We(),!0;return!1}(e,t))return Ce(yr)}function On(e,t){const n=Fe(),r=Oe();he(!!(1&e)),be(!!(2&e));const i=32&e?on(17,wn):on(16,()=>t?Pn(r):An(r,!1));return he(n),be(r),i}function Ln(e){if(!at(21))return sn();const t=On(e,!0);return at(22),t}function jn(){ft(28)||xt()}function Mn(e){const t=Je(),n=ze();181===e&&at(105);const r=En(),i=Ln(4),o=In(59,!0);jn();return ue(kt(180===e?D.createCallSignature(r,i,o):D.createConstructSignature(r,i,o),t),n)}function Rn(){return 23===qe()&&tt(Bn)}function Bn(){if(We(),26===qe()||24===qe())return!0;if(r_(qe())){if(We(),ot())return!0}else{if(!ot())return!1;We()}return 59===qe()||28===qe()||58===qe()&&(We(),59===qe()||28===qe()||24===qe())}function Jn(e,t,n){const r=cn(16,()=>Pn(!1),23,24),i=xr();jn();return ue(kt(D.createIndexSignature(n,r,i),e),t)}function zn(){if(21===qe()||30===qe()||139===qe()||153===qe())return!0;let e=!1;for(;r_(qe());)e=!0,We();return 23===qe()||(Pt()&&(e=!0,We()),!!e&&(21===qe()||30===qe()||58===qe()||59===qe()||28===qe()||vt()))}function qn(){if(21===qe()||30===qe())return Mn(180);if(105===qe()&&tt(Un))return Mn(181);const e=Je(),t=ze(),n=po(!1);return Lt(139)?ao(e,t,n,178,4):Lt(153)?ao(e,t,n,179,4):Rn()?Jn(e,t,n):function(e,t,n){const r=It(),i=mt(58);let o;if(21===qe()||30===qe()){const e=En(),t=Ln(4),a=In(59,!0);o=D.createMethodSignature(n,r,i,e,t,a)}else{const e=xr();o=D.createPropertySignature(n,r,i,e),64===qe()&&(o.initializer=Cr())}return jn(),ue(kt(o,e),t)}(e,t,n)}function Un(){return We(),21===qe()||30===qe()}function Vn(){return 25===We()}function Wn(){switch(We()){case 21:case 30:case 25:return!0}return!1}function $n(){let e;return at(19)?(e=Yt(4,qn),at(20)):e=sn(),e}function Kn(){return We(),40===qe()||41===qe()?148===We():(148===qe()&&We(),23===qe()&&Wt()&&103===We())}function Hn(){const e=Je();let t;at(19),148!==qe()&&40!==qe()&&41!==qe()||(t=yt(),148!==t.kind&&at(148)),at(23);const n=function(){const e=Je(),t=Et();at(103);const n=br();return kt(D.createTypeParameterDeclaration(void 0,t,n,void 0),e)}(),r=ft(130)?br():void 0;let i;at(24),58!==qe()&&40!==qe()&&41!==qe()||(i=yt(),58!==i.kind&&at(58));const o=xr();xt();const a=Yt(4,qn);return at(20),kt(D.createMappedTypeNode(t,n,r,i,o,a),e)}function Gn(){const e=Je();if(ft(26))return kt(D.createRestTypeNode(br()),e);const t=br();if(CP(t)&&t.pos===t.type.pos){const e=D.createOptionalTypeNode(t.type);return AI(e,t),e.flags=t.flags,e}return t}function Xn(){return 59===We()||58===qe()&&59===We()}function Qn(){return 26===qe()?ya(We())&&Xn():ya(qe())&&Xn()}function Yn(){if(tt(Qn)){const e=Je(),t=ze(),n=mt(26),r=Et(),i=mt(58);at(59);const o=Gn();return ue(kt(D.createNamedTupleMember(n,r,i,o),e),t)}return Gn()}function Zn(){const e=Je(),t=ze(),n=function(){let e;if(128===qe()){const t=Je();We(),e=St([kt(L(128),t)],t)}return e}(),r=ft(105);gn.assert(!n||r,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");const i=En(),o=Ln(4),a=In(39,!1);return ue(kt(r?D.createConstructorTypeNode(n,i,o,a):D.createFunctionTypeNode(i,o,a),e),t)}function er(){const e=yt();return 25===qe()?void 0:e}function tr(e){const t=Je();e&&We();let n=112===qe()||97===qe()||106===qe()?yt():bn(qe());return e&&(n=kt(D.createPrefixUnaryExpression(41,n),t)),kt(D.createLiteralTypeNode(n),t)}function nr(){return We(),102===qe()}function rr(){_|=4194304;const e=Je(),t=ft(114);at(102),at(21);const n=br();let r;if(ft(28)){const e=a.getTokenStart();at(19);const t=qe();if(118===t||132===t?We():Le(ha._0_expected,ja(118)),at(59),r=Io(t,!0),ft(28),!at(20)){const t=ke(h);t&&t.code===ha._0_expected.code&&fT(t,Zx(l,u,e,1,ha.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}at(22);const i=ft(25)?xn():void 0,o=Sn();return kt(D.createImportTypeNode(n,r,i,o,t),e)}function ir(){return We(),9===qe()||10===qe()}function or(){switch(qe()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return rt(er)||kn();case 67:a.reScanAsteriskEqualsToken();case 42:return function(){const e=Je();return We(),kt(D.createJSDocAllType(),e)}();case 61:a.reScanQuestionToken();case 58:return function(){const e=Je();return We(),28===qe()||20===qe()||22===qe()||32===qe()||64===qe()||52===qe()?kt(D.createJSDocUnknownType(),e):kt(D.createJSDocNullableType(br(),!1),e)}();case 100:return function(){const e=Je(),t=ze();if(rt(No)){const n=Ln(36),r=In(59,!1);return ue(kt(D.createJSDocFunctionType(n,r),e),t)}return kt(D.createTypeReferenceNode(Et(),void 0),e)}();case 54:return function(){const e=Je();return We(),kt(D.createJSDocNonNullableType(or(),!1),e)}();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return tr();case 41:return tt(ir)?tr(!0):kn();case 116:return yt();case 110:{const t=Cn();return 142!==qe()||a.hasPrecedingLineBreak()?t:(e=t,We(),kt(D.createTypePredicateNode(void 0,e,br()),e.pos))}case 114:return tt(nr)?rr():function(){const e=Je();at(114);const t=ln(!0),n=a.hasPrecedingLineBreak()?void 0:xo();return kt(D.createTypeQueryNode(t,n),e)}();case 19:return tt(Kn)?Hn():function(){const e=Je();return kt(D.createTypeLiteralNode($n()),e)}();case 23:return function(){const e=Je();return kt(D.createTupleTypeNode(cn(21,Yn,23,24)),e)}();case 21:return function(){const e=Je();at(21);const t=br();return at(22),kt(D.createParenthesizedType(t),e)}();case 102:return rr();case 131:return tt(Ti)?function(){const e=Je(),t=ht(131),n=110===qe()?Cn():Dt(),r=ft(142)?br():void 0;return kt(D.createTypePredicateNode(t,n,r),e)}():kn();case 16:return pn();default:return kn()}var e}function ar(e){switch(qe()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!e;case 41:return!e&&tt(ir);case 21:return!e&&tt(sr);default:return ot()}}function sr(){return We(),22===qe()||Fn(!1)||ar()}function cr(){const e=Je();let t=or();for(;!a.hasPrecedingLineBreak();)switch(qe()){case 54:We(),t=kt(D.createJSDocNonNullableType(t,!0),e);break;case 58:if(tt(Xt))return t;We(),t=kt(D.createJSDocNullableType(t,!0),e);break;case 23:if(at(23),ar()){const n=br();at(24),t=kt(D.createIndexedAccessTypeNode(t,n),e)}else at(24),t=kt(D.createArrayTypeNode(t),e);break;default:return t}return t}function lr(){if(ft(96)){const e=we(br);if(Ae()||58!==qe())return e}}function _r(){const e=Je();return at(140),kt(D.createInferTypeNode(function(){const e=Je(),t=Dt(),n=rt(lr);return kt(D.createTypeParameterDeclaration(void 0,t,n),e)}()),e)}function ur(){const e=qe();switch(e){case 143:case 158:case 148:return function(e){const t=Je();return at(e),kt(D.createTypeOperatorNode(e,ur()),t)}(e);case 140:return _r()}return Ce(cr)}function dr(e){if(gr()){const t=Zn();let n;return n=KD(t)?e?ha.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:ha.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:e?ha.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:ha.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,Re(t,n),t}}function pr(e,t,n){const r=Je(),i=52===e,o=ft(e);let a=o&&dr(i)||t();if(qe()===e||o){const o=[a];for(;ft(e);)o.push(dr(i)||t());a=kt(n(St(o,r)),r)}return a}function fr(){return pr(51,ur,D.createIntersectionTypeNode)}function mr(){return We(),105===qe()}function gr(){return 30===qe()||(!(21!==qe()||!tt(hr))||(105===qe()||128===qe()&&tt(mr)))}function hr(){if(We(),22===qe()||26===qe())return!0;if(function(){if(r_(qe())&&po(!1),ot()||110===qe())return We(),!0;if(23===qe()||19===qe()){const e=h.length;return Gi(),e===h.length}return!1}()){if(59===qe()||28===qe()||58===qe()||64===qe())return!0;if(22===qe()&&(We(),39===qe()))return!0}return!1}function yr(){const e=Je(),t=ot()&&rt(vr),n=br();return t?kt(D.createTypePredicateNode(void 0,t,n),e):n}function vr(){const e=Dt();if(142===qe()&&!a.hasPrecedingLineBreak())return We(),e}function br(){if(81920&N)return xe(81920,br);if(gr())return Zn();const e=Je(),t=pr(52,fr,D.createUnionTypeNode);if(!Ae()&&!a.hasPrecedingLineBreak()&&ft(96)){const n=we(br);at(58);const r=Ce(br);at(59);const i=Ce(br);return kt(D.createConditionalTypeNode(t,n,r,i),e)}return t}function xr(){return ft(59)?br():void 0}function Sr(){switch(qe()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return tt(Wn);default:return ot()}}function kr(){if(Sr())return!0;switch(qe()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return!!jr()||ot()}}function Tr(){const e=Ie();e&&ye(!1);const t=Je();let n,r=wr(!0);for(;n=mt(28);)r=Rr(r,n,wr(!0),t);return e&&ye(!0),r}function Cr(){return ft(64)?wr(!0):void 0}function wr(e){if(function(){if(127===qe())return!!Fe()||tt(Ni);return!1}())return function(){const e=Je();return We(),a.hasPrecedingLineBreak()||42!==qe()&&!kr()?kt(D.createYieldExpression(void 0,void 0),e):kt(D.createYieldExpression(mt(42),wr(!0)),e)}();const t=function(e){const t=function(){if(21===qe()||30===qe()||134===qe())return tt(Er);if(39===qe())return 1;return 0}();if(0===t)return;return 1===t?Pr(!0,!0):rt(()=>function(e){const t=a.getTokenStart();if(null==C?void 0:C.has(t))return;const n=Pr(!1,e);n||(C||(C=new Set)).add(t);return n}(e))}(e)||function(e){if(134===qe()&&1===tt(Fr)){const t=Je(),n=ze(),r=fo();return Dr(t,Ir(0),e,n,r)}return}(e);if(t)return t;const n=Je(),r=ze(),i=Ir(0);return 80===i.kind&&39===qe()?Dr(n,i,e,r,void 0):W_(i)&&cb(He())?Rr(i,yt(),wr(e),n):function(e,t,n){const r=mt(58);if(!r)return e;let i;return kt(D.createConditionalExpression(e,r,xe(s,()=>wr(!1)),i=ht(59),Ld(i)?wr(n):Tt(80,!1,ha._0_expected,ja(59))),t)}(i,n,e)}function Nr(){return We(),!a.hasPrecedingLineBreak()&&ot()}function Dr(e,t,n,r,i){gn.assert(39===qe(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>");const o=D.createParameterDeclaration(void 0,void 0,t,void 0,void 0,void 0);kt(o,t.pos);const a=St([o],o.pos,o.end),s=ht(39),c=Ar(!!i,n);return ue(kt(D.createArrowFunction(i,void 0,a,void 0,s,c),e),r)}function Er(){if(134===qe()){if(We(),a.hasPrecedingLineBreak())return 0;if(21!==qe()&&30!==qe())return 0}const e=qe(),t=We();if(21===e){if(22===t){switch(We()){case 39:case 59:case 19:return 1;default:return 0}}if(23===t||19===t)return 2;if(26===t)return 1;if(r_(t)&&134!==t&&tt(Wt))return 130===We()?0:1;if(!ot()&&110!==t)return 0;switch(We()){case 59:return 1;case 58:return We(),59===qe()||28===qe()||64===qe()||22===qe()?1:0;case 28:case 64:case 22:return 2}return 0}if(gn.assert(30===e),!ot()&&87!==qe())return 0;if(1===g){return tt(()=>{ft(87);const e=We();if(96===e){switch(We()){case 64:case 32:case 44:return!1;default:return!0}}else if(28===e||64===e)return!0;return!1})?1:0}return 2}function Fr(){if(134===qe()){if(We(),a.hasPrecedingLineBreak()||39===qe())return 0;const e=Ir(0);if(!a.hasPrecedingLineBreak()&&80===e.kind&&39===qe())return 1}return 0}function Pr(e,t){const n=Je(),r=ze(),i=fo(),o=X(i,yD)?2:0,a=En();let s;if(at(21)){if(e)s=On(o,e);else{const t=On(o,e);if(!t)return;s=t}if(!at(22)&&!e)return}else{if(!e)return;s=sn()}const c=59===qe(),l=In(59,!1);if(l&&!e&&Tn(l))return;let _=l;for(;197===(null==_?void 0:_.kind);)_=_.type;const u=_&&DP(_);if(!e&&39!==qe()&&(u||19!==qe()))return;const d=qe(),p=ht(39),f=39===d||19===d?Ar(X(i,yD),t):Dt();if(!t&&c&&59!==qe())return;return ue(kt(D.createArrowFunction(i,a,s,l,p,f),n),r)}function Ar(e,t){if(19===qe())return yi(e?2:0);if(27!==qe()&&100!==qe()&&86!==qe()&&Fi()&&(19===qe()||100===qe()||86===qe()||60===qe()||!kr()))return yi(16|(e?2:0));const n=Fe();he(!1);const r=ie;ie=!1;const i=e?Ne(()=>wr(t)):De(()=>wr(t));return ie=r,he(n),i}function Ir(e){const t=Je();return Lr(e,zr(),t)}function Or(e){return 103===e||165===e}function Lr(e,t,n){for(;;){He();const r=my(qe());if(!(43===qe()?r>=e:r>e))break;if(103===qe()&&Pe())break;if(130===qe()||152===qe()){if(a.hasPrecedingLineBreak())break;{const e=qe();We(),t=152===e?Mr(t,br()):Br(t,br())}}else t=Rr(t,yt(),Ir(r),n)}return t}function jr(){return(!Pe()||103!==qe())&&my(qe())>0}function Mr(e,t){return kt(D.createSatisfiesExpression(e,t),e.pos)}function Rr(e,t,n,r){return kt(D.createBinaryExpression(e,t,n),r)}function Br(e,t){return kt(D.createAsExpression(e,t),e.pos)}function Jr(){const e=Je();return kt(D.createPrefixUnaryExpression(qe(),Ve(qr)),e)}function zr(){if(function(){switch(qe()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(1!==g)return!1;default:return!0}}()){const e=Je(),t=Ur();return 43===qe()?Lr(my(qe()),t,e):t}const e=qe(),t=qr();if(43===qe()){const n=is(u,t.pos),{end:r}=t;217===t.kind?Me(n,r,ha.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(gn.assert(Oh(e)),Me(n,r,ha.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,ja(e)))}return t}function qr(){switch(qe()){case 40:case 41:case 55:case 54:return Jr();case 91:return function(){const e=Je();return kt(D.createDeleteExpression(Ve(qr)),e)}();case 114:return function(){const e=Je();return kt(D.createTypeOfExpression(Ve(qr)),e)}();case 116:return function(){const e=Je();return kt(D.createVoidExpression(Ve(qr)),e)}();case 30:return 1===g?$r(!0,void 0,void 0,!0):function(){gn.assert(1!==g,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");const e=Je();at(30);const t=br();at(32);const n=qr();return kt(D.createTypeAssertion(t,n),e)}();case 135:if(135===qe()&&(Oe()||tt(Ni)))return function(){const e=Je();return kt(D.createAwaitExpression(Ve(qr)),e)}();default:return Ur()}}function Ur(){if(46===qe()||47===qe()){const e=Je();return kt(D.createPrefixUnaryExpression(qe(),Ve(Vr)),e)}if(1===g&&30===qe()&&tt(Kt))return $r(!0);const e=Vr();if(gn.assert(W_(e)),(46===qe()||47===qe())&&!a.hasPrecedingLineBreak()){const t=qe();return We(),kt(D.createPostfixUnaryExpression(e,t),e.pos)}return e}function Vr(){const e=Je();let t;return 102===qe()?tt(Un)?(_|=4194304,t=yt()):tt(Vn)?(We(),We(),t=kt(D.createMetaProperty(102,Et()),e),"defer"===t.name.escapedText?21!==qe()&&30!==qe()||(_|=4194304):_|=8388608):t=Wr():t=108===qe()?function(){const e=Je();let t=yt();if(30===qe()){const e=Je(),n=rt(ci);void 0!==n&&(Me(e,Je(),ha.super_may_not_use_type_arguments),ii()||(t=D.createExpressionWithTypeArguments(t,n)))}if(21===qe()||25===qe()||23===qe())return t;return ht(25,ha.super_must_be_followed_by_an_argument_list_or_member_access),kt(R(t,un(!0,!0,!0)),e)}():Wr(),ai(e,t)}function Wr(){return ri(Je(),li(),!0)}function $r(e,t,n,r=!1){const i=Je(),o=function(e){const t=Je();if(at(30),32===qe())return Ze(),kt(D.createJsxOpeningFragment(),t);const n=Gr(),r=524288&N?void 0:xo(),i=function(){const e=Je();return kt(D.createJsxAttributes(Yt(13,Qr)),e)}();let o;32===qe()?(Ze(),o=D.createJsxOpeningElement(n,r,i)):(at(44),at(32,void 0,!1)&&(e?We():Ze()),o=D.createJsxSelfClosingElement(n,r,i));return kt(o,t)}(e);let a;if(287===o.kind){let t,r=Hr(o);const s=r[r.length-1];if(285===(null==s?void 0:s.kind)&&!AO(s.openingElement.tagName,s.closingElement.tagName)&&AO(o.tagName,s.closingElement.tagName)){const e=s.children.end,n=kt(D.createJsxElement(s.openingElement,s.children,kt(D.createJsxClosingElement(kt(I(""),e,e)),e,e)),s.openingElement.pos,e);r=St([...r.slice(0,r.length-1),n],r.pos,e),t=s.closingElement}else t=function(e,t){const n=Je();at(31);const r=Gr();at(32,void 0,!1)&&(t||!AO(e.tagName,r)?We():Ze());return kt(D.createJsxClosingElement(r),n)}(o,e),AO(o.tagName,t.tagName)||(n&&QF(n)&&AO(t.tagName,n.tagName)?Re(o.tagName,ha.JSX_element_0_has_no_corresponding_closing_tag,np(u,o.tagName)):Re(t.tagName,ha.Expected_corresponding_JSX_closing_tag_for_0,np(u,o.tagName)));a=kt(D.createJsxElement(o,r,t),i)}else 290===o.kind?a=kt(D.createJsxFragment(o,Hr(o),function(e){const t=Je();at(31),at(32,ha.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(e?We():Ze());return kt(D.createJsxJsxClosingFragment(),t)}(e)),i):(gn.assert(286===o.kind),a=o);if(!r&&e&&30===qe()){const e=void 0===t?a.pos:t,n=rt(()=>$r(!0,e));if(n){const t=Tt(28,!1);return OT(t,n.pos,0),Me(is(u,e),n.end,ha.JSX_expressions_must_have_one_parent_element),kt(D.createBinaryExpression(a,t,n),i)}}return a}function Kr(e,t){switch(t){case 1:if(eP(e))Re(e,ha.JSX_fragment_has_no_corresponding_closing_tag);else{const t=e.tagName;Me(Math.min(is(u,t.pos),t.end),t.end,ha.JSX_element_0_has_no_corresponding_closing_tag,np(u,e.tagName))}return;case 31:case 7:return;case 12:case 13:return function(){const e=Je(),t=D.createJsxText(a.getTokenValue(),13===b);return b=a.scanJsxToken(),kt(t,e)}();case 19:return Xr(!1);case 30:return $r(!1,void 0,e);default:return gn.assertNever(t)}}function Hr(e){const t=[],n=Je(),r=T;for(T|=16384;;){const n=Kr(e,b=a.reScanJsxToken());if(!n)break;if(t.push(n),QF(e)&&285===(null==n?void 0:n.kind)&&!AO(n.openingElement.tagName,n.closingElement.tagName)&&AO(e.tagName,n.closingElement.tagName))break}return T=r,St(t,n)}function Gr(){const e=Je(),t=function(){const e=Je();Ye();const t=110===qe(),n=Ft();if(ft(59))return Ye(),kt(D.createJsxNamespacedName(n,Ft()),e);return t?kt(D.createToken(110),e):n}();if(aP(t))return t;let n=t;for(;ft(25);)n=kt(R(n,un(!0,!1,!1)),e);return n}function Xr(e){const t=Je();if(!at(19))return;let n,r;return 20!==qe()&&(e||(n=mt(26)),r=Tr()),e?at(20):at(20,void 0,!1)&&Ze(),kt(D.createJsxExpression(n,r),t)}function Qr(){if(19===qe())return function(){const e=Je();at(19),at(26);const t=Tr();return at(20),kt(D.createJsxSpreadAttribute(t),e)}();const e=Je();return kt(D.createJsxAttribute(function(){const e=Je();Ye();const t=Ft();if(ft(59))return Ye(),kt(D.createJsxNamespacedName(t,Ft()),e);return t}(),function(){if(64===qe()){if(11===(b=a.scanJsxAttributeValue()))return yn();if(19===qe())return Xr(!0);if(30===qe())return $r(!0);Le(ha.or_JSX_element_expected)}return}()),e)}function Yr(){return We(),ya(qe())||23===qe()||ii()}function Zr(){return 29===qe()&&tt(Yr)}function ei(e){if(64&e.flags)return!0;if(WE(e)){let t=e.expression;for(;WE(t)&&!(64&t.flags);)t=t.expression;if(64&t.flags){for(;WE(e);)e.flags|=64,e=e.expression;return!0}}return!1}function ti(e,t,n){const r=un(!0,!0,!0),i=n||ei(t),o=i?B(t,n,r):R(t,r);if(i&&mD(o.name)&&Re(o.name,ha.An_optional_chain_cannot_contain_private_identifiers),qE(t)&&t.typeArguments){Me(t.typeArguments.pos-1,is(u,t.typeArguments.end)+1,ha.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return kt(o,e)}function ni(e,t,n){let r;if(24===qe())r=Tt(80,!0,ha.An_element_access_expression_should_take_an_argument);else{const e=Te(Tr);Uh(e)&&(e.text=Ct(e.text)),r=e}at(24);return kt(n||ei(t)?z(t,n,r):J(t,r),e)}function ri(e,t,n){for(;;){let r,i=!1;if(n&&Zr()?(r=ht(29),i=ya(qe())):i=ft(25),i)t=ti(e,t,r);else if(!r&&Ie()||!ft(23)){if(!ii()){if(!r){if(54===qe()&&!a.hasPrecedingLineBreak()){We(),t=kt(D.createNonNullExpression(t),e);continue}const n=rt(ci);if(n){t=kt(D.createExpressionWithTypeArguments(t,n),e);continue}}return t}t=r||234!==t.kind?oi(e,t,r,void 0):oi(e,t.expression,r,t.typeArguments)}else t=ni(e,t,r)}}function ii(){return 15===qe()||16===qe()}function oi(e,t,n,r){const i=D.createTaggedTemplateExpression(t,r,15===qe()?(Ge(!0),yn()):dn(!0));return(n||64&t.flags)&&(i.flags|=64),i.questionDotToken=n,kt(i,e)}function ai(e,t){for(;;){let n;t=ri(e,t,!0);const r=mt(29);if(!r||(n=rt(ci),!ii())){if(n||21===qe()){r||234!==t.kind||(n=t.typeArguments,t=t.expression);const i=si();t=kt(r||ei(t)?V(t,r,n,i):q(t,n,i),e);continue}if(r){const n=Tt(80,!1,ha.Identifier_expected);t=kt(B(t,r,n),e)}break}t=oi(e,t,r,n)}return t}function si(){at(21);const e=on(11,ui);return at(22),e}function ci(){if(524288&N)return;if(30!==Xe())return;We();const e=on(20,br);return 32===He()?(We(),e&&function(){switch(qe()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return a.hasPrecedingLineBreak()||jr()||!kr()}()?e:void 0):void 0}function li(){switch(qe()){case 15:26656&a.getTokenFlags()&&Ge(!1);case 9:case 10:case 11:return yn();case 110:case 108:case 106:case 112:case 97:return yt();case 21:return function(){const e=Je(),t=ze();at(21);const n=Te(Tr);return at(22),ue(kt($(n),e),t)}();case 23:return di();case 19:return fi();case 134:if(!tt(wi))break;return mi();case 60:return function(){const e=Je(),t=ze(),n=po(!0);if(86===qe())return ho(e,t,n,232);const r=Tt(283,!0,ha.Expression_expected);return PT(r,e),r.modifiers=n,r}();case 86:return ho(Je(),ze(),void 0,232);case 100:return mi();case 105:return function(){const e=Je();if(at(105),ft(25)){const t=Et();return kt(D.createMetaProperty(105,t),e)}let t,n=ri(Je(),li(),!1);234===n.kind&&(t=n.typeArguments,n=n.expression);29===qe()&&Le(ha.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,np(u,n));const r=21===qe()?si():void 0;return kt(W(n,t,r),e)}();case 44:case 69:if(14===(b=a.reScanSlashToken()))return yn();break;case 16:return dn(!1);case 81:return Ot()}return Dt(ha.Expression_expected)}function _i(){return 26===qe()?function(){const e=Je();at(26);const t=wr(!0);return kt(D.createSpreadElement(t),e)}():28===qe()?kt(D.createOmittedExpression(),Je()):wr(!0)}function ui(){return xe(s,_i)}function di(){const e=Je(),t=a.getTokenStart(),n=at(23),r=a.hasPrecedingLineBreak(),i=on(15,_i);return pt(23,24,n,t),kt(j(i,r),e)}function pi(){const e=Je(),t=ze();if(mt(26)){const n=wr(!0);return ue(kt(D.createSpreadAssignment(n),e),t)}const n=po(!0);if(Lt(139))return ao(e,t,n,178,0);if(Lt(153))return ao(e,t,n,179,0);const r=mt(42),i=ot(),o=It(),a=mt(58),s=mt(54);if(r||21===qe()||30===qe())return ro(e,t,n,r,o,a,s);let c;if(i&&59!==qe()){const e=mt(64),t=e?Te(()=>wr(!0)):void 0;c=D.createShorthandPropertyAssignment(o,t),c.equalsToken=e}else{at(59);const e=Te(()=>wr(!0));c=D.createPropertyAssignment(o,e)}return c.modifiers=n,c.questionToken=a,c.exclamationToken=s,ue(kt(c,e),t)}function fi(){const e=Je(),t=a.getTokenStart(),n=at(19),r=a.hasPrecedingLineBreak(),i=on(12,pi,!0);return pt(19,20,n,t),kt(M(i,r),e)}function mi(){const e=Ie();ye(!1);const t=Je(),n=ze(),r=po(!1);at(100);const i=mt(42),o=i?1:0,a=X(r,yD)?2:0,s=o&&a?Se(81920,gi):o?function(e){return Se(16384,e)}(gi):a?Ne(gi):gi();const c=En(),l=Ln(o|a),_=In(59,!1),u=yi(o|a);ye(e);return ue(kt(D.createFunctionExpression(r,i,s,c,l,_,u),t),n)}function gi(){return it()?Nt():void 0}function hi(e,t){const n=Je(),r=ze(),i=a.getTokenStart(),o=at(19,t);if(o||e){const e=a.hasPrecedingLineBreak(),t=Yt(1,Ri);pt(19,20,o,i);const s=ue(kt(K(t,e),n),r);return 64===qe()&&(Le(ha.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),We()),s}{const e=sn();return ue(kt(K(e,void 0),n),r)}}function yi(e,t){const n=Fe();he(!!(1&e));const r=Oe();be(!!(2&e));const i=ie;ie=!1;const o=Ie();o&&ye(!1);const a=hi(!!(16&e),t);return o&&ye(!0),ie=i,he(n),be(r),a}function vi(){const e=Je(),t=ze();at(99);const n=mt(135);let r;let i;if(at(21),27!==qe()&&(r=115===qe()||121===qe()||87===qe()||160===qe()&&tt(Ai)||135===qe()&&tt(ji)?Yi(!0):Se(8192,Tr)),n?at(165):ft(165)){const e=Te(()=>wr(!0));at(22),i=te(n,r,e,Ri())}else if(ft(103)){const e=Te(Tr);at(22),i=D.createForInStatement(r,e,Ri())}else{at(27);const e=27!==qe()&&22!==qe()?Te(Tr):void 0;at(27);const t=22!==qe()?Te(Tr):void 0;at(22),i=ee(r,e,t,Ri())}return ue(kt(i,e),t)}function bi(e){const t=Je(),n=ze();at(253===e?83:88);const r=vt()?void 0:Dt();xt();return ue(kt(253===e?D.createBreakStatement(r):D.createContinueStatement(r),t),n)}function xi(){return 84===qe()?function(){const e=Je(),t=ze();at(84);const n=Te(Tr);at(59);const r=Yt(3,Ri);return ue(kt(D.createCaseClause(n,r),e),t)}():function(){const e=Je();at(90),at(59);const t=Yt(3,Ri);return kt(D.createDefaultClause(t),e)}()}function Si(){const e=Je(),t=ze();at(109),at(21);const n=Te(Tr);at(22);const r=function(){const e=Je();at(19);const t=Yt(2,xi);return at(20),kt(D.createCaseBlock(t),e)}();return ue(kt(D.createSwitchStatement(n,r),e),t)}function ki(){const e=Je(),t=ze();at(113);const n=hi(!1),r=85===qe()?function(){const e=Je();let t;at(85),ft(21)?(t=Qi(),at(22)):t=void 0;const n=hi(!1);return kt(D.createCatchClause(t,n),e)}():void 0;let i;return r&&98!==qe()||(at(98,ha.catch_or_finally_expected),i=hi(!1)),ue(kt(D.createTryStatement(n,r,i),e),t)}function Ti(){return We(),ya(qe())&&!a.hasPrecedingLineBreak()}function Ci(){return We(),86===qe()&&!a.hasPrecedingLineBreak()}function wi(){return We(),100===qe()&&!a.hasPrecedingLineBreak()}function Ni(){return We(),(ya(qe())||9===qe()||10===qe()||11===qe())&&!a.hasPrecedingLineBreak()}function Di(){for(;;)switch(qe()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Li();case 135:return Mi();case 120:case 156:case 166:return Nr();case 144:case 145:return Vi();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:const e=qe();if(We(),a.hasPrecedingLineBreak())return!1;if(138===e&&156===qe())return!0;continue;case 162:return We(),19===qe()||80===qe()||95===qe();case 102:return We(),166===qe()||11===qe()||42===qe()||19===qe()||ya(qe());case 95:let t=We();if(156===t&&(t=tt(We)),64===t||42===t||19===t||90===t||130===t||60===t)return!0;continue;case 126:We();continue;default:return!1}}function Ei(){return tt(Di)}function Fi(){switch(qe()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:case 134:case 138:case 120:case 144:case 145:case 156:case 162:case 166:return!0;case 102:return Ei()||tt(Wn);case 87:case 95:return Ei();case 129:case 125:case 123:case 124:case 126:case 148:return Ei()||!tt(Ti);default:return kr()}}function Pi(){return We(),it()||19===qe()||23===qe()}function Ai(){return Oi(!0)}function Ii(){return We(),64===qe()||27===qe()||59===qe()}function Oi(e){return We(),e&&165===qe()?tt(Ii):(it()||19===qe())&&!a.hasPrecedingLineBreak()}function Li(){return tt(Oi)}function ji(e){return 160===We()&&Oi(e)}function Mi(){return tt(ji)}function Ri(){switch(qe()){case 27:return function(){const e=Je(),t=ze();return at(27),ue(kt(D.createEmptyStatement(),e),t)}();case 19:return hi(!1);case 115:return eo(Je(),ze(),void 0);case 121:if(tt(Pi))return eo(Je(),ze(),void 0);break;case 135:if(Mi())return eo(Je(),ze(),void 0);break;case 160:if(Li())return eo(Je(),ze(),void 0);break;case 100:return to(Je(),ze(),void 0);case 86:return go(Je(),ze(),void 0);case 101:return function(){const e=Je(),t=ze();at(101);const n=a.getTokenStart(),r=at(21),i=Te(Tr);pt(21,22,r,n);const o=Ri(),s=ft(93)?Ri():void 0;return ue(kt(Q(i,o,s),e),t)}();case 92:return function(){const e=Je(),t=ze();at(92);const n=Ri();at(117);const r=a.getTokenStart(),i=at(21),o=Te(Tr);return pt(21,22,i,r),ft(27),ue(kt(D.createDoStatement(n,o),e),t)}();case 117:return function(){const e=Je(),t=ze();at(117);const n=a.getTokenStart(),r=at(21),i=Te(Tr);pt(21,22,r,n);const o=Ri();return ue(kt(Z(i,o),e),t)}();case 99:return vi();case 88:return bi(252);case 83:return bi(253);case 107:return function(){const e=Je(),t=ze();at(107);const n=vt()?void 0:Te(Tr);return xt(),ue(kt(D.createReturnStatement(n),e),t)}();case 118:return function(){const e=Je(),t=ze();at(118);const n=a.getTokenStart(),r=at(21),i=Te(Tr);pt(21,22,r,n);const o=Se(67108864,Ri);return ue(kt(D.createWithStatement(i,o),e),t)}();case 109:return Si();case 111:return function(){const e=Je(),t=ze();at(111);let n=a.hasPrecedingLineBreak()?void 0:Te(Tr);return void 0===n&&(k++,n=kt(I(""),Je())),bt()||lt(n),ue(kt(D.createThrowStatement(n),e),t)}();case 113:case 85:case 98:return ki();case 89:return function(){const e=Je(),t=ze();return at(89),xt(),ue(kt(D.createDebuggerStatement(),e),t)}();case 60:return Ji();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Ei())return Ji()}return function(){const e=Je();let t,n=ze();const r=21===qe(),i=Te(Tr);return fD(i)&&ft(59)?t=D.createLabeledStatement(i,Ri()):(bt()||lt(i),t=G(i),r&&(n=!1)),ue(kt(t,e),n)}()}function Bi(e){return 138===e.kind}function Ji(){const e=Je(),t=ze(),n=po(!0);if(X(n,Bi)){const r=function(e){return Se(33554432,()=>{const t=tn(T,e);if(t)return nn(t)})}(e);if(r)return r;for(const e of n)e.flags|=33554432;return Se(33554432,()=>zi(e,t,n))}return zi(e,t,n)}function zi(e,t,n){switch(qe()){case 115:case 121:case 87:case 160:case 135:return eo(e,t,n);case 100:return to(e,t,n);case 86:return go(e,t,n);case 120:return function(e,t,n){at(120);const r=Dt(),i=En(),o=yo(),a=$n();return ue(kt(D.createInterfaceDeclaration(n,r,i,o,a),e),t)}(e,t,n);case 156:return function(e,t,n){at(156),a.hasPrecedingLineBreak()&&Le(ha.Line_break_not_permitted_here);const r=Dt(),i=En();at(64);const o=141===qe()&&rt(er)||br();xt();return ue(kt(D.createTypeAliasDeclaration(n,r,i,o),e),t)}(e,t,n);case 94:return function(e,t,n){at(94);const r=Dt();let i;at(19)?(i=xe(81920,()=>on(6,ko)),at(20)):i=sn();return ue(kt(D.createEnumDeclaration(n,r,i),e),t)}(e,t,n);case 162:case 144:case 145:return function(e,t,n){let r=0;if(162===qe())return wo(e,t,n);if(ft(145))r|=32;else if(at(144),11===qe())return wo(e,t,n);return Co(e,t,n,r)}(e,t,n);case 102:return function(e,t,n){at(102);const r=a.getTokenFullStart();let i,o;ot()&&(i=Dt());"type"===(null==i?void 0:i.escapedText)&&(161!==qe()||ot()&&tt(Ui))&&(ot()||42===qe()||19===qe())?(o=156,i=ot()?Dt():void 0):"defer"!==(null==i?void 0:i.escapedText)||(161===qe()?tt(qi):28===qe()||64===qe())||(o=166,i=ot()?Dt():void 0);if(i&&28!==qe()&&161!==qe()&&166!==o)return function(e,t,n,r,i){at(64);const o=149===qe()&&tt(No)?function(){const e=Je();at(149),at(21);const t=Oo();return at(22),kt(D.createExternalModuleReference(t),e)}():ln(!1);xt();const a=D.createImportEqualsDeclaration(n,i,r,o),s=ue(kt(a,e),t);return s}(e,t,n,i,156===o);const s=Fo(i,r,o,void 0),c=Oo(),l=Po();xt();return ue(kt(D.createImportDeclaration(n,s,c,l),e),t)}(e,t,n);case 95:switch(We(),qe()){case 90:case 64:return function(e,t,n){const r=Oe();let i;be(!0),ft(64)?i=!0:at(90);const o=wr(!0);xt(),be(r);return ue(kt(D.createExportAssignment(n,i,o),e),t)}(e,t,n);case 130:return function(e,t,n){at(130),at(145);const r=Dt();xt();const i=D.createNamespaceExportDeclaration(r);return i.modifiers=n,ue(kt(i,e),t)}(e,t,n);default:return function(e,t,n){const r=Oe();let i,o,s;be(!0);const c=ft(156),l=Je();ft(42)?(ft(130)&&(i=function(e){return kt(D.createNamespaceExport(jo(Et)),e)}(l)),at(161),o=Oo()):(i=Mo(280),(161===qe()||11===qe()&&!a.hasPrecedingLineBreak())&&(at(161),o=Oo()));const _=qe();!o||118!==_&&132!==_||a.hasPrecedingLineBreak()||(s=Io(_));xt(),be(r);return ue(kt(D.createExportDeclaration(n,c,i,o,s),e),t)}(e,t,n)}default:if(n){const t=Tt(283,!0,ha.Declaration_expected);return PT(t,e),t.modifiers=n,t}return}}function qi(){return 11===We()}function Ui(){return We(),161===qe()||64===qe()}function Vi(){return We(),!a.hasPrecedingLineBreak()&&(ot()||11===qe())}function Wi(e,t){if(19!==qe()){if(4&e)return void jn();if(vt())return void xt()}return yi(e,t)}function $i(){const e=Je();if(28===qe())return kt(D.createOmittedExpression(),e);const t=mt(26),n=Gi(),r=Cr();return kt(D.createBindingElement(t,void 0,n,r),e)}function Ki(){const e=Je(),t=mt(26),n=it();let r,i=It();n&&59!==qe()?(r=i,i=void 0):(at(59),r=Gi());const o=Cr();return kt(D.createBindingElement(t,i,r,o),e)}function Hi(){return 19===qe()||23===qe()||81===qe()||it()}function Gi(e){return 23===qe()?function(){const e=Je();at(23);const t=Te(()=>on(10,$i));return at(24),kt(D.createArrayBindingPattern(t),e)}():19===qe()?function(){const e=Je();at(19);const t=Te(()=>on(9,Ki));return at(20),kt(D.createObjectBindingPattern(t),e)}():Nt(e)}function Xi(){return Qi(!0)}function Qi(e){const t=Je(),n=ze(),r=Gi(ha.Private_identifiers_are_not_allowed_in_variable_declarations);let i;e&&80===r.kind&&54===qe()&&!a.hasPrecedingLineBreak()&&(i=yt());const o=xr(),s=Or(qe())?void 0:Cr();return ue(kt(ne(r,i,o,s),t),n)}function Yi(e){const t=Je();let n,r=0;switch(qe()){case 115:break;case 121:r|=1;break;case 87:r|=2;break;case 160:r|=4;break;case 135:gn.assert(Mi()),r|=6,We();break;default:gn.fail()}if(We(),165===qe()&&tt(Zi))n=sn();else{const t=Pe();ge(e),n=on(8,e?Qi:Xi),ge(t)}return kt(re(n,r),t)}function Zi(){return Wt()&&22===We()}function eo(e,t,n){const r=Yi(!1);xt();return ue(kt(H(n,r),e),t)}function to(e,t,n){const r=Oe(),i=eb(n);at(100);const o=mt(42),a=2048&i?gi():Nt(),s=o?1:0,c=1024&i?2:0,l=En();32&i&&be(!0);const _=Ln(s|c),u=In(59,!1),d=Wi(s|c,ha.or_expected);be(r);return ue(kt(D.createFunctionDeclaration(n,o,a,l,_,u,d),e),t)}function no(e,t,n){return rt(()=>{if(137===qe()?at(137):11===qe()&&21===tt(We)?rt(()=>{const e=yn();return"constructor"===e.text?e:void 0}):void 0){const r=En(),i=Ln(0),o=In(59,!1),a=Wi(0,ha.or_expected),s=D.createConstructorDeclaration(n,i,a);return s.typeParameters=r,s.type=o,ue(kt(s,e),t)}})}function ro(e,t,n,r,i,o,a,s){const c=r?1:0,l=X(n,yD)?2:0,_=En(),u=Ln(c|l),d=In(59,!1),p=Wi(c|l,s),f=D.createMethodDeclaration(n,r,i,o,_,u,d,p);return f.exclamationToken=a,ue(kt(f,e),t)}function io(e,t,n,r,i){const o=i||a.hasPrecedingLineBreak()?void 0:mt(54),s=xr(),c=xe(90112,Cr);!function(e,t,n){if(60!==qe()||a.hasPrecedingLineBreak())return 21===qe()?(Le(ha.Cannot_start_a_function_call_in_a_type_annotation),void We()):void(!t||vt()?bt()||(n?Le(ha._0_expected,ja(27)):lt(e)):n?Le(ha._0_expected,ja(27)):Le(ha.Expected_for_property_initializer));Le(ha.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations)}(r,s,c);return ue(kt(D.createPropertyDeclaration(n,r,i||o,s,c),e),t)}function oo(e,t,n){const r=mt(42),i=It(),o=mt(58);return r||21===qe()||30===qe()?ro(e,t,n,r,i,o,void 0,ha.or_expected):io(e,t,n,i,o)}function ao(e,t,n,r,i){const o=It(),a=En(),s=Ln(0),c=In(59,!1),l=Wi(i),_=178===r?D.createGetAccessorDeclaration(n,o,s,c,l):D.createSetAccessorDeclaration(n,o,s,l);return _.typeParameters=a,zD(_)&&(_.type=c),ue(kt(_,e),t)}function so(){let e;if(60===qe())return!0;for(;r_(qe());){if(e=qe(),o_(e))return!0;We()}if(42===qe())return!0;if(Pt()&&(e=qe(),We()),23===qe())return!0;if(void 0!==e){if(!Ah(e)||153===e||139===e)return!0;switch(qe()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return vt()}}return!1}function co(e,t,n){ht(126);const r=function(){const e=Fe(),t=Oe();he(!1),be(!0);const n=hi(!1);return he(e),be(t),n}(),i=ue(kt(D.createClassStaticBlockDeclaration(r),e),t);return i.modifiers=n,i}function lo(){if(Oe()&&135===qe()){const e=Je(),t=Dt(ha.Expression_expected);We();return ai(e,ri(e,t,!0))}return Vr()}function _o(){const e=Je();if(!ft(60))return;const t=Se(32768,lo);return kt(D.createDecorator(t),e)}function uo(e,t,n){const r=Je(),i=qe();if(87===qe()&&t){if(!rt(jt))return}else{if(n&&126===qe()&&tt(Do))return;if(e&&126===qe())return;if(!r_(qe())||!rt(Mt))return}return kt(L(i),r)}function po(e,t,n){const r=Je();let i,o,a,s=!1,c=!1,l=!1;if(e&&60===qe())for(;o=_o();)i=le(i,o);for(;a=uo(s,t,n);)126===a.kind&&(s=!0),i=le(i,a),c=!0;if(c&&e&&60===qe())for(;o=_o();)i=le(i,o),l=!0;if(l)for(;a=uo(s,t,n);)126===a.kind&&(s=!0),i=le(i,a);return i&&St(i,r)}function fo(){let e;if(134===qe()){const t=Je();We();e=St([kt(L(134),t)],t)}return e}function mo(){const e=Je(),t=ze();if(27===qe())return We(),ue(kt(D.createSemicolonClassElement(),e),t);const n=po(!0,!0,!0);if(126===qe()&&tt(Do))return co(e,t,n);if(Lt(139))return ao(e,t,n,178,0);if(Lt(153))return ao(e,t,n,179,0);if(137===qe()||11===qe()){const r=no(e,t,n);if(r)return r}if(Rn())return Jn(e,t,n);if(ya(qe())||11===qe()||9===qe()||10===qe()||42===qe()||23===qe()){if(X(n,Bi)){for(const e of n)e.flags|=33554432;return Se(33554432,()=>oo(e,t,n))}return oo(e,t,n)}if(n){const r=Tt(80,!0,ha.Declaration_expected);return io(e,t,n,r,void 0)}return gn.fail("Should not have attempted to parse class member declaration.")}function go(e,t,n){return ho(e,t,n,264)}function ho(e,t,n,r){const i=Oe();at(86);const o=!it()||119===qe()&&tt($t)?void 0:wt(it()),a=En();X(n,gD)&&be(!0);const s=yo();let c;at(19)?(c=Yt(5,mo),at(20)):c=sn(),be(i);return ue(kt(264===r?D.createClassDeclaration(n,o,a,s,c):D.createClassExpression(n,o,a,s,c),e),t)}function yo(){if(So())return Yt(22,vo)}function vo(){const e=Je(),t=qe();gn.assert(96===t||119===t),We();const n=on(7,bo);return kt(D.createHeritageClause(t,n),e)}function bo(){const e=Je(),t=Vr();if(234===t.kind)return t;const n=xo();return kt(D.createExpressionWithTypeArguments(t,n),e)}function xo(){return 30===qe()?cn(20,br,30,32):void 0}function So(){return 96===qe()||119===qe()}function ko(){const e=Je(),t=ze(),n=It(),r=Te(Cr);return ue(kt(D.createEnumMember(n,r),e),t)}function To(){const e=Je();let t;return at(19)?(t=Yt(1,Ri),at(20)):t=sn(),kt(D.createModuleBlock(t),e)}function Co(e,t,n,r){const i=32&r,o=8&r?Et():Dt(),a=ft(25)?Co(Je(),!1,void 0,8|i):To();return ue(kt(D.createModuleDeclaration(n,o,a,r),e),t)}function wo(e,t,n){let r,i,o=0;162===qe()?(r=Dt(),o|=2048):(r=yn(),r.text=Ct(r.text)),19===qe()?i=To():xt();return ue(kt(D.createModuleDeclaration(n,r,i,o),e),t)}function No(){return 21===We()}function Do(){return 19===We()}function Eo(){return 44===We()}function Fo(e,t,n,r=!1){let i;return(e||42===qe()||19===qe())&&(i=function(e,t,n,r){let i;e&&!ft(28)||(r&&a.setSkipJsDocLeadingAsterisks(!0),i=42===qe()?function(){const e=Je();at(42),at(130);const t=Dt();return kt(D.createNamespaceImport(t),e)}():Mo(276),r&&a.setSkipJsDocLeadingAsterisks(!1));return kt(D.createImportClause(n,e,i),t)}(e,t,n,r),at(161)),i}function Po(){const e=qe();if((118===e||132===e)&&!a.hasPrecedingLineBreak())return Io(e)}function Ao(){const e=Je(),t=ya(qe())?Et():bn(11);at(59);const n=wr(!0);return kt(D.createImportAttribute(t,n),e)}function Io(e,t){const n=Je();t||at(e);const r=a.getTokenStart();if(at(19)){const t=a.hasPrecedingLineBreak(),i=on(24,Ao,!0);if(!at(20)){const e=ke(h);e&&e.code===ha._0_expected.code&&fT(e,Zx(l,u,r,1,ha.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return kt(D.createImportAttributes(i,t,e),n)}{const t=St([],Je(),void 0,!1);return kt(D.createImportAttributes(t,!1,e),n)}}function Oo(){if(11===qe()){const e=yn();return e.text=Ct(e.text),e}return Tr()}function Lo(){return ya(qe())||11===qe()}function jo(e){return 11===qe()?yn():e()}function Mo(e){const t=Je();return kt(276===e?D.createNamedImports(cn(23,Bo,19,20)):D.createNamedExports(cn(23,Ro,19,20)),t)}function Ro(){const e=ze();return ue(Jo(282),e)}function Bo(){return Jo(277)}function Jo(e){const t=Je();let n,r=Ah(qe())&&!ot(),i=a.getTokenStart(),o=a.getTokenEnd(),s=!1,c=!0,l=jo(Et);if(80===l.kind&&"type"===l.escapedText)if(130===qe()){const e=Et();if(130===qe()){const t=Et();Lo()?(s=!0,n=e,l=jo(_),c=!1):(n=l,l=t,c=!1)}else Lo()?(n=l,c=!1,l=jo(_)):(s=!0,l=e)}else Lo()&&(s=!0,l=jo(_));c&&130===qe()&&(n=l,at(130),l=jo(_)),277===e&&(80!==l.kind?(Me(is(u,l.pos),l.end,ha.Identifier_expected),l=IT(Tt(80,!1),l.pos,l.pos)):r&&Me(i,o,ha.Identifier_expected));return kt(277===e?D.createImportSpecifier(s,n,l):D.createExportSpecifier(s,n,l),t);function _(){return r=Ah(qe())&&!ot(),i=a.getTokenStart(),o=a.getTokenEnd(),Et()}}let zo;var qo;let Uo;var Vo;let Wo;(qo=zo||(zo={}))[qo.SourceElements=0]="SourceElements",qo[qo.BlockStatements=1]="BlockStatements",qo[qo.SwitchClauses=2]="SwitchClauses",qo[qo.SwitchClauseStatements=3]="SwitchClauseStatements",qo[qo.TypeMembers=4]="TypeMembers",qo[qo.ClassMembers=5]="ClassMembers",qo[qo.EnumMembers=6]="EnumMembers",qo[qo.HeritageClauseElement=7]="HeritageClauseElement",qo[qo.VariableDeclarations=8]="VariableDeclarations",qo[qo.ObjectBindingElements=9]="ObjectBindingElements",qo[qo.ArrayBindingElements=10]="ArrayBindingElements",qo[qo.ArgumentExpressions=11]="ArgumentExpressions",qo[qo.ObjectLiteralMembers=12]="ObjectLiteralMembers",qo[qo.JsxAttributes=13]="JsxAttributes",qo[qo.JsxChildren=14]="JsxChildren",qo[qo.ArrayLiteralMembers=15]="ArrayLiteralMembers",qo[qo.Parameters=16]="Parameters",qo[qo.JSDocParameters=17]="JSDocParameters",qo[qo.RestProperties=18]="RestProperties",qo[qo.TypeParameters=19]="TypeParameters",qo[qo.TypeArguments=20]="TypeArguments",qo[qo.TupleElementTypes=21]="TupleElementTypes",qo[qo.HeritageClauses=22]="HeritageClauses",qo[qo.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",qo[qo.ImportAttributes=24]="ImportAttributes",qo[qo.JSDocComment=25]="JSDocComment",qo[qo.Count=26]="Count",(Vo=Uo||(Uo={}))[Vo.False=0]="False",Vo[Vo.True=1]="True",Vo[Vo.Unknown=2]="Unknown",(e=>{function t(e){const t=Je(),n=(e?ft:at)(19),r=Se(16777216,Nn);e&&!n||ut(20);const i=D.createJSDocTypeExpression(r);return pe(i),kt(i,t)}function n(){const e=Je(),t=ft(19),n=Je();let r=ln(!1);for(;81===qe();)Qe(),$e(),r=kt(D.createJSDocMemberName(r,Dt()),n);t&&ut(20);const i=D.createJSDocNameReference(r);return pe(i),kt(i,e)}let r;var i;let o;var s;function c(e=0,r){const i=u,o=void 0===r?i.length:e+r;if(r=o-e,gn.assert(e>=0),gn.assert(e<=o),gn.assert(o<=i.length),!BI(i,e))return;let s,c,_,d,p,f=[];const m=[],g=T;T|=1<<25;const h=a.scanRange(e+3,r-5,function(){let t,n=1,r=e-(i.lastIndexOf("\n",e)+1)+4;function l(e){t||(t=r),f.push(e),r+=e.length}$e();for(;Z(5););Z(4)&&(n=0,r=0);e:for(;;){switch(qe()){case 60:v(f),p||(p=Je()),A(C(r)),n=0,t=void 0;break;case 4:f.push(a.getTokenText()),n=0,r=0;break;case 42:const i=a.getTokenText();1===n?(n=2,l(i)):(gn.assert(0===n),n=1,r+=i.length);break;case 5:gn.assert(2!==n,"whitespace shouldn't come from the scanner while saving top-level comment text");const o=a.getTokenText();void 0!==t&&r+o.length>t&&f.push(o.slice(t-r)),r+=o.length;break;case 1:break e;case 82:n=2,l(a.getTokenValue());break;case 19:n=2;const s=a.getTokenFullStart(),c=E(a.getTokenEnd()-1);if(c){d||y(f),m.push(kt(D.createJSDocText(f.join("")),d??e,s)),m.push(c),f=[],d=a.getTokenEnd();break}default:n=2,l(a.getTokenText())}2===n?Ke(!1):$e()}const u=f.join("").trimEnd();m.length&&u.length&&m.push(kt(D.createJSDocText(u),d??e,p));m.length&&s&&gn.assertIsDefined(p,"having parsed tags implies that the end of the comment span should be set");const g=s&&St(s,c,_);return kt(D.createJSDocComment(m.length?St(m,e,p):u.length?u:void 0,g),e,o)});return T=g,h;function y(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function v(e){for(;e.length;){const t=e[e.length-1].trimEnd();if(""!==t){if(t.length$(n)))&&346!==t.kind;)if(s=!0,345===t.kind){if(r){const e=Le(ha.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);e&&fT(e,Zx(l,u,0,0,ha.The_tag_was_first_specified_here));break}r=t}else o=le(o,t);if(s){const t=i&&189===i.type.kind,n=D.createJSDocTypeLiteral(o,t);i=r&&r.typeExpression&&!j(r.typeExpression.type)?r.typeExpression:kt(n,e),a=i.end}}a=a||void 0!==s?Je():(o??i??t).end,s||(s=w(e,a,n,r));const c=D.createJSDocTypedefTag(t,i,o,s);return kt(c,e,a)}(r,i,e,o);break;case"callback":c=function(e,t,n,r){const i=U();x();let o=N(n);const a=V(e,n);o||(o=w(e,Je(),n,r));const s=void 0!==o?Je():a.end;return kt(D.createJSDocCallbackTag(t,a,i,o),e,s)}(r,i,e,o);break;case"overload":c=function(e,t,n,r){x();let i=N(n);const o=V(e,n);i||(i=w(e,Je(),n,r));const a=void 0!==i?Je():o.end;return kt(D.createJSDocOverloadTag(t,o,i),e,a)}(r,i,e,o);break;case"satisfies":c=function(e,n,r,i){const o=t(!1),a=void 0!==r&&void 0!==i?w(e,Je(),r,i):void 0;return kt(D.createJSDocSatisfiesTag(n,o,a),e)}(r,i,e,o);break;case"see":c=function(e,t,r,i){const o=23===qe()||tt(()=>60===$e()&&ya($e())&&P(a.getTokenValue()))?void 0:n(),s=void 0!==r&&void 0!==i?w(e,Je(),r,i):void 0;return kt(D.createJSDocSeeTag(t,o,s),e)}(r,i,e,o);break;case"exception":case"throws":c=function(e,t,n,r){const i=O(),o=w(e,Je(),n,r);return kt(D.createJSDocThrowsTag(t,i,o),e)}(r,i,e,o);break;case"import":c=function(e,t,n,r){const i=a.getTokenFullStart();let o;ot()&&(o=Dt());const s=Fo(o,i,156,!0),c=Oo(),l=Po(),_=void 0!==n&&void 0!==r?w(e,Je(),n,r):void 0;return kt(D.createJSDocImportTag(t,s,c,l,_),e)}(r,i,e,o);break;default:c=function(e,t,n,r){return kt(D.createJSDocUnknownTag(t,w(e,Je(),n,r)),e)}(r,i,e,o)}return c}function w(e,t,n,r){return r||(n+=t-e),N(n,r.slice(n))}function N(e,t){const n=Je();let r=[];const i=[];let o,s,c=0;function l(t){s||(s=e),r.push(t),e+=t.length}void 0!==t&&(""!==t&&l(t),c=1);let _=qe();e:for(;;){switch(_){case 4:c=0,r.push(a.getTokenText()),e=0;break;case 60:a.resetTokenState(a.getTokenEnd()-1);break e;case 1:break e;case 5:gn.assert(2!==c&&3!==c,"whitespace shouldn't come from the scanner while saving comment text");const t=a.getTokenText();void 0!==s&&e+t.length>s&&(r.push(t.slice(s-e)),c=2),e+=t.length;break;case 19:c=2;const _=a.getTokenFullStart(),u=E(a.getTokenEnd()-1);u?(i.push(kt(D.createJSDocText(r.join("")),o??n,_)),i.push(u),r=[],o=a.getTokenEnd()):l(a.getTokenText());break;case 62:c=3===c?2:3,l(a.getTokenText());break;case 82:3!==c&&(c=2),l(a.getTokenValue());break;case 42:if(0===c){c=1,e+=1;break}default:3!==c&&(c=2),l(a.getTokenText())}_=2===c||3===c?Ke(3===c):$e()}y(r);const u=r.join("").trimEnd();return i.length?(u.length&&i.push(kt(D.createJSDocText(u),o??n)),St(i,n,a.getTokenEnd())):u.length?u:void 0}function E(e){const t=rt(F);if(!t)return;$e(),x();const n=function(){if(ya(qe())){const e=Je();let t=Et();for(;ft(25);)t=kt(D.createQualifiedName(t,81===qe()?Tt(80,!1):Et()),e);for(;81===qe();)Qe(),$e(),t=kt(D.createJSDocMemberName(t,Dt()),e);return t}return}(),r=[];for(;20!==qe()&&4!==qe()&&1!==qe();)r.push(a.getTokenText()),$e();return kt(("link"===t?D.createJSDocLink:"linkcode"===t?D.createJSDocLinkCode:D.createJSDocLinkPlain)(n,r.join("")),e,a.getTokenEnd())}function F(){if(S(),19===qe()&&60===$e()&&ya($e())){const e=a.getTokenValue();if(P(e))return e}}function P(e){return"link"===e||"linkcode"===e||"linkplain"===e}function A(e){e&&(s?s.push(e):(s=[e],c=e.pos),_=e.end)}function O(){return S(),19===qe()?t():void 0}function L(){const e=Z(23);e&&x();const t=Z(62),n=function(){let e=ee();ft(23)&&at(24);for(;ft(25);){const t=ee();ft(23)&&at(24),e=_n(e,t)}return e}();var r;return t&&(gt(r=62)||(gn.assert(Oh(r)),Tt(r,!1,ha._0_expected,ja(r)))),e&&(x(),mt(64)&&Tr(),at(24)),{name:n,isBracketed:e}}function j(e){switch(e.kind){case 151:return!0;case 189:return j(e.elementType);default:return $D(e)&&fD(e.typeName)&&"Object"===e.typeName.escapedText&&!e.typeArguments}}function M(e,t,n,r){let i=O(),o=!i;S();const{name:a,isBracketed:s}=L(),c=S();o&&!tt(F)&&(i=O());const l=w(e,Je(),r,c),_=function(e,t,n,r){if(e&&j(e.type)){const i=Je();let o,a;for(;o=rt(()=>K(n,r,t));)342===o.kind||349===o.kind?a=le(a,o):346===o.kind&&Re(o.tagName,ha.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(a){const t=kt(D.createJSDocTypeLiteral(a,189===e.type.kind),i);return kt(D.createJSDocTypeExpression(t),i)}}}(i,a,n,r);_&&(i=_,o=!0);return kt(1===n?D.createJSDocPropertyTag(t,a,s,i,o,l):D.createJSDocParameterTag(t,a,s,i,o,l),e)}function B(e,n,r,i){X(s,XP)&&Me(n.pos,a.getTokenStart(),ha._0_tag_already_specified,Sc(n.escapedText));const o=t(!0),c=void 0!==r&&void 0!==i?w(e,Je(),r,i):void 0;return kt(D.createJSDocTypeTag(n,o,c),e)}function J(){const e=ft(19),t=Je(),n=function(){const e=Je();let t=ee();for(;ft(25);){const n=ee();t=kt(R(t,n),e)}return t}();a.setSkipJsDocLeadingAsterisks(!0);const r=xo();a.setSkipJsDocLeadingAsterisks(!1);const i=kt(D.createExpressionWithTypeArguments(n,r),t);return e&&(x(),at(20)),i}function z(e,t,n,r,i){return kt(t(n,w(e,Je(),r,i)),e)}function q(e,n,r,i){const o=t(!0);return x(),kt(D.createJSDocThisTag(n,o,w(e,Je(),r,i)),e)}function U(e){const t=a.getTokenStart();if(!ya(qe()))return;const n=ee();if(ft(25)){const r=U(!0);return kt(D.createModuleDeclaration(void 0,n,r,e?8:void 0),t)}return e&&(n.flags|=4096),n}function V(e,t){const n=function(e){const t=Je();let n,r;for(;n=rt(()=>K(4,e));){if(346===n.kind){Re(n.tagName,ha.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}r=le(r,n)}return St(r||[],t)}(t),r=rt(()=>{if(Z(60)){const e=C(t);if(e&&343===e.kind)return e}});return kt(D.createJSDocSignature(void 0,n,r),e)}function W(e,t){for(;!fD(e)||!fD(t);){if(fD(e)||fD(t)||e.right.escapedText!==t.right.escapedText)return!1;e=e.left,t=t.left}return e.escapedText===t.escapedText}function $(e){return K(1,e)}function K(e,t,n){let r=!0,i=!1;for(;;)switch($e()){case 60:if(r){const r=H(e,t);return!(r&&(342===r.kind||349===r.kind)&&n&&(fD(r.name)||!W(n,r.name.left)))&&r}i=!1;break;case 4:r=!0,i=!1;break;case 42:i&&(r=!1),i=!0;break;case 80:r=!1;break;case 1:return!1}}function H(e,t){gn.assert(60===qe());const n=a.getTokenFullStart();$e();const r=ee(),i=S();let o;switch(r.escapedText){case"type":return 1===e&&B(n,r);case"prop":case"property":o=1;break;case"arg":case"argument":case"param":o=6;break;case"template":return Q(n,r,t,i);case"this":return q(n,r,t,i);default:return!1}return!!(e&o)&&M(n,r,e,t)}function G(){const e=Je(),t=Z(23);t&&x();const n=po(!1,!0),r=ee(ha.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);let i;if(t&&(x(),at(64),i=Se(16777216,Nn),at(24)),!Od(r))return kt(D.createTypeParameterDeclaration(n,r,void 0,i),e)}function Q(e,n,r,i){const o=19===qe()?t():void 0,a=function(){const e=Je(),t=[];do{x();const e=G();void 0!==e&&t.push(e),S()}while(Z(28));return St(t,e)}();return kt(D.createJSDocTemplateTag(n,o,a,w(e,Je(),r,i)),e)}function Z(e){return qe()===e&&($e(),!0)}function ee(e){if(!ya(qe()))return Tt(80,!e,e||ha.Identifier_expected);k++;const t=a.getTokenStart(),n=a.getTokenEnd(),r=qe(),i=Ct(a.getTokenValue()),o=kt(I(i,r),t,n);return $e(),o}}e.parseJSDocTypeExpressionForTests=function(e,n,r){se("file.js",e,99,void 0,1,0),a.setText(e,n,r),b=a.scan();const i=t(),o=fe("file.js",99,1,!1,[],L(1),0,ct),s=nS(h,o);return y&&(o.jsDocDiagnostics=nS(y,o)),ce(),i?{jsDocTypeExpression:i,diagnostics:s}:void 0},e.parseJSDocTypeExpression=t,e.parseJSDocNameReference=n,e.parseIsolatedJSDocComment=function(e,t,n){se("",e,99,void 0,1,0);const r=Se(16777216,()=>c(t,n)),i=nS(h,{languageVariant:0,text:e});return ce(),r?{jsDoc:r,diagnostics:i}:void 0},e.parseJSDocComment=function(e,t,n){const r=b,i=h.length,o=oe,a=Se(16777216,()=>c(t,n));return jT(a,e),524288&N&&(y||(y=[]),de(y,h,i)),b=r,h.length=i,oe=o,a},(i=r||(r={}))[i.BeginningOfLine=0]="BeginningOfLine",i[i.SawAsterisk=1]="SawAsterisk",i[i.SavingComments=2]="SavingComments",i[i.SavingBackticks=3]="SavingBackticks",(s=o||(o={}))[s.Property=1]="Property",s[s.Parameter=2]="Parameter",s[s.CallbackParameter=4]="CallbackParameter"})(Wo=e.JSDocParser||(e.JSDocParser={}))})(UI||(UI={}));var yO=new WeakSet;var vO,bO=new WeakSet;function xO(e){bO.add(e)}function SO(e){return void 0!==kO(e)}function kO(e){const t=Ro(e,Mk,!1);if(t)return t;if(Eo(e,".ts")){const t=jo(e),n=t.lastIndexOf(".d.");if(n>=0)return t.substring(n)}}function TO(e,t){const n=[];for(const e of hs(t,0)||p){FO(n,e,t.substring(e.pos,e.end))}e.pragmas=new Map;for(const t of n){if(e.pragmas.has(t.name)){const n=e.pragmas.get(t.name);n instanceof Array?n.push(t.args):e.pragmas.set(t.name,[n,t.args]);continue}e.pragmas.set(t.name,t.args)}}function CO(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((n,r)=>{switch(r){case"reference":{const r=e.referencedFiles,i=e.typeReferenceDirectives,o=e.libReferenceDirectives;g(rt(n),n=>{const{types:a,lib:s,path:c,"resolution-mode":l,preserve:_}=n.arguments,u="true"===_||void 0;if("true"===n.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(a){const e=function(e,t,n,r){if(e)return"import"===e?99:"require"===e?1:void r(t,n-t,ha.resolution_mode_should_be_either_require_or_import)}(l,a.pos,a.end,t);i.push({pos:a.pos,end:a.end,fileName:a.value,...e?{resolutionMode:e}:{},...u?{preserve:u}:{}})}else s?o.push({pos:s.pos,end:s.end,fileName:s.value,...u?{preserve:u}:{}}):c?r.push({pos:c.pos,end:c.end,fileName:c.value,...u?{preserve:u}:{}}):t(n.range.pos,n.range.end-n.range.pos,ha.Invalid_reference_directive_syntax)});break}case"amd-dependency":e.amdDependencies=O(rt(n),e=>({name:e.arguments.name,path:e.arguments.path}));break;case"amd-module":if(n instanceof Array)for(const r of n)e.moduleName&&t(r.range.pos,r.range.end-r.range.pos,ha.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=r.arguments.name;else e.moduleName=n.arguments.name;break;case"ts-nocheck":case"ts-check":g(rt(n),t=>{(!e.checkJsDirective||t.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:"ts-check"===r,end:t.range.end,pos:t.range.pos})});break;case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:gn.fail("Unhandled pragma kind")}})}(e=>{function t(e,t,r,o,a,s,c){return void(r?_(e):l(e));function l(e){let r="";if(c&&n(e)&&(r=a.substring(e.pos,e.end)),_A(e,t),IT(e,e.pos+o,e.end+o),c&&n(e)&&gn.assert(r===s.substring(e.pos,e.end)),sO(e,l,_),Lu(e))for(const t of e.jsDoc)l(t);i(e,c)}function _(e){IT(e,e.pos+o,e.end+o);for(const t of e)l(t)}}function n(e){switch(e.kind){case 11:case 9:case 80:return!0}return!1}function r(e,t,n,r,i){gn.assert(e.end>=t,"Adjusting an element that was entirely before the change range"),gn.assert(e.pos<=n,"Adjusting an element that was entirely after the change range"),gn.assert(e.pos<=e.end);const o=Math.min(e.pos,r),a=e.end>=n?e.end+i:Math.min(e.end,r);if(gn.assert(o<=a),e.parent){const t=e.parent;gn.assertGreaterThanOrEqual(o,t.pos),gn.assertLessThanOrEqual(a,t.end)}IT(e,o,a)}function i(e,t){if(t){let t=e.pos;const n=e=>{gn.assert(e.pos>=t),t=e.end};if(Lu(e))for(const t of e.jsDoc)n(t);sO(e,n),gn.assert(t<=e.end)}}function o(e,t){let n,r=e;if(sO(e,function e(i){if(Od(i))return;if(!(i.pos<=t))return gn.assert(i.pos>t),!0;if(i.pos>=r.pos&&(r=i),tr.pos&&(r=e)}return r}function a(e,t,n,r){const i=e.text;if(n&&(gn.assert(i.length-n.span.length+n.newLength===t.length),r||gn.shouldAssert(3))){const e=i.substr(0,n.span.start),r=t.substr(0,n.span.start);gn.assert(e===r);const o=i.substring(js(n.span),i.length),a=t.substring(js(ec(n)),t.length);gn.assert(o===a)}}function s(e){let t=e.statements,n=0;gn.assert(n(o!==i&&(r&&r.end===o&&n=e.pos&&i=e.pos&&i0&&t<=n;t++){const t=o(e,r);gn.assert(t.pos<=r);const n=t.pos;r=Math.max(0,n-1)}const i=Zs(r,js(t.span)),a=t.newLength+(t.span.start-r);return nc(i,a)}(e,c);a(e,n,d,l),gn.assert(d.span.start<=c.span.start),gn.assert(js(d.span)===js(c.span)),gn.assert(js(ec(d))===js(ec(c)));const p=ec(d).length-d.span.length;!function(e,n,o,a,s,c,l,_){return void u(e);function u(p){if(gn.assert(p.pos<=p.end),p.pos>o)return void t(p,e,!1,s,c,l,_);const f=p.end;if(f>=n){if(xO(p),_A(p,e),r(p,n,o,a,s),sO(p,u,d),Lu(p))for(const e of p.jsDoc)u(e);i(p,_)}else gn.assert(fo)return void t(i,e,!0,s,c,l,_);const d=i.end;if(d>=n){xO(i),r(i,n,o,a,s);for(const e of i)u(e)}else gn.assert(dr){_();const t={range:{pos:e.pos+i,end:e.end+i},type:l};c=le(c,t),s&&gn.assert(o.substring(e.pos,e.end)===a.substring(t.range.pos,t.range.end))}}return _(),c;function _(){l||(l=!0,c?t&&c.push(...t):c=t)}}(e.commentDirectives,f.commentDirectives,d.span.start,js(d.span),p,_,n,l),f.impliedNodeFormat=e.impliedNodeFormat,uA(e,f),f},e.createSyntaxCursor=s,(l=c||(c={}))[l.Value=-1]="Value"})(vO||(vO={}));var wO=new Map;function NO(e){if(wO.has(e))return wO.get(e);const t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return wO.set(e,t),t}var DO=/^\/\/\/\s*<(\S+)\s.*?\/>/m,EO=/^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m;function FO(e,t,n){const r=2===t.kind&&DO.exec(n);if(r){const i=r[1].toLowerCase(),o=Ji[i];if(!(o&&1&o.kind))return;if(o.args){const r={};for(const e of o.args){const i=NO(e.name).exec(n);if(!i&&!e.optional)return;if(i){const n=i[2]||i[3];if(e.captureSpan){const o=t.pos+i.index+i[1].length+1;r[e.name]={value:n,pos:o,end:o+n.length}}else r[e.name]=n}}e.push({name:i,args:{arguments:r,range:t}})}else e.push({name:i,args:{arguments:{},range:t}});return}const i=2===t.kind&&EO.exec(n);if(i)return PO(e,t,2,i);if(3===t.kind){const r=/@(\S+)(\s+(?:\S.*)?)?$/gm;let i;for(;i=r.exec(n);)PO(e,t,4,i)}}function PO(e,t,n,r){if(!r)return;const i=r[1].toLowerCase(),o=Ji[i];if(!(o&&o.kind&n))return;const a=function(e,t){if(!t)return{};if(!e.args)return{};const n=t.trim().split(/\s+/),r={};for(let t=0;t[""+t,e])),jO=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["es2021","lib.es2021.d.ts"],["es2022","lib.es2022.d.ts"],["es2023","lib.es2023.d.ts"],["es2024","lib.es2024.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["dom.asynciterable","lib.dom.asynciterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["webworker.iterable","lib.webworker.iterable.d.ts"],["webworker.asynciterable","lib.webworker.asynciterable.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2016.intl","lib.es2016.intl.d.ts"],["es2017.arraybuffer","lib.es2017.arraybuffer.d.ts"],["es2017.date","lib.es2017.date.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2019.intl","lib.es2019.intl.d.ts"],["es2020.bigint","lib.es2020.bigint.d.ts"],["es2020.date","lib.es2020.date.d.ts"],["es2020.promise","lib.es2020.promise.d.ts"],["es2020.sharedmemory","lib.es2020.sharedmemory.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["es2020.intl","lib.es2020.intl.d.ts"],["es2020.number","lib.es2020.number.d.ts"],["es2021.promise","lib.es2021.promise.d.ts"],["es2021.string","lib.es2021.string.d.ts"],["es2021.weakref","lib.es2021.weakref.d.ts"],["es2021.intl","lib.es2021.intl.d.ts"],["es2022.array","lib.es2022.array.d.ts"],["es2022.error","lib.es2022.error.d.ts"],["es2022.intl","lib.es2022.intl.d.ts"],["es2022.object","lib.es2022.object.d.ts"],["es2022.string","lib.es2022.string.d.ts"],["es2022.regexp","lib.es2022.regexp.d.ts"],["es2023.array","lib.es2023.array.d.ts"],["es2023.collection","lib.es2023.collection.d.ts"],["es2023.intl","lib.es2023.intl.d.ts"],["es2024.arraybuffer","lib.es2024.arraybuffer.d.ts"],["es2024.collection","lib.es2024.collection.d.ts"],["es2024.object","lib.es2024.object.d.ts"],["es2024.promise","lib.es2024.promise.d.ts"],["es2024.regexp","lib.es2024.regexp.d.ts"],["es2024.sharedmemory","lib.es2024.sharedmemory.d.ts"],["es2024.string","lib.es2024.string.d.ts"],["esnext.array","lib.es2023.array.d.ts"],["esnext.collection","lib.esnext.collection.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.disposable","lib.esnext.disposable.d.ts"],["esnext.bigint","lib.es2020.bigint.d.ts"],["esnext.string","lib.es2022.string.d.ts"],["esnext.promise","lib.es2024.promise.d.ts"],["esnext.weakref","lib.es2021.weakref.d.ts"],["esnext.decorators","lib.esnext.decorators.d.ts"],["esnext.object","lib.es2024.object.d.ts"],["esnext.array","lib.esnext.array.d.ts"],["esnext.regexp","lib.es2024.regexp.d.ts"],["esnext.string","lib.es2024.string.d.ts"],["esnext.iterator","lib.esnext.iterator.d.ts"],["esnext.promise","lib.esnext.promise.d.ts"],["esnext.float16","lib.esnext.float16.d.ts"],["esnext.error","lib.esnext.error.d.ts"],["esnext.sharedmemory","lib.esnext.sharedmemory.d.ts"],["decorators","lib.decorators.d.ts"],["decorators.legacy","lib.decorators.legacy.d.ts"]],MO=jO.map(e=>e[0]),RO=new Map(jO),BO=[{name:"watchFile",type:new Map(Object.entries({fixedpollinginterval:0,prioritypollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3,usefsevents:4,usefseventsonparentdirectory:5})),category:ha.Watch_and_Build_Modes,description:ha.Specify_how_the_TypeScript_watch_mode_works,defaultValueDescription:4},{name:"watchDirectory",type:new Map(Object.entries({usefsevents:0,fixedpollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3})),category:ha.Watch_and_Build_Modes,description:ha.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,defaultValueDescription:0},{name:"fallbackPolling",type:new Map(Object.entries({fixedinterval:0,priorityinterval:1,dynamicpriority:2,fixedchunksize:3})),category:ha.Watch_and_Build_Modes,description:ha.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,defaultValueDescription:1},{name:"synchronousWatchDirectory",type:"boolean",category:ha.Watch_and_Build_Modes,description:ha.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,defaultValueDescription:!1},{name:"excludeDirectories",type:"list",element:{name:"excludeDirectory",type:"string",isFilePath:!0,extraValidation:Zj},allowConfigDirTemplateSubstitution:!0,category:ha.Watch_and_Build_Modes,description:ha.Remove_a_list_of_directories_from_the_watch_process},{name:"excludeFiles",type:"list",element:{name:"excludeFile",type:"string",isFilePath:!0,extraValidation:Zj},allowConfigDirTemplateSubstitution:!0,category:ha.Watch_and_Build_Modes,description:ha.Remove_a_list_of_files_from_the_watch_mode_s_processing}],JO=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:ha.Command_line_Options,description:ha.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:ha.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:ha.Command_line_Options,description:ha.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:ha.Output_Formatting,description:ha.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:ha.Compiler_Diagnostics,description:ha.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:ha.Compiler_Diagnostics,description:ha.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:ha.Compiler_Diagnostics,description:ha.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:ha.Output_Formatting,description:ha.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:ha.Compiler_Diagnostics,description:ha.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:ha.Compiler_Diagnostics,description:ha.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:ha.Compiler_Diagnostics,description:ha.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:ha.FILE_OR_DIRECTORY,category:ha.Compiler_Diagnostics,description:ha.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,paramType:ha.DIRECTORY,category:ha.Compiler_Diagnostics,description:ha.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:ha.Projects,description:ha.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:ha.false_unless_composite_is_set},{name:"declaration",shortName:"d",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Emit,transpileOptionValue:void 0,description:ha.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,defaultValueDescription:ha.false_unless_composite_is_set},{name:"declarationMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Emit,defaultValueDescription:!1,description:ha.Create_sourcemaps_for_d_ts_files},{name:"emitDeclarationOnly",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Emit,description:ha.Only_output_d_ts_files_and_not_JavaScript_files,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Emit,defaultValueDescription:!1,description:ha.Create_source_map_files_for_emitted_JavaScript_files},{name:"inlineSourceMap",type:"boolean",affectsBuildInfo:!0,category:ha.Emit,description:ha.Include_sourcemap_files_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"noCheck",type:"boolean",showInSimplifiedHelpView:!1,category:ha.Compiler_Diagnostics,description:ha.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:ha.Emit,description:ha.Disable_emitting_files_from_a_compilation,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:ha.Watch_and_Build_Modes,description:ha.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:ha.Command_line_Options,isCommandLineOnly:!0,description:ha.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:ha.Platform_specific}],zO={name:"target",shortName:"t",type:new Map(Object.entries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,es2021:8,es2022:9,es2023:10,es2024:11,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,deprecatedKeys:new Set(["es3"]),paramType:ha.VERSION,showInSimplifiedHelpView:!0,category:ha.Language_and_Environment,description:ha.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,defaultValueDescription:1},qO={name:"module",shortName:"m",type:new Map(Object.entries({none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5,es2020:6,es2022:7,esnext:99,node16:100,node18:101,node20:102,nodenext:199,preserve:200})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,paramType:ha.KIND,showInSimplifiedHelpView:!0,category:ha.Modules,description:ha.Specify_what_module_code_is_generated,defaultValueDescription:void 0},UO=[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:ha.Command_line_Options,description:ha.Show_all_compiler_options,defaultValueDescription:!1},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:ha.Command_line_Options,description:ha.Print_the_compiler_s_version,defaultValueDescription:!1},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:ha.Command_line_Options,description:ha.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,defaultValueDescription:!1},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:ha.Command_line_Options,paramType:ha.FILE_OR_DIRECTORY,description:ha.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"showConfig",type:"boolean",showInSimplifiedHelpView:!0,category:ha.Command_line_Options,isCommandLineOnly:!0,description:ha.Print_the_final_configuration_instead_of_building,defaultValueDescription:!1},{name:"listFilesOnly",type:"boolean",category:ha.Command_line_Options,isCommandLineOnly:!0,description:ha.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,defaultValueDescription:!1},zO,qO,{name:"lib",type:"list",element:{name:"lib",type:RO,defaultValueDescription:void 0},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:ha.Language_and_Environment,description:ha.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",allowJsFlag:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.JavaScript_Support,description:ha.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files,defaultValueDescription:!1},{name:"checkJs",type:"boolean",affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.JavaScript_Support,description:ha.Enable_error_reporting_in_type_checked_JavaScript_files,defaultValueDescription:!1},{name:"jsx",type:OO,affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,paramType:ha.KIND,showInSimplifiedHelpView:!0,category:ha.Language_and_Environment,description:ha.Specify_what_JSX_code_is_generated,defaultValueDescription:void 0},{name:"outFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:ha.FILE,showInSimplifiedHelpView:!0,category:ha.Emit,description:ha.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:ha.DIRECTORY,showInSimplifiedHelpView:!0,category:ha.Emit,description:ha.Specify_an_output_folder_for_all_emitted_files},{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:ha.LOCATION,category:ha.Modules,description:ha.Specify_the_root_folder_within_your_source_files,defaultValueDescription:ha.Computed_from_the_list_of_input_files},{name:"composite",type:"boolean",affectsBuildInfo:!0,isTSConfigOnly:!0,category:ha.Projects,transpileOptionValue:void 0,defaultValueDescription:!1,description:ha.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,isFilePath:!0,paramType:ha.FILE,category:ha.Projects,transpileOptionValue:void 0,defaultValueDescription:".tsbuildinfo",description:ha.Specify_the_path_to_tsbuildinfo_incremental_compilation_file},{name:"removeComments",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Emit,defaultValueDescription:!1,description:ha.Disable_emitting_comments},{name:"importHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,affectsSourceFile:!0,category:ha.Emit,description:ha.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,defaultValueDescription:!1},{name:"importsNotUsedAsValues",type:new Map(Object.entries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Backwards_Compatibility,description:ha.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,defaultValueDescription:0},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,description:ha.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,defaultValueDescription:!1},{name:"isolatedModules",type:"boolean",category:ha.Interop_Constraints,description:ha.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,transpileOptionValue:!0,defaultValueDescription:!1},{name:"verbatimModuleSyntax",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Interop_Constraints,description:ha.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,defaultValueDescription:!1},{name:"isolatedDeclarations",type:"boolean",category:ha.Interop_Constraints,description:ha.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"erasableSyntaxOnly",type:"boolean",category:ha.Interop_Constraints,description:ha.Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"libReplacement",type:"boolean",affectsProgramStructure:!0,category:ha.Language_and_Environment,description:ha.Enable_lib_replacement,defaultValueDescription:!0},{name:"strict",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Type_Checking,description:ha.Enable_all_strict_type_checking_options,defaultValueDescription:!1},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,defaultValueDescription:ha.false_unless_strict_is_set},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.When_type_checking_take_into_account_null_and_undefined,defaultValueDescription:ha.false_unless_strict_is_set},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,defaultValueDescription:ha.false_unless_strict_is_set},{name:"strictBindCallApply",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,defaultValueDescription:ha.false_unless_strict_is_set},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,defaultValueDescription:ha.false_unless_strict_is_set},{name:"strictBuiltinIteratorReturn",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,defaultValueDescription:ha.false_unless_strict_is_set},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Enable_error_reporting_when_this_is_given_the_type_any,defaultValueDescription:ha.false_unless_strict_is_set},{name:"useUnknownInCatchVariables",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Default_catch_clause_variables_as_unknown_instead_of_any,defaultValueDescription:ha.false_unless_strict_is_set},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,strictFlag:!0,category:ha.Type_Checking,description:ha.Ensure_use_strict_is_always_emitted,defaultValueDescription:ha.false_unless_strict_is_set},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Enable_error_reporting_when_local_variables_aren_t_read,defaultValueDescription:!1},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Raise_an_error_when_a_function_parameter_isn_t_read,defaultValueDescription:!1},{name:"exactOptionalPropertyTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Interpret_optional_property_types_as_written_rather_than_adding_undefined,defaultValueDescription:!1},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,defaultValueDescription:!1},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,defaultValueDescription:!1},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Add_undefined_to_a_type_when_accessed_using_an_index,defaultValueDescription:!1},{name:"noImplicitOverride",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,defaultValueDescription:!1},{name:"noPropertyAccessFromIndexSignature",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!1,category:ha.Type_Checking,description:ha.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,defaultValueDescription:!1},{name:"moduleResolution",type:new Map(Object.entries({node10:2,node:2,classic:1,node16:3,nodenext:99,bundler:100})),deprecatedKeys:new Set(["node"]),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:ha.STRATEGY,category:ha.Modules,description:ha.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,defaultValueDescription:ha.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:ha.Modules,description:ha.Specify_the_base_directory_to_resolve_non_relative_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,isTSConfigOnly:!0,category:ha.Modules,description:ha.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:ha.Modules,description:ha.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,transpileOptionValue:void 0,defaultValueDescription:ha.Computed_from_the_list_of_input_files},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:ha.Modules,description:ha.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types},{name:"types",type:"list",element:{name:"types",type:"string"},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:ha.Modules,description:ha.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Interop_Constraints,description:ha.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,defaultValueDescription:ha.module_system_or_esModuleInterop},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:ha.Interop_Constraints,description:ha.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,defaultValueDescription:!1},{name:"preserveSymlinks",type:"boolean",category:ha.Interop_Constraints,description:ha.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,defaultValueDescription:!1},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Modules,description:ha.Allow_accessing_UMD_globals_from_modules,defaultValueDescription:!1},{name:"moduleSuffixes",type:"list",element:{name:"suffix",type:"string"},listPreserveFalsyValues:!0,affectsModuleResolution:!0,category:ha.Modules,description:ha.List_of_file_name_suffixes_to_search_when_resolving_a_module},{name:"allowImportingTsExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Modules,description:ha.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,defaultValueDescription:!1,transpileOptionValue:void 0},{name:"rewriteRelativeImportExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Modules,description:ha.Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files,defaultValueDescription:!1},{name:"resolvePackageJsonExports",type:"boolean",affectsModuleResolution:!0,category:ha.Modules,description:ha.Use_the_package_json_exports_field_when_resolving_package_imports,defaultValueDescription:ha.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"resolvePackageJsonImports",type:"boolean",affectsModuleResolution:!0,category:ha.Modules,description:ha.Use_the_package_json_imports_field_when_resolving_imports,defaultValueDescription:ha.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"customConditions",type:"list",element:{name:"condition",type:"string"},affectsModuleResolution:!0,category:ha.Modules,description:ha.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports},{name:"noUncheckedSideEffectImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Modules,description:ha.Check_side_effect_imports,defaultValueDescription:!1},{name:"sourceRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:ha.LOCATION,category:ha.Emit,description:ha.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code},{name:"mapRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:ha.LOCATION,category:ha.Emit,description:ha.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSources",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,description:ha.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"experimentalDecorators",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Language_and_Environment,description:ha.Enable_experimental_support_for_legacy_experimental_decorators,defaultValueDescription:!1},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:ha.Language_and_Environment,description:ha.Emit_design_type_metadata_for_decorated_declarations_in_source_files,defaultValueDescription:!1},{name:"jsxFactory",type:"string",category:ha.Language_and_Environment,description:ha.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,defaultValueDescription:"`React.createElement`"},{name:"jsxFragmentFactory",type:"string",category:ha.Language_and_Environment,description:ha.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,defaultValueDescription:"React.Fragment"},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSourceFile:!0,category:ha.Language_and_Environment,description:ha.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,defaultValueDescription:"react"},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:ha.Modules,description:ha.Enable_importing_json_files,defaultValueDescription:!1},{name:"allowArbitraryExtensions",type:"boolean",affectsProgramStructure:!0,category:ha.Modules,description:ha.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,defaultValueDescription:!1},{name:"out",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!1,category:ha.Backwards_Compatibility,paramType:ha.FILE,transpileOptionValue:void 0,description:ha.Deprecated_setting_Use_outFile_instead},{name:"reactNamespace",type:"string",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Language_and_Environment,description:ha.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,defaultValueDescription:"`React`"},{name:"skipDefaultLibCheck",type:"boolean",affectsBuildInfo:!0,category:ha.Completeness,description:ha.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,defaultValueDescription:!1},{name:"charset",type:"string",category:ha.Backwards_Compatibility,description:ha.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,defaultValueDescription:"utf8"},{name:"emitBOM",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,description:ha.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,defaultValueDescription:!1},{name:"newLine",type:new Map(Object.entries({crlf:0,lf:1})),affectsEmit:!0,affectsBuildInfo:!0,paramType:ha.NEWLINE,category:ha.Emit,description:ha.Set_the_newline_character_for_emitting_files,defaultValueDescription:"lf"},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Output_Formatting,description:ha.Disable_truncating_types_in_error_messages,defaultValueDescription:!1},{name:"noLib",type:"boolean",category:ha.Language_and_Environment,affectsProgramStructure:!0,description:ha.Disable_including_any_library_files_including_the_default_lib_d_ts,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:ha.Modules,description:ha.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,transpileOptionValue:!0,defaultValueDescription:!1},{name:"stripInternal",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,description:ha.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,defaultValueDescription:!1},{name:"disableSizeLimit",type:"boolean",affectsProgramStructure:!0,category:ha.Editor_Support,description:ha.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,defaultValueDescription:!1},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:ha.Projects,description:ha.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,defaultValueDescription:!1},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:ha.Projects,description:ha.Opt_a_project_out_of_multi_project_reference_checking_when_editing,defaultValueDescription:!1},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:ha.Projects,description:ha.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,defaultValueDescription:!1},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Backwards_Compatibility,description:ha.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,defaultValueDescription:!1},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,description:ha.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,defaultValueDescription:!1},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,transpileOptionValue:void 0,description:ha.Disable_emitting_files_if_any_type_checking_errors_are_reported,defaultValueDescription:!1},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Emit,description:ha.Disable_erasing_const_enum_declarations_in_generated_code,defaultValueDescription:!1},{name:"declarationDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:ha.DIRECTORY,category:ha.Emit,transpileOptionValue:void 0,description:ha.Specify_the_output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",affectsBuildInfo:!0,category:ha.Completeness,description:ha.Skip_type_checking_all_d_ts_files,defaultValueDescription:!1},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Disable_error_reporting_for_unused_labels,defaultValueDescription:void 0},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Type_Checking,description:ha.Disable_error_reporting_for_unreachable_code,defaultValueDescription:void 0},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Backwards_Compatibility,description:ha.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,defaultValueDescription:!1},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Backwards_Compatibility,description:ha.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,defaultValueDescription:!1},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:ha.Interop_Constraints,description:ha.Ensure_that_casing_is_correct_in_imports,defaultValueDescription:!0},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:ha.JavaScript_Support,description:ha.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,defaultValueDescription:0},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:ha.Backwards_Compatibility,description:ha.Disable_strict_checking_of_generic_signatures_in_function_types,defaultValueDescription:!1},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:ha.Language_and_Environment,description:ha.Emit_ECMAScript_standard_compliant_class_fields,defaultValueDescription:ha.true_for_ES2022_and_above_including_ESNext},{name:"preserveValueImports",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:ha.Backwards_Compatibility,description:ha.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,defaultValueDescription:!1},{name:"keyofStringsOnly",type:"boolean",category:ha.Backwards_Compatibility,description:ha.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,defaultValueDescription:!1},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:ha.Specify_a_list_of_language_service_plugins_to_include,category:ha.Editor_Support},{name:"moduleDetection",type:new Map(Object.entries({auto:2,legacy:1,force:3})),affectsSourceFile:!0,affectsModuleResolution:!0,description:ha.Control_what_method_is_used_to_detect_module_format_JS_files,category:ha.Language_and_Environment,defaultValueDescription:ha.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules},{name:"ignoreDeprecations",type:"string",defaultValueDescription:void 0}],VO=[...JO,...UO],WO=VO.filter(e=>!!e.affectsSemanticDiagnostics),$O=VO.filter(e=>!!e.affectsEmit),KO=VO.filter(e=>!!e.affectsDeclarationPath),HO=VO.filter(e=>!!e.affectsModuleResolution),GO=VO.filter(e=>!!e.affectsSourceFile||!!e.affectsBindDiagnostics),XO=VO.filter(e=>!!e.affectsProgramStructure),QO=VO.filter(e=>Ie(e,"transpileOptionValue")),YO=VO.filter(e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath),ZO=BO.filter(e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath),eL=VO.filter(function(e){return!it(e.type)});var tL,nL={name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:ha.Command_line_Options,description:ha.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,defaultValueDescription:!1},rL=[nL,{name:"verbose",shortName:"v",category:ha.Command_line_Options,description:ha.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1},{name:"dry",shortName:"d",category:ha.Command_line_Options,description:ha.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean",defaultValueDescription:!1},{name:"force",shortName:"f",category:ha.Command_line_Options,description:ha.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean",defaultValueDescription:!1},{name:"clean",category:ha.Command_line_Options,description:ha.Delete_the_outputs_of_all_projects,type:"boolean",defaultValueDescription:!1},{name:"stopBuildOnErrors",category:ha.Command_line_Options,description:ha.Skip_building_downstream_projects_on_error_in_upstream_project,type:"boolean",defaultValueDescription:!1}],iL=[...JO,...rL],oL=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function aL(e){const t=new Map,n=new Map;return g(e,e=>{t.set(e.name.toLowerCase(),e),e.shortName&&n.set(e.shortName,e.name)}),{optionsNameMap:t,shortOptionNames:n}}function sL(){return tL||(tL=aL(VO))}var cL={diagnostic:ha.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:kL},lL={module:1,target:3,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0};function _L(e){return uL(e,oS)}function uL(e,t){const n=Be(e.type.keys()),r=(e.deprecatedKeys?n.filter(t=>!e.deprecatedKeys.has(t)):n).map(e=>`'${e}'`).join(", ");return t(ha.Argument_for_0_option_must_be_Colon_1,`--${e.name}`,r)}function dL(e,t,n){return qj(e,(t??"").trim(),n)}function pL(e,t="",n){if(en(t=t.trim(),"-"))return;if("listOrElement"===e.type&&!t.includes(","))return zj(e,t,n);if(""===t)return[];const r=t.split(",");switch(e.element.type){case"number":return U(r,t=>zj(e.element,parseInt(t),n));case"string":return U(r,t=>zj(e.element,t||"",n));case"boolean":case"object":return gn.fail(`List of ${e.element.type} is not yet supported.`);default:return U(r,t=>dL(e.element,t,n))}}function fL(e){return e.name}function mL(e,t,n,r,i){var o;const a=null==(o=t.alternateMode)?void 0:o.getOptionsNameMap().optionsNameMap.get(e.toLowerCase());if(a)return Bj(i,r,a!==nL?t.alternateMode.diagnostic:ha.Option_build_must_be_the_first_command_line_argument,e);const s=Jt(e,t.optionDeclarations,fL);return s?Bj(i,r,t.unknownDidYouMeanDiagnostic,n||e,s.name):Bj(i,r,t.unknownOptionDiagnostic,n||e)}function gL(e,t,n){const r={};let i;const o=[],a=[];return s(t),{options:r,watchOptions:i,fileNames:o,errors:a};function s(t){let n=0;for(;nmo.readFile(e)));if(!it(t))return void a.push(t);const r=[];let i=0;for(;;){for(;i=t.length)break;const n=i;if(34===t.charCodeAt(n)){for(i++;i32;)i++;r.push(t.substring(n,i))}}s(r)}}function hL(e,t,n,r,i,o){if(r.isTSConfigOnly){const n=e[t];"null"===n?(i[r.name]=void 0,t++):"boolean"===r.type?"false"===n?(i[r.name]=zj(r,!1,o),t++):("true"===n&&t++,o.push(oS(ha.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,r.name))):(o.push(oS(ha.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,r.name)),n&&!en(n,"-")&&t++)}else if(e[t]||"boolean"===r.type||o.push(oS(n.optionTypeMismatchDiagnostic,r.name,QL(r))),"null"!==e[t])switch(r.type){case"number":i[r.name]=zj(r,parseInt(e[t]),o),t++;break;case"boolean":const n=e[t];i[r.name]=zj(r,"false"!==n,o),"false"!==n&&"true"!==n||t++;break;case"string":i[r.name]=zj(r,e[t]||"",o),t++;break;case"list":const a=pL(r,e[t],o);i[r.name]=a||[],a&&t++;break;case"listOrElement":gn.fail("listOrElement not supported here");break;default:i[r.name]=dL(r,e[t],o),t++}else i[r.name]=void 0,t++;return t}var yL,vL={alternateMode:cL,getOptionsNameMap:sL,optionDeclarations:VO,unknownOptionDiagnostic:ha.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:ha.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:ha.Compiler_option_0_expects_an_argument};function bL(e,t){return gL(vL,e,t)}function xL(e,t){return SL(sL,e,t)}function SL(e,t,n=!1){t=t.toLowerCase();const{optionsNameMap:r,shortOptionNames:i}=e();if(n){const e=i.get(t);void 0!==e&&(t=e)}return r.get(t)}function kL(){return yL||(yL=aL(iL))}var TL={alternateMode:{diagnostic:ha.Compiler_option_0_may_not_be_used_with_build,getOptionsNameMap:sL},getOptionsNameMap:kL,optionDeclarations:iL,unknownOptionDiagnostic:ha.Unknown_build_option_0,unknownDidYouMeanDiagnostic:ha.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:ha.Build_option_0_requires_a_value_of_type_1};function CL(e){const{options:t,watchOptions:n,fileNames:r,errors:i}=gL(TL,e),o=t;return 0===r.length&&r.push("."),o.clean&&o.force&&i.push(oS(ha.Options_0_and_1_cannot_be_combined,"clean","force")),o.clean&&o.verbose&&i.push(oS(ha.Options_0_and_1_cannot_be_combined,"clean","verbose")),o.clean&&o.watch&&i.push(oS(ha.Options_0_and_1_cannot_be_combined,"clean","watch")),o.watch&&o.dry&&i.push(oS(ha.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:o,watchOptions:n,projects:r,errors:i}}function wL(e,...t){return st(oS(e,...t).messageText,it)}function NL(e,t,n,r,i,o){const a=PL(e,e=>n.readFile(e));if(!it(a))return void n.onUnRecoverableConfigFileDiagnostic(a);const s=pO(e,a),c=n.getCurrentDirectory();return s.path=Xo(e,c,Xt(n.useCaseSensitiveFileNames)),s.resolvedPath=s.path,s.originalFileName=s.fileName,uj(s,n,$o(Lo(e),c),t,$o(e,c),void 0,o,r,i)}function DL(e,t){const n=PL(e,t);return it(n)?EL(e,n):{config:{},error:n}}function EL(e,t){const n=pO(e,t);return{config:HL(n,n.parseDiagnostics,void 0),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function FL(e,t){const n=PL(e,t);return it(n)?pO(e,n):{fileName:e,parseDiagnostics:[n]}}function PL(e,t){let n;try{n=t(e)}catch(t){return oS(ha.Cannot_read_file_0_Colon_1,e,t.message)}return void 0===n?oS(ha.Cannot_read_file_0,e):n}function AL(e){return qe(e,fL)}var IL,OL={optionDeclarations:oL,unknownOptionDiagnostic:ha.Unknown_type_acquisition_option_0,unknownDidYouMeanDiagnostic:ha.Unknown_type_acquisition_option_0_Did_you_mean_1};function LL(){return IL||(IL=aL(BO))}var jL,ML,RL,BL={getOptionsNameMap:LL,optionDeclarations:BO,unknownOptionDiagnostic:ha.Unknown_watch_option_0,unknownDidYouMeanDiagnostic:ha.Unknown_watch_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:ha.Watch_option_0_requires_a_value_of_type_1};function JL(){return jL||(jL=AL(VO))}function zL(){return ML||(ML=AL(BO))}function qL(){return RL||(RL=AL(oL))}var UL,VL={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:ha.File_Management,disallowNullOrUndefined:!0},WL={name:"compilerOptions",type:"object",elementOptions:JL(),extraKeyDiagnostics:vL},$L={name:"watchOptions",type:"object",elementOptions:zL(),extraKeyDiagnostics:BL},KL={name:"typeAcquisition",type:"object",elementOptions:qL(),extraKeyDiagnostics:OL};function HL(e,t,n){var r;const i=null==(r=e.statements[0])?void 0:r.expression;if(i&&211!==i.kind){if(t.push(Kp(e,i,ha.The_root_value_of_a_0_file_must_be_an_object,"jsconfig.json"===jo(e.fileName)?"jsconfig.json":"tsconfig.json")),yE(i)){const r=T(i.elements,vE);if(r)return XL(e,r,t,!0,n)}return{}}return XL(e,i,t,!0,n)}function GL(e,t){var n;return XL(e,null==(n=e.statements[0])?void 0:n.expression,t,!0,void 0)}function XL(e,t,n,r,i){return t?o(t,null==i?void 0:i.rootOptions):r?{}:void 0;function o(t,s){switch(t.kind){case 112:return!0;case 97:return!1;case 106:return null;case 11:return a(t)||n.push(Kp(e,t,ha.String_literal_with_double_quotes_expected)),t.text;case 9:return Number(t.text);case 225:if(41!==t.operator||9!==t.operand.kind)break;return-Number(t.operand.text);case 211:return function(t,s){var c;const l=r?{}:void 0;for(const _ of t.properties){if(304!==_.kind){n.push(Kp(e,_,ha.Property_assignment_expected));continue}_.questionToken&&n.push(Kp(e,_.questionToken,ha.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),a(_.name)||n.push(Kp(e,_.name,ha.String_literal_with_double_quotes_expected));const t=zp(_.name)?void 0:Up(_.name),u=t&&Sc(t),d=u?null==(c=null==s?void 0:s.elementOptions)?void 0:c.get(u):void 0,p=o(_.initializer,d);void 0!==u&&(r&&(l[u]=p),null==i||i.onPropertySet(u,p,_,s,d))}return l}(t,s);case 210:return function(e,t){if(r)return P(e.map(e=>o(e,t)),e=>void 0!==e);e.forEach(e=>o(e,t))}(t.elements,s&&s.element)}s?n.push(Kp(e,t,ha.Compiler_option_0_requires_a_value_of_type_1,s.name,QL(s))):n.push(Kp(e,t,ha.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}function a(t){return QN(t)&&Gm(t,e)}}function QL(e){return"listOrElement"===e.type?`${QL(e.element)} or Array`:"list"===e.type?"Array":it(e.type)?e.type:"string"}function YL(e,t){if(e){if(pj(t))return!e.disallowNullOrUndefined;if("list"===e.type)return nt(t);if("listOrElement"===e.type)return nt(t)||YL(e.element,t);return typeof t===(it(e.type)?e.type:"string")}return!1}function ZL(e,t,n){var r,i,o;const a=Xt(n.useCaseSensitiveFileNames),s=O(P(e.fileNames,(null==(i=null==(r=e.options.configFile)?void 0:r.configFileSpecs)?void 0:i.validatedIncludeSpecs)?function(e,t,n,r){if(!t)return _t;const i=kk(e,n,t,r.useCaseSensitiveFileNames,r.getCurrentDirectory()),o=i.excludePattern&&Tk(i.excludePattern,r.useCaseSensitiveFileNames),a=i.includeFilePattern&&Tk(i.includeFilePattern,r.useCaseSensitiveFileNames);if(a)return o?e=>!(a.test(e)&&!o.test(e)):e=>!a.test(e);if(o)return e=>o.test(e);return _t}(t,e.options.configFile.configFileSpecs.validatedIncludeSpecs,e.options.configFile.configFileSpecs.validatedExcludeSpecs,n):_t),e=>da($o(t,n.getCurrentDirectory()),$o(e,n.getCurrentDirectory()),a)),c={configFilePath:$o(t,n.getCurrentDirectory()),useCaseSensitiveFileNames:n.useCaseSensitiveFileNames},l=oj(e.options,c),_=e.watchOptions&&aj(e.watchOptions,LL());const u={compilerOptions:{...tj(l),showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0},watchOptions:_&&tj(_),references:O(e.projectReferences,e=>({...e,path:e.originalPath?e.originalPath:"",originalPath:void 0})),files:m(s)?s:void 0,...(null==(o=e.options.configFile)?void 0:o.configFileSpecs)?{include:nj(e.options.configFile.configFileSpecs.validatedIncludeSpecs),exclude:e.options.configFile.configFileSpecs.validatedExcludeSpecs}:{},compileOnSave:!!e.compileOnSave||void 0},d=new Set(l.keys()),p={};for(const t in TS)if(!d.has(t)&&ej(t,d)){TS[t].computeValue(e.options)!==TS[t].computeValue({})&&(p[t]=TS[t].computeValue(e.options))}return Je(u.compilerOptions,tj(oj(p,c))),u}function ej(e,t){const n=new Set;return function e(r){var i;if(Dx(n,r))return X(null==(i=TS[r])?void 0:i.dependencies,n=>t.has(n)||e(n));return!1}(e)}function tj(e){return Object.fromEntries(e)}function nj(e){if(m(e)){if(1!==m(e))return e;if(e[0]!==mj)return e}}function rj(e){switch(e.type){case"string":case"number":case"boolean":case"object":return;case"list":case"listOrElement":return rj(e.element);default:return e.type}}function ij(e,t){return _d(t,(t,n)=>{if(t===e)return n})}function oj(e,t){return aj(e,sL(),t)}function aj(e,{optionsNameMap:t},n){const r=new Map,i=n&&Xt(n.useCaseSensitiveFileNames);for(const o in e)if(Ie(e,o)){if(t.has(o)&&(t.get(o).category===ha.Command_line_Options||t.get(o).category===ha.Output_Formatting))continue;const a=e[o],s=t.get(o.toLowerCase());if(s){gn.assert("listOrElement"!==s.type);const e=rj(s);e?"list"===s.type?r.set(o,a.map(t=>ij(t,e))):r.set(o,ij(a,e)):n&&s.isFilePath?r.set(o,da(n.configFilePath,$o(a,Lo(n.configFilePath)),i)):n&&"list"===s.type&&s.element.isFilePath?r.set(o,a.map(e=>da(n.configFilePath,$o(e,Lo(n.configFilePath)),i))):r.set(o,a)}}return r}function sj(e,t){const n=" ",r=[],i=Object.keys(e).filter(e=>"init"!==e&&"help"!==e&&"watch"!==e);if(r.push("{"),r.push(`${n}// ${Yx(ha.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)}`),r.push(`${n}"compilerOptions": {`),a(ha.File_Layout),s("rootDir","./src","optional"),s("outDir","./dist","optional"),o(),a(ha.Environment_Settings),a(ha.See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule),s("module",199),s("target",99),s("types",[]),e.lib&&s("lib",e.lib),a(ha.For_nodejs_Colon),r.push(`${n}${n}// "lib": ["esnext"],`),r.push(`${n}${n}// "types": ["node"],`),a(ha.and_npm_install_D_types_Slashnode),o(),a(ha.Other_Outputs),s("sourceMap",!0),s("declaration",!0),s("declarationMap",!0),o(),a(ha.Stricter_Typechecking_Options),s("noUncheckedIndexedAccess",!0),s("exactOptionalPropertyTypes",!0),o(),a(ha.Style_Options),s("noImplicitReturns",!0,"optional"),s("noImplicitOverride",!0,"optional"),s("noUnusedLocals",!0,"optional"),s("noUnusedParameters",!0,"optional"),s("noFallthroughCasesInSwitch",!0,"optional"),s("noPropertyAccessFromIndexSignature",!0,"optional"),o(),a(ha.Recommended_Options),s("strict",!0),s("jsx",4),s("verbatimModuleSyntax",!0),s("isolatedModules",!0),s("noUncheckedSideEffectImports",!0),s("moduleDetection",3),s("skipLibCheck",!0),i.length>0)for(o();i.length>0;)s(i[0],e[i[0]]);function o(){r.push("")}function a(e){r.push(`${n}${n}// ${Yx(e)}`)}function s(t,o,a="never"){const s=i.indexOf(t);let l;s>=0&&i.splice(s,1),l="always"===a||"never"!==a&&!Ie(e,t);const _=e[t]??o;l?r.push(`${n}${n}// "${t}": ${c(t,_)},`):r.push(`${n}${n}"${t}": ${c(t,_)},`)}function c(e,t){const n=VO.filter(t=>t.name===e)[0];n||gn.fail(`No option named ${e}?`);const r=n.type instanceof Map?n.type:void 0;if(nt(t)){const e="element"in n&&n.element.type instanceof Map?n.element.type:void 0;return`[${t.map(t=>l(t,e)).join(", ")}]`}return l(t,r)}function l(e,t){return t&&(e=ij(e,t)??gn.fail(`No matching value of ${e}`)),JSON.stringify(e)}return r.push(`${n}}`),r.push("}"),r.push(""),r.join(t)}function cj(e,t){const n={},r=sL().optionsNameMap;for(const i in e)Ie(e,i)&&(n[i]=lj(r.get(i.toLowerCase()),e[i],t));return n.configFilePath&&(n.configFilePath=t(n.configFilePath)),n}function lj(e,t,n){if(e&&!pj(t)){if("list"===e.type){const r=t;if(e.element.isFilePath&&r.length)return r.map(n)}else if(e.isFilePath)return n(t);gn.assert("listOrElement"!==e.type)}return t}function _j(e,t,n,r,i,o,a,s,c){return gj(e,void 0,t,n,r,c,i,o,a,s)}function uj(e,t,n,r,i,o,a,s,c){var l,_;null==(l=Yn)||l.push(Yn.Phase.Parse,"parseJsonSourceFileConfigFileContent",{path:e.fileName});const u=gj(void 0,e,t,n,r,c,i,o,a,s);return null==(_=Yn)||_.pop(),u}function dj(e,t){t&&Object.defineProperty(e,"configFile",{enumerable:!1,writable:!1,value:t})}function pj(e){return null==e}function fj(e,t){return Lo($o(e,t))}var mj="**/*";function gj(e,t,n,r,i={},o,a,s=[],c=[],l){gn.assert(void 0===e&&void 0!==t||void 0!==e&&void 0===t);const _=[],u=Ej(e,t,n,r,a,s,_,l),{raw:d}=u,p=yj(He(i,u.options||{}),YO,r),f=hj(o&&u.watchOptions?He(o,u.watchOptions):u.watchOptions||o,r);p.configFilePath=a&&zo(a);const m=Ko(a?fj(a,r):r),g=function(){const e=v("references",e=>"object"==typeof e,"object"),n=h(y("files"));if(n){const r="no-prop"===e||nt(e)&&0===e.length,i=Ie(d,"extends");if(0===n.length&&r&&!i)if(t){const e=a||"tsconfig.json",n=ha.The_files_list_in_config_file_0_is_empty,r=em(t,"files",e=>e.initializer),i=Bj(t,r,n,e);_.push(i)}else b(ha.The_files_list_in_config_file_0_is_empty,a||"tsconfig.json")}let r=h(y("include"));const i=y("exclude");let o,s,c,l,u=!1,f=h(i);if("no-prop"===i){const e=p.outDir,t=p.declarationDir;(e||t)&&(f=P([e,t],e=>!!e))}void 0===n&&void 0===r&&(r=[mj],u=!0);r&&(o=Yj(r,_,!0,t,"include"),c=Sj(o,m)||o);f&&(s=Yj(f,_,!1,t,"exclude"),l=Sj(s,m)||s);const g=P(n,it),x=Sj(g,m)||g;return{filesSpecs:n,includeSpecs:r,excludeSpecs:f,validatedFilesSpec:x,validatedIncludeSpecs:c,validatedExcludeSpecs:l,validatedFilesSpecBeforeSubstitution:g,validatedIncludeSpecsBeforeSubstitution:o,validatedExcludeSpecsBeforeSubstitution:s,isDefaultIncludeSpec:u}}();return t&&(t.configFileSpecs=g),dj(p,t),{options:p,watchOptions:f,fileNames:function(e){const t=Kj(g,e,p,n,c);Cj(t,Nj(d),s)&&_.push(Tj(g,a));return t}(m),projectReferences:function(e){let t;const n=v("references",e=>"object"==typeof e,"object");if(nt(n))for(const r of n)"string"!=typeof r.path?b(ha.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(t||(t=[])).push({path:$o(r.path,e),originalPath:r.path,prepend:r.prepend,circular:r.circular});return t}(m),typeAcquisition:u.typeAcquisition||jj(),raw:d,errors:_,wildcardDirectories:eM(g,m,n.useCaseSensitiveFileNames),compileOnSave:!!d.compileOnSave};function h(e){return nt(e)?e:void 0}function y(e){return v(e,it,"string")}function v(e,n,r){if(Ie(d,e)&&!pj(d[e])){if(nt(d[e])){const i=d[e];return t||k(i,n)||_.push(oS(ha.Compiler_option_0_requires_a_value_of_type_1,e,r)),i}return b(ha.Compiler_option_0_requires_a_value_of_type_1,e,"Array"),"not-array"}return"no-prop"}function b(e,...n){t||_.push(oS(e,...n))}}function hj(e,t){return yj(e,ZO,t)}function yj(e,t,n){if(!e)return e;let r;for(const r of t)if(void 0!==e[r.name]){const t=e[r.name];switch(r.type){case"string":gn.assert(r.isFilePath),bj(t)&&i(r,xj(t,n));break;case"list":gn.assert(r.element.isFilePath);const e=Sj(t,n);e&&i(r,e);break;case"object":gn.assert("paths"===r.name);const o=kj(t,n);o&&i(r,o);break;default:gn.fail("option type not supported")}}return r||e;function i(t,n){(r??(r=Je({},e)))[t.name]=n}}var vj="${configDir}";function bj(e){return it(e)&&en(e,vj,!0)}function xj(e,t){return $o(e.replace(vj,"./"),t)}function Sj(e,t){if(!e)return e;let n;return e.forEach((r,i)=>{bj(r)&&((n??(n=e.slice()))[i]=xj(r,t))}),n}function kj(e,t){let n;return Le(e).forEach(r=>{if(!nt(e[r]))return;const i=Sj(e[r],t);i&&((n??(n=Je({},e)))[r]=i)}),n}function Tj({includeSpecs:e,excludeSpecs:t},n){return oS(ha.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,n||"tsconfig.json",JSON.stringify(e||[]),JSON.stringify(t||[]))}function Cj(e,t,n){return 0===e.length&&t&&(!n||0===n.length)}function wj(e){return!e.fileNames.length&&Ie(e.raw,"references")}function Nj(e){return!Ie(e,"files")&&!Ie(e,"references")}function Dj(e,t,n,r,i){const o=r.length;return Cj(e,i)?r.push(Tj(n,t)):A(r,e=>!function(e){return e.code===ha.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}(e)),o!==r.length}function Ej(e,t,n,r,i,o,a,s){var c;const l=$o(i||"",r=zo(r));if(o.includes(l))return a.push(oS(ha.Circularity_detected_while_resolving_configuration_Colon_0,[...o,l].join(" -> "))),{raw:e||GL(t,a)};const _=e?function(e,t,n,r,i){Ie(e,"excludes")&&i.push(oS(ha.Unknown_option_excludes_Did_you_mean_exclude));const o=Lj(e.compilerOptions,n,i,r),a=Mj(e.typeAcquisition,n,i,r),s=function(e,t,n){return Rj(zL(),e,t,void 0,BL,n)}(e.watchOptions,n,i);e.compileOnSave=function(e,t,n){if(!Ie(e,IO.name))return!1;const r=Jj(IO,e.compileOnSave,t,n);return"boolean"==typeof r&&r}(e,n,i);const c=e.extends||""===e.extends?Fj(e.extends,t,n,r,i):void 0;return{raw:e,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:c}}(e,n,r,i,a):function(e,t,n,r,i){const o=Oj(r);let a,s,c,l;const _=(void 0===UL&&(UL={name:void 0,type:"object",elementOptions:AL([WL,$L,KL,VL,{name:"references",type:"list",element:{name:"references",type:"object"},category:ha.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:ha.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:ha.File_Management,defaultValueDescription:ha.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:ha.File_Management,defaultValueDescription:ha.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},IO])}),UL),u=HL(e,i,{rootOptions:_,onPropertySet:d});a||(a=jj(r));l&&u&&void 0===u.compilerOptions&&i.push(Kp(e,l[0],ha._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file,Up(l[0])));return{raw:u,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:c};function d(u,d,p,f,m){if(m&&m!==VL&&(d=Jj(m,d,n,i,p,p.initializer,e)),null==f?void 0:f.name)if(m){let e;f===WL?e=o:f===$L?e=s??(s={}):f===KL?e=a??(a=jj(r)):gn.fail("Unknown option"),e[m.name]=d}else u&&(null==f?void 0:f.extraKeyDiagnostics)&&(f.elementOptions?i.push(mL(u,f.extraKeyDiagnostics,void 0,p.name,e)):i.push(Kp(e,p.name,f.extraKeyDiagnostics.unknownOptionDiagnostic,u)));else f===_&&(m===VL?c=Fj(d,t,n,r,i,p,p.initializer,e):m||("excludes"===u&&i.push(Kp(e,p.name,ha.Unknown_option_excludes_Did_you_mean_exclude)),T(UO,e=>e.name===u)&&(l=le(l,p.name))))}}(t,n,r,i,a);if((null==(c=_.options)?void 0:c.paths)&&(_.options.pathsBasePath=r),_.extendedConfigPath){o=o.concat([l]);const e={options:{}};it(_.extendedConfigPath)?u(e,_.extendedConfigPath):_.extendedConfigPath.forEach(t=>u(e,t)),e.include&&(_.raw.include=e.include),e.exclude&&(_.raw.exclude=e.exclude),e.files&&(_.raw.files=e.files),void 0===_.raw.compileOnSave&&e.compileOnSave&&(_.raw.compileOnSave=e.compileOnSave),t&&e.extendedSourceFiles&&(t.extendedSourceFiles=Be(e.extendedSourceFiles.keys())),_.options=Je(e.options,_.options),_.watchOptions=_.watchOptions&&e.watchOptions?d(e,_.watchOptions):_.watchOptions||e.watchOptions}return _;function u(e,i){const c=function(e,t,n,r,i,o,a){const s=n.useCaseSensitiveFileNames?t:mt(t);let c,l,_;o&&(c=o.get(s))?({extendedResult:l,extendedConfig:_}=c):(l=FL(t,e=>n.readFile(e)),l.parseDiagnostics.length||(_=Ej(void 0,l,n,Lo(t),jo(t),r,i,o)),o&&o.set(s,{extendedResult:l,extendedConfig:_}));if(e&&((a.extendedSourceFiles??(a.extendedSourceFiles=new Set)).add(l.fileName),l.extendedSourceFiles))for(const e of l.extendedSourceFiles)a.extendedSourceFiles.add(e);if(l.parseDiagnostics.length)return void i.push(...l.parseDiagnostics);return _}(t,i,n,o,a,s,e);if(c&&c.options){const t=c.raw;let o;const a=a=>{_.raw[a]||t[a]&&(e[a]=O(t[a],e=>bj(e)||ko(e)?e:Uo(o||(o=ua(Lo(i),r,Xt(n.useCaseSensitiveFileNames))),e)))};a("include"),a("exclude"),a("files"),void 0!==t.compileOnSave&&(e.compileOnSave=t.compileOnSave),Je(e.options,c.options),e.watchOptions=e.watchOptions&&c.watchOptions?d(e,c.watchOptions):e.watchOptions||c.watchOptions}}function d(e,t){return e.watchOptionsCopied?Je(e.watchOptions,t):(e.watchOptionsCopied=!0,Je({},e.watchOptions,t))}}function Fj(e,t,n,r,i,o,a,s){let c;const l=r?fj(r,n):n;if(it(e))c=Pj(e,t,l,i,a,s);else if(nt(e)){c=[];for(let r=0;rBj(i,r,e,...t)))}function Uj(e,t,n,r,i,o,a){return P(O(t,(t,s)=>Jj(e.element,t,n,r,i,null==o?void 0:o.elements[s],a)),t=>!!e.listPreserveFalsyValues||!!t)}var Vj,Wj=/(?:^|\/)\*\*\/?$/,$j=/^[^*?]*(?=\/[^/]*[*?])/;function Kj(e,t,n,r,i=p){t=Ko(t);const o=Xt(r.useCaseSensitiveFileNames),a=new Map,s=new Map,c=new Map,{validatedFilesSpec:l,validatedIncludeSpecs:_,validatedExcludeSpecs:u}=e,d=Jk(n,i),f=zk(n,d);if(l)for(const e of l){const n=$o(e,t);a.set(o(n),n)}let m;if(_&&_.length>0)for(const e of r.readDirectory(t,M(f),u,_,void 0)){if(Eo(e,".json")){if(!m){const e=O(yk(_.filter(e=>qt(e,".json")),t,"files"),e=>`^${e}$`);m=e?e.map(e=>Tk(e,r.useCaseSensitiveFileNames)):p}if(-1!==w(m,t=>t.test(e))){const t=o(e);a.has(t)||c.has(t)||c.set(t,e)}continue}if(rM(e,a,s,d,o))continue;iM(e,s,d,o);const n=o(e);a.has(n)||s.has(n)||s.set(n,e)}const g=Be(a.values()),h=Be(s.values());return g.concat(h,Be(c.values()))}function Hj(e,t,n,r,i){const{validatedFilesSpec:o,validatedIncludeSpecs:a,validatedExcludeSpecs:s}=t;if(!m(a)||!m(s))return!1;n=Ko(n);const c=Xt(r);if(o)for(const t of o)if(c($o(t,n))===e)return!1;return Qj(e,s,r,i,n)}function Gj(e){const t=en(e,"**/")?0:e.indexOf("/**/");if(-1===t)return!1;return(qt(e,"/..")?e.length:e.lastIndexOf("/../"))>t}function Xj(e,t,n,r){return Qj(e,P(t,e=>!Gj(e)),n,r)}function Qj(e,t,n,r,i){const o=hk(t,Uo(Ko(r),i),"exclude"),a=o&&Tk(o,n);return!!a&&(!!a.test(e)||!Do(e)&&a.test(Yo(e)))}function Yj(e,t,n,r,i){return e.filter(e=>{if(!it(e))return!1;const o=Zj(e,n);return void 0!==o&&t.push(function(e,t){const n=Zf(r,i,t);return Bj(r,n,e,t)}(...o)),void 0===o})}function Zj(e,t){return gn.assert("string"==typeof e),t&&Wj.test(e)?[ha.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:Gj(e)?[ha.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:void 0}function eM({validatedIncludeSpecs:e,validatedExcludeSpecs:t},n,r){const i=hk(t,n,"exclude"),o=i&&new RegExp(i,r?"":"i"),a={},s=new Map;if(void 0!==e){const t=[];for(const i of e){const e=Ko(Uo(n,i));if(o&&o.test(e))continue;const c=nM(e,r);if(c){const{key:e,path:n,flags:r}=c,i=s.get(e),o=void 0!==i?a[i]:void 0;(void 0===o||oFo(e,t)?t:void 0);if(!o)return!1;for(const r of o){if(Eo(e,r)&&(".ts"!==r||!Eo(e,".d.ts")))return!1;const o=i(eT(e,r));if(t.has(o)||n.has(o)){if(".d.ts"===r&&(Eo(e,".js")||Eo(e,".jsx")))continue;return!0}}return!1}function iM(e,t,n,r){const i=g(n,t=>Fo(e,t)?t:void 0);if(i)for(let n=i.length-1;n>=0;n--){const o=i[n];if(Eo(e,o))return;const a=r(eT(e,o));t.delete(a)}}function oM(e){const t={};for(const n in e)if(Ie(e,n)){const r=xL(n);void 0!==r&&(t[n]=aM(e[n],r))}return t}function aM(e,t){if(void 0===e)return e;switch(t.type){case"object":case"string":return"";case"number":return"number"==typeof e?e:"";case"boolean":return"boolean"==typeof e?e:"";case"listOrElement":if(!nt(e))return aM(e,t.element);case"list":const n=t.element;return nt(e)?U(e,e=>aM(e,n)):"";default:return _d(t.type,(t,n)=>{if(t===e)return n})}}function sM(e,t,...n){e.trace(iS(t,...n))}function cM(e,t){return!!e.traceResolution&&void 0!==t.trace}function lM(e,t,n){let r;if(t&&e){const i=e.contents.packageJsonContent;"string"==typeof i.name&&"string"==typeof i.version&&(r={name:i.name,subModuleName:t.path.slice(e.packageDirectory.length+ho.length),version:i.version,peerDependencies:CR(e,n)})}return t&&{path:t.path,extension:t.ext,packageId:r,resolvedUsingTsExtension:t.resolvedUsingTsExtension}}function _M(e){return lM(void 0,e,void 0)}function uM(e){if(e)return gn.assert(void 0===e.packageId),{path:e.path,ext:e.extension,resolvedUsingTsExtension:e.resolvedUsingTsExtension}}function dM(e){const t=[];return 1&e&&t.push("TypeScript"),2&e&&t.push("JavaScript"),4&e&&t.push("Declaration"),8&e&&t.push("JSON"),t.join(", ")}function pM(e){if(e)return gn.assert(oT(e.extension)),{fileName:e.path,packageId:e.packageId}}function fM(e,t,n,r,i,o,a,s,c){if(!a.resultFromCache&&!a.compilerOptions.preserveSymlinks&&t&&n&&!t.originalPath&&!As(e)){const{resolvedFileName:e,originalPath:n}=wM(t.path,a.host,a.traceEnabled);n&&(t={...t,path:e,originalPath:n})}return mM(t,n,r,i,o,a.resultFromCache,s,c)}function mM(e,t,n,r,i,o,a,s){return o?(null==a?void 0:a.isReadonly)?{...o,failedLookupLocations:yM(o.failedLookupLocations,n),affectingLocations:yM(o.affectingLocations,r),resolutionDiagnostics:yM(o.resolutionDiagnostics,i)}:(o.failedLookupLocations=hM(o.failedLookupLocations,n),o.affectingLocations=hM(o.affectingLocations,r),o.resolutionDiagnostics=hM(o.resolutionDiagnostics,i),o):{resolvedModule:e&&{resolvedFileName:e.path,originalPath:!0===e.originalPath?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:t,packageId:e.packageId,resolvedUsingTsExtension:!!e.resolvedUsingTsExtension},failedLookupLocations:gM(n),affectingLocations:gM(r),resolutionDiagnostics:gM(i),alternateResult:s}}function gM(e){return e.length?e:void 0}function hM(e,t){return(null==t?void 0:t.length)?(null==e?void 0:e.length)?(e.push(...t),e):t:e}function yM(e,t){return(null==e?void 0:e.length)?t.length?[...e,...t]:e.slice():gM(t)}function vM(e,t,n,r){if(!Ie(e,t))return void(r.traceEnabled&&sM(r.host,ha.package_json_does_not_have_a_0_field,t));const i=e[t];if(typeof i===n&&null!==i)return i;r.traceEnabled&&sM(r.host,ha.Expected_type_of_0_field_in_package_json_to_be_1_got_2,t,n,null===i?"null":typeof i)}function bM(e,t,n,r){const i=vM(e,t,"string",r);if(void 0===i)return;if(!i)return void(r.traceEnabled&&sM(r.host,ha.package_json_had_a_falsy_0_field,t));const o=Ko(Uo(n,i));return r.traceEnabled&&sM(r.host,ha.package_json_has_0_field_1_that_references_2,t,i,o),o}function xM(e,t){const n=function(e,t){const n=vM(e,"typesVersions","object",t);if(void 0!==n)return t.traceEnabled&&sM(t.host,ha.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),n}(e,t);if(void 0===n)return;if(t.traceEnabled)for(const e in n)Ie(n,e)&&!Nn.tryParse(e)&&sM(t.host,ha.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,e);const r=SM(n);if(!r)return void(t.traceEnabled&&sM(t.host,ha.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,c));const{version:i,paths:o}=r;if("object"==typeof o)return r;t.traceEnabled&&sM(t.host,ha.Expected_type_of_0_field_in_package_json_to_be_1_got_2,`typesVersions['${i}']`,"object",typeof o)}function SM(e){Vj||(Vj=new Cn(u));for(const t in e){if(!Ie(e,t))continue;const n=Nn.tryParse(t);if(void 0!==n&&n.test(Vj))return{version:t,paths:e[t]}}}function kM(e,t){if(e.typeRoots)return e.typeRoots;let n;return e.configFilePath?n=Lo(e.configFilePath):t.getCurrentDirectory&&(n=t.getCurrentDirectory()),void 0!==n?function(e){let t;return fa(Ko(e),e=>{const n=Uo(e,TM);(t??(t=[])).push(n)}),t}(n):void 0}var TM=Uo("node_modules","@types");function CM(e,t,n){return 0===aa(e,t,!("function"==typeof n.useCaseSensitiveFileNames?n.useCaseSensitiveFileNames():n.useCaseSensitiveFileNames))}function wM(e,t,n){const r=aR(e,t,n),i=CM(e,r,t);return{resolvedFileName:i?e:r,originalPath:i?void 0:e}}function NM(e,t,n){return Uo(e,qt(e,"/node_modules/@types")||qt(e,"/node_modules/@types/")?UR(t,n):t)}function DM(e,t,n,r,i,o,a){gn.assert("string"==typeof e,"Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");const s=cM(n,r);i&&(n=i.commandLine.options);const c=t?Lo(t):void 0;let l=c?null==o?void 0:o.getFromDirectoryCache(e,a,c,i):void 0;if(l||!c||As(e)||(l=null==o?void 0:o.getFromNonRelativeNameCache(e,a,c,i)),l)return s&&(sM(r,ha.Resolving_type_reference_directive_0_containing_file_1,e,t),i&&sM(r,ha.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName),sM(r,ha.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1,e,c),S(l)),l;const _=kM(n,r);s&&(void 0===t?void 0===_?sM(r,ha.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,e):sM(r,ha.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,e,_):void 0===_?sM(r,ha.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,e,t):sM(r,ha.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,e,t,_),i&&sM(r,ha.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName));const u=[],d=[];let p=EM(n);void 0!==a&&(p|=30);const f=DS(n);99===a&&3<=f&&f<=99&&(p|=32);const m=8&p?FM(n,a):[],g=[],h={compilerOptions:n,host:r,traceEnabled:s,failedLookupLocations:u,affectingLocations:d,packageJsonInfoCache:o,features:p,conditions:m,requestContainingDirectory:c,reportDiagnostic:e=>{g.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let v,b=function(){if(_&&_.length)return s&&sM(r,ha.Resolving_with_primary_search_path_0,_.join(", ")),y(_,t=>{const i=NM(t,e,h),o=jb(t,r);if(!o&&s&&sM(r,ha.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n.typeRoots){const e=pR(4,i,!o,h);if(e){const t=_R(e.path);return pM(lM(t?wR(t,!1,h):void 0,e,h))}}return pM(vR(4,i,!o,h))});s&&sM(r,ha.Root_directory_cannot_be_determined_skipping_primary_search_paths)}(),x=!0;if(b||(b=function(){const i=t&&Lo(t);if(void 0!==i){let o;if(n.typeRoots&&qt(t,RV))s&&sM(r,ha.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);else if(s&&sM(r,ha.Looking_up_in_node_modules_folder_initial_location_0,i),As(e)){const{path:t}=oR(i,e);o=sR(4,t,!1,h,!0)}else{const t=jR(4,e,i,h,void 0,void 0);o=t&&t.value}return pM(o)}s&&sM(r,ha.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}(),x=!1),b){const{fileName:e,packageId:t}=b;let i,o=e;n.preserveSymlinks||({resolvedFileName:o,originalPath:i}=wM(e,r,s)),v={primary:x,resolvedFileName:o,originalPath:i,packageId:t,isExternalLibraryImport:lR(e)}}return l={resolvedTypeReferenceDirective:v,failedLookupLocations:gM(u),affectingLocations:gM(d),resolutionDiagnostics:gM(g)},c&&o&&!o.isReadonly&&(o.getOrCreateCacheForDirectory(c,i).set(e,a,l),As(e)||o.getOrCreateCacheForNonRelativeName(e,a,i).set(c,l)),s&&S(l),l;function S(t){var n;(null==(n=t.resolvedTypeReferenceDirective)?void 0:n.resolvedFileName)?t.resolvedTypeReferenceDirective.packageId?sM(r,ha.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,e,t.resolvedTypeReferenceDirective.resolvedFileName,Sd(t.resolvedTypeReferenceDirective.packageId),t.resolvedTypeReferenceDirective.primary):sM(r,ha.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,e,t.resolvedTypeReferenceDirective.resolvedFileName,t.resolvedTypeReferenceDirective.primary):sM(r,ha.Type_reference_directive_0_was_not_resolved,e)}}function EM(e){let t=0;switch(DS(e)){case 3:case 99:case 100:t=30}return e.resolvePackageJsonExports?t|=8:!1===e.resolvePackageJsonExports&&(t&=-9),e.resolvePackageJsonImports?t|=2:!1===e.resolvePackageJsonImports&&(t&=-3),t}function FM(e,t){const n=DS(e);if(void 0===t)if(100===n)t=99;else if(2===n)return[];const r=99===t?["import"]:["require"];return e.noDtsResolution||r.push("types"),100!==n&&r.push("node"),Y(r,e.customConditions)}function PM(e,t,n,r,i){const o=SR(null==i?void 0:i.getPackageJsonInfoCache(),r,n);return RR(r,t,t=>{if("node_modules"!==jo(t)){const n=Uo(t,"node_modules");return wR(Uo(n,e),!1,o)}})}function AM(e,t){if(e.types)return e.types;const n=[];if(t.directoryExists&&t.getDirectories){const r=kM(e,t);if(r)for(const e of r)if(t.directoryExists(e))for(const r of t.getDirectories(e)){const i=Ko(r),o=Uo(e,i,"package.json");if(!(t.fileExists(o)&&null===Ob(o,t).typings)){const e=jo(i);46!==e.charCodeAt(0)&&n.push(e)}}}return n}function IM(e){return!!(null==e?void 0:e.contents)}function OM(e){return!!e&&!e.contents}function LM(e){var t;if(null===e||"object"!=typeof e)return""+e;if(nt(e))return`[${null==(t=e.map(e=>LM(e)))?void 0:t.join(",")}]`;let n="{";for(const t in e)Ie(e,t)&&(n+=`${t}: ${LM(e[t])}`);return n+"}"}function jM(e,t){return t.map(t=>LM(ek(e,t))).join("|")+`|${e.pathsBasePath}`}function MM(e,t){const n=new Map,r=new Map;let i=new Map;return e&&n.set(e,i),{getMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!1):i},getOrCreateMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!0):i},update:function(t){e!==t&&(e?i=o(t,!0):n.set(t,i),e=t)},clear:function(){const o=e&&t.get(e);i.clear(),n.clear(),t.clear(),r.clear(),e&&(o&&t.set(e,o),n.set(e,i))},getOwnMap:()=>i};function o(t,o){let s=n.get(t);if(s)return s;const c=a(t);if(s=r.get(c),!s){if(e){const t=a(e);t===c?s=i:r.has(t)||r.set(t,i)}o&&(s??(s=new Map)),s&&r.set(c,s)}return s&&n.set(t,s),s}function a(e){let n=t.get(e);return n||t.set(e,n=jM(e,HO)),n}}function RM(e,t,n,r){const i=e.getOrCreateMapOfCacheRedirects(t);let o=i.get(n);return o||(o=r(),i.set(n,o)),o}function BM(e,t){return void 0===t?e:`${t}|${e}`}function JM(){const e=new Map,t=new Map,n={get:(t,n)=>e.get(r(t,n)),set:(t,i,o)=>(e.set(r(t,i),o),n),delete:(t,i)=>(e.delete(r(t,i)),n),has:(t,n)=>e.has(r(t,n)),forEach:n=>e.forEach((e,r)=>{const[i,o]=t.get(r);return n(e,i,o)}),size:()=>e.size};return n;function r(e,n){const r=BM(e,n);return t.set(r,[e,n]),r}}function zM(e){return e.resolvedModule&&(e.resolvedModule.originalPath||e.resolvedModule.resolvedFileName)}function qM(e){return e.resolvedTypeReferenceDirective&&(e.resolvedTypeReferenceDirective.originalPath||e.resolvedTypeReferenceDirective.resolvedFileName)}function UM(e,t,n,r,i){const o=MM(n,i);return{getFromNonRelativeNameCache:function(e,t,n,r){var i,a;return gn.assert(!As(e)),null==(a=null==(i=o.getMapOfCacheRedirects(r))?void 0:i.get(BM(e,t)))?void 0:a.get(n)},getOrCreateCacheForNonRelativeName:function(e,t,n){return gn.assert(!As(e)),RM(o,n,BM(e,t),a)},clear:function(){o.clear()},update:function(e){o.update(e)}};function a(){const n=new Map;return{get:function(r){return n.get(Xo(r,e,t))},set:function(i,o){const a=Xo(i,e,t);if(n.has(a))return;n.set(a,o);const s=r(o),c=s&&function(n,r){const i=Xo(Lo(r),e,t);let o=0;const a=Math.min(n.length,i.length);for(;oJM())},clear:function(){i.clear()},update:function(e){i.update(e)},directoryToModuleNameMap:i}}(e,t,n,o),s=UM(e,t,n,i,o);return r??(r=function(e,t){let n;return{getPackageJsonInfo:function(r){return null==n?void 0:n.get(Xo(r,e,t))},setPackageJsonInfo:function(r,i){(n||(n=new Map)).set(Xo(r,e,t),i)},clear:function(){n=void 0},getInternalMap:function(){return n}}}(e,t)),{...r,...a,...s,clear:function(){c(),r.clear()},update:function(e){a.update(e),s.update(e)},getPackageJsonInfoCache:()=>r,clearAllExceptPackageJsonInfoCache:c,optionsToRedirectsKey:o};function c(){a.clear(),s.clear()}}function WM(e,t,n,r,i){const o=VM(e,t,n,r,zM,i);return o.getOrCreateCacheForModuleName=(e,t,n)=>o.getOrCreateCacheForNonRelativeName(e,t,n),o}function $M(e,t,n,r,i){return VM(e,t,n,r,qM,i)}function KM(e){return{moduleResolution:2,traceResolution:e.traceResolution}}function HM(e,t,n,r,i){return XM(e,t,KM(n),r,i)}function GM(e,t,n,r){const i=Lo(t);return n.getFromDirectoryCache(e,r,i,void 0)}function XM(e,t,n,r,i,o,a){const s=cM(n,r);o&&(n=o.commandLine.options),s&&(sM(r,ha.Resolving_module_0_from_1,e,t),o&&sM(r,ha.Using_compiler_options_of_project_reference_redirect_0,o.sourceFile.fileName));const c=Lo(t);let l=null==i?void 0:i.getFromDirectoryCache(e,a,c,o);if(l)s&&sM(r,ha.Resolution_for_module_0_was_found_in_cache_from_location_1,e,c);else{let _=n.moduleResolution;switch(void 0===_?(_=DS(n),s&&sM(r,ha.Module_resolution_kind_is_not_specified_using_0,fi[_])):s&&sM(r,ha.Explicitly_specified_module_resolution_kind_Colon_0,fi[_]),_){case 3:case 99:l=function(e,t,n,r,i,o,a){return eR(30,e,t,n,r,i,o,a)}(e,t,n,r,i,o,a);break;case 2:l=nR(e,t,n,r,i,o,a?FM(n,a):void 0);break;case 1:l=GR(e,t,n,r,i,o);break;case 100:l=tR(e,t,n,r,i,o,a?FM(n,a):void 0);break;default:return gn.fail(`Unexpected moduleResolution: ${_}`)}i&&!i.isReadonly&&(i.getOrCreateCacheForDirectory(c,o).set(e,a,l),As(e)||i.getOrCreateCacheForNonRelativeName(e,a,o).set(c,l))}return s&&(l.resolvedModule?l.resolvedModule.packageId?sM(r,ha.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,e,l.resolvedModule.resolvedFileName,Sd(l.resolvedModule.packageId)):sM(r,ha.Module_name_0_was_successfully_resolved_to_1,e,l.resolvedModule.resolvedFileName):sM(r,ha.Module_name_0_was_not_resolved,e)),l}function QM(e,t,n,r,i){const o=function(e,t,n,r){const{baseUrl:i,paths:o}=r.compilerOptions;if(o&&!wo(t)){r.traceEnabled&&(i&&sM(r.host,ha.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,i,t),sM(r.host,ha.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,t));return zR(e,t,tv(r.compilerOptions,r.host),o,rT(o),n,!1,r)}}(e,t,r,i);return o?o.value:As(t)?function(e,t,n,r,i){if(!i.compilerOptions.rootDirs)return;i.traceEnabled&&sM(i.host,ha.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,t);const o=Ko(Uo(n,t));let a,s;for(const e of i.compilerOptions.rootDirs){let t=Ko(e);qt(t,ho)||(t+=ho);const n=en(o,t)&&(void 0===s||s.length(e[e.None=0]="None",e[e.Imports=2]="Imports",e[e.SelfName=4]="SelfName",e[e.Exports=8]="Exports",e[e.ExportsPatternTrailers=16]="ExportsPatternTrailers",e[e.AllFeatures=30]="AllFeatures",e[e.Node16Default=30]="Node16Default",e[e.NodeNextDefault=30]="NodeNextDefault",e[e.BundlerDefault=30]="BundlerDefault",e[e.EsmMode=32]="EsmMode",e))(ZM||{});function eR(e,t,n,r,i,o,a,s,c){const l=Lo(n),_=99===s?32:0;let u=r.noDtsResolution?3:7;return LS(r)&&(u|=8),iR(e|_,t,l,r,i,o,u,!1,a,c)}function tR(e,t,n,r,i,o,a){const s=Lo(t);let c=n.noDtsResolution?3:7;return LS(n)&&(c|=8),iR(EM(n),e,s,n,r,i,c,!1,o,a)}function nR(e,t,n,r,i,o,a,s){let c;return s?c=8:n.noDtsResolution?(c=3,LS(n)&&(c|=8)):c=LS(n)?15:7,iR(a?30:0,e,Lo(t),n,r,i,c,!!s,o,a)}function rR(e,t,n){return iR(30,e,Lo(t),{moduleResolution:99},n,void 0,8,!0,void 0,void 0)}function iR(e,t,n,r,i,o,a,s,c,l){var _,u,d,f,g;const h=cM(r,i),y=[],v=[],b=DS(r);l??(l=FM(r,100===b||2===b?void 0:32&e?99:1));const x=[],S={compilerOptions:r,host:i,traceEnabled:h,failedLookupLocations:y,affectingLocations:v,packageJsonInfoCache:o,features:e,conditions:l??p,requestContainingDirectory:n,reportDiagnostic:e=>{x.push(e)},isConfigLookup:s,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let T,C;if(h&&$S(b)&&sM(i,ha.Resolving_in_0_mode_with_conditions_1,32&e?"ESM":"CJS",S.conditions.map(e=>`'${e}'`).join(", ")),2===b){const e=5&a,t=-6&a;T=e&&w(e,S)||t&&w(t,S)||void 0}else T=w(a,S);if(S.resolvedPackageDirectory&&!s&&!As(t)){const t=(null==T?void 0:T.value)&&5&a&&!DR(5,T.value.resolved.extension);if((null==(_=null==T?void 0:T.value)?void 0:_.isExternalLibraryImport)&&t&&8&e&&(null==l?void 0:l.includes("import"))){eB(S,ha.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);const e=w(5&a,{...S,features:-9&S.features,reportDiagnostic:ct});(null==(u=null==e?void 0:e.value)?void 0:u.isExternalLibraryImport)&&(C=e.value.resolved.path)}else if((!(null==T?void 0:T.value)||t)&&2===b){eB(S,ha.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);const e={...S.compilerOptions,moduleResolution:100},t=w(5&a,{...S,compilerOptions:e,features:30,conditions:FM(e),reportDiagnostic:ct});(null==(d=null==t?void 0:t.value)?void 0:d.isExternalLibraryImport)&&(C=t.value.resolved.path)}}return fM(t,null==(f=null==T?void 0:T.value)?void 0:f.resolved,null==(g=null==T?void 0:T.value)?void 0:g.isExternalLibraryImport,y,v,x,S,o,C);function w(r,a){const s=QM(r,t,n,(e,t,n,r)=>sR(e,t,n,r,!0),a);if(s)return ZR({resolved:s,isExternalLibraryImport:lR(s.path)});if(As(t)){const{path:e,parts:i}=oR(n,t),o=sR(r,e,!1,a,!0);return o&&ZR({resolved:o,isExternalLibraryImport:D(i,"node_modules")})}{if(2&e&&en(t,"#")){const e=function(e,t,n,r,i,o){var a,s;if("#"===t||en(t,"#/"))return r.traceEnabled&&sM(r.host,ha.Invalid_import_specifier_0_has_no_possible_resolutions,t),ZR(void 0);const c=$o(n,null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),l=kR(c,r);if(!l)return r.traceEnabled&&sM(r.host,ha.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve,c),ZR(void 0);if(!l.contents.packageJsonContent.imports)return r.traceEnabled&&sM(r.host,ha.package_json_scope_0_has_no_imports_defined,l.packageDirectory),ZR(void 0);const _=IR(e,r,i,o,t,l.contents.packageJsonContent.imports,l,!0);if(_)return _;r.traceEnabled&&sM(r.host,ha.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1,t,l.packageDirectory);return ZR(void 0)}(r,t,n,a,o,c);if(e)return e.value&&{value:{resolved:e.value,isExternalLibraryImport:!1}}}if(4&e){const e=function(e,t,n,r,i,o){var a,s;const c=$o(n,null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),l=kR(c,r);if(!l||!l.contents.packageJsonContent.exports)return;if("string"!=typeof l.contents.packageJsonContent.name)return;const _=Bo(t),u=Bo(l.contents.packageJsonContent.name);if(!k(u,(e,t)=>_[t]===e))return;const d=_.slice(u.length),p=m(d)?`.${ho}${d.join(ho)}`:".";if(JS(r.compilerOptions)&&!lR(n))return PR(l,e,p,r,i,o);const f=5&e,g=-6&e;return PR(l,f,p,r,i,o)||PR(l,g,p,r,i,o)}(r,t,n,a,o,c);if(e)return e.value&&{value:{resolved:e.value,isExternalLibraryImport:!1}}}if(t.includes(":"))return void(h&&sM(i,ha.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1,t,dM(r)));h&&sM(i,ha.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1,t,dM(r));let s=jR(r,t,n,a,o,c);return 4&r&&(s??(s=XR(t,a))),s&&{value:s.value&&{resolved:s.value,isExternalLibraryImport:!0}}}}}function oR(e,t){const n=Uo(e,t),r=Bo(n),i=ke(r);return{path:"."===i||".."===i?Yo(Ko(n)):Ko(n),parts:r}}function aR(e,t,n){if(!t.realpath)return e;const r=Ko(t.realpath(e));return n&&sM(t,ha.Resolving_real_path_for_0_result_1,e,r),r}function sR(e,t,n,r,i){if(r.traceEnabled&&sM(r.host,ha.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1,t,dM(e)),!Po(t)){if(!n){const e=Lo(t);jb(e,r.host)||(r.traceEnabled&&sM(r.host,ha.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!0)}const o=pR(e,t,n,r);if(o){const e=i?_R(o.path):void 0;return lM(e?wR(e,!1,r):void 0,o,r)}}if(!n){jb(t,r.host)||(r.traceEnabled&&sM(r.host,ha.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n=!0)}if(!(32&r.features))return vR(e,t,n,r,i)}var cR="/node_modules/";function lR(e){return e.includes(cR)}function _R(e,t){const n=Ko(e),r=n.lastIndexOf(cR);if(-1===r)return;const i=r+cR.length;let o=uR(n,i,t);return 64===n.charCodeAt(i)&&(o=uR(n,o,t)),n.slice(0,o)}function uR(e,t,n){const r=e.indexOf(ho,t+1);return-1===r?n?e.length:t:r}function dR(e,t,n,r){return _M(pR(e,t,n,r))}function pR(e,t,n,r){const i=fR(e,t,n,r);if(i)return i;if(!(32&r.features)){const i=gR(t,e,"",n,r);if(i)return i}}function fR(e,t,n,r){if(!jo(t).includes("."))return;let i=Qk(t);i===t&&(i=t.substring(0,t.lastIndexOf(".")));const o=t.substring(i.length);return r.traceEnabled&&sM(r.host,ha.File_name_0_has_a_1_extension_stripping_it,t,o),gR(i,e,o,n,r)}function mR(e,t,n,r,i){if(1&e&&Fo(t,Rk)||4&e&&Fo(t,Mk)){const e=hR(t,r,i),o=Db(t);return void 0!==e?{path:t,ext:o,resolvedUsingTsExtension:n?!qt(n,o):void 0}:void 0}if(i.isConfigLookup&&8===e&&Eo(t,".json")){return void 0!==hR(t,r,i)?{path:t,ext:".json",resolvedUsingTsExtension:void 0}:void 0}return fR(e,t,r,i)}function gR(e,t,n,r,i){if(!r){const t=Lo(e);t&&(r=!jb(t,i.host))}switch(n){case".mjs":case".mts":case".d.mts":return 1&t&&o(".mts",".mts"===n||".d.mts"===n)||4&t&&o(".d.mts",".mts"===n||".d.mts"===n)||2&t&&o(".mjs")||void 0;case".cjs":case".cts":case".d.cts":return 1&t&&o(".cts",".cts"===n||".d.cts"===n)||4&t&&o(".d.cts",".cts"===n||".d.cts"===n)||2&t&&o(".cjs")||void 0;case".json":return 4&t&&o(".d.json.ts")||8&t&&o(".json")||void 0;case".tsx":case".jsx":return 1&t&&(o(".tsx",".tsx"===n)||o(".ts",".tsx"===n))||4&t&&o(".d.ts",".tsx"===n)||2&t&&(o(".jsx")||o(".js"))||void 0;case".ts":case".d.ts":case".js":case"":return 1&t&&(o(".ts",".ts"===n||".d.ts"===n)||o(".tsx",".ts"===n||".d.ts"===n))||4&t&&o(".d.ts",".ts"===n||".d.ts"===n)||2&t&&(o(".js")||o(".jsx"))||i.isConfigLookup&&o(".json")||void 0;default:return 4&t&&!SO(e+n)&&o(`.d${n}.ts`)||void 0}function o(t,n){const o=hR(e+t,r,i);return void 0===o?void 0:{path:o,ext:t,resolvedUsingTsExtension:!i.candidateIsFromPackageJsonField&&n}}}function hR(e,t,n){var r;if(!(null==(r=n.compilerOptions.moduleSuffixes)?void 0:r.length))return yR(e,t,n);const i=lT(e)??"",o=i?Zk(e,i):e;return g(n.compilerOptions.moduleSuffixes,e=>yR(o+e+i,t,n))}function yR(e,t,n){var r;if(!t){if(n.host.fileExists(e))return n.traceEnabled&&sM(n.host,ha.File_0_exists_use_it_as_a_name_resolution_result,e),e;n.traceEnabled&&sM(n.host,ha.File_0_does_not_exist,e)}null==(r=n.failedLookupLocations)||r.push(e)}function vR(e,t,n,r,i=!0){const o=i?wR(t,n,r):void 0;return lM(o,NR(e,t,n,r,o),r)}function bR(e,t,n,r,i){if(!i&&void 0!==e.contents.resolvedEntrypoints)return e.contents.resolvedEntrypoints;let o;const a=5|(i?2:0),s=EM(t),c=SR(null==r?void 0:r.getPackageJsonInfoCache(),n,t);c.conditions=FM(t),c.requestContainingDirectory=e.packageDirectory;const l=NR(a,e.packageDirectory,!1,c,e);if(o=le(o,null==l?void 0:l.path),8&s&&e.contents.packageJsonContent.exports){const r=ne([FM(t,99),FM(t,1)],ae);for(const t of r){const r={...c,failedLookupLocations:[],conditions:t,host:n},i=xR(e,e.contents.packageJsonContent.exports,r,a);if(i)for(const e of i)o=fe(o,e.path)}}return e.contents.resolvedEntrypoints=o||!1}function xR(e,t,n,r){let i;if(nt(t))for(const e of t)o(e);else if("object"==typeof t&&null!==t&&FR(t))for(const e in t)o(t[e]);else o(t);return i;function o(t){var a,s;if("string"==typeof t&&en(t,"./"))if(t.includes("*")&&n.host.readDirectory){if(t.indexOf("*")!==t.lastIndexOf("*"))return!1;n.host.readDirectory(e.packageDirectory,function(e){const t=[];return 1&e&&t.push(...Rk),2&e&&t.push(...Ok),4&e&&t.push(...Mk),8&e&&t.push(".json"),t}(r),void 0,[ta(bC(t,"**/*"),".*")]).forEach(e=>{i=fe(i,{path:e,ext:Ro(e),resolvedUsingTsExtension:void 0})})}else{const o=Bo(t).slice(2);if(o.includes("..")||o.includes(".")||o.includes("node_modules"))return!1;const c=$o(Uo(e.packageDirectory,t),null==(s=(a=n.host).getCurrentDirectory)?void 0:s.call(a)),l=mR(r,c,t,!1,n);if(l)return i=fe(i,l,(e,t)=>e.path===t.path),!0}else if(Array.isArray(t))for(const e of t){if(o(e))return!0}else if("object"==typeof t&&null!==t)return g(Le(t),e=>{if("default"===e||D(n.conditions,e)||LR(n.conditions,e))return o(t[e]),!0})}}function SR(e,t,n){return{host:t,compilerOptions:n,traceEnabled:cM(n,t),failedLookupLocations:void 0,affectingLocations:void 0,packageJsonInfoCache:e,features:0,conditions:p,requestContainingDirectory:void 0,reportDiagnostic:ct,isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1}}function kR(e,t){return RR(t.host,e,e=>wR(e,!1,t))}function TR(e,t){return void 0===e.contents.versionPaths&&(e.contents.versionPaths=xM(e.contents.packageJsonContent,t)||!1),e.contents.versionPaths||void 0}function CR(e,t){return void 0===e.contents.peerDependencies&&(e.contents.peerDependencies=function(e,t){const n=vM(e.contents.packageJsonContent,"peerDependencies","object",t);if(void 0===n)return;t.traceEnabled&&sM(t.host,ha.package_json_has_a_peerDependencies_field);const r=aR(e.packageDirectory,t.host,t.traceEnabled),i=r.substring(0,r.lastIndexOf("node_modules")+12)+ho;let o="";for(const e in n)if(Ie(n,e)){const n=wR(i+e,!1,t);if(n){const r=n.contents.packageJsonContent.version;o+=`+${e}@${r}`,t.traceEnabled&&sM(t.host,ha.Found_peerDependency_0_with_1_version,e,r)}else t.traceEnabled&&sM(t.host,ha.Failed_to_find_peerDependency_0,e)}return o}(e,t)||!1),e.contents.peerDependencies||void 0}function wR(e,t,n){var r,i,o,a,s,c;const{host:l,traceEnabled:_}=n,u=Uo(e,"package.json");if(t)return void(null==(r=n.failedLookupLocations)||r.push(u));const d=null==(i=n.packageJsonInfoCache)?void 0:i.getPackageJsonInfo(u);if(void 0!==d)return IM(d)?(_&&sM(l,ha.File_0_exists_according_to_earlier_cached_lookups,u),null==(o=n.affectingLocations)||o.push(u),d.packageDirectory===e?d:{packageDirectory:e,contents:d.contents}):(d.directoryExists&&_&&sM(l,ha.File_0_does_not_exist_according_to_earlier_cached_lookups,u),void(null==(a=n.failedLookupLocations)||a.push(u)));const p=jb(e,l);if(p&&l.fileExists(u)){const t=Ob(u,l);_&&sM(l,ha.Found_package_json_at_0,u);const r={packageDirectory:e,contents:{packageJsonContent:t,versionPaths:void 0,resolvedEntrypoints:void 0,peerDependencies:void 0}};return n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(u,r),null==(s=n.affectingLocations)||s.push(u),r}p&&_&&sM(l,ha.File_0_does_not_exist,u),n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(u,{packageDirectory:e,directoryExists:p}),null==(c=n.failedLookupLocations)||c.push(u)}function NR(e,t,n,r,i){const o=i&&TR(i,r);let a;i&&CM(null==i?void 0:i.packageDirectory,t,r.host)&&(a=r.isConfigLookup?function(e,t,n){return bM(e,"tsconfig",t,n)}(i.contents.packageJsonContent,i.packageDirectory,r):4&e&&function(e,t,n){return bM(e,"typings",t,n)||bM(e,"types",t,n)}(i.contents.packageJsonContent,i.packageDirectory,r)||7&e&&function(e,t,n){return bM(e,"main",t,n)}(i.contents.packageJsonContent,i.packageDirectory,r)||void 0);const s=(e,t,n,r)=>{const o=mR(e,t,void 0,n,r);if(o)return _M(o);const a=4===e?5:e,s=r.features,c=r.candidateIsFromPackageJsonField;r.candidateIsFromPackageJsonField=!0,"module"!==(null==i?void 0:i.contents.packageJsonContent.type)&&(r.features&=-33);const l=sR(a,t,n,r,!1);return r.features=s,r.candidateIsFromPackageJsonField=c,l},c=a?!jb(Lo(a),r.host):void 0,l=n||!jb(t,r.host),_=Uo(t,r.isConfigLookup?"tsconfig":"index");if(o&&(!a||sa(t,a))){const n=_a(t,a||_,!1);r.traceEnabled&&sM(r.host,ha.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,o.version,u,n);const i=rT(o.paths),d=zR(e,n,t,o.paths,i,s,c||l,r);if(d)return uM(d.value)}const d=a&&uM(s(e,a,c,r));return d||(32&r.features?void 0:pR(e,_,l,r))}function DR(e,t){return 2&e&&(".js"===t||".jsx"===t||".mjs"===t||".cjs"===t)||1&e&&(".ts"===t||".tsx"===t||".mts"===t||".cts"===t)||4&e&&(".d.ts"===t||".d.mts"===t||".d.cts"===t)||8&e&&".json"===t||!1}function ER(e){let t=e.indexOf(ho);return"@"===e[0]&&(t=e.indexOf(ho,t+1)),-1===t?{packageName:e,rest:""}:{packageName:e.slice(0,t),rest:e.slice(t+1)}}function FR(e){return k(Le(e),e=>en(e,"."))}function PR(e,t,n,r,i,o){if(e.contents.packageJsonContent.exports){if("."===n){let a;if("string"==typeof e.contents.packageJsonContent.exports||Array.isArray(e.contents.packageJsonContent.exports)||"object"==typeof e.contents.packageJsonContent.exports&&!X(Le(e.contents.packageJsonContent.exports),e=>en(e,"."))?a=e.contents.packageJsonContent.exports:Ie(e.contents.packageJsonContent.exports,".")&&(a=e.contents.packageJsonContent.exports["."]),a){return OR(t,r,i,o,n,e,!1)(a,"",!1,".")}}else if(FR(e.contents.packageJsonContent.exports)){if("object"!=typeof e.contents.packageJsonContent.exports)return r.traceEnabled&&sM(r.host,ha.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),ZR(void 0);const a=IR(t,r,i,o,n,e.contents.packageJsonContent.exports,e,!1);if(a)return a}return r.traceEnabled&&sM(r.host,ha.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),ZR(void 0)}}function AR(e,t){const n=e.indexOf("*"),r=t.indexOf("*"),i=-1===n?e.length:n+1,o=-1===r?t.length:r+1;return i>o?-1:o>i||-1===n?1:-1===r||e.length>t.length?-1:t.length>e.length?1:0}function IR(e,t,n,r,i,o,a,s){const c=OR(e,t,n,r,i,a,s);if(!qt(i,ho)&&!i.includes("*")&&Ie(o,i)){return c(o[i],"",!1,i)}const l=me(P(Le(o),e=>function(e){const t=e.indexOf("*");return-1!==t&&t===e.lastIndexOf("*")}(e)||qt(e,"/")),AR);for(const e of l){if(16&t.features&&_(e,i)){const t=o[e],n=e.indexOf("*");return c(t,i.substring(e.substring(0,n).length,i.length-(e.length-1-n)),!0,e)}if(qt(e,"*")&&en(i,e.substring(0,e.length-1))){return c(o[e],i.substring(e.length-1),!0,e)}if(en(i,e)){return c(o[e],i.substring(e.length),!1,e)}}function _(e,t){if(qt(e,"*"))return!1;const n=e.indexOf("*");return-1!==n&&(en(t,e.substring(0,n))&&qt(t,e.substring(n+1)))}}function OR(e,t,n,r,i,o,a){return function s(c,l,_,u){var d,f;if("string"==typeof c){if(!_&&l.length>0&&!qt(c,"/"))return t.traceEnabled&&sM(t.host,ha.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),ZR(void 0);if(!en(c,"./")){if(a&&!en(c,"../")&&!en(c,"/")&&!ko(c)){const i=_?c.replace(/\*/g,l):c+l;eB(t,ha.Using_0_subpath_1_with_target_2,"imports",u,i),eB(t,ha.Resolving_module_0_from_1,i,o.packageDirectory+"/");const a=iR(t.features,i,o.packageDirectory+"/",t.compilerOptions,t.host,n,e,!1,r,t.conditions);return null==(d=t.failedLookupLocations)||d.push(...a.failedLookupLocations??p),null==(f=t.affectingLocations)||f.push(...a.affectingLocations??p),ZR(a.resolvedModule?{path:a.resolvedModule.resolvedFileName,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,originalPath:a.resolvedModule.originalPath,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}:void 0)}return t.traceEnabled&&sM(t.host,ha.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),ZR(void 0)}const s=(wo(c)?Bo(c).slice(1):Bo(c)).slice(1);if(s.includes("..")||s.includes(".")||s.includes("node_modules"))return t.traceEnabled&&sM(t.host,ha.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),ZR(void 0);const m=Uo(o.packageDirectory,c),y=Bo(l);if(y.includes("..")||y.includes(".")||y.includes("node_modules"))return t.traceEnabled&&sM(t.host,ha.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),ZR(void 0);t.traceEnabled&&sM(t.host,ha.Using_0_subpath_1_with_target_2,a?"imports":"exports",u,_?c.replace(/\*/g,l):c+l);const v=g(_?m.replace(/\*/g,l):m+l),b=function(n,r,i,a){var s,c,l,_;if(!t.isConfigLookup&&(t.compilerOptions.declarationDir||t.compilerOptions.outDir)&&!n.includes("/node_modules/")&&(!t.compilerOptions.configFile||sa(o.packageDirectory,g(t.compilerOptions.configFile.fileName),!tB(t)))){const d=Vy({useCaseSensitiveFileNames:()=>tB(t)}),p=[];if(t.compilerOptions.rootDir||t.compilerOptions.composite&&t.compilerOptions.configFilePath){const e=g(SU(t.compilerOptions,()=>[],(null==(c=(s=t.host).getCurrentDirectory)?void 0:c.call(s))||"",d));p.push(e)}else if(t.requestContainingDirectory){const e=g(Uo(t.requestContainingDirectory,"index.ts")),n=g(SU(t.compilerOptions,()=>[e,g(i)],(null==(_=(l=t.host).getCurrentDirectory)?void 0:_.call(l))||"",d));p.push(n);let r=Yo(n);for(;r&&r.length>1;){const e=Bo(r);e.pop();const t=Jo(e);p.unshift(t),r=Yo(t)}}p.length>1&&t.reportDiagnostic(oS(a?ha.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:ha.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,""===r?".":r,i));for(const r of p){const i=u(r);for(const a of i)if(sa(a,n,!tB(t))){const i=Uo(r,n.slice(a.length+1)),s=[".mjs",".cjs",".js",".json",".d.mts",".d.cts",".d.ts"];for(const n of s)if(Eo(i,n)){const r=Zy(i);for(const a of r){if(!DR(e,a))continue;const r=ea(i,a,n,!tB(t));if(t.host.fileExists(r))return ZR(lM(o,mR(e,r,void 0,!1,t),t))}}}}}return;function u(e){var n,r;const i=t.compilerOptions.configFile?(null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))||"":e,o=[];return t.compilerOptions.declarationDir&&o.push(g(h(i,t.compilerOptions.declarationDir))),t.compilerOptions.outDir&&t.compilerOptions.outDir!==t.compilerOptions.declarationDir&&o.push(g(h(i,t.compilerOptions.outDir))),o}}(v,l,Uo(o.packageDirectory,"package.json"),a);return b||ZR(lM(o,mR(e,v,c,!1,t),t))}if("object"==typeof c&&null!==c){if(!Array.isArray(c)){eB(t,ha.Entering_conditional_exports);for(const e of Le(c))if("default"===e||t.conditions.includes(e)||LR(t.conditions,e)){eB(t,ha.Matched_0_condition_1,a?"imports":"exports",e);const n=c[e],r=s(n,l,_,u);if(r)return eB(t,ha.Resolved_under_condition_0,e),eB(t,ha.Exiting_conditional_exports),r;eB(t,ha.Failed_to_resolve_under_condition_0,e)}else eB(t,ha.Saw_non_matching_condition_0,e);return void eB(t,ha.Exiting_conditional_exports)}if(!m(c))return t.traceEnabled&&sM(t.host,ha.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),ZR(void 0);for(const e of c){const t=s(e,l,_,u);if(t)return t}}else if(null===c)return t.traceEnabled&&sM(t.host,ha.package_json_scope_0_explicitly_maps_specifier_1_to_null,o.packageDirectory,i),ZR(void 0);t.traceEnabled&&sM(t.host,ha.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i);return ZR(void 0);function g(e){var n,r;return void 0===e?e:$o(e,null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))}function h(e,t){return Yo(Uo(e,t))}}}function LR(e,t){if(!e.includes("types"))return!1;if(!en(t,"types@"))return!1;const n=Nn.tryParse(t.substring(6));return!!n&&n.test(u)}function jR(e,t,n,r,i,o){return MR(e,t,n,r,!1,i,o)}function MR(e,t,n,r,i,o,a){const s=0===r.features?void 0:32&r.features||r.conditions.includes("import")?99:1,c=5&e,l=-6&e;if(c){eB(r,ha.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,dM(c));const e=_(c);if(e)return e}if(l&&!i)return eB(r,ha.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,dM(l)),_(l);function _(e){return RR(r.host,zo(n),n=>{if("node_modules"!==jo(n)){const c=HR(o,t,s,n,a,r);return c||ZR(BR(e,t,n,r,i,o,a))}})}}function RR(e,t,n){var r;const i=null==(r=null==e?void 0:e.getGlobalTypingsCacheLocation)?void 0:r.call(e);return fa(t,e=>{const t=n(e);return void 0!==t?t:e!==i&&void 0})||void 0}function BR(e,t,n,r,i,o,a){const s=Uo(n,"node_modules"),c=jb(s,r.host);if(!c&&r.traceEnabled&&sM(r.host,ha.Directory_0_does_not_exist_skipping_all_lookups_in_it,s),!i){const n=JR(e,t,s,c,r,o,a);if(n)return n}if(4&e){const e=Uo(s,"@types");let n=c;return c&&!jb(e,r.host)&&(r.traceEnabled&&sM(r.host,ha.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!1),JR(4,UR(t,r),e,n,r,o,a)}}function JR(e,t,n,r,i,o,a){var s,c;const l=Ko(Uo(n,t)),{packageName:_,rest:d}=ER(t),f=Uo(n,_);let m,g=wR(l,!r,i);if(""!==d&&g&&(!(8&i.features)||!Ie((null==(s=m=wR(f,!r,i))?void 0:s.contents.packageJsonContent)??p,"exports"))){const t=pR(e,l,!r,i);if(t)return _M(t);const n=NR(e,l,!r,i,g);return lM(g,n,i)}const h=(e,t,n,r)=>{let i=(d||!(32&r.features))&&pR(e,t,n,r)||NR(e,t,n,r,g);return!i&&!d&&g&&(void 0===g.contents.packageJsonContent.exports||null===g.contents.packageJsonContent.exports)&&32&r.features&&(i=pR(e,Uo(t,"index.js"),n,r)),lM(g,i,r)};if(""!==d&&(g=m??wR(f,!r,i)),g&&(i.resolvedPackageDirectory=!0),g&&g.contents.packageJsonContent.exports&&8&i.features)return null==(c=PR(g,e,Uo(".",d),i,o,a))?void 0:c.value;const y=""!==d&&g?TR(g,i):void 0;if(y){i.traceEnabled&&sM(i.host,ha.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,y.version,u,d);const t=r&&jb(f,i.host),n=rT(y.paths),o=zR(e,d,f,y.paths,n,h,!t,i);if(o)return o.value}return h(e,l,!r,i)}function zR(e,t,n,r,i,o,a,s){const c=dT(i,t);if(c){const i=it(c)?void 0:Yt(c,t),l=it(c)?c:Qt(c);s.traceEnabled&&sM(s.host,ha.Module_name_0_matched_pattern_1,t,l);return{value:g(r[l],t=>{const r=i?bC(t,i):t,c=Ko(Uo(n,r));s.traceEnabled&&sM(s.host,ha.Trying_substitution_0_candidate_module_location_Colon_1,t,r);const l=lT(t);if(void 0!==l){const e=hR(c,a,s);if(void 0!==e)return _M({path:e,ext:l,resolvedUsingTsExtension:void 0})}return o(e,c,a||!jb(Lo(c),s.host),s)})}}}var qR="__";function UR(e,t){const n=WR(e);return t.traceEnabled&&n!==e&&sM(t.host,ha.Scoped_package_detected_looking_in_0,n),n}function VR(e){return`@types/${WR(e)}`}function WR(e){if(en(e,"@")){const t=e.replace(ho,qR);if(t!==e)return t.slice(1)}return e}function $R(e){const t=tn(e,"@types/");return t!==e?KR(t):e}function KR(e){return e.includes(qR)?"@"+e.replace(qR,ho):e}function HR(e,t,n,r,i,o){const a=e&&e.getFromNonRelativeNameCache(t,n,r,i);if(a)return o.traceEnabled&&sM(o.host,ha.Resolution_for_module_0_was_found_in_cache_from_location_1,t,r),o.resultFromCache=a,{value:a.resolvedModule&&{path:a.resolvedModule.resolvedFileName,originalPath:a.resolvedModule.originalPath||!0,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}}}function GR(e,t,n,r,i,o){const a=cM(n,r),s=[],c=[],l=Lo(t),_=[],u={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:i,features:0,conditions:[],requestContainingDirectory:l,reportDiagnostic:e=>{_.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},d=p(5)||p(2|(n.resolveJsonModule?8:0));return fM(e,d&&d.value,(null==d?void 0:d.value)&&lR(d.value.path),s,c,_,u,i);function p(t){const n=QM(t,e,l,dR,u);if(n)return{value:n};if(As(e)){const n=Ko(Uo(l,e));return ZR(dR(t,n,!1,u))}{const n=RR(u.host,l,n=>{const r=HR(i,e,void 0,n,o,u);if(r)return r;const a=Ko(Uo(n,e));return ZR(dR(t,a,!1,u))});if(n)return n;if(5&t){let n=function(e,t,n){return MR(4,e,t,n,!0,void 0,void 0)}(e,l,u);return 4&t&&(n??(n=XR(e,u))),n}}}}function XR(e,t){if(t.compilerOptions.typeRoots)for(const n of t.compilerOptions.typeRoots){const r=NM(n,e,t),i=jb(n,t.host);!i&&t.traceEnabled&&sM(t.host,ha.Directory_0_does_not_exist_skipping_all_lookups_in_it,n);const o=pR(4,r,!i,t);if(o){const e=_R(o.path);return ZR(lM(e?wR(e,!1,t):void 0,o,t))}const a=vR(4,r,!i,t);if(a)return ZR(a)}}function QR(e,t){return CS(e)||!!t&&SO(t)}function YR(e,t,n,r,i,o){const a=cM(n,r);a&&sM(r,ha.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,t,e,i);const s=[],c=[],l=[],_={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:o,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:e=>{l.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};return mM(BR(4,e,i,_,!1,void 0,void 0),!0,s,c,l,_.resultFromCache,void 0)}function ZR(e){return void 0!==e?{value:e}:void 0}function eB(e,t,...n){e.traceEnabled&&sM(e.host,t,...n)}function tB(e){return!e.host.useCaseSensitiveFileNames||("boolean"==typeof e.host.useCaseSensitiveFileNames?e.host.useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames())}var nB=(e=>(e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly",e))(nB||{});function rB(e,t){return e.body&&!e.body.parent&&(jT(e.body,e),MT(e.body,!1)),e.body?iB(e.body,t):1}function iB(e,t=new Map){const n=pJ(e);if(t.has(n))return t.get(n)||0;t.set(n,void 0);const r=function(e,t){switch(e.kind){case 265:case 266:return 0;case 267:if(lf(e))return 2;break;case 273:case 272:if(!Lv(e,32))return 0;break;case 279:const n=e;if(!n.moduleSpecifier&&n.exportClause&&280===n.exportClause.kind){let e=0;for(const r of n.exportClause.elements){const n=oB(r,t);if(n>e&&(e=n),1===e)return e}return e}break;case 269:{let n=0;return sO(e,e=>{const r=iB(e,t);switch(r){case 0:return;case 2:return void(n=2);case 1:return n=1,!0;default:gn.assertNever(r)}}),n}case 268:return rB(e,t);case 80:if(4096&e.flags)return 0}return 1}(e,t);return t.set(n,r),r}function oB(e,t){const n=e.propertyName||e.name;if(80!==n.kind)return 1;let r=e.parent;for(;r;){if(YE(r)||CF(r)||mP(r)){const e=r.statements;let i;for(const o of e)if(Dc(o,n)){o.parent||(jT(o,r),MT(o,!1));const e=iB(o,t);if((void 0===i||e>i)&&(i=e),1===i)return i;272===o.kind&&(i=1)}if(void 0!==i)return i}r=r.parent}return 1}var aB=(e=>(e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethodOrAccessor=128]="IsObjectLiteralOrClassExpressionMethodOrAccessor",e))(aB||{});function sB(e,t,n){return gn.attachFlowNodeDebugInfo({flags:e,id:0,node:t,antecedent:n})}var cB=_B();function lB(e,t){ar("beforeBind"),cB(e,t),ar("afterBind"),sr("Bind","beforeBind","afterBind")}function _B(){var e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,h,y,v,b,x,S,T,C,w,N,E,F,P=!1,A=0,I=sB(1,void 0,void 0),O=sB(1,void 0,void 0),L=function(){return yI(function(e,t){if(t){t.stackIndex++,jT(e,r);const n=N;We(e);const i=r;r=e,t.skip=!1,t.inStrictModeStack[t.stackIndex]=n,t.parentStack[t.stackIndex]=i}else t={stackIndex:0,skip:!1,inStrictModeStack:[void 0],parentStack:[void 0]};const n=e.operatorToken.kind;if(ab(n)||ib(n)){if(pe(e)){const t=te(),n=u,r=C;C=!1,ke(e,t,t),u=C?ue(t):n,C||(C=r)}else ke(e,h,y);t.skip=!0}return t},function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&be(t),n}},function(e,t,n){t.skip||ze(e)},function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&be(t),n}},function(e,t){if(!t.skip){const t=e.operatorToken.kind;if(cb(t)&&!ih(e)&&(Se(e.left),64===t&&213===e.left.kind)){ee(e.left.expression)&&(u=ce(256,u,e))}}const n=t.inStrictModeStack[t.stackIndex],i=t.parentStack[t.stackIndex];void 0!==n&&(N=n);void 0!==i&&(r=i);t.skip=!1,t.stackIndex--},void 0);function e(e){if(e&&LE(e)&&!db(e))return e;ze(e)}}();return function(m,g){var b,k;e=m,n=wS(t=g),N=function(e,t){return!(!HS(t,"alwaysStrict")||e.isDeclarationFile)||!!e.externalModuleIndicator}(e,g),F=new Set,A=0,E=Wx.getSymbolConstructor(),gn.attachFlowNodeDebugInfo(I),gn.attachFlowNodeDebugInfo(O),e.locals||(null==(b=Yn)||b.push(Yn.Phase.Bind,"bindSourceFile",{path:e.path},!0),ze(e),null==(k=Yn)||k.pop(),e.symbolCount=A,e.classifiableNames=F,function(){if(!c)return;const t=i,n=s,o=a,l=r,_=u;for(const t of c){const n=t.parent.parent;i=jp(n)||e,a=Mp(n)||e,u=sB(2,void 0,void 0),r=t,ze(t.typeExpression);const o=Ac(t);if(($P(t)||!t.fullName)&&o&&hb(o.parent)){const n=rt(o.parent);if(n){tt(e.symbol,o.parent,n,!!yc(o,e=>bE(e)&&"prototype"===e.name.escapedText),!1);const r=i;switch(yg(o.parent)){case 1:case 2:i=sf(e)?e:void 0;break;case 4:i=o.parent.expression;break;case 3:i=o.parent.expression.name;break;case 5:i=dB(e,o.parent.expression)?e:bE(o.parent.expression)?o.parent.expression.name:o.parent.expression;break;case 0:return gn.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}i&&q(t,524288,788968),i=r}}else $P(t)||!t.fullName||80===t.fullName.kind?(r=t.parent,Oe(t,524288,788968)):ze(t.fullName)}i=t,s=n,a=o,r=l,u=_}(),function(){if(void 0===_)return;const t=i,n=s,o=a,c=r,l=u;for(const t of _){const n=Qg(t),o=n?jp(n):void 0,s=n?Mp(n):void 0;i=o||e,a=s||e,u=sB(2,void 0,void 0),r=t,ze(t.importClause)}i=t,s=n,a=o,r=c,u=l}());e=void 0,t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,c=void 0,_=void 0,l=!1,u=void 0,d=void 0,p=void 0,f=void 0,h=void 0,y=void 0,v=void 0,x=void 0,S=!1,T=!1,C=!1,P=!1,w=0};function j(t,n,...r){return Kp(wd(t)||e,t,n,...r)}function M(e,t){return A++,new E(e,t)}function R(e,t,n){e.flags|=n,t.symbol=e,e.declarations=fe(e.declarations,t),1955&n&&!e.exports&&(e.exports=nd()),6240&n&&!e.members&&(e.members=nd()),e.constEnumOnlyModule&&304&e.flags&&(e.constEnumOnlyModule=!1),111551&n&&Sg(e,t)}function B(e){if(278===e.kind)return e.isExportEquals?"export=":"default";const t=Ac(e);if(t){if(mp(e)){const n=Gh(t);return bp(e)?"__global":`"${n}"`}if(168===t.kind){const e=t.expression;if(Uh(e))return xc(e.text);if(Vh(e))return ja(e.operator)+e.operand.text;gn.fail("Only computed properties with literal names have declaration names")}if(mD(t)){const n=rm(e);if(!n)return;return Qh(n.symbol,t.escapedText)}return aP(t)?dC(t):Hh(t)?Xh(t):void 0}switch(e.kind){case 177:return"__constructor";case 185:case 180:case 324:return"__call";case 186:case 181:return"__new";case 182:return"__index";case 279:return"__export";case 308:return"export=";case 227:if(2===cg(e))return"export=";gn.fail("Unknown binary declaration kind");break;case 318:return Og(e)?"__new":"__call";case 170:gn.assert(318===e.parent.kind,"Impossible parameter parent kind",()=>`parent is: ${gn.formatSyntaxKind(e.parent.kind)}, expected JSDocFunctionType`);return"arg"+e.parent.parameters.indexOf(e)}}function J(e){return Fc(e)?Bp(e.name):Sc(gn.checkDefined(B(e)))}function z(t,n,r,i,o,a,s){gn.assert(s||!Wh(r));const c=Lv(r,2048)||UF(r)&&tp(r.name),l=s?"__computed":c&&n?"default":B(r);let _;if(void 0===l)_=M(0,"__missing");else if(_=t.get(l),2885600&i&&F.add(l),_){if(a&&!_.isReplaceableByMethod)return _;if(_.flags&o)if(_.isReplaceableByMethod)t.set(l,_=M(0,l));else if(!(3&i&&67108864&_.flags)){Fc(r)&&jT(r.name,r);let t=2&_.flags?ha.Cannot_redeclare_block_scoped_variable_0:ha.Duplicate_identifier_0,n=!0;(384&_.flags||384&i)&&(t=ha.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,n=!1);let o=!1;m(_.declarations)&&(c||_.declarations&&_.declarations.length&&278===r.kind&&!r.isExportEquals)&&(t=ha.A_module_cannot_have_multiple_default_exports,n=!1,o=!0);const a=[];SF(r)&&Od(r.type)&&Lv(r,32)&&2887656&_.flags&&a.push(j(r,ha.Did_you_mean_0,`export type { ${Sc(r.name.escapedText)} }`));const s=Ac(r)||r;g(_.declarations,(r,i)=>{const c=Ac(r)||r,l=n?j(c,t,J(r)):j(c,t);e.bindDiagnostics.push(o?fT(l,j(s,0===i?ha.Another_export_default_is_here:ha.and_here)):l),o&&a.push(j(c,ha.The_first_export_default_is_here))});const u=n?j(s,t,J(r)):j(s,t);e.bindDiagnostics.push(fT(u,...a)),_=M(0,l)}}else t.set(l,_=M(0,l)),a&&(_.isReplaceableByMethod=!0);return R(_,r,i),_.parent?gn.assert(_.parent===n,"Existing symbol parent should match new one"):_.parent=n,_}function q(e,t,n){const r=!!(32&uc(e))||function(e){e.parent&&TF(e)&&(e=e.parent);if(!Lg(e))return!1;if(!$P(e)&&e.fullName)return!0;const t=Ac(e);return!!t&&(!(!hb(t.parent)||!rt(t.parent))||!!(hu(t.parent)&&32&uc(t.parent)))}(e);if(2097152&t)return 282===e.kind||272===e.kind&&r?z(i.symbol.exports,i.symbol,e,t,n):(gn.assertNode(i,fu),z(i.locals,void 0,e,t,n));if(Lg(e)&&gn.assert(Mm(e)),!mp(e)&&(r||128&i.flags)){if(!fu(i)||!i.locals||Lv(e,2048)&&!B(e))return z(i.symbol.exports,i.symbol,e,t,n);const r=111551&t?1048576:0,o=z(i.locals,void 0,e,r,n);return o.exportSymbol=z(i.symbol.exports,i.symbol,e,t,n),e.localSymbol=o,o}return gn.assertNode(i,fu),z(i.locals,void 0,e,t,n)}function U(e){V(e,e=>263===e.kind?ze(e):void 0),V(e,e=>263!==e.kind?ze(e):void 0)}function V(e,t=ze){void 0!==e&&g(e,t)}function W(e){sO(e,ze,V)}function $(e){const n=P;if(P=!1,function(e){if(!(1&u.flags))return!1;if(u===I){const n=vu(e)&&243!==e.kind||264===e.kind||uB(e,t)||268===e.kind&&function(e){const n=rB(e);return 1===n||2===n&&MS(t)}(e);if(n&&(u=O,!t.allowUnreachableCode)){const n=VS(t)&&!(33554432&e.flags)&&(!ZE(e)||!!(7&pc(e.declarationList))||e.declarationList.declarations.some(e=>!!e.initializer));!function(e,t,n){if(bu(e)&&r(e)&&YE(e.parent)){const{statements:t}=e.parent,i=pT(t,e);Q(i,r,(e,t)=>n(i[e],i[t-1]))}else n(e,e);function r(e){return!(vF(e)||i(e)||ZE(e)&&!(7&pc(e))&&e.declarationList.declarations.some(e=>!e.initializer))}function i(e){switch(e.kind){case 265:case 266:return!0;case 268:return 1!==rB(e);case 267:return!uB(e,t);default:return!1}}}(e,t,(e,t)=>Je(n,e,t,ha.Unreachable_code_detected))}}return!0}(e))return zg(e)&&e.flowNode&&(e.flowNode=void 0),W(e),qe(e),void(P=n);switch(e.kind>=244&&e.kind<=260&&(!t.allowUnreachableCode||254===e.kind)&&(e.flowNode=u),e.kind){case 248:!function(e){const t=ye(e,ne()),n=te(),r=te();oe(t,u),u=t,ge(e.expression,n,r),u=ue(n),he(e.statement,r,t),oe(t,u),u=ue(r)}(e);break;case 247:!function(e){const t=ne(),n=ye(e,te()),r=te();oe(t,u),u=t,he(e.statement,r,n),oe(n,u),u=ue(n),ge(e.expression,t,r),u=ue(r)}(e);break;case 249:!function(e){const t=ye(e,ne()),n=te(),r=te(),i=te();ze(e.initializer),oe(t,u),u=t,ge(e.condition,n,i),u=ue(n),he(e.statement,i,r),oe(r,u),u=ue(r),ze(e.incrementor),oe(t,u),u=ue(i)}(e);break;case 250:case 251:!function(e){const t=ye(e,ne()),n=te();ze(e.expression),oe(t,u),u=t,251===e.kind&&ze(e.awaitModifier);oe(n,u),ze(e.initializer),262!==e.initializer.kind&&Se(e.initializer);he(e.statement,n,t),oe(t,u),u=ue(n)}(e);break;case 246:!function(e){const t=te(),n=te(),r=te();ge(e.expression,t,n),u=ue(t),ze(e.thenStatement),oe(r,u),u=ue(n),ze(e.elseStatement),oe(r,u),u=ue(r)}(e);break;case 254:case 258:!function(e){const t=T;T=!0,ze(e.expression),T=t,254===e.kind&&(S=!0,f&&oe(f,u));u=I,C=!0}(e);break;case 253:case 252:!function(e){if(ze(e.label),e.label){const t=function(e){for(let t=x;t;t=t.next)if(t.name===e)return t;return}(e.label.escapedText);t&&(t.referenced=!0,ve(e,t.breakTarget,t.continueTarget))}else ve(e,d,p)}(e);break;case 259:!function(e){const t=f,n=v,r=te(),i=te();let o=te();e.finallyBlock&&(f=i);oe(o,u),v=o,ze(e.tryBlock),oe(r,u),e.catchClause&&(u=ue(o),o=te(),oe(o,u),v=o,ze(e.catchClause),oe(r,u));if(f=t,v=n,e.finallyBlock){const t=te();t.antecedent=Y(Y(r.antecedent,o.antecedent),i.antecedent),u=t,ze(e.finallyBlock),1&u.flags?u=I:(f&&i.antecedent&&oe(f,re(t,i.antecedent,u)),v&&o.antecedent&&oe(v,re(t,o.antecedent,u)),u=r.antecedent?re(t,r.antecedent,u):I)}else u=ue(r)}(e);break;case 256:!function(e){const t=te();ze(e.expression);const n=d,r=b;d=t,b=u,ze(e.caseBlock),oe(t,u);const i=g(e.caseBlock.clauses,e=>298===e.kind);e.possiblyExhaustive=!i&&!t.antecedent,i||oe(t,se(b,e,0,0));d=n,b=r,u=ue(t)}(e);break;case 270:!function(e){const n=e.clauses,r=112===e.parent.expression.kind||K(e.parent.expression);let i=I;for(let o=0;ozF(e)||JF(e))}(e)?e.flags|=128:e.flags&=-129}function Ae(e){const t=rB(e),n=0!==t;return Fe(e,n?512:1024,n?110735:0),t}function Ie(e,t,n){const r=M(t,n);return 106508&t&&(r.parent=i.symbol),R(r,e,t),r}function Oe(e,t,n){switch(a.kind){case 268:q(e,t,n);break;case 308:if(sf(i)){q(e,t,n);break}default:gn.assertNode(a,fu),a.locals||(a.locals=nd(),Ee(a)),z(a.locals,void 0,e,t,n)}}function Le(t){if(!(e.parseDiagnostics.length||33554432&t.flags||16777216&t.flags||vh(t))){const n=Tc(t);if(void 0===n)return;N&&n>=119&&n<=127?e.bindDiagnostics.push(j(t,function(t){if(rm(t))return ha.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;if(e.externalModuleIndicator)return ha.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;return ha.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),Bp(t))):135===n?fO(e)&&lm(t)?e.bindDiagnostics.push(j(t,ha.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,Bp(t))):65536&t.flags&&e.bindDiagnostics.push(j(t,ha.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Bp(t))):127===n&&16384&t.flags&&e.bindDiagnostics.push(j(t,ha.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Bp(t)))}}function je(t,n){if(n&&80===n.kind){const i=n;if(fD(r=i)&&("eval"===r.escapedText||"arguments"===r.escapedText)){const r=of(e,n);e.bindDiagnostics.push(rS(e,r.start,r.length,function(t){if(rm(t))return ha.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode;if(e.externalModuleIndicator)return ha.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;return ha.Invalid_use_of_0_in_strict_mode}(t),kc(i)))}}var r}function Me(e){!N||33554432&e.flags||je(e,e.name)}function Re(t){if(n<2&&308!==a.kind&&268!==a.kind&&!u_(a)){const n=of(e,t);e.bindDiagnostics.push(rS(e,n.start,n.length,function(t){return rm(t)?ha.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:e.externalModuleIndicator?ha.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:ha.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5}(t)))}}function Be(t,n,...r){const i=nf(e,t.pos);e.bindDiagnostics.push(rS(e,i.start,i.length,n,...r))}function Je(t,n,r,i){!function(t,n,r){const i=rS(e,n.pos,n.end-n.pos,r);t?e.bindDiagnostics.push(i):e.bindSuggestionDiagnostics=le(e.bindSuggestionDiagnostics,{...i,category:2})}(t,{pos:Hd(n,e),end:r.end},i)}function ze(t){if(!t)return;jT(t,r),Yn&&(t.tracingPath=e.path);const n=N;if(We(t),t.kind>166){const e=r;r=t;const n=pB(t);0===n?$(t):function(e,t){const n=i,r=o,s=a,c=T;if(220===e.kind&&242!==e.body.kind&&(T=!0),1&t?(220!==e.kind&&(o=i),i=a=e,32&t&&(i.locals=nd(),Ee(i))):2&t&&(a=e,32&t&&(a.locals=void 0)),4&t){const n=u,r=d,i=p,o=f,a=v,s=x,c=S,l=16&t&&!Lv(e,1024)&&!e.asteriskToken&&!!dm(e)||176===e.kind;l||(u=sB(2,void 0,void 0),144&t&&(u.node=e)),f=l||177===e.kind||Mm(e)&&(263===e.kind||219===e.kind)?te():void 0,v=void 0,d=void 0,p=void 0,x=void 0,S=!1,$(e),e.flags&=-5633,!(1&u.flags)&&8&t&&Ld(e.body)&&(e.flags|=512,S&&(e.flags|=1024),e.endFlowNode=u),308===e.kind&&(e.flags|=w,e.endFlowNode=u),f&&(oe(f,u),u=ue(f),(177===e.kind||176===e.kind||Mm(e)&&(263===e.kind||219===e.kind))&&(e.returnFlowNode=u)),l||(u=n),d=r,p=i,f=o,v=a,x=s,S=c}else 64&t?(l=!1,$(e),gn.assertNotNode(e,fD),e.flags=l?256|e.flags:-257&e.flags):$(e);T=c,i=n,o=r,a=s}(t,n),r=e}else{const e=r;1===t.kind&&(r=t),qe(t),r=e}N=n}function qe(e){if(Lu(e))if(Mm(e))for(const t of e.jsDoc)ze(t);else for(const t of e.jsDoc)jT(t,e),MT(t,!1)}function Ue(e){if(!N)for(const t of e){if(!bf(t))return;if(Ve(t))return void(N=!0)}}function Ve(t){const n=Qd(e,t.expression);return'"use strict"'===n||"'use strict'"===n}function We(n){switch(n.kind){case 80:if(4096&n.flags){let e=n.parent;for(;e&&!Lg(e);)e=e.parent;Oe(e,524288,788968);break}case 110:return u&&(Q_(n)||305===r.kind)&&(n.flowNode=u),Le(n);case 167:u&&Em(n)&&(n.flowNode=u);break;case 237:case 108:n.flowNode=u;break;case 81:return function(t){"#constructor"===t.escapedText&&(e.parseDiagnostics.length||e.bindDiagnostics.push(j(t,ha.constructor_is_a_reserved_word,Bp(t))))}(n);case 212:case 213:const o=n;u&&H(o)&&(o.flowNode=u),xg(o)&&function(e){110===e.expression.kind?Xe(e):dg(e)&&308===e.parent.parent.kind&&(vb(e.expression)?Ze(e,e.parent):et(e))}(o),Mm(o)&&e.commonJsModuleIndicator&&sg(o)&&!fB(a,"module")&&z(e.locals,void 0,o.expression,134217729,111550);break;case 227:switch(cg(n)){case 1:He(n);break;case 2:!function(t){if(!Ke(t))return;const n=ig(t.right);if(Cb(n)||i===e&&dB(e,n))return;if(vE(n)&&k(n.properties,dP))return void g(n.properties,Ge);const r=Sh(t)?2097152:1049092,o=z(e.symbol.exports,e.symbol,t,67108864|r,0);Sg(o,t)}(n);break;case 3:Ze(n.left,n);break;case 6:!function(e){jT(e.left,e),jT(e.right,e),ot(e.left.expression,e.left,!1,!0)}(n);break;case 4:Xe(n);break;case 5:const t=n.left.expression;if(Mm(n)&&fD(t)){const e=fB(a,t.escapedText);if(mm(null==e?void 0:e.valueDeclaration)){Xe(n);break}}!function(t){var n;const r=ct(t.left.expression,a)||ct(t.left.expression,i);if(!Mm(t)&&!kg(r))return;const o=Ox(t.left);if(fD(o)&&2097152&(null==(n=fB(i,o.escapedText))?void 0:n.flags))return;if(jT(t.left,t),jT(t.right,t),fD(t.left.expression)&&i===e&&dB(e,t.left.expression))He(t);else if(Wh(t)){Ie(t,67108868,"__computed");Ye(t,tt(r,t.left.expression,rt(t.left),!1,!1))}else et(st(t.left,fg))}(n);break;case 0:break;default:gn.fail("Unknown binary expression special property assignment kind")}return function(e){N&&W_(e.left)&&cb(e.operatorToken.kind)&&je(e,e.left)}(n);case 300:return function(e){N&&e.variableDeclaration&&je(e,e.variableDeclaration.name)}(n);case 221:return function(t){if(N&&80===t.expression.kind){const n=of(e,t.expression);e.bindDiagnostics.push(rS(e,n.start,n.length,ha.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(n);case 226:return function(e){N&&je(e,e.operand)}(n);case 225:return function(e){N&&(46!==e.operator&&47!==e.operator||je(e,e.operand))}(n);case 255:return function(e){N&&Be(e,ha.with_statements_are_not_allowed_in_strict_mode)}(n);case 257:return function(e){N&&wS(t)>=2&&(yu(e.statement)||ZE(e.statement))&&Be(e.label,ha.A_label_is_not_allowed_here)}(n);case 198:return void(l=!0);case 183:break;case 169:return function(e){if(QP(e.parent)){const t=Kg(e.parent);t?(gn.assertNode(t,fu),t.locals??(t.locals=nd()),z(t.locals,void 0,e,262144,526824)):Fe(e,262144,526824)}else if(196===e.parent.kind){const t=function(e){const t=yc(e,e=>e.parent&&iE(e.parent)&&e.parent.extendsType===e);return t&&t.parent}(e.parent);t?(gn.assertNode(t,fu),t.locals??(t.locals=nd()),z(t.locals,void 0,e,262144,526824)):Ie(e,262144,B(e))}else Fe(e,262144,526824)}(n);case 170:return ut(n);case 261:return _t(n);case 209:return n.flowNode=u,_t(n);case 173:case 172:return function(e){const t=b_(e),n=t?13247:0;return dt(e,(t?98304:4)|(e.questionToken?16777216:0),n)}(n);case 304:case 305:return dt(n,4,0);case 307:return dt(n,8,900095);case 180:case 181:case 182:return Fe(n,131072,0);case 175:case 174:return dt(n,8192|(n.questionToken?16777216:0),Kf(n)?0:103359);case 263:return function(t){e.isDeclarationFile||33554432&t.flags||qh(t)&&(w|=4096);Me(t),N?(Re(t),Oe(t,16,110991)):Fe(t,16,110991)}(n);case 177:return Fe(n,16384,0);case 178:return dt(n,32768,46015);case 179:return dt(n,65536,78783);case 185:case 318:case 324:case 186:return function(e){const t=M(131072,B(e));R(t,e,131072);const n=M(2048,"__type");R(n,e,2048),n.members=nd(),n.members.set(t.escapedName,t)}(n);case 188:case 323:case 201:return function(e){return Ie(e,2048,"__type")}(n);case 333:return function(e){W(e);const t=Gg(e);t&&175!==t.kind&&R(t.symbol,t,32)}(n);case 211:return function(e){return Ie(e,4096,"__object")}(n);case 219:case 220:return function(t){e.isDeclarationFile||33554432&t.flags||qh(t)&&(w|=4096);u&&(t.flowNode=u);Me(t);const n=t.name?t.name.escapedText:"__function";return Ie(t,16,n)}(n);case 214:switch(cg(n)){case 7:return function(e){let t=ct(e.arguments[0]);const n=308===e.parent.parent.kind;t=tt(t,e.arguments[0],n,!1,!1),nt(e,t,!1)}(n);case 8:return function(e){if(!Ke(e))return;const t=lt(e.arguments[0],void 0,(e,t)=>(t&&R(t,e,67110400),t));if(t){const n=1048580;z(t.exports,t,e,n,0)}}(n);case 9:return function(e){const t=ct(e.arguments[0].expression);t&&t.valueDeclaration&&R(t,t.valueDeclaration,32);nt(e,t,!0)}(n);case 0:break;default:return gn.fail("Unknown call expression assignment declaration kind")}Mm(n)&&function(t){!e.commonJsModuleIndicator&&qm(t,!1)&&Ke(t)}(n);break;case 232:case 264:return N=!0,function(t){if(264===t.kind)Oe(t,32,899503);else{Ie(t,32,t.name?t.name.escapedText:"__class"),t.name&&F.add(t.name.escapedText)}const{symbol:n}=t,r=M(4194308,"prototype"),i=n.exports.get(r.escapedName);i&&(t.name&&jT(t.name,t),e.bindDiagnostics.push(j(i.declarations[0],ha.Duplicate_identifier_0,Cc(r))));n.exports.set(r.escapedName,r),r.parent=n}(n);case 265:return Oe(n,64,788872);case 266:return Oe(n,524288,788968);case 267:return function(e){return lf(e)?Oe(e,128,899967):Oe(e,256,899327)}(n);case 268:return function(t){if(Pe(t),mp(t))if(Lv(t,32)&&Be(t,ha.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),Sp(t))Ae(t);else{let n;if(11===t.name.kind){const{text:e}=t.name;n=tT(e),void 0===n&&Be(t.name,ha.Pattern_0_can_have_at_most_one_Asterisk_character,e)}const r=Fe(t,512,110735);e.patternAmbientModules=le(e.patternAmbientModules,n&&!it(n)?{pattern:n,symbol:r}:void 0)}else{const e=Ae(t);if(0!==e){const{symbol:n}=t;n.constEnumOnlyModule=!(304&n.flags)&&2===e&&!1!==n.constEnumOnlyModule}}}(n);case 293:return function(e){return Ie(e,4096,"__jsxAttributes")}(n);case 292:return function(e,t,n){return Fe(e,t,n)}(n,4,0);case 272:case 275:case 277:case 282:return Fe(n,2097152,2097152);case 271:return function(t){X(t.modifiers)&&e.bindDiagnostics.push(j(t,ha.Modifiers_cannot_appear_here));const n=mP(t.parent)?fO(t.parent)?t.parent.isDeclarationFile?void 0:ha.Global_module_exports_may_only_appear_in_declaration_files:ha.Global_module_exports_may_only_appear_in_module_files:ha.Global_module_exports_may_only_appear_at_top_level;n?e.bindDiagnostics.push(j(t,n)):(e.symbol.globalExports=e.symbol.globalExports||nd(),z(e.symbol.globalExports,e.symbol,t,2097152,2097152))}(n);case 274:return function(e){e.name&&Fe(e,2097152,2097152)}(n);case 279:return function(e){i.symbol&&i.symbol.exports?e.exportClause?MF(e.exportClause)&&(jT(e.exportClause,e),z(i.symbol.exports,i.symbol,e.exportClause,2097152,2097152)):z(i.symbol.exports,i.symbol,e,8388608,0):Ie(e,8388608,B(e))}(n);case 278:return function(e){if(i.symbol&&i.symbol.exports){const t=Sh(e)?2097152:4,n=z(i.symbol.exports,i.symbol,e,t,-1);e.isExportEquals&&Sg(n,e)}else Ie(e,111551,B(e))}(n);case 308:return Ue(n.statements),function(){if(Pe(e),fO(e))$e();else if(cf(e)){$e();const t=e.symbol;z(e.symbol.exports,e.symbol,e,4,-1),e.symbol=t}}();case 242:if(!u_(n.parent))return;case 269:return Ue(n.statements);case 342:if(324===n.parent.kind)return ut(n);if(323!==n.parent.kind)break;case 349:const s=n;return Fe(s,s.isBracketed||s.typeExpression&&317===s.typeExpression.type.kind?16777220:4,0);case 347:case 339:case 341:return(c||(c=[])).push(n);case 340:return ze(n.typeExpression);case 352:return(_||(_=[])).push(n)}}function $e(){Ie(e,512,`"${Qk(e.fileName)}"`)}function Ke(t){return(!e.externalModuleIndicator||!0===e.externalModuleIndicator)&&(e.commonJsModuleIndicator||(e.commonJsModuleIndicator=t,e.externalModuleIndicator||$e()),!0)}function He(e){if(!Ke(e))return;const t=lt(e.left.expression,void 0,(e,t)=>(t&&R(t,e,67110400),t));if(t){const n=xh(e.right)&&(og(e.left.expression)||sg(e.left.expression))?2097152:1048580;jT(e.left,e),z(t.exports,t,e.left,n,0)}}function Ge(t){z(e.symbol.exports,e.symbol,t,69206016,0)}function Xe(e){gn.assert(Mm(e));if(LE(e)&&bE(e.left)&&mD(e.left.name)||bE(e)&&mD(e.name))return;const t=sm(e,!1,!1);switch(t.kind){case 263:case 219:let n=t.symbol;if(LE(t.parent)&&64===t.parent.operatorToken.kind){const e=t.parent.left;dg(e)&&vb(e.expression)&&(n=ct(e.expression.expression,o))}n&&n.valueDeclaration&&(n.members=n.members||nd(),Wh(e)?Qe(e,n,n.members):z(n.members,n,e,67108868,0),R(n,n.valueDeclaration,32));break;case 177:case 173:case 175:case 178:case 179:case 176:const r=t.parent,i=jv(t)?r.symbol.exports:r.symbol.members;Wh(e)?Qe(e,r.symbol,i):z(i,r.symbol,e,67108868,0,!0);break;case 308:if(Wh(e))break;t.commonJsModuleIndicator?z(t.symbol.exports,t.symbol,e,1048580,0):Fe(e,1,111550);break;case 268:break;default:gn.failBadSyntaxKind(t)}}function Qe(e,t,n){z(n,t,e,4,0,!0,!0),Ye(e,t)}function Ye(e,t){t&&(t.assignmentDeclarationMembers||(t.assignmentDeclarationMembers=new Map)).set(pJ(e),e)}function Ze(e,t){const n=e.expression,r=n.expression;jT(r,n),jT(n,e),jT(e,t),ot(r,e,!0,!0)}function et(e){gn.assert(!fD(e)),jT(e.expression,e),ot(e.expression,e,!1,!1)}function tt(t,n,r,i,o){if(2097152&(null==t?void 0:t.flags))return t;if(r&&!i){const r=67110400,i=110735;t=lt(n,t,(t,n,o)=>{if(n)return R(n,t,r),n;return z(o?o.exports:e.jsGlobalAugmentations||(e.jsGlobalAugmentations=nd()),o,t,r,i)})}return o&&t&&t.valueDeclaration&&R(t,t.valueDeclaration,32),t}function nt(e,t,n){if(!t||!function(e){if(1072&e.flags)return!0;const t=e.valueDeclaration;if(t&&SE(t))return!!Zm(t);let n=t?hF(t)?t.initializer:LE(t)?t.right:bE(t)&&LE(t.parent)?t.parent.right:void 0:void 0;if(n=n&&ig(n),n){const e=vb(hF(t)?t.name:LE(t)?t.left:t);return!!eg(!LE(n)||57!==n.operatorToken.kind&&61!==n.operatorToken.kind?n:n.right,e)}return!1}(t))return;const r=n?t.members||(t.members=nd()):t.exports||(t.exports=nd());let i=0,o=0;d_(Zm(e))?(i=8192,o=103359):SE(e)&&lg(e)&&(X(e.arguments[2].properties,e=>{const t=Ac(e);return!!t&&fD(t)&&"set"===kc(t)})&&(i|=65540,o|=78783),X(e.arguments[2].properties,e=>{const t=Ac(e);return!!t&&fD(t)&&"get"===kc(t)})&&(i|=32772,o|=46015)),0===i&&(i=4,o=0),z(r,t,e,67108864|i,-67108865&o)}function rt(e){return LE(e.parent)?308===function(e){for(;LE(e.parent);)e=e.parent;return e.parent}(e.parent).parent.kind:308===e.parent.parent.kind}function ot(e,t,n,r){let o=ct(e,a)||ct(e,i);const s=rt(t);o=tt(o,t.expression,s,n,r),nt(t,o,n)}function ct(e,t=i){if(fD(e))return fB(t,e.escapedText);{const t=ct(e.expression);return t&&t.exports&&t.exports.get(hg(e))}}function lt(t,n,r){if(dB(e,t))return e.symbol;if(fD(t))return r(t,ct(t),n);{const e=lt(t.expression,n,r),i=mg(t);return mD(i)&&gn.fail("unexpected PrivateIdentifier"),r(i,e&&e.exports&&e.exports.get(hg(t)),e)}}function _t(e){if(N&&je(e,e.name),!E_(e.name)){const t=261===e.kind?e:e.parent.parent;!Mm(e)||!Vm(t)||cl(e)||32&uc(e)?pp(e)?Oe(e,2,111551):iy(e)?Fe(e,1,111551):Fe(e,1,111550):Fe(e,2097152,2097152)}}function ut(e){if((342!==e.kind||324===i.kind)&&(!N||33554432&e.flags||je(e,e.name),E_(e.name)?Ie(e,1,"__"+e.parent.parameters.indexOf(e)):Fe(e,1,111551),ac(e,e.parent))){const t=e.parent.parent;z(t.symbol.members,t.symbol,e,4|(e.questionToken?16777216:0),0)}}function dt(t,n,r){return e.isDeclarationFile||33554432&t.flags||!qh(t)||(w|=4096),u&&Hf(t)&&(t.flowNode=u),Wh(t)?Ie(t,n,"__computed"):Fe(t,n,r)}}function uB(e,t){return 267===e.kind&&(!lf(e)||MS(t))}function dB(e,t){let n=0;const r=et();for(r.enqueue(t);!r.isEmpty()&&n<100;){if(n++,og(t=r.dequeue())||sg(t))return!0;if(fD(t)){const n=fB(e,t.escapedText);if(n&&n.valueDeclaration&&hF(n.valueDeclaration)&&n.valueDeclaration.initializer){const e=n.valueDeclaration.initializer;r.enqueue(e),ub(e,!0)&&(r.enqueue(e.left),r.enqueue(e.right))}}}return!1}function pB(e){switch(e.kind){case 232:case 264:case 267:case 211:case 188:case 323:case 293:return 1;case 265:return 65;case 268:case 266:case 201:case 182:return 33;case 308:return 37;case 178:case 179:case 175:if(Hf(e))return 173;case 177:case 263:case 174:case 180:case 324:case 318:case 185:case 181:case 186:case 176:return 45;case 352:return 37;case 219:case 220:return 61;case 269:return 4;case 173:return e.initializer?4:0;case 300:case 249:case 250:case 251:case 270:return 34;case 242:return __(e.parent)||RD(e.parent)?0:34}return 0}function fB(e,t){var n,r,i,o;const a=null==(r=null==(n=at(e,fu))?void 0:n.locals)?void 0:r.get(t);return a?a.exportSymbol??a:mP(e)&&e.jsGlobalAugmentations&&e.jsGlobalAugmentations.has(t)?e.jsGlobalAugmentations.get(t):pu(e)?null==(o=null==(i=e.symbol)?void 0:i.exports)?void 0:o.get(t):void 0}function mB(e,t,n,r,i,o,a,s,c,l){return function(_=()=>!0){const u=[],d=[];return{walkType:e=>{try{return p(e),{visitedTypes:Me(u),visitedSymbols:Me(d)}}finally{I(u),I(d)}},walkSymbol:e=>{try{return h(e),{visitedTypes:Me(u),visitedSymbols:Me(d)}}finally{I(u),I(d)}}};function p(e){if(!e)return;if(u[e.id])return;u[e.id]=e;if(!h(e.symbol)){if(524288&e.flags){const n=e,i=n.objectFlags;4&i&&function(e){p(e.target),g(l(e),p)}(e),32&i&&function(e){p(e.typeParameter),p(e.constraintType),p(e.templateType),p(e.modifiersType)}(e),3&i&&(m(t=e),g(t.typeParameters,p),g(r(t),p),p(t.thisType)),24&i&&m(n)}var t;262144&e.flags&&function(e){p(s(e))}(e),3145728&e.flags&&function(e){g(e.types,p)}(e),4194304&e.flags&&function(e){p(e.type)}(e),8388608&e.flags&&function(e){p(e.objectType),p(e.indexType),p(e.constraint)}(e)}}function f(r){const i=t(r);i&&p(i.type),g(r.typeParameters,p);for(const e of r.parameters)h(e);p(e(r)),p(n(r))}function m(e){const t=i(e);for(const e of t.indexInfos)p(e.keyType),p(e.type);for(const e of t.callSignatures)f(e);for(const e of t.constructSignatures)f(e);for(const e of t.properties)h(e)}function h(e){if(!e)return!1;const t=fJ(e);if(d[t])return!1;if(d[t]=e,!_(e))return!0;return p(o(e)),e.exports&&e.exports.forEach(h),g(e.declarations,e=>{if(e.type&&187===e.type.kind){const t=e.type;h(a(c(t.exprName)))}}),!1}}}var gB={};a(gB,{RelativePreference:()=>yB,countPathComponents:()=>AB,forEachFileNameOfModule:()=>LB,getLocalModuleSpecifierBetweenFileNames:()=>DB,getModuleSpecifier:()=>xB,getModuleSpecifierPreferences:()=>vB,getModuleSpecifiers:()=>wB,getModuleSpecifiersWithCacheInfo:()=>NB,getNodeModulesPackageName:()=>SB,tryGetJSExtensionForFile:()=>$B,tryGetModuleSpecifiersFromCache:()=>TB,tryGetRealFileNameForNonJsDeclarationFileName:()=>VB,updateModuleSpecifier:()=>bB});var hB=yt(e=>{try{let t=e.indexOf("/");if(0!==t)return new RegExp(e);const n=e.lastIndexOf("/");if(t===n)return new RegExp(e);for(;(t=e.indexOf("/",t+1))!==n;)if("\\"!==e[t-1])return new RegExp(e);const r=e.substring(n+1).replace(/[^iu]/g,"");return e=e.substring(1,n),new RegExp(e,r)}catch{return}}),yB=(e=>(e[e.Relative=0]="Relative",e[e.NonRelative=1]="NonRelative",e[e.Shortest=2]="Shortest",e[e.ExternalNonRelative=3]="ExternalNonRelative",e))(yB||{});function vB({importModuleSpecifierPreference:e,importModuleSpecifierEnding:t,autoImportSpecifierExcludeRegexes:n},r,i,o,a){const s=c();return{excludeRegexes:n,relativePreference:void 0!==a?As(a)?0:1:"relative"===e?0:"non-relative"===e?1:"project-relative"===e?3:2,getAllowedEndingsInPreferredOrder:e=>{const t=GB(o,r,i),n=e!==t?c(e):s,a=DS(i);if(99===(e??t)&&3<=a&&a<=99)return QR(i,o.fileName)?[3,2]:[2];if(1===DS(i))return 2===n?[2,1]:[1,2];const l=QR(i,o.fileName);switch(n){case 2:return l?[2,3,0,1]:[2,0,1];case 3:return[3,0,2,1];case 1:return l?[1,0,3,2]:[1,0,2];case 0:return l?[0,1,3,2]:[0,1,2];default:gn.assertNever(n)}}};function c(e){if(void 0!==a){if(qk(a))return 2;if(qt(a,"/index"))return 1}return $k(t,e??GB(o,r,i),i,Lm(o)?o:void 0)}}function bB(e,t,n,r,i,o,a={}){const s=kB(e,t,n,r,i,vB({},i,e,t,o),{},a);if(s!==o)return s}function xB(e,t,n,r,i,o={}){return kB(e,t,n,r,i,vB({},i,e,t),{},o)}function SB(e,t,n,r,i,o={}){const a=FB(t.fileName,r);return y(jB(a,n,r,i,e,o),n=>zB(n,a,t,r,e,i,!0,o.overrideImportMode))}function kB(e,t,n,r,i,o,a,s={}){const c=FB(n,i);return y(jB(c,r,i,a,e,s),n=>zB(n,c,t,i,e,a,void 0,s.overrideImportMode))||PB(r,c,e,i,s.overrideImportMode||GB(t,i,e),o)}function TB(e,t,n,r,i={}){const o=CB(e,t,n,r,i);return o[1]&&{kind:o[0],moduleSpecifiers:o[1],computedWithoutCache:!1}}function CB(e,t,n,r,i={}){var o;const a=Nd(e);if(!a)return p;const s=null==(o=n.getModuleSpecifierCache)?void 0:o.call(n),c=null==s?void 0:s.get(t.path,a.path,r,i);return[null==c?void 0:c.kind,null==c?void 0:c.moduleSpecifiers,a,null==c?void 0:c.modulePaths,s]}function wB(e,t,n,r,i,o,a={}){return NB(e,t,n,r,i,o,a,!1).moduleSpecifiers}function NB(e,t,n,r,i,o,a={},s){let c=!1;const l=function(e,t){var n;const r=null==(n=e.declarations)?void 0:n.find(e=>hp(e)&&(!xp(e)||!As(Gh(e.name))));if(r)return r.name.text;const i=U(e.declarations,e=>{var n,r,i,o;if(!TF(e))return;const a=l(e);if(!((null==(n=null==a?void 0:a.parent)?void 0:n.parent)&&CF(a.parent)&&mp(a.parent.parent)&&mP(a.parent.parent.parent)))return;const s=null==(o=null==(i=null==(r=a.parent.parent.symbol.exports)?void 0:r.get("export="))?void 0:i.valueDeclaration)?void 0:o.expression;if(!s)return;const c=t.getSymbolAtLocation(s);if(!c)return;if((2097152&(null==c?void 0:c.flags)?t.getAliasedSymbol(c):c)===e.symbol)return a.parent.parent;function l(e){for(;8&e.flags;)e=e.parent;return e}}),o=i[0];if(o)return o.name.text}(e,t);if(l)return{kind:"ambient",moduleSpecifiers:s&&EB(l,o.autoImportSpecifierExcludeRegexes)?p:[l],computedWithoutCache:c};let[_,u,d,f,m]=CB(e,r,i,o,a);if(u)return{kind:_,moduleSpecifiers:u,computedWithoutCache:c};if(!d)return{kind:void 0,moduleSpecifiers:p,computedWithoutCache:c};c=!0,f||(f=RB(FB(r.fileName,i),d.originalFileName,i,n,a));const h=function(e,t,n,r,i,o={},a){const s=FB(n.fileName,r),c=vB(i,r,t,n),l=Lm(n)&&g(e,e=>g(r.getFileIncludeReasons().get(Xo(e.path,r.getCurrentDirectory(),s.getCanonicalFileName)),e=>{if(3!==e.kind||e.file!==n.path)return;const t=r.getModeForResolutionAtIndex(n,e.index),i=o.overrideImportMode??r.getDefaultResolutionModeForFile(n);if(t!==i&&void 0!==t&&void 0!==i)return;const a=sW(n,e.index).text;return 1===c.relativePreference&&wo(a)?void 0:a}));if(l)return{kind:void 0,moduleSpecifiers:[l],computedWithoutCache:!0};const _=X(e,e=>e.isInNodeModules);let u,d,f,m;for(const l of e){const e=l.isInNodeModules?zB(l,s,n,r,t,i,void 0,o.overrideImportMode):void 0;if(e&&(!a||!EB(e,c.excludeRegexes))&&(u=le(u,e),l.isRedirect))return{kind:"node_modules",moduleSpecifiers:u,computedWithoutCache:!0};const p=PB(l.path,s,t,r,o.overrideImportMode||n.impliedNodeFormat,c,l.isRedirect||!!e);!p||a&&EB(p,c.excludeRegexes)||(l.isRedirect?f=le(f,p):No(p)?lR(p)?m=le(m,p):d=le(d,p):(a||!_||l.isInNodeModules)&&(m=le(m,p)))}return(null==d?void 0:d.length)?{kind:"paths",moduleSpecifiers:d,computedWithoutCache:!0}:(null==f?void 0:f.length)?{kind:"redirect",moduleSpecifiers:f,computedWithoutCache:!0}:(null==u?void 0:u.length)?{kind:"node_modules",moduleSpecifiers:u,computedWithoutCache:!0}:{kind:"relative",moduleSpecifiers:m??p,computedWithoutCache:!0}}(f,n,r,i,o,a,s);return null==m||m.set(r.path,d.path,o,a,h.kind,f,h.moduleSpecifiers),h}function DB(e,t,n,r,i,o={}){return PB(t,FB(e.fileName,r),n,r,o.overrideImportMode??e.impliedNodeFormat,vB(i,r,n,e))}function EB(e,t){return X(t,t=>{var n;return!!(null==(n=hB(t))?void 0:n.test(e))})}function FB(e,t){e=$o(e,t.getCurrentDirectory());const n=Xt(!t.useCaseSensitiveFileNames||t.useCaseSensitiveFileNames()),r=Lo(e);return{getCanonicalFileName:n,importingSourceFileName:e,sourceDirectory:r,canonicalSourceDirectory:n(r)}}function PB(e,t,n,r,i,{getAllowedEndingsInPreferredOrder:o,relativePreference:a,excludeRegexes:s},c){const{baseUrl:l,paths:_,rootDirs:u}=n;if(c&&!_)return;const{sourceDirectory:d,canonicalSourceDirectory:p,getCanonicalFileName:f}=t,m=o(i),h=u&&function(e,t,n,r,i,o){const a=qB(t,e,r);if(void 0===a)return;const s=qB(n,e,r),c=R(s,e=>O(a,t=>Zo(_a(e,t,r)))),l=Nt(c,Gk);if(!l)return;return UB(l,i,o)}(u,e,d,f,m,n)||UB(Zo(_a(d,e,f)),m,n);if(!l&&!_&&!OS(n)||0===a)return c?void 0:h;const y=$o(tv(n,r)||l,r.getCurrentDirectory()),v=KB(e,y,f);if(!v)return c?void 0:h;const b=c?void 0:function(e,t,n,r,i,o){var a,s,c;if(!r.readFile||!OS(n))return;const l=OB(r,t);if(!l)return;const _=Uo(l,"package.json"),u=null==(s=null==(a=r.getPackageJsonInfoCache)?void 0:a.call(r))?void 0:s.getPackageJsonInfo(_);if(OM(u)||!r.fileExists(_))return;const d=(null==u?void 0:u.contents.packageJsonContent)||Lb(r.readFile(_)),p=null==d?void 0:d.imports;if(!p)return;const f=FM(n,i);return null==(c=g(Le(p),t=>{if(!en(t,"#")||"#"===t||en(t,"#/"))return;const i=qt(t,"/")?1:t.includes("*")?2:0;return JB(n,r,e,l,t,p[t],f,i,!0,o)}))?void 0:c.moduleFileToTry}(e,d,n,r,i,function(e){const t=e.indexOf(3);return t>-1&&te.fileExists(Uo(t,"package.json"))?t:void 0)}function LB(e,t,n,r,i){var o,a;const s=Vy(n),c=n.getCurrentDirectory(),l=n.isSourceOfProjectReferenceRedirect(t)?null==(o=n.getRedirectFromSourceFile(t))?void 0:o.outputDts:void 0,_=Xo(t,c,s),u=n.redirectTargetsMap.get(_)||p,d=[...l?[l]:p,t,...u].map(e=>$o(e,c));let f=!k(d,zT);if(!r){const e=g(d,e=>!(f&&zT(e))&&i(e,l===e));if(e)return e}const m=null==(a=n.getSymlinkCache)?void 0:a.call(n).getSymlinkedDirectoriesByRealpath(),h=$o(t,c);return m&&RR(n,Lo(h),t=>{const n=m.get(Yo(Xo(t,c,s)));if(n)return!ca(e,t,s)&&g(d,e=>{if(!ca(e,t,s))return;const r=_a(t,e,s);for(const t of n){const n=Vo(t,r),o=i(n,e===l);if(f=!0,o)return o}})})||(r?g(d,e=>f&&zT(e)?void 0:i(e,e===l)):void 0)}function jB(e,t,n,r,i,o={}){var a;const s=Xo(e.importingSourceFileName,n.getCurrentDirectory(),Vy(n)),c=Xo(t,n.getCurrentDirectory(),Vy(n)),l=null==(a=n.getModuleSpecifierCache)?void 0:a.call(n);if(l){const e=l.get(s,c,r,o);if(null==e?void 0:e.modulePaths)return e.modulePaths}const _=RB(e,t,n,i,o);return l&&l.setModulePaths(s,c,r,o,_),_}var MB=["dependencies","peerDependencies","optionalDependencies"];function RB(e,t,n,r,i){var o,a;const s=null==(o=n.getModuleResolutionCache)?void 0:o.call(n),c=null==(a=n.getSymlinkCache)?void 0:a.call(n);if(s&&c&&n.readFile&&!lR(e.importingSourceFileName)){gn.type(n);const t=SR(s.getPackageJsonInfoCache(),n,{}),o=kR(Lo(e.importingSourceFileName),t);if(o){const e=function(e){let t;for(const n of MB){const r=e[n];r&&"object"==typeof r&&(t=Y(t,Le(r)))}return t}(o.contents.packageJsonContent);for(const t of e||p){const e=XM(t,Uo(o.packageDirectory,"package.json"),r,n,s,void 0,i.overrideImportMode);c.setSymlinksFromResolution(e.resolvedModule)}}}const l=new Map;let _=!1;LB(e.importingSourceFileName,t,n,!0,(t,n)=>{const r=lR(t);l.set(t,{path:e.getCanonicalFileName(t),isRedirect:n,isInNodeModules:r}),_=_||r});const u=[];for(let t=e.canonicalSourceDirectory;0!==l.size;){const e=Yo(t);let n;l.forEach(({path:t,isRedirect:r,isInNodeModules:i},o)=>{en(t,e)&&((n||(n=[])).push({path:o,isRedirect:r,isInNodeModules:i}),l.delete(o))}),n&&(n.length>1&&n.sort(IB),u.push(...n));const r=Lo(t);if(r===t)break;t=r}if(l.size){const e=Be(l.entries(),([e,{isRedirect:t,isInNodeModules:n}])=>({path:e,isRedirect:t,isInNodeModules:n}));e.length>1&&e.sort(IB),u.push(...e)}return u}function BB(e,t,n,r,i,o,a){for(const o in t)for(const c of t[o]){const t=Ko(c),l=KB(t,r,i)??t,_=l.indexOf("*"),u=n.map(t=>({ending:t,value:UB(e,[t],a)}));if(lT(l)&&u.push({ending:void 0,value:e}),-1!==_){const e=l.substring(0,_),t=l.substring(_+1);for(const{ending:n,value:r}of u)if(r.length>=e.length+t.length&&en(r,e)&&qt(r,t)&&s({ending:n,value:r})){const n=r.substring(e.length,r.length-t.length);if(!wo(n))return bC(o,n)}}else if(X(u,e=>0!==e.ending&&l===e.value)||X(u,e=>0===e.ending&&l===e.value&&s(e)))return o}function s({ending:t,value:n}){return 0!==t||n===UB(e,[t],a,o)}}function JB(e,t,n,r,i,o,a,s,c,l){if("string"==typeof o){const a=!Uy(t),_=()=>t.getCommonSourceDirectory(),u=c&&yU(n,e,a,_),d=c&&gU(n,e,a,_),p=$o(Uo(r,o),void 0),f=Uk(n)?Qk(n)+$B(n,e):void 0,m=l&&Vk(n);switch(s){case 0:if(f&&0===aa(f,p,a)||0===aa(n,p,a)||u&&0===aa(u,p,a)||d&&0===aa(d,p,a))return{moduleFileToTry:i};break;case 1:if(m&&sa(n,p,a)){const e=_a(p,n,!1);return{moduleFileToTry:$o(Uo(Uo(i,o),e),void 0)}}if(f&&sa(p,f,a)){const e=_a(p,f,!1);return{moduleFileToTry:$o(Uo(Uo(i,o),e),void 0)}}if(!m&&sa(p,n,a)){const e=_a(p,n,!1);return{moduleFileToTry:$o(Uo(Uo(i,o),e),void 0)}}if(u&&sa(p,u,a)){const e=_a(p,u,!1);return{moduleFileToTry:Uo(i,e)}}if(d&&sa(p,d,a)){const t=ta(_a(p,d,!1),WB(d,e));return{moduleFileToTry:Uo(i,t)}}break;case 2:const t=p.indexOf("*"),r=p.slice(0,t),s=p.slice(t+1);if(m&&en(n,r,a)&&qt(n,s,a)){const e=n.slice(r.length,n.length-s.length);return{moduleFileToTry:bC(i,e)}}if(f&&en(f,r,a)&&qt(f,s,a)){const e=f.slice(r.length,f.length-s.length);return{moduleFileToTry:bC(i,e)}}if(!m&&en(n,r,a)&&qt(n,s,a)){const e=n.slice(r.length,n.length-s.length);return{moduleFileToTry:bC(i,e)}}if(u&&en(u,r,a)&&qt(u,s,a)){const e=u.slice(r.length,u.length-s.length);return{moduleFileToTry:bC(i,e)}}if(d&&en(d,r,a)&&qt(d,s,a)){const t=d.slice(r.length,d.length-s.length),n=bC(i,t),o=$B(d,e);return o?{moduleFileToTry:ta(n,o)}:void 0}}}else{if(Array.isArray(o))return g(o,o=>JB(e,t,n,r,i,o,a,s,c,l));if("object"==typeof o&&null!==o)for(const _ of Le(o))if("default"===_||a.indexOf(_)>=0||LR(a,_)){const u=o[_],d=JB(e,t,n,r,i,u,a,s,c,l);if(d)return d}}}function zB({path:e,isRedirect:t},{getCanonicalFileName:n,canonicalSourceDirectory:r},i,o,a,s,c,l){if(!o.fileExists||!o.readFile)return;const _=QT(e);if(!_)return;const u=vB(s,o,a,i).getAllowedEndingsInPreferredOrder();let d=e,p=!1;if(!c){let t,n=_.packageRootIndex;for(;;){const{moduleFileToTry:r,packageRootPath:i,blockedByExports:s,verbatimFromExports:c}=v(n);if(1!==DS(a)){if(s)return;if(c)return r}if(i){d=i,p=!0;break}if(t||(t=r),n=e.indexOf(ho,n+1),-1===n){d=UB(t,u,a,o);break}}}if(t&&!p)return;const f=o.getGlobalTypingsCacheLocation&&o.getGlobalTypingsCacheLocation(),m=n(d.substring(0,_.topLevelNodeModulesIndex));if(!(en(r,m)||f&&en(n(f),m)))return;const h=d.substring(_.topLevelPackageNameIndex+1),y=$R(h);return 1===DS(a)&&y===h?void 0:y;function v(t){var r,s;const c=e.substring(0,t),d=Uo(c,"package.json");let p=e,f=!1;const m=null==(s=null==(r=o.getPackageJsonInfoCache)?void 0:r.call(o))?void 0:s.getPackageJsonInfo(d);if(IM(m)||void 0===m&&o.fileExists(d)){const t=(null==m?void 0:m.contents.packageJsonContent)||Lb(o.readFile(d)),r=l||GB(i,o,a);if(IS(a)){const n=$R(c.substring(_.topLevelPackageNameIndex+1)),i=FM(a,r),s=(null==t?void 0:t.exports)?function(e,t,n,r,i,o,a){return"object"==typeof o&&null!==o&&!Array.isArray(o)&&FR(o)?g(Le(o),s=>{const c=$o(Uo(i,s),void 0),l=qt(s,"/")?1:s.includes("*")?2:0;return JB(e,t,n,r,c,o[s],a,l,!1,!1)}):JB(e,t,n,r,i,o,a,0,!1,!1)}(a,o,e,c,n,t.exports,i):void 0;if(s)return{...s,verbatimFromExports:!0};if(null==t?void 0:t.exports)return{moduleFileToTry:e,blockedByExports:!0}}const s=(null==t?void 0:t.typesVersions)?SM(t.typesVersions):void 0;if(s){const t=BB(e.slice(c.length+1),s.paths,u,c,n,o,a);void 0===t?f=!0:p=Uo(c,t)}const h=(null==t?void 0:t.typings)||(null==t?void 0:t.types)||(null==t?void 0:t.main)||"index.js";if(it(h)&&(!f||!dT(rT(s.paths),h))){const e=Xo(h,c,n),r=n(p);if(Qk(e)===Qk(r))return{packageRootPath:c,moduleFileToTry:p};if("module"!==(null==t?void 0:t.type)&&!Fo(r,Bk)&&en(r,e)&&Lo(r)===Qo(e)&&"index"===Qk(jo(r)))return{packageRootPath:c,moduleFileToTry:p}}}else{const e=n(p.substring(_.packageRootIndex+1));if("index.d.ts"===e||"index.js"===e||"index.ts"===e||"index.tsx"===e)return{moduleFileToTry:p,packageRootPath:c}}return{moduleFileToTry:p}}}function qB(e,t,n){return U(t,t=>{const r=KB(e,t,n);return void 0!==r&&HB(r)?void 0:r})}function UB(e,t,n,r){if(Fo(e,[".json",".mjs",".cjs"]))return e;const i=Qk(e);if(e===i)return e;const o=t.indexOf(2),a=t.indexOf(3);if(Fo(e,[".mts",".cts"])&&-1!==a&&a0===e||1===e);return-1!==r&&r(e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBigInt=4]="TypeofEQBigInt",e[e.TypeofEQBoolean=8]="TypeofEQBoolean",e[e.TypeofEQSymbol=16]="TypeofEQSymbol",e[e.TypeofEQObject=32]="TypeofEQObject",e[e.TypeofEQFunction=64]="TypeofEQFunction",e[e.TypeofEQHostObject=128]="TypeofEQHostObject",e[e.TypeofNEString=256]="TypeofNEString",e[e.TypeofNENumber=512]="TypeofNENumber",e[e.TypeofNEBigInt=1024]="TypeofNEBigInt",e[e.TypeofNEBoolean=2048]="TypeofNEBoolean",e[e.TypeofNESymbol=4096]="TypeofNESymbol",e[e.TypeofNEObject=8192]="TypeofNEObject",e[e.TypeofNEFunction=16384]="TypeofNEFunction",e[e.TypeofNEHostObject=32768]="TypeofNEHostObject",e[e.EQUndefined=65536]="EQUndefined",e[e.EQNull=131072]="EQNull",e[e.EQUndefinedOrNull=262144]="EQUndefinedOrNull",e[e.NEUndefined=524288]="NEUndefined",e[e.NENull=1048576]="NENull",e[e.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",e[e.Truthy=4194304]="Truthy",e[e.Falsy=8388608]="Falsy",e[e.IsUndefined=16777216]="IsUndefined",e[e.IsNull=33554432]="IsNull",e[e.IsUndefinedOrNull=50331648]="IsUndefinedOrNull",e[e.All=134217727]="All",e[e.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",e[e.BaseStringFacts=12582401]="BaseStringFacts",e[e.StringStrictFacts=16317953]="StringStrictFacts",e[e.StringFacts=16776705]="StringFacts",e[e.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",e[e.EmptyStringFacts=12582401]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",e[e.BaseNumberFacts=12582146]="BaseNumberFacts",e[e.NumberStrictFacts=16317698]="NumberStrictFacts",e[e.NumberFacts=16776450]="NumberFacts",e[e.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",e[e.ZeroNumberFacts=12582146]="ZeroNumberFacts",e[e.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",e[e.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",e[e.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",e[e.BaseBigIntFacts=12581636]="BaseBigIntFacts",e[e.BigIntStrictFacts=16317188]="BigIntStrictFacts",e[e.BigIntFacts=16775940]="BigIntFacts",e[e.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",e[e.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",e[e.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",e[e.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",e[e.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=12580616]="BaseBooleanFacts",e[e.BooleanStrictFacts=16316168]="BooleanStrictFacts",e[e.BooleanFacts=16774920]="BooleanFacts",e[e.FalseStrictFacts=12121864]="FalseStrictFacts",e[e.FalseFacts=12580616]="FalseFacts",e[e.TrueStrictFacts=7927560]="TrueStrictFacts",e[e.TrueFacts=16774920]="TrueFacts",e[e.SymbolStrictFacts=7925520]="SymbolStrictFacts",e[e.SymbolFacts=16772880]="SymbolFacts",e[e.ObjectStrictFacts=7888800]="ObjectStrictFacts",e[e.ObjectFacts=16736160]="ObjectFacts",e[e.FunctionStrictFacts=7880640]="FunctionStrictFacts",e[e.FunctionFacts=16728e3]="FunctionFacts",e[e.VoidFacts=9830144]="VoidFacts",e[e.UndefinedFacts=26607360]="UndefinedFacts",e[e.NullFacts=42917664]="NullFacts",e[e.EmptyObjectStrictFacts=83427327]="EmptyObjectStrictFacts",e[e.EmptyObjectFacts=83886079]="EmptyObjectFacts",e[e.UnknownFacts=83886079]="UnknownFacts",e[e.AllTypeofNE=556800]="AllTypeofNE",e[e.OrFactsMask=8256]="OrFactsMask",e[e.AndFactsMask=134209471]="AndFactsMask",e))(oJ||{}),aJ=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384})),sJ=(e=>(e[e.Normal=0]="Normal",e[e.Contextual=1]="Contextual",e[e.Inferential=2]="Inferential",e[e.SkipContextSensitive=4]="SkipContextSensitive",e[e.SkipGenericFunctions=8]="SkipGenericFunctions",e[e.IsForSignatureHelp=16]="IsForSignatureHelp",e[e.RestBindingElement=32]="RestBindingElement",e[e.TypeOnly=64]="TypeOnly",e))(sJ||{}),cJ=(e=>(e[e.None=0]="None",e[e.BivariantCallback=1]="BivariantCallback",e[e.StrictCallback=2]="StrictCallback",e[e.IgnoreReturnTypes=4]="IgnoreReturnTypes",e[e.StrictArity=8]="StrictArity",e[e.StrictTopSignature=16]="StrictTopSignature",e[e.Callback=3]="Callback",e))(cJ||{}),lJ=on(hJ,function(e){return!v_(e)}),_J=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4})),uJ=class{};function dJ(){this.flags=0}function pJ(e){return e.id||(e.id=nJ,nJ++),e.id}function fJ(e){return e.id||(e.id=tJ,tJ++),e.id}function mJ(e,t){const n=rB(e);return 1===n||t&&2===n}function gJ(e){var t,n,r,i,o=[],a=e=>{o.push(e)},s=Wx.getSymbolConstructor(),c=Wx.getTypeConstructor(),l=Wx.getSignatureConstructor(),_=0,u=0,d=0,f=0,h=0,v=0,b=!1,x=nd(),S=[1],E=e.getCompilerOptions(),A=wS(E),L=NS(E),B=!!E.experimentalDecorators,J=zS(E),z=XS(E),q=AS(E),V=HS(E,"strictNullChecks"),K=HS(E,"strictFunctionTypes"),H=HS(E,"strictBindCallApply"),G=HS(E,"strictPropertyInitialization"),Q=HS(E,"strictBuiltinIteratorReturn"),Z=HS(E,"noImplicitAny"),te=HS(E,"noImplicitThis"),re=HS(E,"useUnknownInCatchVariables"),ie=E.exactOptionalPropertyTypes,oe=!!E.noUncheckedSideEffectImports,se=function(){const e=yI(function(e,t,r){t?(t.stackIndex++,t.skip=!1,n(t,void 0),i(t,void 0)):t={checkMode:r,skip:!1,stackIndex:0,typeStack:[void 0,void 0]};if(Mm(e)&&Zm(e))return t.skip=!0,i(t,WM(e.right,r)),t;!function(e){if(61!==e.operatorToken.kind)return;if(LE(e.parent)){const{left:t,operatorToken:n}=e.parent;LE(t)&&57===n.kind&&Wq(t,ha._0_and_1_operations_cannot_be_mixed_without_parentheses,ja(61),ja(n.kind))}else if(LE(e.left)){const{operatorToken:t}=e.left;57!==t.kind&&56!==t.kind||Wq(e.left,ha._0_and_1_operations_cannot_be_mixed_without_parentheses,ja(t.kind),ja(61))}else if(LE(e.right)){const{operatorToken:t}=e.right;56===t.kind&&Wq(e.right,ha._0_and_1_operations_cannot_be_mixed_without_parentheses,ja(61),ja(t.kind))}(function(e){const t=LA(e.left,63),n=hM(t);3!==n&&Jo(t,1===n?ha.This_expression_is_always_nullish:ha.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish)})(e),function(e){const t=LA(e.right,63),n=hM(t);if(function(e){return!LE(e.parent)||61!==e.parent.operatorToken.kind}(e))return;1===n?Jo(t,ha.This_expression_is_always_nullish):2===n&&Jo(t,ha.This_expression_is_never_nullish)}(e)}(e);if(64===e.operatorToken.kind&&(211===e.left.kind||210===e.left.kind))return t.skip=!0,i(t,fM(e.left,WM(e.right,r),r,110===e.right.kind)),t;return t},function(e,n,r){if(!n.skip)return t(n,e)},function(e,t,o){if(!t.skip){const a=r(t);gn.assertIsDefined(a),n(t,a),i(t,void 0);const s=e.kind;if(ab(s)){let e=o.parent;for(;218===e.kind||sb(e);)e=e.parent;(56===s||nF(e))&&vB(o.left,a,nF(e)?e.thenStatement:void 0),nb(s)&&bB(a,o.left)}}},function(e,n,r){if(!n.skip)return t(n,e)},function(e,t){let o;if(t.skip)o=r(t);else{const n=function(e){return e.typeStack[e.stackIndex]}(t);gn.assertIsDefined(n);const i=r(t);gn.assertIsDefined(i),o=yM(e.left,e.operatorToken,e.right,n,i,t.checkMode,e)}return t.skip=!1,n(t,void 0),i(t,void 0),t.stackIndex--,o},function(e,t,n){return i(e,t),e});return(t,n)=>{const r=e(t,n);return gn.assertIsDefined(r),r};function t(e,t){if(LE(t))return t;i(e,WM(t,e.checkMode))}function n(e,t){e.typeStack[e.stackIndex]=t}function r(e){return e.typeStack[e.stackIndex+1]}function i(e,t){e.typeStack[e.stackIndex+1]=t}}(),_e={getReferencedExportContainer:jz,getReferencedImportDeclaration:Mz,getReferencedDeclarationWithCollidingName:Bz,isDeclarationWithCollidingName:Jz,isValueAliasDeclaration:e=>{const t=bc(e);return!t||!je||zz(t)},hasGlobalName:sq,isReferencedAliasDeclaration:(e,t)=>{const n=bc(e);return!n||!je||Wz(n,t)},hasNodeCheckFlag:(e,t)=>{const n=bc(e);return!!n&&Qz(n,t)},isTopLevelValueImportEqualsWithEntityName:qz,isDeclarationVisible:Vc,isImplementationOfOverload:$z,requiresAddingImplicitUndefined:Kz,isExpandoFunctionDeclaration:Hz,getPropertiesOfContainerFunction:Gz,createTypeOfDeclaration:rq,createReturnTypeOfSignatureDeclaration:oq,createTypeOfExpression:aq,createLiteralConstValue:dq,isSymbolAccessible:tc,isEntityNameVisible:_c,getConstantValue:e=>{const t=bc(e,Zz);return t?eq(t):void 0},getEnumMemberValue:e=>{const t=bc(e,fP);return t?Yz(t):void 0},collectLinkedAliases:$c,markLinkedReferences:e=>{const t=bc(e);return t&&xP(t,0)},getReferencedValueDeclaration:lq,getReferencedValueDeclarations:_q,getTypeReferenceSerializationKind:nq,isOptionalParameter:Ng,isArgumentsLocalBinding:Lz,getExternalModuleFileFromDeclaration:e=>{const t=bc(e,Op);return t&&gq(t)},isLiteralConstDeclaration:uq,isLateBound:e=>{const t=bc(e,hu),n=t&&xs(t);return!!(n&&4096&ux(n))},getJsxFactoryEntity:pq,getJsxFragmentFactoryEntity:fq,isBindingCapturedByNode:(e,t)=>{const n=bc(e),r=bc(t);return!!n&&!!r&&(hF(r)||hE(r))&&function(e,t){const n=la(e);return!!n&&D(n.capturedBlockScopeBindings,xs(t))}(n,r)},getDeclarationStatementsForSourceFile:(e,t,n,r)=>{const i=bc(e);gn.assert(i&&308===i.kind,"Non-sourcefile node passed into getDeclarationsForSourceFile");const o=xs(e);return o?(cs(o),o.exports?ue.symbolTableToDeclarationStatements(o.exports,e,t,n,r):[]):e.locals?ue.symbolTableToDeclarationStatements(e.locals,e,t,n,r):[]},isImportRequiredByAugmentation:function(e){const t=wd(e);if(!t.symbol)return!1;const n=gq(e);if(!n)return!1;if(n===t)return!1;const r=hs(t.symbol);for(const e of Be(r.values()))if(e.mergeId){const t=bs(e);if(t.declarations)for(const e of t.declarations)if(wd(e)===n)return!0}return!1},isDefinitelyReferenceToGlobalSymbolObject:Po,createLateBoundIndexSignatures:(e,t,n,r,i)=>{const o=e.symbol,a=Gm(j_(o)),s=Bh(o),c=s&&Zh(s,Be(Td(o).values()));let l;for(const e of[a,c])if(m(e)){l||(l=[]);for(const o of e){if(o.declaration)continue;if(o===di)continue;if(o.components&&k(o.components,e=>{var n;return!!(e.name&&FD(e.name)&&fb(e.name.expression)&&t&&0===(null==(n=_c(e.name.expression,t,!1))?void 0:n.accessibility))})){const s=P(o.components,e=>!md(e));l.push(...O(s,s=>{_(s.name.expression);const c=e===a?[kw.createModifier(126)]:void 0;return kw.createPropertyDeclaration(le(c,o.isReadonly?kw.createModifier(148):void 0),s.name,(OD(s)||LD(s)||jD(s)||MD(s)||Ou(s)||Iu(s))&&s.questionToken?kw.createToken(58):void 0,ue.typeToTypeNode(j_(s.symbol),t,n,r,i),void 0)}));continue}const s=ue.indexInfoToIndexSignatureDeclaration(o,t,n,r,i);s&&e===a&&(s.modifiers||(s.modifiers=kw.createNodeArray())).unshift(kw.createModifier(126)),s&&l.push(s)}}return l;function _(e){if(!i.trackSymbol)return;const n=mb(e),r=ze(n,n.escapedText,1160127,void 0,!0);r&&i.trackSymbol(r,t,111551)}},symbolToDeclarations:(e,t,n,r,i,o)=>ue.symbolToDeclarations(e,t,n,r,i,o)},ue=function(){return{syntacticBuilderResolver:{evaluateEntityNameExpression:UJ,isExpandoFunctionDeclaration:Hz,hasLateBindableName:md,shouldRemoveDeclaration:(e,t)=>!(8&e.internalFlags&&fb(t.name.expression)&&1&uI(t.name).flags),createRecoveryBoundary:e=>function(e){t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();let n,r,i=!1;const o=e.tracker,a=e.trackedSymbols;e.trackedSymbols=void 0;const s=e.encounteredError;return e.tracker=new SJ(e,{...o.inner,reportCyclicStructureError(){c(()=>o.reportCyclicStructureError())},reportInaccessibleThisError(){c(()=>o.reportInaccessibleThisError())},reportInaccessibleUniqueSymbolError(){c(()=>o.reportInaccessibleUniqueSymbolError())},reportLikelyUnsafeImportRequiredError(e){c(()=>o.reportLikelyUnsafeImportRequiredError(e))},reportNonSerializableProperty(e){c(()=>o.reportNonSerializableProperty(e))},reportPrivateInBaseOfClassExpression(e){c(()=>o.reportPrivateInBaseOfClassExpression(e))},trackSymbol:(e,t,r)=>((n??(n=[])).push([e,t,r]),!1),moduleResolverHost:e.tracker.moduleResolverHost},e.tracker.moduleResolverHost),{startRecoveryScope:l,finalizeBoundary:_,markError:c,hadError:()=>i};function c(e){i=!0,e&&(r??(r=[])).push(e)}function l(){const e=(null==n?void 0:n.length)??0,t=(null==r?void 0:r.length)??0;return()=>{i=!1,n&&(n.length=e),r&&(r.length=t)}}function _(){return e.tracker=o,e.trackedSymbols=a,e.encounteredError=s,null==r||r.forEach(e=>e()),!i&&(null==n||n.forEach(([t,n,r])=>e.tracker.trackSymbol(t,n,r)),!0)}}(e),isDefinitelyReferenceToGlobalSymbolObject:Po,getAllAccessorDeclarations:iq,requiresAddingImplicitUndefined(e,t,n){var r;switch(e.kind){case 173:case 172:case 349:t??(t=xs(e));const i=j_(t);return!!(4&t.flags&&16777216&t.flags&&iC(e)&&(null==(r=t.links)?void 0:r.mappedType)&&function(e){const t=1048576&e.flags?e.types[0]:e;return!!(32768&t.flags)&&t!==Mt}(i));case 170:case 342:return Kz(e,n);default:gn.assertNever(e)}},isOptionalParameter:Ng,isUndefinedIdentifierExpression:e=>Nz(e)===Ce,isEntityNameVisible:(e,t,n)=>_c(t,e.enclosingDeclaration,n),serializeExistingTypeNode:(e,t,r)=>function(e,t,r){const i=n(e,t);if(r&&!fE(i,e=>!!(32768&e.flags))&&Se(e,t)){const n=me.tryReuseExistingTypeNode(e,t);if(n)return kw.createUnionTypeNode([n,kw.createKeywordTypeNode(157)])}return h(i,e)}(e,t,!!r),serializeReturnTypeForSignature(e,t,n){const r=e,i=Rg(t);n??(n=xs(t));const o=r.enclosingSymbolTypes.get(fJ(n))??Ck(ah(i),r.mapper);return ve(r,i,o)},serializeTypeOfExpression(e,t){const n=e;return h(Ck(Hw(Fz(t)),n.mapper),n)},serializeTypeOfDeclaration(e,t,n){var r;const i=e;n??(n=xs(t));let o=null==(r=i.enclosingSymbolTypes)?void 0:r.get(fJ(n));void 0===o&&(o=98304&n.flags&&179===t.kind?Ck(L_(n),i.mapper):!n||133120&n.flags?Ft:Ck(_w(j_(n)),i.mapper));return t&&(AD(t)||KP(t))&&Kz(t,i.enclosingDeclaration)&&(o=ww(o)),ge(n,i,o)},serializeNameOfParameter:(e,t)=>W(xs(t),t,e),serializeEntityName(e,t){const n=e,r=Nz(t,!0);if(r&&Ys(r,n.enclosingDeclaration))return se(r,n,1160127)},serializeTypeName:(e,t,n,r)=>function(e,t,n,r){const i=n?111551:788968,o=ts(t,i,!0);if(!o)return;const a=2097152&o.flags?$a(o):o;return 0!==tc(o,e.enclosingDeclaration,i,!1).accessibility?void 0:re(a,e,i,r)}(e,t,n,r),getJsDocPropertyOverride(e,t,r){const i=e,o=fD(r.name)?r.name:r.name.right,a=Yc(n(i,t),o.escapedText);return a&&r.typeExpression&&n(i,r.typeExpression.type)!==a?h(a,i):void 0},enterNewScope(e,t){if(__(t)||IP(t)){const n=Rg(t);return L(e,t,n.parameters,n.typeParameters)}return L(e,t,void 0,iE(t)?tS(t):[Eu(xs(t.typeParameter))])},markNodeReuse:(e,t,n)=>r(e,t,n),trackExistingEntityName:(e,t)=>be(t,e),trackComputedName(e,t){$(t,e.enclosingDeclaration,e)},getModuleSpecifierOverride(e,t,n){const r=e;if(r.bundled||r.enclosingFile!==wd(n)){let e=n.text;const i=e,o=la(t).resolvedSymbol,a=t.isTypeOf?111551:788968,s=o&&0===tc(o,r.enclosingDeclaration,a,!1).accessibility&&K(o,r,a,!0)[0];if(s&&id(s))e=te(s,r);else{const n=gq(t);n&&(e=te(n.symbol,r))}if(e.includes("/node_modules/")&&(r.encounteredError=!0,r.tracker.reportLikelyUnsafeImportRequiredError&&r.tracker.reportLikelyUnsafeImportRequiredError(e)),e!==i)return e}},canReuseTypeNode:(e,t)=>Se(e,t),canReuseTypeNodeAnnotation(e,t,n,r,i){var o;const a=e;if(void 0===a.enclosingDeclaration)return!1;r??(r=xs(t));let s=null==(o=a.enclosingSymbolTypes)?void 0:o.get(fJ(r));void 0===s&&(s=98304&r.flags?179===t.kind?L_(r):k_(r):sh(t)?ah(Rg(t)):j_(r));let c=Pc(n);return!!nl(c)||(i&&c&&(c=Pl(c,!AD(t))),!!c&&function(e,t,n){if(n===t)return!0;if(!e)return!1;if((OD(e)||LD(e))&&e.questionToken)return uD(t,524288)===n;if(AD(e)&&wg(e))return uD(t,524288)===n;return!1}(t,s,c)&&fe(n,s))}},typeToTypeNode:(e,t,n,r,i,o,a,c)=>s(t,n,r,i,o,a,t=>h(e,t),c),typePredicateToTypePredicateNode:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>J(e,t)),serializeTypeForDeclaration:(e,t,n,r,i,o)=>s(n,r,i,o,void 0,void 0,n=>me.serializeTypeOfDeclaration(e,t,n)),serializeReturnTypeForSignature:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>me.serializeReturnTypeForSignature(e,xs(e),t)),serializeTypeForExpression:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>me.serializeTypeOfExpression(e,t)),indexInfoToIndexSignatureDeclaration:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>N(e,t,void 0)),signatureToSignatureDeclaration:(e,t,n,r,i,o,a,c,l)=>s(n,r,i,o,a,c,n=>I(e,t,n),l),symbolToEntityName:(e,t,n,r,i,o)=>s(n,r,i,o,void 0,void 0,n=>ae(e,n,t,!1)),symbolToExpression:(e,t,n,r,i,o)=>s(n,r,i,o,void 0,void 0,n=>se(e,n,t)),symbolToTypeParameterDeclarations:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>G(e,t)),symbolToParameterDeclaration:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>V(e,t)),typeParameterToDeclaration:(e,t,n,r,i,o,a,c)=>s(t,n,r,i,o,a,t=>B(e,t),c),symbolTableToDeclarationStatements:(e,t,n,r,i)=>s(t,n,r,i,void 0,void 0,t=>ke(e,t)),symbolToNode:(e,t,n,r,i,a)=>s(n,r,i,a,void 0,void 0,n=>o(e,n,t)),symbolToDeclarations:function(e,t,n,r,i,o){return U(s(void 0,n,void 0,void 0,r,i,t=>function(e,t){const n=Pu(e);t.typeStack.push(n.id),t.typeStack.push(-1);const r=nd([e]),i=ke(r,t);return t.typeStack.pop(),t.typeStack.pop(),i}(e,t),o),n=>{switch(n.kind){case 264:return function(e,t){const n=P(t.declarations,y_),r=n&&n.length>0?n[0]:e,i=-161&Kv(r);JE(r)&&(e=kw.updateClassDeclaration(e,e.modifiers,void 0,e.typeParameters,e.heritageClauses,e.members));return kw.replaceModifiers(e,i)}(n,e);case 267:return a(n,kF,e);case 265:return function(e,t,n){if(!(64&n))return;return a(e,xF,t)}(n,e,t);case 268:return a(n,TF,e);default:return}})}};function n(e,t,n){const r=Pc(t);if(!e.mapper)return r;const i=Ck(r,e.mapper);return n&&i!==r?void 0:i}function r(e,t,n){if(sy(t)&&16&t.flags&&e.enclosingFile&&e.enclosingFile===wd(hc(t))||(t=kw.cloneNode(t)),t===n)return t;if(!n)return t;let r=t.original;for(;r&&r!==n;)r=r.original;return r||Cw(t,n),e.enclosingFile&&e.enclosingFile===wd(hc(n))?AI(t,n):t}function o(e,t,n){if(1&t.internalFlags){if(e.valueDeclaration){const t=Ac(e.valueDeclaration);if(t&&FD(t))return t}const r=ca(e).nameType;if(r&&9216&r.flags)return t.enclosingDeclaration=r.symbol.valueDeclaration,kw.createComputedPropertyName(se(r.symbol,t,n))}return se(e,t,n)}function a(e,t,n){const r=P(n.declarations,t),i=-161&Kv(r&&r.length>0?r[0]:e);return kw.replaceModifiers(e,i)}function s(t,n,r,i,o,a,s,c){const l=(null==i?void 0:i.trackSymbol)?i.moduleResolverHost:4&(r||0)?function(e){return{getCommonSourceDirectory:e.getCommonSourceDirectory?()=>e.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>e.getCurrentDirectory(),getSymlinkCache:Xe(e,e.getSymlinkCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getPackageJsonInfoCache)?void 0:t.call(e)},useCaseSensitiveFileNames:()=>e.useCaseSensitiveFileNames(),redirectTargetsMap:e.redirectTargetsMap,getRedirectFromSourceFile:t=>e.getRedirectFromSourceFile(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),fileExists:t=>e.fileExists(t),getFileIncludeReasons:()=>e.getFileIncludeReasons(),readFile:e.readFile?t=>e.readFile(t):void 0,getDefaultResolutionModeForFile:t=>e.getDefaultResolutionModeForFile(t),getModeForResolutionAtIndex:(t,n)=>e.getModeForResolutionAtIndex(t,n),getGlobalTypingsCacheLocation:Xe(e,e.getGlobalTypingsCacheLocation)}}(e):void 0;n=n||0;const _=o||(1&n?Yu:Qu),u={enclosingDeclaration:t,enclosingFile:t&&wd(t),flags:n,internalFlags:r||0,tracker:void 0,maxTruncationLength:_,maxExpansionDepth:a??-1,encounteredError:!1,suppressReportInferenceFallback:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!!E.outFile&&!!t&&sf(wd(t)),truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,enclosingSymbolTypes:new Map,mapper:void 0,depth:0,typeStack:[],out:{canIncreaseExpansionDepth:!1,truncated:!1}};u.tracker=new SJ(u,i,l);const d=s(u);return u.truncating&&1&u.flags&&u.tracker.reportTruncationError(),c&&(c.canIncreaseExpansionDepth=u.out.canIncreaseExpansionDepth,c.truncated=u.out.truncated),u.encounteredError?void 0:d}function c(e,t,n){const r=fJ(t),i=e.enclosingSymbolTypes.get(r);return e.enclosingSymbolTypes.set(r,n),function(){i?e.enclosingSymbolTypes.set(r,i):e.enclosingSymbolTypes.delete(r)}}function l(e){const t=e.flags,n=e.internalFlags,r=e.depth;return function(){e.flags=t,e.internalFlags=n,e.depth=r}}function _(e){return e.maxExpansionDepth>=0&&u(e)}function u(e){return e.truncating?e.truncating:e.truncating=e.approximateLength>e.maxTruncationLength}function d(e,t){for(let n=0;n0?1048576&e.flags?kw.createUnionTypeNode(n):kw.createIntersectionTypeNode(n):void(o.encounteredError||262144&o.flags||(o.encounteredError=!0))}if(48&b)return gn.assert(!!(524288&e.flags)),R(e);if(4194304&e.flags){const t=e.type;o.approximateLength+=6;const n=h(t,o);return kw.createTypeOperatorNode(143,n)}if(134217728&e.flags){const t=e.texts,n=e.types,r=kw.createTemplateHead(t[0]),i=kw.createNodeArray(O(n,(e,r)=>kw.createTemplateLiteralTypeSpan(h(e,o),(rS(e));if(33554432&e.flags){const t=h(e.baseType,o),n=Ay(e)&&Qy("NoInfer",!1);return n?re(n,o,788968,[t]):t}return gn.fail("Should be unreachable.");function S(e){const t=h(e.checkType,o);if(o.approximateLength+=15,4&o.flags&&e.root.isDistributive&&!(262144&e.checkType.flags)){const r=qs(Xo(262144,"T")),i=oe(r,o),a=kw.createTypeReferenceNode(i);o.approximateLength+=37;const s=dk(e.root.checkType,r,e.mapper),c=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const l=h(Ck(e.root.extendsType,s),o);o.inferTypeParameters=c;const _=T(Ck(n(o,e.root.node.trueType),s)),u=T(Ck(n(o,e.root.node.falseType),s));return kw.createConditionalTypeNode(t,kw.createInferTypeNode(kw.createTypeParameterDeclaration(void 0,kw.cloneNode(a.typeName))),kw.createConditionalTypeNode(kw.createTypeReferenceNode(kw.cloneNode(i)),h(e.checkType,o),kw.createConditionalTypeNode(a,l,_,u),kw.createKeywordTypeNode(146)),kw.createKeywordTypeNode(146))}const r=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const i=h(e.extendsType,o);o.inferTypeParameters=r;const a=T(Yx(e)),s=T(eS(e));return kw.createConditionalTypeNode(t,i,a,s)}function T(e){var t,n,r;return 1048576&e.flags?(null==(t=o.visitedTypes)?void 0:t.has(Ab(e)))?(131072&o.flags||(o.encounteredError=!0,null==(r=null==(n=o.tracker)?void 0:n.reportCyclicStructureError)||r.call(n)),v(o)):B(e,e=>h(e,o)):h(e,o)}function w(e){return!!bk(e)}function E(e){return!!e.target&&w(e.target)&&!w(e)}function A(e){var t;gn.assert(!!(524288&e.flags));const r=e.declaration.readonlyToken?kw.createToken(e.declaration.readonlyToken.kind):void 0,i=e.declaration.questionToken?kw.createToken(e.declaration.questionToken.kind):void 0;let a,s,c=Sp(e);const l=up(e),_=!wp(e)&&!(2&Np(e).flags)&&4&o.flags&&!(262144&dp(e).flags&&4194304&(null==(t=uf(dp(e)))?void 0:t.flags));if(wp(e)){if(E(e)&&4&o.flags){const t=qs(Xo(262144,"T")),n=oe(t,o),r=e.target;s=kw.createTypeReferenceNode(n),c=Ck(Sp(r),ok([up(r),Np(r)],[l,t]))}a=kw.createTypeOperatorNode(143,s||h(Np(e),o))}else if(_){const e=oe(qs(Xo(262144,"T")),o);s=kw.createTypeReferenceNode(e),a=s}else a=h(dp(e),o);const u=M(l,o,a),d=L(o,e.declaration,void 0,[Eu(xs(e.declaration.typeParameter))]),p=e.declaration.nameType?h(hp(e),o):void 0,f=h(Iw(c,!!(4&Dp(e))),o);d();const m=kw.createMappedTypeNode(r,u,p,i,f,void 0);o.approximateLength+=10;const g=Ew(m,1);if(E(e)&&4&o.flags){const t=Ck(uf(n(o,e.declaration.typeParameter.constraint.type))||Ot,e.mapper);return kw.createConditionalTypeNode(h(Np(e),o),kw.createInferTypeNode(kw.createTypeParameterDeclaration(void 0,kw.cloneNode(s.typeName),2&t.flags?void 0:h(t,o))),g,kw.createKeywordTypeNode(146))}return _?kw.createConditionalTypeNode(h(dp(e),o),kw.createInferTypeNode(kw.createTypeParameterDeclaration(void 0,kw.cloneNode(s.typeName),kw.createTypeOperatorNode(143,h(Np(e),o)))),g,kw.createKeywordTypeNode(146)):g}function R(e,t=!1,r=!1){var i,a;const s=e.id,c=e.symbol;if(c){if(!!(8388608&Tx(e))){const t=e.node;if(GD(t)&&n(o,t)===e){const e=me.tryReuseExistingTypeNode(o,t);if(e)return e}return(null==(i=o.visitedTypes)?void 0:i.has(s))?v(o):B(e,J)}const _=Ec(e)?788968:111551;if(ML(c.valueDeclaration))return re(c,o,_);if(!r&&(32&c.flags&&!t&&!C_(c)&&(!(c.valueDeclaration&&y_(c.valueDeclaration)&&2048&o.flags)||bF(c.valueDeclaration)&&0===tc(c,o.enclosingDeclaration,_,!1).accessibility)||896&c.flags||l())){if(!f(e,o))return re(c,o,_);o.depth+=1}if(null==(a=o.visitedTypes)?void 0:a.has(s)){const t=function(e){if(e.symbol&&2048&e.symbol.flags&&e.symbol.declarations){const t=lh(e.symbol.declarations[0].parent);if(SF(t))return xs(t)}return}(e);return t?re(t,o,788968):v(o)}return B(e,J)}return J(e);function l(){var e;const t=!!(8192&c.flags)&&X(c.declarations,e=>jv(e)&&!cd(Ac(e))),n=!!(16&c.flags)&&(c.parent||g(c.declarations,e=>308===e.parent.kind||269===e.parent.kind));if(t||n)return(!!(4096&o.flags)||(null==(e=o.visitedTypes)?void 0:e.has(s)))&&(!(8&o.flags)||Ys(c,o.enclosingDeclaration))}}function B(e,t){var n,i,a;const s=e.id,c=16&Tx(e)&&e.symbol&&32&e.symbol.flags,l=4&Tx(e)&&e.node?"N"+pJ(e.node):16777216&e.flags?"N"+pJ(e.root.node):e.symbol?(c?"+":"")+fJ(e.symbol):void 0;o.visitedTypes||(o.visitedTypes=new Set),l&&!o.symbolDepth&&(o.symbolDepth=new Map);const _=o.maxExpansionDepth>=0?void 0:o.enclosingDeclaration&&la(o.enclosingDeclaration),u=`${Ab(e)}|${o.flags}|${o.internalFlags}`;_&&(_.serializedTypes||(_.serializedTypes=new Map));const d=null==(n=null==_?void 0:_.serializedTypes)?void 0:n.get(u);if(d)return null==(i=d.trackedSymbols)||i.forEach(([e,t,n])=>o.tracker.trackSymbol(e,t,n)),d.truncating&&(o.truncating=!0),o.approximateLength+=d.addedLength,y(d.node);let p;if(l){if(p=o.symbolDepth.get(l)||0,p>10)return v(o);o.symbolDepth.set(l,p+1)}o.visitedTypes.add(s);const f=o.trackedSymbols;o.trackedSymbols=void 0;const m=o.approximateLength,g=t(e),h=o.approximateLength-m;return o.reportedDiagnostic||o.encounteredError||null==(a=null==_?void 0:_.serializedTypes)||a.set(u,{node:g,truncating:o.truncating,addedLength:h,trackedSymbols:o.trackedSymbols}),o.visitedTypes.delete(s),l&&o.symbolDepth.set(l,p),o.trackedSymbols=f,g;function y(e){return sy(e)||bc(e)!==e?r(o,kw.cloneNode(IJ(e,y,void 0,b,y)),e):e}function b(e,t,n,r,i){return e&&0===e.length?AI(kw.createNodeArray(void 0,e.hasTrailingComma),e):TJ(e,t,n,r,i)}}function J(e){if(Pp(e)||e.containsError)return A(e);const t=Lp(e);if(!t.properties.length&&!t.indexInfos.length){if(!t.callSignatures.length&&!t.constructSignatures.length)return o.approximateLength+=2,Ew(kw.createTypeLiteralNode(void 0),1);if(1===t.callSignatures.length&&!t.constructSignatures.length){return I(t.callSignatures[0],185,o)}if(1===t.constructSignatures.length&&!t.callSignatures.length){return I(t.constructSignatures[0],186,o)}}const n=P(t.constructSignatures,e=>!!(4&e.flags));if(X(n)){const e=O(n,Rh);return t.callSignatures.length+(t.constructSignatures.length-n.length)+t.indexInfos.length+(2048&o.flags?F(t.properties,e=>!(4194304&e.flags)):m(t.properties))&&e.push(function(e){if(0===e.constructSignatures.length)return e;if(e.objectTypeWithoutAbstractConstructSignatures)return e.objectTypeWithoutAbstractConstructSignatures;const t=P(e.constructSignatures,e=>!(4&e.flags));if(e.constructSignatures===t)return e;const n=Ks(e.symbol,e.members,e.callSignatures,X(t)?t:p,e.indexInfos);return e.objectTypeWithoutAbstractConstructSignatures=n,n.objectTypeWithoutAbstractConstructSignatures=n,n}(t)),h(Gb(e),o)}const r=l(o);o.flags|=4194304;const i=W(t);r();const a=kw.createTypeLiteralNode(i);return o.approximateLength+=2,Ew(a,1024&o.flags?0:1),a}function z(e){let t=by(e);if(e.target===Zn||e.target===er){if(2&o.flags){const n=h(t[0],o);return kw.createTypeReferenceNode(e.target===Zn?"Array":"ReadonlyArray",[n])}const n=h(t[0],o),r=kw.createArrayTypeNode(n);return e.target===Zn?r:kw.createTypeOperatorNode(148,r)}if(!(8&e.target.objectFlags)){if(2048&o.flags&&e.symbol.valueDeclaration&&y_(e.symbol.valueDeclaration)&&!Ys(e.symbol,o.enclosingDeclaration))return R(e);{const n=e.target.outerTypeParameters;let r,i,a=0;if(n){const e=n.length;for(;a0){let n=0;if(e.target.typeParameters&&(n=Math.min(e.target.typeParameters.length,t.length),(V_(e,Sv(!1))||V_(e,wv(!1))||V_(e,vv(!1))||V_(e,bv(!1)))&&(!e.node||!$D(e.node)||!e.node.typeArguments||e.node.typeArguments.length0;){const r=t[n-1],i=wf(e.target.typeParameters[n-1]);if(!i||!Ok(r,i))break;n--}i=C(t.slice(a,n),o)}const s=l(o);o.flags|=16;const c=re(e.symbol,o,788968,i);return s(),r?q(r,c):c}}if(t=j(t,(t,n)=>Iw(t,!!(2&e.target.elementFlags[n]))),t.length>0){const n=xy(e),r=C(t.slice(0,n),o);if(r){const{labeledElementDeclarations:t}=e.target;for(let n=0;n{var n;return!!(e.name&&FD(e.name)&&fb(e.name.expression)&&t.enclosingDeclaration&&0===(null==(n=_c(e.name.expression,t.enclosingDeclaration,!1))?void 0:n.accessibility))})){return O(P(e.components,e=>!md(e)),i=>($(i.name.expression,t.enclosingDeclaration,t),r(t,kw.createPropertySignature(e.isReadonly?[kw.createModifier(148)]:void 0,i.name,(OD(i)||LD(i)||jD(i)||MD(i)||Ou(i)||Iu(i))&&i.questionToken?kw.createToken(58):void 0,n||h(j_(i.symbol),t)),i)))}}return[N(e,t,n)]}function W(e){if(u(o))return o.out.truncated=!0,1&o.flags?[$w(kw.createNotEmittedTypeElement(),3,"elided")]:[kw.createPropertySignature(void 0,"...",void 0,void 0)];o.typeStack.push(-1);const t=[];for(const n of e.callSignatures)t.push(I(n,180,o));for(const n of e.constructSignatures)4&n.flags||t.push(I(n,181,o));for(const n of e.indexInfos)t.push(...V(n,o,1024&e.objectFlags?v(o):void 0));const n=e.properties;if(!n)return o.typeStack.pop(),t;let r=0;for(const e of n)if(!(we(o)&&4194304&e.flags)){if(r++,2048&o.flags){if(4194304&e.flags)continue;6&dx(e)&&o.tracker.reportPrivateInBaseOfClassExpression&&o.tracker.reportPrivateInBaseOfClassExpression(Sc(e.escapedName))}if(u(o)&&r+2!(32768&e.flags)),0);for(const i of r){const r=I(i,174,t,{name:s,questionToken:c});n.push(d(r,i.declaration||e.valueDeclaration))}if(r.length||!c)return}let l;b(e,t)?l=v(t):(i&&(t.reverseMappedStack||(t.reverseMappedStack=[]),t.reverseMappedStack.push(e)),l=o?ye(t,void 0,o,e):kw.createKeywordTypeNode(133),i&&t.reverseMappedStack.pop());const _=Yj(e)?[kw.createToken(148)]:void 0;_&&(t.approximateLength+=9);const u=kw.createPropertySignature(_,s,c,l);function d(n,r){var i;const o=null==(i=e.declarations)?void 0:i.find(e=>349===e.kind);if(o){const e=gl(o.comment);e&&qw(n,[{kind:3,text:"*\n * "+e.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}])}else r&&S(t,n,r);return n}n.push(d(u,e.valueDeclaration))}function S(e,t,n){return e.enclosingFile&&e.enclosingFile===wd(n)?Jw(t,n):t}function C(e,t,n){if(X(e)){if(u(t)){if(t.out.truncated=!0,!n)return[1&t.flags?Uw(kw.createKeywordTypeNode(133),3,"elided"):kw.createTypeReferenceNode("...",void 0)];if(e.length>2)return[h(e[0],t),1&t.flags?Uw(kw.createKeywordTypeNode(133),3,`... ${e.length-2} more elided ...`):kw.createTypeReferenceNode(`... ${e.length-2} more ...`,void 0),h(e[e.length-1],t)]}const r=!(64&t.flags)?Qe():void 0,i=[];let o=0;for(const n of e){if(o++,u(t)&&o+2{if(!FT(e,([e],[t])=>function(e,t){return e===t||!!e.symbol&&e.symbol===t.symbol||!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}(e,t)))for(const[n,r]of e)i[r]=h(n,t)}),e()}return i}}function N(e,t,n){const r=Jp(e)||"x",i=h(e.keyType,t),o=kw.createParameterDeclaration(void 0,void 0,r,void 0,i,void 0);return n||(n=h(e.type||wt,t)),e.type||2097152&t.flags||(t.encounteredError=!0),t.approximateLength+=r.length+4,kw.createIndexSignature(e.isReadonly?[kw.createToken(148)]:void 0,[o],n)}function I(e,t,r,i){var o;let a,s;const _=Bd(e,!0)[0],u=L(r,e.declaration,_,e.typeParameters,e.parameters,e.mapper);r.approximateLength+=3,32&r.flags&&e.target&&e.mapper&&e.target.typeParameters?s=e.target.typeParameters.map(t=>h(Ck(t,e.mapper),r)):a=e.typeParameters&&e.typeParameters.map(e=>B(e,r));const p=l(r);r.flags&=-257;const f=(X(_,e=>e!==_[_.length-1]&&!!(32768&ux(e)))?e.parameters:_).map(e=>V(e,r,177===t)),m=33554432&r.flags?void 0:function(e,t){if(e.thisParameter)return V(e.thisParameter,t);if(e.declaration&&Mm(e.declaration)){const r=il(e.declaration);if(r&&r.typeExpression)return kw.createParameterDeclaration(void 0,void 0,"this",void 0,h(n(t,r.typeExpression),t))}}(e,r);m&&f.unshift(m),p();const g=function(e,t){const n=256&e.flags,r=l(e);n&&(e.flags&=-257);let i;const o=ah(t);if(!n||!el(o)){if(t.declaration&&!sy(t.declaration)&&!d(o,e)){const n=xs(t.declaration),r=c(e,n,o);i=me.serializeReturnTypeForSignature(t.declaration,n,e),r()}i||(i=ve(e,t,o))}i||n||(i=kw.createKeywordTypeNode(133));return r(),i}(r,e);let y=null==i?void 0:i.modifiers;if(186===t&&4&e.flags){const e=eb(y);y=kw.createModifiersFromModifierFlags(64|e)}const v=180===t?kw.createCallSignature(a,f,g):181===t?kw.createConstructSignature(a,f,g):174===t?kw.createMethodSignature(y,(null==i?void 0:i.name)??kw.createIdentifier(""),null==i?void 0:i.questionToken,a,f,g):175===t?kw.createMethodDeclaration(y,void 0,(null==i?void 0:i.name)??kw.createIdentifier(""),void 0,a,f,g,void 0):177===t?kw.createConstructorDeclaration(y,f,void 0):178===t?kw.createGetAccessorDeclaration(y,(null==i?void 0:i.name)??kw.createIdentifier(""),f,g,void 0):179===t?kw.createSetAccessorDeclaration(y,(null==i?void 0:i.name)??kw.createIdentifier(""),f,void 0):182===t?kw.createIndexSignature(y,f,g):318===t?kw.createJSDocFunctionType(f,g):185===t?kw.createFunctionTypeNode(a,f,g??kw.createTypeReferenceNode(kw.createIdentifier(""))):186===t?kw.createConstructorTypeNode(y,a,f,g??kw.createTypeReferenceNode(kw.createIdentifier(""))):263===t?kw.createFunctionDeclaration(y,void 0,(null==i?void 0:i.name)?st(i.name,fD):kw.createIdentifier(""),a,f,g,void 0):219===t?kw.createFunctionExpression(y,void 0,(null==i?void 0:i.name)?st(i.name,fD):kw.createIdentifier(""),a,f,g,kw.createBlock([])):220===t?kw.createArrowFunction(y,a,f,g,void 0,kw.createBlock([])):gn.assertNever(t);if(s&&(v.typeArguments=kw.createNodeArray(s)),324===(null==(o=e.declaration)?void 0:o.kind)&&340===e.declaration.parent.kind){Uw(v,3,rp(e.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map(e=>e.replace(/^\s+/," ")).join("\n"),!0)}return null==u||u(),v}function L(e,t,n,r,i,o){const a=de(e);let s,c;const l=e.enclosingDeclaration,_=e.mapper;if(o&&(e.mapper=o),e.enclosingDeclaration&&t){let t=function(t,n){let r;gn.assert(e.enclosingDeclaration),la(e.enclosingDeclaration).fakeScopeForSignatureDeclaration===t?r=e.enclosingDeclaration:e.enclosingDeclaration.parent&&la(e.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===t&&(r=e.enclosingDeclaration.parent),gn.assertOptionalNode(r,YE);const i=(null==r?void 0:r.locals)??nd();let o,a;if(n((e,t)=>{if(r){const t=i.get(e);t?a=le(a,{name:e,oldSymbol:t}):o=le(o,e)}i.set(e,t)}),r)return function(){g(o,e=>i.delete(e)),g(a,e=>i.set(e.name,e.oldSymbol))};{const n=kw.createBlock(p);la(n).fakeScopeForSignatureDeclaration=t,n.locals=i,jT(n,e.enclosingDeclaration),e.enclosingDeclaration=n}};s=X(n)?t("params",e=>{if(n)for(let t=0;t{return AD(t)&&E_(t.name)?(n(t.name),!0):void 0;function n(t){g(t.elements,t=>{switch(t.kind){case 233:return;case 209:return function(t){if(E_(t.name))return n(t.name);const r=xs(t);e(r.escapedName,r)}(t);default:return gn.assertNever(t)}})}})||e(r.escapedName,r)}}):void 0,4&e.flags&&X(r)&&(c=t("typeParams",t=>{for(const n of r??p){t(oe(n,e).escapedText,n.symbol)}}))}return()=>{null==s||s(),null==c||c(),a(),e.enclosingDeclaration=l,e.mapper=_}}function M(e,t,n){const r=l(t);t.flags&=-513;const i=kw.createModifiersFromModifierFlags(bC(e)),o=oe(e,t),a=wf(e),s=a&&h(a,t);return r(),kw.createTypeParameterDeclaration(i,o,n,s)}function B(e,t,r=uf(e)){const i=r&&function(e,t,r){return!d(e,r)&&t&&n(r,t)===e&&me.tryReuseExistingTypeNode(r,t)||h(e,r)}(r,ny(e),t);return M(e,t,i)}function J(e,t){const n=2===e.kind||3===e.kind?kw.createToken(131):void 0,r=1===e.kind||3===e.kind?Ew(kw.createIdentifier(e.parameterName),16777216):kw.createThisTypeNode(),i=e.type&&h(e.type,t);return kw.createTypePredicateNode(n,r,i)}function z(e){const t=ed(e,170);return t||(rd(e)?void 0:ed(e,342))}function V(e,t,n){const r=z(e),i=ye(t,r,j_(e),e),o=!(8192&t.flags)&&n&&r&&II(r)?O(Lc(r),kw.cloneNode):void 0,a=r&&$u(r)||32768&ux(e)?kw.createToken(26):void 0,s=W(e,r,t),c=r&&Ng(r)||16384&ux(e)?kw.createToken(58):void 0,l=kw.createParameterDeclaration(o,a,s,c,i,void 0);return t.approximateLength+=Cc(e).length+3,l}function W(e,t,n){return t&&t.name?80===t.name.kind?Ew(kw.cloneNode(t.name),16777216):167===t.name.kind?Ew(kw.cloneNode(t.name.right),16777216):function e(t){n.tracker.canTrackSymbol&&FD(t)&&sd(t)&&$(t.expression,n.enclosingDeclaration,n);let r=IJ(t,e,void 0,void 0,e);return hE(r)&&(r=kw.updateBindingElement(r,r.dotDotDotToken,r.propertyName,r.name,void 0)),sy(r)||(r=kw.cloneNode(r)),Ew(r,16777217)}(t.name):Cc(e)}function $(e,t,n){if(!n.tracker.canTrackSymbol)return;const r=mb(e),i=ze(t,r.escapedText,1160127,void 0,!0);if(i)n.tracker.trackSymbol(i,t,111551);else{const e=ze(r,r.escapedText,1160127,void 0,!0);e&&n.tracker.trackSymbol(e,t,111551)}}function K(e,t,n,r){return t.tracker.trackSymbol(e,t.enclosingDeclaration,n),H(e,t,n,r)}function H(e,t,n,r){let i;return 262144&e.flags||!(t.enclosingDeclaration||64&t.flags)||4&t.internalFlags?i=[e]:(i=gn.checkDefined(function e(n,i,o){let a,s=Xs(n,t.enclosingDeclaration,i,!!(128&t.flags));if(!s||Qs(s[0],t.enclosingDeclaration,1===s.length?i:Gs(i))){const r=Ns(s?s[0]:n,t.enclosingDeclaration,i);if(m(r)){a=r.map(e=>X(e.declarations,oc)?te(e,t):void 0);const o=r.map((e,t)=>t);o.sort(c);const l=o.map(e=>r[e]);for(const t of l){const r=e(t,Gs(i),!1);if(r){if(t.exports&&t.exports.get("export=")&&Fs(t.exports.get("export="),n)){s=r;break}s=r.concat(s||[Es(t,n)||n]);break}}}}if(s)return s;if(o||!(6144&n.flags)){if(!o&&!r&&g(n.declarations,oc))return;return[n]}function c(e,t){const n=a[e],r=a[t];if(n&&r){const e=wo(r);return wo(n)===e?AB(n)-AB(r):e?-1:1}return 0}}(e,n,!0)),gn.assert(i&&i.length>0)),i}function G(e,t){let n;return 524384&jJ(e).flags&&(n=kw.createNodeArray(O(eu(e),e=>B(e,t)))),n}function Q(e,t,n){var r;gn.assert(e&&0<=t&&tek(e,o.links.mapper)),n)}else a=G(i,n)}return a}function Z(e){return lE(e.objectType)?Z(e.objectType):e}function te(t,n,r){let i=ed(t,308);if(!i){const e=y(t.declarations,e=>Ds(e,t));e&&(i=ed(e,308))}if(i&&void 0!==i.moduleName)return i.moduleName;if(!i&&ZB.test(t.escapedName))return t.escapedName.substring(1,t.escapedName.length-1);if(!n.enclosingFile||!n.tracker.moduleResolverHost)return ZB.test(t.escapedName)?t.escapedName.substring(1,t.escapedName.length-1):wd(kp(t)).fileName;const o=hc(n.enclosingDeclaration),a=Tg(o)?Cg(o):void 0,s=n.enclosingFile,c=r||a&&e.getModeForUsageLocation(s,a)||s&&e.getDefaultResolutionModeForFile(s),l=BM(s.path,c),_=ca(t);let u=_.specifierCache&&_.specifierCache.get(l);if(!u){const e=!!E.outFile,{moduleResolverHost:i}=n.tracker,o=e?{...E,baseUrl:i.getCommonSourceDirectory()}:E;u=xe(wB(t,Ue,o,s,i,{importModuleSpecifierPreference:e?"non-relative":"project-relative",importModuleSpecifierEnding:e?"minimal":99===c?"js":void 0},{overrideImportMode:r})),_.specifierCache??(_.specifierCache=new Map),_.specifierCache.set(l,u)}return u}function ne(e){const t=kw.createIdentifier(Sc(e.escapedName));return e.parent?kw.createQualifiedName(ne(e.parent),t):t}function re(e,t,n,r){const i=K(e,t,n,!(16384&t.flags)),o=111551===n;if(X(i[0].declarations,oc)){const e=i.length>1?s(i,i.length-1,1):void 0,n=r||Q(i,0,t),a=wd(hc(t.enclosingDeclaration)),c=Nd(i[0]);let l,_;if(3!==DS(E)&&99!==DS(E)||99===(null==c?void 0:c.impliedNodeFormat)&&c.impliedNodeFormat!==(null==a?void 0:a.impliedNodeFormat)&&(l=te(i[0],t,99),_=kw.createImportAttributes(kw.createNodeArray([kw.createImportAttribute(kw.createStringLiteral("resolution-mode"),kw.createStringLiteral("import"))]))),l||(l=te(i[0],t)),!(67108864&t.flags)&&1!==DS(E)&&l.includes("/node_modules/")){const e=l;if(3===DS(E)||99===DS(E)){const n=99===(null==a?void 0:a.impliedNodeFormat)?1:99;l=te(i[0],t,n),l.includes("/node_modules/")?l=e:_=kw.createImportAttributes(kw.createNodeArray([kw.createImportAttribute(kw.createStringLiteral("resolution-mode"),kw.createStringLiteral(99===n?"import":"require"))]))}_||(t.encounteredError=!0,t.tracker.reportLikelyUnsafeImportRequiredError&&t.tracker.reportLikelyUnsafeImportRequiredError(e))}const u=kw.createLiteralTypeNode(kw.createStringLiteral(l));if(t.approximateLength+=l.length+10,!e||s_(e)){if(e){aN(fD(e)?e:e.right,void 0)}return kw.createImportTypeNode(u,_,e,n,o)}{const t=Z(e),r=t.objectType.typeName;return kw.createIndexedAccessTypeNode(kw.createImportTypeNode(u,_,r,n,o),t.indexType)}}const a=s(i,i.length-1,0);if(lE(a))return a;if(o)return kw.createTypeQueryNode(a);{const e=fD(a)?a:a.right,t=sN(e);return aN(e,void 0),kw.createTypeReferenceNode(a,t)}function s(e,n,i){const o=n===e.length-1?r:Q(e,n,t),a=e[n],c=e[n-1];let l;if(0===n)t.flags|=16777216,l=Uc(a,t),t.approximateLength+=(l?l.length:0)+1,t.flags^=16777216;else if(c&&gs(c)){_d(gs(c),(e,t)=>{if(Fs(e,a)&&!fd(t)&&"export="!==t)return l=Sc(t),!0})}if(void 0===l){const r=y(a.declarations,Ac);if(r&&FD(r)&&s_(r.expression)){const t=s(e,n-1,i);return s_(t)?kw.createIndexedAccessTypeNode(kw.createParenthesizedType(kw.createTypeQueryNode(t)),kw.createTypeQueryNode(r.expression)):t}l=Uc(a,t)}if(t.approximateLength+=l.length+1,!(16&t.flags)&&c&&Td(c)&&Td(c).get(a.escapedName)&&Fs(Td(c).get(a.escapedName),a)){const t=s(e,n-1,i);return lE(t)?kw.createIndexedAccessTypeNode(t,kw.createLiteralTypeNode(kw.createStringLiteral(l))):kw.createIndexedAccessTypeNode(kw.createTypeReferenceNode(t,o),kw.createLiteralTypeNode(kw.createStringLiteral(l)))}const _=Ew(kw.createIdentifier(l),16777216);if(o&&aN(_,kw.createNodeArray(o)),_.symbol=a,n>i){const t=s(e,n-1,i);return s_(t)?kw.createQualifiedName(t,_):gn.fail("Impossible construct - an export of an indexed access cannot be reachable")}return _}}function ie(e,t,n){const r=ze(t.enclosingDeclaration,e,788968,void 0,!1);return!!(r&&262144&r.flags)&&r!==n.symbol}function oe(e,t){var n,i,o,a;if(4&t.flags&&t.typeParameterNames){const n=t.typeParameterNames.get(Ab(e));if(n)return n}let s=ae(e.symbol,t,788968,!0);if(!(80&s.kind))return kw.createIdentifier("(Missing type parameter)");const c=null==(i=null==(n=e.symbol)?void 0:n.declarations)?void 0:i[0];if(c&&PD(c)&&(s=r(t,s,c.name)),4&t.flags){const n=s.escapedText;let r=(null==(o=t.typeParameterNamesByTextNextNameCount)?void 0:o.get(n))||0,i=n;for(;(null==(a=t.typeParameterNamesByText)?void 0:a.has(i))||ie(i,t,e);)r++,i=`${n}_${r}`;if(i!==n){const e=sN(s);s=kw.createIdentifier(i),aN(s,e)}t.mustCreateTypeParametersNamesLookups&&(t.mustCreateTypeParametersNamesLookups=!1,t.typeParameterNames=new Map(t.typeParameterNames),t.typeParameterNamesByTextNextNameCount=new Map(t.typeParameterNamesByTextNextNameCount),t.typeParameterNamesByText=new Set(t.typeParameterNamesByText)),t.typeParameterNamesByTextNextNameCount.set(n,r),t.typeParameterNames.set(Ab(e),s),t.typeParameterNamesByText.add(i)}return s}function ae(e,t,n,r){const i=K(e,t,n);return!r||1===i.length||t.encounteredError||65536&t.flags||(t.encounteredError=!0),function e(n,r){const i=Q(n,r,t),o=n[r];0===r&&(t.flags|=16777216);const a=Uc(o,t);0===r&&(t.flags^=16777216);const s=Ew(kw.createIdentifier(a),16777216);i&&aN(s,kw.createNodeArray(i));return s.symbol=o,r>0?kw.createQualifiedName(e(n,r-1),s):s}(i,i.length-1)}function se(e,t,n){const r=K(e,t,n);return function e(n,r){const i=Q(n,r,t),o=n[r];0===r&&(t.flags|=16777216);let a=Uc(o,t);0===r&&(t.flags^=16777216);let s=a.charCodeAt(0);if(Hm(s)&&X(o.declarations,oc)){const e=te(o,t);return t.approximateLength+=2+e.length,kw.createStringLiteral(e)}if(0===r||tC(a,A)){const s=Ew(kw.createIdentifier(a),16777216);return i&&aN(s,kw.createNodeArray(i)),s.symbol=o,t.approximateLength+=1+a.length,r>0?kw.createPropertyAccessExpression(e(n,r-1),s):s}{let c;if(91===s&&(a=a.substring(1,a.length-1),s=a.charCodeAt(0)),!Hm(s)||8&o.flags)""+ +a===a&&(t.approximateLength+=a.length,c=kw.createNumericLiteral(+a));else{const e=jy(a).replace(/\\./g,e=>e.substring(1));t.approximateLength+=e.length+2,c=kw.createStringLiteral(e,39===s)}if(!c){const e=Ew(kw.createIdentifier(a),16777216);i&&aN(e,kw.createNodeArray(i)),e.symbol=o,t.approximateLength+=a.length,c=e}return t.approximateLength+=2,kw.createElementAccessExpression(e(n,r-1),c)}}(r,r.length-1)}function ce(e){const t=Ac(e);if(!t)return!1;if(FD(t)){return!!(402653316&WM(t.expression).flags)}if(xE(t)){return!!(402653316&WM(t.argumentExpression).flags)}return QN(t)}function _e(e){const t=Ac(e);return!!(t&&QN(t)&&(t.singleQuote||!sy(t)&&en(rp(t,!1),"'")))}function ue(e,t){const n=function(e){if(e.valueDeclaration&&Fc(e.valueDeclaration)&&mD(e.valueDeclaration.name))return kw.cloneNode(e.valueDeclaration.name);return}(e);if(n){if(!!t.tracker.reportPrivateInBaseOfClassExpression&&2048&t.flags){let t=Sc(e.escapedName);return t=t.replace(/__#\d+@#/g,"__#private@#"),GT(t,wS(E),!1,!0,!!(8192&e.flags))}return n}const r=!!m(e.declarations)&&k(e.declarations,ce),i=!!m(e.declarations)&&k(e.declarations,_e),o=!!(8192&e.flags),a=function(e,t,n,r,i){const o=ca(e).nameType;if(o){if(384&o.flags){const e=""+o.value;return Ss(e,wS(E))||!r&&HT(e)?HT(e)&&en(e,"-")?kw.createComputedPropertyName(kw.createPrefixUnaryExpression(41,kw.createNumericLiteral(-e))):GT(e,wS(E),n,r,i):kw.createStringLiteral(e,!!n)}if(8192&o.flags)return kw.createComputedPropertyName(se(o.symbol,t,111551))}}(e,t,i,r,o);if(a)return a;return GT(Sc(e.escapedName),wS(E),i,r,o)}function de(e){const t=e.mustCreateTypeParameterSymbolList,n=e.mustCreateTypeParametersNamesLookups;e.mustCreateTypeParameterSymbolList=!0,e.mustCreateTypeParametersNamesLookups=!0;const r=e.typeParameterNames,i=e.typeParameterNamesByText,o=e.typeParameterNamesByTextNextNameCount,a=e.typeParameterSymbolList;return()=>{e.typeParameterNames=r,e.typeParameterNamesByText=i,e.typeParameterNamesByTextNextNameCount=o,e.typeParameterSymbolList=a,e.mustCreateTypeParameterSymbolList=t,e.mustCreateTypeParametersNamesLookups=n}}function pe(e,t){return e.declarations&&T(e.declarations,e=>!(!mq(e)||t&&!yc(e,e=>e===t)))}function fe(e,t){if(!(4&Tx(t)))return!0;if(!$D(e))return!0;$y(e);const n=la(e).resolvedSymbol,r=n&&Pu(n);return!r||r!==t.target||m(e.typeArguments)>=Ag(t.target.typeParameters)}function ge(e,t,n){8192&n.flags&&n.symbol===e&&(!t.enclosingDeclaration||X(e.declarations,e=>wd(e)===t.enclosingFile))&&(t.flags|=1048576);return h(n,t)}function ye(e,t,n,r){var i;let o;const a=t&&(AD(t)||KP(t))&&Kz(t,e.enclosingDeclaration),s=t??r.valueDeclaration??pe(r)??(null==(i=r.declarations)?void 0:i[0]);if(!d(n,e)&&s){const t=c(e,r,n);v_(s)?o=me.serializeTypeOfAccessor(s,r,e):!FC(s)||sy(s)||196608&Tx(n)||(o=me.serializeTypeOfDeclaration(s,r,e)),t()}return o||(a&&(n=ww(n)),o=ge(r,e,n)),o??kw.createKeywordTypeNode(133)}function ve(e,t,n){const r=e.suppressReportInferenceFallback;e.suppressReportInferenceFallback=!0;const i=th(t),o=i?J(e.mapper?mk(i,e.mapper):i,e):h(n,e);return e.suppressReportInferenceFallback=r,o}function be(e,t,n=t.enclosingDeclaration){let i=!1;const o=mb(e);if(Mm(e)&&(og(o)||sg(o.parent)||ED(o.parent)&&ag(o.parent.left)&&og(o.parent.right)))return i=!0,{introducesError:i,node:e};const a=cc(e);let s;if(gv(o))return s=xs(sm(o,!1,!1)),0!==tc(s,o,a,!1).accessibility&&(i=!0,t.tracker.reportInaccessibleThisError()),{introducesError:i,node:c(e)};if(s=ts(o,a,!0,!0),t.enclosingDeclaration&&!(s&&262144&s.flags)){s=Ps(s);const n=ts(o,a,!0,!0,t.enclosingDeclaration);if(n===vt||void 0===n&&void 0!==s||n&&s&&!Fs(Ps(n),s))return n!==vt&&t.tracker.reportInferenceFallback(e),i=!0,{introducesError:i,node:e,sym:s};s=n}return s?(1&s.flags&&s.valueDeclaration&&(iy(s.valueDeclaration)||KP(s.valueDeclaration))||(262144&s.flags||gh(e)||0===tc(s,n,a,!1).accessibility?t.tracker.trackSymbol(s,n,a):(t.tracker.reportInferenceFallback(e),i=!0)),{introducesError:i,node:c(e)}):{introducesError:i,node:e};function c(e){if(e===o){const n=Pu(s),i=262144&s.flags?oe(n,t):kw.cloneNode(e);return i.symbol=s,r(t,Ew(i,16777216),e)}const n=IJ(e,e=>c(e),void 0);return r(t,n,e)}}function Se(e,t){const r=n(e,t,!0);if(!r)return!1;if(Mm(t)&&vf(t)){aS(t);const e=la(t).resolvedSymbol;return!e||!!((t.isTypeOf||788968&e.flags)&&m(t.typeArguments)>=Ag(eu(e)))}if($D(t)){if(El(t))return!1;const n=la(t).resolvedSymbol;if(!n)return!1;if(262144&n.flags){const t=Pu(n);return!(e.mapper&&ek(t,e.mapper)!==t)}if(Jm(t))return fe(t,r)&&!Wy(t)&&!!(788968&n.flags)}if(cE(t)&&158===t.operator&&155===t.type.kind){const n=e.enclosingDeclaration&&function(e){for(;la(e).fakeScopeForSignatureDeclaration;)e=e.parent;return e}(e.enclosingDeclaration);return!!yc(t,e=>e===n)}return!0}function ke(e,t){var i;const a=le(kw.createPropertyDeclaration,175,!0),s=le((e,t,n,r)=>kw.createPropertySignature(e,t,n,r),174,!1),c=t.enclosingDeclaration;let u=[];const d=new Set,f=[],v=t;t={...v,usedSymbolNames:new Set(v.usedSymbolNames),remappedSymbolNames:new Map,remappedSymbolReferences:new Map(null==(i=v.remappedSymbolReferences)?void 0:i.entries()),tracker:void 0};const b={...v.tracker.inner,trackSymbol:(e,n,r)=>{var i,o;if(null==(i=t.remappedSymbolNames)?void 0:i.has(fJ(e)))return!1;if(0===tc(e,n,r,!1).accessibility){const n=H(e,t,r);if(!(4&e.flags)){const e=n[0],t=wd(v.enclosingDeclaration);X(e.declarations,e=>wd(e)===t)&&M(e)}}else if(null==(o=v.tracker.inner)?void 0:o.trackSymbol)return v.tracker.inner.trackSymbol(e,n,r);return!1}};t.tracker=new SJ(t,b,v.tracker.moduleResolverHost),_d(e,(e,t)=>{Te(e,Sc(t))});let x=!t.bundled;const S=e.get("export=");return S&&e.size>1&&2098688&S.flags&&(e=nd()).set("export=",S),F(e),function(e){e=function(e){const t=w(e,e=>zF(e)&&!e.moduleSpecifier&&!e.attributes&&!!e.exportClause&&qF(e.exportClause));if(t>=0){const n=e[t],r=U(n.exportClause.elements,t=>{if(!t.propertyName&&11!==t.name.kind){const n=t.name,r=P(ee(e),t=>Dc(e[t],n));if(m(r)&&k(r,t=>ZT(e[t]))){for(const t of r)e[t]=D(e[t]);return}}return t});m(r)?e[t]=kw.updateExportDeclaration(n,n.modifiers,n.isTypeOnly,kw.updateNamedExports(n.exportClause,r),n.moduleSpecifier,n.attributes):Kt(e,t)}return e}(e=function(e){const t=P(e,e=>zF(e)&&!e.moduleSpecifier&&!!e.exportClause&&qF(e.exportClause));if(m(t)>1){e=[...P(e,e=>!zF(e)||!!e.moduleSpecifier||!e.exportClause),kw.createExportDeclaration(void 0,!1,kw.createNamedExports(R(t,e=>st(e.exportClause,qF).elements)),void 0)]}const n=P(e,e=>zF(e)&&!!e.moduleSpecifier&&!!e.exportClause&&qF(e.exportClause));if(m(n)>1){const t=We(n,e=>QN(e.moduleSpecifier)?">"+e.moduleSpecifier.text:">");if(t.length!==n.length)for(const n of t)n.length>1&&(e=[...P(e,e=>!n.includes(e)),kw.createExportDeclaration(void 0,!1,kw.createNamedExports(R(n,e=>st(e.exportClause,qF).elements)),n[0].moduleSpecifier)])}return e}(e=function(e){const t=T(e,JF),n=w(e,TF);let r=-1!==n?e[n]:void 0;if(r&&t&&t.isExportEquals&&fD(t.expression)&&fD(r.name)&&kc(r.name)===kc(t.expression)&&r.body&&CF(r.body)){const i=P(e,e=>!!(32&Kv(e))),o=r.name;let a=r.body;if(m(i)&&(r=kw.updateModuleDeclaration(r,r.modifiers,r.name,a=kw.updateModuleBlock(a,kw.createNodeArray([...r.body.statements,kw.createExportDeclaration(void 0,!1,kw.createNamedExports(O(R(i,e=>function(e){if(ZE(e))return P(O(e.declarationList.declarations,Ac),C);return P([Ac(e)],C)}(e)),e=>kw.createExportSpecifier(!1,void 0,e))),void 0)]))),e=[...e.slice(0,n),r,...e.slice(n+1)]),!T(e,e=>e!==r&&Dc(e,o))){u=[];const n=!X(a.statements,e=>Lv(e,32)||JF(e)||zF(e));g(a.statements,e=>{J(e,n?32:0)}),e=[...P(e,e=>e!==r&&e!==t),...u]}}return e}(e))),c&&(mP(c)&&sf(c)||TF(c))&&(!X(e,ru)||!tu(e)&&X(e,nu))&&e.push(dA(kw));return e}(u);function C(e){return!!e&&80===e.kind}function D(e){const t=-129&Kv(e)|32;return kw.replaceModifiers(e,t)}function E(e){const t=-33&Kv(e);return kw.replaceModifiers(e,t)}function F(e,n,r){n||f.push(new Map);let i=0;const o=Array.from(e.values());for(const n of o){if(i++,_(t)&&i+2{L(e,!0,!!r)}),f.pop())}function L(e,n,r){Qp(j_(e));const i=bs(e);if(d.has(fJ(i)))return;d.add(fJ(i));if(!n||m(e.declarations)&&X(e.declarations,e=>!!yc(e,e=>e===c))){const i=de(t);t.tracker.pushErrorFallbackNode(T(e.declarations,e=>wd(e)===t.enclosingFile)),j(e,n,r),t.tracker.popErrorFallbackNode(),i()}}function j(e,i,a,s=e.escapedName){var c,u,d,f,y,v,b;const x=Sc(s),S="default"===s;if(i&&!(131072&t.flags)&&Mh(x)&&!S)return void(t.encounteredError=!0);let C=S&&!!(-113&e.flags||16&e.flags&&m(Qp(j_(e))))&&!(2097152&e.flags),w=!C&&!i&&Mh(x)&&!S;(C||w)&&(i=!0);const N=(i?0:32)|(S&&!C?2048:0),D=1536&e.flags&&7&e.flags&&"export="!==s,E=D&&ce(j_(e),e);if((8208&e.flags||E)&&G(j_(e),e,Te(e,x),N),524288&e.flags&&function(e,n,r){var i;const o=xu(e),a=ca(e).typeParameters,s=O(a,e=>B(e,t)),c=null==(i=e.declarations)?void 0:i.find(Lg),_=gl(c?c.comment||c.parent.comment:void 0),u=l(t);t.flags|=8388608;const d=t.enclosingDeclaration;t.enclosingDeclaration=c;const p=c&&c.typeExpression&&hP(c.typeExpression)&&me.tryReuseExistingTypeNode(t,c.typeExpression.type)||h(o,t),f=Te(e,n);t.approximateLength+=8+((null==_?void 0:_.length)??0)+f.length,J(qw(kw.createTypeAliasDeclaration(void 0,f,s,p),_?[{kind:3,text:"*\n * "+_.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),r),u(),t.enclosingDeclaration=d}(e,x,N),98311&e.flags&&"export="!==s&&!(4194304&e.flags)&&!(32&e.flags)&&!(8192&e.flags)&&!E)if(a){oe(e)&&(w=!1,C=!1)}else{const n=j_(e),o=Te(e,x);if(n.symbol&&n.symbol!==e&&16&n.symbol.flags&&X(n.symbol.declarations,$T)&&((null==(c=n.symbol.members)?void 0:c.size)||(null==(u=n.symbol.exports)?void 0:u.size)))t.remappedSymbolReferences||(t.remappedSymbolReferences=new Map),t.remappedSymbolReferences.set(fJ(n.symbol),e),j(n.symbol,i,a,s),t.remappedSymbolReferences.delete(fJ(n.symbol));else if(16&e.flags||!ce(n,e)){const a=2&e.flags?KF(e)?2:1:(null==(d=e.parent)?void 0:d.valueDeclaration)&&mP(null==(f=e.parent)?void 0:f.valueDeclaration)?2:void 0,s=!C&&4&e.flags?Se(o,e):o;let c=e.declarations&&T(e.declarations,e=>hF(e));c&&yF(c.parent)&&1===c.parent.declarations.length&&(c=c.parent.parent);const l=null==(y=e.declarations)?void 0:y.find(bE);if(l&&LE(l.parent)&&fD(l.parent.right)&&(null==(v=n.symbol)?void 0:v.valueDeclaration)&&mP(n.symbol.valueDeclaration)){const e=o===l.parent.right.escapedText?void 0:l.parent.right;t.approximateLength+=12+((null==(b=null==e?void 0:e.escapedText)?void 0:b.length)??0),J(kw.createExportDeclaration(void 0,!1,kw.createNamedExports([kw.createExportSpecifier(!1,e,o)])),0),t.tracker.trackSymbol(n.symbol,t.enclosingDeclaration,111551)}else{const l=r(t,kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(s,void 0,ye(t,void 0,n,e))],a)),c);t.approximateLength+=7+s.length,J(l,s!==o?-33&N:N),s===o||i||(t.approximateLength+=16+s.length+o.length,J(kw.createExportDeclaration(void 0,!1,kw.createNamedExports([kw.createExportSpecifier(!1,s,o)])),0),w=!1,C=!1)}}else G(n,e,o,N)}if(384&e.flags&&function(e,n,r){const i=Te(e,n);t.approximateLength+=9+i.length;const o=[],a=P(Qp(j_(e)),e=>!!(8&e.flags));let s=0;for(const e of a){if(s++,_(t)&&s+2B(e,t));g(_,e=>t.approximateLength+=Cc(e.symbol).length);const d=Pd(vu(e)),f=mu(d),y=c&&Nh(c),v=y&&function(e){const r=U(e,e=>{const r=t.enclosingDeclaration;t.enclosingDeclaration=e;let i=e.expression;if(fb(i)){if(fD(i)&&""===kc(i))return o(void 0);let e;if(({introducesError:e,node:i}=be(i,t)),e)return o(void 0)}return o(kw.createExpressionWithTypeArguments(i,O(e.typeArguments,e=>me.tryReuseExistingTypeNode(t,e)||h(n(t,e),t))));function o(e){return t.enclosingDeclaration=r,e}});if(r.length===e.length)return r;return}(y)||U(function(e){let t=p;if(e.symbol.declarations)for(const n of e.symbol.declarations){const e=Nh(n);if(e)for(const n of e){const e=VS(n);nl(e)||(t===p?t=[e]:t.push(e))}}return t}(d),xe),b=j_(e),x=!!(null==(s=b.symbol)?void 0:s.valueDeclaration)&&y_(b.symbol.valueDeclaration),S=x?_u(b):wt;t.approximateLength+=(m(f)?8:0)+(m(v)?11:0);const k=[...m(f)?[kw.createHeritageClause(96,O(f,e=>function(e,n,r){const i=ve(e,111551);if(i)return i;const o=Se(`${r}_base`),a=kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(o,void 0,h(n,t))],2));return J(a,0),kw.createExpressionWithTypeArguments(kw.createIdentifier(o),void 0)}(e,S,i)))]:[],...m(v)?[kw.createHeritageClause(119,v)]:[]],T=function(e,t,n){if(!m(t))return n;const r=new Map;g(n,e=>{r.set(e.escapedName,e)});for(const n of t){const t=Qp(Pd(n,e.thisType));for(const e of t){const t=r.get(e.escapedName);t&&e.parent===t.parent&&r.delete(e.escapedName)}}return Be(r.values())}(d,f,Qp(d)),C=P(T,e=>!Ne(e)),w=X(T,Ne),N=w?we(t)?V(P(T,Ne),!0,f[0],!1):[kw.createPropertyDeclaration(void 0,kw.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:p;w&&!we(t)&&(t.approximateLength+=9);const D=V(C,!0,f[0],!1),E=V(P(Qp(b),e=>!(4194304&e.flags||"prototype"===e.escapedName||ne(e))),!0,S,!0),F=!x&&!!e.valueDeclaration&&Mm(e.valueDeclaration)&&!X(Cm(b,1));F&&(t.approximateLength+=21);const A=F?[kw.createConstructorDeclaration(kw.createModifiersFromModifierFlags(2),[],void 0)]:ge(1,b,S,177),I=he(d,f[0]);t.enclosingDeclaration=l,J(r(t,kw.createClassDeclaration(void 0,i,u,k,[...I,...E,...A,...D,...N]),e.declarations&&P(e.declarations,e=>bF(e)||JE(e))[0]),o)}(e,Te(e,x),N)),(1536&e.flags&&(!D||function(e){return k(K(e),e=>!(111551&Ka(Wa(e))))}(e))||E)&&function(e,n,r){const i=K(e),a=we(t),s=Ve(i,t=>t.parent&&t.parent===e||a?"real":"merged"),c=s.get("real")||p,l=s.get("merged")||p;if(m(c)||a){let i;if(a){const n=t.flags;t.flags|=514,i=o(e,t,-1),t.flags=n}else{const r=Te(e,n);i=kw.createIdentifier(r),t.approximateLength+=r.length}Z(c,i,r,!!(67108880&e.flags))}if(m(l)){const r=wd(t.enclosingDeclaration),i=Te(e,n),o=kw.createModuleBlock([kw.createExportDeclaration(void 0,!1,kw.createNamedExports(U(P(l,e=>"export="!==e.escapedName),n=>{var i,o;const a=Sc(n.escapedName),s=Te(n,a),c=n.declarations&&Ca(n);if(r&&(c?r!==wd(c):!X(n.declarations,e=>wd(e)===r)))return void(null==(o=null==(i=t.tracker)?void 0:i.reportNonlocalAugmentation)||o.call(i,r,e,n));const l=c&&Ua(c,!0);M(l||n);const _=l?Te(l,Sc(l.escapedName)):s;return kw.createExportSpecifier(!1,a===_?void 0:_,a)})))]);J(kw.createModuleDeclaration(void 0,kw.createIdentifier(i),o,32),0)}}(e,x,N),64&e.flags&&!(32&e.flags)&&function(e,n,r){const i=Te(e,n);t.approximateLength+=14+i.length;const o=vu(e),a=eu(e),s=O(a,e=>B(e,t)),c=mu(o),l=m(c)?Gb(c):void 0,_=V(Qp(o),!1,l),u=ge(0,o,l,180),d=ge(1,o,l,181),p=he(o,l),f=m(c)?[kw.createHeritageClause(96,U(c,e=>ve(e,111551)))]:void 0;J(kw.createInterfaceDeclaration(void 0,i,s,f,[...p,...d,...u,..._]),r)}(e,x,N),2097152&e.flags&&re(e,Te(e,x),N),4&e.flags&&"export="===e.escapedName&&oe(e),8388608&e.flags&&e.declarations)for(const n of e.declarations){const e=rs(n,n.moduleSpecifier);if(!e)continue;const r=n.isTypeOnly,i=te(e,t);t.approximateLength+=17+i.length,J(kw.createExportDeclaration(void 0,r,void 0,kw.createStringLiteral(i)),0)}if(C){const n=Te(e,x);t.approximateLength+=16+n.length,J(kw.createExportAssignment(void 0,!1,kw.createIdentifier(n)),0)}else if(w){const n=Te(e,x);t.approximateLength+=22+x.length+n.length,J(kw.createExportDeclaration(void 0,!1,kw.createNamedExports([kw.createExportSpecifier(!1,n,x)])),0)}}function M(e){if(X(e.declarations,iy))return;gn.assertIsDefined(f[f.length-1]),Se(Sc(e.escapedName),e);const t=!!(2097152&e.flags)&&!X(e.declarations,e=>!!yc(e,zF)||MF(e)||DF(e)&&!HF(e.moduleReference));f[t?0:f.length-1].set(fJ(e),e)}function J(e,n){if(II(e)){const r=Kv(e);let i=0;const o=t.enclosingDeclaration&&(Lg(t.enclosingDeclaration)?wd(t.enclosingDeclaration):t.enclosingDeclaration);32&n&&o&&(function(e){return mP(e)&&(sf(e)||cf(e))||mp(e)&&!bp(e)}(o)||TF(o))&&ZT(e)&&(i|=32),!x||32&i||o&&33554432&o.flags||!(kF(e)||ZE(e)||vF(e)||bF(e)||TF(e))||(i|=128),2048&n&&(bF(e)||xF(e)||vF(e))&&(i|=2048),i&&(e=kw.replaceModifiers(e,i|r)),t.approximateLength+=_e(i|r)}u.push(e)}function V(e,n,r,i){const o=[];let s=0;for(const c of e){if(s++,_(t)&&s+2ne(e)&&Ss(e.escapedName,99))}function G(e,n,i,o){const a=Cm(e,0);for(const e of a){t.approximateLength+=1;const n=I(e,263,t,{name:kw.createIdentifier(i)});J(r(t,n,Y(e)),o)}if(!(1536&n.flags&&n.exports&&n.exports.size)){const n=P(Qp(e),ne);t.approximateLength+=i.length,Z(n,kw.createIdentifier(i),o,!0)}}function Q(e){return 1&t.flags?Uw(kw.createEmptyStatement(),3,e):kw.createExpressionStatement(kw.createIdentifier(e))}function Y(e){if(e.declaration&&e.declaration.parent){if(LE(e.declaration.parent)&&5===cg(e.declaration.parent))return e.declaration.parent;if(hF(e.declaration.parent)&&e.declaration.parent.parent)return e.declaration.parent.parent}return e.declaration}function Z(e,n,r,i){const o=fD(n)?32:0,a=we(t);if(m(e)){t.approximateLength+=14;const s=Ve(e,e=>!m(e.declarations)||X(e.declarations,e=>wd(e)===wd(t.enclosingDeclaration))||a?"local":"remote").get("local")||p;let l=jI.createModuleDeclaration(void 0,n,kw.createModuleBlock([]),o);jT(l,c),l.locals=nd(e),l.symbol=e[0].parent;const _=u;u=[];const d=x;x=!1;const f={...t,enclosingDeclaration:l},g=t;t=f,F(nd(s),i,!0),t=g,x=d;const h=u;u=_;const y=O(h,e=>JF(e)&&!e.isExportEquals&&fD(e.expression)?kw.createExportDeclaration(void 0,!1,kw.createNamedExports([kw.createExportSpecifier(!1,e.expression,kw.createIdentifier("default"))])):e),v=k(y,e=>Lv(e,32))?O(y,E):y;l=kw.updateModuleDeclaration(l,l.modifiers,l.name,kw.createModuleBlock(v)),J(l,r)}else a&&(t.approximateLength+=14,J(kw.createModuleDeclaration(void 0,n,kw.createModuleBlock([]),o),r))}function ne(e){return!!(2887656&e.flags)||!(4194304&e.flags||"prototype"===e.escapedName||e.valueDeclaration&&jv(e.valueDeclaration)&&y_(e.valueDeclaration.parent))}function re(e,n,r){var i,o,a,s,c;const l=Ca(e);if(!l)return gn.fail();const _=bs(Ua(l,!0));if(!_)return;let u=yp(_)&&y(e.declarations,e=>{if(BF(e)||UF(e))return Zd(e.propertyName||e.name);if(LE(e)||JF(e)){const t=JF(e)?e.expression:e.right;if(bE(t))return kc(t.name)}if(wa(e)){const t=Ac(e);if(t&&fD(t))return kc(t)}})||Sc(_.escapedName);"export="===u&&q&&(u="default");const d=Te(_,u);switch(M(_),l.kind){case 209:if(261===(null==(o=null==(i=l.parent)?void 0:i.parent)?void 0:o.kind)){const e=te(_.parent||_,t),{propertyName:r}=l,i=r&&fD(r)?kc(r):void 0;t.approximateLength+=24+n.length+e.length+((null==i?void 0:i.length)??0),J(kw.createImportDeclaration(void 0,kw.createImportClause(void 0,void 0,kw.createNamedImports([kw.createImportSpecifier(!1,i?kw.createIdentifier(i):void 0,kw.createIdentifier(n))])),kw.createStringLiteral(e),void 0),0);break}gn.failBadSyntaxKind((null==(a=l.parent)?void 0:a.parent)||l,"Unhandled binding element grandparent kind in declaration serialization");break;case 305:227===(null==(c=null==(s=l.parent)?void 0:s.parent)?void 0:c.kind)&&ie(Sc(e.escapedName),d);break;case 261:if(bE(l.initializer)){const e=l.initializer,i=kw.createUniqueName(n),o=te(_.parent||_,t);t.approximateLength+=22+o.length+kc(i).length,J(kw.createImportEqualsDeclaration(void 0,!1,i,kw.createExternalModuleReference(kw.createStringLiteral(o))),0),t.approximateLength+=12+n.length+kc(i).length+kc(e.name).length,J(kw.createImportEqualsDeclaration(void 0,!1,kw.createIdentifier(n),kw.createQualifiedName(i,e.name)),r);break}case 272:if("export="===_.escapedName&&X(_.declarations,e=>mP(e)&&cf(e))){oe(e);break}const p=!(512&_.flags||hF(l));t.approximateLength+=11+n.length+Sc(_.escapedName).length,J(kw.createImportEqualsDeclaration(void 0,!1,kw.createIdentifier(n),p?ae(_,t,-1,!1):kw.createExternalModuleReference(kw.createStringLiteral(te(_,t)))),p?r:0);break;case 271:J(kw.createNamespaceExportDeclaration(kc(l.name)),0);break;case 274:{const e=te(_.parent||_,t),r=t.bundled?kw.createStringLiteral(e):l.parent.moduleSpecifier,i=EF(l.parent)?l.parent.attributes:void 0,o=iA(l.parent);t.approximateLength+=14+n.length+3+(o?4:0),J(kw.createImportDeclaration(void 0,kw.createImportClause(o?156:void 0,kw.createIdentifier(n),void 0),r,i),0);break}case 275:{const e=te(_.parent||_,t),r=t.bundled?kw.createStringLiteral(e):l.parent.parent.moduleSpecifier,i=iA(l.parent.parent);t.approximateLength+=19+n.length+3+(i?4:0),J(kw.createImportDeclaration(void 0,kw.createImportClause(i?156:void 0,void 0,kw.createNamespaceImport(kw.createIdentifier(n))),r,l.parent.attributes),0);break}case 281:t.approximateLength+=19+n.length+3,J(kw.createExportDeclaration(void 0,!1,kw.createNamespaceExport(kw.createIdentifier(n)),kw.createStringLiteral(te(_,t))),0);break;case 277:{const e=te(_.parent||_,t),r=t.bundled?kw.createStringLiteral(e):l.parent.parent.parent.moduleSpecifier,i=iA(l.parent.parent.parent);t.approximateLength+=19+n.length+3+(i?4:0),J(kw.createImportDeclaration(void 0,kw.createImportClause(i?156:void 0,void 0,kw.createNamedImports([kw.createImportSpecifier(!1,n!==u?kw.createIdentifier(u):void 0,kw.createIdentifier(n))])),r,l.parent.parent.parent.attributes),0);break}case 282:const f=l.parent.parent.moduleSpecifier;if(f){const e=l.propertyName;e&&tp(e)&&(u="default")}ie(Sc(e.escapedName),f?u:d,f&&Uu(f)?kw.createStringLiteral(f.text):void 0);break;case 278:oe(e);break;case 227:case 212:case 213:"default"===e.escapedName||"export="===e.escapedName?oe(e):ie(n,d);break;default:return gn.failBadSyntaxKind(l,"Unhandled alias declaration kind in symbol serializer!")}}function ie(e,n,r){t.approximateLength+=16+e.length+(e!==n?n.length:0),J(kw.createExportDeclaration(void 0,!1,kw.createNamedExports([kw.createExportSpecifier(!1,e!==n?n:void 0,e)]),r),0)}function oe(e){var n;if(4194304&e.flags)return!1;const r=Sc(e.escapedName),i="export="===r,o=i||"default"===r,a=e.declarations&&Ca(e),s=a&&Ua(a,!0);if(s&&m(s.declarations)&&X(s.declarations,e=>wd(e)===wd(c))){const n=a&&(JF(a)||LE(a)?kh(a):Th(a)),l=n&&fb(n)?function(e){switch(e.kind){case 80:return e;case 167:do{e=e.left}while(80!==e.kind);return e;case 212:do{if(sg(e.expression)&&!mD(e.name))return e.name;e=e.expression}while(80!==e.kind);return e}}(n):void 0,_=l&&ts(l,-1,!0,!0,c);(_||s)&&M(_||s);const d=t.tracker.disableTrackSymbol;if(t.tracker.disableTrackSymbol=!0,o)t.approximateLength+=10,u.push(kw.createExportAssignment(void 0,i,se(s,t,-1)));else if(l===n&&l)ie(r,kc(l));else if(n&&JE(n))ie(r,Te(s,Cc(s)));else{const n=Se(r,e);t.approximateLength+=n.length+10,J(kw.createImportEqualsDeclaration(void 0,!1,kw.createIdentifier(n),ae(s,t,-1,!1)),0),ie(r,n)}return t.tracker.disableTrackSymbol=d,!0}{const a=Se(r,e),c=Hw(j_(bs(e)));if(ce(c,e))G(c,e,a,o?0:32);else{const i=268!==(null==(n=t.enclosingDeclaration)?void 0:n.kind)||98304&e.flags&&!(65536&e.flags)?2:1;t.approximateLength+=a.length+5;J(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(a,void 0,ye(t,void 0,c,e))],i)),s&&4&s.flags&&"export="===s.escapedName?128:r===a?32:0)}return o?(t.approximateLength+=a.length+10,u.push(kw.createExportAssignment(void 0,i,kw.createIdentifier(a))),!0):r!==a&&(ie(r,a),!0)}}function ce(e,n){var r;const i=wd(t.enclosingDeclaration);return 48&Tx(e)&&!X(null==(r=e.symbol)?void 0:r.declarations,N_)&&!m(Gm(e))&&!Ec(e)&&!(!m(P(Qp(e),ne))&&!m(Cm(e,0)))&&!m(Cm(e,1))&&!pe(n,c)&&!(e.symbol&&X(e.symbol.declarations,e=>wd(e)!==i))&&!X(Qp(e),e=>fd(e.escapedName))&&!X(Qp(e),e=>X(e.declarations,e=>wd(e)!==i))&&k(Qp(e),e=>!!Ss(Cc(e),A)&&(!(98304&e.flags)||M_(e)===L_(e)))}function le(e,n,i){return function(o,a,s){var c,l,_,u,d,p;const f=dx(o),m=!!(2&f)&&!we(t);if(a&&2887656&o.flags)return[];if(4194304&o.flags||"constructor"===o.escapedName||s&&xm(s,o.escapedName)&&Yj(xm(s,o.escapedName))===Yj(o)&&(16777216&o.flags)==(16777216&xm(s,o.escapedName).flags)&&Ok(j_(o),Yc(s,o.escapedName)))return[];const h=-1025&f|(a?256:0),y=ue(o,t),v=null==(c=o.declarations)?void 0:c.find(an(LD,v_,hF,OD,LE,bE));if(98304&o.flags&&i){const e=[];if(65536&o.flags){const n=o.declarations&&g(o.declarations,e=>179===e.kind?e:SE(e)&&lg(e)?g(e.arguments[2].properties,e=>{const t=Ac(e);if(t&&fD(t)&&"set"===kc(t))return e}):void 0);gn.assert(!!n);const i=d_(n)?Rg(n).parameters[0]:void 0,a=null==(l=o.declarations)?void 0:l.find(Iu);t.approximateLength+=_e(h)+7+(i?Cc(i).length:5)+(m?0:2),e.push(r(t,kw.createSetAccessorDeclaration(kw.createModifiersFromModifierFlags(h),y,[kw.createParameterDeclaration(void 0,void 0,i?W(i,z(i),t):"value",void 0,m?void 0:ye(t,a,L_(o),o))],void 0),a??v))}if(32768&o.flags){const n=null==(_=o.declarations)?void 0:_.find(Ou);t.approximateLength+=_e(h)+8+(m?0:2),e.push(r(t,kw.createGetAccessorDeclaration(kw.createModifiersFromModifierFlags(h),y,[],m?void 0:ye(t,n,j_(o),o),void 0),n??v))}return e}if(98311&o.flags){const n=(Yj(o)?8:0)|h;return t.approximateLength+=2+(m?0:2)+_e(n),r(t,e(kw.createModifiersFromModifierFlags(n),y,16777216&o.flags?kw.createToken(58):void 0,m?void 0:ye(t,null==(u=o.declarations)?void 0:u.find(zD),L_(o),o),void 0),(null==(d=o.declarations)?void 0:d.find(an(LD,hF)))||v)}if(8208&o.flags){const i=Cm(j_(o),0);if(m){const n=(Yj(o)?8:0)|h;return t.approximateLength+=1+_e(n),r(t,e(kw.createModifiersFromModifierFlags(n),y,16777216&o.flags?kw.createToken(58):void 0,void 0,void 0),(null==(p=o.declarations)?void 0:p.find(d_))||i[0]&&i[0].declaration||o.declarations&&o.declarations[0])}const a=[];for(const e of i){t.approximateLength+=1;const i=I(e,n,t,{name:y,questionToken:16777216&o.flags?kw.createToken(58):void 0,modifiers:h?kw.createModifiersFromModifierFlags(h):void 0}),s=e.declaration&&bg(e.declaration.parent)?e.declaration.parent:e.declaration;a.push(r(t,i,s))}return a}return gn.fail(`Unhandled class member kind! ${o.__debugFlags||o.flags}`)}}function _e(e){let t=0;return 32&e&&(t+=7),128&e&&(t+=8),2048&e&&(t+=8),4096&e&&(t+=6),1&e&&(t+=7),2&e&&(t+=8),4&e&&(t+=10),64&e&&(t+=9),256&e&&(t+=7),16&e&&(t+=9),8&e&&(t+=9),512&e&&(t+=9),1024&e&&(t+=6),8192&e&&(t+=3),16384&e&&(t+=4),t}function fe(e,t){return s(e,!1,t)}function ge(e,n,i,o){const a=Cm(n,e);if(1===e){if(!i&&k(a,e=>0===m(e.parameters)))return[];if(i){const e=Cm(i,1);if(!m(e)&&k(a,e=>0===m(e.parameters)))return[];if(e.length===a.length){let t=!1;for(let n=0;nh(e,t)),i=se(e.target.symbol,t,788968)):e.symbol&&Zs(e.symbol,c,n)&&(i=se(e.symbol,t,788968)),i)return kw.createExpressionWithTypeArguments(i,r)}function xe(e){const n=ve(e,788968);return n||(e.symbol?kw.createExpressionWithTypeArguments(se(e.symbol,t,788968),void 0):void 0)}function Se(e,n){var r,i;const o=n?fJ(n):void 0;if(o&&t.remappedSymbolNames.has(o))return t.remappedSymbolNames.get(o);n&&(e=ke(n,e));let a=0;const s=e;for(;null==(r=t.usedSymbolNames)?void 0:r.has(e);)a++,e=`${s}_${a}`;return null==(i=t.usedSymbolNames)||i.add(e),o&&t.remappedSymbolNames.set(o,e),e}function ke(e,n){if("default"===n||"__class"===n||"__function"===n){const r=l(t);t.flags|=16777216;const i=Uc(e,t);r(),n=i.length>0&&Hm(i.charCodeAt(0))?jy(i):i}return"default"===n?n="_default":"export="===n&&(n="_exports"),n=Ss(n,A)&&!Mh(n)?n:"_"+n.replace(/[^a-z0-9]/gi,"_")}function Te(e,n){const r=fJ(e);return t.remappedSymbolNames.has(r)?t.remappedSymbolNames.get(r):(n=ke(e,n),t.remappedSymbolNames.set(r,n),n)}}function we(e){return-1!==e.maxExpansionDepth}function Ne(e){return!!e.valueDeclaration&&Fc(e.valueDeclaration)&&mD(e.valueDeclaration.name)}}(),me=sG(E,ue.syntacticBuilderResolver),ge=TC({evaluateElementAccessExpression:function(e,t){const n=e.expression;if(fb(n)&&Uu(e.argumentExpression)){const r=ts(n,111551,!0);if(r&&384&r.flags){const n=xc(e.argumentExpression.text),i=r.exports.get(n);if(i)return gn.assert(wd(i.valueDeclaration)===wd(r.valueDeclaration)),t?VJ(e,i,t):Yz(i.valueDeclaration)}}return kC(void 0)},evaluateEntityNameExpression:UJ}),ye=nd(),Ce=Xo(4,"undefined");Ce.declarations=[];var we=Xo(1536,"globalThis",8);we.exports=ye,we.declarations=[],ye.set(we.escapedName,we);var Ne,Fe,Ae,Ie=Xo(4,"arguments"),Oe=Xo(4,"require"),Le=E.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",je=!E.verbatimModuleSyntax,Me=0,Je=0,ze=NC({compilerOptions:E,requireSymbol:Oe,argumentsSymbol:Ie,globals:ye,getSymbolOfDeclaration:xs,error:Jo,getRequiresScopeChangeCache:fa,setRequiresScopeChangeCache:ma,lookup:ua,onPropertyWithInvalidInitializer:function(e,t,n,r){if(!z)return e&&!r&&va(e,t,t)||Jo(e,e&&n.type&&Bs(n.type,e.pos)?ha.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:ha.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,Bp(n.name),ya(t)),!0;return!1},onFailedToResolveSymbol:function(e,t,n,r){const i=it(t)?t:t.escapedText;a(()=>{if(!(e&&(325===e.parent.kind||va(e,i,t)||ba(e)||function(e,t,n){const r=1920|(Mm(e)?111551:0);if(n===r){const n=Wa(ze(e,t,788968&~r,void 0,!1)),i=e.parent;if(n){if(ED(i)){gn.assert(i.left===e,"Should only be resolving left side of qualified name as a namespace");const r=i.right.escapedText;if(xm(Pu(n),r))return Jo(i,ha.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Sc(t),Sc(r)),!0}return Jo(e,ha._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,Sc(t)),!0}}return!1}(e,i,n)||function(e,t){if(Sa(t)&&282===e.parent.kind)return Jo(e,ha.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,t),!0;return!1}(e,i)||function(e,t,n){if(111127&n){if(Wa(ze(e,t,1024,void 0,!1)))return Jo(e,ha.Cannot_use_namespace_0_as_a_value,Sc(t)),!0}else if(788544&n){if(Wa(ze(e,t,1536,void 0,!1)))return Jo(e,ha.Cannot_use_namespace_0_as_a_type,Sc(t)),!0}return!1}(e,i,n)||function(e,t,n){if(111551&n){if(Sa(t)){const n=e.parent.parent;if(n&&n.parent&&lP(n)){const r=n.token;265===n.parent.kind&&96===r?Jo(e,ha.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types,Sc(t)):y_(n.parent)&&96===r?Jo(e,ha.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values,Sc(t)):y_(n.parent)&&119===r&&Jo(e,ha.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types,Sc(t))}else Jo(e,ha._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,Sc(t));return!0}const n=Wa(ze(e,t,788544,void 0,!1)),r=n&&Ka(n);if(n&&void 0!==r&&!(111551&r)){const r=Sc(t);return!function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(t)?!function(e,t){const n=yc(e.parent,e=>!FD(e)&&!OD(e)&&(XD(e)||"quit"));if(n&&1===n.members.length){const e=Pu(t);return!!(1048576&e.flags)&&sM(e,384,!0)}return!1}(e,n)?Jo(e,ha._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,r):Jo(e,ha._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,r,"K"===r?"P":"K"):Jo(e,ha._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,r),!0}}return!1}(e,i,n)||function(e,t,n){if(788584&n){const n=Wa(ze(e,t,111127,void 0,!1));if(n&&!(1920&n.flags))return Jo(e,ha._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Sc(t)),!0}return!1}(e,i,n)))){let o,a;if(t&&(a=function(e){const t=ya(e),n=cp().get(t);return n&&Se(n.keys())}(t),a&&Jo(e,r,ya(t),a)),!a&&Hi{var a;const s=t.escapedName,c=r&&mP(r)&&sf(r);if(e&&(2&n||(32&n||384&n)&&!(111551&~n))){const n=Ps(t);(2&n.flags||32&n.flags||384&n.flags)&&function(e,t){var n;if(gn.assert(!!(2&e.flags||32&e.flags||384&e.flags)),67108881&e.flags&&32&e.flags)return;const r=null==(n=e.declarations)?void 0:n.find(e=>pp(e)||y_(e)||267===e.kind);if(void 0===r)return gn.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(33554432&r.flags||pa(r,t))){let n;const i=Bp(Ac(r));2&e.flags?n=Jo(t,ha.Block_scoped_variable_0_used_before_its_declaration,i):32&e.flags?n=Jo(t,ha.Class_0_used_before_its_declaration,i):256&e.flags?n=Jo(t,ha.Enum_0_used_before_its_declaration,i):(gn.assert(!!(128&e.flags)),FS(E)&&(n=Jo(t,ha.Enum_0_used_before_its_declaration,i))),n&&fT(n,Wp(r,ha._0_is_declared_here,i))}}(n,e)}if(c&&!(111551&~n)&&!(16777216&e.flags)){const n=bs(t);m(n.declarations)&&k(n.declarations,e=>NF(e)||mP(e)&&!!e.symbol.globalExports)&&Uo(!E.allowUmdGlobalAccess,e,ha._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,Sc(s))}if(i&&!o&&!(111551&~n)){const r=bs(Fd(t)),o=oy(i);r===xs(i)?Jo(e,ha.Parameter_0_cannot_reference_itself,Bp(i.name)):r.valueDeclaration&&r.valueDeclaration.pos>i.pos&&o.parent.locals&&ua(o.parent.locals,r.escapedName,n)===r&&Jo(e,ha.Parameter_0_cannot_reference_identifier_1_declared_after_it,Bp(i.name),Bp(e))}if(e&&111551&n&&2097152&t.flags&&!(111551&t.flags)&&!DT(e)){const n=Ya(t,111551);if(n){const t=282===n.kind||279===n.kind||281===n.kind?ha._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:ha._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,r=Sc(s);ga(Jo(e,t,r),n,r)}}if(E.isolatedModules&&t&&c&&!(111551&~n)){const e=ua(ye,s,n)===t&&mP(r)&&r.locals&&ua(r.locals,s,-111552);if(e){const t=null==(a=e.declarations)?void 0:a.find(e=>277===e.kind||274===e.kind||275===e.kind||272===e.kind);t&&!$l(t)&&Jo(t,ha.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Sc(s))}}})}}),qe=NC({compilerOptions:E,requireSymbol:Oe,argumentsSymbol:Ie,globals:ye,getSymbolOfDeclaration:xs,error:Jo,getRequiresScopeChangeCache:fa,setRequiresScopeChangeCache:ma,lookup:function(e,t,n){const r=ua(e,t,n);if(r)return r;let i;if(e===ye){i=U(["string","number","boolean","object","bigint","symbol"],t=>e.has(t.charAt(0).toUpperCase()+t.slice(1))?Xo(524288,t):void 0).concat(Be(e.values()))}else i=Be(e.values());return OO(Sc(t),i,n)}});const Ue={getNodeCount:()=>Pe(e.getSourceFiles(),(e,t)=>e+t.nodeCount,0),getIdentifierCount:()=>Pe(e.getSourceFiles(),(e,t)=>e+t.identifierCount,0),getSymbolCount:()=>Pe(e.getSourceFiles(),(e,t)=>e+t.symbolCount,u),getTypeCount:()=>_,getInstantiationCount:()=>d,getRelationCacheSizes:()=>({assignable:So.size,identity:To.size,subtype:bo.size,strictSubtype:xo.size}),isUndefinedSymbol:e=>e===Ce,isArgumentsSymbol:e=>e===Ie,isUnknownSymbol:e=>e===vt,getMergedSymbol:bs,symbolIsValue:Is,getDiagnostics:mz,getGlobalDiagnostics:function(){return gz(),ho.getGlobalDiagnostics()},getRecursionIdentity:BC,getUnmatchedProperties:yN,getTypeOfSymbolAtLocation:(e,t)=>{const n=bc(t);return n?function(e,t){if(e=Ps(e),(80===t.kind||81===t.kind)&&(bb(t)&&(t=t.parent),Nm(t)&&(!ih(t)||gx(t)))){const n=Fw(gx(t)&&212===t.kind?lO(t,void 0,!0):qM(t));if(Ps(la(t).resolvedSymbol)===e)return n}if(gh(t)&&Iu(t.parent)&&m_(t.parent))return T_(t.parent.symbol);return xb(t)&&gx(t.parent)?L_(e):M_(e)}(e,n):Ft},getTypeOfSymbol:j_,getSymbolsOfParameterPropertyDeclaration:(e,t)=>{const n=bc(e,AD);return void 0===n?gn.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):(gn.assert(ac(n,n.parent)),function(e,t){const n=e.parent,r=e.parent.parent,i=ua(n.locals,t,111551),o=ua(Td(r.symbol),t,111551);if(i&&o)return[i,o];return gn.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,xc(t)))},getDeclaredTypeOfSymbol:Pu,getPropertiesOfType:Qp,getPropertyOfType:(e,t)=>xm(e,xc(t)),getPrivateIdentifierPropertyOfType:(e,t,n)=>{const r=bc(n);if(!r)return;const i=pO(xc(t),r);return i?hO(e,i):void 0},getTypeOfPropertyOfType:(e,t)=>Yc(e,xc(t)),getIndexInfoOfType:(e,t)=>ig(e,0===t?Ut:Vt),getIndexInfosOfType:Gm,getIndexInfosOfIndexSymbol:Zh,getSignaturesOfType:Cm,getIndexTypeOfType:(e,t)=>_g(e,0===t?Ut:Vt),getIndexType:e=>cx(e),getBaseTypes:mu,getBaseTypeOfLiteralType:cw,getWidenedType:Hw,getWidenedLiteralType:_w,fillMissingTypeArguments:Mg,getTypeFromTypeNode:e=>{const t=bc(e,N_);return t?VS(t):Ft},getParameterType:dj,getParameterIdentifierInfoAtPosition:function(e,t){var n;if(318===(null==(n=e.declaration)?void 0:n.kind))return;const r=e.parameters.length-(bJ(e)?1:0);if(tCR(e),getReturnTypeOfSignature:ah,isNullableType:eO,getNullableType:Tw,getNonNullableType:Nw,getNonOptionalType:Fw,getTypeArguments:by,typeToTypeNode:ue.typeToTypeNode,typePredicateToTypePredicateNode:ue.typePredicateToTypePredicateNode,indexInfoToIndexSignatureDeclaration:ue.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:ue.signatureToSignatureDeclaration,symbolToEntityName:ue.symbolToEntityName,symbolToExpression:ue.symbolToExpression,symbolToNode:ue.symbolToNode,symbolToTypeParameterDeclarations:ue.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:ue.symbolToParameterDeclaration,typeParameterToDeclaration:ue.typeParameterToDeclaration,getSymbolsInScope:(e,t)=>{const n=bc(e);return n?function(e,t){if(67108864&e.flags)return[];const n=nd();let r=!1;return i(),n.delete("this"),xg(n);function i(){for(;e;){switch(fu(e)&&e.locals&&!af(e)&&a(e.locals,t),e.kind){case 308:if(!fO(e))break;case 268:s(xs(e).exports,2623475&t);break;case 267:a(xs(e).exports,8&t);break;case 232:e.name&&o(e.symbol,t);case 264:case 265:r||a(Td(xs(e)),788968&t);break;case 219:e.name&&o(e.symbol,t)}Vf(e)&&o(Ie,t),r=jv(e),e=e.parent}a(ye,t)}function o(e,t){if(fx(e)&t){const t=e.escapedName;n.has(t)||n.set(t,e)}}function a(e,t){t&&e.forEach(e=>{o(e,t)})}function s(e,t){t&&e.forEach(e=>{ed(e,282)||ed(e,281)||"default"===e.escapedName||o(e,t)})}}(n,t):[]},getSymbolAtLocation:e=>{const t=bc(e);return t?Nz(t,!0):void 0},getIndexInfosAtLocation:e=>{const t=bc(e);return t?function(e){if(fD(e)&&bE(e.parent)&&e.parent.name===e){const t=rx(e),n=qM(e.parent.expression);return R(1048576&n.flags?n.types:[n],e=>P(Gm(e),e=>$m(t,e.keyType)))}return}(t):void 0},getShorthandAssignmentValueSymbol:e=>{const t=bc(e);return t?function(e){if(e&&305===e.kind)return ts(e.name,2208703,!0);return}(t):void 0},getExportSpecifierLocalTargetSymbol:e=>{const t=bc(e,UF);return t?function(e){if(UF(e)){const t=e.propertyName||e.name;return e.parent.parent.moduleSpecifier?Ra(e.parent.parent,e):11===t.kind?void 0:ts(t,2998271,!0)}return ts(e,2998271,!0)}(t):void 0},getExportSymbolOfSymbol:e=>bs(e.exportSymbol||e),getTypeAtLocation:e=>{const t=bc(e);return t?Dz(t):Ft},getTypeOfAssignmentPattern:e=>{const t=bc(e,F_);return t&&Ez(t)||Ft},getPropertySymbolOfDestructuringAssignment:e=>{const t=bc(e,fD);return t?function(e){const t=Ez(st(e.parent.parent,F_));return t&&xm(t,e.escapedText)}(t):void 0},signatureToString:(e,t,n,r)=>fc(e,bc(t),n,r),typeToString:(e,t,n)=>mc(e,bc(t),n),symbolToString:(e,t,n,r)=>dc(e,bc(t),n,r),typePredicateToString:(e,t,n)=>jc(e,bc(t),n),writeSignature:(e,t,n,r,i,o,a,s)=>fc(e,bc(t),n,r,i,o,a,s),writeType:(e,t,n,r,i,o,a)=>mc(e,bc(t),n,r,i,o,a),writeSymbol:(e,t,n,r,i)=>dc(e,bc(t),n,r,i),writeTypePredicate:(e,t,n,r)=>jc(e,bc(t),n,r),getAugmentedPropertiesOfType:Iz,getRootSymbols:function e(t){const n=function(e){if(6&ux(e))return U(ca(e).containingType.types,t=>xm(t,e.escapedName));if(33554432&e.flags){const{links:{leftSpread:t,rightSpread:n,syntheticOrigin:r}}=e;return t?[t,n]:r?[r]:ln(function(e){let t,n=e;for(;n=ca(n).target;)t=n;return t}(e))}return}(t);return n?R(n,e):[t]},getSymbolOfExpando:BL,getContextualType:(e,t)=>{const n=bc(e,Q_);if(n)return 4&t?Ke(n,()=>$A(n,t)):$A(n,t)},getContextualTypeForObjectLiteralElement:e=>{const t=bc(e,w_);return t?MA(t,void 0):void 0},getContextualTypeForArgumentAtIndex:(e,t)=>{const n=bc(e,q_);return n&&bA(n,t)},getContextualTypeForJsxAttribute:e=>{const t=bc(e,Cu);return t&&JA(t,void 0)},isContextSensitive:Fk,getTypeOfPropertyOfContextualType:CA,getFullyQualifiedName:es,getResolvedSignature:(e,t,n)=>He(e,t,n,0),getCandidateSignaturesForStringLiteralCompletions:function(e,t){const n=new Set,r=[];Ke(t,()=>He(e,r,void 0,0));for(const e of r)n.add(e);r.length=0,$e(t,()=>He(e,r,void 0,0));for(const e of r)n.add(e);return Be(n)},getResolvedSignatureForSignatureHelp:(e,t,n)=>$e(e,()=>He(e,t,n,16)),getExpandedParameters:Bd,hasEffectiveRestParameter:yj,containsArgumentsReference:Ug,getConstantValue:e=>{const t=bc(e,Zz);return t?eq(t):void 0},isValidPropertyAccess:(e,t)=>{const n=bc(e,B_);return!!n&&function(e,t){switch(e.kind){case 212:return RO(e,108===e.expression.kind,t,Hw(WM(e.expression)));case 167:return RO(e,!1,t,Hw(WM(e.left)));case 206:return RO(e,!1,t,VS(e))}}(n,xc(t))},isValidPropertyAccessForCompletions:(e,t,n)=>{const r=bc(e,bE);return!!r&&MO(r,t,n)},getSignatureFromDeclaration:e=>{const t=bc(e,__);return t?Rg(t):void 0},isImplementationOfOverload:e=>{const t=bc(e,__);return t?$z(t):void 0},getImmediateAliasedSymbol:gI,getAliasedSymbol:$a,getEmitResolver:function(e,t,n){n||mz(e,t);return _e},requiresAddingImplicitUndefined:Kz,getExportsOfModule:ps,getExportsAndPropertiesOfModule:function(e){const t=ps(e),n=cs(e);if(n!==e){const e=j_(n);ms(e)&&de(t,Qp(e))}return t},forEachExportAndPropertyOfModule:function(e,t){hs(e).forEach((e,n)=>{Us(n)||t(e,n)});const n=cs(e);if(n!==e){const e=j_(n);ms(e)&&function(e,t){e=Af(e),3670016&e.flags&&Lp(e).members.forEach((e,n)=>{Ws(e,n)&&t(e,n)})}(e,(e,n)=>{t(e,n)})}},getSymbolWalker:mB(function(e){return vh(e)||wt},th,ah,mu,Lp,j_,zN,uf,mb,by),getAmbientModules:function(){Wn||(Wn=[],ye.forEach((e,t)=>{ZB.test(t)&&Wn.push(e)}));return Wn},getJsxIntrinsicTagNamesAt:function(e){const t=wI(XB.IntrinsicElements,e);return t?Qp(t):p},isOptionalParameter:e=>{const t=bc(e,AD);return!!t&&Ng(t)},tryGetMemberInModuleExports:(e,t)=>fs(xc(e),t),tryGetMemberInModuleExportsAndProperties:(e,t)=>function(e,t){const n=fs(e,t);if(n)return n;const r=cs(t);if(r===t)return;const i=j_(r);return ms(i)?xm(i,e):void 0}(xc(e),t),tryFindAmbientModule:e=>kg(e,!0),getApparentType:Pf,getUnionType:zb,isTypeAssignableTo:Jk,createAnonymousType:Ks,createSignature:Id,createSymbol:Xo,createIndexInfo:qh,getAnyType:()=>wt,getStringType:()=>Ut,getStringLiteralType:TS,getNumberType:()=>Vt,getNumberLiteralType:CS,getBigIntType:()=>Wt,getBigIntLiteralType:ES,getUnknownType:()=>Ot,createPromiseType:Rj,createArrayType:Hv,getElementTypeOfArrayType:XC,getBooleanType:()=>Yt,getFalseType:e=>e?$t:Ht,getTrueType:e=>e?Gt:Xt,getVoidType:()=>rn,getUndefinedType:()=>Lt,getNullType:()=>zt,getESSymbolType:()=>nn,getNeverType:()=>cn,getNonPrimitiveType:()=>fn,getOptionalType:()=>Bt,getPromiseType:()=>lv(!1),getPromiseLikeType:()=>_v(!1),getAnyAsyncIterableType:()=>{const e=vv(!1);if(e!==On)return my(e,[wt,wt,wt])},isSymbolAccessible:tc,isArrayType:WC,isTupleType:fw,isArrayLikeType:QC,isEmptyAnonymousObjectType:cT,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some(t=>{const n=t.name&&(aP(t.name)?TS(_C(t.name)):rx(t.name)),r=n&&mC(n)?gC(n):void 0,i=void 0===r?void 0:Yc(e,r);return!!i&&sw(i)&&!Jk(Dz(t),i)})},getExactOptionalProperties:function(e){return Qp(e).filter(e=>Ow(j_(e)))},getAllPossiblePropertiesOfTypes:function(e){const t=zb(e);if(!(1048576&t.flags))return Iz(t);const n=nd();for(const r of e)for(const{escapedName:e}of Iz(r))if(!n.has(e)){const r=Of(t,e);r&&n.set(e,r)}return Be(n.values())},getSuggestedSymbolForNonexistentProperty:EO,getSuggestedSymbolForNonexistentJSXAttribute:FO,getSuggestedSymbolForNonexistentSymbol:(e,t,n)=>AO(e,xc(t),n),getSuggestedSymbolForNonexistentModule:IO,getSuggestedSymbolForNonexistentClassMember:DO,getBaseConstraintOfType:xf,getDefaultFromTypeParameter:e=>e&&262144&e.flags?wf(e):void 0,resolveName:(e,t,n,r)=>ze(t,xc(e),n,void 0,!1,r),getJsxNamespace:e=>Sc(Oo(e)),getJsxFragmentFactory:e=>{const t=fq(e);return t&&Sc(mb(t).escapedText)},getAccessibleSymbolChain:Xs,getTypePredicateOfSignature:th,resolveExternalModuleName:e=>{const t=bc(e,Q_);return t&&rs(t,t,!0)},resolveExternalModuleSymbol:cs,tryGetThisTypeAt:(e,t,n)=>{const r=bc(e);return r&&aA(r,t,n)},getTypeArgumentConstraint:e=>{const t=bc(e,N_);return t&&function(e){const t=at(e.parent,Ju);if(!t)return;const n=sR(t);if(!n)return;const r=uf(n[t.typeArguments.indexOf(e)]);return r&&Ck(r,ZS(n,oR(t,n)))}(t)},getSuggestionDiagnostics:(n,r)=>{const i=bc(n,mP)||gn.fail("Could not determine parsed source file.");if(yT(i,E,e))return p;let o;try{return t=r,yz(i),gn.assert(!!(1&la(i).flags)),o=de(o,yo.getDiagnostics(i.fileName)),BR(fz(i),(e,t,n)=>{Cd(e)||pz(t,!!(33554432&e.flags))||(o||(o=[])).push({...n,category:2})}),o||p}finally{t=void 0}},runWithCancellationToken:(e,n)=>{try{return t=e,n(Ue)}finally{t=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:eu,isDeclarationVisible:Vc,isPropertyAccessible:BO,getTypeOnlyAliasDeclaration:Ya,getMemberOverrideModifierStatus:function(e,t,n){if(!t.name)return 0;const r=xs(e),i=Pu(r),o=Pd(i),a=j_(r),s=Ch(e)&&mu(i),c=(null==s?void 0:s.length)?Pd(xe(s),i.thisType):void 0,l=_u(i),_=t.parent?Rv(t):Lv(t,16);return OJ(e,a,l,c,i,o,_,Bv(t),jv(t),!1,n)},isTypeParameterPossiblyReferenced:vk,typeHasCallOrConstructSignatures:Oz,getSymbolFlags:Ka,getTypeArgumentsForResolvedSignature:function(e){return void 0===e.mapper?void 0:GS((e.target||e).typeParameters,e.mapper)},isLibType:Ic};function $e(e,t){if(e=yc(e,z_)){const n=[],r=[];for(;e;){const t=la(e);if(n.push([t,t.resolvedSignature]),t.resolvedSignature=void 0,$T(e)){const t=ca(xs(e)),n=t.type;r.push([t,n]),t.type=void 0}e=yc(e.parent,z_)}const i=t();for(const[e,t]of n)e.resolvedSignature=t;for(const[e,t]of r)e.type=t;return i}return t()}function Ke(e,t){const n=yc(e,q_);if(n){let t=e;do{la(t).skipDirectInference=!0,t=t.parent}while(t&&t!==n)}b=!0;const r=$e(e,t);if(b=!1,n){let t=e;do{la(t).skipDirectInference=void 0,t=t.parent}while(t&&t!==n)}return r}function He(e,t,n,r){const i=bc(e,q_);Ne=n;const o=i?jL(i,t,r):void 0;return Ne=void 0,o}var Ge=new Map,Ye=new Map,Ze=new Map,et=new Map,tt=new Map,rt=new Map,ot=new Map,ct=new Map,lt=new Map,_t=new Map,ut=new Map,dt=new Map,pt=new Map,ft=new Map,mt=new Map,gt=[],ht=new Map,yt=new Set,vt=Xo(4,"unknown"),xt=Xo(0,"__resolving__"),St=new Map,kt=new Map,Ct=new Set,wt=Js(1,"any"),Nt=Js(1,"any",262144,"auto"),Dt=Js(1,"any",void 0,"wildcard"),Et=Js(1,"any",void 0,"blocked string"),Ft=Js(1,"error"),Pt=Js(1,"unresolved"),At=Js(1,"any",65536,"non-inferrable"),It=Js(1,"intrinsic"),Ot=Js(2,"unknown"),Lt=Js(32768,"undefined"),jt=V?Lt:Js(32768,"undefined",65536,"widening"),Mt=Js(32768,"undefined",void 0,"missing"),Rt=ie?Mt:Lt,Bt=Js(32768,"undefined",void 0,"optional"),zt=Js(65536,"null"),qt=V?zt:Js(65536,"null",65536,"widening"),Ut=Js(4,"string"),Vt=Js(8,"number"),Wt=Js(64,"bigint"),$t=Js(512,"false",void 0,"fresh"),Ht=Js(512,"false"),Gt=Js(512,"true",void 0,"fresh"),Xt=Js(512,"true");Gt.regularType=Xt,Gt.freshType=Gt,Xt.regularType=Xt,Xt.freshType=Gt,$t.regularType=Ht,$t.freshType=$t,Ht.regularType=Ht,Ht.freshType=$t;var Qt,Yt=zb([Ht,Xt]),nn=Js(4096,"symbol"),rn=Js(16384,"void"),cn=Js(131072,"never"),_n=Js(131072,"never",262144,"silent"),dn=Js(131072,"never",void 0,"implicit"),pn=Js(131072,"never",void 0,"unreachable"),fn=Js(67108864,"object"),mn=zb([Ut,Vt]),hn=zb([Ut,Vt,nn]),yn=zb([Vt,Wt]),vn=zb([Ut,Vt,Yt,Wt,zt,Lt]),bn=_x(["",""],[Vt]),xn=ak(e=>{return 262144&e.flags?!(t=e).constraint&&!ny(t)||t.constraint===jn?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=qs(t.symbol),t.restrictiveInstantiation.constraint=jn,t.restrictiveInstantiation):e;var t},()=>"(restrictive mapper)"),Sn=ak(e=>262144&e.flags?Dt:e,()=>"(permissive mapper)"),kn=Js(131072,"never",void 0,"unique literal"),Tn=ak(e=>262144&e.flags?kn:e,()=>"(unique literal mapper)"),Cn=ak(e=>(!Qt||e!==Bn&&e!==Jn&&e!==zn||Qt(!0),e),()=>"(unmeasurable reporter)"),wn=ak(e=>(!Qt||e!==Bn&&e!==Jn&&e!==zn||Qt(!1),e),()=>"(unreliable reporter)"),Nn=Ks(void 0,x,p,p,p),Dn=Ks(void 0,x,p,p,p);Dn.objectFlags|=2048;var En=Ks(void 0,x,p,p,p);En.objectFlags|=141440;var Fn=Xo(2048,"__type");Fn.members=nd();var Pn=Ks(Fn,x,p,p,p),An=Ks(void 0,x,p,p,p),In=V?zb([Lt,zt,An]):Ot,On=Ks(void 0,x,p,p,p);On.instantiations=new Map;var Ln=Ks(void 0,x,p,p,p);Ln.objectFlags|=262144;var jn=Ks(void 0,x,p,p,p),Mn=Ks(void 0,x,p,p,p),Rn=Ks(void 0,x,p,p,p),Bn=qs(),Jn=qs();Jn.constraint=Bn;var zn=qs(),qn=qs(),Un=qs();Un.constraint=qn;var Vn,Wn,$n,Kn,Hn,Gn,Xn,Qn,Zn,er,tr,nr,rr,ir,or,cr,lr,_r,ur,dr,pr,fr,mr,gr,hr,yr,vr,br,xr,Sr,kr,Tr,Cr,wr,Nr,Dr,Er,Fr,Pr,Ar,Ir,Or,Lr,jr,Mr,Rr,Br,Jr,zr,qr,Ur,Vr,Wr,$r,Kr,Hr,Gr,Xr,Qr,Yr,Zr,ei,ti,ni,ri,ii,oi,ai=Pg(1,"<>",0,wt),si=Id(void 0,void 0,void 0,p,wt,void 0,0,0),ci=Id(void 0,void 0,void 0,p,Ft,void 0,0,0),li=Id(void 0,void 0,void 0,p,wt,void 0,0,0),_i=Id(void 0,void 0,void 0,p,_n,void 0,0,0),ui=qh(Vt,Ut,!0),di=qh(Ut,wt,!1),pi=new Map,fi={get yieldType(){return gn.fail("Not supported")},get returnType(){return gn.fail("Not supported")},get nextType(){return gn.fail("Not supported")}},mi=EB(wt,wt,wt),gi=EB(_n,_n,_n),hi={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Dr||(Dr=ev("AsyncIterator",3,e))||On},getGlobalIterableType:vv,getGlobalIterableIteratorType:bv,getGlobalIteratorObjectType:function(e){return Ar||(Ar=ev("AsyncIteratorObject",3,e))||On},getGlobalGeneratorType:function(e){return Ir||(Ir=ev("AsyncGenerator",3,e))||On},getGlobalBuiltinIteratorTypes:function(){return Pr??(Pr=tv(["ReadableStreamAsyncIterator"],1))},resolveIterationType:(e,t)=>CR(e,t,ha.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),mustHaveANextMethodDiagnostic:ha.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:ha.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:ha.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},yi={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return xr||(xr=ev("Iterator",3,e))||On},getGlobalIterableType:Sv,getGlobalIterableIteratorType:wv,getGlobalIteratorObjectType:function(e){return kr||(kr=ev("IteratorObject",3,e))||On},getGlobalGeneratorType:function(e){return Tr||(Tr=ev("Generator",3,e))||On},getGlobalBuiltinIteratorTypes:function(){return Fr??(Fr=tv(["ArrayIterator","MapIterator","SetIterator","StringIterator"],1))},resolveIterationType:(e,t)=>e,mustHaveANextMethodDiagnostic:ha.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:ha.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:ha.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},bi=new Map,xi=new Map,Si=new Map,ki=0,Ti=0,Ci=0,wi=!1,Ni=0,Di=[],Ei=[],Fi=[],Pi=0,Ai=[],Oi=[],Li=[],ji=0,Mi=[],Ri=[],Bi=0,Ji=TS(""),zi=CS(0),qi=ES({negative:!1,base10Value:"0"}),Ui=[],Vi=[],Wi=[],$i=0,Ki=!1,Hi=0,Gi=10,Xi=[],Qi=[],Yi=[],Zi=[],eo=[],to=[],no=[],ro=[],io=[],oo=[],ao=[],so=[],co=[],lo=[],_o=[],uo=[],po=[],fo=[],mo=[],go=0,ho=hy(),yo=hy(),vo=zb(Be(aJ.keys(),TS)),bo=new Map,xo=new Map,So=new Map,ko=new Map,To=new Map,Co=new Map,No=[[".mts",".mjs"],[".ts",".js"],[".cts",".cjs"],[".mjs",".mjs"],[".js",".js"],[".cjs",".cjs"],[".tsx",1===E.jsx?".jsx":".js"],[".jsx",".jsx"],[".json",".json"]];return function(){for(const t of e.getSourceFiles())lB(t,E);let t;Vn=new Map;for(const n of e.getSourceFiles())if(!n.redirectInfo){if(!sf(n)){const e=n.locals.get("globalThis");if(null==e?void 0:e.declarations)for(const t of e.declarations)ho.add(Wp(t,ha.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"));oa(ye,n.locals)}if(n.jsGlobalAugmentations&&oa(ye,n.jsGlobalAugmentations),n.patternAmbientModules&&n.patternAmbientModules.length&&($n=Y($n,n.patternAmbientModules)),n.moduleAugmentations.length&&(t||(t=[])).push(n.moduleAugmentations),n.symbol&&n.symbol.globalExports){n.symbol.globalExports.forEach((e,t)=>{ye.has(t)||ye.set(t,e)})}}if(t)for(const e of t)for(const t of e)bp(t.parent)&&sa(t);(function(){const e=Ce.escapedName,t=ye.get(e);t?g(t.declarations,t=>{YT(t)||ho.add(Wp(t,ha.Declaration_name_conflicts_with_built_in_global_identifier_0,Sc(e)))}):ye.set(e,Ce)})(),ca(Ce).type=jt,ca(Ie).type=ev("IArguments",0,!0),ca(vt).type=Ft,ca(we).type=zs(16,we),Zn=ev("Array",1,!0),Hn=ev("Object",0,!0),Gn=ev("Function",0,!0),Xn=H&&ev("CallableFunction",0,!0)||Gn,Qn=H&&ev("NewableFunction",0,!0)||Gn,tr=ev("String",0,!0),nr=ev("Number",0,!0),rr=ev("Boolean",0,!0),ir=ev("RegExp",0,!0),cr=Hv(wt),(lr=Hv(Nt))===Nn&&(lr=Ks(void 0,x,p,p,p));if(er=Ev("ReadonlyArray",1)||Zn,_r=er?Pv(er,[wt]):cr,or=Ev("ThisType",1),t)for(const e of t)for(const t of e)bp(t.parent)||sa(t);Vn.forEach(({firstFile:e,secondFile:t,conflictingSymbols:n})=>{if(n.size<8)n.forEach(({isBlockScoped:e,firstFileLocations:t,secondFileLocations:n},r)=>{const i=e?ha.Cannot_redeclare_block_scoped_variable_0:ha.Duplicate_identifier_0;for(const e of t)ia(e,i,r,n);for(const e of n)ia(e,i,r,t)});else{const r=Be(n.keys()).join(", ");ho.add(fT(Wp(e,ha.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Wp(t,ha.Conflicts_are_in_this_file))),ho.add(fT(Wp(t,ha.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Wp(e,ha.Conflicts_are_in_this_file)))}}),Vn=void 0}(),Ue;function Po(e){return!!bE(e)&&(!!fD(e.name)&&(!(!bE(e.expression)&&!fD(e.expression))&&(fD(e.expression)?"Symbol"===kc(e.expression)&&zN(e.expression)===(Zy("Symbol",1160127,void 0)||vt):!!fD(e.expression.expression)&&("Symbol"===kc(e.expression.name)&&"globalThis"===kc(e.expression.expression)&&zN(e.expression.expression)===we))))}function Ao(e){return e?mt.get(e):void 0}function Io(e,t){return e&&mt.set(e,t),t}function Oo(e){if(e){const t=wd(e);if(t)if(eP(e)){if(t.localJsxFragmentNamespace)return t.localJsxFragmentNamespace;const n=t.pragmas.get("jsxfrag");if(n){const e=nt(n)?n[0]:n;if(t.localJsxFragmentFactory=dO(e.arguments.factory,A),kJ(t.localJsxFragmentFactory,jo,s_),t.localJsxFragmentFactory)return t.localJsxFragmentNamespace=mb(t.localJsxFragmentFactory).escapedText}const r=fq(e);if(r)return t.localJsxFragmentFactory=r,t.localJsxFragmentNamespace=mb(r).escapedText}else{const e=function(e){if(e.localJsxNamespace)return e.localJsxNamespace;const t=e.pragmas.get("jsx");if(t){const n=nt(t)?t[0]:t;if(e.localJsxFactory=dO(n.arguments.factory,A),kJ(e.localJsxFactory,jo,s_),e.localJsxFactory)return e.localJsxNamespace=mb(e.localJsxFactory).escapedText}}(t);if(e)return t.localJsxNamespace=e}}return ii||(ii="React",E.jsxFactory?(kJ(oi=dO(E.jsxFactory,A),jo),oi&&(ii=mb(oi).escapedText)):E.reactNamespace&&(ii=xc(E.reactNamespace))),oi||(oi=kw.createQualifiedName(kw.createIdentifier(Sc(ii)),"createElement")),ii}function jo(e){return IT(e,-1,-1),IJ(e,jo,void 0)}function Mo(e,t,n,...r){const i=Jo(t,n,...r);return i.skippedOn=e,i}function Bo(e,t,...n){return e?Wp(e,t,...n):oS(t,...n)}function Jo(e,t,...n){const r=Bo(e,t,...n);return ho.add(r),r}function zo(e){return Fo(wd(e).fileName,[".cts",".cjs"])?ha.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax:ha.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript}function qo(e,t){e?ho.add(t):yo.add({...t,category:2})}function Uo(e,t,n,...r){if(t.pos<0||t.end<0){if(!e)return;const i=wd(t);return void qo(e,"message"in n?rS(i,0,0,n,...r):Yp(i,n))}qo(e,"message"in n?Wp(t,n,...r):Hp(wd(t),t,n))}function Vo(e,t,n,...r){const i=Jo(e,n,...r);if(t){fT(i,Wp(e,ha.Did_you_forget_to_use_await))}return i}function Wo(e,t){const n=Array.isArray(e)?g(e,tl):tl(e);return n&&fT(t,Wp(n,ha.The_declaration_was_marked_as_deprecated_here)),yo.add(t),t}function Ko(e){const t=Cs(e);return t&&m(e.declarations)>1?64&t.flags?X(e.declarations,Ho):k(e.declarations,Ho):!!e.valueDeclaration&&Ho(e.valueDeclaration)||m(e.declarations)&&k(e.declarations,Ho)}function Ho(e){return!!(536870912&eU(e))}function Go(e,t,n){return Wo(t,Wp(e,ha._0_is_deprecated,n))}function Xo(e,t,n){u++;const r=new s(33554432|e,t);return r.links=new uJ,r.links.checkFlags=n||0,r}function Qo(e,t){const n=Xo(1,e);return n.links.type=t,n}function Yo(e,t){const n=Xo(4,e);return n.links.type=t,n}function Zo(e){let t=0;return 2&e&&(t|=111551),1&e&&(t|=111550),4&e&&(t|=0),8&e&&(t|=900095),16&e&&(t|=110991),32&e&&(t|=899503),64&e&&(t|=788872),256&e&&(t|=899327),128&e&&(t|=899967),512&e&&(t|=110735),8192&e&&(t|=103359),32768&e&&(t|=46015),65536&e&&(t|=78783),262144&e&&(t|=526824),524288&e&&(t|=788968),2097152&e&&(t|=2097152),t}function ea(e,t){t.mergeId||(t.mergeId=rJ,rJ++),Xi[t.mergeId]=e}function ta(e){const t=Xo(e.flags,e.escapedName);return t.declarations=e.declarations?e.declarations.slice():[],t.parent=e.parent,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(t.constEnumOnlyModule=!0),e.members&&(t.members=new Map(e.members)),e.exports&&(t.exports=new Map(e.exports)),ea(t,e),t}function na(e,t,n=!1){if(!(e.flags&Zo(t.flags))||67108864&(t.flags|e.flags)){if(t===e)return e;if(!(33554432&e.flags)){const n=Wa(e);if(n===vt)return t;if(n.flags&Zo(t.flags)&&!(67108864&(t.flags|n.flags)))return r(e,t),t;e=ta(n)}512&t.flags&&512&e.flags&&e.constEnumOnlyModule&&!t.constEnumOnlyModule&&(e.constEnumOnlyModule=!1),e.flags|=t.flags,t.valueDeclaration&&Sg(e,t.valueDeclaration),de(e.declarations,t.declarations),t.members&&(e.members||(e.members=nd()),oa(e.members,t.members,n)),t.exports&&(e.exports||(e.exports=nd()),oa(e.exports,t.exports,n,e)),n||ea(e,t)}else 1024&e.flags?e!==we&&Jo(t.declarations&&Ac(t.declarations[0]),ha.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,dc(e)):r(e,t);return e;function r(e,t){const n=!!(384&e.flags||384&t.flags),r=!!(2&e.flags||2&t.flags),o=n?ha.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:r?ha.Cannot_redeclare_block_scoped_variable_0:ha.Duplicate_identifier_0,a=t.declarations&&wd(t.declarations[0]),s=e.declarations&&wd(e.declarations[0]),c=Dd(a,E.checkJs),l=Dd(s,E.checkJs),_=dc(t);if(a&&s&&Vn&&!n&&a!==s){const n=-1===aa(a.path,s.path)?a:s,o=n===a?s:a,u=W(Vn,`${n.path}|${o.path}`,()=>({firstFile:n,secondFile:o,conflictingSymbols:new Map})),d=W(u.conflictingSymbols,_,()=>({isBlockScoped:r,firstFileLocations:[],secondFileLocations:[]}));c||i(d.firstFileLocations,t),l||i(d.secondFileLocations,e)}else c||ra(t,o,_,e),l||ra(e,o,_,t)}function i(e,t){if(t.declarations)for(const n of t.declarations)pe(e,n)}}function ra(e,t,n,r){g(e.declarations,e=>{ia(e,t,n,r.declarations)})}function ia(e,t,n,r){const i=(eg(e,!1)?ng(e):Ac(e))||e,o=function(e,t,...n){const r=e?Wp(e,t,...n):oS(t,...n);return ho.lookup(r)||(ho.add(r),r)}(i,t,n);for(const e of r||p){const t=(eg(e,!1)?ng(e):Ac(e))||e;if(t===i)continue;o.relatedInformation=o.relatedInformation||[];const r=Wp(t,ha._0_was_also_declared_here,n),a=Wp(t,ha.and_here);m(o.relatedInformation)>=5||X(o.relatedInformation,e=>0===_S(e,a)||0===_S(e,r))||fT(o,m(o.relatedInformation)?a:r)}}function oa(e,t,n=!1,r){t.forEach((t,i)=>{const o=e.get(i),a=o?na(o,t,n):bs(t);r&&o&&(a.parent=r),e.set(i,a)})}function sa(e){var t,n,r;const i=e.parent;if((null==(t=i.symbol.declarations)?void 0:t[0])===i)if(bp(i))oa(ye,i.symbol.exports);else{let t=os(e,e,33554432&e.parent.parent.flags?void 0:ha.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!1,!0);if(!t)return;if(t=cs(t),1920&t.flags)if(X($n,e=>t===e.symbol)){const n=na(i.symbol,t,!0);Kn||(Kn=new Map),Kn.set(e.text,n)}else{if((null==(n=t.exports)?void 0:n.get("__export"))&&(null==(r=i.symbol.exports)?void 0:r.size)){const e=kd(t,"resolvedExports");for(const[n,r]of Be(i.symbol.exports.entries()))e.has(n)&&!t.exports.has(n)&&na(e.get(n),r)}na(t,i.symbol)}else Jo(e,ha.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,e.text)}else gn.assert(i.symbol.declarations.length>1)}function ca(e){if(33554432&e.flags)return e.links;const t=fJ(e);return Qi[t]??(Qi[t]=new uJ)}function la(e){const t=pJ(e);return Yi[t]||(Yi[t]=new dJ)}function ua(e,t,n){if(n){const r=bs(e.get(t));if(r){if(r.flags&n)return r;if(2097152&r.flags){if(Ka(r)&n)return r}}}}function pa(t,n){const r=wd(t),i=wd(n),o=Mp(t);if(r!==i){if(L&&(r.externalModuleIndicator||i.externalModuleIndicator)||!E.outFile||hv(n)||33554432&t.flags)return!0;if(a(n,t))return!0;const o=e.getSourceFiles();return o.indexOf(r)<=o.indexOf(i)}if(16777216&n.flags||hv(n)||qN(n))return!0;if(t.pos<=n.pos&&(!LD(t)||!fm(n.parent)||t.initializer||t.exclamationToken)){if(209===t.kind){const e=Ph(n,209);return e?yc(e,hE)!==yc(t,hE)||t.pose===t?"quit":FD(e)?e.parent.parent===t:!B&&ID(e)&&(e.parent===t||MD(e.parent)&&e.parent.parent===t||bl(e.parent)&&e.parent.parent===t||LD(e.parent)&&e.parent.parent===t||AD(e.parent)&&e.parent.parent.parent===t));return!e||!(B||!ID(e))&&!!yc(n,t=>t===e?"quit":__(t)&&!dm(t))}return LD(t)?!c(t,n,!1):!ac(t,t.parent)||!(z&&rm(t)===rm(n)&&a(n,t))}return!!(282===n.parent.kind||278===n.parent.kind&&n.parent.isExportEquals)||(!(278!==n.kind||!n.isExportEquals)||!!a(n,t)&&(!z||!rm(t)||!LD(t)&&!ac(t,t.parent)||!c(t,n,!0)));function a(e,t){return s(e,t)}function s(e,t){return!!yc(e,n=>{if(n===o)return"quit";if(__(n))return!dm(n);if(RD(n))return t.pos=r&&o.pos<=i){const n=kw.createPropertyAccessExpression(kw.createThis(),e);jT(n.expression,n),jT(n,o),n.flowNode=o.returnFlowNode;if(!uT(AF(n,t,ww(t))))return!0}return!1}(e,j_(xs(t)),P(t.parent.members,RD),t.parent.pos,n.pos))return!0}}}else{if(!(173===t.kind&&!jv(t))||rm(e)!==rm(t))return!0}}const i=at(n.parent,ID);if(i&&i.expression===n){if(AD(i.parent))return!!s(i.parent.parent.parent,t)||"quit";if(MD(i.parent))return!!s(i.parent.parent,t)||"quit"}return!1})}function c(e,t,n){if(t.end>e.end)return!1;return void 0===yc(t,t=>{if(t===e)return"quit";switch(t.kind){case 220:return!0;case 173:return!n||!(LD(e)&&t.parent===e.parent||ac(e,e.parent)&&t.parent===e.parent.parent)||"quit";case 242:switch(t.parent.kind){case 178:case 175:case 179:return!0;default:return!1}default:return!1}})}}function fa(e){return la(e).declarationRequiresScopeChange}function ma(e,t){la(e).declarationRequiresScopeChange=t}function ga(e,t,n){return t?fT(e,Wp(t,282===t.kind||279===t.kind||281===t.kind?ha._0_was_exported_here:ha._0_was_imported_here,n)):e}function ya(e){return it(e)?Sc(e):Bp(e)}function va(e,t,n){if(!fD(e)||e.escapedText!==t||vz(e)||hv(e))return!1;const r=sm(e,!1,!1);let i=r;for(;i;){if(y_(i.parent)){const o=xs(i.parent);if(!o)break;if(xm(j_(o),t))return Jo(e,ha.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,ya(n),dc(o)),!0;if(i===r&&!jv(i)){if(xm(Pu(o).thisType,t))return Jo(e,ha.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,ya(n)),!0}}i=i.parent}return!1}function ba(e){const t=xa(e);return!(!t||!ts(t,64,!0))&&(Jo(e,ha.Cannot_extend_an_interface_0_Did_you_mean_implements,rp(t)),!0)}function xa(e){switch(e.kind){case 80:case 212:return e.parent?xa(e.parent):void 0;case 234:if(fb(e.expression))return e.expression;default:return}}function Sa(e){return"any"===e||"string"===e||"number"===e||"boolean"===e||"never"===e||"unknown"===e}function ka(e,t,n){return!!t&&!!yc(e,e=>e===t||!!(e===n||__(e)&&(!dm(e)||3&zh(e)))&&"quit")}function Ta(e){switch(e.kind){case 272:return e;case 274:return e.parent;case 275:return e.parent.parent;case 277:return e.parent.parent.parent;default:return}}function Ca(e){return e.declarations&&C(e.declarations,wa)}function wa(e){return 272===e.kind||271===e.kind||274===e.kind&&!!e.name||275===e.kind||281===e.kind||277===e.kind||282===e.kind||278===e.kind&&Sh(e)||LE(e)&&2===cg(e)&&Sh(e)||Px(e)&&LE(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind&&Na(e.parent.right)||305===e.kind||304===e.kind&&Na(e.initializer)||261===e.kind&&Vm(e)||209===e.kind&&Vm(e.parent.parent)}function Na(e){return xh(e)||NE(e)&&ML(e)}function Da(e,t){const n=Ja(e);if(n){const e=Ox(n.expression).arguments[0];return fD(n.name)?Wa(xm(Wg(e),n.name.escapedText)):void 0}if(hF(e)||284===e.moduleReference.kind){const n=rs(e,Im(e)||Am(e)),r=cs(n);if(r&&102<=L&&L<=199){const n=Ma(r,"module.exports",e,t);if(n)return n}return Ga(e,n,r,!1),r}const r=Za(e.moduleReference,t);return function(e,t){if(Ga(e,void 0,t,!1)&&!e.isTypeOnly){const t=Ya(xs(e)),n=282===t.kind||279===t.kind,r=n?ha.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:ha.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type,i=n?ha._0_was_exported_here:ha._0_was_imported_here,o=279===t.kind?"*":Zd(t.name);fT(Jo(e.moduleReference,r),Wp(t,i,o))}}(e,r),r}function Ea(e,t,n,r){const i=e.exports.get("export="),o=i?xm(j_(i),t,!0):e.exports.get(t),a=Wa(o,r);return Ga(n,o,a,!1),a}function Fa(e){return JF(e)&&!e.isExportEquals||Lv(e,2048)||UF(e)||MF(e)}function Pa(t){return Uu(t)?e.getEmitSyntaxForUsageLocation(wd(t),t):void 0}function Aa(e,t){if(100<=L&&L<=199){if(99===Pa(e)){t??(t=rs(e,e,!0));const n=t&&Nd(t);return n&&(cf(n)||".d.json.ts"===kO(n.fileName))}}return!1}function Ia(t,n,r,i){const o=t&&Pa(i);if(t&&void 0!==o){const n=e.getImpliedNodeFormatForEmit(t);if(99===o&&1===n&&100<=L&&L<=199)return!0;if(99===o&&99===n)return!1}if(!q)return!1;if(!t||t.isDeclarationFile){const e=Ea(n,"default",void 0,!0);return(!e||!X(e.declarations,Fa))&&!Ea(n,xc("__esModule"),void 0,r)}return jm(t)?"object"!=typeof t.externalModuleIndicator&&!Ea(n,xc("__esModule"),void 0,r):ds(n)}function Oa(t,n,r){var i;const o=null==(i=t.declarations)?void 0:i.find(mP),a=La(n);let s,c;if(yp(t))s=t;else{if(o&&a&&102<=L&&L<=199&&1===Pa(a)&&99===e.getImpliedNodeFormatForEmit(o)&&(c=Ea(t,"module.exports",n,r)))return PS(E)?(Ga(n,c,void 0,!1),c):void Jo(n.name,ha.Module_0_can_only_be_default_imported_using_the_1_flag,dc(t),"esModuleInterop");s=Ea(t,"default",n,r)}if(!a)return s;const l=Aa(a,t),_=Ia(o,t,r,a);if(s||_||l){if(_||l){const e=cs(t,r)||Wa(t,r);return Ga(n,t,e,!1),e}}else if(ds(t)&&!q){const e=L>=5?"allowSyntheticDefaultImports":"esModuleInterop",r=t.exports.get("export=").valueDeclaration,i=Jo(n.name,ha.Module_0_can_only_be_default_imported_using_the_1_flag,dc(t),e);r&&fT(i,Wp(r,ha.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,e))}else FF(n)?function(e,t){var n,r,i;if(null==(n=e.exports)?void 0:n.has(t.symbol.escapedName))Jo(t.name,ha.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,dc(e),dc(t.symbol));else{const n=Jo(t.name,ha.Module_0_has_no_default_export,dc(e)),o=null==(r=e.exports)?void 0:r.get("__export");if(o){const e=null==(i=o.declarations)?void 0:i.find(e=>{var t,n;return!!(zF(e)&&e.moduleSpecifier&&(null==(n=null==(t=rs(e,e.moduleSpecifier))?void 0:t.exports)?void 0:n.has("default")))});e&&fT(n,Wp(e,ha.export_Asterisk_does_not_re_export_a_default))}}}(t,n):Ba(t,t,n,Wl(n)&&n.propertyName||n.name);return Ga(n,s,void 0,!1),s}function La(e){switch(e.kind){case 274:return e.parent.moduleSpecifier;case 272:return HF(e.moduleReference)?e.moduleReference.expression:void 0;case 275:case 282:return e.parent.parent.moduleSpecifier;case 277:return e.parent.parent.parent.moduleSpecifier;default:return gn.assertNever(e)}}function Ma(e,t,n,r){var i;if(1536&e.flags){const o=gs(e).get(t),a=Wa(o,r);return Ga(n,o,a,!1,null==(i=ca(e).typeOnlyExportStarMap)?void 0:i.get(t),t),a}}function Ra(e,t,n=!1){var r;const i=Im(e)||e.moduleSpecifier,o=rs(e,i),a=!bE(t)&&t.propertyName||t.name;if(!fD(a)&&11!==a.kind)return;const s=ep(a),c=ls(o,i,!1,"default"===s&&q);if(c&&(s||11===a.kind)){if(yp(o))return o;let l;l=o&&o.exports&&o.exports.get("export=")?xm(j_(c),s,!0):function(e,t){if(3&e.flags){const n=e.valueDeclaration.type;if(n)return Wa(xm(VS(n),t))}}(c,s),l=Wa(l,n);let _=Ma(c,s,t,n);if(void 0===_&&"default"===s){const e=null==(r=o.declarations)?void 0:r.find(mP);(Aa(i,o)||Ia(e,o,n,i))&&(_=cs(o,n)||Wa(o,n))}const u=_&&l&&_!==l?function(e,t){if(e===vt&&t===vt)return vt;if(790504&e.flags)return e;const n=Xo(e.flags|t.flags,e.escapedName);return gn.assert(e.declarations||t.declarations),n.declarations=ne(Y(e.declarations,t.declarations),bt),n.parent=e.parent||t.parent,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration),t.members&&(n.members=new Map(t.members)),e.exports&&(n.exports=new Map(e.exports)),n}(l,_):_||l;return Wl(t)&&Aa(i,o)&&"default"!==s?Jo(a,ha.Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0,vi[L]):u||Ba(o,c,e,a),u}}function Ba(e,t,n,r){var i;const o=es(e,n),a=Bp(r),s=fD(r)?IO(r,t):void 0;if(void 0!==s){const e=dc(s),t=Jo(r,ha._0_has_no_exported_member_named_1_Did_you_mean_2,o,a,e);s.valueDeclaration&&fT(t,Wp(s.valueDeclaration,ha._0_is_declared_here,e))}else(null==(i=e.exports)?void 0:i.has("default"))?Jo(r,ha.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,o,a):function(e,t,n,r,i){var o,a;const s=null==(a=null==(o=at(r.valueDeclaration,fu))?void 0:o.locals)?void 0:a.get(ep(t)),c=r.exports;if(s){const r=null==c?void 0:c.get("export=");if(r)Fs(r,s)?function(e,t,n,r){if(L>=5){Jo(t,PS(E)?ha._0_can_only_be_imported_by_using_a_default_import:ha._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n)}else if(Mm(e)){Jo(t,PS(E)?ha._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:ha._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n)}else{Jo(t,PS(E)?ha._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:ha._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n,n,r)}}(e,t,n,i):Jo(t,ha.Module_0_has_no_exported_member_1,i,n);else{const e=c?T(xg(c),e=>!!Fs(e,s)):void 0,r=e?Jo(t,ha.Module_0_declares_1_locally_but_it_is_exported_as_2,i,n,dc(e)):Jo(t,ha.Module_0_declares_1_locally_but_it_is_not_exported,i,n);s.declarations&&fT(r,...O(s.declarations,(e,t)=>Wp(e,0===t?ha._0_is_declared_here:ha.and_here,n)))}}else Jo(t,ha.Module_0_has_no_exported_member_1,i,n)}(n,r,a,e,o)}function Ja(e){if(hF(e)&&e.initializer&&bE(e.initializer))return e.initializer}function za(e,t,n){const r=e.propertyName||e.name;if(tp(r)){const t=La(e),r=t&&rs(e,t);if(r)return Oa(r,e,!!n)}const i=e.parent.parent.moduleSpecifier?Ra(e.parent.parent,e,n):11===r.kind?void 0:ts(r,t,!1,n);return Ga(e,void 0,i,!1),i}function qa(e,t){if(JE(e))return kM(e).symbol;if(!s_(e)&&!fb(e))return;const n=ts(e,901119,!0,t);return n||(kM(e),la(e).resolvedSymbol)}function Ua(e,t=!1){switch(e.kind){case 272:case 261:return Da(e,t);case 274:return function(e,t){const n=rs(e,e.parent.moduleSpecifier);if(n)return Oa(n,e,t)}(e,t);case 275:return function(e,t){const n=e.parent.parent.moduleSpecifier,r=rs(e,n),i=ls(r,n,t,!1);return Ga(e,r,i,!1),i}(e,t);case 281:return function(e,t){const n=e.parent.moduleSpecifier,r=n&&rs(e,n),i=n&&ls(r,n,t,!1);return Ga(e,r,i,!1),i}(e,t);case 277:case 209:return function(e,t){if(BF(e)&&tp(e.propertyName||e.name)){const n=La(e),r=n&&rs(e,n);if(r)return Oa(r,e,t)}const n=hE(e)?oy(e):e.parent.parent.parent,r=Ja(n),i=Ra(n,r||e,t),o=e.propertyName||e.name;return r&&i&&fD(o)?Wa(xm(j_(i),o.escapedText),t):(Ga(e,void 0,i,!1),i)}(e,t);case 282:return za(e,901119,t);case 278:case 227:return function(e,t){const n=qa(JF(e)?e.expression:e.right,t);return Ga(e,void 0,n,!1),n}(e,t);case 271:return function(e,t){if(pu(e.parent)){const n=cs(e.parent.symbol,t);return Ga(e,void 0,n,!1),n}}(e,t);case 305:return ts(e.name,901119,!0,t);case 304:return qa(e.initializer,t);case 213:case 212:return function(e,t){if(LE(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind)return qa(e.parent.right,t)}(e,t);default:return gn.fail()}}function Va(e,t=901119){return!!e&&(2097152==(e.flags&(2097152|t))||!!(2097152&e.flags&&67108864&e.flags))}function Wa(e,t){return!t&&Va(e)?$a(e):e}function $a(e){gn.assert(!!(2097152&e.flags),"Should only get Alias here.");const t=ca(e);if(t.aliasTarget)t.aliasTarget===xt&&(t.aliasTarget=vt);else{t.aliasTarget=xt;const n=Ca(e);if(!n)return gn.fail();const r=Ua(n);t.aliasTarget===xt?t.aliasTarget=r||vt:Jo(n,ha.Circular_definition_of_import_alias_0,dc(e))}return t.aliasTarget}function Ka(e,t,n){const r=t&&Ya(e),i=r&&zF(r),o=r&&(i?rs(r.moduleSpecifier,r.moduleSpecifier,!0):$a(r.symbol)),a=i&&o?hs(o):void 0;let s,c=n?0:e.flags;for(;2097152&e.flags;){const t=Ps($a(e));if(!i&&t===o||(null==a?void 0:a.get(t.escapedName))===t)break;if(t===vt)return-1;if(t===e||(null==s?void 0:s.has(t)))break;2097152&t.flags&&(s?s.add(t):s=new Set([e,t])),c|=t.flags,e=t}return c}function Ga(e,t,n,r,i,o){if(!e||bE(e))return!1;const a=xs(e);if(Hl(e)){return ca(a).typeOnlyDeclaration=e,!0}if(i){const e=ca(a);return e.typeOnlyDeclaration=i,a.escapedName!==o&&(e.typeOnlyExportStarName=o),!0}const s=ca(a);return Xa(s,t,r)||Xa(s,n,r)}function Xa(e,t,n){var r;if(t&&(void 0===e.typeOnlyDeclaration||n&&!1===e.typeOnlyDeclaration)){const n=(null==(r=t.exports)?void 0:r.get("export="))??t,i=n.declarations&&T(n.declarations,Hl);e.typeOnlyDeclaration=i??ca(n).typeOnlyDeclaration??!1}return!!e.typeOnlyDeclaration}function Ya(e,t){var n;if(!(2097152&e.flags))return;const r=ca(e);if(void 0===r.typeOnlyDeclaration){r.typeOnlyDeclaration=!1;const t=Wa(e);Ga(null==(n=e.declarations)?void 0:n[0],Ca(e)&&gI(e),t,!0)}if(void 0===t)return r.typeOnlyDeclaration||void 0;if(r.typeOnlyDeclaration){return Ka(279===r.typeOnlyDeclaration.kind?Wa(hs(r.typeOnlyDeclaration.symbol.parent).get(r.typeOnlyExportStarName||e.escapedName)):$a(r.typeOnlyDeclaration.symbol))&t?r.typeOnlyDeclaration:void 0}}function Za(e,t){return 80===e.kind&&bb(e)&&(e=e.parent),80===e.kind||167===e.parent.kind?ts(e,1920,!1,t):(gn.assert(272===e.parent.kind),ts(e,901119,!1,t))}function es(e,t){return e.parent?es(e.parent,t)+"."+dc(e):dc(e,t,void 0,36)}function ts(e,t,n,r,i){if(Od(e))return;const o=1920|(Mm(e)?111551&t:0);let a;if(80===e.kind){const r=t===o||sy(e)?ha.Cannot_find_namespace_0:JN(mb(e)),s=Mm(e)&&!sy(e)?function(e,t){if(Jy(e.parent)){const n=function(e){if(yc(e,e=>Fu(e)||16777216&e.flags?Lg(e):"quit"))return;const t=Qg(e);if(t&&tF(t)&&bg(t.expression)){const e=xs(t.expression.left);if(e)return ns(e)}if(t&&NE(t)&&bg(t.parent)&&tF(t.parent.parent)){const e=xs(t.parent.left);if(e)return ns(e)}if(t&&(Kf(t)||uP(t))&&LE(t.parent.parent)&&6===cg(t.parent.parent)){const e=xs(t.parent.parent.left);if(e)return ns(e)}const n=Xg(e);if(n&&__(n)){const e=xs(n);return e&&e.valueDeclaration}}(e.parent);if(n)return ze(n,e,t,void 0,!0)}}(e,t):void 0;if(a=bs(ze(i||e,e,t,n||s?void 0:r,!0,!1)),!a)return bs(s)}else if(167===e.kind||212===e.kind){const r=167===e.kind?e.left:e.expression,s=167===e.kind?e.right:e.name;let c=ts(r,o,n,!1,i);if(!c||Od(s))return;if(c===vt)return c;if(c.valueDeclaration&&Mm(c.valueDeclaration)&&100!==DS(E)&&hF(c.valueDeclaration)&&c.valueDeclaration.initializer&&KL(c.valueDeclaration.initializer)){const e=c.valueDeclaration.initializer.arguments[0],t=rs(e,e);if(t){const e=cs(t);e&&(c=e)}}if(a=bs(ua(gs(c),s.escapedText,t)),!a&&2097152&c.flags&&(a=bs(ua(gs($a(c)),s.escapedText,t))),!a){if(!n){const n=es(c),r=Bp(s),i=IO(s,c);if(i)return void Jo(s,ha._0_has_no_exported_member_named_1_Did_you_mean_2,n,r,dc(i));const o=ED(e)&&function(e){for(;ED(e.parent);)e=e.parent;return e}(e),a=Hn&&788968&t&&o&&!FE(o.parent)&&function(e){let t=mb(e),n=ze(t,t,111551,void 0,!0);if(n){for(;ED(t.parent);){if(n=xm(j_(n),t.parent.right.escapedText),!n)return;t=t.parent}return n}}(o);if(a)return void Jo(o,ha._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Vp(o));if(1920&t&&ED(e.parent)){const t=bs(ua(gs(c),s.escapedText,788968));if(t)return void Jo(e.parent.right,ha.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,dc(t),Sc(e.parent.right.escapedText))}Jo(s,ha.Namespace_0_has_no_exported_member_1,n,r)}return}}else gn.assertNever(e,"Unknown entity name kind.");return!sy(e)&&s_(e)&&(2097152&a.flags||278===e.parent.kind)&&Ga(bh(e),a,void 0,!0),a.flags&t||r?a:$a(a)}function ns(e){const t=e.parent.valueDeclaration;if(!t)return;return(Xm(t)?Zm(t):Ru(t)?Ym(t):void 0)||t}function rs(e,t,n){const r=1===DS(E)?ha.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:ha.Cannot_find_module_0_or_its_corresponding_type_declarations;return os(e,t,n?void 0:r,n)}function os(e,t,n,r=!1,i=!1){return Uu(t)?as(e,t.text,n,r?void 0:t,i):void 0}function as(t,n,r,i,o=!1){var a,s,c,l,_,u,d,p,f,m,g,h;if(i&&en(n,"@types/")){Jo(i,ha.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,tn(n,"@types/"),n)}const y=kg(n,!0);if(y)return y;const v=wd(t),b=Uu(t)?t:(null==(a=TF(t)?t:t.parent&&TF(t.parent)&&t.parent.name===t?t.parent:void 0)?void 0:a.name)||(null==(s=vf(t)?t:void 0)?void 0:s.argument.literal)||(hF(t)&&t.initializer&&qm(t.initializer,!0)?t.initializer.arguments[0]:void 0)||(null==(c=yc(t,hf))?void 0:c.arguments[0])||(null==(l=yc(t,an(EF,iA,zF)))?void 0:l.moduleSpecifier)||(null==(_=yc(t,Pm))?void 0:_.moduleReference.expression),x=b&&Uu(b)?e.getModeForUsageLocation(v,b):e.getDefaultResolutionModeForFile(v),S=DS(E),k=null==(u=e.getResolvedModule(v,n,x))?void 0:u.resolvedModule,T=i&&k&&oW(E,k,v),C=k&&(!T||T===ha.Module_0_was_resolved_to_1_but_jsx_is_not_set)&&e.getSourceFile(k.resolvedFileName);if(C){if(T&&Jo(i,T,n,k.resolvedFileName),k.resolvedUsingTsExtension&&SO(n)){const e=(null==(d=yc(t,EF))?void 0:d.importClause)||yc(t,an(DF,zF));(i&&e&&!e.isTypeOnly||yc(t,hf))&&Jo(i,ha.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,function(e){const t=Zk(n,e);if(qS(L)||99===x){const r=SO(n)&&QR(E);return t+(".mts"===e||".d.mts"===e?r?".mts":".mjs":".cts"===e||".d.mts"===e?r?".cts":".cjs":r?".ts":".js")}return t}(gn.checkDefined(Db(n))))}else if(k.resolvedUsingTsExtension&&!QR(E,v.fileName)){const e=(null==(p=yc(t,EF))?void 0:p.importClause)||yc(t,an(DF,zF));if(i&&!(null==e?void 0:e.isTypeOnly)&&!yc(t,dE)){const e=gn.checkDefined(Db(n));Jo(i,ha.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled,e)}}else if(E.rewriteRelativeImportExtensions&&!(33554432&t.flags)&&!SO(n)&&!vf(t)&&!Gl(t)){const t=Dg(n,E);if(!k.resolvedUsingTsExtension&&t)Jo(i,ha.This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0,da($o(v.fileName,e.getCurrentDirectory()),k.resolvedFileName,Vy(e)));else if(k.resolvedUsingTsExtension&&!t&&rv(C,e))Jo(i,ha.This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path,Ro(n));else if(k.resolvedUsingTsExtension&&t){const t=null==(f=e.getRedirectFromSourceFile(C.path))?void 0:f.resolvedRef;if(t){const n=!e.useCaseSensitiveFileNames(),r=e.getCommonSourceDirectory(),o=kU(t.commandLine,n);_a(r,o,n)!==_a(E.outDir||r,t.commandLine.options.outDir||o,n)&&Jo(i,ha.This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files)}}}if(C.symbol){if(i&&k.isExternalLibraryImport&&!aT(k.extension)&&ss(!1,i,v,x,k,n),i&&(100===L||101===L)){const e=1===v.impliedNodeFormat&&!yc(t,hf)||!!yc(t,DF),r=yc(t,e=>dE(e)||zF(e)||EF(e)||iA(e));if(e&&99===C.impliedNodeFormat&&!yC(r))if(yc(t,DF))Jo(i,ha.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead,n);else{let e;const t=lT(v.fileName);".ts"!==t&&".js"!==t&&".tsx"!==t&&".jsx"!==t||(e=bd(v));const o=273===(null==r?void 0:r.kind)&&(null==(m=r.importClause)?void 0:m.isTypeOnly)?ha.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:206===(null==r?void 0:r.kind)?ha.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute:ha.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;ho.add(Hp(wd(i),i,sS(e,o,n)))}}return bs(C.symbol)}i&&r&&!PC(i)&&Jo(i,ha.File_0_is_not_a_module,C.fileName)}else{if($n){const e=Zt($n,e=>e.pattern,n);if(e){const t=Kn&&Kn.get(n);return bs(t?t:e.symbol)}}if(i){if((!k||aT(k.extension)||void 0!==T)&&T!==ha.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type){if(r){if(k){const t=e.getRedirectFromSourceFile(k.resolvedFileName);if(null==t?void 0:t.outputDts)return void Jo(i,ha.Output_file_0_has_not_been_built_from_source_file_1,t.outputDts,k.resolvedFileName)}if(T)Jo(i,T,n,k.resolvedFileName);else{const t=wo(n)&&!Do(n),o=3===S||99===S;if(!LS(E)&&Eo(n,".json")&&1!==S&&US(E))Jo(i,ha.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,n);else if(99===x&&o&&t){const t=$o(n,Lo(v.path)),r=null==(g=No.find(([n,r])=>e.fileExists(t+n)))?void 0:g[1];r?Jo(i,ha.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0,n+r):Jo(i,ha.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path)}else if(null==(h=e.getResolvedModule(v,n,x))?void 0:h.alternateResult){Uo(!0,i,sS(vd(v,e,n,x,n),r,n))}else Jo(i,r,n)}}return}if(o){Jo(i,ha.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,n,k.resolvedFileName)}else ss(Z&&!!r,i,v,x,k,n)}}}function ss(t,n,r,i,{packageId:o,resolvedFileName:a},s){if(PC(n))return;let c;!As(s)&&o&&(c=vd(r,e,s,i,o.name)),Uo(t,n,sS(c,ha.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,s,a))}function cs(e,t){if(null==e?void 0:e.exports){const n=function(e,t){if(!e||e===vt||e===t||1===t.exports.size||2097152&e.flags)return e;const n=ca(e);if(n.cjsExportMerged)return n.cjsExportMerged;const r=33554432&e.flags?e:ta(e);r.flags=512|r.flags,void 0===r.exports&&(r.exports=nd());t.exports.forEach((e,t)=>{"export="!==t&&r.exports.set(t,r.exports.has(t)?na(r.exports.get(t),e):e)}),r===e&&(ca(r).resolvedExports=void 0,ca(r).resolvedMembers=void 0);return ca(r).cjsExportMerged=r,n.cjsExportMerged=r}(bs(Wa(e.exports.get("export="),t)),bs(e));return bs(n)||e}}function ls(t,n,r,i){var o;const a=cs(t,r);if(!r&&a){if(!(i||1539&a.flags||ed(a,308))){const e=L>=5?"allowSyntheticDefaultImports":"esModuleInterop";return Jo(n,ha.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,e),a}const s=n.parent,c=EF(s)&&Fg(s);if(c||hf(s)){const l=hf(s)?s.arguments[0]:s.moduleSpecifier,_=j_(a),u=WL(_,a,t,l);if(u)return us(a,u,s);const d=null==(o=null==t?void 0:t.declarations)?void 0:o.find(mP),p=Pa(l);let f;if(c&&d&&102<=L&&L<=199&&1===p&&99===e.getImpliedNodeFormatForEmit(d)&&(f=Ea(a,"module.exports",c,r)))return i||1539&a.flags||Jo(n,ha.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,"esModuleInterop"),PS(E)&&_s(_)?us(f,_,s):f;const m=d&&function(e,t){return 99===e&&1===t}(p,e.getImpliedNodeFormatForEmit(d));if((PS(E)||m)&&(_s(_)||xm(_,"default",!0)||m)){return us(a,3670016&_.flags?$L(_,a,t,l):VL(a,a.parent),s)}}}return a}function _s(e){return X(Sm(e,0))||X(Sm(e,1))}function us(e,t,n){const r=Xo(e.flags,e.escapedName);r.declarations=e.declarations?e.declarations.slice():[],r.parent=e.parent,r.links.target=e,r.links.originatingImport=n,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(r.constEnumOnlyModule=!0),e.members&&(r.members=new Map(e.members)),e.exports&&(r.exports=new Map(e.exports));const i=Lp(t);return r.links.type=Ks(r,i.members,p,p,i.indexInfos),r}function ds(e){return void 0!==e.exports.get("export=")}function ps(e){return xg(hs(e))}function fs(e,t){const n=hs(t);if(n)return n.get(e)}function ms(e){return!(402784252&e.flags||1&Tx(e)||WC(e)||fw(e))}function gs(e){return 6256&e.flags?kd(e,"resolvedExports"):1536&e.flags?hs(e):e.exports||x}function hs(e){const t=ca(e);if(!t.resolvedExports){const{exports:n,typeOnlyExportStarMap:r}=vs(e);t.resolvedExports=n,t.typeOnlyExportStarMap=r}return t.resolvedExports}function ys(e,t,n,r){t&&t.forEach((t,i)=>{if("default"===i)return;const o=e.get(i);if(o){if(n&&r&&o&&Wa(o)!==Wa(t)){const e=n.get(i);e.exportsWithDuplicate?e.exportsWithDuplicate.push(r):e.exportsWithDuplicate=[r]}}else e.set(i,t),n&&r&&n.set(i,{specifierText:rp(r.moduleSpecifier)})})}function vs(e){const t=[];let n;const r=new Set,i=function e(i,o,a){!a&&(null==i?void 0:i.exports)&&i.exports.forEach((e,t)=>r.add(t));if(!(i&&i.exports&&pe(t,i)))return;const s=new Map(i.exports),c=i.exports.get("__export");if(c){const t=nd(),n=new Map;if(c.declarations)for(const r of c.declarations){const i=rs(r,r.moduleSpecifier);ys(t,e(i,r,a||r.isTypeOnly),n,r)}n.forEach(({exportsWithDuplicate:e},t)=>{if("export="!==t&&e&&e.length&&!s.has(t))for(const r of e)ho.add(Wp(r,ha.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,n.get(t).specifierText,Sc(t)))}),ys(s,t)}(null==o?void 0:o.isTypeOnly)&&(n??(n=new Map),s.forEach((e,t)=>n.set(t,o)));return s}(e=cs(e))||x;return n&&r.forEach(e=>n.delete(e)),{exports:i,typeOnlyExportStarMap:n}}function bs(e){let t;return e&&e.mergeId&&(t=Xi[e.mergeId])?t:e}function xs(e){return bs(e.symbol&&Fd(e.symbol))}function Ts(e){return pu(e)?xs(e):void 0}function Cs(e){return bs(e.parent&&Fd(e.parent))}function ws(e){var t,n;return(220===(null==(t=e.valueDeclaration)?void 0:t.kind)||219===(null==(n=e.valueDeclaration)?void 0:n.kind))&&Ts(e.valueDeclaration.parent)||e}function Ns(t,n,r){const i=Cs(t);if(i&&!(262144&t.flags))return l(i);const o=U(t.declarations,e=>{if(!mp(e)&&e.parent){if(oc(e.parent))return xs(e.parent);if(CF(e.parent)&&e.parent.parent&&cs(xs(e.parent.parent))===t)return xs(e.parent.parent)}if(JE(e)&&LE(e.parent)&&64===e.parent.operatorToken.kind&&Px(e.parent.left)&&fb(e.parent.left.expression))return sg(e.parent.left)||og(e.parent.left.expression)?xs(wd(e)):(kM(e.parent.left.expression),la(e.parent.left.expression).resolvedSymbol)});if(!m(o))return;const a=U(o,e=>Es(e,t)?e:void 0);let s=[],c=[];for(const e of a){const[t,...n]=l(e);s=le(s,t),c=de(c,n)}return Y(s,c);function l(i){const o=U(i.declarations,_),a=n&&function(t,n){const r=wd(n),i=pJ(r),o=ca(t);let a;if(o.extendedContainersByFile&&(a=o.extendedContainersByFile.get(i)))return a;if(r&&r.imports){for(const e of r.imports){if(sy(e))continue;const r=rs(n,e,!0);r&&(Es(r,t)&&(a=le(a,r)))}if(m(a))return(o.extendedContainersByFile||(o.extendedContainersByFile=new Map)).set(i,a),a}if(o.extendedContainers)return o.extendedContainers;const s=e.getSourceFiles();for(const e of s){if(!fO(e))continue;const n=xs(e);Es(n,t)&&(a=le(a,n))}return o.extendedContainers=a||p}(t,n),s=function(e,t){const n=!!m(e.declarations)&&xe(e.declarations);if(111551&t&&n&&n.parent&&hF(n.parent)&&(vE(n)&&n===n.parent.initializer||XD(n)&&n===n.parent.type))return xs(n.parent)}(i,r);if(n&&i.flags&Gs(r)&&Xs(i,n,1920,!1))return le(Y(Y([i],o),a),s);const c=!(i.flags&Gs(r))&&788968&i.flags&&524288&Pu(i).flags&&111551===r?Hs(n,e=>_d(e,e=>{if(e.flags&Gs(r)&&j_(e)===Pu(i))return e})):void 0;let l=c?[c,...o,i]:[...o,i];return l=le(l,s),l=de(l,a),l}function _(e){return i&&Ds(e,i)}}function Ds(e,t){const n=rc(e),r=n&&n.exports&&n.exports.get("export=");return r&&Fs(r,t)?n:void 0}function Es(e,t){if(e===Cs(t))return t;const n=e.exports&&e.exports.get("export=");if(n&&Fs(n,t))return e;const r=gs(e),i=r.get(t.escapedName);return i&&Fs(i,t)?i:_d(r,e=>{if(Fs(e,t))return e})}function Fs(e,t){if(bs(Wa(bs(e)))===bs(Wa(bs(t))))return e}function Ps(e){return bs(e&&!!(1048576&e.flags)&&e.exportSymbol||e)}function Is(e,t){return!!(111551&e.flags||2097152&e.flags&&111551&Ka(e,!t))}function Os(e){var t;const n=new c(Ue,e);return _++,n.id=_,null==(t=Yn)||t.recordType(n),n}function Ls(e,t){const n=Os(e);return n.symbol=t,n}function Ms(e){return new c(Ue,e)}function Js(e,t,n=0,r){!function(e,t){const n=`${e},${t??""}`;Ct.has(n)&&gn.fail(`Duplicate intrinsic type name ${e}${t?` (${t})`:""}; you may need to pass a name to createIntrinsicType.`);Ct.add(n)}(t,r);const i=Os(e);return i.intrinsicName=t,i.debugIntrinsicName=r,i.objectFlags=52953088|n,i}function zs(e,t){const n=Ls(524288,t);return n.objectFlags=e,n.members=void 0,n.properties=void 0,n.callSignatures=void 0,n.constructSignatures=void 0,n.indexInfos=void 0,n}function qs(e){return Ls(262144,e)}function Us(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)&&35!==e.charCodeAt(2)}function Vs(e){let t;return e.forEach((e,n)=>{Ws(e,n)&&(t||(t=[])).push(e)}),t||p}function Ws(e,t){return!Us(t)&&Is(e)}function $s(e,t,n,r,i){const o=e;return o.members=t,o.properties=p,o.callSignatures=n,o.constructSignatures=r,o.indexInfos=i,t!==x&&(o.properties=Vs(t)),o}function Ks(e,t,n,r,i){return $s(zs(16,e),t,n,r,i)}function Hs(e,t){let n;for(let r=e;r;r=r.parent){if(fu(r)&&r.locals&&!af(r)&&(n=t(r.locals,void 0,!0,r)))return n;switch(r.kind){case 308:if(!sf(r))break;case 268:const e=xs(r);if(n=t((null==e?void 0:e.exports)||x,void 0,!0,r))return n;break;case 264:case 232:case 265:let i;if((xs(r).members||x).forEach((e,t)=>{788968&e.flags&&(i||(i=nd())).set(t,e)}),i&&(n=t(i,void 0,!1,r)))return n}}return t(ye,void 0,!0)}function Gs(e){return 111551===e?111551:1920}function Xs(e,t,n,r,i=new Map){if(!e||function(e){if(e.declarations&&e.declarations.length){for(const t of e.declarations)switch(t.kind){case 173:case 175:case 178:case 179:continue;default:return!1}return!0}return!1}(e))return;const o=ca(e),a=o.accessibleChainCache||(o.accessibleChainCache=new Map),s=Hs(t,(e,t,n,r)=>r),c=`${r?0:1}|${s?pJ(s):0}|${n}`;if(a.has(c))return a.get(c);const l=fJ(e);let _=i.get(l);_||i.set(l,_=[]);const u=Hs(t,d);return a.set(c,u),u;function d(n,i,o){if(!pe(_,n))return;const a=function(n,i,o){if(f(n.get(e.escapedName),void 0,i))return[e];const a=_d(n,n=>{if(2097152&n.flags&&"export="!==n.escapedName&&"default"!==n.escapedName&&!(Cx(n)&&t&&fO(wd(t)))&&(!r||X(n.declarations,Pm))&&(!o||!X(n.declarations,Fm))&&(i||!ed(n,282))){const e=m(n,$a(n),i);if(e)return e}if(n.escapedName===e.escapedName&&n.exportSymbol&&f(bs(n.exportSymbol),void 0,i))return[e]});return a||(n===ye?m(we,we,i):void 0)}(n,i,o);return _.pop(),a}function p(e,n){return!Qs(e,t,n)||!!Xs(e.parent,t,Gs(n),r,i)}function f(t,r,i){return(e===(r||t)||bs(e)===bs(r||t))&&!X(t.declarations,oc)&&(i||p(bs(t),n))}function m(e,t,r){if(f(e,t,r))return[e];const i=gs(t),o=i&&d(i,!0);return o&&p(e,Gs(n))?[e].concat(o):void 0}}function Qs(e,t,n){let r=!1;return Hs(t,t=>{let i=bs(t.get(e.escapedName));if(!i)return!1;if(i===e)return!0;const o=2097152&i.flags&&!ed(i,282);i=o?$a(i):i;return!!((o?Ka(i):i.flags)&n)&&(r=!0,!0)}),r}function Ys(e,t){return 0===nc(e,t,111551,!1,!0).accessibility}function Zs(e,t,n){return 0===nc(e,t,n,!1,!1).accessibility}function ec(e,t,n,r,i,o){if(!m(e))return;let a,s=!1;for(const c of e){const e=Xs(c,t,r,!1);if(e){a=c;const t=sc(e[0],i);if(t)return t}if(o&&X(c.declarations,oc)){if(i){s=!0;continue}return{accessibility:0}}const l=ec(Ns(c,t,r),t,n,n===c?Gs(r):r,i,o);if(l)return l}return s?{accessibility:0}:a?{accessibility:1,errorSymbolName:dc(n,t,r),errorModuleName:a!==n?dc(a,t,1920):void 0}:void 0}function tc(e,t,n,r){return nc(e,t,n,r,!0)}function nc(e,t,n,r,i){if(e&&t){const o=ec([e],t,e,n,r,i);if(o)return o;const a=g(e.declarations,rc);if(a){if(a!==rc(t))return{accessibility:2,errorSymbolName:dc(e,t,n),errorModuleName:dc(a),errorNode:Mm(t)?t:void 0}}return{accessibility:1,errorSymbolName:dc(e,t,n)}}return{accessibility:0}}function rc(e){const t=yc(e,ic);return t&&xs(t)}function ic(e){return mp(e)||308===e.kind&&sf(e)}function oc(e){return gp(e)||308===e.kind&&sf(e)}function sc(e,t){let n;if(k(P(e.declarations,e=>80!==e.kind),function(t){var n,i;if(!Vc(t)){const o=Ta(t);if(o&&!Lv(o,32)&&Vc(o.parent))return r(t,o);if(hF(t)&&ZE(t.parent.parent)&&!Lv(t.parent.parent,32)&&Vc(t.parent.parent.parent))return r(t,t.parent.parent);if(Ip(t)&&!Lv(t,32)&&Vc(t.parent))return r(t,t);if(hE(t)){if(2097152&e.flags&&Mm(t)&&(null==(n=t.parent)?void 0:n.parent)&&hF(t.parent.parent)&&(null==(i=t.parent.parent.parent)?void 0:i.parent)&&ZE(t.parent.parent.parent.parent)&&!Lv(t.parent.parent.parent.parent,32)&&t.parent.parent.parent.parent.parent&&Vc(t.parent.parent.parent.parent.parent))return r(t,t.parent.parent.parent.parent);if(2&e.flags){const e=lc(t);if(170===e.kind)return!1;const n=e.parent.parent;return 244===n.kind&&(!!Lv(n,32)||!!Vc(n.parent)&&r(t,n))}}return!1}return!0}))return{accessibility:0,aliasesToMakeVisible:n};function r(e,r){return t&&(la(e).isVisible=!0,n=fe(n,r)),!0}}function cc(e){let t;return t=187===e.parent.kind||234===e.parent.kind&&!If(e.parent)||168===e.parent.kind||183===e.parent.kind&&e.parent.parameterName===e?1160127:167===e.kind||212===e.kind||272===e.parent.kind||167===e.parent.kind&&e.parent.left===e||212===e.parent.kind&&e.parent.expression===e||213===e.parent.kind&&e.parent.expression===e?1920:788968,t}function _c(e,t,n=!0){const r=cc(e),i=mb(e),o=ze(t,i.escapedText,r,void 0,!1);return o&&262144&o.flags&&788968&r||!o&&gv(i)&&0===tc(xs(sm(i,!1,!1)),i,r,!1).accessibility?{accessibility:0}:o?sc(o,n)||{accessibility:1,errorSymbolName:rp(i),errorNode:i}:{accessibility:3,errorSymbolName:rp(i),errorNode:i}}function dc(e,t,n,r=4,i){let o=70221824,a=0;2&r&&(o|=128),1&r&&(o|=512),8&r&&(o|=16384),32&r&&(a|=4),16&r&&(a|=1);const s=4&r?ue.symbolToNode:ue.symbolToEntityName;return i?c(i).getText():pd(c);function c(r){const i=s(e,n,t,o,a),c=308===(null==t?void 0:t.kind)?OU():IU(),l=t&&wd(t);return c.writeNode(4,i,l,r),r}}function fc(e,t,n=0,r,i,o,a,s){return i?c(i).getText():pd(c);function c(i){let c;c=262144&n?1===r?186:185:1===r?181:180;const l=ue.signatureToSignatureDeclaration(e,c,t,70222336|Nc(n),void 0,void 0,o,a,s),_=LU(),u=t&&wd(t);return _.writeNode(4,l,u,qy(i)),i}}function mc(e,t,n=1064960,r=zy(""),i,o,a){const s=!i&&E.noErrorTruncation||1&n,c=ue.typeToTypeNode(e,t,70221824|Nc(n)|(s?1:0),void 0,void 0,i,o,a);if(void 0===c)return gn.fail("should always get typenode");const l=e!==Pt?IU():AU(),_=t&&wd(t);l.writeNode(4,c,_,r);const u=r.getText(),d=i||(s?2*Yu:2*Qu);return d&&u&&u.length>=d?u.substr(0,d-3)+"...":u}function gc(e,t){let n=wc(e.symbol)?mc(e,e.symbol.valueDeclaration):mc(e),r=wc(t.symbol)?mc(t,t.symbol.valueDeclaration):mc(t);return n===r&&(n=vc(e),r=vc(t)),[n,r]}function vc(e){return mc(e,void 0,64)}function wc(e){return e&&!!e.valueDeclaration&&Q_(e.valueDeclaration)&&!Fk(e.valueDeclaration)}function Nc(e=0){return 848330095&e}function Ec(e){return!!(e.symbol&&32&e.symbol.flags&&(e===vu(e.symbol)||524288&e.flags&&16777216&Tx(e)))}function Pc(e){return VS(e)}function Ic(t){var n;const r=4&Tx(t)?t.target.symbol:t.symbol;return fw(t)||!!(null==(n=null==r?void 0:r.declarations)?void 0:n.some(t=>e.isSourceFileDefaultLibrary(wd(t))))}function jc(e,t,n=16384,r){return r?i(r).getText():pd(i);function i(r){const i=70222336|Nc(n),o=ue.typePredicateToTypePredicateNode(e,t,i),a=IU(),s=t&&wd(t);return a.writeNode(4,o,s,r),r}}function Rc(e){return 2===e?"private":4===e?"protected":"public"}function Bc(e){return e&&e.parent&&269===e.parent.kind&&xp(e.parent.parent)}function Jc(e){return 308===e.kind||mp(e)}function zc(e,t){const n=ca(e).nameType;if(n){if(384&n.flags){const e=""+n.value;return Ss(e,wS(E))||HT(e)?HT(e)&&en(e,"-")?`[${e}]`:e:`"${Dy(e,34)}"`}if(8192&n.flags)return`[${Uc(n.symbol,t)}]`}}function Uc(e,t){var n;if((null==(n=null==t?void 0:t.remappedSymbolReferences)?void 0:n.has(fJ(e)))&&(e=t.remappedSymbolReferences.get(fJ(e))),t&&"default"===e.escapedName&&!(16384&t.flags)&&(!(16777216&t.flags)||!e.declarations||t.enclosingDeclaration&&yc(e.declarations[0],Jc)!==yc(t.enclosingDeclaration,Jc)))return"default";if(e.declarations&&e.declarations.length){let n=y(e.declarations,e=>Ac(e)?e:void 0);const r=n&&Ac(n);if(n&&r){if(SE(n)&&lg(n))return Cc(e);if(FD(r)&&!(4096&ux(e))){const n=ca(e).nameType;if(n&&384&n.flags){const n=zc(e,t);if(void 0!==n)return n}}return Bp(r)}if(n||(n=e.declarations[0]),n.parent&&261===n.parent.kind)return Bp(n.parent.name);switch(n.kind){case 232:case 219:case 220:return!t||t.encounteredError||131072&t.flags||(t.encounteredError=!0),232===n.kind?"(Anonymous class)":"(Anonymous function)"}}const r=zc(e,t);return void 0!==r?r:Cc(e)}function Vc(e){if(e){const t=la(e);return void 0===t.isVisible&&(t.isVisible=!!function(){switch(e.kind){case 339:case 347:case 341:return!!(e.parent&&e.parent.parent&&e.parent.parent.parent&&mP(e.parent.parent.parent));case 209:return Vc(e.parent.parent);case 261:if(E_(e.name)&&!e.name.elements.length)return!1;case 268:case 264:case 265:case 266:case 263:case 267:case 272:if(xp(e))return!0;const t=Qc(e);return 32&Zq(e)||272!==e.kind&&308!==t.kind&&33554432&t.flags?Vc(t):af(t);case 173:case 172:case 178:case 179:case 175:case 174:if(Ov(e,6))return!1;case 177:case 181:case 180:case 182:case 170:case 269:case 185:case 186:case 188:case 184:case 189:case 190:case 193:case 194:case 197:case 203:return Vc(e.parent);case 274:case 275:case 277:return!1;case 169:case 308:case 271:return!0;default:return!1}}()),t.isVisible}return!1}function $c(e,t){let n,r,i;return 11!==e.kind&&e.parent&&278===e.parent.kind?n=ze(e,e,2998271,void 0,!1):282===e.parent.kind&&(n=za(e.parent,2998271)),n&&(i=new Set,i.add(fJ(n)),function e(n){g(n,n=>{const o=Ta(n)||n;if(t?la(n).isVisible=!0:(r=r||[],pe(r,o)),Om(n)){const t=mb(n.moduleReference),r=ze(n,t.escapedText,901119,void 0,!1);r&&i&&$(i,fJ(r))&&e(r.declarations)}})}(n.declarations)),r}function Kc(e,t){const n=Hc(e,t);if(n>=0){const{length:e}=Ui;for(let t=n;t=$i;n--){if(Gc(Ui[n],Wi[n]))return-1;if(Ui[n]===e&&Wi[n]===t)return n}return-1}function Gc(e,t){switch(t){case 0:return!!ca(e).type;case 2:return!!ca(e).declaredType;case 1:return!!e.resolvedBaseConstructorType;case 3:return!!e.resolvedReturnType;case 4:return!!e.immediateBaseConstraint;case 5:return!!e.resolvedTypeArguments;case 6:return!!e.baseTypesResolved;case 7:return!!ca(e).writeType;case 8:return void 0!==la(e).parameterInitializerContainsUndefined}return gn.assertNever(t)}function Xc(){return Ui.pop(),Wi.pop(),Vi.pop()}function Qc(e){return yc(oy(e),e=>{switch(e.kind){case 261:case 262:case 277:case 276:case 275:case 274:return!1;default:return!0}}).parent}function Yc(e,t){const n=xm(e,t);return n?j_(n):void 0}function Zc(e,t){var n;let r;return Yc(e,t)||(r=null==(n=mg(e,t))?void 0:n.type)&&Pl(r,!0,!0)}function el(e){return e&&!!(1&e.flags)}function nl(e){return e===Ft||!!(1&e.flags&&e.aliasSymbol)}function ol(e,t){if(0!==t)return Al(e,!1,t);const n=xs(e);return n&&ca(n).type||Al(e,!1,t)}function al(e,t,n){if(131072&(e=EE(e,e=>!(98304&e.flags))).flags)return Nn;if(1048576&e.flags)return ME(e,e=>al(e,t,n));let r=zb(O(t,rx));const i=[],o=[];for(const t of Qp(e)){const e=ix(t,8576);Jk(e,r)||6&dx(t)||!yS(t)?o.push(e):i.push(t)}if(Lx(e)||jx(r)){if(o.length&&(r=zb([r,...o])),131072&r.flags)return e;const t=(qr||(qr=Yy("Omit",2,!0)||vt),qr===vt?void 0:qr);return t?ky(t,[e,r]):Ft}const a=nd();for(const e of i)a.set(e.escapedName,vS(e,!1));const s=Ks(n,a,p,p,Gm(e));return s.objectFlags|=4194304,s}function sl(e){return!!(465829888&e.flags)&&oM(xf(e)||Ot,32768)}function _l(e){return uD(fE(e,sl)?ME(e,e=>465829888&e.flags?Sf(e):e):e,524288)}function ul(e,t){const n=pl(e);return n?AF(n,t):t}function pl(e){const t=function(e){const t=e.parent.parent;switch(t.kind){case 209:case 304:return pl(t);case 210:return pl(e.parent);case 261:return t.initializer;case 227:return t.right}}(e);if(t&&zg(t)&&t.flowNode){const n=ml(e);if(n){const r=AI(jI.createStringLiteral(n),e),i=W_(t)?t:jI.createParenthesizedExpression(t),o=AI(jI.createElementAccessExpression(i,r),e);return jT(r,o),jT(o,e),i!==t&&jT(i,o),o.flowNode=t.flowNode,o}}}function ml(e){const t=e.parent;return 209===e.kind&&207===t.kind?vl(e.propertyName||e.name):304===e.kind||305===e.kind?vl(e.name):""+t.elements.indexOf(e)}function vl(e){const t=rx(e);return 384&t.flags?""+t.value:void 0}function xl(e){const t=e.dotDotDotToken?32:0,n=ol(e.parent.parent,t);return n&&Sl(e,n,!1)}function Sl(e,t,n){if(el(t))return t;const r=e.parent;V&&33554432&e.flags&&iy(e)?t=Nw(t):V&&r.parent.initializer&&!lD(wD(r.parent.initializer),65536)&&(t=uD(t,524288));const i=32|(n||sI(e)?16:0);let o;if(207===r.kind)if(e.dotDotDotToken){if(2&(t=Qf(t)).flags||!vI(t))return Jo(e,ha.Rest_types_may_only_be_created_from_object_types),Ft;const n=[];for(const e of r.elements)e.dotDotDotToken||n.push(e.propertyName||e.name);o=al(t,n,e.symbol)}else{const n=e.propertyName||e.name;o=ul(e,qx(t,rx(n),i,n))}else{const n=CB(65|(e.dotDotDotToken?0:128),t,Lt,r),a=r.elements.indexOf(e);if(e.dotDotDotToken){const e=ME(t,e=>58982400&e.flags?Sf(e):e);o=CE(e,fw)?ME(e,e=>wb(e,a)):Hv(n)}else if(QC(t)){o=ul(e,Vx(t,CS(a),i,e.name)||Ft)}else o=n}return e.initializer?xv(lc(e))?V&&!lD(CM(e,0),16777216)?_l(o):o:NM(e,zb([_l(o),CM(e,0)],2)):o}function Dl(e){const t=ll(e);if(t)return VS(t)}function Fl(e){const t=ph(e,!0);return 210===t.kind&&0===t.elements.length}function Pl(e,t=!1,n=!0){return V&&n?ww(e,t):e}function Al(e,t,n){if(hF(e)&&250===e.parent.parent.kind){const t=cx(tO(WM(e.parent.parent.expression,n)));return 4456448&t.flags?lx(t):Ut}if(hF(e)&&251===e.parent.parent.kind){return TB(e.parent.parent)||wt}if(E_(e.parent))return xl(e);const r=LD(e)&&!zv(e)||OD(e)||eA(e),i=t&&iC(e),o=l_(e);if(fp(e))return o?el(o)||o===Ot?o:Ft:re?Ot:wt;if(o)return Pl(o,r,i);if((Z||Mm(e))&&hF(e)&&!E_(e.name)&&!(32&Zq(e))&&!(33554432&e.flags)){if(!(6&eU(e))&&(!e.initializer||function(e){const t=ph(e,!0);return 106===t.kind||80===t.kind&&zN(t)===Ce}(e.initializer)))return Nt;if(e.initializer&&Fl(e.initializer))return lr}if(AD(e)){if(!e.symbol)return;const t=e.parent;if(179===t.kind&&hd(t)){const n=ed(xs(e.parent),178);if(n){const r=Rg(n),i=Iq(t);return i&&e===i?(gn.assert(!i.type),j_(r.thisParameter)):ah(r)}}const n=function(e,t){const n=Jg(e);if(!n)return;const r=e.parameters.indexOf(t);return t.dotDotDotToken?fj(n,r):dj(n,r)}(t,e);if(n)return n;const r="this"===e.symbol.escapedName?pA(t):fA(e);if(r)return Pl(r,!1,i)}if(Ru(e)&&e.initializer){if(Mm(e)&&!AD(e)){const t=ql(e,xs(e),Ym(e));if(t)return t}return Pl(NM(e,CM(e,n)),r,i)}if(LD(e)&&(Z||Mm(e))){if(Mv(e)){const t=P(e.parent.members,RD),n=t.length?function(e,t){const n=en(e.escapedName,"__#")?kw.createPrivateIdentifier(e.escapedName.split("@")[1]):Sc(e.escapedName);for(const r of t){const t=kw.createPropertyAccessExpression(kw.createThis(),n);jT(t.expression,t),jT(t,r),t.flowNode=r.returnFlowNode;const i=Rl(t,e);if(!Z||i!==Nt&&i!==lr||Jo(e.valueDeclaration,ha.Member_0_implicitly_has_an_1_type,dc(e),mc(i)),!CE(i,eO))return _B(i)}}(e.symbol,t):128&Kv(e)?OC(e.symbol):void 0;return n&&Pl(n,!0,i)}{const t=wC(e.parent),n=t?Ml(e.symbol,t):128&Kv(e)?OC(e.symbol):void 0;return n&&Pl(n,!0,i)}}return nP(e)?Gt:E_(e.name)?Ql(e.name,!1,!0):void 0}function Il(e){if(e.valueDeclaration&&LE(e.valueDeclaration)){const t=ca(e);return void 0===t.isConstructorDeclaredProperty&&(t.isConstructorDeclaredProperty=!1,t.isConstructorDeclaredProperty=!!jl(e)&&k(e.declarations,t=>LE(t)&&SA(t)&&(213!==t.left.kind||Uh(t.left.argumentExpression))&&!Ul(void 0,t,e,t))),t.isConstructorDeclaredProperty}return!1}function Ll(e){const t=e.valueDeclaration;return t&&LD(t)&&!xv(t)&&!t.initializer&&(Z||Mm(t))}function jl(e){if(e.declarations)for(const t of e.declarations){const e=sm(t,!1,!1);if(e&&(177===e.kind||ML(e)))return e}}function Ml(e,t){const n=en(e.escapedName,"__#")?kw.createPrivateIdentifier(e.escapedName.split("@")[1]):Sc(e.escapedName),r=kw.createPropertyAccessExpression(kw.createThis(),n);jT(r.expression,r),jT(r,t),r.flowNode=t.returnFlowNode;const i=Rl(r,e);return!Z||i!==Nt&&i!==lr||Jo(e.valueDeclaration,ha.Member_0_implicitly_has_an_1_type,dc(e),mc(i)),CE(i,eO)?void 0:_B(i)}function Rl(e,t){const n=(null==t?void 0:t.valueDeclaration)&&(!Ll(t)||128&Kv(t.valueDeclaration))&&OC(t)||Lt;return AF(e,Nt,n)}function Bl(e,t){const n=Zm(e.valueDeclaration);if(n){const t=Mm(n)?cl(n):void 0;if(t&&t.typeExpression)return VS(t.typeExpression);return e.valueDeclaration&&ql(e.valueDeclaration,e,n)||_w(kM(n))}let r,i=!1,o=!1;if(Il(e)&&(r=Ml(e,jl(e))),!r){let n;if(e.declarations){let a;for(const r of e.declarations){const s=LE(r)||SE(r)?r:Px(r)?LE(r.parent)?r.parent:r:void 0;if(!s)continue;const c=Px(s)?yg(s):cg(s);(4===c||LE(s)&&SA(s,c))&&(Kl(s)?i=!0:o=!0),SE(s)||(a=Ul(a,s,e,r)),a||(n||(n=[])).push(LE(s)||SE(s)?Vl(e,t,s,c):cn)}r=a}if(!r){if(!m(n))return Ft;let t=i&&e.declarations?function(e,t){return gn.assert(e.length===t.length),e.filter((e,n)=>{const r=t[n],i=LE(r)?r:LE(r.parent)?r.parent:void 0;return i&&Kl(i)})}(n,e.declarations):void 0;if(o){const n=OC(e);n&&((t||(t=[])).push(n),i=!0)}r=zb(X(t,e=>!!(-98305&e.flags))?t:n)}}const a=Hw(Pl(r,!1,o&&!i));return e.valueDeclaration&&Mm(e.valueDeclaration)&&EE(a,e=>!!(-98305&e.flags))===cn?(Qw(e.valueDeclaration,wt),wt):a}function ql(e,t,n){var r,i;if(!Mm(e)||!n||!vE(n)||n.properties.length)return;const o=nd();for(;LE(e)||bE(e);){const t=Ts(e);(null==(r=null==t?void 0:t.exports)?void 0:r.size)&&oa(o,t.exports),e=LE(e)?e.parent:e.parent.parent}const a=Ts(e);(null==(i=null==a?void 0:a.exports)?void 0:i.size)&&oa(o,a.exports);const s=Ks(t,o,p,p,p);return s.objectFlags|=4096,s}function Ul(e,t,n,r){var i;const o=xv(t.parent);if(o){const t=Hw(VS(o));if(!e)return t;nl(e)||nl(t)||Ok(e,t)||dB(void 0,e,r,t)}if(null==(i=n.parent)?void 0:i.valueDeclaration){const e=ws(n.parent);if(e.valueDeclaration){const t=xv(e.valueDeclaration);if(t){const e=xm(VS(t),n.escapedName);if(e)return M_(e)}}}return e}function Vl(e,t,n,r){if(SE(n)){if(t)return j_(t);const e=kM(n.arguments[2]),r=Yc(e,"value");if(r)return r;const i=Yc(e,"get");if(i){const e=eL(i);if(e)return ah(e)}const o=Yc(e,"set");if(o){const e=eL(o);if(e)return xj(e)}return wt}if(function(e,t){return bE(e)&&110===e.expression.kind&&cO(t,t=>VN(e,t))}(n.left,n.right))return wt;const i=1===r&&(bE(n.left)||xE(n.left))&&(sg(n.left.expression)||fD(n.left.expression)&&og(n.left.expression)),o=t?j_(t):i?SS(kM(n.right)):_w(kM(n.right));if(524288&o.flags&&2===r&&"export="===e.escapedName){const n=Lp(o),r=nd();dd(n.members,r);const i=r.size;t&&!t.exports&&(t.exports=nd()),(t||e).exports.forEach((e,t)=>{var n;const i=r.get(t);if(!i||i===e||2097152&e.flags)r.set(t,e);else if(111551&e.flags&&111551&i.flags){if(e.valueDeclaration&&i.valueDeclaration&&wd(e.valueDeclaration)!==wd(i.valueDeclaration)){const t=Sc(e.escapedName),r=(null==(n=at(i.valueDeclaration,Fc))?void 0:n.name)||i.valueDeclaration;fT(Jo(e.valueDeclaration,ha.Duplicate_identifier_0,t),Wp(r,ha._0_was_also_declared_here,t)),fT(Jo(r,ha.Duplicate_identifier_0,t),Wp(e.valueDeclaration,ha._0_was_also_declared_here,t))}const o=Xo(e.flags|i.flags,t);o.links.type=zb([j_(e),j_(i)]),o.valueDeclaration=i.valueDeclaration,o.declarations=Y(i.declarations,e.declarations),r.set(t,o)}else r.set(t,na(e,i))});const a=Ks(i!==r.size?void 0:n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);if(i===r.size&&(o.aliasSymbol&&(a.aliasSymbol=o.aliasSymbol,a.aliasTypeArguments=o.aliasTypeArguments),4&Tx(o))){a.aliasSymbol=o.symbol;const e=by(o);a.aliasTypeArguments=m(e)?e:void 0}return a.objectFlags|=py([o])|20608&Tx(o),a.symbol&&32&a.symbol.flags&&o===vu(a.symbol)&&(a.objectFlags|=16777216),a}return tw(o)?(Qw(n,cr),cr):o}function Kl(e){const t=sm(e,!1,!1);return 177===t.kind||263===t.kind||219===t.kind&&!bg(t.parent)}function Xl(e,t,n){if(e.initializer){return Pl(DM(e,CM(e,0,E_(e.name)?Ql(e.name,!0,!1):Ot)))}return E_(e.name)?Ql(e.name,t,n):(n&&!o_(e)&&Qw(e,wt),t?At:wt)}function Ql(e,t=!1,n=!1){t&&Ai.push(e);const r=207===e.kind?function(e,t,n){const r=nd();let i,o=131200;g(e.elements,e=>{const a=e.propertyName||e.name;if(e.dotDotDotToken)return void(i=qh(Ut,wt,!1));const s=rx(a);if(!mC(s))return void(o|=512);const c=gC(s),l=Xo(4|(e.initializer?16777216:0),c);l.links.type=Xl(e,t,n),r.set(l.escapedName,l)});const a=Ks(void 0,r,p,p,i?[i]:p);return a.objectFlags|=o,t&&(a.pattern=e,a.objectFlags|=131072),a}(e,t,n):function(e,t,n){const r=e.elements,i=ke(r),o=i&&209===i.kind&&i.dotDotDotToken?i:void 0;if(0===r.length||1===r.length&&o)return A>=2?$v(wt):cr;const a=O(r,e=>zE(e)?wt:Xl(e,t,n)),s=N(r,e=>!(e===o||zE(e)||sI(e)),r.length-1)+1;let c=ob(a,O(r,(e,t)=>e===o?4:t>=s?2:1));return t&&(c=yy(c),c.pattern=e,c.objectFlags|=131072),c}(e,t,n);return t&&Ai.pop(),r}function Zl(e,t){return i_(Al(e,!0,0),e,t)}function e_(e){const t=la(e);if(!t.resolvedType){const n=Xo(4096,"__importAttributes"),r=nd();g(e.elements,e=>{const t=Xo(4,xC(e));t.parent=n,t.links.type=function(e){return SS(kM(e.value))}(e),t.links.target=t,r.set(t.escapedName,t)});const i=Ks(n,r,p,p,p);i.objectFlags|=262272,t.resolvedType=i}return t.resolvedType}function r_(e){const t=Ts(e),n=(r=!1,pr||(pr=Qy("SymbolConstructor",r)));var r;return n&&t&&t===n}function i_(e,t,n){return e?(4096&e.flags&&r_(t.parent)&&(e=OS(t)),n&&Yw(t,e),8192&e.flags&&(hE(t)||!l_(t))&&e.symbol!==xs(t)&&(e=nn),Hw(e)):(e=AD(t)&&t.dotDotDotToken?cr:wt,n&&(o_(t)||Qw(t,e)),e)}function o_(e){const t=oy(e);return pR(170===t.kind?t.parent:t)}function l_(e){const t=xv(e);if(t)return VS(t)}function f_(e){const t=ca(e);if(!t.type){const n=function(e){if(4194304&e.flags)return function(e){const t=Pu(Cs(e));return t.typeParameters?my(t,O(t.typeParameters,e=>wt)):t}(e);if(e===Oe)return wt;if(134217728&e.flags&&e.valueDeclaration){const t=xs(wd(e.valueDeclaration)),n=Xo(t.flags,"exports");n.declarations=t.declarations?t.declarations.slice():[],n.parent=e,n.links.target=t,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),t.members&&(n.members=new Map(t.members)),t.exports&&(n.exports=new Map(t.exports));const r=nd();return r.set("exports",n),Ks(e,r,p,p,p)}gn.assertIsDefined(e.valueDeclaration);const t=e.valueDeclaration;if(mP(t)&&cf(t))return t.statements.length?Hw(_w(WM(t.statements[0].expression))):Nn;if(v_(t))return k_(e);if(!Kc(e,0))return 512&e.flags&&!(67108864&e.flags)?D_(e):I_(e);let n;if(278===t.kind)n=i_(l_(t)||kM(t.expression),t);else if(LE(t)||Mm(t)&&(SE(t)||(bE(t)||pg(t))&&LE(t.parent)))n=Bl(e);else if(bE(t)||xE(t)||fD(t)||Uu(t)||GN(t)||bF(t)||vF(t)||MD(t)&&!Kf(t)||jD(t)||mP(t)){if(9136&e.flags)return D_(e);n=LE(t.parent)?Bl(e):l_(t)||wt}else if(uP(t))n=l_(t)||AM(t);else if(nP(t))n=l_(t)||SI(t);else if(dP(t))n=l_(t)||PM(t.name,0);else if(Kf(t))n=l_(t)||IM(t,0);else if(AD(t)||LD(t)||OD(t)||hF(t)||hE(t)||Ol(t))n=Zl(t,!0);else if(kF(t))n=D_(e);else{if(!fP(t))return gn.fail("Unhandled declaration kind! "+gn.formatSyntaxKind(t.kind)+" for "+gn.formatSymbol(e));n=P_(e)}if(!Xc())return 512&e.flags&&!(67108864&e.flags)?D_(e):I_(e);return n}(e);return t.type||function(e){let t=e.valueDeclaration;return!!t&&(hE(t)&&(t=lc(t)),!!AD(t)&&Ak(t.parent))}(e)||(t.type=n),n}return t.type}function m_(e){if(e)switch(e.kind){case 178:return kv(e);case 179:return Cv(e);case 173:gn.assert(zv(e));return xv(e)}}function S_(e){const t=m_(e);return t&&VS(t)}function k_(e){const t=ca(e);if(!t.type){if(!Kc(e,0))return Ft;const n=ed(e,178),r=ed(e,179),i=at(ed(e,173),b_);let o=n&&Mm(n)&&Dl(n)||S_(n)||S_(r)||S_(i)||n&&n.body&&zj(n)||i&&Zl(i,!0);o||(r&&!pR(r)?Uo(Z,r,ha.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,dc(e)):n&&!pR(n)?Uo(Z,n,ha.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,dc(e)):i&&!pR(i)&&Uo(Z,i,ha.Member_0_implicitly_has_an_1_type,dc(e),"any"),o=wt),Xc()||(m_(n)?Jo(n,ha._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,dc(e)):m_(r)||m_(i)?Jo(r,ha._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,dc(e)):n&&Z&&Jo(n,ha._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,dc(e)),o=wt),t.type??(t.type=o)}return t.type}function T_(e){const t=ca(e);if(!t.writeType){if(!Kc(e,7))return Ft;const n=ed(e,179)??at(ed(e,173),b_);let r=S_(n);Xc()||(m_(n)&&Jo(n,ha._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,dc(e)),r=wt),t.writeType??(t.writeType=r||k_(e))}return t.writeType}function C_(e){const t=_u(vu(e));return 8650752&t.flags?t:2097152&t.flags?T(t.types,e=>!!(8650752&e.flags)):void 0}function D_(e){let t=ca(e);const n=t;if(!t.type){const r=e.valueDeclaration&&BL(e.valueDeclaration,!1);if(r){const n=RL(e,r);n&&(e=n,t=n.links)}n.type=t.type=function(e){const t=e.valueDeclaration;if(1536&e.flags&&yp(e))return wt;if(t&&(227===t.kind||Px(t)&&227===t.parent.kind))return Bl(e);if(512&e.flags&&t&&mP(t)&&t.commonJsModuleIndicator){const t=cs(e);if(t!==e){if(!Kc(e,0))return Ft;const n=bs(e.exports.get("export=")),r=Bl(n,n===t?void 0:t);return Xc()?r:I_(e)}}const n=zs(16,e);if(32&e.flags){const t=C_(e);return t?Gb([n,t]):n}return V&&16777216&e.flags?ww(n,!0):n}(e)}return t.type}function P_(e){const t=ca(e);return t.type||(t.type=wu(e))}function A_(e){const t=ca(e);if(!t.type){if(!Kc(e,0))return Ft;const n=$a(e),r=e.declarations&&Ua(Ca(e),!0),i=y(null==r?void 0:r.declarations,e=>JF(e)?l_(e):void 0);if(t.type??(t.type=(null==r?void 0:r.declarations)&&oz(r.declarations)&&e.declarations.length?function(e){const t=wd(e.declarations[0]),n=Sc(e.escapedName),r=e.declarations.every(e=>Mm(e)&&Px(e)&&sg(e.expression)),i=r?kw.createPropertyAccessExpression(kw.createPropertyAccessExpression(kw.createIdentifier("module"),kw.createIdentifier("exports")),n):kw.createPropertyAccessExpression(kw.createIdentifier("exports"),n);return r&&jT(i.expression.expression,i.expression),jT(i.expression,i),jT(i,t),i.flowNode=t.endFlowNode,AF(i,Nt,Lt)}(r):oz(e.declarations)?Nt:i||(111551&Ka(n)?j_(n):Ft)),!Xc())return I_(r??e),t.type??(t.type=Ft)}return t.type}function I_(e){const t=e.valueDeclaration;if(t){if(xv(t))return Jo(e.valueDeclaration,ha._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,dc(e)),Ft;Z&&(170!==t.kind||t.initializer)&&Jo(e.valueDeclaration,ha._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,dc(e))}else if(2097152&e.flags){const t=Ca(e);t&&Jo(t,ha.Circular_definition_of_import_alias_0,dc(e))}return wt}function O_(e){const t=ca(e);return t.type||(gn.assertIsDefined(t.deferralParent),gn.assertIsDefined(t.deferralConstituents),t.type=1048576&t.deferralParent.flags?zb(t.deferralConstituents):Gb(t.deferralConstituents)),t.type}function L_(e){const t=ux(e);return 2&t?65536&t?function(e){const t=ca(e);return!t.writeType&&t.deferralWriteConstituents&&(gn.assertIsDefined(t.deferralParent),gn.assertIsDefined(t.deferralConstituents),t.writeType=1048576&t.deferralParent.flags?zb(t.deferralWriteConstituents):Gb(t.deferralWriteConstituents)),t.writeType}(e)||O_(e):e.links.writeType||e.links.type:4&e.flags?Iw(j_(e),!!(16777216&e.flags)):98304&e.flags?1&t?function(e){const t=ca(e);return t.writeType||(t.writeType=Ck(L_(t.target),t.mapper))}(e):T_(e):j_(e)}function j_(e){const t=ux(e);return 65536&t?O_(e):1&t?function(e){const t=ca(e);return t.type||(t.type=Ck(j_(t.target),t.mapper))}(e):262144&t?function(e){var t;if(!e.links.type){const n=e.links.mappedType;if(!Kc(e,0))return n.containsError=!0,Ft;const i=Ck(Sp(n.target||n),pk(n.mapper,up(n),e.links.keyType));let o=V&&16777216&e.flags&&!oM(i,49152)?ww(i,!0):524288&e.links.checkFlags?Lw(i):i;Xc()||(Jo(r,ha.Type_of_property_0_circularly_references_itself_in_mapped_type_1,dc(e),mc(n)),o=Ft),(t=e.links).type??(t.type=o)}return e.links.type}(e):8192&t?function(e){const t=ca(e);t.type||(t.type=hN(e.links.propertyType,e.links.mappedType,e.links.constraintType)||Ot);return t.type}(e):7&e.flags?f_(e):9136&e.flags?D_(e):8&e.flags?P_(e):98304&e.flags?k_(e):2097152&e.flags?A_(e):Ft}function M_(e){return Iw(j_(e),!!(16777216&e.flags))}function R_(e,t){if(void 0===e||!(4&Tx(e)))return!1;for(const n of t)if(e.target===n)return!0;return!1}function V_(e,t){return void 0!==e&&void 0!==t&&!!(4&Tx(e))&&e.target===t}function $_(e){return 4&Tx(e)?e.target:e}function K_(e,t){return function e(n){if(7&Tx(n)){const r=$_(n);return r===t||X(mu(r),e)}if(2097152&n.flags)return X(n.types,e);return!1}(e)}function H_(e,t){for(const n of t)e=fe(e,Eu(xs(n)));return e}function G_(e,t){for(;;){if((e=e.parent)&&LE(e)){const t=cg(e);if(6===t||3===t){const t=xs(e.left);t&&t.parent&&!yc(t.parent.valueDeclaration,t=>e===t)&&(e=t.parent.valueDeclaration)}}if(!e)return;const n=e.kind;switch(n){case 264:case 232:case 265:case 180:case 181:case 174:case 185:case 186:case 318:case 263:case 175:case 219:case 220:case 266:case 346:case 347:case 341:case 339:case 201:case 195:{const r=G_(e,t);if((219===n||220===n||Kf(e))&&Fk(e)){const t=ve(Cm(j_(xs(e)),0));if(t&&t.typeParameters)return[...r||p,...t.typeParameters]}if(201===n)return le(r,Eu(xs(e.typeParameter)));if(195===n)return Y(r,tS(e));const i=H_(r,hl(e)),o=t&&(264===n||232===n||265===n||ML(e))&&vu(xs(e)).thisType;return o?le(i,o):i}case 342:const r=$g(e);r&&(e=r.valueDeclaration);break;case 321:{const n=G_(e,t);return e.tags?H_(n,R(e.tags,e=>QP(e)?e.typeParameters:void 0)):n}}}}function X_(e){var t;const n=32&e.flags||16&e.flags?e.valueDeclaration:null==(t=e.declarations)?void 0:t.find(e=>{if(265===e.kind)return!0;if(261!==e.kind)return!1;const t=e.initializer;return!!t&&(219===t.kind||220===t.kind)});return gn.assert(!!n,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),G_(n)}function eu(e){if(!e.declarations)return;let t;for(const n of e.declarations)if(265===n.kind||264===n.kind||232===n.kind||ML(n)||jg(n)){t=H_(t,hl(n))}return t}function ou(e){const t=Cm(e,1);if(1===t.length){const e=t[0];if(!e.typeParameters&&1===e.parameters.length&&bJ(e)){const t=oj(e.parameters[0]);return el(t)||XC(t)===wt}}return!1}function au(e){if(Cm(e,1).length>0)return!0;if(8650752&e.flags){const t=xf(e);return!!t&&ou(t)}return!1}function su(e){const t=kx(e.symbol);return t&&Ch(t)}function cu(e,t,n){const r=m(t),i=Mm(n);return P(Cm(e,1),e=>(i||r>=Ag(e.typeParameters))&&r<=m(e.typeParameters))}function lu(e,t,n){const r=cu(e,t,n),i=O(t,VS);return j(r,e=>X(e.typeParameters)?Dh(e,i,Mm(n)):e)}function _u(e){if(!e.resolvedBaseConstructorType){const t=kx(e.symbol),n=t&&Ch(t),r=su(e);if(!r)return e.resolvedBaseConstructorType=Lt;if(!Kc(e,1))return Ft;const i=WM(r.expression);if(n&&r!==n&&(gn.assert(!n.typeArguments),WM(n.expression)),2621440&i.flags&&Lp(i),!Xc())return Jo(e.symbol.valueDeclaration,ha._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,dc(e.symbol)),e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=Ft);if(!(1&i.flags||i===qt||au(i))){const t=Jo(r.expression,ha.Type_0_is_not_a_constructor_function_type,mc(i));if(262144&i.flags){const e=ly(i);let n=Ot;if(e){const t=Cm(e,1);t[0]&&(n=ah(t[0]))}i.symbol.declarations&&fT(t,Wp(i.symbol.declarations[0],ha.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,dc(i.symbol),mc(n)))}return e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=Ft)}e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=i)}return e.resolvedBaseConstructorType}function uu(e,t){Jo(e,ha.Type_0_recursively_references_itself_as_a_base_type,mc(t,void 0,2))}function mu(e){if(!e.baseTypesResolved){if(Kc(e,6)&&(8&e.objectFlags?e.resolvedBaseTypes=[gu(e)]:96&e.symbol.flags?(32&e.symbol.flags&&function(e){e.resolvedBaseTypes=Gu;const t=Pf(_u(e));if(!(2621441&t.flags))return e.resolvedBaseTypes=p;const n=su(e);let r;const i=t.symbol?Pu(t.symbol):void 0;if(t.symbol&&32&t.symbol.flags&&function(e){const t=e.outerTypeParameters;if(t){const n=t.length-1,r=by(e);return t[n].symbol!==r[n].symbol}return!0}(i))r=Sy(n,t.symbol);else if(1&t.flags)r=t;else{const i=lu(t,n.typeArguments,n);if(!i.length)return Jo(n.expression,ha.No_base_constructor_has_the_specified_number_of_type_arguments),e.resolvedBaseTypes=p;r=ah(i[0])}if(nl(r))return e.resolvedBaseTypes=p;const o=Qf(r);if(!yu(o)){const t=sS(bm(void 0,r),ha.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,mc(o));return ho.add(Hp(wd(n.expression),n.expression,t)),e.resolvedBaseTypes=p}if(e===o||K_(o,e))return Jo(e.symbol.valueDeclaration,ha.Type_0_recursively_references_itself_as_a_base_type,mc(e,void 0,2)),e.resolvedBaseTypes=p;e.resolvedBaseTypes===Gu&&(e.members=void 0);e.resolvedBaseTypes=[o]}(e),64&e.symbol.flags&&function(e){if(e.resolvedBaseTypes=e.resolvedBaseTypes||p,e.symbol.declarations)for(const t of e.symbol.declarations)if(265===t.kind&&Eh(t))for(const n of Eh(t)){const r=Qf(VS(n));nl(r)||(yu(r)?e===r||K_(r,e)?uu(t,e):e.resolvedBaseTypes===p?e.resolvedBaseTypes=[r]:e.resolvedBaseTypes.push(r):Jo(n,ha.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}(e)):gn.fail("type must be class or interface"),!Xc()&&e.symbol.declarations))for(const t of e.symbol.declarations)264!==t.kind&&265!==t.kind||uu(t,e);e.baseTypesResolved=!0}return e.resolvedBaseTypes}function gu(e){return Hv(zb(j(e.typeParameters,(t,n)=>8&e.elementFlags[n]?qx(t,Vt):t)||p),e.readonly)}function yu(e){if(262144&e.flags){const t=xf(e);if(t)return yu(t)}return!!(67633153&e.flags&&!Pp(e)||2097152&e.flags&&k(e.types,yu))}function vu(e){let t=ca(e);const n=t;if(!t.declaredType){const r=32&e.flags?1:2,i=RL(e,e.valueDeclaration&&function(e){var t;const n=e&&BL(e,!0),r=null==(t=null==n?void 0:n.exports)?void 0:t.get("prototype"),i=(null==r?void 0:r.valueDeclaration)&&function(e){if(!e.parent)return!1;let t=e.parent;for(;t&&212===t.kind;)t=t.parent;if(t&&LE(t)&&vb(t.left)&&64===t.operatorToken.kind){const e=vg(t);return vE(e)&&e}}(r.valueDeclaration);return i?xs(i):void 0}(e.valueDeclaration));i&&(e=i,t=i.links);const o=n.declaredType=t.declaredType=zs(r,e),a=X_(e),s=eu(e);(a||s||1===r||!function(e){if(!e.declarations)return!0;for(const t of e.declarations)if(265===t.kind){if(256&t.flags)return!1;const e=Eh(t);if(e)for(const t of e)if(fb(t.expression)){const e=ts(t.expression,788968,!0);if(!e||!(64&e.flags)||vu(e).thisType)return!1}}return!0}(e))&&(o.objectFlags|=4,o.typeParameters=Y(a,s),o.outerTypeParameters=a,o.localTypeParameters=s,o.instantiations=new Map,o.instantiations.set(uy(o.typeParameters),o),o.target=o,o.resolvedTypeArguments=o.typeParameters,o.thisType=qs(e),o.thisType.isThisType=!0,o.thisType.constraint=o)}return t.declaredType}function xu(e){var t;const n=ca(e);if(!n.declaredType){if(!Kc(e,2))return Ft;const r=gn.checkDefined(null==(t=e.declarations)?void 0:t.find(jg),"Type alias symbol with no valid declaration found"),i=Lg(r)?r.typeExpression:r.type;let o=i?VS(i):Ft;if(Xc()){const t=eu(e);t&&(n.typeParameters=t,n.instantiations=new Map,n.instantiations.set(uy(t),o)),o===It&&"BuiltinIteratorReturn"===e.escapedName&&(o=Nv())}else o=Ft,341===r.kind?Jo(r.typeExpression.type,ha.Type_alias_0_circularly_references_itself,dc(e)):Jo(Fc(r)&&r.name||r,ha.Type_alias_0_circularly_references_itself,dc(e));n.declaredType??(n.declaredType=o)}return n.declaredType}function Su(e){return 1056&e.flags&&8&e.symbol.flags?Pu(Cs(e.symbol)):e}function ku(e){const t=ca(e);if(!t.declaredType){const n=[];if(e.declarations)for(const t of e.declarations)if(267===t.kind)for(const r of t.members)if(hd(r)){const t=xs(r),i=Yz(r).value,o=xS(void 0!==i?IS(i,fJ(e),t):Tu(t));ca(t).declaredType=o,n.push(SS(o))}const r=n.length?zb(n,1,e,void 0):Tu(e);1048576&r.flags&&(r.flags|=1024,r.symbol=e),t.declaredType=r}return t.declaredType}function Tu(e){const t=Ls(32,e),n=Ls(32,e);return t.regularType=t,t.freshType=n,n.regularType=t,n.freshType=n,t}function wu(e){const t=ca(e);if(!t.declaredType){const n=ku(Cs(e));t.declaredType||(t.declaredType=n)}return t.declaredType}function Eu(e){const t=ca(e);return t.declaredType||(t.declaredType=qs(e))}function Pu(e){return Au(e)||Ft}function Au(e){return 96&e.flags?vu(e):524288&e.flags?xu(e):262144&e.flags?Eu(e):384&e.flags?ku(e):8&e.flags?wu(e):2097152&e.flags?function(e){const t=ca(e);return t.declaredType||(t.declaredType=Pu($a(e)))}(e):void 0}function Bu(e){switch(e.kind){case 133:case 159:case 154:case 150:case 163:case 136:case 155:case 151:case 116:case 157:case 146:case 202:return!0;case 189:return Bu(e.elementType);case 184:return!e.typeArguments||e.typeArguments.every(Bu)}return!1}function zu(e){const t=yl(e);return!t||Bu(t)}function qu(e){const t=xv(e);return t?Bu(t):!Mu(e)}function Ku(e){if(e.declarations&&1===e.declarations.length){const t=e.declarations[0];if(t)switch(t.kind){case 173:case 172:return qu(t);case 175:case 174:case 177:case 178:case 179:return function(e){const t=kv(e),n=hl(e);return(177===e.kind||!!t&&Bu(t))&&e.parameters.every(qu)&&n.every(zu)}(t)}}return!1}function Hu(e,t,n){const r=nd();for(const i of e)r.set(i.escapedName,n&&Ku(i)?i:hk(i,t));return r}function Zu(e,t){for(const n of t){if(od(n))continue;const t=e.get(n.escapedName);(!t||t.valueDeclaration&&LE(t.valueDeclaration)&&!Il(t)&&!im(t.valueDeclaration))&&(e.set(n.escapedName,n),e.set(n.escapedName,n))}}function od(e){return!!e.valueDeclaration&&t_(e.valueDeclaration)&&jv(e.valueDeclaration)}function ad(e){if(!e.declaredProperties){const t=e.symbol,n=Td(t);e.declaredProperties=Vs(n),e.declaredCallSignatures=p,e.declaredConstructSignatures=p,e.declaredIndexInfos=p,e.declaredCallSignatures=Vg(n.get("__call")),e.declaredConstructSignatures=Vg(n.get("__new")),e.declaredIndexInfos=Vh(t)}return e}function sd(e){return ld(e)&&mC(FD(e)?uI(e):kM(e.argumentExpression))}function cd(e){return ld(e)&&Jk(FD(e)?uI(e):kM(e.argumentExpression),hn)}function ld(e){if(!FD(e)&&!xE(e))return!1;return fb(FD(e)?e.expression:e.argumentExpression)}function fd(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&64===e.charCodeAt(2)}function md(e){const t=Ac(e);return!!t&&sd(t)}function gd(e){const t=Ac(e);return!!t&&cd(t)}function hd(e){return!Wh(e)||md(e)}function yd(e){return $h(e)&&!sd(e)}function xd(e,t,n,r){gn.assert(!!r.symbol,"The member is expected to have a symbol.");const i=la(r);if(!i.resolvedSymbol){i.resolvedSymbol=r.symbol;const o=LE(r)?r.left:r.name,a=xE(o)?kM(o.argumentExpression):uI(o);if(mC(a)){const s=gC(a),c=r.symbol.flags;let l=n.get(s);l||n.set(s,l=Xo(0,s,4096));const _=t&&t.get(s);if(!(32&e.flags)&&l.flags&Zo(c)){const e=_?Y(_.declarations,l.declarations):l.declarations,t=!(8192&a.flags)&&Sc(s)||Bp(o);g(e,e=>Jo(Ac(e)||e,ha.Property_0_was_also_declared_here,t)),Jo(o||r,ha.Duplicate_property_0,t),l=Xo(0,s,4096)}return l.links.nameType=a,function(e,t,n){gn.assert(!!(4096&ux(e)),"Expected a late-bound symbol."),e.flags|=n,ca(t.symbol).lateSymbol=e,e.declarations?t.symbol.isReplaceableByMethod||e.declarations.push(t):e.declarations=[t],111551&n&&Sg(e,t)}(l,r,c),l.parent?gn.assert(l.parent===e,"Existing symbol parent should match new one"):l.parent=e,i.resolvedSymbol=l}}return i.resolvedSymbol}function Sd(e,t,n,r){let i=n.get("__index");if(!i){const e=null==t?void 0:t.get("__index");e?(i=ta(e),i.links.checkFlags|=4096):i=Xo(0,"__index",4096),n.set("__index",i)}i.declarations?r.symbol.isReplaceableByMethod||i.declarations.push(r):i.declarations=[r]}function kd(e,t){const n=ca(e);if(!n[t]){const r="resolvedExports"===t,i=r?1536&e.flags?vs(e).exports:e.exports:e.members;n[t]=i||x;const o=nd();for(const t of e.declarations||p){const n=Rf(t);if(n)for(const t of n)r===Mv(t)&&(md(t)?xd(e,i,o,t):gd(t)&&Sd(0,i,o,t))}const a=ws(e).assignmentDeclarationMembers;if(a){const t=Be(a.values());for(const n of t){const t=cg(n);r===!(3===t||LE(n)&&SA(n,t)||9===t||6===t)&&md(n)&&xd(e,i,o,n)}}let s=function(e,t){if(!(null==e?void 0:e.size))return t;if(!(null==t?void 0:t.size))return e;const n=nd();return oa(n,e),oa(n,t),n}(i,o);if(33554432&e.flags&&n.cjsExportMerged&&e.declarations)for(const n of e.declarations){const e=ca(n.symbol)[t];s?e&&e.forEach((e,t)=>{const n=s.get(t);if(n){if(n===e)return;s.set(t,na(n,e))}else s.set(t,e)}):s=e}n[t]=s||x}return n[t]}function Td(e){return 6256&e.flags?kd(e,"resolvedMembers"):e.members||x}function Fd(e){if(106500&e.flags&&"__computed"===e.escapedName){const t=ca(e);if(!t.lateSymbol&&X(e.declarations,md)){const t=bs(e.parent);X(e.declarations,Mv)?gs(t):Td(t)}return t.lateSymbol||(t.lateSymbol=e)}return e}function Pd(e,t,n){if(4&Tx(e)){const n=e.target,r=by(e);return m(n.typeParameters)===m(r)?my(n,Y(r,[t||n.thisType])):e}if(2097152&e.flags){const r=j(e.types,e=>Pd(e,t,n));return r!==e.types?Gb(r):e}return n?Pf(e):e}function Ad(e,t,n,r){let i,o,a,s,c;he(n,r,0,n.length)?(o=t.symbol?Td(t.symbol):nd(t.declaredProperties),a=t.declaredCallSignatures,s=t.declaredConstructSignatures,c=t.declaredIndexInfos):(i=ZS(n,r),o=Hu(t.declaredProperties,i,1===n.length),a=QS(t.declaredCallSignatures,i),s=QS(t.declaredConstructSignatures,i),c=YS(t.declaredIndexInfos,i));const l=mu(t);if(l.length){if(t.symbol&&o===Td(t.symbol)){const e=nd(t.declaredProperties),n=Bh(t.symbol);n&&e.set("__index",n),o=e}$s(e,o,a,s,c);const n=ke(r);for(const e of l){const t=n?Pd(Ck(e,i),n):e;Zu(o,Qp(t)),a=Y(a,Cm(t,0)),s=Y(s,Cm(t,1));const r=t!==wt?Gm(t):[di];c=Y(c,P(r,e=>!Bm(c,e.keyType)))}}$s(e,o,a,s,c)}function Id(e,t,n,r,i,o,a,s){const c=new l(Ue,s);return c.declaration=e,c.typeParameters=t,c.parameters=r,c.thisParameter=n,c.resolvedReturnType=i,c.resolvedTypePredicate=o,c.minArgumentCount=a,c.resolvedMinArgumentCount=void 0,c.target=void 0,c.mapper=void 0,c.compositeSignatures=void 0,c.compositeKind=void 0,c}function jd(e){const t=Id(e.declaration,e.typeParameters,e.thisParameter,e.parameters,void 0,void 0,e.minArgumentCount,167&e.flags);return t.target=e.target,t.mapper=e.mapper,t.compositeSignatures=e.compositeSignatures,t.compositeKind=e.compositeKind,t}function Md(e,t){const n=jd(e);return n.compositeSignatures=t,n.compositeKind=1048576,n.target=void 0,n.mapper=void 0,n}function Rd(e,t){if((24&e.flags)===t)return e;e.optionalCallSignatureCache||(e.optionalCallSignatureCache={});const n=8===t?"inner":"outer";return e.optionalCallSignatureCache[n]||(e.optionalCallSignatureCache[n]=function(e,t){gn.assert(8===t||16===t,"An optional call signature can either be for an inner call chain or an outer call chain, but not both.");const n=jd(e);return n.flags|=t,n}(e,t))}function Bd(e,t){if(bJ(e)){const r=e.parameters.length-1,i=e.parameters[r],o=j_(i);if(fw(o))return[n(o,r,i)];if(!t&&1048576&o.flags&&k(o.types,fw))return O(o.types,e=>n(e,r,i))}return[e.parameters];function n(t,n,r){const i=by(t),o=function(e,t){const n=O(e.target.labeledElementDeclarations,(n,r)=>sj(n,r,e.target.elementFlags[r],t));if(n){const e=[],t=new Set;for(let r=0;r{const a=o&&o[i]?o[i]:cj(e,n+i,t),s=t.target.elementFlags[i],c=Xo(1,a,12&s?32768:2&s?16384:0);return c.links.type=4&s?Hv(r):r,c});return Y(e.parameters.slice(0,n),a)}}function Jd(e,t,n,r,i){for(const o of e)if(qC(o,t,n,r,i,n?Mk:Lk))return o}function zd(e,t,n){if(t.typeParameters){if(n>0)return;for(let n=1;n1&&(n=void 0===n?r:-1);for(const n of e[r])if(!t||!Jd(t,n,!1,!1,!0)){const i=zd(e,n,r);if(i){let e=n;if(i.length>1){let t=n.thisParameter;const r=g(i,e=>e.thisParameter);if(r){t=Mw(r,Gb(U(i,e=>e.thisParameter&&j_(e.thisParameter))))}e=Md(n,i),e.thisParameter=t}(t||(t=[])).push(e)}}}if(!m(t)&&-1!==n){const r=e[void 0!==n?n:0];let i=r.slice();for(const t of e)if(t!==r){const e=t[0];if(gn.assert(!!e,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),i=e.typeParameters&&X(i,t=>!!t.typeParameters&&!Ud(e.typeParameters,t.typeParameters))?void 0:O(i,t=>Vd(t,e)),!i)break}t=i}return t||p}function Ud(e,t){if(m(e)!==m(t))return!1;if(!e||!t)return!0;const n=ZS(t,e);for(let r=0;r=i?e:t,a=o===e?t:e,s=o===e?r:i,c=yj(e)||yj(t),l=c&&!yj(o),_=new Array(s+(l?1:0));for(let u=0;u=hj(o)&&u>=hj(a),h=u>=r?void 0:cj(e,u),y=u>=i?void 0:cj(t,u),v=Xo(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${u}`,m?32768:g?16384:0);v.links.type=m?Hv(f):f,_[u]=v}if(l){const e=Xo(1,"args",32768);e.links.type=Hv(dj(a,s)),a===t&&(e.links.type=Ck(e.links.type,n)),_[s]=e}return _}(e,t,r),s=ke(a);s&&32768&ux(s)&&(i|=1);const c=function(e,t,n){return e&&t?Mw(e,Gb([j_(e),Ck(j_(t),n)])):e||t}(e.thisParameter,t.thisParameter,r),l=Id(o,n,c,a,void 0,void 0,Math.max(e.minArgumentCount,t.minArgumentCount),i);return l.compositeKind=1048576,l.compositeSignatures=Y(2097152!==e.compositeKind&&e.compositeSignatures||[e],[t]),r?l.mapper=2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures?_k(e.mapper,r):r:2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures&&(l.mapper=e.mapper),l}function Wd(e){const t=Gm(e[0]);if(t){const n=[];for(const r of t){const t=r.keyType;k(e,e=>!!ig(e,t))&&n.push(qh(t,zb(O(e,e=>_g(e,t))),X(e,e=>ig(e,t).isReadonly)))}return n}return p}function $d(e,t){return e?t?Gb([e,t]):e:t}function Kd(e){const t=F(e,e=>Cm(e,1).length>0),n=O(e,ou);if(t>0&&t===F(n,e=>e)){const e=n.indexOf(!0);n[e]=!1}return n}function Hd(e,t,n,r){const i=[];for(let o=0;o!qC(e,n,!1,!1,!1,Lk))||(e=le(e,n));return e}function Qd(e,t,n){if(e)for(let r=0;r{var n;418&t.flags||512&t.flags&&(null==(n=t.declarations)?void 0:n.length)&&k(t.declarations,mp)||e.set(t.escapedName,t)}),i=e}if($s(e,i,p,p,p),32&t.flags){const e=_u(vu(t));11272192&e.flags?(i=nd(function(e){const t=Vs(e),n=Jh(e);return n?Y(t,[n]):t}(i)),Zu(i,Qp(e))):e===wt&&(r=di)}const o=Jh(i);if(o?n=Zh(o,Be(i.values())):(r&&(n=le(n,r)),384&t.flags&&(32&Pu(t).flags||X(e.properties,e=>!!(296&j_(e).flags)))&&(n=le(n,ui))),$s(e,i,p,p,n||p),8208&t.flags&&(e.callSignatures=Vg(t)),32&t.flags){const n=vu(t);let r=t.members?Vg(t.members.get("__constructor")):p;16&t.flags&&(r=de(r.slice(),U(e.callSignatures,e=>ML(e.declaration)?Id(e.declaration,e.typeParameters,e.thisParameter,e.parameters,n,void 0,e.minArgumentCount,167&e.flags):void 0))),r.length||(r=function(e){const t=Cm(_u(e),1),n=kx(e.symbol),r=!!n&&Lv(n,64);if(0===t.length)return[Id(void 0,e.localTypeParameters,void 0,p,e,void 0,0,r?4:0)];const i=su(e),o=Mm(i),a=Ky(i),s=m(a),c=[];for(const n of t){const t=Ag(n.typeParameters),i=m(n.typeParameters);if(o||s>=t&&s<=i){const s=i?Ah(n,Mg(a,n.typeParameters,t,o)):jd(n);s.typeParameters=e.localTypeParameters,s.resolvedReturnType=e,s.flags=r?4|s.flags:-5&s.flags,c.push(s)}}return c}(n)),e.constructSignatures=r}}function np(e,t,n){return Ck(e,ZS([t.indexType,t.objectType],[CS(0),ob([n])]))}function ip(e){const t=ig(e.source,Ut),n=Dp(e.mappedType),r=!(1&n),i=4&n?0:16777216,o=t?[qh(Ut,hN(t.type,e.mappedType,e.constraintType)||Ot,r&&t.isReadonly)]:p,a=nd(),s=function(e){const t=dp(e.mappedType);if(!(1048576&t.flags||2097152&t.flags))return;const n=1048576&t.flags?t.origin:t;if(!(n&&2097152&n.flags))return;const r=Gb(n.types.filter(t=>t!==e.constraintType));return r!==cn?r:void 0}(e);for(const t of Qp(e.source)){if(s){if(!Jk(ix(t,8576),s))continue}const n=8192|(r&&Yj(t)?8:0),o=Xo(4|t.flags&i,t.escapedName,n);if(o.declarations=t.declarations,o.links.nameType=ca(t).nameType,o.links.propertyType=j_(t),8388608&e.constraintType.type.flags&&262144&e.constraintType.type.objectType.flags&&262144&e.constraintType.type.indexType.flags){const t=e.constraintType.type.objectType,n=np(e.mappedType,e.constraintType.type,t);o.links.mappedType=n,o.links.constraintType=cx(t)}else o.links.mappedType=e.mappedType,o.links.constraintType=e.constraintType;a.set(t.escapedName,o)}$s(e,a,p,p,o)}function ap(e){if(4194304&e.flags){const t=Pf(e.type);return mw(t)?Nb(t):cx(t)}if(16777216&e.flags){if(e.root.isDistributive){const t=e.checkType,n=ap(t);if(n!==t)return Tk(e,dk(e.root.checkType,n,e.mapper),!1)}return e}if(1048576&e.flags)return ME(e,ap,!0);if(2097152&e.flags){const t=e.types;return 2===t.length&&76&t[0].flags&&t[1]===Pn?e:Gb(j(e.types,ap))}return e}function sp(e){return 4096&ux(e)}function lp(e,t,n,r){for(const n of Qp(e))r(ix(n,t));if(1&e.flags)r(Ut);else for(const t of Gm(e))(!n||134217732&t.keyType.flags)&&r(t.keyType)}function _p(e){const t=nd();let n;$s(e,x,p,p,p);const r=up(e),i=dp(e),o=e.target||e,a=hp(o),s=2!==Ap(o),c=Sp(o),l=Pf(Np(e)),_=Dp(e);function u(i){pE(a?Ck(a,pk(e.mapper,r,i)):i,o=>function(i,o){if(mC(o)){const n=gC(o),r=t.get(n);if(r)r.links.nameType=zb([r.links.nameType,o]),r.links.keyType=zb([r.links.keyType,i]);else{const r=mC(i)?xm(l,gC(i)):void 0,a=!!(4&_||!(8&_)&&r&&16777216&r.flags),c=!!(1&_||!(2&_)&&r&&Yj(r)),u=V&&!a&&r&&16777216&r.flags,d=Xo(4|(a?16777216:0),n,262144|(r?sp(r):0)|(c?8:0)|(u?524288:0));d.links.mappedType=e,d.links.nameType=o,d.links.keyType=i,r&&(d.links.syntheticOrigin=r,d.declarations=s?r.declarations:void 0),t.set(n,d)}}else if(ey(o)||33&o.flags){const t=5&o.flags?Ut:40&o.flags?Vt:o,a=Ck(c,pk(e.mapper,r,i)),s=dg(l,o),u=qh(t,a,!!(1&_||!(2&_)&&(null==s?void 0:s.isReadonly)));n=Qd(n,u,!0)}}(i,o))}wp(e)?lp(l,8576,!1,u):pE(ap(i),u),$s(e,t,p,p,n||p)}function up(e){return e.typeParameter||(e.typeParameter=Eu(xs(e.declaration.typeParameter)))}function dp(e){return e.constraintType||(e.constraintType=uf(up(e))||Ft)}function hp(e){return e.declaration.nameType?e.nameType||(e.nameType=Ck(VS(e.declaration.nameType),e.mapper)):void 0}function Sp(e){return e.templateType||(e.templateType=e.declaration.type?Ck(Pl(VS(e.declaration.type),!0,!!(4&Dp(e))),e.mapper):Ft)}function Cp(e){return yl(e.declaration.typeParameter)}function wp(e){const t=Cp(e);return 199===t.kind&&143===t.operator}function Np(e){if(!e.modifiersType)if(wp(e))e.modifiersType=Ck(VS(Cp(e).type),e.mapper);else{const t=dp(Kx(e.declaration)),n=t&&262144&t.flags?uf(t):t;e.modifiersType=n&&4194304&n.flags?Ck(n.type,e.mapper):Ot}return e.modifiersType}function Dp(e){const t=e.declaration;return(t.readonlyToken?41===t.readonlyToken.kind?2:1:0)|(t.questionToken?41===t.questionToken.kind?8:4:0)}function Ep(e){const t=Dp(e);return 8&t?-1:4&t?1:0}function Fp(e){if(32&Tx(e))return Ep(e)||Fp(Np(e));if(2097152&e.flags){const t=Fp(e.types[0]);return k(e.types,(e,n)=>0===n||Fp(e)===t)?t:0}return 0}function Pp(e){if(32&Tx(e)){const t=dp(e);if(jx(t))return!0;const n=hp(e);if(n&&jx(Ck(n,ik(up(e),t))))return!0}return!1}function Ap(e){const t=hp(e);return t?Jk(t,up(e))?1:2:0}function Lp(e){return e.members||(524288&e.flags?4&e.objectFlags?function(e){const t=ad(e.target),n=Y(t.typeParameters,[t.thisType]),r=by(e);Ad(e,t,n,r.length===n.length?r:Y(r,[e]))}(e):3&e.objectFlags?function(e){Ad(e,ad(e),p,p)}(e):1024&e.objectFlags?ip(e):16&e.objectFlags?Yd(e):32&e.objectFlags?_p(e):gn.fail("Unhandled object type "+gn.formatObjectFlags(e.objectFlags)):1048576&e.flags?function(e){const t=qd(O(e.types,e=>e===Gn?[ci]:Cm(e,0))),n=qd(O(e.types,e=>Cm(e,1))),r=Wd(e.types);$s(e,x,t,n,r)}(e):2097152&e.flags?function(e){let t,n,r;const i=e.types,o=Kd(i),a=F(o,e=>e);for(let s=0;s0&&(e=O(e,e=>{const t=jd(e);return t.resolvedReturnType=Hd(ah(e),i,o,s),t})),n=Gd(n,e)}t=Gd(t,Cm(c,0)),r=Pe(Gm(c),(e,t)=>Qd(e,t,!1),r)}$s(e,x,t||p,n||p,r||p)}(e):gn.fail("Unhandled type "+gn.formatTypeFlags(e.flags))),e}function qp(e){return 524288&e.flags?Lp(e).properties:p}function Kp(e,t){if(524288&e.flags){const n=Lp(e).members.get(t);if(n&&Is(n))return n}}function Xp(e){if(!e.resolvedProperties){const t=nd();for(const n of e.types){for(const r of Qp(n))if(!t.has(r.escapedName)){const n=$f(e,r.escapedName,!!(2097152&e.flags));n&&t.set(r.escapedName,n)}if(1048576&e.flags&&0===Gm(n).length)break}e.resolvedProperties=Vs(t)}return e.resolvedProperties}function Qp(e){return 3145728&(e=Af(e)).flags?Xp(e):qp(e)}function ef(e){return 262144&e.flags?uf(e):8388608&e.flags?function(e){return kf(e)?function(e){if(Ff(e))return zx(e.objectType,e.indexType);const t=pf(e.indexType);if(t&&t!==e.indexType){const n=Vx(e.objectType,t,e.accessFlags);if(n)return n}const n=pf(e.objectType);if(n&&n!==e.objectType)return Vx(n,e.indexType,e.accessFlags);return}(e):void 0}(e):16777216&e.flags?bf(e):xf(e)}function uf(e){return kf(e)?ly(e):void 0}function df(e,t=0){var n;return t<5&&!(!e||!(262144&e.flags&&X(null==(n=e.symbol)?void 0:n.declarations,e=>Lv(e,4096))||3145728&e.flags&&X(e.types,e=>df(e,t))||8388608&e.flags&&df(e.objectType,t+1)||16777216&e.flags&&df(bf(e),t+1)||33554432&e.flags&&df(e.baseType,t)||32&Tx(e)&&function(e,t){const n=bk(e);return!!n&&df(n,t)}(e,t)||mw(e)&&w(Pb(e),(n,r)=>!!(8&e.target.elementFlags[r])&&df(n,t))>=0))}function pf(e){const t=Rx(e,!1);return t!==e?t:ef(e)}function ff(e){if(!e.resolvedDefaultConstraint){const t=function(e){return e.resolvedInferredTrueType||(e.resolvedInferredTrueType=e.combinedMapper?Ck(VS(e.root.node.trueType),e.combinedMapper):Yx(e))}(e),n=eS(e);e.resolvedDefaultConstraint=el(t)?n:el(n)?t:zb([t,n])}return e.resolvedDefaultConstraint}function mf(e){if(void 0!==e.resolvedConstraintOfDistributive)return e.resolvedConstraintOfDistributive||void 0;if(e.root.isDistributive&&e.restrictiveInstantiation!==e){const t=Rx(e.checkType,!1),n=t===e.checkType?ef(t):t;if(n&&n!==e.checkType){const t=Tk(e,dk(e.root.checkType,n,e.mapper),!0);if(!(131072&t.flags))return e.resolvedConstraintOfDistributive=t,t}}e.resolvedConstraintOfDistributive=!1}function yf(e){return mf(e)||ff(e)}function bf(e){return kf(e)?yf(e):void 0}function xf(e){if(464781312&e.flags||mw(e)){const t=Tf(e);return t!==jn&&t!==Mn?t:void 0}return 4194304&e.flags?hn:void 0}function Sf(e){return xf(e)||e}function kf(e){return Tf(e)!==Mn}function Tf(e){if(e.resolvedBaseConstraint)return e.resolvedBaseConstraint;const t=[];return e.resolvedBaseConstraint=n(e);function n(e){if(!e.immediateBaseConstraint){if(!Kc(e,4))return Mn;let n;const o=BC(e);if((t.length<10||t.length<50&&!D(t,o))&&(t.push(o),n=function(e){if(262144&e.flags){const t=ly(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){const t=e.types,n=[];let r=!1;for(const e of t){const t=i(e);t?(t!==e&&(r=!0),n.push(t)):r=!0}return r?1048576&e.flags&&n.length===t.length?zb(n):2097152&e.flags&&n.length?Gb(n):void 0:e}if(4194304&e.flags)return hn;if(134217728&e.flags){const t=e.types,n=U(t,i);return n.length===t.length?_x(e.texts,n):Ut}if(268435456&e.flags){const t=i(e.type);return t&&t!==e.type?hx(e.symbol,t):Ut}if(8388608&e.flags){if(Ff(e))return i(zx(e.objectType,e.indexType));const t=i(e.objectType),n=i(e.indexType),r=t&&n&&Vx(t,n,e.accessFlags);return r&&i(r)}if(16777216&e.flags){const t=yf(e);return t&&i(t)}if(33554432&e.flags)return i(Ly(e));if(mw(e)){return ob(O(Pb(e),(t,n)=>{const r=262144&t.flags&&8&e.target.elementFlags[n]&&i(t)||t;return r!==t&&CE(r,e=>HC(e)&&!mw(e))?r:t}),e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations)}return e}(Rx(e,!1)),t.pop()),!Xc()){if(262144&e.flags){const t=ny(e);if(t){const n=Jo(t,ha.Type_parameter_0_has_a_circular_constraint,mc(e));!r||mh(t,r)||mh(r,t)||fT(n,Wp(r,ha.Circularity_originates_in_type_at_this_location))}}n=Mn}e.immediateBaseConstraint??(e.immediateBaseConstraint=n||jn)}return e.immediateBaseConstraint}function i(e){const t=n(e);return t!==jn&&t!==Mn?t:void 0}}function Cf(e){if(e.default)e.default===Rn&&(e.default=Mn);else if(e.target){const t=Cf(e.target);e.default=t?Ck(t,e.mapper):jn}else{e.default=Rn;const t=e.symbol&&g(e.symbol.declarations,e=>PD(e)&&e.default),n=t?VS(t):jn;e.default===Rn&&(e.default=n)}return e.default}function wf(e){const t=Cf(e);return t!==jn&&t!==Mn?t:void 0}function Nf(e){return!(!e.symbol||!g(e.symbol.declarations,e=>PD(e)&&e.default))}function Df(e){return e.resolvedApparentType||(e.resolvedApparentType=function(e){const t=e.target??e,n=bk(t);if(n&&!t.declaration.nameType){const r=Np(e),i=Pp(r)?Df(r):xf(r);if(i&&CE(i,e=>HC(e)||Ef(e)))return Ck(t,dk(n,i,e.mapper))}return e}(e))}function Ef(e){return!!(2097152&e.flags)&&k(e.types,HC)}function Ff(e){let t;return!(!(8388608&e.flags&&32&Tx(t=e.objectType)&&!Pp(t)&&jx(e.indexType))||8&Dp(t)||t.declaration.nameType)}function Pf(e){const t=465829888&e.flags?xf(e)||Ot:e,n=Tx(t);return 32&n?Df(t):4&n&&t!==e?Pd(t,e):2097152&t.flags?function(e,t){if(e===t)return e.resolvedApparentType||(e.resolvedApparentType=Pd(e,t,!0));const n=`I${Ab(e)},${Ab(t)}`;return Ao(n)??Io(n,Pd(e,t,!0))}(t,e):402653316&t.flags?tr:296&t.flags?nr:2112&t.flags?Vr||(Vr=ev("BigInt",0,!1))||Nn:528&t.flags?rr:12288&t.flags?cv():67108864&t.flags?Nn:4194304&t.flags?hn:2&t.flags&&!V?Nn:t}function Af(e){return Qf(Pf(Qf(e)))}function Of(e,t,n){var r,i,o;let a,s,c,l=0;const _=1048576&e.flags;let u,d=4,p=_?0:8,f=!1;for(const r of e.types){const e=Pf(r);if(!(nl(e)||131072&e.flags)){const r=xm(e,t,n),i=r?dx(r):0;if(r){if(106500&r.flags&&(u??(u=_?0:16777216),_?u|=16777216&r.flags:u&=r.flags),a){if(r!==a){if((jJ(r)||r)===(jJ(a)||a)&&-1===zC(a,r,(e,t)=>e===t?-1:0))f=!!a.parent&&!!m(eu(a.parent));else{s||(s=new Map,s.set(fJ(a),a));const e=fJ(r);s.has(e)||s.set(e,r)}98304&l&&(98304&r.flags)!=(98304&l)&&(l=-98305&l|4)}}else a=r,l=98304&r.flags||4;_&&Yj(r)?p|=8:_||Yj(r)||(p&=-9),p|=(6&i?0:256)|(4&i?512:0)|(2&i?1024:0)|(256&i?2048:0),GI(r)||(d=2)}else if(_){const n=!fd(t)&&mg(e,t);n?(l=-98305&l|4,p|=32|(n.isReadonly?8:0),c=le(c,fw(e)?hw(e)||Lt:n.type)):!IN(e)||2097152&Tx(e)?p|=16:(p|=32,c=le(c,Lt))}}}if(!a||_&&(s||48&p)&&1536&p&&(!s||!function(e){let t;for(const n of e){if(!n.declarations)return;if(t){if(t.forEach(e=>{D(n.declarations,e)||t.delete(e)}),0===t.size)return}else t=new Set(n.declarations)}return t}(s.values())))return;if(!(s||16&p||c)){if(f){const t=null==(r=at(a,rd))?void 0:r.links,n=Mw(a,null==t?void 0:t.type);return n.parent=null==(o=null==(i=a.valueDeclaration)?void 0:i.symbol)?void 0:o.parent,n.links.containingType=e,n.links.mapper=null==t?void 0:t.mapper,n.links.writeType=L_(a),n}return a}const g=s?Be(s.values()):[a];let h,y,v;const b=[];let x,S,k=!1;for(const e of g){S?e.valueDeclaration&&e.valueDeclaration!==S&&(k=!0):S=e.valueDeclaration,h=de(h,e.declarations);const t=j_(e);y||(y=t,v=ca(e).nameType);const n=L_(e);(x||n!==t)&&(x=le(x||b.slice(),n)),t!==y&&(p|=64),(sw(t)||Ex(t))&&(p|=128),131072&t.flags&&t!==kn&&(p|=131072),b.push(t)}de(b,c);const T=Xo(l|(u??0),t,d|p);return T.links.containingType=e,!k&&S&&(T.valueDeclaration=S,S.symbol.parent&&(T.parent=S.symbol.parent)),T.declarations=h,T.links.nameType=v,b.length>2?(T.links.checkFlags|=65536,T.links.deferralParent=e,T.links.deferralConstituents=b,T.links.deferralWriteConstituents=x):(T.links.type=_?zb(b):Gb(b),x&&(T.links.writeType=_?zb(x):Gb(x))),T}function Wf(e,t,n){var r,i,o;let a=n?null==(r=e.propertyCacheWithoutObjectFunctionPropertyAugment)?void 0:r.get(t):null==(i=e.propertyCache)?void 0:i.get(t);if(!a&&(a=Of(e,t,n),a)){if((n?e.propertyCacheWithoutObjectFunctionPropertyAugment||(e.propertyCacheWithoutObjectFunctionPropertyAugment=nd()):e.propertyCache||(e.propertyCache=nd())).set(t,a),n&&!(48&ux(a))&&!(null==(o=e.propertyCache)?void 0:o.get(t))){(e.propertyCache||(e.propertyCache=nd())).set(t,a)}}return a}function $f(e,t,n){const r=Wf(e,t,n);return!r||16&ux(r)?void 0:r}function Qf(e){return 1048576&e.flags&&16777216&e.objectFlags?e.resolvedReducedType||(e.resolvedReducedType=function(e){const t=j(e.types,Qf);if(t===e.types)return e;const n=zb(t);1048576&n.flags&&(n.resolvedReducedType=n);return n}(e)):2097152&e.flags?(16777216&e.objectFlags||(e.objectFlags|=16777216|(X(Xp(e),Yf)?33554432:0)),33554432&e.objectFlags?cn:e):e}function Yf(e){return Zf(e)||em(e)}function Zf(e){return!(16777216&e.flags||192!=(131264&ux(e))||!(131072&j_(e).flags))}function em(e){return!e.valueDeclaration&&!!(1024&ux(e))}function nm(e){return!!(1048576&e.flags&&16777216&e.objectFlags&&X(e.types,nm)||2097152&e.flags&&function(e){const t=e.uniqueLiteralFilledInstantiation||(e.uniqueLiteralFilledInstantiation=Ck(e,Tn));return Qf(t)!==t}(e))}function bm(e,t){if(2097152&t.flags&&33554432&Tx(t)){const n=T(Xp(t),Zf);if(n)return sS(e,ha.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,mc(t,void 0,536870912),dc(n));const r=T(Xp(t),em);if(r)return sS(e,ha.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,mc(t,void 0,536870912),dc(r))}return e}function xm(e,t,n,r){var i,o;if(524288&(e=Af(e)).flags){const a=Lp(e),s=a.members.get(t);if(s&&!r&&512&(null==(i=e.symbol)?void 0:i.flags)&&(null==(o=ca(e.symbol).typeOnlyExportStarMap)?void 0:o.has(t)))return;if(s&&Is(s,r))return s;if(n)return;const c=a===Ln?Gn:a.callSignatures.length?Xn:a.constructSignatures.length?Qn:void 0;if(c){const e=Kp(c,t);if(e)return e}return Kp(Hn,t)}if(2097152&e.flags){const r=$f(e,t,!0);return r||(n?void 0:$f(e,t,n))}if(1048576&e.flags)return $f(e,t,n)}function Sm(e,t){if(3670016&e.flags){const n=Lp(e);return 0===t?n.callSignatures:n.constructSignatures}return p}function Cm(e,t){const n=Sm(Af(e),t);if(0===t&&!m(n)&&1048576&e.flags){if(e.arrayFallbackSignatures)return e.arrayFallbackSignatures;let r;if(CE(e,e=>{var t;return!!(null==(t=e.symbol)?void 0:t.parent)&&function(e){if(!e||!Zn.symbol||!er.symbol)return!1;return!!Fs(e,Zn.symbol)||!!Fs(e,er.symbol)}(e.symbol.parent)&&(r?r===e.symbol.escapedName:(r=e.symbol.escapedName,!0))})){const n=Hv(ME(e,e=>ek((Lm(e.symbol.parent)?er:Zn).typeParameters[0],e.mapper)),fE(e,e=>Lm(e.symbol.parent)));return e.arrayFallbackSignatures=Cm(Yc(n,r),t)}e.arrayFallbackSignatures=n}return n}function Lm(e){return!(!e||!er.symbol)&&!!Fs(e,er.symbol)}function Bm(e,t){return T(e,e=>e.keyType===t)}function Um(e,t){let n,r,i;for(const o of e)o.keyType===Ut?n=o:$m(t,o.keyType)&&(r?(i||(i=[r])).push(o):r=o);return i?qh(Ot,Gb(O(i,e=>e.type)),Pe(i,(e,t)=>e&&t.isReadonly,!0)):r||(n&&$m(t,Ut)?n:void 0)}function $m(e,t){return Jk(e,t)||t===Ut&&Jk(e,Vt)||t===Vt&&(e===bn||!!(128&e.flags)&&HT(e.value))}function Km(e){if(3670016&e.flags){return Lp(e).indexInfos}return p}function Gm(e){return Km(Af(e))}function ig(e,t){return Bm(Gm(e),t)}function _g(e,t){var n;return null==(n=ig(e,t))?void 0:n.type}function ug(e,t){return Gm(e).filter(e=>$m(t,e.keyType))}function dg(e,t){return Um(Gm(e),t)}function mg(e,t){return dg(e,fd(t)?nn:TS(Sc(t)))}function gg(e){var t;let n;for(const t of hl(e))n=fe(n,Eu(t.symbol));return(null==n?void 0:n.length)?n:vF(e)?null==(t=Jg(e))?void 0:t.typeParameters:void 0}function xg(e){const t=[];return e.forEach((e,n)=>{Us(n)||t.push(e)}),t}function kg(e,t){if(As(e))return;const n=ua(ye,'"'+e+'"',512);return n&&t?bs(n):n}function wg(e){return Ig(e)||eC(e)||AD(e)&&rC(e)}function Ng(e){if(wg(e))return!0;if(!AD(e))return!1;if(e.initializer){const t=Rg(e.parent),n=e.parent.parameters.indexOf(e);return gn.assert(n>=0),n>=hj(t,3)}const t=dm(e.parent);return!!t&&(!e.type&&!e.dotDotDotToken&&e.parent.parameters.indexOf(e)>=fL(t).length)}function Pg(e,t,n,r){return{kind:e,parameterName:t,parameterIndex:n,type:r}}function Ag(e){let t=0;if(e)for(let n=0;n=n&&o<=i){const n=e?e.slice():[];for(let e=o;e!!ll(e))&&!ll(e)&&!iI(e)&&(i|=32);for(let t=l?1:0;tc.arguments.length&&!u||(o=n.length)}if((178===e.kind||179===e.kind)&&hd(e)&&(!s||!r)){const t=178===e.kind?179:178,n=ed(xs(e),t);n&&(r=function(e){const t=Iq(e);return t&&t.symbol}(n))}a&&a.typeExpression&&(r=Mw(Xo(1,"this"),VS(a.typeExpression)));const _=IP(e)?Xg(e):e,u=_&&BD(_)?vu(bs(_.parent.symbol)):void 0,d=u?u.localTypeParameters:gg(e);(Wu(e)||Mm(e)&&function(e,t){if(IP(e)||!Ug(e))return!1;const n=ke(e.parameters),r=n?Mc(n):dl(e).filter(KP),i=y(r,e=>e.typeExpression&&EP(e.typeExpression.type)?e.typeExpression.type:void 0),o=Xo(3,"args",32768);i?o.links.type=Hv(VS(i.type)):(o.links.checkFlags|=65536,o.links.deferralParent=cn,o.links.deferralConstituents=[cr],o.links.deferralWriteConstituents=[cr]);i&&t.pop();return t.push(o),!0}(e,n))&&(i|=1),(HD(e)&&Lv(e,64)||BD(e)&&Lv(e.parent,64))&&(i|=4),t.resolvedSignature=Id(e,d,r,n,void 0,void 0,o,i)}return t.resolvedSignature}function Jg(e){if(!Mm(e)||!d_(e))return;const t=cl(e);return(null==t?void 0:t.typeExpression)&&eL(VS(t.typeExpression))}function Ug(e){const t=la(e);return void 0===t.containsArgumentsReference&&(512&t.flags?t.containsArgumentsReference=!0:t.containsArgumentsReference=function e(t){if(!t)return!1;switch(t.kind){case 80:return t.escapedText===Ie.escapedName&&cq(t)===Ie;case 173:case 175:case 178:case 179:return 168===t.name.kind&&e(t.name);case 212:case 213:return e(t.expression);case 304:return e(t.initializer);default:return!ay(t)&&!If(t)&&!!sO(t,e)}}(e.body)),t.containsArgumentsReference}function Vg(e){if(!e||!e.declarations)return p;const t=[];for(let n=0;n0&&r.body){const t=e.declarations[n-1];if(r.parent===t.parent&&r.kind===t.kind&&r.pos===t.end)continue}if(Mm(r)&&r.jsDoc){const e=Hg(r);if(m(e)){for(const n of e){const e=n.typeExpression;void 0!==e.type||BD(r)||Qw(e,wt),t.push(Rg(e))}continue}}t.push(!$T(r)&&!Kf(r)&&Jg(r)||Rg(r))}}return t}function Wg(e){const t=rs(e,e);if(t){const e=cs(t);if(e)return j_(e)}return wt}function eh(e){if(e.thisParameter)return j_(e.thisParameter)}function th(e){if(!e.resolvedTypePredicate){if(e.target){const t=th(e.target);e.resolvedTypePredicate=t?mk(t,e.mapper):ai}else if(e.compositeSignatures)e.resolvedTypePredicate=function(e,t){let n;const r=[];for(const i of e){const e=th(i);if(e){if(0!==e.kind&&1!==e.kind||n&&!Ub(n,e))return;n=e,r.push(e.type)}else{const e=2097152!==t?ah(i):void 0;if(e!==$t&&e!==Ht)return}}if(!n)return;const i=nh(r,t);return Pg(n.kind,n.parameterName,n.parameterIndex,i)}(e.compositeSignatures,e.compositeKind)||ai;else{const t=e.declaration&&kv(e.declaration);let n;if(!t){const t=Jg(e.declaration);t&&e!==t&&(n=th(t))}if(t||n)e.resolvedTypePredicate=t&&WD(t)?function(e,t){const n=e.parameterName,r=e.type&&VS(e.type);return 198===n.kind?Pg(e.assertsModifier?2:0,void 0,void 0,r):Pg(e.assertsModifier?3:1,n.escapedText,w(t.parameters,e=>e.escapedName===n.escapedText),r)}(t,e):n||ai;else if(e.declaration&&d_(e.declaration)&&(!e.resolvedReturnType||16&e.resolvedReturnType.flags)&&gj(e)>0){const{declaration:t}=e;e.resolvedTypePredicate=ai,e.resolvedTypePredicate=function(e){switch(e.kind){case 177:case 178:case 179:return}if(0!==zh(e))return;let t;if(e.body&&242!==e.body.kind)t=e.body;else{if(Lf(e.body,e=>{if(t||!e.expression)return!0;t=e.expression})||!t||$j(e))return}return function(e,t){t=ph(t,!0);return 16&kM(t).flags?g(e.parameters,(n,r)=>{const i=j_(n.symbol);if(!i||16&i.flags||!fD(n.name)||LF(n.symbol)||$u(n))return;const o=function(e,t,n,r){const i=zg(t)&&t.flowNode||254===t.parent.kind&&t.parent.flowNode||sB(2,void 0,void 0),o=sB(32,t,i),a=AF(n.name,r,r,e,o);if(a===r)return;const s=sB(64,t,i),c=Qf(AF(n.name,r,a,e,s));return 131072&c.flags?a:void 0}(e,t,n,i);return o?Pg(1,Sc(n.name.escapedText),r,o):void 0}):void 0}(e,t)}(t)||ai}else e.resolvedTypePredicate=ai}gn.assert(!!e.resolvedTypePredicate)}return e.resolvedTypePredicate===ai?void 0:e.resolvedTypePredicate}function nh(e,t,n){return 2097152!==t?zb(e,n):Gb(e)}function ah(e){if(!e.resolvedReturnType){if(!Kc(e,3))return Ft;let t=e.target?Ck(ah(e.target),e.mapper):e.compositeSignatures?Ck(nh(O(e.compositeSignatures,ah),e.compositeKind,2),e.mapper):ch(e.declaration)||(Od(e.declaration.body)?wt:zj(e.declaration));if(8&e.flags?t=Dw(t):16&e.flags&&(t=ww(t)),!Xc()){if(e.declaration){const t=kv(e.declaration);if(t)Jo(t,ha.Return_type_annotation_circularly_references_itself);else if(Z){const t=e.declaration,n=Ac(t);n?Jo(n,ha._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Bp(n)):Jo(t,ha.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}t=wt}e.resolvedReturnType??(e.resolvedReturnType=t)}return e.resolvedReturnType}function ch(e){if(177===e.kind)return vu(bs(e.parent.symbol));const t=kv(e);if(IP(e)){const n=Yg(e);if(n&&BD(n.parent)&&!t)return vu(bs(n.parent.parent.symbol))}if(Og(e))return VS(e.parameters[0].type);if(t)return VS(t);if(178===e.kind&&hd(e)){const t=Mm(e)&&Dl(e);if(t)return t;const n=S_(ed(xs(e),179));if(n)return n}return function(e){const t=Jg(e);return t&&ah(t)}(e)}function hh(e){return e.compositeSignatures&&X(e.compositeSignatures,hh)||!e.resolvedReturnType&&Hc(e,3)>=0}function vh(e){if(bJ(e)){const t=j_(e.parameters[e.parameters.length-1]),n=fw(t)?hw(t):t;return n&&_g(n,Vt)}}function Dh(e,t,n,r){const i=Fh(e,Mg(t,e.typeParameters,Ag(e.typeParameters),n));if(r){const e=tL(ah(i));if(e){const t=jd(e);t.typeParameters=r;const n=Rh(t);n.mapper=i.mapper;const o=jd(i);return o.resolvedReturnType=n,o}}return i}function Fh(e,t){const n=e.instantiations||(e.instantiations=new Map),r=uy(t);let i=n.get(r);return i||n.set(r,i=Ah(e,t)),i}function Ah(e,t){return gk(e,function(e,t){return ZS(Ih(e),t)}(e,t),!0)}function Ih(e){return j(e.typeParameters,e=>e.mapper?Ck(e,e.mapper):e)}function Oh(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return gk(e,lk(e.typeParameters),!0)}(e)):e}function Lh(e){return e.typeParameters?e.canonicalSignatureCache||(e.canonicalSignatureCache=function(e){return Dh(e,O(e.typeParameters,e=>e.target&&!uf(e.target)?e.target:e),Mm(e.declaration))}(e)):e}function jh(e){const t=e.typeParameters;if(t){if(e.baseSignatureCache)return e.baseSignatureCache;const n=lk(t),r=ZS(t,O(t,e=>uf(e)||Ot));let i=O(t,e=>Ck(e,r)||Ot);for(let e=0;e{ey(e)&&!Bm(n,e)&&n.push(qh(e,t.type?VS(t.type):wt,Ov(t,8),t))})}}else if(gd(t)){const e=LE(t)?t.left:t.name,_=xE(e)?kM(e.argumentExpression):uI(e);if(Bm(n,_))continue;Jk(_,hn)&&(Jk(_,Vt)?(r=!0,qv(t)||(i=!1)):Jk(_,nn)?(o=!0,qv(t)||(a=!1)):(s=!0,qv(t)||(c=!1)),l.push(t.symbol))}const _=Y(l,P(t,t=>t!==e));return s&&!Bm(n,Ut)&&n.push(mI(c,0,_,Ut)),r&&!Bm(n,Vt)&&n.push(mI(i,0,_,Vt)),o&&!Bm(n,nn)&&n.push(mI(a,0,_,nn)),n}return p}function ey(e){return!!(4108&e.flags)||Ex(e)||!!(2097152&e.flags)&&!Ix(e)&&X(e.types,ey)}function ny(e){return U(P(e.symbol&&e.symbol.declarations,PD),yl)[0]}function cy(e,t){var n;let r;if(null==(n=e.symbol)?void 0:n.declarations)for(const n of e.symbol.declarations)if(196===n.parent.kind){const[i=n.parent,o]=uh(n.parent.parent);if(184!==o.kind||t){if(170===o.kind&&o.dotDotDotToken||192===o.kind||203===o.kind&&o.dotDotDotToken)r=le(r,Hv(Ot));else if(205===o.kind)r=le(r,Ut);else if(169===o.kind&&201===o.parent.kind)r=le(r,hn);else if(201===o.kind&&o.type&&ph(o.type)===n.parent&&195===o.parent.kind&&o.parent.extendsType===o&&201===o.parent.checkType.kind&&o.parent.checkType.type){const e=o.parent.checkType;r=le(r,Ck(VS(e.type),ik(Eu(xs(e.typeParameter)),e.typeParameter.constraint?VS(e.typeParameter.constraint):hn)))}}else{const t=o,n=sR(t);if(n){const o=t.typeArguments.indexOf(i);if(o()=>iR(t,n,r))));o!==e&&(r=le(r,o))}}}}}return r&&Gb(r)}function ly(e){if(!e.constraint)if(e.target){const t=uf(e.target);e.constraint=t?Ck(t,e.mapper):jn}else{const t=ny(e);if(t){let n=VS(t);1&n.flags&&!nl(n)&&(n=201===t.parent.parent.kind?hn:Ot),e.constraint=n}else e.constraint=cy(e)||jn}return e.constraint===jn?void 0:e.constraint}function _y(e){const t=ed(e.symbol,169),n=QP(t.parent)?Kg(t.parent):t.parent;return n&&Ts(n)}function uy(e){let t="";if(e){const n=e.length;let r=0;for(;r1&&(t+=":"+o),r+=o}}return t}function dy(e,t){return e?`@${fJ(e)}`+(t?`:${uy(t)}`:""):""}function py(e,t){let n=0;for(const r of e)void 0!==t&&r.flags&t||(n|=Tx(r));return 458752&n}function fy(e,t){return X(t)&&e===On?Ot:my(e,t)}function my(e,t){const n=uy(t);let r=e.instantiations.get(n);return r||(r=zs(4,e.symbol),e.instantiations.set(n,r),r.objectFlags|=t?py(t):0,r.target=e,r.resolvedTypeArguments=t),r}function yy(e){const t=Ls(e.flags,e.symbol);return t.objectFlags=e.objectFlags,t.target=e.target,t.resolvedTypeArguments=e.resolvedTypeArguments,t}function vy(e,t,n,r,i){if(!r){const e=pS(r=dS(t));i=n?GS(e,n):e}const o=zs(4,e.symbol);return o.target=e,o.node=t,o.mapper=n,o.aliasSymbol=r,o.aliasTypeArguments=i,o}function by(e){var t,n;if(!e.resolvedTypeArguments){if(!Kc(e,5))return Y(e.target.outerTypeParameters,null==(t=e.target.localTypeParameters)?void 0:t.map(()=>Ft))||p;const i=e.node,o=i?184===i.kind?Y(e.target.outerTypeParameters,oR(i,e.target.localTypeParameters)):189===i.kind?[VS(i.elementType)]:O(i.elements,VS):p;Xc()?e.resolvedTypeArguments??(e.resolvedTypeArguments=e.mapper?GS(o,e.mapper):o):(e.resolvedTypeArguments??(e.resolvedTypeArguments=Y(e.target.outerTypeParameters,(null==(n=e.target.localTypeParameters)?void 0:n.map(()=>Ft))||p)),Jo(e.node||r,e.target.symbol?ha.Type_arguments_for_0_circularly_reference_themselves:ha.Tuple_type_arguments_circularly_reference_themselves,e.target.symbol&&dc(e.target.symbol)))}return e.resolvedTypeArguments}function xy(e){return m(e.target.typeParameters)}function Sy(e,t){const n=Pu(bs(t)),r=n.localTypeParameters;if(r){const t=m(e.typeArguments),i=Ag(r),o=Mm(e);if(!(!Z&&o)&&(tr.length)){const t=o&&qE(e)&&!OP(e.parent);if(Jo(e,i===r.length?t?ha.Expected_0_type_arguments_provide_these_with_an_extends_tag:ha.Generic_type_0_requires_1_type_argument_s:t?ha.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:ha.Generic_type_0_requires_between_1_and_2_type_arguments,mc(n,void 0,2),i,r.length),!o)return Ft}if(184===e.kind&&Zv(e,m(e.typeArguments)!==r.length))return vy(n,e,void 0);return my(n,Y(n.outerTypeParameters,Mg(Ky(e),r,i,o)))}return Uy(e,t)?n:Ft}function ky(e,t,n,r){const i=Pu(e);if(i===It){const n=_J.get(e.escapedName);if(void 0!==n&&t&&1===t.length)return 4===n?Fy(t[0]):hx(e,t[0])}const o=ca(e),a=o.typeParameters,s=uy(t)+dy(n,r);let c=o.instantiations.get(s);return c||o.instantiations.set(s,c=wk(i,ZS(a,Mg(t,a,Ag(a),Mm(e.valueDeclaration))),n,r)),c}function Ty(e){var t;const n=null==(t=e.declarations)?void 0:t.find(jg);return!(!n||!tm(n))}function Cy(e){return e.parent?`${Cy(e.parent)}.${e.escapedName}`:e.escapedName}function wy(e){const t=(167===e.kind?e.right:212===e.kind?e.name:e).escapedText;if(t){const n=167===e.kind?wy(e.left):212===e.kind?wy(e.expression):void 0,r=n?`${Cy(n)}.${t}`:t;let i=St.get(r);return i||(St.set(r,i=Xo(524288,t,1048576)),i.parent=n,i.links.declaredType=Pt),i}return vt}function Ny(e,t,n){const r=function(e){switch(e.kind){case 184:return e.typeName;case 234:const t=e.expression;if(fb(t))return t}}(e);if(!r)return vt;const i=ts(r,t,n);return i&&i!==vt?i:n?vt:wy(r)}function Ey(e,t){if(t===vt)return Ft;if(96&(t=function(e){const t=e.valueDeclaration;if(!t||!Mm(t)||524288&e.flags||eg(t,!1))return;const n=hF(t)?Ym(t):Zm(t);if(n){const t=Ts(n);if(t)return RL(t,e)}}(t)||t).flags)return Sy(e,t);if(524288&t.flags)return function(e,t){if(1048576&ux(t)){const n=Ky(e),r=dy(t,n);let i=kt.get(r);return i||(i=Js(1,"error",void 0,`alias ${r}`),i.aliasSymbol=t,i.aliasTypeArguments=n,kt.set(r,i)),i}const n=Pu(t),r=ca(t).typeParameters;if(r){const n=m(e.typeArguments),i=Ag(r);if(nr.length)return Jo(e,i===r.length?ha.Generic_type_0_requires_1_type_argument_s:ha.Generic_type_0_requires_between_1_and_2_type_arguments,dc(t),i,r.length),Ft;const o=dS(e);let a,s=!o||!Ty(t)&&Ty(o)?void 0:o;if(s)a=pS(s);else if(Ju(e)){const t=Ny(e,2097152,!0);if(t&&t!==vt){const n=$a(t);n&&524288&n.flags&&(s=n,a=Ky(e)||(r?[]:void 0))}}return ky(t,Ky(e),s,a)}return Uy(e,t)?n:Ft}(e,t);const n=Au(t);if(n)return Uy(e,t)?SS(n):Ft;if(111551&t.flags&&Jy(e)){const n=function(e,t){const n=la(e);if(!n.resolvedJSDocType){const r=j_(t);let i=r;if(t.valueDeclaration){const n=206===e.kind&&e.qualifier;r.symbol&&r.symbol!==t&&n&&(i=Ey(e,r.symbol))}n.resolvedJSDocType=i}return n.resolvedJSDocType}(e,t);return n||(Ny(e,788968),j_(t))}return Ft}function Fy(e){return Py(e)?Oy(e,Ot):e}function Py(e){return!!(3145728&e.flags&&X(e.types,Py)||33554432&e.flags&&!Ay(e)&&Py(e.baseType)||524288&e.flags&&!cT(e)||432275456&e.flags&&!Ex(e))}function Ay(e){return!!(33554432&e.flags&&2&e.constraint.flags)}function Iy(e,t){return 3&t.flags||t===e||1&e.flags?e:Oy(e,t)}function Oy(e,t){const n=`${Ab(e)}>${Ab(t)}`,r=dt.get(n);if(r)return r;const i=Os(33554432);return i.baseType=e,i.constraint=t,dt.set(n,i),i}function Ly(e){return Ay(e)?e.baseType:Gb([e.constraint,e.baseType])}function Ry(e){return 190===e.kind&&1===e.elements.length}function By(e,t,n){return Ry(t)&&Ry(n)?By(e,t.elements[0],n.elements[0]):Hx(VS(t))===Hx(e)?VS(n):void 0}function Jy(e){return!!(16777216&e.flags)&&(184===e.kind||206===e.kind)}function Uy(e,t){return!e.typeArguments||(Jo(e,ha.Type_0_is_not_generic,t?dc(t):e.typeName?Bp(e.typeName):eJ),!1)}function Wy(e){if(fD(e.typeName)){const t=e.typeArguments;switch(e.typeName.escapedText){case"String":return Uy(e),Ut;case"Number":return Uy(e),Vt;case"BigInt":return Uy(e),Wt;case"Boolean":return Uy(e),Yt;case"Void":return Uy(e),rn;case"Undefined":return Uy(e),Lt;case"Null":return Uy(e),zt;case"Function":case"function":return Uy(e),Gn;case"array":return t&&t.length||Z?void 0:cr;case"promise":return t&&t.length||Z?void 0:Rj(wt);case"Object":if(t&&2===t.length){if(zm(e)){const e=VS(t[0]),n=VS(t[1]),r=e===Ut||e===Vt?[qh(e,n,!1)]:p;return Ks(void 0,x,p,p,r)}return wt}return Uy(e),Z?void 0:wt}}}function $y(e){const t=la(e);if(!t.resolvedType){if(El(e)&&Y_(e.parent))return t.resolvedSymbol=vt,t.resolvedType=kM(e.parent.expression);let n,r;const i=788968;Jy(e)&&(r=Wy(e),r||(n=Ny(e,i,!0),n===vt?n=Ny(e,111551|i):Ny(e,i),r=Ey(e,n))),r||(n=Ny(e,i),r=Ey(e,n)),t.resolvedSymbol=n,t.resolvedType=r}return t.resolvedType}function Ky(e){return O(e.typeArguments,VS)}function Hy(e){const t=la(e);if(!t.resolvedType){const n=ZL(e);t.resolvedType=SS(Hw(n))}return t.resolvedType}function Gy(e,t){function n(e){const t=e.declarations;if(t)for(const e of t)switch(e.kind){case 264:case 265:case 267:return e}}if(!e)return t?On:Nn;const r=Pu(e);return 524288&r.flags?m(r.typeParameters)!==t?(Jo(n(e),ha.Global_type_0_must_have_1_type_parameter_s,Cc(e),t),t?On:Nn):r:(Jo(n(e),ha.Global_type_0_must_be_a_class_or_interface_type,Cc(e)),t?On:Nn)}function Xy(e,t){return Zy(e,111551,t?ha.Cannot_find_global_value_0:void 0)}function Qy(e,t){return Zy(e,788968,t?ha.Cannot_find_global_type_0:void 0)}function Yy(e,t,n){const r=Zy(e,788968,n?ha.Cannot_find_global_type_0:void 0);if(r&&(Pu(r),m(ca(r).typeParameters)!==t)){return void Jo(r.declarations&&T(r.declarations,SF),ha.Global_type_0_must_have_1_type_parameter_s,Cc(r),t)}return r}function Zy(e,t,n){return ze(void 0,e,t,n,!1,!1)}function ev(e,t,n){const r=Qy(e,n);return r||n?Gy(r,t):void 0}function tv(e,t){let n;for(const r of e)n=le(n,ev(r,t,!1));return n??p}function nv(){return Lr||(Lr=ev("ImportMeta",0,!0)||Nn)}function iv(){if(!jr){const e=Xo(0,"ImportMetaExpression"),t=nv(),n=Xo(4,"meta",8);n.parent=e,n.links.type=t;const r=nd([n]);e.members=r,jr=Ks(e,r,p,p,p)}return jr}function ov(e){return Mr||(Mr=ev("ImportCallOptions",0,e))||Nn}function av(e){return Rr||(Rr=ev("ImportAttributes",0,e))||Nn}function sv(e){return dr||(dr=Xy("Symbol",e))}function cv(){return fr||(fr=ev("Symbol",0,!1))||Nn}function lv(e){return gr||(gr=ev("Promise",1,e))||On}function _v(e){return hr||(hr=ev("PromiseLike",1,e))||On}function pv(e){return yr||(yr=Xy("Promise",e))}function vv(e){return Nr||(Nr=ev("AsyncIterable",3,e))||On}function bv(e){return Er||(Er=ev("AsyncIterableIterator",3,e))||On}function Sv(e){return br||(br=ev("Iterable",3,e))||On}function wv(e){return Sr||(Sr=ev("IterableIterator",3,e))||On}function Nv(){return Q?Lt:wt}function Dv(e){return Br||(Br=ev("Disposable",0,e))||Nn}function Ev(e,t=0){const n=Zy(e,788968,void 0);return n&&Gy(n,t)}function Fv(e){return Ur||(Ur=Yy("Awaited",1,e)||(e?vt:void 0)),Ur===vt?void 0:Ur}function Pv(e,t){return e!==On?my(e,t):Nn}function Wv(e){return Pv(mr||(mr=ev("TypedPropertyDescriptor",1,!0)||On),[e])}function $v(e){return Pv(Sv(!0),[e,rn,Lt])}function Hv(e,t){return Pv(t?er:Zn,[e])}function Gv(e){switch(e.kind){case 191:return 2;case 192:return Xv(e);case 203:return e.questionToken?2:e.dotDotDotToken?Xv(e):1;default:return 1}}function Xv(e){return JS(e.type)?4:8}function Qv(e){const t=function(e){return cE(e)&&148===e.operator}(e.parent);if(JS(e))return t?er:Zn;return lb(O(e.elements,Gv),t,O(e.elements,Yv))}function Yv(e){return ZD(e)||AD(e)?e:void 0}function Zv(e,t){return!!dS(e)||rb(e)&&(189===e.kind?ib(e.elementType):190===e.kind?X(e.elements,ib):t||X(e.typeArguments,ib))}function rb(e){const t=e.parent;switch(t.kind){case 197:case 203:case 184:case 193:case 194:case 200:case 195:case 199:case 189:case 190:return rb(t);case 266:return!0}return!1}function ib(e){switch(e.kind){case 184:return Jy(e)||!!(524288&Ny(e,788968).flags);case 187:return!0;case 199:return 158!==e.operator&&ib(e.type);case 197:case 191:case 203:case 317:case 315:case 316:case 310:return ib(e.type);case 192:return 189!==e.type.kind||ib(e.type.elementType);case 193:case 194:return X(e.types,ib);case 200:return ib(e.objectType)||ib(e.indexType);case 195:return ib(e.checkType)||ib(e.extendsType)||ib(e.trueType)||ib(e.falseType)}return!1}function ob(e,t,n=!1,r=[]){const i=lb(t||O(e,e=>1),n,r);return i===On?Nn:e.length?db(i,e):i}function lb(e,t,n){if(1===e.length&&4&e[0])return t?er:Zn;const r=O(e,e=>1&e?"#":2&e?"?":4&e?".":"*").join()+(t?"R":"")+(X(n,e=>!!e)?","+O(n,e=>e?pJ(e):"_").join(","):"");let i=Ge.get(r);return i||Ge.set(r,i=function(e,t,n){const r=e.length,i=F(e,e=>!!(9&e));let o;const a=[];let s=0;if(r){o=new Array(r);for(let i=0;i!!(8&e.elementFlags[n]&&1179648&t.flags));if(n>=0)return Qb(O(t,(t,n)=>8&e.elementFlags[n]?t:Ot))?ME(t[n],r=>Cb(e,De(t,n,r))):Ft}const s=[],c=[],l=[];let _=-1,u=-1,d=-1;for(let c=0;c=1e4)return Jo(r,If(r)?ha.Type_produces_a_tuple_type_that_is_too_large_to_represent:ha.Expression_produces_a_tuple_type_that_is_too_large_to_represent),Ft;g(e,(e,t)=>{var n;return f(e,l.target.elementFlags[t],null==(n=l.target.labeledElementDeclarations)?void 0:n[t])})}else f(QC(l)&&_g(l,Vt)||Ft,4,null==(o=e.labeledElementDeclarations)?void 0:o[c]);else f(l,_,null==(a=e.labeledElementDeclarations)?void 0:a[c])}for(let e=0;e<_;e++)2&c[e]&&(c[e]=1);u>=0&&u8&c[u+t]?qx(e,Vt):e)),s.splice(u+1,d-u),c.splice(u+1,d-u),l.splice(u+1,d-u));const p=lb(c,e.readonly,l);return p===On?Nn:c.length?my(p,s):p;function f(e,t,n){1&t&&(_=c.length),4&t&&u<0&&(u=c.length),6&t&&(d=c.length),s.push(2&t?Pl(e,!0):e),c.push(t),l.push(n)}}function wb(e,t,n=0){const r=e.target,i=xy(e)-n;return t>r.fixedLength?function(e){const t=hw(e);return t&&Hv(t)}(e)||ob(p):ob(by(e).slice(t,i),r.elementFlags.slice(t,i),!1,r.labeledElementDeclarations&&r.labeledElementDeclarations.slice(t,i))}function Nb(e){return zb(le(Re(e.target.fixedLength,e=>TS(""+e)),cx(e.target.readonly?er:Zn)))}function Eb(e,t){return e.elementFlags.length-N(e.elementFlags,e=>!(e&t))-1}function Fb(e){return e.fixedLength+Eb(e,3)}function Pb(e){const t=by(e),n=xy(e);return t.length===n?t:t.slice(0,n)}function Ab(e){return e.id}function Ib(e,t){return Ee(e,t,Ab,Tt)>=0}function Ob(e,t){const n=Ee(e,t,Ab,Tt);return n<0&&(e.splice(~n,0,t),!0)}function Lb(e,t,n){const r=n.flags;if(!(131072&r))if(t|=473694207&r,465829888&r&&(t|=33554432),2097152&r&&67108864&Tx(n)&&(t|=536870912),n===Dt&&(t|=8388608),nl(n)&&(t|=1073741824),!V&&98304&r)65536&Tx(n)||(t|=4194304);else{const t=e.length,r=t&&n.id>e[t-1].id?~t:Ee(e,n,Ab,Tt);r<0&&e.splice(~r,0,n)}return t}function jb(e,t,n){let r;for(const i of n)i!==r&&(t=1048576&i.flags?jb(e,t|(Rb(i)?1048576:0),i.types):Lb(e,t,i),r=i);return t}function Mb(e,t){return 134217728&t.flags?DN(e,t):CN(e,t)}function Rb(e){return!!(1048576&e.flags&&(e.aliasSymbol||e.origin))}function Bb(e,t){for(const n of t)if(1048576&n.flags){const t=n.origin;n.aliasSymbol||t&&!(1048576&t.flags)?pe(e,n):t&&1048576&t.flags&&Bb(e,t.types)}}function Jb(e,t){const n=Ms(e);return n.types=t,n}function zb(e,t=1,n,r,i){if(0===e.length)return cn;if(1===e.length)return e[0];if(2===e.length&&!i&&(1048576&e[0].flags||1048576&e[1].flags)){const i=0===t?"N":2===t?"S":"L",o=e[0].id=2&&a[0]===Lt&&a[1]===Mt&&Kt(a,1),(402664352&s||16384&s&&32768&s)&&function(e,t,n){let r=e.length;for(;r>0;){r--;const i=e[r],o=i.flags;(402653312&o&&4&t||256&o&&8&t||2048&o&&64&t||8192&o&&4096&t||n&&32768&o&&16384&t||kS(i)&&Ib(e,i.regularType))&&Kt(e,r)}}(a,s,!!(2&t)),128&s&&402653184&s&&function(e){const t=P(e,Ex);if(t.length){let n=e.length;for(;n>0;){n--;const r=e[n];128&r.flags&&X(t,e=>Mb(r,e))&&Kt(e,n)}}}(a),536870912&s&&function(e){const t=[];for(const n of e)if(2097152&n.flags&&67108864&Tx(n)){const e=8650752&n.types[0].flags?0:1;pe(t,n.types[e])}for(const n of t){const t=[];for(const r of e)if(2097152&r.flags&&67108864&Tx(r)){const e=8650752&r.types[0].flags?0:1;r.types[e]===n&&Ob(t,r.types[1-e])}if(CE(xf(n),e=>Ib(t,e))){let r=e.length;for(;r>0;){r--;const i=e[r];if(2097152&i.flags&&67108864&Tx(i)){const o=8650752&i.types[0].flags?0:1;i.types[o]===n&&Ib(t,i.types[1-o])&&Kt(e,r)}}Ob(e,n)}}}(a),2===t&&(a=function(e,t){var n;if(e.length<2)return e;const i=uy(e),o=pt.get(i);if(o)return o;const a=t&&X(e,e=>!!(524288&e.flags)&&!Pp(e)&&oT(Lp(e))),s=e.length;let c=s,l=0;for(;c>0;){c--;const t=e[c];if(a||469499904&t.flags){if(262144&t.flags&&1048576&Sf(t).flags){bT(t,zb(O(e,e=>e===t?cn:e)),xo)&&Kt(e,c);continue}const i=61603840&t.flags?T(Qp(t),e=>ow(j_(e))):void 0,o=i&&SS(j_(i));for(const a of e)if(t!==a){if(1e5===l&&l/(s-c)*s>1e6)return null==(n=Yn)||n.instant(Yn.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:e.map(e=>e.id)}),void Jo(r,ha.Expression_produces_a_union_type_that_is_too_complex_to_represent);if(l++,i&&61603840&a.flags){const e=Yc(a,i.escapedName);if(e&&ow(e)&&SS(e)!==o)continue}if(bT(t,a,xo)&&(!(1&Tx($_(t)))||!(1&Tx($_(a)))||zk(t,a))){Kt(e,c);break}}}}return pt.set(i,e),e}(a,!!(524288&s)),!a))return Ft;if(0===a.length)return 65536&s?4194304&s?zt:qt:32768&s?4194304&s?Lt:jt:cn}if(!o&&1048576&s){const t=[];Bb(t,e);const r=[];for(const e of a)X(t,t=>Ib(t.types,e))||r.push(e);if(!n&&1===t.length&&0===r.length)return t[0];if(Pe(t,(e,t)=>e+t.types.length,0)+r.length===a.length){for(const e of t)Ob(r,e);o=Jb(1048576,r)}}return Vb(a,(36323331&s?0:32768)|(2097152&s?16777216:0),n,i,o)}function Ub(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function Vb(e,t,n,r,i){if(0===e.length)return cn;if(1===e.length)return e[0];const o=(i?1048576&i.flags?`|${uy(i.types)}`:2097152&i.flags?`&${uy(i.types)}`:`#${i.type.id}|${uy(e)}`:uy(e))+dy(n,r);let a=Ye.get(o);return a||(a=Os(1048576),a.objectFlags=t|py(e,98304),a.types=e,a.origin=i,a.aliasSymbol=n,a.aliasTypeArguments=r,2===e.length&&512&e[0].flags&&512&e[1].flags&&(a.flags|=16,a.intrinsicName="boolean"),Ye.set(o,a)),a}function Wb(e,t,n){const r=n.flags;return 2097152&r?$b(e,t,n.types):(cT(n)?16777216&t||(t|=16777216,e.set(n.id.toString(),n)):(3&r?(n===Dt&&(t|=8388608),nl(n)&&(t|=1073741824)):!V&&98304&r||(n===Mt&&(t|=262144,n=Lt),e.has(n.id.toString())||(109472&n.flags&&109472&t&&(t|=67108864),e.set(n.id.toString(),n))),t|=473694207&r),t)}function $b(e,t,n){for(const r of n)t=Wb(e,t,SS(r));return t}function Kb(e,t){for(const n of e)if(!Ib(n.types,t)){if(t===Mt)return Ib(n.types,Lt);if(t===Lt)return Ib(n.types,Mt);const e=128&t.flags?Ut:288&t.flags?Vt:2048&t.flags?Wt:8192&t.flags?nn:void 0;if(!e||!Ib(n.types,e))return!1}return!0}function Hb(e,t){for(let n=0;n!(e.flags&t))}function Gb(e,t=0,n,r){const i=new Map,o=$b(i,0,e),a=Be(i.values());let s=0;if(131072&o)return D(a,_n)?_n:cn;if(V&&98304&o&&84410368&o||67108864&o&&402783228&o||402653316&o&&67238776&o||296&o&&469891796&o||2112&o&&469889980&o||12288&o&&469879804&o||49152&o&&469842940&o)return cn;if(402653184&o&&128&o&&function(e){let t=e.length;const n=P(e,e=>!!(128&e.flags));for(;t>0;){t--;const r=e[t];if(402653184&r.flags)for(const i of n){if(Rk(i,r)){Kt(e,t);break}if(Ex(r))return!0}}return!1}(a))return cn;if(1&o)return 8388608&o?Dt:1073741824&o?Ft:wt;if(!V&&98304&o)return 16777216&o?cn:32768&o?Lt:zt;if((4&o&&402653312&o||8&o&&256&o||64&o&&2048&o||4096&o&&8192&o||16384&o&&32768&o||16777216&o&&470302716&o)&&(1&t||function(e,t){let n=e.length;for(;n>0;){n--;const r=e[n];(4&r.flags&&402653312&t||8&r.flags&&256&t||64&r.flags&&2048&t||4096&r.flags&&8192&t||16384&r.flags&&32768&t||cT(r)&&470302716&t)&&Kt(e,n)}}(a,o)),262144&o&&(a[a.indexOf(Lt)]=Mt),0===a.length)return Ot;if(1===a.length)return a[0];if(2===a.length&&!(2&t)){const e=8650752&a[0].flags?0:1,t=a[e],n=a[1-e];if(8650752&t.flags&&(469893116&n.flags&&!Ax(n)||16777216&o)){const e=xf(t);if(e&&CE(e,e=>!!(469893116&e.flags)||cT(e))){if(Bk(e,n))return t;if(!(1048576&e.flags&&fE(e,e=>Bk(e,n))||Bk(n,e)))return cn;s=67108864}}}const c=uy(a)+(2&t?"*":dy(n,r));let l=et.get(c);if(!l){if(1048576&o)if(function(e){let t;const n=w(e,e=>!!(32768&Tx(e)));if(n<0)return!1;let r=n+1;for(;r!!(1048576&e.flags&&32768&e.types[0].flags))){const e=X(a,Ow)?Mt:Lt;Hb(a,32768),l=zb([Gb(a,t),e],1,n,r)}else if(k(a,e=>!!(1048576&e.flags&&(65536&e.types[0].flags||65536&e.types[1].flags))))Hb(a,65536),l=zb([Gb(a,t),zt],1,n,r);else if(a.length>=3&&e.length>2){const e=Math.floor(a.length/2);l=Gb([Gb(a.slice(0,e),t),Gb(a.slice(e),t)],t,n,r)}else{if(!Qb(a))return Ft;const e=function(e,t){const n=Xb(e),r=[];for(let i=0;i=0;t--)if(1048576&e[t].flags){const r=e[t].types,i=r.length;n[t]=r[o%i],o=Math.floor(o/i)}const a=Gb(n,t);131072&a.flags||r.push(a)}return r}(a,t);l=zb(e,1,n,r,X(e,e=>!!(2097152&e.flags))&&Zb(e)>Zb(a)?Jb(2097152,a):void 0)}else l=function(e,t,n,r){const i=Os(2097152);return i.objectFlags=t|py(e,98304),i.types=e,i.aliasSymbol=n,i.aliasTypeArguments=r,i}(a,s,n,r);et.set(c,l)}return l}function Xb(e){return Pe(e,(e,t)=>1048576&t.flags?e*t.types.length:131072&t.flags?0:e,1)}function Qb(e){var t;const n=Xb(e);return!(n>=1e5)||(null==(t=Yn)||t.instant(Yn.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:e.map(e=>e.id),size:n}),Jo(r,ha.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1)}function Yb(e){return 3145728&e.flags&&!e.aliasSymbol?1048576&e.flags&&e.origin?Yb(e.origin):Zb(e.types):1}function Zb(e){return Pe(e,(e,t)=>e+Yb(t),0)}function ex(e,t){const n=Os(4194304);return n.type=e,n.indexFlags=t,n}function tx(e,t){return 1&t?e.resolvedStringIndexType||(e.resolvedStringIndexType=ex(e,1)):e.resolvedIndexType||(e.resolvedIndexType=ex(e,0))}function nx(e,t){const n=up(e),r=dp(e),i=hp(e.target||e);if(!(i||2&t))return r;const o=[];if(jx(r)){if(wp(e))return tx(e,t);pE(r,s)}else if(wp(e)){lp(Pf(Np(e)),8576,!!(1&t),s)}else pE(ap(r),s);const a=2&t?EE(zb(o),e=>!(5&e.flags)):zb(o);return 1048576&a.flags&&1048576&r.flags&&uy(a.types)===uy(r.types)?r:a;function s(t){const r=i?Ck(i,pk(e.mapper,n,t)):t;o.push(r===Ut?mn:r)}}function rx(e){if(mD(e))return cn;if(GN(e))return SS(WM(e));if(FD(e))return SS(uI(e));const t=Kh(e);return void 0!==t?TS(Sc(t)):Q_(e)?SS(WM(e)):cn}function ix(e,t,n){if(n||!(6&dx(e))){let n=ca(Fd(e)).nameType;if(!n){const t=Ac(e.valueDeclaration);n="default"===e.escapedName?TS("default"):t&&rx(t)||(Yh(e)?void 0:TS(Cc(e)))}if(n&&n.flags&t)return n}return cn}function ox(e,t){return!!(e.flags&t||2097152&e.flags&&X(e.types,e=>ox(e,t)))}function ax(e,t,n){const r=n&&(7&Tx(e)||e.aliasSymbol)?function(e){const t=Ms(4194304);return t.type=e,t}(e):void 0;return zb(Y(O(Qp(e),e=>ix(e,t)),O(Gm(e),e=>e!==ui&&ox(e.keyType,t)?e.keyType===Ut&&8&t?mn:e.keyType:cn)),1,void 0,void 0,r)}function sx(e,t=0){return!!(58982400&e.flags||mw(e)||Pp(e)&&(!function(e){const t=up(e);return function e(n){return!!(470810623&n.flags)||(16777216&n.flags?n.root.isDistributive&&n.checkType===t:137363456&n.flags?k(n.types,e):8388608&n.flags?e(n.objectType)&&e(n.indexType):33554432&n.flags?e(n.baseType)&&e(n.constraint):!!(268435456&n.flags)&&e(n.type))}(hp(e)||t)}(e)||2===Ap(e))||1048576&e.flags&&!(4&t)&&nm(e)||2097152&e.flags&&oM(e,465829888)&&X(e.types,cT))}function cx(e,t=0){return Ay(e=Qf(e))?Fy(cx(e.baseType,t)):sx(e,t)?tx(e,t):1048576&e.flags?Gb(O(e.types,e=>cx(e,t))):2097152&e.flags?zb(O(e.types,e=>cx(e,t))):32&Tx(e)?nx(e,t):e===Dt?Dt:2&e.flags?cn:131073&e.flags?hn:ax(e,(2&t?128:402653316)|(1&t?0:12584),0===t)}function lx(e){const t=(zr||(zr=Yy("Extract",2,!0)||vt),zr===vt?void 0:zr);return t?ky(t,[e,Ut]):Ut}function _x(e,t){const n=w(t,e=>!!(1179648&e.flags));if(n>=0)return Qb(t)?ME(t[n],r=>_x(e,De(t,n,r))):Ft;if(D(t,Dt))return Dt;const r=[],i=[];let o=e[0];if(!function e(t,n){for(let a=0;a""===e)){if(k(r,e=>!!(4&e.flags)))return Ut;if(1===r.length&&Ex(r[0]))return r[0]}const a=`${uy(r)}|${O(i,e=>e.length).join(",")}|${i.join("")}`;let s=_t.get(a);return s||_t.set(a,s=function(e,t){const n=Os(134217728);return n.texts=e,n.types=t,n}(i,r)),s}function px(e){return 128&e.flags?e.value:256&e.flags?""+e.value:2048&e.flags?TT(e.value):98816&e.flags?e.intrinsicName:void 0}function hx(e,t){return 1179648&t.flags?ME(t,t=>hx(e,t)):128&t.flags?TS(yx(e,t.value)):134217728&t.flags?_x(...function(e,t,n){switch(_J.get(e.escapedName)){case 0:return[t.map(e=>e.toUpperCase()),n.map(t=>hx(e,t))];case 1:return[t.map(e=>e.toLowerCase()),n.map(t=>hx(e,t))];case 2:return[""===t[0]?t:[t[0].charAt(0).toUpperCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[hx(e,n[0]),...n.slice(1)]:n];case 3:return[""===t[0]?t:[t[0].charAt(0).toLowerCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[hx(e,n[0]),...n.slice(1)]:n]}return[t,n]}(e,t.texts,t.types)):268435456&t.flags&&e===t.symbol?t:268435461&t.flags||jx(t)?vx(e,t):Dx(t)?vx(e,_x(["",""],[t])):t}function yx(e,t){switch(_J.get(e.escapedName)){case 0:return t.toUpperCase();case 1:return t.toLowerCase();case 2:return t.charAt(0).toUpperCase()+t.slice(1);case 3:return t.charAt(0).toLowerCase()+t.slice(1)}return t}function vx(e,t){const n=`${fJ(e)},${Ab(t)}`;let r=ut.get(n);return r||ut.set(n,r=function(e,t){const n=Ls(268435456,e);return n.type=t,n}(e,t)),r}function bx(e){if(Z)return!1;if(4096&Tx(e))return!0;if(1048576&e.flags)return k(e.types,bx);if(2097152&e.flags)return X(e.types,bx);if(465829888&e.flags){const t=Tf(e);return t!==e&&bx(t)}return!1}function xx(e,t){return mC(e)?gC(e):t&&c_(t)?Kh(t):void 0}function Sx(e,t){if(8208&t.flags){const n=yc(e.parent,e=>!Px(e))||e.parent;return q_(n)?U_(n)&&fD(e)&&iD(n,e):k(t.declarations,e=>!__(e)||Ho(e))}return!0}function wx(e,t,n,r,i,o){const a=i&&213===i.kind?i:void 0,s=i&&mD(i)?void 0:xx(n,i);if(void 0!==s){if(256&o)return CA(t,s)||wt;const e=xm(t,s);if(e){if(64&o&&i&&e.declarations&&Ko(e)&&Sx(i,e)){Go((null==a?void 0:a.argumentExpression)??(lE(i)?i.indexType:i),e.declarations,s)}if(a){if(LO(e,a,jO(a.expression,t.symbol)),Zj(a,e,rh(a)))return void Jo(a.argumentExpression,ha.Cannot_assign_to_0_because_it_is_a_read_only_property,dc(e));if(8&o&&(la(i).resolvedSymbol=e),yO(a,e))return Nt}const n=4&o?L_(e):j_(e);return a&&1!==rh(a)?AF(a,n):i&&lE(i)&&Ow(n)?zb([n,Lt]):n}if(CE(t,fw)&&HT(s)){const e=+s;if(i&&CE(t,e=>!(12&e.target.combinedFlags))&&!(16&o)){const n=Nx(i);if(fw(t)){if(e<0)return Jo(n,ha.A_tuple_type_cannot_be_indexed_with_a_negative_value),Lt;Jo(n,ha.Tuple_type_0_of_length_1_has_no_element_at_index_2,mc(t),xy(t),Sc(s))}else Jo(n,ha.Property_0_does_not_exist_on_type_1,Sc(s),mc(t))}if(e>=0)return c(ig(t,Vt)),yw(t,e,1&o?Mt:void 0)}}if(!(98304&n.flags)&&aM(n,402665900)){if(131073&t.flags)return t;const l=dg(t,n)||ig(t,Ut);if(l){if(2&o&&l.keyType!==Vt)return void(a&&(4&o?Jo(a,ha.Type_0_is_generic_and_can_only_be_indexed_for_reading,mc(e)):Jo(a,ha.Type_0_cannot_be_used_to_index_type_1,mc(n),mc(e))));if(i&&l.keyType===Ut&&!aM(n,12)){return Jo(Nx(i),ha.Type_0_cannot_be_used_as_an_index_type,mc(n)),1&o?zb([l.type,Mt]):l.type}return c(l),1&o&&!(t.symbol&&384&t.symbol.flags&&n.symbol&&1024&n.flags&&Cs(n.symbol)===t.symbol)?zb([l.type,Mt]):l.type}if(131072&n.flags)return cn;if(bx(t))return wt;if(a&&!cM(t)){if(IN(t)){if(Z&&384&n.flags)return ho.add(Wp(a,ha.Property_0_does_not_exist_on_type_1,n.value,mc(t))),Lt;if(12&n.flags){return zb(le(O(t.properties,e=>j_(e)),Lt))}}if(t.symbol===we&&void 0!==s&&we.exports.has(s)&&418&we.exports.get(s).flags)Jo(a,ha.Property_0_does_not_exist_on_type_1,Sc(s),mc(t));else if(Z&&!(128&o))if(void 0!==s&&NO(s,t)){const e=mc(t);Jo(a,ha.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,s,e,e+"["+rp(a.argumentExpression)+"]")}else if(_g(t,Vt))Jo(a.argumentExpression,ha.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let e;if(void 0!==s&&(e=PO(s,t)))void 0!==e&&Jo(a.argumentExpression,ha.Property_0_does_not_exist_on_type_1_Did_you_mean_2,s,mc(t),e);else{const e=function(e,t,n){function r(t){const r=Kp(e,t);if(r){const e=eL(j_(r));return!!e&&hj(e)>=1&&Jk(n,dj(e,0))}return!1}const i=ih(t)?"set":"get";if(!r(i))return;let o=yb(t.expression);void 0===o?o=i:o+="."+i;return o}(t,a,n);if(void 0!==e)Jo(a,ha.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,mc(t),e);else{let e;if(1024&n.flags)e=sS(void 0,ha.Property_0_does_not_exist_on_type_1,"["+mc(n)+"]",mc(t));else if(8192&n.flags){const r=es(n.symbol,a);e=sS(void 0,ha.Property_0_does_not_exist_on_type_1,"["+r+"]",mc(t))}else 128&n.flags||256&n.flags?e=sS(void 0,ha.Property_0_does_not_exist_on_type_1,n.value,mc(t)):12&n.flags&&(e=sS(void 0,ha.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,mc(n),mc(t)));e=sS(e,ha.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,mc(r),mc(t)),ho.add(Hp(wd(a),a,e))}}}return}}if(16&o&&IN(t))return Lt;if(bx(t))return wt;if(i){const e=Nx(i);if(10!==e.kind&&384&n.flags)Jo(e,ha.Property_0_does_not_exist_on_type_1,""+n.value,mc(t));else if(12&n.flags)Jo(e,ha.Type_0_has_no_matching_index_signature_for_type_1,mc(t),mc(n));else{const t=10===e.kind?"bigint":mc(n);Jo(e,ha.Type_0_cannot_be_used_as_an_index_type,t)}}return el(n)?n:void 0;function c(e){e&&e.isReadonly&&a&&(ih(a)||fh(a))&&Jo(a,ha.Index_signature_in_type_0_only_permits_reading,mc(t))}}function Nx(e){return 213===e.kind?e.argumentExpression:200===e.kind?e.indexType:168===e.kind?e.expression:e}function Dx(e){if(2097152&e.flags){let t=!1;for(const n of e.types)if(101248&n.flags||Dx(n))t=!0;else if(!(524288&n.flags))return!1;return t}return!!(77&e.flags)||Ex(e)}function Ex(e){return!!(134217728&e.flags)&&k(e.types,Dx)||!!(268435456&e.flags)&&Dx(e.type)}function Ax(e){return!!(402653184&e.flags)&&!Ex(e)}function Ix(e){return!!Mx(e)}function Lx(e){return!!(4194304&Mx(e))}function jx(e){return!!(8388608&Mx(e))}function Mx(e){return 3145728&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|Pe(e.types,(e,t)=>e|Mx(t),0)),12582912&e.objectFlags):33554432&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|Mx(e.baseType)|Mx(e.constraint)),12582912&e.objectFlags):(58982400&e.flags||Pp(e)||mw(e)?4194304:0)|(63176704&e.flags||Ax(e)?8388608:0)}function Rx(e,t){return 8388608&e.flags?function(e,t){const n=t?"simplifiedForWriting":"simplifiedForReading";if(e[n])return e[n]===Mn?e:e[n];e[n]=Mn;const r=Rx(e.objectType,t),i=Rx(e.indexType,t),o=function(e,t,n){if(1048576&t.flags){const r=O(t.types,t=>Rx(qx(e,t),n));return n?Gb(r):zb(r)}}(r,i,t);if(o)return e[n]=o;if(!(465829888&i.flags)){const o=Bx(r,i,t);if(o)return e[n]=o}if(mw(r)&&296&i.flags){const o=vw(r,8&i.flags?0:r.target.fixedLength,0,t);if(o)return e[n]=o}if(Pp(r)&&2!==Ap(r))return e[n]=ME(zx(r,e.indexType),e=>Rx(e,t));return e[n]=e}(e,t):16777216&e.flags?function(e,t){const n=e.checkType,r=e.extendsType,i=Yx(e),o=eS(e);if(131072&o.flags&&Hx(i)===Hx(n)){if(1&n.flags||Jk(Dk(n),Dk(r)))return Rx(i,t);if(Jx(n,r))return cn}else if(131072&i.flags&&Hx(o)===Hx(n)){if(!(1&n.flags)&&Jk(Dk(n),Dk(r)))return cn;if(1&n.flags||Jx(n,r))return Rx(o,t)}return e}(e,t):e}function Bx(e,t,n){if(1048576&e.flags||2097152&e.flags&&!sx(e)){const r=O(e.types,e=>Rx(qx(e,t),n));return 2097152&e.flags||n?Gb(r):zb(r)}}function Jx(e,t){return!!(131072&zb([$d(e,t),cn]).flags)}function zx(e,t){const n=ZS([up(e)],[t]),r=_k(e.mapper,n),i=Ck(Sp(e.target||e),r),o=Ep(e)>0||(Ix(e)?Fp(Np(e))>0:function(e,t){const n=xf(t);return!!n&&X(Qp(e),e=>!!(16777216&e.flags)&&Jk(ix(e,8576),n))}(e,t));return Pl(i,!0,o)}function qx(e,t,n=0,r,i,o){return Vx(e,t,n,r,i,o)||(r?Ft:Ot)}function Ux(e,t){return CE(e,e=>{if(384&e.flags){const n=gC(e);if(HT(n)){const e=+n;return e>=0&&e0&&!X(e.elements,e=>eE(e)||tE(e)||ZD(e)&&!(!e.questionToken&&!e.dotDotDotToken))}function Xx(e,t){return Ix(e)||t&&fw(e)&&X(Pb(e),Ix)}function Qx(e,t,n,i,o){let a,s,c=0;for(;;){if(1e3===c)return Jo(r,ha.Type_instantiation_is_excessively_deep_and_possibly_infinite),Ft;const _=Ck(Hx(e.checkType),t),u=Ck(e.extendsType,t);if(_===Ft||u===Ft)return Ft;if(_===Dt||u===Dt)return Dt;const d=dh(e.node.checkType),p=dh(e.node.extendsType),f=Gx(d)&&Gx(p)&&m(d.elements)===m(p.elements),g=Xx(_,f);let h;if(e.inferTypeParameters){const n=tN(e.inferTypeParameters,void 0,0);t&&(n.nonFixingMapper=_k(n.nonFixingMapper,t)),g||FN(n.inferences,_,u,1536),h=t?_k(n.mapper,t):n.mapper}const y=h?Ck(e.extendsType,h):u;if(!g&&!Xx(y,f)){if(!(3&y.flags)&&(1&_.flags||!Jk(Nk(_),Nk(y)))){(1&_.flags||n&&!(131072&y.flags)&&fE(Nk(y),e=>Jk(e,Nk(_))))&&(s||(s=[])).push(Ck(VS(e.node.trueType),h||t));const r=VS(e.node.falseType);if(16777216&r.flags){const n=r.root;if(n.node.parent===e.node&&(!n.isDistributive||n.checkType===e.checkType)){e=n;continue}if(l(r,t))continue}a=Ck(r,t);break}if(3&y.flags||Jk(Dk(_),Dk(y))){const n=VS(e.node.trueType),r=h||t;if(l(n,r))continue;a=Ck(n,r);break}}a=Os(16777216),a.root=e,a.checkType=Ck(e.checkType,t),a.extendsType=Ck(e.extendsType,t),a.mapper=t,a.combinedMapper=h,a.aliasSymbol=i||e.aliasSymbol,a.aliasTypeArguments=i?o:GS(e.aliasTypeArguments,t);break}return s?zb(le(s,a)):a;function l(n,r){if(16777216&n.flags&&r){const a=n.root;if(a.outerTypeParameters){const s=_k(n.mapper,r),l=O(a.outerTypeParameters,e=>ek(e,s)),_=ZS(a.outerTypeParameters,l),u=a.isDistributive?ek(a.checkType,_):void 0;if(!(u&&u!==a.checkType&&1179648&u.flags))return e=a,t=_,i=void 0,o=void 0,a.aliasSymbol&&c++,!0}}return!1}}function Yx(e){return e.resolvedTrueType||(e.resolvedTrueType=Ck(VS(e.root.node.trueType),e.mapper))}function eS(e){return e.resolvedFalseType||(e.resolvedFalseType=Ck(VS(e.root.node.falseType),e.mapper))}function tS(e){let t;return e.locals&&e.locals.forEach(e=>{262144&e.flags&&(t=le(t,Pu(e)))}),t}function nS(e){return fD(e)?[e]:le(nS(e.left),e.right)}function aS(e){var t;const n=la(e);if(!n.resolvedType){if(!vf(e))return Jo(e.argument,ha.String_literal_expected),n.resolvedSymbol=vt,n.resolvedType=Ft;const r=e.isTypeOf?111551:16777216&e.flags?900095:788968,i=rs(e,e.argument.literal);if(!i)return n.resolvedSymbol=vt,n.resolvedType=Ft;const o=!!(null==(t=i.exports)?void 0:t.get("export=")),a=cs(i,!1);if(Od(e.qualifier))if(a.flags&r)n.resolvedType=lS(e,n,a,r);else{Jo(e,111551===r?ha.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:ha.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0,e.argument.literal.text),n.resolvedSymbol=vt,n.resolvedType=Ft}else{const t=nS(e.qualifier);let i,s=a;for(;i=t.shift();){const a=t.length?1920:r,c=bs(Wa(s)),l=e.isTypeOf||Mm(e)&&o?xm(j_(c),i.escapedText,!1,!0):void 0,_=(e.isTypeOf?void 0:ua(gs(c),i.escapedText,a))??l;if(!_)return Jo(i,ha.Namespace_0_has_no_exported_member_1,es(s),Bp(i)),n.resolvedType=Ft;la(i).resolvedSymbol=_,la(i.parent).resolvedSymbol=_,s=_}n.resolvedType=lS(e,n,s,r)}}return n.resolvedType}function lS(e,t,n,r){const i=Wa(n);return t.resolvedSymbol=i,111551===r?ej(j_(n),e):Ey(e,i)}function uS(e){const t=la(e);if(!t.resolvedType){const n=dS(e);if(!e.symbol||0===Td(e.symbol).size&&!n)t.resolvedType=Pn;else{let r=zs(16,e.symbol);r.aliasSymbol=n,r.aliasTypeArguments=pS(n),AP(e)&&e.isArrayType&&(r=Hv(r)),t.resolvedType=r}}return t.resolvedType}function dS(e){let t=e.parent;for(;aE(t)||hP(t)||cE(t)&&148===t.operator;)t=t.parent;return jg(t)?xs(t):void 0}function pS(e){return e?eu(e):void 0}function fS(e){return!!(524288&e.flags)&&!Pp(e)}function mS(e){return sT(e)||!!(474058748&e.flags)}function gS(e,t){if(!(1048576&e.flags))return e;if(k(e.types,mS))return T(e.types,sT)||Nn;const n=T(e.types,e=>!mS(e));if(!n)return e;return T(e.types,e=>e!==n&&!mS(e))?e:function(e){const n=nd();for(const r of Qp(e))if(6&dx(r));else if(yS(r)){const e=65536&r.flags&&!(32768&r.flags),i=Xo(16777220,r.escapedName,sp(r)|(t?8:0));i.links.type=e?Lt:Pl(j_(r),!0),i.declarations=r.declarations,i.links.nameType=ca(r).nameType,i.links.syntheticOrigin=r,n.set(r.escapedName,i)}const r=Ks(e.symbol,n,p,p,Gm(e));return r.objectFlags|=131200,r}(n)}function hS(e,t,n,r,i){if(1&e.flags||1&t.flags)return wt;if(2&e.flags||2&t.flags)return Ot;if(131072&e.flags)return t;if(131072&t.flags)return e;if(1048576&(e=gS(e,i)).flags)return Qb([e,t])?ME(e,e=>hS(e,t,n,r,i)):Ft;if(1048576&(t=gS(t,i)).flags)return Qb([e,t])?ME(t,t=>hS(e,t,n,r,i)):Ft;if(473960444&t.flags)return e;if(Lx(e)||Lx(t)){if(sT(e))return t;if(2097152&e.flags){const o=e.types,a=o[o.length-1];if(fS(a)&&fS(t))return Gb(Y(o.slice(0,o.length-1),[hS(a,t,n,r,i)]))}return Gb([e,t])}const o=nd(),a=new Set,s=e===Nn?Gm(t):Wd([e,t]);for(const e of Qp(t))6&dx(e)?a.add(e.escapedName):yS(e)&&o.set(e.escapedName,vS(e,i));for(const t of Qp(e))if(!a.has(t.escapedName)&&yS(t))if(o.has(t.escapedName)){const e=o.get(t.escapedName),n=j_(e);if(16777216&e.flags){const r=Y(t.declarations,e.declarations),i=Xo(4|16777216&t.flags,t.escapedName),a=j_(t),s=Lw(a),c=Lw(n);i.links.type=s===c?a:zb([a,c],2),i.links.leftSpread=t,i.links.rightSpread=e,i.declarations=r,i.links.nameType=ca(t).nameType,o.set(t.escapedName,i)}}else o.set(t.escapedName,vS(t,i));const c=Ks(n,o,p,p,j(s,e=>function(e,t){return e.isReadonly!==t?qh(e.keyType,e.type,t,e.declaration,e.components):e}(e,i)));return c.objectFlags|=2228352|r,c}function yS(e){var t;return!(X(e.declarations,t_)||106496&e.flags&&(null==(t=e.declarations)?void 0:t.some(e=>y_(e.parent))))}function vS(e,t){const n=65536&e.flags&&!(32768&e.flags);if(!n&&t===Yj(e))return e;const r=Xo(4|16777216&e.flags,e.escapedName,sp(e)|(t?8:0));return r.links.type=n?Lt:j_(e),r.declarations=e.declarations,r.links.nameType=ca(e).nameType,r.links.syntheticOrigin=e,r}function bS(e,t,n,r){const i=Ls(e,n);return i.value=t,i.regularType=r||i,i}function xS(e){if(2976&e.flags){if(!e.freshType){const t=bS(e.flags,e.value,e.symbol,e);t.freshType=t,e.freshType=t}return e.freshType}return e}function SS(e){return 2976&e.flags?e.regularType:1048576&e.flags?e.regularType||(e.regularType=ME(e,SS)):e}function kS(e){return!!(2976&e.flags)&&e.freshType===e}function TS(e){let t;return tt.get(e)||(tt.set(e,t=bS(128,e)),t)}function CS(e){let t;return rt.get(e)||(rt.set(e,t=bS(256,e)),t)}function ES(e){let t;const n=TT(e);return ot.get(n)||(ot.set(n,t=bS(2048,e)),t)}function IS(e,t,n){let r;const i=`${t}${"string"==typeof e?"@":"#"}${e}`,o=1024|("string"==typeof e?128:256);return ct.get(i)||(ct.set(i,r=bS(o,e,n)),r)}function OS(e){if(Mm(e)&&hP(e)){const t=Qg(e);t&&(e=Bg(t)||t)}if(Uf(e)){const t=qf(e)?Ts(e.left):Ts(e);if(t){const e=ca(t);return e.uniqueESSymbolType||(e.uniqueESSymbolType=function(e){const t=Ls(8192,e);return t.escapedName=`__@${t.symbol.escapedName}@${fJ(t.symbol)}`,t}(t))}}return nn}function RS(e){const t=la(e);return t.resolvedType||(t.resolvedType=function(e){const t=sm(e,!1,!1),n=t&&t.parent;if(n&&(y_(n)||265===n.kind)&&!jv(t)&&(!BD(t)||mh(e,t.body)))return vu(xs(n)).thisType;if(n&&vE(n)&&LE(n.parent)&&6===cg(n.parent))return vu(Ts(n.parent.left).parent).thisType;const r=16777216&e.flags?Gg(e):void 0;return r&&NE(r)&&LE(r.parent)&&3===cg(r.parent)?vu(Ts(r.parent.left).parent).thisType:ML(t)&&mh(e,t.body)?vu(xs(t)).thisType:(Jo(e,ha.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),Ft)}(e)),t.resolvedType}function BS(e){return VS(JS(e.type)||e.type)}function JS(e){switch(e.kind){case 197:return JS(e.type);case 190:if(1===e.elements.length&&(192===(e=e.elements[0]).kind||203===e.kind&&e.dotDotDotToken))return JS(e.type);break;case 189:return e.elementType}}function VS(e){return function(e,t){let n,r=!0;for(;t&&!bu(t)&&321!==t.kind;){const i=t.parent;if(170===i.kind&&(r=!r),(r||8650752&e.flags)&&195===i.kind&&t===i.trueType){const t=By(e,i.checkType,i.extendsType);t&&(n=le(n,t))}else if(262144&e.flags&&201===i.kind&&!i.nameType&&t===i.type){const t=VS(i);if(up(t)===Hx(e)){const e=bk(t);if(e){const t=uf(e);t&&CE(t,HC)&&(n=le(n,zb([Vt,bn])))}}}t=i}return n?Iy(e,Gb(n)):e}(WS(e),e)}function WS(e){switch(e.kind){case 133:case 313:case 314:return wt;case 159:return Ot;case 154:return Ut;case 150:return Vt;case 163:return Wt;case 136:return Yt;case 155:return nn;case 116:return rn;case 157:return Lt;case 106:return zt;case 146:return cn;case 151:return 524288&e.flags&&!Z?wt:fn;case 141:return It;case 198:case 110:return RS(e);case 202:return function(e){if(106===e.literal.kind)return zt;const t=la(e);return t.resolvedType||(t.resolvedType=SS(WM(e.literal))),t.resolvedType}(e);case 184:case 234:return $y(e);case 183:return e.assertsModifier?rn:Yt;case 187:return Hy(e);case 189:case 190:return function(e){const t=la(e);if(!t.resolvedType){const n=Qv(e);if(n===On)t.resolvedType=Nn;else if(190===e.kind&&X(e.elements,e=>!!(8&Gv(e)))||!Zv(e)){const r=189===e.kind?[VS(e.elementType)]:O(e.elements,VS);t.resolvedType=db(n,r)}else t.resolvedType=190===e.kind&&0===e.elements.length?n:vy(n,e,void 0)}return t.resolvedType}(e);case 191:return function(e){return Pl(VS(e.type),!0)}(e);case 193:return function(e){const t=la(e);if(!t.resolvedType){const n=dS(e);t.resolvedType=zb(O(e.types,VS),1,n,pS(n))}return t.resolvedType}(e);case 194:return function(e){const t=la(e);if(!t.resolvedType){const n=dS(e),r=O(e.types,VS),i=2===r.length?r.indexOf(Pn):-1,o=i>=0?r[1-i]:Ot,a=!!(76&o.flags||134217728&o.flags&&Ex(o));t.resolvedType=Gb(r,a?1:0,n,pS(n))}return t.resolvedType}(e);case 315:return function(e){const t=VS(e.type);return V?Tw(t,65536):t}(e);case 317:return Pl(VS(e.type));case 203:return function(e){const t=la(e);return t.resolvedType||(t.resolvedType=e.dotDotDotToken?BS(e):Pl(VS(e.type),!0,!!e.questionToken))}(e);case 197:case 316:case 310:return VS(e.type);case 192:return BS(e);case 319:return function(e){const t=VS(e.type),{parent:n}=e,r=e.parent.parent;if(hP(e.parent)&&KP(r)){const e=Gg(r),n=MP(r.parent.parent);if(e||n){const i=ke(n?r.parent.parent.typeExpression.parameters:e.parameters),o=$g(r);if(!i||o&&i.symbol===o&&$u(i))return Hv(t)}}if(AD(n)&&DP(n.parent))return Hv(t);return Pl(t)}(e);case 185:case 186:case 188:case 323:case 318:case 324:return uS(e);case 199:return function(e){const t=la(e);if(!t.resolvedType)switch(e.operator){case 143:t.resolvedType=cx(VS(e.type));break;case 158:t.resolvedType=155===e.type.kind?OS(lh(e.parent)):Ft;break;case 148:t.resolvedType=VS(e.type);break;default:gn.assertNever(e.operator)}return t.resolvedType}(e);case 200:return $x(e);case 201:return Kx(e);case 195:return function(e){const t=la(e);if(!t.resolvedType){const n=VS(e.checkType),r=dS(e),i=pS(r),o=G_(e,!0),a=i?o:P(o,t=>vk(t,e)),s={node:e,checkType:n,extendsType:VS(e.extendsType),isDistributive:!!(262144&n.flags),inferTypeParameters:tS(e),outerTypeParameters:a,instantiations:void 0,aliasSymbol:r,aliasTypeArguments:i};t.resolvedType=Qx(s,void 0,!1),a&&(s.instantiations=new Map,s.instantiations.set(uy(a),t.resolvedType))}return t.resolvedType}(e);case 196:return function(e){const t=la(e);return t.resolvedType||(t.resolvedType=Eu(xs(e.typeParameter))),t.resolvedType}(e);case 204:return function(e){const t=la(e);return t.resolvedType||(t.resolvedType=_x([e.head.text,...O(e.templateSpans,e=>e.literal.text)],O(e.templateSpans,e=>VS(e.type)))),t.resolvedType}(e);case 206:return aS(e);case 80:case 167:case 212:const t=Nz(e);return t?Pu(t):Ft;default:return Ft}}function $S(e,t,n){if(e&&e.length)for(let r=0;rX(n,t=>vk(e,t))):s,o.outerTypeParameters=s}if(s.length){const i=_k(e.mapper,t),o=O(s,e=>ek(e,i)),c=n||e.aliasSymbol,l=n?r:GS(e.aliasTypeArguments,t),_=uy(o)+dy(c,l);a.instantiations||(a.instantiations=new Map,a.instantiations.set(uy(s)+dy(a.aliasSymbol,a.aliasTypeArguments),a));let u=a.instantiations.get(_);if(!u){let n=ZS(s,o);134217728&a.objectFlags&&t&&(n=_k(n,t)),u=4&a.objectFlags?vy(e.target,e.node,n,c,l):32&a.objectFlags?function(e,t,n,r){const i=bk(e);if(i){const e=Ck(i,t);if(i!==e)return RE(Qf(e),o,n,r)}return Ck(dp(e),t)===Dt?Dt:kk(e,t,n,r);function o(n){if(61603843&n.flags&&n!==Dt&&!nl(n)){if(!e.declaration.nameType){let r;if(WC(n)||1&n.flags&&Hc(i,4)<0&&(r=uf(i))&&CE(r,HC))return function(e,t,n){const r=Sk(t,Vt,!0,n);return nl(r)?Ft:Hv(r,xk(KC(e),Dp(t)))}(n,e,dk(i,n,t));if(fw(n))return function(e,t,n,r){const i=e.target.elementFlags,o=e.target.fixedLength,a=o?dk(n,e,r):r,s=O(Pb(e),(e,s)=>{const c=i[s];return s1&e?2:e):8&c?O(i,e=>2&e?1:e):i,_=xk(e.target.readonly,Dp(t));return D(s,Ft)?Ft:ob(s,l,_,e.target.labeledElementDeclarations)}(n,e,i,t);if(Ef(n))return Gb(O(n.types,o))}return kk(e,dk(i,n,t))}return n}}(a,n,c,l):kk(a,n,c,l),a.instantiations.set(_,u);const r=Tx(u);if(3899393&u.flags&&!(524288&r)){const e=X(o,dN);524288&Tx(u)||(u.objectFlags|=52&r?524288|(e?1048576:0):e?0:524288)}}return u}return e}function vk(e,t){if(e.symbol&&e.symbol.declarations&&1===e.symbol.declarations.length){const r=e.symbol.declarations[0].parent;for(let e=t;e!==r;e=e.parent)if(!e||242===e.kind||195===e.kind&&sO(e.extendsType,n))return!0;return n(t)}return!0;function n(t){switch(t.kind){case 198:return!!e.isThisType;case 80:return!e.isThisType&&If(t)&&function(e){return!(184===e.parent.kind&&e.parent.typeArguments&&e===e.parent.typeName||206===e.parent.kind&&e.parent.typeArguments&&e===e.parent.qualifier)}(t)&&WS(t)===e;case 187:const r=mb(t.exprName);if(!gv(r)){const i=zN(r),o=e.symbol.declarations[0],a=169===o.kind?o.parent:e.isThisType?o:void 0;if(i.declarations&&a)return X(i.declarations,e=>mh(e,a))||X(t.typeArguments,n)}return!0;case 175:case 174:return!t.type&&!!t.body||X(t.typeParameters,n)||X(t.parameters,n)||!!t.type&&n(t.type)}return!!sO(t,n)}}function bk(e){const t=dp(e);if(4194304&t.flags){const e=Hx(t.type);if(262144&e.flags)return e}}function xk(e,t){return!!(1&t)||!(2&t)&&e}function Sk(e,t,n,r){const i=pk(r,up(e),t),o=Ck(Sp(e.target||e),i),a=Dp(e);return V&&4&a&&!oM(o,49152)?ww(o,!0):V&&8&a&&n?uD(o,524288):o}function kk(e,t,n,r){gn.assert(e.symbol,"anonymous type must have symbol to be instantiated");const i=zs(-1572865&e.objectFlags|64,e.symbol);if(32&e.objectFlags){i.declaration=e.declaration;const n=up(e),r=fk(n);i.typeParameter=r,t=_k(ik(n,r),t),r.mapper=t}return 8388608&e.objectFlags&&(i.node=e.node),i.target=e,i.mapper=t,i.aliasSymbol=n||e.aliasSymbol,i.aliasTypeArguments=n?r:GS(e.aliasTypeArguments,t),i.objectFlags|=i.aliasTypeArguments?py(i.aliasTypeArguments):0,i}function Tk(e,t,n,r,i){const o=e.root;if(o.outerTypeParameters){const e=O(o.outerTypeParameters,e=>ek(e,t)),a=(n?"C":"")+uy(e)+dy(r,i);let s=o.instantiations.get(a);if(!s){const t=ZS(o.outerTypeParameters,e),c=o.checkType,l=o.isDistributive?Qf(ek(c,t)):void 0;s=l&&c!==l&&1179648&l.flags?RE(l,e=>Qx(o,dk(c,e,t),n),r,i):Qx(o,t,n,r,i),o.instantiations.set(a,s)}return s}return e}function Ck(e,t){return e&&t?wk(e,t,void 0,void 0):e}function wk(e,t,n,i){var o;if(!dN(e))return e;if(100===h||f>=5e6)return null==(o=Yn)||o.instant(Yn.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:e.id,instantiationDepth:h,instantiationCount:f}),Jo(r,ha.Type_instantiation_is_excessively_deep_and_possibly_infinite),Ft;const a=function(e){for(let t=Bi-1;t>=0;t--)if(e===Mi[t])return t;return-1}(t);-1===a&&function(e){Mi[Bi]=e,Ri[Bi]??(Ri[Bi]=new Map),Bi++}(t);const s=e.id+dy(n,i),c=Ri[-1!==a?a:Bi-1],l=c.get(s);if(l)return l;d++,f++,h++;const _=function(e,t,n,r){const i=e.flags;if(262144&i)return ek(e,t);if(524288&i){const i=e.objectFlags;if(52&i){if(4&i&&!e.node){const n=e.resolvedTypeArguments,r=GS(n,t);return r!==n?db(e.target,r):e}return 1024&i?function(e,t){const n=Ck(e.mappedType,t);if(!(32&Tx(n)))return e;const r=Ck(e.constraintType,t);if(!(4194304&r.flags))return e;const i=mN(Ck(e.source,t),n,r);if(i)return i;return e}(e,t):yk(e,t,n,r)}return e}if(3145728&i){const o=1048576&e.flags?e.origin:void 0,a=o&&3145728&o.flags?o.types:e.types,s=GS(a,t);if(s===a&&n===e.aliasSymbol)return e;const c=n||e.aliasSymbol,l=n?r:GS(e.aliasTypeArguments,t);return 2097152&i||o&&2097152&o.flags?Gb(s,0,c,l):zb(s,1,c,l)}if(4194304&i)return cx(Ck(e.type,t));if(134217728&i)return _x(e.texts,GS(e.types,t));if(268435456&i)return hx(e.symbol,Ck(e.type,t));if(8388608&i){const i=n||e.aliasSymbol,o=n?r:GS(e.aliasTypeArguments,t);return qx(Ck(e.objectType,t),Ck(e.indexType,t),e.accessFlags,void 0,i,o)}if(16777216&i)return Tk(e,_k(e.mapper,t),!1,n,r);if(33554432&i){const n=Ck(e.baseType,t);if(Ay(e))return Fy(n);const r=Ck(e.constraint,t);return 8650752&n.flags&&Ix(r)?Iy(n,r):3&r.flags||Jk(Dk(n),Dk(r))?n:8650752&n.flags?Iy(n,r):Gb([r,n])}return e}(e,t,n,i);return-1===a?(Bi--,Mi[Bi]=void 0,Ri[Bi].clear()):c.set(s,_),h--,_}function Nk(e){return 402915327&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=Ck(e,Sn))}function Dk(e){return 402915327&e.flags?e:(e.restrictiveInstantiation||(e.restrictiveInstantiation=Ck(e,xn),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation),e.restrictiveInstantiation)}function Ek(e,t){return qh(e.keyType,Ck(e.type,t),e.isReadonly,e.declaration,e.components)}function Fk(e){switch(gn.assert(175!==e.kind||Kf(e)),e.kind){case 219:case 220:case 175:case 263:return Pk(e);case 211:return X(e.properties,Fk);case 210:return X(e.elements,Fk);case 228:return Fk(e.whenTrue)||Fk(e.whenFalse);case 227:return(57===e.operatorToken.kind||61===e.operatorToken.kind)&&(Fk(e.left)||Fk(e.right));case 304:return Fk(e.initializer);case 218:return Fk(e.expression);case 293:return X(e.properties,Fk)||QF(e.parent)&&X(e.parent.parent.children,Fk);case 292:{const{initializer:t}=e;return!!t&&Fk(t)}case 295:{const{expression:t}=e;return!!t&&Fk(t)}}return!1}function Pk(e){return UT(e)||function(e){if(e.typeParameters||kv(e)||!e.body)return!1;if(242!==e.body.kind)return Fk(e.body);return!!Lf(e.body,e=>!!e.expression&&Fk(e.expression))}(e)}function Ak(e){return($T(e)||Kf(e))&&Pk(e)}function Ik(e){if(524288&e.flags){const t=Lp(e);if(t.constructSignatures.length||t.callSignatures.length){const n=zs(16,e.symbol);return n.members=t.members,n.properties=t.properties,n.callSignatures=p,n.constructSignatures=p,n.indexInfos=p,n}}else if(2097152&e.flags)return Gb(O(e.types,Ik));return e}function Ok(e,t){return bT(e,t,To)}function Lk(e,t){return bT(e,t,To)?-1:0}function jk(e,t){return bT(e,t,So)?-1:0}function Mk(e,t){return bT(e,t,bo)?-1:0}function Rk(e,t){return bT(e,t,bo)}function Bk(e,t){return bT(e,t,xo)}function Jk(e,t){return bT(e,t,So)}function zk(e,t){return 1048576&e.flags?k(e.types,e=>zk(e,t)):1048576&t.flags?X(t.types,t=>zk(e,t)):2097152&e.flags?X(e.types,e=>zk(e,t)):58982400&e.flags?zk(xf(e)||Ot,t):cT(t)?!!(67633152&e.flags):t===Hn?!!(67633152&e.flags)&&!cT(e):t===Gn?!!(524288&e.flags)&&sD(e):K_(e,$_(t))||WC(t)&&!KC(t)&&zk(e,er)}function qk(e,t){return bT(e,t,ko)}function Uk(e,t){return qk(e,t)||qk(t,e)}function Vk(e,t,n,r,i,o){return OT(e,t,So,n,r,i,o)}function Wk(e,t,n,r,i,o){return $k(e,t,So,n,r,i,o,void 0)}function $k(e,t,n,r,i,o,a,s){return!!bT(e,t,n)||(!r||!Hk(i,e,t,n,o,a,s))&&OT(e,t,n,r,o,a,s)}function Kk(e){return!!(16777216&e.flags||2097152&e.flags&&X(e.types,Kk))}function Hk(e,t,n,r,i,o,a){if(!e||Kk(n))return!1;if(!OT(t,n,r,void 0)&&function(e,t,n,r,i,o,a){const s=Cm(t,0),c=Cm(t,1);for(const l of[c,s])if(X(l,e=>{const t=ah(e);return!(131073&t.flags)&&OT(t,n,r,void 0)})){const r=a||{};Vk(t,n,e,i,o,r);return fT(r.errors[r.errors.length-1],Wp(e,l===c?ha.Did_you_mean_to_use_new_with_this_expression:ha.Did_you_mean_to_call_this_expression)),!0}return!1}(e,t,n,r,i,o,a))return!0;switch(e.kind){case 235:if(!CC(e))break;case 295:case 218:return Hk(e.expression,t,n,r,i,o,a);case 227:switch(e.operatorToken.kind){case 64:case 28:return Hk(e.right,t,n,r,i,o,a)}break;case 211:return function(e,t,n,r,i,o){return!(402915324&n.flags)&&Qk(function*(e){if(!m(e.properties))return;for(const t of e.properties){if(pP(t))continue;const e=ix(xs(t),8576);if(e&&!(131072&e.flags))switch(t.kind){case 179:case 178:case 175:case 305:yield{errorNode:t.name,innerExpression:void 0,nameType:e};break;case 304:yield{errorNode:t.name,innerExpression:t.initializer,nameType:e,errorMessage:zp(t.name)?ha.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0};break;default:gn.assertNever(t)}}}(e),t,n,r,i,o)}(e,t,n,r,o,a);case 210:return function(e,t,n,r,i,o){if(402915324&n.flags)return!1;if(nw(t))return Qk(eT(e,n),t,n,r,i,o);HA(e,n,!1);const a=cI(e,1,!0);if(GA(),nw(a))return Qk(eT(e,n),a,n,r,i,o);return!1}(e,t,n,r,o,a);case 293:return function(e,t,n,r,i,o){let a,s=Qk(function*(e){if(!m(e.properties))return;for(const t of e.properties)iP(t)||bI(_C(t.name))||(yield{errorNode:t.name,innerExpression:t.initializer,nameType:TS(_C(t.name))})}(e),t,n,r,i,o);if(QF(e.parent)&&GF(e.parent.parent)){const a=e.parent.parent,l=PI(EI(e)),_=void 0===l?"children":Sc(l),u=TS(_),d=qx(n,u),p=gy(a.children);if(!m(p))return s;const f=m(p)>1;let g,h;if(Sv(!1)!==On){const e=$v(wt);g=EE(d,t=>Jk(t,e)),h=EE(d,t=>!Jk(t,e))}else g=EE(d,rw),h=EE(d,e=>!rw(e));if(f){if(g!==cn){const e=ob(TI(a,0)),t=function*(e,t){if(!m(e.children))return;let n=0;for(let r=0;r!rw(e)),c=s!==cn?DB(13,0,s,void 0):void 0;let l=!1;for(let n=e.next();!n.done;n=e.next()){const{errorNode:e,innerExpression:s,nameType:_,errorMessage:u}=n.value;let d=c;const p=a!==cn?Gk(t,a,_):void 0;if(!p||8388608&p.flags||(d=c?zb([c,p]):p),!d)continue;let f=Vx(t,_);if(!f)continue;const m=xx(_,void 0);if(!OT(f,d,r,void 0)){if(l=!0,!(s&&Hk(s,f,d,r,void 0,i,o))){const n=o||{},c=s?Xk(s,f):f;if(ie&&BT(c,d)){const t=Wp(e,ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,mc(c),mc(d));ho.add(t),n.errors=[t]}else{const o=!!(m&&16777216&(xm(a,m)||vt).flags),s=!!(m&&16777216&(xm(t,m)||vt).flags);d=Iw(d,o),f=Iw(f,o&&s);OT(c,d,r,e,u,i,n)&&c!==f&&OT(f,d,r,e,u,i,n)}}}}return l}(t,e,g,r,i,o)||s}else if(!bT(qx(t,u),d,r)){s=!0;const e=Jo(a.openingElement.tagName,ha.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,_,mc(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}else if(h!==cn){const e=Yk(p[0],u,c);e&&(s=Qk(function*(){yield e}(),t,n,r,i,o)||s)}else if(!bT(qx(t,u),d,r)){s=!0;const e=Jo(a.openingElement.tagName,ha.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,_,mc(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}return s;function c(){if(!a){const t=rp(e.parent.tagName),r=PI(EI(e)),i=void 0===r?"children":Sc(r),o=qx(n,TS(i)),s=ha._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;a={...s,key:"!!ALREADY FORMATTED!!",message:iS(s,t,i,mc(o))}}return a}}(e,t,n,r,o,a);case 220:return function(e,t,n,r,i,o){if(YE(e.body))return!1;if(X(e.parameters,ju))return!1;const a=eL(t);if(!a)return!1;const s=Cm(n,0);if(!m(s))return!1;const c=e.body,l=ah(a),_=zb(O(s,ah));if(!OT(l,_,r,void 0)){const t=c&&Hk(c,l,_,r,void 0,i,o);if(t)return t;const a=o||{};if(OT(l,_,r,c,void 0,i,a),a.errors)return n.symbol&&m(n.symbol.declarations)&&fT(a.errors[a.errors.length-1],Wp(n.symbol.declarations[0],ha.The_expected_type_comes_from_the_return_type_of_this_signature)),2&zh(e)||Yc(l,"then")||!OT(Rj(l),_,r,void 0)||fT(a.errors[a.errors.length-1],Wp(e,ha.Did_you_mean_to_mark_this_function_as_async)),!0}return!1}(e,t,n,r,o,a)}return!1}function Gk(e,t,n){const r=Vx(t,n);if(r)return r;if(1048576&t.flags){const r=zT(e,t);if(r)return Vx(r,n)}}function Xk(e,t){HA(e,t,!1);const n=PM(e,1);return GA(),n}function Qk(e,t,n,r,i,o){let a=!1;for(const s of e){const{errorNode:e,innerExpression:c,nameType:l,errorMessage:_}=s;let u=Gk(t,n,l);if(!u||8388608&u.flags)continue;let d=Vx(t,l);if(!d)continue;const p=xx(l,void 0);if(!OT(d,u,r,void 0)){if(a=!0,!(c&&Hk(c,d,u,r,void 0,i,o))){const a=o||{},s=c?Xk(c,d):d;if(ie&&BT(s,u)){const t=Wp(e,ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,mc(s),mc(u));ho.add(t),a.errors=[t]}else{const o=!!(p&&16777216&(xm(n,p)||vt).flags),c=!!(p&&16777216&(xm(t,p)||vt).flags);u=Iw(u,o),d=Iw(d,o&&c);OT(s,u,r,e,_,i,a)&&s!==d&&OT(d,u,r,e,_,i,a)}if(a.errors){const e=a.errors[a.errors.length-1],t=mC(l)?gC(l):void 0,r=void 0!==t?xm(n,t):void 0;let i=!1;if(!r){const t=dg(n,l);t&&t.declaration&&!wd(t.declaration).hasNoDefaultLib&&(i=!0,fT(e,Wp(t.declaration,ha.The_expected_type_comes_from_this_index_signature)))}if(!i&&(r&&m(r.declarations)||n.symbol&&m(n.symbol.declarations))){const i=r&&m(r.declarations)?r.declarations[0]:n.symbol.declarations[0];wd(i).hasNoDefaultLib||fT(e,Wp(i,ha.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,!t||8192&l.flags?mc(l):Sc(t),mc(n)))}}}}}return a}function Yk(e,t,n){switch(e.kind){case 295:return{errorNode:e,innerExpression:e.expression,nameType:t};case 12:if(e.containsOnlyTriviaWhiteSpaces)break;return{errorNode:e,innerExpression:void 0,nameType:t,errorMessage:n()};case 285:case 286:case 289:return{errorNode:e,innerExpression:e,nameType:t};default:return gn.assertNever(e,"Found invalid jsx child")}}function*eT(e,t){const n=m(e.elements);if(n)for(let r=0;rc:hj(e)>c))return!r||8&n||i(ha.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,hj(e),c),0;e.typeParameters&&e.typeParameters!==t.typeParameters&&(e=rL(e,t=Lh(t),void 0,a));const l=gj(e),_=bj(e),u=bj(t);(_||u)&&Ck(_||u,s);const d=t.declaration?t.declaration.kind:0,p=!(3&n)&&K&&175!==d&&174!==d&&177!==d;let f=-1;const m=eh(e);if(m&&m!==rn){const e=eh(t);if(e){const t=!p&&a(m,e,!1)||a(e,m,r);if(!t)return r&&i(ha.The_this_types_of_each_signature_are_incompatible),0;f&=t}}const g=_||u?Math.min(l,c):Math.max(l,c),h=_||u?g-1:-1;for(let c=0;c=hj(e)&&c=3&&32768&t[0].flags&&65536&t[1].flags&&X(t,cT)?67108864:0)}return!!(67108864&e.objectFlags)}return!1}(t))return!0}return!1}function bT(e,t,n){if(kS(e)&&(e=e.regularType),kS(t)&&(t=t.regularType),e===t)return!0;if(n!==To){if(n===ko&&!(131072&t.flags)&&vT(t,e,n)||vT(e,t,n))return!0}else if(!(61865984&(e.flags|t.flags))){if(e.flags!==t.flags)return!1;if(67358815&e.flags)return!0}if(524288&e.flags&&524288&t.flags){const r=n.get(EC(e,t,0,n,!1));if(void 0!==r)return!!(1&r)}return!!(469499904&e.flags||469499904&t.flags)&&OT(e,t,n,void 0)}function ST(e,t){return 2048&Tx(e)&&bI(t.escapedName)}function CT(e,t){for(;;){const n=kS(e)?e.regularType:mw(e)?AT(e,t):4&Tx(e)?e.node?my(e.target,by(e)):ZC(e)||e:3145728&e.flags?PT(e,t):33554432&e.flags?t?e.baseType:Ly(e):25165824&e.flags?Rx(e,t):e;if(n===e)return n;e=n}}function PT(e,t){const n=Qf(e);if(n!==e)return n;if(2097152&e.flags&&function(e){let t=!1,n=!1;for(const r of e.types)if(t||(t=!!(465829888&r.flags)),n||(n=!!(98304&r.flags)||cT(r)),t&&n)return!0;return!1}(e)){const n=j(e.types,e=>CT(e,t));if(n!==e.types)return Gb(n)}return e}function AT(e,t){const n=Pb(e),r=j(n,e=>25165824&e.flags?Rx(e,t):e);return n!==r?Cb(e.target,r):e}function OT(e,t,n,i,o,a,s){var c;let l,_,u,d,f,g,h,y,v=0,b=0,x=0,S=0,k=!1,T=0,C=0,N=16e6-n.size>>3;gn.assert(n!==To||!i,"no error reporting in identity checking");const F=U(e,t,3,!!i,o);if(y&&L(),k){const o=EC(e,t,0,n,!1);n.set(o,2|(N<=0?32:64)),null==(c=Yn)||c.instant(Yn.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:e.id,targetId:t.id,depth:b,targetDepth:x});const a=N<=0?ha.Excessive_complexity_comparing_types_0_and_1:ha.Excessive_stack_depth_comparing_types_0_and_1,l=Jo(i||r,a,mc(e),mc(t));s&&(s.errors||(s.errors=[])).push(l)}else if(l){if(a){const e=a();e&&(cS(e,l),l=e)}let r;if(o&&i&&!F&&e.symbol){const i=ca(e.symbol);if(i.originatingImport&&!hf(i.originatingImport)){if(OT(j_(i.target),t,n,void 0)){r=le(r,Wp(i.originatingImport,ha.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}}const c=Hp(wd(i),i,l,r);_&&fT(c,..._),s&&(s.errors||(s.errors=[])).push(c),s&&s.skipLogging||ho.add(c)}return i&&s&&s.skipLogging&&0===F&&gn.assert(!!s.errors,"missed opportunity to interact with error."),0!==F;function P(e){l=e.errorInfo,h=e.lastSkippedInfo,y=e.incompatibleStack,T=e.overrideNextErrorInfo,C=e.skipParentCounter,_=e.relatedInfo}function A(){return{errorInfo:l,lastSkippedInfo:h,incompatibleStack:null==y?void 0:y.slice(),overrideNextErrorInfo:T,skipParentCounter:C,relatedInfo:null==_?void 0:_.slice()}}function I(e,...t){T++,h=void 0,(y||(y=[])).push([e,...t])}function L(){const e=y||[];y=void 0;const t=h;if(h=void 0,1===e.length)return M(...e[0]),void(t&&J(void 0,...t));let n="";const r=[];for(;e.length;){const[t,...i]=e.pop();switch(t.code){case ha.Types_of_property_0_are_incompatible.code:{0===n.indexOf("new ")&&(n=`(${n})`);const e=""+i[0];n=0===n.length?`${e}`:Ss(e,wS(E))?`${n}.${e}`:"["===e[0]&&"]"===e[e.length-1]?`${n}${e}`:`${n}[${e}]`;break}case ha.Call_signature_return_types_0_and_1_are_incompatible.code:case ha.Construct_signature_return_types_0_and_1_are_incompatible.code:case ha.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case ha.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:if(0===n.length){let e=t;t.code===ha.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?e=ha.Call_signature_return_types_0_and_1_are_incompatible:t.code===ha.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(e=ha.Construct_signature_return_types_0_and_1_are_incompatible),r.unshift([e,i[0],i[1]])}else{n=`${t.code===ha.Construct_signature_return_types_0_and_1_are_incompatible.code||t.code===ha.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":""}${n}(${t.code===ha.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||t.code===ha.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"..."})`}break;case ha.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:r.unshift([ha.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,i[0],i[1]]);break;case ha.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:r.unshift([ha.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,i[0],i[1],i[2]]);break;default:return gn.fail(`Unhandled Diagnostic: ${t.code}`)}}n?M(")"===n[n.length-1]?ha.The_types_returned_by_0_are_incompatible_between_these_types:ha.The_types_of_0_are_incompatible_between_these_types,n):r.shift();for(const[e,...t]of r){const n=e.elidedInCompatabilityPyramid;e.elidedInCompatabilityPyramid=!1,M(e,...t),e.elidedInCompatabilityPyramid=n}t&&J(void 0,...t)}function M(e,...t){gn.assert(!!i),y&&L(),e.elidedInCompatabilityPyramid||(0===C?l=sS(l,e,...t):C--)}function R(e,...t){M(e,...t),C++}function B(e){gn.assert(!!l),_?_.push(e):_=[e]}function J(e,t,r){y&&L();const[i,o]=gc(t,r);let a=t,s=i;131072&r.flags||!sw(t)||MT(r)||(a=cw(t),gn.assert(!Jk(a,r),"generalized source shouldn't be assignable"),s=vc(a));if(262144&(8388608&r.flags&&!(8388608&t.flags)?r.objectType.flags:r.flags)&&r!==qn&&r!==Un){const e=xf(r);let n;e&&(Jk(a,e)||(n=Jk(t,e)))?M(ha._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,n?i:s,o,mc(e)):(l=void 0,M(ha._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,o,s))}if(e)e===ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1&&ie&&RT(t,r).length&&(e=ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties);else if(n===ko)e=ha.Type_0_is_not_comparable_to_type_1;else if(i===o)e=ha.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else if(ie&&RT(t,r).length)e=ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;else{if(128&t.flags&&1048576&r.flags){const e=function(e,t){const n=t.types.filter(e=>!!(128&e.flags));return Jt(e.value,n,e=>e.value)}(t,r);if(e)return void M(ha.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,s,o,mc(e))}e=ha.Type_0_is_not_assignable_to_type_1}M(e,s,o)}function z(e,t,n){return fw(e)?e.target.readonly&&GC(t)?(n&&M(ha.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,mc(e),mc(t)),!1):HC(t):KC(e)&&GC(t)?(n&&M(ha.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,mc(e),mc(t)),!1):!fw(t)||WC(e)}function q(e,t,n){return U(e,t,3,n)}function U(e,t,r=3,o=!1,a,s=0){if(e===t)return-1;if(524288&e.flags&&402784252&t.flags)return n===ko&&!(131072&t.flags)&&vT(t,e,n)||vT(e,t,n,o?M:void 0)?-1:(o&&W(e,t,e,t,a),0);const c=CT(e,!1);let l=CT(t,!0);if(c===l)return-1;if(n===To)return c.flags!==l.flags?0:67358815&c.flags?-1:($(c,l),te(c,l,!1,0,r));if(262144&c.flags&&ef(c)===l)return-1;if(470302716&c.flags&&1048576&l.flags){const e=l.types,t=2===e.length&&98304&e[0].flags?e[1]:3===e.length&&98304&e[0].flags&&98304&e[1].flags?e[2]:void 0;if(t&&!(98304&t.flags)&&(l=CT(t,!0),c===l))return-1}if(n===ko&&!(131072&l.flags)&&vT(l,c,n)||vT(c,l,n,o?M:void 0))return-1;if(469499904&c.flags||469499904&l.flags){if(!(2&s)&&IN(c)&&8192&Tx(c)&&function(e,t,r){var o;if(!$I(t)||!Z&&4096&Tx(t))return!1;const a=!!(2048&Tx(e));if((n===So||n===ko)&&(_E(Hn,t)||!a&&sT(t)))return!1;let s,c=t;1048576&t.flags&&(c=Qq(e,t,U)||function(e){if(oM(e,67108864)){const t=EE(e,e=>!(402784252&e.flags));if(!(131072&t.flags))return t}return e}(t),s=1048576&c.flags?c.types:[c]);for(const t of Qp(e))if(H(t,e.symbol)&&!ST(e,t)){if(!WI(c,t.escapedName,a)){if(r){const n=EE(c,$I);if(!i)return gn.fail();if(rP(i)||Nu(i)||Nu(i.parent)){t.valueDeclaration&&nP(t.valueDeclaration)&&wd(i)===wd(t.valueDeclaration.name)&&(i=t.valueDeclaration.name);const e=dc(t),r=FO(e,n),o=r?dc(r):void 0;o?M(ha.Property_0_does_not_exist_on_type_1_Did_you_mean_2,e,mc(n),o):M(ha.Property_0_does_not_exist_on_type_1,e,mc(n))}else{const r=(null==(o=e.symbol)?void 0:o.declarations)&&ve(e.symbol.declarations);let a;if(t.valueDeclaration&&yc(t.valueDeclaration,e=>e===r)&&wd(r)===wd(i)){const e=t.valueDeclaration;gn.assertNode(e,w_);const r=e.name;i=r,fD(r)&&(a=PO(r,n))}void 0!==a?R(ha.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,dc(t),mc(n),a):R(ha.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,dc(t),mc(n))}}return!0}if(s&&!U(j_(t),K(s,t.escapedName),3,r))return r&&I(ha.Types_of_property_0_are_incompatible,dc(t)),!0}return!1}(c,l,o))return o&&J(a,c,t.aliasSymbol?t:l),0;const _=(n!==ko||ow(c))&&!(2&s)&&405405692&c.flags&&c!==Hn&&2621440&l.flags&&KT(l)&&(Qp(c).length>0||Oz(c)),u=!!(2048&Tx(c));if(_&&!function(e,t,n){for(const r of Qp(e))if(WI(t,r.escapedName,n))return!0;return!1}(c,l,u)){if(o){const n=mc(e.aliasSymbol?e:c),r=mc(t.aliasSymbol?t:l),i=Cm(c,0),o=Cm(c,1);i.length>0&&U(ah(i[0]),l,1,!1)||o.length>0&&U(ah(o[0]),l,1,!1)?M(ha.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,n,r):M(ha.Type_0_has_no_properties_in_common_with_type_1,n,r)}return 0}$(c,l);const d=1048576&c.flags&&c.types.length<4&&!(1048576&l.flags)||1048576&l.flags&&l.types.length<4&&!(469499904&c.flags)?G(c,l,o,s):te(c,l,o,s,r);if(d)return d}return o&&W(e,t,c,l,a),0}function W(e,t,n,r,o){var a,s;const c=!!ZC(e),_=!!ZC(t);n=e.aliasSymbol||c?e:n,r=t.aliasSymbol||_?t:r;let u=T>0;if(u&&T--,524288&n.flags&&524288&r.flags){const e=l;z(n,r,!0),l!==e&&(u=!!l)}if(524288&n.flags&&402784252&r.flags)!function(e,t){const n=wc(e.symbol)?mc(e,e.symbol.valueDeclaration):mc(e),r=wc(t.symbol)?mc(t,t.symbol.valueDeclaration):mc(t);(tr===e&&Ut===t||nr===e&&Vt===t||rr===e&&Yt===t||cv()===e&&nn===t)&&M(ha._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,r,n)}(n,r);else if(n.symbol&&524288&n.flags&&Hn===n)M(ha.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(2048&Tx(n)&&2097152&r.flags){const e=r.types,t=wI(XB.IntrinsicAttributes,i),n=wI(XB.IntrinsicClassAttributes,i);if(!nl(t)&&!nl(n)&&(D(e,t)||D(e,n)))return}else l=bm(l,t);if(!o&&u){const e=A();let t;return J(o,n,r),l&&l!==e.errorInfo&&(t={code:l.code,messageText:l.messageText}),P(e),t&&l&&(l.canonicalHead=t),void(h=[n,r])}if(J(o,n,r),262144&n.flags&&(null==(s=null==(a=n.symbol)?void 0:a.declarations)?void 0:s[0])&&!ef(n)){const e=fk(n);if(e.constraint=Ck(r,ik(n,e)),kf(e)){const e=mc(r,n.symbol.declarations[0]);B(Wp(n.symbol.declarations[0],ha.This_type_parameter_might_need_an_extends_0_constraint,e))}}}function $(e,t){if(Yn&&3145728&e.flags&&3145728&t.flags){const n=e,r=t;if(n.objectFlags&r.objectFlags&32768)return;const o=n.types.length,a=r.types.length;o*a>1e6&&Yn.instant(Yn.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:e.id,sourceSize:o,targetId:t.id,targetSize:a,pos:null==i?void 0:i.pos,end:null==i?void 0:i.end})}}function K(e,t){return zb(Pe(e,(e,n)=>{var r;const i=3145728&(n=Pf(n)).flags?$f(n,t):Kp(n,t);return le(e,i&&j_(i)||(null==(r=mg(n,t))?void 0:r.type)||Lt)},void 0)||p)}function H(e,t){return e.valueDeclaration&&t.valueDeclaration&&e.valueDeclaration.parent===t.valueDeclaration}function G(e,t,r,i){if(1048576&e.flags){if(1048576&t.flags){const n=e.origin;if(n&&2097152&n.flags&&t.aliasSymbol&&D(n.types,t))return-1;const r=t.origin;if(r&&1048576&r.flags&&e.aliasSymbol&&D(r.types,e))return-1}return n===ko?ee(e,t,r&&!(402784252&e.flags),i):function(e,t,n,r){let i=-1;const o=e.types,a=function(e,t){if(1048576&e.flags&&1048576&t.flags&&!(32768&e.types[0].flags)&&32768&t.types[0].flags)return UE(t,-32769);return t}(e,t);for(let e=0;e=a.types.length&&o.length%a.types.length===0){const t=U(s,a.types[e%a.types.length],3,!1,void 0,r);if(t){i&=t;continue}}const c=U(s,t,1,n,void 0,r);if(!c)return 0;i&=c}return i}(e,t,r&&!(402784252&e.flags),i)}if(1048576&t.flags)return Y(Rw(e),t,r&&!(402784252&e.flags)&&!(402784252&t.flags),i);if(2097152&t.flags)return function(e,t,n,r){let i=-1;const o=t.types;for(const t of o){const o=U(e,t,2,n,void 0,r);if(!o)return 0;i&=o}return i}(e,t,r,2);if(n===ko&&402784252&t.flags){const n=j(e.types,e=>465829888&e.flags?xf(e)||Ot:e);if(n!==e.types){if(131072&(e=Gb(n)).flags)return 0;if(!(2097152&e.flags))return U(e,t,1,!1)||U(t,e,1,!1)}}return ee(e,t,!1,1)}function Q(e,t){let n=-1;const r=e.types;for(const e of r){const r=Y(e,t,!1,0);if(!r)return 0;n&=r}return n}function Y(e,t,r,i){const o=t.types;if(1048576&t.flags){if(Ib(o,e))return-1;if(n!==ko&&32768&Tx(t)&&!(1024&e.flags)&&(2688&e.flags||(n===bo||n===xo)&&256&e.flags)){const t=e===e.regularType?e.freshType:e.regularType,n=128&e.flags?Ut:256&e.flags?Vt:2048&e.flags?Wt:void 0;return n&&Ib(o,n)||t&&Ib(o,t)?-1:0}const r=nD(t,e);if(r){const t=U(e,r,2,!1,void 0,i);if(t)return t}}for(const t of o){const n=U(e,t,2,!1,void 0,i);if(n)return n}if(r){const n=zT(e,t,U);n&&U(e,n,2,!0,void 0,i)}return 0}function ee(e,t,n,r){const i=e.types;if(1048576&e.flags&&Ib(i,t))return-1;const o=i.length;for(let e=0;e(D|=e?16:8,C(e))),3===S?(null==(a=Yn)||a.instant(Yn.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:e.id,sourceIdStack:f.map(e=>e.id),targetId:t.id,targetIdStack:g.map(e=>e.id),depth:b,targetDepth:x}),w=3):(null==(s=Yn)||s.push(Yn.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:e.id,targetId:t.id}),w=function(e,t,r,i){const o=A();let a=function(e,t,r,i,o){let a,s,c=!1,_=e.flags;const u=t.flags;if(n===To){if(3145728&_){let n=Q(e,t);return n&&(n&=Q(t,e)),n}if(4194304&_)return U(e.type,t.type,3,!1);if(8388608&_&&(a=U(e.objectType,t.objectType,3,!1))&&(a&=U(e.indexType,t.indexType,3,!1)))return a;if(16777216&_&&e.root.isDistributive===t.root.isDistributive&&(a=U(e.checkType,t.checkType,3,!1))&&(a&=U(e.extendsType,t.extendsType,3,!1))&&(a&=U(Yx(e),Yx(t),3,!1))&&(a&=U(eS(e),eS(t),3,!1)))return a;if(33554432&_&&(a=U(e.baseType,t.baseType,3,!1))&&(a&=U(e.constraint,t.constraint,3,!1)))return a;if(134217728&_&&ae(e.texts,t.texts)){const n=e.types,r=t.types;a=-1;for(let e=0;e!!(262144&e.flags));){if(a=U(n,t,1,!1))return a;n=uf(n)}return 0}}else if(4194304&u){const n=t.type;if(4194304&_&&(a=U(n,e.type,3,!1)))return a;if(fw(n)){if(a=U(e,Nb(n),2,r))return a}else{const i=pf(n);if(i){if(-1===U(e,cx(i,4|t.indexFlags),2,r))return-1}else if(Pp(n)){const t=hp(n),i=dp(n);let o;if(t&&wp(n)){o=zb([ne(t,n),t])}else o=t||i;if(-1===U(e,o,2,r))return-1}}}else if(8388608&u){if(8388608&_){if((a=U(e.objectType,t.objectType,3,r))&&(a&=U(e.indexType,t.indexType,3,r)),a)return a;r&&(s=l)}if(n===So||n===ko){const n=t.objectType,c=t.indexType,_=xf(n)||n,u=xf(c)||c;if(!Lx(_)&&!jx(u)){const t=Vx(_,u,4|(_!==n?2:0));if(t){if(r&&s&&P(o),a=U(e,t,2,r,void 0,i))return a;r&&s&&l&&(l=h([s])<=h([l])?s:l)}}}r&&(s=void 0)}else if(Pp(t)&&n!==To){const n=!!t.declaration.nameType,i=Sp(t),c=Dp(t);if(!(8&c)){if(!n&&8388608&i.flags&&i.objectType===e&&i.indexType===up(t))return-1;if(!Pp(e)){const i=n?hp(t):dp(t),_=cx(e,2),u=4&c,d=u?$d(i,_):void 0;if(u?!(131072&d.flags):U(i,_,3)){const o=Sp(t),s=up(t),c=UE(o,-98305);if(!n&&8388608&c.flags&&c.indexType===s){if(a=U(e,c.objectType,2,r))return a}else{const t=qx(e,n?d||i:d?Gb([d,s]):s);if(a=U(t,o,3,r))return a}}s=l,P(o)}}}else if(16777216&u){if(jC(t,g,x,10))return 3;const n=t;if(!(n.root.inferTypeParameters||(d=n.root,d.isDistributive&&(vk(d.checkType,d.node.trueType)||vk(d.checkType,d.node.falseType)))||16777216&e.flags&&e.root===n.root)){const t=!Jk(Nk(n.checkType),Nk(n.extendsType)),r=!t&&Jk(Dk(n.checkType),Dk(n.extendsType));if((a=t?-1:U(e,Yx(n),2,!1,void 0,i))&&(a&=r?-1:U(e,eS(n),2,!1,void 0,i),a))return a}}else if(134217728&u){if(134217728&_){if(n===ko)return function(e,t){const n=e.texts[0],r=t.texts[0],i=e.texts[e.texts.length-1],o=t.texts[t.texts.length-1],a=Math.min(n.length,r.length),s=Math.min(i.length,o.length);return n.slice(0,a)!==r.slice(0,a)||i.slice(i.length-s)!==o.slice(o.length-s)}(e,t)?0:-1;Ck(e,Cn)}if(DN(e,t))return-1}else if(268435456&t.flags&&!(268435456&e.flags)&&CN(e,t))return-1;var d;if(8650752&_){if(!(8388608&_&&8388608&u)){const n=ef(e)||Ot;if(a=U(n,t,1,!1,void 0,i))return a;if(a=U(Pd(n,e),t,1,r&&n!==Ot&&!(u&_&262144),void 0,i))return a;if(Ff(e)){const n=ef(e.indexType);if(n&&(a=U(qx(e.objectType,n),t,1,r)))return a}}}else if(4194304&_){const n=sx(e.type,e.indexFlags)&&32&Tx(e.type);if(a=U(hn,t,1,r&&!n))return a;if(n){const n=e.type,i=hp(n),o=i&&wp(n)?ne(i,n):i||dp(n);if(a=U(o,t,1,r))return a}}else if(134217728&_&&!(524288&u)){if(!(134217728&u)){const n=xf(e);if(n&&n!==e&&(a=U(n,t,1,r)))return a}}else if(268435456&_)if(268435456&u){if(e.symbol!==t.symbol)return 0;if(a=U(e.type,t.type,3,r))return a}else{const n=xf(e);if(n&&(a=U(n,t,1,r)))return a}else if(16777216&_){if(jC(e,f,b,10))return 3;if(16777216&u){const n=e.root.inferTypeParameters;let i,o=e.extendsType;if(n){const e=tN(n,void 0,0,q);FN(e.inferences,t.extendsType,o,1536),o=Ck(o,e.mapper),i=e.mapper}if(Ok(o,t.extendsType)&&(U(e.checkType,t.checkType,3)||U(t.checkType,e.checkType,3))&&((a=U(Ck(Yx(e),i),Yx(t),3,r))&&(a&=U(eS(e),eS(t),3,r)),a))return a}const n=ff(e);if(n&&(a=U(n,t,1,r)))return a;const i=16777216&u||!kf(e)?void 0:mf(e);if(i&&(P(o),a=U(i,t,1,r)))return a}else{if(n!==bo&&n!==xo&&(32&Tx(m=t)&&4&Dp(m))&&sT(e))return-1;if(Pp(t))return Pp(e)&&(a=function(e,t,r){const i=n===ko||(n===To?Dp(e)===Dp(t):Fp(e)<=Fp(t));if(i){let n;if(n=U(dp(t),Ck(dp(e),Fp(e)<0?wn:Cn),3,r)){const i=ZS([up(e)],[up(t)]);if(Ck(hp(e),i)===Ck(hp(t),i))return n&U(Ck(Sp(e),i),Sp(t),3,r)}}return 0}(e,t,r))?a:0;const d=!!(402784252&_);if(n!==To)_=(e=Pf(e)).flags;else if(Pp(e))return 0;if(4&Tx(e)&&4&Tx(t)&&e.target===t.target&&!fw(e)&&!vC(e)&&!vC(t)){if(tw(e))return-1;const n=QT(e.target);if(n===p)return 1;const r=y(by(e),by(t),n,i);if(void 0!==r)return r}else{if(KC(t)?CE(e,HC):WC(t)&&CE(e,e=>fw(e)&&!e.target.readonly))return n!==To?U(_g(e,Vt)||wt,_g(t,Vt)||wt,3,r):0;if(mw(e)&&fw(t)&&!mw(t)){const n=Sf(e);if(n!==e)return U(n,t,1,r)}else if((n===bo||n===xo)&&sT(t)&&8192&Tx(t)&&!sT(e))return 0}if(2621440&_&&524288&u){const n=r&&l===o.errorInfo&&!d;if(a=se(e,t,n,void 0,!1,i),a&&(a&=ce(e,t,0,n,i),a&&(a&=ce(e,t,1,n,i),a&&(a&=me(e,t,d,n,i)))),c&&a)l=s||l||o.errorInfo;else if(a)return a}if(2621440&_&&1048576&u){const r=UE(t,36175872);if(1048576&r.flags){const t=function(e,t){var r;const i=Qp(e),o=ZN(i,t);if(!o)return 0;let a=1;for(const n of o)if(a*=OE(M_(n)),a>25)return null==(r=Yn)||r.instant(Yn.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:e.id,targetId:t.id,numCombinations:a}),0;const s=new Array(o.length),c=new Set;for(let e=0;er[i],!1,0,V||n===ko))continue e}pe(_,a,bt),i=!0}if(!i)return 0}let u=-1;for(const t of _)if(u&=se(e,t,!1,c,!1,0),u&&(u&=ce(e,t,0,!1,0),u&&(u&=ce(e,t,1,!1,0),!u||fw(e)&&fw(t)||(u&=me(e,t,!1,!1,0)))),!u)return u;return u}(e,r);if(t)return t}}}var m;return 0;function h(e){return e?Pe(e,(e,t)=>e+1+h(t.next),0):0}function y(e,t,i,_){if(a=function(e=p,t=p,r=p,i,o){if(e.length!==t.length&&n===To)return 0;const a=e.length<=t.length?e.length:t.length;let s=-1;for(let c=0;c!!(24&e)))return s=void 0,void P(o);const u=t&&function(e,t){for(let n=0;n!(7&e))))return 0;s=l,P(o)}}}(e,t,r,i,o);if(n!==To){if(!a&&(2097152&e.flags||262144&e.flags&&1048576&t.flags)){const n=function(e,t){let n,r=!1;for(const i of e)if(465829888&i.flags){let e=ef(i);for(;e&&21233664&e.flags;)e=ef(e);e&&(n=le(n,e),t&&(n=le(n,i)))}else(469892092&i.flags||cT(i))&&(r=!0);if(n&&(t||r)){if(r)for(const t of e)(469892092&t.flags||cT(t))&&(n=le(n,t));return CT(Gb(n,2),!1)}}(2097152&e.flags?e.types:[e],!!(1048576&t.flags));n&&CE(n,t=>t!==e)&&(a=U(n,t,1,!1,void 0,i))}a&&!(2&i)&&2097152&t.flags&&!Lx(t)&&2621440&e.flags?(a&=se(e,t,r,void 0,!1,0),a&&IN(e)&&8192&Tx(e)&&(a&=me(e,t,!1,r,0))):a&&fS(t)&&!HC(t)&&2097152&e.flags&&3670016&Pf(e).flags&&!X(e.types,e=>e===t||!!(262144&Tx(e)))&&(a&=se(e,t,r,void 0,!0,i))}a&&P(o);return a}(e,t,r,i),null==(c=Yn)||c.pop()),Qt&&(Qt=C),1&o&&b--,2&o&&x--,S=y,w?(-1===w||0===b&&0===x)&&E(-1===w||3===w):(n.set(_,2|D),N--,E(!1)),w;function E(e){for(let t=h;t{r.push(Ck(e,pk(t.mapper,up(t),n)))}),zb(r)}function re(e,t){if(!t||0===e.length)return e;let n;for(let r=0;r{return!!(4&dx(t))&&(n=e,r=IC(t),!AC(n,e=>{const t=IC(e);return!!t&&K_(t,r)}));var n,r})}(r,i))return a&&M(ha.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,dc(i),mc(IC(r)||e),mc(IC(i)||t)),0}else if(4&l)return a&&M(ha.Property_0_is_protected_in_type_1_but_public_in_type_2,dc(i),mc(e),mc(t)),0;if(n===xo&&Yj(r)&&!Yj(i))return 0;const u=function(e,t,r,i,o){const a=V&&!!(48&ux(t)),s=Pl(M_(t),!1,a);return s.flags&(n===xo?1:3)?-1:U(r(e),s,3,i,void 0,o)}(r,i,o,a,s);return u?!c&&16777216&r.flags&&106500&i.flags&&!(16777216&i.flags)?(a&&M(ha.Property_0_is_optional_in_type_1_but_required_in_type_2,dc(i),mc(e),mc(t)),0):u:(a&&I(ha.Types_of_property_0_are_incompatible,dc(i)),0)}function se(e,t,r,i,a,s){if(n===To)return function(e,t,n){if(!(524288&e.flags&&524288&t.flags))return 0;const r=re(qp(e),n),i=re(qp(t),n);if(r.length!==i.length)return 0;let o=-1;for(const e of r){const n=Kp(t,e.escapedName);if(!n)return 0;const r=zC(e,n,U);if(!r)return 0;o&=r}return o}(e,t,i);let c=-1;if(fw(t)){if(HC(e)){if(!t.target.readonly&&(KC(e)||fw(e)&&e.target.readonly))return 0;const n=xy(e),o=xy(t),a=fw(e)?4&e.target.combinedFlags:4,l=!!(12&t.target.combinedFlags),_=fw(e)?e.target.minLength:0,u=t.target.minLength;if(!a&&n!(e&t));return n>=0?n:e.elementFlags.length}(t.target,11),m=Eb(t.target,11);let g=!!i;for(let a=0;a=f?o-1-Math.min(u,m):a,y=t.target.elementFlags[h];if(8&y&&!(8&_))return r&&M(ha.Source_provides_no_match_for_variadic_element_at_position_0_in_target,h),0;if(8&_&&!(12&y))return r&&M(ha.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,a,h),0;if(1&y&&!(1&_))return r&&M(ha.Source_provides_no_match_for_required_element_at_position_0_in_target,h),0;if(g&&((12&_||12&y)&&(g=!1),g&&(null==i?void 0:i.has(""+a))))continue;const v=Iw(d[a],!!(_&y&2)),b=p[h],x=U(v,8&_&&4&y?Hv(b):Iw(b,!!(2&y)),3,r,void 0,s);if(!x)return r&&(o>1||n>1)&&(l&&a>=f&&u>=m&&f!==n-m-1?I(ha.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,f,n-m-1,h):I(ha.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,a,h)),0;c&=x}return c}if(12&t.target.combinedFlags)return 0}const _=!(n!==bo&&n!==xo||IN(e)||tw(e)||fw(e)),u=vN(e,t,_,!1);if(u)return r&&function(e,t){const n=Sm(e,0),r=Sm(e,1),i=qp(e);if((n.length||r.length)&&!i.length)return!!(Cm(t,0).length&&n.length||Cm(t,1).length&&r.length);return!0}(e,t)&&function(e,t,n,r){let i=!1;if(n.valueDeclaration&&Fc(n.valueDeclaration)&&mD(n.valueDeclaration.name)&&e.symbol&&32&e.symbol.flags){const r=n.valueDeclaration.name.escapedText,i=Qh(e.symbol,r);if(i&&xm(e,i)){const n=kw.getDeclarationName(e.symbol.valueDeclaration),i=kw.getDeclarationName(t.symbol.valueDeclaration);return void M(ha.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2,ya(r),ya(""===n.escapedText?eJ:n),ya(""===i.escapedText?eJ:i))}}const a=Be(yN(e,t,r,!1));if((!o||o.code!==ha.Class_0_incorrectly_implements_interface_1.code&&o.code!==ha.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(i=!0),1===a.length){const r=dc(n,void 0,0,20);M(ha.Property_0_is_missing_in_type_1_but_required_in_type_2,r,...gc(e,t)),m(n.declarations)&&B(Wp(n.declarations[0],ha._0_is_declared_here,r)),i&&l&&T++}else z(e,t,!1)&&(a.length>5?M(ha.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,mc(e),mc(t),O(a.slice(0,4),e=>dc(e)).join(", "),a.length-4):M(ha.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,mc(e),mc(t),O(a,e=>dc(e)).join(", ")),i&&l&&T++)}(e,t,u,_),0;if(IN(t))for(const n of re(Qp(e),i))if(!Kp(t,n.escapedName)){if(!(32768&j_(n).flags))return r&&M(ha.Property_0_does_not_exist_on_type_1,dc(n),mc(t)),0}const d=Qp(t),p=fw(e)&&fw(t);for(const o of re(d,i)){const i=o.escapedName;if(!(4194304&o.flags)&&(!p||HT(i)||"length"===i)&&(!a||16777216&o.flags)){const a=xm(e,i);if(a&&a!==o){const i=oe(e,t,a,o,M_,r,s,n===ko);if(!i)return 0;c&=i}}}return c}function ce(e,t,r,i,o){var a,s;if(n===To)return function(e,t,n){const r=Cm(e,n),i=Cm(t,n);if(r.length!==i.length)return 0;let o=-1;for(let e=0;efc(e,void 0,262144,r);return M(ha.Type_0_is_not_assignable_to_type_1,e(t),e(c)),M(ha.Types_of_construct_signatures_are_incompatible),d}}else e:for(const t of u){const n=A();let a=i;for(const e of _){const r=de(e,t,!0,a,o,p(e,t));if(r){d&=r,P(n);continue e}a=!1}return a&&M(ha.Type_0_provides_no_match_for_the_signature_1,mc(e),fc(t,void 0,void 0,r)),0}return d}function _e(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(ha.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,mc(e),mc(t)):(e,t)=>I(ha.Call_signature_return_types_0_and_1_are_incompatible,mc(e),mc(t))}function ue(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(ha.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,mc(e),mc(t)):(e,t)=>I(ha.Construct_signature_return_types_0_and_1_are_incompatible,mc(e),mc(t))}function de(e,t,r,i,o,a){const s=n===bo?16:n===xo?24:0;return rT(r?Oh(e):e,r?Oh(t):t,s,i,M,a,function(e,t,n){return U(e,t,3,n,void 0,o)},Cn)}function fe(e,t,n,r){const i=U(e.type,t.type,3,n,void 0,r);return!i&&n&&(e.keyType===t.keyType?M(ha._0_index_signatures_are_incompatible,mc(e.keyType)):M(ha._0_and_1_index_signatures_are_incompatible,mc(e.keyType),mc(t.keyType))),i}function me(e,t,r,i,o){if(n===To)return function(e,t){const n=Gm(e),r=Gm(t);if(n.length!==r.length)return 0;for(const t of r){const n=ig(e,t.keyType);if(!n||!U(n.type,t.type,3)||n.isReadonly!==t.isReadonly)return 0}return-1}(e,t);const a=Gm(t),s=X(a,e=>e.keyType===Ut);let c=-1;for(const t of a){const a=n!==xo&&!r&&s&&1&t.type.flags?-1:Pp(e)&&s?U(Sp(e),t.type,3,i):ge(e,t,i,o);if(!a)return 0;c&=a}return c}function ge(e,t,r,i){const o=dg(e,t.keyType);return o?fe(o,t,r,i):1&i||!(n!==xo||8192&Tx(e))||!jw(e)?(r&&M(ha.Index_signature_for_type_0_is_missing_in_type_1,mc(t.keyType),mc(e)),0):function(e,t,n,r){let i=-1;const o=t.keyType,a=2097152&e.flags?Xp(e):qp(e);for(const s of a)if(!ST(e,s)&&$m(ix(s,8576),o)){const e=M_(s),a=U(ie||32768&e.flags||o===Vt||!(16777216&s.flags)?e:uD(e,524288),t.type,3,n,void 0,r);if(!a)return n&&M(ha.Property_0_is_incompatible_with_index_signature,dc(s)),0;i&=a}for(const a of Gm(e))if($m(a.keyType,o)){const e=fe(a,t,n,r);if(!e)return 0;i&=e}return i}(e,t,r,i)}}function MT(e){if(16&e.flags)return!1;if(3145728&e.flags)return!!g(e.types,MT);if(465829888&e.flags){const t=ef(e);if(t&&t!==e)return MT(t)}return ow(e)||!!(134217728&e.flags)||!!(268435456&e.flags)}function RT(e,t){return fw(e)&&fw(t)?p:Qp(t).filter(t=>BT(Yc(e,t.escapedName),j_(t)))}function BT(e,t){return!!e&&!!t&&oM(e,32768)&&!!Ow(t)}function zT(e,t,n=jk){return Qq(e,t,n)||function(e,t){const n=Tx(e);if(20&n&&1048576&t.flags)return T(t.types,t=>{if(524288&t.flags){const r=n&Tx(t);if(4&r)return e.target===t.target;if(16&r)return!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}return!1})}(e,t)||function(e,t){if(128&Tx(e)&&fE(t,QC))return T(t.types,e=>!QC(e))}(e,t)||function(e,t){let n=0;const r=Cm(e,n).length>0||(n=1,Cm(e,n).length>0);if(r)return T(t.types,e=>Cm(e,n).length>0)}(e,t)||function(e,t){let n;if(!(406978556&e.flags)){let r=0;for(const i of t.types)if(!(406978556&i.flags)){const t=Gb([cx(e),cx(i)]);if(4194304&t.flags)return i;if(ow(t)||1048576&t.flags){const e=1048576&t.flags?F(t.types,ow):1;e>=r&&(n=i,r=e)}}}return n}(e,t)}function qT(e,t,n){const r=e.types,i=r.map(e=>402784252&e.flags?0:-1);for(const[e,o]of t){let t=!1;for(let a=0;a!!n(e,s))?t=!0:i[a]=3)}for(let e=0;ei[t]),0):e;return 131072&o.flags?e:o}function KT(e){if(524288&e.flags){const t=Lp(e);return 0===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.indexInfos.length&&t.properties.length>0&&k(t.properties,e=>!!(16777216&e.flags))}return 33554432&e.flags?KT(e.baseType):!!(2097152&e.flags)&&k(e.types,KT)}function QT(e){return e===Zn||e===er||8&e.objectFlags?S:uC(e.symbol,e.typeParameters)}function nC(e){return uC(e,ca(e).typeParameters)}function uC(e,t=p){var n,r;const i=ca(e);if(!i.variances){null==(n=Yn)||n.push(Yn.Phase.CheckTypes,"getVariancesWorker",{arity:t.length,id:Ab(Pu(e))});const o=Ki,a=$i;Ki||(Ki=!0,$i=Ui.length),i.variances=p;const s=[];for(const n of t){const t=bC(n);let r=16384&t?8192&t?0:1:8192&t?2:void 0;if(void 0===r){let t=!1,i=!1;const o=Qt;Qt=e=>e?i=!0:t=!0;const a=pC(e,n,Bn),s=pC(e,n,Jn);r=(Jk(s,a)?1:0)|(Jk(a,s)?2:0),3===r&&Jk(pC(e,n,zn),a)&&(r=4),Qt=o,(t||i)&&(t&&(r|=8),i&&(r|=16))}s.push(r)}o||(Ki=!1,$i=a),i.variances=s,null==(r=Yn)||r.pop({variances:s.map(gn.formatVariance)})}return i.variances}function pC(e,t,n){const r=ik(t,n),i=Pu(e);if(nl(i))return i;const o=524288&e.flags?ky(e,GS(ca(e).typeParameters,r)):my(i,GS(i.typeParameters,r));return yt.add(Ab(o)),o}function vC(e){return yt.has(Ab(e))}function bC(e){var t;return 28672&Pe(null==(t=e.symbol)?void 0:t.declarations,(e,t)=>e|Kv(t),0)}function SC(e){return 262144&e.flags&&!uf(e)}function DC(e){return function(e){return!!(4&Tx(e))&&!e.node}(e)&&X(by(e),e=>!!(262144&e.flags)||DC(e))}function EC(e,t,n,r,i){if(r===To&&e.id>t.id){const n=e;e=t,t=n}const o=n?":"+n:"";return DC(e)&&DC(t)?function(e,t,n,r){const i=[];let o="";const a=c(e,0),s=c(t,0);return`${o}${a},${s}${n}`;function c(e,t=0){let n=""+e.target.id;for(const a of by(e)){if(262144&a.flags){if(r||SC(a)){let e=i.indexOf(a);e<0&&(e=i.length,i.push(a)),n+="="+e;continue}o="*"}else if(t<4&&DC(a)){n+="<"+c(a,t+1)+">";continue}n+="-"+a.id}return n}}(e,t,o,i):`${e.id},${t.id}${o}`}function AC(e,t){if(!(6&ux(e)))return t(e);for(const n of e.links.containingType.types){const r=xm(n,e.escapedName),i=r&&AC(r,t);if(i)return i}}function IC(e){return e.parent&&32&e.parent.flags?Pu(Cs(e)):void 0}function OC(e){const t=IC(e),n=t&&mu(t)[0];return n&&Yc(n,e.escapedName)}function LC(e,t,n){return AC(t,t=>!!(4&dx(t,n))&&!K_(e,IC(t)))?void 0:e}function jC(e,t,n,r=3){if(n>=r){if(96&~Tx(e)||(e=MC(e)),2097152&e.flags)return X(e.types,e=>jC(e,t,n,r));const i=BC(e);let o=0,a=0;for(let e=0;e=a&&(o++,o>=r))return!0;a=n.id}}}return!1}function MC(e){let t;for(;!(96&~Tx(e))&&(t=Np(e))&&(t.symbol||2097152&t.flags&&X(t.types,e=>!!e.symbol));)e=t;return e}function RC(e,t){return 96&~Tx(e)||(e=MC(e)),2097152&e.flags?X(e.types,e=>RC(e,t)):BC(e)===t}function BC(e){if(524288&e.flags&&!ON(e)){if(4&Tx(e)&&e.node)return e.node;if(e.symbol&&!(16&Tx(e)&&32&e.symbol.flags))return e.symbol;if(fw(e))return e.target}if(262144&e.flags)return e.symbol;if(8388608&e.flags){do{e=e.objectType}while(8388608&e.flags);return e}return 16777216&e.flags?e.root:e}function JC(e,t){return 0!==zC(e,t,Lk)}function zC(e,t,n){if(e===t)return-1;const r=6&dx(e);if(r!==(6&dx(t)))return 0;if(r){if(jJ(e)!==jJ(t))return 0}else if((16777216&e.flags)!=(16777216&t.flags))return 0;return Yj(e)!==Yj(t)?0:n(j_(e),j_(t))}function qC(e,t,n,r,i,o){if(e===t)return-1;if(!function(e,t,n){const r=gj(e),i=gj(t),o=hj(e),a=hj(t),s=yj(e),c=yj(t);return r===i&&o===a&&s===c||!!(n&&o<=a)}(e,t,n))return 0;if(m(e.typeParameters)!==m(t.typeParameters))return 0;if(t.typeParameters){const n=ZS(e.typeParameters,t.typeParameters);for(let r=0;re|(1048576&t.flags?UC(t.types):t.flags),0)}function VC(e){if(1===e.length)return e[0];const t=V?j(e,e=>EE(e,e=>!(98304&e.flags))):e,n=function(e){let t;for(const n of e)if(!(131072&n.flags)){const e=cw(n);if(t??(t=e),e===n||e!==t)return!1}return!0}(t)?zb(t):function(e){const t=Pe(e,(e,t)=>Bk(e,t)?t:e);return k(e,e=>e===t||Bk(e,t))?t:Pe(e,(e,t)=>Rk(e,t)?t:e)}(t);return t===e?n:Tw(n,98304&UC(e))}function WC(e){return!!(4&Tx(e))&&(e.target===Zn||e.target===er)}function KC(e){return!!(4&Tx(e))&&e.target===er}function HC(e){return WC(e)||fw(e)}function GC(e){return WC(e)&&!KC(e)||fw(e)&&!e.target.readonly}function XC(e){return WC(e)?by(e)[0]:void 0}function QC(e){return WC(e)||!(98304&e.flags)&&Jk(e,_r)}function YC(e){return GC(e)||!(98305&e.flags)&&Jk(e,cr)}function ZC(e){if(!(4&Tx(e)&&3&Tx(e.target)))return;if(33554432&Tx(e))return 67108864&Tx(e)?e.cachedEquivalentBaseType:void 0;e.objectFlags|=33554432;const t=e.target;if(1&Tx(t)){const e=su(t);if(e&&80!==e.expression.kind&&212!==e.expression.kind)return}const n=mu(t);if(1!==n.length)return;if(Td(e.symbol).size)return;let r=m(t.typeParameters)?Ck(n[0],ZS(t.typeParameters,by(e).slice(0,t.typeParameters.length))):n[0];return m(by(e))>m(t.typeParameters)&&(r=Pd(r,Te(by(e)))),e.objectFlags|=67108864,e.cachedEquivalentBaseType=r}function ew(e){return V?e===dn:e===jt}function tw(e){const t=XC(e);return!!t&&ew(t)}function nw(e){let t;return fw(e)||!!xm(e,"0")||QC(e)&&!!(t=Yc(e,"length"))&&CE(t,e=>!!(256&e.flags))}function rw(e){return QC(e)||nw(e)}function iw(e){return!(240544&e.flags)}function ow(e){return!!(109472&e.flags)}function aw(e){const t=Sf(e);return 2097152&t.flags?X(t.types,ow):ow(t)}function sw(e){return!!(16&e.flags)||(1048576&e.flags?!!(1024&e.flags)||k(e.types,ow):ow(e))}function cw(e){return 1056&e.flags?Su(e):402653312&e.flags?Ut:256&e.flags?Vt:2048&e.flags?Wt:512&e.flags?Yt:1048576&e.flags?function(e){const t=`B${Ab(e)}`;return Ao(t)??Io(t,ME(e,cw))}(e):e}function lw(e){return 402653312&e.flags?Ut:288&e.flags?Vt:2048&e.flags?Wt:512&e.flags?Yt:1048576&e.flags?ME(e,lw):e}function _w(e){return 1056&e.flags&&kS(e)?Su(e):128&e.flags&&kS(e)?Ut:256&e.flags&&kS(e)?Vt:2048&e.flags&&kS(e)?Wt:512&e.flags&&kS(e)?Yt:1048576&e.flags?ME(e,_w):e}function uw(e){return 8192&e.flags?nn:1048576&e.flags?ME(e,uw):e}function dw(e,t){return EM(e,t)||(e=uw(_w(e))),SS(e)}function pw(e,t,n,r){if(e&&ow(e)){e=dw(e,t?HB(n,t,r):void 0)}return e}function fw(e){return!!(4&Tx(e)&&8&e.target.objectFlags)}function mw(e){return fw(e)&&!!(8&e.target.combinedFlags)}function gw(e){return mw(e)&&1===e.target.elementFlags.length}function hw(e){return vw(e,e.target.fixedLength)}function yw(e,t,n){return ME(e,e=>{const r=e,i=hw(r);return i?n&&t>=Fb(r.target)?zb([i,n]):i:Lt})}function vw(e,t,n=0,r=!1,i=!1){const o=xy(e)-n;if(tlD(e,4194304))}function Sw(e){return 4&e.flags?Ji:8&e.flags?zi:64&e.flags?qi:e===Ht||e===$t||114691&e.flags||128&e.flags&&""===e.value||256&e.flags&&0===e.value||2048&e.flags&&bw(e)?e:cn}function Tw(e,t){const n=t&~e.flags&98304;return 0===n?e:zb(32768===n?[e,Lt]:65536===n?[e,zt]:[e,Lt,zt])}function ww(e,t=!1){gn.assert(V);const n=t?Rt:Lt;return e===n||1048576&e.flags&&e.types[0]===n?e:zb([e,n])}function Nw(e){return V?dD(e,2097152):e}function Dw(e){return V?zb([e,Bt]):e}function Fw(e){return V?PE(e,Bt):e}function Pw(e,t,n){return n?Nl(t)?ww(e):Dw(e):e}function Aw(e,t){return wl(t)?Nw(e):Tl(t)?Fw(e):e}function Iw(e,t){return ie&&t?PE(e,Mt):e}function Ow(e){return e===Mt||!!(1048576&e.flags)&&e.types[0]===Mt}function Lw(e){return ie?PE(e,Mt):uD(e,524288)}function jw(e){const t=Tx(e);return 2097152&e.flags?k(e.types,jw):!(!(e.symbol&&7040&e.symbol.flags)||32&e.symbol.flags||Oz(e))||!!(4194304&t)||!!(1024&t&&jw(e.source))}function Mw(e,t){const n=Xo(e.flags,e.escapedName,8&ux(e));n.declarations=e.declarations,n.parent=e.parent,n.links.type=t,n.links.target=e,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration);const r=ca(e).nameType;return r&&(n.links.nameType=r),n}function Rw(e){if(!(IN(e)&&8192&Tx(e)))return e;const t=e.regularType;if(t)return t;const n=e,r=function(e,t){const n=nd();for(const r of qp(e)){const e=j_(r),i=t(e);n.set(r.escapedName,i===e?r:Mw(r,i))}return n}(e,Rw),i=Ks(n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);return i.flags=n.flags,i.objectFlags|=-8193&n.objectFlags,e.regularType=i,i}function Bw(e,t,n){return{parent:e,propertyName:t,siblings:n,resolvedProperties:void 0}}function zw(e){if(!e.siblings){const t=[];for(const n of zw(e.parent))if(IN(n)){const r=Kp(n,e.propertyName);r&&pE(j_(r),e=>{t.push(e)})}e.siblings=t}return e.siblings}function Vw(e){if(!e.resolvedProperties){const t=new Map;for(const n of zw(e))if(IN(n)&&!(2097152&Tx(n)))for(const e of Qp(n))t.set(e.escapedName,e);e.resolvedProperties=Be(t.values())}return e.resolvedProperties}function Ww(e,t){if(!(4&e.flags))return e;const n=j_(e),r=Gw(n,t&&Bw(t,e.escapedName,void 0));return r===n?e:Mw(e,r)}function Kw(e){const t=ht.get(e.escapedName);if(t)return t;const n=Mw(e,Rt);return n.flags|=16777216,ht.set(e.escapedName,n),n}function Hw(e){return Gw(e,void 0)}function Gw(e,t){if(196608&Tx(e)){if(void 0===t&&e.widened)return e.widened;let n;if(98305&e.flags)n=wt;else if(IN(e))n=function(e,t){const n=nd();for(const r of qp(e))n.set(r.escapedName,Ww(r,t));if(t)for(const e of Vw(t))n.has(e.escapedName)||n.set(e.escapedName,Kw(e));const r=Ks(e.symbol,n,p,p,j(Gm(e),e=>qh(e.keyType,Hw(e.type),e.isReadonly,e.declaration,e.components)));return r.objectFlags|=266240&Tx(e),r}(e,t);else if(1048576&e.flags){const r=t||Bw(void 0,void 0,e.types),i=j(e.types,e=>98304&e.flags?e:Gw(e,r));n=zb(i,X(i,sT)?2:1)}else 2097152&e.flags?n=Gb(j(e.types,Hw)):HC(e)&&(n=my(e.target,j(by(e),Hw)));return n&&void 0===t&&(e.widened=n),n||e}return e}function Xw(e){var t;let n=!1;if(65536&Tx(e))if(1048576&e.flags)if(X(e.types,sT))n=!0;else for(const t of e.types)n||(n=Xw(t));else if(HC(e))for(const t of by(e))n||(n=Xw(t));else if(IN(e))for(const r of qp(e)){const i=j_(r);if(65536&Tx(i)&&(n=Xw(i),!n)){const o=null==(t=r.declarations)?void 0:t.find(t=>{var n;return(null==(n=t.symbol.valueDeclaration)?void 0:n.parent)===e.symbol.valueDeclaration});o&&(Jo(o,ha.Object_literal_s_property_0_implicitly_has_an_1_type,dc(r),mc(Hw(i))),n=!0)}}return n}function Qw(e,t,n){const r=mc(Hw(t));if(Mm(e)&&!_T(wd(e),E))return;let i;switch(e.kind){case 227:case 173:case 172:i=Z?ha.Member_0_implicitly_has_an_1_type:ha.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 170:const t=e;if(fD(t.name)){const n=Tc(t.name);if((qD(t.parent)||jD(t.parent)||KD(t.parent))&&t.parent.parameters.includes(t)&&(ze(t,t.name.escapedText,788968,void 0,!0)||n&&Fx(n))){const n="arg"+t.parent.parameters.indexOf(t),r=Bp(t.name)+(t.dotDotDotToken?"[]":"");return void Uo(Z,e,ha.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,n,r)}}i=e.dotDotDotToken?Z?ha.Rest_parameter_0_implicitly_has_an_any_type:ha.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:Z?ha.Parameter_0_implicitly_has_an_1_type:ha.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 209:if(i=ha.Binding_element_0_implicitly_has_an_1_type,!Z)return;break;case 318:return void Jo(e,ha.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);case 324:return void(Z&&UP(e.parent)&&Jo(e.parent.tagName,ha.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation,r));case 263:case 175:case 174:case 178:case 179:case 219:case 220:if(Z&&!e.name)return void Jo(e,3===n?ha.Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation:ha.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);i=Z?3===n?ha._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:ha._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:ha._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 201:return void(Z&&Jo(e,ha.Mapped_object_type_implicitly_has_an_any_template_type));default:i=Z?ha.Variable_0_implicitly_has_an_1_type:ha.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}Uo(Z,e,i,Bp(Ac(e)),r)}function Yw(e,t,n){a(()=>{Z&&65536&Tx(t)&&(!n||d_(e)&&function(e,t){const n=iI(e);if(!n)return!0;let r=ah(n);const i=zh(e);switch(t){case 1:return 1&i?r=HB(1,r,!!(2&i))??r:2&i&&(r=wR(r)??r),Ix(r);case 3:const e=HB(0,r,!!(2&i));return!!e&&Ix(e);case 2:const t=HB(2,r,!!(2&i));return!!t&&Ix(t)}return!1}(e,n))&&(Xw(t)||Qw(e,t,n))})}function Zw(e,t,n){const r=gj(e),i=gj(t),o=vj(e),a=vj(t),s=a?i-1:i,c=o?s:Math.min(r,s),l=eh(e);if(l){const e=eh(t);e&&n(l,e)}for(let r=0;re.typeParameter),O(e.inferences,(t,n)=>()=>(t.isFixed||(!function(e){if(e.intraExpressionInferenceSites){for(const{node:t,type:n}of e.intraExpressionInferenceSites){const r=175===t.kind?OA(t,2):$A(t,2);r&&FN(e.inferences,n,r)}e.intraExpressionInferenceSites=void 0}}(e),iN(e.inferences),t.isFixed=!0),MN(e,n))))}(i),i.nonFixingMapper=function(e){return sk(O(e.inferences,e=>e.typeParameter),O(e.inferences,(t,n)=>()=>MN(e,n)))}(i),i}function iN(e){for(const t of e)t.isFixed||(t.inferredType=void 0)}function oN(e,t,n){(e.intraExpressionInferenceSites??(e.intraExpressionInferenceSites=[])).push({node:t,type:n})}function cN(e){return{typeParameter:e,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function lN(e){return{typeParameter:e.typeParameter,candidates:e.candidates&&e.candidates.slice(),contraCandidates:e.contraCandidates&&e.contraCandidates.slice(),inferredType:e.inferredType,priority:e.priority,topLevel:e.topLevel,isFixed:e.isFixed,impliedArity:e.impliedArity}}function _N(e){return e&&e.mapper}function dN(e){const t=Tx(e);if(524288&t)return!!(1048576&t);const n=!!(465829888&e.flags||524288&e.flags&&!pN(e)&&(4&t&&(e.node||X(by(e),dN))||16&t&&e.symbol&&14384&e.symbol.flags&&e.symbol.declarations||12583968&t)||3145728&e.flags&&!(1024&e.flags)&&!pN(e)&&X(e.types,dN));return 3899393&e.flags&&(e.objectFlags|=524288|(n?1048576:0)),n}function pN(e){if(e.aliasSymbol&&!e.aliasTypeArguments){const t=ed(e.aliasSymbol,266);return!(!t||!yc(t.parent,e=>308===e.kind||268!==e.kind&&"quit"))}return!1}function fN(e,t,n=0){return!!(e===t||3145728&e.flags&&X(e.types,e=>fN(e,t,n))||n<3&&16777216&e.flags&&(fN(Yx(e),t,n+1)||fN(eS(e),t,n+1)))}function mN(e,t,n){const r=e.id+","+t.id+","+n.id;if(xi.has(r))return xi.get(r);const i=function(e,t,n){if(!(ig(e,Ut)||0!==Qp(e).length&&gN(e)))return;if(WC(e)){const r=hN(by(e)[0],t,n);if(!r)return;return Hv(r,KC(e))}if(fw(e)){const r=O(Pb(e),e=>hN(e,t,n));if(!k(r,e=>!!e))return;return ob(r,4&Dp(t)?j(e.target.elementFlags,e=>2&e?1:e):e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations)}const r=zs(1040,void 0);return r.source=e,r.mappedType=t,r.constraintType=n,r}(e,t,n);return xi.set(r,i),i}function gN(e){return!(262144&Tx(e))||IN(e)&&X(Qp(e),e=>gN(j_(e)))||fw(e)&&X(Pb(e),gN)}function hN(e,t,n){const r=e.id+","+t.id+","+n.id;if(bi.has(r))return bi.get(r)||Ot;fo.push(e),mo.push(t);const i=go;let o;return jC(e,fo,fo.length,2)&&(go|=1),jC(t,mo,mo.length,2)&&(go|=2),3!==go&&(o=function(e,t,n){const r=qx(n.type,up(t)),i=Sp(t),o=cN(r);return FN([o],e,i),bN(o)||Ot}(e,t,n)),fo.pop(),mo.pop(),go=i,bi.set(r,o),o}function*yN(e,t,n,r){const i=Qp(t);for(const t of i)if(!od(t)&&(n||!(16777216&t.flags||48&ux(t)))){const n=xm(e,t.escapedName);if(n){if(r){const e=j_(t);if(109472&e.flags){const r=j_(n);1&r.flags||SS(r)===SS(e)||(yield t)}}}else yield t}}function vN(e,t,n,r){return be(yN(e,t,n,r))}function bN(e){return e.candidates?zb(e.candidates,2):e.contraCandidates?Gb(e.contraCandidates):void 0}function xN(e){return!!la(e).skipDirectInference}function SN(e){return!(!e.symbol||!X(e.symbol.declarations,xN))}function kN(e,t){if(""===e)return!1;const n=+e;return isFinite(n)&&(!t||""+n===e)}function TN(e){return ES(wT(e))}function CN(e,t){if(1&t.flags)return!0;if(134217732&t.flags)return Jk(e,t);if(268435456&t.flags){const n=[];for(;268435456&t.flags;)n.unshift(t.symbol),t=t.type;return Pe(n,(e,t)=>hx(t,e),e)===e&&CN(e,t)}return!1}function wN(e,t){if(2097152&t.flags)return k(t.types,t=>t===Pn||wN(e,t));if(4&t.flags||Jk(e,t))return!0;if(128&e.flags){const n=e.value;return!!(8&t.flags&&kN(n,!1)||64&t.flags&&NT(n,!1)||98816&t.flags&&n===t.intrinsicName||268435456&t.flags&&CN(e,t)||134217728&t.flags&&DN(e,t))}if(134217728&e.flags){const n=e.texts;return 2===n.length&&""===n[0]&&""===n[1]&&Jk(e.types[0],t)}return!1}function NN(e,t){return 128&e.flags?EN([e.value],p,t):134217728&e.flags?ae(e.texts,t.texts)?O(e.types,(e,n)=>{return Jk(Sf(e),Sf(t.types[n]))?e:402653317&(r=e).flags?r:_x(["",""],[r]);var r}):EN(e.texts,e.types,t):void 0}function DN(e,t){const n=NN(e,t);return!!n&&k(n,(e,n)=>wN(e,t.types[n]))}function EN(e,t,n){const r=e.length-1,i=e[0],o=e[r],a=n.texts,s=a.length-1,c=a[0],l=a[s];if(0===r&&i.length0){let t=d,r=p;for(;r=f(t).indexOf(n,r),!(r>=0);){if(t++,t===e.length)return;r=0}m(t,r),p+=n.length}else if(p{if(!(128&e.flags))return;const n=xc(e.value),r=Xo(4,n);r.links.type=wt,e.symbol&&(r.declarations=e.symbol.declarations,r.valueDeclaration=e.symbol.valueDeclaration),t.set(n,r)});const n=4&e.flags?[qh(Ut,Nn,!1)]:p;return Ks(void 0,t,p,p,n)}(t),a.type,256)}else if(8388608&t.flags&&8388608&a.flags)d(t.objectType,a.objectType),d(t.indexType,a.indexType);else if(268435456&t.flags&&268435456&a.flags)t.symbol===a.symbol&&d(t.type,a.type);else if(33554432&t.flags)d(t.baseType,a),f(Ly(t),a,4);else if(16777216&a.flags)m(t,a,C);else if(3145728&a.flags)x(t,a.types,a.flags);else if(1048576&t.flags){const e=t.types;for(const t of e)d(t,a)}else if(134217728&a.flags)!function(e,t){const n=NN(e,t),r=t.types;if(n||k(t.texts,e=>0===e.length))for(let e=0;ee|t.flags,0);if(!(4&r)){const n=t.value;296&r&&!kN(n,!0)&&(r&=-297),2112&r&&!NT(n,!0)&&(r&=-2113);const o=Pe(e,(e,i)=>i.flags&r?4&e.flags?e:4&i.flags?t:134217728&e.flags?e:134217728&i.flags&&DN(t,i)?t:268435456&e.flags?e:268435456&i.flags&&n===yx(i.symbol,n)?t:128&e.flags?e:128&i.flags&&i.value===n?i:8&e.flags?e:8&i.flags?CS(+n):32&e.flags?e:32&i.flags?CS(+n):256&e.flags?e:256&i.flags&&i.value===+n?i:64&e.flags?e:64&i.flags?TN(n):2048&e.flags?e:2048&i.flags&&TT(i.value)===n?i:16&e.flags?e:16&i.flags?"true"===n?Gt:"false"===n?$t:Yt:512&e.flags?e:512&i.flags&&i.intrinsicName===n?i:32768&e.flags?e:32768&i.flags&&i.intrinsicName===n?i:65536&e.flags?e:65536&i.flags&&i.intrinsicName===n?i:e:e,cn);if(!(131072&o.flags)){d(o,i);continue}}}}d(t,i)}}(t,a);else{if(Pp(t=Qf(t))&&Pp(a)&&m(t,a,w),!(512&r&&467927040&t.flags)){const e=Pf(t);if(e!==t&&!(2621440&e.flags))return d(e,a);t=e}2621440&t.flags&&m(t,a,N)}else h(by(t),by(a),QT(t.target))}}}function f(e,t,n){const i=r;r|=n,d(e,t),r=i}function m(e,t,n){const r=e.id+","+t.id,i=a&&a.get(r);if(void 0!==i)return void(_=Math.min(_,i));(a||(a=new Map)).set(r,-1);const o=_;_=2048;const l=u;(s??(s=[])).push(e),(c??(c=[])).push(t),jC(e,s,s.length,2)&&(u|=1),jC(t,c,c.length,2)&&(u|=2),3!==u?n(e,t):_=-1,c.pop(),s.pop(),u=l,a.set(r,_),_=Math.min(_,o)}function g(e,t,n){let r,i;for(const o of t)for(const t of e)n(t,o)&&(d(t,o),r=fe(r,t),i=fe(i,o));return[r?P(e,e=>!D(r,e)):e,i?P(t,e=>!D(i,e)):t]}function h(e,t,n){const r=e.length!!b(e));if(!e||t&&e!==t)return;t=e}return t}(t);return void(n&&f(e,n,1))}if(1===i&&!s){const e=R(o,(e,t)=>a[t]?void 0:e);if(e.length)return void d(zb(e),n)}}else for(const n of t)b(n)?i++:d(e,n);if(2097152&n?1===i:i>0)for(const n of t)b(n)&&f(e,n,1)}function S(e,t,n){if(1048576&n.flags||2097152&n.flags){let r=!1;for(const i of n.types)r=S(e,t,i)||r;return r}if(4194304&n.flags){const r=b(n.type);if(r&&!r.isFixed&&!SN(e)){const i=mN(e,t,n);i&&f(i,r.typeParameter,262144&Tx(e)?16:8)}return!0}if(262144&n.flags){f(cx(e,e.pattern?2:0),n,32);const r=ef(n);if(r&&S(e,t,r))return!0;return d(zb(Y(O(Qp(e),j_),O(Gm(e),e=>e!==ui?e.type:cn))),Sp(t)),!0}return!1}function C(e,t){if(16777216&e.flags)d(e.checkType,t.checkType),d(e.extendsType,t.extendsType),d(Yx(e),Yx(t)),d(eS(e),eS(t));else{!function(e,t,n,i){const o=r;r|=i,x(e,t,n),r=o}(e,[Yx(t),eS(t)],t.flags,i?64:0)}}function w(e,t){d(dp(e),dp(t)),d(Sp(e),Sp(t));const n=hp(e),r=hp(t);n&&r&&d(n,r)}function N(e,t){var n,r;if(4&Tx(e)&&4&Tx(t)&&(e.target===t.target||WC(e)&&WC(t)))h(by(e),by(t),QT(e.target));else{if(Pp(e)&&Pp(t)&&w(e,t),32&Tx(t)&&!t.declaration.nameType){if(S(e,t,dp(t)))return}if(!function(e,t){return fw(e)&&fw(t)?function(e,t){return!(8&t.target.combinedFlags)&&t.target.minLength>e.target.minLength||!(12&t.target.combinedFlags)&&(!!(12&e.target.combinedFlags)||t.target.fixedLength(12&e)==(12&o.target.elementFlags[t])))){for(let t=0;t0){const e=Cm(t,n),o=e.length;for(let t=0;tRk(t,e)?t:e)}function jN(e,t){const n=function(e){if(e.length>1){const t=P(e,ON);if(t.length){const n=zb(t,2);return Y(P(e,e=>!ON(e)),[n])}}return e}(e.candidates),r=function(e){const t=uf(e);return!!t&&oM(16777216&t.flags?ff(t):t,406978556)}(e.typeParameter)||df(e.typeParameter),i=!r&&e.topLevel&&(e.isFixed||!function(e,t){const n=th(e);return n?!!n.type&&fN(n.type,t):fN(ah(e),t)}(t,e.typeParameter)),o=r?j(n,SS):i?j(n,_w):n;return Hw(416&e.priority?zb(o,2):VC(o))}function MN(e,t){const n=e.inferences[t];if(!n.inferredType){let r,i;if(e.signature){const o=n.candidates?jN(n,e.signature):void 0,a=n.contraCandidates?LN(n):void 0;if(o||a){const t=o&&(!a||!(131073&o.flags)&&X(n.contraCandidates,e=>Jk(o,e))&&k(e.inferences,e=>e!==n&&uf(e.typeParameter)!==n.typeParameter||k(e.candidates,e=>Jk(e,o))));r=t?o:a,i=t?a:o}else if(1&e.flags)r=_n;else{const i=wf(n.typeParameter);i&&(r=Ck(i,uk(function(e,t){const n=e.inferences.slice(t);return ZS(O(n,e=>e.typeParameter),O(n,()=>Ot))}(e,t),e.nonFixingMapper)))}}else r=bN(n);n.inferredType=r||RN(!!(2&e.flags));const o=uf(n.typeParameter);if(o){const t=Ck(o,e.nonFixingMapper);r&&e.compareTypes(r,Pd(t,r))||(n.inferredType=i&&e.compareTypes(i,Pd(t,i))?i:t)}!function(){for(let e=Bi-1;e>=0;e--)Ri[e].clear()}()}return n.inferredType}function RN(e){return e?wt:Ot}function BN(e){const t=[];for(let n=0;nxF(e)||SF(e)||XD(e)))}function UN(e,t,n,r){switch(e.kind){case 80:if(!yv(e)){const i=zN(e);return i!==vt?`${r?pJ(r):"-1"}|${Ab(t)}|${Ab(n)}|${fJ(i)}`:void 0}case 110:return`0|${r?pJ(r):"-1"}|${Ab(t)}|${Ab(n)}`;case 236:case 218:return UN(e.expression,t,n,r);case 167:const i=UN(e.left,t,n,r);return i&&`${i}.${e.right.escapedText}`;case 212:case 213:const o=WN(e);if(void 0!==o){const i=UN(e.expression,t,n,r);return i&&`${i}.${o}`}if(xE(e)&&fD(e.argumentExpression)){const i=zN(e.argumentExpression);if(KF(i)||YF(i)&&!LF(i)){const o=UN(e.expression,t,n,r);return o&&`${o}.@${fJ(i)}`}}break;case 207:case 208:case 263:case 219:case 220:case 175:return`${pJ(e)}#${Ab(t)}`}}function VN(e,t){switch(t.kind){case 218:case 236:return VN(e,t.expression);case 227:return ub(t)&&VN(e,t.left)||LE(t)&&28===t.operatorToken.kind&&VN(e,t.right)}switch(e.kind){case 237:return 237===t.kind&&e.keywordToken===t.keywordToken&&e.name.escapedText===t.name.escapedText;case 80:case 81:return yv(e)?110===t.kind:80===t.kind&&zN(e)===zN(t)||(hF(t)||hE(t))&&Ps(zN(e))===xs(t);case 110:return 110===t.kind;case 108:return 108===t.kind;case 236:case 218:case 239:return VN(e.expression,t);case 212:case 213:const n=WN(e);if(void 0!==n){const r=Px(t)?WN(t):void 0;if(void 0!==r)return r===n&&VN(e.expression,t.expression)}if(xE(e)&&xE(t)&&fD(e.argumentExpression)&&fD(t.argumentExpression)){const n=zN(e.argumentExpression);if(n===zN(t.argumentExpression)&&(KF(n)||YF(n)&&!LF(n)))return VN(e.expression,t.expression)}break;case 167:return Px(t)&&e.right.escapedText===WN(t)&&VN(e.left,t.expression);case 227:return LE(e)&&28===e.operatorToken.kind&&VN(e.right,t)}return!1}function WN(e){if(bE(e))return e.name.escapedText;if(xE(e))return Uh((t=e).argumentExpression)?xc(t.argumentExpression.text):fb(t.argumentExpression)?function(e){const t=ts(e,111551,!0);if(!t||!(KF(t)||8&t.flags))return;const n=t.valueDeclaration;if(void 0===n)return;const r=l_(n);if(r){const e=$N(r);if(void 0!==e)return e}if(Ru(n)&&pa(n,e)){const e=Qm(n);if(e){const t=E_(n.parent)?xl(n):qM(e);return t&&$N(t)}if(fP(n))return Up(n.name)}}(t.argumentExpression):void 0;var t;if(hE(e)){const t=ml(e);return t?xc(t):void 0}return AD(e)?""+e.parent.parameters.indexOf(e):void 0}function $N(e){return 8192&e.flags?e.escapedName:384&e.flags?xc(""+e.value):void 0}function KN(e,t){for(;Px(e);)if(VN(e=e.expression,t))return!0;return!1}function HN(e,t){for(;Tl(e);)if(VN(e=e.expression,t))return!0;return!1}function YN(e,t){if(e&&1048576&e.flags){const n=Wf(e,t);if(n&&2&ux(n))return void 0===n.links.isDiscriminantProperty&&(n.links.isDiscriminantProperty=!(192&~n.links.checkFlags||Ix(j_(n)))),!!n.links.isDiscriminantProperty}return!1}function ZN(e,t){let n;for(const r of e)if(YN(t,r.escapedName)){if(n){n.push(r);continue}n=[r]}return n}function eD(e){const t=e.types;if(!(t.length<10||32768&Tx(e)||F(t,e=>!!(59506688&e.flags))<10)){if(void 0===e.keyPropertyName){const n=g(t,e=>59506688&e.flags?g(Qp(e),e=>ow(j_(e))?e.escapedName:void 0):void 0),r=n&&function(e,t){const n=new Map;let r=0;for(const i of e)if(61603840&i.flags){const e=Yc(i,t);if(e){if(!sw(e))return;let t=!1;pE(e,e=>{const r=Ab(SS(e)),o=n.get(r);o?o!==Ot&&(n.set(r,Ot),t=!0):n.set(r,i)}),t||r++}}return r>=10&&2*r>=e.length?n:void 0}(t,n);e.keyPropertyName=r?n:"",e.constituentMap=r}return e.keyPropertyName.length?e.keyPropertyName:void 0}}function tD(e,t){var n;const r=null==(n=e.constituentMap)?void 0:n.get(Ab(SS(t)));return r!==Ot?r:void 0}function nD(e,t){const n=eD(e),r=n&&Yc(t,n);return r&&tD(e,r)}function rD(e,t){return VN(e,t)||KN(e,t)}function iD(e,t){if(e.arguments)for(const n of e.arguments)if(rD(t,n)||HN(n,t))return!0;return!(212!==e.expression.kind||!rD(t,e.expression.expression))}function oD(e){return e.id<=0&&(e.id=iJ,iJ++),e.id}function aD(e,t){if(e===t)return e;if(131072&t.flags)return t;const n=`A${Ab(e)},${Ab(t)}`;return Ao(n)??Io(n,function(e,t){const n=EE(e,e=>function(e,t){if(!(1048576&e.flags))return Jk(e,t);for(const n of e.types)if(Jk(n,t))return!0;return!1}(t,e)),r=512&t.flags&&kS(t)?ME(n,xS):n;return Jk(t,r)?r:e}(e,t))}function sD(e){if(256&Tx(e))return!1;const t=Lp(e);return!!(t.callSignatures.length||t.constructSignatures.length||t.members.get("bind")&&Rk(e,Gn))}function cD(e,t){return _D(e,t)&t}function lD(e,t){return 0!==cD(e,t)}function _D(e,t){467927040&e.flags&&(e=xf(e)||Ot);const n=e.flags;if(268435460&n)return V?16317953:16776705;if(134217856&n){const t=128&n&&""===e.value;return V?t?12123649:7929345:t?12582401:16776705}if(40&n)return V?16317698:16776450;if(256&n){const t=0===e.value;return V?t?12123394:7929090:t?12582146:16776450}if(64&n)return V?16317188:16775940;if(2048&n){const t=bw(e);return V?t?12122884:7928580:t?12581636:16775940}if(16&n)return V?16316168:16774920;if(528&n)return V?e===$t||e===Ht?12121864:7927560:e===$t||e===Ht?12580616:16774920;if(524288&n){return 0===(t&(V?83427327:83886079))?0:16&Tx(e)&&sT(e)?V?83427327:83886079:sD(e)?V?7880640:16728e3:V?7888800:16736160}return 16384&n?9830144:32768&n?26607360:65536&n?42917664:12288&n?V?7925520:16772880:67108864&n?V?7888800:16736160:131072&n?0:1048576&n?Pe(e.types,(e,n)=>e|_D(n,t),0):2097152&n?function(e,t){const n=oM(e,402784252);let r=0,i=134217727;for(const o of e.types)if(!(n&&524288&o.flags)){const e=_D(o,t);r|=e,i&=e}return 8256&r|134209471&i}(e,t):83886079}function uD(e,t){return EE(e,e=>lD(e,t))}function dD(e,t){const n=gD(uD(V&&2&e.flags?In:e,t));if(V)switch(t){case 524288:return pD(n,65536,131072,33554432,zt);case 1048576:return pD(n,131072,65536,16777216,Lt);case 2097152:case 4194304:return ME(n,e=>lD(e,262144)?function(e){return ur||(ur=Zy("NonNullable",524288,void 0)||vt),ur!==vt?ky(ur,[e]):Gb([e,Nn])}(e):e)}return n}function pD(e,t,n,r,i){const o=cD(e,50528256);if(!(o&t))return e;const a=zb([Nn,i]);return ME(e,e=>lD(e,t)?Gb([e,o&r||!lD(e,n)?Nn:a]):e)}function gD(e){return e===In?Ot:e}function hD(e,t){return t?zb([_l(e),qM(t)]):e}function yD(e,t){var n;const r=rx(t);if(!mC(r))return Ft;const i=gC(r);return Yc(e,i)||bD(null==(n=mg(e,i))?void 0:n.type)||Ft}function vD(e,t){return CE(e,nw)&&function(e,t){const n=Yc(e,""+t);return n||(CE(e,fw)?yw(e,t,E.noUncheckedIndexedAccess?Lt:void 0):void 0)}(e,t)||bD(CB(65,e,Lt,void 0))||Ft}function bD(e){return e&&E.noUncheckedIndexedAccess?zb([e,Mt]):e}function xD(e){return Hv(CB(65,e,Lt,void 0)||Ft)}function SD(e){return 227===e.parent.kind&&e.parent.left===e||251===e.parent.kind&&e.parent.initializer===e}function kD(e){return yD(TD(e.parent),e.name)}function TD(e){const{parent:t}=e;switch(t.kind){case 250:return Ut;case 251:return TB(t)||Ft;case 227:return function(e){return 210===e.parent.kind&&SD(e.parent)||304===e.parent.kind&&SD(e.parent.parent)?hD(TD(e),e.right):qM(e.right)}(t);case 221:return Lt;case 210:return function(e,t){return vD(TD(e),e.elements.indexOf(t))}(t,e);case 231:return function(e){return xD(TD(e.parent))}(t);case 304:return kD(t);case 305:return function(e){return hD(kD(e),e.objectAssignmentInitializer)}(t)}return Ft}function wD(e){return la(e).resolvedType||qM(e)}function DD(e){return 261===e.kind?function(e){return e.initializer?wD(e.initializer):250===e.parent.parent.kind?Ut:251===e.parent.parent.kind&&TB(e.parent.parent)||Ft}(e):function(e){const t=e.parent,n=DD(t.parent);return hD(207===t.kind?yD(n,e.propertyName||e.name):e.dotDotDotToken?xD(n):vD(n,t.elements.indexOf(e)),e.initializer)}(e)}function QD(e){switch(e.kind){case 218:return QD(e.expression);case 227:switch(e.operatorToken.kind){case 64:case 76:case 77:case 78:return QD(e.left);case 28:return QD(e.right)}}return e}function nE(e){const{parent:t}=e;return 218===t.kind||227===t.kind&&64===t.operatorToken.kind&&t.left===e||227===t.kind&&28===t.operatorToken.kind&&t.right===e?nE(t):e}function rE(e){return 297===e.kind?SS(qM(e.expression)):cn}function oE(e){const t=la(e);if(!t.switchTypes){t.switchTypes=[];for(const n of e.caseBlock.clauses)t.switchTypes.push(rE(n))}return t.switchTypes}function sE(e){if(X(e.caseBlock.clauses,e=>297===e.kind&&!Uu(e.expression)))return;const t=[];for(const n of e.caseBlock.clauses){const e=297===n.kind?n.expression.text:void 0;t.push(e&&!D(t,e)?e:void 0)}return t}function _E(e,t){return!!(e===t||131072&e.flags||1048576&t.flags&&function(e,t){if(1048576&e.flags){for(const n of e.types)if(!Ib(t.types,n))return!1;return!0}if(1056&e.flags&&Su(e)===t)return!0;return Ib(t.types,e)}(e,t))}function pE(e,t){return 1048576&e.flags?g(e.types,t):t(e)}function fE(e,t){return 1048576&e.flags?X(e.types,t):t(e)}function CE(e,t){return 1048576&e.flags?k(e.types,t):t(e)}function EE(e,t){if(1048576&e.flags){const n=e.types,r=P(n,t);if(r===n)return e;const i=e.origin;let o;if(i&&1048576&i.flags){const e=i.types,a=P(e,e=>!!(1048576&e.flags)||t(e));if(e.length-a.length===n.length-r.length){if(1===a.length)return a[0];o=Jb(1048576,a)}}return Vb(r,16809984&e.objectFlags,void 0,void 0,o)}return 131072&e.flags||t(e)?e:cn}function PE(e,t){return EE(e,e=>e!==t)}function OE(e){return 1048576&e.flags?e.types.length:1}function ME(e,t,n){if(131072&e.flags)return e;if(!(1048576&e.flags))return t(e);const r=e.origin,i=r&&1048576&r.flags?r.types:e.types;let o,a=!1;for(const e of i){const r=1048576&e.flags?ME(e,t,n):t(e);a||(a=e!==r),r&&(o?o.push(r):o=[r])}return a?o&&zb(o,n?0:1):e}function RE(e,t,n,r){return 1048576&e.flags&&n?zb(O(e.types,t),1,n,r):ME(e,t)}function UE(e,t){return EE(e,e=>0!==(e.flags&t))}function VE(e,t){return oM(e,134217804)&&oM(t,402655616)?ME(e,e=>4&e.flags?UE(t,402653316):Ex(e)&&!oM(t,402653188)?UE(t,128):8&e.flags?UE(t,264):64&e.flags?UE(t,2112):e):e}function KE(e){return 0===e.flags}function HE(e){return 0===e.flags?e.type:e}function GE(e,t){return t?{flags:0,type:131072&e.flags?_n:e}:e}function QE(e){return gt[e.id]||(gt[e.id]=function(e){const t=zs(256);return t.elementType=e,t}(e))}function eF(e,t){const n=Rw(cw(VM(t)));return _E(n,e.elementType)?e:QE(zb([e.elementType,n]))}function rF(e){return e.finalArrayType||(e.finalArrayType=131072&(t=e.elementType).flags?lr:Hv(1048576&t.flags?zb(t.types,2):t));var t}function iF(e){return 256&Tx(e)?rF(e):e}function cF(e){return 256&Tx(e)?e.elementType:cn}function lF(e){const t=nE(e),n=t.parent,r=bE(n)&&("length"===n.name.escapedText||214===n.parent.kind&&fD(n.name)&&ry(n.name)),i=213===n.kind&&n.expression===t&&227===n.parent.kind&&64===n.parent.operatorToken.kind&&n.parent.left===n&&!ih(n.parent)&&aM(qM(n.argumentExpression),296);return r||i}function _F(e,t){if(8752&(e=Wa(e)).flags)return j_(e);if(7&e.flags){if(262144&ux(e)){const t=e.links.syntheticOrigin;if(t&&_F(t))return j_(e)}const r=e.valueDeclaration;if(r){if((hF(n=r)||LD(n)||OD(n)||AD(n))&&(xv(n)||Mm(n)&&Mu(n)&&n.initializer&&$T(n.initializer)&&kv(n.initializer)))return j_(e);if(hF(r)&&251===r.parent.parent.kind){const e=r.parent.parent,t=uF(e.expression,void 0);if(t){return CB(e.awaitModifier?15:13,t,Lt,void 0)}}t&&fT(t,Wp(r,ha._0_needs_an_explicit_type_annotation,dc(e)))}}var n}function uF(e,t){if(!(67108864&e.flags))switch(e.kind){case 80:return _F(Ps(zN(e)),t);case 110:return function(e){const t=sm(e,!1,!1);if(__(t)){const e=Rg(t);if(e.thisParameter)return _F(e.thisParameter)}if(y_(t.parent)){const e=xs(t.parent);return jv(t)?j_(e):Pu(e).thisType}}(e);case 108:return sA(e);case 212:{const n=uF(e.expression,t);if(n){const r=e.name;let i;if(mD(r)){if(!n.symbol)return;i=xm(n,Qh(n.symbol,r.escapedText))}else i=xm(n,r.escapedText);return i&&_F(i,t)}return}case 218:return uF(e.expression,t)}}function dF(e){const t=la(e);let n=t.effectsSignature;if(void 0===n){let r;if(LE(e)){r=_M(ZI(e.right))}else 245===e.parent.kind?r=uF(e.expression,void 0):108!==e.expression.kind&&(r=Tl(e)?oO(Aw(WM(e.expression),e.expression),e.expression):ZI(e.expression));const i=Cm(r&&Pf(r)||Ot,0),o=1!==i.length||i[0].typeParameters?X(i,pF)?jL(e):void 0:i[0];n=t.effectsSignature=o&&pF(o)?o:ci}return n===ci?void 0:n}function pF(e){return!!(th(e)||e.declaration&&131072&(ch(e.declaration)||Ot).flags)}function fF(e){const t=gF(e,!1);return ti=e,ni=t,t}function mF(e){const t=ph(e,!0);return 97===t.kind||227===t.kind&&(56===t.operatorToken.kind&&(mF(t.left)||mF(t.right))||57===t.operatorToken.kind&&mF(t.left)&&mF(t.right))}function gF(e,t){for(;;){if(e===ti)return ni;const n=e.flags;if(4096&n){if(!t){const t=oD(e),n=oo[t];return void 0!==n?n:oo[t]=gF(e,!0)}t=!1}if(368&n)e=e.antecedent;else if(512&n){const t=dF(e.node);if(t){const n=th(t);if(n&&3===n.kind&&!n.type){const t=e.node.arguments[n.parameterIndex];if(t&&mF(t))return!1}if(131072&ah(t).flags)return!1}e=e.antecedent}else{if(4&n)return X(e.antecedent,e=>gF(e,!1));if(8&n){const t=e.antecedent;if(void 0===t||0===t.length)return!1;e=t[0]}else{if(!(128&n)){if(1024&n){ti=void 0;const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=gF(e.antecedent,!1);return t.antecedent=n,r}return!(1&n)}{const t=e.node;if(t.clauseStart===t.clauseEnd&&Wj(t.switchStatement))return!1;e=e.antecedent}}}}}function wF(e,t){for(;;){const n=e.flags;if(4096&n){if(!t){const t=oD(e),n=ao[t];return void 0!==n?n:ao[t]=wF(e,!0)}t=!1}if(496&n)e=e.antecedent;else if(512&n){if(108===e.node.expression.kind)return!0;e=e.antecedent}else{if(4&n)return k(e.antecedent,e=>wF(e,!1));if(!(8&n)){if(1024&n){const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=wF(e.antecedent,!1);return t.antecedent=n,r}return!!(1&n)}e=e.antecedent[0]}}}function PF(e){switch(e.kind){case 110:return!0;case 80:if(!yv(e)){const t=zN(e);return KF(t)||YF(t)&&!LF(t)||!!t.valueDeclaration&&NE(t.valueDeclaration)}break;case 212:case 213:return PF(e.expression)&&Yj(la(e).resolvedSymbol||vt);case 207:case 208:const t=oy(e.parent);return AD(t)||WT(t)?!RF(t):hF(t)&&tU(t)}return!1}function AF(e,t,n=t,r,i=(t=>null==(t=at(e,zg))?void 0:t.flowNode)()){let o,a=!1,s=0;if(wi)return Ft;if(!i)return t;Ni++;const c=Ci,l=HE(d(i));Ci=c;const _=256&Tx(l)&&lF(e)?lr:iF(l);return _===pn||e.parent&&236===e.parent.kind&&!(131072&_.flags)&&131072&uD(_,2097152).flags?t:_;function u(){return a?o:(a=!0,o=UN(e,t,n,r))}function d(i){var o;if(2e3===s)return null==(o=Yn)||o.instant(Yn.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:i.id}),wi=!0,function(e){const t=yc(e,g_),n=wd(e),r=nf(n,t.statements.pos);ho.add(rS(n,r.start,r.length,ha.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}(e),Ft;let a;for(s++;;){const o=i.flags;if(4096&o){for(let e=c;e=0&&n.parameterIndex298===e.kind);if(n===r||o>=n&&ocD(e,t)===t)}return zb(O(i.slice(n,r),t=>t?W(e,t):cn))}(i,t.node);else if(112===n.kind)i=function(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=w(t.caseBlock.clauses,e=>298===e.kind),o=n===r||i>=n&&i297===t.kind?Y(e,t.expression,!0):cn))}(i,t.node);else{V&&(HN(n,e)?i=q(i,t.node,e=>!(163840&e.flags)):222===n.kind&&HN(n.expression,e)&&(i=q(i,t.node,e=>!(131072&e.flags||128&e.flags&&"undefined"===e.value))));const r=N(n,i);r&&(i=function(e,t,n){if(n.clauseStarttD(e,t)||Ot));if(t!==Ot)return t}return E(e,t,e=>U(e,n))}(i,r,t.node))}return GE(i,KE(r))}function x(e){const r=[];let i,o=!1,a=!1;for(const s of e.antecedent){if(!i&&128&s.flags&&s.node.clauseStart===s.node.clauseEnd){i=s;continue}const e=d(s),c=HE(e);if(c===t&&t===n)return c;pe(r,c),_E(c,n)||(o=!0),KE(e)&&(a=!0)}if(i){const e=d(i),s=HE(e);if(!(131072&s.flags||D(r,s)||Wj(i.node.switchStatement))){if(s===t&&t===n)return s;r.push(s),_E(s,n)||(o=!0),KE(e)&&(a=!0)}}return GE(C(r,o?2:1),a)}function S(e){const r=oD(e),i=Zi[r]||(Zi[r]=new Map),o=u();if(!o)return t;const a=i.get(o);if(a)return a;for(let t=ki;t{const t=Zc(e,r)||Ot;return!(131072&t.flags)&&!(131072&s.flags)&&Uk(s,t)})}function F(e,t,n,r,i){if((37===n||38===n)&&1048576&e.flags){const o=eD(e);if(o&&o===WN(t)){const t=tD(e,qM(r));if(t)return n===(i?37:38)?t:ow(Yc(t,o)||Ot)?PE(e,t):e}}return E(e,t,e=>B(e,n,r,i))}function P(t,n,r){if(VN(e,n))return dD(t,r?4194304:8388608);V&&r&&HN(n,e)&&(t=dD(t,2097152));const i=N(n,t);return i?E(t,i,e=>uD(e,r?4194304:8388608)):t}function A(e,t,n){const r=xm(e,t);return r?!!(16777216&r.flags||48&ux(r))||n:!!mg(e,t)||!n}function I(e,t,n){const r=gC(t);if(fE(e,e=>A(e,r,!0)))return EE(e,e=>A(e,r,n));if(n){const n=($r||($r=Yy("Record",2,!0)||vt),$r===vt?void 0:$r);if(n)return Gb([e,ky(n,[t,Ot])])}return e}function L(e,t,n,r,i){return Y(e,t,i=i!==(112===n.kind)!=(38!==r&&36!==r))}function M(t,n,r){switch(n.operatorToken.kind){case 64:case 76:case 77:case 78:return P(Y(t,n.right,r),n.left,r);case 35:case 36:case 37:case 38:const i=n.operatorToken.kind,o=QD(n.left),a=QD(n.right);if(222===o.kind&&Uu(a))return J(t,o,i,a,r);if(222===a.kind&&Uu(o))return J(t,a,i,o,r);if(VN(e,o))return B(t,i,a,r);if(VN(e,a))return B(t,i,o,r);V&&(HN(o,e)?t=R(t,i,a,r):HN(a,e)&&(t=R(t,i,o,r)));const s=N(o,t);if(s)return F(t,s,i,a,r);const c=N(a,t);if(c)return F(t,c,i,o,r);if(K(o))return H(t,i,a,r);if(K(a))return H(t,i,o,r);if(p_(a)&&!Px(o))return L(t,o,a,i,r);if(p_(o)&&!Px(a))return L(t,a,o,i,r);break;case 104:return function(t,n,r){const i=QD(n.left);if(!VN(e,i))return r&&V&&HN(i,e)?dD(t,2097152):t;const o=n.right,a=qM(o);if(!zk(a,Hn))return t;const s=dF(n),c=s&&th(s);if(c&&1===c.kind&&0===c.parameterIndex)return X(t,c.type,r,!0);if(!zk(a,Gn))return t;const l=ME(a,G);if(el(t)&&(l===Hn||l===Gn)||!r&&(!(524288&l.flags)||cT(l)))return t;return X(t,l,r,!0)}(t,n,r);case 103:if(mD(n.left))return function(t,n,r){const i=QD(n.right);if(!VN(e,i))return t;gn.assertNode(n.left,mD);const o=gO(n.left);if(void 0===o)return t;const a=o.parent,s=Mv(gn.checkDefined(o.valueDeclaration,"should always have a declaration"))?j_(a):Pu(a);return X(t,s,r,!0)}(t,n,r);const l=QD(n.right);if(Ow(t)&&Px(e)&&VN(e.expression,l)){const i=qM(n.left);if(mC(i)&&WN(e)===gC(i))return uD(t,r?524288:65536)}if(VN(e,l)){const e=qM(n.left);if(mC(e))return I(t,e,r)}break;case 28:return Y(t,n.right,r);case 56:return r?Y(Y(t,n.left,!0),n.right,!0):zb([Y(t,n.left,!1),Y(t,n.right,!1)]);case 57:return r?zb([Y(t,n.left,!0),Y(t,n.right,!0)]):Y(Y(t,n.left,!1),n.right,!1)}return t}function R(e,t,n,r){const i=35===t||37===t,o=35===t||36===t?98304:32768,a=qM(n);return i!==r&&CE(a,e=>!!(e.flags&o))||i===r&&CE(a,e=>!(e.flags&(3|o)))?dD(e,2097152):e}function B(e,t,n,r){if(1&e.flags)return e;36!==t&&38!==t||(r=!r);const i=qM(n),o=35===t||36===t;if(98304&i.flags){if(!V)return e;return dD(e,o?r?262144:2097152:65536&i.flags?r?131072:1048576:r?65536:524288)}if(r){if(!o&&(2&e.flags||fE(e,cT))){if(469893116&i.flags||cT(i))return i;if(524288&i.flags)return fn}return VE(EE(e,e=>{return Uk(e,i)||o&&(t=i,!!(524&e.flags)&&!!(28&t.flags));var t}),i)}return ow(i)?EE(e,e=>!(aw(e)&&Uk(e,i))):e}function J(t,n,r,i,o){36!==r&&38!==r||(o=!o);const a=QD(n.expression);if(!VN(e,a)){V&&HN(a,e)&&o===("undefined"!==i.text)&&(t=dD(t,2097152));const n=N(a,t);return n?E(t,n,e=>z(e,i,o)):t}return z(t,i,o)}function z(e,t,n){return n?W(e,t.text):dD(e,aJ.get(t.text)||32768)}function q(e,{switchStatement:t,clauseStart:n,clauseEnd:r},i){return n!==r&&k(oE(t).slice(n,r),i)?uD(e,2097152):e}function U(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=oE(t);if(!i.length)return e;const o=i.slice(n,r),a=n===r||D(o,cn);if(2&e.flags&&!a){let t;for(let n=0;nUk(s,e)),s);if(!a)return c;const l=EE(e,e=>!(aw(e)&&D(i,32768&e.flags?Lt:SS(function(e){return 2097152&e.flags&&T(e.types,ow)||e}(e)))));return 131072&c.flags?l:zb([c,l])}function W(e,t){switch(t){case"string":return $(e,Ut,1);case"number":return $(e,Vt,2);case"bigint":return $(e,Wt,4);case"boolean":return $(e,Yt,8);case"symbol":return $(e,nn,16);case"object":return 1&e.flags?e:zb([$(e,fn,32),$(e,zt,131072)]);case"function":return 1&e.flags?e:$(e,Gn,64);case"undefined":return $(e,Lt,65536)}return $(e,fn,128)}function $(e,t,n){return ME(e,e=>bT(e,t,xo)?lD(e,n)?e:cn:Rk(t,e)?t:lD(e,n)?Gb([e,t]):cn)}function K(t){return(bE(t)&&"constructor"===kc(t.name)||xE(t)&&Uu(t.argumentExpression)&&"constructor"===t.argumentExpression.text)&&VN(e,t.expression)}function H(e,t,n,r){if(r?35!==t&&37!==t:36!==t&&38!==t)return e;const i=qM(n);if(!tq(i)&&!au(i))return e;const o=xm(i,"prototype");if(!o)return e;const a=j_(o),s=el(a)?void 0:a;return s&&s!==Hn&&s!==Gn?el(e)?s:EE(e,e=>function(e,t){if(524288&e.flags&&1&Tx(e)||524288&t.flags&&1&Tx(t))return e.symbol===t.symbol;return Rk(e,t)}(e,s)):e}function G(e){const t=Yc(e,"prototype");if(t&&!el(t))return t;const n=Cm(e,1);return n.length?zb(O(n,e=>ah(Oh(e)))):Nn}function X(e,t,n,r){const i=1048576&e.flags?`N${Ab(e)},${Ab(t)},${(n?1:0)|(r?2:0)}`:void 0;return Ao(i)??Io(i,function(e,t,n,r){if(!n){if(e===t)return cn;if(r)return EE(e,e=>!zk(e,t));const n=X(e=2&e.flags?In:e,t,!0,!1);return gD(EE(e,e=>!_E(e,n)))}if(3&e.flags)return t;if(e===t)return t;const i=r?zk:Rk,o=1048576&e.flags?eD(e):void 0,a=ME(t,t=>{const n=o&&Yc(t,o),a=ME(n&&tD(e,n)||e,r?e=>zk(e,t)?e:zk(t,e)?t:cn:e=>Bk(e,t)?e:Bk(t,e)?t:Rk(e,t)?e:Rk(t,e)?t:cn);return 131072&a.flags?ME(e,e=>oM(e,465829888)&&i(t,xf(e)||Ot)?Gb([e,t]):cn):a});return 131072&a.flags?Rk(t,e)?t:Jk(e,t)?e:Jk(t,e)?t:Gb([e,t]):a}(e,t,n,r))}function Q(t,n,r,i){if(n.type&&(!el(t)||n.type!==Hn&&n.type!==Gn)){const o=function(e,t){if(1===e.kind||3===e.kind)return t.arguments[e.parameterIndex];const n=ph(t.expression);return Px(n)?ph(n.expression):void 0}(n,r);if(o){if(VN(e,o))return X(t,n.type,i,!1);V&&HN(o,e)&&(i&&!lD(n.type,65536)||!i&&CE(n.type,eO))&&(t=dD(t,2097152));const r=N(o,t);if(r)return E(t,r,e=>X(e,n.type,i,!1))}}return t}function Y(t,n,r){if(wl(n)||LE(n.parent)&&(61===n.parent.operatorToken.kind||78===n.parent.operatorToken.kind)&&n.parent.left===n)return function(t,n,r){if(VN(e,n))return dD(t,r?2097152:262144);const i=N(n,t);if(i)return E(t,i,e=>uD(e,r?2097152:262144));return t}(t,n,r);switch(n.kind){case 80:if(!VN(e,n)&&v<5){const i=zN(n);if(KF(i)){const n=i.valueDeclaration;if(n&&hF(n)&&!n.type&&n.initializer&&PF(e)){v++;const e=Y(t,n.initializer,r);return v--,e}}}case 110:case 108:case 212:case 213:return P(t,n,r);case 214:return function(t,n,r){if(iD(n,e)){const e=r||!kl(n)?dF(n):void 0,i=e&&th(e);if(i&&(0===i.kind||1===i.kind))return Q(t,i,n,r)}if(Ow(t)&&Px(e)&&bE(n.expression)){const i=n.expression;if(VN(e.expression,QD(i.expression))&&fD(i.name)&&"hasOwnProperty"===i.name.escapedText&&1===n.arguments.length){const i=n.arguments[0];if(Uu(i)&&WN(e)===xc(i.text))return uD(t,r?524288:65536)}}return t}(t,n,r);case 218:case 236:case 239:return Y(t,n.expression,r);case 227:return M(t,n,r);case 225:if(54===n.operator)return Y(t,n.operand,!r)}return t}}function IF(e){return yc(e.parent,e=>__(e)&&!dm(e)||269===e.kind||308===e.kind||173===e.kind)}function LF(e){return!jF(e,void 0)}function jF(e,t){const n=yc(e.valueDeclaration,WF);if(!n)return!1;const r=la(n);return 131072&r.flags||(r.flags|=131072,yc(n.parent,e=>WF(e)&&!!(131072&la(e).flags))||$F(n)),!e.lastAssignmentPos||t&&Math.abs(e.lastAssignmentPos)233!==e.kind&&VF(e.name))}function WF(e){return d_(e)||mP(e)}function $F(e){switch(e.kind){case 80:const t=rh(e);if(0!==t){const n=zN(e),r=1===t||void 0!==n.lastAssignmentPos&&n.lastAssignmentPos<0;if(YF(n)){if(void 0===n.lastAssignmentPos||Math.abs(n.lastAssignmentPos)!==Number.MAX_VALUE){const t=yc(e,WF),r=yc(n.valueDeclaration,WF);n.lastAssignmentPos=t===r?function(e,t){let n=e.pos;for(;e&&e.pos>t.pos;){switch(e.kind){case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 251:case 255:case 256:case 259:case 264:n=e.end}e=e.parent}return n}(e,n.valueDeclaration):Number.MAX_VALUE}r&&n.lastAssignmentPos>0&&(n.lastAssignmentPos*=-1)}}return;case 282:const n=e.parent.parent,r=e.propertyName||e.name;if(!e.isTypeOnly&&!n.isTypeOnly&&!n.moduleSpecifier&&11!==r.kind){const e=ts(r,111551,!0,!0);if(e&&YF(e)){const t=void 0!==e.lastAssignmentPos&&e.lastAssignmentPos<0?-1:1;e.lastAssignmentPos=t*Number.MAX_VALUE}}return;case 265:case 266:case 267:return}N_(e)||sO(e,$F)}function KF(e){return 3&e.flags&&!!(6&HI(e))}function YF(e){const t=e.valueDeclaration&&oy(e.valueDeclaration);return!!t&&(AD(t)||hF(t)&&(_P(t.parent)||tP(t)))}function tP(e){return!!(1&e.parent.flags)&&!(32&uc(e)||244===e.parent.parent.kind&&af(e.parent.parent.parent))}function oP(e,t){const n=V&&170===t.kind&&t.initializer&&lD(e,16777216)&&!function(e){const t=la(e);if(void 0===t.parameterInitializerContainsUndefined){if(!Kc(e,8))return I_(e.symbol),!0;const n=!!lD(CM(e,0),16777216);if(!Xc())return I_(e.symbol),!0;t.parameterInitializerContainsUndefined??(t.parameterInitializerContainsUndefined=n)}return t.parameterInitializerContainsUndefined}(t);return n?uD(e,524288):e}function sP(e){return 2097152&e.flags?X(e.types,sP):!!(465829888&e.flags&&1146880&Sf(e).flags)}function cP(e){return 2097152&e.flags?X(e.types,cP):!(!(465829888&e.flags)||oM(Sf(e),98304))}function gP(e,t,n){Ay(e)&&(e=e.baseType);const r=!(n&&2&n)&&fE(e,sP)&&(function(e,t){const n=t.parent;return 212===n.kind||167===n.kind||214===n.kind&&n.expression===t||215===n.kind&&n.expression===t||213===n.kind&&n.expression===t&&!(fE(e,cP)&&jx(qM(n.argumentExpression)))}(e,t)||function(e,t){const n=(fD(e)||bE(e)||xE(e))&&!((QF(e.parent)||XF(e.parent))&&e.parent.tagName===e)&&$A(e,t&&32&t?8:void 0);return n&&!Ix(n)}(t,n));return r?ME(e,Sf):e}function bP(e){return!!yc(e,e=>{const t=e.parent;return void 0===t?"quit":JF(t)?t.expression===e&&fb(e):!!UF(t)&&(t.name===e||t.propertyName===e)})}function xP(e,t,n,r){if(je&&(!(33554432&e.flags)||OD(e)||LD(e)))switch(t){case 1:return SP(e);case 2:return kP(e,n,r);case 3:return TP(e);case 4:return NP(e);case 5:return FP(e);case 6:return PP(e);case 7:return LP(e);case 8:return jP(e);case 0:if(fD(e)&&(Nm(e)||dP(e.parent)||DF(e.parent)&&e.parent.moduleReference===e)&&$P(e)){if(J_(e.parent)){if((bE(e.parent)?e.parent.expression:e.parent.left)!==e)return}return void SP(e)}if(J_(e)){let t=e;for(;J_(t);){if(If(t))return;t=t.parent}return kP(e)}if(JF(e))return TP(e);if(Nu(e)||eP(e))return NP(e);if(DF(e))return Om(e)||HJ(e)?PP(e):void 0;if(UF(e))return LP(e);if((d_(e)||jD(e))&&FP(e),!E.emitDecoratorMetadata)return;if(!(OI(e)&&Uv(e)&&e.modifiers&&vm(B,e,e.parent,e.parent.parent)))return;return jP(e);default:gn.assertNever(t,`Unhandled reference hint: ${t}`)}}function SP(e){const t=zN(e);t&&t!==Ie&&t!==vt&&!yv(e)&&RP(t,e)}function kP(e,t,n){const r=bE(e)?e.expression:e.left;if(gv(r)||!fD(r))return;const i=zN(r);if(!i||i===vt)return;if(FS(E)||MS(E)&&bP(e))return void RP(i,e);const o=n||kM(r);if(el(o)||o===_n)return void RP(i,e);let a=t;if(!a&&!n){const t=bE(e)?e.name:e.right,n=mD(t)&&pO(t.escapedText,t),r=Pf(0!==rh(e)||uO(e)?Hw(o):o);a=mD(t)?n&&hO(r,n)||void 0:xm(r,t.escapedText)}a&&(Vz(a)||8&a.flags&&307===e.parent.kind)||RP(i,e)}function TP(e){if(fD(e.expression)){const t=e.expression,n=Ps(ts(t,-1,!0,!0,e));n&&RP(n,t)}}function NP(e){if(!DI(e)){const t=ho&&2===E.jsx?ha.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found:void 0,n=Oo(e),r=Nu(e)?e.tagName:e,i=1!==E.jsx&&3!==E.jsx;let o;if(eP(e)&&"null"===n||(o=ze(r,n,i?111551:111167,t,!0)),o&&(o.isReferenced=-1,je&&2097152&o.flags&&!Ya(o)&&BP(o)),eP(e)){const n=pq(wd(e));if(n){const e=mb(n).escapedText;ze(r,e,i?111551:111167,t,!0)}}}}function FP(e){if(A<2&&2&zh(e)){const n=kv(e);zP((t=n)&&hm(t),!1)}var t}function PP(e){Lv(e,32)&&JP(e)}function LP(e){if(!e.parent.parent.moduleSpecifier&&!e.isTypeOnly&&!e.parent.parent.isTypeOnly){const t=e.propertyName||e.name;if(11===t.kind)return;const n=ze(t,t.escapedText,2998271,void 0,!0);if(n&&(n===Ce||n===we||n.declarations&&af(Qc(n.declarations[0]))));else{const r=n&&(2097152&n.flags?$a(n):n);(!r||111551&Ka(r))&&(JP(e),SP(t))}return}}function jP(e){if(E.emitDecoratorMetadata){const t=T(e.modifiers,ID);if(!t)return;switch(hq(t,16),e.kind){case 264:const t=uv(e);if(t)for(const e of t.parameters)qP(OR(e));break;case 178:case 179:const n=178===e.kind?179:178,r=ed(xs(e),n);qP(m_(e)||r&&m_(r));break;case 175:for(const t of e.parameters)qP(OR(t));qP(kv(e));break;case 173:qP(xv(e));break;case 170:qP(OR(e));const i=e.parent;for(const e of i.parameters)qP(OR(e));qP(kv(i))}}}function RP(e,t){if(je&&Va(e,111551)&&!hv(t)){const n=$a(e);1160127&Ka(e,!0)&&(FS(E)||MS(E)&&bP(t)||!Vz(Ps(n)))&&BP(e)}}function BP(e){gn.assert(je);const t=ca(e);if(!t.referenced){t.referenced=!0;const n=Ca(e);if(!n)return gn.fail();if(Om(n)&&111551&Ka(Wa(e))){SP(mb(n.moduleReference))}}}function JP(e){const t=xs(e),n=$a(t);if(n){(n===vt||111551&Ka(t,!0)&&!Vz(n))&&BP(t)}}function zP(e,t){if(!e)return;const n=mb(e),r=2097152|(80===e.kind?788968:1920),i=ze(n,n.escapedText,r,void 0,!0);if(i&&2097152&i.flags)if(je&&Is(i)&&!Vz($a(i))&&!Ya(i))BP(i);else if(t&&FS(E)&&NS(E)>=5&&!Is(i)&&!X(i.declarations,Hl)){const t=Jo(e,ha.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled),r=T(i.declarations||p,wa);r&&fT(t,Wp(r,ha._0_was_imported_here,kc(n)))}}function qP(e){const t=AR(e);t&&s_(t)&&zP(t,!0)}function VP(e,t){if(yv(e))return;if(t===Ie){if(TO(e,!0))return void Jo(e,ha.arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks);let t=tm(e);if(t)for(A<2&&(220===t.kind?Jo(e,ha.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression):Lv(t,1024)&&Jo(e,ha.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)),la(t).flags|=512;t&&DE(t);)t=tm(t),t&&(la(t).flags|=512);return}const n=Ps(t),r=QJ(n,e);Ko(r)&&Sx(e,r)&&r.declarations&&Go(e,r.declarations,e.escapedText);const i=n.valueDeclaration;if(i&&32&n.flags&&y_(i)&&i.name!==e){let t=sm(e,!1,!1);for(;308!==t.kind&&t.parent!==i;)t=sm(t,!1,!1);308!==t.kind&&(la(i).flags|=262144,la(t).flags|=262144,la(e).flags|=536870912)}!function(e,t){if(A>=2||!(34&t.flags)||!t.valueDeclaration||mP(t.valueDeclaration)||300===t.valueDeclaration.parent.kind)return;const n=Mp(t.valueDeclaration),r=function(e,t){return!!yc(e,e=>e===t?"quit":__(e)||e.parent&&LD(e.parent)&&!Mv(e.parent)&&e.parent.initializer===e)}(e,n),i=HP(n);if(i){if(r){let r=!0;if(oF(n)){const i=Ph(t.valueDeclaration,262);if(i&&i.parent===n){const i=function(e,t){return yc(e,e=>e===t?"quit":e===t.initializer||e===t.condition||e===t.incrementor||e===t.statement)}(e.parent,n);if(i){const e=la(i);e.flags|=8192;pe(e.capturedBlockScopeBindings||(e.capturedBlockScopeBindings=[]),t),i===n.initializer&&(r=!1)}}}r&&(la(i).flags|=4096)}if(oF(n)){const r=Ph(t.valueDeclaration,262);r&&r.parent===n&&function(e,t){let n=e;for(;218===n.parent.kind;)n=n.parent;let r=!1;if(ih(n))r=!0;else if(225===n.parent.kind||226===n.parent.kind){const e=n.parent;r=46===e.operator||47===e.operator}if(!r)return!1;return!!yc(n,e=>e===t?"quit":e===t.statement)}(e,n)&&(la(t.valueDeclaration).flags|=65536)}la(t.valueDeclaration).flags|=32768}r&&(la(t.valueDeclaration).flags|=16384)}(e,t)}function WP(e,t){if(yv(e))return oA(e);const n=zN(e);if(n===vt)return Ft;if(VP(e,n),n===Ie)return TO(e)?Ft:j_(n);$P(e)&&xP(e,1);const r=Ps(n);let i=r.valueDeclaration;const o=i;if(i&&209===i.kind&&D(Ai,i.parent)&&yc(e,e=>e===i.parent))return At;let a=function(e,t){var n;const r=j_(e),i=e.valueDeclaration;if(i){if(hE(i)&&!i.initializer&&!i.dotDotDotToken&&i.parent.elements.length>=2){const e=i.parent.parent,n=oy(e);if(261===n.kind&&6&eU(n)||170===n.kind){const r=la(e);if(!(4194304&r.flags)){r.flags|=4194304;const o=ol(e,0),a=o&&ME(o,Sf);if(r.flags&=-4194305,a&&1048576&a.flags&&(170!==n.kind||!RF(n))){const e=AF(i.parent,a,a,void 0,t.flowNode);return 131072&e.flags?cn:Sl(i,e,!0)}}}}if(AD(i)&&!i.type&&!i.initializer&&!i.dotDotDotToken){const e=i.parent;if(e.parameters.length>=2&&Ak(e)){const r=oI(e);if(r&&1===r.parameters.length&&bJ(r)){const o=Af(Ck(j_(r.parameters[0]),null==(n=QA(e))?void 0:n.nonFixingMapper));if(1048576&o.flags&&CE(o,fw)&&!X(e.parameters,RF))return qx(AF(e,o,o,void 0,t.flowNode),CS(e.parameters.indexOf(i)-(fv(e)?1:0)))}}}}return r}(r,e);const s=rh(e);if(s){if(!(3&r.flags||Mm(e)&&512&r.flags)){return Jo(e,384&r.flags?ha.Cannot_assign_to_0_because_it_is_an_enum:32&r.flags?ha.Cannot_assign_to_0_because_it_is_a_class:1536&r.flags?ha.Cannot_assign_to_0_because_it_is_a_namespace:16&r.flags?ha.Cannot_assign_to_0_because_it_is_a_function:2097152&r.flags?ha.Cannot_assign_to_0_because_it_is_an_import:ha.Cannot_assign_to_0_because_it_is_not_a_variable,dc(n)),Ft}if(Yj(r))return 3&r.flags?Jo(e,ha.Cannot_assign_to_0_because_it_is_a_constant,dc(n)):Jo(e,ha.Cannot_assign_to_0_because_it_is_a_read_only_property,dc(n)),Ft}const c=2097152&r.flags;if(3&r.flags){if(1===s)return oh(e)?cw(a):a}else{if(!c)return a;i=Ca(n)}if(!i)return a;a=gP(a,e,t);const l=170===oy(i).kind,_=IF(i);let u=IF(e);const d=u!==_,p=e.parent&&e.parent.parent&&pP(e.parent)&&SD(e.parent.parent),f=134217728&n.flags,m=a===Nt||a===lr,g=m&&236===e.parent.kind;for(;u!==_&&(219===u.kind||220===u.kind||Hf(u))&&(KF(r)&&a!==lr||YF(r)&&jF(r,e));)u=IF(u);const h=o&&hF(o)&&!o.initializer&&!o.exclamationToken&&tP(o)&&!function(e){return(void 0!==e.lastAssignmentPos||LF(e)&&void 0!==e.lastAssignmentPos)&&e.lastAssignmentPos<0}(n),y=l||c||d&&!h||p||f||function(e,t){if(hE(t)){const n=yc(e,hE);return n&&oy(n)===oy(t)}}(e,i)||a!==Nt&&a!==lr&&(!V||!!(16387&a.flags)||hv(e)||qN(e)||282===e.parent.kind)||236===e.parent.kind||261===i.kind&&i.exclamationToken||33554432&i.flags,v=g?Lt:y?l?oP(a,i):a:m?Lt:ww(a),b=g?Nw(AF(e,a,v,u)):AF(e,a,v,u);if(lF(e)||a!==Nt&&a!==lr){if(!y&&!uT(a)&&uT(b))return Jo(e,ha.Variable_0_is_used_before_being_assigned,dc(n)),a}else if(b===Nt||b===lr)return Z&&(Jo(Ac(i),ha.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,dc(n),mc(b)),Jo(e,ha.Variable_0_implicitly_has_an_1_type,dc(n),mc(b))),_B(b);return s?cw(b):b}function $P(e){var t;const n=e.parent;if(n){if(bE(n)&&n.expression===e)return!1;if(UF(n)&&n.isTypeOnly)return!1;const r=null==(t=n.parent)?void 0:t.parent;if(r&&zF(r)&&r.isTypeOnly)return!1}return!0}function HP(e){return yc(e,e=>!e||ay(e)?"quit":Z_(e,!1))}function XP(e,t){if(la(e).flags|=2,173===t.kind||177===t.kind){la(t.parent).flags|=4}else la(t).flags|=4}function ZP(e){return gf(e)?e:__(e)?void 0:sO(e,ZP)}function tA(e){return _u(Pu(xs(e)))===qt}function rA(e,t,n){const r=t.parent;wh(r)&&!tA(r)&&zg(e)&&e.flowNode&&!wF(e.flowNode,!1)&&Jo(e,n)}function oA(e){const t=hv(e);let n=sm(e,!0,!0),r=!1,i=!1;for(177===n.kind&&rA(e,n,ha.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);220===n.kind&&(n=sm(n,!1,!i),r=!0),168===n.kind;)n=sm(n,!r,!1),i=!0;if(function(e,t){LD(t)&&Mv(t)&&B&&t.initializer&&Bs(t.initializer,e.pos)&&Uv(t.parent)&&Jo(e,ha.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class)}(e,n),i)Jo(e,ha.this_cannot_be_referenced_in_a_computed_property_name);else switch(n.kind){case 268:Jo(e,ha.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 267:Jo(e,ha.this_cannot_be_referenced_in_current_location)}!t&&r&&A<2&&XP(e,n);const o=aA(e,!0,n);if(te){const t=j_(we);if(o===t&&r)Jo(e,ha.The_containing_arrow_function_captures_the_global_value_of_this);else if(!o){const r=Jo(e,ha.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!mP(n)){const e=aA(n);e&&e!==t&&fT(r,Wp(n,ha.An_outer_value_of_this_is_shadowed_by_this_container))}}}return o||wt}function aA(e,t=!0,n=sm(e,!1,!1)){const r=Mm(e);if(__(n)&&(!gA(e)||fv(n))){let t=eh(Rg(n))||r&&function(e){const t=il(e);if(t&&t.typeExpression)return VS(t.typeExpression);const n=Jg(e);if(n)return eh(n)}(n);if(!t){const e=function(e){if(219===e.kind&&LE(e.parent)&&3===cg(e.parent))return e.parent.left.expression.expression;if(175===e.kind&&211===e.parent.kind&&LE(e.parent.parent)&&6===cg(e.parent.parent))return e.parent.parent.left.expression;if(219===e.kind&&304===e.parent.kind&&211===e.parent.parent.kind&&LE(e.parent.parent.parent)&&6===cg(e.parent.parent.parent))return e.parent.parent.parent.left.expression;if(219===e.kind&&uP(e.parent)&&fD(e.parent.name)&&("value"===e.parent.name.escapedText||"get"===e.parent.name.escapedText||"set"===e.parent.name.escapedText)&&vE(e.parent.parent)&&SE(e.parent.parent.parent)&&e.parent.parent.parent.arguments[2]===e.parent.parent&&9===cg(e.parent.parent.parent))return e.parent.parent.parent.arguments[0].expression;if(MD(e)&&fD(e.name)&&("value"===e.name.escapedText||"get"===e.name.escapedText||"set"===e.name.escapedText)&&vE(e.parent)&&SE(e.parent.parent)&&e.parent.parent.arguments[2]===e.parent&&9===cg(e.parent.parent))return e.parent.parent.arguments[0].expression}(n);if(r&&e){const n=WM(e).symbol;n&&n.members&&16&n.flags&&(t=Pu(n).thisType)}else ML(n)&&(t=Pu(bs(n.symbol)).thisType);t||(t=pA(n))}if(t)return AF(e,t)}if(y_(n.parent)){const t=xs(n.parent);return AF(e,jv(n)?j_(t):Pu(t).thisType)}if(mP(n)){if(n.commonJsModuleIndicator){const e=xs(n);return e&&j_(e)}if(n.externalModuleIndicator)return Lt;if(t)return j_(we)}}function sA(e){const t=214===e.parent.kind&&e.parent.expression===e,n=um(e,!0);let r=n,i=!1,o=!1;if(!t){for(;r&&220===r.kind;)Lv(r,1024)&&(o=!0),r=um(r,!0),i=A<2;r&&Lv(r,1024)&&(o=!0)}let a=0;if(!r||!function(e){if(t)return 177===e.kind;if(y_(e.parent)||211===e.parent.kind)return jv(e)?175===e.kind||174===e.kind||178===e.kind||179===e.kind||173===e.kind||176===e.kind:175===e.kind||174===e.kind||178===e.kind||179===e.kind||173===e.kind||172===e.kind||177===e.kind;return!1}(r)){const n=yc(e,e=>e===r?"quit":168===e.kind);return n&&168===n.kind?Jo(e,ha.super_cannot_be_referenced_in_a_computed_property_name):t?Jo(e,ha.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):r&&r.parent&&(y_(r.parent)||211===r.parent.kind)?Jo(e,ha.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):Jo(e,ha.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),Ft}if(t||177!==n.kind||rA(e,r,ha.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),jv(r)||t?(a=32,!t&&A>=2&&A<=8&&(LD(r)||RD(r))&&Rp(e.parent,e=>{mP(e)&&!sf(e)||(la(e).flags|=2097152)})):a=16,la(e).flags|=a,175===r.kind&&o&&(pm(e.parent)&&ih(e.parent)?la(r).flags|=256:la(r).flags|=128),i&&XP(e.parent,r),211===r.parent.kind)return A<2?(Jo(e,ha.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),Ft):wt;const s=r.parent;if(!wh(s))return Jo(e,ha.super_can_only_be_referenced_in_a_derived_class),Ft;if(tA(s))return t?Ft:qt;const c=Pu(xs(s)),l=c&&mu(c)[0];return l?177===r.kind&&function(e,t){return!!yc(e,e=>d_(e)?"quit":170===e.kind&&e.parent===t)}(e,r)?(Jo(e,ha.super_cannot_be_referenced_in_constructor_arguments),Ft):32===a?_u(c):Pd(l,c.thisType):Ft}function cA(e){return 175!==e.kind&&178!==e.kind&&179!==e.kind||211!==e.parent.kind?219===e.kind&&304===e.parent.kind?e.parent.parent:void 0:e.parent}function lA(e){return 4&Tx(e)&&e.target===or?by(e)[0]:void 0}function _A(e){return ME(e,e=>2097152&e.flags?g(e.types,lA):lA(e))}function uA(e,t){let n=e,r=t;for(;r;){const e=_A(r);if(e)return e;if(304!==n.parent.kind)break;n=n.parent.parent,r=UA(n,void 0)}}function pA(e){if(220===e.kind)return;if(Ak(e)){const t=oI(e);if(t){const e=t.thisParameter;if(e)return j_(e)}}const t=Mm(e);if(te||t){const n=cA(e);if(n){const e=UA(n,void 0),t=uA(n,e);return t?Ck(t,_N(QA(n))):Hw(e?Nw(e):kM(n))}const r=_h(e.parent);if(ub(r)){const e=r.left;if(Px(e)){const{expression:n}=e;if(t&&fD(n)){const e=wd(r);if(e.commonJsModuleIndicator&&zN(n)===e.symbol)return}return Hw(kM(n))}}}}function fA(e){const t=e.parent;if(!Ak(t))return;const n=dm(t);if(n&&n.arguments){const r=fL(n),i=t.parameters.indexOf(e);if(e.dotDotDotToken)return sL(r,i,r.length,wt,void 0,0);const o=la(n),a=o.resolvedSignature;o.resolvedSignature=si;const s=i!!(58998787&e.flags)||XM(e,n,void 0)):2&n?EE(t,e=>!!(58998787&e.flags)||!!hR(e)):t}const i=dm(e);return i?$A(i,t):void 0}function vA(e,t){const n=fL(e).indexOf(t);return-1===n?void 0:bA(e,n)}function bA(e,t){if(hf(e))return 0===t?Ut:1===t?ov(!1):wt;const n=la(e).resolvedSignature===li?li:jL(e);if(Nu(e)&&0===t)return YA(n,e);const r=n.parameters.length-1;return bJ(n)&&t>=r?qx(j_(n.parameters[r]),CS(t-r),256):dj(n,t)}function xA(e,t){const n=e.parent,{left:r,operatorToken:i,right:o}=n;switch(i.kind){case 64:case 77:case 76:case 78:return e===o?function(e){var t,n;const r=cg(e);switch(r){case 0:case 4:const i=function(e){if(pu(e)&&e.symbol)return e.symbol;if(fD(e))return zN(e);if(bE(e)){const n=qM(e.expression);return mD(e.name)?t(n,e.name):xm(n,e.name.escapedText)}if(xE(e)){const t=kM(e.argumentExpression);if(!mC(t))return;return xm(qM(e.expression),gC(t))}return;function t(e,t){const n=pO(t.escapedText,t);return n&&hO(e,n)}}(e.left),o=i&&i.valueDeclaration;if(o&&(LD(o)||OD(o))){const t=xv(o);return t&&Ck(VS(t),ca(i).mapper)||(LD(o)?o.initializer&&qM(e.left):void 0)}return 0===r?qM(e.left):kA(e);case 5:if(SA(e,r))return kA(e);if(pu(e.left)&&e.left.symbol){const t=e.left.symbol.valueDeclaration;if(!t)return;const n=st(e.left,Px),r=xv(t);if(r)return VS(r);if(fD(n.expression)){const e=n.expression,t=ze(e,e.escapedText,111551,void 0,!0);if(t){const e=t.valueDeclaration&&xv(t.valueDeclaration);if(e){const t=hg(n);if(void 0!==t)return CA(VS(e),t)}return}}return Mm(t)||t===e.left?void 0:qM(e.left)}return qM(e.left);case 1:case 6:case 3:case 2:let a;2!==r&&(a=pu(e.left)?null==(t=e.left.symbol)?void 0:t.valueDeclaration:void 0),a||(a=null==(n=e.symbol)?void 0:n.valueDeclaration);const s=a&&xv(a);return s?VS(s):void 0;case 7:case 8:case 9:return gn.fail("Does not apply");default:return gn.assertNever(r)}}(n):void 0;case 57:case 61:const i=$A(n,t);return e===o&&(i&&i.pattern||!i&&!tg(n))?qM(r):i;case 56:case 28:return e===o?$A(n,t):void 0;default:return}}function SA(e,t=cg(e)){if(4===t)return!0;if(!Mm(e)||5!==t||!fD(e.left.expression))return!1;const n=e.left.expression.escapedText,r=ze(e.left,n,111551,void 0,!0,!0);return mm(null==r?void 0:r.valueDeclaration)}function kA(e){if(!e.symbol)return qM(e.left);if(e.symbol.valueDeclaration){const t=xv(e.symbol.valueDeclaration);if(t){const e=VS(t);if(e)return e}}const t=st(e.left,Px);if(!Kf(sm(t.expression,!1,!1)))return;const n=oA(t.expression),r=hg(t);return void 0!==r&&CA(n,r)||void 0}function TA(e,t){if(16777216&e.flags){const n=e;return!!(131072&Qf(Yx(n)).flags)&&Hx(eS(n))===Hx(n.checkType)&&Jk(t,n.extendsType)}return!!(2097152&e.flags)&&X(e.types,e=>TA(e,t))}function CA(e,t,n){return ME(e,e=>{if(2097152&e.flags){let r,i,o=!1;for(const a of e.types){if(!(524288&a.flags))continue;if(Pp(a)&&2!==Ap(a)){r=wA(r,NA(a,t,n));continue}const e=EA(a,t);e?(o=!0,i=void 0,r=wA(r,e)):o||(i=le(i,a))}if(i)for(const e of i){r=wA(r,FA(e,t,n))}if(!r)return;return 1===r.length?r[0]:Gb(r)}if(524288&e.flags)return Pp(e)&&2!==Ap(e)?NA(e,t,n):EA(e,t)??FA(e,t,n)},!0)}function wA(e,t){return t?le(e,1&t.flags?Ot:t):e}function NA(e,t,n){const r=n||TS(Sc(t)),i=dp(e);if(e.nameType&&TA(e.nameType,r)||TA(i,r))return;return Jk(r,xf(i)||i)?zx(e,r):void 0}function EA(e,t){const n=xm(e,t);var r;if(n&&!(262144&ux(r=n)&&!r.links.type&&Hc(r,0)>=0))return Iw(j_(n),!!(16777216&n.flags))}function FA(e,t,n){var r;if(fw(e)&&HT(t)&&+t>=0){const t=vw(e,e.target.fixedLength,0,!1,!0);if(t)return t}return null==(r=Um(Km(e),n||TS(Sc(t))))?void 0:r.type}function OA(e,t){if(gn.assert(Kf(e)),!(67108864&e.flags))return MA(e,t)}function MA(e,t){const n=e.parent,r=uP(e)&&mA(e,t);if(r)return r;const i=UA(n,t);if(i){if(hd(e)){const t=xs(e);return CA(i,t.escapedName,ca(t).nameType)}if(Wh(e)){const t=Ac(e);if(t&&FD(t)){const e=WM(t.expression),n=mC(e)&&CA(i,gC(e));if(n)return n}}if(e.name){const t=rx(e.name);return ME(i,e=>{var n;return null==(n=Um(Km(e),t))?void 0:n.type},!0)}}}function RA(e,t,n,r,i){return e&&ME(e,e=>{if(fw(e)){if((void 0===r||ti)?n-t:0,a=o>0&&12&e.target.combinedFlags?Eb(e.target,3):0;return o>0&&o<=a?by(e)[xy(e)-o]:vw(e,void 0===r?e.target.fixedLength:Math.min(e.target.fixedLength,r),void 0===n||void 0===i?a:Math.min(a,n-i),!1,!0)}return(!r||tQC(e)?qx(e,CS(a)):e,!0))}(n,e,t):void 0}function JA(e,t){if(nP(e)){const n=UA(e.parent,t);if(!n||el(n))return;return CA(n,lC(e.name))}return $A(e.parent,t)}function zA(e){switch(e.kind){case 11:case 9:case 10:case 15:case 229:case 112:case 97:case 106:case 80:case 157:return!0;case 212:case 218:return zA(e.expression);case 295:return!e.expression||zA(e.expression)}return!1}function qA(e,t){const n=`D${pJ(e)},${Ab(t)}`;return Ao(n)??Io(n,function(e,t){const n=eD(e),r=n&&T(t.properties,e=>e.symbol&&304===e.kind&&e.symbol.escapedName===n&&zA(e.initializer)),i=r&&VM(r.initializer);return i&&tD(e,i)}(t,e)??qT(t,Y(O(P(e.properties,e=>!!e.symbol&&(304===e.kind?zA(e.initializer)&&YN(t,e.symbol.escapedName):305===e.kind&&YN(t,e.symbol.escapedName))),e=>[()=>VM(304===e.kind?e.initializer:e.name),e.symbol.escapedName]),O(P(Qp(t),n=>{var r;return!!(16777216&n.flags)&&!!(null==(r=null==e?void 0:e.symbol)?void 0:r.members)&&!e.symbol.members.has(n.escapedName)&&YN(t,n.escapedName)}),e=>[()=>Lt,e.escapedName])),Jk))}function UA(e,t){const n=VA(Kf(e)?OA(e,t):$A(e,t),e,t);if(n&&!(t&&2&t&&8650752&n.flags)){const t=ME(n,e=>32&Tx(e)?e:Pf(e),!0);return 1048576&t.flags&&vE(e)?qA(e,t):1048576&t.flags&&rP(e)?function(e,t){const n=`D${pJ(e)},${Ab(t)}`,r=Ao(n);if(r)return r;const i=PI(EI(e));return Io(n,qT(t,Y(O(P(e.properties,e=>!!e.symbol&&292===e.kind&&YN(t,e.symbol.escapedName)&&(!e.initializer||zA(e.initializer))),e=>[e.initializer?()=>VM(e.initializer):()=>Gt,e.symbol.escapedName]),O(P(Qp(t),n=>{var r;if(!(16777216&n.flags&&(null==(r=null==e?void 0:e.symbol)?void 0:r.members)))return!1;const o=e.parent.parent;return(n.escapedName!==i||!GF(o)||!gy(o.children).length)&&!e.symbol.members.has(n.escapedName)&&YN(t,n.escapedName)}),e=>[()=>Lt,e.escapedName])),Jk))}(e,t):t}}function VA(e,t,n){if(e&&oM(e,465829888)){const r=QA(t);if(r&&1&n&&X(r.inferences,MM))return WA(e,r.nonFixingMapper);if(null==r?void 0:r.returnMapper){const t=WA(e,r.returnMapper);return 1048576&t.flags&&Ib(t.types,Ht)&&Ib(t.types,Xt)?EE(t,e=>e!==Ht&&e!==Xt):t}}return e}function WA(e,t){return 465829888&e.flags?Ck(e,t):1048576&e.flags?zb(O(e.types,e=>WA(e,t)),0):2097152&e.flags?Gb(O(e.types,e=>WA(e,t))):e}function $A(e,t){var n;if(67108864&e.flags)return;const r=XA(e,!t);if(r>=0)return Ei[r];const{parent:i}=e;switch(i.kind){case 261:case 170:case 173:case 172:case 209:return function(e,t){const n=e.parent;if(Mu(n)&&e===n.initializer){const e=mA(n,t);if(e)return e;if(!(8&t)&&E_(n.name)&&n.name.elements.length>0)return Ql(n.name,!0,!1)}}(e,t);case 220:case 254:return function(e,t){const n=tm(e);if(n){let e=yA(n,t);if(e){const t=zh(n);if(1&t){const n=!!(2&t);1048576&e.flags&&(e=EE(e,e=>!!HB(1,e,n)));const r=HB(1,e,!!(2&t));if(!r)return;e=r}if(2&t){const t=ME(e,wR);return t&&zb([t,Bj(t)])}return e}}}(e,t);case 230:return function(e,t){const n=tm(e);if(n){const r=zh(n);let i=yA(n,t);if(i){const n=!!(2&r);if(!e.asteriskToken&&1048576&i.flags&&(i=EE(i,e=>!!HB(1,e,n))),e.asteriskToken){const r=GB(i,n),o=(null==r?void 0:r.yieldType)??_n,a=$A(e,t)??_n,s=(null==r?void 0:r.nextType)??Ot,c=qj(o,a,s,!1);return n?zb([c,qj(o,a,s,!0)]):c}return HB(0,i,n)}}}(i,t);case 224:return function(e,t){const n=$A(e,t);if(n){const e=wR(n);return e&&zb([e,Bj(e)])}}(i,t);case 214:case 215:return vA(i,e);case 171:return function(e){const t=Mj(e);return t?Rh(t):void 0}(i);case 217:case 235:return El(i.type)?$A(i,t):VS(i.type);case 227:return xA(e,t);case 304:case 305:return MA(i,t);case 306:return $A(i.parent,t);case 210:{const r=i,o=UA(r,t),a=op(r.elements,e),s=(n=la(r)).spreadIndices??(n.spreadIndices=function(e){let t,n;for(let r=0;r=0)return Ei[n]}return bA(e,0)}(i,t);case 302:return function(e){return CA(av(!1),xC(e))}(i)}}function KA(e){HA(e,$A(e,void 0),!0)}function HA(e,t,n){Di[Pi]=e,Ei[Pi]=t,Fi[Pi]=n,Pi++}function GA(){Pi--,Di[Pi]=void 0,Ei[Pi]=void 0,Fi[Pi]=void 0}function XA(e,t){for(let n=Pi-1;n>=0;n--)if(e===Di[n]&&(t||!Fi[n]))return n;return-1}function QA(e){for(let t=ji-1;t>=0;t--)if(mh(e,Oi[t]))return Li[t]}function YA(e,t){return eP(t)||0!==lL(t)?function(e,t){let n=Sj(e,Ot);n=ZA(t,EI(t),n);const r=wI(XB.IntrinsicAttributes,t);nl(r)||(n=$d(r,n));return n}(e,t):function(e,t){const n=EI(t),r=(i=n,FI(XB.ElementAttributesPropertyNameContainer,i));var i;let o=void 0===r?Sj(e,Ot):""===r?ah(e):function(e,t){if(e.compositeSignatures){const n=[];for(const r of e.compositeSignatures){const e=ah(r);if(el(e))return e;const i=Yc(e,t);if(!i)return;n.push(i)}return Gb(n)}const n=ah(e);return el(n)?n:Yc(n,t)}(e,r);if(!o)return r&&m(t.attributes.properties)&&Jo(t,ha.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,Sc(r)),Ot;if(o=ZA(t,n,o),el(o))return o;{let n=o;const r=wI(XB.IntrinsicClassAttributes,t);if(!nl(r)){const i=eu(r.symbol),o=ah(e);let a;if(i){a=Ck(r,ZS(i,Mg([o],i,Ag(i),Mm(t))))}else a=r;n=$d(a,n)}const i=wI(XB.IntrinsicAttributes,t);return nl(i)||(n=$d(i,n)),n}}(e,t)}function ZA(e,t,n){const r=(i=t)&&ua(i.exports,XB.LibraryManagedAttributes,788968);var i;if(r){const t=function(e){if(eP(e))return IL(e);if(xI(e.tagName))return Rh(AL(e,RI(e)));const t=kM(e.tagName);if(128&t.flags){const n=MI(t,e);return n?Rh(AL(e,n)):Ft}return t}(e),i=UI(r,Mm(e),t,n);if(i)return i}return n}function nI(e){return HS(E,"noImplicitAny")?Pe(e,(e,t)=>e!==t&&e?Ud(e.typeParameters,t.typeParameters)?function(e,t){const n=e.typeParameters||t.typeParameters;let r;e.typeParameters&&t.typeParameters&&(r=ZS(t.typeParameters,e.typeParameters));let i=166&(e.flags|t.flags);const o=e.declaration,a=function(e,t,n){const r=gj(e),i=gj(t),o=r>=i?e:t,a=o===e?t:e,s=o===e?r:i,c=yj(e)||yj(t),l=c&&!yj(o),_=new Array(s+(l?1:0));for(let u=0;u=hj(o)&&u>=hj(a),h=u>=r?void 0:cj(e,u),y=u>=i?void 0:cj(t,u),v=Xo(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${u}`,m?32768:g?16384:0);v.links.type=m?Hv(f):f,_[u]=v}if(l){const e=Xo(1,"args",32768);e.links.type=Hv(dj(a,s)),a===t&&(e.links.type=Ck(e.links.type,n)),_[s]=e}return _}(e,t,r),s=ke(a);s&&32768&ux(s)&&(i|=1);const c=function(e,t,n){if(!e||!t)return e||t;const r=zb([j_(e),Ck(j_(t),n)]);return Mw(e,r)}(e.thisParameter,t.thisParameter,r),l=Math.max(e.minArgumentCount,t.minArgumentCount),_=Id(o,n,c,a,void 0,void 0,l,i);_.compositeKind=2097152,_.compositeSignatures=Y(2097152===e.compositeKind&&e.compositeSignatures||[e],[t]),r&&(_.mapper=2097152===e.compositeKind&&e.mapper&&e.compositeSignatures?_k(e.mapper,r):r);return _}(e,t):void 0:e):void 0}function rI(e,t){const n=P(Cm(e,0),e=>!function(e,t){let n=0;for(;nfunction(e){const t=wd(e);if(!qq(t)&&!e.isUnterminated){let r;n??(n=ks(99,!0)),n.setScriptTarget(t.languageVersion),n.setLanguageVariant(t.languageVariant),n.setOnError((e,i,o)=>{const a=n.getTokenEnd();if(3===e.category&&r&&a===r.start&&i===r.length){const n=Zx(t.fileName,t.text,a,i,e,o);fT(r,n)}else r&&a===r.start||(r=rS(t,a,i,e,o),ho.add(r))}),n.setText(t.text,e.pos,e.end-e.pos);try{return n.scan(),gn.assert(14===n.reScanSlashToken(!0),"Expected scanner to rescan RegularExpressionLiteral"),!!r}finally{n.setText(""),n.setOnError(void 0)}}return!1}(e))),ir}function sI(e){return 209===e.kind&&!!e.initializer||304===e.kind&&sI(e.initializer)||305===e.kind&&!!e.objectAssignmentInitializer||227===e.kind&&64===e.operatorToken.kind}function cI(e,t,n){const r=e.elements,i=r.length,o=[],a=[];KA(e);const s=ih(e),c=FM(e),l=UA(e,void 0),_=function(e){const t=_h(e.parent);return BE(t)&&U_(t.parent)}(e)||!!l&&fE(l,e=>nw(e)||Pp(e)&&!e.nameType&&!!bk(e.target||e));let u=!1;for(let c=0;c8&a[t]?Vx(e,Vt)||wt:e),2):V?dn:jt,c))}function lI(e){if(!(4&Tx(e)))return e;let t=e.literalType;return t||(t=e.literalType=yy(e),t.objectFlags|=147456),t}function _I(e){switch(e.kind){case 168:return function(e){return aM(uI(e),296)}(e);case 80:return HT(e.escapedText);case 9:case 11:return HT(e.text);default:return!1}}function uI(e){const t=la(e.expression);if(!t.resolvedType){if((XD(e.parent.parent)||y_(e.parent.parent)||xF(e.parent.parent))&&LE(e.expression)&&103===e.expression.operatorToken.kind&&178!==e.parent.kind&&179!==e.parent.kind)return t.resolvedType=Ft;if(t.resolvedType=WM(e.expression),LD(e.parent)&&!Mv(e.parent)&&JE(e.parent.parent)){const t=HP(Mp(e.parent.parent));t&&(la(t).flags|=4096,la(e).flags|=32768,la(e.parent.parent).flags|=32768)}(98304&t.resolvedType.flags||!aM(t.resolvedType,402665900)&&!Jk(t.resolvedType,hn))&&Jo(e,ha.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return t.resolvedType}function dI(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return HT(e.escapedName)||n&&Fc(n)&&_I(n.name)}function pI(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return Yh(e)||n&&Fc(n)&&FD(n.name)&&aM(uI(n.name),4096)}function fI(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return n&&Fc(n)&&FD(n.name)}function mI(e,t,n,r){var i;const o=[];let a;for(let e=t;e0&&(a=hS(a,x(),e.symbol,m,l),o=[],i=nd(),h=!1,y=!1,v=!1);const n=Qf(WM(p.expression,2&t));if(vI(n)){const t=gS(n,l);if(r&&CI(t,r,p),b=o.length,nl(a))continue;a=hS(a,t,e.symbol,m,l)}else Jo(p,ha.Spread_types_may_only_be_created_from_object_types),a=Ft;continue}gn.assert(178===p.kind||179===p.kind),lz(p)}!S||8576&S.flags?i.set(f.escapedName,f):Jk(S,hn)&&(Jk(S,Vt)?y=!0:Jk(S,nn)?v=!0:h=!0,n&&(g=!0)),o.push(f)}return GA(),nl(a)?Ft:a!==Nn?(o.length>0&&(a=hS(a,x(),e.symbol,m,l),o=[],i=nd(),h=!1,y=!1),ME(a,e=>e===Nn?x():e)):x();function x(){const t=[],r=FM(e);h&&t.push(mI(r,b,o,Ut)),y&&t.push(mI(r,b,o,Vt)),v&&t.push(mI(r,b,o,nn));const a=Ks(e.symbol,i,p,p,t);return a.objectFlags|=131200|m,f&&(a.objectFlags|=4096),g&&(a.objectFlags|=512),n&&(a.pattern=e),a}}function vI(e){const t=xw(ME(e,Sf));return!!(126615553&t.flags||3145728&t.flags&&k(t.types,vI))}function bI(e){return e.includes("-")}function xI(e){return fD(e)&&My(e.escapedText)||aP(e)}function SI(e,t){return e.initializer?PM(e.initializer,t):Gt}function kI(e,t=0){const n=V?nd():void 0;let r,i=nd(),o=Dn,a=!1,s=!1,c=2048;const l=PI(EI(e));let _,u=e;if(!eP(e)){const d=e.attributes;_=d.symbol,u=d;const p=$A(d,0);for(const e of d.properties){const _=e.symbol;if(nP(e)){const r=SI(e,t);c|=458752&Tx(r);const o=Xo(4|_.flags,_.escapedName);if(o.declarations=_.declarations,o.parent=_.parent,_.valueDeclaration&&(o.valueDeclaration=_.valueDeclaration),o.links.type=r,o.links.target=_,i.set(o.escapedName,o),null==n||n.set(o.escapedName,o),lC(e.name)===l&&(s=!0),p){const t=xm(p,_.escapedName);t&&t.declarations&&Ko(t)&&fD(e.name)&&Go(e.name,t.declarations,e.name.escapedText)}if(p&&2&t&&!(4&t)&&Fk(e)){const t=QA(d);gn.assert(t);oN(t,e.initializer.expression,r)}}else{gn.assert(294===e.kind),i.size>0&&(o=hS(o,f(),d.symbol,c,!1),i=nd());const s=Qf(WM(e.expression,2&t));el(s)&&(a=!0),vI(s)?(o=hS(o,s,d.symbol,c,!1),n&&CI(s,n,e)):(Jo(e.expression,ha.Spread_types_may_only_be_created_from_object_types),r=r?Gb([r,s]):s)}}a||i.size>0&&(o=hS(o,f(),d.symbol,c,!1))}const d=e.parent;if((GF(d)&&d.openingElement===e||ZF(d)&&d.openingFragment===e)&&gy(d.children).length>0){const n=TI(d,t);if(!a&&l&&""!==l){s&&Jo(u,ha._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,Sc(l));const t=QF(e)?UA(e.attributes,void 0):void 0,r=t&&CA(t,l),i=Xo(4,l);i.links.type=1===n.length?n[0]:r&&fE(r,nw)?ob(n):Hv(zb(n)),i.valueDeclaration=kw.createPropertySignature(void 0,Sc(l),void 0,void 0),jT(i.valueDeclaration,u),i.valueDeclaration.symbol=i;const a=nd();a.set(l,i),o=hS(o,Ks(_,a,p,p,p),_,c,!1)}}return a?wt:r&&o!==Dn?Gb([r,o]):r||(o===Dn?f():o);function f(){return c|=8192,function(e,t,n){const r=Ks(t,n,p,p,p);return r.objectFlags|=139392|e,r}(c,_,i)}}function TI(e,t){const n=[];for(const r of e.children)if(12===r.kind)r.containsOnlyTriviaWhiteSpaces||n.push(Ut);else{if(295===r.kind&&!r.expression)continue;n.push(PM(r,t))}return n}function CI(e,t,n){for(const r of Qp(e))if(!(16777216&r.flags)){const e=t.get(r.escapedName);if(e){fT(Jo(e.valueDeclaration,ha._0_is_specified_more_than_once_so_this_usage_will_be_overwritten,Sc(e.escapedName)),Wp(n,ha.This_spread_always_overwrites_this_property))}}}function wI(e,t){const n=EI(t),r=n&&gs(n),i=r&&ua(r,e,788968);return i?Pu(i):Ft}function NI(e){const t=la(e);if(!t.resolvedSymbol){const n=wI(XB.IntrinsicElements,e);if(nl(n))return Z&&Jo(e,ha.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,Sc(XB.IntrinsicElements)),t.resolvedSymbol=vt;{if(!fD(e.tagName)&&!aP(e.tagName))return gn.fail();const r=aP(e.tagName)?dC(e.tagName):e.tagName.escapedText,i=xm(n,r);if(i)return t.jsxFlags|=1,t.resolvedSymbol=i;const o=Tz(n,TS(Sc(r)));return o?(t.jsxFlags|=2,t.resolvedSymbol=o):Zc(n,r)?(t.jsxFlags|=2,t.resolvedSymbol=n.symbol):(Jo(e,ha.Property_0_does_not_exist_on_type_1,fC(e.tagName),"JSX."+XB.IntrinsicElements),t.resolvedSymbol=vt)}}return t.resolvedSymbol}function DI(e){const t=e&&wd(e),n=t&&la(t);if(n&&!1===n.jsxImplicitImportContainer)return;if(n&&n.jsxImplicitImportContainer)return n.jsxImplicitImportContainer;const r=rk(nk(E,t),E);if(!r)return;const i=1===DS(E)?ha.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:ha.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed,o=function(e,t){const n=E.importHelpers?1:0,r=null==e?void 0:e.imports[n];r&&gn.assert(sy(r)&&r.text===t,`Expected sourceFile.imports[${n}] to be the synthesized JSX runtime import`);return r}(t,r),a=as(o||e,r,i,e),s=a&&a!==vt?bs(Wa(a)):void 0;return n&&(n.jsxImplicitImportContainer=s||!1),s}function EI(e){const t=e&&la(e);if(t&&t.jsxNamespace)return t.jsxNamespace;if(!t||!1!==t.jsxNamespace){let n=DI(e);if(!n||n===vt){const t=Oo(e);n=ze(e,t,1920,void 0,!1)}if(n){const e=Wa(ua(gs(Wa(n)),XB.JSX,1920));if(e&&e!==vt)return t&&(t.jsxNamespace=e),e}t&&(t.jsxNamespace=!1)}const n=Wa(Zy(XB.JSX,1920,void 0));return n!==vt?n:void 0}function FI(e,t){const n=t&&ua(t.exports,e,788968),r=n&&Pu(n),i=r&&Qp(r);if(i){if(0===i.length)return"";if(1===i.length)return i[0].escapedName;i.length>1&&n.declarations&&Jo(n.declarations[0],ha.The_global_type_JSX_0_may_not_have_more_than_one_property,Sc(e))}}function PI(e){return 4===E.jsx||5===E.jsx?"children":FI(XB.ElementChildrenAttributeNameContainer,e)}function LI(e,t){if(4&e.flags)return[si];if(128&e.flags){const n=MI(e,t);if(n){return[AL(t,n)]}return Jo(t,ha.Property_0_does_not_exist_on_type_1,e.value,"JSX."+XB.IntrinsicElements),p}const n=Pf(e);let r=Cm(n,1);return 0===r.length&&(r=Cm(n,0)),0===r.length&&1048576&n.flags&&(r=qd(O(n.types,e=>LI(e,t)))),r}function MI(e,t){const n=wI(XB.IntrinsicElements,t);if(!nl(n)){const t=xm(n,xc(e.value));if(t)return j_(t);const r=_g(n,Ut);return r||void 0}return wt}function RI(e){var t;gn.assert(xI(e.tagName));const n=la(e);if(!n.resolvedJsxElementAttributesType){const r=NI(e);if(1&n.jsxFlags)return n.resolvedJsxElementAttributesType=j_(r)||Ft;if(2&n.jsxFlags){const r=aP(e.tagName)?dC(e.tagName):e.tagName.escapedText;return n.resolvedJsxElementAttributesType=(null==(t=mg(wI(XB.IntrinsicElements,e),r))?void 0:t.type)||Ft}return n.resolvedJsxElementAttributesType=Ft}return n.resolvedJsxElementAttributesType}function BI(e){const t=wI(XB.ElementClass,e);if(!nl(t))return t}function JI(e){return wI(XB.Element,e)}function zI(e){const t=JI(e);if(t)return zb([t,zt])}function qI(e){const t=EI(e);if(!t)return;const n=(r=t)&&ua(r.exports,XB.ElementType,788968);var r;if(!n)return;const i=UI(n,Mm(e));return i&&!nl(i)?i:void 0}function UI(e,t,...n){const r=Pu(e);if(524288&e.flags){const i=ca(e).typeParameters;if(m(i)>=n.length){const o=Mg(n,i,n.length,t);return 0===m(o)?r:ky(e,o)}}if(m(r.typeParameters)>=n.length){return my(r,Mg(n,r.typeParameters,n.length,t))}}function VI(e){const t=Nu(e);var n;t&&function(e){(function(e){if(bE(e)&&aP(e.expression))return Wq(e.expression,ha.JSX_property_access_expressions_cannot_include_JSX_namespace_names);if(aP(e)&&tk(E)&&!My(e.namespace.escapedText))Wq(e,ha.React_components_cannot_include_JSX_namespace_names)})(e.tagName),Cq(e,e.typeArguments);const t=new Map;for(const n of e.attributes.properties){if(294===n.kind)continue;const{name:e,initializer:r}=n,i=lC(e);if(t.get(i))return Wq(e,ha.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(t.set(i,!0),r&&295===r.kind&&!r.expression)return Wq(r,ha.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}(e),n=e,0===(E.jsx||0)&&Jo(n,ha.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===JI(n)&&Z&&Jo(n,ha.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist),NP(e);const r=jL(e);if(JL(r,e),t){const t=e,n=qI(t);if(void 0!==n){const e=t.tagName;OT(xI(e)?TS(fC(e)):WM(e),n,So,e,ha.Its_type_0_is_not_a_valid_JSX_element_type,()=>{const t=rp(e);return sS(void 0,ha._0_cannot_be_used_as_a_JSX_component,t)})}else!function(e,t,n){if(1===e){const e=zI(n);e&&OT(t,e,So,n.tagName,ha.Its_return_type_0_is_not_a_valid_JSX_element,r)}else if(0===e){const e=BI(n);e&&OT(t,e,So,n.tagName,ha.Its_instance_type_0_is_not_a_valid_JSX_element,r)}else{const e=zI(n),i=BI(n);if(!e||!i)return;OT(t,zb([e,i]),So,n.tagName,ha.Its_element_type_0_is_not_a_valid_JSX_element,r)}function r(){const e=rp(n.tagName);return sS(void 0,ha._0_cannot_be_used_as_a_JSX_component,e)}}(lL(t),ah(r),t)}}function WI(e,t,n){if(524288&e.flags&&(Kp(e,t)||mg(e,t)||fd(t)&&ig(e,Ut)||n&&bI(t)))return!0;if(33554432&e.flags)return WI(e.baseType,t,n);if(3145728&e.flags&&$I(e))for(const r of e.types)if(WI(r,t,n))return!0;return!1}function $I(e){return!!(524288&e.flags&&!(512&Tx(e))||67108864&e.flags||33554432&e.flags&&$I(e.baseType)||1048576&e.flags&&X(e.types,$I)||2097152&e.flags&&k(e.types,$I))}function KI(e,t){if(function(e){if(e.expression&&PA(e.expression))Wq(e.expression,ha.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}(e),e.expression){const n=WM(e.expression,t);return e.dotDotDotToken&&n!==wt&&!WC(n)&&Jo(e,ha.JSX_spread_child_must_be_an_array_type),n}return Ft}function HI(e){return e.valueDeclaration?eU(e.valueDeclaration):0}function GI(e){if(8192&e.flags||4&ux(e))return!0;if(Mm(e.valueDeclaration)){const t=e.valueDeclaration.parent;return t&&LE(t)&&3===cg(t)}}function XI(e,t,n,r,i,o=!0){return QI(e,t,n,r,i,o?167===e.kind?e.right:206===e.kind?e:209===e.kind&&e.propertyName?e.propertyName:e.name:void 0)}function QI(e,t,n,r,i,o){var a;const s=dx(i,n);if(t){if(A<2&&YI(i))return o&&Jo(o,ha.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(64&s)return o&&Jo(o,ha.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,dc(i),mc(IC(i))),!1;if(!(256&s)&&(null==(a=i.declarations)?void 0:a.some(x_)))return o&&Jo(o,ha.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super,dc(i)),!1}if(64&s&&YI(i)&&(fm(e)||gm(e)||mE(e.parent)&&mm(e.parent.parent))){const t=kx(Cs(i));if(t&&yc(e,e=>!!(BD(e)&&Ld(e.body)||LD(e))||!(!y_(e)&&!d_(e))&&"quit"))return o&&Jo(o,ha.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,dc(i),Gh(t.name)),!1}if(!(6&s))return!0;if(2&s){return!!xz(e,kx(Cs(i)))||(o&&Jo(o,ha.Property_0_is_private_and_only_accessible_within_class_1,dc(i),mc(IC(i))),!1)}if(t)return!0;let c=bz(e,e=>LC(Pu(xs(e)),i,n));return!c&&(c=function(e){const t=function(e){const t=sm(e,!1,!1);return t&&__(t)?fv(t):void 0}(e);let n=(null==t?void 0:t.type)&&VS(t.type);if(n)262144&n.flags&&(n=uf(n));else{const t=sm(e,!1,!1);__(t)&&(n=pA(t))}if(n&&7&Tx(n))return $_(n);return}(e),c=c&&LC(c,i,n),256&s||!c)?(o&&Jo(o,ha.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,dc(i),mc(IC(i)||r)),!1):!!(256&s)||(262144&r.flags&&(r=r.isThisType?uf(r):xf(r)),!(!r||!K_(r,c))||(o&&Jo(o,ha.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2,dc(i),mc(c),mc(r)),!1))}function YI(e){return!!AC(e,e=>!(8192&e.flags))}function ZI(e){return oO(WM(e),e)}function eO(e){return lD(e,50331648)}function tO(e){return eO(e)?Nw(e):e}function nO(e,t){const n=fb(e)?Vp(e):void 0;if(106!==e.kind)if(void 0!==n&&n.length<100){if(fD(e)&&"undefined"===n)return void Jo(e,ha.The_value_0_cannot_be_used_here,"undefined");Jo(e,16777216&t?33554432&t?ha._0_is_possibly_null_or_undefined:ha._0_is_possibly_undefined:ha._0_is_possibly_null,n)}else Jo(e,16777216&t?33554432&t?ha.Object_is_possibly_null_or_undefined:ha.Object_is_possibly_undefined:ha.Object_is_possibly_null);else Jo(e,ha.The_value_0_cannot_be_used_here,"null")}function rO(e,t){Jo(e,16777216&t?33554432&t?ha.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:ha.Cannot_invoke_an_object_which_is_possibly_undefined:ha.Cannot_invoke_an_object_which_is_possibly_null)}function iO(e,t,n){if(V&&2&e.flags){if(fb(t)){const e=Vp(t);if(e.length<100)return Jo(t,ha._0_is_of_type_unknown,e),Ft}return Jo(t,ha.Object_is_of_type_unknown),Ft}const r=cD(e,50331648);if(50331648&r){n(t,r);const i=Nw(e);return 229376&i.flags?Ft:i}return e}function oO(e,t){return iO(e,t,nO)}function aO(e,t){const n=oO(e,t);if(16384&n.flags){if(fb(t)){const e=Vp(t);if(fD(t)&&"undefined"===e)return Jo(t,ha.The_value_0_cannot_be_used_here,e),n;if(e.length<100)return Jo(t,ha._0_is_possibly_undefined,e),n}Jo(t,ha.Object_is_possibly_undefined)}return n}function lO(e,t,n){return 64&e.flags?function(e,t){const n=WM(e.expression),r=Aw(n,e.expression);return Pw(vO(e,e.expression,oO(r,e.expression),e.name,t),e,r!==n)}(e,t):vO(e,e.expression,ZI(e.expression),e.name,t,n)}function _O(e,t){const n=Em(e)&&gv(e.left)?oO(oA(e.left),e.left):ZI(e.left);return vO(e,e.left,n,e.right,t)}function uO(e){for(;218===e.parent.kind;)e=e.parent;return U_(e.parent)&&e.parent.expression===e}function pO(e,t){for(let n=am(t);n;n=rm(n)){const{symbol:t}=n,r=Qh(t,e),i=t.members&&t.members.get(r)||t.exports&&t.exports.get(r);if(i)return i}}function mO(e){!function(e){if(!rm(e))return Wq(e,ha.Private_identifiers_are_not_allowed_outside_class_bodies);if(!aF(e.parent)){if(!Nm(e))return Wq(e,ha.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);const t=LE(e.parent)&&103===e.parent.operatorToken.kind;if(!gO(e)&&!t)return Wq(e,ha.Cannot_find_name_0,kc(e))}}(e);const t=gO(e);return t&&LO(t,void 0,!1),wt}function gO(e){if(!Nm(e))return;const t=la(e);return void 0===t.resolvedSymbol&&(t.resolvedSymbol=pO(e.escapedText,e)),t.resolvedSymbol}function hO(e,t){return xm(e,t.escapedName)}function yO(e,t){return(Il(t)||fm(e)&&Ll(t))&&sm(e,!0,!1)===jl(t)}function vO(e,t,n,r,i,o){const a=la(t).resolvedSymbol,s=rh(e),c=Pf(0!==s||uO(e)?Hw(n):n),l=el(c)||c===_n;let _,u;if(mD(r)){(A{const n=e.valueDeclaration;if(n&&Fc(n)&&mD(n.name)&&n.name.escapedText===t.escapedText)return r=e,!0});const o=ya(t);if(r){const i=gn.checkDefined(r.valueDeclaration),a=gn.checkDefined(rm(i));if(null==n?void 0:n.valueDeclaration){const r=n.valueDeclaration,s=rm(r);if(gn.assert(!!s),yc(s,e=>a===e))return fT(Jo(t,ha.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,o,mc(e)),Wp(r,ha.The_shadowing_declaration_of_0_is_defined_here,o),Wp(i,ha.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,o)),!0}return Jo(t,ha.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,o,ya(a.name||eJ)),!0}return!1}(n,r,t))return Ft;const e=am(r);e&&Dd(wd(e),E.checkJs)&&Wq(r,ha.Private_field_0_must_be_declared_in_an_enclosing_class,kc(r))}else{65536&_.flags&&!(32768&_.flags)&&1!==s&&Jo(e,ha.Private_accessor_was_defined_without_a_getter)}}else{if(l)return fD(t)&&a&&xP(e,2,void 0,n),nl(c)?Ft:c;_=xm(c,r.escapedText,cM(c),167===e.kind)}if(xP(e,2,_,n),_){const n=QJ(_,r);if(Ko(n)&&Sx(e,n)&&n.declarations&&Go(r,n.declarations,r.escapedText),function(e,t,n){const{valueDeclaration:r}=e;if(!r||wd(t).isDeclarationFile)return;let i;const o=kc(n);!TO(t)||function(e){return LD(e)&&!zv(e)&&e.questionToken}(r)||Px(t)&&Px(t.expression)||pa(r,n)||MD(r)&&256&Zq(r)||!J&&function(e){if(!(32&e.parent.flags))return!1;let t=j_(e.parent);for(;;){if(t=t.symbol&&CO(t),!t)return!1;const n=xm(t,e.escapedName);if(n&&n.valueDeclaration)return!0}}(e)?264!==r.kind||184===t.parent.kind||33554432&r.flags||pa(r,n)||(i=Jo(n,ha.Class_0_used_before_its_declaration,o)):i=Jo(n,ha.Property_0_is_used_before_its_initialization,o);i&&fT(i,Wp(r,ha._0_is_declared_here,o))}(_,e,r),LO(_,e,jO(t,a)),la(e).resolvedSymbol=_,XI(e,108===t.kind,gx(e),c,_),Zj(e,_,s))return Jo(r,ha.Cannot_assign_to_0_because_it_is_a_read_only_property,kc(r)),Ft;u=yO(e,_)?Nt:o||mx(e)?L_(_):j_(_)}else{const t=mD(r)||0!==s&&Lx(n)&&!XT(n)?void 0:mg(c,r.escapedText);if(!t||!t.type){const t=bO(e,n.symbol,!0);return!t&&bx(n)?wt:n.symbol===we?(we.exports.has(r.escapedText)&&418&we.exports.get(r.escapedText).flags?Jo(r,ha.Property_0_does_not_exist_on_type_1,Sc(r.escapedText),mc(n)):Z&&Jo(r,ha.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,mc(n)),wt):(r.escapedText&&!ba(e)&&wO(r,XT(n)?c:n,t),Ft)}t.isReadonly&&(ih(e)||fh(e))&&Jo(e,ha.Index_signature_in_type_0_only_permits_reading,mc(c)),u=t.type,E.noUncheckedIndexedAccess&&1!==rh(e)&&(u=zb([u,Mt])),E.noPropertyAccessFromIndexSignature&&bE(e)&&Jo(r,ha.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0,Sc(r.escapedText)),t.declaration&&Ho(t.declaration)&&Go(r,[t.declaration],r.escapedText)}return xO(e,_,u,r,i)}function bO(e,t,n){var r;const i=wd(e);if(i&&void 0===E.checkJs&&void 0===i.checkJsDirective&&(1===i.scriptKind||2===i.scriptKind)){const o=g(null==t?void 0:t.declarations,wd),a=!(null==t?void 0:t.valueDeclaration)||!y_(t.valueDeclaration)||(null==(r=t.valueDeclaration.heritageClauses)?void 0:r.length)||km(!1,t.valueDeclaration);return!(i!==o&&o&&af(o)||n&&t&&32&t.flags&&a||e&&n&&bE(e)&&110===e.expression.kind&&a)}return!1}function xO(e,t,n,r,i){const o=rh(e);if(1===o)return Iw(n,!!(t&&16777216&t.flags));if(t&&!(98311&t.flags)&&!(8192&t.flags&&1048576&n.flags)&&!oz(t.declarations))return n;if(n===Nt)return Rl(e,t);n=gP(n,e,i);let a=!1;if(V&&G&&Px(e)&&110===e.expression.kind){const n=t&&t.valueDeclaration;if(n&&RJ(n)&&!jv(n)){const t=IF(e);177!==t.kind||t.parent!==n.parent||33554432&n.flags||(a=!0)}}else V&&t&&t.valueDeclaration&&bE(t.valueDeclaration)&&yg(t.valueDeclaration)&&IF(e)===IF(t.valueDeclaration)&&(a=!0);const s=AF(e,n,a?ww(n):n);return a&&!uT(n)&&uT(s)?(Jo(r,ha.Property_0_is_used_before_being_assigned,dc(t)),n):o?cw(s):s}function TO(e,t){return!!yc(e,e=>{switch(e.kind){case 173:case 176:return!0;case 187:case 288:return"quit";case 220:return!t&&"quit";case 242:return!(!d_(e.parent)||220===e.parent.kind)&&"quit";default:return!1}})}function CO(e){const t=mu(e);if(0!==t.length)return Gb(t)}function wO(e,t,n){const r=la(e),i=r.nonExistentPropCheckCache||(r.nonExistentPropCheckCache=new Set),o=`${Ab(t)}|${n}`;if(i.has(o))return;let a,s;if(i.add(o),!mD(e)&&1048576&t.flags&&!(402784252&t.flags))for(const n of t.types)if(!xm(n,e.escapedText)&&!mg(n,e.escapedText)){a=sS(a,ha.Property_0_does_not_exist_on_type_1,Bp(e),mc(n));break}if(NO(e.escapedText,t)){const n=Bp(e),r=mc(t);a=sS(a,ha.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,n,r,r+"."+n)}else{const r=yR(t);if(r&&xm(r,e.escapedText))a=sS(a,ha.Property_0_does_not_exist_on_type_1,Bp(e),mc(t)),s=Wp(e,ha.Did_you_forget_to_use_await);else{const r=Bp(e),i=mc(t),o=function(e,t){const n=Pf(t).symbol;if(!n)return;const r=Cc(n),i=cp().get(r);if(i)for(const[t,n]of i)if(D(n,e))return t}(r,t);if(void 0!==o)a=sS(a,ha.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later,r,i,o);else{const o=EO(e,t);if(void 0!==o){const e=Cc(o);a=sS(a,n?ha.Property_0_may_not_exist_on_type_1_Did_you_mean_2:ha.Property_0_does_not_exist_on_type_1_Did_you_mean_2,r,i,e),s=o.valueDeclaration&&Wp(o.valueDeclaration,ha._0_is_declared_here,e)}else{const e=function(e){return E.lib&&!E.lib.includes("lib.dom.d.ts")&&(t=e,n=e=>e.symbol&&/^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(Sc(e.symbol.escapedName)),3145728&t.flags?k(t.types,n):n(t))&&sT(e);var t,n}(t)?ha.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:ha.Property_0_does_not_exist_on_type_1;a=sS(bm(a,t),e,r,i)}}}}const c=Hp(wd(e),e,a);s&&fT(c,s),qo(!n||a.code!==ha.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,c)}function NO(e,t){const n=t.symbol&&xm(j_(t.symbol),e);return void 0!==n&&!!n.valueDeclaration&&jv(n.valueDeclaration)}function DO(e,t){return OO(e,Qp(t),106500)}function EO(e,t){let n=Qp(t);if("string"!=typeof e){const r=e.parent;bE(r)&&(n=P(n,e=>MO(r,t,e))),e=kc(e)}return OO(e,n,111551)}function FO(e,t){const n=it(e)?e:kc(e),r=Qp(t);return("for"===n?T(r,e=>"htmlFor"===Cc(e)):"class"===n?T(r,e=>"className"===Cc(e)):void 0)??OO(n,r,111551)}function PO(e,t){const n=EO(e,t);return n&&Cc(n)}function AO(e,t,n){gn.assert(void 0!==t,"outername should always be defined");return qe(e,t,n,void 0,!1,!1)}function IO(e,t){return t.exports&&OO(kc(e),ps(t),2623475)}function OO(e,t,n){return Jt(e,t,function(e){const t=Cc(e);if(en(t,'"'))return;if(e.flags&n)return t;if(2097152&e.flags){const r=function(e){if(ca(e).aliasTarget!==xt)return $a(e)}(e);if(r&&r.flags&n)return t}return})}function LO(e,t,n){const r=e&&106500&e.flags&&e.valueDeclaration;if(!r)return;const i=Ov(r,2),o=e.valueDeclaration&&Fc(e.valueDeclaration)&&mD(e.valueDeclaration.name);if((i||o)&&(!t||!mx(t)||65536&e.flags)){if(n){const n=yc(t,d_);if(n&&n.symbol===e)return}(1&ux(e)?ca(e).target:e).isReferenced=-1}}function jO(e,t){return 110===e.kind||!!t&&fb(e)&&t===zN(mb(e))}function MO(e,t,n){return BO(e,212===e.kind&&108===e.expression.kind,!1,t,n)}function RO(e,t,n,r){if(el(r))return!0;const i=xm(r,n);return!!i&&BO(e,t,!1,r,i)}function BO(e,t,n,r,i){if(el(r))return!0;if(i.valueDeclaration&&t_(i.valueDeclaration)){const t=rm(i.valueDeclaration);return!Tl(e)&&!!yc(e,e=>e===t)}return QI(e,t,n,r,i)}function JO(e){const t=e.initializer;if(262===t.kind){const e=t.declarations[0];if(e&&!E_(e.name))return xs(e)}else if(80===t.kind)return zN(t)}function zO(e){return 1===Gm(e).length&&!!ig(e,Vt)}function qO(e,t){return 64&e.flags?function(e,t){const n=WM(e.expression),r=Aw(n,e.expression);return Pw(UO(e,oO(r,e.expression),t),e,r!==n)}(e,t):UO(e,ZI(e.expression),t)}function UO(e,t,n){const r=0!==rh(e)||uO(e)?Hw(t):t,i=e.argumentExpression,o=WM(i);if(nl(r)||r===_n)return r;if(cM(r)&&!Uu(i))return Jo(i,ha.A_const_enum_member_can_only_be_accessed_using_a_string_literal),Ft;const a=function(e){const t=ph(e);if(80===t.kind){const n=zN(t);if(3&n.flags){let t=e,r=e.parent;for(;r;){if(250===r.kind&&t===r.statement&&JO(r)===n&&zO(qM(r.expression)))return!0;t=r,r=r.parent}}}return!1}(i)?Vt:o,s=rh(e);let c;0===s?c=32:(c=4|(Lx(r)&&!XT(r)?2:0),2===s&&(c|=32));const l=Vx(r,a,c,e)||Ft;return _R(xO(e,la(e).resolvedSymbol,l,i,n),e)}function VO(e){return U_(e)||TE(e)||Nu(e)}function WO(e){return VO(e)&&g(e.typeArguments,az),216===e.kind?WM(e.template):Nu(e)?WM(e.attributes):LE(e)?WM(e.left):U_(e)&&g(e.arguments,e=>{WM(e)}),si}function $O(e){return WO(e),ci}function KO(e){return!!e&&(231===e.kind||238===e.kind&&e.isSpread)}function HO(e){return w(e,KO)}function GO(e){return!!(16384&e.flags)}function XO(e){return!!(49155&e.flags)}function QO(e,t,n,r=!1){if(eP(e))return!0;let i,o=!1,a=gj(n),s=hj(n);if(216===e.kind)if(i=t.length,229===e.template.kind){const t=Te(e.template.templateSpans);o=Od(t.literal)||!!t.literal.isUnterminated}else{const t=e.template;gn.assert(15===t.kind),o=!!t.isUnterminated}else if(171===e.kind)i=mL(e,n);else if(227===e.kind)i=1;else if(Nu(e)){if(o=e.attributes.end===e.end,o)return!0;i=0===s?t.length:1,a=0===t.length?a:1,s=Math.min(s,1)}else{if(!e.arguments)return gn.assert(215===e.kind),0===hj(n);{i=r?t.length+1:t.length,o=e.arguments.end===e.end;const a=HO(t);if(a>=0)return a>=hj(n)&&(yj(n)||aa)return!1;if(o||i>=s)return!0;for(let t=i;t=r&&t.length<=n}function ZO(e,t){let n;return!!(e.target&&(n=pj(e.target,t))&&Ix(n))}function eL(e){return nL(e,0,!1)}function tL(e){return nL(e,0,!1)||nL(e,1,!1)}function nL(e,t,n){if(524288&e.flags){const r=Lp(e);if(n||0===r.properties.length&&0===r.indexInfos.length){if(0===t&&1===r.callSignatures.length&&0===r.constructSignatures.length)return r.callSignatures[0];if(1===t&&1===r.constructSignatures.length&&0===r.callSignatures.length)return r.constructSignatures[0]}}}function rL(e,t,n,r){const i=tN(Ih(e),e,0,r),o=vj(t),a=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return Zw(a?gk(t,a):t,e,(e,t)=>{FN(i.inferences,e,t)}),n||eN(t,e,(e,t)=>{FN(i.inferences,e,t,128)}),Dh(e,BN(i),Mm(t.declaration))}function iL(e){if(!e)return rn;const t=WM(e);return Tb(e)?t:Cl(e.parent)?Nw(t):Tl(e.parent)?Fw(t):t}function oL(e,t,n,r,i){if(Nu(e))return function(e,t,n,r){const i=YA(t,e),o=SM(e.attributes,i,r,n);return FN(r.inferences,o,i),BN(r)}(e,t,r,i);if(171!==e.kind&&227!==e.kind){const n=k(t.typeParameters,e=>!!wf(e)),r=$A(e,n?8:0);if(r){const o=ah(t);if(dN(o)){const a=QA(e);if(!(!n&&$A(e,8)!==r)){const e=Ck(r,_N(nN(a,1))),t=eL(e),n=t&&t.typeParameters?Rh(Fh(t,t.typeParameters)):e;FN(i.inferences,n,o,128)}const s=tN(t.typeParameters,t,i.flags),c=Ck(r,a&&function(e){return e.outerReturnMapper??(e.outerReturnMapper=uk(e.returnMapper,nN(e).mapper))}(a));FN(s.inferences,c,o),i.returnMapper=X(s.inferences,jM)?_N(function(e){const t=P(e.inferences,jM);return t.length?rN(O(t,lN),e.signature,e.flags,e.compareTypes):void 0}(s)):void 0}}}const o=bj(t),a=o?Math.min(gj(t)-1,n.length):n.length;if(o&&262144&o.flags){const e=T(i.inferences,e=>e.typeParameter===o);e&&(e.impliedArity=w(n,KO,a)<0?n.length-a:void 0)}const s=eh(t);if(s&&dN(s)){const t=dL(e);FN(i.inferences,iL(t),s)}for(let e=0;e=n-1){const t=e[n-1];if(KO(t)){const e=238===t.kind?t.type:SM(t.expression,r,i,o);return QC(e)?aL(e):Hv(CB(33,e,Lt,231===t.kind?t.expression:t),a)}}const s=[],c=[],l=[];for(let _=t;_sS(void 0,ha.Type_0_does_not_satisfy_the_constraint_1):void 0,l=r||ha.Type_0_does_not_satisfy_the_constraint_1;s||(s=ZS(o,a));const _=a[e];if(!Vk(_,Pd(Ck(i,s),_),n?t[e]:void 0,l,c))return}}return a}function lL(e){if(xI(e.tagName))return 2;const t=Pf(WM(e.tagName));return m(Cm(t,1))?0:m(Cm(t,0))?1:2}function _L(e){return LA(e,Mm(e)?-2147483615:33)}function uL(e,t,n,r,i,o,a){const s={errors:void 0,skipLogging:!0};if(Du(e))return function(e,t,n,r,i,o,a){const s=YA(t,e),c=eP(e)?kI(e):SM(e.attributes,s,void 0,r),l=4&r?Rw(c):c;return function(){var t;if(DI(e))return!0;const n=!QF(e)&&!XF(e)||xI(e.tagName)||aP(e.tagName)?void 0:WM(e.tagName);if(!n)return!0;const r=Cm(n,0);if(!m(r))return!0;const o=pq(e);if(!o)return!0;const s=ts(o,111551,!0,!1,e);if(!s)return!0;const c=Cm(j_(s),0);if(!m(c))return!0;let l=!1,_=0;for(const e of c){const t=Cm(dj(e,0),0);if(m(t))for(const e of t){if(l=!0,yj(e))return!0;const t=gj(e);t>_&&(_=t)}}if(!l)return!0;let u=1/0;for(const e of r){const t=hj(e);t{n.push(e.expression)}),n}if(171===e.kind)return function(e){const t=e.expression,n=Mj(e);if(n){const e=[];for(const r of n.parameters){const n=j_(r);e.push(pL(t,n))}return e}return gn.fail()}(e);if(227===e.kind)return[e.left];if(Nu(e))return e.attributes.properties.length>0||QF(e)&&e.parent.children.length>0?[e.attributes]:p;const t=e.arguments||p,n=HO(t);if(n>=0){const e=t.slice(0,n);for(let r=n;r{var o;const a=i.target.elementFlags[r],s=pL(n,4&a?Hv(t):t,!!(12&a),null==(o=i.target.labeledElementDeclarations)?void 0:o[r]);e.push(s)}):e.push(n)}return e}return t}function mL(e,t){return E.experimentalDecorators?function(e,t){switch(e.parent.kind){case 264:case 232:return 1;case 173:return zv(e.parent)?3:2;case 175:case 178:case 179:return t.parameters.length<=2?2:3;case 170:return 3;default:return gn.fail()}}(e,t):Math.min(Math.max(gj(t),1),2)}function gL(e){const t=wd(e),{start:n,length:r}=of(t,bE(e.expression)?e.expression.name:e.expression);return{start:n,length:r,sourceFile:t}}function hL(e,t,...n){if(SE(e)){const{sourceFile:r,start:i,length:o}=gL(e);return"message"in t?rS(r,i,o,t,...n):Yp(r,t)}return"message"in t?Wp(e,t,...n):Hp(wd(e),e,t)}function yL(e,t,n,r){var i;const o=HO(n);if(o>-1)return Wp(n[o],ha.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let a,s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;for(const e of t){const t=hj(e),r=gj(e);tl&&(l=t),n.length1&&(y=A(S,bo,w,N)),y||(y=A(S,So,w,N));const D=la(e);if(D.resolvedSignature!==li&&!n)return gn.assert(D.resolvedSignature),D.resolvedSignature;if(y)return y;if(y=function(e,t,n,r,i){return gn.assert(t.length>0),lz(e),r||1===t.length||t.some(e=>!!e.typeParameters)?function(e,t,n,r){const i=function(e,t){let n=-1,r=-1;for(let i=0;i=t)return i;a>r&&(r=a,n=i)}return n}(t,void 0===Ne?n.length:Ne),o=t[i],{typeParameters:a}=o;if(!a)return o;const s=VO(e)?e.typeArguments:void 0,c=s?Ah(o,function(e,t,n){const r=e.map(Dz);for(;r.length>t.length;)r.pop();for(;r.lengthe.thisParameter);let n;t.length&&(n=xL(t,t.map(oj)));const{min:r,max:i}=mT(e,bL),o=[];for(let t=0;tbJ(e)?tpj(e,t))))}const a=U(e,e=>bJ(e)?Te(e.parameters):void 0);let s=128;if(0!==a.length){const t=Hv(zb(U(e,vh),2));o.push(SL(a,t)),s|=1}e.some(xJ)&&(s|=2);return Id(e[0].declaration,void 0,n,o,Gb(e.map(ah)),void 0,r,s)}(t)}(e,S,C,!!n,r),D.resolvedSignature=y,u)if(!o&&_&&(o=ha.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method),d)if(1===d.length||d.length>3){const t=d[d.length-1];let n;d.length>3&&(n=sS(n,ha.The_last_overload_gave_the_following_error),n=sS(n,ha.No_overload_matches_this_call)),o&&(n=sS(n,o));const r=uL(e,C,t,So,0,!0,()=>n);if(r)for(const e of r)t.declaration&&d.length>3&&fT(e,Wp(t.declaration,ha.The_last_overload_is_declared_here)),F(t,e),ho.add(e);else gn.fail("No error for last overload signature")}else{const t=[];let n=0,r=Number.MAX_VALUE,i=0,a=0;for(const o of d){const s=uL(e,C,o,So,0,!0,()=>sS(void 0,ha.Overload_0_of_1_2_gave_the_following_error,a+1,S.length,fc(o)));s?(s.length<=r&&(r=s.length,i=a),n=Math.max(n,s.length),t.push(s)):gn.fail("No error for 3 or fewer overload signatures"),a++}const s=n>1?t[i]:M(t);gn.assert(s.length>0,"No errors reported for 3 or fewer overload signatures");let c=sS(O(s,Zp),ha.No_overload_matches_this_call);o&&(c=sS(c,o));const l=[...R(s,e=>e.relatedInformation)];let _;if(k(s,e=>e.start===s[0].start&&e.length===s[0].length&&e.file===s[0].file)){const{file:e,start:t,length:n}=s[0];_={file:e,start:t,length:n,code:c.code,category:c.category,messageText:c,relatedInformation:l}}else _=Hp(wd(e),U_(E=e)?bE(E.expression)?E.expression.name:E.expression:TE(E)?bE(E.tag)?E.tag.name:E.tag:Nu(E)?E.tagName:E,c,l);F(d[0],_),ho.add(_)}else if(f)ho.add(yL(e,[f],C,o));else if(h)cL(h,e.typeArguments,!0,o);else if(!l){const n=P(t,e=>YO(e,v));0===n.length?ho.add(function(e,t,n,r){const i=n.length;if(1===t.length){const o=t[0],a=Ag(o.typeParameters),s=m(o.typeParameters);if(r){let t=sS(void 0,ha.Expected_0_type_arguments_but_got_1,ai?a=Math.min(a,t):n1?T(s,e=>d_(e)&&Ld(e.body)):void 0;if(c){const e=Rg(c),n=!e.typeParameters;A([e],So,n)&&fT(t,Wp(c,ha.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}d=i,f=o,h=a}function A(t,n,r,i=!1){if(d=void 0,f=void 0,h=void 0,r){const r=t[0];if(X(v)||!QO(e,C,r,i))return;return uL(e,C,r,n,0,!1,void 0)?void(d=[r]):r}for(let r=0;r!!(4&e.flags)))return Jo(e,ha.Cannot_create_an_instance_of_an_abstract_class),$O(e);const o=r.symbol&&kx(r.symbol);return o&&Lv(o,64)?(Jo(e,ha.Cannot_create_an_instance_of_an_abstract_class),$O(e)):vL(e,i,t,n,0)}const o=Cm(r,0);if(o.length){const r=vL(e,o,t,n,0);return Z||(r.declaration&&!ML(r.declaration)&&ah(r)!==rn&&Jo(e,ha.Only_a_void_function_can_be_called_with_the_new_keyword),eh(r)===rn&&Jo(e,ha.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),r}return EL(e.expression,r,1),$O(e)}function wL(e,t){return nt(e)?X(e,e=>wL(e,t)):1048576===e.compositeKind?X(e.compositeSignatures,t):t(e)}function NL(e,t){const n=mu(t);if(!m(n))return!1;const r=n[0];if(2097152&r.flags){const t=Kd(r.types);let n=0;for(const i of r.types){if(!t[n]&&3&Tx(i)){if(i.symbol===e)return!0;if(NL(e,i))return!0}n++}return!1}return r.symbol===e||NL(e,r)}function DL(e,t,n){let r;const i=0===n,o=CR(t),a=o&&Cm(o,n).length>0;if(1048576&t.flags){const e=t.types;let o=!1;for(const a of e){if(0!==Cm(a,n).length){if(o=!0,r)break}else if(r||(r=sS(r,i?ha.Type_0_has_no_call_signatures:ha.Type_0_has_no_construct_signatures,mc(a)),r=sS(r,i?ha.Not_all_constituents_of_type_0_are_callable:ha.Not_all_constituents_of_type_0_are_constructable,mc(t))),o)break}o||(r=sS(void 0,i?ha.No_constituent_of_type_0_is_callable:ha.No_constituent_of_type_0_is_constructable,mc(t))),r||(r=sS(r,i?ha.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:ha.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,mc(t)))}else r=sS(r,i?ha.Type_0_has_no_call_signatures:ha.Type_0_has_no_construct_signatures,mc(t));let s=i?ha.This_expression_is_not_callable:ha.This_expression_is_not_constructable;if(SE(e.parent)&&0===e.parent.arguments.length){const{resolvedSymbol:t}=la(e);t&&32768&t.flags&&(s=ha.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without)}return{messageChain:sS(r,s),relatedMessage:a?ha.Did_you_forget_to_use_await:void 0}}function EL(e,t,n,r){const{messageChain:i,relatedMessage:o}=DL(e,t,n),a=Hp(wd(e),e,i);if(o&&fT(a,Wp(e,o)),SE(e.parent)){const{start:t,length:n}=gL(e.parent);a.start=t,a.length=n}ho.add(a),FL(t,n,r?fT(a,r):a)}function FL(e,t,n){if(!e.symbol)return;const r=ca(e.symbol).originatingImport;if(r&&!hf(r)){const i=Cm(j_(ca(e.symbol).target),t);if(!i||!i.length)return;fT(n,Wp(r,ha.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}function PL(e,t,n){const r=WM(e.expression),i=Pf(r);if(nl(i))return $O(e);const o=Cm(i,0),a=Cm(i,1).length;if(TL(r,i,o.length,a))return WO(e);if(s=e,(c=o).length&&k(c,e=>0===e.minArgumentCount&&!bJ(e)&&e.parameters.lengthMm(e.declaration)&&!!Wc(e.declaration))?(Jo(e,ha.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,mc(i)),$O(e)):vL(e,a,t,n,r)}(e,t,n);case 215:return CL(e,t,n);case 216:return function(e,t,n){const r=WM(e.tag),i=Pf(r);if(nl(i))return $O(e);const o=Cm(i,0),a=Cm(i,1).length;if(TL(r,i,o.length,a))return WO(e);if(!o.length){if(yE(e.parent)){const t=Wp(e.tag,ha.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);return ho.add(t),$O(e)}return EL(e.tag,i,0),$O(e)}return vL(e,o,t,n,0)}(e,t,n);case 171:return PL(e,t,n);case 290:case 287:case 286:return OL(e,t,n);case 227:return function(e,t,n){const r=WM(e.right);if(!el(r)){const i=_M(r);if(i){const r=Pf(i);if(nl(r))return $O(e);const o=Cm(r,0),a=Cm(r,1);if(TL(i,r,o.length,a.length))return WO(e);if(o.length)return vL(e,o,t,n,0)}else if(!Oz(r)&&!Rk(r,Gn))return Jo(e.right,ha.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method),$O(e)}return si}(e,t,n)}gn.assertNever(e,"Branch in 'resolveSignature' should be unreachable.")}function jL(e,t,n){const r=la(e),i=r.resolvedSignature;if(i&&i!==li&&!t)return i;const o=$i;i||($i=Ui.length),r.resolvedSignature=li;const a=LL(e,t,n||0);return $i=o,a!==li&&(r.resolvedSignature=ki===Ti?a:i),a}function ML(e){var t;if(!e||!Mm(e))return!1;const n=vF(e)||NE(e)?e:(hF(e)||uP(e))&&e.initializer&&NE(e.initializer)?e.initializer:void 0;if(n){if(Wc(e))return!0;if(uP(_h(n.parent)))return!1;const r=xs(n);return!!(null==(t=null==r?void 0:r.members)?void 0:t.size)}return!1}function RL(e,t){var n,r;if(t){const i=ca(t);if(!i.inferredClassSymbol||!i.inferredClassSymbol.has(fJ(e))){const o=rd(e)?e:ta(e);return o.exports=o.exports||nd(),o.members=o.members||nd(),o.flags|=32&t.flags,(null==(n=t.exports)?void 0:n.size)&&oa(o.exports,t.exports),(null==(r=t.members)?void 0:r.size)&&oa(o.members,t.members),(i.inferredClassSymbol||(i.inferredClassSymbol=new Map)).set(fJ(o),o),o}return i.inferredClassSymbol.get(fJ(e))}}function BL(e,t){if(!e.parent)return;let n,r;if(hF(e.parent)&&e.parent.initializer===e){if(!(Mm(e)||tU(e.parent)&&d_(e)))return;n=e.parent.name,r=e.parent}else if(LE(e.parent)){const i=e.parent,o=e.parent.operatorToken.kind;if(64!==o||!t&&i.right!==e){if(!(57!==o&&61!==o||(hF(i.parent)&&i.parent.initializer===i?(n=i.parent.name,r=i.parent):LE(i.parent)&&64===i.parent.operatorToken.kind&&(t||i.parent.right===i)&&(n=i.parent.left,r=n),n&&fg(n)&&rg(n,i.left))))return}else n=i.left,r=n}else t&&vF(e)&&(n=e.name,r=e);return r&&n&&(t||eg(e,vb(n)))?Ts(r):void 0}function JL(e,t){var n,r,i,o;if(!(128&e.flags)&&(e.declaration&&536870912&e.declaration.flags)){const a=zL(t),s=yb(ym(t));n=a,r=e.declaration,i=s,o=fc(e),Wo(r,i?Wp(n,ha.The_signature_0_of_1_is_deprecated,o,i):Wp(n,ha._0_is_deprecated,o))}}function zL(e){switch((e=ph(e)).kind){case 214:case 171:case 215:return zL(e.expression);case 216:return zL(e.tag);case 287:case 286:return zL(e.tagName);case 213:return e.argumentExpression;case 212:return e.name;case 184:const t=e;return ED(t.typeName)?t.typeName.right:t;default:return e}}function qL(e){if(!SE(e))return!1;let t=e.expression;if(bE(t)&&"for"===t.name.escapedText&&(t=t.expression),!fD(t)||"Symbol"!==t.escapedText)return!1;const n=sv(!1);return!!n&&n===ze(t,"Symbol",111551,void 0,!1)}function UL(e){if(function(e){if(E.verbatimModuleSyntax&&1===L)return Wq(e,zo(e));if(237===e.expression.kind){if(99!==L&&200!==L)return Wq(e,ha.Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve)}else if(5===L)return Wq(e,ha.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext);if(e.typeArguments)return Wq(e,ha.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);const t=e.arguments;if(!(100<=L&&L<=199)&&99!==L&&200!==L&&(xq(t),t.length>1)){return Wq(t[1],ha.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve)}if(0===t.length||t.length>2)return Wq(e,ha.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);const n=T(t,BE);if(n)return Wq(n,ha.Argument_of_dynamic_import_cannot_be_spread_element)}(e),0===e.arguments.length)return Jj(e,wt);const t=e.arguments[0],n=kM(t),r=e.arguments.length>1?kM(e.arguments[1]):void 0;for(let t=2;t!!e.typeParameters&&YO(e,n)),e=>{const t=cL(e,n,!0);return t?Dh(e,t,Mm(e.declaration)):e})}}function tj(e,t,n){const r=WM(e,n),i=VS(t);if(nl(i))return i;return Wk(r,i,yc(t.parent,e=>239===e.kind||351===e.kind),e,ha.Type_0_does_not_satisfy_the_expected_type_1),r}function nj(e){return function(e){const t=e.name.escapedText;switch(e.keywordToken){case 105:if("target"!==t)return Wq(e.name,ha._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Sc(e.name.escapedText),ja(e.keywordToken),"target");break;case 102:if("meta"!==t){const n=SE(e.parent)&&e.parent.expression===e;if("defer"!==t)return n?Wq(e.name,ha._0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer,Sc(e.name.escapedText)):Wq(e.name,ha._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,Sc(e.name.escapedText),ja(e.keywordToken),"meta");if(!n)Vq(e,e.end,0,ha._0_expected,"(")}}}(e),105===e.keywordToken?ij(e):102===e.keywordToken?"defer"===e.name.escapedText?(gn.assert(!SE(e.parent)||e.parent.expression!==e,"Trying to get the type of `import.defer` in `import.defer(...)`"),Ft):function(e){100<=L&&L<=199?99!==wd(e).impliedNodeFormat&&Jo(e,ha.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output):L<6&&4!==L&&Jo(e,ha.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext);const t=wd(e);return gn.assert(!!(8388608&t.flags),"Containing file is missing import meta node flag."),"meta"===e.name.escapedText?nv():Ft}(e):gn.assertNever(e.keywordToken)}function rj(e){switch(e.keywordToken){case 102:return iv();case 105:const t=ij(e);return nl(t)?Ft:function(e){const t=Xo(0,"NewTargetExpression"),n=Xo(4,"target",8);n.parent=t,n.links.type=e;const r=nd([n]);return t.members=r,Ks(t,r,p,p,p)}(t);default:gn.assertNever(e.keywordToken)}}function ij(e){const t=_m(e);if(t){if(177===t.kind){return j_(xs(t.parent))}return j_(xs(t))}return Jo(e,ha.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),Ft}function oj(e){const t=e.valueDeclaration;return Pl(j_(e),!1,!!t&&(Mu(t)||iC(t)))}function aj(e,t,n){switch(e.name.kind){case 80:{const r=e.name.escapedText;return e.dotDotDotToken?12&n?r:`${r}_${t}`:3&n?r:`${r}_n`}case 208:if(e.dotDotDotToken){const r=e.name.elements,i=at(ke(r),hE),o=r.length-((null==i?void 0:i.dotDotDotToken)?1:0);if(t=r-1)return t===r-1?o:Hv(qx(o,Vt));const a=[],s=[],c=[];for(let n=t;n!(1&e)),i=r<0?n.target.fixedLength:r;i>0&&(t=e.parameters.length-1+i)}}if(void 0===t){if(!n&&32&e.flags)return 0;t=e.minArgumentCount}if(r)return t;for(let n=t-1;n>=0;n--){if(131072&EE(dj(e,n),GO).flags)break;t=n}e.resolvedMinArgumentCount=t}return e.resolvedMinArgumentCount}function yj(e){if(bJ(e)){const t=j_(e.parameters[e.parameters.length-1]);return!fw(t)||!!(12&t.target.combinedFlags)}return!1}function vj(e){if(bJ(e)){const t=j_(e.parameters[e.parameters.length-1]);if(!fw(t))return el(t)?cr:t;if(12&t.target.combinedFlags)return wb(t,t.target.fixedLength)}}function bj(e){const t=vj(e);return!t||WC(t)||el(t)?void 0:t}function xj(e){return Sj(e,cn)}function Sj(e,t){return e.parameters.length>0?dj(e,0):t}function kj(e,t,n){const r=e.parameters.length-(bJ(e)?1:0);for(let i=0;i=0);const i=BD(e.parent)?j_(xs(e.parent.parent)):Pz(e.parent),o=BD(e.parent)?Lt:Az(e.parent),a=CS(r),s=Qo("target",i),c=Qo("propertyKey",o),l=Qo("parameterIndex",a);n.decoratorSignature=DR(void 0,void 0,[s,c,l],rn);break}case 175:case 178:case 179:case 173:{const e=t;if(!y_(e.parent))break;const r=Qo("target",Pz(e)),i=Qo("propertyKey",Az(e)),o=LD(e)?rn:Wv(Dz(e));if(!LD(t)||zv(t)){const t=Qo("descriptor",Wv(Dz(e)));n.decoratorSignature=DR(void 0,void 0,[r,i,t],zb([o,rn]))}else n.decoratorSignature=DR(void 0,void 0,[r,i],zb([o,rn]));break}}return n.decoratorSignature===si?void 0:n.decoratorSignature}(e):jj(e)}function Rj(e){const t=lv(!0);return t!==On?my(t,[e=wR(SR(e))||Ot]):Ot}function Bj(e){const t=_v(!0);return t!==On?my(t,[e=wR(SR(e))||Ot]):Ot}function Jj(e,t){const n=Rj(t);return n===Ot?(Jo(e,hf(e)?ha.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:ha.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),Ft):(pv(!0)||Jo(e,hf(e)?ha.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:ha.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),n)}function zj(e,t){if(!e.body)return Ft;const n=zh(e),r=!!(2&n),i=!!(1&n);let o,a,s,c=rn;if(242!==e.body.kind)o=kM(e.body,t&&-9&t),r&&(o=SR(vR(o,!1,e,ha.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)));else if(i){const n=Kj(e,t);n?n.length>0&&(o=zb(n,2)):c=cn;const{yieldTypes:r,nextTypes:i}=function(e,t){const n=[],r=[],i=!!(2&zh(e));return jf(e.body,e=>{const o=e.expression?WM(e.expression,t):jt;let a;if(pe(n,Uj(e,o,wt,i)),e.asteriskToken){const t=OB(o,i?19:17,e.expression);a=t&&t.nextType}else a=$A(e,void 0);a&&pe(r,a)}),{yieldTypes:n,nextTypes:r}}(e,t);a=X(r)?zb(r,2):void 0,s=X(i)?Gb(i):void 0}else{const r=Kj(e,t);if(!r)return 2&n?Jj(e,cn):cn;if(0===r.length){const t=yA(e,void 0),r=t&&32768&(tJ(t,n)||rn).flags?Lt:rn;return 2&n?Jj(e,r):r}o=zb(r,2)}if(o||a||s){if(a&&Yw(e,a,3),o&&Yw(e,o,1),s&&Yw(e,s,2),o&&ow(o)||a&&ow(a)||s&&ow(s)){const t=iI(e),n=t?t===Rg(e)?i?void 0:o:VA(ah(t),e,void 0):void 0;i?(a=pw(a,n,0,r),o=pw(o,n,1,r),s=pw(s,n,2,r)):o=function(e,t,n){e&&ow(e)&&(e=dw(e,t?n?yR(t):t:void 0));return e}(o,n,r)}a&&(a=Hw(a)),o&&(o=Hw(o)),s&&(s=Hw(s))}return i?qj(a||cn,o||c,s||hA(2,e)||Ot,r):r?Rj(o||c):o||c}function qj(e,t,n,r){const i=r?hi:yi,o=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||Ot,t=i.resolveIterationType(t,void 0)||Ot,o===On){const r=i.getGlobalIterableIteratorType(!1);return r!==On?Pv(r,[e,t,n]):(i.getGlobalIterableIteratorType(!0),Nn)}return Pv(o,[e,t,n])}function Uj(e,t,n,r){if(t===_n)return _n;const i=e.expression||e,o=e.asteriskToken?CB(r?19:17,t,n,i):t;return r?CR(o,i,e.asteriskToken?ha.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:ha.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function Vj(e,t,n){let r=0;for(let i=0;i=t?n[i]:void 0;r|=void 0!==o?aJ.get(o)||32768:0}return r}function Wj(e){const t=la(e);if(void 0===t.isExhaustive){t.isExhaustive=0;const n=function(e){if(222===e.expression.kind){const t=sE(e);if(!t)return!1;const n=Sf(kM(e.expression.expression)),r=Vj(0,0,t);return 3&n.flags?!(556800&~r):!fE(n,e=>cD(e,r)===r)}const t=Sf(kM(e.expression));if(!sw(t))return!1;const n=oE(e);if(!n.length||X(n,iw))return!1;return r=ME(t,SS),i=n,1048576&r.flags?!g(r.types,e=>!D(i,e)):D(i,r);var r,i}(e);0===t.isExhaustive&&(t.isExhaustive=n)}else 0===t.isExhaustive&&(t.isExhaustive=!1);return t.isExhaustive}function $j(e){return e.endFlowNode&&fF(e.endFlowNode)}function Kj(e,t){const n=zh(e),r=[];let i=$j(e),o=!1;if(Lf(e.body,a=>{let s=a.expression;if(s){if(s=ph(s,!0),2&n&&224===s.kind&&(s=ph(s.expression,!0)),214===s.kind&&80===s.expression.kind&&kM(s.expression).symbol===bs(e.symbol)&&(!$T(e.symbol.valueDeclaration)||PF(s.expression)))return void(o=!0);let i=kM(s,t&&-9&t);2&n&&(i=SR(vR(i,!1,e,ha.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member))),131072&i.flags&&(o=!0),pe(r,i)}else i=!0}),0!==r.length||i||!o&&!function(e){switch(e.kind){case 219:case 220:return!0;case 175:return 211===e.parent.kind;default:return!1}}(e))return!(V&&r.length&&i)||ML(e)&&r.some(t=>t.symbol===e.symbol)||pe(r,Lt),r}function Hj(e,t){return void a(function(){const n=zh(e),r=t&&tJ(t,n);if(r&&(oM(r,16384)||32769&r.flags))return;if(174===e.kind||Od(e.body)||242!==e.body.kind||!$j(e))return;const i=1024&e.flags,o=kv(e)||e;if(r&&131072&r.flags)Jo(o,ha.A_function_returning_never_cannot_have_a_reachable_end_point);else if(r&&!i)Jo(o,ha.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);else if(r&&V&&!Jk(Lt,r))Jo(o,ha.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(E.noImplicitReturns){if(!r){if(!i)return;const t=ah(Rg(e));if(nJ(e,t))return}Jo(o,ha.Not_all_code_paths_return_a_value)}})}function Gj(e,t){if(gn.assert(175!==e.kind||Kf(e)),lz(e),NE(e)&&cB(e,e.name),t&&4&t&&Fk(e)){if(!kv(e)&&!UT(e)){const n=oI(e);if(n&&dN(ah(n))){const n=la(e);if(n.contextFreeType)return n.contextFreeType;const r=zj(e,t),i=Id(void 0,void 0,void 0,p,r,void 0,0,64),o=Ks(e.symbol,x,[i],p,p);return o.objectFlags|=262144,n.contextFreeType=o}}return Ln}return Tq(e)||219!==e.kind||Eq(e),function(e,t){const n=la(e);if(!(64&n.flags)){const r=oI(e);if(!(64&n.flags)){n.flags|=64;const i=ve(Cm(j_(xs(e)),0));if(!i)return;if(Fk(e))if(r){const n=QA(e);let o;if(t&&2&t){kj(i,r,n);const e=vj(r);e&&262144&e.flags&&(o=gk(r,n.nonFixingMapper))}o||(o=n?gk(r,n.mapper):r),function(e,t){if(t.typeParameters){if(e.typeParameters)return;e.typeParameters=t.typeParameters}if(t.thisParameter){const n=e.thisParameter;(!n||n.valueDeclaration&&!n.valueDeclaration.type)&&(n||(e.thisParameter=Mw(t.thisParameter,void 0)),Tj(e.thisParameter,j_(t.thisParameter)))}const n=e.parameters.length-(bJ(e)?1:0);for(let r=0;re.parameters.length){const n=QA(e);t&&2&t&&kj(i,r,n)}if(r&&!ch(e)&&!i.resolvedReturnType){const n=zj(e,t);i.resolvedReturnType||(i.resolvedReturnType=n)}GM(e)}}}(e,t),j_(xs(e))}function Xj(e,t,n,r=!1){if(!Jk(t,yn)){const i=r&&hR(t);return Vo(e,!!i&&Jk(i,yn),n),!1}return!0}function Qj(e){if(!SE(e))return!1;if(!lg(e))return!1;const t=kM(e.arguments[2]);if(Yc(t,"value")){const e=xm(t,"writable"),n=e&&j_(e);if(!n||n===$t||n===Ht)return!0;if(e&&e.valueDeclaration&&uP(e.valueDeclaration)){const t=WM(e.valueDeclaration.initializer);if(t===$t||t===Ht)return!0}return!1}return!xm(t,"set")}function Yj(e){return!!(8&ux(e)||4&e.flags&&8&dx(e)||3&e.flags&&6&HI(e)||98304&e.flags&&!(65536&e.flags)||8&e.flags||X(e.declarations,Qj))}function Zj(e,t,n){var r,i;if(0===n)return!1;if(Yj(t)){if(4&t.flags&&Px(e)&&110===e.expression.kind){const n=IF(e);if(!n||177!==n.kind&&!ML(n))return!0;if(t.valueDeclaration){const e=LE(t.valueDeclaration),o=n.parent===t.valueDeclaration.parent,a=n===t.valueDeclaration.parent,s=e&&(null==(r=t.parent)?void 0:r.valueDeclaration)===n.parent,c=e&&(null==(i=t.parent)?void 0:i.valueDeclaration)===n;return!(o||a||s||c)}}return!0}if(Px(e)){const t=ph(e.expression);if(80===t.kind){const e=la(t).resolvedSymbol;if(2097152&e.flags){const t=Ca(e);return!!t&&275===t.kind}}}return!1}function eM(e,t,n){const r=LA(e,39);return 80===r.kind||Px(r)?!(64&r.flags)||(Jo(e,n),!1):(Jo(e,t),!1)}function tM(e){WM(e.expression);const t=ph(e.expression);if(!Px(t))return Jo(t,ha.The_operand_of_a_delete_operator_must_be_a_property_reference),Yt;bE(t)&&mD(t.name)&&Jo(t,ha.The_operand_of_a_delete_operator_cannot_be_a_private_identifier);const n=Ps(la(t).resolvedSymbol);return n&&(Yj(n)?Jo(t,ha.The_operand_of_a_delete_operator_cannot_be_a_read_only_property):function(e,t){const n=j_(t);!V||131075&n.flags||(ie?16777216&t.flags:lD(n,16777216))||Jo(e,ha.The_operand_of_a_delete_operator_must_be_optional)}(t,n)),Yt}function nM(e){let t=!1;const n=om(e);if(n&&RD(n)){Jo(e,AE(e)?ha.await_expression_cannot_be_used_inside_a_class_static_block:ha.await_using_statements_cannot_be_used_inside_a_class_static_block),t=!0}else if(!(65536&e.flags))if(lm(e)){const n=wd(e);if(!qq(n)){let r;if(!Tp(n,E)){r??(r=nf(n,e.pos));const i=AE(e)?ha.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:ha.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module,o=rS(n,r.start,r.length,i);ho.add(o),t=!0}switch(L){case 100:case 101:case 102:case 199:if(1===n.impliedNodeFormat){r??(r=nf(n,e.pos)),ho.add(rS(n,r.start,r.length,ha.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)),t=!0;break}case 7:case 99:case 200:case 4:if(A>=4)break;default:r??(r=nf(n,e.pos));const i=AE(e)?ha.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:ha.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;ho.add(rS(n,r.start,r.length,i)),t=!0}}}else{const r=wd(e);if(!qq(r)){const i=nf(r,e.pos),o=AE(e)?ha.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:ha.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules,a=rS(r,i.start,i.length,o);if(n&&177!==n.kind&&!(2&zh(n))){fT(a,Wp(n,ha.Did_you_mean_to_mark_this_function_as_async))}ho.add(a),t=!0}}return AE(e)&&gA(e)&&(Jo(e,ha.await_expressions_cannot_be_used_in_a_parameter_initializer),t=!0),t}function rM(e){return oM(e,2112)?aM(e,3)||oM(e,296)?yn:Wt:Vt}function iM(e,t){if(oM(e,t))return!0;const n=Sf(e);return!!n&&oM(n,t)}function oM(e,t){if(e.flags&t)return!0;if(3145728&e.flags){const n=e.types;for(const e of n)if(oM(e,t))return!0}return!1}function aM(e,t,n){return!!(e.flags&t)||!(n&&114691&e.flags)&&(!!(296&t)&&Jk(e,Vt)||!!(2112&t)&&Jk(e,Wt)||!!(402653316&t)&&Jk(e,Ut)||!!(528&t)&&Jk(e,Yt)||!!(16384&t)&&Jk(e,rn)||!!(131072&t)&&Jk(e,cn)||!!(65536&t)&&Jk(e,zt)||!!(32768&t)&&Jk(e,Lt)||!!(4096&t)&&Jk(e,nn)||!!(67108864&t)&&Jk(e,fn))}function sM(e,t,n){return 1048576&e.flags?k(e.types,e=>sM(e,t,n)):aM(e,t,n)}function cM(e){return!!(16&Tx(e))&&!!e.symbol&&lM(e.symbol)}function lM(e){return!!(128&e.flags)}function _M(e){const t=BB("hasInstance");if(sM(e,67108864)){const n=xm(e,t);if(n){const e=j_(n);if(e&&0!==Cm(e,0).length)return e}}}function uM(e,t,n,r){if(n===_n||r===_n)return _n;if(mD(e)){if((Ae===An||!!(2097152&e.flags)&&cT(Sf(e)))&&Jo(t,ha.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,mc(r)),Yt}function dM(e,t,n,r,i=!1){const o=e.properties,a=o[n];if(304===a.kind||305===a.kind){const e=a.name,n=rx(e);if(mC(n)){const e=xm(t,gC(n));e&&(LO(e,a,i),XI(a,!1,!0,t,e))}const r=ul(a,qx(t,n,32|(sI(a)?16:0),e));return fM(305===a.kind?a:a.initializer,r)}if(306===a.kind){if(!(nwb(e,n)):Hv(r),i)}Jo(o.operatorToken,ha.A_rest_element_cannot_have_an_initializer)}}}function fM(e,t,n,r){let i;if(305===e.kind){const r=e;r.objectAssignmentInitializer&&(V&&!lD(WM(r.objectAssignmentInitializer),16777216)&&(t=uD(t,524288)),function(e,t,n,r,i){const o=t.kind;if(64===o&&(211===e.kind||210===e.kind))return fM(e,WM(n,r),r,110===n.kind);let a;a=nb(o)?SB(e,r):WM(e,r);const s=WM(n,r);yM(e,t,n,a,s,r,i)}(r.name,r.equalsToken,r.objectAssignmentInitializer,n)),i=e.name}else i=e;return 227===i.kind&&64===i.operatorToken.kind&&(se(i,n),i=i.left,V&&(t=uD(t,524288))),211===i.kind?function(e,t,n){const r=e.properties;if(V&&0===r.length)return oO(t,e);for(let i=0;i=32&&Uo(fP(_h(n.parent.parent)),s||t,ha.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2,rp(e),ja(c),r.value%32)}return l}case 40:case 65:if(r===_n||i===_n)return _n;let h;if(aM(r,402653316)||aM(i,402653316)||(r=oO(r,e),i=oO(i,n)),aM(r,296,!0)&&aM(i,296,!0)?h=Vt:aM(r,2112,!0)&&aM(i,2112,!0)?h=Wt:aM(r,402653316,!0)||aM(i,402653316,!0)?h=Ut:(el(r)||el(i))&&(h=nl(r)||nl(i)?Ft:wt),h&&!d(c))return h;if(!h){const e=402655727;return m((t,n)=>aM(t,e)&&aM(n,e)),wt}return 65===c&&p(h),h;case 30:case 32:case 33:case 34:return d(c)&&(r=lw(oO(r,e)),i=lw(oO(i,n)),f((e,t)=>{if(el(e)||el(t))return!0;const n=Jk(e,yn),r=Jk(t,yn);return n&&r||!n&&!r&&Uk(e,t)})),Yt;case 35:case 36:case 37:case 38:if(!(o&&64&o)){if((zl(e)||zl(n))&&(!Mm(e)||37===c||38===c)){const e=35===c||37===c;Jo(s,ha.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,e?"false":"true")}!function(e,t,n,r){const i=g(ph(n)),o=g(ph(r));if(i||o){const a=Jo(e,ha.This_condition_will_always_return_0,ja(37===t||35===t?97:112));if(i&&o)return;const s=38===t||36===t?ja(54):"",c=i?r:n,l=ph(c);fT(a,Wp(c,ha.Did_you_mean_0,`${s}Number.isNaN(${fb(l)?Vp(l):"..."})`))}}(s,c,e,n),f((e,t)=>gM(e,t)||gM(t,e))}return Yt;case 104:return function(e,t,n,r,i){if(n===_n||r===_n)return _n;!el(n)&&sM(n,402784252)&&Jo(e,ha.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),gn.assert(kb(e.parent));const o=jL(e.parent,void 0,i);return o===li?_n:(Vk(ah(o),Yt,t,ha.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression),Yt)}(e,n,r,i,o);case 103:return uM(e,n,r,i);case 56:case 77:{const e=lD(r,4194304)?zb([(_=V?r:cw(i),ME(_,Sw)),i]):r;return 77===c&&p(i),e}case 57:case 76:{const e=lD(r,8388608)?zb([Nw(xw(r)),i],2):r;return 76===c&&p(i),e}case 61:case 78:{const e=lD(r,262144)?zb([Nw(r),i],2):r;return 78===c&&p(i),e}case 64:const y=LE(e.parent)?cg(e.parent):0;return function(e,t){if(2===e)for(const e of qp(t)){const t=j_(e);if(t.symbol&&32&t.symbol.flags){const t=e.escapedName,n=ze(e.valueDeclaration,t,788968,void 0,!1);(null==n?void 0:n.declarations)&&n.declarations.some(YP)&&(ra(n,ha.Duplicate_identifier_0,Sc(t),e),ra(e,ha.Duplicate_identifier_0,Sc(t),n))}}}(y,i),function(t){var r;switch(t){case 2:return!0;case 1:case 5:case 6:case 3:case 4:const t=Ts(e),i=Zm(n);return!!i&&vE(i)&&!!(null==(r=null==t?void 0:t.exports)?void 0:r.size);default:return!1}}(y)?(524288&i.flags&&(2===y||6===y||sT(i)||sD(i)||1&Tx(i))||p(i),r):(p(i),i);case 28:if(!E.allowUnreachableCode&&mM(e)&&!(218===(l=e.parent).parent.kind&&GN(l.left)&&"0"===l.left.text&&(SE(l.parent.parent)&&l.parent.parent.expression===l.parent||216===l.parent.parent.kind)&&(Px(l.right)||fD(l.right)&&"eval"===l.right.escapedText))){const t=wd(e),n=is(t.text,e.pos);t.parseDiagnostics.some(e=>e.code===ha.JSX_expressions_must_have_one_parent_element.code&&Rs(e,n))||Jo(e,ha.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return i;default:return gn.fail()}var l,_;function u(e,t){return aM(e,2112)&&aM(t,2112)}function d(t){const o=iM(r,12288)?e:iM(i,12288)?n:void 0;return!o||(Jo(o,ha.The_0_operator_cannot_be_applied_to_type_symbol,ja(t)),!1)}function p(i){cb(c)&&a(function(){let o=r;hz(t.kind)&&212===e.kind&&(o=lO(e,void 0,!0));if(eM(e,ha.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,ha.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)){let t;if(ie&&bE(e)&&oM(i,32768)){const n=Yc(qM(e.expression),e.name.escapedText);BT(i,n)&&(t=ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target)}Wk(i,o,e,n,t)}})}function f(e){return!e(r,i)&&(m(e),!0)}function m(e){let n=!1;const o=s||t;if(e){const t=wR(r),o=wR(i);n=!(t===r&&o===i)&&!(!t||!o)&&e(t,o)}let a=r,c=i;!n&&e&&([a,c]=function(e,t,n){let r=e,i=t;const o=cw(e),a=cw(t);n(o,a)||(r=o,i=a);return[r,i]}(r,i,e));const[l,_]=gc(a,c);(function(e,n,r,i){switch(t.kind){case 37:case 35:case 38:case 36:return Vo(e,n,ha.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,r,i);default:return}})(o,n,l,_)||Vo(o,n,ha.Operator_0_cannot_be_applied_to_types_1_and_2,ja(t.kind),l,_)}function g(e){if(fD(e)&&"NaN"===e.escapedText){const t=Wr||(Wr=Xy("NaN",!1));return!!t&&t===zN(e)}return!1}}function vM(e){const t=e.parent;return wE(t)&&vM(t)||xE(t)&&t.argumentExpression===e}function bM(e){const t=[e.head.text],n=[];for(const r of e.templateSpans){const e=WM(r.expression);iM(e,12288)&&Jo(r.expression,ha.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String),t.push(r.literal.text),n.push(Jk(e,vn)?e:Ut)}const r=216!==e.parent.kind&&ge(e).value;return r?xS(TS(r)):FM(e)||vM(e)||fE($A(e,void 0)||Ot,xM)?_x(t,n):Ut}function xM(e){return!!(134217856&e.flags||58982400&e.flags&&oM(xf(e)||Ot,402653316))}function SM(e,t,n,r){const i=function(e){return rP(e)&&!XF(e.parent)?e.parent.parent:e}(e);HA(i,t,!1),function(e,t){Oi[ji]=e,Li[ji]=t,ji++}(i,n);const o=WM(e,1|r|(n?2:0));n&&n.intraExpressionInferenceSites&&(n.intraExpressionInferenceSites=void 0);const a=oM(o,2944)&&EM(o,VA(t,e,void 0))?SS(o):o;return ji--,Oi[ji]=void 0,Li[ji]=void 0,GA(),a}function kM(e,t){if(t)return WM(e,t);const n=la(e);if(!n.resolvedType){const r=ki,i=ri;ki=Ti,ri=void 0,n.resolvedType=WM(e,t),ri=i,ki=r}return n.resolvedType}function TM(e){return 217===(e=ph(e,!0)).kind||235===e.kind||AA(e)}function CM(e,t,n){const r=Qm(e);if(Mm(e)){const n=cC(e);if(n)return tj(r,n,t)}const i=UM(r)||(n?SM(r,n,void 0,t||0):kM(r,t));if(AD(hE(e)?lc(e):e)){if(207===e.name.kind&&IN(i))return function(e,t){let n;for(const r of t.elements)if(r.initializer){const t=wM(r);t&&!xm(e,t)&&(n=le(n,r))}if(!n)return e;const r=nd();for(const t of qp(e))r.set(t.escapedName,t);for(const e of n){const t=Xo(16777220,wM(e));t.links.type=Xl(e,!1,!1),r.set(t.escapedName,t)}const i=Ks(e.symbol,r,p,p,Gm(e));return i.objectFlags=e.objectFlags,i}(i,e.name);if(208===e.name.kind&&fw(i))return function(e,t){if(12&e.target.combinedFlags||xy(e)>=t.elements.length)return e;const n=t.elements,r=Pb(e).slice(),i=e.target.elementFlags.slice();for(let t=xy(e);tEM(e,t))}if(58982400&t.flags){const n=xf(t)||Ot;return oM(n,4)&&oM(e,128)||oM(n,8)&&oM(e,256)||oM(n,64)&&oM(e,2048)||oM(n,4096)&&oM(e,8192)||EM(e,n)}return!!(406847616&t.flags&&oM(e,128)||256&t.flags&&oM(e,256)||2048&t.flags&&oM(e,2048)||512&t.flags&&oM(e,512)||8192&t.flags&&oM(e,8192))}return!1}function FM(e){const t=e.parent;return Y_(t)&&El(t.type)||AA(t)&&El(IA(t))||GL(e)&&df($A(e,0))||(wE(t)||yE(t)||BE(t))&&FM(t)||(uP(t)||dP(t)||XE(t))&&FM(t.parent)}function PM(e,t,n){const r=WM(e,t,n);return FM(e)||zf(e)?SS(r):TM(e)?r:dw(r,VA($A(e,void 0),e,void 0))}function AM(e,t){return 168===e.name.kind&&uI(e.name),PM(e.initializer,t)}function IM(e,t){Lq(e),168===e.name.kind&&uI(e.name);return OM(e,Gj(e,t),t)}function OM(e,t,n){if(n&&10&n){const r=nL(t,0,!0),i=nL(t,1,!0),o=r||i;if(o&&o.typeParameters){const t=UA(e,2);if(t){const i=nL(Nw(t),r?0:1,!1);if(i&&!i.typeParameters){if(8&n)return LM(e,n),Ln;const t=QA(e),r=t.signature&&ah(t.signature),a=r&&tL(r);if(a&&!a.typeParameters&&!k(t.inferences,jM)){const e=function(e,t){const n=[];let r,i;for(const o of t){const t=o.symbol.escapedName;if(RM(e.inferredTypeParameters,t)||RM(n,t)){const a=qs(Xo(262144,JM(Y(e.inferredTypeParameters,n),t)));a.target=o,r=le(r,o),i=le(i,a),n.push(a)}else n.push(o)}if(i){const e=ZS(r,i);for(const t of i)t.mapper=e}return n}(t,o.typeParameters),n=Fh(o,e),r=O(t.inferences,e=>cN(e.typeParameter));if(Zw(n,i,(e,t)=>{FN(r,e,t,0,!0)}),X(r,jM)&&(eN(n,i,(e,t)=>{FN(r,e,t)}),!function(e,t){for(let n=0;ne.symbol.escapedName===t)}function JM(e,t){let n=t.length;for(;n>1&&t.charCodeAt(n-1)>=48&&t.charCodeAt(n-1)<=57;)n--;const r=t.slice(0,n);for(let t=1;;t++){const n=r+t;if(!RM(e,n))return n}}function zM(e){const t=eL(e);if(t&&!t.typeParameters)return ah(t)}function qM(e){const t=UM(e);if(t)return t;if(268435456&e.flags&&ri){const t=ri[pJ(e)];if(t)return t}const n=Ni,r=WM(e,64);if(Ni!==n){(ri||(ri=[]))[pJ(e)]=r,LT(e,268435456|e.flags)}return r}function UM(e){let t=ph(e,!0);if(AA(t)){const e=IA(t);if(!El(e))return VS(e)}if(t=ph(e),AE(t)){const e=UM(t.expression);return e?CR(e):void 0}return!SE(t)||108===t.expression.kind||qm(t,!0)||qL(t)||hf(t)?Y_(t)&&!El(t.type)?VS(t.type):Jl(e)||p_(e)?WM(e):void 0:kl(t)?function(e){const t=WM(e.expression),n=Aw(t,e.expression),r=zM(t);return r&&Pw(r,e,n!==t)}(t):zM(ZI(t.expression))}function VM(e){const t=la(e);if(t.contextFreeType)return t.contextFreeType;HA(e,wt,!1);const n=t.contextFreeType=WM(e,4);return GA(),n}function WM(n,i,o){var s,c;null==(s=Yn)||s.push(Yn.Phase.Check,"checkExpression",{kind:n.kind,pos:n.pos,end:n.end,path:n.tracingPath});const l=r;r=n,f=0;const _=function(e,n,r){const i=e.kind;if(t)switch(i){case 232:case 219:case 220:t.throwIfCancellationRequested()}switch(i){case 80:return WP(e,n);case 81:return mO(e);case 110:return oA(e);case 108:return sA(e);case 106:return qt;case 15:case 11:return xN(e)?Et:xS(TS(e.text));case 9:return Gq(e),xS(CS(+e.text));case 10:return function(e){const t=uE(e.parent)||IE(e.parent)&&uE(e.parent.parent);if(!t&&!(33554432&e.flags)&&A<7&&Wq(e,ha.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020))return!0}(e),xS(ES({negative:!1,base10Value:kT(e.text)}));case 112:return Gt;case 97:return $t;case 229:return bM(e);case 14:return aI(e);case 210:return cI(e,n,r);case 211:return hI(e,n);case 212:return lO(e,n);case 167:return _O(e,n);case 213:return qO(e,n);case 214:if(hf(e))return UL(e);case 215:return function(e,t){var n,r,i;Cq(e,e.typeArguments);const o=jL(e,void 0,t);if(o===li)return _n;if(JL(o,e),108===e.expression.kind)return rn;if(215===e.kind){const t=o.declaration;if(t&&177!==t.kind&&181!==t.kind&&186!==t.kind&&(!IP(t)||177!==(null==(r=null==(n=Yg(t))?void 0:n.parent)?void 0:r.kind))&&!Og(t)&&!ML(t))return Z&&Jo(e,ha.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),wt}if(Mm(e)&&KL(e))return Wg(e.arguments[0]);const a=ah(o);if(12288&a.flags&&qL(e))return OS(_h(e.parent));if(214===e.kind&&!e.questionDotToken&&245===e.parent.kind&&16384&a.flags&&th(o))if(gb(e.expression)){if(!dF(e)){const t=Jo(e.expression,ha.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation);uF(e.expression,t)}}else Jo(e.expression,ha.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);if(Mm(e)){const t=BL(e,!1);if(null==(i=null==t?void 0:t.exports)?void 0:i.size){const e=Ks(t,t.exports,p,p,p);return e.objectFlags|=4096,Gb([a,e])}}return a}(e,n);case 216:return HL(e);case 218:return function(e,t){if(Lu(e)){if(aC(e))return tj(e.expression,sC(e),t);if(AA(e))return XL(e,t)}return WM(e.expression,t)}(e,n);case 232:return function(e){return PJ(e),lz(e),function(e){if(e.name)return;const t=jA(e);if(!ty(t))return;let n;n=!B&&AnM(e));const t=WM(e.expression),n=vR(t,!0,e,ha.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return n!==t||nl(n)||3&t.flags||qo(!1,Wp(e,ha.await_has_no_effect_on_the_type_of_this_expression)),n}(e);case 225:return function(e){const t=WM(e.operand);if(t===_n)return _n;switch(e.operand.kind){case 9:switch(e.operator){case 41:return xS(CS(-e.operand.text));case 40:return xS(CS(+e.operand.text))}break;case 10:if(41===e.operator)return xS(ES({negative:!0,base10Value:kT(e.operand.text)}))}switch(e.operator){case 40:case 41:case 55:return oO(t,e.operand),iM(t,12288)&&Jo(e.operand,ha.The_0_operator_cannot_be_applied_to_type_symbol,ja(e.operator)),40===e.operator?(iM(t,2112)&&Jo(e.operand,ha.Operator_0_cannot_be_applied_to_type_1,ja(e.operator),mc(cw(t))),Vt):rM(t);case 54:bB(t,e.operand);const n=cD(t,12582912);return 4194304===n?$t:8388608===n?Gt:Yt;case 46:case 47:return Xj(e.operand,oO(t,e.operand),ha.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&eM(e.operand,ha.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,ha.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),rM(t)}return Ft}(e);case 226:return function(e){const t=WM(e.operand);return t===_n?_n:(Xj(e.operand,oO(t,e.operand),ha.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&eM(e.operand,ha.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,ha.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),rM(t))}(e);case 227:return se(e,n);case 228:return function(e,t){const n=SB(e.condition,t);return vB(e.condition,n,e.whenTrue),zb([WM(e.whenTrue,t),WM(e.whenFalse,t)],2)}(e,n);case 231:return function(e,t){return AXM(e,n,void 0)));const o=i&&GB(i,r),s=o&&o.yieldType||wt,c=o&&o.nextType||wt,l=e.expression?WM(e.expression):jt,_=Uj(e,l,c,r);if(i&&_&&Wk(_,s,e.expression||e,e.expression),e.asteriskToken)return DB(r?19:17,1,l,e.expression)||wt;if(i)return HB(2,i,r)||wt;let u=hA(2,t);return u||(u=wt,a(()=>{if(Z&&!JT(e)){const t=$A(e,void 0);t&&!el(t)||Jo(e,ha.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation)}})),u}(e);case 238:return function(e){return e.isSpread?qx(e.type,Vt):e.type}(e);case 295:return KI(e,n);case 285:case 286:return function(e){return lz(e),JI(e)||wt}(e);case 289:return function(e){VI(e.openingFragment);const t=wd(e);!tk(E)||!E.jsxFactory&&!t.pragmas.has("jsx")||E.jsxFragmentFactory||t.pragmas.has("jsxfrag")||Jo(e,E.jsxFactory?ha.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:ha.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments),TI(e);const n=JI(e);return nl(n)?wt:n}(e);case 293:return function(e,t){return kI(e.parent,t)}(e,n);case 287:gn.fail("Shouldn't ever directly check a JsxOpeningElement")}return Ft}(n,i,o),u=OM(n,_,i);return cM(u)&&function(t,n){var r;const i=212===t.parent.kind&&t.parent.expression===t||213===t.parent.kind&&t.parent.expression===t||(80===t.kind||167===t.kind)&&Sz(t)||187===t.parent.kind&&t.parent.exprName===t||282===t.parent.kind;i||Jo(t,ha.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);if(E.isolatedModules||E.verbatimModuleSyntax&&i&&!ze(t,mb(t),2097152,void 0,!1,!0)){gn.assert(!!(128&n.symbol.flags));const i=n.symbol.valueDeclaration,o=null==(r=e.getRedirectFromOutput(wd(i).resolvedPath))?void 0:r.resolvedRef;!(33554432&i.flags)||DT(t)||o&&MS(o.commandLine.options)||Jo(t,ha.Cannot_access_ambient_const_enums_when_0_is_enabled,Le)}}(n,u),r=l,null==(c=Yn)||c.pop(),u}function $M(e){vq(e),e.expression&&Uq(e.expression,ha.Type_expected),az(e.constraint),az(e.default);const t=Eu(xs(e));xf(t),function(e){return Cf(e)!==Mn}(t)||Jo(e.default,ha.Type_parameter_0_has_a_circular_default,mc(t));const n=uf(t),r=wf(t);n&&r&&Vk(r,Pd(Ck(n,ik(t,r)),r),e.default,ha.Type_0_does_not_satisfy_the_constraint_1),lz(e),a(()=>wJ(e.name,ha.Type_parameter_name_cannot_be_0))}function KM(e){vq(e),uB(e);const t=tm(e);Lv(e,31)&&(E.erasableSyntaxOnly&&Jo(e,ha.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled),177===t.kind&&Ld(t.body)||Jo(e,ha.A_parameter_property_is_only_allowed_in_a_constructor_implementation),177===t.kind&&fD(e.name)&&"constructor"===e.name.escapedText&&Jo(e.name,ha.constructor_cannot_be_used_as_a_parameter_property_name)),!e.initializer&&iC(e)&&E_(e.name)&&t.body&&Jo(e,ha.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),e.name&&fD(e.name)&&("this"===e.name.escapedText||"new"===e.name.escapedText)&&(0!==t.parameters.indexOf(e)&&Jo(e,ha.A_0_parameter_must_be_the_first_parameter,e.name.escapedText),177!==t.kind&&181!==t.kind&&186!==t.kind||Jo(e,ha.A_constructor_cannot_have_a_this_parameter),220===t.kind&&Jo(e,ha.An_arrow_function_cannot_have_a_this_parameter),178!==t.kind&&179!==t.kind||Jo(e,ha.get_and_set_accessors_cannot_declare_this_parameters)),!e.dotDotDotToken||E_(e.name)||Jk(Qf(j_(e.symbol)),_r)||Jo(e,ha.A_rest_parameter_must_be_of_an_array_type)}function HM(e,t,n){for(const r of e.elements){if(zE(r))continue;const e=r.name;if(80===e.kind&&e.escapedText===n)return Jo(t,ha.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,n),!0;if((208===e.kind||207===e.kind)&&HM(e,t,n))return!0}}function GM(e){182===e.kind?function(e){vq(e)||function(e){const t=e.parameters[0];if(1!==e.parameters.length)return Wq(t?t.name:e,ha.An_index_signature_must_have_exactly_one_parameter);if(xq(e.parameters,ha.An_index_signature_cannot_have_a_trailing_comma),t.dotDotDotToken)return Wq(t.dotDotDotToken,ha.An_index_signature_cannot_have_a_rest_parameter);if(Av(t))return Wq(t.name,ha.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(t.questionToken)return Wq(t.questionToken,ha.An_index_signature_parameter_cannot_have_a_question_mark);if(t.initializer)return Wq(t.name,ha.An_index_signature_parameter_cannot_have_an_initializer);if(!t.type)return Wq(t.name,ha.An_index_signature_parameter_must_have_a_type_annotation);const n=VS(t.type);if(fE(n,e=>!!(8576&e.flags))||Ix(n))return Wq(t.name,ha.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead);if(!CE(n,ey))return Wq(t.name,ha.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type);if(!e.type)return Wq(e,ha.An_index_signature_must_have_a_type_annotation)}(e)}(e):185!==e.kind&&263!==e.kind&&186!==e.kind&&180!==e.kind&&177!==e.kind&&181!==e.kind||Tq(e);const t=zh(e);4&t||(!(3&~t)&&A{fD(e)&&r.add(e.escapedText),E_(e)&&i.add(t)});const o=Ug(e);if(o){const e=t.length-1,o=t[e];n&&o&&fD(o.name)&&o.typeExpression&&o.typeExpression.type&&!r.has(o.name.escapedText)&&!i.has(e)&&!WC(VS(o.typeExpression.type))&&Jo(o.name,ha.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,kc(o.name))}else g(t,({name:e,isNameFirst:t},o)=>{i.has(o)||fD(e)&&r.has(e.escapedText)||(ED(e)?n&&Jo(e,ha.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,Vp(e),Vp(e.left)):t||Uo(n,e,ha.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,kc(e)))})}(e),g(e.parameters,KM),e.type&&az(e.type),a(function(){!function(e){if(A>=2||!Wu(e)||33554432&e.flags||Od(e.body))return;g(e.parameters,e=>{e.name&&!E_(e.name)&&e.name.escapedText===Ie.escapedName&&Mo("noEmit",e,ha.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}(e);let t=kv(e),n=t;if(Mm(e)){const r=cl(e);if(r&&r.typeExpression&&$D(r.typeExpression.type)){const e=eL(VS(r.typeExpression));e&&e.declaration&&(t=kv(e.declaration),n=r.typeExpression.type)}}if(Z&&!t)switch(e.kind){case 181:Jo(e,ha.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 180:Jo(e,ha.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(t&&n){const r=zh(e);if(1==(5&r)){const e=VS(t);e===rn?Jo(n,ha.A_generator_cannot_have_a_void_type_annotation):XM(e,r,n)}else 2==(3&r)&&function(e,t,n){const r=VS(t);if(A>=2){if(nl(r))return;const e=lv(!0);if(e!==On&&!V_(r,e))return void o(ha.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,t,n,mc(wR(r)||rn))}else{if(xP(e,5),nl(r))return;const a=hm(t);if(void 0===a)return void o(ha.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,mc(r));const s=ts(a,111551,!0),c=s?j_(s):Ft;if(nl(c))return void(80===a.kind&&"Promise"===a.escapedText&&$_(r)===lv(!1)?Jo(n,ha.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):o(ha.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Vp(a)));const l=(i=!0,vr||(vr=ev("PromiseConstructorLike",0,i))||Nn);if(l===Nn)return void o(ha.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Vp(a));const _=ha.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;if(!Vk(c,l,n,_,()=>t===n?void 0:sS(void 0,ha.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)))return;const u=a&&mb(a),d=ua(e.locals,u.escapedText,111551);if(d)return void Jo(d.valueDeclaration,ha.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,kc(u),Vp(a))}var i;function o(e,t,n,r){if(t===n)Jo(n,e,r);else{fT(Jo(n,ha.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),Wp(t,e,r))}}vR(r,!1,e,ha.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(e,t,n)}182!==e.kind&&318!==e.kind&&RR(e)})}function XM(e,t,n){const r=HB(0,e,!!(2&t))||wt;return Vk(qj(r,HB(1,e,!!(2&t))||r,HB(2,e,!!(2&t))||Ot,!!(2&t)),e,n)}function QM(e){const t=new Map;for(const n of e.members)if(172===n.kind){let e;const r=n.name;switch(r.kind){case 11:case 9:e=r.text;break;case 80:e=kc(r);break;default:continue}t.get(e)?(Jo(Ac(n.symbol.valueDeclaration),ha.Duplicate_identifier_0,e),Jo(n.name,ha.Duplicate_identifier_0,e)):t.set(e,!0)}}function YM(e){if(265===e.kind){const t=xs(e);if(t.declarations&&t.declarations.length>0&&t.declarations[0]!==e)return}const t=Bh(xs(e));if(null==t?void 0:t.declarations){const e=new Map;for(const n of t.declarations)VD(n)&&1===n.parameters.length&&n.parameters[0].type&&pE(VS(n.parameters[0].type),t=>{const r=e.get(Ab(t));r?r.declarations.push(n):e.set(Ab(t),{type:t,declarations:[n]})});e.forEach(e=>{if(e.declarations.length>1)for(const t of e.declarations)Jo(t,ha.Duplicate_index_signature_for_type_0,mc(e.type))})}}function ZM(e){vq(e)||function(e){if(FD(e.name)&&LE(e.name.expression)&&103===e.name.expression.operatorToken.kind)return Wq(e.parent.members[0],ha.A_mapped_type_may_not_declare_properties_or_methods);if(y_(e.parent)){if(QN(e.name)&&"constructor"===e.name.text)return Wq(e.name,ha.Classes_may_not_have_a_field_named_constructor);if(Oq(e.name,ha.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type))return!0;if(A<2&&mD(e.name))return Wq(e.name,ha.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(A<2&&b_(e)&&!(33554432&e.flags))return Wq(e.name,ha.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(b_(e)&&Fq(e.questionToken,ha.An_accessor_property_cannot_be_declared_optional))return!0}else if(265===e.parent.kind){if(Oq(e.name,ha.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(gn.assertNode(e,OD),e.initializer)return Wq(e.initializer,ha.An_interface_property_cannot_have_an_initializer)}else if(XD(e.parent)){if(Oq(e.name,ha.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(gn.assertNode(e,OD),e.initializer)return Wq(e.initializer,ha.A_type_literal_property_cannot_have_an_initializer)}33554432&e.flags&&Mq(e);if(LD(e)&&e.exclamationToken&&(!y_(e.parent)||!e.type||e.initializer||33554432&e.flags||jv(e)||Bv(e))){const t=e.initializer?ha.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?ha.A_definite_assignment_assertion_is_not_permitted_in_this_context:ha.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return Wq(e.exclamationToken,t)}}(e)||Dq(e.name),uB(e),eR(e),Lv(e,64)&&173===e.kind&&e.initializer&&Jo(e,ha.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract,Bp(e.name))}function eR(e){if(mD(e.name)&&(ALv(e,31))))if(function(e,t){const n=_h(e.parent);return tF(n)&&n.parent===t}(i,e.body)){let t;for(const n of e.body.statements){if(tF(n)&&gf(LA(n.expression))){t=n;break}if(nR(n))break}void 0===t&&Jo(e,ha.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers)}else Jo(i,ha.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers)}else n||Jo(e,ha.Constructors_for_derived_classes_must_contain_a_super_call)}})}function nR(e){return 108===e.kind||110===e.kind||!cm(e)&&!!sO(e,nR)}function rR(e){fD(e.name)&&"constructor"===kc(e.name)&&y_(e.parent)&&Jo(e.name,ha.Class_constructor_may_not_be_an_accessor),a(function(){Tq(e)||function(e){if(!(33554432&e.flags)&&188!==e.parent.kind&&265!==e.parent.kind){if(A<2&&mD(e.name))return Wq(e.name,ha.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(void 0===e.body&&!Lv(e,64))return Vq(e,e.end-1,1,ha._0_expected,"{")}if(e.body){if(Lv(e,64))return Wq(e,ha.An_abstract_accessor_cannot_have_an_implementation);if(188===e.parent.kind||265===e.parent.kind)return Wq(e.body,ha.An_implementation_cannot_be_declared_in_ambient_contexts)}if(e.typeParameters)return Wq(e.name,ha.An_accessor_cannot_have_type_parameters);if(!function(e){return Iq(e)||e.parameters.length===(178===e.kind?0:1)}(e))return Wq(e.name,178===e.kind?ha.A_get_accessor_cannot_have_parameters:ha.A_set_accessor_must_have_exactly_one_parameter);if(179===e.kind){if(e.type)return Wq(e.name,ha.A_set_accessor_cannot_have_a_return_type_annotation);const t=gn.checkDefined(dv(e),"Return value does not match parameter count assertion.");if(t.dotDotDotToken)return Wq(t.dotDotDotToken,ha.A_set_accessor_cannot_have_rest_parameter);if(t.questionToken)return Wq(t.questionToken,ha.A_set_accessor_cannot_have_an_optional_parameter);if(t.initializer)return Wq(e.name,ha.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}(e)||Dq(e.name);LR(e),GM(e),178===e.kind&&!(33554432&e.flags)&&Ld(e.body)&&512&e.flags&&(1024&e.flags||Jo(e.name,ha.A_get_accessor_must_return_a_value));168===e.name.kind&&uI(e.name);if(hd(e)){const t=xs(e),n=ed(t,178),r=ed(t,179);if(n&&r&&!(1&Xz(n))){la(n).flags|=1;const e=Kv(n),t=Kv(r);(64&e)!=(64&t)&&(Jo(n.name,ha.Accessors_must_both_be_abstract_or_non_abstract),Jo(r.name,ha.Accessors_must_both_be_abstract_or_non_abstract)),(4&e&&!(6&t)||2&e&&!(2&t))&&(Jo(n.name,ha.A_get_accessor_must_be_at_least_as_accessible_as_the_setter),Jo(r.name,ha.A_get_accessor_must_be_at_least_as_accessible_as_the_setter))}}const t=k_(xs(e));178===e.kind&&Hj(e,t)}),az(e.body),eR(e)}function iR(e,t,n){return e.typeArguments&&n{const t=sR(e);t&&aR(e,t)});const t=la(e).resolvedSymbol;t&&X(t.declarations,e=>YT(e)&&!!(536870912&e.flags))&&Go(zL(e),t.declarations,t.escapedName)}}function _R(e,t){if(!(8388608&e.flags))return e;const n=e.objectType,r=e.indexType,i=Pp(n)&&2===Ap(n)?nx(n,0):cx(n,0),o=!!ig(n,Vt);if(CE(r,e=>Jk(e,i)||o&&$m(e,Vt)))return 213===t.kind&&ih(t)&&32&Tx(n)&&1&Dp(n)&&Jo(t,ha.Index_signature_in_type_0_only_permits_reading,mc(n)),e;if(Lx(n)){const e=xx(r,t);if(e){const r=pE(Pf(n),t=>xm(t,e));if(r&&6&dx(r))return Jo(t,ha.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,Sc(e)),Ft}}return Jo(t,ha.Type_0_cannot_be_used_to_index_type_1,mc(r),mc(n)),Ft}function uR(e){!function(e){var t;if(null==(t=e.members)?void 0:t.length)Wq(e.members[0],ha.A_mapped_type_may_not_declare_properties_or_methods)}(e),az(e.typeParameter),az(e.nameType),az(e.type),e.type||Qw(e,wt);const t=Kx(e),n=hp(t);if(n)Vk(n,hn,e.nameType);else{Vk(dp(t),hn,yl(e.typeParameter))}}function dR(e){!function(e){if(158===e.operator){if(155!==e.type.kind)return Wq(e.type,ha._0_expected,ja(155));let t=lh(e.parent);if(Mm(t)&&hP(t)){const e=Qg(t);e&&(t=Bg(e)||e)}switch(t.kind){case 261:const n=t;if(80!==n.name.kind)return Wq(e,ha.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!Jf(n))return Wq(e,ha.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(2&n.parent.flags))return Wq(t.name,ha.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 173:if(!jv(t)||!qv(t))return Wq(t.name,ha.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 172:if(!Lv(t,8))return Wq(t.name,ha.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:Wq(e,ha.unique_symbol_types_are_not_allowed_here)}}else if(148===e.operator&&189!==e.type.kind&&190!==e.type.kind)Uq(e,ha.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,ja(155))}(e),az(e.type)}function pR(e){return(Ov(e,2)||t_(e))&&!!(33554432&e.flags)}function fR(e,t){let n=Zq(e);if(265!==e.parent.kind&&264!==e.parent.kind&&232!==e.parent.kind&&33554432&e.flags){const t=jp(e);!(t&&128&t.flags)||128&n||CF(e.parent)&&TF(e.parent.parent)&&bp(e.parent.parent)||(n|=32),n|=128}return n&t}function mR(e){a(()=>function(e){function t(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}function n(e,n,r,i,o){if(0!==(i^o)){const i=fR(t(e,n),r);We(e,e=>wd(e).fileName).forEach(e=>{const o=fR(t(e,n),r);for(const t of e){const e=fR(t,r)^i,n=fR(t,r)^o;32&n?Jo(Ac(t),ha.Overload_signatures_must_all_be_exported_or_non_exported):128&n?Jo(Ac(t),ha.Overload_signatures_must_all_be_ambient_or_non_ambient):6&e?Jo(Ac(t)||t,ha.Overload_signatures_must_all_be_public_private_or_protected):64&e&&Jo(Ac(t),ha.Overload_signatures_must_all_be_abstract_or_non_abstract)}})}}function r(e,n,r,i){if(r!==i){const r=Ig(t(e,n));g(e,e=>{Ig(e)!==r&&Jo(Ac(e),ha.Overload_signatures_must_all_be_optional_or_required)})}}const i=230;let o,a,s,c=0,l=i,_=!1,u=!0,d=!1;const p=e.declarations,f=!!(16384&e.flags);function h(e){if(e.name&&Od(e.name))return;let t=!1;const n=sO(e.parent,n=>{if(t)return n;t=n===e});if(n&&n.pos===e.end&&n.kind===e.kind){const t=n.name||n,r=n.name;if(e.name&&r&&(mD(e.name)&&mD(r)&&e.name.escapedText===r.escapedText||FD(e.name)&&FD(r)&&Ok(uI(e.name),uI(r))||Hh(e.name)&&Hh(r)&&Xh(e.name)===Xh(r))){if((175===e.kind||174===e.kind)&&jv(e)!==jv(n)){Jo(t,jv(e)?ha.Function_overload_must_be_static:ha.Function_overload_must_not_be_static)}return}if(Ld(n.body))return void Jo(t,ha.Function_implementation_name_must_be_0,Bp(e.name))}const r=e.name||e;f?Jo(r,ha.Constructor_implementation_is_missing):Lv(e,64)?Jo(r,ha.All_declarations_of_an_abstract_method_must_be_consecutive):Jo(r,ha.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}let y=!1,v=!1,b=!1;const x=[];if(p)for(const e of p){const t=e,n=33554432&t.flags,r=t.parent&&(265===t.parent.kind||188===t.parent.kind)||n;if(r&&(s=void 0),264!==t.kind&&232!==t.kind||n||(b=!0),263===t.kind||175===t.kind||174===t.kind||177===t.kind){x.push(t);const e=fR(t,i);c|=e,l&=e,_=_||Ig(t),u=u&&Ig(t);const n=Ld(t.body);n&&o?f?v=!0:y=!0:(null==s?void 0:s.parent)===t.parent&&s.end!==t.pos&&h(s),n?o||(o=t):d=!0,s=t,r||(a=t)}Mm(e)&&__(e)&&e.jsDoc&&(d=m(Hg(e))>0)}v&&g(x,e=>{Jo(e,ha.Multiple_constructor_implementations_are_not_allowed)});y&&g(x,e=>{Jo(Ac(e)||e,ha.Duplicate_function_implementation)});if(b&&!f&&16&e.flags&&p){const t=P(p,e=>264===e.kind).map(e=>Wp(e,ha.Consider_adding_a_declare_modifier_to_this_class));g(p,n=>{const r=264===n.kind?ha.Class_declaration_cannot_implement_overload_list_for_0:263===n.kind?ha.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;r&&fT(Jo(Ac(n)||n,r,Cc(e)),...t)})}!a||a.body||Lv(a,64)||a.questionToken||h(a);if(d&&(p&&(n(p,o,i,c,l),r(p,o,_,u)),o)){const t=Vg(e),n=Rg(o);for(const e of t)if(!iT(n,e)){fT(Jo(e.declaration&&IP(e.declaration)?e.declaration.parent.tagName:e.declaration,ha.This_overload_signature_is_not_compatible_with_its_implementation_signature),Wp(o,ha.The_implementation_signature_is_declared_here));break}}}(e))}function gR(e){a(()=>function(e){let t=e.localSymbol;if(!t&&(t=xs(e),!t.exportSymbol))return;if(ed(t,e.kind)!==e)return;let n=0,r=0,i=0;for(const e of t.declarations){const t=s(e),o=fR(e,2080);32&o?2048&o?i|=t:n|=t:r|=t}const o=n&r,a=i&(n|r);if(o||a)for(const e of t.declarations){const t=s(e),n=Ac(e);t&a?Jo(n,ha.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,Bp(n)):t&o&&Jo(n,ha.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,Bp(n))}function s(e){let t=e;switch(t.kind){case 265:case 266:case 347:case 339:case 341:return 2;case 268:return mp(t)||0!==rB(t)?5:4;case 264:case 267:case 307:return 3;case 308:return 7;case 278:case 227:const e=t,n=JF(e)?e.expression:e.right;if(!fb(n))return 1;t=n;case 272:case 275:case 274:let r=0;return g($a(xs(t)).declarations,e=>{r|=s(e)}),r;case 261:case 209:case 263:case 277:case 80:return 1;case 174:case 172:return 2;default:return gn.failBadSyntaxKind(t)}}}(e))}function hR(e,t,n,...r){const i=yR(e,t);return i&&CR(i,t,n,...r)}function yR(e,t,n){if(el(e))return;const r=e;if(r.promisedTypeOfPromise)return r.promisedTypeOfPromise;if(V_(e,lv(!1)))return r.promisedTypeOfPromise=by(e)[0];if(sM(Sf(e),402915324))return;const i=Yc(e,"then");if(el(i))return;const o=i?Cm(i,0):p;if(0===o.length)return void(t&&Jo(t,ha.A_promise_must_have_a_then_method));let a,s;for(const t of o){const n=eh(t);n&&n!==rn&&!bT(e,n,bo)?a=n:s=le(s,t)}if(!s)return gn.assertIsDefined(a),n&&(n.value=a),void(t&&Jo(t,ha.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,mc(e),mc(a)));const c=uD(zb(O(s,xj)),2097152);if(el(c))return;const l=Cm(c,0);if(0!==l.length)return r.promisedTypeOfPromise=zb(O(l,xj),2);t&&Jo(t,ha.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback)}function vR(e,t,n,r,...i){return(t?CR(e,n,r,...i):wR(e,n,r,...i))||Ft}function bR(e){if(sM(Sf(e),402915324))return!1;const t=Yc(e,"then");return!!t&&Cm(uD(t,2097152),0).length>0}function xR(e){var t;if(16777216&e.flags){const n=Fv(!1);return!!n&&e.aliasSymbol===n&&1===(null==(t=e.aliasTypeArguments)?void 0:t.length)}return!1}function SR(e){return 1048576&e.flags?ME(e,SR):xR(e)?e.aliasTypeArguments[0]:e}function kR(e){if(el(e)||xR(e))return!1;if(Lx(e)){const t=xf(e);if(t?3&t.flags||sT(t)||fE(t,bR):oM(e,8650752))return!0}return!1}function TR(e){return kR(e)?function(e){const t=Fv(!0);if(t)return ky(t,[SR(e)])}(e)??e:(gn.assert(xR(e)||void 0===yR(e),"type provided should not be a non-generic 'promise'-like."),e)}function CR(e,t,n,...r){const i=wR(e,t,n,...r);return i&&TR(i)}function wR(e,t,n,...r){if(el(e))return e;if(xR(e))return e;const i=e;if(i.awaitedTypeOfType)return i.awaitedTypeOfType;if(1048576&e.flags){if(po.lastIndexOf(e.id)>=0)return void(t&&Jo(t,ha.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));const o=t?e=>wR(e,t,n,...r):wR;po.push(e.id);const a=ME(e,o);return po.pop(),i.awaitedTypeOfType=a}if(kR(e))return i.awaitedTypeOfType=e;const o={value:void 0},a=yR(e,void 0,o);if(a){if(e.id===a.id||po.lastIndexOf(a.id)>=0)return void(t&&Jo(t,ha.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));po.push(e.id);const o=wR(a,t,n,...r);if(po.pop(),!o)return;return i.awaitedTypeOfType=o}if(!bR(e))return i.awaitedTypeOfType=e;if(t){let i;gn.assertIsDefined(n),o.value&&(i=sS(i,ha.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,mc(e),mc(o.value))),i=sS(i,n,...r),ho.add(Hp(wd(t),t,i))}}function NR(e){!function(e){if(!qq(wd(e))){let t=e.expression;if(wE(t))return!1;let n,r=!0;for(;;)if(qE(t)||WE(t))t=t.expression;else if(SE(t))r||(n=t),t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1;else{if(!bE(t)){fD(t)||(n=t);break}t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1}if(n)return fT(Jo(e.expression,ha.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),Wp(n,ha.Invalid_syntax_in_decorator)),!0}}(e);const t=jL(e);JL(t,e);const n=ah(t);if(1&n.flags)return;const r=Mj(e);if(!(null==r?void 0:r.resolvedReturnType))return;let i;const o=r.resolvedReturnType;switch(e.parent.kind){case 264:case 232:i=ha.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;case 173:if(!B){i=ha.Decorator_function_return_type_0_is_not_assignable_to_type_1;break}case 170:i=ha.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;break;case 175:case 178:case 179:i=ha.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;default:return gn.failBadSyntaxKind(e.parent)}Vk(n,o,e.expression,i)}function DR(e,t,n,r,i,o=n.length,a=0){return Id(kw.createFunctionTypeNode(void 0,p,kw.createKeywordTypeNode(133)),e,t,n,r,i,o,a)}function ER(e,t,n,r,i,o,a){return Rh(DR(e,t,n,r,i,o,a))}function FR(e){return ER(void 0,void 0,p,e)}function PR(e){return ER(void 0,void 0,[Qo("value",e)],rn)}function AR(e){if(e)switch(e.kind){case 194:case 193:return IR(e.types);case 195:return IR([e.trueType,e.falseType]);case 197:case 203:return AR(e.type);case 184:return e.typeName}}function IR(e){let t;for(let n of e){for(;197===n.kind||203===n.kind;)n=n.type;if(146===n.kind)continue;if(!V&&(202===n.kind&&106===n.literal.kind||157===n.kind))continue;const e=AR(n);if(!e)return;if(t){if(!fD(t)||!fD(e)||t.escapedText!==e.escapedText)return}else t=e}return t}function OR(e){const t=xv(e);return $u(e)?Mf(t):t}function LR(e){if(!(OI(e)&&Uv(e)&&e.modifiers&&vm(B,e,e.parent,e.parent.parent)))return;const t=T(e.modifiers,ID);if(t){if(B)hq(t,8),170===e.kind&&hq(t,32);else if(At.kind===e.kind&&!(524288&t.flags));e===i&&mR(r),n.parent&&mR(n)}const r=174===e.kind?void 0:e.body;if(az(r),Hj(e,ch(e)),a(function(){kv(e)||(Od(r)&&!pR(e)&&Qw(e,wt),1&n&&Ld(r)&&ah(Rg(e)))}),Mm(e)){const t=cl(e);t&&t.typeExpression&&!rI(VS(t.typeExpression),e)&&Jo(t.typeExpression.type,ha.The_type_of_a_function_declaration_must_match_the_function_s_signature)}}function RR(e){a(function(){const t=wd(e);let n=Si.get(t.path);n||(n=[],Si.set(t.path,n));n.push(e)})}function BR(e,t){for(const n of e)switch(n.kind){case 264:case 232:qR(n,t),VR(n,t);break;case 308:case 268:case 242:case 270:case 249:case 250:case 251:GR(n,t);break;case 177:case 219:case 263:case 220:case 175:case 178:case 179:n.body&&GR(n,t),VR(n,t);break;case 174:case 180:case 181:case 185:case 186:case 266:case 265:VR(n,t);break;case 196:UR(n,t);break;default:gn.assertNever(n,"Node should not have been registered for unused identifiers check")}}function JR(e,t,n){n(e,0,Wp(Ac(e)||e,YT(e)?ha._0_is_declared_but_never_used:ha._0_is_declared_but_its_value_is_never_read,t))}function zR(e){return fD(e)&&95===kc(e).charCodeAt(0)}function qR(e,t){for(const n of e.members)switch(n.kind){case 175:case 173:case 178:case 179:if(179===n.kind&&32768&n.symbol.flags)break;const e=xs(n);e.isReferenced||!(Ov(n,2)||Fc(n)&&mD(n.name))||33554432&n.flags||t(n,0,Wp(n.name,ha._0_is_declared_but_its_value_is_never_read,dc(e)));break;case 177:for(const e of n.parameters)!e.symbol.isReferenced&&Lv(e,2)&&t(e,0,Wp(e.name,ha.Property_0_is_declared_but_its_value_is_never_read,Cc(e.symbol)));break;case 182:case 241:case 176:break;default:gn.fail("Unexpected class member")}}function UR(e,t){const{typeParameter:n}=e;WR(n)&&t(e,1,Wp(e,ha._0_is_declared_but_its_value_is_never_read,kc(n.name)))}function VR(e,t){const n=xs(e).declarations;if(!n||Te(n)!==e)return;const r=hl(e),i=new Set;for(const e of r){if(!WR(e))continue;const n=kc(e.name),{parent:r}=e;if(196!==r.kind&&r.typeParameters.every(WR)){if($(i,r)){const i=wd(r),o=QP(r)?gT(r):hT(i,r.typeParameters),a=1===r.typeParameters.length?[ha._0_is_declared_but_its_value_is_never_read,n]:[ha.All_type_parameters_are_unused];t(e,1,rS(i,o.pos,o.end-o.pos,...a))}}else t(e,1,Wp(e,ha._0_is_declared_but_its_value_is_never_read,n))}}function WR(e){return!(262144&bs(e.symbol).isReferenced||zR(e.name))}function $R(e,t,n,r){const i=String(r(t)),o=e.get(i);o?o[1].push(n):e.set(i,[t,[n]])}function KR(e){return at(oy(e),AD)}function HR(e){return hE(e)?mE(e.parent)?!(!e.propertyName||!zR(e.name)):zR(e.name):mp(e)||(hF(e)&&iu(e.parent.parent)||YR(e))&&zR(e.name)}function GR(e,t){const n=new Map,r=new Map,i=new Map;e.locals.forEach(e=>{if(!(262144&e.flags?!(3&e.flags)||3&e.isReferenced:e.isReferenced||e.exportSymbol)&&e.declarations)for(const o of e.declarations)if(!HR(o))if(YR(o))$R(n,ZR(o),o,pJ);else if(hE(o)&&mE(o.parent)){o!==Te(o.parent.elements)&&Te(o.parent.elements).dotDotDotToken||$R(r,o.parent,o,pJ)}else if(hF(o)){const e=7&eU(o),t=Ac(o);(4===e||6===e)&&t&&zR(t)||$R(i,o.parent,o,pJ)}else{const n=e.valueDeclaration&&KR(e.valueDeclaration),i=e.valueDeclaration&&Ac(e.valueDeclaration);n&&i?ac(n,n.parent)||mv(n)||zR(i)||(hE(o)&&gE(o.parent)?$R(r,o.parent,o,pJ):t(n,1,Wp(i,ha._0_is_declared_but_its_value_is_never_read,Cc(e)))):JR(o,Cc(e),t)}}),n.forEach(([e,n])=>{const r=e.parent;if((e.name?1:0)+(e.namedBindings?275===e.namedBindings.kind?1:e.namedBindings.elements.length:0)===n.length)t(r,0,1===n.length?Wp(r,ha._0_is_declared_but_its_value_is_never_read,kc(xe(n).name)):Wp(r,ha.All_imports_in_import_declaration_are_unused));else for(const e of n)JR(e,kc(e.name),t)}),r.forEach(([e,n])=>{const r=KR(e.parent)?1:0;if(e.elements.length===n.length)1===n.length&&261===e.parent.kind&&262===e.parent.parent.kind?$R(i,e.parent.parent,e.parent,pJ):t(e,r,1===n.length?Wp(e,ha._0_is_declared_but_its_value_is_never_read,XR(xe(n).name)):Wp(e,ha.All_destructured_elements_are_unused));else for(const e of n)t(e,r,Wp(e,ha._0_is_declared_but_its_value_is_never_read,XR(e.name)))}),i.forEach(([e,n])=>{if(e.declarations.length===n.length)t(e,0,1===n.length?Wp(xe(n).name,ha._0_is_declared_but_its_value_is_never_read,XR(xe(n).name)):Wp(244===e.parent.kind?e.parent:e,ha.All_variables_are_unused));else for(const e of n)t(e,0,Wp(e,ha._0_is_declared_but_its_value_is_never_read,XR(e.name)))})}function XR(e){switch(e.kind){case 80:return kc(e);case 208:case 207:return XR(st(xe(e.elements),hE).name);default:return gn.assertNever(e)}}function YR(e){return 274===e.kind||277===e.kind||275===e.kind}function ZR(e){return 274===e.kind?e:275===e.kind?e.parent:e.parent.parent}function eB(e){if(242===e.kind&&Hq(e),g_(e)){const t=wi;g(e.statements,az),wi=t}else g(e.statements,az);e.locals&&RR(e)}function tB(e,t,n){if((null==t?void 0:t.escapedText)!==n)return!1;if(173===e.kind||172===e.kind||175===e.kind||174===e.kind||178===e.kind||179===e.kind||304===e.kind)return!1;if(33554432&e.flags)return!1;if((FF(e)||DF(e)||BF(e))&&Hl(e))return!1;const r=oy(e);return!AD(r)||!Od(r.parent.body)}function nB(e){yc(e,t=>{if(4&Xz(t)){return 80!==e.kind?Jo(Ac(e),ha.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):Jo(e,ha.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0}return!1})}function iB(e){yc(e,t=>{if(8&Xz(t)){return 80!==e.kind?Jo(Ac(e),ha.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):Jo(e,ha.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0}return!1})}function oB(e){1048576&Xz(Mp(e))&&(gn.assert(Fc(e)&&fD(e.name)&&"string"==typeof e.name.escapedText,"The target of a WeakMap/WeakSet collision check should be an identifier"),Mo("noEmit",e,ha.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel,e.name.escapedText))}function aB(e){let t=!1;if(JE(e)){for(const n of e.members)if(2097152&Xz(n)){t=!0;break}}else if(NE(e))2097152&Xz(e)&&(t=!0);else{const n=Mp(e);n&&2097152&Xz(n)&&(t=!0)}t&&(gn.assert(Fc(e)&&fD(e.name),"The target of a Reflect collision check should be an identifier"),Mo("noEmit",e,ha.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers,Bp(e.name),"Reflect"))}function cB(t,n){n&&(function(t,n){if(e.getEmitModuleFormatOfFile(wd(t))>=5)return;if(!n||!tB(t,n,"require")&&!tB(t,n,"exports"))return;if(TF(t)&&1!==rB(t))return;const r=Qc(t);308===r.kind&&sf(r)&&Mo("noEmit",n,ha.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,Bp(n),Bp(n))}(t,n),function(e,t){if(!t||A>=4||!tB(e,t,"Promise"))return;if(TF(e)&&1!==rB(e))return;const n=Qc(e);308===n.kind&&sf(n)&&4096&n.flags&&Mo("noEmit",t,ha.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,Bp(t),Bp(t))}(t,n),function(e,t){A<=8&&(tB(e,t,"WeakMap")||tB(e,t,"WeakSet"))&&lo.push(e)}(t,n),function(e,t){t&&A>=2&&A<=8&&tB(e,t,"Reflect")&&_o.push(e)}(t,n),y_(t)?(wJ(n,ha.Class_name_cannot_be_0),33554432&t.flags||function(t){A>=1&&"Object"===t.escapedText&&e.getEmitModuleFormatOfFile(wd(t))<5&&Jo(t,ha.Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0,vi[L])}(n)):kF(t)&&wJ(n,ha.Enum_name_cannot_be_0))}function _B(e){return e===Nt?wt:e===lr?cr:e}function uB(e){var t;if(LR(e),hE(e)||az(e.type),!e.name)return;if(168===e.name.kind&&(uI(e.name),Ru(e)&&e.initializer&&kM(e.initializer)),hE(e)){if(e.propertyName&&fD(e.name)&&iy(e)&&Od(tm(e).body))return void uo.push(e);mE(e.parent)&&e.dotDotDotToken&&A1&&X(n.declarations,t=>t!==e&&Bf(t)&&!pB(t,e))&&Jo(e.name,ha.All_declarations_of_0_must_have_identical_modifiers,Bp(e.name))}else{const t=_B(Zl(e));nl(r)||nl(t)||Ok(r,t)||67108864&n.flags||dB(n.valueDeclaration,r,e,t),Ru(e)&&e.initializer&&Wk(kM(e.initializer),t,e,e.initializer,void 0),n.valueDeclaration&&!pB(e,n.valueDeclaration)&&Jo(e.name,ha.All_declarations_of_0_must_have_identical_modifiers,Bp(e.name))}var i;173!==e.kind&&172!==e.kind&&(gR(e),261!==e.kind&&209!==e.kind||function(e){if(7&eU(e)||iy(e))return;const t=xs(e);if(1&t.flags){if(!fD(e.name))return gn.fail();const n=ze(e,e.name.escapedText,3,void 0,!1);if(n&&n!==t&&2&n.flags&&7&HI(n)){const t=Ph(n.valueDeclaration,262),r=244===t.parent.kind&&t.parent.parent?t.parent.parent:void 0;if(!r||!(242===r.kind&&__(r.parent)||269===r.kind||268===r.kind||308===r.kind)){const t=dc(n);Jo(e,ha.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,t,t)}}}}(e),cB(e,e.name))}function dB(e,t,n,r){const i=Ac(n),o=173===n.kind||172===n.kind?ha.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:ha.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,a=Bp(i),s=Jo(i,o,a,mc(t),mc(r));e&&fT(s,Wp(e,ha._0_was_also_declared_here,a))}function pB(e,t){if(170===e.kind&&261===t.kind||261===e.kind&&170===t.kind)return!0;if(Ig(e)!==Ig(t))return!1;return Vv(e,1358)===Vv(t,1358)}function fB(t){var n,r;null==(n=Yn)||n.push(Yn.Phase.Check,"checkVariableDeclaration",{kind:t.kind,pos:t.pos,end:t.end,path:t.tracingPath}),function(t){const n=eU(t),r=7&n;if(E_(t.name))switch(r){case 6:return Wq(t,ha._0_declarations_may_not_have_binding_patterns,"await using");case 4:return Wq(t,ha._0_declarations_may_not_have_binding_patterns,"using")}if(250!==t.parent.parent.kind&&251!==t.parent.parent.kind)if(33554432&n)Mq(t);else if(!t.initializer){if(E_(t.name)&&!E_(t.parent))return Wq(t,ha.A_destructuring_declaration_must_have_an_initializer);switch(r){case 6:return Wq(t,ha._0_declarations_must_be_initialized,"await using");case 4:return Wq(t,ha._0_declarations_must_be_initialized,"using");case 2:return Wq(t,ha._0_declarations_must_be_initialized,"const")}}if(t.exclamationToken&&(244!==t.parent.parent.kind||!t.type||t.initializer||33554432&n)){const e=t.initializer?ha.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:t.type?ha.A_definite_assignment_assertion_is_not_permitted_in_this_context:ha.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return Wq(t.exclamationToken,e)}e.getEmitModuleFormatOfFile(wd(t))<4&&!(33554432&t.parent.parent.flags)&&Lv(t.parent.parent,32)&&Rq(t.name);!!r&&Bq(t.name)}(t),uB(t),null==(r=Yn)||r.pop()}function gB(e){return function(e){if(e.dotDotDotToken){const t=e.parent.elements;if(e!==Te(t))return Wq(e,ha.A_rest_element_must_be_last_in_a_destructuring_pattern);if(xq(t,ha.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),e.propertyName)return Wq(e.name,ha.A_rest_element_cannot_have_a_property_name)}if(e.dotDotDotToken&&e.initializer)Vq(e,e.initializer.pos-1,1,ha.A_rest_element_cannot_have_an_initializer)}(e),uB(e)}function hB(e){const t=7&pc(e);(4===t||6===t)&&A=2,s=!a&&E.downlevelIteration,c=E.noUncheckedIndexedAccess&&!!(128&e);if(a||s||o){const o=OB(t,e,a?r:void 0);if(i&&o){const t=8&e?ha.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&e?ha.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&e?ha.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&e?ha.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;t&&Vk(n,o.nextType,r,t)}if(o||a)return c?bD(o&&o.yieldType):o&&o.yieldType}let l=t,_=!1;if(4&e){if(1048576&l.flags){const e=t.types,n=P(e,e=>!(402653316&e.flags));n!==e&&(l=zb(n,2))}else 402653316&l.flags&&(l=cn);if(_=l!==t,_&&131072&l.flags)return c?bD(Ut):Ut}if(!QC(l)){if(r){const n=!!(4&e)&&!_,[i,o]=function(n,r){var i;if(r)return n?[ha.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[ha.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0];if(DB(e,0,t,void 0))return[ha.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!1];if(function(e){switch(e){case"Float32Array":case"Float64Array":case"Int16Array":case"Int32Array":case"Int8Array":case"NodeList":case"Uint16Array":case"Uint32Array":case"Uint8Array":case"Uint8ClampedArray":return!0}return!1}(null==(i=t.symbol)?void 0:i.escapedName))return[ha.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!0];return n?[ha.Type_0_is_not_an_array_type_or_a_string_type,!0]:[ha.Type_0_is_not_an_array_type,!0]}(n,s);Vo(r,o&&!!hR(l),i,mc(l))}return _?c?bD(Ut):Ut:void 0}const u=_g(l,Vt);return _&&u?402653316&u.flags&&!E.noUncheckedIndexedAccess?Ut:zb(c?[u,Ut,Lt]:[u,Ut],2):128&e?bD(u):u}function DB(e,t,n,r){if(el(n))return;const i=OB(n,e,r);return i&&i[vJ(t)]}function EB(e=cn,t=cn,n=Ot){if(67359327&e.flags&&180227&t.flags&&180227&n.flags){const r=uy([e,t,n]);let i=pi.get(r);return i||(i={yieldType:e,returnType:t,nextType:n},pi.set(r,i)),i}return{yieldType:e,returnType:t,nextType:n}}function FB(e){let t,n,r;for(const i of e)if(void 0!==i&&i!==fi){if(i===mi)return mi;t=le(t,i.yieldType),n=le(n,i.returnType),r=le(r,i.nextType)}return t||n||r?EB(t&&zb(t),n&&zb(n),r&&Gb(r)):fi}function PB(e,t){return e[t]}function IB(e,t,n){return e[t]=n}function OB(e,t,n){var r,i;if(e===_n)return gi;if(el(e))return mi;if(!(1048576&e.flags)){const i=n?{errors:void 0,skipLogging:!0}:void 0,o=jB(e,t,n,i);if(o===fi){if(n){const r=zB(n,e,!!(2&t));(null==i?void 0:i.errors)&&fT(r,...i.errors)}return}if(null==(r=null==i?void 0:i.errors)?void 0:r.length)for(const e of i.errors)ho.add(e);return o}const o=2&t?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",a=PB(e,o);if(a)return a===fi?void 0:a;let s;for(const r of e.types){const a=n?{errors:void 0}:void 0,c=jB(r,t,n,a);if(c===fi){if(n){const r=zB(n,e,!!(2&t));(null==a?void 0:a.errors)&&fT(r,...a.errors)}return void IB(e,o,fi)}if(null==(i=null==a?void 0:a.errors)?void 0:i.length)for(const e of a.errors)ho.add(e);s=le(s,c)}const c=s?FB(s):fi;return IB(e,o,c),c===fi?void 0:c}function LB(e,t){if(e===fi)return fi;if(e===mi)return mi;const{yieldType:n,returnType:r,nextType:i}=e;return t&&Fv(!0),EB(CR(n,t)||wt,CR(r,t)||wt,i)}function jB(e,t,n,r){if(el(e))return mi;let i=!1;if(2&t){const r=MB(e,hi)||RB(e,hi);if(r){if(r!==fi||!n)return 8&t?LB(r,n):r;i=!0}}if(1&t){let r=MB(e,yi)||RB(e,yi);if(r)if(r===fi&&n)i=!0;else{if(!(2&t))return r;if(r!==fi)return r=LB(r,n),i?r:IB(e,"iterationTypesOfAsyncIterable",r)}}if(2&t){const t=JB(e,hi,n,r,i);if(t!==fi)return t}if(1&t){let o=JB(e,yi,n,r,i);if(o!==fi)return 2&t?(o=LB(o,n),i?o:IB(e,"iterationTypesOfAsyncIterable",o)):o}return fi}function MB(e,t){return PB(e,t.iterableCacheKey)}function RB(e,t){if(V_(e,t.getGlobalIterableType(!1))||V_(e,t.getGlobalIteratorObjectType(!1))||V_(e,t.getGlobalIterableIteratorType(!1))||V_(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=by(e);return IB(e,t.iterableCacheKey,EB(t.resolveIterationType(n,void 0)||n,t.resolveIterationType(r,void 0)||r,i))}if(R_(e,t.getGlobalBuiltinIteratorTypes())){const[n]=by(e),r=Nv(),i=Ot;return IB(e,t.iterableCacheKey,EB(t.resolveIterationType(n,void 0)||n,t.resolveIterationType(r,void 0)||r,i))}}function BB(e){const t=sv(!1),n=t&&Yc(j_(t),xc(e));return n&&mC(n)?gC(n):`__@${e}`}function JB(e,t,n,r,i){const o=xm(e,BB(t.iteratorSymbolName)),a=!o||16777216&o.flags?void 0:j_(o);if(el(a))return i?mi:IB(e,t.iterableCacheKey,mi);const s=a?Cm(a,0):void 0,c=P(s,e=>0===hj(e));if(!X(c))return n&&X(s)&&Vk(e,t.getGlobalIterableType(!0),n,void 0,void 0,r),i?fi:IB(e,t.iterableCacheKey,fi);const l=qB(Gb(O(c,ah)),t,n,r,i)??fi;return i?l:IB(e,t.iterableCacheKey,l)}function zB(e,t,n){const r=n?ha.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:ha.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;return Vo(e,!!hR(t)||!n&&sF(e.parent)&&e.parent.expression===e&&vv(!1)!==On&&Jk(t,Pv(vv(!1),[wt,wt,wt])),r,mc(t))}function qB(e,t,n,r,i){if(el(e))return mi;let o=function(e,t){return PB(e,t.iteratorCacheKey)}(e,t)||function(e,t){if(V_(e,t.getGlobalIterableIteratorType(!1))||V_(e,t.getGlobalIteratorType(!1))||V_(e,t.getGlobalIteratorObjectType(!1))||V_(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=by(e);return IB(e,t.iteratorCacheKey,EB(n,r,i))}if(R_(e,t.getGlobalBuiltinIteratorTypes())){const[n]=by(e),r=Nv(),i=Ot;return IB(e,t.iteratorCacheKey,EB(n,r,i))}}(e,t);return o===fi&&n&&(o=void 0,i=!0),o??(o=function(e,t,n,r,i){const o=FB([KB(e,t,"next",n,r),KB(e,t,"return",n,r),KB(e,t,"throw",n,r)]);return i?o:IB(e,t.iteratorCacheKey,o)}(e,t,n,r,i)),o===fi?void 0:o}function UB(e,t){const n=Yc(e,"done")||$t;return Jk(0===t?$t:Gt,n)}function VB(e){return UB(e,0)}function WB(e){return UB(e,1)}function $B(e){if(el(e))return mi;const t=PB(e,"iterationTypesOfIteratorResult");if(t)return t;if(V_(e,(n=!1,Cr||(Cr=ev("IteratorYieldResult",1,n))||On))){return IB(e,"iterationTypesOfIteratorResult",EB(by(e)[0],void 0,void 0))}var n;if(V_(e,function(e){return wr||(wr=ev("IteratorReturnResult",1,e))||On}(!1))){return IB(e,"iterationTypesOfIteratorResult",EB(void 0,by(e)[0],void 0))}const r=EE(e,VB),i=r!==cn?Yc(r,"value"):void 0,o=EE(e,WB),a=o!==cn?Yc(o,"value"):void 0;return IB(e,"iterationTypesOfIteratorResult",i||a?EB(i,a||rn,void 0):fi)}function KB(e,t,n,r,i){var o,a,s,c;const l=xm(e,n);if(!l&&"next"!==n)return;const _=!l||"next"===n&&16777216&l.flags?void 0:"next"===n?j_(l):uD(j_(l),2097152);if(el(_))return mi;const u=_?Cm(_,0):p;if(0===u.length){if(r){const e="next"===n?t.mustHaveANextMethodDiagnostic:t.mustBeAMethodDiagnostic;i?(i.errors??(i.errors=[]),i.errors.push(Wp(r,e,n))):Jo(r,e,n)}return"next"===n?fi:void 0}if((null==_?void 0:_.symbol)&&1===u.length){const e=t.getGlobalGeneratorType(!1),r=t.getGlobalIteratorType(!1),i=(null==(a=null==(o=e.symbol)?void 0:o.members)?void 0:a.get(n))===_.symbol,l=!i&&(null==(c=null==(s=r.symbol)?void 0:s.members)?void 0:c.get(n))===_.symbol;if(i||l){const t=i?e:r,{mapper:o}=_;return EB(ek(t.typeParameters[0],o),ek(t.typeParameters[1],o),"next"===n?ek(t.typeParameters[2],o):void 0)}}let d,f,m,g,h;for(const e of u)"throw"!==n&&X(e.parameters)&&(d=le(d,dj(e,0))),f=le(f,ah(e));if("throw"!==n){const e=d?zb(d):Ot;if("next"===n)g=e;else if("return"===n){m=le(m,t.resolveIterationType(e,r)||wt)}}const y=f?Gb(f):cn,v=$B(t.resolveIterationType(y,r)||wt);return v===fi?(r&&(i?(i.errors??(i.errors=[]),i.errors.push(Wp(r,t.mustHaveAValueDiagnostic,n))):Jo(r,t.mustHaveAValueDiagnostic,n)),h=wt,m=le(m,wt)):(h=v.yieldType,m=le(m,v.returnType)),EB(h,zb(m),g)}function HB(e,t,n){if(el(t))return;const r=GB(t,n);return r&&r[vJ(e)]}function GB(e,t){if(el(e))return mi;const n=t?hi:yi;return OB(e,t?2:1,void 0)||function(e,t,n,r){return qB(e,t,n,r,!1)}(e,n,void 0,void 0)}function QB(e){Hq(e)||function(e){let t=e;for(;t;){if(u_(t))return Wq(e,ha.Jump_target_cannot_cross_function_boundary);switch(t.kind){case 257:if(e.label&&t.label.escapedText===e.label.escapedText){return!!(252===e.kind&&!Z_(t.statement,!0))&&Wq(e,ha.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}break;case 256:if(253===e.kind&&!e.label)return!1;break;default:if(Z_(t,!1)&&!e.label)return!1}t=t.parent}if(e.label){return Wq(e,253===e.kind?ha.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:ha.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}Wq(e,253===e.kind?ha.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:ha.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement)}(e)}function tJ(e,t){const n=!!(2&t);if(!!(1&t)){const t=HB(1,e,n);return t?n?wR(SR(t)):t:Ft}return n?wR(e)||Ft:e}function nJ(e,t){const n=tJ(t,zh(e));return!(!n||!(oM(n,16384)||32769&n.flags))}function oJ(e,t,n,r,i,o=!1){const a=Mm(n),s=zh(e);if(r){const i=ph(r,a);if(jE(i))return oJ(e,t,n,i.whenTrue,WM(i.whenTrue),!0),void oJ(e,t,n,i.whenFalse,WM(i.whenFalse),!0)}const c=254===n.kind,l=2&s?vR(i,!1,n,ha.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):i,_=r&&_L(r);Wk(l,t,c&&!o?n:_,_)}function sJ(e){Hq(e)||fD(e.expression)&&!e.expression.escapedText&&function(e,t,...n){const r=wd(e);if(!qq(r)){const i=nf(r,e.pos);return ho.add(rS(r,js(i),0,t,...n)),!0}}(e,ha.Line_break_not_permitted_here),e.expression&&WM(e.expression)}function cJ(e,t,n){const r=Gm(e);if(0===r.length)return;for(const t of qp(e))n&&4194304&t.flags||gJ(e,t,ix(t,8576,!0),M_(t));const i=t.valueDeclaration;if(i&&y_(i))for(const t of i.members)if((!n&&!jv(t)||n&&jv(t))&&!hd(t)){const n=xs(t);gJ(e,n,qM(t.name.expression),M_(n))}if(r.length>1)for(const t of r)CJ(e,t)}function gJ(e,t,n,r){const i=t.valueDeclaration,o=Ac(i);if(o&&mD(o))return;const a=ug(e,n),s=2&Tx(e)?ed(e.symbol,265):void 0,c=i&&227===i.kind||o&&168===o.kind?i:void 0,l=Cs(t)===e.symbol?i:void 0;for(const n of a){const i=n.declaration&&Cs(xs(n.declaration))===e.symbol?n.declaration:void 0,o=l||i||(s&&!X(mu(e),e=>!!Kp(e,t.escapedName)&&!!_g(e,n.keyType))?s:void 0);if(o&&!Jk(r,n.type)){const e=Bo(o,ha.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,dc(t),mc(r),mc(n.keyType),mc(n.type));c&&o!==c&&fT(e,Wp(c,ha._0_is_declared_here,dc(t))),ho.add(e)}}}function CJ(e,t){const n=t.declaration,r=ug(e,t.keyType),i=2&Tx(e)?ed(e.symbol,265):void 0,o=n&&Cs(xs(n))===e.symbol?n:void 0;for(const n of r){if(n===t)continue;const r=n.declaration&&Cs(xs(n.declaration))===e.symbol?n.declaration:void 0,a=o||r||(i&&!X(mu(e),e=>!!ig(e,t.keyType)&&!!_g(e,n.keyType))?i:void 0);a&&!Jk(t.type,n.type)&&Jo(a,ha._0_index_type_1_is_not_assignable_to_2_index_type_3,mc(t.keyType),mc(t.type),mc(n.keyType),mc(n.type))}}function wJ(e,t){switch(e.escapedText){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":Jo(e,t,e.escapedText)}}function NJ(e){let t=!1;if(e)for(let t=0;t{n.default?(t=!0,function(e,t,n){function r(e){if(184===e.kind){const r=$y(e);if(262144&r.flags)for(let i=n;i264===e.kind||265===e.kind)}(e);if(!n||n.length<=1)return;if(!EJ(n,Pu(e).localTypeParameters,hl)){const t=dc(e);for(const e of n)Jo(e.name,ha.All_declarations_of_0_must_have_identical_type_parameters,t)}}}function EJ(e,t,n){const r=m(t),i=Ag(t);for(const o of e){const e=n(o),a=e.length;if(ar)return!1;for(let n=0;n1)return Uq(r.types[1],ha.Classes_can_only_extend_a_single_class);t=!0}else{if(gn.assert(119===r.token),n)return Uq(r,ha.implements_clause_already_seen);n=!0}wq(r)}})(e)||Sq(e.typeParameters,t)}(e),LR(e),cB(e,e.name),NJ(hl(e)),gR(e);const t=xs(e),n=Pu(t),r=Pd(n),i=j_(t);DJ(t),mR(t),function(e){const t=new Map,n=new Map,r=new Map;for(const o of e.members)if(177===o.kind)for(const e of o.parameters)ac(e,o)&&!E_(e.name)&&i(t,e.name,e.name.escapedText,3);else{const e=jv(o),a=o.name;if(!a)continue;const s=mD(a),c=s&&e?16:0,l=s?r:e?n:t,_=a&&Yq(a);if(_)switch(o.kind){case 178:i(l,a,_,1|c);break;case 179:i(l,a,_,2|c);break;case 173:i(l,a,_,3|c);break;case 175:i(l,a,_,8|c)}}function i(e,t,n,r){const i=e.get(n);if(i)if((16&i)!=(16&r))Jo(t,ha.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name,rp(t));else{const o=!!(8&i),a=!!(8&r);o||a?o!==a&&Jo(t,ha.Duplicate_identifier_0,rp(t)):i&r&-17?Jo(t,ha.Duplicate_identifier_0,rp(t)):e.set(n,i|r)}else e.set(n,r)}}(e);!!(33554432&e.flags)||function(e){for(const t of e.members){const n=t.name;if(jv(t)&&n){const t=Yq(n);switch(t){case"name":case"length":case"caller":case"arguments":if(J)break;case"prototype":Jo(n,ha.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,t,Uc(xs(e)))}}}}(e);const o=Ch(e);if(o){g(o.typeArguments,az),A{const t=s[0],a=_u(n),c=Pf(a);if(function(e,t){const n=Cm(e,1);if(n.length){const r=n[0].declaration;if(r&&Ov(r,2)){xz(t,kx(e.symbol))||Jo(t,ha.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,es(e.symbol))}}}(c,o),az(o.expression),X(o.typeArguments)){g(o.typeArguments,az);for(const e of cu(c,o.typeArguments,o))if(!aR(o,e.typeParameters))break}const l=Pd(t,n.thisType);if(Vk(r,l,void 0)?Vk(i,Ik(c),e.name||e,ha.Class_static_side_0_incorrectly_extends_base_class_static_side_1):LJ(e,r,l,ha.Class_0_incorrectly_extends_base_class_1),8650752&a.flags)if(ou(i)){Cm(a,1).some(e=>4&e.flags)&&!Lv(e,64)&&Jo(e.name||e,ha.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract)}else Jo(e.name||e,ha.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any);if(!(c.symbol&&32&c.symbol.flags||8650752&a.flags)){g(lu(c,o.typeArguments,o),e=>!ML(e.declaration)&&!Ok(ah(e),t))&&Jo(o.expression,ha.Base_constructors_must_all_have_the_same_return_type)}!function(e,t){var n,r,i,o,a;const s=Qp(t),c=new Map;e:for(const l of s){const s=jJ(l);if(4194304&s.flags)continue;const _=Kp(e,s.escapedName);if(!_)continue;const u=jJ(_),d=dx(s);if(gn.assert(!!u,"derived should point to something, even if it is the base class' declaration."),u===s){const r=kx(e.symbol);if(64&d&&(!r||!Lv(r,64))){for(const n of mu(e)){if(n===t)continue;const e=Kp(n,s.escapedName),r=e&&jJ(e);if(r&&r!==s)continue e}const i=mc(t),o=mc(e),a=dc(l),_=le(null==(n=c.get(r))?void 0:n.missedProperties,a);c.set(r,{baseTypeName:i,typeName:o,missedProperties:_})}}else{const n=dx(u);if(2&d||2&n)continue;let c;const l=98308&s.flags,_=98308&u.flags;if(l&&_){if((6&ux(s)?null==(r=s.declarations)?void 0:r.some(e=>MJ(e,d)):null==(i=s.declarations)?void 0:i.every(e=>MJ(e,d)))||262144&ux(s)||u.valueDeclaration&&LE(u.valueDeclaration))continue;const c=4!==l&&4===_;if(c||4===l&&4!==_){const n=c?ha._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:ha._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;Jo(Ac(u.valueDeclaration)||u.valueDeclaration,n,dc(s),mc(t),mc(e))}else if(J){const r=null==(o=u.declarations)?void 0:o.find(e=>173===e.kind&&!e.initializer);if(r&&!(33554432&u.flags)&&!(64&d)&&!(64&n)&&!(null==(a=u.declarations)?void 0:a.some(e=>!!(33554432&e.flags)))){const n=wC(kx(e.symbol)),i=r.name;if(r.exclamationToken||!n||!fD(i)||!V||!BJ(i,e,n)){const e=ha.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;Jo(Ac(u.valueDeclaration)||u.valueDeclaration,e,dc(s),mc(t))}}}continue}if(GI(s)){if(GI(u)||4&u.flags)continue;gn.assert(!!(98304&u.flags)),c=ha.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else c=98304&s.flags?ha.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:ha.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;Jo(Ac(u.valueDeclaration)||u.valueDeclaration,c,mc(t),dc(s),mc(e))}}for(const[e,t]of c)if(1===m(t.missedProperties))JE(e)?Jo(e,ha.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,xe(t.missedProperties),t.baseTypeName):Jo(e,ha.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,t.typeName,xe(t.missedProperties),t.baseTypeName);else if(m(t.missedProperties)>5){const n=O(t.missedProperties.slice(0,4),e=>`'${e}'`).join(", "),r=m(t.missedProperties)-4;JE(e)?Jo(e,ha.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more,t.baseTypeName,n,r):Jo(e,ha.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more,t.typeName,t.baseTypeName,n,r)}else{const n=O(t.missedProperties,e=>`'${e}'`).join(", ");JE(e)?Jo(e,ha.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1,t.baseTypeName,n):Jo(e,ha.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2,t.typeName,t.baseTypeName,n)}}(n,t)})}!function(e,t,n,r){const i=Ch(e),o=i&&mu(t),a=(null==o?void 0:o.length)?Pd(xe(o),t.thisType):void 0,s=_u(t);for(const i of e.members)Jv(i)||(BD(i)&&g(i.parameters,o=>{ac(o,i)&&AJ(e,r,s,a,t,n,o,!0)}),AJ(e,r,s,a,t,n,i,!1))}(e,n,r,i);const s=Nh(e);if(s)for(const e of s)fb(e.expression)&&!Tl(e.expression)||Jo(e.expression,ha.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),cR(e),a(c(e));function c(t){return()=>{const i=Qf(VS(t));if(!nl(i))if(yu(i)){const t=i.symbol&&32&i.symbol.flags?ha.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:ha.Class_0_incorrectly_implements_interface_1,o=Pd(i,n.thisType);Vk(r,o,void 0)||LJ(e,r,o,t)}else Jo(t,ha.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}a(()=>{cJ(n,t),cJ(i,t,!0),YM(e),function(e){if(!V||!G||33554432&e.flags)return;const t=wC(e);for(const n of e.members)if(!(128&Kv(n))&&!jv(n)&&RJ(n)){const e=n.name;if(fD(e)||mD(e)||FD(e)){const r=j_(xs(n));3&r.flags||uT(r)||t&&BJ(e,r,t)||Jo(n.name,ha.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,Bp(e))}}}(e)})}function AJ(e,t,n,r,i,o,a,s,c=!0){const l=a.name&&Nz(a.name)||Nz(a);return l?OJ(e,t,n,r,i,o,Rv(a),Bv(a),jv(a),s,l,c?a:void 0):0}function OJ(e,t,n,r,i,o,a,s,c,l,_,u){const d=Mm(e),p=!!(33554432&e.flags);if(a&&(null==_?void 0:_.valueDeclaration)&&h_(_.valueDeclaration)&&_.valueDeclaration.name&&yd(_.valueDeclaration.name))return Jo(u,d?ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic:ha.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic),2;if(r&&(a||E.noImplicitOverride)){const e=c?n:r,i=xm(c?t:o,_.escapedName),f=xm(e,_.escapedName),m=mc(r);if(i&&!f&&a){if(u){const t=DO(Cc(_),e);t?Jo(u,d?ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:ha.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,m,dc(t)):Jo(u,d?ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:ha.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,m)}return 2}if(i&&(null==f?void 0:f.declarations)&&E.noImplicitOverride&&!p){const e=X(f.declarations,Bv);if(a)return 0;if(!e){if(u){Jo(u,l?d?ha.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:ha.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:d?ha.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:ha.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0,m)}return 1}if(s&&e)return u&&Jo(u,ha.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0,m),1}}else if(a){if(u){const e=mc(i);Jo(u,d?ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:ha.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,e)}return 2}return 0}function LJ(e,t,n,r){let i=!1;for(const r of e.members){if(jv(r))continue;const e=r.name&&Nz(r.name)||Nz(r);if(e){const o=xm(t,e.escapedName),a=xm(n,e.escapedName);if(o&&a){const s=()=>sS(void 0,ha.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,dc(e),mc(t),mc(n));Vk(j_(o),j_(a),r.name||r,void 0,s)||(i=!0)}}}i||Vk(t,n,e.name||e,r)}function jJ(e){return 1&ux(e)?e.links.target:e}function MJ(e,t){return 64&t&&(!LD(e)||!e.initializer)||xF(e.parent)}function RJ(e){return 173===e.kind&&!Bv(e)&&!e.exclamationToken&&!e.initializer}function BJ(e,t,n){const r=FD(e)?kw.createElementAccessExpression(kw.createThis(),e.expression):kw.createPropertyAccessExpression(kw.createThis(),e);jT(r.expression,r),jT(r,n),r.flowNode=n.returnFlowNode;return!uT(AF(r,t,ww(t)))}function JJ(e){vq(e)||function(e){let t=!1;if(e.heritageClauses)for(const n of e.heritageClauses){if(96!==n.token)return gn.assert(119===n.token),Uq(n,ha.Interface_declaration_cannot_have_implements_clause);if(t)return Uq(n,ha.extends_clause_already_seen);t=!0,wq(n)}}(e),zq(e.parent)||Wq(e,ha._0_declarations_can_only_be_declared_inside_a_block,"interface"),NJ(e.typeParameters),a(()=>{wJ(e.name,ha.Interface_name_cannot_be_0),gR(e);const t=xs(e);DJ(t);const n=ed(t,265);if(e===n){const n=Pu(t),r=Pd(n);if(function(e,t){const n=mu(e);if(n.length<2)return!0;const r=new Map;g(ad(e).declaredProperties,t=>{r.set(t.escapedName,{prop:t,containingType:e})});let i=!0;for(const o of n){const n=Qp(Pd(o,e.thisType));for(const a of n){const n=r.get(a.escapedName);if(n){if(n.containingType!==e&&!JC(n.prop,a)){i=!1;const r=mc(n.containingType),s=mc(o);let c=sS(void 0,ha.Named_property_0_of_types_1_and_2_are_not_identical,dc(a),r,s);c=sS(c,ha.Interface_0_cannot_simultaneously_extend_types_1_and_2,mc(e),r,s),ho.add(Hp(wd(t),t,c))}}else r.set(a.escapedName,{prop:a,containingType:o})}}return i}(n,e.name)){for(const t of mu(n))Vk(r,Pd(t,n.thisType),e.name,ha.Interface_0_incorrectly_extends_interface_1);cJ(n,t)}}QM(e)}),g(Eh(e),e=>{fb(e.expression)&&!Tl(e.expression)||Jo(e.expression,ha.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),cR(e)}),g(e.members,az),a(()=>{YM(e),RR(e)})}function zJ(e){const t=la(e);if(!(1024&t.flags)){t.flags|=1024;let n,r=0;for(const t of e.members){const e=qJ(t,r,n);la(t).enumMemberValue=e,r="number"==typeof e.value?e.value+1:void 0,n=t}}}function qJ(e,t,n){if(zp(e.name))Jo(e.name,ha.Computed_property_names_are_not_allowed_in_enums);else if(XN(e.name))Jo(e.name,ha.An_enum_member_cannot_have_a_numeric_name);else{const t=Up(e.name);HT(t)&&!VT(t)&&Jo(e.name,ha.An_enum_member_cannot_have_a_numeric_name)}if(e.initializer)return function(e){const t=lf(e.parent),n=e.initializer,r=ge(n,e);void 0!==r.value?t&&"number"==typeof r.value&&!isFinite(r.value)?Jo(n,isNaN(r.value)?ha.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:ha.const_enum_member_initializer_was_evaluated_to_a_non_finite_value):FS(E)&&"string"==typeof r.value&&!r.isSyntacticallyString&&Jo(n,ha._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,`${kc(e.parent.name)}.${Up(e.name)}`):t?Jo(n,ha.const_enum_member_initializers_must_be_constant_expressions):33554432&e.parent.flags?Jo(n,ha.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):Vk(WM(n),Vt,n,ha.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values);return r}(e);if(33554432&e.parent.flags&&!lf(e.parent))return kC(void 0);if(void 0===t)return Jo(e.name,ha.Enum_member_must_have_initializer),kC(void 0);if(FS(E)&&(null==n?void 0:n.initializer)){const t=Yz(n);("number"!=typeof t.value||t.resolvedOtherFiles)&&Jo(e.name,ha.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled)}return kC(t)}function UJ(e,t){const n=ts(e,111551,!0);if(!n)return kC(void 0);if(80===e.kind){const t=e;if(VT(t.escapedText)&&n===Zy(t.escapedText,111551,void 0))return kC(+t.escapedText,!1)}if(8&n.flags)return t?VJ(e,n,t):Yz(n.valueDeclaration);if(KF(n)){const e=n.valueDeclaration;if(e&&hF(e)&&!e.type&&e.initializer&&(!t||e!==t&&pa(e,t))){const n=ge(e.initializer,e);return t&&wd(t)!==wd(e)?kC(n.value,!1,!0,!0):kC(n.value,n.isSyntacticallyString,n.resolvedOtherFiles,!0)}}return kC(void 0)}function VJ(e,t,n){const r=t.valueDeclaration;if(!r||r===n)return Jo(e,ha.Property_0_is_used_before_being_assigned,dc(t)),kC(void 0);if(!pa(r,n))return Jo(e,ha.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),kC(0);const i=Yz(r);return n.parent!==r.parent?kC(i.value,i.isSyntacticallyString,i.resolvedOtherFiles,!0):i}function WJ(e){a(()=>function(e){vq(e),cB(e,e.name),gR(e),e.members.forEach(az),!E.erasableSyntaxOnly||33554432&e.flags||Jo(e,ha.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled);zJ(e);const t=xs(e),n=ed(t,e.kind);if(e===n){if(t.declarations&&t.declarations.length>1){const n=lf(e);g(t.declarations,e=>{kF(e)&&lf(e)!==n&&Jo(Ac(e),ha.Enum_declarations_must_all_be_const_or_non_const)})}let n=!1;g(t.declarations,e=>{if(267!==e.kind)return!1;const t=e;if(!t.members.length)return!1;const r=t.members[0];r.initializer||(n?Jo(r.name,ha.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):n=!0)})}}(e))}function $J(t){t.body&&(az(t.body),bp(t)||RR(t)),a(function(){var n,r;const i=bp(t),o=33554432&t.flags;i&&!o&&Jo(t.name,ha.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);const a=mp(t),s=a?ha.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:ha.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;if(nz(t,s))return;vq(t)||o||11!==t.name.kind||Wq(t.name,ha.Only_ambient_modules_can_use_quoted_names);if(fD(t.name)&&(cB(t,t.name),!(2080&t.flags))){const e=wd(t),n=nf(e,Xd(t));yo.add(rS(e,n.start,n.length,ha.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead))}gR(t);const c=xs(t);if(512&c.flags&&!o&&mJ(t,MS(E))){if(E.erasableSyntaxOnly&&Jo(t.name,ha.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled),FS(E)&&!wd(t).externalModuleIndicator&&Jo(t.name,ha.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement,Le),(null==(n=c.declarations)?void 0:n.length)>1){const e=function(e){const t=e.declarations;if(t)for(const e of t)if((264===e.kind||263===e.kind&&Ld(e.body))&&!(33554432&e.flags))return e}(c);e&&(wd(t)!==wd(e)?Jo(t.name,ha.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):t.pos95===e.kind);e&&Jo(e,ha.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}}if(a)if(xp(t)){if((i||33554432&xs(t).flags)&&t.body)for(const e of t.body.statements)KJ(e,i)}else af(t.parent)?i?Jo(t.name,ha.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):As(Gh(t.name))&&Jo(t.name,ha.Ambient_module_declaration_cannot_specify_relative_module_name):Jo(t.name,i?ha.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:ha.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)})}function KJ(e,t){switch(e.kind){case 244:for(const n of e.declarationList.declarations)KJ(n,t);break;case 278:case 279:Uq(e,ha.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 272:if(Om(e))break;case 273:Uq(e,ha.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 209:case 261:const n=e.name;if(E_(n)){for(const e of n.elements)KJ(e,t);break}case 264:case 267:case 263:case 265:case 268:case 266:if(t)return}}function HJ(e){const t=Eg(e);if(!t||Od(t))return!1;if(!QN(t))return Jo(t,ha.String_literal_expected),!1;const n=269===e.parent.kind&&mp(e.parent.parent);if(308!==e.parent.kind&&!n)return Jo(t,279===e.kind?ha.Export_declarations_are_not_permitted_in_a_namespace:ha.Import_declarations_in_a_namespace_cannot_reference_a_module),!1;if(n&&As(t.text)&&!Bc(e))return Jo(e,ha.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1;if(!DF(e)&&e.attributes){const t=118===e.attributes.token?ha.Import_attribute_values_must_be_string_literal_expressions:ha.Import_assertion_values_must_be_string_literal_expressions;let n=!1;for(const r of e.attributes.elements)QN(r.value)||(n=!0,Jo(r.value,t));return!n}return!0}function GJ(e,t=!0){void 0!==e&&11===e.kind&&(t?5!==L&&6!==L||Wq(e,ha.String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020):Wq(e,ha.Identifier_expected))}function XJ(t){var n,r,i,o,a;let s=xs(t);const c=$a(s);if(c!==vt){if(s=bs(s.exportSymbol||s),Mm(t)&&!(111551&c.flags)&&!Hl(t)){const e=Wl(t)?t.propertyName||t.name:Fc(t)?t.name:t;if(gn.assert(281!==t.kind),282===t.kind){const o=Jo(e,ha.Types_cannot_appear_in_export_declarations_in_JavaScript_files),a=null==(r=null==(n=wd(t).symbol)?void 0:n.exports)?void 0:r.get(ep(t.propertyName||t.name));if(a===c){const e=null==(i=a.declarations)?void 0:i.find(Fu);e&&fT(o,Wp(e,ha._0_is_automatically_exported_here,Sc(a.escapedName)))}}else{gn.assert(261!==t.kind);const n=yc(t,an(EF,DF)),r=(n&&(null==(o=Cg(n))?void 0:o.text))??"...",i=Sc(fD(e)?e.escapedText:s.escapedName);Jo(e,ha._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,i,`import("${r}").${i}`)}return}const l=Ka(c);if(l&((1160127&s.flags?111551:0)|(788968&s.flags?788968:0)|(1920&s.flags?1920:0))){Jo(t,282===t.kind?ha.Export_declaration_conflicts_with_exported_declaration_of_0:ha.Import_declaration_conflicts_with_local_declaration_of_0,dc(s))}else if(282!==t.kind){E.isolatedModules&&!yc(t,Hl)&&1160127&s.flags&&Jo(t,ha.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,dc(s),Le)}if(FS(E)&&!Hl(t)&&!(33554432&t.flags)){const n=Ya(s),r=!(111551&l);if(r||n)switch(t.kind){case 274:case 277:case 272:if(E.verbatimModuleSyntax){gn.assertIsDefined(t.name,"An ImportClause with a symbol should have a name");const e=E.verbatimModuleSyntax&&Om(t)?ha.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:r?ha._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:ha._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled,i=Zd(277===t.kind&&t.propertyName||t.name);ga(Jo(t,e,i),r?void 0:n,i)}r&&272===t.kind&&Ov(t,32)&&Jo(t,ha.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled,Le);break;case 282:if(E.verbatimModuleSyntax||wd(n)!==wd(t)){const e=Zd(t.propertyName||t.name);ga(r?Jo(t,ha.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type,Le):Jo(t,ha._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled,e,Le),r?void 0:n,e);break}}if(E.verbatimModuleSyntax&&272!==t.kind&&!Mm(t)&&1===e.getEmitModuleFormatOfFile(wd(t))?Jo(t,zo(t)):200===L&&272!==t.kind&&261!==t.kind&&1===e.getEmitModuleFormatOfFile(wd(t))&&Jo(t,ha.ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve),E.verbatimModuleSyntax&&!Hl(t)&&!(33554432&t.flags)&&128&l){const n=c.valueDeclaration,r=null==(a=e.getRedirectFromOutput(wd(n).resolvedPath))?void 0:a.resolvedRef;!(33554432&n.flags)||r&&MS(r.commandLine.options)||Jo(t,ha.Cannot_access_ambient_const_enums_when_0_is_enabled,Le)}}if(BF(t)){const e=QJ(s,t);Ko(e)&&e.declarations&&Go(t,e.declarations,e.escapedName)}}}function QJ(e,t){if(!(2097152&e.flags)||Ko(e)||!Ca(e))return e;const n=$a(e);if(n===vt)return n;for(;2097152&e.flags;){const r=gI(e);if(!r)break;if(r===n)break;if(r.declarations&&m(r.declarations)){if(Ko(r)){Go(t,r.declarations,r.escapedName);break}if(e===n)break;e=r}}return n}function YJ(t){cB(t,t.name),XJ(t),277===t.kind&&(GJ(t.propertyName),tp(t.propertyName||t.name)&&PS(E)&&e.getEmitModuleFormatOfFile(wd(t))<4&&hq(t,131072))}function ZJ(e){var t;const n=e.attributes;if(n){const r=av(!0);r!==Nn&&Vk(e_(n),Tw(r,32768),n);const i=CV(e),o=EV(n,i?Wq:void 0),a=118===e.attributes.token;if(i&&o)return;if(!KS(L))return Wq(n,a?ha.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve:ha.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve);if(102<=L&&L<=199&&!a)return Uq(n,ha.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);if(e.moduleSpecifier&&1===Pa(e.moduleSpecifier))return Wq(n,a?ha.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:ha.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls);if(iA(e)||(EF(e)?null==(t=e.importClause)?void 0:t.isTypeOnly:e.isTypeOnly))return Wq(n,a?ha.Import_attributes_cannot_be_used_with_type_only_imports_or_exports:ha.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);if(o)return Wq(n,ha.resolution_mode_can_only_be_set_for_type_only_imports)}}function ez(t){if(!nz(t,Mm(t)?ha.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:ha.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!vq(t)&&t.modifiers&&Uq(t,ha.An_import_declaration_cannot_have_modifiers),HJ(t)){let n;const r=t.importClause;r&&!function(e){var t,n;if(156===e.phaseModifier){if(e.name&&e.namedBindings)return Wq(e,ha.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both);if(276===(null==(t=e.namedBindings)?void 0:t.kind))return Xq(e.namedBindings)}else if(166===e.phaseModifier){if(e.name)return Wq(e,ha.Default_imports_are_not_allowed_in_a_deferred_import);if(276===(null==(n=e.namedBindings)?void 0:n.kind))return Wq(e,ha.Named_imports_are_not_allowed_in_a_deferred_import);if(99!==L&&200!==L)return Wq(e,ha.Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve)}return!1}(r)?(r.name&&YJ(r),r.namedBindings&&(275===r.namedBindings.kind?(YJ(r.namedBindings),e.getEmitModuleFormatOfFile(wd(t))<4&&PS(E)&&hq(t,65536)):(n=rs(t,t.moduleSpecifier),n&&g(r.namedBindings.elements,YJ))),!r.isTypeOnly&&101<=L&&L<=199&&Aa(t.moduleSpecifier,n)&&!function(e){return!!e.attributes&&e.attributes.elements.some(e=>{var t;return"type"===Gh(e.name)&&"json"===(null==(t=at(e.value,Uu))?void 0:t.text)})}(t)&&Jo(t.moduleSpecifier,ha.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0,vi[L])):oe&&!r&&rs(t,t.moduleSpecifier)}ZJ(t)}}function tz(t){if(!nz(t,Mm(t)?ha.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:ha.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!vq(t)&&Iv(t)&&Uq(t,ha.An_export_declaration_cannot_have_modifiers),function(e){var t;if(e.isTypeOnly&&280===(null==(t=e.exportClause)?void 0:t.kind))return Xq(e.exportClause)}(t),!t.moduleSpecifier||HJ(t))if(t.exportClause&&!MF(t.exportClause)){g(t.exportClause.elements,rz);const e=269===t.parent.kind&&mp(t.parent.parent),n=!e&&269===t.parent.kind&&!t.moduleSpecifier&&33554432&t.flags;308===t.parent.kind||e||n||Jo(t,ha.Export_declarations_are_not_permitted_in_a_namespace)}else{const n=rs(t,t.moduleSpecifier);n&&ds(n)?Jo(t.moduleSpecifier,ha.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,dc(n)):t.exportClause&&(XJ(t.exportClause),GJ(t.exportClause.name)),e.getEmitModuleFormatOfFile(wd(t))<4&&(t.exportClause?PS(E)&&hq(t,65536):hq(t,32768))}ZJ(t)}}function nz(e,t){const n=308===e.parent.kind||269===e.parent.kind||268===e.parent.kind;return n||Uq(e,t),!n}function rz(t){XJ(t);const n=void 0!==t.parent.parent.moduleSpecifier;if(GJ(t.propertyName,n),GJ(t.name),jS(E)&&$c(t.propertyName||t.name,!0),n)PS(E)&&e.getEmitModuleFormatOfFile(wd(t))<4&&tp(t.propertyName||t.name)&&hq(t,131072);else{const e=t.propertyName||t.name;if(11===e.kind)return;const n=ze(e,e.escapedText,2998271,void 0,!0);n&&(n===Ce||n===we||n.declarations&&af(Qc(n.declarations[0])))?Jo(e,ha.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,kc(e)):xP(t,7)}}function iz(e){const t=xs(e),n=ca(t);if(!n.exportsChecked){const e=t.exports.get("export=");if(e&&function(e){return _d(e.exports,(e,t)=>"export="!==t)}(t)){const t=Ca(e)||e.valueDeclaration;!t||Bc(t)||Mm(t)||Jo(t,ha.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}const r=hs(t);r&&r.forEach(({declarations:e,flags:t},n)=>{if("__export"===n)return;if(1920&t)return;const r=F(e,on(lJ,sn(xF)));if(!(524288&t&&r<=2)&&r>1&&!oz(e))for(const t of e)hJ(t)&&ho.add(Wp(t,ha.Cannot_redeclare_exported_variable_0,Sc(n)))}),n.exportsChecked=!0}}function oz(e){return e&&e.length>1&&e.every(e=>Mm(e)&&Px(e)&&(og(e.expression)||sg(e.expression)))}function az(n){if(n){const i=r;r=n,f=0,function(n){if(8388608&Xz(n))return;qg(n)&&g(n.jsDoc,({comment:e,tags:t})=>{sz(e),g(t,e=>{sz(e.comment),Mm(n)&&az(e)})});const r=n.kind;if(t)switch(r){case 268:case 264:case 265:case 263:t.throwIfCancellationRequested()}r>=244&&r<=260&&zg(n)&&n.flowNode&&!fF(n.flowNode)&&Uo(!1===E.allowUnreachableCode,n,ha.Unreachable_code_detected);switch(r){case 169:return $M(n);case 170:return KM(n);case 173:return ZM(n);case 172:return function(e){return mD(e.name)&&Jo(e,ha.Private_identifiers_are_not_allowed_outside_class_bodies),ZM(e)}(n);case 186:case 185:case 180:case 181:case 182:return GM(n);case 175:case 174:return function(e){Lq(e)||Dq(e.name),MD(e)&&e.asteriskToken&&fD(e.name)&&"constructor"===kc(e.name)&&Jo(e.name,ha.Class_constructor_may_not_be_a_generator),MR(e),Lv(e,64)&&175===e.kind&&e.body&&Jo(e,ha.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,Bp(e.name)),mD(e.name)&&!rm(e)&&Jo(e,ha.Private_identifiers_are_not_allowed_outside_class_bodies),eR(e)}(n);case 176:return function(e){vq(e),sO(e,az)}(n);case 177:return tR(n);case 178:case 179:return rR(n);case 184:return cR(n);case 183:return function(e){const t=function(e){switch(e.parent.kind){case 220:case 180:case 263:case 219:case 185:case 175:case 174:const t=e.parent;if(e===t.type)return t}}(e);if(!t)return void Jo(e,ha.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);const n=Rg(t),r=th(n);if(!r)return;az(e.type);const{parameterName:i}=e;if(0!==r.kind&&2!==r.kind)if(r.parameterIndex>=0){if(bJ(n)&&r.parameterIndex===n.parameters.length-1)Jo(i,ha.A_type_predicate_cannot_reference_a_rest_parameter);else if(r.type){const t=()=>sS(void 0,ha.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);Vk(r.type,j_(n.parameters[r.parameterIndex]),e.type,void 0,t)}}else if(i){let n=!1;for(const{name:e}of t.parameters)if(E_(e)&&HM(e,i,r.parameterName)){n=!0;break}n||Jo(e.parameterName,ha.Cannot_find_parameter_0,r.parameterName)}}(n);case 187:return function(e){Hy(e)}(n);case 188:return function(e){g(e.members,az),a(function(){const t=uS(e);cJ(t,t.symbol),YM(e),QM(e)})}(n);case 189:return function(e){az(e.elementType)}(n);case 190:return function(e){let t=!1,n=!1;for(const r of e.elements){let e=Gv(r);if(8&e){const t=VS(r.type);if(!QC(t)){Jo(r,ha.A_rest_element_type_must_be_an_array_type);break}(WC(t)||fw(t)&&4&t.target.combinedFlags)&&(e|=4)}if(4&e){if(n){Wq(r,ha.A_rest_element_cannot_follow_another_rest_element);break}n=!0}else if(2&e){if(n){Wq(r,ha.An_optional_element_cannot_follow_a_rest_element);break}t=!0}else if(1&e&&t){Wq(r,ha.A_required_element_cannot_follow_an_optional_element);break}}g(e.elements,az),VS(e)}(n);case 193:case 194:return function(e){g(e.types,az),VS(e)}(n);case 197:case 191:case 192:return az(n.type);case 198:return function(e){RS(e)}(n);case 199:return dR(n);case 195:return function(e){sO(e,az)}(n);case 196:return function(e){yc(e,e=>e.parent&&195===e.parent.kind&&e.parent.extendsType===e)||Wq(e,ha.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),az(e.typeParameter);const t=xs(e.typeParameter);if(t.declarations&&t.declarations.length>1){const e=ca(t);if(!e.typeParametersChecked){e.typeParametersChecked=!0;const n=Eu(t),r=td(t,169);if(!EJ(r,[n],e=>[e])){const e=dc(t);for(const t of r)Jo(t.name,ha.All_declarations_of_0_must_have_identical_constraints,e)}}}RR(e)}(n);case 204:return function(e){for(const t of e.templateSpans)az(t.type),Vk(VS(t.type),vn,t.type);VS(e)}(n);case 206:return function(e){az(e.argument),e.attributes&&EV(e.attributes,Wq),lR(e)}(n);case 203:return function(e){e.dotDotDotToken&&e.questionToken&&Wq(e,ha.A_tuple_member_cannot_be_both_optional_and_rest),191===e.type.kind&&Wq(e.type,ha.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type),192===e.type.kind&&Wq(e.type,ha.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type),az(e.type),VS(e)}(n);case 329:return function(e){const t=Xg(e);if(!t||!bF(t)&&!JE(t))return void Jo(t,ha.JSDoc_0_is_not_attached_to_a_class,kc(e.tagName));const n=dl(t).filter(OP);gn.assert(n.length>0),n.length>1&&Jo(n[1],ha.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);const r=jR(e.class.expression),i=wh(t);if(i){const t=jR(i.expression);t&&r.escapedText!==t.escapedText&&Jo(r,ha.JSDoc_0_1_does_not_match_the_extends_2_clause,kc(e.tagName),kc(r),kc(t))}}(n);case 330:return function(e){const t=Xg(e);t&&(bF(t)||JE(t))||Jo(t,ha.JSDoc_0_is_not_attached_to_a_class,kc(e.tagName))}(n);case 347:case 339:case 341:return function(e){e.typeExpression||Jo(e.name,ha.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),e.name&&wJ(e.name,ha.Type_alias_name_cannot_be_0),az(e.typeExpression),NJ(hl(e))}(n);case 346:return function(e){az(e.constraint);for(const t of e.typeParameters)az(t)}(n);case 345:return function(e){az(e.typeExpression)}(n);case 325:case 326:case 327:return function(e){e.name&&wz(e.name,!0)}(n);case 342:case 349:return function(e){az(e.typeExpression)}(n);case 318:!function(e){a(function(){e.type||Og(e)||Qw(e,wt)}),GM(e)}(n);case 316:case 315:case 313:case 314:case 323:return cz(n),void sO(n,az);case 319:return void function(e){cz(e),az(e.type);const{parent:t}=e;if(AD(t)&&DP(t.parent))return void(Te(t.parent.parameters)!==t&&Jo(e,ha.A_rest_parameter_must_be_last_in_a_parameter_list));hP(t)||Jo(e,ha.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const n=e.parent.parent;if(!KP(n))return void Jo(e,ha.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const r=$g(n);if(!r)return;const i=Gg(n);i&&Te(i.parameters).symbol===r||Jo(e,ha.A_rest_parameter_must_be_last_in_a_parameter_list)}(n);case 310:return az(n.type);case 334:case 336:case 335:return function(e){const t=Qg(e);t&&t_(t)&&Jo(e,ha.An_accessibility_modifier_cannot_be_used_with_a_private_identifier)}(n);case 351:return function(e){az(e.typeExpression);const t=Xg(e);if(t){const e=fl(t,nA);if(m(e)>1)for(let t=1;t{var i;298!==e.kind||n||(void 0===t?t=e:(Wq(e,ha.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0)),297===e.kind&&a((i=e,()=>{const e=WM(i.expression);gM(r,e)||tT(e,r,i.expression,void 0)})),g(e.statements,az),E.noFallthroughCasesInSwitch&&e.fallthroughFlowNode&&fF(e.fallthroughFlowNode)&&Jo(e,ha.Fallthrough_case_in_switch)}),e.caseBlock.locals&&RR(e.caseBlock)}(n);case 257:return function(e){Hq(e)||yc(e.parent,t=>__(t)?"quit":257===t.kind&&t.label.escapedText===e.label.escapedText&&(Wq(e.label,ha.Duplicate_label_0,rp(e.label)),!0)),az(e.statement)}(n);case 258:return sJ(n);case 259:return function(e){Hq(e),eB(e.tryBlock);const t=e.catchClause;if(t){if(t.variableDeclaration){const e=t.variableDeclaration;uB(e);const n=xv(e);if(n){const e=VS(n);!e||3&e.flags||Uq(n,ha.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified)}else if(e.initializer)Uq(e.initializer,ha.Catch_clause_variable_cannot_have_an_initializer);else{const e=t.block.locals;e&&ud(t.locals,t=>{const n=e.get(t);(null==n?void 0:n.valueDeclaration)&&2&n.flags&&Wq(n.valueDeclaration,ha.Cannot_redeclare_identifier_0_in_catch_clause,Sc(t))})}}eB(t.block)}e.finallyBlock&&eB(e.finallyBlock)}(n);case 261:return fB(n);case 209:return gB(n);case 264:return function(e){const t=T(e.modifiers,ID);B&&t&&X(e.members,e=>Mv(e)&&t_(e))&&Wq(t,ha.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator),e.name||Lv(e,2048)||Uq(e,ha.A_class_declaration_without_the_default_modifier_must_have_a_name),PJ(e),g(e.members,az),RR(e)}(n);case 265:return JJ(n);case 266:return function(e){if(vq(e),wJ(e.name,ha.Type_alias_name_cannot_be_0),zq(e.parent)||Wq(e,ha._0_declarations_can_only_be_declared_inside_a_block,"type"),gR(e),NJ(e.typeParameters),141===e.type.kind){const t=m(e.typeParameters);(0===t?"BuiltinIteratorReturn"===e.name.escapedText:1===t&&_J.has(e.name.escapedText))||Jo(e.type,ha.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types)}else az(e.type),RR(e)}(n);case 267:return WJ(n);case 307:return function(e){mD(e.name)&&Jo(e,ha.An_enum_member_cannot_be_named_with_a_private_identifier),e.initializer&&WM(e.initializer)}(n);case 268:return $J(n);case 273:return ez(n);case 272:return function(e){if(!nz(e,Mm(e)?ha.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:ha.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)&&(vq(e),!E.erasableSyntaxOnly||33554432&e.flags||Jo(e,ha.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled),Om(e)||HJ(e)))if(YJ(e),xP(e,6),284!==e.moduleReference.kind){const t=$a(xs(e));if(t!==vt){const n=Ka(t);if(111551&n){const t=mb(e.moduleReference);1920&ts(t,112575).flags||Jo(t,ha.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,Bp(t))}788968&n&&wJ(e.name,ha.Import_name_cannot_be_0)}e.isTypeOnly&&Wq(e,ha.An_import_alias_cannot_use_import_type)}else!(5<=L&&L<=99)||e.isTypeOnly||33554432&e.flags||Wq(e,ha.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(n);case 279:return tz(n);case 278:return function(t){if(nz(t,t.isExportEquals?ha.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:ha.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration))return;!E.erasableSyntaxOnly||!t.isExportEquals||33554432&t.flags||Jo(t,ha.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled);const n=308===t.parent.kind?t.parent:t.parent.parent;if(268===n.kind&&!mp(n))return void(t.isExportEquals?Jo(t,ha.An_export_assignment_cannot_be_used_in_a_namespace):Jo(t,ha.A_default_export_can_only_be_used_in_an_ECMAScript_style_module));!vq(t)&&Av(t)&&Uq(t,ha.An_export_assignment_cannot_have_modifiers);const r=xv(t);r&&Vk(kM(t.expression),VS(r),t.expression);const i=!t.isExportEquals&&!(33554432&t.flags)&&E.verbatimModuleSyntax&&1===e.getEmitModuleFormatOfFile(wd(t));if(80===t.expression.kind){const e=t.expression,n=Ps(ts(e,-1,!0,!0,t));if(n){xP(t,3);const r=Ya(n,111551);if(111551&Ka(n)?(kM(e),i||33554432&t.flags||!E.verbatimModuleSyntax||!r||Jo(e,t.isExportEquals?ha.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:ha.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,kc(e))):i||33554432&t.flags||!E.verbatimModuleSyntax||Jo(e,t.isExportEquals?ha.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:ha.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,kc(e)),!i&&!(33554432&t.flags)&&FS(E)&&!(111551&n.flags)){const i=Ka(n,!1,!0);!(2097152&n.flags&&788968&i)||111551&i||r&&wd(r)===wd(t)?r&&wd(r)!==wd(t)&&ga(Jo(e,t.isExportEquals?ha._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:ha._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,kc(e),Le),r,kc(e)):Jo(e,t.isExportEquals?ha._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:ha._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,kc(e),Le)}}else kM(e);jS(E)&&$c(e,!0)}else kM(t.expression);i&&Jo(t,zo(t)),iz(n),33554432&t.flags&&!fb(t.expression)&&Wq(t.expression,ha.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),t.isExportEquals&&(L>=5&&200!==L&&(33554432&t.flags&&99===e.getImpliedNodeFormatForEmit(wd(t))||!(33554432&t.flags)&&1!==e.getImpliedNodeFormatForEmit(wd(t)))?Wq(t,ha.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):4!==L||33554432&t.flags||Wq(t,ha.Export_assignment_is_not_supported_when_module_flag_is_system))}(n);case 243:case 260:return void Hq(n);case 283:(function(e){LR(e)})(n)}}(n),r=i}}function sz(e){nt(e)&&g(e,e=>{Vu(e)&&az(e)})}function cz(e){if(!Mm(e))if(wP(e)||CP(e)){const t=ja(wP(e)?54:58),n=e.postfix?ha._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:ha._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1,r=VS(e.type);Wq(e,n,t,mc(CP(e)&&r!==cn&&r!==rn?zb(le([r,Lt],e.postfix?void 0:zt)):r))}else Wq(e,ha.JSDoc_types_can_only_be_used_inside_documentation_comments)}function lz(e){const t=la(wd(e));1&t.flags?gn.assert(!t.deferredNodes,"A type-checked file should have no deferred nodes."):(t.deferredNodes||(t.deferredNodes=new Set),t.deferredNodes.add(e))}function _z(e){const t=la(e);t.deferredNodes&&t.deferredNodes.forEach(uz),t.deferredNodes=void 0}function uz(e){var t,n;null==(t=Yn)||t.push(Yn.Phase.Check,"checkDeferredNode",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath});const o=r;switch(r=e,f=0,e.kind){case 214:case 215:case 216:case 171:case 287:WO(e);break;case 219:case 220:case 175:case 174:!function(e){gn.assert(175!==e.kind||Kf(e));const t=zh(e),n=ch(e);if(Hj(e,n),e.body)if(kv(e)||ah(Rg(e)),242===e.body.kind)az(e.body);else{const r=WM(e.body),i=n&&tJ(n,t);i&&oJ(e,i,e.body,e.body,r)}}(e);break;case 178:case 179:rR(e);break;case 232:!function(e){g(e.members,az),RR(e)}(e);break;case 169:!function(e){var t,n;if(xF(e.parent)||y_(e.parent)||SF(e.parent)){const r=Eu(xs(e)),o=24576&bC(r);if(o){const a=xs(e.parent);if(!SF(e.parent)||48&Tx(Pu(a))){if(8192===o||16384===o){null==(t=Yn)||t.push(Yn.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:Ab(Pu(a)),id:Ab(r)});const s=pC(a,r,16384===o?Un:qn),c=pC(a,r,16384===o?qn:Un),l=r;i=r,Vk(s,c,e,ha.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),i=l,null==(n=Yn)||n.pop()}}else Jo(e,ha.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types)}}}(e);break;case 286:!function(e){VI(e)}(e);break;case 285:!function(e){VI(e.openingElement),xI(e.closingElement.tagName)?NI(e.closingElement):WM(e.closingElement.tagName),TI(e)}(e);break;case 217:case 235:case 218:!function(e){const{type:t}=QL(e),n=wE(e)?t:e,r=la(e);gn.assertIsDefined(r.assertionExpressionType);const i=Rw(cw(r.assertionExpressionType)),o=VS(t);nl(o)||a(()=>{const e=Hw(i);qk(o,e)||tT(i,o,n,ha.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)})}(e);break;case 223:WM(e.expression);break;case 227:kb(e)&&WO(e)}r=o,null==(n=Yn)||n.pop()}function dz(t,n){var r,i;null==(r=Yn)||r.push(Yn.Phase.Check,n?"checkSourceFileNodes":"checkSourceFile",{path:t.path},!0);const o=n?"beforeCheckNodes":"beforeCheck",s=n?"afterCheckNodes":"afterCheck";ar(o),n?function(t,n){const r=la(t);if(!(1&r.flags)){if(yT(t,E,e))return;Kq(t),I(so),I(co),I(lo),I(_o),I(uo),g(n,az),_z(t),(r.potentialThisCollisions||(r.potentialThisCollisions=[])).push(...so),(r.potentialNewTargetCollisions||(r.potentialNewTargetCollisions=[])).push(...co),(r.potentialWeakMapSetCollisions||(r.potentialWeakMapSetCollisions=[])).push(...lo),(r.potentialReflectCollisions||(r.potentialReflectCollisions=[])).push(..._o),(r.potentialUnusedRenamedBindingElementsInTypes||(r.potentialUnusedRenamedBindingElementsInTypes=[])).push(...uo),r.flags|=8388608;for(const e of n){la(e).flags|=8388608}}}(t,n):function(t){const n=la(t);if(!(1&n.flags)){if(yT(t,E,e))return;Kq(t),I(so),I(co),I(lo),I(_o),I(uo),8388608&n.flags&&(so=n.potentialThisCollisions,co=n.potentialNewTargetCollisions,lo=n.potentialWeakMapSetCollisions,_o=n.potentialReflectCollisions,uo=n.potentialUnusedRenamedBindingElementsInTypes),g(t.statements,az),az(t.endOfFileToken),_z(t),sf(t)&&RR(t),a(()=>{t.isDeclarationFile||!E.noUnusedLocals&&!E.noUnusedParameters||BR(fz(t),(e,t,n)=>{!Cd(e)&&pz(t,!!(33554432&e.flags))&&ho.add(n)}),t.isDeclarationFile||function(){var e;for(const t of uo)if(!(null==(e=xs(t))?void 0:e.isReferenced)){const e=lc(t);gn.assert(iy(e),"Only parameter declaration should be checked here");const n=Wp(t.name,ha._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation,Bp(t.name),Bp(t.propertyName));e.type||fT(n,rS(wd(e),e.end,0,ha.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here,Bp(t.propertyName))),ho.add(n)}}()}),sf(t)&&iz(t),so.length&&(g(so,nB),I(so)),co.length&&(g(co,iB),I(co)),lo.length&&(g(lo,oB),I(lo)),_o.length&&(g(_o,aB),I(_o)),n.flags|=1}}(t),ar(s),sr("Check",o,s),null==(i=Yn)||i.pop()}function pz(e,t){if(t)return!1;switch(e){case 0:return!!E.noUnusedLocals;case 1:return!!E.noUnusedParameters;default:return gn.assertNever(e)}}function fz(e){return Si.get(e.path)||p}function mz(n,r,i){try{return t=r,function(t,n){if(t){gz();const e=ho.getGlobalDiagnostics(),r=e.length;yz(t,n);const i=ho.getDiagnostics(t.fileName);if(n)return i;const o=ho.getGlobalDiagnostics();if(o!==e){return Y(ce(e,o,_S),i)}return 0===r&&o.length>0?Y(o,i):i}return g(e.getSourceFiles(),e=>yz(e)),ho.getDiagnostics()}(n,i)}finally{t=void 0}}function gz(){for(const e of o)e();o=[]}function yz(e,t){gz();const n=a;a=e=>e(),dz(e,t),a=n}function vz(e){for(;167===e.parent.kind;)e=e.parent;return 184===e.parent.kind}function bz(e,t){let n,r=rm(e);for(;r&&!(n=t(r));)r=rm(r);return n}function xz(e,t){return!!bz(e,e=>e===t)}function Sz(e){return void 0!==function(e){for(;167===e.parent.kind;)e=e.parent;return 272===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:278===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function kz(e){if(gh(e))return Ts(e.parent);if(Mm(e)&&212===e.parent.kind&&e.parent===e.parent.parent.left&&!mD(e)&&!vP(e)&&!function(e){if(110===e.expression.kind){const t=sm(e,!1,!1);if(__(t)){const e=cA(t);if(e){const t=uA(e,UA(e,void 0));return t&&!el(t)}}}}(e.parent)){const t=function(e){switch(cg(e.parent.parent)){case 1:case 3:return Ts(e.parent);case 5:if(bE(e.parent)&&Ox(e.parent)===e)return;case 4:case 2:return xs(e.parent.parent)}}(e);if(t)return t}if(278===e.parent.kind&&fb(e)){const t=ts(e,2998271,!0);if(t&&t!==vt)return t}else if(s_(e)&&Sz(e)){const t=Ph(e,272);return gn.assert(void 0!==t),Za(e,!0)}if(s_(e)){const t=function(e){let t=e.parent;for(;ED(t);)e=t,t=t.parent;if(t&&206===t.kind&&t.qualifier===e)return t}(e);if(t){VS(t);const n=la(e).resolvedSymbol;return n===vt?void 0:n}}for(;Sb(e);)e=e.parent;if(function(e){for(;212===e.parent.kind;)e=e.parent;return 234===e.parent.kind}(e)){let t=0;234===e.parent.kind?(t=If(e)?788968:111551,pb(e.parent)&&(t|=111551)):t=1920,t|=2097152;const n=fb(e)?ts(e,t,!0):void 0;if(n)return n}if(342===e.parent.kind)return $g(e.parent);if(169===e.parent.kind&&346===e.parent.parent.kind){gn.assert(!Mm(e));const t=Zg(e.parent);return t&&t.symbol}if(Nm(e)){if(Od(e))return;const t=yc(e,an(Vu,yP,vP)),n=t?901119:111551;if(80===e.kind){if(wm(e)&&xI(e)){const t=NI(e.parent);return t===vt?void 0:t}const r=ts(e,n,!0,!0,Gg(e));if(!r&&t){const t=yc(e,an(y_,xF));if(t)return wz(e,!0,xs(t))}if(r&&t){const t=Qg(e);if(t&&fP(t)&&t===r.valueDeclaration)return ts(e,n,!0,!0,wd(t))||r}return r}if(mD(e))return gO(e);if(212===e.kind||167===e.kind){const n=la(e);return n.resolvedSymbol?n.resolvedSymbol:(212===e.kind?(lO(e,0),n.resolvedSymbol||(n.resolvedSymbol=Tz(kM(e.expression),rx(e.name)))):_O(e,0),!n.resolvedSymbol&&t&&ED(e)?wz(e):n.resolvedSymbol)}if(vP(e))return wz(e)}else if(s_(e)&&vz(e)){const t=ts(e,184===e.parent.kind?788968:1920,!0,!0);return t&&t!==vt?t:wy(e)}return 183===e.parent.kind?ts(e,1,!0):void 0}function Tz(e,t){const n=ug(e,t);if(n.length&&e.members){const t=Jh(Lp(e).members);if(n===Gm(e))return t;if(t){const r=ca(t),i=O(U(n,e=>e.declaration),pJ).join(",");if(r.filteredIndexSymbolCache||(r.filteredIndexSymbolCache=new Map),r.filteredIndexSymbolCache.has(i))return r.filteredIndexSymbolCache.get(i);{const t=Xo(131072,"__index");return t.declarations=U(n,e=>e.declaration),t.parent=e.aliasSymbol?e.aliasSymbol:e.symbol?e.symbol:Nz(t.declarations[0].parent),r.filteredIndexSymbolCache.set(i,t),t}}}}function wz(e,t,n){if(s_(e)){const r=901119;let i=ts(e,r,t,!0,Gg(e));if(!i&&fD(e)&&n&&(i=bs(ua(gs(n),e.escapedText,r))),i)return i}const r=fD(e)?n:wz(e.left,t,n),i=fD(e)?e.escapedText:e.right.escapedText;if(r){const e=111551&r.flags&&xm(j_(r),"prototype");return xm(e?j_(e):Pu(r),i)}}function Nz(e,t){if(mP(e))return fO(e)?bs(e.symbol):void 0;const{parent:n}=e,r=n.parent;if(!(67108864&e.flags)){if(yJ(e)){const t=xs(n);return Wl(e.parent)&&e.parent.propertyName===e?gI(t):t}if(yh(e))return xs(n.parent);if(80===e.kind){if(Sz(e))return kz(e);if(209===n.kind&&207===r.kind&&e===n.propertyName){const t=xm(Dz(r),e.escapedText);if(t)return t}else if($E(n)&&n.name===e)return 105===n.keywordToken&&"target"===kc(e)?ij(n).symbol:102===n.keywordToken&&"meta"===kc(e)?iv().members.get("meta"):void 0}switch(e.kind){case 80:case 81:case 212:case 167:if(!yv(e))return kz(e);case 110:const i=sm(e,!1,!1);if(__(i)){const e=Rg(i);if(e.thisParameter)return e.thisParameter}if(Dm(e))return WM(e).symbol;case 198:return RS(e).symbol;case 108:return WM(e).symbol;case 137:const o=e.parent;return o&&177===o.kind?o.parent.symbol:void 0;case 11:case 15:if(Pm(e.parent.parent)&&Am(e.parent.parent)===e||(273===e.parent.kind||279===e.parent.kind)&&e.parent.moduleSpecifier===e||Mm(e)&&iA(e.parent)&&e.parent.moduleSpecifier===e||Mm(e)&&qm(e.parent,!1)||hf(e.parent)||uE(e.parent)&&vf(e.parent.parent)&&e.parent.parent.argument===e.parent)return rs(e,e,t);if(SE(n)&&lg(n)&&n.arguments[1]===e)return xs(n);case 9:const a=xE(n)?n.argumentExpression===e?qM(n.expression):void 0:uE(n)&&lE(r)?VS(r.objectType):void 0;return a&&xm(a,xc(e.text));case 90:case 100:case 39:case 86:return Ts(e.parent);case 206:return vf(e)?Nz(e.argument.literal,t):void 0;case 95:return JF(e.parent)?gn.checkDefined(e.parent.symbol):void 0;case 102:if($E(e.parent)&&"defer"===e.parent.name.escapedText)return;case 105:return $E(e.parent)?rj(e.parent).symbol:void 0;case 104:if(LE(e.parent)){const t=qM(e.parent.right),n=_M(t);return(null==n?void 0:n.symbol)??t.symbol}return;case 237:return WM(e).symbol;case 296:if(wm(e)&&xI(e)){const t=NI(e.parent);return t===vt?void 0:t}default:return}}}function Dz(e){if(mP(e)&&!fO(e))return Ft;if(67108864&e.flags)return Ft;const t=_b(e),n=t&&vu(xs(t.class));if(If(e)){const t=VS(e);return n?Pd(t,n.thisType):t}if(Nm(e))return Fz(e);if(n&&!t.isImplements){const e=ve(mu(n));return e?Pd(e,n.thisType):Ft}if(YT(e)){return Pu(xs(e))}if(80===(r=e).kind&&YT(r.parent)&&Ac(r.parent)===r){const t=Nz(e);return t?Pu(t):Ft}var r;if(hE(e))return Al(e,!0,0)||Ft;if(hu(e)){const t=xs(e);return t?j_(t):Ft}if(yJ(e)){const t=Nz(e);return t?j_(t):Ft}if(E_(e))return Al(e.parent,!0,0)||Ft;if(Sz(e)){const t=Nz(e);if(t){const e=Pu(t);return nl(e)?j_(t):e}}return $E(e.parent)&&e.parent.keywordToken===e.kind?rj(e.parent):OF(e)?av(!1):Ft}function Ez(e){if(gn.assert(211===e.kind||210===e.kind),251===e.parent.kind){return fM(e,TB(e.parent)||Ft)}if(227===e.parent.kind){return fM(e,qM(e.parent.right)||Ft)}if(304===e.parent.kind){const t=st(e.parent.parent,vE);return dM(t,Ez(t)||Ft,op(t.properties,e.parent))}const t=st(e.parent,yE),n=Ez(t)||Ft,r=CB(65,n,Lt,e.parent)||Ft;return pM(t,n,t.elements.indexOf(e),r)}function Fz(e){return bb(e)&&(e=e.parent),SS(qM(e))}function Pz(e){const t=Ts(e.parent);return jv(e)?j_(t):Pu(t)}function Az(e){const t=e.name;switch(t.kind){case 80:return TS(kc(t));case 9:case 11:return TS(t.text);case 168:const e=uI(t);return aM(e,12288)?e:Ut;default:return gn.fail("Unsupported property name.")}}function Iz(e){const t=nd(Qp(e=Pf(e))),n=Cm(e,0).length?Xn:Cm(e,1).length?Qn:void 0;return n&&g(Qp(n),e=>{t.has(e.escapedName)||t.set(e.escapedName,e)}),Vs(t)}function Oz(e){return 0!==Cm(e,0).length||0!==Cm(e,1).length}function Lz(e){if(Yl(e))return!1;const t=bc(e,fD);if(!t)return!1;const n=t.parent;if(!n)return!1;return!((bE(n)||uP(n))&&n.name===t)&&cq(t)===Ie}function jz(e,t){var n;const r=bc(e,fD);if(r){let e=cq(r,function(e){return du(e.parent)&&e===e.parent.name}(r));if(e){if(1048576&e.flags){const n=bs(e.exportSymbol);if(!t&&944&n.flags&&!(3&n.flags))return;e=n}const i=Cs(e);if(i){if(512&i.flags&&308===(null==(n=i.valueDeclaration)?void 0:n.kind)){const e=i.valueDeclaration;return e!==wd(r)?void 0:e}return yc(r.parent,e=>du(e)&&xs(e)===i)}}}}function Mz(e){const t=uN(e);if(t)return t;const n=bc(e,fD);if(n){const e=function(e){const t=la(e).resolvedSymbol;if(t&&t!==vt)return t;return ze(e,e.escapedText,3257279,void 0,!0,void 0)}(n);if(Va(e,111551)&&!Ya(e,111551))return Ca(e)}}function Rz(e){if(418&e.flags&&e.valueDeclaration&&!mP(e.valueDeclaration)){const t=ca(e);if(void 0===t.isDeclarationWithCollidingName){const n=Mp(e.valueDeclaration);if(Ed(n)||function(e){return e.valueDeclaration&&hE(e.valueDeclaration)&&300===lc(e.valueDeclaration).parent.kind}(e))if(ze(n.parent,e.escapedName,111551,void 0,!1))t.isDeclarationWithCollidingName=!0;else if(Qz(e.valueDeclaration,16384)){const r=Qz(e.valueDeclaration,32768),i=Z_(n,!1),o=242===n.kind&&Z_(n.parent,!1);t.isDeclarationWithCollidingName=!(vp(n)||r&&(i||o))}else t.isDeclarationWithCollidingName=!1}return t.isDeclarationWithCollidingName}return!1}function Bz(e){if(!Yl(e)){const t=bc(e,fD);if(t){const e=cq(t);if(e&&Rz(e))return e.valueDeclaration}}}function Jz(e){const t=bc(e,hu);if(t){const e=xs(t);if(e)return Rz(e)}return!1}function zz(e){switch(gn.assert(je),e.kind){case 272:return Uz(xs(e));case 274:case 275:case 277:case 282:const t=xs(e);return!!t&&Uz(t,!0);case 279:const n=e.exportClause;return!!n&&(MF(n)||X(n.elements,zz));case 278:return!e.expression||80!==e.expression.kind||Uz(xs(e),!0)}return!1}function qz(e){const t=bc(e,DF);if(void 0===t||308!==t.parent.kind||!Om(t))return!1;return Uz(xs(t))&&t.moduleReference&&!Od(t.moduleReference)}function Uz(e,t){if(!e)return!1;const n=wd(e.valueDeclaration);cs(n&&xs(n));const r=Ps($a(e));return r===vt?!t||!Ya(e):!!(111551&Ka(e,t,!0))&&(MS(E)||!Vz(r))}function Vz(e){return lM(e)||!!e.constEnumOnlyModule}function Wz(e,t){if(gn.assert(je),wa(e)){const t=xs(e),n=t&&ca(t);if(null==n?void 0:n.referenced)return!0;const r=ca(t).aliasTarget;if(r&&32&Kv(e)&&111551&Ka(r)&&(MS(E)||!Vz(r)))return!0}return!!t&&!!sO(e,e=>Wz(e,t))}function $z(e){if(Ld(e.body)){if(Ou(e)||Iu(e))return!1;const t=Vg(xs(e));return t.length>1||1===t.length&&t[0].declaration!==e}return!1}function Kz(e,t){return(function(e,t){if(!V||Ng(e)||KP(e)||!e.initializer)return!1;if(Lv(e,31))return!!t&&d_(t);return!0}(e,t)||function(e){return V&&Ng(e)&&(KP(e)||!e.initializer)&&Lv(e,31)}(e))&&!function(e){const t=mq(e);if(!t)return!1;const n=VS(t);return nl(n)||uT(n)}(e)}function Hz(e){const t=bc(e,e=>vF(e)||hF(e));if(!t)return!1;let n;if(hF(t)){if(t.type||!Mm(t)&&!tU(t))return!1;const e=Ym(t);if(!e||!pu(e))return!1;n=xs(e)}else n=xs(t);return!!(n&&16&n.flags|3)&&!!_d(gs(n),e=>111551&e.flags&&hC(e.valueDeclaration))}function Gz(e){const t=bc(e,vF);if(!t)return p;const n=xs(t);return n&&Qp(j_(n))||p}function Xz(e){var t;const n=e.id||0;return n<0||n>=Yi.length?0:(null==(t=Yi[n])?void 0:t.flags)||0}function Qz(e,t){return function(e,t){if(!E.noCheck&&xT(wd(e),E))return;const n=la(e);if(n.calculatedFlags&t)return;switch(t){case 16:case 32:return a(e);case 128:case 256:case 2097152:return o(e);case 512:case 8192:case 65536:case 262144:return c(e);case 536870912:return _(e);case 4096:case 32768:case 16384:return d(e);default:return gn.assertNever(t,`Unhandled node check flag calculation: ${gn.formatNodeCheckFlags(t)}`)}function r(e,t){const n=t(e,e.parent);if("skip"!==n)return n||cO(e,t)}function i(e){const n=la(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=2097536,a(e)}function o(e){r(e,i)}function a(e){la(e).calculatedFlags|=48,108===e.kind&&sA(e)}function s(e){const n=la(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=336384,_(e)}function c(e){r(e,s)}function l(e){return Nm(e)||dP(e.parent)&&(e.parent.objectAssignmentInitializer??e.parent.name)===e}function _(e){const t=la(e);if(t.calculatedFlags|=536870912,fD(e)&&(t.calculatedFlags|=49152,l(e)&&(!bE(e.parent)||e.parent.name!==e))){const t=zN(e);t&&t!==vt&&VP(e,t)}}function u(e){const n=la(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=53248,p(e)}function d(e){r(Mp(gh(e)?e.parent:e),u)}function p(e){_(e),FD(e)&&uI(e),mD(e)&&h_(e.parent)&&eR(e.parent)}}(e,t),!!(Xz(e)&t)}function Yz(e){return zJ(e.parent),la(e).enumMemberValue??kC(void 0)}function Zz(e){switch(e.kind){case 307:case 212:case 213:return!0}return!1}function eq(e){if(307===e.kind)return Yz(e).value;la(e).resolvedSymbol||kM(e);const t=la(e).resolvedSymbol||(fb(e)?ts(e,111551,!0):void 0);if(t&&8&t.flags){const e=t.valueDeclaration;if(lf(e.parent))return Yz(e).value}}function tq(e){return!!(524288&e.flags)&&Cm(e,0).length>0}function nq(e,t){var n;const r=bc(e,s_);if(!r)return 0;if(t&&!(t=bc(t)))return 0;let i=!1;if(ED(r)){const e=ts(mb(r),111551,!0,!0,t);i=!!(null==(n=null==e?void 0:e.declarations)?void 0:n.every(Hl))}const o=ts(r,111551,!0,!0,t),a=o&&2097152&o.flags?$a(o):o;i||(i=!(!o||!Ya(o,111551)));const s=ts(r,788968,!0,!0,t),c=s&&2097152&s.flags?$a(s):s;if(o||i||(i=!(!s||!Ya(s,788968))),a&&a===c){const e=pv(!1);if(e&&a===e)return 9;const t=j_(a);if(t&&au(t))return i?10:1}if(!c)return i?11:0;const l=Pu(c);return nl(l)?i?11:0:3&l.flags?11:aM(l,245760)?2:aM(l,528)?6:aM(l,296)?3:aM(l,2112)?4:aM(l,402653316)?5:fw(l)?7:aM(l,12288)?8:tq(l)?10:WC(l)?7:11}function rq(e,t,n,r,i){const o=bc(e,FC);if(!o)return kw.createToken(133);const a=xs(o);return ue.serializeTypeForDeclaration(o,a,t,1024|n,r,i)}function iq(e){const t=179===(e=bc(e,bl)).kind?178:179,n=ed(xs(e),t);return{firstAccessor:n&&n.pos{switch(e.kind){case 261:case 170:case 209:case 173:case 304:case 305:case 307:case 211:case 263:case 219:case 220:case 264:case 232:case 267:case 175:case 178:case 179:case 268:return!0}return!1})}}}function uq(e){return!!(_f(e)||hF(e)&&tU(e))&&kS(j_(xs(e)))}function dq(e,t){return function(e,t,n){const r=1056&e.flags?ue.symbolToExpression(e.symbol,111551,t,void 0,void 0,n):e===Gt?kw.createTrue():e===$t&&kw.createFalse();if(r)return r;const i=e.value;return"object"==typeof i?kw.createBigIntLiteral(i):"string"==typeof i?kw.createStringLiteral(i):i<0?kw.createPrefixUnaryExpression(41,kw.createNumericLiteral(-i)):kw.createNumericLiteral(i)}(j_(xs(e)),e,t)}function pq(e){return e?(Oo(e),wd(e).localJsxFactory||oi):oi}function fq(e){if(e){const t=wd(e);if(t){if(t.localJsxFragmentFactory)return t.localJsxFragmentFactory;const e=t.pragmas.get("jsxfrag"),n=nt(e)?e[0]:e;if(n)return t.localJsxFragmentFactory=dO(n.arguments.factory,A),t.localJsxFragmentFactory}}if(E.jsxFragmentFactory)return dO(E.jsxFragmentFactory,A)}function mq(e){const t=xv(e);if(t)return t;if(170===e.kind&&179===e.parent.kind){const t=iq(e.parent).getAccessor;if(t)return kv(t)}}function gq(e){const t=268===e.kind?at(e.name,QN):Eg(e),n=os(t,t,void 0);if(n)return ed(n,308)}function hq(e,t){if(E.importHelpers){const n=wd(e);if(Tp(n,E)&&!(33554432&e.flags)){const r=function(e,t){const n=la(e);n.externalHelpersModule||(n.externalHelpersModule=as(function(e){gn.assert(E.importHelpers,"Expected importHelpers to be enabled");const t=e.imports[0];return gn.assert(t&&sy(t)&&"tslib"===t.text,"Expected sourceFile.imports[0] to be the synthesized tslib import"),t}(e),Xu,ha.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,t)||vt);return n.externalHelpersModule}(n,e);if(r!==vt){const n=ca(r);if(n.requestedExternalEmitHelpers??(n.requestedExternalEmitHelpers=0),(n.requestedExternalEmitHelpers&t)!==t){const i=t&~n.requestedExternalEmitHelpers;for(let t=1;t<=16777216;t<<=1)if(i&t)for(const n of yq(t)){const i=Wa(ua(hs(r),xc(n),111551));i?524288&t?X(Vg(i),e=>gj(e)>3)||Jo(e,ha.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,Xu,n,4):1048576&t?X(Vg(i),e=>gj(e)>4)||Jo(e,ha.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,Xu,n,5):1024&t&&(X(Vg(i),e=>gj(e)>2)||Jo(e,ha.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,Xu,n,3)):Jo(e,ha.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,Xu,n)}}n.requestedExternalEmitHelpers|=t}}}}function yq(e){switch(e){case 1:return["__extends"];case 2:return["__assign"];case 4:return["__rest"];case 8:return B?["__decorate"]:["__esDecorate","__runInitializers"];case 16:return["__metadata"];case 32:return["__param"];case 64:return["__awaiter"];case 128:return["__generator"];case 256:return["__values"];case 512:return["__read"];case 1024:return["__spreadArray"];case 2048:return["__await"];case 4096:return["__asyncGenerator"];case 8192:return["__asyncDelegator"];case 16384:return["__asyncValues"];case 32768:return["__exportStar"];case 65536:return["__importStar"];case 131072:return["__importDefault"];case 262144:return["__makeTemplateObject"];case 524288:return["__classPrivateFieldGet"];case 1048576:return["__classPrivateFieldSet"];case 2097152:return["__classPrivateFieldIn"];case 4194304:return["__setFunctionName"];case 8388608:return["__propKey"];case 16777216:return["__addDisposableResource","__disposeResources"];case 33554432:return["__rewriteRelativeImportExtension"];default:return gn.fail("Unrecognized helper")}}function vq(t){var n;const r=function(e){const t=function(e){return eI(e)?T(e.modifiers,ID):void 0}(e);return t&&Uq(t,ha.Decorators_are_not_valid_here)}(t)||function(e){if(!e.modifiers)return!1;const t=function(e){switch(e.kind){case 178:case 179:case 177:case 173:case 172:case 175:case 174:case 182:case 268:case 273:case 272:case 279:case 278:case 219:case 220:case 170:case 169:return;case 176:case 304:case 305:case 271:case 283:return T(e.modifiers,a_);default:if(269===e.parent.kind||308===e.parent.kind)return;switch(e.kind){case 263:return bq(e,134);case 264:case 186:return bq(e,128);case 232:case 265:case 266:return T(e.modifiers,a_);case 244:return 4&e.declarationList.flags?bq(e,135):T(e.modifiers,a_);case 267:return bq(e,87);default:gn.assertNever(e)}}}(e);return t&&Uq(t,ha.Modifiers_cannot_appear_here)}(t);if(void 0!==r)return r;if(AD(t)&&mv(t))return Uq(t,ha.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);const i=ZE(t)?7&t.declarationList.flags:0;let o,a,s,c,l,_=0,u=!1,d=!1;for(const r of t.modifiers)if(ID(r)){if(!vm(B,t,t.parent,t.parent.parent))return 175!==t.kind||Ld(t.body)?Uq(t,ha.Decorators_are_not_valid_here):Uq(t,ha.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(B&&(178===t.kind||179===t.kind)){const e=iq(t);if(Uv(e.firstAccessor)&&t===e.secondAccessor)return Uq(t,ha.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}if(-34849&_)return Wq(r,ha.Decorators_are_not_valid_here);if(d&&98303&_){gn.assertIsDefined(l);return!qq(wd(r))&&(fT(Jo(r,ha.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),Wp(l,ha.Decorator_used_before_export_here)),!0)}_|=32768,98303&_?32&_&&(u=!0):d=!0,l??(l=r)}else{if(148!==r.kind){if(172===t.kind||174===t.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_type_member,ja(r.kind));if(182===t.kind&&(126!==r.kind||!y_(t.parent)))return Wq(r,ha._0_modifier_cannot_appear_on_an_index_signature,ja(r.kind))}if(103!==r.kind&&147!==r.kind&&87!==r.kind&&169===t.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_type_parameter,ja(r.kind));switch(r.kind){case 87:{if(267!==t.kind&&169!==t.kind)return Wq(t,ha.A_class_member_cannot_have_the_0_keyword,ja(87));const e=QP(t.parent)&&Xg(t.parent)||t.parent;if(169===t.kind&&!(d_(e)||y_(e)||KD(e)||HD(e)||qD(e)||UD(e)||jD(e)))return Wq(r,ha._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class,ja(r.kind));break}case 164:if(16&_)return Wq(r,ha._0_modifier_already_seen,"override");if(128&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"override","declare");if(8&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"override","readonly");if(512&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"override","accessor");if(1024&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"override","async");_|=16,c=r;break;case 125:case 124:case 123:const d=Rc(tb(r.kind));if(7&_)return Wq(r,ha.Accessibility_modifier_already_seen);if(16&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,d,"override");if(256&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,d,"static");if(512&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,d,"accessor");if(8&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,d,"readonly");if(1024&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,d,"async");if(269===t.parent.kind||308===t.parent.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_module_or_namespace_element,d);if(64&_)return 123===r.kind?Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,d,"abstract"):Wq(r,ha._0_modifier_must_precede_1_modifier,d,"abstract");if(t_(t))return Wq(r,ha.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);_|=tb(r.kind);break;case 126:if(256&_)return Wq(r,ha._0_modifier_already_seen,"static");if(8&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"static","readonly");if(1024&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"static","async");if(512&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"static","accessor");if(269===t.parent.kind||308===t.parent.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(170===t.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_parameter,"static");if(64&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(16&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"static","override");_|=256,o=r;break;case 129:if(512&_)return Wq(r,ha._0_modifier_already_seen,"accessor");if(8&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"accessor","readonly");if(128&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"accessor","declare");if(173!==t.kind)return Wq(r,ha.accessor_modifier_can_only_appear_on_a_property_declaration);_|=512;break;case 148:if(8&_)return Wq(r,ha._0_modifier_already_seen,"readonly");if(173!==t.kind&&172!==t.kind&&182!==t.kind&&170!==t.kind)return Wq(r,ha.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);if(512&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"readonly","accessor");_|=8;break;case 95:if(E.verbatimModuleSyntax&&!(33554432&t.flags)&&266!==t.kind&&265!==t.kind&&268!==t.kind&&308===t.parent.kind&&1===e.getEmitModuleFormatOfFile(wd(t)))return Wq(r,ha.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(32&_)return Wq(r,ha._0_modifier_already_seen,"export");if(128&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"export","declare");if(64&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"export","abstract");if(1024&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"export","async");if(y_(t.parent))return Wq(r,ha._0_modifier_cannot_appear_on_class_elements_of_this_kind,"export");if(170===t.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_parameter,"export");if(4===i)return Wq(r,ha._0_modifier_cannot_appear_on_a_using_declaration,"export");if(6===i)return Wq(r,ha._0_modifier_cannot_appear_on_an_await_using_declaration,"export");_|=32;break;case 90:const p=308===t.parent.kind?t.parent:t.parent.parent;if(268===p.kind&&!mp(p))return Wq(r,ha.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);if(4===i)return Wq(r,ha._0_modifier_cannot_appear_on_a_using_declaration,"default");if(6===i)return Wq(r,ha._0_modifier_cannot_appear_on_an_await_using_declaration,"default");if(!(32&_))return Wq(r,ha._0_modifier_must_precede_1_modifier,"export","default");if(u)return Wq(l,ha.Decorators_are_not_valid_here);_|=2048;break;case 138:if(128&_)return Wq(r,ha._0_modifier_already_seen,"declare");if(1024&_)return Wq(r,ha._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(16&_)return Wq(r,ha._0_modifier_cannot_be_used_in_an_ambient_context,"override");if(y_(t.parent)&&!LD(t))return Wq(r,ha._0_modifier_cannot_appear_on_class_elements_of_this_kind,"declare");if(170===t.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_parameter,"declare");if(4===i)return Wq(r,ha._0_modifier_cannot_appear_on_a_using_declaration,"declare");if(6===i)return Wq(r,ha._0_modifier_cannot_appear_on_an_await_using_declaration,"declare");if(33554432&t.parent.flags&&269===t.parent.kind)return Wq(r,ha.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);if(t_(t))return Wq(r,ha._0_modifier_cannot_be_used_with_a_private_identifier,"declare");if(512&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"declare","accessor");_|=128,a=r;break;case 128:if(64&_)return Wq(r,ha._0_modifier_already_seen,"abstract");if(264!==t.kind&&186!==t.kind){if(175!==t.kind&&173!==t.kind&&178!==t.kind&&179!==t.kind)return Wq(r,ha.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(264!==t.parent.kind||!Lv(t.parent,64)){return Wq(r,173===t.kind?ha.Abstract_properties_can_only_appear_within_an_abstract_class:ha.Abstract_methods_can_only_appear_within_an_abstract_class)}if(256&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(2&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"private","abstract");if(1024&_&&s)return Wq(s,ha._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");if(16&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"abstract","override");if(512&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"abstract","accessor")}if(Fc(t)&&81===t.name.kind)return Wq(r,ha._0_modifier_cannot_be_used_with_a_private_identifier,"abstract");_|=64;break;case 134:if(1024&_)return Wq(r,ha._0_modifier_already_seen,"async");if(128&_||33554432&t.parent.flags)return Wq(r,ha._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(170===t.kind)return Wq(r,ha._0_modifier_cannot_appear_on_a_parameter,"async");if(64&_)return Wq(r,ha._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");_|=1024,s=r;break;case 103:case 147:{const e=103===r.kind?8192:16384,i=103===r.kind?"in":"out",o=QP(t.parent)&&(Xg(t.parent)||T(null==(n=Yg(t.parent))?void 0:n.tags,YP))||t.parent;if(169!==t.kind||o&&!(xF(o)||y_(o)||SF(o)||YP(o)))return Wq(r,ha._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias,i);if(_&e)return Wq(r,ha._0_modifier_already_seen,i);if(8192&e&&16384&_)return Wq(r,ha._0_modifier_must_precede_1_modifier,"in","out");_|=e;break}}}return 177===t.kind?256&_?Wq(o,ha._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):16&_?Wq(c,ha._0_modifier_cannot_appear_on_a_constructor_declaration,"override"):!!(1024&_)&&Wq(s,ha._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):(273===t.kind||272===t.kind)&&128&_?Wq(a,ha.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):170===t.kind&&31&_&&E_(t.name)?Wq(t,ha.A_parameter_property_may_not_be_declared_using_a_binding_pattern):170===t.kind&&31&_&&t.dotDotDotToken?Wq(t,ha.A_parameter_property_cannot_be_declared_using_a_rest_parameter):!!(1024&_)&&function(e,t){switch(e.kind){case 175:case 263:case 219:case 220:return!1}return Wq(t,ha._0_modifier_cannot_be_used_here,"async")}(t,s)}function bq(e,t){const n=T(e.modifiers,a_);return n&&n.kind!==t?n:void 0}function xq(e,t=ha.Trailing_comma_not_allowed){return!(!e||!e.hasTrailingComma)&&Vq(e[0],e.end-1,1,t)}function Sq(e,t){if(e&&0===e.length){const n=e.pos-1;return Vq(t,n,is(t.text,e.end)+1-n,ha.Type_parameter_list_cannot_be_empty)}return!1}function kq(e){if(A>=3){const t=e.body&&YE(e.body)&&DA(e.body.statements);if(t){const n=P(e.parameters,e=>!!e.initializer||E_(e.name)||$u(e));if(m(n)){g(n,e=>{fT(Jo(e,ha.This_parameter_is_not_allowed_with_use_strict_directive),Wp(t,ha.use_strict_directive_used_here))});const e=n.map((e,t)=>Wp(e,0===t?ha.Non_simple_parameter_declared_here:ha.and_here));return fT(Jo(t,ha.use_strict_directive_cannot_be_used_with_non_simple_parameter_list),...e),!0}}}return!1}function Tq(e){const t=wd(e);return vq(e)||Sq(e.typeParameters,t)||function(e){let t=!1;const n=e.length;for(let r=0;r1||e.typeParameters.hasTrailingComma||e.typeParameters[0].constraint)&&t&&Fo(t.fileName,[".mts",".cts"])&&Wq(e.typeParameters[0],ha.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);const{equalsGreaterThanToken:n}=e,r=Ha(t,n.pos).line,i=Ha(t,n.end).line;return r!==i&&Wq(n,ha.Line_terminator_not_permitted_before_arrow)}(e,t)||d_(e)&&kq(e)}function Cq(e,t){return xq(t)||function(e,t){if(t&&0===t.length){const n=wd(e),r=t.pos-1;return Vq(n,r,is(n.text,t.end)+1-r,ha.Type_argument_list_cannot_be_empty)}return!1}(e,t)}function wq(e){const t=e.types;if(xq(t))return!0;if(t&&0===t.length){const n=ja(e.token);return Vq(e,t.pos,0,ha._0_list_cannot_be_empty,n)}return X(t,Nq)}function Nq(e){return qE(e)&&ND(e.expression)&&e.typeArguments?Wq(e,ha.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments):Cq(e,e.typeArguments)}function Dq(e){if(168!==e.kind)return!1;const t=e;return 227===t.expression.kind&&28===t.expression.operatorToken.kind&&Wq(t.expression,ha.A_comma_expression_is_not_allowed_in_a_computed_property_name)}function Eq(e){if(e.asteriskToken){if(gn.assert(263===e.kind||219===e.kind||175===e.kind),33554432&e.flags)return Wq(e.asteriskToken,ha.Generators_are_not_allowed_in_an_ambient_context);if(!e.body)return Wq(e.asteriskToken,ha.An_overload_signature_cannot_be_declared_as_a_generator)}}function Fq(e,t){return!!e&&Wq(e,t)}function Pq(e,t){return!!e&&Wq(e,t)}function Aq(e){if(Hq(e))return!0;if(251===e.kind&&e.awaitModifier&&!(65536&e.flags)){const t=wd(e);if(lm(e)){if(!qq(t))switch(Tp(t,E)||ho.add(Wp(e.awaitModifier,ha.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)),L){case 100:case 101:case 102:case 199:if(1===t.impliedNodeFormat){ho.add(Wp(e.awaitModifier,ha.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));break}case 7:case 99:case 200:case 4:if(A>=4)break;default:ho.add(Wp(e.awaitModifier,ha.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher))}}else if(!qq(t)){const t=Wp(e.awaitModifier,ha.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules),n=tm(e);if(n&&177!==n.kind){gn.assert(!(2&zh(n)),"Enclosing function should never be an async function.");fT(t,Wp(n,ha.Did_you_mean_to_mark_this_function_as_async))}return ho.add(t),!0}}if(sF(e)&&!(65536&e.flags)&&fD(e.initializer)&&"async"===e.initializer.escapedText)return Wq(e.initializer,ha.The_left_hand_side_of_a_for_of_statement_may_not_be_async),!1;if(262===e.initializer.kind){const t=e.initializer;if(!Jq(t)){const n=t.declarations;if(!n.length)return!1;if(n.length>1){const n=250===e.kind?ha.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:ha.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return Uq(t.declarations[1],n)}const r=n[0];if(r.initializer){const t=250===e.kind?ha.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:ha.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return Wq(r.name,t)}if(r.type){return Wq(r,250===e.kind?ha.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:ha.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}}return!1}function Iq(e){if(e.parameters.length===(178===e.kind?1:2))return fv(e)}function Oq(e,t){if(yd(e)&&!fb(xE(e)?ph(e.argumentExpression):e.expression))return Wq(e,t)}function Lq(e){if(Tq(e))return!0;if(175===e.kind){if(211===e.parent.kind){if(e.modifiers&&(1!==e.modifiers.length||134!==xe(e.modifiers).kind))return Uq(e,ha.Modifiers_cannot_appear_here);if(Fq(e.questionToken,ha.An_object_member_cannot_be_declared_optional))return!0;if(Pq(e.exclamationToken,ha.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===e.body)return Vq(e,e.end-1,1,ha._0_expected,"{")}if(Eq(e))return!0}if(y_(e.parent)){if(A<2&&mD(e.name))return Wq(e.name,ha.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(33554432&e.flags)return Oq(e.name,ha.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(175===e.kind&&!e.body)return Oq(e.name,ha.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(265===e.parent.kind)return Oq(e.name,ha.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(188===e.parent.kind)return Oq(e.name,ha.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function jq(e){return Uh(e)||225===e.kind&&41===e.operator&&9===e.operand.kind}function Mq(e){const t=e.initializer;if(t){const r=!(jq(t)||function(e){if((bE(e)||xE(e)&&jq(e.argumentExpression))&&fb(e.expression))return!!(1056&kM(e).flags)}(t)||112===t.kind||97===t.kind||(n=t,10===n.kind||225===n.kind&&41===n.operator&&10===n.operand.kind));if(!(_f(e)||hF(e)&&tU(e))||e.type)return Wq(t,ha.Initializers_are_not_allowed_in_ambient_contexts);if(r)return Wq(t,ha.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference)}var n}function Rq(e){if(80===e.kind){if("__esModule"===kc(e))return function(e,t,n,...r){if(!qq(wd(t)))return Mo(e,t,n,...r),!0;return!1}("noEmit",e,ha.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else{const t=e.elements;for(const e of t)if(!zE(e))return Rq(e.name)}return!1}function Bq(e){if(80===e.kind){if("let"===e.escapedText)return Wq(e,ha.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else{const t=e.elements;for(const e of t)zE(e)||Bq(e.name)}return!1}function Jq(e){const t=e.declarations;if(xq(e.declarations))return!0;if(!e.declarations.length)return Vq(e,t.pos,t.end-t.pos,ha.Variable_declaration_list_cannot_be_empty);const n=7&e.flags;if(4===n||6===n){if(aF(e.parent))return Wq(e,4===n?ha.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:ha.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration);if(33554432&e.flags)return Wq(e,4===n?ha.using_declarations_are_not_allowed_in_ambient_contexts:ha.await_using_declarations_are_not_allowed_in_ambient_contexts);if(6===n)return nM(e)}return!1}function zq(e){switch(e.kind){case 246:case 247:case 248:case 255:case 249:case 250:case 251:return!1;case 257:return zq(e.parent)}return!0}function qq(e){return e.parseDiagnostics.length>0}function Uq(e,t,...n){const r=wd(e);if(!qq(r)){const i=nf(r,e.pos);return ho.add(rS(r,i.start,i.length,t,...n)),!0}return!1}function Vq(e,t,n,r,...i){const o=wd(e);return!qq(o)&&(ho.add(rS(o,t,n,r,...i)),!0)}function Wq(e,t,...n){return!qq(wd(e))&&(Jo(e,t,...n),!0)}function $q(e){return 265!==e.kind&&266!==e.kind&&273!==e.kind&&272!==e.kind&&279!==e.kind&&278!==e.kind&&271!==e.kind&&!Lv(e,2208)&&Uq(e,ha.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function Kq(e){return!!(33554432&e.flags)&&function(e){for(const t of e.statements)if((hu(t)||244===t.kind)&&$q(t))return!0;return!1}(e)}function Hq(e){if(33554432&e.flags){if(!la(e).hasReportedStatementInAmbientContext&&(__(e.parent)||v_(e.parent)))return la(e).hasReportedStatementInAmbientContext=Uq(e,ha.An_implementation_cannot_be_declared_in_ambient_contexts);if(242===e.parent.kind||269===e.parent.kind||308===e.parent.kind){const t=la(e.parent);if(!t.hasReportedStatementInAmbientContext)return t.hasReportedStatementInAmbientContext=Uq(e,ha.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function Gq(e){const t=rp(e).includes("."),n=16&e.numericLiteralFlags;if(t||n)return;+e.text<=2**53-1||qo(!1,Wp(e,ha.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}function Xq(e){return!!g(e.elements,e=>{if(e.isTypeOnly)return Uq(e,277===e.kind?ha.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:ha.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement)})}function Qq(e,t,n){if(1048576&t.flags&&2621440&e.flags){const r=nD(t,e);if(r)return r;const i=Qp(e);if(i){const e=ZN(i,t);if(e){const r=qT(t,O(e,e=>[()=>j_(e),e.escapedName]),n);if(r!==t)return r}}}}function Yq(e){const t=Kh(e);return t||(FD(e)?$N(qM(e.expression)):void 0)}function Zq(e){return Ae===e?Je:(Ae=e,Je=uc(e))}function eU(e){return Fe===e?Me:(Fe=e,Me=pc(e))}function tU(e){const t=7&eU(e);return 2===t||4===t||6===t}}function hJ(e){return 263!==e.kind&&175!==e.kind||!!e.body}function yJ(e){switch(e.parent.kind){case 277:case 282:return fD(e)||11===e.kind;default:return gh(e)}}function vJ(e){switch(e){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function bJ(e){return!!(1&e.flags)}function xJ(e){return!!(2&e.flags)}(QB=XB||(XB={})).JSX="JSX",QB.IntrinsicElements="IntrinsicElements",QB.ElementClass="ElementClass",QB.ElementAttributesPropertyNameContainer="ElementAttributesProperty",QB.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",QB.Element="Element",QB.ElementType="ElementType",QB.IntrinsicAttributes="IntrinsicAttributes",QB.IntrinsicClassAttributes="IntrinsicClassAttributes",QB.LibraryManagedAttributes="LibraryManagedAttributes",(YB||(YB={})).Fragment="Fragment";var SJ=class e{constructor(t,n,r){var i;for(this.moduleResolverHost=void 0,this.inner=void 0,this.disableTrackSymbol=!1;n instanceof e;)n=n.inner;this.inner=n,this.moduleResolverHost=r,this.context=t,this.canTrackSymbol=!!(null==(i=this.inner)?void 0:i.trackSymbol)}trackSymbol(e,t,n){var r,i;if((null==(r=this.inner)?void 0:r.trackSymbol)&&!this.disableTrackSymbol){if(this.inner.trackSymbol(e,t,n))return this.onDiagnosticReported(),!0;262144&e.flags||((i=this.context).trackedSymbols??(i.trackedSymbols=[])).push([e,t,n])}return!1}reportInaccessibleThisError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleThisError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(e){var t;(null==(t=this.inner)?void 0:t.reportPrivateInBaseOfClassExpression)&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(e))}reportInaccessibleUniqueSymbolError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleUniqueSymbolError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){var e;(null==(e=this.inner)?void 0:e.reportCyclicStructureError)&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(e){var t;(null==(t=this.inner)?void 0:t.reportLikelyUnsafeImportRequiredError)&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(e))}reportTruncationError(){var e;(null==(e=this.inner)?void 0:e.reportTruncationError)&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(e,t,n){var r;(null==(r=this.inner)?void 0:r.reportNonlocalAugmentation)&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(e,t,n))}reportNonSerializableProperty(e){var t;(null==(t=this.inner)?void 0:t.reportNonSerializableProperty)&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(e))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(e){var t;(null==(t=this.inner)?void 0:t.reportInferenceFallback)&&!this.context.suppressReportInferenceFallback&&(this.onDiagnosticReported(),this.inner.reportInferenceFallback(e))}pushErrorFallbackNode(e){var t,n;return null==(n=null==(t=this.inner)?void 0:t.pushErrorFallbackNode)?void 0:n.call(t,e)}popErrorFallbackNode(){var e,t;return null==(t=null==(e=this.inner)?void 0:e.popErrorFallbackNode)?void 0:t.call(e)}};function kJ(e,t,n,r){if(void 0===e)return e;const i=t(e);let o;return void 0!==i?(o=nt(i)?(r||LJ)(i):i,gn.assertNode(o,n),o):void 0}function TJ(e,t,n,r,i){if(void 0===e)return e;const o=e.length;let a;(void 0===r||r<0)&&(r=0),(void 0===i||i>o-r)&&(i=o-r);let s=-1,c=-1;r>0||io-r)&&(i=o-r),wJ(e,t,n,r,i)}function wJ(e,t,n,r,i){let o;const a=e.length;(r>0||i=2&&(i=function(e,t){let n;for(let r=0;r{const o=rl,addSource:P,setSourceContent:A,addName:I,addMapping:O,appendSourceMap:function(e,t,n,r,i,o){gn.assert(e>=S,"generatedLine cannot backtrack"),gn.assert(t>=0,"generatedCharacter cannot be negative"),s();const a=[];let l;const _=VJ(n.mappings);for(const s of _){if(o&&(s.generatedLine>o.line||s.generatedLine===o.line&&s.generatedCharacter>o.character))break;if(i&&(s.generatedLineJSON.stringify(R())};function P(t){s();const n=pa(r,t,e.getCurrentDirectory(),e.getCanonicalFileName,!0);let i=u.get(n);return void 0===i&&(i=_.length,_.push(n),l.push(t),u.set(n,i)),c(),i}function A(e,t){if(s(),null!==t){for(o||(o=[]);o.length=S,"generatedLine cannot backtrack"),gn.assert(t>=0,"generatedCharacter cannot be negative"),gn.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),gn.assert(void 0===r||r>=0,"sourceLine cannot be negative"),gn.assert(void 0===i||i>=0,"sourceCharacter cannot be negative"),s(),(function(e,t){return!D||S!==e||k!==t}(e,t)||function(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n&&T===e&&(C>t||C===t&&w>n)}(n,r,i))&&(j(),S=e,k=t,E=!1,F=!1,D=!0),void 0!==n&&void 0!==r&&void 0!==i&&(T=n,C=r,w=i,E=!0,void 0!==o&&(N=o,F=!0)),c()}function L(e){p.push(e),p.length>=1024&&M()}function j(){if(D&&(!x||m!==S||g!==k||h!==T||y!==C||v!==w||b!==N)){if(s(),m0&&(f+=String.fromCharCode.apply(void 0,p),p.length=0)}function R(){return j(),M(),{version:3,file:t,sourceRoot:n,sources:_,names:d,mappings:f,sourcesContent:o}}function B(e){e<0?e=1+(-e<<1):e<<=1;do{let t=31&e;(e>>=5)>0&&(t|=32),L(KJ(t))}while(e>0)}}var MJ=/\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,RJ=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,BJ=/^\s*(\/\/[@#] .*)?$/;function JJ(e,t){return{getLineCount:()=>t.length,getLineText:n=>e.substring(t[n],t[n+1])}}function zJ(e){for(let t=e.getLineCount()-1;t>=0;t--){const n=e.getLineText(t),r=RJ.exec(n);if(r)return r[1].trimEnd();if(!n.match(BJ))break}}function qJ(e){return"string"==typeof e||null===e}function UJ(e){try{const n=JSON.parse(e);if(null!==(t=n)&&"object"==typeof t&&3===t.version&&"string"==typeof t.file&&"string"==typeof t.mappings&&nt(t.sources)&&k(t.sources,it)&&(void 0===t.sourceRoot||null===t.sourceRoot||"string"==typeof t.sourceRoot)&&(void 0===t.sourcesContent||null===t.sourcesContent||nt(t.sourcesContent)&&k(t.sourcesContent,qJ))&&(void 0===t.names||null===t.names||nt(t.names)&&k(t.names,it)))return n}catch{}var t}function VJ(e){let t,n=!1,r=0,i=0,o=0,a=0,s=0,c=0,l=0;return{get pos(){return r},get error(){return t},get state(){return _(!0,!0)},next(){for(;!n&&r=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;const o=HJ(e.charCodeAt(r));if(-1===o)return d("Invalid character in VLQ"),-1;t=!!(32&o),i|=(31&o)<>=1,i=-i):i>>=1,i}}function WJ(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex}function $J(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function KJ(e){return e>=0&&e<26?65+e:e>=26&&e<52?97+e-26:e>=52&&e<62?48+e-52:62===e?43:63===e?47:gn.fail(`${e}: not a base64 value`)}function HJ(e){return e>=65&&e<=90?e-65:e>=97&&e<=122?e-97+26:e>=48&&e<=57?e-48+52:43===e?62:47===e?63:-1}function GJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function XJ(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function QJ(e,t){return gn.assert(e.sourceIndex===t.sourceIndex),Tt(e.sourcePosition,t.sourcePosition)}function YJ(e,t){return Tt(e.generatedPosition,t.generatedPosition)}function ZJ(e){return e.sourcePosition}function ez(e){return e.generatedPosition}function tz(e,t,n){const r=Lo(n),i=t.sourceRoot?$o(t.sourceRoot,r):r,o=$o(t.file,r),a=e.getSourceFileLike(o),s=t.sources.map(e=>$o(e,i)),c=new Map(s.map((t,n)=>[e.getCanonicalFileName(t),n]));let l,_,u;return{getSourcePosition:function(e){const t=function(){if(void 0===_){const e=[];for(const t of f())e.push(t);_=oe(e,YJ,XJ)}return _}();if(!X(t))return e;let n=Fe(t,e.pos,ez,Tt);n<0&&(n=~n);const r=t[n];if(void 0===r||!GJ(r))return e;return{fileName:s[r.sourceIndex],pos:r.sourcePosition}},getGeneratedPosition:function(t){const n=c.get(e.getCanonicalFileName(t.fileName));if(void 0===n)return t;const r=function(e){if(void 0===u){const e=[];for(const t of f()){if(!GJ(t))continue;let n=e[t.sourceIndex];n||(e[t.sourceIndex]=n=[]),n.push(t)}u=e.map(e=>oe(e,QJ,XJ))}return u[e]}(n);if(!X(r))return t;let i=Fe(r,t.pos,ZJ,Tt);i<0&&(i=~i);const a=r[i];if(void 0===a||a.sourceIndex!==n)return t;return{fileName:o,pos:a.generatedPosition}}};function d(n){const r=void 0!==a?qa(a,n.generatedLine,n.generatedCharacter,!0):-1;let i,o;if($J(n)){const r=e.getSourceFileLike(s[n.sourceIndex]);i=t.sources[n.sourceIndex],o=void 0!==r?qa(r,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:r,source:i,sourceIndex:n.sourceIndex,sourcePosition:o,nameIndex:n.nameIndex}}function f(){if(void 0===l){const n=VJ(t.mappings),r=Be(n,d);void 0!==n.error?(e.log&&e.log(`Encountered error while decoding sourcemap: ${n.error}`),l=p):l=r}return l}}var nz={getSourcePosition:dt,getGeneratedPosition:dt};function rz(e){return(e=hc(e))?pJ(e):0}function iz(e){return!!e&&(!(!RF(e)&&!qF(e))&&X(e.elements,oz))}function oz(e){return tp(e.propertyName||e.name)}function az(e,t){return function(n){return 308===n.kind?t(n):function(n){return e.factory.createBundle(O(n.sourceFiles,t))}(n)}}function sz(e){return!!Fg(e)}function cz(e){if(Fg(e))return!0;const t=e.importClause&&e.importClause.namedBindings;if(!t)return!1;if(!RF(t))return!1;let n=0;for(const e of t.elements)oz(e)&&n++;return n>0&&n!==t.elements.length||!!(t.elements.length-n)&&Pg(e)}function lz(e){return!cz(e)&&(Pg(e)||!!e.importClause&&RF(e.importClause.namedBindings)&&iz(e.importClause.namedBindings))}function _z(e,t){const n=e.getEmitResolver(),r=e.getCompilerOptions(),i=[],o=new fz,a=[],s=new Map,c=new Set;let l,_,u=!1,d=!1,p=!1,f=!1;for(const n of t.statements)switch(n.kind){case 273:i.push(n),!p&&cz(n)&&(p=!0),!f&&lz(n)&&(f=!0);break;case 272:284===n.moduleReference.kind&&i.push(n);break;case 279:if(n.moduleSpecifier)if(n.exportClause)if(i.push(n),qF(n.exportClause))g(n),f||(f=iz(n.exportClause));else{const e=n.exportClause.name,t=Zd(e);s.get(t)||(dz(a,rz(n),e),s.set(t,!0),l=le(l,e)),p=!0}else i.push(n),d=!0;else g(n);break;case 278:n.isExportEquals&&!_&&(_=n);break;case 244:if(Lv(n,32))for(const e of n.declarationList.declarations)l=uz(e,s,l,a);break;case 263:Lv(n,32)&&h(n,void 0,Lv(n,2048));break;case 264:if(Lv(n,32))if(Lv(n,2048))u||(dz(a,rz(n),e.factory.getDeclarationName(n)),u=!0);else{const e=n.name;e&&!s.get(kc(e))&&(dz(a,rz(n),e),s.set(kc(e),!0),l=le(l,e))}}const m=JA(e.factory,e.getEmitHelperFactory(),t,r,d,p,f);return m&&i.unshift(m),{externalImports:i,exportSpecifiers:o,exportEquals:_,hasExportStarsToExportValues:d,exportedBindings:a,exportedNames:l,exportedFunctions:c,externalHelpersImportDeclaration:m};function g(e){for(const t of st(e.exportClause,qF).elements){const r=Zd(t.name);if(!s.get(r)){const i=t.propertyName||t.name;if(11!==i.kind){e.moduleSpecifier||o.add(i,t);const r=n.getReferencedImportDeclaration(i)||n.getReferencedValueDeclaration(i);if(r){if(263===r.kind){h(r,t.name,tp(t.name));continue}dz(a,rz(r),t.name)}}s.set(r,!0),l=le(l,t.name)}}}function h(t,n,r){if(c.add(hc(t,vF)),r)u||(dz(a,rz(t),n??e.factory.getDeclarationName(t)),u=!0);else{n??(n=t.name);const e=Zd(n);s.get(e)||(dz(a,rz(t),n),s.set(e,!0))}}}function uz(e,t,n,r){if(E_(e.name))for(const i of e.name.elements)zE(i)||(n=uz(i,t,n,r));else if(!Yl(e.name)){const i=kc(e.name);t.get(i)||(t.set(i,!0),n=le(n,e.name),CA(e.name)&&dz(r,rz(e),e.name))}return n}function dz(e,t,n){let r=e[t];return r?r.push(n):e[t]=r=[n],r}var pz=class e{constructor(){this._map=new Map}get size(){return this._map.size}has(t){return this._map.has(e.toKey(t))}get(t){return this._map.get(e.toKey(t))}set(t,n){return this._map.set(e.toKey(t),n),this}delete(t){var n;return(null==(n=this._map)?void 0:n.delete(e.toKey(t)))??!1}clear(){this._map.clear()}values(){return this._map.values()}static toKey(t){if(Zl(t)||Yl(t)){const n=t.emitNode.autoGenerate;if(4==(7&n.flags)){const r=xI(t),i=vl(r)&&r!==t?e.toKey(r):`(generated@${pJ(r)})`;return TI(!1,n.prefix,i,n.suffix,e.toKey)}{const t=`(auto@${n.id})`;return TI(!1,n.prefix,t,n.suffix,e.toKey)}}return mD(t)?kc(t).slice(1):kc(t)}},fz=class extends pz{add(e,t){let n=this.get(e);return n?n.push(t):this.set(e,n=[t]),n}remove(e,t){const n=this.get(e);n&&(Gt(n,t),n.length||this.delete(e))}};function mz(e){return Uu(e)||9===e.kind||Ah(e.kind)||fD(e)}function gz(e){return!fD(e)&&mz(e)}function hz(e){return e>=65&&e<=79}function yz(e){switch(e){case 65:return 40;case 66:return 41;case 67:return 42;case 68:return 43;case 69:return 44;case 70:return 45;case 71:return 48;case 72:return 49;case 73:return 50;case 74:return 51;case 75:return 52;case 79:return 53;case 76:return 57;case 77:return 56;case 78:return 61}}function vz(e){if(!tF(e))return;const t=ph(e.expression);return gf(t)?t:void 0}function bz(e,t,n){for(let r=t;rfunction(e,t,n){return LD(e)&&(!!e.initializer||!t)&&Mv(e)===n}(e,t,n))}function kz(e){return LD(t=e)&&Mv(t)||RD(e);var t}function Tz(e){return P(e.members,kz)}function Cz(e){return 173===e.kind&&void 0!==e.initializer}function wz(e){return!jv(e)&&(S_(e)||b_(e))&&mD(e.name)}function Nz(e){let t;if(e){const n=e.parameters,r=n.length>0&&mv(n[0]),i=r?1:0,o=r?n.length-1:n.length;for(let e=0;eAz(e.privateEnv,t))}function Lz(e){return!e.initializer&&fD(e.name)}function jz(e){return k(e,Lz)}function Mz(e,t){if(!e||!QN(e)||!Dg(e.text,t))return e;const n=eT(e.text,pU(e.text,t));return n!==e.text?Cw(AI(kw.createStringLiteral(n,e.singleQuote),e),e):e}var Rz=(e=>(e[e.All=0]="All",e[e.ObjectRest=1]="ObjectRest",e))(Rz||{});function Bz(e,t,n,r,i,o){let a,s,c=e;if(db(e))for(a=e.right;wb(e.left)||Cb(e.left);){if(!db(a))return gn.checkDefined(kJ(a,t,Q_));c=e=a,a=e.right}const l={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:_,emitBindingOrAssignment:function(e,r,i,a){gn.assertNode(e,o?fD:Q_);const s=o?o(e,r,i):AI(n.factory.createAssignment(gn.checkDefined(kJ(e,t,Q_)),r),i);s.original=a,_(s)},createArrayBindingOrAssignmentPattern:e=>function(e,t){return gn.assertEachNode(t,R_),e.createArrayLiteralExpression(O(t,e.converters.convertToArrayAssignmentElement))}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return gn.assertEachNode(t,j_),e.createObjectLiteralExpression(O(t,e.converters.convertToObjectAssignmentElement))}(n.factory,e),createArrayBindingOrAssignmentElement:Kz,visitor:t};if(a&&(a=kJ(a,t,Q_),gn.assert(a),fD(a)&&Jz(e,a.escapedText)||zz(e)?a=$z(l,a,!1,c):i?a=$z(l,a,!0,c):sy(e)&&(c=a)),Uz(l,e,a,c,db(e)),a&&i){if(!X(s))return a;s.push(a)}return n.factory.inlineExpressions(s)||n.factory.createOmittedExpression();function _(e){s=le(s,e)}}function Jz(e,t){const n=WA(e);return O_(n)?function(e,t){const n=XA(e);for(const e of n)if(Jz(e,t))return!0;return!1}(n,t):!!fD(n)&&n.escapedText===t}function zz(e){const t=HA(e);if(t&&FD(t)&&!Jl(t.expression))return!0;const n=WA(e);return!!n&&O_(n)&&!!g(XA(n),zz)}function qz(e,t,n,r,i,o=!1,a){let s;const c=[],l=[],_={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:o,emitExpression:function(e){s=le(s,e)},emitBindingOrAssignment:u,createArrayBindingOrAssignmentPattern:e=>function(e,t){return gn.assertEachNode(t,P_),e.createArrayBindingPattern(t)}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return gn.assertEachNode(t,hE),e.createObjectBindingPattern(t)}(n.factory,e),createArrayBindingOrAssignmentElement:e=>function(e,t){return e.createBindingElement(void 0,void 0,t)}(n.factory,e),visitor:t};if(hF(e)){let t=VA(e);t&&(fD(t)&&Jz(e,t.escapedText)||zz(e))&&(t=$z(_,gn.checkDefined(kJ(t,_.visitor,Q_)),!1,t),e=n.factory.updateVariableDeclaration(e,e.name,void 0,void 0,t))}if(Uz(_,e,i,e,a),s){const e=n.factory.createTempVariable(void 0);if(o){const t=n.factory.inlineExpressions(s);s=void 0,u(e,t,void 0,void 0)}else{n.hoistVariableDeclaration(e);const t=Te(c);t.pendingExpressions=le(t.pendingExpressions,n.factory.createAssignment(e,t.value)),de(t.pendingExpressions,s),t.value=e}}for(const{pendingExpressions:e,name:t,value:r,location:i,original:o}of c){const a=n.factory.createVariableDeclaration(t,void 0,void 0,e?n.factory.inlineExpressions(le(e,r)):r);a.original=o,AI(a,i),l.push(a)}return l;function u(e,t,r,i){gn.assertNode(e,l_),s&&(t=n.factory.inlineExpressions(le(s,t)),s=void 0),c.push({pendingExpressions:s,name:e,value:t,location:r,original:i})}}function Uz(e,t,n,r,i){const o=WA(t);if(!i){const i=kJ(VA(t),e.visitor,Q_);i?n?(n=function(e,t,n,r){return t=$z(e,t,!0,r),e.context.factory.createConditionalExpression(e.context.factory.createTypeCheck(t,"undefined"),void 0,n,void 0,t)}(e,n,i,r),!gz(i)&&O_(o)&&(n=$z(e,n,!0,r))):n=i:n||(n=e.context.factory.createVoidZero())}L_(o)?function(e,t,n,r,i){const o=XA(n),a=o.length;if(1!==a){r=$z(e,r,!A_(t)||0!==a,i)}let s,c;for(let t=0;t=1)||98304&l.transformFlags||98304&WA(l).transformFlags||FD(t)){s&&(e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n),s=void 0);const o=Wz(e,r,t);FD(t)&&(c=le(c,o.argumentExpression)),Uz(e,l,o,l)}else s=le(s,kJ(l,e.visitor,I_))}}s&&e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n)}(e,t,o,n,r):M_(o)?function(e,t,n,r,i){const o=XA(n),a=o.length;if(e.level<1&&e.downlevelIteration)r=$z(e,AI(e.context.getEmitHelperFactory().createReadHelper(r,a>0&&$A(o[a-1])?void 0:a),i),!1,i);else if(1!==a&&(e.level<1||0===a)||k(o,zE)){r=$z(e,r,!A_(t)||0!==a,i)}let s,c;for(let t=0;t=1)if(65536&n.transformFlags||e.hasTransformedPriorElement&&!Vz(n)){e.hasTransformedPriorElement=!0;const t=e.context.factory.createTempVariable(void 0);e.hoistTempVariables&&e.context.hoistVariableDeclaration(t),c=le(c,[t,n]),s=le(s,e.createArrayBindingOrAssignmentElement(t))}else s=le(s,n);else{if(zE(n))continue;if($A(n)){if(t===a-1){const i=e.context.factory.createArraySliceCall(r,t);Uz(e,n,i,n)}}else{const i=e.context.factory.createElementAccessExpression(r,t);Uz(e,n,i,n)}}}s&&e.emitBindingOrAssignment(e.createArrayBindingOrAssignmentPattern(s),r,i,n);if(c)for(const[t,n]of c)Uz(e,n,t,n)}(e,t,o,n,r):e.emitBindingOrAssignment(o,n,r,t)}function Vz(e){const t=WA(e);if(!t||zE(t))return!0;const n=HA(e);if(n&&!Hh(n))return!1;const r=VA(e);return!(r&&!gz(r))&&(O_(t)?k(XA(t),Vz):fD(t))}function Wz(e,t,n){const{factory:r}=e.context;if(FD(n)){const r=$z(e,gn.checkDefined(kJ(n.expression,e.visitor,Q_)),!1,n);return e.context.factory.createElementAccessExpression(t,r)}if(Uh(n)||XN(n)){const i=r.cloneNode(n);return e.context.factory.createElementAccessExpression(t,i)}{const r=e.context.factory.createIdentifier(kc(n));return e.context.factory.createPropertyAccessExpression(t,r)}}function $z(e,t,n,r){if(fD(t)&&n)return t;{const n=e.context.factory.createTempVariable(void 0);return e.hoistTempVariables?(e.context.hoistVariableDeclaration(n),e.emitExpression(AI(e.context.factory.createAssignment(n,t),r))):e.emitBindingOrAssignment(n,t,r,void 0),n}}function Kz(e){return e}function Hz(e){var t;if(!RD(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return tF(n)&&ub(n.expression,!0)&&fD(n.expression.left)&&(null==(t=e.emitNode)?void 0:t.classThis)===n.expression.left&&110===n.expression.right.kind}function Gz(e){var t;return!!(null==(t=e.emitNode)?void 0:t.classThis)&&X(e.members,Hz)}function Xz(e,t,n,r){if(Gz(t))return t;const i=function(e,t,n=e.createThis()){const r=e.createAssignment(t,n),i=e.createExpressionStatement(r),o=e.createBlock([i],!1),a=e.createClassStaticBlockDeclaration(o);return ww(a).classThis=t,a}(e,n,r);t.name&&Ow(i.body.statements[0],t.name);const o=e.createNodeArray([i,...t.members]);AI(o,t.members);const a=bF(t)?e.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o):e.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o);return ww(a).classThis=n,a}function Qz(e,t,n){const r=hc(LA(n));return(bF(r)||vF(r))&&!r.name&&Lv(r,2048)?e.createStringLiteral("default"):e.createStringLiteralFromNode(t)}function Yz(e,t,n){const{factory:r}=e;if(void 0!==n){return{assignedName:r.createStringLiteral(n),name:t}}if(Hh(t)||mD(t)){return{assignedName:r.createStringLiteralFromNode(t),name:t}}if(Hh(t.expression)&&!fD(t.expression)){return{assignedName:r.createStringLiteralFromNode(t.expression),name:t}}const i=r.getGeneratedNameForNode(t);e.hoistVariableDeclaration(i);const o=e.getEmitHelperFactory().createPropKeyHelper(t.expression),a=r.createAssignment(i,o);return{assignedName:i,name:r.updateComputedPropertyName(t,a)}}function Zz(e){var t;if(!RD(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return tF(n)&&HN(n.expression,"___setFunctionName")&&n.expression.arguments.length>=2&&n.expression.arguments[1]===(null==(t=e.emitNode)?void 0:t.assignedName)}function eq(e){var t;return!!(null==(t=e.emitNode)?void 0:t.assignedName)&&X(e.members,Zz)}function tq(e){return!!e.name||eq(e)}function nq(e,t,n,r){if(eq(t))return t;const{factory:i}=e,o=function(e,t,n=e.factory.createThis()){const{factory:r}=e,i=e.getEmitHelperFactory().createSetFunctionNameHelper(n,t),o=r.createExpressionStatement(i),a=r.createBlock([o],!1),s=r.createClassStaticBlockDeclaration(a);return ww(s).assignedName=t,s}(e,n,r);t.name&&Ow(o.body.statements[0],t.name);const a=w(t.members,Hz)+1,s=t.members.slice(0,a),c=t.members.slice(a),l=i.createNodeArray([...s,o,...c]);return AI(l,t.members),ww(t=bF(t)?i.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l):i.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l)).assignedName=n,t}function rq(e,t,n,r){if(r&&QN(n)&&Cm(n))return t;const{factory:i}=e,o=LA(t),a=JE(o)?st(nq(e,o,n),JE):e.getEmitHelperFactory().createSetFunctionNameHelper(o,n);return i.restoreOuterExpressions(t,a)}function iq(e,t,n,r){switch(t.kind){case 304:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=Yz(e,t.name,r),s=rq(e,t.initializer,o,n);return i.updatePropertyAssignment(t,a,s)}(e,t,n,r);case 305:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Qz(i,t.name,t.objectAssignmentInitializer),a=rq(e,t.objectAssignmentInitializer,o,n);return i.updateShorthandPropertyAssignment(t,t.name,a)}(e,t,n,r);case 261:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Qz(i,t.name,t.initializer),a=rq(e,t.initializer,o,n);return i.updateVariableDeclaration(t,t.name,t.exclamationToken,t.type,a)}(e,t,n,r);case 170:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Qz(i,t.name,t.initializer),a=rq(e,t.initializer,o,n);return i.updateParameterDeclaration(t,t.modifiers,t.dotDotDotToken,t.name,t.questionToken,t.type,a)}(e,t,n,r);case 209:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Qz(i,t.name,t.initializer),a=rq(e,t.initializer,o,n);return i.updateBindingElement(t,t.dotDotDotToken,t.propertyName,t.name,a)}(e,t,n,r);case 173:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=Yz(e,t.name,r),s=rq(e,t.initializer,o,n);return i.updatePropertyDeclaration(t,t.modifiers,a,t.questionToken??t.exclamationToken,t.type,s)}(e,t,n,r);case 227:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):Qz(i,t.left,t.right),a=rq(e,t.right,o,n);return i.updateBinaryExpression(t,t.left,t.operatorToken,a)}(e,t,n,r);case 278:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):i.createStringLiteral(t.isExportEquals?"":"default"),a=rq(e,t.expression,o,n);return i.updateExportAssignment(t,t.modifiers,a)}(e,t,n,r)}}var oq=(e=>(e[e.LiftRestriction=0]="LiftRestriction",e[e.All=1]="All",e))(oq||{});function aq(e,t,n,r,i,o){const a=kJ(t.tag,n,Q_);gn.assert(a);const s=[void 0],c=[],l=[],_=t.template;if(0===o&&!xy(_))return IJ(t,n,e);const{factory:u}=e;if(eD(_))c.push(sq(u,_)),l.push(cq(u,_,r));else{c.push(sq(u,_.head)),l.push(cq(u,_.head,r));for(const e of _.templateSpans)c.push(sq(u,e.literal)),l.push(cq(u,e.literal,r)),s.push(gn.checkDefined(kJ(e.expression,n,Q_)))}const d=e.getEmitHelperFactory().createTemplateObjectHelper(u.createArrayLiteralExpression(c),u.createArrayLiteralExpression(l));if(fO(r)){const e=u.createUniqueName("templateObject");i(e),s[0]=u.createLogicalOr(e,u.createAssignment(e,d))}else s[0]=d;return u.createCallExpression(a,void 0,s)}function sq(e,t){return 26656&t.templateFlags?e.createVoidZero():e.createStringLiteral(t.text)}function cq(e,t,n){let r=t.rawText;if(void 0===r){gn.assertIsDefined(n,"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."),r=Qd(n,t);const e=15===t.kind||18===t.kind;r=r.substring(1,r.length-(e?1:2))}return r=r.replace(/\r\n?/g,"\n"),AI(e.createStringLiteral(r),t)}var lq=!1;function _q(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getEmitResolver(),c=e.getCompilerOptions(),l=wS(c),_=NS(c),u=!!c.experimentalDecorators,d=c.emitDecoratorMetadata?pq(e):void 0,p=e.onEmitNode,f=e.onSubstituteNode;let m,g,h,y,v;e.onEmitNode=function(e,t,n){const r=b,i=m;mP(t)&&(m=t);2&x&&function(e){return 268===hc(e).kind}(t)&&(b|=2);8&x&&function(e){return 267===hc(e).kind}(t)&&(b|=8);p(e,t,n),b=r,m=i},e.onSubstituteNode=function(e,n){if(n=f(e,n),1===e)return function(e){switch(e.kind){case 80:return function(e){return we(e)||e}(e);case 212:case 213:return function(e){return Ne(e)}(e)}return e}(n);if(dP(n))return function(e){if(2&x){const n=e.name,r=we(n);if(r){if(e.objectAssignmentInitializer){const i=t.createAssignment(r,e.objectAssignmentInitializer);return AI(t.createPropertyAssignment(n,i),e)}return AI(t.createPropertyAssignment(n,r),e)}}return e}(n);return n},e.enableSubstitution(212),e.enableSubstitution(213);let b,x=0;return function(e){if(309===e.kind)return function(e){return t.createBundle(e.sourceFiles.map(S))}(e);return S(e)};function S(t){if(t.isDeclarationFile)return t;m=t;const n=k(t,R);return Qw(n,e.readEmitHelpers()),m=void 0,n}function k(e,t){const n=y,r=v;!function(e){switch(e.kind){case 308:case 270:case 269:case 242:y=e,v=void 0;break;case 264:case 263:if(Lv(e,128))break;e.name?ae(e):gn.assert(264===e.kind||Lv(e,2048))}}(e);const i=t(e);return y!==n&&(v=r),y=n,i}function T(e){return k(e,C)}function C(e){return 1&e.transformFlags?M(e):e}function w(e){return k(e,N)}function N(n){switch(n.kind){case 273:case 272:case 278:case 279:return function(n){if(function(e){const t=bc(e);if(t===e||JF(e))return!1;if(!t||t.kind!==e.kind)return!0;switch(e.kind){case 273:if(gn.assertNode(t,EF),e.importClause!==t.importClause)return!0;if(e.attributes!==t.attributes)return!0;break;case 272:if(gn.assertNode(t,DF),e.name!==t.name)return!0;if(e.isTypeOnly!==t.isTypeOnly)return!0;if(e.moduleReference!==t.moduleReference&&(s_(e.moduleReference)||s_(t.moduleReference)))return!0;break;case 279:if(gn.assertNode(t,zF),e.exportClause!==t.exportClause)return!0;if(e.attributes!==t.attributes)return!0}return!1}(n))return 1&n.transformFlags?IJ(n,T,e):n;switch(n.kind){case 273:return function(e){if(!e.importClause)return e;if(e.importClause.isTypeOnly)return;const n=kJ(e.importClause,pe,FF);return n?t.updateImportDeclaration(e,void 0,n,e.moduleSpecifier,e.attributes):void 0}(n);case 272:return he(n);case 278:return function(t){return c.verbatimModuleSyntax||s.isValueAliasDeclaration(t)?IJ(t,T,e):void 0}(n);case 279:return function(e){if(e.isTypeOnly)return;if(!e.exportClause||MF(e.exportClause))return t.updateExportDeclaration(e,e.modifiers,e.isTypeOnly,e.exportClause,e.moduleSpecifier,e.attributes);const n=!!c.verbatimModuleSyntax,r=kJ(e.exportClause,e=>function(e,n){return MF(e)?function(e){return t.updateNamespaceExport(e,gn.checkDefined(kJ(e.name,T,fD)))}(e):function(e,n){const r=TJ(e.elements,ge,UF);return n||X(r)?t.updateNamedExports(e,r):void 0}(e,n)}(e,n),Il);return r?t.updateExportDeclaration(e,void 0,e.isTypeOnly,r,e.moduleSpecifier,e.attributes):void 0}(n);default:gn.fail("Unhandled ellided statement")}}(n);default:return C(n)}}function D(e){return k(e,E)}function E(e){if(279!==e.kind&&273!==e.kind&&274!==e.kind&&(272!==e.kind||284!==e.moduleReference.kind))return 1&e.transformFlags||Lv(e,32)?M(e):e}function F(n){return r=>k(r,r=>function(n,r){switch(n.kind){case 177:return function(n){if(!G(n))return;return t.updateConstructorDeclaration(n,void 0,DJ(n.parameters,T,e),function(n,r){const a=r&&P(r.parameters,e=>ac(e,r));if(!X(a))return FJ(n,T,e);let s=[];i();const c=t.copyPrologue(n.statements,s,!1,T),l=xz(n.statements,c),_=U(a,Z);l.length?Q(s,n.statements,c,l,0,_):(de(s,_),de(s,TJ(n.statements,T,bu,c)));s=t.mergeLexicalEnvironment(s,o());const u=t.createBlock(AI(t.createNodeArray(s),n.statements),!0);return AI(u,n),Cw(u,n),u}(n.body,n))}(n);case 173:return function(e,n){const r=33554432&e.flags||Lv(e,64);if(r&&(!u||!Uv(e)))return;let i=y_(n)?TJ(e.modifiers,r?L:T,k_):TJ(e.modifiers,I,k_);if(i=q(i,e,n),r)return t.updatePropertyDeclaration(e,Y(i,t.createModifiersFromModifierFlags(128)),gn.checkDefined(kJ(e.name,T,c_)),void 0,void 0,void 0);return t.updatePropertyDeclaration(e,i,H(e),void 0,void 0,kJ(e.initializer,T,Q_))}(n,r);case 178:return ne(n,r);case 179:return re(n,r);case 175:return ee(n,r);case 176:return IJ(n,T,e);case 241:return n;case 182:return;default:return gn.failBadSyntaxKind(n)}}(r,n))}function A(e){return t=>k(t,t=>function(e,t){switch(e.kind){case 304:case 305:case 306:return T(e);case 178:return ne(e,t);case 179:return re(e,t);case 175:return ee(e,t);default:return gn.failBadSyntaxKind(e)}}(t,e))}function I(e){return ID(e)?void 0:T(e)}function L(e){return a_(e)?void 0:T(e)}function j(e){if(!ID(e)&&!(28895&tb(e.kind)||g&&95===e.kind))return e}function M(n){if(bu(n)&&Lv(n,128))return t.createNotEmittedStatement(n);switch(n.kind){case 95:case 90:return g?void 0:n;case 125:case 123:case 124:case 128:case 164:case 87:case 138:case 148:case 103:case 147:case 189:case 190:case 191:case 192:case 188:case 183:case 169:case 133:case 159:case 136:case 154:case 150:case 146:case 116:case 155:case 186:case 185:case 187:case 184:case 193:case 194:case 195:case 197:case 198:case 199:case 200:case 201:case 202:case 182:case 271:return;case 266:case 265:return t.createNotEmittedStatement(n);case 264:return function(n){const r=function(e){let t=0;X(Sz(e,!0,!0))&&(t|=1);const n=Ch(e);n&&106!==LA(n.expression).kind&&(t|=64);km(u,e)&&(t|=2);Sm(u,e)&&(t|=4);ye(e)?t|=8:!function(e){return ve(e)&&Lv(e,2048)}(e)?be(e)&&(t|=16):t|=32;return t}(n),i=l<=1&&!!(7&r);if(!function(e){return Uv(e)||X(e.typeParameters)||X(e.heritageClauses,B)||X(e.members,B)}(n)&&!km(u,n)&&!ye(n))return t.updateClassDeclaration(n,TJ(n.modifiers,j,a_),n.name,void 0,TJ(n.heritageClauses,T,lP),TJ(n.members,F(n),h_));i&&e.startLexicalEnvironment();const o=i||8&r;let a=TJ(n.modifiers,o?L:T,k_);2&r&&(a=z(a,n));const s=o&&!n.name||4&r||1&r,c=s?n.name??t.getGeneratedNameForNode(n):n.name,_=t.updateClassDeclaration(n,a,c,void 0,TJ(n.heritageClauses,T,lP),J(n));let d,p=ap(n);1&r&&(p|=64);if(Ew(_,p),i){const r=[_],i=Wb(is(m.text,n.members.end),20),o=t.getInternalName(n),a=t.createPartiallyEmittedExpression(o);AT(a,i.end),Ew(a,3072);const s=t.createReturnStatement(a);PT(s,i.pos),Ew(s,3840),r.push(s),zd(r,e.endLexicalEnvironment());const c=t.createImmediatelyInvokedArrowFunction(r);Pw(c,1);const l=t.createVariableDeclaration(t.getLocalName(n,!1,!1),void 0,void 0,c);Cw(l,n);const u=t.createVariableStatement(void 0,t.createVariableDeclarationList([l],1));Cw(u,n),Jw(u,n),Ow(u,Ub(n)),MA(u),d=u}else d=_;if(o){if(8&r)return[d,xe(n)];if(32&r)return[d,t.createExportDefault(t.getLocalName(n,!1,!0))];if(16&r)return[d,t.createExternalModuleExport(t.getDeclarationName(n,!1,!0))]}return d}(n);case 232:return function(e){let n=TJ(e.modifiers,L,k_);km(u,e)&&(n=z(n,e));return t.updateClassExpression(e,n,e.name,void 0,TJ(e.heritageClauses,T,lP),J(e))}(n);case 299:return function(t){if(119===t.token)return;return IJ(t,T,e)}(n);case 234:return function(e){return t.updateExpressionWithTypeArguments(e,gn.checkDefined(kJ(e.expression,T,W_)),void 0)}(n);case 211:return function(e){return t.updateObjectLiteralExpression(e,TJ(e.properties,A(e),w_))}(n);case 177:case 173:case 175:case 178:case 179:case 176:return gn.fail("Class and object literal elements must be visited with their respective visitors");case 263:return function(n){if(!G(n))return t.createNotEmittedStatement(n);const r=t.updateFunctionDeclaration(n,TJ(n.modifiers,j,a_),n.asteriskToken,n.name,void 0,DJ(n.parameters,T,e),void 0,FJ(n.body,T,e)||t.createBlock([]));if(ye(n)){const e=[r];return function(e,t){e.push(xe(t))}(e,n),e}return r}(n);case 219:return function(n){if(!G(n))return t.createOmittedExpression();const r=t.updateFunctionExpression(n,TJ(n.modifiers,j,a_),n.asteriskToken,n.name,void 0,DJ(n.parameters,T,e),void 0,FJ(n.body,T,e)||t.createBlock([]));return r}(n);case 220:return function(n){const r=t.updateArrowFunction(n,TJ(n.modifiers,j,a_),void 0,DJ(n.parameters,T,e),void 0,n.equalsGreaterThanToken,FJ(n.body,T,e));return r}(n);case 170:return function(e){if(mv(e))return;const n=t.updateParameterDeclaration(e,TJ(e.modifiers,e=>ID(e)?T(e):void 0,k_),e.dotDotDotToken,gn.checkDefined(kJ(e.name,T,l_)),void 0,void 0,kJ(e.initializer,T,Q_));n!==e&&(Jw(n,e),AI(n,Vb(e)),Ow(n,Vb(e)),Ew(n.name,64));return n}(n);case 218:return function(n){const r=LA(n.expression,-55);if(Y_(r)||VE(r)){const e=kJ(n.expression,T,Q_);return gn.assert(e),t.createPartiallyEmittedExpression(e,n)}return IJ(n,T,e)}(n);case 217:case 235:return function(e){const n=kJ(e.expression,T,Q_);return gn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 239:return function(e){const n=kJ(e.expression,T,Q_);return gn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 214:return function(e){return t.updateCallExpression(e,gn.checkDefined(kJ(e.expression,T,Q_)),void 0,TJ(e.arguments,T,Q_))}(n);case 215:return function(e){return t.updateNewExpression(e,gn.checkDefined(kJ(e.expression,T,Q_)),void 0,TJ(e.arguments,T,Q_))}(n);case 216:return function(e){return t.updateTaggedTemplateExpression(e,gn.checkDefined(kJ(e.tag,T,Q_)),void 0,gn.checkDefined(kJ(e.template,T,V_)))}(n);case 236:return function(e){const n=kJ(e.expression,T,W_);return gn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 267:return function(e){if(!function(e){return!lf(e)||MS(c)}(e))return t.createNotEmittedStatement(e);const n=[];let i=4;const a=ce(n,e);a&&(4===_&&y===m||(i|=1024));const s=Te(e),l=Ce(e),u=ye(e)?t.getExternalModuleOrNamespaceExportName(h,e,!1,!0):t.getDeclarationName(e,!1,!0);let d=t.createLogicalOr(u,t.createAssignment(u,t.createObjectLiteralExpression()));if(ye(e)){const n=t.getLocalName(e,!1,!0);d=t.createAssignment(n,d)}const p=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,s)],void 0,function(e,n){const i=h;h=n;const a=[];r();const s=O(e.members,oe);return zd(a,o()),de(a,s),h=i,t.createBlock(AI(t.createNodeArray(a),e.members),!0)}(e,l)),void 0,[d]));Cw(p,e),a&&(qw(p,void 0),Ww(p,void 0));return AI(p,e),Fw(p,i),n.push(p),n}(n);case 244:return function(n){if(ye(n)){const e=sx(n.declarationList);if(0===e.length)return;return AI(t.createExpressionStatement(t.inlineExpressions(O(e,ie))),n)}return IJ(n,T,e)}(n);case 261:return function(e){const n=t.updateVariableDeclaration(e,gn.checkDefined(kJ(e.name,T,l_)),void 0,void 0,kJ(e.initializer,T,Q_));e.type&&iN(n.name,e.type);return n}(n);case 268:return _e(n);case 272:return he(n);case 286:return function(e){return t.updateJsxSelfClosingElement(e,gn.checkDefined(kJ(e.tagName,T,ku)),void 0,gn.checkDefined(kJ(e.attributes,T,rP)))}(n);case 287:return function(e){return t.updateJsxOpeningElement(e,gn.checkDefined(kJ(e.tagName,T,ku)),void 0,gn.checkDefined(kJ(e.attributes,T,rP)))}(n);default:return IJ(n,T,e)}}function R(n){const r=HS(c,"alwaysStrict")&&!(fO(n)&&_>=5)&&!cf(n);return t.updateSourceFile(n,NJ(n.statements,w,e,0,r))}function B(e){return!!(8192&e.transformFlags)}function J(e){const n=TJ(e.members,F(e),h_);let r;const i=uv(e),o=i&&P(i.parameters,e=>ac(e,i));if(o)for(const e of o){const n=t.createPropertyDeclaration(void 0,e.name,void 0,void 0,void 0);Cw(n,e),r=le(r,n)}return r?(r=de(r,n),AI(t.createNodeArray(r),e.members)):n}function z(e,n){const r=V(n,n);if(X(r)){const n=[];de(n,pn(e,vI)),de(n,P(e,ID)),de(n,r),de(n,P(fn(e,vI),a_)),e=AI(t.createNodeArray(n),e)}return e}function q(e,n,r){if(y_(r)&&Tm(u,n,r)){const i=V(n,r);if(X(i)){const n=[];de(n,P(e,ID)),de(n,i),de(n,P(e,a_)),e=AI(t.createNodeArray(n),e)}}return e}function V(e,r){if(u)return lq?function(e,r){if(d){let i;if(W(e)){i=le(i,t.createPropertyAssignment("type",t.createArrowFunction(void 0,void 0,[],void 0,t.createToken(39),d.serializeTypeOfNode({currentLexicalScope:y,currentNameScope:r},e,r))))}if(K(e)){i=le(i,t.createPropertyAssignment("paramTypes",t.createArrowFunction(void 0,void 0,[],void 0,t.createToken(39),d.serializeParameterTypesOfNode({currentLexicalScope:y,currentNameScope:r},e,r))))}if($(e)){i=le(i,t.createPropertyAssignment("returnType",t.createArrowFunction(void 0,void 0,[],void 0,t.createToken(39),d.serializeReturnTypeOfNode({currentLexicalScope:y,currentNameScope:r},e))))}if(i){const e=n().createMetadataHelper("design:typeinfo",t.createObjectLiteralExpression(i,!0));return[t.createDecorator(e)]}}}(e,r):function(e,r){if(d){let i;if(W(e)){const o=n().createMetadataHelper("design:type",d.serializeTypeOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=le(i,t.createDecorator(o))}if(K(e)){const o=n().createMetadataHelper("design:paramtypes",d.serializeParameterTypesOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=le(i,t.createDecorator(o))}if($(e)){const o=n().createMetadataHelper("design:returntype",d.serializeReturnTypeOfNode({currentLexicalScope:y,currentNameScope:r},e));i=le(i,t.createDecorator(o))}return i}}(e,r)}function W(e){const t=e.kind;return 175===t||178===t||179===t||173===t}function $(e){return 175===e.kind}function K(e){switch(e.kind){case 264:case 232:return void 0!==uv(e);case 175:case 178:case 179:return!0}return!1}function H(e){const n=e.name;if(u&&FD(n)&&Uv(e)){const e=kJ(n.expression,T,Q_);gn.assert(e);if(!gz(Fl(e))){const r=t.getGeneratedNameForNode(n);return a(r),t.updateComputedPropertyName(n,t.createAssignment(r,e))}}return gn.checkDefined(kJ(n,T,c_))}function G(e){return!Od(e.body)}function Q(e,n,r,i,o,a){const s=i[o],c=n[s];if(de(e,TJ(n,T,bu,r,s-r)),mF(c)){const n=[];Q(n,c.tryBlock.statements,0,i,o+1,a);AI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),kJ(c.catchClause,T,_P),kJ(c.finallyBlock,T,YE)))}else de(e,TJ(n,T,bu,s,1)),de(e,a);de(e,TJ(n,T,bu,s+1))}function Z(e){const n=e.name;if(!fD(n))return;const r=jT(AI(t.cloneNode(n),n),n.parent);Ew(r,3168);const i=jT(AI(t.cloneNode(n),n),n.parent);return Ew(i,3072),MA(Dw(AI(Cw(t.createExpressionStatement(t.createAssignment(AI(t.createPropertyAccessExpression(t.createThis(),r),e.name),i)),e),qb(e,-1))))}function ee(n,r){if(!(1&n.transformFlags))return n;if(!G(n))return;let i=y_(r)?TJ(n.modifiers,T,k_):TJ(n.modifiers,I,k_);return i=q(i,n,r),t.updateMethodDeclaration(n,i,n.asteriskToken,H(n),void 0,void 0,DJ(n.parameters,T,e),void 0,FJ(n.body,T,e))}function te(e){return!(Od(e.body)&&Lv(e,64))}function ne(n,r){if(!(1&n.transformFlags))return n;if(!te(n))return;let i=y_(r)?TJ(n.modifiers,T,k_):TJ(n.modifiers,I,k_);return i=q(i,n,r),t.updateGetAccessorDeclaration(n,i,H(n),DJ(n.parameters,T,e),void 0,FJ(n.body,T,e)||t.createBlock([]))}function re(n,r){if(!(1&n.transformFlags))return n;if(!te(n))return;let i=y_(r)?TJ(n.modifiers,T,k_):TJ(n.modifiers,I,k_);return i=q(i,n,r),t.updateSetAccessorDeclaration(n,i,H(n),DJ(n.parameters,T,e),FJ(n.body,T,e)||t.createBlock([]))}function ie(n){const r=n.name;return E_(r)?Bz(n,T,e,0,!1,Se):AI(t.createAssignment(ke(r),gn.checkDefined(kJ(n.initializer,T,Q_))),n)}function oe(n){const r=function(e,n){const r=e.name;return mD(r)?t.createIdentifier(""):FD(r)?n&&!gz(r.expression)?t.getGeneratedNameForNode(r):r.expression:fD(r)?t.createStringLiteral(kc(r)):t.cloneNode(r)}(n,!1),i=s.getEnumMemberValue(n),o=function(n,r){return void 0!==r?"string"==typeof r?t.createStringLiteral(r):r<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-r)):t.createNumericLiteral(r):(8&x||(x|=8,e.enableSubstitution(80)),n.initializer?gn.checkDefined(kJ(n.initializer,T,Q_)):t.createVoidZero())}(n,null==i?void 0:i.value),a=t.createAssignment(t.createElementAccessExpression(h,r),o),c="string"==typeof(null==i?void 0:i.value)||(null==i?void 0:i.isSyntacticallyString)?a:t.createAssignment(t.createElementAccessExpression(h,a),r);return AI(t.createExpressionStatement(AI(c,n)),n)}function ae(e){v||(v=new Map);const t=se(e);v.has(t)||v.set(t,e)}function se(e){return gn.assertNode(e.name,fD),e.name.escapedText}function ce(e,n){const r=t.createVariableDeclaration(t.getLocalName(n,!1,!0)),i=308===y.kind?0:1,o=t.createVariableStatement(TJ(n.modifiers,j,a_),t.createVariableDeclarationList([r],i));return Cw(r,n),qw(r,void 0),Ww(r,void 0),Cw(o,n),ae(n),!!function(e){if(v){const t=se(e);return v.get(t)===e}return!0}(n)&&(267===n.kind?Ow(o.declarationList,n):Ow(o,n),Jw(o,n),Fw(o,2048),e.push(o),!0)}function _e(n){if(!function(e){const t=bc(e,TF);return!t||mJ(t,MS(c))}(n))return t.createNotEmittedStatement(n);gn.assertNode(n.name,fD,"A TypeScript namespace should have an Identifier name."),2&x||(x|=2,e.enableSubstitution(80),e.enableSubstitution(305),e.enableEmitNotification(268));const i=[];let a=4;const s=ce(i,n);s&&(4===_&&y===m||(a|=1024));const l=Te(n),u=Ce(n),d=ye(n)?t.getExternalModuleOrNamespaceExportName(h,n,!1,!0):t.getDeclarationName(n,!1,!0);let p=t.createLogicalOr(d,t.createAssignment(d,t.createObjectLiteralExpression()));if(ye(n)){const e=t.getLocalName(n,!1,!0);p=t.createAssignment(e,p)}const f=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,l)],void 0,function(e,n){const i=h,a=g,s=v;h=n,g=e,v=void 0;const c=[];let l,_;if(r(),e.body)if(269===e.body.kind)k(e.body,e=>de(c,TJ(e.statements,D,bu))),l=e.body.statements,_=e.body;else{const t=_e(e.body);t&&(nt(t)?de(c,t):c.push(t));l=qb(ue(e).body.statements,-1)}zd(c,o()),h=i,g=a,v=s;const u=t.createBlock(AI(t.createNodeArray(c),l),!0);AI(u,_),e.body&&269===e.body.kind||Ew(u,3072|ap(u));return u}(n,u)),void 0,[p]));return Cw(f,n),s&&(qw(f,void 0),Ww(f,void 0)),AI(f,n),Fw(f,a),i.push(f),i}function ue(e){if(268===e.body.kind){return ue(e.body)||e.body}}function pe(e){gn.assert(156!==e.phaseModifier);const n=De(e)?e.name:void 0,r=kJ(e.namedBindings,fe,uu);return n||r?t.updateImportClause(e,e.phaseModifier,n,r):void 0}function fe(e){if(275===e.kind)return De(e)?e:void 0;{const n=c.verbatimModuleSyntax,r=TJ(e.elements,me,BF);return n||X(r)?t.updateNamedImports(e,r):void 0}}function me(e){return!e.isTypeOnly&&De(e)?e:void 0}function ge(e){return e.isTypeOnly||!c.verbatimModuleSyntax&&!s.isValueAliasDeclaration(e)?void 0:e}function he(n){if(n.isTypeOnly)return;if(Pm(n)){if(!De(n))return;return IJ(n,T,e)}if(!function(e){return De(e)||!fO(m)&&s.isTopLevelValueImportEqualsWithEntityName(e)}(n))return;const r=bA(t,n.moduleReference);return Ew(r,7168),be(n)||!ye(n)?Cw(AI(t.createVariableStatement(TJ(n.modifiers,j,a_),t.createVariableDeclarationList([Cw(t.createVariableDeclaration(n.name,void 0,void 0,r),n)])),n),n):Cw((i=n.name,o=r,a=n,AI(t.createExpressionStatement(t.createAssignment(t.getNamespaceMemberName(h,i,!1,!0),o)),a)),n);var i,o,a}function ye(e){return void 0!==g&&Lv(e,32)}function ve(e){return void 0===g&&Lv(e,32)}function be(e){return ve(e)&&!Lv(e,2048)}function xe(e){const n=t.createAssignment(t.getExternalModuleOrNamespaceExportName(h,e,!1,!0),t.getLocalName(e));Ow(n,Jb(e.name?e.name.pos:e.pos,e.end));const r=t.createExpressionStatement(n);return Ow(r,Jb(-1,e.end)),r}function Se(e,n,r){return AI(t.createAssignment(ke(e),n),r)}function ke(e){return t.getNamespaceMemberName(h,e,!1,!0)}function Te(e){const n=t.getGeneratedNameForNode(e);return Ow(n,e.name),n}function Ce(e){return t.getGeneratedNameForNode(e)}function we(e){if(x&b&&!Yl(e)&&!CA(e)){const n=s.getReferencedExportContainer(e,!1);if(n&&308!==n.kind){if(2&b&&268===n.kind||8&b&&267===n.kind)return AI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(n),e),e)}}}function Ne(e){const n=function(e){if(FS(c))return;return bE(e)||xE(e)?s.getConstantValue(e):void 0}(e);if(void 0!==n){Gw(e,n);const i="string"==typeof n?t.createStringLiteral(n):n<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-n)):t.createNumericLiteral(n);if(!c.removeComments){const t=hc(e,Px);$w(i,3,` ${r=rp(t),r.replace(/\*\//g,"*_/")} `)}return i}var r;return e}function De(e){return c.verbatimModuleSyntax||Mm(e)||s.isReferencedAliasDeclaration(e)}}function uq(e){const{factory:t,getEmitHelperFactory:n,hoistVariableDeclaration:r,endLexicalEnvironment:i,startLexicalEnvironment:o,resumeLexicalEnvironment:a,addBlockScopedVariable:s}=e,c=e.getEmitResolver(),l=e.getCompilerOptions(),_=wS(l),u=zS(l),d=!!l.experimentalDecorators,p=!u,f=u&&_<9,m=p||f,g=_<9,h=_<99?-1:u?0:3,y=_<9,v=y&&_>=2,b=m||g||-1===h,x=e.onSubstituteNode;e.onSubstituteNode=function(e,n){if(n=x(e,n),1===e)return function(e){switch(e.kind){case 80:return function(e){return function(e){if(1&E&&c.hasNodeCheckFlag(e,536870912)){const n=c.getReferencedValueDeclaration(e);if(n){const r=k[n.id];if(r){const n=t.cloneNode(r);return Ow(n,e),Jw(n,e),n}}}return}(e)||e}(e);case 110:return function(e){if(2&E&&(null==N?void 0:N.data)&&!A.has(e)){const{facts:n,classConstructor:r,classThis:i}=N.data,o=j?i??r:r;if(o)return AI(Cw(t.cloneNode(o),e),e);if(1&n&&d)return t.createParenthesizedExpression(t.createVoidZero())}return e}(e)}return e}(n);return n};const S=e.onEmitNode;e.onEmitNode=function(e,t,n){const r=hc(t),i=F.get(r);if(i){const o=N,a=M;return N=i,M=j,j=!(RD(r)&&32&sp(r)),S(e,t,n),j=M,M=a,void(N=o)}switch(t.kind){case 219:if(DE(r)||524288&ap(t))break;case 263:case 177:case 178:case 179:case 175:case 173:{const r=N,i=M;return N=void 0,M=j,j=!1,S(e,t,n),j=M,M=i,void(N=r)}case 168:{const r=N,i=j;return N=null==N?void 0:N.previous,j=M,S(e,t,n),j=i,void(N=r)}}S(e,t,n)};let k,C,w,N,D=!1,E=0;const F=new Map,A=new Set;let I,L,j=!1,M=!1;return az(e,function(t){if(t.isDeclarationFile)return t;if(N=void 0,D=!!(32&sp(t)),!b&&!D)return t;const n=IJ(t,B,e);return Qw(n,e.readEmitHelpers()),n});function R(e){return 129===e.kind?ne()?void 0:e:at(e,a_)}function B(n){if(!(16777216&n.transformFlags||134234112&n.transformFlags))return n;switch(n.kind){case 264:return function(e){return ye(e,ve)}(n);case 232:return function(e){return ye(e,be)}(n);case 176:case 173:return gn.fail("Use `classElementVisitor` instead.");case 304:case 261:case 170:case 209:return function(t){ny(t,pe)&&(t=iq(e,t));return IJ(t,B,e)}(n);case 244:return function(t){const n=w;w=[];const r=IJ(t,B,e),i=X(w)?[r,...w]:r;return w=n,i}(n);case 278:return function(t){ny(t,pe)&&(t=iq(e,t,!0,t.isExportEquals?"":"default"));return IJ(t,B,e)}(n);case 81:return function(e){if(!g)return e;if(bu(e.parent))return e;return Cw(t.createIdentifier(""),e)}(n);case 212:return function(n){if(mD(n.name)){const e=Re(n.name);if(e)return AI(Cw(oe(e,n.expression),n),n)}if(v&&L&&pm(n)&&fD(n.name)&&dq(L)&&(null==N?void 0:N.data)){const{classConstructor:e,superClassReference:r,facts:i}=N.data;if(1&i)return Ee(n);if(e&&r){const i=t.createReflectGetCall(r,t.createStringLiteralFromNode(n.name),e);return Cw(i,n.expression),AI(i,n.expression),i}}return IJ(n,B,e)}(n);case 213:return function(n){if(v&&L&&pm(n)&&dq(L)&&(null==N?void 0:N.data)){const{classConstructor:e,superClassReference:r,facts:i}=N.data;if(1&i)return Ee(n);if(e&&r){const i=t.createReflectGetCall(r,kJ(n.argumentExpression,B,Q_),e);return Cw(i,n.expression),AI(i,n.expression),i}}return IJ(n,B,e)}(n);case 225:case 226:return ce(n,!1);case 227:return fe(n,!1);case 218:return me(n,!1);case 214:return function(n){var i;if(n_(n.expression)&&Re(n.expression.name)){const{thisArg:e,target:i}=t.createCallBinding(n.expression,r,_);return kl(n)?t.updateCallChain(n,t.createPropertyAccessChain(kJ(i,B,Q_),n.questionDotToken,"call"),void 0,void 0,[kJ(e,B,Q_),...TJ(n.arguments,B,Q_)]):t.updateCallExpression(n,t.createPropertyAccessExpression(kJ(i,B,Q_),"call"),void 0,[kJ(e,B,Q_),...TJ(n.arguments,B,Q_)])}if(v&&L&&pm(n.expression)&&dq(L)&&(null==(i=null==N?void 0:N.data)?void 0:i.classConstructor)){const e=t.createFunctionCallCall(kJ(n.expression,B,Q_),N.data.classConstructor,TJ(n.arguments,B,Q_));return Cw(e,n),AI(e,n),e}return IJ(n,B,e)}(n);case 245:return function(e){return t.updateExpressionStatement(e,kJ(e.expression,z,Q_))}(n);case 216:return function(n){var i;if(n_(n.tag)&&Re(n.tag.name)){const{thisArg:e,target:i}=t.createCallBinding(n.tag,r,_);return t.updateTaggedTemplateExpression(n,t.createCallExpression(t.createPropertyAccessExpression(kJ(i,B,Q_),"bind"),void 0,[kJ(e,B,Q_)]),void 0,kJ(n.template,B,V_))}if(v&&L&&pm(n.tag)&&dq(L)&&(null==(i=null==N?void 0:N.data)?void 0:i.classConstructor)){const e=t.createFunctionBindCall(kJ(n.tag,B,Q_),N.data.classConstructor,[]);return Cw(e,n),AI(e,n),t.updateTaggedTemplateExpression(n,e,void 0,kJ(n.template,B,V_))}return IJ(n,B,e)}(n);case 249:return function(n){return t.updateForStatement(n,kJ(n.initializer,z,su),kJ(n.condition,B,Q_),kJ(n.incrementor,z,Q_),PJ(n.statement,B,e))}(n);case 110:return function(e){if(y&&L&&RD(L)&&(null==N?void 0:N.data)){const{classThis:t,classConstructor:n}=N.data;return t??n??e}return e}(n);case 263:case 219:return Y(void 0,J,n);case 177:case 175:case 178:case 179:return Y(n,J,n);default:return J(n)}}function J(t){return IJ(t,B,e)}function z(e){switch(e.kind){case 225:case 226:return ce(e,!0);case 227:return fe(e,!0);case 357:return function(e,n){const r=n?AJ(e.elements,z):AJ(e.elements,B,z);return t.updateCommaListExpression(e,r)}(e,!0);case 218:return me(e,!0);default:return B(e)}}function q(n){switch(n.kind){case 299:return IJ(n,q,e);case 234:return function(n){var i;if(4&((null==(i=null==N?void 0:N.data)?void 0:i.facts)||0)){const e=t.createTempVariable(r,!0);return Fe().superClassReference=e,t.updateExpressionWithTypeArguments(n,t.createAssignment(e,kJ(n.expression,B,Q_)),void 0)}return IJ(n,B,e)}(n);default:return B(n)}}function U(e){switch(e.kind){case 211:case 210:return Ue(e);default:return B(e)}}function V(e){switch(e.kind){case 177:return Y(e,H,e);case 178:case 179:case 175:return Y(e,Q,e);case 173:return Y(e,re,e);case 176:return Y(e,xe,e);case 168:return K(e);case 241:return e;default:return k_(e)?R(e):B(e)}}function W(e){return 168===e.kind?K(e):B(e)}function $(e){switch(e.kind){case 173:return te(e);case 178:case 179:return V(e);default:gn.assertMissingNode(e,"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration")}}function K(e){const n=kJ(e.expression,B,Q_);return t.updateComputedPropertyName(e,function(e){return X(C)&&(wE(e)?(C.push(e.expression),e=t.updateParenthesizedExpression(e,t.inlineExpressions(C))):(C.push(e),e=t.inlineExpressions(C)),C=void 0),e}(n))}function H(e){return I?ke(e,I):J(e)}function G(e){return!!g||!!(Mv(e)&&32&sp(e))}function Q(n){if(gn.assert(!Uv(n)),!t_(n)||!G(n))return IJ(n,V,e);const r=Re(n.name);if(gn.assert(r,"Undeclared private name for property declaration."),!r.isValid)return n;const i=function(e){gn.assert(mD(e.name));const t=Re(e.name);if(gn.assert(t,"Undeclared private name for property declaration."),"m"===t.kind)return t.methodName;if("a"===t.kind){if(Ou(e))return t.getterName;if(Iu(e))return t.setterName}}(n);i&&Ae().push(t.createAssignment(i,t.createFunctionExpression(P(n.modifiers,e=>a_(e)&&!SD(e)&&!CD(e)),n.asteriskToken,i,void 0,DJ(n.parameters,B,e),void 0,FJ(n.body,B,e))))}function Y(e,t,n){if(e!==L){const r=L;L=e;const i=t(n);return L=r,i}return t(n)}function Z(e){const n=Bw(e),i=Iw(e),o=e.name;let a=o,s=o;if(FD(o)&&!gz(o.expression)){const e=DI(o);if(e)a=t.updateComputedPropertyName(o,kJ(o.expression,B,Q_)),s=t.updateComputedPropertyName(o,e.left);else{const e=t.createTempVariable(r);Ow(e,o.expression);const n=kJ(o.expression,B,Q_),i=t.createAssignment(e,n);Ow(i,o.expression),a=t.updateComputedPropertyName(o,i),s=t.updateComputedPropertyName(o,e)}}const c=TJ(e.modifiers,R,a_),l=CI(t,e,c,e.initializer);Cw(l,e),Ew(l,3072),Ow(l,i);const _=jv(e)?function(){const e=Fe();return e.classThis??e.classConstructor??(null==I?void 0:I.name)}()??t.createThis():t.createThis(),u=wI(t,e,c,a,_);Cw(u,e),Jw(u,n),Ow(u,i);const d=t.createModifiersFromModifierFlags(eb(c)),p=NI(t,e,d,s,_);return Cw(p,e),Ew(p,3072),Ow(p,i),CJ([l,u,p],$,h_)}function ee(e){if(m&&!b_(e)){const n=function(e,n){if(FD(e)){const i=DI(e),o=kJ(e.expression,B,Q_),a=Fl(o),l=gz(a);if(!(!!i||ub(a)&&Yl(a.left))&&!l&&n){const n=t.getGeneratedNameForNode(e);return c.hasNodeCheckFlag(e,32768)?s(n):r(n),t.createAssignment(n,o)}return l||fD(a)?void 0:o}}(e.name,!!e.initializer||u);if(n&&Ae().push(...FI(n)),jv(e)&&!g){const n=we(e,t.createThis());if(n){const r=t.createClassStaticBlockDeclaration(t.createBlock([n]));return Cw(r,e),Jw(r,e),Jw(n,{pos:-1,end:-1}),qw(n,void 0),Ww(n,void 0),r}}return}return t.updatePropertyDeclaration(e,TJ(e.modifiers,R,a_),kJ(e.name,W,c_),void 0,void 0,kJ(e.initializer,B,Q_))}function te(n){return gn.assert(!Uv(n),"Decorators should already have been transformed and elided."),t_(n)?function(n){if(G(n)){const e=Re(n.name);if(gn.assert(e,"Undeclared private name for property declaration."),!e.isValid)return n;if(e.isStatic&&!g){const e=we(n,t.createThis());if(e)return t.createClassStaticBlockDeclaration(t.createBlock([e],!0))}return}return p&&!jv(n)&&(null==N?void 0:N.data)&&16&N.data.facts?t.updatePropertyDeclaration(n,TJ(n.modifiers,B,k_),n.name,void 0,void 0,void 0):(ny(n,pe)&&(n=iq(e,n)),t.updatePropertyDeclaration(n,TJ(n.modifiers,R,a_),kJ(n.name,W,c_),void 0,void 0,kJ(n.initializer,B,Q_)))}(n):ee(n)}function ne(){return-1===h||3===h&&!!(null==N?void 0:N.data)&&!!(16&N.data.facts)}function re(e){return b_(e)&&(ne()||Mv(e)&&32&sp(e))?Z(e):te(e)}function ie(e){if(L&&Mv(L)&&v_(L)&&b_(hc(L))){const t=LA(e);110===t.kind&&A.add(t)}}function oe(e,t){return ie(t=kJ(t,B,Q_)),ae(e,t)}function ae(e,t){switch(Jw(t,qb(t,-1)),e.kind){case"a":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.getterName);case"m":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.methodName);case"f":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return gn.fail("Access helpers should not be created for untransformed private elements");default:gn.assertNever(e,"Unknown private element type")}}function ce(n,i){if(46===n.operator||47===n.operator){const e=ph(n.operand);if(n_(e)){let o;if(o=Re(e.name)){const a=kJ(e.expression,B,Q_);ie(a);const{readExpression:s,initializeExpression:c}=_e(a);let l=oe(o,s);const _=IE(n)||i?void 0:t.createTempVariable(r);return l=kA(t,n,l,r,_),l=ge(o,c||s,l,64),Cw(l,n),AI(l,n),_&&(l=t.createComma(l,_),AI(l,n)),l}}else if(v&&L&&pm(e)&&dq(L)&&(null==N?void 0:N.data)){const{classConstructor:o,superClassReference:a,facts:s}=N.data;if(1&s){const r=Ee(e);return IE(n)?t.updatePrefixUnaryExpression(n,r):t.updatePostfixUnaryExpression(n,r)}if(o&&a){let s,c;if(bE(e)?fD(e.name)&&(c=s=t.createStringLiteralFromNode(e.name)):gz(e.argumentExpression)?c=s=e.argumentExpression:(c=t.createTempVariable(r),s=t.createAssignment(c,kJ(e.argumentExpression,B,Q_))),s&&c){let l=t.createReflectGetCall(a,c,o);AI(l,e);const _=i?void 0:t.createTempVariable(r);return l=kA(t,n,l,r,_),l=t.createReflectSetCall(a,s,l,o),Cw(l,n),AI(l,n),_&&(l=t.createComma(l,_),AI(l,n)),l}}}}return IJ(n,B,e)}function _e(e){const n=sy(e)?e:t.cloneNode(e);if(110===e.kind&&A.has(e)&&A.add(n),gz(e))return{readExpression:n,initializeExpression:void 0};const i=t.createTempVariable(r);return{readExpression:i,initializeExpression:t.createAssignment(i,n)}}function ue(e){if(N&&F.set(hc(e),N),g){if(Hz(e)){const t=kJ(e.body.statements[0].expression,B,Q_);if(ub(t,!0)&&t.left===t.right)return;return t}if(Zz(e))return kJ(e.body.statements[0].expression,B,Q_);o();let n=Y(e,e=>TJ(e,B,bu),e.body.statements);n=t.mergeLexicalEnvironment(n,i());const r=t.createImmediatelyInvokedArrowFunction(n);return Cw(ph(r.expression),e),Fw(ph(r.expression),4),Cw(r,e),AI(r,e),r}}function pe(e){if(JE(e)&&!e.name){const t=Tz(e);if(X(t,Zz))return!1;return(g||!!sp(e))&&X(t,e=>RD(e)||t_(e)||m&&Cz(e))}return!1}function fe(i,o){if(db(i)){const e=C;C=void 0,i=t.updateBinaryExpression(i,kJ(i.left,U,Q_),i.operatorToken,kJ(i.right,B,Q_));const n=X(C)?t.inlineExpressions(se([...C,i])):i;return C=e,n}if(ub(i)){ny(i,pe)&&(i=iq(e,i),gn.assertNode(i,ub));const n=LA(i.left,9);if(n_(n)){const e=Re(n.name);if(e)return AI(Cw(ge(e,n.expression,i.right,i.operatorToken.kind),i),i)}else if(v&&L&&pm(i.left)&&dq(L)&&(null==N?void 0:N.data)){const{classConstructor:e,superClassReference:n,facts:a}=N.data;if(1&a)return t.updateBinaryExpression(i,Ee(i.left),i.operatorToken,kJ(i.right,B,Q_));if(e&&n){let a=xE(i.left)?kJ(i.left.argumentExpression,B,Q_):fD(i.left.name)?t.createStringLiteralFromNode(i.left.name):void 0;if(a){let s=kJ(i.right,B,Q_);if(hz(i.operatorToken.kind)){let o=a;gz(a)||(o=t.createTempVariable(r),a=t.createAssignment(o,a));const c=t.createReflectGetCall(n,o,e);Cw(c,i.left),AI(c,i.left),s=t.createBinaryExpression(c,yz(i.operatorToken.kind),s),AI(s,i)}const c=o?void 0:t.createTempVariable(r);return c&&(s=t.createAssignment(c,s),AI(c,i)),s=t.createReflectSetCall(n,a,s,e),Cw(s,i),AI(s,i),c&&(s=t.createComma(s,c),AI(s,i)),s}}}}return function(e){return mD(e.left)&&103===e.operatorToken.kind}(i)?function(t){const r=Re(t.left);if(r){const e=kJ(t.right,B,Q_);return Cw(n().createClassPrivateFieldInHelper(r.brandCheckIdentifier,e),t)}return IJ(t,B,e)}(i):IJ(i,B,e)}function me(e,n){const r=n?z:B,i=kJ(e.expression,r,Q_);return t.updateParenthesizedExpression(e,i)}function ge(e,r,i,o){if(r=kJ(r,B,Q_),i=kJ(i,B,Q_),ie(r),hz(o)){const{readExpression:n,initializeExpression:a}=_e(r);r=a||n,i=t.createBinaryExpression(ae(e,n),yz(o),i)}switch(Jw(r,qb(r,-1)),e.kind){case"a":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.setterName);case"m":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,void 0);case"f":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return gn.fail("Access helpers should not be created for untransformed private elements");default:gn.assertNever(e,"Unknown private element type")}}function he(e){return P(e.members,wz)}function ye(n,r){var i;const o=I,a=C,s=N;I=n,C=void 0,N={previous:N,data:void 0};const l=32&sp(n);if(g||l){const e=Ac(n);if(e&&fD(e))Pe().data.className=e;else if((null==(i=n.emitNode)?void 0:i.assignedName)&&QN(n.emitNode.assignedName))if(n.emitNode.assignedName.textSourceNode&&fD(n.emitNode.assignedName.textSourceNode))Pe().data.className=n.emitNode.assignedName.textSourceNode;else if(Ss(n.emitNode.assignedName.text,_)){const e=t.createIdentifier(n.emitNode.assignedName.text);Pe().data.className=e}}if(g){const e=he(n);X(e)&&(Pe().data.weakSetName=je("instances",e[0].name))}const u=function(e){var t;let n=0;const r=hc(e);y_(r)&&km(d,r)&&(n|=1),g&&(Gz(e)||eq(e))&&(n|=2);let i=!1,o=!1,a=!1,s=!1;for(const r of e.members)jv(r)?(r.name&&(mD(r.name)||b_(r))&&g?n|=2:!b_(r)||-1!==h||e.name||(null==(t=e.emitNode)?void 0:t.classThis)||(n|=2),(LD(r)||RD(r))&&(y&&16384&r.transformFlags&&(n|=8,1&n||(n|=2)),v&&134217728&r.transformFlags&&(1&n||(n|=6)))):Bv(hc(r))||(b_(r)?(s=!0,a||(a=t_(r))):t_(r)?(a=!0,c.hasNodeCheckFlag(r,262144)&&(n|=2)):LD(r)&&(i=!0,o||(o=!!r.initializer)));return(f&&i||p&&o||g&&a||g&&s&&-1===h)&&(n|=16),n}(n);u&&(Fe().facts=u),8&u&&(2&E||(E|=2,e.enableSubstitution(110),e.enableEmitNotification(263),e.enableEmitNotification(219),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(179),e.enableEmitNotification(175),e.enableEmitNotification(173),e.enableEmitNotification(168)));const m=r(n,u);return N=null==N?void 0:N.previous,gn.assert(N===s),I=o,C=a,m}function ve(e,n){var i,o;let a;if(2&n)if(g&&(null==(i=e.emitNode)?void 0:i.classThis))Fe().classConstructor=e.emitNode.classThis,a=t.createAssignment(e.emitNode.classThis,t.getInternalName(e));else{const n=t.createTempVariable(r,!0);Fe().classConstructor=t.cloneNode(n),a=t.createAssignment(n,t.getInternalName(e))}(null==(o=e.emitNode)?void 0:o.classThis)&&(Fe().classThis=e.emitNode.classThis);const s=c.hasNodeCheckFlag(e,262144),l=Lv(e,32),_=Lv(e,2048);let u=TJ(e.modifiers,R,a_);const d=TJ(e.heritageClauses,q,lP),{members:f,prologue:m}=Se(e),h=[];if(a&&Ae().unshift(a),X(C)&&h.push(t.createExpressionStatement(t.inlineExpressions(C))),p||g||32&sp(e)){const n=Tz(e);X(n)&&Ce(h,n,t.getInternalName(e))}h.length>0&&l&&_&&(u=TJ(u,e=>vI(e)?void 0:e,a_),h.push(t.createExportAssignment(void 0,!1,t.getLocalName(e,!1,!0))));const y=Fe().classConstructor;s&&y&&(De(),k[rz(e)]=y);const v=t.updateClassDeclaration(e,u,e.name,void 0,d,f);return h.unshift(v),m&&h.unshift(t.createExpressionStatement(m)),h}function be(e,n){var i,o,a;const l=!!(1&n),_=Tz(e),u=c.hasNodeCheckFlag(e,262144),d=c.hasNodeCheckFlag(e,32768);let p;function f(){var n;if(g&&(null==(n=e.emitNode)?void 0:n.classThis))return Fe().classConstructor=e.emitNode.classThis;const i=t.createTempVariable(d?s:r,!0);return Fe().classConstructor=t.cloneNode(i),i}(null==(i=e.emitNode)?void 0:i.classThis)&&(Fe().classThis=e.emitNode.classThis),2&n&&(p??(p=f()));const h=TJ(e.modifiers,R,a_),y=TJ(e.heritageClauses,q,lP),{members:v,prologue:b}=Se(e),x=t.updateClassExpression(e,h,e.name,void 0,y,v),S=[];b&&S.push(b);if((g||32&sp(e))&&X(_,e=>RD(e)||t_(e)||m&&Cz(e))||X(C))if(l)gn.assertIsDefined(w,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),X(C)&&de(w,O(C,t.createExpressionStatement)),X(_)&&Ce(w,_,(null==(o=e.emitNode)?void 0:o.classThis)??t.getInternalName(e)),p?S.push(t.createAssignment(p,x)):g&&(null==(a=e.emitNode)?void 0:a.classThis)?S.push(t.createAssignment(e.emitNode.classThis,x)):S.push(x);else{if(p??(p=f()),u){De();const n=t.cloneNode(p);n.emitNode.autoGenerate.flags&=-9,k[rz(e)]=n}S.push(t.createAssignment(p,x)),de(S,C),de(S,function(e,t){const n=[];for(const r of e){const e=RD(r)?Y(r,ue,r):Y(r,()=>Ne(r,t),void 0);e&&(MA(e),Cw(e,r),Fw(e,3072&ap(r)),Ow(e,Vb(r)),Jw(e,r),n.push(e))}return n}(_,p)),S.push(t.cloneNode(p))}else S.push(x);return S.length>1&&(Fw(x,131072),S.forEach(MA)),t.inlineExpressions(S)}function xe(t){if(!g)return IJ(t,B,e)}function Se(e){const n=!!(32&sp(e));if(g||D){for(const t of e.members)if(t_(t))if(G(t))Le(t,t.name,Ie);else{Iz(Pe(),t.name,{kind:"untransformed"})}if(g&&X(he(e))&&function(){const{weakSetName:e}=Pe().data;gn.assert(e,"weakSetName should be set in private identifier environment"),Ae().push(t.createAssignment(e,t.createNewExpression(t.createIdentifier("WeakSet"),void 0,[])))}(),ne())for(const r of e.members)if(b_(r)){const e=t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage");if(g||n&&Mv(r))Le(r,e,Oe);else{Iz(Pe(),e,{kind:"untransformed"})}}}let i,o,a,s=TJ(e.members,V,h_);if(X(s,BD)||(i=ke(void 0,e)),!g&&X(C)){let e=t.createExpressionStatement(t.inlineExpressions(C));if(134234112&e.transformFlags){const n=t.createTempVariable(r),i=t.createArrowFunction(void 0,void 0,[],void 0,void 0,t.createBlock([e]));o=t.createAssignment(n,i),e=t.createExpressionStatement(t.createCallExpression(n,void 0,[]))}const n=t.createBlock([e]);a=t.createClassStaticBlockDeclaration(n),C=void 0}if(i||a){let n;const r=T(s,Hz),o=T(s,Zz);n=le(n,r),n=le(n,o),n=le(n,i),n=le(n,a);n=de(n,r||o?P(s,e=>e!==r&&e!==o):s),s=AI(t.createNodeArray(n),e.members)}return{members:s,prologue:o}}function ke(n,r){if(n=kJ(n,B,BD),!((null==N?void 0:N.data)&&16&N.data.facts))return n;const o=Ch(r),s=!(!o||106===LA(o.expression).kind),c=DJ(n?n.parameters:void 0,B,e),l=function(n,r,o){var s;const c=Sz(n,!1,!1);let l=c;u||(l=P(l,e=>!!e.initializer||mD(e.name)||zv(e)));const _=he(n),d=X(l)||X(_);if(!r&&!d)return FJ(void 0,B,e);a();const p=!r&&o;let f=0,m=[];const h=[],y=t.createThis();if(function(e,n,r){if(!g||!X(n))return;const{weakSetName:i}=Pe().data;gn.assert(i,"weakSetName should be set in private identifier environment"),e.push(t.createExpressionStatement(function(e,t,n){return e.createCallExpression(e.createPropertyAccessExpression(n,"add"),void 0,[t])}(t,r,i)))}(h,_,y),r){const e=P(c,e=>ac(hc(e),r)),t=P(l,e=>!ac(hc(e),r));Ce(h,e,y),Ce(h,t,y)}else Ce(h,l,y);if(null==r?void 0:r.body){f=t.copyPrologue(r.body.statements,m,!1,B);const e=xz(r.body.statements,f);if(e.length)Te(m,r.body.statements,f,e,0,h,r);else{for(;f=m.length?r.body.multiLine??m.length>0:m.length>0;return AI(t.createBlock(AI(t.createNodeArray(m),(null==(s=null==r?void 0:r.body)?void 0:s.statements)??n.members),v),null==r?void 0:r.body)}(r,n,s);return l?n?(gn.assert(c),t.updateConstructorDeclaration(n,void 0,c,l)):MA(Cw(AI(t.createConstructorDeclaration(void 0,c??[],l),n||r),n)):n}function Te(e,n,r,i,o,a,s){const c=i[o],l=n[c];if(de(e,TJ(n,B,bu,r,c-r)),r=c+1,mF(l)){const n=[];Te(n,l.tryBlock.statements,0,i,o+1,a,s);AI(t.createNodeArray(n),l.tryBlock.statements),e.push(t.updateTryStatement(l,t.updateBlock(l.tryBlock,n),kJ(l.catchClause,B,_P),kJ(l.finallyBlock,B,YE)))}else{for(de(e,TJ(n,B,bu,c,1));rl(e,p,t),serializeTypeOfNode:(e,t,n)=>l(e,_,t,n),serializeParameterTypesOfNode:(e,t,n)=>l(e,u,t,n),serializeReturnTypeOfNode:(e,t)=>l(e,d,t)};function l(e,t,n,r){const i=s,o=c;s=e.currentLexicalScope,c=e.currentNameScope;const a=void 0===r?t(n):t(n,r);return s=i,c=o,a}function _(e,n){switch(e.kind){case 173:case 170:return p(e.type);case 179:case 178:return p(function(e,t){const n=bv(t.members,e);return n.setAccessor&&pv(n.setAccessor)||n.getAccessor&&kv(n.getAccessor)}(e,n));case 264:case 232:case 175:return t.createIdentifier("Function");default:return t.createVoidZero()}}function u(e,n){const r=y_(e)?uv(e):__(e)&&Ld(e.body)?e:void 0,i=[];if(r){const e=function(e,t){if(t&&178===e.kind){const{setAccessor:n}=bv(t.members,e);if(n)return n.parameters}return e.parameters}(r,n),t=e.length;for(let r=0;re.parent&&iE(e.parent)&&(e.parent.trueType===e||e.parent.falseType===e)))return t.createIdentifier("Object");const r=y(e.typeName),o=t.createTempVariable(n);return t.createConditionalExpression(t.createTypeCheck(t.createAssignment(o,r),"function"),void 0,o,void 0,t.createIdentifier("Object"));case 1:return v(e.typeName);case 2:return t.createVoidZero();case 4:return b("BigInt",7);case 6:return t.createIdentifier("Boolean");case 3:return t.createIdentifier("Number");case 5:return t.createIdentifier("String");case 7:return t.createIdentifier("Array");case 8:return b("Symbol",2);case 10:return t.createIdentifier("Function");case 9:return t.createIdentifier("Promise");case 11:return t.createIdentifier("Object");default:return gn.assertNever(i)}}(e);case 194:return m(e.types,!0);case 193:return m(e.types,!1);case 195:return m([e.trueType,e.falseType],!1);case 199:if(148===e.operator)return p(e.type);break;case 187:case 200:case 201:case 188:case 133:case 159:case 198:case 206:case 313:case 314:case 318:case 319:case 320:break;case 315:case 316:case 317:return p(e.type);default:return gn.failBadSyntaxKind(e)}return t.createIdentifier("Object")}function f(e){switch(e.kind){case 11:case 15:return t.createIdentifier("String");case 225:{const t=e.operand;switch(t.kind){case 9:case 10:return f(t);default:return gn.failBadSyntaxKind(t)}}case 9:return t.createIdentifier("Number");case 10:return b("BigInt",7);case 112:case 97:return t.createIdentifier("Boolean");case 106:return t.createVoidZero();default:return gn.failBadSyntaxKind(e)}}function m(e,n){let r;for(let i of e){if(i=dh(i),146===i.kind){if(n)return t.createVoidZero();continue}if(159===i.kind){if(!n)return t.createIdentifier("Object");continue}if(133===i.kind)return t.createIdentifier("Object");if(!a&&(uE(i)&&106===i.literal.kind||157===i.kind))continue;const e=p(i);if(fD(e)&&"Object"===e.escapedText)return e;if(r){if(!g(r,e))return t.createIdentifier("Object")}else r=e}return r??t.createVoidZero()}function g(e,t){return Yl(e)?Yl(t):fD(e)?fD(t)&&e.escapedText===t.escapedText:bE(e)?bE(t)&&g(e.expression,t.expression)&&g(e.name,t.name):PE(e)?PE(t)&&GN(e.expression)&&"0"===e.expression.text&&GN(t.expression)&&"0"===t.expression.text:QN(e)?QN(t)&&e.text===t.text:FE(e)?FE(t)&&g(e.expression,t.expression):wE(e)?wE(t)&&g(e.expression,t.expression):jE(e)?jE(t)&&g(e.condition,t.condition)&&g(e.whenTrue,t.whenTrue)&&g(e.whenFalse,t.whenFalse):!!LE(e)&&(LE(t)&&e.operatorToken.kind===t.operatorToken.kind&&g(e.left,t.left)&&g(e.right,t.right))}function h(e,n){return t.createLogicalAnd(t.createStrictInequality(t.createTypeOfExpression(e),t.createStringLiteral("undefined")),n)}function y(e){if(80===e.kind){const t=v(e);return h(t,t)}if(80===e.left.kind)return h(v(e.left),v(e));const r=y(e.left),i=t.createTempVariable(n);return t.createLogicalAnd(t.createLogicalAnd(r.left,t.createStrictInequality(t.createAssignment(i,r.right),t.createVoidZero())),t.createPropertyAccessExpression(i,e.right))}function v(e){switch(e.kind){case 80:const n=jT(AI(jI.cloneNode(e),e),e.parent);return n.original=void 0,jT(n,bc(s)),n;case 167:return function(e){return t.createPropertyAccessExpression(v(e.left),e.right)}(e)}}function b(e,n){return ovI(e)||ID(e)?void 0:e,k_),f=Vb(o),m=function(n){if(i.hasNodeCheckFlag(n,262144)){c||(e.enableSubstitution(80),c=[]);const i=t.createUniqueName(n.name&&!Yl(n.name)?kc(n.name):"default");return c[rz(n)]=i,r(i),i}}(o),h=a<2?t.getInternalName(o,!1,!0):t.getLocalName(o,!1,!0),y=TJ(o.heritageClauses,_,lP);let v=TJ(o.members,_,h_),b=[];({members:v,decorationStatements:b}=p(o,v));const x=a>=9&&!!m&&X(v,e=>LD(e)&&Lv(e,256)||RD(e));x&&(v=AI(t.createNodeArray([t.createClassStaticBlockDeclaration(t.createBlock([t.createExpressionStatement(t.createAssignment(m,t.createThis()))])),...v]),v));const S=t.createClassExpression(d,s&&Yl(s)?void 0:s,void 0,y,v);Cw(S,o),AI(S,f);const k=m&&!x?t.createAssignment(m,S):S,T=t.createVariableDeclaration(h,void 0,void 0,k);Cw(T,o);const C=t.createVariableDeclarationList([T],1),w=t.createVariableStatement(void 0,C);Cw(w,o),AI(w,f),Jw(w,o);const N=[w];if(de(N,b),function(e,r){const i=function(e){const r=Dz(e,!0),i=g(r);if(!i)return;const o=c&&c[rz(e)],s=a<2?t.getInternalName(e,!1,!0):t.getDeclarationName(e,!1,!0),l=n().createDecorateHelper(i,s),_=t.createAssignment(s,o?t.createAssignment(o,l):l);return Ew(_,3072),Ow(_,Vb(e)),_}(r);i&&e.push(Cw(t.createExpressionStatement(i),r))}(N,o),l)if(u){const e=t.createExportDefault(h);N.push(e)}else{const e=t.createExternalModuleExport(t.getDeclarationName(o));N.push(e)}return N}(o,o.name):function(e,n){const r=TJ(e.modifiers,l,a_),i=TJ(e.heritageClauses,_,lP);let o=TJ(e.members,_,h_),a=[];({members:o,decorationStatements:a}=p(e,o));const s=t.updateClassDeclaration(e,r,n,void 0,i,o);return de([s],a)}(o,o.name);return Ne(s)}(o);case 232:return function(e){return t.updateClassExpression(e,TJ(e.modifiers,l,a_),e.name,void 0,TJ(e.heritageClauses,_,lP),TJ(e.members,_,h_))}(o);case 177:return function(e){return t.updateConstructorDeclaration(e,TJ(e.modifiers,l,a_),TJ(e.parameters,_,AD),kJ(e.body,_,YE))}(o);case 175:return function(e){return f(t.updateMethodDeclaration(e,TJ(e.modifiers,l,a_),e.asteriskToken,gn.checkDefined(kJ(e.name,_,c_)),void 0,void 0,TJ(e.parameters,_,AD),void 0,kJ(e.body,_,YE)),e)}(o);case 179:return function(e){return f(t.updateSetAccessorDeclaration(e,TJ(e.modifiers,l,a_),gn.checkDefined(kJ(e.name,_,c_)),TJ(e.parameters,_,AD),kJ(e.body,_,YE)),e)}(o);case 178:return function(e){return f(t.updateGetAccessorDeclaration(e,TJ(e.modifiers,l,a_),gn.checkDefined(kJ(e.name,_,c_)),TJ(e.parameters,_,AD),void 0,kJ(e.body,_,YE)),e)}(o);case 173:return function(e){if(33554432&e.flags||Lv(e,128))return;return f(t.updatePropertyDeclaration(e,TJ(e.modifiers,l,a_),gn.checkDefined(kJ(e.name,_,c_)),void 0,void 0,kJ(e.initializer,_,Q_)),e)}(o);case 170:return function(e){const n=t.updateParameterDeclaration(e,bI(t,e.modifiers),e.dotDotDotToken,gn.checkDefined(kJ(e.name,_,l_)),void 0,void 0,kJ(e.initializer,_,Q_));n!==e&&(Jw(n,e),AI(n,Vb(e)),Ow(n,Vb(e)),Ew(n.name,64));return n}(o);default:return IJ(o,_,e)}}function u(e){return!!(536870912&e.transformFlags)}function d(e){return X(e,u)}function p(e,n){let r=[];return h(r,e,!1),h(r,e,!0),function(e){for(const t of e.members){if(!OI(t))continue;const n=Ez(t,e,!0);if(X(null==n?void 0:n.decorators,u))return!0;if(X(null==n?void 0:n.parameters,d))return!0}return!1}(e)&&(n=AI(t.createNodeArray([...n,t.createClassStaticBlockDeclaration(t.createBlock(r,!0))]),n),r=void 0),{decorationStatements:r,members:n}}function f(e,t){return e!==t&&(Jw(e,t),Ow(e,Vb(t))),e}function m(e){return HN(e.expression,"___metadata")}function g(e){if(!e)return;const{false:t,true:n}=$e(e.decorators,m),r=[];return de(r,O(t,v)),de(r,R(e.parameters,b)),de(r,O(n,v)),r}function h(e,n,r){de(e,O(function(e,t){const n=function(e,t){return P(e.members,n=>{return i=t,xm(!0,r=n,e)&&i===jv(r);var r,i})}(e,t);let r;for(const t of n)r=le(r,y(e,t));return r}(n,r),e=>t.createExpressionStatement(e)))}function y(e,r){const i=g(Ez(r,e,!0));if(!i)return;const o=function(e,n){return jv(n)?t.getDeclarationName(e):function(e){return t.createPropertyAccessExpression(t.getDeclarationName(e),"prototype")}(e)}(e,r),a=function(e,n){const r=e.name;return mD(r)?t.createIdentifier(""):FD(r)?n&&!gz(r.expression)?t.getGeneratedNameForNode(r):r.expression:fD(r)?t.createStringLiteral(kc(r)):t.cloneNode(r)}(r,!Lv(r,128)),s=LD(r)&&!zv(r)?t.createVoidZero():t.createNull(),c=n().createDecorateHelper(i,o,a,s);return Ew(c,3072),Ow(c,Vb(r)),c}function v(e){return gn.checkDefined(kJ(e.expression,_,Q_))}function b(e,t){let r;if(e){r=[];for(const i of e){const e=n().createParamHelper(v(i),t);AI(e,i.expression),Ew(e,3072),r.push(e)}}return r}}function mq(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=wS(e.getCompilerOptions());let s,c,l,_,u,d;return az(e,function(t){s=void 0,d=!1;const n=IJ(t,b,e);Qw(n,e.readEmitHelpers()),d&&(Aw(n,32),d=!1);return n});function p(){switch(c=void 0,l=void 0,_=void 0,null==s?void 0:s.kind){case"class":c=s.classInfo;break;case"class-element":c=s.next.classInfo,l=s.classThis,_=s.classSuper;break;case"name":const e=s.next.next.next;"class-element"===(null==e?void 0:e.kind)&&(c=e.next.classInfo,l=e.classThis,_=e.classSuper)}}function f(e){s={kind:"class",next:s,classInfo:e,savedPendingExpressions:u},u=void 0,p()}function m(){gn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`),u=s.savedPendingExpressions,s=s.next,p()}function g(e){var t,n;gn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`),s={kind:"class-element",next:s},(RD(e)||LD(e)&&Mv(e))&&(s.classThis=null==(t=s.next.classInfo)?void 0:t.classThis,s.classSuper=null==(n=s.next.classInfo)?void 0:n.classSuper),p()}function h(){var e;gn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`),gn.assert("class"===(null==(e=s.next)?void 0:e.kind),"Incorrect value for top.next.kind.",()=>{var e;return`Expected top.next.kind to be 'class' but got '${null==(e=s.next)?void 0:e.kind}' instead.`}),s=s.next,p()}function y(){gn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`),s={kind:"name",next:s},p()}function v(){gn.assert("name"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'name' but got '${null==s?void 0:s.kind}' instead.`),s=s.next,p()}function b(n){if(!function(e){return!!(33554432&e.transformFlags)||!!l&&!!(16384&e.transformFlags)||!!l&&!!_&&!!(134217728&e.transformFlags)}(n))return n;switch(n.kind){case 171:return gn.fail("Use `modifierVisitor` instead.");case 264:return function(n){if(D(n)){const r=[],i=hc(n,y_)??n,o=i.name?t.createStringLiteralFromNode(i.name):t.createStringLiteral("default"),a=Lv(n,32),s=Lv(n,2048);if(n.name||(n=nq(e,n,o)),a&&s){const e=N(n);if(n.name){const i=t.createVariableDeclaration(t.getLocalName(n),void 0,void 0,e);Cw(i,n);const o=t.createVariableDeclarationList([i],1),a=t.createVariableStatement(void 0,o);r.push(a);const s=t.createExportDefault(t.getDeclarationName(n));Cw(s,n),Jw(s,Bw(n)),Ow(s,Ub(n)),r.push(s)}else{const i=t.createExportDefault(e);Cw(i,n),Jw(i,Bw(n)),Ow(i,Ub(n)),r.push(i)}}else{gn.assertIsDefined(n.name,"A class declaration that is not a default export must have a name.");const e=N(n),i=a?e=>gD(e)?void 0:S(e):S,o=TJ(n.modifiers,i,a_),s=t.getLocalName(n,!1,!0),c=t.createVariableDeclaration(s,void 0,void 0,e);Cw(c,n);const l=t.createVariableDeclarationList([c],1),_=t.createVariableStatement(o,l);if(Cw(_,n),Jw(_,Bw(n)),r.push(_),a){const e=t.createExternalModuleExport(s);Cw(e,n),r.push(e)}}return Ne(r)}{const e=TJ(n.modifiers,S,a_),r=TJ(n.heritageClauses,b,lP);f(void 0);const i=TJ(n.members,k,h_);return m(),t.updateClassDeclaration(n,e,n.name,void 0,r,i)}}(n);case 232:return function(e){if(D(e)){const t=N(e);return Cw(t,e),t}{const n=TJ(e.modifiers,S,a_),r=TJ(e.heritageClauses,b,lP);f(void 0);const i=TJ(e.members,k,h_);return m(),t.updateClassExpression(e,n,e.name,void 0,r,i)}}(n);case 177:case 173:case 176:return gn.fail("Not supported outside of a class. Use 'classElementVisitor' instead.");case 170:return function(n){ny(n,I)&&(n=iq(e,n,L(n.initializer)));const r=t.updateParameterDeclaration(n,void 0,n.dotDotDotToken,kJ(n.name,b,l_),void 0,void 0,kJ(n.initializer,b,Q_));r!==n&&(Jw(r,n),AI(r,Vb(n)),Ow(r,Vb(n)),Ew(r.name,64));return r}(n);case 227:return j(n,!1);case 304:case 261:case 209:return function(t){ny(t,I)&&(t=iq(e,t,L(t.initializer)));return IJ(t,b,e)}(n);case 278:return function(t){ny(t,I)&&(t=iq(e,t,L(t.expression)));return IJ(t,b,e)}(n);case 110:return function(e){return l??e}(n);case 249:return function(n){return t.updateForStatement(n,kJ(n.initializer,T,su),kJ(n.condition,b,Q_),kJ(n.incrementor,T,Q_),PJ(n.statement,b,e))}(n);case 245:return function(t){return IJ(t,T,e)}(n);case 357:return R(n,!1);case 218:return $(n,!1);case 356:return function(e,n){const r=n?T:b,i=kJ(e.expression,r,Q_);return t.updatePartiallyEmittedExpression(e,i)}(n,!1);case 214:return function(n){if(pm(n.expression)&&l){const e=kJ(n.expression,b,Q_),r=TJ(n.arguments,b,Q_),i=t.createFunctionCallCall(e,l,r);return Cw(i,n),AI(i,n),i}return IJ(n,b,e)}(n);case 216:return function(n){if(pm(n.tag)&&l){const e=kJ(n.tag,b,Q_),r=t.createFunctionBindCall(e,l,[]);Cw(r,n),AI(r,n);const i=kJ(n.template,b,V_);return t.updateTaggedTemplateExpression(n,r,void 0,i)}return IJ(n,b,e)}(n);case 225:case 226:return M(n,!1);case 212:return function(n){if(pm(n)&&fD(n.name)&&l&&_){const e=t.createStringLiteralFromNode(n.name),r=t.createReflectGetCall(_,e,l);return Cw(r,n.expression),AI(r,n.expression),r}return IJ(n,b,e)}(n);case 213:return function(n){if(pm(n)&&l&&_){const e=kJ(n.argumentExpression,b,Q_),r=t.createReflectGetCall(_,e,l);return Cw(r,n.expression),AI(r,n.expression),r}return IJ(n,b,e)}(n);case 168:return J(n);case 175:case 179:case 178:case 219:case 263:{"other"===(null==s?void 0:s.kind)?(gn.assert(!u),s.depth++):(s={kind:"other",next:s,depth:0,savedPendingExpressions:u},u=void 0,p());const t=IJ(n,x,e);return gn.assert("other"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",()=>`Expected top.kind to be 'other' but got '${null==s?void 0:s.kind}' instead.`),s.depth>0?(gn.assert(!u),s.depth--):(u=s.savedPendingExpressions,s=s.next,p()),t}default:return IJ(n,x,e)}}function x(e){if(171!==e.kind)return b(e)}function S(e){if(171!==e.kind)return e}function k(a){switch(a.kind){case 177:return function(e){g(e);const n=TJ(e.modifiers,S,a_),r=TJ(e.parameters,b,AD);let i;if(e.body&&c){const n=E(c.class,c);if(n){const r=[],o=t.copyPrologue(e.body.statements,r,!1,b),a=xz(e.body.statements,o);a.length>0?F(r,e.body.statements,o,a,0,n):(de(r,n),de(r,TJ(e.body.statements,b,bu))),i=t.createBlock(r,!0),Cw(i,e.body),AI(i,e.body)}}return i??(i=kJ(e.body,b,YE)),h(),t.updateConstructorDeclaration(e,n,r,i)}(a);case 175:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ee);if(i)return h(),P(function(e,n,r){return e=TJ(e,e=>SD(e)?e:void 0,a_),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(r,t.createIdentifier("value")))]))}(n,r,i),e);{const i=TJ(e.parameters,b,AD),o=kJ(e.body,b,YE);return h(),P(t.updateMethodDeclaration(e,n,e.asteriskToken,r,void 0,void 0,i,void 0,o),e)}}(a);case 178:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,te);if(i)return h(),P(ie(n,r,i),e);{const i=TJ(e.parameters,b,AD),o=kJ(e.body,b,YE);return h(),P(t.updateGetAccessorDeclaration(e,n,r,i,void 0,o),e)}}(a);case 179:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ne);if(i)return h(),P(oe(n,r,i),e);{const i=TJ(e.parameters,b,AD),o=kJ(e.body,b,YE);return h(),P(t.updateSetAccessorDeclaration(e,n,r,i,o),e)}}(a);case 173:return function(a){ny(a,I)&&(a=iq(e,a,L(a.initializer)));g(a),gn.assert(!wp(a),"Not yet implemented.");const{modifiers:s,name:l,initializersName:_,extraInitializersName:u,descriptorName:d,thisArg:p}=A(a,c,zv(a)?re:void 0);r();let f=kJ(a.initializer,b,Q_);_&&(f=n().createRunInitializersHelper(p??t.createThis(),_,f??t.createVoidZero()));jv(a)&&c&&f&&(c.hasStaticInitializers=!0);const m=i();X(m)&&(f=t.createImmediatelyInvokedArrowFunction([...m,t.createReturnStatement(f)]));c&&(jv(a)?(f=G(c,!0,f),u&&(c.pendingStaticInitializers??(c.pendingStaticInitializers=[]),c.pendingStaticInitializers.push(n().createRunInitializersHelper(c.classThis??t.createThis(),u)))):(f=G(c,!1,f),u&&(c.pendingInstanceInitializers??(c.pendingInstanceInitializers=[]),c.pendingInstanceInitializers.push(n().createRunInitializersHelper(t.createThis(),u)))));if(h(),zv(a)&&d){const e=Bw(a),n=Iw(a),r=a.name;let i=r,c=r;if(FD(r)&&!gz(r.expression)){const e=DI(r);if(e)i=t.updateComputedPropertyName(r,kJ(r.expression,b,Q_)),c=t.updateComputedPropertyName(r,e.left);else{const e=t.createTempVariable(o);Ow(e,r.expression);const n=kJ(r.expression,b,Q_),a=t.createAssignment(e,n);Ow(a,r.expression),i=t.updateComputedPropertyName(r,a),c=t.updateComputedPropertyName(r,e)}}const l=TJ(s,e=>129!==e.kind?e:void 0,a_),_=CI(t,a,l,f);Cw(_,a),Ew(_,3072),Ow(_,n),Ow(_.name,a.name);const u=ie(l,i,d);Cw(u,a),Jw(u,e),Ow(u,n);const p=oe(l,c,d);return Cw(p,a),Ew(p,3072),Ow(p,n),[_,u,p]}return P(t.updatePropertyDeclaration(a,s,l,void 0,void 0,f),a)}(a);case 176:return function(n){let r;if(g(n),Zz(n))r=IJ(n,b,e);else if(Hz(n)){const t=l;l=void 0,r=IJ(n,b,e),l=t}else if(r=n=IJ(n,b,e),c&&(c.hasStaticInitializers=!0,X(c.pendingStaticInitializers))){const e=[];for(const n of c.pendingStaticInitializers){const r=t.createExpressionStatement(n);Ow(r,Iw(n)),e.push(r)}const n=t.createBlock(e,!0);r=[t.createClassStaticBlockDeclaration(n),r],c.pendingStaticInitializers=void 0}return h(),r}(a);default:return b(a)}}function T(e){switch(e.kind){case 225:case 226:return M(e,!0);case 227:return j(e,!0);case 357:return R(e,!0);case 218:return $(e,!0);default:return b(e)}}function C(e,n){return t.createUniqueName(`${function(e){let t=e.name&&fD(e.name)&&!Yl(e.name)?kc(e.name):e.name&&mD(e.name)&&!Yl(e.name)?kc(e.name).slice(1):e.name&&QN(e.name)&&Ss(e.name.text,99)?e.name.text:y_(e)?"class":"member";return Ou(e)&&(t=`get_${t}`),Iu(e)&&(t=`set_${t}`),e.name&&mD(e.name)&&(t=`private_${t}`),jv(e)&&(t=`static_${t}`),"_"+t}(e)}_${n}`,24)}function w(e,n){return t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,n)],1))}function N(o){r(),!tq(o)&&km(!1,o)&&(o=nq(e,o,t.createStringLiteral("")));const a=t.getLocalName(o,!1,!1,!0),s=function(e){const r=t.createUniqueName("_metadata",48);let i,o,a,s,c,l=!1,_=!1,u=!1;if(bm(!1,e)){const n=X(e.members,e=>(t_(e)||b_(e))&&Mv(e));a=t.createUniqueName("_classThis",n?24:48)}for(const r of e.members){if(S_(r)&&xm(!1,r,e))if(Mv(r)){if(!o){o=t.createUniqueName("_staticExtraInitializers",48);const r=n().createRunInitializersHelper(a??t.createThis(),o);Ow(r,e.name??Ub(e)),s??(s=[]),s.push(r)}}else{if(!i){i=t.createUniqueName("_instanceExtraInitializers",48);const r=n().createRunInitializersHelper(t.createThis(),i);Ow(r,e.name??Ub(e)),c??(c=[]),c.push(r)}i??(i=t.createUniqueName("_instanceExtraInitializers",48))}if(RD(r)?Zz(r)||(l=!0):LD(r)&&(Mv(r)?l||(l=!!r.initializer||Uv(r)):_||(_=!wp(r))),(t_(r)||b_(r))&&Mv(r)&&(u=!0),o&&i&&l&&_&&u)break}return{class:e,classThis:a,metadataReference:r,instanceMethodExtraInitializersName:i,staticMethodExtraInitializersName:o,hasStaticInitializers:l,hasNonAmbientInstanceFields:_,hasStaticPrivateClassElements:u,pendingStaticInitializers:s,pendingInstanceInitializers:c}}(o),c=[];let l,_,p,g,h=!1;const y=Q(Dz(o,!1));y&&(s.classDecoratorsName=t.createUniqueName("_classDecorators",48),s.classDescriptorName=t.createUniqueName("_classDescriptor",48),s.classExtraInitializersName=t.createUniqueName("_classExtraInitializers",48),gn.assertIsDefined(s.classThis),c.push(w(s.classDecoratorsName,t.createArrayLiteralExpression(y)),w(s.classDescriptorName),w(s.classExtraInitializersName,t.createArrayLiteralExpression()),w(s.classThis)),s.hasStaticPrivateClassElements&&(h=!0,d=!0));const v=Fh(o.heritageClauses,96),x=v&&ve(v.types),S=x&&kJ(x.expression,b,Q_);if(S){s.classSuper=t.createUniqueName("_classSuper",48);const e=LA(S),n=JE(e)&&!e.name||NE(e)&&!e.name||DE(e)?t.createComma(t.createNumericLiteral(0),S):S;c.push(w(s.classSuper,n));const r=t.updateExpressionWithTypeArguments(x,s.classSuper,void 0),i=t.updateHeritageClause(v,[r]);g=t.createNodeArray([i])}const T=s.classThis??t.createThis();f(s),l=le(l,function(e,n){const r=t.createVariableDeclaration(e,void 0,void 0,t.createConditionalExpression(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("Symbol"),"function"),t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),t.createToken(58),t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[n?ae(n):t.createNull()]),t.createToken(59),t.createVoidZero()));return t.createVariableStatement(void 0,t.createVariableDeclarationList([r],2))}(s.metadataReference,s.classSuper));let C=o.members;if(C=TJ(C,e=>BD(e)?e:k(e),h_),C=TJ(C,e=>BD(e)?k(e):e,h_),u){let n;for(let r of u){r=kJ(r,function r(i){return 16384&i.transformFlags?110===i.kind?(n||(n=t.createUniqueName("_outerThis",16),c.unshift(w(n,t.createThis()))),n):IJ(i,r,e):i},Q_);l=le(l,t.createExpressionStatement(r))}u=void 0}if(m(),X(s.pendingInstanceInitializers)&&!uv(o)){const e=E(o,s);if(e){const n=Ch(o),r=[];if(!(!n||106===LA(n.expression).kind)){const e=t.createSpreadElement(t.createIdentifier("arguments")),n=t.createCallExpression(t.createSuper(),void 0,[e]);r.push(t.createExpressionStatement(n))}de(r,e);const i=t.createBlock(r,!0);p=t.createConstructorDeclaration(void 0,[],i)}}if(s.staticMethodExtraInitializersName&&c.push(w(s.staticMethodExtraInitializersName,t.createArrayLiteralExpression())),s.instanceMethodExtraInitializersName&&c.push(w(s.instanceMethodExtraInitializersName,t.createArrayLiteralExpression())),s.memberInfos&&_d(s.memberInfos,(e,n)=>{jv(n)&&(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))}),s.memberInfos&&_d(s.memberInfos,(e,n)=>{jv(n)||(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))}),l=de(l,s.staticNonFieldDecorationStatements),l=de(l,s.nonStaticNonFieldDecorationStatements),l=de(l,s.staticFieldDecorationStatements),l=de(l,s.nonStaticFieldDecorationStatements),s.classDescriptorName&&s.classDecoratorsName&&s.classExtraInitializersName&&s.classThis){l??(l=[]);const e=t.createPropertyAssignment("value",T),r=t.createObjectLiteralExpression([e]),i=t.createAssignment(s.classDescriptorName,r),c=t.createPropertyAccessExpression(T,"name"),_=n().createESDecorateHelper(t.createNull(),i,s.classDecoratorsName,{kind:"class",name:c,metadata:s.metadataReference},t.createNull(),s.classExtraInitializersName),u=t.createExpressionStatement(_);Ow(u,Ub(o)),l.push(u);const d=t.createPropertyAccessExpression(s.classDescriptorName,"value"),p=t.createAssignment(s.classThis,d),f=t.createAssignment(a,p);l.push(t.createExpressionStatement(f))}if(l.push(function(e,n){const r=t.createObjectDefinePropertyCall(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata"),t.createPropertyDescriptor({configurable:!0,writable:!0,enumerable:!0,value:n},!0));return Ew(t.createIfStatement(n,t.createExpressionStatement(r)),1)}(T,s.metadataReference)),X(s.pendingStaticInitializers)){for(const e of s.pendingStaticInitializers){const n=t.createExpressionStatement(e);Ow(n,Iw(e)),_=le(_,n)}s.pendingStaticInitializers=void 0}if(s.classExtraInitializersName){const e=n().createRunInitializersHelper(T,s.classExtraInitializersName),r=t.createExpressionStatement(e);Ow(r,o.name??Ub(o)),_=le(_,r)}l&&_&&!s.hasStaticInitializers&&(de(l,_),_=void 0);const N=l&&t.createClassStaticBlockDeclaration(t.createBlock(l,!0));N&&h&&Pw(N,32);const D=_&&t.createClassStaticBlockDeclaration(t.createBlock(_,!0));if(N||p||D){const e=[],n=C.findIndex(Zz);N?(de(e,C,0,n+1),e.push(N),de(e,C,n+1)):de(e,C),p&&e.push(p),D&&e.push(D),C=AI(t.createNodeArray(e),C)}const F=i();let P;if(y){P=t.createClassExpression(void 0,void 0,void 0,g,C),s.classThis&&(P=Xz(t,P,s.classThis));const e=t.createVariableDeclaration(a,void 0,void 0,P),n=t.createVariableDeclarationList([e]),r=s.classThis?t.createAssignment(a,s.classThis):a;c.push(t.createVariableStatement(void 0,n),t.createReturnStatement(r))}else P=t.createClassExpression(void 0,o.name,void 0,g,C),c.push(t.createReturnStatement(P));if(h){Aw(P,32);for(const e of P.members)(t_(e)||b_(e))&&Mv(e)&&Aw(e,32)}return Cw(P,o),t.createImmediatelyInvokedArrowFunction(t.mergeLexicalEnvironment(c,F))}function D(e){return km(!1,e)||Sm(!1,e)}function E(e,n){if(X(n.pendingInstanceInitializers)){const e=[];return e.push(t.createExpressionStatement(t.inlineExpressions(n.pendingInstanceInitializers))),n.pendingInstanceInitializers=void 0,e}}function F(e,n,r,i,o,a){const s=i[o],c=n[s];if(de(e,TJ(n,b,bu,r,s-r)),mF(c)){const n=[];F(n,c.tryBlock.statements,0,i,o+1,a);AI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),kJ(c.catchClause,b,_P),kJ(c.finallyBlock,b,YE)))}else de(e,TJ(n,b,bu,s,1)),de(e,a);de(e,TJ(n,b,bu,s+1))}function P(e,t){return e!==t&&(Jw(e,t),Ow(e,Ub(t))),e}function A(e,r,i){let a,s,c,l,_,d;if(!r){const t=TJ(e.modifiers,S,a_);return y(),s=B(e.name),v(),{modifiers:t,referencedName:a,name:s,initializersName:c,descriptorName:d,thisArg:_}}const p=Q(Ez(e,r.class,!1)),f=TJ(e.modifiers,S,a_);if(p){const m=C(e,"decorators"),g=t.createArrayLiteralExpression(p),h=t.createAssignment(m,g),x={memberDecoratorsName:m};r.memberInfos??(r.memberInfos=new Map),r.memberInfos.set(e,x),u??(u=[]),u.push(h);const S=S_(e)||b_(e)?jv(e)?r.staticNonFieldDecorationStatements??(r.staticNonFieldDecorationStatements=[]):r.nonStaticNonFieldDecorationStatements??(r.nonStaticNonFieldDecorationStatements=[]):LD(e)&&!b_(e)?jv(e)?r.staticFieldDecorationStatements??(r.staticFieldDecorationStatements=[]):r.nonStaticFieldDecorationStatements??(r.nonStaticFieldDecorationStatements=[]):gn.fail(),k=JD(e)?"getter":zD(e)?"setter":MD(e)?"method":b_(e)?"accessor":LD(e)?"field":gn.fail();let T;if(fD(e.name)||mD(e.name))T={computed:!1,name:e.name};else if(Hh(e.name))T={computed:!0,name:t.createStringLiteralFromNode(e.name)};else{const r=e.name.expression;Hh(r)&&!fD(r)?T={computed:!0,name:t.createStringLiteralFromNode(r)}:(y(),({referencedName:a,name:s}=function(e){if(Hh(e)||mD(e)){return{referencedName:t.createStringLiteralFromNode(e),name:kJ(e,b,c_)}}if(Hh(e.expression)&&!fD(e.expression)){return{referencedName:t.createStringLiteralFromNode(e.expression),name:kJ(e,b,c_)}}const r=t.getGeneratedNameForNode(e);o(r);const i=n().createPropKeyHelper(kJ(e.expression,b,Q_)),a=t.createAssignment(r,i),s=t.updateComputedPropertyName(e,H(a));return{referencedName:r,name:s}}(e.name)),T={computed:!0,name:a},v())}const w={kind:k,name:T,static:jv(e),private:mD(e.name),access:{get:LD(e)||JD(e)||MD(e),set:LD(e)||zD(e)},metadata:r.metadataReference};if(S_(e)){const o=jv(e)?r.staticMethodExtraInitializersName:r.instanceMethodExtraInitializersName;let a;gn.assertIsDefined(o),t_(e)&&i&&(a=i(e,TJ(f,e=>at(e,yD),a_)),x.memberDescriptorName=d=C(e,"descriptor"),a=t.createAssignment(d,a));const s=n().createESDecorateHelper(t.createThis(),a??t.createNull(),m,w,t.createNull(),o),c=t.createExpressionStatement(s);Ow(c,Ub(e)),S.push(c)}else if(LD(e)){let o;c=x.memberInitializersName??(x.memberInitializersName=C(e,"initializers")),l=x.memberExtraInitializersName??(x.memberExtraInitializersName=C(e,"extraInitializers")),jv(e)&&(_=r.classThis),t_(e)&&zv(e)&&i&&(o=i(e,void 0),x.memberDescriptorName=d=C(e,"descriptor"),o=t.createAssignment(d,o));const a=n().createESDecorateHelper(b_(e)?t.createThis():t.createNull(),o??t.createNull(),m,w,c,l),s=t.createExpressionStatement(a);Ow(s,Ub(e)),S.push(s)}}return void 0===s&&(y(),s=B(e.name),v()),X(f)||!MD(e)&&!LD(e)||Ew(s,1024),{modifiers:f,referencedName:a,name:s,initializersName:c,extraInitializersName:l,descriptorName:d,thisArg:_}}function I(e){return JE(e)&&!e.name&&D(e)}function L(e){const t=LA(e);return JE(t)&&!t.name&&!km(!1,t)}function j(n,r){if(db(n)){const e=W(n.left),r=kJ(n.right,b,Q_);return t.updateBinaryExpression(n,e,n.operatorToken,r)}if(ub(n)){if(ny(n,I))return IJ(n=iq(e,n,L(n.right)),b,e);if(pm(n.left)&&l&&_){let e=xE(n.left)?kJ(n.left.argumentExpression,b,Q_):fD(n.left.name)?t.createStringLiteralFromNode(n.left.name):void 0;if(e){let i=kJ(n.right,b,Q_);if(hz(n.operatorToken.kind)){let r=e;gz(e)||(r=t.createTempVariable(o),e=t.createAssignment(r,e));const a=t.createReflectGetCall(_,r,l);Cw(a,n.left),AI(a,n.left),i=t.createBinaryExpression(a,yz(n.operatorToken.kind),i),AI(i,n)}const a=r?void 0:t.createTempVariable(o);return a&&(i=t.createAssignment(a,i),AI(a,n)),i=t.createReflectSetCall(_,e,i,l),Cw(i,n),AI(i,n),a&&(i=t.createComma(i,a),AI(i,n)),i}}}if(28===n.operatorToken.kind){const e=kJ(n.left,T,Q_),i=kJ(n.right,r?T:b,Q_);return t.updateBinaryExpression(n,e,n.operatorToken,i)}return IJ(n,b,e)}function M(n,r){if(46===n.operator||47===n.operator){const e=ph(n.operand);if(pm(e)&&l&&_){let i=xE(e)?kJ(e.argumentExpression,b,Q_):fD(e.name)?t.createStringLiteralFromNode(e.name):void 0;if(i){let e=i;gz(i)||(e=t.createTempVariable(o),i=t.createAssignment(e,i));let a=t.createReflectGetCall(_,e,l);Cw(a,n),AI(a,n);const s=r?void 0:t.createTempVariable(o);return a=kA(t,n,a,o,s),a=t.createReflectSetCall(_,i,a,l),Cw(a,n),AI(a,n),s&&(a=t.createComma(a,s),AI(a,n)),a}}}return IJ(n,b,e)}function R(e,n){const r=n?AJ(e.elements,T):AJ(e.elements,b,T);return t.updateCommaListExpression(e,r)}function B(e){return FD(e)?J(e):kJ(e,b,c_)}function J(e){let n=kJ(e.expression,b,Q_);return gz(n)||(n=H(n)),t.updateComputedPropertyName(e,n)}function z(n){if(vE(n)||yE(n))return W(n);if(pm(n)&&l&&_){const e=xE(n)?kJ(n.argumentExpression,b,Q_):fD(n.name)?t.createStringLiteralFromNode(n.name):void 0;if(e){const r=t.createTempVariable(void 0),i=t.createAssignmentTargetWrapper(r,t.createReflectSetCall(_,e,r,l));return Cw(i,n),AI(i,n),i}}return IJ(n,b,e)}function q(n){if(ub(n,!0)){ny(n,I)&&(n=iq(e,n,L(n.right)));const r=z(n.left),i=kJ(n.right,b,Q_);return t.updateBinaryExpression(n,r,n.operatorToken,i)}return z(n)}function U(n){return gn.assertNode(n,R_),BE(n)?function(n){if(W_(n.expression)){const e=z(n.expression);return t.updateSpreadElement(n,e)}return IJ(n,b,e)}(n):zE(n)?IJ(n,b,e):q(n)}function V(n){return gn.assertNode(n,j_),pP(n)?function(n){if(W_(n.expression)){const e=z(n.expression);return t.updateSpreadAssignment(n,e)}return IJ(n,b,e)}(n):dP(n)?function(t){return ny(t,I)&&(t=iq(e,t,L(t.objectAssignmentInitializer))),IJ(t,b,e)}(n):uP(n)?function(n){const r=kJ(n.name,b,c_);if(ub(n.initializer,!0)){const e=q(n.initializer);return t.updatePropertyAssignment(n,r,e)}if(W_(n.initializer)){const e=z(n.initializer);return t.updatePropertyAssignment(n,r,e)}return IJ(n,b,e)}(n):IJ(n,b,e)}function W(e){if(yE(e)){const n=TJ(e.elements,U,Q_);return t.updateArrayLiteralExpression(e,n)}{const n=TJ(e.properties,V,w_);return t.updateObjectLiteralExpression(e,n)}}function $(e,n){const r=n?T:b,i=kJ(e.expression,r,Q_);return t.updateParenthesizedExpression(e,i)}function K(e,n){return X(e)&&(n?wE(n)?(e.push(n.expression),n=t.updateParenthesizedExpression(n,t.inlineExpressions(e))):(e.push(n),n=t.inlineExpressions(e)):n=t.inlineExpressions(e)),n}function H(e){const t=K(u,e);return gn.assertIsDefined(t),t!==e&&(u=void 0),t}function G(e,t,n){const r=K(t?e.pendingStaticInitializers:e.pendingInstanceInitializers,n);return r!==n&&(t?e.pendingStaticInitializers=void 0:e.pendingInstanceInitializers=void 0),r}function Q(e){if(!e)return;const t=[];return de(t,O(e.decorators,Y)),t}function Y(e){const n=kJ(e.expression,b,Q_);Ew(n,3072);if(Px(LA(n))){const{target:e,thisArg:r}=t.createCallBinding(n,o,a,!0);return t.restoreOuterExpressions(n,t.createFunctionBindCall(e,r,[]))}return n}function Z(e,r,i,o,a,s,c){const l=t.createFunctionExpression(i,o,void 0,void 0,s,void 0,c??t.createBlock([]));Cw(l,e),Ow(l,Ub(e)),Ew(l,3072);const _="get"===a||"set"===a?a:void 0,u=t.createStringLiteralFromNode(r,void 0),d=n().createSetFunctionNameHelper(l,u,_),p=t.createPropertyAssignment(t.createIdentifier(a),d);return Cw(p,e),Ow(p,Ub(e)),Ew(p,3072),p}function ee(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,e.asteriskToken,"value",TJ(e.parameters,b,AD),kJ(e.body,b,YE))])}function te(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"get",[],kJ(e.body,b,YE))])}function ne(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"set",TJ(e.parameters,b,AD),kJ(e.body,b,YE))])}function re(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"get",[],t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)))])),Z(e,e.name,n,void 0,"set",[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)),t.createIdentifier("value")))]))])}function ie(e,n,r){return e=TJ(e,e=>SD(e)?e:void 0,a_),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("get")),t.createThis(),[]))]))}function oe(e,n,r){return e=TJ(e,e=>SD(e)?e:void 0,a_),t.createSetAccessorDeclaration(e,n,[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("set")),t.createThis(),[t.createIdentifier("value")]))]))}function ae(e){return t.createBinaryExpression(t.createElementAccessExpression(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),61,t.createNull())}}function gq(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=wS(s);let l,_,u,d,p=0,f=0;const m=[];let h=0;const y=e.onEmitNode,v=e.onSubstituteNode;return e.onEmitNode=function(e,t,n){if(1&p&&function(e){const t=e.kind;return 264===t||177===t||175===t||178===t||179===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==f){const i=f;return f=r,y(e,t,n),void(f=i)}}else if(p&&m[pJ(t)]){const r=f;return f=0,y(e,t,n),void(f=r)}y(e,t,n)},e.onSubstituteNode=function(e,n){if(n=v(e,n),1===e&&f)return function(e){switch(e.kind){case 212:return $(e);case 213:return K(e);case 214:return function(e){const n=e.expression;if(pm(n)){const r=bE(n)?$(n):K(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n);return n},az(e,function(t){if(t.isDeclarationFile)return t;b(1,!1),b(2,!Cp(t,s));const n=IJ(t,C,e);return Qw(n,e.readEmitHelpers()),n});function b(e,t){h=t?h|e:h&~e}function x(e){return 0!==(h&e)}function S(e,t,n){const r=e&~h;if(r){b(r,!0);const e=t(n);return b(r,!1),e}return t(n)}function k(t){return IJ(t,C,e)}function T(t){switch(t.kind){case 219:case 263:case 175:case 178:case 179:case 177:return t;case 170:case 209:case 261:break;case 80:if(d&&a.isArgumentsLocalBinding(t))return d}return IJ(t,T,e)}function C(n){if(!(256&n.transformFlags))return d?T(n):n;switch(n.kind){case 134:return;case 224:return function(n){if(!x(1))return IJ(n,C,e);return Cw(AI(t.createYieldExpression(void 0,kJ(n.expression,C,Q_)),n),n)}(n);case 175:return S(3,D,n);case 263:return S(3,P,n);case 219:return S(3,A,n);case 220:return S(1,I,n);case 212:return _&&bE(n)&&108===n.expression.kind&&_.add(n.name.escapedText),IJ(n,C,e);case 213:return _&&108===n.expression.kind&&(u=!0),IJ(n,C,e);case 178:return S(3,E,n);case 179:return S(3,F,n);case 177:return S(3,N,n);case 264:case 232:return S(3,k,n);default:return IJ(n,C,e)}}function w(n){if(ah(n))switch(n.kind){case 244:return function(n){if(j(n.declarationList)){const e=M(n.declarationList,!1);return e?t.createExpressionStatement(e):void 0}return IJ(n,C,e)}(n);case 249:return function(n){const r=n.initializer;return t.updateForStatement(n,j(r)?M(r,!1):kJ(n.initializer,C,su),kJ(n.condition,C,Q_),kJ(n.incrementor,C,Q_),PJ(n.statement,w,e))}(n);case 250:return function(n){return t.updateForInStatement(n,j(n.initializer)?M(n.initializer,!0):gn.checkDefined(kJ(n.initializer,C,su)),gn.checkDefined(kJ(n.expression,C,Q_)),PJ(n.statement,w,e))}(n);case 251:return function(n){return t.updateForOfStatement(n,kJ(n.awaitModifier,C,bD),j(n.initializer)?M(n.initializer,!0):gn.checkDefined(kJ(n.initializer,C,su)),gn.checkDefined(kJ(n.expression,C,Q_)),PJ(n.statement,w,e))}(n);case 300:return function(t){const n=new Set;let r;if(L(t.variableDeclaration,n),n.forEach((e,t)=>{l.has(t)&&(r||(r=new Set(l)),r.delete(t))}),r){const n=l;l=r;const i=IJ(t,w,e);return l=n,i}return IJ(t,w,e)}(n);case 242:case 256:case 270:case 297:case 298:case 259:case 247:case 248:case 246:case 255:case 257:return IJ(n,w,e);default:return gn.assertNever(n,"Unhandled node.")}return C(n)}function N(n){const r=d;d=void 0;const i=t.updateConstructorDeclaration(n,TJ(n.modifiers,C,a_),DJ(n.parameters,C,e),z(n));return d=r,i}function D(n){let r;const i=zh(n),o=d;d=void 0;const a=t.updateMethodDeclaration(n,TJ(n.modifiers,C,k_),n.asteriskToken,n.name,void 0,void 0,r=2&i?U(n):DJ(n.parameters,C,e),void 0,2&i?V(n,r):z(n));return d=o,a}function E(n){const r=d;d=void 0;const i=t.updateGetAccessorDeclaration(n,TJ(n.modifiers,C,k_),n.name,DJ(n.parameters,C,e),void 0,z(n));return d=r,i}function F(n){const r=d;d=void 0;const i=t.updateSetAccessorDeclaration(n,TJ(n.modifiers,C,k_),n.name,DJ(n.parameters,C,e),z(n));return d=r,i}function P(n){let r;const i=d;d=void 0;const o=zh(n),a=t.updateFunctionDeclaration(n,TJ(n.modifiers,C,k_),n.asteriskToken,n.name,void 0,r=2&o?U(n):DJ(n.parameters,C,e),void 0,2&o?V(n,r):FJ(n.body,C,e));return d=i,a}function A(n){let r;const i=d;d=void 0;const o=zh(n),a=t.updateFunctionExpression(n,TJ(n.modifiers,C,a_),n.asteriskToken,n.name,void 0,r=2&o?U(n):DJ(n.parameters,C,e),void 0,2&o?V(n,r):FJ(n.body,C,e));return d=i,a}function I(n){let r;const i=zh(n);return t.updateArrowFunction(n,TJ(n.modifiers,C,a_),void 0,r=2&i?U(n):DJ(n.parameters,C,e),void 0,n.equalsGreaterThanToken,2&i?V(n,r):FJ(n.body,C,e))}function L({name:e},t){if(fD(e))t.add(e.escapedText);else for(const n of e.elements)zE(n)||L(n,t)}function j(e){return!!e&&yF(e)&&!(7&e.flags)&&e.declarations.some(J)}function M(e,n){!function(e){g(e.declarations,R)}(e);const r=sx(e);return 0===r.length?n?kJ(t.converters.convertToAssignmentElementTarget(e.declarations[0].name),C,Q_):void 0:t.inlineExpressions(O(r,B))}function R({name:e}){if(fD(e))o(e);else for(const t of e.elements)zE(t)||R(t)}function B(e){const n=Ow(t.createAssignment(t.converters.convertToAssignmentElementTarget(e.name),e.initializer),e);return gn.checkDefined(kJ(n,C,Q_))}function J({name:e}){if(fD(e))return l.has(e.escapedText);for(const t of e.elements)if(!zE(t)&&J(t))return!0;return!1}function z(n){gn.assertIsDefined(n.body);const r=_,i=u;_=new Set,u=!1;let o=FJ(n.body,C,e);const s=hc(n,d_);if(c>=2&&(a.hasNodeCheckFlag(n,256)||a.hasNodeCheckFlag(n,128))&&!!(3&~zh(s))){if(W(),_.size){const e=hq(t,a,n,_);m[pJ(e)]=!0;const r=o.statements.slice();zd(r,[e]),o=t.updateBlock(o,r)}u&&(a.hasNodeCheckFlag(n,256)?Xw(o,KN):a.hasNodeCheckFlag(n,128)&&Xw(o,$N))}return _=r,u=i,o}function q(){gn.assert(d);const e=t.createVariableDeclaration(d,void 0,void 0,t.createIdentifier("arguments")),n=t.createVariableStatement(void 0,[e]);return MA(n),Fw(n,2097152),n}function U(n){if(jz(n.parameters))return DJ(n.parameters,C,e);const r=[];for(const e of n.parameters){if(e.initializer||e.dotDotDotToken){if(220===n.kind){const e=t.createParameterDeclaration(void 0,t.createToken(26),t.createUniqueName("args",8));r.push(e)}break}const i=t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e.name,8));r.push(i)}const i=t.createNodeArray(r);return AI(i,n.parameters),i}function V(o,s){const p=jz(o.parameters)?void 0:DJ(o.parameters,C,e);r();const f=hc(o,__).type,g=c<2?function(e){const t=e&&hm(e);if(t&&s_(t)){const e=a.getTypeReferenceSerializationKind(t);if(1===e||0===e)return t}return}(f):void 0,h=220===o.kind,y=d,v=a.hasNodeCheckFlag(o,512)&&!d;let b;if(v&&(d=t.createUniqueName("arguments")),p)if(h){const e=[];gn.assert(s.length<=o.parameters.length);for(let n=0;n=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(r&&(W(),_.size)){const n=hq(t,a,o,_);m[pJ(n)]=!0,zd(e,[n])}v&&zd(e,[q()]);const i=t.createBlock(e,!0);AI(i,o.body),r&&u&&(a.hasNodeCheckFlag(o,256)?Xw(i,KN):a.hasNodeCheckFlag(o,128)&&Xw(i,$N)),P=i}return l=S,h||(_=k,u=T,d=y),P}function W(){1&p||(p|=1,e.enableSubstitution(214),e.enableSubstitution(212),e.enableSubstitution(213),e.enableEmitNotification(264),e.enableEmitNotification(175),e.enableEmitNotification(178),e.enableEmitNotification(179),e.enableEmitNotification(177),e.enableEmitNotification(244))}function $(e){return 108===e.expression.kind?AI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function K(e){return 108===e.expression.kind?(n=e.argumentExpression,r=e,AI(256&f?t.createPropertyAccessExpression(t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[n]),"value"):t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[n]),r)):e;var n,r}}function hq(e,t,n,r){const i=t.hasNodeCheckFlag(n,256),o=[];return r.forEach((t,n)=>{const r=Sc(n),a=[];a.push(e.createPropertyAssignment("get",e.createArrowFunction(void 0,void 0,[],void 0,void 0,Ew(e.createPropertyAccessExpression(Ew(e.createSuper(),8),r),8)))),i&&a.push(e.createPropertyAssignment("set",e.createArrowFunction(void 0,void 0,[e.createParameterDeclaration(void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,e.createAssignment(Ew(e.createPropertyAccessExpression(Ew(e.createSuper(),8),r),8),e.createIdentifier("v"))))),o.push(e.createPropertyAssignment(r,e.createObjectLiteralExpression(a)))}),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createUniqueName("_super",48),void 0,void 0,e.createCallExpression(e.createPropertyAccessExpression(e.createIdentifier("Object"),"create"),void 0,[e.createNull(),e.createObjectLiteralExpression(o,!0)]))],2))}function yq(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=wS(s),l=e.onEmitNode;e.onEmitNode=function(e,t,n){if(1&y&&function(e){const t=e.kind;return 264===t||177===t||175===t||178===t||179===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==v){const i=v;return v=r,l(e,t,n),void(v=i)}}else if(y&&x[pJ(t)]){const r=v;return v=0,l(e,t,n),void(v=r)}l(e,t,n)};const _=e.onSubstituteNode;e.onSubstituteNode=function(e,n){if(n=_(e,n),1===e&&v)return function(e){switch(e.kind){case 212:return G(e);case 213:return Q(e);case 214:return function(e){const n=e.expression;if(pm(n)){const r=bE(n)?G(n):Q(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n);return n};let u,d,p,f,m,g,h=!1,y=0,v=0,b=0;const x=[];return az(e,function(n){if(n.isDeclarationFile)return n;p=n;const r=function(n){const r=S(2,Cp(n,s)?0:1);h=!1;const i=IJ(n,C,e),o=Y(i.statements,f&&[t.createVariableStatement(void 0,t.createVariableDeclarationList(f))]),a=t.updateSourceFile(i,AI(t.createNodeArray(o),n.statements));return k(r),a}(n);return Qw(r,e.readEmitHelpers()),p=void 0,f=void 0,r});function S(e,t){const n=b;return b=3&(b&~e|t),n}function k(e){b=e}function T(e){f=le(f,t.createVariableDeclaration(e))}function C(e){return F(e,!1)}function w(e){return F(e,!0)}function N(e){if(134!==e.kind)return e}function D(e,t,n,r){if(function(e,t){return b!==(b&~e|t)}(n,r)){const i=S(n,r),o=e(t);return k(i),o}return e(t)}function E(t){return IJ(t,C,e)}function F(r,i){if(!(128&r.transformFlags))return r;switch(r.kind){case 224:return function(r){if(2&u&&1&u)return Cw(AI(t.createYieldExpression(void 0,n().createAwaitHelper(kJ(r.expression,C,Q_))),r),r);return IJ(r,C,e)}(r);case 230:return function(r){if(2&u&&1&u){if(r.asteriskToken){const e=kJ(gn.checkDefined(r.expression),C,Q_);return Cw(AI(t.createYieldExpression(void 0,n().createAwaitHelper(t.updateYieldExpression(r,r.asteriskToken,AI(n().createAsyncDelegatorHelper(AI(n().createAsyncValuesHelper(e),e)),e)))),r),r)}return Cw(AI(t.createYieldExpression(void 0,O(r.expression?kJ(r.expression,C,Q_):t.createVoidZero())),r),r)}return IJ(r,C,e)}(r);case 254:return function(n){if(2&u&&1&u)return t.updateReturnStatement(n,O(n.expression?kJ(n.expression,C,Q_):t.createVoidZero()));return IJ(n,C,e)}(r);case 257:return function(n){if(2&u){const e=Wf(n);return 251===e.kind&&e.awaitModifier?I(e,n):t.restoreEnclosingLabel(kJ(e,C,bu,t.liftToBlock),n)}return IJ(n,C,e)}(r);case 211:return function(r){if(65536&r.transformFlags){const e=function(e){let n;const r=[];for(const i of e)if(306===i.kind){n&&(r.push(t.createObjectLiteralExpression(n)),n=void 0);const e=i.expression;r.push(kJ(e,C,Q_))}else n=le(n,304===i.kind?t.createPropertyAssignment(i.name,kJ(i.initializer,C,Q_)):kJ(i,C,w_));n&&r.push(t.createObjectLiteralExpression(n));return r}(r.properties);e.length&&211!==e[0].kind&&e.unshift(t.createObjectLiteralExpression());let i=e[0];if(e.length>1){for(let t=1;t=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(f){1&y||(y|=1,e.enableSubstitution(214),e.enableSubstitution(212),e.enableSubstitution(213),e.enableEmitNotification(264),e.enableEmitNotification(175),e.enableEmitNotification(178),e.enableEmitNotification(179),e.enableEmitNotification(177),e.enableEmitNotification(244));const n=hq(t,a,o,m);x[pJ(n)]=!0,zd(u,[n])}u.push(p);const h=t.updateBlock(o.body,u);return f&&g&&(a.hasNodeCheckFlag(o,256)?Xw(h,KN):a.hasNodeCheckFlag(o,128)&&Xw(h,$N)),m=l,g=_,h}function K(e){r();let n=0;const o=[],a=kJ(e.body,C,ou)??t.createBlock([]);YE(a)&&(n=t.copyPrologue(a.statements,o,!1,C)),de(o,H(void 0,e));const s=i();if(n>0||X(o)||X(s)){const e=t.converters.convertToFunctionBlock(a,!0);return zd(o,s),de(o,e.statements.slice(n)),t.updateBlock(e,AI(t.createNodeArray(o),e.statements))}return a}function H(n,r){let i=!1;for(const o of r.parameters)if(i){if(E_(o.name)){if(o.name.elements.length>0){const r=qz(o,C,e,0,t.getGeneratedNameForNode(o));if(X(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);Ew(i,2097152),n=le(n,i)}}else if(o.initializer){const e=t.getGeneratedNameForNode(o),r=kJ(o.initializer,C,Q_),i=t.createAssignment(e,r),a=t.createExpressionStatement(i);Ew(a,2097152),n=le(n,a)}}else if(o.initializer){const e=t.cloneNode(o.name);AI(e,o.name),Ew(e,96);const r=kJ(o.initializer,C,Q_);Fw(r,3168);const i=t.createAssignment(e,r);AI(i,o),Ew(i,3072);const a=t.createBlock([t.createExpressionStatement(i)]);AI(a,o),Ew(a,3905);const s=t.createTypeCheck(t.cloneNode(o.name),"undefined"),c=t.createIfStatement(s,a);MA(c),AI(c,o),Ew(c,2101056),n=le(n,c)}}else if(65536&o.transformFlags){i=!0;const r=qz(o,C,e,1,t.getGeneratedNameForNode(o),!1,!0);if(X(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);Ew(i,2097152),n=le(n,i)}}return n}function G(e){return 108===e.expression.kind?AI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function Q(e){return 108===e.expression.kind?(n=e.argumentExpression,r=e,AI(256&v?t.createPropertyAccessExpression(t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[n]),"value"):t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[n]),r)):e;var n,r}}function vq(e){const t=e.factory;return az(e,function(t){if(t.isDeclarationFile)return t;return IJ(t,n,e)});function n(r){return 64&r.transformFlags?300===r.kind?function(r){if(!r.variableDeclaration)return t.updateCatchClause(r,t.createVariableDeclaration(t.createTempVariable(void 0)),kJ(r.block,n,YE));return IJ(r,n,e)}(r):IJ(r,n,e):r}}function bq(e){const{factory:t,hoistVariableDeclaration:n}=e;return az(e,function(t){if(t.isDeclarationFile)return t;return IJ(t,r,e)});function r(i){if(!(32&i.transformFlags))return i;switch(i.kind){case 214:{const e=o(i,!1);return gn.assertNotNode(e,KF),e}case 212:case 213:if(Tl(i)){const e=s(i,!1,!1);return gn.assertNotNode(e,KF),e}return IJ(i,r,e);case 227:return 61===i.operatorToken.kind?function(e){let i=kJ(e.left,r,Q_),o=i;mz(i)||(o=t.createTempVariable(n),i=t.createAssignment(o,i));return AI(t.createConditionalExpression(c(i,o),void 0,o,void 0,kJ(e.right,r,Q_)),e)}(i):IJ(i,r,e);case 221:return function(e){return Tl(ph(e.expression))?Cw(a(e.expression,!1,!0),e):t.updateDeleteExpression(e,kJ(e.expression,r,Q_))}(i);default:return IJ(i,r,e)}}function i(e,n,r){const i=a(e.expression,n,r);return KF(i)?t.createSyntheticReferenceExpression(t.updateParenthesizedExpression(e,i.expression),i.thisArg):t.updateParenthesizedExpression(e,i)}function o(n,o){if(Tl(n))return s(n,o,!1);if(wE(n.expression)&&Tl(ph(n.expression))){const e=i(n.expression,!0,!1),o=TJ(n.arguments,r,Q_);return KF(e)?AI(t.createFunctionCallCall(e.expression,e.thisArg,o),n):t.updateCallExpression(n,e,void 0,o)}return IJ(n,r,e)}function a(e,a,c){switch(e.kind){case 218:return i(e,a,c);case 212:case 213:return function(e,i,o){if(Tl(e))return s(e,i,o);let a,c=kJ(e.expression,r,Q_);return gn.assertNotNode(c,KF),i&&(mz(c)?a=c:(a=t.createTempVariable(n),c=t.createAssignment(a,c))),c=212===e.kind?t.updatePropertyAccessExpression(e,c,kJ(e.name,r,fD)):t.updateElementAccessExpression(e,c,kJ(e.argumentExpression,r,Q_)),a?t.createSyntheticReferenceExpression(c,a):c}(e,a,c);case 214:return o(e,a);default:return kJ(e,r,Q_)}}function s(e,i,o){const{expression:s,chain:l}=function(e){gn.assertNotNode(e,Pl);const t=[e];for(;!e.questionDotToken&&!TE(e);)e=st(Fl(e.expression),Tl),gn.assertNotNode(e,Pl),t.unshift(e);return{expression:e.expression,chain:t}}(e),_=a(Fl(s),kl(l[0]),!1);let u=KF(_)?_.thisArg:void 0,d=KF(_)?_.expression:_,p=t.restoreOuterExpressions(s,d,8);mz(d)||(d=t.createTempVariable(n),p=t.createAssignment(d,p));let f,m=d;for(let e=0;ee&&de(c,TJ(n.statements,_,bu,e,d-e));break}d++}gn.assert(dt&&(t=e)}return t}(n.caseBlock.clauses);if(r){const i=m();return g([t.updateSwitchStatement(n,kJ(n.expression,_,Q_),t.updateCaseBlock(n.caseBlock,n.caseBlock.clauses.map(n=>function(n,r){if(0!==Nq(n.statements))return sP(n)?t.updateCaseClause(n,kJ(n.expression,_,Q_),u(n.statements,0,n.statements.length,r,void 0)):t.updateDefaultClause(n,u(n.statements,0,n.statements.length,r,void 0));return IJ(n,_,e)}(n,i))))],i,2===r)}return IJ(n,_,e)}(n);default:return IJ(n,_,e)}}function u(i,o,a,s,u){const m=[];for(let r=o;rt&&(t=e)}return t}function Dq(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getCompilerOptions();let i,o;return az(e,function(n){if(n.isDeclarationFile)return n;i=n,o={},o.importSpecifier=nk(r,n);let a=IJ(n,l,e);Qw(a,e.readEmitHelpers());let s=a.statements;o.filenameDeclaration&&(s=Vd(s.slice(),t.createVariableStatement(void 0,t.createVariableDeclarationList([o.filenameDeclaration],2))));if(o.utilizedImplicitRuntimeImports)for(const[e,r]of Be(o.utilizedImplicitRuntimeImports.entries()))if(fO(n)){const n=t.createImportDeclaration(void 0,t.createImportClause(void 0,void 0,t.createNamedImports(Be(r.values()))),t.createStringLiteral(e),void 0);MT(n,!1),s=Vd(s.slice(),n)}else if(sf(n)){const n=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createObjectBindingPattern(Be(r.values(),e=>t.createBindingElement(void 0,e.propertyName,e.name))),void 0,void 0,t.createCallExpression(t.createIdentifier("require"),void 0,[t.createStringLiteral(e)]))],2));MT(n,!1),s=Vd(s.slice(),n)}s!==a.statements&&(a=t.updateSourceFile(a,s));return o=void 0,a});function a(){if(o.filenameDeclaration)return o.filenameDeclaration.name;const e=t.createVariableDeclaration(t.createUniqueName("_jsxFileName",48),void 0,void 0,t.createStringLiteral(i.fileName));return o.filenameDeclaration=e,o.filenameDeclaration.name}function s(e){const t=function(e){return 5===r.jsx?"jsxDEV":e?"jsxs":"jsx"}(e);return c(t)}function c(e){var n,i;const a="createElement"===e?o.importSpecifier:rk(o.importSpecifier,r),s=null==(i=null==(n=o.utilizedImplicitRuntimeImports)?void 0:n.get(a))?void 0:i.get(e);if(s)return s.name;o.utilizedImplicitRuntimeImports||(o.utilizedImplicitRuntimeImports=new Map);let c=o.utilizedImplicitRuntimeImports.get(a);c||(c=new Map,o.utilizedImplicitRuntimeImports.set(a,c));const l=t.createUniqueName(`_${e}`,112),_=t.createImportSpecifier(!1,t.createIdentifier(e),l);return _N(l,_),c.set(e,_),l}function l(t){return 2&t.transformFlags?function(t){switch(t.kind){case 285:return f(t,!1);case 286:return g(t,!1);case 289:return h(t,!1);case 295:return A(t);default:return IJ(t,l,e)}}(t):t}function _(e){switch(e.kind){case 12:return function(e){const n=function(e){let t,n=0,r=-1;for(let i=0;iuP(e)&&(fD(e.name)&&"__proto__"===kc(e.name)||QN(e.name)&&"__proto__"===e.name.text))}function d(e){return void 0===o.importSpecifier||function(e){let t=!1;for(const n of e.attributes.properties)if(!iP(n)||vE(n.expression)&&!n.expression.properties.some(pP)){if(t&&nP(n)&&fD(n.name)&&"key"===n.name.escapedText)return!0}else t=!0;return!1}(e)}function f(e,t){return(d(e.openingElement)?x:v)(e.openingElement,e.children,t,e)}function g(e,t){return(d(e)?x:v)(e,void 0,t,e)}function h(e,t){return(void 0===o.importSpecifier?k:S)(e.openingFragment,e.children,t,e)}function y(e){const n=gy(e);if(1===m(n)&&!n[0].dotDotDotToken){const e=_(n[0]);return e&&t.createPropertyAssignment("children",e)}const r=U(e,_);return m(r)?t.createPropertyAssignment("children",t.createArrayLiteralExpression(r)):void 0}function v(e,n,r,i){const o=F(e),a=n&&n.length?y(n):void 0,s=T(e.attributes.properties,e=>!!e.name&&fD(e.name)&&"key"===e.name.escapedText),c=s?P(e.attributes.properties,e=>e!==s):e.attributes.properties;return b(o,m(c)?C(c,a):t.createObjectLiteralExpression(a?[a]:p),s,n||p,r,i)}function b(e,n,o,c,l,_){var u;const d=gy(c),p=m(d)>1||!!(null==(u=d[0])?void 0:u.dotDotDotToken),f=[e,n];if(o&&f.push(N(o.initializer)),5===r.jsx){const e=hc(i);if(e&&mP(e)){void 0===o&&f.push(t.createVoidZero()),f.push(p?t.createTrue():t.createFalse());const n=Ha(e,_.pos);f.push(t.createObjectLiteralExpression([t.createPropertyAssignment("fileName",a()),t.createPropertyAssignment("lineNumber",t.createNumericLiteral(n.line+1)),t.createPropertyAssignment("columnNumber",t.createNumericLiteral(n.character+1))])),f.push(t.createThis())}}const g=AI(t.createCallExpression(s(p),void 0,f),_);return l&&MA(g),g}function x(n,a,s,l){const u=F(n),d=n.attributes.properties,p=m(d)?C(d):t.createNull(),f=void 0===o.importSpecifier?gA(t,e.getEmitResolver().getJsxFactoryEntity(i),r.reactNamespace,n):c("createElement"),g=hA(t,f,u,p,U(a,_),l);return s&&MA(g),g}function S(e,n,r,i){let o;if(n&&n.length){const e=function(e){const n=y(e);return n&&t.createObjectLiteralExpression([n])}(n);e&&(o=e)}return b(c("Fragment"),o||t.createObjectLiteralExpression([]),void 0,n,r,i)}function k(n,o,a,s){const c=yA(t,e.getEmitResolver().getJsxFactoryEntity(i),e.getEmitResolver().getJsxFragmentFactoryEntity(i),r.reactNamespace,U(o,_),n,s);return a&&MA(c),c}function C(e,i){const o=wS(r);return o&&o>=5?t.createObjectLiteralExpression(function(e,n){const r=M(H(e,iP,(e,n)=>M(O(e,e=>{return n?vE((r=e).expression)&&!u(r.expression)?j(r.expression.properties,e=>gn.checkDefined(kJ(e,l,w_))):t.createSpreadAssignment(gn.checkDefined(kJ(r.expression,l,Q_))):w(e);var r}))));n&&r.push(n);return r}(e,i)):function(e,r){const i=[];let o=[];for(const t of e)if(iP(t)){if(vE(t.expression)&&!u(t.expression)){for(const e of t.expression.properties)pP(e)?(a(),i.push(gn.checkDefined(kJ(e.expression,l,Q_)))):o.push(gn.checkDefined(kJ(e,l)));continue}a(),i.push(gn.checkDefined(kJ(t.expression,l,Q_)))}else o.push(w(t));r&&o.push(r);a(),i.length&&!vE(i[0])&&i.unshift(t.createObjectLiteralExpression());return Ce(i)||n().createAssignHelper(i);function a(){o.length&&(i.push(t.createObjectLiteralExpression(o)),o=[])}}(e,i)}function w(e){const n=function(e){const n=e.name;if(fD(n)){const e=kc(n);return/^[A-Z_]\w*$/i.test(e)?n:t.createStringLiteral(e)}return t.createStringLiteral(kc(n.namespace)+":"+kc(n.name))}(e),r=N(e.initializer);return t.createPropertyAssignment(n,r)}function N(e){if(void 0===e)return t.createTrue();if(11===e.kind){const n=void 0!==e.singleQuote?e.singleQuote:!Gm(e,i);return AI(t.createStringLiteral(function(e){const t=E(e);return t===e?void 0:t}(e.text)||e.text,n),e)}return 295===e.kind?void 0===e.expression?t.createTrue():gn.checkDefined(kJ(e.expression,l,Q_)):GF(e)?f(e,!1):XF(e)?g(e,!1):ZF(e)?h(e,!1):gn.failBadSyntaxKind(e)}function D(e,t){const n=E(t);return void 0===e?n:e+" "+n}function E(e){return e.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,(e,t,n,r,i,o,a)=>{if(i)return Ns(parseInt(i,10));if(o)return Ns(parseInt(o,16));{const t=Eq.get(a);return t?Ns(t):e}})}function F(e){if(285===e.kind)return F(e.openingElement);{const n=e.tagName;return fD(n)&&My(n.escapedText)?t.createStringLiteral(kc(n)):aP(n)?t.createStringLiteral(kc(n.namespace)+":"+kc(n.name)):bA(t,n)}}function A(e){const n=kJ(e.expression,l,Q_);return e.dotDotDotToken?t.createSpreadElement(n):n}}var Eq=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}));function Fq(e){const{factory:t,hoistVariableDeclaration:n}=e;return az(e,function(t){if(t.isDeclarationFile)return t;return IJ(t,r,e)});function r(i){return 512&i.transformFlags?227===i.kind?function(i){switch(i.operatorToken.kind){case 68:return function(e){let i,o;const a=kJ(e.left,r,Q_),s=kJ(e.right,r,Q_);if(xE(a)){const e=t.createTempVariable(n),r=t.createTempVariable(n);i=AI(t.createElementAccessExpression(AI(t.createAssignment(e,a.expression),a.expression),AI(t.createAssignment(r,a.argumentExpression),a.argumentExpression)),a),o=AI(t.createElementAccessExpression(e,r),a)}else if(bE(a)){const e=t.createTempVariable(n);i=AI(t.createPropertyAccessExpression(AI(t.createAssignment(e,a.expression),a.expression),a.name),a),o=AI(t.createPropertyAccessExpression(e,a.name),a)}else i=a,o=a;return AI(t.createAssignment(i,AI(t.createGlobalMethodCall("Math","pow",[o,s]),e)),e)}(i);case 43:return function(e){const n=kJ(e.left,r,Q_),i=kJ(e.right,r,Q_);return AI(t.createGlobalMethodCall("Math","pow",[n,i]),e)}(i);default:return IJ(i,r,e)}}(i):IJ(i,r,e):i}}function Pq(e,t){return{kind:e,expression:t}}function Aq(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getCompilerOptions(),c=e.getEmitResolver(),l=e.onSubstituteNode,_=e.onEmitNode;let u,d,p,f,m;function g(e){f=le(f,t.createVariableDeclaration(e))}e.onEmitNode=function(e,t,n){if(1&h&&__(t)){const r=y(32670,16&ap(t)?81:65);return _(e,t,n),void v(r,0,0)}_(e,t,n)},e.onSubstituteNode=function(e,n){if(n=l(e,n),1===e)return function(e){switch(e.kind){case 80:return function(e){if(2&h&&!TA(e)){const n=c.getReferencedDeclarationWithCollidingName(e);if(n&&(!y_(n)||!function(e,t){let n=bc(t);if(!n||n===e||n.end<=e.pos||n.pos>=e.end)return!1;const r=Mp(e);for(;n;){if(n===r||n===e)return!1;if(h_(n)&&n.parent===e)return!0;n=n.parent}return!1}(n,e)))return AI(t.getGeneratedNameForNode(Ac(n)),e)}return e}(e);case 110:return function(e){if(1&h&&16&p)return AI(E(),e);return e}(e)}return e}(n);if(fD(n))return function(e){if(2&h&&!TA(e)){const n=bc(e,fD);if(n&&function(e){switch(e.parent.kind){case 209:case 264:case 267:case 261:return e.parent.name===e&&c.isDeclarationWithCollidingName(e.parent)}return!1}(n))return AI(t.getGeneratedNameForNode(n),e)}return e}(n);return n};let h=0;return az(e,function(n){if(n.isDeclarationFile)return n;u=n,d=n.text;const i=function(e){const n=y(8064,64),i=[],a=[];r();const s=t.copyPrologue(e.statements,i,!1,S);de(a,TJ(e.statements,S,bu,s)),f&&a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(f)));return t.mergeLexicalEnvironment(i,o()),oe(i,e),v(n,0,0),t.updateSourceFile(e,AI(t.createNodeArray(Y(i,a)),e.statements))}(n);return Qw(i,e.readEmitHelpers()),u=void 0,d=void 0,f=void 0,p=0,i});function y(e,t){const n=p;return p=32767&(p&~e|t),n}function v(e,t,n){p=-32768&(p&~t|n)|e}function b(e){return!!(8192&p)&&254===e.kind&&!e.expression}function x(e){return!!(1024&e.transformFlags)||void 0!==m||8192&p&&function(e){return 4194304&e.transformFlags&&(_F(e)||nF(e)||uF(e)||dF(e)||wF(e)||sP(e)||cP(e)||mF(e)||_P(e)||pF(e)||Z_(e,!1)||YE(e))}(e)||Z_(e,!1)&&qe(e)||!!(1&sp(e))}function S(e){return x(e)?N(e,!1):e}function T(e){return x(e)?N(e,!0):e}function C(e){if(x(e)){const t=hc(e);if(LD(t)&&Mv(t)){const t=y(32670,16449),n=N(e,!1);return v(t,229376,0),n}return N(e,!1)}return e}function w(e){return 108===e.kind?lt(e,!0):S(e)}function N(n,r){switch(n.kind){case 126:return;case 264:return function(e){const n=t.createVariableDeclaration(t.getLocalName(e,!0),void 0,void 0,A(e));Cw(n,e);const r=[],i=t.createVariableStatement(void 0,t.createVariableDeclarationList([n]));if(Cw(i,e),AI(i,e),MA(i),r.push(i),Lv(e,32)){const n=Lv(e,2048)?t.createExportDefault(t.getLocalName(e)):t.createExternalModuleExport(t.getLocalName(e));Cw(n,i),r.push(n)}return Ne(r)}(n);case 232:return function(e){return A(e)}(n);case 170:return function(e){return e.dotDotDotToken?void 0:E_(e.name)?Cw(AI(t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e),void 0,void 0,void 0),e),e):e.initializer?Cw(AI(t.createParameterDeclaration(void 0,void 0,e.name,void 0,void 0,void 0),e),e):e}(n);case 263:return function(n){const r=m;m=void 0;const i=y(32670,65),o=DJ(n.parameters,S,e),a=ge(n),s=32768&p?t.getLocalName(n):n.name;return v(i,229376,0),m=r,t.updateFunctionDeclaration(n,TJ(n.modifiers,S,a_),n.asteriskToken,s,void 0,o,void 0,a)}(n);case 220:return function(n){16384&n.transformFlags&&!(16384&p)&&(p|=131072);const r=m;m=void 0;const i=y(15232,66),o=t.createFunctionExpression(void 0,void 0,void 0,void 0,DJ(n.parameters,S,e),void 0,ge(n));return AI(o,n),Cw(o,n),Ew(o,16),v(i,0,0),m=r,o}(n);case 219:return function(n){const r=524288&ap(n)?y(32662,69):y(32670,65),i=m;m=void 0;const o=DJ(n.parameters,S,e),a=ge(n),s=32768&p?t.getLocalName(n):n.name;return v(r,229376,0),m=i,t.updateFunctionExpression(n,void 0,n.asteriskToken,s,void 0,o,void 0,a)}(n);case 261:return Se(n);case 80:return F(n);case 262:return function(n){if(7&n.flags||524288&n.transformFlags){7&n.flags&&_t();const e=TJ(n.declarations,1&n.flags?be:Se,hF),r=t.createVariableDeclarationList(e);return Cw(r,n),AI(r,n),Jw(r,n),524288&n.transformFlags&&(E_(n.declarations[0].name)||E_(Te(n.declarations).name))&&Ow(r,function(e){let t=-1,n=-1;for(const r of e)t=-1===t?r.pos:-1===r.pos?t:Math.min(t,r.pos),n=Math.max(n,r.end);return Jb(t,n)}(e)),r}return IJ(n,S,e)}(n);case 256:return function(t){if(void 0!==m){const n=m.allowedNonLabeledJumps;m.allowedNonLabeledJumps|=2;const r=IJ(t,S,e);return m.allowedNonLabeledJumps=n,r}return IJ(t,S,e)}(n);case 270:return function(t){const n=y(7104,0),r=IJ(t,S,e);return v(n,0,0),r}(n);case 242:return function(t,n){if(n)return IJ(t,S,e);const r=256&p?y(7104,512):y(6976,128),i=IJ(t,S,e);return v(r,0,0),i}(n,!1);case 253:case 252:return function(n){if(m){const e=253===n.kind?2:4;if(!(n.label&&m.labels&&m.labels.get(kc(n.label))||!n.label&&m.allowedNonLabeledJumps&e)){let e;const r=n.label;r?253===n.kind?(e=`break-${r.escapedText}`,Ge(m,!0,kc(r),e)):(e=`continue-${r.escapedText}`,Ge(m,!1,kc(r),e)):253===n.kind?(m.nonLocalJumps|=2,e="break"):(m.nonLocalJumps|=4,e="continue");let i=t.createStringLiteral(e);if(m.loopOutParameters.length){const e=m.loopOutParameters;let n;for(let r=0;rZE(e)&&!!xe(e.declarationList.declarations).initializer,i=m;m=void 0;const o=TJ(n.statements,C,bu);m=i;const a=P(o,r),s=P(o,e=>!r(e)),c=st(xe(a),ZE).declarationList.declarations[0],l=LA(c.initializer);let _=at(l,ub);!_&&LE(l)&&28===l.operatorToken.kind&&(_=at(l.left,ub));const u=st(_?LA(_.right):l,SE),d=st(LA(u.expression),NE),p=d.body.statements;let f=0,g=-1;const h=[];if(_){const e=at(p[f],tF);e&&(h.push(e),f++),h.push(p[f]),f++,h.push(t.createExpressionStatement(t.createAssignment(_.left,st(c.name,fD))))}for(;!_F(ye(p,g));)g--;de(h,p,f,g),g<-1&&de(h,p,g+1);const y=at(ye(p,g),_F);for(const e of s)_F(e)&&(null==y?void 0:y.expression)&&!fD(y.expression)?h.push(y):h.push(e);return de(h,a,1),t.restoreOuterExpressions(e.expression,t.restoreOuterExpressions(c.initializer,t.restoreOuterExpressions(_&&_.right,t.updateCallExpression(u,t.restoreOuterExpressions(u.expression,t.updateFunctionExpression(d,void 0,void 0,void 0,void 0,d.parameters,void 0,t.updateBlock(d.body,h))),void 0,u.arguments))))}(n);const r=LA(n.expression);if(108===r.kind||pm(r)||X(n.arguments,BE))return function(n,r){if(32768&n.transformFlags||108===n.expression.kind||pm(LA(n.expression))){const{target:e,thisArg:i}=t.createCallBinding(n.expression,a);let o;if(108===n.expression.kind&&Ew(i,8),o=32768&n.transformFlags?t.createFunctionApplyCall(gn.checkDefined(kJ(e,w,Q_)),108===n.expression.kind?i:gn.checkDefined(kJ(i,S,Q_)),tt(n.arguments,!0,!1,!1)):AI(t.createFunctionCallCall(gn.checkDefined(kJ(e,w,Q_)),108===n.expression.kind?i:gn.checkDefined(kJ(i,S,Q_)),TJ(n.arguments,S,Q_)),n),108===n.expression.kind){const e=t.createLogicalOr(o,Z());o=r?t.createAssignment(E(),e):e}return Cw(o,n)}gf(n)&&(p|=131072);return IJ(n,S,e)}(n,!0);return t.updateCallExpression(n,gn.checkDefined(kJ(n.expression,w,Q_)),void 0,TJ(n.arguments,S,Q_))}(n);case 215:return function(n){if(X(n.arguments,BE)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return t.createNewExpression(t.createFunctionApplyCall(gn.checkDefined(kJ(e,S,Q_)),r,tt(t.createNodeArray([t.createVoidZero(),...n.arguments]),!0,!1,!1)),void 0,[])}return IJ(n,S,e)}(n);case 218:return function(t,n){return IJ(t,n?T:S,e)}(n,r);case 227:return he(n,r);case 357:return function(n,r){if(r)return IJ(n,T,e);let i;for(let e=0;e0&&e.push(t.createStringLiteral(r.literal.text)),n=t.createCallExpression(t.createPropertyAccessExpression(n,"concat"),void 0,e)}return AI(n,e)}(n);case 231:return function(e){return kJ(e.expression,S,Q_)}(n);case 108:return lt(n,!1);case 110:return function(e){p|=65536,2&p&&!(16384&p)&&(p|=131072);if(m)return 2&p?(m.containsLexicalThis=!0,e):m.thisName||(m.thisName=t.createUniqueName("this"));return e}(n);case 237:return function(e){if(105===e.keywordToken&&"target"===e.name.escapedText)return p|=32768,t.createUniqueName("_newTarget",48);return e}(n);case 175:return function(e){gn.assert(!FD(e.name));const n=me(e,qb(e,-1),void 0,void 0);return Ew(n,1024|ap(n)),AI(t.createPropertyAssignment(e.name,n),e)}(n);case 178:case 179:return function(n){gn.assert(!FD(n.name));const r=m;m=void 0;const i=y(32670,65);let o;const a=DJ(n.parameters,S,e),s=ge(n);o=178===n.kind?t.updateGetAccessorDeclaration(n,n.modifiers,n.name,a,n.type,s):t.updateSetAccessorDeclaration(n,n.modifiers,n.name,a,s);return v(i,229376,0),m=r,o}(n);case 244:return function(n){const r=y(0,Lv(n,32)?32:0);let i;if(!m||7&n.declarationList.flags||function(e){return 1===e.declarationList.declarations.length&&!!e.declarationList.declarations[0].initializer&&!!(1&sp(e.declarationList.declarations[0].initializer))}(n))i=IJ(n,S,e);else{let r;for(const i of n.declarationList.declarations)if(Ve(m,i),i.initializer){let n;E_(i.name)?n=Bz(i,S,e,0):(n=t.createBinaryExpression(i.name,64,gn.checkDefined(kJ(i.initializer,S,Q_))),AI(n,i)),r=le(r,n)}i=r?AI(t.createExpressionStatement(t.inlineExpressions(r)),n):void 0}return v(r,0,0),i}(n);case 254:return function(n){if(m)return m.nonLocalJumps|=8,b(n)&&(n=D(n)),t.createReturnStatement(t.createObjectLiteralExpression([t.createPropertyAssignment(t.createIdentifier("value"),n.expression?gn.checkDefined(kJ(n.expression,S,Q_)):t.createVoidZero())]));if(b(n))return D(n);return IJ(n,S,e)}(n);default:return IJ(n,S,e)}}function D(e){return Cw(t.createReturnStatement(E()),e)}function E(){return t.createUniqueName("_this",48)}function F(e){return m&&c.isArgumentsLocalBinding(e)?m.argumentsName||(m.argumentsName=t.createUniqueName("arguments")):256&e.flags?Cw(AI(t.createIdentifier(Sc(e.escapedText)),e),e):e}function A(a){a.name&&_t();const s=wh(a),c=t.createFunctionExpression(void 0,void 0,void 0,void 0,s?[t.createParameterDeclaration(void 0,void 0,ct())]:[],void 0,function(a,s){const c=[],l=t.getInternalName(a),_=Rh(l)?t.getGeneratedNameForNode(l):l;r(),function(e,r,i){i&&e.push(AI(t.createExpressionStatement(n().createExtendsHelper(t.getInternalName(r))),i))}(c,a,s),function(n,r,a,s){const c=m;m=void 0;const l=y(32662,73),_=uv(r),u=function(e,t){if(!e||!t)return!1;if(X(e.parameters))return!1;const n=ve(e.body.statements);if(!n||!sy(n)||245!==n.kind)return!1;const r=n.expression;if(!sy(r)||214!==r.kind)return!1;const i=r.expression;if(!sy(i)||108!==i.kind)return!1;const o=Ce(r.arguments);if(!o||!sy(o)||231!==o.kind)return!1;const a=o.expression;return fD(a)&&"arguments"===a.escapedText}(_,void 0!==s),d=t.createFunctionDeclaration(void 0,void 0,a,void 0,function(t,n){return DJ(t&&!n?t.parameters:void 0,S,e)||[]}(_,u),void 0,function(e,n,r,a){const s=!!r&&106!==LA(r.expression).kind;if(!e)return function(e,n){const r=[];i(),t.mergeLexicalEnvironment(r,o()),n&&r.push(t.createReturnStatement(t.createLogicalOr(t.createLogicalAnd(t.createStrictInequality(ct(),t.createNull()),t.createFunctionApplyCall(ct(),Z(),t.createIdentifier("arguments"))),Z())));const a=t.createNodeArray(r);AI(a,e.members);const s=t.createBlock(a,!0);return AI(s,e),Ew(s,3072),s}(n,s);const c=[],l=[];i();const _=t.copyStandardPrologue(e.body.statements,c,0);(a||L(e.body))&&(p|=8192);de(l,TJ(e.body.statements,S,bu,_));const u=s||8192&p;te(c,e),ie(c,e,a),ce(c,e),u?se(c,e,Z()):oe(c,e);t.mergeLexicalEnvironment(c,o()),u&&!Q(e.body)&&l.push(t.createReturnStatement(E()));const d=t.createBlock(AI(t.createNodeArray([...c,...l]),e.body.statements),!0);return AI(d,e.body),function(e,n,r){const i=e;e=function(e){for(let n=0;n0;n--){const i=e.statements[n];if(_F(i)&&i.expression&&j(i.expression)){const i=e.statements[n-1];let o;if(tF(i)&&W(LA(i.expression)))o=i.expression;else if(r&&B(i)){const e=i.declarationList.declarations[0];$(LA(e.initializer))&&(o=t.createAssignment(E(),e.initializer))}if(!o)break;const a=t.createReturnStatement(o);Cw(a,i),AI(a,i);const s=t.createNodeArray([...e.statements.slice(0,n-1),a,...e.statements.slice(n+1)]);return AI(s,e.statements),t.updateBlock(e,s)}}return e}(e,n),e!==i&&(e=function(e,n){if(16384&n.transformFlags||65536&p||131072&p)return e;for(const t of n.statements)if(134217728&t.transformFlags&&!vz(t))return e;return t.updateBlock(e,TJ(e.statements,K,bu))}(e,n));r&&(e=function(e){return t.updateBlock(e,TJ(e.statements,G,bu))}(e));return e}(d,e.body,a)}(_,r,s,u));AI(d,_||r),s&&Ew(d,16);n.push(d),v(l,229376,0),m=c}(c,a,_,s),function(e,t){for(const n of t.members)switch(n.kind){case 241:e.push(_e(n));break;case 175:e.push(ue(ut(t,n),n,t));break;case 178:case 179:const r=bv(t.members,n);n===r.firstAccessor&&e.push(pe(ut(t,n),r,t));break;case 177:case 176:break;default:gn.failBadSyntaxKind(n,u&&u.fileName)}}(c,a);const f=Wb(is(d,a.members.end),20),g=t.createPartiallyEmittedExpression(_);AT(g,f.end),Ew(g,3072);const h=t.createReturnStatement(g);PT(h,f.pos),Ew(h,3840),c.push(h),zd(c,o());const b=t.createBlock(AI(t.createNodeArray(c),a.members),!0);return Ew(b,3072),b}(a,s));Ew(c,131072&ap(a)|1048576);const l=t.createPartiallyEmittedExpression(c);AT(l,a.end),Ew(l,3072);const _=t.createPartiallyEmittedExpression(l);AT(_,is(d,a.pos)),Ew(_,3072);const f=t.createParenthesizedExpression(t.createCallExpression(_,void 0,s?[gn.checkDefined(kJ(s.expression,S,Q_))]:[]));return Uw(f,3,"* @class "),f}function I(e){return ZE(e)&&k(e.declarationList.declarations,e=>fD(e.name)&&!e.initializer)}function L(e){if(gf(e))return!0;if(!(134217728&e.transformFlags))return!1;switch(e.kind){case 220:case 219:case 263:case 177:case 176:return!1;case 178:case 179:case 175:case 173:{const t=e;return!!FD(t.name)&&!!sO(t.name,L)}}return!!sO(e,L)}function j(e){return Yl(e)&&"_this"===kc(e)}function R(e){return Yl(e)&&"_super"===kc(e)}function B(e){return ZE(e)&&1===e.declarationList.declarations.length&&function(e){return hF(e)&&j(e.name)&&!!e.initializer}(e.declarationList.declarations[0])}function J(e){return ub(e,!0)&&j(e.left)}function z(e){return SE(e)&&bE(e.expression)&&R(e.expression.expression)&&fD(e.expression.name)&&("call"===kc(e.expression.name)||"apply"===kc(e.expression.name))&&e.arguments.length>=1&&110===e.arguments[0].kind}function q(e){return LE(e)&&57===e.operatorToken.kind&&110===e.right.kind&&z(e.left)}function U(e){return LE(e)&&56===e.operatorToken.kind&&LE(e.left)&&38===e.left.operatorToken.kind&&R(e.left.left)&&106===e.left.right.kind&&z(e.right)&&"apply"===kc(e.right.expression.name)}function V(e){return LE(e)&&57===e.operatorToken.kind&&110===e.right.kind&&U(e.left)}function W(e){return J(e)&&q(e.right)}function $(e){return z(e)||q(e)||W(e)||U(e)||V(e)||function(e){return J(e)&&V(e.right)}(e)}function K(e){if(B(e)){if(110===e.declarationList.declarations[0].initializer.kind)return}else if(J(e))return t.createPartiallyEmittedExpression(e.right,e);switch(e.kind){case 220:case 219:case 263:case 177:case 176:return e;case 178:case 179:case 175:case 173:{const n=e;return FD(n.name)?t.replacePropertyName(n,IJ(n.name,K,void 0)):e}}return IJ(e,K,void 0)}function G(e){if(z(e)&&2===e.arguments.length&&fD(e.arguments[1])&&"arguments"===kc(e.arguments[1]))return t.createLogicalAnd(t.createStrictInequality(ct(),t.createNull()),e);switch(e.kind){case 220:case 219:case 263:case 177:case 176:return e;case 178:case 179:case 175:case 173:{const n=e;return FD(n.name)?t.replacePropertyName(n,IJ(n.name,G,void 0)):e}}return IJ(e,G,void 0)}function Q(e){if(254===e.kind)return!0;if(246===e.kind){const t=e;if(t.elseStatement)return Q(t.thenStatement)&&Q(t.elseStatement)}else if(242===e.kind){const t=ke(e.statements);if(t&&Q(t))return!0}return!1}function Z(){return Ew(t.createThis(),8)}function ee(e){return void 0!==e.initializer||E_(e.name)}function te(e,t){if(!X(t.parameters,ee))return!1;let n=!1;for(const r of t.parameters){const{name:t,initializer:i,dotDotDotToken:o}=r;o||(E_(t)?n=ne(e,r,t,i)||n:i&&(re(e,r,t,i),n=!0))}return n}function ne(n,r,i,o){return i.elements.length>0?(Vd(n,Ew(t.createVariableStatement(void 0,t.createVariableDeclarationList(qz(r,S,e,0,t.getGeneratedNameForNode(r)))),2097152)),!0):!!o&&(Vd(n,Ew(t.createExpressionStatement(t.createAssignment(t.getGeneratedNameForNode(r),gn.checkDefined(kJ(o,S,Q_)))),2097152)),!0)}function re(e,n,r,i){i=gn.checkDefined(kJ(i,S,Q_));const o=t.createIfStatement(t.createTypeCheck(t.cloneNode(r),"undefined"),Ew(AI(t.createBlock([t.createExpressionStatement(Ew(AI(t.createAssignment(Ew(jT(AI(t.cloneNode(r),r),r.parent),96),Ew(i,3168|ap(i))),n),3072))]),n),3905));MA(o),AI(o,n),Ew(o,2101056),Vd(e,o)}function ie(n,r,i){const o=[],a=ke(r.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(a,i))return!1;const s=80===a.name.kind?jT(AI(t.cloneNode(a.name),a.name),a.name.parent):t.createTempVariable(void 0);Ew(s,96);const c=80===a.name.kind?t.cloneNode(a.name):s,l=r.parameters.length-1,_=t.createLoopVariable();o.push(Ew(AI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(s,void 0,void 0,t.createArrayLiteralExpression([]))])),a),2097152));const u=t.createForStatement(AI(t.createVariableDeclarationList([t.createVariableDeclaration(_,void 0,void 0,t.createNumericLiteral(l))]),a),AI(t.createLessThan(_,t.createPropertyAccessExpression(t.createIdentifier("arguments"),"length")),a),AI(t.createPostfixIncrement(_),a),t.createBlock([MA(AI(t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(c,0===l?_:t.createSubtract(_,t.createNumericLiteral(l))),t.createElementAccessExpression(t.createIdentifier("arguments"),_))),a))]));return Ew(u,2097152),MA(u),o.push(u),80!==a.name.kind&&o.push(Ew(AI(t.createVariableStatement(void 0,t.createVariableDeclarationList(qz(a,S,e,0,c))),a),2097152)),qd(n,o),!0}function oe(e,n){return!!(131072&p&&220!==n.kind)&&(se(e,n,t.createThis()),!0)}function se(n,r,i){1&h||(h|=1,e.enableSubstitution(110),e.enableEmitNotification(177),e.enableEmitNotification(175),e.enableEmitNotification(178),e.enableEmitNotification(179),e.enableEmitNotification(220),e.enableEmitNotification(219),e.enableEmitNotification(263));const o=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(E(),void 0,void 0,i)]));Ew(o,2100224),Ow(o,r),Vd(n,o)}function ce(e,n){if(32768&p){let r;switch(n.kind){case 220:return e;case 175:case 178:case 179:r=t.createVoidZero();break;case 177:r=t.createPropertyAccessExpression(Ew(t.createThis(),8),"constructor");break;case 263:case 219:r=t.createConditionalExpression(t.createLogicalAnd(Ew(t.createThis(),8),t.createBinaryExpression(Ew(t.createThis(),8),104,t.getLocalName(n))),void 0,t.createPropertyAccessExpression(Ew(t.createThis(),8),"constructor"),void 0,t.createVoidZero());break;default:return gn.failBadSyntaxKind(n)}const i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_newTarget",48),void 0,void 0,r)]));Ew(i,2100224),Vd(e,i)}return e}function _e(e){return AI(t.createEmptyStatement(),e)}function ue(n,r,i){const o=Bw(r),a=Iw(r),s=me(r,r,void 0,i),c=kJ(r.name,S,c_);let l;if(gn.assert(c),!mD(c)&&zS(e.getCompilerOptions())){const e=FD(c)?c.expression:fD(c)?t.createStringLiteral(Sc(c.escapedText)):c;l=t.createObjectDefinePropertyCall(n,e,t.createPropertyDescriptor({value:s,enumerable:!1,writable:!0,configurable:!0}))}else{const e=pA(t,n,c,r.name);l=t.createAssignment(e,s)}Ew(s,3072),Ow(s,a);const _=AI(t.createExpressionStatement(l),r);return Cw(_,r),Jw(_,o),Ew(_,96),_}function pe(e,n,r){const i=t.createExpressionStatement(fe(e,n,r,!1));return Ew(i,3072),Ow(i,Iw(n.firstAccessor)),i}function fe(e,{firstAccessor:n,getAccessor:r,setAccessor:i},o,a){const s=jT(AI(t.cloneNode(e),e),e.parent);Ew(s,3136),Ow(s,n.name);const c=kJ(n.name,S,c_);if(gn.assert(c),mD(c))return gn.failBadSyntaxKind(c,"Encountered unhandled private identifier while transforming ES2015.");const l=xA(t,c);Ew(l,3104),Ow(l,n.name);const _=[];if(r){const e=me(r,void 0,void 0,o);Ow(e,Iw(r)),Ew(e,1024);const n=t.createPropertyAssignment("get",e);Jw(n,Bw(r)),_.push(n)}if(i){const e=me(i,void 0,void 0,o);Ow(e,Iw(i)),Ew(e,1024);const n=t.createPropertyAssignment("set",e);Jw(n,Bw(i)),_.push(n)}_.push(t.createPropertyAssignment("enumerable",r||i?t.createFalse():t.createTrue()),t.createPropertyAssignment("configurable",t.createTrue()));const u=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[s,l,t.createObjectLiteralExpression(_,!0)]);return a&&MA(u),u}function me(n,r,i,o){const a=m;m=void 0;const s=o&&y_(o)&&!jv(n)?y(32670,73):y(32670,65),c=DJ(n.parameters,S,e),l=ge(n);return 32768&p&&!i&&(263===n.kind||219===n.kind)&&(i=t.getGeneratedNameForNode(n)),v(s,229376,0),m=a,Cw(AI(t.createFunctionExpression(void 0,n.asteriskToken,i,void 0,c,void 0,l),r),n)}function ge(e){let n,r,a=!1,s=!1;const c=[],l=[],_=e.body;let d;if(i(),YE(_)&&(d=t.copyStandardPrologue(_.statements,c,0,!1),d=t.copyCustomPrologue(_.statements,l,d,S,Sf),d=t.copyCustomPrologue(_.statements,l,d,S,Tf)),a=te(l,e)||a,a=ie(l,e,!1)||a,YE(_))d=t.copyCustomPrologue(_.statements,l,d,S),n=_.statements,de(l,TJ(_.statements,S,bu,d)),!a&&_.multiLine&&(a=!0);else{gn.assert(220===e.kind),n=zb(_,-1);const i=e.equalsGreaterThanToken;sy(i)||sy(_)||(Xb(i,_,u)?s=!0:a=!0);const o=kJ(_,S,Q_),c=t.createReturnStatement(o);AI(c,_),Kw(c,_),Ew(c,2880),l.push(c),r=_}if(t.mergeLexicalEnvironment(c,o()),ce(c,e),oe(c,e),X(c)&&(a=!0),l.unshift(...c),YE(_)&&ae(l,_.statements))return _;const p=t.createBlock(AI(t.createNodeArray(l),n),a);return AI(p,e.body),!a&&s&&Ew(p,1),r&&jw(p,20,r),Cw(p,e.body),p}function he(n,r){return db(n)?Bz(n,S,e,0,!r):28===n.operatorToken.kind?t.updateBinaryExpression(n,gn.checkDefined(kJ(n.left,T,Q_)),n.operatorToken,gn.checkDefined(kJ(n.right,r?T:S,Q_))):IJ(n,S,e)}function be(n){return E_(n.name)?Se(n):!n.initializer&&function(e){const t=c.hasNodeCheckFlag(e,16384),n=c.hasNodeCheckFlag(e,32768);return!(64&p||t&&n&&512&p)&&!(4096&p)&&(!c.isDeclarationWithCollidingName(e)||n&&!t&&!(6144&p))}(n)?t.updateVariableDeclaration(n,n.name,void 0,void 0,t.createVoidZero()):IJ(n,S,e)}function Se(t){const n=y(32,0);let r;return r=E_(t.name)?qz(t,S,e,0,void 0,!!(32&n)):IJ(t,S,e),v(n,0,0),r}function we(e){m.labels.set(kc(e.label),!0)}function De(e){m.labels.set(kc(e.label),!1)}function Ee(n,i,a,s,c){const l=y(n,i),_=function(n,i,a,s){if(!qe(n)){let r;m&&(r=m.allowedNonLabeledJumps,m.allowedNonLabeledJumps=6);const o=s?s(n,i,void 0,a):t.restoreEnclosingLabel(oF(n)?function(e){return t.updateForStatement(e,kJ(e.initializer,T,su),kJ(e.condition,S,Q_),kJ(e.incrementor,T,Q_),gn.checkDefined(kJ(e.statement,S,bu,t.liftToBlock)))}(n):IJ(n,S,e),i,m&&De);return m&&(m.allowedNonLabeledJumps=r),o}const c=function(e){let t;switch(e.kind){case 249:case 250:case 251:const n=e.initializer;n&&262===n.kind&&(t=n)}const n=[],r=[];if(t&&7&pc(t)){const i=Be(e)||Je(e)||ze(e);for(const o of t.declarations)Qe(e,o,n,r,i)}const i={loopParameters:n,loopOutParameters:r};m&&(m.argumentsName&&(i.argumentsName=m.argumentsName),m.thisName&&(i.thisName=m.thisName),m.hoistedLocalVariables&&(i.hoistedLocalVariables=m.hoistedLocalVariables));return i}(n),l=[],_=m;m=c;const u=Be(n)?function(e,n){const r=t.createUniqueName("_loop_init"),i=!!(1048576&e.initializer.transformFlags);let o=0;n.containsLexicalThis&&(o|=16);i&&4&p&&(o|=524288);const a=[];a.push(t.createVariableStatement(void 0,e.initializer)),He(n.loopOutParameters,2,1,a);const s=t.createVariableStatement(void 0,Ew(t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,Ew(t.createFunctionExpression(void 0,i?t.createToken(42):void 0,void 0,void 0,void 0,void 0,gn.checkDefined(kJ(t.createBlock(a,!0),S,YE))),o))]),4194304)),c=t.createVariableDeclarationList(O(n.loopOutParameters,$e));return{functionName:r,containsYield:i,functionDeclaration:s,part:c}}(n,c):void 0,d=Ue(n)?function(e,n,i){const a=t.createUniqueName("_loop");r();const s=kJ(e.statement,S,bu,t.liftToBlock),c=o(),l=[];(Je(e)||ze(e))&&(n.conditionVariable=t.createUniqueName("inc"),e.incrementor?l.push(t.createIfStatement(n.conditionVariable,t.createExpressionStatement(gn.checkDefined(kJ(e.incrementor,S,Q_))),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))):l.push(t.createIfStatement(t.createLogicalNot(n.conditionVariable),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))),Je(e)&&l.push(t.createIfStatement(t.createPrefixUnaryExpression(54,gn.checkDefined(kJ(e.condition,S,Q_))),gn.checkDefined(kJ(t.createBreakStatement(),S,bu)))));gn.assert(s),YE(s)?de(l,s.statements):l.push(s);He(n.loopOutParameters,1,1,l),zd(l,c);const _=t.createBlock(l,!0);YE(s)&&Cw(_,s);const u=!!(1048576&e.statement.transformFlags);let d=1048576;n.containsLexicalThis&&(d|=16);u&&4&p&&(d|=524288);const f=t.createVariableStatement(void 0,Ew(t.createVariableDeclarationList([t.createVariableDeclaration(a,void 0,void 0,Ew(t.createFunctionExpression(void 0,u?t.createToken(42):void 0,void 0,void 0,n.loopParameters,void 0,_),d))]),4194304)),m=function(e,n,r,i){const o=[],a=!(-5&n.nonLocalJumps||n.labeledNonLocalBreaks||n.labeledNonLocalContinues),s=t.createCallExpression(e,void 0,O(n.loopParameters,e=>e.name)),c=i?t.createYieldExpression(t.createToken(42),Ew(s,8388608)):s;if(a)o.push(t.createExpressionStatement(c)),He(n.loopOutParameters,1,0,o);else{const e=t.createUniqueName("state"),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,c)]));if(o.push(i),He(n.loopOutParameters,1,0,o),8&n.nonLocalJumps){let n;r?(r.nonLocalJumps|=8,n=t.createReturnStatement(e)):n=t.createReturnStatement(t.createPropertyAccessExpression(e,"value")),o.push(t.createIfStatement(t.createTypeCheck(e,"object"),n))}if(2&n.nonLocalJumps&&o.push(t.createIfStatement(t.createStrictEquality(e,t.createStringLiteral("break")),t.createBreakStatement())),n.labeledNonLocalBreaks||n.labeledNonLocalContinues){const i=[];Xe(n.labeledNonLocalBreaks,!0,e,r,i),Xe(n.labeledNonLocalContinues,!1,e,r,i),o.push(t.createSwitchStatement(e,t.createCaseBlock(i)))}}return o}(a,n,i,u);return{functionName:a,containsYield:u,functionDeclaration:f,part:m}}(n,c,_):void 0;m=_,u&&l.push(u.functionDeclaration);d&&l.push(d.functionDeclaration);(function(e,n,r){let i;n.argumentsName&&(r?r.argumentsName=n.argumentsName:(i||(i=[])).push(t.createVariableDeclaration(n.argumentsName,void 0,void 0,t.createIdentifier("arguments"))));n.thisName&&(r?r.thisName=n.thisName:(i||(i=[])).push(t.createVariableDeclaration(n.thisName,void 0,void 0,t.createIdentifier("this"))));if(n.hoistedLocalVariables)if(r)r.hoistedLocalVariables=n.hoistedLocalVariables;else{i||(i=[]);for(const e of n.hoistedLocalVariables)i.push(t.createVariableDeclaration(e))}if(n.loopOutParameters.length){i||(i=[]);for(const e of n.loopOutParameters)i.push(t.createVariableDeclaration(e.outParamName))}n.conditionVariable&&(i||(i=[]),i.push(t.createVariableDeclaration(n.conditionVariable,void 0,void 0,t.createFalse())));i&&e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(i)))})(l,c,_),u&&l.push(function(e,n){const r=t.createCallExpression(e,void 0,[]),i=n?t.createYieldExpression(t.createToken(42),Ew(r,8388608)):r;return t.createExpressionStatement(i)}(u.functionName,u.containsYield));let f;if(d)if(s)f=s(n,i,d.part,a);else{const e=We(n,u,t.createBlock(d.part,!0));f=t.restoreEnclosingLabel(e,i,m&&De)}else{const e=We(n,u,gn.checkDefined(kJ(n.statement,S,bu,t.liftToBlock)));f=t.restoreEnclosingLabel(e,i,m&&De)}return l.push(f),l}(a,s,l,c);return v(l,0,0),_}function Fe(e,t){return Ee(0,1280,e,t)}function Pe(e,t){return Ee(5056,3328,e,t)}function Ae(e,t){return Ee(3008,5376,e,t)}function Ie(e,t){return Ee(3008,5376,e,t,s.downlevelIteration?Me:je)}function Oe(n,r,i){const o=[],a=n.initializer;if(yF(a)){7&n.initializer.flags&&_t();const i=ve(a.declarations);if(i&&E_(i.name)){const a=qz(i,S,e,0,r),s=AI(t.createVariableDeclarationList(a),n.initializer);Cw(s,n.initializer),Ow(s,Jb(a[0].pos,Te(a).end)),o.push(t.createVariableStatement(void 0,s))}else o.push(AI(t.createVariableStatement(void 0,Cw(AI(t.createVariableDeclarationList([t.createVariableDeclaration(i?i.name:t.createTempVariable(void 0),void 0,void 0,r)]),qb(a,-1)),a)),zb(a,-1)))}else{const e=t.createAssignment(a,r);db(e)?o.push(t.createExpressionStatement(he(e,!0))):(AT(e,a.end),o.push(AI(t.createExpressionStatement(gn.checkDefined(kJ(e,S,Q_))),zb(a,-1))))}if(i)return Le(de(o,i));{const e=kJ(n.statement,S,bu,t.liftToBlock);return gn.assert(e),YE(e)?t.updateBlock(e,AI(t.createNodeArray(Y(o,e.statements)),e.statements)):(o.push(e),Le(o))}}function Le(e){return Ew(t.createBlock(t.createNodeArray(e),!0),864)}function je(e,n,r){const i=kJ(e.expression,S,Q_);gn.assert(i);const o=t.createLoopVariable(),a=fD(i)?t.getGeneratedNameForNode(i):t.createTempVariable(void 0);Ew(i,96|ap(i));const s=AI(t.createForStatement(Ew(AI(t.createVariableDeclarationList([AI(t.createVariableDeclaration(o,void 0,void 0,t.createNumericLiteral(0)),qb(e.expression,-1)),AI(t.createVariableDeclaration(a,void 0,void 0,i),e.expression)]),e.expression),4194304),AI(t.createLessThan(o,t.createPropertyAccessExpression(a,"length")),e.expression),AI(t.createPostfixIncrement(o),e.expression),Oe(e,t.createElementAccessExpression(a,o),r)),e);return Ew(s,512),AI(s,e),t.restoreEnclosingLabel(s,n,m&&De)}function Me(e,r,i,o){const s=kJ(e.expression,S,Q_);gn.assert(s);const c=fD(s)?t.getGeneratedNameForNode(s):t.createTempVariable(void 0),l=fD(s)?t.getGeneratedNameForNode(c):t.createTempVariable(void 0),_=t.createUniqueName("e"),u=t.getGeneratedNameForNode(_),d=t.createTempVariable(void 0),p=AI(n().createValuesHelper(s),e.expression),f=t.createCallExpression(t.createPropertyAccessExpression(c,"next"),void 0,[]);a(_),a(d);const g=1024&o?t.inlineExpressions([t.createAssignment(_,t.createVoidZero()),p]):p,h=Ew(AI(t.createForStatement(Ew(AI(t.createVariableDeclarationList([AI(t.createVariableDeclaration(c,void 0,void 0,g),e.expression),t.createVariableDeclaration(l,void 0,void 0,f)]),e.expression),4194304),t.createLogicalNot(t.createPropertyAccessExpression(l,"done")),t.createAssignment(l,f),Oe(e,t.createPropertyAccessExpression(l,"value"),i)),e),512);return t.createTryStatement(t.createBlock([t.restoreEnclosingLabel(h,r,m&&De)]),t.createCatchClause(t.createVariableDeclaration(u),Ew(t.createBlock([t.createExpressionStatement(t.createAssignment(_,t.createObjectLiteralExpression([t.createPropertyAssignment("error",u)])))]),1)),t.createBlock([t.createTryStatement(t.createBlock([Ew(t.createIfStatement(t.createLogicalAnd(t.createLogicalAnd(l,t.createLogicalNot(t.createPropertyAccessExpression(l,"done"))),t.createAssignment(d,t.createPropertyAccessExpression(c,"return"))),t.createExpressionStatement(t.createFunctionCallCall(d,c,[]))),1)]),void 0,Ew(t.createBlock([Ew(t.createIfStatement(_,t.createThrowStatement(t.createPropertyAccessExpression(_,"error"))),1)]),1))]))}function Re(e){return c.hasNodeCheckFlag(e,8192)}function Be(e){return oF(e)&&!!e.initializer&&Re(e.initializer)}function Je(e){return oF(e)&&!!e.condition&&Re(e.condition)}function ze(e){return oF(e)&&!!e.incrementor&&Re(e.incrementor)}function qe(e){return Ue(e)||Be(e)}function Ue(e){return c.hasNodeCheckFlag(e,4096)}function Ve(e,t){e.hoistedLocalVariables||(e.hoistedLocalVariables=[]),function t(n){if(80===n.kind)e.hoistedLocalVariables.push(n);else for(const e of n.elements)zE(e)||t(e.name)}(t.name)}function We(e,n,r){switch(e.kind){case 249:return function(e,n,r){const i=e.condition&&Re(e.condition),o=i||e.incrementor&&Re(e.incrementor);return t.updateForStatement(e,kJ(n?n.part:e.initializer,T,su),kJ(i?void 0:e.condition,S,Q_),kJ(o?void 0:e.incrementor,T,Q_),r)}(e,n,r);case 250:return function(e,n){return t.updateForInStatement(e,gn.checkDefined(kJ(e.initializer,S,su)),gn.checkDefined(kJ(e.expression,S,Q_)),n)}(e,r);case 251:return function(e,n){return t.updateForOfStatement(e,void 0,gn.checkDefined(kJ(e.initializer,S,su)),gn.checkDefined(kJ(e.expression,S,Q_)),n)}(e,r);case 247:return function(e,n){return t.updateDoStatement(e,n,gn.checkDefined(kJ(e.expression,S,Q_)))}(e,r);case 248:return function(e,n){return t.updateWhileStatement(e,gn.checkDefined(kJ(e.expression,S,Q_)),n)}(e,r);default:return gn.failBadSyntaxKind(e,"IterationStatement expected")}}function $e(e){return t.createVariableDeclaration(e.originalName,void 0,void 0,e.outParamName)}function Ke(e,n){const r=0===n?e.outParamName:e.originalName,i=0===n?e.originalName:e.outParamName;return t.createBinaryExpression(i,64,r)}function He(e,n,r,i){for(const o of e)o.flags&n&&i.push(t.createExpressionStatement(Ke(o,r)))}function Ge(e,t,n,r){t?(e.labeledNonLocalBreaks||(e.labeledNonLocalBreaks=new Map),e.labeledNonLocalBreaks.set(n,r)):(e.labeledNonLocalContinues||(e.labeledNonLocalContinues=new Map),e.labeledNonLocalContinues.set(n,r))}function Xe(e,n,r,i,o){e&&e.forEach((e,a)=>{const s=[];if(!i||i.labels&&i.labels.get(a)){const e=t.createIdentifier(a);s.push(n?t.createBreakStatement(e):t.createContinueStatement(e))}else Ge(i,n,a,e),s.push(t.createReturnStatement(r));o.push(t.createCaseClause(t.createStringLiteral(e),s))})}function Qe(e,n,r,i,o){const a=n.name;if(E_(a))for(const t of a.elements)zE(t)||Qe(e,t,r,i,o);else{r.push(t.createParameterDeclaration(void 0,void 0,a));const s=c.hasNodeCheckFlag(n,65536);if(s||o){const r=t.createUniqueName("out_"+kc(a));let o=0;s&&(o|=1),oF(e)&&(e.initializer&&c.isBindingCapturedByNode(e.initializer,n)&&(o|=2),(e.condition&&c.isBindingCapturedByNode(e.condition,n)||e.incrementor&&c.isBindingCapturedByNode(e.incrementor,n))&&(o|=1)),i.push({flags:o,originalName:a,outParamName:r})}}}function Ye(e,n,r){const i=t.createAssignment(pA(t,n,gn.checkDefined(kJ(e.name,S,c_))),gn.checkDefined(kJ(e.initializer,S,Q_)));return AI(i,e),r&&MA(i),i}function Ze(e,n,r){const i=t.createAssignment(pA(t,n,gn.checkDefined(kJ(e.name,S,c_))),t.cloneNode(e.name));return AI(i,e),r&&MA(i),i}function et(e,n,r,i){const o=t.createAssignment(pA(t,n,gn.checkDefined(kJ(e.name,S,c_))),me(e,e,void 0,r));return AI(o,e),i&&MA(o),o}function tt(e,r,i,o){const a=e.length,c=M(H(e,nt,(e,t,n,r)=>t(e,i,o&&r===a)));if(1===c.length){const e=c[0];if(r&&!s.downlevelIteration||BT(e.expression)||HN(e.expression,"___spreadArray"))return e.expression}const l=n(),_=0!==c[0].kind;let u=_?t.createArrayLiteralExpression():c[0].expression;for(let e=_?0:1;e0?t.inlineExpressions(O(i,G)):void 0,kJ(n.condition,R,Q_),kJ(n.incrementor,R,Q_),PJ(n.statement,R,e))}else n=IJ(n,R,e);f&&ce();return n}(r);case 250:return function(n){f&&ae();const r=n.initializer;if(yF(r)){for(const e of r.declarations)a(e.name);n=t.updateForInStatement(n,r.declarations[0].name,gn.checkDefined(kJ(n.expression,R,Q_)),gn.checkDefined(kJ(n.statement,R,bu,t.liftToBlock)))}else n=IJ(n,R,e);f&&ce();return n}(r);case 253:return function(t){if(f){const e=me(t.label&&kc(t.label));if(e>0)return ve(e,t)}return IJ(t,R,e)}(r);case 252:return function(t){if(f){const e=ge(t.label&&kc(t.label));if(e>0)return ve(e,t)}return IJ(t,R,e)}(r);case 254:return function(e){return n=kJ(e.expression,R,Q_),r=e,AI(t.createReturnStatement(t.createArrayLiteralExpression(n?[ye(2),n]:[ye(2)])),r);var n,r}(r);default:return 1048576&r.transformFlags?function(r){switch(r.kind){case 227:return function(n){const r=ly(n);switch(r){case 0:return function(n){if(X(n.right))return rb(n.operatorToken.kind)?function(e){const t=ee(),n=Z();Se(n,gn.checkDefined(kJ(e.left,R,Q_)),e.left),56===e.operatorToken.kind?we(t,n,e.left):Ce(t,n,e.left);return Se(n,gn.checkDefined(kJ(e.right,R,Q_)),e.right),te(t),n}(n):28===n.operatorToken.kind?U(n):t.updateBinaryExpression(n,Y(gn.checkDefined(kJ(n.left,R,Q_))),n.operatorToken,gn.checkDefined(kJ(n.right,R,Q_)));return IJ(n,R,e)}(n);case 1:return function(n){const{left:r,right:i}=n;if(X(i)){let e;switch(r.kind){case 212:e=t.updatePropertyAccessExpression(r,Y(gn.checkDefined(kJ(r.expression,R,W_))),r.name);break;case 213:e=t.updateElementAccessExpression(r,Y(gn.checkDefined(kJ(r.expression,R,W_))),Y(gn.checkDefined(kJ(r.argumentExpression,R,Q_))));break;default:e=gn.checkDefined(kJ(r,R,Q_))}const o=n.operatorToken.kind;return hz(o)?AI(t.createAssignment(e,AI(t.createBinaryExpression(Y(e),yz(o),gn.checkDefined(kJ(i,R,Q_))),n)),n):t.updateBinaryExpression(n,e,n.operatorToken,gn.checkDefined(kJ(i,R,Q_)))}return IJ(n,R,e)}(n);default:return gn.assertNever(r)}}(r);case 357:return function(e){let n=[];for(const r of e.elements)LE(r)&&28===r.operatorToken.kind?n.push(U(r)):(X(r)&&n.length>0&&(Ne(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(gn.checkDefined(kJ(r,R,Q_))));return t.inlineExpressions(n)}(r);case 228:return function(t){if(X(t.whenTrue)||X(t.whenFalse)){const e=ee(),n=ee(),r=Z();return we(e,gn.checkDefined(kJ(t.condition,R,Q_)),t.condition),Se(r,gn.checkDefined(kJ(t.whenTrue,R,Q_)),t.whenTrue),Te(n),te(e),Se(r,gn.checkDefined(kJ(t.whenFalse,R,Q_)),t.whenFalse),te(n),r}return IJ(t,R,e)}(r);case 230:return function(e){const r=ee(),i=kJ(e.expression,R,Q_);if(e.asteriskToken){!function(e,t){Ne(7,[e],t)}(8388608&ap(e.expression)?i:AI(n().createValuesHelper(i),e),e)}else!function(e,t){Ne(6,[e],t)}(i,e);return te(r),function(e){return AI(t.createCallExpression(t.createPropertyAccessExpression(C,"sent"),void 0,[]),e)}(e)}(r);case 210:return function(e){return V(e.elements,void 0,void 0,e.multiLine)}(r);case 211:return function(e){const n=e.properties,r=e.multiLine,i=Q(n),o=Z();Se(o,t.createObjectLiteralExpression(TJ(n,R,w_,0,i),r));const a=Pe(n,s,[],i);return a.push(r?MA(jT(AI(t.cloneNode(o),o),o.parent)):o),t.inlineExpressions(a);function s(n,i){X(i)&&n.length>0&&(xe(t.createExpressionStatement(t.inlineExpressions(n))),n=[]);const a=kJ(SA(t,e,i,o),R,Q_);return a&&(r&&MA(a),n.push(a)),n}}(r);case 213:return function(n){if(X(n.argumentExpression))return t.updateElementAccessExpression(n,Y(gn.checkDefined(kJ(n.expression,R,W_))),gn.checkDefined(kJ(n.argumentExpression,R,Q_)));return IJ(n,R,e)}(r);case 214:return function(n){if(!hf(n)&&g(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(n.expression,a,c,!0);return Cw(AI(t.createFunctionApplyCall(Y(gn.checkDefined(kJ(e,R,W_))),r,V(n.arguments)),n),n)}return IJ(n,R,e)}(r);case 215:return function(n){if(g(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return Cw(AI(t.createNewExpression(t.createFunctionApplyCall(Y(gn.checkDefined(kJ(e,R,Q_))),r,V(n.arguments,t.createVoidZero())),void 0,[]),n),n)}return IJ(n,R,e)}(r);default:return IJ(r,R,e)}}(r):4196352&r.transformFlags?IJ(r,R,e):r}}function J(n){if(n.asteriskToken)n=Cw(AI(t.createFunctionDeclaration(n.modifiers,void 0,n.name,void 0,DJ(n.parameters,R,e),void 0,q(n.body)),n),n);else{const t=p,r=f;p=!1,f=!1,n=IJ(n,R,e),p=t,f=r}return p?void o(n):n}function z(n){if(n.asteriskToken)n=Cw(AI(t.createFunctionExpression(void 0,void 0,n.name,void 0,DJ(n.parameters,R,e),void 0,q(n.body)),n),n);else{const t=p,r=f;p=!1,f=!1,n=IJ(n,R,e),p=t,f=r}return n}function q(e){const o=[],a=p,s=f,c=m,l=h,_=y,u=v,d=b,g=x,O=L,B=S,J=k,z=T,q=C;p=!0,f=!1,m=void 0,h=void 0,y=void 0,v=void 0,b=void 0,x=void 0,L=1,S=void 0,k=void 0,T=void 0,C=t.createTempVariable(void 0),r();const U=t.copyPrologue(e.statements,o,!1,R);W(e.statements,U);const V=function(){j=0,M=0,w=void 0,N=!1,D=!1,E=void 0,F=void 0,P=void 0,A=void 0,I=void 0;const e=function(){if(S){for(let e=0;e0)),1048576))}();return zd(o,i()),o.push(t.createReturnStatement(V)),p=a,f=s,m=c,h=l,y=_,v=u,b=d,x=g,L=O,S=B,k=J,T=z,C=q,AI(t.createBlock(o,e.multiLine),e)}function U(e){let n=[];return r(e.left),r(e.right),t.inlineExpressions(n);function r(e){LE(e)&&28===e.operatorToken.kind?(r(e.left),r(e.right)):(X(e)&&n.length>0&&(Ne(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(gn.checkDefined(kJ(e,R,Q_))))}}function V(e,n,r,i){const o=Q(e);let a;if(o>0){a=Z();const r=TJ(e,R,Q_,0,o);Se(a,t.createArrayLiteralExpression(n?[n,...r]:r)),n=void 0}const s=Pe(e,function(e,r){if(X(r)&&e.length>0){const r=void 0!==a;a||(a=Z()),Se(a,r?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(e,i)]):t.createArrayLiteralExpression(n?[n,...e]:e,i)),n=void 0,e=[]}return e.push(gn.checkDefined(kJ(r,R,Q_))),e},[],o);return a?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(s,i)]):AI(t.createArrayLiteralExpression(n?[n,...s]:s,i),r)}function W(e,t=0){const n=e.length;for(let r=t;r0?Te(t,e):xe(e)}(n);case 253:return function(e){const t=me(e.label?kc(e.label):void 0);t>0?Te(t,e):xe(e)}(n);case 254:return function(e){t=kJ(e.expression,R,Q_),n=e,Ne(8,[t],n);var t,n}(n);case 255:return function(e){X(e)?(function(e){const t=ee(),n=ee();te(t),ne({kind:1,expression:e,startLabel:t,endLabel:n})}(Y(gn.checkDefined(kJ(e.expression,R,Q_)))),$(e.statement),function(){gn.assert(1===oe());te(re().endLabel)}()):xe(kJ(e,R,bu))}(n);case 256:return function(e){if(X(e.caseBlock)){const n=e.caseBlock,r=n.clauses.length,i=function(){const e=ee();return ne({kind:2,isScript:!1,breakLabel:e}),e}(),o=Y(gn.checkDefined(kJ(e.expression,R,Q_))),a=[];let s=-1;for(let e=0;e0)break;l.push(t.createCaseClause(gn.checkDefined(kJ(r.expression,R,Q_)),[ve(a[i],r.expression)]))}else e++}l.length&&(xe(t.createSwitchStatement(o,t.createCaseBlock(l))),c+=l.length,l=[]),e>0&&(c+=e,e=0)}Te(s>=0?a[s]:i);for(let e=0;e0)break;o.push(G(t))}o.length&&(xe(t.createExpressionStatement(t.inlineExpressions(o))),i+=o.length,o=[])}}function G(e){return Ow(t.createAssignment(Ow(t.cloneNode(e.name),e.name),gn.checkDefined(kJ(e.initializer,R,Q_))),e)}function X(e){return!!e&&!!(1048576&e.transformFlags)}function Q(e){const t=e.length;for(let n=0;n=0;n--){const t=v[n];if(!de(t))break;if(t.labelText===e)return!0}return!1}function me(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(de(n)&&n.labelText===e)return n.breakLabel;if(ue(n)&&fe(e,t-1))return n.breakLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(ue(t))return t.breakLabel}return 0}function ge(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(pe(n)&&fe(e,t-1))return n.continueLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(pe(t))return t.continueLabel}return 0}function he(e){if(void 0!==e&&e>0){void 0===x&&(x=[]);const n=t.createNumericLiteral(Number.MAX_SAFE_INTEGER);return void 0===x[e]?x[e]=[n]:x[e].push(n),n}return t.createOmittedExpression()}function ye(e){const n=t.createNumericLiteral(e);return $w(n,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(e)),n}function ve(e,n){return gn.assertLessThan(0,e,"Invalid label"),AI(t.createReturnStatement(t.createArrayLiteralExpression([ye(3),he(e)])),n)}function be(){Ne(0)}function xe(e){e?Ne(1,[e]):be()}function Se(e,t,n){Ne(2,[e,t],n)}function Te(e,t){Ne(3,[e],t)}function Ce(e,t,n){Ne(4,[e,t],n)}function we(e,t,n){Ne(5,[e,t],n)}function Ne(e,t,n){void 0===S&&(S=[],k=[],T=[]),void 0===b&&te(ee());const r=S.length;S[r]=e,k[r]=t,T[r]=n}function De(){F&&(Fe(!N),N=!1,D=!1,M++)}function Ee(e){(function(e){if(!D)return!0;if(!b||!x)return!1;for(let t=0;t=0;e--){const n=I[e];F=[t.createWithStatement(n.expression,t.createBlock(F))]}if(A){const{startLabel:e,catchLabel:n,finallyLabel:r,endLabel:i}=A;F.unshift(t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createPropertyAccessExpression(C,"trys"),"push"),void 0,[t.createArrayLiteralExpression([he(e),he(n),he(r),he(i)])]))),A=void 0}e&&F.push(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(C,"label"),t.createNumericLiteral(M+1))))}E.push(t.createCaseClause(t.createNumericLiteral(M),F||[])),F=void 0}function Ae(e){if(b)for(let t=0;t{Uu(e.arguments[0])&&!Dg(e.arguments[0].text,a)||(y=le(y,e))});const n=function(e){switch(e){case 2:return k;case 3:return T;default:return S}}(_)(t);return g=void 0,h=void 0,b=!1,n});function x(){return!(qk(g.fileName)&&g.commonJsModuleIndicator&&(!g.externalModuleIndicator||!0===g.externalModuleIndicator))&&!(h.exportEquals||!fO(g))}function S(n){r();const o=[],s=HS(a,"alwaysStrict")||fO(g),c=t.copyPrologue(n.statements,o,s&&!cf(n),E);if(x()&&le(o,H()),X(h.exportedNames)){const e=50;for(let n=0;n11===n.kind?t.createAssignment(t.createElementAccessExpression(t.createIdentifier("exports"),t.createStringLiteral(n.text)),e):t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(kc(n))),e),t.createVoidZero())))}for(const e of h.exportedFunctions)W(o,e);le(o,kJ(h.externalHelpersImportDeclaration,E,bu)),de(o,TJ(n.statements,E,bu,c)),D(o,!1),zd(o,i());const l=t.updateSourceFile(n,AI(t.createNodeArray(o),n.statements));return Qw(l,e.readEmitHelpers()),l}function k(n){const r=t.createIdentifier("define"),i=UA(t,n,c,a),o=cf(n)&&n,{aliasedModuleNames:s,unaliasedModuleNames:l,importAliasNames:_}=C(n,!0),u=t.updateSourceFile(n,AI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(r,void 0,[...i?[i]:[],t.createArrayLiteralExpression(o?p:[t.createStringLiteral("require"),t.createStringLiteral("exports"),...s,...l]),o?o.statements.length?o.statements[0].expression:t.createObjectLiteralExpression():t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),..._],void 0,N(n))]))]),n.statements));return Qw(u,e.readEmitHelpers()),u}function T(n){const{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}=C(n,!1),s=UA(t,n,c,a),l=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"factory")],void 0,AI(t.createBlock([t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("module"),"object"),t.createTypeCheck(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),"object")),t.createBlock([t.createVariableStatement(void 0,[t.createVariableDeclaration("v",void 0,void 0,t.createCallExpression(t.createIdentifier("factory"),void 0,[t.createIdentifier("require"),t.createIdentifier("exports")]))]),Ew(t.createIfStatement(t.createStrictInequality(t.createIdentifier("v"),t.createIdentifier("undefined")),t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),t.createIdentifier("v")))),1)]),t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("define"),"function"),t.createPropertyAccessExpression(t.createIdentifier("define"),"amd")),t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("define"),void 0,[...s?[s]:[],t.createArrayLiteralExpression([t.createStringLiteral("require"),t.createStringLiteral("exports"),...r,...i]),t.createIdentifier("factory")]))])))],!0),void 0)),_=t.updateSourceFile(n,AI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(l,void 0,[t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),...o],void 0,N(n))]))]),n.statements));return Qw(_,e.readEmitHelpers()),_}function C(e,n){const r=[],i=[],o=[];for(const n of e.amdDependencies)n.name?(r.push(t.createStringLiteral(n.path)),o.push(t.createParameterDeclaration(void 0,void 0,n.name))):i.push(t.createStringLiteral(n.path));for(const e of h.externalImports){const l=qA(t,e,g,c,s,a),_=zA(t,e,g);l&&(n&&_?(Ew(_,8),r.push(l),o.push(t.createParameterDeclaration(void 0,void 0,_))):i.push(l))}return{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}}function w(e){if(DF(e)||zF(e)||!qA(t,e,g,c,s,a))return;const n=zA(t,e,g),r=R(e,n);return r!==n?t.createExpressionStatement(t.createAssignment(n,r)):void 0}function N(e){r();const n=[],o=t.copyPrologue(e.statements,n,!0,E);x()&&le(n,H()),X(h.exportedNames)&&le(n,t.createExpressionStatement(Pe(h.exportedNames,(e,n)=>11===n.kind?t.createAssignment(t.createElementAccessExpression(t.createIdentifier("exports"),t.createStringLiteral(n.text)),e):t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(kc(n))),e),t.createVoidZero())));for(const e of h.exportedFunctions)W(n,e);le(n,kJ(h.externalHelpersImportDeclaration,E,bu)),2===_&&de(n,U(h.externalImports,w)),de(n,TJ(e.statements,E,bu,o)),D(n,!0),zd(n,i());const a=t.createBlock(n,!0);return b&&Xw(a,Lq),a}function D(e,n){if(h.exportEquals){const r=kJ(h.exportEquals.expression,A,Q_);if(r)if(n){const n=t.createReturnStatement(r);AI(n,h.exportEquals),Ew(n,3840),e.push(n)}else{const n=t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),r));AI(n,h.exportEquals),Ew(n,3072),e.push(n)}}}function E(e){switch(e.kind){case 273:return function(e){let n;const r=Fg(e);if(2!==_){if(!e.importClause)return Cw(AI(t.createExpressionStatement(B(e)),e),e);{const i=[];r&&!Pg(e)?i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,R(e,B(e)))):(i.push(t.createVariableDeclaration(t.getGeneratedNameForNode(e),void 0,void 0,R(e,B(e)))),r&&Pg(e)&&i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)))),n=le(n,Cw(AI(t.createVariableStatement(void 0,t.createVariableDeclarationList(i,l>=2?2:0)),e),e))}}else r&&Pg(e)&&(n=le(n,t.createVariableStatement(void 0,t.createVariableDeclarationList([Cw(AI(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)),e),e)],l>=2?2:0))));return n=function(e,t){if(h.exportEquals)return e;const n=t.importClause;if(!n)return e;const r=new pz;n.name&&(e=$(e,r,n));const i=n.namedBindings;if(i)switch(i.kind){case 275:e=$(e,r,i);break;case 276:for(const t of i.elements)e=$(e,r,t,!0)}return e}(n,e),Ne(n)}(e);case 272:return function(e){let n;gn.assert(Pm(e),"import= for internal module references should be handled in an earlier transformer."),2!==_?n=Lv(e,32)?le(n,Cw(AI(t.createExpressionStatement(Q(e.name,B(e))),e),e)):le(n,Cw(AI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,B(e))],l>=2?2:0)),e),e)):Lv(e,32)&&(n=le(n,Cw(AI(t.createExpressionStatement(Q(t.getExportName(e),t.getLocalName(e))),e),e)));return n=function(e,t){if(h.exportEquals)return e;return $(e,new pz,t)}(n,e),Ne(n)}(e);case 279:return function(e){if(!e.moduleSpecifier)return;const r=t.getGeneratedNameForNode(e);if(e.exportClause&&qF(e.exportClause)){const i=[];2!==_&&i.push(Cw(AI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,B(e))])),e),e));for(const o of e.exportClause.elements){const s=o.propertyName||o.name,c=!!PS(a)&&!(2&sp(e))&&tp(s)?n().createImportDefaultHelper(r):r,l=11===s.kind?t.createElementAccessExpression(c,s):t.createPropertyAccessExpression(c,s);i.push(Cw(AI(t.createExpressionStatement(Q(11===o.name.kind?t.cloneNode(o.name):t.getExportName(o),l,void 0,!0)),o),o))}return Ne(i)}if(e.exportClause){const i=[];return i.push(Cw(AI(t.createExpressionStatement(Q(t.cloneNode(e.exportClause.name),function(e,t){if(!PS(a)||2&sp(e))return t;if(sz(e))return n().createImportStarHelper(t);return t}(e,2!==_?B(e):Yd(e)||11===e.exportClause.name.kind?r:t.createIdentifier(kc(e.exportClause.name))))),e),e)),Ne(i)}return Cw(AI(t.createExpressionStatement(n().createExportStarHelper(2!==_?B(e):r)),e),e)}(e);case 278:return function(e){if(e.isExportEquals)return;return G(t.createIdentifier("default"),kJ(e.expression,A,Q_),e,!0)}(e);default:return F(e)}}function F(n){switch(n.kind){case 244:return function(n){let r,i,o;if(Lv(n,32)){let e,a=!1;for(const r of n.declarationList.declarations)if(fD(r.name)&&CA(r.name))if(e||(e=TJ(n.modifiers,Y,a_)),r.initializer){i=le(i,t.updateVariableDeclaration(r,r.name,void 0,void 0,Q(r.name,kJ(r.initializer,A,Q_))))}else i=le(i,r);else if(r.initializer)if(!E_(r.name)&&(DE(r.initializer)||NE(r.initializer)||JE(r.initializer))){const e=t.createAssignment(AI(t.createPropertyAccessExpression(t.createIdentifier("exports"),r.name),r.name),t.createIdentifier(Gh(r.name)));i=le(i,t.createVariableDeclaration(r.name,r.exclamationToken,r.type,kJ(r.initializer,A,Q_))),o=le(o,e),a=!0}else o=le(o,z(r));if(i&&(r=le(r,t.updateVariableStatement(n,e,t.updateVariableDeclarationList(n.declarationList,i)))),o){const e=Cw(AI(t.createExpressionStatement(t.inlineExpressions(o)),n),n);a&&Dw(e),r=le(r,e)}}else r=le(r,IJ(n,A,e));return r=function(e,t){return q(e,t.declarationList,!1)}(r,n),Ne(r)}(n);case 263:return function(n){let r;r=Lv(n,32)?le(r,Cw(AI(t.createFunctionDeclaration(TJ(n.modifiers,Y,a_),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,TJ(n.parameters,A,AD),void 0,IJ(n.body,A,e)),n),n)):le(r,IJ(n,A,e));return Ne(r)}(n);case 264:return function(n){let r;r=Lv(n,32)?le(r,Cw(AI(t.createClassDeclaration(TJ(n.modifiers,Y,k_),t.getDeclarationName(n,!0,!0),void 0,TJ(n.heritageClauses,A,lP),TJ(n.members,A,h_)),n),n)):le(r,IJ(n,A,e));return r=W(r,n),Ne(r)}(n);case 249:return L(n,!0);case 250:return function(n){if(yF(n.initializer)&&!(7&n.initializer.flags)){const r=q(void 0,n.initializer,!0);if(X(r)){const i=kJ(n.initializer,I,su),o=kJ(n.expression,A,Q_),a=PJ(n.statement,F,e),s=YE(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0);return t.updateForInStatement(n,i,o,s)}}return t.updateForInStatement(n,kJ(n.initializer,I,su),kJ(n.expression,A,Q_),PJ(n.statement,F,e))}(n);case 251:return function(n){if(yF(n.initializer)&&!(7&n.initializer.flags)){const r=q(void 0,n.initializer,!0),i=kJ(n.initializer,I,su),o=kJ(n.expression,A,Q_);let a=PJ(n.statement,F,e);return X(r)&&(a=YE(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0)),t.updateForOfStatement(n,n.awaitModifier,i,o,a)}return t.updateForOfStatement(n,n.awaitModifier,kJ(n.initializer,I,su),kJ(n.expression,A,Q_),PJ(n.statement,F,e))}(n);case 247:return function(n){return t.updateDoStatement(n,PJ(n.statement,F,e),kJ(n.expression,A,Q_))}(n);case 248:return function(n){return t.updateWhileStatement(n,kJ(n.expression,A,Q_),PJ(n.statement,F,e))}(n);case 257:return function(e){return t.updateLabeledStatement(e,e.label,kJ(e.statement,F,bu,t.liftToBlock)??AI(t.createEmptyStatement(),e.statement))}(n);case 255:return function(e){return t.updateWithStatement(e,kJ(e.expression,A,Q_),gn.checkDefined(kJ(e.statement,F,bu,t.liftToBlock)))}(n);case 246:return function(e){return t.updateIfStatement(e,kJ(e.expression,A,Q_),kJ(e.thenStatement,F,bu,t.liftToBlock)??t.createBlock([]),kJ(e.elseStatement,F,bu,t.liftToBlock))}(n);case 256:return function(e){return t.updateSwitchStatement(e,kJ(e.expression,A,Q_),gn.checkDefined(kJ(e.caseBlock,F,wF)))}(n);case 270:return function(e){return t.updateCaseBlock(e,TJ(e.clauses,F,Eu))}(n);case 297:return function(e){return t.updateCaseClause(e,kJ(e.expression,A,Q_),TJ(e.statements,F,bu))}(n);case 298:case 259:return function(t){return IJ(t,F,e)}(n);case 300:return function(e){return t.updateCatchClause(e,e.variableDeclaration,gn.checkDefined(kJ(e.block,F,YE)))}(n);case 242:return function(t){return t=IJ(t,F,e),t}(n);default:return A(n)}}function P(r,i){if(!(276828160&r.transformFlags||(null==y?void 0:y.length)))return r;switch(r.kind){case 249:return L(r,!1);case 245:return function(e){return t.updateExpressionStatement(e,kJ(e.expression,I,Q_))}(r);case 218:return function(e,n){return t.updateParenthesizedExpression(e,kJ(e.expression,n?I:A,Q_))}(r,i);case 356:return function(e,n){return t.updatePartiallyEmittedExpression(e,kJ(e.expression,n?I:A,Q_))}(r,i);case 214:const u=r===ve(y);if(u&&y.shift(),hf(r)&&c.shouldTransformImportCall(g))return function(r,i){if(0===_&&l>=7)return IJ(r,A,e);const u=qA(t,r,g,c,s,a),d=kJ(ve(r.arguments),A,Q_),p=!u||d&&QN(d)&&d.text===u.text?d&&i?QN(d)?Mz(d,a):n().createRewriteRelativeImportExtensionsHelper(d):d:u,f=!!(16384&r.transformFlags);switch(a.module){case 2:return j(p,f);case 3:return function(e,n){if(b=!0,mz(e)){const r=Yl(e)?e:QN(e)?t.createStringLiteralFromNode(e):Ew(AI(t.cloneNode(e),e),3072);return t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,M(e),void 0,j(r,n))}{const r=t.createTempVariable(o);return t.createComma(t.createAssignment(r,e),t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,M(r,!0),void 0,j(r,n)))}}(p??t.createVoidZero(),f);default:return M(p)}}(r,u);if(u)return function(e){return t.updateCallExpression(e,e.expression,void 0,TJ(e.arguments,t=>t===e.arguments[0]?Uu(t)?Mz(t,a):n().createRewriteRelativeImportExtensionsHelper(t):A(t),Q_))}(r);break;case 227:if(db(r))return function(t,n){if(O(t.left))return Bz(t,A,e,0,!n,J);return IJ(t,A,e)}(r,i);break;case 225:case 226:return function(n,r){if((46===n.operator||47===n.operator)&&fD(n.operand)&&!Yl(n.operand)&&!CA(n.operand)&&!ax(n.operand)){const e=ee(n.operand);if(e){let i,a=kJ(n.operand,A,Q_);IE(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(i=t.createTempVariable(o),a=t.createAssignment(i,a),AI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),AI(a,n));for(const t of e)v[pJ(a)]=!0,a=Q(t,a),AI(a,n);return i&&(v[pJ(a)]=!0,a=t.createComma(a,i),AI(a,n)),a}}return IJ(n,A,e)}(r,i)}return IJ(r,A,e)}function A(e){return P(e,!1)}function I(e){return P(e,!0)}function O(e){if(vE(e))for(const t of e.properties)switch(t.kind){case 304:if(O(t.initializer))return!0;break;case 305:if(O(t.name))return!0;break;case 306:if(O(t.expression))return!0;break;case 175:case 178:case 179:return!1;default:gn.assertNever(t,"Unhandled object member kind")}else if(yE(e)){for(const t of e.elements)if(BE(t)){if(O(t.expression))return!0}else if(O(t))return!0}else if(fD(e))return m(ee(e))>(wA(e)?1:0);return!1}function L(n,r){if(r&&n.initializer&&yF(n.initializer)&&!(7&n.initializer.flags)){const i=q(void 0,n.initializer,!1);if(i){const o=[],a=kJ(n.initializer,I,yF),s=t.createVariableStatement(void 0,a);o.push(s),de(o,i);const c=kJ(n.condition,A,Q_),l=kJ(n.incrementor,I,Q_),_=PJ(n.statement,r?F:A,e);return o.push(t.updateForStatement(n,void 0,c,l,_)),o}}return t.updateForStatement(n,kJ(n.initializer,I,su),kJ(n.condition,A,Q_),kJ(n.incrementor,I,Q_),PJ(n.statement,r?F:A,e))}function j(e,r){const i=t.createUniqueName("resolve"),o=t.createUniqueName("reject"),s=[t.createParameterDeclaration(void 0,void 0,i),t.createParameterDeclaration(void 0,void 0,o)],c=t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("require"),void 0,[t.createArrayLiteralExpression([e||t.createOmittedExpression()]),i,o]))]);let _;l>=2?_=t.createArrowFunction(void 0,void 0,s,void 0,void 0,c):(_=t.createFunctionExpression(void 0,void 0,void 0,void 0,s,void 0,c),r&&Ew(_,16));const u=t.createNewExpression(t.createIdentifier("Promise"),void 0,[_]);return PS(a)?t.createCallExpression(t.createPropertyAccessExpression(u,t.createIdentifier("then")),void 0,[n().createImportStarCallbackHelper()]):u}function M(e,r){const i=e&&!gz(e)&&!r,o=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Promise"),"resolve"),void 0,i?l>=2?[t.createTemplateExpression(t.createTemplateHead(""),[t.createTemplateSpan(e,t.createTemplateTail(""))])]:[t.createCallExpression(t.createPropertyAccessExpression(t.createStringLiteral(""),"concat"),void 0,[e])]:[]);let s=t.createCallExpression(t.createIdentifier("require"),void 0,i?[t.createIdentifier("s")]:e?[e]:[]);PS(a)&&(s=n().createImportStarHelper(s));const c=i?[t.createParameterDeclaration(void 0,void 0,"s")]:[];let _;_=l>=2?t.createArrowFunction(void 0,void 0,c,void 0,void 0,s):t.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,t.createBlock([t.createReturnStatement(s)]));return t.createCallExpression(t.createPropertyAccessExpression(o,"then"),void 0,[_])}function R(e,t){return!PS(a)||2&sp(e)?t:cz(e)?n().createImportStarHelper(t):lz(e)?n().createImportDefaultHelper(t):t}function B(e){const n=qA(t,e,g,c,s,a),r=[];return n&&r.push(Mz(n,a)),t.createCallExpression(t.createIdentifier("require"),void 0,r)}function J(e,n,r){const i=ee(e);if(i){let o=wA(e)?n:t.createAssignment(e,n);for(const e of i)Ew(o,8),o=Q(e,o,r);return o}return t.createAssignment(e,n)}function z(n){return E_(n.name)?Bz(kJ(n,A,cx),A,e,0,!1,J):t.createAssignment(AI(t.createPropertyAccessExpression(t.createIdentifier("exports"),n.name),n.name),n.initializer?kJ(n.initializer,A,Q_):t.createVoidZero())}function q(e,t,n){if(h.exportEquals)return e;for(const r of t.declarations)e=V(e,r,n);return e}function V(e,t,n){if(h.exportEquals)return e;if(E_(t.name))for(const r of t.name.elements)zE(r)||(e=V(e,r,n));else Yl(t.name)||hF(t)&&!t.initializer&&!n||(e=$(e,new pz,t));return e}function W(e,n){if(h.exportEquals)return e;const r=new pz;if(Lv(n,32)){e=K(e,r,Lv(n,2048)?t.createIdentifier("default"):t.getDeclarationName(n),t.getLocalName(n),n)}return n.name&&(e=$(e,r,n)),e}function $(e,n,r,i){const o=t.getDeclarationName(r),a=h.exportSpecifiers.get(o);if(a)for(const t of a)e=K(e,n,t.name,o,t.name,void 0,i);return e}function K(e,t,n,r,i,o,a){if(11!==n.kind){if(t.has(n))return e;t.set(n,!0)}return e=le(e,G(n,r,i,o,a))}function H(){const e=t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteral("__esModule"),t.createObjectLiteralExpression([t.createPropertyAssignment("value",t.createTrue())])]));return Ew(e,2097152),e}function G(e,n,r,i,o){const a=AI(t.createExpressionStatement(Q(e,n,void 0,o)),r);return MA(a),i||Ew(a,3072),a}function Q(e,n,r,i){return AI(i?t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteralFromNode(e),t.createObjectLiteralExpression([t.createPropertyAssignment("enumerable",t.createTrue()),t.createPropertyAssignment("get",t.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,t.createBlock([t.createReturnStatement(n)])))])]):t.createAssignment(11===e.kind?t.createElementAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)):t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),n),r)}function Y(e){switch(e.kind){case 95:case 90:return}return e}function Z(e){var n,r;if(8192&ap(e)){const n=RA(g);return n?t.createPropertyAccessExpression(n,e):e}if((!Yl(e)||64&e.emitNode.autoGenerate.flags)&&!CA(e)){const i=s.getReferencedExportContainer(e,wA(e));if(i&&308===i.kind)return AI(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),e);const o=s.getReferencedImportDeclaration(e);if(o){if(FF(o))return AI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default")),e);if(BF(o)){const i=o.propertyName||o.name,a=t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o);return AI(11===i.kind?t.createElementAccessExpression(a,t.cloneNode(i)):t.createPropertyAccessExpression(a,t.cloneNode(i)),e)}}}return e}function ee(e){if(Yl(e)){if(e_(e)){const t=null==h?void 0:h.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}}else{const t=s.getReferencedImportDeclaration(e);if(t)return null==h?void 0:h.exportedBindings[rz(t)];const n=new Set,r=s.getReferencedValueDeclarations(e);if(r){for(const e of r){const t=null==h?void 0:h.exportedBindings[rz(e)];if(t)for(const e of t)n.add(e)}if(n.size)return Be(n)}}}}var Lq={name:"typescript:dynamicimport-sync-require",scoped:!0,text:'\n var __syncRequire = typeof module === "object" && typeof module.exports === "object";'};function jq(e){const{factory:t,startLexicalEnvironment:n,endLexicalEnvironment:r,hoistVariableDeclaration:i}=e,o=e.getCompilerOptions(),a=e.getEmitResolver(),s=e.getEmitHost(),c=e.onSubstituteNode,l=e.onEmitNode;e.onSubstituteNode=function(e,n){if(function(e){return x&&e.id&&x[e.id]}(n=c(e,n)))return n;if(1===e)return function(e){switch(e.kind){case 80:return function(e){var n,r;if(8192&ap(e)){const n=RA(f);return n?t.createPropertyAccessExpression(n,e):e}if(!Yl(e)&&!CA(e)){const i=a.getReferencedImportDeclaration(e);if(i){if(FF(i))return AI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(i.parent),t.createIdentifier("default")),e);if(BF(i)){const o=i.propertyName||i.name,a=t.getGeneratedNameForNode((null==(r=null==(n=i.parent)?void 0:n.parent)?void 0:r.parent)||i);return AI(11===o.kind?t.createElementAccessExpression(a,t.cloneNode(o)):t.createPropertyAccessExpression(a,t.cloneNode(o)),e)}}}return e}(e);case 227:return function(e){if(cb(e.operatorToken.kind)&&fD(e.left)&&(!Yl(e.left)||e_(e.left))&&!CA(e.left)){const t=K(e.left);if(t){let n=e;for(const e of t)n=R(e,H(n));return n}}return e}(e);case 237:return function(e){if(yf(e))return t.createPropertyAccessExpression(y,t.createIdentifier("meta"));return e}(e)}return e}(n);if(4===e)return function(e){if(305===e.kind)return function(e){var n,r;const i=e.name;if(!Yl(i)&&!CA(i)){const o=a.getReferencedImportDeclaration(i);if(o){if(FF(o))return AI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default"))),e);if(BF(o)){const a=o.propertyName||o.name,s=t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o);return AI(t.createPropertyAssignment(t.cloneNode(i),11===a.kind?t.createElementAccessExpression(s,t.cloneNode(a)):t.createPropertyAccessExpression(s,t.cloneNode(a))),e)}}}return e}(e);return e}(n);return n},e.onEmitNode=function(e,t,n){if(308===t.kind){const r=rz(t);f=t,m=_[r],h=u[r],x=d[r],y=p[r],x&&delete d[r],l(e,t,n),f=void 0,m=void 0,h=void 0,y=void 0,x=void 0}else l(e,t,n)},e.enableSubstitution(80),e.enableSubstitution(305),e.enableSubstitution(227),e.enableSubstitution(237),e.enableEmitNotification(308);const _=[],u=[],d=[],p=[];let f,m,h,y,v,b,x;return az(e,function(i){if(i.isDeclarationFile||!(Tp(i,o)||8388608&i.transformFlags))return i;const c=rz(i);f=i,b=i,m=_[c]=_z(e,i),h=t.createUniqueName("exports"),u[c]=h,y=p[c]=t.createUniqueName("context");const l=function(e){const n=new Map,r=[];for(const i of e){const e=qA(t,i,f,s,a,o);if(e){const t=e.text,o=n.get(t);void 0!==o?r[o].externalImports.push(i):(n.set(t,r.length),r.push({name:e,externalImports:[i]}))}}return r}(m.externalImports),g=function(e,i){const a=[];n();const s=HS(o,"alwaysStrict")||fO(f),c=t.copyPrologue(e.statements,a,s,T);a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration("__moduleName",void 0,void 0,t.createLogicalAnd(y,t.createPropertyAccessExpression(y,"id")))]))),kJ(m.externalHelpersImportDeclaration,T,bu);const l=TJ(e.statements,T,bu,c);de(a,v),zd(a,r());const _=function(e){if(!m.hasExportStarsToExportValues)return;if(!X(m.exportedNames)&&0===m.exportedFunctions.size&&0===m.exportSpecifiers.size){let t=!1;for(const e of m.externalImports)if(279===e.kind&&e.exportClause){t=!0;break}if(!t){const t=S(void 0);return e.push(t),t.name}}const n=[];if(m.exportedNames)for(const e of m.exportedNames)tp(e)||n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e),t.createTrue()));for(const e of m.exportedFunctions)Lv(e,2048)||(gn.assert(!!e.name),n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e.name),t.createTrue())));const r=t.createUniqueName("exportedNames");e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createObjectLiteralExpression(n,!0))])));const i=S(r);return e.push(i),i.name}(a),u=2097152&e.transformFlags?t.createModifiersFromModifierFlags(1024):void 0,d=t.createObjectLiteralExpression([t.createPropertyAssignment("setters",k(_,i)),t.createPropertyAssignment("execute",t.createFunctionExpression(u,void 0,void 0,void 0,[],void 0,t.createBlock(l,!0)))],!0);return a.push(t.createReturnStatement(d)),t.createBlock(a,!0)}(i,l),C=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,h),t.createParameterDeclaration(void 0,void 0,y)],void 0,g),w=UA(t,i,s,o),N=t.createArrayLiteralExpression(O(l,e=>e.name)),D=Ew(t.updateSourceFile(i,AI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("System"),"register"),void 0,w?[w,N,C]:[N,C]))]),i.statements)),2048);o.outFile||eN(D,g,e=>!e.scoped);x&&(d[c]=x,x=void 0);return f=void 0,m=void 0,h=void 0,y=void 0,v=void 0,b=void 0,D});function S(e){const n=t.createUniqueName("exportStar"),r=t.createIdentifier("m"),i=t.createIdentifier("n"),o=t.createIdentifier("exports");let a=t.createStrictInequality(i,t.createStringLiteral("default"));return e&&(a=t.createLogicalAnd(a,t.createLogicalNot(t.createCallExpression(t.createPropertyAccessExpression(e,"hasOwnProperty"),void 0,[i])))),t.createFunctionDeclaration(void 0,void 0,n,void 0,[t.createParameterDeclaration(void 0,void 0,r)],void 0,t.createBlock([t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(o,void 0,void 0,t.createObjectLiteralExpression([]))])),t.createForInStatement(t.createVariableDeclarationList([t.createVariableDeclaration(i)]),r,t.createBlock([Ew(t.createIfStatement(a,t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(o,i),t.createElementAccessExpression(r,i)))),1)])),t.createExpressionStatement(t.createCallExpression(h,void 0,[o]))],!0))}function k(e,n){const r=[];for(const i of n){const n=g(i.externalImports,e=>zA(t,e,f)),o=n?t.getGeneratedNameForNode(n):t.createUniqueName(""),a=[];for(const n of i.externalImports){const r=zA(t,n,f);switch(n.kind){case 273:if(!n.importClause)break;case 272:gn.assert(void 0!==r),a.push(t.createExpressionStatement(t.createAssignment(r,o))),Lv(n,32)&&a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createStringLiteral(kc(r)),o])));break;case 279:if(gn.assert(void 0!==r),n.exportClause)if(qF(n.exportClause)){const e=[];for(const r of n.exportClause.elements)e.push(t.createPropertyAssignment(t.createStringLiteral(Zd(r.name)),t.createElementAccessExpression(o,t.createStringLiteral(Zd(r.propertyName||r.name)))));a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createObjectLiteralExpression(e,!0)])))}else a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createStringLiteral(Zd(n.exportClause.name)),o])));else a.push(t.createExpressionStatement(t.createCallExpression(e,void 0,[o])))}}r.push(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,o)],void 0,t.createBlock(a,!0)))}return t.createArrayLiteralExpression(r,!0)}function T(e){switch(e.kind){case 273:return function(e){let n;e.importClause&&i(zA(t,e,f));return Ne(function(e,t){if(m.exportEquals)return e;const n=t.importClause;if(!n)return e;n.name&&(e=L(e,n));const r=n.namedBindings;if(r)switch(r.kind){case 275:e=L(e,r);break;case 276:for(const t of r.elements)e=L(e,t)}return e}(n,e))}(e);case 272:return function(e){let n;return gn.assert(Pm(e),"import= for internal module references should be handled in an earlier transformer."),i(zA(t,e,f)),Ne(function(e,t){if(m.exportEquals)return e;return L(e,t)}(n,e))}(e);case 279:return function(e){return void gn.assertIsDefined(e)}(e);case 278:return function(e){if(e.isExportEquals)return;const n=kJ(e.expression,U,Q_);return M(t.createIdentifier("default"),n,!0)}(e);default:return B(e)}}function C(e){if(!N(e.declarationList))return kJ(e,U,bu);let n;if(df(e.declarationList)||uf(e.declarationList)){const r=TJ(e.modifiers,$,k_),i=[];for(const n of e.declarationList.declarations)i.push(t.updateVariableDeclaration(n,t.getGeneratedNameForNode(n.name),void 0,void 0,D(n,!1)));const o=t.updateVariableDeclarationList(e.declarationList,i);n=le(n,t.updateVariableStatement(e,r,o))}else{let r;const i=Lv(e,32);for(const t of e.declarationList.declarations)t.initializer?r=le(r,D(t,i)):w(t);r&&(n=le(n,AI(t.createExpressionStatement(t.inlineExpressions(r)),e)))}return n=function(e,t,n){if(m.exportEquals)return e;for(const r of t.declarationList.declarations)(r.initializer||n)&&(e=A(e,r,n));return e}(n,e,!1),Ne(n)}function w(e){if(E_(e.name))for(const t of e.name.elements)zE(t)||w(t);else i(t.cloneNode(e.name))}function N(e){return!(4194304&ap(e)||308!==b.kind&&7&hc(e).flags)}function D(t,n){const r=n?E:F;return E_(t.name)?Bz(t,U,e,0,!1,r):t.initializer?r(t.name,kJ(t.initializer,U,Q_)):t.name}function E(e,t,n){return P(e,t,n,!0)}function F(e,t,n){return P(e,t,n,!1)}function P(e,n,r,o){return i(t.cloneNode(e)),o?R(e,H(AI(t.createAssignment(e,n),r))):H(AI(t.createAssignment(e,n),r))}function A(e,n,r){if(m.exportEquals)return e;if(E_(n.name))for(const t of n.name.elements)zE(t)||(e=A(e,t,r));else if(!Yl(n.name)){let i;r&&(e=j(e,n.name,t.getLocalName(n)),i=kc(n.name)),e=L(e,n,i)}return e}function I(e,n){if(m.exportEquals)return e;let r;if(Lv(n,32)){const i=Lv(n,2048)?t.createStringLiteral("default"):n.name;e=j(e,i,t.getLocalName(n)),r=Gh(i)}return n.name&&(e=L(e,n,r)),e}function L(e,n,r){if(m.exportEquals)return e;const i=t.getDeclarationName(n),o=m.exportSpecifiers.get(i);if(o)for(const t of o)Zd(t.name)!==r&&(e=j(e,t.name,i));return e}function j(e,t,n,r){return e=le(e,M(t,n,r))}function M(e,n,r){const i=t.createExpressionStatement(R(e,n));return MA(i),r||Ew(i,3072),i}function R(e,n){const r=fD(e)?t.createStringLiteralFromNode(e):e;return Ew(n,3072|ap(n)),Jw(t.createCallExpression(h,void 0,[r,n]),n)}function B(n){switch(n.kind){case 244:return C(n);case 263:return function(n){v=Lv(n,32)?le(v,t.updateFunctionDeclaration(n,TJ(n.modifiers,$,k_),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,TJ(n.parameters,U,AD),void 0,kJ(n.body,U,YE))):le(v,IJ(n,U,e)),v=I(v,n)}(n);case 264:return function(e){let n;const r=t.getLocalName(e);return i(r),n=le(n,AI(t.createExpressionStatement(t.createAssignment(r,AI(t.createClassExpression(TJ(e.modifiers,$,k_),e.name,void 0,TJ(e.heritageClauses,U,lP),TJ(e.members,U,h_)),e))),e)),n=I(n,e),Ne(n)}(n);case 249:return J(n,!0);case 250:return function(n){const r=b;return b=n,n=t.updateForInStatement(n,z(n.initializer),kJ(n.expression,U,Q_),PJ(n.statement,B,e)),b=r,n}(n);case 251:return function(n){const r=b;return b=n,n=t.updateForOfStatement(n,n.awaitModifier,z(n.initializer),kJ(n.expression,U,Q_),PJ(n.statement,B,e)),b=r,n}(n);case 247:return function(n){return t.updateDoStatement(n,PJ(n.statement,B,e),kJ(n.expression,U,Q_))}(n);case 248:return function(n){return t.updateWhileStatement(n,kJ(n.expression,U,Q_),PJ(n.statement,B,e))}(n);case 257:return function(e){return t.updateLabeledStatement(e,e.label,kJ(e.statement,B,bu,t.liftToBlock)??t.createExpressionStatement(t.createIdentifier("")))}(n);case 255:return function(e){return t.updateWithStatement(e,kJ(e.expression,U,Q_),gn.checkDefined(kJ(e.statement,B,bu,t.liftToBlock)))}(n);case 246:return function(e){return t.updateIfStatement(e,kJ(e.expression,U,Q_),kJ(e.thenStatement,B,bu,t.liftToBlock)??t.createBlock([]),kJ(e.elseStatement,B,bu,t.liftToBlock))}(n);case 256:return function(e){return t.updateSwitchStatement(e,kJ(e.expression,U,Q_),gn.checkDefined(kJ(e.caseBlock,B,wF)))}(n);case 270:return function(e){const n=b;return b=e,e=t.updateCaseBlock(e,TJ(e.clauses,B,Eu)),b=n,e}(n);case 297:return function(e){return t.updateCaseClause(e,kJ(e.expression,U,Q_),TJ(e.statements,B,bu))}(n);case 298:case 259:return function(t){return IJ(t,B,e)}(n);case 300:return function(e){const n=b;return b=e,e=t.updateCatchClause(e,e.variableDeclaration,gn.checkDefined(kJ(e.block,B,YE))),b=n,e}(n);case 242:return function(t){const n=b;return b=t,t=IJ(t,B,e),b=n,t}(n);default:return U(n)}}function J(n,r){const i=b;return b=n,n=t.updateForStatement(n,kJ(n.initializer,r?z:V,su),kJ(n.condition,U,Q_),kJ(n.incrementor,V,Q_),PJ(n.statement,r?B:U,e)),b=i,n}function z(e){if(function(e){return yF(e)&&N(e)}(e)){let n;for(const t of e.declarations)n=le(n,D(t,!1)),t.initializer||w(t);return n?t.inlineExpressions(n):t.createOmittedExpression()}return kJ(e,V,su)}function q(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 249:return J(n,!1);case 245:return function(e){return t.updateExpressionStatement(e,kJ(e.expression,V,Q_))}(n);case 218:return function(e,n){return t.updateParenthesizedExpression(e,kJ(e.expression,n?V:U,Q_))}(n,r);case 356:return function(e,n){return t.updatePartiallyEmittedExpression(e,kJ(e.expression,n?V:U,Q_))}(n,r);case 227:if(db(n))return function(t,n){if(W(t.left))return Bz(t,U,e,0,!n);return IJ(t,U,e)}(n,r);break;case 214:if(hf(n))return function(e){const n=qA(t,e,f,s,a,o),r=kJ(ve(e.arguments),U,Q_),i=!n||r&&QN(r)&&r.text===n.text?r:n;return t.createCallExpression(t.createPropertyAccessExpression(y,t.createIdentifier("import")),void 0,i?[i]:[])}(n);break;case 225:case 226:return function(n,r){if((46===n.operator||47===n.operator)&&fD(n.operand)&&!Yl(n.operand)&&!CA(n.operand)&&!ax(n.operand)){const e=K(n.operand);if(e){let o,a=kJ(n.operand,U,Q_);IE(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(o=t.createTempVariable(i),a=t.createAssignment(o,a),AI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),AI(a,n));for(const t of e)a=R(t,H(a));return o&&(a=t.createComma(a,o),AI(a,n)),a}}return IJ(n,U,e)}(n,r)}return IJ(n,U,e)}function U(e){return q(e,!1)}function V(e){return q(e,!0)}function W(e){if(ub(e,!0))return W(e.left);if(BE(e))return W(e.expression);if(vE(e))return X(e.properties,W);if(yE(e))return X(e.elements,W);if(dP(e))return W(e.name);if(uP(e))return W(e.initializer);if(fD(e)){const t=a.getReferencedExportContainer(e);return void 0!==t&&308===t.kind}return!1}function $(e){switch(e.kind){case 95:case 90:return}return e}function K(e){let n;const r=function(e){if(!Yl(e)){const t=a.getReferencedImportDeclaration(e);if(t)return t;const n=a.getReferencedValueDeclaration(e);if(n&&(null==m?void 0:m.exportedBindings[rz(n)]))return n;const r=a.getReferencedValueDeclarations(e);if(r)for(const e of r)if(e!==n&&(null==m?void 0:m.exportedBindings[rz(e)]))return e;return n}}(e);if(r){const i=a.getReferencedExportContainer(e,!1);i&&308===i.kind&&(n=le(n,t.getDeclarationName(r))),n=de(n,null==m?void 0:m.exportedBindings[rz(r)])}else if(Yl(e)&&e_(e)){const t=null==m?void 0:m.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}return n}function H(e){return void 0===x&&(x=[]),x[pJ(e)]=!0,e}}function Mq(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getEmitHost(),i=e.getEmitResolver(),o=e.getCompilerOptions(),a=wS(o),s=e.onEmitNode,c=e.onSubstituteNode;e.onEmitNode=function(e,t,n){mP(t)?((fO(t)||FS(o))&&o.importHelpers&&(u=new Map),d=t,s(e,t,n),d=void 0,u=void 0):s(e,t,n)},e.onSubstituteNode=function(e,n){if((n=c(e,n)).id&&l.has(n.id))return n;if(fD(n)&&8192&ap(n))return function(e){const n=d&&RA(d);if(n)return l.add(pJ(e)),t.createPropertyAccessExpression(n,e);if(u){const n=kc(e);let r=u.get(n);return r||u.set(n,r=t.createUniqueName(n,48)),r}return e}(n);return n},e.enableEmitNotification(308),e.enableSubstitution(80);const l=new Set;let _,u,d,p;return az(e,function(r){if(r.isDeclarationFile)return r;if(fO(r)||FS(o)){d=r,p=void 0,o.rewriteRelativeImportExtensions&&(4194304&d.flags||Mm(r))&&jC(r,!1,!1,e=>{Uu(e.arguments[0])&&!Dg(e.arguments[0].text,o)||(_=le(_,e))});let i=function(r){const i=JA(t,n(),r,o);if(i){const e=[],n=t.copyPrologue(r.statements,e);return de(e,CJ([i],f,bu)),de(e,TJ(r.statements,f,bu,n)),t.updateSourceFile(r,AI(t.createNodeArray(e),r.statements))}return IJ(r,f,e)}(r);return Qw(i,e.readEmitHelpers()),d=void 0,p&&(i=t.updateSourceFile(i,AI(t.createNodeArray(qd(i.statements.slice(),p)),i.statements))),!fO(r)||200===NS(o)||X(i.statements,ru)?i:t.updateSourceFile(i,AI(t.createNodeArray([...i.statements,dA(t)]),i.statements))}return r});function f(r){switch(r.kind){case 272:return NS(o)>=100?function(e){let n;return gn.assert(Pm(e),"import= for internal module references should be handled in an earlier transformer."),n=le(n,Cw(AI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,m(e))],a>=2?2:0)),e),e)),n=function(e,n){Lv(n,32)&&(e=le(e,t.createExportDeclaration(void 0,n.isTypeOnly,t.createNamedExports([t.createExportSpecifier(!1,void 0,kc(n.name))]))));return e}(n,e),Ne(n)}(r):void 0;case 278:return function(e){if(e.isExportEquals){if(200===NS(o)){return Cw(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),e.expression)),e)}return}return e}(r);case 279:return function(e){const n=Mz(e.moduleSpecifier,o);if(void 0!==o.module&&o.module>5||!e.exportClause||!MF(e.exportClause)||!e.moduleSpecifier)return e.moduleSpecifier&&n!==e.moduleSpecifier?t.updateExportDeclaration(e,e.modifiers,e.isTypeOnly,e.exportClause,n,e.attributes):e;const r=e.exportClause.name,i=t.getGeneratedNameForNode(r),a=t.createImportDeclaration(void 0,t.createImportClause(void 0,void 0,t.createNamespaceImport(i)),n,e.attributes);Cw(a,e.exportClause);const s=Yd(e)?t.createExportDefault(i):t.createExportDeclaration(void 0,!1,t.createNamedExports([t.createExportSpecifier(!1,i,r)]));return Cw(s,e),[a,s]}(r);case 273:return function(e){if(!o.rewriteRelativeImportExtensions)return e;const n=Mz(e.moduleSpecifier,o);if(n===e.moduleSpecifier)return e;return t.updateImportDeclaration(e,e.modifiers,e.importClause,n,e.attributes)}(r);case 214:if(r===(null==_?void 0:_[0]))return function(e){return t.updateCallExpression(e,e.expression,e.typeArguments,[Uu(e.arguments[0])?Mz(e.arguments[0],o):n().createRewriteRelativeImportExtensionsHelper(e.arguments[0]),...e.arguments.slice(1)])}(_.shift());default:if((null==_?void 0:_.length)&&ix(r,_[0]))return IJ(r,f,e)}return r}function m(e){const n=qA(t,e,gn.checkDefined(d),r,i,o),s=[];if(n&&s.push(Mz(n,o)),200===NS(o))return t.createCallExpression(t.createIdentifier("require"),void 0,s);if(!p){const e=t.createUniqueName("_createRequire",48),n=t.createImportDeclaration(void 0,t.createImportClause(void 0,void 0,t.createNamedImports([t.createImportSpecifier(!1,t.createIdentifier("createRequire"),e)])),t.createStringLiteral("module"),void 0),r=t.createUniqueName("__require",48),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createCallExpression(t.cloneNode(e),void 0,[t.createPropertyAccessExpression(t.createMetaProperty(102,t.createIdentifier("meta")),t.createIdentifier("url"))]))],a>=2?2:0));p=[n,i]}const c=p[1].declarationList.declarations[0].name;return gn.assertNode(c,fD),t.createCallExpression(t.cloneNode(c),void 0,s)}}function Rq(e){const t=e.onSubstituteNode,n=e.onEmitNode,r=Mq(e),i=e.onSubstituteNode,o=e.onEmitNode;e.onSubstituteNode=t,e.onEmitNode=n;const a=Oq(e),s=e.onSubstituteNode,c=e.onEmitNode,l=t=>e.getEmitHost().getEmitModuleFormatOfFile(t);let _;return e.onSubstituteNode=function(e,n){return mP(n)?(_=n,t(e,n)):_?l(_)>=5?i(e,n):s(e,n):t(e,n)},e.onEmitNode=function(e,t,r){mP(t)&&(_=t);if(!_)return n(e,t,r);if(l(_)>=5)return o(e,t,r);return c(e,t,r)},e.enableSubstitution(308),e.enableEmitNotification(308),function(t){return 308===t.kind?u(t):function(t){return e.factory.createBundle(O(t.sourceFiles,u))}(t)};function u(e){if(e.isDeclarationFile)return e;_=e;const t=(l(e)>=5?r:a)(e);return _=void 0,gn.assert(mP(t)),t}}function Bq(e){return hF(e)||LD(e)||OD(e)||hE(e)||Iu(e)||Ou(e)||UD(e)||qD(e)||MD(e)||jD(e)||vF(e)||AD(e)||PD(e)||qE(e)||DF(e)||SF(e)||BD(e)||VD(e)||bE(e)||xE(e)||LE(e)||Lg(e)}function Jq(e){return Iu(e)||Ou(e)?function(t){const n=function(t){return jv(e)?t.errorModuleName?2===t.accessibility?ha.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:264===e.parent.kind?t.errorModuleName?2===t.accessibility?ha.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?ha.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:jD(e)||MD(e)?function(t){const n=function(t){return jv(e)?t.errorModuleName?2===t.accessibility?ha.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:264===e.parent.kind?t.errorModuleName?2===t.accessibility?ha.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?ha.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:zq(e)}function zq(e){return hF(e)||LD(e)||OD(e)||bE(e)||xE(e)||LE(e)||hE(e)||BD(e)?t:Iu(e)||Ou(e)?function(t){let n;n=179===e.kind?jv(e)?t.errorModuleName?ha.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?ha.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:jv(e)?t.errorModuleName?2===t.accessibility?ha.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?2===t.accessibility?ha.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1;return{diagnosticMessage:n,errorNode:e.name,typeName:e.name}}:UD(e)||qD(e)||MD(e)||jD(e)||vF(e)||VD(e)?function(t){let n;switch(e.kind){case 181:n=t.errorModuleName?ha.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 180:n=t.errorModuleName?ha.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 182:n=t.errorModuleName?ha.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 175:case 174:n=jv(e)?t.errorModuleName?2===t.accessibility?ha.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:ha.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:264===e.parent.kind?t.errorModuleName?2===t.accessibility?ha.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:ha.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t.errorModuleName?ha.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 263:n=t.errorModuleName?2===t.accessibility?ha.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:ha.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:ha.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return gn.fail("This is unknown kind for signature: "+e.kind)}return{diagnosticMessage:n,errorNode:e.name||e}}:AD(e)?ac(e,e.parent)&&Lv(e.parent,2)?t:function(t){const n=function(t){switch(e.parent.kind){case 177:return t.errorModuleName?2===t.accessibility?ha.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 181:case 186:return t.errorModuleName?ha.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 180:return t.errorModuleName?ha.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 182:return t.errorModuleName?ha.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 175:case 174:return jv(e.parent)?t.errorModuleName?2===t.accessibility?ha.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:264===e.parent.parent.kind?t.errorModuleName?2===t.accessibility?ha.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?ha.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 263:case 185:return t.errorModuleName?2===t.accessibility?ha.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 179:case 178:return t.errorModuleName?2===t.accessibility?ha.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:ha.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return gn.fail(`Unknown parent for parameter: ${gn.formatSyntaxKind(e.parent.kind)}`)}}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:PD(e)?function(){let t;switch(e.parent.kind){case 264:t=ha.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 265:t=ha.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 201:t=ha.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 186:case 181:t=ha.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 180:t=ha.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 175:case 174:t=jv(e.parent)?ha.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:264===e.parent.parent.kind?ha.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:ha.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 185:case 263:t=ha.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 196:t=ha.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;break;case 266:t=ha.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return gn.fail("This is unknown parent for type parameter: "+e.parent.kind)}return{diagnosticMessage:t,errorNode:e,typeName:e.name}}:qE(e)?function(){let t;t=bF(e.parent.parent)?lP(e.parent)&&119===e.parent.token?ha.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.parent.parent.name?ha.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:ha.extends_clause_of_exported_class_has_or_is_using_private_name_0:ha.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;return{diagnosticMessage:t,errorNode:e,typeName:Ac(e.parent.parent)}}:DF(e)?function(){return{diagnosticMessage:ha.Import_declaration_0_is_using_private_name_1,errorNode:e,typeName:e.name}}:SF(e)||Lg(e)?function(t){return{diagnosticMessage:t.errorModuleName?ha.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:ha.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:Lg(e)?gn.checkDefined(e.typeExpression):e.type,typeName:Lg(e)?Ac(e):e.name}}:gn.assertNever(e,`Attempted to set a declaration diagnostic context for unhandled node kind: ${gn.formatSyntaxKind(e.kind)}`);function t(t){const n=function(t){return 261===e.kind||209===e.kind?t.errorModuleName?2===t.accessibility?ha.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:ha.Exported_variable_0_has_or_is_using_private_name_1:173===e.kind||212===e.kind||213===e.kind||227===e.kind||172===e.kind||170===e.kind&&Lv(e.parent,2)?jv(e)?t.errorModuleName?2===t.accessibility?ha.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:264===e.parent.kind||170===e.kind?t.errorModuleName?2===t.accessibility?ha.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:ha.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:ha.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?ha.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:ha.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}}function qq(e){const t={220:ha.Add_a_return_type_to_the_function_expression,219:ha.Add_a_return_type_to_the_function_expression,175:ha.Add_a_return_type_to_the_method,178:ha.Add_a_return_type_to_the_get_accessor_declaration,179:ha.Add_a_type_to_parameter_of_the_set_accessor_declaration,263:ha.Add_a_return_type_to_the_function_declaration,181:ha.Add_a_return_type_to_the_function_declaration,170:ha.Add_a_type_annotation_to_the_parameter_0,261:ha.Add_a_type_annotation_to_the_variable_0,173:ha.Add_a_type_annotation_to_the_property_0,172:ha.Add_a_type_annotation_to_the_property_0,278:ha.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it},n={219:ha.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,263:ha.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,220:ha.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,175:ha.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,181:ha.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,178:ha.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations,179:ha.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations,170:ha.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,261:ha.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,173:ha.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,172:ha.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,168:ha.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,306:ha.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,305:ha.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,210:ha.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,278:ha.Default_exports_can_t_be_inferred_with_isolatedDeclarations,231:ha.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations};return function(r){if(yc(r,lP))return Wp(r,ha.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);if((If(r)||GD(r.parent))&&(s_(r)||fb(r)))return function(e){const t=Wp(e,ha.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations,rp(e,!1));return o(e,t),t}(r);switch(gn.type(r),r.kind){case 178:case 179:return i(r);case 168:case 305:case 306:return function(e){const t=Wp(e,n[e.kind]);return o(e,t),t}(r);case 210:case 231:return function(e){const t=Wp(e,n[e.kind]);return o(e,t),t}(r);case 175:case 181:case 219:case 220:case 263:return function(e){const r=Wp(e,n[e.kind]);return o(e,r),fT(r,Wp(e,t[e.kind])),r}(r);case 209:return function(e){return Wp(e,ha.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations)}(r);case 173:case 261:return function(e){const r=Wp(e,n[e.kind]),i=rp(e.name,!1);return fT(r,Wp(e,t[e.kind],i)),r}(r);case 170:return function(r){if(Iu(r.parent))return i(r.parent);const o=e.requiresAddingImplicitUndefined(r,r.parent);if(!o&&r.initializer)return a(r.initializer);const s=o?ha.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations:n[r.kind],c=Wp(r,s),l=rp(r.name,!1);return fT(c,Wp(r,t[r.kind],l)),c}(r);case 304:return a(r.initializer);case 232:return function(e){return a(e,ha.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)}(r);default:return a(r)}};function r(e){const t=yc(e,e=>JF(e)||bu(e)||hF(e)||LD(e)||AD(e));if(t)return JF(t)?t:_F(t)?yc(t,e=>d_(e)&&!BD(e)):bu(t)?void 0:t}function i(e){const{getAccessor:r,setAccessor:i}=bv(e.symbol.declarations,e),o=Wp((Iu(e)?e.parameters[0]:e)??e,n[e.kind]);return i&&fT(o,Wp(i,t[i.kind])),r&&fT(o,Wp(r,t[r.kind])),o}function o(e,n){const i=r(e);if(i){const e=JF(i)||!i.name?"":rp(i.name,!1);fT(n,Wp(i,t[i.kind],e))}return n}function a(e,i){const o=r(e);let a;if(o){const r=JF(o)||!o.name?"":rp(o.name,!1);o===yc(e.parent,e=>JF(e)||(bu(e)?"quit":!wE(e)&&!CE(e)&&!UE(e)))?(a=Wp(e,i??n[o.kind]),fT(a,Wp(o,t[o.kind],r))):(a=Wp(e,i??ha.Expression_type_can_t_be_inferred_with_isolatedDeclarations),fT(a,Wp(o,t[o.kind],r)),fT(a,Wp(e,ha.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit)))}else a=Wp(e,i??ha.Expression_type_can_t_be_inferred_with_isolatedDeclarations);return a}}function Uq(e,t,n){const r=e.getCompilerOptions();return D(P(nv(e,n),Bm),n)?iU(t,e,kw,r,[n],[$q],!1).diagnostics:void 0}var Vq=531469,Wq=8;function $q(e){const t=()=>gn.fail("Diagnostic emitted without context");let n,r,i,o,a=t,s=!0,c=!1,l=!1,_=!1,u=!1;const{factory:d}=e,f=e.getEmitHost();let h=()=>{};const y={trackSymbol:function(e,t,n){if(262144&e.flags)return!1;return L(C.isSymbolAccessible(e,t,n,!0))},reportInaccessibleThisError:function(){(v||b)&&e.addDiagnostic(Wp(v||b,ha.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,j(),"this"))},reportInaccessibleUniqueSymbolError:function(){(v||b)&&e.addDiagnostic(Wp(v||b,ha.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,j(),"unique symbol"))},reportCyclicStructureError:function(){(v||b)&&e.addDiagnostic(Wp(v||b,ha.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,j()))},reportPrivateInBaseOfClassExpression:function(t){(v||b)&&e.addDiagnostic(fT(Wp(v||b,ha.Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected,t),...hF((v||b).parent)?[Wp(v||b,ha.Add_a_type_annotation_to_the_variable_0,j())]:[]))},reportLikelyUnsafeImportRequiredError:function(t){(v||b)&&e.addDiagnostic(Wp(v||b,ha.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,j(),t))},reportTruncationError:function(){(v||b)&&e.addDiagnostic(Wp(v||b,ha.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))},moduleResolverHost:f,reportNonlocalAugmentation:function(t,n,r){var i;const o=null==(i=n.declarations)?void 0:i.find(e=>wd(e)===t),a=P(r.declarations,e=>wd(e)!==t);if(o&&a)for(const t of a)e.addDiagnostic(fT(Wp(t,ha.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),Wp(o,ha.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)))},reportNonSerializableProperty:function(t){(v||b)&&e.addDiagnostic(Wp(v||b,ha.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized,t))},reportInferenceFallback:I,pushErrorFallbackNode(e){const t=b,n=h;h=()=>{h=n,b=t},b=e},popErrorFallbackNode(){h()}};let v,b,x,S,k,T;const C=e.getEmitResolver(),w=e.getCompilerOptions(),N=qq(C),{stripInternal:E,isolatedDeclarations:F}=w;return function(p){if(308===p.kind&&p.isDeclarationFile)return p;if(309===p.kind){c=!0,S=[],k=[],T=[];let m=!1;const g=d.createBundle(O(p.sourceFiles,c=>{if(c.isDeclarationFile)return;if(m=m||c.hasNoDefaultLib,x=c,n=c,r=void 0,o=!1,i=new Map,a=t,_=!1,u=!1,h(c),sf(c)||cf(c)){l=!1,s=!1;const t=jm(c)?d.createNodeArray(B(c)):TJ(c.statements,ae,bu);return d.updateSourceFile(c,[d.createModuleDeclaration([d.createModifier(138)],d.createStringLiteral(Wy(e.getEmitHost(),c)),d.createModuleBlock(AI(d.createNodeArray(ie(t)),c.statements)))],!0,[],[],!1,[])}s=!0;const p=jm(c)?d.createNodeArray(B(c)):TJ(c.statements,ae,bu);return d.updateSourceFile(c,ie(p),!0,[],[],!1,[])})),y=Lo(zo(uU(p,f,!0).declarationFilePath));return g.syntheticFileReferences=C(y),g.syntheticTypeReferences=v(),g.syntheticLibReferences=b(),g.hasNoDefaultLib=m,g}let m;if(s=!0,_=!1,u=!1,n=p,x=p,a=t,c=!1,l=!1,o=!1,r=void 0,i=new Map,S=[],k=[],T=[],h(x),jm(x))m=d.createNodeArray(B(p));else{const e=TJ(p.statements,ae,bu);m=AI(d.createNodeArray(ie(e)),p.statements),fO(p)&&(!l||_&&!u)&&(m=AI(d.createNodeArray([...m,dA(d)]),m))}const g=Lo(zo(uU(p,f,!0).declarationFilePath));return d.updateSourceFile(p,m,!0,C(g),v(),p.hasNoDefaultLib,b());function h(e){S=Y(S,O(e.referencedFiles,t=>[e,t])),k=Y(k,e.typeReferenceDirectives),T=Y(T,e.libReferenceDirectives)}function y(e){const t={...e};return t.pos=-1,t.end=-1,t}function v(){return U(k,e=>{if(e.preserve)return y(e)})}function b(){return U(T,e=>{if(e.preserve)return y(e)})}function C(e){return U(S,([t,n])=>{if(!n.preserve)return;const r=f.getSourceFileFromReference(t,n);if(!r)return;let i;if(r.isDeclarationFile)i=r.fileName;else{if(c&&D(p.sourceFiles,r))return;const e=uU(r,f,!0);i=e.declarationFilePath||e.jsFilePath||r.fileName}if(!i)return;const o=pa(e,i,f.getCurrentDirectory(),f.getCanonicalFileName,!1),a=y(n);return a.fileName=o,a})}};function A(t){C.getPropertiesOfContainerFunction(t).forEach(t=>{if(hC(t.valueDeclaration)){const n=LE(t.valueDeclaration)?t.valueDeclaration.left:t.valueDeclaration;e.addDiagnostic(Wp(n,ha.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function))}})}function I(t){F&&!jm(x)&&wd(t)===x&&(hF(t)&&C.isExpandoFunctionDeclaration(t)?A(t):e.addDiagnostic(N(t)))}function L(t){if(0===t.accessibility){if(t.aliasesToMakeVisible)if(r)for(const e of t.aliasesToMakeVisible)pe(r,e);else r=t.aliasesToMakeVisible}else if(3!==t.accessibility){const n=a(t);if(n)return n.typeName?e.addDiagnostic(Wp(t.errorNode||n.errorNode,n.diagnosticMessage,rp(n.typeName),t.errorSymbolName,t.errorModuleName)):e.addDiagnostic(Wp(t.errorNode||n.errorNode,n.diagnosticMessage,t.errorSymbolName,t.errorModuleName)),!0}return!1}function j(){return v?Bp(v):b&&Ac(b)?Bp(Ac(b)):b&&JF(b)?b.isExportEquals?"export=":"default":"(Missing)"}function B(e){const t=a;a=t=>t.errorNode&&Bq(t.errorNode)?zq(t.errorNode)(t):{diagnosticMessage:t.errorModuleName?ha.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:ha.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:t.errorNode||e};const n=C.getDeclarationStatementsForSourceFile(e,Vq,Wq,y);return a=t,n}function J(e){return 80===e.kind?e:208===e.kind?d.updateArrayBindingPattern(e,TJ(e.elements,t,P_)):d.updateObjectBindingPattern(e,TJ(e.elements,t,hE));function t(e){return 233===e.kind?e:(e.propertyName&&FD(e.propertyName)&&fb(e.propertyName.expression)&&ee(e.propertyName.expression,n),d.updateBindingElement(e,e.dotDotDotToken,e.propertyName,J(e.name),void 0))}}function z(e,t){let n;o||(n=a,a=zq(e));const r=d.updateParameterDeclaration(e,function(e,t,n,r){return e.createModifiersFromModifierFlags(Kq(t,n,r))}(d,e,t),e.dotDotDotToken,J(e.name),C.isOptionalParameter(e)?e.questionToken||d.createToken(58):void 0,W(e,!0),V(e));return o||(a=n),r}function q(e){return Hq(e)&&!!e.initializer&&C.isLiteralConstDeclaration(bc(e))}function V(e){if(q(e)){return DC(EC(e.initializer))||I(e),C.createLiteralConstValue(bc(e,Hq),y)}}function W(e,t){if(!t&&Ov(e,2))return;if(q(e))return;if(!JF(e)&&!hE(e)&&e.type&&(!AD(e)||!C.requiresAddingImplicitUndefined(e,n)))return kJ(e.type,oe,N_);const r=v;let i,s;return v=e.name,o||(i=a,Bq(e)&&(a=zq(e))),FC(e)?s=C.createTypeOfDeclaration(e,n,Vq,Wq,y):__(e)?s=C.createReturnTypeOfSignatureDeclaration(e,n,Vq,Wq,y):gn.assertNever(e),v=r,o||(a=i),s??d.createKeywordTypeNode(133)}function $(e){switch((e=bc(e)).kind){case 263:case 268:case 265:case 264:case 266:case 267:return!C.isDeclarationVisible(e);case 261:return!K(e);case 272:case 273:case 279:case 278:return!1;case 176:return!0}return!1}function K(e){return!zE(e)&&(E_(e.name)?X(e.name.elements,K):C.isDeclarationVisible(e))}function H(e,t,n){if(Ov(e,2))return d.createNodeArray();const r=O(t,e=>z(e,n));return r?d.createNodeArray(r,t.hasTrailingComma):d.createNodeArray()}function G(e,t){let n;if(!t){const t=fv(e);t&&(n=[z(t)])}if(zD(e)){let r;if(!t){const t=dv(e);t&&(r=z(t))}r||(r=d.createParameterDeclaration(void 0,void 0,"value")),n=le(n,r)}return d.createNodeArray(n||p)}function Q(e,t){return Ov(e,2)?void 0:TJ(t,oe,PD)}function Z(e){return mP(e)||SF(e)||TF(e)||bF(e)||xF(e)||__(e)||VD(e)||_E(e)}function ee(e,t){L(C.isEntityNameVisible(e,t))}function te(e,t){return Lu(e)&&Lu(t)&&(e.jsDoc=t.jsDoc),Jw(e,Bw(t))}function ne(t,n){if(n){if(l=l||268!==t.kind&&206!==t.kind,Uu(n)&&c){const n=Ky(e.getEmitHost(),C,t);if(n)return d.createStringLiteral(n)}return n}}function re(e){const t=EV(e);return e&&void 0!==t?e:void 0}function ie(e){for(;m(r);){const e=r.shift();if(!Ip(e))return gn.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${gn.formatSyntaxKind(e.kind)}`);const t=s;s=e.parent&&mP(e.parent)&&!(fO(e.parent)&&c);const n=ue(e);s=t,i.set(rz(e),n)}return TJ(e,function(e){if(Ip(e)){const t=rz(e);if(i.has(t)){const n=i.get(t);return i.delete(t),n&&((nt(n)?X(n,nu):nu(n))&&(_=!0),mP(e.parent)&&(nt(n)?X(n,ru):ru(n))&&(l=!0)),n}}return e},bu)}function oe(t){if(fe(t))return;if(hu(t)){if($(t))return;if(Wh(t))if(F){if(!C.isDefinitelyReferenceToGlobalSymbolObject(t.name.expression)){if(bF(t.parent)||vE(t.parent))return void e.addDiagnostic(Wp(t,ha.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));if((xF(t.parent)||XD(t.parent))&&!fb(t.name.expression))return void e.addDiagnostic(Wp(t,ha.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations))}}else if(!C.isLateBound(bc(t))||!fb(t.name.expression))return}if(__(t)&&C.isImplementationOfOverload(t))return;if(QE(t))return;let r;Z(t)&&(r=n,n=t);const i=a,s=Bq(t),c=o;let l=(188===t.kind||201===t.kind)&&266!==t.parent.kind;if((MD(t)||jD(t))&&Ov(t,2)){if(t.symbol&&t.symbol.declarations&&t.symbol.declarations[0]!==t)return;return u(d.createPropertyDeclaration(ge(t),t.name,void 0,void 0,void 0))}if(s&&!o&&(a=zq(t)),GD(t)&&ee(t.exprName,n),l&&(o=!0),function(e){switch(e.kind){case 181:case 177:case 175:case 178:case 179:case 173:case 172:case 174:case 180:case 182:case 261:case 169:case 234:case 184:case 195:case 185:case 186:case 206:return!0}return!1}(t))switch(t.kind){case 234:{(s_(t.expression)||fb(t.expression))&&ee(t.expression,n);const r=IJ(t,oe,e);return u(d.updateExpressionWithTypeArguments(r,r.expression,r.typeArguments))}case 184:{ee(t.typeName,n);const r=IJ(t,oe,e);return u(d.updateTypeReferenceNode(r,r.typeName,r.typeArguments))}case 181:return u(d.updateConstructSignature(t,Q(t,t.typeParameters),H(t,t.parameters),W(t)));case 177:return u(d.createConstructorDeclaration(ge(t),H(t,t.parameters,0),void 0));case 175:if(mD(t.name))return u(void 0);return u(d.createMethodDeclaration(ge(t),void 0,t.name,t.questionToken,Q(t,t.typeParameters),H(t,t.parameters),W(t),void 0));case 178:return mD(t.name)?u(void 0):u(d.updateGetAccessorDeclaration(t,ge(t),t.name,G(t,Ov(t,2)),W(t),void 0));case 179:return mD(t.name)?u(void 0):u(d.updateSetAccessorDeclaration(t,ge(t),t.name,G(t,Ov(t,2)),void 0));case 173:return mD(t.name)?u(void 0):u(d.updatePropertyDeclaration(t,ge(t),t.name,t.questionToken,W(t),V(t)));case 172:return mD(t.name)?u(void 0):u(d.updatePropertySignature(t,ge(t),t.name,t.questionToken,W(t)));case 174:return mD(t.name)?u(void 0):u(d.updateMethodSignature(t,ge(t),t.name,t.questionToken,Q(t,t.typeParameters),H(t,t.parameters),W(t)));case 180:return u(d.updateCallSignature(t,Q(t,t.typeParameters),H(t,t.parameters),W(t)));case 182:return u(d.updateIndexSignature(t,ge(t),H(t,t.parameters),kJ(t.type,oe,N_)||d.createKeywordTypeNode(133)));case 261:return E_(t.name)?de(t.name):(l=!0,o=!0,u(d.updateVariableDeclaration(t,t.name,void 0,W(t),V(t))));case 169:return 175===(_=t).parent.kind&&Ov(_.parent,2)&&(t.default||t.constraint)?u(d.updateTypeParameterDeclaration(t,t.modifiers,t.name,void 0,void 0)):u(IJ(t,oe,e));case 195:{const e=kJ(t.checkType,oe,N_),r=kJ(t.extendsType,oe,N_),i=n;n=t.trueType;const o=kJ(t.trueType,oe,N_);n=i;const a=kJ(t.falseType,oe,N_);return gn.assert(e),gn.assert(r),gn.assert(o),gn.assert(a),u(d.updateConditionalTypeNode(t,e,r,o,a))}case 185:return u(d.updateFunctionTypeNode(t,TJ(t.typeParameters,oe,PD),H(t,t.parameters),gn.checkDefined(kJ(t.type,oe,N_))));case 186:return u(d.updateConstructorTypeNode(t,ge(t),TJ(t.typeParameters,oe,PD),H(t,t.parameters),gn.checkDefined(kJ(t.type,oe,N_))));case 206:return vf(t)?u(d.updateImportTypeNode(t,d.updateLiteralTypeNode(t.argument,ne(t,t.argument.literal)),t.attributes,t.qualifier,TJ(t.typeArguments,oe,N_),t.isTypeOf)):u(t);default:gn.assertNever(t,`Attempted to process unhandled node kind: ${gn.formatSyntaxKind(t.kind)}`)}var _;return YD(t)&&Ha(x,t.pos).line===Ha(x,t.end).line&&Ew(t,1),u(IJ(t,oe,e));function u(e){return e&&s&&Wh(t)&&function(e){let t;o||(t=a,a=Jq(e));v=e.name,gn.assert(Wh(e));const r=e;ee(r.name.expression,n),o||(a=t);v=void 0}(t),Z(t)&&(n=r),s&&!o&&(a=i),l&&(o=c),e===t?e:e&&Cw(te(e,t),t)}}function ae(e){if(!function(e){switch(e.kind){case 263:case 268:case 272:case 265:case 264:case 266:case 267:case 244:case 273:case 279:case 278:return!0}return!1}(e))return;if(fe(e))return;switch(e.kind){case 279:return mP(e.parent)&&(l=!0),u=!0,d.updateExportDeclaration(e,e.modifiers,e.isTypeOnly,e.exportClause,ne(e,e.moduleSpecifier),re(e.attributes));case 278:if(mP(e.parent)&&(l=!0),u=!0,80===e.expression.kind)return e;{const t=d.createUniqueName("_default",16);a=()=>({diagnosticMessage:ha.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:e}),b=e;const n=W(e),r=d.createVariableDeclaration(t,void 0,n,void 0);b=void 0;const i=d.createVariableStatement(s?[d.createModifier(138)]:[],d.createVariableDeclarationList([r],2));return te(i,e),Dw(e),[i,d.updateExportAssignment(e,e.modifiers,t)]}}const t=ue(e);return i.set(rz(e),t),e}function ce(e){if(DF(e)||Ov(e,2048)||!II(e))return e;const t=d.createModifiersFromModifierFlags(131039&Kv(e));return d.replaceModifiers(e,t)}function _e(e,t,n,r){const i=d.updateModuleDeclaration(e,t,n,r);if(mp(i)||32&i.flags)return i;const o=d.createModuleDeclaration(i.modifiers,i.name,i.body,32|i.flags);return Cw(o,i),AI(o,i),o}function ue(t){if(r)for(;$t(r,t););if(fe(t))return;switch(t.kind){case 272:return function(e){if(C.isDeclarationVisible(e)){if(284===e.moduleReference.kind){const t=Am(e);return d.updateImportEqualsDeclaration(e,e.modifiers,e.isTypeOnly,e.name,d.updateExternalModuleReference(e.moduleReference,ne(e,t)))}{const t=a;return a=zq(e),ee(e.moduleReference,n),a=t,e}}}(t);case 273:return function(t){if(!t.importClause)return d.updateImportDeclaration(t,t.modifiers,t.importClause,ne(t,t.moduleSpecifier),re(t.attributes));const n=166===t.importClause.phaseModifier?void 0:t.importClause.phaseModifier,r=t.importClause&&t.importClause.name&&C.isDeclarationVisible(t.importClause)?t.importClause.name:void 0;if(!t.importClause.namedBindings)return r&&d.updateImportDeclaration(t,t.modifiers,d.updateImportClause(t.importClause,n,r,void 0),ne(t,t.moduleSpecifier),re(t.attributes));if(275===t.importClause.namedBindings.kind){const e=C.isDeclarationVisible(t.importClause.namedBindings)?t.importClause.namedBindings:void 0;return r||e?d.updateImportDeclaration(t,t.modifiers,d.updateImportClause(t.importClause,n,r,e),ne(t,t.moduleSpecifier),re(t.attributes)):void 0}const i=U(t.importClause.namedBindings.elements,e=>C.isDeclarationVisible(e)?e:void 0);return i&&i.length||r?d.updateImportDeclaration(t,t.modifiers,d.updateImportClause(t.importClause,n,r,i&&i.length?d.updateNamedImports(t.importClause.namedBindings,i):void 0),ne(t,t.moduleSpecifier),re(t.attributes)):C.isImportRequiredByAugmentation(t)?(F&&e.addDiagnostic(Wp(t,ha.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)),d.updateImportDeclaration(t,t.modifiers,void 0,ne(t,t.moduleSpecifier),re(t.attributes))):void 0}(t)}if(hu(t)&&$(t))return;if(iA(t))return;if(__(t)&&C.isImplementationOfOverload(t))return;let o;Z(t)&&(o=n,n=t);const c=Bq(t),p=a;c&&(a=zq(t));const f=s;switch(t.kind){case 266:{s=!1;const e=h(d.updateTypeAliasDeclaration(t,ge(t),t.name,TJ(t.typeParameters,oe,PD),gn.checkDefined(kJ(t.type,oe,N_))));return s=f,e}case 265:return h(d.updateInterfaceDeclaration(t,ge(t),t.name,Q(t,t.typeParameters),he(t.heritageClauses),TJ(t.members,oe,T_)));case 263:{const e=h(d.updateFunctionDeclaration(t,ge(t),void 0,t.name,Q(t,t.typeParameters),H(t,t.parameters),W(t),void 0));if(e&&C.isExpandoFunctionDeclaration(t)&&function(e){var t;if(e.body)return!0;const n=null==(t=e.symbol.declarations)?void 0:t.filter(e=>vF(e)&&!e.body);return!n||n.indexOf(e)===n.length-1}(t)){const r=C.getPropertiesOfContainerFunction(t);F&&A(t);const i=jI.createModuleDeclaration(void 0,e.name||d.createIdentifier("_default"),d.createModuleBlock([]),32);jT(i,n),i.locals=nd(r),i.symbol=r[0].parent;const o=[];let s=U(r,e=>{if(!hC(e.valueDeclaration))return;const t=Sc(e.escapedName);if(!Ss(t,99))return;a=zq(e.valueDeclaration);const n=C.createTypeOfDeclaration(e.valueDeclaration,i,Vq,2|Wq,y);a=p;const r=Mh(t),s=r?d.getGeneratedNameForNode(e.valueDeclaration):d.createIdentifier(t);r&&o.push([s,t]);const c=d.createVariableDeclaration(s,void 0,n,void 0);return d.createVariableStatement(r?void 0:[d.createToken(95)],d.createVariableDeclarationList([c]))});o.length?s.push(d.createExportDeclaration(void 0,!1,d.createNamedExports(O(o,([e,t])=>d.createExportSpecifier(!1,e,t))))):s=U(s,e=>d.replaceModifiers(e,0));const c=d.createModuleDeclaration(ge(t),t.name,d.createModuleBlock(s),32);if(!Ov(e,2048))return[e,c];const _=d.createModifiersFromModifierFlags(-2081&Kv(e)|128),f=d.updateFunctionDeclaration(e,_,void 0,e.name,e.typeParameters,e.parameters,e.type,void 0),m=d.updateModuleDeclaration(c,_,c.name,c.body),g=d.createExportAssignment(void 0,!1,c.name);return mP(t.parent)&&(l=!0),u=!0,[f,m,g]}return e}case 268:{s=!1;const e=t.body;if(e&&269===e.kind){const n=_,r=u;u=!1,_=!1;let i=ie(TJ(e.statements,ae,bu));33554432&t.flags&&(_=!1),bp(t)||function(e){return X(e,me)}(i)||u||(i=_?d.createNodeArray([...i,dA(d)]):TJ(i,ce,bu));const o=d.updateModuleBlock(e,i);s=f,_=n,u=r;const a=ge(t);return h(_e(t,a,xp(t)?ne(t,t.name):t.name,o))}{s=f;const n=ge(t);s=!1,kJ(e,ae);const r=rz(e),o=i.get(r);return i.delete(r),h(_e(t,n,t.name,o))}}case 264:{v=t.name,b=t;const e=d.createNodeArray(ge(t)),r=Q(t,t.typeParameters),i=uv(t);let o;if(i){const e=a;o=se(R(i.parameters,e=>{if(Lv(e,31)&&!fe(e))return a=zq(e),80===e.name.kind?te(d.createPropertyDeclaration(ge(e),e.name,e.questionToken,W(e),V(e)),e):function t(n){let r;for(const i of n.elements)zE(i)||(E_(i.name)&&(r=Y(r,t(i.name))),r=r||[],r.push(d.createPropertyDeclaration(ge(e),i.name,void 0,W(i),void 0)));return r}(e.name)})),a=e}const c=Y(Y(Y(X(t.members,e=>!!e.name&&mD(e.name))?[d.createPropertyDeclaration(void 0,d.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:void 0,C.createLateBoundIndexSignatures(t,n,Vq,Wq,y)),o),TJ(t.members,oe,h_)),l=d.createNodeArray(c),_=Ch(t);if(_&&!fb(_.expression)&&106!==_.expression.kind){const n=t.name?Sc(t.name.escapedText):"default",i=d.createUniqueName(`${n}_base`,16);a=()=>({diagnosticMessage:ha.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:_,typeName:t.name});const o=d.createVariableDeclaration(i,void 0,C.createTypeOfExpression(_.expression,t,Vq,Wq,y),void 0),c=d.createVariableStatement(s?[d.createModifier(138)]:[],d.createVariableDeclarationList([o],2)),u=d.createNodeArray(O(t.heritageClauses,e=>{if(96===e.token){const t=a;a=zq(e.types[0]);const n=d.updateHeritageClause(e,O(e.types,e=>d.updateExpressionWithTypeArguments(e,i,TJ(e.typeArguments,oe,N_))));return a=t,n}return d.updateHeritageClause(e,TJ(d.createNodeArray(P(e.types,e=>fb(e.expression)||106===e.expression.kind)),oe,qE))}));return[c,h(d.updateClassDeclaration(t,e,t.name,r,u,l))]}{const n=he(t.heritageClauses);return h(d.updateClassDeclaration(t,e,t.name,r,n,l))}}case 244:return h(function(e){if(!g(e.declarationList.declarations,K))return;const t=TJ(e.declarationList.declarations,oe,hF);if(!m(t))return;const n=d.createNodeArray(ge(e));let r;df(e.declarationList)||uf(e.declarationList)?(r=d.createVariableDeclarationList(t,2),Cw(r,e.declarationList),AI(r,e.declarationList),Jw(r,e.declarationList)):r=d.updateVariableDeclarationList(e.declarationList,t);return d.updateVariableStatement(e,n,r)}(t));case 267:return h(d.updateEnumDeclaration(t,d.createNodeArray(ge(t)),t.name,d.createNodeArray(U(t.members,t=>{if(fe(t))return;const n=C.getEnumMemberValue(t),r=null==n?void 0:n.value;F&&t.initializer&&(null==n?void 0:n.hasExternalReferences)&&!FD(t.name)&&e.addDiagnostic(Wp(t,ha.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));const i=void 0===r?void 0:"string"==typeof r?d.createStringLiteral(r):r<0?d.createPrefixUnaryExpression(41,d.createNumericLiteral(-r)):d.createNumericLiteral(r);return te(d.updateEnumMember(t,t.name,i),t)}))))}return gn.assertNever(t,`Unhandled top-level node in declaration emit: ${gn.formatSyntaxKind(t.kind)}`);function h(e){return Z(t)&&(n=o),c&&(a=p),268===t.kind&&(s=f),e===t?e:(b=void 0,v=void 0,e&&Cw(te(e,t),t))}}function de(e){return M(U(e.elements,e=>function(e){if(233===e.kind)return;if(e.name){if(!K(e))return;return E_(e.name)?de(e.name):d.createVariableDeclaration(e.name,void 0,W(e),void 0)}}(e)))}function fe(e){return!!E&&!!e&&Hu(e,x)}function me(e){return JF(e)||zF(e)}function ge(e){const t=Kv(e),n=function(e){let t=130030,n=s&&!function(e){if(265===e.kind)return!0;return!1}(e)?128:0;const r=308===e.parent.kind;(!r||c&&r&&fO(e.parent))&&(t^=128,n=0);return Kq(e,t,n)}(e);return t===n?CJ(e.modifiers,e=>at(e,a_),a_):d.createModifiersFromModifierFlags(n)}function he(e){return d.createNodeArray(P(O(e,e=>d.updateHeritageClause(e,TJ(d.createNodeArray(P(e.types,t=>fb(t.expression)||96===e.token&&106===t.expression.kind)),oe,qE))),e=>e.types&&!!e.types.length))}}function Kq(e,t=131070,n=0){let r=Kv(e)&t|n;return 2048&r&&!(32&r)&&(r^=32),2048&r&&128&r&&(r^=128),r}function Hq(e){switch(e.kind){case 173:case 172:return!Ov(e,2);case 170:case 261:return!0}return!1}var Gq={scriptTransformers:p,declarationTransformers:p};function Xq(e,t,n){return{scriptTransformers:Qq(e,t,n),declarationTransformers:Yq(t)}}function Qq(e,t,n){if(n)return p;const r=wS(e),i=NS(e),o=zS(e),a=[];return de(a,t&&O(t.before,eU)),a.push(_q),e.experimentalDecorators&&a.push(fq),tk(e)&&a.push(Dq),r<99&&a.push(Sq),e.experimentalDecorators||!(r<99)&&o||a.push(mq),a.push(uq),r<8&&a.push(xq),r<7&&a.push(bq),r<6&&a.push(vq),r<5&&a.push(yq),r<4&&a.push(gq),r<3&&a.push(Fq),r<2&&(a.push(Aq),a.push(Iq)),a.push(function(e){switch(e){case 200:return Mq;case 99:case 7:case 6:case 5:case 100:case 101:case 102:case 199:case 1:return Rq;case 4:return jq;default:return Oq}}(i)),de(a,t&&O(t.after,eU)),a}function Yq(e){const t=[];return t.push($q),de(t,e&&O(e.afterDeclarations,tU)),t}function Zq(e,t){return n=>{const r=e(n);return"function"==typeof r?t(n,r):function(e){return t=>gP(t)?e.transformBundle(t):e.transformSourceFile(t)}(r)}}function eU(e){return Zq(e,az)}function tU(e){return Zq(e,(e,t)=>t)}function nU(e,t){return t}function rU(e,t,n){n(e,t)}function iU(e,t,n,r,i,o,a){var s,c;const l=new Array(359);let _,u,d,p,f,m=0,g=[],h=[],y=[],v=[],b=0,x=!1,S=[],k=0,T=nU,C=rU,w=0;const N=[],D={factory:n,getCompilerOptions:()=>r,getEmitResolver:()=>e,getEmitHost:()=>t,getEmitHelperFactory:ht(()=>pN(D)),startLexicalEnvironment:function(){gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),gn.assert(!x,"Lexical environment is suspended."),g[b]=_,h[b]=u,y[b]=d,v[b]=m,b++,_=void 0,u=void 0,d=void 0,m=0},suspendLexicalEnvironment:function(){gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),gn.assert(!x,"Lexical environment is already suspended."),x=!0},resumeLexicalEnvironment:function(){gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),gn.assert(x,"Lexical environment is not suspended."),x=!1},endLexicalEnvironment:function(){let e;if(gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),gn.assert(!x,"Lexical environment is suspended."),_||u||d){if(u&&(e=[...u]),_){const t=n.createVariableStatement(void 0,n.createVariableDeclarationList(_));Ew(t,2097152),e?e.push(t):e=[t]}d&&(e=e?[...e,...d]:[...d])}b--,_=g[b],u=h[b],d=y[b],m=v[b],0===b&&(g=[],h=[],y=[],v=[]);return e},setLexicalEnvironmentFlags:function(e,t){m=t?m|e:m&~e},getLexicalEnvironmentFlags:function(){return m},hoistVariableDeclaration:function(e){gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed.");const t=Ew(n.createVariableDeclaration(e),128);_?_.push(t):_=[t];1&m&&(m|=2)},hoistFunctionDeclaration:function(e){gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),Ew(e,2097152),u?u.push(e):u=[e]},addInitializationStatement:function(e){gn.assert(w>0,"Cannot modify the lexical environment during initialization."),gn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),Ew(e,2097152),d?d.push(e):d=[e]},startBlockScope:function(){gn.assert(w>0,"Cannot start a block scope during initialization."),gn.assert(w<2,"Cannot start a block scope after transformation has completed."),S[k]=p,k++,p=void 0},endBlockScope:function(){gn.assert(w>0,"Cannot end a block scope during initialization."),gn.assert(w<2,"Cannot end a block scope after transformation has completed.");const e=X(p)?[n.createVariableStatement(void 0,n.createVariableDeclarationList(p.map(e=>n.createVariableDeclaration(e)),1))]:void 0;k--,p=S[k],0===k&&(S=[]);return e},addBlockScopedVariable:function(e){gn.assert(k>0,"Cannot add a block scoped variable outside of an iteration body."),(p||(p=[])).push(e)},requestEmitHelper:function e(t){if(gn.assert(w>0,"Cannot modify the transformation context during initialization."),gn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),gn.assert(!t.scoped,"Cannot request a scoped emit helper."),t.dependencies)for(const n of t.dependencies)e(n);f=le(f,t)},readEmitHelpers:function(){gn.assert(w>0,"Cannot modify the transformation context during initialization."),gn.assert(w<2,"Cannot modify the transformation context after transformation has completed.");const e=f;return f=void 0,e},enableSubstitution:function(e){gn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=1},enableEmitNotification:function(e){gn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=2},isSubstitutionEnabled:I,isEmitNotificationEnabled:O,get onSubstituteNode(){return T},set onSubstituteNode(e){gn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),gn.assert(void 0!==e,"Value must not be 'undefined'"),T=e},get onEmitNode(){return C},set onEmitNode(e){gn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),gn.assert(void 0!==e,"Value must not be 'undefined'"),C=e},addDiagnostic(e){N.push(e)}};for(const e of i)Nw(wd(bc(e)));ar("beforeTransform");const E=o.map(e=>e(D)),F=e=>{for(const t of E)e=t(e);return e};w=1;const P=[];for(const e of i)null==(s=Yn)||s.push(Yn.Phase.Emit,"transformNodes",308===e.kind?{path:e.path}:{kind:e.kind,pos:e.pos,end:e.end}),P.push((a?F:A)(e)),null==(c=Yn)||c.pop();return w=2,ar("afterTransform"),sr("transformTime","beforeTransform","afterTransform"),{transformed:P,substituteNode:function(e,t){return gn.assert(w<3,"Cannot substitute a node after the result is disposed."),t&&I(t)&&T(e,t)||t},emitNodeWithNotification:function(e,t,n){gn.assert(w<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),t&&(O(t)?C(e,t,n):n(e,t))},isEmitNotificationEnabled:O,dispose:function(){if(w<3){for(const e of i)Nw(wd(bc(e)));_=void 0,g=void 0,u=void 0,h=void 0,T=void 0,C=void 0,f=void 0,w=3}},diagnostics:N};function A(e){return!e||mP(e)&&e.isDeclarationFile?e:F(e)}function I(e){return!(!(1&l[e.kind])||8&ap(e))}function O(e){return!!(2&l[e.kind])||!!(4&ap(e))}}var oU={factory:kw,getCompilerOptions:()=>({}),getEmitResolver:gt,getEmitHost:gt,getEmitHelperFactory:gt,startLexicalEnvironment:ct,resumeLexicalEnvironment:ct,suspendLexicalEnvironment:ct,endLexicalEnvironment:ut,setLexicalEnvironmentFlags:ct,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:ct,hoistFunctionDeclaration:ct,addInitializationStatement:ct,startBlockScope:ct,endBlockScope:ut,addBlockScopedVariable:ct,requestEmitHelper:ct,readEmitHelpers:gt,enableSubstitution:ct,enableEmitNotification:ct,isSubstitutionEnabled:gt,isEmitNotificationEnabled:gt,onSubstituteNode:nU,onEmitNode:rU,addDiagnostic:ct},aU=function(){const e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e}();function sU(e){return Eo(e,".tsbuildinfo")}function cU(e,t,n,r=!1,i,o){const a=nt(n)?n:nv(e,n,r),s=e.getCompilerOptions();if(!i)if(s.outFile){if(a.length){const n=kw.createBundle(a),i=t(uU(n,e,r),n);if(i)return i}}else for(const n of a){const i=t(uU(n,e,r),n);if(i)return i}if(o){const e=lU(s);if(e)return t({buildInfoPath:e},void 0)}}function lU(e){const t=e.configFilePath;if(!function(e){return RS(e)||!!e.tscBuild}(e))return;if(e.tsBuildInfoFile)return e.tsBuildInfoFile;const n=e.outFile;let r;if(n)r=Qk(n);else{if(!t)return;const n=Qk(t);r=e.outDir?e.rootDir?Vo(e.outDir,_a(e.rootDir,n,!0)):Uo(e.outDir,jo(n)):n}return r+".tsbuildinfo"}function _U(e,t){const n=e.outFile,r=e.emitDeclarationOnly?void 0:n,i=r&&dU(r,e),o=t||jS(e)?Qk(n)+".d.ts":void 0;return{jsFilePath:r,sourceMapFilePath:i,declarationFilePath:o,declarationMapPath:o&&BS(e)?o+".map":void 0}}function uU(e,t,n){const r=t.getCompilerOptions();if(309===e.kind)return _U(r,n);{const i=Gy(e.fileName,t,pU(e.fileName,r)),o=cf(e),a=o&&0===aa(e.fileName,i,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames()),s=r.emitDeclarationOnly||a?void 0:i,c=!s||cf(e)?void 0:dU(s,r),l=n||jS(r)&&!o?Xy(e.fileName,t):void 0;return{jsFilePath:s,sourceMapFilePath:c,declarationFilePath:l,declarationMapPath:l&&BS(r)?l+".map":void 0}}}function dU(e,t){return t.sourceMap&&!t.inlineSourceMap?e+".map":void 0}function pU(e,t){return Eo(e,".json")?".json":1===t.jsx&&Fo(e,[".jsx",".tsx"])?".jsx":Fo(e,[".mts",".mjs"])?".mjs":Fo(e,[".cts",".cjs"])?".cjs":".js"}function fU(e,t,n,r){return n?Vo(n,_a(r(),e,t)):e}function mU(e,t,n,r=()=>kU(t,n)){return gU(e,t.options,n,r)}function gU(e,t,n,r){return eT(fU(e,n,t.declarationDir||t.outDir,r),Yy(e))}function hU(e,t,n,r=()=>kU(t,n)){if(t.options.emitDeclarationOnly)return;const i=Eo(e,".json"),o=yU(e,t.options,n,r);return i&&0===aa(e,o,gn.checkDefined(t.options.configFilePath),n)?void 0:o}function yU(e,t,n,r){return eT(fU(e,n,t.outDir,r),pU(e,t))}function vU(){let e;return{addOutput:function(t){t&&(e||(e=[])).push(t)},getOutputs:function(){return e||p}}}function bU(e,t){const{jsFilePath:n,sourceMapFilePath:r,declarationFilePath:i,declarationMapPath:o}=_U(e.options,!1);t(n),t(r),t(i),t(o)}function xU(e,t,n,r,i){if(SO(t))return;const o=hU(t,e,n,i);if(r(o),!Eo(t,".json")&&(o&&e.options.sourceMap&&r(`${o}.map`),jS(e.options))){const o=mU(t,e,n,i);r(o),e.options.declarationMap&&r(`${o}.map`)}}function SU(e,t,n,r,i){let o;return e.rootDir?(o=$o(e.rootDir,n),null==i||i(e.rootDir)):e.composite&&e.configFilePath?(o=Lo(zo(e.configFilePath)),null==i||i(o)):o=tV(t(),n,r),o&&o[o.length-1]!==ho&&(o+=ho),o}function kU({options:e,fileNames:t},n){return SU(e,()=>P(t,t=>!(e.noEmitForJsFiles&&Fo(t,Ok)||SO(t))),Lo(zo(gn.checkDefined(e.configFilePath))),Xt(!n))}function TU(e,t){const{addOutput:n,getOutputs:r}=vU();if(e.options.outFile)bU(e,n);else{const r=ht(()=>kU(e,t));for(const i of e.fileNames)xU(e,i,t,n,r)}return n(lU(e.options)),r()}function CU(e,t,n){t=Ko(t),gn.assert(D(e.fileNames,t),"Expected fileName to be present in command line");const{addOutput:r,getOutputs:i}=vU();return e.options.outFile?bU(e,r):xU(e,t,n,r),i()}function wU(e,t){if(e.options.outFile){const{jsFilePath:t,declarationFilePath:n}=_U(e.options,!1);return gn.checkDefined(t||n,`project ${e.options.configFilePath} expected to have at least one output`)}const n=ht(()=>kU(e,t));for(const r of e.fileNames){if(SO(r))continue;const i=hU(r,e,t,n);if(i)return i;if(!Eo(r,".json")&&jS(e.options))return mU(r,e,t,n)}const r=lU(e.options);return r||gn.fail(`project ${e.options.configFilePath} expected to have at least one output`)}function NU(e,t){return!!t&&!!e}function DU(e,t,n,{scriptTransformers:r,declarationTransformers:i},o,a,s,c){var l=t.getCompilerOptions(),_=l.sourceMap||l.inlineSourceMap||BS(l)?[]:void 0,d=l.listEmittedFiles?[]:void 0,p=hy(),f=Bb(l),g=zy(f),{enter:h,exit:y}=Qn("printTime","beforePrint","afterPrint"),v=!1;return h(),cU(t,function({jsFilePath:a,sourceMapFilePath:c,declarationFilePath:_,declarationMapPath:f,buildInfoPath:g},h){var y,S,k,T,C,w;null==(y=Yn)||y.push(Yn.Phase.Emit,"emitJsFileOrBundle",{jsFilePath:a}),function(n,i,a){if(!n||o||!i)return;if(t.isEmitBlocked(i)||l.noEmit)return void(v=!0);(mP(n)?[n]:P(n.sourceFiles,Bm)).forEach(t=>{!l.noCheck&&xT(t,l)||function(t){if(jm(t))return;cO(t,t=>!DF(t)||32&Gv(t)?EF(t)?"skip":void e.markLinkedReferences(t):"skip")}(t)});const s=iU(e,t,kw,l,[n],r,!1),c=jU({removeComments:l.removeComments,newLine:l.newLine,noEmitHelpers:l.noEmitHelpers,module:NS(l),moduleResolution:DS(l),target:wS(l),sourceMap:l.sourceMap,inlineSourceMap:l.inlineSourceMap,inlineSources:l.inlineSources,extendedDiagnostics:l.extendedDiagnostics},{hasGlobalName:e.hasGlobalName,onEmitNode:s.emitNodeWithNotification,isEmitNotificationEnabled:s.isEmitNotificationEnabled,substituteNode:s.substituteNode});gn.assert(1===s.transformed.length,"Should only see one output from the transform"),x(i,a,s,c,l),s.dispose(),d&&(d.push(i),a&&d.push(a))}(h,a,c),null==(S=Yn)||S.pop(),null==(k=Yn)||k.push(Yn.Phase.Emit,"emitDeclarationFileOrBundle",{declarationFilePath:_}),function(n,r,a){if(!n||0===o)return;if(!r)return void((o||l.emitDeclarationOnly)&&(v=!0));const c=mP(n)?[n]:n.sourceFiles,_=s?c:P(c,Bm),u=l.outFile?[kw.createBundle(_)]:_;_.forEach(e=>{(o&&!jS(l)||l.noCheck||NU(o,s)||!xT(e,l))&&b(e)});const f=iU(e,t,kw,l,u,i,!1);if(m(f.diagnostics))for(const e of f.diagnostics)p.add(e);const g=!!f.diagnostics&&!!f.diagnostics.length||!!t.isEmitBlocked(r)||!!l.noEmit;if(v=v||g,!g||s){gn.assert(1===f.transformed.length,"Should only see one output from the decl transform");const t={removeComments:l.removeComments,newLine:l.newLine,noEmitHelpers:!0,module:l.module,moduleResolution:l.moduleResolution,target:l.target,sourceMap:2!==o&&l.declarationMap,inlineSourceMap:l.inlineSourceMap,extendedDiagnostics:l.extendedDiagnostics,onlyPrintJsDocStyle:!0,omitBraceSourceMapPositions:!0},n=x(r,a,f,jU(t,{hasGlobalName:e.hasGlobalName,onEmitNode:f.emitNodeWithNotification,isEmitNotificationEnabled:f.isEmitNotificationEnabled,substituteNode:f.substituteNode}),{sourceMap:t.sourceMap,sourceRoot:l.sourceRoot,mapRoot:l.mapRoot,extendedDiagnostics:l.extendedDiagnostics});d&&(n&&d.push(r),a&&d.push(a))}f.dispose()}(h,_,f),null==(T=Yn)||T.pop(),null==(C=Yn)||C.push(Yn.Phase.Emit,"emitBuildInfo",{buildInfoPath:g}),function(e){if(!e||n)return;if(t.isEmitBlocked(e))return void(v=!0);const r=t.getBuildInfo()||{version:u};av(t,p,e,EU(r),!1,void 0,{buildInfo:r}),null==d||d.push(e)}(g),null==(w=Yn)||w.pop()},nv(t,n,s),s,a,!n&&!c),y(),{emitSkipped:v,diagnostics:p.getDiagnostics(),emittedFiles:d,sourceMaps:_};function b(t){JF(t)?80===t.expression.kind&&e.collectLinkedAliases(t.expression,!0):UF(t)?e.collectLinkedAliases(t.propertyName||t.name,!0):sO(t,b)}function x(e,n,r,i,o){const a=r.transformed[0],s=309===a.kind?a:void 0,c=308===a.kind?a:void 0,u=s?s.sourceFiles:[c];let d,m;if(function(e,t){return(e.sourceMap||e.inlineSourceMap)&&(308!==t.kind||!Eo(t.fileName,".json"))}(o,a)&&(d=jJ(t,jo(zo(e)),function(e){const t=zo(e.sourceRoot||"");return t?Yo(t):t}(o),function(e,n,r){if(e.sourceRoot)return t.getCommonSourceDirectory();if(e.mapRoot){let n=zo(e.mapRoot);return r&&(n=Lo(iv(r.fileName,t,n))),0===Oo(n)&&(n=Uo(t.getCommonSourceDirectory(),n)),n}return Lo(Ko(n))}(o,e,c),o)),s?i.writeBundle(s,g,d):i.writeFile(c,g,d),d){_&&_.push({inputSourceFileNames:d.getSources(),sourceMap:d.toJSON()});const r=function(e,n,r,i,o){if(e.inlineSourceMap){const e=n.toString();return`data:application/json;base64,${Pb(mo,e)}`}const a=jo(zo(gn.checkDefined(i)));if(e.mapRoot){let n=zo(e.mapRoot);return o&&(n=Lo(iv(o.fileName,t,n))),0===Oo(n)?(n=Uo(t.getCommonSourceDirectory(),n),encodeURI(pa(Lo(Ko(r)),Uo(n,a),t.getCurrentDirectory(),t.getCanonicalFileName,!0))):encodeURI(Uo(n,a))}return encodeURI(a)}(o,d,e,n,c);if(r&&(g.isAtStartOfLine()||g.rawWrite(f),m=g.getTextPos(),g.writeComment(`//# sourceMappingURL=${r}`)),n){const e=d.toString();av(t,p,n,e,!1,u)}}else g.writeLine();const h=g.getText(),y={sourceMapUrlPos:m,diagnostics:r.diagnostics};return av(t,p,e,h,!!l.emitBOM,u,y),g.clear(),!y.skippedDtsWrite}}function EU(e){return JSON.stringify(e)}function FU(e,t){return Ib(e,t)}var PU={hasGlobalName:gt,getReferencedExportContainer:gt,getReferencedImportDeclaration:gt,getReferencedDeclarationWithCollidingName:gt,isDeclarationWithCollidingName:gt,isValueAliasDeclaration:gt,isReferencedAliasDeclaration:gt,isTopLevelValueImportEqualsWithEntityName:gt,hasNodeCheckFlag:gt,isDeclarationVisible:gt,isLateBound:e=>!1,collectLinkedAliases:gt,markLinkedReferences:gt,isImplementationOfOverload:gt,requiresAddingImplicitUndefined:gt,isExpandoFunctionDeclaration:gt,getPropertiesOfContainerFunction:gt,createTypeOfDeclaration:gt,createReturnTypeOfSignatureDeclaration:gt,createTypeOfExpression:gt,createLiteralConstValue:gt,isSymbolAccessible:gt,isEntityNameVisible:gt,getConstantValue:gt,getEnumMemberValue:gt,getReferencedValueDeclaration:gt,getReferencedValueDeclarations:gt,getTypeReferenceSerializationKind:gt,isOptionalParameter:gt,isArgumentsLocalBinding:gt,getExternalModuleFileFromDeclaration:gt,isLiteralConstDeclaration:gt,getJsxFactoryEntity:gt,getJsxFragmentFactoryEntity:gt,isBindingCapturedByNode:gt,getDeclarationStatementsForSourceFile:gt,isImportRequiredByAugmentation:gt,isDefinitelyReferenceToGlobalSymbolObject:gt,createLateBoundIndexSignatures:gt,symbolToDeclarations:gt},AU=ht(()=>jU({})),IU=ht(()=>jU({removeComments:!0})),OU=ht(()=>jU({removeComments:!0,neverAsciiEscape:!0})),LU=ht(()=>jU({removeComments:!0,omitTrailingSemicolon:!0}));function jU(e={},t={}){var n,r,i,o,a,s,c,l,_,u,d,p,f,m,h,y,v,b,x,S,T,C,N,D,E,F,{hasGlobalName:P,onEmitNode:A=rU,isEmitNotificationEnabled:I,substituteNode:O=nU,onBeforeEmitNode:L,onAfterEmitNode:j,onBeforeEmitNodeArray:M,onAfterEmitNodeArray:R,onBeforeEmitToken:B,onAfterEmitToken:J}=t,z=!!e.extendedDiagnostics,q=!!e.omitBraceSourceMapPositions,U=Bb(e),V=NS(e),W=new Map,$=e.preserveSourceNewlines,K=function(e){v.write(e)},H=!0,G=-1,Q=-1,Y=-1,Z=-1,ee=-1,te=!1,ne=!!e.removeComments,{enter:re,exit:ie}=Xn(z,"commentTime","beforeComment","afterComment"),oe=kw.parenthesizer,ae={select:e=>0===e?oe.parenthesizeLeadingTypeArgument:void 0},se=function(){return yI(function(e,t){if(t){t.stackIndex++,t.preserveSourceNewlinesStack[t.stackIndex]=$,t.containerPosStack[t.stackIndex]=Y,t.containerEndStack[t.stackIndex]=Z,t.declarationListContainerEndStack[t.stackIndex]=ee;const n=t.shouldEmitCommentsStack[t.stackIndex]=Ie(e),r=t.shouldEmitSourceMapsStack[t.stackIndex]=Oe(e);null==L||L(e),n&&Gn(e),r&&yr(e),Fe(e)}else t={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return t},function(t,n,r){return e(t,r,"left")},function(e,t,n){const r=28!==e.kind,i=Cn(n,n.left,e),o=Cn(n,e,n.right);mn(i,r),cr(e.pos),un(e,103===e.kind?Zt:en),_r(e.end,!0),mn(o,!0)},function(t,n,r){return e(t,r,"right")},function(e,t){const n=Cn(e,e.left,e.operatorToken),r=Cn(e,e.operatorToken,e.right);if(hn(n,r),t.stackIndex>0){const n=t.preserveSourceNewlinesStack[t.stackIndex],r=t.containerPosStack[t.stackIndex],i=t.containerEndStack[t.stackIndex],o=t.declarationListContainerEndStack[t.stackIndex],a=t.shouldEmitCommentsStack[t.stackIndex],s=t.shouldEmitSourceMapsStack[t.stackIndex];Pe(n),s&&vr(e),a&&Qn(e,r,i,o),null==j||j(e),t.stackIndex--}},void 0);function e(e,t,n){const r="left"===n?oe.getParenthesizeLeftSideOfBinaryForOperator(t.operatorToken.kind):oe.getParenthesizeRightSideOfBinaryForOperator(t.operatorToken.kind);let i=Le(0,1,e);if(i===Je&&(gn.assertIsDefined(E),i=je(1,1,e=r(st(E,Q_))),E=void 0),(i===Hn||i===hr||i===Re)&&LE(e))return e;F=r,i(1,e)}}();return xe(),{printNode:function(e,t,n){switch(e){case 0:gn.assert(mP(t),"Expected a SourceFile node.");break;case 2:gn.assert(fD(t),"Expected an Identifier node.");break;case 1:gn.assert(Q_(t),"Expected an Expression node.")}switch(t.kind){case 308:return le(t);case 309:return ce(t)}return _e(e,t,n,fe()),ge()},printList:function(e,t,n){return ue(e,t,n,fe()),ge()},printFile:le,printBundle:ce,writeNode:_e,writeList:ue,writeFile:pe,writeBundle:de};function ce(e){return de(e,fe(),void 0),ge()}function le(e){return pe(e,fe(),void 0),ge()}function _e(e,t,n,r){const i=v;be(r,void 0),he(e,t,n),xe(),v=i}function ue(e,t,n,r){const i=v;be(r,void 0),n&&ye(n),Wt(void 0,t,e),xe(),v=i}function de(e,t,n){x=!1;const r=v;var i;be(t,n),Pt(e),Ft(e),ze(e),Nt(!!(i=e).hasNoDefaultLib,i.syntheticFileReferences||[],i.syntheticTypeReferences||[],i.syntheticLibReferences||[]);for(const t of e.sourceFiles)he(0,t,t);xe(),v=r}function pe(e,t,n){x=!0;const r=v;be(t,n),Pt(e),Ft(e),he(0,e,e),xe(),v=r}function fe(){return b||(b=zy(U))}function ge(){const e=b.getText();return b.clear(),e}function he(e,t,n){n&&ye(n),Ae(e,t,void 0)}function ye(e){n=e,N=void 0,D=void 0,e&&kr(e)}function be(t,n){t&&e.omitTrailingSemicolon&&(t=qy(t)),S=n,H=!(v=t)||!S}function xe(){r=[],i=[],o=[],a=new Set,s=[],c=new Map,l=[],_=0,u=[],d=0,p=[],f=void 0,m=[],h=void 0,n=void 0,N=void 0,D=void 0,be(void 0,void 0)}function Se(){return N||(N=Va(gn.checkDefined(n)))}function we(e,t){void 0!==e&&Ae(4,e,t)}function Ne(e){void 0!==e&&Ae(2,e,void 0)}function De(e,t){void 0!==e&&Ae(1,e,t)}function Ee(e){Ae(QN(e)?6:4,e)}function Fe(e){$&&4&sp(e)&&($=!1)}function Pe(e){$=e}function Ae(e,t,n){F=n;Le(0,e,t)(e,t),F=void 0}function Ie(e){return!ne&&!mP(e)}function Oe(e){return!H&&!mP(e)&&!Rm(e)}function Le(e,t,n){switch(e){case 0:if(A!==rU&&(!I||I(n)))return Me;case 1:if(O!==nU&&(E=O(t,n)||n)!==n)return F&&(E=F(E)),Je;case 2:if(Ie(n))return Hn;case 3:if(Oe(n))return hr;case 4:return Re;default:return gn.assertNever(e)}}function je(e,t,n){return Le(e+1,t,n)}function Me(e,t){const n=je(0,e,t);A(e,t,n)}function Re(e,t){if(null==L||L(t),$){const n=$;Fe(t),Be(e,t),Pe(n)}else Be(e,t);null==j||j(t),F=void 0}function Be(e,t,r=!0){if(r){const n=tN(t);if(n)return function(e,t,n){switch(n.kind){case 1:!function(e,t,n){an(`\${${n.order}:`),Be(e,t,!1),an("}")}(e,t,n);break;case 0:!function(e,t,n){gn.assert(243===t.kind,`A tab stop cannot be attached to a node of kind ${gn.formatSyntaxKind(t.kind)}.`),gn.assert(5!==e,"A tab stop cannot be attached to an embedded statement."),an(`$${n.order}`)}(e,t,n)}}(e,t,n)}if(0===e)return wt(st(t,mP));if(2===e)return Ve(st(t,fD));if(6===e)return Ue(st(t,QN),!0);if(3===e)return function(e){we(e.name),rn(),Zt("in"),rn(),we(e.constraint)}(st(t,PD));if(7===e)return function(e){Qt("{"),rn(),Zt(132===e.token?"assert":"with"),Qt(":"),rn();const t=e.elements;Wt(e,t,526226),rn(),Qt("}")}(st(t,OF));if(5===e)return gn.assertNode(t,eF),Ye(!0);if(4===e){switch(t.kind){case 16:case 17:case 18:return Ue(t,!1);case 80:return Ve(t);case 81:return We(t);case 167:return function(e){(function(e){80===e.kind?De(e):we(e)})(e.left),Qt("."),we(e.right)}(t);case 168:return function(e){Qt("["),De(e.expression,oe.parenthesizeExpressionOfComputedPropertyName),Qt("]")}(t);case 169:return function(e){Ot(e,e.modifiers),we(e.name),e.constraint&&(rn(),Zt("extends"),rn(),we(e.constraint));e.default&&(rn(),en("="),rn(),we(e.default))}(t);case 170:return function(e){It(e,e.modifiers,!0),we(e.dotDotDotToken),At(e.name,tn),we(e.questionToken),e.parent&&318===e.parent.kind&&!e.name?we(e.type):Lt(e.type);jt(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name?e.name.end:e.modifiers?e.modifiers.end:e.pos,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 171:return o=t,Qt("@"),void De(o.expression,oe.parenthesizeLeftSideOfAccess);case 172:return function(e){Ot(e,e.modifiers),At(e.name,on),we(e.questionToken),Lt(e.type),Yt()}(t);case 173:return function(e){It(e,e.modifiers,!0),we(e.name),we(e.questionToken),we(e.exclamationToken),Lt(e.type),jt(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name.end,e),Yt()}(t);case 174:return function(e){Ot(e,e.modifiers),we(e.name),we(e.questionToken),lt(e,dt,ut)}(t);case 175:return function(e){It(e,e.modifiers,!0),we(e.asteriskToken),we(e.name),we(e.questionToken),lt(e,dt,_t)}(t);case 176:return function(e){Zt("static"),Fn(e),pt(e.body),Pn(e)}(t);case 177:return function(e){It(e,e.modifiers,!1),Zt("constructor"),lt(e,dt,_t)}(t);case 178:case 179:return function(e){const t=It(e,e.modifiers,!0),n=178===e.kind?139:153;tt(n,t,Zt,e),rn(),we(e.name),lt(e,dt,_t)}(t);case 180:return function(e){lt(e,dt,ut)}(t);case 181:return function(e){Zt("new"),rn(),lt(e,dt,ut)}(t);case 182:return function(e){It(e,e.modifiers,!1),t=e,n=e.parameters,Wt(t,n,8848),Lt(e.type),Yt();var t,n}(t);case 183:return function(e){e.assertsModifier&&(we(e.assertsModifier),rn());we(e.parameterName),e.type&&(rn(),Zt("is"),rn(),we(e.type))}(t);case 184:return function(e){we(e.typeName),Jt(e,e.typeArguments)}(t);case 185:return function(e){lt(e,$e,Ke)}(t);case 186:return function(e){Ot(e,e.modifiers),Zt("new"),rn(),lt(e,$e,Ke)}(t);case 187:return function(e){Zt("typeof"),rn(),we(e.exprName),Jt(e,e.typeArguments)}(t);case 188:return function(e){Fn(e),g(e.members,Ln),Qt("{");const t=1&ap(e)?768:32897;Wt(e,e.members,524288|t),Qt("}"),Pn(e)}(t);case 189:return function(e){we(e.elementType,oe.parenthesizeNonArrayTypeOfPostfixType),Qt("["),Qt("]")}(t);case 190:return function(e){tt(23,e.pos,Qt,e);const t=1&ap(e)?528:657;Wt(e,e.elements,524288|t,oe.parenthesizeElementTypeOfTupleType),tt(24,e.elements.end,Qt,e)}(t);case 191:return function(e){we(e.type,oe.parenthesizeTypeOfOptionalType),Qt("?")}(t);case 193:return function(e){Wt(e,e.types,516,oe.parenthesizeConstituentTypeOfUnionType)}(t);case 194:return function(e){Wt(e,e.types,520,oe.parenthesizeConstituentTypeOfIntersectionType)}(t);case 195:return function(e){we(e.checkType,oe.parenthesizeCheckTypeOfConditionalType),rn(),Zt("extends"),rn(),we(e.extendsType,oe.parenthesizeExtendsTypeOfConditionalType),rn(),Qt("?"),rn(),we(e.trueType),rn(),Qt(":"),rn(),we(e.falseType)}(t);case 196:return function(e){Zt("infer"),rn(),we(e.typeParameter)}(t);case 197:return function(e){Qt("("),we(e.type),Qt(")")}(t);case 234:return Xe(t);case 198:return void Zt("this");case 199:return function(e){dn(e.operator,Zt),rn();const t=148===e.operator?oe.parenthesizeOperandOfReadonlyTypeOperator:oe.parenthesizeOperandOfTypeOperator;we(e.type,t)}(t);case 200:return function(e){we(e.objectType,oe.parenthesizeNonArrayTypeOfPostfixType),Qt("["),we(e.indexType),Qt("]")}(t);case 201:return function(e){const t=ap(e);Qt("{"),1&t?rn():(sn(),cn());e.readonlyToken&&(we(e.readonlyToken),148!==e.readonlyToken.kind&&Zt("readonly"),rn());Qt("["),Ae(3,e.typeParameter),e.nameType&&(rn(),Zt("as"),rn(),we(e.nameType));Qt("]"),e.questionToken&&(we(e.questionToken),58!==e.questionToken.kind&&Qt("?"));Qt(":"),rn(),we(e.type),Yt(),1&t?rn():(sn(),ln());Wt(e,e.members,2),Qt("}")}(t);case 202:return function(e){De(e.literal)}(t);case 203:return function(e){we(e.dotDotDotToken),we(e.name),we(e.questionToken),tt(59,e.name.end,Qt,e),rn(),we(e.type)}(t);case 204:return function(e){we(e.head),Wt(e,e.templateSpans,262144)}(t);case 205:return function(e){we(e.type),we(e.literal)}(t);case 206:return function(e){e.isTypeOf&&(Zt("typeof"),rn());Zt("import"),Qt("("),we(e.argument),e.attributes&&(Qt(","),rn(),Ae(7,e.attributes));Qt(")"),e.qualifier&&(Qt("."),we(e.qualifier));Jt(e,e.typeArguments)}(t);case 207:return function(e){Qt("{"),Wt(e,e.elements,525136),Qt("}")}(t);case 208:return function(e){Qt("["),Wt(e,e.elements,524880),Qt("]")}(t);case 209:return function(e){we(e.dotDotDotToken),e.propertyName&&(we(e.propertyName),Qt(":"),rn());we(e.name),jt(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 240:return function(e){De(e.expression),we(e.literal)}(t);case 241:return void Yt();case 242:return function(e){Qe(e,!e.multiLine&&wn(e))}(t);case 244:return function(e){It(e,e.modifiers,!1),we(e.declarationList),Yt()}(t);case 243:return Ye(!1);case 245:return function(e){De(e.expression,oe.parenthesizeExpressionOfExpressionStatement),n&&cf(n)&&!sy(e.expression)||Yt()}(t);case 246:return function(e){const t=tt(101,e.pos,Zt,e);rn(),tt(21,t,Qt,e),De(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.thenStatement),e.elseStatement&&(pn(e,e.thenStatement,e.elseStatement),tt(93,e.thenStatement.end,Zt,e),246===e.elseStatement.kind?(rn(),we(e.elseStatement)):Bt(e,e.elseStatement))}(t);case 247:return function(e){tt(92,e.pos,Zt,e),Bt(e,e.statement),YE(e.statement)&&!$?rn():pn(e,e.statement,e.expression);Ze(e,e.statement.end),Yt()}(t);case 248:return function(e){Ze(e,e.pos),Bt(e,e.statement)}(t);case 249:return function(e){const t=tt(99,e.pos,Zt,e);rn();let n=tt(21,t,Qt,e);et(e.initializer),n=tt(27,e.initializer?e.initializer.end:n,Qt,e),Rt(e.condition),n=tt(27,e.condition?e.condition.end:n,Qt,e),Rt(e.incrementor),tt(22,e.incrementor?e.incrementor.end:n,Qt,e),Bt(e,e.statement)}(t);case 250:return function(e){const t=tt(99,e.pos,Zt,e);rn(),tt(21,t,Qt,e),et(e.initializer),rn(),tt(103,e.initializer.end,Zt,e),rn(),De(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.statement)}(t);case 251:return function(e){const t=tt(99,e.pos,Zt,e);rn(),function(e){e&&(we(e),rn())}(e.awaitModifier),tt(21,t,Qt,e),et(e.initializer),rn(),tt(165,e.initializer.end,Zt,e),rn(),De(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.statement)}(t);case 252:return function(e){tt(88,e.pos,Zt,e),Mt(e.label),Yt()}(t);case 253:return function(e){tt(83,e.pos,Zt,e),Mt(e.label),Yt()}(t);case 254:return function(e){tt(107,e.pos,Zt,e),Rt(e.expression&&it(e.expression),it),Yt()}(t);case 255:return function(e){const t=tt(118,e.pos,Zt,e);rn(),tt(21,t,Qt,e),De(e.expression),tt(22,e.expression.end,Qt,e),Bt(e,e.statement)}(t);case 256:return function(e){const t=tt(109,e.pos,Zt,e);rn(),tt(21,t,Qt,e),De(e.expression),tt(22,e.expression.end,Qt,e),rn(),we(e.caseBlock)}(t);case 257:return function(e){we(e.label),tt(59,e.label.end,Qt,e),rn(),we(e.statement)}(t);case 258:return function(e){tt(111,e.pos,Zt,e),Rt(it(e.expression),it),Yt()}(t);case 259:return function(e){tt(113,e.pos,Zt,e),rn(),we(e.tryBlock),e.catchClause&&(pn(e,e.tryBlock,e.catchClause),we(e.catchClause));e.finallyBlock&&(pn(e,e.catchClause||e.tryBlock,e.finallyBlock),tt(98,(e.catchClause||e.tryBlock).end,Zt,e),rn(),we(e.finallyBlock))}(t);case 260:return function(e){_n(89,e.pos,Zt),Yt()}(t);case 261:return function(e){var t,n,r;we(e.name),we(e.exclamationToken),Lt(e.type),jt(e.initializer,(null==(t=e.type)?void 0:t.end)??(null==(r=null==(n=e.name.emitNode)?void 0:n.typeNode)?void 0:r.end)??e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 262:return function(e){if(uf(e))Zt("await"),rn(),Zt("using");else{Zt(mf(e)?"let":pf(e)?"const":df(e)?"using":"var")}rn(),Wt(e,e.declarations,528)}(t);case 263:return function(e){ct(e)}(t);case 264:return function(e){gt(e)}(t);case 265:return function(e){It(e,e.modifiers,!1),Zt("interface"),rn(),we(e.name),zt(e,e.typeParameters),Wt(e,e.heritageClauses,512),rn(),Qt("{"),Fn(e),g(e.members,Ln),Wt(e,e.members,129),Pn(e),Qt("}")}(t);case 266:return function(e){It(e,e.modifiers,!1),Zt("type"),rn(),we(e.name),zt(e,e.typeParameters),rn(),Qt("="),rn(),we(e.type),Yt()}(t);case 267:return function(e){It(e,e.modifiers,!1),Zt("enum"),rn(),we(e.name),rn(),Qt("{"),Wt(e,e.members,145),Qt("}")}(t);case 268:return function(e){It(e,e.modifiers,!1),2048&~e.flags&&(Zt(32&e.flags?"namespace":"module"),rn());we(e.name);let t=e.body;if(!t)return Yt();for(;t&&TF(t);)Qt("."),we(t.name),t=t.body;rn(),we(t)}(t);case 269:return function(e){Fn(e),g(e.statements,On),Qe(e,wn(e)),Pn(e)}(t);case 270:return function(e){tt(19,e.pos,Qt,e),Wt(e,e.clauses,129),tt(20,e.clauses.end,Qt,e,!0)}(t);case 271:return function(e){let t=tt(95,e.pos,Zt,e);rn(),t=tt(130,t,Zt,e),rn(),t=tt(145,t,Zt,e),rn(),we(e.name),Yt()}(t);case 272:return function(e){It(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Zt,e),rn(),e.isTypeOnly&&(tt(156,e.pos,Zt,e),rn());we(e.name),rn(),tt(64,e.name.end,Qt,e),rn(),function(e){80===e.kind?De(e):we(e)}(e.moduleReference),Yt()}(t);case 273:return function(e){It(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Zt,e),rn(),e.importClause&&(we(e.importClause),rn(),tt(161,e.importClause.end,Zt,e),rn());De(e.moduleSpecifier),e.attributes&&Mt(e.attributes);Yt()}(t);case 274:return function(e){void 0!==e.phaseModifier&&(tt(e.phaseModifier,e.pos,Zt,e),rn());we(e.name),e.name&&e.namedBindings&&(tt(28,e.name.end,Qt,e),rn());we(e.namedBindings)}(t);case 275:return function(e){const t=tt(42,e.pos,Qt,e);rn(),tt(130,t,Zt,e),rn(),we(e.name)}(t);case 281:return function(e){const t=tt(42,e.pos,Qt,e);rn(),tt(130,t,Zt,e),rn(),we(e.name)}(t);case 276:case 280:return function(e){ht(e)}(t);case 277:case 282:return function(e){yt(e)}(t);case 278:return function(e){const t=tt(95,e.pos,Zt,e);rn(),e.isExportEquals?tt(64,t,en,e):tt(90,t,Zt,e);rn(),De(e.expression,e.isExportEquals?oe.getParenthesizeRightSideOfBinaryForOperator(64):oe.parenthesizeExpressionOfExportDefault),Yt()}(t);case 279:return function(e){It(e,e.modifiers,!1);let t=tt(95,e.pos,Zt,e);rn(),e.isTypeOnly&&(t=tt(156,t,Zt,e),rn());e.exportClause?we(e.exportClause):t=tt(42,t,Qt,e);if(e.moduleSpecifier){rn();tt(161,e.exportClause?e.exportClause.end:t,Zt,e),rn(),De(e.moduleSpecifier)}e.attributes&&Mt(e.attributes);Yt()}(t);case 301:return function(e){tt(e.token,e.pos,Zt,e),rn();const t=e.elements;Wt(e,t,526226)}(t);case 302:return function(e){we(e.name),Qt(":"),rn();const t=e.value;if(!(1024&ap(t))){_r(Bw(t).pos)}we(t)}(t);case 283:case 320:case 331:case 332:case 334:case 335:case 336:case 337:case 354:case 355:return;case 284:return function(e){Zt("require"),Qt("("),De(e.expression),Qt(")")}(t);case 12:return function(e){v.writeLiteral(e.text)}(t);case 287:case 290:return function(e){if(Qt("<"),QF(e)){const t=Sn(e.tagName,e);vt(e.tagName),Jt(e,e.typeArguments),e.attributes.properties&&e.attributes.properties.length>0&&rn(),we(e.attributes),kn(e.attributes,e),hn(t)}Qt(">")}(t);case 288:case 291:return function(e){Qt("")}(t);case 292:return function(e){we(e.name),function(e,t,n,r){n&&(t(e),r(n))}("=",Qt,e.initializer,Ee)}(t);case 293:return function(e){Wt(e,e.properties,262656)}(t);case 294:return function(e){Qt("{..."),De(e.expression),Qt("}")}(t);case 295:return function(e){var t;if(e.expression||!ne&&!sy(e)&&(r=e.pos,function(e){let t=!1;return ps((null==n?void 0:n.text)||"",e+1,()=>t=!0),t}(r)||function(e){let t=!1;return ds((null==n?void 0:n.text)||"",e+1,()=>t=!0),t}(r))){const r=n&&!sy(e)&&Ha(n,e.pos).line!==Ha(n,e.end).line;r&&v.increaseIndent();const i=tt(19,e.pos,Qt,e);we(e.dotDotDotToken),De(e.expression),tt(20,(null==(t=e.expression)?void 0:t.end)||i,Qt,e),r&&v.decreaseIndent()}var r}(t);case 296:return function(e){Ne(e.namespace),Qt(":"),Ne(e.name)}(t);case 297:return function(e){tt(84,e.pos,Zt,e),rn(),De(e.expression,oe.parenthesizeExpressionForDisallowedComma),bt(e,e.statements,e.expression.end)}(t);case 298:return function(e){const t=tt(90,e.pos,Zt,e);bt(e,e.statements,t)}(t);case 299:return function(e){rn(),dn(e.token,Zt),rn(),Wt(e,e.types,528)}(t);case 300:return function(e){const t=tt(85,e.pos,Zt,e);rn(),e.variableDeclaration&&(tt(21,t,Qt,e),we(e.variableDeclaration),tt(22,e.variableDeclaration.end,Qt,e),rn());we(e.block)}(t);case 304:return function(e){we(e.name),Qt(":"),rn();const t=e.initializer;if(!(1024&ap(t))){_r(Bw(t).pos)}De(t,oe.parenthesizeExpressionForDisallowedComma)}(t);case 305:return function(e){we(e.name),e.objectAssignmentInitializer&&(rn(),Qt("="),rn(),De(e.objectAssignmentInitializer,oe.parenthesizeExpressionForDisallowedComma))}(t);case 306:return function(e){e.expression&&(tt(26,e.pos,Qt,e),De(e.expression,oe.parenthesizeExpressionForDisallowedComma))}(t);case 307:return function(e){we(e.name),jt(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 308:return wt(t);case 309:return gn.fail("Bundles should be printed using printBundle");case 310:return Ct(t);case 311:return function(e){rn(),Qt("{"),we(e.name),Qt("}")}(t);case 313:return Qt("*");case 314:return Qt("?");case 315:return function(e){Qt("?"),we(e.type)}(t);case 316:return function(e){Qt("!"),we(e.type)}(t);case 317:return function(e){we(e.type),Qt("=")}(t);case 318:return function(e){Zt("function"),qt(e,e.parameters),Qt(":"),we(e.type)}(t);case 192:case 319:return function(e){Qt("..."),we(e.type)}(t);case 321:return function(e){if(K("/**"),e.comment){const t=gl(e.comment);if(t){const e=t.split(/\r\n?|\n/);for(const t of e)sn(),rn(),Qt("*"),rn(),K(t)}}e.tags&&(1!==e.tags.length||345!==e.tags[0].kind||e.comment?Wt(e,e.tags,33):(rn(),we(e.tags[0])));rn(),K("*/")}(t);case 323:return xt(t);case 324:return St(t);case 328:case 333:case 338:return kt((i=t).tagName),void Tt(i.comment);case 329:case 330:return function(e){kt(e.tagName),rn(),Qt("{"),we(e.class),Qt("}"),Tt(e.comment)}(t);case 339:return function(e){kt(e.tagName),e.name&&(rn(),we(e.name));Tt(e.comment),St(e.typeExpression)}(t);case 340:return function(e){Tt(e.comment),St(e.typeExpression)}(t);case 342:case 349:return function(e){kt(e.tagName),Ct(e.typeExpression),rn(),e.isBracketed&&Qt("[");we(e.name),e.isBracketed&&Qt("]");Tt(e.comment)}(t);case 341:case 343:case 344:case 345:case 350:case 351:return function(e){kt(e.tagName),Ct(e.typeExpression),Tt(e.comment)}(t);case 346:return function(e){kt(e.tagName),Ct(e.constraint),rn(),Wt(e,e.typeParameters,528),Tt(e.comment)}(t);case 347:return function(e){kt(e.tagName),e.typeExpression&&(310===e.typeExpression.kind?Ct(e.typeExpression):(rn(),Qt("{"),K("Object"),e.typeExpression.isArrayType&&(Qt("["),Qt("]")),Qt("}")));e.fullName&&(rn(),we(e.fullName));Tt(e.comment),e.typeExpression&&323===e.typeExpression.kind&&xt(e.typeExpression)}(t);case 348:return function(e){kt(e.tagName),we(e.name),Tt(e.comment)}(t);case 352:return function(e){kt(e.tagName),rn(),e.importClause&&(we(e.importClause),rn(),tt(161,e.importClause.end,Zt,e),rn());De(e.moduleSpecifier),e.attributes&&Mt(e.attributes);Tt(e.comment)}(t)}if(Q_(t)&&(e=1,O!==nU)){const n=O(e,t)||t;n!==t&&(t=n,F&&(t=F(t)))}}var i,o;if(1===e)switch(t.kind){case 9:case 10:return function(e){Ue(e,!1)}(t);case 11:case 14:case 15:return Ue(t,!1);case 80:return Ve(t);case 81:return We(t);case 210:return function(e){const t=e.elements,n=e.multiLine?65536:0;$t(e,t,8914|n,oe.parenthesizeExpressionForDisallowedComma)}(t);case 211:return function(e){Fn(e),g(e.properties,Ln);const t=131072&ap(e);t&&cn();const r=e.multiLine?65536:0,i=n&&n.languageVersion>=1&&!cf(n)?64:0;Wt(e,e.properties,526226|i|r),t&&ln();Pn(e)}(t);case 212:return function(e){De(e.expression,oe.parenthesizeLeftSideOfAccess);const t=e.questionDotToken||IT(kw.createToken(25),e.expression.end,e.name.pos),n=Cn(e,e.expression,t),r=Cn(e,t,e.name);mn(n,!1);const i=29!==t.kind&&function(e){if(GN(e=Fl(e))){const t=En(e,void 0,!0,!1);return!(448&e.numericLiteralFlags||t.includes(ja(25))||t.includes(String.fromCharCode(69))||t.includes(String.fromCharCode(101)))}if(Px(e)){const t=Hw(e);return"number"==typeof t&&isFinite(t)&&t>=0&&Math.floor(t)===t}}(e.expression)&&!v.hasTrailingComment()&&!v.hasTrailingWhitespace();i&&Qt(".");e.questionDotToken?we(t):tt(t.kind,e.expression.end,Qt,e);mn(r,!1),we(e.name),hn(n,r)}(t);case 213:return function(e){De(e.expression,oe.parenthesizeLeftSideOfAccess),we(e.questionDotToken),tt(23,e.expression.end,Qt,e),De(e.argumentExpression),tt(24,e.argumentExpression.end,Qt,e)}(t);case 214:return function(e){const t=16&sp(e);t&&(Qt("("),Gt("0"),Qt(","),rn());De(e.expression,oe.parenthesizeLeftSideOfAccess),t&&Qt(")");we(e.questionDotToken),Jt(e,e.typeArguments),$t(e,e.arguments,2576,oe.parenthesizeExpressionForDisallowedComma)}(t);case 215:return function(e){tt(105,e.pos,Zt,e),rn(),De(e.expression,oe.parenthesizeExpressionOfNew),Jt(e,e.typeArguments),$t(e,e.arguments,18960,oe.parenthesizeExpressionForDisallowedComma)}(t);case 216:return function(e){const t=16&sp(e);t&&(Qt("("),Gt("0"),Qt(","),rn());De(e.tag,oe.parenthesizeLeftSideOfAccess),t&&Qt(")");Jt(e,e.typeArguments),rn(),De(e.template)}(t);case 217:return function(e){Qt("<"),we(e.type),Qt(">"),De(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 218:return function(e){const t=tt(21,e.pos,Qt,e),n=Sn(e.expression,e);De(e.expression,void 0),kn(e.expression,e),hn(n),tt(22,e.expression?e.expression.end:t,Qt,e)}(t);case 219:return function(e){jn(e.name),ct(e)}(t);case 220:return function(e){Ot(e,e.modifiers),lt(e,He,Ge)}(t);case 221:return function(e){tt(91,e.pos,Zt,e),rn(),De(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 222:return function(e){tt(114,e.pos,Zt,e),rn(),De(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 223:return function(e){tt(116,e.pos,Zt,e),rn(),De(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 224:return function(e){tt(135,e.pos,Zt,e),rn(),De(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 225:return function(e){dn(e.operator,en),function(e){const t=e.operand;return 225===t.kind&&(40===e.operator&&(40===t.operator||46===t.operator)||41===e.operator&&(41===t.operator||47===t.operator))}(e)&&rn();De(e.operand,oe.parenthesizeOperandOfPrefixUnary)}(t);case 226:return function(e){De(e.operand,oe.parenthesizeOperandOfPostfixUnary),dn(e.operator,en)}(t);case 227:return se(t);case 228:return function(e){const t=Cn(e,e.condition,e.questionToken),n=Cn(e,e.questionToken,e.whenTrue),r=Cn(e,e.whenTrue,e.colonToken),i=Cn(e,e.colonToken,e.whenFalse);De(e.condition,oe.parenthesizeConditionOfConditionalExpression),mn(t,!0),we(e.questionToken),mn(n,!0),De(e.whenTrue,oe.parenthesizeBranchOfConditionalExpression),hn(t,n),mn(r,!0),we(e.colonToken),mn(i,!0),De(e.whenFalse,oe.parenthesizeBranchOfConditionalExpression),hn(r,i)}(t);case 229:return function(e){we(e.head),Wt(e,e.templateSpans,262144)}(t);case 230:return function(e){tt(127,e.pos,Zt,e),we(e.asteriskToken),Rt(e.expression&&it(e.expression),ot)}(t);case 231:return function(e){tt(26,e.pos,Qt,e),De(e.expression,oe.parenthesizeExpressionForDisallowedComma)}(t);case 232:return function(e){jn(e.name),gt(e)}(t);case 233:case 283:case 354:return;case 235:return function(e){De(e.expression,void 0),e.type&&(rn(),Zt("as"),rn(),we(e.type))}(t);case 236:return function(e){De(e.expression,oe.parenthesizeLeftSideOfAccess),en("!")}(t);case 234:return Xe(t);case 239:return function(e){De(e.expression,void 0),e.type&&(rn(),Zt("satisfies"),rn(),we(e.type))}(t);case 237:return function(e){_n(e.keywordToken,e.pos,Qt),Qt("."),we(e.name)}(t);case 238:return gn.fail("SyntheticExpression should never be printed.");case 285:return function(e){we(e.openingElement),Wt(e,e.children,262144),we(e.closingElement)}(t);case 286:return function(e){Qt("<"),vt(e.tagName),Jt(e,e.typeArguments),rn(),we(e.attributes),Qt("/>")}(t);case 289:return function(e){we(e.openingFragment),Wt(e,e.children,262144),we(e.closingFragment)}(t);case 353:return gn.fail("SyntaxList should not be printed");case 356:return function(e){const t=ap(e);1024&t||e.pos===e.expression.pos||_r(e.expression.pos);De(e.expression),2048&t||e.end===e.expression.end||cr(e.expression.end)}(t);case 357:return function(e){$t(e,e.elements,528,void 0)}(t);case 358:return gn.fail("SyntheticReferenceExpression should not be printed")}return Ah(t.kind)?un(t,Zt):jl(t.kind)?un(t,Qt):void gn.fail(`Unhandled SyntaxKind: ${gn.formatSyntaxKind(t.kind)}.`)}function Je(e,t){const n=je(1,e,t);gn.assertIsDefined(E),t=E,E=void 0,n(e,t)}function ze(t){let r=!1;const i=309===t.kind?t:void 0;if(i&&0===V)return;const o=i?i.sourceFiles.length:1;for(let a=0;a")}function Ke(e){rn(),we(e.type)}function He(e){zt(e,e.typeParameters),Ut(e,e.parameters),Lt(e.type),rn(),we(e.equalsGreaterThanToken)}function Ge(e){YE(e.body)?pt(e.body):(rn(),De(e.body,oe.parenthesizeConciseBodyOfArrowFunction))}function Xe(e){De(e.expression,oe.parenthesizeLeftSideOfAccess),Jt(e,e.typeArguments)}function Qe(e,t){tt(19,e.pos,Qt,e);const n=t||1&ap(e)?768:129;Wt(e,e.statements,n),tt(20,e.statements.end,Qt,e,!!(1&n))}function Ye(e){e?Qt(";"):Yt()}function Ze(e,t){const n=tt(117,t,Zt,e);rn(),tt(21,n,Qt,e),De(e.expression),tt(22,e.expression.end,Qt,e)}function et(e){void 0!==e&&(262===e.kind?we(e):De(e))}function tt(e,t,r,i,o){const a=bc(i),s=a&&a.kind===i.kind,c=t;if(s&&n&&(t=is(n.text,t)),s&&i.pos!==c){const e=o&&n&&!ex(c,t,n);e&&cn(),cr(c),e&&ln()}if(t=q||19!==e&&20!==e?dn(e,r,t):_n(e,t,r,i),s&&i.end!==t){const e=295===i.kind;_r(t,!e,e)}return t}function nt(e){return 2===e.kind||!!e.hasTrailingNewLine}function rt(e){if(!n)return!1;const t=hs(n.text,e.pos);if(t){const t=bc(e);if(t&&wE(t.parent))return!0}return!!X(t,nt)||(!!X(zw(e),nt)||!!HE(e)&&(!(e.pos===e.expression.pos||!X(ys(n.text,e.expression.pos),nt))||rt(e.expression)))}function it(e){if(!ne)switch(e.kind){case 356:if(rt(e)){const t=bc(e);if(t&&wE(t)){const n=kw.createParenthesizedExpression(e.expression);return Cw(n,e),AI(n,t),n}return kw.createParenthesizedExpression(e)}return kw.updatePartiallyEmittedExpression(e,it(e.expression));case 212:return kw.updatePropertyAccessExpression(e,it(e.expression),e.name);case 213:return kw.updateElementAccessExpression(e,it(e.expression),e.argumentExpression);case 214:return kw.updateCallExpression(e,it(e.expression),e.typeArguments,e.arguments);case 216:return kw.updateTaggedTemplateExpression(e,it(e.tag),e.typeArguments,e.template);case 226:return kw.updatePostfixUnaryExpression(e,it(e.operand));case 227:return kw.updateBinaryExpression(e,it(e.left),e.operatorToken,e.right);case 228:return kw.updateConditionalExpression(e,it(e.condition),e.questionToken,e.whenTrue,e.colonToken,e.whenFalse);case 235:return kw.updateAsExpression(e,it(e.expression),e.type);case 239:return kw.updateSatisfiesExpression(e,it(e.expression),e.type);case 236:return kw.updateNonNullExpression(e,it(e.expression))}return e}function ot(e){return it(oe.parenthesizeExpressionForDisallowedComma(e))}function ct(e){It(e,e.modifiers,!1),Zt("function"),we(e.asteriskToken),rn(),Ne(e.name),lt(e,dt,_t)}function lt(e,t,n){const r=131072&ap(e);r&&cn(),Fn(e),g(e.parameters,On),t(e),n(e),Pn(e),r&&ln()}function _t(e){const t=e.body;t?pt(t):Yt()}function ut(e){Yt()}function dt(e){zt(e,e.typeParameters),qt(e,e.parameters),Lt(e.type)}function pt(e){On(e),null==L||L(e),rn(),Qt("{"),cn();const t=function(e){if(1&ap(e))return!0;if(e.multiLine)return!1;if(!sy(e)&&n&&!$b(e,n))return!1;if(yn(e,ve(e.statements),2)||bn(e,ke(e.statements),2,e.statements))return!1;let t;for(const n of e.statements){if(vn(t,n,2)>0)return!1;t=n}return!0}(e)?ft:mt;nr(e,e.statements,t),ln(),_n(20,e.statements.end,Qt,e),null==j||j(e)}function ft(e){mt(e,!0)}function mt(e,t){const n=Et(e.statements),r=v.getTextPos();ze(e),0===n&&r===v.getTextPos()&&t?(ln(),Wt(e,e.statements,768),cn()):Wt(e,e.statements,1,void 0,n)}function gt(e){It(e,e.modifiers,!0),tt(86,Vb(e).pos,Zt,e),e.name&&(rn(),Ne(e.name));const t=131072&ap(e);t&&cn(),zt(e,e.typeParameters),Wt(e,e.heritageClauses,0),rn(),Qt("{"),Fn(e),g(e.members,Ln),Wt(e,e.members,129),Pn(e),Qt("}"),t&&ln()}function ht(e){Qt("{"),Wt(e,e.elements,525136),Qt("}")}function yt(e){e.isTypeOnly&&(Zt("type"),rn()),e.propertyName&&(we(e.propertyName),rn(),tt(130,e.propertyName.end,Zt,e),rn()),we(e.name)}function vt(e){80===e.kind?De(e):we(e)}function bt(e,t,r){let i=163969;1===t.length&&(!n||sy(e)||sy(t[0])||Kb(e,t[0],n))?(_n(59,r,Qt,e),rn(),i&=-130):tt(59,r,Qt,e),Wt(e,t,i)}function xt(e){Wt(e,kw.createNodeArray(e.jsDocPropertyTags),33)}function St(e){e.typeParameters&&Wt(e,kw.createNodeArray(e.typeParameters),33),e.parameters&&Wt(e,kw.createNodeArray(e.parameters),33),e.type&&(sn(),rn(),Qt("*"),rn(),we(e.type))}function kt(e){Qt("@"),we(e)}function Tt(e){const t=gl(e);t&&(rn(),K(t))}function Ct(e){e&&(rn(),Qt("{"),we(e.type),Qt("}"))}function wt(e){sn();const t=e.statements;0===t.length||!bf(t[0])||sy(t[0])?nr(e,t,Dt):Dt(e)}function Nt(e,t,r,i){if(e&&(nn('/// '),sn()),n&&n.moduleName&&(nn(`/// `),sn()),n&&n.amdDependencies)for(const e of n.amdDependencies)e.name?nn(`/// `):nn(`/// `),sn();function o(e,t){for(const n of t){const t=n.resolutionMode?`resolution-mode="${99===n.resolutionMode?"import":"require"}" `:"",r=n.preserve?'preserve="true" ':"";nn(`/// `),sn()}}o("path",t),o("types",r),o("lib",i)}function Dt(e){const t=e.statements;Fn(e),g(e.statements,On),ze(e);const n=w(t,e=>!bf(e));!function(e){e.isDeclarationFile&&Nt(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(e),Wt(e,t,1,void 0,-1===n?t.length:n),Pn(e)}function Et(e,t,n){let r=!!t;for(let i=0;i=r.length||0===s;if(c&&32768&i)return null==M||M(r),void(null==R||R(r));15360&i&&(Qt(function(e){return aU[15360&e][0]}(i)),c&&r&&_r(r.pos,!0)),null==M||M(r),c?!(1&i)||$&&(!t||n&&$b(t,n))?256&i&&!(524288&i)&&rn():sn():Ht(e,t,r,i,o,a,s,r.hasTrailingComma,r),null==R||R(r),15360&i&&(c&&r&&cr(r.end),Qt(function(e){return aU[15360&e][1]}(i)))}function Ht(e,t,n,r,i,o,a,s,c){const l=!(262144&r);let _=l;const u=yn(t,n[o],r);u?(sn(u),_=!1):256&r&&rn(),128&r&&cn();const d=function(e,t){return 1===e.length?MU:"object"==typeof t?RU:BU}(e,i);let p,f=!1;for(let s=0;s0){if(131&r||(cn(),f=!0),_&&60&r&&!iT(a.pos)){_r(Bw(a).pos,!!(512&r),!0)}sn(e),_=!1}else p&&512&r&&rn()}if(_){_r(Bw(a).pos)}else _=l;y=a.pos,d(a,e,i,s),f&&(ln(),f=!1),p=a}const m=p?ap(p):0,g=ne||!!(2048&m),h=s&&64&r&&16&r;h&&(p&&!g?tt(28,p.end,Qt,p):Qt(",")),p&&(t?t.end:-1)!==p.end&&60&r&&!g&&cr(h&&(null==c?void 0:c.end)?c.end:p.end),128&r&&ln();const v=bn(t,n[o+a-1],r,c);v?sn(v):2097408&r&&rn()}function Gt(e){v.writeLiteral(e)}function Xt(e,t){v.writeSymbol(e,t)}function Qt(e){v.writePunctuation(e)}function Yt(){v.writeTrailingSemicolon(";")}function Zt(e){v.writeKeyword(e)}function en(e){v.writeOperator(e)}function tn(e){v.writeParameter(e)}function nn(e){v.writeComment(e)}function rn(){v.writeSpace(" ")}function on(e){v.writeProperty(e)}function an(e){v.nonEscapingWrite?v.nonEscapingWrite(e):v.write(e)}function sn(e=1){for(let t=0;t0)}function cn(){v.increaseIndent()}function ln(){v.decreaseIndent()}function _n(e,t,n,r){return H?dn(e,n,t):function(e,t,n,r,i){if(H||e&&Rm(e))return i(t,n,r);const o=e&&e.emitNode,a=o&&o.flags||0,s=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[t],c=s&&s.source||T;r=br(c,s?s.pos:r),!(256&a)&&r>=0&&Sr(c,r);r=i(t,n,r),s&&(r=s.end);!(512&a)&&r>=0&&Sr(c,r);return r}(r,e,n,t,dn)}function un(e,t){B&&B(e),t(ja(e.kind)),J&&J(e)}function dn(e,t,n){const r=ja(e);return t(r),n<0?n:n+r.length}function pn(e,t,n){if(1&ap(e))rn();else if($){const r=Cn(e,t,n);r?sn(r):rn()}else sn()}function fn(e){const t=e.split(/\r\n?|\n/),n=qu(t);for(const e of t){const t=n?e.slice(n):e;t.length&&(sn(),K(t))}}function mn(e,t){e?(cn(),sn(e)):t&&rn()}function hn(e,t){e&&ln(),t&&ln()}function yn(e,t,r){if(2&r||$){if(65536&r)return 1;if(void 0===t)return!e||n&&$b(e,n)?0:1;if(t.pos===y)return 0;if(12===t.kind)return 0;if(n&&e&&!iT(e.pos)&&!sy(t)&&(!t.parent||hc(t.parent)===hc(e)))return $?xn(r=>nx(t.pos,e.pos,n,r)):Kb(e,t,n)?0:1;if(Tn(t,r))return 1}return 1&r?1:0}function vn(e,t,r){if(2&r||$){if(void 0===e||void 0===t)return 0;if(12===t.kind)return 0;if(n&&!sy(e)&&!sy(t))return $&&function(e,t){if(t.pos-1&&r.indexOf(t)===i+1}(e,t)?xn(r=>Qb(e,t,n,r)):!$&&(o=t,(i=hc(i=e)).parent&&i.parent===hc(o).parent)?Xb(e,t,n)?0:1:65536&r?1:0;if(Tn(e,r)||Tn(t,r))return 1}else if(Mw(t))return 1;var i,o;return 1&r?1:0}function bn(e,t,r,i){if(2&r||$){if(65536&r)return 1;if(void 0===t)return!e||n&&$b(e,n)?0:1;if(n&&e&&!iT(e.pos)&&!sy(t)&&(!t.parent||t.parent===e)){if($){const r=i&&!iT(i.end)?i.end:t.end;return xn(t=>rx(r,e.end,n,t))}return Hb(e,t,n)?0:1}if(Tn(t,r))return 1}return 1&r&&!(131072&r)?1:0}function xn(e){gn.assert(!!$);const t=e(!0);return 0===t?e(!1):t}function Sn(e,t){const n=$&&yn(t,e,0);return n&&mn(n,!1),!!n}function kn(e,t){const n=$&&bn(t,e,0,void 0);n&&sn(n)}function Tn(e,t){if(sy(e)){const n=Mw(e);return void 0===n?!!(65536&t):n}return!!(65536&t)}function Cn(e,t,r){return 262144&ap(e)?0:(e=Nn(e),t=Nn(t),Mw(r=Nn(r))?1:!n||sy(e)||sy(t)||sy(r)?0:$?xn(e=>Qb(t,r,n,e)):Xb(t,r,n)?0:1)}function wn(e){return 0===e.statements.length&&(!n||Xb(e,e,n))}function Nn(e){for(;218===e.kind&&sy(e);)e=e.expression;return e}function Dn(e,t){if(Yl(e)||Zl(e))return Mn(e);if(QN(e)&&e.textSourceNode)return Dn(e.textSourceNode,t);const r=n,i=!!r&&!!e.parent&&!sy(e);if(vl(e)){if(!i||wd(e)!==hc(r))return kc(e)}else if(aP(e)){if(!i||wd(e)!==hc(r))return pC(e)}else if(gn.assertNode(e,Jl),!i)return e.text;return Qd(r,e,t)}function En(t,r=n,i,o){if(11===t.kind&&t.textSourceNode){const e=t.textSourceNode;if(fD(e)||mD(e)||GN(e)||aP(e)){const n=GN(e)?e.text:Dn(e);return o?`"${Ly(n)}"`:i||16777216&ap(t)?`"${Dy(n)}"`:`"${Fy(n)}"`}return En(e,wd(e),i,o)}return _p(t,r,(i?1:0)|(o?2:0)|(e.terminateUnterminatedLiterals?4:0)|(e.target&&e.target>=8?8:0))}function Fn(e){l.push(_),_=0,m.push(h),e&&1048576&ap(e)||(u.push(d),d=0,s.push(c),c=void 0,p.push(f))}function Pn(e){_=l.pop(),h=m.pop(),e&&1048576&ap(e)||(d=u.pop(),c=s.pop(),f=p.pop())}function An(e){f&&f!==ke(p)||(f=new Set),f.add(e)}function In(e){h&&h!==ke(m)||(h=new Set),h.add(e)}function On(e){if(e)switch(e.kind){case 242:case 297:case 298:g(e.statements,On);break;case 257:case 255:case 247:case 248:On(e.statement);break;case 246:On(e.thenStatement),On(e.elseStatement);break;case 249:case 251:case 250:On(e.initializer),On(e.statement);break;case 256:On(e.caseBlock);break;case 270:g(e.clauses,On);break;case 259:On(e.tryBlock),On(e.catchClause),On(e.finallyBlock);break;case 300:On(e.variableDeclaration),On(e.block);break;case 244:On(e.declarationList);break;case 262:g(e.declarations,On);break;case 261:case 170:case 209:case 264:case 275:case 281:jn(e.name);break;case 263:jn(e.name),1048576&ap(e)&&(g(e.parameters,On),On(e.body));break;case 207:case 208:case 276:g(e.elements,On);break;case 273:On(e.importClause);break;case 274:jn(e.name),On(e.namedBindings);break;case 277:jn(e.propertyName||e.name)}}function Ln(e){if(e)switch(e.kind){case 304:case 305:case 173:case 172:case 175:case 174:case 178:case 179:jn(e.name)}}function jn(e){e&&(Yl(e)||Zl(e)?Mn(e):E_(e)&&On(e))}function Mn(e){const t=e.emitNode.autoGenerate;if(4==(7&t.flags))return Rn(xI(e),mD(e),t.flags,t.prefix,t.suffix);{const n=t.id;return o[n]||(o[n]=function(e){const t=e.emitNode.autoGenerate,n=SI(t.prefix,Mn),r=SI(t.suffix);switch(7&t.flags){case 1:return qn(0,!!(8&t.flags),mD(e),n,r);case 2:return gn.assertNode(e,fD),qn(268435456,!!(8&t.flags),!1,n,r);case 3:return Un(kc(e),32&t.flags?Jn:Bn,!!(16&t.flags),!!(8&t.flags),mD(e),n,r)}return gn.fail(`Unsupported GeneratedIdentifierKind: ${gn.formatEnum(7&t.flags,Cr,!0)}.`)}(e))}}function Rn(e,t,n,o,a){const s=pJ(e),c=t?i:r;return c[s]||(c[s]=Kn(e,t,n??0,SI(o,Mn),SI(a)))}function Bn(e,t){return Jn(e,t)&&!function(e,t){let n,r;t?(n=h,r=m):(n=f,r=p);if(null==n?void 0:n.has(e))return!0;for(let t=r.length-1;t>=0;t--)if(n!==r[t]&&(n=r[t],null==n?void 0:n.has(e)))return!0;return!1}(e,t)&&!a.has(e)}function Jn(e,t){return!n||Id(n,e,P)}function zn(e,t){switch(e){case"":d=t;break;case"#":_=t;break;default:c??(c=new Map),c.set(e,t)}}function qn(e,t,n,r,i){r.length>0&&35===r.charCodeAt(0)&&(r=r.slice(1));const o=TI(n,r,"",i);let a=function(e){switch(e){case"":return d;case"#":return _;default:return(null==c?void 0:c.get(e))??0}}(o);if(e&&!(a&e)){const s=TI(n,r,268435456===e?"_i":"_n",i);if(Bn(s,n))return a|=e,n?In(s):t&&An(s),zn(o,a),s}for(;;){const e=268435455&a;if(a++,8!==e&&13!==e){const s=TI(n,r,e<26?"_"+String.fromCharCode(97+e):"_"+(e-26),i);if(Bn(s,n))return n?In(s):t&&An(s),zn(o,a),s}}}function Un(e,t=Bn,n,r,i,o,s){if(e.length>0&&35===e.charCodeAt(0)&&(e=e.slice(1)),o.length>0&&35===o.charCodeAt(0)&&(o=o.slice(1)),n){const n=TI(i,o,e,s);if(t(n,i))return i?In(n):r?An(n):a.add(n),n}95!==e.charCodeAt(e.length-1)&&(e+="_");let c=1;for(;;){const n=TI(i,o,e+c,s);if(t(n,i))return i?In(n):r?An(n):a.add(n),n;c++}}function Vn(e){return Un(e,Jn,!0,!1,!1,"","")}function Wn(e){const t=Dn(e.name);return function(e,t){for(let n=t;n&&mh(n,t);n=n.nextContainer)if(fu(n)&&n.locals){const t=n.locals.get(xc(e));if(t&&3257279&t.flags)return!1}return!0}(t,at(e,fu))?t:Un(t,Bn,!1,!1,!1,"","")}function $n(){return Un("default",Bn,!1,!1,!1,"","")}function Kn(e,t,n,r,i){switch(e.kind){case 80:case 81:return Un(Dn(e),Bn,!!(16&n),!!(8&n),t,r,i);case 268:case 267:return gn.assert(!r&&!i&&!t),Wn(e);case 273:case 279:return gn.assert(!r&&!i&&!t),function(e){const t=Eg(e);return Un(QN(t)?dp(t.text):"module",Bn,!1,!1,!1,"","")}(e);case 263:case 264:{gn.assert(!r&&!i&&!t);const o=e.name;return o&&!Yl(o)?Kn(o,!1,n,r,i):$n()}case 278:return gn.assert(!r&&!i&&!t),$n();case 232:return gn.assert(!r&&!i&&!t),Un("class",Bn,!1,!1,!1,"","");case 175:case 178:case 179:return function(e,t,n,r){return fD(e.name)?Rn(e.name,t):qn(0,!1,t,n,r)}(e,t,r,i);case 168:return qn(0,!0,t,r,i);default:return qn(0,!1,t,r,i)}}function Hn(e,t){const n=je(2,e,t),r=Y,i=Z,o=ee;Gn(t),n(e,t),Qn(t,r,i,o)}function Gn(e){const t=ap(e),n=Bw(e);!function(e,t,n,r){re(),te=!1;const i=n<0||!!(1024&t)||12===e.kind,o=r<0||!!(2048&t)||12===e.kind;(n>0||r>0)&&n!==r&&(i||rr(n,354!==e.kind),(!i||n>=0&&1024&t)&&(Y=n),(!o||r>=0&&2048&t)&&(Z=r,262===e.kind&&(ee=r)));g(zw(e),Zn),ie()}(e,t,n.pos,n.end),4096&t&&(ne=!0)}function Qn(e,t,n,r){const i=ap(e),o=Bw(e);4096&i&&(ne=!1),Yn(e,i,o.pos,o.end,t,n,r);const a=oN(e);a&&Yn(e,i,a.pos,a.end,t,n,r)}function Yn(e,t,n,r,i,o,a){re();const s=r<0||!!(2048&t)||12===e.kind;g(Vw(e),er),(n>0||r>0)&&n!==r&&(Y=i,Z=o,ee=a,s||354===e.kind||function(e){fr(e,lr)}(r)),ie()}function Zn(e){(e.hasLeadingNewline||2===e.kind)&&v.writeLine(),tr(e),e.hasTrailingNewLine||2===e.kind?v.writeLine():v.writeSpace(" ")}function er(e){v.isAtStartOfLine()||v.writeSpace(" "),tr(e),e.hasTrailingNewLine&&v.writeLine()}function tr(e){const t=function(e){return 3===e.kind?`/*${e.text}*/`:`//${e.text}`}(e);Ev(t,3===e.kind?za(t):void 0,v,0,t.length,U)}function nr(e,t,r){re();const{pos:i,end:o}=t,a=ap(e),s=ne||o<0||!!(2048&a);i<0||!!(1024&a)||function(e){const t=n&&Dv(n.text,Se(),v,mr,e,U,ne);t&&(D?D.push(t):D=[t])}(t),ie(),4096&a&&!ne?(ne=!0,r(e),ne=!1):r(e),re(),s||(rr(t.end,!0),te&&!v.isAtStartOfLine()&&v.writeLine()),ie()}function rr(e,t){te=!1,t?0===e&&(null==n?void 0:n.isDeclarationFile)?pr(e,or):pr(e,sr):0===e&&pr(e,ir)}function ir(e,t,n,r,i){gr(e,t)&&sr(e,t,n,r,i)}function or(e,t,n,r,i){gr(e,t)||sr(e,t,n,r,i)}function ar(t,n){return!e.onlyPrintJsDocStyle||(BI(t,n)||$d(t,n))}function sr(e,t,r,i,o){n&&ar(n.text,e)&&(te||(Nv(Se(),v,o,e),te=!0),xr(e),Ev(n.text,Se(),v,e,t,U),xr(t),i?v.writeLine():3===r&&v.writeSpace(" "))}function cr(e){ne||-1===e||rr(e,!0)}function lr(e,t,r,i){n&&ar(n.text,e)&&(v.isAtStartOfLine()||v.writeSpace(" "),xr(e),Ev(n.text,Se(),v,e,t,U),xr(t),i&&v.writeLine())}function _r(e,t,n){ne||(re(),fr(e,t?lr:n?ur:dr),ie())}function ur(e,t,r){n&&(xr(e),Ev(n.text,Se(),v,e,t,U),xr(t),2===r&&v.writeLine())}function dr(e,t,r,i){n&&(xr(e),Ev(n.text,Se(),v,e,t,U),xr(t),i?v.writeLine():v.writeSpace(" "))}function pr(e,t){!n||-1!==Y&&e===Y||(function(e){return void 0!==D&&Te(D).nodePos===e}(e)?function(e){if(!n)return;const t=Te(D).detachedCommentEndPos;D.length-1?D.pop():D=void 0;ds(n.text,t,e,t)}(t):ds(n.text,e,t,e))}function fr(e,t){n&&(-1===Z||e!==Z&&e!==ee)&&ps(n.text,e,t)}function mr(e,t,r,i,o,a){n&&ar(n.text,i)&&(xr(i),Ev(e,t,r,i,o,a),xr(o))}function gr(e,t){return!!n&&Wd(n.text,e,t)}function hr(e,t){const n=je(3,e,t);yr(t),n(e,t),vr(t)}function yr(e){const t=ap(e),n=Iw(e),r=n.source||T;354!==e.kind&&!(32&t)&&n.pos>=0&&Sr(n.source||T,br(r,n.pos)),128&t&&(H=!0)}function vr(e){const t=ap(e),n=Iw(e);128&t&&(H=!1),354!==e.kind&&!(64&t)&&n.end>=0&&Sr(n.source||T,n.end)}function br(e,t){return e.skipTrivia?e.skipTrivia(t):is(e.text,t)}function xr(e){if(H||iT(e)||Tr(T))return;const{line:t,character:n}=Ha(T,e);S.addMapping(v.getLine(),v.getColumn(),G,t,n,void 0)}function Sr(e,t){if(e!==T){const n=T,r=G;kr(e),xr(t),function(e,t){T=e,G=t}(n,r)}else xr(t)}function kr(t){H||(T=t,t!==C?Tr(t)||(G=S.addSource(t.fileName),e.inlineSources&&S.setSourceContent(G,t.text),C=t,Q=G):G=Q)}function Tr(e){return Eo(e.fileName,".json")}}function MU(e,t,n,r){t(e)}function RU(e,t,n,r){t(e,n.select(r))}function BU(e,t,n,r){t(e,n)}function JU(e,t,n){if(!e.getDirectories||!e.readDirectory)return;const r=new Map,i=Xt(n);return{useCaseSensitiveFileNames:n,fileExists:function(t){const n=s(o(t));return n&&_(n.sortedAndCanonicalizedFiles,i(c(t)))||e.fileExists(t)},readFile:(t,n)=>e.readFile(t,n),directoryExists:e.directoryExists&&function(t){const n=o(t);return r.has(Yo(n))||e.directoryExists(t)},getDirectories:function(t){const n=o(t),r=l(t,n);if(r)return r.directories.slice();return e.getDirectories(t)},readDirectory:function(r,i,a,s,_){const d=o(r),f=l(r,d);let m;if(void 0!==f)return Ck(r,i,a,s,n,t,_,function(e){const t=o(e);if(t===d)return f||g(e,t);const n=l(e,t);return void 0!==n?n||g(e,t):uT},u);return e.readDirectory(r,i,a,s,_);function g(t,n){if(m&&n===d)return m;const r={files:O(e.readDirectory(t,void 0,void 0,["*.*"]),c)||p,directories:e.getDirectories(t)||p};return n===d&&(m=r),r}},createDirectory:e.createDirectory&&function(t){const n=s(o(t));if(n){const e=c(t),r=i(e);ie(n.sortedAndCanonicalizedDirectories,r,Ft)&&n.directories.push(e)}e.createDirectory(t)},writeFile:e.writeFile&&function(t,n,r){const i=s(o(t));i&&f(i,c(t),!0);return e.writeFile(t,n,r)},addOrDeleteFileOrDirectory:function(t,n){if(void 0!==a(n))return void m();const r=s(n);if(!r)return void d(n);if(!e.directoryExists)return void m();const o=c(t),l={fileExists:e.fileExists(t),directoryExists:e.directoryExists(t)};l.directoryExists||_(r.sortedAndCanonicalizedDirectories,i(o))?m():f(r,o,l.fileExists);return l},addOrDeleteFile:function(e,t,n){if(1===n)return;const r=s(t);r?f(r,c(e),0===n):d(t)},clearCache:m,realpath:e.realpath&&u};function o(e){return Xo(e,t,i)}function a(e){return r.get(Yo(e))}function s(e){const t=a(Lo(e));return t?(t.sortedAndCanonicalizedFiles||(t.sortedAndCanonicalizedFiles=t.files.map(i).sort(),t.sortedAndCanonicalizedDirectories=t.directories.map(i).sort()),t):t}function c(e){return jo(Ko(e))}function l(t,n){const i=a(n=Yo(n));if(i)return i;try{return function(t,n){var i;if(!e.realpath||Yo(o(e.realpath(t)))===n){const i={files:O(e.readDirectory(t,void 0,void 0,["*.*"]),c)||[],directories:e.getDirectories(t)||[]};return r.set(Yo(n),i),i}if(null==(i=e.directoryExists)?void 0:i.call(e,t))return r.set(n,!1),!1}(t,n)}catch{return void gn.assert(!r.has(Yo(n)))}}function _(e,t){return Ee(e,t,dt,Ft)>=0}function u(t){return e.realpath?e.realpath(t):t}function d(e){fa(Lo(e),e=>!!r.delete(Yo(e))||void 0)}function f(e,t,n){const r=e.sortedAndCanonicalizedFiles,o=i(t);if(n)ie(r,o,Ft)&&e.files.push(t);else{const t=Ee(r,o,dt,Ft);if(t>=0){r.splice(t,1);const n=e.files.findIndex(e=>i(e)===o);e.files.splice(n,1)}}}function m(){r.clear()}}var zU=(e=>(e[e.Update=0]="Update",e[e.RootNamesAndUpdate=1]="RootNamesAndUpdate",e[e.Full=2]="Full",e))(zU||{});function qU(e,t,n,r,i){var o;const a=qe((null==(o=null==t?void 0:t.configFile)?void 0:o.extendedSourceFiles)||p,i);n.forEach((t,n)=>{a.has(n)||(t.projects.delete(e),t.close())}),a.forEach((t,i)=>{const o=n.get(i);o?o.projects.add(e):n.set(i,{projects:new Set([e]),watcher:r(t,i),close:()=>{const e=n.get(i);e&&0===e.projects.size&&(e.watcher.close(),n.delete(i))}})})}function UU(e,t){t.forEach(t=>{t.projects.delete(e)&&t.close()})}function VU(e,t,n){e.delete(t)&&e.forEach(({extendedResult:r},i)=>{var o;(null==(o=r.extendedSourceFiles)?void 0:o.some(e=>n(e)===t))&&VU(e,i,n)})}function WU(e,t,n){xx(t,e.getMissingFilePaths(),{createNewValue:n,onDeleteValue:_x})}function $U(e,t,n){function r(e,t){return{watcher:n(e,t),flags:t}}t?xx(e,new Map(Object.entries(t)),{createNewValue:r,onDeleteValue:YU,onExistingValue:function(t,n,i){if(t.flags===n)return;t.watcher.close(),e.set(i,r(i,n))}}):vx(e,YU)}function KU({watchedDirPath:e,fileOrDirectory:t,fileOrDirectoryPath:n,configFileName:r,options:i,program:o,extraFileExtensions:a,currentDirectory:s,useCaseSensitiveFileNames:c,writeLog:l,toPath:_,getScriptKind:u}){const d=r$(n);if(!d)return l(`Project: ${r} Detected ignored path: ${t}`),!0;if((n=d)===e)return!1;if(Do(n)&&!Kk(t,i,a)&&!function(){if(!u)return!1;switch(u(t)){case 3:case 4:case 7:case 5:return!0;case 1:case 2:return JS(i);case 6:return LS(i);case 0:return!1}}())return l(`Project: ${r} Detected file add/remove of non supported extension: ${t}`),!0;if(Hj(t,i.configFile.configFileSpecs,$o(Lo(r),s),c,s))return l(`Project: ${r} Detected excluded file: ${t}`),!0;if(!o)return!1;if(i.outFile||i.outDir)return!1;if(SO(n)){if(i.declarationDir)return!1}else if(!Fo(n,Ok))return!1;const p=Qk(n),f=nt(o)?void 0:A$(o)?o.getProgramOrUndefined():o,m=f||nt(o)?void 0:o;return!(!g(p+".ts")&&!g(p+".tsx"))&&(l(`Project: ${r} Detected output file: ${t}`),!0);function g(e){return f?!!f.getSourceFileByPath(e):m?m.state.fileInfos.has(e):!!T(o,t=>_(t)===e)}}function HU(e,t){return!!e&&e.isEmittedFile(t)}var GU=(e=>(e[e.None=0]="None",e[e.TriggerOnly=1]="TriggerOnly",e[e.Verbose=2]="Verbose",e))(GU||{});function XU(e,t,n,r){so(2===t?n:ct);const i={watchFile:(t,n,r,i)=>e.watchFile(t,n,r,i),watchDirectory:(t,n,r,i)=>e.watchDirectory(t,n,!!(1&r),i)},o=0!==t?{watchFile:l("watchFile"),watchDirectory:l("watchDirectory")}:void 0,a=2===t?{watchFile:function(e,t,i,a,s,c){n(`FileWatcher:: Added:: ${_(e,i,a,s,c,r)}`);const l=o.watchFile(e,t,i,a,s,c);return{close:()=>{n(`FileWatcher:: Close:: ${_(e,i,a,s,c,r)}`),l.close()}}},watchDirectory:function(e,t,i,a,s,c){const l=`DirectoryWatcher:: Added:: ${_(e,i,a,s,c,r)}`;n(l);const u=Hn(),d=o.watchDirectory(e,t,i,a,s,c),p=Hn()-u;return n(`Elapsed:: ${p}ms ${l}`),{close:()=>{const t=`DirectoryWatcher:: Close:: ${_(e,i,a,s,c,r)}`;n(t);const o=Hn();d.close();const l=Hn()-o;n(`Elapsed:: ${l}ms ${t}`)}}}}:o||i,s=2===t?function(e,t,i,o,a){return n(`ExcludeWatcher:: Added:: ${_(e,t,i,o,a,r)}`),{close:()=>n(`ExcludeWatcher:: Close:: ${_(e,t,i,o,a,r)}`)}}:q$;return{watchFile:c("watchFile"),watchDirectory:c("watchDirectory")};function c(t){return(n,r,i,o,c,l)=>{var _;return Xj(n,"watchFile"===t?null==o?void 0:o.excludeFiles:null==o?void 0:o.excludeDirectories,"boolean"==typeof e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),(null==(_=e.getCurrentDirectory)?void 0:_.call(e))||"")?s(n,i,o,c,l):a[t].call(void 0,n,r,i,o,c,l)}}function l(e){return(t,o,a,s,c,l)=>i[e].call(void 0,t,(...i)=>{const u=`${"watchFile"===e?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${i[0]} ${void 0!==i[1]?i[1]:""}:: ${_(t,a,s,c,l,r)}`;n(u);const d=Hn();o.call(void 0,...i);const p=Hn()-d;n(`Elapsed:: ${p}ms ${u}`)},a,s,c,l)}function _(e,t,n,r,i,o){return`WatchInfo: ${e} ${t} ${JSON.stringify(n)} ${o?o(r,i):void 0===i?r:`${r} ${i}`}`}}function QU(e){const t=null==e?void 0:e.fallbackPolling;return{watchFile:void 0!==t?t:1}}function YU(e){e.watcher.close()}function ZU(e,t,n="tsconfig.json"){return fa(e,e=>{const r=Uo(e,n);return t(r)?r:void 0})}function eV(e,t){const n=Lo(t);return Ko(ko(e)?e:Uo(n,e))}function tV(e,t,n){let r;return g(e,e=>{const i=Wo(e,t);if(i.pop(),!r)return void(r=i);const o=Math.min(r.length,i.length);for(let e=0;e{let o;try{ar("beforeIORead"),o=e(n),ar("afterIORead"),sr("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),o=""}return void 0!==o?uO(n,o,r,t):void 0}}function iV(e,t,n){return(r,i,o,a)=>{try{ar("beforeIOWrite"),cv(r,i,o,e,t,n),ar("afterIOWrite"),sr("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}}}function oV(e,t,n=mo){const r=new Map,i=Xt(n.useCaseSensitiveFileNames);function o(){return Lo(Ko(n.getExecutingFilePath()))}const a=Bb(e),s=n.realpath&&(e=>n.realpath(e)),c={getSourceFile:rV(e=>c.readFile(e),t),getDefaultLibLocation:o,getDefaultLibFileName:e=>Uo(o(),Ls(e)),writeFile:iV((e,t,r)=>n.writeFile(e,t,r),e=>(c.createDirectory||n.createDirectory)(e),e=>{return t=e,!!r.has(t)||!!(c.directoryExists||n.directoryExists)(t)&&(r.set(t,!0),!0);var t}),getCurrentDirectory:ht(()=>n.getCurrentDirectory()),useCaseSensitiveFileNames:()=>n.useCaseSensitiveFileNames,getCanonicalFileName:i,getNewLine:()=>a,fileExists:e=>n.fileExists(e),readFile:e=>n.readFile(e),trace:e=>n.write(e+a),directoryExists:e=>n.directoryExists(e),getEnvironmentVariable:e=>n.getEnvironmentVariable?n.getEnvironmentVariable(e):"",getDirectories:e=>n.getDirectories(e),realpath:s,readDirectory:(e,t,r,i,o)=>n.readDirectory(e,t,r,i,o),createDirectory:e=>n.createDirectory(e),createHash:Xe(n,n.createHash)};return c}function aV(e,t,n){const r=e.readFile,i=e.fileExists,o=e.directoryExists,a=e.createDirectory,s=e.writeFile,c=new Map,l=new Map,_=new Map,u=new Map,d=(t,n)=>{const i=r.call(e,n);return c.set(t,void 0!==i&&i),i};e.readFile=n=>{const i=t(n),o=c.get(i);return void 0!==o?!1!==o?o:void 0:Eo(n,".json")||sU(n)?d(i,n):r.call(e,n)};const p=n?(e,r,i,o)=>{const a=t(e),s="object"==typeof r?r.impliedNodeFormat:void 0,c=u.get(s),l=null==c?void 0:c.get(a);if(l)return l;const _=n(e,r,i,o);return _&&(SO(e)||Eo(e,".json"))&&u.set(s,(c||new Map).set(a,_)),_}:void 0;return e.fileExists=n=>{const r=t(n),o=l.get(r);if(void 0!==o)return o;const a=i.call(e,n);return l.set(r,!!a),a},s&&(e.writeFile=(n,r,...i)=>{const o=t(n);l.delete(o);const a=c.get(o);void 0!==a&&a!==r?(c.delete(o),u.forEach(e=>e.delete(o))):p&&u.forEach(e=>{const t=e.get(o);t&&t.text!==r&&e.delete(o)}),s.call(e,n,r,...i)}),o&&(e.directoryExists=n=>{const r=t(n),i=_.get(r);if(void 0!==i)return i;const a=o.call(e,n);return _.set(r,!!a),a},a&&(e.createDirectory=n=>{const r=t(n);_.delete(r),a.call(e,n)})),{originalReadFile:r,originalFileExists:i,originalDirectoryExists:o,originalCreateDirectory:a,originalWriteFile:s,getSourceFileWithCache:p,readFileWithCache:e=>{const n=t(e),r=c.get(n);return void 0!==r?!1!==r?r:void 0:d(n,e)}}}function sV(e,t,n){let r;return r=de(r,e.getConfigFileParsingDiagnostics()),r=de(r,e.getOptionsDiagnostics(n)),r=de(r,e.getSyntacticDiagnostics(t,n)),r=de(r,e.getGlobalDiagnostics(n)),r=de(r,e.getSemanticDiagnostics(t,n)),jS(e.getCompilerOptions())&&(r=de(r,e.getDeclarationDiagnostics(t,n))),Is(r||p)}function cV(e,t){let n="";for(const r of e)n+=lV(r,t);return n}function lV(e,t){const n=`${pi(e)} TS${e.code}: ${SV(e.messageText,t.getNewLine())}${t.getNewLine()}`;if(e.file){const{line:r,character:i}=Ha(e.file,e.start);return`${ua(e.file.fileName,t.getCurrentDirectory(),e=>t.getCanonicalFileName(e))}(${r+1},${i+1}): `+n}return n}var _V=(e=>(e.Grey="",e.Red="",e.Yellow="",e.Blue="",e.Cyan="",e))(_V||{}),uV="",dV=" ",pV="",fV="...",mV=" ",gV=" ";function hV(e){switch(e){case 1:return"";case 0:return"";case 2:return gn.fail("Should never get an Info diagnostic on the command line.");case 3:return""}}function yV(e,t){return t+e+pV}function vV(e,t,n,r,i,o){const{line:a,character:s}=Ha(e,t),{line:c,character:l}=Ha(e,t+n),_=Ha(e,e.text.length).line,u=c-a>=4;let d=(c+1+"").length;u&&(d=Math.max(fV.length,d));let p="";for(let t=a;t<=c;t++){p+=o.getNewLine(),u&&a+1n.getCanonicalFileName(e)):e.fileName,""),a+=":",a+=r(`${i+1}`,""),a+=":",a+=r(`${o+1}`,""),a}function xV(e,t){let n="";for(const r of e){if(r.file){const{file:e,start:i}=r;n+=bV(e,i,t),n+=" - "}if(n+=yV(pi(r),hV(r.category)),n+=yV(` TS${r.code}: `,""),n+=SV(r.messageText,t.getNewLine()),r.file&&r.code!==ha.File_appears_to_be_binary.code&&(n+=t.getNewLine(),n+=vV(r.file,r.start,r.length,"",hV(r.category),t)),r.relatedInformation){n+=t.getNewLine();for(const{file:e,start:i,length:o,messageText:a}of r.relatedInformation)e&&(n+=t.getNewLine(),n+=mV+bV(e,i,t),n+=vV(e,i,o,gV,"",t)),n+=t.getNewLine(),n+=gV+SV(a,t.getNewLine())}n+=t.getNewLine()}return n}function SV(e,t,n=0){if(it(e))return e;if(void 0===e)return"";let r="";if(n){r+=t;for(let e=0;ewV(t,e,n)};function IV(e,t,n,r,i){return{nameAndMode:AV,resolve:(o,a)=>XM(o,e,n,r,i,t,a)}}function OV(e){return it(e)?e:e.fileName}var LV={getName:OV,getMode:(e,t,n)=>kV(e,t&&ZV(t,n))};function jV(e,t,n,r,i){return{nameAndMode:LV,resolve:(o,a)=>DM(o,e,n,r,t,i,a)}}function MV(e,t,n,r,i,o,a,s){if(0===e.length)return p;const c=[],l=new Map,_=s(t,n,r,o,a);for(const t of e){const e=_.nameAndMode.getName(t),o=_.nameAndMode.getMode(t,i,(null==n?void 0:n.commandLine.options)||r),a=BM(e,o);let s=l.get(a);s||l.set(a,s=_.resolve(e,o)),c.push(s)}return c}var RV="__inferred type names__.ts";function BV(e,t,n){return Uo(e.configFilePath?Lo(e.configFilePath):t,`__lib_node_modules_lookup_${n}__.ts`)}function JV(e){const t=e.split(".");let n=t[1],r=2;for(;t[r]&&"d"!==t[r];)n+=(2===r?"/":"-")+t[r],r++;return"@typescript/lib-"+n}function zV(e){switch(null==e?void 0:e.kind){case 3:case 4:case 5:case 7:return!0;default:return!1}}function qV(e){return void 0!==e.pos}function UV(e,t){var n,r,i,o;const a=gn.checkDefined(e.getSourceFileByPath(t.file)),{kind:s,index:c}=t;let l,_,u;switch(s){case 3:const t=sW(a,c);if(u=null==(r=null==(n=e.getResolvedModuleFromModuleSpecifier(t,a))?void 0:n.resolvedModule)?void 0:r.packageId,-1===t.pos)return{file:a,packageId:u,text:t.text};l=is(a.text,t.pos),_=t.end;break;case 4:({pos:l,end:_}=a.referencedFiles[c]);break;case 5:({pos:l,end:_}=a.typeReferenceDirectives[c]),u=null==(o=null==(i=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a.typeReferenceDirectives[c],a))?void 0:i.resolvedTypeReferenceDirective)?void 0:o.packageId;break;case 7:({pos:l,end:_}=a.libReferenceDirectives[c]);break;default:return gn.assertNever(s)}return{file:a,pos:l,end:_,packageId:u}}function VV(e,t,n,r,i,o,a,s,c,l){if(!e||(null==s?void 0:s()))return!1;if(!ae(e.getRootFileNames(),t))return!1;let _;if(!ae(e.getProjectReferences(),l,function(t,n,r){return md(t,n)&&p(e.getResolvedProjectReferences()[r],t)}))return!1;if(e.getSourceFiles().some(function(e){return!function(e){return e.version===r(e.resolvedPath,e.fileName)}(e)||o(e.path)}))return!1;const u=e.getMissingFilePaths();if(u&&_d(u,i))return!1;const d=e.getCompilerOptions();return!!yx(d,n)&&((!e.resolvedLibReferences||!_d(e.resolvedLibReferences,(e,t)=>a(t)))&&(!d.configFile||!n.configFile||d.configFile.text===n.configFile.text));function p(e,t){if(e){if(D(_,e))return!0;const n=iW(t),r=c(n);return!!r&&(e.commandLine.options.configFile===r.options.configFile&&(!!ae(e.commandLine.fileNames,r.fileNames)&&((_||(_=[])).push(e),!g(e.references,(t,n)=>!p(t,e.commandLine.projectReferences[n])))))}const n=iW(t);return!c(n)}}function WV(e){return e.options.configFile?[...e.options.configFile.parseDiagnostics,...e.errors]:e.errors}function $V(e,t,n,r){const i=KV(e,t,n,r);return"object"==typeof i?i.impliedNodeFormat:i}function KV(e,t,n,r){const i=DS(r),o=3<=i&&i<=99||lR(e);return Fo(e,[".d.mts",".mts",".mjs"])?99:Fo(e,[".d.cts",".cts",".cjs"])?1:o&&Fo(e,[".d.ts",".ts",".tsx",".js",".jsx"])?function(){const i=SR(t,n,r),o=[];i.failedLookupLocations=o,i.affectingLocations=o;const a=kR(Lo(e),i);return{impliedNodeFormat:"module"===(null==a?void 0:a.contents.packageJsonContent.type)?99:1,packageJsonLocations:o,packageJsonScope:a}}():void 0}var HV=new Set([ha.Cannot_redeclare_block_scoped_variable_0.code,ha.A_module_cannot_have_multiple_default_exports.code,ha.Another_export_default_is_here.code,ha.The_first_export_default_is_here.code,ha.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,ha.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,ha.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,ha.constructor_is_a_reserved_word.code,ha.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,ha.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,ha.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,ha.Invalid_use_of_0_in_strict_mode.code,ha.A_label_is_not_allowed_here.code,ha.with_statements_are_not_allowed_in_strict_mode.code,ha.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,ha.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,ha.A_class_declaration_without_the_default_modifier_must_have_a_name.code,ha.A_class_member_cannot_have_the_0_keyword.code,ha.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,ha.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,ha.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,ha.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,ha.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,ha.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,ha.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,ha.A_destructuring_declaration_must_have_an_initializer.code,ha.A_get_accessor_cannot_have_parameters.code,ha.A_rest_element_cannot_contain_a_binding_pattern.code,ha.A_rest_element_cannot_have_a_property_name.code,ha.A_rest_element_cannot_have_an_initializer.code,ha.A_rest_element_must_be_last_in_a_destructuring_pattern.code,ha.A_rest_parameter_cannot_have_an_initializer.code,ha.A_rest_parameter_must_be_last_in_a_parameter_list.code,ha.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,ha.A_return_statement_cannot_be_used_inside_a_class_static_block.code,ha.A_set_accessor_cannot_have_rest_parameter.code,ha.A_set_accessor_must_have_exactly_one_parameter.code,ha.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,ha.An_export_declaration_cannot_have_modifiers.code,ha.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,ha.An_import_declaration_cannot_have_modifiers.code,ha.An_object_member_cannot_be_declared_optional.code,ha.Argument_of_dynamic_import_cannot_be_spread_element.code,ha.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,ha.Cannot_redeclare_identifier_0_in_catch_clause.code,ha.Catch_clause_variable_cannot_have_an_initializer.code,ha.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,ha.Classes_can_only_extend_a_single_class.code,ha.Classes_may_not_have_a_field_named_constructor.code,ha.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,ha.Duplicate_label_0.code,ha.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,ha.for_await_loops_cannot_be_used_inside_a_class_static_block.code,ha.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,ha.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,ha.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,ha.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,ha.Jump_target_cannot_cross_function_boundary.code,ha.Line_terminator_not_permitted_before_arrow.code,ha.Modifiers_cannot_appear_here.code,ha.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,ha.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,ha.Private_identifiers_are_not_allowed_outside_class_bodies.code,ha.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,ha.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,ha.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,ha.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,ha.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,ha.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,ha.Trailing_comma_not_allowed.code,ha.Variable_declaration_list_cannot_be_empty.code,ha._0_and_1_operations_cannot_be_mixed_without_parentheses.code,ha._0_expected.code,ha._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,ha._0_list_cannot_be_empty.code,ha._0_modifier_already_seen.code,ha._0_modifier_cannot_appear_on_a_constructor_declaration.code,ha._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,ha._0_modifier_cannot_appear_on_a_parameter.code,ha._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,ha._0_modifier_cannot_be_used_here.code,ha._0_modifier_must_precede_1_modifier.code,ha._0_declarations_can_only_be_declared_inside_a_block.code,ha._0_declarations_must_be_initialized.code,ha.extends_clause_already_seen.code,ha.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,ha.Class_constructor_may_not_be_a_generator.code,ha.Class_constructor_may_not_be_an_accessor.code,ha.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,ha.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,ha.Private_field_0_must_be_declared_in_an_enclosing_class.code,ha.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code]);function GV(e,t,n,r,i){var o,a,s,l,_,u,d,f,m,h,y,b,x,S,k,C;let N=nt(e)?function(e,t,n,r,i,o){return{rootNames:e,options:t,host:n,oldProgram:r,configFileParsingDiagnostics:i,typeScriptVersion:o}}(e,t,n,r,i):e;const{rootNames:E,options:F,configFileParsingDiagnostics:A,projectReferences:I,typeScriptVersion:O,host:L}=N;let{oldProgram:j}=N;N=void 0,e=void 0;for(const e of eL)if(Ie(F,e.name)&&"string"==typeof F[e.name])throw new Error(`${e.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);const B=ht(()=>In("ignoreDeprecations",ha.Invalid_value_for_ignoreDeprecations));let J,z,q,V,W,$,K,H,G;const Q=cW(Mn);let Z,ee,te,ne,re,ie,oe,se,ce;const _e="number"==typeof F.maxNodeModuleJsDepth?F.maxNodeModuleJsDepth:0;let ue=0;const de=new Map,pe=new Map;null==(o=Yn)||o.push(Yn.Phase.Program,"createProgram",{configFilePath:F.configFilePath,rootDir:F.rootDir},!0),ar("beforeProgram");const fe=L||nV(F),ge=rW(fe);let he=F.noLib;const ye=ht(()=>fe.getDefaultLibFileName(F)),ve=fe.getDefaultLibLocation?fe.getDefaultLibLocation():Lo(ye());let be=!1;const xe=fe.getCurrentDirectory(),Se=Jk(F),ke=zk(F,Se),Te=new Map;let Ce,we,Ne,De;const Ee=fe.hasInvalidatedResolutions||lt;let Fe;if(fe.resolveModuleNameLiterals?(De=fe.resolveModuleNameLiterals.bind(fe),Ne=null==(a=fe.getModuleResolutionCache)?void 0:a.call(fe)):fe.resolveModuleNames?(De=(e,t,n,r,i,o)=>fe.resolveModuleNames(e.map(PV),t,null==o?void 0:o.map(PV),n,r,i).map(e=>e?void 0!==e.extension?{resolvedModule:e}:{resolvedModule:{...e,extension:sT(e.resolvedFileName)}}:FV),Ne=null==(s=fe.getModuleResolutionCache)?void 0:s.call(fe)):(Ne=WM(xe,kn,F),De=(e,t,n,r,i)=>MV(e,t,n,r,i,fe,Ne,IV)),fe.resolveTypeReferenceDirectiveReferences)Fe=fe.resolveTypeReferenceDirectiveReferences.bind(fe);else if(fe.resolveTypeReferenceDirectives)Fe=(e,t,n,r,i)=>fe.resolveTypeReferenceDirectives(e.map(OV),t,n,r,null==i?void 0:i.impliedNodeFormat).map(e=>({resolvedTypeReferenceDirective:e}));else{const e=$M(xe,kn,void 0,null==Ne?void 0:Ne.getPackageJsonInfoCache(),null==Ne?void 0:Ne.optionsToRedirectsKey);Fe=(t,n,r,i,o)=>MV(t,n,r,i,o,fe,e,jV)}const Pe=fe.hasInvalidatedLibResolutions||lt;let Ae;if(fe.resolveLibrary)Ae=fe.resolveLibrary.bind(fe);else{const e=WM(xe,kn,F,null==Ne?void 0:Ne.getPackageJsonInfoCache());Ae=(t,n,r)=>HM(t,n,r,fe,e)}const Oe=new Map;let Le,je=new Map,Me=Qe();const Re=new Map;let Be=new Map;const Je=fe.useCaseSensitiveFileNames()?new Map:void 0;let ze,qe,Ue,Ve;const We=!!(null==(l=fe.useSourceOfProjectReferenceRedirect)?void 0:l.call(fe))&&!F.disableSourceOfProjectReferenceRedirect,{onProgramCreateComplete:$e,fileExists:Ke,directoryExists:He}=function(e){let t;const n=e.compilerHost.fileExists,r=e.compilerHost.directoryExists,i=e.compilerHost.getDirectories,o=e.compilerHost.realpath;if(!e.useSourceOfProjectReferenceRedirect)return{onProgramCreateComplete:ct,fileExists:c};let a;e.compilerHost.fileExists=c,r&&(a=e.compilerHost.directoryExists=n=>r.call(e.compilerHost,n)?(u(n),!0):!!e.getResolvedProjectReferences()&&(t||(t=new Set,e.forEachResolvedProjectReference(n=>{const r=n.commandLine.options.outFile;if(r)t.add(Lo(e.toPath(r)));else{const r=n.commandLine.options.declarationDir||n.commandLine.options.outDir;r&&t.add(e.toPath(r))}})),d(n,!1)));i&&(e.compilerHost.getDirectories=t=>!e.getResolvedProjectReferences()||r&&r.call(e.compilerHost,t)?i.call(e.compilerHost,t):[]);o&&(e.compilerHost.realpath=t=>{var n;return(null==(n=e.getSymlinkCache().getSymlinkedFiles())?void 0:n.get(e.toPath(t)))||o.call(e.compilerHost,t)});return{onProgramCreateComplete:s,fileExists:c,directoryExists:a};function s(){e.compilerHost.fileExists=n,e.compilerHost.directoryExists=r,e.compilerHost.getDirectories=i}function c(t){return!!n.call(e.compilerHost,t)||!!e.getResolvedProjectReferences()&&(!!SO(t)&&d(t,!0))}function l(t){const r=e.getRedirectFromOutput(e.toPath(t));return void 0!==r?!it(r.source)||n.call(e.compilerHost,r.source):void 0}function _(n){const r=e.toPath(n),i=`${r}${ho}`;return ud(t,e=>r===e||en(e,i)||en(r,`${e}/`))}function u(t){var n;if(!e.getResolvedProjectReferences()||zT(t))return;if(!o||!t.includes(cR))return;const r=e.getSymlinkCache(),i=Yo(e.toPath(t));if(null==(n=r.getSymlinkedDirectories())?void 0:n.has(i))return;const a=Ko(o.call(e.compilerHost,t));let s;a!==t&&(s=Yo(e.toPath(a)))!==i?r.setSymlinkedDirectory(t,{real:Yo(a),realPath:s}):r.setSymlinkedDirectory(i,!1)}function d(t,n){var r;const i=n?l:_,o=i(t);if(void 0!==o)return o;const a=e.getSymlinkCache(),s=a.getSymlinkedDirectories();if(!s)return!1;const c=e.toPath(t);return!!c.includes(cR)&&(!(!n||!(null==(r=a.getSymlinkedFiles())?void 0:r.has(c)))||(v(s.entries(),([r,o])=>{if(!o||!en(c,r))return;const s=i(c.replace(r,o.realPath));if(n&&s){const n=$o(t,e.compilerHost.getCurrentDirectory());a.setSymlinkedFile(c,`${o.real}${n.replace(new RegExp(r,"i"),"")}`)}return s})||!1))}}({compilerHost:fe,getSymlinkCache:qn,useSourceOfProjectReferenceRedirect:We,toPath:kt,getResolvedProjectReferences:Pt,getRedirectFromOutput:dn,forEachResolvedProjectReference:un}),Ge=fe.readFile.bind(fe);null==(_=Yn)||_.push(Yn.Phase.Program,"shouldProgramCreateNewSourceFiles",{hasOldProgram:!!j});const Ye=function(e,t){return!!e&&cd(e.getCompilerOptions(),t,GO)}(j,F);let Ze;if(null==(u=Yn)||u.pop(),null==(d=Yn)||d.push(Yn.Phase.Program,"tryReuseStructureFromOldProgram",{}),Ze=function(){var e;if(!j)return 0;const t=j.getCompilerOptions();if(ad(t,F))return 0;if(!ae(j.getRootFileNames(),E))return 0;if(qC(j.getProjectReferences(),j.getResolvedProjectReferences(),(e,t,n)=>{const r=wn((t?t.commandLine.projectReferences:I)[n]);return e?!r||r.sourceFile!==e.sourceFile||!ae(e.commandLine.fileNames,r.commandLine.fileNames):void 0!==r},(e,t)=>!ae(e,t?fn(t.sourceFile.path).commandLine.projectReferences:I,md)))return 0;I&&(ze=I.map(wn));const n=[],r=[];if(Ze=2,_d(j.getMissingFilePaths(),e=>fe.fileExists(e)))return 0;const i=j.getSourceFiles();let o;a=o||(o={}),a[a.Exists=0]="Exists",a[a.Modified=1]="Modified";var a;const s=new Map;for(const t of i){const i=an(t.fileName,Ne,fe,F);let o,a=fe.getSourceFileByPath?fe.getSourceFileByPath(t.fileName,t.resolvedPath,i,void 0,Ye):fe.getSourceFile(t.fileName,i,void 0,Ye);if(!a)return 0;if(a.packageJsonLocations=(null==(e=i.packageJsonLocations)?void 0:e.length)?i.packageJsonLocations:void 0,a.packageJsonScope=i.packageJsonScope,gn.assert(!a.redirectInfo,"Host should not return a redirect source file from `getSourceFile`"),t.redirectInfo){if(a!==t.redirectInfo.unredirected)return 0;o=!1,a=t}else if(j.redirectTargetsMap.has(t.path)){if(a!==t)return 0;o=!1}else o=a!==t;a.path=t.path,a.originalFileName=t.originalFileName,a.resolvedPath=t.resolvedPath,a.fileName=t.fileName;const c=j.sourceFileToPackageName.get(t.path);if(void 0!==c){const e=s.get(c),t=o?1:0;if(void 0!==e&&1===t||1===e)return 0;s.set(c,t)}o?(t.impliedNodeFormat!==a.impliedNodeFormat?Ze=1:ae(t.libReferenceDirectives,a.libReferenceDirectives,Ht)?t.hasNoDefaultLib!==a.hasNoDefaultLib?Ze=1:ae(t.referencedFiles,a.referencedFiles,Ht)?(Qt(a),ae(t.imports,a.imports,Gt)&&ae(t.moduleAugmentations,a.moduleAugmentations,Gt)?(12582912&t.flags)!=(12582912&a.flags)?Ze=1:ae(t.typeReferenceDirectives,a.typeReferenceDirectives,Ht)||(Ze=1):Ze=1):Ze=1:Ze=1,r.push(a)):Ee(t.path)&&(Ze=1,r.push(a)),n.push(a)}if(2!==Ze)return Ze;for(const e of r){const t=aW(e),n=wt(t,e);(ie??(ie=new Map)).set(e.path,n);const r=yn(e);Td(t,n,t=>j.getResolvedModule(e,t.text,NV(e,t,r)),gd)&&(Ze=1);const i=e.typeReferenceDirectives,o=Nt(i,e);(se??(se=new Map)).set(e.path,o);Td(i,o,t=>j.getResolvedTypeReferenceDirective(e,OV(t),Hn(t,e)),kd)&&(Ze=1)}if(2!==Ze)return Ze;if(sd(t,F))return 1;if(j.resolvedLibReferences&&_d(j.resolvedLibReferences,(e,t)=>xn(t).actual!==e.actual))return 1;if(fe.hasChangedAutomaticTypeDirectiveNames){if(fe.hasChangedAutomaticTypeDirectiveNames())return 1}else if(Z=AM(F,fe),!ae(j.getAutomaticTypeDirectiveNames(),Z))return 1;Be=j.getMissingFilePaths(),gn.assert(n.length===j.getSourceFiles().length);for(const e of n)Re.set(e.path,e);j.getFilesByNameMap().forEach((e,t)=>{e?e.path!==t?Re.set(t,Re.get(e.path)):j.isSourceFileFromExternalLibrary(e)&&pe.set(e.path,!0):Re.set(t,e)});const c=t.configFile&&t.configFile===F.configFile||!t.configFile&&!F.configFile&&!cd(t,F,VO);return Q.reuseStateFromOldProgram(j.getProgramDiagnosticsContainer(),c),be=c,q=n,Z=j.getAutomaticTypeDirectiveNames(),ee=j.getAutomaticTypeDirectiveResolutions(),je=j.sourceFileToPackageName,Me=j.redirectTargetsMap,Le=j.usesUriStyleNodeCoreModules,re=j.resolvedModules,oe=j.resolvedTypeReferenceDirectiveNames,te=j.resolvedLibReferences,ce=j.getCurrentPackagesMap(),2}(),null==(f=Yn)||f.pop(),2!==Ze){if(J=[],z=[],I&&(ze||(ze=I.map(wn)),E.length&&(null==ze||ze.forEach((e,t)=>{if(!e)return;const n=e.commandLine.options.outFile;if(We){if(n||0===NS(e.commandLine.options))for(const n of e.commandLine.fileNames)nn(n,{kind:1,index:t})}else if(n)nn(eT(n,".d.ts"),{kind:2,index:t});else if(0===NS(e.commandLine.options)){const n=ht(()=>kU(e.commandLine,!fe.useCaseSensitiveFileNames()));for(const r of e.commandLine.fileNames)SO(r)||Eo(r,".json")||nn(mU(r,e.commandLine,!fe.useCaseSensitiveFileNames(),n),{kind:2,index:t})}}))),null==(m=Yn)||m.push(Yn.Phase.Program,"processRootFiles",{count:E.length}),g(E,(e,t)=>Kt(e,!1,!1,{kind:0,index:t})),null==(h=Yn)||h.pop(),Z??(Z=E.length?AM(F,fe):p),ee=JM(),Z.length){null==(y=Yn)||y.push(Yn.Phase.Program,"processTypeReferences",{count:Z.length});const e=Uo(F.configFilePath?Lo(F.configFilePath):xe,RV),t=Nt(Z,e);for(let e=0;e{Kt(bn(e),!0,!1,{kind:6,index:t})})}q=me(J,function(e,t){return Tt(bt(e),bt(t))}).concat(z),J=void 0,z=void 0,K=void 0}if(j&&fe.onReleaseOldSourceFile){const e=j.getSourceFiles();for(const t of e){const e=jt(t.resolvedPath);(Ye||!e||e.impliedNodeFormat!==t.impliedNodeFormat||t.resolvedPath===t.path&&e.resolvedPath!==t.path)&&fe.onReleaseOldSourceFile(t,j.getCompilerOptions(),!!jt(t.path),e)}fe.getParsedCommandLine||j.forEachResolvedProjectReference(e=>{fn(e.sourceFile.path)||fe.onReleaseOldSourceFile(e.sourceFile,j.getCompilerOptions(),!1,void 0)})}j&&fe.onReleaseParsedCommandLine&&qC(j.getProjectReferences(),j.getResolvedProjectReferences(),(e,t,n)=>{const r=iW((null==t?void 0:t.commandLine.projectReferences[n])||j.getProjectReferences()[n]);(null==qe?void 0:qe.has(kt(r)))||fe.onReleaseParsedCommandLine(r,e,j.getCompilerOptions())}),j=void 0,ne=void 0,ie=void 0,se=void 0;const et={getRootFileNames:()=>E,getSourceFile:Lt,getSourceFileByPath:jt,getSourceFiles:()=>q,getMissingFilePaths:()=>Be,getModuleResolutionCache:()=>Ne,getFilesByNameMap:()=>Re,getCompilerOptions:()=>F,getSyntacticDiagnostics:function(e,t){return Mt(e,Bt,t)},getOptionsDiagnostics:function(){return Is(Y(Q.getCombinedDiagnostics(et).getGlobalDiagnostics(),function(){if(!F.configFile)return p;let e=Q.getCombinedDiagnostics(et).getDiagnostics(F.configFile.fileName);return un(t=>{e=Y(e,Q.getCombinedDiagnostics(et).getDiagnostics(t.sourceFile.fileName))}),e}()))},getGlobalDiagnostics:function(){return E.length?Is(It().getGlobalDiagnostics().slice()):p},getSemanticDiagnostics:function(e,t,n){return Mt(e,(e,t)=>function(e,t,n){return Y(nW(zt(e,t,n),F),Rt(e))}(e,t,n),t)},getCachedSemanticDiagnostics:function(e){return null==H?void 0:H.get(e.path)},getSuggestionDiagnostics:function(e,t){return Jt(()=>It().getSuggestionDiagnostics(e,t))},getDeclarationDiagnostics:function(e,t){return Mt(e,$t,t)},getBindAndCheckDiagnostics:function(e,t){return zt(e,t,void 0)},getProgramDiagnostics:Rt,getTypeChecker:It,getClassifiableNames:function(){var e;if(!$){It(),$=new Set;for(const t of q)null==(e=t.classifiableNames)||e.forEach(e=>$.add(e))}return $},getCommonSourceDirectory:Ct,emit:function(e,t,n,r,i,o,a){var s,c;null==(s=Yn)||s.push(Yn.Phase.Emit,"emit",{path:null==e?void 0:e.path},!0);const l=Jt(()=>function(e,t,n,r,i,o,a,s){if(!a){const i=tW(e,t,n,r);if(i)return i}const c=It(),l=c.getEmitResolver(F.outFile?void 0:t,r,NU(i,a));ar("beforeEmit");const _=c.runWithCancellationToken(r,()=>DU(l,Et(n),t,Xq(F,o,i),i,!1,a,s));return ar("afterEmit"),sr("Emit","beforeEmit","afterEmit"),_}(et,e,t,n,r,i,o,a));return null==(c=Yn)||c.pop(),l},getCurrentDirectory:()=>xe,getNodeCount:()=>It().getNodeCount(),getIdentifierCount:()=>It().getIdentifierCount(),getSymbolCount:()=>It().getSymbolCount(),getTypeCount:()=>It().getTypeCount(),getInstantiationCount:()=>It().getInstantiationCount(),getRelationCacheSizes:()=>It().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>Q.getFileProcessingDiagnostics(),getAutomaticTypeDirectiveNames:()=>Z,getAutomaticTypeDirectiveResolutions:()=>ee,isSourceFileFromExternalLibrary:At,isSourceFileDefaultLibrary:function(e){if(!e.isDeclarationFile)return!1;if(e.hasNoDefaultLib)return!0;if(F.noLib)return!1;const t=fe.useCaseSensitiveFileNames()?St:xt;return F.lib?X(F.lib,n=>{const r=te.get(n);return!!r&&t(e.fileName,r.actual)}):t(e.fileName,ye())},getModeForUsageLocation:Un,getEmitSyntaxForUsageLocation:function(e,t){return DV(e,t,yn(e))},getModeForResolutionAtIndex:Vn,getSourceFileFromReference:function(e,t){return Yt(eV(t.fileName,e.fileName),Lt)},getLibFileFromReference:function(e){var t;const n=JC(e),r=n&&(null==(t=null==te?void 0:te.get(n))?void 0:t.actual);return void 0!==r?Lt(r):void 0},sourceFileToPackageName:je,redirectTargetsMap:Me,usesUriStyleNodeCoreModules:Le,resolvedModules:re,resolvedTypeReferenceDirectiveNames:oe,resolvedLibReferences:te,getProgramDiagnosticsContainer:()=>Q,getResolvedModule:tt,getResolvedModuleFromModuleSpecifier:function(e,t){return t??(t=wd(e)),gn.assertIsDefined(t,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),tt(t,e.text,Un(t,e))},getResolvedTypeReferenceDirective:rt,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:function(e,t){return rt(t,e.fileName,Hn(e,t))},forEachResolvedModule:ot,forEachResolvedTypeReferenceDirective:st,getCurrentPackagesMap:()=>ce,typesPackageExists:function(e){return ut().has(VR(e))},packageBundlesTypes:function(e){return!!ut().get(e)},isEmittedFile:function(e){if(F.noEmit)return!1;const t=kt(e);if(jt(t))return!1;const n=F.outFile;if(n)return zn(t,n)||zn(t,Qk(n)+".d.ts");if(F.declarationDir&&sa(F.declarationDir,t,xe,!fe.useCaseSensitiveFileNames()))return!0;if(F.outDir)return sa(F.outDir,t,xe,!fe.useCaseSensitiveFileNames());if(Fo(t,Ok)||SO(t)){const e=Qk(t);return!!jt(e+".ts")||!!jt(e+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return A||p},getProjectReferences:function(){return I},getResolvedProjectReferences:Pt,getRedirectFromSourceFile:_n,getResolvedProjectReferenceByPath:fn,forEachResolvedProjectReference:un,isSourceOfProjectReferenceRedirect:pn,getRedirectFromOutput:dn,getCompilerOptionsForFile:yn,getDefaultResolutionModeForFile:Wn,getEmitModuleFormatOfFile:$n,getImpliedNodeFormatForEmit:function(e){return YV(e,yn(e))},shouldTransformImportCall:Kn,emitBuildInfo:function(e){var t,n;null==(t=Yn)||t.push(Yn.Phase.Emit,"emitBuildInfo",{},!0),ar("beforeEmit");const r=DU(PU,Et(e),void 0,Gq,!1,!0);return ar("afterEmit"),sr("Emit","beforeEmit","afterEmit"),null==(n=Yn)||n.pop(),r},fileExists:Ke,readFile:Ge,directoryExists:He,getSymlinkCache:qn,realpath:null==(k=fe.realpath)?void 0:k.bind(fe),useCaseSensitiveFileNames:()=>fe.useCaseSensitiveFileNames(),getCanonicalFileName:kn,getFileIncludeReasons:()=>Q.getFileReasons(),structureIsReused:Ze,writeFile:Ft,getGlobalTypingsCacheLocation:Xe(fe,fe.getGlobalTypingsCacheLocation)};return $e(),be||function(){F.strictPropertyInitialization&&!HS(F,"strictNullChecks")&&An(ha.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks");F.exactOptionalPropertyTypes&&!HS(F,"strictNullChecks")&&An(ha.Option_0_cannot_be_specified_without_specifying_option_1,"exactOptionalPropertyTypes","strictNullChecks");(F.isolatedModules||F.verbatimModuleSyntax)&&F.outFile&&An(ha.Option_0_cannot_be_specified_with_option_1,"outFile",F.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules");F.isolatedDeclarations&&(JS(F)&&An(ha.Option_0_cannot_be_specified_with_option_1,"allowJs","isolatedDeclarations"),jS(F)||An(ha.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"isolatedDeclarations","declaration","composite"));F.inlineSourceMap&&(F.sourceMap&&An(ha.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),F.mapRoot&&An(ha.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap"));F.composite&&(!1===F.declaration&&An(ha.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===F.incremental&&An(ha.Composite_projects_may_not_disable_incremental_compilation,"declaration"));const e=F.outFile;F.tsBuildInfoFile||!F.incremental||e||F.configFilePath||Q.addConfigDiagnostic(oS(ha.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));if(function(){function e(e,t,n,r,...i){if(n){const o=sS(void 0,ha.Use_0_instead,n);Ln(!t,e,void 0,sS(o,r,...i))}else Ln(!t,e,void 0,r,...i)}Nn("5.0","5.5",e,e=>{0===F.target&&e("target","ES3"),F.noImplicitUseStrict&&e("noImplicitUseStrict"),F.keyofStringsOnly&&e("keyofStringsOnly"),F.suppressExcessPropertyErrors&&e("suppressExcessPropertyErrors"),F.suppressImplicitAnyIndexErrors&&e("suppressImplicitAnyIndexErrors"),F.noStrictGenericChecks&&e("noStrictGenericChecks"),F.charset&&e("charset"),F.out&&e("out",void 0,"outFile"),F.importsNotUsedAsValues&&e("importsNotUsedAsValues",void 0,"verbatimModuleSyntax"),F.preserveValueImports&&e("preserveValueImports",void 0,"verbatimModuleSyntax")})}(),function(){const e=F.suppressOutputPathCheck?void 0:lU(F);qC(I,ze,(t,n,r)=>{const i=(n?n.commandLine.projectReferences:I)[r],o=n&&n.sourceFile;if(function(e,t,n){function r(e,r,i,o,...a){On(t,n,o,...a)}Nn("5.0","5.5",r,t=>{e.prepend&&t("prepend")})}(i,o,r),!t)return void On(o,r,ha.File_0_not_found,i.path);const a=t.commandLine.options;if(!a.composite||a.noEmit){(n?n.commandLine.fileNames:E).length&&(a.composite||On(o,r,ha.Referenced_project_0_must_have_setting_composite_Colon_true,i.path),a.noEmit&&On(o,r,ha.Referenced_project_0_may_not_disable_emit,i.path))}!n&&e&&e===lU(a)&&(On(o,r,ha.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,e,i.path),Te.set(kt(e),!0))})}(),F.composite){const e=new Set(E.map(kt));for(const t of q)rv(t,et)&&!e.has(t.path)&&Q.addLazyConfigDiagnostic(t,ha.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,t.fileName,F.configFilePath||"")}if(F.paths)for(const e in F.paths)if(Ie(F.paths,e))if(ik(e)||Fn(!0,e,ha.Pattern_0_can_have_at_most_one_Asterisk_character,e),nt(F.paths[e])){const t=F.paths[e].length;0===t&&Fn(!1,e,ha.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,e);for(let n=0;nfO(e)&&!e.isDeclarationFile);if(F.isolatedModules||F.verbatimModuleSyntax)0===F.module&&t<2&&F.isolatedModules&&An(ha.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target"),!1===F.preserveConstEnums&&An(ha.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled,F.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules","preserveConstEnums");else if(n&&t<2&&0===F.module){const e=of(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Q.addConfigDiagnostic(rS(n,e.start,e.length,ha.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(e&&!F.emitDeclarationOnly)if(F.module&&2!==F.module&&4!==F.module)An(ha.Only_amd_and_system_modules_are_supported_alongside_0,"outFile","module");else if(void 0===F.module&&n){const e=of(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Q.addConfigDiagnostic(rS(n,e.start,e.length,ha.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,"outFile"))}LS(F)&&(1===DS(F)?An(ha.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic,"resolveJsonModule"):US(F)||An(ha.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd,"resolveJsonModule","module"));if(F.outDir||F.rootDir||F.sourceRoot||F.mapRoot||jS(F)&&F.declarationDir){const e=Ct();F.outDir&&""===e&&q.some(e=>Oo(e.fileName)>1)&&An(ha.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}F.checkJs&&!JS(F)&&An(ha.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs");F.emitDeclarationOnly&&(jS(F)||An(ha.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"));F.emitDecoratorMetadata&&!F.experimentalDecorators&&An(ha.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators");F.jsxFactory?(F.reactNamespace&&An(ha.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),4!==F.jsx&&5!==F.jsx||An(ha.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",LO.get(""+F.jsx)),dO(F.jsxFactory,t)||In("jsxFactory",ha.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,F.jsxFactory)):F.reactNamespace&&!Ss(F.reactNamespace,t)&&In("reactNamespace",ha.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,F.reactNamespace);F.jsxFragmentFactory&&(F.jsxFactory||An(ha.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),4!==F.jsx&&5!==F.jsx||An(ha.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",LO.get(""+F.jsx)),dO(F.jsxFragmentFactory,t)||In("jsxFragmentFactory",ha.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,F.jsxFragmentFactory));F.reactNamespace&&(4!==F.jsx&&5!==F.jsx||An(ha.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",LO.get(""+F.jsx)));F.jsxImportSource&&2===F.jsx&&An(ha.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",LO.get(""+F.jsx));const r=NS(F);F.verbatimModuleSyntax&&(2!==r&&3!==r&&4!==r||An(ha.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System,"verbatimModuleSyntax"));F.allowImportingTsExtensions&&!(F.noEmit||F.emitDeclarationOnly||F.rewriteRelativeImportExtensions)&&In("allowImportingTsExtensions",ha.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);const i=DS(F);F.resolvePackageJsonExports&&!$S(i)&&An(ha.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonExports");F.resolvePackageJsonImports&&!$S(i)&&An(ha.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonImports");F.customConditions&&!$S(i)&&An(ha.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"customConditions");100!==i||qS(r)||200===r||In("moduleResolution",ha.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later,"bundler");if(vi[r]&&100<=r&&r<=199&&!(3<=i&&i<=99)){const e=vi[r],t=fi[e]?e:"Node16";In("moduleResolution",ha.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,t,e)}else if(fi[i]&&3<=i&&i<=99&&!(100<=r&&r<=199)){const e=fi[i];In("module",ha.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1,e,e)}if(!F.noEmit&&!F.suppressOutputPathCheck){const e=Et(),t=new Set;cU(e,e=>{F.emitDeclarationOnly||o(e.jsFilePath,t),o(e.declarationFilePath,t)})}function o(e,t){if(e){const n=kt(e);if(Re.has(n)){let t;F.configFilePath||(t=sS(void 0,ha.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),t=sS(t,ha.Cannot_write_file_0_because_it_would_overwrite_input_file,e),Jn(e,aS(t))}const r=fe.useCaseSensitiveFileNames()?n:mt(n);t.has(r)?Jn(e,oS(ha.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,e)):t.add(r)}}}(),ar("afterProgram"),sr("Program","beforeProgram","afterProgram"),null==(C=Yn)||C.pop(),et;function tt(e,t,n){var r;return null==(r=null==re?void 0:re.get(e.path))?void 0:r.get(t,n)}function rt(e,t,n){var r;return null==(r=null==oe?void 0:oe.get(e.path))?void 0:r.get(t,n)}function ot(e,t){_t(re,e,t)}function st(e,t){_t(oe,e,t)}function _t(e,t,n){var r;n?null==(r=null==e?void 0:e.get(n.path))||r.forEach((e,r,i)=>t(e,r,i,n.path)):null==e||e.forEach((e,n)=>e.forEach((e,r,i)=>t(e,r,i,n)))}function ut(){return ce||(ce=new Map,ot(({resolvedModule:e})=>{(null==e?void 0:e.packageId)&&ce.set(e.packageId.name,".d.ts"===e.extension||!!ce.get(e.packageId.name))}),ce)}function pt(e){var t;(null==(t=e.resolutionDiagnostics)?void 0:t.length)&&Q.addFileProcessingDiagnostic({kind:2,diagnostics:e.resolutionDiagnostics})}function ft(e,t,n,r){if(fe.resolveModuleNameLiterals||!fe.resolveModuleNames)return pt(n);if(!Ne||As(t))return;const i=Lo($o(e.originalFileName,xe)),o=vt(e),a=Ne.getFromNonRelativeNameCache(t,r,i,o);a&&pt(a)}function gt(e,t,n){var r,i;const o=$o(t.originalFileName,xe),a=vt(t);null==(r=Yn)||r.push(Yn.Phase.Program,"resolveModuleNamesWorker",{containingFileName:o}),ar("beforeResolveModule");const s=De(e,o,a,F,t,n);return ar("afterResolveModule"),sr("ResolveModule","beforeResolveModule","afterResolveModule"),null==(i=Yn)||i.pop(),s}function yt(e,t,n){var r,i;const o=it(t)?void 0:t,a=it(t)?t:$o(t.originalFileName,xe),s=o&&vt(o);null==(r=Yn)||r.push(Yn.Phase.Program,"resolveTypeReferenceDirectiveNamesWorker",{containingFileName:a}),ar("beforeResolveTypeReference");const c=Fe(e,a,s,F,o,n);return ar("afterResolveTypeReference"),sr("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),null==(i=Yn)||i.pop(),c}function vt(e){var t,n;const r=_n(e.originalFileName);if(r||!SO(e.originalFileName))return null==r?void 0:r.resolvedRef;const i=null==(t=dn(e.path))?void 0:t.resolvedRef;if(i)return i;if(!fe.realpath||!F.preserveSymlinks||!e.originalFileName.includes(cR))return;const o=kt(fe.realpath(e.originalFileName));return o===e.path||null==(n=dn(o))?void 0:n.resolvedRef}function bt(e){if(sa(ve,e.fileName,!1)){const t=jo(e.fileName);if("lib.d.ts"===t||"lib.es6.d.ts"===t)return 0;const n=Ut(tn(t,"lib."),".d.ts"),r=MO.indexOf(n);if(-1!==r)return r+1}return MO.length+2}function kt(e){return Xo(e,xe,kn)}function Ct(){let e=Q.getCommonSourceDirectory();if(void 0!==e)return e;const t=P(q,e=>rv(e,et));return e=SU(F,()=>U(t,e=>e.isDeclarationFile?void 0:e.fileName),xe,kn,e=>function(e,t){let n=!0;const r=fe.getCanonicalFileName($o(t,xe));for(const i of e)if(!i.isDeclarationFile){0!==fe.getCanonicalFileName($o(i.fileName,xe)).indexOf(r)&&(Q.addLazyConfigDiagnostic(i,ha.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,i.fileName,t),n=!1)}return n}(t,e)),Q.setCommonSourceDirectory(e),e}function wt(e,t){return Dt({entries:e,containingFile:t,containingSourceFile:t,redirectedReference:vt(t),nameAndModeGetter:AV,resolutionWorker:gt,getResolutionFromOldProgram:(e,n)=>null==j?void 0:j.getResolvedModule(t,e,n),getResolved:hd,canReuseResolutionsInFile:()=>t===(null==j?void 0:j.getSourceFile(t.fileName))&&!Ee(t.path),resolveToOwnAmbientModule:!0})}function Nt(e,t){const n=it(t)?void 0:t;return Dt({entries:e,containingFile:t,containingSourceFile:n,redirectedReference:n&&vt(n),nameAndModeGetter:LV,resolutionWorker:yt,getResolutionFromOldProgram:(e,t)=>{var r;return n?null==j?void 0:j.getResolvedTypeReferenceDirective(n,e,t):null==(r=null==j?void 0:j.getAutomaticTypeDirectiveResolutions())?void 0:r.get(e,t)},getResolved:yd,canReuseResolutionsInFile:()=>n?n===(null==j?void 0:j.getSourceFile(n.fileName))&&!Ee(n.path):!Ee(kt(t))})}function Dt({entries:e,containingFile:t,containingSourceFile:n,redirectedReference:r,nameAndModeGetter:i,resolutionWorker:o,getResolutionFromOldProgram:a,getResolved:s,canReuseResolutionsInFile:c,resolveToOwnAmbientModule:l}){if(!e.length)return p;if(!(0!==Ze||l&&n.ambientModuleNames.length))return o(e,t,void 0);let _,u,d,f;const m=c();for(let c=0;cd[u[t]]=e),d):g}function Et(e){return{getCanonicalFileName:kn,getCommonSourceDirectory:et.getCommonSourceDirectory,getCompilerOptions:et.getCompilerOptions,getCurrentDirectory:()=>xe,getSourceFile:et.getSourceFile,getSourceFileByPath:et.getSourceFileByPath,getSourceFiles:et.getSourceFiles,isSourceFileFromExternalLibrary:At,getRedirectFromSourceFile:_n,isSourceOfProjectReferenceRedirect:pn,getSymlinkCache:qn,writeFile:e||Ft,isEmitBlocked:Ot,shouldTransformImportCall:Kn,getEmitModuleFormatOfFile:$n,getDefaultResolutionModeForFile:Wn,getModeForResolutionAtIndex:Vn,readFile:e=>fe.readFile(e),fileExists:e=>{const t=kt(e);return!!jt(t)||!Be.has(t)&&fe.fileExists(e)},realpath:Xe(fe,fe.realpath),useCaseSensitiveFileNames:()=>fe.useCaseSensitiveFileNames(),getBuildInfo:()=>{var e;return null==(e=et.getBuildInfo)?void 0:e.call(et)},getSourceFileFromReference:(e,t)=>et.getSourceFileFromReference(e,t),redirectTargetsMap:Me,getFileIncludeReasons:et.getFileIncludeReasons,createHash:Xe(fe,fe.createHash),getModuleResolutionCache:()=>et.getModuleResolutionCache(),trace:Xe(fe,fe.trace),getGlobalTypingsCacheLocation:et.getGlobalTypingsCacheLocation}}function Ft(e,t,n,r,i,o){fe.writeFile(e,t,n,r,i,o)}function Pt(){return ze}function At(e){return!!pe.get(e.path)}function It(){return W||(W=gJ(et))}function Ot(e){return Te.has(kt(e))}function Lt(e){return jt(kt(e))}function jt(e){return Re.get(e)||void 0}function Mt(e,t,n){return Is(e?t(e,n):R(et.getSourceFiles(),e=>(n&&n.throwIfCancellationRequested(),t(e,n))))}function Rt(e){var t;if(yT(e,F,et))return p;const n=Q.getCombinedDiagnostics(et).getDiagnostics(e.fileName);return(null==(t=e.commentDirectives)?void 0:t.length)?Vt(e,e.commentDirectives,n).diagnostics:n}function Bt(e){return jm(e)?(e.additionalSyntacticDiagnostics||(e.additionalSyntacticDiagnostics=function(e){return Jt(()=>{const t=[];return n(e,e),cO(e,n,r),t;function n(e,n){switch(n.kind){case 170:case 173:case 175:if(n.questionToken===e)return t.push(a(e,ha.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),"skip";case 174:case 177:case 178:case 179:case 219:case 263:case 220:case 261:if(n.type===e)return t.push(a(e,ha.Type_annotations_can_only_be_used_in_TypeScript_files)),"skip"}switch(e.kind){case 274:if(e.isTypeOnly)return t.push(a(n,ha._0_declarations_can_only_be_used_in_TypeScript_files,"import type")),"skip";break;case 279:if(e.isTypeOnly)return t.push(a(e,ha._0_declarations_can_only_be_used_in_TypeScript_files,"export type")),"skip";break;case 277:case 282:if(e.isTypeOnly)return t.push(a(e,ha._0_declarations_can_only_be_used_in_TypeScript_files,BF(e)?"import...type":"export...type")),"skip";break;case 272:return t.push(a(e,ha.import_can_only_be_used_in_TypeScript_files)),"skip";case 278:if(e.isExportEquals)return t.push(a(e,ha.export_can_only_be_used_in_TypeScript_files)),"skip";break;case 299:if(119===e.token)return t.push(a(e,ha.implements_clauses_can_only_be_used_in_TypeScript_files)),"skip";break;case 265:const r=ja(120);return gn.assertIsDefined(r),t.push(a(e,ha._0_declarations_can_only_be_used_in_TypeScript_files,r)),"skip";case 268:const i=32&e.flags?ja(145):ja(144);return gn.assertIsDefined(i),t.push(a(e,ha._0_declarations_can_only_be_used_in_TypeScript_files,i)),"skip";case 266:return t.push(a(e,ha.Type_aliases_can_only_be_used_in_TypeScript_files)),"skip";case 177:case 175:case 263:return e.body?void 0:(t.push(a(e,ha.Signature_declarations_can_only_be_used_in_TypeScript_files)),"skip");case 267:const o=gn.checkDefined(ja(94));return t.push(a(e,ha._0_declarations_can_only_be_used_in_TypeScript_files,o)),"skip";case 236:return t.push(a(e,ha.Non_null_assertions_can_only_be_used_in_TypeScript_files)),"skip";case 235:return t.push(a(e.type,ha.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 239:return t.push(a(e.type,ha.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 217:gn.fail()}}function r(e,n){if(eI(n)){const e=T(n.modifiers,ID);e&&t.push(a(e,ha.Decorators_are_not_valid_here))}else if(OI(n)&&n.modifiers){const e=w(n.modifiers,ID);if(e>=0)if(AD(n)&&!F.experimentalDecorators)t.push(a(n.modifiers[e],ha.Decorators_are_not_valid_here));else if(bF(n)){const r=w(n.modifiers,gD);if(r>=0){const i=w(n.modifiers,hD);if(e>r&&i>=0&&e=0&&e=0&&t.push(fT(a(n.modifiers[i],ha.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),a(n.modifiers[e],ha.Decorator_used_before_export_here)))}}}}switch(n.kind){case 264:case 232:case 175:case 177:case 178:case 179:case 219:case 263:case 220:if(e===n.typeParameters)return t.push(o(e,ha.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)),"skip";case 244:if(e===n.modifiers)return i(n.modifiers,244===n.kind),"skip";break;case 173:if(e===n.modifiers){for(const n of e)a_(n)&&126!==n.kind&&129!==n.kind&&t.push(a(n,ha.The_0_modifier_can_only_be_used_in_TypeScript_files,ja(n.kind)));return"skip"}break;case 170:if(e===n.modifiers&&X(e,a_))return t.push(o(e,ha.Parameter_modifiers_can_only_be_used_in_TypeScript_files)),"skip";break;case 214:case 215:case 234:case 286:case 287:case 216:if(e===n.typeArguments)return t.push(o(e,ha.Type_arguments_can_only_be_used_in_TypeScript_files)),"skip"}}function i(e,n){for(const r of e)switch(r.kind){case 87:if(n)continue;case 125:case 123:case 124:case 148:case 138:case 128:case 164:case 103:case 147:t.push(a(r,ha.The_0_modifier_can_only_be_used_in_TypeScript_files,ja(r.kind)))}}function o(t,n,...r){const i=t.pos;return rS(e,i,t.end-i,n,...r)}function a(t,n,...r){return Kp(e,t,n,...r)}})}(e)),Y(e.additionalSyntacticDiagnostics,e.parseDiagnostics)):e.parseDiagnostics}function Jt(e){try{return e()}catch(e){throw e instanceof Fr&&(W=void 0),e}}function zt(e,t,n){if(n)return qt(e,t,n);let r=null==H?void 0:H.get(e.path);return r||(H??(H=new Map)).set(e.path,r=qt(e,t)),r}function qt(e,t,n){return Jt(()=>{if(yT(e,F,et))return p;const r=It();gn.assert(!!e.bindDiagnostics);const i=1===e.scriptKind||2===e.scriptKind,o=Dd(e,F.checkJs),a=i&&_T(e,F);let s=e.bindDiagnostics,c=r.getDiagnostics(e,t,n);return o&&(s=P(s,e=>HV.has(e.code)),c=P(c,e=>HV.has(e.code))),function(e,t,n,...r){var i;const o=M(r);if(!t||!(null==(i=e.commentDirectives)?void 0:i.length))return o;const{diagnostics:a,directives:s}=Vt(e,e.commentDirectives,o);if(n)return a;for(const t of s.getUnusedExpectations())a.push(ef(e,t.range,ha.Unused_ts_expect_error_directive));return a}(e,!o,!!n,s,c,a?e.jsDocDiagnostics:void 0)})}function Vt(e,t,n){const r=Kd(e,t),i=n.filter(e=>-1===function(e,t){const{file:n,start:r}=e;if(!n)return-1;const i=Va(n);let o=Wa(i,r).line-1;for(;o>=0;){if(t.markUsed(o))return o;const e=n.text.slice(i[o],i[o+1]).trim();if(""!==e&&!/^\s*\/\/.*$/.test(e))return-1;o--}return-1}(e,r));return{diagnostics:i,directives:r}}function Wt(e,t){let n=null==G?void 0:G.get(e.path);return n||(G??(G=new Map)).set(e.path,n=function(e,t){return Jt(()=>{const n=It().getEmitResolver(e,t);return Uq(Et(ct),n,e)||p})}(e,t)),n}function $t(e,t){return e.isDeclarationFile?p:Wt(e,t)}function Kt(e,t,n,r){Zt(Ko(e),t,n,void 0,r)}function Ht(e,t){return e.fileName===t.fileName}function Gt(e,t){return 80===e.kind?80===t.kind&&e.escapedText===t.escapedText:11===t.kind&&e.text===t.text}function Xt(e,t){const n=kw.createStringLiteral(e),r=kw.createImportDeclaration(void 0,void 0,n);return Aw(r,2),jT(n,r),jT(r,t),n.flags&=-17,r.flags&=-17,n}function Qt(e){if(e.imports)return;const t=jm(e),n=fO(e);let r,i,o;if(t||!e.isDeclarationFile&&(FS(F)||fO(e))){F.importHelpers&&(r=[Xt(Xu,e)]);const t=rk(nk(F,e),F);t&&(r||(r=[])).push(Xt(t,e))}for(const t of e.statements)a(t,!1);return(4194304&e.flags||t)&&jC(e,!0,!0,(e,t)=>{MT(e,!1),r=le(r,t)}),e.imports=r||p,e.moduleAugmentations=i||p,void(e.ambientModuleNames=o||p);function a(t,s){if(Lp(t)){const n=Eg(t);!(n&&QN(n)&&n.text)||s&&As(n.text)||(MT(t,!1),r=le(r,n),Le||0!==ue||e.isDeclarationFile||(en(n.text,"node:")&&!OC.has(n.text)?Le=!0:void 0===Le&&IC.has(n.text)&&(Le=!1)))}else if(TF(t)&&mp(t)&&(s||Lv(t,128)||e.isDeclarationFile)){t.name.parent=t;const r=Gh(t.name);if(n||s&&!As(r))(i||(i=[])).push(t.name);else if(!s){e.isDeclarationFile&&(o||(o=[])).push(r);const n=t.body;if(n)for(const e of n.statements)a(e,!0)}}}}function Yt(e,t,n,r){if(Do(e)){const i=fe.getCanonicalFileName(e);if(!F.allowNonTsExtensions&&!g(M(ke),e=>Eo(i,e)))return void(n&&(qk(i)?n(ha.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,e):n(ha.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,e,"'"+M(Se).join("', '")+"'")));const o=t(e);if(n)if(o)zV(r)&&i===fe.getCanonicalFileName(jt(r.file).fileName)&&n(ha.A_file_cannot_have_a_reference_to_itself);else{const t=_n(e);(null==t?void 0:t.outputDts)?n(ha.Output_file_0_has_not_been_built_from_source_file_1,t.outputDts,e):n(ha.File_0_not_found,e)}return o}{const r=F.allowNonTsExtensions&&t(e);if(r)return r;if(n&&F.allowNonTsExtensions)return void n(ha.File_0_not_found,e);const i=g(Se[0],n=>t(e+n));return n&&!i&&n(ha.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,e,"'"+M(Se).join("', '")+"'"),i}}function Zt(e,t,n,r,i){Yt(e,e=>on(e,t,n,i,r),(e,...t)=>Dn(void 0,i,e,t),i)}function nn(e,t){return Zt(e,!1,!1,void 0,t)}function rn(e,t,n){!zV(n)&&X(Q.getFileReasons().get(t.path),zV)?Dn(t,n,ha.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[t.fileName,e]):Dn(t,n,ha.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[e,t.fileName])}function on(e,t,n,r,i){var o,a;null==(o=Yn)||o.push(Yn.Phase.Program,"findSourceFile",{fileName:e,isDefaultLib:t||void 0,fileIncludeKind:Pr[r.kind]});const s=function(e,t,n,r,i){var o,a;const s=kt(e);if(We){let o=dn(s);if(!o&&fe.realpath&&F.preserveSymlinks&&SO(e)&&e.includes(cR)){const t=kt(fe.realpath(e));t!==s&&(o=dn(t))}if(null==o?void 0:o.source){const a=on(o.source,t,n,r,i);return a&&cn(a,s,e,void 0),a}}const c=e;if(Re.has(s)){const n=Re.get(s),i=sn(n||void 0,r,!0);if(n&&i&&!1!==F.forceConsistentCasingInFileNames){const t=n.fileName;kt(t)!==kt(e)&&(e=(null==(o=_n(e))?void 0:o.outputDts)||e);Go(t,xe)!==Go(e,xe)&&rn(e,n,r)}return n&&pe.get(n.path)&&0===ue?(pe.set(n.path,!1),F.noResolve||(mn(n,t),hn(n)),F.noLib||Sn(n),de.set(n.path,!1),Tn(n)):n&&de.get(n.path)&&ue<_e&&(de.set(n.path,!1),Tn(n)),n||void 0}let l;if(!We){const t=_n(e);if(null==t?void 0:t.outputDts){if(t.resolvedRef.commandLine.options.outFile)return;e=t.outputDts,l=kt(t.outputDts)}}const _=an(e,Ne,fe,F),u=fe.getSourceFile(e,_,t=>Dn(void 0,r,ha.Cannot_read_file_0_Colon_1,[e,t]),Ye);if(i){const t=Sd(i),n=Oe.get(t);if(n){const t=function(e,t,n,r,i,o,a){var s;const c=jI.createRedirectedSourceFile({redirectTarget:e,unredirected:t});return c.fileName=n,c.path=r,c.resolvedPath=i,c.originalFileName=o,c.packageJsonLocations=(null==(s=a.packageJsonLocations)?void 0:s.length)?a.packageJsonLocations:void 0,c.packageJsonScope=a.packageJsonScope,pe.set(r,ue>0),c}(n,u,e,s,kt(e),c,_);return Me.add(n.path,e),cn(t,s,e,l),sn(t,r,!1),je.set(s,xd(i)),z.push(t),t}u&&(Oe.set(t,u),je.set(s,xd(i)))}if(cn(u,s,e,l),u){if(pe.set(s,ue>0),u.fileName=e,u.path=s,u.resolvedPath=kt(e),u.originalFileName=c,u.packageJsonLocations=(null==(a=_.packageJsonLocations)?void 0:a.length)?_.packageJsonLocations:void 0,u.packageJsonScope=_.packageJsonScope,sn(u,r,!1),fe.useCaseSensitiveFileNames()){const t=mt(s),n=Je.get(t);n?rn(e,n,r):Je.set(t,u)}he=he||u.hasNoDefaultLib&&!n,F.noResolve||(mn(u,t),hn(u)),F.noLib||Sn(u),Tn(u),t?J.push(u):z.push(u),(K??(K=new Set)).add(u.path)}return u}(e,t,n,r,i);return null==(a=Yn)||a.pop(),s}function an(e,t,n,r){const i=KV($o(e,xe),null==t?void 0:t.getPackageJsonInfoCache(),n,r),o=wS(r),a=xS(r);return"object"==typeof i?{...i,languageVersion:o,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}:{languageVersion:o,impliedNodeFormat:i,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}}function sn(e,t,n){return!(!e||n&&zV(t)&&(null==K?void 0:K.has(t.file)))&&(Q.getFileReasons().add(e.path,t),!0)}function cn(e,t,n,r){r?(ln(n,r,e),ln(n,t,e||!1)):ln(n,t,e)}function ln(e,t,n){Re.set(t,n),void 0!==n?Be.delete(t):Be.set(t,e)}function _n(e){return null==Ue?void 0:Ue.get(kt(e))}function un(e){return zC(ze,e)}function dn(e){return null==Ve?void 0:Ve.get(e)}function pn(e){return We&&!!_n(e)}function fn(e){if(qe)return qe.get(e)||void 0}function mn(e,t){g(e.referencedFiles,(n,r)=>{Zt(eV(n.fileName,e.fileName),t,!1,void 0,{kind:4,file:e.path,index:r})})}function hn(e){const t=e.typeReferenceDirectives;if(!t.length)return;const n=(null==se?void 0:se.get(e.path))||Nt(t,e),r=JM();(oe??(oe=new Map)).set(e.path,r);for(let i=0;i{const r=JC(t);r?Kt(bn(r),!0,!0,{kind:7,file:e.path,index:n}):Q.addFileProcessingDiagnostic({kind:0,reason:{kind:7,file:e.path,index:n}})})}function kn(e){return fe.getCanonicalFileName(e)}function Tn(e){if(Qt(e),e.imports.length||e.moduleAugmentations.length){const t=aW(e),n=(null==ie?void 0:ie.get(e.path))||wt(t,e);gn.assert(n.length===t.length);const r=yn(e),i=JM();(re??(re=new Map)).set(e.path,i);for(let o=0;o_e,f=d&&!oW(r,a,e)&&!r.noResolve&&okU(a.commandLine,!fe.useCaseSensitiveFileNames()));i.fileNames.forEach(n=>{const r=kt(n);let o;SO(n)||Eo(n,".json")||(i.options.outFile?o=e:(o=mU(n,a.commandLine,!fe.useCaseSensitiveFileNames(),t),Ve.set(kt(o),{resolvedRef:a,source:n}))),Ue.set(r,{resolvedRef:a,outputDts:o})})}return i.projectReferences&&(a.references=i.projectReferences.map(wn)),a}function Nn(e,t,n,r){const i=new Cn(e),o=new Cn(t),a=new Cn(O||c),s=function(){const e=F.ignoreDeprecations;if(e){if("5.0"===e)return new Cn(e);B()}return Cn.zero}(),l=!(1===o.compareTo(a)),_=!l&&-1===s.compareTo(i);(l||_)&&r((r,i,o)=>{l?void 0===i?n(r,i,o,ha.Option_0_has_been_removed_Please_remove_it_from_your_configuration,r):n(r,i,o,ha.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration,r,i):void 0===i?n(r,i,o,ha.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error,r,t,e):n(r,i,o,ha.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error,r,i,t,e)})}function Dn(e,t,n,r){Q.addFileProcessingDiagnostic({kind:1,file:e&&e.path,fileProcessingReason:t,diagnostic:n,args:r})}function En(e,t,n,...r){let i=!0;Pn(o=>{vE(o.initializer)&&Qf(o.initializer,e,e=>{const o=e.initializer;yE(o)&&o.elements.length>t&&(Q.addConfigDiagnostic(Kp(F.configFile,o.elements[t],n,...r)),i=!1)})}),i&&jn(n,...r)}function Fn(e,t,n,...r){let i=!0;Pn(o=>{vE(o.initializer)&&Bn(o.initializer,e,t,void 0,n,...r)&&(i=!1)}),i&&jn(n,...r)}function Pn(e){return WC(Mn(),"paths",e)}function An(e,t,n,r){Ln(!0,t,n,e,t,n,r)}function In(e,t,...n){Ln(!1,e,void 0,t,...n)}function On(e,t,n,...r){const i=em(e||F.configFile,"references",e=>yE(e.initializer)?e.initializer:void 0);i&&i.elements.length>t?Q.addConfigDiagnostic(Kp(e||F.configFile,i.elements[t],n,...r)):Q.addConfigDiagnostic(oS(n,...r))}function Ln(e,t,n,r,...i){const o=Mn();(!o||!Bn(o,e,t,n,r,...i))&&jn(r,...i)}function jn(e,...t){const n=Rn();n?"messageText"in e?Q.addConfigDiagnostic(Hp(F.configFile,n.name,e)):Q.addConfigDiagnostic(Kp(F.configFile,n.name,e,...t)):"messageText"in e?Q.addConfigDiagnostic(aS(e)):Q.addConfigDiagnostic(oS(e,...t))}function Mn(){if(void 0===Ce){const e=Rn();Ce=e&&at(e.initializer,vE)||!1}return Ce||void 0}function Rn(){return void 0===we&&(we=Qf(Yf(F.configFile),"compilerOptions",dt)||!1),we||void 0}function Bn(e,t,n,r,i,...o){let a=!1;return Qf(e,n,e=>{"messageText"in i?Q.addConfigDiagnostic(Hp(F.configFile,t?e.name:e.initializer,i)):Q.addConfigDiagnostic(Kp(F.configFile,t?e.name:e.initializer,i,...o)),a=!0},r),a}function Jn(e,t){Te.set(kt(e),!0),Q.addConfigDiagnostic(t)}function zn(e,t){return 0===aa(e,t,xe,!fe.useCaseSensitiveFileNames())}function qn(){return fe.getSymlinkCache?fe.getSymlinkCache():(V||(V=ok(xe,kn)),q&&!V.hasProcessedResolutions()&&V.setSymlinksFromResolutions(ot,st,ee),V)}function Un(e,t){return NV(e,t,yn(e))}function Vn(e,t){return Un(e,sW(e,t))}function Wn(e){return ZV(e,yn(e))}function $n(e){return QV(e,yn(e))}function Kn(e){return XV(e,yn(e))}function Hn(e,t){return e.resolutionMode||Wn(t)}}function XV(e,t){const n=NS(t);return!(100<=n&&n<=199||200===n)&&QV(e,t)<5}function QV(e,t){return YV(e,t)??NS(t)}function YV(e,t){var n,r;const i=NS(t);return 100<=i&&i<=199?e.impliedNodeFormat:1!==e.impliedNodeFormat||"commonjs"!==(null==(n=e.packageJsonScope)?void 0:n.contents.packageJsonContent.type)&&!Fo(e.fileName,[".cjs",".cts"])?99!==e.impliedNodeFormat||"module"!==(null==(r=e.packageJsonScope)?void 0:r.contents.packageJsonContent.type)&&!Fo(e.fileName,[".mjs",".mts"])?void 0:99:1}function ZV(e,t){return SS(t)?YV(e,t):void 0}var eW={diagnostics:p,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};function tW(e,t,n,r){const i=e.getCompilerOptions();if(i.noEmit)return t?eW:e.emitBuildInfo(n,r);if(!i.noEmitOnError)return;let o,a=[...e.getOptionsDiagnostics(r),...e.getSyntacticDiagnostics(t,r),...e.getGlobalDiagnostics(r),...e.getSemanticDiagnostics(t,r)];if(0===a.length&&jS(e.getCompilerOptions())&&(a=e.getDeclarationDiagnostics(void 0,r)),a.length){if(!t){const t=e.emitBuildInfo(n,r);t.diagnostics&&(a=[...a,...t.diagnostics]),o=t.emittedFiles}return{diagnostics:a,sourceMaps:void 0,emittedFiles:o,emitSkipped:!0}}}function nW(e,t){return P(e,e=>!e.skippedOn||!t[e.skippedOn])}function rW(e,t=e){return{fileExists:e=>t.fileExists(e),readDirectory:(e,n,r,i,o)=>(gn.assertIsDefined(t.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(e,n,r,i,o)),readFile:e=>t.readFile(e),directoryExists:Xe(t,t.directoryExists),getDirectories:Xe(t,t.getDirectories),realpath:Xe(t,t.realpath),useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),getCurrentDirectory:()=>e.getCurrentDirectory(),onUnRecoverableConfigFileDiagnostic:e.onUnRecoverableConfigFileDiagnostic||ut,trace:e.trace?t=>e.trace(t):void 0}}function iW(e){return sK(e.path)}function oW(e,{extension:t},{isDeclarationFile:n}){switch(t){case".ts":case".d.ts":case".mts":case".d.mts":case".cts":case".d.cts":return;case".tsx":return r();case".jsx":return r()||i();case".js":case".mjs":case".cjs":return i();case".json":return LS(e)?void 0:ha.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used;default:return n||e.allowArbitraryExtensions?void 0:ha.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}function r(){return e.jsx?void 0:ha.Module_0_was_resolved_to_1_but_jsx_is_not_set}function i(){return JS(e)||!HS(e,"noImplicitAny")?void 0:ha.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}}function aW({imports:e,moduleAugmentations:t}){const n=e.map(e=>e);for(const e of t)11===e.kind&&n.push(e);return n}function sW({imports:e,moduleAugmentations:t},n){if(nn,getFileReasons:()=>c,getCommonSourceDirectory:()=>r,getConfigDiagnostics:()=>i,getLazyConfigDiagnostics:()=>o,getCombinedDiagnostics:e=>t||(t=hy(),null==i||i.getDiagnostics().forEach(e=>t.add(e)),null==n||n.forEach(n=>{switch(n.kind){case 1:return t.add(l(e,n.file&&e.getSourceFileByPath(n.file),n.fileProcessingReason,n.diagnostic,n.args||p));case 0:return t.add(function(e,{reason:t}){const{file:n,pos:r,end:i}=UV(e,t),o=BC(n.libReferenceDirectives[t.index]),a=Jt(Ut(tn(o,"lib."),".d.ts"),MO,dt);return rS(n,gn.checkDefined(r),gn.checkDefined(i)-r,a?ha.Cannot_find_lib_definition_for_0_Did_you_mean_1:ha.Cannot_find_lib_definition_for_0,o,a)}(e,n));case 2:return n.diagnostics.forEach(e=>t.add(e));default:gn.assertNever(n)}}),null==o||o.forEach(({file:n,diagnostic:r,args:i})=>t.add(l(e,n,void 0,r,i))),a=void 0,s=void 0,t)};function l(t,n,r,i,o){let l,_,u,d,f,m;const g=n&&c.get(n.path);let h=zV(r)?r:void 0,y=n&&(null==a?void 0:a.get(n.path));y?(y.fileIncludeReasonDetails?(l=new Set(g),null==g||g.forEach(S)):null==g||g.forEach(x),f=y.redirectInfo):(null==g||g.forEach(x),f=n&&O$(n,t.getCompilerOptionsForFile(n))),r&&x(r);const v=(null==l?void 0:l.size)!==(null==g?void 0:g.length);h&&1===(null==l?void 0:l.size)&&(l=void 0),l&&y&&(y.details&&!v?m=sS(y.details,i,...o??p):y.fileIncludeReasonDetails&&(v?_=k()?le(y.fileIncludeReasonDetails.next.slice(0,g.length),_[0]):[...y.fileIncludeReasonDetails.next,_[0]]:k()?_=y.fileIncludeReasonDetails.next.slice(0,g.length):d=y.fileIncludeReasonDetails)),m||(d||(d=l&&sS(_,ha.The_file_is_in_the_program_because_Colon)),m=sS(f?d?[d,...f]:f:d,i,...o||p)),n&&(y?(!y.fileIncludeReasonDetails||!v&&d)&&(y.fileIncludeReasonDetails=d):(a??(a=new Map)).set(n.path,y={fileIncludeReasonDetails:d,redirectInfo:f}),y.details||v||(y.details=m.next));const b=h&&UV(t,h);return b&&qV(b)?Qp(b.file,b.pos,b.end-b.pos,m,u):aS(m,u);function x(e){(null==l?void 0:l.has(e))||((l??(l=new Set)).add(e),(_??(_=[])).push(M$(t,e)),S(e))}function S(n){!h&&zV(n)?h=n:h!==n&&(u=le(u,function(t,n){let r=null==s?void 0:s.get(n);void 0===r&&(s??(s=new Map)).set(n,r=function(t,n){if(zV(n)){const e=UV(t,n);let r;switch(n.kind){case 3:r=ha.File_is_included_via_import_here;break;case 4:r=ha.File_is_included_via_reference_here;break;case 5:r=ha.File_is_included_via_type_library_reference_here;break;case 7:r=ha.File_is_included_via_library_reference_here;break;default:gn.assertNever(n)}return qV(e)?rS(e.file,e.pos,e.end-e.pos,r):void 0}const r=t.getCurrentDirectory(),i=t.getRootFileNames(),o=t.getCompilerOptions();if(!o.configFile)return;let a,s;switch(n.kind){case 0:if(!o.configFile.configFileSpecs)return;const c=$o(i[n.index],r),l=L$(t,c);if(l){a=Zf(o.configFile,"files",l),s=ha.File_is_matched_by_files_list_specified_here;break}const _=j$(t,c);if(!_||!it(_))return;a=Zf(o.configFile,"include",_),s=ha.File_is_matched_by_include_pattern_specified_here;break;case 1:case 2:const u=t.getResolvedProjectReferences(),d=t.getProjectReferences(),p=gn.checkDefined(null==u?void 0:u[n.index]),f=qC(d,u,(e,t,n)=>e===p?{sourceFile:(null==t?void 0:t.sourceFile)||o.configFile,index:n}:void 0);if(!f)return;const{sourceFile:m,index:g}=f,h=em(m,"references",e=>yE(e.initializer)?e.initializer:void 0);return h&&h.elements.length>g?Kp(m,h.elements[g],2===n.kind?ha.File_is_output_from_referenced_project_specified_here:ha.File_is_source_from_referenced_project_specified_here):void 0;case 8:if(!o.types)return;a=UC(e(),"types",n.typeReference),s=ha.File_is_entry_point_of_type_library_specified_here;break;case 6:if(void 0!==n.index){a=UC(e(),"lib",o.lib[n.index]),s=ha.File_is_library_specified_here;break}const y=GS(wS(o));a=y?VC(e(),"target",y):void 0,s=ha.File_is_default_library_for_target_specified_here;break;default:gn.assertNever(n)}return a&&Kp(o.configFile,a,s)}(t,n)??!1);return r||void 0}(t,n)))}function k(){var e;return(null==(e=y.fileIncludeReasonDetails.next)?void 0:e.length)!==(null==g?void 0:g.length)}}}function lW(e,t,n,r,i,o){const a=[],{emitSkipped:s,diagnostics:c}=e.emit(t,function(e,t,n){a.push({name:e,writeByteOrderMark:n,text:t})},r,n,i,o);return{outputFiles:a,emitSkipped:s,diagnostics:c}}var _W,uW=(e=>(e[e.ComputedDts=0]="ComputedDts",e[e.StoredSignatureAtEmit=1]="StoredSignatureAtEmit",e[e.UsedVersion=2]="UsedVersion",e))(uW||{});(e=>{function t(){return function(e,t,r){const i={getKeys:e=>t.get(e),getValues:t=>e.get(t),keys:()=>e.keys(),size:()=>e.size,deleteKey:i=>{(r||(r=new Set)).add(i);const o=e.get(i);return!!o&&(o.forEach(e=>n(t,e,i)),e.delete(i),!0)},set:(o,a)=>{null==r||r.delete(o);const s=e.get(o);return e.set(o,a),null==s||s.forEach(e=>{a.has(e)||n(t,e,o)}),a.forEach(e=>{(null==s?void 0:s.has(e))||function(e,t,n){let r=e.get(t);r||(r=new Set,e.set(t,r));r.add(n)}(t,e,o)}),i}};return i}(new Map,new Map,void 0)}function n(e,t,n){const r=e.get(t);return!!(null==r?void 0:r.delete(n))&&(r.size||e.delete(t),!0)}function r(e,t){const n=e.getSymbolAtLocation(t);return n&&function(e){return U(e.declarations,e=>{var t;return null==(t=wd(e))?void 0:t.resolvedPath})}(n)}function i(e,t,n,r){var i;return Xo((null==(i=e.getRedirectFromSourceFile(t))?void 0:i.outputDts)||t,n,r)}function o(e,t,n){let o;if(t.imports&&t.imports.length>0){const n=e.getTypeChecker();for(const e of t.imports){const t=r(n,e);null==t||t.forEach(c)}}const a=Lo(t.resolvedPath);if(t.referencedFiles&&t.referencedFiles.length>0)for(const r of t.referencedFiles){c(i(e,r.fileName,a,n))}if(e.forEachResolvedTypeReferenceDirective(({resolvedTypeReferenceDirective:t})=>{if(!t)return;const r=t.resolvedFileName;c(i(e,r,a,n))},t),t.moduleAugmentations.length){const n=e.getTypeChecker();for(const e of t.moduleAugmentations){if(!QN(e))continue;const t=n.getSymbolAtLocation(e);t&&s(t)}}for(const t of e.getTypeChecker().getAmbientModules())t.declarations&&t.declarations.length>1&&s(t);return o;function s(e){if(e.declarations)for(const n of e.declarations){const e=wd(n);e&&e!==t&&c(e.resolvedPath)}}function c(e){(o||(o=new Set)).add(e)}}function a(e,t){return t&&!t.referencedMap==!e}function s(e){return 0===e.module||e.outFile?void 0:t()}function c(e,t,n,r,i){const o=t.getSourceFileByPath(n);return o?_(e,t,o,r,i)?(e.referencedMap?h:g)(e,t,o,r,i):[o]:p}function l(e,t,n,r,i){e.emit(t,(n,o,a,s,c,l)=>{gn.assert(SO(n),`File extension for signature expected to be dts: Got:: ${n}`),i(VW(e,t,o,r,l),c)},n,2,void 0,!0)}function _(e,t,n,r,i,o=e.useFileVersionAsSignature){var a;if(null==(a=e.hasCalledUpdateShapeSignature)?void 0:a.has(n.resolvedPath))return!1;const s=e.fileInfos.get(n.resolvedPath),c=s.signature;let _;return n.isDeclarationFile||o||l(t,n,r,i,t=>{_=t,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,0)}),void 0===_&&(_=n.version,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,2)),(e.oldSignatures||(e.oldSignatures=new Map)).set(n.resolvedPath,c||!1),(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n.resolvedPath),s.signature=_,_!==c}function u(e,t){if(!e.allFileNames){const n=t.getSourceFiles();e.allFileNames=n===p?p:n.map(e=>e.fileName)}return e.allFileNames}function d(e,t){const n=e.referencedMap.getKeys(t);return n?Be(n.keys()):[]}function f(e){return function(e){return X(e.moduleAugmentations,e=>bp(e.parent))}(e)||!sf(e)&&!cf(e)&&!function(e){for(const t of e.statements)if(!gp(t))return!1;return!0}(e)}function m(e,t,n){if(e.allFilesExcludingDefaultLibraryFile)return e.allFilesExcludingDefaultLibraryFile;let r;n&&i(n);for(const e of t.getSourceFiles())e!==n&&i(e);return e.allFilesExcludingDefaultLibraryFile=r||p,e.allFilesExcludingDefaultLibraryFile;function i(e){t.isSourceFileDefaultLibrary(e)||(r||(r=[])).push(e)}}function g(e,t,n){const r=t.getCompilerOptions();return r&&r.outFile?[n]:m(e,t,n)}function h(e,t,n,r,i){if(f(n))return m(e,t,n);const o=t.getCompilerOptions();if(o&&(FS(o)||o.outFile))return[n];const a=new Map;a.set(n.resolvedPath,n);const s=d(e,n.resolvedPath);for(;s.length>0;){const n=s.pop();if(!a.has(n)){const o=t.getSourceFileByPath(n);a.set(n,o),o&&_(e,t,o,r,i)&&s.push(...d(e,o.resolvedPath))}}return Be(V(a.values(),e=>e))}e.createManyToManyPathMap=t,e.canReuseOldState=a,e.createReferencedMap=s,e.create=function(e,t,n){var r,i;const c=new Map,l=e.getCompilerOptions(),_=s(l),u=a(_,t);e.getTypeChecker();for(const n of e.getSourceFiles()){const a=gn.checkDefined(n.version,"Program intended to be used with Builder should have source files with versions set"),s=u?null==(r=t.oldSignatures)?void 0:r.get(n.resolvedPath):void 0,d=void 0===s?u?null==(i=t.fileInfos.get(n.resolvedPath))?void 0:i.signature:void 0:s||void 0;if(_){const t=o(e,n,e.getCanonicalFileName);t&&_.set(n.resolvedPath,t)}c.set(n.resolvedPath,{version:a,signature:d,affectsGlobalScope:l.outFile?void 0:f(n)||void 0,impliedFormat:n.impliedNodeFormat})}return{fileInfos:c,referencedMap:_,useFileVersionAsSignature:!n&&!u}},e.releaseCache=function(e){e.allFilesExcludingDefaultLibraryFile=void 0,e.allFileNames=void 0},e.getFilesAffectedBy=function(e,t,n,r,i){var o;const a=c(e,t,n,r,i);return null==(o=e.oldSignatures)||o.clear(),a},e.getFilesAffectedByWithOldState=c,e.updateSignatureOfFile=function(e,t,n){e.fileInfos.get(n).signature=t,(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n)},e.computeDtsSignature=l,e.updateShapeSignature=_,e.getAllDependencies=function(e,t,n){if(t.getCompilerOptions().outFile)return u(e,t);if(!e.referencedMap||f(n))return u(e,t);const r=new Set,i=[n.resolvedPath];for(;i.length;){const t=i.pop();if(!r.has(t)){r.add(t);const n=e.referencedMap.getValues(t);if(n)for(const e of n.keys())i.push(e)}}return Be(V(r.keys(),e=>{var n;return(null==(n=t.getSourceFileByPath(e))?void 0:n.fileName)??e}))},e.getReferencedByPaths=d,e.getAllFilesExcludingDefaultLibraryFile=m})(_W||(_W={}));var dW=(e=>(e[e.None=0]="None",e[e.Js=1]="Js",e[e.JsMap=2]="JsMap",e[e.JsInlineMap=4]="JsInlineMap",e[e.DtsErrors=8]="DtsErrors",e[e.DtsEmit=16]="DtsEmit",e[e.DtsMap=32]="DtsMap",e[e.Dts=24]="Dts",e[e.AllJs=7]="AllJs",e[e.AllDtsEmit=48]="AllDtsEmit",e[e.AllDts=56]="AllDts",e[e.All=63]="All",e))(dW||{});function pW(e){return void 0!==e.program}function fW(e){let t=1;return e.sourceMap&&(t|=2),e.inlineSourceMap&&(t|=4),jS(e)&&(t|=24),e.declarationMap&&(t|=32),e.emitDeclarationOnly&&(t&=56),t}function mW(e,t){const n=t&&(ot(t)?t:fW(t)),r=ot(e)?e:fW(e);if(n===r)return 0;if(!n||!r)return r;const i=n^r;let o=0;return 7&i&&(o=7&r),8&i&&(o|=8&r),48&i&&(o|=48&r),o}function gW(e,t){var n,r;const i=_W.create(e,t,!1);i.program=e;const o=e.getCompilerOptions();i.compilerOptions=o;const a=o.outFile;i.semanticDiagnosticsPerFile=new Map,a&&o.composite&&(null==t?void 0:t.outSignature)&&a===t.compilerOptions.outFile&&(i.outSignature=t.outSignature&&hW(o,t.compilerOptions,t.outSignature)),i.changedFilesSet=new Set,i.latestChangedDtsFile=o.composite?null==t?void 0:t.latestChangedDtsFile:void 0,i.checkPending=!!i.compilerOptions.noCheck||void 0;const s=_W.canReuseOldState(i.referencedMap,t),c=s?t.compilerOptions:void 0;let l=s&&!QS(o,c);const _=o.composite&&(null==t?void 0:t.emitSignatures)&&!a&&!ZS(o,t.compilerOptions);let u=!0;s?(null==(n=t.changedFilesSet)||n.forEach(e=>i.changedFilesSet.add(e)),!a&&(null==(r=t.affectedFilesPendingEmit)?void 0:r.size)&&(i.affectedFilesPendingEmit=new Map(t.affectedFilesPendingEmit),i.seenAffectedFiles=new Set),i.programEmitPending=t.programEmitPending,a&&i.changedFilesSet.size&&(l=!1,u=!1),i.hasErrorsFromOldState=t.hasErrors):i.buildInfoEmitPending=RS(o);const d=i.referencedMap,p=s?t.referencedMap:void 0,f=l&&!o.skipLibCheck==!c.skipLibCheck,m=f&&!o.skipDefaultLibCheck==!c.skipDefaultLibCheck;if(i.fileInfos.forEach((n,r)=>{var a;let c,h;if(!s||!(c=t.fileInfos.get(r))||c.version!==n.version||c.impliedFormat!==n.impliedFormat||(y=h=d&&d.getValues(r),v=p&&p.getValues(r),y!==v&&(void 0===y||void 0===v||y.size!==v.size||ud(y,e=>!v.has(e))))||h&&ud(h,e=>!i.fileInfos.has(e)&&t.fileInfos.has(e)))g(r);else{const n=e.getSourceFileByPath(r),o=u?null==(a=t.emitDiagnosticsPerFile)?void 0:a.get(r):void 0;if(o&&(i.emitDiagnosticsPerFile??(i.emitDiagnosticsPerFile=new Map)).set(r,t.hasReusableDiagnostic?xW(o,r,e):yW(o,e)),l){if(n.isDeclarationFile&&!f)return;if(n.hasNoDefaultLib&&!m)return;const o=t.semanticDiagnosticsPerFile.get(r);o&&(i.semanticDiagnosticsPerFile.set(r,t.hasReusableDiagnostic?xW(o,r,e):yW(o,e)),(i.semanticDiagnosticsFromOldState??(i.semanticDiagnosticsFromOldState=new Set)).add(r))}}var y,v;if(_){const e=t.emitSignatures.get(r);e&&(i.emitSignatures??(i.emitSignatures=new Map)).set(r,hW(o,t.compilerOptions,e))}}),s&&_d(t.fileInfos,(e,t)=>!i.fileInfos.has(t)&&(!!e.affectsGlobalScope||(i.buildInfoEmitPending=!0,!!a))))_W.getAllFilesExcludingDefaultLibraryFile(i,e,void 0).forEach(e=>g(e.resolvedPath));else if(c){const t=YS(o,c)?fW(o):mW(o,c);0!==t&&(a?i.changedFilesSet.size||(i.programEmitPending=i.programEmitPending?i.programEmitPending|t:t):(e.getSourceFiles().forEach(e=>{i.changedFilesSet.has(e.resolvedPath)||$W(i,e.resolvedPath,t)}),gn.assert(!i.seenAffectedFiles||!i.seenAffectedFiles.size),i.seenAffectedFiles=i.seenAffectedFiles||new Set),i.buildInfoEmitPending=!0)}return s&&i.semanticDiagnosticsPerFile.size!==i.fileInfos.size&&t.checkPending!==i.checkPending&&(i.buildInfoEmitPending=!0),i;function g(e){i.changedFilesSet.add(e),a&&(l=!1,u=!1,i.semanticDiagnosticsFromOldState=void 0,i.semanticDiagnosticsPerFile.clear(),i.emitDiagnosticsPerFile=void 0),i.buildInfoEmitPending=!0,i.programEmitPending=void 0}}function hW(e,t,n){return!!e.declarationMap==!!t.declarationMap?n:it(n)?[n]:n[0]}function yW(e,t){return e.length?j(e,e=>{if(it(e.messageText))return e;const n=vW(e.messageText,e.file,t,e=>{var t;return null==(t=e.repopulateInfo)?void 0:t.call(e)});return n===e.messageText?e:{...e,messageText:n}}):e}function vW(e,t,n,r){const i=r(e);if(!0===i)return{...bd(t),next:bW(e.next,t,n,r)};if(i)return{...vd(t,n,i.moduleReference,i.mode,i.packageName||i.moduleReference),next:bW(e.next,t,n,r)};const o=bW(e.next,t,n,r);return o===e.next?e:{...e,next:o}}function bW(e,t,n,r){return j(e,e=>vW(e,t,n,r))}function xW(e,t,n){if(!e.length)return p;let r;return e.map(e=>{const r=SW(e,t,n,i);r.reportsUnnecessary=e.reportsUnnecessary,r.reportsDeprecated=e.reportDeprecated,r.source=e.source,r.skippedOn=e.skippedOn;const{relatedInformation:o}=e;return r.relatedInformation=o?o.length?o.map(e=>SW(e,t,n,i)):[]:void 0,r});function i(e){return r??(r=Lo($o(lU(n.getCompilerOptions()),n.getCurrentDirectory()))),Xo(e,r,n.getCanonicalFileName)}}function SW(e,t,n,r){const{file:i}=e,o=!1!==i?n.getSourceFileByPath(i?r(i):t):void 0;return{...e,file:o,messageText:it(e.messageText)?e.messageText:vW(e.messageText,o,n,e=>e.info)}}function kW(e,t){gn.assert(!t||!e.affectedFiles||e.affectedFiles[e.affectedFilesIndex-1]!==t||!e.semanticDiagnosticsPerFile.has(t.resolvedPath))}function TW(e,t,n){for(var r;;){const{affectedFiles:i}=e;if(i){const o=e.seenAffectedFiles;let a=e.affectedFilesIndex;for(;a{const i=n?55&t:7&t;i?e.affectedFilesPendingEmit.set(r,i):e.affectedFilesPendingEmit.delete(r)}),e.programEmitPending)){const t=n?55&e.programEmitPending:7&e.programEmitPending;e.programEmitPending=t||void 0}}function wW(e,t,n,r){let i=mW(e,t);return n&&(i&=56),r&&(i&=8),i}function NW(e){return e?8:56}function DW(e){if(!e.cleanedDiagnosticsOfLibFiles){e.cleanedDiagnosticsOfLibFiles=!0;const t=e.program.getCompilerOptions();g(e.program.getSourceFiles(),n=>e.program.isSourceFileDefaultLibrary(n)&&!vT(n,t,e.program)&&PW(e,n.resolvedPath))}}function EW(e,t,n,r){if(PW(e,t.resolvedPath),e.allFilesExcludingDefaultLibraryFile===e.affectedFiles)return DW(e),void _W.updateShapeSignature(e,e.program,t,n,r);e.compilerOptions.assumeChangesOnlyAffectDirectDependencies||function(e,t,n,r){var i,o;if(!e.referencedMap||!e.changedFilesSet.has(t.resolvedPath))return;if(!AW(e,t.resolvedPath))return;if(FS(e.compilerOptions)){const i=new Map;i.set(t.resolvedPath,!0);const o=_W.getReferencedByPaths(e,t.resolvedPath);for(;o.length>0;){const t=o.pop();if(!i.has(t)){if(i.set(t,!0),IW(e,t,!1,n,r))return;if(FW(e,t,!1,n,r),AW(e,t)){const n=e.program.getSourceFileByPath(t);o.push(..._W.getReferencedByPaths(e,n.resolvedPath))}}}}const a=new Set,s=!!(null==(i=t.symbol)?void 0:i.exports)&&!!_d(t.symbol.exports,n=>{if(128&n.flags)return!0;const r=px(n,e.program.getTypeChecker());return r!==n&&(!!(128&r.flags)&&X(r.declarations,e=>wd(e)===t))});null==(o=e.referencedMap.getKeys(t.resolvedPath))||o.forEach(t=>{if(IW(e,t,s,n,r))return!0;const i=e.referencedMap.getKeys(t);return i&&ud(i,t=>OW(e,t,s,a,n,r))})}(e,t,n,r)}function FW(e,t,n,r,i){if(PW(e,t),!e.changedFilesSet.has(t)){const o=e.program.getSourceFileByPath(t);o&&(_W.updateShapeSignature(e,e.program,o,r,i,!0),n?$W(e,t,fW(e.compilerOptions)):jS(e.compilerOptions)&&$W(e,t,e.compilerOptions.declarationMap?56:24))}}function PW(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function AW(e,t){const n=gn.checkDefined(e.oldSignatures).get(t)||void 0;return gn.checkDefined(e.fileInfos.get(t)).signature!==n}function IW(e,t,n,r,i){var o;return!!(null==(o=e.fileInfos.get(t))?void 0:o.affectsGlobalScope)&&(_W.getAllFilesExcludingDefaultLibraryFile(e,e.program,void 0).forEach(t=>FW(e,t.resolvedPath,n,r,i)),DW(e),!0)}function OW(e,t,n,r,i,o){var a;if($(r,t)){if(IW(e,t,n,i,o))return!0;FW(e,t,n,i,o),null==(a=e.referencedMap.getKeys(t))||a.forEach(t=>OW(e,t,n,r,i,o))}}function LW(e,t,n,r){return e.compilerOptions.noCheck?p:Y(function(e,t,n,r){r??(r=e.semanticDiagnosticsPerFile);const i=t.resolvedPath,o=r.get(i);if(o)return nW(o,e.compilerOptions);const a=e.program.getBindAndCheckDiagnostics(t,n);return r.set(i,a),e.buildInfoEmitPending=!0,nW(a,e.compilerOptions)}(e,t,n,r),e.program.getProgramDiagnostics(t))}function jW(e){var t;return!!(null==(t=e.options)?void 0:t.outFile)}function MW(e){return!!e.fileNames}function RW(e){void 0===e.hasErrors&&(RS(e.compilerOptions)?e.hasErrors=!X(e.program.getSourceFiles(),t=>{var n,r;const i=e.semanticDiagnosticsPerFile.get(t.resolvedPath);return void 0===i||!!i.length||!!(null==(r=null==(n=e.emitDiagnosticsPerFile)?void 0:n.get(t.resolvedPath))?void 0:r.length)})&&(BW(e)||X(e.program.getSourceFiles(),t=>!!e.program.getProgramDiagnostics(t).length)):e.hasErrors=X(e.program.getSourceFiles(),t=>{var n,r;const i=e.semanticDiagnosticsPerFile.get(t.resolvedPath);return!!(null==i?void 0:i.length)||!!(null==(r=null==(n=e.emitDiagnosticsPerFile)?void 0:n.get(t.resolvedPath))?void 0:r.length)})||BW(e))}function BW(e){return!!(e.program.getConfigFileParsingDiagnostics().length||e.program.getSyntacticDiagnostics().length||e.program.getOptionsDiagnostics().length||e.program.getGlobalDiagnostics().length)}function JW(e){return RW(e),e.buildInfoEmitPending??(e.buildInfoEmitPending=!!e.hasErrorsFromOldState!=!!e.hasErrors)}var zW=(e=>(e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram",e))(zW||{});function qW(e,t,n,r,i,o){let a,s,c;return void 0===e?(gn.assert(void 0===t),a=n,c=r,gn.assert(!!c),s=c.getProgram()):nt(e)?(c=r,s=GV({rootNames:e,options:t,host:n,oldProgram:c&&c.getProgramOrUndefined(),configFileParsingDiagnostics:i,projectReferences:o}),a=n):(s=e,a=t,c=n,i=r),{host:a,newProgram:s,oldProgram:c,configFileParsingDiagnostics:i||p}}function UW(e,t){return void 0!==(null==t?void 0:t.sourceMapUrlPos)?e.substring(0,t.sourceMapUrlPos):e}function VW(e,t,n,r,i){var o;let a;return n=UW(n,i),(null==(o=null==i?void 0:i.diagnostics)?void 0:o.length)&&(n+=i.diagnostics.map(n=>`${function(n){if(n.file.resolvedPath===t.resolvedPath)return`(${n.start},${n.length})`;void 0===a&&(a=Lo(t.resolvedPath));return`${Zo(_a(a,n.file.resolvedPath,e.getCanonicalFileName))}(${n.start},${n.length})`}(n)}${di[n.category]}${n.code}: ${s(n.messageText)}`).join("\n")),(r.createHash??qi)(n);function s(e){return it(e)?e:void 0===e?"":e.next?e.messageText+e.next.map(s).join("\n"):e.messageText}}function WW(e,{newProgram:t,host:n,oldProgram:r,configFileParsingDiagnostics:i}){let o=r&&r.state;if(o&&t===o.program&&i===t.getConfigFileParsingDiagnostics())return t=void 0,o=void 0,r;const a=gW(t,o);t.getBuildInfo=()=>function(e){var t,n;const r=e.program.getCurrentDirectory(),i=Lo($o(lU(e.compilerOptions),r)),o=e.latestChangedDtsFile?b(e.latestChangedDtsFile):void 0,a=[],s=new Map,c=new Set(e.program.getRootFileNames().map(t=>Xo(t,r,e.program.getCanonicalFileName)));if(RW(e),!RS(e.compilerOptions))return{root:Be(c,e=>x(e)),errors:!!e.hasErrors||void 0,checkPending:e.checkPending,version:u};const l=[];if(e.compilerOptions.outFile){const t=Be(e.fileInfos.entries(),([e,t])=>(T(e,S(e)),t.impliedFormat?{version:t.version,impliedFormat:t.impliedFormat,signature:void 0,affectsGlobalScope:void 0}:t.version));return{fileNames:a,fileInfos:t,root:l,resolvedRoot:C(),options:w(e.compilerOptions),semanticDiagnosticsPerFile:e.changedFilesSet.size?void 0:D(),emitDiagnosticsPerFile:E(),changeFileSet:O(),outSignature:e.outSignature,latestChangedDtsFile:o,pendingEmit:e.programEmitPending?e.programEmitPending!==fW(e.compilerOptions)&&e.programEmitPending:void 0,errors:!!e.hasErrors||void 0,checkPending:e.checkPending,version:u}}let _,d,f;const m=Be(e.fileInfos.entries(),([t,n])=>{var r,i;const o=S(t);T(t,o),gn.assert(a[o-1]===x(t));const s=null==(r=e.oldSignatures)?void 0:r.get(t),c=void 0!==s?s||void 0:n.signature;if(e.compilerOptions.composite){const n=e.program.getSourceFileByPath(t);if(!cf(n)&&rv(n,e.program)){const n=null==(i=e.emitSignatures)?void 0:i.get(t);n!==c&&(f=le(f,void 0===n?o:[o,it(n)||n[0]!==c?n:p]))}}return n.version===c?n.affectsGlobalScope||n.impliedFormat?{version:n.version,signature:void 0,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:n.version:void 0!==c?void 0===s?n:{version:n.version,signature:c,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:{version:n.version,signature:!1,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}});let h;(null==(t=e.referencedMap)?void 0:t.size())&&(h=Be(e.referencedMap.keys()).sort(Ft).map(t=>[S(t),k(e.referencedMap.getValues(t))]));const y=D();let v;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size){const t=fW(e.compilerOptions),n=new Set;for(const r of Be(e.affectedFilesPendingEmit.keys()).sort(Ft))if($(n,r)){const n=e.program.getSourceFileByPath(r);if(!n||!rv(n,e.program))continue;const i=S(r),o=e.affectedFilesPendingEmit.get(r);v=le(v,o===t?i:24===o?[i]:[i,o])}}return{fileNames:a,fileIdsList:_,fileInfos:m,root:l,resolvedRoot:C(),options:w(e.compilerOptions),referencedMap:h,semanticDiagnosticsPerFile:y,emitDiagnosticsPerFile:E(),changeFileSet:O(),affectedFilesPendingEmit:v,emitSignatures:f,latestChangedDtsFile:o,errors:!!e.hasErrors||void 0,checkPending:e.checkPending,version:u};function b(e){return x($o(e,r))}function x(t){return Zo(_a(i,t,e.program.getCanonicalFileName))}function S(e){let t=s.get(e);return void 0===t&&(a.push(x(e)),s.set(e,t=a.length)),t}function k(e){const t=Be(e.keys(),S).sort(Tt),n=t.join();let r=null==d?void 0:d.get(n);return void 0===r&&(_=le(_,t),(d??(d=new Map)).set(n,r=_.length)),r}function T(t,n){const r=e.program.getSourceFile(t);if(!e.program.getFileIncludeReasons().get(r.path).some(e=>0===e.kind))return;if(!l.length)return l.push(n);const i=l[l.length-1],o=nt(i);if(o&&i[1]===n-1)return i[1]=n;if(o||1===l.length||i!==n-1)return l.push(n);const a=l[l.length-2];return ot(a)&&a===i-1?(l[l.length-2]=[a,n],l.length=l.length-1):l.push(n)}function C(){let t;return c.forEach(n=>{const r=e.program.getSourceFileByPath(n);r&&n!==r.resolvedPath&&(t=le(t,[S(r.resolvedPath),S(n)]))}),t}function w(e){let t;const{optionsNameMap:n}=sL();for(const r of Le(e).sort(Ft)){const i=n.get(r.toLowerCase());(null==i?void 0:i.affectsBuildInfo)&&((t||(t={}))[r]=N(i,e[r]))}return t}function N(e,t){if(e)if(gn.assert("listOrElement"!==e.type),"list"===e.type){const n=t;if(e.element.isFilePath&&n.length)return n.map(b)}else if(e.isFilePath)return b(t);return t}function D(){let t;return e.fileInfos.forEach((n,r)=>{const i=e.semanticDiagnosticsPerFile.get(r);i?i.length&&(t=le(t,[S(r),F(i,r)])):e.changedFilesSet.has(r)||(t=le(t,S(r)))}),t}function E(){var t;let n;if(!(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size))return n;for(const t of Be(e.emitDiagnosticsPerFile.keys()).sort(Ft)){const r=e.emitDiagnosticsPerFile.get(t);n=le(n,[S(t),F(r,t)])}return n}function F(e,t){return gn.assert(!!e.length),e.map(e=>{const n=P(e,t);n.reportsUnnecessary=e.reportsUnnecessary,n.reportDeprecated=e.reportsDeprecated,n.source=e.source,n.skippedOn=e.skippedOn;const{relatedInformation:r}=e;return n.relatedInformation=r?r.length?r.map(e=>P(e,t)):[]:void 0,n})}function P(e,t){const{file:n}=e;return{...e,file:!!n&&(n.resolvedPath===t?void 0:x(n.resolvedPath)),messageText:it(e.messageText)?e.messageText:A(e.messageText)}}function A(e){if(e.repopulateInfo)return{info:e.repopulateInfo(),next:I(e.next)};const t=I(e.next);return t===e.next?e:{...e,next:t}}function I(e){return e&&g(e,(t,n)=>{const r=A(t);if(t===r)return;const i=n>0?e.slice(0,n-1):[];i.push(r);for(let t=n+1;t!!a.hasChangedEmitSignature,s.getAllDependencies=e=>_W.getAllDependencies(a,gn.checkDefined(a.program),e),s.getSemanticDiagnostics=function(e,t){if(gn.assert(pW(a)),kW(a,e),e)return LW(a,e,t);for(;;){const e=m(t);if(!e)break;if(e.affected===a.program)return e.result}let n;for(const e of a.program.getSourceFiles())n=de(n,LW(a,e,t));a.checkPending&&!a.compilerOptions.noCheck&&(a.checkPending=void 0,a.buildInfoEmitPending=!0);return n||p},s.getDeclarationDiagnostics=function(t,n){var r;if(gn.assert(pW(a)),1===e){let e,i;for(kW(a,t);e=c(void 0,n,void 0,void 0,!0);)t||(i=de(i,e.result.diagnostics));return(t?null==(r=a.emitDiagnosticsPerFile)?void 0:r.get(t.resolvedPath):i)||p}{const e=a.program.getDeclarationDiagnostics(t,n);return f(t,void 0,!0,e),e}},s.emit=function(t,n,r,i,o){gn.assert(pW(a)),1===e&&kW(a,t);const c=tW(s,t,n,r);if(c)return c;if(!t){if(1===e){let e,t,a=[],s=!1,c=[];for(;t=_(n,r,i,o);)s=s||t.result.emitSkipped,e=de(e,t.result.diagnostics),c=de(c,t.result.emittedFiles),a=de(a,t.result.sourceMaps);return{emitSkipped:s,diagnostics:e||p,emittedFiles:c,sourceMaps:a}}CW(a,i,!1)}const l=a.program.emit(t,d(n,o),r,i,o);return f(t,i,!1,l.diagnostics),l},s.releaseProgram=()=>function(e){_W.releaseCache(e),e.program=void 0}(a),0===e?s.getSemanticDiagnosticsOfNextAffectedFile=m:1===e?(s.getSemanticDiagnosticsOfNextAffectedFile=m,s.emitNextAffectedFile=_,s.emitBuildInfo=function(e,t){if(gn.assert(pW(a)),JW(a)){const r=a.program.emitBuildInfo(e||Xe(n,n.writeFile),t);return a.buildInfoEmitPending=!1,r}return eW}):gt(),s;function c(e,t,r,i,o){var s,c,_,u;gn.assert(pW(a));let p=TW(a,t,n);const f=fW(a.compilerOptions);let m,g=o?8:r?56&f:f;if(!p){if(a.compilerOptions.outFile){if(a.programEmitPending&&(g=wW(a.programEmitPending,a.seenProgramEmit,r,o),g&&(p=a.program)),!p&&(null==(s=a.emitDiagnosticsPerFile)?void 0:s.size)){const e=a.seenProgramEmit||0;if(!(e&NW(o))){a.seenProgramEmit=NW(o)|e;const t=[];return a.emitDiagnosticsPerFile.forEach(e=>de(t,e)),{result:{emitSkipped:!0,diagnostics:t},affected:a.program}}}}else{const e=function(e,t,n){var r;if(null==(r=e.affectedFilesPendingEmit)?void 0:r.size)return _d(e.affectedFilesPendingEmit,(r,i)=>{var o;const a=e.program.getSourceFileByPath(i);if(!a||!rv(a,e.program))return void e.affectedFilesPendingEmit.delete(i);const s=wW(r,null==(o=e.seenEmittedFiles)?void 0:o.get(a.resolvedPath),t,n);return s?{affectedFile:a,emitKind:s}:void 0})}(a,r,o);if(e)({affectedFile:p,emitKind:g}=e);else{const e=function(e,t){var n;if(null==(n=e.emitDiagnosticsPerFile)?void 0:n.size)return _d(e.emitDiagnosticsPerFile,(n,r)=>{var i;const o=e.program.getSourceFileByPath(r);if(!o||!rv(o,e.program))return void e.emitDiagnosticsPerFile.delete(r);const a=(null==(i=e.seenEmittedFiles)?void 0:i.get(o.resolvedPath))||0;return a&NW(t)?void 0:{affectedFile:o,diagnostics:n,seenKind:a}})}(a,o);if(e)return(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(e.affectedFile.resolvedPath,e.seenKind|NW(o)),{result:{emitSkipped:!0,diagnostics:e.diagnostics},affected:e.affectedFile}}}if(!p){if(o||!JW(a))return;const r=a.program,i=r.emitBuildInfo(e||Xe(n,n.writeFile),t);return a.buildInfoEmitPending=!1,{result:i,affected:r}}}7&g&&(m=0),56&g&&(m=void 0===m?1:void 0);const h=o?{emitSkipped:!0,diagnostics:a.program.getDeclarationDiagnostics(p===a.program?void 0:p,t)}:a.program.emit(p===a.program?void 0:p,d(e,i),t,m,i,void 0,!0);if(p!==a.program){const e=p;a.seenAffectedFiles.add(e.resolvedPath),void 0!==a.affectedFilesIndex&&a.affectedFilesIndex++,a.buildInfoEmitPending=!0;const t=(null==(c=a.seenEmittedFiles)?void 0:c.get(e.resolvedPath))||0;(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(e.resolvedPath,g|t);const n=mW((null==(_=a.affectedFilesPendingEmit)?void 0:_.get(e.resolvedPath))||f,g|t);n?(a.affectedFilesPendingEmit??(a.affectedFilesPendingEmit=new Map)).set(e.resolvedPath,n):null==(u=a.affectedFilesPendingEmit)||u.delete(e.resolvedPath),h.diagnostics.length&&(a.emitDiagnosticsPerFile??(a.emitDiagnosticsPerFile=new Map)).set(e.resolvedPath,h.diagnostics)}else a.changedFilesSet.clear(),a.programEmitPending=a.changedFilesSet.size?mW(f,g):a.programEmitPending?mW(a.programEmitPending,g):void 0,a.seenProgramEmit=g|(a.seenProgramEmit||0),l(h.diagnostics),a.buildInfoEmitPending=!0;return{result:h,affected:p}}function l(e){let t;e.forEach(e=>{if(!e.file)return;let n=null==t?void 0:t.get(e.file.resolvedPath);n||(t??(t=new Map)).set(e.file.resolvedPath,n=[]),n.push(e)}),t&&(a.emitDiagnosticsPerFile=t)}function _(e,t,n,r){return c(e,t,n,r,!1)}function d(e,t){return gn.assert(pW(a)),jS(a.compilerOptions)?(r,i,o,s,c,l)=>{var _,u,d;if(SO(r))if(a.compilerOptions.outFile){if(a.compilerOptions.composite){const e=p(a.outSignature,void 0);if(!e)return l.skippedDtsWrite=!0;a.outSignature=e}}else{let e;if(gn.assert(1===(null==c?void 0:c.length)),!t){const t=c[0],r=a.fileInfos.get(t.resolvedPath);if(r.signature===t.version){const o=VW(a.program,t,i,n,l);if((null==(_=null==l?void 0:l.diagnostics)?void 0:_.length)||(e=o),o!==t.version)if(n.storeSignatureInfo&&(a.signatureInfo??(a.signatureInfo=new Map)).set(t.resolvedPath,1),a.affectedFiles){void 0===(null==(u=a.oldSignatures)?void 0:u.get(t.resolvedPath))&&(a.oldSignatures??(a.oldSignatures=new Map)).set(t.resolvedPath,r.signature||!1),r.signature=o}else r.signature=o}}if(a.compilerOptions.composite){const t=c[0].resolvedPath;if(e=p(null==(d=a.emitSignatures)?void 0:d.get(t),e),!e)return l.skippedDtsWrite=!0;(a.emitSignatures??(a.emitSignatures=new Map)).set(t,e)}}function p(e,t){const o=!e||it(e)?e:e[0];if(t??(t=function(e,t,n){return(t.createHash??qi)(UW(e,n))}(i,n,l)),t===o){if(e===o)return;l?l.differsOnlyInMap=!0:l={differsOnlyInMap:!0}}else a.hasChangedEmitSignature=!0,a.latestChangedDtsFile=r;return t}e?e(r,i,o,s,c,l):n.writeFile?n.writeFile(r,i,o,s,c,l):a.program.writeFile(r,i,o,s,c,l)}:e||Xe(n,n.writeFile)}function f(t,n,r,i){t||1===e||(CW(a,n,r),l(i))}function m(e,t){for(gn.assert(pW(a));;){const r=TW(a,e,n);let i;if(!r)return void(a.checkPending&&!a.compilerOptions.noCheck&&(a.checkPending=void 0,a.buildInfoEmitPending=!0));if(r!==a.program){const n=r;if(t&&t(n)||(i=LW(a,n,e)),a.seenAffectedFiles.add(n.resolvedPath),a.affectedFilesIndex++,a.buildInfoEmitPending=!0,!i)continue}else{let t;const n=new Map;a.program.getSourceFiles().forEach(r=>t=de(t,LW(a,r,e,n))),a.semanticDiagnosticsPerFile=n,i=t||p,a.changedFilesSet.clear(),a.programEmitPending=fW(a.compilerOptions),a.compilerOptions.noCheck||(a.checkPending=void 0),a.buildInfoEmitPending=!0}return{result:i,affected:r}}}}function $W(e,t,n){var r,i;const o=(null==(r=e.affectedFilesPendingEmit)?void 0:r.get(t))||0;(e.affectedFilesPendingEmit??(e.affectedFilesPendingEmit=new Map)).set(t,o|n),null==(i=e.emitDiagnosticsPerFile)||i.delete(t)}function KW(e){return it(e)?{version:e,signature:e,affectsGlobalScope:void 0,impliedFormat:void 0}:it(e.signature)?e:{version:e.version,signature:!1===e.signature?void 0:e.version,affectsGlobalScope:e.affectsGlobalScope,impliedFormat:e.impliedFormat}}function HW(e,t){return ot(e)?t:e[1]||24}function GW(e,t){return e||fW(t||{})}function XW(e,t,n){var r,i,o,a;const s=Lo($o(t,n.getCurrentDirectory())),c=Xt(n.useCaseSensitiveFileNames());let l;const _=null==(r=e.fileNames)?void 0:r.map(function(e){return Xo(e,s,c)});let u;const d=e.latestChangedDtsFile?g(e.latestChangedDtsFile):void 0,f=new Map,m=new Set(O(e.changeFileSet,h));if(jW(e))e.fileInfos.forEach((e,t)=>{const n=h(t+1);f.set(n,it(e)?{version:e,signature:void 0,affectsGlobalScope:void 0,impliedFormat:void 0}:e)}),l={fileInfos:f,compilerOptions:e.options?cj(e.options,g):{},semanticDiagnosticsPerFile:y(e.semanticDiagnosticsPerFile),emitDiagnosticsPerFile:v(e.emitDiagnosticsPerFile),hasReusableDiagnostic:!0,changedFilesSet:m,latestChangedDtsFile:d,outSignature:e.outSignature,programEmitPending:void 0===e.pendingEmit?void 0:GW(e.pendingEmit,e.options),hasErrors:e.errors,checkPending:e.checkPending};else{u=null==(i=e.fileIdsList)?void 0:i.map(e=>new Set(e.map(h)));const t=(null==(o=e.options)?void 0:o.composite)&&!e.options.outFile?new Map:void 0;e.fileInfos.forEach((e,n)=>{const r=h(n+1),i=KW(e);f.set(r,i),t&&i.signature&&t.set(r,i.signature)}),null==(a=e.emitSignatures)||a.forEach(e=>{if(ot(e))t.delete(h(e));else{const n=h(e[0]);t.set(n,it(e[1])||e[1].length?e[1]:[t.get(n)])}});const n=e.affectedFilesPendingEmit?fW(e.options||{}):void 0;l={fileInfos:f,compilerOptions:e.options?cj(e.options,g):{},referencedMap:function(e,t){const n=_W.createReferencedMap(t);return n&&e?(e.forEach(([e,t])=>n.set(h(e),u[t-1])),n):n}(e.referencedMap,e.options??{}),semanticDiagnosticsPerFile:y(e.semanticDiagnosticsPerFile),emitDiagnosticsPerFile:v(e.emitDiagnosticsPerFile),hasReusableDiagnostic:!0,changedFilesSet:m,affectedFilesPendingEmit:e.affectedFilesPendingEmit&&qe(e.affectedFilesPendingEmit,e=>h(ot(e)?e:e[0]),e=>HW(e,n)),latestChangedDtsFile:d,emitSignatures:(null==t?void 0:t.size)?t:void 0,hasErrors:e.errors,checkPending:e.checkPending}}return{state:l,getProgram:gt,getProgramOrUndefined:ut,releaseProgram:ct,getCompilerOptions:()=>l.compilerOptions,getSourceFile:gt,getSourceFiles:gt,getOptionsDiagnostics:gt,getGlobalDiagnostics:gt,getConfigFileParsingDiagnostics:gt,getSyntacticDiagnostics:gt,getDeclarationDiagnostics:gt,getSemanticDiagnostics:gt,emit:gt,getAllDependencies:gt,getCurrentDirectory:gt,emitNextAffectedFile:gt,getSemanticDiagnosticsOfNextAffectedFile:gt,emitBuildInfo:gt,close:ct,hasChangedEmitSignature:lt};function g(e){return $o(e,s)}function h(e){return _[e-1]}function y(e){const t=new Map(V(f.keys(),e=>m.has(e)?void 0:[e,p]));return null==e||e.forEach(e=>{ot(e)?t.delete(h(e)):t.set(h(e[0]),e[1])}),t}function v(e){return e&&qe(e,e=>h(e[0]),e=>e[1])}}function QW(e,t,n){const r=Lo($o(t,n.getCurrentDirectory())),i=Xt(n.useCaseSensitiveFileNames()),o=new Map;let a=0;const s=new Map,c=new Map(e.resolvedRoot);return e.fileInfos.forEach((t,n)=>{const s=Xo(e.fileNames[n],r,i),c=it(t)?t:t.version;if(o.set(s,c),aXo(e,i,o))}function ZW(e,t){return{state:void 0,getProgram:n,getProgramOrUndefined:()=>e.program,releaseProgram:()=>e.program=void 0,getCompilerOptions:()=>e.compilerOptions,getSourceFile:e=>n().getSourceFile(e),getSourceFiles:()=>n().getSourceFiles(),getOptionsDiagnostics:e=>n().getOptionsDiagnostics(e),getGlobalDiagnostics:e=>n().getGlobalDiagnostics(e),getConfigFileParsingDiagnostics:()=>t,getSyntacticDiagnostics:(e,t)=>n().getSyntacticDiagnostics(e,t),getDeclarationDiagnostics:(e,t)=>n().getDeclarationDiagnostics(e,t),getSemanticDiagnostics:(e,t)=>n().getSemanticDiagnostics(e,t),emit:(e,t,r,i,o)=>n().emit(e,t,r,i,o),emitBuildInfo:(e,t)=>n().emitBuildInfo(e,t),getAllDependencies:gt,getCurrentDirectory:()=>n().getCurrentDirectory(),close:ct};function n(){return gn.checkDefined(e.program)}}function e$(e,t,n,r,i,o){return WW(0,qW(e,t,n,r,i,o))}function t$(e,t,n,r,i,o){return WW(1,qW(e,t,n,r,i,o))}function n$(e,t,n,r,i,o){const{newProgram:a,configFileParsingDiagnostics:s}=qW(e,t,n,r,i,o);return ZW({program:a,compilerOptions:a.getCompilerOptions()},s)}function r$(e){return qt(e,"/node_modules/.staging")?Ut(e,"/.staging"):X(io,t=>e.includes(t))?void 0:e}function i$(e,t){if(t<=1)return 1;let n=1,r=0===e[0].search(/[a-z]:/i);if(e[0]!==ho&&!r&&0===e[1].search(/[a-z]\$$/i)){if(2===t)return 2;n=2,r=!0}return r&&!e[n].match(/^users$/i)?n:e[n].match(/^workspaces$/i)?n+1:n+2}function o$(e,t){if(void 0===t&&(t=e.length),t<=2)return!1;return t>i$(e,t)+1}function a$(e){return o$(Bo(e))}function s$(e){return l$(Lo(e))}function c$(e,t){if(t.lengthi.length+1?p$(l,c,Math.max(i.length+1,_+1),d):{dir:n,dirPath:r,nonRecursive:!0}:d$(l,c,c.length-1,_,u,i,d,s)}function d$(e,t,n,r,i,o,a,s){if(-1!==i)return p$(e,t,i+1,a);let c=!0,l=n;if(!s)for(let e=0;e=n&&r+2function(e,t,n,r,i,o,a){const s=g$(e),c=XM(n,r,i,s,t,o,a);if(!e.getGlobalTypingsCacheLocation)return c;const l=e.getGlobalTypingsCacheLocation();if(!(void 0===l||As(n)||c.resolvedModule&&oT(c.resolvedModule.extension))){const{resolvedModule:r,failedLookupLocations:o,affectingLocations:a,resolutionDiagnostics:_}=YR(gn.checkDefined(e.globalCacheResolutionModuleName)(n),e.projectName,i,s,l,t);if(r)return c.resolvedModule=r,c.failedLookupLocations=hM(c.failedLookupLocations,o),c.affectingLocations=hM(c.affectingLocations,a),c.resolutionDiagnostics=hM(c.resolutionDiagnostics,_),c}return c}(r,i,o,e,n,t,a)}}function y$(e,t,n){let r,i,o;const a=new Set,s=new Set,c=new Set,l=new Map,_=new Map;let u,d,f,m,g,h=!1,y=!1;const b=ht(()=>e.getCurrentDirectory()),x=e.getCachedDirectoryStructureHost(),S=new Map,k=WM(b(),e.getCanonicalFileName,e.getCompilationSettings()),T=new Map,C=$M(b(),e.getCanonicalFileName,e.getCompilationSettings(),k.getPackageJsonInfoCache(),k.optionsToRedirectsKey),w=new Map,N=WM(b(),e.getCanonicalFileName,KM(e.getCompilationSettings()),k.getPackageJsonInfoCache()),D=new Map,E=new Map,F=m$(t,b),P=e.toPath(F),A=Bo(P),I=o$(A),O=new Map,L=new Map,j=new Map,M=new Map;return{rootDirForResolution:t,resolvedModuleNames:S,resolvedTypeReferenceDirectives:T,resolvedLibraries:w,resolvedFileToResolution:l,resolutionsWithFailedLookups:s,resolutionsWithOnlyAffectingLocations:c,directoryWatchesOfFailedLookups:D,fileWatchesOfAffectingLocations:E,packageDirWatchers:L,dirPathToSymlinkPackageRefCount:j,watchFailedLookupLocationsOfExternalModuleResolutions:V,getModuleResolutionCache:()=>k,startRecordingFilesWithChangedResolutions:function(){r=[]},finishRecordingFilesWithChangedResolutions:function(){const e=r;return r=void 0,e},startCachingPerDirectoryResolution:function(){k.isReadonly=void 0,C.isReadonly=void 0,N.isReadonly=void 0,k.getPackageJsonInfoCache().isReadonly=void 0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),N.clearAllExceptPackageJsonInfoCache(),G(),O.clear()},finishCachingPerDirectoryResolution:function(t,n){o=void 0,y=!1,G(),t!==n&&(!function(t){w.forEach((n,r)=>{var i;(null==(i=null==t?void 0:t.resolvedLibReferences)?void 0:i.has(r))||(ee(n,e.toPath(BV(e.getCompilationSettings(),b(),r)),hd),w.delete(r))})}(t),null==t||t.getSourceFiles().forEach(e=>{var t;const n=(null==(t=e.packageJsonLocations)?void 0:t.length)??0,r=_.get(e.resolvedPath)??p;for(let t=r.length;tn)for(let e=n;e{const r=null==t?void 0:t.getSourceFileByPath(n);r&&r.resolvedPath===n||(e.forEach(e=>E.get(e).files--),_.delete(n))}));D.forEach(J),E.forEach(z),L.forEach(B),h=!1,k.isReadonly=!0,C.isReadonly=!0,N.isReadonly=!0,k.getPackageJsonInfoCache().isReadonly=!0,O.clear()},resolveModuleNameLiterals:function(t,r,i,o,a,s){return q({entries:t,containingFile:r,containingSourceFile:a,redirectedReference:i,options:o,reusedNames:s,perFileCache:S,loader:h$(r,i,o,e,k),getResolutionWithResolvedFileName:hd,shouldRetryResolution:e=>!e.resolvedModule||!aT(e.resolvedModule.extension),logChanges:n,deferWatchingNonRelativeResolution:!0})},resolveTypeReferenceDirectiveReferences:function(t,n,r,i,o,a){return q({entries:t,containingFile:n,containingSourceFile:o,redirectedReference:r,options:i,reusedNames:a,perFileCache:T,loader:jV(n,r,i,g$(e),C),getResolutionWithResolvedFileName:yd,shouldRetryResolution:e=>void 0===e.resolvedTypeReferenceDirective,deferWatchingNonRelativeResolution:!1})},resolveLibrary:function(t,n,r,i){const o=g$(e);let a=null==w?void 0:w.get(i);if(!a||a.isInvalidated){const s=a;a=HM(t,n,r,o,N);const c=e.toPath(n);V(t,a,c,hd,!1),w.set(i,a),s&&ee(s,c,hd)}else if(cM(r,o)){const e=hd(a);sM(o,(null==e?void 0:e.resolvedFileName)?e.packageId?ha.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:ha.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:ha.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&Sd(e.packageId))}return a},resolveSingleModuleNameWithoutWatching:function(t,n){var r,i;const o=e.toPath(n),a=S.get(o),s=null==a?void 0:a.get(t,void 0);if(s&&!s.isInvalidated)return s;const c=null==(r=e.beforeResolveSingleModuleNameWithoutWatching)?void 0:r.call(e,k),l=g$(e),_=XM(t,n,e.getCompilationSettings(),l,k);return null==(i=e.afterResolveSingleModuleNameWithoutWatching)||i.call(e,k,t,n,_,c),_},removeResolutionsFromProjectReferenceRedirects:function(t){if(!Eo(t,".json"))return;const n=e.getCurrentProgram();if(!n)return;const r=n.getResolvedProjectReferenceByPath(t);if(!r)return;r.commandLine.fileNames.forEach(t=>ie(e.toPath(t)))},removeResolutionsOfFile:ie,hasChangedAutomaticTypeDirectiveNames:()=>h,invalidateResolutionOfFile:function(t){ie(t);const n=h;oe(l.get(t),_t)&&h&&!n&&e.onChangedAutomaticTypeDirectiveNames()},invalidateResolutionsOfFailedLookupLocations:ce,setFilesWithInvalidatedNonRelativeUnresolvedImports:function(e){gn.assert(o===e||void 0===o),o=e},createHasInvalidatedResolutions:function(e,t){ce();const n=i;return i=void 0,{hasInvalidatedResolutions:t=>e(t)||y||!!(null==n?void 0:n.has(t))||R(t),hasInvalidatedLibResolutions:e=>{var n;return t(e)||!!(null==(n=null==w?void 0:w.get(e))?void 0:n.isInvalidated)}}},isFileWithInvalidatedNonRelativeUnresolvedImports:R,updateTypeRootsWatch:function(){const t=e.getCompilationSettings();if(t.types)return void de();const n=kM(t,{getCurrentDirectory:b});n?xx(M,new Set(n),{createNewValue:pe,onDeleteValue:_x}):de()},closeTypeRootsWatch:de,clear:function(){vx(D,YU),vx(E,YU),O.clear(),L.clear(),j.clear(),a.clear(),de(),S.clear(),T.clear(),l.clear(),s.clear(),c.clear(),f=void 0,m=void 0,g=void 0,d=void 0,u=void 0,y=!1,k.clear(),C.clear(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings()),N.clear(),_.clear(),w.clear(),h=!1},onChangesAffectModuleResolution:function(){y=!0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings())}};function R(e){if(!o)return!1;const t=o.get(e);return!!t&&!!t.length}function B(e,t){0===e.dirPathToWatcher.size&&L.delete(t)}function J(e,t){0===e.refCount&&(D.delete(t),e.watcher.close())}function z(e,t){var n;0!==e.files||0!==e.resolutions||(null==(n=e.symlinks)?void 0:n.size)||(E.delete(t),e.watcher.close())}function q({entries:t,containingFile:n,containingSourceFile:i,redirectedReference:o,options:a,perFileCache:s,reusedNames:c,loader:l,getResolutionWithResolvedFileName:_,deferWatchingNonRelativeResolution:u,shouldRetryResolution:d,logChanges:p}){var f;const m=e.toPath(n),g=s.get(m)||s.set(m,JM()).get(m),h=[],v=p&&R(m),b=e.getCurrentProgram(),x=b&&(null==(f=b.getRedirectFromSourceFile(n))?void 0:f.resolvedRef),k=x?!o||o.sourceFile.path!==x.sourceFile.path:!!o,T=JM();for(const c of t){const t=l.nameAndMode.getName(c),f=l.nameAndMode.getMode(c,i,(null==o?void 0:o.commandLine.options)||a);let b=g.get(t,f);if(!T.has(t,f)&&(y||k||!b||b.isInvalidated||v&&!As(t)&&d(b))){const n=b;b=l.resolve(t,f),e.onDiscoveredSymlink&&v$(b)&&e.onDiscoveredSymlink(),g.set(t,f,b),b!==n&&(V(t,b,m,_,u),n&&ee(n,m,_)),p&&r&&!C(n,b)&&(r.push(m),p=!1)}else{const r=g$(e);if(cM(a,r)&&!T.has(t,f)){const e=_(b);sM(r,s===S?(null==e?void 0:e.resolvedFileName)?e.packageId?ha.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:ha.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:ha.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:(null==e?void 0:e.resolvedFileName)?e.packageId?ha.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:ha.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:ha.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&Sd(e.packageId))}}gn.assert(void 0!==b&&!b.isInvalidated),T.set(t,f,!0),h.push(b)}return null==c||c.forEach(e=>T.set(l.nameAndMode.getName(e),l.nameAndMode.getMode(e,i,(null==o?void 0:o.commandLine.options)||a),!0)),g.size()!==T.size()&&g.forEach((e,t,n)=>{T.has(t,n)||(ee(e,m,_),g.delete(t,n))}),h;function C(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=_(e),r=_(t);return n===r||!(!n||!r)&&n.resolvedFileName===r.resolvedFileName}}function U(e){return qt(e,"/node_modules/@types")}function V(t,n,r,i,o){if((n.files??(n.files=new Set)).add(r),1!==n.files.size)return;!o||As(t)?$(n):a.add(n);const s=i(n);if(s&&s.resolvedFileName){const t=e.toPath(s.resolvedFileName);let r=l.get(t);r||l.set(t,r=new Set),r.add(n)}}function W(t,n){const r=u$(t,e.toPath(t),F,P,A,I,b,e.preferNonRecursiveWatch);if(r){const{dir:e,dirPath:t,nonRecursive:i,packageDir:o,packageDirPath:a}=r;t===P?(gn.assert(i),gn.assert(!o),n=!0):Q(e,t,o,a,i)}return n}function $(e){var t;gn.assert(!!(null==(t=e.files)?void 0:t.size));const{failedLookupLocations:n,affectingLocations:r,alternateResult:i}=e;if(!(null==n?void 0:n.length)&&!(null==r?void 0:r.length)&&!i)return;((null==n?void 0:n.length)||i)&&s.add(e);let o=!1;if(n)for(const e of n)o=W(e,o);i&&(o=W(i,o)),o&&Q(F,P,void 0,void 0,!0),function(e,t){var n;gn.assert(!!(null==(n=e.files)?void 0:n.size));const{affectingLocations:r}=e;if(!(null==r?void 0:r.length))return;t&&c.add(e);for(const e of r)K(e,!0)}(e,!(null==n?void 0:n.length)&&!i)}function K(t,n){const r=E.get(t);if(r)return void(n?r.resolutions++:r.files++);let i,o=t,a=!1;e.realpath&&(o=e.realpath(t),t!==o&&(a=!0,i=E.get(o)));const s=n?1:0,c=n?0:1;if(!a||!i){const t={watcher:_$(e.toPath(o))?e.watchAffectingFileLocation(o,(t,n)=>{null==x||x.addOrDeleteFile(t,e.toPath(o),n),H(o,k.getPackageJsonInfoCache().getInternalMap()),e.scheduleInvalidateResolutionsOfFailedLookupLocations()}):z$,resolutions:a?0:s,files:a?0:c,symlinks:void 0};E.set(o,t),a&&(i=t)}if(a){gn.assert(!!i);const e={watcher:{close:()=>{var e;const n=E.get(o);!(null==(e=null==n?void 0:n.symlinks)?void 0:e.delete(t))||n.symlinks.size||n.resolutions||n.files||(E.delete(o),n.watcher.close())}},resolutions:s,files:c,symlinks:void 0};E.set(t,e),(i.symlinks??(i.symlinks=new Set)).add(t)}}function H(t,n){var r;const i=E.get(t);(null==i?void 0:i.resolutions)&&(d??(d=new Set)).add(t),(null==i?void 0:i.files)&&(u??(u=new Set)).add(t),null==(r=null==i?void 0:i.symlinks)||r.forEach(e=>H(e,n)),null==n||n.delete(e.toPath(t))}function G(){a.forEach($),a.clear()}function Q(t,n,r,i,o){i&&e.realpath?function(t,n,r,i,o){gn.assert(!o);let a=O.get(i),s=L.get(i);if(void 0===a){const t=e.realpath(r);a=t!==r&&e.toPath(t)!==i,O.set(i,a),s?s.isSymlink!==a&&(s.dirPathToWatcher.forEach(e=>{te(s.isSymlink?i:n),e.watcher=l()}),s.isSymlink=a):L.set(i,s={dirPathToWatcher:new Map,isSymlink:a})}else gn.assertIsDefined(s),gn.assert(a===s.isSymlink);const c=s.dirPathToWatcher.get(n);function l(){return a?Y(r,i,o):Y(t,n,o)}c?c.refCount++:(s.dirPathToWatcher.set(n,{watcher:l(),refCount:1}),a&&j.set(n,(j.get(n)??0)+1))}(t,n,r,i,o):Y(t,n,o)}function Y(e,t,n){let r=D.get(t);return r?(gn.assert(!!n==!!r.nonRecursive),r.refCount++):D.set(t,r={watcher:ne(e,t,n),refCount:1,nonRecursive:n}),r}function Z(t,n){const r=u$(t,e.toPath(t),F,P,A,I,b,e.preferNonRecursiveWatch);if(r){const{dirPath:t,packageDirPath:i}=r;if(t===P)n=!0;else if(i&&e.realpath){const e=L.get(i),n=e.dirPathToWatcher.get(t);if(n.refCount--,0===n.refCount&&(te(e.isSymlink?i:t),e.dirPathToWatcher.delete(t),e.isSymlink)){const e=j.get(t)-1;0===e?j.delete(t):j.set(t,e)}}else te(t)}return n}function ee(t,n,r){if(gn.checkDefined(t.files).delete(n),t.files.size)return;t.files=void 0;const i=r(t);if(i&&i.resolvedFileName){const n=e.toPath(i.resolvedFileName),r=l.get(n);(null==r?void 0:r.delete(t))&&!r.size&&l.delete(n)}const{failedLookupLocations:o,affectingLocations:a,alternateResult:_}=t;if(s.delete(t)){let e=!1;if(o)for(const t of o)e=Z(t,e);_&&(e=Z(_,e)),e&&te(P)}else(null==a?void 0:a.length)&&c.delete(t);if(a)for(const e of a){E.get(e).resolutions--}}function te(e){D.get(e).refCount--}function ne(t,n,r){return e.watchDirectoryOfFailedLookupLocation(t,t=>{const r=e.toPath(t);x&&x.addOrDeleteFileOrDirectory(t,r),ae(r,n===r)},r?0:1)}function re(e,t,n){const r=e.get(t);r&&(r.forEach(e=>ee(e,t,n)),e.delete(t))}function ie(e){re(S,e,hd),re(T,e,yd)}function oe(e,t){if(!e)return!1;let n=!1;return e.forEach(e=>{if(!e.isInvalidated&&t(e)){e.isInvalidated=n=!0;for(const t of gn.checkDefined(e.files))(i??(i=new Set)).add(t),h=h||qt(t,RV)}}),n}function ae(t,n){if(n)(g||(g=new Set)).add(t);else{const n=r$(t);if(!n)return!1;if(t=n,e.fileIsOpen(t))return!1;const r=Lo(t);if(U(t)||ma(t)||U(r)||ma(r))(f||(f=new Set)).add(t),(m||(m=new Set)).add(t);else{if(HU(e.getCurrentProgram(),t))return!1;if(Eo(t,".map"))return!1;(f||(f=new Set)).add(t),(m||(m=new Set)).add(t);const n=_R(t,!0);n&&(m||(m=new Set)).add(n)}}e.scheduleInvalidateResolutionsOfFailedLookupLocations()}function se(){const e=k.getPackageJsonInfoCache().getInternalMap();e&&(f||m||g)&&e.forEach((t,n)=>_e(n)?e.delete(n):void 0)}function ce(){var t;if(y)return u=void 0,se(),(f||m||g||d)&&oe(w,le),f=void 0,m=void 0,g=void 0,d=void 0,!0;let n=!1;return u&&(null==(t=e.getCurrentProgram())||t.getSourceFiles().forEach(e=>{X(e.packageJsonLocations,e=>u.has(e))&&((i??(i=new Set)).add(e.path),n=!0)}),u=void 0),f||m||g||d?(n=oe(s,le)||n,se(),f=void 0,m=void 0,g=void 0,n=oe(c,ue)||n,d=void 0,n):n}function le(t){var n;return!!ue(t)||!!(f||m||g)&&((null==(n=t.failedLookupLocations)?void 0:n.some(t=>_e(e.toPath(t))))||!!t.alternateResult&&_e(e.toPath(t.alternateResult)))}function _e(e){return(null==f?void 0:f.has(e))||v((null==m?void 0:m.keys())||[],t=>!!en(e,t)||void 0)||v((null==g?void 0:g.keys())||[],t=>!(!(e.length>t.length&&en(e,t))||!To(t)&&e[t.length]!==ho)||void 0)}function ue(e){var t;return!!d&&(null==(t=e.affectingLocations)?void 0:t.some(e=>d.has(e)))}function de(){vx(M,_x)}function pe(t){return function(t){return!!e.getCompilationSettings().typeRoots||s$(e.toPath(t))}(t)?e.watchTypeRootsDirectory(t,n=>{const r=e.toPath(n);x&&x.addOrDeleteFileOrDirectory(n,r),h=!0,e.onChangedAutomaticTypeDirectiveNames();const i=f$(t,e.toPath(t),P,A,I,b,e.preferNonRecursiveWatch,e=>D.has(e)||j.has(e));i&&ae(r,i===r)},1):z$}}function v$(e){var t,n;return!(!(null==(t=e.resolvedModule)?void 0:t.originalPath)&&!(null==(n=e.resolvedTypeReferenceDirective)?void 0:n.originalPath))}var b$=mo?{getCurrentDirectory:()=>mo.getCurrentDirectory(),getNewLine:()=>mo.newLine,getCanonicalFileName:Xt(mo.useCaseSensitiveFileNames)}:void 0;function x$(e,t){const n=e===mo&&b$?b$:{getCurrentDirectory:()=>e.getCurrentDirectory(),getNewLine:()=>e.newLine,getCanonicalFileName:Xt(e.useCaseSensitiveFileNames)};if(!t)return t=>e.write(lV(t,n));const r=new Array(1);return t=>{r[0]=t,e.write(xV(r,n)+n.getNewLine()),r[0]=void 0}}function S$(e,t,n){return!(!e.clearScreen||n.preserveWatchOutput||n.extendedDiagnostics||n.diagnostics||!D(k$,t.code))&&(e.clearScreen(),!0)}var k$=[ha.Starting_compilation_in_watch_mode.code,ha.File_change_detected_Starting_incremental_compilation.code];function T$(e){return e.now?e.now().toLocaleTimeString("en-US",{timeZone:"UTC"}).replace(" "," "):(new Date).toLocaleTimeString()}function C$(e,t){return t?(t,n,r)=>{S$(e,t,r);let i=`[${yV(T$(e),"")}] `;i+=`${SV(t.messageText,e.newLine)}${n+n}`,e.write(i)}:(t,n,r)=>{let i="";S$(e,t,r)||(i+=n),i+=`${T$(e)} - `,i+=`${SV(t.messageText,e.newLine)}${function(e,t){return D(k$,e.code)?t+t:t}(t,n)}`,e.write(i)}}function w$(e,t,n,r,i,o){const a=i;a.onUnRecoverableConfigFileDiagnostic=e=>Q$(i,o,e);const s=NL(e,t,a,n,r);return a.onUnRecoverableConfigFileDiagnostic=void 0,s}function N$(e){return F(e,e=>1===e.category)}function D$(e){return P(e,e=>1===e.category).map(e=>{if(void 0!==e.file)return`${e.file.fileName}`}).map(t=>{if(void 0===t)return;const n=T(e,e=>void 0!==e.file&&e.file.fileName===t);if(void 0!==n){const{line:e}=Ha(n.file,n.start);return{fileName:t,line:e+1}}})}function E$(e){return 1===e?ha.Found_1_error_Watching_for_file_changes:ha.Found_0_errors_Watching_for_file_changes}function F$(e,t){const n=yV(":"+e.line,"");return Co(e.fileName)&&Co(t)?_a(t,e.fileName,!1)+n:e.fileName+n}function P$(e,t,n,r){if(0===e)return"";const i=t.filter(e=>void 0!==e),o=i.map(e=>`${e.fileName}:${e.line}`).filter((e,t,n)=>n.indexOf(e)===t),a=i[0]&&F$(i[0],r.getCurrentDirectory());let s;s=1===e?void 0!==t[0]?[ha.Found_1_error_in_0,a]:[ha.Found_1_error]:0===o.length?[ha.Found_0_errors,e]:1===o.length?[ha.Found_0_errors_in_the_same_file_starting_at_Colon_1,e,a]:[ha.Found_0_errors_in_1_files,e,o.length];const c=oS(...s),l=o.length>1?function(e,t){const n=e.filter((e,t,n)=>t===n.findIndex(t=>(null==t?void 0:t.fileName)===(null==e?void 0:e.fileName)));if(0===n.length)return"";const r=e=>Math.log(e)*Math.LOG10E+1,i=n.map(t=>[t,F(e,e=>e.fileName===t.fileName)]),o=wt(i,0,e=>e[1]),a=ha.Errors_Files.message,s=a.split(" ")[0].length,c=Math.max(s,r(o)),l=Math.max(r(o)-s,0);let _="";return _+=" ".repeat(l)+a+"\n",i.forEach(e=>{const[n,r]=e,i=Math.log(r)*Math.LOG10E+1|0,o=iua(t,e.getCurrentDirectory(),e.getCanonicalFileName);for(const a of e.getSourceFiles())t(`${R$(a,o)}`),null==(n=i.get(a.path))||n.forEach(n=>t(` ${M$(e,n,o).messageText}`)),null==(r=O$(a,e.getCompilerOptionsForFile(a),o))||r.forEach(e=>t(` ${e.messageText}`))}function O$(e,t,n){var r;let i;if(e.path!==e.resolvedPath&&(i??(i=[])).push(sS(void 0,ha.File_is_output_of_project_reference_source_0,R$(e.originalFileName,n))),e.redirectInfo&&(i??(i=[])).push(sS(void 0,ha.File_redirects_to_file_0,R$(e.redirectInfo.redirectTarget,n))),sf(e))switch(YV(e,t)){case 99:e.packageJsonScope&&(i??(i=[])).push(sS(void 0,ha.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,R$(Te(e.packageJsonLocations),n)));break;case 1:e.packageJsonScope?(i??(i=[])).push(sS(void 0,e.packageJsonScope.contents.packageJsonContent.type?ha.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:ha.File_is_CommonJS_module_because_0_does_not_have_field_type,R$(Te(e.packageJsonLocations),n))):(null==(r=e.packageJsonLocations)?void 0:r.length)&&(i??(i=[])).push(sS(void 0,ha.File_is_CommonJS_module_because_package_json_was_not_found))}return i}function L$(e,t){var n;const r=e.getCompilerOptions().configFile;if(!(null==(n=null==r?void 0:r.configFileSpecs)?void 0:n.validatedFilesSpec))return;const i=e.getCanonicalFileName(t),o=Lo($o(r.fileName,e.getCurrentDirectory())),a=w(r.configFileSpecs.validatedFilesSpec,t=>e.getCanonicalFileName($o(t,o))===i);return-1!==a?r.configFileSpecs.validatedFilesSpecBeforeSubstitution[a]:void 0}function j$(e,t){var n,r;const i=e.getCompilerOptions().configFile;if(!(null==(n=null==i?void 0:i.configFileSpecs)?void 0:n.validatedIncludeSpecs))return;if(i.configFileSpecs.isDefaultIncludeSpec)return!0;const o=Eo(t,".json"),a=Lo($o(i.fileName,e.getCurrentDirectory())),s=e.useCaseSensitiveFileNames(),c=w(null==(r=null==i?void 0:i.configFileSpecs)?void 0:r.validatedIncludeSpecs,e=>{if(o&&!qt(e,".json"))return!1;const n=bk(e,a,"files");return!!n&&Tk(`(?:${n})$`,s).test(t)});return-1!==c?i.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[c]:void 0}function M$(e,t,n){var r,i;const o=e.getCompilerOptions();if(zV(t)){const r=UV(e,t),i=qV(r)?r.file.text.substring(r.pos,r.end):`"${r.text}"`;let o;switch(gn.assert(qV(r)||3===t.kind,"Only synthetic references are imports"),t.kind){case 3:o=qV(r)?r.packageId?ha.Imported_via_0_from_file_1_with_packageId_2:ha.Imported_via_0_from_file_1:r.text===Xu?r.packageId?ha.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:ha.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:r.packageId?ha.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:ha.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 4:gn.assert(!r.packageId),o=ha.Referenced_via_0_from_file_1;break;case 5:o=r.packageId?ha.Type_library_referenced_via_0_from_file_1_with_packageId_2:ha.Type_library_referenced_via_0_from_file_1;break;case 7:gn.assert(!r.packageId),o=ha.Library_referenced_via_0_from_file_1;break;default:gn.assertNever(t)}return sS(void 0,o,i,R$(r.file,n),r.packageId&&Sd(r.packageId))}switch(t.kind){case 0:if(!(null==(r=o.configFile)?void 0:r.configFileSpecs))return sS(void 0,ha.Root_file_specified_for_compilation);const a=$o(e.getRootFileNames()[t.index],e.getCurrentDirectory());if(L$(e,a))return sS(void 0,ha.Part_of_files_list_in_tsconfig_json);const s=j$(e,a);return it(s)?sS(void 0,ha.Matched_by_include_pattern_0_in_1,s,R$(o.configFile,n)):sS(void 0,s?ha.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:ha.Root_file_specified_for_compilation);case 1:case 2:const c=2===t.kind,l=gn.checkDefined(null==(i=e.getResolvedProjectReferences())?void 0:i[t.index]);return sS(void 0,o.outFile?c?ha.Output_from_referenced_project_0_included_because_1_specified:ha.Source_from_referenced_project_0_included_because_1_specified:c?ha.Output_from_referenced_project_0_included_because_module_is_specified_as_none:ha.Source_from_referenced_project_0_included_because_module_is_specified_as_none,R$(l.sourceFile.fileName,n),o.outFile?"--outFile":"--out");case 8:return sS(void 0,...o.types?t.packageId?[ha.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1,t.typeReference,Sd(t.packageId)]:[ha.Entry_point_of_type_library_0_specified_in_compilerOptions,t.typeReference]:t.packageId?[ha.Entry_point_for_implicit_type_library_0_with_packageId_1,t.typeReference,Sd(t.packageId)]:[ha.Entry_point_for_implicit_type_library_0,t.typeReference]);case 6:{if(void 0!==t.index)return sS(void 0,ha.Library_0_specified_in_compilerOptions,o.lib[t.index]);const e=GS(wS(o));return sS(void 0,...e?[ha.Default_library_for_target_0,e]:[ha.Default_library])}default:gn.assertNever(t)}}function R$(e,t){const n=it(e)?e:e.fileName;return t?t(n):n}function B$(e,t,n,r,i,o,a,s){const c=e.getCompilerOptions(),l=e.getConfigFileParsingDiagnostics().slice(),_=l.length;de(l,e.getSyntacticDiagnostics(void 0,o)),l.length===_&&(de(l,e.getOptionsDiagnostics(o)),c.listFilesOnly||(de(l,e.getGlobalDiagnostics(o)),l.length===_&&de(l,e.getSemanticDiagnostics(void 0,o)),c.noEmit&&jS(c)&&l.length===_&&de(l,e.getDeclarationDiagnostics(void 0,o))));const u=c.listFilesOnly?{emitSkipped:!0,diagnostics:p}:e.emit(void 0,i,o,a,s);de(l,u.diagnostics);const d=Is(l);if(d.forEach(t),n){const t=e.getCurrentDirectory();g(u.emittedFiles,e=>{const r=$o(e,t);n(`TSFILE: ${r}`)}),function(e,t){const n=e.getCompilerOptions();n.explainFiles?I$(A$(e)?e.getProgram():e,t):(n.listFiles||n.listFilesOnly)&&g(e.getSourceFiles(),e=>{t(e.fileName)})}(e,n)}return r&&r(N$(d),D$(d)),{emitResult:u,diagnostics:d}}function J$(e,t,n,r,i,o,a,s){const{emitResult:c,diagnostics:l}=B$(e,t,n,r,i,o,a,s);return c.emitSkipped&&l.length>0?1:l.length>0?2:0}var z$={close:ct},q$=()=>z$;function U$(e=mo,t){return{onWatchStatusChange:t||C$(e),watchFile:Xe(e,e.watchFile)||q$,watchDirectory:Xe(e,e.watchDirectory)||q$,setTimeout:Xe(e,e.setTimeout)||ct,clearTimeout:Xe(e,e.clearTimeout)||ct,preferNonRecursiveWatch:e.preferNonRecursiveWatch}}var V$={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function W$(e,t){const n=e.trace?t.extendedDiagnostics?2:t.diagnostics?1:0:0,r=0!==n?t=>e.trace(t):ct,i=XU(e,n,r);return i.writeLog=r,i}function $$(e,t,n=e){const r=e.useCaseSensitiveFileNames(),i={getSourceFile:rV((t,n)=>n?e.readFile(t,n):i.readFile(t),void 0),getDefaultLibLocation:Xe(e,e.getDefaultLibLocation),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:iV((t,n,r)=>e.writeFile(t,n,r),t=>e.createDirectory(t),t=>e.directoryExists(t)),getCurrentDirectory:ht(()=>e.getCurrentDirectory()),useCaseSensitiveFileNames:()=>r,getCanonicalFileName:Xt(r),getNewLine:()=>Bb(t()),fileExists:t=>e.fileExists(t),readFile:t=>e.readFile(t),trace:Xe(e,e.trace),directoryExists:Xe(n,n.directoryExists),getDirectories:Xe(n,n.getDirectories),realpath:Xe(e,e.realpath),getEnvironmentVariable:Xe(e,e.getEnvironmentVariable)||(()=>""),createHash:Xe(e,e.createHash),readDirectory:Xe(e,e.readDirectory),storeSignatureInfo:e.storeSignatureInfo,jsDocParsingMode:e.jsDocParsingMode};return i}function K$(e,t){if(t.match(MJ)){let e=t.length,n=e;for(let r=e-1;r>=0;r--){const i=t.charCodeAt(r);switch(i){case 10:r&&13===t.charCodeAt(r-1)&&r--;case 13:break;default:if(i<127||!Qa(i)){n=r;continue}}const o=t.substring(n,e);if(o.match(RJ)){t=t.substring(0,n);break}if(!o.match(BJ))break;e=n}}return(e.createHash||qi)(t)}function H$(e){const t=e.getSourceFile;e.getSourceFile=(...n)=>{const r=t.call(e,...n);return r&&(r.version=K$(e,r.text)),r}}function G$(e,t){const n=ht(()=>Lo(Ko(e.getExecutingFilePath())));return{useCaseSensitiveFileNames:()=>e.useCaseSensitiveFileNames,getNewLine:()=>e.newLine,getCurrentDirectory:ht(()=>e.getCurrentDirectory()),getDefaultLibLocation:n,getDefaultLibFileName:e=>Uo(n(),Ls(e)),fileExists:t=>e.fileExists(t),readFile:(t,n)=>e.readFile(t,n),directoryExists:t=>e.directoryExists(t),getDirectories:t=>e.getDirectories(t),readDirectory:(t,n,r,i,o)=>e.readDirectory(t,n,r,i,o),realpath:Xe(e,e.realpath),getEnvironmentVariable:Xe(e,e.getEnvironmentVariable),trace:t=>e.write(t+e.newLine),createDirectory:t=>e.createDirectory(t),writeFile:(t,n,r)=>e.writeFile(t,n,r),createHash:Xe(e,e.createHash),createProgram:t||t$,storeSignatureInfo:e.storeSignatureInfo,now:Xe(e,e.now)}}function X$(e=mo,t,n,r){const i=t=>e.write(t+e.newLine),o=G$(e,t);return Ge(o,U$(e,r)),o.afterProgramCreate=e=>{const t=e.getCompilerOptions(),r=Bb(t);B$(e,n,i,e=>o.onWatchStatusChange(oS(E$(e),e),r,t,e))},o}function Q$(e,t,n){t(n),e.exit(1)}function Y$({configFileName:e,optionsToExtend:t,watchOptionsToExtend:n,extraFileExtensions:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=a||x$(i),l=X$(i,o,c,s);return l.onUnRecoverableConfigFileDiagnostic=e=>Q$(i,c,e),l.configFileName=e,l.optionsToExtend=t,l.watchOptionsToExtend=n,l.extraFileExtensions=r,l}function Z$({rootFiles:e,options:t,watchOptions:n,projectReferences:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=X$(i,o,a||x$(i),s);return c.rootFiles=e,c.options=t,c.watchOptions=n,c.projectReferences=r,c}function eK(e){const t=e.system||mo,n=e.host||(e.host=nK(e.options,t)),r=rK(e),i=J$(r,e.reportDiagnostic||x$(t),e=>n.trace&&n.trace(e),e.reportErrorSummary||e.options.pretty?(e,r)=>t.write(P$(e,r,t.newLine,n)):void 0);return e.afterProgramEmitAndDiagnostics&&e.afterProgramEmitAndDiagnostics(r),i}function tK(e,t){const n=lU(e);if(!n)return;let r;if(t.getBuildInfo)r=t.getBuildInfo(n,e.configFilePath);else{const e=t.readFile(n);if(!e)return;r=FU(n,e)}return r&&r.version===u&&MW(r)?XW(r,n,t):void 0}function nK(e,t=mo){const n=oV(e,void 0,t);return n.createHash=Xe(t,t.createHash),n.storeSignatureInfo=t.storeSignatureInfo,H$(n),aV(n,e=>Xo(e,n.getCurrentDirectory(),n.getCanonicalFileName)),n}function rK({rootNames:e,options:t,configFileParsingDiagnostics:n,projectReferences:r,host:i,createProgram:o}){return(o=o||t$)(e,t,i=i||nK(t),tK(t,i),n,r)}function iK(e,t,n,r,i,o,a,s){return nt(e)?Z$({rootFiles:e,options:t,watchOptions:s,projectReferences:a,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o}):Y$({configFileName:e,optionsToExtend:t,watchOptionsToExtend:a,extraFileExtensions:s,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o})}function oK(e){let t,n,r,i,o,a,s,c,l=new Map([[void 0,void 0]]),_=e.extendedConfigCache,u=!1;const d=new Map;let p,f=!1;const m=e.useCaseSensitiveFileNames(),g=e.getCurrentDirectory(),{configFileName:h,optionsToExtend:y={},watchOptionsToExtend:v,extraFileExtensions:b,createProgram:x}=e;let S,k,{rootFiles:T,options:C,watchOptions:w,projectReferences:N}=e,D=!1,E=!1;const F=void 0===h?void 0:JU(e,g,m),P=F||e,A=rW(e,P);let I=G();h&&e.configFileParsingResult&&(ce(e.configFileParsingResult),I=G()),ee(ha.Starting_compilation_in_watch_mode),h&&!e.configFileParsingResult&&(I=Bb(y),gn.assert(!T),se(),I=G()),gn.assert(C),gn.assert(T);const{watchFile:O,watchDirectory:L,writeLog:j}=W$(e,C),M=Xt(m);let R;j(`Current directory: ${g} CaseSensitiveFileNames: ${m}`),h&&(R=O(h,function(){gn.assert(!!h),n=2,ie()},2e3,w,V$.ConfigFile));const B=$$(e,()=>C,P);H$(B);const J=B.getSourceFile;B.getSourceFile=(e,...t)=>Y(e,X(e),...t),B.getSourceFileByPath=Y,B.getNewLine=()=>I,B.fileExists=function(e){const t=X(e);if(Q(d.get(t)))return!1;return P.fileExists(e)},B.onReleaseOldSourceFile=function(e,t,n){const r=d.get(e.resolvedPath);void 0!==r&&(Q(r)?(p||(p=[])).push(e.path):r.sourceFile===e&&(r.fileWatcher&&r.fileWatcher.close(),d.delete(e.resolvedPath),n||z.removeResolutionsOfFile(e.path)))},B.onReleaseParsedCommandLine=function(e){var t;const n=X(e),r=null==s?void 0:s.get(n);if(!r)return;s.delete(n),r.watchedDirectories&&vx(r.watchedDirectories,YU);null==(t=r.watcher)||t.close(),UU(n,c)},B.toPath=X,B.getCompilationSettings=()=>C,B.useSourceOfProjectReferenceRedirect=Xe(e,e.useSourceOfProjectReferenceRedirect),B.preferNonRecursiveWatch=e.preferNonRecursiveWatch,B.watchDirectoryOfFailedLookupLocation=(e,t,n)=>L(e,t,n,w,V$.FailedLookupLocations),B.watchAffectingFileLocation=(e,t)=>O(e,t,2e3,w,V$.AffectingFileLocation),B.watchTypeRootsDirectory=(e,t,n)=>L(e,t,n,w,V$.TypeRoots),B.getCachedDirectoryStructureHost=()=>F,B.scheduleInvalidateResolutionsOfFailedLookupLocations=function(){if(!e.setTimeout||!e.clearTimeout)return z.invalidateResolutionsOfFailedLookupLocations();const t=ne();j("Scheduling invalidateFailedLookup"+(t?", Cancelled earlier one":"")),a=e.setTimeout(re,250,"timerToInvalidateFailedLookupResolutions")},B.onInvalidatedResolution=ie,B.onChangedAutomaticTypeDirectiveNames=ie,B.fileIsOpen=lt,B.getCurrentProgram=K,B.writeLog=j,B.getParsedCommandLine=le;const z=y$(B,h?Lo($o(h,g)):g,!1);B.resolveModuleNameLiterals=Xe(e,e.resolveModuleNameLiterals),B.resolveModuleNames=Xe(e,e.resolveModuleNames),B.resolveModuleNameLiterals||B.resolveModuleNames||(B.resolveModuleNameLiterals=z.resolveModuleNameLiterals.bind(z)),B.resolveTypeReferenceDirectiveReferences=Xe(e,e.resolveTypeReferenceDirectiveReferences),B.resolveTypeReferenceDirectives=Xe(e,e.resolveTypeReferenceDirectives),B.resolveTypeReferenceDirectiveReferences||B.resolveTypeReferenceDirectives||(B.resolveTypeReferenceDirectiveReferences=z.resolveTypeReferenceDirectiveReferences.bind(z)),B.resolveLibrary=e.resolveLibrary?e.resolveLibrary.bind(e):z.resolveLibrary.bind(z),B.getModuleResolutionCache=e.resolveModuleNameLiterals||e.resolveModuleNames?Xe(e,e.getModuleResolutionCache):()=>z.getModuleResolutionCache();const q=!!(e.resolveModuleNameLiterals||e.resolveTypeReferenceDirectiveReferences||e.resolveModuleNames||e.resolveTypeReferenceDirectives)?Xe(e,e.hasInvalidatedResolutions)||_t:lt,U=e.resolveLibrary?Xe(e,e.hasInvalidatedLibResolutions)||_t:lt;return t=tK(C,B),H(),h?{getCurrentProgram:$,getProgram:ae,close:V,getResolutionCache:W}:{getCurrentProgram:$,getProgram:ae,updateRootFileNames:function(e){gn.assert(!h,"Cannot update root file names with config file watch mode"),T=e,ie()},close:V,getResolutionCache:W};function V(){ne(),z.clear(),vx(d,e=>{e&&e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}),R&&(R.close(),R=void 0),null==_||_.clear(),_=void 0,c&&(vx(c,YU),c=void 0),i&&(vx(i,YU),i=void 0),r&&(vx(r,_x),r=void 0),s&&(vx(s,e=>{var t;null==(t=e.watcher)||t.close(),e.watcher=void 0,e.watchedDirectories&&vx(e.watchedDirectories,YU),e.watchedDirectories=void 0}),s=void 0),t=void 0}function W(){return z}function $(){return t}function K(){return t&&t.getProgramOrUndefined()}function H(){j("Synchronizing program"),gn.assert(C),gn.assert(T),ne();const n=$();f&&(I=G(),n&&ad(n.getCompilerOptions(),C)&&z.onChangesAffectModuleResolution());const{hasInvalidatedResolutions:o,hasInvalidatedLibResolutions:a}=z.createHasInvalidatedResolutions(q,U),{originalReadFile:c,originalFileExists:_,originalDirectoryExists:y,originalCreateDirectory:v,originalWriteFile:b,readFileWithCache:D}=aV(B,X);return VV(K(),T,C,e=>function(e,t){const n=d.get(e);if(!n)return;if(n.version)return n.version;const r=t(e);return void 0!==r?K$(B,r):void 0}(e,D),e=>B.fileExists(e),o,a,te,le,N)?E&&(u&&ee(ha.File_change_detected_Starting_incremental_compilation),t=x(void 0,void 0,B,t,k,N),E=!1):(u&&ee(ha.File_change_detected_Starting_incremental_compilation),function(e,n){j("CreatingProgramWith::"),j(` roots: ${JSON.stringify(T)}`),j(` options: ${JSON.stringify(C)}`),N&&j(` projectReferences: ${JSON.stringify(N)}`);const i=f||!K();f=!1,E=!1,z.startCachingPerDirectoryResolution(),B.hasInvalidatedResolutions=e,B.hasInvalidatedLibResolutions=n,B.hasChangedAutomaticTypeDirectiveNames=te;const o=K();t=x(T,C,B,t,k,N),z.finishCachingPerDirectoryResolution(t.getProgram(),o),WU(t.getProgram(),r||(r=new Map),pe),i&&z.updateTypeRootsWatch();if(p){for(const e of p)r.has(e)||d.delete(e);p=void 0}}(o,a)),u=!1,e.afterProgramCreate&&n!==t&&e.afterProgramCreate(t),B.readFile=c,B.fileExists=_,B.directoryExists=y,B.createDirectory=v,B.writeFile=b,null==l||l.forEach((e,t)=>{if(t){const n=null==s?void 0:s.get(t);n&&function(e,t,n){var r,i,o,a;n.watcher||(n.watcher=O(e,(n,r)=>{de(e,t,r);const i=null==s?void 0:s.get(t);i&&(i.updateLevel=2),z.removeResolutionsFromProjectReferenceRedirects(t),ie()},2e3,(null==(r=n.parsedCommandLine)?void 0:r.watchOptions)||w,V$.ConfigFileOfReferencedProject)),$U(n.watchedDirectories||(n.watchedDirectories=new Map),null==(i=n.parsedCommandLine)?void 0:i.wildcardDirectories,(r,i)=>{var o;return L(r,n=>{const i=X(n);F&&F.addOrDeleteFileOrDirectory(n,i),Z(i);const o=null==s?void 0:s.get(t);(null==o?void 0:o.parsedCommandLine)&&(KU({watchedDirPath:X(r),fileOrDirectory:n,fileOrDirectoryPath:i,configFileName:e,options:o.parsedCommandLine.options,program:o.parsedCommandLine.fileNames,currentDirectory:g,useCaseSensitiveFileNames:m,writeLog:j,toPath:X})||2!==o.updateLevel&&(o.updateLevel=1,ie()))},i,(null==(o=n.parsedCommandLine)?void 0:o.watchOptions)||w,V$.WildcardDirectoryOfReferencedProject)}),ge(t,null==(o=n.parsedCommandLine)?void 0:o.options,(null==(a=n.parsedCommandLine)?void 0:a.watchOptions)||w,V$.ExtendedConfigOfReferencedProject)}(e,t,n)}else $U(i||(i=new Map),S,me),h&&ge(X(h),C,w,V$.ExtendedConfigFile)}),l=void 0,t}function G(){return Bb(C||y)}function X(e){return Xo(e,g,M)}function Q(e){return"boolean"==typeof e}function Y(e,t,n,r,i){const o=d.get(t);if(Q(o))return;const a="object"==typeof n?n.impliedNodeFormat:void 0;if(void 0===o||i||function(e){return"boolean"==typeof e.version}(o)||o.sourceFile.impliedNodeFormat!==a){const i=J(e,n,r);if(o)i?(o.sourceFile=i,o.version=i.version,o.fileWatcher||(o.fileWatcher=_e(t,e,ue,250,w,V$.SourceFile))):(o.fileWatcher&&o.fileWatcher.close(),d.set(t,!1));else if(i){const n=_e(t,e,ue,250,w,V$.SourceFile);d.set(t,{sourceFile:i,version:i.version,fileWatcher:n})}else d.set(t,!1);return i}return o.sourceFile}function Z(e){const t=d.get(e);void 0!==t&&(Q(t)?d.set(e,{version:!1}):t.version=!1)}function ee(t){e.onWatchStatusChange&&e.onWatchStatusChange(oS(t),I,C||y)}function te(){return z.hasChangedAutomaticTypeDirectiveNames()}function ne(){return!!a&&(e.clearTimeout(a),a=void 0,!0)}function re(){a=void 0,z.invalidateResolutionsOfFailedLookupLocations()&&ie()}function ie(){e.setTimeout&&e.clearTimeout&&(o&&e.clearTimeout(o),j("Scheduling update"),o=e.setTimeout(oe,250,"timerToUpdateProgram"))}function oe(){o=void 0,u=!0,ae()}function ae(){switch(n){case 1:!function(){j("Reloading new file names and options"),gn.assert(C),gn.assert(h),n=0,T=Kj(C.configFile.configFileSpecs,$o(Lo(h),g),C,A,b),Dj(T,$o(h,g),C.configFile.configFileSpecs,k,D)&&(E=!0);H()}();break;case 2:!function(){gn.assert(h),j(`Reloading config file: ${h}`),n=0,F&&F.clearCache();se(),f=!0,(l??(l=new Map)).set(void 0,void 0),H()}();break;default:H()}return $()}function se(){gn.assert(h),ce(NL(h,y,A,_||(_=new Map),v,b))}function ce(e){T=e.fileNames,C=e.options,w=e.watchOptions,N=e.projectReferences,S=e.wildcardDirectories,k=WV(e).slice(),D=Nj(e.raw),E=!0}function le(t){const n=X(t);let r=null==s?void 0:s.get(n);if(r){if(!r.updateLevel)return r.parsedCommandLine;if(r.parsedCommandLine&&1===r.updateLevel&&!e.getParsedCommandLine){j("Reloading new file names and options"),gn.assert(C);const e=Kj(r.parsedCommandLine.options.configFile.configFileSpecs,$o(Lo(t),g),C,A);return r.parsedCommandLine={...r.parsedCommandLine,fileNames:e},r.updateLevel=void 0,r.parsedCommandLine}}j(`Loading config file: ${t}`);const i=e.getParsedCommandLine?e.getParsedCommandLine(t):function(e){const t=A.onUnRecoverableConfigFileDiagnostic;A.onUnRecoverableConfigFileDiagnostic=ct;const n=NL(e,void 0,A,_||(_=new Map),v);return A.onUnRecoverableConfigFileDiagnostic=t,n}(t);return r?(r.parsedCommandLine=i,r.updateLevel=void 0):(s||(s=new Map)).set(n,r={parsedCommandLine:i}),(l??(l=new Map)).set(n,t),i}function _e(e,t,n,r,i,o){return O(t,(t,r)=>n(t,r,e),r,i,o)}function ue(e,t,n){de(e,n,t),2===t&&d.has(n)&&z.invalidateResolutionOfFile(n),Z(n),ie()}function de(e,t,n){F&&F.addOrDeleteFile(e,t,n)}function pe(e,t){return(null==s?void 0:s.has(e))?z$:_e(e,t,fe,500,w,V$.MissingFile)}function fe(e,t,n){de(e,n,t),0===t&&r.has(n)&&(r.get(n).close(),r.delete(n),Z(n),ie())}function me(e,t){return L(e,t=>{gn.assert(h),gn.assert(C);const r=X(t);F&&F.addOrDeleteFileOrDirectory(t,r),Z(r),KU({watchedDirPath:X(e),fileOrDirectory:t,fileOrDirectoryPath:r,configFileName:h,extraFileExtensions:b,options:C,program:$()||T,currentDirectory:g,useCaseSensitiveFileNames:m,writeLog:j,toPath:X})||2!==n&&(n=1,ie())},t,w,V$.WildcardDirectory)}function ge(e,t,r,i){qU(e,t,c||(c=new Map),(e,t)=>O(e,(r,i)=>{var o;de(e,t,i),_&&VU(_,t,X);const a=null==(o=c.get(t))?void 0:o.projects;(null==a?void 0:a.size)&&a.forEach(e=>{if(h&&X(h)===e)n=2;else{const t=null==s?void 0:s.get(e);t&&(t.updateLevel=2),z.removeResolutionsFromProjectReferenceRedirects(e)}ie()})},2e3,r,i),X)}}var aK=(e=>(e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutputMissing=3]="OutputMissing",e[e.ErrorReadingFile=4]="ErrorReadingFile",e[e.OutOfDateWithSelf=5]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",e[e.OutOfDateBuildInfoWithPendingEmit=7]="OutOfDateBuildInfoWithPendingEmit",e[e.OutOfDateBuildInfoWithErrors=8]="OutOfDateBuildInfoWithErrors",e[e.OutOfDateOptions=9]="OutOfDateOptions",e[e.OutOfDateRoots=10]="OutOfDateRoots",e[e.UpstreamOutOfDate=11]="UpstreamOutOfDate",e[e.UpstreamBlocked=12]="UpstreamBlocked",e[e.ComputingUpstream=13]="ComputingUpstream",e[e.TsVersionOutputOfDate=14]="TsVersionOutputOfDate",e[e.UpToDateWithInputFileText=15]="UpToDateWithInputFileText",e[e.ContainerOnly=16]="ContainerOnly",e[e.ForceBuild=17]="ForceBuild",e))(aK||{});function sK(e){return Eo(e,".json")?e:Uo(e,"tsconfig.json")}var cK=new Date(-864e13);function lK(e,t){return function(e,t,n){const r=e.get(t);let i;return r||(i=n(),e.set(t,i)),r||i}(e,t,()=>new Map)}function _K(e){return e.now?e.now():new Date}function uK(e){return!!e&&!!e.buildOrder}function dK(e){return uK(e)?e.buildOrder:e}function pK(e,t){return n=>{let r=t?`[${yV(T$(e),"")}] `:`${T$(e)} - `;r+=`${SV(n.messageText,e.newLine)}${e.newLine+e.newLine}`,e.write(r)}}function fK(e,t,n,r){const i=G$(e,t);return i.getModifiedTime=e.getModifiedTime?t=>e.getModifiedTime(t):ut,i.setModifiedTime=e.setModifiedTime?(t,n)=>e.setModifiedTime(t,n):ct,i.deleteFile=e.deleteFile?t=>e.deleteFile(t):ct,i.reportDiagnostic=n||x$(e),i.reportSolutionBuilderStatus=r||pK(e),i.now=Xe(e,e.now),i}function mK(e=mo,t,n,r,i){const o=fK(e,t,n,r);return o.reportErrorSummary=i,o}function gK(e=mo,t,n,r,i){const o=fK(e,t,n,r);return Ge(o,U$(e,i)),o}function hK(e,t,n){return _H(!1,e,t,n)}function yK(e,t,n,r){return _H(!0,e,t,n,r)}function vK(e,t,n,r,i){const o=t,a=t,s=function(e){const t={};return JO.forEach(n=>{Ie(e,n.name)&&(t[n.name]=e[n.name])}),t.tscBuild=!0,t}(r),c=$$(o,()=>m.projectCompilerOptions);let l,_,u;H$(c),c.getParsedCommandLine=e=>TK(m,e,xK(m,e)),c.resolveModuleNameLiterals=Xe(o,o.resolveModuleNameLiterals),c.resolveTypeReferenceDirectiveReferences=Xe(o,o.resolveTypeReferenceDirectiveReferences),c.resolveLibrary=Xe(o,o.resolveLibrary),c.resolveModuleNames=Xe(o,o.resolveModuleNames),c.resolveTypeReferenceDirectives=Xe(o,o.resolveTypeReferenceDirectives),c.getModuleResolutionCache=Xe(o,o.getModuleResolutionCache),c.resolveModuleNameLiterals||c.resolveModuleNames||(l=WM(c.getCurrentDirectory(),c.getCanonicalFileName),c.resolveModuleNameLiterals=(e,t,n,r,i)=>MV(e,t,n,r,i,o,l,IV),c.getModuleResolutionCache=()=>l),c.resolveTypeReferenceDirectiveReferences||c.resolveTypeReferenceDirectives||(_=$M(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache(),null==l?void 0:l.optionsToRedirectsKey),c.resolveTypeReferenceDirectiveReferences=(e,t,n,r,i)=>MV(e,t,n,r,i,o,_,jV)),c.resolveLibrary||(u=WM(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache()),c.resolveLibrary=(e,t,n)=>HM(e,t,n,o,u)),c.getBuildInfo=(e,t)=>WK(m,e,xK(m,t),void 0);const{watchFile:d,watchDirectory:p,writeLog:f}=W$(a,r),m={host:o,hostWithWatch:a,parseConfigFileHost:rW(o),write:Xe(o,o.trace),options:r,baseCompilerOptions:s,rootNames:n,baseWatchOptions:i,resolvedConfigFilePaths:new Map,configFileCache:new Map,projectStatus:new Map,extendedConfigCache:new Map,buildInfoCache:new Map,outputTimeStamps:new Map,builderPrograms:new Map,diagnostics:new Map,projectPendingBuild:new Map,projectErrorsReported:new Map,compilerHost:c,moduleResolutionCache:l,typeReferenceDirectiveResolutionCache:_,libraryResolutionCache:u,buildOrder:void 0,readFileWithCache:e=>o.readFile(e),projectCompilerOptions:s,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:e,watch:e,allWatchedWildcardDirectories:new Map,allWatchedInputFiles:new Map,allWatchedConfigFiles:new Map,allWatchedExtendedConfigFiles:new Map,allWatchedPackageJsonFiles:new Map,filesWatched:new Map,lastCachedPackageJsonLookups:new Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:d,watchDirectory:p,writeLog:f};return m}function bK(e,t){return Xo(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function xK(e,t){const{resolvedConfigFilePaths:n}=e,r=n.get(t);if(void 0!==r)return r;const i=bK(e,t);return n.set(t,i),i}function SK(e){return!!e.options}function kK(e,t){const n=e.configFileCache.get(t);return n&&SK(n)?n:void 0}function TK(e,t,n){const{configFileCache:r}=e,i=r.get(n);if(i)return SK(i)?i:void 0;let o;ar("SolutionBuilder::beforeConfigFileParsing");const{parseConfigFileHost:a,baseCompilerOptions:s,baseWatchOptions:c,extendedConfigCache:l,host:_}=e;let u;return _.getParsedCommandLine?(u=_.getParsedCommandLine(t),u||(o=oS(ha.File_0_not_found,t))):(a.onUnRecoverableConfigFileDiagnostic=e=>o=e,u=NL(t,s,a,l,c),a.onUnRecoverableConfigFileDiagnostic=ct),r.set(n,u||o),ar("SolutionBuilder::afterConfigFileParsing"),sr("SolutionBuilder::Config file parsing","SolutionBuilder::beforeConfigFileParsing","SolutionBuilder::afterConfigFileParsing"),u}function CK(e,t){return sK(Vo(e.compilerHost.getCurrentDirectory(),t))}function wK(e,t){const n=new Map,r=new Map,i=[];let o,a;for(const e of t)s(e);return a?{buildOrder:o||p,circularDiagnostics:a}:o||p;function s(t,c){const l=xK(e,t);if(r.has(l))return;if(n.has(l))return void(c||(a||(a=[])).push(oS(ha.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,i.join("\r\n"))));n.set(l,!0),i.push(t);const _=TK(e,t,l);if(_&&_.projectReferences)for(const t of _.projectReferences){s(CK(e,t.path),c||t.circular)}i.pop(),r.set(l,!0),(o||(o=[])).push(t)}}function NK(e){return e.buildOrder||function(e){const t=wK(e,e.rootNames.map(t=>CK(e,t)));e.resolvedConfigFilePaths.clear();const n=new Set(dK(t).map(t=>xK(e,t))),r={onDeleteValue:ct};bx(e.configFileCache,n,r),bx(e.projectStatus,n,r),bx(e.builderPrograms,n,r),bx(e.diagnostics,n,r),bx(e.projectPendingBuild,n,r),bx(e.projectErrorsReported,n,r),bx(e.buildInfoCache,n,r),bx(e.outputTimeStamps,n,r),bx(e.lastCachedPackageJsonLookups,n,r),e.watch&&(bx(e.allWatchedConfigFiles,n,{onDeleteValue:_x}),e.allWatchedExtendedConfigFiles.forEach(e=>{e.projects.forEach(t=>{n.has(t)||e.projects.delete(t)}),e.close()}),bx(e.allWatchedWildcardDirectories,n,{onDeleteValue:e=>e.forEach(YU)}),bx(e.allWatchedInputFiles,n,{onDeleteValue:e=>e.forEach(_x)}),bx(e.allWatchedPackageJsonFiles,n,{onDeleteValue:e=>e.forEach(_x)}));return e.buildOrder=t}(e)}function DK(e,t,n){const r=t&&CK(e,t),i=NK(e);if(uK(i))return i;if(r){const t=xK(e,r);if(-1===w(i,n=>xK(e,n)===t))return}const o=r?wK(e,[r]):i;return gn.assert(!uK(o)),gn.assert(!n||void 0!==r),gn.assert(!n||o[o.length-1]===r),n?o.slice(0,o.length-1):o}function EK(e){e.cache&&FK(e);const{compilerHost:t,host:n}=e,r=e.readFileWithCache,i=t.getSourceFile,{originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,getSourceFileWithCache:_,readFileWithCache:u}=aV(n,t=>bK(e,t),(...e)=>i.call(t,...e));e.readFileWithCache=u,t.getSourceFile=_,e.cache={originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,originalReadFileWithCache:r,originalGetSourceFile:i}}function FK(e){if(!e.cache)return;const{cache:t,host:n,compilerHost:r,extendedConfigCache:i,moduleResolutionCache:o,typeReferenceDirectiveResolutionCache:a,libraryResolutionCache:s}=e;n.readFile=t.originalReadFile,n.fileExists=t.originalFileExists,n.directoryExists=t.originalDirectoryExists,n.createDirectory=t.originalCreateDirectory,n.writeFile=t.originalWriteFile,r.getSourceFile=t.originalGetSourceFile,e.readFileWithCache=t.originalReadFileWithCache,i.clear(),null==o||o.clear(),null==a||a.clear(),null==s||s.clear(),e.cache=void 0}function PK(e,t){e.projectStatus.delete(t),e.diagnostics.delete(t)}function AK({projectPendingBuild:e},t,n){const r=e.get(t);(void 0===r||re.projectPendingBuild.set(xK(e,t),0)),t&&t.throwIfCancellationRequested()}var OK=(e=>(e[e.Build=0]="Build",e[e.UpdateOutputFileStamps=1]="UpdateOutputFileStamps",e))(OK||{});function LK(e,t){return e.projectPendingBuild.delete(t),e.diagnostics.has(t)?1:0}function jK(e,t,n,r,i,o,a){let s,c,l=0;return{kind:0,project:t,projectPath:n,buildOrder:a,getCompilerOptions:()=>i.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),getBuilderProgram:()=>_(dt),getProgram:()=>_(e=>e.getProgramOrUndefined()),getSourceFile:e=>_(t=>t.getSourceFile(e)),getSourceFiles:()=>u(e=>e.getSourceFiles()),getOptionsDiagnostics:e=>u(t=>t.getOptionsDiagnostics(e)),getGlobalDiagnostics:e=>u(t=>t.getGlobalDiagnostics(e)),getConfigFileParsingDiagnostics:()=>u(e=>e.getConfigFileParsingDiagnostics()),getSyntacticDiagnostics:(e,t)=>u(n=>n.getSyntacticDiagnostics(e,t)),getAllDependencies:e=>u(t=>t.getAllDependencies(e)),getSemanticDiagnostics:(e,t)=>u(n=>n.getSemanticDiagnostics(e,t)),getSemanticDiagnosticsOfNextAffectedFile:(e,t)=>_(n=>n.getSemanticDiagnosticsOfNextAffectedFile&&n.getSemanticDiagnosticsOfNextAffectedFile(e,t)),emit:(n,r,i,o,a)=>n||o?_(s=>{var c,l;return s.emit(n,r,i,o,a||(null==(l=(c=e.host).getCustomTransformers)?void 0:l.call(c,t)))}):(m(0,i),f(r,i,a)),done:function(t,r,i){return m(3,t,r,i),ar("SolutionBuilder::Projects built"),LK(e,n)}};function _(e){return m(0),s&&e(s)}function u(e){return _(e)||p}function d(){var r,o,a;if(gn.assert(void 0===s),e.options.dry)return dH(e,ha.A_non_dry_build_would_build_project_0,t),c=1,void(l=2);if(e.options.verbose&&dH(e,ha.Building_project_0,t),0===i.fileNames.length)return mH(e,n,WV(i)),c=0,void(l=2);const{host:_,compilerHost:u}=e;if(e.projectCompilerOptions=i.options,null==(r=e.moduleResolutionCache)||r.update(i.options),null==(o=e.typeReferenceDirectiveResolutionCache)||o.update(i.options),s=_.createProgram(i.fileNames,i.options,u,function({options:e,builderPrograms:t,compilerHost:n},r,i){if(e.force)return;const o=t.get(r);return o||tK(i.options,n)}(e,n,i),WV(i),i.projectReferences),e.watch){const t=null==(a=e.moduleResolutionCache)?void 0:a.getPackageJsonInfoCache().getInternalMap();e.lastCachedPackageJsonLookups.set(n,t&&new Set(Be(t.values(),t=>e.host.realpath&&(IM(t)||t.directoryExists)?e.host.realpath(Uo(t.packageDirectory,"package.json")):Uo(t.packageDirectory,"package.json")))),e.builderPrograms.set(n,s)}l++}function f(r,a,_){var u,d,p;gn.assertIsDefined(s),gn.assert(1===l);const{host:f,compilerHost:m}=e,g=new Map,h=s.getCompilerOptions(),y=RS(h);let v,b;const{emitResult:x,diagnostics:S}=B$(s,e=>f.reportDiagnostic(e),e.write,void 0,(t,i,o,a,c,l)=>{var _;const u=bK(e,t);if(g.set(bK(e,t),t),null==l?void 0:l.buildInfo){b||(b=_K(e.host));const r=null==(_=s.hasChangedEmitSignature)?void 0:_.call(s),i=VK(e,t,n);i?(i.buildInfo=l.buildInfo,i.modifiedTime=b,r&&(i.latestChangedDtsTime=b)):e.buildInfoCache.set(n,{path:bK(e,t),buildInfo:l.buildInfo,modifiedTime:b,latestChangedDtsTime:r?b:void 0})}const d=(null==l?void 0:l.differsOnlyInMap)?Ki(e.host,t):void 0;(r||m.writeFile)(t,i,o,a,c,l),(null==l?void 0:l.differsOnlyInMap)?e.host.setModifiedTime(t,d):!y&&e.watch&&(v||(v=UK(e,n))).set(u,b||(b=_K(e.host)))},a,void 0,_||(null==(d=(u=e.host).getCustomTransformers)?void 0:d.call(u,t)));return h.noEmitOnError&&S.length||!g.size&&8===o.type||GK(e,i,n,ha.Updating_unchanged_output_timestamps_of_project_0,g),e.projectErrorsReported.set(n,!0),c=(null==(p=s.hasChangedEmitSignature)?void 0:p.call(s))?0:2,S.length?(e.diagnostics.set(n,S),e.projectStatus.set(n,{type:0,reason:"it had errors"}),c|=4):(e.diagnostics.delete(n),e.projectStatus.set(n,{type:1,oldestOutputFileName:be(g.values())??wU(i,!f.useCaseSensitiveFileNames())})),function(e,t){t&&(e.host.afterProgramEmitAndDiagnostics&&e.host.afterProgramEmitAndDiagnostics(t),t.releaseProgram());e.projectCompilerOptions=e.baseCompilerOptions}(e,s),l=2,x}function m(o,s,_,u){for(;l<=o&&l<3;){const o=l;switch(l){case 0:d();break;case 1:f(_,s,u);break;case 2:YK(e,t,n,r,i,a,gn.checkDefined(c)),l++;break;default:cn()}gn.assert(l>o)}}}function MK(e,t,n){if(!e.projectPendingBuild.size)return;if(uK(t))return;const{options:r,projectPendingBuild:i}=e;for(let o=0;or.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),updateOutputFileStatmps:()=>{QK(e,r,n),o=!1},done:()=>(o&&QK(e,r,n),ar("SolutionBuilder::Timestamps only updates"),LK(e,n))}}(e,t.project,t.projectPath,t.config,n)}function BK(e,t,n){const r=MK(e,t,n);return r?RK(e,r,t):r}function JK(e){return!!e.watcher}function zK(e,t){const n=bK(e,t),r=e.filesWatched.get(n);if(e.watch&&r){if(!JK(r))return r;if(r.modifiedTime)return r.modifiedTime}const i=Ki(e.host,t);return e.watch&&(r?r.modifiedTime=i:e.filesWatched.set(n,i)),i}function qK(e,t,n,r,i,o,a){const s=bK(e,t),c=e.filesWatched.get(s);if(c&&JK(c))c.callbacks.push(n);else{const l=e.watchFile(t,(t,n,r)=>{const i=gn.checkDefined(e.filesWatched.get(s));gn.assert(JK(i)),i.modifiedTime=r,i.callbacks.forEach(e=>e(t,n,r))},r,i,o,a);e.filesWatched.set(s,{callbacks:[n],watcher:l,modifiedTime:c})}return{close:()=>{const t=gn.checkDefined(e.filesWatched.get(s));gn.assert(JK(t)),1===t.callbacks.length?(e.filesWatched.delete(s),YU(t)):Gt(t.callbacks,n)}}}function UK(e,t){if(!e.watch)return;let n=e.outputTimeStamps.get(t);return n||e.outputTimeStamps.set(t,n=new Map),n}function VK(e,t,n){const r=bK(e,t),i=e.buildInfoCache.get(n);return(null==i?void 0:i.path)===r?i:void 0}function WK(e,t,n,r){const i=bK(e,t),o=e.buildInfoCache.get(n);if(void 0!==o&&o.path===i)return o.buildInfo||void 0;const a=e.readFileWithCache(t),s=a?FU(t,a):void 0;return e.buildInfoCache.set(n,{path:i,buildInfo:s||!1,modifiedTime:r||$i}),s}function $K(e,t,n,r){if(nk&&(b=n,k=t),C.add(r)}if(v?(w||(w=QW(v,d,_)),N=_d(w.roots,(e,t)=>C.has(t)?void 0:t)):N=g(YW(y,d,_),e=>C.has(e)?void 0:e),N)return{type:10,buildInfoFile:d,inputFile:N};if(!f){const r=TU(t,!_.useCaseSensitiveFileNames()),i=UK(e,n);for(const t of r){if(t===d)continue;const n=bK(e,t);let r=null==i?void 0:i.get(n);if(r||(r=Ki(e.host,t),null==i||i.set(n,r)),r===$i)return{type:3,missingOutputFileName:t};if(r$K(e,t,x,S));if(F)return F;const P=e.lastCachedPackageJsonLookups.get(n),A=P&&ud(P,t=>$K(e,t,x,S));return A||{type:D?2:T?15:1,newestInputFileTime:k,newestInputFileName:b,oldestOutputFileName:S}}(e,t,n);return ar("SolutionBuilder::afterUpToDateCheck"),sr("SolutionBuilder::Up-to-date check","SolutionBuilder::beforeUpToDateCheck","SolutionBuilder::afterUpToDateCheck"),e.projectStatus.set(n,i),i}function GK(e,t,n,r,i){if(t.options.noEmit)return;let o;const a=lU(t.options),s=RS(t.options);if(a&&s)return(null==i?void 0:i.has(bK(e,a)))||(e.options.verbose&&dH(e,r,t.options.configFilePath),e.host.setModifiedTime(a,o=_K(e.host)),VK(e,a,n).modifiedTime=o),void e.outputTimeStamps.delete(n);const{host:c}=e,l=TU(t,!c.useCaseSensitiveFileNames()),_=UK(e,n),u=_?new Set:void 0;if(!i||l.length!==i.size){let s=!!e.options.verbose;for(const d of l){const l=bK(e,d);(null==i?void 0:i.has(l))||(s&&(s=!1,dH(e,r,t.options.configFilePath)),c.setModifiedTime(d,o||(o=_K(e.host))),d===a?VK(e,a,n).modifiedTime=o:_&&(_.set(l,o),u.add(l)))}}null==_||_.forEach((e,t)=>{(null==i?void 0:i.has(t))||u.has(t)||_.delete(t)})}function XK(e,t,n){if(!t.composite)return;const r=gn.checkDefined(e.buildInfoCache.get(n));if(void 0!==r.latestChangedDtsTime)return r.latestChangedDtsTime||void 0;const i=r.buildInfo&&MW(r.buildInfo)&&r.buildInfo.latestChangedDtsFile?e.host.getModifiedTime($o(r.buildInfo.latestChangedDtsFile,Lo(r.path))):void 0;return r.latestChangedDtsTime=i||!1,i}function QK(e,t,n){if(e.options.dry)return dH(e,ha.A_non_dry_build_would_update_timestamps_for_output_of_project_0,t.options.configFilePath);GK(e,t,n,ha.Updating_output_timestamps_of_project_0),e.projectStatus.set(n,{type:1,oldestOutputFileName:wU(t,!e.host.useCaseSensitiveFileNames())})}function YK(e,t,n,r,i,o,a){if(!(e.options.stopBuildOnErrors&&4&a)&&i.options.composite)for(let i=r+1;ie.diagnostics.has(xK(e,t)))?c?2:1:0}(e,t,n,r,i,o);return ar("SolutionBuilder::afterBuild"),sr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),a}function eH(e,t,n){ar("SolutionBuilder::beforeClean");const r=function(e,t,n){const r=DK(e,t,n);if(!r)return 3;if(uK(r))return fH(e,r.circularDiagnostics),4;const{options:i,host:o}=e,a=i.dry?[]:void 0;for(const t of r){const n=xK(e,t),r=TK(e,t,n);if(void 0===r){gH(e,n);continue}const i=TU(r,!o.useCaseSensitiveFileNames());if(!i.length)continue;const s=new Set(r.fileNames.map(t=>bK(e,t)));for(const t of i)s.has(bK(e,t))||o.fileExists(t)&&(a?a.push(t):(o.deleteFile(t),tH(e,n,0)))}a&&dH(e,ha.A_non_dry_build_would_delete_the_following_files_Colon_0,a.map(e=>`\r\n * ${e}`).join(""));return 0}(e,t,n);return ar("SolutionBuilder::afterClean"),sr("SolutionBuilder::Clean","SolutionBuilder::beforeClean","SolutionBuilder::afterClean"),r}function tH(e,t,n){e.host.getParsedCommandLine&&1===n&&(n=2),2===n&&(e.configFileCache.delete(t),e.buildOrder=void 0),e.needsSummary=!0,PK(e,t),AK(e,t,n),EK(e)}function nH(e,t,n){e.reportFileChangeDetected=!0,tH(e,t,n),rH(e,250,!0)}function rH(e,t,n){const{hostWithWatch:r}=e;r.setTimeout&&r.clearTimeout&&(e.timerToBuildInvalidatedProject&&r.clearTimeout(e.timerToBuildInvalidatedProject),e.timerToBuildInvalidatedProject=r.setTimeout(iH,t,"timerToBuildInvalidatedProject",e,n))}function iH(e,t,n){ar("SolutionBuilder::beforeBuild");const r=function(e,t){e.timerToBuildInvalidatedProject=void 0,e.reportFileChangeDetected&&(e.reportFileChangeDetected=!1,e.projectErrorsReported.clear(),pH(e,ha.File_change_detected_Starting_incremental_compilation));let n=0;const r=NK(e),i=BK(e,r,!1);if(i)for(i.done(),n++;e.projectPendingBuild.size;){if(e.timerToBuildInvalidatedProject)return;const i=MK(e,r,!1);if(!i)break;if(1!==i.kind&&(t||5===n))return void rH(e,100,!1);RK(e,i,r).done(),1!==i.kind&&n++}return FK(e),r}(t,n);ar("SolutionBuilder::afterBuild"),sr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),r&&hH(t,r)}function oH(e,t,n,r){e.watch&&!e.allWatchedConfigFiles.has(n)&&e.allWatchedConfigFiles.set(n,qK(e,t,()=>nH(e,n,2),2e3,null==r?void 0:r.watchOptions,V$.ConfigFile,t))}function aH(e,t,n){qU(t,null==n?void 0:n.options,e.allWatchedExtendedConfigFiles,(t,r)=>qK(e,t,()=>{var t;return null==(t=e.allWatchedExtendedConfigFiles.get(r))?void 0:t.projects.forEach(t=>nH(e,t,2))},2e3,null==n?void 0:n.watchOptions,V$.ExtendedConfigFile),t=>bK(e,t))}function sH(e,t,n,r){e.watch&&$U(lK(e.allWatchedWildcardDirectories,n),r.wildcardDirectories,(i,o)=>e.watchDirectory(i,o=>{var a;KU({watchedDirPath:bK(e,i),fileOrDirectory:o,fileOrDirectoryPath:bK(e,o),configFileName:t,currentDirectory:e.compilerHost.getCurrentDirectory(),options:r.options,program:e.builderPrograms.get(n)||(null==(a=kK(e,n))?void 0:a.fileNames),useCaseSensitiveFileNames:e.parseConfigFileHost.useCaseSensitiveFileNames,writeLog:t=>e.writeLog(t),toPath:t=>bK(e,t)})||nH(e,n,1)},o,null==r?void 0:r.watchOptions,V$.WildcardDirectory,t))}function cH(e,t,n,r){e.watch&&xx(lK(e.allWatchedInputFiles,n),new Set(r.fileNames),{createNewValue:i=>qK(e,i,()=>nH(e,n,0),250,null==r?void 0:r.watchOptions,V$.SourceFile,t),onDeleteValue:_x})}function lH(e,t,n,r){e.watch&&e.lastCachedPackageJsonLookups&&xx(lK(e.allWatchedPackageJsonFiles,n),e.lastCachedPackageJsonLookups.get(n),{createNewValue:i=>qK(e,i,()=>nH(e,n,0),2e3,null==r?void 0:r.watchOptions,V$.PackageJson,t),onDeleteValue:_x})}function _H(e,t,n,r,i){const o=vK(e,t,n,r,i);return{build:(e,t,n,r)=>ZK(o,e,t,n,r),clean:e=>eH(o,e),buildReferences:(e,t,n,r)=>ZK(o,e,t,n,r,!0),cleanReferences:e=>eH(o,e,!0),getNextInvalidatedProject:e=>(IK(o,e),BK(o,NK(o),!1)),getBuildOrder:()=>NK(o),getUpToDateStatusOfProject:e=>{const t=CK(o,e),n=xK(o,t);return HK(o,TK(o,t,n),n)},invalidateProject:(e,t)=>tH(o,e,t||0),close:()=>function(e){vx(e.allWatchedConfigFiles,_x),vx(e.allWatchedExtendedConfigFiles,YU),vx(e.allWatchedWildcardDirectories,e=>vx(e,YU)),vx(e.allWatchedInputFiles,e=>vx(e,_x)),vx(e.allWatchedPackageJsonFiles,e=>vx(e,_x))}(o)}}function uH(e,t){return ua(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function dH(e,t,...n){e.host.reportSolutionBuilderStatus(oS(t,...n))}function pH(e,t,...n){var r,i;null==(i=(r=e.hostWithWatch).onWatchStatusChange)||i.call(r,oS(t,...n),e.host.getNewLine(),e.baseCompilerOptions)}function fH({host:e},t){t.forEach(t=>e.reportDiagnostic(t))}function mH(e,t,n){fH(e,n),e.projectErrorsReported.set(t,!0),n.length&&e.diagnostics.set(t,n)}function gH(e,t){mH(e,t,[e.configFileCache.get(t)])}function hH(e,t){if(!e.needsSummary)return;e.needsSummary=!1;const n=e.watch||!!e.host.reportErrorSummary,{diagnostics:r}=e;let i=0,o=[];uK(t)?(yH(e,t.buildOrder),fH(e,t.circularDiagnostics),n&&(i+=N$(t.circularDiagnostics)),n&&(o=[...o,...D$(t.circularDiagnostics)])):(t.forEach(t=>{const n=xK(e,t);e.projectErrorsReported.has(n)||fH(e,r.get(n)||p)}),n&&r.forEach(e=>i+=N$(e)),n&&r.forEach(e=>[...o,...D$(e)])),e.watch?pH(e,E$(i),i):e.host.reportErrorSummary&&e.host.reportErrorSummary(i,o)}function yH(e,t){e.options.verbose&&dH(e,ha.Projects_in_this_build_Colon_0,t.map(t=>"\r\n * "+uH(e,t)).join(""))}function vH(e,t,n){e.options.verbose&&function(e,t,n){switch(n.type){case 5:return dH(e,ha.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,uH(e,t),uH(e,n.outOfDateOutputFileName),uH(e,n.newerInputFileName));case 6:return dH(e,ha.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,uH(e,t),uH(e,n.outOfDateOutputFileName),uH(e,n.newerProjectName));case 3:return dH(e,ha.Project_0_is_out_of_date_because_output_file_1_does_not_exist,uH(e,t),uH(e,n.missingOutputFileName));case 4:return dH(e,ha.Project_0_is_out_of_date_because_there_was_error_reading_file_1,uH(e,t),uH(e,n.fileName));case 7:return dH(e,ha.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,uH(e,t),uH(e,n.buildInfoFile));case 8:return dH(e,ha.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors,uH(e,t),uH(e,n.buildInfoFile));case 9:return dH(e,ha.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,uH(e,t),uH(e,n.buildInfoFile));case 10:return dH(e,ha.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,uH(e,t),uH(e,n.buildInfoFile),uH(e,n.inputFile));case 1:if(void 0!==n.newestInputFileTime)return dH(e,ha.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,uH(e,t),uH(e,n.newestInputFileName||""),uH(e,n.oldestOutputFileName||""));break;case 2:return dH(e,ha.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,uH(e,t));case 15:return dH(e,ha.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,uH(e,t));case 11:return dH(e,ha.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,uH(e,t),uH(e,n.upstreamProjectName));case 12:return dH(e,n.upstreamProjectBlocked?ha.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:ha.Project_0_can_t_be_built_because_its_dependency_1_has_errors,uH(e,t),uH(e,n.upstreamProjectName));case 0:return dH(e,ha.Project_0_is_out_of_date_because_1,uH(e,t),n.reason);case 14:return dH(e,ha.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,uH(e,t),n.version,u);case 17:dH(e,ha.Project_0_is_being_forcibly_rebuilt,uH(e,t))}}(e,t,n)}var bH=(e=>(e[e.time=0]="time",e[e.count=1]="count",e[e.memory=2]="memory",e))(bH||{});function xH(e){const t=function(){const e=new Map;return e.set("Library",0),e.set("Definitions",0),e.set("TypeScript",0),e.set("JavaScript",0),e.set("JSON",0),e.set("Other",0),e}();return g(e.getSourceFiles(),n=>{const r=function(e,t){if(e.isSourceFileDefaultLibrary(t))return"Library";if(t.isDeclarationFile)return"Definitions";const n=t.path;return Fo(n,Pk)?"TypeScript":Fo(n,Ok)?"JavaScript":Eo(n,".json")?"JSON":"Other"}(e,n),i=Va(n).length;t.set(r,t.get(r)+i)}),t}function SH(e,t,n){return TH(e,n)?x$(e,!0):t}function kH(e){return!!e.writeOutputIsTTY&&e.writeOutputIsTTY()&&!e.getEnvironmentVariable("NO_COLOR")}function TH(e,t){return t&&void 0!==t.pretty?t.pretty:kH(e)}function CH(e){return e.options.all?me(VO.concat(nL),(e,t)=>Dt(e.name,t.name)):P(VO.concat(nL),e=>!!e.showInSimplifiedHelpView)}function wH(e){e.write(wL(ha.Version_0,u)+e.newLine)}function NH(e){if(!kH(e))return{bold:e=>e,blue:e=>e,blueBackground:e=>e,brightWhite:e=>e};const t=e.getEnvironmentVariable("OS")&&e.getEnvironmentVariable("OS").toLowerCase().includes("windows"),n=e.getEnvironmentVariable("WT_SESSION"),r=e.getEnvironmentVariable("TERM_PROGRAM")&&"vscode"===e.getEnvironmentVariable("TERM_PROGRAM");const i="truecolor"===e.getEnvironmentVariable("COLORTERM")||"xterm-256color"===e.getEnvironmentVariable("TERM");function o(e){return`${e}`}return{bold:function(e){return`${e}`},blue:function(e){return!t||n||r?`${e}`:o(e)},brightWhite:o,blueBackground:function(e){return i?`${e}`:`${e}`}}}function DH(e){return`--${e.name}${e.shortName?`, -${e.shortName}`:""}`}function EH(e,t,n,r){var i;const o=[],a=NH(e),s=DH(t),c=function(e){if("object"===e.type)return;return{valueType:function(e){switch(gn.assert("listOrElement"!==e.type),e.type){case"string":case"number":case"boolean":return wL(ha.type_Colon);case"list":return wL(ha.one_or_more_Colon);default:return wL(ha.one_of_Colon)}}(e),possibleValues:function e(t){let n;switch(t.type){case"string":case"number":case"boolean":n=t.type;break;case"list":case"listOrElement":n=e(t.element);break;case"object":n="";break;default:const r={};return t.type.forEach((e,n)=>{var i;(null==(i=t.deprecatedKeys)?void 0:i.has(n))||(r[e]||(r[e]=[])).push(n)}),Object.entries(r).map(([,e])=>e.join("/")).join(", ")}return n}(e)}}(t),l="object"==typeof t.defaultValueDescription?wL(t.defaultValueDescription):(_=t.defaultValueDescription,u="list"===t.type||"listOrElement"===t.type?t.element.type:t.type,void 0!==_&&"object"==typeof u?Be(u.entries()).filter(([,e])=>e===_).map(([e])=>e).join("/"):String(_));var _,u;const d=(null==(i=e.getWidthOfTerminal)?void 0:i.call(e))??0;if(d>=80){let i="";t.description&&(i=wL(t.description)),o.push(...f(s,i,n,r,d,!0),e.newLine),p(c,t)&&(c&&o.push(...f(c.valueType,c.possibleValues,n,r,d,!1),e.newLine),l&&o.push(...f(wL(ha.default_Colon),l,n,r,d,!1),e.newLine)),o.push(e.newLine)}else{if(o.push(a.blue(s),e.newLine),t.description){const e=wL(t.description);o.push(e)}if(o.push(e.newLine),p(c,t)){if(c&&o.push(`${c.valueType} ${c.possibleValues}`),l){c&&o.push(e.newLine);const t=wL(ha.default_Colon);o.push(`${t} ${l}`)}o.push(e.newLine)}o.push(e.newLine)}return o;function p(e,t){const n=t.defaultValueDescription;return t.category!==ha.Command_line_Options&&(!D(["string"],null==e?void 0:e.possibleValues)||!D([void 0,"false","n/a"],n))}function f(e,t,n,r,i,o){const s=[];let c=!0,l=t;const _=i-r;for(;l.length>0;){let t="";c?(t=e.padStart(n),t=t.padEnd(r),t=o?a.blue(t):t):t="".padStart(r);const i=l.substr(0,_);l=l.slice(_),s.push(`${t}${i}`),c=!1}return s}}function FH(e,t){let n=0;for(const e of t){const t=DH(e).length;n=n>t?n:t}const r=n+2,i=r+2;let o=[];for(const n of t){const t=EH(e,n,r,i);o=[...o,...t]}return o[o.length-2]!==e.newLine&&o.push(e.newLine),o}function PH(e,t,n,r,i,o){let a=[];if(a.push(NH(e).bold(t)+e.newLine+e.newLine),i&&a.push(i+e.newLine+e.newLine),!r)return a=[...a,...FH(e,n)],o&&a.push(o+e.newLine+e.newLine),a;const s=new Map;for(const e of n){if(!e.category)continue;const t=wL(e.category),n=s.get(t)??[];n.push(e),s.set(t,n)}return s.forEach((t,n)=>{a.push(`### ${n}${e.newLine}${e.newLine}`),a=[...a,...FH(e,t)]}),o&&a.push(o+e.newLine+e.newLine),a}function AH(e,t){let n=[...IH(e,`${wL(ha.tsc_Colon_The_TypeScript_Compiler)} - ${wL(ha.Version_0,u)}`)];n=[...n,...PH(e,wL(ha.BUILD_OPTIONS),P(t,e=>e!==nL),!1,iS(ha.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of n)e.write(t)}function IH(e,t){var n;const r=NH(e),i=[],o=(null==(n=e.getWidthOfTerminal)?void 0:n.call(e))??0,a=r.blueBackground("".padStart(5)),s=r.blueBackground(r.brightWhite("TS ".padStart(5)));if(o>=t.length+5){const n=(o>120?120:o)-5;i.push(t.padEnd(n)+a+e.newLine),i.push("".padStart(n)+s+e.newLine)}else i.push(t+e.newLine),i.push(e.newLine);return i}function OH(e,t){t.options.all?function(e,t,n,r){let i=[...IH(e,`${wL(ha.tsc_Colon_The_TypeScript_Compiler)} - ${wL(ha.Version_0,u)}`)];i=[...i,...PH(e,wL(ha.ALL_COMPILER_OPTIONS),t,!0,void 0,iS(ha.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))],i=[...i,...PH(e,wL(ha.WATCH_OPTIONS),r,!1,wL(ha.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon))],i=[...i,...PH(e,wL(ha.BUILD_OPTIONS),P(n,e=>e!==nL),!1,iS(ha.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of i)e.write(t)}(e,CH(t),rL,BO):function(e,t){const n=NH(e);let r=[...IH(e,`${wL(ha.tsc_Colon_The_TypeScript_Compiler)} - ${wL(ha.Version_0,u)}`)];r.push(n.bold(wL(ha.COMMON_COMMANDS))+e.newLine+e.newLine),a("tsc",ha.Compiles_the_current_project_tsconfig_json_in_the_working_directory),a("tsc app.ts util.ts",ha.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options),a("tsc -b",ha.Build_a_composite_project_in_the_working_directory),a("tsc --init",ha.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory),a("tsc -p ./path/to/tsconfig.json",ha.Compiles_the_TypeScript_project_located_at_the_specified_path),a("tsc --help --all",ha.An_expanded_version_of_this_information_showing_all_possible_compiler_options),a(["tsc --noEmit","tsc --target esnext"],ha.Compiles_the_current_project_with_additional_settings);const i=t.filter(e=>e.isCommandLineOnly||e.category===ha.Command_line_Options),o=t.filter(e=>!D(i,e));r=[...r,...PH(e,wL(ha.COMMAND_LINE_FLAGS),i,!1,void 0,void 0),...PH(e,wL(ha.COMMON_COMPILER_OPTIONS),o,!1,void 0,iS(ha.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))];for(const t of r)e.write(t);function a(t,i){const o="string"==typeof t?[t]:t;for(const t of o)r.push(" "+n.blue(t)+e.newLine);r.push(" "+wL(i)+e.newLine+e.newLine)}}(e,CH(t))}function LH(e,t,n){let r,i=x$(e);if(n.options.locale&&gc(n.options.locale,e,n.errors),n.errors.length>0)return n.errors.forEach(i),e.exit(1);if(n.options.init)return function(e,t,n){const r=e.getCurrentDirectory(),i=Ko(Uo(r,"tsconfig.json"));if(e.fileExists(i))t(oS(ha.A_tsconfig_json_file_is_already_defined_at_Colon_0,i));else{e.writeFile(i,sj(n,e.newLine));const t=[e.newLine,...IH(e,"Created a new tsconfig.json")];t.push("You can learn more at https://aka.ms/tsconfig"+e.newLine);for(const n of t)e.write(n)}}(e,i,n.options),e.exit(0);if(n.options.version)return wH(e),e.exit(0);if(n.options.help||n.options.all)return OH(e,n),e.exit(0);if(n.options.watch&&n.options.listFilesOnly)return i(oS(ha.Options_0_and_1_cannot_be_combined,"watch","listFilesOnly")),e.exit(1);if(n.options.project){if(0!==n.fileNames.length)return i(oS(ha.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)),e.exit(1);const t=Ko(n.options.project);if(!t||e.directoryExists(t)){if(r=Uo(t,"tsconfig.json"),!e.fileExists(r))return i(oS(ha.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0,n.options.project)),e.exit(1)}else if(r=t,!e.fileExists(r))return i(oS(ha.The_specified_path_does_not_exist_Colon_0,n.options.project)),e.exit(1)}else if(0===n.fileNames.length){r=ZU(Ko(e.getCurrentDirectory()),t=>e.fileExists(t))}if(0===n.fileNames.length&&!r)return n.options.showConfig?i(oS(ha.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,Ko(e.getCurrentDirectory()))):(wH(e),OH(e,n)),e.exit(1);const o=e.getCurrentDirectory(),a=cj(n.options,e=>$o(e,o));if(r){const o=new Map,s=w$(r,a,o,n.watchOptions,e,i);if(a.showConfig)return 0!==s.errors.length?(i=SH(e,i,s.options),s.errors.forEach(i),e.exit(1)):(e.write(JSON.stringify(ZL(s,r,e),null,4)+e.newLine),e.exit(0));if(i=SH(e,i,s.options),lx(s.options)){if(RH(e,i))return;return function(e,t,n,r,i,o,a){const s=Y$({configFileName:r.options.configFilePath,optionsToExtend:i,watchOptionsToExtend:o,system:e,reportDiagnostic:n,reportWatchStatus:KH(e,r.options)});return $H(e,t,s),s.configFileParsingResult=r,s.extendedConfigCache=a,oK(s)}(e,t,i,s,a,n.watchOptions,o)}RS(s.options)?UH(e,t,i,s):qH(e,t,i,s)}else{if(a.showConfig)return e.write(JSON.stringify(ZL(n,Uo(o,"tsconfig.json"),e),null,4)+e.newLine),e.exit(0);if(i=SH(e,i,a),lx(a)){if(RH(e,i))return;return function(e,t,n,r,i,o){const a=Z$({rootFiles:r,options:i,watchOptions:o,system:e,reportDiagnostic:n,reportWatchStatus:KH(e,i)});return $H(e,t,a),oK(a)}(e,t,i,n.fileNames,a,n.watchOptions)}RS(a)?UH(e,t,i,{...n,options:a}):qH(e,t,i,{...n,options:a})}}function jH(e){if(e.length>0&&45===e[0].charCodeAt(0)){const t=e[0].slice(45===e[0].charCodeAt(1)?2:1).toLowerCase();return t===nL.name||t===nL.shortName}return!1}function MH(e,t,n){if(jH(n)){const{buildOptions:r,watchOptions:i,projects:o,errors:a}=CL(n);if(!r.generateCpuProfile||!e.enableCPUProfiler)return JH(e,t,r,i,o,a);e.enableCPUProfiler(r.generateCpuProfile,()=>JH(e,t,r,i,o,a))}const r=bL(n,t=>e.readFile(t));if(!r.options.generateCpuProfile||!e.enableCPUProfiler)return LH(e,t,r);e.enableCPUProfiler(r.options.generateCpuProfile,()=>LH(e,t,r))}function RH(e,t){return(!e.watchFile||!e.watchDirectory)&&(t(oS(ha.The_current_host_does_not_support_the_0_option,"--watch")),e.exit(1),!0)}var BH=2;function JH(e,t,n,r,i,o){const a=SH(e,x$(e),n);if(n.locale&&gc(n.locale,e,o),o.length>0)return o.forEach(a),e.exit(1);if(n.help)return wH(e),AH(e,iL),e.exit(0);if(0===i.length)return wH(e),AH(e,iL),e.exit(0);if(!e.getModifiedTime||!e.setModifiedTime||n.clean&&!e.deleteFile)return a(oS(ha.The_current_host_does_not_support_the_0_option,"--build")),e.exit(1);if(n.watch){if(RH(e,a))return;const o=gK(e,void 0,a,pK(e,TH(e,n)),KH(e,n));o.jsDocParsingMode=BH;const s=HH(e,n);VH(e,t,o,s);const c=o.onWatchStatusChange;let l=!1;o.onWatchStatusChange=(e,t,n,r)=>{null==c||c(e,t,n,r),!l||e.code!==ha.Found_0_errors_Watching_for_file_changes.code&&e.code!==ha.Found_1_error_Watching_for_file_changes.code||GH(_,s)};const _=yK(o,i,n,r);return _.build(),GH(_,s),l=!0,_}const s=mK(e,void 0,a,pK(e,TH(e,n)),zH(e,n));s.jsDocParsingMode=BH;const c=HH(e,n);VH(e,t,s,c);const l=hK(s,i,n),_=n.clean?l.clean():l.build();return GH(l,c),yr(),e.exit(_)}function zH(e,t){return TH(e,t)?(t,n)=>e.write(P$(t,n,e.newLine,e)):void 0}function qH(e,t,n,r){const{fileNames:i,options:o,projectReferences:a}=r,s=oV(o,void 0,e);s.jsDocParsingMode=BH;const c=s.getCurrentDirectory(),l=Xt(s.useCaseSensitiveFileNames());aV(s,e=>Xo(e,c,l)),YH(e,o,!1);const _=GV({rootNames:i,options:o,projectReferences:a,host:s,configFileParsingDiagnostics:WV(r)}),u=J$(_,n,t=>e.write(t+e.newLine),zH(e,o));return eG(e,_,void 0),t(_),e.exit(u)}function UH(e,t,n,r){const{options:i,fileNames:o,projectReferences:a}=r;YH(e,i,!1);const s=nK(i,e);s.jsDocParsingMode=BH;const c=eK({host:s,system:e,rootNames:o,options:i,configFileParsingDiagnostics:WV(r),projectReferences:a,reportDiagnostic:n,reportErrorSummary:zH(e,i),afterProgramEmitAndDiagnostics:n=>{eG(e,n.getProgram(),void 0),t(n)}});return e.exit(c)}function VH(e,t,n,r){WH(e,n,!0),n.afterProgramEmitAndDiagnostics=n=>{eG(e,n.getProgram(),r),t(n)}}function WH(e,t,n){const r=t.createProgram;t.createProgram=(t,i,o,a,s,c)=>(gn.assert(void 0!==t||void 0===i&&!!a),void 0!==i&&YH(e,i,n),r(t,i,o,a,s,c))}function $H(e,t,n){n.jsDocParsingMode=BH,WH(e,n,!1);const r=n.afterProgramCreate;n.afterProgramCreate=n=>{r(n),eG(e,n.getProgram(),void 0),t(n)}}function KH(e,t){return C$(e,TH(e,t))}function HH(e,t){if(e===mo&&t.extendedDiagnostics)return mr(),function(){let e;return{addAggregateStatistic:t,forEachAggregateStatistics:n,clear:r};function t(t){const n=null==e?void 0:e.get(t.name);n?2===n.type?n.value=Math.max(n.value,t.value):n.value+=t.value:(e??(e=new Map)).set(t.name,t)}function n(t){null==e||e.forEach(t)}function r(){e=void 0}}()}function GH(e,t){if(!t)return;if(!fr())return void mo.write(ha.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n");const n=[];function r(e){const t=cr(e);t&&n.push({name:i(e),value:t,type:1})}function i(e){return e.replace("SolutionBuilder::","")}n.push({name:"Projects in scope",value:dK(e.getBuildOrder()).length,type:1}),r("SolutionBuilder::Projects built"),r("SolutionBuilder::Timestamps only updates"),r("SolutionBuilder::Bundles updated"),t.forEachAggregateStatistics(e=>{e.name=`Aggregate ${e.name}`,n.push(e)}),_r((e,t)=>{ZH(e)&&n.push({name:`${i(e)} time`,value:t,type:0})}),gr(),mr(),t.clear(),tG(mo,n)}function XH(e,t){return e===mo&&(t.diagnostics||t.extendedDiagnostics)}function QH(e,t){return e===mo&&t.generateTrace}function YH(e,t,n){XH(e,t)&&mr(e),QH(e,t)&&hr(n?"build":"project",t.generateTrace,t.configFilePath)}function ZH(e){return en(e,"SolutionBuilder::")}function eG(e,t,n){var r;const i=t.getCompilerOptions();let o;if(QH(e,i)&&(null==(r=Yn)||r.stopTracing()),XH(e,i)){o=[];const r=e.getMemoryUsage?e.getMemoryUsage():-1;s("Files",t.getSourceFiles().length);const l=xH(t);if(i.extendedDiagnostics)for(const[e,t]of l.entries())s("Lines of "+e,t);else s("Lines",b(l.values(),(e,t)=>e+t,0));s("Identifiers",t.getIdentifierCount()),s("Symbols",t.getSymbolCount()),s("Types",t.getTypeCount()),s("Instantiations",t.getInstantiationCount()),r>=0&&a({name:"Memory used",value:r,type:2},!0);const _=fr(),u=_?lr("Program"):0,d=_?lr("Bind"):0,p=_?lr("Check"):0,f=_?lr("Emit"):0;if(i.extendedDiagnostics){const e=t.getRelationCacheSizes();s("Assignability cache size",e.assignable),s("Identity cache size",e.identity),s("Subtype cache size",e.subtype),s("Strict subtype cache size",e.strictSubtype),_&&_r((e,t)=>{ZH(e)||c(`${e} time`,t,!0)})}else _&&(c("I/O read",lr("I/O Read"),!0),c("I/O write",lr("I/O Write"),!0),c("Parse time",u,!0),c("Bind time",d,!0),c("Check time",p,!0),c("Emit time",f,!0));_&&c("Total time",u+d+p+f,!1),tG(e,o),_?n?(_r(e=>{ZH(e)||dr(e)}),ur(e=>{ZH(e)||pr(e)})):gr():e.write(ha.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n")}function a(e,t){o.push(e),t&&(null==n||n.addAggregateStatistic(e))}function s(e,t){a({name:e,value:t,type:1},!0)}function c(e,t,n){a({name:e,value:t,type:0},n)}}function tG(e,t){let n=0,r=0;for(const e of t){e.name.length>n&&(n=e.name.length);const t=nG(e);t.length>r&&(r=t.length)}for(const i of t)e.write(`${i.name}:`.padEnd(n+2)+nG(i).toString().padStart(r)+e.newLine)}function nG(e){switch(e.type){case 1:return""+e.value;case 0:return(e.value/1e3).toFixed(2)+"s";case 2:return Math.round(e.value/1e3)+"K";default:gn.assertNever(e.type)}}function rG(e,t=!0){return{type:e,reportFallback:t}}var iG=rG(void 0,!1),oG=rG(void 0,!1),aG=rG(void 0,!0);function sG(e,t){const n=HS(e,"strictNullChecks");return{serializeTypeOfDeclaration:function(e,n,r){switch(e.kind){case 170:case 342:return u(e,n,r);case 261:return function(e,n,r){var i;const o=xv(e);let s=aG;o?s=rG(a(o,r,e,n)):!e.initializer||1!==(null==(i=n.declarations)?void 0:i.length)&&1!==F(n.declarations,hF)||t.isExpandoFunctionDeclaration(e)||D(e)||(s=h(e.initializer,r,void 0,void 0,ff(e)));return void 0!==s.type?s.type:d(e,n,r,s.reportFallback)}(e,n,r);case 172:case 349:case 173:return function(e,n,r){const i=xv(e),o=t.requiresAddingImplicitUndefined(e,n,r.enclosingDeclaration);let s=aG;if(i)s=rG(a(i,r,e,n,o));else{const t=LD(e)?e.initializer:void 0;if(t&&!D(e)){s=h(t,r,void 0,o,_f(e))}}return void 0!==s.type?s.type:d(e,n,r,s.reportFallback)}(e,n,r);case 209:return d(e,n,r);case 278:return l(e.expression,r,void 0,!0);case 212:case 213:case 227:return function(e,t,n){const r=xv(e);let i;r&&(i=a(r,n,e,t));const o=n.suppressReportInferenceFallback;n.suppressReportInferenceFallback=!0;const s=i??d(e,t,n,!1);return n.suppressReportInferenceFallback=o,s}(e,n,r);case 304:case 305:return function(e,n,r){const i=xv(e);let a;i&&t.canReuseTypeNodeAnnotation(r,e,i,n)&&(a=o(i,r));if(!a&&304===e.kind){const i=e.initializer,s=AA(i)?IA(i):235===i.kind||217===i.kind?i.type:void 0;s&&!El(s)&&t.canReuseTypeNodeAnnotation(r,e,s,n)&&(a=o(s,r))}return a??d(e,n,r,!1)}(e,n,r);default:gn.assertNever(e,`Node needs to be an inferrable node, found ${gn.formatSyntaxKind(e.kind)}`)}},serializeReturnTypeForSignature:function(e,t,n){switch(e.kind){case 178:return c(e,t,n);case 175:case 263:case 181:case 174:case 180:case 177:case 179:case 182:case 185:case 186:case 219:case 220:case 318:case 324:return N(e,t,n);default:gn.assertNever(e,`Node needs to be an inferrable node, found ${gn.formatSyntaxKind(e.kind)}`)}},serializeTypeOfExpression:l,serializeTypeOfAccessor:c,tryReuseExistingTypeNode(e,n){if(t.canReuseTypeNode(e,n))return i(e,n)}};function r(e,n,r=n){return void 0===n?void 0:t.markNodeReuse(e,16&n.flags?n:kw.cloneNode(n),r??n)}function i(n,i){const{finalizeBoundary:o,startRecoveryScope:a,hadError:s,markError:c}=t.createRecoveryBoundary(n),l=kJ(i,_,N_);if(o())return n.approximateLength+=i.end-i.pos,l;function _(i){if(s())return i;const o=a(),l=RC(i)?t.enterNewScope(n,i):void 0,u=function(i){var o;if(hP(i))return kJ(i.type,_,N_);if(kP(i)||320===i.kind)return kw.createKeywordTypeNode(133);if(TP(i))return kw.createKeywordTypeNode(159);if(CP(i))return kw.createUnionTypeNode([kJ(i.type,_,N_),kw.createLiteralTypeNode(kw.createNull())]);if(NP(i))return kw.createUnionTypeNode([kJ(i.type,_,N_),kw.createKeywordTypeNode(157)]);if(wP(i))return kJ(i.type,_);if(EP(i))return kw.createArrayTypeNode(kJ(i.type,_,N_));if(AP(i))return kw.createTypeLiteralNode(O(i.jsDocPropertyTags,e=>{const r=kJ(fD(e.name)?e.name:e.name.right,_,fD),o=t.getJsDocPropertyOverride(n,i,e);return kw.createPropertySignature(void 0,r,e.isBracketed||e.typeExpression&&NP(e.typeExpression.type)?kw.createToken(58):void 0,o||e.typeExpression&&kJ(e.typeExpression.type,_,N_)||kw.createKeywordTypeNode(133))}));if($D(i)&&fD(i.typeName)&&""===i.typeName.escapedText)return Cw(kw.createKeywordTypeNode(133),i);if((qE(i)||$D(i))&&zm(i))return kw.createTypeLiteralNode([kw.createIndexSignature(void 0,[kw.createParameterDeclaration(void 0,void 0,"x",void 0,kJ(i.typeArguments[0],_,N_))],kJ(i.typeArguments[1],_,N_))]);if(DP(i)){if(Og(i)){let e;return kw.createConstructorTypeNode(void 0,TJ(i.typeParameters,_,PD),U(i.parameters,(r,i)=>r.name&&fD(r.name)&&"new"===r.name.escapedText?void(e=r.type):kw.createParameterDeclaration(void 0,l(r),t.markNodeReuse(n,kw.createIdentifier(u(r,i)),r),kw.cloneNode(r.questionToken),kJ(r.type,_,N_),void 0)),kJ(e||i.type,_,N_)||kw.createKeywordTypeNode(133))}return kw.createFunctionTypeNode(TJ(i.typeParameters,_,PD),O(i.parameters,(e,r)=>kw.createParameterDeclaration(void 0,l(e),t.markNodeReuse(n,kw.createIdentifier(u(e,r)),e),kw.cloneNode(e.questionToken),kJ(e.type,_,N_),void 0)),kJ(i.type,_,N_)||kw.createKeywordTypeNode(133))}if(sE(i))return t.canReuseTypeNode(n,i)||c(),i;if(PD(i)){const{node:e}=t.trackExistingEntityName(n,i.name);return kw.updateTypeParameterDeclaration(i,TJ(i.modifiers,_,a_),e,kJ(i.constraint,_,N_),kJ(i.default,_,N_))}if(lE(i)){const e=d(i);return e||(c(),i)}if($D(i)){const e=m(i);return e||(c(),i)}if(vf(i)){if(132===(null==(o=i.attributes)?void 0:o.token))return c(),i;if(!t.canReuseTypeNode(n,i))return t.serializeExistingTypeNode(n,i);const e=g(i,i.argument.literal),a=e===i.argument.literal?r(n,i.argument.literal):e;return kw.updateImportTypeNode(i,a===i.argument.literal?r(n,i.argument):kw.createLiteralTypeNode(a),kJ(i.attributes,_,OF),kJ(i.qualifier,_,s_),TJ(i.typeArguments,_,N_),i.isTypeOf)}if(Fc(i)&&168===i.name.kind&&!t.hasLateBindableName(i)){if(!Wh(i))return a(i,_);if(t.shouldRemoveDeclaration(n,i))return}if(__(i)&&!i.type||LD(i)&&!i.type&&!i.initializer||OD(i)&&!i.type&&!i.initializer||AD(i)&&!i.type&&!i.initializer){let e=a(i,_);return e===i&&(e=t.markNodeReuse(n,kw.cloneNode(i),i)),e.type=kw.createKeywordTypeNode(133),AD(i)&&(e.modifiers=void 0),e}if(GD(i)){const e=f(i);return e||(c(),i)}if(FD(i)&&fb(i.expression)){const{node:r,introducesError:o}=t.trackExistingEntityName(n,i.expression);if(o){const r=t.serializeTypeOfExpression(n,i.expression);let o;if(uE(r))o=r.literal;else{const e=t.evaluateEntityNameExpression(i.expression),a="string"==typeof e.value?kw.createStringLiteral(e.value,void 0):"number"==typeof e.value?kw.createNumericLiteral(e.value,0):void 0;if(!a)return dE(r)&&t.trackComputedName(n,i.expression),i;o=a}return 11===o.kind&&Ss(o.text,wS(e))?kw.createIdentifier(o.text):9!==o.kind||o.text.startsWith("-")?kw.updateComputedPropertyName(i,o):o}return kw.updateComputedPropertyName(i,r)}if(WD(i)){let e;if(fD(i.parameterName)){const{node:r,introducesError:o}=t.trackExistingEntityName(n,i.parameterName);o&&c(),e=r}else e=kw.cloneNode(i.parameterName);return kw.updateTypePredicateNode(i,kw.cloneNode(i.assertsModifier),e,kJ(i.type,_,N_))}if(YD(i)||XD(i)||_E(i)){const e=a(i,_),r=t.markNodeReuse(n,e===i?kw.cloneNode(i):e,i);return Ew(r,ap(r)|(1024&n.flags&&XD(i)?0:1)),r}if(QN(i)&&268435456&n.flags&&!i.singleQuote){const e=kw.cloneNode(i);return e.singleQuote=!0,e}if(iE(i)){const e=kJ(i.checkType,_,N_),r=t.enterNewScope(n,i),o=kJ(i.extendsType,_,N_),a=kJ(i.trueType,_,N_);r();const s=kJ(i.falseType,_,N_);return kw.updateConditionalTypeNode(i,e,o,a,s)}if(cE(i))if(158===i.operator&&155===i.type.kind){if(!t.canReuseTypeNode(n,i))return c(),i}else if(143===i.operator){const e=p(i);return e||(c(),i)}return a(i,_);function a(e,t){return IJ(e,t,void 0,!n.enclosingFile||n.enclosingFile!==wd(e)?s:void 0)}function s(e,t,n,r,i){let o=TJ(e,t,n,r,i);return o&&(-1===o.pos&&-1===o.end||(o===e&&(o=kw.createNodeArray(e.slice(),e.hasTrailingComma)),IT(o,-1,-1))),o}function l(e){return e.dotDotDotToken||(e.type&&EP(e.type)?kw.createToken(26):void 0)}function u(e,t){return e.name&&fD(e.name)&&"this"===e.name.escapedText?"this":l(e)?"args":`arg${t}`}function g(e,r){const i=t.getModuleSpecifierOverride(n,e,r);return i?Cw(kw.createStringLiteral(i),r):r}}(i);return null==l||l(),s()?N_(i)&&!WD(i)?(o(),t.serializeExistingTypeNode(n,i)):i:u?t.markNodeReuse(n,u,i):void 0}function u(e){const t=dh(e);switch(t.kind){case 184:return m(t);case 187:return f(t);case 200:return d(t);case 199:const e=t;if(143===e.operator)return p(e)}return kJ(e,_,N_)}function d(e){const t=u(e.objectType);if(void 0!==t)return kw.updateIndexedAccessTypeNode(e,t,kJ(e.indexType,_,N_))}function p(e){gn.assertEqual(e.operator,143);const t=u(e.type);if(void 0!==t)return kw.updateTypeOperatorNode(e,t)}function f(e){const{introducesError:r,node:i}=t.trackExistingEntityName(n,e.exprName);if(!r)return kw.updateTypeQueryNode(e,i,TJ(e.typeArguments,_,N_));const o=t.serializeTypeName(n,e.exprName,!0);return o?t.markNodeReuse(n,o,e.exprName):void 0}function m(e){if(t.canReuseTypeNode(n,e)){const{introducesError:r,node:i}=t.trackExistingEntityName(n,e.typeName),o=TJ(e.typeArguments,_,N_);if(!r){const r=kw.updateTypeReferenceNode(e,i,o);return t.markNodeReuse(n,r,e)}{const r=t.serializeTypeName(n,e.typeName,!1,o);if(r)return t.markNodeReuse(n,r,e.typeName)}}}}function o(e,n,r){if(!e)return;let o;return r&&!w(e)||!t.canReuseTypeNode(n,e)||(o=i(n,e),void 0!==o&&(o=C(o,r,void 0,n))),o}function a(e,n,r,i,a,s=void 0!==a){if(!e)return;if(!(t.canReuseTypeNodeAnnotation(n,r,e,i,a)||a&&t.canReuseTypeNodeAnnotation(n,r,e,i,!1)))return;let c;return a&&!w(e)||(c=o(e,n,a)),void 0===c&&s?(n.tracker.reportInferenceFallback(r),t.serializeExistingTypeNode(n,e,a)??kw.createKeywordTypeNode(133)):c}function s(e,n,r,i){if(!e)return;const a=o(e,n,r);return void 0!==a?a:(n.tracker.reportInferenceFallback(i??e),t.serializeExistingTypeNode(n,e,r)??kw.createKeywordTypeNode(133))}function c(e,n,r){return function(e,n,r){const i=t.getAllAccessorDeclarations(e),o=function(e,t){let n=_(e);n||e===t.firstAccessor||(n=_(t.firstAccessor));!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=_(t.secondAccessor));return n}(e,i);if(o&&!WD(o))return m(r,e,()=>a(o,r,e,n)??d(e,n,r));if(i.getAccessor)return m(r,i.getAccessor,()=>N(i.getAccessor,n,r));return}(e,n,r)??f(e,t.getAllAccessorDeclarations(e),r,n)}function l(e,t,n,r){const i=h(e,t,!1,n,r);return void 0!==i.type?i.type:p(e,t,i.reportFallback)}function _(e){if(e)return 178===e.kind?Mm(e)&&ll(e)||kv(e):Cv(e)}function u(e,n,r){const i=e.parent;if(179===i.kind)return c(i,void 0,r);const o=xv(e),s=t.requiresAddingImplicitUndefined(e,n,r.enclosingDeclaration);let l=aG;return o?l=rG(a(o,r,e,n,s)):AD(e)&&e.initializer&&fD(e.name)&&!D(e)&&(l=h(e.initializer,r,void 0,s)),void 0!==l.type?l.type:d(e,n,r,l.reportFallback)}function d(e,n,r,i=!0){return i&&r.tracker.reportInferenceFallback(e),!0===r.noInferenceFallback?kw.createKeywordTypeNode(133):t.serializeTypeOfDeclaration(r,e,n)}function p(e,n,r=!0,i){return gn.assert(!i),r&&n.tracker.reportInferenceFallback(e),!0===n.noInferenceFallback?kw.createKeywordTypeNode(133):t.serializeTypeOfExpression(n,e)??kw.createKeywordTypeNode(133)}function f(e,n,r,i,o=!0){if(178===e.kind)return N(e,i,r,o);o&&r.tracker.reportInferenceFallback(e);return(n.getAccessor&&N(n.getAccessor,i,r,o))??t.serializeTypeOfDeclaration(r,e,i)??kw.createKeywordTypeNode(133)}function m(e,n,r){const i=t.enterNewScope(e,n),o=r();return i(),o}function g(e,t,n,r){return El(t)?h(e,n,!0,r):rG(s(t,n,r))}function h(e,r,i=!1,o=!1,a=!1){switch(e.kind){case 218:return AA(e)?g(e.expression,IA(e),r,o):h(e.expression,r,i,o);case 80:if(t.isUndefinedIdentifierExpression(e))return rG(k());break;case 106:return rG(n?C(kw.createLiteralTypeNode(kw.createNull()),o,e,r):kw.createKeywordTypeNode(133));case 220:case 219:return gn.type(e),m(r,e,()=>function(e,t){const n=N(e,void 0,t),r=b(e.typeParameters,t),i=e.parameters.map(e=>v(e,t));return rG(kw.createFunctionTypeNode(r,i,n))}(e,r));case 217:case 235:const s=e;return g(s.expression,s.type,r,o);case 225:const c=e;if(DC(c))return T(40===c.operator?c.operand:c,10===c.operand.kind?163:150,r,i||a,o);break;case 210:return function(e,t,n,r){if(!function(e,t,n){if(!n)return t.tracker.reportInferenceFallback(e),!1;for(const n of e.elements)if(231===n.kind)return t.tracker.reportInferenceFallback(n),!1;return!0}(e,t,n))return r||hu(_h(e).parent)?oG:rG(p(e,t,!1,r));const i=t.noInferenceFallback;t.noInferenceFallback=!0;const o=[];for(const r of e.elements)if(gn.assert(231!==r.kind),233===r.kind)o.push(k());else{const e=h(r,t,n),i=void 0!==e.type?e.type:p(r,t,e.reportFallback);o.push(i)}return kw.createTupleTypeNode(o).emitNode={flags:1,autoGenerate:void 0,internalFlags:0},t.noInferenceFallback=i,iG}(e,r,i,o);case 211:return function(e,n,r,i){if(!function(e,n){let r=!0;for(const i of e.properties){if(262144&i.flags){r=!1;break}if(305===i.kind||306===i.kind)n.tracker.reportInferenceFallback(i),r=!1;else{if(262144&i.name.flags){r=!1;break}if(81===i.name.kind)r=!1;else if(168===i.name.kind){const e=i.name.expression;DC(e,!1)||t.isDefinitelyReferenceToGlobalSymbolObject(e)||(n.tracker.reportInferenceFallback(i.name),r=!1)}}}return r}(e,n))return i||hu(_h(e).parent)?oG:rG(p(e,n,!1,i));const o=n.noInferenceFallback;n.noInferenceFallback=!0;const a=[],s=n.flags;n.flags|=4194304;for(const t of e.properties){gn.assert(!dP(t)&&!pP(t));const e=t.name;let i;switch(t.kind){case 175:i=m(n,t,()=>x(t,e,n,r));break;case 304:i=y(t,e,n,r);break;case 179:case 178:i=S(t,e,n)}i&&(Jw(i,t),a.push(i))}n.flags=s;const c=kw.createTypeLiteralNode(a);1024&n.flags||Ew(c,1);return n.noInferenceFallback=o,iG}(e,r,i,o);case 232:return rG(p(e,r,!0,o));case 229:if(!i&&!a)return rG(kw.createKeywordTypeNode(154));break;default:let l,_=e;switch(e.kind){case 9:l=150;break;case 15:_=kw.createStringLiteral(e.text),l=154;break;case 11:l=154;break;case 10:l=163;break;case 112:case 97:l=136}if(l)return T(_,l,r,i||a,o)}return aG}function y(e,t,n,i){const o=i?[kw.createModifier(148)]:[],a=h(e.initializer,n,i),s=void 0!==a.type?a.type:d(e,void 0,n,a.reportFallback);return kw.createPropertySignature(o,r(n,t),void 0,s)}function v(e,n){return kw.updateParameterDeclaration(e,void 0,r(n,e.dotDotDotToken),t.serializeNameOfParameter(n,e),t.isOptionalParameter(e)?kw.createToken(58):void 0,u(e,void 0,n),void 0)}function b(e,n){return null==e?void 0:e.map(e=>{var i;const{node:o}=t.trackExistingEntityName(n,e.name);return kw.updateTypeParameterDeclaration(e,null==(i=e.modifiers)?void 0:i.map(e=>r(n,e)),o,s(e.constraint,n),s(e.default,n))})}function x(e,t,n,i){const o=N(e,void 0,n),a=b(e.typeParameters,n),s=e.parameters.map(e=>v(e,n));return i?kw.createPropertySignature([kw.createModifier(148)],r(n,t),r(n,e.questionToken),kw.createFunctionTypeNode(a,s,o)):(fD(t)&&"new"===t.escapedText&&(t=kw.createStringLiteral("new")),kw.createMethodSignature([],r(n,t),r(n,e.questionToken),a,s,o))}function S(e,n,i){const o=t.getAllAccessorDeclarations(e),a=o.getAccessor&&_(o.getAccessor),c=o.setAccessor&&_(o.setAccessor);if(void 0!==a&&void 0!==c)return m(i,e,()=>{const t=e.parameters.map(e=>v(e,i));return Ou(e)?kw.updateGetAccessorDeclaration(e,[],r(i,n),t,s(a,i),void 0):kw.updateSetAccessorDeclaration(e,[],r(i,n),t,void 0)});if(o.firstAccessor===e){const t=(a?m(i,o.getAccessor,()=>s(a,i)):c?m(i,o.setAccessor,()=>s(c,i)):void 0)??f(e,o,i,void 0);return kw.createPropertySignature(void 0===o.setAccessor?[kw.createModifier(148)]:[],r(i,n),void 0,t)}}function k(){return n?kw.createKeywordTypeNode(157):kw.createKeywordTypeNode(133)}function T(e,t,n,i,o){let a;return i?(225===e.kind&&40===e.operator&&(a=kw.createLiteralTypeNode(r(n,e.operand))),a=kw.createLiteralTypeNode(r(n,e))):a=kw.createKeywordTypeNode(t),rG(C(a,o,e,n))}function C(e,t,r,i){const o=r&&_h(r).parent,a=o&&hu(o)&&iC(o);return n&&(t||a)?(w(e)||i.tracker.reportInferenceFallback(e),nE(e)?kw.createUnionTypeNode([...e.types,kw.createKeywordTypeNode(157)]):kw.createUnionTypeNode([e,kw.createKeywordTypeNode(157)])):e}function w(e){return!n||(!(!Ah(e.kind)&&202!==e.kind&&185!==e.kind&&186!==e.kind&&189!==e.kind&&190!==e.kind&&188!==e.kind&&204!==e.kind&&198!==e.kind)||(197===e.kind?w(e.type):(193===e.kind||194===e.kind)&&e.types.every(w)))}function N(e,n,r,i=!0){let s=aG;const c=Og(e)?xv(e.parameters[0]):kv(e);return c?s=rG(a(c,r,e,n)):sh(e)&&(s=function(e,t){let n;if(e&&!Od(e.body)){if(3&zh(e))return aG;const t=e.body;t&&YE(t)?Lf(t,e=>e.parent!==t||n?(n=void 0,!0):void(n=e.expression)):n=t}if(n){if(!D(n))return h(n,t);{const e=AA(n)?IA(n):UE(n)||CE(n)?n.type:void 0;if(e&&!El(e))return rG(o(e,t))}}return aG}(e,r)),void 0!==s.type?s.type:function(e,n,r,i){return i&&n.tracker.reportInferenceFallback(e),!0===n.noInferenceFallback?kw.createKeywordTypeNode(133):t.serializeReturnTypeForSignature(n,e,r)??kw.createKeywordTypeNode(133)}(e,r,n,i&&s.reportFallback&&!c)}function D(e){return yc(e.parent,e=>SE(e)||!d_(e)&&!!xv(e)||GF(e)||oP(e))}}var cG={};a(cG,{NameValidationResult:()=>PG,discoverTypings:()=>EG,isTypingUpToDate:()=>CG,loadSafeList:()=>NG,loadTypesMap:()=>DG,nonRelativeModuleNameForTypingCache:()=>wG,renderPackageNameValidationFailure:()=>LG,validatePackageName:()=>IG});var lG,_G,uG="action::set",dG="action::invalidate",pG="action::packageInstalled",fG="event::typesRegistry",mG="event::beginInstallTypes",gG="event::endInstallTypes",hG="event::initializationFailed",yG="action::watchTypingLocations";function vG(e){return mo.args.includes(e)}function bG(e){const t=mo.args.indexOf(e);return t>=0&&te.readFile(t));return new Map(Object.entries(n.config))}function DG(e,t){var n;const r=DL(t,t=>e.readFile(t));if(null==(n=r.config)?void 0:n.simpleMap)return new Map(Object.entries(r.config.simpleMap))}function EG(e,t,n,r,i,o,a,s,c,l){if(!a||!a.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};const _=new Map;n=U(n,e=>{const t=Ko(e);if(qk(t))return t});const u=[];a.include&&y(a.include,"Explicitly included types");const d=a.exclude||[];if(!l.types){const e=new Set(n.map(Lo));e.add(r),e.forEach(e=>{v(e,"bower.json","bower_components",u),v(e,"package.json","node_modules",u)})}if(a.disableFilenameBasedTypeAcquisition||function(e){const n=U(e,e=>{if(!qk(e))return;const t=Wt(Qk(mt(jo(e))));return i.get(t)});n.length&&y(n,"Inferred typings from file names");X(e,e=>Eo(e,".jsx"))&&(t&&t("Inferred 'react' typings due to presence of '.jsx' extension"),h("react"))}(n),s){y(ne(s.map(wG),St,Ft),"Inferred typings from unresolved imports")}for(const e of d){_.delete(e)&&t&&t(`Typing for ${e} is in exclude list, will be ignored.`)}o.forEach((e,t)=>{const n=c.get(t);!1===_.get(t)&&void 0!==n&&CG(e,n)&&_.set(t,e.typingLocation)});const p=[],f=[];_.forEach((e,t)=>{e?f.push(e):p.push(t)});const m={cachedTypingPaths:f,newTypingNames:p,filesToWatch:u};return t&&t(`Finished typings discovery:${TG(m)}`),m;function h(e){_.has(e)||_.set(e,!1)}function y(e,n){t&&t(`${n}: ${JSON.stringify(e)}`),g(e,h)}function v(n,r,i,o){const a=Uo(n,r);let s,c;e.fileExists(a)&&(o.push(a),s=DL(a,t=>e.readFile(t)).config,c=R([s.dependencies,s.devDependencies,s.optionalDependencies,s.peerDependencies],Le),y(c,`Typing names in '${a}' dependencies`));const l=Uo(n,i);if(o.push(l),!e.directoryExists(l))return;const u=[],d=c?c.map(e=>Uo(l,e,r)):e.readDirectory(l,[".json"],void 0,void 0,3).filter(e=>{if(jo(e)!==r)return!1;const t=Bo(Ko(e)),n="@"===t[t.length-3][0];return n&&mt(t[t.length-4])===i||!n&&mt(t[t.length-3])===i});t&&t(`Searching for typing names in ${l}; all files: ${JSON.stringify(d)}`);for(const n of d){const r=Ko(n),i=DL(r,t=>e.readFile(t)).config;if(!i.name)continue;const o=i.types||i.typings;if(o){const n=$o(o,Lo(r));e.fileExists(n)?(t&&t(` Package '${i.name}' provides its own types.`),_.set(i.name,n)):t&&t(` Package '${i.name}' provides its own types but they are missing.`)}else u.push(i.name)}y(u," Found package names")}}var FG,PG=(e=>(e[e.Ok=0]="Ok",e[e.EmptyName=1]="EmptyName",e[e.NameTooLong=2]="NameTooLong",e[e.NameStartsWithDot=3]="NameStartsWithDot",e[e.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",e[e.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters",e))(PG||{}),AG=214;function IG(e){return OG(e,!0)}function OG(e,t){if(!e)return 1;if(e.length>AG)return 2;if(46===e.charCodeAt(0))return 3;if(95===e.charCodeAt(0))return 4;if(t){const t=/^@([^/]+)\/([^/]+)$/.exec(e);if(t){const e=OG(t[1],!1);if(0!==e)return{name:t[1],isScopeName:!0,result:e};const n=OG(t[2],!1);return 0!==n?{name:t[2],isScopeName:!1,result:n}:0}}return encodeURIComponent(e)!==e?5:0}function LG(e,t){return"object"==typeof e?jG(t,e.result,e.name,e.isScopeName):jG(t,e,t,!1)}function jG(e,t,n,r){const i=r?"Scope":"Package";switch(t){case 1:return`'${e}':: ${i} name '${n}' cannot be empty`;case 2:return`'${e}':: ${i} name '${n}' should be less than ${AG} characters`;case 3:return`'${e}':: ${i} name '${n}' cannot start with '.'`;case 4:return`'${e}':: ${i} name '${n}' cannot start with '_'`;case 5:return`'${e}':: ${i} name '${n}' contains non URI safe characters`;case 0:return gn.fail();default:gn.assertNever(t)}}(e=>{class t{constructor(e){this.text=e}getText(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)}getLength(){return this.text.length}getChangeRange(){}}e.fromString=function(e){return new t(e)}})(FG||(FG={}));var MG=(e=>(e[e.Dependencies=1]="Dependencies",e[e.DevDependencies=2]="DevDependencies",e[e.PeerDependencies=4]="PeerDependencies",e[e.OptionalDependencies=8]="OptionalDependencies",e[e.All=15]="All",e))(MG||{}),RG=(e=>(e[e.Off=0]="Off",e[e.On=1]="On",e[e.Auto=2]="Auto",e))(RG||{}),BG=(e=>(e[e.Semantic=0]="Semantic",e[e.PartialSemantic=1]="PartialSemantic",e[e.Syntactic=2]="Syntactic",e))(BG||{}),JG={},zG=(e=>(e.Original="original",e.TwentyTwenty="2020",e))(zG||{}),qG=(e=>(e.All="All",e.SortAndCombine="SortAndCombine",e.RemoveUnused="RemoveUnused",e))(qG||{}),UG=(e=>(e[e.Invoked=1]="Invoked",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",e))(UG||{}),VG=(e=>(e.Type="Type",e.Parameter="Parameter",e.Enum="Enum",e))(VG||{}),WG=(e=>(e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference",e))(WG||{}),$G=(e=>(e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart",e))($G||{}),KG=(e=>(e.Ignore="ignore",e.Insert="insert",e.Remove="remove",e))(KG||{});function HG(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var GG=HG("\n"),XG=(e=>(e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral",e[e.link=22]="link",e[e.linkName=23]="linkName",e[e.linkText=24]="linkText",e))(XG||{}),QG=(e=>(e[e.None=0]="None",e[e.MayIncludeAutoImports=1]="MayIncludeAutoImports",e[e.IsImportStatementCompletion=2]="IsImportStatementCompletion",e[e.IsContinuation=4]="IsContinuation",e[e.ResolvedModuleSpecifiers=8]="ResolvedModuleSpecifiers",e[e.ResolvedModuleSpecifiersBeyondLimit=16]="ResolvedModuleSpecifiersBeyondLimit",e[e.MayIncludeMethodSnippets=32]="MayIncludeMethodSnippets",e))(QG||{}),YG=(e=>(e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports",e))(YG||{}),ZG=(e=>(e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration",e))(ZG||{}),eX=(e=>(e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition",e))(eX||{}),tX=(e=>(e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral",e))(tX||{}),nX=(e=>(e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.variableUsingElement="using",e.variableAwaitUsingElement="await using",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.memberAccessorVariableElement="accessor",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string",e.link="link",e.linkName="link name",e.linkText="link text",e))(nX||{}),rX=(e=>(e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.deprecatedModifier="deprecated",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json",e.dmtsModifier=".d.mts",e.mtsModifier=".mts",e.mjsModifier=".mjs",e.dctsModifier=".d.cts",e.ctsModifier=".cts",e.cjsModifier=".cjs",e))(rX||{}),iX=(e=>(e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value",e))(iX||{}),oX=(e=>(e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral",e))(oX||{}),aX=ks(99,!0),sX=(e=>(e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All",e))(sX||{});function cX(e){switch(e.kind){case 261:return Mm(e)&&rl(e)?7:1;case 170:case 209:case 173:case 172:case 304:case 305:case 175:case 174:case 177:case 178:case 179:case 263:case 219:case 220:case 300:case 292:return 1;case 169:case 265:case 266:case 188:return 2;case 347:return void 0===e.name?3:2;case 307:case 264:return 3;case 268:return mp(e)||1===rB(e)?5:4;case 267:case 276:case 277:case 272:case 273:case 278:case 279:return 7;case 308:return 5}return 7}function lX(e){const t=(e=cQ(e)).parent;return 308===e.kind?1:JF(t)||UF(t)||HF(t)||BF(t)||FF(t)||DF(t)&&e===t.name?7:_X(e)?function(e){const t=167===e.kind?e:ED(e.parent)&&e.parent.right===e?e.parent:void 0;return t&&272===t.parent.kind?7:4}(e):gh(e)?cX(t):s_(e)&&yc(e,an(yP,Vu,vP))?7:function(e){bb(e)&&(e=e.parent);switch(e.kind){case 110:return!Nm(e);case 198:return!0}switch(e.parent.kind){case 184:return!0;case 206:return!e.parent.isTypeOf;case 234:return If(e.parent)}return!1}(e)?2:function(e){return function(e){let t=e,n=!0;if(167===t.parent.kind){for(;t.parent&&167===t.parent.kind;)t=t.parent;n=t.right===e}return 184===t.parent.kind&&!n}(e)||function(e){let t=e,n=!0;if(212===t.parent.kind){for(;t.parent&&212===t.parent.kind;)t=t.parent;n=t.name===e}if(!n&&234===t.parent.kind&&299===t.parent.parent.kind){const e=t.parent.parent.parent;return 264===e.kind&&119===t.parent.parent.token||265===e.kind&&96===t.parent.parent.token}return!1}(e)}(e)?4:PD(t)?(gn.assert(QP(t.parent)),2):uE(t)?3:1}function _X(e){if(!e.parent)return!1;for(;167===e.parent.kind;)e=e.parent;return Om(e.parent)&&e.parent.moduleReference===e}function uX(e,t=!1,n=!1){return bX(e,SE,hX,t,n)}function dX(e,t=!1,n=!1){return bX(e,kE,hX,t,n)}function pX(e,t=!1,n=!1){return bX(e,U_,hX,t,n)}function fX(e,t=!1,n=!1){return bX(e,TE,yX,t,n)}function mX(e,t=!1,n=!1){return bX(e,ID,hX,t,n)}function gX(e,t=!1,n=!1){return bX(e,Nu,vX,t,n)}function hX(e){return e.expression}function yX(e){return e.tag}function vX(e){return e.tagName}function bX(e,t,n,r,i){let o=r?function(e){return EX(e)||FX(e)?e.parent:e}(e):xX(e);return i&&(o=LA(o)),!!o&&!!o.parent&&t(o.parent)&&n(o.parent)===o}function xX(e){return EX(e)?e.parent:e}function SX(e,t){for(;e;){if(257===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}}function kX(e,t){return!!bE(e.expression)&&e.expression.name.text===t}function TX(e){var t;return fD(e)&&(null==(t=at(e.parent,Al))?void 0:t.label)===e}function CX(e){var t;return fD(e)&&(null==(t=at(e.parent,pF))?void 0:t.label)===e}function wX(e){return CX(e)||TX(e)}function NX(e){var t;return(null==(t=at(e.parent,Au))?void 0:t.tagName)===e}function DX(e){var t;return(null==(t=at(e.parent,ED))?void 0:t.right)===e}function EX(e){var t;return(null==(t=at(e.parent,bE))?void 0:t.name)===e}function FX(e){var t;return(null==(t=at(e.parent,xE))?void 0:t.argumentExpression)===e}function PX(e){var t;return(null==(t=at(e.parent,TF))?void 0:t.name)===e}function AX(e){var t;return fD(e)&&(null==(t=at(e.parent,__))?void 0:t.name)===e}function IX(e){switch(e.parent.kind){case 173:case 172:case 304:case 307:case 175:case 174:case 178:case 179:case 268:return Ac(e.parent)===e;case 213:return e.parent.argumentExpression===e;case 168:return!0;case 202:return 200===e.parent.parent.kind;default:return!1}}function OX(e){return Pm(e.parent.parent)&&Am(e.parent.parent)===e}function LX(e){for(Lg(e)&&(e=e.parent.parent);;){if(!(e=e.parent))return;switch(e.kind){case 308:case 175:case 174:case 263:case 219:case 178:case 179:case 264:case 265:case 267:case 268:return e}}}function jX(e){switch(e.kind){case 308:return fO(e)?"module":"script";case 268:return"module";case 264:case 232:return"class";case 265:return"interface";case 266:case 339:case 347:return"type";case 267:return"enum";case 261:return t(e);case 209:return t(oy(e));case 220:case 263:case 219:return"function";case 178:return"getter";case 179:return"setter";case 175:case 174:return"method";case 304:const{initializer:n}=e;return __(n)?"method":"property";case 173:case 172:case 305:case 306:return"property";case 182:return"index";case 181:return"construct";case 180:return"call";case 177:case 176:return"constructor";case 169:return"type parameter";case 307:return"enum member";case 170:return Lv(e,31)?"property":"parameter";case 272:case 277:case 282:case 275:case 281:return"alias";case 227:const r=cg(e),{right:i}=e;switch(r){case 7:case 8:case 9:case 0:default:return"";case 1:case 2:const e=jX(i);return""===e?"const":e;case 3:case 5:return NE(i)?"method":"property";case 4:return"property";case 6:return"local class"}case 80:return FF(e.parent)?"alias":"";case 278:const o=jX(e.expression);return""===o?"const":o;default:return""}function t(e){return pf(e)?"const":mf(e)?"let":"var"}}function MX(e){switch(e.kind){case 110:return!0;case 80:return vv(e)&&170===e.parent.kind;default:return!1}}var RX=/^\/\/\/\s*=n}function VX(e,t,n){return $X(e.pos,e.end,t,n)}function WX(e,t,n,r){return $X(e.getStart(t),e.end,n,r)}function $X(e,t,n,r){return Math.max(e,n)e.kind===t)}function ZX(e){const t=T(e.parent.getChildren(),t=>oA(t)&&ix(t,e));return gn.assert(!t||D(t.getChildren(),e)),t}function eQ(e){return 90===e.kind}function tQ(e){return 86===e.kind}function nQ(e){return 100===e.kind}function rQ(e,t){if(16777216&e.flags)return;const n=wZ(e,t);if(n)return n;const r=function(e){let t;return yc(e,e=>(N_(e)&&(t=e),!ED(e.parent)&&!N_(e.parent)&&!T_(e.parent))),t}(e);return r&&t.getTypeAtLocation(r)}function iQ(e,t){if(!t)switch(e.kind){case 264:case 232:return function(e){if(Fc(e))return e.name;if(bF(e)){const t=e.modifiers&&T(e.modifiers,eQ);if(t)return t}if(JE(e)){const t=T(e.getChildren(),tQ);if(t)return t}}(e);case 263:case 219:return function(e){if(Fc(e))return e.name;if(vF(e)){const t=T(e.modifiers,eQ);if(t)return t}if(NE(e)){const t=T(e.getChildren(),nQ);if(t)return t}}(e);case 177:return e}if(Fc(e))return e.name}function oQ(e,t){if(e.importClause){if(e.importClause.name&&e.importClause.namedBindings)return;if(e.importClause.name)return e.importClause.name;if(e.importClause.namedBindings){if(RF(e.importClause.namedBindings)){const t=Ce(e.importClause.namedBindings.elements);if(!t)return;return t.name}if(jF(e.importClause.namedBindings))return e.importClause.namedBindings.name}}if(!t)return e.moduleSpecifier}function aQ(e,t){if(e.exportClause){if(qF(e.exportClause)){if(!Ce(e.exportClause.elements))return;return e.exportClause.elements[0].name}if(MF(e.exportClause))return e.exportClause.name}if(!t)return e.moduleSpecifier}function sQ(e,t){const{parent:n}=e;if(a_(e)&&(t||90!==e.kind)?II(n)&&D(n.modifiers,e):86===e.kind?bF(n)||JE(e):100===e.kind?vF(n)||NE(e):120===e.kind?xF(n):94===e.kind?kF(n):156===e.kind?SF(n):145===e.kind||144===e.kind?TF(n):102===e.kind?DF(n):139===e.kind?JD(n):153===e.kind&&zD(n)){const e=iQ(n,t);if(e)return e}if((115===e.kind||87===e.kind||121===e.kind)&&yF(n)&&1===n.declarations.length){const e=n.declarations[0];if(fD(e.name))return e.name}if(156===e.kind){if(FF(n)&&n.isTypeOnly){const e=oQ(n.parent,t);if(e)return e}if(zF(n)&&n.isTypeOnly){const e=aQ(n,t);if(e)return e}}if(130===e.kind){if(BF(n)&&n.propertyName||UF(n)&&n.propertyName||jF(n)||MF(n))return n.name;if(zF(n)&&n.exportClause&&MF(n.exportClause))return n.exportClause.name}if(102===e.kind&&EF(n)){const e=oQ(n,t);if(e)return e}if(95===e.kind){if(zF(n)){const e=aQ(n,t);if(e)return e}if(JF(n))return LA(n.expression)}if(149===e.kind&&HF(n))return n.expression;if(161===e.kind&&(EF(n)||zF(n))&&n.moduleSpecifier)return n.moduleSpecifier;if((96===e.kind||119===e.kind)&&lP(n)&&n.token===e.kind){const e=function(e){if(1===e.types.length)return e.types[0].expression}(n);if(e)return e}if(96===e.kind){if(PD(n)&&n.constraint&&$D(n.constraint))return n.constraint.typeName;if(iE(n)&&$D(n.extendsType))return n.extendsType.typeName}if(140===e.kind&&oE(n))return n.typeParameter.name;if(103===e.kind&&PD(n)&&_E(n.parent))return n.name;if(143===e.kind&&cE(n)&&143===n.operator&&$D(n.type))return n.type.typeName;if(148===e.kind&&cE(n)&&148===n.operator&&QD(n.type)&&$D(n.type.elementType))return n.type.elementType.typeName;if(!t){if((105===e.kind&&kE(n)||116===e.kind&&PE(n)||114===e.kind&&FE(n)||135===e.kind&&AE(n)||127===e.kind&&RE(n)||91===e.kind&&EE(n))&&n.expression)return LA(n.expression);if((103===e.kind||104===e.kind)&&LE(n)&&n.operatorToken===e)return LA(n.right);if(130===e.kind&&UE(n)&&$D(n.type))return n.type.typeName;if(103===e.kind&&aF(n)||165===e.kind&&sF(n))return LA(n.expression)}return e}function cQ(e){return sQ(e,!1)}function lQ(e){return sQ(e,!0)}function _Q(e,t){return uQ(e,t,e=>Hh(e)||Ah(e.kind)||mD(e))}function uQ(e,t,n){return pQ(e,t,!1,n,!1)}function dQ(e,t){return pQ(e,t,!0,void 0,!1)}function pQ(e,t,n,r,i){let o,a=e;for(;;){const i=a.getChildren(e),c=Fe(i,t,(e,t)=>t,(o,a)=>{const c=i[o].getEnd();if(ct?1:s(i[o],l,c)?i[o-1]&&s(i[o-1])?1:0:r&&l===t&&i[o-1]&&i[o-1].getEnd()===t&&s(i[o-1])?1:-1});if(o)return o;if(!(c>=0&&i[c]))return a;a=i[c]}function s(a,s,c){if(c??(c=a.getEnd()),ct)return!1;if(tn.getStart(e)&&t(r.pos<=e.pos&&r.end>e.end||r.pos===e.end)&&IQ(r,n)?t(r):void 0)}(t)}function hQ(e,t,n,r){const i=function i(o){if(yQ(o)&&1!==o.kind)return o;const a=o.getChildren(t),s=Fe(a,e,(e,t)=>t,(t,n)=>e=a[t-1].end?0:1:-1);if(s>=0&&a[s]){const n=a[s];if(e=e||!IQ(n,t)||kQ(n)){const e=bQ(a,s,t,o.kind);return e?!r&&Pu(e)&&e.getChildren(t).length?i(e):vQ(e,t):void 0}return i(n)}}gn.assert(void 0!==n||308===o.kind||1===o.kind||Pu(o));const c=bQ(a,a.length,t,o.kind);return c&&vQ(c,t)}(n||t);return gn.assert(!(i&&kQ(i))),i}function yQ(e){return Ml(e)&&!kQ(e)}function vQ(e,t){if(yQ(e))return e;const n=e.getChildren(t);if(0===n.length)return e;const r=bQ(n,n.length,t,e.kind);return r&&vQ(r,t)}function bQ(e,t,n,r){for(let i=t-1;i>=0;i--){if(kQ(e[i]))0!==i||12!==r&&286!==r||gn.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(IQ(e[i],n))return e[i]}}function xQ(e,t,n=hQ(t,e)){if(n&&Xl(n)){const r=n.getStart(e),i=n.getEnd();if(rn.getStart(e)}function CQ(e,t){const n=dQ(e,t);return!!YN(n)||(!(19!==n.kind||!oP(n.parent)||!GF(n.parent.parent))||!(30!==n.kind||!Nu(n.parent)||!GF(n.parent.parent)))}function wQ(e,t){return function(n){for(;n;)if(n.kind>=286&&n.kind<=295||12===n.kind||30===n.kind||32===n.kind||80===n.kind||20===n.kind||19===n.kind||44===n.kind)n=n.parent;else{if(285!==n.kind)return!1;if(t>n.getStart(e))return!0;n=n.parent}return!1}(dQ(e,t))}function NQ(e,t,n){const r=ja(e.kind),i=ja(t),o=e.getFullStart(),a=n.text.lastIndexOf(i,o);if(-1===a)return;if(n.text.lastIndexOf(r,o-1)!!e.typeParameters&&e.typeParameters.length>=t)}function FQ(e,t){if(-1===t.text.lastIndexOf("<",e?e.pos:t.text.length))return;let n=e,r=0,i=0;for(;n;){switch(n.kind){case 30:if(n=hQ(n.getFullStart(),t),n&&29===n.kind&&(n=hQ(n.getFullStart(),t)),!n||!fD(n))return;if(!r)return gh(n)?void 0:{called:n,nTypeArguments:i};r--;break;case 50:r=3;break;case 49:r=2;break;case 32:r++;break;case 20:if(n=NQ(n,19,t),!n)return;break;case 22:if(n=NQ(n,21,t),!n)return;break;case 24:if(n=NQ(n,23,t),!n)return;break;case 28:i++;break;case 39:case 80:case 11:case 9:case 10:case 112:case 97:case 114:case 96:case 143:case 25:case 52:case 58:case 59:break;default:if(N_(n))break;return}n=hQ(n.getFullStart(),t)}}function PQ(e,t,n){return jde.getRangeOfEnclosingComment(e,t,void 0,n)}function AQ(e,t){return!!yc(dQ(e,t),PP)}function IQ(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function OQ(e,t=0){const n=[],r=hu(e)?dc(e)&~t:0;return 2&r&&n.push("private"),4&r&&n.push("protected"),1&r&&n.push("public"),(256&r||RD(e))&&n.push("static"),64&r&&n.push("abstract"),32&r&&n.push("export"),65536&r&&n.push("deprecated"),33554432&e.flags&&n.push("declare"),278===e.kind&&n.push("export"),n.length>0?n.join(","):""}function LQ(e){return 184===e.kind||214===e.kind?e.typeArguments:__(e)||264===e.kind||265===e.kind?e.typeParameters:void 0}function jQ(e){return 2===e||3===e}function MQ(e){return!(11!==e&&14!==e&&!ql(e))}function RQ(e,t,n){return!!(4&t.flags)&&e.isEmptyAnonymousObjectType(n)}function BQ(e){if(!e.isIntersection())return!1;const{types:t,checker:n}=e;return 2===t.length&&(RQ(n,t[0],t[1])||RQ(n,t[1],t[0]))}function JQ(e,t,n){return ql(e.kind)&&e.getStart(n){const n=pJ(t);return!e[n]&&(e[n]=!0)}}function aY(e){return e.getText(0,e.getLength())}function sY(e,t){let n="";for(let r=0;r!(t.isDeclarationFile||e.isSourceFileFromExternalLibrary(t)||!t.externalModuleIndicator&&!t.commonJsModuleIndicator))}function uY(e){return e.getSourceFiles().some(t=>!t.isDeclarationFile&&!e.isSourceFileFromExternalLibrary(t)&&!!t.externalModuleIndicator)}function dY(e){return!!e.module||wS(e)>=2||!!e.noEmit}function pY(e,t){return{fileExists:t=>e.fileExists(t),getCurrentDirectory:()=>t.getCurrentDirectory(),readFile:Xe(t,t.readFile),useCaseSensitiveFileNames:Xe(t,t.useCaseSensitiveFileNames)||e.useCaseSensitiveFileNames,getSymlinkCache:Xe(t,t.getSymlinkCache)||e.getSymlinkCache,getModuleSpecifierCache:Xe(t,t.getModuleSpecifierCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getModuleResolutionCache())?void 0:t.getPackageJsonInfoCache()},getGlobalTypingsCacheLocation:Xe(t,t.getGlobalTypingsCacheLocation),redirectTargetsMap:e.redirectTargetsMap,getRedirectFromSourceFile:t=>e.getRedirectFromSourceFile(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),getNearestAncestorDirectoryWithPackageJson:Xe(t,t.getNearestAncestorDirectoryWithPackageJson),getFileIncludeReasons:()=>e.getFileIncludeReasons(),getCommonSourceDirectory:()=>e.getCommonSourceDirectory(),getDefaultResolutionModeForFile:t=>e.getDefaultResolutionModeForFile(t),getModeForResolutionAtIndex:(t,n)=>e.getModeForResolutionAtIndex(t,n)}}function fY(e,t){return{...pY(e,t),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function mY(e){return 2===e||e>=3&&e<=99||100===e}function gY(e,t,n,r,i){return kw.createImportDeclaration(void 0,e||t?kw.createImportClause(i?156:void 0,e,t&&t.length?kw.createNamedImports(t):void 0):void 0,"string"==typeof n?hY(n,r):n,void 0)}function hY(e,t){return kw.createStringLiteral(e,0===t)}var yY=(e=>(e[e.Single=0]="Single",e[e.Double=1]="Double",e))(yY||{});function vY(e,t){return Gm(e,t)?1:0}function bY(e,t){if(t.quotePreference&&"auto"!==t.quotePreference)return"single"===t.quotePreference?0:1;{const t=Lm(e)&&e.imports&&T(e.imports,e=>QN(e)&&!sy(e.parent));return t?vY(t,e):1}}function xY(e){switch(e){case 0:return"'";case 1:return'"';default:return gn.assertNever(e)}}function SY(e){const t=kY(e);return void 0===t?void 0:Sc(t)}function kY(e){return"default"!==e.escapedName?e.escapedName:y(e.declarations,e=>{const t=Ac(e);return t&&80===t.kind?t.escapedText:void 0})}function TY(e){return Uu(e)&&(HF(e.parent)||EF(e.parent)||iA(e.parent)||qm(e.parent,!1)&&e.parent.arguments[0]===e||hf(e.parent)&&e.parent.arguments[0]===e)}function CY(e){return hE(e)&&mE(e.parent)&&fD(e.name)&&!e.propertyName}function wY(e,t){const n=e.getTypeAtLocation(t.parent);return n&&e.getPropertyOfType(n,t.name.text)}function NY(e,t,n){if(e)for(;e.parent;){if(mP(e.parent)||!DY(n,e.parent,t))return e;e=e.parent}}function DY(e,t,n){return Rs(e,t.getStart(n))&&t.getEnd()<=js(e)}function EY(e,t){return II(e)?T(e.modifiers,e=>e.kind===t):void 0}function FY(e,t,n,r,i){var o;const a=244===(nt(n)?n[0]:n).kind?Km:Fp,s=P(t.statements,a),{comparer:c,isSorted:l}=x_e.getOrganizeImportsStringComparerWithDetection(s,i),_=nt(n)?me(n,(e,t)=>x_e.compareImportsOrRequireStatements(e,t,c)):[n];if(null==s?void 0:s.length)if(gn.assert(Lm(t)),s&&l)for(const n of _){const r=x_e.getImportDeclarationInsertionIndex(s,n,c);if(0===r){const r=s[0]===t.statements[0]?{leadingTriviaOption:sde.LeadingTriviaOption.Exclude}:{};e.insertNodeBefore(t,s[0],n,!1,r)}else{const i=s[r-1];e.insertNodeAfter(t,i,n)}}else{const n=ke(s);n?e.insertNodesAfter(t,n,_):e.insertNodesAtTopOfFile(t,_,r)}else if(Lm(t))e.insertNodesAtTopOfFile(t,_,r);else for(const n of _)e.insertStatementsInNewFile(t.fileName,[n],null==(o=hc(n))?void 0:o.getSourceFile())}function PY(e,t){return gn.assert(e.isTypeOnly),st(e.getChildAt(0,t),rY)}function AY(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}function IY(e,t,n){return(n?St:xt)(e.fileName,t.fileName)&&AY(e.textSpan,t.textSpan)}function OY(e){return(t,n)=>IY(t,n,e)}function LY(e,t){if(e)for(let n=0;n!!AD(e)||!(hE(e)||mE(e)||gE(e))&&"quit")}var zY=new Map;function qY(e){return e=e||Qu,zY.has(e)||zY.set(e,function(e){const t=10*e;let n,r,i,o;u();const a=e=>c(e,17);return{displayParts:()=>{const e=n.length&&n[n.length-1].text;return o>t&&e&&"..."!==e&&(Ga(e.charCodeAt(e.length-1))||n.push(UY(" ",16)),n.push(UY("...",15))),n},writeKeyword:e=>c(e,5),writeOperator:e=>c(e,12),writePunctuation:e=>c(e,15),writeTrailingSemicolon:e=>c(e,15),writeSpace:e=>c(e,16),writeStringLiteral:e=>c(e,8),writeParameter:e=>c(e,13),writeProperty:e=>c(e,14),writeLiteral:e=>c(e,8),writeSymbol:l,writeLine:_,write:a,writeComment:a,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:gt,getIndent:()=>i,increaseIndent:()=>{i++},decreaseIndent:()=>{i--},clear:u};function s(){if(!(o>t)&&r){const e=By(i);e&&(o+=e.length,n.push(UY(e,16))),r=!1}}function c(e,r){o>t||(s(),o+=e.length,n.push(UY(e,r)))}function l(e,r){o>t||(s(),o+=e.length,n.push(function(e,t){return UY(e,n(t));function n(e){const t=e.flags;return 3&t?JY(e)?13:9:4&t||32768&t||65536&t?14:8&t?19:16&t?20:32&t?1:64&t?4:384&t?2:1536&t?11:8192&t?10:262144&t?18:524288&t||2097152&t?0:17}}(e,r)))}function _(){o>t||(o+=1,n.push(oZ()),r=!0)}function u(){n=[],r=!0,i=0,o=0}}(e)),zY.get(e)}function UY(e,t){return{text:e,kind:XG[t]}}function VY(){return UY(" ",16)}function WY(e){return UY(ja(e),5)}function $Y(e){return UY(ja(e),15)}function KY(e){return UY(ja(e),12)}function HY(e){return UY(e,13)}function GY(e){return UY(e,14)}function XY(e){const t=Ma(e);return void 0===t?QY(e):WY(t)}function QY(e){return UY(e,17)}function YY(e){return UY(e,0)}function ZY(e){return UY(e,18)}function eZ(e){return UY(e,24)}function tZ(e){return UY(e,22)}function nZ(e,t){var n;const r=[tZ(`{@${bP(e)?"link":xP(e)?"linkcode":"linkplain"} `)];if(e.name){const i=null==t?void 0:t.getSymbolAtLocation(e.name),o=i&&t?dZ(i,t):void 0,a=function(e){let t=e.indexOf("://");if(0===t){for(;t"===e[n]&&t--,n++,!t)return n}return 0}(e.text),s=rp(e.name)+e.text.slice(0,a),c=function(e){let t=0;if(124===e.charCodeAt(t++)){for(;t{e.writeType(t,n,17408|r,s,i,o,a)},i)}function cZ(e,t,n,r,i=0){return aZ(o=>{e.writeSymbol(t,n,r,8|i,o)})}function lZ(e,t,n,r=0,i,o,a){return r|=25632,aZ(s=>{e.writeSignature(t,n,r,void 0,s,i,o,a)},i)}function _Z(e){return!!e.parent&&Wl(e.parent)&&e.parent.propertyName===e}function uZ(e,t){return Dk(e,t.getScriptKind&&t.getScriptKind(e))}function dZ(e,t){let n=e;for(;pZ(n)||rd(n)&&n.links.target;)n=rd(n)&&n.links.target?n.links.target:px(n,t);return n}function pZ(e){return!!(2097152&e.flags)}function fZ(e,t){return fJ(px(e,t))}function mZ(e,t){for(;Ga(e.charCodeAt(t));)t+=1;return t}function gZ(e,t){for(;t>-1&&Xa(e.charCodeAt(t));)t-=1;return t+1}function hZ(e,t){const n=e.getSourceFile();!function(e,t){const n=e.getFullStart(),r=e.getStart();for(let e=n;e=0),o}function bZ(e,t,n,r,i){ds(n.text,e.pos,kZ(t,n,r,i,Uw))}function xZ(e,t,n,r,i){ps(n.text,e.end,kZ(t,n,r,i,$w))}function SZ(e,t,n,r,i){ps(n.text,e.pos,kZ(t,n,r,i,Uw))}function kZ(e,t,n,r,i){return(o,a,s,c)=>{3===s?(o+=2,a-=2):o+=2,i(e,n||s,t.text.slice(o,a),void 0!==r?r:c)}}function TZ(e,t){if(en(e,t))return 0;let n=e.indexOf(" "+t);return-1===n&&(n=e.indexOf("."+t)),-1===n&&(n=e.indexOf('"'+t)),-1===n?-1:n+1}function CZ(e){return LE(e)&&28===e.operatorToken.kind||vE(e)||(UE(e)||VE(e))&&vE(e.expression)}function wZ(e,t,n){const r=_h(e.parent);switch(r.kind){case 215:return t.getContextualType(r,n);case 227:{const{left:i,operatorToken:o,right:a}=r;return DZ(o.kind)?t.getTypeAtLocation(e===a?i:a):t.getContextualType(e,n)}case 297:return PZ(r,t);default:return t.getContextualType(e,n)}}function NZ(e,t,n){const r=bY(e,t),i=JSON.stringify(n);return 0===r?`'${jy(i).replace(/'/g,()=>"\\'").replace(/\\"/g,'"')}'`:i}function DZ(e){switch(e){case 37:case 35:case 38:case 36:return!0;default:return!1}}function EZ(e){switch(e.kind){case 11:case 15:case 229:case 216:return!0;default:return!1}}function FZ(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()}function PZ(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}var AZ="anonymous function";function IZ(e,t,n,r){const i=n.getTypeChecker();let o=!0;const a=()=>o=!1,s=i.typeToTypeNode(e,t,1,8,{trackSymbol:(e,t,n)=>(o=o&&0===i.isSymbolAccessible(e,t,n,!1).accessibility,!o),reportInaccessibleThisError:a,reportPrivateInBaseOfClassExpression:a,reportInaccessibleUniqueSymbolError:a,moduleResolverHost:fY(n,r)});return o?s:void 0}function OZ(e){return 180===e||181===e||182===e||172===e||174===e}function LZ(e){return 263===e||177===e||175===e||178===e||179===e}function jZ(e){return 268===e}function MZ(e){return 244===e||245===e||247===e||252===e||253===e||254===e||258===e||260===e||173===e||266===e||273===e||272===e||279===e||271===e||278===e}var RZ=an(OZ,LZ,jZ,MZ);function BZ(e,t,n){const r=yc(t,t=>t.end!==e?"quit":RZ(t.kind));return!!r&&function(e,t){const n=e.getLastToken(t);if(n&&27===n.kind)return!1;if(OZ(e.kind)){if(n&&28===n.kind)return!1}else if(jZ(e.kind)){const n=Te(e.getChildren(t));if(n&&CF(n))return!1}else if(LZ(e.kind)){const n=Te(e.getChildren(t));if(n&&$f(n))return!1}else if(!MZ(e.kind))return!1;if(247===e.kind)return!0;const r=gQ(e,yc(e,e=>!e.parent),t);return!r||20===r.kind||t.getLineAndCharacterOfPosition(e.getEnd()).line!==t.getLineAndCharacterOfPosition(r.getStart(t)).line}(r,n)}function JZ(e){let t=0,n=0;return sO(e,function r(i){if(MZ(i.kind)){const r=i.getLastToken(e);27===(null==r?void 0:r.kind)?t++:n++}else if(OZ(i.kind)){const r=i.getLastToken(e);if(27===(null==r?void 0:r.kind))t++;else if(r&&28!==r.kind){Ha(e,r.getStart(e)).line!==Ha(e,nf(e,r.end).start).line&&n++}}return t+n>=5||sO(i,r)}),0===t&&n<=1||t/n>.2}function zZ(e,t){return $Z(e,e.getDirectories,t)||[]}function qZ(e,t,n,r,i){return $Z(e,e.readDirectory,t,n,r,i)||p}function UZ(e,t){return $Z(e,e.fileExists,t)}function VZ(e,t){return WZ(()=>jb(t,e))||!1}function WZ(e){try{return e()}catch{return}}function $Z(e,t,...n){return WZ(()=>t&&t.apply(e,n))}function KZ(e,t){const n=[];return RR(t,e,e=>{const r=Uo(e,"package.json");UZ(t,r)&&n.push(r)}),n}function HZ(e,t){let n;return RR(t,e,e=>"node_modules"===e||(n=ZU(e,e=>UZ(t,e),"package.json"),!!n||void 0)),n}function GZ(e,t){if(!t.readFile)return;const n=["dependencies","devDependencies","optionalDependencies","peerDependencies"],r=Lb(t.readFile(e)||""),i={};if(r)for(const e of n){const t=r[e];if(!t)continue;const n=new Map;for(const e in t)n.set(e,t[e]);i[e]=n}const o=[[1,i.dependencies],[2,i.devDependencies],[8,i.optionalDependencies],[4,i.peerDependencies]];return{...i,parseable:!!r,fileName:e,get:a,has:(e,t)=>!!a(e,t)};function a(e,t=15){for(const[n,r]of o)if(r&&t&n){const t=r.get(e);if(void 0!==t)return t}}}function XZ(e,t,n){const r=(n.getPackageJsonsVisibleToFile&&n.getPackageJsonsVisibleToFile(e.fileName)||function(e,t){if(!t.fileExists)return[];const n=[];return RR(t,Lo(e),e=>{const r=Uo(e,"package.json");if(t.fileExists(r)){const e=GZ(r,t);e&&n.push(e)}}),n}(e.fileName,n)).filter(e=>e.parseable);let i,o,a;return{allowsImportingAmbientModule:function(e,t){if(!r.length||!e.valueDeclaration)return!0;if(o){const t=o.get(e);if(void 0!==t)return t}else o=new Map;const n=jy(e.getName());if(c(n))return o.set(e,!0),!0;const i=l(e.valueDeclaration.getSourceFile().fileName,t);if(void 0===i)return o.set(e,!0),!0;const a=s(i)||s(n);return o.set(e,a),a},getSourceFileInfo:function(e,t){if(!r.length)return{importable:!0,packageName:void 0};if(a){const t=a.get(e);if(void 0!==t)return t}else a=new Map;const n=l(e.fileName,t);if(!n){const t={importable:!0,packageName:n};return a.set(e,t),t}const i={importable:s(n),packageName:n};return a.set(e,i),i},allowsImportingSpecifier:function(e){if(!r.length||c(e))return!0;if(wo(e)||ko(e))return!0;return s(e)}};function s(e){const t=_(e);for(const e of r)if(e.has(t)||e.has(VR(t)))return!0;return!1}function c(t){return!!(Lm(e)&&jm(e)&&LC.has(t)&&(void 0===i&&(i=QZ(e)),i))}function l(r,i){if(!r.includes("node_modules"))return;const o=gB.getNodeModulesPackageName(n.getCompilationSettings(),e,r,i,t);return o?wo(o)||ko(o)?void 0:_(o):void 0}function _(e){const t=Bo($R(e)).slice(1);return en(t[0],"@")?`${t[0]}/${t[1]}`:t[0]}}function QZ(e){return X(e.imports,({text:e})=>LC.has(e))}function YZ(e){return D(Bo(e),"node_modules")}function ZZ(e){return void 0!==e.file&&void 0!==e.start&&void 0!==e.length}function e0(e,t){const n=Fe(t,HQ(e),dt,Ct);if(n>=0){const r=t[n];return gn.assertEqual(r.file,e.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),st(r,ZZ)}}function t0(e,t){var n;let r=Fe(t,e.start,e=>e.start,Tt);for(r<0&&(r=~r);(null==(n=t[r-1])?void 0:n.start)===e.start;)r--;const i=[],o=js(e);for(;;){const n=at(t[r],ZZ);if(!n||n.start>o)break;Js(e,n)&&i.push(n),r++}return i}function n0({startPosition:e,endPosition:t}){return Zs(e,void 0===t?e:t)}function r0(e,t){return yc(dQ(e,t.start),n=>n.getStart(e)js(t)?"quit":Q_(n)&&AY(t,HQ(n,e)))}function i0(e,t,n=dt){return e?nt(e)?n(O(e,t)):t(e,0):void 0}function o0(e){return nt(e)?xe(e):e}function a0(e,t,n){return"export="===e.escapedName||"default"===e.escapedName?s0(e)||c0(function(e){var t;return gn.checkDefined(e.parent,`Symbol parent was undefined. Flags: ${gn.formatSymbolFlags(e.flags)}. Declarations: ${null==(t=e.declarations)?void 0:t.map(e=>{const t=gn.formatSyntaxKind(e.kind),n=Mm(e),{expression:r}=e;return(n?"[JS]":"")+t+(r?` (expression: ${gn.formatSyntaxKind(r.kind)})`:"")}).join(", ")}.`)}(e),t,!!n):e.name}function s0(e){return y(e.declarations,t=>{var n,r,i;if(JF(t))return null==(n=at(LA(t.expression),fD))?void 0:n.text;if(UF(t)&&2097152===t.symbol.flags)return null==(r=at(t.propertyName,fD))?void 0:r.text;const o=null==(i=at(Ac(t),fD))?void 0:i.text;return o||(e.parent&&!id(e.parent)?e.parent.getName():void 0)})}function c0(e,t,n){return l0(Qk(jy(e.name)),t,n)}function l0(e,t,n){const r=jo(Ut(Qk(e),"/index"));let i="",o=!0;const a=r.charCodeAt(0);bs(a,t)?(i+=String.fromCharCode(a),n&&(i=i.toUpperCase())):o=!1;for(let e=1;ee.length)return!1;for(let i=0;i(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.Namespace=2]="Namespace",e[e.CommonJS=3]="CommonJS",e))(k0||{}),T0=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e[e.UMD=3]="UMD",e[e.Module=4]="Module",e))(T0||{});function C0(e){let t=1;const n=Qe(),r=new Map,i=new Map;let o;const a={isUsableByFile:e=>e===o,isEmpty:()=>!n.size,clear:()=>{n.clear(),r.clear(),o=void 0},add:(e,s,c,l,_,u,d,p)=>{let f;if(e!==o&&(a.clear(),o=e),_){const t=QT(_.fileName);if(t){const{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:r,packageRootIndex:o}=t;if(f=KR($R(_.fileName.substring(r+1,o))),en(e,_.path.substring(0,n))){const e=i.get(f),t=_.fileName.substring(0,r+1);if(e){n>e.indexOf(cR)&&i.set(f,t)}else i.set(f,t)}}}const m=1===u&&Nb(s)||s,g=0===u||id(m)?Sc(c):function(e,t,n){let r;return j0(e,t,n,(e,t)=>(r=t?[e,t]:e,!0)),gn.checkDefined(r)}(m,p,void 0),h="string"==typeof g?g:g[0],y="string"==typeof g?void 0:g[1],v=jy(l.name),b=t++,x=px(s,p),S=33554432&s.flags?void 0:s,k=33554432&l.flags?void 0:l;S&&k||r.set(b,[s,l]),n.add(function(e,t,n,r){const i=n||"";return`${e.length} ${fJ(px(t,r))} ${e} ${i}`}(h,s,As(v)?void 0:v,p),{id:b,symbolTableKey:c,symbolName:h,capitalizedSymbolName:y,moduleName:v,moduleFile:_,moduleFileName:null==_?void 0:_.fileName,packageName:f,exportKind:u,targetFlags:x.flags,isFromPackageJson:d,symbol:S,moduleSymbol:k})},get:(e,t)=>{if(e!==o)return;const r=n.get(t);return null==r?void 0:r.map(s)},search:(t,r,a,c)=>{if(t===o)return _d(n,(t,n)=>{const{symbolName:o,ambientModuleName:l}=function(e){const t=e.indexOf(" "),n=e.indexOf(" ",t+1),r=parseInt(e.substring(0,t),10),i=e.substring(n+1),o=i.substring(0,r),a=i.substring(r+1),s=""===a?void 0:a;return{symbolName:o,ambientModuleName:s}}(n),_=r&&t[0].capitalizedSymbolName||o;if(a(_,t[0].targetFlags)){const r=t.map(s).filter((n,r)=>function(t,n){if(!n||!t.moduleFileName)return!0;const r=e.getGlobalTypingsCacheLocation();if(r&&en(t.moduleFileName,r))return!0;const o=i.get(n);return!o||en(t.moduleFileName,o)}(n,t[r].packageName));if(r.length){const e=c(r,_,!!l,n);if(void 0!==e)return e}}})},releaseSymbols:()=>{r.clear()},onFileChanged:(e,t,n)=>(!c(e)||!c(t))&&(o&&o!==t.path||n&&QZ(e)!==QZ(t)||!ae(e.moduleAugmentations,t.moduleAugmentations)||!function(e,t){if(!ae(e.ambientModuleNames,t.ambientModuleNames))return!1;let n=-1,r=-1;for(const i of t.ambientModuleNames){const o=e=>hp(e)&&e.name.text===i;if(n=w(e.statements,o,n+1),r=w(t.statements,o,r+1),e.statements[n]!==t.statements[r])return!1}return!0}(e,t)?(a.clear(),!0):(o=t.path,!1))};return gn.isDebugging&&Object.defineProperty(a,"__cache",{value:n}),a;function s(t){if(t.symbol&&t.moduleSymbol)return t;const{id:n,exportKind:i,targetFlags:o,isFromPackageJson:a,moduleFileName:s}=t,[c,l]=r.get(n)||p;if(c&&l)return{symbol:c,moduleSymbol:l,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a};const _=(a?e.getPackageJsonAutoImportProvider():e.getCurrentProgram()).getTypeChecker(),u=t.moduleSymbol||l||gn.checkDefined(t.moduleFile?_.getMergedSymbol(t.moduleFile.symbol):_.tryFindAmbientModule(t.moduleName)),d=t.symbol||c||gn.checkDefined(2===i?_.resolveExternalModuleSymbol(u):_.tryGetMemberInModuleExportsAndProperties(Sc(t.symbolTableKey),u),`Could not find symbol '${t.symbolName}' by key '${t.symbolTableKey}' in module ${u.name}`);return r.set(n,[d,u]),{symbol:d,moduleSymbol:u,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a}}function c(e){return!(e.commonJsModuleIndicator||e.externalModuleIndicator||e.moduleAugmentations||e.ambientModuleNames)}}function w0(e,t,n,r,i,o,a,s){var c;if(!n){let n;const i=jy(r.name);return LC.has(i)&&void 0!==(n=p0(t,e))?n===en(i,"node:"):!o||o.allowsImportingAmbientModule(r,a)||N0(t,i)}if(gn.assertIsDefined(n),t===n)return!1;const l=null==s?void 0:s.get(t.path,n.path,i,{});if(void 0!==(null==l?void 0:l.isBlockedByPackageJsonDependencies))return!l.isBlockedByPackageJsonDependencies||!!l.packageName&&N0(t,l.packageName);const _=Vy(a),u=null==(c=a.getGlobalTypingsCacheLocation)?void 0:c.call(a),d=!!gB.forEachFileNameOfModule(t.fileName,n.fileName,a,!1,r=>{const i=e.getSourceFile(r);return(i===n||!i)&&function(e,t,n,r,i){const o=RR(i,t,e=>"node_modules"===jo(e)?e:void 0),a=o&&Lo(n(o));return void 0===a||en(n(e),a)||!!r&&en(n(r),a)}(t.fileName,r,_,u,a)});if(o){const e=d?o.getSourceFileInfo(n,a):void 0;return null==s||s.setBlockedByPackageJsonDependencies(t.path,n.path,i,{},null==e?void 0:e.packageName,!(null==e?void 0:e.importable)),!!(null==e?void 0:e.importable)||d&&!!(null==e?void 0:e.packageName)&&N0(t,e.packageName)}return d}function N0(e,t){return e.imports&&e.imports.some(e=>e.text===t||e.text.startsWith(t+"/"))}function D0(e,t,n,r,i){var o,a;const s=Uy(t),c=n.autoImportFileExcludePatterns&&E0(n,s);F0(e.getTypeChecker(),e.getSourceFiles(),c,t,(t,n)=>i(t,n,e,!1));const l=r&&(null==(o=t.getPackageJsonAutoImportProvider)?void 0:o.call(t));if(l){const n=Hn(),r=e.getTypeChecker();F0(l.getTypeChecker(),l.getSourceFiles(),c,t,(t,n)=>{(n&&!e.getSourceFile(n.fileName)||!n&&!r.resolveName(t.name,void 0,1536,!1))&&i(t,n,l,!0)}),null==(a=t.log)||a.call(t,"forEachExternalModuleToImportFrom autoImportProvider: "+(Hn()-n))}}function E0(e,t){return U(e.autoImportFileExcludePatterns,e=>{const n=xk(e,"","exclude");return n?Tk(n,t):void 0})}function F0(e,t,n,r,i){var o;const a=n&&P0(n,r);for(const t of e.getAmbientModules())t.name.includes("*")||n&&(null==(o=t.declarations)?void 0:o.every(e=>a(e.getSourceFile())))||i(t,void 0);for(const n of t)sf(n)&&!(null==a?void 0:a(n))&&i(e.getMergedSymbol(n.symbol),n)}function P0(e,t){var n;const r=null==(n=t.getSymlinkCache)?void 0:n.call(t).getSymlinkedDirectoriesByRealpath();return({fileName:n,path:i})=>{if(e.some(e=>e.test(n)))return!0;if((null==r?void 0:r.size)&&lR(n)){let o=Lo(n);return RR(t,Lo(i),t=>{const i=r.get(Yo(t));if(i)return i.some(t=>e.some(e=>e.test(n.replace(o,t))));o=Lo(o)})??!1}return!1}}function A0(e,t){return t.autoImportFileExcludePatterns?P0(E0(t,Uy(e)),e):()=>!1}function I0(e,t,n,r,i){var o,a,s,c,l;const _=Hn();null==(o=t.getPackageJsonAutoImportProvider)||o.call(t);const u=(null==(a=t.getCachedExportInfoMap)?void 0:a.call(t))||C0({getCurrentProgram:()=>n,getPackageJsonAutoImportProvider:()=>{var e;return null==(e=t.getPackageJsonAutoImportProvider)?void 0:e.call(t)},getGlobalTypingsCacheLocation:()=>{var e;return null==(e=t.getGlobalTypingsCacheLocation)?void 0:e.call(t)}});if(u.isUsableByFile(e.path))return null==(s=t.log)||s.call(t,"getExportInfoMap: cache hit"),u;null==(c=t.log)||c.call(t,"getExportInfoMap: cache miss or empty; calculating new results");let d=0;try{D0(n,t,r,!0,(t,n,r,o)=>{++d%100==0&&(null==i||i.throwIfCancellationRequested());const a=new Set,s=r.getTypeChecker(),c=O0(t,s);c&&L0(c.symbol,s)&&u.add(e.path,c.symbol,1===c.exportKind?"default":"export=",t,n,c.exportKind,o,s),s.forEachExportAndPropertyOfModule(t,(r,i)=>{r!==(null==c?void 0:c.symbol)&&L0(r,s)&&Dx(a,i)&&u.add(e.path,r,i,t,n,0,o,s)})})}catch(e){throw u.clear(),e}return null==(l=t.log)||l.call(t,`getExportInfoMap: done in ${Hn()-_} ms`),u}function O0(e,t){const n=t.resolveExternalModuleSymbol(e);if(n!==e){const e=t.tryGetMemberInModuleExports("default",n);return e?{symbol:e,exportKind:1}:{symbol:n,exportKind:2}}const r=t.tryGetMemberInModuleExports("default",e);if(r)return{symbol:r,exportKind:1}}function L0(e,t){return!(t.isUndefinedSymbol(e)||t.isUnknownSymbol(e)||Yh(e)||Zh(e))}function j0(e,t,n,r){let i,o=e;const a=new Set;for(;o;){const e=s0(o);if(e){const t=r(e);if(t)return t}if("default"!==o.escapedName&&"export="!==o.escapedName){const e=r(o.name);if(e)return e}if(i=le(i,o),!Dx(a,o))break;o=2097152&o.flags?t.getImmediateAliasedSymbol(o):void 0}for(const e of i??p)if(e.parent&&id(e.parent)){const t=r(c0(e.parent,n,!1),c0(e.parent,n,!0));if(t)return t}}function M0(){const e=ks(99,!1);function t(t,n,r){let i=0,o=0;const a=[],{prefix:s,pushTemplate:c}=function(e){switch(e){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return gn.assertNever(e)}}(n);t=s+t;const l=s.length;c&&a.push(16),e.setText(t);let _=0;const u=[];let d=0;do{i=e.scan(),Bh(i)||(p(),o=i);const n=e.getTokenEnd();if(z0(e.getTokenStart(),n,l,U0(i),u),n>=t.length){const t=J0(e,i,ke(a));void 0!==t&&(_=t)}}while(1!==i);function p(){switch(i){case 44:case 69:B0[o]||14!==e.reScanSlashToken()||(i=14);break;case 30:80===o&&d++;break;case 32:d>0&&d--;break;case 133:case 154:case 150:case 136:case 155:d>0&&!r&&(i=80);break;case 16:a.push(i);break;case 19:a.length>0&&a.push(i);break;case 20:if(a.length>0){const t=ke(a);16===t?(i=e.reScanTemplateToken(!1),18===i?a.pop():gn.assertEqual(i,17,"Should have been a template middle.")):(gn.assertEqual(t,19,"Should have been an open brace"),a.pop())}break;default:if(!Ah(i))break;(25===o||Ah(o)&&Ah(i)&&!function(e,t){if(!zQ(e))return!0;switch(t){case 139:case 153:case 137:case 126:case 129:return!0;default:return!1}}(o,i))&&(i=80)}}return{endOfLineState:_,spans:u}}return{getClassificationsForLine:function(e,n,r){return function(e,t){const n=[],r=e.spans;let i=0;for(let e=0;e=0){const e=t-i;e>0&&n.push({length:e,classification:4})}n.push({length:o,classification:q0(a)}),i=t+o}const o=t.length-i;o>0&&n.push({length:o,classification:4});return{entries:n,finalLexState:e.endOfLineState}}(t(e,n,r),e)},getEncodedLexicalClassifications:t}}var R0,B0=Ue([80,11,9,10,14,110,46,47,22,24,20,112,97],e=>e,()=>!0);function J0(e,t,n){switch(t){case 11:{if(!e.isUnterminated())return;const t=e.getTokenText(),n=t.length-1;let r=0;for(;92===t.charCodeAt(n-r);)r++;if(!(1&r))return;return 34===t.charCodeAt(0)?3:2}case 3:return e.isUnterminated()?1:void 0;default:if(ql(t)){if(!e.isUnterminated())return;switch(t){case 18:return 5;case 15:return 4;default:return gn.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+t)}}return 16===n?6:void 0}}function z0(e,t,n,r,i){if(8===r)return;0===e&&n>0&&(e+=n);const o=t-e;o>0&&i.push(e-n,o,r)}function q0(e){switch(e){case 1:return 3;case 3:return 1;case 4:return 6;case 25:return 7;case 5:return 2;case 6:return 8;case 8:return 4;case 10:return 0;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return 5;default:return}}function U0(e){if(Ah(e))return 3;if(function(e){switch(e){case 42:case 44:case 45:case 40:case 41:case 48:case 49:case 50:case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:case 35:case 36:case 37:case 38:case 51:case 53:case 52:case 56:case 57:case 75:case 74:case 79:case 71:case 72:case 73:case 65:case 66:case 67:case 69:case 70:case 64:case 28:case 61:case 76:case 77:case 78:return!0;default:return!1}}(e)||function(e){switch(e){case 40:case 41:case 55:case 54:case 46:case 47:return!0;default:return!1}}(e))return 5;if(e>=19&&e<=79)return 10;switch(e){case 9:return 4;case 10:return 25;case 11:return 6;case 14:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;default:return ql(e)?6:2}}function V0(e,t,n,r,i){return G0($0(e,t,n,r,i))}function W0(e,t){switch(t){case 268:case 264:case 265:case 263:case 232:case 219:case 220:e.throwIfCancellationRequested()}}function $0(e,t,n,r,i){const o=[];return n.forEachChild(function a(s){if(s&&$s(i,s.pos,s.getFullWidth())){if(W0(t,s.kind),fD(s)&&!Od(s)&&r.has(s.escapedText)){const t=e.getSymbolAtLocation(s),r=t&&K0(t,lX(s),e);r&&function(e,t,n){const r=t-e;gn.assert(r>0,`Classification had non-positive length of ${r}`),o.push(e),o.push(r),o.push(n)}(s.getStart(n),s.getEnd(),r)}s.forEachChild(a)}}),{spans:o,endOfLineState:0}}function K0(e,t,n){const r=e.getFlags();return 2885600&r?32&r?11:384&r?12:524288&r?16:1536&r?4&t||1&t&&function(e){return X(e.declarations,e=>TF(e)&&1===rB(e))}(e)?14:void 0:2097152&r?K0(n.getAliasedSymbol(e),t,n):2&t?64&r?13:262144&r?15:void 0:void 0:void 0}function H0(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function G0(e){gn.assert(e.spans.length%3==0);const t=e.spans,n=[];for(let e=0;e])*)(\/>)?)?/m,i=/(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/g,o=t.text.substr(e,n),a=r.exec(o);if(!a)return!1;if(!a[3]||!(a[3]in Ji))return!1;let s=e;_(s,a[1].length),s+=a[1].length,c(s,a[2].length,10),s+=a[2].length,c(s,a[3].length,21),s+=a[3].length;const l=a[4];let u=s;for(;;){const e=i.exec(l);if(!e)break;const t=s+e.index+e[1].length;t>u&&(_(u,t-u),u=t),c(u,e[2].length,22),u+=e[2].length,e[3].length&&(_(u,e[3].length),u+=e[3].length),c(u,e[4].length,5),u+=e[4].length,e[5].length&&(_(u,e[5].length),u+=e[5].length),c(u,e[6].length,24),u+=e[6].length}s+=a[4].length,s>u&&_(u,s-u);a[5]&&(c(s,a[5].length,10),s+=a[5].length);const d=e+n;s=0),i>0){const t=n||m(e.kind,e);t&&c(r,i,t)}return!0}function m(e,t){if(Ah(e))return 3;if((30===e||32===e)&&t&&LQ(t.parent))return 10;if(Ih(e)){if(t){const n=t.parent;if(64===e&&(261===n.kind||173===n.kind||170===n.kind||292===n.kind))return 5;if(227===n.kind||225===n.kind||226===n.kind||228===n.kind)return 5}return 10}if(9===e)return 4;if(10===e)return 25;if(11===e)return t&&292===t.parent.kind?24:6;if(14===e)return 6;if(ql(e))return 6;if(12===e)return 23;if(80===e){if(t){switch(t.parent.kind){case 264:return t.parent.name===t?11:void 0;case 169:return t.parent.name===t?15:void 0;case 265:return t.parent.name===t?13:void 0;case 267:return t.parent.name===t?12:void 0;case 268:return t.parent.name===t?14:void 0;case 170:return t.parent.name===t?gv(t)?3:17:void 0}if(El(t.parent))return 3}return 2}}function g(n){if(n&&Ks(r,i,n.pos,n.getFullWidth())){W0(e,n.kind);for(const e of n.getChildren(t))f(e)||g(e)}}}function Y0(e){return!!e.sourceFile}function Z0(e,t,n){return e1(e,t,n)}function e1(e,t="",n,r){const i=new Map,o=Xt(!!e);function a(e){return"function"==typeof e.getCompilationSettings?e.getCompilationSettings():e}function s(e,t,n,r,i,o,a,s){return _(e,t,n,r,i,o,!0,a,s)}function c(e,t,n,r,i,o,s,c){return _(e,t,a(n),r,i,o,!1,s,c)}function l(e,t){const n=Y0(e)?e:e.get(gn.checkDefined(t,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return gn.assert(void 0===t||!n||n.sourceFile.scriptKind===t,`Script kind should match provided ScriptKind:${t} and sourceFile.scriptKind: ${null==n?void 0:n.sourceFile.scriptKind}, !entry: ${!n}`),n}function _(e,t,o,s,c,_,u,d,p){var f,m,g,h;d=Dk(e,d);const y=a(o),v=o===y?void 0:o,b=6===d?100:wS(y),x="object"==typeof p?p:{languageVersion:b,impliedNodeFormat:v&&$V(t,null==(h=null==(g=null==(m=null==(f=v.getCompilerHost)?void 0:f.call(v))?void 0:m.getModuleResolutionCache)?void 0:g.call(m))?void 0:h.getPackageJsonInfoCache(),v,y),setExternalModuleIndicator:xS(y),jsDocParsingMode:n};x.languageVersion=b,gn.assertEqual(n,x.jsDocParsingMode);const S=i.size,k=n1(s,x.impliedNodeFormat),T=W(i,k,()=>new Map);if(Yn){i.size>S&&Yn.instant(Yn.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:y.configFilePath,key:k});const e=!SO(t)&&_d(i,(e,n)=>n!==k&&e.has(t)&&n);e&&Yn.instant(Yn.Phase.Session,"documentRegistryBucketOverlap",{path:t,key1:e,key2:k})}const C=T.get(t);let w=C&&l(C,d);if(!w&&r){const e=r.getDocument(k,t);e&&e.scriptKind===d&&e.text===aY(c)&&(gn.assert(u),w={sourceFile:e,languageServiceRefCount:0},N())}if(w)w.sourceFile.version!==_&&(w.sourceFile=u7(w.sourceFile,c,_,c.getChangeRange(w.sourceFile.scriptSnapshot)),r&&r.setDocument(k,t,w.sourceFile)),u&&w.languageServiceRefCount++;else{const n=_7(e,c,x,_,!1,d);r&&r.setDocument(k,t,n),w={sourceFile:n,languageServiceRefCount:1},N()}return gn.assert(0!==w.languageServiceRefCount),w.sourceFile;function N(){if(C)if(Y0(C)){const e=new Map;e.set(C.sourceFile.scriptKind,C),e.set(d,w),T.set(t,e)}else C.set(d,w);else T.set(t,w)}}function u(e,t,n,r){const o=gn.checkDefined(i.get(n1(t,r))),a=o.get(e),s=l(a,n);s.languageServiceRefCount--,gn.assert(s.languageServiceRefCount>=0),0===s.languageServiceRefCount&&(Y0(a)?o.delete(e):(a.delete(n),1===a.size&&o.set(e,v(a.values(),dt))))}return{acquireDocument:function(e,n,r,i,c,l){return s(e,Xo(e,t,o),n,t1(a(n)),r,i,c,l)},acquireDocumentWithKey:s,updateDocument:function(e,n,r,i,s,l){return c(e,Xo(e,t,o),n,t1(a(n)),r,i,s,l)},updateDocumentWithKey:c,releaseDocument:function(e,n,r,i){return u(Xo(e,t,o),t1(n),r,i)},releaseDocumentWithKey:u,getKeyForCompilationSettings:t1,getDocumentRegistryBucketKeyWithMode:n1,reportStats:function(){const e=Be(i.keys()).filter(e=>e&&"_"===e.charAt(0)).map(e=>{const t=i.get(e),n=[];return t.forEach((e,t)=>{Y0(e)?n.push({name:t,scriptKind:e.sourceFile.scriptKind,refCount:e.languageServiceRefCount}):e.forEach((e,r)=>n.push({name:t,scriptKind:r,refCount:e.languageServiceRefCount}))}),n.sort((e,t)=>t.refCount-e.refCount),{bucket:e,sourceFiles:n}});return JSON.stringify(e,void 0,2)},getBuckets:()=>i}}function t1(e){return jM(e,GO)}function n1(e,t){return t?`${e}|${t}`:e}function r1(e,t,n,r,i,o,a){const s=Uy(r),c=Xt(s),l=i1(t,n,c,a),_=i1(n,t,c,a);return sde.ChangeTracker.with({host:r,formatContext:i,preferences:o},i=>{!function(e,t,n,r,i,o,a){const{configFile:s}=e.getCompilerOptions();if(!s)return;const c=Lo(s.fileName),l=Yf(s);if(!l)return;function _(e){const t=yE(e.initializer)?e.initializer.elements:[e.initializer];let n=!1;for(const e of t)n=u(e)||n;return n}function u(e){if(!QN(e))return!1;const r=o1(c,e.text),i=n(r);return void 0!==i&&(t.replaceRangeWithText(s,l1(e,s),d(i)),!0)}function d(e){return _a(c,e,!a)}_1(l,(e,n)=>{switch(n){case"files":case"include":case"exclude":{if(_(e)||"include"!==n||!yE(e.initializer))return;const l=U(e.initializer.elements,e=>QN(e)?e.text:void 0);if(0===l.length)return;const u=kk(c,[],l,a,o);return void(Tk(gn.checkDefined(u.includeFilePattern),a).test(r)&&!Tk(gn.checkDefined(u.includeFilePattern),a).test(i)&&t.insertNodeAfter(s,Te(e.initializer.elements),kw.createStringLiteral(d(i))))}case"compilerOptions":return void _1(e.initializer,(e,t)=>{const n=xL(t);gn.assert("listOrElement"!==(null==n?void 0:n.type)),n&&(n.isFilePath||"list"===n.type&&n.element.isFilePath)?_(e):"paths"===t&&_1(e.initializer,e=>{if(yE(e.initializer))for(const t of e.initializer.elements)u(t)})})}})}(e,i,l,t,n,r.getCurrentDirectory(),s),function(e,t,n,r,i,o){const a=e.getSourceFiles();for(const s of a){const c=n(s.fileName),l=c??s.fileName,_=Lo(l),u=r(s.fileName),d=u||s.fileName,p=Lo(d),f=void 0!==c||void 0!==u;c1(s,t,e=>{if(!wo(e))return;const t=o1(p,e),r=n(t);return void 0===r?void 0:Zo(_a(_,r,o))},t=>{const r=e.getTypeChecker().getSymbolAtLocation(t);if((null==r?void 0:r.declarations)&&r.declarations.some(e=>mp(e)))return;const o=void 0!==u?s1(t,XM(t.text,d,e.getCompilerOptions(),i),n,a):a1(r,t,s,e,i,n);return void 0!==o&&(o.updated||f&&wo(t.text))?gB.updateModuleSpecifier(e.getCompilerOptions(),s,l,o.newFileName,pY(e,i),t.text):void 0})}}(e,i,l,_,r,c)})}function i1(e,t,n,r){const i=n(e);return e=>{const o=r&&r.tryGetSourcePosition({fileName:e,pos:0}),a=function(e){if(n(e)===i)return t;const r=sk(e,i,n);return void 0===r?void 0:t+"/"+r}(o?o.fileName:e);return o?void 0===a?void 0:function(e,t,n,r){const i=da(e,t,r);return o1(Lo(n),i)}(o.fileName,a,e,n):a}}function o1(e,t){return Zo(function(e,t){return Ko(Uo(e,t))}(e,t))}function a1(e,t,n,r,i,o){if(e){const t=T(e.declarations,mP).fileName,n=o(t);return void 0===n?{newFileName:t,updated:!1}:{newFileName:n,updated:!0}}{const e=r.getModeForUsageLocation(n,t);return s1(t,i.resolveModuleNameLiterals||!i.resolveModuleNames?r.getResolvedModuleFromModuleSpecifier(t,n):i.getResolvedModuleWithFailedLookupLocationsFromCache&&i.getResolvedModuleWithFailedLookupLocationsFromCache(t.text,n.fileName,e),o,r.getSourceFiles())}}function s1(e,t,n,r){if(!t)return;if(t.resolvedModule){const e=a(t.resolvedModule.resolvedFileName);if(e)return e}const i=g(t.failedLookupLocations,function(e){const t=n(e);return t&&T(r,e=>e.fileName===t)?o(e):void 0})||wo(e.text)&&g(t.failedLookupLocations,o);return i||t.resolvedModule&&{newFileName:t.resolvedModule.resolvedFileName,updated:!1};function o(e){return qt(e,"/package.json")?void 0:a(e)}function a(e){const t=n(e);return t&&{newFileName:t,updated:!0}}}function c1(e,t,n,r){for(const r of e.referencedFiles||p){const i=n(r.fileName);void 0!==i&&i!==e.text.slice(r.pos,r.end)&&t.replaceRangeWithText(e,r,i)}for(const n of e.imports){const i=r(n);void 0!==i&&i!==n.text&&t.replaceRangeWithText(e,l1(n,e),i)}}function l1(e,t){return Jb(e.getStart(t)+1,e.end-1)}function _1(e,t){if(vE(e))for(const n of e.properties)uP(n)&&QN(n.name)&&t(n,n.name.text)}(e=>{function t(e,t){return{fileName:t.fileName,textSpan:HQ(e,t),kind:"none"}}function n(e){return fF(e)?[e]:mF(e)?Y(e.catchClause?n(e.catchClause):e.tryBlock&&n(e.tryBlock),e.finallyBlock&&n(e.finallyBlock)):__(e)?void 0:i(e,n)}function r(e){return Al(e)?[e]:__(e)?void 0:i(e,r)}function i(e,t){const n=[];return e.forEachChild(e=>{const r=t(e);void 0!==r&&n.push(...rt(r))}),n}function o(e,t){const n=a(t);return!!n&&n===e}function a(e){return yc(e,t=>{switch(t.kind){case 256:if(252===e.kind)return!1;case 249:case 250:case 251:case 248:case 247:return!e.label||function(e,t){return!!yc(e.parent,e=>pF(e)?e.label.escapedText===t:"quit")}(t,e.label.escapedText);default:return __(t)&&"quit"}})}function s(e,t,...n){return!(!t||!D(n,t.kind))&&(e.push(t),!0)}function c(e){const t=[];if(s(t,e.getFirstToken(),99,117,92)&&247===e.kind){const n=e.getChildren();for(let e=n.length-1;e>=0&&!s(t,n[e],117);e--);}return g(r(e.statement),n=>{o(e,n)&&s(t,n.getFirstToken(),83,88)}),t}function l(e){const t=a(e);if(t)switch(t.kind){case 249:case 250:case 251:case 247:case 248:return c(t);case 256:return _(t)}}function _(e){const t=[];return s(t,e.getFirstToken(),109),g(e.caseBlock.clauses,n=>{s(t,n.getFirstToken(),84,90),g(r(n),n=>{o(e,n)&&s(t,n.getFirstToken(),83)})}),t}function u(e,t){const n=[];if(s(n,e.getFirstToken(),113),e.catchClause&&s(n,e.catchClause.getFirstToken(),85),e.finallyBlock){s(n,YX(e,98,t),98)}return n}function d(e,t){const r=function(e){let t=e;for(;t.parent;){const e=t.parent;if($f(e)||308===e.kind)return e;if(mF(e)&&e.tryBlock===t&&e.catchClause)return t;t=e}}(e);if(!r)return;const i=[];return g(n(r),e=>{i.push(YX(e,111,t))}),$f(r)&&Lf(r,e=>{i.push(YX(e,107,t))}),i}function p(e,t){const r=tm(e);if(!r)return;const i=[];return Lf(st(r.body,YE),e=>{i.push(YX(e,107,t))}),g(n(r.body),e=>{i.push(YX(e,111,t))}),i}function f(e){const t=tm(e);if(!t)return;const n=[];return t.modifiers&&t.modifiers.forEach(e=>{s(n,e,134)}),sO(t,e=>{m(e,e=>{AE(e)&&s(n,e.getFirstToken(),135)})}),n}function m(e,t){t(e),__(e)||y_(e)||xF(e)||TF(e)||SF(e)||N_(e)||sO(e,e=>m(e,t))}e.getDocumentHighlights=function(e,n,r,i,o){const a=_Q(r,i);if(a.parent&&(QF(a.parent)&&a.parent.tagName===a||YF(a.parent))){const{openingElement:e,closingElement:n}=a.parent.parent,i=[e,n].map(({tagName:e})=>t(e,r));return[{fileName:r.fileName,highlightSpans:i}]}return function(e,t,n,r,i){const o=new Set(i.map(e=>e.fileName)),a=Bce.getReferenceEntriesForNode(e,t,n,i,r,void 0,o);if(!a)return;const s=Ve(a.map(Bce.toHighlightSpan),e=>e.fileName,e=>e.span),c=Xt(n.useCaseSensitiveFileNames());return Be(V(s.entries(),([e,t])=>{if(!o.has(e)){if(!n.redirectTargetsMap.has(Xo(e,n.getCurrentDirectory(),c)))return;const t=n.getSourceFile(e);e=T(i,e=>!!e.redirectInfo&&e.redirectInfo.redirectTarget===t).fileName,gn.assert(o.has(e))}return{fileName:e,highlightSpans:t}}))}(i,a,e,n,o)||function(e,n){const r=function(e,n){switch(e.kind){case 101:case 93:return nF(e.parent)?function(e,n){const r=function(e,t){const n=[];for(;nF(e.parent)&&e.parent.elseStatement===e;)e=e.parent;for(;;){const r=e.getChildren(t);s(n,r[0],101);for(let e=r.length-1;e>=0&&!s(n,r[e],93);e--);if(!e.elseStatement||!nF(e.elseStatement))break;e=e.elseStatement}return n}(e,n),i=[];for(let e=0;e=t.end;e--)if(!Xa(n.text.charCodeAt(e))){a=!1;break}if(a){i.push({fileName:n.fileName,textSpan:Zs(t.getStart(),o.end),kind:"reference"}),e++;continue}}i.push(t(r[e],n))}return i}(e.parent,n):void 0;case 107:return o(e.parent,_F,p);case 111:return o(e.parent,fF,d);case 113:case 85:case 98:return o(85===e.kind?e.parent.parent:e.parent,mF,u);case 109:return o(e.parent,dF,_);case 84:case 90:return cP(e.parent)||sP(e.parent)?o(e.parent.parent.parent,dF,_):void 0;case 83:case 88:return o(e.parent,Al,l);case 99:case 117:case 92:return o(e.parent,e=>Z_(e,!0),c);case 137:return i(BD,[137]);case 139:case 153:return i(v_,[139,153]);case 135:return o(e.parent,AE,f);case 134:return a(f(e));case 127:return a(function(e){const t=tm(e);if(!t)return;const n=[];return sO(t,e=>{m(e,e=>{RE(e)&&s(n,e.getFirstToken(),127)})}),n}(e));case 103:case 147:return;default:return r_(e.kind)&&(hu(e.parent)||ZE(e.parent))?a((r=e.kind,U(function(e,t){const n=e.parent;switch(n.kind){case 269:case 308:case 242:case 297:case 298:return 64&t&&bF(e)?[...e.members,e]:n.statements;case 177:case 175:case 263:return[...n.parameters,...y_(n.parent)?n.parent.members:[]];case 264:case 232:case 265:case 188:const r=n.members;if(15&t){const e=T(n.members,BD);if(e)return[...r,...e.parameters]}else if(64&t)return[...r,n];return r;default:return}}(e.parent,tb(r)),e=>EY(e,r)))):void 0}var r;function i(t,r){return o(e.parent,t,e=>{var i;return U(null==(i=at(e,pu))?void 0:i.symbol.declarations,e=>t(e)?T(e.getChildren(n),e=>D(r,e.kind)):void 0)})}function o(e,t,r){return t(e)?a(r(e,n)):void 0}function a(e){return e&&e.map(e=>t(e,n))}}(e,n);return r&&[{fileName:n.fileName,highlightSpans:r}]}(a,r)}})(R0||(R0={}));var u1=(e=>(e[e.exact=0]="exact",e[e.prefix=1]="prefix",e[e.substring=2]="substring",e[e.camelCase=3]="camelCase",e))(u1||{});function d1(e,t){return{kind:e,isCaseSensitive:t}}function p1(e){const t=new Map,n=e.trim().split(".").map(e=>{return{totalTextChunk:N1(t=e.trim()),subWordTextChunks:w1(t)};var t});return 1===n.length&&""===n[0].totalTextChunk.text?{getMatchForLastSegmentOfPattern:()=>d1(2,!0),getFullMatch:()=>d1(2,!0),patternContainsDots:!1}:n.some(e=>!e.subWordTextChunks.length)?void 0:{getFullMatch:(e,r)=>function(e,t,n,r){const i=g1(t,Te(n),r);if(!i)return;if(n.length-1>e.length)return;let o;for(let t=n.length-2,i=e.length-1;t>=0;t-=1,i-=1)o=h1(o,g1(e[i],n[t],r));return o}(e,r,n,t),getMatchForLastSegmentOfPattern:e=>g1(e,Te(n),t),patternContainsDots:n.length>1}}function f1(e,t){let n=t.get(e);return n||t.set(e,n=E1(e)),n}function m1(e,t,n){const r=function(e,t){const n=e.length-t.length;for(let r=0;r<=n;r++)if(j1(t,(t,n)=>k1(e.charCodeAt(n+r))===t))return r;return-1}(e,t.textLowerCase);if(0===r)return d1(t.text.length===e.length?0:1,en(e,t.text));if(t.isLowerCase){if(-1===r)return;const i=f1(e,n);for(const n of i)if(v1(e,n,t.text,!0))return d1(2,v1(e,n,t.text,!1));if(t.text.length0)return d1(2,!0);if(t.characterSpans.length>0){const r=f1(e,n),i=!!b1(e,r,t,!1)||!b1(e,r,t,!0)&&void 0;if(void 0!==i)return d1(3,i)}}}function g1(e,t,n){if(j1(t.totalTextChunk.text,e=>32!==e&&42!==e)){const r=m1(e,t.totalTextChunk,n);if(r)return r}const r=t.subWordTextChunks;let i;for(const t of r)i=h1(i,m1(e,t,n));return i}function h1(e,t){return Nt([e,t],y1)}function y1(e,t){return void 0===e?1:void 0===t?-1:Tt(e.kind,t.kind)||Bt(!e.isCaseSensitive,!t.isCaseSensitive)}function v1(e,t,n,r,i={start:0,length:n.length}){return i.length<=t.length&&L1(0,i.length,o=>function(e,t,n){return n?k1(e)===k1(t):e===t}(n.charCodeAt(i.start+o),e.charCodeAt(t.start+o),r))}function b1(e,t,n,r){const i=n.characterSpans;let o,a,s=0,c=0;for(;;){if(c===i.length)return!0;if(s===t.length)return!1;let l=t[s],_=!1;for(;c=65&&e<=90)return!0;if(e<127||!Ia(e,99))return!1;const t=String.fromCharCode(e);return t===t.toUpperCase()}function S1(e){if(e>=97&&e<=122)return!0;if(e<127||!Ia(e,99))return!1;const t=String.fromCharCode(e);return t===t.toLowerCase()}function k1(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function T1(e){return e>=48&&e<=57}function C1(e){return x1(e)||S1(e)||T1(e)||95===e||36===e}function w1(e){const t=[];let n=0,r=0;for(let i=0;i0&&(t.push(N1(e.substr(n,r))),r=0)}return r>0&&t.push(N1(e.substr(n,r))),t}function N1(e){const t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:D1(e)}}function D1(e){return F1(e,!1)}function E1(e){return F1(e,!0)}function F1(e,t){const n=[];let r=0;for(let i=1;iP1(e)&&95!==e,t,n)}function I1(e,t,n){return t!==n&&t+1t(e.charCodeAt(n),n))}function M1(e,t=!0,n=!1){const r={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},i=[];let o,a,s,c=0,l=!1;function _(){return a=s,s=aX.scan(),19===s?c++:20===s&&c--,s}function u(){const e=aX.getTokenValue(),t=aX.getTokenStart();return{fileName:e,pos:t,end:t+e.length}}function d(){i.push(u()),p()}function p(){0===c&&(l=!0)}function f(){let e=aX.getToken();return 138===e&&(e=_(),144===e&&(e=_(),11===e&&(o||(o=[]),o.push({ref:u(),depth:c}))),!0)}function g(){if(25===a)return!1;let e=aX.getToken();if(102===e){if(e=_(),21===e){if(e=_(),11===e||15===e)return d(),!0}else{if(11===e)return d(),!0;if(156===e){aX.lookAhead(()=>{const e=aX.scan();return 161!==e&&(42===e||19===e||80===e||Ah(e))})&&(e=_())}if(80===e||Ah(e))if(e=_(),161===e){if(e=_(),11===e)return d(),!0}else if(64===e){if(y(!0))return!0}else{if(28!==e)return!0;e=_()}if(19===e){for(e=_();20!==e&&1!==e;)e=_();20===e&&(e=_(),161===e&&(e=_(),11===e&&d()))}else 42===e&&(e=_(),130===e&&(e=_(),(80===e||Ah(e))&&(e=_(),161===e&&(e=_(),11===e&&d()))))}return!0}return!1}function h(){let e=aX.getToken();if(95===e){if(p(),e=_(),156===e){aX.lookAhead(()=>{const e=aX.scan();return 42===e||19===e})&&(e=_())}if(19===e){for(e=_();20!==e&&1!==e;)e=_();20===e&&(e=_(),161===e&&(e=_(),11===e&&d()))}else if(42===e)e=_(),161===e&&(e=_(),11===e&&d());else if(102===e){if(e=_(),156===e){aX.lookAhead(()=>{const e=aX.scan();return 80===e||Ah(e)})&&(e=_())}if((80===e||Ah(e))&&(e=_(),64===e&&y(!0)))return!0}return!0}return!1}function y(e,t=!1){let n=e?_():aX.getToken();return 149===n&&(n=_(),21===n&&(n=_(),(11===n||t&&15===n)&&d()),!0)}function v(){let e=aX.getToken();if(80===e&&"define"===aX.getTokenValue()){if(e=_(),21!==e)return!0;if(e=_(),11===e||15===e){if(e=_(),28!==e)return!0;e=_()}if(23!==e)return!0;for(e=_();24!==e&&1!==e;)11!==e&&15!==e||d(),e=_();return!0}return!1}if(t&&function(){for(aX.setText(e),_();1!==aX.getToken();){if(16===aX.getToken()){const e=[aX.getToken()];e:for(;m(e);){const t=aX.scan();switch(t){case 1:break e;case 102:g();break;case 16:e.push(t);break;case 19:m(e)&&e.push(t);break;case 20:m(e)&&(16===ke(e)?18===aX.reScanTemplateToken(!1)&&e.pop():e.pop())}}_()}f()||g()||h()||n&&(y(!1,!0)||v())||_()}aX.setText(void 0)}(),TO(r,e),CO(r,ct),l){if(o)for(const e of o)i.push(e.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:void 0}}{let e;if(o)for(const t of o)0===t.depth?(e||(e=[]),e.push(t.ref.fileName)):i.push(t.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:e}}}var R1=/^data:(?:application\/json;charset=[uU][tT][fF]-8;base64,([A-Za-z0-9+/=]+)$)?/;function B1(e){const t=Xt(e.useCaseSensitiveFileNames()),n=e.getCurrentDirectory(),r=new Map,i=new Map;return{tryGetSourcePosition:function e(t){if(!SO(t.fileName))return;if(!s(t.fileName))return;const n=a(t.fileName).getSourcePosition(t);return n&&n!==t?e(n)||n:void 0},tryGetGeneratedPosition:function(t){if(SO(t.fileName))return;const n=s(t.fileName);if(!n)return;const r=e.getProgram();if(r.isSourceOfProjectReferenceRedirect(n.fileName))return;const i=r.getCompilerOptions().outFile,o=i?Qk(i)+".d.ts":Qy(t.fileName,r.getCompilerOptions(),r);if(void 0===o)return;const c=a(o,t.fileName).getGeneratedPosition(t);return c===t?void 0:c},toLineColumnOffset:function(e,t){return l(e).getLineAndCharacterOfPosition(t)},clearCache:function(){r.clear(),i.clear()},documentPositionMappers:i};function o(e){return Xo(e,n,t)}function a(n,r){const a=o(n),s=i.get(a);if(s)return s;let c;if(e.getDocumentPositionMapper)c=e.getDocumentPositionMapper(n,r);else if(e.readFile){const r=l(n);c=r&&J1({getSourceFileLike:l,getCanonicalFileName:t,log:t=>e.log(t)},n,JJ(r.text,Va(r)),t=>!e.fileExists||e.fileExists(t)?e.readFile(t):void 0)}return i.set(a,c||nz),c||nz}function s(t){const n=e.getProgram();if(!n)return;const r=o(t),i=n.getSourceFileByPath(r);return i&&i.resolvedPath===r?i:void 0}function c(t){const n=o(t),i=r.get(n);if(void 0!==i)return i||void 0;if(!e.readFile||e.fileExists&&!e.fileExists(t))return void r.set(n,!1);const a=e.readFile(t),s=!!a&&function(e,t){return{text:e,lineMap:t,getLineAndCharacterOfPosition(e){return Wa(Va(this),e)}}}(a);return r.set(n,s),s||void 0}function l(t){return e.getSourceFileLike?e.getSourceFileLike(t):s(t)||c(t)}}function J1(e,t,n,r){let i=zJ(n);if(i){const n=R1.exec(i);if(n){if(n[1]){const r=n[1];return z1(e,Ab(mo,r),t)}i=void 0}}const o=[];i&&o.push(i),o.push(t+".map");const a=i&&$o(i,Lo(t));for(const n of o){const i=$o(n,Lo(t)),o=r(i,a);if(it(o))return z1(e,o,i);if(void 0!==o)return o||void 0}}function z1(e,t,n){const r=UJ(t);if(r&&r.sources&&r.file&&r.mappings&&(!r.sourcesContent||!r.sourcesContent.some(it)))return tz(e,r,n)}var q1=new Map;function U1(e,t,n){var r;t.getSemanticDiagnostics(e,n);const i=[],o=t.getTypeChecker();var a;!(1===t.getImpliedNodeFormatForEmit(e)||Fo(e.fileName,[".cts",".cjs"]))&&e.commonJsModuleIndicator&&(uY(t)||dY(t.getCompilerOptions()))&&function(e){return e.statements.some(e=>{switch(e.kind){case 244:return e.declarationList.declarations.some(e=>!!e.initializer&&qm(V1(e.initializer),!0));case 245:{const{expression:t}=e;if(!LE(t))return qm(t,!0);const n=cg(t);return 1===n||2===n}default:return!1}})}(e)&&i.push(Wp(LE(a=e.commonJsModuleIndicator)?a.left:a,ha.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));const s=jm(e);if(q1.clear(),function t(n){if(s)(function(e,t){var n,r,i,o;if(NE(e)){if(hF(e.parent)&&(null==(n=e.symbol.members)?void 0:n.size))return!0;const o=t.getSymbolOfExpando(e,!1);return!(!o||!(null==(r=o.exports)?void 0:r.size)&&!(null==(i=o.members)?void 0:i.size))}if(vF(e))return!!(null==(o=e.symbol.members)?void 0:o.size);return!1})(n,o)&&i.push(Wp(hF(n.parent)?n.parent.name:n,ha.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(ZE(n)&&n.parent===e&&2&n.declarationList.flags&&1===n.declarationList.declarations.length){const e=n.declarationList.declarations[0].initializer;e&&qm(e,!0)&&i.push(Wp(e,ha.require_call_may_be_converted_to_an_import))}const t=$7.getJSDocTypedefNodes(n);for(const e of t)i.push(Wp(e,ha.JSDoc_typedef_may_be_converted_to_TypeScript_type));$7.parameterShouldGetTypeFromJSDoc(n)&&i.push(Wp(n.name||n,ha.JSDoc_types_may_be_moved_to_TypeScript_types))}Z1(n)&&function(e,t,n){(function(e,t){return!qh(e)&&e.body&&YE(e.body)&&function(e,t){return!!Lf(e,e=>K1(e,t))}(e.body,t)&&$1(e,t)})(e,t)&&!q1.has(Y1(e))&&n.push(Wp(!e.name&&hF(e.parent)&&fD(e.parent.name)?e.parent.name:e,ha.This_may_be_converted_to_an_async_function))}(n,o,i);n.forEachChild(t)}(e),AS(t.getCompilerOptions()))for(const n of e.imports){const o=wg(n);if(DF(o)&&Lv(o,32))continue;const a=W1(o);if(!a)continue;const s=null==(r=t.getResolvedModuleFromModuleSpecifier(n,e))?void 0:r.resolvedModule,c=s&&t.getSourceFile(s.resolvedFileName);c&&c.externalModuleIndicator&&!0!==c.externalModuleIndicator&&JF(c.externalModuleIndicator)&&c.externalModuleIndicator.isExportEquals&&i.push(Wp(a,ha.Import_may_be_converted_to_a_default_import))}return de(i,e.bindSuggestionDiagnostics),de(i,t.getSuggestionDiagnostics(e,n)),i.sort((e,t)=>e.start-t.start),i}function V1(e){return bE(e)?V1(e.expression):e}function W1(e){switch(e.kind){case 273:const{importClause:t,moduleSpecifier:n}=e;return t&&!t.name&&t.namedBindings&&275===t.namedBindings.kind&&QN(n)?t.namedBindings.name:void 0;case 272:return e.name;default:return}}function $1(e,t){const n=t.getSignatureFromDeclaration(e),r=n?t.getReturnTypeOfSignature(n):void 0;return!!r&&!!t.getPromisedTypeOfPromise(r)}function K1(e,t){return _F(e)&&!!e.expression&&H1(e.expression,t)}function H1(e,t){if(!G1(e)||!X1(e)||!e.arguments.every(e=>Q1(e,t)))return!1;let n=e.expression.expression;for(;G1(n)||bE(n);)if(SE(n)){if(!X1(n)||!n.arguments.every(e=>Q1(e,t)))return!1;n=n.expression.expression}else n=n.expression;return!0}function G1(e){return SE(e)&&(kX(e,"then")||kX(e,"catch")||kX(e,"finally"))}function X1(e){const t=e.expression.name.text,n="then"===t?2:"catch"===t||"finally"===t?1:0;return!(e.arguments.length>n)&&(e.arguments.length106===e.kind||fD(e)&&"undefined"===e.text)))}function Q1(e,t){switch(e.kind){case 263:case 219:if(1&zh(e))return!1;case 220:q1.set(Y1(e),!0);case 106:return!0;case 80:case 212:{const n=t.getSymbolAtLocation(e);return!!n&&(t.isUndefinedSymbol(n)||X(px(n,t).declarations,e=>__(e)||Mu(e)&&!!e.initializer&&__(e.initializer)))}default:return!1}}function Y1(e){return`${e.pos.toString()}:${e.end.toString()}`}function Z1(e){switch(e.kind){case 263:case 175:case 219:case 220:return!0;default:return!1}}var e2=new Set(["isolatedModules"]);function t2(e,t){return s2(e,t,!1)}function n2(e,t){return s2(e,t,!0)}var r2,i2,o2='/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number {}\ninterface Object {}\ninterface RegExp {}\ninterface String {}\ninterface Array { length: number; [n: number]: T; }\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}',a2="lib.d.ts";function s2(e,t,n){r2??(r2=uO(a2,o2,{languageVersion:99}));const r=[],i=t.compilerOptions?l2(t.compilerOptions,r):{},o={target:1,jsx:1};for(const e in o)Ie(o,e)&&void 0===i[e]&&(i[e]=o[e]);for(const e of QO)i.verbatimModuleSyntax&&e2.has(e.name)||(i[e.name]=e.transpileOptionValue);i.suppressOutputPathCheck=!0,i.allowNonTsExtensions=!0,n?(i.declaration=!0,i.emitDeclarationOnly=!0,i.isolatedDeclarations=!0):(i.declaration=!1,i.declarationMap=!1);const a=Bb(i),s={getSourceFile:e=>e===Ko(c)?l:e===Ko(a2)?r2:void 0,writeFile:(e,t)=>{Eo(e,".map")?(gn.assertEqual(u,void 0,"Unexpected multiple source map outputs, file:",e),u=t):(gn.assertEqual(_,void 0,"Unexpected multiple outputs, file:",e),_=t)},getDefaultLibFileName:()=>a2,useCaseSensitiveFileNames:()=>!1,getCanonicalFileName:e=>e,getCurrentDirectory:()=>"",getNewLine:()=>a,fileExists:e=>e===c||!!n&&e===a2,readFile:()=>"",directoryExists:()=>!0,getDirectories:()=>[]},c=t.fileName||(t.compilerOptions&&t.compilerOptions.jsx?"module.tsx":"module.ts"),l=uO(c,e,{languageVersion:wS(i),impliedNodeFormat:$V(Xo(c,"",s.getCanonicalFileName),void 0,s,i),setExternalModuleIndicator:xS(i),jsDocParsingMode:t.jsDocParsingMode??0});let _,u;t.moduleName&&(l.moduleName=t.moduleName),t.renamedDependencies&&(l.renamedDependencies=new Map(Object.entries(t.renamedDependencies)));const d=GV(n?[c,a2]:[c],i,s);t.reportDiagnostics&&(de(r,d.getSyntacticDiagnostics(l)),de(r,d.getOptionsDiagnostics()));return de(r,d.emit(void 0,void 0,void 0,n,t.transformers,n).diagnostics),void 0===_?gn.fail("Output generation failed"):{outputText:_,diagnostics:r,sourceMapText:u}}function c2(e,t,n,r,i){const o=t2(e,{compilerOptions:t,fileName:n,reportDiagnostics:!!r,moduleName:i});return de(r,o.diagnostics),o.outputText}function l2(e,t){i2=i2||P(VO,e=>"object"==typeof e.type&&!_d(e.type,e=>"number"!=typeof e)),e=qQ(e);for(const n of i2){if(!Ie(e,n.name))continue;const r=e[n.name];it(r)?e[n.name]=dL(n,r,t):_d(n.type,e=>e===r)||t.push(_L(n))}return e}var _2={};function u2(e,t,n,r,i,o,a){const s=p1(r);if(!s)return p;const c=[],l=1===e.length?e[0]:void 0;for(const r of e)n.throwIfCancellationRequested(),o&&r.isDeclarationFile||d2(r,!!a,l)||r.getNamedDeclarations().forEach((e,n)=>{p2(s,n,e,t,r.fileName,!!a,l,c)});return c.sort(v2),(void 0===i?c:c.slice(0,i)).map(b2)}function d2(e,t,n){return e!==n&&t&&(YZ(e.path)||e.hasNoDefaultLib)}function p2(e,t,n,r,i,o,a,s){const c=e.getMatchForLastSegmentOfPattern(t);if(c)for(const l of n)if(f2(l,r,o,a))if(e.patternContainsDots){const n=e.getFullMatch(y2(l),t);n&&s.push({name:t,fileName:i,matchKind:n.kind,isCaseSensitive:n.isCaseSensitive,declaration:l})}else s.push({name:t,fileName:i,matchKind:c.kind,isCaseSensitive:c.isCaseSensitive,declaration:l})}function f2(e,t,n,r){var i;switch(e.kind){case 274:case 277:case 272:const o=t.getSymbolAtLocation(e.name),a=t.getAliasedSymbol(o);return o.escapedName!==a.escapedName&&!(null==(i=a.declarations)?void 0:i.every(e=>d2(e.getSourceFile(),n,r)));default:return!0}}function m2(e,t){const n=Ac(e);return!!n&&(h2(n,t)||168===n.kind&&g2(n.expression,t))}function g2(e,t){return h2(e,t)||bE(e)&&(t.push(e.name.text),!0)&&g2(e.expression,t)}function h2(e,t){return Hh(e)&&(t.push(Gh(e)),!0)}function y2(e){const t=[],n=Ac(e);if(n&&168===n.kind&&!g2(n.expression,t))return p;t.shift();let r=LX(e);for(;r;){if(!m2(r,t))return p;r=LX(r)}return t.reverse(),t}function v2(e,t){return Tt(e.matchKind,t.matchKind)||Mt(e.name,t.name)}function b2(e){const t=e.declaration,n=LX(t),r=n&&Ac(n);return{name:e.name,kind:jX(t),kindModifiers:OQ(t),matchKind:u1[e.matchKind],isCaseSensitive:e.isCaseSensitive,fileName:e.fileName,textSpan:HQ(t),containerName:r?r.text:"",containerKind:r?jX(n):""}}a(_2,{getNavigateToItems:()=>u2});var x2={};a(x2,{getNavigationBarItems:()=>P2,getNavigationTree:()=>A2});var S2,k2,T2,C2,w2=/\s+/g,N2=150,D2=[],E2=[],F2=[];function P2(e,t){S2=t,k2=e;try{return O(function(e){const t=[];function n(e){if(r(e)&&(t.push(e),e.children))for(const t of e.children)n(t)}return n(e),t;function r(e){if(e.children)return!0;switch(L2(e)){case 264:case 232:case 267:case 265:case 268:case 308:case 266:case 347:case 339:return!0;case 220:case 263:case 219:return t(e);default:return!1}function t(e){if(!e.node.body)return!1;switch(L2(e.parent)){case 269:case 308:case 175:case 177:return!0;default:return!1}}}}(M2(e)),a4)}finally{I2()}}function A2(e,t){S2=t,k2=e;try{return o4(M2(e))}finally{I2()}}function I2(){k2=void 0,S2=void 0,D2=[],T2=void 0,F2=[]}function O2(e){return g4(e.getText(k2))}function L2(e){return e.node.kind}function j2(e,t){e.children?e.children.push(t):e.children=[t]}function M2(e){gn.assert(!D2.length);const t={node:e,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};T2=t;for(const t of e.statements)H2(t);return V2(),gn.assert(!T2&&!D2.length),t}function R2(e,t){j2(T2,B2(e,t))}function B2(e,t){return{node:e,name:t||(hu(e)||Q_(e)?Ac(e):void 0),additionalNodes:void 0,parent:T2,children:void 0,indent:T2.indent+1}}function J2(e){C2||(C2=new Map),C2.set(e,!0)}function z2(e){for(let t=0;t0;t--){U2(e,n[t])}return[n.length-1,n[0]]}function U2(e,t){const n=B2(e,t);j2(T2,n),D2.push(T2),E2.push(C2),C2=void 0,T2=n}function V2(){T2.children&&(G2(T2.children,T2),t4(T2.children)),T2=D2.pop(),C2=E2.pop()}function W2(e,t,n){U2(e,n),H2(t),V2()}function $2(e){e.initializer&&function(e){switch(e.kind){case 220:case 219:case 232:return!0;default:return!1}}(e.initializer)?(U2(e),sO(e.initializer,H2),V2()):W2(e,e.initializer)}function K2(e){const t=Ac(e);if(void 0===t)return!1;if(FD(t)){const e=t.expression;return fb(e)||GN(e)||Uh(e)}return!!t}function H2(e){if(S2.throwIfCancellationRequested(),e&&!Ml(e))switch(e.kind){case 177:const t=e;W2(t,t.body);for(const e of t.parameters)ac(e,t)&&R2(e);break;case 175:case 178:case 179:case 174:K2(e)&&W2(e,e.body);break;case 173:K2(e)&&$2(e);break;case 172:K2(e)&&R2(e);break;case 274:const n=e;n.name&&R2(n.name);const{namedBindings:r}=n;if(r)if(275===r.kind)R2(r);else for(const e of r.elements)R2(e);break;case 305:W2(e,e.name);break;case 306:const{expression:i}=e;fD(i)?R2(e,i):R2(e);break;case 209:case 304:case 261:{const t=e;E_(t.name)?H2(t.name):$2(t);break}case 263:const o=e.name;o&&fD(o)&&J2(o.text),W2(e,e.body);break;case 220:case 219:W2(e,e.body);break;case 267:U2(e);for(const t of e.members)u4(t)||R2(t);V2();break;case 264:case 232:case 265:U2(e);for(const t of e.members)H2(t);V2();break;case 268:W2(e,_4(e).body);break;case 278:{const t=e.expression,n=vE(t)||SE(t)?t:DE(t)||NE(t)?t.body:void 0;n?(U2(e),H2(n),V2()):R2(e);break}case 282:case 272:case 182:case 180:case 181:case 266:R2(e);break;case 214:case 227:{const t=cg(e);switch(t){case 1:case 2:return void W2(e,e.right);case 6:case 3:{const n=e,r=n.left,i=3===t?r.expression:r;let o,a=0;return fD(i.expression)?(J2(i.expression.text),o=i.expression):[a,o]=q2(n,i.expression),6===t?vE(n.right)&&n.right.properties.length>0&&(U2(n,o),sO(n.right,H2),V2()):NE(n.right)||DE(n.right)?W2(e,n.right,o):(U2(n,o),W2(e,n.right,r.name),V2()),void z2(a)}case 7:case 9:{const n=e,r=7===t?n.arguments[0]:n.arguments[0].expression,i=n.arguments[1],[o,a]=q2(e,r);return U2(e,a),U2(e,AI(kw.createIdentifier(i.text),i)),H2(e.arguments[2]),V2(),V2(),void z2(o)}case 5:{const t=e,n=t.left,r=n.expression;if(fD(r)&&"prototype"!==hg(n)&&C2&&C2.has(r.text))return void(NE(t.right)||DE(t.right)?W2(e,t.right,r):dg(n)&&(U2(t,r),W2(t.left,t.right,mg(n)),V2()));break}case 4:case 0:case 8:break;default:gn.assertNever(t)}}default:Lu(e)&&g(e.jsDoc,e=>{g(e.tags,e=>{Lg(e)&&R2(e)})}),sO(e,H2)}}function G2(e,t){const n=new Map;A(e,(e,r)=>{const i=e.name||Ac(e.node),o=i&&O2(i);if(!o)return!0;const a=n.get(o);if(!a)return n.set(o,e),!0;if(a instanceof Array){for(const n of a)if(Q2(n,e,r,t))return!1;return a.push(e),!0}{const i=a;return!Q2(i,e,r,t)&&(n.set(o,[i,e]),!0)}})}var X2={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function Q2(e,t,n,r){return!!function(e,t,n,r){function i(e){return NE(e)||vF(e)||hF(e)}const o=LE(t.node)||SE(t.node)?cg(t.node):0,a=LE(e.node)||SE(e.node)?cg(e.node):0;if(X2[o]&&X2[a]||i(e.node)&&X2[o]||i(t.node)&&X2[a]||bF(e.node)&&Y2(e.node)&&X2[o]||bF(t.node)&&X2[a]||bF(e.node)&&Y2(e.node)&&i(t.node)||bF(t.node)&&i(e.node)&&Y2(e.node)){let o=e.additionalNodes&&ke(e.additionalNodes)||e.node;if(!bF(e.node)&&!bF(t.node)||i(e.node)||i(t.node)){const n=i(e.node)?e.node:i(t.node)?t.node:void 0;if(void 0!==n){const r=B2(AI(kw.createConstructorDeclaration(void 0,[],void 0),n));r.indent=e.indent+1,r.children=e.node===n?e.children:t.children,e.children=e.node===n?Y([r],t.children||[t]):Y(e.children||[{...e}],[r])}else(e.children||t.children)&&(e.children=Y(e.children||[{...e}],t.children||[t]),e.children&&(G2(e.children,e),t4(e.children)));o=e.node=AI(kw.createClassDeclaration(void 0,e.name||kw.createIdentifier("__class__"),void 0,void 0,[]),e.node)}else e.children=Y(e.children,t.children),e.children&&G2(e.children,e);const a=t.node;return r.children[n-1].node.end===o.end?AI(o,{pos:o.pos,end:a.end}):(e.additionalNodes||(e.additionalNodes=[]),e.additionalNodes.push(AI(kw.createClassDeclaration(void 0,e.name||kw.createIdentifier("__class__"),void 0,void 0,[]),t.node))),!0}return 0!==o}(e,t,n,r)||!!function(e,t,n){if(e.kind!==t.kind||e.parent!==t.parent&&(!Z2(e,n)||!Z2(t,n)))return!1;switch(e.kind){case 173:case 175:case 178:case 179:return jv(e)===jv(t);case 268:return e4(e,t)&&l4(e)===l4(t);default:return!0}}(e.node,t.node,r)&&(function(e,t){e.additionalNodes=e.additionalNodes||[],e.additionalNodes.push(t.node),t.additionalNodes&&e.additionalNodes.push(...t.additionalNodes);e.children=Y(e.children,t.children),e.children&&(G2(e.children,e),t4(e.children))}(e,t),!0)}function Y2(e){return!!(16&e.flags)}function Z2(e,t){if(void 0===e.parent)return!1;const n=CF(e.parent)?e.parent.parent:e.parent;return n===t.node||D(t.additionalNodes,n)}function e4(e,t){return e.body&&t.body?e.body.kind===t.body.kind&&(268!==e.body.kind||e4(e.body,t.body)):e.body===t.body}function t4(e){e.sort(n4)}function n4(e,t){return Mt(r4(e.node),r4(t.node))||Tt(L2(e),L2(t))}function r4(e){if(268===e.kind)return c4(e);const t=Ac(e);if(t&&c_(t)){const e=Kh(t);return e&&Sc(e)}switch(e.kind){case 219:case 220:case 232:return f4(e);default:return}}function i4(e,t){if(268===e.kind)return g4(c4(e));if(t){const e=fD(t)?t.text:xE(t)?`[${O2(t.argumentExpression)}]`:O2(t);if(e.length>0)return g4(e)}switch(e.kind){case 308:const t=e;return fO(t)?`"${Dy(jo(Qk(Ko(t.fileName))))}"`:"";case 278:return JF(e)&&e.isExportEquals?"export=":"default";case 220:case 263:case 219:case 264:case 232:return 2048&Gv(e)?"default":f4(e);case 177:return"constructor";case 181:return"new()";case 180:return"()";case 182:return"[]";default:return""}}function o4(e){return{text:i4(e.node,e.name),kind:jX(e.node),kindModifiers:p4(e.node),spans:s4(e),nameSpan:e.name&&d4(e.name),childItems:O(e.children,o4)}}function a4(e){return{text:i4(e.node,e.name),kind:jX(e.node),kindModifiers:p4(e.node),spans:s4(e),childItems:O(e.children,function(e){return{text:i4(e.node,e.name),kind:jX(e.node),kindModifiers:OQ(e.node),spans:s4(e),childItems:F2,indent:0,bolded:!1,grayed:!1}})||F2,indent:e.indent,bolded:!1,grayed:!1}}function s4(e){const t=[d4(e.node)];if(e.additionalNodes)for(const n of e.additionalNodes)t.push(d4(n));return t}function c4(e){return mp(e)?rp(e.name):l4(e)}function l4(e){const t=[Gh(e.name)];for(;e.body&&268===e.body.kind;)e=e.body,t.push(Gh(e.name));return t.join(".")}function _4(e){return e.body&&TF(e.body)?_4(e.body):e}function u4(e){return!e.name||168===e.name.kind}function d4(e){return 308===e.kind?QQ(e):HQ(e,k2)}function p4(e){return e.parent&&261===e.parent.kind&&(e=e.parent),OQ(e)}function f4(e){const{parent:t}=e;if(e.name&&fd(e.name)>0)return g4(Bp(e.name));if(hF(t))return g4(Bp(t.name));if(LE(t)&&64===t.operatorToken.kind)return O2(t.left).replace(w2,"");if(uP(t))return O2(t.name);if(2048&Gv(e))return"default";if(y_(e))return"";if(SE(t)){let e=m4(t.expression);if(void 0!==e){if(e=g4(e),e.length>N2)return`${e} callback`;return`${e}(${g4(U(t.arguments,e=>Uu(e)||V_(e)?e.getText(k2):void 0).join(", "))}) callback`}}return""}function m4(e){if(fD(e))return e.text;if(bE(e)){const t=m4(e.expression),n=e.name.text;return void 0===t?n:`${t}.${n}`}}function g4(e){return(e=e.length>N2?e.substring(0,N2)+"...":e).replace(/\\?(?:\r?\n|[\r\u2028\u2029])/g,"")}var h4={};a(h4,{addExportsInOldFile:()=>X4,addImportsForMovedSymbols:()=>r3,addNewFileToTsconfig:()=>G4,addOrRemoveBracesToArrowFunction:()=>U3,addTargetFileImports:()=>P3,containsJsx:()=>g3,convertArrowFunctionOrFunctionExpression:()=>e6,convertParamsToDestructuredObject:()=>_6,convertStringOrTemplateLiteral:()=>F6,convertToOptionalChainExpression:()=>W6,createNewFileName:()=>f3,doChangeNamedToNamespaceOrDefault:()=>I4,extractSymbol:()=>r5,generateGetAccessorAndSetAccessor:()=>S5,getApplicableRefactors:()=>b4,getEditsForRefactor:()=>x4,getExistingLocals:()=>N3,getIdentifierForNode:()=>F3,getNewStatementsAndRemoveFromOldFile:()=>H4,getStatementsToMove:()=>m3,getUsageInfo:()=>y3,inferFunctionReturnType:()=>w5,isInImport:()=>x3,isRefactorErrorInfo:()=>D3,refactorKindBeginsWith:()=>E3,registerRefactor:()=>v4});var y4=new Map;function v4(e,t){y4.set(e,t)}function b4(e,t){return Be(J(y4.values(),n=>{var r;return e.cancellationToken&&e.cancellationToken.isCancellationRequested()||!(null==(r=n.kinds)?void 0:r.some(t=>E3(t,e.kind)))?void 0:n.getAvailableActions(e,t)}))}function x4(e,t,n,r){const i=y4.get(t);return i&&i.getEditsForAction(e,n,r)}var S4="Convert export",k4={name:"Convert default export to named export",description:Yx(ha.Convert_default_export_to_named_export),kind:"refactor.rewrite.export.named"},T4={name:"Convert named export to default export",description:Yx(ha.Convert_named_export_to_default_export),kind:"refactor.rewrite.export.default"};function C4(e,t=!0){const{file:n,program:r}=e,i=n0(e),o=dQ(n,i.start),a=o.parent&&32&Gv(o.parent)&&t?o.parent:NY(o,n,i);if(!(a&&(mP(a.parent)||CF(a.parent)&&mp(a.parent.parent))))return{error:Yx(ha.Could_not_find_export_statement)};const s=r.getTypeChecker(),c=function(e,t){if(mP(e))return e.symbol;const n=e.parent.symbol;if(n.valueDeclaration&&xp(n.valueDeclaration))return t.getMergedSymbol(n);return n}(a.parent,s),l=Gv(a)||(JF(a)&&!a.isExportEquals?2080:0),_=!!(2048&l);if(!(32&l)||!_&&c.exports.has("default"))return{error:Yx(ha.This_file_already_has_a_default_export)};const u=e=>fD(e)&&s.getSymbolAtLocation(e)?void 0:{error:Yx(ha.Can_only_convert_named_export)};switch(a.kind){case 263:case 264:case 265:case 267:case 266:case 268:{const e=a;if(!e.name)return;return u(e.name)||{exportNode:e,exportName:e.name,wasDefault:_,exportingModuleSymbol:c}}case 244:{const e=a;if(!(2&e.declarationList.flags)||1!==e.declarationList.declarations.length)return;const t=xe(e.declarationList.declarations);if(!t.initializer)return;return gn.assert(!_,"Can't have a default flag here"),u(t.name)||{exportNode:e,exportName:t.name,wasDefault:_,exportingModuleSymbol:c}}case 278:{const e=a;if(e.isExportEquals)return;return u(e.expression)||{exportNode:e,exportName:e.expression,wasDefault:_,exportingModuleSymbol:c}}default:return}}function w4(e,t){return kw.createImportSpecifier(!1,e===t?void 0:kw.createIdentifier(e),kw.createIdentifier(t))}function N4(e,t){return kw.createExportSpecifier(!1,e===t?void 0:kw.createIdentifier(e),kw.createIdentifier(t))}v4(S4,{kinds:[k4.kind,T4.kind],getAvailableActions:function(e){const t=C4(e,"invoked"===e.triggerReason);if(!t)return p;if(!D3(t)){const e=t.wasDefault?k4:T4;return[{name:S4,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:S4,description:Yx(ha.Convert_default_export_to_named_export),actions:[{...k4,notApplicableReason:t.error},{...T4,notApplicableReason:t.error}]}]:p},getEditsForAction:function(e,t){gn.assert(t===k4.name||t===T4.name,"Unexpected action name");const n=C4(e);gn.assert(n&&!D3(n),"Expected applicable refactor info");const r=sde.ChangeTracker.with(e,t=>function(e,t,n,r,i){(function(e,{wasDefault:t,exportNode:n,exportName:r},i,o){if(t)if(JF(n)&&!n.isExportEquals){const t=n.expression,r=N4(t.text,t.text);i.replaceNode(e,n,kw.createExportDeclaration(void 0,!1,kw.createNamedExports([r])))}else i.delete(e,gn.checkDefined(EY(n,90),"Should find a default keyword in modifier list"));else{const t=gn.checkDefined(EY(n,95),"Should find an export keyword in modifier list");switch(n.kind){case 263:case 264:case 265:i.insertNodeAfter(e,t,kw.createToken(90));break;case 244:const a=xe(n.declarationList.declarations);if(!Bce.Core.isSymbolReferencedInFile(r,o,e)&&!a.type){i.replaceNode(e,n,kw.createExportDefault(gn.checkDefined(a.initializer,"Initializer was previously known to be present")));break}case 267:case 266:case 268:i.deleteModifier(e,t),i.insertNodeAfter(e,n,kw.createExportDefault(kw.createIdentifier(r.text)));break;default:gn.fail(`Unexpected exportNode kind ${n.kind}`)}}})(e,n,r,t.getTypeChecker()),function(e,{wasDefault:t,exportName:n,exportingModuleSymbol:r},i,o){const a=e.getTypeChecker(),s=gn.checkDefined(a.getSymbolAtLocation(n),"Export name should resolve to a symbol");Bce.Core.eachExportReference(e.getSourceFiles(),a,o,s,r,n.text,t,e=>{if(n===e)return;const r=e.getSourceFile();t?function(e,t,n,r){const{parent:i}=t;switch(i.kind){case 212:n.replaceNode(e,t,kw.createIdentifier(r));break;case 277:case 282:{const t=i;n.replaceNode(e,t,w4(r,t.name.text));break}case 274:{const o=i;gn.assert(o.name===t,"Import clause name should match provided ref");const a=w4(r,t.text),{namedBindings:s}=o;if(s)if(275===s.kind){n.deleteRange(e,{pos:t.getStart(e),end:s.getStart(e)});const i=QN(o.parent.moduleSpecifier)?vY(o.parent.moduleSpecifier,e):1,a=gY(void 0,[w4(r,t.text)],o.parent.moduleSpecifier,i);n.insertNodeAfter(e,o.parent,a)}else n.delete(e,t),n.insertNodeAtEndOfList(e,s.elements,a);else n.replaceNode(e,t,kw.createNamedImports([a]));break}case 206:const o=i;n.replaceNode(e,i,kw.createImportTypeNode(o.argument,o.attributes,kw.createIdentifier(r),o.typeArguments,o.isTypeOf));break;default:gn.failBadSyntaxKind(i)}}(r,e,i,n.text):function(e,t,n){const r=t.parent;switch(r.kind){case 212:n.replaceNode(e,t,kw.createIdentifier("default"));break;case 277:{const t=kw.createIdentifier(r.name.text);1===r.parent.elements.length?n.replaceNode(e,r.parent,t):(n.delete(e,r),n.insertNodeBefore(e,r.parent,t));break}case 282:n.replaceNode(e,r,N4("default",r.name.text));break;default:gn.assertNever(r,`Unexpected parent kind ${r.kind}`)}}(r,e,i)})}(t,n,r,i)}(e.file,e.program,n,t,e.cancellationToken));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var D4="Convert import",E4={0:{name:"Convert namespace import to named imports",description:Yx(ha.Convert_namespace_import_to_named_imports),kind:"refactor.rewrite.import.named"},2:{name:"Convert named imports to namespace import",description:Yx(ha.Convert_named_imports_to_namespace_import),kind:"refactor.rewrite.import.namespace"},1:{name:"Convert named imports to default import",description:Yx(ha.Convert_named_imports_to_default_import),kind:"refactor.rewrite.import.default"}};function F4(e,t=!0){const{file:n}=e,r=n0(e),i=dQ(n,r.start),o=t?yc(i,an(EF,iA)):NY(i,n,r);if(void 0===o||!EF(o)&&!iA(o))return{error:"Selection is not an import declaration."};const a=r.start+r.length,s=gQ(o,o.parent,n);if(s&&a>s.getStart())return;const{importClause:c}=o;if(!c)return{error:Yx(ha.Could_not_find_import_clause)};if(!c.namedBindings)return{error:Yx(ha.Could_not_find_namespace_import_or_named_imports)};if(275===c.namedBindings.kind)return{convertTo:0,import:c.namedBindings};return P4(e.program,c)?{convertTo:1,import:c.namedBindings}:{convertTo:2,import:c.namedBindings}}function P4(e,t){return AS(e.getCompilerOptions())&&function(e,t){const n=t.resolveExternalModuleName(e);if(!n)return!1;const r=t.resolveExternalModuleSymbol(n);return n!==r}(t.parent.moduleSpecifier,e.getTypeChecker())}function A4(e){return bE(e)?e.name:e.right}function I4(e,t,n,r,i=P4(t,r.parent)){const o=t.getTypeChecker(),a=r.parent.parent,{moduleSpecifier:s}=a,c=new Set;r.elements.forEach(e=>{const t=o.getSymbolAtLocation(e.name);t&&c.add(t)});const l=s&&QN(s)?l0(s.text,99):"module";const _=r.elements.some(function(t){return!!Bce.Core.eachSymbolReferenceInFile(t.name,o,e,e=>{const t=o.resolveName(l,e,-1,!0);return!!t&&(!c.has(t)||UF(e.parent))})})?yZ(l,e):l,u=new Set;for(const t of r.elements){const r=t.propertyName||t.name;Bce.Core.eachSymbolReferenceInFile(t.name,o,e,i=>{const o=11===r.kind?kw.createElementAccessExpression(kw.createIdentifier(_),kw.cloneNode(r)):kw.createPropertyAccessExpression(kw.createIdentifier(_),kw.cloneNode(r));dP(i.parent)?n.replaceNode(e,i.parent,kw.createPropertyAssignment(i.text,o)):UF(i.parent)?u.add(t):n.replaceNode(e,i,o)})}if(n.replaceNode(e,r,i?kw.createIdentifier(_):kw.createNamespaceImport(kw.createIdentifier(_))),u.size&&EF(a)){const t=Be(u.values(),e=>kw.createImportSpecifier(e.isTypeOnly,e.propertyName&&kw.cloneNode(e.propertyName),kw.cloneNode(e.name)));n.insertNodeAfter(e,r.parent.parent,O4(a,void 0,t))}}function O4(e,t,n){return kw.createImportDeclaration(void 0,L4(t,n),e.moduleSpecifier,void 0)}function L4(e,t){return kw.createImportClause(void 0,e,t&&t.length?kw.createNamedImports(t):void 0)}v4(D4,{kinds:Me(E4).map(e=>e.kind),getAvailableActions:function(e){const t=F4(e,"invoked"===e.triggerReason);if(!t)return p;if(!D3(t)){const e=E4[t.convertTo];return[{name:D4,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?Me(E4).map(e=>({name:D4,description:e.description,actions:[{...e,notApplicableReason:t.error}]})):p},getEditsForAction:function(e,t){gn.assert(X(Me(E4),e=>e.name===t),"Unexpected action name");const n=F4(e);gn.assert(n&&!D3(n),"Expected applicable refactor info");const r=sde.ChangeTracker.with(e,t=>function(e,t,n,r){const i=t.getTypeChecker();0===r.convertTo?function(e,t,n,r,i){let o=!1;const a=[],s=new Map;Bce.Core.eachSymbolReferenceInFile(r.name,t,e,e=>{if(J_(e.parent)){const r=A4(e.parent).text;t.resolveName(r,e,-1,!0)&&s.set(r,!0),gn.assert((bE(n=e.parent)?n.expression:n.left)===e,"Parent expression should match id"),a.push(e.parent)}else o=!0;var n});const c=new Map;for(const t of a){const r=A4(t).text;let i=c.get(r);void 0===i&&c.set(r,i=s.has(r)?yZ(r,e):r),n.replaceNode(e,t,kw.createIdentifier(i))}const l=[];c.forEach((e,t)=>{l.push(kw.createImportSpecifier(!1,e===t?void 0:kw.createIdentifier(t),kw.createIdentifier(e)))});const _=r.parent.parent;if(o&&!i&&EF(_))n.insertNodeAfter(e,_,O4(_,void 0,l));else{const t=o?kw.createIdentifier(r.name.text):void 0;n.replaceNode(e,r.parent,L4(t,l))}}(e,i,n,r.import,AS(t.getCompilerOptions())):I4(e,t,n,r.import,1===r.convertTo)}(e.file,e.program,t,n));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var j4="Extract type",M4={name:"Extract to type alias",description:Yx(ha.Extract_to_type_alias),kind:"refactor.extract.type"},R4={name:"Extract to interface",description:Yx(ha.Extract_to_interface),kind:"refactor.extract.interface"},B4={name:"Extract to typedef",description:Yx(ha.Extract_to_typedef),kind:"refactor.extract.typedef"};function J4(e,t=!0){const{file:n,startPosition:r}=e,i=jm(n),o=YQ(n0(e)),a=o.pos===o.end&&t,s=function(e,t,n,r){const i=[()=>dQ(e,t),()=>uQ(e,t,()=>!0)];for(const t of i){const i=t(),o=WX(i,e,n.pos,n.end),a=yc(i,t=>t.parent&&N_(t)&&!q4(n,t.parent,e)&&(r||o));if(a)return a}return}(n,r,o,a);if(!s||!N_(s))return{info:{error:Yx(ha.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const c=e.program.getTypeChecker(),l=function(e,t){return yc(e,bu)||(t?yc(e,PP):void 0)}(s,i);if(void 0===l)return{info:{error:Yx(ha.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const _=function(e,t){return yc(e,e=>e===t?"quit":!(!nE(e.parent)&&!rE(e.parent)))??e}(s,l);if(!N_(_))return{info:{error:Yx(ha.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const u=[];(nE(_.parent)||rE(_.parent))&&o.end>s.end&&de(u,_.parent.types.filter(e=>WX(e,n,o.pos,o.end)));const d=u.length>1?u:_,{typeParameters:f,affectedTextRange:m}=function(e,t,n,r){const i=[],o=rt(t),a={pos:o[0].getStart(r),end:o[o.length-1].end};for(const e of o)if(s(e))return{typeParameters:void 0,affectedTextRange:void 0};return{typeParameters:i,affectedTextRange:a};function s(t){if($D(t)){if(fD(t.typeName)){const o=t.typeName,s=e.resolveName(o.text,o,262144,!0);for(const e of(null==s?void 0:s.declarations)||p)if(PD(e)&&e.getSourceFile()===r){if(e.name.escapedText===o.escapedText&&q4(e,a,r))return!0;if(q4(n,e,r)&&!q4(a,e,r)){pe(i,e);break}}}}else if(oE(t)){const e=yc(t,e=>iE(e)&&q4(e.extendsType,t,r));if(!e||!q4(a,e,r))return!0}else if(WD(t)||sE(t)){const e=yc(t.parent,__);if(e&&e.type&&q4(e.type,t,r)&&!q4(a,e,r))return!0}else if(GD(t))if(fD(t.exprName)){const i=e.resolveName(t.exprName.text,t.exprName,111551,!1);if((null==i?void 0:i.valueDeclaration)&&q4(n,i.valueDeclaration,r)&&!q4(a,i.valueDeclaration,r))return!0}else if(gv(t.exprName.left)&&!q4(a,t.parent,r))return!0;return r&&YD(t)&&Ha(r,t.pos).line===Ha(r,t.end).line&&Ew(t,1),sO(t,s)}}(c,d,l,n);if(!f)return{info:{error:Yx(ha.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};return{info:{isJS:i,selection:d,enclosingNode:l,typeParameters:f,typeElements:z4(c,d)},affectedTextRange:m}}function z4(e,t){if(t){if(nt(t)){const n=[];for(const r of t){const t=z4(e,r);if(!t)return;de(n,t)}return n}if(rE(t)){const n=[],r=new Set;for(const i of t.types){const t=z4(e,i);if(!t||!t.every(e=>e.name&&Dx(r,lY(e.name))))return;de(n,t)}return n}return aE(t)?z4(e,t.type):XD(t)?t.members:void 0}}function q4(e,t,n){return UX(e,is(n.text,t.pos),t.end)}function U4(e){return nt(e.selection)?{firstTypeNode:e.selection[0],lastTypeNode:e.selection[e.selection.length-1],newTypeNode:nE(e.selection[0].parent)?kw.createUnionTypeNode(e.selection):kw.createIntersectionTypeNode(e.selection)}:{firstTypeNode:e.selection,lastTypeNode:e.selection,newTypeNode:e.selection}}v4(j4,{kinds:[M4.kind,R4.kind,B4.kind],getAvailableActions:function(e){const{info:t,affectedTextRange:n}=J4(e,"invoked"===e.triggerReason);if(!t)return p;if(!D3(t)){return[{name:j4,description:Yx(ha.Extract_type),actions:t.isJS?[B4]:le([M4],t.typeElements&&R4)}].map(t=>({...t,actions:t.actions.map(t=>({...t,range:n?{start:{line:Ha(e.file,n.pos).line,offset:Ha(e.file,n.pos).character},end:{line:Ha(e.file,n.end).line,offset:Ha(e.file,n.end).character}}:void 0}))}))}return e.preferences.provideRefactorNotApplicableReason?[{name:j4,description:Yx(ha.Extract_type),actions:[{...B4,notApplicableReason:t.error},{...M4,notApplicableReason:t.error},{...R4,notApplicableReason:t.error}]}]:p},getEditsForAction:function(e,t){const{file:n}=e,{info:r}=J4(e);gn.assert(r&&!D3(r),"Expected to find a range to extract");const i=yZ("NewType",n),o=sde.ChangeTracker.with(e,o=>{switch(t){case M4.name:return gn.assert(!r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r){const{enclosingNode:i,typeParameters:o}=r,{firstTypeNode:a,lastTypeNode:s,newTypeNode:c}=U4(r),l=kw.createTypeAliasDeclaration(void 0,n,o.map(e=>kw.updateTypeParameterDeclaration(e,e.modifiers,e.name,e.constraint,void 0)),c);e.insertNodeBefore(t,i,rN(l),!0),e.replaceNodeRange(t,a,s,kw.createTypeReferenceNode(n,o.map(e=>kw.createTypeReferenceNode(e.name,void 0))),{leadingTriviaOption:sde.LeadingTriviaOption.Exclude,trailingTriviaOption:sde.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);case B4.name:return gn.assert(r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r,i){var o;rt(i.selection).forEach(e=>{Ew(e,7168)});const{enclosingNode:a,typeParameters:s}=i,{firstTypeNode:c,lastTypeNode:l,newTypeNode:_}=U4(i),u=kw.createJSDocTypedefTag(kw.createIdentifier("typedef"),kw.createJSDocTypeExpression(_),kw.createIdentifier(r)),d=[];g(s,e=>{const t=yl(e),n=kw.createTypeParameterDeclaration(void 0,e.name),r=kw.createJSDocTemplateTag(kw.createIdentifier("template"),t&&st(t,hP),[n]);d.push(r)});const p=kw.createJSDocComment(void 0,kw.createNodeArray(Y(d,[u])));if(PP(a)){const r=a.getStart(n),i=iZ(t.host,null==(o=t.formatContext)?void 0:o.options);e.insertNodeAt(n,a.getStart(n),p,{suffix:i+i+n.text.slice(gZ(n.text,r-1),r)})}else e.insertNodeBefore(n,a,p,!0);e.replaceNodeRange(n,c,l,kw.createTypeReferenceNode(r,s.map(e=>kw.createTypeReferenceNode(e.name,void 0))))}(o,e,n,i,r);case R4.name:return gn.assert(!r.isJS&&!!r.typeElements,"Invalid actionName/JS combo"),function(e,t,n,r){var i;const{enclosingNode:o,typeParameters:a,typeElements:s}=r,c=kw.createInterfaceDeclaration(void 0,n,a,void 0,s);AI(c,null==(i=s[0])?void 0:i.parent),e.insertNodeBefore(t,o,rN(c),!0);const{firstTypeNode:l,lastTypeNode:_}=U4(r);e.replaceNodeRange(t,l,_,kw.createTypeReferenceNode(n,a.map(e=>kw.createTypeReferenceNode(e.name,void 0))),{leadingTriviaOption:sde.LeadingTriviaOption.Exclude,trailingTriviaOption:sde.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);default:gn.fail("Unexpected action name")}}),a=n.fileName;return{edits:o,renameFilename:a,renameLocation:vZ(o,a,i,!1)}}});var V4="Move to file",W4=Yx(ha.Move_to_file),$4={name:"Move to file",description:W4,kind:"refactor.move.file"};function K4(e){return{edits:[],renameFilename:void 0,renameLocation:void 0,notApplicableReason:e}}function H4(e,t,n,r,i,o,a,s,c,l){const _=o.getTypeChecker(),u=pn(e.statements,bf),d=!b0(t.fileName,o,a,!!e.commonJsModuleIndicator),p=bY(e,s);r3(n.oldFileImportsFromTargetFile,t.fileName,l,o),function(e,t,n,r){for(const i of e.statements)D(t,i)||t3(i,e=>{n3(e,e=>{n.has(e.symbol)&&r.removeExistingImport(e)})})}(e,i.all,n.unusedImportsFromOldFile,l),l.writeFixes(r,p),function(e,t,n){for(const{first:r,afterLast:i}of t)n.deleteNodeRangeExcludingEnd(e,r,i)}(e,i.ranges,r),function(e,t,n,r,i,o,a){const s=t.getTypeChecker();for(const c of t.getSourceFiles())if(c!==r)for(const l of c.statements)t3(l,_=>{if(s.getSymbolAtLocation(e3(_))!==r.symbol)return;const u=e=>{const t=hE(e.parent)?wY(s,e.parent):px(s.getSymbolAtLocation(e),s);return!!t&&i.has(t)};o3(c,_,e,u);const d=Vo(Lo($o(r.fileName,t.getCurrentDirectory())),o);if(0===Pt(!t.useCaseSensitiveFileNames())(d,c.fileName))return;const p=gB.getModuleSpecifier(t.getCompilerOptions(),c,c.fileName,d,pY(t,n)),f=_3(_,hY(p,a),u);f&&e.insertNodeAfter(c,l,f);const m=Q4(_);m&&Y4(e,c,s,i,p,m,_,a)})}(r,o,a,e,n.movedSymbols,t.fileName,p),X4(e,n.targetFileImportsFromOldFile,r,d),P3(e,n.oldImportsNeededByTargetFile,n.targetFileImportsFromOldFile,_,o,c),!Lm(t)&&u.length&&r.insertStatementsInNewFile(t.fileName,u,e),c.writeFixes(r,p);const f=function(e,t,n,r){return R(t,t=>{if(a3(t)&&!i3(e,t,r)&&b3(t,e=>{var t;return n.includes(gn.checkDefined(null==(t=at(e,pu))?void 0:t.symbol))})){const e=function(e,t){return t?[s3(e)]:function(e){return[e,...l3(e).map(c3)]}(e)}($C(t),r);if(e)return e}return $C(t)})}(e,i.all,Be(n.oldFileImportsFromTargetFile.keys()),d);Lm(t)&&t.statements.length>0?function(e,t,n,r,i){var o;const a=new Set,s=null==(o=r.symbol)?void 0:o.exports;if(s){const n=t.getTypeChecker(),o=new Map;for(const e of i.all)a3(e)&&Lv(e,32)&&b3(e,e=>{var t;const n=y(pu(e)?null==(t=s.get(e.symbol.escapedName))?void 0:t.declarations:void 0,e=>zF(e)?e:UF(e)?at(e.parent.parent,zF):void 0);n&&n.moduleSpecifier&&o.set(n,(o.get(n)||new Set).add(e))});for(const[t,i]of Be(o))if(t.exportClause&&qF(t.exportClause)&&m(t.exportClause.elements)){const o=t.exportClause.elements,s=P(o,e=>void 0===T(px(e.symbol,n).declarations,e=>k3(e)&&i.has(e)));if(0===m(s)){e.deleteNode(r,t),a.add(t);continue}m(s)zF(e)&&!!e.moduleSpecifier&&!a.has(e));c?e.insertNodesBefore(r,c,n,!0):e.insertNodesAfter(r,r.statements[r.statements.length-1],n)}(r,o,f,t,i):Lm(t)?r.insertNodesAtEndOfFile(t,f,!1):r.insertStatementsInNewFile(t.fileName,c.hasFixes()?[4,...f]:f,e)}function G4(e,t,n,r,i){const o=e.getCompilerOptions().configFile;if(!o)return;const a=Ko(Uo(n,"..",r)),s=da(o.fileName,a,i),c=o.statements[0]&&at(o.statements[0].expression,vE),l=c&&T(c.properties,e=>uP(e)&&QN(e.name)&&"files"===e.name.text);l&&yE(l.initializer)&&t.insertNodeInListAfter(o,Te(l.initializer.elements),kw.createStringLiteral(s),l.initializer.elements)}function X4(e,t,n,r){const i=oY();t.forEach((t,o)=>{if(o.declarations)for(const t of o.declarations){if(!k3(t))continue;const o=u3(t);if(!o)continue;const a=d3(t);i(a)&&p3(e,a,o,n,r)}})}function Q4(e){switch(e.kind){case 273:return e.importClause&&e.importClause.namedBindings&&275===e.importClause.namedBindings.kind?e.importClause.namedBindings.name:void 0;case 272:return e.name;case 261:return at(e.name,fD);default:return gn.assertNever(e,`Unexpected node kind ${e.kind}`)}}function Y4(e,t,n,r,i,o,a,s){const c=l0(i,99);let l=!1;const _=[];if(Bce.Core.eachSymbolReferenceInFile(o,n,t,e=>{bE(e.parent)&&(l=l||!!n.resolveName(c,e,-1,!0),r.has(n.getSymbolAtLocation(e.parent.name))&&_.push(e))}),_.length){const n=l?yZ(c,t):c;for(const r of _)e.replaceNode(t,r,kw.createIdentifier(n));e.insertNodeAfter(t,a,function(e,t,n,r){const i=kw.createIdentifier(t),o=hY(n,r);switch(e.kind){case 273:return kw.createImportDeclaration(void 0,kw.createImportClause(void 0,void 0,kw.createNamespaceImport(i)),o,void 0);case 272:return kw.createImportEqualsDeclaration(void 0,!1,i,kw.createExternalModuleReference(o));case 261:return kw.createVariableDeclaration(i,void 0,void 0,Z4(o));default:return gn.assertNever(e,`Unexpected node kind ${e.kind}`)}}(a,c,i,s))}}function Z4(e){return kw.createCallExpression(kw.createIdentifier("require"),void 0,[e])}function e3(e){return 273===e.kind?e.moduleSpecifier:272===e.kind?e.moduleReference.expression:e.initializer.arguments[0]}function t3(e,t){if(EF(e))QN(e.moduleSpecifier)&&t(e);else if(DF(e))HF(e.moduleReference)&&Uu(e.moduleReference.expression)&&t(e);else if(ZE(e))for(const n of e.declarationList.declarations)n.initializer&&qm(n.initializer,!0)&&t(n)}function n3(e,t){var n,r,i,o,a;if(273===e.kind){if((null==(n=e.importClause)?void 0:n.name)&&t(e.importClause),275===(null==(i=null==(r=e.importClause)?void 0:r.namedBindings)?void 0:i.kind)&&t(e.importClause.namedBindings),276===(null==(a=null==(o=e.importClause)?void 0:o.namedBindings)?void 0:a.kind))for(const n of e.importClause.namedBindings.elements)t(n)}else if(272===e.kind)t(e);else if(261===e.kind)if(80===e.name.kind)t(e);else if(207===e.name.kind)for(const n of e.name.elements)fD(n.name)&&t(n)}function r3(e,t,n,r){for(const[i,o]of e){const e=a0(i,wS(r.getCompilerOptions())),a="default"===i.name&&i.parent?1:0;n.addImportForNonExistentExport(e,t,a,i.flags,o)}}function i3(e,t,n,r){var i;return n?!tF(t)&&Lv(t,32)||!!(r&&e.symbol&&(null==(i=e.symbol.exports)?void 0:i.has(r.escapedText))):!!e.symbol&&!!e.symbol.exports&&l3(t).some(t=>e.symbol.exports.has(xc(t)))}function o3(e,t,n,r){if(273===t.kind&&t.importClause){const{name:i,namedBindings:o}=t.importClause;if((!i||r(i))&&(!o||276===o.kind&&0!==o.elements.length&&o.elements.every(e=>r(e.name))))return n.delete(e,t)}n3(t,t=>{t.name&&fD(t.name)&&r(t.name)&&n.delete(e,t)})}function a3(e){return gn.assert(mP(e.parent),"Node parent should be a SourceFile"),C3(e)||ZE(e)}function s3(e){const t=II(e)?Y([kw.createModifier(95)],Lc(e)):void 0;switch(e.kind){case 263:return kw.updateFunctionDeclaration(e,t,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body);case 264:const n=OI(e)?Oc(e):void 0;return kw.updateClassDeclaration(e,Y(n,t),e.name,e.typeParameters,e.heritageClauses,e.members);case 244:return kw.updateVariableStatement(e,t,e.declarationList);case 268:return kw.updateModuleDeclaration(e,t,e.name,e.body);case 267:return kw.updateEnumDeclaration(e,t,e.name,e.members);case 266:return kw.updateTypeAliasDeclaration(e,t,e.name,e.typeParameters,e.type);case 265:return kw.updateInterfaceDeclaration(e,t,e.name,e.typeParameters,e.heritageClauses,e.members);case 272:return kw.updateImportEqualsDeclaration(e,t,e.isTypeOnly,e.name,e.moduleReference);case 245:return gn.fail();default:return gn.assertNever(e,`Unexpected declaration kind ${e.kind}`)}}function c3(e){return kw.createExpressionStatement(kw.createBinaryExpression(kw.createPropertyAccessExpression(kw.createIdentifier("exports"),kw.createIdentifier(e)),64,kw.createIdentifier(e)))}function l3(e){switch(e.kind){case 263:case 264:return[e.name.text];case 244:return U(e.declarationList.declarations,e=>fD(e.name)?e.name.text:void 0);case 268:case 267:case 266:case 265:case 272:return p;case 245:return gn.fail("Can't export an ExpressionStatement");default:return gn.assertNever(e,`Unexpected decl kind ${e.kind}`)}}function _3(e,t,n){switch(e.kind){case 273:{const r=e.importClause;if(!r)return;const i=r.name&&n(r.name)?r.name:void 0,o=r.namedBindings&&function(e,t){if(275===e.kind)return t(e.name)?e:void 0;{const n=e.elements.filter(e=>t(e.name));return n.length?kw.createNamedImports(n):void 0}}(r.namedBindings,n);return i||o?kw.createImportDeclaration(void 0,kw.createImportClause(r.phaseModifier,i,o),$C(t),void 0):void 0}case 272:return n(e.name)?e:void 0;case 261:{const r=function(e,t){switch(e.kind){case 80:return t(e)?e:void 0;case 208:return e;case 207:{const n=e.elements.filter(e=>e.propertyName||!fD(e.name)||t(e.name));return n.length?kw.createObjectBindingPattern(n):void 0}}}(e.name,n);return r?function(e,t,n,r=2){return kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(e,void 0,t,n)],r))}(r,e.type,Z4(t),e.parent.flags):void 0}default:return gn.assertNever(e,`Unexpected import kind ${e.kind}`)}}function u3(e){return tF(e)?at(e.expression.left.name,fD):at(e.name,fD)}function d3(e){switch(e.kind){case 261:return e.parent.parent;case 209:return d3(st(e.parent.parent,e=>hF(e)||hE(e)));default:return e}}function p3(e,t,n,r,i){if(!i3(e,t,i,n))if(i)tF(t)||r.insertExportModifier(e,t);else{const n=l3(t);0!==n.length&&r.insertNodesAfter(e,t,n.map(c3))}}function f3(e,t,n,r){const i=t.getTypeChecker();if(r){const t=y3(e,r.all,i),s=Lo(e.fileName),c=sT(e.fileName),l=Uo(s,function(e,t,n,r){let i=e;for(let o=1;;o++){const a=Uo(n,i+t);if(!r.fileExists(a))return i;i=`${e}.${o}`}}((o=t.oldFileImportsFromTargetFile,a=t.movedSymbols,ud(o,SY)||ud(a,SY)||"newFile"),c,s,n))+c;return l}var o,a;return""}function m3(e){const t=function(e){const{file:t}=e,n=YQ(n0(e)),{statements:r}=t;let i=w(r,e=>e.end>n.pos);if(-1===i)return;const o=w3(t,r[i]);o&&(i=o.start);let a=w(r,e=>e.end>=n.end,i);-1!==a&&n.end<=r[a].getStart()&&a--;const s=w3(t,r[a]);return s&&(a=s.end),{toMove:r.slice(i,-1===a?r.length:a+1),afterLast:-1===a?void 0:r[a+1]}}(e);if(void 0===t)return;const n=[],r=[],{toMove:i,afterLast:o}=t;return Q(i,h3,(e,t)=>{for(let r=e;r!!(2&e.transformFlags))}function h3(e){return!function(e){switch(e.kind){case 273:return!0;case 272:return!Lv(e,32);case 244:return e.declarationList.declarations.every(e=>!!e.initializer&&qm(e.initializer,!0));default:return!1}}(e)&&!bf(e)}function y3(e,t,n,r=new Set,i){var o;const a=new Set,s=new Map,c=new Map,l=function(e){if(void 0===e)return;const t=n.getJsxNamespace(e),r=n.resolveName(t,e,1920,!0);return r&&X(r.declarations,x3)?r:void 0}(g3(t));l&&s.set(l,[!1,at(null==(o=l.declarations)?void 0:o[0],e=>BF(e)||FF(e)||jF(e)||DF(e)||hE(e)||hF(e))]);for(const e of t)b3(e,e=>{a.add(gn.checkDefined(tF(e)?n.getSymbolAtLocation(e.expression.left):e.symbol,"Need a symbol here"))});const _=new Set;for(const o of t)v3(o,n,i,(t,i)=>{if(!X(t.declarations))return;if(r.has(px(t,n)))return void _.add(t);const o=T(t.declarations,x3);if(o){const e=s.get(t);s.set(t,[(void 0===e||e)&&i,at(o,e=>BF(e)||FF(e)||jF(e)||DF(e)||hE(e)||hF(e))])}else!a.has(t)&&k(t.declarations,t=>{return k3(t)&&(hF(n=t)?n.parent.parent.parent:n.parent)===e;var n})&&c.set(t,i)});for(const e of s.keys())_.add(e);const u=new Map;for(const r of e.statements)D(t,r)||(l&&2&r.transformFlags&&_.delete(l),v3(r,n,i,(e,t)=>{a.has(e)&&u.set(e,t),_.delete(e)}));return{movedSymbols:a,targetFileImportsFromOldFile:c,oldFileImportsFromTargetFile:u,oldImportsNeededByTargetFile:s,unusedImportsFromOldFile:_}}function v3(e,t,n,r){e.forEachChild(function e(i){if(fD(i)&&!gh(i)){if(n&&!ix(n,i))return;const e=t.getSymbolAtLocation(i);e&&r(e,DT(i))}else i.forEachChild(e)})}function b3(e,t){switch(e.kind){case 263:case 264:case 268:case 267:case 266:case 265:case 272:return t(e);case 244:return y(e.declarationList.declarations,e=>T3(e.name,t));case 245:{const{expression:n}=e;return LE(n)&&1===cg(n)?t(e):void 0}}}function x3(e){switch(e.kind){case 272:case 277:case 274:case 275:return!0;case 261:return S3(e);case 209:return hF(e.parent.parent)&&S3(e.parent.parent);default:return!1}}function S3(e){return mP(e.parent.parent.parent)&&!!e.initializer&&qm(e.initializer,!0)}function k3(e){return C3(e)&&mP(e.parent)||hF(e)&&mP(e.parent.parent.parent)}function T3(e,t){switch(e.kind){case 80:return t(st(e.parent,e=>hF(e)||hE(e)));case 208:case 207:return y(e.elements,e=>zE(e)?void 0:T3(e.name,t));default:return gn.assertNever(e,`Unexpected name kind ${e.kind}`)}}function C3(e){switch(e.kind){case 263:case 264:case 268:case 267:case 266:case 265:case 272:return!0;default:return!1}}function w3(e,t){if(d_(t)){const n=t.symbol.declarations;if(void 0===n||m(n)<=1||!D(n,t))return;const r=n[0],i=n[m(n)-1],o=U(n,t=>wd(t)===e&&bu(t)?t:void 0),a=w(e.statements,e=>e.end>=i.end);return{toMove:o,start:w(e.statements,e=>e.end>=r.end),end:a}}}function N3(e,t,n){const r=new Set;for(const t of e.imports){const e=wg(t);if(EF(e)&&e.importClause&&e.importClause.namedBindings&&RF(e.importClause.namedBindings))for(const t of e.importClause.namedBindings.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(px(e,n))}if(Um(e.parent)&&mE(e.parent.name))for(const t of e.parent.name.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(px(e,n))}}for(const i of t)v3(i,n,void 0,t=>{const i=px(t,n);i.valueDeclaration&&wd(i.valueDeclaration).path===e.path&&r.add(i)});return r}function D3(e){return void 0!==e.error}function E3(e,t){return!t||e.substr(0,t.length)===t}function F3(e,t,n,r){return!bE(e)||y_(t)||n.resolveName(e.name.text,e,111551,!1)||mD(e.name)||Tc(e.name)?yZ(y_(t)?"newProperty":"newLocal",r):e.name.text}function P3(e,t,n,r,i,o){t.forEach(([e,t],n)=>{var i;const a=px(n,r);r.isUnknownSymbol(a)?o.addVerbatimImport(gn.checkDefined(t??yc(null==(i=n.declarations)?void 0:i[0],Ap))):void 0===a.parent?(gn.assert(void 0!==t,"expected module symbol to have a declaration"),o.addImportForModuleSymbol(n,e,t)):o.addImportFromExportedSymbol(a,e,t)}),r3(n,e.fileName,o,i)}v4(V4,{kinds:[$4.kind],getAvailableActions:function(e,t){const n=e.file,r=m3(e);if(!t)return p;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=yc(dQ(n,e.startPosition),x0),r=yc(dQ(n,e.endPosition),x0);if(t&&!mP(t)&&r&&!mP(r))return p}if(e.preferences.allowTextChangesInNewFiles&&r){const e={start:{line:Ha(n,r.all[0].getStart(n)).line,offset:Ha(n,r.all[0].getStart(n)).character},end:{line:Ha(n,Te(r.all).end).line,offset:Ha(n,Te(r.all).end).character}};return[{name:V4,description:W4,actions:[{...$4,range:e}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:V4,description:W4,actions:[{...$4,notApplicableReason:Yx(ha.Selection_is_not_a_valid_statement_or_statements)}]}]:p},getEditsForAction:function(e,t,n){gn.assert(t===V4,"Wrong refactor invoked");const r=gn.checkDefined(m3(e)),{host:i,program:o}=e;gn.assert(n,"No interactive refactor arguments available");const a=n.targetFile;if(qk(a)||Uk(a)){if(i.fileExists(a)&&void 0===o.getSourceFile(a))return K4(Yx(ha.Cannot_move_statements_to_the_selected_file));const t=sde.ChangeTracker.with(e,t=>function(e,t,n,r,i,o,a,s){const c=r.getTypeChecker(),l=!a.fileExists(n),_=l?S0(n,t.externalModuleIndicator?99:t.commonJsModuleIndicator?1:void 0,r,a):gn.checkDefined(r.getSourceFile(n)),u=$7.createImportAdder(t,e.program,e.preferences,e.host),d=$7.createImportAdder(_,e.program,e.preferences,e.host);H4(t,_,y3(t,i.all,c,l?void 0:N3(_,i.all,c)),o,i,r,a,s,d,u),l&&G4(r,o,t.fileName,n,Vy(a))}(e,e.file,n.targetFile,e.program,r,t,e.host,e.preferences));return{edits:t,renameFilename:void 0,renameLocation:void 0}}return K4(Yx(ha.Cannot_move_to_file_selected_file_is_invalid))}});var A3="Inline variable",I3=Yx(ha.Inline_variable),O3={name:A3,description:I3,kind:"refactor.inline.variable"};function L3(e,t,n,r){var i,o;const a=r.getTypeChecker(),s=_Q(e,t),c=s.parent;if(fD(s)){if(cx(c)&&Jf(c)&&fD(c.name)){if(1!==(null==(i=a.getMergedSymbol(c.symbol).declarations)?void 0:i.length))return{error:Yx(ha.Variables_with_multiple_declarations_cannot_be_inlined)};if(j3(c))return;const t=M3(c,a,e);return t&&{references:t,declaration:c,replacement:c.initializer}}if(n){let t=a.resolveName(s.text,s,111551,!1);if(t=t&&a.getMergedSymbol(t),1!==(null==(o=null==t?void 0:t.declarations)?void 0:o.length))return{error:Yx(ha.Variables_with_multiple_declarations_cannot_be_inlined)};const n=t.declarations[0];if(!cx(n)||!Jf(n)||!fD(n.name))return;if(j3(n))return;const r=M3(n,a,e);return r&&{references:r,declaration:n,replacement:n.initializer}}return{error:Yx(ha.Could_not_find_variable_to_inline)}}}function j3(e){return X(st(e.parent.parent,ZE).modifiers,gD)}function M3(e,t,n){const r=[],i=Bce.Core.eachSymbolReferenceInFile(e.name,t,n,t=>!(!Bce.isWriteAccessForReference(t)||dP(t.parent))||(!(!UF(t.parent)&&!JF(t.parent))||(!!GD(t.parent)||(!!Bs(e,t.pos)||void r.push(t)))));return 0===r.length||i?void 0:r}function R3(e,t){t=$C(t);const{parent:n}=e;return Q_(n)&&(uy(t){for(const t of a){const r=QN(c)&&fD(t)&&_h(t.parent);r&&XE(r)&&!TE(r.parent.parent)?B3(e,n,r,c):e.replaceNode(n,t,R3(t,c))}e.delete(n,s)})}}});var J3="Move to a new file",z3=Yx(ha.Move_to_a_new_file),q3={name:J3,description:z3,kind:"refactor.move.newFile"};v4(J3,{kinds:[q3.kind],getAvailableActions:function(e){const t=m3(e),n=e.file;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=yc(dQ(n,e.startPosition),x0),r=yc(dQ(n,e.endPosition),x0);if(t&&!mP(t)&&r&&!mP(r))return p}if(e.preferences.allowTextChangesInNewFiles&&t){const n=e.file,r={start:{line:Ha(n,t.all[0].getStart(n)).line,offset:Ha(n,t.all[0].getStart(n)).character},end:{line:Ha(n,Te(t.all).end).line,offset:Ha(n,Te(t.all).end).character}};return[{name:J3,description:z3,actions:[{...q3,range:r}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:J3,description:z3,actions:[{...q3,notApplicableReason:Yx(ha.Selection_is_not_a_valid_statement_or_statements)}]}]:p},getEditsForAction:function(e,t){gn.assert(t===J3,"Wrong refactor invoked");const n=gn.checkDefined(m3(e)),r=sde.ChangeTracker.with(e,t=>function(e,t,n,r,i,o,a){const s=t.getTypeChecker(),c=y3(e,n.all,s),l=f3(e,t,i,n),_=S0(l,e.externalModuleIndicator?99:e.commonJsModuleIndicator?1:void 0,t,i),u=$7.createImportAdder(e,o.program,o.preferences,o.host),d=$7.createImportAdder(_,o.program,o.preferences,o.host);H4(e,_,c,r,n,t,i,a,d,u),G4(t,r,e.fileName,l,Vy(i))}(e.file,e.program,n,t,e.host,e,e.preferences));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var U3={},V3="Convert overload list to single signature",W3=Yx(ha.Convert_overload_list_to_single_signature),$3={name:V3,description:W3,kind:"refactor.rewrite.function.overloadList"};function K3(e){switch(e.kind){case 174:case 175:case 180:case 177:case 181:case 263:return!0}return!1}function H3(e,t,n){const r=yc(dQ(e,t),K3);if(!r)return;if(d_(r)&&r.body&&zX(r.body,t))return;const i=n.getTypeChecker(),o=r.symbol;if(!o)return;const a=o.declarations;if(m(a)<=1)return;if(!k(a,t=>wd(t)===e))return;if(!K3(a[0]))return;const s=a[0].kind;if(!k(a,e=>e.kind===s))return;const c=a;if(X(c,e=>!!e.typeParameters||X(e.parameters,e=>!!e.modifiers||!fD(e.name))))return;const l=U(c,e=>i.getSignatureFromDeclaration(e));if(m(l)!==m(a))return;const _=i.getReturnTypeOfSignature(l[0]);return k(l,e=>i.getReturnTypeOfSignature(e)===_)?c:void 0}v4(V3,{kinds:[$3.kind],getEditsForAction:function(e){const{file:t,startPosition:n,program:r}=e,i=H3(t,n,r);if(!i)return;const o=r.getTypeChecker(),a=i[i.length-1];let s=a;switch(a.kind){case 174:s=kw.updateMethodSignature(a,a.modifiers,a.name,a.questionToken,a.typeParameters,c(i),a.type);break;case 175:s=kw.updateMethodDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.questionToken,a.typeParameters,c(i),a.type,a.body);break;case 180:s=kw.updateCallSignature(a,a.typeParameters,c(i),a.type);break;case 177:s=kw.updateConstructorDeclaration(a,a.modifiers,c(i),a.body);break;case 181:s=kw.updateConstructSignature(a,a.typeParameters,c(i),a.type);break;case 263:s=kw.updateFunctionDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.typeParameters,c(i),a.type,a.body);break;default:return gn.failBadSyntaxKind(a,"Unhandled signature kind in overload list conversion refactoring")}if(s===a)return;return{renameFilename:void 0,renameLocation:void 0,edits:sde.ChangeTracker.with(e,e=>{e.replaceNodeRange(t,i[0],i[i.length-1],s)})};function c(e){const t=e[e.length-1];return d_(t)&&t.body&&(e=e.slice(0,e.length-1)),kw.createNodeArray([kw.createParameterDeclaration(void 0,kw.createToken(26),"args",void 0,kw.createUnionTypeNode(O(e,l)))])}function l(e){const t=O(e.parameters,_);return Ew(kw.createTupleTypeNode(t),X(t,e=>!!m(zw(e)))?0:1)}function _(e){gn.assert(fD(e.name));const t=AI(kw.createNamedTupleMember(e.dotDotDotToken,e.name,e.questionToken,e.type||kw.createKeywordTypeNode(133)),e),n=e.symbol&&e.symbol.getDocumentationComment(o);if(n){const e=o7(n);e.length&&qw(t,[{text:`*\n${e.split("\n").map(e=>` * ${e}`).join("\n")}\n `,kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return t}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r}=e;return H3(t,n,r)?[{name:V3,description:W3,actions:[$3]}]:p}});var G3="Add or remove braces in an arrow function",X3=Yx(ha.Add_or_remove_braces_in_an_arrow_function),Q3={name:"Add braces to arrow function",description:Yx(ha.Add_braces_to_arrow_function),kind:"refactor.rewrite.arrow.braces.add"},Y3={name:"Remove braces from arrow function",description:Yx(ha.Remove_braces_from_arrow_function),kind:"refactor.rewrite.arrow.braces.remove"};function Z3(e,t,n=!0,r){const i=dQ(e,t),o=tm(i);if(!o)return{error:Yx(ha.Could_not_find_a_containing_arrow_function)};if(!DE(o))return{error:Yx(ha.Containing_function_is_not_an_arrow_function)};if(ix(o,i)&&(!ix(o.body,i)||n)){if(E3(Q3.kind,r)&&Q_(o.body))return{func:o,addBraces:!0,expression:o.body};if(E3(Y3.kind,r)&&YE(o.body)&&1===o.body.statements.length){const e=xe(o.body.statements);if(_F(e)){return{func:o,addBraces:!1,expression:e.expression&&vE(jx(e.expression,!1))?kw.createParenthesizedExpression(e.expression):e.expression,returnStatement:e}}}}}v4(G3,{kinds:[Y3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=Z3(n,r);gn.assert(i&&!D3(i),"Expected applicable refactor info");const{expression:o,returnStatement:a,func:s}=i;let c;if(t===Q3.name){const e=kw.createReturnStatement(o);c=kw.createBlock([e],!0),bZ(o,e,n,3,!0)}else if(t===Y3.name&&a){const e=o||kw.createVoidZero();c=CZ(e)?kw.createParenthesizedExpression(e):e,SZ(a,c,n,3,!1),bZ(a,c,n,3,!1),xZ(a,c,n,3,!1)}else gn.fail("invalid action");return{renameFilename:void 0,renameLocation:void 0,edits:sde.ChangeTracker.with(e,e=>{e.replaceNode(n,s.body,c)})}},getAvailableActions:function(e){const{file:t,startPosition:n,triggerReason:r}=e,i=Z3(t,n,"invoked"===r);if(!i)return p;if(!D3(i))return[{name:G3,description:X3,actions:[i.addBraces?Q3:Y3]}];if(e.preferences.provideRefactorNotApplicableReason)return[{name:G3,description:X3,actions:[{...Q3,notApplicableReason:i.error},{...Y3,notApplicableReason:i.error}]}];return p}});var e6={},t6="Convert arrow function or function expression",n6=Yx(ha.Convert_arrow_function_or_function_expression),r6={name:"Convert to anonymous function",description:Yx(ha.Convert_to_anonymous_function),kind:"refactor.rewrite.function.anonymous"},i6={name:"Convert to named function",description:Yx(ha.Convert_to_named_function),kind:"refactor.rewrite.function.named"},o6={name:"Convert to arrow function",description:Yx(ha.Convert_to_arrow_function),kind:"refactor.rewrite.function.arrow"};function a6(e){let t=!1;return e.forEachChild(function e(n){MX(n)?t=!0:y_(n)||vF(n)||NE(n)||sO(n,e)}),t}function s6(e,t,n){const r=dQ(e,t),i=n.getTypeChecker(),o=function(e,t,n){if(!function(e){return hF(e)||yF(e)&&1===e.declarations.length}(n))return;const r=(hF(n)?n:xe(n.declarations)).initializer;if(r&&(DE(r)||NE(r)&&!l6(e,t,r)))return r;return}(e,i,r.parent);if(o&&!a6(o.body)&&!i.containsArgumentsReference(o))return{selectedVariableDeclaration:!0,func:o};const a=tm(r);if(a&&(NE(a)||DE(a))&&!ix(a.body,r)&&!a6(a.body)&&!i.containsArgumentsReference(a)){if(NE(a)&&l6(e,i,a))return;return{selectedVariableDeclaration:!1,func:a}}}function c6(e){if(Q_(e)){const t=kw.createReturnStatement(e),n=e.getSourceFile();return AI(t,e),QC(t),SZ(e,t,n,void 0,!0),kw.createBlock([t],!0)}return e}function l6(e,t,n){return!!n.name&&Bce.Core.isSymbolReferencedInFile(n.name,t,e)}v4(t6,{kinds:[r6.kind,i6.kind,o6.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r,program:i}=e,o=s6(n,r,i);if(!o)return;const{func:a}=o,s=[];switch(t){case r6.name:s.push(...function(e,t){const{file:n}=e,r=c6(t.body),i=kw.createFunctionExpression(t.modifiers,t.asteriskToken,void 0,t.typeParameters,t.parameters,t.type,r);return sde.ChangeTracker.with(e,e=>e.replaceNode(n,t,i))}(e,a));break;case i6.name:const t=function(e){const t=e.parent;if(!hF(t)||!Jf(t))return;const n=t.parent,r=n.parent;return yF(n)&&ZE(r)&&fD(t.name)?{variableDeclaration:t,variableDeclarationList:n,statement:r,name:t.name}:void 0}(a);if(!t)return;s.push(...function(e,t,n){const{file:r}=e,i=c6(t.body),{variableDeclaration:o,variableDeclarationList:a,statement:s,name:c}=n;YC(s);const l=32&uc(o)|Kv(t),_=kw.createModifiersFromModifierFlags(l),u=kw.createFunctionDeclaration(m(_)?_:void 0,t.asteriskToken,c,t.typeParameters,t.parameters,t.type,i);return 1===a.declarations.length?sde.ChangeTracker.with(e,e=>e.replaceNode(r,s,u)):sde.ChangeTracker.with(e,e=>{e.delete(r,o),e.insertNodeAfter(r,s,u)})}(e,a,t));break;case o6.name:if(!NE(a))return;s.push(...function(e,t){const{file:n}=e,r=t.body.statements,i=r[0];let o;!function(e,t){return 1===e.statements.length&&_F(t)&&!!t.expression}(t.body,i)?o=t.body:(o=i.expression,QC(o),hZ(i,o));const a=kw.createArrowFunction(t.modifiers,t.typeParameters,t.parameters,t.type,kw.createToken(39),o);return sde.ChangeTracker.with(e,e=>e.replaceNode(n,t,a))}(e,a));break;default:return gn.fail("invalid action")}return{renameFilename:void 0,renameLocation:void 0,edits:s}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r,kind:i}=e,o=s6(t,n,r);if(!o)return p;const{selectedVariableDeclaration:a,func:s}=o,c=[],l=[];if(E3(i6.kind,i)){const e=a||DE(s)&&hF(s.parent)?void 0:Yx(ha.Could_not_convert_to_named_function);e?l.push({...i6,notApplicableReason:e}):c.push(i6)}if(E3(r6.kind,i)){const e=!a&&DE(s)?void 0:Yx(ha.Could_not_convert_to_anonymous_function);e?l.push({...r6,notApplicableReason:e}):c.push(r6)}if(E3(o6.kind,i)){const e=NE(s)?void 0:Yx(ha.Could_not_convert_to_arrow_function);e?l.push({...o6,notApplicableReason:e}):c.push(o6)}return[{name:t6,description:n6,actions:0===c.length&&e.preferences.provideRefactorNotApplicableReason?l:c}]}});var _6={},u6="Convert parameters to destructured object",d6=Yx(ha.Convert_parameters_to_destructured_object),p6={name:u6,description:d6,kind:"refactor.rewrite.parameters.toDestructured"};function f6(e,t){const n=v7(e);if(n){const e=t.getContextualTypeForObjectLiteralElement(n),r=null==e?void 0:e.getSymbol();if(r&&!(6&ux(r)))return r}}function m6(e){const t=e.node;return BF(t.parent)||FF(t.parent)||DF(t.parent)||jF(t.parent)||UF(t.parent)||JF(t.parent)?t:void 0}function g6(e){if(hu(e.node.parent))return e.node}function h6(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 214:case 215:const e=at(n,U_);if(e&&e.expression===t)return e;break;case 212:const r=at(n,bE);if(r&&r.parent&&r.name===t){const e=at(r.parent,U_);if(e&&e.expression===r)return e}break;case 213:const i=at(n,xE);if(i&&i.parent&&i.argumentExpression===t){const e=at(i.parent,U_);if(e&&e.expression===i)return e}}}}function y6(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 212:const e=at(n,bE);if(e&&e.expression===t)return e;break;case 213:const r=at(n,xE);if(r&&r.expression===t)return r}}}function v6(e){const t=e.node;if(2===lX(t)||pb(t.parent))return t}function b6(e,t,n){const r=uQ(e,t),i=nm(r);if(!function(e){const t=yc(e,Fu);if(t){const e=yc(t,e=>!Fu(e));return!!e&&d_(e)}return!1}(r))return!(i&&function(e,t){var n;if(!function(e,t){return function(e){if(C6(e))return e.length-1;return e.length}(e)>=1&&k(e,e=>function(e,t){if($u(e)){const n=t.getTypeAtLocation(e);if(!t.isArrayType(n)&&!t.isTupleType(n))return!1}return!e.modifiers&&fD(e.name)}(e,t))}(e.parameters,t))return!1;switch(e.kind){case 263:return k6(e)&&S6(e,t);case 175:if(vE(e.parent)){const r=f6(e.name,t);return 1===(null==(n=null==r?void 0:r.declarations)?void 0:n.length)&&S6(e,t)}return S6(e,t);case 177:return bF(e.parent)?k6(e.parent)&&S6(e,t):T6(e.parent.parent)&&S6(e,t);case 219:case 220:return T6(e.parent)}return!1}(i,n)&&ix(i,r))||i.body&&ix(i.body,r)?void 0:i}function x6(e){return jD(e)&&(xF(e.parent)||XD(e.parent))}function S6(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function k6(e){if(!e.name){return!!EY(e,90)}return!0}function T6(e){return hF(e)&&pf(e)&&fD(e.name)&&!e.type}function C6(e){return e.length>0&&MX(e[0].name)}function w6(e){return C6(e)&&(e=kw.createNodeArray(e.slice(1),e.hasTrailingComma)),e}function N6(e,t){const n=w6(e.parameters),r=$u(Te(n)),i=O(r?t.slice(0,n.length-1):t,(e,t)=>{const r=E6(n[t]),i=(o=r,fD(a=e)&&Gh(a)===o?kw.createShorthandPropertyAssignment(o):kw.createPropertyAssignment(o,a));var o,a;return QC(i.name),uP(i)&&QC(i.initializer),hZ(e,i),i});if(r&&t.length>=n.length){const e=t.slice(n.length-1),r=kw.createPropertyAssignment(E6(Te(n)),kw.createArrayLiteralExpression(e));i.push(r)}return kw.createObjectLiteralExpression(i,!1)}function D6(e,t,n){const r=t.getTypeChecker(),i=w6(e.parameters),o=O(i,function(e){const t=kw.createBindingElement(void 0,void 0,E6(e),$u(e)&&u(e)?kw.createArrayLiteralExpression():e.initializer);QC(t),e.initializer&&t.initializer&&hZ(e.initializer,t.initializer);return t}),a=kw.createObjectBindingPattern(o),s=function(e){const t=O(e,_);return Fw(kw.createTypeLiteralNode(t),1)}(i);let c;k(i,u)&&(c=kw.createObjectLiteralExpression());const l=kw.createParameterDeclaration(void 0,void 0,a,void 0,s,c);if(C6(e.parameters)){const t=e.parameters[0],n=kw.createParameterDeclaration(void 0,void 0,t.name,void 0,t.type);return QC(n.name),hZ(t.name,n.name),t.type&&(QC(n.type),hZ(t.type,n.type)),kw.createNodeArray([n,l])}return kw.createNodeArray([l]);function _(e){let i=e.type;var o;i||!e.initializer&&!$u(e)||(o=e,i=IZ(r.getTypeAtLocation(o),o,t,n));const a=kw.createPropertySignature(void 0,E6(e),u(e)?kw.createToken(58):e.questionToken,i);return QC(a),hZ(e.name,a.name),e.type&&a.type&&hZ(e.type,a.type),a}function u(e){if($u(e)){const t=r.getTypeAtLocation(e);return!r.isTupleType(t)}return r.isOptionalParameter(e)}}function E6(e){return Gh(e.name)}v4(u6,{kinds:[p6.kind],getEditsForAction:function(e,t){gn.assert(t===u6,"Unexpected action name");const{file:n,startPosition:r,program:i,cancellationToken:o,host:a}=e,s=b6(n,r,i.getTypeChecker());if(!s||!o)return;const c=function(e,t,n){const r=function(e){switch(e.kind){case 263:if(e.name)return[e.name];return[gn.checkDefined(EY(e,90),"Nameless function declaration should be a default export")];case 175:return[e.name];case 177:const t=gn.checkDefined(YX(e,137,e.getSourceFile()),"Constructor declaration should have constructor keyword");if(232===e.parent.kind){return[e.parent.parent.name,t]}return[t];case 220:return[e.parent.name];case 219:return e.name?[e.name,e.parent.name]:[e.parent.name];default:return gn.assertNever(e,`Unexpected function declaration kind ${e.kind}`)}}(e),i=BD(e)?function(e){switch(e.parent.kind){case 264:const t=e.parent;if(t.name)return[t.name];return[gn.checkDefined(EY(t,90),"Nameless class declaration should be a default export")];case 232:const n=e.parent,r=e.parent.parent,i=n.name;return i?[i,r.name]:[r.name]}}(e):[],o=ne([...r,...i],bt),a=t.getTypeChecker(),s=R(o,e=>Bce.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n)),c=l(s);k(c.declarations,e=>D(o,e))||(c.valid=!1);return c;function l(t){const n={accessExpressions:[],typeUsages:[]},o={functionCalls:[],declarations:[],classReferences:n,valid:!0},s=O(r,_),c=O(i,_),l=BD(e),u=O(r,e=>f6(e,a));for(const r of t){if(r.kind===Bce.EntryKind.Span){o.valid=!1;continue}if(D(u,_(r.node))){if(x6(r.node.parent)){o.signature=r.node.parent;continue}const e=h6(r);if(e){o.functionCalls.push(e);continue}}const t=f6(r.node,a);if(t&&D(u,t)){const e=g6(r);if(e){o.declarations.push(e);continue}}if(D(s,_(r.node))||dX(r.node)){if(m6(r))continue;const e=g6(r);if(e){o.declarations.push(e);continue}const t=h6(r);if(t){o.functionCalls.push(t);continue}}if(l&&D(c,_(r.node))){if(m6(r))continue;const t=g6(r);if(t){o.declarations.push(t);continue}const i=y6(r);if(i){n.accessExpressions.push(i);continue}if(bF(e.parent)){const e=v6(r);if(e){n.typeUsages.push(e);continue}}}o.valid=!1}return o}function _(e){const t=a.getSymbolAtLocation(e);return t&&dZ(t,a)}}(s,i,o);if(c.valid){const t=sde.ChangeTracker.with(e,e=>function(e,t,n,r,i,o){const a=o.signature,s=O(D6(i,t,n),e=>$C(e));if(a){l(a,O(D6(a,t,n),e=>$C(e)))}l(i,s);const c=oe(o.functionCalls,(e,t)=>Tt(e.pos,t.pos));for(const e of c)if(e.arguments&&e.arguments.length){const t=$C(N6(i,e.arguments),!0);r.replaceNodeRange(wd(e),xe(e.arguments),Te(e.arguments),t,{leadingTriviaOption:sde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:sde.TrailingTriviaOption.Include})}function l(t,n){r.replaceNodeRangeWithNodes(e,xe(t.parameters),Te(t.parameters),n,{joiner:", ",indentation:0,leadingTriviaOption:sde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:sde.TrailingTriviaOption.Include})}}(n,i,a,e,s,c));return{renameFilename:void 0,renameLocation:void 0,edits:t}}return{edits:[]}},getAvailableActions:function(e){const{file:t,startPosition:n}=e;if(jm(t))return p;return b6(t,n,e.program.getTypeChecker())?[{name:u6,description:d6,actions:[p6]}]:p}});var F6={},P6="Convert to template string",A6=Yx(ha.Convert_to_template_string),I6={name:P6,description:A6,kind:"refactor.rewrite.string"};function O6(e,t){const n=dQ(e,t),r=j6(n);return!M6(r).isValidConcatenation&&wE(r.parent)&&LE(r.parent.parent)?r.parent.parent:n}function L6(e,t){const n=j6(t),r=e.file,i=function({nodes:e,operators:t},n){const r=R6(t,n),i=B6(e,n,r),[o,a,s,c]=q6(0,e);if(o===e.length){const e=kw.createNoSubstitutionTemplateLiteral(a,s);return i(c,e),e}const l=[],_=kw.createTemplateHead(a,s);i(c,_);for(let t=o;t{U6(e);const r=t===n.templateSpans.length-1,i=e.literal.text+(r?a:""),o=z6(e.literal)+(r?s:"");return kw.createTemplateSpan(e.expression,_&&r?kw.createTemplateTail(i,o):kw.createTemplateMiddle(i,o))});l.push(...e)}else{const e=_?kw.createTemplateTail(a,s):kw.createTemplateMiddle(a,s);i(c,e),l.push(kw.createTemplateSpan(n,e))}}return kw.createTemplateExpression(_,l)}(M6(n),r),o=ys(r.text,n.end);if(o){const t=o[o.length-1],a={pos:o[0].pos,end:t.end};return sde.ChangeTracker.with(e,e=>{e.deleteRange(r,a),e.replaceNode(r,n,i)})}return sde.ChangeTracker.with(e,e=>e.replaceNode(r,n,i))}function j6(e){return yc(e.parent,e=>{switch(e.kind){case 212:case 213:return!1;case 229:case 227:return!(LE(e.parent)&&(t=e.parent,64!==t.operatorToken.kind&&65!==t.operatorToken.kind));default:return"quit"}var t})||e}function M6(e){const t=e=>{if(!LE(e))return{nodes:[e],operators:[],validOperators:!0,hasString:QN(e)||eD(e)};const{nodes:n,operators:r,hasString:i,validOperators:o}=t(e.left);if(!(i||QN(e.right)||ME(e.right)))return{nodes:[e],operators:[],hasString:!1,validOperators:!0};const a=40===e.operatorToken.kind,s=o&&a;return n.push(e.right),r.push(e.operatorToken),{nodes:n,operators:r,hasString:!0,validOperators:s}},{nodes:n,operators:r,validOperators:i,hasString:o}=t(e);return{nodes:n,operators:r,isValidConcatenation:i&&o}}v4(P6,{kinds:[I6.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=O6(n,r);if(t===A6)return{edits:L6(e,i)};return gn.fail("invalid action")},getAvailableActions:function(e){const{file:t,startPosition:n}=e,r=j6(O6(t,n)),i=QN(r),o={name:P6,description:A6,actions:[]};if(i&&"invoked"!==e.triggerReason)return p;if(Nm(r)&&(i||LE(r)&&M6(r).isValidConcatenation))return o.actions.push(I6),[o];if(e.preferences.provideRefactorNotApplicableReason)return o.actions.push({...I6,notApplicableReason:Yx(ha.Can_only_convert_string_concatenations_and_string_literals)}),[o];return p}});var R6=(e,t)=>(n,r)=>{n(r,i)=>{for(;r.length>0;){const o=r.shift();xZ(e[o],i,t,3,!1),n(o,i)}};function J6(e){return e.replace(/\\.|[$`]/g,e=>"\\"===e[0]?e:"\\"+e)}function z6(e){const t=tD(e)||nD(e)?-2:-1;return rp(e).slice(1,t)}function q6(e,t){const n=[];let r="",i="";for(;e=a.pos?s.getEnd():a.getEnd()),l=o?function(e){for(;e.parent;){if(X6(e)&&!X6(e.parent))return e;e=e.parent}return}(a):function(e,t){for(;e.parent;){if(X6(e)&&0!==t.length&&e.end>=t.start+t.length)return e;e=e.parent}return}(a,c),_=l&&X6(l)?function(e){if(G6(e))return e;if(ZE(e)){const t=Bg(e),n=null==t?void 0:t.initializer;return n&&G6(n)?n:void 0}return e.expression&&G6(e.expression)?e.expression:void 0}(l):void 0;if(!_)return{error:Yx(ha.Could_not_find_convertible_access_expression)};const u=r.getTypeChecker();return jE(_)?function(e,t){const n=e.condition,r=t5(e.whenTrue);if(!r||t.isNullableType(t.getTypeAtLocation(r)))return{error:Yx(ha.Could_not_find_convertible_access_expression)};if((bE(n)||fD(n))&&Z6(n,r.expression))return{finalExpression:r,occurrences:[n],expression:e};if(LE(n)){const t=Y6(r.expression,n);return t?{finalExpression:r,occurrences:t,expression:e}:{error:Yx(ha.Could_not_find_matching_access_expressions)}}}(_,u):function(e){if(56!==e.operatorToken.kind)return{error:Yx(ha.Can_only_convert_logical_AND_access_chains)};const t=t5(e.right);if(!t)return{error:Yx(ha.Could_not_find_convertible_access_expression)};const n=Y6(t.expression,e.left);return n?{finalExpression:t,occurrences:n,expression:e}:{error:Yx(ha.Could_not_find_matching_access_expressions)}}(_)}function Y6(e,t){const n=[];for(;LE(t)&&56===t.operatorToken.kind;){const r=Z6(ph(e),ph(t.right));if(!r)break;n.push(r),e=r,t=t.left}const r=Z6(e,t);return r&&n.push(r),n.length>0?n:void 0}function Z6(e,t){if(fD(t)||bE(t)||xE(t))return function(e,t){for(;(SE(e)||bE(e)||xE(e))&&e5(e)!==e5(t);)e=e.expression;for(;bE(e)&&bE(t)||xE(e)&&xE(t);){if(e5(e)!==e5(t))return!1;e=e.expression,t=t.expression}return fD(e)&&fD(t)&&e.getText()===t.getText()}(e,t)?t:void 0}function e5(e){return fD(e)||Uh(e)?e.getText():bE(e)?e5(e.name):xE(e)?e5(e.argumentExpression):void 0}function t5(e){return LE(e=ph(e))?t5(e.left):(bE(e)||xE(e)||SE(e))&&!Tl(e)?e:void 0}function n5(e,t,n){if(bE(t)||xE(t)||SE(t)){const r=n5(e,t.expression,n),i=n.length>0?n[n.length-1]:void 0,o=(null==i?void 0:i.getText())===t.expression.getText();if(o&&n.pop(),SE(t))return o?kw.createCallChain(r,kw.createToken(29),t.typeArguments,t.arguments):kw.createCallChain(r,t.questionDotToken,t.typeArguments,t.arguments);if(bE(t))return o?kw.createPropertyAccessChain(r,kw.createToken(29),t.name):kw.createPropertyAccessChain(r,t.questionDotToken,t.name);if(xE(t))return o?kw.createElementAccessChain(r,kw.createToken(29),t.argumentExpression):kw.createElementAccessChain(r,t.questionDotToken,t.argumentExpression)}return t}v4($6,{kinds:[H6.kind],getEditsForAction:function(e,t){const n=Q6(e);gn.assert(n&&!D3(n),"Expected applicable refactor info");return{edits:sde.ChangeTracker.with(e,t=>function(e,t,n,r){const{finalExpression:i,occurrences:o,expression:a}=r,s=o[o.length-1],c=n5(t,i,o);c&&(bE(c)||xE(c)||SE(c))&&(LE(a)?n.replaceNodeRange(e,s,i,c):jE(a)&&n.replaceNode(e,a,kw.createBinaryExpression(c,kw.createToken(61),a.whenFalse)))}(e.file,e.program.getTypeChecker(),t,n)),renameFilename:void 0,renameLocation:void 0}},getAvailableActions:function(e){const t=Q6(e,"invoked"===e.triggerReason);if(!t)return p;if(!D3(t))return[{name:$6,description:K6,actions:[H6]}];if(e.preferences.provideRefactorNotApplicableReason)return[{name:$6,description:K6,actions:[{...H6,notApplicableReason:t.error}]}];return p}});var r5={};a(r5,{Messages:()=>i5,RangeFacts:()=>_5,getRangeToExtract:()=>u5,getRefactorActionsToExtractSymbol:()=>c5,getRefactorEditsToExtractSymbol:()=>l5});var i5,o5="Extract Symbol",a5={name:"Extract Constant",description:Yx(ha.Extract_constant),kind:"refactor.extract.constant"},s5={name:"Extract Function",description:Yx(ha.Extract_function),kind:"refactor.extract.function"};function c5(e){const t=e.kind,n=u5(e.file,n0(e),"invoked"===e.triggerReason),r=n.targetRange;if(void 0===r){if(!n.errors||0===n.errors.length||!e.preferences.provideRefactorNotApplicableReason)return p;const r=[];return E3(s5.kind,t)&&r.push({name:o5,description:s5.description,actions:[{...s5,notApplicableReason:m(n.errors)}]}),E3(a5.kind,t)&&r.push({name:o5,description:a5.description,actions:[{...a5,notApplicableReason:m(n.errors)}]}),r}const{affectedTextRange:i,extractions:o}=function(e,t){const{scopes:n,affectedTextRange:r,readsAndWrites:{functionErrorsPerScope:i,constantErrorsPerScope:o}}=f5(e,t),a=n.map((e,t)=>{const n=function(e){return d_(e)?"inner function":y_(e)?"method":"function"}(e),r=function(e){return y_(e)?"readonly field":"constant"}(e),a=d_(e)?function(e){switch(e.kind){case 177:return"constructor";case 219:case 263:return e.name?`function '${e.name.text}'`:AZ;case 220:return"arrow function";case 175:return`method '${e.name.getText()}'`;case 178:return`'get ${e.name.getText()}'`;case 179:return`'set ${e.name.getText()}'`;default:gn.assertNever(e,`Unexpected scope kind ${e.kind}`)}}(e):y_(e)?function(e){return 264===e.kind?e.name?`class '${e.name.text}'`:"anonymous class declaration":e.name?`class expression '${e.name.text}'`:"anonymous class expression"}(e):function(e){return 269===e.kind?`namespace '${e.parent.name.getText()}'`:e.externalModuleIndicator?0:1}(e);let s,c;return 1===a?(s=Gx(Yx(ha.Extract_to_0_in_1_scope),[n,"global"]),c=Gx(Yx(ha.Extract_to_0_in_1_scope),[r,"global"])):0===a?(s=Gx(Yx(ha.Extract_to_0_in_1_scope),[n,"module"]),c=Gx(Yx(ha.Extract_to_0_in_1_scope),[r,"module"])):(s=Gx(Yx(ha.Extract_to_0_in_1),[n,a]),c=Gx(Yx(ha.Extract_to_0_in_1),[r,a])),0!==t||y_(e)||(c=Gx(Yx(ha.Extract_to_0_in_enclosing_scope),[r])),{functionExtraction:{description:s,errors:i[t]},constantExtraction:{description:c,errors:o[t]}}});return{affectedTextRange:r,extractions:a}}(r,e);if(void 0===o)return p;const a=[],s=new Map;let c;const l=[],_=new Map;let u,d=0;for(const{functionExtraction:n,constantExtraction:r}of o){if(E3(s5.kind,t)){const t=n.description;0===n.errors.length?s.has(t)||(s.set(t,!0),a.push({description:t,name:`function_scope_${d}`,kind:s5.kind,range:{start:{line:Ha(e.file,i.pos).line,offset:Ha(e.file,i.pos).character},end:{line:Ha(e.file,i.end).line,offset:Ha(e.file,i.end).character}}})):c||(c={description:t,name:`function_scope_${d}`,notApplicableReason:m(n.errors),kind:s5.kind})}if(E3(a5.kind,t)){const t=r.description;0===r.errors.length?_.has(t)||(_.set(t,!0),l.push({description:t,name:`constant_scope_${d}`,kind:a5.kind,range:{start:{line:Ha(e.file,i.pos).line,offset:Ha(e.file,i.pos).character},end:{line:Ha(e.file,i.end).line,offset:Ha(e.file,i.end).character}}})):u||(u={description:t,name:`constant_scope_${d}`,notApplicableReason:m(r.errors),kind:a5.kind})}d++}const f=[];return a.length?f.push({name:o5,description:Yx(ha.Extract_function),actions:a}):e.preferences.provideRefactorNotApplicableReason&&c&&f.push({name:o5,description:Yx(ha.Extract_function),actions:[c]}),l.length?f.push({name:o5,description:Yx(ha.Extract_constant),actions:l}):e.preferences.provideRefactorNotApplicableReason&&u&&f.push({name:o5,description:Yx(ha.Extract_constant),actions:[u]}),f.length?f:p;function m(e){let t=e[0].messageText;return"string"!=typeof t&&(t=t.messageText),t}}function l5(e,t){const n=u5(e.file,n0(e)).targetRange,r=/^function_scope_(\d+)$/.exec(t);if(r){const t=+r[1];return gn.assert(isFinite(t),"Expected to parse a finite number from the function scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,functionErrorsPerScope:a,exposedVariableDeclarations:s}}=f5(e,t);return gn.assert(!a[n].length,"The extraction went missing? How?"),t.cancellationToken.throwIfCancellationRequested(),function(e,t,{usages:n,typeParameterUsages:r,substitutions:i},o,a,s){const c=s.program.getTypeChecker(),l=wS(s.program.getCompilerOptions()),_=$7.createImportAdder(s.file,s.program,s.preferences,s.host),u=t.getSourceFile(),d=yZ(y_(t)?"newMethod":"newFunction",u),f=Mm(t),m=kw.createIdentifier(d);let g;const h=[],y=[];let v;n.forEach((e,n)=>{let r;if(!f){let n=c.getTypeOfSymbolAtLocation(e.symbol,e.node);n=c.getBaseTypeOfLiteralType(n),r=$7.typeToAutoImportableTypeNode(c,_,n,t,l,1,8)}const i=kw.createParameterDeclaration(void 0,void 0,n,void 0,r);h.push(i),2===e.usage&&(v||(v=[])).push(e),y.push(kw.createIdentifier(n))});const b=Be(r.values(),e=>({type:e,declaration:m5(e,s.startPosition)}));b.sort(g5);const x=0===b.length?void 0:U(b,({declaration:e})=>e),S=void 0!==x?x.map(e=>kw.createTypeReferenceNode(e.name,void 0)):void 0;if(Q_(e)&&!f){const n=c.getContextualType(e);g=c.typeToTypeNode(n,t,1,8)}const{body:k,returnValueProperty:C}=function(e,t,n,r,i){const o=void 0!==n||t.length>0;if(YE(e)&&!o&&0===r.size)return{body:kw.createBlock(e.statements,!0),returnValueProperty:void 0};let a,s=!1;const c=kw.createNodeArray(YE(e)?e.statements.slice(0):[bu(e)?e:kw.createReturnStatement(ph(e))]);if(o||r.size){const r=TJ(c,l,bu).slice();if(o&&!i&&bu(e)){const e=h5(t,n);1===e.length?r.push(kw.createReturnStatement(e[0].name)):r.push(kw.createReturnStatement(kw.createObjectLiteralExpression(e)))}return{body:kw.createBlock(r,!0),returnValueProperty:a}}return{body:kw.createBlock(c,!0),returnValueProperty:void 0};function l(e){if(!s&&_F(e)&&o){const r=h5(t,n);return e.expression&&(a||(a="__return"),r.unshift(kw.createPropertyAssignment(a,kJ(e.expression,l,Q_)))),1===r.length?kw.createReturnStatement(r[0].name):kw.createReturnStatement(kw.createObjectLiteralExpression(r))}{const t=s;s=s||d_(e)||y_(e);const n=r.get(pJ(e).toString()),i=n?$C(n):IJ(e,l,void 0);return s=t,i}}}(e,o,v,i,!!(1&a.facts));let w;QC(k);const N=!!(16&a.facts);if(y_(t)){const e=f?[]:[kw.createModifier(123)];32&a.facts&&e.push(kw.createModifier(126)),4&a.facts&&e.push(kw.createModifier(134)),w=kw.createMethodDeclaration(e.length?e:void 0,2&a.facts?kw.createToken(42):void 0,m,void 0,x,h,g,k)}else N&&h.unshift(kw.createParameterDeclaration(void 0,void 0,"this",void 0,c.typeToTypeNode(c.getTypeAtLocation(a.thisNode),t,1,8),void 0)),w=kw.createFunctionDeclaration(4&a.facts?[kw.createToken(134)]:void 0,2&a.facts?kw.createToken(42):void 0,m,x,h,g,k);const D=sde.ChangeTracker.fromContext(s),E=function(e,t){return T(function(e){if(d_(e)){const t=e.body;if(YE(t))return t.statements}else{if(CF(e)||mP(e))return e.statements;if(y_(e))return e.members}return p}(t),t=>t.pos>=e&&d_(t)&&!BD(t))}((y5(a.range)?Te(a.range):a.range).end,t);E?D.insertNodeBefore(s.file,E,w,!0):D.insertNodeAtEndOfScope(s.file,t,w);_.writeFixes(D);const F=[],P=function(e,t,n){const r=kw.createIdentifier(n);if(y_(e)){const n=32&t.facts?kw.createIdentifier(e.name.text):kw.createThis();return kw.createPropertyAccessExpression(n,r)}return r}(t,a,d);N&&y.unshift(kw.createIdentifier("this"));let A=kw.createCallExpression(N?kw.createPropertyAccessExpression(P,"call"):P,S,y);2&a.facts&&(A=kw.createYieldExpression(kw.createToken(42),A));4&a.facts&&(A=kw.createAwaitExpression(A));b5(e)&&(A=kw.createJsxExpression(void 0,A));if(o.length&&!v)if(gn.assert(!C,"Expected no returnValueProperty"),gn.assert(!(1&a.facts),"Expected RangeFacts.HasReturn flag to be unset"),1===o.length){const e=o[0];F.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration($C(e.name),void 0,$C(e.type),A)],e.parent.flags)))}else{const e=[],n=[];let r=o[0].parent.flags,i=!1;for(const a of o){e.push(kw.createBindingElement(void 0,void 0,$C(a.name)));const o=c.typeToTypeNode(c.getBaseTypeOfLiteralType(c.getTypeAtLocation(a)),t,1,8);n.push(kw.createPropertySignature(void 0,a.symbol.name,void 0,o)),i=i||void 0!==a.type,r&=a.parent.flags}const a=i?kw.createTypeLiteralNode(n):void 0;a&&Ew(a,1),F.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(kw.createObjectBindingPattern(e),void 0,a,A)],r)))}else if(o.length||v){if(o.length)for(const e of o){let t=e.parent.flags;2&t&&(t=-3&t|1),F.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(e.symbol.name,void 0,j(e.type))],t)))}C&&F.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(C,void 0,j(g))],1)));const e=h5(o,v);C&&e.unshift(kw.createShorthandPropertyAssignment(C)),1===e.length?(gn.assert(!C,"Shouldn't have returnValueProperty here"),F.push(kw.createExpressionStatement(kw.createAssignment(e[0].name,A))),1&a.facts&&F.push(kw.createReturnStatement())):(F.push(kw.createExpressionStatement(kw.createAssignment(kw.createObjectLiteralExpression(e),A))),C&&F.push(kw.createReturnStatement(kw.createIdentifier(C))))}else 1&a.facts?F.push(kw.createReturnStatement(A)):y5(a.range)?F.push(kw.createExpressionStatement(A)):F.push(A);y5(a.range)?D.replaceNodeRangeWithNodes(s.file,xe(a.range),Te(a.range),F):D.replaceNodeWithNodes(s.file,a.range,F);const I=D.getChanges(),O=(y5(a.range)?xe(a.range):a.range).getSourceFile().fileName,L=vZ(I,O,d,!1);return{renameFilename:O,renameLocation:L,edits:I};function j(e){if(void 0===e)return;const t=$C(e);let n=t;for(;aE(n);)n=n.type;return nE(n)&&T(n.types,e=>157===e.kind)?t:kw.createUnionTypeNode([t,kw.createKeywordTypeNode(157)])}}(i,r[n],o[n],s,e,t)}(n,e,t)}const i=/^constant_scope_(\d+)$/.exec(t);if(i){const t=+i[1];return gn.assert(isFinite(t),"Expected to parse a finite number from the constant scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,constantErrorsPerScope:a,exposedVariableDeclarations:s}}=f5(e,t);gn.assert(!a[n].length,"The extraction went missing? How?"),gn.assert(0===s.length,"Extract constant accepted a range containing a variable declaration?"),t.cancellationToken.throwIfCancellationRequested();return function(e,t,{substitutions:n},r,i){const o=i.program.getTypeChecker(),a=t.getSourceFile(),s=F3(e,t,o,a),c=Mm(t);let l=c||!o.isContextSensitive(e)?void 0:o.typeToTypeNode(o.getContextualType(e),t,1,8),_=function(e,t){return t.size?n(e):e;function n(e){const r=t.get(pJ(e).toString());return r?$C(r):IJ(e,n,void 0)}}(ph(e),n);({variableType:l,initializer:_}=m(l,_)),QC(_);const u=sde.ChangeTracker.fromContext(i);if(y_(t)){gn.assert(!c,"Cannot extract to a JS class");const n=[];n.push(kw.createModifier(123)),32&r&&n.push(kw.createModifier(126)),n.push(kw.createModifier(148));const o=kw.createPropertyDeclaration(n,s,void 0,l,_);let a=kw.createPropertyAccessExpression(32&r?kw.createIdentifier(t.name.getText()):kw.createThis(),kw.createIdentifier(s));b5(e)&&(a=kw.createJsxExpression(void 0,a));const d=function(e,t){const n=t.members;let r;gn.assert(n.length>0,"Found no members");let i=!0;for(const t of n){if(t.pos>e)return r||n[0];if(i&&!LD(t)){if(void 0!==r)return t;i=!1}r=t}return void 0===r?gn.fail():r}(e.pos,t);u.insertNodeBefore(i.file,d,o,!0),u.replaceNode(i.file,e,a)}else{const n=kw.createVariableDeclaration(s,void 0,l,_),r=function(e,t){let n;for(;void 0!==e&&e!==t;){if(hF(e)&&e.initializer===n&&yF(e.parent)&&e.parent.declarations.length>1)return e;n=e,e=e.parent}}(e,t);if(r){u.insertNodeBefore(i.file,r,n);const t=kw.createIdentifier(s);u.replaceNode(i.file,e,t)}else if(245===e.parent.kind&&t===yc(e,p5)){const t=kw.createVariableStatement(void 0,kw.createVariableDeclarationList([n],2));u.replaceNode(i.file,e.parent,t)}else{const r=kw.createVariableStatement(void 0,kw.createVariableDeclarationList([n],2)),o=function(e,t){let n;gn.assert(!y_(t));for(let r=e;r!==t;r=r.parent)p5(r)&&(n=r);for(let r=(n||e).parent;;r=r.parent){if(x0(r)){let t;for(const n of r.statements){if(n.pos>e.pos)break;t=n}return!t&&sP(r)?(gn.assert(dF(r.parent.parent),"Grandparent isn't a switch statement"),r.parent.parent):gn.checkDefined(t,"prevStatement failed to get set")}gn.assert(r!==t,"Didn't encounter a block-like before encountering scope")}}(e,t);if(0===o.pos?u.insertNodeAtTopOfFile(i.file,r,!1):u.insertNodeBefore(i.file,o,r,!1),245===e.parent.kind)u.delete(i.file,e.parent);else{let t=kw.createIdentifier(s);b5(e)&&(t=kw.createJsxExpression(void 0,t)),u.replaceNode(i.file,e,t)}}}const d=u.getChanges(),p=e.getSourceFile().fileName,f=vZ(d,p,s,!0);return{renameFilename:p,renameLocation:f,edits:d};function m(n,r){if(void 0===n)return{variableType:n,initializer:r};if(!NE(r)&&!DE(r)||r.typeParameters)return{variableType:n,initializer:r};const i=o.getTypeAtLocation(e),a=Ce(o.getSignaturesOfType(i,0));if(!a)return{variableType:n,initializer:r};if(a.getTypeParameters())return{variableType:n,initializer:r};const s=[];let c=!1;for(const e of r.parameters)if(e.type)s.push(e);else{const n=o.getTypeAtLocation(e);n===o.getAnyType()&&(c=!0),s.push(kw.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type||o.typeToTypeNode(n,t,1,8),e.initializer))}if(c)return{variableType:n,initializer:r};if(n=void 0,DE(r))r=kw.updateArrowFunction(r,II(e)?Lc(e):void 0,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1,8),r.equalsGreaterThanToken,r.body);else{if(a&&a.thisParameter){const n=ve(s);if(!n||fD(n.name)&&"this"!==n.name.escapedText){const n=o.getTypeOfSymbolAtLocation(a.thisParameter,e);s.splice(0,0,kw.createParameterDeclaration(void 0,void 0,"this",void 0,o.typeToTypeNode(n,t,1,8)))}}r=kw.updateFunctionExpression(r,II(e)?Lc(e):void 0,r.asteriskToken,r.name,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.body)}return{variableType:n,initializer:r}}}(Q_(i)?i:i.statements[0].expression,r[n],o[n],e.facts,t)}(n,e,t)}gn.fail("Unrecognized action name")}v4(o5,{kinds:[a5.kind,s5.kind],getEditsForAction:l5,getAvailableActions:c5}),(e=>{function t(e){return{message:e,code:0,category:3,key:e}}e.cannotExtractRange=t("Cannot extract range."),e.cannotExtractImport=t("Cannot extract import statement."),e.cannotExtractSuper=t("Cannot extract super call."),e.cannotExtractJSDoc=t("Cannot extract JSDoc."),e.cannotExtractEmpty=t("Cannot extract empty range."),e.expressionExpected=t("expression expected."),e.uselessConstantType=t("No reason to extract constant of type."),e.statementOrExpressionExpected=t("Statement or expression expected."),e.cannotExtractRangeContainingConditionalBreakOrContinueStatements=t("Cannot extract range containing conditional break or continue statements."),e.cannotExtractRangeContainingConditionalReturnStatement=t("Cannot extract range containing conditional return statement."),e.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=t("Cannot extract range containing labeled break or continue with target outside of the range."),e.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=t("Cannot extract range containing writes to references located outside of the target range in generators."),e.typeWillNotBeVisibleInTheNewScope=t("Type will not visible in the new scope."),e.functionWillNotBeVisibleInTheNewScope=t("Function will not visible in the new scope."),e.cannotExtractIdentifier=t("Select more than a single identifier."),e.cannotExtractExportedEntity=t("Cannot extract exported declaration"),e.cannotWriteInExpression=t("Cannot write back side-effects when extracting an expression"),e.cannotExtractReadonlyPropertyInitializerOutsideConstructor=t("Cannot move initialization of read-only class property outside of the constructor"),e.cannotExtractAmbientBlock=t("Cannot extract code from ambient contexts"),e.cannotAccessVariablesFromNestedScopes=t("Cannot access variables from nested scopes"),e.cannotExtractToJSClass=t("Cannot extract constant to a class scope in JS"),e.cannotExtractToExpressionArrowFunction=t("Cannot extract constant to an arrow function without a block"),e.cannotExtractFunctionsContainingThisToMethod=t("Cannot extract functions containing this to method")})(i5||(i5={}));var _5=(e=>(e[e.None=0]="None",e[e.HasReturn=1]="HasReturn",e[e.IsGenerator=2]="IsGenerator",e[e.IsAsyncFunction=4]="IsAsyncFunction",e[e.UsesThis=8]="UsesThis",e[e.UsesThisInFunction=16]="UsesThisInFunction",e[e.InStaticRegion=32]="InStaticRegion",e))(_5||{});function u5(e,t,n=!0){const{length:r}=t;if(0===r&&!n)return{errors:[rS(e,t.start,r,i5.cannotExtractEmpty)]};const i=0===r&&n,o=fQ(e,t.start),a=mQ(e,js(t)),s=o&&a&&n?function(e,t,n){const r=e.getStart(n);let i=t.getEnd();59===n.text.charCodeAt(i)&&i++;return{start:r,length:i-r}}(o,a,e):t,c=i?function(e){return yc(e,e=>e.parent&&v5(e)&&!LE(e.parent))}(o):NY(o,e,s),l=i?c:NY(a,e,s);let _,u=0;if(!c||!l)return{errors:[rS(e,t.start,r,i5.cannotExtractRange)]};if(16777216&c.flags)return{errors:[rS(e,t.start,r,i5.cannotExtractJSDoc)]};if(c.parent!==l.parent)return{errors:[rS(e,t.start,r,i5.cannotExtractRange)]};if(c!==l){if(!x0(c.parent))return{errors:[rS(e,t.start,r,i5.cannotExtractRange)]};const n=[];for(const e of c.parent.statements){if(e===c||n.length){const t=f(e);if(t)return{errors:t};n.push(e)}if(e===l)break}return n.length?{targetRange:{range:n,facts:u,thisNode:_}}:{errors:[rS(e,t.start,r,i5.cannotExtractRange)]}}if(_F(c)&&!c.expression)return{errors:[rS(e,t.start,r,i5.cannotExtractRange)]};const d=function(e){if(_F(e)){if(e.expression)return e.expression}else if(ZE(e)||yF(e)){const t=ZE(e)?e.declarationList.declarations:e.declarations;let n,r=0;for(const e of t)e.initializer&&(r++,n=e.initializer);if(1===r)return n}else if(hF(e)&&e.initializer)return e.initializer;return e}(c),p=function(e){if(fD(tF(e)?e.expression:e))return[Wp(e,i5.cannotExtractIdentifier)];return}(d)||f(d);return p?{errors:p}:{targetRange:{range:d5(d),facts:u,thisNode:_}};function f(e){let n;var r;if((r=n||(n={}))[r.None=0]="None",r[r.Break=1]="Break",r[r.Continue=2]="Continue",r[r.Return=4]="Return",gn.assert(e.pos<=e.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),gn.assert(!iT(e.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!(bu(e)||Nm(e)&&v5(e)||x5(e)))return[Wp(e,i5.statementOrExpressionExpected)];if(33554432&e.flags)return[Wp(e,i5.cannotExtractAmbientBlock)];const i=rm(e);let o;i&&function(e,t){let n=e;for(;n!==t;){if(173===n.kind){jv(n)&&(u|=32);break}if(170===n.kind){177===tm(n).kind&&(u|=32);break}175===n.kind&&jv(n)&&(u|=32),n=n.parent}}(e,i);let a,s=4;if(function e(n){if(o)return!0;if(hu(n)){if(Lv(261===n.kind?n.parent.parent:n,32))return(o||(o=[])).push(Wp(n,i5.cannotExtractExportedEntity)),!0}switch(n.kind){case 273:return(o||(o=[])).push(Wp(n,i5.cannotExtractImport)),!0;case 278:return(o||(o=[])).push(Wp(n,i5.cannotExtractExportedEntity)),!0;case 108:if(214===n.parent.kind){const e=rm(n);if(void 0===e||e.pos=t.start+t.length)return(o||(o=[])).push(Wp(n,i5.cannotExtractSuper)),!0}else u|=8,_=n;break;case 220:sO(n,function e(t){if(MX(t))u|=8,_=n;else{if(y_(t)||__(t)&&!DE(t))return!1;sO(t,e)}});case 264:case 263:mP(n.parent)&&void 0===n.parent.externalModuleIndicator&&(o||(o=[])).push(Wp(n,i5.functionWillNotBeVisibleInTheNewScope));case 232:case 219:case 175:case 177:case 178:case 179:return!1}const r=s;switch(n.kind){case 246:s&=-5;break;case 259:s=0;break;case 242:n.parent&&259===n.parent.kind&&n.parent.finallyBlock===n&&(s=4);break;case 298:case 297:s|=1;break;default:Z_(n,!1)&&(s|=3)}switch(n.kind){case 198:case 110:u|=8,_=n;break;case 257:{const t=n.label;(a||(a=[])).push(t.escapedText),sO(n,e),a.pop();break}case 253:case 252:{const e=n.label;e?D(a,e.escapedText)||(o||(o=[])).push(Wp(n,i5.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):s&(253===n.kind?1:2)||(o||(o=[])).push(Wp(n,i5.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break}case 224:u|=4;break;case 230:u|=2;break;case 254:4&s?u|=1:(o||(o=[])).push(Wp(n,i5.cannotExtractRangeContainingConditionalReturnStatement));break;default:sO(n,e)}s=r}(e),8&u){const t=sm(e,!1,!1);(263===t.kind||175===t.kind&&211===t.parent.kind||219===t.kind)&&(u|=16)}return o}}function d5(e){return bu(e)?[e]:Nm(e)?tF(e.parent)?[e.parent]:e:x5(e)?e:void 0}function p5(e){return DE(e)?au(e.body):d_(e)||mP(e)||CF(e)||y_(e)}function f5(e,t){const{file:n}=t,r=function(e){let t=y5(e.range)?xe(e.range):e.range;if(8&e.facts&&!(16&e.facts)){const e=rm(t);if(e){const n=yc(t,d_);return n?[n,e]:[e]}}const n=[];for(;;)if(t=t.parent,170===t.kind&&(t=yc(t,e=>d_(e)).parent),p5(t)&&(n.push(t),308===t.kind))return n}(e),i=function(e,t){return y5(e.range)?{pos:xe(e.range).getStart(t),end:Te(e.range).getEnd()}:e.range}(e,n),o=function(e,t,n,r,i,o){const a=new Map,s=[],c=[],l=[],_=[],u=[],d=new Map,p=[];let f;const m=y5(e.range)?1===e.range.length&&tF(e.range[0])?e.range[0].expression:void 0:e.range;let g;if(void 0===m){const t=e.range,n=xe(t).getStart(),i=Te(t).end;g=rS(r,n,i-n,i5.expressionExpected)}else 147456&i.getTypeAtLocation(m).flags&&(g=Wp(m,i5.uselessConstantType));for(const e of t){s.push({usages:new Map,typeParameterUsages:new Map,substitutions:new Map}),c.push(new Map),l.push([]);const t=[];g&&t.push(g),y_(e)&&Mm(e)&&t.push(Wp(e,i5.cannotExtractToJSClass)),DE(e)&&!YE(e.body)&&t.push(Wp(e,i5.cannotExtractToExpressionArrowFunction)),_.push(t)}const h=new Map,y=y5(e.range)?kw.createBlock(e.range):e.range,v=y5(e.range)?xe(e.range):e.range,b=x(v);if(k(y),b&&!y5(e.range)&&!nP(e.range)){S(i.getContextualType(e.range))}if(a.size>0){const e=new Map;let n=0;for(let r=v;void 0!==r&&n{s[n].typeParameterUsages.set(t,e)}),n++),Dp(r))for(const t of hl(r)){const n=i.getTypeAtLocation(t);a.has(n.id.toString())&&e.set(n.id.toString(),n)}gn.assert(n===t.length,"Should have iterated all scopes")}if(u.length){sO(Np(t[0],t[0].parent)?t[0]:Mp(t[0]),N)}for(let n=0;n0&&(r.usages.size>0||r.typeParameterUsages.size>0)){const t=y5(e.range)?e.range[0]:e.range;_[n].push(Wp(t,i5.cannotAccessVariablesFromNestedScopes))}16&e.facts&&y_(t[n])&&l[n].push(Wp(e.thisNode,i5.cannotExtractFunctionsContainingThisToMethod));let i,o=!1;if(s[n].usages.forEach(e=>{2===e.usage&&(o=!0,106500&e.symbol.flags&&e.symbol.valueDeclaration&&Ov(e.symbol.valueDeclaration,8)&&(i=e.symbol.valueDeclaration))}),gn.assert(y5(e.range)||0===p.length,"No variable declarations expected if something was extracted"),o&&!y5(e.range)){const t=Wp(e.range,i5.cannotWriteInExpression);l[n].push(t),_[n].push(t)}else if(i&&n>0){const e=Wp(i,i5.cannotExtractReadonlyPropertyInitializerOutsideConstructor);l[n].push(e),_[n].push(e)}else if(f){const e=Wp(f,i5.cannotExtractExportedEntity);l[n].push(e),_[n].push(e)}}return{target:y,usagesPerScope:s,functionErrorsPerScope:l,constantErrorsPerScope:_,exposedVariableDeclarations:p};function x(e){return!!yc(e,e=>Dp(e)&&0!==hl(e).length)}function S(e){const t=i.getSymbolWalker(()=>(o.throwIfCancellationRequested(),!0)),{visitedTypes:n}=t.walkType(e);for(const e of n)e.isTypeParameter()&&a.set(e.id.toString(),e)}function k(e,t=1){if(b){S(i.getTypeAtLocation(e))}if(hu(e)&&e.symbol&&u.push(e),ub(e))k(e.left,2),k(e.right);else if(G_(e))k(e.operand,2);else if(bE(e)||xE(e))sO(e,k);else if(fD(e)){if(!e.parent)return;if(ED(e.parent)&&e!==e.parent.left)return;if(bE(e.parent)&&e!==e.parent.expression)return;C(e,t,If(e))}else sO(e,k)}function C(e,n,r){const i=w(e,n,r);if(i)for(let n=0;n=a)return p;if(h.set(p,a),f){for(const e of s){e.usages.get(o.text)&&e.usages.set(o.text,{usage:a,symbol:d,node:o})}return p}const m=d.getDeclarations(),g=m&&T(m,e=>e.getSourceFile()===r);if(g&&!UX(n,g.getStart(),g.end)){if(2&e.facts&&2===a){const e=Wp(o,i5.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);for(const t of l)t.push(e);for(const t of _)t.push(e)}for(let e=0;ee.symbol===n);if(e)if(hF(e)){const t=e.symbol.id.toString();d.has(t)||(p.push(e),d.set(t,!0))}else f=f||e}sO(t,N)}function D(e){return e.parent&&dP(e.parent)&&e.parent.name===e?i.getShorthandAssignmentValueSymbol(e.parent):i.getSymbolAtLocation(e)}function E(e,t,n){if(!e)return;const r=e.getDeclarations();if(r&&r.some(e=>e.parent===t))return kw.createIdentifier(e.name);const i=E(e.parent,t,n);return void 0!==i?n?kw.createQualifiedName(i,kw.createIdentifier(e.name)):kw.createPropertyAccessExpression(i,e.name):void 0}}(e,r,i,n,t.program.getTypeChecker(),t.cancellationToken);return{scopes:r,affectedTextRange:i,readsAndWrites:o}}function m5(e,t){let n;const r=e.symbol;if(r&&r.declarations)for(const e of r.declarations)(void 0===n||e.poskw.createShorthandPropertyAssignment(e.symbol.name)),r=O(t,e=>kw.createShorthandPropertyAssignment(e.symbol.name));return void 0===n?r:void 0===r?n:n.concat(r)}function y5(e){return nt(e)}function v5(e){const{parent:t}=e;if(307===t.kind)return!1;switch(e.kind){case 11:return 273!==t.kind&&277!==t.kind;case 231:case 207:case 209:return!1;case 80:return 209!==t.kind&&277!==t.kind&&282!==t.kind}return!0}function b5(e){return x5(e)||(GF(e)||XF(e)||ZF(e))&&(GF(e.parent)||ZF(e.parent))}function x5(e){return QN(e)&&e.parent&&nP(e.parent)}var S5={},k5="Generate 'get' and 'set' accessors",T5=Yx(ha.Generate_get_and_set_accessors),C5={name:k5,description:T5,kind:"refactor.rewrite.property.generateAccessors"};v4(k5,{kinds:[C5.kind],getEditsForAction:function(e,t){if(!e.endPosition)return;const n=$7.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition);gn.assert(n&&!D3(n),"Expected applicable refactor info");const r=$7.generateAccessorFromProperty(e.file,e.program,e.startPosition,e.endPosition,e,t);if(!r)return;const i=e.file.fileName,o=n.renameAccessor?n.accessorName:n.fieldName;return{renameFilename:i,renameLocation:(fD(o)?0:-1)+vZ(r,i,o.text,AD(n.declaration)),edits:r}},getAvailableActions(e){if(!e.endPosition)return p;const t=$7.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition,"invoked"===e.triggerReason);return t?D3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:k5,description:T5,actions:[{...C5,notApplicableReason:t.error}]}]:p:[{name:k5,description:T5,actions:[C5]}]:p}});var w5={},N5="Infer function return type",D5=Yx(ha.Infer_function_return_type),E5={name:N5,description:D5,kind:"refactor.rewrite.function.returnType"};function F5(e){if(Mm(e.file)||!E3(E5.kind,e.kind))return;const t=yc(_Q(e.file,e.startPosition),e=>YE(e)||e.parent&&DE(e.parent)&&(39===e.kind||e.parent.body===e)?"quit":function(e){switch(e.kind){case 263:case 219:case 220:case 175:return!0;default:return!1}}(e));if(!t||!t.body||t.type)return{error:Yx(ha.Return_type_must_be_inferred_from_a_function)};const n=e.program.getTypeChecker();let r;if(n.isImplementationOfOverload(t)){const e=n.getTypeAtLocation(t).getCallSignatures();e.length>1&&(r=n.getUnionType(U(e,e=>e.getReturnType())))}if(!r){const e=n.getSignatureFromDeclaration(t);if(e){const i=n.getTypePredicateOfSignature(e);if(i&&i.type){const e=n.typePredicateToTypePredicateNode(i,t,1,8);if(e)return{declaration:t,returnTypeNode:e}}else r=n.getReturnTypeOfSignature(e)}}if(!r)return{error:Yx(ha.Could_not_determine_function_return_type)};const i=n.typeToTypeNode(r,t,1,8);return i?{declaration:t,returnTypeNode:i}:void 0}v4(N5,{kinds:[E5.kind],getEditsForAction:function(e){const t=F5(e);if(t&&!D3(t)){return{renameFilename:void 0,renameLocation:void 0,edits:sde.ChangeTracker.with(e,n=>function(e,t,n,r){const i=YX(n,22,e),o=DE(n)&&void 0===i,a=o?xe(n.parameters):i;a&&(o&&(t.insertNodeBefore(e,a,kw.createToken(21)),t.insertNodeAfter(e,a,kw.createToken(22))),t.insertNodeAt(e,a.end,r,{prefix:": "}))}(e.file,n,t.declaration,t.returnTypeNode))}}return},getAvailableActions:function(e){const t=F5(e);if(!t)return p;if(!D3(t))return[{name:N5,description:D5,actions:[E5]}];if(e.preferences.provideRefactorNotApplicableReason)return[{name:N5,description:D5,actions:[{...E5,notApplicableReason:t.error}]}];return p}});var P5=(e=>(e[e.typeOffset=8]="typeOffset",e[e.modifierMask=255]="modifierMask",e))(P5||{}),A5=(e=>(e[e.class=0]="class",e[e.enum=1]="enum",e[e.interface=2]="interface",e[e.namespace=3]="namespace",e[e.typeParameter=4]="typeParameter",e[e.type=5]="type",e[e.parameter=6]="parameter",e[e.variable=7]="variable",e[e.enumMember=8]="enumMember",e[e.property=9]="property",e[e.function=10]="function",e[e.member=11]="member",e))(A5||{}),I5=(e=>(e[e.declaration=0]="declaration",e[e.static=1]="static",e[e.async=2]="async",e[e.readonly=3]="readonly",e[e.defaultLibrary=4]="defaultLibrary",e[e.local=5]="local",e))(I5||{});function O5(e,t,n,r){const i=L5(e,t,n,r);gn.assert(i.spans.length%3==0);const o=i.spans,a=[];for(let e=0;ee(r)||r.isUnion()&&r.types.some(e);if(6!==n&&e(e=>e.getConstructSignatures().length>0))return 0;if(e(e=>e.getCallSignatures().length>0)&&!e(e=>e.getProperties().length>0)||function(e){for(;R5(e);)e=e.parent;return SE(e.parent)&&e.parent.expression===e}(t))return 9===n?11:10}}return n}(o,c,i);const s=n.valueDeclaration;if(s){const r=uc(s),o=pc(s);256&r&&(a|=2),1024&r&&(a|=4),0!==i&&2!==i&&(8&r||2&o||8&n.getFlags())&&(a|=8),7!==i&&10!==i||!function(e,t){hE(e)&&(e=M5(e));if(hF(e))return(!mP(e.parent.parent.parent)||_P(e.parent))&&e.getSourceFile()===t;if(vF(e))return!mP(e.parent)&&e.getSourceFile()===t;return!1}(s,t)||(a|=32),e.isSourceFileDefaultLibrary(s.getSourceFile())&&(a|=16)}else n.declarations&&n.declarations.some(t=>e.isSourceFileDefaultLibrary(t.getSourceFile()))&&(a|=16);r(c,i,a)}}}sO(c,s),a=l}s(t)}(e,t,n,(e,n,r)=>{i.push(e.getStart(t),e.getWidth(t),(n+1<<8)+r)},r),i}function M5(e){for(;;){if(!hE(e.parent.parent))return e.parent.parent;e=e.parent.parent}}function R5(e){return ED(e.parent)&&e.parent.right===e||bE(e.parent)&&e.parent.name===e}var B5=new Map([[261,7],[170,6],[173,9],[268,3],[267,1],[307,8],[264,0],[175,11],[263,10],[219,10],[174,11],[178,9],[179,9],[172,9],[265,2],[266,5],[169,4],[304,9],[305,9]]),J5="0.8";function z5(e,t,n,r){const i=Ll(e)?new q5(e,t,n):80===e?new K5(80,t,n):81===e?new H5(81,t,n):new $5(e,t,n);return i.parent=r,i.flags=101441536&r.flags,i}var q5=class{constructor(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(e){gn.assert(!iT(this.pos)&&!iT(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return wd(this)}getStart(e,t){return this.assertHasRealPosition(),Hd(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e=wd(this)){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),cA(this,e)??lA(this,e,function(e,t){const n=[];if(Pu(e))return e.forEachChild(e=>{n.push(e)}),n;aX.setText((t||e.getSourceFile()).text);let r=e.pos;const i=t=>{U5(n,r,t.pos,e),n.push(t),r=t.end},o=t=>{U5(n,r,t.pos,e),n.push(function(e,t){const n=z5(353,e.pos,e.end,t),r=[];let i=e.pos;for(const n of e)U5(r,i,n.pos,t),r.push(n),i=n.end;return U5(r,i,e.end,t),n._children=r,n}(t,e)),r=t.end};return g(e.jsDoc,i),r=e.pos,e.forEachChild(i,o),U5(n,r,e.end,e),aX.setText(void 0),n}(this,e))}getFirstToken(e){this.assertHasRealPosition();const t=this.getChildren(e);if(!t.length)return;const n=T(t,e=>e.kind<310||e.kind>352);return n.kind<167?n:n.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();const t=ke(this.getChildren(e));if(t)return t.kind<167?t:t.getLastToken(e)}forEachChild(e,t){return sO(this,e,t)}};function U5(e,t,n,r){for(aX.resetTokenState(t);t"inheritDoc"===e.tagName.text||"inheritdoc"===e.tagName.text)}function Y5(e,t){if(!e)return p;let n=Gle.getJsDocTagsFromDeclarations(e,t);if(t&&(0===n.length||e.some(Q5))){const r=new Set;for(const i of e){const e=e7(t,i,e=>{var n;if(!r.has(e))return r.add(e),178===i.kind||179===i.kind?e.getContextualJsDocTags(i,t):1===(null==(n=e.declarations)?void 0:n.length)?e.getJsDocTags(t):void 0});e&&(n=[...e,...n])}}return n}function Z5(e,t){if(!e)return p;let n=Gle.getJsDocCommentsFromDeclarations(e,t);if(t&&(0===n.length||e.some(Q5))){const r=new Set;for(const i of e){const e=e7(t,i,e=>{if(!r.has(e))return r.add(e),178===i.kind||179===i.kind?e.getContextualDocumentationComment(i,t):e.getDocumentationComment(t)});e&&(n=0===n.length?e.slice():e.concat(oZ(),n))}}return n}function e7(e,t,n){var r;const i=177===(null==(r=t.parent)?void 0:r.kind)?t.parent.parent:t.parent;if(!i)return;const o=Mv(t);return y(Dh(i),r=>{const i=e.getTypeAtLocation(r),a=o&&i.symbol?e.getTypeOfSymbol(i.symbol):i,s=e.getPropertyOfType(a,t.symbol.name);return s?n(s):void 0})}var t7=class extends q5{constructor(e,t,n){super(e,t,n)}update(e,t){return mO(this,e,t)}getLineAndCharacterOfPosition(e){return Ha(this,e)}getLineStarts(){return Va(this)}getPositionOfLineAndCharacter(e,t,n){return Ua(Va(this),e,t,this.text,n)}getLineEndOfPosition(e){const{line:t}=this.getLineAndCharacterOfPosition(e),n=this.getLineStarts();let r;t+1>=n.length&&(r=this.getEnd()),r||(r=n[t+1]-1);const i=this.getFullText();return"\n"===i[r]&&"\r"===i[r-1]?r-1:r}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){const e=Qe();return this.forEachChild(function r(i){switch(i.kind){case 263:case 219:case 175:case 174:const o=i,a=n(o);if(a){const t=function(t){let n=e.get(t);n||e.set(t,n=[]);return n}(a),n=ke(t);n&&o.parent===n.parent&&o.symbol===n.symbol?o.body&&!n.body&&(t[t.length-1]=o):t.push(o)}sO(i,r);break;case 264:case 232:case 265:case 266:case 267:case 268:case 272:case 282:case 277:case 274:case 275:case 178:case 179:case 188:t(i),sO(i,r);break;case 170:if(!Lv(i,31))break;case 261:case 209:{const e=i;if(E_(e.name)){sO(e.name,r);break}e.initializer&&r(e.initializer)}case 307:case 173:case 172:t(i);break;case 279:const s=i;s.exportClause&&(qF(s.exportClause)?g(s.exportClause.elements,r):r(s.exportClause.name));break;case 273:const c=i.importClause;c&&(c.name&&t(c.name),c.namedBindings&&(275===c.namedBindings.kind?t(c.namedBindings):g(c.namedBindings.elements,r)));break;case 227:0!==cg(i)&&t(i);default:sO(i,r)}}),e;function t(t){const r=n(t);r&&e.add(r,t)}function n(e){const t=Pc(e);return t&&(FD(t)&&bE(t.expression)?t.expression.name.text:c_(t)?lY(t):void 0)}}},n7=class{constructor(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(e=>e)}getLineAndCharacterOfPosition(e){return Ha(this,e)}};function r7(e){let t=!0;for(const n in e)if(Ie(e,n)&&!i7(n)){t=!1;break}if(t)return e;const n={};for(const t in e)if(Ie(e,t)){n[i7(t)?t:t.charAt(0).toLowerCase()+t.substr(1)]=e[t]}return n}function i7(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function o7(e){return e?O(e,e=>e.text).join(""):""}function a7(){return{target:1,jsx:1}}function s7(){return $7.getSupportedErrorCodes()}var c7=class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,n,r,i,o,a,s,c;const l=this.host.getScriptSnapshot(e);if(!l)throw new Error("Could not find file: '"+e+"'.");const _=uZ(e,this.host),u=this.host.getScriptVersion(e);let d;if(this.currentFileName!==e){d=_7(e,l,{languageVersion:99,impliedNodeFormat:$V(Xo(e,this.host.getCurrentDirectory(),(null==(r=null==(n=(t=this.host).getCompilerHost)?void 0:n.call(t))?void 0:r.getCanonicalFileName)||Vy(this.host)),null==(c=null==(s=null==(a=null==(o=(i=this.host).getCompilerHost)?void 0:o.call(i))?void 0:a.getModuleResolutionCache)?void 0:s.call(a))?void 0:c.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:xS(this.host.getCompilationSettings()),jsDocParsingMode:0},u,!0,_)}else if(this.currentFileVersion!==u){const e=l.getChangeRange(this.currentFileScriptSnapshot);d=u7(this.currentSourceFile,l,u,e)}return d&&(this.currentFileVersion=u,this.currentFileName=e,this.currentFileScriptSnapshot=l,this.currentSourceFile=d),this.currentSourceFile}};function l7(e,t,n){e.version=n,e.scriptSnapshot=t}function _7(e,t,n,r,i,o){const a=uO(e,aY(t),n,i,o);return l7(a,t,r),a}function u7(e,t,n,r,i){if(r&&n!==e.version){let o;const a=0!==r.span.start?e.text.substr(0,r.span.start):"",s=js(r.span)!==e.text.length?e.text.substr(js(r.span)):"";if(0===r.newLength)o=a&&s?a+s:a||s;else{const e=t.getText(r.span.start,r.span.start+r.newLength);o=a&&s?a+e+s:a?a+e:e+s}const c=mO(e,o,r,i);return l7(c,t,n),c.nameTable=void 0,e!==c&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),c}const o={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode};return _7(e.fileName,t,o,n,!0,e.scriptKind)}var d7={isCancellationRequested:lt,throwIfCancellationRequested:ct},p7=class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=Yn)||e.instant(Yn.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new Fr}},f7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){const e=Hn();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested())}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=Yn)||e.instant(Yn.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new Fr}},m7=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],g7=[...m7,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];function h7(e,t=Z0(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory(),e.jsDocParsingMode),n){var r;let i;i=void 0===n?0:"boolean"==typeof n?n?2:0:n;const o=new c7(e);let a,s,c=0;const l=e.getCancellationToken?new p7(e.getCancellationToken()):d7,_=e.getCurrentDirectory();function u(t){e.log&&e.log(t)}Qx(null==(r=e.getLocalizedDiagnosticMessages)?void 0:r.bind(e));const d=Uy(e),f=Xt(d),m=B1({useCaseSensitiveFileNames:()=>d,getCurrentDirectory:()=>_,getProgram:v,fileExists:Xe(e,e.fileExists),readFile:Xe(e,e.readFile),getDocumentPositionMapper:Xe(e,e.getDocumentPositionMapper),getSourceFileLike:Xe(e,e.getSourceFileLike),log:u});function h(e){const t=a.getSourceFile(e);if(!t){const t=new Error(`Could not find source file: '${e}'.`);throw t.ProgramFiles=a.getSourceFiles().map(e=>e.fileName),t}return t}function y(){e.updateFromProject&&!e.updateFromProjectInProgress?e.updateFromProject():function(){var n,r,o;if(gn.assert(2!==i),e.getProjectVersion){const t=e.getProjectVersion();if(t){if(s===t&&!(null==(n=e.hasChangedAutomaticTypeDirectiveNames)?void 0:n.call(e)))return;s=t}}const p=e.getTypeRootsVersion?e.getTypeRootsVersion():0;c!==p&&(u("TypeRoots version has changed; provide new program"),a=void 0,c=p);const g=e.getScriptFileNames().slice(),h=e.getCompilationSettings()||{target:1,jsx:1},y=e.hasInvalidatedResolutions||lt,v=Xe(e,e.hasInvalidatedLibResolutions)||lt,b=Xe(e,e.hasChangedAutomaticTypeDirectiveNames),x=null==(r=e.getProjectReferences)?void 0:r.call(e);let S,k={getSourceFile:O,getSourceFileByPath:L,getCancellationToken:()=>l,getCanonicalFileName:f,useCaseSensitiveFileNames:()=>d,getNewLine:()=>Bb(h),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:ct,getCurrentDirectory:()=>_,fileExists:t=>e.fileExists(t),readFile:t=>e.readFile&&e.readFile(t),getSymlinkCache:Xe(e,e.getSymlinkCache),realpath:Xe(e,e.realpath),directoryExists:t=>jb(t,e),getDirectories:t=>e.getDirectories?e.getDirectories(t):[],readDirectory:(t,n,r,i,o)=>(gn.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(t,n,r,i,o)),onReleaseOldSourceFile:I,onReleaseParsedCommandLine:P,hasInvalidatedResolutions:y,hasInvalidatedLibResolutions:v,hasChangedAutomaticTypeDirectiveNames:b,trace:Xe(e,e.trace),resolveModuleNames:Xe(e,e.resolveModuleNames),getModuleResolutionCache:Xe(e,e.getModuleResolutionCache),createHash:Xe(e,e.createHash),resolveTypeReferenceDirectives:Xe(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:Xe(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:Xe(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:Xe(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:Xe(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:E,jsDocParsingMode:e.jsDocParsingMode,getGlobalTypingsCacheLocation:Xe(e,e.getGlobalTypingsCacheLocation)};const T=k.getSourceFile,{getSourceFileWithCache:C}=aV(k,e=>Xo(e,_,f),(...e)=>T.call(k,...e));k.getSourceFile=C,null==(o=e.setCompilerHost)||o.call(e,k);const w={useCaseSensitiveFileNames:d,fileExists:e=>k.fileExists(e),readFile:e=>k.readFile(e),directoryExists:e=>k.directoryExists(e),getDirectories:e=>k.getDirectories(e),realpath:k.realpath,readDirectory:(...e)=>k.readDirectory(...e),trace:k.trace,getCurrentDirectory:k.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:ct},N=t.getKeyForCompilationSettings(h);let D=new Set;if(VV(a,g,h,(t,n)=>e.getScriptVersion(n),e=>k.fileExists(e),y,v,b,E,x))return k=void 0,S=void 0,void(D=void 0);return a=GV({rootNames:g,options:h,host:k,oldProgram:a,projectReferences:x}),k=void 0,S=void 0,D=void 0,m.clearCache(),void a.getTypeChecker();function E(t){const n=Xo(t,_,f),r=null==S?void 0:S.get(n);if(void 0!==r)return r||void 0;const i=e.getParsedCommandLine?e.getParsedCommandLine(t):F(t);return(S||(S=new Map)).set(n,i||!1),i}function F(e){const t=O(e,100);if(t)return t.path=Xo(e,_,f),t.resolvedPath=t.path,t.originalFileName=t.fileName,uj(t,w,$o(Lo(e),_),void 0,$o(e,_))}function P(t,n,r){var i;e.getParsedCommandLine?null==(i=e.onReleaseParsedCommandLine)||i.call(e,t,n,r):n&&A(n.sourceFile,r)}function A(e,n){const r=t.getKeyForCompilationSettings(n);t.releaseDocumentWithKey(e.resolvedPath,r,e.scriptKind,e.impliedNodeFormat)}function I(t,n,r,i){var o;A(t,n),null==(o=e.onReleaseOldSourceFile)||o.call(e,t,n,r,i)}function O(e,t,n,r){return L(e,Xo(e,_,f),t,n,r)}function L(n,r,i,o,s){gn.assert(k,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");const c=e.getScriptSnapshot(n);if(!c)return;const l=uZ(n,e),_=e.getScriptVersion(n);if(!s){const o=a&&a.getSourceFileByPath(r);if(o){if(l===o.scriptKind||D.has(o.resolvedPath))return t.updateDocumentWithKey(n,r,e,N,c,_,l,i);t.releaseDocumentWithKey(o.resolvedPath,t.getKeyForCompilationSettings(a.getCompilerOptions()),o.scriptKind,o.impliedNodeFormat),D.add(o.resolvedPath)}}return t.acquireDocumentWithKey(n,r,e,N,c,_,l,i)}}()}function v(){if(2!==i)return y(),a;gn.assert(void 0===a)}function b(){if(a){const e=t.getKeyForCompilationSettings(a.getCompilerOptions());g(a.getSourceFiles(),n=>t.releaseDocumentWithKey(n.resolvedPath,e,n.scriptKind,n.impliedNodeFormat)),a=void 0}}function x(e,t){if(zs(t,e))return;const n=yc(mQ(e,js(t))||e,e=>qs(e,t)),r=[];return S(t,n,r),e.end===t.start+t.length&&r.push(e.endOfFileToken),X(r,mP)?void 0:r}function S(e,t,n){return!!function(e,t){const n=t.start+t.length;return e.post.start}(t,e)&&(zs(e,t)?(k(t,n),!0):x0(t)?function(e,t,n){const r=[],i=t.statements.filter(t=>S(e,t,r));if(i.length===t.statements.length)return k(t,n),!0;return n.push(...r),!1}(e,t,n):y_(t)?function(e,t,n){var r,i,o;const a=t=>Gs(t,e);if((null==(r=t.modifiers)?void 0:r.some(a))||t.name&&a(t.name)||(null==(i=t.typeParameters)?void 0:i.some(a))||(null==(o=t.heritageClauses)?void 0:o.some(a)))return k(t,n),!0;const s=[],c=t.members.filter(t=>S(e,t,s));if(c.length===t.members.length)return k(t,n),!0;return n.push(...s),!1}(e,t,n):(k(t,n),!0))}function k(e,t){for(;e.parent&&!SC(e);)e=e.parent;t.push(e)}function T(e,t,n,r){y();const i=n&&n.use===Bce.FindReferencesUse.Rename?a.getSourceFiles().filter(e=>!a.isSourceFileDefaultLibrary(e)):a.getSourceFiles();return Bce.findReferenceOrRenameEntries(a,l,i,e,t,n,r)}const C=new Map(Object.entries({19:20,21:22,23:24,32:30}));function w(t){return gn.assertEqual(t.type,"install package"),e.installPackage?e.installPackage({fileName:(n=t.file,Xo(n,_,f)),packageName:t.packageName}):Promise.reject("Host does not implement `installPackage`");var n}function N(e,t){return{lineStarts:e.getLineStarts(),firstLine:e.getLineAndCharacterOfPosition(t.pos).line,lastLine:e.getLineAndCharacterOfPosition(t.end).line}}function D(e,t,n){const r=o.getCurrentSourceFile(e),i=[],{lineStarts:a,firstLine:s,lastLine:c}=N(r,t);let l=n||!1,_=Number.MAX_VALUE;const u=new Map,d=new RegExp(/\S/),p=wQ(r,a[s]),f=p?"{/*":"//";for(let e=s;e<=c;e++){const t=r.text.substring(a[e],r.getLineEndOfPosition(a[e])),i=d.exec(t);i&&(_=Math.min(_,i.index),u.set(e.toString(),i.index),t.substr(i.index,f.length)!==f&&(l=void 0===n||n))}for(let n=s;n<=c;n++){if(s!==c&&a[n]===t.end)continue;const o=u.get(n.toString());void 0!==o&&(p?i.push(...E(e,{pos:a[n]+_,end:r.getLineEndOfPosition(a[n])},l,p)):l?i.push({newText:f,span:{length:0,start:a[n]+_}}):r.text.substr(a[n]+o,f.length)===f&&i.push({newText:"",span:{length:f.length,start:a[n]+o}}))}return i}function E(e,t,n,r){var i;const a=o.getCurrentSourceFile(e),s=[],{text:c}=a;let l=!1,_=n||!1;const u=[];let{pos:d}=t;const p=void 0!==r?r:wQ(a,d),f=p?"{/*":"/*",m=p?"*/}":"*/",g=p?"\\{\\/\\*":"\\/\\*",h=p?"\\*\\/\\}":"\\*\\/";for(;d<=t.end;){const e=PQ(a,d+(c.substr(d,f.length)===f?f.length:0));if(e)p&&(e.pos--,e.end++),u.push(e.pos),3===e.kind&&u.push(e.end),l=!0,d=e.end+1;else{const e=c.substring(d,t.end).search(`(${g})|(${h})`);_=void 0!==n?n:_||!jY(c,d,-1===e?t.end:d+e),d=-1===e?t.end+1:d+e+m.length}}if(_||!l){2!==(null==(i=PQ(a,t.pos))?void 0:i.kind)&&ie(u,t.pos,Tt),ie(u,t.end,Tt);const e=u[0];c.substr(e,f.length)!==f&&s.push({newText:f,span:{length:0,start:e}});for(let e=1;e0?e-m.length:0,n=c.substr(t,m.length)===m?m.length:0;s.push({newText:"",span:{length:f.length,start:e-n}})}return s}function F({openingElement:e,closingElement:t,parent:n}){return!AO(e.tagName,t.tagName)||GF(n)&&AO(e.tagName,n.openingElement.tagName)&&F(n)}function P({closingFragment:e,parent:t}){return!!(262144&e.flags)||ZF(t)&&P(t)}function A(t,n,r,i,o,a){const[s,c]="number"==typeof n?[n,void 0]:[n.pos,n.end];return{file:t,startPosition:s,endPosition:c,program:v(),host:e,formatContext:jde.getFormatContext(i,e),cancellationToken:l,preferences:r,triggerReason:o,kind:a}}C.forEach((e,t)=>C.set(e.toString(),Number(t)));const I={dispose:function(){b(),e=void 0},cleanupSemanticCache:b,getSyntacticDiagnostics:function(e){return y(),a.getSyntacticDiagnostics(h(e),l).slice()},getSemanticDiagnostics:function(e){y();const t=h(e),n=a.getSemanticDiagnostics(t,l);if(!jS(a.getCompilerOptions()))return n.slice();const r=a.getDeclarationDiagnostics(t,l);return[...n,...r]},getRegionSemanticDiagnostics:function(e,t){y();const n=h(e),r=a.getCompilerOptions();if(yT(n,r,a)||!xT(n,r)||a.getCachedSemanticDiagnostics(n))return;const i=function(e,t){const n=[],r=Qs(t.map(e=>QQ(e)));for(const t of r){const r=x(e,t);if(!r)return;n.push(...r)}if(!n.length)return;return n}(n,t);if(!i)return;const o=Qs(i.map(e=>Zs(e.getFullStart(),e.getEnd())));return{diagnostics:a.getSemanticDiagnostics(n,l,i).slice(),spans:o}},getSuggestionDiagnostics:function(e){return y(),U1(h(e),a,l)},getCompilerOptionsDiagnostics:function(){return y(),[...a.getOptionsDiagnostics(l),...a.getGlobalDiagnostics(l)]},getSyntacticClassifications:function(e,t){return X0(l,o.getCurrentSourceFile(e),t)},getSemanticClassifications:function(e,t,n){return y(),"2020"===(n||"original")?O5(a,l,h(e),t):V0(a.getTypeChecker(),l,h(e),a.getClassifiableNames(),t)},getEncodedSyntacticClassifications:function(e,t){return Q0(l,o.getCurrentSourceFile(e),t)},getEncodedSemanticClassifications:function(e,t,n){return y(),"original"===(n||"original")?$0(a.getTypeChecker(),l,h(e),a.getClassifiableNames(),t):L5(a,l,h(e),t)},getCompletionsAtPosition:function(t,n,r=JG,i){const o={...r,includeCompletionsForModuleExports:r.includeCompletionsForModuleExports||r.includeExternalModuleExports,includeCompletionsWithInsertText:r.includeCompletionsWithInsertText||r.includeInsertTextCompletions};return y(),Mae.getCompletionsAtPosition(e,a,u,h(t),n,o,r.triggerCharacter,r.triggerKind,l,i&&jde.getFormatContext(i,e),r.includeSymbol)},getCompletionEntryDetails:function(t,n,r,i,o,s=JG,c){return y(),Mae.getCompletionEntryDetails(a,u,h(t),n,{name:r,source:o,data:c},e,i&&jde.getFormatContext(i,e),s,l)},getCompletionEntrySymbol:function(t,n,r,i,o=JG){return y(),Mae.getCompletionEntrySymbol(a,u,h(t),n,{name:r,source:i},e,o)},getSignatureHelpItems:function(e,t,{triggerReason:n}=JG){y();const r=h(e);return mue.getSignatureHelpItems(a,r,t,n,l)},getQuickInfoAtPosition:function(e,t,n,r){y();const i=h(e),o=_Q(i,t);if(o===i)return;const s=a.getTypeChecker(),c=function(e){if(kE(e.parent)&&e.pos===e.parent.pos)return e.parent.expression;if(ZD(e.parent)&&e.pos===e.parent.pos)return e.parent;if(yf(e.parent)&&e.parent.name===e)return e.parent;if(aP(e.parent))return e.parent;return e}(o),_=function(e,t){const n=v7(e);if(n){const e=t.getContextualType(n.parent),r=e&&b7(n,t,e,!1);if(r&&1===r.length)return xe(r)}return t.getSymbolAtLocation(e)}(c,s);if(!_||s.isUnknownSymbol(_)){const e=function(e,t,n){switch(t.kind){case 80:return!(16777216&t.flags&&!Mm(t)&&(172===t.parent.kind&&t.parent.name===t||yc(t,e=>170===e.kind)))&&(!wX(t)&&!NX(t)&&!El(t.parent));case 212:case 167:return!PQ(e,n);case 110:case 198:case 108:case 203:return!0;case 237:return yf(t);default:return!1}}(i,c,t)?s.getTypeAtLocation(c):void 0;return e&&{kind:"",kindModifiers:"",textSpan:HQ(c,i),displayParts:s.runWithCancellationToken(l,t=>sZ(t,e,LX(c),void 0,r)),documentation:e.symbol?e.symbol.getDocumentationComment(s):void 0,tags:e.symbol?e.symbol.getJsDocTags(s):void 0}}const{symbolKind:u,displayParts:d,documentation:p,tags:f,canIncreaseVerbosityLevel:m}=s.runWithCancellationToken(l,e=>Yue.getSymbolDisplayPartsDocumentationAndSymbolKind(e,_,i,LX(c),c,void 0,void 0,n??Zu,r));return{kind:u,kindModifiers:Yue.getSymbolModifiers(s,_),textSpan:HQ(c,i),displayParts:d,documentation:p,tags:f,canIncreaseVerbosityLevel:m}},getDefinitionAtPosition:function(e,t,n,r){return y(),wle.getDefinitionAtPosition(a,h(e),t,n,r)},getDefinitionAndBoundSpan:function(e,t){return y(),wle.getDefinitionAndBoundSpan(a,h(e),t)},getImplementationAtPosition:function(e,t){return y(),Bce.getImplementationsAtPosition(a,l,a.getSourceFiles(),h(e),t)},getTypeDefinitionAtPosition:function(e,t){return y(),wle.getTypeDefinitionAtPosition(a.getTypeChecker(),h(e),t)},getReferencesAtPosition:function(e,t){return y(),T(_Q(h(e),t),t,{use:Bce.FindReferencesUse.References},Bce.toReferenceEntry)},findReferences:function(e,t){return y(),Bce.findReferencedSymbols(a,l,a.getSourceFiles(),h(e),t)},getFileReferences:function(e){return y(),Bce.Core.getReferencesForFileName(e,a,a.getSourceFiles()).map(Bce.toReferenceEntry)},getDocumentHighlights:function(e,t,n){const r=Ko(e);gn.assert(n.some(e=>Ko(e)===r)),y();const i=U(n,e=>a.getSourceFile(e)),o=h(e);return R0.getDocumentHighlights(a,l,o,t,i)},getNameOrDottedNameSpan:function(e,t,n){const r=o.getCurrentSourceFile(e),i=_Q(r,t);if(i===r)return;switch(i.kind){case 212:case 167:case 11:case 97:case 112:case 106:case 108:case 110:case 198:case 80:break;default:return}let a=i;for(;;)if(EX(a)||DX(a))a=a.parent;else{if(!PX(a))break;if(268!==a.parent.parent.kind||a.parent.parent.body!==a.parent)break;a=a.parent.parent.name}return Zs(a.getStart(),i.getEnd())},getBreakpointStatementAtPosition:function(e,t){const n=o.getCurrentSourceFile(e);return k7.spanInSourceFileAtLocation(n,t)},getNavigateToItems:function(e,t,n,r=!1,i=!1){return y(),u2(n?[h(n)]:a.getSourceFiles(),a.getTypeChecker(),l,e,t,r,i)},getRenameInfo:function(e,t,n){return y(),cue.getRenameInfo(a,h(e),t,n||{})},getSmartSelectionRange:function(e,t){return zue.getSmartSelectionRange(t,o.getCurrentSourceFile(e))},findRenameLocations:function(e,t,n,r,i){y();const o=h(e),a=lQ(_Q(o,t));if(cue.nodeIsEligibleForRename(a)){if(fD(a)&&(QF(a.parent)||YF(a.parent))&&My(a.escapedText)){const{openingElement:e,closingElement:t}=a.parent.parent;return[e,t].map(e=>{const t=HQ(e.tagName,o);return{fileName:o.fileName,textSpan:t,...Bce.toContextSpan(t,o,e.parent)}})}{const e=bY(o,i??JG),s="boolean"==typeof i?i:null==i?void 0:i.providePrefixAndSuffixTextForRename;return T(a,t,{findInStrings:n,findInComments:r,providePrefixAndSuffixTextForRename:s,use:Bce.FindReferencesUse.Rename},(t,n,r)=>Bce.toRenameLocation(t,n,r,s||!1,e))}}},getNavigationBarItems:function(e){return P2(o.getCurrentSourceFile(e),l)},getNavigationTree:function(e){return A2(o.getCurrentSourceFile(e),l)},getOutliningSpans:function(e){const t=o.getCurrentSourceFile(e);return Z_e.collectElements(t,l)},getTodoComments:function(e,t){y();const n=h(e);l.throwIfCancellationRequested();const r=n.text,i=[];if(t.length>0&&!n.fileName.includes("/node_modules/")){const e=function(){const e="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/{2,}\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+O(t,e=>"("+(e.text.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")+")")).join("|")+")";return new RegExp(e+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}();let a;for(;a=e.exec(r);){l.throwIfCancellationRequested();const e=3;gn.assert(a.length===t.length+e);const s=a[1],c=a.index+s.length;if(!PQ(n,c))continue;let _;for(let n=0;n=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}},getBraceMatchingAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=uQ(n,t),i=r.getStart(n)===t?C.get(r.kind.toString()):void 0,a=i&&YX(r.parent,i,n);return a?[HQ(r,n),HQ(a,n)].sort((e,t)=>e.start-t.start):p},getIndentationAtPosition:function(e,t,n){let r=Hn();const i=r7(n),a=o.getCurrentSourceFile(e);u("getIndentationAtPosition: getCurrentSourceFile: "+(Hn()-r)),r=Hn();const s=jde.SmartIndenter.getIndentation(t,a,i);return u("getIndentationAtPosition: computeIndentation : "+(Hn()-r)),s},getFormattingEditsForRange:function(t,n,r,i){const a=o.getCurrentSourceFile(t);return jde.formatSelection(n,r,a,jde.getFormatContext(r7(i),e))},getFormattingEditsForDocument:function(t,n){return jde.formatDocument(o.getCurrentSourceFile(t),jde.getFormatContext(r7(n),e))},getFormattingEditsAfterKeystroke:function(t,n,r,i){const a=o.getCurrentSourceFile(t),s=jde.getFormatContext(r7(i),e);if(!PQ(a,n))switch(r){case"{":return jde.formatOnOpeningCurly(n,a,s);case"}":return jde.formatOnClosingCurly(n,a,s);case";":return jde.formatOnSemicolon(n,a,s);case"\n":return jde.formatOnEnter(n,a,s)}return[]},getDocCommentTemplateAtPosition:function(t,n,r,i){const a=i?jde.getFormatContext(i,e).options:void 0;return Gle.getDocCommentTemplateAtPosition(iZ(e,a),o.getCurrentSourceFile(t),n,r)},isValidBraceCompletionAtPosition:function(e,t,n){if(60===n)return!1;const r=o.getCurrentSourceFile(e);if(xQ(r,t))return!1;if(SQ(r,t))return 123===n;if(TQ(r,t))return!1;switch(n){case 39:case 34:case 96:return!PQ(r,t)}return!0},getJsxClosingTagAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=hQ(t,n);if(!r)return;const i=32===r.kind&&QF(r.parent)?r.parent.parent:YN(r)&&GF(r.parent)?r.parent:void 0;if(i&&F(i))return{newText:``};const a=32===r.kind&&eP(r.parent)?r.parent.parent:YN(r)&&ZF(r.parent)?r.parent:void 0;return a&&P(a)?{newText:""}:void 0},getLinkedEditingRangeAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=hQ(t,n);if(!r||308===r.parent.kind)return;const i="[a-zA-Z0-9:\\-\\._$]*";if(ZF(r.parent.parent)){const e=r.parent.parent.openingFragment,o=r.parent.parent.closingFragment;if(Cd(e)||Cd(o))return;const a=e.getStart(n)+1,s=o.getStart(n)+2;if(t!==a&&t!==s)return;return{ranges:[{start:a,length:0},{start:s,length:0}],wordPattern:i}}{const e=yc(r.parent,e=>!(!QF(e)&&!YF(e)));if(!e)return;gn.assert(QF(e)||YF(e),"tag should be opening or closing element");const o=e.parent.openingElement,a=e.parent.closingElement,s=o.tagName.getStart(n),c=o.tagName.end,l=a.tagName.getStart(n),_=a.tagName.end;if(s===o.getStart(n)||l===a.getStart(n)||c===o.getEnd()||_===a.getEnd())return;if(!(s<=t&&t<=c||l<=t&&t<=_))return;if(o.tagName.getText(n)!==a.tagName.getText(n))return;return{ranges:[{start:s,length:c-s},{start:l,length:_-l}],wordPattern:i}}},getSpanOfEnclosingComment:function(e,t,n){const r=o.getCurrentSourceFile(e),i=jde.getRangeOfEnclosingComment(r,t);return!i||n&&3!==i.kind?void 0:QQ(i)},getCodeFixesAtPosition:function(t,n,r,i,o,s=JG){y();const c=h(t),_=Zs(n,r),u=jde.getFormatContext(o,e);return R(ne(i,bt,Tt),t=>(l.throwIfCancellationRequested(),$7.getFixes({errorCode:t,sourceFile:c,span:_,program:a,host:e,cancellationToken:l,formatContext:u,preferences:s})))},getCombinedCodeFix:function(t,n,r,i=JG){y(),gn.assert("file"===t.type);const o=h(t.fileName),s=jde.getFormatContext(r,e);return $7.getAllFixes({fixId:n,sourceFile:o,program:a,host:e,cancellationToken:l,formatContext:s,preferences:i})},applyCodeActionCommand:function(e,t){const n="string"==typeof e?t:e;return nt(n)?Promise.all(n.map(e=>w(e))):w(n)},organizeImports:function(t,n,r=JG){y(),gn.assert("file"===t.type);const i=h(t.fileName);if(Cd(i))return p;const o=jde.getFormatContext(n,e),s=t.mode??(t.skipDestructiveCodeActions?"SortAndCombine":"All");return x_e.organizeImports(i,o,e,a,r,s)},getEditsForFileRename:function(t,n,r,i=JG){return r1(v(),t,n,e,jde.getFormatContext(r,e),i,m)},getEmitOutput:function(t,n,r){y();const i=h(t),o=e.getCustomTransformers&&e.getCustomTransformers();return lW(a,i,!!n,l,o,r)},getNonBoundSourceFile:function(e){return o.getCurrentSourceFile(e)},getProgram:v,getCurrentProgram:()=>a,getAutoImportProvider:function(){var t;return null==(t=e.getPackageJsonAutoImportProvider)?void 0:t.call(e)},updateIsDefinitionOfReferencedSymbols:function(t,n){const r=a.getTypeChecker(),i=function(){for(const i of t)for(const t of i.references){if(n.has(t)){const e=o(t);return gn.assertIsDefined(e),r.getSymbolAtLocation(e)}const i=RY(t,m,Xe(e,e.fileExists));if(i&&n.has(i)){const e=o(i);if(e)return r.getSymbolAtLocation(e)}}return}();if(!i)return!1;for(const r of t)for(const t of r.references){const r=o(t);if(gn.assertIsDefined(r),n.has(t)||Bce.isDeclarationOfSymbol(r,i)){n.add(t),t.isDefinition=!0;const r=RY(t,m,Xe(e,e.fileExists));r&&n.add(r)}else t.isDefinition=!1}return!0;function o(e){const t=a.getSourceFile(e.fileName);if(!t)return;const n=_Q(t,e.textSpan.start);return Bce.Core.getAdjustedNode(n,{use:Bce.FindReferencesUse.References})}},getApplicableRefactors:function(e,t,n=JG,r,i,o){y();const a=h(e);return h4.getApplicableRefactors(A(a,t,n,JG,r,i),o)},getEditsForRefactor:function(e,t,n,r,i,o=JG,a){y();const s=h(e);return h4.getEditsForRefactor(A(s,n,o,t),r,i,a)},getMoveToRefactoringFileSuggestions:function(t,n,r=JG){y();const i=h(t),o=gn.checkDefined(a.getSourceFiles()),s=sT(t),c=m3(A(i,n,r,JG)),l=g3(null==c?void 0:c.all),_=U(o,e=>{const t=sT(e.fileName);return!(null==a?void 0:a.isSourceFileFromExternalLibrary(i))&&!(i===h(e.fileName)||".ts"===s&&".d.ts"===t||".d.ts"===s&&en(jo(e.fileName),"lib.")&&".d.ts"===t)&&(s===t||(".tsx"===s&&".ts"===t||".jsx"===s&&".js"===t)&&!l)?e.fileName:void 0});return{newFileName:f3(i,a,e,c),files:_}},toLineColumnOffset:function(e,t){return 0===t?{line:0,character:0}:m.toLineColumnOffset(e,t)},getSourceMapper:()=>m,clearSourceMapperCache:()=>m.clearCache(),prepareCallHierarchy:function(e,t){y();const n=C7.resolveCallHierarchyDeclaration(a,_Q(h(e),t));return n&&i0(n,e=>C7.createCallHierarchyItem(a,e))},provideCallHierarchyIncomingCalls:function(e,t){y();const n=h(e),r=o0(C7.resolveCallHierarchyDeclaration(a,0===t?n:_Q(n,t)));return r?C7.getIncomingCalls(a,r,l):[]},provideCallHierarchyOutgoingCalls:function(e,t){y();const n=h(e),r=o0(C7.resolveCallHierarchyDeclaration(a,0===t?n:_Q(n,t)));return r?C7.getOutgoingCalls(a,r):[]},toggleLineComment:D,toggleMultilineComment:E,commentSelection:function(e,t){const n=o.getCurrentSourceFile(e),{firstLine:r,lastLine:i}=N(n,t);return r===i&&t.pos!==t.end?E(e,t,!0):D(e,t,!0)},uncommentSelection:function(e,t){const n=o.getCurrentSourceFile(e),r=[],{pos:i}=t;let{end:a}=t;i===a&&(a+=wQ(n,i)?2:1);for(let t=i;t<=a;t++){const i=PQ(n,t);if(i){switch(i.kind){case 2:r.push(...D(e,{end:i.end,pos:i.pos+1},!1));break;case 3:r.push(...E(e,{end:i.end,pos:i.pos+1},!1))}t=i.end+1}}return r},provideInlayHints:function(t,n,r=JG){y();const i=h(t);return Vle.provideInlayHints(function(t,n,r){return{file:t,program:v(),host:e,span:n,preferences:r,cancellationToken:l}}(i,n,r))},getSupportedCodeFixes:s7,preparePasteEditsForFile:function(e,t){return y(),jfe.preparePasteEdits(h(e),t,a.getTypeChecker())},getPasteEdits:function(t,n){return y(),Rfe.pasteEditsProvider(h(t.targetFile),t.pastedText,t.pasteLocations,t.copiedFrom?{file:h(t.copiedFrom.file),range:t.copiedFrom.range}:void 0,e,t.preferences,jde.getFormatContext(n,e),l)},mapCode:function(t,n,r,i,a){return m_e.mapCode(o.getCurrentSourceFile(t),n,r,e,jde.getFormatContext(i,e),a)}};switch(i){case 0:break;case 1:m7.forEach(e=>I[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:g7.forEach(e=>I[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.Syntactic`)});break;default:gn.assertNever(i)}return I}function y7(e){return e.nameTable||function(e){const t=e.nameTable=new Map;e.forEachChild(function e(n){if(fD(n)&&!NX(n)&&n.escapedText||Uh(n)&&function(e){return gh(e)||284===e.parent.kind||function(e){return e&&e.parent&&213===e.parent.kind&&e.parent.argumentExpression===e}(e)||yh(e)}(n)){const e=Xh(n);t.set(e,void 0===t.get(e)?n.pos:-1)}else if(mD(n)){const e=n.escapedText;t.set(e,void 0===t.get(e)?n.pos:-1)}if(sO(n,e),Lu(n))for(const t of n.jsDoc)sO(t,e)})}(e),e.nameTable}function v7(e){const t=function(e){switch(e.kind){case 11:case 15:case 9:if(168===e.parent.kind)return Bu(e.parent.parent)?e.parent.parent:void 0;case 80:case 296:return!Bu(e.parent)||211!==e.parent.parent.kind&&293!==e.parent.parent.kind||e.parent.name!==e?void 0:e.parent}return}(e);return t&&(vE(t.parent)||rP(t.parent))?t:void 0}function b7(e,t,n,r){const i=lY(e.name);if(!i)return p;if(!n.isUnion()){const e=n.getProperty(i);return e?[e]:p}const o=vE(e.parent)||rP(e.parent)?P(n.types,n=>!t.isTypeInvalidDueToUnionDiscriminant(n,e.parent)):n.types,a=U(o,e=>e.getProperty(i));if(r&&(0===a.length||a.length===n.types.length)){const e=n.getProperty(i);if(e)return[e]}return o.length||a.length?ne(a,bt):U(n.types,e=>e.getProperty(i))}function x7(e){if(mo)return Uo(Lo(Ko(mo.getExecutingFilePath())),Ls(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}function S7(e,t,n){const r=[];n=l2(n,r);const i=nt(e)?e:[e],o=iU(void 0,void 0,kw,n,i,t,!0);return o.diagnostics=Y(o.diagnostics,r),o}Hx({getNodeConstructor:()=>q5,getTokenConstructor:()=>$5,getIdentifierConstructor:()=>K5,getPrivateIdentifierConstructor:()=>H5,getSourceFileConstructor:()=>t7,getSymbolConstructor:()=>W5,getTypeConstructor:()=>G5,getSignatureConstructor:()=>X5,getSourceMapSourceConstructor:()=>n7});var k7={};function T7(e,t){if(e.isDeclarationFile)return;let n=dQ(e,t);const r=e.getLineAndCharacterOfPosition(t).line;if(e.getLineAndCharacterOfPosition(n.getStart(e)).line>r){const t=hQ(n.pos,e);if(!t||e.getLineAndCharacterOfPosition(t.getEnd()).line!==r)return;n=t}if(!(33554432&n.flags))return l(n);function i(t,n){const r=OI(t)?C(t.modifiers,ID):void 0;return Zs(r?is(e.text,r.end):t.getStart(e),(n||t).getEnd())}function o(t,n){return i(t,gQ(n,n.parent,e))}function a(t,n){return t&&r===e.getLineAndCharacterOfPosition(t.getStart(e)).line?l(t):l(n)}function s(t){return l(hQ(t.pos,e))}function c(t){return l(gQ(t,t.parent,e))}function l(t){if(t){const{parent:n}=t;switch(t.kind){case 244:return r(t.declarationList.declarations[0]);case 261:case 173:case 172:return r(t);case 170:return function e(t){if(E_(t.name))return p(t.name);if(function(e){return!!e.initializer||void 0!==e.dotDotDotToken||Lv(e,3)}(t))return i(t);{const n=t.parent,r=n.parameters.indexOf(t);return gn.assert(-1!==r),0!==r?e(n.parameters[r-1]):l(n.body)}}(t);case 263:case 175:case 174:case 178:case 179:case 177:case 219:case 220:return function(e){if(!e.body)return;if(_(e))return i(e);return l(e.body)}(t);case 242:if($f(t))return function(e){const t=e.statements.length?e.statements[0]:e.getLastToken();if(_(e.parent))return a(e.parent,t);return l(t)}(t);case 269:return u(t);case 300:return u(t.block);case 245:return i(t.expression);case 254:return i(t.getChildAt(0),t.expression);case 248:return o(t,t.expression);case 247:return l(t.statement);case 260:return i(t.getChildAt(0));case 246:return o(t,t.expression);case 257:return l(t.statement);case 253:case 252:return i(t.getChildAt(0),t.label);case 249:return function(e){if(e.initializer)return d(e);if(e.condition)return i(e.condition);if(e.incrementor)return i(e.incrementor)}(t);case 250:return o(t,t.expression);case 251:return d(t);case 256:return o(t,t.expression);case 297:case 298:return l(t.statements[0]);case 259:return u(t.tryBlock);case 258:case 278:return i(t,t.expression);case 272:return i(t,t.moduleReference);case 273:case 279:return i(t,t.moduleSpecifier);case 268:if(1!==rB(t))return;case 264:case 267:case 307:case 209:return i(t);case 255:return l(t.statement);case 171:return function(t,n,r){if(t){const i=t.indexOf(n);if(i>=0){let n=i,o=i+1;for(;n>0&&r(t[n-1]);)n--;for(;o0)return l(t.declarations[0])}}function p(e){const t=g(e.elements,e=>233!==e.kind?e:void 0);return t?l(t):209===e.parent.kind?i(e.parent):n(e.parent)}function f(e){gn.assert(208!==e.kind&&207!==e.kind);const t=g(210===e.kind?e.elements:e.properties,e=>233!==e.kind?e:void 0);return t?l(t):i(227===e.parent.kind?e.parent:e)}}}a(k7,{spanInSourceFileAtLocation:()=>T7});var C7={};function w7(e){return LD(e)||hF(e)}function N7(e){return(NE(e)||DE(e)||JE(e))&&w7(e.parent)&&e===e.parent.initializer&&fD(e.parent.name)&&(!!(2&pc(e.parent))||LD(e.parent))}function D7(e){return mP(e)||TF(e)||vF(e)||NE(e)||bF(e)||JE(e)||RD(e)||MD(e)||jD(e)||JD(e)||zD(e)}function E7(e){return mP(e)||TF(e)&&fD(e.name)||vF(e)||bF(e)||RD(e)||MD(e)||jD(e)||JD(e)||zD(e)||function(e){return(NE(e)||JE(e))&&Fc(e)}(e)||N7(e)}function F7(e){return mP(e)?e:Fc(e)?e.name:N7(e)?e.parent.name:gn.checkDefined(e.modifiers&&T(e.modifiers,P7))}function P7(e){return 90===e.kind}function A7(e,t){const n=F7(t);return n&&e.getSymbolAtLocation(n)}function I7(e,t){if(t.body)return t;if(BD(t))return uv(t.parent);if(vF(t)||MD(t)){const n=A7(e,t);return n&&n.valueDeclaration&&d_(n.valueDeclaration)&&n.valueDeclaration.body?n.valueDeclaration:void 0}return t}function O7(e,t){const n=A7(e,t);let r;if(n&&n.declarations){const e=ee(n.declarations),t=O(n.declarations,e=>({file:e.getSourceFile().fileName,pos:e.pos}));e.sort((e,n)=>Ft(t[e].file,t[n].file)||t[e].pos-t[n].pos);const i=O(e,e=>n.declarations[e]);let o;for(const e of i)E7(e)&&(o&&o.parent===e.parent&&o.end===e.pos||(r=le(r,e)),o=e)}return r}function L7(e,t){return RD(t)?t:d_(t)?I7(e,t)??O7(e,t)??t:O7(e,t)??t}function j7(e,t){const n=e.getTypeChecker();let r=!1;for(;;){if(E7(t))return L7(n,t);if(D7(t)){const e=yc(t,E7);return e&&L7(n,e)}if(gh(t)){if(E7(t.parent))return L7(n,t.parent);if(D7(t.parent)){const e=yc(t.parent,E7);return e&&L7(n,e)}return w7(t.parent)&&t.parent.initializer&&N7(t.parent.initializer)?t.parent.initializer:void 0}if(BD(t))return E7(t.parent)?t.parent:void 0;if(126!==t.kind||!RD(t.parent)){if(hF(t)&&t.initializer&&N7(t.initializer))return t.initializer;if(!r){let e=n.getSymbolAtLocation(t);if(e&&(2097152&e.flags&&(e=n.getAliasedSymbol(e)),e.valueDeclaration)){r=!0,t=e.valueDeclaration;continue}}return}t=t.parent}}function M7(e,t){const n=t.getSourceFile(),r=function(e,t){if(mP(t))return{text:t.fileName,pos:0,end:0};if((vF(t)||bF(t))&&!Fc(t)){const e=t.modifiers&&T(t.modifiers,P7);if(e)return{text:"default",pos:e.getStart(),end:e.getEnd()}}if(RD(t)){const n=is(t.getSourceFile().text,Vb(t).pos),r=n+6,i=e.getTypeChecker(),o=i.getSymbolAtLocation(t.parent);return{text:(o?`${i.symbolToString(o,t.parent)} `:"")+"static {}",pos:n,end:r}}const n=N7(t)?t.parent.name:gn.checkDefined(Ac(t),"Expected call hierarchy item to have a name");let r=fD(n)?kc(n):Uh(n)?n.text:FD(n)&&Uh(n.expression)?n.expression.text:void 0;if(void 0===r){const i=e.getTypeChecker(),o=i.getSymbolAtLocation(n);o&&(r=i.symbolToString(o,t))}if(void 0===r){const e=LU();r=pd(n=>e.writeNode(4,t,t.getSourceFile(),n))}return{text:r,pos:n.getStart(),end:n.getEnd()}}(e,t),i=function(e){var t,n,r,i;if(N7(e))return LD(e.parent)&&y_(e.parent.parent)?JE(e.parent.parent)?null==(t=Ic(e.parent.parent))?void 0:t.getText():null==(n=e.parent.parent.name)?void 0:n.getText():CF(e.parent.parent.parent.parent)&&fD(e.parent.parent.parent.parent.parent.name)?e.parent.parent.parent.parent.parent.name.getText():void 0;switch(e.kind){case 178:case 179:case 175:return 211===e.parent.kind?null==(r=Ic(e.parent))?void 0:r.getText():null==(i=Ac(e.parent))?void 0:i.getText();case 263:case 264:case 268:if(CF(e.parent)&&fD(e.parent.parent.name))return e.parent.parent.name.getText()}}(t),o=jX(t),a=OQ(t),s=Zs(is(n.text,t.getFullStart(),!1,!0),t.getEnd()),c=Zs(r.pos,r.end);return{file:n.fileName,kind:o,kindModifiers:a,name:r.text,containerName:i,span:s,selectionSpan:c}}function R7(e){return void 0!==e}function B7(e){if(e.kind===Bce.EntryKind.Node){const{node:t}=e;if(pX(t,!0,!0)||fX(t,!0,!0)||mX(t,!0,!0)||gX(t,!0,!0)||EX(t)||FX(t)){const e=t.getSourceFile();return{declaration:yc(t,E7)||e,range:XQ(t,e)}}}}function J7(e){return pJ(e.declaration)}function z7(e,t,n){if(mP(t)||TF(t)||RD(t))return[];const r=F7(t),i=P(Bce.findReferenceOrRenameEntries(e,n,e.getSourceFiles(),r,0,{use:Bce.FindReferencesUse.References},B7),R7);return i?We(i,J7,t=>function(e,t){return n=M7(e,t[0].declaration),r=O(t,e=>QQ(e.range)),{from:n,fromSpans:r};var n,r}(e,t)):[]}function q7(e,t){const n=[],r=function(e,t){function n(n){const r=TE(n)?n.tag:Nu(n)?n.tagName:Px(n)||RD(n)?n:n.expression,i=j7(e,r);if(i){const e=XQ(r,n.getSourceFile());if(nt(i))for(const n of i)t.push({declaration:n,range:e});else t.push({declaration:i,range:e})}}return function e(t){if(t&&!(33554432&t.flags))if(E7(t)){if(y_(t))for(const n of t.members)n.name&&FD(n.name)&&e(n.name.expression)}else{switch(t.kind){case 80:case 272:case 273:case 279:case 265:case 266:return;case 176:return void n(t);case 217:case 235:case 239:return void e(t.expression);case 261:case 170:return e(t.name),void e(t.initializer);case 214:case 215:return n(t),e(t.expression),void g(t.arguments,e);case 216:return n(t),e(t.tag),void e(t.template);case 287:case 286:return n(t),e(t.tagName),void e(t.attributes);case 171:return n(t),void e(t.expression);case 212:case 213:n(t),sO(t,e)}If(t)||sO(t,e)}}}(e,n);switch(t.kind){case 308:!function(e,t){g(e.statements,t)}(t,r);break;case 268:!function(e,t){!Lv(e,128)&&e.body&&CF(e.body)&&g(e.body.statements,t)}(t,r);break;case 263:case 219:case 220:case 175:case 178:case 179:!function(e,t,n){const r=I7(e,t);r&&(g(r.parameters,n),n(r.body))}(e.getTypeChecker(),t,r);break;case 264:case 232:!function(e,t){g(e.modifiers,t);const n=wh(e);n&&t(n.expression);for(const n of e.members)II(n)&&g(n.modifiers,t),LD(n)?t(n.initializer):BD(n)&&n.body?(g(n.parameters,t),t(n.body)):RD(n)&&t(n)}(t,r);break;case 176:!function(e,t){t(e.body)}(t,r);break;default:gn.assertNever(t)}return n}function U7(e,t){return 33554432&t.flags||jD(t)?[]:We(q7(e,t),J7,t=>function(e,t){return n=M7(e,t[0].declaration),r=O(t,e=>QQ(e.range)),{to:n,fromSpans:r};var n,r}(e,t))}a(C7,{createCallHierarchyItem:()=>M7,getIncomingCalls:()=>z7,getOutgoingCalls:()=>U7,resolveCallHierarchyDeclaration:()=>j7});var V7={};a(V7,{v2020:()=>W7});var W7={};a(W7,{TokenEncodingConsts:()=>P5,TokenModifier:()=>I5,TokenType:()=>A5,getEncodedSemanticClassifications:()=>L5,getSemanticClassifications:()=>O5});var $7={};a($7,{PreserveOptionalFlags:()=>noe,addNewNodeForMemberSymbol:()=>roe,codeFixAll:()=>a8,createCodeFixAction:()=>Q7,createCodeFixActionMaybeFixAll:()=>Y7,createCodeFixActionWithoutFixAll:()=>X7,createCombinedCodeActions:()=>i8,createFileTextChanges:()=>o8,createImportAdder:()=>Pee,createImportSpecifierResolver:()=>Iee,createMissingMemberNodes:()=>eoe,createSignatureDeclarationFromCallExpression:()=>ooe,createSignatureDeclarationFromSignature:()=>ioe,createStubbedBody:()=>goe,eachDiagnostic:()=>s8,findAncestorMatchingSpan:()=>Toe,generateAccessorFromProperty:()=>Coe,getAccessorConvertiblePropertyAtPosition:()=>Eoe,getAllFixes:()=>r8,getFixes:()=>n8,getImportCompletionAction:()=>Oee,getImportKind:()=>Xee,getJSDocTypedefNodes:()=>yee,getNoopSymbolTrackerWithResolver:()=>toe,getPromoteTypeOnlyCompletionAction:()=>Lee,getSupportedErrorCodes:()=>t8,importFixName:()=>Dee,importSymbols:()=>koe,parameterShouldGetTypeFromJSDoc:()=>Q8,registerCodeFix:()=>e8,setJsonCompilerOptionValue:()=>yoe,setJsonCompilerOptionValues:()=>hoe,tryGetAutoImportableReferenceFromTypeNode:()=>xoe,typeNodeToAutoImportableTypeNode:()=>coe,typePredicateToAutoImportableTypeNode:()=>_oe,typeToAutoImportableTypeNode:()=>soe,typeToMinimizedReferenceType:()=>loe});var K7,H7=Qe(),G7=new Map;function X7(e,t,n){return Z7(e,m0(n),t,void 0,void 0)}function Q7(e,t,n,r,i,o){return Z7(e,m0(n),t,r,m0(i),o)}function Y7(e,t,n,r,i,o){return Z7(e,m0(n),t,r,i&&m0(i),o)}function Z7(e,t,n,r,i,o){return{fixName:e,description:t,changes:n,fixId:r,fixAllDescription:i,commands:o?[o]:void 0}}function e8(e){for(const t of e.errorCodes)K7=void 0,H7.add(String(t),e);if(e.fixIds)for(const t of e.fixIds)gn.assert(!G7.has(t)),G7.set(t,e)}function t8(){return K7??(K7=Be(H7.keys()))}function n8(e){const t=c8(e);return R(H7.get(String(e.errorCode)),n=>O(n.getCodeActions(e),function(e,t){const{errorCodes:n}=e;let r=0;for(const e of t)if(D(n,e.code)&&r++,r>1)break;const i=r<2;return({fixId:e,fixAllDescription:t,...n})=>i?n:{...n,fixId:e,fixAllDescription:t}}(n,t)))}function r8(e){return G7.get(st(e.fixId,it)).getAllCodeActions(e)}function i8(e,t){return{changes:e,commands:t}}function o8(e,t){return{fileName:e,textChanges:t}}function a8(e,t,n){const r=[];return i8(sde.ChangeTracker.with(e,i=>s8(e,t,e=>n(i,e,r))),0===r.length?void 0:r)}function s8(e,t,n){for(const r of c8(e))D(t,r.code)&&n(r)}function c8({program:e,sourceFile:t,cancellationToken:n}){const r=[...e.getSemanticDiagnostics(t,n),...e.getSyntacticDiagnostics(t,n),...U1(t,e,n)];return jS(e.getCompilerOptions())&&r.push(...e.getDeclarationDiagnostics(t,n)),r}var l8="addConvertToUnknownForNonOverlappingTypes",_8=[ha.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function u8(e,t,n){const r=UE(n)?kw.createAsExpression(n.expression,kw.createKeywordTypeNode(159)):kw.createTypeAssertion(kw.createKeywordTypeNode(159),n.expression);e.replaceNode(t,n.expression,r)}function d8(e,t){if(!Mm(e))return yc(dQ(e,t),e=>UE(e)||CE(e))}e8({errorCodes:_8,getCodeActions:function(e){const t=d8(e.sourceFile,e.span.start);if(void 0===t)return;const n=sde.ChangeTracker.with(e,n=>u8(n,e.sourceFile,t));return[Q7(l8,n,ha.Add_unknown_conversion_for_non_overlapping_types,l8,ha.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[l8],getAllCodeActions:e=>a8(e,_8,(e,t)=>{const n=d8(t.file,t.start);n&&u8(e,t.file,n)})}),e8({errorCodes:[ha.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,ha.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,ha.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(e){const{sourceFile:t}=e;return[X7("addEmptyExportDeclaration",sde.ChangeTracker.with(e,e=>{const n=kw.createExportDeclaration(void 0,!1,kw.createNamedExports([]),void 0);e.insertNodeAtEndOfScope(t,t,n)}),ha.Add_export_to_make_this_file_into_a_module)]}});var p8="addMissingAsync",f8=[ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,ha.Type_0_is_not_assignable_to_type_1.code,ha.Type_0_is_not_comparable_to_type_1.code];function m8(e,t,n,r){const i=n(n=>function(e,t,n,r){if(r&&r.has(pJ(n)))return;null==r||r.add(pJ(n));const i=kw.replaceModifiers($C(n,!0),kw.createNodeArray(kw.createModifiersFromModifierFlags(1024|Gv(n))));e.replaceNode(t,n,i)}(n,e.sourceFile,t,r));return Q7(p8,i,ha.Add_async_modifier_to_containing_function,p8,ha.Add_all_missing_async_modifiers)}function g8(e,t){if(!t)return;return yc(dQ(e,t.start),n=>n.getStart(e)js(t)?"quit":(DE(n)||MD(n)||NE(n)||vF(n))&&AY(t,HQ(n,e)))}e8({fixIds:[p8],errorCodes:f8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,cancellationToken:r,program:i,span:o}=e,a=T(i.getTypeChecker().getDiagnostics(t,r),function(e,t){return({start:n,length:r,relatedInformation:i,code:o})=>ot(n)&&ot(r)&&AY({start:n,length:r},e)&&o===t&&!!i&&X(i,e=>e.code===ha.Did_you_mean_to_mark_this_function_as_async.code)}(o,n)),s=g8(t,a&&a.relatedInformation&&T(a.relatedInformation,e=>e.code===ha.Did_you_mean_to_mark_this_function_as_async.code));if(!s)return;return[m8(e,s,t=>sde.ChangeTracker.with(e,t))]},getAllCodeActions:e=>{const{sourceFile:t}=e,n=new Set;return a8(e,f8,(r,i)=>{const o=i.relatedInformation&&T(i.relatedInformation,e=>e.code===ha.Did_you_mean_to_mark_this_function_as_async.code),a=g8(t,o);if(!a)return;return m8(e,a,e=>(e(r),[]),n)})}});var h8="addMissingAwait",y8=ha.Property_0_does_not_exist_on_type_1.code,v8=[ha.This_expression_is_not_callable.code,ha.This_expression_is_not_constructable.code],b8=[ha.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,ha.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,ha.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,ha.Operator_0_cannot_be_applied_to_type_1.code,ha.Operator_0_cannot_be_applied_to_types_1_and_2.code,ha.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,ha.This_condition_will_always_return_true_since_this_0_is_always_defined.code,ha.Type_0_is_not_an_array_type.code,ha.Type_0_is_not_an_array_type_or_a_string_type.code,ha.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,ha.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,ha.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,ha.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,ha.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,y8,...v8];function x8(e,t,n,r,i){const o=r0(e,n);return o&&function(e,t,n,r,i){const o=i.getTypeChecker(),a=o.getDiagnostics(e,r);return X(a,({start:e,length:r,relatedInformation:i,code:o})=>ot(e)&&ot(r)&&AY({start:e,length:r},n)&&o===t&&!!i&&X(i,e=>e.code===ha.Did_you_forget_to_use_await.code))}(e,t,n,r,i)&&C8(o)?o:void 0}function S8(e,t,n,r,i,o){const{sourceFile:a,program:s,cancellationToken:c}=e,l=function(e,t,n,r,i){const o=function(e,t){if(bE(e.parent)&&fD(e.parent.expression))return{identifiers:[e.parent.expression],isCompleteFix:!0};if(fD(e))return{identifiers:[e],isCompleteFix:!0};if(LE(e)){let n,r=!0;for(const i of[e.left,e.right]){const e=t.getTypeAtLocation(i);if(t.getPromisedTypeOfPromise(e)){if(!fD(i)){r=!1;continue}(n||(n=[])).push(i)}}return n&&{identifiers:n,isCompleteFix:r}}}(e,i);if(!o)return;let a,s=o.isCompleteFix;for(const e of o.identifiers){const o=i.getSymbolAtLocation(e);if(!o)continue;const c=at(o.valueDeclaration,hF),l=c&&at(c.name,fD),_=Ph(c,244);if(!c||!_||c.type||!c.initializer||_.getSourceFile()!==t||Lv(_,32)||!l||!C8(c.initializer)){s=!1;continue}const u=r.getSemanticDiagnostics(t,n);Bce.Core.eachSymbolReferenceInFile(l,i,t,n=>e!==n&&!T8(n,u,t,i))?s=!1:(a||(a=[])).push({expression:c.initializer,declarationSymbol:o})}return a&&{initializers:a,needsSecondPassForFixAll:!s}}(t,a,c,s,r);if(l){return X7("addMissingAwaitToInitializer",i(e=>{g(l.initializers,({expression:t})=>w8(e,n,a,r,t,o)),o&&l.needsSecondPassForFixAll&&w8(e,n,a,r,t,o)}),1===l.initializers.length?[ha.Add_await_to_initializer_for_0,l.initializers[0].declarationSymbol.name]:ha.Add_await_to_initializers)}}function k8(e,t,n,r,i,o){const a=i(i=>w8(i,n,e.sourceFile,r,t,o));return Q7(h8,a,ha.Add_await,h8,ha.Fix_all_expressions_possibly_missing_await)}function T8(e,t,n,r){const i=bE(e.parent)?e.parent.name:LE(e.parent)?e.parent:e,o=T(t,e=>e.start===i.getStart(n)&&e.start+e.length===i.getEnd());return o&&D(b8,o.code)||1&r.getTypeAtLocation(i).flags}function C8(e){return 65536&e.flags||!!yc(e,e=>e.parent&&DE(e.parent)&&e.parent.body===e||YE(e)&&(263===e.parent.kind||219===e.parent.kind||220===e.parent.kind||175===e.parent.kind))}function w8(e,t,n,r,i,o){if(sF(i.parent)&&!i.parent.awaitModifier){const t=r.getTypeAtLocation(i),o=r.getAnyAsyncIterableType();if(o&&r.isTypeAssignableTo(t,o)){const t=i.parent;return void e.replaceNode(n,t,kw.updateForOfStatement(t,kw.createToken(135),t.initializer,t.expression,t.statement))}}if(LE(i))for(const t of[i.left,i.right]){if(o&&fD(t)){const e=r.getSymbolAtLocation(t);if(e&&o.has(fJ(e)))continue}const i=r.getTypeAtLocation(t),a=r.getPromisedTypeOfPromise(i)?kw.createAwaitExpression(t):t;e.replaceNode(n,t,a)}else if(t===y8&&bE(i.parent)){if(o&&fD(i.parent.expression)){const e=r.getSymbolAtLocation(i.parent.expression);if(e&&o.has(fJ(e)))return}e.replaceNode(n,i.parent.expression,kw.createParenthesizedExpression(kw.createAwaitExpression(i.parent.expression))),N8(e,i.parent.expression,n)}else if(D(v8,t)&&U_(i.parent)){if(o&&fD(i)){const e=r.getSymbolAtLocation(i);if(e&&o.has(fJ(e)))return}e.replaceNode(n,i,kw.createParenthesizedExpression(kw.createAwaitExpression(i))),N8(e,i,n)}else{if(o&&hF(i.parent)&&fD(i.parent.name)){const e=r.getSymbolAtLocation(i.parent.name);if(e&&!$(o,fJ(e)))return}e.replaceNode(n,i,kw.createAwaitExpression(i))}}function N8(e,t,n){const r=hQ(t.pos,n);r&&BZ(r.end,r.parent,n)&&e.insertText(n,t.getStart(n),";")}e8({fixIds:[h8],errorCodes:b8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,span:r,cancellationToken:i,program:o}=e,a=x8(t,n,r,i,o);if(!a)return;const s=e.program.getTypeChecker(),c=t=>sde.ChangeTracker.with(e,t);return se([S8(e,a,n,s,c),k8(e,a,n,s,c)])},getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=e.program.getTypeChecker(),o=new Set;return a8(e,b8,(a,s)=>{const c=x8(t,s.code,s,r,n);if(!c)return;const l=e=>(e(a),[]);return S8(e,c,s.code,i,l,o)||k8(e,c,s.code,i,l,o)})}});var D8="addMissingConst",E8=[ha.Cannot_find_name_0.code,ha.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];function F8(e,t,n,r,i){const o=dQ(t,n),a=yc(o,e=>iu(e.parent)?e.parent.initializer===e:!function(e){switch(e.kind){case 80:case 210:case 211:case 304:case 305:return!0;default:return!1}}(e)&&"quit");if(a)return P8(e,a,t,i);const s=o.parent;if(LE(s)&&64===s.operatorToken.kind&&tF(s.parent))return P8(e,o,t,i);if(yE(s)){const n=r.getTypeChecker();if(!k(s.elements,e=>function(e,t){const n=fD(e)?e:ub(e,!0)&&fD(e.left)?e.left:void 0;return!!n&&!t.getSymbolAtLocation(n)}(e,n)))return;return P8(e,s,t,i)}const c=yc(o,e=>!!tF(e.parent)||!function(e){switch(e.kind){case 80:case 227:case 28:return!0;default:return!1}}(e)&&"quit");if(c){if(!A8(c,r.getTypeChecker()))return;return P8(e,c,t,i)}}function P8(e,t,n,r){r&&!$(r,t)||e.insertModifierBefore(n,87,t)}function A8(e,t){return!!LE(e)&&(28===e.operatorToken.kind?k([e.left,e.right],e=>A8(e,t)):64===e.operatorToken.kind&&fD(e.left)&&!t.getSymbolAtLocation(e.left))}e8({errorCodes:E8,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>F8(t,e.sourceFile,e.span.start,e.program));if(t.length>0)return[Q7(D8,t,ha.Add_const_to_unresolved_variable,D8,ha.Add_const_to_all_unresolved_variables)]},fixIds:[D8],getAllCodeActions:e=>{const t=new Set;return a8(e,E8,(n,r)=>F8(n,r.file,r.start,e.program,t))}});var I8="addMissingDeclareProperty",O8=[ha.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function L8(e,t,n,r){const i=dQ(t,n);if(!fD(i))return;const o=i.parent;173!==o.kind||r&&!$(r,o)||e.insertModifierBefore(t,138,o)}e8({errorCodes:O8,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>L8(t,e.sourceFile,e.span.start));if(t.length>0)return[Q7(I8,t,ha.Prefix_with_declare,I8,ha.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[I8],getAllCodeActions:e=>{const t=new Set;return a8(e,O8,(e,n)=>L8(e,n.file,n.start,t))}});var j8="addMissingInvocationForDecorator",M8=[ha._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function R8(e,t,n){const r=yc(dQ(t,n),ID);gn.assert(!!r,"Expected position to be owned by a decorator.");const i=kw.createCallExpression(r.expression,void 0,void 0);e.replaceNode(t,r.expression,i)}e8({errorCodes:M8,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>R8(t,e.sourceFile,e.span.start));return[Q7(j8,t,ha.Call_decorator_expression,j8,ha.Add_to_all_uncalled_decorators)]},fixIds:[j8],getAllCodeActions:e=>a8(e,M8,(e,t)=>R8(e,t.file,t.start))});var B8="addMissingResolutionModeImportAttribute",J8=[ha.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code,ha.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code];function z8(e,t,n,r,i,o){var a,s,c;const l=yc(dQ(t,n),an(EF,dE));gn.assert(!!l,"Expected position to be owned by an ImportDeclaration or ImportType.");const _=0===bY(t,o),u=Cg(l),d=!u||(null==(a=XM(u.text,t.fileName,r.getCompilerOptions(),i,r.getModuleResolutionCache(),void 0,99).resolvedModule)?void 0:a.resolvedFileName)===(null==(c=null==(s=r.getResolvedModuleFromModuleSpecifier(u,t))?void 0:s.resolvedModule)?void 0:c.resolvedFileName),p=l.attributes?kw.updateImportAttributes(l.attributes,kw.createNodeArray([...l.attributes.elements,kw.createImportAttribute(kw.createStringLiteral("resolution-mode",_),kw.createStringLiteral(d?"import":"require",_))],l.attributes.elements.hasTrailingComma),l.attributes.multiLine):kw.createImportAttributes(kw.createNodeArray([kw.createImportAttribute(kw.createStringLiteral("resolution-mode",_),kw.createStringLiteral(d?"import":"require",_))]));273===l.kind?e.replaceNode(t,l,kw.updateImportDeclaration(l,l.modifiers,l.importClause,l.moduleSpecifier,p)):e.replaceNode(t,l,kw.updateImportTypeNode(l,l.argument,p,l.qualifier,l.typeArguments))}e8({errorCodes:J8,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>z8(t,e.sourceFile,e.span.start,e.program,e.host,e.preferences));return[Q7(B8,t,ha.Add_resolution_mode_import_attribute,B8,ha.Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it)]},fixIds:[B8],getAllCodeActions:e=>a8(e,J8,(t,n)=>z8(t,n.file,n.start,e.program,e.host,e.preferences))});var q8="addNameToNamelessParameter",U8=[ha.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function V8(e,t,n){const r=dQ(t,n),i=r.parent;if(!AD(i))return gn.fail("Tried to add a parameter name to a non-parameter: "+gn.formatSyntaxKind(r.kind));const o=i.parent.parameters.indexOf(i);gn.assert(!i.type,"Tried to add a parameter name to a parameter that already had one."),gn.assert(o>-1,"Parameter not found in parent parameter list.");let a=i.name.getEnd(),s=kw.createTypeReferenceNode(i.name,void 0),c=W8(t,i);for(;c;)s=kw.createArrayTypeNode(s),a=c.getEnd(),c=W8(t,c);const l=kw.createParameterDeclaration(i.modifiers,i.dotDotDotToken,"arg"+o,i.questionToken,i.dotDotDotToken&&!QD(s)?kw.createArrayTypeNode(s):s,i.initializer);e.replaceRange(t,Jb(i.getStart(t),a),l)}function W8(e,t){const n=gQ(t.name,t.parent,e);if(n&&23===n.kind&&gE(n.parent)&&AD(n.parent.parent))return n.parent.parent}e8({errorCodes:U8,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>V8(t,e.sourceFile,e.span.start));return[Q7(q8,t,ha.Add_parameter_name,q8,ha.Add_names_to_all_parameters_without_names)]},fixIds:[q8],getAllCodeActions:e=>a8(e,U8,(e,t)=>V8(e,t.file,t.start))});var $8="addOptionalPropertyUndefined";function K8(e,t){var n;if(e){if(LE(e.parent)&&64===e.parent.operatorToken.kind)return{source:e.parent.right,target:e.parent.left};if(hF(e.parent)&&e.parent.initializer)return{source:e.parent.initializer,target:e.parent.name};if(SE(e.parent)){const n=t.getSymbolAtLocation(e.parent.expression);if(!(null==n?void 0:n.valueDeclaration)||!m_(n.valueDeclaration.kind))return;if(!Q_(e))return;const r=e.parent.arguments.indexOf(e);if(-1===r)return;const i=n.valueDeclaration.parameters[r].name;if(fD(i))return{source:e,target:i}}else if(uP(e.parent)&&fD(e.parent.name)||dP(e.parent)){const r=K8(e.parent.parent,t);if(!r)return;const i=t.getPropertyOfType(t.getTypeAtLocation(r.target),e.parent.name.text),o=null==(n=null==i?void 0:i.declarations)?void 0:n[0];if(!o)return;return{source:uP(e.parent)?e.parent.initializer:e.parent.name,target:o}}}}e8({errorCodes:[ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code],getCodeActions(e){const t=e.program.getTypeChecker(),n=function(e,t,n){var r,i;const o=K8(r0(e,t),n);if(!o)return p;const{source:a,target:s}=o,c=function(e,t,n){return bE(t)&&!!n.getExactOptionalProperties(n.getTypeAtLocation(t.expression)).length&&n.getTypeAtLocation(e)===n.getUndefinedType()}(a,s,n)?n.getTypeAtLocation(s.expression):n.getTypeAtLocation(s);if(null==(i=null==(r=c.symbol)?void 0:r.declarations)?void 0:i.some(e=>wd(e).fileName.match(/\.d\.ts$/)))return p;return n.getExactOptionalProperties(c)}(e.sourceFile,e.span,t);if(!n.length)return;const r=sde.ChangeTracker.with(e,e=>function(e,t){for(const n of t){const t=n.valueDeclaration;if(t&&(OD(t)||LD(t))&&t.type){const n=kw.createUnionTypeNode([...193===t.type.kind?t.type.types:[t.type],kw.createTypeReferenceNode("undefined")]);e.replaceNode(t.getSourceFile(),t.type,n)}}}(e,n));return[X7($8,r,ha.Add_undefined_to_optional_property_type)]},fixIds:[$8]});var H8="annotateWithTypeFromJSDoc",G8=[ha.JSDoc_types_may_be_moved_to_TypeScript_types.code];function X8(e,t){const n=dQ(e,t);return at(AD(n.parent)?n.parent.parent:n.parent,Q8)}function Q8(e){return function(e){return d_(e)||261===e.kind||172===e.kind||173===e.kind}(e)&&Y8(e)}function Y8(e){return d_(e)?e.parameters.some(Y8)||!e.type&&!!_l(e):!e.type&&!!ll(e)}function Z8(e,t,n){if(d_(n)&&(_l(n)||n.parameters.some(e=>!!ll(e)))){if(!n.typeParameters){const r=Tv(n);r.length&&e.insertTypeParameters(t,n,r)}const r=DE(n)&&!YX(n,21,t);r&&e.insertNodeBefore(t,xe(n.parameters),kw.createToken(21));for(const r of n.parameters)if(!r.type){const n=ll(r);n&&e.tryInsertTypeAnnotation(t,r,kJ(n,e9,N_))}if(r&&e.insertNodeAfter(t,Te(n.parameters),kw.createToken(22)),!n.type){const r=_l(n);r&&e.tryInsertTypeAnnotation(t,n,kJ(r,e9,N_))}}else{const r=gn.checkDefined(ll(n),"A JSDocType for this declaration should exist");gn.assert(!n.type,"The JSDocType decl should have a type"),e.tryInsertTypeAnnotation(t,n,kJ(r,e9,N_))}}function e9(e){switch(e.kind){case 313:case 314:return kw.createTypeReferenceNode("any",p);case 317:return function(e){return kw.createUnionTypeNode([kJ(e.type,e9,N_),kw.createTypeReferenceNode("undefined",p)])}(e);case 316:return e9(e.type);case 315:return function(e){return kw.createUnionTypeNode([kJ(e.type,e9,N_),kw.createTypeReferenceNode("null",p)])}(e);case 319:return function(e){return kw.createArrayTypeNode(kJ(e.type,e9,N_))}(e);case 318:return function(e){return kw.createFunctionTypeNode(p,e.parameters.map(t9),e.type??kw.createKeywordTypeNode(133))}(e);case 184:return function(e){let t=e.typeName,n=e.typeArguments;if(fD(e.typeName)){if(zm(e))return function(e){const t=kw.createParameterDeclaration(void 0,void 0,150===e.typeArguments[0].kind?"n":"s",void 0,kw.createTypeReferenceNode(150===e.typeArguments[0].kind?"number":"string",[]),void 0),n=kw.createTypeLiteralNode([kw.createIndexSignature(void 0,[t],e.typeArguments[1])]);return Ew(n,1),n}(e);let r=e.typeName.text;switch(e.typeName.text){case"String":case"Boolean":case"Object":case"Number":r=r.toLowerCase();break;case"array":case"date":case"promise":r=r[0].toUpperCase()+r.slice(1)}t=kw.createIdentifier(r),n="Array"!==r&&"Promise"!==r||e.typeArguments?TJ(e.typeArguments,e9,N_):kw.createNodeArray([kw.createTypeReferenceNode("any",p)])}return kw.createTypeReferenceNode(t,n)}(e);case 323:return function(e){const t=kw.createTypeLiteralNode(O(e.jsDocPropertyTags,e=>kw.createPropertySignature(void 0,fD(e.name)?e.name:e.name.right,eC(e)?kw.createToken(58):void 0,e.typeExpression&&kJ(e.typeExpression.type,e9,N_)||kw.createKeywordTypeNode(133))));return Ew(t,1),t}(e);default:const t=IJ(e,e9,void 0);return Ew(t,1),t}}function t9(e){const t=e.parent.parameters.indexOf(e),n=319===e.type.kind&&t===e.parent.parameters.length-1,r=e.name||(n?"rest":"arg"+t),i=n?kw.createToken(26):e.dotDotDotToken;return kw.createParameterDeclaration(e.modifiers,i,r,e.questionToken,kJ(e.type,e9,N_),e.initializer)}e8({errorCodes:G8,getCodeActions(e){const t=X8(e.sourceFile,e.span.start);if(!t)return;const n=sde.ChangeTracker.with(e,n=>Z8(n,e.sourceFile,t));return[Q7(H8,n,ha.Annotate_with_type_from_JSDoc,H8,ha.Annotate_everything_with_types_from_JSDoc)]},fixIds:[H8],getAllCodeActions:e=>a8(e,G8,(e,t)=>{const n=X8(t.file,t.start);n&&Z8(e,t.file,n)})});var n9="convertFunctionToEs6Class",r9=[ha.This_constructor_function_may_be_converted_to_a_class_declaration.code];function i9(e,t,n,r,i,o){const a=r.getSymbolAtLocation(dQ(t,n));if(!(a&&a.valueDeclaration&&19&a.flags))return;const s=a.valueDeclaration;if(vF(s)||NE(s))e.replaceNode(t,s,function(e){const t=c(a);e.body&&t.unshift(kw.createConstructorDeclaration(void 0,e.parameters,e.body));const n=o9(e,95);return kw.createClassDeclaration(n,e.name,void 0,void 0,t)}(s));else if(hF(s)){const n=function(e){const t=e.initializer;if(!t||!NE(t)||!fD(e.name))return;const n=c(e.symbol);t.body&&n.unshift(kw.createConstructorDeclaration(void 0,t.parameters,t.body));const r=o9(e.parent.parent,95);return kw.createClassDeclaration(r,e.name,void 0,void 0,n)}(s);if(!n)return;const r=s.parent.parent;yF(s.parent)&&s.parent.declarations.length>1?(e.delete(t,s),e.insertNodeAfter(t,r,n)):e.replaceNode(t,r,n)}function c(n){const r=[];return n.exports&&n.exports.forEach(e=>{if("prototype"===e.name&&e.declarations){const t=e.declarations[0];if(1===e.declarations.length&&bE(t)&&LE(t.parent)&&64===t.parent.operatorToken.kind&&vE(t.parent.right)){a(t.parent.right.symbol,void 0,r)}}else a(e,[kw.createToken(126)],r)}),n.members&&n.members.forEach((i,o)=>{var s,c,l,_;if("constructor"===o&&i.valueDeclaration){const r=null==(_=null==(l=null==(c=null==(s=n.exports)?void 0:s.get("prototype"))?void 0:c.declarations)?void 0:l[0])?void 0:_.parent;return void(r&&LE(r)&&vE(r.right)&&X(r.right.properties,a9)||e.delete(t,i.valueDeclaration.parent))}a(i,void 0,r)}),r;function a(n,r,a){if(!(8192&n.flags||4096&n.flags))return;const s=n.valueDeclaration,c=s.parent,l=c.right;if(u=l,!(Px(_=s)?bE(_)&&a9(_)||__(u):k(_.properties,e=>!!(MD(e)||bl(e)||uP(e)&&NE(e.initializer)&&e.name||a9(e)))))return;var _,u;if(X(a,e=>{const t=Ac(e);return!(!t||!fD(t)||kc(t)!==Cc(n))}))return;const d=c.parent&&245===c.parent.kind?c.parent:c;if(e.delete(t,d),l){if(Px(s)&&(NE(l)||DE(l))){const e=bY(t,i),n=function(e,t,n){if(bE(e))return e.name;const r=e.argumentExpression;if(GN(r))return r;if(Uu(r))return Ss(r.text,wS(t))?kw.createIdentifier(r.text):eD(r)?kw.createStringLiteral(r.text,0===n):r;return}(s,o,e);return void(n&&p(a,l,n))}if(!vE(l)){if(jm(t))return;if(!bE(s))return;const e=kw.createPropertyDeclaration(r,s.name,void 0,void 0,l);return bZ(c.parent,e,t),void a.push(e)}g(l.properties,e=>{(MD(e)||bl(e))&&a.push(e),uP(e)&&NE(e.initializer)&&p(a,e.initializer,e.name),a9(e)})}else a.push(kw.createPropertyDeclaration(r,n.name,void 0,void 0,void 0));function p(e,n,i){return NE(n)?function(e,n,i){const o=Y(r,o9(n,134)),a=kw.createMethodDeclaration(o,void 0,i,void 0,void 0,n.parameters,void 0,n.body);return bZ(c,a,t),void e.push(a)}(e,n,i):function(e,n,i){const o=n.body;let a;a=242===o.kind?o:kw.createBlock([kw.createReturnStatement(o)]);const s=Y(r,o9(n,134)),l=kw.createMethodDeclaration(s,void 0,i,void 0,void 0,n.parameters,void 0,a);bZ(c,l,t),e.push(l)}(e,n,i)}}}}function o9(e,t){return II(e)?P(e.modifiers,e=>e.kind===t):void 0}function a9(e){return!!e.name&&!(!fD(e.name)||"constructor"!==e.name.text)}e8({errorCodes:r9,getCodeActions(e){const t=sde.ChangeTracker.with(e,t=>i9(t,e.sourceFile,e.span.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions()));return[Q7(n9,t,ha.Convert_function_to_an_ES2015_class,n9,ha.Convert_all_constructor_functions_to_classes)]},fixIds:[n9],getAllCodeActions:e=>a8(e,r9,(t,n)=>i9(t,n.file,n.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions()))});var s9="convertToAsyncFunction",c9=[ha.This_may_be_converted_to_an_async_function.code],l9=!0;function _9(e,t,n,r){const i=dQ(t,n);let o;if(o=fD(i)&&hF(i.parent)&&i.parent.initializer&&d_(i.parent.initializer)?i.parent.initializer:at(tm(dQ(t,n)),Z1),!o)return;const a=new Map,s=Mm(o),c=function(e,t){if(!e.body)return new Set;const n=new Set;return sO(e.body,function e(r){u9(r,t,"then")?(n.add(pJ(r)),g(r.arguments,e)):u9(r,t,"catch")||u9(r,t,"finally")?(n.add(pJ(r)),sO(r,e)):f9(r,t)?n.add(pJ(r)):sO(r,e)}),n}(o,r),l=function(e,t,n){const r=new Map,i=Qe();return sO(e,function e(o){if(!fD(o))return void sO(o,e);const a=t.getSymbolAtLocation(o);if(a){const e=N9(t.getTypeAtLocation(o),t),s=fJ(a).toString();if(!e||AD(o.parent)||d_(o.parent)||n.has(s)){if(o.parent&&(AD(o.parent)||hF(o.parent)||hE(o.parent))){const e=o.text,t=i.get(e);if(t&&t.some(e=>e!==a)){const t=m9(o,i);r.set(s,t.identifier),n.set(s,t),i.add(e,a)}else{const t=$C(o);n.set(s,P9(t)),i.add(e,a)}}}else{const t=ve(e.parameters),r=(null==t?void 0:t.valueDeclaration)&&AD(t.valueDeclaration)&&at(t.valueDeclaration.name,fD)||kw.createUniqueName("result",16),o=m9(r,i);n.set(s,o),i.add(r.text,a)}}}),KC(e,!0,e=>{if(hE(e)&&fD(e.name)&&mE(e.parent)){const n=t.getSymbolAtLocation(e.name),i=n&&r.get(String(fJ(n)));if(i&&i.text!==(e.name||e.propertyName).getText())return kw.createBindingElement(e.dotDotDotToken,e.propertyName||e.name,i,e.initializer)}else if(fD(e)){const n=t.getSymbolAtLocation(e),i=n&&r.get(String(fJ(n)));if(i)return kw.createIdentifier(i.text)}})}(o,r,a);if(!$1(l,r))return;const _=l.body&&YE(l.body)?function(e,t){const n=[];return Lf(e,e=>{K1(e,t)&&n.push(e)}),n}(l.body,r):p,u={checker:r,synthNamesMap:a,setOfExpressionsToReturn:c,isInJSFile:s};if(!_.length)return;const d=is(t.text,Vb(o).pos);e.insertModifierAt(t,d,134,{suffix:" "});for(const n of _)if(sO(n,function r(i){if(SE(i)){const r=y9(i,i,u,!1);if(g9())return!0;e.replaceNodeWithNodes(t,n,r)}else if(!__(i)&&(sO(i,r),g9()))return!0}),g9())return}function u9(e,t,n){if(!SE(e))return!1;const r=kX(e,n)&&t.getTypeAtLocation(e);return!(!r||!t.getPromisedTypeOfPromise(r))}function d9(e,t){return!!(4&Tx(e))&&e.target===t}function p9(e,t,n){if("finally"===e.expression.name.escapedText)return;const r=n.getTypeAtLocation(e.expression.expression);if(d9(r,n.getPromiseType())||d9(r,n.getPromiseLikeType())){if("then"!==e.expression.name.escapedText)return ye(e.typeArguments,0);if(t===ye(e.arguments,0))return ye(e.typeArguments,0);if(t===ye(e.arguments,1))return ye(e.typeArguments,1)}}function f9(e,t){return!!Q_(e)&&!!t.getPromisedTypeOfPromise(t.getTypeAtLocation(e))}function m9(e,t){const n=(t.get(e.text)||p).length;return P9(0===n?e:kw.createIdentifier(e.text+"_"+n))}function g9(){return!l9}function h9(){return l9=!1,p}function y9(e,t,n,r,i){if(u9(t,n.checker,"then"))return function(e,t,n,r,i,o){if(!t||v9(r,t))return S9(e,n,r,i,o);if(n&&!v9(r,n))return h9();const a=E9(t,r),s=y9(e.expression.expression,e.expression.expression,r,!0,a);if(g9())return h9();const c=C9(t,i,o,a,e,r);return g9()?h9():Y(s,c)}(t,ye(t.arguments,0),ye(t.arguments,1),n,r,i);if(u9(t,n.checker,"catch"))return S9(t,ye(t.arguments,0),n,r,i);if(u9(t,n.checker,"finally"))return function(e,t,n,r,i){if(!t||v9(n,t))return y9(e,e.expression.expression,n,r,i);const o=b9(e,n,i),a=y9(e,e.expression.expression,n,!0,o);if(g9())return h9();const s=C9(t,r,void 0,void 0,e,n);if(g9())return h9();const c=kw.createBlock(a),l=kw.createBlock(s),_=kw.createTryStatement(c,void 0,l);return x9(e,n,_,o,i)}(t,ye(t.arguments,0),n,r,i);if(bE(t))return y9(e,t.expression,n,r,i);const o=n.checker.getTypeAtLocation(t);return o&&n.checker.getPromisedTypeOfPromise(o)?(gn.assertNode(hc(t).parent,bE),function(e,t,n,r,i){if(M9(e,n)){let e=$C(t);return r&&(e=kw.createAwaitExpression(e)),[kw.createReturnStatement(e)]}return k9(i,kw.createAwaitExpression(t),void 0)}(e,t,n,r,i)):h9()}function v9({checker:e},t){if(106===t.kind)return!0;if(fD(t)&&!Yl(t)&&"undefined"===kc(t)){const n=e.getSymbolAtLocation(t);return!n||e.isUndefinedSymbol(n)}return!1}function b9(e,t,n){let r;return n&&!M9(e,t)&&(j9(n)?(r=n,t.synthNamesMap.forEach((e,r)=>{if(e.identifier.text===n.identifier.text){const e=(i=n,P9(kw.createUniqueName(i.identifier.text,16)));t.synthNamesMap.set(r,e)}var i})):r=P9(kw.createUniqueName("result",16),n.types),L9(r)),r}function x9(e,t,n,r,i){const o=[];let a;if(r&&!M9(e,t)){a=$C(L9(r));const e=r.types,n=t.checker.getUnionType(e,2),i=t.isInJSFile?void 0:t.checker.typeToTypeNode(n,void 0,void 0),s=[kw.createVariableDeclaration(a,void 0,i)],c=kw.createVariableStatement(void 0,kw.createVariableDeclarationList(s,1));o.push(c)}return o.push(n),i&&a&&1===i.kind&&o.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration($C(O9(i)),void 0,void 0,a)],2))),o}function S9(e,t,n,r,i){if(!t||v9(n,t))return y9(e,e.expression.expression,n,r,i);const o=E9(t,n),a=b9(e,n,i),s=y9(e,e.expression.expression,n,!0,a);if(g9())return h9();const c=C9(t,r,a,o,e,n);if(g9())return h9();const l=kw.createBlock(s),_=kw.createCatchClause(o&&$C(I9(o)),kw.createBlock(c));return x9(e,n,kw.createTryStatement(l,_,void 0),a,i)}function k9(e,t,n){return!e||F9(e)?[kw.createExpressionStatement(t)]:j9(e)&&e.hasBeenDeclared?[kw.createExpressionStatement(kw.createAssignment($C(A9(e)),t))]:[kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration($C(I9(e)),void 0,n,t)],2))]}function T9(e,t){if(t&&e){const n=kw.createUniqueName("result",16);return[...k9(P9(n),e,t),kw.createReturnStatement(n)]}return[kw.createReturnStatement(e)]}function C9(e,t,n,r,i,o){var a;switch(e.kind){case 106:break;case 212:case 80:if(!r)break;const s=kw.createCallExpression($C(e),void 0,j9(r)?[A9(r)]:[]);if(M9(i,o))return T9(s,p9(i,e,o.checker));const c=o.checker.getTypeAtLocation(e),l=o.checker.getSignaturesOfType(c,0);if(!l.length)return h9();const _=l[0].getReturnType(),u=k9(n,kw.createAwaitExpression(s),p9(i,e,o.checker));return n&&n.types.push(o.checker.getAwaitedType(_)||_),u;case 219:case 220:{const r=e.body,s=null==(a=N9(o.checker.getTypeAtLocation(e),o.checker))?void 0:a.getReturnType();if(YE(r)){let a=[],c=!1;for(const l of r.statements)if(_F(l))if(c=!0,K1(l,o.checker))a=a.concat(D9(o,l,t,n));else{const t=s&&l.expression?w9(o.checker,s,l.expression):l.expression;a.push(...T9(t,p9(i,e,o.checker)))}else{if(t&&Lf(l,_t))return h9();a.push(l)}return M9(i,o)?a.map(e=>$C(e)):function(e,t,n,r){const i=[];for(const r of e)if(_F(r)){if(r.expression){const e=f9(r.expression,n.checker)?kw.createAwaitExpression(r.expression):r.expression;void 0===t?i.push(kw.createExpressionStatement(e)):j9(t)&&t.hasBeenDeclared?i.push(kw.createExpressionStatement(kw.createAssignment(A9(t),e))):i.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(I9(t),void 0,void 0,e)],2)))}}else i.push($C(r));r||void 0===t||i.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(I9(t),void 0,void 0,kw.createIdentifier("undefined"))],2)));return i}(a,n,o,c)}{const a=H1(r,o.checker)?D9(o,kw.createReturnStatement(r),t,n):p;if(a.length>0)return a;if(s){const t=w9(o.checker,s,r);if(M9(i,o))return T9(t,p9(i,e,o.checker));{const e=k9(n,t,void 0);return n&&n.types.push(o.checker.getAwaitedType(s)||s),e}}return h9()}}default:return h9()}return p}function w9(e,t,n){const r=$C(n);return e.getPromisedTypeOfPromise(t)?kw.createAwaitExpression(r):r}function N9(e,t){return ke(t.getSignaturesOfType(e,0))}function D9(e,t,n,r){let i=[];return sO(t,function t(o){if(SE(o)){const t=y9(o,o,e,n,r);if(i=i.concat(t),i.length>0)return}else __(o)||sO(o,t)}),i}function E9(e,t){const n=[];let r;if(d_(e)){if(e.parameters.length>0){r=function e(t){if(fD(t))return i(t);const n=R(t.elements,t=>zE(t)?[]:[e(t.name)]);return function(e,t=p,n=[]){return{kind:1,bindingPattern:e,elements:t,types:n}}(t,n)}(e.parameters[0].name)}}else fD(e)?r=i(e):bE(e)&&fD(e.name)&&(r=i(e.name));if(r&&(!("identifier"in r)||"undefined"!==r.identifier.text))return r;function i(e){var r;const i=function(e){var n;return(null==(n=at(e,pu))?void 0:n.symbol)??t.checker.getSymbolAtLocation(e)}((r=e).original?r.original:r);if(!i)return P9(e,n);return t.synthNamesMap.get(fJ(i).toString())||P9(e,n)}}function F9(e){return!e||(j9(e)?!e.identifier.text:k(e.elements,F9))}function P9(e,t=[]){return{kind:0,identifier:e,types:t,hasBeenDeclared:!1,hasBeenReferenced:!1}}function A9(e){return e.hasBeenReferenced=!0,e.identifier}function I9(e){return j9(e)?L9(e):O9(e)}function O9(e){for(const t of e.elements)I9(t);return e.bindingPattern}function L9(e){return e.hasBeenDeclared=!0,e.identifier}function j9(e){return 0===e.kind}function M9(e,t){return!!e.original&&t.setOfExpressionsToReturn.has(pJ(e.original))}function R9(e,t,n,r,i){var o;for(const a of e.imports){const s=null==(o=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:o.resolvedModule;if(!s||s.resolvedFileName!==t.fileName)continue;const c=wg(a);switch(c.kind){case 272:r.replaceNode(e,c,gY(c.name,void 0,a,i));break;case 214:qm(c,!1)&&r.replaceNode(e,c,kw.createPropertyAccessExpression($C(c),"default"))}}}function B9(e,t){e.forEachChild(function n(r){if(bE(r)&&dB(e,r.expression)&&fD(r.name)){const{parent:e}=r;t(r,LE(e)&&e.left===r&&64===e.operatorToken.kind)}r.forEachChild(n)})}function J9(e,t,n,r,i,o,a,s,c){switch(t.kind){case 244:return z9(e,t,r,n,i,o,c),!1;case 245:{const{expression:i}=t;switch(i.kind){case 214:return qm(i,!0)&&r.replaceNode(e,t,gY(void 0,void 0,i.arguments[0],c)),!1;case 227:{const{operatorToken:t}=i;return 64===t.kind&&function(e,t,n,r,i,o){const{left:a,right:s}=n;if(!bE(a))return!1;if(dB(e,a)){if(!dB(e,s)){const i=vE(s)?function(e,t){const n=q(e.properties,e=>{switch(e.kind){case 178:case 179:case 305:case 306:return;case 304:return fD(e.name)?function(e,t,n){const r=[kw.createToken(95)];switch(t.kind){case 219:{const{name:n}=t;if(n&&n.text!==e)return i()}case 220:return H9(e,r,t,n);case 232:return function(e,t,n,r){return kw.createClassDeclaration(Y(t,GC(n.modifiers)),e,GC(n.typeParameters),GC(n.heritageClauses),V9(n.members,r))}(e,r,t,n);default:return i()}function i(){return Q9(r,kw.createIdentifier(e),V9(t,n))}}(e.name.text,e.initializer,t):void 0;case 175:return fD(e.name)?H9(e.name.text,[kw.createToken(95)],e,t):void 0;default:gn.assertNever(e,`Convert to ES6 got invalid prop kind ${e.kind}`)}});return n&&[n,!1]}(s,o):qm(s,!0)?function(e,t){const n=e.text,r=t.getSymbolAtLocation(e),i=r?r.exports:f;return i.has("export=")?[[U9(n)],!0]:i.has("default")?i.size>1?[[q9(n),U9(n)],!0]:[[U9(n)],!0]:[[q9(n)],!1]}(s.arguments[0],t):void 0;return i?(r.replaceNodeWithNodes(e,n.parent,i[0]),i[1]):(r.replaceRangeWithText(e,Jb(a.getStart(e),s.pos),"export default"),!0)}r.delete(e,n.parent)}else dB(e,a.expression)&&function(e,t,n,r){const{text:i}=t.left.name,o=r.get(i);if(void 0!==o){const r=[Q9(void 0,o,t.right),Y9([kw.createExportSpecifier(!1,o,i)])];n.replaceNodeWithNodes(e,t.parent,r)}else!function({left:e,right:t,parent:n},r,i){const o=e.name.text;if(!(NE(t)||DE(t)||JE(t))||t.name&&t.name.text!==o)i.replaceNodeRangeWithNodes(r,e.expression,YX(e,25,r),[kw.createToken(95),kw.createToken(87)],{joiner:" ",suffix:" "});else{i.replaceRange(r,{pos:e.getStart(r),end:t.getStart(r)},kw.createToken(95),{suffix:" "}),t.name||i.insertName(r,t,o);const a=YX(n,27,r);a&&i.delete(r,a)}}(t,e,n)}(e,n,r,i);return!1}(e,n,i,r,a,s)}}}default:return!1}}function z9(e,t,n,r,i,o,a){const{declarationList:s}=t;let c=!1;const l=O(s.declarations,t=>{const{name:n,initializer:l}=t;if(l){if(dB(e,l))return c=!0,Z9([]);if(qm(l,!0))return c=!0,function(e,t,n,r,i,o){switch(e.kind){case 207:{const n=q(e.elements,e=>e.dotDotDotToken||e.initializer||e.propertyName&&!fD(e.propertyName)||!fD(e.name)?void 0:X9(e.propertyName&&e.propertyName.text,e.name.text));if(n)return Z9([gY(void 0,n,t,o)])}case 208:{const n=W9(l0(t.text,i),r);return Z9([gY(kw.createIdentifier(n),void 0,t,o),Q9(void 0,$C(e),kw.createIdentifier(n))])}case 80:return function(e,t,n,r,i){const o=n.getSymbolAtLocation(e),a=new Map;let s,c=!1;for(const t of r.original.get(e.text)){if(n.getSymbolAtLocation(t)!==o||t===e)continue;const{parent:i}=t;if(bE(i)){const{name:{text:e}}=i;if("default"===e){c=!0;const e=t.getText();(s??(s=new Map)).set(i,kw.createIdentifier(e))}else{gn.assert(i.expression===t,"Didn't expect expression === use");let n=a.get(e);void 0===n&&(n=W9(e,r),a.set(e,n)),(s??(s=new Map)).set(i,kw.createIdentifier(n))}}else c=!0}const l=0===a.size?void 0:Be(L(a.entries(),([e,t])=>kw.createImportSpecifier(!1,e===t?void 0:kw.createIdentifier(e),kw.createIdentifier(t))));l||(c=!0);return Z9([gY(c?$C(e):void 0,l,t,i)],s)}(e,t,n,r,o);default:return gn.assertNever(e,`Convert to ES module got invalid name kind ${e.kind}`)}}(n,l.arguments[0],r,i,o,a);if(bE(l)&&qm(l.expression,!0))return c=!0,function(e,t,n,r,i){switch(e.kind){case 207:case 208:{const o=W9(t,r);return Z9([G9(o,t,n,i),Q9(void 0,e,kw.createIdentifier(o))])}case 80:return Z9([G9(e.text,t,n,i)]);default:return gn.assertNever(e,`Convert to ES module got invalid syntax form ${e.kind}`)}}(n,l.name.text,l.expression.arguments[0],i,a)}return Z9([kw.createVariableStatement(void 0,kw.createVariableDeclarationList([t],s.flags))])});if(c){let r;return n.replaceNodeWithNodes(e,t,R(l,e=>e.newImports)),g(l,e=>{e.useSitesToUnqualify&&dd(e.useSitesToUnqualify,r??(r=new Map))}),r}}function q9(e){return Y9(void 0,e)}function U9(e){return Y9([kw.createExportSpecifier(!1,void 0,"default")],e)}function V9(e,t){return t&&X(Be(t.keys()),t=>ix(e,t))?nt(e)?XC(e,!0,n):KC(e,!0,n):e;function n(e){if(212===e.kind){const n=t.get(e);return t.delete(e),n}}}function W9(e,t){for(;t.original.has(e)||t.additional.has(e);)e=`_${e}`;return t.additional.add(e),e}function $9(e){const t=Qe();return K9(e,e=>t.add(e.text,e)),t}function K9(e,t){fD(e)&&function(e){const{parent:t}=e;switch(t.kind){case 212:return t.name!==e;case 209:case 277:return t.propertyName!==e;default:return!0}}(e)&&t(e),e.forEachChild(e=>K9(e,t))}function H9(e,t,n,r){return kw.createFunctionDeclaration(Y(t,GC(n.modifiers)),$C(n.asteriskToken),e,GC(n.typeParameters),GC(n.parameters),$C(n.type),kw.converters.convertToFunctionBlock(V9(n.body,r)))}function G9(e,t,n,r){return"default"===t?gY(kw.createIdentifier(e),void 0,n,r):gY(void 0,[X9(t,e)],n,r)}function X9(e,t){return kw.createImportSpecifier(!1,void 0!==e&&e!==t?kw.createIdentifier(e):void 0,kw.createIdentifier(t))}function Q9(e,t,n){return kw.createVariableStatement(e,kw.createVariableDeclarationList([kw.createVariableDeclaration(t,void 0,void 0,n)],2))}function Y9(e,t){return kw.createExportDeclaration(void 0,!1,e&&kw.createNamedExports(e),void 0===t?void 0:kw.createStringLiteral(t))}function Z9(e,t){return{newImports:e,useSitesToUnqualify:t}}e8({errorCodes:c9,getCodeActions(e){l9=!0;const t=sde.ChangeTracker.with(e,t=>_9(t,e.sourceFile,e.span.start,e.program.getTypeChecker()));return l9?[Q7(s9,t,ha.Convert_to_async_function,s9,ha.Convert_all_to_async_functions)]:[]},fixIds:[s9],getAllCodeActions:e=>a8(e,c9,(t,n)=>_9(t,n.file,n.start,e.program.getTypeChecker()))}),e8({errorCodes:[ha.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],getCodeActions(e){const{sourceFile:t,program:n,preferences:r}=e;return[X7("convertToEsModule",sde.ChangeTracker.with(e,e=>{const i=function(e,t,n,r,i){const o={original:$9(e),additional:new Set},a=function(e,t,n){const r=new Map;return B9(e,e=>{const{text:i}=e.name;r.has(i)||!Rh(e.name)&&!t.resolveName(i,e,111551,!0)||r.set(i,W9(`_${i}`,n))}),r}(e,t,o);!function(e,t,n){B9(e,(r,i)=>{if(i)return;const{text:o}=r.name;n.replaceNode(e,r,kw.createIdentifier(t.get(o)||o))})}(e,a,n);let s,c=!1;for(const a of P(e.statements,ZE)){const c=z9(e,a,n,t,o,r,i);c&&dd(c,s??(s=new Map))}for(const l of P(e.statements,e=>!ZE(e))){const _=J9(e,l,t,n,o,r,a,s,i);c=c||_}return null==s||s.forEach((t,r)=>{n.replaceNode(e,r,t)}),c}(t,n.getTypeChecker(),e,wS(n.getCompilerOptions()),bY(t,r));if(i)for(const i of n.getSourceFiles())R9(i,t,n,e,bY(i,r))}),ha.Convert_to_ES_module)]}});var eee="correctQualifiedNameToIndexedAccessType",tee=[ha.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];function nee(e,t){const n=yc(dQ(e,t),ED);return gn.assert(!!n,"Expected position to be owned by a qualified name."),fD(n.left)?n:void 0}function ree(e,t,n){const r=n.right.text,i=kw.createIndexedAccessTypeNode(kw.createTypeReferenceNode(n.left,void 0),kw.createLiteralTypeNode(kw.createStringLiteral(r)));e.replaceNode(t,n,i)}e8({errorCodes:tee,getCodeActions(e){const t=nee(e.sourceFile,e.span.start);if(!t)return;const n=sde.ChangeTracker.with(e,n=>ree(n,e.sourceFile,t)),r=`${t.left.text}["${t.right.text}"]`;return[Q7(eee,n,[ha.Rewrite_as_the_indexed_access_type_0,r],eee,ha.Rewrite_all_as_indexed_access_types)]},fixIds:[eee],getAllCodeActions:e=>a8(e,tee,(e,t)=>{const n=nee(t.file,t.start);n&&ree(e,t.file,n)})});var iee=[ha.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code],oee="convertToTypeOnlyExport";function aee(e,t){return at(dQ(t,e.start).parent,UF)}function see(e,t,n){if(!t)return;const r=t.parent,i=r.parent,o=function(e,t){const n=e.parent;if(1===n.elements.length)return n.elements;const r=t0(HQ(n),t.program.getSemanticDiagnostics(t.sourceFile,t.cancellationToken));return P(n.elements,t=>{var n;return t===e||(null==(n=e0(t,r))?void 0:n.code)===iee[0]})}(t,n);if(o.length===r.elements.length)e.insertModifierBefore(n.sourceFile,156,r);else{const t=kw.updateExportDeclaration(i,i.modifiers,!1,kw.updateNamedExports(r,P(r.elements,e=>!D(o,e))),i.moduleSpecifier,void 0),a=kw.createExportDeclaration(void 0,!0,kw.createNamedExports(o),i.moduleSpecifier,void 0);e.replaceNode(n.sourceFile,i,t,{leadingTriviaOption:sde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:sde.TrailingTriviaOption.Exclude}),e.insertNodeAfter(n.sourceFile,i,a)}}e8({errorCodes:iee,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>see(t,aee(e.span,e.sourceFile),e));if(t.length)return[Q7(oee,t,ha.Convert_to_type_only_export,oee,ha.Convert_all_re_exported_types_to_type_only_exports)]},fixIds:[oee],getAllCodeActions:function(e){const t=new Set;return a8(e,iee,(n,r)=>{const i=aee(r,e.sourceFile);i&&Dx(t,pJ(i.parent.parent))&&see(n,i,e)})}});var cee=[ha._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,ha._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code],lee="convertToTypeOnlyImport";function _ee(e,t){const{parent:n}=dQ(e,t);return BF(n)||EF(n)&&n.importClause?n:void 0}function uee(e,t,n){if(e.parent.parent.name)return!1;const r=e.parent.elements.filter(e=>!e.isTypeOnly);if(1===r.length)return!0;const i=n.getTypeChecker();for(const e of r){if(Bce.Core.eachSymbolReferenceInFile(e.name,i,t,e=>{const t=i.getSymbolAtLocation(e);return!!t&&i.symbolIsValue(t)||!DT(e)}))return!1}return!0}function dee(e,t,n){var r;if(BF(n))e.replaceNode(t,n,kw.updateImportSpecifier(n,!0,n.propertyName,n.name));else{const i=n.importClause;if(i.name&&i.namedBindings)e.replaceNodeWithNodes(t,n,[kw.createImportDeclaration(GC(n.modifiers,!0),kw.createImportClause(156,$C(i.name,!0),void 0),$C(n.moduleSpecifier,!0),$C(n.attributes,!0)),kw.createImportDeclaration(GC(n.modifiers,!0),kw.createImportClause(156,void 0,$C(i.namedBindings,!0)),$C(n.moduleSpecifier,!0),$C(n.attributes,!0))]);else{const o=276===(null==(r=i.namedBindings)?void 0:r.kind)?kw.updateNamedImports(i.namedBindings,j(i.namedBindings.elements,e=>kw.updateImportSpecifier(e,!1,e.propertyName,e.name))):i.namedBindings,a=kw.updateImportDeclaration(n,n.modifiers,kw.updateImportClause(i,156,i.name,o),n.moduleSpecifier,n.attributes);e.replaceNode(t,n,a)}}}e8({errorCodes:cee,getCodeActions:function(e){var t;const n=_ee(e.sourceFile,e.span.start);if(n){const r=sde.ChangeTracker.with(e,t=>dee(t,e.sourceFile,n)),i=277===n.kind&&EF(n.parent.parent.parent)&&uee(n,e.sourceFile,e.program)?sde.ChangeTracker.with(e,t=>dee(t,e.sourceFile,n.parent.parent.parent)):void 0,o=Q7(lee,r,277===n.kind?[ha.Use_type_0,(null==(t=n.propertyName)?void 0:t.text)??n.name.text]:ha.Use_import_type,lee,ha.Fix_all_with_type_only_imports);return X(i)?[X7(lee,i,ha.Use_import_type),o]:[o]}},fixIds:[lee],getAllCodeActions:function(e){const t=new Set;return a8(e,cee,(n,r)=>{const i=_ee(r.file,r.start);273!==(null==i?void 0:i.kind)||t.has(i)?277===(null==i?void 0:i.kind)&&EF(i.parent.parent.parent)&&!t.has(i.parent.parent.parent)&&uee(i,r.file,e.program)?(dee(n,r.file,i.parent.parent.parent),t.add(i.parent.parent.parent)):277===(null==i?void 0:i.kind)&&dee(n,r.file,i):(dee(n,r.file,i),t.add(i))})}});var pee="convertTypedefToType",fee=[ha.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];function mee(e,t,n,r,i=!1){if(!YP(t))return;const o=function(e){var t;const{typeExpression:n}=e;if(!n)return;const r=null==(t=e.name)?void 0:t.getText();if(!r)return;if(323===n.kind)return function(e,t){const n=hee(t);if(!X(n))return;return kw.createInterfaceDeclaration(void 0,e,void 0,void 0,n)}(r,n);if(310===n.kind)return function(e,t){const n=$C(t.type);if(!n)return;return kw.createTypeAliasDeclaration(void 0,kw.createIdentifier(e),void 0,n)}(r,n)}(t);if(!o)return;const a=t.parent,{leftSibling:s,rightSibling:c}=function(e){const t=e.parent,n=t.getChildCount()-1,r=t.getChildren().findIndex(t=>t.getStart()===e.getStart()&&t.getEnd()===e.getEnd()),i=r>0?t.getChildAt(r-1):void 0,o=r0;e--)if(!/[*/\s]/.test(r.substring(e-1,e)))return t+e;return n}function hee(e){const t=e.jsDocPropertyTags;if(!X(t))return;return U(t,e=>{var t;const n=function(e){return 80===e.name.kind?e.name.text:e.name.right.text}(e),r=null==(t=e.typeExpression)?void 0:t.type,i=e.isBracketed;let o;if(r&&AP(r)){const e=hee(r);o=kw.createTypeLiteralNode(e)}else r&&(o=$C(r));if(o&&n){const e=i?kw.createToken(58):void 0;return kw.createPropertySignature(void 0,n,e,o)}})}function yee(e){return Lu(e)?R(e.jsDoc,e=>{var t;return null==(t=e.tags)?void 0:t.filter(e=>YP(e))}):[]}e8({fixIds:[pee],errorCodes:fee,getCodeActions(e){const t=iZ(e.host,e.formatContext.options),n=dQ(e.sourceFile,e.span.start);if(!n)return;const r=sde.ChangeTracker.with(e,r=>mee(r,n,e.sourceFile,t));return r.length>0?[Q7(pee,r,ha.Convert_typedef_to_TypeScript_type,pee,ha.Convert_all_typedef_to_TypeScript_types)]:void 0},getAllCodeActions:e=>a8(e,fee,(t,n)=>{const r=iZ(e.host,e.formatContext.options),i=dQ(n.file,n.start);i&&mee(t,i,n.file,r,!0)})});var vee="convertLiteralTypeToMappedType",bee=[ha._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];function xee(e,t){const n=dQ(e,t);if(fD(n)){const t=st(n.parent.parent,OD),r=n.getText(e);return{container:st(t.parent,XD),typeNode:t.type,constraint:r,name:"K"===r?"P":"K"}}}function See(e,t,{container:n,typeNode:r,constraint:i,name:o}){e.replaceNode(t,n,kw.createMappedTypeNode(void 0,kw.createTypeParameterDeclaration(void 0,o,kw.createTypeReferenceNode(i)),void 0,void 0,r,void 0))}e8({errorCodes:bee,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=xee(t,n.start);if(!r)return;const{name:i,constraint:o}=r,a=sde.ChangeTracker.with(e,e=>See(e,t,r));return[Q7(vee,a,[ha.Convert_0_to_1_in_0,o,i],vee,ha.Convert_all_type_literals_to_mapped_type)]},fixIds:[vee],getAllCodeActions:e=>a8(e,bee,(e,t)=>{const n=xee(t.file,t.start);n&&See(e,t.file,n)})});var kee=[ha.Class_0_incorrectly_implements_interface_1.code,ha.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],Tee="fixClassIncorrectlyImplementsInterface";function Cee(e,t){return gn.checkDefined(rm(dQ(e,t)),"There should be a containing class")}function wee(e){return!(e.valueDeclaration&&2&Kv(e.valueDeclaration))}function Nee(e,t,n,r,i,o){const a=e.program.getTypeChecker(),s=function(e,t){const n=Ch(e);if(!n)return nd();const r=t.getTypeAtLocation(n),i=t.getPropertiesOfType(r);return nd(i.filter(wee))}(r,a),c=a.getTypeAtLocation(t),l=a.getPropertiesOfType(c).filter(on(wee,e=>!s.has(e.escapedName))),_=a.getTypeAtLocation(r),u=T(r.members,e=>BD(e));_.getNumberIndexType()||p(c,1),_.getStringIndexType()||p(c,0);const d=Pee(n,e.program,o,e.host);function p(t,i){const o=a.getIndexInfoOfType(t,i);o&&f(n,r,a.indexInfoToIndexSignatureDeclaration(o,r,void 0,void 0,toe(e)))}function f(e,t,n){u?i.insertNodeAfter(e,u,n):i.insertMemberAtStart(e,t,n)}eoe(r,l,n,e,o,d,e=>f(n,r,e)),d.writeFixes(i)}e8({errorCodes:kee,getCodeActions(e){const{sourceFile:t,span:n}=e,r=Cee(t,n.start);return U(Nh(r),n=>{const i=sde.ChangeTracker.with(e,i=>Nee(e,n,t,r,i,e.preferences));return 0===i.length?void 0:Q7(Tee,i,[ha.Implement_interface_0,n.getText(t)],Tee,ha.Implement_all_unimplemented_interfaces)})},fixIds:[Tee],getAllCodeActions(e){const t=new Set;return a8(e,kee,(n,r)=>{const i=Cee(r.file,r.start);if(Dx(t,pJ(i)))for(const t of Nh(i))Nee(e,t,r.file,i,n,e.preferences)})}});var Dee="import",Eee="fixMissingImport",Fee=[ha.Cannot_find_name_0.code,ha.Cannot_find_name_0_Did_you_mean_1.code,ha.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,ha.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,ha.Cannot_find_namespace_0.code,ha._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,ha._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,ha.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,ha._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,ha.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,ha.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,ha.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,ha.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,ha.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,ha.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,ha.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,ha.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,ha.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,ha.Cannot_find_namespace_0_Did_you_mean_1.code,ha.Cannot_extend_an_interface_0_Did_you_mean_implements.code,ha.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found.code];function Pee(e,t,n,r,i){return Aee(e,t,!1,n,r,i)}function Aee(e,t,n,r,i,o){const a=t.getCompilerOptions(),s=[],c=[],l=new Map,_=new Set,u=new Set,d=new Map;return{addImportFromDiagnostic:function(e,t){const r=Wee(t,e.code,e.start,n);if(!r||!r.length)return;p(xe(r))},addImportFromExportedSymbol:function(n,s,c){var l,_;const u=gn.checkDefined(n.parent,"Expected exported symbol to have module symbol as parent"),d=a0(n,wS(a)),f=t.getTypeChecker(),m=f.getMergedSymbol(px(n,f)),g=Ree(e,m,d,u,!1,t,i,r,o);if(!g)return void gn.assert(null==(l=r.autoImportFileExcludePatterns)?void 0:l.length);const h=Uee(e,t);let y=jee(e,g,t,void 0,!!s,h,i,r);if(y){const e=(null==(_=at(null==c?void 0:c.name,fD))?void 0:_.text)??d;let t,r;c&&$l(c)&&(3===y.kind||2===y.kind)&&1===y.addAsTypeOnly&&(t=2),n.name!==e&&(r=n.name),y={...y,...void 0===t?{}:{addAsTypeOnly:t},...void 0===r?{}:{propertyName:r}},p({fix:y,symbolName:e??d,errorIdentifierText:void 0})}},addImportForModuleSymbol:function(n,o,s){var c,l,_;const u=t.getTypeChecker(),d=u.getAliasedSymbol(n);gn.assert(1536&d.flags,"Expected symbol to be a module");const f=pY(t,i),m=gB.getModuleSpecifiersWithCacheInfo(d,u,a,e,f,r,void 0,!0),g=Uee(e,t);let h=zee(o,!0,void 0,n.flags,t.getTypeChecker(),a);h=1===h&&$l(s)?2:1;const y=EF(s)?Pg(s)?1:2:BF(s)?0:FF(s)&&s.name?1:2,v=[{symbol:n,moduleSymbol:d,moduleFileName:null==(_=null==(l=null==(c=d.declarations)?void 0:c[0])?void 0:l.getSourceFile())?void 0:_.fileName,exportKind:4,targetFlags:n.flags,isFromPackageJson:!1}],b=jee(e,v,t,void 0,!!o,g,i,r);let x;x=b&&2!==y&&0!==b.kind&&1!==b.kind?{...b,addAsTypeOnly:h,importKind:y}:{kind:3,moduleSpecifierKind:void 0!==b?b.moduleSpecifierKind:m.kind,moduleSpecifier:void 0!==b?b.moduleSpecifier:xe(m.moduleSpecifiers),importKind:y,addAsTypeOnly:h,useRequire:g};p({fix:x,symbolName:n.name,errorIdentifierText:void 0})},writeFixes:function(t,n){var i,o;let u,p,m;u=void 0!==e.imports&&0===e.imports.length&&void 0!==n?n:bY(e,r);for(const n of s)rte(t,e,n);for(const n of c)ite(t,e,n,u);if(_.size){gn.assert(Lm(e),"Cannot remove imports from a future source file");const n=new Set(U([..._],e=>yc(e,EF))),r=new Set(U([..._],e=>yc(e,Um))),a=[...n].filter(e=>{var t,n,r;return!l.has(e.importClause)&&(!(null==(t=e.importClause)?void 0:t.name)||_.has(e.importClause))&&(!at(null==(n=e.importClause)?void 0:n.namedBindings,jF)||_.has(e.importClause.namedBindings))&&(!at(null==(r=e.importClause)?void 0:r.namedBindings,RF)||k(e.importClause.namedBindings.elements,e=>_.has(e)))}),s=[...r].filter(e=>(207!==e.name.kind||!l.has(e.name))&&(207!==e.name.kind||k(e.name.elements,e=>_.has(e)))),c=[...n].filter(e=>{var t,n;return(null==(t=e.importClause)?void 0:t.namedBindings)&&-1===a.indexOf(e)&&!(null==(n=l.get(e.importClause))?void 0:n.namedImports)&&(275===e.importClause.namedBindings.kind||k(e.importClause.namedBindings.elements,e=>_.has(e)))});for(const n of[...a,...s])t.delete(e,n);for(const n of c)t.replaceNode(e,n.importClause,kw.updateImportClause(n.importClause,n.importClause.phaseModifier,n.importClause.name,void 0));for(const n of _){const r=yc(n,EF);r&&-1===a.indexOf(r)&&-1===c.indexOf(r)?274===n.kind?t.delete(e,n.name):(gn.assert(277===n.kind,"NamespaceImport should have been handled earlier"),(null==(i=l.get(r.importClause))?void 0:i.namedImports)?(p??(p=new Set)).add(n):t.delete(e,n)):209===n.kind?(null==(o=l.get(n.parent))?void 0:o.namedImports)?(p??(p=new Set)).add(n):t.delete(e,n):272===n.kind&&t.delete(e,n)}}l.forEach(({importClauseOrBindingPattern:n,defaultImport:i,namedImports:o})=>{nte(t,e,n,i,Be(o.entries(),([e,{addAsTypeOnly:t,propertyName:n}])=>({addAsTypeOnly:t,propertyName:n,name:e})),p,r)}),d.forEach(({useRequire:e,defaultImport:t,namedImports:n,namespaceLikeImport:i},o)=>{const s=(e?lte:cte)(o.slice(2),u,t,n&&Be(n.entries(),([e,[t,n]])=>({addAsTypeOnly:t,propertyName:n,name:e})),i,a,r);m=_e(m,s)}),m=_e(m,f()),m&&FY(t,e,m,!0,r)},hasFixes:function(){return s.length>0||c.length>0||l.size>0||d.size>0||u.size>0||_.size>0},addImportForUnresolvedIdentifier:function(e,t,n){const r=function(e,t,n){const r=Qee(e,t,n),i=XZ(e.sourceFile,e.preferences,e.host);return r&&$ee(r,e.sourceFile,e.program,i,e.host,e.preferences)}(e,t,n);if(!r||!r.length)return;p(xe(r))},addImportForNonExistentExport:function(n,o,s,c,l){const _=t.getSourceFile(o),u=Uee(e,t);if(_&&_.symbol){const{fixes:a}=Jee([{exportKind:s,isFromPackageJson:!1,moduleFileName:o,moduleSymbol:_.symbol,targetFlags:c}],void 0,l,u,t,e,i,r);a.length&&p({fix:a[0],symbolName:n,errorIdentifierText:n})}else{const _=S0(o,99,t,i);p({fix:{kind:3,moduleSpecifierKind:"relative",moduleSpecifier:gB.getLocalModuleSpecifierBetweenFileNames(e,o,a,pY(t,i),r),importKind:Xee(_,s,t),addAsTypeOnly:zee(l,!0,void 0,c,t.getTypeChecker(),a),useRequire:u},symbolName:n,errorIdentifierText:n})}},removeExistingImport:function(e){274===e.kind&&gn.assertIsDefined(e.name,"ImportClause should have a name if it's being removed");_.add(e)},addVerbatimImport:function(e){u.add(e)}};function p(e){var t,n,r;const{fix:i,symbolName:o}=e;switch(i.kind){case 0:s.push(i);break;case 1:c.push(i);break;case 2:{const{importClauseOrBindingPattern:e,importKind:r,addAsTypeOnly:a,propertyName:s}=i;let c=l.get(e);if(c||l.set(e,c={importClauseOrBindingPattern:e,defaultImport:void 0,namedImports:new Map}),0===r){const e=null==(t=null==c?void 0:c.namedImports.get(o))?void 0:t.addAsTypeOnly;c.namedImports.set(o,{addAsTypeOnly:_(e,a),propertyName:s})}else gn.assert(void 0===c.defaultImport||c.defaultImport.name===o,"(Add to Existing) Default import should be missing or match symbolName"),c.defaultImport={name:o,addAsTypeOnly:_(null==(n=c.defaultImport)?void 0:n.addAsTypeOnly,a)};break}case 3:{const{moduleSpecifier:e,importKind:t,useRequire:n,addAsTypeOnly:s,propertyName:c}=i,l=function(e,t,n,r){const i=u(e,!0),o=u(e,!1),a=d.get(i),s=d.get(o),c={defaultImport:void 0,namedImports:void 0,namespaceLikeImport:void 0,useRequire:n};if(1===t&&2===r)return a||(d.set(i,c),c);if(1===r&&(a||s))return a||s;if(s)return s;return d.set(o,c),c}(e,t,n,s);switch(gn.assert(l.useRequire===n,"(Add new) Tried to add an `import` and a `require` for the same module"),t){case 1:gn.assert(void 0===l.defaultImport||l.defaultImport.name===o,"(Add new) Default import should be missing or match symbolName"),l.defaultImport={name:o,addAsTypeOnly:_(null==(r=l.defaultImport)?void 0:r.addAsTypeOnly,s)};break;case 0:const e=(l.namedImports||(l.namedImports=new Map)).get(o);l.namedImports.set(o,[_(e,s),c]);break;case 3:if(a.verbatimModuleSyntax){const e=(l.namedImports||(l.namedImports=new Map)).get(o);l.namedImports.set(o,[_(e,s),c])}else gn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===o,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:o,addAsTypeOnly:s};break;case 2:gn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===o,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:o,addAsTypeOnly:s}}break}case 4:break;default:gn.assertNever(i,`fix wasn't never - got kind ${i.kind}`)}function _(e,t){return Math.max(e??0,t)}function u(e,t){return`${t?1:0}|${e}`}}function f(){if(!u.size)return;const e=new Set(U([...u],e=>yc(e,EF))),t=new Set(U([...u],e=>yc(e,Km)));return[...U([...u],e=>272===e.kind?$C(e,!0):void 0),...[...e].map(e=>{var t;return u.has(e)?$C(e,!0):$C(kw.updateImportDeclaration(e,e.modifiers,e.importClause&&kw.updateImportClause(e.importClause,e.importClause.phaseModifier,u.has(e.importClause)?e.importClause.name:void 0,u.has(e.importClause.namedBindings)?e.importClause.namedBindings:(null==(t=at(e.importClause.namedBindings,RF))?void 0:t.elements.some(e=>u.has(e)))?kw.updateNamedImports(e.importClause.namedBindings,e.importClause.namedBindings.elements.filter(e=>u.has(e))):void 0),e.moduleSpecifier,e.attributes),!0)}),...[...t].map(e=>u.has(e)?$C(e,!0):$C(kw.updateVariableStatement(e,e.modifiers,kw.updateVariableDeclarationList(e.declarationList,U(e.declarationList.declarations,e=>u.has(e)?e:kw.updateVariableDeclaration(e,207===e.name.kind?kw.updateObjectBindingPattern(e.name,e.name.elements.filter(e=>u.has(e))):e.name,e.exclamationToken,e.type,e.initializer)))),!0))]}}function Iee(e,t,n,r){const i=XZ(e,r,n),o=qee(e,t);return{getModuleSpecifierForBestExportInfo:function(a,s,c,l){const{fixes:_,computedWithoutCacheCount:u}=Jee(a,s,c,!1,t,e,n,r,o,l),d=Kee(_,e,t,i,n,r);return d&&{...d,computedWithoutCacheCount:u}}}}function Oee(e,t,n,r,i,o,a,s,c,l,_,u){let d;n?(d=I0(r,a,s,_,u).get(r.path,n),gn.assertIsDefined(d,"Some exportInfo should match the specified exportMapKey")):(d=No(jy(t.name))?[Bee(e,i,t,s,a)]:Ree(r,e,i,t,o,s,a,_,u),gn.assertIsDefined(d,"Some exportInfo should match the specified symbol / moduleSymbol"));const p=Uee(r,s),f=DT(dQ(r,l)),m=gn.checkDefined(jee(r,d,s,l,f,p,a,_));return{moduleSpecifier:m.moduleSpecifier,codeAction:Mee(ete({host:a,formatContext:c,preferences:_},r,i,m,!1,s,_))}}function Lee(e,t,n,r,i,o){const a=n.getCompilerOptions(),s=we(Zee(e,n.getTypeChecker(),t,a)),c=Yee(e,t,s,n),l=s!==t.text;return c&&Mee(ete({host:r,formatContext:i,preferences:o},e,s,c,l,n,o))}function jee(e,t,n,r,i,o,a,s){const c=XZ(e,s,a);return Kee(Jee(t,r,i,o,n,e,a,s).fixes,e,n,c,a,s)}function Mee({description:e,changes:t,commands:n}){return{description:e,changes:t,commands:n}}function Ree(e,t,n,r,i,o,a,s,c){const l=Vee(o,a),_=s.autoImportFileExcludePatterns&&A0(a,s),u=o.getTypeChecker().getMergedSymbol(r),d=_&&u.declarations&&ed(u,308),p=d&&_(d);return I0(e,a,o,s,c).search(e.path,i,e=>e===n,e=>{const n=l(e[0].isFromPackageJson);if(n.getMergedSymbol(px(e[0].symbol,n))===t&&(p||e.some(e=>n.getMergedSymbol(e.moduleSymbol)===r||e.symbol.parent===r)))return e})}function Bee(e,t,n,r,i){var o,a;const s=l(r.getTypeChecker(),!1);if(s)return s;const c=null==(a=null==(o=i.getPackageJsonAutoImportProvider)?void 0:o.call(i))?void 0:a.getTypeChecker();return gn.checkDefined(c&&l(c,!0),"Could not find symbol in specified module for code actions");function l(r,i){const o=O0(n,r);if(o&&px(o.symbol,r)===e)return{symbol:o.symbol,moduleSymbol:n,moduleFileName:void 0,exportKind:o.exportKind,targetFlags:px(e,r).flags,isFromPackageJson:i};const a=r.tryGetMemberInModuleExportsAndProperties(t,n);return a&&px(a,r)===e?{symbol:a,moduleSymbol:n,moduleFileName:void 0,exportKind:0,targetFlags:px(e,r).flags,isFromPackageJson:i}:void 0}}function Jee(e,t,n,r,i,o,a,s,c=(Lm(o)?qee(o,i):void 0),l){const _=i.getTypeChecker(),u=c?R(e,c.getImportsForExportInfo):p,d=void 0!==t&&function(e,t){return y(e,({declaration:e,importKind:n})=>{var r;if(0!==n)return;const i=function(e){var t,n,r;switch(e.kind){case 261:return null==(t=at(e.name,fD))?void 0:t.text;case 272:return e.name.text;case 352:case 273:return null==(r=at(null==(n=e.importClause)?void 0:n.namedBindings,jF))?void 0:r.name.text;default:return gn.assertNever(e)}}(e),o=i&&(null==(r=Cg(e))?void 0:r.text);return o?{kind:0,namespacePrefix:i,usagePosition:t,moduleSpecifierKind:void 0,moduleSpecifier:o}:void 0})}(u,t),f=function(e,t,n,r){let i;for(const t of e){const e=o(t);if(!e)continue;const n=$l(e.importClauseOrBindingPattern);if(4!==e.addAsTypeOnly&&n||4===e.addAsTypeOnly&&!n)return e;i??(i=e)}return i;function o({declaration:e,importKind:i,symbol:o,targetFlags:a}){if(3===i||2===i||272===e.kind)return;if(261===e.kind)return 0!==i&&1!==i||207!==e.name.kind?void 0:{kind:2,importClauseOrBindingPattern:e.name,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.initializer.arguments[0].text,addAsTypeOnly:4};const{importClause:s}=e;if(!s||!Uu(e.moduleSpecifier))return;const{name:c,namedBindings:l}=s;if(s.isTypeOnly&&(0!==i||!l))return;const _=zee(t,!1,o,a,n,r);return 1===i&&(c||2===_&&l)||0===i&&275===(null==l?void 0:l.kind)?void 0:{kind:2,importClauseOrBindingPattern:s,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.moduleSpecifier.text,addAsTypeOnly:_}}}(u,n,_,i.getCompilerOptions());if(f)return{computedWithoutCacheCount:0,fixes:[...d?[d]:p,f]};const{fixes:m,computedWithoutCacheCount:g=0}=function(e,t,n,r,i,o,a,s,c,l){const _=y(t,e=>function({declaration:e,importKind:t,symbol:n,targetFlags:r},i,o,a,s){var c;const l=null==(c=Cg(e))?void 0:c.text;if(l){return{kind:3,moduleSpecifierKind:void 0,moduleSpecifier:l,importKind:t,addAsTypeOnly:o?4:zee(i,!0,n,r,a,s),useRequire:o}}}(e,o,a,n.getTypeChecker(),n.getCompilerOptions()));return _?{fixes:[_]}:function(e,t,n,r,i,o,a,s,c){const l=qk(t.fileName),_=e.getCompilerOptions(),u=pY(e,a),d=Vee(e,a),p=mY(DS(_)),f=c?e=>gB.tryGetModuleSpecifiersFromCache(e.moduleSymbol,t,u,s):(e,n)=>gB.getModuleSpecifiersWithCacheInfo(e.moduleSymbol,n,_,t,u,s,void 0,!0);let m=0;const g=R(o,(o,a)=>{const s=d(o.isFromPackageJson),{computedWithoutCache:c,moduleSpecifiers:u,kind:g}=f(o,s)??{},h=!!(111551&o.targetFlags),y=zee(r,!0,o.symbol,o.targetFlags,s,_);return m+=c?1:0,U(u,r=>{if(p&&lR(r))return;if(!h&&l&&void 0!==n)return{kind:1,moduleSpecifierKind:g,moduleSpecifier:r,usagePosition:n,exportInfo:o,isReExport:a>0};const c=Xee(t,o.exportKind,e);let u;if(void 0!==n&&3===c&&0===o.exportKind){const e=s.resolveExternalModuleSymbol(o.moduleSymbol);let t;e!==o.moduleSymbol&&(t=j0(e,s,wS(_),dt)),t||(t=c0(o.moduleSymbol,wS(_),!1)),u={namespacePrefix:t,usagePosition:n}}return{kind:3,moduleSpecifierKind:g,moduleSpecifier:r,importKind:c,useRequire:i,addAsTypeOnly:y,exportInfo:o,isReExport:a>0,qualification:u}})});return{computedWithoutCacheCount:m,fixes:g}}(n,r,i,o,a,e,s,c,l)}(e,u,i,o,t,n,r,a,s,l);return{computedWithoutCacheCount:g,fixes:[...d?[d]:p,...m]}}function zee(e,t,n,r,i,o){return e?!n||!o.verbatimModuleSyntax||111551&r&&!i.getTypeOnlyAliasDeclaration(n)?1:2:4}function qee(e,t){const n=t.getTypeChecker();let r;for(const t of e.imports){const e=wg(t);if(Um(e.parent)){const i=n.resolveExternalModuleName(t);i&&(r||(r=Qe())).add(fJ(i),e.parent)}else if(273===e.kind||272===e.kind||352===e.kind){const i=n.getSymbolAtLocation(t);i&&(r||(r=Qe())).add(fJ(i),e)}}return{getImportsForExportInfo:({moduleSymbol:n,exportKind:i,targetFlags:o,symbol:a})=>{const s=null==r?void 0:r.get(fJ(n));if(!s)return p;if(jm(e)&&!(111551&o)&&!k(s,iA))return p;const c=Xee(e,i,t);return s.map(e=>({declaration:e,importKind:c,symbol:a,targetFlags:o}))}}}function Uee(e,t){if(!qk(e.fileName))return!1;if(e.commonJsModuleIndicator&&!e.externalModuleIndicator)return!0;if(e.externalModuleIndicator&&!e.commonJsModuleIndicator)return!1;const n=t.getCompilerOptions();if(n.configFile)return NS(n)<5;if(1===dte(e,t))return!0;if(99===dte(e,t))return!1;for(const n of t.getSourceFiles())if(n!==e&&jm(n)&&!t.isSourceFileFromExternalLibrary(n)){if(n.commonJsModuleIndicator&&!n.externalModuleIndicator)return!0;if(n.externalModuleIndicator&&!n.commonJsModuleIndicator)return!1}return!0}function Vee(e,t){return yt(n=>n?t.getPackageJsonAutoImportProvider().getTypeChecker():e.getTypeChecker())}function Wee(e,t,n,r){const i=dQ(e.sourceFile,n);let o;if(t===ha._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code)o=function({sourceFile:e,program:t,host:n,preferences:r},i){const o=t.getTypeChecker(),a=function(e,t){const n=fD(e)?t.getSymbolAtLocation(e):void 0;if(Cx(n))return n;const{parent:r}=e;if(Nu(r)&&r.tagName===e||eP(r)){const n=t.resolveName(t.getJsxNamespace(r),Nu(r)?e:r,111551,!1);if(Cx(n))return n}return}(i,o);if(!a)return;const s=o.getAliasedSymbol(a),c=a.name,l=[{symbol:a,moduleSymbol:s,moduleFileName:void 0,exportKind:3,targetFlags:s.flags,isFromPackageJson:!1}],_=Uee(e,t);return Jee(l,void 0,!1,_,t,e,n,r).fixes.map(e=>{var t;return{fix:e,symbolName:c,errorIdentifierText:null==(t=at(i,fD))?void 0:t.text}})}(e,i);else{if(!fD(i))return;if(t===ha._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code){const t=we(Zee(e.sourceFile,e.program.getTypeChecker(),i,e.program.getCompilerOptions())),n=Yee(e.sourceFile,i,t,e.program);return n&&[{fix:n,symbolName:t,errorIdentifierText:i.text}]}o=Qee(e,i,r)}const a=XZ(e.sourceFile,e.preferences,e.host);return o&&$ee(o,e.sourceFile,e.program,a,e.host,e.preferences)}function $ee(e,t,n,r,i,o){const a=e=>Xo(e,i.getCurrentDirectory(),Vy(i));return me(e,(e,i)=>Bt(!!e.isJsxNamespaceFix,!!i.isJsxNamespaceFix)||Tt(e.fix.kind,i.fix.kind)||Hee(e.fix,i.fix,t,n,o,r.allowsImportingSpecifier,a))}function Kee(e,t,n,r,i,o){if(X(e))return 0===e[0].kind||2===e[0].kind?e[0]:e.reduce((e,a)=>-1===Hee(a,e,t,n,o,r.allowsImportingSpecifier,e=>Xo(e,i.getCurrentDirectory(),Vy(i)))?a:e)}function Hee(e,t,n,r,i,o,a){return 0!==e.kind&&0!==t.kind?Bt("node_modules"!==t.moduleSpecifierKind||o(t.moduleSpecifier),"node_modules"!==e.moduleSpecifierKind||o(e.moduleSpecifier))||function(e,t,n){if("non-relative"===n.importModuleSpecifierPreference||"project-relative"===n.importModuleSpecifierPreference)return Bt("relative"===e.moduleSpecifierKind,"relative"===t.moduleSpecifierKind);return 0}(e,t,i)||function(e,t,n,r){return en(e,"node:")&&!en(t,"node:")?p0(n,r)?-1:1:en(t,"node:")&&!en(e,"node:")?p0(n,r)?1:-1:0}(e.moduleSpecifier,t.moduleSpecifier,n,r)||Bt(Gee(e,n.path,a),Gee(t,n.path,a))||Gk(e.moduleSpecifier,t.moduleSpecifier):0}function Gee(e,t,n){var r;if(e.isReExport&&(null==(r=e.exportInfo)?void 0:r.moduleFileName)&&"index"===jo(e.exportInfo.moduleFileName,[".js",".jsx",".d.ts",".ts",".tsx"],!0)){return en(t,n(Lo(e.exportInfo.moduleFileName)))}return!1}function Xee(e,t,n,r){if(n.getCompilerOptions().verbatimModuleSyntax&&1===function(e,t){return Lm(e)?t.getEmitModuleFormatOfFile(e):QV(e,t.getCompilerOptions())}(e,n))return 3;switch(t){case 0:return 0;case 1:return 1;case 2:return function(e,t,n){const r=AS(t),i=qk(e.fileName);if(!i&&NS(t)>=5)return r?1:2;if(i)return e.externalModuleIndicator||n?r?1:2:3;for(const t of e.statements??p)if(DF(t)&&!Od(t.moduleReference))return 3;return r?1:3}(e,n.getCompilerOptions(),!!r);case 3:return function(e,t,n){if(AS(t.getCompilerOptions()))return 1;const r=NS(t.getCompilerOptions());switch(r){case 2:case 1:case 3:return qk(e.fileName)&&(e.externalModuleIndicator||n)?2:3;case 4:case 5:case 6:case 7:case 99:case 0:case 200:return 2;case 100:case 101:case 102:case 199:return 99===dte(e,t)?2:3;default:return gn.assertNever(r,`Unexpected moduleKind ${r}`)}}(e,n,!!r);case 4:return 2;default:return gn.assertNever(t)}}function Qee({sourceFile:e,program:t,cancellationToken:n,host:r,preferences:i},o,a){const s=t.getTypeChecker(),c=t.getCompilerOptions();return R(Zee(e,s,o,c),s=>{if("default"===s)return;const c=DT(o),l=Uee(e,t),_=function(e,t,n,r,i,o,a,s,c){var l;const _=Qe(),u=XZ(i,c,s),d=null==(l=s.getModuleSpecifierCache)?void 0:l.call(s),p=yt(e=>pY(e?s.getPackageJsonAutoImportProvider():o,s));function f(e,t,n,r,o,a){const s=p(a);if(w0(o,i,t,e,c,u,s,d)){const i=o.getTypeChecker();_.add(fZ(n,i).toString(),{symbol:n,moduleSymbol:e,moduleFileName:null==t?void 0:t.fileName,exportKind:r,targetFlags:px(n,i).flags,isFromPackageJson:a})}}return D0(o,s,c,a,(i,o,a,s)=>{const c=a.getTypeChecker();r.throwIfCancellationRequested();const l=a.getCompilerOptions(),_=O0(i,c);_&&ute(c.getSymbolFlags(_.symbol),n)&&j0(_.symbol,c,wS(l),(n,r)=>(t?r??n:n)===e)&&f(i,o,_.symbol,_.exportKind,a,s);const u=c.tryGetMemberInModuleExportsAndProperties(e,i);u&&ute(c.getSymbolFlags(u),n)&&f(i,o,u,0,a,s)}),_}(s,wm(o),lX(o),n,e,t,a,r,i);return Be(J(_.values(),n=>Jee(n,o.getStart(e),c,l,t,e,r,i).fixes),e=>({fix:e,symbolName:s,errorIdentifierText:o.text,isJsxNamespaceFix:s!==o.text}))})}function Yee(e,t,n,r){const i=r.getTypeChecker(),o=i.resolveName(n,t,111551,!0);if(!o)return;const a=i.getTypeOnlyAliasDeclaration(o);return a&&wd(a)===e?{kind:4,typeOnlyAliasDeclaration:a}:void 0}function Zee(e,t,n,r){const i=n.parent;if((Nu(i)||YF(i))&&i.tagName===n&&h0(r.jsx)){const r=t.getJsxNamespace(e);if(function(e,t,n){if(My(t.text))return!0;const r=n.resolveName(e,t,111551,!0);return!r||X(r.declarations,Hl)&&!(111551&r.flags)}(r,n,t)){return!My(n.text)&&!t.resolveName(n.text,n,111551,!1)?[n.text,r]:[r]}}return[n.text]}function ete(e,t,n,r,i,o,a){let s;const c=sde.ChangeTracker.with(e,e=>{s=function(e,t,n,r,i,o,a){const s=bY(t,a);switch(r.kind){case 0:return rte(e,t,r),[ha.Change_0_to_1,n,`${r.namespacePrefix}.${n}`];case 1:return ite(e,t,r,s),[ha.Change_0_to_1,n,ote(r.moduleSpecifier,s)+n];case 2:{const{importClauseOrBindingPattern:o,importKind:s,addAsTypeOnly:c,moduleSpecifier:l}=r;nte(e,t,o,1===s?{name:n,addAsTypeOnly:c}:void 0,0===s?[{name:n,addAsTypeOnly:c}]:p,void 0,a);const _=jy(l);return i?[ha.Import_0_from_1,n,_]:[ha.Update_import_from_0,_]}case 3:{const{importKind:c,moduleSpecifier:l,addAsTypeOnly:_,useRequire:u,qualification:d}=r;return FY(e,t,(u?lte:cte)(l,s,1===c?{name:n,addAsTypeOnly:_}:void 0,0===c?[{name:n,addAsTypeOnly:_}]:void 0,2===c||3===c?{importKind:c,name:(null==d?void 0:d.namespacePrefix)||n,addAsTypeOnly:_}:void 0,o.getCompilerOptions(),a),!0,a),d&&rte(e,t,d),i?[ha.Import_0_from_1,n,l]:[ha.Add_import_from_0,l]}case 4:{const{typeOnlyAliasDeclaration:i}=r,s=function(e,t,n,r,i){const o=n.getCompilerOptions(),a=o.verbatimModuleSyntax;switch(t.kind){case 277:if(t.isTypeOnly){if(t.parent.elements.length>1){const n=kw.updateImportSpecifier(t,!1,t.propertyName,t.name),{specifierComparer:o}=x_e.getNamedImportSpecifierComparerWithDetection(t.parent.parent.parent,i,r),a=x_e.getImportSpecifierInsertionIndex(t.parent.elements,n,o);if(a!==t.parent.elements.indexOf(t))return e.delete(r,t),e.insertImportSpecifierAtIndex(r,n,t.parent,a),t}return e.deleteRange(r,{pos:Hd(t.getFirstToken()),end:Hd(t.propertyName??t.name)}),t}return gn.assert(t.parent.parent.isTypeOnly),s(t.parent.parent),t.parent.parent;case 274:return s(t),t;case 275:return s(t.parent),t.parent;case 272:return e.deleteRange(r,t.getChildAt(1)),t;default:gn.failBadSyntaxKind(t)}function s(s){var c;if(e.delete(r,PY(s,r)),!o.allowImportingTsExtensions){const t=Cg(s.parent),i=t&&(null==(c=n.getResolvedModuleFromModuleSpecifier(t,r))?void 0:c.resolvedModule);if(null==i?void 0:i.resolvedUsingTsExtension){const n=ea(t.text,pU(t.text,o));e.replaceNode(r,t,kw.createStringLiteral(n))}}if(a){const n=at(s.namedBindings,RF);if(n&&n.elements.length>1){!1!==x_e.getNamedImportSpecifierComparerWithDetection(s.parent,i,r).isSorted&&277===t.kind&&0!==n.elements.indexOf(t)&&(e.delete(r,t),e.insertImportSpecifierAtIndex(r,t,n,0));for(const i of n.elements)i===t||i.isTypeOnly||e.insertModifierBefore(r,156,i)}}}}(e,i,o,t,a);return 277===s.kind?[ha.Remove_type_from_import_of_0_from_1,n,tte(s.parent.parent)]:[ha.Remove_type_from_import_declaration_from_0,tte(s)]}default:return gn.assertNever(r,`Unexpected fix kind ${r.kind}`)}}(e,t,n,r,i,o,a)});return Q7(Dee,c,s,Eee,ha.Add_all_missing_imports)}function tte(e){var t,n;return 272===e.kind?(null==(n=at(null==(t=at(e.moduleReference,HF))?void 0:t.expression,Uu))?void 0:n.text)||e.moduleReference.getText():st(e.parent.moduleSpecifier,QN).text}function nte(e,t,n,r,i,o,a){var s;if(207===n.kind){if(o&&n.elements.some(e=>o.has(e)))return void e.replaceNode(t,n,kw.createObjectBindingPattern([...n.elements.filter(e=>!o.has(e)),...r?[kw.createBindingElement(void 0,"default",r.name)]:p,...i.map(e=>kw.createBindingElement(void 0,e.propertyName,e.name))]));r&&_(n,r.name,"default");for(const e of i)_(n,e.name,e.propertyName);return}const c=n.isTypeOnly&&X([r,...i],e=>4===(null==e?void 0:e.addAsTypeOnly)),l=n.namedBindings&&(null==(s=at(n.namedBindings,RF))?void 0:s.elements);if(r&&(gn.assert(!n.name,"Cannot add a default import to an import clause that already has one"),e.insertNodeAt(t,n.getStart(t),kw.createIdentifier(r.name),{suffix:", "})),i.length){const{specifierComparer:r,isSorted:s}=x_e.getNamedImportSpecifierComparerWithDetection(n.parent,a,t),_=me(i.map(e=>kw.createImportSpecifier((!n.isTypeOnly||c)&&ste(e,a),void 0===e.propertyName?void 0:kw.createIdentifier(e.propertyName),kw.createIdentifier(e.name))),r);if(o)e.replaceNode(t,n.namedBindings,kw.updateNamedImports(n.namedBindings,me([...l.filter(e=>!o.has(e)),..._],r)));else if((null==l?void 0:l.length)&&!1!==s){const i=c&&l?kw.updateNamedImports(n.namedBindings,j(l,e=>kw.updateImportSpecifier(e,!0,e.propertyName,e.name))).elements:l;for(const o of _){const a=x_e.getImportSpecifierInsertionIndex(i,o,r);e.insertImportSpecifierAtIndex(t,o,n.namedBindings,a)}}else if(null==l?void 0:l.length)for(const n of _)e.insertNodeInListAfter(t,Te(l),n,l);else if(_.length){const r=kw.createNamedImports(_);n.namedBindings?e.replaceNode(t,n.namedBindings,r):e.insertNodeAfter(t,gn.checkDefined(n.name,"Import clause must have either named imports or a default import"),r)}}if(c&&(e.delete(t,PY(n,t)),l))for(const n of l)e.insertModifierBefore(t,156,n);function _(n,r,i){const o=kw.createBindingElement(void 0,i,r);n.elements.length?e.insertNodeInListAfter(t,Te(n.elements),o):e.replaceNode(t,n,kw.createObjectBindingPattern([o]))}}function rte(e,t,{namespacePrefix:n,usagePosition:r}){e.insertText(t,r,n+".")}function ite(e,t,{moduleSpecifier:n,usagePosition:r},i){e.insertText(t,r,ote(n,i))}function ote(e,t){const n=xY(t);return`import(${n}${e}${n}).`}function ate({addAsTypeOnly:e}){return 2===e}function ste(e,t){return ate(e)||!!t.preferTypeOnlyAutoImports&&4!==e.addAsTypeOnly}function cte(e,t,n,r,i,o,a){const s=hY(e,t);let c;if(void 0!==n||(null==r?void 0:r.length)){const i=(!n||ate(n))&&k(r,ate)||(o.verbatimModuleSyntax||a.preferTypeOnlyAutoImports)&&4!==(null==n?void 0:n.addAsTypeOnly)&&!X(r,e=>4===e.addAsTypeOnly);c=_e(c,gY(n&&kw.createIdentifier(n.name),null==r?void 0:r.map(e=>kw.createImportSpecifier(!i&&ste(e,a),void 0===e.propertyName?void 0:kw.createIdentifier(e.propertyName),kw.createIdentifier(e.name))),e,t,i))}if(i){c=_e(c,3===i.importKind?kw.createImportEqualsDeclaration(void 0,ste(i,a),kw.createIdentifier(i.name),kw.createExternalModuleReference(s)):kw.createImportDeclaration(void 0,kw.createImportClause(ste(i,a)?156:void 0,void 0,kw.createNamespaceImport(kw.createIdentifier(i.name))),s,void 0))}return gn.checkDefined(c)}function lte(e,t,n,r,i){const o=hY(e,t);let a;if(n||(null==r?void 0:r.length)){const e=(null==r?void 0:r.map(({name:e,propertyName:t})=>kw.createBindingElement(void 0,t,e)))||[];n&&e.unshift(kw.createBindingElement(void 0,"default",n.name));a=_e(a,_te(kw.createObjectBindingPattern(e),o))}if(i){a=_e(a,_te(i.name,o))}return gn.checkDefined(a)}function _te(e,t){return kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration("string"==typeof e?kw.createIdentifier(e):e,void 0,void 0,kw.createCallExpression(kw.createIdentifier("require"),void 0,[t]))],2))}function ute(e,t){return 7===t||(1&t?!!(111551&e):2&t?!!(788968&e):!!(4&t)&&!!(1920&e))}function dte(e,t){return Lm(e)?t.getImpliedNodeFormatForEmit(e):YV(e,t.getCompilerOptions())}e8({errorCodes:Fee,getCodeActions(e){const{errorCode:t,preferences:n,sourceFile:r,span:i,program:o}=e,a=Wee(e,t,i.start,!0);if(a)return a.map(({fix:t,symbolName:i,errorIdentifierText:a})=>ete(e,r,i,t,i!==a,o,n))},fixIds:[Eee],getAllCodeActions:e=>{const{sourceFile:t,program:n,preferences:r,host:i,cancellationToken:o}=e,a=Aee(t,n,!0,r,i,o);return s8(e,Fee,t=>a.addImportFromDiagnostic(t,e)),i8(sde.ChangeTracker.with(e,a.writeFixes))}});var pte="addMissingConstraint",fte=[ha.Type_0_is_not_comparable_to_type_1.code,ha.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,ha.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,ha.Type_0_is_not_assignable_to_type_1.code,ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,ha.Property_0_is_incompatible_with_index_signature.code,ha.Property_0_in_type_1_is_not_assignable_to_type_2.code,ha.Type_0_does_not_satisfy_the_constraint_1.code];function mte(e,t,n){const r=T(e.getSemanticDiagnostics(t),e=>e.start===n.start&&e.length===n.length);if(void 0===r||void 0===r.relatedInformation)return;const i=T(r.relatedInformation,e=>e.code===ha.This_type_parameter_might_need_an_extends_0_constraint.code);if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;let o=Toe(i.file,Ys(i.start,i.length));if(void 0!==o&&(fD(o)&&PD(o.parent)&&(o=o.parent),PD(o))){if(_E(o.parent))return;const r=dQ(t,n.start),a=function(e,t){if(N_(t.parent))return e.getTypeArgumentConstraint(t.parent);const n=Q_(t)?e.getContextualType(t):void 0;return n||e.getTypeAtLocation(t)}(e.getTypeChecker(),r)||function(e){const[,t]=SV(e,"\n",0).match(/`extends (.*)`/)||[];return t}(i.messageText);return{constraint:a,declaration:o,token:r}}}function gte(e,t,n,r,i,o){const{declaration:a,constraint:s}=o,c=t.getTypeChecker();if(it(s))e.insertText(i,a.name.end,` extends ${s}`);else{const o=wS(t.getCompilerOptions()),l=toe({program:t,host:r}),_=Pee(i,t,n,r),u=soe(c,_,s,void 0,o,void 0,void 0,l);u&&(e.replaceNode(i,a,kw.updateTypeParameterDeclaration(a,void 0,a.name,u,a.default)),_.writeFixes(e))}}e8({errorCodes:fte,getCodeActions(e){const{sourceFile:t,span:n,program:r,preferences:i,host:o}=e,a=mte(r,t,n);if(void 0===a)return;const s=sde.ChangeTracker.with(e,e=>gte(e,r,i,o,t,a));return[Q7(pte,s,ha.Add_extends_constraint,pte,ha.Add_extends_constraint_to_all_type_parameters)]},fixIds:[pte],getAllCodeActions:e=>{const{program:t,preferences:n,host:r}=e,i=new Set;return i8(sde.ChangeTracker.with(e,o=>{s8(e,fte,e=>{const a=mte(t,e.file,Ys(e.start,e.length));if(a&&Dx(i,pJ(a.declaration)))return gte(o,t,n,r,e.file,a)})}))}});var hte="fixOverrideModifier",yte="fixAddOverrideModifier",vte="fixRemoveOverrideModifier",bte=[ha.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,ha.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,ha.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,ha.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,ha.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,ha.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,ha.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code],xte={[ha.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:ha.Add_override_modifier,fixId:yte,fixAllDescriptions:ha.Add_all_missing_override_modifiers},[ha.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:ha.Add_override_modifier,fixId:yte,fixAllDescriptions:ha.Add_all_missing_override_modifiers},[ha.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:ha.Remove_override_modifier,fixId:vte,fixAllDescriptions:ha.Remove_all_unnecessary_override_modifiers},[ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:ha.Remove_override_modifier,fixId:vte,fixAllDescriptions:ha.Remove_override_modifier},[ha.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]:{descriptions:ha.Add_override_modifier,fixId:yte,fixAllDescriptions:ha.Add_all_missing_override_modifiers},[ha.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:ha.Add_override_modifier,fixId:yte,fixAllDescriptions:ha.Add_all_missing_override_modifiers},[ha.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]:{descriptions:ha.Add_override_modifier,fixId:yte,fixAllDescriptions:ha.Remove_all_unnecessary_override_modifiers},[ha.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:ha.Remove_override_modifier,fixId:vte,fixAllDescriptions:ha.Remove_all_unnecessary_override_modifiers},[ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:ha.Remove_override_modifier,fixId:vte,fixAllDescriptions:ha.Remove_all_unnecessary_override_modifiers}};function Ste(e,t,n,r){switch(n){case ha.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:case ha.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:case ha.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:case ha.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:case ha.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:return function(e,t,n){const r=Tte(t,n);if(jm(t))return void e.addJSDocTags(t,r,[kw.createJSDocOverrideTag(kw.createIdentifier("override"))]);const i=r.modifiers||p,o=T(i,SD),a=T(i,kD),s=T(i,e=>zQ(e.kind)),c=C(i,ID),l=a?a.end:o?o.end:s?s.end:c?is(t.text,c.end):r.getStart(t),_=s||o||a?{prefix:" "}:{suffix:" "};e.insertModifierAt(t,l,164,_)}(e,t.sourceFile,r);case ha.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:case ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:case ha.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:case ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:return function(e,t,n){const r=Tte(t,n);if(jm(t))return void e.filterJSDocTags(t,r,sn(qP));const i=T(r.modifiers,TD);gn.assertIsDefined(i),e.deleteModifier(t,i)}(e,t.sourceFile,r);default:gn.fail("Unexpected error code: "+n)}}function kte(e){switch(e.kind){case 177:case 173:case 175:case 178:case 179:return!0;case 170:return ac(e,e.parent);default:return!1}}function Tte(e,t){const n=yc(dQ(e,t),e=>y_(e)?"quit":kte(e));return gn.assert(n&&kte(n)),n}e8({errorCodes:bte,getCodeActions:function(e){const{errorCode:t,span:n}=e,r=xte[t];if(!r)return p;const{descriptions:i,fixId:o,fixAllDescriptions:a}=r,s=sde.ChangeTracker.with(e,r=>Ste(r,e,t,n.start));return[Y7(hte,s,i,o,a)]},fixIds:[hte,yte,vte],getAllCodeActions:e=>a8(e,bte,(t,n)=>{const{code:r,start:i}=n,o=xte[r];o&&o.fixId===e.fixId&&Ste(t,e,r,i)})});var Cte="fixNoPropertyAccessFromIndexSignature",wte=[ha.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code];function Nte(e,t,n,r){const i=bY(t,r),o=kw.createStringLiteral(n.name.text,0===i);e.replaceNode(t,n,xl(n)?kw.createElementAccessChain(n.expression,n.questionDotToken,o):kw.createElementAccessExpression(n.expression,o))}function Dte(e,t){return st(dQ(e,t).parent,bE)}e8({errorCodes:wte,fixIds:[Cte],getCodeActions(e){const{sourceFile:t,span:n,preferences:r}=e,i=Dte(t,n.start),o=sde.ChangeTracker.with(e,t=>Nte(t,e.sourceFile,i,r));return[Q7(Cte,o,[ha.Use_element_access_for_0,i.name.text],Cte,ha.Use_element_access_for_all_undeclared_properties)]},getAllCodeActions:e=>a8(e,wte,(t,n)=>Nte(t,n.file,Dte(n.file,n.start),e.preferences))});var Ete="fixImplicitThis",Fte=[ha.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function Pte(e,t,n,r){const i=dQ(t,n);if(!MX(i))return;const o=sm(i,!1,!1);if((vF(o)||NE(o))&&!mP(sm(o,!1,!1))){const n=gn.checkDefined(YX(o,100,t)),{name:i}=o,a=gn.checkDefined(o.body);if(NE(o)){if(i&&Bce.Core.isSymbolReferencedInFile(i,r,t,a))return;return e.delete(t,n),i&&e.delete(t,i),e.insertText(t,a.pos," =>"),[ha.Convert_function_expression_0_to_arrow_function,i?i.text:AZ]}return e.replaceNode(t,n,kw.createToken(87)),e.insertText(t,i.end," = "),e.insertText(t,a.pos," =>"),[ha.Convert_function_declaration_0_to_arrow_function,i.text]}}e8({errorCodes:Fte,getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e;let i;const o=sde.ChangeTracker.with(e,e=>{i=Pte(e,t,r.start,n.getTypeChecker())});return i?[Q7(Ete,o,i,Ete,ha.Fix_all_implicit_this_errors)]:p},fixIds:[Ete],getAllCodeActions:e=>a8(e,Fte,(t,n)=>{Pte(t,n.file,n.start,e.program.getTypeChecker())})});var Ate="fixImportNonExportedMember",Ite=[ha.Module_0_declares_1_locally_but_it_is_not_exported.code];function Ote(e,t,n){var r,i;const o=dQ(e,t);if(fD(o)){const t=yc(o,EF);if(void 0===t)return;const a=QN(t.moduleSpecifier)?t.moduleSpecifier:void 0;if(void 0===a)return;const s=null==(r=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:r.resolvedModule;if(void 0===s)return;const c=n.getSourceFile(s.resolvedFileName);if(void 0===c||y0(n,c))return;const l=null==(i=at(c.symbol.valueDeclaration,fu))?void 0:i.locals;if(void 0===l)return;const _=l.get(o.escapedText);if(void 0===_)return;const u=function(e){if(void 0===e.valueDeclaration)return ve(e.declarations);const t=e.valueDeclaration,n=hF(t)?at(t.parent.parent,ZE):void 0;return n&&1===m(n.declarationList.declarations)?n:t}(_);if(void 0===u)return;return{exportName:{node:o,isTypeOnly:YT(u)},node:u,moduleSourceFile:c,moduleSpecifier:a.text}}}function Lte(e,t,n,r,i){m(r)&&(i?Mte(e,t,n,i,r):Rte(e,t,n,r))}function jte(e,t){return C(e.statements,e=>zF(e)&&(t&&e.isTypeOnly||!e.isTypeOnly))}function Mte(e,t,n,r,i){const o=r.exportClause&&qF(r.exportClause)?r.exportClause.elements:kw.createNodeArray([]),a=!(r.isTypeOnly||!FS(t.getCompilerOptions())&&!T(o,e=>e.isTypeOnly));e.replaceNode(n,r,kw.updateExportDeclaration(r,r.modifiers,r.isTypeOnly,kw.createNamedExports(kw.createNodeArray([...o,...Bte(i,a)],o.hasTrailingComma)),r.moduleSpecifier,r.attributes))}function Rte(e,t,n,r){e.insertNodeAtEndOfScope(n,n,kw.createExportDeclaration(void 0,!1,kw.createNamedExports(Bte(r,FS(t.getCompilerOptions()))),void 0,void 0))}function Bte(e,t){return kw.createNodeArray(O(e,e=>kw.createExportSpecifier(t&&e.isTypeOnly,void 0,e.node)))}e8({errorCodes:Ite,fixIds:[Ate],getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=Ote(t,n.start,r);if(void 0===i)return;const o=sde.ChangeTracker.with(e,e=>function(e,t,{exportName:n,node:r,moduleSourceFile:i}){const o=jte(i,n.isTypeOnly);o?Mte(e,t,i,o,[n]):ZT(r)?e.insertExportModifier(i,r):Rte(e,t,i,[n])}(e,r,i));return[Q7(Ate,o,[ha.Export_0_from_module_1,i.exportName.node.text,i.moduleSpecifier],Ate,ha.Export_all_referenced_locals)]},getAllCodeActions(e){const{program:t}=e;return i8(sde.ChangeTracker.with(e,n=>{const r=new Map;s8(e,Ite,e=>{const i=Ote(e.file,e.start,t);if(void 0===i)return;const{exportName:o,node:a,moduleSourceFile:s}=i;if(void 0===jte(s,o.isTypeOnly)&&ZT(a))n.insertExportModifier(s,a);else{const e=r.get(s)||{typeOnlyExports:[],exports:[]};o.isTypeOnly?e.typeOnlyExports.push(o):e.exports.push(o),r.set(s,e)}}),r.forEach((e,r)=>{const i=jte(r,!0);i&&i.isTypeOnly?(Lte(n,t,r,e.typeOnlyExports,i),Lte(n,t,r,e.exports,jte(r,!1))):Lte(n,t,r,[...e.exports,...e.typeOnlyExports],i)})}))}});var Jte="fixIncorrectNamedTupleSyntax";e8({errorCodes:[ha.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,ha.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code],getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=function(e,t){const n=dQ(e,t);return yc(n,e=>203===e.kind)}(t,n.start),i=sde.ChangeTracker.with(e,e=>function(e,t,n){if(!n)return;let r=n.type,i=!1,o=!1;for(;191===r.kind||192===r.kind||197===r.kind;)191===r.kind?i=!0:192===r.kind&&(o=!0),r=r.type;const a=kw.updateNamedTupleMember(n,n.dotDotDotToken||(o?kw.createToken(26):void 0),n.name,n.questionToken||(i?kw.createToken(58):void 0),r);if(a===n)return;e.replaceNode(t,n,a)}(e,t,r));return[Q7(Jte,i,ha.Move_labeled_tuple_element_modifiers_to_labels,Jte,ha.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[Jte]});var zte="fixSpelling",qte=[ha.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,ha.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,ha.Cannot_find_name_0_Did_you_mean_1.code,ha.Could_not_find_name_0_Did_you_mean_1.code,ha.Cannot_find_namespace_0_Did_you_mean_1.code,ha.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,ha.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,ha._0_has_no_exported_member_named_1_Did_you_mean_2.code,ha.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,ha.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,ha.No_overload_matches_this_call.code,ha.Type_0_is_not_assignable_to_type_1.code];function Ute(e,t,n,r){const i=dQ(e,t),o=i.parent;if((r===ha.No_overload_matches_this_call.code||r===ha.Type_0_is_not_assignable_to_type_1.code)&&!nP(o))return;const a=n.program.getTypeChecker();let s;if(bE(o)&&o.name===i){gn.assert(vl(i),"Expected an identifier for spelling (property access)");let e=a.getTypeAtLocation(o.expression);64&o.flags&&(e=a.getNonNullableType(e)),s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(LE(o)&&103===o.operatorToken.kind&&o.left===i&&mD(i)){const e=a.getTypeAtLocation(o.right);s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(ED(o)&&o.right===i){const e=a.getSymbolAtLocation(o.left);e&&1536&e.flags&&(s=a.getSuggestedSymbolForNonexistentModule(o.right,e))}else if(BF(o)&&o.name===i){gn.assertNode(i,fD,"Expected an identifier for spelling (import)");const t=function(e,t,n){var r;if(!t||!Uu(t.moduleSpecifier))return;const i=null==(r=e.program.getResolvedModuleFromModuleSpecifier(t.moduleSpecifier,n))?void 0:r.resolvedModule;return i?e.program.getSourceFile(i.resolvedFileName):void 0}(n,yc(i,EF),e);t&&t.symbol&&(s=a.getSuggestedSymbolForNonexistentModule(i,t.symbol))}else if(nP(o)&&o.name===i){gn.assertNode(i,fD,"Expected an identifier for JSX attribute");const e=yc(i,Nu),t=a.getContextualTypeForArgumentAtIndex(e,0);s=a.getSuggestedSymbolForNonexistentJSXAttribute(i,t)}else if(Rv(o)&&h_(o)&&o.name===i){const e=yc(i,y_),t=e?Ch(e):void 0,n=t?a.getTypeAtLocation(t):void 0;n&&(s=a.getSuggestedSymbolForNonexistentClassMember(rp(i),n))}else{const e=lX(i),t=rp(i);gn.assert(void 0!==t,"name should be defined"),s=a.getSuggestedSymbolForNonexistentSymbol(i,t,function(e){let t=0;4&e&&(t|=1920);2&e&&(t|=788968);1&e&&(t|=111551);return t}(e))}return void 0===s?void 0:{node:i,suggestedSymbol:s}}function Vte(e,t,n,r,i){const o=Cc(r);if(!Ss(o,i)&&bE(n.parent)){const i=r.valueDeclaration;i&&Fc(i)&&mD(i.name)?e.replaceNode(t,n,kw.createIdentifier(o)):e.replaceNode(t,n.parent,kw.createElementAccessExpression(n.parent.expression,kw.createStringLiteral(o)))}else e.replaceNode(t,n,kw.createIdentifier(o))}e8({errorCodes:qte,getCodeActions(e){const{sourceFile:t,errorCode:n}=e,r=Ute(t,e.span.start,e,n);if(!r)return;const{node:i,suggestedSymbol:o}=r,a=wS(e.host.getCompilationSettings());return[Q7("spelling",sde.ChangeTracker.with(e,e=>Vte(e,t,i,o,a)),[ha.Change_spelling_to_0,Cc(o)],zte,ha.Fix_all_detected_spelling_errors)]},fixIds:[zte],getAllCodeActions:e=>a8(e,qte,(t,n)=>{const r=Ute(n.file,n.start,e,n.code),i=wS(e.host.getCompilationSettings());r&&Vte(t,e.sourceFile,r.node,r.suggestedSymbol,i)})});var Wte="returnValueCorrect",$te="fixAddReturnStatement",Kte="fixRemoveBracesFromArrowFunctionBody",Hte="fixWrapTheBlockWithParen",Gte=[ha.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,ha.Type_0_is_not_assignable_to_type_1.code,ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];function Xte(e,t,n){const r=e.createSymbol(4,t.escapedText);r.links.type=e.getTypeAtLocation(n);const i=nd([r]);return e.createAnonymousType(void 0,i,[],[],[])}function Qte(e,t,n,r){if(!t.body||!YE(t.body)||1!==m(t.body.statements))return;const i=xe(t.body.statements);if(tF(i)&&Yte(e,t,e.getTypeAtLocation(i.expression),n,r))return{declaration:t,kind:0,expression:i.expression,statement:i,commentSource:i.expression};if(pF(i)&&tF(i.statement)){const o=kw.createObjectLiteralExpression([kw.createPropertyAssignment(i.label,i.statement.expression)]);if(Yte(e,t,Xte(e,i.label,i.statement.expression),n,r))return DE(t)?{declaration:t,kind:1,expression:o,statement:i,commentSource:i.statement.expression}:{declaration:t,kind:0,expression:o,statement:i,commentSource:i.statement.expression}}else if(YE(i)&&1===m(i.statements)){const o=xe(i.statements);if(pF(o)&&tF(o.statement)){const a=kw.createObjectLiteralExpression([kw.createPropertyAssignment(o.label,o.statement.expression)]);if(Yte(e,t,Xte(e,o.label,o.statement.expression),n,r))return{declaration:t,kind:0,expression:a,statement:i,commentSource:o}}}}function Yte(e,t,n,r,i){if(i){const r=e.getSignatureFromDeclaration(t);if(r){Lv(t,1024)&&(n=e.createPromiseType(n));const i=e.createSignature(t,r.typeParameters,r.thisParameter,r.parameters,n,void 0,r.minArgumentCount,r.flags);n=e.createAnonymousType(void 0,nd(),[i],[],[])}else n=e.getAnyType()}return e.isTypeAssignableTo(n,r)}function Zte(e,t,n,r){const i=dQ(t,n);if(!i.parent)return;const o=yc(i.parent,d_);switch(r){case ha.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:if(!(o&&o.body&&o.type&&ix(o.type,i)))return;return Qte(e,o,e.getTypeFromTypeNode(o.type),!1);case ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!o||!SE(o.parent)||!o.body)return;const t=o.parent.arguments.indexOf(o);if(-1===t)return;const n=e.getContextualTypeForArgumentAtIndex(o.parent,t);if(!n)return;return Qte(e,o,n,!0);case ha.Type_0_is_not_assignable_to_type_1.code:if(!gh(i)||!Bf(i.parent)&&!nP(i.parent))return;const r=function(e){switch(e.kind){case 261:case 170:case 209:case 173:case 304:return e.initializer;case 292:return e.initializer&&(oP(e.initializer)?e.initializer.expression:void 0);case 305:case 172:case 307:case 349:case 342:return}}(i.parent);if(!r||!d_(r)||!r.body)return;return Qte(e,r,e.getTypeAtLocation(i.parent),!0)}}function ene(e,t,n,r){QC(n);const i=JZ(t);e.replaceNode(t,r,kw.createReturnStatement(n),{leadingTriviaOption:sde.LeadingTriviaOption.Exclude,trailingTriviaOption:sde.TrailingTriviaOption.Exclude,suffix:i?";":void 0})}function tne(e,t,n,r,i,o){const a=o||CZ(r)?kw.createParenthesizedExpression(r):r;QC(i),hZ(i,a),e.replaceNode(t,n.body,a)}function nne(e,t,n,r){e.replaceNode(t,n.body,kw.createParenthesizedExpression(r))}function rne(e,t,n){const r=sde.ChangeTracker.with(e,r=>ene(r,e.sourceFile,t,n));return Q7(Wte,r,ha.Add_a_return_statement,$te,ha.Add_all_missing_return_statement)}function ine(e,t,n){const r=sde.ChangeTracker.with(e,r=>nne(r,e.sourceFile,t,n));return Q7(Wte,r,ha.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,Hte,ha.Wrap_all_object_literal_with_parentheses)}e8({errorCodes:Gte,fixIds:[$te,Kte,Hte],getCodeActions:function(e){const{program:t,sourceFile:n,span:{start:r},errorCode:i}=e,o=Zte(t.getTypeChecker(),n,r,i);if(o)return 0===o.kind?le([rne(e,o.expression,o.statement)],DE(o.declaration)?function(e,t,n,r){const i=sde.ChangeTracker.with(e,i=>tne(i,e.sourceFile,t,n,r,!1));return Q7(Wte,i,ha.Remove_braces_from_arrow_function_body,Kte,ha.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}(e,o.declaration,o.expression,o.commentSource):void 0):[ine(e,o.declaration,o.expression)]},getAllCodeActions:e=>a8(e,Gte,(t,n)=>{const r=Zte(e.program.getTypeChecker(),n.file,n.start,n.code);if(r)switch(e.fixId){case $te:ene(t,n.file,r.expression,r.statement);break;case Kte:if(!DE(r.declaration))return;tne(t,n.file,r.declaration,r.expression,r.commentSource,!1);break;case Hte:if(!DE(r.declaration))return;nne(t,n.file,r.declaration,r.expression);break;default:gn.fail(JSON.stringify(e.fixId))}})});var one="fixMissingMember",ane="fixMissingProperties",sne="fixMissingAttributes",cne="fixMissingFunctionDeclaration",lne=[ha.Property_0_does_not_exist_on_type_1.code,ha.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,ha.Property_0_is_missing_in_type_1_but_required_in_type_2.code,ha.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,ha.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,ha.Cannot_find_name_0.code,ha.Type_0_does_not_satisfy_the_expected_type_1.code];function _ne(e,t,n,r,i){var o,a;const s=dQ(e,t),c=s.parent;if(n===ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code){if(19!==s.kind||!vE(c)||!SE(c.parent))return;const e=w(c.parent.arguments,e=>e===c);if(e<0)return;const t=r.getResolvedSignature(c.parent);if(!(t&&t.declaration&&t.parameters[e]))return;const n=t.parameters[e].valueDeclaration;if(!(n&&AD(n)&&fD(n.name)))return;const i=Be(r.getUnmatchedProperties(r.getTypeAtLocation(c),r.getParameterType(t,e).getNonNullableType(),!1,!1));if(!m(i))return;return{kind:3,token:n.name,identifier:n.name.text,properties:i,parentDeclaration:c}}if(19===s.kind||VE(c)||_F(c)){const e=(VE(c)||_F(c))&&c.expression?c.expression:c;if(vE(e)){const t=VE(c)?r.getTypeFromTypeNode(c.type):r.getContextualType(e)||r.getTypeAtLocation(e),n=Be(r.getUnmatchedProperties(r.getTypeAtLocation(c),t.getNonNullableType(),!1,!1));if(!m(n))return;return{kind:3,token:c,identifier:void 0,properties:n,parentDeclaration:e,indentation:_F(e.parent)||RE(e.parent)?0:void 0}}}if(!vl(s))return;if(fD(s)&&Mu(c)&&c.initializer&&vE(c.initializer)){const e=null==(o=r.getContextualType(s)||r.getTypeAtLocation(s))?void 0:o.getNonNullableType(),t=Be(r.getUnmatchedProperties(r.getTypeAtLocation(c.initializer),e,!1,!1));if(!m(t))return;return{kind:3,token:s,identifier:s.text,properties:t,parentDeclaration:c.initializer}}if(fD(s)&&Nu(s.parent)){const e=function(e,t,n){const r=e.getContextualType(n.attributes);if(void 0===r)return p;const i=r.getProperties();if(!m(i))return p;const o=new Set;for(const t of n.attributes.properties)if(nP(t)&&o.add(lC(t.name)),iP(t)){const n=e.getTypeAtLocation(t.expression);for(const e of n.getProperties())o.add(e.escapedName)}return P(i,e=>Ss(e.name,t,1)&&!(16777216&e.flags||48&ux(e)||o.has(e.escapedName)))}(r,wS(i.getCompilerOptions()),s.parent);if(!m(e))return;return{kind:4,token:s,attributes:e,parentDeclaration:s.parent}}if(fD(s)){const t=null==(a=r.getContextualType(s))?void 0:a.getNonNullableType();if(t&&16&Tx(t)){const n=ve(r.getSignaturesOfType(t,0));if(void 0===n)return;return{kind:5,token:s,signature:n,sourceFile:e,parentDeclaration:kne(s)}}if(SE(c)&&c.expression===s)return{kind:2,token:s,call:c,sourceFile:e,modifierFlags:0,parentDeclaration:kne(s)}}if(!bE(c))return;const l=cY(r.getTypeAtLocation(c.expression)),_=l.symbol;if(!_||!_.declarations)return;if(fD(s)&&SE(c.parent)){const t=T(_.declarations,TF),n=null==t?void 0:t.getSourceFile();if(t&&n&&!y0(i,n))return{kind:2,token:s,call:c.parent,sourceFile:n,modifierFlags:32,parentDeclaration:t};const r=T(_.declarations,mP);if(e.commonJsModuleIndicator)return;if(r&&!y0(i,r))return{kind:2,token:s,call:c.parent,sourceFile:r,modifierFlags:32,parentDeclaration:r}}const u=T(_.declarations,y_);if(!u&&mD(s))return;const d=u||T(_.declarations,e=>xF(e)||XD(e));if(d&&!y0(i,d.getSourceFile())){const e=!XD(d)&&(l.target||l)!==r.getDeclaredTypeOfSymbol(_);if(e&&(mD(s)||xF(d)))return;const t=d.getSourceFile(),n=XD(d)?0:(e?256:0)|(u0(s.text)?2:0),i=jm(t);return{kind:0,token:s,call:at(c.parent,SE),modifierFlags:n,parentDeclaration:d,declSourceFile:t,isJSFile:i}}const f=T(_.declarations,kF);return!f||1056&l.flags||mD(s)||y0(i,f.getSourceFile())?void 0:{kind:1,token:s,parentDeclaration:f}}function une(e,t,n,r,i){const o=r.text;if(i){if(232===n.kind)return;const r=n.name.getText(),i=dne(kw.createIdentifier(r),o);e.insertNodeAfter(t,n,i)}else if(mD(r)){const r=kw.createPropertyDeclaration(void 0,o,void 0,void 0,void 0),i=mne(n);i?e.insertNodeAfter(t,i,r):e.insertMemberAtStart(t,n,r)}else{const r=uv(n);if(!r)return;const i=dne(kw.createThis(),o);e.insertNodeAtConstructorEnd(t,r,i)}}function dne(e,t){return kw.createExpressionStatement(kw.createAssignment(kw.createPropertyAccessExpression(e,t),Sne()))}function pne(e,t,n){let r;if(227===n.parent.parent.kind){const i=n.parent.parent,o=n.parent===i.left?i.right:i.left,a=e.getWidenedType(e.getBaseTypeOfLiteralType(e.getTypeAtLocation(o)));r=e.typeToTypeNode(a,t,1,8)}else{const t=e.getContextualType(n.parent);r=t?e.typeToTypeNode(t,void 0,1,8):void 0}return r||kw.createKeywordTypeNode(133)}function fne(e,t,n,r,i,o){const a=o?kw.createNodeArray(kw.createModifiersFromModifierFlags(o)):void 0,s=y_(n)?kw.createPropertyDeclaration(a,r,void 0,i,void 0):kw.createPropertySignature(void 0,r,void 0,i),c=mne(n);c?e.insertNodeAfter(t,c,s):e.insertMemberAtStart(t,n,s)}function mne(e){let t;for(const n of e.members){if(!LD(n))break;t=n}return t}function gne(e,t,n,r,i,o,a){const s=Pee(a,e.program,e.preferences,e.host),c=ooe(y_(o)?175:174,e,s,n,r,i,o),l=function(e,t){if(XD(e))return;const n=yc(t,e=>MD(e)||BD(e));return n&&n.parent===e?n:void 0}(o,n);l?t.insertNodeAfter(a,l,c):t.insertMemberAtStart(a,o,c),s.writeFixes(t)}function hne(e,t,{token:n,parentDeclaration:r}){const i=X(r.members,e=>{const n=t.getTypeAtLocation(e);return!!(n&&402653316&n.flags)}),o=r.getSourceFile(),a=kw.createEnumMember(n,i?kw.createStringLiteral(n.text):void 0),s=ke(r.members);s?e.insertNodeInListAfter(o,s,a,r.members):e.insertMemberAtStart(o,r,a)}function yne(e,t,n){const r=bY(t.sourceFile,t.preferences),i=Pee(t.sourceFile,t.program,t.preferences,t.host),o=2===n.kind?ooe(263,t,i,n.call,kc(n.token),n.modifierFlags,n.parentDeclaration):ioe(263,t,r,n.signature,goe(ha.Function_not_implemented.message,r),n.token,void 0,void 0,void 0,i);void 0===o&&gn.fail("fixMissingFunctionDeclaration codefix got unexpected error."),_F(n.parentDeclaration)?e.insertNodeBefore(n.sourceFile,n.parentDeclaration,o,!0):e.insertNodeAtEndOfScope(n.sourceFile,n.parentDeclaration,o),i.writeFixes(e)}function vne(e,t,n){const r=Pee(t.sourceFile,t.program,t.preferences,t.host),i=bY(t.sourceFile,t.preferences),o=t.program.getTypeChecker(),a=n.parentDeclaration.attributes,s=X(a.properties,iP),c=O(n.attributes,e=>{const a=xne(t,o,r,i,o.getTypeOfSymbol(e),n.parentDeclaration),s=kw.createIdentifier(e.name),c=kw.createJsxAttribute(s,kw.createJsxExpression(void 0,a));return jT(s,c),c}),l=kw.createJsxAttributes(s?[...c,...a.properties]:[...a.properties,...c]),_={prefix:a.pos===a.end?" ":void 0};e.replaceNode(t.sourceFile,a,l,_),r.writeFixes(e)}function bne(e,t,n){const r=Pee(t.sourceFile,t.program,t.preferences,t.host),i=bY(t.sourceFile,t.preferences),o=wS(t.program.getCompilerOptions()),a=t.program.getTypeChecker(),s=O(n.properties,e=>{const s=xne(t,a,r,i,a.getTypeOfSymbol(e),n.parentDeclaration);return kw.createPropertyAssignment(function(e,t,n,r){if(rd(e)){const t=r.symbolToNode(e,111551,void 0,void 0,1);if(t&&FD(t))return t}return GT(e.name,t,0===n,!1,!1)}(e,o,i,a),s)}),c={leadingTriviaOption:sde.LeadingTriviaOption.Exclude,trailingTriviaOption:sde.TrailingTriviaOption.Exclude,indentation:n.indentation};e.replaceNode(t.sourceFile,n.parentDeclaration,kw.createObjectLiteralExpression([...n.parentDeclaration.properties,...s],!0),c),r.writeFixes(e)}function xne(e,t,n,r,i,o){if(3&i.flags)return Sne();if(134217732&i.flags)return kw.createStringLiteral("",0===r);if(8&i.flags)return kw.createNumericLiteral(0);if(64&i.flags)return kw.createBigIntLiteral("0n");if(16&i.flags)return kw.createFalse();if(1056&i.flags){const e=i.symbol.exports?be(i.symbol.exports.values()):i.symbol,n=i.symbol.parent&&256&i.symbol.parent.flags?i.symbol.parent:i.symbol,r=t.symbolToExpression(n,111551,void 0,64);return void 0===e||void 0===r?kw.createNumericLiteral(0):kw.createPropertyAccessExpression(r,t.symbolToString(e))}if(256&i.flags)return kw.createNumericLiteral(i.value);if(2048&i.flags)return kw.createBigIntLiteral(i.value);if(128&i.flags)return kw.createStringLiteral(i.value,0===r);if(512&i.flags)return i===t.getFalseType()||i===t.getFalseType(!0)?kw.createFalse():kw.createTrue();if(65536&i.flags)return kw.createNull();if(1048576&i.flags){return y(i.types,i=>xne(e,t,n,r,i,o))??Sne()}if(t.isArrayLikeType(i))return kw.createArrayLiteralExpression();if(function(e){return 524288&e.flags&&(128&Tx(e)||e.symbol&&at(Ce(e.symbol.declarations),XD))}(i)){const a=O(t.getPropertiesOfType(i),i=>{const a=xne(e,t,n,r,t.getTypeOfSymbol(i),o);return kw.createPropertyAssignment(i.name,a)});return kw.createObjectLiteralExpression(a,!0)}if(16&Tx(i)){if(void 0===T(i.symbol.declarations||p,an(KD,jD,MD)))return Sne();const a=t.getSignaturesOfType(i,0);if(void 0===a)return Sne();return ioe(219,e,r,a[0],goe(ha.Function_not_implemented.message,r),void 0,void 0,void 0,o,n)??Sne()}if(1&Tx(i)){const e=kx(i.symbol);if(void 0===e||Bv(e))return Sne();const t=uv(e);return t&&m(t.parameters)?Sne():kw.createNewExpression(kw.createIdentifier(i.symbol.name),void 0,void 0)}return Sne()}function Sne(){return kw.createIdentifier("undefined")}function kne(e){if(yc(e,oP)){const t=yc(e.parent,_F);if(t)return t}return wd(e)}e8({errorCodes:lne,getCodeActions(e){const t=e.program.getTypeChecker(),n=_ne(e.sourceFile,e.span.start,e.errorCode,t,e.program);if(n){if(3===n.kind){const t=sde.ChangeTracker.with(e,t=>bne(t,e,n));return[Q7(ane,t,ha.Add_missing_properties,ane,ha.Add_all_missing_properties)]}if(4===n.kind){const t=sde.ChangeTracker.with(e,t=>vne(t,e,n));return[Q7(sne,t,ha.Add_missing_attributes,sne,ha.Add_all_missing_attributes)]}if(2===n.kind||5===n.kind){const t=sde.ChangeTracker.with(e,t=>yne(t,e,n));return[Q7(cne,t,[ha.Add_missing_function_declaration_0,n.token.text],cne,ha.Add_all_missing_function_declarations)]}if(1===n.kind){const t=sde.ChangeTracker.with(e,t=>hne(t,e.program.getTypeChecker(),n));return[Q7(one,t,[ha.Add_missing_enum_member_0,n.token.text],one,ha.Add_all_missing_members)]}return Y(function(e,t){const{parentDeclaration:n,declSourceFile:r,modifierFlags:i,token:o,call:a}=t;if(void 0===a)return;const s=o.text,c=t=>sde.ChangeTracker.with(e,i=>gne(e,i,a,o,t,n,r)),l=[Q7(one,c(256&i),[256&i?ha.Declare_static_method_0:ha.Declare_method_0,s],one,ha.Add_all_missing_members)];2&i&&l.unshift(X7(one,c(2),[ha.Declare_private_method_0,s]));return l}(e,n),function(e,t){return t.isJSFile?ln(function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){if(xF(t)||XD(t))return;const o=sde.ChangeTracker.with(e,e=>une(e,n,t,i,!!(256&r)));if(0===o.length)return;const a=256&r?ha.Initialize_static_property_0:mD(i)?ha.Declare_a_private_field_named_0:ha.Initialize_property_0_in_the_constructor;return Q7(one,o,[a,i.text],one,ha.Add_all_missing_members)}(e,t)):function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){const o=i.text,a=256&r,s=pne(e.program.getTypeChecker(),t,i),c=r=>sde.ChangeTracker.with(e,e=>fne(e,n,t,o,s,r)),l=[Q7(one,c(256&r),[a?ha.Declare_static_property_0:ha.Declare_property_0,o],one,ha.Add_all_missing_members)];if(a||mD(i))return l;2&r&&l.unshift(X7(one,c(2),[ha.Declare_private_property_0,o]));return l.push(function(e,t,n,r,i){const o=kw.createKeywordTypeNode(154),a=kw.createParameterDeclaration(void 0,void 0,"x",void 0,o,void 0),s=kw.createIndexSignature(void 0,[a],i),c=sde.ChangeTracker.with(e,e=>e.insertMemberAtStart(t,n,s));return X7(one,c,[ha.Add_index_signature_for_property_0,r])}(e,n,t,i.text,s)),l}(e,t)}(e,n))}},fixIds:[one,cne,ane,sne],getAllCodeActions:e=>{const{program:t,fixId:n}=e,r=t.getTypeChecker(),i=new Set,o=new Map;return i8(sde.ChangeTracker.with(e,t=>{s8(e,lne,a=>{const s=_ne(a.file,a.start,a.code,r,e.program);if(void 0===s)return;const c=pJ(s.parentDeclaration)+"#"+(3===s.kind?s.identifier||pJ(s.token):s.token.text);if(Dx(i,c))if(n!==cne||2!==s.kind&&5!==s.kind){if(n===ane&&3===s.kind)bne(t,e,s);else if(n===sne&&4===s.kind)vne(t,e,s);else if(1===s.kind&&hne(t,r,s),0===s.kind){const{parentDeclaration:e,token:t}=s,n=W(o,e,()=>[]);n.some(e=>e.token.text===t.text)||n.push(s)}}else yne(t,e,s)}),o.forEach((n,i)=>{const a=XD(i)?void 0:function(e,t){const n=[];for(;e;){const r=wh(e),i=r&&t.getSymbolAtLocation(r.expression);if(!i)break;const o=2097152&i.flags?t.getAliasedSymbol(i):i,a=o.declarations&&T(o.declarations,y_);if(!a)break;n.push(a),e=a}return n}(i,r);for(const i of n){if(null==a?void 0:a.some(e=>{const t=o.get(e);return!!t&&t.some(({token:e})=>e.text===i.token.text)}))continue;const{parentDeclaration:n,declSourceFile:s,modifierFlags:c,token:l,call:_,isJSFile:u}=i;if(_&&!mD(l))gne(e,t,_,l,256&c,n,s);else if(!u||xF(n)||XD(n)){const e=pne(r,n,l);fne(t,s,n,l.text,e,256&c)}else une(t,s,n,l,!!(256&c))}})}))}});var Tne="addMissingNewOperator",Cne=[ha.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];function wne(e,t,n){const r=st(function(e,t){let n=dQ(e,t.start);const r=js(t);for(;n.endwne(e,t,n));return[Q7(Tne,r,ha.Add_missing_new_operator_to_call,Tne,ha.Add_missing_new_operator_to_all_calls)]},fixIds:[Tne],getAllCodeActions:e=>a8(e,Cne,(t,n)=>wne(t,e.sourceFile,n))});var Nne="addMissingParam",Dne="addOptionalParam",Ene=[ha.Expected_0_arguments_but_got_1.code];function Fne(e,t,n){const r=yc(dQ(e,n),SE);if(void 0===r||0===m(r.arguments))return;const i=t.getTypeChecker(),o=P(i.getTypeAtLocation(r.expression).symbol.declarations,Ine);if(void 0===o)return;const a=ke(o);if(void 0===a||void 0===a.body||y0(t,a.getSourceFile()))return;const s=function(e){const t=Ac(e);if(t)return t;if(hF(e.parent)&&fD(e.parent.name)||LD(e.parent)||AD(e.parent))return e.parent.name}(a);if(void 0===s)return;const c=[],l=[],_=m(a.parameters),u=m(r.arguments);if(_>u)return;const d=[a,...Lne(a,o)];for(let e=0,t=0,n=0;e{const s=wd(i),c=Pee(s,t,n,r);m(i.parameters)?e.replaceNodeRangeWithNodes(s,xe(i.parameters),Te(i.parameters),One(c,a,i,o),{joiner:", ",indentation:0,leadingTriviaOption:sde.LeadingTriviaOption.IncludeAll,trailingTriviaOption:sde.TrailingTriviaOption.Include}):g(One(c,a,i,o),(t,n)=>{0===m(i.parameters)&&0===n?e.insertNodeAt(s,i.parameters.end,t):e.insertNodeAtEndOfList(s,i.parameters,t)}),c.writeFixes(e)})}function Ine(e){switch(e.kind){case 263:case 219:case 175:case 220:return!0;default:return!1}}function One(e,t,n,r){const i=O(n.parameters,e=>kw.createParameterDeclaration(e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer));for(const{pos:n,declaration:o}of r){const r=n>0?i[n-1]:void 0;i.splice(n,0,kw.updateParameterDeclaration(o,o.modifiers,o.dotDotDotToken,o.name,r&&r.questionToken?kw.createToken(58):o.questionToken,Bne(e,o.type,t),o.initializer))}return i}function Lne(e,t){const n=[];for(const r of t)if(jne(r)){if(m(r.parameters)===m(e.parameters)){n.push(r);continue}if(m(r.parameters)>m(e.parameters))return[]}return n}function jne(e){return Ine(e)&&void 0===e.body}function Mne(e,t,n){return kw.createParameterDeclaration(void 0,void 0,e,n,t,void 0)}function Rne(e,t){return m(e)&&X(e,e=>tAne(t,e.program,e.preferences,e.host,r,i)),[m(i)>1?ha.Add_missing_parameters_to_0:ha.Add_missing_parameter_to_0,n],Nne,ha.Add_all_missing_parameters)),m(o)&&le(a,Q7(Dne,sde.ChangeTracker.with(e,t=>Ane(t,e.program,e.preferences,e.host,r,o)),[m(o)>1?ha.Add_optional_parameters_to_0:ha.Add_optional_parameter_to_0,n],Dne,ha.Add_all_optional_parameters)),a},getAllCodeActions:e=>a8(e,Ene,(t,n)=>{const r=Fne(e.sourceFile,e.program,n.start);if(r){const{declarations:n,newParameters:i,newOptionalParameters:o}=r;e.fixId===Nne&&Ane(t,e.program,e.preferences,e.host,n,i),e.fixId===Dne&&Ane(t,e.program,e.preferences,e.host,n,o)}})});var Jne="installTypesPackage",zne=ha.Cannot_find_module_0_or_its_corresponding_type_declarations.code,qne=ha.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed.code,Une=[zne,ha.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code,qne];function Vne(e,t){return{type:"install package",file:e,packageName:t}}function Wne(e,t){const n=at(dQ(e,t),QN);if(!n)return;const r=n.text,{packageName:i}=ER(r);return As(i)?void 0:i}function $ne(e,t,n){var r;return n===zne?LC.has(e)?"@types/node":void 0:(null==(r=t.isKnownTypesPackageName)?void 0:r.call(t,e))?VR(e):void 0}e8({errorCodes:Une,getCodeActions:function(e){const{host:t,sourceFile:n,span:{start:r},errorCode:i}=e,o=i===qne?nk(e.program.getCompilerOptions(),n):Wne(n,r);if(void 0===o)return;const a=$ne(o,t,i);return void 0===a?[]:[Q7("fixCannotFindModule",[],[ha.Install_0,a],Jne,ha.Install_all_missing_types_packages,Vne(n.fileName,a))]},fixIds:[Jne],getAllCodeActions:e=>a8(e,Une,(t,n,r)=>{const i=Wne(n.file,n.start);if(void 0!==i)switch(e.fixId){case Jne:{const t=$ne(i,e.host,n.code);t&&r.push(Vne(n.file.fileName,t));break}default:gn.fail(`Bad fixId: ${e.fixId}`)}})});var Kne=[ha.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,ha.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,ha.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,ha.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,ha.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,ha.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code],Hne="fixClassDoesntImplementInheritedAbstractMember";function Gne(e,t){return st(dQ(e,t).parent,y_)}function Xne(e,t,n,r,i){const o=Ch(e),a=n.program.getTypeChecker(),s=a.getTypeAtLocation(o),c=a.getPropertiesOfType(s).filter(Qne),l=Pee(t,n.program,i,n.host);eoe(e,c,t,n,i,l,n=>r.insertMemberAtStart(t,e,n)),l.writeFixes(r)}function Qne(e){const t=Gv(xe(e.getDeclarations()));return!(2&t||!(64&t))}e8({errorCodes:Kne,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=sde.ChangeTracker.with(e,r=>Xne(Gne(t,n.start),t,e,r,e.preferences));return 0===r.length?void 0:[Q7(Hne,r,ha.Implement_inherited_abstract_class,Hne,ha.Implement_all_inherited_abstract_classes)]},fixIds:[Hne],getAllCodeActions:function(e){const t=new Set;return a8(e,Kne,(n,r)=>{const i=Gne(r.file,r.start);Dx(t,pJ(i))&&Xne(i,e.sourceFile,e,n,e.preferences)})}});var Yne="classSuperMustPrecedeThisAccess",Zne=[ha.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];function ere(e,t,n,r){e.insertNodeAtConstructorStart(t,n,r),e.delete(t,r)}function tre(e,t){const n=dQ(e,t);if(110!==n.kind)return;const r=tm(n),i=nre(r.body);return i&&!i.expression.arguments.some(e=>bE(e)&&e.expression===n)?{constructor:r,superCall:i}:void 0}function nre(e){return tF(e)&&gf(e.expression)?e:__(e)?void 0:sO(e,nre)}e8({errorCodes:Zne,getCodeActions(e){const{sourceFile:t,span:n}=e,r=tre(t,n.start);if(!r)return;const{constructor:i,superCall:o}=r,a=sde.ChangeTracker.with(e,e=>ere(e,t,i,o));return[Q7(Yne,a,ha.Make_super_call_the_first_statement_in_the_constructor,Yne,ha.Make_all_super_calls_the_first_statement_in_their_constructor)]},fixIds:[Yne],getAllCodeActions(e){const{sourceFile:t}=e,n=new Set;return a8(e,Zne,(e,r)=>{const i=tre(r.file,r.start);if(!i)return;const{constructor:o,superCall:a}=i;Dx(n,pJ(o.parent))&&ere(e,t,o,a)})}});var rre="constructorForDerivedNeedSuperCall",ire=[ha.Constructors_for_derived_classes_must_contain_a_super_call.code];function ore(e,t){const n=dQ(e,t);return gn.assert(BD(n.parent),"token should be at the constructor declaration"),n.parent}function are(e,t,n){const r=kw.createExpressionStatement(kw.createCallExpression(kw.createSuper(),void 0,p));e.insertNodeAtConstructorStart(t,n,r)}e8({errorCodes:ire,getCodeActions(e){const{sourceFile:t,span:n}=e,r=ore(t,n.start),i=sde.ChangeTracker.with(e,e=>are(e,t,r));return[Q7(rre,i,ha.Add_missing_super_call,rre,ha.Add_all_missing_super_calls)]},fixIds:[rre],getAllCodeActions:e=>a8(e,ire,(t,n)=>are(t,e.sourceFile,ore(n.file,n.start)))});var sre="fixEnableJsxFlag",cre=[ha.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];function lre(e,t){yoe(e,t,"jsx",kw.createStringLiteral("react"))}e8({errorCodes:cre,getCodeActions:function(e){const{configFile:t}=e.program.getCompilerOptions();if(void 0===t)return;const n=sde.ChangeTracker.with(e,e=>lre(e,t));return[X7(sre,n,ha.Enable_the_jsx_flag_in_your_configuration_file)]},fixIds:[sre],getAllCodeActions:e=>a8(e,cre,t=>{const{configFile:n}=e.program.getCompilerOptions();void 0!==n&&lre(t,n)})});var _re="fixNaNEquality",ure=[ha.This_condition_will_always_return_0.code];function dre(e,t,n){const r=T(e.getSemanticDiagnostics(t),e=>e.start===n.start&&e.length===n.length);if(void 0===r||void 0===r.relatedInformation)return;const i=T(r.relatedInformation,e=>e.code===ha.Did_you_mean_0.code);if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;const o=Toe(i.file,Ys(i.start,i.length));return void 0!==o&&Q_(o)&&LE(o.parent)?{suggestion:fre(i.messageText),expression:o.parent,arg:o}:void 0}function pre(e,t,n,r){const i=kw.createCallExpression(kw.createPropertyAccessExpression(kw.createIdentifier("Number"),kw.createIdentifier("isNaN")),void 0,[n]),o=r.operatorToken.kind;e.replaceNode(t,r,38===o||36===o?kw.createPrefixUnaryExpression(54,i):i)}function fre(e){const[,t]=SV(e,"\n",0).match(/'(.*)'/)||[];return t}e8({errorCodes:ure,getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=dre(r,t,n);if(void 0===i)return;const{suggestion:o,expression:a,arg:s}=i,c=sde.ChangeTracker.with(e,e=>pre(e,t,s,a));return[Q7(_re,c,[ha.Use_0,o],_re,ha.Use_Number_isNaN_in_all_conditions)]},fixIds:[_re],getAllCodeActions:e=>a8(e,ure,(t,n)=>{const r=dre(e.program,n.file,Ys(n.start,n.length));r&&pre(t,n.file,r.arg,r.expression)})}),e8({errorCodes:[ha.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,ha.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,ha.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code],getCodeActions:function(e){const t=e.program.getCompilerOptions(),{configFile:n}=t;if(void 0===n)return;const r=[],i=NS(t);if(i>=5&&i<99){const t=sde.ChangeTracker.with(e,e=>{yoe(e,n,"module",kw.createStringLiteral("esnext"))});r.push(X7("fixModuleOption",t,[ha.Set_the_module_option_in_your_configuration_file_to_0,"esnext"]))}const o=wS(t);if(o<4||o>99){const t=sde.ChangeTracker.with(e,e=>{if(!Yf(n))return;const t=[["target",kw.createStringLiteral("es2017")]];1===i&&t.push(["module",kw.createStringLiteral("commonjs")]),hoe(e,n,t)});r.push(X7("fixTargetOption",t,[ha.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))}return r.length?r:void 0}});var mre="fixPropertyAssignment",gre=[ha.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];function hre(e,t,n){e.replaceNode(t,n,kw.createPropertyAssignment(n.name,n.objectAssignmentInitializer))}function yre(e,t){return st(dQ(e,t).parent,dP)}e8({errorCodes:gre,fixIds:[mre],getCodeActions(e){const{sourceFile:t,span:n}=e,r=yre(t,n.start),i=sde.ChangeTracker.with(e,t=>hre(t,e.sourceFile,r));return[Q7(mre,i,[ha.Change_0_to_1,"=",":"],mre,[ha.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:e=>a8(e,gre,(e,t)=>hre(e,t.file,yre(t.file,t.start)))});var vre="extendsInterfaceBecomesImplements",bre=[ha.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function xre(e,t){const n=rm(dQ(e,t)).heritageClauses,r=n[0].getFirstToken();return 96===r.kind?{extendsToken:r,heritageClauses:n}:void 0}function Sre(e,t,n,r){if(e.replaceNode(t,n,kw.createToken(119)),2===r.length&&96===r[0].token&&119===r[1].token){const n=r[1].getFirstToken(),i=n.getFullStart();e.replaceRange(t,{pos:i,end:i},kw.createToken(28));const o=t.text;let a=n.end;for(;aSre(e,t,r,i));return[Q7(vre,o,ha.Change_extends_to_implements,vre,ha.Change_all_extended_interfaces_to_implements)]},fixIds:[vre],getAllCodeActions:e=>a8(e,bre,(e,t)=>{const n=xre(t.file,t.start);n&&Sre(e,t.file,n.extendsToken,n.heritageClauses)})});var kre="forgottenThisPropertyAccess",Tre=ha.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,Cre=[ha.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,ha.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,Tre];function wre(e,t,n){const r=dQ(e,t);if(fD(r)||mD(r))return{node:r,className:n===Tre?rm(r).name.text:void 0}}function Nre(e,t,{node:n,className:r}){QC(n),e.replaceNode(t,n,kw.createPropertyAccessExpression(r?kw.createIdentifier(r):kw.createThis(),n))}e8({errorCodes:Cre,getCodeActions(e){const{sourceFile:t}=e,n=wre(t,e.span.start,e.errorCode);if(!n)return;const r=sde.ChangeTracker.with(e,e=>Nre(e,t,n));return[Q7(kre,r,[ha.Add_0_to_unresolved_variable,n.className||"this"],kre,ha.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]},fixIds:[kre],getAllCodeActions:e=>a8(e,Cre,(t,n)=>{const r=wre(n.file,n.start,n.code);r&&Nre(t,e.sourceFile,r)})});var Dre="fixInvalidJsxCharacters_expression",Ere="fixInvalidJsxCharacters_htmlEntity",Fre=[ha.Unexpected_token_Did_you_mean_or_gt.code,ha.Unexpected_token_Did_you_mean_or_rbrace.code];e8({errorCodes:Fre,fixIds:[Dre,Ere],getCodeActions(e){const{sourceFile:t,preferences:n,span:r}=e,i=sde.ChangeTracker.with(e,e=>Are(e,n,t,r.start,!1)),o=sde.ChangeTracker.with(e,e=>Are(e,n,t,r.start,!0));return[Q7(Dre,i,ha.Wrap_invalid_character_in_an_expression_container,Dre,ha.Wrap_all_invalid_characters_in_an_expression_container),Q7(Ere,o,ha.Convert_invalid_character_to_its_html_entity_code,Ere,ha.Convert_all_invalid_characters_to_HTML_entity_code)]},getAllCodeActions:e=>a8(e,Fre,(t,n)=>Are(t,e.preferences,n.file,n.start,e.fixId===Ere))});var Pre={">":">","}":"}"};function Are(e,t,n,r,i){const o=n.getText()[r];if(!function(e){return Ie(Pre,e)}(o))return;const a=i?Pre[o]:`{${NZ(n,t,o)}}`;e.replaceRangeWithText(n,{pos:r,end:r+1},a)}var Ire="deleteUnmatchedParameter",Ore="renameUnmatchedParameter",Lre=[ha.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code];function jre(e,t){const n=dQ(e,t);if(n.parent&&KP(n.parent)&&fD(n.parent.name)){const e=n.parent,t=Qg(e),r=Gg(e);if(t&&r)return{jsDocHost:t,signature:r,name:n.parent.name,jsDocParameterTag:e}}}e8({fixIds:[Ire,Ore],errorCodes:Lre,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=[],i=jre(t,n.start);if(i)return le(r,function(e,{name:t,jsDocHost:n,jsDocParameterTag:r}){const i=sde.ChangeTracker.with(e,t=>t.filterJSDocTags(e.sourceFile,n,e=>e!==r));return Q7(Ire,i,[ha.Delete_unused_param_tag_0,t.getText(e.sourceFile)],Ire,ha.Delete_all_unused_param_tags)}(e,i)),le(r,function(e,{name:t,jsDocHost:n,signature:r,jsDocParameterTag:i}){if(!m(r.parameters))return;const o=e.sourceFile,a=dl(r),s=new Set;for(const e of a)KP(e)&&fD(e.name)&&s.add(e.name.escapedText);const c=y(r.parameters,e=>fD(e.name)&&!s.has(e.name.escapedText)?e.name.getText(o):void 0);if(void 0===c)return;const l=kw.updateJSDocParameterTag(i,i.tagName,kw.createIdentifier(c),i.isBracketed,i.typeExpression,i.isNameFirst,i.comment),_=sde.ChangeTracker.with(e,e=>e.replaceJSDocComment(o,n,O(a,e=>e===i?l:e)));return X7(Ore,_,[ha.Rename_param_tag_name_0_to_1,t.getText(o),c])}(e,i)),r},getAllCodeActions:function(e){const t=new Map;return i8(sde.ChangeTracker.with(e,n=>{s8(e,Lre,({file:e,start:n})=>{const r=jre(e,n);r&&t.set(r.signature,le(t.get(r.signature),r.jsDocParameterTag))}),t.forEach((t,r)=>{if(e.fixId===Ire){const e=new Set(t);n.filterJSDocTags(r.getSourceFile(),r,t=>!e.has(t))}})}))}});var Mre="fixUnreferenceableDecoratorMetadata";e8({errorCodes:[ha.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code],getCodeActions:e=>{const t=function(e,t,n){const r=at(dQ(e,n),fD);if(!r||184!==r.parent.kind)return;const i=t.getTypeChecker().getSymbolAtLocation(r);return T((null==i?void 0:i.declarations)||p,an(FF,BF,DF))}(e.sourceFile,e.program,e.span.start);if(!t)return;const n=sde.ChangeTracker.with(e,n=>277===t.kind&&function(e,t,n,r){h4.doChangeNamedToNamespaceOrDefault(t,r,e,n.parent)}(n,e.sourceFile,t,e.program)),r=sde.ChangeTracker.with(e,n=>function(e,t,n,r){if(272===n.kind)return void e.insertModifierBefore(t,156,n.name);const i=274===n.kind?n:n.parent.parent;if(i.name&&i.namedBindings)return;const o=r.getTypeChecker();if(Ag(i,e=>{if(111551&px(e.symbol,o).flags)return!0}))return;e.insertModifierBefore(t,156,i)}(n,e.sourceFile,t,e.program));let i;return n.length&&(i=le(i,X7(Mre,n,ha.Convert_named_imports_to_namespace_import))),r.length&&(i=le(i,X7(Mre,r,ha.Use_import_type))),i},fixIds:[Mre]});var Rre="unusedIdentifier",Bre="unusedIdentifier_prefix",Jre="unusedIdentifier_delete",zre="unusedIdentifier_deleteImports",qre="unusedIdentifier_infer",Ure=[ha._0_is_declared_but_its_value_is_never_read.code,ha._0_is_declared_but_never_used.code,ha.Property_0_is_declared_but_its_value_is_never_read.code,ha.All_imports_in_import_declaration_are_unused.code,ha.All_destructured_elements_are_unused.code,ha.All_variables_are_unused.code,ha.All_type_parameters_are_unused.code];function Vre(e,t,n){e.replaceNode(t,n.parent,kw.createKeywordTypeNode(159))}function Wre(e,t){return Q7(Rre,e,t,Jre,ha.Delete_all_unused_declarations)}function $re(e,t,n){e.delete(t,gn.checkDefined(st(n.parent,Ep).typeParameters,"The type parameter to delete should exist"))}function Kre(e){return 102===e.kind||80===e.kind&&(277===e.parent.kind||274===e.parent.kind)}function Hre(e){return 102===e.kind?at(e.parent,EF):void 0}function Gre(e,t){return yF(t.parent)&&xe(t.parent.getChildren(e))===t}function Xre(e,t,n){e.delete(t,244===n.parent.kind?n.parent:n)}function Qre(e,t,n,r){t!==ha.Property_0_is_declared_but_its_value_is_never_read.code&&(140===r.kind&&(r=st(r.parent,oE).typeParameter.name),fD(r)&&function(e){switch(e.parent.kind){case 170:case 169:return!0;case 261:switch(e.parent.parent.parent.kind){case 251:case 250:return!0}}return!1}(r)&&(e.replaceNode(n,r,kw.createIdentifier(`_${r.text}`)),AD(r.parent)&&Mc(r.parent).forEach(t=>{fD(t.name)&&e.replaceNode(n,t.name,kw.createIdentifier(`_${t.name.text}`))})))}function Yre(e,t,n,r,i,o,a,s){!function(e,t,n,r,i,o,a,s){const{parent:c}=e;if(AD(c))!function(e,t,n,r,i,o,a,s=!1){if(function(e,t,n,r,i,o,a){const{parent:s}=n;switch(s.kind){case 175:case 177:const c=s.parameters.indexOf(n),l=MD(s)?s.name:s,_=Bce.Core.getReferencedSymbolsForNode(s.pos,l,i,r,o);if(_)for(const e of _)for(const t of e.references)if(t.kind===Bce.EntryKind.Node){const e=wD(t.node)&&SE(t.node.parent)&&t.node.parent.arguments.length>c,r=bE(t.node.parent)&&wD(t.node.parent.expression)&&SE(t.node.parent.parent)&&t.node.parent.parent.arguments.length>c,i=(MD(t.node.parent)||jD(t.node.parent))&&t.node.parent!==n.parent&&t.node.parent.parameters.length>c;if(e||r||i)return!1}return!0;case 263:return!s.name||!function(e,t,n){return!!Bce.Core.eachSymbolReferenceInFile(n,e,t,e=>fD(e)&&SE(e.parent)&&e.parent.arguments.includes(e))}(e,t,s.name)||eie(s,n,a);case 219:case 220:return eie(s,n,a);case 179:return!1;case 178:return!0;default:return gn.failBadSyntaxKind(s)}}(r,t,n,i,o,a,s))if(n.modifiers&&n.modifiers.length>0&&(!fD(n.name)||Bce.Core.isSymbolReferencedInFile(n.name,r,t)))for(const r of n.modifiers)a_(r)&&e.deleteModifier(t,r);else!n.initializer&&Zre(n,r,i)&&e.delete(t,n)}(t,n,c,r,i,o,a,s);else if(!(s&&fD(e)&&Bce.Core.isSymbolReferencedInFile(e,r,n))){const r=FF(c)?e:FD(c)?c.parent:c;gn.assert(r!==n,"should not delete whole source file"),t.delete(n,r)}}(t,n,e,r,i,o,a,s),fD(t)&&Bce.Core.eachSymbolReferenceInFile(t,r,e,t=>{var r;bE(t.parent)&&t.parent.name===t&&(t=t.parent),!s&&((LE((r=t).parent)&&r.parent.left===r||(OE(r.parent)||IE(r.parent))&&r.parent.operand===r)&&tF(r.parent.parent))&&n.delete(e,t.parent.parent)})}function Zre(e,t,n){const r=e.parent.parameters.indexOf(e);return!Bce.Core.someSignatureUsage(e.parent,n,t,(e,t)=>!t||t.arguments.length>r)}function eie(e,t,n){const r=e.parameters,i=r.indexOf(t);return gn.assert(-1!==i,"The parameter should already be in the list"),n?r.slice(i+1).every(e=>fD(e.name)&&!e.symbol.isReferenced):i===r.length-1}function tie(e,t,n){const r=n.symbol.declarations;if(r)for(const n of r)e.delete(t,n)}e8({errorCodes:Ure,getCodeActions(e){const{errorCode:t,sourceFile:n,program:r,cancellationToken:i}=e,o=r.getTypeChecker(),a=r.getSourceFiles(),s=dQ(n,e.span.start);if(QP(s))return[Wre(sde.ChangeTracker.with(e,e=>e.delete(n,s)),ha.Remove_template_tag)];if(30===s.kind){return[Wre(sde.ChangeTracker.with(e,e=>$re(e,n,s)),ha.Remove_type_parameters)]}const c=Hre(s);if(c){const t=sde.ChangeTracker.with(e,e=>e.delete(n,c));return[Q7(Rre,t,[ha.Remove_import_from_0,wx(c)],zre,ha.Delete_all_unused_imports)]}if(Kre(s)){const t=sde.ChangeTracker.with(e,e=>Yre(n,s,e,o,a,r,i,!1));if(t.length)return[Q7(Rre,t,[ha.Remove_unused_declaration_for_Colon_0,s.getText(n)],zre,ha.Delete_all_unused_imports)]}if(mE(s.parent)||gE(s.parent)){if(AD(s.parent.parent)){const t=s.parent.elements,r=[t.length>1?ha.Remove_unused_declarations_for_Colon_0:ha.Remove_unused_declaration_for_Colon_0,O(t,e=>e.getText(n)).join(", ")];return[Wre(sde.ChangeTracker.with(e,e=>function(e,t,n){g(n.elements,n=>e.delete(t,n))}(e,n,s.parent)),r)]}return[Wre(sde.ChangeTracker.with(e,t=>function(e,t,n,{parent:r}){if(hF(r)&&r.initializer&&q_(r.initializer))if(yF(r.parent)&&m(r.parent.declarations)>1){const i=r.parent.parent,o=i.getStart(n),a=i.end;t.delete(n,r),t.insertNodeAt(n,a,r.initializer,{prefix:iZ(e.host,e.formatContext.options)+n.text.slice(gZ(n.text,o-1),o),suffix:JZ(n)?";":""})}else t.replaceNode(n,r.parent,r.initializer);else t.delete(n,r)}(e,t,n,s.parent)),ha.Remove_unused_destructuring_declaration)]}if(Gre(n,s))return[Wre(sde.ChangeTracker.with(e,e=>Xre(e,n,s.parent)),ha.Remove_variable_statement)];if(fD(s)&&vF(s.parent))return[Wre(sde.ChangeTracker.with(e,e=>tie(e,n,s.parent)),[ha.Remove_unused_declaration_for_Colon_0,s.getText(n)])];const l=[];if(140===s.kind){const t=sde.ChangeTracker.with(e,e=>Vre(e,n,s)),r=st(s.parent,oE).typeParameter.name.text;l.push(Q7(Rre,t,[ha.Replace_infer_0_with_unknown,r],qre,ha.Replace_all_unused_infer_with_unknown))}else{const t=sde.ChangeTracker.with(e,e=>Yre(n,s,e,o,a,r,i,!1));if(t.length){const e=FD(s.parent)?s.parent:s;l.push(Wre(t,[ha.Remove_unused_declaration_for_Colon_0,e.getText(n)]))}}const _=sde.ChangeTracker.with(e,e=>Qre(e,t,n,s));return _.length&&l.push(Q7(Rre,_,[ha.Prefix_0_with_an_underscore,s.getText(n)],Bre,ha.Prefix_all_unused_declarations_with_where_possible)),l},fixIds:[Bre,Jre,zre,qre],getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=n.getTypeChecker(),o=n.getSourceFiles();return a8(e,Ure,(a,s)=>{const c=dQ(t,s.start);switch(e.fixId){case Bre:Qre(a,s.code,t,c);break;case zre:{const e=Hre(c);e?a.delete(t,e):Kre(c)&&Yre(t,c,a,i,o,n,r,!0);break}case Jre:if(140===c.kind||Kre(c))break;if(QP(c))a.delete(t,c);else if(30===c.kind)$re(a,t,c);else if(mE(c.parent)){if(c.parent.parent.initializer)break;AD(c.parent.parent)&&!Zre(c.parent.parent,i,o)||a.delete(t,c.parent.parent)}else{if(gE(c.parent.parent)&&c.parent.parent.parent.initializer)break;Gre(t,c)?Xre(a,t,c.parent):fD(c)&&vF(c.parent)?tie(a,t,c.parent):Yre(t,c,a,i,o,n,r,!0)}break;case qre:140===c.kind&&Vre(a,t,c);break;default:gn.fail(JSON.stringify(e.fixId))}})}});var nie="fixUnreachableCode",rie=[ha.Unreachable_code_detected.code];function iie(e,t,n,r,i){const o=dQ(t,n),a=yc(o,bu);if(a.getStart(t)!==o.getStart(t)){const e=JSON.stringify({statementKind:gn.formatSyntaxKind(a.kind),tokenKind:gn.formatSyntaxKind(o.kind),errorCode:i,start:n,length:r});gn.fail("Token and statement should start at the same point. "+e)}const s=(YE(a.parent)?a.parent:a).parent;if(!YE(a.parent)||a===xe(a.parent.statements))switch(s.kind){case 246:if(s.elseStatement){if(YE(a.parent))break;return void e.replaceNode(t,a,kw.createBlock(p))}case 248:case 249:return void e.delete(t,s)}if(YE(a.parent)){const i=n+r,o=gn.checkDefined(function(e,t){let n;for(const r of e){if(!t(r))break;n=r}return n}(pT(a.parent.statements,a),e=>e.posiie(t,e.sourceFile,e.span.start,e.span.length,e.errorCode));return[Q7(nie,t,ha.Remove_unreachable_code,nie,ha.Remove_all_unreachable_code)]},fixIds:[nie],getAllCodeActions:e=>a8(e,rie,(e,t)=>iie(e,t.file,t.start,t.length,t.code))});var oie="fixUnusedLabel",aie=[ha.Unused_label.code];function sie(e,t,n){const r=dQ(t,n),i=st(r.parent,pF),o=r.getStart(t),a=i.statement.getStart(t),s=ex(o,a,t)?a:is(t.text,YX(i,59,t).end,!0);e.deleteRange(t,{pos:o,end:s})}e8({errorCodes:aie,getCodeActions(e){const t=sde.ChangeTracker.with(e,t=>sie(t,e.sourceFile,e.span.start));return[Q7(oie,t,ha.Remove_unused_label,oie,ha.Remove_all_unused_labels)]},fixIds:[oie],getAllCodeActions:e=>a8(e,aie,(e,t)=>sie(e,t.file,t.start))});var cie="fixJSDocTypes_plain",lie="fixJSDocTypes_nullable",_ie=[ha.JSDoc_types_can_only_be_used_inside_documentation_comments.code,ha._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,ha._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code];function uie(e,t,n,r,i){e.replaceNode(t,n,i.typeToTypeNode(r,n,void 0))}function die(e,t,n){const r=yc(dQ(e,t),pie),i=r&&r.type;return i&&{typeNode:i,type:fie(n,i)}}function pie(e){switch(e.kind){case 235:case 180:case 181:case 263:case 178:case 182:case 201:case 175:case 174:case 170:case 173:case 172:case 179:case 266:case 217:case 261:return!0;default:return!1}}function fie(e,t){if(CP(t)){const n=e.getTypeFromTypeNode(t.type);return n===e.getNeverType()||n===e.getVoidType()?n:e.getUnionType(le([n,e.getUndefinedType()],t.postfix?void 0:e.getNullType()))}return e.getTypeFromTypeNode(t)}e8({errorCodes:_ie,getCodeActions(e){const{sourceFile:t}=e,n=e.program.getTypeChecker(),r=die(t,e.span.start,n);if(!r)return;const{typeNode:i,type:o}=r,a=i.getText(t),s=[c(o,cie,ha.Change_all_jsdoc_style_types_to_TypeScript)];return 315===i.kind&&s.push(c(o,lie,ha.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),s;function c(r,o,s){return Q7("jdocTypes",sde.ChangeTracker.with(e,e=>uie(e,t,i,r,n)),[ha.Change_0_to_1,a,n.typeToString(r)],o,s)}},fixIds:[cie,lie],getAllCodeActions(e){const{fixId:t,program:n,sourceFile:r}=e,i=n.getTypeChecker();return a8(e,_ie,(e,n)=>{const o=die(n.file,n.start,i);if(!o)return;const{typeNode:a,type:s}=o,c=315===a.kind&&t===lie?i.getNullableType(s,32768):s;uie(e,r,a,c,i)})}});var mie="fixMissingCallParentheses",gie=[ha.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code];function hie(e,t,n){e.replaceNodeWithText(t,n,`${n.text}()`)}function yie(e,t){const n=dQ(e,t);if(bE(n.parent)){let e=n.parent;for(;bE(e.parent);)e=e.parent;return e.name}if(fD(n))return n}e8({errorCodes:gie,fixIds:[mie],getCodeActions(e){const{sourceFile:t,span:n}=e,r=yie(t,n.start);if(!r)return;const i=sde.ChangeTracker.with(e,t=>hie(t,e.sourceFile,r));return[Q7(mie,i,ha.Add_missing_call_parentheses,mie,ha.Add_all_missing_call_parentheses)]},getAllCodeActions:e=>a8(e,gie,(e,t)=>{const n=yie(t.file,t.start);n&&hie(e,t.file,n)})});var vie="fixMissingTypeAnnotationOnExports",bie="add-annotation",xie="add-type-assertion",Sie=[ha.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,ha.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,ha.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,ha.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,ha.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,ha.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,ha.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,ha.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,ha.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,ha.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,ha.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,ha.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,ha.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,ha.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,ha.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,ha.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,ha.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,ha.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,ha.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations.code,ha.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,ha.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code],kie=new Set([178,175,173,263,219,220,261,170,278,264,207,208]),Tie=531469;function Cie(e,t,n,r,i){const o=wie(n,r,i);o.result&&o.textChanges.length&&t.push(Q7(e,o.textChanges,o.result,vie,ha.Add_all_missing_type_annotations))}function wie(e,t,n){const r={typeNode:void 0,mutatedTarget:!1},i=sde.ChangeTracker.fromContext(e),o=e.sourceFile,a=e.program,s=a.getTypeChecker(),c=wS(a.getCompilerOptions()),l=Pee(e.sourceFile,e.program,e.preferences,e.host),_=new Set,u=new Set,d=jU({preserveSourceNewlines:!1}),p=n({addTypeAnnotation:function(t){e.cancellationToken.throwIfCancellationRequested();const n=dQ(o,t.start),r=g(n);if(r)return vF(r)?function(e){var t;if(null==u?void 0:u.has(e))return;null==u||u.add(e);const n=s.getTypeAtLocation(e),r=s.getPropertiesOfType(n);if(!e.name||0===r.length)return;const c=[];for(const t of r)Ss(t.name,wS(a.getCompilerOptions()))&&(t.valueDeclaration&&hF(t.valueDeclaration)||c.push(kw.createVariableStatement([kw.createModifier(95)],kw.createVariableDeclarationList([kw.createVariableDeclaration(t.name,void 0,w(s.getTypeOfSymbol(t),e),void 0)]))));if(0===c.length)return;const l=[];(null==(t=e.modifiers)?void 0:t.some(e=>95===e.kind))&&l.push(kw.createModifier(95));l.push(kw.createModifier(138));const _=kw.createModuleDeclaration(l,e.name,kw.createModuleBlock(c),101441696);return i.insertNodeAfter(o,e,_),[ha.Annotate_types_of_properties_expando_function_in_a_namespace]}(r):h(r);const c=(l=n,yc(l,e=>kie.has(e.kind)&&(!mE(e)&&!gE(e)||hF(e.parent))));var l;if(c)return h(c);return},addInlineAssertion:function(t){e.cancellationToken.throwIfCancellationRequested();const n=dQ(o,t.start);if(g(n))return;const r=E(n,t);if(!r||sh(r)||sh(r.parent))return;const a=Q_(r),c=dP(r);if(!c&&hu(r))return;if(yc(r,E_))return;if(yc(r,fP))return;if(a&&(yc(r,lP)||yc(r,N_)))return;if(BE(r))return;const l=yc(r,hF),_=l&&s.getTypeAtLocation(l);if(_&&8192&_.flags)return;if(!a&&!c)return;const{typeNode:u,mutatedTarget:d}=x(r,_);if(!u||d)return;c?i.insertNodeAt(o,r.end,m($C(r.name),u),{prefix:": "}):a?i.replaceNode(o,r,function(e,t){f(e)&&(e=kw.createParenthesizedExpression(e));return kw.createAsExpression(kw.createSatisfiesExpression(e,$C(t)),t)}($C(r),u)):gn.assertNever(r);return[ha.Add_satisfies_and_an_inline_type_assertion_with_0,D(u)]},extractAsVariable:function(t){e.cancellationToken.throwIfCancellationRequested();const n=E(dQ(o,t.start),t);if(!n||sh(n)||sh(n.parent))return;if(!Q_(n))return;if(yE(n))return i.replaceNode(o,n,m(n,kw.createTypeReferenceNode("const"))),[ha.Mark_array_literal_as_const];const r=yc(n,uP);if(r){if(r===n.parent&&fb(n))return;const e=kw.createUniqueName(F3(n,o,s,o),16);let t=n,a=n;if(BE(t)&&(t=_h(t.parent),a=T(t.parent)?t=t.parent:m(t,kw.createTypeReferenceNode("const"))),fb(t))return;const c=kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(e,void 0,void 0,a)],2)),l=yc(n,bu);return i.insertNodeBefore(o,l,c),i.replaceNode(o,t,kw.createAsExpression(kw.cloneNode(e),kw.createTypeQueryNode(kw.cloneNode(e)))),[ha.Extract_to_variable_and_replace_with_0_as_typeof_0,D(e)]}}});return l.writeFixes(i),{result:p,textChanges:i.getChanges()};function f(e){return!(fb(e)||SE(e)||vE(e)||yE(e))}function m(e,t){return f(e)&&(e=kw.createParenthesizedExpression(e)),kw.createAsExpression(e,t)}function g(e){const t=yc(e,e=>bu(e)?"quit":hC(e));if(t&&hC(t)){let e=t;if(LE(e)&&(e=e.left,!hC(e)))return;const n=s.getTypeAtLocation(e.expression);if(!n)return;if(X(s.getPropertiesOfType(n),e=>e.valueDeclaration===t||e.valueDeclaration===t.parent)){const e=n.symbol.valueDeclaration;if(e){if($T(e)&&hF(e.parent))return e.parent;if(vF(e))return e}}}}function h(e){if(!(null==_?void 0:_.has(e)))switch(null==_||_.add(e),e.kind){case 170:case 173:case 261:return function(e){const{typeNode:t}=x(e);if(t)return e.type?i.replaceNode(wd(e),e.type,t):i.tryInsertTypeAnnotation(wd(e),e,t),[ha.Add_annotation_of_type_0,D(t)]}(e);case 220:case 219:case 263:case 175:case 178:return function(e,t){if(e.type)return;const{typeNode:n}=x(e);if(n)return i.tryInsertTypeAnnotation(t,e,n),[ha.Add_return_type_0,D(n)]}(e,o);case 278:return function(e){if(e.isExportEquals)return;const{typeNode:t}=x(e.expression);if(!t)return;const n=kw.createUniqueName("_default");return i.replaceNodeWithNodes(o,e,[kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(n,void 0,t,e.expression)],2)),kw.updateExportAssignment(e,null==e?void 0:e.modifiers,n)]),[ha.Extract_default_export_to_variable]}(e);case 264:return function(e){var t,n;const r=null==(t=e.heritageClauses)?void 0:t.find(e=>96===e.token),a=null==r?void 0:r.types[0];if(!a)return;const{typeNode:s}=x(a.expression);if(!s)return;const c=kw.createUniqueName(e.name?e.name.text+"Base":"Anonymous",16),l=kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(c,void 0,s,a.expression)],2));i.insertNodeBefore(o,e,l);const _=ys(o.text,a.end),u=(null==(n=null==_?void 0:_[_.length-1])?void 0:n.end)??a.end;return i.replaceRange(o,{pos:a.getFullStart(),end:u},c,{prefix:" "}),[ha.Extract_base_class_to_variable]}(e);case 207:case 208:return function(e){var t;const n=e.parent,r=e.parent.parent.parent;if(!n.initializer)return;let a;const s=[];if(fD(n.initializer))a={expression:{kind:3,identifier:n.initializer}};else{const e=kw.createUniqueName("dest",16);a={expression:{kind:3,identifier:e}},s.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(e,void 0,void 0,n.initializer)],2)))}const c=[];gE(e)?y(e,c,a):v(e,c,a);const l=new Map;for(const e of c){if(e.element.propertyName&&FD(e.element.propertyName)){const t=e.element.propertyName.expression,n=kw.getGeneratedNameForNode(t),r=kw.createVariableDeclaration(n,void 0,void 0,t),i=kw.createVariableDeclarationList([r],2),o=kw.createVariableStatement(void 0,i);s.push(o),l.set(t,n)}const n=e.element.name;if(gE(n))y(n,c,e);else if(mE(n))v(n,c,e);else{const{typeNode:i}=x(n);let o=b(e,l);if(e.element.initializer){const n=null==(t=e.element)?void 0:t.propertyName,r=kw.createUniqueName(n&&fD(n)?n.text:"temp",16);s.push(kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(r,void 0,void 0,o)],2))),o=kw.createConditionalExpression(kw.createBinaryExpression(r,kw.createToken(37),kw.createIdentifier("undefined")),kw.createToken(58),e.element.initializer,kw.createToken(59),o)}const a=Lv(r,32)?[kw.createToken(95)]:void 0;s.push(kw.createVariableStatement(a,kw.createVariableDeclarationList([kw.createVariableDeclaration(n,void 0,i,o)],2)))}}r.declarationList.declarations.length>1&&s.push(kw.updateVariableStatement(r,r.modifiers,kw.updateVariableDeclarationList(r.declarationList,r.declarationList.declarations.filter(t=>t!==e.parent))));return i.replaceNodeWithNodes(o,r,s),[ha.Extract_binding_expressions_to_variable]}(e);default:throw new Error(`Cannot find a fix for the given node ${e.kind}`)}}function y(e,t,n){for(let r=0;r=0;--e){const i=n[e].expression;0===i.kind?r=kw.createPropertyAccessChain(r,void 0,kw.createIdentifier(i.text)):1===i.kind?r=kw.createElementAccessExpression(r,t.get(i.computed)):2===i.kind&&(r=kw.createElementAccessExpression(r,i.arrayIndex))}return r}function x(e,n){if(1===t)return C(e);let i;if(sh(e)){const t=s.getSignatureFromDeclaration(e);if(t){const n=s.getTypePredicateOfSignature(t);if(n)return n.type?{typeNode:N(n,yc(e,hu)??o,c(n.type)),mutatedTarget:!1}:r;i=s.getReturnTypeOfSignature(t)}}else i=s.getTypeAtLocation(e);if(!i)return r;if(2===t){n&&(i=n);const e=s.getWidenedLiteralType(i);if(s.isTypeAssignableTo(e,i))return r;i=e}const a=yc(e,hu)??o;return AD(e)&&s.requiresAddingImplicitUndefined(e,a)&&(i=s.getUnionType([s.getUndefinedType(),i],0)),{typeNode:w(i,a,c(i)),mutatedTarget:!1};function c(t){return(hF(e)||LD(e)&&Lv(e,264))&&8192&t.flags?1048576:0}}function S(e){return kw.createTypeQueryNode($C(e))}function k(e,t,n,a,s,c,l,_){const u=[],d=[];let p;const f=yc(e,bu);for(const t of a(e))s(t)?(g(),fb(t.expression)?(u.push(S(t.expression)),d.push(t)):m(t.expression)):(p??(p=[])).push(t);return 0===d.length?r:(g(),i.replaceNode(o,e,l(d)),{typeNode:_(u),mutatedTarget:!0});function m(e){const r=kw.createUniqueName(t+"_Part"+(d.length+1),16),a=n?kw.createAsExpression(e,kw.createTypeReferenceNode("const")):e,s=kw.createVariableStatement(void 0,kw.createVariableDeclarationList([kw.createVariableDeclaration(r,void 0,void 0,a)],2));i.insertNodeBefore(o,f,s),u.push(S(r)),d.push(c(r))}function g(){p&&(m(l(p)),p=void 0)}}function T(e){return Y_(e)&&El(e.type)}function C(e){if(AD(e))return r;if(dP(e))return{typeNode:S(e.name),mutatedTarget:!1};if(fb(e))return{typeNode:S(e),mutatedTarget:!1};if(T(e))return C(e.expression);if(yE(e)){const t=yc(e,hF);return function(e,t="temp"){const n=!!yc(e,T);return n?k(e,t,n,e=>e.elements,BE,kw.createSpreadElement,e=>kw.createArrayLiteralExpression(e,!0),e=>kw.createTupleTypeNode(e.map(kw.createRestTypeNode))):r}(e,t&&fD(t.name)?t.name.text:void 0)}if(vE(e)){const t=yc(e,hF);return function(e,t="temp"){return k(e,t,!!yc(e,T),e=>e.properties,pP,kw.createSpreadAssignment,e=>kw.createObjectLiteralExpression(e,!0),kw.createIntersectionTypeNode)}(e,t&&fD(t.name)?t.name.text:void 0)}if(hF(e)&&e.initializer)return C(e.initializer);if(jE(e)){const{typeNode:t,mutatedTarget:n}=C(e.whenTrue);if(!t)return r;const{typeNode:i,mutatedTarget:o}=C(e.whenFalse);return i?{typeNode:kw.createUnionTypeNode([t,i]),mutatedTarget:n||o}:r}return r}function w(e,t,n=0){let r=!1;const i=loe(s,e,t,Tie|n,1,{moduleResolverHost:a,trackSymbol:()=>!0,reportTruncationError(){r=!0}});if(!i)return;const o=coe(i,l,c);return r?kw.createKeywordTypeNode(133):o}function N(e,t,n=0){let r=!1;const i=_oe(s,l,e,t,c,Tie|n,1,{moduleResolverHost:a,trackSymbol:()=>!0,reportTruncationError(){r=!0}});return r?kw.createKeywordTypeNode(133):i}function D(e){Ew(e,1);const t=d.printNode(4,e,o);return t.length>Qu?t.substring(0,Qu-3)+"...":(Ew(e,0),t)}function E(e,t){for(;e&&e.endt.addTypeAnnotation(e.span)),Cie(bie,t,e,1,t=>t.addTypeAnnotation(e.span)),Cie(bie,t,e,2,t=>t.addTypeAnnotation(e.span)),Cie(xie,t,e,0,t=>t.addInlineAssertion(e.span)),Cie(xie,t,e,1,t=>t.addInlineAssertion(e.span)),Cie(xie,t,e,2,t=>t.addInlineAssertion(e.span)),Cie("extract-expression",t,e,0,t=>t.extractAsVariable(e.span)),t},getAllCodeActions:e=>i8(wie(e,0,t=>{s8(e,Sie,e=>{t.addTypeAnnotation(e)})}).textChanges)});var Nie="fixAwaitInSyncFunction",Die=[ha.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,ha.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,ha.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,ha.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code];function Eie(e,t){const n=tm(dQ(e,t));if(!n)return;let r;switch(n.kind){case 175:r=n.name;break;case 263:case 219:r=YX(n,100,e);break;case 220:r=YX(n,n.typeParameters?30:21,e)||xe(n.parameters);break;default:return}return r&&{insertBefore:r,returnType:(i=n,i.type?i.type:hF(i.parent)&&i.parent.type&&KD(i.parent.type)?i.parent.type.type:void 0)};var i}function Fie(e,t,{insertBefore:n,returnType:r}){if(r){const n=hm(r);n&&80===n.kind&&"Promise"===n.text||e.replaceNode(t,r,kw.createTypeReferenceNode("Promise",kw.createNodeArray([r])))}e.insertModifierBefore(t,134,n)}e8({errorCodes:Die,getCodeActions(e){const{sourceFile:t,span:n}=e,r=Eie(t,n.start);if(!r)return;const i=sde.ChangeTracker.with(e,e=>Fie(e,t,r));return[Q7(Nie,i,ha.Add_async_modifier_to_containing_function,Nie,ha.Add_all_missing_async_modifiers)]},fixIds:[Nie],getAllCodeActions:function(e){const t=new Set;return a8(e,Die,(n,r)=>{const i=Eie(r.file,r.start);i&&Dx(t,pJ(i.insertBefore))&&Fie(n,e.sourceFile,i)})}});var Pie=[ha._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,ha._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code],Aie="fixPropertyOverrideAccessor";function Iie(e,t,n,r,i){let o,a;if(r===ha._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code)o=t,a=t+n;else if(r===ha._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code){const n=i.program.getTypeChecker(),r=dQ(e,t).parent;if(FD(r))return;gn.assert(v_(r),"error span of fixPropertyOverrideAccessor should only be on an accessor");const s=r.parent;gn.assert(y_(s),"erroneous accessors should only be inside classes");const c=Ch(s);if(!c)return;const l=ph(c.expression),_=JE(l)?l.symbol:n.getSymbolAtLocation(l);if(!_)return;const u=n.getDeclaredTypeOfSymbol(_),d=n.getPropertyOfType(u,Sc(Up(r.name)));if(!d||!d.valueDeclaration)return;o=d.valueDeclaration.pos,a=d.valueDeclaration.end,e=wd(d.valueDeclaration)}else gn.fail("fixPropertyOverrideAccessor codefix got unexpected error code "+r);return Coe(e,i.program,o,a,i,ha.Generate_get_and_set_accessors.message)}e8({errorCodes:Pie,getCodeActions(e){const t=Iie(e.sourceFile,e.span.start,e.span.length,e.errorCode,e);if(t)return[Q7(Aie,t,ha.Generate_get_and_set_accessors,Aie,ha.Generate_get_and_set_accessors_for_all_overriding_properties)]},fixIds:[Aie],getAllCodeActions:e=>a8(e,Pie,(t,n)=>{const r=Iie(n.file,n.start,n.length,n.code,e);if(r)for(const n of r)t.pushRaw(e.sourceFile,n)})});var Oie="inferFromUsage",Lie=[ha.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,ha.Variable_0_implicitly_has_an_1_type.code,ha.Parameter_0_implicitly_has_an_1_type.code,ha.Rest_parameter_0_implicitly_has_an_any_type.code,ha.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,ha._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,ha.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,ha.Member_0_implicitly_has_an_1_type.code,ha.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,ha.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,ha.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,ha.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,ha.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,ha._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,ha.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,ha.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,ha.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function jie(e,t){switch(e){case ha.Parameter_0_implicitly_has_an_1_type.code:case ha.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return zD(tm(t))?ha.Infer_type_of_0_from_usage:ha.Infer_parameter_types_from_usage;case ha.Rest_parameter_0_implicitly_has_an_any_type.code:case ha.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return ha.Infer_parameter_types_from_usage;case ha.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return ha.Infer_this_type_of_0_from_usage;default:return ha.Infer_type_of_0_from_usage}}function Mie(e,t,n,r,i,o,a,s,c){if(!i_(n.kind)&&80!==n.kind&&26!==n.kind&&110!==n.kind)return;const{parent:l}=n,_=Pee(t,i,c,s);switch(r=function(e){switch(e){case ha.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return ha.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case ha.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return ha.Variable_0_implicitly_has_an_1_type.code;case ha.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return ha.Parameter_0_implicitly_has_an_1_type.code;case ha.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return ha.Rest_parameter_0_implicitly_has_an_any_type.code;case ha.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return ha.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case ha._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return ha._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case ha.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return ha.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case ha.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return ha.Member_0_implicitly_has_an_1_type.code}return e}(r)){case ha.Member_0_implicitly_has_an_1_type.code:case ha.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(hF(l)&&a(l)||LD(l)||OD(l))return Rie(e,_,t,l,i,s,o),_.writeFixes(e),l;if(bE(l)){const n=IZ(Uie(l.name,i,o),l,i,s);if(n){const r=kw.createJSDocTypeTag(void 0,kw.createJSDocTypeExpression(n),void 0);e.addJSDocTags(t,st(l.parent.parent,tF),[r])}return _.writeFixes(e),l}return;case ha.Variable_0_implicitly_has_an_1_type.code:{const t=i.getTypeChecker().getSymbolAtLocation(n);return t&&t.valueDeclaration&&hF(t.valueDeclaration)&&a(t.valueDeclaration)?(Rie(e,_,wd(t.valueDeclaration),t.valueDeclaration,i,s,o),_.writeFixes(e),t.valueDeclaration):void 0}}const u=tm(n);if(void 0===u)return;let d;switch(r){case ha.Parameter_0_implicitly_has_an_1_type.code:if(zD(u)){Bie(e,_,t,u,i,s,o),d=u;break}case ha.Rest_parameter_0_implicitly_has_an_any_type.code:if(a(u)){const n=st(l,AD);!function(e,t,n,r,i,o,a,s){if(!fD(r.name))return;const c=function(e,t,n,r){const i=Vie(e,t,n,r);return i&&Wie(n,i,r).parameters(e)||e.parameters.map(e=>({declaration:e,type:fD(e.name)?Uie(e.name,n,r):n.getTypeChecker().getAnyType()}))}(i,n,o,s);if(gn.assert(i.parameters.length===c.length,"Parameter count and inference count should match"),Mm(i))zie(e,n,c,o,a);else{const r=DE(i)&&!YX(i,21,n);r&&e.insertNodeBefore(n,xe(i.parameters),kw.createToken(21));for(const{declaration:r,type:i}of c)!r||r.type||r.initializer||Jie(e,t,n,r,i,o,a);r&&e.insertNodeAfter(n,Te(i.parameters),kw.createToken(22))}}(e,_,t,n,u,i,s,o),d=n}break;case ha.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case ha._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:JD(u)&&fD(u.name)&&(Jie(e,_,t,u,Uie(u.name,i,o),i,s),d=u);break;case ha.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:zD(u)&&(Bie(e,_,t,u,i,s,o),d=u);break;case ha.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:sde.isThisTypeAnnotatable(u)&&a(u)&&(!function(e,t,n,r,i,o){const a=Vie(n,t,r,o);if(!a||!a.length)return;const s=Wie(r,a,o).thisParameter(),c=IZ(s,n,r,i);if(!c)return;Mm(n)?function(e,t,n,r){e.addJSDocTags(t,n,[kw.createJSDocThisTag(void 0,kw.createJSDocTypeExpression(r))])}(e,t,n,c):e.tryInsertThisTypeAnnotation(t,n,c)}(e,t,u,i,s,o),d=u);break;default:return gn.fail(String(r))}return _.writeFixes(e),d}function Rie(e,t,n,r,i,o,a){fD(r.name)&&Jie(e,t,n,r,Uie(r.name,i,a),i,o)}function Bie(e,t,n,r,i,o,a){const s=ve(r.parameters);if(s&&fD(r.name)&&fD(s.name)){let c=Uie(r.name,i,a);c===i.getTypeChecker().getAnyType()&&(c=Uie(s.name,i,a)),Mm(r)?zie(e,n,[{declaration:s,type:c}],i,o):Jie(e,t,n,s,c,i,o)}}function Jie(e,t,n,r,i,o,a){const s=IZ(i,r,o,a);if(s)if(Mm(n)&&172!==r.kind){const t=hF(r)?at(r.parent.parent,ZE):r;if(!t)return;const i=kw.createJSDocTypeExpression(s),o=JD(r)?kw.createJSDocReturnTag(void 0,i,void 0):kw.createJSDocTypeTag(void 0,i,void 0);e.addJSDocTags(n,t,[o])}else(function(e,t,n,r,i,o){const a=xoe(e,o);if(a&&r.tryInsertTypeAnnotation(n,t,a.typeNode))return g(a.symbols,e=>i.addImportFromExportedSymbol(e,!0)),!0;return!1})(s,r,n,e,t,wS(o.getCompilerOptions()))||e.tryInsertTypeAnnotation(n,r,s)}function zie(e,t,n,r,i){const o=n.length&&n[0].declaration.parent;if(!o)return;const a=U(n,e=>{const t=e.declaration;if(t.initializer||ll(t)||!fD(t.name))return;const n=e.type&&IZ(e.type,t,r,i);if(n){return Ew(kw.cloneNode(t.name),7168),{name:kw.cloneNode(t.name),param:t,isOptional:!!e.isOptional,typeNode:n}}});if(a.length)if(DE(o)||NE(o)){const n=DE(o)&&!YX(o,21,t);n&&e.insertNodeBefore(t,xe(o.parameters),kw.createToken(21)),g(a,({typeNode:n,param:r})=>{const i=kw.createJSDocTypeTag(void 0,kw.createJSDocTypeExpression(n)),o=kw.createJSDocComment(void 0,[i]);e.insertNodeAt(t,r.getStart(t),o,{suffix:" "})}),n&&e.insertNodeAfter(t,Te(o.parameters),kw.createToken(22))}else{const n=O(a,({name:e,typeNode:t,isOptional:n})=>kw.createJSDocParameterTag(void 0,e,!!n,kw.createJSDocTypeExpression(t),!1,void 0));e.addJSDocTags(t,o,n)}}function qie(e,t,n){return U(Bce.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n),e=>e.kind!==Bce.EntryKind.Span?at(e.node,fD):void 0)}function Uie(e,t,n){return Wie(t,qie(e,t,n),n).single()}function Vie(e,t,n,r){let i;switch(e.kind){case 177:i=YX(e,137,t);break;case 220:case 219:const n=e.parent;i=(hF(n)||LD(n))&&fD(n.name)?n.name:e.name;break;case 263:case 175:case 174:i=e.name}if(i)return qie(i,n,r)}function Wie(e,t,n){const r=e.getTypeChecker(),i={string:()=>r.getStringType(),number:()=>r.getNumberType(),Array:e=>r.createArrayType(e),Promise:e=>r.createPromiseType(e)},o=[r.getStringType(),r.getNumberType(),r.createArrayType(r.getAnyType()),r.createPromiseType(r.getAnyType())];return{single:function(){return u(s(t))},parameters:function(i){if(0===t.length||!i.parameters)return;const o={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const e of t)n.throwIfCancellationRequested(),c(e,o);const a=[...o.constructs||[],...o.calls||[]];return i.parameters.map((t,o)=>{const c=[],l=$u(t);let _=!1;for(const e of a)if(e.argumentTypes.length<=o)_=Mm(i),c.push(r.getUndefinedType());else if(l)for(let t=o;t{t.has(n)||t.set(n,[]),t.get(n).push(e)});const n=new Map;return t.forEach((e,t)=>{n.set(t,a(e))}),{isNumber:e.some(e=>e.isNumber),isString:e.some(e=>e.isString),isNumberOrString:e.some(e=>e.isNumberOrString),candidateTypes:R(e,e=>e.candidateTypes),properties:n,calls:R(e,e=>e.calls),constructs:R(e,e=>e.constructs),numberIndex:g(e,e=>e.numberIndex),stringIndex:g(e,e=>e.stringIndex),candidateThisTypes:R(e,e=>e.candidateThisTypes),inferredTypes:void 0}}function s(e){const t={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const r of e)n.throwIfCancellationRequested(),c(r,t);return d(t)}function c(e,t){for(;bb(e);)e=e.parent;switch(e.parent.kind){case 245:!function(e,t){v(t,SE(e)?r.getVoidType():r.getAnyType())}(e,t);break;case 226:t.isNumber=!0;break;case 225:!function(e,t){switch(e.operator){case 46:case 47:case 41:case 55:t.isNumber=!0;break;case 40:t.isNumberOrString=!0}}(e.parent,t);break;case 227:!function(e,t,n){switch(t.operatorToken.kind){case 43:case 42:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 66:case 68:case 67:case 69:case 70:case 74:case 75:case 79:case 71:case 73:case 72:case 41:case 30:case 33:case 32:case 34:const i=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&i.flags?v(n,i):n.isNumber=!0;break;case 65:case 40:const o=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&o.flags?v(n,o):296&o.flags?n.isNumber=!0:402653316&o.flags?n.isString=!0:1&o.flags||(n.isNumberOrString=!0);break;case 64:case 35:case 37:case 38:case 36:case 77:case 78:case 76:v(n,r.getTypeAtLocation(t.left===e?t.right:t.left));break;case 103:e===t.left&&(n.isString=!0);break;case 57:case 61:e!==t.left||261!==e.parent.parent.kind&&!ub(e.parent.parent,!0)||v(n,r.getTypeAtLocation(t.right))}}(e,e.parent,t);break;case 297:case 298:!function(e,t){v(t,r.getTypeAtLocation(e.parent.parent.expression))}(e.parent,t);break;case 214:case 215:e.parent.expression===e?function(e,t){const n={argumentTypes:[],return_:{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}};if(e.arguments)for(const t of e.arguments)n.argumentTypes.push(r.getTypeAtLocation(t));c(e,n.return_),214===e.kind?(t.calls||(t.calls=[])).push(n):(t.constructs||(t.constructs=[])).push(n)}(e.parent,t):l(e,t);break;case 212:!function(e,t){const n=xc(e.name.text);t.properties||(t.properties=new Map);const r=t.properties.get(n)||{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,r),t.properties.set(n,r)}(e.parent,t);break;case 213:!function(e,t,n){if(t===e.argumentExpression)return void(n.isNumberOrString=!0);{const t=r.getTypeAtLocation(e.argumentExpression),i={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,i),296&t.flags?n.numberIndex=i:n.stringIndex=i}}(e.parent,e,t);break;case 304:case 305:!function(e,t){const n=hF(e.parent.parent)?e.parent.parent:e.parent;b(t,r.getTypeAtLocation(n))}(e.parent,t);break;case 173:!function(e,t){b(t,r.getTypeAtLocation(e.parent))}(e.parent,t);break;case 261:{const{name:n,initializer:i}=e.parent;if(e===n){i&&v(t,r.getTypeAtLocation(i));break}}default:return l(e,t)}}function l(e,t){Nm(e)&&v(t,r.getContextualType(e))}function _(e){return u(d(e))}function u(e){if(!e.length)return r.getAnyType();const t=r.getUnionType([r.getStringType(),r.getNumberType()]);let n=function(e,t){const n=[];for(const r of e)for(const{high:e,low:i}of t)e(r)&&(gn.assert(!i(r),"Priority can't have both low and high"),n.push(i));return e.filter(e=>n.every(t=>!t(e)))}(e,[{high:e=>e===r.getStringType()||e===r.getNumberType(),low:e=>e===t},{high:e=>!(16385&e.flags),low:e=>!!(16385&e.flags)},{high:e=>!(114689&e.flags||16&Tx(e)),low:e=>!!(16&Tx(e))}]);const i=n.filter(e=>16&Tx(e));return i.length&&(n=n.filter(e=>!(16&Tx(e))),n.push(function(e){if(1===e.length)return e[0];const t=[],n=[],i=[],o=[];let a=!1,s=!1;const c=Qe();for(const l of e){for(const e of r.getPropertiesOfType(l))c.add(e.escapedName,e.valueDeclaration?r.getTypeOfSymbolAtLocation(e,e.valueDeclaration):r.getAnyType());t.push(...r.getSignaturesOfType(l,0)),n.push(...r.getSignaturesOfType(l,1));const e=r.getIndexInfoOfType(l,0);e&&(i.push(e.type),a=a||e.isReadonly);const _=r.getIndexInfoOfType(l,1);_&&(o.push(_.type),s=s||_.isReadonly)}const l=G(c,(t,n)=>{const i=n.lengthr.getBaseTypeOfLiteralType(e)),l=(null==(a=e.calls)?void 0:a.length)?f(e):void 0;return l&&c?s.push(r.getUnionType([l,...c],2)):(l&&s.push(l),m(c)&&s.push(...c)),s.push(...function(e){if(!e.properties||!e.properties.size)return[];const t=o.filter(t=>function(e,t){return!!t.properties&&!_d(t.properties,(t,n)=>{const i=r.getTypeOfPropertyOfType(e,n);if(!i)return!0;if(t.calls){return!r.getSignaturesOfType(i,0).length||!r.isTypeAssignableTo(i,(o=t.calls,r.createAnonymousType(void 0,nd(),[y(o)],p,p)))}return!r.isTypeAssignableTo(i,_(t));var o})}(t,e));if(0function(e,t){if(!(4&Tx(e)&&t.properties))return e;const n=e.target,o=Ce(n.typeParameters);if(!o)return e;const a=[];return t.properties.forEach((e,t)=>{const i=r.getTypeOfPropertyOfType(n,t);gn.assert(!!i,"generic should have all the properties of its reference."),a.push(...h(i,_(e),o))}),i[e.symbol.escapedName](u(a))}(t,e));return[]}(e)),s}function f(e){const t=new Map;e.properties&&e.properties.forEach((e,n)=>{const i=r.createSymbol(4,n);i.links.type=_(e),t.set(n,i)});const n=e.calls?[y(e.calls)]:[],i=e.constructs?[y(e.constructs)]:[],o=e.stringIndex?[r.createIndexInfo(r.getStringType(),_(e.stringIndex),!1)]:[];return r.createAnonymousType(void 0,t,n,i,o)}function h(e,t,n){if(e===n)return[t];if(3145728&e.flags)return R(e.types,e=>h(e,t,n));if(4&Tx(e)&&4&Tx(t)){const i=r.getTypeArguments(e),o=r.getTypeArguments(t),a=[];if(i&&o)for(let e=0;ee.argumentTypes.length));for(let i=0;ie.argumentTypes[i]||r.getUndefinedType())),e.some(e=>void 0===e.argumentTypes[i])&&(n.flags|=16777216),t.push(n)}const i=_(a(e.map(e=>e.return_)));return r.createSignature(void 0,void 0,void 0,t,i,void 0,n,0)}function v(e,t){!t||1&t.flags||131072&t.flags||(e.candidateTypes||(e.candidateTypes=[])).push(t)}function b(e,t){!t||1&t.flags||131072&t.flags||(e.candidateThisTypes||(e.candidateThisTypes=[])).push(t)}}e8({errorCodes:Lie,getCodeActions(e){const{sourceFile:t,program:n,span:{start:r},errorCode:i,cancellationToken:o,host:a,preferences:s}=e,c=dQ(t,r);let l;const _=sde.ChangeTracker.with(e,e=>{l=Mie(e,t,c,i,n,o,_t,a,s)}),u=l&&Ac(l);return u&&0!==_.length?[Q7(Oie,_,[jie(i,c),rp(u)],Oie,ha.Infer_all_types_from_usage)]:void 0},fixIds:[Oie],getAllCodeActions(e){const{sourceFile:t,program:n,cancellationToken:r,host:i,preferences:o}=e,a=oY();return a8(e,Lie,(e,s)=>{Mie(e,t,dQ(s.file,s.start),s.code,n,r,a,i,o)})}});var $ie="fixReturnTypeInAsyncFunction",Kie=[ha.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code];function Hie(e,t,n){if(Mm(e))return;const r=yc(dQ(e,n),d_),i=null==r?void 0:r.type;if(!i)return;const o=t.getTypeFromTypeNode(i),a=t.getAwaitedType(o)||t.getVoidType(),s=t.typeToTypeNode(a,i,void 0);return s?{returnTypeNode:i,returnType:o,promisedTypeNode:s,promisedType:a}:void 0}function Gie(e,t,n,r){e.replaceNode(t,n,kw.createTypeReferenceNode("Promise",[r]))}e8({errorCodes:Kie,fixIds:[$ie],getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e,i=n.getTypeChecker(),o=Hie(t,n.getTypeChecker(),r.start);if(!o)return;const{returnTypeNode:a,returnType:s,promisedTypeNode:c,promisedType:l}=o,_=sde.ChangeTracker.with(e,e=>Gie(e,t,a,c));return[Q7($ie,_,[ha.Replace_0_with_Promise_1,i.typeToString(s),i.typeToString(l)],$ie,ha.Fix_all_incorrect_return_type_of_an_async_functions)]},getAllCodeActions:e=>a8(e,Kie,(t,n)=>{const r=Hie(n.file,e.program.getTypeChecker(),n.start);r&&Gie(t,n.file,r.returnTypeNode,r.promisedTypeNode)})});var Xie="disableJsDiagnostics",Qie="disableJsDiagnostics",Yie=U(Object.keys(ha),e=>{const t=ha[e];return 1===t.category?t.code:void 0});function Zie(e,t,n,r){const{line:i}=Ha(t,n);r&&!$(r,i)||e.insertCommentBeforeLine(t,i,n," @ts-ignore")}function eoe(e,t,n,r,i,o,a){const s=e.symbol.members;for(const c of t)s.has(c.escapedName)||roe(c,e,n,r,i,o,a,void 0)}function toe(e){return{trackSymbol:()=>!1,moduleResolverHost:fY(e.program,e.host)}}e8({errorCodes:Yie,getCodeActions:function(e){const{sourceFile:t,program:n,span:r,host:i,formatContext:o}=e;if(!Mm(t)||!_T(t,n.getCompilerOptions()))return;const a=t.checkJsDirective?"":iZ(i,o.options),s=[X7(Xie,[o8(t.fileName,[eY(t.checkJsDirective?Zs(t.checkJsDirective.pos,t.checkJsDirective.end):Ys(0,0),`// @ts-nocheck${a}`)])],ha.Disable_checking_for_this_file)];return sde.isValidLocationToAddComment(t,r.start)&&s.unshift(Q7(Xie,sde.ChangeTracker.with(e,e=>Zie(e,t,r.start)),ha.Ignore_this_error_message,Qie,ha.Add_ts_ignore_to_all_error_messages)),s},fixIds:[Qie],getAllCodeActions:e=>{const t=new Set;return a8(e,Yie,(e,n)=>{sde.isValidLocationToAddComment(n.file,n.start)&&Zie(e,n.file,n.start,t)})}});var noe=(e=>(e[e.Method=1]="Method",e[e.Property=2]="Property",e[e.All=3]="All",e))(noe||{});function roe(e,t,n,r,i,o,a,s,c=3,l=!1){const _=e.getDeclarations(),u=ve(_),d=r.program.getTypeChecker(),f=wS(r.program.getCompilerOptions()),g=(null==u?void 0:u.kind)??172,h=function(e,t){if(262144&ux(e)){const t=e.links.nameType;if(t&&mC(t))return kw.createIdentifier(Sc(gC(t)))}return $C(Ac(t),!1)}(e,u),y=u?Kv(u):0;let v=256&y;v|=1&y?1:4&y?4:0,u&&b_(u)&&(v|=512);const b=function(){let e;v&&(e=_e(e,kw.createModifiersFromModifierFlags(v)));r.program.getCompilerOptions().noImplicitOverride&&u&&Bv(u)&&(e=le(e,kw.createToken(164)));return e&&kw.createNodeArray(e)}(),x=d.getWidenedType(d.getTypeOfSymbolAtLocation(e,t)),S=!!(16777216&e.flags),k=!!(33554432&t.flags)||l,T=bY(n,i),C=1|(0===T?268435456:0);switch(g){case 172:case 173:let n=d.typeToTypeNode(x,t,C,8,toe(r));if(o){const e=xoe(n,f);e&&(n=e.typeNode,koe(o,e.symbols))}a(kw.createPropertyDeclaration(b,u?N(h):e.getName(),S&&2&c?kw.createToken(58):void 0,n,void 0));break;case 178:case 179:{gn.assertIsDefined(_);let e=d.typeToTypeNode(x,t,C,void 0,toe(r));const n=bv(_,u),i=n.secondAccessor?[n.firstAccessor,n.secondAccessor]:[n.firstAccessor];if(o){const t=xoe(e,f);t&&(e=t.typeNode,koe(o,t.symbols))}for(const t of i)if(JD(t))a(kw.createGetAccessorDeclaration(b,N(h),p,E(e),D(s,T,k)));else{gn.assertNode(t,zD,"The counterpart to a getter should be a setter");const n=dv(t),r=n&&fD(n.name)?kc(n.name):void 0;a(kw.createSetAccessorDeclaration(b,N(h),foe(1,[r],[E(e)],1,!1),D(s,T,k)))}break}case 174:case 175:gn.assertIsDefined(_);const i=x.isUnion()?R(x.types,e=>e.getCallSignatures()):x.getCallSignatures();if(!X(i))break;if(1===_.length){gn.assert(1===i.length,"One declaration implies one signature");const e=i[0];w(T,e,b,N(h),D(s,T,k));break}for(const e of i)e.declaration&&33554432&e.declaration.flags||w(T,e,b,N(h));if(!k)if(_.length>i.length){const e=d.getSignatureFromDeclaration(_[_.length-1]);w(T,e,b,N(h),D(s,T))}else gn.assert(_.length===i.length,"Declarations and signatures should match count"),a(function(e,t,n,r,i,o,a,s,c){let l=r[0],_=r[0].minArgumentCount,u=!1;for(const e of r)_=Math.min(e.minArgumentCount,_),bJ(e)&&(u=!0),e.parameters.length>=l.parameters.length&&(!bJ(e)||bJ(l))&&(l=e);const d=l.parameters.length-(bJ(l)?1:0),p=l.parameters.map(e=>e.name),f=foe(d,p,void 0,_,!1);if(u){const e=kw.createParameterDeclaration(void 0,kw.createToken(26),p[d]||"rest",d>=_?kw.createToken(58):void 0,kw.createArrayTypeNode(kw.createKeywordTypeNode(159)),void 0);f.push(e)}return function(e,t,n,r,i,o,a,s){return kw.createMethodDeclaration(e,void 0,t,n?kw.createToken(58):void 0,r,i,o,s||moe(a))}(a,i,o,void 0,f,function(e,t,n,r){if(m(e)){const i=t.getUnionType(O(e,t.getReturnTypeOfSignature));return t.typeToTypeNode(i,r,1,8,toe(n))}}(r,e,t,n),s,c)}(d,r,t,i,N(h),S&&!!(1&c),b,T,s))}function w(e,n,i,s,l){const _=ioe(175,r,e,n,l,s,i,S&&!!(1&c),t,o);_&&a(_)}function N(e){return fD(e)&&"constructor"===e.escapedText?kw.createComputedPropertyName(kw.createStringLiteral(kc(e),0===T)):$C(e,!1)}function D(e,t,n){return n?void 0:$C(e,!1)||moe(t)}function E(e){return $C(e,!1)}}function ioe(e,t,n,r,i,o,a,s,c,l){const _=t.program,u=_.getTypeChecker(),d=wS(_.getCompilerOptions()),p=Mm(c),f=524545|(0===n?268435456:0),m=u.signatureToSignatureDeclaration(r,e,c,f,8,toe(t));if(!m)return;let g=p?void 0:m.typeParameters,h=m.parameters,y=p?void 0:$C(m.type);if(l){if(g){const e=j(g,e=>{let t=e.constraint,n=e.default;if(t){const e=xoe(t,d);e&&(t=e.typeNode,koe(l,e.symbols))}if(n){const e=xoe(n,d);e&&(n=e.typeNode,koe(l,e.symbols))}return kw.updateTypeParameterDeclaration(e,e.modifiers,e.name,t,n)});g!==e&&(g=AI(kw.createNodeArray(e,g.hasTrailingComma),g))}const e=j(h,e=>{let t=p?void 0:e.type;if(t){const e=xoe(t,d);e&&(t=e.typeNode,koe(l,e.symbols))}return kw.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,p?void 0:e.questionToken,t,e.initializer)});if(h!==e&&(h=AI(kw.createNodeArray(e,h.hasTrailingComma),h)),y){const e=xoe(y,d);e&&(y=e.typeNode,koe(l,e.symbols))}}const v=s?kw.createToken(58):void 0,b=m.asteriskToken;return NE(m)?kw.updateFunctionExpression(m,a,m.asteriskToken,at(o,fD),g,h,y,i??m.body):DE(m)?kw.updateArrowFunction(m,a,g,h,y,m.equalsGreaterThanToken,i??m.body):MD(m)?kw.updateMethodDeclaration(m,a,b,o??kw.createIdentifier(""),v,g,h,y,i):vF(m)?kw.updateFunctionDeclaration(m,a,m.asteriskToken,at(o,fD),g,h,y,i??m.body):void 0}function ooe(e,t,n,r,i,o,a){const s=bY(t.sourceFile,t.preferences),c=wS(t.program.getCompilerOptions()),l=toe(t),_=t.program.getTypeChecker(),u=Mm(a),{typeArguments:d,arguments:p,parent:f}=r,m=u?void 0:_.getContextualType(r),g=O(p,e=>fD(e)?e.text:bE(e)&&fD(e.name)?e.name.text:void 0),h=u?[]:O(p,e=>_.getTypeAtLocation(e)),{argumentTypeNodes:y,argumentTypeParameters:v}=function(e,t,n,r,i,o,a,s){const c=[],l=new Map;for(let _=0;_e[0])),i=new Map(t);if(n){const i=n.filter(n=>!t.some(t=>{var r;return e.getTypeAtLocation(n)===(null==(r=t[1])?void 0:r.argumentType)})),o=r.size+i.length;for(let e=0;r.size{var t;return kw.createTypeParameterDeclaration(void 0,e,null==(t=i.get(e))?void 0:t.constraint)})}(_,v,d),k=foe(p.length,g,y,void 0,u),T=u||void 0===m?void 0:_.typeToTypeNode(m,a,void 0,void 0,l);switch(e){case 175:return kw.createMethodDeclaration(b,x,i,void 0,S,k,T,moe(s));case 174:return kw.createMethodSignature(b,i,void 0,S,k,void 0===T?kw.createKeywordTypeNode(159):T);case 263:return gn.assert("string"==typeof i||fD(i),"Unexpected name"),kw.createFunctionDeclaration(b,x,i,S,k,T,goe(ha.Function_not_implemented.message,s));default:gn.fail("Unexpected kind")}}function aoe(e){return 84+e<=90?String.fromCharCode(84+e):`T${e}`}function soe(e,t,n,r,i,o,a,s){const c=e.typeToTypeNode(n,r,o,a,s);if(c)return coe(c,t,i)}function coe(e,t,n){const r=xoe(e,n);return r&&(koe(t,r.symbols),e=r.typeNode),$C(e)}function loe(e,t,n,r,i,o){let a=e.typeToTypeNode(t,n,r,i,o);if(a){if($D(a)){const n=t;if(n.typeArguments&&a.typeArguments){const t=function(e,t){var n;gn.assert(t.typeArguments);const r=t.typeArguments,i=t.target;for(let t=0;te===r[t]))return t}return r.length}(e,n);if(t=r?kw.createToken(58):void 0,i?void 0:(null==n?void 0:n[s])||kw.createKeywordTypeNode(159),void 0);o.push(l)}return o}function moe(e){return goe(ha.Method_not_implemented.message,e)}function goe(e,t){return kw.createBlock([kw.createThrowStatement(kw.createNewExpression(kw.createIdentifier("Error"),void 0,[kw.createStringLiteral(e,0===t)]))],!0)}function hoe(e,t,n){const r=Yf(t);if(!r)return;const i=boe(r,"compilerOptions");if(void 0===i)return void e.insertNodeAtObjectStart(t,r,voe("compilerOptions",kw.createObjectLiteralExpression(n.map(([e,t])=>voe(e,t)),!0)));const o=i.initializer;if(vE(o))for(const[r,i]of n){const n=boe(o,r);void 0===n?e.insertNodeAtObjectStart(t,o,voe(r,i)):e.replaceNode(t,n.initializer,i)}}function yoe(e,t,n,r){hoe(e,t,[[n,r]])}function voe(e,t){return kw.createPropertyAssignment(kw.createStringLiteral(e),t)}function boe(e,t){return T(e.properties,e=>uP(e)&&!!e.name&&QN(e.name)&&e.name.text===t)}function xoe(e,t){let n;const r=kJ(e,function e(r){if(vf(r)&&r.qualifier){const i=mb(r.qualifier);if(!i.symbol)return IJ(r,e,void 0);const o=a0(i.symbol,t),a=o!==i.text?Soe(r.qualifier,kw.createIdentifier(o)):r.qualifier;n=le(n,i.symbol);const s=TJ(r.typeArguments,e,N_);return kw.createTypeReferenceNode(a,s)}return IJ(r,e,void 0)},N_);if(n&&r)return{typeNode:r,symbols:n}}function Soe(e,t){return 80===e.kind?t:kw.createQualifiedName(Soe(e.left,t),e.right)}function koe(e,t){t.forEach(t=>e.addImportFromExportedSymbol(t,!0))}function Toe(e,t){const n=js(t);let r=dQ(e,t.start);for(;r.ende.replaceNode(t,n,r));return X7(Aoe,i,[ha.Replace_import_with_0,i[0].textChanges[0].newText])}function Ooe(e,t){const n=e.program.getTypeChecker().getTypeAtLocation(t);if(!(n.symbol&&rd(n.symbol)&&n.symbol.links.originatingImport))return[];const r=[],i=n.symbol.links.originatingImport;if(hf(i)||de(r,function(e,t){const n=wd(t),r=Fg(t),i=e.program.getCompilerOptions(),o=[];return o.push(Ioe(e,n,t,gY(r.name,void 0,t.moduleSpecifier,bY(n,e.preferences)))),1===NS(i)&&o.push(Ioe(e,n,t,kw.createImportEqualsDeclaration(void 0,!1,r.name,kw.createExternalModuleReference(t.moduleSpecifier)))),o}(e,i)),Q_(t)&&(!Fc(t.parent)||t.parent.name!==t)){const n=e.sourceFile,i=sde.ChangeTracker.with(e,e=>e.replaceNode(n,t,kw.createPropertyAccessExpression(t,"default"),{}));r.push(X7(Aoe,i,ha.Use_synthetic_default_member))}return r}e8({errorCodes:[ha.This_expression_is_not_callable.code,ha.This_expression_is_not_constructable.code],getCodeActions:function(e){const t=e.sourceFile,n=ha.This_expression_is_not_callable.code===e.errorCode?214:215,r=yc(dQ(t,e.span.start),e=>e.kind===n);if(!r)return[];const i=r.expression;return Ooe(e,i)}}),e8({errorCodes:[ha.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,ha.Type_0_does_not_satisfy_the_constraint_1.code,ha.Type_0_is_not_assignable_to_type_1.code,ha.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,ha.Type_predicate_0_is_not_assignable_to_1.code,ha.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,ha._0_index_type_1_is_not_assignable_to_2_index_type_3.code,ha.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,ha.Property_0_in_type_1_is_not_assignable_to_type_2.code,ha.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,ha.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:function(e){const t=yc(dQ(e.sourceFile,e.span.start),t=>t.getStart()===e.span.start&&t.getEnd()===e.span.start+e.span.length);if(!t)return[];return Ooe(e,t)}});var Loe="strictClassInitialization",joe="addMissingPropertyDefiniteAssignmentAssertions",Moe="addMissingPropertyUndefinedType",Roe="addMissingPropertyInitializer",Boe=[ha.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];function Joe(e,t){const n=dQ(e,t);if(fD(n)&&LD(n.parent)){const e=xv(n.parent);if(e)return{type:e,prop:n.parent,isJs:Mm(n.parent)}}}function zoe(e,t,n){QC(n);const r=kw.updatePropertyDeclaration(n,n.modifiers,n.name,kw.createToken(54),n.type,n.initializer);e.replaceNode(t,n,r)}function qoe(e,t,n){const r=kw.createKeywordTypeNode(157),i=nE(n.type)?n.type.types.concat(r):[n.type,r],o=kw.createUnionTypeNode(i);n.isJs?e.addJSDocTags(t,n.prop,[kw.createJSDocTypeTag(void 0,kw.createJSDocTypeExpression(o))]):e.replaceNode(t,n.type,o)}function Uoe(e,t,n,r){QC(n);const i=kw.updatePropertyDeclaration(n,n.modifiers,n.name,n.questionToken,n.type,r);e.replaceNode(t,n,i)}function Voe(e,t){return Woe(e,e.getTypeFromTypeNode(t.type))}function Woe(e,t){if(512&t.flags)return t===e.getFalseType()||t===e.getFalseType(!0)?kw.createFalse():kw.createTrue();if(t.isStringLiteral())return kw.createStringLiteral(t.value);if(t.isNumberLiteral())return kw.createNumericLiteral(t.value);if(2048&t.flags)return kw.createBigIntLiteral(t.value);if(t.isUnion())return y(t.types,t=>Woe(e,t));if(t.isClass()){const e=kx(t.symbol);if(!e||Lv(e,64))return;const n=uv(e);if(n&&n.parameters.length)return;return kw.createNewExpression(kw.createIdentifier(t.symbol.name),void 0,void 0)}return e.isArrayLikeType(t)?kw.createArrayLiteralExpression():void 0}e8({errorCodes:Boe,getCodeActions:function(e){const t=Joe(e.sourceFile,e.span.start);if(!t)return;const n=[];return le(n,function(e,t){const n=sde.ChangeTracker.with(e,n=>qoe(n,e.sourceFile,t));return Q7(Loe,n,[ha.Add_undefined_type_to_property_0,t.prop.name.getText()],Moe,ha.Add_undefined_type_to_all_uninitialized_properties)}(e,t)),le(n,function(e,t){if(t.isJs)return;const n=sde.ChangeTracker.with(e,n=>zoe(n,e.sourceFile,t.prop));return Q7(Loe,n,[ha.Add_definite_assignment_assertion_to_property_0,t.prop.getText()],joe,ha.Add_definite_assignment_assertions_to_all_uninitialized_properties)}(e,t)),le(n,function(e,t){if(t.isJs)return;const n=e.program.getTypeChecker(),r=Voe(n,t.prop);if(!r)return;const i=sde.ChangeTracker.with(e,n=>Uoe(n,e.sourceFile,t.prop,r));return Q7(Loe,i,[ha.Add_initializer_to_property_0,t.prop.name.getText()],Roe,ha.Add_initializers_to_all_uninitialized_properties)}(e,t)),n},fixIds:[joe,Moe,Roe],getAllCodeActions:e=>a8(e,Boe,(t,n)=>{const r=Joe(n.file,n.start);if(r)switch(e.fixId){case joe:zoe(t,n.file,r.prop);break;case Moe:qoe(t,n.file,r);break;case Roe:const i=Voe(e.program.getTypeChecker(),r.prop);if(!i)return;Uoe(t,n.file,r.prop,i);break;default:gn.fail(JSON.stringify(e.fixId))}})});var $oe="requireInTs",Koe=[ha.require_call_may_be_converted_to_an_import.code];function Hoe(e,t,n){const{allowSyntheticDefaults:r,defaultImportName:i,namedImports:o,statement:a,moduleSpecifier:s}=n;e.replaceNode(t,a,i&&!r?kw.createImportEqualsDeclaration(void 0,!1,i,kw.createExternalModuleReference(s)):kw.createImportDeclaration(void 0,kw.createImportClause(void 0,i,o),s,void 0))}function Goe(e,t,n,r){const{parent:i}=dQ(e,n);qm(i,!0)||gn.failBadSyntaxKind(i);const o=st(i.parent,hF),a=bY(e,r),s=at(o.name,fD),c=mE(o.name)?function(e){const t=[];for(const n of e.elements){if(!fD(n.name)||n.initializer)return;t.push(kw.createImportSpecifier(!1,at(n.propertyName,fD),n.name))}if(t.length)return kw.createNamedImports(t)}(o.name):void 0;if(s||c){const e=xe(i.arguments);return{allowSyntheticDefaults:AS(t.getCompilerOptions()),defaultImportName:s,namedImports:c,statement:st(o.parent.parent,ZE),moduleSpecifier:eD(e)?kw.createStringLiteral(e.text,0===a):e}}}e8({errorCodes:Koe,getCodeActions(e){const t=Goe(e.sourceFile,e.program,e.span.start,e.preferences);if(!t)return;const n=sde.ChangeTracker.with(e,n=>Hoe(n,e.sourceFile,t));return[Q7($oe,n,ha.Convert_require_to_import,$oe,ha.Convert_all_require_to_import)]},fixIds:[$oe],getAllCodeActions:e=>a8(e,Koe,(t,n)=>{const r=Goe(n.file,e.program,n.start,e.preferences);r&&Hoe(t,e.sourceFile,r)})});var Xoe="useDefaultImport",Qoe=[ha.Import_may_be_converted_to_a_default_import.code];function Yoe(e,t){const n=dQ(e,t);if(!fD(n))return;const{parent:r}=n;if(DF(r)&&HF(r.moduleReference))return{importNode:r,name:n,moduleSpecifier:r.moduleReference.expression};if(jF(r)&&EF(r.parent.parent)){const e=r.parent.parent;return{importNode:e,name:n,moduleSpecifier:e.moduleSpecifier}}}function Zoe(e,t,n,r){e.replaceNode(t,n.importNode,gY(n.name,void 0,n.moduleSpecifier,bY(t,r)))}e8({errorCodes:Qoe,getCodeActions(e){const{sourceFile:t,span:{start:n}}=e,r=Yoe(t,n);if(!r)return;const i=sde.ChangeTracker.with(e,n=>Zoe(n,t,r,e.preferences));return[Q7(Xoe,i,ha.Convert_to_default_import,Xoe,ha.Convert_all_to_default_imports)]},fixIds:[Xoe],getAllCodeActions:e=>a8(e,Qoe,(t,n)=>{const r=Yoe(n.file,n.start);r&&Zoe(t,n.file,r,e.preferences)})});var eae="useBigintLiteral",tae=[ha.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];function nae(e,t,n){const r=at(dQ(t,n.start),GN);if(!r)return;const i=r.getText(t)+"n";e.replaceNode(t,r,kw.createBigIntLiteral(i))}e8({errorCodes:tae,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>nae(t,e.sourceFile,e.span));if(t.length>0)return[Q7(eae,t,ha.Convert_to_a_bigint_numeric_literal,eae,ha.Convert_all_to_bigint_numeric_literals)]},fixIds:[eae],getAllCodeActions:e=>a8(e,tae,(e,t)=>nae(e,t.file,t))});var rae="fixAddModuleReferTypeMissingTypeof",iae=[ha.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function oae(e,t){const n=dQ(e,t);return gn.assert(102===n.kind,"This token should be an ImportKeyword"),gn.assert(206===n.parent.kind,"Token parent should be an ImportType"),n.parent}function aae(e,t,n){const r=kw.updateImportTypeNode(n,n.argument,n.attributes,n.qualifier,n.typeArguments,!0);e.replaceNode(t,n,r)}e8({errorCodes:iae,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=oae(t,n.start),i=sde.ChangeTracker.with(e,e=>aae(e,t,r));return[Q7(rae,i,ha.Add_missing_typeof,rae,ha.Add_missing_typeof)]},fixIds:[rae],getAllCodeActions:e=>a8(e,iae,(t,n)=>aae(t,e.sourceFile,oae(n.file,n.start)))});var sae="wrapJsxInFragment",cae=[ha.JSX_expressions_must_have_one_parent_element.code];function lae(e,t){let n=dQ(e,t).parent.parent;if((LE(n)||(n=n.parent,LE(n)))&&Od(n.operatorToken))return n}function _ae(e,t,n){const r=function(e){const t=[];let n=e;for(;;){if(LE(n)&&Od(n.operatorToken)&&28===n.operatorToken.kind){if(t.push(n.left),Tu(n.right))return t.push(n.right),t;if(LE(n.right)){n=n.right;continue}return}return}}(n);r&&e.replaceNode(t,n,kw.createJsxFragment(kw.createJsxOpeningFragment(),r,kw.createJsxJsxClosingFragment()))}e8({errorCodes:cae,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=lae(t,n.start);if(!r)return;const i=sde.ChangeTracker.with(e,e=>_ae(e,t,r));return[Q7(sae,i,ha.Wrap_in_JSX_fragment,sae,ha.Wrap_all_unparented_JSX_in_JSX_fragment)]},fixIds:[sae],getAllCodeActions:e=>a8(e,cae,(t,n)=>{const r=lae(e.sourceFile,n.start);r&&_ae(t,e.sourceFile,r)})});var uae="wrapDecoratorInParentheses",dae=[ha.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];function pae(e,t,n){const r=yc(dQ(t,n),ID);gn.assert(!!r,"Expected position to be owned by a decorator.");const i=kw.createParenthesizedExpression(r.expression);e.replaceNode(t,r.expression,i)}e8({errorCodes:dae,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>pae(t,e.sourceFile,e.span.start));return[Q7(uae,t,ha.Wrap_in_parentheses,uae,ha.Wrap_all_invalid_decorator_expressions_in_parentheses)]},fixIds:[uae],getAllCodeActions:e=>a8(e,dae,(e,t)=>pae(e,t.file,t.start))});var fae="fixConvertToMappedObjectType",mae=[ha.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];function gae(e,t){const n=at(dQ(e,t).parent.parent,VD);if(!n)return;const r=xF(n.parent)?n.parent:at(n.parent.parent,SF);return r?{indexSignature:n,container:r}:void 0}function hae(e,t,{indexSignature:n,container:r}){const i=(xF(r)?r.members:r.type.members).filter(e=>!VD(e)),o=xe(n.parameters),a=kw.createTypeParameterDeclaration(void 0,st(o.name,fD),o.type),s=kw.createMappedTypeNode(qv(n)?kw.createModifier(148):void 0,a,void 0,n.questionToken,n.type,void 0),c=kw.createIntersectionTypeNode([...Dh(r),s,...i.length?[kw.createTypeLiteralNode(i)]:p]);var l,_;e.replaceNode(t,r,(l=r,_=c,kw.createTypeAliasDeclaration(l.modifiers,l.name,l.typeParameters,_)))}e8({errorCodes:mae,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=gae(t,n.start);if(!r)return;const i=sde.ChangeTracker.with(e,e=>hae(e,t,r)),o=kc(r.container.name);return[Q7(fae,i,[ha.Convert_0_to_mapped_object_type,o],fae,[ha.Convert_0_to_mapped_object_type,o])]},fixIds:[fae],getAllCodeActions:e=>a8(e,mae,(e,t)=>{const n=gae(t.file,t.start);n&&hae(e,t.file,n)})});var yae="removeAccidentalCallParentheses";e8({errorCodes:[ha.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code],getCodeActions(e){const t=yc(dQ(e.sourceFile,e.span.start),SE);if(!t)return;const n=sde.ChangeTracker.with(e,n=>{n.deleteRange(e.sourceFile,{pos:t.expression.end,end:t.end})});return[X7(yae,n,ha.Remove_parentheses)]},fixIds:[yae]});var vae="removeUnnecessaryAwait",bae=[ha.await_has_no_effect_on_the_type_of_this_expression.code];function xae(e,t,n){const r=at(dQ(t,n.start),e=>135===e.kind),i=r&&at(r.parent,AE);if(!i)return;let o=i;if(wE(i.parent)){if(fD(jx(i.expression,!1))){const e=hQ(i.parent.pos,t);e&&105!==e.kind&&(o=i.parent)}}e.replaceNode(t,o,i.expression)}e8({errorCodes:bae,getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>xae(t,e.sourceFile,e.span));if(t.length>0)return[Q7(vae,t,ha.Remove_unnecessary_await,vae,ha.Remove_all_unnecessary_uses_of_await)]},fixIds:[vae],getAllCodeActions:e=>a8(e,bae,(e,t)=>xae(e,t.file,t))});var Sae=[ha.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],kae="splitTypeOnlyImport";function Tae(e,t){return yc(dQ(e,t.start),EF)}function Cae(e,t,n){if(!t)return;const r=gn.checkDefined(t.importClause);e.replaceNode(n.sourceFile,t,kw.updateImportDeclaration(t,t.modifiers,kw.updateImportClause(r,r.phaseModifier,r.name,void 0),t.moduleSpecifier,t.attributes)),e.insertNodeAfter(n.sourceFile,t,kw.createImportDeclaration(void 0,kw.updateImportClause(r,r.phaseModifier,void 0,r.namedBindings),t.moduleSpecifier,t.attributes))}e8({errorCodes:Sae,fixIds:[kae],getCodeActions:function(e){const t=sde.ChangeTracker.with(e,t=>Cae(t,Tae(e.sourceFile,e.span),e));if(t.length)return[Q7(kae,t,ha.Split_into_two_separate_import_declarations,kae,ha.Split_all_invalid_type_only_imports)]},getAllCodeActions:e=>a8(e,Sae,(t,n)=>{Cae(t,Tae(e.sourceFile,n),e)})});var wae="fixConvertConstToLet",Nae=[ha.Cannot_assign_to_0_because_it_is_a_constant.code];function Dae(e,t,n){var r;const i=n.getTypeChecker().getSymbolAtLocation(dQ(e,t));if(void 0===i)return;const o=at(null==(r=null==i?void 0:i.valueDeclaration)?void 0:r.parent,yF);if(void 0===o)return;const a=YX(o,87,e);return void 0!==a?{symbol:i,token:a}:void 0}function Eae(e,t,n){e.replaceNode(t,n,kw.createToken(121))}e8({errorCodes:Nae,getCodeActions:function(e){const{sourceFile:t,span:n,program:r}=e,i=Dae(t,n.start,r);if(void 0===i)return;const o=sde.ChangeTracker.with(e,e=>Eae(e,t,i.token));return[Y7(wae,o,ha.Convert_const_to_let,wae,ha.Convert_all_const_to_let)]},getAllCodeActions:e=>{const{program:t}=e,n=new Set;return i8(sde.ChangeTracker.with(e,r=>{s8(e,Nae,e=>{const i=Dae(e.file,e.start,t);if(i&&Dx(n,fJ(i.symbol)))return Eae(r,e.file,i.token)})}))},fixIds:[wae]});var Fae="fixExpectedComma",Pae=[ha._0_expected.code];function Aae(e,t,n){const r=dQ(e,t);return 27===r.kind&&r.parent&&(vE(r.parent)||yE(r.parent))?{node:r}:void 0}function Iae(e,t,{node:n}){const r=kw.createToken(28);e.replaceNode(t,n,r)}e8({errorCodes:Pae,getCodeActions(e){const{sourceFile:t}=e,n=Aae(t,e.span.start,e.errorCode);if(!n)return;const r=sde.ChangeTracker.with(e,e=>Iae(e,t,n));return[Q7(Fae,r,[ha.Change_0_to_1,";",","],Fae,[ha.Change_0_to_1,";",","])]},fixIds:[Fae],getAllCodeActions:e=>a8(e,Pae,(t,n)=>{const r=Aae(n.file,n.start,n.code);r&&Iae(t,e.sourceFile,r)})});var Oae="addVoidToPromise",Lae=[ha.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,ha.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];function jae(e,t,n,r,i){const o=dQ(t,n.start);if(!fD(o)||!SE(o.parent)||o.parent.expression!==o||0!==o.parent.arguments.length)return;const a=r.getTypeChecker(),s=a.getSymbolAtLocation(o),c=null==s?void 0:s.valueDeclaration;if(!c||!AD(c)||!kE(c.parent.parent))return;if(null==i?void 0:i.has(c))return;null==i||i.add(c);const l=function(e){var t;if(!Mm(e))return e.typeArguments;if(wE(e.parent)){const n=null==(t=cl(e.parent))?void 0:t.typeExpression.type;if(n&&$D(n)&&fD(n.typeName)&&"Promise"===kc(n.typeName))return n.typeArguments}}(c.parent.parent);if(X(l)){const n=l[0],r=!nE(n)&&!aE(n)&&aE(kw.createUnionTypeNode([n,kw.createKeywordTypeNode(116)]).types[0]);r&&e.insertText(t,n.pos,"("),e.insertText(t,n.end,r?") | void":" | void")}else{const n=a.getResolvedSignature(o.parent),r=null==n?void 0:n.parameters[0],i=r&&a.getTypeOfSymbolAtLocation(r,c.parent.parent);Mm(c)?(!i||3&i.flags)&&(e.insertText(t,c.parent.parent.end,")"),e.insertText(t,is(t.text,c.parent.parent.pos),"/** @type {Promise} */(")):(!i||2&i.flags)&&e.insertText(t,c.parent.parent.expression.end,"")}}e8({errorCodes:Lae,fixIds:[Oae],getCodeActions(e){const t=sde.ChangeTracker.with(e,t=>jae(t,e.sourceFile,e.span,e.program));if(t.length>0)return[Q7("addVoidToPromise",t,ha.Add_void_to_Promise_resolved_without_a_value,Oae,ha.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions:e=>a8(e,Lae,(t,n)=>jae(t,n.file,n,e.program,new Set))});var Mae={};a(Mae,{CompletionKind:()=>Pse,CompletionSource:()=>Uae,SortText:()=>Jae,StringCompletions:()=>lce,SymbolOriginInfoKind:()=>Vae,createCompletionDetails:()=>Ese,createCompletionDetailsForSymbol:()=>Dse,getCompletionEntriesFromSymbols:()=>Tse,getCompletionEntryDetails:()=>wse,getCompletionEntrySymbol:()=>Fse,getCompletionsAtPosition:()=>Zae,getDefaultCommitCharacters:()=>Yae,getPropertiesForObjectExpression:()=>Wse,moduleSpecifierResolutionCacheAttemptLimit:()=>Bae,moduleSpecifierResolutionLimit:()=>Rae});var Rae=100,Bae=1e3,Jae={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated:e=>"z"+e,ObjectLiteralProperty:(e,t)=>`${e}\0${t}\0`,SortBelow:e=>e+"1"},zae=[".",",",";"],qae=[".",";"],Uae=(e=>(e.ThisProperty="ThisProperty/",e.ClassMemberSnippet="ClassMemberSnippet/",e.TypeOnlyAlias="TypeOnlyAlias/",e.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",e.SwitchCases="SwitchCases/",e.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",e))(Uae||{}),Vae=(e=>(e[e.ThisType=1]="ThisType",e[e.SymbolMember=2]="SymbolMember",e[e.Export=4]="Export",e[e.Promise=8]="Promise",e[e.Nullable=16]="Nullable",e[e.ResolvedExport=32]="ResolvedExport",e[e.TypeOnlyAlias=64]="TypeOnlyAlias",e[e.ObjectLiteralMethod=128]="ObjectLiteralMethod",e[e.Ignore=256]="Ignore",e[e.ComputedPropertyName=512]="ComputedPropertyName",e[e.SymbolMemberNoExport=2]="SymbolMemberNoExport",e[e.SymbolMemberExport=6]="SymbolMemberExport",e))(Vae||{});function Wae(e){return!!(e&&4&e.kind)}function $ae(e){return!(!e||32!==e.kind)}function Kae(e){return(Wae(e)||$ae(e))&&!!e.isFromPackageJson}function Hae(e){return!!(e&&64&e.kind)}function Gae(e){return!!(e&&128&e.kind)}function Xae(e){return!!(e&&512&e.kind)}function Qae(e,t,n,r,i,o,a,s,c){var l,_,u,d;const p=Hn(),f=a||IS(r.getCompilerOptions())||(null==(l=o.autoImportSpecifierExcludeRegexes)?void 0:l.length);let m=!1,g=0,h=0,y=0,v=0;const b=c({tryResolve:function(e,t){if(t){const t=n.getModuleSpecifierForBestExportInfo(e,i,s);return t&&g++,t||"failed"}const r=f||o.allowIncompleteCompletions&&hm,resolvedAny:()=>h>0,resolvedBeyondLimit:()=>h>Rae}),x=v?` (${(y/v*100).toFixed(1)}% hit rate)`:"";return null==(_=t.log)||_.call(t,`${e}: resolved ${h} module specifiers, plus ${g} ambient and ${y} from cache${x}`),null==(u=t.log)||u.call(t,`${e}: response is ${m?"incomplete":"complete"}`),null==(d=t.log)||d.call(t,`${e}: ${Hn()-p}`),b}function Yae(e){return e?[]:zae}function Zae(e,t,n,r,i,o,a,s,c,l,_=!1){var u;const{previousToken:d}=Ose(i,r);if(a&&!xQ(r,i,d)&&!function(e,t,n,r){switch(t){case".":case"@":return!0;case'"':case"'":case"`":return!!n&&EZ(n)&&r===n.getStart(e)+1;case"#":return!!n&&mD(n)&&!!rm(n);case"<":return!!n&&30===n.kind&&(!LE(n.parent)||Xse(n.parent));case"/":return!!n&&(Uu(n)?!!Ng(n):44===n.kind&&YF(n.parent));case" ":return!!n&&ND(n)&&308===n.parent.kind;default:return gn.assertNever(t)}}(r,a,d,i))return;if(" "===a)return o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText?{isGlobalCompletion:!0,isMemberCompletion:!1,isNewIdentifierLocation:!0,isIncomplete:!0,entries:[],defaultCommitCharacters:Yae(!0)}:void 0;const p=t.getCompilerOptions(),f=t.getTypeChecker(),m=o.allowIncompleteCompletions?null==(u=e.getIncompleteCompletionsCache)?void 0:u.call(e):void 0;if(m&&3===s&&d&&fD(d)){const n=function(e,t,n,r,i,o,a,s){const c=e.get();if(!c)return;const l=_Q(t,s),_=n.text.toLowerCase(),u=I0(t,i,r,o,a),d=Qae("continuePreviousIncompleteResponse",i,$7.createImportSpecifierResolver(t,r,i,o),r,n.getStart(),o,!1,DT(n),e=>{const n=U(c.entries,n=>{var o;if(!n.hasAction||!n.source||!n.data||tse(n.data))return n;if(!ace(n.name,_))return;const{origin:a}=gn.checkDefined(Lse(n.name,n.data,r,i)),s=u.get(t.path,n.data.exportMapKey),c=s&&e.tryResolve(s,!As(jy(a.moduleSymbol.name)));if("skipped"===c)return n;if(!c||"failed"===c)return void(null==(o=i.log)||o.call(i,`Unexpected failure resolving auto import for '${n.name}' from '${n.source}'`));const l={...a,kind:32,moduleSpecifier:c.moduleSpecifier};return n.data=vse(l),n.source=kse(l),n.sourceDisplay=[QY(l.moduleSpecifier)],n});return e.skippedAny()||(c.isIncomplete=void 0),n});return c.entries=d,c.flags=4|(c.flags||0),c.optionalReplacementSpan=sse(l),c}(m,r,d,t,e,o,c,i);if(n)return n}else null==m||m.clear();const g=lce.getStringLiteralCompletions(r,i,d,p,e,t,n,o,_);if(g)return g;if(d&&Al(d.parent)&&(83===d.kind||88===d.kind||80===d.kind))return function(e){const t=function(e){const t=[],n=new Map;let r=e;for(;r&&!__(r);){if(pF(r)){const e=r.label.text;n.has(e)||(n.set(e,!0),t.push({name:e,kindModifiers:"",kind:"label",sortText:Jae.LocationPriority}))}r=r.parent}return t}(e);if(t.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:t,defaultCommitCharacters:Yae(!1)}}(d.parent);const h=Ise(t,n,r,p,i,o,void 0,e,l,c);var y,v;if(h)switch(h.kind){case 0:const a=function(e,t,n,r,i,o,a,s,c,l){const{symbols:_,contextToken:u,completionKind:d,isInSnippetScope:p,isNewIdentifierLocation:f,location:m,propertyAccessToConvert:g,keywordFilters:h,symbolToOriginInfoMap:y,recommendedCompletion:v,isJsxInitializer:b,isTypeOnlyLocation:x,isJsxIdentifierExpected:S,isRightOfOpenTag:k,isRightOfDotOrQuestionDot:T,importStatementCompletion:C,insideJsDocTagTypeExpression:w,symbolToSortTextMap:N,hasUnresolvedAutoImports:D,defaultCommitCharacters:E}=o;let F=o.literals;const P=n.getTypeChecker();if(1===hS(e.scriptKind)){const t=function(e,t){const n=yc(e,e=>{switch(e.kind){case 288:return!0;case 44:case 32:case 80:case 212:return!1;default:return"quit"}});if(n){const e=!!YX(n,32,t),r=n.parent.openingElement.tagName.getText(t)+(e?"":">");return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:HQ(n.tagName),entries:[{name:r,kind:"class",kindModifiers:void 0,sortText:Jae.LocationPriority}],defaultCommitCharacters:Yae(!1)}}return}(m,e);if(t)return t}const A=yc(u,sP);if(A&&(DD(u)||mh(u,A.expression))){const e=v0(P,A.parent.clauses);F=F.filter(t=>!e.hasValue(t)),_.forEach((t,n)=>{if(t.valueDeclaration&&fP(t.valueDeclaration)){const r=P.getConstantValue(t.valueDeclaration);void 0!==r&&e.hasValue(r)&&(y[n]={kind:256})}})}const I=[],O=cse(e,r);if(O&&!f&&(!_||0===_.length)&&0===h)return;const L=Tse(_,I,void 0,u,m,c,e,t,n,wS(r),i,d,a,r,s,x,g,S,b,C,v,y,N,S,k,l);if(0!==h)for(const t of Bse(h,!w&&jm(e)))(x&&nY(Ma(t.name))||!x&&cce(t.name)||!L.has(t.name))&&(L.add(t.name),ie(I,t,ese,void 0,!0));for(const e of function(e,t){const n=[];if(e){const r=e.getSourceFile(),i=e.parent,o=r.getLineAndCharacterOfPosition(e.end).line,a=r.getLineAndCharacterOfPosition(t).line;(EF(i)||zF(i)&&i.moduleSpecifier)&&e===i.moduleSpecifier&&o===a&&n.push({name:ja(132),kind:"keyword",kindModifiers:"",sortText:Jae.GlobalsOrKeywords})}return n}(u,c))L.has(e.name)||(L.add(e.name),ie(I,e,ese,void 0,!0));for(const t of F){const n=fse(e,a,t);L.add(n.name),ie(I,n,ese,void 0,!0)}O||function(e,t,n,r,i){y7(e).forEach((e,o)=>{if(e===t)return;const a=Sc(o);!n.has(a)&&Ss(a,r)&&(n.add(a),ie(i,{name:a,kind:"warning",kindModifiers:"",sortText:Jae.JavascriptIdentifiers,isFromUncheckedFile:!0,commitCharacters:[]},ese))})}(e,m.pos,L,wS(r),I);let j;if(a.includeCompletionsWithInsertText&&u&&!k&&!T&&(j=yc(u,wF))){const i=lse(j,e,a,r,t,n,s);i&&I.push(i.entry)}return{flags:o.flags,isGlobalCompletion:p,isIncomplete:!(!a.allowIncompleteCompletions||!D)||void 0,isMemberCompletion:dse(d),isNewIdentifierLocation:f,optionalReplacementSpan:sse(m),entries:I,defaultCommitCharacters:E??Yae(f)}}(r,e,t,p,n,h,o,l,i,_);return(null==a?void 0:a.isIncomplete)&&(null==m||m.set(a)),a;case 1:return nse([...Gle.getJSDocTagNameCompletions(),...rse(r,i,f,p,o,!0)]);case 2:return nse([...Gle.getJSDocTagCompletions(),...rse(r,i,f,p,o,!1)]);case 3:return nse(Gle.getJSDocParameterNameCompletions(h.tag));case 4:return y=h.keywordCompletions,{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:v=h.isNewIdentifierLocation,entries:y.slice(),defaultCommitCharacters:Yae(v)};default:return gn.assertNever(h)}}function ese(e,t){var n,r;let i=Mt(e.sortText,t.sortText);return 0===i&&(i=Mt(e.name,t.name)),0===i&&(null==(n=e.data)?void 0:n.moduleSpecifier)&&(null==(r=t.data)?void 0:r.moduleSpecifier)&&(i=Gk(e.data.moduleSpecifier,t.data.moduleSpecifier)),0===i?-1:i}function tse(e){return!!(null==e?void 0:e.moduleSpecifier)}function nse(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e,defaultCommitCharacters:Yae(!1)}}function rse(e,t,n,r,i,o){const a=dQ(e,t);if(!Au(a)&&!PP(a))return[];const s=PP(a)?a:a.parent;if(!PP(s))return[];const c=s.parent;if(!__(c))return[];const l=jm(e),_=i.includeCompletionsWithSnippetText||void 0,u=F(s.tags,e=>KP(e)&&e.getEnd()<=t);return U(c.parameters,e=>{if(!Mc(e).length){if(fD(e.name)){const t={tabstop:1},a=e.name.text;let s=ose(a,e.initializer,e.dotDotDotToken,l,!1,!1,n,r,i),c=_?ose(a,e.initializer,e.dotDotDotToken,l,!1,!0,n,r,i,t):void 0;return o&&(s=s.slice(1),c&&(c=c.slice(1))),{name:s,kind:"parameter",sortText:Jae.LocationPriority,insertText:_?c:void 0,isSnippet:_}}if(e.parent.parameters.indexOf(e)===u){const t=`param${u}`,a=ise(t,e.name,e.initializer,e.dotDotDotToken,l,!1,n,r,i),s=_?ise(t,e.name,e.initializer,e.dotDotDotToken,l,!0,n,r,i):void 0;let c=a.join(Bb(r)+"* "),d=null==s?void 0:s.join(Bb(r)+"* ");return o&&(c=c.slice(1),d&&(d=d.slice(1))),{name:c,kind:"parameter",sortText:Jae.LocationPriority,insertText:_?d:void 0,isSnippet:_}}}})}function ise(e,t,n,r,i,o,a,s,c){return i?l(e,t,n,r,{tabstop:1}):[ose(e,n,r,i,!1,o,a,s,c,{tabstop:1})];function l(e,t,n,r,l){if(mE(t)&&!r){const u={tabstop:l.tabstop},d=ose(e,n,r,i,!0,o,a,s,c,u);let p=[];for(const n of t.elements){const t=_(e,n,u);if(!t){p=void 0;break}p.push(...t)}if(p)return l.tabstop=u.tabstop,[d,...p]}return[ose(e,n,r,i,!1,o,a,s,c,l)]}function _(e,t,n){if(!t.propertyName&&fD(t.name)||fD(t.name)){const r=t.propertyName?qp(t.propertyName):t.name.text;if(!r)return;return[ose(`${e}.${r}`,t.initializer,t.dotDotDotToken,i,!1,o,a,s,c,n)]}if(t.propertyName){const r=qp(t.propertyName);return r&&l(`${e}.${r}`,t.name,t.initializer,t.dotDotDotToken,n)}}}function ose(e,t,n,r,i,o,a,s,c,l){if(o&&gn.assertIsDefined(l),t&&(e=function(e,t){const n=t.getText().trim();if(n.includes("\n")||n.length>80)return`[${e}]`;return`[${e}=${n}]`}(e,t)),o&&(e=KT(e)),r){let r="*";if(i)gn.assert(!n,"Cannot annotate a rest parameter with type 'Object'."),r="Object";else{if(t){const e=a.getTypeAtLocation(t.parent);if(!(16385&e.flags)){const n=t.getSourceFile(),i=0===bY(n,c)?268435456:0,l=a.typeToTypeNode(e,yc(t,__),i);if(l){const e=o?yse({removeComments:!0,module:s.module,moduleResolution:s.moduleResolution,target:s.target}):jU({removeComments:!0,module:s.module,moduleResolution:s.moduleResolution,target:s.target});Ew(l,1),r=e.printNode(4,l,n)}}}o&&"*"===r&&(r=`\${${l.tabstop++}:${r}}`)}return`@param {${!i&&n?"...":""}${r}} ${e} ${o?`\${${l.tabstop++}}`:""}`}return`@param ${e} ${o?`\${${l.tabstop++}}`:""}`}function ase(e,t,n){return{kind:4,keywordCompletions:Bse(e,t),isNewIdentifierLocation:n}}function sse(e){return 80===(null==e?void 0:e.kind)?HQ(e):void 0}function cse(e,t){return!jm(e)||!!_T(e,t)}function lse(e,t,n,r,i,o,a){const s=e.clauses,c=o.getTypeChecker(),l=c.getTypeAtLocation(e.parent.expression);if(l&&l.isUnion()&&k(l.types,e=>e.isLiteral())){const _=v0(c,s),u=wS(r),d=bY(t,n),p=$7.createImportAdder(t,o,n,i),f=[];for(const t of l.types)if(1024&t.flags){gn.assert(t.symbol,"An enum member type should have a symbol"),gn.assert(t.symbol.parent,"An enum member type should have a parent symbol (the enum symbol)");const n=t.symbol.valueDeclaration&&c.getConstantValue(t.symbol.valueDeclaration);if(void 0!==n){if(_.hasValue(n))continue;_.addValue(n)}const r=$7.typeToAutoImportableTypeNode(c,p,t,e,u);if(!r)return;const i=_se(r,u,d);if(!i)return;f.push(i)}else if(!_.hasValue(t.value))switch(typeof t.value){case"object":f.push(t.value.negative?kw.createPrefixUnaryExpression(41,kw.createBigIntLiteral({negative:!1,base10Value:t.value.base10Value})):kw.createBigIntLiteral(t.value));break;case"number":f.push(t.value<0?kw.createPrefixUnaryExpression(41,kw.createNumericLiteral(-t.value)):kw.createNumericLiteral(t.value));break;case"string":f.push(kw.createStringLiteral(t.value,0===d))}if(0===f.length)return;const m=O(f,e=>kw.createCaseClause(e,[])),g=iZ(i,null==a?void 0:a.options),h=yse({removeComments:!0,module:r.module,moduleResolution:r.moduleResolution,target:r.target,newLine:f0(g)}),y=a?e=>h.printAndFormatNode(4,e,t,a):e=>h.printNode(4,e,t),v=O(m,(e,t)=>n.includeCompletionsWithSnippetText?`${y(e)}$${t+1}`:`${y(e)}`).join(g);return{entry:{name:`${h.printNode(4,m[0],t)} ...`,kind:"",sortText:Jae.GlobalsOrKeywords,insertText:v,hasAction:p.hasFixes()||void 0,source:"SwitchCases/",isSnippet:!!n.includeCompletionsWithSnippetText||void 0},importAdder:p}}}function _se(e,t,n){switch(e.kind){case 184:return use(e.typeName,t,n);case 200:const r=_se(e.objectType,t,n),i=_se(e.indexType,t,n);return r&&i&&kw.createElementAccessExpression(r,i);case 202:const o=e.literal;switch(o.kind){case 11:return kw.createStringLiteral(o.text,0===n);case 9:return kw.createNumericLiteral(o.text,o.numericLiteralFlags)}return;case 197:const a=_se(e.type,t,n);return a&&(fD(a)?a:kw.createParenthesizedExpression(a));case 187:return use(e.exprName,t,n);case 206:gn.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.")}}function use(e,t,n){if(fD(e))return e;const r=Sc(e.right.escapedText);return tC(r,t)?kw.createPropertyAccessExpression(use(e.left,t,n),r):kw.createElementAccessExpression(use(e.left,t,n),kw.createStringLiteral(r,0===n))}function dse(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}function pse(e,t,n){return"object"==typeof n?TT(n)+"n":it(n)?NZ(e,t,n):JSON.stringify(n)}function fse(e,t,n){return{name:pse(e,t,n),kind:"string",kindModifiers:"",sortText:Jae.LocationPriority,commitCharacters:[]}}function mse(e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m,g,h,y,v,b,x,S,C){var w,N;let D,E,F,P,A,I,O,L=KQ(n,o),j=kse(u);const M=c.getTypeChecker(),R=u&&function(e){return!!(16&e.kind)}(u),B=u&&function(e){return!!(2&e.kind)}(u)||_;if(u&&function(e){return!!(1&e.kind)}(u))D=_?`this${R?"?.":""}[${xse(a,y,l)}]`:`this${R?"?.":"."}${l}`;else if((B||R)&&p){D=B?_?`[${xse(a,y,l)}]`:`[${l}]`:l,(R||p.questionDotToken)&&(D=`?.${D}`);const e=YX(p,25,a)||YX(p,29,a);if(!e)return;const t=en(l,p.name.text)?p.name.end:e.end;L=Zs(e.getStart(a),t)}if(f&&(void 0===D&&(D=l),D=`{${D}}`,"boolean"!=typeof f&&(L=HQ(f,a))),u&&function(e){return!!(8&e.kind)}(u)&&p){void 0===D&&(D=l);const e=hQ(p.pos,a);let t="";e&&BZ(e.end,e.parent,a)&&(t=";"),t+=`(await ${p.expression.getText()})`,D=_?`${t}${D}`:`${t}${R?"?.":"."}${D}`;L=Zs((at(p.parent,AE)?p.parent:p.expression).getStart(a),p.end)}if($ae(u)&&(A=[QY(u.moduleSpecifier)],m&&(({insertText:D,replacementSpan:L}=function(e,t,n,r,i,o,a){const s=t.replacementSpan,c=KT(NZ(i,a,n.moduleSpecifier)),l=n.isDefaultExport?1:"export="===n.exportName?2:0,_=a.includeCompletionsWithSnippetText?"$1":"",u=$7.getImportKind(i,l,o,!0),d=t.couldBeTypeOnlyImportSpecifier,p=t.isTopLevelTypeOnly?` ${ja(156)} `:" ",f=d?`${ja(156)} `:"",m=r?";":"";switch(u){case 3:return{replacementSpan:s,insertText:`import${p}${KT(e)}${_} = require(${c})${m}`};case 1:return{replacementSpan:s,insertText:`import${p}${KT(e)}${_} from ${c}${m}`};case 2:return{replacementSpan:s,insertText:`import${p}* as ${KT(e)} from ${c}${m}`};case 0:return{replacementSpan:s,insertText:`import${p}{ ${f}${KT(e)}${_} } from ${c}${m}`}}}(l,m,u,g,a,c,y)),P=!!y.includeCompletionsWithSnippetText||void 0)),64===(null==u?void 0:u.kind)&&(I=!0),0===v&&r&&28!==(null==(w=hQ(r.pos,a,r))?void 0:w.kind)&&(MD(r.parent.parent)||JD(r.parent.parent)||zD(r.parent.parent)||pP(r.parent)||(null==(N=yc(r.parent,uP))?void 0:N.getLastToken(a))===r||dP(r.parent)&&Ha(a,r.getEnd()).line!==Ha(a,o).line)&&(j="ObjectLiteralMemberWithComma/",I=!0),y.includeCompletionsWithClassMemberSnippets&&y.includeCompletionsWithInsertText&&3===v&&function(e,t,n){if(Mm(t))return!1;const r=106500;return!!(e.flags&r)&&(y_(t)||t.parent&&t.parent.parent&&h_(t.parent)&&t===t.parent.name&&t.parent.getLastToken(n)===t.parent.name&&y_(t.parent.parent)||t.parent&&oA(t)&&y_(t.parent))}(e,i,a)){let t;const n=gse(s,c,h,y,l,e,i,o,r,b);if(!n)return;({insertText:D,filterText:E,isSnippet:P,importAdder:t}=n),((null==t?void 0:t.hasFixes())||n.eraseRange)&&(I=!0,j="ClassMemberSnippet/")}if(u&&Gae(u)&&(({insertText:D,isSnippet:P,labelDetails:O}=u),y.useLabelDetailsInCompletionEntries||(l+=O.detail,O=void 0),j="ObjectLiteralMethodSnippet/",t=Jae.SortBelow(t)),x&&!S&&y.includeCompletionsWithSnippetText&&y.jsxAttributeCompletionStyle&&"none"!==y.jsxAttributeCompletionStyle&&(!nP(i.parent)||!i.parent.initializer)){let t="braces"===y.jsxAttributeCompletionStyle;const n=M.getTypeOfSymbolAtLocation(e,i);"auto"!==y.jsxAttributeCompletionStyle||528&n.flags||1048576&n.flags&&T(n.types,e=>!!(528&e.flags))||(402653316&n.flags||1048576&n.flags&&k(n.types,e=>!!(402686084&e.flags||BQ(e)))?(D=`${KT(l)}=${NZ(a,y,"$1")}`,P=!0):t=!0),t&&(D=`${KT(l)}={$1}`,P=!0)}if(void 0!==D&&!y.includeCompletionsWithInsertText)return;(Wae(u)||$ae(u))&&(F=vse(u),I=!m);const J=yc(i,Ix);if(J){const e=wS(s.getCompilationSettings());if(Ss(l,e)){if(276===J.kind){const e=Ma(l);e&&(135===e||jh(e))&&(D=`${l} as ${l}_`)}}else D=xse(a,y,l),276===J.kind&&(aX.setText(a.text),aX.resetTokenState(o),130===aX.scan()&&80===aX.scan()||(D+=" as "+function(e,t){let n,r=!1,i="";for(let o=0;o=65536?2:1)n=e.codePointAt(o),void 0!==n&&(0===o?bs(n,t):xs(n,t))?(r&&(i+="_"),i+=String.fromCodePoint(n),r=!1):r=!0;r&&(i+="_");return i||"_"}(l,e)))}const z=Yue.getSymbolKind(M,e,i),q="warning"===z||"string"===z?[]:void 0;return{name:l,kind:z,kindModifiers:Yue.getSymbolModifiers(M,e),sortText:t,source:j,hasAction:!!I||void 0,isRecommended:Sse(e,d,M)||void 0,insertText:D,filterText:E,replacementSpan:L,sourceDisplay:A,labelDetails:O,isSnippet:P,isPackageJsonImport:Kae(u)||void 0,isImportStatementCompletion:!!m||void 0,data:F,commitCharacters:q,...C?{symbol:e}:void 0}}function gse(e,t,n,r,i,o,a,s,c,l){const _=yc(a,y_);if(!_)return;let u,d=i;const p=i,f=t.getTypeChecker(),m=a.getSourceFile(),g=yse({removeComments:!0,module:n.module,moduleResolution:n.moduleResolution,target:n.target,omitTrailingSemicolon:!1,newLine:f0(iZ(e,null==l?void 0:l.options))}),h=$7.createImportAdder(m,t,r,e);let y;if(r.includeCompletionsWithSnippetText){u=!0;const e=kw.createEmptyStatement();y=kw.createBlock([e],!0),nN(e,{kind:0,order:0})}else y=kw.createBlock([],!0);let v=0;const{modifiers:b,range:x,decorators:S}=function(e,t,n){if(!e||Ha(t,n).line>Ha(t,e.getEnd()).line)return{modifiers:0};let r,i,o=0;const a={pos:n,end:n};if(LD(e.parent)&&(i=function(e){if(a_(e))return e.kind;if(fD(e)){const t=Tc(e);if(t&&r_(t))return t}return}(e))){e.parent.modifiers&&(o|=98303&eb(e.parent.modifiers),r=e.parent.modifiers.filter(ID)||[],a.pos=Math.min(...e.parent.modifiers.map(e=>e.getStart(t))));const n=tb(i);o&n||(o|=n,a.pos=Math.min(a.pos,e.getStart(t))),e.parent.name!==e&&(a.end=e.parent.name.getStart(t))}return{modifiers:o,decorators:r,range:a.pos{let t=0;k&&(t|=64),h_(e)&&1===f.getMemberOverrideModifierStatus(_,e,o)&&(t|=16),T.length||(v=e.modifierFlagsCache|t),e=kw.replaceModifiers(e,v),T.push(e)},y,$7.PreserveOptionalFlags.Property,!!k),T.length){const e=8192&o.flags;let t=17|v;t|=e?1024:136;const n=b&t;if(b&~t)return;if(4&v&&1&n&&(v&=-5),0===n||1&n||(v&=-2),v|=n,T=T.map(e=>kw.replaceModifiers(e,v)),null==S?void 0:S.length){const e=T[T.length-1];OI(e)&&(T[T.length-1]=kw.replaceDecoratorsAndModifiers(e,S.concat(Lc(e)||[])))}const r=131073;d=l?g.printAndFormatSnippetList(r,kw.createNodeArray(T),m,l):g.printSnippetList(r,kw.createNodeArray(T),m)}return{insertText:d,filterText:p,isSnippet:u,importAdder:h,eraseRange:x}}function hse(e,t,n,r,i,o,a,s){const c=a.includeCompletionsWithSnippetText||void 0;let l=t;const _=n.getSourceFile(),u=function(e,t,n,r,i,o){const a=e.getDeclarations();if(!a||!a.length)return;const s=r.getTypeChecker(),c=a[0],l=$C(Ac(c),!1),_=s.getWidenedType(s.getTypeOfSymbolAtLocation(e,t)),u=bY(n,o),d=33554432|(0===u?268435456:0);switch(c.kind){case 172:case 173:case 174:case 175:{let e=1048576&_.flags&&_.types.length<10?s.getUnionType(_.types,2):_;if(1048576&e.flags){const t=P(e.types,e=>s.getSignaturesOfType(e,0).length>0);if(1!==t.length)return;e=t[0]}if(1!==s.getSignaturesOfType(e,0).length)return;const n=s.typeToTypeNode(e,t,d,void 0,$7.getNoopSymbolTrackerWithResolver({program:r,host:i}));if(!n||!KD(n))return;let a;if(o.includeCompletionsWithSnippetText){const e=kw.createEmptyStatement();a=kw.createBlock([e],!0),nN(e,{kind:0,order:0})}else a=kw.createBlock([],!0);const c=n.parameters.map(e=>kw.createParameterDeclaration(void 0,e.dotDotDotToken,e.name,void 0,void 0,e.initializer));return kw.createMethodDeclaration(void 0,void 0,l,void 0,void 0,c,void 0,a)}default:return}}(e,n,_,r,i,a);if(!u)return;const d=yse({removeComments:!0,module:o.module,moduleResolution:o.moduleResolution,target:o.target,omitTrailingSemicolon:!1,newLine:f0(iZ(i,null==s?void 0:s.options))});l=s?d.printAndFormatSnippetList(80,kw.createNodeArray([u],!0),_,s):d.printSnippetList(80,kw.createNodeArray([u],!0),_);const p=jU({removeComments:!0,module:o.module,moduleResolution:o.moduleResolution,target:o.target,omitTrailingSemicolon:!0}),f=kw.createMethodSignature(void 0,"",u.questionToken,u.typeParameters,u.parameters,u.type);return{isSnippet:c,insertText:l,labelDetails:{detail:p.printNode(4,f,_)}}}function yse(e){let t;const n=sde.createWriter(Bb(e)),r=jU(e,n),i={...n,write:e=>o(e,()=>n.write(e)),nonEscapingWrite:n.write,writeLiteral:e=>o(e,()=>n.writeLiteral(e)),writeStringLiteral:e=>o(e,()=>n.writeStringLiteral(e)),writeSymbol:(e,t)=>o(e,()=>n.writeSymbol(e,t)),writeParameter:e=>o(e,()=>n.writeParameter(e)),writeComment:e=>o(e,()=>n.writeComment(e)),writeProperty:e=>o(e,()=>n.writeProperty(e))};return{printSnippetList:function(e,n,r){const i=a(e,n,r);return t?sde.applyChanges(i,t):i},printAndFormatSnippetList:function(e,n,r,i){const o={text:a(e,n,r),getLineAndCharacterOfPosition(e){return Ha(this,e)}},s=g0(i,r),c=R(n,e=>{const t=sde.assignPositionsToNode(e);return jde.formatNodeGivenIndentation(t,o,r.languageVariant,0,0,{...i,options:s})}),l=t?me(Y(c,t),(e,t)=>Ct(e.span,t.span)):c;return sde.applyChanges(o.text,l)},printNode:function(e,n,r){const i=s(e,n,r);return t?sde.applyChanges(i,t):i},printAndFormatNode:function(e,n,r,i){const o={text:s(e,n,r),getLineAndCharacterOfPosition(e){return Ha(this,e)}},a=g0(i,r),c=sde.assignPositionsToNode(n),l=jde.formatNodeGivenIndentation(c,o,r.languageVariant,0,0,{...i,options:a}),_=t?me(Y(l,t),(e,t)=>Ct(e.span,t.span)):l;return sde.applyChanges(o.text,_)}};function o(e,r){const i=KT(e);if(i!==e){const e=n.getTextPos();r();const o=n.getTextPos();t=le(t||(t=[]),{newText:i,span:{start:e,length:o-e}})}else r()}function a(e,n,o){return t=void 0,i.clear(),r.writeList(e,n,o,i),i.getText()}function s(e,n,o){return t=void 0,i.clear(),r.writeNode(e,n,o,i),i.getText()}}function vse(e){const t=e.fileName?void 0:jy(e.moduleSymbol.name),n=!!e.isFromPackageJson||void 0;if($ae(e)){return{exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,ambientModuleName:t,fileName:e.fileName,isPackageJsonImport:n}}return{exportName:e.exportName,exportMapKey:e.exportMapKey,fileName:e.fileName,ambientModuleName:e.fileName?void 0:jy(e.moduleSymbol.name),isPackageJsonImport:!!e.isFromPackageJson||void 0}}function bse(e,t,n){const r="default"===e.exportName,i=!!e.isPackageJsonImport;if(tse(e)){return{kind:32,exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}}return{kind:4,exportName:e.exportName,exportMapKey:e.exportMapKey,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}}function xse(e,t,n){return/^\d+$/.test(n)?n:NZ(e,t,n)}function Sse(e,t,n){return e===t||!!(1048576&e.flags)&&n.getExportSymbolOfSymbol(e)===t}function kse(e){return Wae(e)?jy(e.moduleSymbol.name):$ae(e)?e.moduleSpecifier:1===(null==e?void 0:e.kind)?"ThisProperty/":64===(null==e?void 0:e.kind)?"TypeOnlyAlias/":void 0}function Tse(e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m,g,h,y,v,b,x,S,k,T,C=!1){const w=Hn(),N=function(e,t){if(!e)return;let n=yc(e,e=>$f(e)||rce(e)||E_(e)?"quit":(AD(e)||PD(e))&&!VD(e.parent));n||(n=yc(t,e=>$f(e)||rce(e)||E_(e)?"quit":hF(e)));return n}(r,i),D=JZ(a),E=c.getTypeChecker(),F=new Map;for(let _=0;_e.getSourceFile()===i.getSourceFile()));F.set(O,R),ie(t,M,ese,void 0,!0)}return _("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(Hn()-w)),{has:e=>F.has(e),add:e=>F.set(e,!0)};function P(e,t){var n;let o=e.flags;if(i.parent&&JF(i.parent))return!0;if(N&&at(N,hF)){if(e.valueDeclaration===N)return!1;if(E_(N.name)&&N.name.elements.some(t=>t===e.valueDeclaration))return!1}const s=e.valueDeclaration??(null==(n=e.declarations)?void 0:n[0]);if(N&&s)if(AD(N)&&AD(s)){const e=N.parent.parameters;if(s.pos>=N.pos&&s.pos=N.pos&&s.pospse(n,a,e)===i.name);return void 0!==v?{type:"literal",literal:v}:y(l,(e,t)=>{const n=p[t],r=jse(e,wS(s),n,d,c.isJsxIdentifierExpected);return r&&r.name===i.name&&("ClassMemberSnippet/"===i.source&&106500&e.flags||"ObjectLiteralMethodSnippet/"===i.source&&8196&e.flags||kse(n)===i.source||"ObjectLiteralMemberWithComma/"===i.source)?{type:"symbol",symbol:e,location:u,origin:n,contextToken:f,previousToken:m,isJsxInitializer:g,isTypeOnlyLocation:h}:void 0})||{type:"none"}}function wse(e,t,n,r,i,o,a,s,c){const l=e.getTypeChecker(),_=e.getCompilerOptions(),{name:u,source:d,data:p}=i,{previousToken:f,contextToken:m}=Ose(r,n);if(xQ(n,r,f))return lce.getStringLiteralCompletionDetails(u,n,r,f,e,o,c,s);const g=Cse(e,t,n,r,i,o,s);switch(g.type){case"request":{const{request:e}=g;switch(e.kind){case 1:return Gle.getJSDocTagNameCompletionDetails(u);case 2:return Gle.getJSDocTagCompletionDetails(u);case 3:return Gle.getJSDocParameterNameCompletionDetails(u);case 4:return X(e.keywordCompletions,e=>e.name===u)?Nse(u,"keyword",5):void 0;default:return gn.assertNever(e)}}case"symbol":{const{symbol:t,location:i,contextToken:f,origin:m,previousToken:h}=g,{codeActions:y,sourceDisplay:v}=function(e,t,n,r,i,o,a,s,c,l,_,u,d,p,f,m){if((null==p?void 0:p.moduleSpecifier)&&_&&Qse(n||_,c).replacementSpan)return{codeActions:void 0,sourceDisplay:[QY(p.moduleSpecifier)]};if("ClassMemberSnippet/"===f){const{importAdder:r,eraseRange:_}=gse(a,o,s,d,e,i,t,l,n,u);if((null==r?void 0:r.hasFixes())||_){return{sourceDisplay:void 0,codeActions:[{changes:sde.ChangeTracker.with({host:a,formatContext:u,preferences:d},e=>{r&&r.writeFixes(e),_&&e.deleteRange(c,_)}),description:(null==r?void 0:r.hasFixes())?m0([ha.Includes_imports_of_types_referenced_by_0,e]):m0([ha.Update_modifiers_of_0,e])}]}}}if(Hae(r)){const e=$7.getPromoteTypeOnlyCompletionAction(c,r.declaration.name,o,a,u,d);return gn.assertIsDefined(e,"Expected to have a code action for promoting type-only alias"),{codeActions:[e],sourceDisplay:void 0}}if("ObjectLiteralMemberWithComma/"===f&&n){const t=sde.ChangeTracker.with({host:a,formatContext:u,preferences:d},e=>e.insertText(c,n.end,","));if(t)return{sourceDisplay:void 0,codeActions:[{changes:t,description:m0([ha.Add_missing_comma_for_object_member_completion_0,e])}]}}if(!r||!Wae(r)&&!$ae(r))return{codeActions:void 0,sourceDisplay:void 0};const g=r.isFromPackageJson?a.getPackageJsonAutoImportProvider().getTypeChecker():o.getTypeChecker(),{moduleSymbol:h}=r,y=g.getMergedSymbol(px(i.exportSymbol||i,g)),v=30===(null==n?void 0:n.kind)&&Nu(n.parent),{moduleSpecifier:b,codeAction:x}=$7.getImportCompletionAction(y,h,null==p?void 0:p.exportMapKey,c,e,v,a,o,u,_&&fD(_)?_.getStart(c):l,d,m);return gn.assert(!(null==p?void 0:p.moduleSpecifier)||b===p.moduleSpecifier),{sourceDisplay:[QY(b)],codeActions:[x]}}(u,i,f,m,t,e,o,_,n,r,h,a,s,p,d,c);return Dse(t,Xae(m)?m.symbolName:t.name,l,n,i,c,y,v)}case"literal":{const{literal:e}=g;return Nse(pse(n,s,e),"string","string"==typeof e?8:7)}case"cases":{const t=lse(m.parent,n,s,e.getCompilerOptions(),o,e,void 0);if(null==t?void 0:t.importAdder.hasFixes()){const{entry:e,importAdder:n}=t,r=sde.ChangeTracker.with({host:o,formatContext:a,preferences:s},n.writeFixes);return{name:e.name,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0,codeActions:[{changes:r,description:m0([ha.Includes_imports_of_types_referenced_by_0,u])}]}}return{name:u,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return Rse().some(e=>e.name===u)?Nse(u,"keyword",5):void 0;default:gn.assertNever(g)}}function Nse(e,t,n){return Ese(e,"",t,[UY(e,n)])}function Dse(e,t,n,r,i,o,a,s){const{displayParts:c,documentation:l,symbolKind:_,tags:u}=n.runWithCancellationToken(o,t=>Yue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,r,i,i,7));return Ese(t,Yue.getSymbolModifiers(n,e),_,c,l,u,a,s)}function Ese(e,t,n,r,i,o,a,s){return{name:e,kindModifiers:t,kind:n,displayParts:r,documentation:i,tags:o,codeActions:a,source:s,sourceDisplay:s}}function Fse(e,t,n,r,i,o,a){const s=Cse(e,t,n,r,i,o,a);return"symbol"===s.type?s.symbol:void 0}var Pse=(e=>(e[e.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",e[e.Global=1]="Global",e[e.PropertyAccess=2]="PropertyAccess",e[e.MemberLike=3]="MemberLike",e[e.String=4]="String",e[e.None=5]="None",e))(Pse||{});function Ase(e,t,n){const r=n.getAccessibleSymbolChain(e,t,-1,!1);return r?xe(r):e.parent&&(function(e){var t;return!!(null==(t=e.declarations)?void 0:t.some(e=>308===e.kind))}(e.parent)?e:Ase(e.parent,t,n))}function Ise(e,t,n,r,i,o,a,s,c,l){const _=e.getTypeChecker(),u=cse(n,r);let d=Hn(),p=dQ(n,i);t("getCompletionData: Get current token: "+(Hn()-d)),d=Hn();const f=PQ(n,i,p);t("getCompletionData: Is inside comment: "+(Hn()-d));let m=!1,h=!1,v=!1;if(f){if(AQ(n,i)){if(64===n.text.charCodeAt(i-1))return{kind:1};{const e=BX(i,n);if(!/[^*|\s(/)]/.test(n.text.substring(e,i)))return{kind:2}}}const e=function(e,t){return yc(e,e=>!(!Au(e)||!zX(e,t))||!!PP(e)&&"quit")}(p,i);if(e){if(e.tagName.pos<=i&&i<=e.tagName.end)return{kind:1};if(iA(e))h=!0;else{const t=function(e){if(function(e){switch(e.kind){case 342:case 349:case 343:case 345:case 347:case 350:case 351:return!0;case 346:return!!e.constraint;default:return!1}}(e)){const t=QP(e)?e.constraint:e.typeExpression;return t&&310===t.kind?t:void 0}if(OP(e)||tA(e))return e.class;return}(e);if(t&&(p=dQ(n,i),p&&(gh(p)||349===p.parent.kind&&p.parent.name===p)||(m=he(t))),!m&&KP(e)&&(Od(e.name)||e.name.pos<=i&&i<=e.name.end))return{kind:3,tag:e}}}if(!m&&!h)return void t("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}d=Hn();const b=!m&&!h&&jm(n),x=Ose(i,n),S=x.previousToken;let k=x.contextToken;t("getCompletionData: Get previous token: "+(Hn()-d));let C,w,N,D=p,E=!1,F=!1,A=!1,I=!1,O=!1,L=!1,j=_Q(n,i),M=0,B=!1,J=0;if(k){const e=Qse(k,n);if(e.keywordCompletion){if(e.isKeywordOnlyCompletion)return{kind:4,keywordCompletions:[(z=e.keywordCompletion,{name:ja(z),kind:"keyword",kindModifiers:"",sortText:Jae.GlobalsOrKeywords})],isNewIdentifierLocation:e.isNewIdentifierLocation};M=function(e){if(156===e)return 8;gn.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters")}(e.keywordCompletion)}if(e.replacementSpan&&o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText&&(J|=2,w=e,B=e.isNewIdentifierLocation),!e.replacementSpan&&function(e){const r=Hn(),o=function(e){return(ZN(e)||Xl(e))&&(qX(e,i)||i===e.end&&(!!e.isUnterminated||ZN(e)))}(e)||function(e){const t=e.parent,r=t.kind;switch(e.kind){case 28:return 261===r||262===(o=e).parent.kind&&!DQ(o,n,_)||244===r||267===r||pe(r)||265===r||208===r||266===r||y_(t)&&!!t.typeParameters&&t.typeParameters.end>=e.pos;case 25:case 23:return 208===r;case 59:return 209===r;case 21:return 300===r||pe(r);case 19:return 267===r;case 30:return 264===r||232===r||265===r||266===r||m_(r);case 126:return 173===r&&!y_(t.parent);case 26:return 170===r||!!t.parent&&208===t.parent.kind;case 125:case 123:case 124:return 170===r&&!BD(t.parent);case 130:return 277===r||282===r||275===r;case 139:case 153:return!Gse(e);case 80:if((277===r||282===r)&&e===t.name&&"type"===e.text)return!1;if(yc(e.parent,hF)&&function(e,t){return n.getLineEndOfPosition(e.getEnd())S.end))}(e)||function(e){if(9===e.kind){const t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(e)||function(e){if(12===e.kind)return!0;if(32===e.kind&&e.parent){if(j===e.parent&&(287===j.kind||286===j.kind))return!1;if(287===e.parent.kind)return 287!==j.parent.kind;if(288===e.parent.kind||286===e.parent.kind)return!!e.parent.parent&&285===e.parent.parent.kind}return!1}(e)||XN(e);return t("getCompletionsAtPosition: isCompletionListBlocker: "+(Hn()-r)),o}(k))return t("Returning an empty list because completion was requested in an invalid position."),M?ase(M,b,_e().isNewIdentifierLocation):void 0;let r=k.parent;if(25===k.kind||29===k.kind)switch(E=25===k.kind,F=29===k.kind,r.kind){case 212:C=r,D=C.expression;if(Od(Ox(C))||(SE(D)||__(D))&&D.end===k.pos&&D.getChildCount(n)&&22!==Te(D.getChildren(n)).kind)return;break;case 167:D=r.left;break;case 268:D=r.name;break;case 206:D=r;break;case 237:D=r.getFirstToken(n),gn.assert(102===D.kind||105===D.kind);break;default:return}else if(!w){if(r&&212===r.kind&&(k=r,r=r.parent),p.parent===j)switch(p.kind){case 32:285!==p.parent.kind&&287!==p.parent.kind||(j=p);break;case 44:286===p.parent.kind&&(j=p)}switch(r.kind){case 288:44===k.kind&&(I=!0,j=k);break;case 227:if(!Xse(r))break;case 286:case 285:case 287:L=!0,30===k.kind&&(A=!0,j=k);break;case 295:case 294:(20===S.kind||80===S.kind&&292===S.parent.kind)&&(L=!0);break;case 292:if(r.initializer===S&&S.endpY(t?s.getPackageJsonAutoImportProvider():e,s));if(E||F)!function(){W=2;const e=vf(D),t=e&&!D.isTypeOf||If(D.parent)||DQ(k,n,_),r=_X(D);if(s_(D)||e||bE(D)){const n=TF(D.parent);n&&(B=!0,N=[]);let i=_.getSymbolAtLocation(D);if(i&&(i=px(i,_),1920&i.flags)){const a=_.getExportsOfModule(i);gn.assertEachIsDefined(a,"getExportsOfModule() should all be defined");const s=t=>_.isValidPropertyAccess(e?D:D.parent,t.name),c=e=>ice(e,_),l=n?e=>{var t;return!!(1920&e.flags)&&!(null==(t=e.declarations)?void 0:t.every(e=>e.parent===D.parent))}:r?e=>c(e)||s(e):t||m?c:s;for(const e of a)l(e)&&K.push(e);if(!t&&!m&&i.declarations&&i.declarations.some(e=>308!==e.kind&&268!==e.kind&&267!==e.kind)){let e=_.getTypeOfSymbolAtLocation(i,D).getNonOptionalType(),t=!1;if(e.isNullableType()){const n=E&&!F&&!1!==o.includeAutomaticOptionalChainCompletions;(n||F)&&(e=e.getNonNullableType(),n&&(t=!0))}oe(e,!!(65536&D.flags),t)}return}}if(!t||hv(D)){_.tryGetThisTypeAt(D,!1);let e=_.getTypeAtLocation(D).getNonOptionalType();if(t)oe(e.getNonNullableType(),!1,!1);else{let t=!1;if(e.isNullableType()){const n=E&&!F&&!1!==o.includeAutomaticOptionalChainCompletions;(n||F)&&(e=e.getNonNullableType(),n&&(t=!0))}oe(e,!!(65536&D.flags),t)}}}();else if(A)K=_.getJsxIntrinsicTagNamesAt(j),gn.assertEachIsDefined(K,"getJsxIntrinsicTagNames() should all be defined"),ce(),W=1,M=0;else if(I){const e=k.parent.parent.openingElement.tagName,t=_.getSymbolAtLocation(e);t&&(K=[t]),W=1,M=0}else if(!ce())return M?ase(M,b,B):void 0;t("getCompletionData: Semantic work: "+(Hn()-q));const ne=S&&function(e,t,n,r){const{parent:i}=e;switch(e.kind){case 80:return wZ(e,r);case 64:switch(i.kind){case 261:return r.getContextualType(i.initializer);case 227:return r.getTypeAtLocation(i.left);case 292:return r.getContextualTypeForJsxAttribute(i);default:return}case 105:return r.getContextualType(i);case 84:const o=at(i,sP);return o?PZ(o,r):void 0;case 19:return!oP(i)||GF(i.parent)||ZF(i.parent)?void 0:r.getContextualTypeForJsxAttribute(i.parent);default:const a=mue.getArgumentInfoForCompletions(e,t,n,r);return a?r.getContextualTypeForArgumentAtIndex(a.invocation,a.argumentIndex):DZ(e.kind)&&LE(i)&&DZ(i.operatorToken.kind)?r.getTypeAtLocation(i.left):r.getContextualType(e,4)||r.getContextualType(e)}}(S,i,n,_),re=!at(S,Uu)&&!L?U(ne&&(ne.isUnion()?ne.types:[ne]),e=>!e.isLiteral()||1024&e.flags?void 0:e.value):[],ie=S&&ne&&function(e,t,n){return y(t&&(t.isUnion()?t.types:[t]),t=>{const r=t&&t.symbol;return r&&424&r.flags&&!Sx(r)?Ase(r,e,n):void 0})}(S,ne,_);return{kind:0,symbols:K,completionKind:W,isInSnippetScope:v,propertyAccessToConvert:C,isNewIdentifierLocation:B,location:j,keywordFilters:M,literals:re,symbolToOriginInfoMap:H,recommendedCompletion:ie,previousToken:S,contextToken:k,isJsxInitializer:O,insideJsDocTagTypeExpression:m,symbolToSortTextMap:G,isTypeOnlyLocation:Z,isJsxIdentifierExpected:L,isRightOfOpenTag:A,isRightOfDotOrQuestionDot:E||F,importStatementCompletion:w,hasUnresolvedAutoImports:$,flags:J,defaultCommitCharacters:N};function oe(e,t,n){e.getStringIndexType()&&(B=!0,N=[]),F&&X(e.getCallSignatures())&&(B=!0,N??(N=zae));const r=206===D.kind?D:D.parent;if(u)for(const t of e.getApparentProperties())_.isValidPropertyAccessForCompletions(r,e,t)&&ae(t,!1,n);else K.push(...P(Kse(e,_),t=>_.isValidPropertyAccessForCompletions(r,e,t)));if(t&&o.includeCompletionsWithInsertText){const t=_.getPromisedTypeOfPromise(e);if(t)for(const e of t.getApparentProperties())_.isValidPropertyAccessForCompletions(r,t,e)&&ae(e,!0,n)}}function ae(t,r,a){var c;const l=y(t.declarations,e=>at(Ac(e),FD));if(l){const r=se(l.expression),a=r&&_.getSymbolAtLocation(r),f=a&&Ase(a,k,_),m=f&&fJ(f);if(m&&Dx(Q,m)){const t=K.length;K.push(f),G[fJ(f)]=Jae.GlobalsOrKeywords;const r=f.parent;if(r&&id(r)&&_.tryGetMemberInModuleExportsAndProperties(f.name,r)===f){const a=As(jy(r.name))?null==(c=Nd(r))?void 0:c.fileName:void 0,{moduleSpecifier:l}=(V||(V=$7.createImportSpecifierResolver(n,e,s,o))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:a,isFromPackageJson:!1,moduleSymbol:r,symbol:f,targetFlags:px(f,_).flags}],i,DT(j))||{};if(l){const e={kind:p(6),moduleSymbol:r,isDefaultExport:!1,symbolName:f.name,exportName:f.name,fileName:a,moduleSpecifier:l};H[t]=e}}else H[t]={kind:p(2)}}else if(o.includeCompletionsWithInsertText){if(m&&Q.has(m))return;d(t),u(t),K.push(t)}}else d(t),u(t),K.push(t);function u(e){(function(e){return!!(e.valueDeclaration&&256&Kv(e.valueDeclaration)&&y_(e.valueDeclaration.parent))})(e)&&(G[fJ(e)]=Jae.LocalDeclarationPriority)}function d(e){o.includeCompletionsWithInsertText&&(r&&Dx(Q,fJ(e))?H[K.length]={kind:p(8)}:a&&(H[K.length]={kind:16}))}function p(e){return a?16|e:e}}function se(e){return fD(e)?e:bE(e)?se(e.expression):void 0}function ce(){const t=function(){const e=function(e){if(!e)return;const t=e.parent;switch(e.kind){case 19:if(XD(t))return t;break;case 27:case 28:case 80:if(172===t.kind&&XD(t.parent))return t.parent}return}(k);if(!e)return 0;const t=(rE(e.parent)?e.parent:void 0)||e,n=Hse(t,_);if(!n)return 0;const r=_.getTypeFromTypeNode(t),i=Kse(n,_),o=Kse(r,_),a=new Set;return o.forEach(e=>a.add(e.escapedName)),K=Y(K,P(i,e=>!a.has(e.escapedName))),W=0,B=!0,1}()||function(){if(26===(null==k?void 0:k.kind))return 0;const t=K.length,a=function(e,t,n){var r;if(e){const{parent:i}=e;switch(e.kind){case 19:case 28:if(vE(i)||mE(i))return i;break;case 42:return MD(i)?at(i.parent,vE):void 0;case 134:return at(i.parent,vE);case 80:if("async"===e.text&&dP(e.parent))return e.parent.parent;{if(vE(e.parent.parent)&&(pP(e.parent)||dP(e.parent)&&Ha(n,e.getEnd()).line!==Ha(n,t).line))return e.parent.parent;const r=yc(i,uP);if((null==r?void 0:r.getLastToken(n))===e&&vE(r.parent))return r.parent}break;default:if((null==(r=i.parent)?void 0:r.parent)&&(MD(i.parent)||JD(i.parent)||zD(i.parent))&&vE(i.parent.parent))return i.parent.parent;if(pP(i)&&vE(i.parent))return i.parent;const o=yc(i,uP);if(59!==e.kind&&(null==o?void 0:o.getLastToken(n))===e&&vE(o.parent))return o.parent}}return}(k,i,n);if(!a)return 0;let l,u;if(W=0,211===a.kind){const e=function(e,t){const n=t.getContextualType(e);if(n)return n;const r=_h(e.parent);if(LE(r)&&64===r.operatorToken.kind&&e===r.left)return t.getTypeAtLocation(r);if(Q_(r))return t.getContextualType(r);return}(a,_);if(void 0===e)return 67108864&a.flags?2:0;const t=_.getContextualType(a,4),n=(t||e).getStringIndexType(),r=(t||e).getNumberIndexType();if(B=!!n||!!r,l=Wse(e,t,a,_),u=a.properties,0===l.length&&!r)return 0}else{gn.assert(207===a.kind),B=!1;const e=oy(a.parent);if(!Bf(e))return gn.fail("Root declaration is not variable-like.");let t=Mu(e)||!!xv(e)||251===e.parent.parent.kind;if(t||170!==e.kind||(Q_(e.parent)?t=!!_.getContextualType(e.parent):175!==e.parent.kind&&179!==e.parent.kind||(t=Q_(e.parent.parent)&&!!_.getContextualType(e.parent.parent))),t){const e=_.getTypeAtLocation(a);if(!e)return 2;l=_.getPropertiesOfType(e).filter(t=>_.isPropertyAccessible(a,!1,!1,e,t)),u=a.elements}}if(l&&l.length>0){const n=function(e,t){if(0===t.length)return e;const n=new Set,r=new Set;for(const e of t){if(304!==e.kind&&305!==e.kind&&209!==e.kind&&175!==e.kind&&178!==e.kind&&179!==e.kind&&306!==e.kind)continue;if(he(e))continue;let t;if(pP(e))fe(e,n);else if(hE(e)&&e.propertyName)80===e.propertyName.kind&&(t=e.propertyName.escapedText);else{const n=Ac(e);t=n&&Hh(n)?Xh(n):void 0}void 0!==t&&r.add(t)}const i=e.filter(e=>!r.has(e.escapedName));return ge(n,i),i}(l,gn.checkDefined(u));K=Y(K,n),me(),211===a.kind&&o.includeCompletionsWithObjectLiteralMethodSnippets&&o.includeCompletionsWithInsertText&&(function(e){for(let t=e;t{if(!function(e){if(!(8196&e.flags))return!1;return!0}(t))return;const i=jse(t,wS(r),void 0,0,!1);if(!i)return;const{name:a}=i,l=hse(t,a,n,e,s,r,o,c);if(!l)return;const _={kind:128,...l};J|=32,H[K.length]=_,K.push(t)})}(n,a))}return 1}()||(w?(B=!0,le(),1):0)||function(){if(!k)return 0;const e=19===k.kind||28===k.kind?at(k.parent,Ix):iY(k)?at(k.parent.parent,Ix):void 0;if(!e)return 0;iY(k)||(M=8);const{moduleSpecifier:t}=276===e.kind?e.parent.parent:e.parent;if(!t)return B=!0,276===e.kind?2:0;const n=_.getSymbolAtLocation(t);if(!n)return B=!0,2;W=3,B=!1;const r=_.getExportsAndPropertiesOfModule(n),i=new Set(e.elements.filter(e=>!he(e)).map(e=>ep(e.propertyName||e.name))),o=r.filter(e=>"default"!==e.escapedName&&!i.has(e.escapedName));K=Y(K,o),o.length||(M=0);return 1}()||function(){if(void 0===k)return 0;const e=19===k.kind||28===k.kind?at(k.parent,OF):59===k.kind?at(k.parent.parent,OF):void 0;if(void 0===e)return 0;const t=new Set(e.elements.map(xC));return K=P(_.getTypeAtLocation(e).getApparentProperties(),e=>!t.has(e.escapedName)),1}()||function(){var e;const t=!k||19!==k.kind&&28!==k.kind?void 0:at(k.parent,qF);if(!t)return 0;const n=yc(t,an(mP,TF));return W=5,B=!1,null==(e=n.locals)||e.forEach((e,t)=>{var r,i;K.push(e),(null==(i=null==(r=n.symbol)?void 0:r.exports)?void 0:i.has(t))&&(G[fJ(e)]=Jae.OptionalMember)}),1}()||(function(e){if(e){const t=e.parent;switch(e.kind){case 21:case 28:return BD(e.parent)?e.parent:void 0;default:if(ue(e))return t.parent}}}(k)?(W=5,B=!0,M=4,1):0)||function(){const e=function(e,t,n,r){switch(n.kind){case 353:return at(n.parent,Ex);case 1:const t=at(ke(st(n.parent,mP).statements),Ex);if(t&&!YX(t,20,e))return t;break;case 81:if(at(n.parent,LD))return yc(n,y_);break;case 80:if(Tc(n))return;if(LD(n.parent)&&n.parent.initializer===n)return;if(Gse(n))return yc(n,Ex)}if(!t)return;if(137===n.kind||fD(t)&&LD(t.parent)&&y_(n))return yc(t,y_);switch(t.kind){case 64:return;case 27:case 20:return Gse(n)&&n.parent.name===n?n.parent.parent:at(n,Ex);case 19:case 28:return at(t.parent,Ex);default:if(Ex(n)){if(Ha(e,t.getEnd()).line!==Ha(e,r).line)return n;const i=y_(t.parent.parent)?qse:zse;return i(t.kind)||42===t.kind||fD(t)&&i(Tc(t)??0)?t.parent.parent:void 0}return}}(n,k,j,i);if(!e)return 0;if(W=3,B=!0,M=42===k.kind?0:y_(e)?2:3,!y_(e))return 1;const t=27===k.kind?k.parent.parent:k.parent;let r=h_(t)?Kv(t):0;if(80===k.kind&&!he(k))switch(k.getText()){case"private":r|=2;break;case"static":r|=256;break;case"override":r|=16}RD(t)&&(r|=256);if(!(2&r)){const t=R(y_(e)&&16&r?ln(Ch(e)):Dh(e),t=>{const n=_.getTypeAtLocation(t);return 256&r?(null==n?void 0:n.symbol)&&_.getPropertiesOfType(_.getTypeOfSymbolAtLocation(n.symbol,e)):n&&_.getPropertiesOfType(n)});K=Y(K,function(e,t,n){const r=new Set;for(const e of t){if(173!==e.kind&&175!==e.kind&&178!==e.kind&&179!==e.kind)continue;if(he(e))continue;if(Ov(e,2))continue;if(jv(e)!==!!(256&n))continue;const t=Kh(e.name);t&&r.add(t)}return e.filter(e=>!(r.has(e.escapedName)||!e.declarations||2&dx(e)||e.valueDeclaration&&t_(e.valueDeclaration)))}(t,e.members,r)),g(K,(e,t)=>{const n=null==e?void 0:e.valueDeclaration;if(n&&h_(n)&&n.name&&FD(n.name)){const n={kind:512,symbolName:_.symbolToString(e)};H[t]=n}})}return 1}()||function(){const e=function(e){if(e){const t=e.parent;switch(e.kind){case 32:case 31:case 44:case 80:case 212:case 293:case 292:case 294:if(t&&(286===t.kind||287===t.kind)){if(32===e.kind){const r=hQ(e.pos,n,void 0);if(!t.typeArguments||r&&44===r.kind)break}return t}if(292===t.kind)return t.parent.parent;break;case 11:if(t&&(292===t.kind||294===t.kind))return t.parent.parent;break;case 20:if(t&&295===t.kind&&t.parent&&292===t.parent.kind)return t.parent.parent.parent;if(t&&294===t.kind)return t.parent.parent}}return}(k),t=e&&_.getContextualType(e.attributes);if(!t)return 0;const r=e&&_.getContextualType(e.attributes,4);return K=Y(K,function(e,t){const n=new Set,r=new Set;for(const e of t)he(e)||(292===e.kind?n.add(lC(e.name)):iP(e)&&fe(e,r));const i=e.filter(e=>!n.has(e.escapedName));return ge(r,i),i}(Wse(t,r,e.attributes,_),e.attributes.properties)),me(),W=3,B=!1,1}()||(function(){M=function(e){if(e){let t;const n=yc(e.parent,e=>y_(e)?"quit":!(!d_(e)||t!==e.body)||(t=e,!1));return n&&n}}(k)?5:1,W=1,({isNewIdentifierLocation:B,defaultCommitCharacters:N}=_e()),S!==k&&gn.assert(!!S,"Expected 'contextToken' to be defined when different from 'previousToken'.");const e=S!==k?S.getStart():i,t=function(e,t,n){let r=e;for(;r&&!KX(r,t,n);)r=r.parent;return r}(k,e,n)||n;v=function(e){switch(e.kind){case 308:case 229:case 295:case 242:return!0;default:return bu(e)}}(t);const r=2887656|(Z?0:111551),a=S&&!DT(S);K=Y(K,_.getSymbolsInScope(t,r)),gn.assertEachIsDefined(K,"getSymbolsInScope() should all be defined");for(let e=0;ee.getSourceFile()===n)||(G[fJ(t)]=Jae.GlobalsOrKeywords),a&&!(111551&t.flags)){const n=t.declarations&&T(t.declarations,$l);if(n){const t={kind:64,declaration:n};H[e]=t}}}if(o.includeCompletionsWithInsertText&&308!==t.kind){const e=_.tryGetThisTypeAt(t,!1,y_(t.parent)?t:void 0);if(e&&!function(e,t,n){const r=n.resolveName("self",void 0,111551,!1);if(r&&n.getTypeOfSymbolAtLocation(r,t)===e)return!0;const i=n.resolveName("global",void 0,111551,!1);if(i&&n.getTypeOfSymbolAtLocation(i,t)===e)return!0;const o=n.resolveName("globalThis",void 0,111551,!1);if(o&&n.getTypeOfSymbolAtLocation(o,t)===e)return!0;return!1}(e,n,_))for(const t of Kse(e,_))H[K.length]={kind:1},K.push(t),G[fJ(t)]=Jae.SuggestedClassMembers}le(),Z&&(M=k&&Y_(k.parent)?6:7)}(),1);return 1===t}function le(){var t,r;if(!function(){var t;return!!w||!!o.includeCompletionsForModuleExports&&(!(!n.externalModuleIndicator&&!n.commonJsModuleIndicator)||!!dY(e.getCompilerOptions())||(null==(t=e.getSymlinkCache)?void 0:t.call(e).hasAnySymlinks())||!!e.getCompilerOptions().paths||_Y(e))}())return;if(gn.assert(!(null==a?void 0:a.data),"Should not run 'collectAutoImports' when faster path is available via `data`"),a&&!a.source)return;J|=1;const c=S===k&&w?"":S&&fD(S)?S.text.toLowerCase():"",_=null==(t=s.getModuleSpecifierCache)?void 0:t.call(s),u=I0(n,s,e,o,l),d=null==(r=s.getPackageJsonAutoImportProvider)?void 0:r.call(s),p=a?void 0:XZ(n,o,s);function f(t){return w0(t.isFromPackageJson?d:e,n,at(t.moduleSymbol.valueDeclaration,mP),t.moduleSymbol,o,p,te(t.isFromPackageJson),_)}Qae("collectAutoImports",s,V||(V=$7.createImportSpecifierResolver(n,e,s,o)),e,i,o,!!w,DT(j),e=>{u.search(n.path,A,(e,t)=>{if(!Ss(e,wS(s.getCompilationSettings())))return!1;if(!a&&Mh(e))return!1;if(!(Z||w||111551&t))return!1;if(Z&&!(790504&t))return!1;const n=e.charCodeAt(0);return(!A||!(n<65||n>90))&&(!!a||ace(e,c))},(t,n,r,i)=>{if(a&&!X(t,e=>a.source===jy(e.moduleSymbol.name)))return;if(!(t=P(t,f)).length)return;const o=e.tryResolve(t,r)||{};if("failed"===o)return;let s,c=t[0];"skipped"!==o&&({exportInfo:c=t[0],moduleSpecifier:s}=o);const l=1===c.exportKind;!function(e,t){const n=fJ(e);if(G[n]===Jae.GlobalsOrKeywords)return;H[K.length]=t,G[n]=w?Jae.LocationPriority:Jae.AutoImportSuggestions,K.push(e)}(l&&Nb(gn.checkDefined(c.symbol))||gn.checkDefined(c.symbol),{kind:s?32:4,moduleSpecifier:s,symbolName:n,exportMapKey:i,exportName:2===c.exportKind?"export=":gn.checkDefined(c.symbol).name,fileName:c.moduleFileName,isDefaultExport:l,moduleSymbol:c.moduleSymbol,isFromPackageJson:c.isFromPackageJson})}),$=e.skippedAny(),J|=e.resolvedAny()?8:0,J|=e.resolvedBeyondLimit()?16:0})}function _e(){if(k){const e=k.parent.kind,t=Vse(k);switch(t){case 28:switch(e){case 214:case 215:{const e=k.parent.expression;return Ha(n,e.end).line!==Ha(n,i).line?{defaultCommitCharacters:qae,isNewIdentifierLocation:!0}:{defaultCommitCharacters:zae,isNewIdentifierLocation:!0}}case 227:return{defaultCommitCharacters:qae,isNewIdentifierLocation:!0};case 177:case 185:case 211:return{defaultCommitCharacters:[],isNewIdentifierLocation:!0};case 210:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!0};default:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}case 21:switch(e){case 214:case 215:{const e=k.parent.expression;return Ha(n,e.end).line!==Ha(n,i).line?{defaultCommitCharacters:qae,isNewIdentifierLocation:!0}:{defaultCommitCharacters:zae,isNewIdentifierLocation:!0}}case 218:return{defaultCommitCharacters:qae,isNewIdentifierLocation:!0};case 177:case 197:return{defaultCommitCharacters:[],isNewIdentifierLocation:!0};default:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}case 23:switch(e){case 210:case 182:case 190:case 168:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!0};default:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}case 144:case 145:case 102:return{defaultCommitCharacters:[],isNewIdentifierLocation:!0};case 25:return 268===e?{defaultCommitCharacters:[],isNewIdentifierLocation:!0}:{defaultCommitCharacters:zae,isNewIdentifierLocation:!1};case 19:switch(e){case 264:case 211:return{defaultCommitCharacters:[],isNewIdentifierLocation:!0};default:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}case 64:switch(e){case 261:case 227:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!0};default:return{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}case 16:return{defaultCommitCharacters:zae,isNewIdentifierLocation:229===e};case 17:return{defaultCommitCharacters:zae,isNewIdentifierLocation:240===e};case 134:return 175===e||305===e?{defaultCommitCharacters:[],isNewIdentifierLocation:!0}:{defaultCommitCharacters:zae,isNewIdentifierLocation:!1};case 42:return 175===e?{defaultCommitCharacters:[],isNewIdentifierLocation:!0}:{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}if(qse(t))return{defaultCommitCharacters:[],isNewIdentifierLocation:!0}}return{defaultCommitCharacters:zae,isNewIdentifierLocation:!1}}function ue(e){return!!e.parent&&AD(e.parent)&&BD(e.parent.parent)&&(i_(e.kind)||gh(e))}function de(e,t){return 64!==e.kind&&(27===e.kind||!ex(e.end,t,n))}function pe(e){return m_(e)&&177!==e}function fe(e,t){const n=e.expression,r=_.getSymbolAtLocation(n),i=r&&_.getTypeOfSymbolAtLocation(r,n),o=i&&i.properties;o&&o.forEach(e=>{t.add(e.name)})}function me(){K.forEach(e=>{if(16777216&e.flags){const t=fJ(e);G[t]=G[t]??Jae.OptionalMember}})}function ge(e,t){if(0!==e.size)for(const n of t)e.has(n.name)&&(G[fJ(n)]=Jae.MemberDeclaredBySpreadAssignment)}function he(e){return e.getStart(n)<=i&&i<=e.getEnd()}}function Ose(e,t){const n=hQ(e,t);if(n&&e<=n.end&&(vl(n)||Ah(n.kind))){return{contextToken:hQ(n.getFullStart(),t,void 0),previousToken:n}}return{contextToken:n,previousToken:n}}function Lse(e,t,n,r){const i=t.isPackageJsonImport?r.getPackageJsonAutoImportProvider():n,o=i.getTypeChecker(),a=t.ambientModuleName?o.tryFindAmbientModule(t.ambientModuleName):t.fileName?o.getMergedSymbol(gn.checkDefined(i.getSourceFile(t.fileName)).symbol):void 0;if(!a)return;let s="export="===t.exportName?o.resolveExternalModuleSymbol(a):o.tryGetMemberInModuleExportsAndProperties(t.exportName,a);if(!s)return;return s="default"===t.exportName&&Nb(s)||s,{symbol:s,origin:bse(t,e,a)}}function jse(e,t,n,r,i){if(function(e){return!!(e&&256&e.kind)}(n))return;const o=function(e){return Wae(e)||$ae(e)||Xae(e)}(n)?n.symbolName:e.name;if(void 0===o||1536&e.flags&&Hm(o.charCodeAt(0))||Yh(e))return;const a={name:o,needsConvertPropertyAccess:!1};if(Ss(o,t,i?1:0)||e.valueDeclaration&&t_(e.valueDeclaration))return a;if(2097152&e.flags)return{name:o,needsConvertPropertyAccess:!0};switch(r){case 3:return Xae(n)?{name:n.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(o),needsConvertPropertyAccess:!1};case 2:case 1:return 32===o.charCodeAt(0)?void 0:{name:o,needsConvertPropertyAccess:!0};case 5:case 4:return a;default:gn.assertNever(r)}}var Mse=[],Rse=ht(()=>{const e=[];for(let t=83;t<=166;t++)e.push({name:ja(t),kind:"keyword",kindModifiers:"",sortText:Jae.GlobalsOrKeywords});return e});function Bse(e,t){if(!t)return Jse(e);const n=e+8+1;return Mse[n]||(Mse[n]=Jse(e).filter(e=>!function(e){switch(e){case 128:case 133:case 163:case 136:case 138:case 94:case 162:case 119:case 140:case 120:case 142:case 143:case 144:case 145:case 146:case 150:case 151:case 164:case 123:case 124:case 125:case 148:case 154:case 155:case 156:case 158:case 159:return!0;default:return!1}}(Ma(e.name))))}function Jse(e){return Mse[e]||(Mse[e]=Rse().filter(t=>{const n=Ma(t.name);switch(e){case 0:return!1;case 1:return Use(n)||138===n||144===n||156===n||145===n||128===n||nY(n)&&157!==n;case 5:return Use(n);case 2:return qse(n);case 3:return zse(n);case 4:return i_(n);case 6:return nY(n)||87===n;case 7:return nY(n);case 8:return 156===n;default:return gn.assertNever(e)}}))}function zse(e){return 148===e}function qse(e){switch(e){case 128:case 129:case 137:case 139:case 153:case 134:case 138:case 164:return!0;default:return o_(e)}}function Use(e){return 134===e||135===e||160===e||130===e||152===e||156===e||!Lh(e)&&!qse(e)}function Vse(e){return fD(e)?Tc(e)??0:e.kind}function Wse(e,t,n,r){const i=t&&t!==e,o=r.getUnionType(P(1048576&e.flags?e.types:[e],e=>!r.getPromisedTypeOfPromise(e))),a=!i||3&t.flags?o:r.getUnionType([o,t]),s=function(e,t,n){return e.isUnion()?n.getAllPossiblePropertiesOfTypes(P(e.types,e=>!(402784252&e.flags||n.isArrayLikeType(e)||n.isTypeInvalidDueToUnionDiscriminant(e,t)||n.typeHasCallOrConstructSignatures(e)||e.isClass()&&$se(e.getApparentProperties())))):e.getApparentProperties()}(a,n,r);return a.isClass()&&$se(s)?[]:i?P(s,function(e){return!m(e.declarations)||X(e.declarations,e=>e.parent!==n)}):s}function $se(e){return X(e,e=>!!(6&dx(e)))}function Kse(e,t){return e.isUnion()?gn.checkEachDefined(t.getAllPossiblePropertiesOfTypes(e.types),"getAllPossiblePropertiesOfTypes() should all be defined"):gn.checkEachDefined(e.getApparentProperties(),"getApparentProperties() should all be defined")}function Hse(e,t){if(!e)return;if(N_(e)&&Ju(e.parent))return t.getTypeArgumentConstraint(e);const n=Hse(e.parent,t);if(n)switch(e.kind){case 172:return t.getTypeOfPropertyOfContextualType(n,e.symbol.escapedName);case 194:case 188:case 193:return n}}function Gse(e){return e.parent&&C_(e.parent)&&Ex(e.parent.parent)}function Xse({left:e}){return Od(e)}function Qse(e,t){var n,r,i;let o,a=!1;const s=function(){const n=e.parent;if(DF(n)){const r=n.getLastToken(t);return fD(e)&&r!==e?(o=161,void(a=!0)):(o=156===e.kind?void 0:156,nce(n.moduleReference)?n:void 0)}if(ece(n,e)&&tce(n.parent))return n;if(RF(n)||jF(n)){if(n.parent.isTypeOnly||19!==e.kind&&102!==e.kind&&28!==e.kind||(o=156),tce(n)){if(20!==e.kind&&80!==e.kind)return n.parent.parent;a=!0,o=161}return}if(zF(n)&&42===e.kind||qF(n)&&20===e.kind)return a=!0,void(o=161);if(ND(e)&&mP(n))return o=156,e;if(ND(e)&&EF(n))return o=156,nce(n.moduleSpecifier)?n:void 0;return}();return{isKeywordOnlyCompletion:a,keywordCompletion:o,isNewIdentifierLocation:!(!s&&156!==o),isTopLevelTypeOnly:!!(null==(r=null==(n=at(s,EF))?void 0:n.importClause)?void 0:r.isTypeOnly)||!!(null==(i=at(s,DF))?void 0:i.isTypeOnly),couldBeTypeOnlyImportSpecifier:!!s&&ece(s,e),replacementSpan:Yse(s)}}function Yse(e){var t;if(!e)return;const n=yc(e,an(EF,DF,iA))??e,r=n.getSourceFile();if($b(n,r))return HQ(n,r);gn.assert(102!==n.kind&&277!==n.kind);const i=273===n.kind||352===n.kind?Zse(null==(t=n.importClause)?void 0:t.namedBindings)??n.moduleSpecifier:n.moduleReference,o={pos:n.getFirstToken().getStart(),end:i.pos};return $b(o,r)?QQ(o):void 0}function Zse(e){var t;return T(null==(t=at(e,RF))?void 0:t.elements,t=>{var n;return!t.propertyName&&Mh(t.name.text)&&28!==(null==(n=hQ(t.name.pos,e.getSourceFile(),e))?void 0:n.kind)})}function ece(e,t){return BF(e)&&(e.isTypeOnly||t===e.name&&iY(t))}function tce(e){if(!nce(e.parent.parent.moduleSpecifier)||e.parent.name)return!1;if(RF(e)){const t=Zse(e);return(t?e.elements.indexOf(t):e.elements.length)<2}return!0}function nce(e){var t;return!!Od(e)||!(null==(t=at(HF(e)?e.expression:e,Uu))?void 0:t.text)}function rce(e){return e.parent&&DE(e.parent)&&(e.parent.body===e||39===e.kind)}function ice(e,t,n=new Set){return r(e)||r(px(e.exportSymbol||e,t));function r(e){return!!(788968&e.flags)||t.isUnknownSymbol(e)||!!(1536&e.flags)&&Dx(n,e)&&t.getExportsOfModule(e).some(e=>ice(e,t,n))}}function oce(e,t){const n=px(e,t).declarations;return!!m(n)&&k(n,d0)}function ace(e,t){if(0===t.length)return!0;let n,r=!1,i=0;const o=e.length;for(let a=0;apce,getStringLiteralCompletions:()=>dce});var _ce={directory:0,script:1,"external module name":2};function uce(){const e=new Map;return{add:function(t){const n=e.get(t.name);(!n||_ce[n.kind]<_ce[t.kind])&&e.set(t.name,t)},has:e.has.bind(e),values:e.values.bind(e)}}function dce(e,t,n,r,i,o,a,s,c){if(VQ(e,t)){const n=function(e,t,n,r,i){const o=n.getCompilerOptions(),a=dQ(e,t),s=hs(e.text,a.pos),c=s&&T(s,e=>t>=e.pos&&t<=e.end);if(!c)return;const l=e.text.slice(c.pos,t),_=jce.exec(l);if(!_)return;const[,u,d,p]=_,f=Lo(e.path),m="path"===d?wce(p,f,Tce(o,0,e),n,r,i,!0,e.path):"types"===d?Lce(n,r,i,f,Pce(p),Tce(o,1,e)):gn.fail();return Sce(p,c.pos+u.length,Be(m.values()))}(e,t,o,i,pY(o,i));return n&&fce(n)}if(xQ(e,t,n)){if(!n||!Uu(n))return;return function(e,t,n,r,i,o,a,s,c,l){if(void 0===e)return;const _=GQ(t,c);switch(e.kind){case 0:return fce(e.paths);case 1:{const u=[];return Tse(e.symbols,u,t,t,n,c,n,r,i,99,o,4,s,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,l),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:e.hasIndexSignature,optionalReplacementSpan:_,entries:u,defaultCommitCharacters:Yae(e.hasIndexSignature)}}case 2:{const n=15===t.kind?96:en(rp(t),"'")?39:34,r=e.types.map(e=>({name:Dy(e.value,n),kindModifiers:"",kind:"string",sortText:Jae.LocationPriority,replacementSpan:KQ(t,c),commitCharacters:[]}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:e.isNewIdentifier,optionalReplacementSpan:_,entries:r,defaultCommitCharacters:Yae(e.isNewIdentifier)}}default:return gn.assertNever(e)}}(gce(e,n,t,o,i,s),n,e,i,o,a,r,s,t,c)}}function pce(e,t,n,r,i,o,a,s){if(!r||!Uu(r))return;const c=gce(t,r,n,i,o,s);return c&&function(e,t,n,r,i,o){switch(n.kind){case 0:{const t=T(n.paths,t=>t.name===e);return t&&Ese(e,mce(t.extension),t.kind,[QY(e)])}case 1:{const a=T(n.symbols,t=>t.name===e);return a&&Dse(a,a.name,i,r,t,o)}case 2:return T(n.types,t=>t.value===e)?Ese(e,"","string",[QY(e)]):void 0;default:return gn.assertNever(n)}}(e,r,c,t,i.getTypeChecker(),a)}function fce(e){const t=!0;return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:t,entries:e.map(({name:e,kind:t,span:n,extension:r})=>({name:e,kind:t,kindModifiers:mce(r),sortText:Jae.LocationPriority,replacementSpan:n})),defaultCommitCharacters:Yae(t)}}function mce(e){switch(e){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".d.mts":return".d.mts";case".mjs":return".mjs";case".mts":return".mts";case".d.cts":return".d.cts";case".cjs":return".cjs";case".cts":return".cts";case".tsbuildinfo":return gn.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return gn.assertNever(e)}}function gce(e,t,n,r,i,o){const a=r.getTypeChecker(),s=hce(t.parent);switch(s.kind){case 202:{const c=hce(s.parent);return 206===c.kind?{kind:0,paths:kce(e,t,r,i,o)}:function e(t){switch(t.kind){case 234:case 184:{const e=yc(s,e=>e.parent===t);return e?{kind:2,types:vce(a.getTypeArgumentConstraint(e)),isNewIdentifier:!1}:void 0}case 200:const{indexType:i,objectType:o}=t;if(!zX(i,n))return;return yce(a.getTypeFromTypeNode(o));case 193:{const n=e(hce(t.parent));if(!n)return;const i=(r=s,U(t.types,e=>e!==r&&uE(e)&&QN(e.literal)?e.literal.text:void 0));return 1===n.kind?{kind:1,symbols:n.symbols.filter(e=>!D(i,e.name)),hasIndexSignature:n.hasIndexSignature}:{kind:2,types:n.types.filter(e=>!D(i,e.value)),isNewIdentifier:!1}}default:return}var r}(c)}case 304:return vE(s.parent)&&s.name===t?function(e,t){const n=e.getContextualType(t);if(!n)return;const r=e.getContextualType(t,4);return{kind:1,symbols:Wse(n,r,t,e),hasIndexSignature:FZ(n)}}(a,s.parent):c()||c(0);case 213:{const{expression:e,argumentExpression:n}=s;return t===ph(n)?yce(a.getTypeAtLocation(e)):void 0}case 214:case 215:case 292:if(!function(e){return SE(e.parent)&&ve(e.parent.arguments)===e&&fD(e.parent.expression)&&"require"===e.parent.expression.escapedText}(t)&&!hf(s)){const r=mue.getArgumentInfoForCompletions(292===s.kind?s.parent:t,n,e,a);return r&&function(e,t,n,r){let i=!1;const o=new Set,a=Nu(e)?gn.checkDefined(yc(t.parent,nP)):t,s=R(r.getCandidateSignaturesForStringLiteralCompletions(e,a),t=>{if(!bJ(t)&&n.argumentCount>t.parameters.length)return;let s=t.getTypeParameterAtPosition(n.argumentIndex);if(Nu(e)){const e=r.getTypeOfPropertyOfType(s,_C(a.name));e&&(s=e)}return i=i||!!(4&s.flags),vce(s,o)});return m(s)?{kind:2,types:s,isNewIdentifier:i}:void 0}(r.invocation,t,r,a)||c(0)}case 273:case 279:case 284:case 352:return{kind:0,paths:kce(e,t,r,i,o)};case 297:const l=v0(a,s.parent.clauses),_=c();if(!_)return;return{kind:2,types:_.types.filter(e=>!l.hasValue(e.value)),isNewIdentifier:!1};case 277:case 282:const u=s;if(u.propertyName&&t!==u.propertyName)return;const d=u.parent,{moduleSpecifier:p}=276===d.kind?d.parent.parent:d.parent;if(!p)return;const f=a.getSymbolAtLocation(p);if(!f)return;const g=a.getExportsAndPropertiesOfModule(f),h=new Set(d.elements.map(e=>ep(e.propertyName||e.name)));return{kind:1,symbols:g.filter(e=>"default"!==e.escapedName&&!h.has(e.escapedName)),hasIndexSignature:!1};case 227:if(103===s.operatorToken.kind){const e=a.getTypeAtLocation(s.right);return{kind:1,symbols:(e.isUnion()?a.getAllPossiblePropertiesOfTypes(e.types):e.getApparentProperties()).filter(e=>!e.valueDeclaration||!t_(e.valueDeclaration)),hasIndexSignature:!1}}return c(0);default:return c()||c(0)}function c(e=4){const n=vce(wZ(t,a,e));if(n.length)return{kind:2,types:n,isNewIdentifier:!1}}}function hce(e){switch(e.kind){case 197:return lh(e);case 218:return _h(e);default:return e}}function yce(e){return e&&{kind:1,symbols:P(e.getApparentProperties(),e=>!(e.valueDeclaration&&t_(e.valueDeclaration))),hasIndexSignature:FZ(e)}}function vce(e,t=new Set){return e?(e=cY(e)).isUnion()?R(e.types,e=>vce(e,t)):!e.isStringLiteral()||1024&e.flags||!Dx(t,e.value)?p:[e]:p}function bce(e,t,n){return{name:e,kind:t,extension:n}}function xce(e){return bce(e,"directory",void 0)}function Sce(e,t,n){const r=function(e,t){const n=Math.max(e.lastIndexOf(ho),e.lastIndexOf(yo)),r=-1!==n?n+1:0,i=e.length-r;return 0===i||Ss(e.substr(r,i),99)?void 0:Ys(t+r,i)}(e,t),i=0===e.length?void 0:Ys(t,e.length);return n.map(({name:e,kind:t,extension:n})=>e.includes(ho)||e.includes(yo)?{name:e,kind:t,extension:n,span:i}:{name:e,kind:t,extension:n,span:r})}function kce(e,t,n,r,i){return Sce(t.text,t.getStart(e)+1,function(e,t,n,r,i){const o=zo(t.text),a=Uu(t)?n.getModeForUsageLocation(e,t):void 0,s=e.path,c=Lo(s),l=n.getCompilerOptions(),_=n.getTypeChecker(),u=pY(n,r),d=Tce(l,1,e,_,i,a);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){const t=e.length>=3&&46===e.charCodeAt(1)?2:1,n=e.charCodeAt(t);return 47===n||92===n}return!1}(o)||!l.baseUrl&&!l.paths&&(ko(o)||So(o))?function(e,t,n,r,i,o,a){const s=n.getCompilerOptions();return s.rootDirs?function(e,t,n,r,i,o,a,s){const c=i.getCompilerOptions(),l=c.project||o.getCurrentDirectory(),_=!(o.useCaseSensitiveFileNames&&o.useCaseSensitiveFileNames()),u=function(e,t,n,r){e=e.map(e=>Yo(Ko(ko(e)?e:Uo(t,e))));const i=y(e,e=>sa(e,n,t,r)?n.substr(e.length):void 0);return ne([...e.map(e=>Uo(e,i)),n].map(e=>Qo(e)),St,Ft)}(e,l,n,_);return ne(R(u,e=>Be(wce(t,e,r,i,o,a,!0,s).values())),(e,t)=>e.name===t.name&&e.kind===t.kind&&e.extension===t.extension)}(s.rootDirs,e,t,a,n,r,i,o):Be(wce(e,t,a,n,r,i,!0,o).values())}(o,c,n,r,u,s,d):function(e,t,n,r,i,o,a){const s=r.getTypeChecker(),c=r.getCompilerOptions(),{baseUrl:l,paths:_}=c,u=uce(),d=DS(c);if(l){const t=Ko(Uo(i.getCurrentDirectory(),l));wce(e,t,a,r,i,o,!1,void 0,u)}if(_){const t=tv(c,i);Dce(u,e,t,a,r,i,o,_)}const f=Pce(e);for(const t of function(e,t,n){const r=n.getAmbientModules().map(e=>jy(e.name)).filter(t=>en(t,e)&&!t.includes("*"));if(void 0!==t){const e=Yo(t);return r.map(t=>tn(t,e))}return r}(e,f,s))u.add(bce(t,"external module name",void 0));if(Lce(r,i,o,t,f,a,u),mY(d)){let n=!1;if(void 0===f)for(const e of function(e,t){if(!e.readFile||!e.fileExists)return p;const n=[];for(const r of KZ(t,e)){const t=Ob(r,e);for(const e of Mce){const r=t[e];if(r)for(const e in r)Ie(r,e)&&!en(e,"@types/")&&n.push(e)}}return n}(i,t)){const t=bce(e,"external module name",void 0);u.has(t.name)||(n=!0,u.add(t))}if(!n){const n=IS(c),s=OS(c);let l=!1;const _=t=>{if(s&&!l){const n=Uo(t,"package.json");if(l=UZ(i,n)){m(Ob(n,i).imports,e,t,!1,!0)}}};let d=t=>{const n=Uo(t,"node_modules");VZ(i,n)&&wce(e,n,a,r,i,o,!1,void 0,u),_(t)};if(f&&n){const t=d;d=n=>{const r=Bo(e);r.shift();let o=r.shift();if(!o)return t(n);if(en(o,"@")){const e=r.shift();if(!e)return t(n);o=Uo(o,e)}if(s&&en(o,"#"))return _(n);const a=Uo(n,"node_modules",o),c=Uo(a,"package.json");if(UZ(i,c)){const t=Ob(c,i),n=r.join("/")+(r.length&&Po(e)?"/":"");return void m(t.exports,n,a,!0,!1)}return t(n)}}RR(i,t,d)}}return Be(u.values());function m(e,t,s,l,_){if("object"!=typeof e||null===e)return;const d=Le(e),p=FM(c,n);Ece(u,l,_,t,s,a,r,i,o,d,t=>{const n=Fce(e[t],p);if(void 0!==n)return ln(qt(t,"/")&&qt(n,"/")?n+"*":n)},AR)}}(o,c,a,n,r,u,d)}(e,t,n,r,i))}function Tce(e,t,n,r,i,o){return{extensionsToSearch:M(Cce(e,r)),referenceKind:t,importingSourceFile:n,endingPreference:null==i?void 0:i.importModuleSpecifierEnding,resolutionMode:o}}function Cce(e,t){const n=t?U(t.getAmbientModules(),e=>{const t=e.name.slice(1,-1);if(t.startsWith("*.")&&!t.includes("/"))return t.slice(1)}):[],r=[...Jk(e),n];return mY(DS(e))?zk(e,r):r}function wce(e,t,n,r,i,o,a,s,c=uce()){var l;void 0===e&&(e=""),Po(e=zo(e))||(e=Lo(e)),""===e&&(e="."+ho);const _=Vo(t,e=Yo(e)),u=Po(_)?_:Lo(_);if(!a){const e=HZ(u,i);if(e){const t=Ob(e,i).typesVersions;if("object"==typeof t){const a=null==(l=SM(t))?void 0:l.paths;if(a){const t=Lo(e);if(Dce(c,_.slice(Yo(t).length),t,n,r,i,o,a))return c}}}}const d=!(i.useCaseSensitiveFileNames&&i.useCaseSensitiveFileNames());if(!VZ(i,u))return c;const p=qZ(i,u,n.extensionsToSearch,void 0,["./*"]);if(p)for(let e of p){if(e=Ko(e),s&&0===aa(e,s,t,d))continue;const{name:i,extension:o}=Nce(jo(e),r,n,!1);c.add(bce(i,"script",o))}const f=zZ(i,u);if(f)for(const e of f){const t=jo(Ko(e));"@types"!==t&&c.add(xce(t))}return c}function Nce(e,t,n,r){const i=gB.tryGetRealFileNameForNonJsDeclarationFileName(e);if(i)return{name:i,extension:lT(i)};if(0===n.referenceKind)return{name:e,extension:lT(e)};let o=gB.getModuleSpecifierPreferences({importModuleSpecifierEnding:n.endingPreference},t,t.getCompilerOptions(),n.importingSourceFile).getAllowedEndingsInPreferredOrder(n.resolutionMode);if(r&&(o=o.filter(e=>0!==e&&1!==e)),3===o[0]){if(Fo(e,Rk))return{name:e,extension:lT(e)};const n=gB.tryGetJSExtensionForFile(e,t.getCompilerOptions());return n?{name:eT(e,n),extension:n}:{name:e,extension:lT(e)}}if(!r&&(0===o[0]||1===o[0])&&Fo(e,[".js",".jsx",".ts",".tsx",".d.ts"]))return{name:Qk(e),extension:lT(e)};const a=gB.tryGetJSExtensionForFile(e,t.getCompilerOptions());return a?{name:eT(e,a),extension:a}:{name:e,extension:lT(e)}}function Dce(e,t,n,r,i,o,a,s){return Ece(e,!1,!1,t,n,r,i,o,a,Le(s),e=>s[e],(e,t)=>{const n=tT(e),r=tT(t),i="object"==typeof n?n.prefix.length:e.length;return Tt("object"==typeof r?r.prefix.length:t.length,i)})}function Ece(e,t,n,r,i,o,a,s,c,l,_,u){let d,p=[];for(const e of l){if("."===e)continue;const l=e.replace(/^\.\//,"")+((t||n)&&qt(e,"/")?"*":""),f=_(e);if(f){const e=tT(l);if(!e)continue;const _="object"==typeof e&&rn(e,r);_&&(void 0===d||-1===u(l,d))&&(d=l,p=p.filter(e=>!e.matchedPattern)),"string"!=typeof e&&void 0!==d&&1===u(l,d)||p.push({matchedPattern:_,results:Ace(l,f,r,i,o,t,n,a,s,c).map(({name:e,kind:t,extension:n})=>bce(e,t,n))})}}return p.forEach(t=>t.results.forEach(t=>e.add(t))),void 0!==d}function Fce(e,t){if("string"==typeof e)return e;if(e&&"object"==typeof e&&!nt(e))for(const n in e)if("default"===n||t.includes(n)||LR(t,n)){return Fce(e[n],t)}}function Pce(e){return Rce(e)?Po(e)?e:Lo(e):void 0}function Ace(e,t,n,r,i,o,a,s,c,l){const _=tT(e);if(!_)return p;if("string"==typeof _)return d(e,"script");const u=nn(n,_.prefix);if(void 0===u){return qt(e,"/*")?d(_.prefix,"directory"):R(t,e=>{var t;return null==(t=Ice("",r,e,i,o,a,s,c,l))?void 0:t.map(({name:e,...t})=>({name:_.prefix+e+_.suffix,...t}))})}return R(t,e=>Ice(u,r,e,i,o,a,s,c,l));function d(e,t){return en(e,n)?[{name:Qo(e),kind:t,extension:void 0}]:p}}function Ice(e,t,n,r,i,o,a,s,c){if(!s.readDirectory)return;const l=tT(n);if(void 0===l||it(l))return;const _=Vo(l.prefix),u=Po(l.prefix)?_:Lo(_),d=Po(l.prefix)?"":jo(_),p=Rce(e),f=p?Po(e)?e:Lo(e):void 0,m=()=>c.getCommonSourceDirectory(),g=!Uy(c),h=a.getCompilerOptions().outDir,v=a.getCompilerOptions().declarationDir,b=p?Uo(u,d+f):u,x=Ko(Uo(t,b)),S=o&&h&&ev(x,g,h,m),k=o&&v&&ev(x,g,v,m),T=Ko(l.suffix),C=T&&Yy("_"+T),w=T?Zy("_"+T):void 0,N=[C&&eT(T,C),...w?w.map(e=>eT(T,e)):[],T].filter(it),D=T?N.map(e=>"**/*"+e):["./*"],E=(i||o)&&qt(n,"/*");let F=P(x);return S&&(F=Y(F,P(S))),k&&(F=Y(F,P(k))),T||(F=Y(F,A(x)),S&&(F=Y(F,A(S))),k&&(F=Y(F,A(k)))),F;function P(e){const t=p?e:Yo(e)+d;return U(qZ(s,e,r.extensionsToSearch,void 0,D),e=>{const n=(i=e,o=t,y(N,e=>{const t=(n=Ko(i),a=e,en(n,r=o)&&qt(n,a)?n.slice(r.length,n.length-a.length):void 0);var n,r,a;return void 0===t?void 0:Oce(t)}));var i,o;if(n){if(Rce(n))return xce(Bo(Oce(n))[1]);const{name:e,extension:t}=Nce(n,a,r,E);return bce(e,"script",t)}})}function A(e){return U(zZ(s,e),e=>"node_modules"===e?void 0:xce(e))}}function Oce(e){return e[0]===ho?e.slice(1):e}function Lce(e,t,n,r,i,o,a=uce()){const s=e.getCompilerOptions(),c=new Map,l=WZ(()=>kM(s,t))||p;for(const e of l)_(e);for(const e of KZ(r,t)){_(Uo(Lo(e),"node_modules/@types"))}return a;function _(r){if(VZ(t,r))for(const l of zZ(t,r)){const _=KR(l);if(!s.types||D(s.types,_))if(void 0===i)c.has(_)||(a.add(bce(_,"external module name",void 0)),c.set(_,!0));else{const s=Uo(r,l),c=sk(i,_,Vy(t));void 0!==c&&wce(c,s,o,e,t,n,!1,void 0,a)}}}}var jce=/^(\/\/\/\s*{const i=t.getSymbolAtLocation(n);if(i){const t=fJ(i).toString();let n=r.get(t);n||r.set(t,n=[]),n.push(e)}});return r}(e,n,r);return(o,a,s)=>{const{directImports:c,indirectUsers:l}=function(e,t,n,{exportingModuleSymbol:r,exportKind:i},o,a){const s=oY(),c=oY(),l=[],_=!!r.globalExports,u=_?void 0:[];return p(r),{directImports:l,indirectUsers:d()};function d(){if(_)return e;if(r.declarations)for(const e of r.declarations)xp(e)&&t.has(e.getSourceFile().fileName)&&h(e);return u.map(wd)}function p(e){const t=y(e);if(t)for(const e of t)if(s(e))switch(a&&a.throwIfCancellationRequested(),e.kind){case 214:if(hf(e)){f(e);break}if(!_){const t=e.parent;if(2===i&&261===t.kind){const{name:e}=t;if(80===e.kind){l.push(e);break}}}break;case 80:break;case 272:g(e,e.name,Lv(e,32),!1);break;case 273:case 352:l.push(e);const t=e.importClause&&e.importClause.namedBindings;t&&275===t.kind?g(e,t.name,!1,!0):!_&&Pg(e)&&h(Xce(e));break;case 279:e.exportClause?281===e.exportClause.kind?h(Xce(e),!0):l.push(e):p(Gce(e,o));break;case 206:!_&&e.isTypeOf&&!e.qualifier&&m(e)&&h(e.getSourceFile(),!0),l.push(e);break;default:gn.failBadSyntaxKind(e,"Unexpected import kind.")}}function f(e){h(yc(e,Qce)||e.getSourceFile(),!!m(e,!0))}function m(e,t=!1){return yc(e,e=>t&&Qce(e)?"quit":II(e)&&X(e.modifiers,gD))}function g(e,t,n,r){if(2===i)r||l.push(e);else if(!_){const r=Xce(e);gn.assert(308===r.kind||268===r.kind),n||function(e,t,n){const r=n.getSymbolAtLocation(t);return!!Wce(e,e=>{if(!zF(e))return;const{exportClause:t,moduleSpecifier:i}=e;return!i&&t&&qF(t)&&t.elements.some(e=>n.getExportSpecifierLocalTargetSymbol(e)===r)})}(r,t,o)?h(r,!0):h(r)}}function h(e,t=!1){gn.assert(!_);if(!c(e))return;if(u.push(e),!t)return;const n=o.getMergedSymbol(e.symbol);if(!n)return;gn.assert(!!(1536&n.flags));const r=y(n);if(r)for(const e of r)dE(e)||h(Xce(e),!0)}function y(e){return n.get(fJ(e).toString())}}(e,t,i,a,n,r);return{indirectUsers:l,...Uce(c,o,a.exportKind,n,s)}}}a(Bce,{Core:()=>ale,DefinitionKind:()=>Zce,EntryKind:()=>ele,ExportKind:()=>zce,FindReferencesUse:()=>sle,ImportExport:()=>qce,createImportTracker:()=>Jce,findModuleReferences:()=>Vce,findReferenceOrRenameEntries:()=>ule,findReferencedSymbols:()=>cle,getContextNode:()=>ile,getExportInfo:()=>Hce,getImplementationsAtPosition:()=>lle,getImportOrExportSymbol:()=>Kce,getReferenceEntriesForNode:()=>dle,isContextWithStartAndEndNode:()=>nle,isDeclarationOfSymbol:()=>Cle,isWriteAccessForReference:()=>Tle,toContextSpan:()=>ole,toHighlightSpan:()=>xle,toReferenceEntry:()=>hle,toRenameLocation:()=>gle});var zce=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e))(zce||{}),qce=(e=>(e[e.Import=0]="Import",e[e.Export=1]="Export",e))(qce||{});function Uce(e,t,n,r,i){const o=[],a=[];function s(e,t){o.push([e,t])}if(e)for(const t of e)c(t);return{importSearches:o,singleReferences:a};function c(e){if(272===e.kind)return void(Yce(e)&&l(e.name));if(80===e.kind)return void l(e);if(206===e.kind){if(e.qualifier){const n=mb(e.qualifier);n.escapedText===Cc(t)&&a.push(n)}else 2===n&&a.push(e.argument.literal);return}if(11!==e.moduleSpecifier.kind)return;if(279===e.kind)return void(e.exportClause&&qF(e.exportClause)&&_(e.exportClause));const{name:o,namedBindings:c}=e.importClause||{name:void 0,namedBindings:void 0};if(c)switch(c.kind){case 275:l(c.name);break;case 276:0!==n&&1!==n||_(c);break;default:gn.assertNever(c)}if(o&&(1===n||2===n)&&(!i||o.escapedText===kY(t))){s(o,r.getSymbolAtLocation(o))}}function l(e){2!==n||i&&!u(e.escapedText)||s(e,r.getSymbolAtLocation(e))}function _(e){if(e)for(const n of e.elements){const{name:e,propertyName:o}=n;if(u(ep(o||e)))if(o)a.push(o),i&&ep(e)!==t.escapedName||s(e,r.getSymbolAtLocation(e));else{s(e,282===n.kind&&n.propertyName?r.getExportSpecifierLocalTargetSymbol(n):r.getSymbolAtLocation(e))}}}function u(e){return e===t.escapedName||0!==n&&"default"===e}}function Vce(e,t,n){var r;const i=[],o=e.getTypeChecker();for(const a of t){const t=n.valueDeclaration;if(308===(null==t?void 0:t.kind)){for(const n of a.referencedFiles)e.getSourceFileFromReference(a,n)===t&&i.push({kind:"reference",referencingFile:a,ref:n});for(const n of a.typeReferenceDirectives){const o=null==(r=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(n,a))?void 0:r.resolvedTypeReferenceDirective;void 0!==o&&o.resolvedFileName===t.fileName&&i.push({kind:"reference",referencingFile:a,ref:n})}}$ce(a,(e,t)=>{o.getSymbolAtLocation(t)===n&&i.push(sy(e)?{kind:"implicit",literal:t,referencingFile:a}:{kind:"import",literal:t})})}return i}function Wce(e,t){return g(308===e.kind?e.statements:e.body.statements,e=>t(e)||Qce(e)&&g(e.body&&e.body.statements,t))}function $ce(e,t){if(e.externalModuleIndicator||void 0!==e.imports)for(const n of e.imports)t(wg(n),n);else Wce(e,e=>{switch(e.kind){case 279:case 273:{const n=e;n.moduleSpecifier&&QN(n.moduleSpecifier)&&t(n,n.moduleSpecifier);break}case 272:{const n=e;Yce(n)&&t(n,n.moduleReference.expression);break}}})}function Kce(e,t,n,r){return r?i():i()||function(){if(!function(e){const{parent:t}=e;switch(t.kind){case 272:return t.name===e&&Yce(t);case 277:return!t.propertyName;case 274:case 275:return gn.assert(t.name===e),!0;case 209:return Mm(e)&&Vm(t.parent.parent);default:return!1}}(e))return;let r=n.getImmediateAliasedSymbol(t);if(!r)return;if(r=function(e,t){if(e.declarations)for(const n of e.declarations){if(UF(n)&&!n.propertyName&&!n.parent.parent.moduleSpecifier)return t.getExportSpecifierLocalTargetSymbol(n)||e;if(bE(n)&&sg(n.expression)&&!mD(n.name))return t.getSymbolAtLocation(n);if(dP(n)&&LE(n.parent.parent)&&2===cg(n.parent.parent))return t.getExportSpecifierLocalTargetSymbol(n.name)}return e}(r,n),"export="===r.escapedName&&(r=function(e,t){var n,r;if(2097152&e.flags)return t.getImmediateAliasedSymbol(e);const i=gn.checkDefined(e.valueDeclaration);if(JF(i))return null==(n=at(i.expression,pu))?void 0:n.symbol;if(LE(i))return null==(r=at(i.right,pu))?void 0:r.symbol;if(mP(i))return i.symbol;return}(r,n),void 0===r))return;const i=kY(r);if(void 0===i||"default"===i||i===t.escapedName)return{kind:0,symbol:r}}();function i(){var i;const{parent:s}=e,c=s.parent;if(t.exportSymbol)return 212===s.kind?(null==(i=t.declarations)?void 0:i.some(e=>e===s))&&LE(c)?_(c,!1):void 0:o(t.exportSymbol,a(s));{const i=function(e,t){const n=hF(e)?e:hE(e)?lc(e):void 0;return n?e.name!==t||_P(n.parent)?void 0:ZE(n.parent.parent)?n.parent.parent:void 0:e}(s,e);if(i&&Lv(i,32)){if(DF(i)&&i.moduleReference===e){if(r)return;return{kind:0,symbol:n.getSymbolAtLocation(i.name)}}return o(t,a(i))}if(MF(s))return o(t,0);if(JF(s))return l(s);if(JF(c))return l(c);if(LE(s))return _(s,!0);if(LE(c))return _(c,!0);if(YP(s)||MP(s))return o(t,0)}function l(e){if(!e.symbol.parent)return;const n=e.isExportEquals?2:1;return{kind:1,symbol:t,exportInfo:{exportingModuleSymbol:e.symbol.parent,exportKind:n}}}function _(e,r){let i;switch(cg(e)){case 1:i=0;break;case 2:i=2;break;default:return}const a=r?n.getSymbolAtLocation(Ax(st(e.left,Px))):t;return a&&o(a,i)}}function o(e,t){const r=Hce(e,t,n);return r&&{kind:1,symbol:e,exportInfo:r}}function a(e){return Lv(e,2048)?1:0}}function Hce(e,t,n){const r=e.parent;if(!r)return;const i=n.getMergedSymbol(r);return id(i)?{exportingModuleSymbol:i,exportKind:t}:void 0}function Gce(e,t){return t.getMergedSymbol(Xce(e).symbol)}function Xce(e){if(214===e.kind||352===e.kind)return e.getSourceFile();const{parent:t}=e;return 308===t.kind?t:(gn.assert(269===t.kind),st(t.parent,Qce))}function Qce(e){return 268===e.kind&&11===e.name.kind}function Yce(e){return 284===e.moduleReference.kind&&11===e.moduleReference.expression.kind}var Zce=(e=>(e[e.Symbol=0]="Symbol",e[e.Label=1]="Label",e[e.Keyword=2]="Keyword",e[e.This=3]="This",e[e.String=4]="String",e[e.TripleSlashReference=5]="TripleSlashReference",e))(Zce||{}),ele=(e=>(e[e.Span=0]="Span",e[e.Node=1]="Node",e[e.StringLiteral=2]="StringLiteral",e[e.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",e[e.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",e))(ele||{});function tle(e,t=1){return{kind:t,node:e.name||e,context:rle(e)}}function nle(e){return e&&void 0===e.kind}function rle(e){if(hu(e))return ile(e);if(e.parent){if(!hu(e.parent)&&!JF(e.parent)){if(Mm(e)){const t=LE(e.parent)?e.parent:Px(e.parent)&&LE(e.parent.parent)&&e.parent.parent.left===e.parent?e.parent.parent:void 0;if(t&&0!==cg(t))return ile(t)}if(QF(e.parent)||YF(e.parent))return e.parent.parent;if(XF(e.parent)||pF(e.parent)||Al(e.parent))return e.parent;if(Uu(e)){const t=Ng(e);if(t){const e=yc(t,e=>hu(e)||bu(e)||Au(e));return hu(e)?ile(e):e}}const t=yc(e,FD);return t?ile(t.parent):void 0}return e.parent.name===e||BD(e.parent)||JF(e.parent)||(Wl(e.parent)||hE(e.parent))&&e.parent.propertyName===e||90===e.kind&&Lv(e.parent,2080)?ile(e.parent):void 0}}function ile(e){if(e)switch(e.kind){case 261:return yF(e.parent)&&1===e.parent.declarations.length?ZE(e.parent.parent)?e.parent.parent:iu(e.parent.parent)?ile(e.parent.parent):e.parent:e;case 209:return ile(e.parent.parent);case 277:return e.parent.parent.parent;case 282:case 275:return e.parent.parent;case 274:case 281:return e.parent;case 227:return tF(e.parent)?e.parent:e;case 251:case 250:return{start:e.initializer,end:e.expression};case 304:case 305:return UQ(e.parent)?ile(yc(e.parent,e=>LE(e)||iu(e))):e;case 256:return{start:T(e.getChildren(e.getSourceFile()),e=>109===e.kind),end:e.caseBlock};default:return e}}function ole(e,t,n){if(!n)return;const r=nle(n)?Sle(n.start,t,n.end):Sle(n,t);return r.start!==e.start||r.length!==e.length?{contextSpan:r}:void 0}var ale,sle=(e=>(e[e.Other=0]="Other",e[e.References=1]="References",e[e.Rename=2]="Rename",e))(sle||{});function cle(e,t,n,r,i){const o=_Q(r,i),a={use:1},s=ale.getReferencedSymbolsForNode(i,o,e,n,t,a),c=e.getTypeChecker(),l=ale.getAdjustedNode(o,a),_=function(e){return 90===e.kind||!!hh(e)||yh(e)||137===e.kind&&BD(e.parent)}(l)?c.getSymbolAtLocation(l):void 0;return s&&s.length?U(s,({definition:e,references:n})=>e&&{definition:c.runWithCancellationToken(t,t=>function(e,t,n){const r=(()=>{switch(e.type){case 0:{const{symbol:r}=e,{displayParts:i,kind:o}=mle(r,t,n),a=i.map(e=>e.text).join(""),s=r.declarations&&ve(r.declarations);return{...fle(s?Ac(s)||s:n),name:a,kind:o,displayParts:i,context:ile(s)}}case 1:{const{node:t}=e;return{...fle(t),name:t.text,kind:"label",displayParts:[UY(t.text,17)]}}case 2:{const{node:t}=e,n=ja(t.kind);return{...fle(t),name:n,kind:"keyword",displayParts:[{text:n,kind:"keyword"}]}}case 3:{const{node:n}=e,r=t.getSymbolAtLocation(n),i=r&&Yue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,r,n.getSourceFile(),LX(n),n).displayParts||[QY("this")];return{...fle(n),name:"this",kind:"var",displayParts:i}}case 4:{const{node:t}=e;return{...fle(t),name:t.text,kind:"var",displayParts:[UY(rp(t),8)]}}case 5:return{textSpan:QQ(e.reference),sourceFile:e.file,name:e.reference.fileName,kind:"string",displayParts:[UY(`"${e.reference.fileName}"`,8)]};default:return gn.assertNever(e)}})(),{sourceFile:i,textSpan:o,name:a,kind:s,displayParts:c,context:l}=r;return{containerKind:"",containerName:"",fileName:i.fileName,kind:s,name:a,textSpan:o,displayParts:c,...ole(o,i,l)}}(e,t,o)),references:n.map(e=>function(e,t){const n=hle(e);return t?{...n,isDefinition:0!==e.kind&&Cle(e.node,t)}:n}(e,_))}):void 0}function lle(e,t,n,r,i){const o=_Q(r,i);let a;const s=_le(e,t,n,o,i);if(212===o.parent.kind||209===o.parent.kind||213===o.parent.kind||108===o.kind)a=s&&[...s];else if(s){const r=et(s),i=new Set;for(;!r.isEmpty();){const o=r.dequeue();if(!Dx(i,pJ(o.node)))continue;a=le(a,o);const s=_le(e,t,n,o.node,o.node.pos);s&&r.enqueue(...s)}}const c=e.getTypeChecker();return O(a,e=>function(e,t){const n=yle(e);if(0!==e.kind){const{node:r}=e;return{...n,...ble(r,t)}}return{...n,kind:"",displayParts:[]}}(e,c))}function _le(e,t,n,r,i){if(308===r.kind)return;const o=e.getTypeChecker();if(305===r.parent.kind){const e=[];return ale.getReferenceEntriesForShorthandPropertyAssignment(r,o,t=>e.push(tle(t))),e}if(108===r.kind||pm(r.parent)){const e=o.getSymbolAtLocation(r);return e.valueDeclaration&&[tle(e.valueDeclaration)]}return dle(i,r,e,n,t,{implementations:!0,use:1})}function ule(e,t,n,r,i,o,a){return O(ple(ale.getReferencedSymbolsForNode(i,r,e,n,t,o)),t=>a(t,r,e.getTypeChecker()))}function dle(e,t,n,r,i,o={},a=new Set(r.map(e=>e.fileName))){return ple(ale.getReferencedSymbolsForNode(e,t,n,r,i,o,a))}function ple(e){return e&&R(e,e=>e.references)}function fle(e){const t=e.getSourceFile();return{sourceFile:t,textSpan:Sle(FD(e)?e.expression:e,t)}}function mle(e,t,n){const r=ale.getIntersectingMeaningFromDeclarations(n,e),i=e.declarations&&ve(e.declarations)||n,{displayParts:o,symbolKind:a}=Yue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,i.getSourceFile(),i,i,r);return{displayParts:o,kind:a}}function gle(e,t,n,r,i){return{...yle(e),...r&&vle(e,t,n,i)}}function hle(e){const t=yle(e);if(0===e.kind)return{...t,isWriteAccess:!1};const{kind:n,node:r}=e;return{...t,isWriteAccess:Tle(r),isInString:2===n||void 0}}function yle(e){if(0===e.kind)return{textSpan:e.textSpan,fileName:e.fileName};{const t=e.node.getSourceFile(),n=Sle(e.node,t);return{textSpan:n,fileName:t.fileName,...ole(n,t,e.context)}}}function vle(e,t,n,r){if(0!==e.kind&&(fD(t)||Uu(t))){const{node:r,kind:i}=e,o=r.parent,a=t.text,s=dP(o);if(s||CY(o)&&o.name===r&&void 0===o.dotDotDotToken){const e={prefixText:a+": "},t={suffixText:": "+a};if(3===i)return e;if(4===i)return t;if(s){const n=o.parent;return vE(n)&&LE(n.parent)&&sg(n.parent.left)?e:t}return e}if(BF(o)&&!o.propertyName){return D((UF(t.parent)?n.getExportSpecifierLocalTargetSymbol(t.parent):n.getSymbolAtLocation(t)).declarations,o)?{prefixText:a+" as "}:JG}if(UF(o)&&!o.propertyName)return t===e.node||n.getSymbolAtLocation(t)===n.getSymbolAtLocation(e.node)?{prefixText:a+" as "}:{suffixText:" as "+a}}if(0!==e.kind&&GN(e.node)&&Px(e.node.parent)){const e=xY(r);return{prefixText:e,suffixText:e}}return JG}function ble(e,t){const n=t.getSymbolAtLocation(hu(e)&&e.name?e.name:e);return n?mle(n,t,e):211===e.kind?{kind:"interface",displayParts:[$Y(21),QY("object literal"),$Y(22)]}:232===e.kind?{kind:"local class",displayParts:[$Y(21),QY("anonymous local class"),$Y(22)]}:{kind:jX(e),displayParts:[]}}function xle(e){const t=yle(e);if(0===e.kind)return{fileName:t.fileName,span:{textSpan:t.textSpan,kind:"reference"}};const n=Tle(e.node),r={textSpan:t.textSpan,kind:n?"writtenReference":"reference",isInString:2===e.kind||void 0,...t.contextSpan&&{contextSpan:t.contextSpan}};return{fileName:t.fileName,span:r}}function Sle(e,t,n){let r=e.getStart(t),i=(n||e).getEnd();return Uu(e)&&i-r>2&&(gn.assert(void 0===n),r+=1,i-=1),270===(null==n?void 0:n.kind)&&(i=n.getFullStart()),Zs(r,i)}function kle(e){return 0===e.kind?e.textSpan:Sle(e.node,e.node.getSourceFile())}function Tle(e){const t=hh(e);return!!t&&function(e){if(33554432&e.flags)return!0;switch(e.kind){case 227:case 209:case 264:case 232:case 90:case 267:case 307:case 282:case 274:case 272:case 277:case 265:case 339:case 347:case 292:case 268:case 271:case 275:case 281:case 170:case 305:case 266:case 169:return!0;case 304:return!UQ(e.parent);case 263:case 219:case 177:case 175:case 178:case 179:return!!e.body;case 261:case 173:return!!e.initializer||_P(e.parent);case 174:case 172:case 349:case 342:return!1;default:return gn.failBadSyntaxKind(e)}}(t)||90===e.kind||gx(e)}function Cle(e,t){var n;if(!t)return!1;const r=hh(e)||(90===e.kind?e.parent:yh(e)||137===e.kind&&BD(e.parent)?e.parent.parent:void 0),i=r&&LE(r)?r.left:void 0;return!(!r||!(null==(n=t.declarations)?void 0:n.some(e=>e===r||e===i)))}(e=>{function t(e,t){return 1===t.use?e=cQ(e):2===t.use&&(e=lQ(e)),e}function n(e,t,n){let r;const i=t.get(e.path)||p;for(const e of i)if(zV(e)){const t=n.getSourceFileByPath(e.file),i=UV(n,e);qV(i)&&(r=le(r,{kind:0,fileName:t.fileName,textSpan:QQ(i)}))}return r}function r(e,t,n){if(e.parent&&NF(e.parent)){const e=n.getAliasedSymbol(t),r=n.getMergedSymbol(e);if(e!==r)return r}}function i(e,t,n,r,i,a){const c=1536&e.flags&&e.declarations&&T(e.declarations,mP);if(!c)return;const _=e.exports.get("export="),u=s(t,e,!!_,n,a);if(!_||!a.has(c.fileName))return u;const d=t.getTypeChecker();return o(t,u,l(e=px(_,d),void 0,n,a,d,r,i))}function o(e,...t){let n;for(const r of t)if(r&&r.length)if(n)for(const t of r){if(!t.definition||0!==t.definition.type){n.push(t);continue}const r=t.definition.symbol,i=w(n,e=>!!e.definition&&0===e.definition.type&&e.definition.symbol===r);if(-1===i){n.push(t);continue}const o=n[i];n[i]={definition:o.definition,references:o.references.concat(t.references).sort((t,n)=>{const r=a(e,t),i=a(e,n);if(r!==i)return Tt(r,i);const o=kle(t),s=kle(n);return o.start!==s.start?Tt(o.start,s.start):Tt(o.length,s.length)})}}else n=r;return n}function a(e,t){const n=0===t.kind?e.getSourceFile(t.fileName):t.node.getSourceFile();return e.getSourceFiles().indexOf(n)}function s(e,t,n,r,i){gn.assert(!!t.valueDeclaration);const o=U(Vce(e,r,t),e=>{if("import"===e.kind){const t=e.literal.parent;if(uE(t)){const e=st(t.parent,dE);if(n&&!e.qualifier)return}return tle(e.literal)}if("implicit"===e.kind){return tle(e.literal.text!==Xu&&cO(e.referencingFile,e=>2&e.transformFlags?GF(e)||XF(e)||ZF(e)?e:void 0:"skip")||e.referencingFile.statements[0]||e.referencingFile)}return{kind:0,fileName:e.referencingFile.fileName,textSpan:QQ(e.ref)}});if(t.declarations)for(const e of t.declarations)switch(e.kind){case 308:break;case 268:i.has(e.getSourceFile().fileName)&&o.push(tle(e.name));break;default:gn.assert(!!(33554432&t.flags),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}const a=t.exports.get("export=");if(null==a?void 0:a.declarations)for(const e of a.declarations){const t=e.getSourceFile();if(i.has(t.fileName)){const n=LE(e)&&bE(e.left)?e.left.expression:JF(e)?gn.checkDefined(YX(e,95,t)):Ac(e)||e;o.push(tle(n))}}return o.length?[{definition:{type:0,symbol:t},references:o}]:p}function c(e){return 148===e.kind&&cE(e.parent)&&148===e.parent.operator}function l(e,t,n,r,i,o,a){const s=t&&function(e,t,n,r){const{parent:i}=t;if(UF(i)&&r)return j(t,e,i,n);return y(e.declarations,r=>{if(!r.parent){if(33554432&e.flags)return;gn.fail(`Unexpected symbol at ${gn.formatSyntaxKind(t.kind)}: ${gn.formatSymbol(e)}`)}return XD(r.parent)&&nE(r.parent.parent)?n.getPropertyOfType(n.getTypeFromTypeNode(r.parent.parent),e.name):void 0})}(e,t,i,!Z(a))||e,c=t&&2!==a.use?G(t,s):7,l=[],u=new h(n,r,t?function(e){switch(e.kind){case 177:case 137:return 1;case 80:if(y_(e.parent))return gn.assert(e.parent.name===e),2;default:return 0}}(t):0,i,o,c,a,l),d=Z(a)&&s.declarations?T(s.declarations,UF):void 0;if(d)L(d.name,s,d,u.createSearch(t,e,void 0),u,!0,!0);else if(t&&90===t.kind&&"default"===s.escapedName&&s.parent)M(t,s,u),v(t,s,{exportingModuleSymbol:s.parent,exportKind:1},u);else{const e=u.createSearch(t,s,void 0,{allSearchSymbols:t?W(s,t,i,2===a.use,!!a.providePrefixAndSuffixTextForRename,!!a.implementations):[s]});_(s,u,e)}return l}function _(e,t,n){const r=function(e){const{declarations:t,flags:n,parent:r,valueDeclaration:i}=e;if(i&&(219===i.kind||232===i.kind))return i;if(!t)return;if(8196&n){const e=T(t,e=>Ov(e,2)||t_(e));return e?Ph(e,264):void 0}if(t.some(CY))return;const o=r&&!(262144&e.flags);if(o&&(!id(r)||r.globalExports))return;let a;for(const e of t){const t=LX(e);if(a&&a!==t)return;if(!t||308===t.kind&&!sf(t))return;if(a=t,NE(a)){let e;for(;e=Wg(a);)a=e}}return o?a.getSourceFile():a}(e);if(r)A(r,r.getSourceFile(),n,t,!(mP(r)&&!D(t.sourceFiles,r)));else for(const e of t.sourceFiles)t.cancellationToken.throwIfCancellationRequested(),S(e,n,t)}let u;var d;function f(e){if(!(33555968&e.flags))return;const t=e.declarations&&T(e.declarations,e=>!mP(e)&&!TF(e));return t&&t.symbol}e.getReferencedSymbolsForNode=function(e,a,_,u,d,f={},m=new Set(u.map(e=>e.fileName))){var g,h;if(mP(a=t(a,f))){const t=wle.getReferenceAtPosition(a,e,_);if(!(null==t?void 0:t.file))return;const r=_.getTypeChecker().getMergedSymbol(t.file.symbol);if(r)return s(_,r,!1,u,m);const i=_.getFileIncludeReasons();if(!i)return;return[{definition:{type:5,reference:t.reference,file:a},references:n(t.file,i,_)||p}]}if(!f.implementations){const e=function(e,t,n){if(nY(e.kind)){if(116===e.kind&&PE(e.parent))return;if(148===e.kind&&!c(e))return;return function(e,t,n,r){const i=R(e,e=>(n.throwIfCancellationRequested(),U(C(e,ja(t),e),e=>{if(e.kind===t&&(!r||r(e)))return tle(e)})));return i.length?[{definition:{type:2,node:i[0].node},references:i}]:void 0}(t,e.kind,n,148===e.kind?c:void 0)}if(yf(e.parent)&&e.parent.name===e)return function(e,t){const n=R(e,e=>(t.throwIfCancellationRequested(),U(C(e,"meta",e),e=>{const t=e.parent;if(yf(t))return tle(t)})));return n.length?[{definition:{type:2,node:n[0].node},references:n}]:void 0}(t,n);if(SD(e)&&RD(e.parent))return[{definition:{type:2,node:e},references:[tle(e)]}];if(TX(e)){const t=SX(e.parent,e.text);return t&&E(t.parent,t)}if(CX(e))return E(e.parent,e);if(MX(e))return function(e,t,n){let r=sm(e,!1,!1),i=256;switch(r.kind){case 175:case 174:if(Kf(r)){i&=Gv(r),r=r.parent;break}case 173:case 172:case 177:case 178:case 179:i&=Gv(r),r=r.parent;break;case 308:if(fO(r)||V(e))return;case 263:case 219:break;default:return}const o=R(308===r.kind?t:[r.getSourceFile()],e=>(n.throwIfCancellationRequested(),C(e,"this",mP(r)?e:r).filter(e=>{if(!MX(e))return!1;const t=sm(e,!1,!1);if(!pu(t))return!1;switch(r.kind){case 219:case 263:return r.symbol===t.symbol;case 175:case 174:return Kf(r)&&r.symbol===t.symbol;case 232:case 264:case 211:return t.parent&&pu(t.parent)&&r.symbol===t.parent.symbol&&jv(t)===!!i;case 308:return 308===t.kind&&!fO(t)&&!V(e)}}))).map(e=>tle(e)),a=y(o,e=>AD(e.node.parent)?e.node:void 0);return[{definition:{type:3,node:a||e},references:o}]}(e,t,n);if(108===e.kind)return function(e){let t=um(e,!1);if(!t)return;let n=256;switch(t.kind){case 173:case 172:case 175:case 174:case 177:case 178:case 179:n&=Gv(t),t=t.parent;break;default:return}const r=U(C(t.getSourceFile(),"super",t),e=>{if(108!==e.kind)return;const r=um(e,!1);return r&&jv(r)===!!n&&r.parent.symbol===t.symbol?tle(e):void 0});return[{definition:{type:0,symbol:t.symbol},references:r}]}(e);return}(a,u,d);if(e)return e}const v=_.getTypeChecker(),b=v.getSymbolAtLocation(BD(a)&&a.parent.name||a);if(!b){if(!f.implementations&&Uu(a)){if(TY(a)){const e=_.getFileIncludeReasons(),t=null==(h=null==(g=_.getResolvedModuleFromModuleSpecifier(a))?void 0:g.resolvedModule)?void 0:h.resolvedFileName,r=t?_.getSourceFile(t):void 0;if(r)return[{definition:{type:4,node:a},references:n(r,e,_)||p}]}return function(e,t,n,r){const i=rQ(e,n),o=R(t,t=>(r.throwIfCancellationRequested(),U(C(t,e.text),r=>{if(Uu(r)&&r.text===e.text){if(!i)return eD(r)&&!$b(r,t)?void 0:tle(r,2);{const e=rQ(r,n);if(i!==n.getStringType()&&(i===e||function(e,t){if(OD(e.parent))return t.getPropertyOfType(t.getTypeAtLocation(e.parent.parent),e.text)}(r,n)))return tle(r,2)}}})));return[{definition:{type:4,node:e},references:o}]}(a,u,v,d)}return}if("export="===b.escapedName)return s(_,b.parent,!1,u,m);const x=i(b,_,u,d,f,m);if(x&&!(33554432&b.flags))return x;const S=r(a,b,v),k=S&&i(S,_,u,d,f,m);return o(_,x,l(b,a,u,m,v,d,f),k)},e.getAdjustedNode=t,e.getReferencesForFileName=function(e,t,r,i=new Set(r.map(e=>e.fileName))){var o,a;const c=null==(o=t.getSourceFile(e))?void 0:o.symbol;if(c)return(null==(a=s(t,c,!1,r,i)[0])?void 0:a.references)||p;const l=t.getFileIncludeReasons(),_=t.getSourceFile(e);return _&&l&&n(_,l,t)||p},(d=u||(u={}))[d.None=0]="None",d[d.Constructor=1]="Constructor",d[d.Class=2]="Class";class h{constructor(e,t,n,r,i,o,a,s){this.sourceFiles=e,this.sourceFilesSet=t,this.specialSearchKind=n,this.checker=r,this.cancellationToken=i,this.searchMeaning=o,this.options=a,this.result=s,this.inheritsFromCache=new Map,this.markSeenContainingTypeReference=oY(),this.markSeenReExportRHS=oY(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}includesSourceFile(e){return this.sourceFilesSet.has(e.fileName)}getImportSearches(e,t){return this.importTracker||(this.importTracker=Jce(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(e,t,2===this.options.use)}createSearch(e,t,n,r={}){const{text:i=jy(Cc(Nb(t)||f(t)||t)),allSearchSymbols:o=[t]}=r,a=xc(i),s=this.options.implementations&&e?function(e,t,n){const r=EX(e)?e.parent:void 0,i=r&&n.getTypeAtLocation(r.expression),o=U(i&&(i.isUnionOrIntersection()?i.types:i.symbol===t.parent?void 0:[i]),e=>e.symbol&&96&e.symbol.flags?e.symbol:void 0);return 0===o.length?void 0:o}(e,t,this.checker):void 0;return{symbol:t,comingFrom:n,text:i,escapedText:a,parents:s,allSearchSymbols:o,includes:e=>D(o,e)}}referenceAdder(e){const t=fJ(e);let n=this.symbolIdToReferences[t];return n||(n=this.symbolIdToReferences[t]=[],this.result.push({definition:{type:0,symbol:e},references:n})),(e,t)=>n.push(tle(e,t))}addStringOrCommentReference(e,t){this.result.push({definition:void 0,references:[{kind:0,fileName:e,textSpan:t}]})}markSearchedSymbols(e,t){const n=pJ(e),r=this.sourceFileToSeenSymbols[n]||(this.sourceFileToSeenSymbols[n]=new Set);let i=!1;for(const e of t)i=$(r,fJ(e))||i;return i}}function v(e,t,n,r){const{importSearches:i,singleReferences:o,indirectUsers:a}=r.getImportSearches(t,n);if(o.length){const e=r.referenceAdder(t);for(const t of o)b(t,r)&&e(t)}for(const[e,t]of i)F(e.getSourceFile(),r.createSearch(e,t,1),r);if(a.length){let i;switch(n.exportKind){case 0:i=r.createSearch(e,t,1);break;case 1:i=2===r.options.use?void 0:r.createSearch(e,t,1,{text:"default"})}if(i)for(const e of a)S(e,i,r)}}function b(e,t){return!!I(e,t)&&(2!==t.options.use||!(!fD(e)&&!Wl(e.parent))&&!(Wl(e.parent)&&tp(e)))}function x(e,t){if(e.declarations)for(const n of e.declarations){const r=n.getSourceFile();F(r,t.createSearch(n,e,0),t,t.includesSourceFile(r))}}function S(e,t,n){void 0!==y7(e).get(t.escapedText)&&F(e,t,n)}function k(e,t,n,r,i=n){const o=ac(e.parent,e.parent.parent)?xe(t.getSymbolsOfParameterPropertyDeclaration(e.parent,e.text)):t.getSymbolAtLocation(e);if(o)for(const a of C(n,o.name,i)){if(!fD(a)||a===e||a.escapedText!==e.escapedText)continue;const n=t.getSymbolAtLocation(a);if(n===o||t.getShorthandAssignmentValueSymbol(a.parent)===o||UF(a.parent)&&j(a,n,a.parent,t)===o){const e=r(a);if(e)return e}}}function C(e,t,n=e){return U(N(e,t,n),t=>{const n=_Q(e,t);return n===e?void 0:n})}function N(e,t,n=e){const r=[];if(!t||!t.length)return r;const i=e.text,o=i.length,a=t.length;let s=i.indexOf(t,n.pos);for(;s>=0&&!(s>n.end);){const e=s+a;0!==s&&xs(i.charCodeAt(s-1),99)||e!==o&&xs(i.charCodeAt(e),99)||r.push(s),s=i.indexOf(t,s+a+1)}return r}function E(e,t){const n=e.getSourceFile(),r=t.text,i=U(C(n,r,e),e=>e===t||TX(e)&&SX(e,r)===t?tle(e):void 0);return[{definition:{type:1,node:t},references:i}]}function F(e,t,n,r=!0){return n.cancellationToken.throwIfCancellationRequested(),A(e,e,t,n,r)}function A(e,t,n,r,i){if(r.markSearchedSymbols(t,n.allSearchSymbols))for(const o of N(t,n.text,e))O(t,o,n,r,i)}function I(e,t){return!!(lX(e)&t.searchMeaning)}function O(e,t,n,r,i){const o=_Q(e,t);if(!function(e,t){switch(e.kind){case 81:if(vP(e.parent))return!0;case 80:return e.text.length===t.length;case 15:case 11:{const n=e;return n.text.length===t.length&&(IX(n)||PX(e)||OX(e)||SE(e.parent)&&lg(e.parent)&&e.parent.arguments[1]===e||Wl(e.parent))}case 9:return IX(e)&&e.text.length===t.length;case 90:return 7===t.length;default:return!1}}(o,n.text))return void(!r.options.implementations&&(r.options.findInStrings&&xQ(e,t)||r.options.findInComments&&WQ(e,t))&&r.addStringOrCommentReference(e.fileName,Ys(t,n.text.length)));if(!I(o,r))return;let a=r.checker.getSymbolAtLocation(o);if(!a)return;const s=o.parent;if(BF(s)&&s.propertyName===o)return;if(UF(s))return gn.assert(80===o.kind||11===o.kind),void L(o,a,s,n,r,i);if(Ol(s)&&s.isNameFirst&&s.typeExpression&&AP(s.typeExpression.type)&&s.typeExpression.type.jsDocPropertyTags&&m(s.typeExpression.type.jsDocPropertyTags))return void function(e,t,n,r){const i=r.referenceAdder(n.symbol);M(t,n.symbol,r),g(e,e=>{ED(e.name)&&i(e.name.left)})}(s.typeExpression.type.jsDocPropertyTags,o,n,r);const c=function(e,t,n,r){const{checker:i}=r;return K(t,n,i,!1,2!==r.options.use||!!r.options.providePrefixAndSuffixTextForRename,(n,r,i,o)=>(i&&H(t)!==H(i)&&(i=void 0),e.includes(i||r||n)?{symbol:!r||6&ux(n)?n:r,kind:o}:void 0),t=>!(e.parents&&!e.parents.some(e=>q(t.parent,e,r.inheritsFromCache,i))))}(n,a,o,r);if(c){switch(r.specialSearchKind){case 0:i&&M(o,c,r);break;case 1:!function(e,t,n,r){dX(e)&&M(e,n.symbol,r);const i=()=>r.referenceAdder(n.symbol);if(y_(e.parent))gn.assert(90===e.kind||e.parent.name===e),function(e,t,n){const r=B(e);if(r&&r.declarations)for(const e of r.declarations){const r=YX(e,137,t);gn.assert(177===e.kind&&!!r),n(r)}e.exports&&e.exports.forEach(e=>{const t=e.valueDeclaration;if(t&&175===t.kind){const e=t.body;e&&Y(e,110,e=>{dX(e)&&n(e)})}})}(n.symbol,t,i());else{const t=lb(xX(e).parent);t&&(function(e,t){const n=B(e.symbol);if(!n||!n.declarations)return;for(const e of n.declarations){gn.assert(177===e.kind);const n=e.body;n&&Y(n,108,e=>{uX(e)&&t(e)})}}(t,i()),function(e,t){if(function(e){return!!B(e.symbol)}(e))return;const n=e.symbol,r=t.createSearch(void 0,n,void 0);_(n,t,r)}(t,r))}}(o,e,n,r);break;case 2:!function(e,t,n){M(e,t.symbol,n);const r=e.parent;if(2===n.options.use||!y_(r))return;gn.assert(r.name===e);const i=n.referenceAdder(t.symbol);for(const e of r.members)S_(e)&&jv(e)&&e.body&&e.body.forEachChild(function e(t){110===t.kind?i(t):__(t)||y_(t)||t.forEachChild(e)})}(o,n,r);break;default:gn.assertNever(r.specialSearchKind)}Mm(o)&&hE(o.parent)&&Vm(o.parent.parent.parent)&&(a=o.parent.symbol,!a)||function(e,t,n,r){const i=Kce(e,t,r.checker,1===n.comingFrom);if(!i)return;const{symbol:o}=i;0===i.kind?Z(r.options)||x(o,r):v(e,o,i.exportInfo,r)}(o,a,n,r)}else!function({flags:e,valueDeclaration:t},n,r){const i=r.checker.getShorthandAssignmentValueSymbol(t),o=t&&Ac(t);33554432&e||!o||!n.includes(i)||M(o,i,r)}(a,n,r)}function L(e,t,n,r,i,o,a){gn.assert(!a||!!i.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");const{parent:s,propertyName:c,name:l}=n,_=s.parent,u=j(e,t,n,i.checker);if(a||r.includes(u)){if(c?e===c?(_.moduleSpecifier||d(),o&&2!==i.options.use&&i.markSeenReExportRHS(l)&&M(l,gn.checkDefined(n.symbol),i)):i.markSeenReExportRHS(e)&&d():2===i.options.use&&tp(l)||d(),!Z(i.options)||a){const t=tp(e)||tp(n.name)?1:0,r=gn.checkDefined(n.symbol),o=Hce(r,t,i.checker);o&&v(e,r,o,i)}if(1!==r.comingFrom&&_.moduleSpecifier&&!c&&!Z(i.options)){const e=i.checker.getExportSpecifierLocalTargetSymbol(n);e&&x(e,i)}}function d(){o&&M(e,u,i)}}function j(e,t,n,r){return function(e,t){const{parent:n,propertyName:r,name:i}=t;return gn.assert(r===e||i===e),r?r===e:!n.parent.moduleSpecifier}(e,n)&&r.getExportSpecifierLocalTargetSymbol(n)||t}function M(e,t,n){const{kind:r,symbol:i}="kind"in t?t:{kind:void 0,symbol:t};if(2===n.options.use&&90===e.kind)return;const o=n.referenceAdder(i);n.options.implementations?function(e,t,n){if(gh(e)&&(r=e.parent,33554432&r.flags?!xF(r)&&!SF(r):Bf(r)?Mu(r):d_(r)?r.body:y_(r)||du(r)))return void t(e);var r;if(80!==e.kind)return;305===e.parent.kind&&Q(e,n.checker,t);const i=J(e);if(i)return void t(i);const o=yc(e,e=>!ED(e.parent)&&!N_(e.parent)&&!T_(e.parent)),a=o.parent;if(ju(a)&&a.type===o&&n.markSeenContainingTypeReference(a))if(Mu(a))s(a.initializer);else if(__(a)&&a.body){const e=a.body;242===e.kind?Lf(e,e=>{e.expression&&s(e.expression)}):s(e)}else(Y_(a)||VE(a))&&s(a.expression);function s(e){z(e)&&t(e)}}(e,o,n):o(e,r)}function B(e){return e.members&&e.members.get("__constructor")}function J(e){return fD(e)||bE(e)?J(e.parent):qE(e)?at(e.parent.parent,an(y_,xF)):void 0}function z(e){switch(e.kind){case 218:return z(e.expression);case 220:case 219:case 211:case 232:case 210:return!0;default:return!1}}function q(e,t,n,r){if(e===t)return!0;const i=fJ(e)+","+fJ(t),o=n.get(i);if(void 0!==o)return o;n.set(i,!1);const a=!!e.declarations&&e.declarations.some(e=>Dh(e).some(e=>{const i=r.getTypeAtLocation(e);return!!i&&!!i.symbol&&q(i.symbol,t,n,r)}));return n.set(i,a),a}function V(e){return 80===e.kind&&170===e.parent.kind&&e.parent.name===e}function W(e,t,n,r,i,o){const a=[];return K(e,t,n,r,!(r&&i),(t,n,r)=>{r&&H(e)!==H(r)&&(r=void 0),a.push(r||n||t)},()=>!o),a}function K(e,t,n,i,o,a,s){const c=v7(t);if(c){const e=n.getShorthandAssignmentValueSymbol(t.parent);if(e&&i)return a(e,void 0,void 0,3);const r=n.getContextualType(c.parent),o=r&&y(b7(c,n,r,!0),e=>d(e,4));if(o)return o;const s=function(e,t){return UQ(e.parent.parent)?t.getPropertySymbolOfDestructuringAssignment(e):void 0}(t,n),l=s&&a(s,void 0,void 0,4);if(l)return l;const _=e&&a(e,void 0,void 0,3);if(_)return _}const l=r(t,e,n);if(l){const e=a(l,void 0,void 0,1);if(e)return e}const _=d(e);if(_)return _;if(e.valueDeclaration&&ac(e.valueDeclaration,e.valueDeclaration.parent)){const t=n.getSymbolsOfParameterPropertyDeclaration(st(e.valueDeclaration,AD),e.name);return gn.assert(2===t.length&&!!(1&t[0].flags)&&!!(4&t[1].flags)),d(1&e.flags?t[1]:t[0])}const u=ed(e,282);if(!i||u&&!u.propertyName){const e=u&&n.getExportSpecifierLocalTargetSymbol(u);if(e){const t=a(e,void 0,void 0,1);if(t)return t}}if(!i){let r;return r=o?CY(t.parent)?wY(n,t.parent):void 0:p(e,n),r&&d(r,4)}gn.assert(i);if(o){const t=p(e,n);return t&&d(t,4)}function d(e,t){return y(n.getRootSymbols(e),r=>a(e,r,void 0,t)||(r.parent&&96&r.parent.flags&&s(r)?function(e,t,n,r){const i=new Set;return o(e);function o(e){if(96&e.flags&&Dx(i,e))return y(e.declarations,e=>y(Dh(e),e=>{const i=n.getTypeAtLocation(e),a=i.symbol&&n.getPropertyOfType(i,t);return a&&y(n.getRootSymbols(a),r)||i.symbol&&o(i.symbol)}))}}(r.parent,r.name,n,n=>a(e,r,n,t)):void 0))}function p(e,t){const n=ed(e,209);if(n&&CY(n))return wY(t,n)}}function H(e){if(!e.valueDeclaration)return!1;return!!(256&Kv(e.valueDeclaration))}function G(e,t){let n=lX(e);const{declarations:r}=t;if(r){let e;do{e=n;for(const e of r){const t=cX(e);t&n&&(n|=t)}}while(n!==e)}return n}function Q(e,t,n){const r=t.getSymbolAtLocation(e),i=t.getShorthandAssignmentValueSymbol(r.valueDeclaration);if(i)for(const e of i.getDeclarations())1&cX(e)&&n(e)}function Y(e,t,n){sO(e,e=>{e.kind===t&&n(e),Y(e,t,n)})}function Z(e){return 2===e.use&&e.providePrefixAndSuffixTextForRename}e.eachExportReference=function(e,t,n,r,i,o,a,s){const c=Jce(e,new Set(e.map(e=>e.fileName)),t,n),{importSearches:l,indirectUsers:_,singleReferences:u}=c(r,{exportKind:a?1:0,exportingModuleSymbol:i},!1);for(const[e]of l)s(e);for(const e of u)fD(e)&&dE(e.parent)&&s(e);for(const e of _)for(const n of C(e,a?"default":o)){const e=t.getSymbolAtLocation(n),i=X(null==e?void 0:e.declarations,e=>!!at(e,JF));!fD(n)||Wl(n.parent)||e!==r&&!i||s(n)}},e.isSymbolReferencedInFile=function(e,t,n,r=n){return k(e,t,n,()=>!0,r)||!1},e.eachSymbolReferenceInFile=k,e.getTopMostDeclarationNamesInFile=function(e,t){return P(C(t,e),e=>!!hh(e)).reduce((e,t)=>{const n=function(e){let t=0;for(;e;)e=LX(e),t++;return t}(t);return X(e.declarationNames)&&n!==e.depth?ne===i)&&r(t,a))return!0}return!1},e.getIntersectingMeaningFromDeclarations=G,e.getReferenceEntriesForShorthandPropertyAssignment=Q})(ale||(ale={}));var wle={};function Nle(e,t,n,r,i){var o;const a=Ele(t,n,e),s=a&&[(c=a.reference.fileName,l=a.fileName,_=a.unverified,{fileName:l,textSpan:Zs(0,0),kind:"script",name:c,containerName:void 0,containerKind:void 0,unverified:_})]||p;var c,l,_;if(null==a?void 0:a.file)return s;const u=_Q(t,n);if(u===t)return;const{parent:d}=u,f=e.getTypeChecker();if(164===u.kind||fD(u)&&qP(d)&&d.tagName===u){const e=function(e,t){const n=yc(t,h_);if(!n||!n.name)return;const r=yc(n,y_);if(!r)return;const i=Ch(r);if(!i)return;const o=ph(i.expression),a=JE(o)?o.symbol:e.getSymbolAtLocation(o);if(!a)return;const s=Mv(n)?e.getTypeOfSymbol(a):e.getDeclaredTypeOfSymbol(a);let c;if(FD(n.name)){const t=e.getSymbolAtLocation(n.name);if(!t)return;c=Yh(t)?T(e.getPropertiesOfType(s),e=>e.escapedName===t.escapedName):e.getPropertyOfType(s,Sc(t.escapedName))}else c=e.getPropertyOfType(s,Sc(Up(n.name)));if(!c)return;return Mle(e,c,t)}(f,u);if(void 0!==e||164!==u.kind)return e||p}if(TX(u)){const e=SX(u.parent,u.text);return e?[Ble(f,e,"label",u.text,void 0)]:void 0}switch(u.kind){case 90:if(!cP(u.parent))break;case 84:const e=yc(u.parent,dF);if(e)return[Jle(e,t)]}let m;switch(u.kind){case 107:case 135:case 127:m=d_;const e=yc(u,m);return e?[qle(f,e)]:void 0}if(SD(u)&&RD(u.parent)){const e=u.parent.parent,{symbol:t,failedAliasResolution:n}=jle(e,f,i),r=P(e.members,RD),o=t?f.symbolToString(t,e):"",a=u.getSourceFile();return O(r,e=>{let{pos:t}=Vb(e);return t=is(a.text,t),Ble(f,e,"constructor","static {}",o,!1,n,{start:t,length:6})})}let{symbol:h,failedAliasResolution:y}=jle(u,f,i),v=u;if(r&&y){const e=g([u,...(null==h?void 0:h.declarations)||p],e=>yc(e,Pp)),t=e&&Cg(e);t&&(({symbol:h,failedAliasResolution:y}=jle(t,f,i)),v=t)}if(!h&&TY(v)){const n=null==(o=e.getResolvedModuleFromModuleSpecifier(v,t))?void 0:o.resolvedModule;if(n)return[{name:v.text,fileName:n.resolvedFileName,containerName:void 0,containerKind:void 0,kind:"script",textSpan:Ys(0,0),failedAliasResolution:y,isAmbient:SO(n.resolvedFileName),unverified:v!==u}]}if(a_(u)&&(h_(d)||Fc(d))&&(h=d.symbol),!h)return Y(s,function(e,t){return U(t.getIndexInfosAtLocation(e),e=>e.declaration&&qle(t,e.declaration))}(u,f));if(r&&k(h.declarations,e=>e.getSourceFile().fileName===t.fileName))return;const b=function(e,t){const n=function(e){const t=yc(e,e=>!EX(e)),n=null==t?void 0:t.parent;return n&&q_(n)&&ym(n)===t?n:void 0}(t),r=n&&e.getResolvedSignature(n);return at(r&&r.declaration,e=>__(e)&&!KD(e))}(f,u);if(b&&(!Nu(u.parent)||!function(e){switch(e.kind){case 177:case 186:case 180:case 181:return!0;default:return!1}}(b))){const e=qle(f,b,y);let t=e=>e!==b;if(f.getRootSymbols(h).some(e=>function(e,t){var n;return e===t.symbol||e===t.symbol.parent||ub(t.parent)||!q_(t.parent)&&e===(null==(n=at(t.parent,pu))?void 0:n.symbol)}(e,b))){if(!BD(b))return[e];t=e=>e!==b&&(bF(e)||JE(e))}const n=Mle(f,h,u,y,t)||p;return 108===u.kind?[e,...n]:[...n,e]}if(305===u.parent.kind){const e=f.getShorthandAssignmentValueSymbol(h.valueDeclaration);return Y((null==e?void 0:e.declarations)?e.declarations.map(t=>Rle(t,f,e,u,!1,y)):p,Dle(f,u))}if(c_(u)&&hE(d)&&mE(d.parent)&&u===(d.propertyName||d.name)){const e=lY(u),t=f.getTypeAtLocation(d.parent);return void 0===e?p:R(t.isUnion()?t.types:[t],t=>{const n=t.getProperty(e);return n&&Mle(f,n,u)})}const x=Dle(f,u);return Y(s,x.length?x:Mle(f,h,u,y))}function Dle(e,t){const n=v7(t);if(n){const r=n&&e.getContextualType(n.parent);if(r)return R(b7(n,e,r,!1),n=>Mle(e,n,t))}return p}function Ele(e,t,n){var r,i;const o=Ule(e.referencedFiles,t);if(o){const t=n.getSourceFileFromReference(e,o);return t&&{reference:o,fileName:t.fileName,file:t,unverified:!1}}const a=Ule(e.typeReferenceDirectives,t);if(a){const t=null==(r=n.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a,e))?void 0:r.resolvedTypeReferenceDirective,i=t&&n.getSourceFile(t.resolvedFileName);return i&&{reference:a,fileName:i.fileName,file:i,unverified:!1}}const s=Ule(e.libReferenceDirectives,t);if(s){const e=n.getLibFileFromReference(s);return e&&{reference:s,fileName:e.fileName,file:e,unverified:!1}}if(e.imports.length||e.moduleAugmentations.length){const r=uQ(e,t);let o;if(TY(r)&&As(r.text)&&(o=n.getResolvedModuleFromModuleSpecifier(r,e))){const t=null==(i=o.resolvedModule)?void 0:i.resolvedFileName,a=t||Vo(Lo(e.fileName),r.text);return{file:n.getSourceFile(a),fileName:a,reference:{pos:r.getStart(),end:r.getEnd(),fileName:r.text},unverified:!t}}}}a(wle,{createDefinitionInfo:()=>Rle,getDefinitionAndBoundSpan:()=>Lle,getDefinitionAtPosition:()=>Nle,getReferenceAtPosition:()=>Ele,getTypeDefinitionAtPosition:()=>Ile});var Fle=new Set(["Array","ArrayLike","ReadonlyArray","Promise","PromiseLike","Iterable","IterableIterator","AsyncIterable","Set","WeakSet","ReadonlySet","Map","WeakMap","ReadonlyMap","Partial","Required","Readonly","Pick","Omit"]);function Ple(e,t){if(!t.aliasSymbol)return!1;const n=t.aliasSymbol.name;if(!Fle.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.aliasSymbol}function Ale(e,t,n,r){var i,o;if(4&Tx(t)&&function(e,t){const n=t.symbol.name;if(!Fle.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.target.symbol}(e,t))return Ole(e.getTypeArguments(t)[0],e,n,r);if(Ple(e,t)&&t.aliasTypeArguments)return Ole(t.aliasTypeArguments[0],e,n,r);if(32&Tx(t)&&t.target&&Ple(e,t.target)){const a=null==(o=null==(i=t.aliasSymbol)?void 0:i.declarations)?void 0:o[0];if(a&&SF(a)&&$D(a.type)&&a.type.typeArguments)return Ole(e.getTypeAtLocation(a.type.typeArguments[0]),e,n,r)}return[]}function Ile(e,t,n){const r=_Q(t,n);if(r===t)return;if(yf(r.parent)&&r.parent.name===r)return Ole(e.getTypeAtLocation(r.parent),e,r.parent,!1);let{symbol:i,failedAliasResolution:o}=jle(r,e,!1);if(a_(r)&&(h_(r.parent)||Fc(r.parent))&&(i=r.parent.symbol,o=!1),!i)return;const a=e.getTypeOfSymbolAtLocation(i,r),s=function(e,t,n){if(t.symbol===e||e.valueDeclaration&&t.symbol&&hF(e.valueDeclaration)&&e.valueDeclaration.initializer===t.symbol.valueDeclaration){const e=t.getCallSignatures();if(1===e.length)return n.getReturnTypeOfSignature(xe(e))}return}(i,a,e),c=s&&Ole(s,e,r,o),[l,_]=c&&0!==c.length?[s,c]:[a,Ole(a,e,r,o)];return _.length?[...Ale(e,l,r,o),..._]:!(111551&i.flags)&&788968&i.flags?Mle(e,px(i,e),r,o):void 0}function Ole(e,t,n,r){return R(!e.isUnion()||32&e.flags?[e]:e.types,e=>e.symbol&&Mle(t,e.symbol,n,r))}function Lle(e,t,n){const r=Nle(e,t,n);if(!r||0===r.length)return;const i=Ule(t.referencedFiles,n)||Ule(t.typeReferenceDirectives,n)||Ule(t.libReferenceDirectives,n);if(i)return{definitions:r,textSpan:QQ(i)};const o=_Q(t,n);return{definitions:r,textSpan:Ys(o.getStart(),o.getWidth())}}function jle(e,t,n){const r=t.getSymbolAtLocation(e);let i=!1;if((null==r?void 0:r.declarations)&&2097152&r.flags&&!n&&function(e,t){if(80!==e.kind&&(11!==e.kind||!Wl(e.parent)))return!1;if(e.parent===t)return!0;if(275===t.kind)return!1;return!0}(e,r.declarations[0])){const e=t.getAliasedSymbol(r);if(e.declarations)return{symbol:e};i=!0}return{symbol:r,failedAliasResolution:i}}function Mle(e,t,n,r,i){const o=void 0!==i?P(t.declarations,i):t.declarations,a=!i&&(function(){if(32&t.flags&&!(19&t.flags)&&(dX(n)||137===n.kind)){const e=T(o,y_);return e&&c(e.members,!0)}}()||(pX(n)||AX(n)?c(o,!1):void 0));if(a)return a;const s=P(o,e=>!function(e){if(!Xm(e))return!1;const t=yc(e,e=>!!ub(e)||!Xm(e)&&"quit");return!!t&&5===cg(t)}(e));return O(X(s)?s:o,i=>Rle(i,e,t,n,!1,r));function c(i,o){if(!i)return;const a=i.filter(o?BD:__),s=a.filter(e=>!!e.body);return a.length?0!==s.length?s.map(r=>Rle(r,e,t,n)):[Rle(Te(a),e,t,n,!1,r)]:void 0}}function Rle(e,t,n,r,i,o){const a=t.symbolToString(n),s=Yue.getSymbolKind(t,n,r),c=n.parent?t.symbolToString(n.parent,r):"";return Ble(t,e,s,a,c,i,o)}function Ble(e,t,n,r,i,o,a,s){const c=t.getSourceFile();if(!s){s=HQ(Ac(t)||t,c)}return{fileName:c.fileName,textSpan:s,kind:n,name:r,containerKind:void 0,containerName:i,...Bce.toContextSpan(s,c,Bce.getContextNode(t)),isLocal:!zle(e,t),isAmbient:!!(33554432&t.flags),unverified:o,failedAliasResolution:a}}function Jle(e,t){const n=Bce.getContextNode(e),r=HQ(nle(n)?n.start:n,t);return{fileName:t.fileName,textSpan:r,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...Bce.toContextSpan(r,t,n),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function zle(e,t){if(e.isDeclarationVisible(t))return!0;if(!t.parent)return!1;if(Mu(t.parent)&&t.parent.initializer===t)return zle(e,t.parent);switch(t.kind){case 173:case 178:case 179:case 175:if(Ov(t,2))return!1;case 177:case 304:case 305:case 211:case 232:case 220:case 219:return zle(e,t.parent);default:return!1}}function qle(e,t,n){return Rle(t,e,t.symbol,t,!1,n)}function Ule(e,t){return T(e,e=>Bs(e,t))}var Vle={};a(Vle,{provideInlayHints:()=>Hle});var Wle=e=>new RegExp(`^\\s?/\\*\\*?\\s?${e}\\s?\\*\\/\\s?$`);function $le(e){return"literals"===e.includeInlayParameterNameHints}function Kle(e){return!0===e.interactiveInlayHints}function Hle(e){const{file:t,program:n,span:r,cancellationToken:i,preferences:o}=e,a=t.text,s=n.getCompilerOptions(),c=bY(t,o),l=n.getTypeChecker(),_=[];return function e(n){if(!n||0===n.getFullWidth())return;switch(n.kind){case 268:case 264:case 265:case 263:case 232:case 219:case 175:case 220:i.throwIfCancellationRequested()}if(!$s(r,n.pos,n.getFullWidth()))return;if(N_(n)&&!qE(n))return;o.includeInlayVariableTypeHints&&hF(n)||o.includeInlayPropertyDeclarationTypeHints&&LD(n)?f(n):o.includeInlayEnumMemberValueHints&&fP(n)?function(e){if(e.initializer)return;const t=l.getConstantValue(e);void 0!==t&&(n=t.toString(),r=e.end,_.push({text:`= ${n}`,position:r,kind:"Enum",whitespaceBefore:!0}));var n,r}(n):function(e){return"literals"===e.includeInlayParameterNameHints||"all"===e.includeInlayParameterNameHints}(o)&&(SE(n)||kE(n))?function(e){const t=e.arguments;if(!t||!t.length)return;const n=l.getResolvedSignature(e);if(void 0===n)return;let r=0;for(const e of t){const t=ph(e);if($le(o)&&!h(t)){r++;continue}let i=0;if(BE(t)){const e=l.getTypeAtLocation(t.expression);if(l.isTupleType(e)){const{elementFlags:t,fixedLength:n}=e.target;if(0===n)continue;const r=w(t,e=>!(1&e));(r<0?n:r)>0&&(i=r<0?n:r)}}const a=l.getParameterIdentifierInfoAtPosition(n,r);if(r+=i||1,a){const{parameter:n,parameterName:r,isRestParameter:i}=a;if(!(o.includeInlayParameterNameHintsWhenArgumentMatchesName||!m(t,r))&&!i)continue;const s=Sc(r);if(g(t,s))continue;u(s,n,e.getStart(),i)}}}(n):(o.includeInlayFunctionParameterTypeHints&&d_(n)&&UT(n)&&function(e){const t=l.getSignatureFromDeclaration(e);if(!t)return;let n=0;for(const r of e.parameters)S(r)&&v(r,mv(r)?t.thisParameter:t.parameters[n]),mv(r)||n++}(n),o.includeInlayFunctionLikeReturnTypeHints&&function(e){return DE(e)||NE(e)||vF(e)||MD(e)||JD(e)}(n)&&function(e){if(DE(e)&&!YX(e,21,t))return;if(kv(e)||!e.body)return;const n=l.getSignatureFromDeclaration(e);if(!n)return;const r=l.getTypePredicateOfSignature(n);if(null==r?void 0:r.type){const n=function(e){if(!Kle(o))return function(e){const n=71286784,r=IU();return pd(i=>{const o=l.typePredicateToTypePredicateNode(e,void 0,n);gn.assertIsDefined(o,"should always get typePredicateNode"),r.writeNode(4,o,t,i)})}(e);const n=71286784,r=l.typePredicateToTypePredicateNode(e,void 0,n);return gn.assertIsDefined(r,"should always get typenode"),x(r)}(r);if(n)return void d(n,y(e))}const i=l.getReturnTypeOfSignature(n);if(p(i))return;const a=b(i);a&&d(a,y(e))}(n));return sO(n,e)}(t),_;function u(e,t,n,r){let i,a=`${r?"...":""}${e}`;Kle(o)?(i=[k(a,t),{text:":"}],a=""):a+=":",_.push({text:a,position:n,kind:"Parameter",whitespaceAfter:!0,displayParts:i})}function d(e,t){_.push({text:"string"==typeof e?`: ${e}`:"",displayParts:"string"==typeof e?void 0:[{text:": "},...e],position:t,kind:"Type",whitespaceBefore:!0})}function p(e){return e.symbol&&1536&e.symbol.flags}function f(e){if(void 0===e.initializer&&(!LD(e)||1&l.getTypeAtLocation(e).flags)||E_(e.name)||hF(e)&&!S(e))return;if(xv(e))return;const t=l.getTypeAtLocation(e);if(p(t))return;const n=b(t);if(n){const t="string"==typeof n?n:n.map(e=>e.text).join("");if(!1===o.includeInlayVariableTypeHintsWhenTypeMatchesName&&xt(e.name.getText(),t))return;d(n,e.name.end)}}function m(e,t){return fD(e)?e.text===t:!!bE(e)&&e.name.text===t}function g(e,n){if(!Ss(n,wS(s),hS(t.scriptKind)))return!1;const r=hs(a,e.pos);if(!(null==r?void 0:r.length))return!1;const i=Wle(n);return X(r,e=>i.test(a.substring(e.pos,e.end)))}function h(e){switch(e.kind){case 225:{const t=e.operand;return Jl(t)||fD(t)&&VT(t.escapedText)}case 112:case 97:case 106:case 15:case 229:return!0;case 80:{const t=e.escapedText;return function(e){return"undefined"===e}(t)||VT(t)}}return Jl(e)}function y(e){const n=YX(e,22,t);return n?n.end:e.parameters.end}function v(e,t){if(xv(e)||void 0===t)return;const n=function(e){const t=e.valueDeclaration;if(!t||!AD(t))return;const n=l.getTypeOfSymbolAtLocation(e,t);if(p(n))return;return b(n)}(t);void 0!==n&&d(n,e.questionToken?e.questionToken.end:e.name.end)}function b(e){if(!Kle(o))return function(e){const n=IU();return pd(r=>{const i=l.typeToTypeNode(e,void 0,71286784);gn.assertIsDefined(i,"should always get typenode"),n.writeNode(4,i,t,r)})}(e);const n=l.typeToTypeNode(e,void 0,71286784);return gn.assertIsDefined(n,"should always get typeNode"),x(n)}function x(e){const t=[];return n(e),t;function n(e){var a,s;if(!e)return;const c=ja(e.kind);if(c)t.push({text:c});else if(Jl(e))t.push({text:o(e)});else switch(e.kind){case 80:gn.assertNode(e,fD);const c=kc(e),l=e.symbol&&e.symbol.declarations&&e.symbol.declarations.length&&Ac(e.symbol.declarations[0]);l?t.push(k(c,l)):t.push({text:c});break;case 167:gn.assertNode(e,ED),n(e.left),t.push({text:"."}),n(e.right);break;case 183:gn.assertNode(e,WD),e.assertsModifier&&t.push({text:"asserts "}),n(e.parameterName),e.type&&(t.push({text:" is "}),n(e.type));break;case 184:gn.assertNode(e,$D),n(e.typeName),e.typeArguments&&(t.push({text:"<"}),i(e.typeArguments,", "),t.push({text:">"}));break;case 169:gn.assertNode(e,PD),e.modifiers&&i(e.modifiers," "),n(e.name),e.constraint&&(t.push({text:" extends "}),n(e.constraint)),e.default&&(t.push({text:" = "}),n(e.default));break;case 170:gn.assertNode(e,AD),e.modifiers&&i(e.modifiers," "),e.dotDotDotToken&&t.push({text:"..."}),n(e.name),e.questionToken&&t.push({text:"?"}),e.type&&(t.push({text:": "}),n(e.type));break;case 186:gn.assertNode(e,HD),t.push({text:"new "}),r(e),t.push({text:" => "}),n(e.type);break;case 187:gn.assertNode(e,GD),t.push({text:"typeof "}),n(e.exprName),e.typeArguments&&(t.push({text:"<"}),i(e.typeArguments,", "),t.push({text:">"}));break;case 188:gn.assertNode(e,XD),t.push({text:"{"}),e.members.length&&(t.push({text:" "}),i(e.members,"; "),t.push({text:" "})),t.push({text:"}"});break;case 189:gn.assertNode(e,QD),n(e.elementType),t.push({text:"[]"});break;case 190:gn.assertNode(e,YD),t.push({text:"["}),i(e.elements,", "),t.push({text:"]"});break;case 203:gn.assertNode(e,ZD),e.dotDotDotToken&&t.push({text:"..."}),n(e.name),e.questionToken&&t.push({text:"?"}),t.push({text:": "}),n(e.type);break;case 191:gn.assertNode(e,eE),n(e.type),t.push({text:"?"});break;case 192:gn.assertNode(e,tE),t.push({text:"..."}),n(e.type);break;case 193:gn.assertNode(e,nE),i(e.types," | ");break;case 194:gn.assertNode(e,rE),i(e.types," & ");break;case 195:gn.assertNode(e,iE),n(e.checkType),t.push({text:" extends "}),n(e.extendsType),t.push({text:" ? "}),n(e.trueType),t.push({text:" : "}),n(e.falseType);break;case 196:gn.assertNode(e,oE),t.push({text:"infer "}),n(e.typeParameter);break;case 197:gn.assertNode(e,aE),t.push({text:"("}),n(e.type),t.push({text:")"});break;case 199:gn.assertNode(e,cE),t.push({text:`${ja(e.operator)} `}),n(e.type);break;case 200:gn.assertNode(e,lE),n(e.objectType),t.push({text:"["}),n(e.indexType),t.push({text:"]"});break;case 201:gn.assertNode(e,_E),t.push({text:"{ "}),e.readonlyToken&&(40===e.readonlyToken.kind?t.push({text:"+"}):41===e.readonlyToken.kind&&t.push({text:"-"}),t.push({text:"readonly "})),t.push({text:"["}),n(e.typeParameter),e.nameType&&(t.push({text:" as "}),n(e.nameType)),t.push({text:"]"}),e.questionToken&&(40===e.questionToken.kind?t.push({text:"+"}):41===e.questionToken.kind&&t.push({text:"-"}),t.push({text:"?"})),t.push({text:": "}),e.type&&n(e.type),t.push({text:"; }"});break;case 202:gn.assertNode(e,uE),n(e.literal);break;case 185:gn.assertNode(e,KD),r(e),t.push({text:" => "}),n(e.type);break;case 206:gn.assertNode(e,dE),e.isTypeOf&&t.push({text:"typeof "}),t.push({text:"import("}),n(e.argument),e.assertions&&(t.push({text:", { assert: "}),i(e.assertions.assertClause.elements,", "),t.push({text:" }"})),t.push({text:")"}),e.qualifier&&(t.push({text:"."}),n(e.qualifier)),e.typeArguments&&(t.push({text:"<"}),i(e.typeArguments,", "),t.push({text:">"}));break;case 172:gn.assertNode(e,OD),(null==(a=e.modifiers)?void 0:a.length)&&(i(e.modifiers," "),t.push({text:" "})),n(e.name),e.questionToken&&t.push({text:"?"}),e.type&&(t.push({text:": "}),n(e.type));break;case 182:gn.assertNode(e,VD),t.push({text:"["}),i(e.parameters,", "),t.push({text:"]"}),e.type&&(t.push({text:": "}),n(e.type));break;case 174:gn.assertNode(e,jD),(null==(s=e.modifiers)?void 0:s.length)&&(i(e.modifiers," "),t.push({text:" "})),n(e.name),e.questionToken&&t.push({text:"?"}),r(e),e.type&&(t.push({text:": "}),n(e.type));break;case 180:gn.assertNode(e,qD),r(e),e.type&&(t.push({text:": "}),n(e.type));break;case 181:gn.assertNode(e,UD),t.push({text:"new "}),r(e),e.type&&(t.push({text:": "}),n(e.type));break;case 208:gn.assertNode(e,gE),t.push({text:"["}),i(e.elements,", "),t.push({text:"]"});break;case 207:gn.assertNode(e,mE),t.push({text:"{"}),e.elements.length&&(t.push({text:" "}),i(e.elements,", "),t.push({text:" "})),t.push({text:"}"});break;case 209:gn.assertNode(e,hE),n(e.name);break;case 225:gn.assertNode(e,IE),t.push({text:ja(e.operator)}),n(e.operand);break;case 204:gn.assertNode(e,fE),n(e.head),e.templateSpans.forEach(n);break;case 16:gn.assertNode(e,tD),t.push({text:o(e)});break;case 205:gn.assertNode(e,pE),n(e.type),n(e.literal);break;case 17:gn.assertNode(e,nD),t.push({text:o(e)});break;case 18:gn.assertNode(e,rD),t.push({text:o(e)});break;case 198:gn.assertNode(e,sE),t.push({text:"this"});break;case 168:gn.assertNode(e,FD),t.push({text:"["}),n(e.expression),t.push({text:"]"});break;default:gn.failBadSyntaxKind(e)}}function r(e){e.typeParameters&&(t.push({text:"<"}),i(e.typeParameters,", "),t.push({text:">"})),t.push({text:"("}),i(e.parameters,", "),t.push({text:")"})}function i(e,r){e.forEach((e,i)=>{i>0&&t.push({text:r}),n(e)})}function o(e){switch(e.kind){case 11:return 0===c?`'${Dy(e.text,39)}'`:`"${Dy(e.text,34)}"`;case 16:case 17:case 18:{const t=e.rawText??vy(Dy(e.text,96));switch(e.kind){case 16:return"`"+t+"${";case 17:return"}"+t+"${";case 18:return"}"+t+"`"}}}return e.text}}function S(e){if((iy(e)||hF(e)&&pf(e))&&e.initializer){const t=ph(e.initializer);return!(h(t)||kE(t)||vE(t)||Y_(t))}return!0}function k(e,t){const n=t.getSourceFile();return{text:e,span:HQ(t,n),file:n.fileName}}}var Gle={};a(Gle,{getDocCommentTemplateAtPosition:()=>d_e,getJSDocParameterNameCompletionDetails:()=>u_e,getJSDocParameterNameCompletions:()=>__e,getJSDocTagCompletionDetails:()=>l_e,getJSDocTagCompletions:()=>c_e,getJSDocTagNameCompletionDetails:()=>s_e,getJSDocTagNameCompletions:()=>a_e,getJsDocCommentsFromDeclarations:()=>Zle,getJsDocTagsFromDeclarations:()=>t_e});var Xle,Qle,Yle=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"];function Zle(e,t){const n=[];return LY(e,e=>{for(const r of function(e){switch(e.kind){case 342:case 349:return[e];case 339:case 347:return[e,e.parent];case 324:if(UP(e.parent))return[e.parent.parent];default:return Ug(e)}}(e)){const i=PP(r)&&r.tags&&T(r.tags,e=>328===e.kind&&("inheritDoc"===e.tagName.escapedText||"inheritdoc"===e.tagName.escapedText));if(void 0===r.comment&&!i||PP(r)&&347!==e.kind&&339!==e.kind&&r.tags&&r.tags.some(e=>347===e.kind||339===e.kind)&&!r.tags.some(e=>342===e.kind||343===e.kind))continue;let o=r.comment?i_e(r.comment,t):[];i&&i.comment&&(o=o.concat(i_e(i.comment,t))),D(n,o,e_e)||n.push(o)}}),M(S(n,[oZ()]))}function e_e(e,t){return ae(e,t,(e,t)=>e.kind===t.kind&&e.text===t.text)}function t_e(e,t){const n=[];return LY(e,e=>{const r=dl(e);if(!r.some(e=>347===e.kind||339===e.kind)||r.some(e=>342===e.kind||343===e.kind))for(const e of r)n.push({name:e.tagName.text,text:o_e(e,t)}),n.push(...n_e(r_e(e),t))}),n}function n_e(e,t){return R(e,e=>Y([{name:e.tagName.text,text:o_e(e,t)}],n_e(r_e(e),t)))}function r_e(e){return Ol(e)&&e.isNameFirst&&e.typeExpression&&AP(e.typeExpression.type)?e.typeExpression.type.jsDocPropertyTags:void 0}function i_e(e,t){return"string"==typeof e?[QY(e)]:R(e,e=>322===e.kind?[QY(e.text)]:nZ(e,t))}function o_e(e,t){const{comment:n,kind:r}=e,i=function(e){switch(e){case 342:return HY;case 349:return GY;case 346:return ZY;case 347:case 339:return YY;default:return QY}}(r);switch(r){case 350:const r=e.typeExpression;return r?o(r):void 0===n?void 0:i_e(n,t);case 330:case 329:return o(e.class);case 346:const a=e,s=[];if(a.constraint&&s.push(QY(a.constraint.getText())),m(a.typeParameters)){m(s)&&s.push(VY());const e=a.typeParameters[a.typeParameters.length-1];g(a.typeParameters,t=>{s.push(i(t.getText())),e!==t&&s.push($Y(28),VY())})}return n&&s.push(VY(),...i_e(n,t)),s;case 345:case 351:return o(e.typeExpression);case 347:case 339:case 349:case 342:case 348:const{name:c}=e;return c?o(c):void 0===n?void 0:i_e(n,t);default:return void 0===n?void 0:i_e(n,t)}function o(e){return r=e.getText(),n?r.match(/^https?$/)?[QY(r),...i_e(n,t)]:[i(r),VY(),...i_e(n,t)]:[QY(r)];var r}}function a_e(){return Xle||(Xle=O(Yle,e=>({name:e,kind:"keyword",kindModifiers:"",sortText:Mae.SortText.LocationPriority})))}var s_e=l_e;function c_e(){return Qle||(Qle=O(Yle,e=>({name:`@${e}`,kind:"keyword",kindModifiers:"",sortText:Mae.SortText.LocationPriority})))}function l_e(e){return{name:e,kind:"",kindModifiers:"",displayParts:[QY(e)],documentation:p,tags:void 0,codeActions:void 0}}function __e(e){if(!fD(e.name))return p;const t=e.name.text,n=e.parent,r=n.parent;return __(r)?U(r.parameters,r=>{if(!fD(r.name))return;const i=r.name.text;return n.tags.some(t=>t!==e&&KP(t)&&fD(t.name)&&t.name.escapedText===i)||void 0!==t&&!en(i,t)?void 0:{name:i,kind:"parameter",kindModifiers:"",sortText:Mae.SortText.LocationPriority}}):[]}function u_e(e){return{name:e,kind:"parameter",kindModifiers:"",displayParts:[QY(e)],documentation:p,tags:void 0,codeActions:void 0}}function d_e(e,t,n,r){const i=dQ(t,n),o=yc(i,PP);if(o&&(void 0!==o.comment||m(o.tags)))return;const a=i.getStart(t);if(!o&&ap_e(e,t))}(i,r);if(!s)return;const{commentOwner:c,parameters:l,hasReturn:_}=s,u=ke(Lu(c)&&c.jsDoc?c.jsDoc:void 0);if(c.getStart(t){const a=80===e.kind?e.text:"param"+o;return`${n} * @param ${t?i?"{...any} ":"{any} ":""}${a}${r}`}).join("")}(l||[],p,d,e):"")+(_?function(e,t){return`${e} * @returns${t}`}(d,e):""),g=m(dl(c))>0;if(f&&!g){const t="/**"+e+d+" * ";return{newText:t+e+f+d+" */"+(a===n?e+d:""),caretOffset:t.length}}return{newText:"/** */",caretOffset:3}}function p_e(e,t){switch(e.kind){case 263:case 219:case 175:case 177:case 174:case 220:const n=e;return{commentOwner:e,parameters:n.parameters,hasReturn:f_e(n,t)};case 304:return p_e(e.initializer,t);case 264:case 265:case 267:case 307:case 266:return{commentOwner:e};case 172:{const n=e;return n.type&&KD(n.type)?{commentOwner:e,parameters:n.type.parameters,hasReturn:f_e(n.type,t)}:{commentOwner:e}}case 244:{const n=e.declarationList.declarations,r=1===n.length&&n[0].initializer?function(e){for(;218===e.kind;)e=e.expression;switch(e.kind){case 219:case 220:return e;case 232:return T(e.members,BD)}}(n[0].initializer):void 0;return r?{commentOwner:e,parameters:r.parameters,hasReturn:f_e(r,t)}:{commentOwner:e}}case 308:return"quit";case 268:return 268===e.parent.kind?void 0:{commentOwner:e};case 245:return p_e(e.expression,t);case 227:{const n=e;return 0===cg(n)?"quit":__(n.right)?{commentOwner:e,parameters:n.right.parameters,hasReturn:f_e(n.right,t)}:{commentOwner:e}}case 173:const r=e.initializer;if(r&&(NE(r)||DE(r)))return{commentOwner:e,parameters:r.parameters,hasReturn:f_e(r,t)}}}function f_e(e,t){return!!(null==t?void 0:t.generateReturnInDocTemplate)&&(KD(e)||DE(e)&&Q_(e.body)||d_(e)&&e.body&&YE(e.body)&&!!Lf(e.body,e=>e))}var m_e={};function g_e(e,t,n,r,i,o){return sde.ChangeTracker.with({host:r,formatContext:i,preferences:o},r=>{const i=t.map(t=>function(e,t){const n=[{parse:()=>uO("__mapcode_content_nodes.ts",t,e.languageVersion,!0,e.scriptKind),body:e=>e.statements},{parse:()=>uO("__mapcode_class_content_nodes.ts",`class __class {\n${t}\n}`,e.languageVersion,!0,e.scriptKind),body:e=>e.statements[0].members}],r=[];for(const{parse:e,body:t}of n){const n=e(),i=t(n);if(i.length&&0===n.parseDiagnostics.length)return i;i.length&&r.push({sourceFile:n,body:i})}r.sort((e,t)=>e.sourceFile.parseDiagnostics.length-t.sourceFile.parseDiagnostics.length);const{body:i}=r[0];return i}(e,t)),o=n&&M(n);for(const t of i)h_e(e,r,t,o)})}function h_e(e,t,n,r){h_(n[0])||T_(n[0])?function(e,t,n,r){let i;i=r&&r.length?g(r,t=>yc(dQ(e,t.start),an(y_,xF))):T(e.statements,an(y_,xF));if(!i)return;const o=i.members.find(e=>n.some(t=>y_e(t,e)));if(o){const r=C(i.members,e=>n.some(t=>y_e(t,e)));return g(n,v_e),void t.replaceNodeRangeWithNodes(e,o,r,n)}g(n,v_e),t.insertNodesAfter(e,i.members[i.members.length-1],n)}(e,t,n,r):function(e,t,n,r){if(!(null==r?void 0:r.length))return void t.insertNodesAtEndOfFile(e,n,!1);for(const i of r){const r=yc(dQ(e,i.start),e=>an(YE,mP)(e)&&X(e.statements,e=>n.some(t=>y_e(t,e))));if(r){const i=r.statements.find(e=>n.some(t=>y_e(t,e)));if(i){const o=C(r.statements,e=>n.some(t=>y_e(t,e)));return g(n,v_e),void t.replaceNodeRangeWithNodes(e,i,o,n)}}}let i=e.statements;for(const t of r){const n=yc(dQ(e,t.start),YE);if(n){i=n.statements;break}}g(n,v_e),t.insertNodesAfter(e,i[i.length-1],n)}(e,t,n,r)}function y_e(e,t){var n,r,i,o,a,s;return e.kind===t.kind&&(177===e.kind?e.kind===t.kind:Fc(e)&&Fc(t)?e.name.getText()===t.name.getText():nF(e)&&nF(t)||iF(e)&&iF(t)?e.expression.getText()===t.expression.getText():oF(e)&&oF(t)?(null==(n=e.initializer)?void 0:n.getText())===(null==(r=t.initializer)?void 0:r.getText())&&(null==(i=e.incrementor)?void 0:i.getText())===(null==(o=t.incrementor)?void 0:o.getText())&&(null==(a=e.condition)?void 0:a.getText())===(null==(s=t.condition)?void 0:s.getText()):iu(e)&&iu(t)?e.expression.getText()===t.expression.getText()&&e.initializer.getText()===t.initializer.getText():pF(e)&&pF(t)?e.label.getText()===t.label.getText():e.getText()===t.getText())}function v_e(e){b_e(e),e.parent=void 0}function b_e(e){e.pos=-1,e.end=-1,e.forEachChild(b_e)}a(m_e,{mapCode:()=>g_e});var x_e={};function S_e(e,t,n,r,i,o){const a=sde.ChangeTracker.fromContext({host:n,formatContext:t,preferences:i}),s="SortAndCombine"===o||"All"===o,c=s,l="RemoveUnused"===o||"All"===o,_=e.statements.filter(EF),u=T_e(e,_),{comparersToTest:d,typeOrdersToTest:p}=k_e(i),f=d[0],g={moduleSpecifierComparer:"boolean"==typeof i.organizeImportsIgnoreCase?f:void 0,namedImportComparer:"boolean"==typeof i.organizeImportsIgnoreCase?f:void 0,typeOrder:i.organizeImportsTypeOrder};if("boolean"!=typeof i.organizeImportsIgnoreCase&&({comparer:g.moduleSpecifierComparer}=j_e(u,d)),!g.typeOrder||"boolean"!=typeof i.organizeImportsIgnoreCase){const e=M_e(_,d,p);if(e){const{namedImportComparer:t,typeOrder:n}=e;g.namedImportComparer=g.namedImportComparer??t,g.typeOrder=g.typeOrder??n}}u.forEach(e=>y(e,g)),"RemoveUnused"!==o&&function(e){const t=[],n=e.statements,r=m(n);let i=0,o=0;for(;iT_e(e,t))}(e).forEach(e=>v(e,g.namedImportComparer));for(const t of e.statements.filter(mp)){if(!t.body)continue;if(T_e(e,t.body.statements.filter(EF)).forEach(e=>y(e,g)),"RemoveUnused"!==o){v(t.body.statements.filter(zF),g.namedImportComparer)}}return a.getChanges();function h(r,i){if(0===m(r))return;Ew(r[0],1024);const o=c?We(r,e=>w_e(e.moduleSpecifier)):[r],l=R(s?me(o,(e,t)=>A_e(e[0].moduleSpecifier,t[0].moduleSpecifier,g.moduleSpecifierComparer??f)):o,e=>w_e(e[0].moduleSpecifier)||void 0===e[0].moduleSpecifier?i(e):e);if(0===l.length)a.deleteNodes(e,r,{leadingTriviaOption:sde.LeadingTriviaOption.Exclude,trailingTriviaOption:sde.TrailingTriviaOption.Include},!0);else{const i={leadingTriviaOption:sde.LeadingTriviaOption.Exclude,trailingTriviaOption:sde.TrailingTriviaOption.Include,suffix:iZ(n,t.options)};a.replaceNodeWithNodes(e,r[0],l,i);const o=a.nodeHasTrailingComment(e,r[0],i);a.deleteNodes(e,r.slice(1),{trailingTriviaOption:sde.TrailingTriviaOption.Include},o)}}function y(t,n){const i=n.moduleSpecifierComparer??f,o=n.namedImportComparer??f,a=W_e({organizeImportsTypeOrder:n.typeOrder??"last"},o);h(t,t=>(l&&(t=function(e,t,n){const r=n.getTypeChecker(),i=n.getCompilerOptions(),o=r.getJsxNamespace(t),a=r.getJsxFragmentFactory(t),s=!!(2&t.transformFlags),c=[];for(const n of e){const{importClause:e,moduleSpecifier:r}=n;if(!e){c.push(n);continue}let{name:i,namedBindings:o}=e;if(i&&!l(i)&&(i=void 0),o)if(jF(o))l(o.name)||(o=void 0);else{const e=o.elements.filter(e=>l(e.name));e.lengthG_e(e,t,i))),t))}function v(e,t){const n=W_e(i,t);h(e,e=>E_e(e,n))}}function k_e(e){return{comparersToTest:"boolean"==typeof e.organizeImportsIgnoreCase?[U_e(e,e.organizeImportsIgnoreCase)]:[U_e(e,!0),U_e(e,!1)],typeOrdersToTest:e.organizeImportsTypeOrder?[e.organizeImportsTypeOrder]:["last","inline","first"]}}function T_e(e,t){const n=ks(e.languageVersion,!1,e.languageVariant),r=[];let i=0;for(const o of t)r[i]&&C_e(e,o,n)&&i++,r[i]||(r[i]=[]),r[i].push(o);return r}function C_e(e,t,n){const r=t.getFullStart(),i=t.getStart();n.setText(e.text,r,i-r);let o=0;for(;n.getTokenStart()=2))return!0}return!1}function w_e(e){return void 0!==e&&Uu(e)?e.text:void 0}function N_e(e){let t;const n={defaultImports:[],namespaceImports:[],namedImports:[]},r={defaultImports:[],namespaceImports:[],namedImports:[]};for(const i of e){if(void 0===i.importClause){t=t||i;continue}const e=i.importClause.isTypeOnly?n:r,{name:o,namedBindings:a}=i.importClause;o&&e.defaultImports.push(i),a&&(jF(a)?e.namespaceImports.push(i):e.namedImports.push(i))}return{importWithoutClause:t,typeOnlyImports:n,regularImports:r}}function D_e(e,t,n,r){if(0===e.length)return e;const i=$e(e,e=>{if(e.attributes){let t=e.attributes.token+" ";for(const n of me(e.attributes.elements,(e,t)=>Ft(e.name.text,t.name.text)))t+=n.name.text+":",t+=Uu(n.value)?`"${n.value.text}"`:n.value.getText()+" ";return t}return""}),o=[];for(const e in i){const a=i[e],{importWithoutClause:s,typeOnlyImports:c,regularImports:l}=N_e(a);s&&o.push(s);for(const e of[l,c]){const i=e===c,{defaultImports:a,namespaceImports:s,namedImports:l}=e;if(!i&&1===a.length&&1===s.length&&0===l.length){const e=a[0];o.push(F_e(e,e.importClause.name,s[0].importClause.namedBindings));continue}const _=me(s,(e,n)=>t(e.importClause.namedBindings.name.text,n.importClause.namedBindings.name.text));for(const e of _)o.push(F_e(e,void 0,e.importClause.namedBindings));const u=ve(a),d=ve(l),f=u??d;if(!f)continue;let m;const g=[];if(1===a.length)m=a[0].importClause.name;else for(const e of a)g.push(kw.createImportSpecifier(!1,kw.createIdentifier("default"),e.importClause.name));g.push(...L_e(l));const h=kw.createNodeArray(me(g,n),null==d?void 0:d.importClause.namedBindings.elements.hasTrailingComma),y=0===h.length?m?void 0:kw.createNamedImports(p):d?kw.updateNamedImports(d.importClause.namedBindings,h):kw.createNamedImports(h);r&&y&&(null==d?void 0:d.importClause.namedBindings)&&!$b(d.importClause.namedBindings,r)&&Ew(y,2),i&&m&&y?(o.push(F_e(f,m,void 0)),o.push(F_e(d??f,void 0,y))):o.push(F_e(f,m,y))}}return o}function E_e(e,t){if(0===e.length)return e;const{exportWithoutClause:n,namedExports:r,typeOnlyExports:i}=function(e){let t;const n=[],r=[];for(const i of e)void 0===i.exportClause?t=t||i:i.isTypeOnly?r.push(i):n.push(i);return{exportWithoutClause:t,namedExports:n,typeOnlyExports:r}}(e),o=[];n&&o.push(n);for(const e of[r,i]){if(0===e.length)continue;const n=[];n.push(...R(e,e=>e.exportClause&&qF(e.exportClause)?e.exportClause.elements:p));const r=me(n,t),i=e[0];o.push(kw.updateExportDeclaration(i,i.modifiers,i.isTypeOnly,i.exportClause&&(qF(i.exportClause)?kw.updateNamedExports(i.exportClause,r):kw.updateNamespaceExport(i.exportClause,i.exportClause.name)),i.moduleSpecifier,i.attributes))}return o}function F_e(e,t,n){return kw.updateImportDeclaration(e,e.modifiers,kw.updateImportClause(e.importClause,e.importClause.phaseModifier,t,n),e.moduleSpecifier,e.attributes)}function P_e(e,t,n,r){switch(null==r?void 0:r.organizeImportsTypeOrder){case"first":return Bt(t.isTypeOnly,e.isTypeOnly)||n(e.name.text,t.name.text);case"inline":return n(e.name.text,t.name.text);default:return Bt(e.isTypeOnly,t.isTypeOnly)||n(e.name.text,t.name.text)}}function A_e(e,t,n){const r=void 0===e?void 0:w_e(e),i=void 0===t?void 0:w_e(t);return Bt(void 0===r,void 0===i)||Bt(As(r),As(i))||n(r,i)}function I_e(e){var t;switch(e.kind){case 272:return null==(t=at(e.moduleReference,HF))?void 0:t.expression;case 273:return e.moduleSpecifier;case 244:return e.declarationList.declarations[0].initializer.arguments[0]}}function O_e(e,t){const n=QN(t)&&t.text;return it(n)&&X(e.moduleAugmentations,e=>QN(e)&&e.text===n)}function L_e(e){return R(e,e=>O(function(e){var t;return(null==(t=e.importClause)?void 0:t.namedBindings)&&RF(e.importClause.namedBindings)?e.importClause.namedBindings.elements:void 0}(e),e=>e.name&&e.propertyName&&ep(e.name)===ep(e.propertyName)?kw.updateImportSpecifier(e,e.isTypeOnly,void 0,e.name):e))}function j_e(e,t){const n=[];return e.forEach(e=>{n.push(e.map(e=>w_e(I_e(e))||""))}),B_e(n,t)}function M_e(e,t,n){let r=!1;const i=e.filter(e=>{var t,n;const i=null==(n=at(null==(t=e.importClause)?void 0:t.namedBindings,RF))?void 0:n.elements;return!!(null==i?void 0:i.length)&&(!r&&i.some(e=>e.isTypeOnly)&&i.some(e=>!e.isTypeOnly)&&(r=!0),!0)});if(0===i.length)return;const o=i.map(e=>{var t,n;return null==(n=at(null==(t=e.importClause)?void 0:t.namedBindings,RF))?void 0:n.elements}).filter(e=>void 0!==e);if(!r||0===n.length){const e=B_e(o.map(e=>e.map(e=>e.name.text)),t);return{namedImportComparer:e.comparer,typeOrder:1===n.length?n[0]:void 0,isSorted:e.isSorted}}const a={first:1/0,last:1/0,inline:1/0},s={first:t[0],last:t[0],inline:t[0]};for(const e of t){const t={first:0,last:0,inline:0};for(const r of o)for(const i of n)t[i]=(t[i]??0)+R_e(r,(t,n)=>P_e(t,n,e,{organizeImportsTypeOrder:i}));for(const r of n){const n=r;t[n]0&&n++;return n}function B_e(e,t){let n,r=1/0;for(const i of t){let t=0;for(const n of e){if(n.length<=1)continue;t+=R_e(n,i)}tP_e(t,r,n,e)}function $_e(e,t,n){const{comparersToTest:r,typeOrdersToTest:i}=k_e(t),o=M_e([e],r,i);let a,s=W_e(t,r[0]);if("boolean"!=typeof t.organizeImportsIgnoreCase||!t.organizeImportsTypeOrder)if(o){const{namedImportComparer:e,typeOrder:t,isSorted:n}=o;a=n,s=W_e({organizeImportsTypeOrder:t},e)}else if(n){const e=M_e(n.statements.filter(EF),r,i);if(e){const{namedImportComparer:t,typeOrder:n,isSorted:r}=e;a=r,s=W_e({organizeImportsTypeOrder:n},t)}}return{specifierComparer:s,isSorted:a}}function K_e(e,t,n){const r=Ee(e,t,dt,(e,t)=>G_e(e,t,n));return r<0?~r:r}function H_e(e,t,n){const r=Ee(e,t,dt,n);return r<0?~r:r}function G_e(e,t,n){return A_e(I_e(e),I_e(t),n)||function(e,t){return Tt(J_e(e),J_e(t))}(e,t)}function X_e(e,t,n,r){const i=z_e(t);return D_e(e,i,W_e({organizeImportsTypeOrder:null==r?void 0:r.organizeImportsTypeOrder},i),n)}function Q_e(e,t,n){return E_e(e,(e,r)=>P_e(e,r,z_e(t),{organizeImportsTypeOrder:(null==n?void 0:n.organizeImportsTypeOrder)??"last"}))}function Y_e(e,t,n){return A_e(e,t,z_e(!!n))}a(x_e,{compareImportsOrRequireStatements:()=>G_e,compareModuleSpecifiers:()=>Y_e,getImportDeclarationInsertionIndex:()=>K_e,getImportSpecifierInsertionIndex:()=>H_e,getNamedImportSpecifierComparerWithDetection:()=>$_e,getOrganizeImportsStringComparerWithDetection:()=>V_e,organizeImports:()=>S_e,testCoalesceExports:()=>Q_e,testCoalesceImports:()=>X_e});var Z_e={};function eue(e,t){const n=[];return function(e,t,n){let r=40,i=0;const o=e.statements,a=o.length;for(;i...")}function a(e){const n=Zs(e.openingFragment.getStart(t),e.closingFragment.getEnd());return sue(n,"code",n,!1,"<>...")}function s(e){if(0!==e.properties.length)return oue(e.getStart(t),e.getEnd(),"code")}function c(e){if(15!==e.kind||0!==e.text.length)return oue(e.getStart(t),e.getEnd(),"code")}function l(e,t=19){return _(e,!1,!yE(e.parent)&&!SE(e.parent),t)}function _(n,r=!1,i=!0,o=19,a=(19===o?20:24)){const s=YX(e,o,t),c=YX(e,a,t);return s&&c&&aue(s,c,n,t,r,i)}function u(e){return e.length?sue(QQ(e),"code"):void 0}function d(e){if(ex(e.getStart(),e.getEnd(),t))return;return sue(Zs(e.getStart(),e.getEnd()),"code",HQ(e))}}(i,e);a&&n.push(a),r--,SE(i)?(r++,s(i.expression),r--,i.arguments.forEach(s),null==(o=i.typeArguments)||o.forEach(s)):nF(i)&&i.elseStatement&&nF(i.elseStatement)?(s(i.expression),s(i.thenStatement),r++,s(i.elseStatement),r--):i.forEachChild(s),r++}s(e.endOfFileToken)}(e,t,n),function(e,t){const n=[],r=e.getLineStarts();for(const i of r){const r=e.getLineEndOfPosition(i),o=nue(e.text.substring(i,r));if(o&&!PQ(e,i))if(o.isStart){const t=Zs(e.text.indexOf("//",i),r);n.push(sue(t,"region",t,!1,o.name||"#region"))}else{const e=n.pop();e&&(e.textSpan.length=r-e.textSpan.start,e.hintSpan.length=r-e.textSpan.start,t.push(e))}}}(e,n),n.sort((e,t)=>e.textSpan.start-t.textSpan.start),n}a(Z_e,{collectElements:()=>eue});var tue=/^#(end)?region(.*)\r?$/;function nue(e){if(!en(e=e.trimStart(),"//"))return null;e=e.slice(2).trim();const t=tue.exec(e);return t?{isStart:!t[1],name:t[2].trim()}:void 0}function rue(e,t,n,r){const i=hs(t.text,e);if(!i)return;let o=-1,a=-1,s=0;const c=t.getFullText();for(const{kind:e,pos:t,end:_}of i)switch(n.throwIfCancellationRequested(),e){case 2:if(nue(c.slice(t,_))){l(),s=0;break}0===s&&(o=t),a=_,s++;break;case 3:l(),r.push(oue(t,_,"comment")),s=0;break;default:gn.assertNever(e)}function l(){s>1&&r.push(oue(o,a,"comment"))}l()}function iue(e,t,n,r){YN(e)||rue(e.pos,t,n,r)}function oue(e,t,n){return sue(Zs(e,t),n)}function aue(e,t,n,r,i=!1,o=!0){return sue(Zs(o?e.getFullStart():e.getStart(r),t.getEnd()),"code",HQ(n,r),i)}function sue(e,t,n=e,r=!1,i="..."){return{textSpan:e,kind:t,hintSpan:n,bannerText:i,autoCollapse:r}}var cue={};function lue(e,t,n,r){const i=lQ(_Q(t,n));if(fue(i)){const n=function(e,t,n,r,i){const o=t.getSymbolAtLocation(e);if(!o){if(Uu(e)){const r=rQ(e,t);if(r&&(128&r.flags||1048576&r.flags&&k(r.types,e=>!!(128&e.flags))))return uue(e.text,e.text,"string","",e,n)}else if(wX(e)){const t=rp(e);return uue(t,t,"label","",e,n)}return}const{declarations:a}=o;if(!a||0===a.length)return;if(a.some(e=>function(e,t){const n=t.getSourceFile();return e.isSourceFileDefaultLibrary(n)&&Eo(n.fileName,".d.ts")}(r,e)))return due(ha.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(fD(e)&&"default"===e.escapedText&&o.parent&&1536&o.parent.flags)return;if(Uu(e)&&Ng(e))return i.allowRenameOfImportPath?function(e,t,n){if(!As(e.text))return due(ha.You_cannot_rename_a_module_via_a_global_import);const r=n.declarations&&T(n.declarations,mP);if(!r)return;const i=qt(e.text,"/index")||qt(e.text,"/index.js")?void 0:Vt(Qk(r.fileName),"/index"),o=void 0===i?r.fileName:i,a=void 0===i?"module":"directory",s=e.text.lastIndexOf("/")+1,c=Ys(e.getStart(t)+1+s,e.text.length-s);return{canRename:!0,fileToRename:o,kind:a,displayName:o,fullDisplayName:e.text,kindModifiers:"",triggerSpan:c}}(e,n,o):void 0;const s=function(e,t,n,r){if(!r.providePrefixAndSuffixTextForRename&&2097152&t.flags){const e=t.declarations&&T(t.declarations,e=>BF(e));e&&!e.propertyName&&(t=n.getAliasedSymbol(t))}const{declarations:i}=t;if(!i)return;const o=_ue(e.path);if(void 0===o)return X(i,e=>YZ(e.getSourceFile().path))?ha.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:void 0;for(const e of i){const t=_ue(e.getSourceFile().path);if(t){const e=Math.min(o.length,t.length);for(let n=0;n<=e;n++)if(0!==Ft(o[n],t[n]))return ha.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder}}return}(n,o,t,i);if(s)return due(s);const c=Yue.getSymbolKind(t,o,e),l=_Z(e)||Uh(e)&&168===e.parent.kind?jy(Gh(e)):void 0,_=l||t.symbolToString(o),u=l||t.getFullyQualifiedName(o);return uue(_,u,c,Yue.getSymbolModifiers(t,o),e,n)}(i,e.getTypeChecker(),t,e,r);if(n)return n}return due(ha.You_cannot_rename_this_element)}function _ue(e){const t=Bo(e),n=t.lastIndexOf("node_modules");if(-1!==n)return t.slice(0,n+2)}function uue(e,t,n,r,i,o){return{canRename:!0,fileToRename:void 0,kind:n,displayName:e,fullDisplayName:t,kindModifiers:r,triggerSpan:pue(i,o)}}function due(e){return{canRename:!1,localizedErrorMessage:Yx(e)}}function pue(e,t){let n=e.getStart(t),r=e.getWidth(t);return Uu(e)&&(n+=1,r-=2),Ys(n,r)}function fue(e){switch(e.kind){case 80:case 81:case 11:case 15:case 110:return!0;case 9:return IX(e);default:return!1}}a(cue,{getRenameInfo:()=>lue,nodeIsEligibleForRename:()=>fue});var mue={};function gue(e,t,n,r,i){const o=e.getTypeChecker(),a=mQ(t,n);if(!a)return;const s=!!r&&"characterTyped"===r.kind;if(s&&(xQ(t,n,a)||PQ(t,n)))return;const c=!!r&&"invoked"===r.kind,l=function(e,t,n,r,i){for(let o=e;!mP(o)&&(i||!YE(o));o=o.parent){gn.assert(ix(o.parent,o),"Not a subspan",()=>`Child: ${gn.formatSyntaxKind(o.kind)}, parent: ${gn.formatSyntaxKind(o.parent.kind)}`);const e=xue(o,t,n,r);if(e)return e}return}(a,n,t,o,c);if(!l)return;i.throwIfCancellationRequested();const _=function({invocation:e,argumentCount:t},n,r,i,o){switch(e.kind){case 0:{if(o&&!function(e,t,n){if(!U_(t))return!1;const r=t.getChildren(n);switch(e.kind){case 21:return D(r,e);case 28:{const t=ZX(e);return!!t&&D(r,t)}case 30:return hue(e,n,t.expression);default:return!1}}(i,e.node,r))return;const a=[],s=n.getResolvedSignatureForSignatureHelp(e.node,a,t);return 0===a.length?void 0:{kind:0,candidates:a,resolvedSignature:s}}case 1:{const{called:a}=e;if(o&&!hue(i,r,fD(a)?a.parent:a))return;const s=EQ(a,t,n);if(0!==s.length)return{kind:0,candidates:s,resolvedSignature:xe(s)};const c=n.getSymbolAtLocation(a);return c&&{kind:1,symbol:c}}case 2:return{kind:0,candidates:[e.signature],resolvedSignature:e.signature};default:return gn.assertNever(e)}}(l,o,t,a,s);return i.throwIfCancellationRequested(),_?o.runWithCancellationToken(i,e=>0===_.kind?Oue(_.candidates,_.resolvedSignature,l,t,e):function(e,{argumentCount:t,argumentsSpan:n,invocation:r,argumentIndex:i},o,a){const s=a.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);if(!s)return;const c=[Lue(e,s,a,Aue(r),o)];return{items:c,applicableSpan:n,selectedItemIndex:0,argumentIndex:i,argumentCount:t}}(_.symbol,l,t,e)):jm(t)?function(e,t,n){if(2===e.invocation.kind)return;const r=Pue(e.invocation),i=bE(r)?r.name.text:void 0,o=t.getTypeChecker();return void 0===i?void 0:y(t.getSourceFiles(),t=>y(t.getNamedDeclarations().get(i),r=>{const i=r.symbol&&o.getTypeOfSymbolAtLocation(r.symbol,r),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,n=>Oue(a,a[0],e,t,n,!0))}))}(l,e,i):void 0}function hue(e,t,n){const r=e.getFullStart();let i=e.parent;for(;i;){const e=hQ(r,t,i,!0);if(e)return ix(n,e);i=i.parent}return gn.fail("Could not find preceding token")}function yue(e,t,n,r){const i=bue(e,t,n,r);return!i||i.isTypeParameterList||0!==i.invocation.kind?void 0:{invocation:i.invocation.node,argumentCount:i.argumentCount,argumentIndex:i.argumentIndex}}function vue(e,t,n,r){const i=function(e,t,n){if(30===e.kind||21===e.kind)return{list:Fue(e.parent,e,t),argumentIndex:0};{const t=ZX(e);return t&&{list:t,argumentIndex:wue(n,t,e)}}}(e,n,r);if(!i)return;const{list:o,argumentIndex:a}=i,s=function(e,t){return Nue(e,t,void 0)}(r,o),c=function(e,t){const n=e.getFullStart(),r=is(t.text,e.getEnd(),!1);return Ys(n,r-n)}(o,n);return{list:o,argumentIndex:a,argumentCount:s,argumentsSpan:c}}function bue(e,t,n,r){const{parent:i}=e;if(U_(i)){const t=i,o=vue(e,0,n,r);if(!o)return;const{list:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===a.pos,invocation:{kind:0,node:t},argumentsSpan:l,argumentIndex:s,argumentCount:c}}if(eD(e)&&TE(i))return JQ(e,t,n)?Due(i,0,n):void 0;if(tD(e)&&216===i.parent.kind){const r=i,o=r.parent;gn.assert(229===r.kind);return Due(o,JQ(e,t,n)?0:1,n)}if(XE(i)&&TE(i.parent.parent)){const r=i,o=i.parent.parent;if(rD(e)&&!JQ(e,t,n))return;const a=function(e,t,n,r){if(gn.assert(n>=t.getStart(),"Assumed 'position' could not occur before node."),Ul(t))return JQ(t,n,r)?0:e+2;return e+1}(r.parent.templateSpans.indexOf(r),e,t,n);return Due(o,a,n)}if(Nu(i)){const e=i.attributes.pos;return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:Ys(e,is(n.text,i.attributes.end,!1)-e),argumentIndex:0,argumentCount:1}}{const t=FQ(e,n);if(t){const{called:r,nTypeArguments:i}=t;return{isTypeParameterList:!0,invocation:{kind:1,called:r},argumentsSpan:Zs(r.getStart(n),e.end),argumentIndex:i,argumentCount:i+1}}return}}function xue(e,t,n,r){return function(e,t,n,r){const i=function(e){switch(e.kind){case 21:case 28:return e;default:return yc(e.parent,e=>!!AD(e)||!(hE(e)||mE(e)||gE(e))&&"quit")}}(e);if(void 0===i)return;const o=function(e,t,n,r){const{parent:i}=e;switch(i.kind){case 218:case 175:case 219:case 220:const n=vue(e,0,t,r);if(!n)return;const{argumentIndex:o,argumentCount:a,argumentsSpan:s}=n,c=MD(i)?r.getContextualTypeForObjectLiteralElement(i):r.getContextualType(i);return c&&{contextualType:c,argumentIndex:o,argumentCount:a,argumentsSpan:s};case 227:{const t=Sue(i),n=r.getContextualType(t),o=21===e.kind?0:kue(i)-1,a=kue(t);return n&&{contextualType:n,argumentIndex:o,argumentCount:a,argumentsSpan:HQ(i)}}default:return}}(i,n,0,r);if(void 0===o)return;const{contextualType:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o,_=a.getNonNullableType(),u=_.symbol;if(void 0===u)return;const d=ke(_.getCallSignatures());if(void 0===d)return;return{isTypeParameterList:!1,invocation:{kind:2,signature:d,node:e,symbol:Tue(u)},argumentsSpan:l,argumentIndex:s,argumentCount:c}}(e,0,n,r)||bue(e,t,n,r)}function Sue(e){return LE(e.parent)?Sue(e.parent):e}function kue(e){return LE(e.left)?kue(e.left)+1:2}function Tue(e){return"__type"===e.name&&y(e.declarations,e=>{var t;return KD(e)?null==(t=at(e.parent,pu))?void 0:t.symbol:void 0})||e}function Cue(e,t){const n=t.getTypeAtLocation(e.expression);if(t.isTupleType(n)){const{elementFlags:e,fixedLength:t}=n.target;if(0===t)return 0;const r=w(e,e=>!(1&e));return r<0?t:r}return 0}function wue(e,t,n){return Nue(e,t,n)}function Nue(e,t,n){const r=t.getChildren();let i=0,o=!1;for(const t of r){if(n&&t===n)return o||28!==t.kind||i++,i;BE(t)?(i+=Cue(t,e),o=!0):28===t.kind?o?o=!1:i++:(i++,o=!0)}return n?i:r.length&&28===Te(r).kind?i+1:i}function Due(e,t,n){const r=eD(e.template)?1:e.template.templateSpans.length+1;return 0!==t&&gn.assertLessThan(t,r),{isTypeParameterList:!1,invocation:{kind:0,node:e},argumentsSpan:Eue(e,n),argumentIndex:t,argumentCount:r}}function Eue(e,t){const n=e.template,r=n.getStart();let i=n.getEnd();if(229===n.kind){0===Te(n.templateSpans).literal.getFullWidth()&&(i=is(t.text,i,!1))}return Ys(r,i-r)}function Fue(e,t,n){const r=e.getChildren(n),i=r.indexOf(t);return gn.assert(i>=0&&r.length>i+1),r[i+1]}function Pue(e){return 0===e.kind?ym(e.node):e.called}function Aue(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}a(mue,{getArgumentInfoForCompletions:()=>yue,getSignatureHelpItems:()=>gue});var Iue=70246400;function Oue(e,t,{isTypeParameterList:n,argumentCount:r,argumentsSpan:i,invocation:o,argumentIndex:a},s,c,l){var _;const u=Aue(o),d=2===o.kind?o.symbol:c.getSymbolAtLocation(Pue(o))||l&&(null==(_=t.declaration)?void 0:_.symbol),f=d?cZ(c,d,l?s:void 0,void 0):p,m=O(e,e=>function(e,t,n,r,i,o){const a=(n?Rue:Bue)(e,r,i,o);return O(a,({isVariadic:n,parameters:o,prefix:a,suffix:s})=>{const c=[...t,...a],l=[...s,...Mue(e,i,r)],_=e.getDocumentationComment(r),u=e.getJsDocTags();return{isVariadic:n,prefixDisplayParts:c,suffixDisplayParts:l,separatorDisplayParts:jue,parameters:o,documentation:_,tags:u}})}(e,f,n,c,u,s));let g=0,h=0;for(let n=0;n1)){let e=0;for(const t of i){if(t.isVariadic||t.parameters.length>=r){g=h+e;break}e++}}h+=i.length}gn.assert(-1!==g);const y={items:B(m,dt),applicableSpan:i,selectedItemIndex:g,argumentIndex:a,argumentCount:r},v=y.items[g];if(v.isVariadic){const e=w(v.parameters,e=>!!e.isRest);-1Jue(e,n,r,i,a)),c=e.getDocumentationComment(n),l=e.getJsDocTags(n);return{isVariadic:!1,prefixDisplayParts:[...o,$Y(30)],suffixDisplayParts:[$Y(32)],separatorDisplayParts:jue,parameters:s,documentation:c,tags:l}}var jue=[$Y(28),VY()];function Mue(e,t,n){return aZ(r=>{r.writePunctuation(":"),r.writeSpace(" ");const i=n.getTypePredicateOfSignature(e);i?n.writeTypePredicate(i,t,void 0,r):n.writeType(n.getReturnTypeOfSignature(e),t,void 0,r)})}function Rue(e,t,n,r){const i=(e.target||e).typeParameters,o=IU(),a=(i||p).map(e=>Jue(e,t,n,r,o)),s=e.thisParameter?[t.symbolToParameterDeclaration(e.thisParameter,n,Iue)]:[];return t.getExpandedParameters(e).map(e=>{const i=kw.createNodeArray([...s,...O(e,e=>t.symbolToParameterDeclaration(e,n,Iue))]),c=aZ(e=>{o.writeList(2576,i,r,e)});return{isVariadic:!1,parameters:a,prefix:[$Y(30)],suffix:[$Y(32),...c]}})}function Bue(e,t,n,r){const i=IU(),o=aZ(o=>{if(e.typeParameters&&e.typeParameters.length){const a=kw.createNodeArray(e.typeParameters.map(e=>t.typeParameterToDeclaration(e,n,Iue)));i.writeList(53776,a,r,o)}}),a=t.getExpandedParameters(e),s=t.hasEffectiveRestParameter(e)?1===a.length?e=>!0:e=>{var t;return!!(e.length&&32768&(null==(t=at(e[e.length-1],rd))?void 0:t.links.checkFlags))}:e=>!1;return a.map(e=>({isVariadic:s(e),parameters:e.map(e=>function(e,t,n,r,i){const o=aZ(o=>{const a=t.symbolToParameterDeclaration(e,n,Iue);i.writeNode(4,a,r,o)}),a=t.isOptionalParameter(e.valueDeclaration),s=rd(e)&&!!(32768&e.links.checkFlags);return{name:e.name,documentation:e.getDocumentationComment(t),displayParts:o,isOptional:a,isRest:s}}(e,t,n,r,i)),prefix:[...o,$Y(21)],suffix:[$Y(22)]}))}function Jue(e,t,n,r,i){const o=aZ(o=>{const a=t.typeParameterToDeclaration(e,n,Iue);i.writeNode(4,a,r,o)});return{name:e.symbol.name,documentation:e.symbol.getDocumentationComment(t),displayParts:o,isOptional:!1,isRest:!1}}var zue={};function que(e,t){var n,r;let i={textSpan:Zs(t.getFullStart(),t.getEnd())},o=t;e:for(;;){const i=Wue(o);if(!i.length)break;for(let c=0;ce)break e;const d=Ce(ys(t.text,_.end));if(d&&2===d.kind&&s(d.pos,d.end),Uue(t,e,_)){if(au(_)&&d_(o)&&!ex(_.getStart(t),_.getEnd(),t)&&a(_.getStart(t),_.getEnd()),YE(_)||XE(_)||tD(_)||rD(_)||l&&tD(l)||yF(_)&&ZE(o)||oA(_)&&yF(o)||hF(_)&&oA(o)&&1===i.length||hP(_)||IP(_)||AP(_)){o=_;break}if(XE(o)&&u&&Vl(u)){a(_.getFullStart()-2,u.getStart()+1)}const e=oA(_)&&Gue(l)&&Xue(u)&&!ex(l.getStart(),u.getStart(),t);let s=e?l.getEnd():_.getStart();const c=e?u.getStart():Que(t,_);if(Lu(_)&&(null==(n=_.jsDoc)?void 0:n.length)&&a(xe(_.jsDoc).getStart(),c),oA(_)){const e=_.getChildren()[0];e&&Lu(e)&&(null==(r=e.jsDoc)?void 0:r.length)&&e.getStart()!==_.pos&&(s=Math.min(s,xe(e.jsDoc).getStart()))}a(s,c),(QN(_)||V_(_))&&a(s+1,c-1),o=_;break}if(c===i.length-1)break e}}return i;function a(t,n){if(t!==n){const r=Zs(t,n);(!i||!AY(r,i.textSpan)&&Hs(r,e))&&(i={textSpan:r,...i&&{parent:i}})}}function s(e,n){a(e,n);let r=e;for(;47===t.text.charCodeAt(r);)r++;a(r,n)}}function Uue(e,t,n){if(gn.assert(n.pos<=t),tque});var Vue=an(EF,DF);function Wue(e){var t;if(mP(e))return $ue(e.getChildAt(0).getChildren(),Vue);if(_E(e)){const[t,...n]=e.getChildren(),r=gn.checkDefined(n.pop());gn.assertEqual(t.kind,19),gn.assertEqual(r.kind,20);const i=$ue(n,t=>t===e.readonlyToken||148===t.kind||t===e.questionToken||58===t.kind);return[t,Hue(Kue($ue(i,({kind:e})=>23===e||169===e||24===e),({kind:e})=>59===e)),r]}if(OD(e)){const n=$ue(e.getChildren(),t=>t===e.name||D(e.modifiers,t)),r=321===(null==(t=n[0])?void 0:t.kind)?n[0]:void 0,i=Kue(r?n.slice(1):n,({kind:e})=>59===e);return r?[r,Hue(i)]:i}if(AD(e)){const t=$ue(e.getChildren(),t=>t===e.dotDotDotToken||t===e.name);return Kue($ue(t,n=>n===t[0]||n===e.questionToken),({kind:e})=>64===e)}return hE(e)?Kue(e.getChildren(),({kind:e})=>64===e):e.getChildren()}function $ue(e,t){const n=[];let r;for(const i of e)t(i)?(r=r||[],r.push(i)):(r&&(n.push(Hue(r)),r=void 0),n.push(i));return r&&n.push(Hue(r)),n}function Kue(e,t,n=!0){if(e.length<2)return e;const r=w(e,t);if(-1===r)return e;const i=e.slice(0,r),o=e[r],a=Te(e),s=n&&27===a.kind,c=e.slice(r+1,s?e.length-1:void 0),l=se([i.length?Hue(i):void 0,o,c.length?Hue(c):void 0]);return s?l.concat(a):l}function Hue(e){return gn.assertGreaterThanOrEqual(e.length,1),IT(jI.createSyntaxList(e),e[0].pos,Te(e).end)}function Gue(e){const t=e&&e.kind;return 19===t||23===t||21===t||287===t}function Xue(e){const t=e&&e.kind;return 20===t||24===t||22===t||288===t}function Que(e,t){switch(t.kind){case 342:case 339:case 349:case 347:case 344:return e.getLineEndOfPosition(t.getStart());default:return t.getEnd()}}var Yue={};a(Yue,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>ode,getSymbolKind:()=>ede,getSymbolModifiers:()=>rde});var Zue=70246400;function ede(e,t,n){const r=tde(e,t,n);if(""!==r)return r;const i=fx(t);return 32&i?ed(t,232)?"local class":"class":384&i?"enum":524288&i?"type":64&i?"interface":262144&i?"type parameter":8&i?"enum member":2097152&i?"alias":1536&i?"module":r}function tde(e,t,n){const r=e.getRootSymbols(t);if(1===r.length&&8192&xe(r).flags&&0!==e.getTypeOfSymbolAtLocation(t,n).getNonNullableType().getCallSignatures().length)return"method";if(e.isUndefinedSymbol(t))return"var";if(e.isArgumentsSymbol(t))return"local var";if(110===n.kind&&Q_(n)||yv(n))return"parameter";const i=fx(t);if(3&i)return JY(t)?"parameter":t.valueDeclaration&&pf(t.valueDeclaration)?"const":t.valueDeclaration&&df(t.valueDeclaration)?"using":t.valueDeclaration&&uf(t.valueDeclaration)?"await using":g(t.declarations,mf)?"let":ade(t)?"local var":"var";if(16&i)return ade(t)?"local function":"function";if(32768&i)return"getter";if(65536&i)return"setter";if(8192&i)return"method";if(16384&i)return"constructor";if(131072&i)return"index";if(4&i){if(33554432&i&&6&t.links.checkFlags){const r=g(e.getRootSymbols(t),e=>{if(98311&e.getFlags())return"property"});if(!r){return e.getTypeOfSymbolAtLocation(t,n).getCallSignatures().length?"method":"property"}return r}return"property"}return""}function nde(e){if(e.declarations&&e.declarations.length){const[t,...n]=e.declarations,r=OQ(t,m(n)&&d0(t)&&X(n,e=>!d0(e))?65536:0);if(r)return r.split(",")}return[]}function rde(e,t){if(!t)return"";const n=new Set(nde(t));if(2097152&t.flags){const r=e.getAliasedSymbol(t);r!==t&&g(nde(r),e=>{n.add(e)})}return 16777216&t.flags&&n.add("optional"),n.size>0?Be(n.values()).join(","):""}function ide(e,t,n,r,i,o,a,s,c,l){var _;const u=[];let d=[],f=[];const m=fx(t);let h=1&a?tde(e,t,i):"",v=!1;const b=110===i.kind&&Dm(i)||yv(i);let x,S,k=!1;const C={canIncreaseExpansionDepth:!1,truncated:!1};let w=!1;if(110===i.kind&&!b)return{displayParts:[WY(110)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==h||32&m||2097152&m){if("getter"===h||"setter"===h){const e=T(t.declarations,e=>e.name===i&&212!==e.kind);if(e)switch(e.kind){case 178:h="getter";break;case 179:h="setter";break;case 173:h="accessor";break;default:gn.assertNever(e)}else h="property"}let n,a;if(o??(o=b?e.getTypeAtLocation(i):e.getTypeOfSymbolAtLocation(t,i)),i.parent&&212===i.parent.kind){const e=i.parent.name;(e===i||e&&0===e.getFullWidth())&&(i=i.parent)}if(U_(i)?a=i:(uX(i)||dX(i)||i.parent&&(Nu(i.parent)||TE(i.parent))&&__(t.valueDeclaration))&&(a=i.parent),a){n=e.getResolvedSignature(a);const i=215===a.kind||SE(a)&&108===a.expression.kind,s=i?o.getConstructSignatures():o.getCallSignatures();if(!n||D(s,n.target)||D(s,n)||(n=s.length?s[0]:void 0),n){switch(i&&32&m?(h="constructor",L(o.symbol,h)):2097152&m?(h="alias",j(h),u.push(VY()),i&&(4&n.flags&&(u.push(WY(128)),u.push(VY())),u.push(WY(105)),u.push(VY())),O(t)):L(t,h),h){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":u.push($Y(59)),u.push(VY()),16&Tx(o)||!o.symbol||(de(u,cZ(e,o.symbol,r,void 0,5)),u.push(oZ())),i&&(4&n.flags&&(u.push(WY(128)),u.push(VY())),u.push(WY(105)),u.push(VY())),M(n,s,262144);break;default:M(n,s)}v=!0,k=s.length>1}}else if(AX(i)&&!(98304&m)||137===i.kind&&177===i.parent.kind){const r=i.parent;if(t.declarations&&T(t.declarations,e=>e===(137===i.kind?r.parent:r))){const i=177===r.kind?o.getNonNullableType().getConstructSignatures():o.getNonNullableType().getCallSignatures();n=e.isImplementationOfOverload(r)?i[0]:e.getSignatureFromDeclaration(r),177===r.kind?(h="constructor",L(o.symbol,h)):L(180!==r.kind||2048&o.symbol.flags||4096&o.symbol.flags?t:o.symbol,h),n&&M(n,i),v=!0,k=i.length>1}}}if(32&m&&!v&&!b){P();const e=ed(t,232);e&&(j("local class"),u.push(VY())),I(t,a)||(e||(u.push(WY(86)),u.push(VY())),O(t),R(t,n))}if(64&m&&2&a&&(F(),I(t,a)||(u.push(WY(120)),u.push(VY()),O(t),R(t,n))),524288&m&&2&a&&(F(),u.push(WY(156)),u.push(VY()),O(t),R(t,n),u.push(VY()),u.push(KY(64)),u.push(VY()),de(u,sZ(e,i.parent&&El(i.parent)?e.getTypeAtLocation(i.parent):e.getDeclaredTypeOfSymbol(t),r,8388608,c,l,C))),384&m&&(F(),I(t,a)||(X(t.declarations,e=>kF(e)&&lf(e))&&(u.push(WY(87)),u.push(VY())),u.push(WY(94)),u.push(VY()),O(t,void 0))),1536&m&&!b&&(F(),!I(t,a))){const e=ed(t,268),n=e&&e.name&&80===e.name.kind;u.push(WY(n?145:144)),u.push(VY()),O(t)}if(262144&m&&2&a)if(F(),u.push($Y(21)),u.push(QY("type parameter")),u.push($Y(22)),u.push(VY()),O(t),t.parent)A(),O(t.parent,r),R(t.parent,r);else{const r=ed(t,169);if(void 0===r)return gn.fail();const i=r.parent;if(i)if(__(i)){A();const t=e.getSignatureFromDeclaration(i);181===i.kind?(u.push(WY(105)),u.push(VY())):180!==i.kind&&i.name&&O(i.symbol),de(u,lZ(e,t,n,32))}else SF(i)&&(A(),u.push(WY(156)),u.push(VY()),O(i.symbol),R(i.symbol,n))}if(8&m){h="enum member",L(t,"enum member");const n=null==(_=t.declarations)?void 0:_[0];if(307===(null==n?void 0:n.kind)){const t=e.getConstantValue(n);void 0!==t&&(u.push(VY()),u.push(KY(64)),u.push(VY()),u.push(UY(up(t),"number"==typeof t?7:8)))}}if(2097152&t.flags){if(F(),!v||0===d.length&&0===f.length){const n=e.getAliasedSymbol(t);if(n!==t&&n.declarations&&n.declarations.length>0){const i=n.declarations[0],s=Ac(i);if(s&&!v){const _=gp(i)&&Lv(i,128),d="default"!==t.name&&!_,p=ide(e,n,wd(i),r,s,o,a,d?t:n,c,l);u.push(...p.displayParts),u.push(oZ()),x=p.documentation,S=p.tags,C&&p.canIncreaseVerbosityLevel&&(C.canIncreaseExpansionDepth=!0)}else x=n.getContextualDocumentationComment(i,e),S=n.getJsDocTags(e)}}if(t.declarations)switch(t.declarations[0].kind){case 271:u.push(WY(95)),u.push(VY()),u.push(WY(145));break;case 278:u.push(WY(95)),u.push(VY()),u.push(WY(t.declarations[0].isExportEquals?64:90));break;case 282:u.push(WY(95));break;default:u.push(WY(102))}u.push(VY()),O(t),g(t.declarations,t=>{if(272===t.kind){const n=t;if(Pm(n))u.push(VY()),u.push(KY(64)),u.push(VY()),u.push(WY(149)),u.push($Y(21)),u.push(UY(rp(Am(n)),8)),u.push($Y(22));else{const t=e.getSymbolAtLocation(n.moduleReference);t&&(u.push(VY()),u.push(KY(64)),u.push(VY()),O(t,r))}return!0}})}if(!v)if(""!==h){if(o)if(b?(F(),u.push(WY(110))):L(t,h),"property"===h||"accessor"===h||"getter"===h||"setter"===h||"JSX attribute"===h||3&m||"local var"===h||"index"===h||"using"===h||"await using"===h||b){if(u.push($Y(59)),u.push(VY()),o.symbol&&262144&o.symbol.flags&&"index"!==h){const t=aZ(t=>{const n=e.typeParameterToDeclaration(o,r,Zue,void 0,void 0,c,l,C);E().writeNode(4,n,wd(bc(r)),t)},c);de(u,t)}else de(u,sZ(e,o,r,void 0,c,l,C));if(rd(t)&&t.links.target&&rd(t.links.target)&&t.links.target.links.tupleLabelDeclaration){const e=t.links.target.links.tupleLabelDeclaration;gn.assertNode(e.name,fD),u.push(VY()),u.push($Y(21)),u.push(QY(kc(e.name))),u.push($Y(22))}}else if(16&m||8192&m||16384&m||131072&m||98304&m||"method"===h){const e=o.getNonNullableType().getCallSignatures();e.length&&(M(e[0],e),k=e.length>1)}}else h=ede(e,t,i);if(0!==d.length||k||(d=t.getContextualDocumentationComment(r,e)),0===d.length&&4&m&&t.parent&&t.declarations&&g(t.parent.declarations,e=>308===e.kind))for(const n of t.declarations){if(!n.parent||227!==n.parent.kind)continue;const t=e.getSymbolAtLocation(n.parent.right);if(t&&(d=t.getDocumentationComment(e),f=t.getJsDocTags(e),d.length>0))break}if(0===d.length&&fD(i)&&t.valueDeclaration&&hE(t.valueDeclaration)){const n=t.valueDeclaration,r=n.parent,i=n.propertyName||n.name;if(fD(i)&&mE(r)){const t=Gh(i),n=e.getTypeAtLocation(r);d=y(n.isUnion()?n.types:[n],n=>{const r=n.getProperty(t);return r?r.getDocumentationComment(e):void 0})||p}}0!==f.length||k||Jm(i)||(f=t.getContextualJsDocTags(r,e)),0===d.length&&x&&(d=x),0===f.length&&S&&(f=S);const N=!C.truncated&&C.canIncreaseExpansionDepth;return{displayParts:u,documentation:d,symbolKind:h,tags:0===f.length?void 0:f,canIncreaseVerbosityLevel:void 0!==l?N:void 0};function E(){return IU()}function F(){u.length&&u.push(oZ()),P()}function P(){s&&(j("alias"),u.push(VY()))}function A(){u.push(VY()),u.push(WY(103)),u.push(VY())}function I(t,n){if(w)return!0;if(function(t,n){if(void 0===l)return!1;const r=96&t.flags?e.getDeclaredTypeOfSymbol(t):e.getTypeOfSymbolAtLocation(t,i);return!(!r||e.isLibType(r))&&(0{const i=e.getEmitResolver().symbolToDeclarations(t,r,17408,c,void 0!==l?l-1:void 0,C),o=E(),a=t.valueDeclaration&&wd(t.valueDeclaration);i.forEach((e,t)=>{t>0&&n.writeLine(),o.writeNode(4,e,a,n)})},c);return de(u,i),w=!0,!0}return!1}function O(r,i){let o;s&&r===t&&(r=s),"index"===h&&(o=e.getIndexInfosOfIndexSymbol(r));let a=[];131072&r.flags&&o?(r.parent&&(a=cZ(e,r.parent)),a.push($Y(23)),o.forEach((t,n)=>{a.push(...sZ(e,t.keyType)),n!==o.length-1&&(a.push(VY()),a.push($Y(52)),a.push(VY()))}),a.push($Y(24))):a=cZ(e,r,i||n,void 0,7),de(u,a),16777216&t.flags&&u.push($Y(58))}function L(e,t){F(),t&&(j(t),e&&!X(e.declarations,e=>DE(e)||(NE(e)||JE(e))&&!e.name)&&(u.push(VY()),O(e)))}function j(e){switch(e){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":return void u.push(XY(e));default:return u.push($Y(21)),u.push(XY(e)),void u.push($Y(22))}}function M(t,n,i=0){de(u,lZ(e,t,r,32|i,c,l,C)),n.length>1&&(u.push(VY()),u.push($Y(21)),u.push(KY(40)),u.push(UY((n.length-1).toString(),7)),u.push(VY()),u.push(QY(2===n.length?"overload":"overloads")),u.push($Y(22))),d=t.getDocumentationComment(e),f=t.getJsDocTags(),n.length>1&&0===d.length&&0===f.length&&(d=n[0].getDocumentationComment(e),f=n[0].getJsDocTags().filter(e=>"deprecated"!==e.name))}function R(t,n){const r=aZ(r=>{const i=e.symbolToTypeParameterDeclarations(t,n,Zue);E().writeList(53776,i,wd(bc(n)),r)});de(u,r)}}function ode(e,t,n,r,i,o=lX(i),a,s,c){return ide(e,t,n,r,i,void 0,o,a,s,c)}function ade(e){return!e.parent&&g(e.declarations,e=>{if(219===e.kind)return!0;if(261!==e.kind&&263!==e.kind)return!1;for(let t=e.parent;!$f(t);t=t.parent)if(308===t.kind||269===t.kind)return!1;return!0})}var sde={};function cde(e){const t=e.__pos;return gn.assert("number"==typeof t),t}function lde(e,t){gn.assert("number"==typeof t),e.__pos=t}function _de(e){const t=e.__end;return gn.assert("number"==typeof t),t}function ude(e,t){gn.assert("number"==typeof t),e.__end=t}a(sde,{ChangeTracker:()=>kde,LeadingTriviaOption:()=>dde,TrailingTriviaOption:()=>pde,applyChanges:()=>Nde,assignPositionsToNode:()=>Fde,createWriter:()=>Ade,deleteNode:()=>Ode,getAdjustedEndPosition:()=>vde,isThisTypeAnnotatable:()=>xde,isValidLocationToAddComment:()=>Ide});var dde=(e=>(e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll",e[e.JSDoc=2]="JSDoc",e[e.StartLine=3]="StartLine",e))(dde||{}),pde=(e=>(e[e.Exclude=0]="Exclude",e[e.ExcludeWhitespace=1]="ExcludeWhitespace",e[e.Include=2]="Include",e))(pde||{});function fde(e,t){return is(e,t,!1,!0)}var mde={leadingTriviaOption:0,trailingTriviaOption:0};function gde(e,t,n,r){return{pos:hde(e,t,r),end:vde(e,n,r)}}function hde(e,t,n,r=!1){var i,o;const{leadingTriviaOption:a}=n;if(0===a)return t.getStart(e);if(3===a){const n=t.getStart(e),r=BX(n,e);return zX(t,r)?r:n}if(2===a){const n=wf(t,e.text);if(null==n?void 0:n.length)return BX(n[0].pos,e)}const s=t.getFullStart(),c=t.getStart(e);if(s===c)return c;const l=BX(s,e);if(BX(c,e)===l)return 1===a?s:c;if(r){const t=(null==(i=hs(e.text,s))?void 0:i[0])||(null==(o=ys(e.text,s))?void 0:o[0]);if(t)return is(e.text,t.end,!0,!0)}const _=s>0?1:0;let u=Fd(lv(e,l)+_,e);return u=fde(e.text,u),Fd(lv(e,u),e)}function yde(e,t,n){const{end:r}=t,{trailingTriviaOption:i}=n;if(2===i){const n=ys(e.text,r);if(n){const r=lv(e,t.end);for(const t of n){if(2===t.kind||lv(e,t.pos)>r)break;if(lv(e,t.end)>r)return is(e.text,t.end,!0,!0)}}}}function vde(e,t,n){var r;const{end:i}=t,{trailingTriviaOption:o}=n;if(0===o)return i;if(1===o){const t=Y(ys(e.text,i),hs(e.text,i)),n=null==(r=null==t?void 0:t[t.length-1])?void 0:r.end;return n||i}const a=yde(e,t,n);if(a)return a;const s=is(e.text,i,!0);return s===i||2!==o&&!Qa(e.text.charCodeAt(s-1))?i:s}function bde(e,t){return!!t&&!!e.parent&&(28===t.kind||27===t.kind&&211===e.parent.kind)}function xde(e){return NE(e)||vF(e)}var Sde,kde=class e{constructor(e,t){this.newLineCharacter=e,this.formatContext=t,this.changes=[],this.classesWithNodesInsertedAtStart=new Map,this.deletedNodes=[]}static fromContext(t){return new e(iZ(t.host,t.formatContext.options),t.formatContext)}static with(t,n){const r=e.fromContext(t);return n(r),r.getChanges()}pushRaw(e,t){gn.assertEqual(e.fileName,t.fileName);for(const n of t.textChanges)this.changes.push({kind:3,sourceFile:e,text:n.newText,range:YQ(n.span)})}deleteRange(e,t){this.changes.push({kind:0,sourceFile:e,range:t})}delete(e,t){this.deletedNodes.push({sourceFile:e,node:t})}deleteNode(e,t,n={leadingTriviaOption:1}){this.deleteRange(e,gde(e,t,t,n))}deleteNodes(e,t,n={leadingTriviaOption:1},r){for(const i of t){const t=hde(e,i,n,r),o=vde(e,i,n);this.deleteRange(e,{pos:t,end:o}),r=!!yde(e,i,n)}}deleteModifier(e,t){this.deleteRange(e,{pos:t.getStart(e),end:is(e.text,t.end,!0)})}deleteNodeRange(e,t,n,r={leadingTriviaOption:1}){const i=hde(e,t,r),o=vde(e,n,r);this.deleteRange(e,{pos:i,end:o})}deleteNodeRangeExcludingEnd(e,t,n,r={leadingTriviaOption:1}){const i=hde(e,t,r),o=void 0===n?e.text.length:hde(e,n,r);this.deleteRange(e,{pos:i,end:o})}replaceRange(e,t,n,r={}){this.changes.push({kind:1,sourceFile:e,range:t,options:r,node:n})}replaceNode(e,t,n,r=mde){this.replaceRange(e,gde(e,t,t,r),n,r)}replaceNodeRange(e,t,n,r,i=mde){this.replaceRange(e,gde(e,t,n,i),r,i)}replaceRangeWithNodes(e,t,n,r={}){this.changes.push({kind:2,sourceFile:e,range:t,options:r,nodes:n})}replaceNodeWithNodes(e,t,n,r=mde){this.replaceRangeWithNodes(e,gde(e,t,t,r),n,r)}replaceNodeWithText(e,t,n){this.replaceRangeWithText(e,gde(e,t,t,mde),n)}replaceNodeRangeWithNodes(e,t,n,r,i=mde){this.replaceRangeWithNodes(e,gde(e,t,n,i),r,i)}nodeHasTrailingComment(e,t,n=mde){return!!yde(e,t,n)}nextCommaToken(e,t){const n=gQ(t,t.parent,e);return n&&28===n.kind?n:void 0}replacePropertyAssignment(e,t,n){const r=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;this.replaceNode(e,t,n,{suffix:r})}insertNodeAt(e,t,n,r={}){this.replaceRange(e,Jb(t),n,r)}insertNodesAt(e,t,n,r={}){this.replaceRangeWithNodes(e,Jb(t),n,r)}insertNodeAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertNodesAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertAtTopOfFile(e,t,n){const r=function(e){let t;for(const n of e.statements){if(!bf(n))break;t=n}let n=0;const r=e.text;if(t)return n=t.end,c(),n;const i=vs(r);void 0!==i&&(n=i.length,c());const o=hs(r,n);if(!o)return n;let a,s;for(const t of o){if(3===t.kind){if($d(r,t.pos)){a={range:t,pinnedOrTripleSlash:!0};continue}}else if(Wd(r,t.pos,t.end)){a={range:t,pinnedOrTripleSlash:!0};continue}if(a){if(a.pinnedOrTripleSlash)break;if(e.getLineAndCharacterOfPosition(t.pos).line>=e.getLineAndCharacterOfPosition(a.range.end).line+2)break}if(e.statements.length){void 0===s&&(s=e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line);if(sit(e.comment)?kw.createJSDocText(e.comment):e.comment),r=Ce(t.jsDoc);return r&&ex(r.pos,r.end,e)&&0===m(n)?void 0:kw.createNodeArray(S(n,kw.createJSDocText("\n")))}replaceJSDocComment(e,t,n){this.insertJsdocCommentBefore(e,function(e){if(220!==e.kind)return e;const t=173===e.parent.kind?e.parent:e.parent.parent;return t.jsDoc=e.jsDoc,t}(t),kw.createJSDocComment(this.createJSDocText(e,t),kw.createNodeArray(n)))}addJSDocTags(e,t,n){const r=B(t.jsDoc,e=>e.tags),i=n.filter(e=>!r.some((t,n)=>{const i=function(e,t){if(e.kind!==t.kind)return;switch(e.kind){case 342:{const n=e,r=t;return fD(n.name)&&fD(r.name)&&n.name.escapedText===r.name.escapedText?kw.createJSDocParameterTag(void 0,r.name,!1,r.typeExpression,r.isNameFirst,n.comment):void 0}case 343:return kw.createJSDocReturnTag(void 0,t.typeExpression,e.comment);case 345:return kw.createJSDocTypeTag(void 0,t.typeExpression,e.comment)}}(t,e);return i&&(r[n]=i),!!i}));this.replaceJSDocComment(e,t,[...r,...i])}filterJSDocTags(e,t,n){this.replaceJSDocComment(e,t,P(B(t.jsDoc,e=>e.tags),n))}replaceRangeWithText(e,t,n){this.changes.push({kind:3,sourceFile:e,range:t,text:n})}insertText(e,t,n){this.replaceRangeWithText(e,Jb(t),n)}tryInsertTypeAnnotation(e,t,n){let r;if(__(t)){if(r=YX(t,22,e),!r){if(!DE(t))return!1;r=xe(t.parameters)}}else r=(261===t.kind?t.exclamationToken:t.questionToken)??t.name;return this.insertNodeAt(e,r.end,n,{prefix:": "}),!0}tryInsertThisTypeAnnotation(e,t,n){const r=YX(t,21,e).getStart(e)+1,i=t.parameters.length?", ":"";this.insertNodeAt(e,r,n,{prefix:"this: ",suffix:i})}insertTypeParameters(e,t,n){const r=(YX(t,21,e)||xe(t.parameters)).getStart(e);this.insertNodesAt(e,r,n,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(e,t,n){return bu(e)||h_(e)?{suffix:n?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:hF(e)?{suffix:", "}:AD(e)?AD(t)?{suffix:", "}:{}:QN(e)&&EF(e.parent)||RF(e)?{suffix:", "}:BF(e)?{suffix:","+(n?this.newLineCharacter:" ")}:gn.failBadSyntaxKind(e)}insertNodeAtConstructorStart(e,t,n){const r=ve(t.body.statements);r&&t.body.multiLine?this.insertNodeBefore(e,r,n):this.replaceConstructorBody(e,t,[n,...t.body.statements])}insertNodeAtConstructorStartAfterSuperCall(e,t,n){const r=T(t.body.statements,e=>tF(e)&&gf(e.expression));r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}insertNodeAtConstructorEnd(e,t,n){const r=ke(t.body.statements);r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}replaceConstructorBody(e,t,n){this.replaceNode(e,t.body,kw.createBlock(n,!0))}insertNodeAtEndOfScope(e,t,n){const r=hde(e,t.getLastToken(),{});this.insertNodeAt(e,r,n,{prefix:Qa(e.text.charCodeAt(t.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtObjectStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtStartWorker(e,t,n){const r=this.guessIndentationFromExistingMembers(e,t)??this.computeIndentationForNewMember(e,t);this.insertNodeAt(e,wde(t).pos,n,this.getInsertNodeAtStartInsertOptions(e,t,r))}guessIndentationFromExistingMembers(e,t){let n,r=t;for(const i of wde(t)){if(Kb(r,i,e))return;const t=i.getStart(e),o=jde.SmartIndenter.findFirstNonWhitespaceColumn(BX(t,e),t,e,this.formatContext.options);if(void 0===n)n=o;else if(o!==n)return;r=i}return n}computeIndentationForNewMember(e,t){const n=t.getStart(e);return jde.SmartIndenter.findFirstNonWhitespaceColumn(BX(n,e),n,e,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(e,t,n){const r=0===wde(t).length,i=!this.classesWithNodesInsertedAtStart.has(pJ(t));i&&this.classesWithNodesInsertedAtStart.set(pJ(t),{node:t,sourceFile:e});const o=vE(t)&&(!cf(e)||!r);return{indentation:n,prefix:(vE(t)&&cf(e)&&r&&!i?",":"")+this.newLineCharacter,suffix:o?",":xF(t)&&r?";":""}}insertNodeAfterComma(e,t,n){const r=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAtEndOfList(e,t,n){this.insertNodeAt(e,t.end,n,{prefix:", "})}insertNodesAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,xe(n));this.insertNodesAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfterWorker(e,t,n){var r,i;i=n,((OD(r=t)||LD(r))&&C_(i)&&168===i.name.kind||vu(r)&&vu(i))&&59!==e.text.charCodeAt(t.end-1)&&this.replaceRange(e,Jb(t.end),kw.createToken(27));return vde(e,t,{})}getInsertNodeAfterOptions(e,t){const n=this.getInsertNodeAfterOptionsWorker(t);return{...n,prefix:t.end===e.end&&bu(t)?n.prefix?`\n${n.prefix}`:"\n":n.prefix}}getInsertNodeAfterOptionsWorker(e){switch(e.kind){case 264:case 268:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 261:case 11:case 80:return{prefix:", "};case 304:return{suffix:","+this.newLineCharacter};case 95:return{prefix:" "};case 170:return{};default:return gn.assert(bu(e)||C_(e)),{suffix:this.newLineCharacter}}}insertName(e,t,n){if(gn.assert(!t.name),220===t.kind){const r=YX(t,39,e),i=YX(t,21,e);i?(this.insertNodesAt(e,i.getStart(e),[kw.createToken(100),kw.createIdentifier(n)],{joiner:" "}),Ode(this,e,r)):(this.insertText(e,xe(t.parameters).getStart(e),`function ${n}(`),this.replaceRange(e,r,kw.createToken(22))),242!==t.body.kind&&(this.insertNodesAt(e,t.body.getStart(e),[kw.createToken(19),kw.createToken(107)],{joiner:" ",suffix:" "}),this.insertNodesAt(e,t.body.end,[kw.createToken(27),kw.createToken(20)],{joiner:" "}))}else{const r=YX(t,219===t.kind?100:86,e).end;this.insertNodeAt(e,r,kw.createIdentifier(n),{prefix:" "})}}insertExportModifier(e,t){this.insertText(e,t.getStart(e),"export ")}insertImportSpecifierAtIndex(e,t,n,r){const i=n.elements[r-1];i?this.insertNodeInListAfter(e,i,t):this.insertNodeBefore(e,n.elements[0],t,!ex(n.elements[0].getStart(),n.parent.parent.getStart(),e))}insertNodeInListAfter(e,t,n,r=jde.SmartIndenter.getContainingList(t,e)){if(!r)return void gn.fail("node is not a list element");const i=op(r,t);if(i<0)return;const o=t.getEnd();if(i!==r.length-1){const o=dQ(e,t.end);if(o&&bde(t,o)){const t=r[i+1],a=fde(e.text,t.getFullStart()),s=`${ja(o.kind)}${e.text.substring(o.end,a)}`;this.insertNodesAt(e,a,[n],{suffix:s})}}else{const a=t.getStart(e),s=BX(a,e);let c,l=!1;if(1===r.length)c=28;else{const n=hQ(t.pos,e);c=bde(t,n)?n.kind:28;l=BX(r[i-1].getStart(e),e)!==s}if(!function(e,t){let n=t;for(;n{const[n,r]=function(e,t){const n=YX(e,19,t),r=YX(e,20,t);return[null==n?void 0:n.end,null==r?void 0:r.end]}(e,t);if(void 0!==n&&void 0!==r){const i=0===wde(e).length,o=ex(n,r,t);i&&o&&n!==r-1&&this.deleteRange(t,Jb(n,r-1)),o&&this.insertText(t,r-1,this.newLineCharacter)}})}finishDeleteDeclarations(){const e=new Set;for(const{sourceFile:t,node:n}of this.deletedNodes)this.deletedNodes.some(e=>e.sourceFile===t&&JX(e.node,n))||(nt(n)?this.deleteRange(t,hT(t,n)):Dde.deleteDeclaration(this,e,t,n));e.forEach(t=>{const n=t.getSourceFile(),r=jde.SmartIndenter.getContainingList(t,n);if(t!==Te(r))return;const i=N(r,t=>!e.has(t),r.length-2);-1!==i&&this.deleteRange(n,{pos:r[i].end,end:Tde(n,r[i+1])})})}getChanges(e){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();const t=Sde.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,e);return this.newFileChanges&&this.newFileChanges.forEach((e,n)=>{t.push(Sde.newFileChanges(n,e,this.newLineCharacter,this.formatContext))}),t}createNewFile(e,t,n){this.insertStatementsInNewFile(t,n,e)}};function Tde(e,t){return is(e.text,hde(e,t,{leadingTriviaOption:1}),!1,!0)}function Cde(e,t,n,r){const i=Tde(e,r);if(void 0===n||ex(vde(e,t,{}),i,e))return i;const o=hQ(r.getStart(e),e);if(bde(t,o)){const r=hQ(t.getStart(e),e);if(bde(n,r)){const t=is(e.text,o.getEnd(),!0,!0);if(ex(r.getStart(e),o.getStart(e),e))return Qa(e.text.charCodeAt(t-1))?t-1:t;if(Qa(e.text.charCodeAt(t)))return t}}return i}function wde(e){return vE(e)?e.properties:e.members}function Nde(e,t){for(let n=t.length-1;n>=0;n--){const{span:r,newText:i}=t[n];e=`${e.substring(0,r.start)}${i}${e.substring(js(r))}`}return e}(e=>{function t(e,t,r,i){const o=R(t,e=>e.statements.map(t=>4===t?"":n(t,e.oldFile,r).text)).join(r),a=uO("any file name",o,{languageVersion:99,jsDocParsingMode:1},!0,e);return Nde(o,jde.formatDocument(a,i))+r}function n(e,t,n){const r=Ade(n);return jU({newLine:f0(n),neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},r).writeNode(4,e,t,r),{text:r.getText(),node:Fde(e)}}e.getTextChangesFromChanges=function(e,t,r,i){return U(We(e,e=>e.sourceFile.path),e=>{const o=e[0].sourceFile,a=me(e,(e,t)=>e.range.pos-t.range.pos||e.range.end-t.range.end);for(let e=0;e`${JSON.stringify(a[e].range)} and ${JSON.stringify(a[e+1].range)}`);const s=U(a,e=>{const a=QQ(e.range),s=1===e.kind?wd(hc(e.node))??e.sourceFile:2===e.kind?wd(hc(e.nodes[0]))??e.sourceFile:e.sourceFile,c=function(e,t,r,i,o,a){var s;if(0===e.kind)return"";if(3===e.kind)return e.text;const{options:c={},range:{pos:l}}=e,_=e=>function(e,t,r,i,{indentation:o,prefix:a,delta:s},c,l,_){const{node:u,text:d}=n(e,t,c);_&&_(u,d);const p=g0(l,t),f=void 0!==o?o:jde.SmartIndenter.getIndentation(i,r,p,a===c||BX(i,t)===i);void 0===s&&(s=jde.SmartIndenter.shouldIndentChildNode(p,e)&&p.indentSize||0);const m={text:d,getLineAndCharacterOfPosition(e){return Ha(this,e)}},g=jde.formatNodeGivenIndentation(u,m,t.languageVariant,f,s,{...l,options:p});return Nde(d,g)}(e,t,r,l,c,i,o,a),u=2===e.kind?e.nodes.map(e=>Ut(_(e),i)).join((null==(s=e.options)?void 0:s.joiner)||i):_(e.node),d=void 0!==c.indentation||BX(l,t)===l?u:u.replace(/^\s+/,"");return(c.prefix||"")+d+(!c.suffix||qt(d,c.suffix)?"":c.suffix)}(e,s,o,t,r,i);if(a.length!==c.length||!_0(s.text,c,a.start))return eY(a,c)});return s.length>0?{fileName:o.fileName,textChanges:s}:void 0})},e.newFileChanges=function(e,n,r,i){const o=t(Ek(e),n,r,i);return{fileName:e,textChanges:[eY(Ys(0,0),o)],isNewFile:!0}},e.newFileChangesWorker=t,e.getNonformattedText=n})(Sde||(Sde={}));var Dde,Ede={...oU,factory:dw(1|oU.factory.flags,oU.factory.baseFactory)};function Fde(e){const t=IJ(e,Fde,Ede,Pde,Fde),n=sy(t)?t:Object.create(t);return IT(n,cde(e),_de(e)),n}function Pde(e,t,n,r,i){const o=TJ(e,t,n,r,i);if(!o)return o;gn.assert(e);const a=o===e?kw.createNodeArray(o.slice(0)):o;return IT(a,cde(e),_de(e)),a}function Ade(e){let t=0;const n=zy(e);function r(e,r){if(r||!function(e){return is(e,0)===e.length}(e)){t=n.getTextPos();let r=0;for(;Ga(e.charCodeAt(e.length-r-1));)r++;t-=r}}return{onBeforeEmitNode:e=>{e&&lde(e,t)},onAfterEmitNode:e=>{e&&ude(e,t)},onBeforeEmitNodeArray:e=>{e&&lde(e,t)},onAfterEmitNodeArray:e=>{e&&ude(e,t)},onBeforeEmitToken:e=>{e&&lde(e,t)},onAfterEmitToken:e=>{e&&ude(e,t)},write:function(e){n.write(e),r(e,!1)},writeComment:function(e){n.writeComment(e)},writeKeyword:function(e){n.writeKeyword(e),r(e,!1)},writeOperator:function(e){n.writeOperator(e),r(e,!1)},writePunctuation:function(e){n.writePunctuation(e),r(e,!1)},writeTrailingSemicolon:function(e){n.writeTrailingSemicolon(e),r(e,!1)},writeParameter:function(e){n.writeParameter(e),r(e,!1)},writeProperty:function(e){n.writeProperty(e),r(e,!1)},writeSpace:function(e){n.writeSpace(e),r(e,!1)},writeStringLiteral:function(e){n.writeStringLiteral(e),r(e,!1)},writeSymbol:function(e,t){n.writeSymbol(e,t),r(e,!1)},writeLine:function(e){n.writeLine(e)},increaseIndent:function(){n.increaseIndent()},decreaseIndent:function(){n.decreaseIndent()},getText:function(){return n.getText()},rawWrite:function(e){n.rawWrite(e),r(e,!1)},writeLiteral:function(e){n.writeLiteral(e),r(e,!0)},getTextPos:function(){return n.getTextPos()},getLine:function(){return n.getLine()},getColumn:function(){return n.getColumn()},getIndent:function(){return n.getIndent()},isAtStartOfLine:function(){return n.isAtStartOfLine()},hasTrailingComment:()=>n.hasTrailingComment(),hasTrailingWhitespace:()=>n.hasTrailingWhitespace(),clear:function(){n.clear(),t=0}}}function Ide(e,t){return!(PQ(e,t)||xQ(e,t)||TQ(e,t)||CQ(e,t))}function Ode(e,t,n,r={leadingTriviaOption:1}){const i=hde(t,n,r),o=vde(t,n,r);e.deleteRange(t,{pos:i,end:o})}function Lde(e,t,n,r){const i=gn.checkDefined(jde.SmartIndenter.getContainingList(r,n)),o=op(i,r);gn.assert(-1!==o),1!==i.length?(gn.assert(!t.has(r),"Deleting a node twice"),t.add(r),e.deleteRange(n,{pos:Tde(n,r),end:o===i.length-1?vde(n,r,{}):Cde(n,r,i[o-1],i[o+1])})):Ode(e,n,r)}(e=>{function t(e,t,n){if(n.parent.name){const r=gn.checkDefined(dQ(t,n.pos-1));e.deleteRange(t,{pos:r.getStart(t),end:n.end})}else{Ode(e,t,Ph(n,273))}}e.deleteDeclaration=function(e,n,r,i){switch(i.kind){case 170:{const t=i.parent;DE(t)&&1===t.parameters.length&&!YX(t,21,r)?e.replaceNodeWithText(r,i,"()"):Lde(e,n,r,i);break}case 273:case 272:Ode(e,r,i,{leadingTriviaOption:r.imports.length&&i===xe(r.imports).parent||i===T(r.statements,Fp)?0:Lu(i)?2:3});break;case 209:const o=i.parent;208===o.kind&&i!==Te(o.elements)?Ode(e,r,i):Lde(e,n,r,i);break;case 261:!function(e,t,n,r){const{parent:i}=r;if(300===i.kind)return void e.deleteNodeRange(n,YX(i,21,n),YX(i,22,n));if(1!==i.declarations.length)return void Lde(e,t,n,r);const o=i.parent;switch(o.kind){case 251:case 250:e.replaceNode(n,r,kw.createObjectLiteralExpression());break;case 249:Ode(e,n,i);break;case 244:Ode(e,n,o,{leadingTriviaOption:Lu(o)?2:3});break;default:gn.assertNever(o)}}(e,n,r,i);break;case 169:Lde(e,n,r,i);break;case 277:const a=i.parent;1===a.elements.length?t(e,r,a):Lde(e,n,r,i);break;case 275:t(e,r,i);break;case 27:Ode(e,r,i,{trailingTriviaOption:0});break;case 100:Ode(e,r,i,{leadingTriviaOption:0});break;case 264:case 263:Ode(e,r,i,{leadingTriviaOption:Lu(i)?2:3});break;default:i.parent?FF(i.parent)&&i.parent.name===i?function(e,t,n){if(n.namedBindings){const r=n.name.getStart(t),i=dQ(t,n.name.end);if(i&&28===i.kind){const n=is(t.text,i.end,!1,!0);e.deleteRange(t,{pos:r,end:n})}else Ode(e,t,n.name)}else Ode(e,t,n.parent)}(e,r,i.parent):SE(i.parent)&&D(i.parent.arguments,i)?Lde(e,n,r,i):Ode(e,r,i):Ode(e,r,i)}}})(Dde||(Dde={}));var jde={};a(jde,{FormattingContext:()=>Rde,FormattingRequestKind:()=>Mde,RuleAction:()=>Vde,RuleFlags:()=>Wde,SmartIndenter:()=>ffe,anyContext:()=>Ude,createTextRangeWithKind:()=>bfe,formatDocument:()=>Cfe,formatNodeGivenIndentation:()=>Ffe,formatOnClosingCurly:()=>Tfe,formatOnEnter:()=>xfe,formatOnOpeningCurly:()=>kfe,formatOnSemicolon:()=>Sfe,formatSelection:()=>wfe,getAllRules:()=>$de,getFormatContext:()=>afe,getFormattingScanner:()=>zde,getIndentationString:()=>Lfe,getRangeOfEnclosingComment:()=>Ofe});var Mde=(e=>(e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",e[e.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",e))(Mde||{}),Rde=class{constructor(e,t,n){this.sourceFile=e,this.formattingRequestKind=t,this.options=n}updateContext(e,t,n,r,i){this.currentTokenSpan=gn.checkDefined(e),this.currentTokenParent=gn.checkDefined(t),this.nextTokenSpan=gn.checkDefined(n),this.nextTokenParent=gn.checkDefined(r),this.contextNode=gn.checkDefined(i),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(void 0===this.tokensAreOnSameLine){const e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line}BlockIsOnOneLine(e){const t=YX(e,19,this.sourceFile),n=YX(e,20,this.sourceFile);if(t&&n){return this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line}return!1}},Bde=ks(99,!1,0),Jde=ks(99,!1,1);function zde(e,t,n,r,i){const o=1===t?Jde:Bde;o.setText(e),o.resetTokenState(n);let a,s,c,l,_,u=!0;const d=i({advance:function(){_=void 0;o.getTokenFullStart()!==n?u=!!s&&4===Te(s).kind:o.scan();a=void 0,s=void 0;let e=o.getTokenFullStart();for(;ea,lastTrailingTriviaWasNewLine:()=>u,skipToEndOf:function(e){o.resetTokenState(e.end),c=o.getTokenFullStart(),l=void 0,_=void 0,u=!1,a=void 0,s=void 0},skipToStartOf:function(e){o.resetTokenState(e.pos),c=o.getTokenFullStart(),l=void 0,_=void 0,u=!1,a=void 0,s=void 0},getTokenFullStart:()=>(null==_?void 0:_.token.pos)??o.getTokenStart(),getStartPos:()=>(null==_?void 0:_.token.pos)??o.getTokenStart()});return _=void 0,o.setText(void 0),d;function p(){const e=_?_.token.kind:o.getToken();return 1!==e&&!Bh(e)}function f(){return 1===(_?_.token.kind:o.getToken())}function m(e,t){return Ml(t)&&e.token.kind!==t.kind&&(e.token.kind=t.kind),e}}var qde,Ude=p,Vde=(e=>(e[e.None=0]="None",e[e.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",e[e.StopProcessingTokenActions=2]="StopProcessingTokenActions",e[e.InsertSpace=4]="InsertSpace",e[e.InsertNewLine=8]="InsertNewLine",e[e.DeleteSpace=16]="DeleteSpace",e[e.DeleteToken=32]="DeleteToken",e[e.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",e[e.StopAction=3]="StopAction",e[e.ModifySpaceAction=28]="ModifySpaceAction",e[e.ModifyTokenAction=96]="ModifyTokenAction",e))(Vde||{}),Wde=(e=>(e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines",e))(Wde||{});function $de(){const e=[];for(let t=0;t<=166;t++)1!==t&&e.push(t);function t(...t){return{tokens:e.filter(e=>!t.some(t=>t===e)),isSpecific:!1}}const n={tokens:e,isSpecific:!1},r=Hde([...e,3]),i=Hde([...e,1]),o=Xde(83,166),a=Xde(30,79),s=[103,104,165,130,142,152],c=[80,...tY],l=r,_=Hde([80,32,3,86,95,102]),u=Hde([22,3,92,113,98,93,85]);return[...[Kde("IgnoreBeforeComment",n,[2,3],Ude,1),Kde("IgnoreAfterLineComment",2,n,Ude,1),Kde("NotSpaceBeforeColon",n,59,[Ape,ape,spe],16),Kde("SpaceAfterColon",59,n,[Ape,ape,Rpe],4),Kde("NoSpaceBeforeQuestionMark",n,58,[Ape,ape,spe],16),Kde("SpaceAfterQuestionMarkInConditionalOperator",58,n,[Ape,_pe],4),Kde("NoSpaceAfterQuestionMark",58,n,[Ape,lpe],16),Kde("NoSpaceBeforeDot",n,[25,29],[Ape,ofe],16),Kde("NoSpaceAfterDot",[25,29],n,[Ape],16),Kde("NoSpaceBetweenImportParenInImportType",102,21,[Ape,Ppe],16),Kde("NoSpaceAfterUnaryPrefixOperator",[46,47,55,54],[9,10,80,21,23,19,110,105],[Ape,ape],16),Kde("NoSpaceAfterUnaryPreincrementOperator",46,[80,21,110,105],[Ape],16),Kde("NoSpaceAfterUnaryPredecrementOperator",47,[80,21,110,105],[Ape],16),Kde("NoSpaceBeforeUnaryPostincrementOperator",[80,22,24,105],46,[Ape,nfe],16),Kde("NoSpaceBeforeUnaryPostdecrementOperator",[80,22,24,105],47,[Ape,nfe],16),Kde("SpaceAfterPostincrementWhenFollowedByAdd",46,40,[Ape,ope],4),Kde("SpaceAfterAddWhenFollowedByUnaryPlus",40,40,[Ape,ope],4),Kde("SpaceAfterAddWhenFollowedByPreincrement",40,46,[Ape,ope],4),Kde("SpaceAfterPostdecrementWhenFollowedBySubtract",47,41,[Ape,ope],4),Kde("SpaceAfterSubtractWhenFollowedByUnaryMinus",41,41,[Ape,ope],4),Kde("SpaceAfterSubtractWhenFollowedByPredecrement",41,47,[Ape,ope],4),Kde("NoSpaceAfterCloseBrace",20,[28,27],[Ape],16),Kde("NewLineBeforeCloseBraceInBlockContext",r,20,[fpe],8),Kde("SpaceAfterCloseBrace",20,t(22),[Ape,kpe],4),Kde("SpaceBetweenCloseBraceAndElse",20,93,[Ape],4),Kde("SpaceBetweenCloseBraceAndWhile",20,117,[Ape],4),Kde("NoSpaceBetweenEmptyBraceBrackets",19,20,[Ape,Cpe],16),Kde("SpaceAfterConditionalClosingParen",22,23,[Tpe],4),Kde("NoSpaceBetweenFunctionKeywordAndStar",100,42,[bpe],16),Kde("SpaceAfterStarInGeneratorDeclaration",42,80,[bpe],4),Kde("SpaceAfterFunctionInFuncDecl",100,n,[ype],4),Kde("NewLineAfterOpenBraceInBlockContext",19,n,[fpe],8),Kde("SpaceAfterGetSetInMember",[139,153],80,[ype],4),Kde("NoSpaceBetweenYieldKeywordAndStar",127,42,[Ape,efe],16),Kde("SpaceBetweenYieldOrYieldStarAndOperand",[127,42],n,[Ape,efe],4),Kde("NoSpaceBetweenReturnAndSemicolon",107,27,[Ape],16),Kde("SpaceAfterCertainKeywords",[115,111,105,91,107,114,135],n,[Ape],4),Kde("SpaceAfterLetConstInVariableDeclaration",[121,87],n,[Ape,Vpe],4),Kde("NoSpaceBeforeOpenParenInFuncCall",n,21,[Ape,wpe,Npe],16),Kde("SpaceBeforeBinaryKeywordOperator",n,s,[Ape,ope],4),Kde("SpaceAfterBinaryKeywordOperator",s,n,[Ape,ope],4),Kde("SpaceAfterVoidOperator",116,n,[Ape,Zpe],4),Kde("SpaceBetweenAsyncAndOpenParen",134,21,[Fpe,Ape],4),Kde("SpaceBetweenAsyncAndFunctionKeyword",134,[100,80],[Ape],4),Kde("NoSpaceBetweenTagAndTemplateString",[80,22],[15,16],[Ape],16),Kde("SpaceBeforeJsxAttribute",n,80,[jpe,Ape],4),Kde("SpaceBeforeSlashInJsxOpeningElement",n,44,[Jpe,Ape],4),Kde("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",44,32,[Jpe,Ape],16),Kde("NoSpaceBeforeEqualInJsxAttribute",n,64,[Mpe,Ape],16),Kde("NoSpaceAfterEqualInJsxAttribute",64,n,[Mpe,Ape],16),Kde("NoSpaceBeforeJsxNamespaceColon",80,59,[Bpe],16),Kde("NoSpaceAfterJsxNamespaceColon",59,80,[Bpe],16),Kde("NoSpaceAfterModuleImport",[144,149],21,[Ape],16),Kde("SpaceAfterCertainTypeScriptKeywords",[128,129,86,138,90,94,95,96,139,119,102,120,144,145,123,125,124,148,153,126,156,161,143,140],n,[Ape],4),Kde("SpaceBeforeCertainTypeScriptKeywords",n,[96,119,161],[Ape],4),Kde("SpaceAfterModuleName",11,19,[$pe],4),Kde("SpaceBeforeArrow",n,39,[Ape],4),Kde("SpaceAfterArrow",39,n,[Ape],4),Kde("NoSpaceAfterEllipsis",26,80,[Ape],16),Kde("NoSpaceAfterOptionalParameters",58,[22,28],[Ape,ape],16),Kde("NoSpaceBetweenEmptyInterfaceBraceBrackets",19,20,[Ape,Kpe],16),Kde("NoSpaceBeforeOpenAngularBracket",c,30,[Ape,Xpe],16),Kde("NoSpaceBetweenCloseParenAndAngularBracket",22,30,[Ape,Xpe],16),Kde("NoSpaceAfterOpenAngularBracket",30,n,[Ape,Xpe],16),Kde("NoSpaceBeforeCloseAngularBracket",n,32,[Ape,Xpe],16),Kde("NoSpaceAfterCloseAngularBracket",32,[21,23,32,28],[Ape,Xpe,vpe,Ype],16),Kde("SpaceBeforeAt",[22,80],60,[Ape],4),Kde("NoSpaceAfterAt",60,n,[Ape],16),Kde("SpaceAfterDecorator",n,[128,80,95,90,86,126,125,123,124,139,153,23,42],[qpe],4),Kde("NoSpaceBeforeNonNullAssertionOperator",n,54,[Ape,tfe],16),Kde("NoSpaceAfterNewKeywordOnConstructorSignature",105,21,[Ape,Hpe],16),Kde("SpaceLessThanAndNonJSXTypeAnnotation",30,30,[Ape],4)],...[Kde("SpaceAfterConstructor",137,21,[Yde("insertSpaceAfterConstructor"),Ape],4),Kde("NoSpaceAfterConstructor",137,21,[epe("insertSpaceAfterConstructor"),Ape],16),Kde("SpaceAfterComma",28,n,[Yde("insertSpaceAfterCommaDelimiter"),Ape,Ope,Dpe,Epe],4),Kde("NoSpaceAfterComma",28,n,[epe("insertSpaceAfterCommaDelimiter"),Ape,Ope],16),Kde("SpaceAfterAnonymousFunctionKeyword",[100,42],21,[Yde("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),ype],4),Kde("NoSpaceAfterAnonymousFunctionKeyword",[100,42],21,[epe("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),ype],16),Kde("SpaceAfterKeywordInControl",o,21,[Yde("insertSpaceAfterKeywordsInControlFlowStatements"),Tpe],4),Kde("NoSpaceAfterKeywordInControl",o,21,[epe("insertSpaceAfterKeywordsInControlFlowStatements"),Tpe],16),Kde("SpaceAfterOpenParen",21,n,[Yde("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ape],4),Kde("SpaceBeforeCloseParen",n,22,[Yde("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ape],4),Kde("SpaceBetweenOpenParens",21,21,[Yde("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ape],4),Kde("NoSpaceBetweenParens",21,22,[Ape],16),Kde("NoSpaceAfterOpenParen",21,n,[epe("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ape],16),Kde("NoSpaceBeforeCloseParen",n,22,[epe("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ape],16),Kde("SpaceAfterOpenBracket",23,n,[Yde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ape],4),Kde("SpaceBeforeCloseBracket",n,24,[Yde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ape],4),Kde("NoSpaceBetweenBrackets",23,24,[Ape],16),Kde("NoSpaceAfterOpenBracket",23,n,[epe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ape],16),Kde("NoSpaceBeforeCloseBracket",n,24,[epe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ape],16),Kde("SpaceAfterOpenBrace",19,n,[npe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),dpe],4),Kde("SpaceBeforeCloseBrace",n,20,[npe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),dpe],4),Kde("NoSpaceBetweenEmptyBraceBrackets",19,20,[Ape,Cpe],16),Kde("NoSpaceAfterOpenBrace",19,n,[Zde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Ape],16),Kde("NoSpaceBeforeCloseBrace",n,20,[Zde("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Ape],16),Kde("SpaceBetweenEmptyBraceBrackets",19,20,[Yde("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")],4),Kde("NoSpaceBetweenEmptyBraceBrackets",19,20,[Zde("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"),Ape],16),Kde("SpaceAfterTemplateHeadAndMiddle",[16,17],n,[Yde("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ipe],4,1),Kde("SpaceBeforeTemplateMiddleAndTail",n,[17,18],[Yde("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ape],4),Kde("NoSpaceAfterTemplateHeadAndMiddle",[16,17],n,[epe("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ipe],16,1),Kde("NoSpaceBeforeTemplateMiddleAndTail",n,[17,18],[epe("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ape],16),Kde("SpaceAfterOpenBraceInJsxExpression",19,n,[Yde("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ape,Lpe],4),Kde("SpaceBeforeCloseBraceInJsxExpression",n,20,[Yde("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ape,Lpe],4),Kde("NoSpaceAfterOpenBraceInJsxExpression",19,n,[epe("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ape,Lpe],16),Kde("NoSpaceBeforeCloseBraceInJsxExpression",n,20,[epe("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ape,Lpe],16),Kde("SpaceAfterSemicolonInFor",27,n,[Yde("insertSpaceAfterSemicolonInForStatements"),Ape,rpe],4),Kde("NoSpaceAfterSemicolonInFor",27,n,[epe("insertSpaceAfterSemicolonInForStatements"),Ape,rpe],16),Kde("SpaceBeforeBinaryOperator",n,a,[Yde("insertSpaceBeforeAndAfterBinaryOperators"),Ape,ope],4),Kde("SpaceAfterBinaryOperator",a,n,[Yde("insertSpaceBeforeAndAfterBinaryOperators"),Ape,ope],4),Kde("NoSpaceBeforeBinaryOperator",n,a,[epe("insertSpaceBeforeAndAfterBinaryOperators"),Ape,ope],16),Kde("NoSpaceAfterBinaryOperator",a,n,[epe("insertSpaceBeforeAndAfterBinaryOperators"),Ape,ope],16),Kde("SpaceBeforeOpenParenInFuncDecl",n,21,[Yde("insertSpaceBeforeFunctionParenthesis"),Ape,ype],4),Kde("NoSpaceBeforeOpenParenInFuncDecl",n,21,[epe("insertSpaceBeforeFunctionParenthesis"),Ape,ype],16),Kde("NewLineBeforeOpenBraceInControl",u,19,[Yde("placeOpenBraceOnNewLineForControlBlocks"),Tpe,ppe],8,1),Kde("NewLineBeforeOpenBraceInFunction",l,19,[Yde("placeOpenBraceOnNewLineForFunctions"),ype,ppe],8,1),Kde("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",_,19,[Yde("placeOpenBraceOnNewLineForFunctions"),xpe,ppe],8,1),Kde("SpaceAfterTypeAssertion",32,n,[Yde("insertSpaceAfterTypeAssertion"),Ape,Qpe],4),Kde("NoSpaceAfterTypeAssertion",32,n,[epe("insertSpaceAfterTypeAssertion"),Ape,Qpe],16),Kde("SpaceBeforeTypeAnnotation",n,[58,59],[Yde("insertSpaceBeforeTypeAnnotation"),Ape,cpe],4),Kde("NoSpaceBeforeTypeAnnotation",n,[58,59],[epe("insertSpaceBeforeTypeAnnotation"),Ape,cpe],16),Kde("NoOptionalSemicolon",27,i,[Qde("semicolons","remove"),rfe],32),Kde("OptionalSemicolon",n,i,[Qde("semicolons","insert"),ife],64)],...[Kde("NoSpaceBeforeSemicolon",n,27,[Ape],16),Kde("SpaceBeforeOpenBraceInControl",u,19,[tpe("placeOpenBraceOnNewLineForControlBlocks"),Tpe,Wpe,upe],4,1),Kde("SpaceBeforeOpenBraceInFunction",l,19,[tpe("placeOpenBraceOnNewLineForFunctions"),ype,gpe,Wpe,upe],4,1),Kde("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",_,19,[tpe("placeOpenBraceOnNewLineForFunctions"),xpe,Wpe,upe],4,1),Kde("NoSpaceBeforeComma",n,28,[Ape],16),Kde("NoSpaceBeforeOpenBracket",t(134,84),23,[Ape],16),Kde("NoSpaceAfterCloseBracket",24,n,[Ape,zpe],16),Kde("SpaceAfterSemicolon",27,n,[Ape],4),Kde("SpaceBetweenForAndAwaitKeyword",99,135,[Ape],4),Kde("SpaceBetweenDotDotDotAndTypeName",26,c,[Ape],16),Kde("SpaceBetweenStatements",[22,92,93,84],n,[Ape,Ope,ipe],4),Kde("SpaceAfterTryCatchFinally",[113,85,98],19,[Ape],4)]]}function Kde(e,t,n,r,i,o=0){return{leftTokenRange:Gde(t),rightTokenRange:Gde(n),rule:{debugName:e,context:r,action:i,flags:o}}}function Hde(e){return{tokens:e,isSpecific:!0}}function Gde(e){return"number"==typeof e?Hde([e]):nt(e)?Hde(e):e}function Xde(e,t,n=[]){const r=[];for(let i=e;i<=t;i++)D(n,i)||r.push(i);return Hde(r)}function Qde(e,t){return n=>n.options&&n.options[e]===t}function Yde(e){return t=>t.options&&Ie(t.options,e)&&!!t.options[e]}function Zde(e){return t=>t.options&&Ie(t.options,e)&&!t.options[e]}function epe(e){return t=>!t.options||!Ie(t.options,e)||!t.options[e]}function tpe(e){return t=>!t.options||!Ie(t.options,e)||!t.options[e]||t.TokensAreOnSameLine()}function npe(e){return t=>!t.options||!Ie(t.options,e)||!!t.options[e]}function rpe(e){return 249===e.contextNode.kind}function ipe(e){return!rpe(e)}function ope(e){switch(e.contextNode.kind){case 227:return 28!==e.contextNode.operatorToken.kind;case 228:case 195:case 235:case 282:case 277:case 183:case 193:case 194:case 239:return!0;case 209:case 266:case 272:case 278:case 261:case 170:case 307:case 173:case 172:return 64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 250:case 169:return 103===e.currentTokenSpan.kind||103===e.nextTokenSpan.kind||64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 251:return 165===e.currentTokenSpan.kind||165===e.nextTokenSpan.kind}return!1}function ape(e){return!ope(e)}function spe(e){return!cpe(e)}function cpe(e){const t=e.contextNode.kind;return 173===t||172===t||170===t||261===t||m_(t)}function lpe(e){return!function(e){return LD(e.contextNode)&&e.contextNode.questionToken}(e)}function _pe(e){return 228===e.contextNode.kind||195===e.contextNode.kind}function upe(e){return e.TokensAreOnSameLine()||gpe(e)}function dpe(e){return 207===e.contextNode.kind||201===e.contextNode.kind||function(e){return mpe(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}(e)}function ppe(e){return gpe(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())}function fpe(e){return mpe(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function mpe(e){return hpe(e.contextNode)}function gpe(e){return hpe(e.nextTokenParent)}function hpe(e){if(Spe(e))return!0;switch(e.kind){case 242:case 270:case 211:case 269:return!0}return!1}function ype(e){switch(e.contextNode.kind){case 263:case 175:case 174:case 178:case 179:case 180:case 219:case 177:case 220:case 265:return!0}return!1}function vpe(e){return!ype(e)}function bpe(e){return 263===e.contextNode.kind||219===e.contextNode.kind}function xpe(e){return Spe(e.contextNode)}function Spe(e){switch(e.kind){case 264:case 232:case 265:case 267:case 188:case 268:case 279:case 280:case 273:case 276:return!0}return!1}function kpe(e){switch(e.currentTokenParent.kind){case 264:case 268:case 267:case 300:case 269:case 256:return!0;case 242:{const t=e.currentTokenParent.parent;if(!t||220!==t.kind&&219!==t.kind)return!0}}return!1}function Tpe(e){switch(e.contextNode.kind){case 246:case 256:case 249:case 250:case 251:case 248:case 259:case 247:case 255:case 300:return!0;default:return!1}}function Cpe(e){return 211===e.contextNode.kind}function wpe(e){return function(e){return 214===e.contextNode.kind}(e)||function(e){return 215===e.contextNode.kind}(e)}function Npe(e){return 28!==e.currentTokenSpan.kind}function Dpe(e){return 24!==e.nextTokenSpan.kind}function Epe(e){return 22!==e.nextTokenSpan.kind}function Fpe(e){return 220===e.contextNode.kind}function Ppe(e){return 206===e.contextNode.kind}function Ape(e){return e.TokensAreOnSameLine()&&12!==e.contextNode.kind}function Ipe(e){return 12!==e.contextNode.kind}function Ope(e){return 285!==e.contextNode.kind&&289!==e.contextNode.kind}function Lpe(e){return 295===e.contextNode.kind||294===e.contextNode.kind}function jpe(e){return 292===e.nextTokenParent.kind||296===e.nextTokenParent.kind&&292===e.nextTokenParent.parent.kind}function Mpe(e){return 292===e.contextNode.kind}function Rpe(e){return 296!==e.nextTokenParent.kind}function Bpe(e){return 296===e.nextTokenParent.kind}function Jpe(e){return 286===e.contextNode.kind}function zpe(e){return!ype(e)&&!gpe(e)}function qpe(e){return e.TokensAreOnSameLine()&&Uv(e.contextNode)&&Upe(e.currentTokenParent)&&!Upe(e.nextTokenParent)}function Upe(e){for(;e&&Q_(e);)e=e.parent;return e&&171===e.kind}function Vpe(e){return 262===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos}function Wpe(e){return 2!==e.formattingRequestKind}function $pe(e){return 268===e.contextNode.kind}function Kpe(e){return 188===e.contextNode.kind}function Hpe(e){return 181===e.contextNode.kind}function Gpe(e,t){if(30!==e.kind&&32!==e.kind)return!1;switch(t.kind){case 184:case 217:case 266:case 264:case 232:case 265:case 263:case 219:case 220:case 175:case 174:case 180:case 181:case 214:case 215:case 234:return!0;default:return!1}}function Xpe(e){return Gpe(e.currentTokenSpan,e.currentTokenParent)||Gpe(e.nextTokenSpan,e.nextTokenParent)}function Qpe(e){return 217===e.contextNode.kind}function Ype(e){return!Qpe(e)}function Zpe(e){return 116===e.currentTokenSpan.kind&&223===e.currentTokenParent.kind}function efe(e){return 230===e.contextNode.kind&&void 0!==e.contextNode.expression}function tfe(e){return 236===e.contextNode.kind}function nfe(e){return!function(e){switch(e.contextNode.kind){case 246:case 249:case 250:case 251:case 247:case 248:return!0;default:return!1}}(e)}function rfe(e){let t=e.nextTokenSpan.kind,n=e.nextTokenSpan.pos;if(Bh(t)){const r=e.nextTokenParent===e.currentTokenParent?gQ(e.currentTokenParent,yc(e.currentTokenParent,e=>!e.parent),e.sourceFile):e.nextTokenParent.getFirstToken(e.sourceFile);if(!r)return!0;t=r.kind,n=r.getStart(e.sourceFile)}return e.sourceFile.getLineAndCharacterOfPosition(e.currentTokenSpan.pos).line===e.sourceFile.getLineAndCharacterOfPosition(n).line?20===t||1===t:27===t&&27===e.currentTokenSpan.kind||241!==t&&27!==t&&(265===e.contextNode.kind||266===e.contextNode.kind?!OD(e.currentTokenParent)||!!e.currentTokenParent.type||21!==t:LD(e.currentTokenParent)?!e.currentTokenParent.initializer:249!==e.currentTokenParent.kind&&243!==e.currentTokenParent.kind&&241!==e.currentTokenParent.kind&&23!==t&&21!==t&&40!==t&&41!==t&&44!==t&&14!==t&&28!==t&&229!==t&&16!==t&&15!==t&&25!==t)}function ife(e){return BZ(e.currentTokenSpan.end,e.currentTokenParent,e.sourceFile)}function ofe(e){return!bE(e.contextNode)||!GN(e.contextNode.expression)||e.contextNode.expression.getText().includes(".")}function afe(e,t){return{options:e,getRules:sfe(),host:t}}function sfe(){return void 0===qde&&(qde=function(e){const t=function(e){const t=new Array(hfe*hfe),n=new Array(t.length);for(const r of e){const e=r.leftTokenRange.isSpecific&&r.rightTokenRange.isSpecific;for(const i of r.leftTokenRange.tokens)for(const o of r.rightTokenRange.tokens){const a=lfe(i,o);let s=t[a];void 0===s&&(s=t[a]=[]),vfe(s,r.rule,e,n,a)}}return t}(e);return e=>{const n=t[lfe(e.currentTokenSpan.kind,e.nextTokenSpan.kind)];if(n){const t=[];let r=0;for(const i of n){const n=~cfe(r);i.action&n&&k(i.context,t=>t(e))&&(t.push(i),r|=i.action)}if(t.length)return t}}}($de())),qde}function cfe(e){let t=0;return 1&e&&(t|=28),2&e&&(t|=96),28&e&&(t|=28),96&e&&(t|=96),t}function lfe(e,t){return gn.assert(e<=166&&t<=166,"Must compute formatting context from tokens"),e*hfe+t}var _fe,ufe,dfe,pfe,ffe,mfe=5,gfe=31,hfe=167,yfe=((_fe=yfe||{})[_fe.StopRulesSpecific=0]="StopRulesSpecific",_fe[_fe.StopRulesAny=1*mfe]="StopRulesAny",_fe[_fe.ContextRulesSpecific=2*mfe]="ContextRulesSpecific",_fe[_fe.ContextRulesAny=3*mfe]="ContextRulesAny",_fe[_fe.NoContextRulesSpecific=4*mfe]="NoContextRulesSpecific",_fe[_fe.NoContextRulesAny=5*mfe]="NoContextRulesAny",_fe);function vfe(e,t,n,r,i){const o=3&t.action?n?0:yfe.StopRulesAny:t.context!==Ude?n?yfe.ContextRulesSpecific:yfe.ContextRulesAny:n?yfe.NoContextRulesSpecific:yfe.NoContextRulesAny,a=r[i]||0;e.splice(function(e,t){let n=0;for(let r=0;r<=t;r+=mfe)n+=e&gfe,e>>=mfe;return n}(a,o),0,t),r[i]=function(e,t){const n=1+(e>>t&gfe);return gn.assert((n&gfe)===n,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),e&~(gfe<gn.formatSyntaxKind(n)}),r}function xfe(e,t,n){const r=t.getLineAndCharacterOfPosition(e).line;if(0===r)return[];let i=Ad(r,t);for(;Xa(t.text.charCodeAt(i));)i--;Qa(t.text.charCodeAt(i))&&i--;return Afe({pos:Fd(r-1,t),end:i+1},t,n,2)}function Sfe(e,t,n){return Pfe(Dfe(Nfe(e,27,t)),t,n,3)}function kfe(e,t,n){const r=Nfe(e,19,t);if(!r)return[];return Afe({pos:BX(Dfe(r.parent).getStart(t),t),end:e},t,n,4)}function Tfe(e,t,n){return Pfe(Dfe(Nfe(e,20,t)),t,n,5)}function Cfe(e,t){return Afe({pos:0,end:e.text.length},e,t,0)}function wfe(e,t,n,r){return Afe({pos:BX(e,n),end:t},n,r,1)}function Nfe(e,t,n){const r=hQ(e,n);return r&&r.kind===t&&e===r.getEnd()?r:void 0}function Dfe(e){let t=e;for(;t&&t.parent&&t.parent.end===e.end&&!Efe(t.parent,t);)t=t.parent;return t}function Efe(e,t){switch(e.kind){case 264:case 265:return ix(e.members,t);case 268:const n=e.body;return!!n&&269===n.kind&&ix(n.statements,t);case 308:case 242:case 269:return ix(e.statements,t);case 300:return ix(e.block.statements,t)}return!1}function Ffe(e,t,n,r,i,o){const a={pos:e.pos,end:e.end};return zde(t.text,n,a.pos,a.end,n=>Ife(a,e,r,i,n,o,1,e=>!1,t))}function Pfe(e,t,n,r){if(!e)return[];return Afe({pos:BX(e.getStart(t),t),end:e.end},t,n,r)}function Afe(e,t,n,r){const i=function(e,t){return function n(r){const i=sO(r,n=>ox(n.getStart(t),n.end,e)&&n);if(i){const e=n(i);if(e)return e}return r}(t)}(e,t);return zde(t.text,t.languageVariant,function(e,t,n){const r=e.getStart(n);if(r===t.pos&&e.end===t.end)return r;const i=hQ(t.pos,n);return i?i.end>=t.pos?e.pos:i.end:e.pos}(i,e,t),e.end,o=>Ife(e,i,ffe.getIndentationForNode(i,e,t,n.options),function(e,t,n){let r,i=-1;for(;e;){const o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==i&&o!==i)break;if(ffe.shouldIndentChildNode(t,e,r,n))return t.indentSize;i=o,r=e,e=e.parent}return 0}(i,n.options,t),o,n,r,function(e,t){if(!e.length)return i;const n=e.filter(e=>VX(t,e.start,e.start+e.length)).sort((e,t)=>e.start-t.start);if(!n.length)return i;let r=0;return e=>{for(;;){if(r>=n.length)return!1;const t=n[r];if(e.end<=t.start)return!1;if($X(e.pos,e.end,t.start,t.start+t.length))return!0;r++}};function i(){return!1}}(t.parseDiagnostics,e),t))}function Ife(e,t,n,r,i,{options:o,getRules:a,host:s},c,l,_){var u;const d=new Rde(_,c,o);let p,f,m,g,y,v=-1;const b=[];if(i.advance(),i.isOnToken()){const a=_.getLineAndCharacterOfPosition(t.getStart(_)).line;let s=a;Uv(t)&&(s=_.getLineAndCharacterOfPosition(Gd(t,_)).line),function t(n,r,a,s,c,u){if(!VX(e,n.getStart(_),n.getEnd()))return;const d=S(n,a,c,u);let m=r;sO(n,e=>{g(e,-1,n,d,a,s,!1)},e=>{h(e,n,a,d)});for(;i.isOnToken()&&i.getTokenFullStart()Math.min(n.end,e.end))break;b(t,n,d,n)}function g(r,a,s,c,l,u,d,p){if(gn.assert(!sy(r)),Od(r)||jd(s,r))return a;const f=r.getStart(_),g=_.getLineAndCharacterOfPosition(f).line;let h=g;Uv(r)&&(h=_.getLineAndCharacterOfPosition(Gd(r,_)).line);let x=-1;if(d&&ix(e,s)&&(x=function(e,t,n,r,i){if(VX(r,e,t)||UX(r,e,t)){if(-1!==i)return i}else{const t=_.getLineAndCharacterOfPosition(e).line,r=BX(e,_),i=ffe.findFirstNonWhitespaceColumn(r,e,_,o);if(t!==n||e===i){const e=ffe.getBaseIndentation(o);return e>i?e:i}}return-1}(f,r.end,l,e,a),-1!==x&&(a=x)),!VX(e,r.pos,r.end))return r.ende.end)return a;if(t.token.end>f){t.token.pos>f&&i.skipToStartOf(r);break}b(t,n,c,n)}if(!i.isOnToken()||i.getTokenFullStart()>=e.end)return a;if(Ml(r)){const e=i.readTokenInfo(r);if(12!==r.kind)return gn.assert(e.token.end===r.end,"Token end is child end"),b(e,n,c,r),a}const S=171===r.kind?g:u,k=function(e,t,n,r,i,a){const s=ffe.shouldIndentChildNode(o,e)?o.indentSize:0;return a===t?{indentation:t===y?v:i.getIndentation(),delta:Math.min(o.indentSize,i.getDelta(e)+s)}:-1===n?21===e.kind&&t===y?{indentation:v,delta:i.getDelta(e)}:ffe.childStartsOnTheSameLineWithElseInIfStatement(r,e,t,_)||ffe.childIsUnindentedBranchOfConditionalExpression(r,e,t,_)||ffe.argumentStartsOnSameLineAsPreviousArgument(r,e,t,_)?{indentation:i.getIndentation(),delta:s}:{indentation:i.getIndentation()+i.getDelta(e),delta:s}:{indentation:n,delta:s}}(r,g,x,n,c,S);return t(r,m,g,h,k.indentation,k.delta),m=n,p&&210===s.kind&&-1===a&&(a=k.indentation),a}function h(t,r,a,s){gn.assert(Rl(t)),gn.assert(!sy(t));const c=function(e,t){switch(e.kind){case 177:case 263:case 219:case 175:case 174:case 220:case 180:case 181:case 185:case 186:case 178:case 179:if(e.typeParameters===t)return 30;if(e.parameters===t)return 21;break;case 214:case 215:if(e.typeArguments===t)return 30;if(e.arguments===t)return 21;break;case 264:case 232:case 265:case 266:if(e.typeParameters===t)return 30;break;case 184:case 216:case 187:case 234:case 206:if(e.typeArguments===t)return 30;break;case 188:return 19}return 0}(r,t);let l=s,u=a;if(!VX(e,t.pos,t.end))return void(t.endt.pos)break;if(e.token.kind===c){let t;if(u=_.getLineAndCharacterOfPosition(e.token.pos).line,b(e,r,s,r),-1!==v)t=v;else{const n=BX(e.token.pos,_);t=ffe.findFirstNonWhitespaceColumn(n,e.token.pos,_,o)}l=S(r,a,t,o.indentSize)}else b(e,r,s,r)}let d=-1;for(let e=0;eE(e.pos,i,!1))}-1!==e&&n&&(E(t.token.pos,e,1===u),y=g.line,v=e)}i.advance(),m=n}}(t,t,a,s,n,r)}const x=i.getCurrentLeadingTrivia();if(x){const r=ffe.nodeWillIndentChild(o,t,void 0,_,!1)?n+o.indentSize:n;k(x,r,!0,e=>{N(e,_.getLineAndCharacterOfPosition(e.pos),t,t,void 0),E(e.pos,r,!1)}),!1!==o.trimTrailingWhitespace&&function(t){let n=f?f.end:e.pos;for(const e of t)jQ(e.kind)&&(n=e.end){const e=i.isOnEOF()?i.readEOFTokenRange():i.isOnToken()?i.readTokenInfo(t).token:void 0;if(e&&e.pos===p){const n=(null==(u=hQ(e.end,_,t))?void 0:u.parent)||m;D(e,_.getLineAndCharacterOfPosition(e.pos).line,n,f,g,m,n,void 0)}}return b;function S(e,t,n,r){return{getIndentationForComment:(e,t,r)=>{switch(e){case 20:case 24:case 22:return n+i(r)}return-1!==t?t:n},getIndentationForToken:(r,o,a,s)=>!s&&function(n,r,i){switch(r){case 19:case 20:case 22:case 93:case 117:case 60:return!1;case 44:case 32:switch(i.kind){case 287:case 288:case 286:return!1}break;case 23:case 24:if(201!==i.kind)return!1}return t!==n&&!(Uv(e)&&r===function(e){if(II(e)){const t=T(e.modifiers,a_,w(e.modifiers,ID));if(t)return t.kind}switch(e.kind){case 264:return 86;case 265:return 120;case 263:return 100;case 267:return 267;case 178:return 139;case 179:return 153;case 175:if(e.asteriskToken)return 42;case 173:case 170:const t=Ac(e);if(t)return t.kind}}(e))}(r,o,a)?n+i(a):n,getIndentation:()=>n,getDelta:i,recomputeIndentation:(t,i)=>{ffe.shouldIndentChildNode(o,i,e,_)&&(n+=t?o.indentSize:-o.indentSize,r=ffe.shouldIndentChildNode(o,e)?o.indentSize:0)}};function i(t){return ffe.nodeWillIndentChild(o,e,t,_,!0)?r:0}}function k(t,n,r,i){for(const o of t){const t=ix(e,o);switch(o.kind){case 3:t&&F(o,n,!r),r=!1;break;case 2:r&&t&&i(o),r=!1;break;case 4:r=!0}}return r}function C(t,n,r,i){for(const o of t)if(jQ(o.kind)&&ix(e,o)){N(o,_.getLineAndCharacterOfPosition(o.pos),n,r,i)}}function N(t,n,r,i,o){let a=0;if(!l(t))if(f)a=D(t,n.line,r,f,g,m,i,o);else{P(_.getLineAndCharacterOfPosition(e.pos).line,n.line)}return f=t,p=t.end,m=r,g=n.line,a}function D(e,t,n,r,i,c,l,u){d.updateContext(r,c,e,n,l);const p=a(d);let f=!1!==d.options.trimTrailingWhitespace,m=0;return p?h(p,a=>{if(m=function(e,t,n,r,i){const a=i!==n;switch(e.action){case 1:return 0;case 16:if(t.end!==r.pos)return O(t.end,r.pos-t.end),a?2:0;break;case 32:O(t.pos,t.end-t.pos);break;case 8:if(1!==e.flags&&n!==i)return 0;if(1!==i-n)return L(t.end,r.pos-t.end,iZ(s,o)),a?0:1;break;case 4:if(1!==e.flags&&n!==i)return 0;if(1!==r.pos-t.end||32!==_.text.charCodeAt(t.end))return L(t.end,r.pos-t.end," "),a?2:0;break;case 64:c=t.end,(l=";")&&b.push(ZQ(c,0,l))}var c,l;return 0}(a,r,i,e,t),u)switch(m){case 2:n.getStart(_)===e.pos&&u.recomputeIndentation(!1,l);break;case 1:n.getStart(_)===e.pos&&u.recomputeIndentation(!0,l);break;default:gn.assert(0===m)}f=f&&!(16&a.action)&&1!==a.flags}):f=f&&1!==e.kind,t!==i&&f&&P(i,t,r),m}function E(e,t,n){const r=Lfe(t,o);if(n)L(e,0,r);else{const n=_.getLineAndCharacterOfPosition(e),i=Fd(n.line,_);(t!==function(e,t){let n=0;for(let r=0;r0){const e=Lfe(r,o);L(t,n.character,e)}else O(t,n.character)}}function P(e,t,n){for(let r=e;rt)continue;const i=A(e,t);-1!==i&&(gn.assert(i===e||!Xa(_.text.charCodeAt(i-1))),O(i,t+1-i))}}function A(e,t){let n=t;for(;n>=e&&Xa(_.text.charCodeAt(n));)n--;return n!==t?n+1:-1}function I(e,t,n){P(_.getLineAndCharacterOfPosition(e).line,_.getLineAndCharacterOfPosition(t).line+1,n)}function O(e,t){t&&b.push(ZQ(e,t,""))}function L(e,t,n){(t||n)&&b.push(ZQ(e,t,n))}}function Ofe(e,t,n,r=dQ(e,t)){const i=yc(r,PP);i&&(r=i.parent);if(r.getStart(e)<=t&&tqX(n,t)||t===n.end&&(2===n.kind||t===e.getFullWidth()))}function Lfe(e,t){if((!ufe||ufe.tabSize!==t.tabSize||ufe.indentSize!==t.indentSize)&&(ufe={tabSize:t.tabSize,indentSize:t.indentSize},dfe=pfe=void 0),t.convertTabsToSpaces){let n;const r=Math.floor(e/t.indentSize),i=e%t.indentSize;return pfe||(pfe=[]),void 0===pfe[r]?(n=sY(" ",t.indentSize*r),pfe[r]=n):n=pfe[r],i?n+sY(" ",i):n}{const n=Math.floor(e/t.tabSize),r=e-n*t.tabSize;let i;return dfe||(dfe=[]),void 0===dfe[n]?dfe[n]=i=sY("\t",n):i=dfe[n],r?i+sY(" ",r):i}}(e=>{let t;var n;function r(e){return e.baseIndentSize||0}function i(e,t,n,i,s,c,l){var f;let m=e.parent;for(;m;){let r=!0;if(n){const t=e.getStart(s);r=tn.end}const h=o(m,e,s),y=h.line===t.line||d(m,e,t.line,s);if(r){const n=null==(f=p(e,s))?void 0:f[0];let r=g(e,s,l,!!n&&_(n,s).line>h.line);if(-1!==r)return r+i;if(r=a(e,m,t,y,s,l),-1!==r)return r+i}S(l,m,e,s,c)&&!y&&(i+=l.indentSize);const v=u(m,e,t.line,s);m=(e=m).parent,t=v?s.getLineAndCharacterOfPosition(e.getStart(s)):h}return i+r(l)}function o(e,t,n){const r=p(t,n),i=r?r.pos:e.getStart(n);return n.getLineAndCharacterOfPosition(i)}function a(e,t,n,r,i,o){return(hu(e)||vu(e))&&(308===t.kind||!r)?y(n,i,o):-1}let s;var c;function l(e,t,n,r){const i=gQ(e,t,r);if(!i)return 0;if(19===i.kind)return 1;if(20===i.kind){return n===_(i,r).line?2:0}return 0}function _(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function u(e,t,n,r){if(!SE(e)||!D(e.arguments,t))return!1;return Ha(r,e.expression.getEnd()).line===n}function d(e,t,n,r){if(246===e.kind&&e.elseStatement===t){const t=YX(e,93,r);gn.assert(void 0!==t);return _(t,r).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(e,t,n,r){switch(n.kind){case 184:return i(n.typeArguments);case 211:return i(n.properties);case 210:case 276:case 280:case 207:case 208:return i(n.elements);case 188:return i(n.members);case 263:case 219:case 220:case 175:case 174:case 180:case 177:case 186:case 181:return i(n.typeParameters)||i(n.parameters);case 178:return i(n.parameters);case 264:case 232:case 265:case 266:case 346:return i(n.typeParameters);case 215:case 214:return i(n.typeArguments)||i(n.arguments);case 262:return i(n.declarations)}function i(i){return i&&UX(function(e,t,n){const r=e.getChildren(n);for(let e=1;e=0&&t=0;o--){if(28===e[o].kind)continue;if(n.getLineAndCharacterOfPosition(e[o].end).line!==i.line)return y(i,n,r);i=_(e[o],n)}return-1}function y(e,t,n){const r=t.getPositionOfLineAndCharacter(e.line,0);return b(r,r+e.character,t,n)}function v(e,t,n,r){let i=0,o=0;for(let a=e;at.text.length)return r(n);if(0===n.indentStyle)return 0;const a=hQ(e,t,void 0,!0),s=Ofe(t,e,a||null);if(s&&3===s.kind)return function(e,t,n,r){const i=Ha(e,t).line-1,o=Ha(e,r.pos).line;if(gn.assert(o>=0),i<=o)return b(Fd(o,e),t,e,n);const a=Fd(i,e),{column:s,character:c}=v(a,t,e,n);if(0===s)return s;const l=e.text.charCodeAt(a+c);return 42===l?s-1:s}(t,e,n,s);if(!a)return r(n);if(MQ(a.kind)&&a.getStart(t)<=e&&e0;){if(!Ga(e.text.charCodeAt(r)))break;r--}const i=BX(r,e);return b(i,r,e,n)}(t,e,n);if(28===a.kind&&227!==a.parent.kind){const e=function(e,t,n){const r=XX(e);return r&&r.listItemIndex>0?h(r.list.getChildren(),r.listItemIndex-1,t,n):-1}(a,t,n);if(-1!==e)return e}const p=function(e,t,n){return t&&f(e,e,t,n)}(e,a.parent,t);if(p&&!ix(p,a)){const e=[219,220].includes(u.parent.kind)?0:n.indentSize;return m(p,t,n)+e}return function(e,t,n,o,a,s){let c,u=n;for(;u;){if(KX(u,t,e)&&S(s,u,c,e,!0)){const t=_(u,e),r=l(n,u,o,e);return i(u,t,void 0,0!==r?a&&2===r?s.indentSize:0:o!==t.line?s.indentSize:0,e,!0,s)}const r=g(u,e,s,!0);if(-1!==r)return r;c=u,u=u.parent}return r(s)}(t,e,a,c,o,n)},e.getIndentationForNode=function(e,t,n,r){const o=n.getLineAndCharacterOfPosition(e.getStart(n));return i(e,o,t,0,n,!1,r)},e.getBaseIndentation=r,(c=s||(s={}))[c.Unknown=0]="Unknown",c[c.OpenBrace=1]="OpenBrace",c[c.CloseBrace=2]="CloseBrace",e.isArgumentAndStartLineOverlapsExpressionBeingCalled=u,e.childStartsOnTheSameLineWithElseInIfStatement=d,e.childIsUnindentedBranchOfConditionalExpression=function(e,t,n,r){if(jE(e)&&(t===e.whenTrue||t===e.whenFalse)){const i=Ha(r,e.condition.end).line;if(t===e.whenTrue)return n===i;{const t=_(e.whenTrue,r).line,o=Ha(r,e.whenTrue.end).line;return i===t&&o===n}}return!1},e.argumentStartsOnSameLineAsPreviousArgument=function(e,t,n,r){if(U_(e)){if(!e.arguments)return!1;const i=T(e.arguments,e=>e.pos===t.pos);if(!i)return!1;const o=e.arguments.indexOf(i);if(0===o)return!1;if(n===Ha(r,e.arguments[o-1].getEnd()).line)return!0}return!1},e.getContainingList=p,e.findFirstNonWhitespaceCharacterAndColumn=v,e.findFirstNonWhitespaceColumn=b,e.nodeWillIndentChild=x,e.shouldIndentChildNode=S})(ffe||(ffe={}));var jfe={};function Mfe(e,t,n){let r=!1;return t.forEach(t=>{const i=yc(dQ(e,t.pos),e=>ix(e,t));i&&sO(i,function i(o){var a;if(!r){if(fD(o)&&zX(t,o.getStart(e))){const t=n.resolveName(o.text,o,-1,!1);if(t&&t.declarations)for(const n of t.declarations)if(x3(n)||o.text&&e.symbol&&(null==(a=e.symbol.exports)?void 0:a.has(o.escapedText)))return void(r=!0)}o.forEachChild(i)}})}),r}a(jfe,{preparePasteEdits:()=>Mfe});var Rfe={};a(Rfe,{pasteEditsProvider:()=>Jfe});var Bfe="providePostPasteEdits";function Jfe(e,t,n,r,i,o,a,s){return{edits:sde.ChangeTracker.with({host:i,formatContext:a,preferences:o},c=>zfe(e,t,n,r,i,o,a,s,c)),fixId:Bfe}}function zfe(e,t,n,r,i,o,a,s,c){let l;t.length!==n.length&&(l=1===t.length?t[0]:t.join(iZ(a.host,a.options)));const _=[];let u,d=e.text;for(let e=n.length-1;e>=0;e--){const{pos:r,end:i}=n[e];d=l?d.slice(0,r)+l+d.slice(i):d.slice(0,r)+t[e]+d.slice(i)}gn.checkDefined(i.runWithTemporaryFileUpdate).call(i,e.fileName,d,(d,p,f)=>{if(u=$7.createImportAdder(f,d,o,i),null==r?void 0:r.range){gn.assert(r.range.length===t.length),r.range.forEach(e=>{const t=r.file.statements,n=w(t,t=>t.end>e.pos);if(-1===n)return;let i=w(t,t=>t.end>=e.end,n);-1!==i&&e.end<=t[i].getStart()&&i--,_.push(...t.slice(n,-1===i?t.length:i+1))}),gn.assertIsDefined(p,"no original program found");const n=p.getTypeChecker(),o=function({file:e,range:t}){const n=t[0].pos,r=t[t.length-1].end,i=dQ(e,n),o=mQ(e,n)??dQ(e,r);return{pos:fD(i)&&n<=i.getStart(e)?i.getFullStart():n,end:fD(o)&&r===o.getEnd()?sde.getAdjustedEndPosition(e,o,{}):r}}(r),a=y3(r.file,_,n,N3(f,_,n),o),s=!b0(e.fileName,p,i,!!r.file.commonJsModuleIndicator);X4(r.file,a.targetFileImportsFromOldFile,c,s),P3(r.file,a.oldImportsNeededByTargetFile,a.targetFileImportsFromOldFile,n,d,u)}else{const e={sourceFile:f,program:p,cancellationToken:s,host:i,preferences:o,formatContext:a};let r=0;n.forEach((n,i)=>{const o=n.end-n.pos,a=l??t[i],s=n.pos+r,c={pos:s,end:s+a.length};r+=a.length-o;const _=yc(dQ(e.sourceFile,c.pos),e=>ix(e,c));_&&sO(_,function t(n){if(fD(n)&&zX(c,n.getStart(f))&&!(null==d?void 0:d.getTypeChecker().resolveName(n.text,n,-1,!1)))return u.addImportForUnresolvedIdentifier(e,n,!0);n.forEachChild(t)})})}u.writeFixes(c,bY(r?r.file:e,o))}),u.hasFixes()&&n.forEach((n,r)=>{c.replaceRangeWithText(e,{pos:n.pos,end:n.end},l??t[r])})}var qfe={};a(qfe,{ANONYMOUS:()=>AZ,AccessFlags:()=>ti,AssertionLevel:()=>vt,AssignmentDeclarationKind:()=>ui,AssignmentKind:()=>th,Associativity:()=>cy,BreakpointResolver:()=>k7,BuilderFileEmit:()=>dW,BuilderProgramKind:()=>zW,BuilderState:()=>_W,CallHierarchy:()=>C7,CharacterCodes:()=>Ni,CheckFlags:()=>Hr,CheckMode:()=>sJ,ClassificationType:()=>oX,ClassificationTypeNames:()=>iX,CommentDirectiveType:()=>Er,Comparison:()=>d,CompletionInfoFlags:()=>QG,CompletionTriggerKind:()=>UG,Completions:()=>Mae,ContainerFlags:()=>aB,ContextFlags:()=>Br,Debug:()=>gn,DiagnosticCategory:()=>di,Diagnostics:()=>ha,DocumentHighlights:()=>R0,ElementFlags:()=>ei,EmitFlags:()=>Pi,EmitHint:()=>Li,EmitOnly:()=>Ir,EndOfLineState:()=>eX,ExitStatus:()=>Lr,ExportKind:()=>T0,Extension:()=>Di,ExternalEmitHelpers:()=>Oi,FileIncludeKind:()=>Pr,FilePreprocessingDiagnosticsKind:()=>Ar,FileSystemEntryKind:()=>lo,FileWatcherEventKind:()=>Vi,FindAllReferences:()=>Bce,FlattenLevel:()=>Rz,FlowFlags:()=>Dr,ForegroundColorEscapeSequences:()=>_V,FunctionFlags:()=>Jh,GeneratedIdentifierFlags:()=>Cr,GetLiteralTextFlags:()=>lp,GoToDefinition:()=>wle,HighlightSpanKind:()=>WG,IdentifierNameMap:()=>pz,ImportKind:()=>k0,ImportsNotUsedAsValues:()=>xi,IndentStyle:()=>$G,IndexFlags:()=>ni,IndexKind:()=>ai,InferenceFlags:()=>li,InferencePriority:()=>ci,InlayHintKind:()=>VG,InlayHints:()=>Vle,InternalEmitFlags:()=>Ai,InternalNodeBuilderFlags:()=>zr,InternalSymbolName:()=>Gr,IntersectionFlags:()=>Rr,InvalidatedProjectKind:()=>OK,JSDocParsingMode:()=>zi,JsDoc:()=>Gle,JsTyping:()=>cG,JsxEmit:()=>bi,JsxFlags:()=>Sr,JsxReferenceKind:()=>ri,LanguageFeatureMinimumTarget:()=>Ii,LanguageServiceMode:()=>BG,LanguageVariant:()=>Ci,LexicalEnvironmentFlags:()=>Mi,ListFormat:()=>Ri,LogLevel:()=>hn,MapCode:()=>m_e,MemberOverrideStatus:()=>jr,ModifierFlags:()=>xr,ModuleDetectionKind:()=>mi,ModuleInstanceState:()=>nB,ModuleKind:()=>vi,ModuleResolutionKind:()=>fi,ModuleSpecifierEnding:()=>Wk,NavigateTo:()=>_2,NavigationBar:()=>x2,NewLineKind:()=>Si,NodeBuilderFlags:()=>Jr,NodeCheckFlags:()=>Xr,NodeFactoryFlags:()=>lw,NodeFlags:()=>br,NodeResolutionFeatures:()=>ZM,ObjectFlags:()=>Yr,OperationCanceledException:()=>Fr,OperatorPrecedence:()=>py,OrganizeImports:()=>x_e,OrganizeImportsMode:()=>qG,OuterExpressionKinds:()=>ji,OutliningElementsCollector:()=>Z_e,OutliningSpanKind:()=>YG,OutputFileType:()=>ZG,PackageJsonAutoImportPreference:()=>RG,PackageJsonDependencyGroup:()=>MG,PatternMatchKind:()=>u1,PollingInterval:()=>Wi,PollingWatchKind:()=>yi,PragmaKindFlags:()=>Bi,PredicateSemantics:()=>Tr,PreparePasteEdits:()=>jfe,PrivateIdentifierKind:()=>dN,ProcessLevel:()=>oq,ProgramUpdateLevel:()=>zU,QuotePreference:()=>yY,RegularExpressionFlags:()=>wr,RelationComparisonResult:()=>kr,Rename:()=>cue,ScriptElementKind:()=>nX,ScriptElementKindModifier:()=>rX,ScriptKind:()=>ki,ScriptSnapshot:()=>FG,ScriptTarget:()=>Ti,SemanticClassificationFormat:()=>zG,SemanticMeaning:()=>sX,SemicolonPreference:()=>KG,SignatureCheckMode:()=>cJ,SignatureFlags:()=>oi,SignatureHelp:()=>mue,SignatureInfo:()=>uW,SignatureKind:()=>ii,SmartSelectionRange:()=>zue,SnippetKind:()=>Fi,StatisticType:()=>bH,StructureIsReused:()=>Or,SymbolAccessibility:()=>Vr,SymbolDisplay:()=>Yue,SymbolDisplayPartKind:()=>XG,SymbolFlags:()=>Kr,SymbolFormatFlags:()=>Ur,SyntaxKind:()=>vr,Ternary:()=>_i,ThrottledCancellationToken:()=>f7,TokenClass:()=>tX,TokenFlags:()=>Nr,TransformFlags:()=>Ei,TypeFacts:()=>oJ,TypeFlags:()=>Qr,TypeFormatFlags:()=>qr,TypeMapKind:()=>si,TypePredicateKind:()=>Wr,TypeReferenceSerializationKind:()=>$r,UnionReduction:()=>Mr,UpToDateStatusType:()=>aK,VarianceFlags:()=>Zr,Version:()=>Cn,VersionRange:()=>Nn,WatchDirectoryFlags:()=>wi,WatchDirectoryKind:()=>hi,WatchFileKind:()=>gi,WatchLogLevel:()=>GU,WatchType:()=>V$,accessPrivateIdentifier:()=>Oz,addEmitFlags:()=>Fw,addEmitHelper:()=>Xw,addEmitHelpers:()=>Qw,addInternalEmitFlags:()=>Aw,addNodeFactoryPatcher:()=>uw,addObjectAllocatorPatcher:()=>Kx,addRange:()=>de,addRelatedInfo:()=>fT,addSyntheticLeadingComment:()=>Uw,addSyntheticTrailingComment:()=>$w,addToSeen:()=>Dx,advancedAsyncSuperHelper:()=>KN,affectsDeclarationPathOptionDeclarations:()=>KO,affectsEmitOptionDeclarations:()=>$O,allKeysStartWithDot:()=>FR,altDirectorySeparator:()=>yo,and:()=>on,append:()=>le,appendIfUnique:()=>fe,arrayFrom:()=>Be,arrayIsEqualTo:()=>ae,arrayIsHomogeneous:()=>FT,arrayOf:()=>Re,arrayReverseIterator:()=>ge,arrayToMap:()=>qe,arrayToMultiMap:()=>Ve,arrayToNumericMap:()=>Ue,assertType:()=>cn,assign:()=>Je,asyncSuperHelper:()=>$N,attachFileToDiagnostics:()=>nS,base64decode:()=>Ab,base64encode:()=>Pb,binarySearch:()=>Ee,binarySearchKey:()=>Fe,bindSourceFile:()=>lB,breakIntoCharacterSpans:()=>D1,breakIntoWordSpans:()=>E1,buildLinkParts:()=>nZ,buildOpts:()=>iL,buildOverload:()=>Gfe,bundlerModuleNameResolver:()=>tR,canBeConvertedToAsync:()=>Z1,canHaveDecorators:()=>OI,canHaveExportModifier:()=>ZT,canHaveFlowNode:()=>zg,canHaveIllegalDecorators:()=>eI,canHaveIllegalModifiers:()=>tI,canHaveIllegalType:()=>YA,canHaveIllegalTypeParameters:()=>ZA,canHaveJSDoc:()=>qg,canHaveLocals:()=>fu,canHaveModifiers:()=>II,canHaveModuleSpecifier:()=>Tg,canHaveSymbol:()=>pu,canIncludeBindAndCheckDiagnostics:()=>xT,canJsonReportNoInputFiles:()=>Nj,canProduceDiagnostics:()=>Bq,canUsePropertyAccess:()=>tC,canWatchAffectingLocation:()=>_$,canWatchAtTypes:()=>s$,canWatchDirectoryOrFile:()=>o$,canWatchDirectoryOrFilePath:()=>a$,cartesianProduct:()=>un,cast:()=>st,chainBundle:()=>az,chainDiagnosticMessages:()=>sS,changeAnyExtension:()=>ea,changeCompilerHostLikeToUseCache:()=>aV,changeExtension:()=>eT,changeFullExtension:()=>ta,changesAffectModuleResolution:()=>ad,changesAffectingProgramStructure:()=>sd,characterCodeToRegularExpressionFlag:()=>Ja,childIsDecorated:()=>Sm,classElementOrClassElementParameterIsDecorated:()=>Tm,classHasClassThisAssignment:()=>Gz,classHasDeclaredOrExplicitlyAssignedName:()=>tq,classHasExplicitlyAssignedName:()=>eq,classOrConstructorParameterIsDecorated:()=>km,classicNameResolver:()=>GR,classifier:()=>V7,cleanExtendedConfigCache:()=>VU,clear:()=>I,clearMap:()=>vx,clearSharedExtendedConfigFileWatcher:()=>UU,climbPastPropertyAccess:()=>xX,clone:()=>Ke,cloneCompilerOptions:()=>qQ,closeFileWatcher:()=>_x,closeFileWatcherOf:()=>YU,codefix:()=>$7,collapseTextChangeRangesAcrossMultipleVersions:()=>ic,collectExternalModuleInfo:()=>_z,combine:()=>_e,combinePaths:()=>Uo,commandLineOptionOfCustomType:()=>eL,commentPragmas:()=>Ji,commonOptionsWithBuild:()=>JO,compact:()=>se,compareBooleans:()=>Bt,compareDataObjects:()=>yx,compareDiagnostics:()=>_S,compareEmitHelpers:()=>fN,compareNumberOfDirectorySeparators:()=>Gk,comparePaths:()=>aa,comparePathsCaseInsensitive:()=>oa,comparePathsCaseSensitive:()=>ia,comparePatternKeys:()=>AR,compareProperties:()=>Rt,compareStringsCaseInsensitive:()=>Dt,compareStringsCaseInsensitiveEslintCompatible:()=>Et,compareStringsCaseSensitive:()=>Ft,compareStringsCaseSensitiveUI:()=>Mt,compareTextSpans:()=>Ct,compareValues:()=>Tt,compilerOptionsAffectDeclarationPath:()=>ZS,compilerOptionsAffectEmit:()=>YS,compilerOptionsAffectSemanticDiagnostics:()=>QS,compilerOptionsDidYouMeanDiagnostics:()=>vL,compilerOptionsIndicateEsModules:()=>dY,computeCommonSourceDirectoryOfFilenames:()=>tV,computeLineAndCharacterOfPosition:()=>Wa,computeLineOfPosition:()=>$a,computeLineStarts:()=>za,computePositionOfLineAndCharacter:()=>Ua,computeSignatureWithDiagnostics:()=>VW,computeSuggestionDiagnostics:()=>U1,computedOptions:()=>TS,concatenate:()=>Y,concatenateDiagnosticMessageChains:()=>cS,consumesNodeCoreModules:()=>QZ,contains:()=>D,containsIgnoredPath:()=>zT,containsObjectRestOrSpread:()=>PI,containsParseError:()=>Cd,containsPath:()=>sa,convertCompilerOptionsForTelemetry:()=>oM,convertCompilerOptionsFromJson:()=>Aj,convertJsonOption:()=>Jj,convertToBase64:()=>Fb,convertToJson:()=>XL,convertToObject:()=>GL,convertToOptionsWithAbsolutePaths:()=>cj,convertToRelativePath:()=>ua,convertToTSConfig:()=>ZL,convertTypeAcquisitionFromJson:()=>Ij,copyComments:()=>hZ,copyEntries:()=>dd,copyLeadingComments:()=>bZ,copyProperties:()=>Ge,copyTrailingAsLeadingComments:()=>SZ,copyTrailingComments:()=>xZ,couldStartTrivia:()=>rs,countWhere:()=>F,createAbstractBuilder:()=>n$,createAccessorPropertyBackingField:()=>CI,createAccessorPropertyGetRedirector:()=>wI,createAccessorPropertySetRedirector:()=>NI,createBaseNodeFactory:()=>nw,createBinaryExpressionTrampoline:()=>yI,createBuilderProgram:()=>WW,createBuilderProgramUsingIncrementalBuildInfo:()=>XW,createBuilderStatusReporter:()=>pK,createCacheableExportInfoMap:()=>C0,createCachedDirectoryStructureHost:()=>JU,createClassifier:()=>M0,createCommentDirectivesMap:()=>Kd,createCompilerDiagnostic:()=>oS,createCompilerDiagnosticForInvalidCustomType:()=>_L,createCompilerDiagnosticFromMessageChain:()=>aS,createCompilerHost:()=>nV,createCompilerHostFromProgramHost:()=>$$,createCompilerHostWorker:()=>oV,createDetachedDiagnostic:()=>Zx,createDiagnosticCollection:()=>hy,createDiagnosticForFileFromMessageChain:()=>Yp,createDiagnosticForNode:()=>Wp,createDiagnosticForNodeArray:()=>$p,createDiagnosticForNodeArrayFromMessageChain:()=>Gp,createDiagnosticForNodeFromMessageChain:()=>Hp,createDiagnosticForNodeInSourceFile:()=>Kp,createDiagnosticForRange:()=>ef,createDiagnosticMessageChainFromDiagnostic:()=>Zp,createDiagnosticReporter:()=>x$,createDocumentPositionMapper:()=>tz,createDocumentRegistry:()=>Z0,createDocumentRegistryInternal:()=>e1,createEmitAndSemanticDiagnosticsBuilderProgram:()=>t$,createEmitHelperFactory:()=>pN,createEmptyExports:()=>dA,createEvaluator:()=>TC,createExpressionForJsxElement:()=>hA,createExpressionForJsxFragment:()=>yA,createExpressionForObjectLiteralElementLike:()=>SA,createExpressionForPropertyName:()=>xA,createExpressionFromEntityName:()=>bA,createExternalHelpersImportDeclarationIfNeeded:()=>JA,createFileDiagnostic:()=>rS,createFileDiagnosticFromMessageChain:()=>Qp,createFlowNode:()=>sB,createForOfBindingStatement:()=>vA,createFutureSourceFile:()=>S0,createGetCanonicalFileName:()=>Xt,createGetIsolatedDeclarationErrors:()=>qq,createGetSourceFile:()=>rV,createGetSymbolAccessibilityDiagnosticForNode:()=>zq,createGetSymbolAccessibilityDiagnosticForNodeName:()=>Jq,createGetSymbolWalker:()=>mB,createIncrementalCompilerHost:()=>nK,createIncrementalProgram:()=>rK,createJsxFactoryExpression:()=>gA,createLanguageService:()=>h7,createLanguageServiceSourceFile:()=>_7,createMemberAccessForPropertyName:()=>pA,createModeAwareCache:()=>JM,createModeAwareCacheKey:()=>BM,createModeMismatchDetails:()=>bd,createModuleNotFoundChain:()=>vd,createModuleResolutionCache:()=>WM,createModuleResolutionLoader:()=>IV,createModuleResolutionLoaderUsingGlobalCache:()=>h$,createModuleSpecifierResolutionHost:()=>pY,createMultiMap:()=>Qe,createNameResolver:()=>NC,createNodeConverters:()=>ow,createNodeFactory:()=>dw,createOptionNameMap:()=>aL,createOverload:()=>Hfe,createPackageJsonImportFilter:()=>XZ,createPackageJsonInfo:()=>GZ,createParenthesizerRules:()=>rw,createPatternMatcher:()=>p1,createPrinter:()=>jU,createPrinterWithDefaults:()=>AU,createPrinterWithRemoveComments:()=>IU,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>OU,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>LU,createProgram:()=>GV,createProgramDiagnostics:()=>cW,createProgramHost:()=>G$,createPropertyNameNodeForIdentifierOrLiteral:()=>GT,createQueue:()=>et,createRange:()=>Jb,createRedirectedBuilderProgram:()=>ZW,createResolutionCache:()=>y$,createRuntimeTypeSerializer:()=>pq,createScanner:()=>ks,createSemanticDiagnosticsBuilderProgram:()=>e$,createSet:()=>tt,createSolutionBuilder:()=>hK,createSolutionBuilderHost:()=>mK,createSolutionBuilderWithWatch:()=>yK,createSolutionBuilderWithWatchHost:()=>gK,createSortedArray:()=>re,createSourceFile:()=>uO,createSourceMapGenerator:()=>jJ,createSourceMapSource:()=>Tw,createSuperAccessVariableStatement:()=>hq,createSymbolTable:()=>nd,createSymlinkCache:()=>ok,createSyntacticTypeNodeBuilder:()=>sG,createSystemWatchFunctions:()=>po,createTextChange:()=>eY,createTextChangeFromStartLength:()=>ZQ,createTextChangeRange:()=>nc,createTextRangeFromNode:()=>XQ,createTextRangeFromSpan:()=>YQ,createTextSpan:()=>Ys,createTextSpanFromBounds:()=>Zs,createTextSpanFromNode:()=>HQ,createTextSpanFromRange:()=>QQ,createTextSpanFromStringLiteralLikeContent:()=>GQ,createTextWriter:()=>zy,createTokenRange:()=>Wb,createTypeChecker:()=>gJ,createTypeReferenceDirectiveResolutionCache:()=>$M,createTypeReferenceResolutionLoader:()=>jV,createWatchCompilerHost:()=>iK,createWatchCompilerHostOfConfigFile:()=>Y$,createWatchCompilerHostOfFilesAndCompilerOptions:()=>Z$,createWatchFactory:()=>W$,createWatchHost:()=>U$,createWatchProgram:()=>oK,createWatchStatusReporter:()=>C$,createWriteFileMeasuringIO:()=>iV,declarationNameToString:()=>Bp,decodeMappings:()=>VJ,decodedTextSpanIntersectsWith:()=>Ks,deduplicate:()=>ne,defaultHoverMaximumTruncationLength:()=>Zu,defaultInitCompilerOptions:()=>lL,defaultMaximumTruncationLength:()=>Qu,diagnosticCategoryName:()=>pi,diagnosticToString:()=>m0,diagnosticsEqualityComparer:()=>fS,directoryProbablyExists:()=>jb,directorySeparator:()=>ho,displayPart:()=>UY,displayPartsToString:()=>o7,disposeEmitNodes:()=>Nw,documentSpansEqual:()=>IY,dumpTracingLegend:()=>yr,elementAt:()=>ye,elideNodes:()=>bI,emitDetachedComments:()=>Dv,emitFiles:()=>DU,emitFilesAndReportErrors:()=>B$,emitFilesAndReportErrorsAndGetExitStatus:()=>J$,emitModuleKindIsNonNodeESM:()=>qS,emitNewLineBeforeLeadingCommentOfPosition:()=>Nv,emitResolverSkipsTypeChecking:()=>NU,emitSkippedWithNoDiagnostics:()=>eW,emptyArray:()=>p,emptyFileSystemEntries:()=>uT,emptyMap:()=>f,emptyOptions:()=>JG,endsWith:()=>qt,ensurePathIsNonModuleName:()=>Zo,ensureScriptKind:()=>Dk,ensureTrailingDirectorySeparator:()=>Yo,entityNameToString:()=>Vp,enumerateInsertsAndDeletes:()=>_n,equalOwnProperties:()=>ze,equateStringsCaseInsensitive:()=>xt,equateStringsCaseSensitive:()=>St,equateValues:()=>bt,escapeJsxAttributeString:()=>Ly,escapeLeadingUnderscores:()=>xc,escapeNonAsciiString:()=>Fy,escapeSnippetText:()=>KT,escapeString:()=>Dy,escapeTemplateSubstitution:()=>vy,evaluatorResult:()=>kC,every:()=>k,exclusivelyPrefixedNodeCoreModules:()=>OC,executeCommandLine:()=>MH,expandPreOrPostfixIncrementOrDecrementExpression:()=>kA,explainFiles:()=>I$,explainIfFileIsRedirectAndImpliedFormat:()=>O$,exportAssignmentIsAlias:()=>Sh,expressionResultIsUnused:()=>JT,extend:()=>He,extensionFromPath:()=>sT,extensionIsTS:()=>oT,extensionsNotSupportingExtensionlessResolution:()=>Bk,externalHelpersModuleNameText:()=>Xu,factory:()=>kw,fileExtensionIs:()=>Eo,fileExtensionIsOneOf:()=>Fo,fileIncludeReasonToDiagnostics:()=>M$,fileShouldUseJavaScriptRequire:()=>b0,filter:()=>P,filterMutate:()=>A,filterSemanticDiagnostics:()=>nW,find:()=>T,findAncestor:()=>yc,findBestPatternMatch:()=>Zt,findChildOfKind:()=>YX,findComputedPropertyNameCacheAssignment:()=>DI,findConfigFile:()=>ZU,findConstructorDeclaration:()=>wC,findContainingList:()=>ZX,findDiagnosticForNode:()=>e0,findFirstNonJsxWhitespaceToken:()=>fQ,findIndex:()=>w,findLast:()=>C,findLastIndex:()=>N,findListItemInfo:()=>XX,findModifier:()=>EY,findNextToken:()=>gQ,findPackageJson:()=>HZ,findPackageJsons:()=>KZ,findPrecedingMatchingToken:()=>NQ,findPrecedingToken:()=>hQ,findSuperStatementIndexPath:()=>xz,findTokenOnLeftOfPosition:()=>mQ,findUseStrictPrologue:()=>DA,first:()=>xe,firstDefined:()=>y,firstDefinedIterator:()=>v,firstIterator:()=>Se,firstOrOnly:()=>o0,firstOrUndefined:()=>ve,firstOrUndefinedIterator:()=>be,fixupCompilerOptions:()=>l2,flatMap:()=>R,flatMapIterator:()=>J,flatMapToMutable:()=>B,flatten:()=>M,flattenCommaList:()=>FI,flattenDestructuringAssignment:()=>Bz,flattenDestructuringBinding:()=>qz,flattenDiagnosticMessageText:()=>SV,forEach:()=>g,forEachAncestor:()=>ld,forEachAncestorDirectory:()=>fa,forEachAncestorDirectoryStoppingAtGlobalCache:()=>RR,forEachChild:()=>sO,forEachChildRecursively:()=>cO,forEachDynamicImportOrRequireCall:()=>jC,forEachEmittedFile:()=>cU,forEachEnclosingBlockScopeContainer:()=>Rp,forEachEntry:()=>_d,forEachExternalModuleToImportFrom:()=>D0,forEachImportClauseDeclaration:()=>Ag,forEachKey:()=>ud,forEachLeadingCommentRange:()=>ds,forEachNameInAccessChainWalkingLeft:()=>Lx,forEachNameOfDefaultExport:()=>j0,forEachOptionsSyntaxByName:()=>WC,forEachProjectReference:()=>qC,forEachPropertyAssignment:()=>Qf,forEachResolvedProjectReference:()=>zC,forEachReturnStatement:()=>Lf,forEachRight:()=>h,forEachTrailingCommentRange:()=>ps,forEachTsConfigPropArray:()=>em,forEachUnique:()=>LY,forEachYieldExpression:()=>jf,formatColorAndReset:()=>yV,formatDiagnostic:()=>lV,formatDiagnostics:()=>cV,formatDiagnosticsWithColorAndContext:()=>xV,formatGeneratedName:()=>TI,formatGeneratedNamePart:()=>SI,formatLocation:()=>bV,formatMessage:()=>iS,formatStringFromArgs:()=>Gx,formatting:()=>jde,generateDjb2Hash:()=>qi,generateTSConfig:()=>sj,getAdjustedReferenceLocation:()=>cQ,getAdjustedRenameLocation:()=>lQ,getAliasDeclarationFromName:()=>bh,getAllAccessorDeclarations:()=>bv,getAllDecoratorsOfClass:()=>Dz,getAllDecoratorsOfClassElement:()=>Ez,getAllJSDocTags:()=>fl,getAllJSDocTagsOfKind:()=>ml,getAllKeys:()=>je,getAllProjectOutputs:()=>TU,getAllSuperTypeNodes:()=>Dh,getAllowImportingTsExtensions:()=>CS,getAllowJSCompilerOption:()=>JS,getAllowSyntheticDefaultImports:()=>AS,getAncestor:()=>Ph,getAnyExtensionFromPath:()=>Ro,getAreDeclarationMapsEnabled:()=>BS,getAssignedExpandoInitializer:()=>Zm,getAssignedName:()=>Ic,getAssignmentDeclarationKind:()=>cg,getAssignmentDeclarationPropertyAccessKind:()=>yg,getAssignmentTargetKind:()=>rh,getAutomaticTypeDirectiveNames:()=>AM,getBaseFileName:()=>jo,getBinaryOperatorPrecedence:()=>my,getBuildInfo:()=>FU,getBuildInfoFileVersionMap:()=>QW,getBuildInfoText:()=>EU,getBuildOrderFromAnyBuildOrder:()=>dK,getBuilderCreationParameters:()=>qW,getBuilderFileEmit:()=>fW,getCanonicalDiagnostic:()=>tf,getCheckFlags:()=>ux,getClassExtendsHeritageElement:()=>wh,getClassLikeDeclarationOfSymbol:()=>kx,getCombinedLocalAndExportSymbolFlags:()=>fx,getCombinedModifierFlags:()=>uc,getCombinedNodeFlags:()=>pc,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>dc,getCommentRange:()=>Bw,getCommonSourceDirectory:()=>SU,getCommonSourceDirectoryOfConfig:()=>kU,getCompilerOptionValue:()=>ek,getConditions:()=>FM,getConfigFileParsingDiagnostics:()=>WV,getConstantValue:()=>Hw,getContainerFlags:()=>pB,getContainerNode:()=>LX,getContainingClass:()=>rm,getContainingClassExcludingClassDecorators:()=>am,getContainingClassStaticBlock:()=>im,getContainingFunction:()=>tm,getContainingFunctionDeclaration:()=>nm,getContainingFunctionOrClassStaticBlock:()=>om,getContainingNodeArray:()=>qT,getContainingObjectLiteralElement:()=>v7,getContextualTypeFromParent:()=>wZ,getContextualTypeFromParentOrAncestorTypeNode:()=>rQ,getDeclarationDiagnostics:()=>Uq,getDeclarationEmitExtensionForPath:()=>Yy,getDeclarationEmitOutputFilePath:()=>Xy,getDeclarationEmitOutputFilePathWorker:()=>Qy,getDeclarationFileExtension:()=>kO,getDeclarationFromName:()=>hh,getDeclarationModifierFlagsFromSymbol:()=>dx,getDeclarationOfKind:()=>ed,getDeclarationsOfKind:()=>td,getDeclaredExpandoInitializer:()=>Ym,getDecorators:()=>Oc,getDefaultCompilerOptions:()=>a7,getDefaultFormatCodeSettings:()=>HG,getDefaultLibFileName:()=>Ls,getDefaultLibFilePath:()=>x7,getDefaultLikeExportInfo:()=>O0,getDefaultLikeExportNameFromDeclaration:()=>s0,getDefaultResolutionModeForFileWorker:()=>ZV,getDiagnosticText:()=>wL,getDiagnosticsWithinSpan:()=>t0,getDirectoryPath:()=>Lo,getDirectoryToWatchFailedLookupLocation:()=>u$,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>f$,getDocumentPositionMapper:()=>J1,getDocumentSpansEqualityComparer:()=>OY,getESModuleInterop:()=>PS,getEditsForFileRename:()=>r1,getEffectiveBaseTypeNode:()=>Ch,getEffectiveConstraintOfTypeParameter:()=>yl,getEffectiveContainerForJSDocTemplateTag:()=>Kg,getEffectiveImplementsTypeNodes:()=>Nh,getEffectiveInitializer:()=>Qm,getEffectiveJSDocHost:()=>Xg,getEffectiveModifierFlags:()=>Kv,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>Hv,getEffectiveModifierFlagsNoCache:()=>Yv,getEffectiveReturnTypeNode:()=>kv,getEffectiveSetAccessorTypeAnnotationNode:()=>Cv,getEffectiveTypeAnnotationNode:()=>xv,getEffectiveTypeParameterDeclarations:()=>hl,getEffectiveTypeRoots:()=>kM,getElementOrPropertyAccessArgumentExpressionOrName:()=>gg,getElementOrPropertyAccessName:()=>hg,getElementsOfBindingOrAssignmentPattern:()=>XA,getEmitDeclarations:()=>jS,getEmitFlags:()=>ap,getEmitHelpers:()=>Zw,getEmitModuleDetectionKind:()=>ES,getEmitModuleFormatOfFileWorker:()=>QV,getEmitModuleKind:()=>NS,getEmitModuleResolutionKind:()=>DS,getEmitScriptTarget:()=>wS,getEmitStandardClassFields:()=>XS,getEnclosingBlockScopeContainer:()=>Mp,getEnclosingContainer:()=>jp,getEncodedSemanticClassifications:()=>$0,getEncodedSyntacticClassifications:()=>Q0,getEndLinePosition:()=>Ad,getEntityNameFromTypeNode:()=>hm,getEntrypointsFromPackageJsonInfo:()=>bR,getErrorCountForSummary:()=>N$,getErrorSpanForNode:()=>of,getErrorSummaryText:()=>P$,getEscapedTextOfIdentifierOrLiteral:()=>Xh,getEscapedTextOfJsxAttributeName:()=>lC,getEscapedTextOfJsxNamespacedName:()=>dC,getExpandoInitializer:()=>eg,getExportAssignmentExpression:()=>kh,getExportInfoMap:()=>I0,getExportNeedsImportStarHelper:()=>sz,getExpressionAssociativity:()=>ly,getExpressionPrecedence:()=>uy,getExternalHelpersModuleName:()=>RA,getExternalModuleImportEqualsDeclarationExpression:()=>Am,getExternalModuleName:()=>Eg,getExternalModuleNameFromDeclaration:()=>Ky,getExternalModuleNameFromPath:()=>Hy,getExternalModuleNameLiteral:()=>qA,getExternalModuleRequireArgument:()=>Im,getFallbackOptions:()=>QU,getFileEmitOutput:()=>lW,getFileMatcherPatterns:()=>kk,getFileNamesFromConfigSpecs:()=>Kj,getFileWatcherEventKind:()=>ro,getFilesInErrorForSummary:()=>D$,getFirstConstructorWithBody:()=>uv,getFirstIdentifier:()=>mb,getFirstNonSpaceCharacterPosition:()=>mZ,getFirstProjectOutput:()=>wU,getFixableErrorSpanExpression:()=>r0,getFormatCodeSettingsForWriting:()=>g0,getFullWidth:()=>fd,getFunctionFlags:()=>zh,getHeritageClause:()=>Fh,getHostSignatureFromJSDoc:()=>Gg,getIdentifierAutoGenerate:()=>lN,getIdentifierGeneratedImportReference:()=>uN,getIdentifierTypeArguments:()=>sN,getImmediatelyInvokedFunctionExpression:()=>dm,getImpliedNodeFormatForEmitWorker:()=>YV,getImpliedNodeFormatForFile:()=>$V,getImpliedNodeFormatForFileWorker:()=>KV,getImportNeedsImportDefaultHelper:()=>lz,getImportNeedsImportStarHelper:()=>cz,getIndentString:()=>By,getInferredLibraryNameResolveFrom:()=>BV,getInitializedVariables:()=>sx,getInitializerOfBinaryExpression:()=>vg,getInitializerOfBindingOrAssignmentElement:()=>VA,getInterfaceBaseTypeNodes:()=>Eh,getInternalEmitFlags:()=>sp,getInvokedExpression:()=>ym,getIsFileExcluded:()=>A0,getIsolatedModules:()=>FS,getJSDocAugmentsTag:()=>Uc,getJSDocClassTag:()=>Wc,getJSDocCommentRanges:()=>wf,getJSDocCommentsAndTags:()=>Ug,getJSDocDeprecatedTag:()=>tl,getJSDocDeprecatedTagNoCache:()=>nl,getJSDocEnumTag:()=>rl,getJSDocHost:()=>Qg,getJSDocImplementsTags:()=>Vc,getJSDocOverloadTags:()=>Hg,getJSDocOverrideTagNoCache:()=>el,getJSDocParameterTags:()=>Mc,getJSDocParameterTagsNoCache:()=>Rc,getJSDocPrivateTag:()=>Hc,getJSDocPrivateTagNoCache:()=>Gc,getJSDocProtectedTag:()=>Xc,getJSDocProtectedTagNoCache:()=>Qc,getJSDocPublicTag:()=>$c,getJSDocPublicTagNoCache:()=>Kc,getJSDocReadonlyTag:()=>Yc,getJSDocReadonlyTagNoCache:()=>Zc,getJSDocReturnTag:()=>ol,getJSDocReturnType:()=>_l,getJSDocRoot:()=>Yg,getJSDocSatisfiesExpressionType:()=>sC,getJSDocSatisfiesTag:()=>sl,getJSDocTags:()=>dl,getJSDocTemplateTag:()=>al,getJSDocThisTag:()=>il,getJSDocType:()=>ll,getJSDocTypeAliasName:()=>QA,getJSDocTypeAssertionType:()=>IA,getJSDocTypeParameterDeclarations:()=>Tv,getJSDocTypeParameterTags:()=>Jc,getJSDocTypeParameterTagsNoCache:()=>zc,getJSDocTypeTag:()=>cl,getJSXImplicitImportBase:()=>nk,getJSXRuntimeImport:()=>rk,getJSXTransformEnabled:()=>tk,getKeyForCompilerOptions:()=>jM,getLanguageVariant:()=>hS,getLastChild:()=>Nx,getLeadingCommentRanges:()=>hs,getLeadingCommentRangesOfNode:()=>Cf,getLeftmostAccessExpression:()=>Ox,getLeftmostExpression:()=>jx,getLibFileNameFromLibReference:()=>JC,getLibNameFromLibReference:()=>BC,getLibraryNameFromLibFileName:()=>JV,getLineAndCharacterOfPosition:()=>Ha,getLineInfo:()=>JJ,getLineOfLocalPosition:()=>lv,getLineStartPositionForPosition:()=>BX,getLineStarts:()=>Va,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>rx,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>nx,getLinesBetweenPositions:()=>Ka,getLinesBetweenRangeEndAndRangeStart:()=>Qb,getLinesBetweenRangeEndPositions:()=>Yb,getLiteralText:()=>_p,getLocalNameForExternalImport:()=>zA,getLocalSymbolForExportDefault:()=>Nb,getLocaleSpecificMessage:()=>Yx,getLocaleTimeString:()=>T$,getMappedContextSpan:()=>BY,getMappedDocumentSpan:()=>RY,getMappedLocation:()=>MY,getMatchedFileSpec:()=>L$,getMatchedIncludeSpec:()=>j$,getMeaningFromDeclaration:()=>cX,getMeaningFromLocation:()=>lX,getMembersOfDeclaration:()=>Rf,getModeForFileReference:()=>kV,getModeForResolutionAtIndex:()=>TV,getModeForUsageLocation:()=>wV,getModifiedTime:()=>Ki,getModifiers:()=>Lc,getModuleInstanceState:()=>rB,getModuleNameStringLiteralAt:()=>sW,getModuleSpecifierEndingPreference:()=>$k,getModuleSpecifierResolverHost:()=>fY,getNameForExportedSymbol:()=>a0,getNameFromImportAttribute:()=>xC,getNameFromIndexInfo:()=>Jp,getNameFromPropertyName:()=>lY,getNameOfAccessExpression:()=>Ax,getNameOfCompilerOptionValue:()=>ij,getNameOfDeclaration:()=>Ac,getNameOfExpando:()=>ng,getNameOfJSDocTypedef:()=>Ec,getNameOfScriptTarget:()=>GS,getNameOrArgument:()=>mg,getNameTable:()=>y7,getNamespaceDeclarationNode:()=>Fg,getNewLineCharacter:()=>Bb,getNewLineKind:()=>f0,getNewLineOrDefaultFromHost:()=>iZ,getNewTargetContainer:()=>_m,getNextJSDocCommentLocation:()=>Wg,getNodeChildren:()=>cA,getNodeForGeneratedName:()=>xI,getNodeId:()=>pJ,getNodeKind:()=>jX,getNodeModifiers:()=>OQ,getNodeModulePathParts:()=>QT,getNonAssignedNameOfDeclaration:()=>Pc,getNonAssignmentOperatorForCompoundAssignment:()=>yz,getNonAugmentationDeclaration:()=>kp,getNonDecoratorTokenPosOfNode:()=>Gd,getNonIncrementalBuildInfoRoots:()=>YW,getNonModifierTokenPosOfNode:()=>Xd,getNormalizedAbsolutePath:()=>$o,getNormalizedAbsolutePathWithoutRoot:()=>Go,getNormalizedPathComponents:()=>Wo,getObjectFlags:()=>Tx,getOperatorAssociativity:()=>_y,getOperatorPrecedence:()=>fy,getOptionFromName:()=>xL,getOptionsForLibraryResolution:()=>KM,getOptionsNameMap:()=>sL,getOptionsSyntaxByArrayElementValue:()=>UC,getOptionsSyntaxByValue:()=>VC,getOrCreateEmitNode:()=>ww,getOrUpdate:()=>W,getOriginalNode:()=>hc,getOriginalNodeId:()=>rz,getOutputDeclarationFileName:()=>mU,getOutputDeclarationFileNameWorker:()=>gU,getOutputExtension:()=>pU,getOutputFileNames:()=>CU,getOutputJSFileNameWorker:()=>yU,getOutputPathsFor:()=>uU,getOwnEmitOutputFilePath:()=>Gy,getOwnKeys:()=>Le,getOwnValues:()=>Me,getPackageJsonTypesVersionsPaths:()=>SM,getPackageNameFromTypesPackageName:()=>$R,getPackageScopeForPath:()=>kR,getParameterSymbolFromJSDoc:()=>$g,getParentNodeInSpan:()=>NY,getParseTreeNode:()=>bc,getParsedCommandLineOfConfigFile:()=>NL,getPathComponents:()=>Bo,getPathFromPathComponents:()=>Jo,getPathUpdater:()=>i1,getPathsBasePath:()=>tv,getPatternFromSpec:()=>bk,getPendingEmitKindWithSeen:()=>wW,getPositionOfLineAndCharacter:()=>qa,getPossibleGenericSignatures:()=>EQ,getPossibleOriginalInputExtensionForExtension:()=>Zy,getPossibleOriginalInputPathWithoutChangingExt:()=>ev,getPossibleTypeArgumentsInfo:()=>FQ,getPreEmitDiagnostics:()=>sV,getPrecedingNonSpaceCharacterPosition:()=>gZ,getPrivateIdentifier:()=>Az,getProperties:()=>Sz,getProperty:()=>Oe,getPropertyAssignmentAliasLikeExpression:()=>Th,getPropertyNameForPropertyNameNode:()=>Kh,getPropertyNameFromType:()=>gC,getPropertyNameOfBindingOrAssignmentElement:()=>KA,getPropertySymbolFromBindingElement:()=>wY,getPropertySymbolsFromContextualType:()=>b7,getQuoteFromPreference:()=>xY,getQuotePreference:()=>bY,getRangesWhere:()=>Q,getRefactorContextSpan:()=>n0,getReferencedFileLocation:()=>UV,getRegexFromPattern:()=>Tk,getRegularExpressionForWildcard:()=>hk,getRegularExpressionsForWildcards:()=>yk,getRelativePathFromDirectory:()=>_a,getRelativePathFromFile:()=>da,getRelativePathToDirectoryOrUrl:()=>pa,getRenameLocation:()=>vZ,getReplacementSpanForContextToken:()=>KQ,getResolutionDiagnostic:()=>oW,getResolutionModeOverride:()=>EV,getResolveJsonModule:()=>LS,getResolvePackageJsonExports:()=>IS,getResolvePackageJsonImports:()=>OS,getResolvedExternalModuleName:()=>Wy,getResolvedModuleFromResolution:()=>hd,getResolvedTypeReferenceDirectiveFromResolution:()=>yd,getRestIndicatorOfBindingOrAssignmentElement:()=>$A,getRestParameterElementType:()=>Mf,getRightMostAssignedExpression:()=>ig,getRootDeclaration:()=>oy,getRootDirectoryOfResolutionCache:()=>m$,getRootLength:()=>Oo,getScriptKind:()=>uZ,getScriptKindFromFileName:()=>Ek,getScriptTargetFeatures:()=>cp,getSelectedEffectiveModifierFlags:()=>Vv,getSelectedSyntacticModifierFlags:()=>Wv,getSemanticClassifications:()=>V0,getSemanticJsxChildren:()=>gy,getSetAccessorTypeAnnotationNode:()=>pv,getSetAccessorValueParameter:()=>dv,getSetExternalModuleIndicator:()=>xS,getShebang:()=>vs,getSingleVariableOfVariableStatement:()=>Bg,getSnapshotText:()=>aY,getSnippetElement:()=>tN,getSourceFileOfModule:()=>Nd,getSourceFileOfNode:()=>wd,getSourceFilePathInNewDir:()=>iv,getSourceFileVersionAsHashFromText:()=>K$,getSourceFilesToEmit:()=>nv,getSourceMapRange:()=>Iw,getSourceMapper:()=>B1,getSourceTextOfNodeFromSourceFile:()=>Qd,getSpanOfTokenAtPosition:()=>nf,getSpellingSuggestion:()=>Jt,getStartPositionOfLine:()=>Fd,getStartPositionOfRange:()=>tx,getStartsOnNewLine:()=>Mw,getStaticPropertiesAndClassStaticBlock:()=>Tz,getStrictOptionValue:()=>HS,getStringComparer:()=>Pt,getSubPatternFromSpec:()=>xk,getSuperCallFromStatement:()=>vz,getSuperContainer:()=>um,getSupportedCodeFixes:()=>s7,getSupportedExtensions:()=>Jk,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>zk,getSwitchedType:()=>PZ,getSymbolId:()=>fJ,getSymbolNameForPrivateIdentifier:()=>Qh,getSymbolTarget:()=>dZ,getSyntacticClassifications:()=>X0,getSyntacticModifierFlags:()=>Gv,getSyntacticModifierFlagsNoCache:()=>Zv,getSynthesizedDeepClone:()=>$C,getSynthesizedDeepCloneWithReplacements:()=>KC,getSynthesizedDeepClones:()=>GC,getSynthesizedDeepClonesWithReplacements:()=>XC,getSyntheticLeadingComments:()=>zw,getSyntheticTrailingComments:()=>Vw,getTargetLabel:()=>SX,getTargetOfBindingOrAssignmentElement:()=>WA,getTemporaryModuleResolutionState:()=>SR,getTextOfConstantValue:()=>up,getTextOfIdentifierOrLiteral:()=>Gh,getTextOfJSDocComment:()=>gl,getTextOfJsxAttributeName:()=>_C,getTextOfJsxNamespacedName:()=>pC,getTextOfNode:()=>rp,getTextOfNodeFromSourceText:()=>np,getTextOfPropertyName:()=>Up,getThisContainer:()=>sm,getThisParameter:()=>fv,getTokenAtPosition:()=>dQ,getTokenPosOfNode:()=>Hd,getTokenSourceMapRange:()=>Lw,getTouchingPropertyName:()=>_Q,getTouchingToken:()=>uQ,getTrailingCommentRanges:()=>ys,getTrailingSemicolonDeferringWriter:()=>qy,getTransformers:()=>Xq,getTsBuildInfoEmitOutputFilePath:()=>lU,getTsConfigObjectLiteralExpression:()=>Yf,getTsConfigPropArrayElementValue:()=>Zf,getTypeAnnotationNode:()=>Sv,getTypeArgumentOrTypeParameterList:()=>LQ,getTypeKeywordOfTypeOnlyImport:()=>PY,getTypeNode:()=>oN,getTypeNodeIfAccessible:()=>IZ,getTypeParameterFromJsDoc:()=>Zg,getTypeParameterOwner:()=>oc,getTypesPackageName:()=>VR,getUILocale:()=>Lt,getUniqueName:()=>yZ,getUniqueSymbolId:()=>fZ,getUseDefineForClassFields:()=>zS,getWatchErrorSummaryDiagnosticMessage:()=>E$,getWatchFactory:()=>XU,group:()=>We,groupBy:()=>$e,guessIndentation:()=>qu,handleNoEmitOptions:()=>tW,handleWatchOptionsConfigDirTemplateSubstitution:()=>hj,hasAbstractModifier:()=>Bv,hasAccessorModifier:()=>zv,hasAmbientModifier:()=>Jv,hasChangesInResolutions:()=>Td,hasContextSensitiveParameters:()=>UT,hasDecorators:()=>Uv,hasDocComment:()=>AQ,hasDynamicName:()=>Wh,hasEffectiveModifier:()=>Ov,hasEffectiveModifiers:()=>Av,hasEffectiveReadonlyModifier:()=>qv,hasExtension:()=>Do,hasImplementationTSFileExtension:()=>Vk,hasIndexSignature:()=>FZ,hasInferredType:()=>FC,hasInitializer:()=>Mu,hasInvalidEscape:()=>xy,hasJSDocNodes:()=>Lu,hasJSDocParameterTags:()=>qc,hasJSFileExtension:()=>qk,hasJsonModuleEmitEnabled:()=>US,hasOnlyExpressionInitializer:()=>Ru,hasOverrideModifier:()=>Rv,hasPossibleExternalModuleReference:()=>Op,hasProperty:()=>Ie,hasPropertyAccessExpressionWithName:()=>kX,hasQuestionToken:()=>Ig,hasRecordedExternalHelpers:()=>BA,hasResolutionModeOverride:()=>yC,hasRestParameter:()=>Wu,hasScopeMarker:()=>tu,hasStaticModifier:()=>Mv,hasSyntacticModifier:()=>Lv,hasSyntacticModifiers:()=>Iv,hasTSFileExtension:()=>Uk,hasTabstop:()=>nC,hasTrailingDirectorySeparator:()=>Po,hasType:()=>ju,hasTypeArguments:()=>eh,hasZeroOrOneAsteriskCharacter:()=>ik,hostGetCanonicalFileName:()=>Vy,hostUsesCaseSensitiveFileNames:()=>Uy,idText:()=>kc,identifierIsThisKeyword:()=>vv,identifierToKeywordKind:()=>Tc,identity:()=>dt,identitySourceMapConsumer:()=>nz,ignoreSourceNewlines:()=>rN,ignoredPaths:()=>io,importFromModuleSpecifier:()=>wg,importSyntaxAffectsModuleResolution:()=>SS,indexOfAnyCharCode:()=>E,indexOfNode:()=>op,indicesOf:()=>ee,inferredTypesContainingFile:()=>RV,injectClassNamedEvaluationHelperBlockIfMissing:()=>nq,injectClassThisAssignmentIfMissing:()=>Xz,insertImports:()=>FY,insertSorted:()=>ie,insertStatementAfterCustomPrologue:()=>Vd,insertStatementAfterStandardPrologue:()=>Ud,insertStatementsAfterCustomPrologue:()=>qd,insertStatementsAfterStandardPrologue:()=>zd,intersperse:()=>S,intrinsicTagNameToString:()=>fC,introducesArgumentsExoticObject:()=>Vf,inverseJsxOptionMap:()=>LO,isAbstractConstructorSymbol:()=>Sx,isAbstractModifier:()=>kD,isAccessExpression:()=>Px,isAccessibilityModifier:()=>zQ,isAccessor:()=>v_,isAccessorModifier:()=>CD,isAliasableExpression:()=>xh,isAmbientModule:()=>mp,isAmbientPropertyDeclaration:()=>wp,isAnyDirectorySeparator:()=>xo,isAnyImportOrBareOrAccessedRequire:()=>Pp,isAnyImportOrReExport:()=>Lp,isAnyImportOrRequireStatement:()=>Ap,isAnyImportSyntax:()=>Fp,isAnySupportedFileExtension:()=>cT,isApplicableVersionedTypesKey:()=>LR,isArgumentExpressionOfElementAccess:()=>FX,isArray:()=>nt,isArrayBindingElement:()=>P_,isArrayBindingOrAssignmentElement:()=>R_,isArrayBindingOrAssignmentPattern:()=>M_,isArrayBindingPattern:()=>gE,isArrayLiteralExpression:()=>yE,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>UQ,isArrayTypeNode:()=>QD,isArrowFunction:()=>DE,isAsExpression:()=>UE,isAssertClause:()=>AF,isAssertEntry:()=>IF,isAssertionExpression:()=>Y_,isAssertsKeyword:()=>vD,isAssignmentDeclaration:()=>Xm,isAssignmentExpression:()=>ub,isAssignmentOperator:()=>cb,isAssignmentPattern:()=>F_,isAssignmentTarget:()=>ih,isAsteriskToken:()=>cD,isAsyncFunction:()=>qh,isAsyncModifier:()=>yD,isAutoAccessorPropertyDeclaration:()=>b_,isAwaitExpression:()=>AE,isAwaitKeyword:()=>bD,isBigIntLiteral:()=>XN,isBinaryExpression:()=>LE,isBinaryLogicalOperator:()=>nb,isBinaryOperatorToken:()=>uI,isBindableObjectDefinePropertyCall:()=>lg,isBindableStaticAccessExpression:()=>dg,isBindableStaticElementAccessExpression:()=>pg,isBindableStaticNameExpression:()=>fg,isBindingElement:()=>hE,isBindingElementOfBareOrAccessedRequire:()=>Wm,isBindingName:()=>l_,isBindingOrAssignmentElement:()=>I_,isBindingOrAssignmentPattern:()=>O_,isBindingPattern:()=>E_,isBlock:()=>YE,isBlockLike:()=>x0,isBlockOrCatchScoped:()=>pp,isBlockScope:()=>Np,isBlockScopedContainerTopLevel:()=>vp,isBooleanLiteral:()=>p_,isBreakOrContinueStatement:()=>Al,isBreakStatement:()=>lF,isBuildCommand:()=>jH,isBuildInfoFile:()=>sU,isBuilderProgram:()=>A$,isBundle:()=>gP,isCallChain:()=>kl,isCallExpression:()=>SE,isCallExpressionTarget:()=>uX,isCallLikeExpression:()=>q_,isCallLikeOrFunctionLikeExpression:()=>z_,isCallOrNewExpression:()=>U_,isCallOrNewExpressionTarget:()=>pX,isCallSignatureDeclaration:()=>qD,isCallToHelper:()=>HN,isCaseBlock:()=>wF,isCaseClause:()=>sP,isCaseKeyword:()=>DD,isCaseOrDefaultClause:()=>Eu,isCatchClause:()=>_P,isCatchClauseVariableDeclaration:()=>WT,isCatchClauseVariableDeclarationOrBindingElement:()=>fp,isCheckJsEnabledForFile:()=>_T,isCircularBuildOrder:()=>uK,isClassDeclaration:()=>bF,isClassElement:()=>h_,isClassExpression:()=>JE,isClassInstanceProperty:()=>x_,isClassLike:()=>y_,isClassMemberModifier:()=>o_,isClassNamedEvaluationHelperBlock:()=>Zz,isClassOrTypeElement:()=>C_,isClassStaticBlockDeclaration:()=>RD,isClassThisAssignmentBlock:()=>Hz,isColonToken:()=>uD,isCommaExpression:()=>FA,isCommaListExpression:()=>GE,isCommaSequence:()=>PA,isCommaToken:()=>oD,isComment:()=>jQ,isCommonJsExportPropertyAssignment:()=>qf,isCommonJsExportedExpression:()=>zf,isCompoundAssignment:()=>hz,isComputedNonLiteralName:()=>zp,isComputedPropertyName:()=>FD,isConciseBody:()=>ou,isConditionalExpression:()=>jE,isConditionalTypeNode:()=>iE,isConstAssertion:()=>CC,isConstTypeReference:()=>El,isConstructSignatureDeclaration:()=>UD,isConstructorDeclaration:()=>BD,isConstructorTypeNode:()=>HD,isContextualKeyword:()=>Lh,isContinueStatement:()=>cF,isCustomPrologue:()=>xf,isDebuggerStatement:()=>gF,isDeclaration:()=>hu,isDeclarationBindingElement:()=>A_,isDeclarationFileName:()=>SO,isDeclarationName:()=>gh,isDeclarationNameOfEnumOrNamespace:()=>ax,isDeclarationReadonly:()=>_f,isDeclarationStatement:()=>yu,isDeclarationWithTypeParameterChildren:()=>Ep,isDeclarationWithTypeParameters:()=>Dp,isDecorator:()=>ID,isDecoratorTarget:()=>mX,isDefaultClause:()=>cP,isDefaultImport:()=>Pg,isDefaultModifier:()=>hD,isDefaultedExpandoInitializer:()=>tg,isDeleteExpression:()=>EE,isDeleteTarget:()=>fh,isDeprecatedDeclaration:()=>d0,isDestructuringAssignment:()=>db,isDiskPathRoot:()=>To,isDoStatement:()=>rF,isDocumentRegistryEntry:()=>Y0,isDotDotDotToken:()=>iD,isDottedName:()=>gb,isDynamicName:()=>$h,isEffectiveExternalModule:()=>Tp,isEffectiveStrictModeSourceFile:()=>Cp,isElementAccessChain:()=>Sl,isElementAccessExpression:()=>xE,isEmittedFileOfProgram:()=>HU,isEmptyArrayLiteral:()=>wb,isEmptyBindingElement:()=>cc,isEmptyBindingPattern:()=>sc,isEmptyObjectLiteral:()=>Cb,isEmptyStatement:()=>eF,isEmptyStringLiteral:()=>Cm,isEntityName:()=>s_,isEntityNameExpression:()=>fb,isEnumConst:()=>lf,isEnumDeclaration:()=>kF,isEnumMember:()=>fP,isEqualityOperatorKind:()=>DZ,isEqualsGreaterThanToken:()=>pD,isExclamationToken:()=>lD,isExcludedFile:()=>Hj,isExclusivelyTypeOnlyImportOrExport:()=>CV,isExpandoPropertyDeclaration:()=>hC,isExportAssignment:()=>JF,isExportDeclaration:()=>zF,isExportModifier:()=>gD,isExportName:()=>wA,isExportNamespaceAsDefaultDeclaration:()=>Yd,isExportOrDefaultModifier:()=>vI,isExportSpecifier:()=>UF,isExportsIdentifier:()=>og,isExportsOrModuleExportsOrAlias:()=>dB,isExpression:()=>Q_,isExpressionNode:()=>Nm,isExpressionOfExternalModuleImportEqualsDeclaration:()=>OX,isExpressionOfOptionalChainRoot:()=>wl,isExpressionStatement:()=>tF,isExpressionWithTypeArguments:()=>qE,isExpressionWithTypeArgumentsInClassExtendsClause:()=>pb,isExternalModule:()=>fO,isExternalModuleAugmentation:()=>xp,isExternalModuleImportEqualsDeclaration:()=>Pm,isExternalModuleIndicator:()=>ru,isExternalModuleNameRelative:()=>As,isExternalModuleReference:()=>HF,isExternalModuleSymbol:()=>id,isExternalOrCommonJsModule:()=>sf,isFileLevelReservedGeneratedIdentifier:()=>e_,isFileLevelUniqueName:()=>Id,isFileProbablyExternalModule:()=>JI,isFirstDeclarationOfSymbolParameter:()=>JY,isFixablePromiseHandler:()=>H1,isForInOrOfStatement:()=>iu,isForInStatement:()=>aF,isForInitializer:()=>su,isForOfStatement:()=>sF,isForStatement:()=>oF,isFullSourceFile:()=>Lm,isFunctionBlock:()=>$f,isFunctionBody:()=>au,isFunctionDeclaration:()=>vF,isFunctionExpression:()=>NE,isFunctionExpressionOrArrowFunction:()=>$T,isFunctionLike:()=>__,isFunctionLikeDeclaration:()=>d_,isFunctionLikeKind:()=>m_,isFunctionLikeOrClassStaticBlockDeclaration:()=>u_,isFunctionOrConstructorTypeNode:()=>D_,isFunctionOrModuleBlock:()=>g_,isFunctionSymbol:()=>kg,isFunctionTypeNode:()=>KD,isGeneratedIdentifier:()=>Yl,isGeneratedPrivateIdentifier:()=>Zl,isGetAccessor:()=>Ou,isGetAccessorDeclaration:()=>JD,isGetOrSetAccessorDeclaration:()=>bl,isGlobalScopeAugmentation:()=>bp,isGlobalSourceFile:()=>af,isGrammarError:()=>jd,isHeritageClause:()=>lP,isHoistedFunction:()=>Sf,isHoistedVariableStatement:()=>Tf,isIdentifier:()=>fD,isIdentifierANonContextualKeyword:()=>Rh,isIdentifierName:()=>vh,isIdentifierOrThisTypeNode:()=>rI,isIdentifierPart:()=>xs,isIdentifierStart:()=>bs,isIdentifierText:()=>Ss,isIdentifierTypePredicate:()=>Gf,isIdentifierTypeReference:()=>ET,isIfStatement:()=>nF,isIgnoredFileFromWildCardWatching:()=>KU,isImplicitGlob:()=>vk,isImportAttribute:()=>LF,isImportAttributeName:()=>Ql,isImportAttributes:()=>OF,isImportCall:()=>hf,isImportClause:()=>FF,isImportDeclaration:()=>EF,isImportEqualsDeclaration:()=>DF,isImportKeyword:()=>ND,isImportMeta:()=>yf,isImportOrExportSpecifier:()=>Wl,isImportOrExportSpecifierName:()=>_Z,isImportSpecifier:()=>BF,isImportTypeAssertionContainer:()=>PF,isImportTypeNode:()=>dE,isImportable:()=>w0,isInComment:()=>PQ,isInCompoundLikeAssignment:()=>oh,isInExpressionContext:()=>Dm,isInJSDoc:()=>Jm,isInJSFile:()=>Mm,isInJSXText:()=>CQ,isInJsonFile:()=>Rm,isInNonReferenceComment:()=>WQ,isInReferenceComment:()=>VQ,isInRightSideOfInternalImportEqualsDeclaration:()=>_X,isInString:()=>xQ,isInTemplateString:()=>TQ,isInTopLevelContext:()=>lm,isInTypeQuery:()=>hv,isIncrementalBuildInfo:()=>MW,isIncrementalBundleEmitBuildInfo:()=>jW,isIncrementalCompilation:()=>RS,isIndexSignatureDeclaration:()=>VD,isIndexedAccessTypeNode:()=>lE,isInferTypeNode:()=>oE,isInfinityOrNaNString:()=>VT,isInitializedProperty:()=>Cz,isInitializedVariable:()=>cx,isInsideJsxElement:()=>wQ,isInsideJsxElementOrAttribute:()=>SQ,isInsideNodeModules:()=>YZ,isInsideTemplateLiteral:()=>JQ,isInstanceOfExpression:()=>kb,isInstantiatedModule:()=>mJ,isInterfaceDeclaration:()=>xF,isInternalDeclaration:()=>Hu,isInternalModuleImportEqualsDeclaration:()=>Om,isInternalName:()=>TA,isIntersectionTypeNode:()=>rE,isIntrinsicJsxName:()=>My,isIterationStatement:()=>Z_,isJSDoc:()=>PP,isJSDocAllType:()=>kP,isJSDocAugmentsTag:()=>OP,isJSDocAuthorTag:()=>LP,isJSDocCallbackTag:()=>MP,isJSDocClassTag:()=>jP,isJSDocCommentContainingNode:()=>Pu,isJSDocConstructSignature:()=>Og,isJSDocDeprecatedTag:()=>VP,isJSDocEnumTag:()=>$P,isJSDocFunctionType:()=>DP,isJSDocImplementsTag:()=>tA,isJSDocImportTag:()=>iA,isJSDocIndexSignature:()=>zm,isJSDocLikeText:()=>BI,isJSDocLink:()=>bP,isJSDocLinkCode:()=>xP,isJSDocLinkLike:()=>Vu,isJSDocLinkPlain:()=>SP,isJSDocMemberName:()=>vP,isJSDocNameReference:()=>yP,isJSDocNamepathType:()=>FP,isJSDocNamespaceBody:()=>_u,isJSDocNode:()=>Fu,isJSDocNonNullableType:()=>wP,isJSDocNullableType:()=>CP,isJSDocOptionalParameter:()=>rC,isJSDocOptionalType:()=>NP,isJSDocOverloadTag:()=>UP,isJSDocOverrideTag:()=>qP,isJSDocParameterTag:()=>KP,isJSDocPrivateTag:()=>BP,isJSDocPropertyLikeTag:()=>Ol,isJSDocPropertyTag:()=>eA,isJSDocProtectedTag:()=>JP,isJSDocPublicTag:()=>RP,isJSDocReadonlyTag:()=>zP,isJSDocReturnTag:()=>HP,isJSDocSatisfiesExpression:()=>aC,isJSDocSatisfiesTag:()=>nA,isJSDocSeeTag:()=>WP,isJSDocSignature:()=>IP,isJSDocTag:()=>Au,isJSDocTemplateTag:()=>QP,isJSDocThisTag:()=>GP,isJSDocThrowsTag:()=>rA,isJSDocTypeAlias:()=>Lg,isJSDocTypeAssertion:()=>AA,isJSDocTypeExpression:()=>hP,isJSDocTypeLiteral:()=>AP,isJSDocTypeTag:()=>XP,isJSDocTypedefTag:()=>YP,isJSDocUnknownTag:()=>ZP,isJSDocUnknownType:()=>TP,isJSDocVariadicType:()=>EP,isJSXTagName:()=>wm,isJsonEqual:()=>ST,isJsonSourceFile:()=>cf,isJsxAttribute:()=>nP,isJsxAttributeLike:()=>Cu,isJsxAttributeName:()=>uC,isJsxAttributes:()=>rP,isJsxCallLike:()=>Du,isJsxChild:()=>Tu,isJsxClosingElement:()=>YF,isJsxClosingFragment:()=>tP,isJsxElement:()=>GF,isJsxExpression:()=>oP,isJsxFragment:()=>ZF,isJsxNamespacedName:()=>aP,isJsxOpeningElement:()=>QF,isJsxOpeningFragment:()=>eP,isJsxOpeningLikeElement:()=>Nu,isJsxOpeningLikeElementTagName:()=>gX,isJsxSelfClosingElement:()=>XF,isJsxSpreadAttribute:()=>iP,isJsxTagNameExpression:()=>ku,isJsxText:()=>YN,isJumpStatementTarget:()=>TX,isKeyword:()=>Ah,isKeywordOrPunctuation:()=>Oh,isKnownSymbol:()=>Yh,isLabelName:()=>wX,isLabelOfLabeledStatement:()=>CX,isLabeledStatement:()=>pF,isLateVisibilityPaintedStatement:()=>Ip,isLeftHandSideExpression:()=>W_,isLet:()=>mf,isLineBreak:()=>Qa,isLiteralComputedPropertyDeclarationName:()=>yh,isLiteralExpression:()=>Jl,isLiteralExpressionOfObject:()=>zl,isLiteralImportTypeNode:()=>vf,isLiteralKind:()=>Bl,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>IX,isLiteralTypeLiteral:()=>X_,isLiteralTypeNode:()=>uE,isLocalName:()=>CA,isLogicalOperator:()=>rb,isLogicalOrCoalescingAssignmentExpression:()=>ob,isLogicalOrCoalescingAssignmentOperator:()=>ib,isLogicalOrCoalescingBinaryExpression:()=>sb,isLogicalOrCoalescingBinaryOperator:()=>ab,isMappedTypeNode:()=>_E,isMemberName:()=>vl,isMetaProperty:()=>$E,isMethodDeclaration:()=>MD,isMethodOrAccessor:()=>S_,isMethodSignature:()=>jD,isMinusToken:()=>sD,isMissingDeclaration:()=>WF,isMissingPackageJsonInfo:()=>OM,isModifier:()=>a_,isModifierKind:()=>r_,isModifierLike:()=>k_,isModuleAugmentationExternal:()=>Sp,isModuleBlock:()=>CF,isModuleBody:()=>cu,isModuleDeclaration:()=>TF,isModuleExportName:()=>VF,isModuleExportsAccessExpression:()=>sg,isModuleIdentifier:()=>ag,isModuleName:()=>aI,isModuleOrEnumDeclaration:()=>du,isModuleReference:()=>Su,isModuleSpecifierLike:()=>TY,isModuleWithStringLiteralName:()=>gp,isNameOfFunctionDeclaration:()=>AX,isNameOfModuleDeclaration:()=>PX,isNamedDeclaration:()=>Fc,isNamedEvaluation:()=>ny,isNamedEvaluationSource:()=>ty,isNamedExportBindings:()=>Il,isNamedExports:()=>qF,isNamedImportBindings:()=>uu,isNamedImports:()=>RF,isNamedImportsOrExports:()=>Ix,isNamedTupleMember:()=>ZD,isNamespaceBody:()=>lu,isNamespaceExport:()=>MF,isNamespaceExportDeclaration:()=>NF,isNamespaceImport:()=>jF,isNamespaceReexportDeclaration:()=>Fm,isNewExpression:()=>kE,isNewExpressionTarget:()=>dX,isNewScopeNode:()=>RC,isNoSubstitutionTemplateLiteral:()=>eD,isNodeArray:()=>Rl,isNodeArrayMultiLine:()=>Zb,isNodeDescendantOf:()=>mh,isNodeKind:()=>Ll,isNodeLikeSystem:()=>mn,isNodeModulesDirectory:()=>ma,isNodeWithPossibleHoistedDeclaration:()=>ah,isNonContextualKeyword:()=>jh,isNonGlobalAmbientModule:()=>hp,isNonNullAccess:()=>oC,isNonNullChain:()=>Pl,isNonNullExpression:()=>WE,isNonStaticMethodOrAccessorWithPrivateName:()=>wz,isNotEmittedStatement:()=>$F,isNullishCoalesce:()=>Dl,isNumber:()=>ot,isNumericLiteral:()=>GN,isNumericLiteralName:()=>HT,isObjectBindingElementWithoutPropertyName:()=>CY,isObjectBindingOrAssignmentElement:()=>j_,isObjectBindingOrAssignmentPattern:()=>L_,isObjectBindingPattern:()=>mE,isObjectLiteralElement:()=>Bu,isObjectLiteralElementLike:()=>w_,isObjectLiteralExpression:()=>vE,isObjectLiteralMethod:()=>Kf,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>Hf,isObjectTypeDeclaration:()=>Ex,isOmittedExpression:()=>zE,isOptionalChain:()=>Tl,isOptionalChainRoot:()=>Cl,isOptionalDeclaration:()=>iC,isOptionalJSDocPropertyLikeTag:()=>eC,isOptionalTypeNode:()=>eE,isOuterExpression:()=>OA,isOutermostOptionalChain:()=>Nl,isOverrideModifier:()=>TD,isPackageJsonInfo:()=>IM,isPackedArrayLiteral:()=>BT,isParameter:()=>AD,isParameterPropertyDeclaration:()=>ac,isParameterPropertyModifier:()=>i_,isParenthesizedExpression:()=>wE,isParenthesizedTypeNode:()=>aE,isParseTreeNode:()=>vc,isPartOfParameterDeclaration:()=>iy,isPartOfTypeNode:()=>If,isPartOfTypeOnlyImportOrExportDeclaration:()=>Gl,isPartOfTypeQuery:()=>Em,isPartiallyEmittedExpression:()=>HE,isPatternMatch:()=>rn,isPinnedComment:()=>$d,isPlainJsFile:()=>Dd,isPlusToken:()=>aD,isPossiblyTypeArgumentPosition:()=>DQ,isPostfixUnaryExpression:()=>OE,isPrefixUnaryExpression:()=>IE,isPrimitiveLiteralValue:()=>DC,isPrivateIdentifier:()=>mD,isPrivateIdentifierClassElementDeclaration:()=>t_,isPrivateIdentifierPropertyAccessExpression:()=>n_,isPrivateIdentifierSymbol:()=>Zh,isProgramUptoDate:()=>VV,isPrologueDirective:()=>bf,isPropertyAccessChain:()=>xl,isPropertyAccessEntityNameExpression:()=>hb,isPropertyAccessExpression:()=>bE,isPropertyAccessOrQualifiedName:()=>J_,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>B_,isPropertyAssignment:()=>uP,isPropertyDeclaration:()=>LD,isPropertyName:()=>c_,isPropertyNameLiteral:()=>Hh,isPropertySignature:()=>OD,isPrototypeAccess:()=>vb,isPrototypePropertyAssignment:()=>bg,isPunctuation:()=>Ih,isPushOrUnshiftIdentifier:()=>ry,isQualifiedName:()=>ED,isQuestionDotToken:()=>dD,isQuestionOrExclamationToken:()=>nI,isQuestionOrPlusOrMinusToken:()=>oI,isQuestionToken:()=>_D,isReadonlyKeyword:()=>xD,isReadonlyKeywordOrPlusOrMinusToken:()=>iI,isRecognizedTripleSlashComment:()=>Wd,isReferenceFileLocation:()=>qV,isReferencedFile:()=>zV,isRegularExpressionLiteral:()=>ZN,isRequireCall:()=>qm,isRequireVariableStatement:()=>Km,isRestParameter:()=>$u,isRestTypeNode:()=>tE,isReturnStatement:()=>_F,isReturnStatementWithFixablePromiseHandler:()=>K1,isRightSideOfAccessExpression:()=>xb,isRightSideOfInstanceofExpression:()=>Tb,isRightSideOfPropertyAccess:()=>EX,isRightSideOfQualifiedName:()=>DX,isRightSideOfQualifiedNameOrPropertyAccess:()=>bb,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Sb,isRootedDiskPath:()=>ko,isSameEntityName:()=>rg,isSatisfiesExpression:()=>VE,isSemicolonClassElement:()=>QE,isSetAccessor:()=>Iu,isSetAccessorDeclaration:()=>zD,isShiftOperatorOrHigher:()=>sI,isShorthandAmbientModuleSymbol:()=>yp,isShorthandPropertyAssignment:()=>dP,isSideEffectImport:()=>PC,isSignedNumericLiteral:()=>Vh,isSimpleCopiableExpression:()=>mz,isSimpleInlineableExpression:()=>gz,isSimpleParameterList:()=>jz,isSingleOrDoubleQuote:()=>Hm,isSolutionConfig:()=>wj,isSourceElement:()=>SC,isSourceFile:()=>mP,isSourceFileFromLibrary:()=>y0,isSourceFileJS:()=>jm,isSourceFileNotJson:()=>Bm,isSourceMapping:()=>$J,isSpecialPropertyDeclaration:()=>xg,isSpreadAssignment:()=>pP,isSpreadElement:()=>BE,isStatement:()=>bu,isStatementButNotDeclaration:()=>vu,isStatementOrBlock:()=>xu,isStatementWithLocals:()=>Ed,isStatic:()=>jv,isStaticModifier:()=>SD,isString:()=>it,isStringANonContextualKeyword:()=>Mh,isStringAndEmptyAnonymousObjectIntersection:()=>BQ,isStringDoubleQuoted:()=>Gm,isStringLiteral:()=>QN,isStringLiteralLike:()=>Uu,isStringLiteralOrJsxExpression:()=>wu,isStringLiteralOrTemplate:()=>EZ,isStringOrNumericLiteralLike:()=>Uh,isStringOrRegularExpressionOrTemplateLiteral:()=>MQ,isStringTextContainingNode:()=>Xl,isSuperCall:()=>gf,isSuperKeyword:()=>wD,isSuperProperty:()=>pm,isSupportedSourceFileName:()=>Kk,isSwitchStatement:()=>dF,isSyntaxList:()=>oA,isSyntheticExpression:()=>KE,isSyntheticReference:()=>KF,isTagName:()=>NX,isTaggedTemplateExpression:()=>TE,isTaggedTemplateTag:()=>fX,isTemplateExpression:()=>ME,isTemplateHead:()=>tD,isTemplateLiteral:()=>V_,isTemplateLiteralKind:()=>ql,isTemplateLiteralToken:()=>Ul,isTemplateLiteralTypeNode:()=>fE,isTemplateLiteralTypeSpan:()=>pE,isTemplateMiddle:()=>nD,isTemplateMiddleOrTemplateTail:()=>Vl,isTemplateSpan:()=>XE,isTemplateTail:()=>rD,isTextWhiteSpaceLike:()=>jY,isThis:()=>MX,isThisContainerOrFunctionBlock:()=>cm,isThisIdentifier:()=>gv,isThisInTypeQuery:()=>yv,isThisInitializedDeclaration:()=>mm,isThisInitializedObjectBindingExpression:()=>gm,isThisProperty:()=>fm,isThisTypeNode:()=>sE,isThisTypeParameter:()=>XT,isThisTypePredicate:()=>Xf,isThrowStatement:()=>fF,isToken:()=>Ml,isTokenKind:()=>jl,isTraceEnabled:()=>cM,isTransientSymbol:()=>rd,isTrivia:()=>Bh,isTryStatement:()=>mF,isTupleTypeNode:()=>YD,isTypeAlias:()=>jg,isTypeAliasDeclaration:()=>SF,isTypeAssertionExpression:()=>CE,isTypeDeclaration:()=>YT,isTypeElement:()=>T_,isTypeKeyword:()=>nY,isTypeKeywordTokenOrIdentifier:()=>iY,isTypeLiteralNode:()=>XD,isTypeNode:()=>N_,isTypeNodeKind:()=>Fx,isTypeOfExpression:()=>FE,isTypeOnlyExportDeclaration:()=>Kl,isTypeOnlyImportDeclaration:()=>$l,isTypeOnlyImportOrExportDeclaration:()=>Hl,isTypeOperatorNode:()=>cE,isTypeParameterDeclaration:()=>PD,isTypePredicateNode:()=>WD,isTypeQueryNode:()=>GD,isTypeReferenceNode:()=>$D,isTypeReferenceType:()=>Ju,isTypeUsableAsPropertyName:()=>mC,isUMDExportSymbol:()=>Cx,isUnaryExpression:()=>K_,isUnaryExpressionWithWrite:()=>G_,isUnicodeIdentifierStart:()=>Ia,isUnionTypeNode:()=>nE,isUrl:()=>So,isValidBigIntString:()=>NT,isValidESSymbolDeclaration:()=>Uf,isValidTypeOnlyAliasUseSite:()=>DT,isValueSignatureDeclaration:()=>sh,isVarAwaitUsing:()=>uf,isVarConst:()=>pf,isVarConstLike:()=>ff,isVarUsing:()=>df,isVariableDeclaration:()=>hF,isVariableDeclarationInVariableStatement:()=>Jf,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>Vm,isVariableDeclarationInitializedToRequire:()=>Um,isVariableDeclarationList:()=>yF,isVariableLike:()=>Bf,isVariableStatement:()=>ZE,isVoidExpression:()=>PE,isWatchSet:()=>lx,isWhileStatement:()=>iF,isWhiteSpaceLike:()=>Ga,isWhiteSpaceSingleLine:()=>Xa,isWithStatement:()=>uF,isWriteAccess:()=>gx,isWriteOnlyAccess:()=>mx,isYieldExpression:()=>RE,jsxModeNeedsExplicitImport:()=>h0,keywordPart:()=>WY,last:()=>Te,lastOrUndefined:()=>ke,length:()=>m,libMap:()=>RO,libs:()=>MO,lineBreakPart:()=>oZ,loadModuleFromGlobalCache:()=>YR,loadWithModeAwareCache:()=>MV,makeIdentifierFromModuleName:()=>dp,makeImport:()=>gY,makeStringLiteral:()=>hY,mangleScopedPackageName:()=>WR,map:()=>O,mapAllOrFail:()=>q,mapDefined:()=>U,mapDefinedIterator:()=>V,mapEntries:()=>G,mapIterator:()=>L,mapOneOrMany:()=>i0,mapToDisplayParts:()=>aZ,matchFiles:()=>Ck,matchPatternOrExact:()=>dT,matchedText:()=>Yt,matchesExclude:()=>Xj,matchesExcludeWorker:()=>Qj,maxBy:()=>wt,maybeBind:()=>Xe,maybeSetLocalizedDiagnosticMessages:()=>Qx,memoize:()=>ht,memoizeOne:()=>yt,min:()=>Nt,minAndMax:()=>mT,missingFileModifiedTime:()=>$i,modifierToFlag:()=>tb,modifiersToFlags:()=>eb,moduleExportNameIsDefault:()=>tp,moduleExportNameTextEscaped:()=>ep,moduleExportNameTextUnescaped:()=>Zd,moduleOptionDeclaration:()=>qO,moduleResolutionIsEqualTo:()=>gd,moduleResolutionNameAndModeGetter:()=>AV,moduleResolutionOptionDeclarations:()=>HO,moduleResolutionSupportsPackageJsonExportsAndImports:()=>$S,moduleResolutionUsesNodeModules:()=>mY,moduleSpecifierToValidIdentifier:()=>l0,moduleSpecifiers:()=>gB,moduleSupportsImportAttributes:()=>KS,moduleSymbolToValidIdentifier:()=>c0,moveEmitHelpers:()=>eN,moveRangeEnd:()=>zb,moveRangePastDecorators:()=>Ub,moveRangePastModifiers:()=>Vb,moveRangePos:()=>qb,moveSyntheticComments:()=>Kw,mutateMap:()=>xx,mutateMapSkippingNewValues:()=>bx,needsParentheses:()=>CZ,needsScopeMarker:()=>nu,newCaseClauseTracker:()=>v0,newPrivateEnvironment:()=>Pz,noEmitNotification:()=>rU,noEmitSubstitution:()=>nU,noTransformers:()=>Gq,noTruncationMaximumTruncationLength:()=>Yu,nodeCanBeDecorated:()=>vm,nodeCoreModules:()=>LC,nodeHasName:()=>Dc,nodeIsDecorated:()=>bm,nodeIsMissing:()=>Od,nodeIsPresent:()=>Ld,nodeIsSynthesized:()=>sy,nodeModuleNameResolver:()=>nR,nodeModulesPathPart:()=>cR,nodeNextJsonConfigResolver:()=>rR,nodeOrChildIsDecorated:()=>xm,nodeOverlapsWithStartEnd:()=>WX,nodePosToString:()=>Pd,nodeSeenTracker:()=>oY,nodeStartsNewLexicalEnvironment:()=>ay,noop:()=>ct,noopFileWatcher:()=>z$,normalizePath:()=>Ko,normalizeSlashes:()=>zo,normalizeSpans:()=>Qs,not:()=>sn,notImplemented:()=>gt,notImplementedResolver:()=>PU,nullNodeConverters:()=>sw,nullParenthesizerRules:()=>iw,nullTransformationContext:()=>oU,objectAllocator:()=>Wx,operatorPart:()=>KY,optionDeclarations:()=>VO,optionMapToObject:()=>tj,optionsAffectingProgramStructure:()=>XO,optionsForBuild:()=>rL,optionsForWatch:()=>BO,optionsHaveChanges:()=>cd,or:()=>an,orderedRemoveItem:()=>$t,orderedRemoveItemAt:()=>Kt,packageIdToPackageName:()=>xd,packageIdToString:()=>Sd,parameterIsThisKeyword:()=>mv,parameterNamePart:()=>HY,parseBaseNodeFactory:()=>LI,parseBigInt:()=>CT,parseBuildCommand:()=>CL,parseCommandLine:()=>bL,parseCommandLineWorker:()=>gL,parseConfigFileTextToJson:()=>EL,parseConfigFileWithSystem:()=>w$,parseConfigHostFromCompilerHostLike:()=>rW,parseCustomTypeOption:()=>dL,parseIsolatedEntityName:()=>dO,parseIsolatedJSDocComment:()=>gO,parseJSDocTypeExpressionForTests:()=>hO,parseJsonConfigFileContent:()=>_j,parseJsonSourceFileConfigFileContent:()=>uj,parseJsonText:()=>pO,parseListTypeOption:()=>pL,parseNodeFactory:()=>jI,parseNodeModuleFromPath:()=>_R,parsePackageName:()=>ER,parsePseudoBigInt:()=>kT,parseValidBigInt:()=>wT,pasteEdits:()=>Rfe,patchWriteFileEnsuringDirectory:()=>fo,pathContainsNodeModules:()=>lR,pathIsAbsolute:()=>Co,pathIsBareSpecifier:()=>No,pathIsRelative:()=>wo,patternText:()=>Qt,performIncrementalCompilation:()=>eK,performance:()=>Gn,positionBelongsToNode:()=>KX,positionIsASICandidate:()=>BZ,positionIsSynthesized:()=>iT,positionsAreOnSameLine:()=>ex,preProcessFile:()=>M1,probablyUsesSemicolons:()=>JZ,processCommentPragmas:()=>TO,processPragmasIntoFields:()=>CO,processTaggedTemplateExpression:()=>aq,programContainsEsModules:()=>uY,programContainsModules:()=>_Y,projectReferenceIsEqualTo:()=>md,propertyNamePart:()=>GY,pseudoBigIntToString:()=>TT,punctuationPart:()=>$Y,pushIfUnique:()=>pe,quote:()=>NZ,quotePreferenceFromString:()=>vY,rangeContainsPosition:()=>zX,rangeContainsPositionExclusive:()=>qX,rangeContainsRange:()=>ix,rangeContainsRangeExclusive:()=>JX,rangeContainsStartEnd:()=>UX,rangeEndIsOnSameLineAsRangeStart:()=>Xb,rangeEndPositionsAreOnSameLine:()=>Hb,rangeEquals:()=>he,rangeIsOnSingleLine:()=>$b,rangeOfNode:()=>gT,rangeOfTypeParameters:()=>hT,rangeOverlapsWithStartEnd:()=>VX,rangeStartIsOnSameLineAsRangeEnd:()=>Gb,rangeStartPositionsAreOnSameLine:()=>Kb,readBuilderProgram:()=>tK,readConfigFile:()=>DL,readJson:()=>Ob,readJsonConfigFile:()=>FL,readJsonOrUndefined:()=>Ib,reduceEachLeadingCommentRange:()=>fs,reduceEachTrailingCommentRange:()=>ms,reduceLeft:()=>Pe,reduceLeftIterator:()=>b,reducePathComponents:()=>qo,refactor:()=>h4,regExpEscape:()=>lk,regularExpressionFlagToCharacterCode:()=>Ba,relativeComplement:()=>ce,removeAllComments:()=>Dw,removeEmitHelper:()=>Yw,removeExtension:()=>Zk,removeFileExtension:()=>Qk,removeIgnoredPath:()=>r$,removeMinAndVersionNumbers:()=>Wt,removePrefix:()=>tn,removeSuffix:()=>Ut,removeTrailingDirectorySeparator:()=>Qo,repeatString:()=>sY,replaceElement:()=>De,replaceFirstStar:()=>bC,resolutionExtensionIsTSOrJson:()=>aT,resolveConfigFileProjectName:()=>sK,resolveJSModule:()=>YM,resolveLibrary:()=>HM,resolveModuleName:()=>XM,resolveModuleNameFromCache:()=>GM,resolvePackageNameToPackageJson:()=>PM,resolvePath:()=>Vo,resolveProjectReferencePath:()=>iW,resolveTripleslashReference:()=>eV,resolveTypeReferenceDirective:()=>DM,resolvingEmptyArray:()=>Gu,returnFalse:()=>lt,returnNoopFileWatcher:()=>q$,returnTrue:()=>_t,returnUndefined:()=>ut,returnsPromise:()=>$1,rewriteModuleSpecifier:()=>Mz,sameFlatMap:()=>z,sameMap:()=>j,sameMapping:()=>WJ,scanTokenAtPosition:()=>rf,scanner:()=>aX,semanticDiagnosticsOptionDeclarations:()=>WO,serializeCompilerOptions:()=>oj,server:()=>Xfe,servicesVersion:()=>J5,setCommentRange:()=>Jw,setConfigFileInOptions:()=>dj,setConstantValue:()=>Gw,setEmitFlags:()=>Ew,setGetSourceFileAsHashVersioned:()=>H$,setIdentifierAutoGenerate:()=>cN,setIdentifierGeneratedImportReference:()=>_N,setIdentifierTypeArguments:()=>aN,setInternalEmitFlags:()=>Pw,setLocalizedDiagnosticMessages:()=>Xx,setNodeChildren:()=>lA,setNodeFlags:()=>LT,setObjectAllocator:()=>Hx,setOriginalNode:()=>Cw,setParent:()=>jT,setParentRecursive:()=>MT,setPrivateIdentifier:()=>Iz,setSnippetElement:()=>nN,setSourceMapRange:()=>Ow,setStackTraceLimit:()=>Ui,setStartsOnNewLine:()=>Rw,setSyntheticLeadingComments:()=>qw,setSyntheticTrailingComments:()=>Ww,setSys:()=>go,setSysLog:()=>so,setTextRange:()=>AI,setTextRangeEnd:()=>AT,setTextRangePos:()=>PT,setTextRangePosEnd:()=>IT,setTextRangePosWidth:()=>OT,setTokenSourceMapRange:()=>jw,setTypeNode:()=>iN,setUILocale:()=>jt,setValueDeclaration:()=>Sg,shouldAllowImportingTsExtension:()=>QR,shouldPreserveConstEnums:()=>MS,shouldRewriteModuleSpecifier:()=>Dg,shouldUseUriStyleNodeCoreModules:()=>p0,showModuleSpecifier:()=>wx,signatureHasRestParameter:()=>bJ,signatureToDisplayParts:()=>lZ,single:()=>we,singleElementArray:()=>ln,singleIterator:()=>K,singleOrMany:()=>Ne,singleOrUndefined:()=>Ce,skipAlias:()=>px,skipConstraint:()=>cY,skipOuterExpressions:()=>LA,skipParentheses:()=>ph,skipPartiallyEmittedExpressions:()=>Fl,skipTrivia:()=>is,skipTypeChecking:()=>yT,skipTypeCheckingIgnoringNoCheck:()=>vT,skipTypeParentheses:()=>dh,skipWhile:()=>fn,sliceAfter:()=>pT,some:()=>X,sortAndDeduplicate:()=>oe,sortAndDeduplicateDiagnostics:()=>Is,sourceFileAffectingCompilerOptions:()=>GO,sourceFileMayBeEmitted:()=>rv,sourceMapCommentRegExp:()=>RJ,sourceMapCommentRegExpDontCareLineStart:()=>MJ,spacePart:()=>VY,spanMap:()=>H,startEndContainsRange:()=>ox,startEndOverlapsWithStartEnd:()=>$X,startOnNewLine:()=>MA,startTracing:()=>hr,startsWith:()=>en,startsWithDirectory:()=>ca,startsWithUnderscore:()=>u0,startsWithUseStrict:()=>EA,stringContainsAt:()=>_0,stringToToken:()=>Ma,stripQuotes:()=>jy,supportedDeclarationExtensions:()=>Mk,supportedJSExtensionsFlat:()=>Ok,supportedLocaleDirectories:()=>mc,supportedTSExtensionsFlat:()=>Pk,supportedTSImplementationExtensions:()=>Rk,suppressLeadingAndTrailingTrivia:()=>QC,suppressLeadingTrivia:()=>YC,suppressTrailingTrivia:()=>ZC,symbolEscapedNameNoDefault:()=>kY,symbolName:()=>Cc,symbolNameNoDefault:()=>SY,symbolToDisplayParts:()=>cZ,sys:()=>mo,sysLog:()=>ao,tagNamesAreEquivalent:()=>AO,takeWhile:()=>pn,targetOptionDeclaration:()=>zO,targetToLibMap:()=>Os,testFormatSettings:()=>GG,textChangeRangeIsUnchanged:()=>tc,textChangeRangeNewSpan:()=>ec,textChanges:()=>sde,textOrKeywordPart:()=>XY,textPart:()=>QY,textRangeContainsPositionInclusive:()=>Bs,textRangeContainsTextSpan:()=>qs,textRangeIntersectsWithTextSpan:()=>Gs,textSpanContainsPosition:()=>Rs,textSpanContainsTextRange:()=>zs,textSpanContainsTextSpan:()=>Js,textSpanEnd:()=>js,textSpanIntersection:()=>Xs,textSpanIntersectsWith:()=>$s,textSpanIntersectsWithPosition:()=>Hs,textSpanIntersectsWithTextSpan:()=>Ws,textSpanIsEmpty:()=>Ms,textSpanOverlap:()=>Vs,textSpanOverlapsWith:()=>Us,textSpansEqual:()=>AY,textToKeywordObj:()=>ba,timestamp:()=>Hn,toArray:()=>rt,toBuilderFileEmit:()=>HW,toBuilderStateFileInfoForMultiEmit:()=>KW,toEditorSettings:()=>r7,toFileNameLowerCase:()=>mt,toPath:()=>Xo,toProgramEmitPending:()=>GW,toSorted:()=>me,tokenIsIdentifierOrKeyword:()=>ya,tokenIsIdentifierOrKeywordOrGreaterThan:()=>va,tokenToString:()=>ja,trace:()=>sM,tracing:()=>Yn,tracingEnabled:()=>Zn,transferSourceFileChildren:()=>uA,transform:()=>S7,transformClassFields:()=>uq,transformDeclarations:()=>$q,transformECMAScriptModule:()=>Mq,transformES2015:()=>Aq,transformES2016:()=>Fq,transformES2017:()=>gq,transformES2018:()=>yq,transformES2019:()=>vq,transformES2020:()=>bq,transformES2021:()=>xq,transformESDecorators:()=>mq,transformESNext:()=>Sq,transformGenerators:()=>Iq,transformImpliedNodeFormatDependentModule:()=>Rq,transformJsx:()=>Dq,transformLegacyDecorators:()=>fq,transformModule:()=>Oq,transformNamedEvaluation:()=>iq,transformNodes:()=>iU,transformSystemModule:()=>jq,transformTypeScript:()=>_q,transpile:()=>c2,transpileDeclaration:()=>n2,transpileModule:()=>t2,transpileOptionValueCompilerOptions:()=>QO,tryAddToSet:()=>$,tryAndIgnoreErrors:()=>WZ,tryCast:()=>at,tryDirectoryExists:()=>VZ,tryExtractTSExtension:()=>Db,tryFileExists:()=>UZ,tryGetClassExtendingExpressionWithTypeArguments:()=>lb,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>_b,tryGetDirectories:()=>zZ,tryGetExtensionFromPath:()=>lT,tryGetImportFromModuleSpecifier:()=>Ng,tryGetJSDocSatisfiesTypeNode:()=>cC,tryGetModuleNameFromFile:()=>UA,tryGetModuleSpecifierFromDeclaration:()=>Cg,tryGetNativePerformanceHooks:()=>Wn,tryGetPropertyAccessOrIdentifierToString:()=>yb,tryGetPropertyNameOfBindingOrAssignmentElement:()=>HA,tryGetSourceMappingURL:()=>zJ,tryGetTextOfPropertyName:()=>qp,tryParseJson:()=>Lb,tryParsePattern:()=>tT,tryParsePatterns:()=>rT,tryParseRawSourceMap:()=>UJ,tryReadDirectory:()=>qZ,tryReadFile:()=>PL,tryRemoveDirectoryPrefix:()=>sk,tryRemoveExtension:()=>Yk,tryRemovePrefix:()=>nn,tryRemoveSuffix:()=>Vt,tscBuildOption:()=>nL,typeAcquisitionDeclarations:()=>oL,typeAliasNamePart:()=>YY,typeDirectiveIsEqualTo:()=>kd,typeKeywords:()=>tY,typeParameterNamePart:()=>ZY,typeToDisplayParts:()=>sZ,unchangedPollThresholds:()=>Qi,unchangedTextChangeRange:()=>rc,unescapeLeadingUnderscores:()=>Sc,unmangleScopedPackageName:()=>KR,unorderedRemoveItem:()=>Gt,unprefixedNodeCoreModules:()=>IC,unreachableCodeIsError:()=>VS,unsetNodeChildren:()=>_A,unusedLabelIsError:()=>WS,unwrapInnermostStatementOfLabel:()=>Wf,unwrapParenthesizedExpression:()=>EC,updateErrorForNoInputFiles:()=>Dj,updateLanguageServiceSourceFile:()=>u7,updateMissingFilePathsWatch:()=>WU,updateResolutionField:()=>hM,updateSharedExtendedConfigFileWatcher:()=>qU,updateSourceFile:()=>mO,updateWatchingWildcardDirectories:()=>$U,usingSingleLineStringWriter:()=>pd,utf16EncodeAsString:()=>Ns,validateLocaleAndSetLanguage:()=>gc,version:()=>u,versionMajorMinor:()=>c,visitArray:()=>CJ,visitCommaListElements:()=>AJ,visitEachChild:()=>IJ,visitFunctionBody:()=>FJ,visitIterationBody:()=>PJ,visitLexicalEnvironment:()=>NJ,visitNode:()=>kJ,visitNodes:()=>TJ,visitParameterList:()=>DJ,walkUpBindingElementsAndPatterns:()=>lc,walkUpOuterExpressions:()=>jA,walkUpParenthesizedExpressions:()=>_h,walkUpParenthesizedTypes:()=>lh,walkUpParenthesizedTypesAndGetParentAndChild:()=>uh,whitespaceOrMapCommentRegExp:()=>BJ,writeCommentRange:()=>Ev,writeFile:()=>av,writeFileEnsuringDirectories:()=>cv,zipWith:()=>x});var Ufe,Vfe=!0;function Wfe(e,t,n,r,i){let o=t?"DeprecationError: ":"DeprecationWarning: ";return o+=`'${e}' `,o+=r?`has been deprecated since v${r}`:"is deprecated",o+=t?" and can no longer be used.":n?` and will no longer be usable after v${n}.`:".",o+=i?` ${Gx(i,[e])}`:"",o}function $fe(e,t={}){const n="string"==typeof t.typeScriptVersion?new Cn(t.typeScriptVersion):t.typeScriptVersion??Ufe??(Ufe=new Cn(u)),r="string"==typeof t.errorAfter?new Cn(t.errorAfter):t.errorAfter,i="string"==typeof t.warnAfter?new Cn(t.warnAfter):t.warnAfter,o="string"==typeof t.since?new Cn(t.since):t.since??i,a=t.error||r&&n.compareTo(r)>=0,s=!i||n.compareTo(i)>=0;return a?function(e,t,n,r){const i=Wfe(e,!0,t,n,r);return()=>{throw new TypeError(i)}}(e,r,o,t.message):s?function(e,t,n,r){let i=!1;return()=>{Vfe&&!i&&(gn.log.warn(Wfe(e,!1,t,n,r)),i=!0)}}(e,r,o,t.message):ct}function Kfe(e,t){return function(e,t){return function(){return e(),t.apply(this,arguments)}}($fe((null==t?void 0:t.name)??gn.getFunctionName(e),t),e)}function Hfe(e,t,n,r){if(Object.defineProperty(o,"name",{...Object.getOwnPropertyDescriptor(o,"name"),value:e}),r)for(const n of Object.keys(r)){const i=+n;!isNaN(i)&&Ie(t,`${i}`)&&(t[i]=Kfe(t[i],{...r[i],name:e}))}const i=function(e,t){return n=>{for(let r=0;Ie(e,`${r}`)&&Ie(t,`${r}`);r++){if((0,t[r])(n))return r}}}(t,n);return o;function o(...e){const n=i(e),r=void 0!==n?t[n]:void 0;if("function"==typeof r)return r(...e);throw new TypeError("Invalid arguments")}}function Gfe(e){return{overload:t=>({bind:n=>({finish:()=>Hfe(e,t,n),deprecate:r=>({finish:()=>Hfe(e,t,n,r)})})})}}var Xfe={};a(Xfe,{ActionInvalidate:()=>dG,ActionPackageInstalled:()=>pG,ActionSet:()=>uG,ActionWatchTypingLocations:()=>yG,Arguments:()=>lG,AutoImportProviderProject:()=>Gme,AuxiliaryProject:()=>Kme,CharRangeSection:()=>zhe,CloseFileWatcherEvent:()=>mge,CommandNames:()=>mhe,ConfigFileDiagEvent:()=>lge,ConfiguredProject:()=>Xme,ConfiguredProjectLoadKind:()=>Mge,CreateDirectoryWatcherEvent:()=>fge,CreateFileWatcherEvent:()=>pge,Errors:()=>ime,EventBeginInstallTypes:()=>mG,EventEndInstallTypes:()=>gG,EventInitializationFailed:()=>hG,EventTypesRegistry:()=>fG,ExternalProject:()=>Qme,GcTimer:()=>bme,InferredProject:()=>$me,LargeFileReferencedEvent:()=>cge,LineIndex:()=>Khe,LineLeaf:()=>Ghe,LineNode:()=>Hhe,LogLevel:()=>ame,Msg:()=>cme,OpenFileInfoTelemetryEvent:()=>dge,Project:()=>Wme,ProjectInfoTelemetryEvent:()=>uge,ProjectKind:()=>Rme,ProjectLanguageServiceStateEvent:()=>_ge,ProjectLoadingFinishEvent:()=>sge,ProjectLoadingStartEvent:()=>age,ProjectService:()=>ihe,ProjectsUpdatedInBackgroundEvent:()=>oge,ScriptInfo:()=>Lme,ScriptVersionCache:()=>Whe,Session:()=>Ihe,TextStorage:()=>Ime,ThrottledOperations:()=>vme,TypingsInstallerAdapter:()=>Qhe,allFilesAreJsOrDts:()=>zme,allRootFilesAreJsOrDts:()=>Jme,asNormalizedPath:()=>dme,convertCompilerOptions:()=>kge,convertFormatOptions:()=>Sge,convertScriptKindName:()=>Nge,convertTypeAcquisition:()=>Cge,convertUserPreferences:()=>Dge,convertWatchOptions:()=>Tge,countEachFileTypes:()=>Bme,createInstallTypingsRequest:()=>lme,createModuleSpecifierCache:()=>she,createNormalizedPathMap:()=>pme,createPackageJsonCache:()=>che,createSortedArray:()=>yme,emptyArray:()=>sme,findArgument:()=>bG,formatDiagnosticToProtocol:()=>fhe,formatMessage:()=>ghe,getBaseConfigFileName:()=>xme,getDetailWatchInfo:()=>Wge,getLocationInNewDocument:()=>Rhe,hasArgument:()=>vG,hasNoTypeScriptSource:()=>qme,indent:()=>kG,isBackgroundProject:()=>tge,isConfigFile:()=>ohe,isConfiguredProject:()=>Zme,isDynamicFileName:()=>Ome,isExternalProject:()=>ege,isInferredProject:()=>Yme,isInferredProjectName:()=>fme,isProjectDeferredClose:()=>nge,makeAutoImportProviderProjectName:()=>gme,makeAuxiliaryProjectName:()=>hme,makeInferredProjectName:()=>mme,maxFileSize:()=>ige,maxProgramSizeForNonTsFiles:()=>rge,normalizedPathToPath:()=>ume,nowString:()=>xG,nullCancellationToken:()=>lhe,nullTypingsInstaller:()=>Age,protocol:()=>Sme,scriptInfoIsContainedByBackgroundProject:()=>jme,scriptInfoIsContainedByDeferredClosedProject:()=>Mme,stringifyIndented:()=>TG,toEvent:()=>yhe,toNormalizedPath:()=>_me,tryConvertScriptKindName:()=>wge,typingsInstaller:()=>Qfe,updateProjectIfDirty:()=>Kge});var Qfe={};a(Qfe,{TypingsInstaller:()=>nme,getNpmCommandForInstallation:()=>tme,installNpmPackages:()=>eme,typingsName:()=>rme});var Yfe={isEnabled:()=>!1,writeLine:ct};function Zfe(e,t,n,r){try{const r=XM(t,Uo(e,"index.d.ts"),{moduleResolution:2},n);return r.resolvedModule&&r.resolvedModule.resolvedFileName}catch(n){return void(r.isEnabled()&&r.writeLine(`Failed to resolve ${t} in folder '${e}': ${n.message}`))}}function eme(e,t,n,r){let i=!1;for(let o=n.length;o>0;){const a=tme(e,t,n,o);o=a.remaining,i=r(a.command)||i}return i}function tme(e,t,n,r){const i=n.length-r;let o,a=r;for(;o=`${e} install --ignore-scripts ${(a===n.length?n:n.slice(i,i+a)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`,!(o.length<8e3);)a-=Math.floor(a/2);return{command:o,remaining:r-a}}var nme=class{constructor(e,t,n,r,i,o=Yfe){this.installTypingHost=e,this.globalCachePath=t,this.safeListPath=n,this.typesMapLocation=r,this.throttleLimit=i,this.log=o,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest";this.log.isEnabled()&&this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${r}`),this.processCacheLocation(this.globalCachePath)}handleRequest(e){switch(e.kind){case"discover":this.install(e);break;case"closeProject":this.closeProject(e);break;case"typesRegistry":{const e={};this.typesRegistry.forEach((t,n)=>{e[n]=t});const t={kind:fG,typesRegistry:e};this.sendResponse(t);break}case"installPackage":this.installPackage(e);break;default:gn.assertNever(e)}}closeProject(e){this.closeWatchers(e.projectName)}closeWatchers(e){this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}'`);this.projectWatchers.get(e)?(this.projectWatchers.delete(e),this.sendResponse({kind:yG,projectName:e,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}' - done.`)):this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${e}'`)}install(e){this.log.isEnabled()&&this.log.writeLine(`Got install request${TG(e)}`),e.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`),this.processCacheLocation(e.cachePath)),void 0===this.safeList&&this.initializeSafeList();const t=cG.discoverTypings(this.installTypingHost,this.log.isEnabled()?e=>this.log.writeLine(e):void 0,e.fileNames,e.projectRootPath,this.safeList,this.packageNameToTypingLocation,e.typeAcquisition,e.unresolvedImports,this.typesRegistry,e.compilerOptions);this.watchFiles(e.projectName,t.filesToWatch),t.newTypingNames.length?this.installTypings(e,e.cachePath||this.globalCachePath,t.cachedTypingPaths,t.newTypingNames):(this.sendResponse(this.createSetTypings(e,t.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}installPackage(e){const{fileName:t,packageName:n,projectName:r,projectRootPath:i,id:o}=e,a=fa(Lo(t),e=>{if(this.installTypingHost.fileExists(Uo(e,"package.json")))return e})||i;if(a)this.installWorker(-1,[n],a,e=>{const t={kind:pG,projectName:r,id:o,success:e,message:e?`Package ${n} installed.`:`There was an error installing ${n}.`};this.sendResponse(t)});else{const e={kind:pG,projectName:r,id:o,success:!1,message:"Could not determine a project root path."};this.sendResponse(e)}}initializeSafeList(){if(this.typesMapLocation){const e=cG.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(e)return this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),void(this.safeList=e);this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=cG.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(e){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${e}'`),this.knownCachesSet.has(e))return void(this.log.isEnabled()&&this.log.writeLine("Cache location was already processed..."));const t=Uo(e,"package.json"),n=Uo(e,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${t}'...`),this.installTypingHost.fileExists(t)&&this.installTypingHost.fileExists(n)){const r=JSON.parse(this.installTypingHost.readFile(t)),i=JSON.parse(this.installTypingHost.readFile(n));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${t}':${TG(r)}`),this.log.writeLine(`Loaded content of '${n}':${TG(i)}`)),r.devDependencies&&(i.packages||i.dependencies))for(const t in r.devDependencies){if(i.packages&&!Ie(i.packages,`node_modules/${t}`)||i.dependencies&&!Ie(i.dependencies,t))continue;const n=jo(t);if(!n)continue;const r=Zfe(e,n,this.installTypingHost,this.log);if(!r){this.missingTypingsSet.add(n);continue}const o=this.packageNameToTypingLocation.get(n);if(o){if(o.typingLocation===r)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${n} from '${r}' conflicts with existing typing file '${o}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${n}' => '${r}'`);const a=i.packages&&Oe(i.packages,`node_modules/${t}`)||Oe(i.dependencies,t),s=a&&a.version;if(!s)continue;const c={typingLocation:r,version:new Cn(s)};this.packageNameToTypingLocation.set(n,c)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${e}'`),this.knownCachesSet.add(e)}filterTypings(e){return U(e,e=>{const t=WR(e);if(this.missingTypingsSet.has(t))return void(this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' is in missingTypingsSet - skipping...`));const n=cG.validatePackageName(e);if(n!==cG.NameValidationResult.Ok)return this.missingTypingsSet.add(t),void(this.log.isEnabled()&&this.log.writeLine(cG.renderPackageNameValidationFailure(n,e)));if(this.typesRegistry.has(t)){if(!this.packageNameToTypingLocation.get(t)||!cG.isTypingUpToDate(this.packageNameToTypingLocation.get(t),this.typesRegistry.get(t)))return t;this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' already has an up-to-date typing - skipping...`)}else this.log.isEnabled()&&this.log.writeLine(`'${e}':: Entry for package '${t}' does not exist in local types registry - skipping...`)})}ensurePackageDirectoryExists(e){const t=Uo(e,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${t}`),this.installTypingHost.fileExists(t)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`),this.ensureDirectoryExists(e,this.installTypingHost),this.installTypingHost.writeFile(t,'{ "private": true }'))}installTypings(e,t,n,r){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(r)}`);const i=this.filterTypings(r);if(0===i.length)return this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),void this.sendResponse(this.createSetTypings(e,n));this.ensurePackageDirectoryExists(t);const o=this.installRunCount;this.installRunCount++,this.sendResponse({kind:mG,eventId:o,typingsInstallerVersion:u,projectName:e.projectName});const a=i.map(rme);this.installTypingsAsync(o,a,t,r=>{try{if(!r){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(i)}`);for(const e of i)this.missingTypingsSet.add(e);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(a)}`);const o=[];for(const e of i){const n=Zfe(t,e,this.installTypingHost,this.log);if(!n){this.missingTypingsSet.add(e);continue}const r=this.typesRegistry.get(e),i={typingLocation:n,version:new Cn(r[`ts${c}`]||r[this.latestDistTag])};this.packageNameToTypingLocation.set(e,i),o.push(n)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(o)}`),this.sendResponse(this.createSetTypings(e,n.concat(o)))}finally{const t={kind:gG,eventId:o,projectName:e.projectName,packagesToInstall:a,installSuccess:r,typingsInstallerVersion:u};this.sendResponse(t)}})}ensureDirectoryExists(e,t){const n=Lo(e);t.directoryExists(n)||this.ensureDirectoryExists(n,t),t.directoryExists(e)||t.createDirectory(e)}watchFiles(e,t){if(!t.length)return void this.closeWatchers(e);const n=this.projectWatchers.get(e),r=new Set(t);!n||ud(r,e=>!n.has(e))||ud(n,e=>!r.has(e))?(this.projectWatchers.set(e,r),this.sendResponse({kind:yG,projectName:e,files:t})):this.sendResponse({kind:yG,projectName:e,files:void 0})}createSetTypings(e,t){return{projectName:e.projectName,typeAcquisition:e.typeAcquisition,compilerOptions:e.compilerOptions,typings:t,unresolvedImports:e.unresolvedImports,kind:uG}}installTypingsAsync(e,t,n,r){this.pendingRunRequests.unshift({requestId:e,packageNames:t,cwd:n,onRequestCompleted:r}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,e.onRequestCompleted(t),this.executeWithThrottling()})}}};function rme(e){return`@types/${e}@ts${c}`}var ime,ome,ame=(e=>(e[e.terse=0]="terse",e[e.normal=1]="normal",e[e.requestTime=2]="requestTime",e[e.verbose=3]="verbose",e))(ame||{}),sme=[],cme=(e=>(e.Err="Err",e.Info="Info",e.Perf="Perf",e))(cme||{});function lme(e,t,n,r){return{projectName:e.getProjectName(),fileNames:e.getFileNames(!0,!0).concat(e.getExcludedFiles()),compilerOptions:e.getCompilationSettings(),typeAcquisition:t,unresolvedImports:n,projectRootPath:e.getCurrentDirectory(),cachePath:r,kind:"discover"}}function _me(e){return Ko(e)}function ume(e,t,n){return n(ko(e)?e:$o(e,t))}function dme(e){return e}function pme(){const e=new Map;return{get:t=>e.get(t),set(t,n){e.set(t,n)},contains:t=>e.has(t),remove(t){e.delete(t)}}}function fme(e){return/dev\/null\/inferredProject\d+\*/.test(e)}function mme(e){return`/dev/null/inferredProject${e}*`}function gme(e){return`/dev/null/autoImportProviderProject${e}*`}function hme(e){return`/dev/null/auxiliaryProject${e}*`}function yme(){return[]}(ome=ime||(ime={})).ThrowNoProject=function(){throw new Error("No Project.")},ome.ThrowProjectLanguageServiceDisabled=function(){throw new Error("The project's language service is disabled.")},ome.ThrowProjectDoesNotContainDocument=function(e,t){throw new Error(`Project '${t.getProjectName()}' does not contain document '${e}'`)};var vme=class e{constructor(e,t){this.host=e,this.pendingTimeouts=new Map,this.logger=t.hasLevel(3)?t:void 0}schedule(t,n,r){const i=this.pendingTimeouts.get(t);i&&this.host.clearTimeout(i),this.pendingTimeouts.set(t,this.host.setTimeout(e.run,n,t,this,r)),this.logger&&this.logger.info(`Scheduled: ${t}${i?", Cancelled earlier one":""}`)}cancel(e){const t=this.pendingTimeouts.get(e);return!!t&&(this.host.clearTimeout(t),this.pendingTimeouts.delete(e))}static run(e,t,n){t.pendingTimeouts.delete(e),t.logger&&t.logger.info(`Running: ${e}`),n()}},bme=class e{constructor(e,t,n){this.host=e,this.delay=t,this.logger=n}scheduleCollect(){this.host.gc&&void 0===this.timerId&&(this.timerId=this.host.setTimeout(e.run,this.delay,this))}static run(e){e.timerId=void 0;const t=e.logger.hasLevel(2),n=t&&e.host.getMemoryUsage();if(e.host.gc(),t){const t=e.host.getMemoryUsage();e.logger.perftrc(`GC::before ${n}, after ${t}`)}}};function xme(e){const t=jo(e);return"tsconfig.json"===t||"jsconfig.json"===t?t:void 0}var Sme={};a(Sme,{ClassificationType:()=>oX,CommandTypes:()=>kme,CompletionTriggerKind:()=>UG,IndentStyle:()=>Nme,JsxEmit:()=>Dme,ModuleKind:()=>Eme,ModuleResolutionKind:()=>Fme,NewLineKind:()=>Pme,OrganizeImportsMode:()=>qG,PollingWatchKind:()=>wme,ScriptTarget:()=>Ame,SemicolonPreference:()=>KG,WatchDirectoryKind:()=>Cme,WatchFileKind:()=>Tme});var kme=(e=>(e.JsxClosingTag="jsxClosingTag",e.LinkedEditingRange="linkedEditingRange",e.Brace="brace",e.BraceFull="brace-full",e.BraceCompletion="braceCompletion",e.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",e.Change="change",e.Close="close",e.Completions="completions",e.CompletionInfo="completionInfo",e.CompletionsFull="completions-full",e.CompletionDetails="completionEntryDetails",e.CompletionDetailsFull="completionEntryDetails-full",e.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",e.CompileOnSaveEmitFile="compileOnSaveEmitFile",e.Configure="configure",e.Definition="definition",e.DefinitionFull="definition-full",e.DefinitionAndBoundSpan="definitionAndBoundSpan",e.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",e.Implementation="implementation",e.ImplementationFull="implementation-full",e.EmitOutput="emit-output",e.Exit="exit",e.FileReferences="fileReferences",e.FileReferencesFull="fileReferences-full",e.Format="format",e.Formatonkey="formatonkey",e.FormatFull="format-full",e.FormatonkeyFull="formatonkey-full",e.FormatRangeFull="formatRange-full",e.Geterr="geterr",e.GeterrForProject="geterrForProject",e.SemanticDiagnosticsSync="semanticDiagnosticsSync",e.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",e.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",e.NavBar="navbar",e.NavBarFull="navbar-full",e.Navto="navto",e.NavtoFull="navto-full",e.NavTree="navtree",e.NavTreeFull="navtree-full",e.DocumentHighlights="documentHighlights",e.DocumentHighlightsFull="documentHighlights-full",e.Open="open",e.Quickinfo="quickinfo",e.QuickinfoFull="quickinfo-full",e.References="references",e.ReferencesFull="references-full",e.Reload="reload",e.Rename="rename",e.RenameInfoFull="rename-full",e.RenameLocationsFull="renameLocations-full",e.Saveto="saveto",e.SignatureHelp="signatureHelp",e.SignatureHelpFull="signatureHelp-full",e.FindSourceDefinition="findSourceDefinition",e.Status="status",e.TypeDefinition="typeDefinition",e.ProjectInfo="projectInfo",e.ReloadProjects="reloadProjects",e.Unknown="unknown",e.OpenExternalProject="openExternalProject",e.OpenExternalProjects="openExternalProjects",e.CloseExternalProject="closeExternalProject",e.SynchronizeProjectList="synchronizeProjectList",e.ApplyChangedToOpenFiles="applyChangedToOpenFiles",e.UpdateOpen="updateOpen",e.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",e.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",e.Cleanup="cleanup",e.GetOutliningSpans="getOutliningSpans",e.GetOutliningSpansFull="outliningSpans",e.TodoComments="todoComments",e.Indentation="indentation",e.DocCommentTemplate="docCommentTemplate",e.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",e.NameOrDottedNameSpan="nameOrDottedNameSpan",e.BreakpointStatement="breakpointStatement",e.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",e.GetCodeFixes="getCodeFixes",e.GetCodeFixesFull="getCodeFixes-full",e.GetCombinedCodeFix="getCombinedCodeFix",e.GetCombinedCodeFixFull="getCombinedCodeFix-full",e.ApplyCodeActionCommand="applyCodeActionCommand",e.GetSupportedCodeFixes="getSupportedCodeFixes",e.GetApplicableRefactors="getApplicableRefactors",e.GetEditsForRefactor="getEditsForRefactor",e.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",e.PreparePasteEdits="preparePasteEdits",e.GetPasteEdits="getPasteEdits",e.GetEditsForRefactorFull="getEditsForRefactor-full",e.OrganizeImports="organizeImports",e.OrganizeImportsFull="organizeImports-full",e.GetEditsForFileRename="getEditsForFileRename",e.GetEditsForFileRenameFull="getEditsForFileRename-full",e.ConfigurePlugin="configurePlugin",e.SelectionRange="selectionRange",e.SelectionRangeFull="selectionRange-full",e.ToggleLineComment="toggleLineComment",e.ToggleLineCommentFull="toggleLineComment-full",e.ToggleMultilineComment="toggleMultilineComment",e.ToggleMultilineCommentFull="toggleMultilineComment-full",e.CommentSelection="commentSelection",e.CommentSelectionFull="commentSelection-full",e.UncommentSelection="uncommentSelection",e.UncommentSelectionFull="uncommentSelection-full",e.PrepareCallHierarchy="prepareCallHierarchy",e.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",e.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",e.ProvideInlayHints="provideInlayHints",e.WatchChange="watchChange",e.MapCode="mapCode",e.CopilotRelated="copilotRelated",e))(kme||{}),Tme=(e=>(e.FixedPollingInterval="FixedPollingInterval",e.PriorityPollingInterval="PriorityPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e.UseFsEvents="UseFsEvents",e.UseFsEventsOnParentDirectory="UseFsEventsOnParentDirectory",e))(Tme||{}),Cme=(e=>(e.UseFsEvents="UseFsEvents",e.FixedPollingInterval="FixedPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e))(Cme||{}),wme=(e=>(e.FixedInterval="FixedInterval",e.PriorityInterval="PriorityInterval",e.DynamicPriority="DynamicPriority",e.FixedChunkSize="FixedChunkSize",e))(wme||{}),Nme=(e=>(e.None="None",e.Block="Block",e.Smart="Smart",e))(Nme||{}),Dme=(e=>(e.None="none",e.Preserve="preserve",e.ReactNative="react-native",e.React="react",e.ReactJSX="react-jsx",e.ReactJSXDev="react-jsxdev",e))(Dme||{}),Eme=(e=>(e.None="none",e.CommonJS="commonjs",e.AMD="amd",e.UMD="umd",e.System="system",e.ES6="es6",e.ES2015="es2015",e.ES2020="es2020",e.ES2022="es2022",e.ESNext="esnext",e.Node16="node16",e.Node18="node18",e.Node20="node20",e.NodeNext="nodenext",e.Preserve="preserve",e))(Eme||{}),Fme=(e=>(e.Classic="classic",e.Node="node",e.NodeJs="node",e.Node10="node10",e.Node16="node16",e.NodeNext="nodenext",e.Bundler="bundler",e))(Fme||{}),Pme=(e=>(e.Crlf="Crlf",e.Lf="Lf",e))(Pme||{}),Ame=(e=>(e.ES3="es3",e.ES5="es5",e.ES6="es6",e.ES2015="es2015",e.ES2016="es2016",e.ES2017="es2017",e.ES2018="es2018",e.ES2019="es2019",e.ES2020="es2020",e.ES2021="es2021",e.ES2022="es2022",e.ES2023="es2023",e.ES2024="es2024",e.ESNext="esnext",e.JSON="json",e.Latest="esnext",e))(Ame||{}),Ime=class{constructor(e,t,n){this.host=e,this.info=t,this.isOpen=!1,this.ownFileText=!1,this.pendingReloadFromDisk=!1,this.version=n||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return void 0!==this.svc}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(e){this.svc=void 0,this.text=e,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(e,t,n){this.switchToScriptVersionCache().edit(e,t-e,n),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(e){return gn.assert(void 0!==e),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=aY(this.svc.getSnapshot())),this.text!==e&&(this.useText(e),this.ownFileText=!1,!0)}reloadWithFileText(e){const{text:t,fileSize:n}=e||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(e):{text:"",fileSize:void 0},r=this.reload(t);return this.fileSize=n,this.ownFileText=!e||e===this.info.fileName,this.ownFileText&&this.info.mTime===$i.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||$i).getTime()),r}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText&&(this.pendingReloadFromDisk=!0)}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){var e;return(null==(e=this.tryUseScriptVersionCache())?void 0:e.getSnapshot())||(this.textSnapshot??(this.textSnapshot=FG.fromString(gn.checkDefined(this.text))))}getAbsolutePositionAndLineText(e){const t=this.tryUseScriptVersionCache();if(t)return t.getAbsolutePositionAndLineText(e);const n=this.getLineMap();return e<=n.length?{absolutePosition:n[e-1],lineText:this.text.substring(n[e-1],n[e])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(e){const t=this.tryUseScriptVersionCache();if(t)return t.lineToTextSpan(e);const n=this.getLineMap();return Zs(n[e],e+1void 0===t?t=this.host.readFile(n)||"":t;if(!Uk(this.info.fileName)){const e=this.host.getFileSize?this.host.getFileSize(n):r().length;if(e>ige){gn.assert(!!this.info.containingProjects.length);return this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${n} for info ${this.info.fileName}: fileSize: ${e}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(n,e),{text:"",fileSize:e}}}return{text:r()}}switchToScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||(this.svc=Whe.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||this.getOrLoadText(),this.isOpen?(this.svc||this.textSnapshot||(this.svc=Whe.fromString(gn.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(void 0===this.text||this.pendingReloadFromDisk)&&(gn.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return gn.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=za(gn.checkDefined(this.text)))}getLineInfo(){const e=this.tryUseScriptVersionCache();if(e)return{getLineCount:()=>e.getLineCount(),getLineText:t=>e.getAbsolutePositionAndLineText(t+1).lineText};const t=this.getLineMap();return JJ(this.text,t)}};function Ome(e){return"^"===e[0]||(e.includes("walkThroughSnippet:/")||e.includes("untitled:/"))&&"^"===jo(e)[0]||e.includes(":^")&&!e.includes(ho)}var Lme=class{constructor(e,t,n,r,i,o){this.host=e,this.fileName=t,this.scriptKind=n,this.hasMixedContent=r,this.path=i,this.containingProjects=[],this.isDynamic=Ome(t),this.textStorage=new Ime(e,this,o),(r||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=n||Ek(t)}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(e){this.textStorage.isOpen=!0,void 0!==e&&this.textStorage.reload(e)&&this.markContainingProjectsAsDirty()}close(e=!0){this.textStorage.isOpen=!1,e&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}ensureRealPath(){if(void 0===this.realpath&&(this.realpath=this.path,this.host.realpath)){gn.assert(!!this.containingProjects.length);const e=this.containingProjects[0],t=this.host.realpath(this.path);t&&(this.realpath=e.toPath(t),this.realpath!==this.path&&e.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}getPreferences(){return this.preferences}attachToProject(e){const t=!this.isAttached(e);return t&&(this.containingProjects.push(e),e.getCompilerOptions().preserveSymlinks||this.ensureRealPath(),e.onFileAddedOrRemoved(this.isSymlink())),t}isAttached(e){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===e;case 2:return this.containingProjects[0]===e||this.containingProjects[1]===e;default:return D(this.containingProjects,e)}}detachFromProject(e){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===e?(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:$t(this.containingProjects,e)&&e.onFileAddedOrRemoved(this.isSymlink())}}detachAllProjects(){for(const e of this.containingProjects){Zme(e)&&e.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);const t=e.getRootFilesMap().get(this.path);e.removeFile(this,!1,!1),e.onFileAddedOrRemoved(this.isSymlink()),t&&!Yme(e)&&e.addMissingFileRoot(t.fileName)}I(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return ime.ThrowNoProject();case 1:return nge(this.containingProjects[0])||tge(this.containingProjects[0])?ime.ThrowNoProject():this.containingProjects[0];default:let e,t,n,r;for(let i=0;i!e.isOrphan())}lineToTextSpan(e){return this.textStorage.lineToTextSpan(e)}lineOffsetToPosition(e,t,n){return this.textStorage.lineOffsetToPosition(e,t,n)}positionToLineOffset(e){!function(e){gn.assert("number"==typeof e,`Expected position ${e} to be a number.`),gn.assert(e>=0,"Expected position to be non-negative.")}(e);const t=this.textStorage.positionToLineOffset(e);return function(e){gn.assert("number"==typeof e.line,`Expected line ${e.line} to be a number.`),gn.assert("number"==typeof e.offset,`Expected offset ${e.offset} to be a number.`),gn.assert(e.line>0,"Expected line to be non-"+(0===e.line?"zero":"negative")),gn.assert(e.offset>0,"Expected offset to be non-"+(0===e.offset?"zero":"negative"))}(t),t}isJavaScript(){return 1===this.scriptKind||2===this.scriptKind}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!it(this.sourceMapFilePath)&&(YU(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}};function jme(e){return X(e.containingProjects,tge)}function Mme(e){return X(e.containingProjects,nge)}var Rme=(e=>(e[e.Inferred=0]="Inferred",e[e.Configured=1]="Configured",e[e.External=2]="External",e[e.AutoImportProvider=3]="AutoImportProvider",e[e.Auxiliary=4]="Auxiliary",e))(Rme||{});function Bme(e,t=!1){const n={js:0,jsSize:0,jsx:0,jsxSize:0,ts:0,tsSize:0,tsx:0,tsxSize:0,dts:0,dtsSize:0,deferred:0,deferredSize:0};for(const r of e){const e=t?r.textStorage.getTelemetryFileSize():0;switch(r.scriptKind){case 1:n.js+=1,n.jsSize+=e;break;case 2:n.jsx+=1,n.jsxSize+=e;break;case 3:SO(r.fileName)?(n.dts+=1,n.dtsSize+=e):(n.ts+=1,n.tsSize+=e);break;case 4:n.tsx+=1,n.tsxSize+=e;break;case 7:n.deferred+=1,n.deferredSize+=e}}return n}function Jme(e){const t=Bme(e.getRootScriptInfos());return 0===t.ts&&0===t.tsx}function zme(e){const t=Bme(e.getScriptInfos());return 0===t.ts&&0===t.tsx}function qme(e){return!e.some(e=>Eo(e,".ts")&&!SO(e)||Eo(e,".tsx"))}function Ume(e){return void 0!==e.generatedFilePath}function Vme(e,t){if(e===t)return!0;if(0===(e||sme).length&&0===(t||sme).length)return!0;const n=new Map;let r=0;for(const t of e)!0!==n.get(t)&&(n.set(t,!0),r++);for(const e of t){const t=n.get(e);if(void 0===t)return!1;!0===t&&(n.set(e,!1),r--)}return 0===r}var Wme=class e{constructor(e,t,n,r,i,o,a,s,c,l){switch(this.projectKind=t,this.projectService=n,this.compilerOptions=o,this.compileOnSaveEnabled=a,this.watchOptions=s,this.rootFilesMap=new Map,this.plugins=[],this.cachedUnresolvedImportsPerFile=new Map,this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1,this.lastReportedVersion=0,this.projectProgramVersion=0,this.projectStateVersion=0,this.initialLoadPending=!1,this.dirty=!1,this.typingFiles=sme,this.moduleSpecifierCache=she(this),this.createHash=Xe(this.projectService.host,this.projectService.host.createHash),this.globalCacheResolutionModuleName=cG.nonRelativeModuleNameForTypingCache,this.updateFromProjectInProgress=!1,n.logger.info(`Creating ${Rme[t]}Project: ${e}, currentDirectory: ${l}`),this.projectName=e,this.directoryStructureHost=c,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(l),this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new f7(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds),this.compilerOptions?(r||JS(this.compilerOptions)||this.projectService.hasDeferredExtension())&&(this.compilerOptions.allowNonTsExtensions=!0):(this.compilerOptions={target:1,jsx:1},this.compilerOptions.allowNonTsExtensions=!0,this.compilerOptions.allowJs=!0),n.serverMode){case 0:this.languageServiceEnabled=!0;break;case 1:this.languageServiceEnabled=!0,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;case 2:this.languageServiceEnabled=!1,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;default:gn.assertNever(n.serverMode)}this.setInternalCompilerOptionsForEmittingJsFiles();const _=this.projectService.host;this.projectService.logger.loggingEnabled()?this.trace=e=>this.writeLog(e):_.trace&&(this.trace=e=>_.trace(e)),this.realpath=Xe(_,_.realpath),this.preferNonRecursiveWatch=this.projectService.canUseWatchEvents||_.preferNonRecursiveWatch,this.resolutionCache=y$(this,this.currentDirectory,!0),this.languageService=h7(this,this.projectService.documentRegistry,this.projectService.serverMode),i&&this.disableLanguageService(i),this.markAsDirty(),tge(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getRedirectFromSourceFile(e){}isNonTsProject(){return Kge(this),zme(this)}isJsOnlyProject(){return Kge(this),function(e){const t=Bme(e.getScriptInfos());return t.js>0&&0===t.ts&&0===t.tsx}(this)}static resolveModule(t,n,r,i){return e.importServicePluginSync({name:t},[n],r,i).resolvedModule}static importServicePluginSync(e,t,n,r){let i,o;gn.assertIsDefined(n.require);for(const a of t){const t=zo(n.resolvePath(Uo(a,"node_modules")));r(`Loading ${e.name} from ${a} (resolved to ${t})`);const s=n.require(t,e.name);if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to load module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}static async importServicePluginAsync(e,t,n,r){let i,o;gn.assertIsDefined(n.importPlugin);for(const a of t){const t=Uo(a,"node_modules");let s;r(`Dynamically importing ${e.name} from ${a} (resolved to ${t})`);try{s=await n.importPlugin(t,e.name)}catch(e){s={module:void 0,error:e}}if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to dynamically import module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}isKnownTypesPackageName(e){return this.projectService.typingsInstaller.isKnownTypesPackageName(e)}installPackage(e){return this.projectService.typingsInstaller.installPackage({...e,projectName:this.projectName,projectRootPath:this.toPath(this.currentDirectory)})}getGlobalTypingsCacheLocation(){return this.getTypeAcquisition().enable?this.projectService.typingsInstaller.globalTypingsCacheLocation:void 0}getSymlinkCache(){return this.symlinks||(this.symlinks=ok(this.getCurrentDirectory(),this.getCanonicalFileName)),this.program&&!this.symlinks.hasProcessedResolutions()&&this.symlinks.setSymlinksFromResolutions(this.program.forEachResolvedModule,this.program.forEachResolvedTypeReferenceDirective,this.program.getAutomaticTypeDirectiveResolutions()),this.symlinks}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return this.projectService.host.newLine}getProjectVersion(){return this.projectStateVersion.toString()}getProjectReferences(){}getScriptFileNames(){if(!this.rootFilesMap.size)return p;let e;return this.rootFilesMap.forEach(t=>{(this.languageServiceEnabled||t.info&&t.info.isScriptOpen())&&(e||(e=[])).push(t.fileName)}),de(e,this.typingFiles)||p}getOrCreateScriptInfoAndAttachToProject(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);if(t){const e=this.rootFilesMap.get(t.path);e&&e.info!==t&&(e.info=t),t.attachToProject(this)}return t}getScriptKind(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&t.scriptKind}getScriptVersion(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);return t&&t.getLatestVersion()}getScriptSnapshot(e){const t=this.getOrCreateScriptInfoAndAttachToProject(e);if(t)return t.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){return Uo(Lo(Ko(this.projectService.getExecutingFilePath())),Ls(this.compilerOptions))}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(e,t,n,r,i){return this.directoryStructureHost.readDirectory(e,t,n,r,i)}readFile(e){return this.projectService.host.readFile(e)}writeFile(e,t){return this.projectService.host.writeFile(e,t)}fileExists(e){const t=this.toPath(e);return!!this.projectService.getScriptInfoForPath(t)||!this.isWatchedMissingFile(t)&&this.directoryStructureHost.fileExists(e)}resolveModuleNameLiterals(e,t,n,r,i,o){return this.resolutionCache.resolveModuleNameLiterals(e,t,n,r,i,o)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o){return this.resolutionCache.resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o)}resolveLibrary(e,t,n,r){return this.resolutionCache.resolveLibrary(e,t,n,r)}directoryExists(e){return this.directoryStructureHost.directoryExists(e)}getDirectories(e){return this.directoryStructureHost.getDirectories(e)}getCachedDirectoryStructureHost(){}toPath(e){return Xo(e,this.currentDirectory,this.projectService.toCanonicalFileName)}watchDirectoryOfFailedLookupLocation(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),V$.FailedLookupLocations,this)}watchAffectingFileLocation(e,t){return this.projectService.watchFactory.watchFile(e,t,2e3,this.projectService.getWatchOptions(this),V$.AffectingFileLocation,this)}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)})}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}watchTypeRootsDirectory(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),V$.TypeRoots,this)}hasChangedAutomaticTypeDirectiveNames(){return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames()}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}fileIsOpen(e){return this.projectService.openFiles.has(e)}writeLog(e){this.projectService.logger.info(e)}log(e){this.writeLog(e)}error(e){this.projectService.logger.msg(e,"Err")}setInternalCompilerOptionsForEmittingJsFiles(){0!==this.projectKind&&2!==this.projectKind||(this.compilerOptions.noEmitForJsFiles=!0)}getGlobalProjectErrors(){return P(this.projectErrors,e=>!e.file)||sme}getAllProjectErrors(){return this.projectErrors||sme}setProjectErrors(e){this.projectErrors=e}getLanguageService(e=!0){return e&&Kge(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}clearSourceMapperCache(){this.languageService.clearSourceMapperCache()}getDocumentPositionMapper(e,t){return this.projectService.getDocumentPositionMapper(this,e,t)}getSourceFileLike(e){return this.projectService.getSourceFileLike(e,this)}shouldEmitFile(e){return e&&!e.isDynamicOrHasMixedContent()&&!this.program.isSourceOfProjectReferenceRedirect(e.path)}getCompileOnSaveAffectedFileList(e){return this.languageServiceEnabled?(Kge(this),this.builderState=_W.create(this.program,this.builderState,!0),U(_W.getFilesAffectedBy(this.builderState,this.program,e.path,this.cancellationToken,this.projectService.host),e=>this.shouldEmitFile(this.projectService.getScriptInfoForPath(e.path))?e.fileName:void 0)):[]}emitFile(e,t){if(!this.languageServiceEnabled||!this.shouldEmitFile(e))return{emitSkipped:!0,diagnostics:sme};const{emitSkipped:n,diagnostics:r,outputFiles:i}=this.getLanguageService().getEmitOutput(e.fileName);if(!n){for(const e of i){t($o(e.name,this.currentDirectory),e.text,e.writeByteOrderMark)}if(this.builderState&&jS(this.compilerOptions)){const t=i.filter(e=>SO(e.name));if(1===t.length){const n=this.program.getSourceFile(e.fileName),r=this.projectService.host.createHash?this.projectService.host.createHash(t[0].text):qi(t[0].text);_W.updateSignatureOfFile(this.builderState,r,n.resolvedPath)}}}return{emitSkipped:n,diagnostics:r}}enableLanguageService(){this.languageServiceEnabled||2===this.projectService.serverMode||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}cleanupProgram(){if(this.program){for(const e of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(e.fileName);this.program.forEachResolvedProjectReference(e=>this.detachScriptInfoFromProject(e.sourceFile.fileName)),this.program=void 0}}disableLanguageService(e){this.languageServiceEnabled&&(gn.assert(2!==this.projectService.serverMode),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=e,this.builderState=void 0,this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.resolutionCache.closeTypeRootsWatch(),this.clearGeneratedFileWatch(),this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}getProjectName(){return this.projectName}removeLocalTypingsFromTypeAcquisition(e){return e.enable&&e.include?{...e,include:this.removeExistingTypings(e.include)}:e}getExternalFiles(e){return me(R(this.plugins,t=>{if("function"==typeof t.module.getExternalFiles)try{return t.module.getExternalFiles(this,e||0)}catch(e){this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`),e.stack&&this.projectService.logger.info(e.stack)}}))}getSourceFile(e){if(this.program)return this.program.getSourceFileByPath(e)}getSourceFileOrConfigFile(e){const t=this.program.getCompilerOptions();return e===t.configFilePath?t.configFile:this.getSourceFile(e)}close(){var e;this.typingsCache&&this.projectService.typingsInstaller.onProjectClosed(this),this.typingsCache=void 0,this.closeWatchingTypingLocations(),this.cleanupProgram(),g(this.externalFiles,e=>this.detachScriptInfoIfNotRoot(e)),this.rootFilesMap.forEach(e=>{var t;return null==(t=e.info)?void 0:t.detachFromProject(this)}),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.builderState=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,null==(e=this.packageJsonWatches)||e.forEach(e=>{e.projects.delete(this),e.close()}),this.packageJsonWatches=void 0,this.moduleSpecifierCache.clear(),this.moduleSpecifierCache=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.plugins.length=0,this.missingFilesMap&&(vx(this.missingFilesMap,_x),this.missingFilesMap=void 0),this.clearGeneratedFileWatch(),this.clearInvalidateResolutionOfFailedLookupTimer(),this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.noDtsResolutionProject&&this.noDtsResolutionProject.close(),this.noDtsResolutionProject=void 0,this.languageService.dispose(),this.languageService=void 0}detachScriptInfoIfNotRoot(e){const t=this.projectService.getScriptInfo(e);t&&!this.isRoot(t)&&t.detachFromProject(this)}isClosed(){return void 0===this.rootFilesMap}hasRoots(){var e;return!!(null==(e=this.rootFilesMap)?void 0:e.size)}isOrphan(){return!1}getRootFiles(){return this.rootFilesMap&&Be(V(this.rootFilesMap.values(),e=>{var t;return null==(t=e.info)?void 0:t.fileName}))}getRootFilesMap(){return this.rootFilesMap}getRootScriptInfos(){return Be(V(this.rootFilesMap.values(),e=>e.info))}getScriptInfos(){return this.languageServiceEnabled?O(this.program.getSourceFiles(),e=>{const t=this.projectService.getScriptInfoForPath(e.resolvedPath);return gn.assert(!!t,"getScriptInfo",()=>`scriptInfo for a file '${e.fileName}' Path: '${e.path}' / '${e.resolvedPath}' is missing.`),t}):this.getRootScriptInfos()}getExcludedFiles(){return sme}getFileNames(e,t){if(!this.program)return[];if(!this.languageServiceEnabled){let e=this.getRootFiles();if(this.compilerOptions){const t=x7(this.compilerOptions);t&&(e||(e=[])).push(t)}return e}const n=[];for(const t of this.program.getSourceFiles())e&&this.program.isSourceFileFromExternalLibrary(t)||n.push(dme(t.fileName));if(!t){const e=this.program.getCompilerOptions().configFile;if(e&&(n.push(e.fileName),e.extendedSourceFiles))for(const t of e.extendedSourceFiles)n.push(dme(t))}return n}getFileNamesWithRedirectInfo(e){return this.getFileNames().map(t=>({fileName:t,isSourceOfProjectReferenceRedirect:e&&this.isSourceOfProjectReferenceRedirect(t)}))}hasConfigFile(e){if(this.program&&this.languageServiceEnabled){const t=this.program.getCompilerOptions().configFile;if(t){if(e===t.fileName)return!0;if(t.extendedSourceFiles)for(const n of t.extendedSourceFiles)if(e===dme(n))return!0}}return!1}containsScriptInfo(e){if(this.isRoot(e))return!0;if(!this.program)return!1;const t=this.program.getSourceFileByPath(e.path);return!!t&&t.resolvedPath===e.path}containsFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(e);return!(!n||!n.isScriptOpen()&&t)&&this.containsScriptInfo(n)}isRoot(e){var t,n;return(null==(n=null==(t=this.rootFilesMap)?void 0:t.get(e.path))?void 0:n.info)===e}addRoot(e,t){gn.assert(!this.isRoot(e)),this.rootFilesMap.set(e.path,{fileName:t||e.fileName,info:e}),e.attachToProject(this),this.markAsDirty()}addMissingFileRoot(e){const t=this.projectService.toPath(e);this.rootFilesMap.set(t,{fileName:e}),this.markAsDirty()}removeFile(e,t,n){this.isRoot(e)&&this.removeRoot(e),t?this.resolutionCache.removeResolutionsOfFile(e.path):this.resolutionCache.invalidateResolutionOfFile(e.path),this.cachedUnresolvedImportsPerFile.delete(e.path),n&&e.detachFromProject(this),this.markAsDirty()}registerFileUpdate(e){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(e)}markFileAsDirty(e){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(e)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}markAutoImportProviderAsDirty(){var e;this.autoImportProviderHost||(this.autoImportProviderHost=void 0),null==(e=this.autoImportProviderHost)||e.markAsDirty()}onAutoImportProviderSettingsChanged(){this.markAutoImportProviderAsDirty()}onPackageJsonChange(){this.moduleSpecifierCache.clear(),this.markAutoImportProviderAsDirty()}onFileAddedOrRemoved(e){this.hasAddedorRemovedFiles=!0,e&&(this.hasAddedOrRemovedSymlinks=!0)}onDiscoveredSymlink(){this.hasAddedOrRemovedSymlinks=!0}onReleaseOldSourceFile(e,t,n,r){(!r||e.resolvedPath===e.path&&r.resolvedPath!==e.path)&&this.detachScriptInfoFromProject(e.fileName,n)}updateFromProject(){Kge(this)}updateGraph(){var e,t;null==(e=Yn)||e.push(Yn.Phase.Session,"updateGraph",{name:this.projectName,kind:Rme[this.projectKind]}),this.resolutionCache.startRecordingFilesWithChangedResolutions();const n=this.updateGraphWorker(),r=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;const i=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||sme;for(const e of i)this.cachedUnresolvedImportsPerFile.delete(e);this.languageServiceEnabled&&0===this.projectService.serverMode&&!this.isOrphan()?((n||i.length)&&(this.lastCachedUnresolvedImportsList=function(e,t){var n,r;const i=e.getSourceFiles();null==(n=Yn)||n.push(Yn.Phase.Session,"getUnresolvedImports",{count:i.length});const o=e.getTypeChecker().getAmbientModules().map(e=>jy(e.getName())),a=oe(R(i,n=>function(e,t,n,r){return W(r,t.path,()=>{let r;return e.forEachResolvedModule(({resolvedModule:e},t)=>{e&&aT(e.extension)||As(t)||n.some(e=>e===t)||(r=le(r,ER(t).packageName))},t),r||sme})}(e,n,o,t)));return null==(r=Yn)||r.pop(),a}(this.program,this.cachedUnresolvedImportsPerFile)),this.enqueueInstallTypingsForProject(r)):this.lastCachedUnresolvedImportsList=void 0;const o=0===this.projectProgramVersion&&n;return n&&this.projectProgramVersion++,r&&this.markAutoImportProviderAsDirty(),o&&this.getPackageJsonAutoImportProvider(),null==(t=Yn)||t.pop(),!n}enqueueInstallTypingsForProject(e){const t=this.getTypeAcquisition();if(!t||!t.enable||this.projectService.typingsInstaller===Age)return;const n=this.typingsCache;var r,i,o,a;!e&&n&&(o=t,a=n.typeAcquisition,o.enable===a.enable&&Vme(o.include,a.include)&&Vme(o.exclude,a.exclude))&&!function(e,t){return JS(e)!==JS(t)}(this.getCompilationSettings(),n.compilerOptions)&&(r=this.lastCachedUnresolvedImportsList,i=n.unresolvedImports,r===i||ae(r,i))||(this.typingsCache={compilerOptions:this.getCompilationSettings(),typeAcquisition:t,unresolvedImports:this.lastCachedUnresolvedImportsList},this.projectService.typingsInstaller.enqueueInstallTypingsRequest(this,t,this.lastCachedUnresolvedImportsList))}updateTypingFiles(e,t,n,r){this.typingsCache={compilerOptions:e,typeAcquisition:t,unresolvedImports:n};const i=t&&t.enable?me(r):sme;_n(i,this.typingFiles,Pt(!this.useCaseSensitiveFileNames()),ct,e=>this.detachScriptInfoFromProject(e))&&(this.typingFiles=i,this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}closeWatchingTypingLocations(){this.typingWatchers&&vx(this.typingWatchers,_x),this.typingWatchers=void 0}onTypingInstallerWatchInvoke(){this.typingWatchers.isInvoked=!0,this.projectService.updateTypingsForProject({projectName:this.getProjectName(),kind:dG})}watchTypingLocations(e){if(!e)return void(this.typingWatchers.isInvoked=!1);if(!e.length)return void this.closeWatchingTypingLocations();const t=new Map(this.typingWatchers);this.typingWatchers||(this.typingWatchers=new Map),this.typingWatchers.isInvoked=!1;const n=(e,n)=>{const r=this.toPath(e);if(t.delete(r),!this.typingWatchers.has(r)){const t="FileWatcher"===n?V$.TypingInstallerLocationFile:V$.TypingInstallerLocationDirectory;this.typingWatchers.set(r,a$(r)?"FileWatcher"===n?this.projectService.watchFactory.watchFile(e,()=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):this.onTypingInstallerWatchInvoke(),2e3,this.projectService.getWatchOptions(this),t,this):this.projectService.watchFactory.watchDirectory(e,e=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):Eo(e,".json")?aa(e,Uo(this.projectService.typingsInstaller.globalTypingsCacheLocation,"package.json"),!this.useCaseSensitiveFileNames())?this.writeLog("Ignoring package.json change at global typings location"):void this.onTypingInstallerWatchInvoke():this.writeLog("Ignoring files that are not *.json"),1,this.projectService.getWatchOptions(this),t,this):(this.writeLog(`Skipping watcher creation at ${e}:: ${Wge(t,this)}`),z$))}};for(const t of e){const e=jo(t);if("package.json"!==e&&"bower.json"!==e){if(sa(this.currentDirectory,t,this.currentDirectory,!this.useCaseSensitiveFileNames())){const e=t.indexOf(ho,this.currentDirectory.length+1);n(-1!==e?t.substr(0,e):t,"DirectoryWatcher");continue}sa(this.projectService.typingsInstaller.globalTypingsCacheLocation,t,this.currentDirectory,!this.useCaseSensitiveFileNames())?n(this.projectService.typingsInstaller.globalTypingsCacheLocation,"DirectoryWatcher"):n(t,"DirectoryWatcher")}else n(t,"FileWatcher")}t.forEach((e,t)=>{e.close(),this.typingWatchers.delete(t)})}getCurrentProgram(){return this.program}removeExistingTypings(e){if(!e.length)return e;const t=AM(this.getCompilerOptions(),this);return P(e,e=>!t.includes(e))}updateGraphWorker(){var e,t;const n=this.languageService.getCurrentProgram();gn.assert(n===this.program),gn.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);const r=Hn(),{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=this.resolutionCache.createHasInvalidatedResolutions(lt,lt);this.hasInvalidatedResolutions=i,this.hasInvalidatedLibResolutions=o,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,null==(e=Yn)||e.push(Yn.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,n),null==(t=Yn)||t.pop(),gn.assert(void 0===n||void 0!==this.program);let a=!1;if(this.program&&(!n||this.program!==n&&2!==this.program.structureIsReused)){if(a=!0,this.rootFilesMap.forEach((e,t)=>{var n;const r=this.program.getSourceFileByPath(t),i=e.info;r&&(null==(n=e.info)?void 0:n.path)!==r.resolvedPath&&(e.info=this.projectService.getScriptInfo(r.fileName),gn.assert(e.info.isAttached(this)),null==i||i.detachFromProject(this))}),WU(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),(e,t)=>this.addMissingFileWatcher(e,t)),this.generatedFilesMap){const e=this.compilerOptions.outFile;Ume(this.generatedFilesMap)?e&&this.isValidGeneratedFileWatcher(Qk(e)+".d.ts",this.generatedFilesMap)||this.clearGeneratedFileWatch():e?this.clearGeneratedFileWatch():this.generatedFilesMap.forEach((e,t)=>{const n=this.program.getSourceFileByPath(t);n&&n.resolvedPath===t&&this.isValidGeneratedFileWatcher(Qy(n.fileName,this.compilerOptions,this.program),e)||(YU(e),this.generatedFilesMap.delete(t))})}this.languageServiceEnabled&&0===this.projectService.serverMode&&this.resolutionCache.updateTypeRootsWatch()}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||n&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&n&&this.program&&ud(this.changedFilesForExportMapCache,e=>{const t=n.getSourceFileByPath(e),r=this.program.getSourceFileByPath(e);return t&&r?this.exportMapCache.onFileChanged(t,r,!!this.getTypeAcquisition().enable):(this.exportMapCache.clear(),!0)})),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions().preserveSymlinks)&&(this.symlinks=void 0,this.moduleSpecifierCache.clear());const s=this.externalFiles||sme;this.externalFiles=this.getExternalFiles(),_n(this.externalFiles,s,Pt(!this.useCaseSensitiveFileNames()),e=>{const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);null==t||t.attachToProject(this)},e=>this.detachScriptInfoFromProject(e));const c=Hn()-r;return this.sendPerformanceEvent("UpdateGraph",c),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${a}${this.program?` structureIsReused:: ${Or[this.program.structureIsReused]}`:""} Elapsed: ${c}ms`),this.projectService.logger.isTestLogger?this.program!==n?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==n&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),a}sendPerformanceEvent(e,t){this.projectService.sendPerformanceEvent(e,t)}detachScriptInfoFromProject(e,t){const n=this.projectService.getScriptInfo(e);n&&(n.detachFromProject(this),t||this.resolutionCache.removeResolutionsOfFile(n.path))}addMissingFileWatcher(e,t){var n;if(Zme(this)){const t=this.projectService.configFileExistenceInfoCache.get(e);if(null==(n=null==t?void 0:t.config)?void 0:n.projects.has(this.canonicalConfigFilePath))return z$}const r=this.projectService.watchFactory.watchFile($o(t,this.currentDirectory),(t,n)=>{Zme(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(t,e,n),0===n&&this.missingFilesMap.has(e)&&(this.missingFilesMap.delete(e),r.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))},500,this.projectService.getWatchOptions(this),V$.MissingFile,this);return r}isWatchedMissingFile(e){return!!this.missingFilesMap&&this.missingFilesMap.has(e)}addGeneratedFileWatch(e,t){if(this.compilerOptions.outFile)this.generatedFilesMap||(this.generatedFilesMap=this.createGeneratedFileWatcher(e));else{const n=this.toPath(t);if(this.generatedFilesMap){if(Ume(this.generatedFilesMap))return void gn.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);if(this.generatedFilesMap.has(n))return}else this.generatedFilesMap=new Map;this.generatedFilesMap.set(n,this.createGeneratedFileWatcher(e))}}createGeneratedFileWatcher(e){return{generatedFilePath:this.toPath(e),watcher:this.projectService.watchFactory.watchFile(e,()=>{this.clearSourceMapperCache(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)},2e3,this.projectService.getWatchOptions(this),V$.MissingGeneratedFile,this)}}isValidGeneratedFileWatcher(e,t){return this.toPath(e)===t.generatedFilePath}clearGeneratedFileWatch(){this.generatedFilesMap&&(Ume(this.generatedFilesMap)?YU(this.generatedFilesMap):vx(this.generatedFilesMap,YU),this.generatedFilesMap=void 0)}getScriptInfoForNormalizedPath(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&!t.isAttached(this)?ime.ThrowProjectDoesNotContainDocument(e,this):t}getScriptInfo(e){return this.projectService.getScriptInfo(e)}filesToString(e){return this.filesToStringWorker(e,!0,!1)}filesToStringWorker(e,t,n){if(this.initialLoadPending)return"\tFiles (0) InitialLoadPending\n";if(!this.program)return"\tFiles (0) NoProgram\n";const r=this.program.getSourceFiles();let i=`\tFiles (${r.length})\n`;if(e){for(const e of r)i+=`\t${e.fileName}${n?` ${e.version} ${JSON.stringify(e.text)}`:""}\n`;t&&(i+="\n\n",I$(this.program,e=>i+=`\t${e}\n`))}return i}print(e,t,n){var r;this.writeLog(`Project '${this.projectName}' (${Rme[this.projectKind]})`),this.writeLog(this.filesToStringWorker(e&&this.projectService.logger.hasLevel(3),t&&this.projectService.logger.hasLevel(3),n&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------"),this.autoImportProviderHost&&this.autoImportProviderHost.print(!1,!1,!1),null==(r=this.noDtsResolutionProject)||r.print(!1,!1,!1)}setCompilerOptions(e){var t;if(e){e.allowNonTsExtensions=!0;const n=this.compilerOptions;this.compilerOptions=e,this.setInternalCompilerOptionsForEmittingJsFiles(),null==(t=this.noDtsResolutionProject)||t.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()),ad(n,e)&&(this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.resolutionCache.onChangesAffectModuleResolution(),this.moduleSpecifierCache.clear()),this.markAsDirty()}}setWatchOptions(e){this.watchOptions=e}getWatchOptions(){return this.watchOptions}setTypeAcquisition(e){e&&(this.typeAcquisition=this.removeLocalTypingsFromTypeAcquisition(e))}getTypeAcquisition(){return this.typeAcquisition||{}}getChangesSinceVersion(e,t){var n,r;const i=t?e=>Be(e.entries(),([e,t])=>({fileName:e,isSourceOfProjectReferenceRedirect:t})):e=>Be(e.keys());this.initialLoadPending||Kge(this);const o={projectName:this.getProjectName(),version:this.projectProgramVersion,isInferred:Yme(this),options:this.getCompilationSettings(),languageServiceDisabled:!this.languageServiceEnabled,lastFileExceededProgramSize:this.lastFileExceededProgramSize},a=this.updatedFileNames;if(this.updatedFileNames=void 0,this.lastReportedFileNames&&e===this.lastReportedVersion){if(this.projectProgramVersion===this.lastReportedVersion&&!a)return{info:o,projectErrors:this.getGlobalProjectErrors()};const e=this.lastReportedFileNames,r=(null==(n=this.externalFiles)?void 0:n.map(e=>({fileName:_me(e),isSourceOfProjectReferenceRedirect:!1})))||sme,s=qe(this.getFileNamesWithRedirectInfo(!!t).concat(r),e=>e.fileName,e=>e.isSourceOfProjectReferenceRedirect),c=new Map,l=new Map,_=a?Be(a.keys()):[],u=[];return _d(s,(n,r)=>{e.has(r)?t&&n!==e.get(r)&&u.push({fileName:r,isSourceOfProjectReferenceRedirect:n}):c.set(r,n)}),_d(e,(e,t)=>{s.has(t)||l.set(t,e)}),this.lastReportedFileNames=s,this.lastReportedVersion=this.projectProgramVersion,{info:o,changes:{added:i(c),removed:i(l),updated:t?_.map(e=>({fileName:e,isSourceOfProjectReferenceRedirect:this.isSourceOfProjectReferenceRedirect(e)})):_,updatedRedirects:t?u:void 0},projectErrors:this.getGlobalProjectErrors()}}{const e=this.getFileNamesWithRedirectInfo(!!t),n=(null==(r=this.externalFiles)?void 0:r.map(e=>({fileName:_me(e),isSourceOfProjectReferenceRedirect:!1})))||sme,i=e.concat(n);return this.lastReportedFileNames=qe(i,e=>e.fileName,e=>e.isSourceOfProjectReferenceRedirect),this.lastReportedVersion=this.projectProgramVersion,{info:o,files:t?i:i.map(e=>e.fileName),projectErrors:this.getGlobalProjectErrors()}}}removeRoot(e){this.rootFilesMap.delete(e.path)}isSourceOfProjectReferenceRedirect(e){return!!this.program&&this.program.isSourceOfProjectReferenceRedirect(e)}getGlobalPluginSearchPaths(){return[...this.projectService.pluginProbeLocations,Uo(this.projectService.getExecutingFilePath(),"../../..")]}enableGlobalPlugins(e){if(!this.projectService.globalPlugins.length)return;const t=this.projectService.host;if(!t.require&&!t.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const n=this.getGlobalPluginSearchPaths();for(const t of this.projectService.globalPlugins)t&&(e.plugins&&e.plugins.some(e=>e.name===t)||(this.projectService.logger.info(`Loading global plugin ${t}`),this.enablePlugin({name:t,global:!0},n)))}enablePlugin(e,t){this.projectService.requestEnablePlugin(this,e,t)}enableProxy(e,t){try{if("function"!=typeof e)return void this.projectService.logger.info(`Skipped loading plugin ${t.name} because it did not expose a proper factory function`);const n={config:t,project:this,languageService:this.languageService,languageServiceHost:this,serverHost:this.projectService.host,session:this.projectService.session},r=e({typescript:qfe}),i=r.create(n);for(const e of Object.keys(this.languageService))e in i||(this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${e} in created LS. Patching.`),i[e]=this.languageService[e]);this.projectService.logger.info("Plugin validation succeeded"),this.languageService=i,this.plugins.push({name:t.name,module:r})}catch(e){this.projectService.logger.info(`Plugin activation failed: ${e}`)}}onPluginConfigurationChanged(e,t){this.plugins.filter(t=>t.name===e).forEach(e=>{e.module.onConfigurationChanged&&e.module.onConfigurationChanged(t)})}refreshDiagnostics(){this.projectService.sendProjectsUpdatedInBackgroundEvent()}getPackageJsonsVisibleToFile(e,t){return 0!==this.projectService.serverMode?sme:this.projectService.getPackageJsonsVisibleToFile(e,this,t)}getNearestAncestorDirectoryWithPackageJson(e){return this.projectService.getNearestAncestorDirectoryWithPackageJson(e,this)}getPackageJsonsForAutoImport(e){return this.getPackageJsonsVisibleToFile(Uo(this.currentDirectory,RV),e)}getPackageJsonCache(){return this.projectService.packageJsonCache}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=C0(this))}clearCachedExportInfoMap(){var e;null==(e=this.exportMapCache)||e.clear()}getModuleSpecifierCache(){return this.moduleSpecifierCache}includePackageJsonAutoImports(){return 0!==this.projectService.includePackageJsonAutoImports()&&this.languageServiceEnabled&&!YZ(this.currentDirectory)&&this.isDefaultProjectForOpenFiles()?this.projectService.includePackageJsonAutoImports():0}getHostForAutoImportProvider(){var e,t;return this.program?{fileExists:this.program.fileExists,directoryExists:this.program.directoryExists,realpath:this.program.realpath||(null==(e=this.projectService.host.realpath)?void 0:e.bind(this.projectService.host)),getCurrentDirectory:this.getCurrentDirectory.bind(this),readFile:this.projectService.host.readFile.bind(this.projectService.host),getDirectories:this.projectService.host.getDirectories.bind(this.projectService.host),trace:null==(t=this.projectService.host.trace)?void 0:t.bind(this.projectService.host),useCaseSensitiveFileNames:this.program.useCaseSensitiveFileNames(),readDirectory:this.projectService.host.readDirectory.bind(this.projectService.host)}:this.projectService.host}getPackageJsonAutoImportProvider(){var e,t,n;if(!1===this.autoImportProviderHost)return;if(0!==this.projectService.serverMode)return void(this.autoImportProviderHost=!1);if(this.autoImportProviderHost)return Kge(this.autoImportProviderHost),this.autoImportProviderHost.isEmpty()?(this.autoImportProviderHost.close(),void(this.autoImportProviderHost=void 0)):this.autoImportProviderHost.getCurrentProgram();const r=this.includePackageJsonAutoImports();if(r){null==(e=Yn)||e.push(Yn.Phase.Session,"getPackageJsonAutoImportProvider");const i=Hn();if(this.autoImportProviderHost=Gme.create(r,this,this.getHostForAutoImportProvider())??!1,this.autoImportProviderHost)return Kge(this.autoImportProviderHost),this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider",Hn()-i),null==(t=Yn)||t.pop(),this.autoImportProviderHost.getCurrentProgram();null==(n=Yn)||n.pop()}}isDefaultProjectForOpenFiles(){return!!_d(this.projectService.openFiles,(e,t)=>this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(t))===this)}watchNodeModulesForPackageJsonChanges(e){return this.projectService.watchPackageJsonsInNodeModules(e,this)}getIncompleteCompletionsCache(){return this.projectService.getIncompleteCompletionsCache()}getNoDtsResolutionProject(e){return gn.assert(0===this.projectService.serverMode),this.noDtsResolutionProject??(this.noDtsResolutionProject=new Kme(this)),this.noDtsResolutionProject.rootFile!==e&&(this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject(this.noDtsResolutionProject,[e]),this.noDtsResolutionProject.rootFile=e),this.noDtsResolutionProject}runWithTemporaryFileUpdate(e,t,n){var r,i,o,a;const s=this.program,c=gn.checkDefined(null==(r=this.program)?void 0:r.getSourceFile(e),"Expected file to be part of program"),l=gn.checkDefined(c.getFullText());null==(i=this.getScriptInfo(e))||i.editContent(0,l.length,t),this.updateGraph();try{n(this.program,s,null==(o=this.program)?void 0:o.getSourceFile(e))}finally{null==(a=this.getScriptInfo(e))||a.editContent(0,t.length,l)}}getCompilerOptionsForNoDtsResolutionProject(){return{...this.getCompilerOptions(),noDtsResolution:!0,allowJs:!0,maxNodeModuleJsDepth:3,diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:p,lib:p,noLib:!0}}};var $me=class extends Wme{constructor(e,t,n,r,i,o){super(e.newInferredProjectName(),0,e,!1,void 0,t,!1,n,e.host,i),this._isJsInferredProject=!1,this.typeAcquisition=o,this.projectRootPath=r&&e.toCanonicalFileName(r),r||e.useSingleInferredProject||(this.canonicalCurrentDirectory=e.toCanonicalFileName(this.currentDirectory)),this.enableGlobalPlugins(this.getCompilerOptions())}toggleJsInferredProject(e){e!==this._isJsInferredProject&&(this._isJsInferredProject=e,this.setCompilerOptions())}setCompilerOptions(e){if(!e&&!this.getCompilationSettings())return;const t=qQ(e||this.getCompilationSettings());this._isJsInferredProject&&"number"!=typeof t.maxNodeModuleJsDepth?t.maxNodeModuleJsDepth=2:this._isJsInferredProject||(t.maxNodeModuleJsDepth=void 0),t.allowJs=!0,super.setCompilerOptions(t)}addRoot(e){gn.assert(e.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(e),!this._isJsInferredProject&&e.isJavaScript()?this.toggleJsInferredProject(!0):this.isOrphan()&&this._isJsInferredProject&&!e.isJavaScript()&&this.toggleJsInferredProject(!1),super.addRoot(e)}removeRoot(e){this.projectService.stopWatchingConfigFilesForScriptInfo(e),super.removeRoot(e),!this.isOrphan()&&this._isJsInferredProject&&e.isJavaScript()&&k(this.getRootScriptInfos(),e=>!e.isJavaScript())&&this.toggleJsInferredProject(!1)}isOrphan(){return!this.hasRoots()}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||1===this.getRootScriptInfos().length}close(){g(this.getRootScriptInfos(),e=>this.projectService.stopWatchingConfigFilesForScriptInfo(e)),super.close()}getTypeAcquisition(){return this.typeAcquisition||{enable:Jme(this),include:p,exclude:p}}},Kme=class extends Wme{constructor(e){super(e.projectService.newAuxiliaryProjectName(),4,e.projectService,!1,void 0,e.getCompilerOptionsForNoDtsResolutionProject(),!1,void 0,e.projectService.host,e.currentDirectory)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},Hme=class e extends Wme{constructor(e,t,n){super(e.projectService.newAutoImportProviderProjectName(),3,e.projectService,!1,void 0,n,!1,e.getWatchOptions(),e.projectService.host,e.currentDirectory),this.hostProject=e,this.rootFileNames=t,this.useSourceOfProjectReferenceRedirect=Xe(this.hostProject,this.hostProject.useSourceOfProjectReferenceRedirect),this.getParsedCommandLine=Xe(this.hostProject,this.hostProject.getParsedCommandLine)}static getRootFileNames(e,t,n,r){var i,o;if(!e)return p;const a=t.getCurrentProgram();if(!a)return p;const s=Hn();let c,l;const _=Uo(t.currentDirectory,RV),u=t.getPackageJsonsForAutoImport(Uo(t.currentDirectory,_));for(const e of u)null==(i=e.dependencies)||i.forEach((e,t)=>y(t)),null==(o=e.peerDependencies)||o.forEach((e,t)=>y(t));let d=0;if(c){const i=t.getSymlinkCache();for(const o of Be(c.keys())){if(2===e&&d>=this.maxDependencies)return t.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`),p;const s=PM(o,t.currentDirectory,r,n,a.getModuleResolutionCache());if(s){const e=v(s,a,i);if(e){d+=h(e);continue}}if(!g([t.currentDirectory,t.getGlobalTypingsCacheLocation()],e=>{if(e){const t=PM(`@types/${o}`,e,r,n,a.getModuleResolutionCache());if(t){const e=v(t,a,i);return d+=h(e),!0}}})&&(s&&r.allowJs&&r.maxNodeModuleJsDepth)){const e=v(s,a,i,!0);d+=h(e)}}}const f=a.getResolvedProjectReferences();let m=0;return(null==f?void 0:f.length)&&t.projectService.getHostPreferences().includeCompletionsForModuleExports&&f.forEach(e=>{if(null==e?void 0:e.commandLine.options.outFile)m+=h(b([eT(e.commandLine.options.outFile,".d.ts")]));else if(e){const n=ht(()=>kU(e.commandLine,!t.useCaseSensitiveFileNames()));m+=h(b(U(e.commandLine.fileNames,r=>SO(r)||Eo(r,".json")||a.getSourceFile(r)?void 0:mU(r,e.commandLine,!t.useCaseSensitiveFileNames(),n))))}}),(null==l?void 0:l.size)&&t.log(`AutoImportProviderProject: found ${l.size} root files in ${d} dependencies ${m} referenced projects in ${Hn()-s} ms`),l?Be(l.values()):p;function h(e){return(null==e?void 0:e.length)?(l??(l=new Set),e.forEach(e=>l.add(e)),1):0}function y(e){en(e,"@types/")||(c||(c=new Set)).add(e)}function v(e,i,o,a){var s;const c=bR(e,r,n,i.getModuleResolutionCache(),a);if(c){const r=null==(s=n.realpath)?void 0:s.call(n,e.packageDirectory),i=r?t.toPath(r):void 0,a=i&&i!==t.toPath(e.packageDirectory);return a&&o.setSymlinkedDirectory(e.packageDirectory,{real:Yo(r),realPath:Yo(i)}),b(c,a?t=>t.replace(e.packageDirectory,r):void 0)}}function b(e,t){return U(e,e=>{const n=t?t(e):e;if(!(a.getSourceFile(n)||t&&a.getSourceFile(e)))return n})}}static create(t,n,r){if(0===t)return;const i={...n.getCompilerOptions(),...this.compilerOptionsOverrides},o=this.getRootFileNames(t,n,r,i);return o.length?new e(n,o,i):void 0}isEmpty(){return!X(this.rootFileNames)}isOrphan(){return!0}updateGraph(){let t=this.rootFileNames;t||(t=e.getRootFileNames(this.hostProject.includePackageJsonAutoImports(),this.hostProject,this.hostProject.getHostForAutoImportProvider(),this.getCompilationSettings())),this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject(this,t),this.rootFileNames=t;const n=this.getCurrentProgram(),r=super.updateGraph();return n&&n!==this.getCurrentProgram()&&this.hostProject.clearCachedExportInfoMap(),r}scheduleInvalidateResolutionsOfFailedLookupLocations(){}hasRoots(){var e;return!!(null==(e=this.rootFileNames)?void 0:e.length)}markAsDirty(){this.rootFileNames=void 0,super.markAsDirty()}getScriptFileNames(){return this.rootFileNames||p}getLanguageService(){throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.")}onAutoImportProviderSettingsChanged(){throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.")}onPackageJsonChange(){throw new Error("package.json changes should be notified on an AutoImportProvider's host project")}getHostForAutoImportProvider(){throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.")}getProjectReferences(){return this.hostProject.getProjectReferences()}includePackageJsonAutoImports(){return 0}getSymlinkCache(){return this.hostProject.getSymlinkCache()}getModuleResolutionCache(){var e;return null==(e=this.hostProject.getCurrentProgram())?void 0:e.getModuleResolutionCache()}};Hme.maxDependencies=10,Hme.compilerOptionsOverrides={diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:p,lib:p,noLib:!0};var Gme=Hme,Xme=class extends Wme{constructor(e,t,n,r,i){super(e,1,n,!1,void 0,{},!1,void 0,r,Lo(e)),this.canonicalConfigFilePath=t,this.openFileWatchTriggered=new Map,this.initialLoadPending=!0,this.sendLoadingProjectFinish=!1,this.pendingUpdateLevel=2,this.pendingUpdateReason=i}setCompilerHost(e){this.compilerHost=e}getCompilerHost(){return this.compilerHost}useSourceOfProjectReferenceRedirect(){return this.languageServiceEnabled}getParsedCommandLine(e){const t=_me(e),n=this.projectService.toCanonicalFileName(t);let r=this.projectService.configFileExistenceInfoCache.get(n);return r||this.projectService.configFileExistenceInfoCache.set(n,r={exists:this.projectService.host.fileExists(t)}),this.projectService.ensureParsedConfigUptoDate(t,n,r,this),this.languageServiceEnabled&&0===this.projectService.serverMode&&this.projectService.watchWildcards(t,r,this),r.exists?r.config.parsedCommandLine:void 0}onReleaseParsedCommandLine(e){this.releaseParsedConfig(this.projectService.toCanonicalFileName(_me(e)))}releaseParsedConfig(e){this.projectService.stopWatchingWildCards(e,this),this.projectService.releaseParsedConfig(e,this)}updateGraph(){if(this.deferredClose)return!1;const e=this.dirty;this.initialLoadPending=!1;const t=this.pendingUpdateLevel;let n;switch(this.pendingUpdateLevel=0,t){case 1:this.openFileWatchTriggered.clear(),n=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();const e=gn.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,e),n=!0;break;default:n=super.updateGraph()}return this.compilerHost=void 0,this.projectService.sendProjectLoadingFinishEvent(this),this.projectService.sendProjectTelemetry(this),2!==t&&(!n||e&&this.triggerFileForConfigFileDiag&&2!==this.getCurrentProgram().structureIsReused)?this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1):this.triggerFileForConfigFileDiag=void 0,n}getCachedDirectoryStructureHost(){return this.directoryStructureHost}getConfigFilePath(){return this.getProjectName()}getProjectReferences(){return this.projectReferences}updateReferences(e){this.projectReferences=e,this.potentialProjectReferences=void 0}setPotentialProjectReference(e){gn.assert(this.initialLoadPending),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(e)}getRedirectFromSourceFile(e){const t=this.getCurrentProgram();return t&&t.getRedirectFromSourceFile(e)}forEachResolvedProjectReference(e){var t;return null==(t=this.getCurrentProgram())?void 0:t.forEachResolvedProjectReference(e)}enablePluginsWithOptions(e){var t;if(this.plugins.length=0,!(null==(t=e.plugins)?void 0:t.length)&&!this.projectService.globalPlugins.length)return;const n=this.projectService.host;if(!n.require&&!n.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const r=this.getGlobalPluginSearchPaths();if(this.projectService.allowLocalPluginLoads){const e=Lo(this.canonicalConfigFilePath);this.projectService.logger.info(`Local plugin loading enabled; adding ${e} to search paths`),r.unshift(e)}if(e.plugins)for(const t of e.plugins)this.enablePlugin(t,r);return this.enableGlobalPlugins(e)}getGlobalProjectErrors(){return P(this.projectErrors,e=>!e.file)||sme}getAllProjectErrors(){return this.projectErrors||sme}setProjectErrors(e){this.projectErrors=e}close(){this.projectService.configFileExistenceInfoCache.forEach((e,t)=>this.releaseParsedConfig(t)),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}markAsDirty(){this.deferredClose||super.markAsDirty()}isOrphan(){return!!this.deferredClose}getEffectiveTypeRoots(){return kM(this.getCompilationSettings(),this)||[]}updateErrorOnNoInputFiles(e){this.parsedCommandLine=e,Dj(e.fileNames,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,Nj(e.raw))}},Qme=class extends Wme{constructor(e,t,n,r,i,o,a){super(e,2,t,!0,r,n,i,a,t.host,Lo(o||zo(e))),this.externalProjectName=e,this.compileOnSaveEnabled=i,this.excludedFiles=[],this.enableGlobalPlugins(this.getCompilerOptions())}updateGraph(){const e=super.updateGraph();return this.projectService.sendProjectTelemetry(this),e}getExcludedFiles(){return this.excludedFiles}};function Yme(e){return 0===e.projectKind}function Zme(e){return 1===e.projectKind}function ege(e){return 2===e.projectKind}function tge(e){return 3===e.projectKind||4===e.projectKind}function nge(e){return Zme(e)&&!!e.deferredClose}var rge=20971520,ige=4194304,oge="projectsUpdatedInBackground",age="projectLoadingStart",sge="projectLoadingFinish",cge="largeFileReferenced",lge="configFileDiag",_ge="projectLanguageServiceState",uge="projectInfo",dge="openFileInfo",pge="createFileWatcher",fge="createDirectoryWatcher",mge="closeFileWatcher",gge="*ensureProjectForOpenFiles*";function hge(e){const t=new Map;for(const n of e)if("object"==typeof n.type){const e=n.type;e.forEach(e=>{gn.assert("number"==typeof e)}),t.set(n.name,e)}return t}var yge=hge(VO),vge=hge(BO),bge=new Map(Object.entries({none:0,block:1,smart:2})),xge={jquery:{match:/jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i,types:["jquery"]},WinJS:{match:/^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,exclude:[["^",1,"/.*"]],types:["winjs"]},Kendo:{match:/^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i,exclude:[["^",1,"/.*"]],types:["kendo-ui"]},"Office Nuget":{match:/^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,exclude:[["^",1,"/.*"]],types:["office"]},References:{match:/^(.*\/_references\.js)$/i,exclude:[["^",1,"$"]]}};function Sge(e){return it(e.indentStyle)&&(e.indentStyle=bge.get(e.indentStyle.toLowerCase()),gn.assert(void 0!==e.indentStyle)),e}function kge(e){return yge.forEach((t,n)=>{const r=e[n];it(r)&&(e[n]=t.get(r.toLowerCase()))}),e}function Tge(e,t){let n,r;return BO.forEach(i=>{const o=e[i.name];if(void 0===o)return;const a=vge.get(i.name);(n||(n={}))[i.name]=a?it(o)?a.get(o.toLowerCase()):o:Jj(i,o,t||"",r||(r=[]))}),n&&{watchOptions:n,errors:r}}function Cge(e){let t;return oL.forEach(n=>{const r=e[n.name];void 0!==r&&((t||(t={}))[n.name]=r)}),t}function wge(e){return it(e)?Nge(e):e}function Nge(e){switch(e){case"JS":return 1;case"JSX":return 2;case"TS":return 3;case"TSX":return 4;default:return 0}}function Dge(e){const{lazyConfiguredProjectsFromExternalProject:t,...n}=e;return n}var Ege={getFileName:e=>e,getScriptKind:(e,t)=>{let n;if(t){const r=Ro(e);r&&X(t,e=>e.extension===r&&(n=e.scriptKind,!0))}return n},hasMixedContent:(e,t)=>X(t,t=>t.isMixedContent&&Eo(e,t.extension))},Fge={getFileName:e=>e.fileName,getScriptKind:e=>wge(e.scriptKind),hasMixedContent:e=>!!e.hasMixedContent};function Pge(e,t){for(const n of t)if(n.getProjectName()===e)return n}var Age={isKnownTypesPackageName:lt,installPackage:gt,enqueueInstallTypingsRequest:ct,attach:ct,onProjectClosed:ct,globalTypingsCacheLocation:void 0},Ige={close:ct};function Oge(e,t){if(!t)return;const n=t.get(e.path);return void 0!==n?jge(e)?n&&!it(n)?n.get(e.fileName):void 0:it(n)||!n?n:n.get(!1):void 0}function Lge(e){return!!e.containingProjects}function jge(e){return!!e.configFileInfo}var Mge=(e=>(e[e.FindOptimized=0]="FindOptimized",e[e.Find=1]="Find",e[e.CreateReplayOptimized=2]="CreateReplayOptimized",e[e.CreateReplay=3]="CreateReplay",e[e.CreateOptimized=4]="CreateOptimized",e[e.Create=5]="Create",e[e.ReloadOptimized=6]="ReloadOptimized",e[e.Reload=7]="Reload",e))(Mge||{});function Rge(e){return e-1}function Bge(e,t,n,r,i,o,a,s,c){for(var l;;){if(t.parsedCommandLine&&(s&&!t.parsedCommandLine.options.composite||t.parsedCommandLine.options.disableSolutionSearching))return;const _=t.projectService.getConfigFileNameForFile({fileName:t.getConfigFilePath(),path:e.path,configFileInfo:!0,isForDefaultProject:!s},r<=3);if(!_)return;const u=t.projectService.findCreateOrReloadConfiguredProject(_,r,i,o,s?void 0:e.fileName,a,s,c);if(!u)return;!u.project.parsedCommandLine&&(null==(l=t.parsedCommandLine)?void 0:l.options.composite)&&u.project.setPotentialProjectReference(t.canonicalConfigFilePath);const d=n(u);if(d)return d;t=u.project}}function Jge(e,t,n,r,i,o,a,s){const c=t.options.disableReferencedProjectLoad?0:r;let l;return g(t.projectReferences,t=>{var _;const u=_me(iW(t)),d=e.projectService.toCanonicalFileName(u),p=null==s?void 0:s.get(d);if(void 0!==p&&p>=c)return;const f=e.projectService.configFileExistenceInfoCache.get(d);let m=0===c?(null==f?void 0:f.exists)||(null==(_=e.resolvedChildConfigs)?void 0:_.has(d))?f.config.parsedCommandLine:void 0:e.getParsedCommandLine(u);if(m&&c!==r&&c>2&&(m=e.getParsedCommandLine(u)),!m)return;const g=e.projectService.findConfiguredProjectByProjectName(u,o);if(2!==c||f||g){switch(c){case 6:g&&g.projectService.reloadConfiguredProjectOptimized(g,i,a);case 4:(e.resolvedChildConfigs??(e.resolvedChildConfigs=new Set)).add(d);case 2:case 0:if(g||0!==c){const t=n(f??e.projectService.configFileExistenceInfoCache.get(d),g,u,i,e,d);if(t)return t}break;default:gn.assertNever(c)}(s??(s=new Map)).set(d,c),(l??(l=[])).push(m)}})||g(l,t=>t.projectReferences&&Jge(e,t,n,c,i,o,a,s))}function zge(e,t,n,r,i){let o,a=!1;switch(t){case 2:case 3:Xge(e)&&(o=e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath));break;case 4:if(o=Gge(e),o)break;case 5:a=function(e,t){if(t){if(Hge(e,t,!1))return!0}else Kge(e);return!1}(e,n);break;case 6:if(e.projectService.reloadConfiguredProjectOptimized(e,r,i),o=Gge(e),o)break;case 7:a=e.projectService.reloadConfiguredProjectClearingSemanticCache(e,r,i);break;case 0:case 1:break;default:gn.assertNever(t)}return{project:e,sentConfigFileDiag:a,configFileExistenceInfo:o,reason:r}}function qge(e,t){return e.initialLoadPending?(e.potentialProjectReferences&&ud(e.potentialProjectReferences,t))??(e.resolvedChildConfigs&&ud(e.resolvedChildConfigs,t)):void 0}function Uge(e,t,n){const r=n&&e.projectService.configuredProjects.get(n);return r&&t(r)}function Vge(e,t){return function(e,t,n,r){return e.getCurrentProgram()?e.forEachResolvedProjectReference(t):e.initialLoadPending?qge(e,r):g(e.getProjectReferences(),n)}(e,n=>Uge(e,t,n.sourceFile.path),n=>Uge(e,t,e.toPath(iW(n))),n=>Uge(e,t,n))}function Wge(e,t){return`${it(t)?`Config: ${t} `:t?`Project: ${t.getProjectName()} `:""}WatchType: ${e}`}function $ge(e){return!e.isScriptOpen()&&void 0!==e.mTime}function Kge(e){return e.invalidateResolutionsOfFailedLookupLocations(),e.dirty&&!e.updateGraph()}function Hge(e,t,n){if(!n&&(e.invalidateResolutionsOfFailedLookupLocations(),!e.dirty))return!1;e.triggerFileForConfigFileDiag=t;const r=e.pendingUpdateLevel;if(e.updateGraph(),!e.triggerFileForConfigFileDiag&&!n)return 2===r;const i=e.projectService.sendConfigFileDiagEvent(e,t,n);return e.triggerFileForConfigFileDiag=void 0,i}function Gge(e){const t=_me(e.getConfigFilePath()),n=e.projectService.ensureParsedConfigUptoDate(t,e.canonicalConfigFilePath,e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath),e),r=n.config.parsedCommandLine;if(e.parsedCommandLine=r,e.resolvedChildConfigs=void 0,e.updateReferences(r.projectReferences),Xge(e))return n}function Xge(e){return!(!e.parsedCommandLine||!e.parsedCommandLine.options.composite&&!wj(e.parsedCommandLine))}function Qge(e){return`User requested reload projects: ${e}`}function Yge(e){Zme(e)&&(e.projectOptions=!0)}function Zge(e){let t=1;return()=>e(t++)}function ehe(){return{idToCallbacks:new Map,pathToId:new Map}}function the(e,t){return!!t&&!!e.eventHandler&&!!e.session}function nhe(e,t){if(!the(e,t))return;const n=ehe(),r=ehe(),i=ehe();let o=1;return e.session.addProtocolHandler("watchChange",e=>{var t;return nt(t=e.arguments)?t.forEach(s):s(t),{responseRequired:!1}}),{watchFile:function(e,t){return a(n,e,t,t=>({eventName:pge,data:{id:t,path:e}}))},watchDirectory:function(e,t,n){return a(n?i:r,e,t,t=>({eventName:fge,data:{id:t,path:e,recursive:!!n,ignoreUpdate:!e.endsWith("/node_modules")||void 0}}))},getCurrentDirectory:()=>e.host.getCurrentDirectory(),useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames};function a({pathToId:t,idToCallbacks:n},r,i,a){const s=e.toPath(r);let c=t.get(s);c||t.set(s,c=o++);let l=n.get(c);return l||(n.set(c,l=new Set),e.eventHandler(a(c))),l.add(i),{close(){const r=n.get(c);(null==r?void 0:r.delete(i))&&(r.size||(n.delete(c),t.delete(s),e.eventHandler({eventName:mge,data:{id:c}})))}}}function s({id:e,created:t,deleted:n,updated:r}){c(e,t,0),c(e,n,2),c(e,r,1)}function c(e,t,o){(null==t?void 0:t.length)&&(l(n,e,t,(e,t)=>e(t,o)),l(r,e,t,(e,t)=>e(t)),l(i,e,t,(e,t)=>e(t)))}function l(e,t,n,r){var i;null==(i=e.idToCallbacks.get(t))||i.forEach(e=>{n.forEach(t=>r(e,zo(t)))})}}var rhe=class e{constructor(e){var t;this.filenameToScriptInfo=new Map,this.nodeModulesWatchers=new Map,this.filenameToScriptInfoVersion=new Map,this.allJsFilesForOpenFileTelemetry=new Set,this.externalProjectToConfiguredProjectMap=new Map,this.externalProjects=[],this.inferredProjects=[],this.configuredProjects=new Map,this.newInferredProjectName=Zge(mme),this.newAutoImportProviderProjectName=Zge(gme),this.newAuxiliaryProjectName=Zge(hme),this.openFiles=new Map,this.configFileForOpenFiles=new Map,this.rootOfInferredProjects=new Set,this.openFilesWithNonRootedDiskPath=new Map,this.compilerOptionsForInferredProjectsPerProjectRoot=new Map,this.watchOptionsForInferredProjectsPerProjectRoot=new Map,this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map,this.projectToSizeMap=new Map,this.configFileExistenceInfoCache=new Map,this.safelist=xge,this.legacySafelist=new Map,this.pendingProjectUpdates=new Map,this.pendingEnsureProjectForOpenFiles=!1,this.seenProjects=new Map,this.sharedExtendedConfigFileWatchers=new Map,this.extendedConfigCache=new Map,this.baseline=ct,this.verifyDocumentRegistry=ct,this.verifyProgram=ct,this.onProjectCreation=ct,this.host=e.host,this.logger=e.logger,this.cancellationToken=e.cancellationToken,this.useSingleInferredProject=e.useSingleInferredProject,this.useInferredProjectPerProjectRoot=e.useInferredProjectPerProjectRoot,this.typingsInstaller=e.typingsInstaller||Age,this.throttleWaitMilliseconds=e.throttleWaitMilliseconds,this.eventHandler=e.eventHandler,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.globalPlugins=e.globalPlugins||sme,this.pluginProbeLocations=e.pluginProbeLocations||sme,this.allowLocalPluginLoads=!!e.allowLocalPluginLoads,this.typesMapLocation=void 0===e.typesMapLocation?Uo(Lo(this.getExecutingFilePath()),"typesMap.json"):e.typesMapLocation,this.session=e.session,this.jsDocParsingMode=e.jsDocParsingMode,void 0!==e.serverMode?this.serverMode=e.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=Qe()),this.currentDirectory=_me(this.host.getCurrentDirectory()),this.toCanonicalFileName=Xt(this.host.useCaseSensitiveFileNames),this.globalCacheLocationDirectoryPath=this.typingsInstaller.globalTypingsCacheLocation?Yo(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)):void 0,this.throttledOperations=new vme(this.host,this.logger),this.logger.info(`currentDirectory:: ${this.host.getCurrentDirectory()} useCaseSensitiveFileNames:: ${this.host.useCaseSensitiveFileNames}`),this.logger.info(`libs Location:: ${Lo(this.host.getExecutingFilePath())}`),this.logger.info(`globalTypingsCacheLocation:: ${this.typingsInstaller.globalTypingsCacheLocation}`),this.typesMapLocation?this.loadTypesMap():this.logger.info("No types map provided; using the default"),this.typingsInstaller.attach(this),this.hostConfiguration={formatCodeOptions:HG(this.host.newLine),preferences:JG,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=e1(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);const n=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0,r=0!==n?e=>this.logger.info(e):ct;this.packageJsonCache=che(this),this.watchFactory=0!==this.serverMode?{watchFile:q$,watchDirectory:q$}:XU(nhe(this,e.canUseWatchEvents)||this.host,n,r,Wge),this.canUseWatchEvents=the(this,e.canUseWatchEvents),null==(t=e.incrementalVerifier)||t.call(e,this)}toPath(e){return Xo(e,this.currentDirectory,this.toCanonicalFileName)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(e){return $o(e,this.host.getCurrentDirectory())}setDocument(e,t,n){gn.checkDefined(this.getScriptInfoForPath(t)).cacheSourceFile={key:e,sourceFile:n}}getDocument(e,t){const n=this.getScriptInfoForPath(t);return n&&n.cacheSourceFile&&n.cacheSourceFile.key===e?n.cacheSourceFile.sourceFile:void 0}ensureInferredProjectsUpToDate_TestOnly(){this.ensureProjectStructuresUptoDate()}getCompilerOptionsForInferredProjects(){return this.compilerOptionsForInferredProjects}onUpdateLanguageServiceStateForProject(e,t){if(!this.eventHandler)return;const n={eventName:_ge,data:{project:e,languageServiceEnabled:t}};this.eventHandler(n)}loadTypesMap(){try{const e=this.host.readFile(this.typesMapLocation);if(void 0===e)return void this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`);const t=JSON.parse(e);for(const e of Object.keys(t.typesMap))t.typesMap[e].match=new RegExp(t.typesMap[e].match,"i");this.safelist=t.typesMap;for(const e in t.simpleMap)Ie(t.simpleMap,e)&&this.legacySafelist.set(e,t.simpleMap[e].toLowerCase())}catch(e){this.logger.info(`Error loading types map: ${e}`),this.safelist=xge,this.legacySafelist.clear()}}updateTypingsForProject(e){const t=this.findProject(e.projectName);if(t)switch(e.kind){case uG:return void t.updateTypingFiles(e.compilerOptions,e.typeAcquisition,e.unresolvedImports,e.typings);case dG:return void t.enqueueInstallTypingsForProject(!0)}}watchTypingLocations(e){var t;null==(t=this.findProject(e.projectName))||t.watchTypingLocations(e.files)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule(gge,2500,()=>{0!==this.pendingProjectUpdates.size?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())}))}delayUpdateProjectGraph(e){if(nge(e))return;if(e.markAsDirty(),tge(e))return;const t=e.getProjectName();this.pendingProjectUpdates.set(t,e),this.throttledOperations.schedule(t,250,()=>{this.pendingProjectUpdates.delete(t)&&Kge(e)})}hasPendingProjectUpdate(e){return this.pendingProjectUpdates.has(e.getProjectName())}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;const e={eventName:oge,data:{openFiles:Be(this.openFiles.keys(),e=>this.getScriptInfoForPath(e).fileName)}};this.eventHandler(e)}sendLargeFileReferencedEvent(e,t){if(!this.eventHandler)return;const n={eventName:cge,data:{file:e,fileSize:t,maxFileSize:ige}};this.eventHandler(n)}sendProjectLoadingStartEvent(e,t){if(!this.eventHandler)return;e.sendLoadingProjectFinish=!0;const n={eventName:age,data:{project:e,reason:t}};this.eventHandler(n)}sendProjectLoadingFinishEvent(e){if(!this.eventHandler||!e.sendLoadingProjectFinish)return;e.sendLoadingProjectFinish=!1;const t={eventName:sge,data:{project:e}};this.eventHandler(t)}sendPerformanceEvent(e,t){this.performanceEventHandler&&this.performanceEventHandler({kind:e,durationMs:t})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(e){this.delayUpdateProjectGraph(e),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectGraphs(e,t){if(e.length){for(const n of e)t&&n.clearSourceMapperCache(),this.delayUpdateProjectGraph(n);this.delayEnsureProjectForOpenFiles()}}setCompilerOptionsForInferredProjects(e,t){gn.assert(void 0===t||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");const n=kge(e),r=Tge(e,t),i=Cge(e);n.allowNonTsExtensions=!0;const o=t&&this.toCanonicalFileName(t);o?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(o,n),this.watchOptionsForInferredProjectsPerProjectRoot.set(o,r||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(o,i)):(this.compilerOptionsForInferredProjects=n,this.watchOptionsForInferredProjects=r,this.typeAcquisitionForInferredProjects=i);for(const e of this.inferredProjects)(o?e.projectRootPath!==o:e.projectRootPath&&this.compilerOptionsForInferredProjectsPerProjectRoot.has(e.projectRootPath))||(e.setCompilerOptions(n),e.setTypeAcquisition(i),e.setWatchOptions(null==r?void 0:r.watchOptions),e.setProjectErrors(null==r?void 0:r.errors),e.compileOnSaveEnabled=n.compileOnSave,e.markAsDirty(),this.delayUpdateProjectGraph(e));this.delayEnsureProjectForOpenFiles()}findProject(e){if(void 0!==e)return fme(e)?Pge(e,this.inferredProjects):this.findExternalProjectByProjectName(e)||this.findConfiguredProjectByProjectName(_me(e))}forEachProject(e){this.externalProjects.forEach(e),this.configuredProjects.forEach(e),this.inferredProjects.forEach(e)}forEachEnabledProject(e){this.forEachProject(t=>{!t.isOrphan()&&t.languageServiceEnabled&&e(t)})}getDefaultProjectForFile(e,t){return t?this.ensureDefaultProjectForFile(e):this.tryGetDefaultProjectForFile(e)}tryGetDefaultProjectForFile(e){const t=it(e)?this.getScriptInfoForNormalizedPath(e):e;return t&&!t.isOrphan()?t.getDefaultProject():void 0}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e){var t;const n=it(e)?this.getScriptInfoForNormalizedPath(e):e;if(n)return(null==(t=this.pendingOpenFileProjectUpdates)?void 0:t.delete(n.path))&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(n,5),n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,this.openFiles.get(n.path))),this.tryGetDefaultProjectForFile(n)}ensureDefaultProjectForFile(e){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e)||this.doEnsureDefaultProjectForFile(e)}doEnsureDefaultProjectForFile(e){this.ensureProjectStructuresUptoDate();const t=it(e)?this.getScriptInfoForNormalizedPath(e):e;return t?t.getDefaultProject():(this.logErrorForScriptInfoNotFound(it(e)?e:e.fileName),ime.ThrowNoProject())}getScriptInfoEnsuringProjectsUptoDate(e){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(e)}ensureProjectStructuresUptoDate(){let e=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();const t=t=>{e=Kge(t)||e};this.externalProjects.forEach(t),this.configuredProjects.forEach(t),this.inferredProjects.forEach(t),e&&this.ensureProjectForOpenFiles()}getFormatCodeOptions(e){const t=this.getScriptInfoForNormalizedPath(e);return t&&t.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}getPreferences(e){const t=this.getScriptInfoForNormalizedPath(e);return{...this.hostConfiguration.preferences,...t&&t.getPreferences()}}getHostFormatCodeOptions(){return this.hostConfiguration.formatCodeOptions}getHostPreferences(){return this.hostConfiguration.preferences}onSourceFileChanged(e,t){gn.assert(!e.isScriptOpen()),2===t?this.handleDeletedFile(e,!0):(e.deferredDelete&&(e.deferredDelete=void 0),e.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e))}handleSourceMapProjects(e){if(e.sourceMapFilePath)if(it(e.sourceMapFilePath)){const t=this.getScriptInfoForPath(e.sourceMapFilePath);this.delayUpdateSourceInfoProjects(null==t?void 0:t.sourceInfos)}else this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos);this.delayUpdateSourceInfoProjects(e.sourceInfos),e.declarationInfoPath&&this.delayUpdateProjectsOfScriptInfoPath(e.declarationInfoPath)}delayUpdateSourceInfoProjects(e){e&&e.forEach((e,t)=>this.delayUpdateProjectsOfScriptInfoPath(t))}delayUpdateProjectsOfScriptInfoPath(e){const t=this.getScriptInfoForPath(e);t&&this.delayUpdateProjectGraphs(t.containingProjects,!0)}handleDeletedFile(e,t){gn.assert(!e.isScriptOpen()),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e),e.detachAllProjects(),t?(e.delayReloadNonMixedContentFile(),e.deferredDelete=!0):this.deleteScriptInfo(e)}watchWildcardDirectory(e,t,n,r){let i=this.watchFactory.watchDirectory(e,t=>this.onWildCardDirectoryWatcherInvoke(e,n,r,o,t),t,this.getWatchOptionsFromProjectWatchOptions(r.parsedCommandLine.watchOptions,Lo(n)),V$.WildcardDirectory,n);const o={packageJsonWatches:void 0,close(){var e;i&&(i.close(),i=void 0,null==(e=o.packageJsonWatches)||e.forEach(e=>{e.projects.delete(o),e.close()}),o.packageJsonWatches=void 0)}};return o}onWildCardDirectoryWatcherInvoke(e,t,n,r,i){const o=this.toPath(i),a=n.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(i,o);if("package.json"===jo(o)&&!YZ(o)&&(a&&a.fileExists||!a&&this.host.fileExists(i))){const e=this.getNormalizedAbsolutePath(i);this.logger.info(`Config: ${t} Detected new package.json: ${e}`),this.packageJsonCache.addOrUpdate(e,o),this.watchPackageJsonFile(e,o,r)}(null==a?void 0:a.fileExists)||this.sendSourceFileChange(o);const s=this.findConfiguredProjectByProjectName(t);KU({watchedDirPath:this.toPath(e),fileOrDirectory:i,fileOrDirectoryPath:o,configFileName:t,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:n.parsedCommandLine.options,program:(null==s?void 0:s.getCurrentProgram())||n.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:e=>this.logger.info(e),toPath:e=>this.toPath(e),getScriptKind:s?e=>s.getScriptKind(e):void 0})||(2!==n.updateLevel&&(n.updateLevel=1),n.projects.forEach((e,n)=>{var r;if(!e)return;const i=this.getConfiguredProjectByCanonicalConfigFilePath(n);if(!i)return;if(s!==i&&this.getHostPreferences().includeCompletionsForModuleExports){const e=this.toPath(t);T(null==(r=i.getCurrentProgram())?void 0:r.getResolvedProjectReferences(),t=>(null==t?void 0:t.sourceFile.path)===e)&&i.markAutoImportProviderAsDirty()}const a=s===i?1:0;if(!(i.pendingUpdateLevel>a))if(this.openFiles.has(o)){if(gn.checkDefined(this.getScriptInfoForPath(o)).isAttached(i)){const e=Math.max(a,i.openFileWatchTriggered.get(o)||0);i.openFileWatchTriggered.set(o,e)}else i.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(i)}else i.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(i)}))}delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,t){const n=this.configFileExistenceInfoCache.get(e);if(!(null==n?void 0:n.config))return!1;let r=!1;return n.config.updateLevel=2,n.config.cachedDirectoryStructureHost.clearCache(),n.config.projects.forEach((n,i)=>{var o,a,s;const c=this.getConfiguredProjectByCanonicalConfigFilePath(i);if(c)if(r=!0,i===e){if(c.initialLoadPending)return;c.pendingUpdateLevel=2,c.pendingUpdateReason=t,this.delayUpdateProjectGraph(c),c.markAutoImportProviderAsDirty()}else{if(c.initialLoadPending)return void(null==(a=null==(o=this.configFileExistenceInfoCache.get(i))?void 0:o.openFilesImpactedByConfigFile)||a.forEach(e=>{var t;(null==(t=this.pendingOpenFileProjectUpdates)?void 0:t.has(e))||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(e,this.configFileForOpenFiles.get(e))}));const t=this.toPath(e);c.resolutionCache.removeResolutionsFromProjectReferenceRedirects(t),this.delayUpdateProjectGraph(c),this.getHostPreferences().includeCompletionsForModuleExports&&T(null==(s=c.getCurrentProgram())?void 0:s.getResolvedProjectReferences(),e=>(null==e?void 0:e.sourceFile.path)===t)&&c.markAutoImportProviderAsDirty()}}),r}onConfigFileChanged(e,t,n){const r=this.configFileExistenceInfoCache.get(t),i=this.getConfiguredProjectByCanonicalConfigFilePath(t),o=null==i?void 0:i.deferredClose;2===n?(r.exists=!1,i&&(i.deferredClose=!0)):(r.exists=!0,o&&(i.deferredClose=void 0,i.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(t,"Change in config file detected"),this.openFiles.forEach((e,t)=>{var n,i;const o=this.configFileForOpenFiles.get(t);if(!(null==(n=r.openFilesImpactedByConfigFile)?void 0:n.has(t)))return;this.configFileForOpenFiles.delete(t);const a=this.getScriptInfoForPath(t);this.getConfigFileNameForFile(a,!1)&&((null==(i=this.pendingOpenFileProjectUpdates)?void 0:i.has(t))||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(t,o))}),this.delayEnsureProjectForOpenFiles()}removeProject(e){switch(this.logger.info("`remove Project::"),e.print(!0,!0,!1),e.close(),gn.shouldAssert(1)&&this.filenameToScriptInfo.forEach(t=>gn.assert(!t.isAttached(e),"Found script Info still attached to project",()=>`${e.projectName}: ScriptInfos still attached: ${JSON.stringify(Be(V(this.filenameToScriptInfo.values(),t=>t.isAttached(e)?{fileName:t.fileName,projects:t.containingProjects.map(e=>e.projectName),hasMixedContent:t.hasMixedContent}:void 0)),void 0," ")}`)),this.pendingProjectUpdates.delete(e.getProjectName()),e.projectKind){case 2:Gt(this.externalProjects,e),this.projectToSizeMap.delete(e.getProjectName());break;case 1:this.configuredProjects.delete(e.canonicalConfigFilePath),this.projectToSizeMap.delete(e.canonicalConfigFilePath);break;case 0:Gt(this.inferredProjects,e)}}assignOrphanScriptInfoToInferredProject(e,t){gn.assert(e.isOrphan());const n=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(e.isDynamic?t||this.currentDirectory:Lo(ko(e.fileName)?e.fileName:$o(e.fileName,t?this.getNormalizedAbsolutePath(t):this.currentDirectory)));if(n.addRoot(e),e.containingProjects[0]!==n&&($t(e.containingProjects,n),e.containingProjects.unshift(n)),n.updateGraph(),!this.useSingleInferredProject&&!n.projectRootPath)for(const e of this.inferredProjects){if(e===n||e.isOrphan())continue;const t=e.getRootScriptInfos();gn.assert(1===t.length||!!e.projectRootPath),1===t.length&&g(t[0].containingProjects,e=>e!==t[0].containingProjects[0]&&!e.isOrphan())&&e.removeFile(t[0],!0,!0)}return n}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,e)})}closeOpenFile(e,t){var n;const r=!e.isDynamic&&this.host.fileExists(e.fileName);e.close(r),this.stopWatchingConfigFilesForScriptInfo(e);const i=this.toCanonicalFileName(e.fileName);this.openFilesWithNonRootedDiskPath.get(i)===e&&this.openFilesWithNonRootedDiskPath.delete(i);let o=!1;for(const t of e.containingProjects){if(Zme(t)){e.hasMixedContent&&e.registerFileUpdate();const n=t.openFileWatchTriggered.get(e.path);void 0!==n&&(t.openFileWatchTriggered.delete(e.path),t.pendingUpdateLevelthis.onConfigFileChanged(e,t,r),2e3,this.getWatchOptionsFromProjectWatchOptions(null==(i=null==(r=null==o?void 0:o.config)?void 0:r.parsedCommandLine)?void 0:i.watchOptions,Lo(e)),V$.ConfigFile,n)),this.ensureConfigFileWatcherForProject(o,n)}ensureConfigFileWatcherForProject(e,t){const n=e.config.projects;n.set(t.canonicalConfigFilePath,n.get(t.canonicalConfigFilePath)||!1)}releaseParsedConfig(e,t){var n,r,i;const o=this.configFileExistenceInfoCache.get(e);(null==(n=o.config)?void 0:n.projects.delete(t.canonicalConfigFilePath))&&((null==(r=o.config)?void 0:r.projects.size)||(o.config=void 0,UU(e,this.sharedExtendedConfigFileWatchers),gn.checkDefined(o.watcher),(null==(i=o.openFilesImpactedByConfigFile)?void 0:i.size)?o.inferredProjectRoots?a$(Lo(e))||(o.watcher.close(),o.watcher=Ige):(o.watcher.close(),o.watcher=void 0):(o.watcher.close(),this.configFileExistenceInfoCache.delete(e))))}stopWatchingConfigFilesForScriptInfo(e){if(0!==this.serverMode)return;const t=this.rootOfInferredProjects.delete(e),n=e.isScriptOpen();n&&!t||this.forEachConfigFileLocation(e,r=>{var i,o,a;const s=this.configFileExistenceInfoCache.get(r);if(s){if(n){if(!(null==(i=null==s?void 0:s.openFilesImpactedByConfigFile)?void 0:i.has(e.path)))return}else if(!(null==(o=s.openFilesImpactedByConfigFile)?void 0:o.delete(e.path)))return;t&&(s.inferredProjectRoots--,!s.watcher||s.config||s.inferredProjectRoots||(s.watcher.close(),s.watcher=void 0)),(null==(a=s.openFilesImpactedByConfigFile)?void 0:a.size)||s.config||(gn.assert(!s.watcher),this.configFileExistenceInfoCache.delete(r))}})}startWatchingConfigFilesForInferredProjectRoot(e){0===this.serverMode&&(gn.assert(e.isScriptOpen()),this.rootOfInferredProjects.add(e),this.forEachConfigFileLocation(e,(t,n)=>{let r=this.configFileExistenceInfoCache.get(t);r?r.inferredProjectRoots=(r.inferredProjectRoots??0)+1:(r={exists:this.host.fileExists(n),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(t,r)),(r.openFilesImpactedByConfigFile??(r.openFilesImpactedByConfigFile=new Set)).add(e.path),r.watcher||(r.watcher=a$(Lo(t))?this.watchFactory.watchFile(n,(e,r)=>this.onConfigFileChanged(n,t,r),2e3,this.hostConfiguration.watchOptions,V$.ConfigFileForInferredRoot):Ige)}))}forEachConfigFileLocation(e,t){if(0!==this.serverMode)return;gn.assert(!Lge(e)||this.openFiles.has(e.path));const n=this.openFiles.get(e.path);if(gn.checkDefined(this.getScriptInfo(e.path)).isDynamic)return;let r=Lo(e.fileName);const i=()=>sa(n,r,this.currentDirectory,!this.host.useCaseSensitiveFileNames),o=!n||!i();let a=!0,s=!0;jge(e)&&(a=!qt(e.fileName,"tsconfig.json")&&(s=!1));do{const e=ume(r,this.currentDirectory,this.toCanonicalFileName);if(a){const n=dme(Uo(r,"tsconfig.json"));if(t(Uo(e,"tsconfig.json"),n))return n}if(s){const n=dme(Uo(r,"jsconfig.json"));if(t(Uo(e,"jsconfig.json"),n))return n}if(ma(e))break;const n=dme(Lo(r));if(n===r)break;r=n,a=s=!0}while(o||i())}findDefaultConfiguredProject(e){var t;return null==(t=this.findDefaultConfiguredProjectWorker(e,1))?void 0:t.defaultProject}findDefaultConfiguredProjectWorker(e,t){return e.isScriptOpen()?this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t):void 0}getConfigFileNameForFileFromCache(e,t){if(t){const t=Oge(e,this.pendingOpenFileProjectUpdates);if(void 0!==t)return t}return Oge(e,this.configFileForOpenFiles)}setConfigFileNameForFileInCache(e,t){if(!this.openFiles.has(e.path))return;const n=t||!1;if(jge(e)){let t=this.configFileForOpenFiles.get(e.path);t&&!it(t)||this.configFileForOpenFiles.set(e.path,t=(new Map).set(!1,t)),t.set(e.fileName,n)}else this.configFileForOpenFiles.set(e.path,n)}getConfigFileNameForFile(e,t){const n=this.getConfigFileNameForFileFromCache(e,t);if(void 0!==n)return n||void 0;if(t)return;const r=this.forEachConfigFileLocation(e,(t,n)=>this.configFileExists(n,t,e));return this.logger.info(`getConfigFileNameForFile:: File: ${e.fileName} ProjectRootPath: ${this.openFiles.get(e.path)}:: Result: ${r}`),this.setConfigFileNameForFileInCache(e,r),r}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.externalProjects.forEach(ahe),this.configuredProjects.forEach(ahe),this.inferredProjects.forEach(ahe),this.logger.info("Open files: "),this.openFiles.forEach((e,t)=>{const n=this.getScriptInfoForPath(t);this.logger.info(`\tFileName: ${n.fileName} ProjectRootPath: ${e}`),this.logger.info(`\t\tProjects: ${n.containingProjects.map(e=>e.getProjectName())}`)}),this.logger.endGroup())}findConfiguredProjectByProjectName(e,t){const n=this.toCanonicalFileName(e),r=this.getConfiguredProjectByCanonicalConfigFilePath(n);return t?r:(null==r?void 0:r.deferredClose)?void 0:r}getConfiguredProjectByCanonicalConfigFilePath(e){return this.configuredProjects.get(e)}findExternalProjectByProjectName(e){return Pge(e,this.externalProjects)}getFilenameForExceededTotalSizeLimitForNonTsFiles(e,t,n,r){if(t&&t.disableSizeLimit||!this.host.getFileSize)return;let i=rge;this.projectToSizeMap.set(e,0),this.projectToSizeMap.forEach(e=>i-=e||0);let o=0;for(const e of n){const t=r.getFileName(e);if(!Uk(t)&&(o+=this.host.getFileSize(t),o>rge||o>i)){const e=n.map(e=>r.getFileName(e)).filter(e=>!Uk(e)).map(e=>({name:e,size:this.host.getFileSize(e)})).sort((e,t)=>t.size-e.size).slice(0,5);return this.logger.info(`Non TS file size exceeded limit (${o}). Largest files: ${e.map(e=>`${e.name}:${e.size}`).join(", ")}`),t}}this.projectToSizeMap.set(e,o)}createExternalProject(e,t,n,r,i){const o=kge(n),a=Tge(n,Lo(zo(e))),s=new Qme(e,this,o,this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e,o,t,Fge),void 0===n.compileOnSave||n.compileOnSave,void 0,null==a?void 0:a.watchOptions);return s.setProjectErrors(null==a?void 0:a.errors),s.excludedFiles=i,this.addFilesToNonInferredProject(s,t,Fge,r),this.externalProjects.push(s),s}sendProjectTelemetry(e){if(this.seenProjects.has(e.projectName))return void Yge(e);if(this.seenProjects.set(e.projectName,!0),!this.eventHandler||!this.host.createSHA256Hash)return void Yge(e);const t=Zme(e)?e.projectOptions:void 0;Yge(e);const n={projectId:this.host.createSHA256Hash(e.projectName),fileStats:Bme(e.getScriptInfos(),!0),compilerOptions:oM(e.getCompilationSettings()),typeAcquisition:function({enable:e,include:t,exclude:n}){return{enable:e,include:void 0!==t&&0!==t.length,exclude:void 0!==n&&0!==n.length}}(e.getTypeAcquisition()),extends:t&&t.configHasExtendsProperty,files:t&&t.configHasFilesProperty,include:t&&t.configHasIncludeProperty,exclude:t&&t.configHasExcludeProperty,compileOnSave:e.compileOnSaveEnabled,configFileName:function(){if(!Zme(e))return"other";return xme(e.getConfigFilePath())||"other"}(),projectType:e instanceof Qme?"external":"configured",languageServiceEnabled:e.languageServiceEnabled,version:u};this.eventHandler({eventName:uge,data:n})}addFilesToNonInferredProject(e,t,n,r){this.updateNonInferredProjectFiles(e,t,n),e.setTypeAcquisition(r),e.markAsDirty()}createConfiguredProject(e,t){var n;null==(n=Yn)||n.instant(Yn.Phase.Session,"createConfiguredProject",{configFilePath:e});const r=this.toCanonicalFileName(e);let i=this.configFileExistenceInfoCache.get(r);i?i.exists=!0:this.configFileExistenceInfoCache.set(r,i={exists:!0}),i.config||(i.config={cachedDirectoryStructureHost:JU(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});const o=new Xme(e,r,this,i.config.cachedDirectoryStructureHost,t);return gn.assert(!this.configuredProjects.has(r)),this.configuredProjects.set(r,o),this.createConfigFileWatcherForParsedConfig(e,r,o),o}loadConfiguredProject(e,t){var n,r;null==(n=Yn)||n.push(Yn.Phase.Session,"loadConfiguredProject",{configFilePath:e.canonicalConfigFilePath}),this.sendProjectLoadingStartEvent(e,t);const i=_me(e.getConfigFilePath()),o=this.ensureParsedConfigUptoDate(i,e.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath),e),a=o.config.parsedCommandLine;gn.assert(!!a.fileNames);const s=a.options;e.projectOptions||(e.projectOptions={configHasExtendsProperty:void 0!==a.raw.extends,configHasFilesProperty:void 0!==a.raw.files,configHasIncludeProperty:void 0!==a.raw.include,configHasExcludeProperty:void 0!==a.raw.exclude}),e.parsedCommandLine=a,e.setProjectErrors(a.options.configFile.parseDiagnostics),e.updateReferences(a.projectReferences);const c=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.canonicalConfigFilePath,s,a.fileNames,Ege);c?(e.disableLanguageService(c),this.configFileExistenceInfoCache.forEach((t,n)=>this.stopWatchingWildCards(n,e))):(e.setCompilerOptions(s),e.setWatchOptions(a.watchOptions),e.enableLanguageService(),this.watchWildcards(i,o,e)),e.enablePluginsWithOptions(s);const l=a.fileNames.concat(e.getExternalFiles(2));this.updateRootAndOptionsOfNonInferredProject(e,l,Ege,s,a.typeAcquisition,a.compileOnSave,a.watchOptions),null==(r=Yn)||r.pop()}ensureParsedConfigUptoDate(e,t,n,r){var i,o,a;if(n.config&&(1===n.config.updateLevel&&this.reloadFileNamesOfParsedConfig(e,n.config),!n.config.updateLevel))return this.ensureConfigFileWatcherForProject(n,r),n;if(!n.exists&&n.config)return n.config.updateLevel=void 0,this.ensureConfigFileWatcherForProject(n,r),n;const s=(null==(i=n.config)?void 0:i.cachedDirectoryStructureHost)||JU(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),c=PL(e,e=>this.host.readFile(e)),l=pO(e,it(c)?c:""),_=l.parseDiagnostics;it(c)||_.push(c);const u=Lo(e),d=uj(l,s,u,void 0,e,void 0,this.hostConfiguration.extraFileExtensions,this.extendedConfigCache);d.errors.length&&_.push(...d.errors),this.logger.info(`Config: ${e} : ${JSON.stringify({rootNames:d.fileNames,options:d.options,watchOptions:d.watchOptions,projectReferences:d.projectReferences},void 0," ")}`);const p=null==(o=n.config)?void 0:o.parsedCommandLine;return n.config?(n.config.parsedCommandLine=d,n.config.watchedDirectoriesStale=!0,n.config.updateLevel=void 0):n.config={parsedCommandLine:d,cachedDirectoryStructureHost:s,projects:new Map},p||ST(this.getWatchOptionsFromProjectWatchOptions(void 0,u),this.getWatchOptionsFromProjectWatchOptions(d.watchOptions,u))||(null==(a=n.watcher)||a.close(),n.watcher=void 0),this.createConfigFileWatcherForParsedConfig(e,t,r),qU(t,d.options,this.sharedExtendedConfigFileWatchers,(t,n)=>this.watchFactory.watchFile(t,()=>{var e;VU(this.extendedConfigCache,n,e=>this.toPath(e));let r=!1;null==(e=this.sharedExtendedConfigFileWatchers.get(n))||e.projects.forEach(e=>{r=this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,`Change in extended config file ${t} detected`)||r}),r&&this.delayEnsureProjectForOpenFiles()},2e3,this.hostConfiguration.watchOptions,V$.ExtendedConfigFile,e),e=>this.toPath(e)),n}watchWildcards(e,{exists:t,config:n},r){if(n.projects.set(r.canonicalConfigFilePath,!0),t){if(n.watchedDirectories&&!n.watchedDirectoriesStale)return;n.watchedDirectoriesStale=!1,$U(n.watchedDirectories||(n.watchedDirectories=new Map),n.parsedCommandLine.wildcardDirectories,(t,r)=>this.watchWildcardDirectory(t,r,e,n))}else{if(n.watchedDirectoriesStale=!1,!n.watchedDirectories)return;vx(n.watchedDirectories,YU),n.watchedDirectories=void 0}}stopWatchingWildCards(e,t){const n=this.configFileExistenceInfoCache.get(e);n.config&&n.config.projects.get(t.canonicalConfigFilePath)&&(n.config.projects.set(t.canonicalConfigFilePath,!1),_d(n.config.projects,dt)||(n.config.watchedDirectories&&(vx(n.config.watchedDirectories,YU),n.config.watchedDirectories=void 0),n.config.watchedDirectoriesStale=void 0))}updateNonInferredProjectFiles(e,t,n){var r;const i=e.getRootFilesMap(),o=new Map;for(const a of t){const t=n.getFileName(a),s=_me(t);let c;if(Ome(s)||e.fileExists(t)){const t=n.getScriptKind(a,this.hostConfiguration.extraFileExtensions),r=n.hasMixedContent(a,this.hostConfiguration.extraFileExtensions),o=gn.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(s,e.currentDirectory,t,r,e.directoryStructureHost,!1));c=o.path;const l=i.get(c);l&&l.info===o?l.fileName=s:(e.addRoot(o,s),o.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(o))}else{c=ume(s,this.currentDirectory,this.toCanonicalFileName);const t=i.get(c);t?((null==(r=t.info)?void 0:r.path)===c&&(e.removeFile(t.info,!1,!0),t.info=void 0),t.fileName=s):i.set(c,{fileName:s})}o.set(c,!0)}i.size>o.size&&i.forEach((t,n)=>{o.has(n)||(t.info?e.removeFile(t.info,e.fileExists(t.info.fileName),!0):i.delete(n))})}updateRootAndOptionsOfNonInferredProject(e,t,n,r,i,o,a){e.setCompilerOptions(r),e.setWatchOptions(a),void 0!==o&&(e.compileOnSaveEnabled=o),this.addFilesToNonInferredProject(e,t,n,i)}reloadFileNamesOfConfiguredProject(e){const t=this.reloadFileNamesOfParsedConfig(e.getConfigFilePath(),this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath).config);return e.updateErrorOnNoInputFiles(t),this.updateNonInferredProjectFiles(e,t.fileNames.concat(e.getExternalFiles(1)),Ege),e.markAsDirty(),e.updateGraph()}reloadFileNamesOfParsedConfig(e,t){if(void 0===t.updateLevel)return t.parsedCommandLine;gn.assert(1===t.updateLevel);const n=Kj(t.parsedCommandLine.options.configFile.configFileSpecs,Lo(e),t.parsedCommandLine.options,t.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return t.parsedCommandLine={...t.parsedCommandLine,fileNames:n},t.updateLevel=void 0,t.parsedCommandLine}setFileNamesOfAutoImportProviderOrAuxillaryProject(e,t){this.updateNonInferredProjectFiles(e,t,Ege)}reloadConfiguredProjectOptimized(e,t,n){n.has(e)||(n.set(e,6),e.initialLoadPending||this.setProjectForReload(e,2,t))}reloadConfiguredProjectClearingSemanticCache(e,t,n){return 7!==n.get(e)&&(n.set(e,7),this.clearSemanticCache(e),this.reloadConfiguredProject(e,Qge(t)),!0)}setProjectForReload(e,t,n){2===t&&this.clearSemanticCache(e),e.pendingUpdateReason=n&&Qge(n),e.pendingUpdateLevel=t}reloadConfiguredProject(e,t){e.initialLoadPending=!1,this.setProjectForReload(e,0),this.loadConfiguredProject(e,t),Hge(e,e.triggerFileForConfigFileDiag??e.getConfigFilePath(),!0)}clearSemanticCache(e){e.originalConfiguredProjects=void 0,e.resolutionCache.clear(),e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram(),e.markAsDirty()}sendConfigFileDiagEvent(e,t,n){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;const r=e.getLanguageService().getCompilerOptionsDiagnostics();return r.push(...e.getAllProjectErrors()),!(!n&&r.length===(e.configDiagDiagnosticsReported??0))&&(e.configDiagDiagnosticsReported=r.length,this.eventHandler({eventName:lge,data:{configFileName:e.getConfigFilePath(),diagnostics:r,triggerFile:t??e.getConfigFilePath()}}),!0)}getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t){if(!this.useInferredProjectPerProjectRoot||e.isDynamic&&void 0===t)return;if(t){const e=this.toCanonicalFileName(t);for(const t of this.inferredProjects)if(t.projectRootPath===e)return t;return this.createInferredProject(t,!1,t)}let n;for(const t of this.inferredProjects)t.projectRootPath&&sa(t.projectRootPath,e.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(n&&n.projectRootPath.length>t.projectRootPath.length||(n=t));return n}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&void 0===this.inferredProjects[0].projectRootPath?this.inferredProjects[0]:this.createInferredProject(this.currentDirectory,!0,void 0)}getOrCreateSingleInferredWithoutProjectRoot(e){gn.assert(!this.useSingleInferredProject);const t=this.toCanonicalFileName(this.getNormalizedAbsolutePath(e));for(const e of this.inferredProjects)if(!e.projectRootPath&&e.isOrphan()&&e.canonicalCurrentDirectory===t)return e;return this.createInferredProject(e,!1,void 0)}createInferredProject(e,t,n){const r=n&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(n)||this.compilerOptionsForInferredProjects;let i,o;n&&(i=this.watchOptionsForInferredProjectsPerProjectRoot.get(n),o=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(n)),void 0===i&&(i=this.watchOptionsForInferredProjects),void 0===o&&(o=this.typeAcquisitionForInferredProjects),i=i||void 0;const a=new $me(this,r,null==i?void 0:i.watchOptions,n,e,o);return a.setProjectErrors(null==i?void 0:i.errors),t?this.inferredProjects.unshift(a):this.inferredProjects.push(a),a}getOrCreateScriptInfoNotOpenedByClient(e,t,n,r){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(_me(e),t,void 0,void 0,n,r)}getScriptInfo(e){return this.getScriptInfoForNormalizedPath(_me(e))}getScriptInfoOrConfig(e){const t=_me(e),n=this.getScriptInfoForNormalizedPath(t);if(n)return n;const r=this.configuredProjects.get(this.toPath(e));return r&&r.getCompilerOptions().configFile}logErrorForScriptInfoNotFound(e){const t=Be(V(this.filenameToScriptInfo.entries(),e=>e[1].deferredDelete?void 0:e),([e,t])=>({path:e,fileName:t.fileName}));this.logger.msg(`Could not find file ${JSON.stringify(e)}.\nAll files are: ${JSON.stringify(t)}`,"Err")}getSymlinkedProjects(e){let t;if(this.realpathToScriptInfos){const t=e.getRealpathIfDifferent();t&&g(this.realpathToScriptInfos.get(t),n),g(this.realpathToScriptInfos.get(e.path),n)}return t;function n(n){if(n!==e)for(const r of n.containingProjects)!r.languageServiceEnabled||r.isOrphan()||r.getCompilerOptions().preserveSymlinks||e.isAttached(r)||(t?_d(t,(e,t)=>t!==n.path&&D(e,r))||t.add(n.path,r):(t=Qe(),t.add(n.path,r)))}}watchClosedScriptInfo(e){if(gn.assert(!e.fileWatcher),!(e.isDynamicOrHasMixedContent()||this.globalCacheLocationDirectoryPath&&en(e.path,this.globalCacheLocationDirectoryPath))){const t=e.fileName.indexOf("/node_modules/");this.host.getModifiedTime&&-1!==t?(e.mTime=this.getModifiedTime(e),e.fileWatcher=this.watchClosedScriptInfoInNodeModules(e.fileName.substring(0,t))):e.fileWatcher=this.watchFactory.watchFile(e.fileName,(t,n)=>this.onSourceFileChanged(e,n),500,this.hostConfiguration.watchOptions,V$.ClosedScriptInfo)}}createNodeModulesWatcher(e,t){let n=this.watchFactory.watchDirectory(e,e=>{var n;const i=r$(this.toPath(e));if(!i)return;const o=jo(i);if(!(null==(n=r.affectedModuleSpecifierCacheProjects)?void 0:n.size)||"package.json"!==o&&"node_modules"!==o||r.affectedModuleSpecifierCacheProjects.forEach(e=>{var t;null==(t=e.getModuleSpecifierCache())||t.clear()}),r.refreshScriptInfoRefCount)if(t===i)this.refreshScriptInfosInDirectory(t);else{const e=this.filenameToScriptInfo.get(i);e?$ge(e)&&this.refreshScriptInfo(e):Do(i)||this.refreshScriptInfosInDirectory(i)}},1,this.hostConfiguration.watchOptions,V$.NodeModules);const r={refreshScriptInfoRefCount:0,affectedModuleSpecifierCacheProjects:void 0,close:()=>{var e;!n||r.refreshScriptInfoRefCount||(null==(e=r.affectedModuleSpecifierCacheProjects)?void 0:e.size)||(n.close(),n=void 0,this.nodeModulesWatchers.delete(t))}};return this.nodeModulesWatchers.set(t,r),r}watchPackageJsonsInNodeModules(e,t){var n;const r=this.toPath(e),i=this.nodeModulesWatchers.get(r)||this.createNodeModulesWatcher(e,r);return gn.assert(!(null==(n=i.affectedModuleSpecifierCacheProjects)?void 0:n.has(t))),(i.affectedModuleSpecifierCacheProjects||(i.affectedModuleSpecifierCacheProjects=new Set)).add(t),{close:()=>{var e;null==(e=i.affectedModuleSpecifierCacheProjects)||e.delete(t),i.close()}}}watchClosedScriptInfoInNodeModules(e){const t=e+"/node_modules",n=this.toPath(t),r=this.nodeModulesWatchers.get(n)||this.createNodeModulesWatcher(t,n);return r.refreshScriptInfoRefCount++,{close:()=>{r.refreshScriptInfoRefCount--,r.close()}}}getModifiedTime(e){return(this.host.getModifiedTime(e.fileName)||$i).getTime()}refreshScriptInfo(e){const t=this.getModifiedTime(e);if(t!==e.mTime){const n=ro(e.mTime,t);e.mTime=t,this.onSourceFileChanged(e,n)}}refreshScriptInfosInDirectory(e){e+=ho,this.filenameToScriptInfo.forEach(t=>{$ge(t)&&en(t.path,e)&&this.refreshScriptInfo(t)})}stopWatchingScriptInfo(e){e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(e,t,n,r,i,o){if(ko(e)||Ome(e))return this.getOrCreateScriptInfoWorker(e,t,!1,void 0,n,!!r,i,o);const a=this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e));return a||void 0}getOrCreateScriptInfoForNormalizedPath(e,t,n,r,i,o){return this.getOrCreateScriptInfoWorker(e,this.currentDirectory,t,n,r,!!i,o,!1)}getOrCreateScriptInfoWorker(e,t,n,r,i,o,a,s){gn.assert(void 0===r||n,"ScriptInfo needs to be opened by client to be able to set its user defined content");const c=ume(e,t,this.toCanonicalFileName);let l=this.filenameToScriptInfo.get(c);if(l){if(l.deferredDelete){if(gn.assert(!l.isDynamic),!n&&!(a||this.host).fileExists(e))return s?l:void 0;l.deferredDelete=void 0}}else{const r=Ome(e);if(gn.assert(ko(e)||r||n,"",()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:Be(this.openFilesWithNonRootedDiskPath.keys())})}\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`),gn.assert(!ko(e)||this.currentDirectory===t||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(e)),"",()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:Be(this.openFilesWithNonRootedDiskPath.keys())})}\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names`),gn.assert(!r||this.currentDirectory===t||this.useInferredProjectPerProjectRoot,"",()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:Be(this.openFilesWithNonRootedDiskPath.keys())})}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`),!n&&!r&&!(a||this.host).fileExists(e))return;l=new Lme(this.host,e,i,o,c,this.filenameToScriptInfoVersion.get(c)),this.filenameToScriptInfo.set(l.path,l),this.filenameToScriptInfoVersion.delete(l.path),n?ko(e)||r&&this.currentDirectory===t||this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(e),l):this.watchClosedScriptInfo(l)}return n&&(this.stopWatchingScriptInfo(l),l.open(r),o&&l.registerFileUpdate()),l}getScriptInfoForNormalizedPath(e){return!ko(e)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e))||this.getScriptInfoForPath(ume(e,this.currentDirectory,this.toCanonicalFileName))}getScriptInfoForPath(e){const t=this.filenameToScriptInfo.get(e);return t&&t.deferredDelete?void 0:t}getDocumentPositionMapper(e,t,n){const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!1);if(!r)return void(n&&e.addGeneratedFileWatch(t,n));if(r.getSnapshot(),it(r.sourceMapFilePath)){const t=this.getScriptInfoForPath(r.sourceMapFilePath);if(t&&(t.getSnapshot(),void 0!==t.documentPositionMapper))return t.sourceInfos=this.addSourceInfoToSourceMap(n,e,t.sourceInfos),t.documentPositionMapper?t.documentPositionMapper:void 0;r.sourceMapFilePath=void 0}else{if(r.sourceMapFilePath)return void(r.sourceMapFilePath.sourceInfos=this.addSourceInfoToSourceMap(n,e,r.sourceMapFilePath.sourceInfos));if(void 0!==r.sourceMapFilePath)return}let i,o=(t,n)=>{const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!0);if(i=r||n,!r||r.deferredDelete)return;const o=r.getSnapshot();return void 0!==r.documentPositionMapper?r.documentPositionMapper:aY(o)};const a=e.projectName,s=J1({getCanonicalFileName:this.toCanonicalFileName,log:e=>this.logger.info(e),getSourceFileLike:e=>this.getSourceFileLike(e,a,r)},r.fileName,r.textStorage.getLineInfo(),o);return o=void 0,i?it(i)?r.sourceMapFilePath={watcher:this.addMissingSourceMapFile(e.currentDirectory===this.currentDirectory?i:$o(i,e.currentDirectory),r.path),sourceInfos:this.addSourceInfoToSourceMap(n,e)}:(r.sourceMapFilePath=i.path,i.declarationInfoPath=r.path,i.deferredDelete||(i.documentPositionMapper=s||!1),i.sourceInfos=this.addSourceInfoToSourceMap(n,e,i.sourceInfos)):r.sourceMapFilePath=!1,s}addSourceInfoToSourceMap(e,t,n){if(e){const r=this.getOrCreateScriptInfoNotOpenedByClient(e,t.currentDirectory,t.directoryStructureHost,!1);(n||(n=new Set)).add(r.path)}return n}addMissingSourceMapFile(e,t){return this.watchFactory.watchFile(e,()=>{const e=this.getScriptInfoForPath(t);e&&e.sourceMapFilePath&&!it(e.sourceMapFilePath)&&(this.delayUpdateProjectGraphs(e.containingProjects,!0),this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos),e.closeSourceMapFileWatcher())},2e3,this.hostConfiguration.watchOptions,V$.MissingSourceMapFile)}getSourceFileLike(e,t,n){const r=t.projectName?t:this.findProject(t);if(r){const t=r.toPath(e),n=r.getSourceFile(t);if(n&&n.resolvedPath===t)return n}const i=this.getOrCreateScriptInfoNotOpenedByClient(e,(r||this).currentDirectory,r?r.directoryStructureHost:this.host,!1);if(i){if(n&&it(n.sourceMapFilePath)&&i!==n){const e=this.getScriptInfoForPath(n.sourceMapFilePath);e&&(e.sourceInfos??(e.sourceInfos=new Set)).add(i.path)}return i.cacheSourceFile?i.cacheSourceFile.sourceFile:(i.sourceFileLike||(i.sourceFileLike={get text(){return gn.fail("shouldnt need text"),""},getLineAndCharacterOfPosition:e=>{const t=i.positionToLineOffset(e);return{line:t.line-1,character:t.offset-1}},getPositionOfLineAndCharacter:(e,t,n)=>i.lineOffsetToPosition(e+1,t+1,n)}),i.sourceFileLike)}}setPerformanceEventHandler(e){this.performanceEventHandler=e}setHostConfiguration(e){var t;if(e.file){const t=this.getScriptInfoForNormalizedPath(_me(e.file));t&&(t.setOptions(Sge(e.formatOptions),e.preferences),this.logger.info(`Host configuration update for file ${e.file}`))}else{if(void 0!==e.hostInfo&&(this.hostConfiguration.hostInfo=e.hostInfo,this.logger.info(`Host information ${e.hostInfo}`)),e.formatOptions&&(this.hostConfiguration.formatCodeOptions={...this.hostConfiguration.formatCodeOptions,...Sge(e.formatOptions)},this.logger.info("Format host information updated")),e.preferences){const{lazyConfiguredProjectsFromExternalProject:t,includePackageJsonAutoImports:n,includeCompletionsForModuleExports:r}=this.hostConfiguration.preferences;this.hostConfiguration.preferences={...this.hostConfiguration.preferences,...e.preferences},t&&!this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject&&this.externalProjectToConfiguredProjectMap.forEach(e=>e.forEach(e=>{e.deferredClose||e.isClosed()||2!==e.pendingUpdateLevel||this.hasPendingProjectUpdate(e)||e.updateGraph()})),n===e.preferences.includePackageJsonAutoImports&&!!r==!!e.preferences.includeCompletionsForModuleExports||this.forEachProject(e=>{e.onAutoImportProviderSettingsChanged()})}if(e.extraFileExtensions&&(this.hostConfiguration.extraFileExtensions=e.extraFileExtensions,this.reloadProjects(),this.logger.info("Host file extension mappings updated")),e.watchOptions){const n=null==(t=Tge(e.watchOptions))?void 0:t.watchOptions,r=hj(n,this.currentDirectory);this.hostConfiguration.watchOptions=r,this.hostConfiguration.beforeSubstitution=r===n?void 0:n,this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`)}}}getWatchOptions(e){return this.getWatchOptionsFromProjectWatchOptions(e.getWatchOptions(),e.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(e,t){const n=this.hostConfiguration.beforeSubstitution?hj(this.hostConfiguration.beforeSubstitution,t):this.hostConfiguration.watchOptions;return e&&n?{...n,...e}:e||n}closeLog(){this.logger.close()}sendSourceFileChange(e){this.filenameToScriptInfo.forEach(t=>{if(this.openFiles.has(t.path))return;if(!t.fileWatcher)return;const n=ht(()=>this.host.fileExists(t.fileName)?t.deferredDelete?0:1:2);if(e){if($ge(t)||!t.path.startsWith(e))return;if(2===n()&&t.deferredDelete)return;this.logger.info(`Invoking sourceFileChange on ${t.fileName}:: ${n()}`)}this.onSourceFileChanged(t,n())})}reloadProjects(){this.logger.info("reload projects."),this.sendSourceFileChange(void 0),this.pendingProjectUpdates.forEach((e,t)=>{this.throttledOperations.cancel(t),this.pendingProjectUpdates.delete(t)}),this.throttledOperations.cancel(gge),this.pendingOpenFileProjectUpdates=void 0,this.pendingEnsureProjectForOpenFiles=!1,this.configFileExistenceInfoCache.forEach(e=>{e.config&&(e.config.updateLevel=2,e.config.cachedDirectoryStructureHost.clearCache())}),this.configFileForOpenFiles.clear(),this.externalProjects.forEach(e=>{this.clearSemanticCache(e),e.updateGraph()});const e=new Map,t=new Set;this.externalProjectToConfiguredProjectMap.forEach((t,n)=>{const r=`Reloading configured project in external project: ${n}`;t.forEach(t=>{this.getHostPreferences().lazyConfiguredProjectsFromExternalProject?this.reloadConfiguredProjectOptimized(t,r,e):this.reloadConfiguredProjectClearingSemanticCache(t,r,e)})}),this.openFiles.forEach((n,r)=>{const i=this.getScriptInfoForPath(r);T(i.containingProjects,ege)||this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(i,7,e,t)}),t.forEach(t=>e.set(t,7)),this.inferredProjects.forEach(e=>this.clearSemanticCache(e)),this.ensureProjectForOpenFiles(),this.cleanupProjectsAndScriptInfos(e,new Set(this.openFiles.keys()),new Set(this.externalProjectToConfiguredProjectMap.keys())),this.logger.info("After reloading projects.."),this.printProjects()}removeRootOfInferredProjectIfNowPartOfOtherProject(e){gn.assert(e.containingProjects.length>0);const t=e.containingProjects[0];!t.isOrphan()&&Yme(t)&&t.isRoot(e)&&g(e.containingProjects,e=>e!==t&&!e.isOrphan())&&t.removeFile(e,!0,!0)}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();const e=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,null==e||e.forEach((e,t)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(t),5)),this.openFiles.forEach((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()?this.assignOrphanScriptInfoToInferredProject(n,e):this.removeRootOfInferredProjectIfNowPartOfOtherProject(n)}),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(Kge),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}openClientFile(e,t,n,r){return this.openClientFileWithNormalizedPath(_me(e),t,n,!1,r?_me(r):void 0)}getOriginalLocationEnsuringConfiguredProject(e,t){const n=e.isSourceOfProjectReferenceRedirect(t.fileName),r=n?t:e.getSourceMapper().tryGetSourcePosition(t);if(!r)return;const{fileName:i}=r,o=this.getScriptInfo(i);if(!o&&!this.host.fileExists(i))return;const a={fileName:_me(i),path:this.toPath(i)},s=this.getConfigFileNameForFile(a,!1);if(!s)return;let c=this.findConfiguredProjectByProjectName(s);if(!c){if(e.getCompilerOptions().disableReferencedProjectLoad)return n?t:(null==o?void 0:o.containingProjects.length)?r:t;c=this.createConfiguredProject(s,`Creating project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`)}const l=this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(a,5,zge(c,4),e=>`Creating project referenced in solution ${e.projectName} to find possible configured project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`);if(!l.defaultProject)return;if(l.defaultProject===e)return r;u(l.defaultProject);const _=this.getScriptInfo(i);if(_&&_.containingProjects.length)return _.containingProjects.forEach(e=>{Zme(e)&&u(e)}),r;function u(t){(e.originalConfiguredProjects??(e.originalConfiguredProjects=new Set)).add(t.canonicalConfigFilePath)}}fileExists(e){return!!this.getScriptInfoForNormalizedPath(e)||this.host.fileExists(e)}findExternalProjectContainingOpenScriptInfo(e){return T(this.externalProjects,t=>(Kge(t),t.containsScriptInfo(e)))}getOrCreateOpenScriptInfo(e,t,n,r,i){const o=this.getOrCreateScriptInfoWorker(e,i?this.getNormalizedAbsolutePath(i):this.currentDirectory,!0,t,n,!!r,void 0,!0);return this.openFiles.set(o.path,i),o}assignProjectToOpenedScriptInfo(e){let t,n;let r,i;if(!this.findExternalProjectContainingOpenScriptInfo(e)&&0===this.serverMode){const o=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,5);o&&(r=o.seenProjects,i=o.sentConfigDiag,o.defaultProject&&(t=o.defaultProject.getConfigFilePath(),n=o.defaultProject.getAllProjectErrors()))}return e.containingProjects.forEach(Kge),e.isOrphan()&&(null==r||r.forEach((t,n)=>{4===t||i.has(n)||this.sendConfigFileDiagEvent(n,e.fileName,!0)}),gn.assert(this.openFiles.has(e.path)),this.assignOrphanScriptInfoToInferredProject(e,this.openFiles.get(e.path))),gn.assert(!e.isOrphan()),{configFileName:t,configFileErrors:n,retainProjects:r}}findCreateOrReloadConfiguredProject(e,t,n,r,i,o,a,s,c){let l,_=c??this.findConfiguredProjectByProjectName(e,r),u=!1;switch(t){case 0:case 1:case 3:if(!_)return;break;case 2:if(!_)return;l=function(e){return Xge(e)?e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath):void 0}(_);break;case 4:case 5:_??(_=this.createConfiguredProject(e,n)),a||({sentConfigFileDiag:u,configFileExistenceInfo:l}=zge(_,t,i));break;case 6:if(_??(_=this.createConfiguredProject(e,Qge(n))),_.projectService.reloadConfiguredProjectOptimized(_,n,o),l=Gge(_),l)break;case 7:_??(_=this.createConfiguredProject(e,Qge(n))),u=!s&&this.reloadConfiguredProjectClearingSemanticCache(_,n,o),!s||s.has(_)||o.has(_)||(this.setProjectForReload(_,2,n),s.add(_));break;default:gn.assertNever(t)}return{project:_,sentConfigFileDiag:u,configFileExistenceInfo:l,reason:n}}tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,n,r){const i=this.getConfigFileNameForFile(e,t<=3);if(!i)return;const o=Rge(t),a=this.findCreateOrReloadConfiguredProject(i,o,function(e){return`Creating possible configured project for ${e.fileName} to open`}(e),n,e.fileName,r);return a&&this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(e,t,a,t=>`Creating project referenced in solution ${t.projectName} to find possible configured project for ${e.fileName} to open`,n,r)}isMatchedByConfig(e,t,n){if(t.fileNames.some(e=>this.toPath(e)===n.path))return!0;if(Kk(n.fileName,t.options,this.hostConfiguration.extraFileExtensions))return!1;const{validatedFilesSpec:r,validatedIncludeSpecs:i,validatedExcludeSpecs:o}=t.options.configFile.configFileSpecs,a=_me($o(Lo(e),this.currentDirectory));return!!(null==r?void 0:r.some(e=>this.toPath($o(e,a))===n.path))||!!(null==i?void 0:i.length)&&(!Qj(n.fileName,o,this.host.useCaseSensitiveFileNames,this.currentDirectory,a)&&(null==i?void 0:i.some(e=>{const t=bk(e,a,"files");return!!t&&Tk(`(${t})$`,this.host.useCaseSensitiveFileNames).test(n.fileName)})))}tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(e,t,n,r,i,o){const a=Lge(e),s=Rge(t),c=new Map;let l;const _=new Set;let u,d,p,f;return m(n),{defaultProject:u??d,tsconfigProject:p??f,sentConfigDiag:_,seenProjects:c,seenConfigs:l};function m(t){return function(e,t){e.sentConfigFileDiag&&_.add(e.project);return e.configFileExistenceInfo?g(e.configFileExistenceInfo,e.project,_me(e.project.getConfigFilePath()),e.reason,e.project,e.project.canonicalConfigFilePath):h(e.project,t)}(t,t.project)??((n=t.project).parsedCommandLine&&Jge(n,n.parsedCommandLine,g,s,r(n),i,o))??function(t){return a?Bge(e,t,m,s,`Creating possible configured project for ${e.fileName} to open`,i,o,!1):void 0}(t.project);var n}function g(n,r,a,u,d,p){if(r){if(c.has(r))return;c.set(r,s)}else{if(null==l?void 0:l.has(p))return;(l??(l=new Set)).add(p)}if(!d.projectService.isMatchedByConfig(a,n.config.parsedCommandLine,e))return void(d.languageServiceEnabled&&d.projectService.watchWildcards(a,n,d));const f=r?zge(r,t,e.fileName,u,o):d.projectService.findCreateOrReloadConfiguredProject(a,t,u,i,e.fileName,o);if(f)return c.set(f.project,s),f.sentConfigFileDiag&&_.add(f.project),h(f.project,d);gn.assert(3===t)}function h(n,r){if(c.get(n)===t)return;c.set(n,t);const i=a?e:n.projectService.getScriptInfo(e.fileName),o=i&&n.containsScriptInfo(i);if(o&&!n.isSourceOfProjectReferenceRedirect(i.path))return p=r,u=n;!d&&a&&o&&(f=r,d=n)}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,t,n,r){const i=1===t,o=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,i,n);if(!o)return;const{defaultProject:a,tsconfigProject:s,seenProjects:c}=o;return a&&Bge(e,s,e=>{c.set(e.project,t)},t,`Creating project possibly referencing default composite project ${a.getProjectName()} of open file ${e.fileName}`,i,n,!0,r),o}loadAncestorProjectTree(e){e??(e=new Set(V(this.configuredProjects.entries(),([e,t])=>t.initialLoadPending?void 0:e)));const t=new Set,n=Be(this.configuredProjects.values());for(const r of n)qge(r,t=>e.has(t))&&Kge(r),this.ensureProjectChildren(r,e,t)}ensureProjectChildren(e,t,n){var r;if(!$(n,e.canonicalConfigFilePath))return;if(e.getCompilerOptions().disableReferencedProjectLoad)return;const i=null==(r=e.getCurrentProgram())?void 0:r.getResolvedProjectReferences();if(i)for(const r of i){if(!r)continue;const i=zC(r.references,e=>t.has(e.sourceFile.path)?e:void 0);if(!i)continue;const o=_me(r.sourceFile.fileName),a=this.findConfiguredProjectByProjectName(o)??this.createConfiguredProject(o,`Creating project referenced by : ${e.projectName} as it references project ${i.sourceFile.fileName}`);Kge(a),this.ensureProjectChildren(a,t,n)}}cleanupConfiguredProjects(e,t,n){this.getOrphanConfiguredProjects(e,n,t).forEach(e=>this.removeProject(e))}cleanupProjectsAndScriptInfos(e,t,n){this.cleanupConfiguredProjects(e,n,t);for(const e of this.inferredProjects.slice())e.isOrphan()&&this.removeProject(e);this.removeOrphanScriptInfos()}tryInvokeWildCardDirectories(e){this.configFileExistenceInfoCache.forEach((t,n)=>{var r,i;(null==(r=t.config)?void 0:r.parsedCommandLine)&&!D(t.config.parsedCommandLine.fileNames,e.fileName,this.host.useCaseSensitiveFileNames?St:xt)&&(null==(i=t.config.watchedDirectories)||i.forEach((r,i)=>{sa(i,e.fileName,!this.host.useCaseSensitiveFileNames)&&(this.logger.info(`Invoking ${n}:: wildcard for open scriptInfo:: ${e.fileName}`),this.onWildCardDirectoryWatcherInvoke(i,n,t.config,r.watcher,e.fileName))}))})}openClientFileWithNormalizedPath(e,t,n,r,i){const o=this.getScriptInfoForPath(ume(e,i?this.getNormalizedAbsolutePath(i):this.currentDirectory,this.toCanonicalFileName)),a=this.getOrCreateOpenScriptInfo(e,t,n,r,i);o||!a||a.isDynamic||this.tryInvokeWildCardDirectories(a);const{retainProjects:s,...c}=this.assignProjectToOpenedScriptInfo(a);return this.cleanupProjectsAndScriptInfos(s,new Set([a.path]),void 0),this.telemetryOnOpenFile(a),this.printProjects(),c}getOrphanConfiguredProjects(e,t,n){const r=new Set(this.configuredProjects.values()),i=e=>{!e.originalConfiguredProjects||!Zme(e)&&e.isOrphan()||e.originalConfiguredProjects.forEach((e,t)=>{const n=this.getConfiguredProjectByCanonicalConfigFilePath(t);return n&&s(n)})};return null==e||e.forEach((e,t)=>s(t)),r.size?(this.inferredProjects.forEach(i),this.externalProjects.forEach(i),this.externalProjectToConfiguredProjectMap.forEach((e,t)=>{(null==n?void 0:n.has(t))||e.forEach(s)}),r.size?(_d(this.openFiles,(e,n)=>{if(null==t?void 0:t.has(n))return;const i=this.getScriptInfoForPath(n);if(T(i.containingProjects,ege))return;const o=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(i,1);return(null==o?void 0:o.defaultProject)&&(null==o||o.seenProjects.forEach((e,t)=>s(t)),!r.size)?r:void 0}),r.size?(_d(this.configuredProjects,e=>{if(r.has(e)&&(a(e)||Vge(e,o))&&(s(e),!r.size))return r}),r):r):r):r;function o(e){return!r.has(e)||a(e)}function a(e){var t,n;return(e.deferredClose||e.projectService.hasPendingProjectUpdate(e))&&!!(null==(n=null==(t=e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath))?void 0:t.openFilesImpactedByConfigFile)?void 0:n.size)}function s(e){r.delete(e)&&(i(e),Vge(e,s))}}removeOrphanScriptInfos(){const e=new Map(this.filenameToScriptInfo);this.filenameToScriptInfo.forEach(t=>{if(!t.deferredDelete){if(!t.isScriptOpen()&&t.isOrphan()&&!Mme(t)&&!jme(t)){if(!t.sourceMapFilePath)return;let e;if(it(t.sourceMapFilePath)){const n=this.filenameToScriptInfo.get(t.sourceMapFilePath);e=null==n?void 0:n.sourceInfos}else e=t.sourceMapFilePath.sourceInfos;if(!e)return;if(!ud(e,e=>{const t=this.getScriptInfoForPath(e);return!!t&&(t.isScriptOpen()||!t.isOrphan())}))return}if(e.delete(t.path),t.sourceMapFilePath){let n;if(it(t.sourceMapFilePath)){const r=this.filenameToScriptInfo.get(t.sourceMapFilePath);(null==r?void 0:r.deferredDelete)?t.sourceMapFilePath={watcher:this.addMissingSourceMapFile(r.fileName,t.path),sourceInfos:r.sourceInfos}:e.delete(t.sourceMapFilePath),n=null==r?void 0:r.sourceInfos}else n=t.sourceMapFilePath.sourceInfos;n&&n.forEach((t,n)=>e.delete(n))}}}),e.forEach(e=>this.deleteScriptInfo(e))}telemetryOnOpenFile(e){if(0!==this.serverMode||!this.eventHandler||!e.isJavaScript()||!Dx(this.allJsFilesForOpenFileTelemetry,e.path))return;const t=this.ensureDefaultProjectForFile(e);if(!t.languageServiceEnabled)return;const n=t.getSourceFile(e.path),r=!!n&&!!n.checkJsDirective;this.eventHandler({eventName:dge,data:{info:{checkJs:r}}})}closeClientFile(e,t){const n=this.getScriptInfoForNormalizedPath(_me(e)),r=!!n&&this.closeOpenFile(n,t);return t||this.printProjects(),r}collectChanges(e,t,n,r){for(const i of t){const t=T(e,e=>e.projectName===i.getProjectName());r.push(i.getChangesSinceVersion(t&&t.version,n))}}synchronizeProjectList(e,t){const n=[];return this.collectChanges(e,this.externalProjects,t,n),this.collectChanges(e,V(this.configuredProjects.values(),e=>e.deferredClose?void 0:e),t,n),this.collectChanges(e,this.inferredProjects,t,n),n}applyChangesInOpenFiles(e,t,n){let r,i,o,a=!1;if(e)for(const t of e){(r??(r=[])).push(this.getScriptInfoForPath(ume(_me(t.fileName),t.projectRootPath?this.getNormalizedAbsolutePath(t.projectRootPath):this.currentDirectory,this.toCanonicalFileName)));const e=this.getOrCreateOpenScriptInfo(_me(t.fileName),t.content,wge(t.scriptKind),t.hasMixedContent,t.projectRootPath?_me(t.projectRootPath):void 0);(i||(i=[])).push(e)}if(t)for(const e of t){const t=this.getScriptInfo(e.fileName);gn.assert(!!t),this.applyChangesToFile(t,e.changes)}if(n)for(const e of n)a=this.closeClientFile(e,!0)||a;g(r,(e,t)=>e||!i[t]||i[t].isDynamic?void 0:this.tryInvokeWildCardDirectories(i[t])),null==i||i.forEach(e=>{var t;return null==(t=this.assignProjectToOpenedScriptInfo(e).retainProjects)?void 0:t.forEach((e,t)=>(o??(o=new Map)).set(t,e))}),a&&this.assignOrphanScriptInfosToInferredProject(),i?(this.cleanupProjectsAndScriptInfos(o,new Set(i.map(e=>e.path)),void 0),i.forEach(e=>this.telemetryOnOpenFile(e)),this.printProjects()):m(n)&&this.printProjects()}applyChangesToFile(e,t){for(const n of t)e.editContent(n.span.start,n.span.start+n.span.length,n.newText)}closeExternalProject(e,t){const n=_me(e);if(this.externalProjectToConfiguredProjectMap.get(n))this.externalProjectToConfiguredProjectMap.delete(n);else{const t=this.findExternalProjectByProjectName(e);t&&this.removeProject(t)}t&&(this.cleanupConfiguredProjects(),this.printProjects())}openExternalProjects(e){const t=new Set(this.externalProjects.map(e=>e.getProjectName()));this.externalProjectToConfiguredProjectMap.forEach((e,n)=>t.add(n));for(const n of e)this.openExternalProject(n,!1),t.delete(n.projectFileName);t.forEach(e=>this.closeExternalProject(e,!1)),this.cleanupConfiguredProjects(),this.printProjects()}static escapeFilenameForRegex(e){return e.replace(this.filenameEscapeRegexp,"\\$&")}resetSafeList(){this.safelist=xge}applySafeList(e){const t=e.typeAcquisition;gn.assert(!!t,"proj.typeAcquisition should be set by now");const n=this.applySafeListWorker(e,e.rootFiles,t);return(null==n?void 0:n.excludedFiles)??[]}applySafeListWorker(t,n,r){if(!1===r.enable||r.disableFilenameBasedTypeAcquisition)return;const i=r.include||(r.include=[]),o=[],a=n.map(e=>zo(e.fileName));for(const t of Object.keys(this.safelist)){const n=this.safelist[t];for(const r of a)if(n.match.test(r)){if(this.logger.info(`Excluding files based on rule ${t} matching file '${r}'`),n.types)for(const e of n.types)i.includes(e)||i.push(e);if(n.exclude)for(const i of n.exclude){const a=r.replace(n.match,(...n)=>i.map(r=>"number"==typeof r?it(n[r])?e.escapeFilenameForRegex(n[r]):(this.logger.info(`Incorrect RegExp specification in safelist rule ${t} - not enough groups`),"\\*"):r).join(""));o.includes(a)||o.push(a)}else{const t=e.escapeFilenameForRegex(r);o.includes(t)||o.push(t)}}}const s=o.map(e=>new RegExp(e,"i"));let c,l;for(let e=0;et.test(a[e])))_(e);else{if(r.enable){const t=jo(mt(a[e]));if(Eo(t,"js")){const n=Wt(Qk(t)),r=this.legacySafelist.get(n);if(void 0!==r){this.logger.info(`Excluded '${a[e]}' because it matched ${n} from the legacy safelist`),_(e),i.includes(r)||i.push(r);continue}}}/^.+[.-]min\.js$/.test(a[e])?_(e):null==c||c.push(n[e])}return l?{rootFiles:c,excludedFiles:l}:void 0;function _(e){l||(gn.assert(!c),c=n.slice(0,e),l=[]),l.push(a[e])}}openExternalProject(e,t){const n=this.findExternalProjectByProjectName(e.projectFileName);let r,i=[];for(const t of e.rootFiles){const n=_me(t.fileName);if(xme(n)){if(0===this.serverMode&&this.host.fileExists(n)){let t=this.findConfiguredProjectByProjectName(n);t||(t=this.createConfiguredProject(n,`Creating configured project in external project: ${e.projectFileName}`),this.getHostPreferences().lazyConfiguredProjectsFromExternalProject||t.updateGraph()),(r??(r=new Set)).add(t),gn.assert(!t.isClosed())}}else i.push(t)}if(r)this.externalProjectToConfiguredProjectMap.set(e.projectFileName,r),n&&this.removeProject(n);else{this.externalProjectToConfiguredProjectMap.delete(e.projectFileName);const t=e.typeAcquisition||{};t.include=t.include||[],t.exclude=t.exclude||[],void 0===t.enable&&(t.enable=qme(i.map(e=>e.fileName)));const r=this.applySafeListWorker(e,i,t),o=(null==r?void 0:r.excludedFiles)??[];if(i=(null==r?void 0:r.rootFiles)??i,n){n.excludedFiles=o;const r=kge(e.options),a=Tge(e.options,n.getCurrentDirectory()),s=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.projectFileName,r,i,Fge);s?n.disableLanguageService(s):n.enableLanguageService(),n.setProjectErrors(null==a?void 0:a.errors),this.updateRootAndOptionsOfNonInferredProject(n,i,Fge,r,t,e.options.compileOnSave,null==a?void 0:a.watchOptions),n.updateGraph()}else{this.createExternalProject(e.projectFileName,i,e.options,t,o).updateGraph()}}t&&(this.cleanupConfiguredProjects(r,new Set([e.projectFileName])),this.printProjects())}hasDeferredExtension(){for(const e of this.hostConfiguration.extraFileExtensions)if(7===e.scriptKind)return!0;return!1}requestEnablePlugin(e,t,n){if(this.host.importPlugin||this.host.require)if(this.logger.info(`Enabling plugin ${t.name} from candidate paths: ${n.join(",")}`),!t.name||As(t.name)||/[\\/]\.\.?(?:$|[\\/])/.test(t.name))this.logger.info(`Skipped loading plugin ${t.name||JSON.stringify(t)} because only package name is allowed plugin name`);else{if(this.host.importPlugin){const r=Wme.importServicePluginAsync(t,n,this.host,e=>this.logger.info(e));this.pendingPluginEnablements??(this.pendingPluginEnablements=new Map);let i=this.pendingPluginEnablements.get(e);return i||this.pendingPluginEnablements.set(e,i=[]),void i.push(r)}this.endEnablePlugin(e,Wme.importServicePluginSync(t,n,this.host,e=>this.logger.info(e)))}else this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded")}endEnablePlugin(e,{pluginConfigEntry:t,resolvedModule:n,errorLogs:r}){var i;if(n){const r=null==(i=this.currentPluginConfigOverrides)?void 0:i.get(t.name);if(r){const e=t.name;(t=r).name=e}e.enableProxy(n,t)}else g(r,e=>this.logger.info(e)),this.logger.info(`Couldn't find ${t.name}`)}hasNewPluginEnablementRequests(){return!!this.pendingPluginEnablements}hasPendingPluginEnablements(){return!!this.currentPluginEnablementPromise}async waitForPendingPlugins(){for(;this.currentPluginEnablementPromise;)await this.currentPluginEnablementPromise}enableRequestedPlugins(){this.pendingPluginEnablements&&this.enableRequestedPluginsAsync()}async enableRequestedPluginsAsync(){if(this.currentPluginEnablementPromise&&await this.waitForPendingPlugins(),!this.pendingPluginEnablements)return;const e=Be(this.pendingPluginEnablements.entries());this.pendingPluginEnablements=void 0,this.currentPluginEnablementPromise=this.enableRequestedPluginsWorker(e),await this.currentPluginEnablementPromise}async enableRequestedPluginsWorker(e){gn.assert(void 0===this.currentPluginEnablementPromise);let t=!1;await Promise.all(O(e,async([e,n])=>{const r=await Promise.all(n);if(e.isClosed()||nge(e))this.logger.info(`Cancelling plugin enabling for ${e.getProjectName()} as it is ${e.isClosed()?"closed":"deferred close"}`);else{t=!0;for(const t of r)this.endEnablePlugin(e,t);this.delayUpdateProjectGraph(e)}})),this.currentPluginEnablementPromise=void 0,t&&this.sendProjectsUpdatedInBackgroundEvent()}configurePlugin(e){this.forEachEnabledProject(t=>t.onPluginConfigurationChanged(e.pluginName,e.configuration)),this.currentPluginConfigOverrides=this.currentPluginConfigOverrides||new Map,this.currentPluginConfigOverrides.set(e.pluginName,e.configuration)}getPackageJsonsVisibleToFile(e,t,n){const r=this.packageJsonCache,i=n&&this.toPath(n),o=[],a=e=>{switch(r.directoryHasPackageJson(e)){case 3:return r.searchDirectoryAndAncestors(e,t),a(e);case-1:const n=Uo(e,"package.json");this.watchPackageJsonFile(n,this.toPath(n),t);const i=r.getInDirectory(e);i&&o.push(i)}if(i&&i===e)return!0};return RR(t,Lo(e),a),o}getNearestAncestorDirectoryWithPackageJson(e,t){return RR(t,e,e=>{switch(this.packageJsonCache.directoryHasPackageJson(e)){case-1:return e;case 0:return;case 3:return this.host.fileExists(Uo(e,"package.json"))?e:void 0}})}watchPackageJsonFile(e,t,n){gn.assert(void 0!==n);let r=(this.packageJsonFilesMap??(this.packageJsonFilesMap=new Map)).get(t);if(!r){let n=this.watchFactory.watchFile(e,(e,n)=>{switch(n){case 0:case 1:this.packageJsonCache.addOrUpdate(e,t),this.onPackageJsonChange(r);break;case 2:this.packageJsonCache.delete(t),this.onPackageJsonChange(r),r.projects.clear(),r.close()}},250,this.hostConfiguration.watchOptions,V$.PackageJson);r={projects:new Set,close:()=>{var e;!r.projects.size&&n&&(n.close(),n=void 0,null==(e=this.packageJsonFilesMap)||e.delete(t),this.packageJsonCache.invalidate(t))}},this.packageJsonFilesMap.set(t,r)}r.projects.add(n),(n.packageJsonWatches??(n.packageJsonWatches=new Set)).add(r)}onPackageJsonChange(e){e.projects.forEach(e=>{var t;return null==(t=e.onPackageJsonChange)?void 0:t.call(e)})}includePackageJsonAutoImports(){switch(this.hostConfiguration.preferences.includePackageJsonAutoImports){case"on":return 1;case"off":return 0;default:return 2}}getIncompleteCompletionsCache(){return this.incompleteCompletionsCache||(this.incompleteCompletionsCache=function(){let e;return{get:()=>e,set(t){e=t},clear(){e=void 0}}}())}};rhe.filenameEscapeRegexp=/[-/\\^$*+?.()|[\]{}]/g;var ihe=rhe;function ohe(e){return void 0!==e.kind}function ahe(e){e.print(!1,!1,!1)}function she(e){let t,n,r;const i={get(e,t,i,o){if(n&&r===a(e,i,o))return n.get(t)},set(n,r,i,a,c,l,_){if(o(n,i,a).set(r,s(c,l,_,void 0,!1)),_)for(const n of l)if(n.isInNodeModules){const r=n.path.substring(0,n.path.indexOf(cR)+cR.length-1),i=e.toPath(r);(null==t?void 0:t.has(i))||(t||(t=new Map)).set(i,e.watchNodeModulesForPackageJsonChanges(r))}},setModulePaths(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.modulePaths=i:a.set(t,s(void 0,i,void 0,void 0,void 0))},setBlockedByPackageJsonDependencies(e,t,n,r,i,a){const c=o(e,n,r),l=c.get(t);l?(l.isBlockedByPackageJsonDependencies=a,l.packageName=i):c.set(t,s(void 0,void 0,void 0,i,a))},clear(){null==t||t.forEach(_x),null==n||n.clear(),null==t||t.clear(),r=void 0},count:()=>n?n.size:0};return gn.isDebugging&&Object.defineProperty(i,"__cache",{get:()=>n}),i;function o(e,t,o){const s=a(e,t,o);return n&&r!==s&&i.clear(),r=s,n||(n=new Map)}function a(e,t,n){return`${e},${t.importModuleSpecifierEnding},${t.importModuleSpecifierPreference},${n.overrideImportMode}`}function s(e,t,n,r,i){return{kind:e,modulePaths:t,moduleSpecifiers:n,packageName:r,isBlockedByPackageJsonDependencies:i}}}function che(e){const t=new Map,n=new Map;return{addOrUpdate:r,invalidate:function(e){t.delete(e),n.delete(Lo(e))},delete:e=>{t.delete(e),n.set(Lo(e),!0)},getInDirectory:n=>t.get(e.toPath(Uo(n,"package.json")))||void 0,directoryHasPackageJson:t=>i(e.toPath(t)),searchDirectoryAndAncestors:(t,o)=>{RR(o,t,t=>{const o=e.toPath(t);if(3!==i(o))return!0;const a=Uo(t,"package.json");UZ(e,a)?r(a,Uo(o,"package.json")):n.set(o,!0)})}};function r(r,i){const o=gn.checkDefined(GZ(r,e.host));t.set(i,o),n.delete(Lo(i))}function i(e){return t.has(Uo(e,"package.json"))?-1:n.has(e)?0:3}}var lhe={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}};function _he(e,t){if((Yme(e)||ege(e))&&e.isJsOnlyProject()){const n=e.getScriptInfoForNormalizedPath(t);return n&&!n.isJavaScript()}return!1}function uhe(e,t,n){const r=t.getScriptInfoForNormalizedPath(e);return{start:r.positionToLineOffset(n.start),end:r.positionToLineOffset(n.start+n.length),text:SV(n.messageText,"\n"),code:n.code,category:pi(n),reportsUnnecessary:n.reportsUnnecessary,reportsDeprecated:n.reportsDeprecated,source:n.source,relatedInformation:O(n.relatedInformation,dhe)}}function dhe(e){return e.file?{span:{start:phe(Ha(e.file,e.start)),end:phe(Ha(e.file,e.start+e.length)),file:e.file.fileName},message:SV(e.messageText,"\n"),category:pi(e),code:e.code}:{message:SV(e.messageText,"\n"),category:pi(e),code:e.code}}function phe(e){return{line:e.line+1,offset:e.character+1}}function fhe(e,t){const n=e.file&&phe(Ha(e.file,e.start)),r=e.file&&phe(Ha(e.file,e.start+e.length)),i=SV(e.messageText,"\n"),{code:o,source:a}=e,s={start:n,end:r,text:i,code:o,category:pi(e),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,source:a,relatedInformation:O(e.relatedInformation,dhe)};return t?{...s,fileName:e.file&&e.file.fileName}:s}var mhe=kme;function ghe(e,t,n,r){const i=t.hasLevel(3),o=JSON.stringify(e);i&&t.info(`${e.type}:${TG(e)}`);return`Content-Length: ${1+n(o,"utf8")}\r\n\r\n${o}${r}`}var hhe=class{constructor(e){this.operationHost=e}startNew(e){this.complete(),this.requestId=this.operationHost.getCurrentRequestId(),this.executeAction(e)}complete(){void 0!==this.requestId&&(this.operationHost.sendRequestCompletedEvent(this.requestId,this.performanceData),this.requestId=void 0),this.setTimerHandle(void 0),this.setImmediateId(void 0),this.performanceData=void 0}immediate(e,t){const n=this.requestId;gn.assert(n===this.operationHost.getCurrentRequestId(),"immediate: incorrect request id"),this.setImmediateId(this.operationHost.getServerHost().setImmediate(()=>{this.immediateId=void 0,this.operationHost.executeWithRequestId(n,()=>this.executeAction(t),this.performanceData)},e))}delay(e,t,n){const r=this.requestId;gn.assert(r===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout(()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(r,()=>this.executeAction(n),this.performanceData)},t,e))}executeAction(e){var t,n,r,i,o,a;let s=!1;try{this.operationHost.isCancellationRequested()?(s=!0,null==(t=Yn)||t.instant(Yn.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):(null==(n=Yn)||n.push(Yn.Phase.Session,"stepAction",{seq:this.requestId}),e(this),null==(r=Yn)||r.pop())}catch(e){null==(i=Yn)||i.popAll(),s=!0,e instanceof Fr?null==(o=Yn)||o.instant(Yn.Phase.Session,"stepCanceled",{seq:this.requestId}):(null==(a=Yn)||a.instant(Yn.Phase.Session,"stepError",{seq:this.requestId,message:e.message}),this.operationHost.logError(e,`delayed processing of request ${this.requestId}`))}this.performanceData=this.operationHost.getPerformanceData(),!s&&this.hasPendingWork()||this.complete()}setTimerHandle(e){void 0!==this.timerHandle&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=e}setImmediateId(e){void 0!==this.immediateId&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=e}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}};function yhe(e,t){return{seq:0,type:"event",event:e,body:t}}function vhe(e){return tt(({textSpan:e})=>e.start+100003*e.length,OY(e))}function bhe(e,t,n){const r=e.getLanguageService().getDefinitionAtPosition(t.fileName,t.pos,!1,n),i=r&&ve(r);return i&&!i.isLocal?{fileName:i.fileName,pos:i.textSpan.start}:void 0}function xhe(e,t,n){for(const r of nt(e)?e:e.projects)n(r,t);!nt(e)&&e.symLinkedProjects&&e.symLinkedProjects.forEach((e,t)=>{for(const r of e)n(r,t)})}function She(e,t,n,r,i,o,a){const s=new Map,c=et();c.enqueue({project:t,location:n}),xhe(e,n.fileName,(e,t)=>{const r={fileName:t,pos:n.pos};c.enqueue({project:e,location:r})});const l=t.projectService,_=t.getCancellationToken(),u=ht(()=>t.isSourceOfProjectReferenceRedirect(r.fileName)?r:t.getLanguageService().getSourceMapper().tryGetGeneratedPosition(r)),d=ht(()=>t.isSourceOfProjectReferenceRedirect(r.fileName)?r:t.getLanguageService().getSourceMapper().tryGetSourcePosition(r)),p=new Set;e:for(;!c.isEmpty();){for(;!c.isEmpty();){if(_.isCancellationRequested())break e;const{project:e,location:t}=c.dequeue();if(s.has(e))continue;if(Che(e,t))continue;if(Kge(e),!e.containsFile(_me(t.fileName)))continue;const n=f(e,t);s.set(e,n??sme),p.add(whe(e))}r&&(l.loadAncestorProjectTree(p),l.forEachEnabledProject(e=>{if(_.isCancellationRequested())return;if(s.has(e))return;const t=i(r,e,u,d);t&&c.enqueue({project:e,location:t})}))}return 1===s.size?Se(s.values()):s;function f(e,t){const n=o(e,t);if(!n||!a)return n;for(const t of n)a(t,t=>{const n=l.getOriginalLocationEnsuringConfiguredProject(e,t);if(!n)return;const r=l.getScriptInfo(n.fileName);for(const e of r.containingProjects)e.isOrphan()||s.has(e)||c.enqueue({project:e,location:n});const i=l.getSymlinkedProjects(r);i&&i.forEach((e,t)=>{for(const r of e)r.isOrphan()||s.has(r)||c.enqueue({project:r,location:{fileName:t,pos:n.pos}})})});return n}}function khe(e,t){if(t.containsFile(_me(e.fileName))&&!Che(t,e))return e}function The(e,t,n,r){const i=khe(e,t);if(i)return i;const o=n();if(o&&t.containsFile(_me(o.fileName)))return o;const a=r();return a&&t.containsFile(_me(a.fileName))?a:void 0}function Che(e,t){if(!t)return!1;const n=e.getLanguageService().getProgram();if(!n)return!1;const r=n.getSourceFile(t.fileName);return!!r&&r.resolvedPath!==r.path&&r.resolvedPath!==e.toPath(t.fileName)}function whe(e){return Zme(e)?e.canonicalConfigFilePath:e.getProjectName()}function Nhe({fileName:e,textSpan:t}){return{fileName:e,pos:t.start}}function Dhe(e,t){return MY(e,t.getSourceMapper(),e=>t.projectService.fileExists(e))}function Ehe(e,t){return RY(e,t.getSourceMapper(),e=>t.projectService.fileExists(e))}function Fhe(e,t){return BY(e,t.getSourceMapper(),e=>t.projectService.fileExists(e))}var Phe=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits","copilotRelated"],Ahe=[...Phe,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full","preparePasteEdits"],Ihe=class e{constructor(e){this.changeSeq=0,this.regionDiagLineCountThreshold=500,this.handlers=new Map(Object.entries({status:()=>{const e={version:u};return this.requiredResponse(e)},openExternalProject:e=>(this.projectService.openExternalProject(e.arguments,!0),this.requiredResponse(!0)),openExternalProjects:e=>(this.projectService.openExternalProjects(e.arguments.projects),this.requiredResponse(!0)),closeExternalProject:e=>(this.projectService.closeExternalProject(e.arguments.projectFileName,!0),this.requiredResponse(!0)),synchronizeProjectList:e=>{const t=this.projectService.synchronizeProjectList(e.arguments.knownProjects,e.arguments.includeProjectReferenceRedirectInfo);if(!t.some(e=>e.projectErrors&&0!==e.projectErrors.length))return this.requiredResponse(t);const n=O(t,e=>e.projectErrors&&0!==e.projectErrors.length?{info:e.info,changes:e.changes,files:e.files,projectErrors:this.convertToDiagnosticsWithLinePosition(e.projectErrors,void 0)}:e);return this.requiredResponse(n)},updateOpen:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles&&L(e.arguments.openFiles,e=>({fileName:e.file,content:e.fileContent,scriptKind:e.scriptKindName,projectRootPath:e.projectRootPath})),e.arguments.changedFiles&&L(e.arguments.changedFiles,e=>({fileName:e.fileName,changes:V(ge(e.textChanges),t=>{const n=gn.checkDefined(this.projectService.getScriptInfo(e.fileName)),r=n.lineOffsetToPosition(t.start.line,t.start.offset),i=n.lineOffsetToPosition(t.end.line,t.end.offset);return r>=0?{span:{start:r,length:i-r},newText:t.newText}:void 0})})),e.arguments.closedFiles),this.requiredResponse(!0)),applyChangedToOpenFiles:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles,e.arguments.changedFiles&&L(e.arguments.changedFiles,e=>({fileName:e.fileName,changes:ge(e.changes)})),e.arguments.closedFiles),this.requiredResponse(!0)),exit:()=>(this.exit(),this.notRequired(void 0)),definition:e=>this.requiredResponse(this.getDefinition(e.arguments,!0)),"definition-full":e=>this.requiredResponse(this.getDefinition(e.arguments,!1)),definitionAndBoundSpan:e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!0)),"definitionAndBoundSpan-full":e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!1)),findSourceDefinition:e=>this.requiredResponse(this.findSourceDefinition(e.arguments)),"emit-output":e=>this.requiredResponse(this.getEmitOutput(e.arguments)),typeDefinition:e=>this.requiredResponse(this.getTypeDefinition(e.arguments)),implementation:e=>this.requiredResponse(this.getImplementation(e.arguments,!0)),"implementation-full":e=>this.requiredResponse(this.getImplementation(e.arguments,!1)),references:e=>this.requiredResponse(this.getReferences(e.arguments,!0)),"references-full":e=>this.requiredResponse(this.getReferences(e.arguments,!1)),rename:e=>this.requiredResponse(this.getRenameLocations(e.arguments,!0)),"renameLocations-full":e=>this.requiredResponse(this.getRenameLocations(e.arguments,!1)),"rename-full":e=>this.requiredResponse(this.getRenameInfo(e.arguments)),open:e=>(this.openClientFile(_me(e.arguments.file),e.arguments.fileContent,Nge(e.arguments.scriptKindName),e.arguments.projectRootPath?_me(e.arguments.projectRootPath):void 0),this.notRequired(e)),quickinfo:e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!0)),"quickinfo-full":e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!1)),getOutliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!0)),outliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!1)),todoComments:e=>this.requiredResponse(this.getTodoComments(e.arguments)),indentation:e=>this.requiredResponse(this.getIndentation(e.arguments)),nameOrDottedNameSpan:e=>this.requiredResponse(this.getNameOrDottedNameSpan(e.arguments)),breakpointStatement:e=>this.requiredResponse(this.getBreakpointStatement(e.arguments)),braceCompletion:e=>this.requiredResponse(this.isValidBraceCompletion(e.arguments)),docCommentTemplate:e=>this.requiredResponse(this.getDocCommentTemplate(e.arguments)),getSpanOfEnclosingComment:e=>this.requiredResponse(this.getSpanOfEnclosingComment(e.arguments)),fileReferences:e=>this.requiredResponse(this.getFileReferences(e.arguments,!0)),"fileReferences-full":e=>this.requiredResponse(this.getFileReferences(e.arguments,!1)),format:e=>this.requiredResponse(this.getFormattingEditsForRange(e.arguments)),formatonkey:e=>this.requiredResponse(this.getFormattingEditsAfterKeystroke(e.arguments)),"format-full":e=>this.requiredResponse(this.getFormattingEditsForDocumentFull(e.arguments)),"formatonkey-full":e=>this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(e.arguments)),"formatRange-full":e=>this.requiredResponse(this.getFormattingEditsForRangeFull(e.arguments)),completionInfo:e=>this.requiredResponse(this.getCompletions(e.arguments,"completionInfo")),completions:e=>this.requiredResponse(this.getCompletions(e.arguments,"completions")),"completions-full":e=>this.requiredResponse(this.getCompletions(e.arguments,"completions-full")),completionEntryDetails:e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!1)),"completionEntryDetails-full":e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!0)),compileOnSaveAffectedFileList:e=>this.requiredResponse(this.getCompileOnSaveAffectedFileList(e.arguments)),compileOnSaveEmitFile:e=>this.requiredResponse(this.emitFile(e.arguments)),signatureHelp:e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!0)),"signatureHelp-full":e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!1)),"compilerOptionsDiagnostics-full":e=>this.requiredResponse(this.getCompilerOptionsDiagnostics(e.arguments)),"encodedSyntacticClassifications-full":e=>this.requiredResponse(this.getEncodedSyntacticClassifications(e.arguments)),"encodedSemanticClassifications-full":e=>this.requiredResponse(this.getEncodedSemanticClassifications(e.arguments)),cleanup:()=>(this.cleanup(),this.requiredResponse(!0)),semanticDiagnosticsSync:e=>this.requiredResponse(this.getSemanticDiagnosticsSync(e.arguments)),syntacticDiagnosticsSync:e=>this.requiredResponse(this.getSyntacticDiagnosticsSync(e.arguments)),suggestionDiagnosticsSync:e=>this.requiredResponse(this.getSuggestionDiagnosticsSync(e.arguments)),geterr:e=>(this.errorCheck.startNew(t=>this.getDiagnostics(t,e.arguments.delay,e.arguments.files)),this.notRequired(void 0)),geterrForProject:e=>(this.errorCheck.startNew(t=>this.getDiagnosticsForProject(t,e.arguments.delay,e.arguments.file)),this.notRequired(void 0)),change:e=>(this.change(e.arguments),this.notRequired(e)),configure:e=>(this.projectService.setHostConfiguration(e.arguments),this.notRequired(e)),reload:e=>(this.reload(e.arguments),this.requiredResponse({reloadFinished:!0})),saveto:e=>{const t=e.arguments;return this.saveToTmp(t.file,t.tmpfile),this.notRequired(e)},close:e=>{const t=e.arguments;return this.closeClientFile(t.file),this.notRequired(e)},navto:e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!0)),"navto-full":e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!1)),brace:e=>this.requiredResponse(this.getBraceMatching(e.arguments,!0)),"brace-full":e=>this.requiredResponse(this.getBraceMatching(e.arguments,!1)),navbar:e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!0)),"navbar-full":e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!1)),navtree:e=>this.requiredResponse(this.getNavigationTree(e.arguments,!0)),"navtree-full":e=>this.requiredResponse(this.getNavigationTree(e.arguments,!1)),documentHighlights:e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!0)),"documentHighlights-full":e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!1)),compilerOptionsForInferredProjects:e=>(this.setCompilerOptionsForInferredProjects(e.arguments),this.requiredResponse(!0)),projectInfo:e=>this.requiredResponse(this.getProjectInfo(e.arguments)),reloadProjects:e=>(this.projectService.reloadProjects(),this.notRequired(e)),jsxClosingTag:e=>this.requiredResponse(this.getJsxClosingTag(e.arguments)),linkedEditingRange:e=>this.requiredResponse(this.getLinkedEditingRange(e.arguments)),getCodeFixes:e=>this.requiredResponse(this.getCodeFixes(e.arguments,!0)),"getCodeFixes-full":e=>this.requiredResponse(this.getCodeFixes(e.arguments,!1)),getCombinedCodeFix:e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!0)),"getCombinedCodeFix-full":e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!1)),applyCodeActionCommand:e=>this.requiredResponse(this.applyCodeActionCommand(e.arguments)),getSupportedCodeFixes:e=>this.requiredResponse(this.getSupportedCodeFixes(e.arguments)),getApplicableRefactors:e=>this.requiredResponse(this.getApplicableRefactors(e.arguments)),getEditsForRefactor:e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!0)),getMoveToRefactoringFileSuggestions:e=>this.requiredResponse(this.getMoveToRefactoringFileSuggestions(e.arguments)),preparePasteEdits:e=>this.requiredResponse(this.preparePasteEdits(e.arguments)),getPasteEdits:e=>this.requiredResponse(this.getPasteEdits(e.arguments)),"getEditsForRefactor-full":e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!1)),organizeImports:e=>this.requiredResponse(this.organizeImports(e.arguments,!0)),"organizeImports-full":e=>this.requiredResponse(this.organizeImports(e.arguments,!1)),getEditsForFileRename:e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!0)),"getEditsForFileRename-full":e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!1)),configurePlugin:e=>(this.configurePlugin(e.arguments),this.notRequired(e)),selectionRange:e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!0)),"selectionRange-full":e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!1)),prepareCallHierarchy:e=>this.requiredResponse(this.prepareCallHierarchy(e.arguments)),provideCallHierarchyIncomingCalls:e=>this.requiredResponse(this.provideCallHierarchyIncomingCalls(e.arguments)),provideCallHierarchyOutgoingCalls:e=>this.requiredResponse(this.provideCallHierarchyOutgoingCalls(e.arguments)),toggleLineComment:e=>this.requiredResponse(this.toggleLineComment(e.arguments,!0)),"toggleLineComment-full":e=>this.requiredResponse(this.toggleLineComment(e.arguments,!1)),toggleMultilineComment:e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!0)),"toggleMultilineComment-full":e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!1)),commentSelection:e=>this.requiredResponse(this.commentSelection(e.arguments,!0)),"commentSelection-full":e=>this.requiredResponse(this.commentSelection(e.arguments,!1)),uncommentSelection:e=>this.requiredResponse(this.uncommentSelection(e.arguments,!0)),"uncommentSelection-full":e=>this.requiredResponse(this.uncommentSelection(e.arguments,!1)),provideInlayHints:e=>this.requiredResponse(this.provideInlayHints(e.arguments)),mapCode:e=>this.requiredResponse(this.mapCode(e.arguments)),copilotRelated:()=>this.requiredResponse(this.getCopilotRelatedInfo())})),this.host=e.host,this.cancellationToken=e.cancellationToken,this.typingsInstaller=e.typingsInstaller||Age,this.byteLength=e.byteLength,this.hrtime=e.hrtime,this.logger=e.logger,this.canUseEvents=e.canUseEvents,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=e.noGetErrOnBackgroundUpdate;const{throttleWaitMilliseconds:t}=e;this.eventHandler=this.canUseEvents?e.eventHandler||(e=>this.defaultEventHandler(e)):void 0;const n={executeWithRequestId:(e,t,n)=>this.executeWithRequestId(e,t,n),getCurrentRequestId:()=>this.currentRequestId,getPerformanceData:()=>this.performanceData,getServerHost:()=>this.host,logError:(e,t)=>this.logError(e,t),sendRequestCompletedEvent:(e,t)=>this.sendRequestCompletedEvent(e,t),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new hhe(n);const r={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:e.useSingleInferredProject,useInferredProjectPerProjectRoot:e.useInferredProjectPerProjectRoot,typingsInstaller:this.typingsInstaller,throttleWaitMilliseconds:t,eventHandler:this.eventHandler,suppressDiagnosticEvents:this.suppressDiagnosticEvents,globalPlugins:e.globalPlugins,pluginProbeLocations:e.pluginProbeLocations,allowLocalPluginLoads:e.allowLocalPluginLoads,typesMapLocation:e.typesMapLocation,serverMode:e.serverMode,session:this,canUseWatchEvents:e.canUseWatchEvents,incrementalVerifier:e.incrementalVerifier};switch(this.projectService=new ihe(r),this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)),this.gcTimer=new bme(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:Phe.forEach(e=>this.handlers.set(e,e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:Ahe.forEach(e=>this.handlers.set(e,e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.Syntactic`)}));break;default:gn.assertNever(this.projectService.serverMode)}}sendRequestCompletedEvent(e,t){this.event({request_seq:e,performanceData:t&&Ohe(t)},"requestCompleted")}addPerformanceData(e,t){this.performanceData||(this.performanceData={}),this.performanceData[e]=(this.performanceData[e]??0)+t}addDiagnosticsPerformanceData(e,t,n){var r,i;this.performanceData||(this.performanceData={});let o=null==(r=this.performanceData.diagnosticsDuration)?void 0:r.get(e);o||((i=this.performanceData).diagnosticsDuration??(i.diagnosticsDuration=new Map)).set(e,o={}),o[t]=n}performanceEventHandler(e){switch(e.kind){case"UpdateGraph":this.addPerformanceData("updateGraphDurationMs",e.durationMs);break;case"CreatePackageJsonAutoImportProvider":this.addPerformanceData("createAutoImportProviderProgramDurationMs",e.durationMs)}}defaultEventHandler(e){switch(e.eventName){case oge:this.projectsUpdatedInBackgroundEvent(e.data.openFiles);break;case age:this.event({projectName:e.data.project.getProjectName(),reason:e.data.reason},e.eventName);break;case sge:this.event({projectName:e.data.project.getProjectName()},e.eventName);break;case cge:case pge:case fge:case mge:this.event(e.data,e.eventName);break;case lge:this.event({triggerFile:e.data.triggerFile,configFile:e.data.configFileName,diagnostics:O(e.data.diagnostics,e=>fhe(e,!0))},e.eventName);break;case _ge:this.event({projectName:e.data.project.getProjectName(),languageServiceEnabled:e.data.languageServiceEnabled},e.eventName);break;case uge:{const t="telemetry";this.event({telemetryEventName:e.eventName,payload:e.data},t);break}}}projectsUpdatedInBackgroundEvent(e){this.projectService.logger.info(`got projects updated in background ${e}`),e.length&&(this.suppressDiagnosticEvents||this.noGetErrOnBackgroundUpdate||(this.projectService.logger.info(`Queueing diagnostics update for ${e}`),this.errorCheck.startNew(t=>this.updateErrorCheck(t,e,100,!0))),this.event({openFiles:e},oge))}logError(e,t){this.logErrorWorker(e,t)}logErrorWorker(e,t,n){let r="Exception on executing command "+t;if(e.message&&(r+=":\n"+kG(e.message),e.stack&&(r+="\n"+kG(e.stack))),this.logger.hasLevel(3)){if(n)try{const{file:e,project:t}=this.getFileAndProject(n),i=t.getScriptInfoForNormalizedPath(e);if(i){const e=aY(i.getSnapshot());r+=`\n\nFile text of ${n.file}:${kG(e)}\n`}}catch{}if(e.ProgramFiles){r+=`\n\nProgram files: ${JSON.stringify(e.ProgramFiles)}\n`,r+="\n\nProjects::\n";let t=0;const n=e=>{r+=`\nProject '${e.projectName}' (${Rme[e.projectKind]}) ${t}\n`,r+=e.filesToString(!0),r+="\n-----------------------------------------------\n",t++};this.projectService.externalProjects.forEach(n),this.projectService.configuredProjects.forEach(n),this.projectService.inferredProjects.forEach(n)}}this.logger.msg(r,"Err")}send(e){"event"!==e.type||this.canUseEvents?this.writeMessage(e):this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${TG(e)}`)}writeMessage(e){const t=ghe(e,this.logger,this.byteLength,this.host.newLine);this.host.write(t)}event(e,t){this.send(yhe(t,e))}doOutput(e,t,n,r,i,o){const a={seq:0,type:"response",command:t,request_seq:n,success:r,performanceData:i&&Ohe(i)};if(r){let t;if(nt(e))a.body=e,t=e.metadata,delete e.metadata;else if("object"==typeof e)if(e.metadata){const{metadata:n,...r}=e;a.body=r,t=n}else a.body=e;else a.body=e;t&&(a.metadata=t)}else gn.assert(void 0===e);o&&(a.message=o),this.send(a)}semanticCheck(e,t){var n,r;const i=Hn();null==(n=Yn)||n.push(Yn.Phase.Session,"semanticCheck",{file:e,configFilePath:t.canonicalConfigFilePath});const o=_he(t,e)?sme:t.getLanguageService().getSemanticDiagnostics(e).filter(e=>!!e.file);this.sendDiagnosticsEvent(e,t,o,"semanticDiag",i),null==(r=Yn)||r.pop()}syntacticCheck(e,t){var n,r;const i=Hn();null==(n=Yn)||n.push(Yn.Phase.Session,"syntacticCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSyntacticDiagnostics(e),"syntaxDiag",i),null==(r=Yn)||r.pop()}suggestionCheck(e,t){var n,r;const i=Hn();null==(n=Yn)||n.push(Yn.Phase.Session,"suggestionCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSuggestionDiagnostics(e),"suggestionDiag",i),null==(r=Yn)||r.pop()}regionSemanticCheck(e,t,n){var r,i,o;const a=Hn();let s;null==(r=Yn)||r.push(Yn.Phase.Session,"regionSemanticCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.shouldDoRegionCheck(e)&&(s=t.getLanguageService().getRegionSemanticDiagnostics(e,n))?(this.sendDiagnosticsEvent(e,t,s.diagnostics,"regionSemanticDiag",a,s.spans),null==(o=Yn)||o.pop()):null==(i=Yn)||i.pop()}shouldDoRegionCheck(e){var t;const n=null==(t=this.projectService.getScriptInfoForNormalizedPath(e))?void 0:t.textStorage.getLineInfo().getLineCount();return!!(n&&n>=this.regionDiagLineCountThreshold)}sendDiagnosticsEvent(e,t,n,r,i,o){try{const a=gn.checkDefined(t.getScriptInfo(e)),s=Hn()-i,c={file:e,diagnostics:n.map(n=>uhe(e,t,n)),spans:null==o?void 0:o.map(e=>Lhe(e,a))};this.event(c,r),this.addDiagnosticsPerformanceData(e,r,s)}catch(e){this.logError(e,r)}}updateErrorCheck(e,t,n,r=!0){if(0===t.length)return;gn.assert(!this.suppressDiagnosticEvents);const i=this.changeSeq,o=Math.min(n,200);let a=0;const s=()=>{if(a++,t.length>a)return e.delay("checkOne",o,l)},c=(t,n)=>{if(this.semanticCheck(t,n),this.changeSeq===i)return this.getPreferences(t).disableSuggestions?s():void e.immediate("suggestionCheck",()=>{this.suggestionCheck(t,n),s()})},l=()=>{if(this.changeSeq!==i)return;let n,o=t[a];if(it(o)?o=this.toPendingErrorCheck(o):"ranges"in o&&(n=o.ranges,o=this.toPendingErrorCheck(o.file)),!o)return s();const{fileName:l,project:_}=o;return Kge(_),_.containsFile(l,r)&&(this.syntacticCheck(l,_),this.changeSeq===i)?0!==_.projectService.serverMode?s():n?e.immediate("regionSemanticCheck",()=>{const t=this.projectService.getScriptInfoForNormalizedPath(l);t&&this.regionSemanticCheck(l,_,n.map(e=>this.getRange({file:l,...e},t))),this.changeSeq===i&&e.immediate("semanticCheck",()=>c(l,_))}):void e.immediate("semanticCheck",()=>c(l,_)):void 0};t.length>a&&this.changeSeq===i&&e.delay("checkOne",n,l)}cleanProjects(e,t){if(t){this.logger.info(`cleaning ${e}`);for(const e of t)e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram()}}cleanup(){this.cleanProjects("inferred projects",this.projectService.inferredProjects),this.cleanProjects("configured projects",Be(this.projectService.configuredProjects.values())),this.cleanProjects("external projects",this.projectService.externalProjects),this.host.gc&&(this.logger.info("host.gc()"),this.host.gc())}getEncodedSyntacticClassifications(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e);return n.getEncodedSyntacticClassifications(t,e)}getEncodedSemanticClassifications(e){const{file:t,project:n}=this.getFileAndProject(e),r="2020"===e.format?"2020":"original";return n.getLanguageService().getEncodedSemanticClassifications(t,e,r)}getProject(e){return void 0===e?void 0:this.projectService.findProject(e)}getConfigFileAndProject(e){const t=this.getProject(e.projectFileName),n=_me(e.file);return{configFile:t&&t.hasConfigFile(n)?n:void 0,project:t}}getConfigFileDiagnostics(e,t,n){const r=P(Y(t.getAllProjectErrors(),t.getLanguageService().getCompilerOptionsDiagnostics()),t=>!!t.file&&t.file.fileName===e);return n?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r):O(r,e=>fhe(e,!1))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(e){return e.map(e=>({message:SV(e.messageText,this.host.newLine),start:e.start,length:e.length,category:pi(e),code:e.code,source:e.source,startLocation:e.file&&phe(Ha(e.file,e.start)),endLocation:e.file&&phe(Ha(e.file,e.start+e.length)),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:O(e.relatedInformation,dhe)}))}getCompilerOptionsDiagnostics(e){const t=this.getProject(e.projectFileName);return this.convertToDiagnosticsWithLinePosition(P(t.getLanguageService().getCompilerOptionsDiagnostics(),e=>!e.file),void 0)}convertToDiagnosticsWithLinePosition(e,t){return e.map(e=>({message:SV(e.messageText,this.host.newLine),start:e.start,length:e.length,category:pi(e),code:e.code,source:e.source,startLocation:t&&t.positionToLineOffset(e.start),endLocation:t&&t.positionToLineOffset(e.start+e.length),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:O(e.relatedInformation,dhe)}))}getDiagnosticsWorker(e,t,n,r){const{project:i,file:o}=this.getFileAndProject(e);if(t&&_he(i,o))return sme;const a=i.getScriptInfoForNormalizedPath(o),s=n(i,o);return r?this.convertToDiagnosticsWithLinePosition(s,a):s.map(e=>uhe(o,i,e))}getDefinition(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapDefinitionInfoLocations(i.getLanguageService().getDefinitionAtPosition(r,o)||sme,i);return n?this.mapDefinitionInfo(a,i):a.map(e.mapToOriginalLocation)}mapDefinitionInfoLocations(e,t){return e.map(e=>{const n=Ehe(e,t);return n?{...n,containerKind:e.containerKind,containerName:e.containerName,kind:e.kind,name:e.name,failedAliasResolution:e.failedAliasResolution,...e.unverified&&{unverified:e.unverified}}:e})}getDefinitionAndBoundSpan(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=gn.checkDefined(i.getScriptInfo(r)),s=i.getLanguageService().getDefinitionAndBoundSpan(r,o);if(!s||!s.definitions)return{definitions:sme,textSpan:void 0};const c=this.mapDefinitionInfoLocations(s.definitions,i),{textSpan:l}=s;return n?{definitions:this.mapDefinitionInfo(c,i),textSpan:Lhe(l,a)}:{definitions:c.map(e.mapToOriginalLocation),textSpan:l}}findSourceDefinition(e){var t;const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDefinitionAtPosition(n,i);let a=this.mapDefinitionInfoLocations(o||sme,r).slice();if(0===this.projectService.serverMode&&(!X(a,e=>_me(e.fileName)!==n&&!e.isAmbient)||X(a,e=>!!e.failedAliasResolution))){const e=tt(e=>e.textSpan.start,OY(this.host.useCaseSensitiveFileNames));null==a||a.forEach(t=>e.add(t));const o=r.getNoDtsResolutionProject(n),_=o.getLanguageService(),u=null==(t=_.getDefinitionAtPosition(n,i,!0,!1))?void 0:t.filter(e=>_me(e.fileName)!==n);if(X(u))for(const t of u){if(t.unverified){const n=c(t,r.getLanguageService().getProgram(),_.getProgram());if(X(n)){for(const t of n)e.add(t);continue}}e.add(t)}else{const t=a.filter(e=>_me(e.fileName)!==n&&e.isAmbient);for(const a of X(t)?t:function(){const e=r.getLanguageService(),t=e.getProgram(),o=_Q(t.getSourceFile(n),i);if((Uu(o)||fD(o))&&Px(o.parent))return Lx(o,t=>{var r;if(t===o)return;const i=null==(r=e.getDefinitionAtPosition(n,t.getStart(),!0,!1))?void 0:r.filter(e=>_me(e.fileName)!==n&&e.isAmbient).map(e=>({fileName:e.fileName,name:Gh(o)}));return X(i)?i:void 0})||sme;return sme}()){const t=s(a.fileName,n,o);if(!t)continue;const r=this.projectService.getOrCreateScriptInfoNotOpenedByClient(t,o.currentDirectory,o.directoryStructureHost,!1);if(!r)continue;o.containsScriptInfo(r)||(o.addRoot(r),o.updateGraph());const i=_.getProgram(),c=gn.checkDefined(i.getSourceFile(t));for(const t of l(a.name,c,i))e.add(t)}}a=Be(e.values())}return a=a.filter(e=>!e.isAmbient&&!e.failedAliasResolution),this.mapDefinitionInfo(a,r);function s(e,t,n){var i,o,a;const s=QT(e);if(s&&e.lastIndexOf(cR)===s.topLevelNodeModulesIndex){const c=e.substring(0,s.packageRootIndex),l=null==(i=r.getModuleResolutionCache())?void 0:i.getPackageJsonInfoCache(),_=r.getCompilationSettings(),u=kR($o(c,r.getCurrentDirectory()),SR(l,r,_));if(!u)return;const d=bR(u,{moduleResolution:2},r,r.getModuleResolutionCache()),p=$R(KR(e.substring(s.topLevelPackageNameIndex+1,s.packageRootIndex))),f=r.toPath(e);if(d&&X(d,e=>r.toPath(e)===f))return null==(o=n.resolutionCache.resolveSingleModuleNameWithoutWatching(p,t).resolvedModule)?void 0:o.resolvedFileName;{const r=`${p}/${Qk(e.substring(s.packageRootIndex+1))}`;return null==(a=n.resolutionCache.resolveSingleModuleNameWithoutWatching(r,t).resolvedModule)?void 0:a.resolvedFileName}}}function c(e,t,r){var o;const a=r.getSourceFile(e.fileName);if(!a)return;const s=_Q(t.getSourceFile(n),i),c=t.getTypeChecker().getSymbolAtLocation(s),_=c&&ed(c,277);if(!_)return;return l((null==(o=_.propertyName)?void 0:o.text)||_.name.text,a,r)}function l(e,t,n){return U(Bce.Core.getTopMostDeclarationNamesInFile(e,t),e=>{const t=n.getTypeChecker().getSymbolAtLocation(e),r=hh(e);if(t&&r)return wle.createDefinitionInfo(r,n.getTypeChecker(),t,r,!0)})}}getEmitOutput(e){const{file:t,project:n}=this.getFileAndProject(e);if(!n.shouldEmitFile(n.getScriptInfo(t)))return{emitSkipped:!0,outputFiles:[],diagnostics:[]};const r=n.getLanguageService().getEmitOutput(t);return e.richResponse?{...r,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r.diagnostics):r.diagnostics.map(e=>fhe(e,!0))}:r}mapJSDocTagInfo(e,t,n){return e?e.map(e=>{var r;return{...e,text:n?this.mapDisplayParts(e.text,t):null==(r=e.text)?void 0:r.map(e=>e.text).join("")}}):[]}mapDisplayParts(e,t){return e?e.map(e=>"linkName"!==e.kind?e:{...e,target:this.toFileSpan(e.target.fileName,e.target.textSpan,t)}):[]}mapSignatureHelpItems(e,t,n){return e.map(e=>({...e,documentation:this.mapDisplayParts(e.documentation,t),parameters:e.parameters.map(e=>({...e,documentation:this.mapDisplayParts(e.documentation,t)})),tags:this.mapJSDocTagInfo(e.tags,t,n)}))}mapDefinitionInfo(e,t){return e.map(e=>({...this.toFileSpanWithContext(e.fileName,e.textSpan,e.contextSpan,t),...e.unverified&&{unverified:e.unverified}}))}static mapToOriginalLocation(e){return e.originalFileName?(gn.assert(void 0!==e.originalTextSpan,"originalTextSpan should be present if originalFileName is"),{...e,fileName:e.originalFileName,textSpan:e.originalTextSpan,targetFileName:e.fileName,targetTextSpan:e.textSpan,contextSpan:e.originalContextSpan,targetContextSpan:e.contextSpan}):e}toFileSpan(e,t,n){const r=n.getLanguageService(),i=r.toLineColumnOffset(e,t.start),o=r.toLineColumnOffset(e,js(t));return{file:e,start:{line:i.line+1,offset:i.character+1},end:{line:o.line+1,offset:o.character+1}}}toFileSpanWithContext(e,t,n,r){const i=this.toFileSpan(e,t,r),o=n&&this.toFileSpan(e,n,r);return o?{...i,contextStart:o.start,contextEnd:o.end}:i}getTypeDefinition(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.mapDefinitionInfoLocations(n.getLanguageService().getTypeDefinitionAtPosition(t,r)||sme,n);return this.mapDefinitionInfo(i,n)}mapImplementationLocations(e,t){return e.map(e=>{const n=Ehe(e,t);return n?{...n,kind:e.kind,displayParts:e.displayParts}:e})}getImplementation(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapImplementationLocations(i.getLanguageService().getImplementationAtPosition(r,o)||sme,i);return n?a.map(({fileName:e,textSpan:t,contextSpan:n})=>this.toFileSpanWithContext(e,t,n,i)):a.map(e.mapToOriginalLocation)}getSyntacticDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?sme:this.getDiagnosticsWorker(e,!1,(e,t)=>e.getLanguageService().getSyntacticDiagnostics(t),!!e.includeLinePosition)}getSemanticDiagnosticsSync(e){const{configFile:t,project:n}=this.getConfigFileAndProject(e);return t?this.getConfigFileDiagnostics(t,n,!!e.includeLinePosition):this.getDiagnosticsWorker(e,!0,(e,t)=>e.getLanguageService().getSemanticDiagnostics(t).filter(e=>!!e.file),!!e.includeLinePosition)}getSuggestionDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?sme:this.getDiagnosticsWorker(e,!0,(e,t)=>e.getLanguageService().getSuggestionDiagnostics(t),!!e.includeLinePosition)}getJsxClosingTag(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getJsxClosingTagAtPosition(t,r);return void 0===i?void 0:{newText:i.newText,caretOffset:0}}getLinkedEditingRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getLinkedEditingRangeAtPosition(t,r),o=this.projectService.getScriptInfoForNormalizedPath(t);if(void 0!==o&&void 0!==i)return function(e,t){const n=e.ranges.map(e=>({start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(e.start+e.length)}));return e.wordPattern?{ranges:n,wordPattern:e.wordPattern}:{ranges:n}}(i,o)}getDocumentHighlights(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDocumentHighlights(n,i,e.filesToSearch);return o?t?o.map(({fileName:e,highlightSpans:t})=>{const n=r.getScriptInfo(e);return{file:e,highlightSpans:t.map(({textSpan:e,kind:t,contextSpan:r})=>({...jhe(e,r,n),kind:t}))}}):o:sme}provideInlayHints(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);return n.getLanguageService().provideInlayHints(t,e,this.getPreferences(t)).map(e=>{const{position:t,displayParts:n}=e;return{...e,position:r.positionToLineOffset(t),displayParts:null==n?void 0:n.map(({text:e,span:t,file:n})=>{if(t){gn.assertIsDefined(n,"Target file should be defined together with its span.");const r=this.projectService.getScriptInfo(n);return{text:e,span:{start:r.positionToLineOffset(t.start),end:r.positionToLineOffset(t.start+t.length),file:n}}}return{text:e}})}})}mapCode(e){var t;const n=this.getHostFormatOptions(),r=this.getHostPreferences(),{file:i,languageService:o}=this.getFileAndLanguageServiceForSyntacticOperation(e),a=this.projectService.getScriptInfoForNormalizedPath(i),s=null==(t=e.mapping.focusLocations)?void 0:t.map(e=>e.map(e=>{const t=a.lineOffsetToPosition(e.start.line,e.start.offset);return{start:t,length:a.lineOffsetToPosition(e.end.line,e.end.offset)-t}})),c=o.mapCode(i,e.mapping.contents,s,n,r);return this.mapTextChangesToCodeEdits(c)}getCopilotRelatedInfo(){return{relatedFiles:[]}}setCompilerOptionsForInferredProjects(e){this.projectService.setCompilerOptionsForInferredProjects(e.options,e.projectRootPath)}getProjectInfo(e){return this.getProjectInfoWorker(e.file,e.projectFileName,e.needFileNameList,e.needDefaultConfiguredProjectInfo,!1)}getProjectInfoWorker(e,t,n,r,i){const{project:o}=this.getFileAndProjectWorker(e,t);Kge(o);return{configFileName:o.getProjectName(),languageServiceDisabled:!o.languageServiceEnabled,fileNames:n?o.getFileNames(!1,i):void 0,configuredProjectInfo:r?this.getDefaultConfiguredProjectInfo(e):void 0}}getDefaultConfiguredProjectInfo(e){var t;const n=this.projectService.getScriptInfo(e);if(!n)return;const r=this.projectService.findDefaultConfiguredProjectWorker(n,3);if(!r)return;let i,o;return r.seenProjects.forEach((e,t)=>{t!==r.defaultProject&&(3!==e?(i??(i=[])).push(_me(t.getConfigFilePath())):(o??(o=[])).push(_me(t.getConfigFilePath())))}),null==(t=r.seenConfigs)||t.forEach(e=>(i??(i=[])).push(e)),{notMatchedByConfig:i,notInProject:o,defaultProject:r.defaultProject&&_me(r.defaultProject.getConfigFilePath())}}getRenameInfo(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.getPreferences(t);return n.getLanguageService().getRenameInfo(t,r,i)}getProjects(e,t,n){let r,i;if(e.projectFileName){const t=this.getProject(e.projectFileName);t&&(r=[t])}else{const o=t?this.projectService.getScriptInfoEnsuringProjectsUptoDate(e.file):this.projectService.getScriptInfo(e.file);if(!o)return n?sme:(this.projectService.logErrorForScriptInfoNotFound(e.file),ime.ThrowNoProject());t||this.projectService.ensureDefaultProjectForFile(o),r=o.containingProjects,i=this.projectService.getSymlinkedProjects(o)}return r=P(r,e=>e.languageServiceEnabled&&!e.isOrphan()),n||r&&r.length||i?i?{projects:r,symLinkedProjects:i}:r:(this.projectService.logErrorForScriptInfoNotFound(e.file??e.projectFileName),ime.ThrowNoProject())}getDefaultProject(e){if(e.projectFileName){const t=this.getProject(e.projectFileName);if(t)return t;if(!e.file)return ime.ThrowNoProject()}return this.projectService.getScriptInfo(e.file).getDefaultProject()}getRenameLocations(e,t){const n=_me(e.file),r=this.getPositionInFile(e,n),i=this.getProjects(e),o=this.getDefaultProject(e),a=this.getPreferences(n),s=this.mapRenameInfo(o.getLanguageService().getRenameInfo(n,r,a),gn.checkDefined(this.projectService.getScriptInfo(n)));if(!s.canRename)return t?{info:s,locs:[]}:[];const c=function(e,t,n,r,i,o,a){const s=She(e,t,n,bhe(t,n,!0),The,(e,t)=>e.getLanguageService().findRenameLocations(t.fileName,t.pos,r,i,o),(e,t)=>t(Nhe(e)));if(nt(s))return s;const c=[],l=vhe(a);return s.forEach((e,t)=>{for(const n of e)l.has(n)||Dhe(Nhe(n),t)||(c.push(n),l.add(n))}),c}(i,o,{fileName:e.file,pos:r},!!e.findInStrings,!!e.findInComments,a,this.host.useCaseSensitiveFileNames);return t?{info:s,locs:this.toSpanGroups(c)}:c}mapRenameInfo(e,t){if(e.canRename){const{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:c}=e;return{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:Lhe(c,t)}}return e}toSpanGroups(e){const t=new Map;for(const{fileName:n,textSpan:r,contextSpan:i,originalContextSpan:o,originalTextSpan:a,originalFileName:s,...c}of e){let e=t.get(n);e||t.set(n,e={file:n,locs:[]});const o=gn.checkDefined(this.projectService.getScriptInfo(n));e.locs.push({...jhe(r,i,o),...c})}return Be(t.values())}getReferences(e,t){const n=_me(e.file),r=this.getProjects(e),i=this.getPositionInFile(e,n),o=function(e,t,n,r,i){var o,a;const s=She(e,t,n,bhe(t,n,!1),The,(e,t)=>(i.info(`Finding references to ${t.fileName} position ${t.pos} in project ${e.getProjectName()}`),e.getLanguageService().findReferences(t.fileName,t.pos)),(e,t)=>{t(Nhe(e.definition));for(const n of e.references)t(Nhe(n))});if(nt(s))return s;const c=s.get(t);if(void 0===(null==(a=null==(o=null==c?void 0:c[0])?void 0:o.references[0])?void 0:a.isDefinition))s.forEach(e=>{for(const t of e)for(const e of t.references)delete e.isDefinition});else{const e=vhe(r);for(const t of c)for(const n of t.references)if(n.isDefinition){e.add(n);break}const t=new Set;for(;;){let n=!1;if(s.forEach((r,i)=>{t.has(i)||i.getLanguageService().updateIsDefinitionOfReferencedSymbols(r,e)&&(t.add(i),n=!0)}),!n)break}s.forEach((e,n)=>{if(!t.has(n))for(const t of e)for(const e of t.references)e.isDefinition=!1})}const l=[],_=vhe(r);return s.forEach((e,t)=>{for(const n of e){const e=Dhe(Nhe(n.definition),t),i=void 0===e?n.definition:{...n.definition,textSpan:Ys(e.pos,n.definition.textSpan.length),fileName:e.fileName,contextSpan:Fhe(n.definition,t)};let o=T(l,e=>IY(e.definition,i,r));o||(o={definition:i,references:[]},l.push(o));for(const e of n.references)_.has(e)||Dhe(Nhe(e),t)||(_.add(e),o.references.push(e))}}),l.filter(e=>0!==e.references.length)}(r,this.getDefaultProject(e),{fileName:e.file,pos:i},this.host.useCaseSensitiveFileNames,this.logger);if(!t)return o;const a=this.getPreferences(n),s=this.getDefaultProject(e),c=s.getScriptInfoForNormalizedPath(n),l=s.getLanguageService().getQuickInfoAtPosition(n,i),_=l?o7(l.displayParts):"",u=l&&l.textSpan,d=u?c.positionToLineOffset(u.start).offset:0,p=u?c.getSnapshot().getText(u.start,js(u)):"";return{refs:R(o,e=>e.references.map(e=>Bhe(this.projectService,e,a))),symbolName:p,symbolStartOffset:d,symbolDisplayString:_}}getFileReferences(e,t){const n=this.getProjects(e),r=_me(e.file),i=this.getPreferences(r),o={fileName:r,pos:0},a=She(n,this.getDefaultProject(e),o,o,khe,e=>(this.logger.info(`Finding references to file ${r} in project ${e.getProjectName()}`),e.getLanguageService().getFileReferences(r)));let s;if(nt(a))s=a;else{s=[];const e=vhe(this.host.useCaseSensitiveFileNames);a.forEach(t=>{for(const n of t)e.has(n)||(s.push(n),e.add(n))})}if(!t)return s;return{refs:s.map(e=>Bhe(this.projectService,e,i)),symbolName:`"${e.file}"`}}openClientFile(e,t,n,r){this.projectService.openClientFileWithNormalizedPath(e,t,n,!1,r)}getPosition(e,t){return void 0!==e.position?e.position:t.lineOffsetToPosition(e.line,e.offset)}getPositionInFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(t);return this.getPosition(e,n)}getFileAndProject(e){return this.getFileAndProjectWorker(e.file,e.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(e){const{file:t,project:n}=this.getFileAndProject(e);return{file:t,languageService:n.getLanguageService(!1)}}getFileAndProjectWorker(e,t){const n=_me(e);return{file:n,project:this.getProject(t)||this.projectService.ensureDefaultProjectForFile(n)}}getOutliningSpans(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getOutliningSpans(n);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return i.map(t=>({textSpan:Lhe(t.textSpan,e),hintSpan:Lhe(t.hintSpan,e),bannerText:t.bannerText,autoCollapse:t.autoCollapse,kind:t.kind}))}return i}getTodoComments(e){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getTodoComments(t,e.descriptors)}getDocCommentTemplate(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getDocCommentTemplateAtPosition(t,r,this.getPreferences(t),this.getFormatOptions(t))}getSpanOfEnclosingComment(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.onlyMultiLine,i=this.getPositionInFile(e,t);return n.getSpanOfEnclosingComment(t,i,r)}getIndentation(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=e.options?Sge(e.options):this.getFormatOptions(t);return{position:r,indentation:n.getIndentationAtPosition(t,r,i)}}getBreakpointStatement(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getBreakpointStatementAtPosition(t,r)}getNameOrDottedNameSpan(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getNameOrDottedNameSpan(t,r,r)}isValidBraceCompletion(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.isValidBraceCompletionAtPosition(t,r,e.openingBrace.charCodeAt(0))}getQuickInfoWorker(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPreferences(n),a=r.getLanguageService().getQuickInfoAtPosition(n,this.getPosition(e,i),o.maximumHoverLength,e.verbosityLevel);if(!a)return;const s=!!o.displayPartsForJSDoc;if(t){const e=o7(a.displayParts);return{kind:a.kind,kindModifiers:a.kindModifiers,start:i.positionToLineOffset(a.textSpan.start),end:i.positionToLineOffset(js(a.textSpan)),displayString:e,documentation:s?this.mapDisplayParts(a.documentation,r):o7(a.documentation),tags:this.mapJSDocTagInfo(a.tags,r,s),canIncreaseVerbosityLevel:a.canIncreaseVerbosityLevel}}return s?a:{...a,tags:this.mapJSDocTagInfo(a.tags,r,!1)}}getFormattingEditsForRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=r.lineOffsetToPosition(e.endLine,e.endOffset),a=n.getFormattingEditsForRange(t,i,o,this.getFormatOptions(t));if(a)return a.map(e=>this.convertTextChangeToCodeEdit(e,r))}getFormattingEditsForRangeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?Sge(e.options):this.getFormatOptions(t);return n.getFormattingEditsForRange(t,e.position,e.endPosition,r)}getFormattingEditsForDocumentFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?Sge(e.options):this.getFormatOptions(t);return n.getFormattingEditsForDocument(t,r)}getFormattingEditsAfterKeystrokeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?Sge(e.options):this.getFormatOptions(t);return n.getFormattingEditsAfterKeystroke(t,e.position,e.key,r)}getFormattingEditsAfterKeystroke(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=this.getFormatOptions(t),a=n.getFormattingEditsAfterKeystroke(t,i,e.key,o);if("\n"===e.key&&(!a||0===a.length||function(e,t){return e.every(e=>js(e.span)({start:r.positionToLineOffset(e.span.start),end:r.positionToLineOffset(js(e.span)),newText:e.newText?e.newText:""}))}getCompletions(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getCompletionsAtPosition(n,o,{...Dge(this.getPreferences(n)),triggerCharacter:e.triggerCharacter,triggerKind:e.triggerKind,includeExternalModuleExports:e.includeExternalModuleExports,includeInsertTextCompletions:e.includeInsertTextCompletions},r.projectService.getFormatCodeOptions(n));if(void 0===a)return;if("completions-full"===t)return a;const s=e.prefix||"",c=U(a.entries,e=>{if(a.isMemberCompletion||en(e.name.toLowerCase(),s.toLowerCase())){const t=e.replacementSpan?Lhe(e.replacementSpan,i):void 0;return{...e,replacementSpan:t,hasAction:e.hasAction||void 0,symbol:void 0}}});if("completions"===t)return a.metadata&&(c.metadata=a.metadata),c;return{...a,optionalReplacementSpan:a.optionalReplacementSpan&&Lhe(a.optionalReplacementSpan,i),entries:c}}getCompletionEntryDetails(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.projectService.getFormatCodeOptions(n),s=!!this.getPreferences(n).displayPartsForJSDoc,c=U(e.entryNames,e=>{const{name:t,source:i,data:s}="string"==typeof e?{name:e,source:void 0,data:void 0}:e;return r.getLanguageService().getCompletionEntryDetails(n,o,t,a,i,this.getPreferences(n),s?st(s,Jhe):void 0)});return t?s?c:c.map(e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)})):c.map(e=>({...e,codeActions:O(e.codeActions,e=>this.mapCodeAction(e)),documentation:this.mapDisplayParts(e.documentation,r),tags:this.mapJSDocTagInfo(e.tags,r,s)}))}getCompileOnSaveAffectedFileList(e){const t=this.getProjects(e,!0,!0),n=this.projectService.getScriptInfo(e.file);return n?function(e,t,n,r){const i=B(nt(n)?n:n.projects,t=>r(t,e));return!nt(n)&&n.symLinkedProjects&&n.symLinkedProjects.forEach((e,n)=>{const o=t(n);i.push(...R(e,e=>r(e,o)))}),ne(i,bt)}(n,e=>this.projectService.getScriptInfoForPath(e),t,(e,t)=>{if(!e.compileOnSaveEnabled||!e.languageServiceEnabled||e.isOrphan())return;const n=e.getCompilationSettings();return n.noEmit||SO(t.fileName)&&!function(e){return jS(e)||!!e.emitDecoratorMetadata}(n)?void 0:{projectFileName:e.getProjectName(),fileNames:e.getCompileOnSaveAffectedFileList(t),projectUsesOutFile:!!n.outFile}}):sme}emitFile(e){const{file:t,project:n}=this.getFileAndProject(e);if(n||ime.ThrowNoProject(),!n.languageServiceEnabled)return!!e.richResponse&&{emitSkipped:!0,diagnostics:[]};const r=n.getScriptInfo(t),{emitSkipped:i,diagnostics:o}=n.emitFile(r,(e,t,n)=>this.host.writeFile(e,t,n));return e.richResponse?{emitSkipped:i,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(o):o.map(e=>fhe(e,!0))}:!i}getSignatureHelpItems(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getSignatureHelpItems(n,o,e),s=!!this.getPreferences(n).displayPartsForJSDoc;if(a&&t){const e=a.applicableSpan;return{...a,applicableSpan:{start:i.positionToLineOffset(e.start),end:i.positionToLineOffset(e.start+e.length)},items:this.mapSignatureHelpItems(a.items,r,s)}}return s||!a?a:{...a,items:a.items.map(e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)}))}}toPendingErrorCheck(e){const t=_me(e),n=this.projectService.tryGetDefaultProjectForFile(t);return n&&{fileName:t,project:n}}getDiagnostics(e,t,n){this.suppressDiagnosticEvents||n.length>0&&this.updateErrorCheck(e,n,t)}change(e){const t=this.projectService.getScriptInfo(e.file);gn.assert(!!t),t.textStorage.switchToScriptVersionCache();const n=t.lineOffsetToPosition(e.line,e.offset),r=t.lineOffsetToPosition(e.endLine,e.endOffset);n>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(t,K({span:{start:n,length:r-n},newText:e.insertString})))}reload(e){const t=_me(e.file),n=void 0===e.tmpfile?void 0:_me(e.tmpfile),r=this.projectService.getScriptInfoForNormalizedPath(t);r&&(this.changeSeq++,r.reloadFromFile(n))}saveToTmp(e,t){const n=this.projectService.getScriptInfo(e);n&&n.saveTo(t)}closeClientFile(e){if(!e)return;const t=Ko(e);this.projectService.closeClientFile(t)}mapLocationNavigationBarItems(e,t){return O(e,e=>({text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map(e=>Lhe(e,t)),childItems:this.mapLocationNavigationBarItems(e.childItems,t),indent:e.indent}))}getNavigationBarItems(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationBarItems(n);return i?t?this.mapLocationNavigationBarItems(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}toLocationNavigationTree(e,t){return{text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map(e=>Lhe(e,t)),nameSpan:e.nameSpan&&Lhe(e.nameSpan,t),childItems:O(e.childItems,e=>this.toLocationNavigationTree(e,t))}}getNavigationTree(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationTree(n);return i?t?this.toLocationNavigationTree(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}getNavigateToItems(e,t){const n=this.getFullNavigateToItems(e);return R(n,t?({project:e,navigateToItems:t})=>t.map(t=>{const n=e.getScriptInfo(t.fileName),r={name:t.name,kind:t.kind,kindModifiers:t.kindModifiers,isCaseSensitive:t.isCaseSensitive,matchKind:t.matchKind,file:t.fileName,start:n.positionToLineOffset(t.textSpan.start),end:n.positionToLineOffset(js(t.textSpan))};return t.kindModifiers&&""!==t.kindModifiers&&(r.kindModifiers=t.kindModifiers),t.containerName&&t.containerName.length>0&&(r.containerName=t.containerName),t.containerKind&&t.containerKind.length>0&&(r.containerKind=t.containerKind),r}):({navigateToItems:e})=>e)}getFullNavigateToItems(e){const{currentFileOnly:t,searchValue:n,maxResultCount:r,projectFileName:i}=e;if(t){gn.assertIsDefined(e.file);const{file:t,project:i}=this.getFileAndProject(e);return[{project:i,navigateToItems:i.getLanguageService().getNavigateToItems(n,r,t)}]}const o=this.getHostPreferences(),a=[],s=new Map;if(e.file||i){xhe(this.getProjects(e),void 0,e=>c(e))}else this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(e=>c(e));return a;function c(e){const t=P(e.getLanguageService().getNavigateToItems(n,r,void 0,e.isNonTsProject(),o.excludeLibrarySymbolsInNavTo),t=>function(e){const t=e.name;if(!s.has(t))return s.set(t,[e]),!0;const n=s.get(t);for(const t of n)if(l(t,e))return!1;return n.push(e),!0}(t)&&!Dhe(Nhe(t),e));t.length&&a.push({project:e,navigateToItems:t})}function l(e,t){return e===t||!(!e||!t)&&(e.containerKind===t.containerKind&&e.containerName===t.containerName&&e.fileName===t.fileName&&e.isCaseSensitive===t.isCaseSensitive&&e.kind===t.kind&&e.kindModifiers===t.kindModifiers&&e.matchKind===t.matchKind&&e.name===t.name&&e.textSpan.start===t.textSpan.start&&e.textSpan.length===t.textSpan.length)}}getSupportedCodeFixes(e){if(!e)return s7();if(e.file){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getSupportedCodeFixes(t)}const t=this.getProject(e.projectFileName);return t||ime.ThrowNoProject(),t.getLanguageService().getSupportedCodeFixes()}isLocation(e){return void 0!==e.line}extractPositionOrRange(e,t){let n,r;var i;return this.isLocation(e)?n=void 0!==(i=e).position?i.position:t.lineOffsetToPosition(i.line,i.offset):r=this.getRange(e,t),gn.checkDefined(void 0===n?r:n)}getRange(e,t){const{startPosition:n,endPosition:r}=this.getStartAndEndPosition(e,t);return{pos:n,end:r}}getApplicableRefactors(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getApplicableRefactors(t,this.extractPositionOrRange(e,r),this.getPreferences(t),e.triggerReason,e.kind,e.includeInteractiveActions).map(e=>({...e,actions:e.actions.map(e=>({...e,range:e.range?{start:phe({line:e.range.start.line,character:e.range.start.offset}),end:phe({line:e.range.end.line,character:e.range.end.offset})}:void 0}))}))}getEditsForRefactor(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getEditsForRefactor(n,this.getFormatOptions(n),this.extractPositionOrRange(e,i),e.refactor,e.action,this.getPreferences(n),e.interactiveRefactorArguments);if(void 0===o)return{edits:[]};if(t){const{renameFilename:e,renameLocation:t,edits:n}=o;let i;if(void 0!==e&&void 0!==t){i=Rhe(aY(r.getScriptInfoForNormalizedPath(_me(e)).getSnapshot()),e,t,n)}return{renameLocation:i,renameFilename:e,edits:this.mapTextChangesToCodeEdits(n),notApplicableReason:o.notApplicableReason}}return o}getMoveToRefactoringFileSuggestions(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getMoveToRefactoringFileSuggestions(t,this.extractPositionOrRange(e,r),this.getPreferences(t))}preparePasteEdits(e){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().preparePasteEditsForFile(t,e.copiedTextSpan.map(e=>this.getRange({file:t,startLine:e.start.line,startOffset:e.start.offset,endLine:e.end.line,endOffset:e.end.offset},this.projectService.getScriptInfoForNormalizedPath(t))))}getPasteEdits(e){const{file:t,project:n}=this.getFileAndProject(e);if(Ome(t))return;const r=e.copiedFrom?{file:e.copiedFrom.file,range:e.copiedFrom.spans.map(t=>this.getRange({file:e.copiedFrom.file,startLine:t.start.line,startOffset:t.start.offset,endLine:t.end.line,endOffset:t.end.offset},n.getScriptInfoForNormalizedPath(_me(e.copiedFrom.file))))}:void 0,i=n.getLanguageService().getPasteEdits({targetFile:t,pastedText:e.pastedText,pasteLocations:e.pasteLocations.map(e=>this.getRange({file:t,startLine:e.start.line,startOffset:e.start.offset,endLine:e.end.line,endOffset:e.end.offset},n.getScriptInfoForNormalizedPath(t))),copiedFrom:r,preferences:this.getPreferences(t)},this.getFormatOptions(t));return i&&this.mapPasteEditsAction(i)}organizeImports(e,t){gn.assert("file"===e.scope.type);const{file:n,project:r}=this.getFileAndProject(e.scope.args),i=r.getLanguageService().organizeImports({fileName:n,mode:e.mode??(e.skipDestructiveCodeActions?"SortAndCombine":void 0),type:"file"},this.getFormatOptions(n),this.getPreferences(n));return t?this.mapTextChangesToCodeEdits(i):i}getEditsForFileRename(e,t){const n=_me(e.oldFilePath),r=_me(e.newFilePath),i=this.getHostFormatOptions(),o=this.getHostPreferences(),a=new Set,s=[];return this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject(e=>{const t=e.getLanguageService().getEditsForFileRename(n,r,i,o),c=[];for(const e of t)a.has(e.fileName)||(s.push(e),c.push(e.fileName));for(const e of c)a.add(e)}),t?s.map(e=>this.mapTextChangeToCodeEdit(e)):s}getCodeFixes(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),{startPosition:o,endPosition:a}=this.getStartAndEndPosition(e,i);let s;try{s=r.getLanguageService().getCodeFixesAtPosition(n,o,a,e.errorCodes,this.getFormatOptions(n),this.getPreferences(n))}catch(t){const i=t instanceof Error?t:new Error(t),s=r.getLanguageService(),c=[...s.getSyntacticDiagnostics(n),...s.getSemanticDiagnostics(n),...s.getSuggestionDiagnostics(n)].filter(e=>Ks(o,a-o,e.start,e.length)).map(e=>e.code),l=e.errorCodes.find(e=>!c.includes(e));throw void 0!==l&&(i.message+=`\nAdditional information: BADCLIENT: Bad error code, ${l} not found in range ${o}..${a} (found: ${c.join(", ")})`),i}return t?s.map(e=>this.mapCodeFixAction(e)):s}getCombinedCodeFix({scope:e,fixId:t},n){gn.assert("file"===e.type);const{file:r,project:i}=this.getFileAndProject(e.args),o=i.getLanguageService().getCombinedCodeFix({type:"file",fileName:r},t,this.getFormatOptions(r),this.getPreferences(r));return n?{changes:this.mapTextChangesToCodeEdits(o.changes),commands:o.commands}:o}applyCodeActionCommand(e){const t=e.command;for(const e of rt(t)){const{file:t,project:n}=this.getFileAndProject(e);n.getLanguageService().applyCodeActionCommand(e,this.getFormatOptions(t)).then(e=>{},e=>{})}return{}}getStartAndEndPosition(e,t){let n,r;return void 0!==e.startPosition?n=e.startPosition:(n=t.lineOffsetToPosition(e.startLine,e.startOffset),e.startPosition=n),void 0!==e.endPosition?r=e.endPosition:(r=t.lineOffsetToPosition(e.endLine,e.endOffset),e.endPosition=r),{startPosition:n,endPosition:r}}mapCodeAction({description:e,changes:t,commands:n}){return{description:e,changes:this.mapTextChangesToCodeEdits(t),commands:n}}mapCodeFixAction({fixName:e,description:t,changes:n,commands:r,fixId:i,fixAllDescription:o}){return{fixName:e,description:t,changes:this.mapTextChangesToCodeEdits(n),commands:r,fixId:i,fixAllDescription:o}}mapPasteEditsAction({edits:e,fixId:t}){return{edits:this.mapTextChangesToCodeEdits(e),fixId:t}}mapTextChangesToCodeEdits(e){return e.map(e=>this.mapTextChangeToCodeEdit(e))}mapTextChangeToCodeEdit(e){const t=this.projectService.getScriptInfoOrConfig(e.fileName);return!!e.isNewFile==!!t&&(t||this.projectService.logErrorForScriptInfoNotFound(e.fileName),gn.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!e.isNewFile,hasScriptInfo:!!t}))),t?{fileName:e.fileName,textChanges:e.textChanges.map(e=>function(e,t){return{start:Mhe(t,e.span.start),end:Mhe(t,js(e.span)),newText:e.newText}}(e,t))}:function(e){gn.assert(1===e.textChanges.length);const t=xe(e.textChanges);return gn.assert(0===t.span.start&&0===t.span.length),{fileName:e.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:t.newText}]}}(e)}convertTextChangeToCodeEdit(e,t){return{start:t.positionToLineOffset(e.span.start),end:t.positionToLineOffset(e.span.start+e.span.length),newText:e.newText?e.newText:""}}getBraceMatching(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getBraceMatchingAtPosition(n,o);return a?t?a.map(e=>Lhe(e,i)):a:void 0}getDiagnosticsForProject(e,t,n){if(this.suppressDiagnosticEvents)return;const{fileNames:r,languageServiceDisabled:i}=this.getProjectInfoWorker(n,void 0,!0,void 0,!0);if(i)return;const o=r.filter(e=>!e.includes("lib.d.ts"));if(0===o.length)return;const a=[],s=[],c=[],l=[],_=_me(n),u=this.projectService.ensureDefaultProjectForFile(_);for(const e of o)if(this.getCanonicalFileName(e)===this.getCanonicalFileName(n))a.push(e);else{this.projectService.getScriptInfo(e).isScriptOpen()?s.push(e):SO(e)?l.push(e):c.push(e)}const d=[...a,...s,...c,...l].map(e=>({fileName:e,project:u}));this.updateErrorCheck(e,d,t,!1)}configurePlugin(e){this.projectService.configurePlugin(e)}getSmartSelectionRange(e,t){const{locations:n}=e,{file:r,languageService:i}=this.getFileAndLanguageServiceForSyntacticOperation(e),o=gn.checkDefined(this.projectService.getScriptInfo(r));return O(n,e=>{const n=this.getPosition(e,o),a=i.getSmartSelectionRange(r,n);return t?this.mapSelectionRange(a,o):a})}toggleLineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfo(n),o=this.getRange(e,i),a=r.toggleLineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}toggleMultilineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.toggleMultilineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}commentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.commentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}uncommentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.uncommentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map(t=>this.convertTextChangeToCodeEdit(t,e))}return a}mapSelectionRange(e,t){const n={textSpan:Lhe(e.textSpan,t)};return e.parent&&(n.parent=this.mapSelectionRange(e.parent,t)),n}getScriptInfoFromProjectService(e){const t=_me(e),n=this.projectService.getScriptInfoForNormalizedPath(t);return n||(this.projectService.logErrorForScriptInfoNotFound(t),ime.ThrowNoProject())}toProtocolCallHierarchyItem(e){const t=this.getScriptInfoFromProjectService(e.file);return{name:e.name,kind:e.kind,kindModifiers:e.kindModifiers,file:e.file,containerName:e.containerName,span:Lhe(e.span,t),selectionSpan:Lhe(e.selectionSpan,t)}}toProtocolCallHierarchyIncomingCall(e){const t=this.getScriptInfoFromProjectService(e.from.file);return{from:this.toProtocolCallHierarchyItem(e.from),fromSpans:e.fromSpans.map(e=>Lhe(e,t))}}toProtocolCallHierarchyOutgoingCall(e,t){return{to:this.toProtocolCallHierarchyItem(e.to),fromSpans:e.fromSpans.map(e=>Lhe(e,t))}}prepareCallHierarchy(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);if(r){const i=this.getPosition(e,r),o=n.getLanguageService().prepareCallHierarchy(t,i);return o&&i0(o,e=>this.toProtocolCallHierarchyItem(e))}}provideCallHierarchyIncomingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyIncomingCalls(t,this.getPosition(e,r)).map(e=>this.toProtocolCallHierarchyIncomingCall(e))}provideCallHierarchyOutgoingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyOutgoingCalls(t,this.getPosition(e,r)).map(e=>this.toProtocolCallHierarchyOutgoingCall(e,r))}getCanonicalFileName(e){return Ko(this.host.useCaseSensitiveFileNames?e:mt(e))}exit(){}notRequired(e){return e&&this.doOutput(void 0,e.command,e.seq,!0,this.performanceData),{responseRequired:!1,performanceData:this.performanceData}}requiredResponse(e){return{response:e,responseRequired:!0,performanceData:this.performanceData}}addProtocolHandler(e,t){if(this.handlers.has(e))throw new Error(`Protocol handler already exists for command "${e}"`);this.handlers.set(e,t)}setCurrentRequest(e){gn.assert(void 0===this.currentRequestId),this.currentRequestId=e,this.cancellationToken.setRequest(e)}resetCurrentRequest(e){gn.assert(this.currentRequestId===e),this.currentRequestId=void 0,this.cancellationToken.resetRequest(e)}executeWithRequestId(e,t,n){const r=this.performanceData;try{return this.performanceData=n,this.setCurrentRequest(e),t()}finally{this.resetCurrentRequest(e),this.performanceData=r}}executeCommand(e){const t=this.handlers.get(e.command);if(t){const n=this.executeWithRequestId(e.seq,()=>t(e),void 0);return this.projectService.enableRequestedPlugins(),n}return this.logger.msg(`Unrecognized JSON command:${TG(e)}`,"Err"),this.doOutput(void 0,"unknown",e.seq,!1,void 0,`Unrecognized JSON command: ${e.command}`),{responseRequired:!1}}onMessage(e){var t,n,r,i,o,a,s;let c;this.gcTimer.scheduleCollect();const l=this.performanceData;let _,u;this.logger.hasLevel(2)&&(c=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${kG(this.toStringMessage(e))}`));try{_=this.parseMessage(e),u=_.arguments&&_.arguments.file?_.arguments:void 0,null==(t=Yn)||t.instant(Yn.Phase.Session,"request",{seq:_.seq,command:_.command}),null==(n=Yn)||n.push(Yn.Phase.Session,"executeCommand",{seq:_.seq,command:_.command},!0);const{response:o,responseRequired:a,performanceData:s}=this.executeCommand(_);if(null==(r=Yn)||r.pop(),this.logger.hasLevel(2)){const e=(d=this.hrtime(c),(1e9*d[0]+d[1])/1e6).toFixed(4);a?this.logger.perftrc(`${_.seq}::${_.command}: elapsed time (in milliseconds) ${e}`):this.logger.perftrc(`${_.seq}::${_.command}: async elapsed time (in milliseconds) ${e}`)}null==(i=Yn)||i.instant(Yn.Phase.Session,"response",{seq:_.seq,command:_.command,success:!!o}),o?this.doOutput(o,_.command,_.seq,!0,s):a&&this.doOutput(void 0,_.command,_.seq,!1,s,"No content available.")}catch(t){if(null==(o=Yn)||o.popAll(),t instanceof Fr)return null==(a=Yn)||a.instant(Yn.Phase.Session,"commandCanceled",{seq:null==_?void 0:_.seq,command:null==_?void 0:_.command}),void this.doOutput({canceled:!0},_.command,_.seq,!0,this.performanceData);this.logErrorWorker(t,this.toStringMessage(e),u),null==(s=Yn)||s.instant(Yn.Phase.Session,"commandError",{seq:null==_?void 0:_.seq,command:null==_?void 0:_.command,message:t.message}),this.doOutput(void 0,_?_.command:"unknown",_?_.seq:0,!1,this.performanceData,"Error processing request. "+t.message+"\n"+t.stack)}finally{this.performanceData=l}var d}parseMessage(e){return JSON.parse(e)}toStringMessage(e){return e}getFormatOptions(e){return this.projectService.getFormatCodeOptions(e)}getPreferences(e){return this.projectService.getPreferences(e)}getHostFormatOptions(){return this.projectService.getHostFormatCodeOptions()}getHostPreferences(){return this.projectService.getHostPreferences()}};function Ohe(e){const t=e.diagnosticsDuration&&Be(e.diagnosticsDuration,([e,t])=>({...t,file:e}));return{...e,diagnosticsDuration:t}}function Lhe(e,t){return{start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(js(e))}}function jhe(e,t,n){const r=Lhe(e,n),i=t&&Lhe(t,n);return i?{...r,contextStart:i.start,contextEnd:i.end}:r}function Mhe(e,t){return ohe(e)?{line:(n=e.getLineAndCharacterOfPosition(t)).line+1,offset:n.character+1}:e.positionToLineOffset(t);var n}function Rhe(e,t,n,r){const i=function(e,t,n){for(const{fileName:r,textChanges:i}of n)if(r===t)for(let t=i.length-1;t>=0;t--){const{newText:n,span:{start:r,length:o}}=i[t];e=e.slice(0,r)+n+e.slice(r+o)}return e}(e,t,r),{line:o,character:a}=Wa(za(i),n);return{line:o+1,offset:a+1}}function Bhe(e,{fileName:t,textSpan:n,contextSpan:r,isWriteAccess:i,isDefinition:o},{disableLineTextInReferences:a}){const s=gn.checkDefined(e.getScriptInfo(t)),c=jhe(n,r,s),l=a?void 0:function(e,t){const n=e.lineToTextSpan(t.start.line-1);return e.getSnapshot().getText(n.start,js(n)).replace(/\r|\n/g,"")}(s,c);return{file:t,...c,lineText:l,isWriteAccess:i,isDefinition:o}}function Jhe(e){return void 0===e||e&&"object"==typeof e&&"string"==typeof e.exportName&&(void 0===e.fileName||"string"==typeof e.fileName)&&(void 0===e.ambientModuleName||"string"==typeof e.ambientModuleName&&(void 0===e.isPackageJsonImport||"boolean"==typeof e.isPackageJsonImport))}var zhe=(e=>(e[e.PreStart=0]="PreStart",e[e.Start=1]="Start",e[e.Entire=2]="Entire",e[e.Mid=3]="Mid",e[e.End=4]="End",e[e.PostEnd=5]="PostEnd",e))(zhe||{}),qhe=class{constructor(){this.goSubtree=!0,this.lineIndex=new Khe,this.endBranch=[],this.state=2,this.initialText="",this.trailingText="",this.lineIndex.root=new Hhe,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(e,t){t&&(this.trailingText=""),e=e?this.initialText+e+this.trailingText:this.initialText+this.trailingText;const n=Khe.linesFromText(e).lines;let r,i;n.length>1&&""===n[n.length-1]&&n.pop();for(let e=this.endBranch.length-1;e>=0;e--)this.endBranch[e].updateCounts(),0===this.endBranch[e].charCount()&&(i=this.endBranch[e],r=e>0?this.endBranch[e-1]:this.branchNode);i&&r.remove(i);const o=this.startPath[this.startPath.length-1];if(n.length>0)if(o.text=n[0],n.length>1){let e=new Array(n.length-1),t=o;for(let t=1;t=0;){const n=this.startPath[r];e=n.insertAt(t,e),r--,t=n}let i=e.length;for(;i>0;){const t=new Hhe;t.add(this.lineIndex.root),e=t.insertAt(this.lineIndex.root,e),i=e.length,this.lineIndex.root=t}this.lineIndex.root.updateCounts()}else for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts();else{this.startPath[this.startPath.length-2].remove(o);for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts()}return this.lineIndex}post(e,t,n){n===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(e,t,n,r,i){const o=this.stack[this.stack.length-1];let a;function s(e){return e.isLeaf()?new Ghe(""):new Hhe}switch(2===this.state&&1===i&&(this.state=1,this.branchNode=o,this.lineCollectionAtBranch=n),i){case 0:this.goSubtree=!1,4!==this.state&&o.add(n);break;case 1:4===this.state?this.goSubtree=!1:(a=s(n),o.add(a),this.startPath.push(a));break;case 2:4!==this.state?(a=s(n),o.add(a),this.startPath.push(a)):n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 3:this.goSubtree=!1;break;case 4:4!==this.state?this.goSubtree=!1:n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 5:this.goSubtree=!1,1!==this.state&&o.add(n)}this.goSubtree&&this.stack.push(a)}leaf(e,t,n){1===this.state?this.initialText=n.text.substring(0,e):2===this.state?(this.initialText=n.text.substring(0,e),this.trailingText=n.text.substring(e+t)):this.trailingText=n.text.substring(e+t)}},Uhe=class{constructor(e,t,n){this.pos=e,this.deleteLen=t,this.insertedText=n}getTextChangeRange(){return nc(Ys(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}},Vhe=class e{constructor(){this.changes=[],this.versions=new Array(e.maxVersions),this.minVersion=0,this.currentVersion=0}versionToIndex(t){if(!(tthis.currentVersion))return t%e.maxVersions}currentVersionToIndex(){return this.currentVersion%e.maxVersions}edit(t,n,r){this.changes.push(new Uhe(t,n,r)),(this.changes.length>e.changeNumberThreshold||n>e.changeLengthThreshold||r&&r.length>e.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let t=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let n=t.index;for(const e of this.changes)n=n.edit(e.pos,e.deleteLen,e.insertedText);t=new $he(this.currentVersion+1,this,n,this.changes),this.currentVersion=t.version,this.versions[this.currentVersionToIndex()]=t,this.changes=[],this.currentVersion-this.minVersion>=e.maxVersions&&(this.minVersion=this.currentVersion-e.maxVersions+1)}return t}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(e){return this._getSnapshot().index.lineNumberToInfo(e)}lineOffsetToPosition(e,t){return this._getSnapshot().index.absolutePositionOfStartOfLine(e)+(t-1)}positionToLineOffset(e){return this._getSnapshot().index.positionToLineOffset(e)}lineToTextSpan(e){const t=this._getSnapshot().index,{lineText:n,absolutePosition:r}=t.lineNumberToInfo(e+1);return Ys(r,void 0!==n?n.length:t.absolutePositionOfStartOfLine(e+2)-r)}getTextChangesBetweenVersions(e,t){if(!(e=this.minVersion){const n=[];for(let r=e+1;r<=t;r++){const e=this.versions[this.versionToIndex(r)];for(const t of e.changesSincePreviousVersion)n.push(t.getTextChangeRange())}return ic(n)}}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(t){const n=new e,r=new $he(0,n,new Khe);n.versions[n.currentVersion]=r;const i=Khe.linesFromText(t);return r.index.load(i.lines),n}};Vhe.changeNumberThreshold=8,Vhe.changeLengthThreshold=256,Vhe.maxVersions=8;var Whe=Vhe,$he=class e{constructor(e,t,n,r=sme){this.version=e,this.cache=t,this.index=n,this.changesSincePreviousVersion=r}getText(e,t){return this.index.getText(e,t-e)}getLength(){return this.index.getLength()}getChangeRange(t){if(t instanceof e&&this.cache===t.cache)return this.version<=t.version?rc:this.cache.getTextChangesBetweenVersions(t.version,this.version)}},Khe=class e{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(e){return this.lineNumberToInfo(e).absolutePosition}positionToLineOffset(e){const{oneBasedLine:t,zeroBasedColumn:n}=this.root.charOffsetToLineInfo(1,e);return{line:t,offset:n+1}}positionToColumnAndLineText(e){return this.root.charOffsetToLineInfo(1,e)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(e){if(e<=this.getLineCount()){const{position:t,leaf:n}=this.root.lineNumberToInfo(e,0);return{absolutePosition:t,lineText:n&&n.text}}return{absolutePosition:this.root.charCount(),lineText:void 0}}load(t){if(t.length>0){const n=[];for(let e=0;e0&&e{n=n.concat(r.text.substring(e,e+t))}}),n}getLength(){return this.root.charCount()}every(e,t,n){n||(n=this.root.charCount());const r={goSubtree:!0,done:!1,leaf(t,n,r){e(r,t,n)||(this.done=!0)}};return this.walk(t,n-t,r),!r.done}edit(t,n,r){if(0===this.root.charCount())return gn.assert(0===n),void 0!==r?(this.load(e.linesFromText(r).lines),this):void 0;{let e;if(this.checkEdits){const i=this.getText(0,this.root.charCount());e=i.slice(0,t)+r+i.slice(t+n)}const i=new qhe;let o=!1;if(t>=this.root.charCount()){t=this.root.charCount()-1;const e=this.getText(t,1);r=r?e+r:e,n=0,o=!0}else if(n>0){const e=t+n,{zeroBasedColumn:i,lineText:o}=this.positionToColumnAndLineText(e);0===i&&(n+=o.length,r=r?r+o:o)}if(this.root.walk(t,n,i),i.insertLines(r,o),this.checkEdits){const t=i.lineIndex.getText(0,i.lineIndex.getLength());gn.assert(e===t,"buffer edit mismatch")}return i.lineIndex}}static buildTreeFromBottom(e){if(e.length<4)return new Hhe(e);const t=new Array(Math.ceil(e.length/4));let n=0;for(let r=0;r0?n[r]=i:n.pop(),{lines:n,lineMap:t}}},Hhe=class e{constructor(e=[]){this.children=e,this.totalChars=0,this.totalLines=0,e.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(const e of this.children)this.totalChars+=e.charCount(),this.totalLines+=e.lineCount()}execWalk(e,t,n,r,i){return n.pre&&n.pre(e,t,this.children[r],this,i),n.goSubtree?(this.children[r].walk(e,t,n),n.post&&n.post(e,t,this.children[r],this,i)):n.goSubtree=!0,n.done}skipChild(e,t,n,r,i){r.pre&&!r.done&&(r.pre(e,t,this.children[n],this,i),r.goSubtree=!0)}walk(e,t,n){if(0===this.children.length)return;let r=0,i=this.children[r].charCount(),o=e;for(;o>=i;)this.skipChild(o,t,r,n,0),o-=i,r++,i=this.children[r].charCount();if(o+t<=i){if(this.execWalk(o,t,n,r,2))return}else{if(this.execWalk(o,i-o,n,r,1))return;let e=t-(i-o);r++;for(i=this.children[r].charCount();e>i;){if(this.execWalk(0,i,n,r,3))return;e-=i,r++,i=this.children[r].charCount()}if(e>0&&this.execWalk(0,e,n,r,4))return}if(n.pre){const e=this.children.length;if(rt)return n.isLeaf()?{oneBasedLine:e,zeroBasedColumn:t,lineText:n.text}:n.charOffsetToLineInfo(e,t);t-=n.charCount(),e+=n.lineCount()}const n=this.lineCount();if(0===n)return{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0};return{oneBasedLine:n,zeroBasedColumn:gn.checkDefined(this.lineNumberToInfo(n,0).leaf).charCount(),lineText:void 0}}lineNumberToInfo(e,t){for(const n of this.children){const r=n.lineCount();if(r>=e)return n.isLeaf()?{position:t,leaf:n}:n.lineNumberToInfo(e,t);e-=r,t+=n.charCount()}return{position:t,leaf:void 0}}splitAfter(t){let n;const r=this.children.length,i=++t;if(t=0;e--)0===a[e].children.length&&a.pop()}t&&a.push(t),this.updateCounts();for(let e=0;e{(this.packageInstalledPromise??(this.packageInstalledPromise=new Map)).set(this.packageInstallId,{resolve:e,reject:t})});return this.installer.send(t),n}attach(e){this.projectService=e,this.installer=this.createInstallerProcess()}onProjectClosed(e){this.installer.send({projectName:e.getProjectName(),kind:"closeProject"})}enqueueInstallTypingsRequest(e,t,n){const r=lme(e,t,n);this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling throttled operation:${TG(r)}`),this.activeRequestCount0?this.activeRequestCount--:gn.fail("TIAdapter:: Received too many responses");!this.requestQueue.isEmpty();){const e=this.requestQueue.dequeue();if(this.requestMap.get(e.projectName)===e){this.requestMap.delete(e.projectName),this.scheduleRequest(e);break}this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Skipping defunct request for: ${e.projectName}`)}this.projectService.updateTypingsForProject(e),this.event(e,"setTypings");break;case yG:this.projectService.watchTypingLocations(e)}}scheduleRequest(t){this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling request for: ${t.projectName}`),this.activeRequestCount++,this.host.setTimeout(()=>{this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Sending request:${TG(t)}`),this.installer.send(t)},e.requestDelayMillis,`${t.projectName}::${t.kind}`)}};Xhe.requestDelayMillis=100;var Qhe=Xhe,Yhe={};a(Yhe,{ActionInvalidate:()=>dG,ActionPackageInstalled:()=>pG,ActionSet:()=>uG,ActionWatchTypingLocations:()=>yG,Arguments:()=>lG,AutoImportProviderProject:()=>Gme,AuxiliaryProject:()=>Kme,CharRangeSection:()=>zhe,CloseFileWatcherEvent:()=>mge,CommandNames:()=>mhe,ConfigFileDiagEvent:()=>lge,ConfiguredProject:()=>Xme,ConfiguredProjectLoadKind:()=>Mge,CreateDirectoryWatcherEvent:()=>fge,CreateFileWatcherEvent:()=>pge,Errors:()=>ime,EventBeginInstallTypes:()=>mG,EventEndInstallTypes:()=>gG,EventInitializationFailed:()=>hG,EventTypesRegistry:()=>fG,ExternalProject:()=>Qme,GcTimer:()=>bme,InferredProject:()=>$me,LargeFileReferencedEvent:()=>cge,LineIndex:()=>Khe,LineLeaf:()=>Ghe,LineNode:()=>Hhe,LogLevel:()=>ame,Msg:()=>cme,OpenFileInfoTelemetryEvent:()=>dge,Project:()=>Wme,ProjectInfoTelemetryEvent:()=>uge,ProjectKind:()=>Rme,ProjectLanguageServiceStateEvent:()=>_ge,ProjectLoadingFinishEvent:()=>sge,ProjectLoadingStartEvent:()=>age,ProjectService:()=>ihe,ProjectsUpdatedInBackgroundEvent:()=>oge,ScriptInfo:()=>Lme,ScriptVersionCache:()=>Whe,Session:()=>Ihe,TextStorage:()=>Ime,ThrottledOperations:()=>vme,TypingsInstallerAdapter:()=>Qhe,allFilesAreJsOrDts:()=>zme,allRootFilesAreJsOrDts:()=>Jme,asNormalizedPath:()=>dme,convertCompilerOptions:()=>kge,convertFormatOptions:()=>Sge,convertScriptKindName:()=>Nge,convertTypeAcquisition:()=>Cge,convertUserPreferences:()=>Dge,convertWatchOptions:()=>Tge,countEachFileTypes:()=>Bme,createInstallTypingsRequest:()=>lme,createModuleSpecifierCache:()=>she,createNormalizedPathMap:()=>pme,createPackageJsonCache:()=>che,createSortedArray:()=>yme,emptyArray:()=>sme,findArgument:()=>bG,formatDiagnosticToProtocol:()=>fhe,formatMessage:()=>ghe,getBaseConfigFileName:()=>xme,getDetailWatchInfo:()=>Wge,getLocationInNewDocument:()=>Rhe,hasArgument:()=>vG,hasNoTypeScriptSource:()=>qme,indent:()=>kG,isBackgroundProject:()=>tge,isConfigFile:()=>ohe,isConfiguredProject:()=>Zme,isDynamicFileName:()=>Ome,isExternalProject:()=>ege,isInferredProject:()=>Yme,isInferredProjectName:()=>fme,isProjectDeferredClose:()=>nge,makeAutoImportProviderProjectName:()=>gme,makeAuxiliaryProjectName:()=>hme,makeInferredProjectName:()=>mme,maxFileSize:()=>ige,maxProgramSizeForNonTsFiles:()=>rge,normalizedPathToPath:()=>ume,nowString:()=>xG,nullCancellationToken:()=>lhe,nullTypingsInstaller:()=>Age,protocol:()=>Sme,scriptInfoIsContainedByBackgroundProject:()=>jme,scriptInfoIsContainedByDeferredClosedProject:()=>Mme,stringifyIndented:()=>TG,toEvent:()=>yhe,toNormalizedPath:()=>_me,tryConvertScriptKindName:()=>wge,typingsInstaller:()=>Qfe,updateProjectIfDirty:()=>Kge}),"undefined"!=typeof console&&(gn.loggingHost={log(e,t){switch(e){case 1:return console.error(t);case 2:return console.warn(t);case 3:case 4:return console.log(t)}}})})({get exports(){return o},set exports(e){o=e,void 0!==t&&t.exports&&(t.exports=e)}})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/typescript/lib/typescript.js","/node_modules/typescript/lib")},{_process:46,buffer:1,crypto:1,fs:1,inspector:1,os:1,path:1,perf_hooks:1,"source-map-support":1}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("core-types-json-schema"),i=e("core-types-ts/dist/lib/ts-to-core-types"),o=e("core-types-ts"),a=e("./utils/sharedUtils"),s=e("./utils/constants"),c=e("./utils/nosqlUtils"),l=e("./utils/constants-nosql");Draw.loadPlugin(function(e){const t=document.createElement("div");t.style.userSelect="none",t.style.overflow="hidden",t.style.padding="10px",t.style.height="100%";const n=document.createElement("textarea");n.style.height="200px",n.style.width="100%";const _="-- click a nosql type button";n.value=_,mxUtils.br(t),t.appendChild(n);const u=e.menus.get("exportAs");let d="tonosql=To NoSQL";u&&!window.VsCodeApi||(d="tonosql=Export As NoSQL"),mxResources.parse(d);const p=new mxWindow(mxResources.get("tonosql"),t,document.body.offsetWidth-480,140,320,320,!0,!0);function f(t){const i=(0,a.getMermaidDiagramDb)(e,t),l=(0,c.dbToOpenApi)(i);let _="";if("ts"==t){const{data:e}=(0,r.convertOpenApiToCoreTypes)(l),{data:n}=(0,o.convertCoreTypesToTypeScript)(e);_=`/*\n\tGenerated in drawio\n\tDatabase: ${t}\n\tPlugin: nosql\n\tVersion: ${s.pluginVersion}\n*/\n\n`+_,_+=n}else"openapi"==t&&(_=JSON.stringify(l,null,2));n.value=_}p.destroyOnClose=!1,p.setMaximizable(!1),p.setResizable(!1),p.setClosable(!0),mxUtils.br(t);const m=mxUtils.button(mxResources.get("reset"),function(){n.value=_});m.style.marginTop="8px",m.style.marginRight="4px",m.style.padding="4px",t.appendChild(m);let g=mxUtils.button("TS",function(){f("ts")});g.style.marginTop="8px",g.style.padding="4px",t.appendChild(g),g=mxUtils.button("OpenAPI",function(){f("openapi")}),g.style.marginTop="8px",g.style.padding="4px",t.appendChild(g),e.actions.addAction("tonosql",function(){p.setVisible(!p.isVisible()),p.isVisible()&&n.focus()});let h=[],y=[],v=[],b=[],x=null,S=null,k=0,T=0;const C=document.createElement("div");C.style.userSelect="none",C.style.overflow="hidden",C.style.padding="10px",C.style.height="100%";const w=document.createElement("textarea");w.style.height="200px",w.style.width="100%",w.value=l.defaultReset,mxUtils.br(C),C.appendChild(w),mxResources.parse("fromNoSql=From NoSQL");const N=new mxWindow(mxResources.get("fromNoSql"),C,document.body.offsetWidth-480,140,320,320,!0,!0);function D(t,n){var o;b=[],x=null,S=null;try{let l=null;const _={title:"nosql default options",version:s.pluginVersion};if("openapi"==n){const e=JSON.parse(t),{data:n}=(0,r.convertOpenApiToCoreTypes)(e),{data:i}=(0,r.convertCoreTypesToJsonSchema)(n);(0,r.jsonSchemaDocumentToOpenApi)(i,_),l=e}else if("ts"==n){const{data:e}=(0,i.convertTypeScriptToCoreTypes)(t),{data:n}=(0,r.convertCoreTypesToJsonSchema)(e);l=(0,r.jsonSchemaDocumentToOpenApi)(n,_)}const u=null===(o=null==l?void 0:l.components)||void 0===o?void 0:o.schemas;if(u){const t=(0,c.ConvertOpenApiToDatabaseModel)(u);h=t.ForeignKeyList,y=t.PrimaryKeyList,v=t.TableList,T=v.length;const r=(0,a.CreateTableUI)(e,N,v,b,S,x,h,k,n);r&&(b=r.cells,k=r.dx,x=r.tableCell,S=r.rowCell)}}catch(e){console.log(`unable to serialize the response:${n}`),console.log(e)}}N.destroyOnClose=!1,N.setMaximizable(!1),N.setResizable(!1),N.setClosable(!0),mxUtils.br(C);const E=mxUtils.button(mxResources.get("Reset TS"),function(){w.value=l.defaultReset});E.style.marginTop="8px",E.style.marginRight="4px",E.style.padding="4px",C.appendChild(E);const F=mxUtils.button("Reset OpenAPI",function(){w.value=l.defaultResetOpenApi});F.style.marginTop="8px",F.style.marginRight="4px",F.style.padding="4px",C.appendChild(F);const P=mxUtils.button("Insert TS",function(){D(w.value,"ts")});P.style.marginTop="8px",P.style.padding="4px",C.appendChild(P);const A=mxUtils.button("Insert OpenAPI",function(){D(w.value,"openapi")});A.style.marginTop="8px",A.style.padding="4px",C.appendChild(A),e.actions.addAction("fromNoSql",function(){N.setVisible(!N.isVisible()),N.isVisible()&&w.focus()});const I=e.menus.get("insert");if(I){const t=I.funct;I.funct=function(...n){const[r,i]=n;t.apply(this,n),e.menus.addMenuItems(r,["fromNoSql"],i)}}if(u&&!window.VsCodeApi){const t=u.funct;u.funct=function(...n){const[r,i]=n;t.apply(this,n),e.menus.addMenuItems(r,["tonosql"],i)}}else{const t=e.menus.get("file");if(t&&t.enabled){const n=t.funct;t.funct=function(...t){const[r,i]=t;n.apply(this,t),e.menus.addMenuItems(r,["tonosql"],i)}}}})},{"./utils/constants":50,"./utils/constants-nosql":49,"./utils/nosqlUtils":51,"./utils/sharedUtils":52,"core-types-json-schema":2,"core-types-ts":25,"core-types-ts/dist/lib/ts-to-core-types":29}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validJSONSchemaTypes=n.defaultResetOpenApi=n.defaultReset=void 0;const r=e("./constants");n.defaultReset=`/*\n\tDrawio default value\n\tPlugin: nosql\n\tVersion: ${r.pluginVersion}\n*/\n\n\nexport interface WeatherForecast {\n /** @format date-time */\n date?: string;\n /** @format int32 */\n temperatureC?: number;\n /** @format int32 */\n temperatureF?: number;\n summary?: string | null;\n nestedProp: string[];\n children?: Child[];\n}\n\nexport interface Child {\n name: string\n}\n `,n.defaultResetOpenApi=`\n{\n "openapi": "3.0.0",\n "info": {\n "title": "nosql plugin sample",\n "version": "${r.pluginVersion}",\n "x-comment": "Generated by core-types-json-schema (https://github.com/grantila/core-types-json-schema)"\n },\n "paths": {},\n "components": {\n "schemas": {\n "WeatherForecast": {\n "properties": {\n "date": {\n "title": "WeatherForecast.date",\n "description": "@format date-time",\n "type": "string"\n },\n "temperatureC": {\n "title": "WeatherForecast.temperatureC",\n "description": "@format int32",\n "type": "number"\n },\n "temperatureF": {\n "title": "WeatherForecast.temperatureF",\n "description": "@format int32",\n "type": "number"\n },\n "summary": {\n "title": "WeatherForecast.summary",\n "nullable": true,\n "type": "string"\n },\n "nestedProp": {\n "items": {\n "title": "WeatherForecast.nestedProp.[]",\n "type": "string"\n },\n "title": "WeatherForecast.nestedProp",\n "type": "array"\n },\n "child": {\n "$ref": "#/components/schemas/Child",\n "title": "WeatherForecast.child"\n }\n },\n "required": [\n "nestedProp"\n ],\n "additionalProperties": false,\n "title": "WeatherForecast",\n "type": "object"\n },\n "Child": {\n "properties": {\n "name": {\n "title": "Child.name",\n "type": "string"\n }\n },\n "required": [\n "name"\n ],\n "additionalProperties": false,\n "title": "Child",\n "type": "object"\n }\n }\n }\n}\n `;n.validJSONSchemaTypes=["string","number","integer","boolean","object","array","null","any"]},{"./constants":50}],50:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.objectKeyword=n.arrayKeyword=n.nullableKeyword=n.enumKeyword=n.formatKeyword=n.commentColumnQuantifiers=n.pluginVersion=void 0,n.pluginVersion="0.0.7",n.commentColumnQuantifiers={Start:"/**",End:"*/"},n.formatKeyword="@format",n.enumKeyword="enum",n.nullableKeyword="nullable",n.arrayKeyword="array",n.objectKeyword="object"},{}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dbToOpenApi=function(e){var t,n,a,s,c,l;const _={openapi:"3.0.0",info:{title:"drawio nosql export",version:r.pluginVersion,"x-comment":"Generated by from drawio uml using plugin nosql"},paths:{},components:{schemas:{}}},u={},d=e.getEntities();for(const _ in d)if(Object.prototype.hasOwnProperty.call(d,_)){let p=_;const f=d[_];let m=(0,i.getCommentIndexes)(_),g="",h="";if(m.start>-1&&m.end>-1){let e=p.toString().trim();m=(0,i.getCommentIndexes)(e);const t=m.start,n=m.end;if(p=e.substring(0,m.beforeStart).trim(),e=e.substring(t,n).trim(),-1!==e.indexOf(r.formatKeyword)){const t=e.indexOf(r.formatKeyword);h=e.substring(t+r.formatKeyword.length).trim(),e=e.substring(0,t)}e&&(g=e)}if(u[p])continue;u[p]={type:r.objectKeyword,title:p,additionalProperties:!1,properties:{}},g&&(u[p].description=g.trim()),h&&(u[p].format=h.trim());for(let d=0;de.entityA==_),o=`[${_}.${g}]`,s=n.find(e=>-1!=e.roleA.indexOf(o));if(s){const e=(0,i.getCommentIndexes)(s.entityB);t=`#/components/schemas/${s.entityB.substring(0,e.beforeStart).trim()}`}t&&("array"==y&&(r={$ref:t}),"object"==y&&(a={$ref:t}))}const s={title:`${p}.${g}`,type:y};a&&(s.additionalProperties=a),r&&(s.items=r),(null===(l=m.attributeType)||void 0===l?void 0:l.includes("nullable"))&&(s.nullable=!0),!t||(null==a?void 0:a.$ref)||(null==r?void 0:r.$ref)||(s.$ref=t),n&&delete s.type,v.trim()&&!t&&(s.description=v.trim()),b.trim()&&(s.items?s.items.format=b.trim():s.format=b.trim()),u[p].properties[m.attributeName]=s}}0===Object.keys(u[p].properties).length&&delete u[p].properties}return _.components.schemas=u,_},n.GeneratePropertyModel=a,n.ConvertOpenApiToDatabaseModel=function(e){var t,n,o,s,c,l;const _={Dialect:"nosql",TableList:[],PrimaryKeyList:[],ForeignKeyList:[]},u={};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=e[o],c=(0,i.dbTypeEnds)(o),l={Name:(0,i.dbTypeEnds)(o),Properties:[]};if(s.enum){const e=s.enum,t=`${s.type} ${r.enumKeyword}`,n={enum:e};s.description&&(n.description=s.description),s.format&&(n.format=s.format);const i=a(o,t,n);l.Properties.push(i)}else{const e=(0,i.generateComment)(s.description,s.format);e&&(l.Name+=` ${e}`)}for(const o in s.properties)if(Object.prototype.hasOwnProperty.call(s.properties,o)){const c=s.properties[o];let u=null;if(c.$ref?u=c.$ref.split("/").pop():c.items&&typeof c.items==r.objectKeyword?u=null===(t=c.items.$ref)||void 0===t?void 0:t.split("/").pop():c.additionalProperties&&"object"==typeof c.additionalProperties&&(u=null===(n=c.additionalProperties.$ref)||void 0===n?void 0:n.split("/").pop()),u){const t=e[u];if(t&&!t.enum){const e=(0,i.generateComment)(t.description,t.format);u=e?`${(0,i.dbTypeEnds)(u)} ${e}`:(0,i.dbTypeEnds)(u)}else u=(0,i.dbTypeEnds)(u)}u&&!c.type&&(c.type=u);const d=a(l.Name,o,c);if(u){const e={PrimaryKeyTableName:l.Name,ReferencesTableName:u,PrimaryKeyName:(0,i.dbTypeEnds)(o),ReferencesPropertyName:"",IsDestination:!1},t={ReferencesTableName:l.Name,PrimaryKeyTableName:u,ReferencesPropertyName:(0,i.dbTypeEnds)(o),PrimaryKeyName:"",IsDestination:!0};_.ForeignKeyList.push(t),_.ForeignKeyList.push(e),d.IsForeignKey=!0}l.Properties.push(d)}_.TableList.push(l),u[c]||(u[c]=l)}for(let e=0;e<_.ForeignKeyList.length;e++){const t=_.ForeignKeyList[e];if(!t.ReferencesPropertyName){let n=null===(o=_.TableList.find(e=>e.Name==t.ReferencesTableName))||void 0===o?void 0:o.Properties[0];n||(n=null===(s=u[t.ReferencesTableName])||void 0===s?void 0:s.Properties[0]),n&&(_.ForeignKeyList[e].ReferencesPropertyName=n.Name)}if(!t.PrimaryKeyName){let n=null===(c=_.TableList.find(e=>e.Name==t.PrimaryKeyTableName))||void 0===c?void 0:c.Properties[0];n||(n=null===(l=u[t.PrimaryKeyTableName])||void 0===l?void 0:l.Properties[0]),n&&(_.ForeignKeyList[e].PrimaryKeyName=n.Name)}}return _};const r=e("./constants"),i=e("./sharedUtils"),o=e("./constants-nosql");function a(e,t,n){var o;let a=(null!==(o=n.type)&&void 0!==o?o:r.objectKeyword).toString();a===r.arrayKeyword&&n.items&&typeof n.items===r.objectKeyword&&(n.items.format&&!n.format&&(n.format=n.items.format),n.items.type&&(a=`${n.items.type}[]`)),n.enum?a=`${JSON.stringify(n.enum)}`:n.nullable&&(a+=` ${r.nullableKeyword}`);const s=(0,i.generateComment)(n.description,n.format);s&&(a+=` ${s}`);return{Name:(0,i.dbTypeEnds)(t),IsPrimaryKey:!1,IsForeignKey:!1,ColumnProperties:a,TableName:(0,i.dbTypeEnds)(e),ForeignKey:[]}}},{"./constants":50,"./constants-nosql":49,"./sharedUtils":52}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GetColumnQuantifiers=i,n.removeHtml=o,n.dbTypeEnds=function(e){return`\`${e}\``},n.RemoveNameQuantifiers=a,n.getDbLabel=s,n.entityName=function(e,t){let n="";e&&(n+=`${e}`);t&&(n+=` ${r.formatKeyword} ${t}`);n&&(n=n.trim(),n=`/** ${n} */`);return n},n.getCommentIndexes=c,n.getMermaidDiagramDb=function(e,t){const n=e.editor.graph.getModel(),u={},d=[];for(const e in n.cells)if(Object.hasOwnProperty.call(n.cells,e)){const l=n.cells[e];if(-1!==l.mxObjectId.indexOf("mxCell")&&l.style&&(l.style.trim().startsWith("swimlane;")||l.style.trim().startsWith("shape=table;"))){let e=o(l.value.toString()),n="",p="";if((null==e?void 0:e.includes(r.commentColumnQuantifiers.Start))&&(null==e?void 0:e.includes(r.commentColumnQuantifiers.End))){let t=e.toString();const i=c(t),o=i.start,a=i.end;if(e=t.substring(0,i.beforeStart),t=t.substring(o,a),-1!==t.indexOf(r.formatKeyword)){const e=t.indexOf(r.formatKeyword);p=t.substring(e+r.formatKeyword.length).trim(),t=t.substring(0,e)}t&&(n=t)}const f={name:a(e),attributes:[]},m=_(n,p);m&&(f.name+=` ${m}`),console.log("Table: ",f.name);const g=i(t);for(let e=0;e-1!==["FK","PK"].findIndex(t=>t==e.value.toUpperCase())||-1!=e.value.toUpperCase().indexOf("PK,"));n&&(e.attributeKeyType=n.value,"PK"!=e.attributeKeyType&&-1!=e.attributeKeyType.indexOf("PK")&&(e.attributeKeyType="PK"))}catch(e){console.error("PK check caught exception "+e)}if(f.attributes.push(e),t.edges&&t.edges.length){console.log(t.edges.length,"edges");for(let e=0;e-1!=t.toLocaleLowerCase().indexOf(e)),p=i&&-1!=o.findIndex(e=>-1!=i.toLocaleLowerCase().indexOf(e));if(!p&&!l||p&&l){if(p&&l){let e=n.source.value;n.source.style.trim().startsWith("shape=tableRow")&&(e=n.source.children[1].value);const t=s(e,g);t.attributeKeyType="PK",e=t.attributeName;const r=a(n.source.parent.value);let i=n.target.value;n.target.style.trim().startsWith("shape=tableRow")&&(i=n.target.children[1].value);const o=s(i,g);o.attributeKeyType="PK",i=o.attributeName;const c=a(n.target.parent.value),l={name:a(r)+"_"+a(c),attributes:[t,o]};u[l.name]||(u[l.name]=l);const _={entityA:r,entityB:l.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${r}.${e}] to [${l.name}.${e}]`};let p=d.findIndex(e=>e.entityA==_.entityA&&e.entityB==_.entityB&&e.roleA==_.roleA);-1==p&&d.push(_);const f={entityA:c,entityB:l.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${c}.${i}] to [${l.name}.${i}]`};p=d.findIndex(e=>e.entityA==f.entityA&&e.entityB==f.entityB&&e.roleA==f.roleA),-1==p&&d.push(f)}}else{console.log("Source: ",n.source.id,n.source.value);let e=n.source.value;n.source.style.trim().startsWith("shape=tableRow")&&(e=n.source.children[1].value);e=s(e,g).attributeName;let t=n.source.parent.value,r=c(t);if(-1!=r.start&&-1!=r.end){const e=t.substring(r.start,r.end).trim();t=t.substring(0,r.beforeStart).trim(),t=`${a(t)} ${_(e)}`}else t=a(t);console.log("Target: ",n.target.id,n.target.value);let i=n.target.value;n.target.style.trim().startsWith("shape=tableRow")&&(i=n.target.children[1].value);i=s(i,g).attributeName;let o=n.target.parent.value;if(r=c(o),-1!=r.start&&-1!=r.end){const e=o.substring(r.start,r.end).trim();o=o.substring(0,r.beforeStart).trim(),o=`${a(o)} ${_(e)}`}else o=a(o);const u={entityA:l?t:o,entityB:l?o:t,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:l?`[${t}.${e}] to [${o}.${i}]`:`[${o}.${i}] to [${t}.${e}]`};-1==d.findIndex(e=>e.entityA==u.entityA&&e.entityB==u.entityB&&e.roleA==u.roleA)&&d.push(u)}}}}}}if(u[f.name]){let e=2;for(;u[f.name+e.toString()];)e++;u[f.name+e.toString()]=f}else u[f.name]=f}}return l(u,d)},n.GenerateDatabaseModel=l,n.generateComment=_,n.CreateTableUI=function(e,t,n,r,o,c,l,_,u){if(n.forEach(function(t){const n=100+t.Name.length;if((c=new mxCell(t.Name,new mxGeometry(_,0,n,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=default;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=default;align=center;")).vertex=!0,o){const t=e.editor.graph.getPreferredSizeForCell(o);null!==t&&(c.geometry.width=t.width+n)}r.push(c),t.Properties.forEach(function(n){const r=function(e,t,n,r,i){const o=t.Name+(t.ColumnProperties?" "+t.ColumnProperties:"");r=new mxCell(o,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=64;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"),r.vertex=!0;const a=t.IsPrimaryKey&&t.IsForeignKey?"PK | FK":t.IsPrimaryKey?"PK":t.IsForeignKey?"FK":"",s=sb.cloneCell(r,a);s.connectable=!1,s.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=180;points=[];portConstraint=eastwest;part=1;",s.geometry.width=54,s.geometry.height=26,r.insert(s);const c=e.editor.graph.getPreferredSizeForCell(r);i&&(null!==c&&i.geometry.width0){const t=e.editor.graph,n=t.view,o=t.getGraphBounds(),c=Math.ceil(Math.max(0,o.x/n.scale-n.translate.x)+4*t.gridSize),_=Math.ceil(Math.max(0,(o.y+o.height)/n.scale-n.translate.y)+4*t.gridSize);t.setSelectionCells(t.importCells(r,c,_));const d=t.getModel(),p=i(u),f=mxUtils.bind(this,function(e,n,r){t.insertEdge(null,null,"",r.invert?n:e,r.invert?e:n,"edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;")});l.forEach(function(e){if(e.IsDestination&&e.PrimaryKeyName&&e.ReferencesPropertyName&&e.PrimaryKeyTableName&&e.ReferencesTableName){const t={invert:!0};let n=null,r=null;for(const t in d.cells){if(n&&r)break;if(Object.hasOwnProperty.call(d.cells,t)){const i=d.cells[t];if(i.style&&i.style.trim().startsWith("swimlane;")){const t={name:i.value,attributes:[]},o=t.name==e.PrimaryKeyTableName,c=t.name==e.ReferencesTableName;if(o||c)for(let t=0;t1&&(l=c.slice(1).join(" "));return{attributeName:s,attributeType:i,attributeComment:l}}function c(e){let t=!1;-1!==e.indexOf(r.commentColumnQuantifiers.Start)&&-1!==e.indexOf(r.commentColumnQuantifiers.End)&&(t=!0);return{beforeStart:t?e.indexOf(r.commentColumnQuantifiers.Start):-1,start:t?e.indexOf(r.commentColumnQuantifiers.Start)+r.commentColumnQuantifiers.Start.length:-1,end:t?e.indexOf(r.commentColumnQuantifiers.End)-1:-1}}function l(e,t){const n=new class{constructor(e,t){this.entities=e,this.relationships=t}getEntities(){return this.entities}getRelationships(){return this.relationships}}(e,t);return n}function _(e,t){let n="";return e&&(n+=`${e}`),t&&(n+=` ${r.formatKeyword} ${t}`),n&&(n=n.trim(),n=`${r.commentColumnQuantifiers.Start} ${n} ${r.commentColumnQuantifiers.End}`),n}},{"./constants":50}]},{},[48]); \ No newline at end of file diff --git a/dist/nosql.js b/dist/nosql.js index e056604..c10a2d2 100644 --- a/dist/nosql.js +++ b/dist/nosql.js @@ -1,7 +1,7 @@ /** * File: nosql.js * Version: 0.0.7 - * Generated: 2025-10-24 + * Generated: 2026-01-21 */ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 1) { attributeComment = attributesTypes.slice(1).join(' '); - attributeType = attributesTypes[0]; } const attribute = { attributeName, @@ -5486,12 +5489,17 @@ function getMermaidDiagramDb(ui, type) { // TODO: support for ts and openapi enum // build models // fix fk for comments + // + // Loop through cells in the model for (const key in model.cells) { if (Object.hasOwnProperty.call(model.cells, key)) { const mxcell = model.cells[key]; if (mxcell.mxObjectId.indexOf("mxCell") !== -1) { - if (mxcell.style && mxcell.style.trim().startsWith("swimlane;")) { - let entityName = mxcell.value.toString(); + // See if this is a swimlane (list/entity) or a table. + // If so, treat it as a table in the DB + if (mxcell.style && (mxcell.style.trim().startsWith("swimlane;") + || mxcell.style.trim().startsWith("shape=table;"))) { + let entityName = removeHtml(mxcell.value.toString()); let description = ""; let formatValue = ""; if ((entityName === null || entityName === void 0 ? void 0 : entityName.includes(constants_1.commentColumnQuantifiers.Start)) && @@ -5522,36 +5530,59 @@ function getMermaidDiagramDb(ui, type) { if (comment) { entity.name += ` ${comment}`; } + console.log("Table: ", entity.name); + // Iterate over the children of this cell; treat them as possible columns in the DB table + // + // Get row attributes + const columnQuantifiers = GetColumnQuantifiers(type); // const comment = for (let c = 0; c < mxcell.children.length; c++) { const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if (col.style && - col.style.trim().startsWith("shape=partialRectangle")) { - const columnQuantifiers = GetColumnQuantifiers(type); + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow") || + col.style.trim().startsWith("text")) // List entry + ) { //Get delimiter of column name //Get full name - const attribute = getDbLabel(col.value, columnQuantifiers); - const attributeKeyType = col.children.find((x) => ["FK", "PK"].findIndex((k) => k == x.value.toUpperCase()) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1); - if (attributeKeyType) { - attribute.attributeKeyType = attributeKeyType.value; - if (attribute.attributeKeyType != "PK" && - attribute.attributeKeyType.indexOf("PK") != -1) { - attribute.attributeKeyType = "PK"; + let attribute; + if (col.style.trim().startsWith("shape=tableRow")) { + attribute = getDbLabel(col.children[1].value, columnQuantifiers); + } + else { + attribute = getDbLabel(col.value, columnQuantifiers); + } + console.log("Column: ", attribute.attributeName); + // check for Primary Key attribute + if (col.children && col.children.length) { + try { + // Check for Primary Key or Foreign Key attribute + const attributeKeyType = col.children.find((x) => ["FK", "PK"].findIndex((k) => k == x.value.toUpperCase()) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1); + if (attributeKeyType) { + attribute.attributeKeyType = attributeKeyType.value; + if (attribute.attributeKeyType != "PK" && + attribute.attributeKeyType.indexOf("PK") != -1) { + attribute.attributeKeyType = "PK"; + } + } + } + catch (e) { + console.error("PK check caught exception " + e); } } entity.attributes.push(attribute); if (col.edges && col.edges.length) { + console.log(col.edges.length, "edges"); // check for edges foreign keys for (let e = 0; e < col.edges.length; e++) { const edge = col.edges[e]; + console.log("source=", edge.source, " target=", edge.target); if (edge.mxObjectId.indexOf("mxCell") !== -1) { if (edge.style && edge.style.indexOf("endArrow=") != -1 && edge.source && - edge.source.value && - edge.target && - edge.target.value) { + edge.target) { // need to check if end is open or certain value to determin relationship type // extract endArrow txt // check if both match and contain many or open @@ -5583,7 +5614,11 @@ function getMermaidDiagramDb(ui, type) { // has to be one to many and not one to one if ((targetIsPrimary || sourceIsPrimary) && !(targetIsPrimary && sourceIsPrimary)) { + console.log("Source: ", edge.source.id, edge.source.value); let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel(sourceId, columnQuantifiers); sourceId = sourceAttr.attributeName; let sourceEntity = edge.source.parent.value; @@ -5602,7 +5637,11 @@ function getMermaidDiagramDb(ui, type) { else { sourceEntity = RemoveNameQuantifiers(sourceEntity); } + console.log("Target: ", edge.target.id, edge.target.value); let targetId = edge.target.value; + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } const targetAttr = getDbLabel(targetId, columnQuantifiers); targetId = targetAttr.attributeName; let targetEntity = edge.target.parent.value; @@ -5653,15 +5692,23 @@ function getMermaidDiagramDb(ui, type) { else if (targetIsPrimary && sourceIsPrimary) { // add a new many to many table let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel(sourceId, columnQuantifiers); sourceAttr.attributeKeyType = "PK"; sourceId = sourceAttr.attributeName; - const sourceEntity = RemoveNameQuantifiers(edge.source.parent.value); + let sourceParent = edge.source.parent; + const sourceEntity = RemoveNameQuantifiers(sourceParent.value); let targetId = edge.target.value; + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } const targetAttr = getDbLabel(targetId, columnQuantifiers); targetAttr.attributeKeyType = "PK"; targetId = targetAttr.attributeName; - const targetEntity = RemoveNameQuantifiers(edge.target.parent.value); + let targetParent = edge.target.parent; + const targetEntity = RemoveNameQuantifiers(targetParent.value); const compositeEntity = { name: RemoveNameQuantifiers(sourceEntity) + "_" + @@ -5872,8 +5919,13 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if (col.style && - col.style.trim().startsWith("shape=partialRectangle")) { - const attribute = getDbLabel(col.value, columnQuantifiers); + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow"))) { + let colValue = col.value; + if (col.style.trim().startsWith("shape=tableRow")) { + colValue = col.children[1].value; + } + const attribute = getDbLabel(colValue, columnQuantifiers); if (isPrimaryTable && RemoveNameQuantifiers(attribute.attributeName) == RemoveNameQuantifiers(fk.PrimaryKeyName)) { targetCell = col; diff --git a/dist/nosql.min.js b/dist/nosql.min.js index dbe1f89..16d310b 100644 --- a/dist/nosql.min.js +++ b/dist/nosql.min.js @@ -1,6 +1,6 @@ /** * File: nosql.min.js * Version: 0.0.7 - * Generated: 2025-10-24 + * Generated: 2026-01-21 */ -!function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){return o(t[s][1][e]||e)},u,u.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s(0,r.ensureArray)(t).map(e=>`@see ${e}`).join("\n");if(e&&(null==t?void 0:t.length))return e+"\n\n"+n();return e||n()}(e.description,e.see):void 0;return{...t,...e.title?{title:e.title}:{},...n?{description:n}:{},...e.default?{default:e.default}:{},...e.examples?{examples:e.examples}:{},...e.comment?{$comment:e.comment}:{}}},n.annotateCoreTypes=function(e,t){var n;const{description:o,see:i}=function(e){const t=(null!=e?e:"").split("\n"),n=[];for(;t.length>0&&t[t.length-1].startsWith("@see ");)n.push(t.pop().slice(5));for(;t.length>0&&!t[t.length-1].trim();)t.pop();return{description:t.join("\n"),see:n}}(null!==(n=t.description)&&void 0!==n?n:"");return{...{...t.title?{title:t.title}:{},...t.default?{default:(0,r.stringify)(t.default)}:{},...t.examples?{examples:(0,r.stringify)(t.examples)}:{},...t.$comment?{comment:t.$comment}:{},...o?{description:o}:{},...i&&i.length>0?{see:i}:{}},...e}}},{"core-types":6}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertCoreTypesToJsonSchema=n.decorateSchema=void 0;const r=e("openapi-json-schema"),o=e("core-types"),i=e("./annotations");function s(e,{filename:t,sourceFilename:n,userPackage:r,userPackageUrl:o},i="core-types-json-schema",s="https://github.com/grantila/core-types-json-schema"){var a,l;void 0!==t&&(null!==(a=e.$id)&&void 0!==a||(e.$id=t));const c=r||o?r&&o?`${r} (${o})`:r||o:"",u=n?` from ${n}`:"";null!==(l=e.$comment)&&void 0!==l||(e.$comment=`Generated${u} by ${i} (${s})`+(c?` on behalf of ${c}`:""))}function a(e){const t=e.or.map(e=>l(e)),n=(0,i.annotateJsonSchema)(e,{anyOf:t});return t.length>1&&!t.some(e=>!function(e){const t=Object.keys(e).sort();return 1===t.length&&"type"===t[0]||2===t.length&&"title"===t[0]&&"type"===t[1]}(e))&&(delete n.anyOf,n.type=t.map(({type:e})=>e)),n}function l(e){if("any"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{}));if("null"===e.type)return(0,i.annotateJsonSchema)(e,{type:"null"});if("boolean"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"boolean"}));if("string"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"string"}));if("number"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"number"}));if("integer"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"integer"}));if("and"===e.type)return(0,i.annotateJsonSchema)(e,{allOf:e.and.map(e=>l(e))});if("or"===e.type)return a(e);if("object"===e.type){const t=Object.keys(e.properties),n=t.filter(t=>e.properties[t].required),r=Object.fromEntries(t.map(t=>[t,l(e.properties[t].node)]));return(0,i.annotateJsonSchema)(e,c(e,{type:"object",...t.length>0?{properties:r}:{},...n.length>0?{required:n}:{},...!0===e.additionalProperties?{}:e.additionalProperties?{additionalProperties:l(e.additionalProperties)}:{additionalProperties:!1}}))}if("array"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"array",items:l(e.elementType)}));if("tuple"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"array",items:e.elementTypes.map(e=>l(e)),...!0===e.additionalItems?{}:e.additionalItems?{additionalItems:l(e.additionalItems)}:{additionalItems:!1},minItems:e.minItems}));if("ref"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{$ref:(0,r.encodeRefNameJsonSchema)(e.ref)}));throw new o.UnsupportedError(`core-types node of type ${e.type} not supported`,e)}function c(e,t){return void 0!==e.const?{...t,const:e.const}:e.enum?{...t,enum:e.enum}:t}n.decorateSchema=s,n.convertCoreTypesToJsonSchema=function(e,t){const{version:n,types:r}=e;if(1!==n)throw new o.UnsupportedError(`core-types version ${n} not supported`);const i={definitions:Object.fromEntries(r.map(e=>[e.name,l(e)]))};return s(i,null!=t?t:{}),{data:i,convertedTypes:r.map(({name:e})=>e),notConvertedTypes:[]}}},{"./annotations":2,"core-types":6,"openapi-json-schema":18}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.complexProps=n.convertJsonSchemaToCoreTypes=void 0;const r=e("jsonpos"),o=e("openapi-json-schema"),i=e("core-types"),s=e("./annotations"),a=(e,t)=>({...e,path:[...e.path,t]});function l(e,t){if("boolean"==typeof e)t.throwUnsupportedError("Boolean JSON Schema definition not supported",{blob:{schema:e}});else if(function(e){return"object"==typeof e&&Object.keys(e).some(e=>n.complexProps.has(e))}(e))return function(e,t){const{then:n,else:r,allOf:o,anyOf:i,oneOf:s}=e,c=[...n?[[a(t,"then"),n]]:[],...r?[[a(t,"else"),r]]:[]],u=[...i?i.map((e,n)=>[a(a(t,"anyOf"),n),e]):[],...s?s.map((e,n)=>[a(a(t,"oneOf"),n),e]):[]],p=[...o?o.map((e,n)=>[a(a(t,"allOf"),n),e]):[]];return{type:"and",and:[{type:"or",or:c.map(([e,t])=>l(t,e))},{type:"or",or:u.map(([e,t])=>l(t,e))},{type:"and",and:p.map(([e,t])=>l(t,e))}]}}(function(e,t){const{$ref:n,type:r,enum:o,const:s,items:a,additionalItems:l,required:c,properties:u,additionalProperties:p,then:f,else:d,allOf:m,anyOf:y,oneOf:h}=e,b=m&&"object"==typeof m?m.filter(e=>e&&"object"==typeof e):null,g=y&&"object"==typeof y?y.filter(e=>e&&"object"==typeof e):null,v=h&&"object"==typeof h?h.filter(e=>e&&"object"==typeof e):null,O=(f,d)=>{var m,y,h,b,g;const v=(e,t)=>!(e&&t&&!(0,i.isEqual)(e,t));if(v(n,d.$ref)||t.throwUnsupportedError(`Cannot have $ref in a node *and* in its '${f}'`,{blob:e}),v(r,d.type)||t.throwUnsupportedError(`Cannot have 'type' in a node *and* in its '${f}'`,{blob:e}),o)if(d.enum){const e=(0,i.intersection)(o,d.enum);if(0===e.length)throw new i.MalformedTypeError("Cannot merge types with non-intersecting enums",{path:t.path,blob:{child:[...t.path,f]}});d.enum=e}else d.enum=o;if(void 0!==s)if(void 0!==d.const){if((0,i.isEqual)(s,d.const))throw new i.MalformedTypeError("Cannot merge types with mismatching const",{path:t.path,blob:{child:[...t.path,f]}})}else d.const=s;if(d.items=null!==(m=d.items)&&void 0!==m?m:a,d.additionalItems=null!==(y=d.additionalItems)&&void 0!==y?y:l,void 0===c&&void 0===d.required||(d.required=(0,i.union)(null!==(h=d.required)&&void 0!==h?h:[],null!=c?c:[])),void 0===u!=(void 0===d.properties))null!==(b=d.properties)&&void 0!==b||(d.properties=u);else if(void 0!==u){const e=u,t=d.properties,n=Object.keys(e),r=Object.keys(t),o=(0,i.union)(n,r),s={};o.forEach(n=>{void 0!==e[n]?s[n]=t[n]:void 0!==t[n]?s[n]=e[n]:s[n]={allOf:[e[n],t[n]]}})}void 0===p!=(void 0===d.additionalProperties)?null!==(g=d.additionalProperties)&&void 0!==g||(d.additionalProperties=p):void 0!==p&&(d.additionalProperties={allOf:[d.additionalProperties,p]})};return f&&"object"==typeof f&&O("then",f),d&&"object"==typeof d&&O("else",d),b&&"object"==typeof b&&b.forEach(e=>O("allOf",e)),g&&"object"==typeof g&&g.forEach(e=>O("anyOf",e)),v&&"object"==typeof v&&v.forEach(e=>O("oneOf",e)),{...f&&"object"==typeof f?{then:f}:{},...d&&"object"==typeof d?{else:d}:{},...b&&"object"==typeof b?{allOf:b}:{},...g&&"object"==typeof g?{anyOf:g}:{},...v&&"object"==typeof v?{oneOf:v}:{}}}(e,t),t);void 0===e&&t.throwUnsupportedError("Internal error",{blob:{schema:e}});const r=e=>({type:"ref",ref:(0,o.decodeRefNameJsonSchema)(e)}),u=t=>void 0===e.$ref?t:{type:"and",and:[t,r(e.$ref)]},{const:p,enum:f}=e,d={...void 0!==p?{const:p}:{},...void 0!==f?{enum:f}:{}};if(void 0===e.type)return e.$ref?{...r(e.$ref),...d}:{type:"any",...d};const m=(0,i.ensureArray)(e.type).map(n=>function(e,t,n,r){var o,i,u,p;if(c(t))return"null"===t?(0,s.annotateCoreTypes)({type:"null"},e):(0,s.annotateCoreTypes)({type:t,...n},e);if("array"===t)return Array.isArray(e.items)?(0,s.annotateCoreTypes)({type:"tuple",elementTypes:e.items.map(e=>l(e,a(r,"items"))),additionalItems:void 0===e.additionalItems||("boolean"==typeof e.additionalItems?e.additionalItems:l(e.additionalItems,a(r,"additionalItems"))),minItems:null!==(o=e.minItems)&&void 0!==o?o:0,...n},e):!1===e.items?(0,s.annotateCoreTypes)({type:"tuple",elementTypes:[],additionalItems:!1,minItems:0,...n},e):(0,s.annotateCoreTypes)({type:"array",elementType:void 0===e.items||!0===e.items?{type:"any"}:l(e.items,a(r,"items")),...n},e);if("object"===t){const t=new Set(null!==(i=e.required)&&void 0!==i?i:[]),o=null!==(u=e.additionalProperties)&&void 0!==u?u:r.defaultAdditionalProperties;return(0,s.annotateCoreTypes)({type:"object",properties:Object.fromEntries(Object.entries(null!==(p=e.properties)&&void 0!==p?p:{}).map(([e,n])=>[e,{node:l(n,a(a(r,"properties"),e)),required:t.has(e)}])),additionalProperties:"boolean"==typeof o?o:l(o,a(r,"additionalProperties")),...n},e)}r.throwUnsupportedError(`Unsupported JSON Schema type "${t}"`,{blob:{schema:e}})}(e,n,d,t));return 1===m.length?u(m[0]):u({type:"or",or:m})}n.convertJsonSchemaToCoreTypes=function(e,t={}){const n="string"==typeof e?(0,r.getAstByString)(e):(0,r.getAstByObject)(e),{json:o}=n,{definitions:s}=o,a={version:1,types:Object.keys(null!=s?s:{}).map(e=>{var o;return{...l((null!=s?s:{})[e],{locByPath(){return{path:this.path,loc:(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})}},path:["definitions",e],throwUnsupportedError(e,t){throw(t={...t}).path||(t.path=this.path),t.loc||(t.loc=(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})),new i.UnsupportedError(e,t)},defaultAdditionalProperties:null===(o=t.defaultAdditionalProperties)||void 0===o||o}),name:e}})};return{data:a,convertedTypes:a.types.map(({name:e})=>e),notConvertedTypes:[]}},n.complexProps=new Set(["anyOf","allOf","oneOf","then","else"]);const c=e=>["string","number","integer","boolean","null"].includes(e)},{"./annotations":2,"core-types":6,jsonpos:25,"openapi-json-schema":18}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertOpenApiToCoreTypes=n.convertCoreTypesToOpenApi=void 0;const r=e("openapi-json-schema"),o=e("./core-types-to-json-schema"),i=e("./json-schema-to-core-types");n.convertCoreTypesToOpenApi=function(e,t){const{data:n,...i}=(0,o.convertCoreTypesToJsonSchema)(e,t);return{...i,data:(0,r.jsonSchemaDocumentToOpenApi)(n,t)}},n.convertOpenApiToCoreTypes=function(e){e="string"==typeof e?JSON.parse(e):e;const t=(0,r.openApiToJsonSchema)(e);return(0,i.convertJsonSchemaToCoreTypes)(t)}},{"./core-types-to-json-schema":3,"./json-schema-to-core-types":4,"openapi-json-schema":18}],6:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.some=n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.formatSee=n.formatDefault=n.formatExamples=n.stringify=n.stripAnnotations=n.stringifyAnnotations=n.extractAnnotations=n.mergeAnnotations=n.isNonNullable=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.isPrimitiveType=n.ensureArray=n.validate=n.simplify=void 0,o(e("./lib/types"),n);var i=e("./lib/simplify");Object.defineProperty(n,"simplify",{enumerable:!0,get:function(){return i.simplify}});var s=e("./lib/validate");Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return s.validate}});var a=e("./lib/util");Object.defineProperty(n,"ensureArray",{enumerable:!0,get:function(){return a.ensureArray}}),Object.defineProperty(n,"isPrimitiveType",{enumerable:!0,get:function(){return a.isPrimitiveType}}),Object.defineProperty(n,"hasConstEnum",{enumerable:!0,get:function(){return a.hasConstEnum}}),Object.defineProperty(n,"isEqual",{enumerable:!0,get:function(){return a.isEqual}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return a.intersection}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return a.union}}),Object.defineProperty(n,"isNonNullable",{enumerable:!0,get:function(){return a.isNonNullable}});var l=e("./lib/annotation");Object.defineProperty(n,"mergeAnnotations",{enumerable:!0,get:function(){return l.mergeAnnotations}}),Object.defineProperty(n,"extractAnnotations",{enumerable:!0,get:function(){return l.extractAnnotations}}),Object.defineProperty(n,"stringifyAnnotations",{enumerable:!0,get:function(){return l.stringifyAnnotations}}),Object.defineProperty(n,"stripAnnotations",{enumerable:!0,get:function(){return l.stripAnnotations}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(n,"formatExamples",{enumerable:!0,get:function(){return l.formatExamples}}),Object.defineProperty(n,"formatDefault",{enumerable:!0,get:function(){return l.formatDefault}}),Object.defineProperty(n,"formatSee",{enumerable:!0,get:function(){return l.formatSee}});var c=e("./lib/error");Object.defineProperty(n,"MalformedTypeError",{enumerable:!0,get:function(){return c.MalformedTypeError}}),Object.defineProperty(n,"MissingReferenceError",{enumerable:!0,get:function(){return c.MissingReferenceError}}),Object.defineProperty(n,"UnsupportedError",{enumerable:!0,get:function(){return c.UnsupportedError}}),Object.defineProperty(n,"RelatedError",{enumerable:!0,get:function(){return c.RelatedError}}),Object.defineProperty(n,"throwUnsupportedError",{enumerable:!0,get:function(){return c.throwUnsupportedError}}),Object.defineProperty(n,"throwRelatedError",{enumerable:!0,get:function(){return c.throwRelatedError}}),Object.defineProperty(n,"isCoreTypesError",{enumerable:!0,get:function(){return c.isCoreTypesError}}),Object.defineProperty(n,"decorateErrorMeta",{enumerable:!0,get:function(){return c.decorateErrorMeta}}),Object.defineProperty(n,"decorateError",{enumerable:!0,get:function(){return c.decorateError}});var u=e("./lib/location");Object.defineProperty(n,"positionToLineColumn",{enumerable:!0,get:function(){return u.positionToLineColumn}}),Object.defineProperty(n,"locationToLineColumn",{enumerable:!0,get:function(){return u.locationToLineColumn}}),Object.defineProperty(n,"getPositionOffset",{enumerable:!0,get:function(){return u.getPositionOffset}}),Object.defineProperty(n,"mergeLocations",{enumerable:!0,get:function(){return u.mergeLocations}});var p=e("./lib/traverse");Object.defineProperty(n,"some",{enumerable:!0,get:function(){return p.some}}),Object.defineProperty(n,"traverse",{enumerable:!0,get:function(){return p.traverse}})},{"./lib/annotation":7,"./lib/error":8,"./lib/location":9,"./lib/simplify":13,"./lib/traverse":14,"./lib/types":15,"./lib/util":16,"./lib/validate":17}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=n.formatSee=n.formatDefault=n.formatExamples=n.arrayOrSingle=n.stripAnnotations=n.stringifyAnnotations=n.wrapWhitespace=n.extractAnnotations=n.mergeAnnotations=void 0;const r=e("./location"),o=e("./util");function i(e){return e.includes("\n")?["*",e.split("\n").map(e=>` * ${e}`).join("\n")," "].join("\n"):e.startsWith(" ")?e:` ${e}`}function s(e){return 1===e.length?e[0]:e}function a(e){return e.map(e=>"@example\n"+p(u(e).split("\n"),4)).join("\n").trim()}function l(e){return["@default",p(u(e).split("\n"),4)].join("\n").trim()}function c(e){return e.map(e=>"@see "+u(e)).join("\n").trim()}function u(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}function p(e,t,n=!1){return e.map((e,r)=>(0===r&&n?" ".repeat(t-2)+"* ":" ".repeat(t))+e).join("\n")}n.mergeAnnotations=function(e){var t;const n=e=>!!e,i=(e,t="\n")=>(0,o.uniq)(e.filter(n)).join(t).trim(),a=null===(t=e.find(e=>e.name))||void 0===t?void 0:t.name,l=i(e.map(e=>e.title),", "),c=i(e.map(e=>e.description)),u=(0,o.uniq)([].concat(...e.map(e=>(0,o.ensureArray)(e.examples))).filter(n)),p=i(e.map(e=>e.default)),f=(0,o.uniq)([].concat(...e.map(e=>(0,o.ensureArray)(e.see))).filter(n)),d=i(e.map(e=>e.comment)),m=(0,r.mergeLocations)(e.map(e=>e.loc));return{...a?{name:a}:{},...l?{title:l}:{},...c?{description:c}:{},...u.length>0?{examples:s(u)}:{},...p?{default:p}:{},...f.length>0?{see:s(f)}:{},...d?{comment:d}:{},...m?{loc:m}:{}}},n.extractAnnotations=function(e){const{title:t,description:n,examples:r,default:o,comment:i,see:s}=e;return{...t?{title:t}:{},...n?{description:n}:{},...r?{examples:r}:{},...o?{default:o}:{},...i?{comment:i}:{},...s?{see:s}:{}}},n.wrapWhitespace=i,n.stringifyAnnotations=function(e,{includeComment:t=!1,formatWhitespace:n=!1}={}){const{description:r,examples:s,default:u,comment:p,see:f}=e,d=[r,...null==s?[]:[a((0,o.ensureArray)(s))],...void 0===u?[]:[l(u)],...null==f?[]:[c((0,o.ensureArray)(f))],...t?[p]:[]].filter(e=>e).join("\n\n").trim().replace(/\*\//g,"*\\/");return n&&d?i(d):d},n.stripAnnotations=function e(t,n=!0){const{comment:r,description:o,default:i,examples:s,see:a,title:l,...c}=t,u=c;if(n){if("and"===u.type)return{...u,and:u.and.map(t=>e(t,!0))};if("or"===u.type)return{...u,or:u.or.map(t=>e(t,!0))};if("array"===u.type)return{...u,elementType:e(u.elementType,!0)};if("tuple"===u.type)return{...u,elementTypes:u.elementTypes.map(t=>e(t,!0)),additionalItems:"object"==typeof u.additionalItems?e(u.additionalItems,!0):u.additionalItems};if("object"===u.type)return{...u,properties:Object.fromEntries(Object.keys(u.properties).map(t=>[t,{...u.properties[t],node:e(u.properties[t].node,!0)}])),additionalProperties:"object"==typeof u.additionalProperties?e(u.additionalProperties,!0):u.additionalProperties}}return u},n.arrayOrSingle=s,n.formatExamples=a,n.formatDefault=l,n.formatSee=c,n.stringify=u},{"./location":9,"./util":16}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.CoreTypesError=void 0;class r extends Error{constructor(e,t={}){super(e),Object.setPrototypeOf(this,r.prototype),this.blob=t.blob,this.path=t.path,this.loc=t.loc,this.source=t.source,this.filename=t.filename,this.relatedError=t.relatedError}}n.CoreTypesError=r;class o extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,o.prototype)}}n.MalformedTypeError=o;class i extends r{constructor(e,t={}){super(`Reference to missing type "${e}"`,t),Object.setPrototypeOf(this,i.prototype)}}n.MissingReferenceError=i;class s extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,s.prototype)}}n.UnsupportedError=s;class a extends r{constructor(e,t={}){super(e.message,{...t,relatedError:e}),Object.setPrototypeOf(this,a.prototype)}}function l(e){return e instanceof r}function c(e,t){var n,r,o,i,s;return t.blob&&(null!==(n=e.blob)&&void 0!==n||(e.blob=t.blob)),t.path&&(null!==(r=e.path)&&void 0!==r||(e.path=t.path)),t.loc&&(null!==(o=e.loc)&&void 0!==o||(e.loc=t.loc)),t.source&&(null!==(i=e.source)&&void 0!==i||(e.source=t.source)),t.filename&&(null!==(s=e.filename)&&void 0!==s||(e.filename=t.filename)),e}n.RelatedError=a,n.throwUnsupportedError=function(e,t,n){throw new s(e,{blob:t,...t.loc?{loc:t.loc}:{},...n?{path:n}:{}})},n.throwRelatedError=function(e,t){throw new a(e,t)},n.isCoreTypesError=l,n.decorateErrorMeta=c,n.decorateError=function(e,t){return l(e)&&c(e,t),e}},{}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=void 0;const r=e("./util");function o(e,t){const n=e.slice(0,t).split("\n").length,r=e.lastIndexOf("\n",t);return-1===r?{offset:t,line:n,column:t}:{offset:t,line:n,column:t-r}}n.positionToLineColumn=o,n.locationToLineColumn=function(e,t){return"object"==typeof t.start?t:{start:void 0===t.start?void 0:o(e,t.start),...null==t.end?{}:{end:o(e,t.end)}}},n.getPositionOffset=function(e){return void 0===e||"number"==typeof e?e:e.offset},n.mergeLocations=function(e){var t,n,o;let i,s;const a=e=>"number"==typeof e?e:null==e?void 0:e.offset;e.filter(r.isNonNullable).forEach(({start:e,end:t})=>{const n=a(e),r=a(t);void 0!==n&&(!i||"number"==typeof i.location&&i.location===n||i.offset>n)&&(i={location:e,offset:n}),void 0!==r&&(!s||"number"==typeof s.location&&s.location===n||s.offseto(e));return t.some(e=>0===e.length)?[]:(0,r.uniq)([].concat(...t))},n.combineConstAndEnum=o},{"../util":16}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.intersectConstEnum=void 0;const r=e("../annotation"),o=e("../util");n.intersectConstEnum=function(e){if(0===e.length)throw new Error("Cannot intersect const and enum from an empty array of nodes");if(1===e.length)return e[0];const t=e.map(e=>void 0!==e.const?[e.const]:void 0!==e.enum?e.enum:void 0).filter(e=>!!e),n=t.slice(1).reduce((e,t)=>(0,o.intersection)(e,t),t[0]);return{type:e[0].type,...1===n.length?{const:n[0]}:{},...1!==n.length?{enum:n}:{},...(0,r.mergeAnnotations)(e)}}},{"../annotation":7,"../util":16}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplifySingle=void 0;const r=e("./const-enum");n.simplifySingle=function(e){return"boolean"===e.type||"integer"===e.type||"number"===e.type||"string"===e.type?(0,r.simplifyEnumAndConst)(e):e}},{"./const-enum":10}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplify=void 0;const r=e("./simplifications/single"),o=e("./simplifications/const-enum"),i=e("./simplifications/intersect-const-enum"),s=e("./error"),a=e("./annotation"),l=e("./util"),c=["any","string","number","integer","boolean"];n.simplify=function e(t){if(Array.isArray(t))return t.map(t=>e(t));if((0,l.isNodeDocument)(t))return{...t,types:e(t.types)};const n=e=>(0,l.copyName)(t,e);if("tuple"===t.type)return{...t,elementTypes:t.elementTypes.map(t=>e(t)),...t.additionalItems&&"object"==typeof t.additionalItems?{additionalItems:e(t.additionalItems)}:{}};if("array"===t.type)return{...t,elementType:e(t.elementType)};if("object"===t.type)return{...t,properties:Object.fromEntries(Object.entries(t.properties).map(([t,{node:n,required:r}])=>[t,{node:e(n),required:r}])),...t.additionalProperties&&"object"==typeof t.additionalProperties?{additionalProperties:e(t.additionalProperties)}:{}};if("and"!==t.type&&"or"!==t.type)return n((0,r.simplifySingle)(t));if("and"===t.type){const r=function(e){const t=(0,l.splitTypes)(e);if(t.any.length>0){if(0===t.and.length&&0===t.or.length&&0===t.ref.length&&0===t.null.length&&0===t.string.length&&0===t.number.length&&0===t.integer.length&&0===t.boolean.length&&0===t.object.length&&0===t.array.length&&0===t.tuple.length)return[{type:"any",...(0,a.mergeAnnotations)(t.any.map(({node:e})=>e))}];t.any=[]}const n=e=>e.map(({node:e})=>e);t.boolean.length>1&&(t.boolean=[{node:(0,i.intersectConstEnum)([...t.boolean.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.boolean)}]);t.string.length>1&&(t.string=[{node:(0,i.intersectConstEnum)([...t.string.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.string)}]);t.number.length>0&&t.integer.length>0?(t.number=[{node:(0,i.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.integer),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.number)}],t.integer=[]):t.number.length>1?t.number=[{node:(0,i.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.number)}]:t.integer.length>1&&(t.integer=[{node:(0,i.intersectConstEnum)([...t.integer.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.integer)}]);t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,l.flattenSplitTypeValues)(t)}([].concat(...t.and.map(t=>{const n=e(t);return n.and?n.and:[n]})));return 1===r.length?n({...r[0],...(0,a.mergeAnnotations)([(0,a.extractAnnotations)(t),r[0]])}):n({type:"and",and:r,...(0,a.extractAnnotations)(t)})}if("or"===t.type){const i=function(e){const t=(0,l.splitTypes)(e);if(t.any.length>0){const e=(0,o.mergeConstEnumUnion)(t.any.map(({node:e})=>e));if(0===e.length)return[{type:"any",...(0,a.mergeAnnotations)(t.any.map(({node:e})=>e))}]}for(const[e,n]of Object.entries(t)){const i=e;if(!c.includes(i)||!n.length)continue;const s=n,u=s.map(({node:e})=>e),p=(0,o.mergeConstEnumUnion)(u);0===p.length?t[i]=[{node:{type:i,...(0,a.mergeAnnotations)(u)},order:(0,l.firstSplitTypeIndex)(s)}]:t[i]=[{node:(0,r.simplifySingle)({type:i,enum:p,...(0,a.mergeAnnotations)(u)}),order:(0,l.firstSplitTypeIndex)(s)}]}t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,l.flattenSplitTypeValues)(t)}([].concat(...t.or.map(t=>{const n=e(t);return n.or?n.or:[n]})));return 1===i.length?n({...i[0],...(0,a.mergeAnnotations)([(0,a.extractAnnotations)(t),i[0]])}):n({type:"or",or:i,...(0,a.extractAnnotations)(t)})}throw new s.MalformedTypeError("Invalid node",t)}},{"./annotation":7,"./error":8,"./simplifications/const-enum":10,"./simplifications/intersect-const-enum":11,"./simplifications/single":12,"./util":16}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.some=n.traverse=void 0;class r extends Error{}function o(e,t){function n(e,t,n,r,o,i){const s={node:void 0!==i?i:void 0===r?t[n]:t[n][r],path:[...e.path,n,...void 0===r?[]:[r]],parentNode:t,parentProperty:n,index:r,required:o};return Object.assign({},e,s)}!function e(t,r){r(t);const{node:o}=t;if("array"===o.type)e(n(t,o,"elementType"),r);else if("tuple"===o.type)o.elementTypes.forEach((i,s)=>e(n(t,o,"elementTypes",s),r)),"object"==typeof o.additionalItems&&e(n(t,o,"additionalItems"),r);else if("object"===o.type){for(const i of Object.keys(o.properties))e(n(t,o,"properties",i,o.properties[i].required,o.properties[i].node),r);"object"==typeof o.additionalProperties&&e(n(t,o,"additionalProperties"),r)}else"and"===o.type?o.and.forEach((i,s)=>e(n(t,o,"and",s),r)):"or"===o.type&&o.or.forEach((i,s)=>e(n(t,o,"or",s),r))}({node:e,rootNode:e,path:[]},t)}n.traverse=o,n.some=function(e,t){try{o(e,e=>{if(t(e))throw new r})}catch(e){if(e instanceof r)return!0;throw e}return!1}},{}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeDocument=n.isNonNullable=n.copyName=n.firstSplitTypeIndex=n.flattenSplitTypeValues=n.splitTypes=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.constEnumTypes=n.isPrimitiveType=n.ensureArray=n.uniq=void 0,n.uniq=function(e){return e.filter((t,n)=>{for(let o=0;o["null","string","number","integer","boolean"].includes(e.type),n.constEnumTypes=new Set(["any","string","number","integer","boolean","object","array","tuple","ref"]);function r(e,t){if(typeof e!=typeof t)return!1;if(null===e!=(null===t))return!1;if(null===e)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((e,n)=>!r(e,t[n]));if(Array.isArray(e)!==Array.isArray(t))return!1;if("object"==typeof e){const n=Object.keys(e).sort();return!!r(n,Object.keys(t).sort())&&!n.some(n=>!r(e[n],t[n]))}return e===t}n.hasConstEnum=e=>n.constEnumTypes.has(e.type),n.isEqual=r,n.intersection=function(e,t){const n=[];return e.forEach(e=>{t.forEach(t=>{r(e,t)&&n.push(e)})}),n},n.union=function(e,t){const n=[...e];return t.forEach(t=>{!e.some(e=>r(t,e))&&n.push(t)}),n},n.splitTypes=function(e){const t={and:[],or:[],ref:[],any:[],null:[],string:[],number:[],integer:[],boolean:[],object:[],array:[],tuple:[]};return e.forEach((e,n)=>{if("and"!==e.type&&"or"!==e.type||"and"===e.type&&e.and.length>0||"or"===e.type&&e.or.length>0){const r={node:e,order:n};t[e.type].push(r)}}),t},n.flattenSplitTypeValues=function(e){return[].concat(Object.values(e).flat().sort((e,t)=>e.order-t.order).map(({node:e})=>e))},n.firstSplitTypeIndex=function(e){return Math.min(...e.map(({order:e})=>e))},n.copyName=function(e,t){return void 0===e.name?t:{...t,name:e.name}},n.isNonNullable=function(e){return null!=e},n.isNodeDocument=function(e){return Array.isArray(e.types)}},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=void 0;const r=e("./error"),o=e("./util");n.validate=function e(t){(0,o.hasConstEnum)(t)&&function(e){if(e.enum&&0===e.enum.length)throw new r.MalformedTypeError("Empty enum is not allowed",e);if(e.enum&&void 0!==e.const&&!e.enum.some(t=>(0,o.isEqual)(t,e.const)))throw new r.MalformedTypeError("Enum and const are both set, but enum doesn't contain const",e)}(t),"and"===t.type&&t.and.forEach(t=>e(t)),"or"===t.type&&t.or.forEach(t=>e(t))}},{"./error":8,"./util":16}],18:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),o(e("./lib"),n),o(e("./lib/types"),n),o(e("./lib/utils"),n)},{"./lib":19,"./lib/types":22,"./lib/utils":23}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchema=n.jsonSchemaDocumentToOpenApi=n.decorateOpenApi=void 0;const r=e("./json-schema-to-openapi"),o=e("./openapi-to-json-schema");function i(e,{title:t,version:n,schemaVersion:r="3.0.0"}){const o={title:t,version:n};return e.$id&&(o["x-id"]=e.$id,delete e.$id),e.$comment&&(o["x-comment"]=e.$comment,delete e.$comment),delete e.$schema,{openapi:r,info:o,paths:{},...e}}n.decorateOpenApi=i,n.jsonSchemaDocumentToOpenApi=function(e,t){const{definitions:n={},...o}=e;return i({...o,components:{schemas:Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(0,r.jsonSchemaTypeToOpenApi)(t)]))}},t)},n.openApiToJsonSchema=function(e){const t=e.components.schemas;return{definitions:Object.fromEntries(Object.keys(t).map(e=>[e,(0,o.openApiToJsonSchemaType)(t[e])]))}}},{"./json-schema-to-openapi":20,"./openapi-to-json-schema":21}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsonSchemaTypeToOpenApi=void 0;const r=e("./utils");n.jsonSchemaTypeToOpenApi=function e(t){return"boolean"==typeof t?t:(t=function(e){if(void 0===e.type)return e;const{type:t,...n}=e,r=Array.isArray(t)?t.includes("null"):"null"===t,o=Array.isArray(t)?t.filter(e=>"null"!==e):"null"===t?void 0:t,i=(e,t)=>"any"!==t&&t?{...e,type:t}:e;void 0!==e.const&&(n.enum=[e.const],delete n.const);const s=e=>r?{...e,nullable:r}:e;return Array.isArray(o)?0===o.length?s(n):1===o.length?i(s(n),o[0]):{...s(n),anyOf:o.map(e=>i({},e))}:i(s(n),o)}(t),t=(n=t).$ref?{...n,$ref:(0,r.encodeRefNameOpenApi)((0,r.decodeRefNameJsonSchema)(n.$ref))}:n,(0,r.recurseSchema)(t,e));var n}},{"./utils":23}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchemaType=void 0;const r=e("./utils");n.openApiToJsonSchemaType=function e(t){if("boolean"==typeof t)return t;const{type:n,nullable:o,...i}=t,s=function(e,t){if(void 0!==e&&"any"!==e){if(Array.isArray(e)){if(e.includes("any"))return;return!e.includes("null")&&t&&e.push("null"),1===e.length?e[0]:e}return"null"!==e&&t?[e,"null"]:e}}(n,o);let a={...i,...s?{type:s}:{}};var l;return a=(l=a).$ref?{...l,$ref:(0,r.encodeRefNameJsonSchema)((0,r.decodeRefNameOpenApi)(l.$ref))}:l,(0,r.recurseSchema)(a,e)}},{"./utils":23}],22:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],23:[function(e,t,n){"use strict";function r(e){return encodeURIComponent(e)}function o(e){return decodeURIComponent(e)}function i(e){return e&&Object.keys(e).length>0}Object.defineProperty(n,"__esModule",{value:!0}),n.recurseSchema=n.decodeRefNameOpenApi=n.encodeRefNameOpenApi=n.decodeRefNameJsonSchema=n.encodeRefNameJsonSchema=n.decodePathPart=n.encodePathPart=void 0,n.encodePathPart=r,n.decodePathPart=o,n.encodeRefNameJsonSchema=function(e){return`#/definitions/${r(e)}`},n.decodeRefNameJsonSchema=function(e){return e.startsWith("#/definitions/")?o(e.slice(14)):o(e)},n.encodeRefNameOpenApi=function(e){return`#/components/schemas/${r(e)}`},n.decodeRefNameOpenApi=function(e){return e.startsWith("#/components/schemas/")?o(e.slice(21)):o(e)},n.recurseSchema=function(e,t){if("object"!=typeof e)return e;const n=e;return{...n,..."object"!=typeof n.items?{}:Array.isArray(n.items)?{items:n.items.map(e=>t(e))}:{items:t(n.items)},..."object"!=typeof n.additionalItems?{}:{additionalItems:t(n.additionalItems)},..."object"!=typeof n.contains?{}:{contains:t(n.contains)},...i(n.properties)?{properties:Object.fromEntries(Object.keys(n.properties).map(e=>{var r;return[e,t(null===(r=n.properties)||void 0===r?void 0:r[e])]}))}:{},...i(n.patternProperties)?{patternProperties:Object.fromEntries(Object.keys(n.patternProperties).map(e=>{var r;return[e,t(null===(r=n.patternProperties)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.additionalProperties?{}:{additionalProperties:t(n.additionalProperties)},...i(n.dependencies)?{dependencies:Object.fromEntries(Object.keys(n.dependencies).map(e=>{var r;return[e,t(null===(r=n.dependencies)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.propertyNames?{}:{propertyNames:t(n.propertyNames)},..."object"!=typeof n.if?{}:{if:t(n.if)},..."object"!=typeof n.then?{}:{then:t(n.then)},..."object"!=typeof n.else?{}:{else:t(n.else)},..."object"==typeof n.allOf&&n.allOf.length?{allOf:n.allOf.map(e=>t(e))}:{},..."object"==typeof n.anyOf&&n.anyOf.length?{anyOf:n.anyOf.map(e=>t(e))}:{},..."object"==typeof n.oneOf&&n.oneOf.length?{oneOf:n.oneOf.map(e=>t(e))}:{},..."object"!=typeof n.not?{}:{not:t(n.not)},...i(n.definitions)?{definitions:Object.fromEntries(Object.keys(n.definitions).map(e=>{var r;return[e,t(null===(r=n.definitions)||void 0===r?void 0:r[e])]}))}:{}}}},{}],24:[function(e,t,n){(function(e){(function(){!function(e,r){"object"==typeof n&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):e.jsonToAst=r()}(this,function(){"use strict";"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t(function(e){e.exports&&(e.exports=function(){var e=3,t=4,n=12,r=13,o=16,i=17;function s(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}function a(e,t){void 0===t&&(t=0);var n=e.charCodeAt(t);if(55296<=n&&n<=56319&&t=1){var o=n;return 55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(o-56320)+65536:o}return n}function l(s,a,l){var c=[s].concat(a).concat([l]),u=c[c.length-2],p=l,f=c.lastIndexOf(14);if(f>1&&c.slice(1,f).every(function(t){return t==e})&&-1==[e,r,i].indexOf(s))return 2;var d=c.lastIndexOf(t);if(d>0&&c.slice(1,d).every(function(e){return e==t})&&-1==[n,t].indexOf(u))return c.filter(function(e){return e==t}).length%2==1?3:4;if(0==u&&1==p)return 0;if(2==u||0==u||1==u)return 14==p&&a.every(function(t){return t==e})?2:1;if(2==p||0==p||1==p)return 1;if(6==u&&(6==p||7==p||9==p||10==p))return 0;if(!(9!=u&&7!=u||7!=p&&8!=p))return 0;if((10==u||8==u)&&8==p)return 0;if(p==e||15==p)return 0;if(5==p)return 0;if(u==n)return 0;var m=-1!=c.indexOf(e)?c.lastIndexOf(e)-1:c.length-2;return-1!=[r,i].indexOf(c[m])&&c.slice(m+1,-1).every(function(t){return t==e})&&14==p||15==u&&-1!=[o,i].indexOf(p)?0:-1!=a.indexOf(t)?2:u==t&&p==t?0:1}function c(s){return 1536<=s&&s<=1541||1757==s||1807==s||2274==s||3406==s||69821==s||70082<=s&&s<=70083||72250==s||72326<=s&&s<=72329||73030==s?n:13==s?0:10==s?1:0<=s&&s<=9||11<=s&&s<=12||14<=s&&s<=31||127<=s&&s<=159||173==s||1564==s||6158==s||8203==s||8206<=s&&s<=8207||8232==s||8233==s||8234<=s&&s<=8238||8288<=s&&s<=8292||8293==s||8294<=s&&s<=8303||55296<=s&&s<=57343||65279==s||65520<=s&&s<=65528||65529<=s&&s<=65531||113824<=s&&s<=113827||119155<=s&&s<=119162||917504==s||917505==s||917506<=s&&s<=917535||917632<=s&&s<=917759||918e3<=s&&s<=921599?2:768<=s&&s<=879||1155<=s&&s<=1159||1160<=s&&s<=1161||1425<=s&&s<=1469||1471==s||1473<=s&&s<=1474||1476<=s&&s<=1477||1479==s||1552<=s&&s<=1562||1611<=s&&s<=1631||1648==s||1750<=s&&s<=1756||1759<=s&&s<=1764||1767<=s&&s<=1768||1770<=s&&s<=1773||1809==s||1840<=s&&s<=1866||1958<=s&&s<=1968||2027<=s&&s<=2035||2070<=s&&s<=2073||2075<=s&&s<=2083||2085<=s&&s<=2087||2089<=s&&s<=2093||2137<=s&&s<=2139||2260<=s&&s<=2273||2275<=s&&s<=2306||2362==s||2364==s||2369<=s&&s<=2376||2381==s||2385<=s&&s<=2391||2402<=s&&s<=2403||2433==s||2492==s||2494==s||2497<=s&&s<=2500||2509==s||2519==s||2530<=s&&s<=2531||2561<=s&&s<=2562||2620==s||2625<=s&&s<=2626||2631<=s&&s<=2632||2635<=s&&s<=2637||2641==s||2672<=s&&s<=2673||2677==s||2689<=s&&s<=2690||2748==s||2753<=s&&s<=2757||2759<=s&&s<=2760||2765==s||2786<=s&&s<=2787||2810<=s&&s<=2815||2817==s||2876==s||2878==s||2879==s||2881<=s&&s<=2884||2893==s||2902==s||2903==s||2914<=s&&s<=2915||2946==s||3006==s||3008==s||3021==s||3031==s||3072==s||3134<=s&&s<=3136||3142<=s&&s<=3144||3146<=s&&s<=3149||3157<=s&&s<=3158||3170<=s&&s<=3171||3201==s||3260==s||3263==s||3266==s||3270==s||3276<=s&&s<=3277||3285<=s&&s<=3286||3298<=s&&s<=3299||3328<=s&&s<=3329||3387<=s&&s<=3388||3390==s||3393<=s&&s<=3396||3405==s||3415==s||3426<=s&&s<=3427||3530==s||3535==s||3538<=s&&s<=3540||3542==s||3551==s||3633==s||3636<=s&&s<=3642||3655<=s&&s<=3662||3761==s||3764<=s&&s<=3769||3771<=s&&s<=3772||3784<=s&&s<=3789||3864<=s&&s<=3865||3893==s||3895==s||3897==s||3953<=s&&s<=3966||3968<=s&&s<=3972||3974<=s&&s<=3975||3981<=s&&s<=3991||3993<=s&&s<=4028||4038==s||4141<=s&&s<=4144||4146<=s&&s<=4151||4153<=s&&s<=4154||4157<=s&&s<=4158||4184<=s&&s<=4185||4190<=s&&s<=4192||4209<=s&&s<=4212||4226==s||4229<=s&&s<=4230||4237==s||4253==s||4957<=s&&s<=4959||5906<=s&&s<=5908||5938<=s&&s<=5940||5970<=s&&s<=5971||6002<=s&&s<=6003||6068<=s&&s<=6069||6071<=s&&s<=6077||6086==s||6089<=s&&s<=6099||6109==s||6155<=s&&s<=6157||6277<=s&&s<=6278||6313==s||6432<=s&&s<=6434||6439<=s&&s<=6440||6450==s||6457<=s&&s<=6459||6679<=s&&s<=6680||6683==s||6742==s||6744<=s&&s<=6750||6752==s||6754==s||6757<=s&&s<=6764||6771<=s&&s<=6780||6783==s||6832<=s&&s<=6845||6846==s||6912<=s&&s<=6915||6964==s||6966<=s&&s<=6970||6972==s||6978==s||7019<=s&&s<=7027||7040<=s&&s<=7041||7074<=s&&s<=7077||7080<=s&&s<=7081||7083<=s&&s<=7085||7142==s||7144<=s&&s<=7145||7149==s||7151<=s&&s<=7153||7212<=s&&s<=7219||7222<=s&&s<=7223||7376<=s&&s<=7378||7380<=s&&s<=7392||7394<=s&&s<=7400||7405==s||7412==s||7416<=s&&s<=7417||7616<=s&&s<=7673||7675<=s&&s<=7679||8204==s||8400<=s&&s<=8412||8413<=s&&s<=8416||8417==s||8418<=s&&s<=8420||8421<=s&&s<=8432||11503<=s&&s<=11505||11647==s||11744<=s&&s<=11775||12330<=s&&s<=12333||12334<=s&&s<=12335||12441<=s&&s<=12442||42607==s||42608<=s&&s<=42610||42612<=s&&s<=42621||42654<=s&&s<=42655||42736<=s&&s<=42737||43010==s||43014==s||43019==s||43045<=s&&s<=43046||43204<=s&&s<=43205||43232<=s&&s<=43249||43302<=s&&s<=43309||43335<=s&&s<=43345||43392<=s&&s<=43394||43443==s||43446<=s&&s<=43449||43452==s||43493==s||43561<=s&&s<=43566||43569<=s&&s<=43570||43573<=s&&s<=43574||43587==s||43596==s||43644==s||43696==s||43698<=s&&s<=43700||43703<=s&&s<=43704||43710<=s&&s<=43711||43713==s||43756<=s&&s<=43757||43766==s||44005==s||44008==s||44013==s||64286==s||65024<=s&&s<=65039||65056<=s&&s<=65071||65438<=s&&s<=65439||66045==s||66272==s||66422<=s&&s<=66426||68097<=s&&s<=68099||68101<=s&&s<=68102||68108<=s&&s<=68111||68152<=s&&s<=68154||68159==s||68325<=s&&s<=68326||69633==s||69688<=s&&s<=69702||69759<=s&&s<=69761||69811<=s&&s<=69814||69817<=s&&s<=69818||69888<=s&&s<=69890||69927<=s&&s<=69931||69933<=s&&s<=69940||70003==s||70016<=s&&s<=70017||70070<=s&&s<=70078||70090<=s&&s<=70092||70191<=s&&s<=70193||70196==s||70198<=s&&s<=70199||70206==s||70367==s||70371<=s&&s<=70378||70400<=s&&s<=70401||70460==s||70462==s||70464==s||70487==s||70502<=s&&s<=70508||70512<=s&&s<=70516||70712<=s&&s<=70719||70722<=s&&s<=70724||70726==s||70832==s||70835<=s&&s<=70840||70842==s||70845==s||70847<=s&&s<=70848||70850<=s&&s<=70851||71087==s||71090<=s&&s<=71093||71100<=s&&s<=71101||71103<=s&&s<=71104||71132<=s&&s<=71133||71219<=s&&s<=71226||71229==s||71231<=s&&s<=71232||71339==s||71341==s||71344<=s&&s<=71349||71351==s||71453<=s&&s<=71455||71458<=s&&s<=71461||71463<=s&&s<=71467||72193<=s&&s<=72198||72201<=s&&s<=72202||72243<=s&&s<=72248||72251<=s&&s<=72254||72263==s||72273<=s&&s<=72278||72281<=s&&s<=72283||72330<=s&&s<=72342||72344<=s&&s<=72345||72752<=s&&s<=72758||72760<=s&&s<=72765||72767==s||72850<=s&&s<=72871||72874<=s&&s<=72880||72882<=s&&s<=72883||72885<=s&&s<=72886||73009<=s&&s<=73014||73018==s||73020<=s&&s<=73021||73023<=s&&s<=73029||73031==s||92912<=s&&s<=92916||92976<=s&&s<=92982||94095<=s&&s<=94098||113821<=s&&s<=113822||119141==s||119143<=s&&s<=119145||119150<=s&&s<=119154||119163<=s&&s<=119170||119173<=s&&s<=119179||119210<=s&&s<=119213||119362<=s&&s<=119364||121344<=s&&s<=121398||121403<=s&&s<=121452||121461==s||121476==s||121499<=s&&s<=121503||121505<=s&&s<=121519||122880<=s&&s<=122886||122888<=s&&s<=122904||122907<=s&&s<=122913||122915<=s&&s<=122916||122918<=s&&s<=122922||125136<=s&&s<=125142||125252<=s&&s<=125258||917536<=s&&s<=917631||917760<=s&&s<=917999?e:127462<=s&&s<=127487?t:2307==s||2363==s||2366<=s&&s<=2368||2377<=s&&s<=2380||2382<=s&&s<=2383||2434<=s&&s<=2435||2495<=s&&s<=2496||2503<=s&&s<=2504||2507<=s&&s<=2508||2563==s||2622<=s&&s<=2624||2691==s||2750<=s&&s<=2752||2761==s||2763<=s&&s<=2764||2818<=s&&s<=2819||2880==s||2887<=s&&s<=2888||2891<=s&&s<=2892||3007==s||3009<=s&&s<=3010||3014<=s&&s<=3016||3018<=s&&s<=3020||3073<=s&&s<=3075||3137<=s&&s<=3140||3202<=s&&s<=3203||3262==s||3264<=s&&s<=3265||3267<=s&&s<=3268||3271<=s&&s<=3272||3274<=s&&s<=3275||3330<=s&&s<=3331||3391<=s&&s<=3392||3398<=s&&s<=3400||3402<=s&&s<=3404||3458<=s&&s<=3459||3536<=s&&s<=3537||3544<=s&&s<=3550||3570<=s&&s<=3571||3635==s||3763==s||3902<=s&&s<=3903||3967==s||4145==s||4155<=s&&s<=4156||4182<=s&&s<=4183||4228==s||6070==s||6078<=s&&s<=6085||6087<=s&&s<=6088||6435<=s&&s<=6438||6441<=s&&s<=6443||6448<=s&&s<=6449||6451<=s&&s<=6456||6681<=s&&s<=6682||6741==s||6743==s||6765<=s&&s<=6770||6916==s||6965==s||6971==s||6973<=s&&s<=6977||6979<=s&&s<=6980||7042==s||7073==s||7078<=s&&s<=7079||7082==s||7143==s||7146<=s&&s<=7148||7150==s||7154<=s&&s<=7155||7204<=s&&s<=7211||7220<=s&&s<=7221||7393==s||7410<=s&&s<=7411||7415==s||43043<=s&&s<=43044||43047==s||43136<=s&&s<=43137||43188<=s&&s<=43203||43346<=s&&s<=43347||43395==s||43444<=s&&s<=43445||43450<=s&&s<=43451||43453<=s&&s<=43456||43567<=s&&s<=43568||43571<=s&&s<=43572||43597==s||43755==s||43758<=s&&s<=43759||43765==s||44003<=s&&s<=44004||44006<=s&&s<=44007||44009<=s&&s<=44010||44012==s||69632==s||69634==s||69762==s||69808<=s&&s<=69810||69815<=s&&s<=69816||69932==s||70018==s||70067<=s&&s<=70069||70079<=s&&s<=70080||70188<=s&&s<=70190||70194<=s&&s<=70195||70197==s||70368<=s&&s<=70370||70402<=s&&s<=70403||70463==s||70465<=s&&s<=70468||70471<=s&&s<=70472||70475<=s&&s<=70477||70498<=s&&s<=70499||70709<=s&&s<=70711||70720<=s&&s<=70721||70725==s||70833<=s&&s<=70834||70841==s||70843<=s&&s<=70844||70846==s||70849==s||71088<=s&&s<=71089||71096<=s&&s<=71099||71102==s||71216<=s&&s<=71218||71227<=s&&s<=71228||71230==s||71340==s||71342<=s&&s<=71343||71350==s||71456<=s&&s<=71457||71462==s||72199<=s&&s<=72200||72249==s||72279<=s&&s<=72280||72343==s||72751==s||72766==s||72873==s||72881==s||72884==s||94033<=s&&s<=94078||119142==s||119149==s?5:4352<=s&&s<=4447||43360<=s&&s<=43388?6:4448<=s&&s<=4519||55216<=s&&s<=55238?7:4520<=s&&s<=4607||55243<=s&&s<=55291?8:44032==s||44060==s||44088==s||44116==s||44144==s||44172==s||44200==s||44228==s||44256==s||44284==s||44312==s||44340==s||44368==s||44396==s||44424==s||44452==s||44480==s||44508==s||44536==s||44564==s||44592==s||44620==s||44648==s||44676==s||44704==s||44732==s||44760==s||44788==s||44816==s||44844==s||44872==s||44900==s||44928==s||44956==s||44984==s||45012==s||45040==s||45068==s||45096==s||45124==s||45152==s||45180==s||45208==s||45236==s||45264==s||45292==s||45320==s||45348==s||45376==s||45404==s||45432==s||45460==s||45488==s||45516==s||45544==s||45572==s||45600==s||45628==s||45656==s||45684==s||45712==s||45740==s||45768==s||45796==s||45824==s||45852==s||45880==s||45908==s||45936==s||45964==s||45992==s||46020==s||46048==s||46076==s||46104==s||46132==s||46160==s||46188==s||46216==s||46244==s||46272==s||46300==s||46328==s||46356==s||46384==s||46412==s||46440==s||46468==s||46496==s||46524==s||46552==s||46580==s||46608==s||46636==s||46664==s||46692==s||46720==s||46748==s||46776==s||46804==s||46832==s||46860==s||46888==s||46916==s||46944==s||46972==s||47e3==s||47028==s||47056==s||47084==s||47112==s||47140==s||47168==s||47196==s||47224==s||47252==s||47280==s||47308==s||47336==s||47364==s||47392==s||47420==s||47448==s||47476==s||47504==s||47532==s||47560==s||47588==s||47616==s||47644==s||47672==s||47700==s||47728==s||47756==s||47784==s||47812==s||47840==s||47868==s||47896==s||47924==s||47952==s||47980==s||48008==s||48036==s||48064==s||48092==s||48120==s||48148==s||48176==s||48204==s||48232==s||48260==s||48288==s||48316==s||48344==s||48372==s||48400==s||48428==s||48456==s||48484==s||48512==s||48540==s||48568==s||48596==s||48624==s||48652==s||48680==s||48708==s||48736==s||48764==s||48792==s||48820==s||48848==s||48876==s||48904==s||48932==s||48960==s||48988==s||49016==s||49044==s||49072==s||49100==s||49128==s||49156==s||49184==s||49212==s||49240==s||49268==s||49296==s||49324==s||49352==s||49380==s||49408==s||49436==s||49464==s||49492==s||49520==s||49548==s||49576==s||49604==s||49632==s||49660==s||49688==s||49716==s||49744==s||49772==s||49800==s||49828==s||49856==s||49884==s||49912==s||49940==s||49968==s||49996==s||50024==s||50052==s||50080==s||50108==s||50136==s||50164==s||50192==s||50220==s||50248==s||50276==s||50304==s||50332==s||50360==s||50388==s||50416==s||50444==s||50472==s||50500==s||50528==s||50556==s||50584==s||50612==s||50640==s||50668==s||50696==s||50724==s||50752==s||50780==s||50808==s||50836==s||50864==s||50892==s||50920==s||50948==s||50976==s||51004==s||51032==s||51060==s||51088==s||51116==s||51144==s||51172==s||51200==s||51228==s||51256==s||51284==s||51312==s||51340==s||51368==s||51396==s||51424==s||51452==s||51480==s||51508==s||51536==s||51564==s||51592==s||51620==s||51648==s||51676==s||51704==s||51732==s||51760==s||51788==s||51816==s||51844==s||51872==s||51900==s||51928==s||51956==s||51984==s||52012==s||52040==s||52068==s||52096==s||52124==s||52152==s||52180==s||52208==s||52236==s||52264==s||52292==s||52320==s||52348==s||52376==s||52404==s||52432==s||52460==s||52488==s||52516==s||52544==s||52572==s||52600==s||52628==s||52656==s||52684==s||52712==s||52740==s||52768==s||52796==s||52824==s||52852==s||52880==s||52908==s||52936==s||52964==s||52992==s||53020==s||53048==s||53076==s||53104==s||53132==s||53160==s||53188==s||53216==s||53244==s||53272==s||53300==s||53328==s||53356==s||53384==s||53412==s||53440==s||53468==s||53496==s||53524==s||53552==s||53580==s||53608==s||53636==s||53664==s||53692==s||53720==s||53748==s||53776==s||53804==s||53832==s||53860==s||53888==s||53916==s||53944==s||53972==s||54e3==s||54028==s||54056==s||54084==s||54112==s||54140==s||54168==s||54196==s||54224==s||54252==s||54280==s||54308==s||54336==s||54364==s||54392==s||54420==s||54448==s||54476==s||54504==s||54532==s||54560==s||54588==s||54616==s||54644==s||54672==s||54700==s||54728==s||54756==s||54784==s||54812==s||54840==s||54868==s||54896==s||54924==s||54952==s||54980==s||55008==s||55036==s||55064==s||55092==s||55120==s||55148==s||55176==s?9:44033<=s&&s<=44059||44061<=s&&s<=44087||44089<=s&&s<=44115||44117<=s&&s<=44143||44145<=s&&s<=44171||44173<=s&&s<=44199||44201<=s&&s<=44227||44229<=s&&s<=44255||44257<=s&&s<=44283||44285<=s&&s<=44311||44313<=s&&s<=44339||44341<=s&&s<=44367||44369<=s&&s<=44395||44397<=s&&s<=44423||44425<=s&&s<=44451||44453<=s&&s<=44479||44481<=s&&s<=44507||44509<=s&&s<=44535||44537<=s&&s<=44563||44565<=s&&s<=44591||44593<=s&&s<=44619||44621<=s&&s<=44647||44649<=s&&s<=44675||44677<=s&&s<=44703||44705<=s&&s<=44731||44733<=s&&s<=44759||44761<=s&&s<=44787||44789<=s&&s<=44815||44817<=s&&s<=44843||44845<=s&&s<=44871||44873<=s&&s<=44899||44901<=s&&s<=44927||44929<=s&&s<=44955||44957<=s&&s<=44983||44985<=s&&s<=45011||45013<=s&&s<=45039||45041<=s&&s<=45067||45069<=s&&s<=45095||45097<=s&&s<=45123||45125<=s&&s<=45151||45153<=s&&s<=45179||45181<=s&&s<=45207||45209<=s&&s<=45235||45237<=s&&s<=45263||45265<=s&&s<=45291||45293<=s&&s<=45319||45321<=s&&s<=45347||45349<=s&&s<=45375||45377<=s&&s<=45403||45405<=s&&s<=45431||45433<=s&&s<=45459||45461<=s&&s<=45487||45489<=s&&s<=45515||45517<=s&&s<=45543||45545<=s&&s<=45571||45573<=s&&s<=45599||45601<=s&&s<=45627||45629<=s&&s<=45655||45657<=s&&s<=45683||45685<=s&&s<=45711||45713<=s&&s<=45739||45741<=s&&s<=45767||45769<=s&&s<=45795||45797<=s&&s<=45823||45825<=s&&s<=45851||45853<=s&&s<=45879||45881<=s&&s<=45907||45909<=s&&s<=45935||45937<=s&&s<=45963||45965<=s&&s<=45991||45993<=s&&s<=46019||46021<=s&&s<=46047||46049<=s&&s<=46075||46077<=s&&s<=46103||46105<=s&&s<=46131||46133<=s&&s<=46159||46161<=s&&s<=46187||46189<=s&&s<=46215||46217<=s&&s<=46243||46245<=s&&s<=46271||46273<=s&&s<=46299||46301<=s&&s<=46327||46329<=s&&s<=46355||46357<=s&&s<=46383||46385<=s&&s<=46411||46413<=s&&s<=46439||46441<=s&&s<=46467||46469<=s&&s<=46495||46497<=s&&s<=46523||46525<=s&&s<=46551||46553<=s&&s<=46579||46581<=s&&s<=46607||46609<=s&&s<=46635||46637<=s&&s<=46663||46665<=s&&s<=46691||46693<=s&&s<=46719||46721<=s&&s<=46747||46749<=s&&s<=46775||46777<=s&&s<=46803||46805<=s&&s<=46831||46833<=s&&s<=46859||46861<=s&&s<=46887||46889<=s&&s<=46915||46917<=s&&s<=46943||46945<=s&&s<=46971||46973<=s&&s<=46999||47001<=s&&s<=47027||47029<=s&&s<=47055||47057<=s&&s<=47083||47085<=s&&s<=47111||47113<=s&&s<=47139||47141<=s&&s<=47167||47169<=s&&s<=47195||47197<=s&&s<=47223||47225<=s&&s<=47251||47253<=s&&s<=47279||47281<=s&&s<=47307||47309<=s&&s<=47335||47337<=s&&s<=47363||47365<=s&&s<=47391||47393<=s&&s<=47419||47421<=s&&s<=47447||47449<=s&&s<=47475||47477<=s&&s<=47503||47505<=s&&s<=47531||47533<=s&&s<=47559||47561<=s&&s<=47587||47589<=s&&s<=47615||47617<=s&&s<=47643||47645<=s&&s<=47671||47673<=s&&s<=47699||47701<=s&&s<=47727||47729<=s&&s<=47755||47757<=s&&s<=47783||47785<=s&&s<=47811||47813<=s&&s<=47839||47841<=s&&s<=47867||47869<=s&&s<=47895||47897<=s&&s<=47923||47925<=s&&s<=47951||47953<=s&&s<=47979||47981<=s&&s<=48007||48009<=s&&s<=48035||48037<=s&&s<=48063||48065<=s&&s<=48091||48093<=s&&s<=48119||48121<=s&&s<=48147||48149<=s&&s<=48175||48177<=s&&s<=48203||48205<=s&&s<=48231||48233<=s&&s<=48259||48261<=s&&s<=48287||48289<=s&&s<=48315||48317<=s&&s<=48343||48345<=s&&s<=48371||48373<=s&&s<=48399||48401<=s&&s<=48427||48429<=s&&s<=48455||48457<=s&&s<=48483||48485<=s&&s<=48511||48513<=s&&s<=48539||48541<=s&&s<=48567||48569<=s&&s<=48595||48597<=s&&s<=48623||48625<=s&&s<=48651||48653<=s&&s<=48679||48681<=s&&s<=48707||48709<=s&&s<=48735||48737<=s&&s<=48763||48765<=s&&s<=48791||48793<=s&&s<=48819||48821<=s&&s<=48847||48849<=s&&s<=48875||48877<=s&&s<=48903||48905<=s&&s<=48931||48933<=s&&s<=48959||48961<=s&&s<=48987||48989<=s&&s<=49015||49017<=s&&s<=49043||49045<=s&&s<=49071||49073<=s&&s<=49099||49101<=s&&s<=49127||49129<=s&&s<=49155||49157<=s&&s<=49183||49185<=s&&s<=49211||49213<=s&&s<=49239||49241<=s&&s<=49267||49269<=s&&s<=49295||49297<=s&&s<=49323||49325<=s&&s<=49351||49353<=s&&s<=49379||49381<=s&&s<=49407||49409<=s&&s<=49435||49437<=s&&s<=49463||49465<=s&&s<=49491||49493<=s&&s<=49519||49521<=s&&s<=49547||49549<=s&&s<=49575||49577<=s&&s<=49603||49605<=s&&s<=49631||49633<=s&&s<=49659||49661<=s&&s<=49687||49689<=s&&s<=49715||49717<=s&&s<=49743||49745<=s&&s<=49771||49773<=s&&s<=49799||49801<=s&&s<=49827||49829<=s&&s<=49855||49857<=s&&s<=49883||49885<=s&&s<=49911||49913<=s&&s<=49939||49941<=s&&s<=49967||49969<=s&&s<=49995||49997<=s&&s<=50023||50025<=s&&s<=50051||50053<=s&&s<=50079||50081<=s&&s<=50107||50109<=s&&s<=50135||50137<=s&&s<=50163||50165<=s&&s<=50191||50193<=s&&s<=50219||50221<=s&&s<=50247||50249<=s&&s<=50275||50277<=s&&s<=50303||50305<=s&&s<=50331||50333<=s&&s<=50359||50361<=s&&s<=50387||50389<=s&&s<=50415||50417<=s&&s<=50443||50445<=s&&s<=50471||50473<=s&&s<=50499||50501<=s&&s<=50527||50529<=s&&s<=50555||50557<=s&&s<=50583||50585<=s&&s<=50611||50613<=s&&s<=50639||50641<=s&&s<=50667||50669<=s&&s<=50695||50697<=s&&s<=50723||50725<=s&&s<=50751||50753<=s&&s<=50779||50781<=s&&s<=50807||50809<=s&&s<=50835||50837<=s&&s<=50863||50865<=s&&s<=50891||50893<=s&&s<=50919||50921<=s&&s<=50947||50949<=s&&s<=50975||50977<=s&&s<=51003||51005<=s&&s<=51031||51033<=s&&s<=51059||51061<=s&&s<=51087||51089<=s&&s<=51115||51117<=s&&s<=51143||51145<=s&&s<=51171||51173<=s&&s<=51199||51201<=s&&s<=51227||51229<=s&&s<=51255||51257<=s&&s<=51283||51285<=s&&s<=51311||51313<=s&&s<=51339||51341<=s&&s<=51367||51369<=s&&s<=51395||51397<=s&&s<=51423||51425<=s&&s<=51451||51453<=s&&s<=51479||51481<=s&&s<=51507||51509<=s&&s<=51535||51537<=s&&s<=51563||51565<=s&&s<=51591||51593<=s&&s<=51619||51621<=s&&s<=51647||51649<=s&&s<=51675||51677<=s&&s<=51703||51705<=s&&s<=51731||51733<=s&&s<=51759||51761<=s&&s<=51787||51789<=s&&s<=51815||51817<=s&&s<=51843||51845<=s&&s<=51871||51873<=s&&s<=51899||51901<=s&&s<=51927||51929<=s&&s<=51955||51957<=s&&s<=51983||51985<=s&&s<=52011||52013<=s&&s<=52039||52041<=s&&s<=52067||52069<=s&&s<=52095||52097<=s&&s<=52123||52125<=s&&s<=52151||52153<=s&&s<=52179||52181<=s&&s<=52207||52209<=s&&s<=52235||52237<=s&&s<=52263||52265<=s&&s<=52291||52293<=s&&s<=52319||52321<=s&&s<=52347||52349<=s&&s<=52375||52377<=s&&s<=52403||52405<=s&&s<=52431||52433<=s&&s<=52459||52461<=s&&s<=52487||52489<=s&&s<=52515||52517<=s&&s<=52543||52545<=s&&s<=52571||52573<=s&&s<=52599||52601<=s&&s<=52627||52629<=s&&s<=52655||52657<=s&&s<=52683||52685<=s&&s<=52711||52713<=s&&s<=52739||52741<=s&&s<=52767||52769<=s&&s<=52795||52797<=s&&s<=52823||52825<=s&&s<=52851||52853<=s&&s<=52879||52881<=s&&s<=52907||52909<=s&&s<=52935||52937<=s&&s<=52963||52965<=s&&s<=52991||52993<=s&&s<=53019||53021<=s&&s<=53047||53049<=s&&s<=53075||53077<=s&&s<=53103||53105<=s&&s<=53131||53133<=s&&s<=53159||53161<=s&&s<=53187||53189<=s&&s<=53215||53217<=s&&s<=53243||53245<=s&&s<=53271||53273<=s&&s<=53299||53301<=s&&s<=53327||53329<=s&&s<=53355||53357<=s&&s<=53383||53385<=s&&s<=53411||53413<=s&&s<=53439||53441<=s&&s<=53467||53469<=s&&s<=53495||53497<=s&&s<=53523||53525<=s&&s<=53551||53553<=s&&s<=53579||53581<=s&&s<=53607||53609<=s&&s<=53635||53637<=s&&s<=53663||53665<=s&&s<=53691||53693<=s&&s<=53719||53721<=s&&s<=53747||53749<=s&&s<=53775||53777<=s&&s<=53803||53805<=s&&s<=53831||53833<=s&&s<=53859||53861<=s&&s<=53887||53889<=s&&s<=53915||53917<=s&&s<=53943||53945<=s&&s<=53971||53973<=s&&s<=53999||54001<=s&&s<=54027||54029<=s&&s<=54055||54057<=s&&s<=54083||54085<=s&&s<=54111||54113<=s&&s<=54139||54141<=s&&s<=54167||54169<=s&&s<=54195||54197<=s&&s<=54223||54225<=s&&s<=54251||54253<=s&&s<=54279||54281<=s&&s<=54307||54309<=s&&s<=54335||54337<=s&&s<=54363||54365<=s&&s<=54391||54393<=s&&s<=54419||54421<=s&&s<=54447||54449<=s&&s<=54475||54477<=s&&s<=54503||54505<=s&&s<=54531||54533<=s&&s<=54559||54561<=s&&s<=54587||54589<=s&&s<=54615||54617<=s&&s<=54643||54645<=s&&s<=54671||54673<=s&&s<=54699||54701<=s&&s<=54727||54729<=s&&s<=54755||54757<=s&&s<=54783||54785<=s&&s<=54811||54813<=s&&s<=54839||54841<=s&&s<=54867||54869<=s&&s<=54895||54897<=s&&s<=54923||54925<=s&&s<=54951||54953<=s&&s<=54979||54981<=s&&s<=55007||55009<=s&&s<=55035||55037<=s&&s<=55063||55065<=s&&s<=55091||55093<=s&&s<=55119||55121<=s&&s<=55147||55149<=s&&s<=55175||55177<=s&&s<=55203?10:9757==s||9977==s||9994<=s&&s<=9997||127877==s||127938<=s&&s<=127940||127943==s||127946<=s&&s<=127948||128066<=s&&s<=128067||128070<=s&&s<=128080||128110==s||128112<=s&&s<=128120||128124==s||128129<=s&&s<=128131||128133<=s&&s<=128135||128170==s||128372<=s&&s<=128373||128378==s||128400==s||128405<=s&&s<=128406||128581<=s&&s<=128583||128587<=s&&s<=128591||128675==s||128692<=s&&s<=128694||128704==s||128716==s||129304<=s&&s<=129308||129310<=s&&s<=129311||129318==s||129328<=s&&s<=129337||129341<=s&&s<=129342||129489<=s&&s<=129501?r:127995<=s&&s<=127999?14:8205==s?15:9792==s||9794==s||9877<=s&&s<=9878||9992==s||10084==s||127752==s||127806==s||127859==s||127891==s||127908==s||127912==s||127979==s||127981==s||128139==s||128187<=s&&s<=128188||128295==s||128300==s||128488==s||128640==s||128658==s?o:128102<=s&&s<=128105?i:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var n=c(a(e,t)),r=[],o=t+1;o=o)return t.substr(0,o);for(;o>t.length&&r>1;)1&r&&(t+=n),r>>=1,n+=n;return t=(t+=n).substr(0,o)}var o=function(e,t,n){if(null==e||null==t)return e;var r=String(e),o="number"==typeof t?t:parseInt(t,10);if(isNaN(o)||!isFinite(o))return r;var i=r.length;if(i>=o)return r;var s=null==n?"":String(n);""===s&&(s=" ");for(var a=o-i;s.lengtha?s.substr(0,a):s)+r},i=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},p=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},f=0,d=1,m=2,y=3,h=4,b=5,g=6,v=7,O=8,j=9,x=10,T={"{":f,"}":d,"[":m,"]":y,":":h,",":b},P={true:O,false:j,null:x},A=0,E=1,S=2,C={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},w=0,N=1,$=2,I=3,R=4,_=5,K=6,M=7;function k(e){return e>="1"&&e<="9"}function J(e){return e>="0"&&e<="9"}function L(e){return J(e)||e>="a"&&e<="f"||e>="A"&&e<="F"}function q(e){return"e"===e||"E"===e}function U(e,t,n,r){var o=e.charAt(t);if("\r"===o)t++,n++,r=1,"\n"===e.charAt(t)&&t++;else if("\n"===o)t++,n++,r=1;else{if("\t"!==o&&" "!==o)return null;t++,r++}return{index:t,line:n,column:r}}function B(e,t,n,r){var o=e.charAt(t);return o in T?{type:T[o],line:n,column:r+1,index:t+1,value:null}:null}function F(e,t,n,r){for(var o in P)if(P.hasOwnProperty(o)&&e.substr(t,o.length)===o)return{type:P[o],line:n,column:r+o.length,index:t+o.length,value:o};return null}function D(e,t,n,r){for(var o=t,i=A;t0?{type:v,line:n,column:r+i-o,index:i,value:e.slice(o,i)}:null}var V=0,z=1,Q=2,G=3,Y=0,Z=1,H=2,X=0,ee=1,te=2,ne=3,re={loc:!0,source:null};function oe(e,t,n){var r=t.length>0?t[t.length-1].loc.end:{line:1,column:1};l(c(),e,n.source,r.line,r.column)}function ie(e){for(var t=0,n=0;n<4;n++)t=16*t+parseInt(e[n],16);return String.fromCharCode(t)}var se={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},ae=['"',"\\","/"];function le(e){for(var t="",n=0;ne),i=e=>`${(e=>"."+o.slice(0,e).join("."))(e)} [query: ${o.join(".")}]`,{loc:s}=o.reduce((e,t,r)=>"Object"===e.type?(()=>{const s=e.children.find(e=>e.key.value===t);if(!s)throw new Error(`No such property ${t} in ${i(r)}`);const{key:a,value:l}=s;return n&&r===o.length-1?a:l})():"Array"===e.type?(()=>{const n=Number(t);if(isNaN(n))throw new Error(`Invalid non-numeric array index "${t}" in array at ${i(r)}`);if(n<0||n>=e.children.length)throw new RangeError(`Index ${n} out-of-bounds in array of size ${e.children.length} at ${i(r)}`);return e.children,e.children[Number(t)]})():e,r);return{start:null==s?void 0:s.start,end:null==s?void 0:s.end}}},{}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAstByObject=n.getAstByString=void 0;const r=e("json-to-ast");function o(e,t){const n=r(e,{loc:!0});return{json:t||JSON.parse(e),jsonString:e,jsonAST:n}}n.getAstByString=o,n.getAstByObject=function(e,t=4){return o(JSON.stringify(e,null,t))}},{"json-to-ast":24}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("core-types-json-schema"),o=e("./utils/sharedUtils"),i=e("./utils/constants"),s=e("./utils/nosqlUtils"),a=e("./utils/constants-nosql");Draw.loadPlugin(function(e){const t=document.createElement("div");t.style.userSelect="none",t.style.overflow="hidden",t.style.padding="10px",t.style.height="100%";const n=document.createElement("textarea");n.style.height="200px",n.style.width="100%";const l="-- click a nosql type button";n.value=l,mxUtils.br(t),t.appendChild(n);const c=e.menus.get("exportAs");let u="tonosql=To NoSQL";c&&!window.VsCodeApi||(u="tonosql=Export As NoSQL"),mxResources.parse(u);const p=new mxWindow(mxResources.get("tonosql"),t,document.body.offsetWidth-480,140,320,320,!0,!0);p.destroyOnClose=!1,p.setMaximizable(!1),p.setResizable(!1),p.setClosable(!0),mxUtils.br(t);const f=mxUtils.button(mxResources.get("reset"),function(){n.value=l});f.style.marginTop="8px",f.style.marginRight="4px",f.style.padding="4px",t.appendChild(f);const d=mxUtils.button("OpenAPI",function(){!function(t){const r=(0,o.getMermaidDiagramDb)(e,t),i=(0,s.dbToOpenApi)(r);let a="";if("openapi"!=t)throw new Error(`type:${t} is not supported`);a=JSON.stringify(i,null,2),n.value=a}("openapi")});d.style.marginTop="8px",d.style.padding="4px",t.appendChild(d),e.actions.addAction("tonosql",function(){p.setVisible(!p.isVisible()),p.isVisible()&&n.focus()});let m=[],y=[],h=[],b=[],g=null,v=null,O=0,j=0;const x=document.createElement("div");x.style.userSelect="none",x.style.overflow="hidden",x.style.padding="10px",x.style.height="100%";const T=document.createElement("textarea");T.style.height="200px",T.style.width="100%",T.value=a.defaultResetOpenApi,mxUtils.br(x),x.appendChild(T),mxResources.parse("fromNoSql=From NoSQL");const P=new mxWindow(mxResources.get("fromNoSql"),x,document.body.offsetWidth-480,140,320,320,!0,!0);P.destroyOnClose=!1,P.setMaximizable(!1),P.setResizable(!1),P.setClosable(!0),mxUtils.br(x);const A=mxUtils.button("Reset OpenAPI",function(){T.value=a.defaultResetOpenApi});A.style.marginTop="8px",A.style.marginRight="4px",A.style.padding="4px",x.appendChild(A);const E=mxUtils.button("Insert OpenAPI",function(){!function(t,n){var a;b=[],g=null,v=null;try{let l=null;const c={title:"nosql default options",version:i.pluginVersion};if("openapi"!=n)throw new Error(`type:${n} is not supported`);{const e=JSON.parse(t),{data:n}=(0,r.convertOpenApiToCoreTypes)(e),{data:o}=(0,r.convertCoreTypesToJsonSchema)(n);(0,r.jsonSchemaDocumentToOpenApi)(o,c),l=e}const u=null===(a=null==l?void 0:l.components)||void 0===a?void 0:a.schemas;if(u){const t=(0,s.ConvertOpenApiToDatabaseModel)(u);m=t.ForeignKeyList,y=t.PrimaryKeyList,h=t.TableList,j=h.length;const r=(0,o.CreateTableUI)(e,P,h,b,v,g,m,O,n);r&&(b=r.cells,O=r.dx,g=r.tableCell,v=r.rowCell)}}catch(e){console.log(`unable to serialize the response:${n}`),console.log(e)}}(T.value,"openapi")});E.style.marginTop="8px",E.style.padding="4px",x.appendChild(E),e.actions.addAction("fromNoSql",function(){P.setVisible(!P.isVisible()),P.isVisible()&&T.focus()});const S=e.menus.get("insert");if(S){const t=S.funct;S.funct=function(...n){const[r,o]=n;t.apply(this,n),e.menus.addMenuItems(r,["fromNoSql"],o)}}if(c&&!window.VsCodeApi){const t=c.funct;c.funct=function(...n){const[r,o]=n;t.apply(this,n),e.menus.addMenuItems(r,["tonosql"],o)}}else{const t=e.menus.get("file");if(t&&t.enabled){const n=t.funct;t.funct=function(...t){const[r,o]=t;n.apply(this,t),e.menus.addMenuItems(r,["tonosql"],o)}}}})},{"./utils/constants":30,"./utils/constants-nosql":29,"./utils/nosqlUtils":31,"./utils/sharedUtils":32,"core-types-json-schema":1}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validJSONSchemaTypes=n.defaultResetOpenApi=n.defaultReset=void 0;const r=e("./constants");n.defaultReset=`/*\n\tDrawio default value\n\tPlugin: nosql\n\tVersion: ${r.pluginVersion}\n*/\n\n\nexport interface WeatherForecast {\n /** @format date-time */\n date?: string;\n /** @format int32 */\n temperatureC?: number;\n /** @format int32 */\n temperatureF?: number;\n summary?: string | null;\n nestedProp: string[];\n children?: Child[];\n}\n\nexport interface Child {\n name: string\n}\n `,n.defaultResetOpenApi=`\n{\n "openapi": "3.0.0",\n "info": {\n "title": "nosql plugin sample",\n "version": "${r.pluginVersion}",\n "x-comment": "Generated by core-types-json-schema (https://github.com/grantila/core-types-json-schema)"\n },\n "paths": {},\n "components": {\n "schemas": {\n "WeatherForecast": {\n "properties": {\n "date": {\n "title": "WeatherForecast.date",\n "description": "@format date-time",\n "type": "string"\n },\n "temperatureC": {\n "title": "WeatherForecast.temperatureC",\n "description": "@format int32",\n "type": "number"\n },\n "temperatureF": {\n "title": "WeatherForecast.temperatureF",\n "description": "@format int32",\n "type": "number"\n },\n "summary": {\n "title": "WeatherForecast.summary",\n "nullable": true,\n "type": "string"\n },\n "nestedProp": {\n "items": {\n "title": "WeatherForecast.nestedProp.[]",\n "type": "string"\n },\n "title": "WeatherForecast.nestedProp",\n "type": "array"\n },\n "child": {\n "$ref": "#/components/schemas/Child",\n "title": "WeatherForecast.child"\n }\n },\n "required": [\n "nestedProp"\n ],\n "additionalProperties": false,\n "title": "WeatherForecast",\n "type": "object"\n },\n "Child": {\n "properties": {\n "name": {\n "title": "Child.name",\n "type": "string"\n }\n },\n "required": [\n "name"\n ],\n "additionalProperties": false,\n "title": "Child",\n "type": "object"\n }\n }\n }\n}\n `;n.validJSONSchemaTypes=["string","number","integer","boolean","object","array","null","any"]},{"./constants":30}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.objectKeyword=n.arrayKeyword=n.nullableKeyword=n.enumKeyword=n.formatKeyword=n.commentColumnQuantifiers=n.pluginVersion=void 0,n.pluginVersion="0.0.7",n.commentColumnQuantifiers={Start:"/**",End:"*/"},n.formatKeyword="@format",n.enumKeyword="enum",n.nullableKeyword="nullable",n.arrayKeyword="array",n.objectKeyword="object"},{}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dbToOpenApi=function(e){var t,n,s,a,l,c;const u={openapi:"3.0.0",info:{title:"drawio nosql export",version:r.pluginVersion,"x-comment":"Generated by from drawio uml using plugin nosql"},paths:{},components:{schemas:{}}},p={},f=e.getEntities();for(const u in f)if(Object.prototype.hasOwnProperty.call(f,u)){let d=u;const m=f[u];let y=(0,o.getCommentIndexes)(u),h="",b="";if(y.start>-1&&y.end>-1){let e=d.toString().trim();y=(0,o.getCommentIndexes)(e);const t=y.start,n=y.end;if(d=e.substring(0,y.beforeStart).trim(),e=e.substring(t,n).trim(),-1!==e.indexOf(r.formatKeyword)){const t=e.indexOf(r.formatKeyword);b=e.substring(t+r.formatKeyword.length).trim(),e=e.substring(0,t)}e&&(h=e)}if(p[d])continue;p[d]={type:r.objectKeyword,title:d,additionalProperties:!1,properties:{}},h&&(p[d].description=h.trim()),b&&(p[d].format=b.trim());for(let f=0;fe.entityA==u),i=`[${u}.${h}]`,a=n.find(e=>-1!=e.roleA.indexOf(i));if(a){const e=(0,o.getCommentIndexes)(a.entityB);t=`#/components/schemas/${a.entityB.substring(0,e.beforeStart).trim()}`}t&&("array"==g&&(r={$ref:t}),"object"==g&&(s={$ref:t}))}const a={title:`${d}.${h}`,type:g};s&&(a.additionalProperties=s),r&&(a.items=r),(null===(c=y.attributeType)||void 0===c?void 0:c.includes("nullable"))&&(a.nullable=!0),!t||(null==s?void 0:s.$ref)||(null==r?void 0:r.$ref)||(a.$ref=t),n&&delete a.type,v.trim()&&!t&&(a.description=v.trim()),O.trim()&&(a.items?a.items.format=O.trim():a.format=O.trim()),p[d].properties[y.attributeName]=a}}0===Object.keys(p[d].properties).length&&delete p[d].properties}return u.components.schemas=p,u},n.GeneratePropertyModel=s,n.ConvertOpenApiToDatabaseModel=function(e){var t,n,i,a,l,c;const u={Dialect:"nosql",TableList:[],PrimaryKeyList:[],ForeignKeyList:[]},p={};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const a=e[i],l=(0,o.dbTypeEnds)(i),c={Name:(0,o.dbTypeEnds)(i),Properties:[]};if(a.enum){const e=a.enum,t=`${a.type} ${r.enumKeyword}`,n={enum:e};a.description&&(n.description=a.description),a.format&&(n.format=a.format);const o=s(i,t,n);c.Properties.push(o)}else{const e=(0,o.generateComment)(a.description,a.format);e&&(c.Name+=` ${e}`)}for(const i in a.properties)if(Object.prototype.hasOwnProperty.call(a.properties,i)){const l=a.properties[i];let p=null;if(l.$ref?p=l.$ref.split("/").pop():l.items&&typeof l.items==r.objectKeyword?p=null===(t=l.items.$ref)||void 0===t?void 0:t.split("/").pop():l.additionalProperties&&"object"==typeof l.additionalProperties&&(p=null===(n=l.additionalProperties.$ref)||void 0===n?void 0:n.split("/").pop()),p){const t=e[p];if(t&&!t.enum){const e=(0,o.generateComment)(t.description,t.format);p=e?`${(0,o.dbTypeEnds)(p)} ${e}`:(0,o.dbTypeEnds)(p)}else p=(0,o.dbTypeEnds)(p)}p&&!l.type&&(l.type=p);const f=s(c.Name,i,l);if(p){const e={PrimaryKeyTableName:c.Name,ReferencesTableName:p,PrimaryKeyName:(0,o.dbTypeEnds)(i),ReferencesPropertyName:"",IsDestination:!1},t={ReferencesTableName:c.Name,PrimaryKeyTableName:p,ReferencesPropertyName:(0,o.dbTypeEnds)(i),PrimaryKeyName:"",IsDestination:!0};u.ForeignKeyList.push(t),u.ForeignKeyList.push(e),f.IsForeignKey=!0}c.Properties.push(f)}u.TableList.push(c),p[l]||(p[l]=c)}for(let e=0;ee.Name==t.ReferencesTableName))||void 0===i?void 0:i.Properties[0];n||(n=null===(a=p[t.ReferencesTableName])||void 0===a?void 0:a.Properties[0]),n&&(u.ForeignKeyList[e].ReferencesPropertyName=n.Name)}if(!t.PrimaryKeyName){let n=null===(l=u.TableList.find(e=>e.Name==t.PrimaryKeyTableName))||void 0===l?void 0:l.Properties[0];n||(n=null===(c=p[t.PrimaryKeyTableName])||void 0===c?void 0:c.Properties[0]),n&&(u.ForeignKeyList[e].PrimaryKeyName=n.Name)}}return u};const r=e("./constants"),o=e("./sharedUtils"),i=e("./constants-nosql");function s(e,t,n){var i;let s=(null!==(i=n.type)&&void 0!==i?i:r.objectKeyword).toString();s===r.arrayKeyword&&n.items&&typeof n.items===r.objectKeyword&&(n.items.format&&!n.format&&(n.format=n.items.format),n.items.type&&(s=`${n.items.type}[]`)),n.enum?s=`${JSON.stringify(n.enum)}`:n.nullable&&(s+=` ${r.nullableKeyword}`);const a=(0,o.generateComment)(n.description,n.format);a&&(s+=` ${a}`);return{Name:(0,o.dbTypeEnds)(t),IsPrimaryKey:!1,IsForeignKey:!1,ColumnProperties:s,TableName:(0,o.dbTypeEnds)(e),ForeignKey:[]}}},{"./constants":30,"./constants-nosql":29,"./sharedUtils":32}],32:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GetColumnQuantifiers=o,n.removeHtml=i,n.dbTypeEnds=function(e){return`\`${e}\``},n.RemoveNameQuantifiers=s,n.getDbLabel=a,n.entityName=function(e,t){let n="";e&&(n+=`${e}`);t&&(n+=` ${r.formatKeyword} ${t}`);n&&(n=n.trim(),n=`/** ${n} */`);return n},n.getCommentIndexes=l,n.getMermaidDiagramDb=function(e,t){const n=e.editor.graph.getModel(),i={},p=[];for(const e in n.cells)if(Object.hasOwnProperty.call(n.cells,e)){const c=n.cells[e];if(-1!==c.mxObjectId.indexOf("mxCell")&&c.style&&c.style.trim().startsWith("swimlane;")){let e=c.value.toString(),n="",f="";if((null==e?void 0:e.includes(r.commentColumnQuantifiers.Start))&&(null==e?void 0:e.includes(r.commentColumnQuantifiers.End))){let t=e.toString();const o=l(t),i=o.start,s=o.end;if(e=t.substring(0,o.beforeStart),t=t.substring(i,s),-1!==t.indexOf(r.formatKeyword)){const e=t.indexOf(r.formatKeyword);f=t.substring(e+r.formatKeyword.length).trim(),t=t.substring(0,e)}t&&(n=t)}const d={name:s(e),attributes:[]},m=u(n,f);m&&(d.name+=` ${m}`);for(let e=0;e-1!==["FK","PK"].findIndex(t=>t==e.value.toUpperCase())||-1!=e.value.toUpperCase().indexOf("PK,"));if(c&&(r.attributeKeyType=c.value,"PK"!=r.attributeKeyType&&-1!=r.attributeKeyType.indexOf("PK")&&(r.attributeKeyType="PK")),d.attributes.push(r),n.edges&&n.edges.length)for(let t=0;t-1!=n.toLocaleLowerCase().indexOf(e)),m=c&&-1!=f.findIndex(e=>-1!=c.toLocaleLowerCase().indexOf(e));if(!m&&!d||m&&d){if(m&&d){let t=r.source.value;const n=a(t,e);n.attributeKeyType="PK",t=n.attributeName;const o=s(r.source.parent.value);let l=r.target.value;const c=a(l,e);c.attributeKeyType="PK",l=c.attributeName;const u=s(r.target.parent.value),f={name:s(o)+"_"+s(u),attributes:[n,c]};i[f.name]||(i[f.name]=f);const d={entityA:o,entityB:f.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${o}.${t}] to [${f.name}.${t}]`};let m=p.findIndex(e=>e.entityA==d.entityA&&e.entityB==d.entityB&&e.roleA==d.roleA);-1==m&&p.push(d);const y={entityA:u,entityB:f.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${u}.${l}] to [${f.name}.${l}]`};m=p.findIndex(e=>e.entityA==y.entityA&&e.entityB==y.entityB&&e.roleA==y.roleA),-1==m&&p.push(y)}}else{let t=r.source.value;t=a(t,e).attributeName;let n=r.source.parent.value,o=l(n);if(-1!=o.start&&-1!=o.end){const e=n.substring(o.start,o.end).trim();n=n.substring(0,o.beforeStart).trim(),n=`${s(n)} ${u(e)}`}else n=s(n);let i=r.target.value;i=a(i,e).attributeName;let c=r.target.parent.value;if(o=l(c),-1!=o.start&&-1!=o.end){const e=c.substring(o.start,o.end).trim();c=c.substring(0,o.beforeStart).trim(),c=`${s(c)} ${u(e)}`}else c=s(c);const f={entityA:d?n:c,entityB:d?c:n,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:d?`[${n}.${t}] to [${c}.${i}]`:`[${c}.${i}] to [${n}.${t}]`};-1==p.findIndex(e=>e.entityA==f.entityA&&e.entityB==f.entityB&&e.roleA==f.roleA)&&p.push(f)}}}}}if(i[d.name]){let e=2;for(;i[d.name+e.toString()];)e++;i[d.name+e.toString()]=d}else i[d.name]=d}}return c(i,p)},n.GenerateDatabaseModel=c,n.generateComment=u,n.CreateTableUI=function(e,t,n,r,i,l,c,u,p){if(n.forEach(function(t){const n=100+t.Name.length;if((l=new mxCell(t.Name,new mxGeometry(u,0,n,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=default;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=default;align=center;")).vertex=!0,i){const t=e.editor.graph.getPreferredSizeForCell(i);null!==t&&(l.geometry.width=t.width+n)}r.push(l),t.Properties.forEach(function(n){const r=function(e,t,n,r,o){const i=t.Name+(t.ColumnProperties?" "+t.ColumnProperties:"");r=new mxCell(i,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=64;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"),r.vertex=!0;const s=t.IsPrimaryKey&&t.IsForeignKey?"PK | FK":t.IsPrimaryKey?"PK":t.IsForeignKey?"FK":"",a=sb.cloneCell(r,s);a.connectable=!1,a.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=180;points=[];portConstraint=eastwest;part=1;",a.geometry.width=54,a.geometry.height=26,r.insert(a);const l=e.editor.graph.getPreferredSizeForCell(r);o&&(null!==l&&o.geometry.width0){const t=e.editor.graph,n=t.view,i=t.getGraphBounds(),l=Math.ceil(Math.max(0,i.x/n.scale-n.translate.x)+4*t.gridSize),u=Math.ceil(Math.max(0,(i.y+i.height)/n.scale-n.translate.y)+4*t.gridSize);t.setSelectionCells(t.importCells(r,l,u));const f=t.getModel(),d=o(p),m=mxUtils.bind(this,function(e,n,r){t.insertEdge(null,null,"",r.invert?n:e,r.invert?e:n,"edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;")});c.forEach(function(e){if(e.IsDestination&&e.PrimaryKeyName&&e.ReferencesPropertyName&&e.PrimaryKeyTableName&&e.ReferencesTableName){const t={invert:!0};let n=null,r=null;for(const t in f.cells){if(n&&r)break;if(Object.hasOwnProperty.call(f.cells,t)){const o=f.cells[t];if(o.style&&o.style.trim().startsWith("swimlane;")){const t={name:o.value,attributes:[]},i=t.name==e.PrimaryKeyTableName,l=t.name==e.ReferencesTableName;if(i||l)for(let t=0;t1&&(c=l.slice(1).join(" "),o=l[0]);return{attributeName:a,attributeType:o,attributeComment:c}}function l(e){let t=!1;-1!==e.indexOf(r.commentColumnQuantifiers.Start)&&-1!==e.indexOf(r.commentColumnQuantifiers.End)&&(t=!0);return{beforeStart:t?e.indexOf(r.commentColumnQuantifiers.Start):-1,start:t?e.indexOf(r.commentColumnQuantifiers.Start)+r.commentColumnQuantifiers.Start.length:-1,end:t?e.indexOf(r.commentColumnQuantifiers.End)-1:-1}}function c(e,t){const n=new class{constructor(e,t){this.entities=e,this.relationships=t}getEntities(){return this.entities}getRelationships(){return this.relationships}}(e,t);return n}function u(e,t){let n="";return e&&(n+=`${e}`),t&&(n+=` ${r.formatKeyword} ${t}`),n&&(n=n.trim(),n=`${r.commentColumnQuantifiers.Start} ${n} ${r.commentColumnQuantifiers.End}`),n}},{"./constants":30}]},{},[28]); \ No newline at end of file +!function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){return o(t[s][1][e]||e)},u,u.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s(0,r.ensureArray)(t).map(e=>`@see ${e}`).join("\n");if(e&&(null==t?void 0:t.length))return e+"\n\n"+n();return e||n()}(e.description,e.see):void 0;return{...t,...e.title?{title:e.title}:{},...n?{description:n}:{},...e.default?{default:e.default}:{},...e.examples?{examples:e.examples}:{},...e.comment?{$comment:e.comment}:{}}},n.annotateCoreTypes=function(e,t){var n;const{description:o,see:i}=function(e){const t=(null!=e?e:"").split("\n"),n=[];for(;t.length>0&&t[t.length-1].startsWith("@see ");)n.push(t.pop().slice(5));for(;t.length>0&&!t[t.length-1].trim();)t.pop();return{description:t.join("\n"),see:n}}(null!==(n=t.description)&&void 0!==n?n:"");return{...{...t.title?{title:t.title}:{},...t.default?{default:(0,r.stringify)(t.default)}:{},...t.examples?{examples:(0,r.stringify)(t.examples)}:{},...t.$comment?{comment:t.$comment}:{},...o?{description:o}:{},...i&&i.length>0?{see:i}:{}},...e}}},{"core-types":6}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertCoreTypesToJsonSchema=n.decorateSchema=void 0;const r=e("openapi-json-schema"),o=e("core-types"),i=e("./annotations");function s(e,{filename:t,sourceFilename:n,userPackage:r,userPackageUrl:o},i="core-types-json-schema",s="https://github.com/grantila/core-types-json-schema"){var a,l;void 0!==t&&(null!==(a=e.$id)&&void 0!==a||(e.$id=t));const c=r||o?r&&o?`${r} (${o})`:r||o:"",u=n?` from ${n}`:"";null!==(l=e.$comment)&&void 0!==l||(e.$comment=`Generated${u} by ${i} (${s})`+(c?` on behalf of ${c}`:""))}function a(e){const t=e.or.map(e=>l(e)),n=(0,i.annotateJsonSchema)(e,{anyOf:t});return t.length>1&&!t.some(e=>!function(e){const t=Object.keys(e).sort();return 1===t.length&&"type"===t[0]||2===t.length&&"title"===t[0]&&"type"===t[1]}(e))&&(delete n.anyOf,n.type=t.map(({type:e})=>e)),n}function l(e){if("any"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{}));if("null"===e.type)return(0,i.annotateJsonSchema)(e,{type:"null"});if("boolean"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"boolean"}));if("string"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"string"}));if("number"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"number"}));if("integer"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"integer"}));if("and"===e.type)return(0,i.annotateJsonSchema)(e,{allOf:e.and.map(e=>l(e))});if("or"===e.type)return a(e);if("object"===e.type){const t=Object.keys(e.properties),n=t.filter(t=>e.properties[t].required),r=Object.fromEntries(t.map(t=>[t,l(e.properties[t].node)]));return(0,i.annotateJsonSchema)(e,c(e,{type:"object",...t.length>0?{properties:r}:{},...n.length>0?{required:n}:{},...!0===e.additionalProperties?{}:e.additionalProperties?{additionalProperties:l(e.additionalProperties)}:{additionalProperties:!1}}))}if("array"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"array",items:l(e.elementType)}));if("tuple"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{type:"array",items:e.elementTypes.map(e=>l(e)),...!0===e.additionalItems?{}:e.additionalItems?{additionalItems:l(e.additionalItems)}:{additionalItems:!1},minItems:e.minItems}));if("ref"===e.type)return(0,i.annotateJsonSchema)(e,c(e,{$ref:(0,r.encodeRefNameJsonSchema)(e.ref)}));throw new o.UnsupportedError(`core-types node of type ${e.type} not supported`,e)}function c(e,t){return void 0!==e.const?{...t,const:e.const}:e.enum?{...t,enum:e.enum}:t}n.decorateSchema=s,n.convertCoreTypesToJsonSchema=function(e,t){const{version:n,types:r}=e;if(1!==n)throw new o.UnsupportedError(`core-types version ${n} not supported`);const i={definitions:Object.fromEntries(r.map(e=>[e.name,l(e)]))};return s(i,null!=t?t:{}),{data:i,convertedTypes:r.map(({name:e})=>e),notConvertedTypes:[]}}},{"./annotations":2,"core-types":6,"openapi-json-schema":18}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.complexProps=n.convertJsonSchemaToCoreTypes=void 0;const r=e("jsonpos"),o=e("openapi-json-schema"),i=e("core-types"),s=e("./annotations"),a=(e,t)=>({...e,path:[...e.path,t]});function l(e,t){if("boolean"==typeof e)t.throwUnsupportedError("Boolean JSON Schema definition not supported",{blob:{schema:e}});else if(function(e){return"object"==typeof e&&Object.keys(e).some(e=>n.complexProps.has(e))}(e))return function(e,t){const{then:n,else:r,allOf:o,anyOf:i,oneOf:s}=e,c=[...n?[[a(t,"then"),n]]:[],...r?[[a(t,"else"),r]]:[]],u=[...i?i.map((e,n)=>[a(a(t,"anyOf"),n),e]):[],...s?s.map((e,n)=>[a(a(t,"oneOf"),n),e]):[]],p=[...o?o.map((e,n)=>[a(a(t,"allOf"),n),e]):[]];return{type:"and",and:[{type:"or",or:c.map(([e,t])=>l(t,e))},{type:"or",or:u.map(([e,t])=>l(t,e))},{type:"and",and:p.map(([e,t])=>l(t,e))}]}}(function(e,t){const{$ref:n,type:r,enum:o,const:s,items:a,additionalItems:l,required:c,properties:u,additionalProperties:p,then:f,else:d,allOf:m,anyOf:y,oneOf:h}=e,b=m&&"object"==typeof m?m.filter(e=>e&&"object"==typeof e):null,g=y&&"object"==typeof y?y.filter(e=>e&&"object"==typeof e):null,v=h&&"object"==typeof h?h.filter(e=>e&&"object"==typeof e):null,O=(f,d)=>{var m,y,h,b,g;const v=(e,t)=>!(e&&t&&!(0,i.isEqual)(e,t));if(v(n,d.$ref)||t.throwUnsupportedError(`Cannot have $ref in a node *and* in its '${f}'`,{blob:e}),v(r,d.type)||t.throwUnsupportedError(`Cannot have 'type' in a node *and* in its '${f}'`,{blob:e}),o)if(d.enum){const e=(0,i.intersection)(o,d.enum);if(0===e.length)throw new i.MalformedTypeError("Cannot merge types with non-intersecting enums",{path:t.path,blob:{child:[...t.path,f]}});d.enum=e}else d.enum=o;if(void 0!==s)if(void 0!==d.const){if((0,i.isEqual)(s,d.const))throw new i.MalformedTypeError("Cannot merge types with mismatching const",{path:t.path,blob:{child:[...t.path,f]}})}else d.const=s;if(d.items=null!==(m=d.items)&&void 0!==m?m:a,d.additionalItems=null!==(y=d.additionalItems)&&void 0!==y?y:l,void 0===c&&void 0===d.required||(d.required=(0,i.union)(null!==(h=d.required)&&void 0!==h?h:[],null!=c?c:[])),void 0===u!=(void 0===d.properties))null!==(b=d.properties)&&void 0!==b||(d.properties=u);else if(void 0!==u){const e=u,t=d.properties,n=Object.keys(e),r=Object.keys(t),o=(0,i.union)(n,r),s={};o.forEach(n=>{void 0!==e[n]?s[n]=t[n]:void 0!==t[n]?s[n]=e[n]:s[n]={allOf:[e[n],t[n]]}})}void 0===p!=(void 0===d.additionalProperties)?null!==(g=d.additionalProperties)&&void 0!==g||(d.additionalProperties=p):void 0!==p&&(d.additionalProperties={allOf:[d.additionalProperties,p]})};return f&&"object"==typeof f&&O("then",f),d&&"object"==typeof d&&O("else",d),b&&"object"==typeof b&&b.forEach(e=>O("allOf",e)),g&&"object"==typeof g&&g.forEach(e=>O("anyOf",e)),v&&"object"==typeof v&&v.forEach(e=>O("oneOf",e)),{...f&&"object"==typeof f?{then:f}:{},...d&&"object"==typeof d?{else:d}:{},...b&&"object"==typeof b?{allOf:b}:{},...g&&"object"==typeof g?{anyOf:g}:{},...v&&"object"==typeof v?{oneOf:v}:{}}}(e,t),t);void 0===e&&t.throwUnsupportedError("Internal error",{blob:{schema:e}});const r=e=>({type:"ref",ref:(0,o.decodeRefNameJsonSchema)(e)}),u=t=>void 0===e.$ref?t:{type:"and",and:[t,r(e.$ref)]},{const:p,enum:f}=e,d={...void 0!==p?{const:p}:{},...void 0!==f?{enum:f}:{}};if(void 0===e.type)return e.$ref?{...r(e.$ref),...d}:{type:"any",...d};const m=(0,i.ensureArray)(e.type).map(n=>function(e,t,n,r){var o,i,u,p;if(c(t))return"null"===t?(0,s.annotateCoreTypes)({type:"null"},e):(0,s.annotateCoreTypes)({type:t,...n},e);if("array"===t)return Array.isArray(e.items)?(0,s.annotateCoreTypes)({type:"tuple",elementTypes:e.items.map(e=>l(e,a(r,"items"))),additionalItems:void 0===e.additionalItems||("boolean"==typeof e.additionalItems?e.additionalItems:l(e.additionalItems,a(r,"additionalItems"))),minItems:null!==(o=e.minItems)&&void 0!==o?o:0,...n},e):!1===e.items?(0,s.annotateCoreTypes)({type:"tuple",elementTypes:[],additionalItems:!1,minItems:0,...n},e):(0,s.annotateCoreTypes)({type:"array",elementType:void 0===e.items||!0===e.items?{type:"any"}:l(e.items,a(r,"items")),...n},e);if("object"===t){const t=new Set(null!==(i=e.required)&&void 0!==i?i:[]),o=null!==(u=e.additionalProperties)&&void 0!==u?u:r.defaultAdditionalProperties;return(0,s.annotateCoreTypes)({type:"object",properties:Object.fromEntries(Object.entries(null!==(p=e.properties)&&void 0!==p?p:{}).map(([e,n])=>[e,{node:l(n,a(a(r,"properties"),e)),required:t.has(e)}])),additionalProperties:"boolean"==typeof o?o:l(o,a(r,"additionalProperties")),...n},e)}r.throwUnsupportedError(`Unsupported JSON Schema type "${t}"`,{blob:{schema:e}})}(e,n,d,t));return 1===m.length?u(m[0]):u({type:"or",or:m})}n.convertJsonSchemaToCoreTypes=function(e,t={}){const n="string"==typeof e?(0,r.getAstByString)(e):(0,r.getAstByObject)(e),{json:o}=n,{definitions:s}=o,a={version:1,types:Object.keys(null!=s?s:{}).map(e=>{var o;return{...l((null!=s?s:{})[e],{locByPath(){return{path:this.path,loc:(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})}},path:["definitions",e],throwUnsupportedError(e,t){throw(t={...t}).path||(t.path=this.path),t.loc||(t.loc=(0,r.getLocation)(n,{dataPath:this.path,markIdentifier:!0})),new i.UnsupportedError(e,t)},defaultAdditionalProperties:null===(o=t.defaultAdditionalProperties)||void 0===o||o}),name:e}})};return{data:a,convertedTypes:a.types.map(({name:e})=>e),notConvertedTypes:[]}},n.complexProps=new Set(["anyOf","allOf","oneOf","then","else"]);const c=e=>["string","number","integer","boolean","null"].includes(e)},{"./annotations":2,"core-types":6,jsonpos:25,"openapi-json-schema":18}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertOpenApiToCoreTypes=n.convertCoreTypesToOpenApi=void 0;const r=e("openapi-json-schema"),o=e("./core-types-to-json-schema"),i=e("./json-schema-to-core-types");n.convertCoreTypesToOpenApi=function(e,t){const{data:n,...i}=(0,o.convertCoreTypesToJsonSchema)(e,t);return{...i,data:(0,r.jsonSchemaDocumentToOpenApi)(n,t)}},n.convertOpenApiToCoreTypes=function(e){e="string"==typeof e?JSON.parse(e):e;const t=(0,r.openApiToJsonSchema)(e);return(0,i.convertJsonSchemaToCoreTypes)(t)}},{"./core-types-to-json-schema":3,"./json-schema-to-core-types":4,"openapi-json-schema":18}],6:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.some=n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.formatSee=n.formatDefault=n.formatExamples=n.stringify=n.stripAnnotations=n.stringifyAnnotations=n.extractAnnotations=n.mergeAnnotations=n.isNonNullable=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.isPrimitiveType=n.ensureArray=n.validate=n.simplify=void 0,o(e("./lib/types"),n);var i=e("./lib/simplify");Object.defineProperty(n,"simplify",{enumerable:!0,get:function(){return i.simplify}});var s=e("./lib/validate");Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return s.validate}});var a=e("./lib/util");Object.defineProperty(n,"ensureArray",{enumerable:!0,get:function(){return a.ensureArray}}),Object.defineProperty(n,"isPrimitiveType",{enumerable:!0,get:function(){return a.isPrimitiveType}}),Object.defineProperty(n,"hasConstEnum",{enumerable:!0,get:function(){return a.hasConstEnum}}),Object.defineProperty(n,"isEqual",{enumerable:!0,get:function(){return a.isEqual}}),Object.defineProperty(n,"intersection",{enumerable:!0,get:function(){return a.intersection}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return a.union}}),Object.defineProperty(n,"isNonNullable",{enumerable:!0,get:function(){return a.isNonNullable}});var l=e("./lib/annotation");Object.defineProperty(n,"mergeAnnotations",{enumerable:!0,get:function(){return l.mergeAnnotations}}),Object.defineProperty(n,"extractAnnotations",{enumerable:!0,get:function(){return l.extractAnnotations}}),Object.defineProperty(n,"stringifyAnnotations",{enumerable:!0,get:function(){return l.stringifyAnnotations}}),Object.defineProperty(n,"stripAnnotations",{enumerable:!0,get:function(){return l.stripAnnotations}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(n,"formatExamples",{enumerable:!0,get:function(){return l.formatExamples}}),Object.defineProperty(n,"formatDefault",{enumerable:!0,get:function(){return l.formatDefault}}),Object.defineProperty(n,"formatSee",{enumerable:!0,get:function(){return l.formatSee}});var c=e("./lib/error");Object.defineProperty(n,"MalformedTypeError",{enumerable:!0,get:function(){return c.MalformedTypeError}}),Object.defineProperty(n,"MissingReferenceError",{enumerable:!0,get:function(){return c.MissingReferenceError}}),Object.defineProperty(n,"UnsupportedError",{enumerable:!0,get:function(){return c.UnsupportedError}}),Object.defineProperty(n,"RelatedError",{enumerable:!0,get:function(){return c.RelatedError}}),Object.defineProperty(n,"throwUnsupportedError",{enumerable:!0,get:function(){return c.throwUnsupportedError}}),Object.defineProperty(n,"throwRelatedError",{enumerable:!0,get:function(){return c.throwRelatedError}}),Object.defineProperty(n,"isCoreTypesError",{enumerable:!0,get:function(){return c.isCoreTypesError}}),Object.defineProperty(n,"decorateErrorMeta",{enumerable:!0,get:function(){return c.decorateErrorMeta}}),Object.defineProperty(n,"decorateError",{enumerable:!0,get:function(){return c.decorateError}});var u=e("./lib/location");Object.defineProperty(n,"positionToLineColumn",{enumerable:!0,get:function(){return u.positionToLineColumn}}),Object.defineProperty(n,"locationToLineColumn",{enumerable:!0,get:function(){return u.locationToLineColumn}}),Object.defineProperty(n,"getPositionOffset",{enumerable:!0,get:function(){return u.getPositionOffset}}),Object.defineProperty(n,"mergeLocations",{enumerable:!0,get:function(){return u.mergeLocations}});var p=e("./lib/traverse");Object.defineProperty(n,"some",{enumerable:!0,get:function(){return p.some}}),Object.defineProperty(n,"traverse",{enumerable:!0,get:function(){return p.traverse}})},{"./lib/annotation":7,"./lib/error":8,"./lib/location":9,"./lib/simplify":13,"./lib/traverse":14,"./lib/types":15,"./lib/util":16,"./lib/validate":17}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=n.formatSee=n.formatDefault=n.formatExamples=n.arrayOrSingle=n.stripAnnotations=n.stringifyAnnotations=n.wrapWhitespace=n.extractAnnotations=n.mergeAnnotations=void 0;const r=e("./location"),o=e("./util");function i(e){return e.includes("\n")?["*",e.split("\n").map(e=>` * ${e}`).join("\n")," "].join("\n"):e.startsWith(" ")?e:` ${e}`}function s(e){return 1===e.length?e[0]:e}function a(e){return e.map(e=>"@example\n"+p(u(e).split("\n"),4)).join("\n").trim()}function l(e){return["@default",p(u(e).split("\n"),4)].join("\n").trim()}function c(e){return e.map(e=>"@see "+u(e)).join("\n").trim()}function u(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}function p(e,t,n=!1){return e.map((e,r)=>(0===r&&n?" ".repeat(t-2)+"* ":" ".repeat(t))+e).join("\n")}n.mergeAnnotations=function(e){var t;const n=e=>!!e,i=(e,t="\n")=>(0,o.uniq)(e.filter(n)).join(t).trim(),a=null===(t=e.find(e=>e.name))||void 0===t?void 0:t.name,l=i(e.map(e=>e.title),", "),c=i(e.map(e=>e.description)),u=(0,o.uniq)([].concat(...e.map(e=>(0,o.ensureArray)(e.examples))).filter(n)),p=i(e.map(e=>e.default)),f=(0,o.uniq)([].concat(...e.map(e=>(0,o.ensureArray)(e.see))).filter(n)),d=i(e.map(e=>e.comment)),m=(0,r.mergeLocations)(e.map(e=>e.loc));return{...a?{name:a}:{},...l?{title:l}:{},...c?{description:c}:{},...u.length>0?{examples:s(u)}:{},...p?{default:p}:{},...f.length>0?{see:s(f)}:{},...d?{comment:d}:{},...m?{loc:m}:{}}},n.extractAnnotations=function(e){const{title:t,description:n,examples:r,default:o,comment:i,see:s}=e;return{...t?{title:t}:{},...n?{description:n}:{},...r?{examples:r}:{},...o?{default:o}:{},...i?{comment:i}:{},...s?{see:s}:{}}},n.wrapWhitespace=i,n.stringifyAnnotations=function(e,{includeComment:t=!1,formatWhitespace:n=!1}={}){const{description:r,examples:s,default:u,comment:p,see:f}=e,d=[r,...null==s?[]:[a((0,o.ensureArray)(s))],...void 0===u?[]:[l(u)],...null==f?[]:[c((0,o.ensureArray)(f))],...t?[p]:[]].filter(e=>e).join("\n\n").trim().replace(/\*\//g,"*\\/");return n&&d?i(d):d},n.stripAnnotations=function e(t,n=!0){const{comment:r,description:o,default:i,examples:s,see:a,title:l,...c}=t,u=c;if(n){if("and"===u.type)return{...u,and:u.and.map(t=>e(t,!0))};if("or"===u.type)return{...u,or:u.or.map(t=>e(t,!0))};if("array"===u.type)return{...u,elementType:e(u.elementType,!0)};if("tuple"===u.type)return{...u,elementTypes:u.elementTypes.map(t=>e(t,!0)),additionalItems:"object"==typeof u.additionalItems?e(u.additionalItems,!0):u.additionalItems};if("object"===u.type)return{...u,properties:Object.fromEntries(Object.keys(u.properties).map(t=>[t,{...u.properties[t],node:e(u.properties[t].node,!0)}])),additionalProperties:"object"==typeof u.additionalProperties?e(u.additionalProperties,!0):u.additionalProperties}}return u},n.arrayOrSingle=s,n.formatExamples=a,n.formatDefault=l,n.formatSee=c,n.stringify=u},{"./location":9,"./util":16}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateError=n.decorateErrorMeta=n.isCoreTypesError=n.throwRelatedError=n.throwUnsupportedError=n.RelatedError=n.UnsupportedError=n.MissingReferenceError=n.MalformedTypeError=n.CoreTypesError=void 0;class r extends Error{constructor(e,t={}){super(e),Object.setPrototypeOf(this,r.prototype),this.blob=t.blob,this.path=t.path,this.loc=t.loc,this.source=t.source,this.filename=t.filename,this.relatedError=t.relatedError}}n.CoreTypesError=r;class o extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,o.prototype)}}n.MalformedTypeError=o;class i extends r{constructor(e,t={}){super(`Reference to missing type "${e}"`,t),Object.setPrototypeOf(this,i.prototype)}}n.MissingReferenceError=i;class s extends r{constructor(e,t={}){super(e,t),Object.setPrototypeOf(this,s.prototype)}}n.UnsupportedError=s;class a extends r{constructor(e,t={}){super(e.message,{...t,relatedError:e}),Object.setPrototypeOf(this,a.prototype)}}function l(e){return e instanceof r}function c(e,t){var n,r,o,i,s;return t.blob&&(null!==(n=e.blob)&&void 0!==n||(e.blob=t.blob)),t.path&&(null!==(r=e.path)&&void 0!==r||(e.path=t.path)),t.loc&&(null!==(o=e.loc)&&void 0!==o||(e.loc=t.loc)),t.source&&(null!==(i=e.source)&&void 0!==i||(e.source=t.source)),t.filename&&(null!==(s=e.filename)&&void 0!==s||(e.filename=t.filename)),e}n.RelatedError=a,n.throwUnsupportedError=function(e,t,n){throw new s(e,{blob:t,...t.loc?{loc:t.loc}:{},...n?{path:n}:{}})},n.throwRelatedError=function(e,t){throw new a(e,t)},n.isCoreTypesError=l,n.decorateErrorMeta=c,n.decorateError=function(e,t){return l(e)&&c(e,t),e}},{}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeLocations=n.getPositionOffset=n.locationToLineColumn=n.positionToLineColumn=void 0;const r=e("./util");function o(e,t){const n=e.slice(0,t).split("\n").length,r=e.lastIndexOf("\n",t);return-1===r?{offset:t,line:n,column:t}:{offset:t,line:n,column:t-r}}n.positionToLineColumn=o,n.locationToLineColumn=function(e,t){return"object"==typeof t.start?t:{start:void 0===t.start?void 0:o(e,t.start),...null==t.end?{}:{end:o(e,t.end)}}},n.getPositionOffset=function(e){return void 0===e||"number"==typeof e?e:e.offset},n.mergeLocations=function(e){var t,n,o;let i,s;const a=e=>"number"==typeof e?e:null==e?void 0:e.offset;e.filter(r.isNonNullable).forEach(({start:e,end:t})=>{const n=a(e),r=a(t);void 0!==n&&(!i||"number"==typeof i.location&&i.location===n||i.offset>n)&&(i={location:e,offset:n}),void 0!==r&&(!s||"number"==typeof s.location&&s.location===n||s.offseto(e));return t.some(e=>0===e.length)?[]:(0,r.uniq)([].concat(...t))},n.combineConstAndEnum=o},{"../util":16}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.intersectConstEnum=void 0;const r=e("../annotation"),o=e("../util");n.intersectConstEnum=function(e){if(0===e.length)throw new Error("Cannot intersect const and enum from an empty array of nodes");if(1===e.length)return e[0];const t=e.map(e=>void 0!==e.const?[e.const]:void 0!==e.enum?e.enum:void 0).filter(e=>!!e),n=t.slice(1).reduce((e,t)=>(0,o.intersection)(e,t),t[0]);return{type:e[0].type,...1===n.length?{const:n[0]}:{},...1!==n.length?{enum:n}:{},...(0,r.mergeAnnotations)(e)}}},{"../annotation":7,"../util":16}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplifySingle=void 0;const r=e("./const-enum");n.simplifySingle=function(e){return"boolean"===e.type||"integer"===e.type||"number"===e.type||"string"===e.type?(0,r.simplifyEnumAndConst)(e):e}},{"./const-enum":10}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.simplify=void 0;const r=e("./simplifications/single"),o=e("./simplifications/const-enum"),i=e("./simplifications/intersect-const-enum"),s=e("./error"),a=e("./annotation"),l=e("./util"),c=["any","string","number","integer","boolean"];n.simplify=function e(t){if(Array.isArray(t))return t.map(t=>e(t));if((0,l.isNodeDocument)(t))return{...t,types:e(t.types)};const n=e=>(0,l.copyName)(t,e);if("tuple"===t.type)return{...t,elementTypes:t.elementTypes.map(t=>e(t)),...t.additionalItems&&"object"==typeof t.additionalItems?{additionalItems:e(t.additionalItems)}:{}};if("array"===t.type)return{...t,elementType:e(t.elementType)};if("object"===t.type)return{...t,properties:Object.fromEntries(Object.entries(t.properties).map(([t,{node:n,required:r}])=>[t,{node:e(n),required:r}])),...t.additionalProperties&&"object"==typeof t.additionalProperties?{additionalProperties:e(t.additionalProperties)}:{}};if("and"!==t.type&&"or"!==t.type)return n((0,r.simplifySingle)(t));if("and"===t.type){const r=function(e){const t=(0,l.splitTypes)(e);if(t.any.length>0){if(0===t.and.length&&0===t.or.length&&0===t.ref.length&&0===t.null.length&&0===t.string.length&&0===t.number.length&&0===t.integer.length&&0===t.boolean.length&&0===t.object.length&&0===t.array.length&&0===t.tuple.length)return[{type:"any",...(0,a.mergeAnnotations)(t.any.map(({node:e})=>e))}];t.any=[]}const n=e=>e.map(({node:e})=>e);t.boolean.length>1&&(t.boolean=[{node:(0,i.intersectConstEnum)([...t.boolean.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.boolean)}]);t.string.length>1&&(t.string=[{node:(0,i.intersectConstEnum)([...t.string.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.string)}]);t.number.length>0&&t.integer.length>0?(t.number=[{node:(0,i.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.integer),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.number)}],t.integer=[]):t.number.length>1?t.number=[{node:(0,i.intersectConstEnum)([...t.number.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.number)}]:t.integer.length>1&&(t.integer=[{node:(0,i.intersectConstEnum)([...t.integer.map(({node:e})=>e),...n(t.any)]),order:(0,l.firstSplitTypeIndex)(t.integer)}]);t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,l.flattenSplitTypeValues)(t)}([].concat(...t.and.map(t=>{const n=e(t);return n.and?n.and:[n]})));return 1===r.length?n({...r[0],...(0,a.mergeAnnotations)([(0,a.extractAnnotations)(t),r[0]])}):n({type:"and",and:r,...(0,a.extractAnnotations)(t)})}if("or"===t.type){const i=function(e){const t=(0,l.splitTypes)(e);if(t.any.length>0){const e=(0,o.mergeConstEnumUnion)(t.any.map(({node:e})=>e));if(0===e.length)return[{type:"any",...(0,a.mergeAnnotations)(t.any.map(({node:e})=>e))}]}for(const[e,n]of Object.entries(t)){const i=e;if(!c.includes(i)||!n.length)continue;const s=n,u=s.map(({node:e})=>e),p=(0,o.mergeConstEnumUnion)(u);0===p.length?t[i]=[{node:{type:i,...(0,a.mergeAnnotations)(u)},order:(0,l.firstSplitTypeIndex)(s)}]:t[i]=[{node:(0,r.simplifySingle)({type:i,enum:p,...(0,a.mergeAnnotations)(u)}),order:(0,l.firstSplitTypeIndex)(s)}]}t.or.length>0&&(t.or=t.or.filter(({node:e})=>e.or.length>0));t.and.length>0&&(t.and=t.and.filter(({node:e})=>e.and.length>0));return(0,l.flattenSplitTypeValues)(t)}([].concat(...t.or.map(t=>{const n=e(t);return n.or?n.or:[n]})));return 1===i.length?n({...i[0],...(0,a.mergeAnnotations)([(0,a.extractAnnotations)(t),i[0]])}):n({type:"or",or:i,...(0,a.extractAnnotations)(t)})}throw new s.MalformedTypeError("Invalid node",t)}},{"./annotation":7,"./error":8,"./simplifications/const-enum":10,"./simplifications/intersect-const-enum":11,"./simplifications/single":12,"./util":16}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.some=n.traverse=void 0;class r extends Error{}function o(e,t){function n(e,t,n,r,o,i){const s={node:void 0!==i?i:void 0===r?t[n]:t[n][r],path:[...e.path,n,...void 0===r?[]:[r]],parentNode:t,parentProperty:n,index:r,required:o};return Object.assign({},e,s)}!function e(t,r){r(t);const{node:o}=t;if("array"===o.type)e(n(t,o,"elementType"),r);else if("tuple"===o.type)o.elementTypes.forEach((i,s)=>e(n(t,o,"elementTypes",s),r)),"object"==typeof o.additionalItems&&e(n(t,o,"additionalItems"),r);else if("object"===o.type){for(const i of Object.keys(o.properties))e(n(t,o,"properties",i,o.properties[i].required,o.properties[i].node),r);"object"==typeof o.additionalProperties&&e(n(t,o,"additionalProperties"),r)}else"and"===o.type?o.and.forEach((i,s)=>e(n(t,o,"and",s),r)):"or"===o.type&&o.or.forEach((i,s)=>e(n(t,o,"or",s),r))}({node:e,rootNode:e,path:[]},t)}n.traverse=o,n.some=function(e,t){try{o(e,e=>{if(t(e))throw new r})}catch(e){if(e instanceof r)return!0;throw e}return!1}},{}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNodeDocument=n.isNonNullable=n.copyName=n.firstSplitTypeIndex=n.flattenSplitTypeValues=n.splitTypes=n.union=n.intersection=n.isEqual=n.hasConstEnum=n.constEnumTypes=n.isPrimitiveType=n.ensureArray=n.uniq=void 0,n.uniq=function(e){return e.filter((t,n)=>{for(let o=0;o["null","string","number","integer","boolean"].includes(e.type),n.constEnumTypes=new Set(["any","string","number","integer","boolean","object","array","tuple","ref"]);function r(e,t){if(typeof e!=typeof t)return!1;if(null===e!=(null===t))return!1;if(null===e)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((e,n)=>!r(e,t[n]));if(Array.isArray(e)!==Array.isArray(t))return!1;if("object"==typeof e){const n=Object.keys(e).sort();return!!r(n,Object.keys(t).sort())&&!n.some(n=>!r(e[n],t[n]))}return e===t}n.hasConstEnum=e=>n.constEnumTypes.has(e.type),n.isEqual=r,n.intersection=function(e,t){const n=[];return e.forEach(e=>{t.forEach(t=>{r(e,t)&&n.push(e)})}),n},n.union=function(e,t){const n=[...e];return t.forEach(t=>{!e.some(e=>r(t,e))&&n.push(t)}),n},n.splitTypes=function(e){const t={and:[],or:[],ref:[],any:[],null:[],string:[],number:[],integer:[],boolean:[],object:[],array:[],tuple:[]};return e.forEach((e,n)=>{if("and"!==e.type&&"or"!==e.type||"and"===e.type&&e.and.length>0||"or"===e.type&&e.or.length>0){const r={node:e,order:n};t[e.type].push(r)}}),t},n.flattenSplitTypeValues=function(e){return[].concat(Object.values(e).flat().sort((e,t)=>e.order-t.order).map(({node:e})=>e))},n.firstSplitTypeIndex=function(e){return Math.min(...e.map(({order:e})=>e))},n.copyName=function(e,t){return void 0===e.name?t:{...t,name:e.name}},n.isNonNullable=function(e){return null!=e},n.isNodeDocument=function(e){return Array.isArray(e.types)}},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=void 0;const r=e("./error"),o=e("./util");n.validate=function e(t){(0,o.hasConstEnum)(t)&&function(e){if(e.enum&&0===e.enum.length)throw new r.MalformedTypeError("Empty enum is not allowed",e);if(e.enum&&void 0!==e.const&&!e.enum.some(t=>(0,o.isEqual)(t,e.const)))throw new r.MalformedTypeError("Enum and const are both set, but enum doesn't contain const",e)}(t),"and"===t.type&&t.and.forEach(t=>e(t)),"or"===t.type&&t.or.forEach(t=>e(t))}},{"./error":8,"./util":16}],18:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),o(e("./lib"),n),o(e("./lib/types"),n),o(e("./lib/utils"),n)},{"./lib":19,"./lib/types":22,"./lib/utils":23}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchema=n.jsonSchemaDocumentToOpenApi=n.decorateOpenApi=void 0;const r=e("./json-schema-to-openapi"),o=e("./openapi-to-json-schema");function i(e,{title:t,version:n,schemaVersion:r="3.0.0"}){const o={title:t,version:n};return e.$id&&(o["x-id"]=e.$id,delete e.$id),e.$comment&&(o["x-comment"]=e.$comment,delete e.$comment),delete e.$schema,{openapi:r,info:o,paths:{},...e}}n.decorateOpenApi=i,n.jsonSchemaDocumentToOpenApi=function(e,t){const{definitions:n={},...o}=e;return i({...o,components:{schemas:Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(0,r.jsonSchemaTypeToOpenApi)(t)]))}},t)},n.openApiToJsonSchema=function(e){const t=e.components.schemas;return{definitions:Object.fromEntries(Object.keys(t).map(e=>[e,(0,o.openApiToJsonSchemaType)(t[e])]))}}},{"./json-schema-to-openapi":20,"./openapi-to-json-schema":21}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsonSchemaTypeToOpenApi=void 0;const r=e("./utils");n.jsonSchemaTypeToOpenApi=function e(t){return"boolean"==typeof t?t:(t=function(e){if(void 0===e.type)return e;const{type:t,...n}=e,r=Array.isArray(t)?t.includes("null"):"null"===t,o=Array.isArray(t)?t.filter(e=>"null"!==e):"null"===t?void 0:t,i=(e,t)=>"any"!==t&&t?{...e,type:t}:e;void 0!==e.const&&(n.enum=[e.const],delete n.const);const s=e=>r?{...e,nullable:r}:e;return Array.isArray(o)?0===o.length?s(n):1===o.length?i(s(n),o[0]):{...s(n),anyOf:o.map(e=>i({},e))}:i(s(n),o)}(t),t=(n=t).$ref?{...n,$ref:(0,r.encodeRefNameOpenApi)((0,r.decodeRefNameJsonSchema)(n.$ref))}:n,(0,r.recurseSchema)(t,e));var n}},{"./utils":23}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.openApiToJsonSchemaType=void 0;const r=e("./utils");n.openApiToJsonSchemaType=function e(t){if("boolean"==typeof t)return t;const{type:n,nullable:o,...i}=t,s=function(e,t){if(void 0!==e&&"any"!==e){if(Array.isArray(e)){if(e.includes("any"))return;return!e.includes("null")&&t&&e.push("null"),1===e.length?e[0]:e}return"null"!==e&&t?[e,"null"]:e}}(n,o);let a={...i,...s?{type:s}:{}};var l;return a=(l=a).$ref?{...l,$ref:(0,r.encodeRefNameJsonSchema)((0,r.decodeRefNameOpenApi)(l.$ref))}:l,(0,r.recurseSchema)(a,e)}},{"./utils":23}],22:[function(e,t,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],23:[function(e,t,n){"use strict";function r(e){return encodeURIComponent(e)}function o(e){return decodeURIComponent(e)}function i(e){return e&&Object.keys(e).length>0}Object.defineProperty(n,"__esModule",{value:!0}),n.recurseSchema=n.decodeRefNameOpenApi=n.encodeRefNameOpenApi=n.decodeRefNameJsonSchema=n.encodeRefNameJsonSchema=n.decodePathPart=n.encodePathPart=void 0,n.encodePathPart=r,n.decodePathPart=o,n.encodeRefNameJsonSchema=function(e){return`#/definitions/${r(e)}`},n.decodeRefNameJsonSchema=function(e){return e.startsWith("#/definitions/")?o(e.slice(14)):o(e)},n.encodeRefNameOpenApi=function(e){return`#/components/schemas/${r(e)}`},n.decodeRefNameOpenApi=function(e){return e.startsWith("#/components/schemas/")?o(e.slice(21)):o(e)},n.recurseSchema=function(e,t){if("object"!=typeof e)return e;const n=e;return{...n,..."object"!=typeof n.items?{}:Array.isArray(n.items)?{items:n.items.map(e=>t(e))}:{items:t(n.items)},..."object"!=typeof n.additionalItems?{}:{additionalItems:t(n.additionalItems)},..."object"!=typeof n.contains?{}:{contains:t(n.contains)},...i(n.properties)?{properties:Object.fromEntries(Object.keys(n.properties).map(e=>{var r;return[e,t(null===(r=n.properties)||void 0===r?void 0:r[e])]}))}:{},...i(n.patternProperties)?{patternProperties:Object.fromEntries(Object.keys(n.patternProperties).map(e=>{var r;return[e,t(null===(r=n.patternProperties)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.additionalProperties?{}:{additionalProperties:t(n.additionalProperties)},...i(n.dependencies)?{dependencies:Object.fromEntries(Object.keys(n.dependencies).map(e=>{var r;return[e,t(null===(r=n.dependencies)||void 0===r?void 0:r[e])]}))}:{},..."object"!=typeof n.propertyNames?{}:{propertyNames:t(n.propertyNames)},..."object"!=typeof n.if?{}:{if:t(n.if)},..."object"!=typeof n.then?{}:{then:t(n.then)},..."object"!=typeof n.else?{}:{else:t(n.else)},..."object"==typeof n.allOf&&n.allOf.length?{allOf:n.allOf.map(e=>t(e))}:{},..."object"==typeof n.anyOf&&n.anyOf.length?{anyOf:n.anyOf.map(e=>t(e))}:{},..."object"==typeof n.oneOf&&n.oneOf.length?{oneOf:n.oneOf.map(e=>t(e))}:{},..."object"!=typeof n.not?{}:{not:t(n.not)},...i(n.definitions)?{definitions:Object.fromEntries(Object.keys(n.definitions).map(e=>{var r;return[e,t(null===(r=n.definitions)||void 0===r?void 0:r[e])]}))}:{}}}},{}],24:[function(e,t,n){(function(e){(function(){!function(e,r){"object"==typeof n&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):e.jsonToAst=r()}(this,function(){"use strict";"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t(function(e){e.exports&&(e.exports=function(){var e=3,t=4,n=12,r=13,o=16,i=17;function s(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}function a(e,t){void 0===t&&(t=0);var n=e.charCodeAt(t);if(55296<=n&&n<=56319&&t=1){var o=n;return 55296<=(r=e.charCodeAt(t-1))&&r<=56319?1024*(r-55296)+(o-56320)+65536:o}return n}function l(s,a,l){var c=[s].concat(a).concat([l]),u=c[c.length-2],p=l,f=c.lastIndexOf(14);if(f>1&&c.slice(1,f).every(function(t){return t==e})&&-1==[e,r,i].indexOf(s))return 2;var d=c.lastIndexOf(t);if(d>0&&c.slice(1,d).every(function(e){return e==t})&&-1==[n,t].indexOf(u))return c.filter(function(e){return e==t}).length%2==1?3:4;if(0==u&&1==p)return 0;if(2==u||0==u||1==u)return 14==p&&a.every(function(t){return t==e})?2:1;if(2==p||0==p||1==p)return 1;if(6==u&&(6==p||7==p||9==p||10==p))return 0;if(!(9!=u&&7!=u||7!=p&&8!=p))return 0;if((10==u||8==u)&&8==p)return 0;if(p==e||15==p)return 0;if(5==p)return 0;if(u==n)return 0;var m=-1!=c.indexOf(e)?c.lastIndexOf(e)-1:c.length-2;return-1!=[r,i].indexOf(c[m])&&c.slice(m+1,-1).every(function(t){return t==e})&&14==p||15==u&&-1!=[o,i].indexOf(p)?0:-1!=a.indexOf(t)?2:u==t&&p==t?0:1}function c(s){return 1536<=s&&s<=1541||1757==s||1807==s||2274==s||3406==s||69821==s||70082<=s&&s<=70083||72250==s||72326<=s&&s<=72329||73030==s?n:13==s?0:10==s?1:0<=s&&s<=9||11<=s&&s<=12||14<=s&&s<=31||127<=s&&s<=159||173==s||1564==s||6158==s||8203==s||8206<=s&&s<=8207||8232==s||8233==s||8234<=s&&s<=8238||8288<=s&&s<=8292||8293==s||8294<=s&&s<=8303||55296<=s&&s<=57343||65279==s||65520<=s&&s<=65528||65529<=s&&s<=65531||113824<=s&&s<=113827||119155<=s&&s<=119162||917504==s||917505==s||917506<=s&&s<=917535||917632<=s&&s<=917759||918e3<=s&&s<=921599?2:768<=s&&s<=879||1155<=s&&s<=1159||1160<=s&&s<=1161||1425<=s&&s<=1469||1471==s||1473<=s&&s<=1474||1476<=s&&s<=1477||1479==s||1552<=s&&s<=1562||1611<=s&&s<=1631||1648==s||1750<=s&&s<=1756||1759<=s&&s<=1764||1767<=s&&s<=1768||1770<=s&&s<=1773||1809==s||1840<=s&&s<=1866||1958<=s&&s<=1968||2027<=s&&s<=2035||2070<=s&&s<=2073||2075<=s&&s<=2083||2085<=s&&s<=2087||2089<=s&&s<=2093||2137<=s&&s<=2139||2260<=s&&s<=2273||2275<=s&&s<=2306||2362==s||2364==s||2369<=s&&s<=2376||2381==s||2385<=s&&s<=2391||2402<=s&&s<=2403||2433==s||2492==s||2494==s||2497<=s&&s<=2500||2509==s||2519==s||2530<=s&&s<=2531||2561<=s&&s<=2562||2620==s||2625<=s&&s<=2626||2631<=s&&s<=2632||2635<=s&&s<=2637||2641==s||2672<=s&&s<=2673||2677==s||2689<=s&&s<=2690||2748==s||2753<=s&&s<=2757||2759<=s&&s<=2760||2765==s||2786<=s&&s<=2787||2810<=s&&s<=2815||2817==s||2876==s||2878==s||2879==s||2881<=s&&s<=2884||2893==s||2902==s||2903==s||2914<=s&&s<=2915||2946==s||3006==s||3008==s||3021==s||3031==s||3072==s||3134<=s&&s<=3136||3142<=s&&s<=3144||3146<=s&&s<=3149||3157<=s&&s<=3158||3170<=s&&s<=3171||3201==s||3260==s||3263==s||3266==s||3270==s||3276<=s&&s<=3277||3285<=s&&s<=3286||3298<=s&&s<=3299||3328<=s&&s<=3329||3387<=s&&s<=3388||3390==s||3393<=s&&s<=3396||3405==s||3415==s||3426<=s&&s<=3427||3530==s||3535==s||3538<=s&&s<=3540||3542==s||3551==s||3633==s||3636<=s&&s<=3642||3655<=s&&s<=3662||3761==s||3764<=s&&s<=3769||3771<=s&&s<=3772||3784<=s&&s<=3789||3864<=s&&s<=3865||3893==s||3895==s||3897==s||3953<=s&&s<=3966||3968<=s&&s<=3972||3974<=s&&s<=3975||3981<=s&&s<=3991||3993<=s&&s<=4028||4038==s||4141<=s&&s<=4144||4146<=s&&s<=4151||4153<=s&&s<=4154||4157<=s&&s<=4158||4184<=s&&s<=4185||4190<=s&&s<=4192||4209<=s&&s<=4212||4226==s||4229<=s&&s<=4230||4237==s||4253==s||4957<=s&&s<=4959||5906<=s&&s<=5908||5938<=s&&s<=5940||5970<=s&&s<=5971||6002<=s&&s<=6003||6068<=s&&s<=6069||6071<=s&&s<=6077||6086==s||6089<=s&&s<=6099||6109==s||6155<=s&&s<=6157||6277<=s&&s<=6278||6313==s||6432<=s&&s<=6434||6439<=s&&s<=6440||6450==s||6457<=s&&s<=6459||6679<=s&&s<=6680||6683==s||6742==s||6744<=s&&s<=6750||6752==s||6754==s||6757<=s&&s<=6764||6771<=s&&s<=6780||6783==s||6832<=s&&s<=6845||6846==s||6912<=s&&s<=6915||6964==s||6966<=s&&s<=6970||6972==s||6978==s||7019<=s&&s<=7027||7040<=s&&s<=7041||7074<=s&&s<=7077||7080<=s&&s<=7081||7083<=s&&s<=7085||7142==s||7144<=s&&s<=7145||7149==s||7151<=s&&s<=7153||7212<=s&&s<=7219||7222<=s&&s<=7223||7376<=s&&s<=7378||7380<=s&&s<=7392||7394<=s&&s<=7400||7405==s||7412==s||7416<=s&&s<=7417||7616<=s&&s<=7673||7675<=s&&s<=7679||8204==s||8400<=s&&s<=8412||8413<=s&&s<=8416||8417==s||8418<=s&&s<=8420||8421<=s&&s<=8432||11503<=s&&s<=11505||11647==s||11744<=s&&s<=11775||12330<=s&&s<=12333||12334<=s&&s<=12335||12441<=s&&s<=12442||42607==s||42608<=s&&s<=42610||42612<=s&&s<=42621||42654<=s&&s<=42655||42736<=s&&s<=42737||43010==s||43014==s||43019==s||43045<=s&&s<=43046||43204<=s&&s<=43205||43232<=s&&s<=43249||43302<=s&&s<=43309||43335<=s&&s<=43345||43392<=s&&s<=43394||43443==s||43446<=s&&s<=43449||43452==s||43493==s||43561<=s&&s<=43566||43569<=s&&s<=43570||43573<=s&&s<=43574||43587==s||43596==s||43644==s||43696==s||43698<=s&&s<=43700||43703<=s&&s<=43704||43710<=s&&s<=43711||43713==s||43756<=s&&s<=43757||43766==s||44005==s||44008==s||44013==s||64286==s||65024<=s&&s<=65039||65056<=s&&s<=65071||65438<=s&&s<=65439||66045==s||66272==s||66422<=s&&s<=66426||68097<=s&&s<=68099||68101<=s&&s<=68102||68108<=s&&s<=68111||68152<=s&&s<=68154||68159==s||68325<=s&&s<=68326||69633==s||69688<=s&&s<=69702||69759<=s&&s<=69761||69811<=s&&s<=69814||69817<=s&&s<=69818||69888<=s&&s<=69890||69927<=s&&s<=69931||69933<=s&&s<=69940||70003==s||70016<=s&&s<=70017||70070<=s&&s<=70078||70090<=s&&s<=70092||70191<=s&&s<=70193||70196==s||70198<=s&&s<=70199||70206==s||70367==s||70371<=s&&s<=70378||70400<=s&&s<=70401||70460==s||70462==s||70464==s||70487==s||70502<=s&&s<=70508||70512<=s&&s<=70516||70712<=s&&s<=70719||70722<=s&&s<=70724||70726==s||70832==s||70835<=s&&s<=70840||70842==s||70845==s||70847<=s&&s<=70848||70850<=s&&s<=70851||71087==s||71090<=s&&s<=71093||71100<=s&&s<=71101||71103<=s&&s<=71104||71132<=s&&s<=71133||71219<=s&&s<=71226||71229==s||71231<=s&&s<=71232||71339==s||71341==s||71344<=s&&s<=71349||71351==s||71453<=s&&s<=71455||71458<=s&&s<=71461||71463<=s&&s<=71467||72193<=s&&s<=72198||72201<=s&&s<=72202||72243<=s&&s<=72248||72251<=s&&s<=72254||72263==s||72273<=s&&s<=72278||72281<=s&&s<=72283||72330<=s&&s<=72342||72344<=s&&s<=72345||72752<=s&&s<=72758||72760<=s&&s<=72765||72767==s||72850<=s&&s<=72871||72874<=s&&s<=72880||72882<=s&&s<=72883||72885<=s&&s<=72886||73009<=s&&s<=73014||73018==s||73020<=s&&s<=73021||73023<=s&&s<=73029||73031==s||92912<=s&&s<=92916||92976<=s&&s<=92982||94095<=s&&s<=94098||113821<=s&&s<=113822||119141==s||119143<=s&&s<=119145||119150<=s&&s<=119154||119163<=s&&s<=119170||119173<=s&&s<=119179||119210<=s&&s<=119213||119362<=s&&s<=119364||121344<=s&&s<=121398||121403<=s&&s<=121452||121461==s||121476==s||121499<=s&&s<=121503||121505<=s&&s<=121519||122880<=s&&s<=122886||122888<=s&&s<=122904||122907<=s&&s<=122913||122915<=s&&s<=122916||122918<=s&&s<=122922||125136<=s&&s<=125142||125252<=s&&s<=125258||917536<=s&&s<=917631||917760<=s&&s<=917999?e:127462<=s&&s<=127487?t:2307==s||2363==s||2366<=s&&s<=2368||2377<=s&&s<=2380||2382<=s&&s<=2383||2434<=s&&s<=2435||2495<=s&&s<=2496||2503<=s&&s<=2504||2507<=s&&s<=2508||2563==s||2622<=s&&s<=2624||2691==s||2750<=s&&s<=2752||2761==s||2763<=s&&s<=2764||2818<=s&&s<=2819||2880==s||2887<=s&&s<=2888||2891<=s&&s<=2892||3007==s||3009<=s&&s<=3010||3014<=s&&s<=3016||3018<=s&&s<=3020||3073<=s&&s<=3075||3137<=s&&s<=3140||3202<=s&&s<=3203||3262==s||3264<=s&&s<=3265||3267<=s&&s<=3268||3271<=s&&s<=3272||3274<=s&&s<=3275||3330<=s&&s<=3331||3391<=s&&s<=3392||3398<=s&&s<=3400||3402<=s&&s<=3404||3458<=s&&s<=3459||3536<=s&&s<=3537||3544<=s&&s<=3550||3570<=s&&s<=3571||3635==s||3763==s||3902<=s&&s<=3903||3967==s||4145==s||4155<=s&&s<=4156||4182<=s&&s<=4183||4228==s||6070==s||6078<=s&&s<=6085||6087<=s&&s<=6088||6435<=s&&s<=6438||6441<=s&&s<=6443||6448<=s&&s<=6449||6451<=s&&s<=6456||6681<=s&&s<=6682||6741==s||6743==s||6765<=s&&s<=6770||6916==s||6965==s||6971==s||6973<=s&&s<=6977||6979<=s&&s<=6980||7042==s||7073==s||7078<=s&&s<=7079||7082==s||7143==s||7146<=s&&s<=7148||7150==s||7154<=s&&s<=7155||7204<=s&&s<=7211||7220<=s&&s<=7221||7393==s||7410<=s&&s<=7411||7415==s||43043<=s&&s<=43044||43047==s||43136<=s&&s<=43137||43188<=s&&s<=43203||43346<=s&&s<=43347||43395==s||43444<=s&&s<=43445||43450<=s&&s<=43451||43453<=s&&s<=43456||43567<=s&&s<=43568||43571<=s&&s<=43572||43597==s||43755==s||43758<=s&&s<=43759||43765==s||44003<=s&&s<=44004||44006<=s&&s<=44007||44009<=s&&s<=44010||44012==s||69632==s||69634==s||69762==s||69808<=s&&s<=69810||69815<=s&&s<=69816||69932==s||70018==s||70067<=s&&s<=70069||70079<=s&&s<=70080||70188<=s&&s<=70190||70194<=s&&s<=70195||70197==s||70368<=s&&s<=70370||70402<=s&&s<=70403||70463==s||70465<=s&&s<=70468||70471<=s&&s<=70472||70475<=s&&s<=70477||70498<=s&&s<=70499||70709<=s&&s<=70711||70720<=s&&s<=70721||70725==s||70833<=s&&s<=70834||70841==s||70843<=s&&s<=70844||70846==s||70849==s||71088<=s&&s<=71089||71096<=s&&s<=71099||71102==s||71216<=s&&s<=71218||71227<=s&&s<=71228||71230==s||71340==s||71342<=s&&s<=71343||71350==s||71456<=s&&s<=71457||71462==s||72199<=s&&s<=72200||72249==s||72279<=s&&s<=72280||72343==s||72751==s||72766==s||72873==s||72881==s||72884==s||94033<=s&&s<=94078||119142==s||119149==s?5:4352<=s&&s<=4447||43360<=s&&s<=43388?6:4448<=s&&s<=4519||55216<=s&&s<=55238?7:4520<=s&&s<=4607||55243<=s&&s<=55291?8:44032==s||44060==s||44088==s||44116==s||44144==s||44172==s||44200==s||44228==s||44256==s||44284==s||44312==s||44340==s||44368==s||44396==s||44424==s||44452==s||44480==s||44508==s||44536==s||44564==s||44592==s||44620==s||44648==s||44676==s||44704==s||44732==s||44760==s||44788==s||44816==s||44844==s||44872==s||44900==s||44928==s||44956==s||44984==s||45012==s||45040==s||45068==s||45096==s||45124==s||45152==s||45180==s||45208==s||45236==s||45264==s||45292==s||45320==s||45348==s||45376==s||45404==s||45432==s||45460==s||45488==s||45516==s||45544==s||45572==s||45600==s||45628==s||45656==s||45684==s||45712==s||45740==s||45768==s||45796==s||45824==s||45852==s||45880==s||45908==s||45936==s||45964==s||45992==s||46020==s||46048==s||46076==s||46104==s||46132==s||46160==s||46188==s||46216==s||46244==s||46272==s||46300==s||46328==s||46356==s||46384==s||46412==s||46440==s||46468==s||46496==s||46524==s||46552==s||46580==s||46608==s||46636==s||46664==s||46692==s||46720==s||46748==s||46776==s||46804==s||46832==s||46860==s||46888==s||46916==s||46944==s||46972==s||47e3==s||47028==s||47056==s||47084==s||47112==s||47140==s||47168==s||47196==s||47224==s||47252==s||47280==s||47308==s||47336==s||47364==s||47392==s||47420==s||47448==s||47476==s||47504==s||47532==s||47560==s||47588==s||47616==s||47644==s||47672==s||47700==s||47728==s||47756==s||47784==s||47812==s||47840==s||47868==s||47896==s||47924==s||47952==s||47980==s||48008==s||48036==s||48064==s||48092==s||48120==s||48148==s||48176==s||48204==s||48232==s||48260==s||48288==s||48316==s||48344==s||48372==s||48400==s||48428==s||48456==s||48484==s||48512==s||48540==s||48568==s||48596==s||48624==s||48652==s||48680==s||48708==s||48736==s||48764==s||48792==s||48820==s||48848==s||48876==s||48904==s||48932==s||48960==s||48988==s||49016==s||49044==s||49072==s||49100==s||49128==s||49156==s||49184==s||49212==s||49240==s||49268==s||49296==s||49324==s||49352==s||49380==s||49408==s||49436==s||49464==s||49492==s||49520==s||49548==s||49576==s||49604==s||49632==s||49660==s||49688==s||49716==s||49744==s||49772==s||49800==s||49828==s||49856==s||49884==s||49912==s||49940==s||49968==s||49996==s||50024==s||50052==s||50080==s||50108==s||50136==s||50164==s||50192==s||50220==s||50248==s||50276==s||50304==s||50332==s||50360==s||50388==s||50416==s||50444==s||50472==s||50500==s||50528==s||50556==s||50584==s||50612==s||50640==s||50668==s||50696==s||50724==s||50752==s||50780==s||50808==s||50836==s||50864==s||50892==s||50920==s||50948==s||50976==s||51004==s||51032==s||51060==s||51088==s||51116==s||51144==s||51172==s||51200==s||51228==s||51256==s||51284==s||51312==s||51340==s||51368==s||51396==s||51424==s||51452==s||51480==s||51508==s||51536==s||51564==s||51592==s||51620==s||51648==s||51676==s||51704==s||51732==s||51760==s||51788==s||51816==s||51844==s||51872==s||51900==s||51928==s||51956==s||51984==s||52012==s||52040==s||52068==s||52096==s||52124==s||52152==s||52180==s||52208==s||52236==s||52264==s||52292==s||52320==s||52348==s||52376==s||52404==s||52432==s||52460==s||52488==s||52516==s||52544==s||52572==s||52600==s||52628==s||52656==s||52684==s||52712==s||52740==s||52768==s||52796==s||52824==s||52852==s||52880==s||52908==s||52936==s||52964==s||52992==s||53020==s||53048==s||53076==s||53104==s||53132==s||53160==s||53188==s||53216==s||53244==s||53272==s||53300==s||53328==s||53356==s||53384==s||53412==s||53440==s||53468==s||53496==s||53524==s||53552==s||53580==s||53608==s||53636==s||53664==s||53692==s||53720==s||53748==s||53776==s||53804==s||53832==s||53860==s||53888==s||53916==s||53944==s||53972==s||54e3==s||54028==s||54056==s||54084==s||54112==s||54140==s||54168==s||54196==s||54224==s||54252==s||54280==s||54308==s||54336==s||54364==s||54392==s||54420==s||54448==s||54476==s||54504==s||54532==s||54560==s||54588==s||54616==s||54644==s||54672==s||54700==s||54728==s||54756==s||54784==s||54812==s||54840==s||54868==s||54896==s||54924==s||54952==s||54980==s||55008==s||55036==s||55064==s||55092==s||55120==s||55148==s||55176==s?9:44033<=s&&s<=44059||44061<=s&&s<=44087||44089<=s&&s<=44115||44117<=s&&s<=44143||44145<=s&&s<=44171||44173<=s&&s<=44199||44201<=s&&s<=44227||44229<=s&&s<=44255||44257<=s&&s<=44283||44285<=s&&s<=44311||44313<=s&&s<=44339||44341<=s&&s<=44367||44369<=s&&s<=44395||44397<=s&&s<=44423||44425<=s&&s<=44451||44453<=s&&s<=44479||44481<=s&&s<=44507||44509<=s&&s<=44535||44537<=s&&s<=44563||44565<=s&&s<=44591||44593<=s&&s<=44619||44621<=s&&s<=44647||44649<=s&&s<=44675||44677<=s&&s<=44703||44705<=s&&s<=44731||44733<=s&&s<=44759||44761<=s&&s<=44787||44789<=s&&s<=44815||44817<=s&&s<=44843||44845<=s&&s<=44871||44873<=s&&s<=44899||44901<=s&&s<=44927||44929<=s&&s<=44955||44957<=s&&s<=44983||44985<=s&&s<=45011||45013<=s&&s<=45039||45041<=s&&s<=45067||45069<=s&&s<=45095||45097<=s&&s<=45123||45125<=s&&s<=45151||45153<=s&&s<=45179||45181<=s&&s<=45207||45209<=s&&s<=45235||45237<=s&&s<=45263||45265<=s&&s<=45291||45293<=s&&s<=45319||45321<=s&&s<=45347||45349<=s&&s<=45375||45377<=s&&s<=45403||45405<=s&&s<=45431||45433<=s&&s<=45459||45461<=s&&s<=45487||45489<=s&&s<=45515||45517<=s&&s<=45543||45545<=s&&s<=45571||45573<=s&&s<=45599||45601<=s&&s<=45627||45629<=s&&s<=45655||45657<=s&&s<=45683||45685<=s&&s<=45711||45713<=s&&s<=45739||45741<=s&&s<=45767||45769<=s&&s<=45795||45797<=s&&s<=45823||45825<=s&&s<=45851||45853<=s&&s<=45879||45881<=s&&s<=45907||45909<=s&&s<=45935||45937<=s&&s<=45963||45965<=s&&s<=45991||45993<=s&&s<=46019||46021<=s&&s<=46047||46049<=s&&s<=46075||46077<=s&&s<=46103||46105<=s&&s<=46131||46133<=s&&s<=46159||46161<=s&&s<=46187||46189<=s&&s<=46215||46217<=s&&s<=46243||46245<=s&&s<=46271||46273<=s&&s<=46299||46301<=s&&s<=46327||46329<=s&&s<=46355||46357<=s&&s<=46383||46385<=s&&s<=46411||46413<=s&&s<=46439||46441<=s&&s<=46467||46469<=s&&s<=46495||46497<=s&&s<=46523||46525<=s&&s<=46551||46553<=s&&s<=46579||46581<=s&&s<=46607||46609<=s&&s<=46635||46637<=s&&s<=46663||46665<=s&&s<=46691||46693<=s&&s<=46719||46721<=s&&s<=46747||46749<=s&&s<=46775||46777<=s&&s<=46803||46805<=s&&s<=46831||46833<=s&&s<=46859||46861<=s&&s<=46887||46889<=s&&s<=46915||46917<=s&&s<=46943||46945<=s&&s<=46971||46973<=s&&s<=46999||47001<=s&&s<=47027||47029<=s&&s<=47055||47057<=s&&s<=47083||47085<=s&&s<=47111||47113<=s&&s<=47139||47141<=s&&s<=47167||47169<=s&&s<=47195||47197<=s&&s<=47223||47225<=s&&s<=47251||47253<=s&&s<=47279||47281<=s&&s<=47307||47309<=s&&s<=47335||47337<=s&&s<=47363||47365<=s&&s<=47391||47393<=s&&s<=47419||47421<=s&&s<=47447||47449<=s&&s<=47475||47477<=s&&s<=47503||47505<=s&&s<=47531||47533<=s&&s<=47559||47561<=s&&s<=47587||47589<=s&&s<=47615||47617<=s&&s<=47643||47645<=s&&s<=47671||47673<=s&&s<=47699||47701<=s&&s<=47727||47729<=s&&s<=47755||47757<=s&&s<=47783||47785<=s&&s<=47811||47813<=s&&s<=47839||47841<=s&&s<=47867||47869<=s&&s<=47895||47897<=s&&s<=47923||47925<=s&&s<=47951||47953<=s&&s<=47979||47981<=s&&s<=48007||48009<=s&&s<=48035||48037<=s&&s<=48063||48065<=s&&s<=48091||48093<=s&&s<=48119||48121<=s&&s<=48147||48149<=s&&s<=48175||48177<=s&&s<=48203||48205<=s&&s<=48231||48233<=s&&s<=48259||48261<=s&&s<=48287||48289<=s&&s<=48315||48317<=s&&s<=48343||48345<=s&&s<=48371||48373<=s&&s<=48399||48401<=s&&s<=48427||48429<=s&&s<=48455||48457<=s&&s<=48483||48485<=s&&s<=48511||48513<=s&&s<=48539||48541<=s&&s<=48567||48569<=s&&s<=48595||48597<=s&&s<=48623||48625<=s&&s<=48651||48653<=s&&s<=48679||48681<=s&&s<=48707||48709<=s&&s<=48735||48737<=s&&s<=48763||48765<=s&&s<=48791||48793<=s&&s<=48819||48821<=s&&s<=48847||48849<=s&&s<=48875||48877<=s&&s<=48903||48905<=s&&s<=48931||48933<=s&&s<=48959||48961<=s&&s<=48987||48989<=s&&s<=49015||49017<=s&&s<=49043||49045<=s&&s<=49071||49073<=s&&s<=49099||49101<=s&&s<=49127||49129<=s&&s<=49155||49157<=s&&s<=49183||49185<=s&&s<=49211||49213<=s&&s<=49239||49241<=s&&s<=49267||49269<=s&&s<=49295||49297<=s&&s<=49323||49325<=s&&s<=49351||49353<=s&&s<=49379||49381<=s&&s<=49407||49409<=s&&s<=49435||49437<=s&&s<=49463||49465<=s&&s<=49491||49493<=s&&s<=49519||49521<=s&&s<=49547||49549<=s&&s<=49575||49577<=s&&s<=49603||49605<=s&&s<=49631||49633<=s&&s<=49659||49661<=s&&s<=49687||49689<=s&&s<=49715||49717<=s&&s<=49743||49745<=s&&s<=49771||49773<=s&&s<=49799||49801<=s&&s<=49827||49829<=s&&s<=49855||49857<=s&&s<=49883||49885<=s&&s<=49911||49913<=s&&s<=49939||49941<=s&&s<=49967||49969<=s&&s<=49995||49997<=s&&s<=50023||50025<=s&&s<=50051||50053<=s&&s<=50079||50081<=s&&s<=50107||50109<=s&&s<=50135||50137<=s&&s<=50163||50165<=s&&s<=50191||50193<=s&&s<=50219||50221<=s&&s<=50247||50249<=s&&s<=50275||50277<=s&&s<=50303||50305<=s&&s<=50331||50333<=s&&s<=50359||50361<=s&&s<=50387||50389<=s&&s<=50415||50417<=s&&s<=50443||50445<=s&&s<=50471||50473<=s&&s<=50499||50501<=s&&s<=50527||50529<=s&&s<=50555||50557<=s&&s<=50583||50585<=s&&s<=50611||50613<=s&&s<=50639||50641<=s&&s<=50667||50669<=s&&s<=50695||50697<=s&&s<=50723||50725<=s&&s<=50751||50753<=s&&s<=50779||50781<=s&&s<=50807||50809<=s&&s<=50835||50837<=s&&s<=50863||50865<=s&&s<=50891||50893<=s&&s<=50919||50921<=s&&s<=50947||50949<=s&&s<=50975||50977<=s&&s<=51003||51005<=s&&s<=51031||51033<=s&&s<=51059||51061<=s&&s<=51087||51089<=s&&s<=51115||51117<=s&&s<=51143||51145<=s&&s<=51171||51173<=s&&s<=51199||51201<=s&&s<=51227||51229<=s&&s<=51255||51257<=s&&s<=51283||51285<=s&&s<=51311||51313<=s&&s<=51339||51341<=s&&s<=51367||51369<=s&&s<=51395||51397<=s&&s<=51423||51425<=s&&s<=51451||51453<=s&&s<=51479||51481<=s&&s<=51507||51509<=s&&s<=51535||51537<=s&&s<=51563||51565<=s&&s<=51591||51593<=s&&s<=51619||51621<=s&&s<=51647||51649<=s&&s<=51675||51677<=s&&s<=51703||51705<=s&&s<=51731||51733<=s&&s<=51759||51761<=s&&s<=51787||51789<=s&&s<=51815||51817<=s&&s<=51843||51845<=s&&s<=51871||51873<=s&&s<=51899||51901<=s&&s<=51927||51929<=s&&s<=51955||51957<=s&&s<=51983||51985<=s&&s<=52011||52013<=s&&s<=52039||52041<=s&&s<=52067||52069<=s&&s<=52095||52097<=s&&s<=52123||52125<=s&&s<=52151||52153<=s&&s<=52179||52181<=s&&s<=52207||52209<=s&&s<=52235||52237<=s&&s<=52263||52265<=s&&s<=52291||52293<=s&&s<=52319||52321<=s&&s<=52347||52349<=s&&s<=52375||52377<=s&&s<=52403||52405<=s&&s<=52431||52433<=s&&s<=52459||52461<=s&&s<=52487||52489<=s&&s<=52515||52517<=s&&s<=52543||52545<=s&&s<=52571||52573<=s&&s<=52599||52601<=s&&s<=52627||52629<=s&&s<=52655||52657<=s&&s<=52683||52685<=s&&s<=52711||52713<=s&&s<=52739||52741<=s&&s<=52767||52769<=s&&s<=52795||52797<=s&&s<=52823||52825<=s&&s<=52851||52853<=s&&s<=52879||52881<=s&&s<=52907||52909<=s&&s<=52935||52937<=s&&s<=52963||52965<=s&&s<=52991||52993<=s&&s<=53019||53021<=s&&s<=53047||53049<=s&&s<=53075||53077<=s&&s<=53103||53105<=s&&s<=53131||53133<=s&&s<=53159||53161<=s&&s<=53187||53189<=s&&s<=53215||53217<=s&&s<=53243||53245<=s&&s<=53271||53273<=s&&s<=53299||53301<=s&&s<=53327||53329<=s&&s<=53355||53357<=s&&s<=53383||53385<=s&&s<=53411||53413<=s&&s<=53439||53441<=s&&s<=53467||53469<=s&&s<=53495||53497<=s&&s<=53523||53525<=s&&s<=53551||53553<=s&&s<=53579||53581<=s&&s<=53607||53609<=s&&s<=53635||53637<=s&&s<=53663||53665<=s&&s<=53691||53693<=s&&s<=53719||53721<=s&&s<=53747||53749<=s&&s<=53775||53777<=s&&s<=53803||53805<=s&&s<=53831||53833<=s&&s<=53859||53861<=s&&s<=53887||53889<=s&&s<=53915||53917<=s&&s<=53943||53945<=s&&s<=53971||53973<=s&&s<=53999||54001<=s&&s<=54027||54029<=s&&s<=54055||54057<=s&&s<=54083||54085<=s&&s<=54111||54113<=s&&s<=54139||54141<=s&&s<=54167||54169<=s&&s<=54195||54197<=s&&s<=54223||54225<=s&&s<=54251||54253<=s&&s<=54279||54281<=s&&s<=54307||54309<=s&&s<=54335||54337<=s&&s<=54363||54365<=s&&s<=54391||54393<=s&&s<=54419||54421<=s&&s<=54447||54449<=s&&s<=54475||54477<=s&&s<=54503||54505<=s&&s<=54531||54533<=s&&s<=54559||54561<=s&&s<=54587||54589<=s&&s<=54615||54617<=s&&s<=54643||54645<=s&&s<=54671||54673<=s&&s<=54699||54701<=s&&s<=54727||54729<=s&&s<=54755||54757<=s&&s<=54783||54785<=s&&s<=54811||54813<=s&&s<=54839||54841<=s&&s<=54867||54869<=s&&s<=54895||54897<=s&&s<=54923||54925<=s&&s<=54951||54953<=s&&s<=54979||54981<=s&&s<=55007||55009<=s&&s<=55035||55037<=s&&s<=55063||55065<=s&&s<=55091||55093<=s&&s<=55119||55121<=s&&s<=55147||55149<=s&&s<=55175||55177<=s&&s<=55203?10:9757==s||9977==s||9994<=s&&s<=9997||127877==s||127938<=s&&s<=127940||127943==s||127946<=s&&s<=127948||128066<=s&&s<=128067||128070<=s&&s<=128080||128110==s||128112<=s&&s<=128120||128124==s||128129<=s&&s<=128131||128133<=s&&s<=128135||128170==s||128372<=s&&s<=128373||128378==s||128400==s||128405<=s&&s<=128406||128581<=s&&s<=128583||128587<=s&&s<=128591||128675==s||128692<=s&&s<=128694||128704==s||128716==s||129304<=s&&s<=129308||129310<=s&&s<=129311||129318==s||129328<=s&&s<=129337||129341<=s&&s<=129342||129489<=s&&s<=129501?r:127995<=s&&s<=127999?14:8205==s?15:9792==s||9794==s||9877<=s&&s<=9878||9992==s||10084==s||127752==s||127806==s||127859==s||127891==s||127908==s||127912==s||127979==s||127981==s||128139==s||128187<=s&&s<=128188||128295==s||128300==s||128488==s||128640==s||128658==s?o:128102<=s&&s<=128105?i:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var n=c(a(e,t)),r=[],o=t+1;o=o)return t.substr(0,o);for(;o>t.length&&r>1;)1&r&&(t+=n),r>>=1,n+=n;return t=(t+=n).substr(0,o)}var o=function(e,t,n){if(null==e||null==t)return e;var r=String(e),o="number"==typeof t?t:parseInt(t,10);if(isNaN(o)||!isFinite(o))return r;var i=r.length;if(i>=o)return r;var s=null==n?"":String(n);""===s&&(s=" ");for(var a=o-i;s.lengtha?s.substr(0,a):s)+r},i=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},p=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r at "+n.filter(Boolean).join(":")},f=0,d=1,m=2,y=3,h=4,b=5,g=6,v=7,O=8,j=9,x=10,T={"{":f,"}":d,"[":m,"]":y,":":h,",":b},P={true:O,false:j,null:x},A=0,E=1,S=2,w={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},C=0,N=1,$=2,I=3,R=4,_=5,K=6,M=7;function k(e){return e>="1"&&e<="9"}function J(e){return e>="0"&&e<="9"}function L(e){return J(e)||e>="a"&&e<="f"||e>="A"&&e<="F"}function q(e){return"e"===e||"E"===e}function U(e,t,n,r){var o=e.charAt(t);if("\r"===o)t++,n++,r=1,"\n"===e.charAt(t)&&t++;else if("\n"===o)t++,n++,r=1;else{if("\t"!==o&&" "!==o)return null;t++,r++}return{index:t,line:n,column:r}}function B(e,t,n,r){var o=e.charAt(t);return o in T?{type:T[o],line:n,column:r+1,index:t+1,value:null}:null}function F(e,t,n,r){for(var o in P)if(P.hasOwnProperty(o)&&e.substr(t,o.length)===o)return{type:P[o],line:n,column:r+o.length,index:t+o.length,value:o};return null}function D(e,t,n,r){for(var o=t,i=A;t0?{type:v,line:n,column:r+i-o,index:i,value:e.slice(o,i)}:null}var V=0,z=1,Q=2,G=3,Y=0,Z=1,H=2,X=0,ee=1,te=2,ne=3,re={loc:!0,source:null};function oe(e,t,n){var r=t.length>0?t[t.length-1].loc.end:{line:1,column:1};l(c(),e,n.source,r.line,r.column)}function ie(e){for(var t=0,n=0;n<4;n++)t=16*t+parseInt(e[n],16);return String.fromCharCode(t)}var se={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},ae=['"',"\\","/"];function le(e){for(var t="",n=0;ne),i=e=>`${(e=>"."+o.slice(0,e).join("."))(e)} [query: ${o.join(".")}]`,{loc:s}=o.reduce((e,t,r)=>"Object"===e.type?(()=>{const s=e.children.find(e=>e.key.value===t);if(!s)throw new Error(`No such property ${t} in ${i(r)}`);const{key:a,value:l}=s;return n&&r===o.length-1?a:l})():"Array"===e.type?(()=>{const n=Number(t);if(isNaN(n))throw new Error(`Invalid non-numeric array index "${t}" in array at ${i(r)}`);if(n<0||n>=e.children.length)throw new RangeError(`Index ${n} out-of-bounds in array of size ${e.children.length} at ${i(r)}`);return e.children,e.children[Number(t)]})():e,r);return{start:null==s?void 0:s.start,end:null==s?void 0:s.end}}},{}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAstByObject=n.getAstByString=void 0;const r=e("json-to-ast");function o(e,t){const n=r(e,{loc:!0});return{json:t||JSON.parse(e),jsonString:e,jsonAST:n}}n.getAstByString=o,n.getAstByObject=function(e,t=4){return o(JSON.stringify(e,null,t))}},{"json-to-ast":24}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("core-types-json-schema"),o=e("./utils/sharedUtils"),i=e("./utils/constants"),s=e("./utils/nosqlUtils"),a=e("./utils/constants-nosql");Draw.loadPlugin(function(e){const t=document.createElement("div");t.style.userSelect="none",t.style.overflow="hidden",t.style.padding="10px",t.style.height="100%";const n=document.createElement("textarea");n.style.height="200px",n.style.width="100%";const l="-- click a nosql type button";n.value=l,mxUtils.br(t),t.appendChild(n);const c=e.menus.get("exportAs");let u="tonosql=To NoSQL";c&&!window.VsCodeApi||(u="tonosql=Export As NoSQL"),mxResources.parse(u);const p=new mxWindow(mxResources.get("tonosql"),t,document.body.offsetWidth-480,140,320,320,!0,!0);p.destroyOnClose=!1,p.setMaximizable(!1),p.setResizable(!1),p.setClosable(!0),mxUtils.br(t);const f=mxUtils.button(mxResources.get("reset"),function(){n.value=l});f.style.marginTop="8px",f.style.marginRight="4px",f.style.padding="4px",t.appendChild(f);const d=mxUtils.button("OpenAPI",function(){!function(t){const r=(0,o.getMermaidDiagramDb)(e,t),i=(0,s.dbToOpenApi)(r);let a="";if("openapi"!=t)throw new Error(`type:${t} is not supported`);a=JSON.stringify(i,null,2),n.value=a}("openapi")});d.style.marginTop="8px",d.style.padding="4px",t.appendChild(d),e.actions.addAction("tonosql",function(){p.setVisible(!p.isVisible()),p.isVisible()&&n.focus()});let m=[],y=[],h=[],b=[],g=null,v=null,O=0,j=0;const x=document.createElement("div");x.style.userSelect="none",x.style.overflow="hidden",x.style.padding="10px",x.style.height="100%";const T=document.createElement("textarea");T.style.height="200px",T.style.width="100%",T.value=a.defaultResetOpenApi,mxUtils.br(x),x.appendChild(T),mxResources.parse("fromNoSql=From NoSQL");const P=new mxWindow(mxResources.get("fromNoSql"),x,document.body.offsetWidth-480,140,320,320,!0,!0);P.destroyOnClose=!1,P.setMaximizable(!1),P.setResizable(!1),P.setClosable(!0),mxUtils.br(x);const A=mxUtils.button("Reset OpenAPI",function(){T.value=a.defaultResetOpenApi});A.style.marginTop="8px",A.style.marginRight="4px",A.style.padding="4px",x.appendChild(A);const E=mxUtils.button("Insert OpenAPI",function(){!function(t,n){var a;b=[],g=null,v=null;try{let l=null;const c={title:"nosql default options",version:i.pluginVersion};if("openapi"!=n)throw new Error(`type:${n} is not supported`);{const e=JSON.parse(t),{data:n}=(0,r.convertOpenApiToCoreTypes)(e),{data:o}=(0,r.convertCoreTypesToJsonSchema)(n);(0,r.jsonSchemaDocumentToOpenApi)(o,c),l=e}const u=null===(a=null==l?void 0:l.components)||void 0===a?void 0:a.schemas;if(u){const t=(0,s.ConvertOpenApiToDatabaseModel)(u);m=t.ForeignKeyList,y=t.PrimaryKeyList,h=t.TableList,j=h.length;const r=(0,o.CreateTableUI)(e,P,h,b,v,g,m,O,n);r&&(b=r.cells,O=r.dx,g=r.tableCell,v=r.rowCell)}}catch(e){console.log(`unable to serialize the response:${n}`),console.log(e)}}(T.value,"openapi")});E.style.marginTop="8px",E.style.padding="4px",x.appendChild(E),e.actions.addAction("fromNoSql",function(){P.setVisible(!P.isVisible()),P.isVisible()&&T.focus()});const S=e.menus.get("insert");if(S){const t=S.funct;S.funct=function(...n){const[r,o]=n;t.apply(this,n),e.menus.addMenuItems(r,["fromNoSql"],o)}}if(c&&!window.VsCodeApi){const t=c.funct;c.funct=function(...n){const[r,o]=n;t.apply(this,n),e.menus.addMenuItems(r,["tonosql"],o)}}else{const t=e.menus.get("file");if(t&&t.enabled){const n=t.funct;t.funct=function(...t){const[r,o]=t;n.apply(this,t),e.menus.addMenuItems(r,["tonosql"],o)}}}})},{"./utils/constants":30,"./utils/constants-nosql":29,"./utils/nosqlUtils":31,"./utils/sharedUtils":32,"core-types-json-schema":1}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validJSONSchemaTypes=n.defaultResetOpenApi=n.defaultReset=void 0;const r=e("./constants");n.defaultReset=`/*\n\tDrawio default value\n\tPlugin: nosql\n\tVersion: ${r.pluginVersion}\n*/\n\n\nexport interface WeatherForecast {\n /** @format date-time */\n date?: string;\n /** @format int32 */\n temperatureC?: number;\n /** @format int32 */\n temperatureF?: number;\n summary?: string | null;\n nestedProp: string[];\n children?: Child[];\n}\n\nexport interface Child {\n name: string\n}\n `,n.defaultResetOpenApi=`\n{\n "openapi": "3.0.0",\n "info": {\n "title": "nosql plugin sample",\n "version": "${r.pluginVersion}",\n "x-comment": "Generated by core-types-json-schema (https://github.com/grantila/core-types-json-schema)"\n },\n "paths": {},\n "components": {\n "schemas": {\n "WeatherForecast": {\n "properties": {\n "date": {\n "title": "WeatherForecast.date",\n "description": "@format date-time",\n "type": "string"\n },\n "temperatureC": {\n "title": "WeatherForecast.temperatureC",\n "description": "@format int32",\n "type": "number"\n },\n "temperatureF": {\n "title": "WeatherForecast.temperatureF",\n "description": "@format int32",\n "type": "number"\n },\n "summary": {\n "title": "WeatherForecast.summary",\n "nullable": true,\n "type": "string"\n },\n "nestedProp": {\n "items": {\n "title": "WeatherForecast.nestedProp.[]",\n "type": "string"\n },\n "title": "WeatherForecast.nestedProp",\n "type": "array"\n },\n "child": {\n "$ref": "#/components/schemas/Child",\n "title": "WeatherForecast.child"\n }\n },\n "required": [\n "nestedProp"\n ],\n "additionalProperties": false,\n "title": "WeatherForecast",\n "type": "object"\n },\n "Child": {\n "properties": {\n "name": {\n "title": "Child.name",\n "type": "string"\n }\n },\n "required": [\n "name"\n ],\n "additionalProperties": false,\n "title": "Child",\n "type": "object"\n }\n }\n }\n}\n `;n.validJSONSchemaTypes=["string","number","integer","boolean","object","array","null","any"]},{"./constants":30}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.objectKeyword=n.arrayKeyword=n.nullableKeyword=n.enumKeyword=n.formatKeyword=n.commentColumnQuantifiers=n.pluginVersion=void 0,n.pluginVersion="0.0.7",n.commentColumnQuantifiers={Start:"/**",End:"*/"},n.formatKeyword="@format",n.enumKeyword="enum",n.nullableKeyword="nullable",n.arrayKeyword="array",n.objectKeyword="object"},{}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dbToOpenApi=function(e){var t,n,s,a,l,c;const u={openapi:"3.0.0",info:{title:"drawio nosql export",version:r.pluginVersion,"x-comment":"Generated by from drawio uml using plugin nosql"},paths:{},components:{schemas:{}}},p={},f=e.getEntities();for(const u in f)if(Object.prototype.hasOwnProperty.call(f,u)){let d=u;const m=f[u];let y=(0,o.getCommentIndexes)(u),h="",b="";if(y.start>-1&&y.end>-1){let e=d.toString().trim();y=(0,o.getCommentIndexes)(e);const t=y.start,n=y.end;if(d=e.substring(0,y.beforeStart).trim(),e=e.substring(t,n).trim(),-1!==e.indexOf(r.formatKeyword)){const t=e.indexOf(r.formatKeyword);b=e.substring(t+r.formatKeyword.length).trim(),e=e.substring(0,t)}e&&(h=e)}if(p[d])continue;p[d]={type:r.objectKeyword,title:d,additionalProperties:!1,properties:{}},h&&(p[d].description=h.trim()),b&&(p[d].format=b.trim());for(let f=0;fe.entityA==u),i=`[${u}.${h}]`,a=n.find(e=>-1!=e.roleA.indexOf(i));if(a){const e=(0,o.getCommentIndexes)(a.entityB);t=`#/components/schemas/${a.entityB.substring(0,e.beforeStart).trim()}`}t&&("array"==g&&(r={$ref:t}),"object"==g&&(s={$ref:t}))}const a={title:`${d}.${h}`,type:g};s&&(a.additionalProperties=s),r&&(a.items=r),(null===(c=y.attributeType)||void 0===c?void 0:c.includes("nullable"))&&(a.nullable=!0),!t||(null==s?void 0:s.$ref)||(null==r?void 0:r.$ref)||(a.$ref=t),n&&delete a.type,v.trim()&&!t&&(a.description=v.trim()),O.trim()&&(a.items?a.items.format=O.trim():a.format=O.trim()),p[d].properties[y.attributeName]=a}}0===Object.keys(p[d].properties).length&&delete p[d].properties}return u.components.schemas=p,u},n.GeneratePropertyModel=s,n.ConvertOpenApiToDatabaseModel=function(e){var t,n,i,a,l,c;const u={Dialect:"nosql",TableList:[],PrimaryKeyList:[],ForeignKeyList:[]},p={};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const a=e[i],l=(0,o.dbTypeEnds)(i),c={Name:(0,o.dbTypeEnds)(i),Properties:[]};if(a.enum){const e=a.enum,t=`${a.type} ${r.enumKeyword}`,n={enum:e};a.description&&(n.description=a.description),a.format&&(n.format=a.format);const o=s(i,t,n);c.Properties.push(o)}else{const e=(0,o.generateComment)(a.description,a.format);e&&(c.Name+=` ${e}`)}for(const i in a.properties)if(Object.prototype.hasOwnProperty.call(a.properties,i)){const l=a.properties[i];let p=null;if(l.$ref?p=l.$ref.split("/").pop():l.items&&typeof l.items==r.objectKeyword?p=null===(t=l.items.$ref)||void 0===t?void 0:t.split("/").pop():l.additionalProperties&&"object"==typeof l.additionalProperties&&(p=null===(n=l.additionalProperties.$ref)||void 0===n?void 0:n.split("/").pop()),p){const t=e[p];if(t&&!t.enum){const e=(0,o.generateComment)(t.description,t.format);p=e?`${(0,o.dbTypeEnds)(p)} ${e}`:(0,o.dbTypeEnds)(p)}else p=(0,o.dbTypeEnds)(p)}p&&!l.type&&(l.type=p);const f=s(c.Name,i,l);if(p){const e={PrimaryKeyTableName:c.Name,ReferencesTableName:p,PrimaryKeyName:(0,o.dbTypeEnds)(i),ReferencesPropertyName:"",IsDestination:!1},t={ReferencesTableName:c.Name,PrimaryKeyTableName:p,ReferencesPropertyName:(0,o.dbTypeEnds)(i),PrimaryKeyName:"",IsDestination:!0};u.ForeignKeyList.push(t),u.ForeignKeyList.push(e),f.IsForeignKey=!0}c.Properties.push(f)}u.TableList.push(c),p[l]||(p[l]=c)}for(let e=0;ee.Name==t.ReferencesTableName))||void 0===i?void 0:i.Properties[0];n||(n=null===(a=p[t.ReferencesTableName])||void 0===a?void 0:a.Properties[0]),n&&(u.ForeignKeyList[e].ReferencesPropertyName=n.Name)}if(!t.PrimaryKeyName){let n=null===(l=u.TableList.find(e=>e.Name==t.PrimaryKeyTableName))||void 0===l?void 0:l.Properties[0];n||(n=null===(c=p[t.PrimaryKeyTableName])||void 0===c?void 0:c.Properties[0]),n&&(u.ForeignKeyList[e].PrimaryKeyName=n.Name)}}return u};const r=e("./constants"),o=e("./sharedUtils"),i=e("./constants-nosql");function s(e,t,n){var i;let s=(null!==(i=n.type)&&void 0!==i?i:r.objectKeyword).toString();s===r.arrayKeyword&&n.items&&typeof n.items===r.objectKeyword&&(n.items.format&&!n.format&&(n.format=n.items.format),n.items.type&&(s=`${n.items.type}[]`)),n.enum?s=`${JSON.stringify(n.enum)}`:n.nullable&&(s+=` ${r.nullableKeyword}`);const a=(0,o.generateComment)(n.description,n.format);a&&(s+=` ${a}`);return{Name:(0,o.dbTypeEnds)(t),IsPrimaryKey:!1,IsForeignKey:!1,ColumnProperties:s,TableName:(0,o.dbTypeEnds)(e),ForeignKey:[]}}},{"./constants":30,"./constants-nosql":29,"./sharedUtils":32}],32:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GetColumnQuantifiers=o,n.removeHtml=i,n.dbTypeEnds=function(e){return`\`${e}\``},n.RemoveNameQuantifiers=s,n.getDbLabel=a,n.entityName=function(e,t){let n="";e&&(n+=`${e}`);t&&(n+=` ${r.formatKeyword} ${t}`);n&&(n=n.trim(),n=`/** ${n} */`);return n},n.getCommentIndexes=l,n.getMermaidDiagramDb=function(e,t){const n=e.editor.graph.getModel(),p={},f=[];for(const e in n.cells)if(Object.hasOwnProperty.call(n.cells,e)){const c=n.cells[e];if(-1!==c.mxObjectId.indexOf("mxCell")&&c.style&&(c.style.trim().startsWith("swimlane;")||c.style.trim().startsWith("shape=table;"))){let e=i(c.value.toString()),n="",d="";if((null==e?void 0:e.includes(r.commentColumnQuantifiers.Start))&&(null==e?void 0:e.includes(r.commentColumnQuantifiers.End))){let t=e.toString();const o=l(t),i=o.start,s=o.end;if(e=t.substring(0,o.beforeStart),t=t.substring(i,s),-1!==t.indexOf(r.formatKeyword)){const e=t.indexOf(r.formatKeyword);d=t.substring(e+r.formatKeyword.length).trim(),t=t.substring(0,e)}t&&(n=t)}const m={name:s(e),attributes:[]},y=u(n,d);y&&(m.name+=` ${y}`),console.log("Table: ",m.name);const h=o(t);for(let e=0;e-1!==["FK","PK"].findIndex(t=>t==e.value.toUpperCase())||-1!=e.value.toUpperCase().indexOf("PK,"));n&&(e.attributeKeyType=n.value,"PK"!=e.attributeKeyType&&-1!=e.attributeKeyType.indexOf("PK")&&(e.attributeKeyType="PK"))}catch(e){console.error("PK check caught exception "+e)}if(m.attributes.push(e),t.edges&&t.edges.length){console.log(t.edges.length,"edges");for(let e=0;e-1!=t.toLocaleLowerCase().indexOf(e)),d=o&&-1!=i.findIndex(e=>-1!=o.toLocaleLowerCase().indexOf(e));if(!d&&!c||d&&c){if(d&&c){let e=n.source.value;n.source.style.trim().startsWith("shape=tableRow")&&(e=n.source.children[1].value);const t=a(e,h);t.attributeKeyType="PK",e=t.attributeName;const r=s(n.source.parent.value);let o=n.target.value;n.target.style.trim().startsWith("shape=tableRow")&&(o=n.target.children[1].value);const i=a(o,h);i.attributeKeyType="PK",o=i.attributeName;const l=s(n.target.parent.value),c={name:s(r)+"_"+s(l),attributes:[t,i]};p[c.name]||(p[c.name]=c);const u={entityA:r,entityB:c.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${r}.${e}] to [${c.name}.${e}]`};let d=f.findIndex(e=>e.entityA==u.entityA&&e.entityB==u.entityB&&e.roleA==u.roleA);-1==d&&f.push(u);const m={entityA:l,entityB:c.name,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:`[${l}.${o}] to [${c.name}.${o}]`};d=f.findIndex(e=>e.entityA==m.entityA&&e.entityB==m.entityB&&e.roleA==m.roleA),-1==d&&f.push(m)}}else{console.log("Source: ",n.source.id,n.source.value);let e=n.source.value;n.source.style.trim().startsWith("shape=tableRow")&&(e=n.source.children[1].value);e=a(e,h).attributeName;let t=n.source.parent.value,r=l(t);if(-1!=r.start&&-1!=r.end){const e=t.substring(r.start,r.end).trim();t=t.substring(0,r.beforeStart).trim(),t=`${s(t)} ${u(e)}`}else t=s(t);console.log("Target: ",n.target.id,n.target.value);let o=n.target.value;n.target.style.trim().startsWith("shape=tableRow")&&(o=n.target.children[1].value);o=a(o,h).attributeName;let i=n.target.parent.value;if(r=l(i),-1!=r.start&&-1!=r.end){const e=i.substring(r.start,r.end).trim();i=i.substring(0,r.beforeStart).trim(),i=`${s(i)} ${u(e)}`}else i=s(i);const p={entityA:c?t:i,entityB:c?i:t,relSpec:{cardA:"ZERO_OR_MORE",cardB:"ONLY_ONE",relType:"IDENTIFYING"},roleA:c?`[${t}.${e}] to [${i}.${o}]`:`[${i}.${o}] to [${t}.${e}]`};-1==f.findIndex(e=>e.entityA==p.entityA&&e.entityB==p.entityB&&e.roleA==p.roleA)&&f.push(p)}}}}}}if(p[m.name]){let e=2;for(;p[m.name+e.toString()];)e++;p[m.name+e.toString()]=m}else p[m.name]=m}}return c(p,f)},n.GenerateDatabaseModel=c,n.generateComment=u,n.CreateTableUI=function(e,t,n,r,i,l,c,u,p){if(n.forEach(function(t){const n=100+t.Name.length;if((l=new mxCell(t.Name,new mxGeometry(u,0,n,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=default;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=default;align=center;")).vertex=!0,i){const t=e.editor.graph.getPreferredSizeForCell(i);null!==t&&(l.geometry.width=t.width+n)}r.push(l),t.Properties.forEach(function(n){const r=function(e,t,n,r,o){const i=t.Name+(t.ColumnProperties?" "+t.ColumnProperties:"");r=new mxCell(i,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=64;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"),r.vertex=!0;const s=t.IsPrimaryKey&&t.IsForeignKey?"PK | FK":t.IsPrimaryKey?"PK":t.IsForeignKey?"FK":"",a=sb.cloneCell(r,s);a.connectable=!1,a.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=180;points=[];portConstraint=eastwest;part=1;",a.geometry.width=54,a.geometry.height=26,r.insert(a);const l=e.editor.graph.getPreferredSizeForCell(r);o&&(null!==l&&o.geometry.width0){const t=e.editor.graph,n=t.view,i=t.getGraphBounds(),l=Math.ceil(Math.max(0,i.x/n.scale-n.translate.x)+4*t.gridSize),u=Math.ceil(Math.max(0,(i.y+i.height)/n.scale-n.translate.y)+4*t.gridSize);t.setSelectionCells(t.importCells(r,l,u));const f=t.getModel(),d=o(p),m=mxUtils.bind(this,function(e,n,r){t.insertEdge(null,null,"",r.invert?n:e,r.invert?e:n,"edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;")});c.forEach(function(e){if(e.IsDestination&&e.PrimaryKeyName&&e.ReferencesPropertyName&&e.PrimaryKeyTableName&&e.ReferencesTableName){const t={invert:!0};let n=null,r=null;for(const t in f.cells){if(n&&r)break;if(Object.hasOwnProperty.call(f.cells,t)){const o=f.cells[t];if(o.style&&o.style.trim().startsWith("swimlane;")){const t={name:o.value,attributes:[]},i=t.name==e.PrimaryKeyTableName,l=t.name==e.ReferencesTableName;if(i||l)for(let t=0;t1&&(c=l.slice(1).join(" "));return{attributeName:a,attributeType:o,attributeComment:c}}function l(e){let t=!1;-1!==e.indexOf(r.commentColumnQuantifiers.Start)&&-1!==e.indexOf(r.commentColumnQuantifiers.End)&&(t=!0);return{beforeStart:t?e.indexOf(r.commentColumnQuantifiers.Start):-1,start:t?e.indexOf(r.commentColumnQuantifiers.Start)+r.commentColumnQuantifiers.Start.length:-1,end:t?e.indexOf(r.commentColumnQuantifiers.End)-1:-1}}function c(e,t){const n=new class{constructor(e,t){this.entities=e,this.relationships=t}getEntities(){return this.entities}getRelationships(){return this.relationships}}(e,t);return n}function u(e,t){let n="";return e&&(n+=`${e}`),t&&(n+=` ${r.formatKeyword} ${t}`),n&&(n=n.trim(),n=`${r.commentColumnQuantifiers.Start} ${n} ${r.commentColumnQuantifiers.End}`),n}},{"./constants":30}]},{},[28]); \ No newline at end of file diff --git a/dist/sql.js b/dist/sql.js index 39135bb..dd3d4eb 100644 --- a/dist/sql.js +++ b/dist/sql.js @@ -1,7 +1,7 @@ /** * File: sql.js * Version: 0.0.7 - * Generated: 2025-10-24 + * Generated: 2026-01-21 */ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 1) { attributeComment = attributesTypes.slice(1).join(' '); - attributeType = attributesTypes[0]; } const attribute = { attributeName, @@ -1295,12 +1298,17 @@ function getMermaidDiagramDb(ui, type) { // TODO: support for ts and openapi enum // build models // fix fk for comments + // + // Loop through cells in the model for (const key in model.cells) { if (Object.hasOwnProperty.call(model.cells, key)) { const mxcell = model.cells[key]; if (mxcell.mxObjectId.indexOf("mxCell") !== -1) { - if (mxcell.style && mxcell.style.trim().startsWith("swimlane;")) { - let entityName = mxcell.value.toString(); + // See if this is a swimlane (list/entity) or a table. + // If so, treat it as a table in the DB + if (mxcell.style && (mxcell.style.trim().startsWith("swimlane;") + || mxcell.style.trim().startsWith("shape=table;"))) { + let entityName = removeHtml(mxcell.value.toString()); let description = ""; let formatValue = ""; if ((entityName === null || entityName === void 0 ? void 0 : entityName.includes(constants_1.commentColumnQuantifiers.Start)) && @@ -1331,36 +1339,59 @@ function getMermaidDiagramDb(ui, type) { if (comment) { entity.name += ` ${comment}`; } + console.log("Table: ", entity.name); + // Iterate over the children of this cell; treat them as possible columns in the DB table + // + // Get row attributes + const columnQuantifiers = GetColumnQuantifiers(type); // const comment = for (let c = 0; c < mxcell.children.length; c++) { const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if (col.style && - col.style.trim().startsWith("shape=partialRectangle")) { - const columnQuantifiers = GetColumnQuantifiers(type); + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow") || + col.style.trim().startsWith("text")) // List entry + ) { //Get delimiter of column name //Get full name - const attribute = getDbLabel(col.value, columnQuantifiers); - const attributeKeyType = col.children.find((x) => ["FK", "PK"].findIndex((k) => k == x.value.toUpperCase()) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1); - if (attributeKeyType) { - attribute.attributeKeyType = attributeKeyType.value; - if (attribute.attributeKeyType != "PK" && - attribute.attributeKeyType.indexOf("PK") != -1) { - attribute.attributeKeyType = "PK"; + let attribute; + if (col.style.trim().startsWith("shape=tableRow")) { + attribute = getDbLabel(col.children[1].value, columnQuantifiers); + } + else { + attribute = getDbLabel(col.value, columnQuantifiers); + } + console.log("Column: ", attribute.attributeName); + // check for Primary Key attribute + if (col.children && col.children.length) { + try { + // Check for Primary Key or Foreign Key attribute + const attributeKeyType = col.children.find((x) => ["FK", "PK"].findIndex((k) => k == x.value.toUpperCase()) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1); + if (attributeKeyType) { + attribute.attributeKeyType = attributeKeyType.value; + if (attribute.attributeKeyType != "PK" && + attribute.attributeKeyType.indexOf("PK") != -1) { + attribute.attributeKeyType = "PK"; + } + } + } + catch (e) { + console.error("PK check caught exception " + e); } } entity.attributes.push(attribute); if (col.edges && col.edges.length) { + console.log(col.edges.length, "edges"); // check for edges foreign keys for (let e = 0; e < col.edges.length; e++) { const edge = col.edges[e]; + console.log("source=", edge.source, " target=", edge.target); if (edge.mxObjectId.indexOf("mxCell") !== -1) { if (edge.style && edge.style.indexOf("endArrow=") != -1 && edge.source && - edge.source.value && - edge.target && - edge.target.value) { + edge.target) { // need to check if end is open or certain value to determin relationship type // extract endArrow txt // check if both match and contain many or open @@ -1392,7 +1423,11 @@ function getMermaidDiagramDb(ui, type) { // has to be one to many and not one to one if ((targetIsPrimary || sourceIsPrimary) && !(targetIsPrimary && sourceIsPrimary)) { + console.log("Source: ", edge.source.id, edge.source.value); let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel(sourceId, columnQuantifiers); sourceId = sourceAttr.attributeName; let sourceEntity = edge.source.parent.value; @@ -1411,7 +1446,11 @@ function getMermaidDiagramDb(ui, type) { else { sourceEntity = RemoveNameQuantifiers(sourceEntity); } + console.log("Target: ", edge.target.id, edge.target.value); let targetId = edge.target.value; + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } const targetAttr = getDbLabel(targetId, columnQuantifiers); targetId = targetAttr.attributeName; let targetEntity = edge.target.parent.value; @@ -1462,15 +1501,23 @@ function getMermaidDiagramDb(ui, type) { else if (targetIsPrimary && sourceIsPrimary) { // add a new many to many table let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel(sourceId, columnQuantifiers); sourceAttr.attributeKeyType = "PK"; sourceId = sourceAttr.attributeName; - const sourceEntity = RemoveNameQuantifiers(edge.source.parent.value); + let sourceParent = edge.source.parent; + const sourceEntity = RemoveNameQuantifiers(sourceParent.value); let targetId = edge.target.value; + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } const targetAttr = getDbLabel(targetId, columnQuantifiers); targetAttr.attributeKeyType = "PK"; targetId = targetAttr.attributeName; - const targetEntity = RemoveNameQuantifiers(edge.target.parent.value); + let targetParent = edge.target.parent; + const targetEntity = RemoveNameQuantifiers(targetParent.value); const compositeEntity = { name: RemoveNameQuantifiers(sourceEntity) + "_" + @@ -1681,8 +1728,13 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if (col.style && - col.style.trim().startsWith("shape=partialRectangle")) { - const attribute = getDbLabel(col.value, columnQuantifiers); + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow"))) { + let colValue = col.value; + if (col.style.trim().startsWith("shape=tableRow")) { + colValue = col.children[1].value; + } + const attribute = getDbLabel(colValue, columnQuantifiers); if (isPrimaryTable && RemoveNameQuantifiers(attribute.attributeName) == RemoveNameQuantifiers(fk.PrimaryKeyName)) { targetCell = col; diff --git a/src/utils/sharedUtils.ts b/src/utils/sharedUtils.ts index 18f5d12..2d8e65a 100644 --- a/src/utils/sharedUtils.ts +++ b/src/utils/sharedUtils.ts @@ -87,7 +87,7 @@ export function getDbLabel( label: string, columnQuantifiers: ColumnQuantifiers ): TableAttribute { - let result = removeHtml(label); + let result = removeHtml(label) + " "; // fix duplicate spaces and different space chars result = result.toString().replace(/\s+/g, " "); const firstSpaceIndex = @@ -99,11 +99,14 @@ export function getDbLabel( const attributeName = RemoveNameQuantifiers( result.substring(0, firstSpaceIndex + 1) ); - const attributesTypes = attributeType.split(" "); + let attributesTypes = attributeType.split(" "); let attributeComment: string | null = null; + attributeType = attributesTypes[0]; + if (attributeType === "") { + attributeType = "NONE"; + } if (attributesTypes.length > 1) { attributeComment = attributesTypes.slice(1).join(' '); - attributeType = attributesTypes[0]; } const attribute = { @@ -154,6 +157,7 @@ export function getCommentIndexes(result: string) { end: lastSpaceIndex, }; } + /** * generate db from drawio graph models * @param ui @@ -179,12 +183,18 @@ export function getMermaidDiagramDb( // TODO: support for ts and openapi enum // build models // fix fk for comments + // + // Loop through cells in the model for (const key in model.cells) { if (Object.hasOwnProperty.call(model.cells, key)) { const mxcell = model.cells[key]; if (mxcell.mxObjectId.indexOf("mxCell") !== -1) { - if (mxcell.style && mxcell.style.trim().startsWith("swimlane;")) { - let entityName = mxcell.value.toString(); + // See if this is a swimlane (list/entity) or a table. + // If so, treat it as a table in the DB + if (mxcell.style && (mxcell.style.trim().startsWith("swimlane;") + || mxcell.style.trim().startsWith("shape=table;")) + ) { + let entityName = removeHtml(mxcell.value.toString()); let description = ""; let formatValue = ""; if ( @@ -218,46 +228,68 @@ export function getMermaidDiagramDb( if (comment) { entity.name += ` ${comment}`; } + console.log("Table: ", entity.name); + // Iterate over the children of this cell; treat them as possible columns in the DB table + // + // Get row attributes + const columnQuantifiers = GetColumnQuantifiers(type); // const comment = for (let c = 0; c < mxcell.children.length; c++) { const col = mxcell.children[c]; if (col.mxObjectId.indexOf("mxCell") !== -1) { if ( col.style && - col.style.trim().startsWith("shape=partialRectangle") + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow") || + col.style.trim().startsWith("text")) // List entry ) { - const columnQuantifiers = GetColumnQuantifiers(type); //Get delimiter of column name //Get full name - const attribute = getDbLabel(col.value, columnQuantifiers); - const attributeKeyType = col.children.find( - (x) => - ["FK", "PK"].findIndex( - (k) => k == x.value.toUpperCase() - ) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1 - ); - if (attributeKeyType) { - attribute.attributeKeyType = attributeKeyType.value; - if ( - attribute.attributeKeyType != "PK" && - attribute.attributeKeyType.indexOf("PK") != -1 - ) { - attribute.attributeKeyType = "PK"; + let attribute; + if (col.style.trim().startsWith("shape=tableRow")) { + attribute = getDbLabel(col.children[1].value, columnQuantifiers); + } else { + attribute = getDbLabel(col.value, columnQuantifiers); + } + console.log("Column: ", attribute.attributeName); + + // check for Primary Key attribute + if (col.children && col.children.length) { + try { + // Check for Primary Key or Foreign Key attribute + const attributeKeyType = col.children.find( + (x) => + ["FK", "PK"].findIndex( + (k) => k == x.value.toUpperCase() + ) !== -1 || x.value.toUpperCase().indexOf("PK,") != -1 + ); + if (attributeKeyType) { + attribute.attributeKeyType = attributeKeyType.value; + if ( + attribute.attributeKeyType != "PK" && + attribute.attributeKeyType.indexOf("PK") != -1 + ) { + attribute.attributeKeyType = "PK"; + } + } + } catch (e: unknown) { + console.error("PK check caught exception " + e); } } entity.attributes.push(attribute); + if (col.edges && col.edges.length) { + console.log(col.edges.length, "edges"); // check for edges foreign keys for (let e = 0; e < col.edges.length; e++) { const edge = col.edges[e]; + console.log("source=", edge.source, " target=", edge.target); if (edge.mxObjectId.indexOf("mxCell") !== -1) { if ( edge.style && edge.style.indexOf("endArrow=") != -1 && edge.source && - edge.source.value && - edge.target && - edge.target.value + edge.target ) { // need to check if end is open or certain value to determin relationship type // extract endArrow txt @@ -311,12 +343,17 @@ export function getMermaidDiagramDb( (targetIsPrimary || sourceIsPrimary) && !(targetIsPrimary && sourceIsPrimary) ) { + console.log("Source: ", edge.source.id, edge.source.value); let sourceId = edge.source.value; + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } const sourceAttr = getDbLabel( sourceId, columnQuantifiers ); sourceId = sourceAttr.attributeName; + let sourceEntity = edge.source.parent.value; // extract comments let commentsIndexes = getCommentIndexes(sourceEntity); @@ -339,8 +376,13 @@ export function getMermaidDiagramDb( } else { sourceEntity = RemoveNameQuantifiers(sourceEntity); } + + console.log("Target: ", edge.target.id, edge.target.value); let targetId = edge.target.value; - const targetAttr = getDbLabel( + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } + const targetAttr = getDbLabel( targetId, columnQuantifiers ); @@ -402,24 +444,32 @@ export function getMermaidDiagramDb( } else if (targetIsPrimary && sourceIsPrimary) { // add a new many to many table let sourceId = edge.source.value; - const sourceAttr = getDbLabel( + if (edge.source.style.trim().startsWith("shape=tableRow")) { + sourceId = edge.source.children[1].value; + } + const sourceAttr = getDbLabel( sourceId, columnQuantifiers ); sourceAttr.attributeKeyType = "PK"; sourceId = sourceAttr.attributeName; + let sourceParent = edge.source.parent; const sourceEntity = RemoveNameQuantifiers( - edge.source.parent.value + sourceParent.value ); let targetId = edge.target.value; - const targetAttr = getDbLabel( + if (edge.target.style.trim().startsWith("shape=tableRow")) { + targetId = edge.target.children[1].value; + } + const targetAttr = getDbLabel( targetId, columnQuantifiers ); targetAttr.attributeKeyType = "PK"; targetId = targetAttr.attributeName; + let targetParent = edge.target.parent; const targetEntity = RemoveNameQuantifiers( - edge.target.parent.value + targetParent.value ); const compositeEntity = { name: @@ -505,6 +555,7 @@ export function getMermaidDiagramDb( return db; } + /** * genearte a database model * @param entities @@ -704,10 +755,15 @@ export function CreateTableUI( if (col.mxObjectId.indexOf("mxCell") !== -1) { if ( col.style && - col.style.trim().startsWith("shape=partialRectangle") + (col.style.trim().startsWith("shape=partialRectangle") || + col.style.trim().startsWith("shape=tableRow")) ) { + let colValue = col.value; + if (col.style.trim().startsWith("shape=tableRow")) { + colValue = col.children[1].value; + } const attribute = getDbLabel( - col.value, + colValue, columnQuantifiers ); if (